@powerlines/engine 0.9.3 → 0.9.5

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.
Files changed (59) hide show
  1. package/dist/api/build.d.mts +2 -2
  2. package/dist/api/clean.d.mts +2 -2
  3. package/dist/api/create.d.mts +2 -2
  4. package/dist/api/deploy.d.mts +2 -2
  5. package/dist/api/docs.d.mts +2 -2
  6. package/dist/api/lint.d.mts +2 -2
  7. package/dist/api/prepare.d.mts +2 -2
  8. package/dist/api/test.d.mts +2 -2
  9. package/dist/api/types.d.mts +2 -2
  10. package/dist/{api-CcNgO71y.d.mts → api-Cdw4v0W4.d.mts} +3 -3
  11. package/dist/{api-CcNgO71y.d.mts.map → api-Cdw4v0W4.d.mts.map} +1 -1
  12. package/dist/{config-C9AD-erz.d.mts → config-BNe23XHx.d.mts} +1 -1
  13. package/dist/{config-C9AD-erz.d.mts.map → config-BNe23XHx.d.mts.map} +1 -1
  14. package/dist/{engine-context-SEzTm1aq.cjs → context/engine-context.cjs} +3 -7
  15. package/dist/context/engine-context.d.cts +2 -0
  16. package/dist/context/engine-context.d.mts +2 -0
  17. package/dist/{engine-context-f72fUF0N.mjs → context/engine-context.mjs} +2 -2
  18. package/dist/context/engine-context.mjs.map +1 -0
  19. package/dist/context/index.cjs +2 -2
  20. package/dist/context/index.d.mts +1 -1
  21. package/dist/context/index.mjs +1 -1
  22. package/dist/{context-S3XH2DWP.d.mts → context-DzgsMSWr.d.mts} +2 -2
  23. package/dist/{context-S3XH2DWP.d.mts.map → context-DzgsMSWr.d.mts.map} +1 -1
  24. package/dist/{engine-context-BiDxBwme.d.mts → engine-context-DEotmVzB.d.mts} +3 -3
  25. package/dist/{engine-context-BiDxBwme.d.mts.map → engine-context-DEotmVzB.d.mts.map} +1 -1
  26. package/dist/engine.cjs +2 -2
  27. package/dist/engine.d.mts +4 -4
  28. package/dist/engine.mjs +1 -1
  29. package/dist/execution-host.cjs +44 -0
  30. package/dist/execution-host.d.cts +14 -0
  31. package/dist/execution-host.d.cts.map +1 -0
  32. package/dist/execution-host.d.mts +14 -0
  33. package/dist/execution-host.d.mts.map +1 -0
  34. package/dist/execution-host.mjs +36 -0
  35. package/dist/execution-host.mjs.map +1 -0
  36. package/dist/helpers/create-execution-host.cjs +5 -3
  37. package/dist/helpers/create-execution-host.d.cts +4 -1
  38. package/dist/helpers/create-execution-host.d.cts.map +1 -1
  39. package/dist/helpers/create-execution-host.d.mts +7 -4
  40. package/dist/helpers/create-execution-host.d.mts.map +1 -1
  41. package/dist/helpers/create-execution-host.mjs +5 -3
  42. package/dist/helpers/create-execution-host.mjs.map +1 -1
  43. package/dist/helpers/execution-host-worker.d.mts +2 -2
  44. package/dist/helpers/rpc.d.mts +1 -1
  45. package/dist/index-CNgSR_kt.d.mts +1 -0
  46. package/dist/index-D_TYgLX3.d.cts +1 -0
  47. package/dist/index.cjs +10 -1
  48. package/dist/index.d.cts +5 -1
  49. package/dist/index.d.mts +8 -4
  50. package/dist/index.mjs +6 -1
  51. package/package.json +13 -5
  52. package/dist/engine-context-f72fUF0N.mjs.map +0 -1
  53. package/dist/worker/execution-host.cjs +0 -577
  54. package/dist/worker/execution-host.d.cts +0 -76
  55. package/dist/worker/execution-host.d.cts.map +0 -1
  56. package/dist/worker/execution-host.d.mts +0 -76
  57. package/dist/worker/execution-host.d.mts.map +0 -1
  58. package/dist/worker/execution-host.mjs +0 -540
  59. package/dist/worker/execution-host.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
- import { r as EngineResolvedConfig } from "../config-C9AD-erz.mjs";
2
- import { r as EngineSystemContext } from "../context-S3XH2DWP.mjs";
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
3
  import { ExecutionContext } from "@powerlines/core";
4
4
 
5
5
  //#region src/api/build.d.ts
@@ -1,5 +1,5 @@
1
- import { r as EngineResolvedConfig } from "../config-C9AD-erz.mjs";
2
- import { r as EngineSystemContext } from "../context-S3XH2DWP.mjs";
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
3
  import { ExecutionContext } from "@powerlines/core";
4
4
 
5
5
  //#region src/api/clean.d.ts
@@ -1,5 +1,5 @@
1
- import { r as EngineResolvedConfig } from "../config-C9AD-erz.mjs";
2
- import { r as EngineSystemContext } from "../context-S3XH2DWP.mjs";
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
3
  import { ExecutionContext } from "@powerlines/core";
4
4
 
5
5
  //#region src/api/create.d.ts
@@ -1,5 +1,5 @@
1
- import { r as EngineResolvedConfig } from "../config-C9AD-erz.mjs";
2
- import { r as EngineSystemContext } from "../context-S3XH2DWP.mjs";
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
3
  import { ExecutionContext } from "@powerlines/core";
4
4
 
5
5
  //#region src/api/deploy.d.ts
@@ -1,5 +1,5 @@
1
- import { r as EngineResolvedConfig } from "../config-C9AD-erz.mjs";
2
- import { r as EngineSystemContext } from "../context-S3XH2DWP.mjs";
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
3
  import { ExecutionContext } from "@powerlines/core";
4
4
 
5
5
  //#region src/api/docs.d.ts
@@ -1,5 +1,5 @@
1
- import { r as EngineResolvedConfig } from "../config-C9AD-erz.mjs";
2
- import { r as EngineSystemContext } from "../context-S3XH2DWP.mjs";
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
3
  import { ExecutionContext } from "@powerlines/core";
4
4
 
5
5
  //#region src/api/lint.d.ts
@@ -1,5 +1,5 @@
1
- import { r as EngineResolvedConfig } from "../config-C9AD-erz.mjs";
2
- import { r as EngineSystemContext } from "../context-S3XH2DWP.mjs";
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
3
  import { ExecutionContext } from "@powerlines/core";
4
4
 
5
5
  //#region src/api/prepare.d.ts
@@ -1,5 +1,5 @@
1
- import { r as EngineResolvedConfig } from "../config-C9AD-erz.mjs";
2
- import { r as EngineSystemContext } from "../context-S3XH2DWP.mjs";
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
3
  import { ExecutionContext } from "@powerlines/core";
4
4
 
5
5
  //#region src/api/test.d.ts
@@ -1,5 +1,5 @@
1
- import { r as EngineResolvedConfig } from "../config-C9AD-erz.mjs";
2
- import { r as EngineSystemContext } from "../context-S3XH2DWP.mjs";
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
3
  import { ExecutionContext } from "@powerlines/core/types/context";
4
4
 
5
5
  //#region src/api/types.d.ts
