@powerlines/core 0.43.31 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/index.cjs +4 -0
- package/dist/constants/index.d.cts +2 -1
- package/dist/constants/index.d.mts +2 -1
- package/dist/constants/index.mjs +2 -1
- package/dist/constants/log-level.cjs +43 -0
- package/dist/constants/log-level.d.cts +40 -0
- package/dist/constants/log-level.d.cts.map +1 -0
- package/dist/constants/log-level.d.mts +40 -0
- package/dist/constants/log-level.d.mts.map +1 -0
- package/dist/constants/log-level.mjs +41 -0
- package/dist/constants/log-level.mjs.map +1 -0
- package/dist/index.cjs +6 -3
- package/dist/index.d.cts +5 -4
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +4 -3
- package/dist/lib/index.cjs +3 -3
- package/dist/lib/index.d.cts +2 -2
- package/dist/lib/index.d.mts +2 -2
- package/dist/lib/index.mjs +3 -3
- package/dist/lib/logger.cjs +29 -23
- package/dist/lib/logger.d.cts +11 -23
- package/dist/lib/logger.d.cts.map +1 -1
- package/dist/lib/logger.d.mts +11 -23
- package/dist/lib/logger.d.mts.map +1 -1
- package/dist/lib/logger.mjs +28 -22
- package/dist/lib/logger.mjs.map +1 -1
- package/dist/lib/unplugin/plugin.cjs +3 -3
- package/dist/lib/unplugin/plugin.mjs +4 -4
- package/dist/lib/unplugin/plugin.mjs.map +1 -1
- package/dist/lib/utilities/index.cjs +1 -1
- package/dist/lib/utilities/index.mjs +1 -1
- package/dist/lib/utilities/write-file.cjs +1 -2
- package/dist/lib/utilities/write-file.d.cts +1 -1
- package/dist/lib/utilities/write-file.d.cts.map +1 -1
- package/dist/lib/utilities/write-file.d.mts +1 -1
- package/dist/lib/utilities/write-file.d.mts.map +1 -1
- package/dist/lib/utilities/write-file.mjs +1 -2
- package/dist/lib/utilities/write-file.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +3 -2
- package/dist/plugin-utils/index.d.cts +2 -2
- package/dist/plugin-utils/index.d.mts +2 -2
- package/dist/plugin-utils/index.mjs +3 -3
- package/dist/plugin-utils/logging.cjs +54 -1
- package/dist/plugin-utils/logging.d.cts +11 -1
- package/dist/plugin-utils/logging.d.cts.map +1 -1
- package/dist/plugin-utils/logging.d.mts +11 -1
- package/dist/plugin-utils/logging.d.mts.map +1 -1
- package/dist/plugin-utils/logging.mjs +53 -1
- package/dist/plugin-utils/logging.mjs.map +1 -1
- package/dist/types/config.d.cts +25 -27
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +25 -27
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/context.d.cts +21 -24
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +21 -24
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.mts +3 -2
- package/dist/types/log.cjs +26 -0
- package/dist/types/log.d.cts +90 -0
- package/dist/types/log.d.cts.map +1 -0
- package/dist/types/log.d.mts +90 -0
- package/dist/types/log.d.mts.map +1 -0
- package/dist/types/log.mjs +25 -0
- package/dist/types/log.mjs.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.cts","names":[],"sources":["../../src/types/context.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.cts","names":[],"sources":["../../src/types/context.ts"],"mappings":";;;;;;;;;;;;;;;;;;UAqDiB,QAAA;EAAA;;;EAIf,QAAA;EAAA;;;EAKA,OAAA;EAeA;;;EAVA,SAAA;EAkBe;;;EAbf,SAAA;EAagC;;;EARhC,QAAA;EASY;AAGd;;EAPE,UAAA;AAAA;AAAA,UAGe,QAAA,SAAiB,IAAA;EAChC,MAAA,EAAQ,IAAA;AAAA;AAAA,UAGO,iBAAA;EACf,IAAA;EACA,GAAA,EAAK,SAAA;AAAA;;;;UAMU,UAAA;EAST;;;EALN,EAAA;EAewB;;AAG1B;EAbE,IAAA,EAAM,WAAA;;;;EAKN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;EAAA;;;;;;EAQR,KAAA,QAAa,OAAA,CAAQ,aAAA,CAAc,eAAA;AAAA;AAAA,KAGzB,kBAAA,yBACc,cAAA,GAAiB,cAAA,IACvC,oBAAA,GAAuB,aAAA,CAAc,eAAA;AAAA,KAE7B,wBAAA,kBAA0C,aAAA,IACpD,oBAAA,GAAuB,QAAA;AAAA"}
|
package/dist/types/context.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ResolveOptions, VirtualFile, VirtualFileSystemInterface, WriteOptions } from "./fs.mjs";
|
|
2
2
|
import { Plugin } from "./plugin.mjs";
|
|
3
3
|
import { HooksList, HooksListItem } from "./hooks.mjs";
|
|
4
|
+
import { LogFn, LogFnConfig, LogLevelResolvedConfig, LogMeta } from "./log.mjs";
|
|
4
5
|
import { ParsedTypeScriptConfig } from "./tsconfig.mjs";
|
|
5
|
-
import { EngineOptions, EnvironmentResolvedConfig,
|
|
6
|
-
import { ExternalIdResult, UnpluginBuildContext,
|
|
6
|
+
import { EngineOptions, EnvironmentResolvedConfig, ParsedUserConfig, ResolvedConfig, ResolvedEngineOptions, ResolvedEntryTypeDefinition, ResolvedExecutionOptions } from "./config.mjs";
|
|
7
|
+
import { ExternalIdResult, UnpluginBuildContext, UnpluginMessage } from "unplugin";
|
|
7
8
|
import MagicString, { SourceMap } from "magic-string";
|
|
8
9
|
import { Jiti } from "jiti";
|
|
9
10
|
import { EnvPaths } from "@stryke/env/get-env-paths";
|
|
@@ -128,6 +129,9 @@ interface ResolveResult extends ExternalIdResult {
|
|
|
128
129
|
*/
|
|
129
130
|
virtual?: boolean;
|
|
130
131
|
}
|
|
132
|
+
interface PowerlinesMessage extends UnpluginMessage {
|
|
133
|
+
meta: Partial<LogMeta>;
|
|
134
|
+
}
|
|
131
135
|
/**
|
|
132
136
|
* The base Powerlines context.
|
|
133
137
|
*
|
|
@@ -142,7 +146,7 @@ interface BaseContext {
|
|
|
142
146
|
/**
|
|
143
147
|
* The timestamp when the context was initialized
|
|
144
148
|
*/
|
|
145
|
-
timestamp:
|
|
149
|
+
timestamp: number;
|
|
146
150
|
/**
|
|
147
151
|
* The Powerlines environment paths
|
|
148
152
|
*/
|
|
@@ -158,7 +162,7 @@ interface BaseContext {
|
|
|
158
162
|
/**
|
|
159
163
|
* The log level to use for the Powerlines processes.
|
|
160
164
|
*/
|
|
161
|
-
logLevel:
|
|
165
|
+
logLevel: LogLevelResolvedConfig;
|
|
162
166
|
/**
|
|
163
167
|
* A logging function for the Powerlines engine
|
|
164
168
|
*/
|
|
@@ -166,27 +170,27 @@ interface BaseContext {
|
|
|
166
170
|
/**
|
|
167
171
|
* A logging function for fatal messages
|
|
168
172
|
*/
|
|
169
|
-
fatal: (message: string |
|
|
173
|
+
fatal: (message: string | PowerlinesMessage) => void;
|
|
170
174
|
/**
|
|
171
175
|
* A logging function for error messages
|
|
172
176
|
*/
|
|
173
|
-
error: (message: string |
|
|
177
|
+
error: (message: string | PowerlinesMessage) => void;
|
|
174
178
|
/**
|
|
175
179
|
* A logging function for warning messages
|
|
176
180
|
*/
|
|
177
|
-
warn: (message: string |
|
|
181
|
+
warn: (message: string | PowerlinesMessage) => void;
|
|
178
182
|
/**
|
|
179
183
|
* A logging function for informational messages
|
|
180
184
|
*/
|
|
181
|
-
info: (message: string |
|
|
185
|
+
info: (message: string | PowerlinesMessage) => void;
|
|
182
186
|
/**
|
|
183
187
|
* A logging function for debug messages
|
|
184
188
|
*/
|
|
185
|
-
debug: (message: string |
|
|
189
|
+
debug: (message: string | PowerlinesMessage) => void;
|
|
186
190
|
/**
|
|
187
191
|
* A logging function for trace messages
|
|
188
192
|
*/
|
|
189
|
-
trace: (message: string |
|
|
193
|
+
trace: (message: string | PowerlinesMessage) => void;
|
|
190
194
|
/**
|
|
191
195
|
* A function to create a timer for measuring the duration of asynchronous operations
|
|
192
196
|
*
|
|
@@ -204,17 +208,17 @@ interface BaseContext {
|
|
|
204
208
|
/**
|
|
205
209
|
* Create a new logger instance
|
|
206
210
|
*
|
|
207
|
-
* @param
|
|
211
|
+
* @param config - The configuration options to use for the logger instance, which can be used to customize the appearance and behavior of the log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance.
|
|
208
212
|
* @returns A logger function
|
|
209
213
|
*/
|
|
210
|
-
createLog: (
|
|
214
|
+
createLog: (config?: LogFnConfig) => LogFn;
|
|
211
215
|
/**
|
|
212
216
|
* Extend the current logger instance with a new source
|
|
213
217
|
*
|
|
214
|
-
* @param
|
|
218
|
+
* @param config - The overlay metadata to use for the badge in the log output.
|
|
215
219
|
* @returns A logger function
|
|
216
220
|
*/
|
|
217
|
-
extendLog: (
|
|
221
|
+
extendLog: (config: LogFnConfig) => LogFn;
|
|
218
222
|
/**
|
|
219
223
|
* A function to create a deep clone of the context
|
|
220
224
|
*
|
|
@@ -687,14 +691,6 @@ interface EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedCo
|
|
|
687
691
|
* Retrieves the hook handlers for a specific hook name
|
|
688
692
|
*/
|
|
689
693
|
selectHooks: <TKey extends string>(key: TKey, options?: SelectHooksOptions) => SelectHookResult<PluginContext<TResolvedConfig>, TKey>;
|
|
690
|
-
/**
|
|
691
|
-
* Extend the current logger instance with a new name
|
|
692
|
-
*
|
|
693
|
-
* @param source - The name of the source to use for the extended logger instance
|
|
694
|
-
* @param plugin - An optional plugin name to use for the extended logger instance, which can be used to identify the origin of log messages in the logs for better traceability. This is typically the name of the plugin or module that is creating the logger instance.
|
|
695
|
-
* @returns A logger function
|
|
696
|
-
*/
|
|
697
|
-
extendLog: (source: string, plugin?: string) => LogFn;
|
|
698
694
|
/**
|
|
699
695
|
* A function to create a deep clone of the context
|
|
700
696
|
*
|
|
@@ -703,7 +699,7 @@ interface EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedCo
|
|
|
703
699
|
*/
|
|
704
700
|
clone: () => Promise<EnvironmentContext<TResolvedConfig>>;
|
|
705
701
|
}
|
|
706
|
-
interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig
|
|
702
|
+
interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
|
|
707
703
|
/**
|
|
708
704
|
* The unique identifier of the plugin associated with this context, which can be used for logging and other purposes to distinguish between different plugins in the same process.
|
|
709
705
|
*/
|
|
@@ -741,6 +737,7 @@ declare type __ΩParseOptions = any[];
|
|
|
741
737
|
declare type __ΩEmitOptions = any[];
|
|
742
738
|
declare type __ΩEmitEntryOptions = any[];
|
|
743
739
|
declare type __ΩResolveResult = any[];
|
|
740
|
+
declare type __ΩPowerlinesMessage = any[];
|
|
744
741
|
declare type __ΩBaseContext = any[];
|
|
745
742
|
declare type __ΩExecutionStateItem = any[];
|
|
746
743
|
declare type __ΩHookExecutionStateItem = any[];
|
|
@@ -757,5 +754,5 @@ declare type __ΩPluginContext = any[];
|
|
|
757
754
|
declare type __ΩBuildPluginContext = any[];
|
|
758
755
|
declare type __ΩWithUnpluginBuildContext = any[];
|
|
759
756
|
//#endregion
|
|
760
|
-
export { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EnvironmentContext, EnvironmentContextPlugin, ExecutionContext, ExecutionState, ExecutionStateItem, FetchOptions, HookExecutionStateItem, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult$1 as TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, __ΩBaseContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngineContext, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩExecutionContext, __ΩExecutionState, __ΩExecutionStateItem, __ΩFetchOptions, __ΩHookExecutionStateItem, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolveResult, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext };
|
|
757
|
+
export { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EnvironmentContext, EnvironmentContextPlugin, ExecutionContext, ExecutionState, ExecutionStateItem, FetchOptions, HookExecutionStateItem, InitContextOptions, MetaInfo, ParseOptions, PluginContext, PowerlinesMessage, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult$1 as TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, __ΩBaseContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngineContext, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩExecutionContext, __ΩExecutionState, __ΩExecutionStateItem, __ΩFetchOptions, __ΩHookExecutionStateItem, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩPowerlinesMessage, __ΩResolveResult, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext };
|
|
761
758
|
//# sourceMappingURL=context.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"mappings":";;;;;;;;;;;;;;;;;;UAqDiB,QAAA;EAAA;;;EAIf,QAAA;EAAA;;;EAKA,OAAA;EAeA;;;EAVA,SAAA;EAkBe;;;EAbf,SAAA;EAagC;;;EARhC,QAAA;EASY;AAGd;;EAPE,UAAA;AAAA;AAAA,UAGe,QAAA,SAAiB,IAAA;EAChC,MAAA,EAAQ,IAAA;AAAA;AAAA,UAGO,iBAAA;EACf,IAAA;EACA,GA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eAAA;EAyBmB;;;EArBnC,EAAA;EAJe;;;EASf,WAAA,EAAa,yBAAA;EAVgC;;;;;;EAkB7C,MAAA,EAAQ,KAAA;EAAA;;;;;;EAQR,KAAA,QAAa,OAAA,CAAQ,aAAA,CAAc,eAAA;AAAA;AAAA,KAGzB,kBAAA,yBACc,cAAA,GAAiB,cAAA,IACvC,oBAAA,GAAuB,aAAA,CAAc,eAAA;AAAA,KAE7B,wBAAA,kBAA0C,aAAA,IACpD,oBAAA,GAAuB,QAAA;AAAA"}
|
package/dist/types/index.d.cts
CHANGED
|
@@ -5,6 +5,7 @@ import { API, Engine, Execution, ExecutionWorkerParams, ExecutionWorkerProcess,
|
|
|
5
5
|
import { BuilderVariant, InferUnpluginOptions, InferUnpluginVariant, UnpluginAsyncFactory, UnpluginBuilderVariant, UnpluginFactory, UnpluginHookFunctions, UnpluginOptions, UnpluginUserConfig, __ΩBuilderVariant, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩUnpluginAsyncFactory, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginHookFunctions, __ΩUnpluginOptions, __ΩUnpluginUserConfig } from "./unplugin.cjs";
|
|
6
6
|
import { BasePlugin, HookFunctions, Hooks, Plugin, PluginHook, PluginHookFields, PluginHookObject, PluginHooks, PluginNonHookFields, TypesResult, __ΩBasePlugin, __ΩHookFunctions, __ΩHooks, __ΩPlugin, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginNonHookFields, __ΩTypesResult } from "./plugin.cjs";
|
|
7
7
|
import { CallHookOptions, HookListOrders, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, NormalizedStringFilter, PluginFilter, TransformHookFilter, __ΩCallHookOptions, __ΩHookListOrders, __ΩHooksList, __ΩHooksListItem, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩNormalizedStringFilter, __ΩPluginFilter, __ΩTransformHookFilter } from "./hooks.cjs";
|
|
8
|
+
import { CreateLoggerFunction, LogCategories, LogCategory, LogFn, LogFnConfig, LogFnMeta, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogLevels, LogMeta, Logger, __ΩCreateLoggerFunction, __ΩLogCategory, __ΩLogFn, __ΩLogFnConfig, __ΩLogFnMeta, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMeta, __ΩLogger } from "./log.cjs";
|
|
8
9
|
import { DeepkitOptions, Level, ParsedTypeScriptConfig, RawReflectionMode, ReflectionMode, TSCompilerOptions, TSConfig, __ΩDeepkitOptions, __ΩLevel, __ΩParsedTypeScriptConfig, __ΩRawReflectionMode, __ΩReflectionMode, __ΩTSCompilerOptions, __ΩTSConfig } from "./tsconfig.cjs";
|
|
9
|
-
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EnvironmentContext, EnvironmentContextPlugin, ExecutionContext, ExecutionState, ExecutionStateItem, FetchOptions, HookExecutionStateItem, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, __ΩBaseContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngineContext, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩExecutionContext, __ΩExecutionState, __ΩExecutionStateItem, __ΩFetchOptions, __ΩHookExecutionStateItem, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolveResult, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext } from "./context.cjs";
|
|
10
|
-
import { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig, CopyResolvedConfig, DeployInlineConfig, DocsInlineConfig, EngineOptions, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, InlineConfig, LintInlineConfig,
|
|
10
|
+
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EnvironmentContext, EnvironmentContextPlugin, ExecutionContext, ExecutionState, ExecutionStateItem, FetchOptions, HookExecutionStateItem, InitContextOptions, MetaInfo, ParseOptions, PluginContext, PowerlinesMessage, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, __ΩBaseContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngineContext, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩExecutionContext, __ΩExecutionState, __ΩExecutionStateItem, __ΩFetchOptions, __ΩHookExecutionStateItem, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩPowerlinesMessage, __ΩResolveResult, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext } from "./context.cjs";
|
|
11
|
+
import { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig, CopyResolvedConfig, DeployInlineConfig, DocsInlineConfig, EngineOptions, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, InlineConfig, LintInlineConfig, Mode, NewInlineConfig, OutputConfig, OutputResolvedConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, ResolveConfig, ResolveResolvedConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedEngineOptions, ResolvedEntryTypeDefinition, ResolvedExecutionOptions, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigFn, WorkspaceConfig, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩConfig, __ΩCopyConfig, __ΩCopyResolvedConfig, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEngineOptions, __ΩEnvironmentConfig, __ΩEnvironmentResolvedConfig, __ΩExecutionOptions, __ΩInlineConfig, __ΩLintInlineConfig, __ΩMode, __ΩNewInlineConfig, __ΩOutputConfig, __ΩOutputResolvedConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩResolveConfig, __ΩResolveResolvedConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedEngineOptions, __ΩResolvedEntryTypeDefinition, __ΩResolvedExecutionOptions, __ΩTestInlineConfig, __ΩTypesInlineConfig, __ΩUserConfig, __ΩUserConfigFn, __ΩWorkspaceConfig } from "./config.cjs";
|
package/dist/types/index.d.mts
CHANGED
|
@@ -5,6 +5,7 @@ import { API, Engine, Execution, ExecutionWorkerParams, ExecutionWorkerProcess,
|
|
|
5
5
|
import { BuilderVariant, InferUnpluginOptions, InferUnpluginVariant, UnpluginAsyncFactory, UnpluginBuilderVariant, UnpluginFactory, UnpluginHookFunctions, UnpluginOptions, UnpluginUserConfig, __ΩBuilderVariant, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩUnpluginAsyncFactory, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginHookFunctions, __ΩUnpluginOptions, __ΩUnpluginUserConfig } from "./unplugin.mjs";
|
|
6
6
|
import { BasePlugin, HookFunctions, Hooks, Plugin, PluginHook, PluginHookFields, PluginHookObject, PluginHooks, PluginNonHookFields, TypesResult, __ΩBasePlugin, __ΩHookFunctions, __ΩHooks, __ΩPlugin, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginNonHookFields, __ΩTypesResult } from "./plugin.mjs";
|
|
7
7
|
import { CallHookOptions, HookListOrders, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, NormalizedStringFilter, PluginFilter, TransformHookFilter, __ΩCallHookOptions, __ΩHookListOrders, __ΩHooksList, __ΩHooksListItem, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩNormalizedStringFilter, __ΩPluginFilter, __ΩTransformHookFilter } from "./hooks.mjs";
|
|
8
|
+
import { CreateLoggerFunction, LogCategories, LogCategory, LogFn, LogFnConfig, LogFnMeta, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogLevels, LogMeta, Logger, __ΩCreateLoggerFunction, __ΩLogCategory, __ΩLogFn, __ΩLogFnConfig, __ΩLogFnMeta, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMeta, __ΩLogger } from "./log.mjs";
|
|
8
9
|
import { DeepkitOptions, Level, ParsedTypeScriptConfig, RawReflectionMode, ReflectionMode, TSCompilerOptions, TSConfig, __ΩDeepkitOptions, __ΩLevel, __ΩParsedTypeScriptConfig, __ΩRawReflectionMode, __ΩReflectionMode, __ΩTSCompilerOptions, __ΩTSConfig } from "./tsconfig.mjs";
|
|
9
|
-
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EnvironmentContext, EnvironmentContextPlugin, ExecutionContext, ExecutionState, ExecutionStateItem, FetchOptions, HookExecutionStateItem, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, __ΩBaseContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngineContext, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩExecutionContext, __ΩExecutionState, __ΩExecutionStateItem, __ΩFetchOptions, __ΩHookExecutionStateItem, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolveResult, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext } from "./context.mjs";
|
|
10
|
-
import { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig, CopyResolvedConfig, DeployInlineConfig, DocsInlineConfig, EngineOptions, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, InlineConfig, LintInlineConfig,
|
|
10
|
+
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EnvironmentContext, EnvironmentContextPlugin, ExecutionContext, ExecutionState, ExecutionStateItem, FetchOptions, HookExecutionStateItem, InitContextOptions, MetaInfo, ParseOptions, PluginContext, PowerlinesMessage, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, __ΩBaseContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngineContext, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩExecutionContext, __ΩExecutionState, __ΩExecutionStateItem, __ΩFetchOptions, __ΩHookExecutionStateItem, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩPowerlinesMessage, __ΩResolveResult, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext } from "./context.mjs";
|
|
11
|
+
import { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig, CopyResolvedConfig, DeployInlineConfig, DocsInlineConfig, EngineOptions, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, InlineConfig, LintInlineConfig, Mode, NewInlineConfig, OutputConfig, OutputResolvedConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, ResolveConfig, ResolveResolvedConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedEngineOptions, ResolvedEntryTypeDefinition, ResolvedExecutionOptions, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigFn, WorkspaceConfig, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩConfig, __ΩCopyConfig, __ΩCopyResolvedConfig, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEngineOptions, __ΩEnvironmentConfig, __ΩEnvironmentResolvedConfig, __ΩExecutionOptions, __ΩInlineConfig, __ΩLintInlineConfig, __ΩMode, __ΩNewInlineConfig, __ΩOutputConfig, __ΩOutputResolvedConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩResolveConfig, __ΩResolveResolvedConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedEngineOptions, __ΩResolvedEntryTypeDefinition, __ΩResolvedExecutionOptions, __ΩTestInlineConfig, __ΩTypesInlineConfig, __ΩUserConfig, __ΩUserConfigFn, __ΩWorkspaceConfig } from "./config.mjs";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/types/log.ts
|
|
3
|
+
const LogLevels = {
|
|
4
|
+
SILENT: "silent",
|
|
5
|
+
ERROR: "error",
|
|
6
|
+
WARN: "warn",
|
|
7
|
+
INFO: "info",
|
|
8
|
+
DEBUG: "debug",
|
|
9
|
+
TRACE: "trace"
|
|
10
|
+
};
|
|
11
|
+
const LogCategories = {
|
|
12
|
+
GENERAL: "general",
|
|
13
|
+
FS: "fs",
|
|
14
|
+
PERFORMANCE: "performance",
|
|
15
|
+
CONFIG: "config",
|
|
16
|
+
PLUGINS: "plugins",
|
|
17
|
+
HOOKS: "hooks",
|
|
18
|
+
ENV: "env",
|
|
19
|
+
IPC: "ipc",
|
|
20
|
+
BABEL: "babel",
|
|
21
|
+
NETWORK: "network"
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
exports.LogCategories = LogCategories;
|
|
26
|
+
exports.LogLevels = LogLevels;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { BaseContext } from "./context.cjs";
|
|
2
|
+
import { Mode, WorkspaceConfig } from "./config.cjs";
|
|
3
|
+
import { PartialKeys, RequiredKeys } from "@stryke/types/base";
|
|
4
|
+
|
|
5
|
+
//#region src/types/log.d.ts
|
|
6
|
+
type LogLevel = "silent" | "error" | "warn" | "info" | "debug" | "trace";
|
|
7
|
+
type LogCategory = "general" | "fs" | "performance" | "config" | "plugins" | "hooks" | "env" | "ipc" | "babel" | "network";
|
|
8
|
+
declare const LogLevels: {
|
|
9
|
+
readonly SILENT: "silent";
|
|
10
|
+
readonly ERROR: "error";
|
|
11
|
+
readonly WARN: "warn";
|
|
12
|
+
readonly INFO: "info";
|
|
13
|
+
readonly DEBUG: "debug";
|
|
14
|
+
readonly TRACE: "trace";
|
|
15
|
+
};
|
|
16
|
+
declare const LogCategories: {
|
|
17
|
+
readonly GENERAL: "general";
|
|
18
|
+
readonly FS: "fs";
|
|
19
|
+
readonly PERFORMANCE: "performance";
|
|
20
|
+
readonly CONFIG: "config";
|
|
21
|
+
readonly PLUGINS: "plugins";
|
|
22
|
+
readonly HOOKS: "hooks";
|
|
23
|
+
readonly ENV: "env";
|
|
24
|
+
readonly IPC: "ipc";
|
|
25
|
+
readonly BABEL: "babel";
|
|
26
|
+
readonly NETWORK: "network";
|
|
27
|
+
};
|
|
28
|
+
interface LogMeta {
|
|
29
|
+
/**
|
|
30
|
+
* A unique identifier for the log message, which can be used to correlate related log entries across different parts of the system or different executions.
|
|
31
|
+
*/
|
|
32
|
+
logId: string;
|
|
33
|
+
/**
|
|
34
|
+
* The log level label indicating the severity of the log message.
|
|
35
|
+
*/
|
|
36
|
+
level: LogLevel;
|
|
37
|
+
/**
|
|
38
|
+
* The category of the log message, which can be used to classify and filter log entries based on their purpose or origin.
|
|
39
|
+
*/
|
|
40
|
+
category: LogCategory;
|
|
41
|
+
/**
|
|
42
|
+
* The timestamp when the IPC message was created, represented as the number of milliseconds since the Unix epoch.
|
|
43
|
+
*/
|
|
44
|
+
timestamp: number;
|
|
45
|
+
/**
|
|
46
|
+
* A unique identifier for the current execution instance, which can be used for logging and other purposes to distinguish between different executions in the same process.
|
|
47
|
+
*/
|
|
48
|
+
executionId?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The zero-based index of the current execution within the sequence of executions in the same process.
|
|
51
|
+
*/
|
|
52
|
+
executionIndex?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Optional environment identifier to specify the context or environment in which the message is being processed.
|
|
55
|
+
*/
|
|
56
|
+
environment?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Optional plugin name to specify the source plugin of the log message.
|
|
59
|
+
*/
|
|
60
|
+
plugin?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The name of the logger or source of the log message, which can be used to identify the origin of the log entry.
|
|
63
|
+
*/
|
|
64
|
+
source?: string;
|
|
65
|
+
}
|
|
66
|
+
type Logger = (meta: LogMeta, ...args: string[]) => void;
|
|
67
|
+
type LogFnConfig = Omit<Partial<LogMeta>, "logId" | "level" | "timestamp"> & {
|
|
68
|
+
mode?: Mode;
|
|
69
|
+
command?: string;
|
|
70
|
+
logLevel?: LogLevelUserConfig | LogLevelResolvedConfig;
|
|
71
|
+
colors?: WorkspaceConfig["colors"];
|
|
72
|
+
};
|
|
73
|
+
type LogFnMeta = LogLevel | PartialKeys<LogMeta, "logId" | "category" | "timestamp">;
|
|
74
|
+
type LogFn = (meta: LogFnMeta, ...args: string[]) => void;
|
|
75
|
+
type CreateLoggerFunction<TContext extends BaseContext = BaseContext> = (context: TContext) => Logger;
|
|
76
|
+
type LogLevelUserConfig = LogLevel | RequiredKeys<Record<LogCategory, LogLevel | boolean | undefined>, "general">;
|
|
77
|
+
type LogLevelResolvedConfig = Record<LogCategory, LogLevel>;
|
|
78
|
+
declare type __ΩLogLevel = any[];
|
|
79
|
+
declare type __ΩLogCategory = any[];
|
|
80
|
+
declare type __ΩLogMeta = any[];
|
|
81
|
+
declare type __ΩLogger = any[];
|
|
82
|
+
declare type __ΩLogFnConfig = any[];
|
|
83
|
+
declare type __ΩLogFnMeta = any[];
|
|
84
|
+
declare type __ΩLogFn = any[];
|
|
85
|
+
declare type __ΩCreateLoggerFunction = any[];
|
|
86
|
+
declare type __ΩLogLevelUserConfig = any[];
|
|
87
|
+
declare type __ΩLogLevelResolvedConfig = any[];
|
|
88
|
+
//#endregion
|
|
89
|
+
export { CreateLoggerFunction, LogCategories, LogCategory, LogFn, LogFnConfig, LogFnMeta, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogLevels, LogMeta, Logger, __ΩCreateLoggerFunction, __ΩLogCategory, __ΩLogFn, __ΩLogFnConfig, __ΩLogFnMeta, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMeta, __ΩLogger };
|
|
90
|
+
//# sourceMappingURL=log.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.cts","names":[],"sources":["../../src/types/log.ts"],"mappings":";;;;;KAsBY,QAAA;AAAA,KAEA,WAAA;AAAA,cAYC,SAAA;EAAA;;;;;;;cASA,aAAA;EAAA;;;;;;;;;;;UAaI,OAAA;;AAbjB;;EAiBE,KAAA;EANQ;;;EAUR,KAAA,EAAO,QAAA;;;;EAIP,QAAA,EAAU,WAAA;;;;EAIV,SAAA;;AAhBF;;EAoBE,WAAA;EARqB;;;EAYrB,cAAA;EAZA;;;EAgBA,WAAA;EAJA;;;EAQA,MAAA;EAIM;;AAGR;EAHE,MAAA;AAAA;AAAA,KAGU,MAAA,IAAU,IAAA,EAAM,OAAA,KAAY,IAAA;AAAA,KAE5B,WAAA,GAAc,IAAA,CACxB,OAAA,CAAQ,OAAA;EAGR,IAAA,GAAO,IAAA;EACP,OAAA;EACA,QAAA,GAAW,kBAAA,GAAqB,sBAAA;EAChC,MAAA,GAAS,eAAA;AAAA;AAAA,KAGC,SAAA,GACR,QAAA,GACA,WAAA,CAAY,OAAA;AAAA,KAEJ,KAAA,IAAS,IAAA,EAAM,SAAA,KAAc,IAAA;AAAA,KAE7B,oBAAA,kBAAsC,WAAA,GAAc,WAAA,KAC9D,OAAA,EAAS,QAAA,KACN,MAAA;AAAA,KAEO,kBAAA,GACR,QAAA,GACA,YAAA,CACE,MAAA,CAAO,WAAA,EAAa,QAAA;AAAA,KAId,sBAAA,GAAyB,MAAA,CAAO,WAAA,EAAa,QAAA;AAAA"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { BaseContext } from "./context.mjs";
|
|
2
|
+
import { Mode, WorkspaceConfig } from "./config.mjs";
|
|
3
|
+
import { PartialKeys, RequiredKeys } from "@stryke/types/base";
|
|
4
|
+
|
|
5
|
+
//#region src/types/log.d.ts
|
|
6
|
+
type LogLevel = "silent" | "error" | "warn" | "info" | "debug" | "trace";
|
|
7
|
+
type LogCategory = "general" | "fs" | "performance" | "config" | "plugins" | "hooks" | "env" | "ipc" | "babel" | "network";
|
|
8
|
+
declare const LogLevels: {
|
|
9
|
+
readonly SILENT: "silent";
|
|
10
|
+
readonly ERROR: "error";
|
|
11
|
+
readonly WARN: "warn";
|
|
12
|
+
readonly INFO: "info";
|
|
13
|
+
readonly DEBUG: "debug";
|
|
14
|
+
readonly TRACE: "trace";
|
|
15
|
+
};
|
|
16
|
+
declare const LogCategories: {
|
|
17
|
+
readonly GENERAL: "general";
|
|
18
|
+
readonly FS: "fs";
|
|
19
|
+
readonly PERFORMANCE: "performance";
|
|
20
|
+
readonly CONFIG: "config";
|
|
21
|
+
readonly PLUGINS: "plugins";
|
|
22
|
+
readonly HOOKS: "hooks";
|
|
23
|
+
readonly ENV: "env";
|
|
24
|
+
readonly IPC: "ipc";
|
|
25
|
+
readonly BABEL: "babel";
|
|
26
|
+
readonly NETWORK: "network";
|
|
27
|
+
};
|
|
28
|
+
interface LogMeta {
|
|
29
|
+
/**
|
|
30
|
+
* A unique identifier for the log message, which can be used to correlate related log entries across different parts of the system or different executions.
|
|
31
|
+
*/
|
|
32
|
+
logId: string;
|
|
33
|
+
/**
|
|
34
|
+
* The log level label indicating the severity of the log message.
|
|
35
|
+
*/
|
|
36
|
+
level: LogLevel;
|
|
37
|
+
/**
|
|
38
|
+
* The category of the log message, which can be used to classify and filter log entries based on their purpose or origin.
|
|
39
|
+
*/
|
|
40
|
+
category: LogCategory;
|
|
41
|
+
/**
|
|
42
|
+
* The timestamp when the IPC message was created, represented as the number of milliseconds since the Unix epoch.
|
|
43
|
+
*/
|
|
44
|
+
timestamp: number;
|
|
45
|
+
/**
|
|
46
|
+
* A unique identifier for the current execution instance, which can be used for logging and other purposes to distinguish between different executions in the same process.
|
|
47
|
+
*/
|
|
48
|
+
executionId?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The zero-based index of the current execution within the sequence of executions in the same process.
|
|
51
|
+
*/
|
|
52
|
+
executionIndex?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Optional environment identifier to specify the context or environment in which the message is being processed.
|
|
55
|
+
*/
|
|
56
|
+
environment?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Optional plugin name to specify the source plugin of the log message.
|
|
59
|
+
*/
|
|
60
|
+
plugin?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The name of the logger or source of the log message, which can be used to identify the origin of the log entry.
|
|
63
|
+
*/
|
|
64
|
+
source?: string;
|
|
65
|
+
}
|
|
66
|
+
type Logger = (meta: LogMeta, ...args: string[]) => void;
|
|
67
|
+
type LogFnConfig = Omit<Partial<LogMeta>, "logId" | "level" | "timestamp"> & {
|
|
68
|
+
mode?: Mode;
|
|
69
|
+
command?: string;
|
|
70
|
+
logLevel?: LogLevelUserConfig | LogLevelResolvedConfig;
|
|
71
|
+
colors?: WorkspaceConfig["colors"];
|
|
72
|
+
};
|
|
73
|
+
type LogFnMeta = LogLevel | PartialKeys<LogMeta, "logId" | "category" | "timestamp">;
|
|
74
|
+
type LogFn = (meta: LogFnMeta, ...args: string[]) => void;
|
|
75
|
+
type CreateLoggerFunction<TContext extends BaseContext = BaseContext> = (context: TContext) => Logger;
|
|
76
|
+
type LogLevelUserConfig = LogLevel | RequiredKeys<Record<LogCategory, LogLevel | boolean | undefined>, "general">;
|
|
77
|
+
type LogLevelResolvedConfig = Record<LogCategory, LogLevel>;
|
|
78
|
+
declare type __ΩLogLevel = any[];
|
|
79
|
+
declare type __ΩLogCategory = any[];
|
|
80
|
+
declare type __ΩLogMeta = any[];
|
|
81
|
+
declare type __ΩLogger = any[];
|
|
82
|
+
declare type __ΩLogFnConfig = any[];
|
|
83
|
+
declare type __ΩLogFnMeta = any[];
|
|
84
|
+
declare type __ΩLogFn = any[];
|
|
85
|
+
declare type __ΩCreateLoggerFunction = any[];
|
|
86
|
+
declare type __ΩLogLevelUserConfig = any[];
|
|
87
|
+
declare type __ΩLogLevelResolvedConfig = any[];
|
|
88
|
+
//#endregion
|
|
89
|
+
export { CreateLoggerFunction, LogCategories, LogCategory, LogFn, LogFnConfig, LogFnMeta, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogLevels, LogMeta, Logger, __ΩCreateLoggerFunction, __ΩLogCategory, __ΩLogFn, __ΩLogFnConfig, __ΩLogFnMeta, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMeta, __ΩLogger };
|
|
90
|
+
//# sourceMappingURL=log.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.mts","names":[],"sources":["../../src/types/log.ts"],"mappings":";;;;;KAsBY,QAAA;AAAA,KAEA,WAAA;AAAA,cAYC,SAAA;EAAA;;;;;;;cASA,aAAA;EAAA;;;;;;;;;;;UAaI,OAAA;;AAbjB;;EAiBE,KAAA;EANQ;;;EAUR,KAAA,EAAO,QAAA;;;;EAIP,QAAA,EAAU,WAAA;;;;EAIV,SAAA;;AAhBF;;EAoBE,WAAA;EARqB;;;EAYrB,cAAA;EAZA;;;EAgBA,WAAA;EAJA;;;EAQA,MAAA;EAIM;;AAGR;EAHE,MAAA;AAAA;AAAA,KAGU,MAAA,IAAU,IAAA,EAAM,OAAA,KAAY,IAAA;AAAA,KAE5B,WAAA,GAAc,IAAA,CACxB,OAAA,CAAQ,OAAA;EAGR,IAAA,GAAO,IAAA;EACP,OAAA;EACA,QAAA,GAAW,kBAAA,GAAqB,sBAAA;EAChC,MAAA,GAAS,eAAA;AAAA;AAAA,KAGC,SAAA,GACR,QAAA,GACA,WAAA,CAAY,OAAA;AAAA,KAEJ,KAAA,IAAS,IAAA,EAAM,SAAA,KAAc,IAAA;AAAA,KAE7B,oBAAA,kBAAsC,WAAA,GAAc,WAAA,KAC9D,OAAA,EAAS,QAAA,KACN,MAAA;AAAA,KAEO,kBAAA,GACR,QAAA,GACA,YAAA,CACE,MAAA,CAAO,WAAA,EAAa,QAAA;AAAA,KAId,sBAAA,GAAyB,MAAA,CAAO,WAAA,EAAa,QAAA;AAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/types/log.ts
|
|
2
|
+
const LogLevels = {
|
|
3
|
+
SILENT: "silent",
|
|
4
|
+
ERROR: "error",
|
|
5
|
+
WARN: "warn",
|
|
6
|
+
INFO: "info",
|
|
7
|
+
DEBUG: "debug",
|
|
8
|
+
TRACE: "trace"
|
|
9
|
+
};
|
|
10
|
+
const LogCategories = {
|
|
11
|
+
GENERAL: "general",
|
|
12
|
+
FS: "fs",
|
|
13
|
+
PERFORMANCE: "performance",
|
|
14
|
+
CONFIG: "config",
|
|
15
|
+
PLUGINS: "plugins",
|
|
16
|
+
HOOKS: "hooks",
|
|
17
|
+
ENV: "env",
|
|
18
|
+
IPC: "ipc",
|
|
19
|
+
BABEL: "babel",
|
|
20
|
+
NETWORK: "network"
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { LogCategories, LogLevels };
|
|
25
|
+
//# sourceMappingURL=log.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.mjs","names":[],"sources":["../../src/types/log.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { PartialKeys, RequiredKeys } from \"@stryke/types/base\";\nimport { Mode, WorkspaceConfig } from \"./config\";\nimport { BaseContext } from \"./context\";\n\nexport type LogLevel = \"silent\" | \"error\" | \"warn\" | \"info\" | \"debug\" | \"trace\";\n\nexport type LogCategory =\n | \"general\"\n | \"fs\"\n | \"performance\"\n | \"config\"\n | \"plugins\"\n | \"hooks\"\n | \"env\"\n | \"ipc\"\n | \"babel\"\n | \"network\";\n\nexport const LogLevels = {\n SILENT: \"silent\",\n ERROR: \"error\",\n WARN: \"warn\",\n INFO: \"info\",\n DEBUG: \"debug\",\n TRACE: \"trace\"\n} as const;\n\nexport const LogCategories = {\n GENERAL: \"general\",\n FS: \"fs\",\n PERFORMANCE: \"performance\",\n CONFIG: \"config\",\n PLUGINS: \"plugins\",\n HOOKS: \"hooks\",\n ENV: \"env\",\n IPC: \"ipc\",\n BABEL: \"babel\",\n NETWORK: \"network\"\n} as const;\n\nexport interface LogMeta {\n /**\n * A unique identifier for the log message, which can be used to correlate related log entries across different parts of the system or different executions.\n */\n logId: string;\n /**\n * The log level label indicating the severity of the log message.\n */\n level: LogLevel;\n /**\n * The category of the log message, which can be used to classify and filter log entries based on their purpose or origin.\n */\n category: LogCategory;\n /**\n * The timestamp when the IPC message was created, represented as the number of milliseconds since the Unix epoch.\n */\n timestamp: number;\n /**\n * A unique identifier for the current execution instance, which can be used for logging and other purposes to distinguish between different executions in the same process.\n */\n executionId?: string;\n /**\n * The zero-based index of the current execution within the sequence of executions in the same process.\n */\n executionIndex?: number;\n /**\n * Optional environment identifier to specify the context or environment in which the message is being processed.\n */\n environment?: string;\n /**\n * Optional plugin name to specify the source plugin of the log message.\n */\n plugin?: string;\n /**\n * The name of the logger or source of the log message, which can be used to identify the origin of the log entry.\n */\n source?: string;\n}\n\nexport type Logger = (meta: LogMeta, ...args: string[]) => void;\n\nexport type LogFnConfig = Omit<\n Partial<LogMeta>,\n \"logId\" | \"level\" | \"timestamp\"\n> & {\n mode?: Mode;\n command?: string;\n logLevel?: LogLevelUserConfig | LogLevelResolvedConfig;\n colors?: WorkspaceConfig[\"colors\"];\n};\n\nexport type LogFnMeta =\n | LogLevel\n | PartialKeys<LogMeta, \"logId\" | \"category\" | \"timestamp\">;\n\nexport type LogFn = (meta: LogFnMeta, ...args: string[]) => void;\n\nexport type CreateLoggerFunction<TContext extends BaseContext = BaseContext> = (\n context: TContext\n) => Logger;\n\nexport type LogLevelUserConfig =\n | LogLevel\n | RequiredKeys<\n Record<LogCategory, LogLevel | boolean | undefined>,\n \"general\"\n >;\n\nexport type LogLevelResolvedConfig = Record<LogCategory, LogLevel>;\n"],"mappings":";AAoCA,MAAa,YAAY;CACvB,QAAQ;CACR,OAAO;CACP,MAAM;CACN,MAAM;CACN,OAAO;CACP,OAAO;CACR;AAED,MAAa,gBAAgB;CAC3B,SAAS;CACT,IAAI;CACJ,aAAa;CACb,QAAQ;CACR,SAAS;CACT,OAAO;CACP,KAAK;CACL,KAAK;CACL,OAAO;CACP,SAAS;CACV"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "An internal core package for Powerlines - please use the `powerlines` package for public usage.",
|
|
6
6
|
"homepage": "https://stormsoftware.com",
|
|
@@ -569,5 +569,5 @@
|
|
|
569
569
|
"typescript": "^6.0.3"
|
|
570
570
|
},
|
|
571
571
|
"publishConfig": { "access": "public" },
|
|
572
|
-
"gitHead": "
|
|
572
|
+
"gitHead": "0c0e8330c47e0ba315ba3367a13a51a576fd9811"
|
|
573
573
|
}
|