@powerlines/engine 0.44.9 → 0.44.11
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/_internal/worker.cjs +136 -61
- package/dist/_internal/worker.mjs +137 -62
- package/dist/_internal/worker.mjs.map +1 -1
- package/dist/api.cjs +5 -10
- package/dist/api.d.cts +3 -3
- package/dist/api.d.cts.map +1 -1
- package/dist/api.d.mts +3 -3
- package/dist/api.d.mts.map +1 -1
- package/dist/api.mjs +5 -10
- package/dist/api.mjs.map +1 -1
- package/dist/{base-context-fOM4ZWUo.mjs → base-context-C6yzgs6K.mjs} +50 -21
- package/dist/base-context-C6yzgs6K.mjs.map +1 -0
- package/dist/{base-context-CAA1druQ.cjs → base-context-trNQZNsX.cjs} +49 -20
- package/dist/context/index.cjs +3 -3
- package/dist/context/index.d.cts +50 -17
- package/dist/context/index.d.cts.map +1 -1
- package/dist/context/index.d.mts +50 -17
- package/dist/context/index.d.mts.map +1 -1
- package/dist/context/index.mjs +3 -3
- package/dist/{engine-context-BWGxMU_n.mjs → engine-context-C-11i43N.mjs} +2 -2
- package/dist/{engine-context-BWGxMU_n.mjs.map → engine-context-C-11i43N.mjs.map} +1 -1
- package/dist/{engine-context-CUPubmrM.cjs → engine-context-D1_U6xVC.cjs} +1 -1
- package/dist/{execution-context-BVn7D0Ax.cjs → execution-context-C-M-Mxse.cjs} +87 -42
- package/dist/{execution-context-UJPngOZR.mjs → execution-context-D9Enw3J5.mjs} +89 -44
- package/dist/execution-context-D9Enw3J5.mjs.map +1 -0
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/dist/base-context-fOM4ZWUo.mjs.map +0 -1
- package/dist/execution-context-UJPngOZR.mjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { resolvePackage } from "@stryke/fs/resolve";
|
|
2
2
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
3
|
-
import { isString } from "@stryke/type-checks/is-string";
|
|
4
3
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
5
4
|
import { loadUserConfigFile } from "@powerlines/core/lib/config";
|
|
6
5
|
import { resolveLogLevel } from "@powerlines/core/plugin-utils";
|
|
7
6
|
import { createLogger as createLogger$1, extendLogger } from "@powerlines/core/plugin-utils/logging";
|
|
7
|
+
import { tryGetWorkspaceConfig } from "@storm-software/config-tools/get-config";
|
|
8
|
+
import { isDevelopment, isProduction, isTest } from "@stryke/env/environment-checks";
|
|
8
9
|
import { getEnvPaths } from "@stryke/env/get-env-paths";
|
|
9
10
|
import { readJsonFile } from "@stryke/fs";
|
|
10
|
-
import { StormJSON } from "@stryke/json/storm-json";
|
|
11
11
|
import { joinPaths } from "@stryke/path";
|
|
12
12
|
import { appendPath } from "@stryke/path/append";
|
|
13
13
|
import { isEqual } from "@stryke/path/is-equal";
|
|
@@ -49,7 +49,6 @@ function createResolver(options) {
|
|
|
49
49
|
//#region src/context/base-context.ts
|
|
50
50
|
var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
51
51
|
#timestamp = Date.now();
|
|
52
|
-
#name = "powerlines";
|
|
53
52
|
/**
|
|
54
53
|
* The path to the Powerlines package
|
|
55
54
|
*/
|
|
@@ -74,10 +73,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
74
73
|
* The logger instance for the context, which can be used to create log messages with consistent formatting and metadata. This logger is extended by plugin contexts to include additional metadata such as the plugin name and category, which can be used to filter and format log messages in a more granular way.
|
|
75
74
|
*/
|
|
76
75
|
get logger() {
|
|
77
|
-
return this.createLogger({
|
|
78
|
-
...this.configFile.config,
|
|
79
|
-
...this.options
|
|
80
|
-
});
|
|
76
|
+
return this.createLogger({});
|
|
81
77
|
}
|
|
82
78
|
/**
|
|
83
79
|
* A timestamp representing when the context was initialized
|
|
@@ -117,7 +113,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
117
113
|
* @param message - The message to log.
|
|
118
114
|
*/
|
|
119
115
|
fatal(message) {
|
|
120
|
-
this.logger.error(
|
|
116
|
+
this.logger.error(message);
|
|
121
117
|
}
|
|
122
118
|
/**
|
|
123
119
|
* A logging function for error messages
|
|
@@ -125,7 +121,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
125
121
|
* @param message - The message to log.
|
|
126
122
|
*/
|
|
127
123
|
error(message) {
|
|
128
|
-
this.logger.error(
|
|
124
|
+
this.logger.error(message);
|
|
129
125
|
}
|
|
130
126
|
/**
|
|
131
127
|
* A logging function for warning messages
|
|
@@ -133,7 +129,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
133
129
|
* @param message - The message to log.
|
|
134
130
|
*/
|
|
135
131
|
warn(message) {
|
|
136
|
-
this.logger.warn(
|
|
132
|
+
this.logger.warn(message);
|
|
137
133
|
}
|
|
138
134
|
/**
|
|
139
135
|
* A logging function for informational messages
|
|
@@ -141,7 +137,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
141
137
|
* @param message - The message to log.
|
|
142
138
|
*/
|
|
143
139
|
info(message) {
|
|
144
|
-
this.logger.info(
|
|
140
|
+
this.logger.info(message);
|
|
145
141
|
}
|
|
146
142
|
/**
|
|
147
143
|
* A logging function for debug messages
|
|
@@ -149,7 +145,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
149
145
|
* @param message - The message to log.
|
|
150
146
|
*/
|
|
151
147
|
debug(message) {
|
|
152
|
-
this.logger.debug(
|
|
148
|
+
this.logger.debug(message);
|
|
153
149
|
}
|
|
154
150
|
/**
|
|
155
151
|
* A logging function for trace messages
|
|
@@ -157,7 +153,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
157
153
|
* @param message - The message to log.
|
|
158
154
|
*/
|
|
159
155
|
trace(message) {
|
|
160
|
-
this.logger.trace(
|
|
156
|
+
this.logger.trace(message);
|
|
161
157
|
}
|
|
162
158
|
/**
|
|
163
159
|
* A function to create a timer for measuring the duration of asynchronous operations
|
|
@@ -187,10 +183,15 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
187
183
|
* Create a new logger instance
|
|
188
184
|
*
|
|
189
185
|
* @param options - The configuration options to use for the logger instance, which can be used to customize the appearance and behavior of the log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance.
|
|
186
|
+
* @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.
|
|
190
187
|
* @returns A logger client instance that can be used to generate log messages with consistent formatting and metadata.
|
|
191
188
|
*/
|
|
192
|
-
createLogger(options,
|
|
193
|
-
return createLogger$1(this.options.name || this.options.root,
|
|
189
|
+
createLogger(options, logFn) {
|
|
190
|
+
return createLogger$1(this.options.name || this.options.root, {
|
|
191
|
+
...this.configFile.config,
|
|
192
|
+
...this.options,
|
|
193
|
+
...options
|
|
194
|
+
}, logFn);
|
|
194
195
|
}
|
|
195
196
|
/**
|
|
196
197
|
* Extend the base logger with additional configuration options
|
|
@@ -202,6 +203,35 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
202
203
|
return extendLogger(this.logger, options);
|
|
203
204
|
}
|
|
204
205
|
/**
|
|
206
|
+
* Retrieve the workspace configuration for the current project, if it exists. This function will look for a configuration file in the project root and return its contents as a JavaScript object. If no configuration file is found, it will return undefined.
|
|
207
|
+
*
|
|
208
|
+
* @returns A promise that resolves to the workspace configuration object, or undefined if no configuration file is found.
|
|
209
|
+
*/
|
|
210
|
+
async getWorkspaceConfig() {
|
|
211
|
+
return tryGetWorkspaceConfig(false, this.options || this.inputOptions ? {
|
|
212
|
+
cwd: this.options?.root || this.inputOptions?.root ? appendPath(this.options?.root || this.inputOptions?.root || ".", this.options?.cwd || this.inputOptions?.cwd) : void 0,
|
|
213
|
+
workspaceRoot: this.options?.cwd || this.inputOptions?.cwd
|
|
214
|
+
} : void 0);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Determine the default mode for the current execution based on the environment and workspace configuration. This function will check the `NODE_ENV` environment variable to determine if the current environment is development, production, or test. If `NODE_ENV` is not set, it will look for a `mode` property in the workspace configuration file. If no mode is specified in the workspace configuration, it will default to "production".
|
|
218
|
+
*
|
|
219
|
+
* @returns A promise that resolves to the default mode for the current execution, which can be "development", "production", or "test".
|
|
220
|
+
*/
|
|
221
|
+
async getDefaultMode() {
|
|
222
|
+
const workspaceConfig = await this.getWorkspaceConfig();
|
|
223
|
+
return isProduction ? "production" : isDevelopment ? "development" : isTest ? "test" : workspaceConfig?.mode || "production";
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Determine the default log level for the current execution based on the environment and workspace configuration. This function will check the `logLevel` property in the workspace configuration file and resolve it to a `LogLevelResolvedConfig` value. If no log level is specified in the workspace configuration, it will default to "info" for development mode and "warn" for production mode.
|
|
227
|
+
*
|
|
228
|
+
* @returns A promise that resolves to the default log level for the current execution, which can be "fatal", "error", "warn", "info", "debug", or "trace".
|
|
229
|
+
*/
|
|
230
|
+
async getDefaultLogLevel() {
|
|
231
|
+
const workspaceConfig = await this.getWorkspaceConfig();
|
|
232
|
+
return resolveLogLevel(workspaceConfig?.logLevel ? workspaceConfig.logLevel === "success" || workspaceConfig.logLevel === "performance" ? "info" : workspaceConfig.logLevel === "all" ? "debug" : workspaceConfig.logLevel === "fatal" ? "error" : workspaceConfig.logLevel : void 0, this.options?.mode || this.inputOptions?.mode || workspaceConfig?.mode || await this.getDefaultMode());
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
205
235
|
* Initialize the context with the provided configuration options
|
|
206
236
|
*
|
|
207
237
|
* @remarks
|
|
@@ -209,7 +239,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
209
239
|
*
|
|
210
240
|
* @param options - The configuration options to initialize the context with
|
|
211
241
|
*/
|
|
212
|
-
async init(options
|
|
242
|
+
async init(options) {
|
|
213
243
|
this.inputOptions = { ...options };
|
|
214
244
|
if (!this.powerlinesPath) {
|
|
215
245
|
const powerlinesPath = await resolvePackage("powerlines");
|
|
@@ -228,15 +258,14 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
228
258
|
organization: options.organization,
|
|
229
259
|
configFile: options.configFile
|
|
230
260
|
}, this.options ?? {}, {
|
|
231
|
-
mode:
|
|
232
|
-
|
|
261
|
+
mode: await this.getDefaultMode(),
|
|
262
|
+
logLevel: await this.getDefaultLogLevel()
|
|
233
263
|
});
|
|
234
264
|
this.resolver = createResolver({
|
|
235
265
|
workspaceRoot: cwd,
|
|
236
266
|
root,
|
|
237
267
|
cacheDir: this.envPaths.cache,
|
|
238
|
-
mode: this.options.mode
|
|
239
|
-
logLevel: this.logLevel
|
|
268
|
+
mode: this.options.mode
|
|
240
269
|
});
|
|
241
270
|
this.configFile = await loadUserConfigFile(this.options, this.resolver);
|
|
242
271
|
if (!this.options.name) {
|
|
@@ -269,4 +298,4 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
269
298
|
|
|
270
299
|
//#endregion
|
|
271
300
|
export { PowerlinesBaseContext as t };
|
|
272
|
-
//# sourceMappingURL=base-context-
|
|
301
|
+
//# sourceMappingURL=base-context-C6yzgs6K.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-context-C6yzgs6K.mjs","names":["joinPaths","#timestamp","createLogger"],"sources":["../src/_internal/helpers/resolver.ts","../src/context/base-context.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 type { ResolvedConfig, Resolver } from \"@powerlines/core\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport { JitiOptions, createJiti } from \"jiti\";\n\nexport type CreateResolverOptions = Omit<\n JitiOptions,\n \"fsCache\" | \"moduleCache\" | \"interopDefault\"\n> &\n Partial<Pick<ResolvedConfig, \"mode\" | \"skipCache\">> & {\n workspaceRoot: string;\n root: string;\n cacheDir: string;\n };\n\n/**\n * Create a Jiti resolver for the given workspace and project root.\n *\n * @param options - The options for creating the resolver.\n * @returns A Jiti instance configured for the specified workspace and project root.\n */\nfunction resolveOptions(options: CreateResolverOptions): JitiOptions {\n return defu(options, {\n interopDefault: true,\n fsCache:\n options.mode !== \"development\"\n ? joinPaths(options.cacheDir, \"jiti\")\n : false,\n moduleCache: options.mode !== \"development\"\n });\n}\n\n/**\n * Create a Jiti resolver for the given workspace and project root.\n *\n * @param options - The options for creating the resolver.\n * @returns A Jiti instance configured for the specified workspace and project root.\n */\nexport function createResolver(options: CreateResolverOptions): Resolver {\n const baseResolver = createJiti(\n joinPaths(options.workspaceRoot, options.root),\n resolveOptions(options)\n ) as Resolver;\n baseResolver.plugin = createJiti(\n joinPaths(options.workspaceRoot, options.root),\n resolveOptions(options)\n );\n\n return baseResolver;\n}\n","/* -------------------------------------------------------------------\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 type {\n BaseContext,\n EngineOptions,\n LogFn,\n Logger,\n LoggerOptions,\n LogLevelResolvedConfig,\n LogMessage,\n Mode,\n ParsedUserConfig,\n Resolver,\n WorkspaceConfig\n} from \"@powerlines/core\";\nimport { loadUserConfigFile } from \"@powerlines/core/lib/config\";\nimport { resolveLogLevel } from \"@powerlines/core/plugin-utils\";\nimport {\n createLogger,\n extendLogger\n} from \"@powerlines/core/plugin-utils/logging\";\nimport { tryGetWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport {\n isDevelopment,\n isProduction,\n isTest\n} from \"@stryke/env/environment-checks\";\nimport { EnvPaths, getEnvPaths } from \"@stryke/env/get-env-paths\";\nimport { readJsonFile } from \"@stryke/fs\";\nimport { resolvePackage } from \"@stryke/fs/resolve\";\nimport { joinPaths } from \"@stryke/path\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { isEqual } from \"@stryke/path/is-equal\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport chalk from \"chalk\";\nimport { formatDistanceToNowStrict } from \"date-fns/formatDistanceToNowStrict\";\nimport defu from \"defu\";\nimport { existsSync } from \"node:fs\";\nimport { UserConfig } from \"tsdown/config\";\nimport { createResolver } from \"../_internal/helpers/resolver\";\n\nexport class PowerlinesBaseContext implements BaseContext {\n #timestamp: number = Date.now();\n\n /**\n * The path to the Powerlines package\n */\n public powerlinesPath!: string;\n\n /**\n * The module resolver for the project\n */\n public resolver!: Resolver;\n\n /**\n * The options provided to the Powerlines process\n */\n public options!: EngineOptions;\n\n /**\n * The input options used to initialize the context, which may be used when cloning the context to ensure the same configuration is applied to the new context\n */\n public inputOptions: Partial<EngineOptions> = {};\n\n /**\n * The parsed configuration file for the project\n */\n public configFile!: ParsedUserConfig;\n\n /**\n * The logger instance for the context, which can be used to create log messages with consistent formatting and metadata. This logger is extended by plugin contexts to include additional metadata such as the plugin name and category, which can be used to filter and format log messages in a more granular way.\n */\n public get logger(): Logger {\n return this.createLogger({});\n }\n\n /**\n * A timestamp representing when the context was initialized\n */\n public get timestamp(): number {\n return this.#timestamp;\n }\n\n public get logLevel(): LogLevelResolvedConfig {\n return resolveLogLevel(this.options.logLevel, this.options.mode);\n }\n\n /**\n * The environment paths for the project\n */\n public get envPaths(): EnvPaths {\n return getEnvPaths({\n orgId: this.options.organization,\n appId: this.options.framework || \"powerlines\",\n workspaceRoot: this.options.cwd\n });\n }\n\n /**\n * Creates a clone of the current context with the same configuration and workspace settings. This can be useful for running multiple builds in parallel or for creating isolated contexts for different parts of the build process.\n *\n * @remarks\n * The cloned context will have the same configuration and workspace settings as the original context, but will have a different build ID, release ID, and timestamp. The virtual file system and caches will also be separate between the original and cloned contexts.\n *\n * @returns A promise that resolves to the cloned context.\n */\n public async clone(): Promise<BaseContext> {\n const clone = new PowerlinesBaseContext();\n await clone.init(this.options);\n\n return clone;\n }\n\n /**\n * A logging function for fatal messages\n *\n * @param message - The message to log.\n */\n public fatal(message: string | LogMessage) {\n this.logger.error(message);\n }\n\n /**\n * A logging function for error messages\n *\n * @param message - The message to log.\n */\n public error(message: string | LogMessage) {\n this.logger.error(message);\n }\n\n /**\n * A logging function for warning messages\n *\n * @param message - The message to log.\n */\n public warn(message: string | LogMessage) {\n this.logger.warn(message);\n }\n\n /**\n * A logging function for informational messages\n *\n * @param message - The message to log.\n */\n public info(message: string | LogMessage) {\n this.logger.info(message);\n }\n\n /**\n * A logging function for debug messages\n *\n * @param message - The message to log.\n */\n public debug(message: string | LogMessage) {\n this.logger.debug(message);\n }\n\n /**\n * A logging function for trace messages\n *\n * @param message - The message to log.\n */\n public trace(message: string | LogMessage) {\n this.logger.trace(message);\n }\n\n /**\n * A function to create a timer for measuring the duration of asynchronous operations\n *\n * @example\n * ```ts\n * const stopTimer = context.timer(\"Your Async Operation\");\n * await performAsyncOperation();\n * stopTimer(); // \"Your Async Operation completed in 123.45 milliseconds\"\n * ```\n *\n * @param name - The name of the timer.\n * @returns A function that, when called, stops the timer and logs the duration.\n */\n public timer(name: string): () => void {\n const startDate = Date.now();\n const startDuration = performance.now();\n\n return () => {\n const duration = performance.now() - startDuration;\n this.logger.info({\n meta: {\n category: \"performance\"\n },\n message: `${chalk.bold.cyanBright(name)} completed in ${chalk.bold.cyanBright(\n duration < 1000\n ? `${duration.toFixed(2)} milliseconds`\n : formatDistanceToNowStrict(startDate)\n )}`\n });\n };\n }\n\n /**\n * Create a new logger instance\n *\n * @param options - The configuration options to use for the logger instance, which can be used to customize the appearance and behavior of the log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance.\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 logger client instance that can be used to generate log messages with consistent formatting and metadata.\n */\n public createLogger(options: LoggerOptions, logFn?: LogFn): Logger {\n return createLogger(\n this.options.name || this.options.root,\n { ...this.configFile.config, ...this.options, ...options },\n logFn\n );\n }\n\n /**\n * Extend the base logger with additional configuration options\n *\n * @param options - The configuration options to extend the base logger with, which can be used to add additional metadata or customize the appearance of log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance, as well as any additional metadata such as the plugin category or environment.\n * @returns A new logger client instance that extends the base logger with the provided configuration options.\n */\n public extendLogger(options: LoggerOptions): Logger {\n return extendLogger(this.logger, options);\n }\n\n /**\n * Retrieve the workspace configuration for the current project, if it exists. This function will look for a configuration file in the project root and return its contents as a JavaScript object. If no configuration file is found, it will return undefined.\n *\n * @returns A promise that resolves to the workspace configuration object, or undefined if no configuration file is found.\n */\n protected async getWorkspaceConfig(): Promise<WorkspaceConfig | undefined> {\n return tryGetWorkspaceConfig(\n false,\n this.options || this.inputOptions\n ? {\n cwd:\n this.options?.root || this.inputOptions?.root\n ? appendPath(\n this.options?.root || this.inputOptions?.root || \".\",\n this.options?.cwd || this.inputOptions?.cwd\n )\n : undefined,\n workspaceRoot: this.options?.cwd || this.inputOptions?.cwd\n }\n : undefined\n );\n }\n\n /**\n * Determine the default mode for the current execution based on the environment and workspace configuration. This function will check the `NODE_ENV` environment variable to determine if the current environment is development, production, or test. If `NODE_ENV` is not set, it will look for a `mode` property in the workspace configuration file. If no mode is specified in the workspace configuration, it will default to \"production\".\n *\n * @returns A promise that resolves to the default mode for the current execution, which can be \"development\", \"production\", or \"test\".\n */\n protected async getDefaultMode(): Promise<Mode> {\n const workspaceConfig = await this.getWorkspaceConfig();\n\n return isProduction\n ? \"production\"\n : isDevelopment\n ? \"development\"\n : isTest\n ? \"test\"\n : workspaceConfig?.mode || \"production\";\n }\n\n /**\n * Determine the default log level for the current execution based on the environment and workspace configuration. This function will check the `logLevel` property in the workspace configuration file and resolve it to a `LogLevelResolvedConfig` value. If no log level is specified in the workspace configuration, it will default to \"info\" for development mode and \"warn\" for production mode.\n *\n * @returns A promise that resolves to the default log level for the current execution, which can be \"fatal\", \"error\", \"warn\", \"info\", \"debug\", or \"trace\".\n */\n protected async getDefaultLogLevel(): Promise<LogLevelResolvedConfig> {\n const workspaceConfig = await this.getWorkspaceConfig();\n\n return resolveLogLevel(\n workspaceConfig?.logLevel\n ? workspaceConfig.logLevel === \"success\" ||\n workspaceConfig.logLevel === \"performance\"\n ? \"info\"\n : workspaceConfig.logLevel === \"all\"\n ? \"debug\"\n : workspaceConfig.logLevel === \"fatal\"\n ? \"error\"\n : workspaceConfig.logLevel\n : undefined,\n this.options?.mode ||\n this.inputOptions?.mode ||\n workspaceConfig?.mode ||\n (await this.getDefaultMode())\n );\n }\n\n /**\n * Initialize the context with the provided configuration options\n *\n * @remarks\n * This method will set up the resolver and load the user configuration file based on the provided options. It is called during the construction of the context and can also be called when cloning the context to ensure that the new context has the same configuration and resolver setup.\n *\n * @param options - The configuration options to initialize the context with\n */\n protected async init(options: EngineOptions) {\n this.inputOptions = { ...options };\n\n if (!this.powerlinesPath) {\n const powerlinesPath = await resolvePackage(\"powerlines\");\n if (!powerlinesPath) {\n throw new Error(\"Could not resolve `powerlines` package location.\");\n }\n this.powerlinesPath = powerlinesPath;\n }\n\n const cwd = options.cwd || this.options?.cwd || process.cwd();\n const root = replacePath(\n (options.root || this.options?.root) &&\n (options.root || this.options.root).replace(/^\\.\\/?/, \"\") &&\n !isEqual(options.root || this.options.root, cwd)\n ? options.root || this.options.root\n : \".\",\n cwd\n );\n\n this.options = defu(\n {\n name: options.name,\n root,\n cwd,\n mode: options.mode,\n logLevel: options.logLevel,\n framework: options.framework,\n organization: options.organization,\n configFile: options.configFile\n },\n this.options ?? {},\n {\n mode: await this.getDefaultMode(),\n logLevel: await this.getDefaultLogLevel()\n }\n );\n\n this.resolver = createResolver({\n workspaceRoot: cwd,\n root,\n cacheDir: this.envPaths.cache,\n mode: this.options.mode\n });\n\n this.configFile = await loadUserConfigFile(this.options, this.resolver);\n if (!this.options.name) {\n if (this.configFile.config) {\n if (\n isSetObject(this.configFile.config) &&\n isSetString((this.configFile.config as UserConfig).name)\n ) {\n this.options.name = (this.configFile.config as UserConfig).name;\n } else if (Array.isArray(this.configFile.config)) {\n for (const config of this.configFile.config) {\n if (\n isSetObject(config) &&\n isSetString((config as UserConfig).name)\n ) {\n this.options.name = (config as UserConfig).name;\n break;\n }\n }\n }\n }\n\n if (!this.options.name) {\n const packageJsonPath = joinPaths(\n appendPath(this.options.root, this.options.cwd),\n \"package.json\"\n );\n if (existsSync(packageJsonPath)) {\n const packageJson = await readJsonFile(packageJsonPath);\n this.options.name = packageJson.name;\n }\n\n if (!this.options.name) {\n const projectJsonPath = joinPaths(\n appendPath(this.options.root, this.options.cwd),\n \"project.json\"\n );\n if (existsSync(projectJsonPath)) {\n const projectJson = await readJsonFile(projectJsonPath);\n this.options.name = projectJson.name;\n }\n }\n }\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,SAAS,eAAe,SAA6C;AACnE,QAAO,KAAK,SAAS;EACnB,gBAAgB;EAChB,SACE,QAAQ,SAAS,gBACbA,YAAU,QAAQ,UAAU,OAAO,GACnC;EACN,aAAa,QAAQ,SAAS;EAC/B,CAAC;;;;;;;;AASJ,SAAgB,eAAe,SAA0C;CACvE,MAAM,eAAe,WACnBA,YAAU,QAAQ,eAAe,QAAQ,KAAK,EAC9C,eAA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CAAC,KAAK,QAAQ,MAAM;IACtB,MAAM,kBAAkB,UACtB,WAAW,KAAK,QAAQ,MAAM,KAAK,QAAQ,IAAI,EAC/C,eACD;AACD,QAAI,WAAW,gBAAgB,EAAE;KAC/B,MAAM,cAAc,MAAM,aAAa,gBAAgB;AACvD,UAAK,QAAQ,OAAO,YAAY;;AAGlC,QAAI,CAAC,KAAK,QAAQ,MAAM;KACtB,MAAM,kBAAkB,UACtB,WAAW,KAAK,QAAQ,MAAM,KAAK,QAAQ,IAAI,EAC/C,eACD;AACD,SAAI,WAAW,gBAAgB,EAAE;MAC/B,MAAM,cAAc,MAAM,aAAa,gBAAgB;AACvD,WAAK,QAAQ,OAAO,YAAY"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-C0xms8kb.cjs');
|
|
2
2
|
let _stryke_fs_resolve = require("@stryke/fs/resolve");
|
|
3
3
|
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
4
|
-
let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
5
4
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
6
5
|
let _powerlines_core_lib_config = require("@powerlines/core/lib/config");
|
|
7
6
|
let _powerlines_core_plugin_utils = require("@powerlines/core/plugin-utils");
|
|
8
7
|
let _powerlines_core_plugin_utils_logging = require("@powerlines/core/plugin-utils/logging");
|
|
8
|
+
let _storm_software_config_tools_get_config = require("@storm-software/config-tools/get-config");
|
|
9
|
+
let _stryke_env_environment_checks = require("@stryke/env/environment-checks");
|
|
9
10
|
let _stryke_env_get_env_paths = require("@stryke/env/get-env-paths");
|
|
10
11
|
let _stryke_fs = require("@stryke/fs");
|
|
11
|
-
let _stryke_json_storm_json = require("@stryke/json/storm-json");
|
|
12
12
|
let _stryke_path = require("@stryke/path");
|
|
13
13
|
let _stryke_path_append = require("@stryke/path/append");
|
|
14
14
|
let _stryke_path_is_equal = require("@stryke/path/is-equal");
|
|
@@ -52,7 +52,6 @@ function createResolver(options) {
|
|
|
52
52
|
//#region src/context/base-context.ts
|
|
53
53
|
var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
54
54
|
#timestamp = Date.now();
|
|
55
|
-
#name = "powerlines";
|
|
56
55
|
/**
|
|
57
56
|
* The path to the Powerlines package
|
|
58
57
|
*/
|
|
@@ -77,10 +76,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
77
76
|
* The logger instance for the context, which can be used to create log messages with consistent formatting and metadata. This logger is extended by plugin contexts to include additional metadata such as the plugin name and category, which can be used to filter and format log messages in a more granular way.
|
|
78
77
|
*/
|
|
79
78
|
get logger() {
|
|
80
|
-
return this.createLogger({
|
|
81
|
-
...this.configFile.config,
|
|
82
|
-
...this.options
|
|
83
|
-
});
|
|
79
|
+
return this.createLogger({});
|
|
84
80
|
}
|
|
85
81
|
/**
|
|
86
82
|
* A timestamp representing when the context was initialized
|
|
@@ -120,7 +116,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
120
116
|
* @param message - The message to log.
|
|
121
117
|
*/
|
|
122
118
|
fatal(message) {
|
|
123
|
-
this.logger.error(
|
|
119
|
+
this.logger.error(message);
|
|
124
120
|
}
|
|
125
121
|
/**
|
|
126
122
|
* A logging function for error messages
|
|
@@ -128,7 +124,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
128
124
|
* @param message - The message to log.
|
|
129
125
|
*/
|
|
130
126
|
error(message) {
|
|
131
|
-
this.logger.error(
|
|
127
|
+
this.logger.error(message);
|
|
132
128
|
}
|
|
133
129
|
/**
|
|
134
130
|
* A logging function for warning messages
|
|
@@ -136,7 +132,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
136
132
|
* @param message - The message to log.
|
|
137
133
|
*/
|
|
138
134
|
warn(message) {
|
|
139
|
-
this.logger.warn(
|
|
135
|
+
this.logger.warn(message);
|
|
140
136
|
}
|
|
141
137
|
/**
|
|
142
138
|
* A logging function for informational messages
|
|
@@ -144,7 +140,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
144
140
|
* @param message - The message to log.
|
|
145
141
|
*/
|
|
146
142
|
info(message) {
|
|
147
|
-
this.logger.info(
|
|
143
|
+
this.logger.info(message);
|
|
148
144
|
}
|
|
149
145
|
/**
|
|
150
146
|
* A logging function for debug messages
|
|
@@ -152,7 +148,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
152
148
|
* @param message - The message to log.
|
|
153
149
|
*/
|
|
154
150
|
debug(message) {
|
|
155
|
-
this.logger.debug(
|
|
151
|
+
this.logger.debug(message);
|
|
156
152
|
}
|
|
157
153
|
/**
|
|
158
154
|
* A logging function for trace messages
|
|
@@ -160,7 +156,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
160
156
|
* @param message - The message to log.
|
|
161
157
|
*/
|
|
162
158
|
trace(message) {
|
|
163
|
-
this.logger.trace(
|
|
159
|
+
this.logger.trace(message);
|
|
164
160
|
}
|
|
165
161
|
/**
|
|
166
162
|
* A function to create a timer for measuring the duration of asynchronous operations
|
|
@@ -190,10 +186,15 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
190
186
|
* Create a new logger instance
|
|
191
187
|
*
|
|
192
188
|
* @param options - The configuration options to use for the logger instance, which can be used to customize the appearance and behavior of the log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance.
|
|
189
|
+
* @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.
|
|
193
190
|
* @returns A logger client instance that can be used to generate log messages with consistent formatting and metadata.
|
|
194
191
|
*/
|
|
195
|
-
createLogger(options,
|
|
196
|
-
return (0, _powerlines_core_plugin_utils_logging.createLogger)(this.options.name || this.options.root,
|
|
192
|
+
createLogger(options, logFn) {
|
|
193
|
+
return (0, _powerlines_core_plugin_utils_logging.createLogger)(this.options.name || this.options.root, {
|
|
194
|
+
...this.configFile.config,
|
|
195
|
+
...this.options,
|
|
196
|
+
...options
|
|
197
|
+
}, logFn);
|
|
197
198
|
}
|
|
198
199
|
/**
|
|
199
200
|
* Extend the base logger with additional configuration options
|
|
@@ -205,6 +206,35 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
205
206
|
return (0, _powerlines_core_plugin_utils_logging.extendLogger)(this.logger, options);
|
|
206
207
|
}
|
|
207
208
|
/**
|
|
209
|
+
* Retrieve the workspace configuration for the current project, if it exists. This function will look for a configuration file in the project root and return its contents as a JavaScript object. If no configuration file is found, it will return undefined.
|
|
210
|
+
*
|
|
211
|
+
* @returns A promise that resolves to the workspace configuration object, or undefined if no configuration file is found.
|
|
212
|
+
*/
|
|
213
|
+
async getWorkspaceConfig() {
|
|
214
|
+
return (0, _storm_software_config_tools_get_config.tryGetWorkspaceConfig)(false, this.options || this.inputOptions ? {
|
|
215
|
+
cwd: this.options?.root || this.inputOptions?.root ? (0, _stryke_path_append.appendPath)(this.options?.root || this.inputOptions?.root || ".", this.options?.cwd || this.inputOptions?.cwd) : void 0,
|
|
216
|
+
workspaceRoot: this.options?.cwd || this.inputOptions?.cwd
|
|
217
|
+
} : void 0);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Determine the default mode for the current execution based on the environment and workspace configuration. This function will check the `NODE_ENV` environment variable to determine if the current environment is development, production, or test. If `NODE_ENV` is not set, it will look for a `mode` property in the workspace configuration file. If no mode is specified in the workspace configuration, it will default to "production".
|
|
221
|
+
*
|
|
222
|
+
* @returns A promise that resolves to the default mode for the current execution, which can be "development", "production", or "test".
|
|
223
|
+
*/
|
|
224
|
+
async getDefaultMode() {
|
|
225
|
+
const workspaceConfig = await this.getWorkspaceConfig();
|
|
226
|
+
return _stryke_env_environment_checks.isProduction ? "production" : _stryke_env_environment_checks.isDevelopment ? "development" : _stryke_env_environment_checks.isTest ? "test" : workspaceConfig?.mode || "production";
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Determine the default log level for the current execution based on the environment and workspace configuration. This function will check the `logLevel` property in the workspace configuration file and resolve it to a `LogLevelResolvedConfig` value. If no log level is specified in the workspace configuration, it will default to "info" for development mode and "warn" for production mode.
|
|
230
|
+
*
|
|
231
|
+
* @returns A promise that resolves to the default log level for the current execution, which can be "fatal", "error", "warn", "info", "debug", or "trace".
|
|
232
|
+
*/
|
|
233
|
+
async getDefaultLogLevel() {
|
|
234
|
+
const workspaceConfig = await this.getWorkspaceConfig();
|
|
235
|
+
return (0, _powerlines_core_plugin_utils.resolveLogLevel)(workspaceConfig?.logLevel ? workspaceConfig.logLevel === "success" || workspaceConfig.logLevel === "performance" ? "info" : workspaceConfig.logLevel === "all" ? "debug" : workspaceConfig.logLevel === "fatal" ? "error" : workspaceConfig.logLevel : void 0, this.options?.mode || this.inputOptions?.mode || workspaceConfig?.mode || await this.getDefaultMode());
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
208
238
|
* Initialize the context with the provided configuration options
|
|
209
239
|
*
|
|
210
240
|
* @remarks
|
|
@@ -212,7 +242,7 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
212
242
|
*
|
|
213
243
|
* @param options - The configuration options to initialize the context with
|
|
214
244
|
*/
|
|
215
|
-
async init(options
|
|
245
|
+
async init(options) {
|
|
216
246
|
this.inputOptions = { ...options };
|
|
217
247
|
if (!this.powerlinesPath) {
|
|
218
248
|
const powerlinesPath = await (0, _stryke_fs_resolve.resolvePackage)("powerlines");
|
|
@@ -231,15 +261,14 @@ var PowerlinesBaseContext = class PowerlinesBaseContext {
|
|
|
231
261
|
organization: options.organization,
|
|
232
262
|
configFile: options.configFile
|
|
233
263
|
}, this.options ?? {}, {
|
|
234
|
-
mode:
|
|
235
|
-
|
|
264
|
+
mode: await this.getDefaultMode(),
|
|
265
|
+
logLevel: await this.getDefaultLogLevel()
|
|
236
266
|
});
|
|
237
267
|
this.resolver = createResolver({
|
|
238
268
|
workspaceRoot: cwd,
|
|
239
269
|
root,
|
|
240
270
|
cacheDir: this.envPaths.cache,
|
|
241
|
-
mode: this.options.mode
|
|
242
|
-
logLevel: this.logLevel
|
|
271
|
+
mode: this.options.mode
|
|
243
272
|
});
|
|
244
273
|
this.configFile = await (0, _powerlines_core_lib_config.loadUserConfigFile)(this.options, this.resolver);
|
|
245
274
|
if (!this.options.name) {
|
package/dist/context/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_base_context = require('../base-context-
|
|
3
|
-
const require_engine_context = require('../engine-context-
|
|
4
|
-
const require_execution_context = require('../execution-context-
|
|
2
|
+
const require_base_context = require('../base-context-trNQZNsX.cjs');
|
|
3
|
+
const require_engine_context = require('../engine-context-D1_U6xVC.cjs');
|
|
4
|
+
const require_execution_context = require('../execution-context-C-M-Mxse.cjs');
|
|
5
5
|
|
|
6
6
|
exports.PowerlinesBaseContext = require_base_context.PowerlinesBaseContext;
|
|
7
7
|
exports.PowerlinesContext = require_execution_context.PowerlinesContext;
|
package/dist/context/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EngineOptions, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, ExecutionContext, ExecutionOptions, ExecutionState, FetchOptions, HooksList, InlineConfig, LogLevelResolvedConfig, LogMessage, Logger,
|
|
1
|
+
import { BaseContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EngineOptions, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, ExecutionContext, ExecutionOptions, ExecutionState, FetchOptions, HooksList, InlineConfig, LogFn, LogLevelResolvedConfig, LogMessage, Logger, LoggerOptions, MetaInfo, Mode, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, Plugin, PluginContext, ResolveOptions, ResolveResult, ResolvedConfig, ResolvedEntryTypeDefinition, Resolver, SelectHookResult, SelectHooksOptions, TransformResult, VirtualFile, VirtualFileSystemInterface, WorkspaceConfig } from "@powerlines/core";
|
|
2
2
|
import { EnvPaths } from "@stryke/env/get-env-paths";
|
|
3
3
|
import { Unstable_ContextInternal, Unstable_EnvironmentContext, Unstable_PluginContext } from "@powerlines/core/types/_internal";
|
|
4
4
|
import { PackageJson } from "@stryke/types/package-json";
|
|
@@ -21,7 +21,7 @@ declare class PowerlinesBaseContext implements BaseContext {
|
|
|
21
21
|
/**
|
|
22
22
|
* The options provided to the Powerlines process
|
|
23
23
|
*/
|
|
24
|
-
options:
|
|
24
|
+
options: EngineOptions;
|
|
25
25
|
/**
|
|
26
26
|
* The input options used to initialize the context, which may be used when cloning the context to ensure the same configuration is applied to the new context
|
|
27
27
|
*/
|
|
@@ -106,9 +106,10 @@ declare class PowerlinesBaseContext implements BaseContext {
|
|
|
106
106
|
* Create a new logger instance
|
|
107
107
|
*
|
|
108
108
|
* @param options - The configuration options to use for the logger instance, which can be used to customize the appearance and behavior of the log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance.
|
|
109
|
+
* @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.
|
|
109
110
|
* @returns A logger client instance that can be used to generate log messages with consistent formatting and metadata.
|
|
110
111
|
*/
|
|
111
|
-
createLogger(options: LoggerOptions,
|
|
112
|
+
createLogger(options: LoggerOptions, logFn?: LogFn): Logger;
|
|
112
113
|
/**
|
|
113
114
|
* Extend the base logger with additional configuration options
|
|
114
115
|
*
|
|
@@ -116,6 +117,24 @@ declare class PowerlinesBaseContext implements BaseContext {
|
|
|
116
117
|
* @returns A new logger client instance that extends the base logger with the provided configuration options.
|
|
117
118
|
*/
|
|
118
119
|
extendLogger(options: LoggerOptions): Logger;
|
|
120
|
+
/**
|
|
121
|
+
* Retrieve the workspace configuration for the current project, if it exists. This function will look for a configuration file in the project root and return its contents as a JavaScript object. If no configuration file is found, it will return undefined.
|
|
122
|
+
*
|
|
123
|
+
* @returns A promise that resolves to the workspace configuration object, or undefined if no configuration file is found.
|
|
124
|
+
*/
|
|
125
|
+
protected getWorkspaceConfig(): Promise<WorkspaceConfig | undefined>;
|
|
126
|
+
/**
|
|
127
|
+
* Determine the default mode for the current execution based on the environment and workspace configuration. This function will check the `NODE_ENV` environment variable to determine if the current environment is development, production, or test. If `NODE_ENV` is not set, it will look for a `mode` property in the workspace configuration file. If no mode is specified in the workspace configuration, it will default to "production".
|
|
128
|
+
*
|
|
129
|
+
* @returns A promise that resolves to the default mode for the current execution, which can be "development", "production", or "test".
|
|
130
|
+
*/
|
|
131
|
+
protected getDefaultMode(): Promise<Mode>;
|
|
132
|
+
/**
|
|
133
|
+
* Determine the default log level for the current execution based on the environment and workspace configuration. This function will check the `logLevel` property in the workspace configuration file and resolve it to a `LogLevelResolvedConfig` value. If no log level is specified in the workspace configuration, it will default to "info" for development mode and "warn" for production mode.
|
|
134
|
+
*
|
|
135
|
+
* @returns A promise that resolves to the default log level for the current execution, which can be "fatal", "error", "warn", "info", "debug", or "trace".
|
|
136
|
+
*/
|
|
137
|
+
protected getDefaultLogLevel(): Promise<LogLevelResolvedConfig>;
|
|
119
138
|
/**
|
|
120
139
|
* Initialize the context with the provided configuration options
|
|
121
140
|
*
|
|
@@ -124,7 +143,7 @@ declare class PowerlinesBaseContext implements BaseContext {
|
|
|
124
143
|
*
|
|
125
144
|
* @param options - The configuration options to initialize the context with
|
|
126
145
|
*/
|
|
127
|
-
protected init(options
|
|
146
|
+
protected init(options: EngineOptions): Promise<void>;
|
|
128
147
|
}
|
|
129
148
|
//#endregion
|
|
130
149
|
//#region src/context/context.d.ts
|
|
@@ -136,11 +155,11 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
136
155
|
* @param options - The options for resolving the context.
|
|
137
156
|
* @returns A promise that resolves to the new context.
|
|
138
157
|
*/
|
|
139
|
-
static fromOptions<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(options:
|
|
158
|
+
static fromOptions<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(options: ExecutionOptions): Promise<Context<TResolvedConfig>>;
|
|
140
159
|
/**
|
|
141
160
|
* The options provided to the Powerlines process
|
|
142
161
|
*/
|
|
143
|
-
options:
|
|
162
|
+
options: ExecutionOptions;
|
|
144
163
|
/**
|
|
145
164
|
* An object containing the dependencies that should be installed for the project
|
|
146
165
|
*/
|
|
@@ -259,9 +278,21 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
259
278
|
*/
|
|
260
279
|
get alias(): Record<string, string>;
|
|
261
280
|
/**
|
|
262
|
-
*
|
|
281
|
+
* Create a new logger instance
|
|
282
|
+
*
|
|
283
|
+
* @param options - The configuration options to use for the logger instance, which can be used to customize the appearance and behavior of the log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance.
|
|
284
|
+
* @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.
|
|
285
|
+
* @returns A logger client instance that can be used to generate log messages with consistent formatting and metadata.
|
|
263
286
|
*/
|
|
264
|
-
|
|
287
|
+
createLogger(options: LoggerOptions, logFn?: LogFn): Logger;
|
|
288
|
+
/**
|
|
289
|
+
* The log level for the context, which determines the minimum level of log messages that will be emitted by the logger. This is resolved based on the configuration options provided by the user, and can be set to different levels for development, production, and test environments. The log level can also be overridden by plugins or other parts of the build process to provide more granular control over logging output.
|
|
290
|
+
*/
|
|
291
|
+
get logLevel(): LogLevelResolvedConfig;
|
|
292
|
+
/**
|
|
293
|
+
* The environment paths for the project, which provide the locations of various directories and files used by the Powerlines framework. These paths are resolved based on the organization ID, application ID, and workspace root directory, and can be used to access configuration files, cache directories, and other resources in a consistent manner.
|
|
294
|
+
*/
|
|
295
|
+
get envPaths(): EnvPaths;
|
|
265
296
|
/**
|
|
266
297
|
* Gets the parser cache.
|
|
267
298
|
*/
|
|
@@ -279,7 +310,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
279
310
|
*
|
|
280
311
|
* @param options - The options to use for creating the context, including the resolved configuration and workspace settings.
|
|
281
312
|
*/
|
|
282
|
-
protected constructor(options:
|
|
313
|
+
protected constructor(options: ExecutionOptions);
|
|
283
314
|
/**
|
|
284
315
|
* Creates a clone of the current context with the same configuration and workspace settings. This can be useful for running multiple builds in parallel or for creating isolated contexts for different parts of the build process.
|
|
285
316
|
*
|
|
@@ -459,7 +490,7 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
459
490
|
*
|
|
460
491
|
* @param options - The configuration options to initialize the context with
|
|
461
492
|
*/
|
|
462
|
-
protected init(options
|
|
493
|
+
protected init(options: ExecutionOptions): Promise<void>;
|
|
463
494
|
/**
|
|
464
495
|
* Initialize the context with the provided configuration options
|
|
465
496
|
*/
|
|
@@ -494,7 +525,7 @@ declare class PowerlinesEnvironmentContext<TResolvedConfig extends ResolvedConfi
|
|
|
494
525
|
* @param config - The user configuration options.
|
|
495
526
|
* @returns A promise that resolves to the new context.
|
|
496
527
|
*/
|
|
497
|
-
static fromConfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(options:
|
|
528
|
+
static fromConfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(options: ExecutionOptions, config: TResolvedConfig, environment: EnvironmentResolvedConfig): Promise<PowerlinesEnvironmentContext<TResolvedConfig>>;
|
|
498
529
|
/**
|
|
499
530
|
* The resolved environment configuration
|
|
500
531
|
*/
|
|
@@ -515,9 +546,10 @@ declare class PowerlinesEnvironmentContext<TResolvedConfig extends ResolvedConfi
|
|
|
515
546
|
* Create a new logger instance
|
|
516
547
|
*
|
|
517
548
|
* @param options - The configuration options to use for the logger instance, which can be used to customize the appearance and behavior of the log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance.
|
|
549
|
+
* @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.
|
|
518
550
|
* @returns A logger client instance that can be used to generate log messages with consistent formatting and metadata.
|
|
519
551
|
*/
|
|
520
|
-
createLogger(options: LoggerOptions,
|
|
552
|
+
createLogger(options: LoggerOptions, logFn?: LogFn): Logger;
|
|
521
553
|
/**
|
|
522
554
|
* Extend the base logger with additional configuration options
|
|
523
555
|
*
|
|
@@ -543,7 +575,7 @@ declare class PowerlinesEnvironmentContext<TResolvedConfig extends ResolvedConfi
|
|
|
543
575
|
* Retrieves the hook handlers for a specific hook name
|
|
544
576
|
*/
|
|
545
577
|
selectHooks<TKey extends string>(key: TKey, options?: SelectHooksOptions): SelectHookResult<PluginContext<TResolvedConfig>, TKey>;
|
|
546
|
-
protected constructor(options:
|
|
578
|
+
protected constructor(options: ExecutionOptions, config: TResolvedConfig, environment: EnvironmentResolvedConfig);
|
|
547
579
|
/**
|
|
548
580
|
* Creates a clone of the current context with the same configuration and workspace settings. This can be useful for running multiple builds in parallel or for creating isolated contexts for different parts of the build process.
|
|
549
581
|
*
|
|
@@ -564,14 +596,14 @@ declare class PowerlinesExecutionContext<TResolvedConfig extends ResolvedConfig
|
|
|
564
596
|
* @param options - The options for resolving the context.
|
|
565
597
|
* @returns A promise that resolves to the new context.
|
|
566
598
|
*/
|
|
567
|
-
static fromOptions<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(options:
|
|
599
|
+
static fromOptions<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(options: ExecutionOptions): Promise<ExecutionContext<TResolvedConfig>>;
|
|
568
600
|
/**
|
|
569
601
|
* Create a new Storm context from the workspace root and user config.
|
|
570
602
|
*
|
|
571
603
|
* @param options - The options for resolving the context.
|
|
572
604
|
* @returns A promise that resolves to the new context.
|
|
573
605
|
*/
|
|
574
|
-
static fromConfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(options:
|
|
606
|
+
static fromConfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(options: ExecutionOptions, config: InlineConfig): Promise<ExecutionContext<TResolvedConfig>>;
|
|
575
607
|
/**
|
|
576
608
|
* Internal context fields and methods
|
|
577
609
|
*
|
|
@@ -604,14 +636,15 @@ declare class PowerlinesExecutionContext<TResolvedConfig extends ResolvedConfig
|
|
|
604
636
|
*
|
|
605
637
|
* @param options - The options to use for creating the context, including the resolved configuration and workspace settings.
|
|
606
638
|
*/
|
|
607
|
-
protected constructor(options:
|
|
639
|
+
protected constructor(options: ExecutionOptions);
|
|
608
640
|
/**
|
|
609
641
|
* Create a new logger instance
|
|
610
642
|
*
|
|
611
643
|
* @param options - The configuration options to use for the logger instance, which can be used to customize the appearance and behavior of the log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance.
|
|
644
|
+
* @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.
|
|
612
645
|
* @returns A logger client instance that can be used to generate log messages with consistent formatting and metadata.
|
|
613
646
|
*/
|
|
614
|
-
createLogger(options: LoggerOptions,
|
|
647
|
+
createLogger(options: LoggerOptions, logFn?: LogFn): Logger;
|
|
615
648
|
/**
|
|
616
649
|
* Extend the base logger with additional configuration options
|
|
617
650
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/context/base-context.ts","../../src/context/context.ts","../../src/context/engine-context.ts","../../src/context/environment-context.ts","../../src/context/execution-context.ts","../../src/context/plugin-context.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/context/base-context.ts","../../src/context/context.ts","../../src/context/engine-context.ts","../../src/context/environment-context.ts","../../src/context/execution-context.ts","../../src/context/plugin-context.ts"],"mappings":";;;;;;;;;;cA2Da,qBAAA,YAAiC,WAAA;EAAA;;;;EAMrC,cAAA;;;AANT;EAWS,QAAA,EAAW,QAAA;;;;EAKX,OAAA,EAAU,aAAA;EAKI;;;EAAd,YAAA,EAAc,OAAA,CAAQ,aAAA;EA4BN;;;EAvBhB,UAAA,EAAa,gBAAA;EA4DW;;;EAAA,IAvDpB,MAAA,CAAA,GAAU,MAAA;EA2FU;;;EAAA,IApFpB,SAAA,CAAA;EAAA,IAIA,QAAA,CAAA,GA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