@@ -1,5 +1,5 @@
1
- import { t as EngineExecutionOptions } from "./config-C9AD-erz.mjs";
2
- import { t as EngineContext } from "./context-S3XH2DWP.mjs";
1
+ import { t as EngineExecutionOptions } from "./config-BNe23XHx.mjs";
2
+ import { t as EngineContext } from "./context-DzgsMSWr.mjs";
3
3
  import { BuildInlineConfig, CleanInlineConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, InlineConfig, LintInlineConfig, PrepareInlineConfig, TestInlineConfig, TypesInlineConfig } from "@powerlines/core";
4
4
  import { EXECUTION_API_METHODS } from "@powerlines/core/constants/api";
5
5
 
@@ -132,4 +132,4 @@ interface Engine<TExecutionAPI extends ReadonlyArray<string>> extends ExecutionI
132
132
  }
133
133
  //#endregion
134
134
  export { PowerlinesExecutionHost as a, ExecutionInterface as i, ExecutionHost as n, Worker as o, ExecutionHostParams as r, Engine as t };
135
- //# sourceMappingURL=api-CcNgO71y.d.mts.map
135
+ //# sourceMappingURL=api-Cdw4v0W4.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-CcNgO71y.d.mts","names":[],"sources":["../src/types/utils.ts","../src/types/api.ts"],"mappings":";;;;;;KAkBY,MAAA,kCAAwC,aAAA,oBAC5C,eAAA,YAA2B,MAAA,EAAQ,OAAA,KAAY,OAAA;EAErD,KAAA;EACA,GAAA,QAAW,OAAA;AAAA;;;;AAJb;;;;;UCuBiB,kBAAA;EDtBsC;;;;;;;;EC+BrD,OAAA,GAAU,YAAA,EAAc,mBAAA,KAAwB,OAAA;ED/BP;;;;;;;;ECyCzC,KAAA,GAAQ,YAAA,EAAc,iBAAA,KAAsB,OAAA;;;AAnB9C;;;;;;;EA8BE,MAAA,GAAS,YAAA,EAAc,kBAAA,KAAuB,OAAA;EAAA;;;;;;;;;EAW9C,KAAA,GAAQ,YAAA,EAAc,iBAAA,KAAsB,OAAA;EAmCF;;;;;;EA3B1C,IAAA,GAAO,YAAA,EAAc,gBAAA,KAAqB,OAAA;EAxClB;;;;;;EAgDxB,IAAA,GAAO,YAAA,EAAc,gBAAA,KAAqB,OAAA;EA3B1C;;;;;;;;;EAsCA,KAAA,GAAQ,YAAA,EAAc,iBAAA,KAAsB,OAAA;EAnBrC;;;;;;EA2BP,IAAA,GAAO,YAAA,EAAc,gBAAA,KAAqB,OAAA;EARpB;;;;;;;;EAkBtB,MAAA,GAAS,YAAA,EAAc,kBAAA,KAAuB,OAAA;EAArC;;;;;;AAaX;;EAHE,QAAA,QAAgB,OAAA;AAAA;AAAA,UAGD,mBAAA;EAIN;;;EAAT,OAAA,EAAS,sBAAA;EAKiB;AAG5B;;EAHE,YAAA,EAAc,YAAA;AAAA;AAAA,KAGJ,aAAA,uBAAoC,aAAA,YAAyB,MAAA,CACvE,mBAAA,EACA,aAAA;AAAA,KAG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mBAAA,EACA,aAAA;AAAA,KAGU,uBAAA,GAA0B,aAAA,QAC7B,qBAAA;;;;UAMQ,MAAA,uBACO,aAAA,kBACd,kBAAA;EAdsC;;;EAkB9C,OAAA,EAAS,aAAA;EAhBI;;AAGf;EAkBE,IAAA,EAAM,aAAA,CAAc,aAAA;AAAA"}
@@ -201,4 +201,4 @@ type RpcClientOptions = RequiredKeys<EngineExecutionOptions, "baseURL" | "connec
201
201
  type EngineResolvedConfig<TUserConfig extends UserConfig = UserConfig> = ResolvedConfig<TUserConfig, EngineExecutionOptions>;
202
202
  //#endregion
203
203
  export { RpcServerFunctions as C, WrappedRpcFunctions as D, WrappedRpcFunction as E, RpcPayloadMetadata as S, WrapRpcFunctions as T, RpcClientRemoteFunctions as _, ExtractRpcFunction as a, RpcFunctions as b, InputRpcFunctions as c, RpcClientCall as d, RpcClientCallEvent as f, RpcClientHost as g, RpcClientFunctions as h, RpcClientOptions as i, LogPayload as l, RpcClientEvents as m, EngineOptions as n, ExtractRpcFunctions as o, RpcClientCallOptional as p, EngineResolvedConfig as r, InputRpcFunction as s, EngineExecutionOptions as t, RpcClient as u, RpcContext as v, WrapRpcFunction as w, RpcPayloadEnvelop as x, RpcFunction as y };
204
- //# sourceMappingURL=config-C9AD-erz.d.mts.map
204
+ //# sourceMappingURL=config-BNe23XHx.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-C9AD-erz.d.mts","names":[],"sources":["../src/types/rpc.ts","../src/types/config.ts"],"mappings":";;;;;;;;;;UAkCiB,kBAAA;;AAAjB;;EAIE,SAAA;EAJiC;;;EAQjC,IAAA;EAQA;;;EAJA,SAAA;EAYW;AAGb;;EAXE,WAAA;EAWqE;;;EAPrE,WAAA;EAWS;;;EAPT,WAAA;AAAA;AAAA,UAGe,iBAAA,mBAAoC,kBAAA;EAO1B;;AAC3B;EAJE,OAAA,EAAS,QAAA;AAAA;AAAA,KAGC,WAAA,IAAe,OAAA,UAAiB,YAAA;AAAA,KAChC,YAAA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;AAAA,UAGC,sBAAA,SAA+B,gBAAA;EDFQ;AACxD;;ECKE,OAAA;EDLyB;;AAE3B;ECQE,UAAA,EAAY,cAAA;;;;EAKZ,SAAA,GAAY,OAAA,CAAQ,mBAAA;EDZO;;;ECiB3B,UAAA,GAAa,OAAA,CACX,YAAA,CAAa,kBAAA,EAAoB,kBAAA;EDhBzB;;;;;;ECyBV,YAAA,aAAyB,OAAA,CAAQ,eAAA;AAAA;AAAA,KAGvB,gBAAA,GAAmB,YAAA,CAC7B,sBAAA;AAAA,KAIU,oBAAA,qBAAyC,UAAA,GAAa,UAAA,IAChE,cAAA,CAAe,WAAA,EAAa,sBAAA"}
@@ -1,4 +1,5 @@
1
- const require_chunk = require('./chunk-C0xms8kb.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_chunk = require('../chunk-C0xms8kb.cjs');
2
3
  let devframe_node = require("devframe/node");
3
4
  let _powerlines_core_context_base_context = require("@powerlines/core/context/base-context");
4
5
  let _powerlines_core_lib_config = require("@powerlines/core/lib/config");
@@ -171,9 +172,4 @@ var PowerlinesEngineContext = class PowerlinesEngineContext extends _powerlines_
171
172
  };
172
173
 
173
174
  //#endregion
