@powerlines/core 0.48.46 → 0.48.47
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/log-level.d.cts +1 -1
- package/dist/constants/log-level.d.mts +1 -1
- package/dist/lib/context-helpers.d.cts +4 -4
- package/dist/lib/context-helpers.d.mts +4 -4
- package/dist/plugin-utils/context-helpers.cjs +25 -0
- package/dist/plugin-utils/context-helpers.d.cts +9 -1
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +9 -1
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +25 -1
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/helpers.d.cts +1 -1
- package/dist/plugin-utils/helpers.d.mts +1 -1
- package/dist/plugin-utils/index.cjs +1 -0
- package/dist/plugin-utils/index.d.cts +2 -2
- package/dist/plugin-utils/index.d.mts +2 -2
- package/dist/plugin-utils/index.mjs +2 -2
- package/dist/plugin-utils/logging.cjs +3 -0
- package/dist/plugin-utils/logging.d.cts.map +1 -1
- package/dist/plugin-utils/logging.d.mts.map +1 -1
- package/dist/plugin-utils/logging.mjs +3 -0
- package/dist/plugin-utils/logging.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -21,7 +21,7 @@ declare const LogCategories: {
|
|
|
21
21
|
readonly BABEL: "babel";
|
|
22
22
|
readonly COMMUNICATION: "communication";
|
|
23
23
|
};
|
|
24
|
-
declare const LOG_CATEGORIES_ARRAY: ("
|
|
24
|
+
declare const LOG_CATEGORIES_ARRAY: ("fs" | "config" | "plugins" | "general" | "performance" | "hooks" | "schema" | "env" | "rpc" | "babel" | "communication")[];
|
|
25
25
|
declare const LOG_CATEGORIES: readonly ["general", "fs", "performance", "config", "plugins", "hooks", "schema", "env", "rpc", "communication", "babel"];
|
|
26
26
|
declare const DEFAULT_DEVELOPMENT_LOG_LEVEL: {
|
|
27
27
|
readonly general: "debug";
|
|
@@ -21,7 +21,7 @@ declare const LogCategories: {
|
|
|
21
21
|
readonly BABEL: "babel";
|
|
22
22
|
readonly COMMUNICATION: "communication";
|
|
23
23
|
};
|
|
24
|
-
declare const LOG_CATEGORIES_ARRAY: ("
|
|
24
|
+
declare const LOG_CATEGORIES_ARRAY: ("fs" | "config" | "plugins" | "general" | "performance" | "hooks" | "schema" | "env" | "rpc" | "babel" | "communication")[];
|
|
25
25
|
declare const LOG_CATEGORIES: readonly ["general", "fs", "performance", "config", "plugins", "hooks", "schema", "env", "rpc", "communication", "babel"];
|
|
26
26
|
declare const DEFAULT_DEVELOPMENT_LOG_LEVEL: {
|
|
27
27
|
readonly general: "debug";
|
|
@@ -2,13 +2,13 @@ import { ExecutionContext } from "../types/context.cjs";
|
|
|
2
2
|
import { InferOverridableConfig, ResolvedConfig } from "../types/config.cjs";
|
|
3
3
|
//#region src/lib/context-helpers.d.ts
|
|
4
4
|
declare function getConfigProps<TResolvedConfig extends ResolvedConfig>(config?: TResolvedConfig["userConfig"] | TResolvedConfig["inlineConfig"] | TResolvedConfig["pluginConfig"] | InferOverridableConfig<TResolvedConfig>): ({
|
|
5
|
-
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "
|
|
5
|
+
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends object ? Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends infer T ? T extends Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] ? T extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T : { [K in keyof T]?: (T[K] extends object ? T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_1 : { [K_2 in keyof T_1]?: (T_1[K_2] extends object ? T_1[K_2] extends infer T_2 ? T_2 extends T_1[K_2] ? T_2 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_2 : { [K_3 in keyof T_2]?: (T_2[K_3] extends object ? T_2[K_3] extends infer T_3 ? T_3 extends T_2[K_3] ? T_3 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_3 : { [K_4 in keyof T_3]?: (T_3[K_4] extends object ? T_3[K_4] extends infer T_4 ? T_4 extends T_3[K_4] ? T_4 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_4 : { [K_5 in keyof T_4]?: (T_4[K_5] extends object ? T_4[K_5] extends infer T_5 ? T_5 extends T_4[K_5] ? T_5 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_5 : { [K_6 in keyof T_5]?: (T_5[K_6] extends object ? T_5[K_6] extends infer T_6 ? T_6 extends T_5[K_6] ? T_6 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_6 : { [K_7 in keyof T_6]?: (T_6[K_7] extends object ? T_6[K_7] extends infer T_7 ? T_7 extends T_6[K_7] ? T_7 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_7 : { [K_8 in keyof T_7]?: (T_7[K_8] extends object ? T_7[K_8] extends infer T_8 ? T_8 extends T_7[K_8] ? T_8 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_8 : { [K_9 in keyof T_8]?: (T_8[K_9] extends object ? T_8[K_9] : T_8[K_9]) | undefined } : never : never : T_7[K_8]) | undefined } : never : never : T_6[K_7]) | undefined } : never : never : T_5[K_6]) | undefined } : never : never : T_4[K_5]) | undefined } : never : never : T_3[K_4]) | undefined } : never : never : T_2[K_3]) | undefined } : never : never : T_1[K_2]) | undefined } : never : never : T[K]) | undefined } : never : never : Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"]) | undefined;
|
|
6
6
|
} & TResolvedConfig["userConfig"]) | ({
|
|
7
|
-
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "
|
|
7
|
+
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends object ? Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends infer T_1 ? T_1 extends Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] ? T_1 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_1 : { [K_1 in keyof T_1]?: (T_1[K_1] extends object ? T_1[K_1] extends infer T_2 ? T_2 extends T_1[K_1] ? T_2 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_2 : { [K_3 in keyof T_2]?: (T_2[K_3] extends object ? T_2[K_3] extends infer T_3 ? T_3 extends T_2[K_3] ? T_3 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_3 : { [K_4 in keyof T_3]?: (T_3[K_4] extends object ? T_3[K_4] extends infer T_4 ? T_4 extends T_3[K_4] ? T_4 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_4 : { [K_5 in keyof T_4]?: (T_4[K_5] extends object ? T_4[K_5] extends infer T_5 ? T_5 extends T_4[K_5] ? T_5 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_5 : { [K_6 in keyof T_5]?: (T_5[K_6] extends object ? T_5[K_6] extends infer T_6 ? T_6 extends T_5[K_6] ? T_6 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_6 : { [K_7 in keyof T_6]?: (T_6[K_7] extends object ? T_6[K_7] extends infer T_7 ? T_7 extends T_6[K_7] ? T_7 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_7 : { [K_8 in keyof T_7]?: (T_7[K_8] extends object ? T_7[K_8] extends infer T_8 ? T_8 extends T_7[K_8] ? T_8 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_8 : { [K_9 in keyof T_8]?: (T_8[K_9] extends object ? T_8[K_9] extends infer T_9 ? T_9 extends T_8[K_9] ? T_9 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_9 : { [K_10 in keyof T_9]?: (T_9[K_10] extends object ? T_9[K_10] : T_9[K_10]) | undefined } : never : never : T_8[K_9]) | undefined } : never : never : T_7[K_8]) | undefined } : never : never : T_6[K_7]) | undefined } : never : never : T_5[K_6]) | undefined } : never : never : T_4[K_5]) | undefined } : never : never : T_3[K_4]) | undefined } : never : never : T_2[K_3]) | undefined } : never : never : T_1[K_1]) | undefined } : never : never : Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"]) | undefined;
|
|
8
8
|
} & TResolvedConfig["inlineConfig"]) | ({
|
|
9
|
-
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "
|
|
9
|
+
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends object ? Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends infer T_2 ? T_2 extends Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] ? T_2 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_2 : { [K_2 in keyof T_2]?: (T_2[K_2] extends object ? T_2[K_2] extends infer T_3 ? T_3 extends T_2[K_2] ? T_3 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_3 : { [K_4 in keyof T_3]?: (T_3[K_4] extends object ? T_3[K_4] extends infer T_4 ? T_4 extends T_3[K_4] ? T_4 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_4 : { [K_5 in keyof T_4]?: (T_4[K_5] extends object ? T_4[K_5] extends infer T_5 ? T_5 extends T_4[K_5] ? T_5 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_5 : { [K_6 in keyof T_5]?: (T_5[K_6] extends object ? T_5[K_6] extends infer T_6 ? T_6 extends T_5[K_6] ? T_6 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_6 : { [K_7 in keyof T_6]?: (T_6[K_7] extends object ? T_6[K_7] extends infer T_7 ? T_7 extends T_6[K_7] ? T_7 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_7 : { [K_8 in keyof T_7]?: (T_7[K_8] extends object ? T_7[K_8] extends infer T_8 ? T_8 extends T_7[K_8] ? T_8 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_8 : { [K_9 in keyof T_8]?: (T_8[K_9] extends object ? T_8[K_9] extends infer T_9 ? T_9 extends T_8[K_9] ? T_9 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_9 : { [K_10 in keyof T_9]?: (T_9[K_10] extends object ? T_9[K_10] extends infer T_10 ? T_10 extends T_9[K_10] ? T_10 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_10 : { [K_11 in keyof T_10]?: (T_10[K_11] extends object ? T_10[K_11] : T_10[K_11]) | undefined } : never : never : T_9[K_10]) | undefined } : never : never : T_8[K_9]) | undefined } : never : never : T_7[K_8]) | undefined } : never : never : T_6[K_7]) | undefined } : never : never : T_5[K_6]) | undefined } : never : never : T_4[K_5]) | undefined } : never : never : T_3[K_4]) | undefined } : never : never : T_2[K_2]) | undefined } : never : never : Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"]) | undefined;
|
|
10
10
|
} & TResolvedConfig["pluginConfig"]) | ({
|
|
11
|
-
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "
|
|
11
|
+
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends object ? Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends infer T_3 ? T_3 extends Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] ? T_3 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_3 : { [K_3 in keyof T_3]?: (T_3[K_3] extends object ? T_3[K_3] extends infer T_4 ? T_4 extends T_3[K_3] ? T_4 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_4 : { [K_5 in keyof T_4]?: (T_4[K_5] extends object ? T_4[K_5] extends infer T_5 ? T_5 extends T_4[K_5] ? T_5 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_5 : { [K_6 in keyof T_5]?: (T_5[K_6] extends object ? T_5[K_6] extends infer T_6 ? T_6 extends T_5[K_6] ? T_6 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_6 : { [K_7 in keyof T_6]?: (T_6[K_7] extends object ? T_6[K_7] extends infer T_7 ? T_7 extends T_6[K_7] ? T_7 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_7 : { [K_8 in keyof T_7]?: (T_7[K_8] extends object ? T_7[K_8] extends infer T_8 ? T_8 extends T_7[K_8] ? T_8 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_8 : { [K_9 in keyof T_8]?: (T_8[K_9] extends object ? T_8[K_9] extends infer T_9 ? T_9 extends T_8[K_9] ? T_9 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_9 : { [K_10 in keyof T_9]?: (T_9[K_10] extends object ? T_9[K_10] extends infer T_10 ? T_10 extends T_9[K_10] ? T_10 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_10 : { [K_11 in keyof T_10]?: (T_10[K_11] extends object ? T_10[K_11] extends infer T_11 ? T_11 extends T_10[K_11] ? T_11 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_11 : { [K_12 in keyof T_11]?: (T_11[K_12] extends object ? T_11[K_12] : T_11[K_12]) | undefined } : never : never : T_10[K_11]) | undefined } : never : never : T_9[K_10]) | undefined } : never : never : T_8[K_9]) | undefined } : never : never : T_7[K_8]) | undefined } : never : never : T_6[K_7]) | undefined } : never : never : T_5[K_6]) | undefined } : never : never : T_4[K_5]) | undefined } : never : never : T_3[K_3]) | undefined } : never : never : Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"]) | undefined;
|
|
12
12
|
} & InferOverridableConfig<TResolvedConfig>);
|
|
13
13
|
declare function resolvePluginConfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown, TContext extends ExecutionContext<TResolvedConfig, TSystemContext> = ExecutionContext<TResolvedConfig, TSystemContext>>(context: TContext): Promise<void>;
|
|
14
14
|
//#endregion
|
|
@@ -2,13 +2,13 @@ import { ExecutionContext } from "../types/context.mjs";
|
|
|
2
2
|
import { InferOverridableConfig, ResolvedConfig } from "../types/config.mjs";
|
|
3
3
|
//#region src/lib/context-helpers.d.ts
|
|
4
4
|
declare function getConfigProps<TResolvedConfig extends ResolvedConfig>(config?: TResolvedConfig["userConfig"] | TResolvedConfig["inlineConfig"] | TResolvedConfig["pluginConfig"] | InferOverridableConfig<TResolvedConfig>): ({
|
|
5
|
-
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "
|
|
5
|
+
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends object ? Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends infer T ? T extends Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] ? T extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T : { [K in keyof T]?: (T[K] extends object ? T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_1 : { [K_2 in keyof T_1]?: (T_1[K_2] extends object ? T_1[K_2] extends infer T_2 ? T_2 extends T_1[K_2] ? T_2 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_2 : { [K_3 in keyof T_2]?: (T_2[K_3] extends object ? T_2[K_3] extends infer T_3 ? T_3 extends T_2[K_3] ? T_3 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_3 : { [K_4 in keyof T_3]?: (T_3[K_4] extends object ? T_3[K_4] extends infer T_4 ? T_4 extends T_3[K_4] ? T_4 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_4 : { [K_5 in keyof T_4]?: (T_4[K_5] extends object ? T_4[K_5] extends infer T_5 ? T_5 extends T_4[K_5] ? T_5 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_5 : { [K_6 in keyof T_5]?: (T_5[K_6] extends object ? T_5[K_6] extends infer T_6 ? T_6 extends T_5[K_6] ? T_6 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_6 : { [K_7 in keyof T_6]?: (T_6[K_7] extends object ? T_6[K_7] extends infer T_7 ? T_7 extends T_6[K_7] ? T_7 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_7 : { [K_8 in keyof T_7]?: (T_7[K_8] extends object ? T_7[K_8] extends infer T_8 ? T_8 extends T_7[K_8] ? T_8 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_8 : { [K_9 in keyof T_8]?: (T_8[K_9] extends object ? T_8[K_9] : T_8[K_9]) | undefined } : never : never : T_7[K_8]) | undefined } : never : never : T_6[K_7]) | undefined } : never : never : T_5[K_6]) | undefined } : never : never : T_4[K_5]) | undefined } : never : never : T_3[K_4]) | undefined } : never : never : T_2[K_3]) | undefined } : never : never : T_1[K_2]) | undefined } : never : never : T[K]) | undefined } : never : never : Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"]) | undefined;
|
|
6
6
|
} & TResolvedConfig["userConfig"]) | ({
|
|
7
|
-
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "
|
|
7
|
+
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends object ? Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends infer T_1 ? T_1 extends Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] ? T_1 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_1 : { [K_1 in keyof T_1]?: (T_1[K_1] extends object ? T_1[K_1] extends infer T_2 ? T_2 extends T_1[K_1] ? T_2 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_2 : { [K_3 in keyof T_2]?: (T_2[K_3] extends object ? T_2[K_3] extends infer T_3 ? T_3 extends T_2[K_3] ? T_3 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_3 : { [K_4 in keyof T_3]?: (T_3[K_4] extends object ? T_3[K_4] extends infer T_4 ? T_4 extends T_3[K_4] ? T_4 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_4 : { [K_5 in keyof T_4]?: (T_4[K_5] extends object ? T_4[K_5] extends infer T_5 ? T_5 extends T_4[K_5] ? T_5 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_5 : { [K_6 in keyof T_5]?: (T_5[K_6] extends object ? T_5[K_6] extends infer T_6 ? T_6 extends T_5[K_6] ? T_6 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_6 : { [K_7 in keyof T_6]?: (T_6[K_7] extends object ? T_6[K_7] extends infer T_7 ? T_7 extends T_6[K_7] ? T_7 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_7 : { [K_8 in keyof T_7]?: (T_7[K_8] extends object ? T_7[K_8] extends infer T_8 ? T_8 extends T_7[K_8] ? T_8 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_8 : { [K_9 in keyof T_8]?: (T_8[K_9] extends object ? T_8[K_9] extends infer T_9 ? T_9 extends T_8[K_9] ? T_9 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_9 : { [K_10 in keyof T_9]?: (T_9[K_10] extends object ? T_9[K_10] : T_9[K_10]) | undefined } : never : never : T_8[K_9]) | undefined } : never : never : T_7[K_8]) | undefined } : never : never : T_6[K_7]) | undefined } : never : never : T_5[K_6]) | undefined } : never : never : T_4[K_5]) | undefined } : never : never : T_3[K_4]) | undefined } : never : never : T_2[K_3]) | undefined } : never : never : T_1[K_1]) | undefined } : never : never : Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"]) | undefined;
|
|
8
8
|
} & TResolvedConfig["inlineConfig"]) | ({
|
|
9
|
-
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "
|
|
9
|
+
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends object ? Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends infer T_2 ? T_2 extends Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] ? T_2 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_2 : { [K_2 in keyof T_2]?: (T_2[K_2] extends object ? T_2[K_2] extends infer T_3 ? T_3 extends T_2[K_2] ? T_3 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_3 : { [K_4 in keyof T_3]?: (T_3[K_4] extends object ? T_3[K_4] extends infer T_4 ? T_4 extends T_3[K_4] ? T_4 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_4 : { [K_5 in keyof T_4]?: (T_4[K_5] extends object ? T_4[K_5] extends infer T_5 ? T_5 extends T_4[K_5] ? T_5 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_5 : { [K_6 in keyof T_5]?: (T_5[K_6] extends object ? T_5[K_6] extends infer T_6 ? T_6 extends T_5[K_6] ? T_6 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_6 : { [K_7 in keyof T_6]?: (T_6[K_7] extends object ? T_6[K_7] extends infer T_7 ? T_7 extends T_6[K_7] ? T_7 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_7 : { [K_8 in keyof T_7]?: (T_7[K_8] extends object ? T_7[K_8] extends infer T_8 ? T_8 extends T_7[K_8] ? T_8 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_8 : { [K_9 in keyof T_8]?: (T_8[K_9] extends object ? T_8[K_9] extends infer T_9 ? T_9 extends T_8[K_9] ? T_9 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_9 : { [K_10 in keyof T_9]?: (T_9[K_10] extends object ? T_9[K_10] extends infer T_10 ? T_10 extends T_9[K_10] ? T_10 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_10 : { [K_11 in keyof T_10]?: (T_10[K_11] extends object ? T_10[K_11] : T_10[K_11]) | undefined } : never : never : T_9[K_10]) | undefined } : never : never : T_8[K_9]) | undefined } : never : never : T_7[K_8]) | undefined } : never : never : T_6[K_7]) | undefined } : never : never : T_5[K_6]) | undefined } : never : never : T_4[K_5]) | undefined } : never : never : T_3[K_4]) | undefined } : never : never : T_2[K_2]) | undefined } : never : never : Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"]) | undefined;
|
|
10
10
|
} & TResolvedConfig["pluginConfig"]) | ({
|
|
11
|
-
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "
|
|
11
|
+
input: import("@stryke/types/configuration").FileReference | import("@stryke/types/configuration").FileReferenceInput[] | Record<string, import("@stryke/types/configuration").FileReferenceInput | import("@stryke/types/configuration").FileReferenceInput[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends object ? Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] extends infer T_3 ? T_3 extends Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"] ? T_3 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_3 : { [K_3 in keyof T_3]?: (T_3[K_3] extends object ? T_3[K_3] extends infer T_4 ? T_4 extends T_3[K_3] ? T_4 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_4 : { [K_5 in keyof T_4]?: (T_4[K_5] extends object ? T_4[K_5] extends infer T_5 ? T_5 extends T_4[K_5] ? T_5 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_5 : { [K_6 in keyof T_5]?: (T_5[K_6] extends object ? T_5[K_6] extends infer T_6 ? T_6 extends T_5[K_6] ? T_6 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_6 : { [K_7 in keyof T_6]?: (T_6[K_7] extends object ? T_6[K_7] extends infer T_7 ? T_7 extends T_6[K_7] ? T_7 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_7 : { [K_8 in keyof T_7]?: (T_7[K_8] extends object ? T_7[K_8] extends infer T_8 ? T_8 extends T_7[K_8] ? T_8 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_8 : { [K_9 in keyof T_8]?: (T_8[K_9] extends object ? T_8[K_9] extends infer T_9 ? T_9 extends T_8[K_9] ? T_9 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_9 : { [K_10 in keyof T_9]?: (T_9[K_10] extends object ? T_9[K_10] extends infer T_10 ? T_10 extends T_9[K_10] ? T_10 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_10 : { [K_11 in keyof T_10]?: (T_10[K_11] extends object ? T_10[K_11] extends infer T_11 ? T_11 extends T_10[K_11] ? T_11 extends import("@stryke/types/base").BrowserNativeObject | import("@stryke/types/base").NestedValue<object> ? T_11 : { [K_12 in keyof T_11]?: (T_11[K_12] extends object ? T_11[K_12] : T_11[K_12]) | undefined } : never : never : T_10[K_11]) | undefined } : never : never : T_9[K_10]) | undefined } : never : never : T_8[K_9]) | undefined } : never : never : T_7[K_8]) | undefined } : never : never : T_6[K_7]) | undefined } : never : never : T_5[K_6]) | undefined } : never : never : T_4[K_5]) | undefined } : never : never : T_3[K_3]) | undefined } : never : never : Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "pluginConfig" | "userConfig" | "inlineConfig">["input"]) | undefined;
|
|
12
12
|
} & InferOverridableConfig<TResolvedConfig>);
|
|
13
13
|
declare function resolvePluginConfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown, TContext extends ExecutionContext<TResolvedConfig, TSystemContext> = ExecutionContext<TResolvedConfig, TSystemContext>>(context: TContext): Promise<void>;
|
|
14
14
|
//#endregion
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _storm_software_config_tools_get_config = require("@storm-software/config-tools/get-config");
|
|
3
|
+
let _stryke_fs_exists = require("@stryke/fs/exists");
|
|
4
|
+
let _stryke_fs_json = require("@stryke/fs/json");
|
|
3
5
|
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
4
6
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
7
|
+
let _stryke_path_join = require("@stryke/path/join");
|
|
5
8
|
|
|
6
9
|
//#region src/plugin-utils/context-helpers.ts
|
|
7
10
|
/**
|
|
@@ -81,9 +84,31 @@ async function getWorkspaceName(context) {
|
|
|
81
84
|
function formatExecutionId(projectName, command, configIndex = 0) {
|
|
82
85
|
return `${projectName}:${command}:${String(configIndex + 1).padStart(2, "0")}`;
|
|
83
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Retrieves the project name from the context by checking various sources such as `project.json`, `package.json`, workspace configuration, and finally falling back to the context configuration.
|
|
89
|
+
*
|
|
90
|
+
* @param cwd - The current working directory.
|
|
91
|
+
* @param root - The root directory of the project.
|
|
92
|
+
* @returns The project name or undefined if not found.
|
|
93
|
+
*/
|
|
94
|
+
async function getName(cwd, root) {
|
|
95
|
+
const projectRoot = (0, _stryke_path_join.joinPaths)(cwd, root);
|
|
96
|
+
const projectJsonPath = (0, _stryke_path_join.joinPaths)(projectRoot, "project.json");
|
|
97
|
+
if ((0, _stryke_fs_exists.existsSync)(projectJsonPath)) {
|
|
98
|
+
const projectJson = await (0, _stryke_fs_json.readJsonFile)(projectJsonPath);
|
|
99
|
+
if ((0, _stryke_type_checks_is_set_string.isSetString)(projectJson.name)) return projectJson.name;
|
|
100
|
+
}
|
|
101
|
+
const packageJsonPath = (0, _stryke_path_join.joinPaths)(projectRoot, "package.json");
|
|
102
|
+
if ((0, _stryke_fs_exists.existsSync)(packageJsonPath)) {
|
|
103
|
+
const packageJson = await (0, _stryke_fs_json.readJsonFile)(packageJsonPath);
|
|
104
|
+
if ((0, _stryke_type_checks_is_set_string.isSetString)(packageJson.name)) return packageJson.name.replace(/^@[^/]+\//, "");
|
|
105
|
+
}
|
|
106
|
+
return root.replace(/\/*$/, "").replace("/", "-");
|
|
107
|
+
}
|
|
84
108
|
|
|
85
109
|
//#endregion
|
|
86
110
|
exports.formatExecutionId = formatExecutionId;
|
|
111
|
+
exports.getName = getName;
|
|
87
112
|
exports.getOrganizationName = getOrganizationName;
|
|
88
113
|
exports.getPackageJsonOrganization = getPackageJsonOrganization;
|
|
89
114
|
exports.getWorkspaceName = getWorkspaceName;
|
|
@@ -47,6 +47,14 @@ declare function getWorkspaceName(context: UnresolvedContext): Promise<string |
|
|
|
47
47
|
* @returns The formatted execution ID.
|
|
48
48
|
*/
|
|
49
49
|
declare function formatExecutionId(projectName: string, command: string, configIndex?: number): string;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves the project name from the context by checking various sources such as `project.json`, `package.json`, workspace configuration, and finally falling back to the context configuration.
|
|
52
|
+
*
|
|
53
|
+
* @param cwd - The current working directory.
|
|
54
|
+
* @param root - The root directory of the project.
|
|
55
|
+
* @returns The project name or undefined if not found.
|
|
56
|
+
*/
|
|
57
|
+
declare function getName(cwd: string, root: string): Promise<string>;
|
|
50
58
|
//#endregion
|
|
51
|
-
export { formatExecutionId, getOrganizationName, getPackageJsonOrganization, getWorkspaceName };
|
|
59
|
+
export { formatExecutionId, getName, getOrganizationName, getPackageJsonOrganization, getWorkspaceName };
|
|
52
60
|
//# sourceMappingURL=context-helpers.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"context-helpers.d.cts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"mappings":";;;;;;AAiCA;;;;iBAAsB,mBAAA,CACpB,OAAA,EAAS,iBAAA,GACR,OAAO;;;;AAAA;AAkBV;;iBAAgB,0BAAA,CACd,WAAwB,EAAX,WAAW;;AAAA;AA6D1B;;;;iBAAsB,gBAAA,CACpB,OAAA,EAAS,iBAAA,GACR,OAAO;;;;AAAA;AAgDV;;;;;;;;AAGyB;AAYzB;;;;;;;;AAAiE;;iBAfjD,iBAAA,CACd,WAAA,UACA,OAAA,UACA,WAAA;;;;;;;;iBAYoB,OAAA,CAAQ,GAAA,UAAa,IAAA,WAAe,OAAO"}
|
|
@@ -47,6 +47,14 @@ declare function getWorkspaceName(context: UnresolvedContext): Promise<string |
|
|
|
47
47
|
* @returns The formatted execution ID.
|
|
48
48
|
*/
|
|
49
49
|
declare function formatExecutionId(projectName: string, command: string, configIndex?: number): string;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves the project name from the context by checking various sources such as `project.json`, `package.json`, workspace configuration, and finally falling back to the context configuration.
|
|
52
|
+
*
|
|
53
|
+
* @param cwd - The current working directory.
|
|
54
|
+
* @param root - The root directory of the project.
|
|
55
|
+
* @returns The project name or undefined if not found.
|
|
56
|
+
*/
|
|
57
|
+
declare function getName(cwd: string, root: string): Promise<string>;
|
|
50
58
|
//#endregion
|
|
51
|
-
export { formatExecutionId, getOrganizationName, getPackageJsonOrganization, getWorkspaceName };
|
|
59
|
+
export { formatExecutionId, getName, getOrganizationName, getPackageJsonOrganization, getWorkspaceName };
|
|
52
60
|
//# sourceMappingURL=context-helpers.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"context-helpers.d.mts","names":[],"sources":["../../src/plugin-utils/context-helpers.ts"],"mappings":";;;;;;AAiCA;;;;iBAAsB,mBAAA,CACpB,OAAA,EAAS,iBAAA,GACR,OAAO;;;;AAAA;AAkBV;;iBAAgB,0BAAA,CACd,WAAwB,EAAX,WAAW;;AAAA;AA6D1B;;;;iBAAsB,gBAAA,CACpB,OAAA,EAAS,iBAAA,GACR,OAAO;;;;AAAA;AAgDV;;;;;;;;AAGyB;AAYzB;;;;;;;;AAAiE;;iBAfjD,iBAAA,CACd,WAAA,UACA,OAAA,UACA,WAAA;;;;;;;;iBAYoB,OAAA,CAAQ,GAAA,UAAa,IAAA,WAAe,OAAO"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { tryGetWorkspaceConfig } from "@storm-software/config-tools/get-config";
|
|
2
|
+
import { existsSync } from "@stryke/fs/exists";
|
|
3
|
+
import { readJsonFile } from "@stryke/fs/json";
|
|
2
4
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
3
5
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
6
|
+
import { joinPaths } from "@stryke/path/join";
|
|
4
7
|
|
|
5
8
|
//#region src/plugin-utils/context-helpers.ts
|
|
6
9
|
/**
|
|
@@ -80,7 +83,28 @@ async function getWorkspaceName(context) {
|
|
|
80
83
|
function formatExecutionId(projectName, command, configIndex = 0) {
|
|
81
84
|
return `${projectName}:${command}:${String(configIndex + 1).padStart(2, "0")}`;
|
|
82
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Retrieves the project name from the context by checking various sources such as `project.json`, `package.json`, workspace configuration, and finally falling back to the context configuration.
|
|
88
|
+
*
|
|
89
|
+
* @param cwd - The current working directory.
|
|
90
|
+
* @param root - The root directory of the project.
|
|
91
|
+
* @returns The project name or undefined if not found.
|
|
92
|
+
*/
|
|
93
|
+
async function getName(cwd, root) {
|
|
94
|
+
const projectRoot = joinPaths(cwd, root);
|
|
95
|
+
const projectJsonPath = joinPaths(projectRoot, "project.json");
|
|
96
|
+
if (existsSync(projectJsonPath)) {
|
|
97
|
+
const projectJson = await readJsonFile(projectJsonPath);
|
|
98
|
+
if (isSetString(projectJson.name)) return projectJson.name;
|
|
99
|
+
}
|
|
100
|
+
const packageJsonPath = joinPaths(projectRoot, "package.json");
|
|
101
|
+
if (existsSync(packageJsonPath)) {
|
|
102
|
+
const packageJson = await readJsonFile(packageJsonPath);
|
|
103
|
+
if (isSetString(packageJson.name)) return packageJson.name.replace(/^@[^/]+\//, "");
|
|
104
|
+
}
|
|
105
|
+
return root.replace(/\/*$/, "").replace("/", "-");
|
|
106
|
+
}
|
|
83
107
|
|
|
84
108
|
//#endregion
|
|
85
|
-
export { formatExecutionId, getOrganizationName, getPackageJsonOrganization, getWorkspaceName };
|
|
109
|
+
export { formatExecutionId, getName, getOrganizationName, getPackageJsonOrganization, getWorkspaceName };
|
|
86
110
|
//# sourceMappingURL=context-helpers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-helpers.mjs","names":[],"sources":["../../src/plugin-utils/context-helpers.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 { tryGetWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { PackageJson } from \"@stryke/types/package-json\";\nimport { UnresolvedContext } from \"../types/context\";\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport async function getOrganizationName(\n context: UnresolvedContext\n): Promise<string | undefined> {\n if (isSetString(context.config.organization)) {\n return context.config.organization;\n }\n\n return (\n getPackageJsonOrganization(context.packageJson) ||\n (await getWorkspaceName(context)) ||\n context.config.name\n );\n}\n\n/**\n * Get the organization name from the `package.json` file\n *\n * @param packageJson - The `package.json` object to extract the organization name from.\n * @returns The organization name or undefined if not found.\n */\nexport function getPackageJsonOrganization(\n packageJson: PackageJson\n): string | undefined {\n let result: string | undefined;\n if (\n Array.isArray(packageJson.maintainers) &&\n packageJson.maintainers.length > 0\n ) {\n if (isSetObject(packageJson.maintainers[0])) {\n result = (packageJson.maintainers[0] as { name: string }).name;\n }\n\n if (!result && isSetString(packageJson.maintainers[0])) {\n result = packageJson.maintainers[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(packageJson.author) &&\n packageJson.author.length > 0\n ) {\n if (isSetObject(packageJson.author[0])) {\n result = (packageJson.author[0] as { name: string }).name;\n }\n\n if (!result && isSetString(packageJson.author[0])) {\n result = packageJson.author[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(packageJson.contributors) &&\n packageJson.contributors.length > 0\n ) {\n if (isSetObject(packageJson.contributors[0])) {\n result = (packageJson.contributors[0] as { name: string }).name;\n }\n\n if (!result && isSetString(packageJson.contributors[0])) {\n result = packageJson.contributors[0];\n }\n }\n\n if (!result && isSetString(packageJson.namespace)) {\n result = packageJson.namespace?.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(packageJson.name)) {\n result = packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport async function getWorkspaceName(\n context: UnresolvedContext\n): Promise<string | undefined> {\n let result: string | undefined;\n\n const workspaceConfig = await tryGetWorkspaceConfig(true);\n if (workspaceConfig) {\n if (isSetString(workspaceConfig.name)) {\n result = workspaceConfig.name;\n }\n\n if (!result && isSetString(workspaceConfig.namespace)) {\n result = workspaceConfig.namespace.replace(/^@/, \"\");\n }\n }\n\n if (!result && isSetString(context.packageJson.namespace)) {\n result = context.packageJson.namespace.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(context.packageJson.name)) {\n result = context.packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n\n/**\n * Format an execution ID based on the project name, command, and config index.\n *\n * @remarks\n * The execution ID is formatted as `${projectName}:${command}:${index}`, where:\n * - `projectName` is the name of the project.\n * - `command` is the command being executed.\n * - `index` is a zero-padded number representing the execution index (starting from 1).\n *\n * @example\n * ```ts\n * const executionId = formatExecutionId(\"my-project\", \"build\", 0);\n * // This will return \"my-project:build:01\"\n *\n * const executionId2 = formatExecutionId(\"my-project\", \"test\", 5);\n * // This will return \"my-project:test:06\"\n * ```\n *\n * @param projectName - The name of the project.\n * @param command - The command being executed.\n * @param configIndex - The index of the execution (starting from 0).\n * @returns The formatted execution ID.\n */\nexport function formatExecutionId(\n projectName: string,\n command: string,\n configIndex: number = 0\n) {\n return `${projectName}:${command}:${String(configIndex + 1).padStart(2, \"0\")}`;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context-helpers.mjs","names":[],"sources":["../../src/plugin-utils/context-helpers.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 { tryGetWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFile } from \"@stryke/fs/json\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { PackageJson } from \"@stryke/types/package-json\";\nimport { UnresolvedContext } from \"../types/context\";\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport async function getOrganizationName(\n context: UnresolvedContext\n): Promise<string | undefined> {\n if (isSetString(context.config.organization)) {\n return context.config.organization;\n }\n\n return (\n getPackageJsonOrganization(context.packageJson) ||\n (await getWorkspaceName(context)) ||\n context.config.name\n );\n}\n\n/**\n * Get the organization name from the `package.json` file\n *\n * @param packageJson - The `package.json` object to extract the organization name from.\n * @returns The organization name or undefined if not found.\n */\nexport function getPackageJsonOrganization(\n packageJson: PackageJson\n): string | undefined {\n let result: string | undefined;\n if (\n Array.isArray(packageJson.maintainers) &&\n packageJson.maintainers.length > 0\n ) {\n if (isSetObject(packageJson.maintainers[0])) {\n result = (packageJson.maintainers[0] as { name: string }).name;\n }\n\n if (!result && isSetString(packageJson.maintainers[0])) {\n result = packageJson.maintainers[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(packageJson.author) &&\n packageJson.author.length > 0\n ) {\n if (isSetObject(packageJson.author[0])) {\n result = (packageJson.author[0] as { name: string }).name;\n }\n\n if (!result && isSetString(packageJson.author[0])) {\n result = packageJson.author[0];\n }\n }\n\n if (\n !result &&\n Array.isArray(packageJson.contributors) &&\n packageJson.contributors.length > 0\n ) {\n if (isSetObject(packageJson.contributors[0])) {\n result = (packageJson.contributors[0] as { name: string }).name;\n }\n\n if (!result && isSetString(packageJson.contributors[0])) {\n result = packageJson.contributors[0];\n }\n }\n\n if (!result && isSetString(packageJson.namespace)) {\n result = packageJson.namespace?.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(packageJson.name)) {\n result = packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n\n/**\n * Get the organization name from the context\n *\n * @param context - The Powerlines plugin context.\n * @returns The organization name or undefined if not found.\n */\nexport async function getWorkspaceName(\n context: UnresolvedContext\n): Promise<string | undefined> {\n let result: string | undefined;\n\n const workspaceConfig = await tryGetWorkspaceConfig(true);\n if (workspaceConfig) {\n if (isSetString(workspaceConfig.name)) {\n result = workspaceConfig.name;\n }\n\n if (!result && isSetString(workspaceConfig.namespace)) {\n result = workspaceConfig.namespace.replace(/^@/, \"\");\n }\n }\n\n if (!result && isSetString(context.packageJson.namespace)) {\n result = context.packageJson.namespace.replace(/^@/, \"\");\n }\n\n if (!result && isSetString(context.packageJson.name)) {\n result = context.packageJson.name.replace(/^@/, \"\").replace(/\\/.*$/, \"\");\n }\n\n return result;\n}\n\n/**\n * Format an execution ID based on the project name, command, and config index.\n *\n * @remarks\n * The execution ID is formatted as `${projectName}:${command}:${index}`, where:\n * - `projectName` is the name of the project.\n * - `command` is the command being executed.\n * - `index` is a zero-padded number representing the execution index (starting from 1).\n *\n * @example\n * ```ts\n * const executionId = formatExecutionId(\"my-project\", \"build\", 0);\n * // This will return \"my-project:build:01\"\n *\n * const executionId2 = formatExecutionId(\"my-project\", \"test\", 5);\n * // This will return \"my-project:test:06\"\n * ```\n *\n * @param projectName - The name of the project.\n * @param command - The command being executed.\n * @param configIndex - The index of the execution (starting from 0).\n * @returns The formatted execution ID.\n */\nexport function formatExecutionId(\n projectName: string,\n command: string,\n configIndex: number = 0\n) {\n return `${projectName}:${command}:${String(configIndex + 1).padStart(2, \"0\")}`;\n}\n\n/**\n * Retrieves the project name from the context by checking various sources such as `project.json`, `package.json`, workspace configuration, and finally falling back to the context configuration.\n *\n * @param cwd - The current working directory.\n * @param root - The root directory of the project.\n * @returns The project name or undefined if not found.\n */\nexport async function getName(cwd: string, root: string): Promise<string> {\n const projectRoot = joinPaths(cwd, root);\n\n const projectJsonPath = joinPaths(projectRoot, \"project.json\");\n if (existsSync(projectJsonPath)) {\n const projectJson = await readJsonFile<{ name: string }>(projectJsonPath);\n if (isSetString(projectJson.name)) {\n return projectJson.name;\n }\n }\n\n const packageJsonPath = joinPaths(projectRoot, \"package.json\");\n if (existsSync(packageJsonPath)) {\n const packageJson = await readJsonFile<PackageJson>(packageJsonPath);\n if (isSetString(packageJson.name)) {\n return packageJson.name.replace(/^@[^/]+\\//, \"\");\n }\n }\n\n return root.replace(/\\/*$/, \"\").replace(\"/\", \"-\");\n}\n"],"mappings":";;;;;;;;;;;;;;AAiCA,eAAsB,oBACpB,SAC6B;CAC7B,IAAI,YAAY,QAAQ,OAAO,YAAY,GACzC,OAAO,QAAQ,OAAO;CAGxB,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SAAS,GAClD,SAAS,gBAAgB,UAAU,QAAQ,MAAM,EAAE;CAEvD;CAEA,IAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,SAAS,GACtD,SAAS,QAAQ,YAAY,UAAU,QAAQ,MAAM,EAAE;CAGzD,IAAI,CAAC,UAAU,YAAY,QAAQ,YAAY,IAAI,GACjD,SAAS,QAAQ,YAAY,KAAK,QAAQ,MAAM,EAAE,CAAC,CAAC,QAAQ,SAAS,EAAE;CAGzE,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,kBACd,aACA,SACA,cAAsB,GACtB;CACA,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,OAAO,cAAc,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;AAC7E;;;;;;;;AASA,eAAsB,QAAQ,KAAa,MAA+B;CACxE,MAAM,cAAc,UAAU,KAAK,IAAI;CAEvC,MAAM,kBAAkB,UAAU,aAAa,cAAc;CAC7D,IAAI,WAAW,eAAe,GAAG;EAC/B,MAAM,cAAc,MAAM,aAA+B,eAAe;EACxE,IAAI,YAAY,YAAY,IAAI,GAC9B,OAAO,YAAY;CAEvB;CAEA,MAAM,kBAAkB,UAAU,aAAa,cAAc;CAC7D,IAAI,WAAW,eAAe,GAAG;EAC/B,MAAM,cAAc,MAAM,aAA0B,eAAe;EACnE,IAAI,YAAY,YAAY,IAAI,GAC9B,OAAO,YAAY,KAAK,QAAQ,aAAa,EAAE;CAEnD;CAEA,OAAO,KAAK,QAAQ,QAAQ,EAAE,CAAC,CAAC,QAAQ,KAAK,GAAG;AAClD"}
|
|
@@ -72,7 +72,7 @@ declare function getHookHandler<TContext extends PluginContext = PluginContext,
|
|
|
72
72
|
* @returns The extracted hook, or undefined if the hook does not exist
|
|
73
73
|
*/
|
|
74
74
|
declare function extractPluginHook<TContext extends PluginContext = PluginContext, TPlugin extends Plugin<TContext> = Plugin<TContext>>(context: TContext, plugin: TPlugin, hook: keyof PluginHooks<TContext>): {
|
|
75
|
-
normal: OmitThisParameter<((this: TContext, code: string) => import("@stryke/types/base").MaybePromise<TypesResult | string | undefined | null>) | ((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>) | (((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>) & PluginHookObject<(this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>, "
|
|
75
|
+
normal: OmitThisParameter<((this: TContext, code: string) => import("@stryke/types/base").MaybePromise<TypesResult | string | undefined | null>) | ((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>) | (((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>) & PluginHookObject<(this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>, "code" | "id">) | (PluginHookObject<(this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>, never> & ((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>)) | ((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string) => import("@stryke/types/base").MaybePromise<import("rollup").LoadResult>) | (((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string) => import("@stryke/types/base").MaybePromise<import("rollup").LoadResult>) & PluginHookObject<(this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string) => import("@stryke/types/base").MaybePromise<import("rollup").LoadResult>, "id">) | (PluginHookObject<(this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string) => import("@stryke/types/base").MaybePromise<import("rollup").LoadResult>, never> & ((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string) => import("@stryke/types/base").MaybePromise<import("rollup").LoadResult>)) | ((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string, importer: string | undefined, options: {
|
|
76
76
|
isEntry: boolean;
|
|
77
77
|
}) => import("@stryke/types/base").MaybePromise<string | ResolveResult | null | undefined>) | (((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string, importer: string | undefined, options: {
|
|
78
78
|
isEntry: boolean;
|
|
@@ -72,7 +72,7 @@ declare function getHookHandler<TContext extends PluginContext = PluginContext,
|
|
|
72
72
|
* @returns The extracted hook, or undefined if the hook does not exist
|
|
73
73
|
*/
|
|
74
74
|
declare function extractPluginHook<TContext extends PluginContext = PluginContext, TPlugin extends Plugin<TContext> = Plugin<TContext>>(context: TContext, plugin: TPlugin, hook: keyof PluginHooks<TContext>): {
|
|
75
|
-
normal: OmitThisParameter<((this: TContext, code: string) => import("@stryke/types/base").MaybePromise<TypesResult | string | undefined | null>) | ((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>) | (((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>) & PluginHookObject<(this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>, "
|
|
75
|
+
normal: OmitThisParameter<((this: TContext, code: string) => import("@stryke/types/base").MaybePromise<TypesResult | string | undefined | null>) | ((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>) | (((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>) & PluginHookObject<(this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>, "code" | "id">) | (PluginHookObject<(this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>, never> & ((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, code: string, id: string) => import("@stryke/types/base").MaybePromise<import("unplugin").TransformResult>)) | ((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string) => import("@stryke/types/base").MaybePromise<import("rollup").LoadResult>) | (((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string) => import("@stryke/types/base").MaybePromise<import("rollup").LoadResult>) & PluginHookObject<(this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string) => import("@stryke/types/base").MaybePromise<import("rollup").LoadResult>, "id">) | (PluginHookObject<(this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string) => import("@stryke/types/base").MaybePromise<import("rollup").LoadResult>, never> & ((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string) => import("@stryke/types/base").MaybePromise<import("rollup").LoadResult>)) | ((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string, importer: string | undefined, options: {
|
|
76
76
|
isEntry: boolean;
|
|
77
77
|
}) => import("@stryke/types/base").MaybePromise<string | ResolveResult | null | undefined>) | (((this: import("unplugin").UnpluginBuildContext & PluginContext<TContext["config"], any> & TContext, id: string, importer: string | undefined, options: {
|
|
78
78
|
isEntry: boolean;
|
|
@@ -49,6 +49,7 @@ exports.getConfigPath = require_plugin_utils_get_config_path.getConfigPath;
|
|
|
49
49
|
exports.getDependencyConfig = require_plugin_utils_build_helpers.getDependencyConfig;
|
|
50
50
|
exports.getDocsOutputPath = require_plugin_utils_docs_helper.getDocsOutputPath;
|
|
51
51
|
exports.getHookHandler = require_plugin_utils_helpers.getHookHandler;
|
|
52
|
+
exports.getName = require_plugin_utils_context_helpers.getName;
|
|
52
53
|
exports.getOrganizationName = require_plugin_utils_context_helpers.getOrganizationName;
|
|
53
54
|
exports.getPackageJsonOrganization = require_plugin_utils_context_helpers.getPackageJsonOrganization;
|
|
54
55
|
exports.getTextColor = require_plugin_utils_logging.getTextColor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetDependencyConfigResult, getDependencyConfig } from "./build-helpers.cjs";
|
|
2
2
|
import { CombinePluginsOptions, combinePluginOptions, combinePlugins } from "./combine-plugins.cjs";
|
|
3
|
-
import { formatExecutionId, getOrganizationName, getPackageJsonOrganization, getWorkspaceName } from "./context-helpers.cjs";
|
|
3
|
+
import { formatExecutionId, getName, getOrganizationName, getPackageJsonOrganization, getWorkspaceName } from "./context-helpers.cjs";
|
|
4
4
|
import { getDocsOutputPath } from "./docs-helper.cjs";
|
|
5
5
|
import { enable } from "./enable-plugin.cjs";
|
|
6
6
|
import { extend } from "./extend.cjs";
|
|
@@ -15,4 +15,4 @@ import { MergeResult, merge, mergeConfig } from "./merge.cjs";
|
|
|
15
15
|
import { isBuiltinModule } from "./modules.cjs";
|
|
16
16
|
import { replacePathTokens } from "./paths.cjs";
|
|
17
17
|
import { PrefixRegexOptions, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, addVirtualPrefix, createVirtualPrefixRegex, isVirtualModule, prefixRegex, removeVirtualPrefix } from "./virtual.cjs";
|
|
18
|
-
export { CombinePluginsOptions, GetDependencyConfigResult, GetHookHandlerReturnType, MergeResult, PrefixRegexOptions, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, addPluginHook, addVirtualPrefix, colorBackground, colorText, combinePluginOptions, combinePlugins, consoleLog, consoleLogger, createCodeFilter, createFilter, createFilterForId, createFilterForTransform, createIdFilter, createLogFn, createLogger, createVirtualPrefixRegex, dedupeHooklist, enable, extend, extendLogFn, extendLogger, extractPluginHook, findInvalidPluginConfig, formatConfig, formatExecutionId, formatPackageJson, getConfigPath, getDependencyConfig, getDocsOutputPath, getHookHandler, getOrganizationName, getPackageJsonOrganization, getTextColor, getWorkspaceName, installPackage, installPackages, isBuiltinModule, isDuplicate, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey, isValidLogLevel, isValidLogLevelConfig, isVerbose, isVirtualModule, merge, mergeConfig, normalizeFilter, normalizeSingleFilter, patternToCodeFilter, patternToIdFilter, prefixRegex, removeVirtualPrefix, replacePathTokens, resolveLogLevel, withCustomLogger, withLogFn, withLogger };
|
|
18
|
+
export { CombinePluginsOptions, GetDependencyConfigResult, GetHookHandlerReturnType, MergeResult, PrefixRegexOptions, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, addPluginHook, addVirtualPrefix, colorBackground, colorText, combinePluginOptions, combinePlugins, consoleLog, consoleLogger, createCodeFilter, createFilter, createFilterForId, createFilterForTransform, createIdFilter, createLogFn, createLogger, createVirtualPrefixRegex, dedupeHooklist, enable, extend, extendLogFn, extendLogger, extractPluginHook, findInvalidPluginConfig, formatConfig, formatExecutionId, formatPackageJson, getConfigPath, getDependencyConfig, getDocsOutputPath, getHookHandler, getName, getOrganizationName, getPackageJsonOrganization, getTextColor, getWorkspaceName, installPackage, installPackages, isBuiltinModule, isDuplicate, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey, isValidLogLevel, isValidLogLevelConfig, isVerbose, isVirtualModule, merge, mergeConfig, normalizeFilter, normalizeSingleFilter, patternToCodeFilter, patternToIdFilter, prefixRegex, removeVirtualPrefix, replacePathTokens, resolveLogLevel, withCustomLogger, withLogFn, withLogger };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetDependencyConfigResult, getDependencyConfig } from "./build-helpers.mjs";
|
|
2
2
|
import { CombinePluginsOptions, combinePluginOptions, combinePlugins } from "./combine-plugins.mjs";
|
|
3
|
-
import { formatExecutionId, getOrganizationName, getPackageJsonOrganization, getWorkspaceName } from "./context-helpers.mjs";
|
|
3
|
+
import { formatExecutionId, getName, getOrganizationName, getPackageJsonOrganization, getWorkspaceName } from "./context-helpers.mjs";
|
|
4
4
|
import { getDocsOutputPath } from "./docs-helper.mjs";
|
|
5
5
|
import { enable } from "./enable-plugin.mjs";
|
|
6
6
|
import { extend } from "./extend.mjs";
|
|
@@ -15,4 +15,4 @@ import { MergeResult, merge, mergeConfig } from "./merge.mjs";
|
|
|
15
15
|
import { isBuiltinModule } from "./modules.mjs";
|
|
16
16
|
import { replacePathTokens } from "./paths.mjs";
|
|
17
17
|
import { PrefixRegexOptions, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, addVirtualPrefix, createVirtualPrefixRegex, isVirtualModule, prefixRegex, removeVirtualPrefix } from "./virtual.mjs";
|
|
18
|
-
export { CombinePluginsOptions, GetDependencyConfigResult, GetHookHandlerReturnType, MergeResult, PrefixRegexOptions, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, addPluginHook, addVirtualPrefix, colorBackground, colorText, combinePluginOptions, combinePlugins, consoleLog, consoleLogger, createCodeFilter, createFilter, createFilterForId, createFilterForTransform, createIdFilter, createLogFn, createLogger, createVirtualPrefixRegex, dedupeHooklist, enable, extend, extendLogFn, extendLogger, extractPluginHook, findInvalidPluginConfig, formatConfig, formatExecutionId, formatPackageJson, getConfigPath, getDependencyConfig, getDocsOutputPath, getHookHandler, getOrganizationName, getPackageJsonOrganization, getTextColor, getWorkspaceName, installPackage, installPackages, isBuiltinModule, isDuplicate, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey, isValidLogLevel, isValidLogLevelConfig, isVerbose, isVirtualModule, merge, mergeConfig, normalizeFilter, normalizeSingleFilter, patternToCodeFilter, patternToIdFilter, prefixRegex, removeVirtualPrefix, replacePathTokens, resolveLogLevel, withCustomLogger, withLogFn, withLogger };
|
|
18
|
+
export { CombinePluginsOptions, GetDependencyConfigResult, GetHookHandlerReturnType, MergeResult, PrefixRegexOptions, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, addPluginHook, addVirtualPrefix, colorBackground, colorText, combinePluginOptions, combinePlugins, consoleLog, consoleLogger, createCodeFilter, createFilter, createFilterForId, createFilterForTransform, createIdFilter, createLogFn, createLogger, createVirtualPrefixRegex, dedupeHooklist, enable, extend, extendLogFn, extendLogger, extractPluginHook, findInvalidPluginConfig, formatConfig, formatExecutionId, formatPackageJson, getConfigPath, getDependencyConfig, getDocsOutputPath, getHookHandler, getName, getOrganizationName, getPackageJsonOrganization, getTextColor, getWorkspaceName, installPackage, installPackages, isBuiltinModule, isDuplicate, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey, isValidLogLevel, isValidLogLevelConfig, isVerbose, isVirtualModule, merge, mergeConfig, normalizeFilter, normalizeSingleFilter, patternToCodeFilter, patternToIdFilter, prefixRegex, removeVirtualPrefix, replacePathTokens, resolveLogLevel, withCustomLogger, withLogFn, withLogger };
|
|
@@ -3,7 +3,7 @@ import { getDependencyConfig } from "./build-helpers.mjs";
|
|
|
3
3
|
import { addPluginHook, dedupeHooklist, extractPluginHook, findInvalidPluginConfig, getHookHandler, isDuplicate, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey } from "./helpers.mjs";
|
|
4
4
|
import { merge, mergeConfig } from "./merge.mjs";
|
|
5
5
|
import { combinePluginOptions, combinePlugins } from "./combine-plugins.mjs";
|
|
6
|
-
import { formatExecutionId, getOrganizationName, getPackageJsonOrganization, getWorkspaceName } from "./context-helpers.mjs";
|
|
6
|
+
import { formatExecutionId, getName, getOrganizationName, getPackageJsonOrganization, getWorkspaceName } from "./context-helpers.mjs";
|
|
7
7
|
import { getDocsOutputPath } from "./docs-helper.mjs";
|
|
8
8
|
import { enable } from "./enable-plugin.mjs";
|
|
9
9
|
import { extend } from "./extend.mjs";
|
|
@@ -16,4 +16,4 @@ import { installPackage, installPackages } from "./install.mjs";
|
|
|
16
16
|
import { isBuiltinModule } from "./modules.mjs";
|
|
17
17
|
import { replacePathTokens } from "./paths.mjs";
|
|
18
18
|
|
|
19
|
-
export { VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, addPluginHook, addVirtualPrefix, colorBackground, colorText, combinePluginOptions, combinePlugins, consoleLog, consoleLogger, createCodeFilter, createFilter, createFilterForId, createFilterForTransform, createIdFilter, createLogFn, createLogger, createVirtualPrefixRegex, dedupeHooklist, enable, extend, extendLogFn, extendLogger, extractPluginHook, findInvalidPluginConfig, formatConfig, formatExecutionId, formatPackageJson, getConfigPath, getDependencyConfig, getDocsOutputPath, getHookHandler, getOrganizationName, getPackageJsonOrganization, getTextColor, getWorkspaceName, installPackage, installPackages, isBuiltinModule, isDuplicate, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey, isValidLogLevel, isValidLogLevelConfig, isVerbose, isVirtualModule, merge, mergeConfig, normalizeFilter, normalizeSingleFilter, patternToCodeFilter, patternToIdFilter, prefixRegex, removeVirtualPrefix, replacePathTokens, resolveLogLevel, withCustomLogger, withLogFn, withLogger };
|
|
19
|
+
export { VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, addPluginHook, addVirtualPrefix, colorBackground, colorText, combinePluginOptions, combinePlugins, consoleLog, consoleLogger, createCodeFilter, createFilter, createFilterForId, createFilterForTransform, createIdFilter, createLogFn, createLogger, createVirtualPrefixRegex, dedupeHooklist, enable, extend, extendLogFn, extendLogger, extractPluginHook, findInvalidPluginConfig, formatConfig, formatExecutionId, formatPackageJson, getConfigPath, getDependencyConfig, getDocsOutputPath, getHookHandler, getName, getOrganizationName, getPackageJsonOrganization, getTextColor, getWorkspaceName, installPackage, installPackages, isBuiltinModule, isDuplicate, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey, isValidLogLevel, isValidLogLevelConfig, isVerbose, isVirtualModule, merge, mergeConfig, normalizeFilter, normalizeSingleFilter, patternToCodeFilter, patternToIdFilter, prefixRegex, removeVirtualPrefix, replacePathTokens, resolveLogLevel, withCustomLogger, withLogFn, withLogger };
|
|
@@ -42,6 +42,7 @@ function resolveLogLevel(logLevel, mode) {
|
|
|
42
42
|
hooks: "trace",
|
|
43
43
|
env: "trace",
|
|
44
44
|
rpc: "trace",
|
|
45
|
+
schema: "trace",
|
|
45
46
|
config: "trace",
|
|
46
47
|
babel: "trace"
|
|
47
48
|
};
|
|
@@ -54,6 +55,7 @@ function resolveLogLevel(logLevel, mode) {
|
|
|
54
55
|
hooks: "silent",
|
|
55
56
|
env: "silent",
|
|
56
57
|
rpc: "silent",
|
|
58
|
+
schema: "silent",
|
|
57
59
|
config: "silent",
|
|
58
60
|
babel: "silent"
|
|
59
61
|
};
|
|
@@ -70,6 +72,7 @@ function resolveLogLevel(logLevel, mode) {
|
|
|
70
72
|
hooks: logLevel,
|
|
71
73
|
env: defaultLogLevel.env,
|
|
72
74
|
rpc: defaultLogLevel.rpc,
|
|
75
|
+
schema: defaultLogLevel.schema,
|
|
73
76
|
config: defaultLogLevel.config,
|
|
74
77
|
babel: logLevel
|
|
75
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.cts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":";;;;;;;;AA+DA;;;;iBAAgB,SAAA,CAAU,QAAgB;AAQ1C;;;;AAAoD;AAyBpD;AAzBA,iBAAgB,SAAA,CAAU,OAA0B,EAAjB,iBAAiB;;;;;;;;iBAyBpC,eAAA,CACd,QAAA,GAAW,kBAAA,EACX,IAAA,GAAO,IAAA,GACN,sBAAA;;;;;AAAsB;
|
|
1
|
+
{"version":3,"file":"logging.d.cts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":";;;;;;;;AA+DA;;;;iBAAgB,SAAA,CAAU,QAAgB;AAQ1C;;;;AAAoD;AAyBpD;AAzBA,iBAAgB,SAAA,CAAU,OAA0B,EAAjB,iBAAiB;;;;;;;;iBAyBpC,eAAA,CACd,QAAA,GAAW,kBAAA,EACX,IAAA,GAAO,IAAA,GACN,sBAAA;;;;;AAAsB;AAyFzB;cAAa,YAAA,GAAgB,IAAA,aAAe,aAO3C;;;AAAA;AAQD;;;cAAa,SAAA,GAAa,IAAY;AAAA;AAYtC;;;;AAA4C;AAZN,cAYzB,eAAA,GAAmB,IAAY;AAAA,cAM/B,UAAA,GAAc,IAAA,EAAM,OAAO,KAAK,IAAA;AAAA,iBAwC7B,eAAA,CAAgB,QAAA,EAAU,QAAA,EAAU,IAAA,EAAM,QAAQ;AAAA,iBAQlD,qBAAA,CACd,IAAA,EAAM,QAAA,EACN,QAAA,EAAU,sBAAA,EACV,QAAA,GAAU,WAAA;;;;;AAnDiC;AAwC7C;;cAuBa,WAAA,GAAe,IAAA,UAAc,OAAA,EAAS,YAAA,KAAe,KAiCjE;;;;;;;AAxDiE;cAkMrD,UAAA,GAAc,MAAA,EAAQ,MAAA,EAAQ,eAAA,EAAiB,MAAA,KAAS,MAAA;;;;;;;;cAuFxD,SAAA,GAAa,MAAA,EAAQ,MAAA,EAAQ,KAAA,EAAO,KAAA,KAAQ,MAAA;;;;;;;AA9QV;cAqZlC,gBAAA,GACX,MAAA,EAAQ,MAAA,EACR,YAAA,EAAc,YAAA,KACb,MAAA;AAAA,cAoEU,aAAA,EAAe,KAUzB;;;;;;;;cASU,YAAA,GACX,IAAA,sBACA,OAAA,EAAS,aAAA,EACT,QAAA,GAAU,KAAA,KACT,MAAA;AA5TH;;;;;;;AAAA,cAmXa,WAAA,GAAe,KAAA,EAAO,KAAA,EAAO,OAAA,EAAS,YAAA,KAAe,KAAA;;;;;;;AArSjE;cA2TY,YAAA,GACX,MAAA,EAAQ,MAAA,EACR,OAAA,EAAS,aAAA,KACR,MAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.mts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":";;;;;;;;AA+DA;;;;iBAAgB,SAAA,CAAU,QAAgB;AAQ1C;;;;AAAoD;AAyBpD;AAzBA,iBAAgB,SAAA,CAAU,OAA0B,EAAjB,iBAAiB;;;;;;;;iBAyBpC,eAAA,CACd,QAAA,GAAW,kBAAA,EACX,IAAA,GAAO,IAAA,GACN,sBAAA;;;;;AAAsB;
|
|
1
|
+
{"version":3,"file":"logging.d.mts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":";;;;;;;;AA+DA;;;;iBAAgB,SAAA,CAAU,QAAgB;AAQ1C;;;;AAAoD;AAyBpD;AAzBA,iBAAgB,SAAA,CAAU,OAA0B,EAAjB,iBAAiB;;;;;;;;iBAyBpC,eAAA,CACd,QAAA,GAAW,kBAAA,EACX,IAAA,GAAO,IAAA,GACN,sBAAA;;;;;AAAsB;A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7 @@ function resolveLogLevel(logLevel, mode) {
|
|
|
51
52
|
hooks: "silent",
|
|
52
53
|
env: "silent",
|
|
53
54
|
rpc: "silent",
|
|
55
|
+
schema: "silent",
|
|
54
56
|
config: "silent",
|
|
55
57
|
babel: "silent"
|
|
56
58
|
};
|
|
@@ -67,6 +69,7 @@ function resolveLogLevel(logLevel, mode) {
|
|
|
67
69
|
hooks: logLevel,
|
|
68
70
|
env: defaultLogLevel.env,
|
|
69
71
|
rpc: defaultLogLevel.rpc,
|
|
72
|
+
schema: defaultLogLevel.schema,
|
|
70
73
|
config: defaultLogLevel.config,
|
|
71
74
|
babel: logLevel
|
|
72
75
|
};
|
|
@@ -1 +1 @@
|
|
|
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 { getLogFn, getLogLevel } from \"@storm-software/config-tools/logger\";\nimport { getColor } from \"@storm-software/config-tools/utilities/colors\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\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 { RequiredKeys } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport chalk, { ChalkInstance } from \"chalk\";\nimport { defu } from \"defu\";\nimport { DEFAULT_ENVIRONMENT } from \"../constants/environments\";\nimport {\n DEFAULT_DEVELOPMENT_LOG_LEVEL,\n DEFAULT_PRODUCTION_LOG_LEVEL,\n DEFAULT_TEST_LOG_LEVEL,\n LOG_CATEGORIES_ARRAY,\n LOG_LEVELS,\n LogCategories,\n LogLevels\n} from \"../constants/log-level\";\nimport { Mode } from \"../types/config\";\nimport { UnresolvedContext } from \"../types/context\";\nimport type {\n CustomLogger,\n CustomLoggerMessage,\n LogCategory,\n LogFn,\n LogFnMeta,\n LogFnOptions,\n Logger,\n LoggerMessage,\n LoggerOptions,\n LogLevel,\n LogLevelResolvedConfig,\n LogLevelUserConfig,\n LogMeta\n} from \"../types/logging\";\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 communication: \"trace\",\n plugins: \"trace\",\n hooks: \"trace\",\n env: \"trace\",\n rpc: \"trace\",\n config: \"trace\",\n babel: \"trace\"\n };\n } else if (logLevel === \"silent\") {\n return {\n general: \"silent\",\n fs: \"silent\",\n performance: \"silent\",\n communication: \"silent\",\n plugins: \"silent\",\n hooks: \"silent\",\n env: \"silent\",\n rpc: \"silent\",\n config: \"silent\",\n babel: \"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 communication: defaultLogLevel.communication,\n plugins: logLevel,\n hooks: logLevel,\n env: defaultLogLevel.env,\n rpc: defaultLogLevel.rpc,\n config: defaultLogLevel.config,\n babel: logLevel\n };\n } else if (isSetObject(logLevel)) {\n if (\n Object.values(logLevel).filter(level => isSetString(level)).length ===\n LOG_CATEGORIES_ARRAY.length\n ) {\n return logLevel as LogLevelResolvedConfig;\n }\n\n return defu(logLevel, defaultLogLevel) as LogLevelResolvedConfig;\n }\n\n return defaultLogLevel;\n}\n\nconst colors = [\n chalk.green,\n chalk.greenBright,\n chalk.red,\n chalk.redBright,\n chalk.cyan,\n chalk.cyanBright,\n chalk.yellow,\n chalk.yellowBright,\n chalk.magenta,\n chalk.magentaBright\n] as const;\n\nconst BRAND_COLOR = getColor(\"brand\");\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const getTextColor = (text: string): ChalkInstance => {\n let code = 0;\n for (let i = 0; i < text.length; ++i) {\n code += text.charCodeAt(i);\n }\n\n return colors[code % colors.length] ?? chalk.cyanBright;\n};\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const colorText = (text: string): string => {\n const title = titleCase(text);\n\n return getTextColor(title)(title);\n};\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const colorBackground = (text: string): string => {\n const title = titleCase(text);\n\n return chalk.inverse(getTextColor(title)(` ${title} `));\n};\n\nexport const consoleLog = (meta: LogMeta, ...args: string[]) =>\n getLogFn(\n getLogLevel(\n meta.category === LogCategories.PERFORMANCE ? \"performance\" : meta.type\n ),\n {\n logLevel: \"all\"\n }\n )(\n `${meta.name ? chalk.bold.hex(BRAND_COLOR)(kebabCase(meta.name)) : \"\"}${meta.name ? chalk.grey(\" > \") : \"\"}${\n meta.command\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.command)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.environment && kebabCase(meta.environment) !== DEFAULT_ENVIRONMENT\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.environment)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.plugin\n ? `${chalk.bold.hex(BRAND_COLOR)(meta.plugin)}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.source\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.source)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.category &&\n meta.category !== LogCategories.GENERAL &&\n meta.category !== LogCategories.PERFORMANCE\n ? `${colorBackground(kebabCase(meta.category))} `\n : \"\"\n }${args.join(\" \")} `.trim()\n );\n\nexport function isValidLogLevel(logLevel: LogLevel, type: LogLevel): boolean {\n if (logLevel === LogLevels.SILENT) {\n return false;\n }\n\n return LOG_LEVELS.indexOf(logLevel) >= LOG_LEVELS.indexOf(type);\n}\n\nexport function isValidLogLevelConfig(\n type: LogLevel,\n logLevel: LogLevelResolvedConfig,\n category: LogCategory = LogCategories.GENERAL\n): boolean {\n return isValidLogLevel(logLevel[category], type);\n}\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param name - The name of the logging function.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.\n * @returns A logging function.\n */\nexport const createLogFn = (name: string, options: LogFnOptions): LogFn => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (meta: LogFnMeta | LogLevel, ...args: string[]) => {\n const logMeta = isSetObject(meta)\n ? {\n logId: uuid(),\n timestamp: Date.now(),\n category: LogCategories.GENERAL,\n ...options,\n ...meta,\n name\n }\n : {\n logId: uuid(),\n timestamp: Date.now(),\n category: LogCategories.GENERAL,\n ...options,\n type: meta,\n name\n };\n\n if (\n logMeta.$$ipc ||\n isValidLogLevelConfig(\n logMeta.type,\n logLevel,\n logMeta.category ? logMeta.category : LogCategories.GENERAL\n )\n ) {\n consoleLog(logMeta, ...args);\n }\n };\n};\n\nconst validateLogger = (\n type: LogLevel,\n name: string | undefined,\n options: LoggerOptions,\n callback: (message: LoggerMessage) => void\n) => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (message: string | LoggerMessage | Error) => {\n const params = isSetString(message)\n ? {\n name,\n plugin: options.plugin,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...options\n },\n message\n }\n : message instanceof Error || message.error\n ? {\n name,\n plugin: options.plugin,\n message: `${\n (message instanceof Error ? message : message.error)?.message\n ? (message instanceof Error ? message : message.error)?.name\n ? `[${\n (message instanceof Error ? message : message.error)?.name\n }]: ${message.message || (message instanceof Error ? message : message.error)?.message}`\n : message.message ||\n (message instanceof Error ? message : message.error)\n ?.message\n : message.message\n ? message.message\n : JSON.stringify(message)\n }${\n (message instanceof Error ? message : message.error)?.stack\n ? `\nStack Trace: ${(message instanceof Error ? message : message.error)?.stack}`\n : \"\"\n }`,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...options\n }\n }\n : {\n name,\n plugin: options.plugin,\n ...message,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n plugin: message.plugin,\n ...options,\n ...message.meta\n }\n };\n\n if (\n params.meta.$$ipc ||\n isValidLogLevelConfig(type, logLevel, params.meta.category)\n ) {\n callback(params);\n }\n };\n};\n\nconst validateCustomLogger = (\n type: LogLevel,\n name: string | undefined,\n options: LoggerOptions,\n callback?: (message: string | LoggerMessage) => void,\n customCallback?: (message: CustomLoggerMessage) => void\n) => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (message: string | LoggerMessage) => {\n const params = isSetString(message)\n ? {\n name,\n plugin: options.plugin,\n meta: {\n category: LogCategories.GENERAL,\n ...options,\n type,\n name,\n logId: uuid(),\n timestamp: Date.now()\n },\n message\n }\n : {\n name,\n plugin: options.plugin,\n ...message,\n meta: {\n category: LogCategories.GENERAL,\n ...options,\n type,\n name,\n logId: uuid(),\n timestamp: Date.now(),\n plugin: message.plugin,\n ...message.meta\n }\n };\n\n if (\n params.meta.$$ipc ||\n isValidLogLevelConfig(type, logLevel, params.meta.category)\n ) {\n callback?.(params);\n customCallback?.(params);\n }\n };\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param secondaryLogger - The custom logger to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logger's methods, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withLogger = (logger: Logger, secondaryLogger: Logger): Logger => {\n const options = { ...secondaryLogger.options, ...logger.options };\n\n const result = {\n options,\n error: validateLogger(\n \"error\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.error?.(message);\n secondaryLogger.error?.(message);\n }\n ),\n warn: validateLogger(\n \"warn\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.warn?.(message);\n secondaryLogger.warn?.(message);\n }\n ),\n info: validateLogger(\n \"info\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.info?.(message);\n secondaryLogger.info?.(message);\n }\n ),\n debug: validateLogger(\n \"debug\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.debug?.(message);\n secondaryLogger.debug?.(message);\n }\n ),\n trace: validateLogger(\n \"trace\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.trace?.(message);\n secondaryLogger.trace?.(message);\n }\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param logFn - The custom logging function to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logging function, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withLogFn = (logger: Logger, logFn: LogFn): Logger => {\n const result = {\n options: logger.options,\n error: validateLogger(\n \"error\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.error?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"error\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n warn: validateLogger(\n \"warn\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.warn?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"warn\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n info: validateLogger(\n \"info\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.info?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"info\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n debug: validateLogger(\n \"debug\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.debug?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"debug\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n trace: validateLogger(\n \"trace\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.trace?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"trace\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param customLogger - The custom logger to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logger's methods, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withCustomLogger = (\n logger: Logger,\n customLogger: CustomLogger\n): Logger => {\n const result = {\n options: logger.options,\n error: validateCustomLogger(\n \"error\",\n logger.options.name,\n logger.options,\n logger.error.bind(logger),\n customLogger.error?.bind(customLogger)\n ),\n warn: validateCustomLogger(\n \"warn\",\n logger.options.name,\n logger.options,\n logger.warn.bind(logger),\n customLogger.warn?.bind(customLogger)\n ),\n info: validateCustomLogger(\n \"info\",\n logger.options.name,\n logger.options,\n logger.info.bind(logger),\n customLogger.info?.bind(customLogger)\n ),\n debug: validateCustomLogger(\n \"debug\",\n logger.options.name,\n logger.options,\n logger.debug.bind(logger),\n customLogger.debug?.bind(customLogger)\n ),\n trace: validateCustomLogger(\n \"trace\",\n logger.options.name,\n logger.options,\n logger.trace.bind(logger),\n customLogger.trace?.bind(customLogger)\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\nexport const consoleLogger: LogFn = (meta: LogFnMeta, message: string) =>\n consoleLog(\n {\n type: isSetString(meta) ? meta : meta.type,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...(isSetObject(meta) ? meta : {})\n },\n message\n );\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param name - The name of the logging function.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.\n * @returns A logging function.\n */\nexport const createLogger = (\n name: string | undefined,\n options: LoggerOptions,\n callback: LogFn = consoleLogger\n): Logger => {\n const result = {\n options: { name, ...options },\n error: validateLogger(\"error\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"error\" }, data.message)\n ),\n warn: validateLogger(\"warn\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"warn\" }, data.message)\n ),\n info: validateLogger(\"info\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"info\" }, data.message)\n ),\n debug: validateLogger(\"debug\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"debug\" }, data.message)\n ),\n trace: validateLogger(\"trace\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"trace\" }, data.message)\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Extend a logging function with a specific name, adding a colored badge to the log output.\n *\n * @param logFn - The original logging function to extend.\n * @param options - The overlay metadata to use for the badge in the log output.\n * @returns A new logging function that includes the badge in its output.\n */\nexport const extendLogFn = (logFn: LogFn, options: LogFnOptions): LogFn => {\n return (meta, ...args) =>\n options.source || options.category\n ? logFn(\n isSetObject(meta)\n ? { ...options, ...meta }\n : { ...options, type: meta },\n `${colorBackground(String(options.source || options.category))} ${args\n .filter(Boolean)\n .map(arg => String(arg).trim())\n .join(\" \")} `\n )\n : logFn(meta, ...args);\n};\n\n/**\n * Extend a logger with a specific name and options, adding a colored badge to the log output for each log message generated by the logger.\n *\n * @param logger - The original logger to extend.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the extended logger.\n * @returns A new logger that includes the badge in its output for each log message.\n */\nexport const extendLogger = (\n logger: Logger,\n options: LoggerOptions\n): Logger => {\n const opts = { ...logger.options, ...options } as RequiredKeys<\n LoggerOptions,\n \"name\"\n >;\n\n const result = {\n options: opts,\n error: validateLogger(\"error\", opts.name, opts, logger.error.bind(logger)),\n warn: validateLogger(\"warn\", opts.name, opts, logger.warn.bind(logger)),\n info: validateLogger(\"info\", opts.name, opts, logger.info.bind(logger)),\n debug: validateLogger(\"debug\", opts.name, opts, logger.debug.bind(logger)),\n trace: validateLogger(\"trace\", opts.name, opts, logger.trace.bind(logger))\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+EA,SAAgB,UACd,mBACS;CACT,MAAM,QAAQ,SAAS,iBAAiB,IACpC,oBACA,kBAAkB,OAAO;CAE7B,OAAO,UAAU,WAAW,UAAU;AACxC;;;;;;;;AASA,SAAgB,gBACd,UACA,MACwB;CACxB,IAAI,aAAa,SACf,OAAO;EACL,SAAS;EACT,IAAI;EACJ,aAAa;EACb,eAAe;EACf,SAAS;EACT,OAAO;EACP,KAAK;EACL,KAAK;EACL,QAAQ;EACR,OAAO;CACT;MACK,IAAI,aAAa,UACtB,OAAO;EACL,SAAS;EACT,IAAI;EACJ,aAAa;EACb,eAAe;EACf,SAAS;EACT,OAAO;EACP,KAAK;EACL,KAAK;EACL,QAAQ;EACR,OAAO;CACT;CAGF,IAAI;CACJ,IAAI,SAAS,eACX,kBAAkB;MACb,IAAI,SAAS,QAClB,kBAAkB;MAElB,kBAAkB;CAGpB,IAAI,YAAY,QAAQ,GACtB,OAAO;EACL,SAAS;EACT,IAAI,gBAAgB;EACpB,aAAa;EACb,eAAe,gBAAgB;EAC/B,SAAS;EACT,OAAO;EACP,KAAK,gBAAgB;EACrB,KAAK,gBAAgB;EACrB,QAAQ,gBAAgB;EACxB,OAAO;CACT;MACK,IAAI,YAAY,QAAQ,GAAG;EAChC,IACE,OAAO,OAAO,QAAQ,CAAC,CAAC,QAAO,UAAS,YAAY,KAAK,CAAC,CAAC,CAAC,WAC5D,qBAAqB,QAErB,OAAO;EAGT,OAAOA,OAAK,UAAU,eAAe;CACvC;CAEA,OAAO;AACT;AAEA,MAAM,SAAS;CACb,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;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B;GACF,KAAK,UACH;GACF;IACE,OAAO,KAAK,OAAO;IACnB;EACJ;CACF;CAEA,OAAO;AACT"}
|
|
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 { getLogFn, getLogLevel } from \"@storm-software/config-tools/logger\";\nimport { getColor } from \"@storm-software/config-tools/utilities/colors\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\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 { RequiredKeys } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport chalk, { ChalkInstance } from \"chalk\";\nimport { defu } from \"defu\";\nimport { DEFAULT_ENVIRONMENT } from \"../constants/environments\";\nimport {\n DEFAULT_DEVELOPMENT_LOG_LEVEL,\n DEFAULT_PRODUCTION_LOG_LEVEL,\n DEFAULT_TEST_LOG_LEVEL,\n LOG_CATEGORIES_ARRAY,\n LOG_LEVELS,\n LogCategories,\n LogLevels\n} from \"../constants/log-level\";\nimport { Mode } from \"../types/config\";\nimport { UnresolvedContext } from \"../types/context\";\nimport type {\n CustomLogger,\n CustomLoggerMessage,\n LogCategory,\n LogFn,\n LogFnMeta,\n LogFnOptions,\n Logger,\n LoggerMessage,\n LoggerOptions,\n LogLevel,\n LogLevelResolvedConfig,\n LogLevelUserConfig,\n LogMeta\n} from \"../types/logging\";\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 communication: \"trace\",\n plugins: \"trace\",\n hooks: \"trace\",\n env: \"trace\",\n rpc: \"trace\",\n schema: \"trace\",\n config: \"trace\",\n babel: \"trace\"\n };\n } else if (logLevel === \"silent\") {\n return {\n general: \"silent\",\n fs: \"silent\",\n performance: \"silent\",\n communication: \"silent\",\n plugins: \"silent\",\n hooks: \"silent\",\n env: \"silent\",\n rpc: \"silent\",\n schema: \"silent\",\n config: \"silent\",\n babel: \"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 communication: defaultLogLevel.communication,\n plugins: logLevel,\n hooks: logLevel,\n env: defaultLogLevel.env,\n rpc: defaultLogLevel.rpc,\n schema: defaultLogLevel.schema,\n config: defaultLogLevel.config,\n babel: logLevel\n };\n } else if (isSetObject(logLevel)) {\n if (\n Object.values(logLevel).filter(level => isSetString(level)).length ===\n LOG_CATEGORIES_ARRAY.length\n ) {\n return logLevel as LogLevelResolvedConfig;\n }\n\n return defu(logLevel, defaultLogLevel) as LogLevelResolvedConfig;\n }\n\n return defaultLogLevel;\n}\n\nconst colors = [\n chalk.green,\n chalk.greenBright,\n chalk.red,\n chalk.redBright,\n chalk.cyan,\n chalk.cyanBright,\n chalk.yellow,\n chalk.yellowBright,\n chalk.magenta,\n chalk.magentaBright\n] as const;\n\nconst BRAND_COLOR = getColor(\"brand\");\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const getTextColor = (text: string): ChalkInstance => {\n let code = 0;\n for (let i = 0; i < text.length; ++i) {\n code += text.charCodeAt(i);\n }\n\n return colors[code % colors.length] ?? chalk.cyanBright;\n};\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const colorText = (text: string): string => {\n const title = titleCase(text);\n\n return getTextColor(title)(title);\n};\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const colorBackground = (text: string): string => {\n const title = titleCase(text);\n\n return chalk.inverse(getTextColor(title)(` ${title} `));\n};\n\nexport const consoleLog = (meta: LogMeta, ...args: string[]) =>\n getLogFn(\n getLogLevel(\n meta.category === LogCategories.PERFORMANCE ? \"performance\" : meta.type\n ),\n {\n logLevel: \"all\"\n }\n )(\n `${meta.name ? chalk.bold.hex(BRAND_COLOR)(kebabCase(meta.name)) : \"\"}${meta.name ? chalk.grey(\" > \") : \"\"}${\n meta.command\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.command)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.environment && kebabCase(meta.environment) !== DEFAULT_ENVIRONMENT\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.environment)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.plugin\n ? `${chalk.bold.hex(BRAND_COLOR)(meta.plugin)}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.source\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.source)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.category &&\n meta.category !== LogCategories.GENERAL &&\n meta.category !== LogCategories.PERFORMANCE\n ? `${colorBackground(kebabCase(meta.category))} `\n : \"\"\n }${args.join(\" \")} `.trim()\n );\n\nexport function isValidLogLevel(logLevel: LogLevel, type: LogLevel): boolean {\n if (logLevel === LogLevels.SILENT) {\n return false;\n }\n\n return LOG_LEVELS.indexOf(logLevel) >= LOG_LEVELS.indexOf(type);\n}\n\nexport function isValidLogLevelConfig(\n type: LogLevel,\n logLevel: LogLevelResolvedConfig,\n category: LogCategory = LogCategories.GENERAL\n): boolean {\n return isValidLogLevel(logLevel[category], type);\n}\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param name - The name of the logging function.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.\n * @returns A logging function.\n */\nexport const createLogFn = (name: string, options: LogFnOptions): LogFn => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (meta: LogFnMeta | LogLevel, ...args: string[]) => {\n const logMeta = isSetObject(meta)\n ? {\n logId: uuid(),\n timestamp: Date.now(),\n category: LogCategories.GENERAL,\n ...options,\n ...meta,\n name\n }\n : {\n logId: uuid(),\n timestamp: Date.now(),\n category: LogCategories.GENERAL,\n ...options,\n type: meta,\n name\n };\n\n if (\n logMeta.$$ipc ||\n isValidLogLevelConfig(\n logMeta.type,\n logLevel,\n logMeta.category ? logMeta.category : LogCategories.GENERAL\n )\n ) {\n consoleLog(logMeta, ...args);\n }\n };\n};\n\nconst validateLogger = (\n type: LogLevel,\n name: string | undefined,\n options: LoggerOptions,\n callback: (message: LoggerMessage) => void\n) => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (message: string | LoggerMessage | Error) => {\n const params = isSetString(message)\n ? {\n name,\n plugin: options.plugin,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...options\n },\n message\n }\n : message instanceof Error || message.error\n ? {\n name,\n plugin: options.plugin,\n message: `${\n (message instanceof Error ? message : message.error)?.message\n ? (message instanceof Error ? message : message.error)?.name\n ? `[${\n (message instanceof Error ? message : message.error)?.name\n }]: ${message.message || (message instanceof Error ? message : message.error)?.message}`\n : message.message ||\n (message instanceof Error ? message : message.error)\n ?.message\n : message.message\n ? message.message\n : JSON.stringify(message)\n }${\n (message instanceof Error ? message : message.error)?.stack\n ? `\nStack Trace: ${(message instanceof Error ? message : message.error)?.stack}`\n : \"\"\n }`,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...options\n }\n }\n : {\n name,\n plugin: options.plugin,\n ...message,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n plugin: message.plugin,\n ...options,\n ...message.meta\n }\n };\n\n if (\n params.meta.$$ipc ||\n isValidLogLevelConfig(type, logLevel, params.meta.category)\n ) {\n callback(params);\n }\n };\n};\n\nconst validateCustomLogger = (\n type: LogLevel,\n name: string | undefined,\n options: LoggerOptions,\n callback?: (message: string | LoggerMessage) => void,\n customCallback?: (message: CustomLoggerMessage) => void\n) => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (message: string | LoggerMessage) => {\n const params = isSetString(message)\n ? {\n name,\n plugin: options.plugin,\n meta: {\n category: LogCategories.GENERAL,\n ...options,\n type,\n name,\n logId: uuid(),\n timestamp: Date.now()\n },\n message\n }\n : {\n name,\n plugin: options.plugin,\n ...message,\n meta: {\n category: LogCategories.GENERAL,\n ...options,\n type,\n name,\n logId: uuid(),\n timestamp: Date.now(),\n plugin: message.plugin,\n ...message.meta\n }\n };\n\n if (\n params.meta.$$ipc ||\n isValidLogLevelConfig(type, logLevel, params.meta.category)\n ) {\n callback?.(params);\n customCallback?.(params);\n }\n };\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param secondaryLogger - The custom logger to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logger's methods, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withLogger = (logger: Logger, secondaryLogger: Logger): Logger => {\n const options = { ...secondaryLogger.options, ...logger.options };\n\n const result = {\n options,\n error: validateLogger(\n \"error\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.error?.(message);\n secondaryLogger.error?.(message);\n }\n ),\n warn: validateLogger(\n \"warn\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.warn?.(message);\n secondaryLogger.warn?.(message);\n }\n ),\n info: validateLogger(\n \"info\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.info?.(message);\n secondaryLogger.info?.(message);\n }\n ),\n debug: validateLogger(\n \"debug\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.debug?.(message);\n secondaryLogger.debug?.(message);\n }\n ),\n trace: validateLogger(\n \"trace\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.trace?.(message);\n secondaryLogger.trace?.(message);\n }\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param logFn - The custom logging function to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logging function, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withLogFn = (logger: Logger, logFn: LogFn): Logger => {\n const result = {\n options: logger.options,\n error: validateLogger(\n \"error\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.error?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"error\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n warn: validateLogger(\n \"warn\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.warn?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"warn\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n info: validateLogger(\n \"info\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.info?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"info\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n debug: validateLogger(\n \"debug\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.debug?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"debug\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n trace: validateLogger(\n \"trace\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.trace?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"trace\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param customLogger - The custom logger to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logger's methods, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withCustomLogger = (\n logger: Logger,\n customLogger: CustomLogger\n): Logger => {\n const result = {\n options: logger.options,\n error: validateCustomLogger(\n \"error\",\n logger.options.name,\n logger.options,\n logger.error.bind(logger),\n customLogger.error?.bind(customLogger)\n ),\n warn: validateCustomLogger(\n \"warn\",\n logger.options.name,\n logger.options,\n logger.warn.bind(logger),\n customLogger.warn?.bind(customLogger)\n ),\n info: validateCustomLogger(\n \"info\",\n logger.options.name,\n logger.options,\n logger.info.bind(logger),\n customLogger.info?.bind(customLogger)\n ),\n debug: validateCustomLogger(\n \"debug\",\n logger.options.name,\n logger.options,\n logger.debug.bind(logger),\n customLogger.debug?.bind(customLogger)\n ),\n trace: validateCustomLogger(\n \"trace\",\n logger.options.name,\n logger.options,\n logger.trace.bind(logger),\n customLogger.trace?.bind(customLogger)\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\nexport const consoleLogger: LogFn = (meta: LogFnMeta, message: string) =>\n consoleLog(\n {\n type: isSetString(meta) ? meta : meta.type,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...(isSetObject(meta) ? meta : {})\n },\n message\n );\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param name - The name of the logging function.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.\n * @returns A logging function.\n */\nexport const createLogger = (\n name: string | undefined,\n options: LoggerOptions,\n callback: LogFn = consoleLogger\n): Logger => {\n const result = {\n options: { name, ...options },\n error: validateLogger(\"error\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"error\" }, data.message)\n ),\n warn: validateLogger(\"warn\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"warn\" }, data.message)\n ),\n info: validateLogger(\"info\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"info\" }, data.message)\n ),\n debug: validateLogger(\"debug\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"debug\" }, data.message)\n ),\n trace: validateLogger(\"trace\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"trace\" }, data.message)\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Extend a logging function with a specific name, adding a colored badge to the log output.\n *\n * @param logFn - The original logging function to extend.\n * @param options - The overlay metadata to use for the badge in the log output.\n * @returns A new logging function that includes the badge in its output.\n */\nexport const extendLogFn = (logFn: LogFn, options: LogFnOptions): LogFn => {\n return (meta, ...args) =>\n options.source || options.category\n ? logFn(\n isSetObject(meta)\n ? { ...options, ...meta }\n : { ...options, type: meta },\n `${colorBackground(String(options.source || options.category))} ${args\n .filter(Boolean)\n .map(arg => String(arg).trim())\n .join(\" \")} `\n )\n : logFn(meta, ...args);\n};\n\n/**\n * Extend a logger with a specific name and options, adding a colored badge to the log output for each log message generated by the logger.\n *\n * @param logger - The original logger to extend.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the extended logger.\n * @returns A new logger that includes the badge in its output for each log message.\n */\nexport const extendLogger = (\n logger: Logger,\n options: LoggerOptions\n): Logger => {\n const opts = { ...logger.options, ...options } as RequiredKeys<\n LoggerOptions,\n \"name\"\n >;\n\n const result = {\n options: opts,\n error: validateLogger(\"error\", opts.name, opts, logger.error.bind(logger)),\n warn: validateLogger(\"warn\", opts.name, opts, logger.warn.bind(logger)),\n info: validateLogger(\"info\", opts.name, opts, logger.info.bind(logger)),\n debug: validateLogger(\"debug\", opts.name, opts, logger.debug.bind(logger)),\n trace: validateLogger(\"trace\", opts.name, opts, logger.trace.bind(logger))\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+EA,SAAgB,UACd,mBACS;CACT,MAAM,QAAQ,SAAS,iBAAiB,IACpC,oBACA,kBAAkB,OAAO;CAE7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S,MAAM;CAAK,GAC7B,GAAG,gBAAgB,OAAO,QAAQ,UAAU,QAAQ,QAAQ,CAAC,EAAE,GAAG,KAC/D,OAAO,OAAO,CAAC,CACf,KAAI,QAAO,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAC9B,KAAK,GAAG,EAAE,EACf,IACA,MAAM,MAAM,GAAG,IAAI;AAC3B;;;;;;;;AASA,MAAa,gBACX,QACA,YACW;CACX,MAAM,OAAO;EAAE,GAAG,OAAO;EAAS,GAAG;CAAQ;CAK7C,MAAM,SAAS;EACb,SAAS;EACT,OAAO,eAAe,SAAS,KAAK,MAAM,MAAM,OAAO,MAAM,KAAK,MAAM,CAAC;EACzE,MAAM,eAAe,QAAQ,KAAK,MAAM,MAAM,OAAO,KAAK,KAAK,MAAM,CAAC;EACtE,MAAM,eAAe,QAAQ,KAAK,MAAM,MAAM,OAAO,KAAK,KAAK,MAAM,CAAC;EACtE,OAAO,eAAe,SAAS,KAAK,MAAM,MAAM,OAAO,MAAM,KAAK,MAAM,CAAC;EACzE,OAAO,eAAe,SAAS,KAAK,MAAM,MAAM,OAAO,MAAM,KAAK,MAAM,CAAC;CAC3E;CAEA,OAAO,OAAO,MAAgB,YAAoC;EAChE,QAAQ,MAAR;GACE,KAAK;IACH,OAAO,MAAM,OAAO;IACpB;GACF,KAAK;IACH,OAAO,KAAK,OAAO;IACnB;GACF,KAAK;IACH,OAAO,KAAK,OAAO;IACnB;GACF,KAAK;IACH,OAAO,MAAM,OAAO;IACpB;GACF,KAAK;IACH,OAAO,MAAM,OAAO;IACpB;GACF,KAAK,UACH;GACF;IACE,OAAO,KAAK,OAAO;IACnB;EACJ;CACF;CAEA,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/core",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.47",
|
|
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",
|
|
@@ -375,5 +375,5 @@
|
|
|
375
375
|
"undici-types": "^7.27.0"
|
|
376
376
|
},
|
|
377
377
|
"publishConfig": { "access": "public" },
|
|
378
|
-
"gitHead": "
|
|
378
|
+
"gitHead": "30ba301952db7af53c07d369bd22f650e5ca9c45"
|
|
379
379
|
}
|