@powerlines/engine 0.49.50 → 0.49.52

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.
@@ -126,15 +126,18 @@ var PowerlinesEngineContext = class PowerlinesEngineContext extends _powerlines_
126
126
  */
127
127
  async loadExecutions(command, inlineConfig) {
128
128
  const root = (0, _powerlines_core_lib_config.resolveRoot)(this.cwd, inlineConfig.root, inlineConfig.configFile);
129
- const config = await (0, _powerlines_core_lib_config.loadParsedConfig)(this.cwd, root, this.framework?.name, this.orgId, {
129
+ const parsedConfig = await (0, _powerlines_core_lib_config.loadParsedConfig)(this.cwd, root, this.framework?.name, this.orgId, {
130
130
  ...inlineConfig,
131
131
  command
132
132
  });
133
- if (!config) throw new Error("Failed to load configuration");
133
+ if (!parsedConfig) throw new Error("Failed to load configuration");
134
+ const configs = (0, _stryke_convert_to_array.toArray)(parsedConfig.config);
135
+ const name = inlineConfig.name || configs.reduce((ret, config) => ret || config.name, void 0) || await (0, _powerlines_core_plugin_utils_context_helpers.getName)(this.cwd, root);
134
136
  const invocationId = (0, _stryke_unique_id_uuid.uuid)();
135
- const executions = await Promise.all((0, _stryke_convert_to_array.toArray)(config.config).map(async (_, configIndex) => {
136
- const executionId = (0, _powerlines_core_plugin_utils.formatExecutionId)(config.config.name || inlineConfig.name || await (0, _powerlines_core_plugin_utils_context_helpers.getName)(this.cwd, root), command, configIndex);
137
+ const executions = await Promise.all(configs.map(async (config, configIndex) => {
138
+ const executionId = (0, _powerlines_core_plugin_utils.formatExecutionId)(config.name || name, command, configIndex);
137
139
  const options = {
140
+ name: config.name || name,
138
141
  cwd: this.cwd,
139
142
  root,
140
143
  framework: this.framework,
@@ -143,7 +146,7 @@ var PowerlinesEngineContext = class PowerlinesEngineContext extends _powerlines_
143
146
  command,
144
147
  baseURL: this.#devtools.host.resolveOrigin(),
145
148
  connection: this.connection,
146
- configFile: config.configFile,
149
+ configFile: parsedConfig.configFile,
147
150
  executionId,
148
151
  configIndex
149
152
  };
@@ -154,7 +157,7 @@ var PowerlinesEngineContext = class PowerlinesEngineContext extends _powerlines_
154
157
  return {
155
158
  invocationId,
156
159
  command,
157
- configFile: config,
160
+ configFile: parsedConfig,
158
161
  options,
159
162
  state: {
160
163
  command: null,
@@ -1 +1 @@
1
- {"version":3,"file":"engine-context.d.cts","names":[],"sources":["../../src/context/engine-context.ts"],"mappings":";;;;;;;;;cAsDa,uBAAA,mCACH,qBAAA,CAAsB,cAAA,aACnB,aAAA,CAAc,cAAA;EAAA;EAkIP,OAAA,EAAS,aAAA;EAClB,UAAA,EAAY,cAAA;EArIa;;;;;;EAAA,OAgBd,IAAA,2BAClB,OAAA,EAAS,aAAA,EACT,IAAA,EAAM,YAAA,EACN,UAAA,EAAY,cAAA,GACX,OAAA,CAAQ,uBAAA,CAAwB,cAAA;EA8DnB,YAAA,CAAa,OAAA,GAAS,aAAA,EAAoB,KAAA,GAAQ,KAAA,8BAAK,MAAA;EAAA,IAe5D,UAAA,IAAc,mBAAA;EAAA,IAId,QAAA,IAAY,mBAAA;EAAA,IAIZ,QAAA,IAAY,QAAA;EAAA,IAQZ,SAAA,IAAa,gBAAA;EAAA,IAQb,KAAA;EAxBc;;;;;;EAAA,UAkChB,WAAA,CACS,OAAA,EAAS,aAAA,EAClB,UAAA,EAAY,cAAA;EAgBL;;;;;;;;;EAFH,cAAA,CACX,OAAA,UACA,YAAA,EAAc,WAAA,CAAY,YAAA,eACzB,OAAA,CAAQ,mBAAA;EApJA;;;;;;EA+NJ,iBAAA,CAAkB,YAAA,UAAsB,WAAA;AAAA"}
1
+ {"version":3,"file":"engine-context.d.cts","names":[],"sources":["../../src/context/engine-context.ts"],"mappings":";;;;;;;;;cAsDa,uBAAA,mCACH,qBAAA,CAAsB,cAAA,aACnB,aAAA,CAAc,cAAA;EAAA;EAkIP,OAAA,EAAS,aAAA;EAClB,UAAA,EAAY,cAAA;EArIa;;;;;;EAAA,OAgBd,IAAA,2BAClB,OAAA,EAAS,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AA,CACX,OAAA,UACA,YAAA,EAAc,WAAA,CAAY,YAAA,eACzB,OAAA,CAAQ,mBAAA;EApJA;;;;;;EA+NJ,iBAAA,CAAkB,YAAA,UAAsB,WAAA;AAAA"}
1
+ {"version":3,"file":"engine-context.d.mts","names":[],"sources":["../../src/context/engine-context.ts"],"mappings":";;;;;;;;;cAsDa,uBAAA,mCACH,qBAAA,CAAsB,cAAA,aACnB,aAAA,CAAc,cAAA;EAAA;EAkIP,OAAA,EAAS,aAAA;EAClB,UAAA,EAAY,cAAA;EArIa;;;;;;EAAA,OAgBd,IAAA,2BAClB,OAAA,EAAS,aAAA,EACT,IAAA,EAAM,YAAA,EACN,UAAA,EAAY,cAAA,GACX,OAAA,CAAQ,uBAAA,CAAwB,cAAA;EA8DnB,YAAA,CAAa,OAAA,GAAS,aAAA,EAAoB,KAAA,GAAQ,KAAA,8BAAK,MAAA;EAAA,IAe5D,UAAA,IAAc,mBAAA;EAAA,IAId,QAAA,IAAY,mBAAA;EAAA,IAIZ,QAAA,IAAY,QAAA;EAAA,IAQZ,SAAA,IAAa,gBAAA;EAAA,IAQb,KAAA;EAxBc;;;;;;EAAA,UAkChB,WAAA,CACS,OAAA,EAAS,aAAA,EAClB,UAAA,EAAY,cAAA;EAgBL;;;;;;;;;EAFH,cAAA,CACX,OAAA,UACA,YAAA,EAAc,WAAA,CAAY,YAAA,eACzB,OAAA,CAAQ,mBAAA;EApJA;;;;;;EAuOJ,iBAAA,CAAkB,YAAA,UAAsB,WAAA;AAAA"}
@@ -4,7 +4,7 @@ import { uuid } from "@stryke/unique-id/uuid";
4
4
  import { createHostContext } from "devframe/node";
5
5
  import { getDefaultLogLevel, loadParsedConfig, resolveRoot } from "@powerlines/core/lib/config";
6
6
  import { PowerlinesBaseContext } from "@powerlines/core/context/base-context";
7
- import { getName } from "@powerlines/core/plugin-utils/context-helpers";
7
+ import { getName as getName$1 } from "@powerlines/core/plugin-utils/context-helpers";
8
8
  import { getEnvPaths } from "@stryke/env/get-env-paths";
9
9
  import { kebabCase } from "@stryke/string-format/kebab-case";
10
10
  import * as v from "valibot";
@@ -123,15 +123,18 @@ var PowerlinesEngineContext = class PowerlinesEngineContext extends PowerlinesBa
123
123
  */
124
124
  async loadExecutions(command, inlineConfig) {
125
125
  const root = resolveRoot(this.cwd, inlineConfig.root, inlineConfig.configFile);
126
- const config = await loadParsedConfig(this.cwd, root, this.framework?.name, this.orgId, {
126
+ const parsedConfig = await loadParsedConfig(this.cwd, root, this.framework?.name, this.orgId, {
127
127
  ...inlineConfig,
128
128
  command
129
129
  });
130
- if (!config) throw new Error("Failed to load configuration");
130
+ if (!parsedConfig) throw new Error("Failed to load configuration");
131
+ const configs = toArray(parsedConfig.config);
132
+ const name = inlineConfig.name || configs.reduce((ret, config) => ret || config.name, void 0) || await getName$1(this.cwd, root);
131
133
  const invocationId = uuid();
132
- const executions = await Promise.all(toArray(config.config).map(async (_, configIndex) => {
133
- const executionId = formatExecutionId(config.config.name || inlineConfig.name || await getName(this.cwd, root), command, configIndex);
134
+ const executions = await Promise.all(configs.map(async (config, configIndex) => {
135
+ const executionId = formatExecutionId(config.name || name, command, configIndex);
134
136
  const options = {
137
+ name: config.name || name,
135
138
  cwd: this.cwd,
136
139
  root,
137
140
  framework: this.framework,
@@ -140,7 +143,7 @@ var PowerlinesEngineContext = class PowerlinesEngineContext extends PowerlinesBa
140
143
  command,
141
144
  baseURL: this.#devtools.host.resolveOrigin(),
142
145
  connection: this.connection,
143
- configFile: config.configFile,
146
+ configFile: parsedConfig.configFile,
144
147
  executionId,
145
148
  configIndex
146
149
  };
@@ -151,7 +154,7 @@ var PowerlinesEngineContext = class PowerlinesEngineContext extends PowerlinesBa
151
154
  return {
152
155
  invocationId,
153
156
  command,
154
- configFile: config,
157
+ configFile: parsedConfig,
155
158
  options,
156
159
  state: {
157
160
  command: null,
@@ -1 +1 @@
1
- {"version":3,"file":"engine-context.mjs","names":["#devtools","#logLevel","#executions"],"sources":["../../src/context/engine-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 {\n FrameworkOptions,\n InlineConfig,\n LogFn,\n LoggerOptions,\n LogLevelResolvedConfig\n} from \"@powerlines/core\";\nimport { PowerlinesBaseContext } from \"@powerlines/core/context/base-context\";\nimport {\n getDefaultLogLevel,\n loadParsedConfig,\n resolveRoot\n} from \"@powerlines/core/lib/config\";\nimport {\n createLogger,\n formatConfig,\n formatExecutionId,\n resolveLogLevel,\n withCustomLogger\n} from \"@powerlines/core/plugin-utils\";\nimport { getName } from \"@powerlines/core/plugin-utils/context-helpers\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { EnvPaths, getEnvPaths } from \"@stryke/env/get-env-paths\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { PartialKeys } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport { createHostContext } from \"devframe/node\";\nimport {\n ConnectionMeta,\n DevToolsHost,\n DevToolsNodeContext\n} from \"devframe/types\";\nimport * as v from \"valibot\";\nimport { EngineOptions } from \"../types/config\";\nimport { EngineContext, EngineExecutionItem } from \"../types/context\";\n\nexport class PowerlinesEngineContext<TSystemContext = unknown>\n extends PowerlinesBaseContext<TSystemContext>\n implements EngineContext<TSystemContext>\n{\n #executions: EngineExecutionItem[] = [];\n\n #devtools!: DevToolsNodeContext;\n\n #logLevel!: LogLevelResolvedConfig;\n\n /**\n * Creates a new instance of the PowerlinesEngineContext class.\n *\n * @param options - The options to initialize the context with.\n * @returns A promise that resolves to an instance of the PowerlinesEngineContext class.\n */\n public static async from<TSystemContext = unknown>(\n options: EngineOptions,\n host: DevToolsHost,\n connection: ConnectionMeta\n ): Promise<PowerlinesEngineContext<TSystemContext>> {\n const context = new PowerlinesEngineContext<TSystemContext>(\n options,\n connection\n );\n\n context.#devtools = await createHostContext({\n cwd: context.cwd,\n mode: \"dev\",\n host\n });\n await options.setup?.(context.#devtools);\n\n context.#devtools.rpc.register({\n name: \"powerlines:log\",\n type: \"event\",\n args: [\n v.object({\n meta: v.object({\n category: v.string(),\n name: v.string(),\n command: v.string(),\n hook: v.string(),\n plugin: v.string(),\n source: v.string()\n }),\n message: v.string()\n })\n ],\n setup: _ => ({\n handler: payload => {\n switch (payload.meta.type) {\n case \"error\":\n context.error(payload);\n break;\n case \"warn\":\n context.warn(payload);\n break;\n case \"info\":\n context.info(payload);\n break;\n case \"debug\":\n context.debug(payload);\n break;\n case \"trace\":\n context.trace(payload);\n break;\n default:\n context.info(payload);\n break;\n }\n }\n })\n });\n\n context.#logLevel = options.logLevel\n ? resolveLogLevel(options.logLevel)\n : await getDefaultLogLevel(context.cwd);\n\n return context;\n }\n\n public override createLogger(options: LoggerOptions = {}, logFn?: LogFn) {\n let logger = createLogger(\n \"engine\",\n {\n logLevel: this.#logLevel,\n ...options\n },\n logFn\n );\n if (this.options.customLogger) {\n logger = withCustomLogger(logger, this.options.customLogger);\n }\n return logger;\n }\n\n public get executions(): EngineExecutionItem[] {\n return this.#executions;\n }\n\n public get devtools(): DevToolsNodeContext {\n return this.#devtools;\n }\n\n public get envPaths(): EnvPaths {\n return getEnvPaths({\n orgId: kebabCase(this.orgId),\n appId: kebabCase(this.framework.name),\n workspaceRoot: this.cwd\n });\n }\n\n public get framework(): FrameworkOptions {\n return {\n name: \"powerlines\",\n orgId: \"storm-software\",\n ...this.options.framework\n };\n }\n\n public get orgId(): string {\n return this.framework.orgId;\n }\n\n /**\n * Creates a new Context instance.\n *\n * @param options - The options to use for creating the context, including the resolved configuration and workspace settings.\n * @param connection - The connection metadata for the dev server.\n */\n protected constructor(\n public override options: EngineOptions,\n public connection: ConnectionMeta\n ) {\n super(options);\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 command - The path to the execution configuration to load and run, which can be used to specify different execution configurations for different commands or scenarios.\n * @param inlineConfig - Additional configuration options provided at runtime, which can override or supplement the options defined in the user configuration file.\n */\n public async loadExecutions(\n command: string,\n inlineConfig: PartialKeys<InlineConfig, \"command\">\n ): Promise<EngineExecutionItem[]> {\n const root = resolveRoot(\n this.cwd,\n inlineConfig.root,\n inlineConfig.configFile\n );\n\n const config = await loadParsedConfig(\n this.cwd,\n root,\n this.framework?.name,\n this.orgId,\n { ...inlineConfig, command }\n );\n if (!config) {\n throw new Error(\"Failed to load configuration\");\n }\n\n const invocationId = uuid();\n const executions = await Promise.all(\n toArray(config.config).map(async (_, configIndex) => {\n const executionId = formatExecutionId(\n config.config.name ||\n inlineConfig.name ||\n (await getName(this.cwd, root)),\n command,\n configIndex\n );\n\n const options = {\n cwd: this.cwd,\n root,\n framework: this.framework,\n orgId: this.orgId,\n ...this.options,\n command,\n baseURL: this.#devtools.host.resolveOrigin(),\n connection: this.connection,\n configFile: config.configFile!,\n executionId,\n configIndex\n };\n\n this.logger.debug({\n meta: { category: \"config\" },\n message: `Invoking ${command} with the following execution parameters: \\n --- Options --- \\n${formatConfig(\n options\n )}\\n --- Inline Config --- \\n${formatConfig(inlineConfig)}`\n });\n\n return {\n invocationId,\n command,\n configFile: config,\n options,\n state: {\n command: null,\n hook: null,\n plugin: null\n }\n };\n })\n );\n\n this.#executions = this.#executions.concat(executions);\n\n return executions;\n }\n\n /**\n * Complete an execution by removing it from the list of active executions based on the provided invocation ID and execution ID. This method is typically called when an execution has finished or has been terminated, allowing the context to clean up any resources associated with that execution and update its internal state accordingly.\n *\n * @param invocationId - The unique identifier for the invocation of the execution to be completed.\n * @param executionId - The unique identifier for the specific execution to be completed.\n */\n public completeExecution(invocationId: string, executionId: string) {\n this.#executions = this.#executions.filter(\n execution =>\n execution.options.executionId !== executionId ||\n execution.invocationId !== invocationId\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;AAsDA,IAAa,0BAAb,MAAa,gCACH,sBAEV;CAiIoB;CACT;CAjIT,cAAqC,CAAC;CAEtC;CAEA;;;;;;;CAQA,aAAoB,KAClB,SACA,MACA,YACkD;EAClD,MAAM,UAAU,IAAI,wBAClB,SACA,UACF;EAEA,QAAQA,YAAY,MAAM,kBAAkB;GAC1C,KAAK,QAAQ;GACb,MAAM;GACN;EACF,CAAC;EACD,MAAM,QAAQ,QAAQ,QAAQA,SAAS;EAEvC,QAAQA,UAAU,IAAI,SAAS;GAC7B,MAAM;GACN,MAAM;GACN,MAAM,CACJ,EAAE,OAAO;IACP,MAAM,EAAE,OAAO;KACb,UAAU,EAAE,OAAO;KACnB,MAAM,EAAE,OAAO;KACf,SAAS,EAAE,OAAO;KAClB,MAAM,EAAE,OAAO;KACf,QAAQ,EAAE,OAAO;KACjB,QAAQ,EAAE,OAAO;IACnB,CAAC;IACD,SAAS,EAAE,OAAO;GACpB,CAAC,CACH;GACA,QAAO,OAAM,EACX,UAAS,YAAW;IAClB,QAAQ,QAAQ,KAAK,MAArB;KACE,KAAK;MACH,QAAQ,MAAM,OAAO;MACrB;KACF,KAAK;MACH,QAAQ,KAAK,OAAO;MACpB;KACF,KAAK;MACH,QAAQ,KAAK,OAAO;MACpB;KACF,KAAK;MACH,QAAQ,MAAM,OAAO;MACrB;KACF,KAAK;MACH,QAAQ,MAAM,OAAO;MACrB;KACF;MACE,QAAQ,KAAK,OAAO;MACpB;IACJ;GACF,EACF;EACF,CAAC;EAED,QAAQC,YAAY,QAAQ,WACxB,gBAAgB,QAAQ,QAAQ,IAChC,MAAM,mBAAmB,QAAQ,GAAG;EAExC,OAAO;CACT;CAEA,AAAgB,aA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,KAAK,cAAc;IAC3C,YAAY,KAAK;IACjB,YAAY,OAAO;IACnB;IACA;GACF;GAEA,KAAK,OAAO,MAAM;IAChB,MAAM,EAAE,UAAU,SAAS;IAC3B,SAAS,YAAY,QAAQ,iEAAiE,aAC5F,OACF,EAAE,6BAA6B,aAAa,YAAY;GAC1D,CAAC;GAED,OAAO;IACL;IACA;IACA,YAAY;IACZ;IACA,OAAO;KACL,SAAS;KACT,MAAM;KACN,QAAQ;IACV;GACF;EACF,CAAC,CACH;EAEA,KAAKE,cAAc,KAAKA,YAAY,OAAO,UAAU;EAErD,OAAO;CACT;;;;;;;CAQA,AAAO,kBAAkB,cAAsB,aAAqB;EAClE,KAAKA,cAAc,KAAKA,YAAY,QAClC,cACE,UAAU,QAAQ,gBAAgB,eAClC,UAAU,iBAAiB,YAC/B;CACF;AACF"}
1
+ {"version":3,"file":"engine-context.mjs","names":["#devtools","#logLevel","#executions","getName"],"sources":["../../src/context/engine-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 {\n FrameworkOptions,\n InlineConfig,\n LogFn,\n LoggerOptions,\n LogLevelResolvedConfig\n} from \"@powerlines/core\";\nimport { PowerlinesBaseContext } from \"@powerlines/core/context/base-context\";\nimport {\n getDefaultLogLevel,\n loadParsedConfig,\n resolveRoot\n} from \"@powerlines/core/lib/config\";\nimport {\n createLogger,\n formatConfig,\n formatExecutionId,\n resolveLogLevel,\n withCustomLogger\n} from \"@powerlines/core/plugin-utils\";\nimport { getName } from \"@powerlines/core/plugin-utils/context-helpers\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { EnvPaths, getEnvPaths } from \"@stryke/env/get-env-paths\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { PartialKeys } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport { createHostContext } from \"devframe/node\";\nimport {\n ConnectionMeta,\n DevToolsHost,\n DevToolsNodeContext\n} from \"devframe/types\";\nimport * as v from \"valibot\";\nimport { EngineOptions } from \"../types/config\";\nimport { EngineContext, EngineExecutionItem } from \"../types/context\";\n\nexport class PowerlinesEngineContext<TSystemContext = unknown>\n extends PowerlinesBaseContext<TSystemContext>\n implements EngineContext<TSystemContext>\n{\n #executions: EngineExecutionItem[] = [];\n\n #devtools!: DevToolsNodeContext;\n\n #logLevel!: LogLevelResolvedConfig;\n\n /**\n * Creates a new instance of the PowerlinesEngineContext class.\n *\n * @param options - The options to initialize the context with.\n * @returns A promise that resolves to an instance of the PowerlinesEngineContext class.\n */\n public static async from<TSystemContext = unknown>(\n options: EngineOptions,\n host: DevToolsHost,\n connection: ConnectionMeta\n ): Promise<PowerlinesEngineContext<TSystemContext>> {\n const context = new PowerlinesEngineContext<TSystemContext>(\n options,\n connection\n );\n\n context.#devtools = await createHostContext({\n cwd: context.cwd,\n mode: \"dev\",\n host\n });\n await options.setup?.(context.#devtools);\n\n context.#devtools.rpc.register({\n name: \"powerlines:log\",\n type: \"event\",\n args: [\n v.object({\n meta: v.object({\n category: v.string(),\n name: v.string(),\n command: v.string(),\n hook: v.string(),\n plugin: v.string(),\n source: v.string()\n }),\n message: v.string()\n })\n ],\n setup: _ => ({\n handler: payload => {\n switch (payload.meta.type) {\n case \"error\":\n context.error(payload);\n break;\n case \"warn\":\n context.warn(payload);\n break;\n case \"info\":\n context.info(payload);\n break;\n case \"debug\":\n context.debug(payload);\n break;\n case \"trace\":\n context.trace(payload);\n break;\n default:\n context.info(payload);\n break;\n }\n }\n })\n });\n\n context.#logLevel = options.logLevel\n ? resolveLogLevel(options.logLevel)\n : await getDefaultLogLevel(context.cwd);\n\n return context;\n }\n\n public override createLogger(options: LoggerOptions = {}, logFn?: LogFn) {\n let logger = createLogger(\n \"engine\",\n {\n logLevel: this.#logLevel,\n ...options\n },\n logFn\n );\n if (this.options.customLogger) {\n logger = withCustomLogger(logger, this.options.customLogger);\n }\n return logger;\n }\n\n public get executions(): EngineExecutionItem[] {\n return this.#executions;\n }\n\n public get devtools(): DevToolsNodeContext {\n return this.#devtools;\n }\n\n public get envPaths(): EnvPaths {\n return getEnvPaths({\n orgId: kebabCase(this.orgId),\n appId: kebabCase(this.framework.name),\n workspaceRoot: this.cwd\n });\n }\n\n public get framework(): FrameworkOptions {\n return {\n name: \"powerlines\",\n orgId: \"storm-software\",\n ...this.options.framework\n };\n }\n\n public get orgId(): string {\n return this.framework.orgId;\n }\n\n /**\n * Creates a new Context instance.\n *\n * @param options - The options to use for creating the context, including the resolved configuration and workspace settings.\n * @param connection - The connection metadata for the dev server.\n */\n protected constructor(\n public override options: EngineOptions,\n public connection: ConnectionMeta\n ) {\n super(options);\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 command - The path to the execution configuration to load and run, which can be used to specify different execution configurations for different commands or scenarios.\n * @param inlineConfig - Additional configuration options provided at runtime, which can override or supplement the options defined in the user configuration file.\n */\n public async loadExecutions(\n command: string,\n inlineConfig: PartialKeys<InlineConfig, \"command\">\n ): Promise<EngineExecutionItem[]> {\n const root = resolveRoot(\n this.cwd,\n inlineConfig.root,\n inlineConfig.configFile\n );\n\n const parsedConfig = await loadParsedConfig(\n this.cwd,\n root,\n this.framework?.name,\n this.orgId,\n { ...inlineConfig, command }\n );\n if (!parsedConfig) {\n throw new Error(\"Failed to load configuration\");\n }\n\n const configs = toArray(parsedConfig.config);\n const name =\n inlineConfig.name ||\n configs.reduce(\n (ret, config) => ret || config.name,\n undefined as string | undefined\n ) ||\n (await getName(this.cwd, root));\n\n const invocationId = uuid();\n const executions = await Promise.all(\n configs.map(async (config, configIndex) => {\n const executionId = formatExecutionId(\n config.name || name,\n command,\n configIndex\n );\n\n const options = {\n name: config.name || name,\n cwd: this.cwd,\n root,\n framework: this.framework,\n orgId: this.orgId,\n ...this.options,\n command,\n baseURL: this.#devtools.host.resolveOrigin(),\n connection: this.connection,\n configFile: parsedConfig.configFile!,\n executionId,\n configIndex\n };\n\n this.logger.debug({\n meta: { category: \"config\" },\n message: `Invoking ${command} with the following execution parameters: \\n --- Options --- \\n${formatConfig(\n options\n )}\\n --- Inline Config --- \\n${formatConfig(inlineConfig)}`\n });\n\n return {\n invocationId,\n command,\n configFile: parsedConfig,\n options,\n state: {\n command: null,\n hook: null,\n plugin: null\n }\n };\n })\n );\n\n this.#executions = this.#executions.concat(executions);\n\n return executions;\n }\n\n /**\n * Complete an execution by removing it from the list of active executions based on the provided invocation ID and execution ID. This method is typically called when an execution has finished or has been terminated, allowing the context to clean up any resources associated with that execution and update its internal state accordingly.\n *\n * @param invocationId - The unique identifier for the invocation of the execution to be completed.\n * @param executionId - The unique identifier for the specific execution to be completed.\n */\n public completeExecution(invocationId: string, executionId: string) {\n this.#executions = this.#executions.filter(\n execution =>\n execution.options.executionId !== executionId ||\n execution.invocationId !== invocationId\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;AAsDA,IAAa,0BAAb,MAAa,gCACH,sBAEV;CAiIoB;CACT;CAjIT,cAAqC,CAAC;CAEtC;CAEA;;;;;;;CAQA,aAAoB,KAClB,SACA,MACA,YACkD;EAClD,MAAM,UAAU,IAAI,wBAClB,SACA,UACF;EAEA,QAAQA,YAAY,MAAM,kBAAkB;GAC1C,KAAK,QAAQ;GACb,MAAM;GACN;EACF,CAAC;EACD,MAAM,QAAQ,QAAQ,QAAQA,SAAS;EAEvC,QAAQA,UAAU,IAAI,SAAS;GAC7B,MAA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qB;EAClE,KAAKA,cAAc,KAAKA,YAAY,QAClC,cACE,UAAU,QAAQ,gBAAgB,eAClC,UAAU,iBAAiB,YAC/B;CACF;AACF"}
@@ -24,8 +24,9 @@ function createApi(handlers, inlineConfig = {}) {
24
24
  return async (params) => {
25
25
  const { command, options } = params;
26
26
  if (!handlers[command]) throw new Error(`No API handler function could be found for the command "${command}". Please ensure that a handler function for this command is defined in the \`handlers\` parameter provided to \`createApi\`. The commands available with the current \`handlers\` include: ${(0, _stryke_string_format_list.list)(Object.keys(handlers))}.`);
27
+ options.name ??= await (0, _powerlines_core_plugin_utils.getName)(options.cwd, options.root);
27
28
  options.configIndex ??= 0;
28
- options.executionId ??= (0, _powerlines_core_plugin_utils.formatExecutionId)(params.inlineConfig.name || options.root, command, options.configIndex);
29
+ options.executionId ??= (0, _powerlines_core_plugin_utils.formatExecutionId)(options.name, command, options.configIndex);
29
30
  let rpc;
30
31
  if (require_helpers_type_checks.isEngineExecutionOptions(options) && options.channel) {
31
32
  const duplex = new require_helpers_stream.MessagePortDuplex(options.channel);
@@ -38,17 +39,18 @@ function createApi(handlers, inlineConfig = {}) {
38
39
  else throw new Error(`Execution RPC client could not be created - Missing ${!options.baseURL ? `baseURL${options.connection ? ` and connection information` : ""}` : "connection"} or connection information.`);
39
40
  }
40
41
  const logFn = (meta, message) => {
42
+ const resolvedMeta = {
43
+ category: "general",
44
+ ...options,
45
+ ...(0, _stryke_type_checks_is_set_object.isSetObject)(meta) ? meta : { type: meta },
46
+ logId: (0, _stryke_unique_id_uuid.uuid)(),
47
+ timestamp: Date.now()
48
+ };
41
49
  if (rpc) rpc.callEvent("powerlines:log", {
42
- meta: {
43
- category: "general",
44
- ...options,
45
- ...(0, _stryke_type_checks_is_set_object.isSetObject)(meta) ? meta : { type: meta },
46
- logId: (0, _stryke_unique_id_uuid.uuid)(),
47
- timestamp: Date.now()
48
- },
50
+ meta: resolvedMeta,
49
51
  message
50
52
  });
51
- else (0, _powerlines_core_plugin_utils.consoleLogger)(meta, message);
53
+ else (0, _powerlines_core_plugin_utils.consoleLogger)(resolvedMeta, message);
52
54
  };
53
55
  const context = await _powerlines_core_context_execution_context.PowerlinesExecutionContext.from({
54
56
  ...options,
@@ -1 +1 @@
1
- {"version":3,"file":"create-api.d.cts","names":[],"sources":["../../src/helpers/create-api.ts"],"mappings":";;;;;;;;;AAoDA;;;;;iBAAgB,SAAA,kBACG,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,IACtD,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,oBACxB,gBAAA,GAAmB,gBAAA,oBAClB,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,UACtD,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,SAExC,QAAA,EAAU,SAAA,EACV,YAAA,GACI,WAAA,CAAY,YAAA,MACV,IAAA,EAAM,YAAA,KAAiB,YAAA,CAAa,YAAA,MAE1C,MAAA,EAAQ,kBAAA,CAAmB,QAAA,QAAgB,SAAA,eACxC,OAAA"}
1
+ {"version":3,"file":"create-api.d.cts","names":[],"sources":["../../src/helpers/create-api.ts"],"mappings":";;;;;;;;;AAqDA;;;;;iBAAgB,SAAA,kBACG,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,IACtD,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,oBACxB,gBAAA,GAAmB,gBAAA,oBAClB,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,UACtD,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,SAExC,QAAA,EAAU,SAAA,EACV,YAAA,GACI,WAAA,CAAY,YAAA,MACV,IAAA,EAAM,YAAA,KAAiB,YAAA,CAAa,YAAA,MAE1C,MAAA,EAAQ,kBAAA,CAAmB,QAAA,QAAgB,SAAA,eACxC,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-api.d.mts","names":[],"sources":["../../src/helpers/create-api.ts"],"mappings":";;;;;;;;;AAoDA;;;;;iBAAgB,SAAA,kBACG,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,IACtD,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,oBACxB,gBAAA,GAAmB,gBAAA,oBAClB,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,UACtD,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,SAExC,QAAA,EAAU,SAAA,EACV,YAAA,GACI,WAAA,CAAY,YAAA,MACV,IAAA,EAAM,YAAA,KAAiB,YAAA,CAAa,YAAA,MAE1C,MAAA,EAAQ,kBAAA,CAAmB,QAAA,QAAgB,SAAA,eACxC,OAAA"}
1
+ {"version":3,"file":"create-api.d.mts","names":[],"sources":["../../src/helpers/create-api.ts"],"mappings":";;;;;;;;;AAqDA;;;;;iBAAgB,SAAA,kBACG,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,IACtD,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,oBACxB,gBAAA,GAAmB,gBAAA,oBAClB,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,UACtD,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,SAExC,QAAA,EAAU,SAAA,EACV,YAAA,GACI,WAAA,CAAY,YAAA,MACV,IAAA,EAAM,YAAA,KAAiB,YAAA,CAAa,YAAA,MAE1C,MAAA,EAAQ,kBAAA,CAAmB,QAAA,QAAgB,SAAA,eACxC,OAAA"}
@@ -1,7 +1,7 @@
1
1
  import { createRpcClient } from "./rpc.mjs";
2
2
  import { MessagePortDuplex } from "./stream.mjs";
3
3
  import { isEngineExecutionOptions } from "./type-checks.mjs";
4
- import { consoleLogger, formatExecutionId } from "@powerlines/core/plugin-utils";
4
+ import { consoleLogger, formatExecutionId, getName } from "@powerlines/core/plugin-utils";
5
5
  import { titleCase } from "@stryke/string-format/title-case";
6
6
  import { isSetObject } from "@stryke/type-checks/is-set-object";
7
7
  import { PowerlinesExecutionContext } from "@powerlines/core/context/execution-context";
@@ -23,8 +23,9 @@ function createApi(handlers, inlineConfig = {}) {
23
23
  return async (params) => {
24
24
  const { command, options } = params;
25
25
  if (!handlers[command]) throw new Error(`No API handler function could be found for the command "${command}". Please ensure that a handler function for this command is defined in the \`handlers\` parameter provided to \`createApi\`. The commands available with the current \`handlers\` include: ${list(Object.keys(handlers))}.`);
26
+ options.name ??= await getName(options.cwd, options.root);
26
27
  options.configIndex ??= 0;
27
- options.executionId ??= formatExecutionId(params.inlineConfig.name || options.root, command, options.configIndex);
28
+ options.executionId ??= formatExecutionId(options.name, command, options.configIndex);
28
29
  let rpc;
29
30
  if (isEngineExecutionOptions(options) && options.channel) {
30
31
  const duplex = new MessagePortDuplex(options.channel);
@@ -37,17 +38,18 @@ function createApi(handlers, inlineConfig = {}) {
37
38
  else throw new Error(`Execution RPC client could not be created - Missing ${!options.baseURL ? `baseURL${options.connection ? ` and connection information` : ""}` : "connection"} or connection information.`);
38
39
  }
39
40
  const logFn = (meta, message) => {
41
+ const resolvedMeta = {
42
+ category: "general",
43
+ ...options,
44
+ ...isSetObject(meta) ? meta : { type: meta },
45
+ logId: uuid(),
46
+ timestamp: Date.now()
47
+ };
40
48
  if (rpc) rpc.callEvent("powerlines:log", {
41
- meta: {
42
- category: "general",
43
- ...options,
44
- ...isSetObject(meta) ? meta : { type: meta },
45
- logId: uuid(),
46
- timestamp: Date.now()
47
- },
49
+ meta: resolvedMeta,
48
50
  message
49
51
  });
50
- else consoleLogger(meta, message);
52
+ else consoleLogger(resolvedMeta, message);
51
53
  };
52
54
  const context = await PowerlinesExecutionContext.from({
53
55
  ...options,
@@ -1 +1 @@
1
- {"version":3,"file":"create-api.mjs","names":[],"sources":["../../src/helpers/create-api.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 {\n ExecutionContext,\n ExecutionOptions,\n InlineConfig,\n LogFnMeta\n} from \"@powerlines/core\";\nimport { PowerlinesExecutionContext } from \"@powerlines/core/context/execution-context\";\nimport { resolvePluginConfig } from \"@powerlines/core/lib/context-helpers\";\nimport {\n consoleLogger,\n formatExecutionId\n} from \"@powerlines/core/plugin-utils\";\nimport { list } from \"@stryke/string-format/list\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type { DeepPartial, MaybePromise } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport { defu } from \"defu\";\nimport type { RpcClient } from \"../types\";\nimport type { ExecutionApiParams } from \"../types/api\";\nimport type { EngineResolvedConfig } from \"../types/config\";\nimport type { EngineSystemContext } from \"../types/context\";\nimport { createRpcClient } from \"./rpc\";\nimport { MessagePortDuplex } from \"./stream\";\nimport { isEngineExecutionOptions } from \"./type-checks\";\n\n/**\n * Creates an execution API with the provided methods. Each method will be wrapped to create an execution context and handle errors appropriately.\n *\n * @param handlers - An object where keys are command names and values are functions that take an execution context and return a promise.\n * @param inlineConfig - An optional partial inline configuration object that will be merged with the context's options when creating the execution context for each command.\n * @returns A function that can be used as an execution API handler, which takes execution parameters and invokes the appropriate command handler with a properly constructed execution context.\n */\nexport function createApi<\n TContext extends ExecutionContext<EngineResolvedConfig, EngineSystemContext> =\n ExecutionContext<EngineResolvedConfig, EngineSystemContext>,\n TOptions extends ExecutionOptions = ExecutionOptions,\n THandlers extends Record<string, (context: TContext) => Promise<void>> =\n Record<string, (context: TContext) => Promise<void>>\n>(\n handlers: THandlers,\n inlineConfig:\n | DeepPartial<InlineConfig>\n | ((prev: InlineConfig) => MaybePromise<InlineConfig>) = {}\n): (\n params: ExecutionApiParams<TOptions, keyof THandlers & string>\n) => Promise<void> {\n return async (\n params: ExecutionApiParams<TOptions, keyof THandlers & string>\n ) => {\n const { command, options } = params;\n\n if (!handlers[command]) {\n throw new Error(\n `No API handler function could be found for the command \"${\n command\n }\". Please ensure that a handler function for this command is defined in the \\`handlers\\` parameter provided to \\`createApi\\`. The commands available with the current \\`handlers\\` include: ${list(\n Object.keys(handlers)\n )}.`\n );\n }\n\n options.configIndex ??= 0;\n options.executionId ??= formatExecutionId(\n params.inlineConfig.name || options.root,\n command,\n options.configIndex\n );\n\n let rpc: RpcClient | undefined;\n if (isEngineExecutionOptions(options) && options.channel) {\n const duplex = new MessagePortDuplex(options.channel);\n duplex.setEncoding(\"utf8\");\n duplex.on(\"data\", (chunk: string) => duplex.write(chunk.toUpperCase()));\n duplex.on(\"end\", () => {\n duplex.end();\n });\n\n if (options.baseURL && options.connection) {\n rpc = createRpcClient(options);\n } else {\n throw new Error(\n `Execution RPC client could not be created - Missing ${\n !options.baseURL\n ? `baseURL${options.connection ? ` and connection information` : \"\"}`\n : \"connection\"\n } or connection information.`\n );\n }\n }\n\n const logFn = (meta: LogFnMeta, message: string) => {\n if (rpc) {\n void rpc.callEvent(\"powerlines:log\", {\n meta: {\n category: \"general\",\n ...options,\n ...(isSetObject(meta) ? meta : { type: meta }),\n logId: uuid(),\n timestamp: Date.now()\n },\n message\n });\n } else {\n consoleLogger(meta, message);\n }\n };\n\n const context = (await PowerlinesExecutionContext.from<\n EngineResolvedConfig,\n EngineSystemContext\n >(\n { ...options, logFn },\n isFunction(inlineConfig)\n ? await Promise.resolve(inlineConfig(params.inlineConfig ?? {}))\n : (defu(inlineConfig, params.inlineConfig ?? {}) as InlineConfig),\n {\n rpc: rpc!\n }\n )) as TContext;\n\n context.logger.info(\n `Starting ${\n titleCase(options.framework?.name) || \"Powerlines\"\n } - ${titleCase(command)} execution (${options.executionId})`\n );\n\n await resolvePluginConfig<EngineResolvedConfig, EngineSystemContext>(\n context\n );\n\n if (!context.config.input) {\n throw new Error(\n `No input defined in configuration for ${\n command\n } execution. Please ensure that the configuration file defines an input for this execution, or provide an inline configuration with the necessary input.`\n );\n }\n\n await handlers[command](context);\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoDA,SAAgB,UAOd,UACA,eAE2D,CAAC,GAG3C;CACjB,OAAO,OACL,WACG;EACH,MAAM,EAAE,SAAS,YAAY;EAE7B,IAAI,CAAC,SAAS,UACZ,MAAM,IAAI,MACR,2DACE,QACD,8LAA8L,KAC7L,OAAO,KAAK,QAAQ,CACtB,EAAE,EACJ;EAGF,QAAQ,gBAAgB;EACxB,QAAQ,gBAAgB,kBACtB,OAAO,aAAa,QAAQ,QAAQ,MACpC,SACA,QAAQ,WACV;EAEA,IAAI;EACJ,IAAI,yBAAyB,OAAO,KAAK,QAAQ,SAAS;GACxD,MAAM,SAAS,IAAI,kBAAkB,QAAQ,OAAO;GACpD,OAAO,YAAY,MAAM;GACzB,OAAO,GAAG,SAAS,UAAkB,OAAO,MAAM,MAAM,YAAY,CAAC,CAAC;GACtE,OAAO,GAAG,aAAa;IACrB,OAAO,IAAI;GACb,CAAC;GAED,IAAI,QAAQ,WAAW,QAAQ,YAC7B,MAAM,gBAAgB,OAAO;QAE7B,MAAM,IAAI,MACR,uDACE,CAAC,QAAQ,UACL,UAAU,QAAQ,aAAa,gCAAgC,OAC/D,aACL,4BACH;EAEJ;EAEA,MAAM,SAAS,MAAiB,YAAoB;GAClD,IAAI,KACF,AAAK,IAAI,UAAU,kBAAkB;IACnC,MAAM;KACJ,UAAU;KACV,GAAG;KACH,GAAI,YAAY,IAAI,IAAI,OAAO,EAAE,MAAM,KAAK;KAC5C,OAAO,KAAK;KACZ,WAAW,KAAK,IAAI;IACtB;IACA;GACF,CAAC;QAED,cAAc,MAAM,OAAO;EAE/B;EAEA,MAAM,UAAW,MAAM,2BAA2B,KAIhD;GAAE,GAAG;GAAS;EAAM,GACpB,WAAW,YAAY,IACnB,MAAM,QAAQ,QAAQ,aAAa,OAAO,gBAAgB,CAAC,CAAC,CAAC,IAC5D,KAAK,cAAc,OAAO,gBAAgB,CAAC,CAAC,GACjD,EACO,IACP,CACF;EAEA,QAAQ,OAAO,KACb,YACE,UAAU,QAAQ,WAAW,IAAI,KAAK,aACvC,KAAK,UAAU,OAAO,EAAE,cAAc,QAAQ,YAAY,EAC7D;EAEA,MAAM,oBACJ,OACF;EAEA,IAAI,CAAC,QAAQ,OAAO,OAClB,MAAM,IAAI,MACR,yCACE,QACD,wJACH;EAGF,MAAM,SAAS,QAAQ,CAAC,OAAO;CACjC;AACF"}
1
+ {"version":3,"file":"create-api.mjs","names":[],"sources":["../../src/helpers/create-api.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 {\n ExecutionContext,\n ExecutionOptions,\n InlineConfig,\n LogFnMeta\n} from \"@powerlines/core\";\nimport { PowerlinesExecutionContext } from \"@powerlines/core/context/execution-context\";\nimport { resolvePluginConfig } from \"@powerlines/core/lib/context-helpers\";\nimport {\n consoleLogger,\n formatExecutionId,\n getName\n} from \"@powerlines/core/plugin-utils\";\nimport { list } from \"@stryke/string-format/list\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type { DeepPartial, MaybePromise } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport { defu } from \"defu\";\nimport type { RpcClient } from \"../types\";\nimport type { ExecutionApiParams } from \"../types/api\";\nimport type { EngineResolvedConfig } from \"../types/config\";\nimport type { EngineSystemContext } from \"../types/context\";\nimport { createRpcClient } from \"./rpc\";\nimport { MessagePortDuplex } from \"./stream\";\nimport { isEngineExecutionOptions } from \"./type-checks\";\n\n/**\n * Creates an execution API with the provided methods. Each method will be wrapped to create an execution context and handle errors appropriately.\n *\n * @param handlers - An object where keys are command names and values are functions that take an execution context and return a promise.\n * @param inlineConfig - An optional partial inline configuration object that will be merged with the context's options when creating the execution context for each command.\n * @returns A function that can be used as an execution API handler, which takes execution parameters and invokes the appropriate command handler with a properly constructed execution context.\n */\nexport function createApi<\n TContext extends ExecutionContext<EngineResolvedConfig, EngineSystemContext> =\n ExecutionContext<EngineResolvedConfig, EngineSystemContext>,\n TOptions extends ExecutionOptions = ExecutionOptions,\n THandlers extends Record<string, (context: TContext) => Promise<void>> =\n Record<string, (context: TContext) => Promise<void>>\n>(\n handlers: THandlers,\n inlineConfig:\n | DeepPartial<InlineConfig>\n | ((prev: InlineConfig) => MaybePromise<InlineConfig>) = {}\n): (\n params: ExecutionApiParams<TOptions, keyof THandlers & string>\n) => Promise<void> {\n return async (\n params: ExecutionApiParams<TOptions, keyof THandlers & string>\n ) => {\n const { command, options } = params;\n\n if (!handlers[command]) {\n throw new Error(\n `No API handler function could be found for the command \"${\n command\n }\". Please ensure that a handler function for this command is defined in the \\`handlers\\` parameter provided to \\`createApi\\`. The commands available with the current \\`handlers\\` include: ${list(\n Object.keys(handlers)\n )}.`\n );\n }\n\n options.name ??= await getName(options.cwd, options.root);\n options.configIndex ??= 0;\n options.executionId ??= formatExecutionId(\n options.name,\n command,\n options.configIndex\n );\n\n let rpc: RpcClient | undefined;\n if (isEngineExecutionOptions(options) && options.channel) {\n const duplex = new MessagePortDuplex(options.channel);\n duplex.setEncoding(\"utf8\");\n duplex.on(\"data\", (chunk: string) => duplex.write(chunk.toUpperCase()));\n duplex.on(\"end\", () => {\n duplex.end();\n });\n\n if (options.baseURL && options.connection) {\n rpc = createRpcClient(options);\n } else {\n throw new Error(\n `Execution RPC client could not be created - Missing ${\n !options.baseURL\n ? `baseURL${options.connection ? ` and connection information` : \"\"}`\n : \"connection\"\n } or connection information.`\n );\n }\n }\n\n const logFn = (meta: LogFnMeta, message: string) => {\n const resolvedMeta = {\n category: \"general\",\n ...options,\n ...(isSetObject(meta) ? meta : { type: meta }),\n logId: uuid(),\n timestamp: Date.now()\n };\n\n if (rpc) {\n void rpc.callEvent(\"powerlines:log\", {\n meta: resolvedMeta,\n message\n });\n } else {\n consoleLogger(resolvedMeta, message);\n }\n };\n\n const context = (await PowerlinesExecutionContext.from<\n EngineResolvedConfig,\n EngineSystemContext\n >(\n { ...options, logFn },\n isFunction(inlineConfig)\n ? await Promise.resolve(inlineConfig(params.inlineConfig ?? {}))\n : (defu(inlineConfig, params.inlineConfig ?? {}) as InlineConfig),\n {\n rpc: rpc!\n }\n )) as TContext;\n\n context.logger.info(\n `Starting ${\n titleCase(options.framework?.name) || \"Powerlines\"\n } - ${titleCase(command)} execution (${options.executionId})`\n );\n\n await resolvePluginConfig<EngineResolvedConfig, EngineSystemContext>(\n context\n );\n\n if (!context.config.input) {\n throw new Error(\n `No input defined in configuration for ${\n command\n } execution. Please ensure that the configuration file defines an input for this execution, or provide an inline configuration with the necessary input.`\n );\n }\n\n await handlers[command](context);\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqDA,SAAgB,UAOd,UACA,eAE2D,CAAC,GAG3C;CACjB,OAAO,OACL,WACG;EACH,MAAM,EAAE,SAAS,YAAY;EAE7B,IAAI,CAAC,SAAS,UACZ,MAAM,IAAI,MACR,2DACE,QACD,8LAA8L,KAC7L,OAAO,KAAK,QAAQ,CACtB,EAAE,EACJ;EAGF,QAAQ,SAAS,MAAM,QAAQ,QAAQ,KAAK,QAAQ,IAAI;EACxD,QAAQ,gBAAgB;EACxB,QAAQ,gBAAgB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artialKeys<DevframeDefinition, "name" | "setup">, "id
37
37
  };
38
38
  interface ApiExecutionOptions extends ExecutionOptions {}
39
39
  interface EngineExecutionOptions extends ExecutionOptions {
40
+ /**
41
+ * The name of the project being built, which can be used by plugins to customize their behavior based on the specific project being built. This value is optional and can be set to `undefined` if not applicable, but providing it allows plugins to make informed decisions about how to handle certain tasks or configurations based on the project being built.
42
+ */
43
+ name: string;
40
44
  /**
41
45
  * The base URL for the dev server, which can be used by plugins to construct URLs for assets or API endpoints during development. This value is only relevant in "dev" mode and will be `undefined` in "build" mode.
42
46
  */
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;;;AAoCA;KAAY,aAAA,GAAgB,IAAA,CAC1B,WAAA,CAAY,kBAAA,0CAGZ,OAAA;;;;EAIE,IAAA;EAJF;;;EASE,IAAA;EAkB4B;;;EAb5B,IAAA;EAdF;;;;;;EAsBE,YAAA,GAAe,YAAA;EAKH;;AAAgB;EAA5B,SAAA,GAAY,gBAAA;AAAA;AAAA,UAGC,mBAAA,SAA4B,gBAAgB;AAAA,UAE5C,sBAAA,SAA+B,gBAAA;EAA/B;;;EAIf,OAAA;EAUS;;;EALT,UAAA,EAAY,cAAA;EAgBuB;;;EAXnC,OAAA,EAAS,WAAA;EAoBgB;;;EAfzB,SAAA,GAAY,OAAA,CAAQ,mBAAA;EAnB0B;;;EAwB9C,UAAA,GAAa,OAAA,CACX,YAAA,CAAa,kBAAA,EAAoB,kBAAA;EAXnC;;;;;;EAoBA,YAAA,aAAyB,OAAA,CAAQ,eAAA;AAAA;AAAA,KAGvB,gBAAA,GAAmB,YAAY,CACzC,sBAAA;AAAA,KAIU,oBAAA,qBAAyC,UAAA,GAAa,UAAA,IAChE,cAAA,CAAe,WAAA,EAAa,sBAAA"}
1
+ {"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;;;AAoCA;KAAY,aAAA,GAAgB,IAAA,CAC1B,WAAA,CAAY,kBAAA,0CAGZ,OAAA;;;;EAIE,IAAA;EAJF;;;EASE,IAAA;EAkB4B;;;EAb5B,IAAA;EAdF;;;;;;EAsBE,YAAA,GAAe,YAAA;EAKH;;AAAgB;EAA5B,SAAA,GAAY,gBAAA;AAAA;AAAA,UAGC,mBAAA,SAA4B,gBAAgB;AAAA,UAE5C,sBAAA,SAA+B,gBAAA;EAA/B;;;EAIf,IAAA;EAeS;;;EAVT,OAAA;EAqBmC;;;EAhBnC,UAAA,EAAY,cAAA;EAyBa;;;EApBzB,OAAA,EAAS,WAAA;EAnBqC;;;EAwB9C,SAAA,GAAY,OAAA,CAAQ,mBAAA;EAVR;;;EAeZ,UAAA,GAAa,OAAA,CACX,YAAA,CAAa,kBAAA,EAAoB,kBAAA;EANvB;;;;;;EAeZ,YAAA,aAAyB,OAAA,CAAQ,eAAA;AAAA;AAAA,KAGvB,gBAAA,GAAmB,YAAY,CACzC,sBAAA;AAAA,KAIU,oBAAA,qBAAyC,UAAA,GAAa,UAAA,IAChE,cAAA,CAAe,WAAA,EAAa,sBAAA"}
@@ -37,6 +37,10 @@ type EngineOptions = Omit<PartialKeys<DevframeDefinition, "name" | "setup">, "id
37
37
  };
38
38
  interface ApiExecutionOptions extends ExecutionOptions {}
39
39
  interface EngineExecutionOptions extends ExecutionOptions {
40
+ /**
41
+ * The name of the project being built, which can be used by plugins to customize their behavior based on the specific project being built. This value is optional and can be set to `undefined` if not applicable, but providing it allows plugins to make informed decisions about how to handle certain tasks or configurations based on the project being built.
42
+ */
43
+ name: string;
40
44
  /**
41
45
  * The base URL for the dev server, which can be used by plugins to construct URLs for assets or API endpoints during development. This value is only relevant in "dev" mode and will be `undefined` in "build" mode.
42
46
  */
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;;;AAoCA;KAAY,aAAA,GAAgB,IAAA,CAC1B,WAAA,CAAY,kBAAA,0CAGZ,O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AeZ,YAAA,aAAyB,OAAA,CAAQ,eAAA;AAAA;AAAA,KAGvB,gBAAA,GAAmB,YAAY,CACzC,sBAAA;AAAA,KAIU,oBAAA,qBAAyC,UAAA,GAAa,UAAA,IAChE,cAAA,CAAe,WAAA,EAAa,sBAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/engine",
3
- "version": "0.49.50",
3
+ "version": "0.49.52",
4
4
  "private": false,
5
5
  "description": "An internal package containing the core engine modules for Powerlines.",
6
6
  "homepage": "https://stormsoftware.com",
@@ -120,7 +120,7 @@
120
120
  "types": "./dist/index.d.cts",
121
121
  "files": ["dist"],
122
122
  "dependencies": {
123
- "@powerlines/core": "^0.48.48",
123
+ "@powerlines/core": "^0.48.50",
124
124
  "@storm-software/config": "^1.137.72",
125
125
  "@storm-software/config-tools": "^1.190.40",
126
126
  "@stryke/async": "^0.1.12",
@@ -153,8 +153,8 @@
153
153
  "devDependencies": {
154
154
  "@storm-software/testing-tools": "^1.119.193",
155
155
  "@stryke/types": "^0.12.12",
156
- "@types/node": "^25.9.1",
156
+ "@types/node": "^25.9.2",
157
157
  "typescript": "^6.0.3"
158
158
  },
159
- "gitHead": "3d69d66bdb43fcddc6181fc9dc979645c2f1cf1e"
159
+ "gitHead": "c5d53659563ee53a4d919ab56b16cd18b0c9090b"
160
160
  }