174
- Object.defineProperty(exports, 'PowerlinesEngineContext', {
175
- enumerable: true,
176
- get: function () {
177
- return PowerlinesEngineContext;
178
- }
179
- });
175
+ exports.PowerlinesEngineContext = PowerlinesEngineContext;
@@ -0,0 +1,2 @@
1
+ import { t as PowerlinesEngineContext } from "../engine-context-Dw8odBCo.cjs";
2
+ export { PowerlinesEngineContext };
@@ -0,0 +1,2 @@
1
+ import { t as PowerlinesEngineContext } from "../engine-context-DEotmVzB.mjs";
2
+ export { PowerlinesEngineContext };
@@ -169,5 +169,5 @@ var PowerlinesEngineContext = class PowerlinesEngineContext extends PowerlinesBa
169
169
  };
170
170
 
171
171
  //#endregion
172
- export { PowerlinesEngineContext as t };
173
- //# sourceMappingURL=engine-context-f72fUF0N.mjs.map
172
+ export { PowerlinesEngineContext };
173
+ //# sourceMappingURL=engine-context.mjs.map
@@ -0,0 +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 resolveLogLevel,\n withCustomLogger\n} from \"@powerlines/core/plugin-utils\";\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 { 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 method - 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 method: string,\n inlineConfig: InlineConfig\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\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 = uuid();\n const options = {\n cwd: this.cwd,\n root,\n framework: this.framework,\n orgId: this.orgId,\n ...this.options,\n command: method,\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 ${method} 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 method,\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":";;;;;;;;;;;AAmDA,IAAa,0BAAb,MAAa,gCACH,sBAEV;CACE,cAAqC,EAAE;CAEvC;CAEA;;;;;;;CAQA,aAAoB,KAClB,SACA,MACA,YACkD;EAClD,MAAM,UAAU,IAAI,wBAClB,SACA,WACD;AAED,WAAQA,WAAY,MAAM,kBAAkB;GAC1C,KAAK,QAAQ;GACb,MAAM;GACN;GACD,CAAC;AACF,QAAM,QAAQ,QAAQ,SAAQA,SAAU;AAExC,WAAQA,SAAU,IAAI,SAAS;GAC7B,MAAM;GACN,MAAM;GACN,MAAM,CACJ,EAAE,OAAO;IACP,MAAM,EAAE,OAAO;KACb,UAAU,EAAE,QAAQ;KACpB,MAAM,EAAE,QAAQ;KAChB,SAAS,EAAE,QAAQ;KACnB,MAAM,EAAE,QAAQ;KAChB,QAAQ,EAAE,QAAQ;KAClB,QAAQ,EAAE,QAAQ;KACnB,CAAC;IACF,SAAS,EAAE,QAAQ;IACpB,CAAC,CACH;GACD,QAAO,OAAM,EACX,UAAS,YAAW;AAClB,YAAQ,QAAQ,KAAK,MAArB;KACE,KAAK;AACH,cAAQ,MAAM,QAAQ;AACtB;KACF,KAAK;AACH,cAAQ,KAAK,QAAQ;AACrB;KACF,KAAK;AACH,cAAQ,KAAK,QAAQ;AACrB;KACF,KAAK;AACH,cAAQ,MAAM,QAAQ;AACtB;KACF,KAAK;AACH,cAAQ,MAAM,QAAQ;AACtB;KACF;AACE,cAAQ,KAAK,QAAQ;AACrB;;MAGP;GACF,CAAC;AAEF,WAAQC,WAAY,QAAQ,WACxB,gBAAgB,QAAQ,SAAS,GACjC,MAAM,mBAAmB,QAAQ,IAAI;AAEzC,SAAO;;CAGT,AAAgB,aAAa,UAAyB,EAAE,EAAE,OAAe;EACvE,IAAI,SAA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6B,aAAa,aAAa;IAC1D,CAAC;AAEF,UAAO;IACL;IACA;IACA,YAAY;IACZ;IACA,OAAO;KACL,SAAS;KACT,MAAM;KACN,QAAQ;KACT;IACF;IACD,CACH;AAED,QAAKE,aAAc,MAAKA,WAAY,OAAO,WAAW;AAEtD,SAAO;;;;;;;;CAST,AAAO,kBAAkB,cAAsB,aAAqB;AAClE,QAAKA,aAAc,MAAKA,WAAY,QAClC,cACE,UAAU,QAAQ,gBAAgB,eAClC,UAAU,iBAAiB,aAC9B"}
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_engine_context = require('../engine-context-SEzTm1aq.cjs');
2
+ const require_context_engine_context = require('./engine-context.cjs');
3
3
 
4
- exports.PowerlinesEngineContext = require_engine_context.PowerlinesEngineContext;
4
+ exports.PowerlinesEngineContext = require_context_engine_context.PowerlinesEngineContext;
@@ -1,2 +1,2 @@
1
- import { t as PowerlinesEngineContext } from "../engine-context-BiDxBwme.mjs";
1
+ import { t as PowerlinesEngineContext } from "../engine-context-DEotmVzB.mjs";
2
2
  export { PowerlinesEngineContext };
@@ -1,3 +1,3 @@
1
- import { t as PowerlinesEngineContext } from "../engine-context-f72fUF0N.mjs";
1
+ import { PowerlinesEngineContext } from "./engine-context.mjs";
2
2
 
3
3
  export { PowerlinesEngineContext };
@@ -1,4 +1,4 @@
1
- import { n as EngineOptions, t as EngineExecutionOptions, u as RpcClient } from "./config-C9AD-erz.mjs";
1
+ import { n as EngineOptions, t as EngineExecutionOptions, u as RpcClient } from "./config-BNe23XHx.mjs";
2
2
  import { BaseContext, InlineConfig, ParsedUserConfig } from "@powerlines/core";
3
3
  import { ConnectionMeta, DevToolsNodeContext } from "devframe/types";
4
4
 
@@ -146,4 +146,4 @@ interface EngineSystemContext {
146
146
  }
147
147
  //#endregion
148
148
  export { ExecutionHookScopeState as a, ExecutionScopeType as c, ExecutionCommandScopeState as i, ExecutionState as l, EngineExecutionItem as n, ExecutionPluginScopeState as o, EngineSystemContext as r, ExecutionScopeState as s, EngineContext as t };
