@powerlines/core 0.43.30 → 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 -22
- package/dist/lib/logger.d.cts +11 -22
- package/dist/lib/logger.d.cts.map +1 -1
- package/dist/lib/logger.d.mts +11 -22
- package/dist/lib/logger.d.mts.map +1 -1
- package/dist/lib/logger.mjs +28 -21
- 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 +30 -23
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +30 -23
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/context.d.cts +95 -19
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +95 -19
- 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,4 +1,6 @@
|
|
|
1
|
+
import { LogLevelResolvedConfig, LogLevelUserConfig } from "../types/log.mjs";
|
|
1
2
|
import { UnresolvedContext } from "../types/context.mjs";
|
|
3
|
+
import { Mode } from "../types/config.mjs";
|
|
2
4
|
//#region src/plugin-utils/logging.d.ts
|
|
3
5
|
/**
|
|
4
6
|
* Determines if the provided log level is considered verbose (debug or trace).
|
|
@@ -14,6 +16,14 @@ declare function isVerbose(logLevel: string): boolean;
|
|
|
14
16
|
* @returns True if the log level is "debug" or "trace", false otherwise.
|
|
15
17
|
*/
|
|
16
18
|
declare function isVerbose(context: UnresolvedContext): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Resolves the log level configuration based on the provided log level and mode, returning a complete LogLevelResolvedConfig object that specifies the log level for each log category.
|
|
21
|
+
*
|
|
22
|
+
* @param logLevel - The user-provided log level configuration, which can be a string or an object specifying log levels for each category.
|
|
23
|
+
* @param mode - The current mode of the application (e.g., "development", "test", "production"), which determines the default log levels.
|
|
24
|
+
* @returns A LogLevelResolvedConfig object specifying the log level for each log category.
|
|
25
|
+
*/
|
|
26
|
+
declare function resolveLogLevel(logLevel: LogLevelUserConfig, mode?: Mode): LogLevelResolvedConfig;
|
|
17
27
|
//#endregion
|
|
18
|
-
export { isVerbose };
|
|
28
|
+
export { isVerbose, resolveLogLevel };
|
|
19
29
|
//# sourceMappingURL=logging.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.mts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"logging.d.mts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":";;;;;;;;AAoCA;;iBAAgB,SAAA,CAAU,QAAA;;;AAQ1B;;;;iBAAgB,SAAA,CAAU,OAAA,EAAS,iBAAA;AAyBnC;;;;;;;AAAA,iBAAgB,eAAA,CACd,QAAA,EAAU,kBAAA,EACV,IAAA,GAAO,IAAA,GACN,sBAAA"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL } from "../constants/log-level.mjs";
|
|
2
|
+
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
3
|
+
import { defu as defu$1 } from "defu";
|
|
4
|
+
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
1
5
|
import { isString } from "@stryke/type-checks/is-string";
|
|
2
6
|
|
|
3
7
|
//#region src/plugin-utils/logging.ts
|
|
@@ -11,7 +15,55 @@ function isVerbose(logLevelOrContext) {
|
|
|
11
15
|
const level = isString(logLevelOrContext) ? logLevelOrContext : logLevelOrContext.config.logLevel;
|
|
12
16
|
return level === "debug" || level === "trace";
|
|
13
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Resolves the log level configuration based on the provided log level and mode, returning a complete LogLevelResolvedConfig object that specifies the log level for each log category.
|
|
20
|
+
*
|
|
21
|
+
* @param logLevel - The user-provided log level configuration, which can be a string or an object specifying log levels for each category.
|
|
22
|
+
* @param mode - The current mode of the application (e.g., "development", "test", "production"), which determines the default log levels.
|
|
23
|
+
* @returns A LogLevelResolvedConfig object specifying the log level for each log category.
|
|
24
|
+
*/
|
|
25
|
+
function resolveLogLevel(logLevel, mode) {
|
|
26
|
+
if (logLevel === "trace") return {
|
|
27
|
+
general: "trace",
|
|
28
|
+
fs: "trace",
|
|
29
|
+
performance: "trace",
|
|
30
|
+
network: "trace",
|
|
31
|
+
plugins: "trace",
|
|
32
|
+
hooks: "trace",
|
|
33
|
+
env: "trace",
|
|
34
|
+
ipc: "trace",
|
|
35
|
+
config: "trace"
|
|
36
|
+
};
|
|
37
|
+
else if (logLevel === "silent") return {
|
|
38
|
+
general: "silent",
|
|
39
|
+
fs: "silent",
|
|
40
|
+
performance: "silent",
|
|
41
|
+
network: "silent",
|
|
42
|
+
plugins: "silent",
|
|
43
|
+
hooks: "silent",
|
|
44
|
+
env: "silent",
|
|
45
|
+
ipc: "silent",
|
|
46
|
+
config: "silent"
|
|
47
|
+
};
|
|
48
|
+
let defaultLogLevel;
|
|
49
|
+
if (mode === "development") defaultLogLevel = DEFAULT_DEVELOPMENT_LOG_LEVEL;
|
|
50
|
+
else if (mode === "test") defaultLogLevel = DEFAULT_TEST_LOG_LEVEL;
|
|
51
|
+
else defaultLogLevel = DEFAULT_PRODUCTION_LOG_LEVEL;
|
|
52
|
+
if (isSetString(logLevel)) return {
|
|
53
|
+
general: logLevel,
|
|
54
|
+
fs: defaultLogLevel.fs,
|
|
55
|
+
performance: logLevel,
|
|
56
|
+
network: defaultLogLevel.network,
|
|
57
|
+
plugins: logLevel,
|
|
58
|
+
hooks: logLevel,
|
|
59
|
+
env: defaultLogLevel.env,
|
|
60
|
+
ipc: defaultLogLevel.ipc,
|
|
61
|
+
config: defaultLogLevel.config
|
|
62
|
+
};
|
|
63
|
+
else if (isSetObject(logLevel)) return defu$1(logLevel, defaultLogLevel);
|
|
64
|
+
return defaultLogLevel;
|
|
65
|
+
}
|
|
14
66
|
|
|
15
67
|
//#endregion
|
|
16
|
-
export { isVerbose };
|
|
68
|
+
export { isVerbose, resolveLogLevel };
|
|
17
69
|
//# sourceMappingURL=logging.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.mjs","names":[],"sources":["../../src/plugin-utils/logging.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 { isString } from \"@stryke/type-checks/is-string\";\nimport { UnresolvedContext } from \"../types\";\n\n/**\n * Determines if the provided log level is considered verbose (debug or trace).\n *\n * @param logLevel - The log level to check, which can be a string or an UnresolvedContext containing the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(logLevel: string): boolean;\n\n/**\n * Determines if the provided context is considered verbose (debug or trace).\n *\n * @param context - The context to check, which contains the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(context: UnresolvedContext): boolean;\n\n/**\n * Determines if the provided log level is considered verbose (debug or trace).\n *\n * @param logLevelOrContext - The log level to check, which can be a string or an UnresolvedContext containing the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(\n logLevelOrContext: string | UnresolvedContext\n): boolean {\n const level = isString(logLevelOrContext)\n ? logLevelOrContext\n : logLevelOrContext.config.logLevel;\n\n return level === \"debug\" || level === \"trace\";\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"logging.mjs","names":["defu"],"sources":["../../src/plugin-utils/logging.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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { defu } from \"defu\";\nimport {\n DEFAULT_DEVELOPMENT_LOG_LEVEL,\n DEFAULT_PRODUCTION_LOG_LEVEL,\n DEFAULT_TEST_LOG_LEVEL\n} from \"../constants/log-level\";\nimport { Mode, UnresolvedContext } from \"../types\";\nimport { LogLevelResolvedConfig, LogLevelUserConfig } from \"../types/log\";\n\n/**\n * Determines if the provided log level is considered verbose (debug or trace).\n *\n * @param logLevel - The log level to check, which can be a string or an UnresolvedContext containing the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(logLevel: string): boolean;\n\n/**\n * Determines if the provided context is considered verbose (debug or trace).\n *\n * @param context - The context to check, which contains the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(context: UnresolvedContext): boolean;\n\n/**\n * Determines if the provided log level is considered verbose (debug or trace).\n *\n * @param logLevelOrContext - The log level to check, which can be a string or an UnresolvedContext containing the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(\n logLevelOrContext: string | UnresolvedContext\n): boolean {\n const level = isString(logLevelOrContext)\n ? logLevelOrContext\n : logLevelOrContext.config.logLevel;\n\n return level === \"debug\" || level === \"trace\";\n}\n\n/**\n * Resolves the log level configuration based on the provided log level and mode, returning a complete LogLevelResolvedConfig object that specifies the log level for each log category.\n *\n * @param logLevel - The user-provided log level configuration, which can be a string or an object specifying log levels for each category.\n * @param mode - The current mode of the application (e.g., \"development\", \"test\", \"production\"), which determines the default log levels.\n * @returns A LogLevelResolvedConfig object specifying the log level for each log category.\n */\nexport function resolveLogLevel(\n logLevel: LogLevelUserConfig,\n mode?: Mode\n): LogLevelResolvedConfig {\n if (logLevel === \"trace\") {\n return {\n general: \"trace\",\n fs: \"trace\",\n performance: \"trace\",\n network: \"trace\",\n plugins: \"trace\",\n hooks: \"trace\",\n env: \"trace\",\n ipc: \"trace\",\n config: \"trace\"\n };\n } else if (logLevel === \"silent\") {\n return {\n general: \"silent\",\n fs: \"silent\",\n performance: \"silent\",\n network: \"silent\",\n plugins: \"silent\",\n hooks: \"silent\",\n env: \"silent\",\n ipc: \"silent\",\n config: \"silent\"\n };\n }\n\n let defaultLogLevel: LogLevelResolvedConfig;\n if (mode === \"development\") {\n defaultLogLevel = DEFAULT_DEVELOPMENT_LOG_LEVEL;\n } else if (mode === \"test\") {\n defaultLogLevel = DEFAULT_TEST_LOG_LEVEL;\n } else {\n defaultLogLevel = DEFAULT_PRODUCTION_LOG_LEVEL;\n }\n\n if (isSetString(logLevel)) {\n return {\n general: logLevel,\n fs: defaultLogLevel.fs,\n performance: logLevel,\n network: defaultLogLevel.network,\n plugins: logLevel,\n hooks: logLevel,\n env: defaultLogLevel.env,\n ipc: defaultLogLevel.ipc,\n config: defaultLogLevel.config\n };\n } else if (isSetObject(logLevel)) {\n return defu(logLevel, defaultLogLevel) as LogLevelResolvedConfig;\n }\n\n return defaultLogLevel;\n}\n"],"mappings":";;;;;;;;;;;;;AAoDA,SAAgB,UACd,mBACS;CACT,MAAM,QAAQ,SAAS,kBAAkB,GACrC,oBACA,kBAAkB,OAAO;AAE7B,QAAO,UAAU,WAAW,UAAU;;;;;;;;;AAUxC,SAAgB,gBACd,UACA,MACwB;AACxB,KAAI,aAAa,QACf,QAAO;EACL,SAAS;EACT,IAAI;EACJ,aAAa;EACb,SAAS;EACT,SAAS;EACT,OAAO;EACP,KAAK;EACL,KAAK;EACL,QAAQ;EACT;UACQ,aAAa,SACtB,QAAO;EACL,SAAS;EACT,IAAI;EACJ,aAAa;EACb,SAAS;EACT,SAAS;EACT,OAAO;EACP,KAAK;EACL,KAAK;EACL,QAAQ;EACT;CAGH,IAAI;AACJ,KAAI,SAAS,cACX,mBAAkB;UACT,SAAS,OAClB,mBAAkB;KAElB,mBAAkB;AAGpB,KAAI,YAAY,SAAS,CACvB,QAAO;EACL,SAAS;EACT,IAAI,gBAAgB;EACpB,aAAa;EACb,SAAS,gBAAgB;EACzB,SAAS;EACT,OAAO;EACP,KAAK,gBAAgB;EACrB,KAAK,gBAAgB;EACrB,QAAQ,gBAAgB;EACzB;UACQ,YAAY,SAAS,CAC9B,QAAOA,OAAK,UAAU,gBAAgB;AAGxC,QAAO"}
|
package/dist/types/config.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { StoragePort, StoragePreset } from "./fs.cjs";
|
|
2
2
|
import { Plugin } from "./plugin.cjs";
|
|
3
|
+
import { CreateLoggerFunction, LogLevelResolvedConfig, LogLevelUserConfig } from "./log.cjs";
|
|
3
4
|
import { TSConfig } from "./tsconfig.cjs";
|
|
4
5
|
import { PluginContext } from "./context.cjs";
|
|
5
6
|
import { Format } from "@storm-software/build-tools/types";
|
|
6
|
-
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
7
7
|
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
8
8
|
import { DeepPartial, MaybePromise, NonUndefined, PartialKeys } from "@stryke/types/base";
|
|
9
9
|
import { TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
@@ -13,13 +13,6 @@ import { CompatibilityDateSpec, CompatibilityDates } from "compatx";
|
|
|
13
13
|
import { PreviewOptions, ResolvedPreviewOptions } from "vite";
|
|
14
14
|
|
|
15
15
|
//#region src/types/config.d.ts
|
|
16
|
-
type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
|
|
17
|
-
type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
|
|
18
|
-
type LogLevelConfig = Record<LogLevel, boolean>;
|
|
19
|
-
interface Logger {
|
|
20
|
-
log: LogFn;
|
|
21
|
-
level: LogLevelLabel;
|
|
22
|
-
}
|
|
23
16
|
/**
|
|
24
17
|
* The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
|
|
25
18
|
*/
|
|
@@ -46,6 +39,7 @@ type PluginConfig<TContext extends PluginContext = PluginContext> = string | Plu
|
|
|
46
39
|
type PartialPlugin<TContext extends PluginContext = PluginContext> = DeepPartial<Plugin<TContext>>;
|
|
47
40
|
type PartialPluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<PartialPlugin<TContext> | PartialPlugin<TContext>[]>;
|
|
48
41
|
type ProjectType = "application" | "library";
|
|
42
|
+
type Mode = "development" | "test" | "production";
|
|
49
43
|
/**
|
|
50
44
|
* The configuration options for resolving modules in a Powerlines project.
|
|
51
45
|
*/
|
|
@@ -256,7 +250,11 @@ interface EngineOptions {
|
|
|
256
250
|
*
|
|
257
251
|
* @defaultValue "production"
|
|
258
252
|
*/
|
|
259
|
-
mode?:
|
|
253
|
+
mode?: Mode;
|
|
254
|
+
/**
|
|
255
|
+
* The log level to use for logging messages during the build process. This can be a string indicating the log level or a more detailed configuration object that allows for specifying different log levels for different categories of logs.
|
|
256
|
+
*/
|
|
257
|
+
logLevel?: LogLevelUserConfig;
|
|
260
258
|
/**
|
|
261
259
|
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
262
260
|
*
|
|
@@ -280,12 +278,16 @@ interface EngineOptions {
|
|
|
280
278
|
}
|
|
281
279
|
type ResolvedEngineOptions = PartialKeys<Required<EngineOptions>, "organization" | "configFile">;
|
|
282
280
|
interface ExecutionOptions extends EngineOptions {
|
|
281
|
+
/**
|
|
282
|
+
* 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.
|
|
283
|
+
*/
|
|
284
|
+
executionId: string;
|
|
283
285
|
/**
|
|
284
286
|
* The index of the current execution instance among all configured instances in the Powerlines process
|
|
285
287
|
*/
|
|
286
|
-
|
|
288
|
+
executionIndex: number;
|
|
287
289
|
}
|
|
288
|
-
type ResolvedExecutionOptions = Pick<ExecutionOptions, "
|
|
290
|
+
type ResolvedExecutionOptions = Pick<ExecutionOptions, "executionIndex" | "executionId"> & ResolvedEngineOptions;
|
|
289
291
|
interface Config {
|
|
290
292
|
/**
|
|
291
293
|
* Defines entries and location(s) of entry modules for the bundle. Relative paths are resolved based on the `root` option.
|
|
@@ -418,15 +420,18 @@ interface UserConfig extends Config, ExecutionOptions {
|
|
|
418
420
|
*/
|
|
419
421
|
compatibilityDate?: CompatibilityDateSpec;
|
|
420
422
|
/**
|
|
421
|
-
* The log level
|
|
423
|
+
* The log level label indicating the severity of the log message, or a more detailed log level configuration object that allows for specifying different log levels for different categories of logs.
|
|
424
|
+
*
|
|
425
|
+
* @remarks
|
|
426
|
+
* The log level determines the minimum severity of messages that will be logged. For example, if the log level is set to `LogLevel.INFO`, then messages with a severity of `INFO`, `WARN`, and `ERROR` will be logged, while messages with a severity of `DEBUG` and `TRACE` will be ignored. Setting the log level to `LogLevel.SILENT` will disable all logging. Alternatively, you can provide a more detailed configuration object that allows you to specify different log levels for different categories of logs, providing granular control over the logging behavior for different aspects of the system.
|
|
422
427
|
*
|
|
423
428
|
* @defaultValue "info"
|
|
424
429
|
*/
|
|
425
|
-
logLevel?:
|
|
430
|
+
logLevel?: LogLevelUserConfig;
|
|
426
431
|
/**
|
|
427
|
-
* A custom logger function to
|
|
432
|
+
* A custom logger function that can be provided by the user to handle log messages in a specific way, such as sending them to an external logging service or formatting them differently. If a custom logger is provided, it will be used instead of the default logging mechanism.
|
|
428
433
|
*/
|
|
429
|
-
customLogger?:
|
|
434
|
+
customLogger?: CreateLoggerFunction;
|
|
430
435
|
/**
|
|
431
436
|
* The type of project being built
|
|
432
437
|
*
|
|
@@ -584,6 +589,10 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
|
584
589
|
output?: string;
|
|
585
590
|
}
|
|
586
591
|
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "ssr">> & {
|
|
592
|
+
/**
|
|
593
|
+
* A unique identifier for the environment, which can be used for logging and other purposes to distinguish between different environments in the same process.
|
|
594
|
+
*/
|
|
595
|
+
environmentId: string;
|
|
587
596
|
/**
|
|
588
597
|
* The name of the environment
|
|
589
598
|
*/
|
|
@@ -656,16 +665,13 @@ type ResolvedConfig$1<TUserConfig extends UserConfig = UserConfig> = Omit<TUserC
|
|
|
656
665
|
*/
|
|
657
666
|
command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
|
|
658
667
|
/**
|
|
659
|
-
* The log level
|
|
668
|
+
* The log level label indicating the severity of the log message, or a more detailed log level configuration object that allows for specifying different log levels for different categories of logs.
|
|
660
669
|
*
|
|
661
|
-
* @
|
|
670
|
+
* @remarks
|
|
671
|
+
* The log level determines the minimum severity of messages that will be logged. For example, if the log level is set to `LogLevel.INFO`, then messages with a severity of `INFO`, `WARN`, and `ERROR` will be logged, while messages with a severity of `DEBUG` and `TRACE` will be ignored. Setting the log level to `LogLevel.SILENT` will disable all logging. Alternatively, you can provide a more detailed configuration object that allows you to specify different log levels for different categories of logs, providing granular control over the logging behavior for different aspects of the system.
|
|
662
672
|
*/
|
|
663
|
-
logLevel:
|
|
673
|
+
logLevel: LogLevelResolvedConfig;
|
|
664
674
|
};
|
|
665
|
-
declare type __ΩLogLevel = any[];
|
|
666
|
-
declare type __ΩLogFn = any[];
|
|
667
|
-
declare type __ΩLogLevelConfig = any[];
|
|
668
|
-
declare type __ΩLogger = any[];
|
|
669
675
|
declare type __ΩWorkspaceConfig = any[];
|
|
670
676
|
declare type __ΩPluginFactory = any[];
|
|
671
677
|
declare type __ΩPluginConfigTuple = any[];
|
|
@@ -674,6 +680,7 @@ declare type __ΩPluginConfig = any[];
|
|
|
674
680
|
declare type __ΩPartialPlugin = any[];
|
|
675
681
|
declare type __ΩPartialPluginFactory = any[];
|
|
676
682
|
declare type __ΩProjectType = any[];
|
|
683
|
+
declare type __ΩMode = any[];
|
|
677
684
|
declare type __ΩResolveConfig = any[];
|
|
678
685
|
declare type __ΩCopyConfig = any[];
|
|
679
686
|
declare type __ΩOutputConfig = any[];
|
|
@@ -707,5 +714,5 @@ declare type __ΩCopyResolvedConfig = any[];
|
|
|
707
714
|
declare type __ΩOutputResolvedConfig = any[];
|
|
708
715
|
declare type __ΩResolvedConfig = any[];
|
|
709
716
|
//#endregion
|
|
710
|
-
export { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig, CopyResolvedConfig, DeployInlineConfig, DocsInlineConfig, EngineOptions, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, InlineConfig, LintInlineConfig,
|
|
717
|
+
export { 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$1 as 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 };
|
|
711
718
|
//# sourceMappingURL=config.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;;;AA+CA;KAAY,eAAA,GAAkB,OAAA,CAAQ,oBAAA,IACpC,QAAA,CAAS,IAAA,CAAK,oBAAA;AAAA,KAEJ,aAAA,yBACc,aAAA,GAAgB,aAAA,qBAErC,OAAA,EAAS,QAAA,KAAa,YAAA,CAAa,MAAA,CAAO,QAAA,IAAY,MAAA,CAAO,QAAA;;;;KAKtD,iBAAA,kBACO,aAAA,GAAgB,aAAA,8BAErB,aAAA,CAAc,QAAA,EAAU,QAAA,GAAW,QAAA,KAAa,MAAA,C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GA,QAAA,CAAS,IAAA,CAAK,iBAAA;EA9DZ;;;EAkEA,aAAA;EA/DoB;;;EAoEpB,IAAA;EAnEM;;;EAwEN,OAAA,GAAU,sBAAA;AAAA;;;;KAMF,qBAAA,GAAwB,QAAA,CAClC,IAAA,CAAK,aAAA;EA/EL;;;;;AAGF;EAoFE,QAAA;;;;EAKA,UAAA;AAAA;AAAA,KAGU,iBAAA,GAAoB,SAAA,GAAY,QAAA,CAAS,IAAA,CAAK,SAAA;AAAA,KAE9C,kBAAA,GAAqB,QAAA,CAAS,IAAA,CAAK,UAAA;EAC7C,MAAA,EAAQ,iBAAA;AAAA;AAAA,KAGE,oBAAA,GAAuB,QAAA,CACjC,IAAA,CAAK,YAAA,yBAEL,IAAA,CAAK,YAAA;EACH,IAAA,EAAM,kBAAA;AAAA;;;;KAME,gBAAA,qBAAmC,UAAA,GAAa,UAAA,IAAc,IAAA,CACxE,WAAA,0NAmBA,QAAA,CACE,IAAA,CACE,WAAA;EArHM;;;EAyIR,MAAA,EAAQ,oBAAA;EAzI+C;;;EA8IvD,OAAA,EAAS,qBAAA;EAzIU;;;;;;;;;;EAqJnB,iBAAA,EAAmB,kBAAA;EA1JG;;;EA+JtB,YAAA,EAAc,YAAA,CAAa,WAAA;EA9JlB;;;EAmKT,UAAA,EAAY,WAAA;EA/JO;;;EAoKnB,YAAA,EAAc,OAAA,CAAQ,WAAA;EA9JlB;;;EAmKJ,OAAA,EAAS,YAAA,CAAa,YAAA,CAAa,WAAA;EAjKrB;;;AAElB;;;EAuKI,QAAA,EAAU,sBAAA;AAAA;AAAA"}
|
package/dist/types/config.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { StoragePort, StoragePreset } from "./fs.mjs";
|
|
2
2
|
import { Plugin } from "./plugin.mjs";
|
|
3
|
+
import { CreateLoggerFunction, LogLevelResolvedConfig, LogLevelUserConfig } from "./log.mjs";
|
|
3
4
|
import { TSConfig } from "./tsconfig.mjs";
|
|
4
5
|
import { PluginContext } from "./context.mjs";
|
|
5
6
|
import { ConfigLayer, ResolvedConfig } from "c12";
|
|
6
|
-
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
7
7
|
import { Format } from "@storm-software/build-tools/types";
|
|
8
8
|
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
9
9
|
import { DeepPartial, MaybePromise, NonUndefined, PartialKeys } from "@stryke/types/base";
|
|
@@ -13,13 +13,6 @@ import { CompatibilityDateSpec, CompatibilityDates } from "compatx";
|
|
|
13
13
|
import { PreviewOptions, ResolvedPreviewOptions } from "vite";
|
|
14
14
|
|
|
15
15
|
//#region src/types/config.d.ts
|
|
16
|
-
type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
|
|
17
|
-
type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
|
|
18
|
-
type LogLevelConfig = Record<LogLevel, boolean>;
|
|
19
|
-
interface Logger {
|
|
20
|
-
log: LogFn;
|
|
21
|
-
level: LogLevelLabel;
|
|
22
|
-
}
|
|
23
16
|
/**
|
|
24
17
|
* The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
|
|
25
18
|
*/
|
|
@@ -46,6 +39,7 @@ type PluginConfig<TContext extends PluginContext = PluginContext> = string | Plu
|
|
|
46
39
|
type PartialPlugin<TContext extends PluginContext = PluginContext> = DeepPartial<Plugin<TContext>>;
|
|
47
40
|
type PartialPluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<PartialPlugin<TContext> | PartialPlugin<TContext>[]>;
|
|
48
41
|
type ProjectType = "application" | "library";
|
|
42
|
+
type Mode = "development" | "test" | "production";
|
|
49
43
|
/**
|
|
50
44
|
* The configuration options for resolving modules in a Powerlines project.
|
|
51
45
|
*/
|
|
@@ -256,7 +250,11 @@ interface EngineOptions {
|
|
|
256
250
|
*
|
|
257
251
|
* @defaultValue "production"
|
|
258
252
|
*/
|
|
259
|
-
mode?:
|
|
253
|
+
mode?: Mode;
|
|
254
|
+
/**
|
|
255
|
+
* The log level to use for logging messages during the build process. This can be a string indicating the log level or a more detailed configuration object that allows for specifying different log levels for different categories of logs.
|
|
256
|
+
*/
|
|
257
|
+
logLevel?: LogLevelUserConfig;
|
|
260
258
|
/**
|
|
261
259
|
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
262
260
|
*
|
|
@@ -280,12 +278,16 @@ interface EngineOptions {
|
|
|
280
278
|
}
|
|
281
279
|
type ResolvedEngineOptions = PartialKeys<Required<EngineOptions>, "organization" | "configFile">;
|
|
282
280
|
interface ExecutionOptions extends EngineOptions {
|
|
281
|
+
/**
|
|
282
|
+
* 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.
|
|
283
|
+
*/
|
|
284
|
+
executionId: string;
|
|
283
285
|
/**
|
|
284
286
|
* The index of the current execution instance among all configured instances in the Powerlines process
|
|
285
287
|
*/
|
|
286
|
-
|
|
288
|
+
executionIndex: number;
|
|
287
289
|
}
|
|
288
|
-
type ResolvedExecutionOptions = Pick<ExecutionOptions, "
|
|
290
|
+
type ResolvedExecutionOptions = Pick<ExecutionOptions, "executionIndex" | "executionId"> & ResolvedEngineOptions;
|
|
289
291
|
interface Config {
|
|
290
292
|
/**
|
|
291
293
|
* Defines entries and location(s) of entry modules for the bundle. Relative paths are resolved based on the `root` option.
|
|
@@ -418,15 +420,18 @@ interface UserConfig extends Config, ExecutionOptions {
|
|
|
418
420
|
*/
|
|
419
421
|
compatibilityDate?: CompatibilityDateSpec;
|
|
420
422
|
/**
|
|
421
|
-
* The log level
|
|
423
|
+
* The log level label indicating the severity of the log message, or a more detailed log level configuration object that allows for specifying different log levels for different categories of logs.
|
|
424
|
+
*
|
|
425
|
+
* @remarks
|
|
426
|
+
* The log level determines the minimum severity of messages that will be logged. For example, if the log level is set to `LogLevel.INFO`, then messages with a severity of `INFO`, `WARN`, and `ERROR` will be logged, while messages with a severity of `DEBUG` and `TRACE` will be ignored. Setting the log level to `LogLevel.SILENT` will disable all logging. Alternatively, you can provide a more detailed configuration object that allows you to specify different log levels for different categories of logs, providing granular control over the logging behavior for different aspects of the system.
|
|
422
427
|
*
|
|
423
428
|
* @defaultValue "info"
|
|
424
429
|
*/
|
|
425
|
-
logLevel?:
|
|
430
|
+
logLevel?: LogLevelUserConfig;
|
|
426
431
|
/**
|
|
427
|
-
* A custom logger function to
|
|
432
|
+
* A custom logger function that can be provided by the user to handle log messages in a specific way, such as sending them to an external logging service or formatting them differently. If a custom logger is provided, it will be used instead of the default logging mechanism.
|
|
428
433
|
*/
|
|
429
|
-
customLogger?:
|
|
434
|
+
customLogger?: CreateLoggerFunction;
|
|
430
435
|
/**
|
|
431
436
|
* The type of project being built
|
|
432
437
|
*
|
|
@@ -584,6 +589,10 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
|
584
589
|
output?: string;
|
|
585
590
|
}
|
|
586
591
|
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "ssr">> & {
|
|
592
|
+
/**
|
|
593
|
+
* A unique identifier for the environment, which can be used for logging and other purposes to distinguish between different environments in the same process.
|
|
594
|
+
*/
|
|
595
|
+
environmentId: string;
|
|
587
596
|
/**
|
|
588
597
|
* The name of the environment
|
|
589
598
|
*/
|
|
@@ -656,16 +665,13 @@ type ResolvedConfig$1<TUserConfig extends UserConfig = UserConfig> = Omit<TUserC
|
|
|
656
665
|
*/
|
|
657
666
|
command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
|
|
658
667
|
/**
|
|
659
|
-
* The log level
|
|
668
|
+
* The log level label indicating the severity of the log message, or a more detailed log level configuration object that allows for specifying different log levels for different categories of logs.
|
|
660
669
|
*
|
|
661
|
-
* @
|
|
670
|
+
* @remarks
|
|
671
|
+
* The log level determines the minimum severity of messages that will be logged. For example, if the log level is set to `LogLevel.INFO`, then messages with a severity of `INFO`, `WARN`, and `ERROR` will be logged, while messages with a severity of `DEBUG` and `TRACE` will be ignored. Setting the log level to `LogLevel.SILENT` will disable all logging. Alternatively, you can provide a more detailed configuration object that allows you to specify different log levels for different categories of logs, providing granular control over the logging behavior for different aspects of the system.
|
|
662
672
|
*/
|
|
663
|
-
logLevel:
|
|
673
|
+
logLevel: LogLevelResolvedConfig;
|
|
664
674
|
};
|
|
665
|
-
declare type __ΩLogLevel = any[];
|
|
666
|
-
declare type __ΩLogFn = any[];
|
|
667
|
-
declare type __ΩLogLevelConfig = any[];
|
|
668
|
-
declare type __ΩLogger = any[];
|
|
669
675
|
declare type __ΩWorkspaceConfig = any[];
|
|
670
676
|
declare type __ΩPluginFactory = any[];
|
|
671
677
|
declare type __ΩPluginConfigTuple = any[];
|
|
@@ -674,6 +680,7 @@ declare type __ΩPluginConfig = any[];
|
|
|
674
680
|
declare type __ΩPartialPlugin = any[];
|
|
675
681
|
declare type __ΩPartialPluginFactory = any[];
|
|
676
682
|
declare type __ΩProjectType = any[];
|
|
683
|
+
declare type __ΩMode = any[];
|
|
677
684
|
declare type __ΩResolveConfig = any[];
|
|
678
685
|
declare type __ΩCopyConfig = any[];
|
|
679
686
|
declare type __ΩOutputConfig = any[];
|
|
@@ -707,5 +714,5 @@ declare type __ΩCopyResolvedConfig = any[];
|
|
|
707
714
|
declare type __ΩOutputResolvedConfig = any[];
|
|
708
715
|
declare type __ΩResolvedConfig = any[];
|
|
709
716
|
//#endregion
|
|
710
|
-
export { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig, CopyResolvedConfig, DeployInlineConfig, DocsInlineConfig, EngineOptions, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, InlineConfig, LintInlineConfig,
|
|
717
|
+
export { 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$1 as 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 };
|
|
711
718
|
//# sourceMappingURL=config.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;;;AA+CA;KAAY,eAAA,GAAkB,OAAA,CAAQ,oBAAA,IACpC,QAAA,CAAS,IAAA,CAAK,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