@powerlines/core 0.15.5 → 0.15.6
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/context/execution-context.d.cts +1 -1
- package/dist/context/execution-context.d.cts.map +1 -1
- package/dist/context/execution-context.d.mts +1 -1
- package/dist/context/execution-context.d.mts.map +1 -1
- package/dist/context/execution-context.mjs.map +1 -1
- package/dist/lib/context-helpers.d.cts +2 -2
- package/dist/lib/context-helpers.d.cts.map +1 -1
- package/dist/lib/context-helpers.d.mts +2 -2
- package/dist/lib/context-helpers.d.mts.map +1 -1
- package/dist/lib/context-helpers.mjs.map +1 -1
- package/dist/types/context.d.cts +9 -1
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +9 -1
- package/dist/types/context.d.mts.map +1 -1
- package/package.json +2 -2
|
@@ -15,7 +15,7 @@ declare class PowerlinesExecutionContext<TResolvedConfig extends ResolvedConfig
|
|
|
15
15
|
* @param inlineConfig - The inline configuration for the context.
|
|
16
16
|
* @returns A promise that resolves to the new context.
|
|
17
17
|
*/
|
|
18
|
-
static from<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown>(options: ExecutionOptions, inlineConfig?: TResolvedConfig["inlineConfig"], system?: TSystemContext): Promise<
|
|
18
|
+
static from<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown>(options: ExecutionOptions, inlineConfig?: TResolvedConfig["inlineConfig"], system?: TSystemContext): Promise<ExecutionContext<TResolvedConfig, TSystemContext>>;
|
|
19
19
|
/**
|
|
20
20
|
* The unique identifier of the execution context, which can be used for logging and other purposes to distinguish between different executions in the same process.
|
|
21
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-context.d.cts","names":[],"sources":["../../src/context/execution-context.ts"],"mappings":";;;;;;;;cAkDa,0BAAA,yBACa,cAAA,GAAiB,cAAA,oCAGjC,iBAAA,CAAkB,eAAA,EAAiB,cAA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jC;;;;;;EAlFW,cAAA,CAAe,IAAA,YAAa,OAAA,CAAA,4BAAA,CAAA,eAAA,EAAA,cAAA;EAnPjC;;;;;;EAgTK,kBAAA,CACX,IAAA,YACC,OAAA,CACD,4BAAA,CAA6B,eAAA,EAAiB,cAAA;EArThD;;;;;;;;EAsUa,aAAA,CAAA,GAAiB,OAAA,CAC5B,4BAAA,CAA6B,eAAA,EAAiB,cAAA;EA7S9C;;;;;;;;EA2UW,kBAAA,CACX,MAAA,EAAQ,YAAA,CAAa,aAAA,CAAc,eAAA,EAAiB,cAAA,KAAgB,OAAA;AAAA"}
|
|
@@ -15,7 +15,7 @@ declare class PowerlinesExecutionContext<TResolvedConfig extends ResolvedConfig
|
|
|
15
15
|
* @param inlineConfig - The inline configuration for the context.
|
|
16
16
|
* @returns A promise that resolves to the new context.
|
|
17
17
|
*/
|
|
18
|
-
static from<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown>(options: ExecutionOptions, inlineConfig?: TResolvedConfig["inlineConfig"], system?: TSystemContext): Promise<
|
|
18
|
+
static from<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown>(options: ExecutionOptions, inlineConfig?: TResolvedConfig["inlineConfig"], system?: TSystemContext): Promise<ExecutionContext<TResolvedConfig, TSystemContext>>;
|
|
19
19
|
/**
|
|
20
20
|
* The unique identifier of the execution context, which can be used for logging and other purposes to distinguish between different executions in the same process.
|
|
21
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-context.d.mts","names":[],"sources":["../../src/context/execution-context.ts"],"mappings":";;;;;;;;cAkDa,0BAAA,yBACa,cAAA,GAAiB,cAAA,oCAGjC,iBAAA,CAAkB,eAAA,EAAiB,cAAA,aAChC,gBAAA,CAAiB,eAAA,EAAiB,cAAA;EAAA;;;;;AAL/C;;;SA2BsB,IAAA,yBACM,cAAA,GAAiB,cAAA,2BAAA,CAGzC,OAAA,EAAS,gBAAA,EACT,YAAA,G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AA6B,eAAA,EAAiB,cAAA;EArThD;;;;;;;;EAsUa,aAAA,CAAA,GAAiB,OAAA,CAC5B,4BAAA,CAA6B,eAAA,EAAiB,cAAA;EA7S9C;;;;;;;;EA2UW,kBAAA,CACX,MAAA,EAAQ,YAAA,CAAa,aAAA,CAAc,eAAA,EAAiB,cAAA,KAAgB,OAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-context.mjs","names":["#environments","#plugins"],"sources":["../../src/context/execution-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 { toArray } from \"@stryke/convert/to-array\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFile } from \"@stryke/fs/json\";\nimport { deepClone } from \"@stryke/helpers/deep-clone\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport { PackageJson } from \"@stryke/types/package-json\";\nimport chalk from \"chalk\";\nimport {\n DEFAULT_ENVIRONMENT,\n GLOBAL_ENVIRONMENT\n} from \"../constants/environments\";\nimport {\n createDefaultEnvironment,\n createEnvironment\n} from \"../lib/environment\";\nimport { resolvePlugins } from \"../lib/plugins\";\nimport type {\n EnvironmentResolvedConfig,\n ExecutionContext,\n ExecutionOptions,\n InferOverridableConfig,\n Logger,\n LoggerOptions,\n Plugin,\n PluginConfig,\n PluginContext,\n ResolvedConfig\n} from \"../types\";\nimport { PowerlinesContext } from \"./context\";\nimport { PowerlinesEnvironmentContext } from \"./environment-context\";\n\nexport class PowerlinesExecutionContext<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n>\n extends PowerlinesContext<TResolvedConfig, TSystemContext>\n implements ExecutionContext<TResolvedConfig, TSystemContext>\n{\n /**\n * A record of all environments by name\n */\n #environments: Record<\n string,\n PowerlinesEnvironmentContext<TResolvedConfig, TSystemContext>\n > = {};\n\n /**\n * The plugins added to this execution context, which may be used to track the plugins that have been added to the context and ensure that they are properly registered and executed during the build process. This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.\n */\n #plugins: Plugin<PluginContext<TResolvedConfig, TSystemContext>>[] = [];\n\n /**\n * Create a new Storm context from the workspace root and user config.\n *\n * @param options - The execution options to create the context with.\n * @param inlineConfig - The inline configuration for the context.\n * @returns A promise that resolves to the new context.\n */\n public static async from<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n >(\n options: ExecutionOptions,\n inlineConfig?: TResolvedConfig[\"inlineConfig\"],\n system?: TSystemContext\n ): Promise<PowerlinesExecutionContext<TResolvedConfig, TSystemContext>> {\n const context = new PowerlinesExecutionContext<\n TResolvedConfig,\n TSystemContext\n >(options);\n if (system) {\n context.system = system;\n }\n\n await context.init();\n\n if (inlineConfig) {\n await context.setInlineConfig(inlineConfig);\n }\n\n return context;\n }\n\n /**\n * The unique identifier of the execution context, which can be used for logging and other purposes to distinguish between different executions in the same process.\n */\n public get id(): string {\n return this.options.executionId;\n }\n\n /**\n * A record of all environments by name\n */\n public get environments(): Record<\n string,\n PowerlinesEnvironmentContext<TResolvedConfig, TSystemContext>\n > {\n return this.#environments;\n }\n\n public get plugins(): Array<\n Plugin<PluginContext<TResolvedConfig, TSystemContext>>\n > {\n return this.#plugins;\n }\n\n /**\n * Creates a new instance.\n *\n * @param options - The options to use for creating the context, including the resolved configuration and workspace settings.\n */\n protected constructor(options: ExecutionOptions) {\n super(options);\n }\n\n /**\n * A setter function to populate the inline config values provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed. This function can be used to update the context with the inline configuration values, which may be used during the configuration resolution process to ensure that the final configuration reflects both the user configuration and any inline configuration provided during execution.\n *\n * @param config - The inline configuration values to set.\n * @returns A promise that resolves when the inline configuration values have been set.\n */\n public override async setInlineConfig(\n config: TResolvedConfig[\"inlineConfig\"]\n ): Promise<void> {\n await super.setInlineConfig(config);\n if (this.inlineConfig.command === \"new\") {\n const workspacePackageJsonPath = joinPaths(this.cwd, \"package.json\");\n if (!existsSync(workspacePackageJsonPath)) {\n throw new Error(\n `The workspace package.json file could not be found at ${workspacePackageJsonPath}`\n );\n }\n\n this.packageJson = await readJsonFile<PackageJson>(\n workspacePackageJsonPath\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 * @returns A logger client instance that can be used to generate log messages with consistent formatting and metadata.\n */\n public override createLogger(options: LoggerOptions): Logger {\n return super.createLogger({\n ...options,\n executionId: this.id,\n configIndex: this.options.configIndex\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 override extendLogger(options: LoggerOptions): Logger {\n return super.extendLogger({\n ...options,\n executionId: this.id,\n configIndex: this.options.configIndex\n });\n }\n\n /**\n * A function to copy the context and update the fields for a specific environment\n *\n * @param environment - The environment configuration to use.\n * @returns A new context instance with the updated environment.\n */\n public async createEnvironment(\n environment: EnvironmentResolvedConfig<TResolvedConfig>[\"environment\"]\n ): Promise<PowerlinesEnvironmentContext<TResolvedConfig, TSystemContext>> {\n const context = await PowerlinesEnvironmentContext.from<\n TResolvedConfig,\n TSystemContext\n >(\n this,\n deepClone(this.options),\n deepClone(this.config) as TResolvedConfig,\n deepClone(this.overriddenConfig) as InferOverridableConfig<\n EnvironmentResolvedConfig<TResolvedConfig>\n >\n );\n\n context.tsconfig = this.tsconfig;\n context.system = this.system;\n\n context.dependencies = deepClone<typeof this.dependencies>(\n this.dependencies\n );\n context.devDependencies = deepClone<typeof this.devDependencies>(\n this.devDependencies\n );\n context.persistedMeta = deepClone<typeof this.persistedMeta>(\n this.persistedMeta\n );\n context.resolvePatterns = deepClone<typeof this.resolvePatterns>(\n this.resolvePatterns\n );\n\n context.powerlinesPath ??= this.powerlinesPath;\n context.resolver ??= this.resolver;\n\n await context.setEnvironmentConfig(\n deepClone(\n environment\n ) as EnvironmentResolvedConfig<TResolvedConfig>[\"environment\"]\n );\n\n context.plugins = [];\n for (const plugin of this.plugins) {\n await context.unstable_addPlugin(plugin);\n }\n\n for (const [key, value] of Object.entries(this)) {\n if (\n ![\n \"fs\",\n \"system\",\n \"options\",\n \"config\",\n \"inlineConfig\",\n \"userConfig\",\n \"pluginConfig\",\n \"overriddenConfig\",\n \"environmentConfig\",\n \"dependencies\",\n \"devDependencies\",\n \"persistedMeta\",\n \"packageJson\",\n \"projectJson\",\n \"tsconfig\",\n \"resolver\",\n \"plugins\",\n \"environments\"\n ].includes(key)\n ) {\n if (isObject(value) || Array.isArray(value)) {\n (context as any)[key] = deepClone(value);\n } else {\n (context as any)[key] = value;\n }\n }\n }\n\n return context;\n }\n\n /**\n * Update the context using a new inline configuration options\n */\n public override async resolveConfig() {\n await super.resolveConfig();\n\n await Promise.all(\n toArray(\n this.config.environments &&\n Object.keys(this.config.environments).length > 0\n ? Object.keys(this.config.environments).map(name =>\n createEnvironment(name, this.config)\n )\n : createDefaultEnvironment(this.config)\n ).map(async env => {\n this.#environments[env.name] = await this.createEnvironment(env);\n })\n );\n }\n\n /**\n * Get an environment by name, or the default environment if no name is provided\n *\n * @param name - The name of the environment to retrieve.\n * @returns The requested environment context.\n */\n public async getEnvironment(name?: string) {\n let environment:\n | PowerlinesEnvironmentContext<TResolvedConfig, TSystemContext>\n | undefined;\n if (name) {\n environment = this.environments[name];\n }\n\n if (Object.keys(this.environments).length === 1) {\n environment = this.environments[Object.keys(this.environments)[0]!];\n\n this.trace({\n meta: { category: \"plugins\" },\n message: `Applying the only configured environment: ${chalk.bold.cyanBright(\n environment?.config.environment?.name\n )}`\n });\n }\n\n if (!environment) {\n if (name) {\n throw new Error(`Environment \"${name}\" not found.`);\n }\n\n environment = await this.createEnvironment(\n createDefaultEnvironment(this.config)\n );\n\n // environment = await PowerlinesEnvironmentContext.from<TResolvedConfig>(\n // deepClone(this.options),\n // deepClone(this.config) as TResolvedConfig,\n // deepClone(this.overriddenConfig) as InferOverridableConfig<\n // EnvironmentResolvedConfig<TResolvedConfig>\n // >,\n // deepClone(\n // createDefaultEnvironment(this.config)\n // ) as EnvironmentResolvedConfig<TResolvedConfig>[\"environment\"]\n // );\n\n // environment.plugins = [];\n // for (const plugin of this.plugins) {\n // await environment.addPlugin(plugin);\n // }\n\n this.warn({\n meta: { category: \"plugins\" },\n message: `No environment specified, and no default environment found. Using a temporary default environment: ${chalk.bold.cyanBright(\n environment.config.environment?.name\n )}`\n });\n }\n\n return environment;\n }\n\n /**\n * A safe version of `getEnvironment` that returns `undefined` if the environment is not found\n *\n * @param name - The name of the environment to retrieve.\n * @returns The requested environment context or `undefined` if not found.\n */\n public async getEnvironmentSafe(\n name?: string\n ): Promise<\n PowerlinesEnvironmentContext<TResolvedConfig, TSystemContext> | undefined\n > {\n try {\n return await this.getEnvironment(name);\n } catch {\n return undefined;\n }\n }\n\n /**\n * A function to merge all configured environments into a single context.\n *\n * @remarks\n * If only one environment is configured, that environment will be returned directly.\n *\n * @returns A promise that resolves to a merged/global environment context.\n */\n public async toEnvironment(): Promise<\n PowerlinesEnvironmentContext<TResolvedConfig, TSystemContext>\n > {\n let environment: PowerlinesEnvironmentContext<\n TResolvedConfig,\n TSystemContext\n >;\n if (Object.keys(this.environments).length > 1) {\n environment = await this.createEnvironment(\n createEnvironment<TResolvedConfig>(GLOBAL_ENVIRONMENT, this.config)\n );\n\n this.debug({\n meta: { category: \"plugins\" },\n message: `Combined all ${Object.keys(this.environments).length} environments into a single global context.`\n });\n } else {\n environment = await this.getEnvironment();\n }\n\n return environment;\n }\n\n /**\n * A function used internally to add a plugin to the context and update the configuration options\n *\n * @danger\n * This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.\n *\n * @internal\n */\n public async unstable_addPlugin(\n plugin: PluginConfig<PluginContext<TResolvedConfig, TSystemContext>>\n ) {\n this.plugins.push(\n ...(await resolvePlugins<TResolvedConfig, TSystemContext>(this, plugin, {\n skipLogging:\n Object.keys(this.environments).filter(\n key => key !== DEFAULT_ENVIRONMENT && key !== GLOBAL_ENVIRONMENT\n ).length > 0\n }))\n );\n\n await Promise.all(\n Object.keys(this.environments).map(async name => {\n await this.environments[name]!.unstable_addPlugin(plugin);\n })\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAkDA,IAAa,6BAAb,MAAa,mCAIH,kBAEV;;;;CAIE,gBAGI,EAAE;;;;CAKN,WAAqE,EAAE;;;;;;;;CASvE,aAAoB,KAIlB,SACA,cACA,QACsE;EACtE,MAAM,UAAU,IAAI,2BAGlB,QAAQ;AACV,MAAI,OACF,SAAQ,SAAS;AAGnB,QAAM,QAAQ,MAAM;AAEpB,MAAI,aACF,OAAM,QAAQ,gBAAgB,aAAa;AAG7C,SAAO;;;;;CAMT,IAAW,KAAa;AACtB,SAAO,KAAK,QAAQ;;;;;CAMtB,IAAW,eAGT;AACA,SAAO,MAAKA;;CAGd,IAAW,UAET;AACA,SAAO,MAAKC;;;;;;;CAQd,AAAU,YAAY,SAA2B;AAC/C,QAAM,QAAQ;;;;;;;;CAShB,MAAsB,gBACpB,QACe;AACf,QAAM,MAAM,gBAAgB,OAAO;AACnC,MAAI,KAAK,aAAa,YAAY,OAAO;GACvC,MAAM,2BAA2B,UAAU,KAAK,KAAK,eAAe;AACpE,OAAI,CAAC,WAAW,yBAAyB,CACv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,aAAa,CAAC,OAAO;IAChE,CAAC;QAEF,eAAc,MAAM,KAAK,gBAAgB;AAG3C,SAAO;;;;;;;;;;CAWT,MAAa,mBACX,QACA;AACA,OAAK,QAAQ,KACX,GAAI,MAAM,eAAgD,MAAM,QAAQ,EACtE,aACE,OAAO,KAAK,KAAK,aAAa,CAAC,QAC7B,QAAO,qBAA+B,qBACvC,CAAC,SAAS,GACd,CAAC,CACH;AAED,QAAM,QAAQ,IACZ,OAAO,KAAK,KAAK,aAAa,CAAC,IAAI,OAAM,SAAQ;AAC/C,SAAM,KAAK,aAAa,MAAO,mBAAmB,OAAO;IACzD,CACH"}
|
|
1
|
+
{"version":3,"file":"execution-context.mjs","names":["#environments","#plugins"],"sources":["../../src/context/execution-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 { toArray } from \"@stryke/convert/to-array\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFile } from \"@stryke/fs/json\";\nimport { deepClone } from \"@stryke/helpers/deep-clone\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport { PackageJson } from \"@stryke/types/package-json\";\nimport chalk from \"chalk\";\nimport {\n DEFAULT_ENVIRONMENT,\n GLOBAL_ENVIRONMENT\n} from \"../constants/environments\";\nimport {\n createDefaultEnvironment,\n createEnvironment\n} from \"../lib/environment\";\nimport { resolvePlugins } from \"../lib/plugins\";\nimport type {\n EnvironmentResolvedConfig,\n ExecutionContext,\n ExecutionOptions,\n InferOverridableConfig,\n Logger,\n LoggerOptions,\n Plugin,\n PluginConfig,\n PluginContext,\n ResolvedConfig\n} from \"../types\";\nimport { PowerlinesContext } from \"./context\";\nimport { PowerlinesEnvironmentContext } from \"./environment-context\";\n\nexport class PowerlinesExecutionContext<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n>\n extends PowerlinesContext<TResolvedConfig, TSystemContext>\n implements ExecutionContext<TResolvedConfig, TSystemContext>\n{\n /**\n * A record of all environments by name\n */\n #environments: Record<\n string,\n PowerlinesEnvironmentContext<TResolvedConfig, TSystemContext>\n > = {};\n\n /**\n * The plugins added to this execution context, which may be used to track the plugins that have been added to the context and ensure that they are properly registered and executed during the build process. This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.\n */\n #plugins: Plugin<PluginContext<TResolvedConfig, TSystemContext>>[] = [];\n\n /**\n * Create a new Storm context from the workspace root and user config.\n *\n * @param options - The execution options to create the context with.\n * @param inlineConfig - The inline configuration for the context.\n * @returns A promise that resolves to the new context.\n */\n public static async from<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown\n >(\n options: ExecutionOptions,\n inlineConfig?: TResolvedConfig[\"inlineConfig\"],\n system?: TSystemContext\n ): Promise<ExecutionContext<TResolvedConfig, TSystemContext>> {\n const context = new PowerlinesExecutionContext<\n TResolvedConfig,\n TSystemContext\n >(options);\n if (system) {\n context.system = system;\n }\n\n await context.init();\n\n if (inlineConfig) {\n await context.setInlineConfig(inlineConfig);\n }\n\n return context;\n }\n\n /**\n * The unique identifier of the execution context, which can be used for logging and other purposes to distinguish between different executions in the same process.\n */\n public get id(): string {\n return this.options.executionId;\n }\n\n /**\n * A record of all environments by name\n */\n public get environments(): Record<\n string,\n PowerlinesEnvironmentContext<TResolvedConfig, TSystemContext>\n > {\n return this.#environments;\n }\n\n public get plugins(): Array<\n Plugin<PluginContext<TResolvedConfig, TSystemContext>>\n > {\n return this.#plugins;\n }\n\n /**\n * Creates a new instance.\n *\n * @param options - The options to use for creating the context, including the resolved configuration and workspace settings.\n */\n protected constructor(options: ExecutionOptions) {\n super(options);\n }\n\n /**\n * A setter function to populate the inline config values provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed. This function can be used to update the context with the inline configuration values, which may be used during the configuration resolution process to ensure that the final configuration reflects both the user configuration and any inline configuration provided during execution.\n *\n * @param config - The inline configuration values to set.\n * @returns A promise that resolves when the inline configuration values have been set.\n */\n public override async setInlineConfig(\n config: TResolvedConfig[\"inlineConfig\"]\n ): Promise<void> {\n await super.setInlineConfig(config);\n if (this.inlineConfig.command === \"new\") {\n const workspacePackageJsonPath = joinPaths(this.cwd, \"package.json\");\n if (!existsSync(workspacePackageJsonPath)) {\n throw new Error(\n `The workspace package.json file could not be found at ${workspacePackageJsonPath}`\n );\n }\n\n this.packageJson = await readJsonFile<PackageJson>(\n workspacePackageJsonPath\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 * @returns A logger client instance that can be used to generate log messages with consistent formatting and metadata.\n */\n public override createLogger(options: LoggerOptions): Logger {\n return super.createLogger({\n ...options,\n executionId: this.id,\n configIndex: this.options.configIndex\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 override extendLogger(options: LoggerOptions): Logger {\n return super.extendLogger({\n ...options,\n executionId: this.id,\n configIndex: this.options.configIndex\n });\n }\n\n /**\n * A function to copy the context and update the fields for a specific environment\n *\n * @param environment - The environment configuration to use.\n * @returns A new context instance with the updated environment.\n */\n public async createEnvironment(\n environment: EnvironmentResolvedConfig<TResolvedConfig>[\"environment\"]\n ): Promise<PowerlinesEnvironmentContext<TResolvedConfig, TSystemContext>> {\n const context = await PowerlinesEnvironmentContext.from<\n TResolvedConfig,\n TSystemContext\n >(\n this,\n deepClone(this.options),\n deepClone(this.config) as TResolvedConfig,\n deepClone(this.overriddenConfig) as InferOverridableConfig<\n EnvironmentResolvedConfig<TResolvedConfig>\n >\n );\n\n context.tsconfig = this.tsconfig;\n context.system = this.system;\n\n context.dependencies = deepClone<typeof this.dependencies>(\n this.dependencies\n );\n context.devDependencies = deepClone<typeof this.devDependencies>(\n this.devDependencies\n );\n context.persistedMeta = deepClone<typeof this.persistedMeta>(\n this.persistedMeta\n );\n context.resolvePatterns = deepClone<typeof this.resolvePatterns>(\n this.resolvePatterns\n );\n\n context.powerlinesPath ??= this.powerlinesPath;\n context.resolver ??= this.resolver;\n\n await context.setEnvironmentConfig(\n deepClone(\n environment\n ) as EnvironmentResolvedConfig<TResolvedConfig>[\"environment\"]\n );\n\n context.plugins = [];\n for (const plugin of this.plugins) {\n await context.unstable_addPlugin(plugin);\n }\n\n for (const [key, value] of Object.entries(this)) {\n if (\n ![\n \"fs\",\n \"system\",\n \"options\",\n \"config\",\n \"inlineConfig\",\n \"userConfig\",\n \"pluginConfig\",\n \"overriddenConfig\",\n \"environmentConfig\",\n \"dependencies\",\n \"devDependencies\",\n \"persistedMeta\",\n \"packageJson\",\n \"projectJson\",\n \"tsconfig\",\n \"resolver\",\n \"plugins\",\n \"environments\"\n ].includes(key)\n ) {\n if (isObject(value) || Array.isArray(value)) {\n (context as any)[key] = deepClone(value);\n } else {\n (context as any)[key] = value;\n }\n }\n }\n\n return context;\n }\n\n /**\n * Update the context using a new inline configuration options\n */\n public override async resolveConfig() {\n await super.resolveConfig();\n\n await Promise.all(\n toArray(\n this.config.environments &&\n Object.keys(this.config.environments).length > 0\n ? Object.keys(this.config.environments).map(name =>\n createEnvironment(name, this.config)\n )\n : createDefaultEnvironment(this.config)\n ).map(async env => {\n this.#environments[env.name] = await this.createEnvironment(env);\n })\n );\n }\n\n /**\n * Get an environment by name, or the default environment if no name is provided\n *\n * @param name - The name of the environment to retrieve.\n * @returns The requested environment context.\n */\n public async getEnvironment(name?: string) {\n let environment:\n | PowerlinesEnvironmentContext<TResolvedConfig, TSystemContext>\n | undefined;\n if (name) {\n environment = this.environments[name];\n }\n\n if (Object.keys(this.environments).length === 1) {\n environment = this.environments[Object.keys(this.environments)[0]!];\n\n this.trace({\n meta: { category: \"plugins\" },\n message: `Applying the only configured environment: ${chalk.bold.cyanBright(\n environment?.config.environment?.name\n )}`\n });\n }\n\n if (!environment) {\n if (name) {\n throw new Error(`Environment \"${name}\" not found.`);\n }\n\n environment = await this.createEnvironment(\n createDefaultEnvironment(this.config)\n );\n\n // environment = await PowerlinesEnvironmentContext.from<TResolvedConfig>(\n // deepClone(this.options),\n // deepClone(this.config) as TResolvedConfig,\n // deepClone(this.overriddenConfig) as InferOverridableConfig<\n // EnvironmentResolvedConfig<TResolvedConfig>\n // >,\n // deepClone(\n // createDefaultEnvironment(this.config)\n // ) as EnvironmentResolvedConfig<TResolvedConfig>[\"environment\"]\n // );\n\n // environment.plugins = [];\n // for (const plugin of this.plugins) {\n // await environment.addPlugin(plugin);\n // }\n\n this.warn({\n meta: { category: \"plugins\" },\n message: `No environment specified, and no default environment found. Using a temporary default environment: ${chalk.bold.cyanBright(\n environment.config.environment?.name\n )}`\n });\n }\n\n return environment;\n }\n\n /**\n * A safe version of `getEnvironment` that returns `undefined` if the environment is not found\n *\n * @param name - The name of the environment to retrieve.\n * @returns The requested environment context or `undefined` if not found.\n */\n public async getEnvironmentSafe(\n name?: string\n ): Promise<\n PowerlinesEnvironmentContext<TResolvedConfig, TSystemContext> | undefined\n > {\n try {\n return await this.getEnvironment(name);\n } catch {\n return undefined;\n }\n }\n\n /**\n * A function to merge all configured environments into a single context.\n *\n * @remarks\n * If only one environment is configured, that environment will be returned directly.\n *\n * @returns A promise that resolves to a merged/global environment context.\n */\n public async toEnvironment(): Promise<\n PowerlinesEnvironmentContext<TResolvedConfig, TSystemContext>\n > {\n let environment: PowerlinesEnvironmentContext<\n TResolvedConfig,\n TSystemContext\n >;\n if (Object.keys(this.environments).length > 1) {\n environment = await this.createEnvironment(\n createEnvironment<TResolvedConfig>(GLOBAL_ENVIRONMENT, this.config)\n );\n\n this.debug({\n meta: { category: \"plugins\" },\n message: `Combined all ${Object.keys(this.environments).length} environments into a single global context.`\n });\n } else {\n environment = await this.getEnvironment();\n }\n\n return environment;\n }\n\n /**\n * A function used internally to add a plugin to the context and update the configuration options\n *\n * @danger\n * This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.\n *\n * @internal\n */\n public async unstable_addPlugin(\n plugin: PluginConfig<PluginContext<TResolvedConfig, TSystemContext>>\n ) {\n this.plugins.push(\n ...(await resolvePlugins<TResolvedConfig, TSystemContext>(this, plugin, {\n skipLogging:\n Object.keys(this.environments).filter(\n key => key !== DEFAULT_ENVIRONMENT && key !== GLOBAL_ENVIRONMENT\n ).length > 0\n }))\n );\n\n await Promise.all(\n Object.keys(this.environments).map(async name => {\n await this.environments[name]!.unstable_addPlugin(plugin);\n })\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAkDA,IAAa,6BAAb,MAAa,mCAIH,kBAEV;;;;CAIE,gBAGI,EAAE;;;;CAKN,WAAqE,EAAE;;;;;;;;CASvE,aAAoB,KAIlB,SACA,cACA,QAC4D;EAC5D,MAAM,UAAU,IAAI,2BAGlB,QAAQ;AACV,MAAI,OACF,SAAQ,SAAS;AAGnB,QAAM,QAAQ,MAAM;AAEpB,MAAI,aACF,OAAM,QAAQ,gBAAgB,aAAa;AAG7C,SAAO;;;;;CAMT,IAAW,KAAa;AACtB,SAAO,KAAK,QAAQ;;;;;CAMtB,IAAW,eAGT;AACA,SAAO,MAAKA;;CAGd,IAAW,UAET;AACA,SAAO,MAAKC;;;;;;;CAQd,AAAU,YAAY,SAA2B;AAC/C,QAAM,QAAQ;;;;;;;;CAShB,MAAsB,gBACpB,QACe;AACf,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AAc,MAAM,KAAK,kBACvB,kBAAmC,oBAAoB,KAAK,OAAO,CACpE;AAED,QAAK,MAAM;IACT,MAAM,EAAE,UAAU,WAAW;IAC7B,SAAS,gBAAgB,OAAO,KAAK,KAAK,aAAa,CAAC,OAAO;IAChE,CAAC;QAEF,eAAc,MAAM,KAAK,gBAAgB;AAG3C,SAAO;;;;;;;;;;CAWT,MAAa,mBACX,QACA;AACA,OAAK,QAAQ,KACX,GAAI,MAAM,eAAgD,MAAM,QAAQ,EACtE,aACE,OAAO,KAAK,KAAK,aAAa,CAAC,QAC7B,QAAO,qBAA+B,qBACvC,CAAC,SAAS,GACd,CAAC,CACH;AAED,QAAM,QAAQ,IACZ,OAAO,KAAK,KAAK,aAAa,CAAC,IAAI,OAAM,SAAQ;AAC/C,SAAM,KAAK,aAAa,MAAO,mBAAmB,OAAO;IACzD,CACH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { ExecutionContext } from "../types/context.cjs";
|
|
1
2
|
import { InferOverridableConfig, ResolvedConfig } from "../types/config.cjs";
|
|
2
|
-
import { PowerlinesExecutionContext } from "../context/execution-context.cjs";
|
|
3
3
|
import * as _$_stryke_types_base0 from "@stryke/types/base";
|
|
4
4
|
import * as _$_stryke_types_configuration0 from "@stryke/types/configuration";
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@ declare function getConfigProps<TResolvedConfig extends ResolvedConfig>(config?:
|
|
|
13
13
|
} & TResolvedConfig["pluginConfig"]) | ({
|
|
14
14
|
input: _$_stryke_types_configuration0.TypeDefinition | _$_stryke_types_configuration0.TypeDefinitionParameter[] | Record<string, _$_stryke_types_configuration0.TypeDefinitionParameter | _$_stryke_types_configuration0.TypeDefinitionParameter[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "userConfig" | "inlineConfig" | "pluginConfig">["input"] extends object ? Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "userConfig" | "inlineConfig" | "pluginConfig">["input"] extends infer T_3 ? T_3 extends Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "userConfig" | "inlineConfig" | "pluginConfig">["input"] ? T_3 extends _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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" | "userConfig" | "inlineConfig" | "pluginConfig">["input"]) | undefined;
|
|
15
15
|
} & InferOverridableConfig<TResolvedConfig>);
|
|
16
|
-
declare function resolvePluginConfig<TContext extends
|
|
16
|
+
declare function resolvePluginConfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown, TContext extends ExecutionContext<TResolvedConfig, TSystemContext> = ExecutionContext<TResolvedConfig, TSystemContext>>(context: TContext): Promise<void>;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { getConfigProps, resolvePluginConfig };
|
|
19
19
|
//# sourceMappingURL=context-helpers.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-helpers.d.cts","names":[],"sources":["../../src/lib/context-helpers.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"context-helpers.d.cts","names":[],"sources":["../../src/lib/context-helpers.ts"],"mappings":";;;;;;iBA+BgB,cAAA,yBAAuC,cAAA,CAAA,CACrD,MAAA,GACI,eAAA,iBACA,eAAA,mBACA,eAAA,mBACA,sBAAA,CAAuB,eAAA;SAAD,8BAAA,CAAA,cAAA;;;;;;;;iBAQN,mBAAA,yBACI,cAAA,GAAiB,cAAA,6CAExB,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IACjD,gBAAA,CAAiB,eAAA,EAAiB,cAAA,EAAA,CACpC,OAAA,EAAS,QAAA,GAAQ,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { ExecutionContext } from "../types/context.mjs";
|
|
1
2
|
import { InferOverridableConfig, ResolvedConfig } from "../types/config.mjs";
|
|
2
|
-
import { PowerlinesExecutionContext } from "../context/execution-context.mjs";
|
|
3
3
|
import * as _$_stryke_types_base0 from "@stryke/types/base";
|
|
4
4
|
import * as _$_stryke_types_configuration0 from "@stryke/types/configuration";
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@ declare function getConfigProps<TResolvedConfig extends ResolvedConfig>(config?:
|
|
|
13
13
|
} & TResolvedConfig["pluginConfig"]) | ({
|
|
14
14
|
input: _$_stryke_types_configuration0.TypeDefinition | _$_stryke_types_configuration0.TypeDefinitionParameter[] | Record<string, _$_stryke_types_configuration0.TypeDefinitionParameter | _$_stryke_types_configuration0.TypeDefinitionParameter[]> | TResolvedConfig["input"] | (Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "userConfig" | "inlineConfig" | "pluginConfig">["input"] extends object ? Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "userConfig" | "inlineConfig" | "pluginConfig">["input"] extends infer T_3 ? T_3 extends Omit<TResolvedConfig, "cwd" | "configFile" | "command" | "userConfig" | "inlineConfig" | "pluginConfig">["input"] ? T_3 extends _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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 _$_stryke_types_base0.BrowserNativeObject | _$_stryke_types_base0.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" | "userConfig" | "inlineConfig" | "pluginConfig">["input"]) | undefined;
|
|
15
15
|
} & InferOverridableConfig<TResolvedConfig>);
|
|
16
|
-
declare function resolvePluginConfig<TContext extends
|
|
16
|
+
declare function resolvePluginConfig<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = unknown, TContext extends ExecutionContext<TResolvedConfig, TSystemContext> = ExecutionContext<TResolvedConfig, TSystemContext>>(context: TContext): Promise<void>;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { getConfigProps, resolvePluginConfig };
|
|
19
19
|
//# sourceMappingURL=context-helpers.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-helpers.d.mts","names":[],"sources":["../../src/lib/context-helpers.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"context-helpers.d.mts","names":[],"sources":["../../src/lib/context-helpers.ts"],"mappings":";;;;;;iBA+BgB,cAAA,yBAAuC,cAAA,CAAA,CACrD,MAAA,GACI,eAAA,iBACA,eAAA,mBACA,eAAA,mBACA,sBAAA,CAAuB,eAAA;SAAD,8BAAA,CAAA,cAAA;;;;;;;;iBAQN,mBAAA,yBACI,cAAA,GAAiB,cAAA,6CAExB,gBAAA,CAAiB,eAAA,EAAiB,cAAA,IACjD,gBAAA,CAAiB,eAAA,EAAiB,cAAA,EAAA,CACpC,OAAA,EAAS,QAAA,GAAQ,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-helpers.mjs","names":[],"sources":["../../src/lib/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 { toArray } from \"@stryke/convert/to-array\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport {
|
|
1
|
+
{"version":3,"file":"context-helpers.mjs","names":[],"sources":["../../src/lib/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 { toArray } from \"@stryke/convert/to-array\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { colorText } from \"../plugin-utils/logging\";\nimport type {\n ExecutionContext,\n InferOverridableConfig,\n PluginConfig,\n PluginContext,\n ResolvedConfig\n} from \"../types\";\nimport { mergeConfigs } from \"./hooks\";\n\nexport function getConfigProps<TResolvedConfig extends ResolvedConfig>(\n config:\n | TResolvedConfig[\"userConfig\"]\n | TResolvedConfig[\"inlineConfig\"]\n | TResolvedConfig[\"pluginConfig\"]\n | InferOverridableConfig<TResolvedConfig> = {}\n) {\n return {\n input: isSetString(config.input) ? [config.input] : config.input,\n ...config\n };\n}\n\nexport async function resolvePluginConfig<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TSystemContext = unknown,\n TContext extends ExecutionContext<TResolvedConfig, TSystemContext> =\n ExecutionContext<TResolvedConfig, TSystemContext>\n>(context: TContext) {\n const timer = context.timer(\n `${titleCase(context.config.command)} Execution - Initialization`\n );\n\n for (const plugin of (\n context.config.plugins as PluginConfig<\n PluginContext<TResolvedConfig, TSystemContext>\n >[]\n ).flatMap(p => toArray(p)) ?? []) {\n await context.unstable_addPlugin(plugin);\n }\n\n if (context.plugins.length === 0) {\n context.warn({\n meta: {\n category: \"plugins\"\n },\n message:\n \"No Powerlines plugins were specified in the options. Please ensure this is correct, as it is generally not recommended.\"\n });\n } else {\n context.info({\n meta: {\n category: \"plugins\"\n },\n message: `Loaded ${context.plugins.length} ${titleCase(\n context.config.framework?.name ?? \"powerlines\"\n )} plugin${context.plugins.length > 1 ? \"s\" : \"\"}: \\n${context.plugins\n .map((plugin, index) => ` ${index + 1}. ${colorText(plugin.name)}`)\n .join(\"\\n\")}`\n });\n }\n\n const pluginConfig = await context.callHook(\"config\", {\n environment: await context.getEnvironment(),\n sequential: true,\n result: \"merge\",\n merge: mergeConfigs\n });\n if (pluginConfig) {\n await context.setPluginConfig(\n pluginConfig as TContext[\"config\"][\"pluginConfig\"]\n );\n } else {\n context.debug({\n meta: {\n category: \"config\"\n },\n message: \"No plugin configuration was returned from the config hook.\"\n });\n }\n\n timer();\n}\n"],"mappings":";;;;;;;AA+BA,SAAgB,eACd,SAI8C,EAAE,EAChD;AACA,QAAO;EACL,OAAO,YAAY,OAAO,MAAM,GAAG,CAAC,OAAO,MAAM,GAAG,OAAO;EAC3D,GAAG;EACJ;;AAGH,eAAsB,oBAKpB,SAAmB;CACnB,MAAM,QAAQ,QAAQ,MACpB,GAAG,UAAU,QAAQ,OAAO,QAAQ,CAAC,6BACtC;AAED,MAAK,MAAM,UACT,QAAQ,OAAO,QAGf,SAAQ,MAAK,QAAQ,EAAE,CAAC,IAAI,EAAE,CAC9B,OAAM,QAAQ,mBAAmB,OAAO;AAG1C,KAAI,QAAQ,QAAQ,WAAW,EAC7B,SAAQ,KAAK;EACX,MAAM,EACJ,UAAU,WACX;EACD,SACE;EACH,CAAC;KAEF,SAAQ,KAAK;EACX,MAAM,EACJ,UAAU,WACX;EACD,SAAS,UAAU,QAAQ,QAAQ,OAAO,GAAG,UAC3C,QAAQ,OAAO,WAAW,QAAQ,aACnC,CAAC,SAAS,QAAQ,QAAQ,SAAS,IAAI,MAAM,GAAG,MAAM,QAAQ,QAC5D,KAAK,QAAQ,UAAU,IAAI,QAAQ,EAAE,IAAI,UAAU,OAAO,KAAK,GAAG,CAClE,KAAK,KAAK;EACd,CAAC;CAGJ,MAAM,eAAe,MAAM,QAAQ,SAAS,UAAU;EACpD,aAAa,MAAM,QAAQ,gBAAgB;EAC3C,YAAY;EACZ,QAAQ;EACR,OAAO;EACR,CAAC;AACF,KAAI,aACF,OAAM,QAAQ,gBACZ,aACD;KAED,SAAQ,MAAM;EACZ,MAAM,EACJ,UAAU,UACX;EACD,SAAS;EACV,CAAC;AAGJ,QAAO"}
|
package/dist/types/context.d.cts
CHANGED
|
@@ -3,8 +3,9 @@ import { Plugin } from "./plugin.cjs";
|
|
|
3
3
|
import { CallHookOptions, HooksList, HooksListItem, InferHookParameters, InferHookReturnType } from "./hooks.cjs";
|
|
4
4
|
import { LogFn, LogMessage, Logger, LoggerOptions } from "./logging.cjs";
|
|
5
5
|
import { ParsedTypeScriptConfig } from "./tsconfig.cjs";
|
|
6
|
-
import { EnvironmentResolvedConfig, ExecutionOptions, Options, PluginConfig, ResolvedConfig, ResolvedEntryTypeDefinition } from "./config.cjs";
|
|
6
|
+
import { EnvironmentResolvedConfig, ExecutionOptions, Options, PluginConfig, ResolvedConfig, ResolvedEntryTypeDefinition, UserConfig } from "./config.cjs";
|
|
7
7
|
import { EnvPaths } from "@stryke/env/get-env-paths";
|
|
8
|
+
import { DeepPartial } from "@stryke/types/base";
|
|
8
9
|
import { FetchRequestOptions } from "@stryke/http/fetch";
|
|
9
10
|
import { PackageJson } from "@stryke/types/package-json";
|
|
10
11
|
import { Jiti } from "jiti";
|
|
@@ -485,6 +486,13 @@ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemCon
|
|
|
485
486
|
* The fully resolved Powerlines configuration
|
|
486
487
|
*/
|
|
487
488
|
config: TResolvedConfig;
|
|
489
|
+
/**
|
|
490
|
+
* A setter function to populate the plugin config values provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed. This function can be used to update the context with the plugin configuration values, which may be used during the configuration resolution process to ensure that the final configuration reflects both the user configuration and any plugin configuration provided during execution.
|
|
491
|
+
*
|
|
492
|
+
* @param config - The plugin configuration values to set.
|
|
493
|
+
* @returns A promise that resolves when the plugin configuration values have been set.
|
|
494
|
+
*/
|
|
495
|
+
setPluginConfig: (config: DeepPartial<UserConfig>) => Promise<void>;
|
|
488
496
|
/**
|
|
489
497
|
* Invokes the configured plugin hooks
|
|
490
498
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.cts","names":[],"sources":["../../src/types/context.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.cts","names":[],"sources":["../../src/types/context.ts"],"mappings":";;;;;;;;;;;;;;;;;;;KAwDY,QAAA,GAAW,MAAA;EAAX;;;EAIV,QAAA;EAJqB;;;EASrB,WAAA;EAUA;;;EALA,SAAA;EAeU;AAGZ;;EAbE,SAAA;EAaoC;;;EARpC,QAAA;EASY;;AAGd;EAPE,UAAA;AAAA;AAAA,UAGe,QAAA,SAAiB,IAAA;EAChC,MAAA,EAAQ,IAAA;AAAA;AAAA,UAGO,iBAAA;EACf,IAAA;EACA,GAAA,EAAK,SAAA;AAAA;;;;UAMU,UAAA;EASf;;;EALA,EAAA;EAeS;;;EAVT,IAAA,EAAM,WAAA;EAamB;;;EARzB,GAAA;EASmB;;;EAJnB,MAAA,GAAS,iBAAA;AAAA;AAAA,KAGC,eAAA,GAAkB,IAAA,CAAK,QAAA;EACjC,WAAA,QAAmB,OAAA;EACnB,aAAA,GAAgB,MAAA,EAAQ,UAAA,KAAe,OAAA,CAAQ,UAAA;EAC/C,qBAAA,QAA6B,OAAA;AAAA;AAAA,UAGd,kBAAA;EACf,KAAA;AAAA;;;;UAMe,kBAAA;EAVc;;;AAG/B;;EAaE,cAAA;AAAA;;AANF;;UAYiB,YAAA,SAAqB,mBAAA;EANpC;;AAMF;EAIE,SAAA;AAAA;;;AAMF;UAAiB,YAAA,SAAqB,aAAA;;;;EAIpC,0BAAA;AAAA;AAAA,UAGe,WAAA,SAAoB,YAAA;EAYjC;;;EARF,SAAA;EAJmC;;;EASnC,eAAA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AEf,oBAAA,CAAqB,QAAA,EAAU,IAAA;AAAA,UAElB,kBAAA,yBACS,cAAA,GAAiB,cAAA,oCAEjC,OAAA,CAAQ,yBAAA,CAA0B,eAAA,GAAkB,cAAA;EAZ1D;;;EAAA,SAgBO,EAAA;EAlBT;;;;;;EA0BA,OAAA,EAAS,iBAAA,CAAkB,eAAA,EAAiB,cAAA;EAvBnC;;;EA4BT,KAAA,EAAO,SAAA,CAAU,aAAA,CAAc,eAAA,EAAiB,cAAA;EAzBtB;;;;;;;;EAmC1B,kBAAA,EAAoB,gBAAA,CAAiB,eAAA,EAAiB,cAAA;EAlCrC;;;EAuCjB,WAAA,wBACE,GAAA,EAAK,IAAA,EACL,OAAA,GAAU,kBAAA,KACP,gBAAA,CAAiB,aAAA,CAAc,eAAA,EAAiB,cAAA,GAAiB,IAAA;EAxCrC;;;AAEnC;;;;;EAgDE,kBAAA,GACE,MAAA,EAAQ,YAAA,CAAa,aAAA,CAAc,eAAA,EAAiB,cAAA,OACjD,OAAA;AAAA;AAAA,UAGU,aAAA,6BACa,cAAA,GAAiB,cAAA,oCAErC,OAAA,CAAQ,yBAAA,CAA0B,eAAA,GAAkB,cAAA;EAzCjC;;;EAAA,SA6ClB,EAAA;EAxCuC;;;EAAA,SA6CvC,WAAA,EAAa,kBAAA;AAAA;AAAA,KAGZ,kBAAA,yBACc,cAAA,GAAiB,cAAA,IACvC,oBAAA,GAAuB,aAAA,CAAc,eAAA;AAAA,KAE7B,wBAAA,kBAA0C,aAAA,IACpD,oBAAA,GAAuB,QAAA;AAAA"}
|
package/dist/types/context.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { Plugin } from "./plugin.mjs";
|
|
|
3
3
|
import { CallHookOptions, HooksList, HooksListItem, InferHookParameters, InferHookReturnType } from "./hooks.mjs";
|
|
4
4
|
import { LogFn, LogMessage, Logger, LoggerOptions } from "./logging.mjs";
|
|
5
5
|
import { ParsedTypeScriptConfig } from "./tsconfig.mjs";
|
|
6
|
-
import { EnvironmentResolvedConfig, ExecutionOptions, Options, PluginConfig, ResolvedConfig, ResolvedEntryTypeDefinition } from "./config.mjs";
|
|
6
|
+
import { EnvironmentResolvedConfig, ExecutionOptions, Options, PluginConfig, ResolvedConfig, ResolvedEntryTypeDefinition, UserConfig } from "./config.mjs";
|
|
7
7
|
import { EnvPaths } from "@stryke/env/get-env-paths";
|
|
8
8
|
import { Jiti } from "jiti";
|
|
9
9
|
import { ExternalIdResult, UnpluginBuildContext } from "unplugin";
|
|
@@ -11,6 +11,7 @@ import MagicString, { SourceMap } from "magic-string";
|
|
|
11
11
|
import { FetchRequestOptions } from "@stryke/http/fetch";
|
|
12
12
|
import { ParseResult, ParserOptions } from "oxc-parser";
|
|
13
13
|
import { RequestInfo, Response } from "undici";
|
|
14
|
+
import { DeepPartial } from "@stryke/types/base";
|
|
14
15
|
import { PackageJson } from "@stryke/types/package-json";
|
|
15
16
|
import { Range } from "semver";
|
|
16
17
|
import { Unimport } from "unimport";
|
|
@@ -485,6 +486,13 @@ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemCon
|
|
|
485
486
|
* The fully resolved Powerlines configuration
|
|
486
487
|
*/
|
|
487
488
|
config: TResolvedConfig;
|
|
489
|
+
/**
|
|
490
|
+
* A setter function to populate the plugin config values provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed. This function can be used to update the context with the plugin configuration values, which may be used during the configuration resolution process to ensure that the final configuration reflects both the user configuration and any plugin configuration provided during execution.
|
|
491
|
+
*
|
|
492
|
+
* @param config - The plugin configuration values to set.
|
|
493
|
+
* @returns A promise that resolves when the plugin configuration values have been set.
|
|
494
|
+
*/
|
|
495
|
+
setPluginConfig: (config: DeepPartial<UserConfig>) => Promise<void>;
|
|
488
496
|
/**
|
|
489
497
|
* Invokes the configured plugin hooks
|
|
490
498
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"mappings":"
|
|
1
|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AAA,EAAiB,cAAA;EAzBtB;;;;;;;;EAmC1B,kBAAA,EAAoB,gBAAA,CAAiB,eAAA,EAAiB,cAAA;EAlCrC;;;EAuCjB,WAAA,wBACE,GAAA,EAAK,IAAA,EACL,OAAA,GAAU,kBAAA,KACP,gBAAA,CAAiB,aAAA,CAAc,eAAA,EAAiB,cAAA,GAAiB,IAAA;EAxCrC;;;AAEnC;;;;;EAgDE,kBAAA,GACE,MAAA,EAAQ,YAAA,CAAa,aAAA,CAAc,eAAA,EAAiB,cAAA,OACjD,OAAA;AAAA;AAAA,UAGU,aAAA,6BACa,cAAA,GAAiB,cAAA,oCAErC,OAAA,CAAQ,yBAAA,CAA0B,eAAA,GAAkB,cAAA;EAzCjC;;;EAAA,SA6ClB,EAAA;EAxCuC;;;EAAA,SA6CvC,WAAA,EAAa,kBAAA;AAAA;AAAA,KAGZ,kBAAA,yBACc,cAAA,GAAiB,cAAA,IACvC,oBAAA,GAAuB,aAAA,CAAc,eAAA;AAAA,KAE7B,wBAAA,kBAA0C,aAAA,IACpD,oBAAA,GAAuB,QAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/core",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.6",
|
|
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",
|
|
@@ -371,5 +371,5 @@
|
|
|
371
371
|
"undici-types": "^7.25.0"
|
|
372
372
|
},
|
|
373
373
|
"publishConfig": { "access": "public" },
|
|
374
|
-
"gitHead": "
|
|
374
|
+
"gitHead": "803c5f0e2dd17a522e65fcced5a1d363d5b489b2"
|
|
375
375
|
}
|