149
- //# sourceMappingURL=context-S3XH2DWP.d.mts.map
149
+ //# sourceMappingURL=context-DzgsMSWr.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-S3XH2DWP.d.mts","names":[],"sources":["../src/types/context.ts"],"mappings":";;;;;;AA0BA;;KAAY,kBAAA;;;AAKZ;UAAiB,mBAAA;;;;EAIf,SAAA;EAUA;;;EALA,IAAA;EAWe;;;EANf,IAAA,EAAM,kBAAA;AAAA;AAgBR;;;AAAA,UAViB,0BAAA,SAAmC,mBAAA;EAUH;;;EAN/C,IAAA;AAAA;AAqBF;;;AAAA,UAfiB,uBAAA,SAAgC,mBAAA;EAmB3C;AAMN;;EArBE,KAAA;EAyBS;;;EApBT,IAAA;AAAA;;;;UAMe,yBAAA,SAAkC,mBAAA;EAwBjD;;;EApBA,IAAA;AAAA;;;;UAMe,cAAA;EA4CR;;;EAxCP,OAAA,EAAS,0BAAA;EAyBT;;;EApBA,IAAA,EAAM,uBAAA;EA8BM;;;EAzBZ,MAAA,EAAQ,yBAAA;AAAA;AAuCV;;;AAAA,UAjCiB,mBAAA;EAoCC;;;EAhChB,YAAA;EAiDU;;;EA5CV,MAAA;EA4DK;;;EAvDL,OAAA,EAAS,sBAAA;EAsBH;;;EAjBN,UAAA,EAAY,gBAAA;EAiBV;;;EAZF,KAAA,EAAO,cAAA;AAAA;;;;;;;UASQ,aAAA,mCAEb,WAAA,CAAY,cAAA,GACZ,IAAA,CAAK,QAAA,CAAS,aAAA;EA+Bd;;;EA3BF,OAAA,EAAS,aAAA;EA6BI;;;EAxBb,UAAA,EAAY,cAAA;EAgCiD;;AAG/D;;;;EA3BE,QAAA,EAAU,mBAAA;;;;EAKV,UAAA,EAAY,mBAAA;;;;;;;EAQZ,cAAA,GACE,MAAA,UACA,YAAA,EAAc,YAAA,KACX,OAAA,CAAQ,mBAAA;;;;;;;EAQb,iBAAA,GAAoB,YAAA,UAAs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@ -1,5 +1,5 @@
1
- import { n as EngineOptions } from "./config-C9AD-erz.mjs";
2
- import { n as EngineExecutionItem, t as EngineContext } from "./context-S3XH2DWP.mjs";
1
+ import { n as EngineOptions } from "./config-BNe23XHx.mjs";
2
+ import { n as EngineExecutionItem, t as EngineContext } from "./context-DzgsMSWr.mjs";
3
3
  import { PowerlinesBaseContext } from "@powerlines/core/context/base-context";
4
4
  import { EnvPaths } from "@stryke/env/get-env-paths";
5
5
  import * as _$_powerlines_core0 from "@powerlines/core";
@@ -51,4 +51,4 @@ declare class PowerlinesEngineContext<TSystemContext = unknown> extends Powerlin
51
51
  }
52
52
  //#endregion
53
53
  export { PowerlinesEngineContext as t };
54
- //# sourceMappingURL=engine-context-BiDxBwme.d.mts.map
54
+ //# sourceMappingURL=engine-context-DEotmVzB.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"engine-context-BiDxBwme.d.mts","names":[],"sources":["../src/context/engine-context.ts"],"mappings":";;;;;;;;;cAmDa,uBAAA,mCACH,qBAAA,CAAsB,cAAA,aACnB,aAAA,CAAc,cAAA;EAAA;EAkIP,OAAA,EAAS,aAAA;EAClB,UAAA,EAAY,cAAA;EArIa;;;;;;EAAA,OAgBd,IAAA,0BAAA,CAClB,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,GAAK,mBAAA,CAAA,MAAA;EAAA,IAe5D,UAAA,CAAA,GAAc,mBAAA;EAAA,IAId,QAAA,CAAA,GAAY,mBAAA;EAAA,IAIZ,QAAA,CAAA,GAAY,QAAA;EAAA,IAQZ,SAAA,CAAA,GAAa,gBAAA;EAAA,IAQb,KAAA,CAAA;EAvCuD;;;;;;EAAA,UAiDzD,WAAA,CACS,OAAA,EAAS,aAAA,EAClB,UAAA,EAAY,cAAA;EAAA;;;;;;;;;EAcR,cAAA,CACX,MAAA,UACA,YAAA,EAAc,YAAA,GACb,OAAA,CAAQ,mBAAA;EArJmB;;;;;;EAyNvB,iBAAA,CAAkB,YAAA,UAAsB,WAAA;AAAA"}
1
+ {"version":3,"file":"engine-context-DEotmVzB.d.mts","names":[],"sources":["../src/context/engine-context.ts"],"mappings":";;;;;;;;;cAmDa,uBAAA,mCACH,qBAAA,CAAsB,cAAA,aACnB,aAAA,CAAc,cAAA;EAAA;EAkIP,OAAA,EAAS,aAAA;EAClB,UAAA,EAAY,cAAA;EArIa;;;;;;EAAA,OAgBd,IAAA,0BAAA,CAClB,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,GAAK,mBAAA,CAAA,MAAA;EAAA,IAe5D,UAAA,CAAA,GAAc,mBAAA;EAAA,IAId,QAAA,CAAA,GAAY,mBAAA;EAAA,IAIZ,QAAA,CAAA,GAAY,QAAA;EAAA,IAQZ,SAAA,CAAA,GAAa,gBAAA;EAAA,IAQb,KAAA,CAAA;EAvCuD;;;;;;EAAA,UAiDzD,WAAA,CACS,OAAA,EAAS,aAAA,EAClB,UAAA,EAAY,cAAA;EAAA;;;;;;;;;EAcR,cAAA,CACX,MAAA,UACA,YAAA,EAAc,YAAA,GACb,OAAA,CAAQ,mBAAA;EArJmB;;;;;;EAyNvB,iBAAA,CAAkB,YAAA,UAAsB,WAAA;AAAA"}
package/dist/engine.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_chunk = require('./chunk-C0xms8kb.cjs');
3
- const require_engine_context = require('./engine-context-SEzTm1aq.cjs');
3
+ const require_context_engine_context = require('./context/engine-context.cjs');
4
4
  const require_helpers_execution_host_worker = require('./helpers/execution-host-worker.cjs');
5
5
  let _powerlines_core_constants = require("@powerlines/core/constants");
6
6
  let devframe_node = require("devframe/node");
@@ -247,7 +247,7 @@ async function createContext(options) {
247
247
  })));
248
248
  }
249
249
  });
