From 4f532af0260a2cbc788192e2e5f55816284af517 Mon Sep 17 00:00:00 2001 From: Nanaloveyuki Date: Wed, 8 Jul 2026 12:24:21 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20add=20generated=20package=20inte?= =?UTF-8?q?rface=20snapshots?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/basic/pkg.generated.mbti | 13 +++ examples/config_build/pkg.generated.mbti | 13 +++ examples/console_basic/pkg.generated.mbti | 13 +++ examples/file_rotation/pkg.generated.mbti | 13 +++ examples/presets/pkg.generated.mbti | 13 +++ examples/style_tags/pkg.generated.mbti | 13 +++ examples/text_formatter/pkg.generated.mbti | 13 +++ src-async/utils/pkg.generated.mbti | 105 +++++++++++++++++++ src/core/pkg.generated.mbti | 45 +++++++++ src/utils/pkg.generated.mbti | 111 +++++++++++++++++++++ 10 files changed, 352 insertions(+) create mode 100644 examples/basic/pkg.generated.mbti create mode 100644 examples/config_build/pkg.generated.mbti create mode 100644 examples/console_basic/pkg.generated.mbti create mode 100644 examples/file_rotation/pkg.generated.mbti create mode 100644 examples/presets/pkg.generated.mbti create mode 100644 examples/style_tags/pkg.generated.mbti create mode 100644 examples/text_formatter/pkg.generated.mbti create mode 100644 src-async/utils/pkg.generated.mbti create mode 100644 src/core/pkg.generated.mbti create mode 100644 src/utils/pkg.generated.mbti diff --git a/examples/basic/pkg.generated.mbti b/examples/basic/pkg.generated.mbti new file mode 100644 index 0000000..647a6d0 --- /dev/null +++ b/examples/basic/pkg.generated.mbti @@ -0,0 +1,13 @@ +// Generated using `moon info`, DON'T EDIT IT +package "Nanaloveyuki/BitLogger/examples/basic" + +// Values + +// Errors + +// Types and methods + +// Type aliases + +// Traits + diff --git a/examples/config_build/pkg.generated.mbti b/examples/config_build/pkg.generated.mbti new file mode 100644 index 0000000..18f7313 --- /dev/null +++ b/examples/config_build/pkg.generated.mbti @@ -0,0 +1,13 @@ +// Generated using `moon info`, DON'T EDIT IT +package "Nanaloveyuki/BitLogger/examples/config_build" + +// Values + +// Errors + +// Types and methods + +// Type aliases + +// Traits + diff --git a/examples/console_basic/pkg.generated.mbti b/examples/console_basic/pkg.generated.mbti new file mode 100644 index 0000000..89a6e03 --- /dev/null +++ b/examples/console_basic/pkg.generated.mbti @@ -0,0 +1,13 @@ +// Generated using `moon info`, DON'T EDIT IT +package "Nanaloveyuki/BitLogger/examples/console_basic" + +// Values + +// Errors + +// Types and methods + +// Type aliases + +// Traits + diff --git a/examples/file_rotation/pkg.generated.mbti b/examples/file_rotation/pkg.generated.mbti new file mode 100644 index 0000000..7e7f57a --- /dev/null +++ b/examples/file_rotation/pkg.generated.mbti @@ -0,0 +1,13 @@ +// Generated using `moon info`, DON'T EDIT IT +package "Nanaloveyuki/BitLogger/examples/file_rotation" + +// Values + +// Errors + +// Types and methods + +// Type aliases + +// Traits + diff --git a/examples/presets/pkg.generated.mbti b/examples/presets/pkg.generated.mbti new file mode 100644 index 0000000..7617b2c --- /dev/null +++ b/examples/presets/pkg.generated.mbti @@ -0,0 +1,13 @@ +// Generated using `moon info`, DON'T EDIT IT +package "Nanaloveyuki/BitLogger/examples/presets" + +// Values + +// Errors + +// Types and methods + +// Type aliases + +// Traits + diff --git a/examples/style_tags/pkg.generated.mbti b/examples/style_tags/pkg.generated.mbti new file mode 100644 index 0000000..ce8493c --- /dev/null +++ b/examples/style_tags/pkg.generated.mbti @@ -0,0 +1,13 @@ +// Generated using `moon info`, DON'T EDIT IT +package "Nanaloveyuki/BitLogger/examples/style_tags" + +// Values + +// Errors + +// Types and methods + +// Type aliases + +// Traits + diff --git a/examples/text_formatter/pkg.generated.mbti b/examples/text_formatter/pkg.generated.mbti new file mode 100644 index 0000000..7a18b3b --- /dev/null +++ b/examples/text_formatter/pkg.generated.mbti @@ -0,0 +1,13 @@ +// Generated using `moon info`, DON'T EDIT IT +package "Nanaloveyuki/BitLogger/examples/text_formatter" + +// Values + +// Errors + +// Types and methods + +// Type aliases + +// Traits + diff --git a/src-async/utils/pkg.generated.mbti b/src-async/utils/pkg.generated.mbti new file mode 100644 index 0000000..2783dc0 --- /dev/null +++ b/src-async/utils/pkg.generated.mbti @@ -0,0 +1,105 @@ +// Generated using `moon info`, DON'T EDIT IT +package "Nanaloveyuki/BitLogger/src-async/utils" + +import { + "Nanaloveyuki/BitLogger/src/config_model", + "maria/json_parser", +} + +// Values +pub fn async_logger_build_config_to_json(AsyncLoggerBuildConfig) -> @json_parser.JsonValue + +pub fn async_logger_config_to_json(AsyncLoggerConfig) -> @json_parser.JsonValue + +pub fn async_logger_state_to_json(AsyncLoggerState) -> @json_parser.JsonValue + +pub fn async_runtime_mode_label(AsyncRuntimeMode) -> String + +pub fn async_runtime_state_to_json(AsyncRuntimeState) -> @json_parser.JsonValue + +pub fn compatibility_async_runtime_mode() -> AsyncRuntimeMode + +pub fn native_worker_async_runtime_mode() -> AsyncRuntimeMode + +pub fn parse_async_logger_build_config_text(String) -> AsyncLoggerBuildConfig raise + +pub fn parse_async_logger_config_text(String) -> AsyncLoggerConfig raise + +pub fn stringify_async_logger_build_config(AsyncLoggerBuildConfig, pretty? : Bool) -> String + +pub fn stringify_async_logger_config(AsyncLoggerConfig, pretty? : Bool) -> String + +pub fn stringify_async_logger_state(AsyncLoggerState, pretty? : Bool) -> String + +pub fn stringify_async_runtime_state(AsyncRuntimeState, pretty? : Bool) -> String + +// Errors + +// Types and methods +pub(all) enum AsyncFlushPolicy { + Never + Batch + Shutdown +} + +pub(all) enum AsyncLifecyclePhase { + Ready + Running + Failed + Closing + Closed + ClosedFailed +} + +pub struct AsyncLoggerBuildConfig { + logger : @config_model.LoggerConfig + async_config : AsyncLoggerConfig +} +pub fn AsyncLoggerBuildConfig::new(logger? : @config_model.LoggerConfig, async_config? : AsyncLoggerConfig) -> Self + +pub struct AsyncLoggerConfig { + max_pending : Int + overflow : AsyncOverflowPolicy + max_batch : Int + linger_ms : Int + flush : AsyncFlushPolicy +} +pub fn AsyncLoggerConfig::new(max_pending? : Int, overflow? : AsyncOverflowPolicy, max_batch? : Int, linger_ms? : Int, flush? : AsyncFlushPolicy) -> Self + +pub struct AsyncLoggerState { + runtime : AsyncRuntimeState + phase : AsyncLifecyclePhase + pending_count : Int + dropped_count : Int + is_closed : Bool + is_running : Bool + has_failed : Bool + backlog_retained : Bool + can_rerun : Bool + terminal : Bool + last_error : String + flush_policy : AsyncFlushPolicy +} +pub fn AsyncLoggerState::new(AsyncRuntimeState, AsyncLifecyclePhase, Int, Int, String, AsyncFlushPolicy) -> Self + +pub(all) enum AsyncOverflowPolicy { + Blocking + DropOldest + DropNewest +} + +pub enum AsyncRuntimeMode { + NativeWorker + Compatibility +} + +pub struct AsyncRuntimeState { + mode : AsyncRuntimeMode + background_worker : Bool +} +pub fn AsyncRuntimeState::new(AsyncRuntimeMode, Bool) -> Self + +// Type aliases + +// Traits + diff --git a/src/core/pkg.generated.mbti b/src/core/pkg.generated.mbti new file mode 100644 index 0000000..a464961 --- /dev/null +++ b/src/core/pkg.generated.mbti @@ -0,0 +1,45 @@ +// Generated using `moon info`, DON'T EDIT IT +package "Nanaloveyuki/BitLogger/src/core" + +// Values +pub fn field(String, String) -> Field + +pub fn fields(Array[(String, String)]) -> Array[Field] + +// Errors + +// Types and methods +pub struct Field { + key : String + value : String +} +pub fn Field::with_value(Self, String) -> Self + +pub(all) enum Level { + Trace + Debug + Info + Warn + Error +} +pub fn Level::enabled(Self, Self) -> Bool +pub fn Level::label(Self) -> String +pub fn Level::priority(Self) -> Int + +pub struct Record { + level : Level + timestamp_ms : UInt64 + target : String + message : String + fields : Array[Field] +} +pub fn Record::copy(Self) -> Self +pub fn Record::new(Level, String, timestamp_ms? : UInt64, target? : String, fields? : Array[Field]) -> Self +pub fn Record::with_fields(Self, Array[Field]) -> Self +pub fn Record::with_message(Self, String) -> Self +pub fn Record::with_target(Self, String) -> Self + +// Type aliases + +// Traits + diff --git a/src/utils/pkg.generated.mbti b/src/utils/pkg.generated.mbti new file mode 100644 index 0000000..319eeb9 --- /dev/null +++ b/src/utils/pkg.generated.mbti @@ -0,0 +1,111 @@ +// Generated using `moon info`, DON'T EDIT IT +package "Nanaloveyuki/BitLogger/src/utils" + +import { + "Nanaloveyuki/BitLogger/src/core", + "Nanaloveyuki/BitLogger/src/formatting", +} + +// Values +pub fn all_of(Array[(@core.Record) -> Bool]) -> (@core.Record) -> Bool + +pub fn any_of(Array[(@core.Record) -> Bool]) -> (@core.Record) -> Bool + +pub fn append_fields(Array[@core.Field]) -> (@core.Record) -> @core.Record + +pub fn close_file_handle_internal(FileHandle) -> Bool + +pub fn color_mode_label(@formatting.ColorMode) -> String + +pub fn color_support_label(@formatting.ColorSupport) -> String + +pub fn compose_patches(Array[(@core.Record) -> @core.Record]) -> (@core.Record) -> @core.Record + +pub fn default_style_tag_registry() -> @formatting.StyleTagRegistry + +pub fn field_equals(String, String) -> (@core.Record) -> Bool + +pub fn file_size_i64_internal(FileHandle) -> Int64 + +pub fn flush_file_handle_internal(FileHandle) -> Bool + +pub fn format_json(@core.Record) -> String + +pub fn format_text(@core.Record, formatter? : @formatting.TextFormatter) -> String + +pub fn global_style_tag_registry() -> @formatting.StyleTagRegistry + +pub fn has_field(String) -> (@core.Record) -> Bool + +pub fn identity_patch() -> (@core.Record) -> @core.Record + +pub fn level_at_least(@core.Level) -> (@core.Record) -> Bool + +pub fn message_contains(String) -> (@core.Record) -> Bool + +pub fn native_files_supported_internal() -> Bool + +pub fn not_((@core.Record) -> Bool) -> (@core.Record) -> Bool + +pub fn open_file_handle_internal(String, Bool) -> FileHandle? + +pub fn prefix_message(String) -> (@core.Record) -> @core.Record + +pub fn redact_field(String, placeholder? : String) -> (@core.Record) -> @core.Record + +pub fn redact_fields(Array[String], placeholder? : String) -> (@core.Record) -> @core.Record + +pub fn remove_file_internal(String) -> Bool + +pub fn rename_file_internal(String, String) -> Bool + +pub fn reset_global_style_tag_registry() -> Unit + +pub fn set_global_style_tag_registry(@formatting.StyleTagRegistry) -> Unit + +pub fn set_target(String) -> (@core.Record) -> @core.Record + +pub fn string_byte_length_internal(String) -> Int + +pub fn style_markup_mode_label(@formatting.StyleMarkupMode) -> String + +pub fn style_tag_registry() -> @formatting.StyleTagRegistry + +pub fn target_has_prefix(String) -> (@core.Record) -> Bool + +pub fn target_is(String) -> (@core.Record) -> Bool + +pub fn text_formatter(show_timestamp? : Bool, show_level? : Bool, show_target? : Bool, show_fields? : Bool, separator? : String, field_separator? : String, template? : String, color_mode? : @formatting.ColorMode, color_support? : @formatting.ColorSupport, style_markup? : @formatting.StyleMarkupMode, target_style_markup? : @formatting.StyleMarkupMode, fields_style_markup? : @formatting.StyleMarkupMode, style_tags? : @formatting.StyleTagRegistry?) -> @formatting.TextFormatter + +pub fn text_style(fg? : String?, bg? : String?, bold? : Bool, dim? : Bool, italic? : Bool, underline? : Bool) -> @formatting.TextStyle + +pub fn write_file_handle_internal(FileHandle, String) -> Bool + +// Errors + +// Types and methods +pub struct FileHandle { + path : String +} + +// Type aliases +pub using @formatting {type ColorMode} + +pub using @formatting {type ColorSupport} + +pub type RecordFormatter = (@core.Record) -> String + +pub type RecordPatch = (@core.Record) -> @core.Record + +pub type RecordPredicate = (@core.Record) -> Bool + +pub using @formatting {type StyleMarkupMode} + +pub using @formatting {type StyleTagRegistry} + +pub using @formatting {type TextFormatter} + +pub using @formatting {type TextStyle} + +// Traits +