250
- return require_engine_context.PowerlinesEngineContext.from(options, host, {
250
+ return require_context_engine_context.PowerlinesEngineContext.from(options, host, {
251
251
  backend: "websocket",
252
252
  websocket: port
253
253
  });
package/dist/engine.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { n as EngineOptions } from "./config-C9AD-erz.mjs";
2
- import { t as EngineContext } from "./context-S3XH2DWP.mjs";
3
- import { t as PowerlinesEngineContext } from "./engine-context-BiDxBwme.mjs";
4
- import { n as ExecutionHost, t as Engine } from "./api-CcNgO71y.mjs";
1
+ import { n as EngineOptions } from "./config-BNe23XHx.mjs";
2
+ import { t as EngineContext } from "./context-DzgsMSWr.mjs";
3
+ import { t as PowerlinesEngineContext } from "./engine-context-DEotmVzB.mjs";
4
+ import { n as ExecutionHost, t as Engine } from "./api-Cdw4v0W4.mjs";
5
5
  import { EXECUTION_API_METHODS } from "@powerlines/core/constants";
6
6
  import { BuildInlineConfig, CleanInlineConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, InlineConfig, LintInlineConfig, PrepareInlineConfig, TestInlineConfig, TypesInlineConfig } from "@powerlines/core";
7
7
 
package/dist/engine.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PowerlinesEngineContext } from "./engine-context-f72fUF0N.mjs";
1
+ import { PowerlinesEngineContext } from "./context/engine-context.mjs";
2
2
  import { ExecutionHostWorker } from "./helpers/execution-host-worker.mjs";
3
3
  import { EXECUTION_API_METHODS } from "@powerlines/core/constants";
4
4
  import { createH3DevToolsHost } from "devframe/node";
@@ -0,0 +1,44 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_api_prepare = require('./api/prepare.cjs');
3
+ const require_api_build = require('./api/build.cjs');
4
+ const require_api_clean = require('./api/clean.cjs');
5
+ const require_api_create = require('./api/create.cjs');
6
+ const require_api_deploy = require('./api/deploy.cjs');
7
+ const require_api_docs = require('./api/docs.cjs');
8
+ const require_api_lint = require('./api/lint.cjs');
9
+ const require_api_test = require('./api/test.cjs');
10
+ const require_api_types = require('./api/types.cjs');
11
+ const require_helpers_create_execution_host = require('./helpers/create-execution-host.cjs');
12
+
13
+ //#region src/execution-host.ts
14
+ const executionHost = require_helpers_create_execution_host.createExecutionHost({
15
+ types: require_api_types.types,
16
+ prepare: require_api_prepare.prepare,
17
+ create: require_api_create.create,
18
+ clean: require_api_clean.clean,
19
+ lint: require_api_lint.lint,
20
+ test: require_api_test.test,
21
+ build: require_api_build.build,
22
+ docs: require_api_docs.docs,
23
+ deploy: require_api_deploy.deploy
24
+ });
25
+ const types = executionHost.types;
26
+ const prepare = executionHost.prepare;
27
+ const create = executionHost.create;
28
+ const clean = executionHost.clean;
29
+ const lint = executionHost.lint;
30
+ const test = executionHost.test;
31
+ const build = executionHost.build;
32
+ const docs = executionHost.docs;
33
+ const deploy = executionHost.deploy;
34
+
35
+ //#endregion
36
+ exports.build = build;
37
+ exports.clean = clean;
38
+ exports.create = create;
39
+ exports.deploy = deploy;
40
+ exports.docs = docs;
41
+ exports.lint = lint;
42
+ exports.prepare = prepare;
43
+ exports.test = test;
44
+ exports.types = types;
@@ -0,0 +1,14 @@
1
+ import { r as ExecutionHostParams } from "./api-6w4hZL6n.cjs";
2
+ //#region src/execution-host.d.ts
3
+ declare const types: ((params: ExecutionHostParams) => Promise<void>) | undefined;
4
+ declare const prepare: ((params: ExecutionHostParams) => Promise<void>) | undefined;
5
+ declare const create: ((params: ExecutionHostParams) => Promise<void>) | undefined;
6
+ declare const clean: ((params: ExecutionHostParams) => Promise<void>) | undefined;
7
+ declare const lint: ((params: ExecutionHostParams) => Promise<void>) | undefined;
8
+ declare const test: ((params: ExecutionHostParams) => Promise<void>) | undefined;
9
+ declare const build: ((params: ExecutionHostParams) => Promise<void>) | undefined;
10
+ declare const docs: ((params: ExecutionHostParams) => Promise<void>) | undefined;
11
+ declare const deploy: ((params: ExecutionHostParams) => Promise<void>) | undefined;
12
+ //#endregion
13
+ export { build, clean, create, deploy, docs, lint, prepare, test, types };
14
+ //# sourceMappingURL=execution-host.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-host.d.cts","names":[],"sources":["../src/execution-host.ts"],"mappings":";;cAyCa,KAAA,IAAK,MAAA,EAAsB,mBAAA,KAAtB,OAAA;AAAA,cACL,OAAA,IAAO,MAAA,EAAwB,mBAAA,KAAxB,OAAA;AAAA,cACP,MAAA,IAAM,MAAA,EAAuB,mBAAA,KAAvB,OAAA;AAAA,cACN,KAAA,IAAK,MAAA,EAAsB,mBAAA,KAAtB,OAAA;AAAA,cACL,IAAA,IAAI,MAAA,EAAqB,mBAAA,KAArB,OAAA;AAAA,cACJ,IAAA,IAAI,MAAA,EAAqB,mBAAA,KAArB,OAAA;AAAA,cACJ,KAAA,IAAK,MAAA,EAAsB,mBAAA,KAAtB,OAAA;AAAA,cACL,IAAA,IAAI,MAAA,EAAqB,mBAAA,KAArB,OAAA;AAAA,cACJ,MAAA,IAAM,MAAA,EAAuB,mBAAA,KAAvB,OAAA"}
@@ -0,0 +1,14 @@
1
+ import { r as ExecutionHostParams } from "./api-Cdw4v0W4.mjs";
2
+ //#region src/execution-host.d.ts
3
+ declare const types: ((params: ExecutionHostParams) => Promise<void>) | undefined;
4
+ declare const prepare: ((params: ExecutionHostParams) => Promise<void>) | undefined;
5
+ declare const create: ((params: ExecutionHostParams) => Promise<void>) | undefined;
6
+ declare const clean: ((params: ExecutionHostParams) => Promise<void>) | undefined;
7
+ declare const lint: ((params: ExecutionHostParams) => Promise<void>) | undefined;
8
+ declare const test: ((params: ExecutionHostParams) => Promise<void>) | undefined;
9
+ declare const build: ((params: ExecutionHostParams) => Promise<void>) | undefined;
10
+ declare const docs: ((params: ExecutionHostParams) => Promise<void>) | undefined;
11
+ declare const deploy: ((params: ExecutionHostParams) => Promise<void>) | undefined;
12
+ //#endregion
13
+ export { build, clean, create, deploy, docs, lint, prepare, test, types };
14
+ //# sourceMappingURL=execution-host.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-host.d.mts","names":[],"sources":["../src/execution-host.ts"],"mappings":";;cAyCa,KAAA,IAAK,MAAA,EAAsB,mBAAA,KAAtB,OAAA;AAAA,cACL,OAAA,IAAO,MAAA,EAAwB,mBAAA,KAAxB,OAAA;AAAA,cACP,MAAA,IAAM,MAAA,EAAuB,mBAAA,KAAvB,OAAA;AAAA,cACN,KAAA,IAAK,MAAA,EAAsB,mBAAA,KAAtB,OAAA;AAAA,cACL,IAAA,IAAI,MAAA,EAAqB,mBAAA,KAArB,OAAA;AAAA,cACJ,IAAA,IAAI,MAAA,EAAqB,mBAAA,KAArB,OAAA;AAAA,cACJ,KAAA,IAAK,MAAA,EAAsB,mBAAA,KAAtB,OAAA;AAAA,cACL,IAAA,IAAI,MAAA,EAAqB,mBAAA,KAArB,OAAA;AAAA,cACJ,MAAA,IAAM,MAAA,EAAuB,mBAAA,KAAvB,OAAA"}
@@ -0,0 +1,36 @@
1
+ import { prepare as prepare$1 } from "./api/prepare.mjs";
2
+ import { build as build$1 } from "./api/build.mjs";
3
+ import { clean as clean$1 } from "./api/clean.mjs";
4
+ import { create as create$1 } from "./api/create.mjs";
5
+ import { deploy as deploy$1 } from "./api/deploy.mjs";
6
+ import { docs as docs$1 } from "./api/docs.mjs";
7
+ import { lint as lint$1 } from "./api/lint.mjs";
8
+ import { test as test$1 } from "./api/test.mjs";
9
+ import { types as types$1 } from "./api/types.mjs";
10
+ import { createExecutionHost } from "./helpers/create-execution-host.mjs";
11
+
12
+ //#region src/execution-host.ts
13
+ const executionHost = createExecutionHost({
14
+ types: types$1,
15
+ prepare: prepare$1,
16
+ create: create$1,
17
+ clean: clean$1,
18
+ lint: lint$1,
19
+ test: test$1,
20
+ build: build$1,
21
+ docs: docs$1,
22
+ deploy: deploy$1
23
+ });
24
+ const types = executionHost.types;
25
+ const prepare = executionHost.prepare;
26
+ const create = executionHost.create;
27
+ const clean = executionHost.clean;
28
+ const lint = executionHost.lint;
29
+ const test = executionHost.test;
30
+ const build = executionHost.build;
31
+ const docs = executionHost.docs;
32
+ const deploy = executionHost.deploy;
33
+
34
+ //#endregion
35
+ export { build, clean, create, deploy, docs, lint, prepare, test, types };
36
+ //# sourceMappingURL=execution-host.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-host.mjs","names":["executeTypes","executePrepare","executeCreate","executeClean","executeLint","executeTest","executeBuild","executeDocs","executeDeploy"],"sources":["../src/execution-host.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 { build as executeBuild } from \"./api/build\";\nimport { clean as executeClean } from \"./api/clean\";\nimport { create as executeCreate } from \"./api/create\";\nimport { deploy as executeDeploy } from \"./api/deploy\";\nimport { docs as executeDocs } from \"./api/docs\";\nimport { lint as executeLint } from \"./api/lint\";\nimport { prepare as executePrepare } from \"./api/prepare\";\nimport { test as executeTest } from \"./api/test\";\nimport { types as executeTypes } from \"./api/types\";\nimport { createExecutionHost } from \"./helpers/create-execution-host\";\n\nconst executionHost = createExecutionHost({\n types: executeTypes,\n prepare: executePrepare,\n create: executeCreate,\n clean: executeClean,\n lint: executeLint,\n test: executeTest,\n build: executeBuild,\n docs: executeDocs,\n deploy: executeDeploy\n});\n\nexport const types = executionHost.types;\nexport const prepare = executionHost.prepare;\nexport const create = executionHost.create;\nexport const clean = executionHost.clean;\nexport const lint = executionHost.lint;\nexport const test = executionHost.test;\nexport const build = executionHost.build;\nexport const docs = executionHost.docs;\nexport const deploy = executionHost.deploy;\n"],"mappings":";;;;;;;;;;;;AA6BA,MAAM,gBAAgB,oBAAoB;CACxC,OAAOA;CACP,SAASC;CACT,QAAQC;CACR,OAAOC;CACP,MAAMC;CACN,MAAMC;CACN,OAAOC;CACP,MAAMC;CACN,QAAQC;CACT,CAAC;AAEF,MAAa,QAAQ,cAAc;AACnC,MAAa,UAAU,cAAc;AACrC,MAAa,SAAS,cAAc;AACpC,MAAa,QAAQ,cAAc;AACnC,MAAa,OAAO,cAAc;AAClC,MAAa,OAAO,cAAc;AAClC,MAAa,QAAQ,cAAc;AACnC,MAAa,OAAO,cAAc;AAClC,MAAa,SAAS,cAAc"}
@@ -7,17 +7,19 @@ let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-obje
7
7
  let _powerlines_core_context_execution_context = require("@powerlines/core/context/execution-context");
8
8
  let _powerlines_core_lib_context_helpers = require("@powerlines/core/lib/context-helpers");
9
9
  let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
10
+ let defu = require("defu");
10
11
 
11
12
  //#region src/helpers/create-execution-host.ts
12
13
  /**
13
14
  * Creates an execution host with the provided methods. Each method will be wrapped to create an execution context and handle errors appropriately.
14
15
  *
15
16
  * @param methods - An object where keys are method names and values are functions that take an execution context and return a promise.
17
+ * @param inlineConfig - An optional partial inline configuration object that will be merged with the context's options when creating the execution context for each method.
16
18
  * @returns An object with the same keys as the input methods, but each function is wrapped to create an execution context and handle errors.
17
19
  */
18
- function createExecutionHost(methods) {
20
+ function createExecutionHost(methods, inlineConfig = {}) {
19
21
  return Object.fromEntries(Object.entries(methods).map(([method, fn]) => [method, async (params) => {
20
- const { options, inlineConfig } = params;
22
+ const { options } = params;
21
23
  let rpc;
22
24
  if (options.baseURL && options.connection) rpc = require_helpers_rpc.createRpcClient(options);
23
25
  else throw new Error(`Execution RPC client could not be created - Missing ${!options.baseURL ? `baseURL${options.connection ? ` and connection information` : ""}` : "connection"} or connection information.`);
@@ -37,7 +39,7 @@ function createExecutionHost(methods) {
37
39
  const context = await _powerlines_core_context_execution_context.PowerlinesExecutionContext.from({
38
40
  ...options,
39
41
  logFn
40
- }, inlineConfig ?? {}, { rpc });
42
+ }, (0, defu.defu)(inlineConfig, params.inlineConfig ?? {}), { rpc });
41
43
  context.logger.info(`Starting ${(0, _stryke_string_format_title_case.titleCase)(options.framework?.name) || "Powerlines"} - ${(0, _stryke_string_format_title_case.titleCase)(method)} execution (${options.executionId})`);
42
44
  await (0, _powerlines_core_lib_context_helpers.resolvePluginConfig)(context);
43
45
  await fn(context);
@@ -1,6 +1,8 @@
1
1
  import { r as EngineResolvedConfig } from "../config-D6xUniHh.cjs";
2
2
  import { r as EngineSystemContext } from "../context-epL7NPvL.cjs";
3
3
  import { r as ExecutionHostParams } from "../api-6w4hZL6n.cjs";
4
+ import { InlineConfig } from "@powerlines/core";
5
+ import { DeepPartial } from "@stryke/types/base";
4
6
  import { PowerlinesExecutionContext } from "@powerlines/core/context/execution-context";
5
7
 
6
8
  //#region src/helpers/create-execution-host.d.ts
@@ -8,9 +10,10 @@ import { PowerlinesExecutionContext } from "@powerlines/core/context/execution-c
8
10
  * Creates an execution host with the provided methods. Each method will be wrapped to create an execution context and handle errors appropriately.
9
11
  *
10
12
  * @param methods - An object where keys are method names and values are functions that take an execution context and return a promise.
13
+ * @param inlineConfig - An optional partial inline configuration object that will be merged with the context's options when creating the execution context for each method.
11
14
  * @returns An object with the same keys as the input methods, but each function is wrapped to create an execution context and handle errors.
12
15
  */
13
- declare function createExecutionHost<TContext extends PowerlinesExecutionContext<EngineResolvedConfig, EngineSystemContext> = PowerlinesExecutionContext<EngineResolvedConfig, EngineSystemContext>>(methods: Record<string, (context: TContext) => Promise<void>>): {
16
+ declare function createExecutionHost<TContext extends PowerlinesExecutionContext<EngineResolvedConfig, EngineSystemContext> = PowerlinesExecutionContext<EngineResolvedConfig, EngineSystemContext>>(methods: Record<string, (context: TContext) => Promise<void>>, inlineConfig?: DeepPartial<InlineConfig>): {
14
17
  [k: string]: (params: ExecutionHostParams) => Promise<void>;
15
18
  };
16
19
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"create-execution-host.d.cts","names":[],"sources":["../../src/helpers/create-execution-host.ts"],"mappings":";;;;;;;;AAqCA;;;;iBAAgB,mBAAA,kBACG,0BAAA,CACf,oBAAA,EACA,mBAAA,IACE,0BAAA,CAA2B,oBAAA,EAAsB,mBAAA,EAAA,CACrD,OAAA,EAAS,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA;EAAA,sBAI5B,mBAAA,KAAmB,OAAA;AAAA"}
1
+ {"version":3,"file":"create-execution-host.d.cts","names":[],"sources":["../../src/helpers/create-execution-host.ts"],"mappings":";;;;;;;;;;AAwCA;;;;;iBAAgB,mBAAA,kBACG,0BAAA,CACf,oBAAA,EACA,mBAAA,IACE,0BAAA,CAA2B,oBAAA,EAAsB,mBAAA,EAAA,CAErD,OAAA,EAAS,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,SAC/C,YAAA,GAAc,WAAA,CAAY,YAAA;EAAA,sBAKP,mBAAA,KAAmB,OAAA;AAAA"}
@@ -1,16 +1,19 @@
1
- import { r as EngineResolvedConfig } from "../config-C9AD-erz.mjs";
2
- import { r as EngineSystemContext } from "../context-S3XH2DWP.mjs";
3
- import { r as ExecutionHostParams } from "../api-CcNgO71y.mjs";
1
+ import { r as EngineResolvedConfig } from "../config-BNe23XHx.mjs";
2
+ import { r as EngineSystemContext } from "../context-DzgsMSWr.mjs";
3
+ import { r as ExecutionHostParams } from "../api-Cdw4v0W4.mjs";
4
+ import { InlineConfig } from "@powerlines/core";
4
5
  import { PowerlinesExecutionContext } from "@powerlines/core/context/execution-context";
6
+ import { DeepPartial } from "@stryke/types/base";
5
7
 
6
8
  //#region src/helpers/create-execution-host.d.ts
7
9
  /**
8
10
  * Creates an execution host with the provided methods. Each method will be wrapped to create an execution context and handle errors appropriately.
9
11
  *
10
12
  * @param methods - An object where keys are method names and values are functions that take an execution context and return a promise.
13
+ * @param inlineConfig - An optional partial inline configuration object that will be merged with the context's options when creating the execution context for each method.
11
14
  * @returns An object with the same keys as the input methods, but each function is wrapped to create an execution context and handle errors.
12
15
  */
13
- declare function createExecutionHost<TContext extends PowerlinesExecutionContext<EngineResolvedConfig, EngineSystemContext> = PowerlinesExecutionContext<EngineResolvedConfig, EngineSystemContext>>(methods: Record<string, (context: TContext) => Promise<void>>): {
16
+ declare function createExecutionHost<TContext extends PowerlinesExecutionContext<EngineResolvedConfig, EngineSystemContext> = PowerlinesExecutionContext<EngineResolvedConfig, EngineSystemContext>>(methods: Record<string, (context: TContext) => Promise<void>>, inlineConfig?: DeepPartial<InlineConfig>): {
14
17
  [k: string]: (params: ExecutionHostParams) => Promise<void>;
15
18
  };
16
19
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"create-execution-host.d.mts","names":[],"sources":["../../src/helpers/create-execution-host.ts"],"mappings":";;;;;;;;AAqCA;;;;iBAAgB,mBAAA,kBACG,0BAAA,CACf,oBAAA,EACA,mBAAA,IACE,0BAAA,CAA2B,oBAAA,EAAsB,mBAAA,EAAA,CACrD,OAAA,EAAS,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA;EAAA,sBAI5B,mBAAA,KAAmB,OAAA;AAAA"}
1
+ {"version":3,"file":"create-execution-host.d.mts","names":[],"sources":["../../src/helpers/create-execution-host.ts"],"mappings":";;;;;;;;;;AAwCA;;;;;iBAAgB,mBAAA,kBACG,0BAAA,CACf,oBAAA,EACA,mBAAA,IACE,0BAAA,CAA2B,oBAAA,EAAsB,mBAAA,EAAA,CAErD,OAAA,EAAS,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,SAC/C,YAAA,GAAc,WAAA,CAAY,YAAA;EAAA,sBAKP,mBAAA,KAAmB,OAAA;AAAA"}
@@ -5,17 +5,19 @@ import { isSetObject } from "@stryke/type-checks/is-set-object";
5
5
  import { PowerlinesExecutionContext } from "@powerlines/core/context/execution-context";
6
6
  import { resolvePluginConfig } from "@powerlines/core/lib/context-helpers";
7
7
  import { titleCase } from "@stryke/string-format/title-case";
8
+ import { defu } from "defu";
8
9
 
9
10
  //#region src/helpers/create-execution-host.ts
10
11
  /**
11
12
  * Creates an execution host with the provided methods. Each method will be wrapped to create an execution context and handle errors appropriately.
12
13
  *
13
14
  * @param methods - An object where keys are method names and values are functions that take an execution context and return a promise.
15
+ * @param inlineConfig - An optional partial inline configuration object that will be merged with the context's options when creating the execution context for each method.
14
16
  * @returns An object with the same keys as the input methods, but each function is wrapped to create an execution context and handle errors.
15
17
  */
16
- function createExecutionHost(methods) {
18
+ function createExecutionHost(methods, inlineConfig = {}) {
17
19
  return Object.fromEntries(Object.entries(methods).map(([method, fn]) => [method, async (params) => {
18
- const { options, inlineConfig } = params;
20
+ const { options } = params;
19
21
  let rpc;
20
22
  if (options.baseURL && options.connection) rpc = createRpcClient(options);
21
23
  else throw new Error(`Execution RPC client could not be created - Missing ${!options.baseURL ? `baseURL${options.connection ? ` and connection information` : ""}` : "connection"} or connection information.`);
@@ -35,7 +37,7 @@ function createExecutionHost(methods) {
35
37
  const context = await PowerlinesExecutionContext.from({
36
38
  ...options,
37
39
  logFn
38
- }, inlineConfig ?? {}, { rpc });
40
+ }, defu(inlineConfig, params.inlineConfig ?? {}), { rpc });
39
41
  context.logger.info(`Starting ${titleCase(options.framework?.name) || "Powerlines"} - ${titleCase(method)} execution (${options.executionId})`);
40
42
  await resolvePluginConfig(context);
41
43
  await fn(context);
@@ -1 +1 @@
1
- {"version":3,"file":"create-execution-host.mjs","names":[],"sources":["../../src/helpers/create-execution-host.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 { LogFnMeta } from \"@powerlines/core\";\nimport { PowerlinesExecutionContext } from \"@powerlines/core/context/execution-context\";\nimport { resolvePluginConfig } from \"@powerlines/core/lib/context-helpers\";\nimport { consoleLogger } from \"@powerlines/core/plugin-utils\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport { RpcClient } from \"../types\";\nimport { ExecutionHostParams } from \"../types/api\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\nimport { createRpcClient } from \"./rpc\";\n\n/**\n * Creates an execution host with the provided methods. Each method will be wrapped to create an execution context and handle errors appropriately.\n *\n * @param methods - An object where keys are method names and values are functions that take an execution context and return a promise.\n * @returns An object with the same keys as the input methods, but each function is wrapped to create an execution context and handle errors.\n */\nexport function createExecutionHost<\n TContext extends PowerlinesExecutionContext<\n EngineResolvedConfig,\n EngineSystemContext\n > = PowerlinesExecutionContext<EngineResolvedConfig, EngineSystemContext>\n>(methods: Record<string, (context: TContext) => Promise<void>>) {\n return Object.fromEntries(\n Object.entries(methods).map(([method, fn]) => [\n method,\n async (params: ExecutionHostParams) => {\n const { options, inlineConfig } = params;\n\n let rpc!: RpcClient;\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 const logFn = (meta: LogFnMeta, message: string) => {\n consoleLogger(meta, message);\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 }\n };\n\n const context = (await PowerlinesExecutionContext.from<\n EngineResolvedConfig,\n EngineSystemContext\n >({ ...options, logFn }, inlineConfig ?? {}, {\n rpc\n })) as TContext;\n\n context.logger.info(\n `Starting ${\n titleCase(options.framework?.name) || \"Powerlines\"\n } - ${titleCase(method)} execution (${options.executionId})`\n );\n\n await resolvePluginConfig(context as PowerlinesExecutionContext<any>);\n\n await fn(context);\n }\n ])\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqCA,SAAgB,oBAKd,SAA+D;AAC/D,QAAO,OAAO,YACZ,OAAO,QAAQ,QAAQ,CAAC,KAAK,CAAC,QAAQ,QAAQ,CAC5C,QACA,OAAO,WAAgC;EACrC,MAAM,EAAE,SAAS,iBAAiB;EAElC,IAAI;AACJ,MAAI,QAAQ,WAAW,QAAQ,WAC7B,OAAM,gBAAgB,QAAQ;MAE9B,OAAM,IAAI,MACR,uDACE,CAAC,QAAQ,UACL,UAAU,QAAQ,aAAa,gCAAgC,OAC/D,aACL,6BACF;EAGH,MAAM,SAAS,MAAiB,YAAoB;AAClD,iBAAc,MAAM,QAAQ;AAC5B,OAAI,IACF,CAAK,IAAI,UAAU,kBAAkB;IACnC,MAAM;KACJ,UAAU;KACV,GAAG;KACH,GAAI,YAAY,KAAK,GAAG,OAAO,EAAE,MAAM,MAAM;KAC7C,OAAO,MAAM;KACb,WAAW,KAAK,KAAK;KACtB;IACD;IACD,CAAC;;EAIN,MAAM,UAAW,MAAM,2BAA2B,KAGhD;GAAE,GAAG;GAAS;GAAO,EAAE,gBAAgB,EAAE,EAAE,EAC3C,KACD,CAAC;AAEF,UAAQ,OAAO,KACb,YACE,UAAU,QAAQ,WAAW,KAAK,IAAI,aACvC,KAAK,UAAU,OAAO,CAAC,cAAc,QAAQ,YAAY,GAC3D;AAED,QAAM,oBAAoB,QAA2C;AAErE,QAAM,GAAG,QAAQ;GAEpB,CAAC,CACH"}
1
+ {"version":3,"file":"create-execution-host.mjs","names":[],"sources":["../../src/helpers/create-execution-host.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 { InlineConfig, LogFnMeta } from \"@powerlines/core\";\nimport { PowerlinesExecutionContext } from \"@powerlines/core/context/execution-context\";\nimport { resolvePluginConfig } from \"@powerlines/core/lib/context-helpers\";\nimport { consoleLogger } from \"@powerlines/core/plugin-utils\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { DeepPartial } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport { defu } from \"defu\";\nimport { RpcClient } from \"../types\";\nimport { ExecutionHostParams } from \"../types/api\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\nimport { createRpcClient } from \"./rpc\";\n\n/**\n * Creates an execution host with the provided methods. Each method will be wrapped to create an execution context and handle errors appropriately.\n *\n * @param methods - An object where keys are method 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 method.\n * @returns An object with the same keys as the input methods, but each function is wrapped to create an execution context and handle errors.\n */\nexport function createExecutionHost<\n TContext extends PowerlinesExecutionContext<\n EngineResolvedConfig,\n EngineSystemContext\n > = PowerlinesExecutionContext<EngineResolvedConfig, EngineSystemContext>\n>(\n methods: Record<string, (context: TContext) => Promise<void>>,\n inlineConfig: DeepPartial<InlineConfig> = {}\n) {\n return Object.fromEntries(\n Object.entries(methods).map(([method, fn]) => [\n method,\n async (params: ExecutionHostParams) => {\n const { options } = params;\n\n let rpc!: RpcClient;\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 const logFn = (meta: LogFnMeta, message: string) => {\n consoleLogger(meta, message);\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 }\n };\n\n const context = (await PowerlinesExecutionContext.from<\n EngineResolvedConfig,\n EngineSystemContext\n >(\n { ...options, logFn },\n defu(inlineConfig, params.inlineConfig ?? {}) as InlineConfig,\n {\n rpc\n }\n )) as TContext;\n\n context.logger.info(\n `Starting ${\n titleCase(options.framework?.name) || \"Powerlines\"\n } - ${titleCase(method)} execution (${options.executionId})`\n );\n\n await resolvePluginConfig(context as PowerlinesExecutionContext<any>);\n\n await fn(context);\n }\n ])\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAwCA,SAAgB,oBAMd,SACA,eAA0C,EAAE,EAC5C;AACA,QAAO,OAAO,YACZ,OAAO,QAAQ,QAAQ,CAAC,KAAK,CAAC,QAAQ,QAAQ,CAC5C,QACA,OAAO,WAAgC;EACrC,MAAM,EAAE,YAAY;EAEpB,IAAI;AACJ,MAAI,QAAQ,WAAW,QAAQ,WAC7B,OAAM,gBAAgB,QAAQ;MAE9B,OAAM,IAAI,MACR,uDACE,CAAC,QAAQ,UACL,UAAU,QAAQ,aAAa,gCAAgC,OAC/D,aACL,6BACF;EAGH,MAAM,SAAS,MAAiB,YAAoB;AAClD,iBAAc,MAAM,QAAQ;AAC5B,OAAI,IACF,CAAK,IAAI,UAAU,kBAAkB;IACnC,MAAM;KACJ,UAAU;KACV,GAAG;KACH,GAAI,YAAY,KAAK,GAAG,OAAO,EAAE,MAAM,MAAM;KAC7C,OAAO,MAAM;KACb,WAAW,KAAK,KAAK;KACtB;IACD;IACD,CAAC;;EAIN,MAAM,UAAW,MAAM,2BAA2B,KAIhD;GAAE,GAAG;GAAS;GAAO,EACrB,KAAK,cAAc,OAAO,gBAAgB,EAAE,CAAC,EAC7C,EACE,KACD,CACF;AAED,UAAQ,OAAO,KACb,YACE,UAAU,QAAQ,WAAW,KAAK,IAAI,aACvC,KAAK,UAAU,OAAO,CAAC,cAAc,QAAQ,YAAY,GAC3D;AAED,QAAM,oBAAoB,QAA2C;AAErE,QAAM,GAAG,QAAQ;GAEpB,CAAC,CACH"}
@@ -1,5 +1,5 @@
1
- import { t as EngineContext } from "../context-S3XH2DWP.mjs";
2
- import { n as ExecutionHost } from "../api-CcNgO71y.mjs";
1
+ import { t as EngineContext } from "../context-DzgsMSWr.mjs";
2
+ import { n as ExecutionHost } from "../api-Cdw4v0W4.mjs";
3
3
  import { Worker } from "jest-worker";
4
4
  import { Mode } from "@powerlines/core";
5
5
 
@@ -1,4 +1,4 @@
1
- import { i as RpcClientOptions, u as RpcClient } from "../config-C9AD-erz.mjs";
1
+ import { i as RpcClientOptions, u as RpcClient } from "../config-BNe23XHx.mjs";
2
2
 
3
3
  //#region src/helpers/rpc.d.ts
4
4
  declare function createRpcClient(options: RpcClientOptions): RpcClient;