@powerlines/engine 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/build.d.cts +1 -1
- package/dist/api/build.d.mts +1 -1
- package/dist/api/clean.d.cts +1 -1
- package/dist/api/clean.d.mts +1 -1
- package/dist/api/create.d.cts +1 -1
- package/dist/api/create.d.mts +1 -1
- package/dist/api/deploy.d.cts +1 -1
- package/dist/api/deploy.d.mts +1 -1
- package/dist/api/docs.d.cts +1 -1
- package/dist/api/docs.d.mts +1 -1
- package/dist/api/lint.d.cts +1 -1
- package/dist/api/lint.d.mts +1 -1
- package/dist/api/prepare.d.cts +1 -1
- package/dist/api/prepare.d.mts +1 -1
- package/dist/api/test.d.cts +1 -1
- package/dist/api/test.d.mts +1 -1
- package/dist/api/types.d.cts +1 -1
- package/dist/api/types.d.mts +1 -1
- package/dist/{api-Bw-RpQgX.d.cts → api-Bi_h4LMX.d.cts} +5 -4
- package/dist/api-Bi_h4LMX.d.cts.map +1 -0
- package/dist/{api-D9bpSxPB.d.mts → api-oIs2Wp3t.d.mts} +5 -4
- package/dist/api-oIs2Wp3t.d.mts.map +1 -0
- package/dist/context/index.d.cts +1 -1
- package/dist/context/index.d.mts +1 -1
- package/dist/{context-DrNGEC0b.d.mts → context-DrNQXXRC.d.mts} +2 -2
- package/dist/{context-C_P-KYJX.d.cts.map → context-DrNQXXRC.d.mts.map} +1 -1
- package/dist/{context-C_P-KYJX.d.cts → context-LQBeYY23.d.cts} +2 -2
- package/dist/{context-DrNGEC0b.d.mts.map → context-LQBeYY23.d.cts.map} +1 -1
- package/dist/{engine-context-BXjBJuHe.d.mts → engine-context-BBSMtv0b.d.mts} +2 -2
- package/dist/{engine-context-BXjBJuHe.d.mts.map → engine-context-BBSMtv0b.d.mts.map} +1 -1
- package/dist/{engine-context-CPYw-aGB.d.cts → engine-context-C6bNxumd.d.cts} +2 -2
- package/dist/{engine-context-CPYw-aGB.d.cts.map → engine-context-C6bNxumd.d.cts.map} +1 -1
- package/dist/engine.d.cts +3 -3
- package/dist/engine.d.mts +3 -3
- package/dist/helpers/create-execution-host.cjs +27 -2
- package/dist/helpers/create-execution-host.d.cts +2 -2
- package/dist/helpers/create-execution-host.d.cts.map +1 -1
- package/dist/helpers/create-execution-host.d.mts +2 -2
- package/dist/helpers/create-execution-host.d.mts.map +1 -1
- package/dist/helpers/create-execution-host.mjs +27 -2
- package/dist/helpers/create-execution-host.mjs.map +1 -1
- package/dist/helpers/execution-host-worker.d.cts +2 -2
- package/dist/helpers/execution-host-worker.d.mts +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/worker/execution-host.cjs +160 -2
- package/dist/worker/execution-host.d.cts +52 -2
- package/dist/worker/execution-host.d.cts.map +1 -1
- package/dist/worker/execution-host.d.mts +52 -2
- package/dist/worker/execution-host.d.mts.map +1 -1
- package/dist/worker/execution-host.mjs +161 -3
- package/dist/worker/execution-host.mjs.map +1 -1
- package/package.json +6 -6
- package/dist/api-Bw-RpQgX.d.cts.map +0 -1
- package/dist/api-D9bpSxPB.d.mts.map +0 -1
package/dist/api/build.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-B_E_HMcT.cjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-LQBeYY23.cjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/build.d.ts
|
package/dist/api/build.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-FB8Zqjjz.mjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-DrNQXXRC.mjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/build.d.ts
|
package/dist/api/clean.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-B_E_HMcT.cjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-LQBeYY23.cjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/clean.d.ts
|
package/dist/api/clean.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-FB8Zqjjz.mjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-DrNQXXRC.mjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/clean.d.ts
|
package/dist/api/create.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-B_E_HMcT.cjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-LQBeYY23.cjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/create.d.ts
|
package/dist/api/create.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-FB8Zqjjz.mjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-DrNQXXRC.mjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/create.d.ts
|
package/dist/api/deploy.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-B_E_HMcT.cjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-LQBeYY23.cjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/deploy.d.ts
|
package/dist/api/deploy.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-FB8Zqjjz.mjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-DrNQXXRC.mjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/deploy.d.ts
|
package/dist/api/docs.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-B_E_HMcT.cjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-LQBeYY23.cjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/docs.d.ts
|
package/dist/api/docs.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-FB8Zqjjz.mjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-DrNQXXRC.mjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/docs.d.ts
|
package/dist/api/lint.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-B_E_HMcT.cjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-LQBeYY23.cjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/lint.d.ts
|
package/dist/api/lint.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-FB8Zqjjz.mjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-DrNQXXRC.mjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/lint.d.ts
|
package/dist/api/prepare.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-B_E_HMcT.cjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-LQBeYY23.cjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/prepare.d.ts
|
package/dist/api/prepare.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-FB8Zqjjz.mjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-DrNQXXRC.mjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/prepare.d.ts
|
package/dist/api/test.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-B_E_HMcT.cjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-LQBeYY23.cjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/test.d.ts
|
package/dist/api/test.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-FB8Zqjjz.mjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-DrNQXXRC.mjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core";
|
|
4
4
|
|
|
5
5
|
//#region src/api/test.d.ts
|
package/dist/api/types.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-B_E_HMcT.cjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-LQBeYY23.cjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core/types/context";
|
|
4
4
|
|
|
5
5
|
//#region src/api/types.d.ts
|
package/dist/api/types.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-FB8Zqjjz.mjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-DrNQXXRC.mjs";
|
|
3
3
|
import { ExecutionContext } from "@powerlines/core/types/context";
|
|
4
4
|
|
|
5
5
|
//#region src/api/types.d.ts
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
1
|
+
import { t as EngineExecutionOptions } from "./config-B_E_HMcT.cjs";
|
|
2
|
+
import { t as EngineContext } from "./context-LQBeYY23.cjs";
|
|
3
|
+
import { BuildInlineConfig, CleanInlineConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, InlineConfig, LintInlineConfig, PrepareInlineConfig, TestInlineConfig, TypesInlineConfig } from "@powerlines/core";
|
|
3
4
|
import { EXECUTION_API_METHODS } from "@powerlines/core/constants/api";
|
|
4
5
|
|
|
5
6
|
//#region src/types/utils.d.ts
|
|
@@ -108,7 +109,7 @@ interface ExecutionHostParams {
|
|
|
108
109
|
/**
|
|
109
110
|
* The execution options for the current execution instance
|
|
110
111
|
*/
|
|
111
|
-
options:
|
|
112
|
+
options: EngineExecutionOptions;
|
|
112
113
|
/**
|
|
113
114
|
* The inline configuration for the current execution instance, which is the result of merging the user configuration with any configuration provided by plugins during the "config" hook.
|
|
114
115
|
*/
|
|
@@ -131,4 +132,4 @@ interface Engine<TExecutionAPI extends ReadonlyArray<string>> extends ExecutionI
|
|
|
131
132
|
}
|
|
132
133
|
//#endregion
|
|
133
134
|
export { PowerlinesExecutionHost as a, ExecutionInterface as i, ExecutionHost as n, Worker as o, ExecutionHostParams as r, Engine as t };
|
|
134
|
-
//# sourceMappingURL=api-
|
|
135
|
+
//# sourceMappingURL=api-Bi_h4LMX.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-Bi_h4LMX.d.cts","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,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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
1
|
+
import { t as EngineExecutionOptions } from "./config-FB8Zqjjz.mjs";
|
|
2
|
+
import { t as EngineContext } from "./context-DrNQXXRC.mjs";
|
|
3
|
+
import { BuildInlineConfig, CleanInlineConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, InlineConfig, LintInlineConfig, PrepareInlineConfig, TestInlineConfig, TypesInlineConfig } from "@powerlines/core";
|
|
3
4
|
import { EXECUTION_API_METHODS } from "@powerlines/core/constants/api";
|
|
4
5
|
|
|
5
6
|
//#region src/types/utils.d.ts
|
|
@@ -108,7 +109,7 @@ interface ExecutionHostParams {
|
|
|
108
109
|
/**
|
|
109
110
|
* The execution options for the current execution instance
|
|
110
111
|
*/
|
|
111
|
-
options:
|
|
112
|
+
options: EngineExecutionOptions;
|
|
112
113
|
/**
|
|
113
114
|
* The inline configuration for the current execution instance, which is the result of merging the user configuration with any configuration provided by plugins during the "config" hook.
|
|
114
115
|
*/
|
|
@@ -131,4 +132,4 @@ interface Engine<TExecutionAPI extends ReadonlyArray<string>> extends ExecutionI
|
|
|
131
132
|
}
|
|
132
133
|
//#endregion
|
|
133
134
|
export { PowerlinesExecutionHost as a, ExecutionInterface as i, ExecutionHost as n, Worker as o, ExecutionHostParams as r, Engine as t };
|
|
134
|
-
//# sourceMappingURL=api-
|
|
135
|
+
//# sourceMappingURL=api-oIs2Wp3t.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-oIs2Wp3t.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,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"}
|
package/dist/context/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PowerlinesEngineContext } from "../engine-context-
|
|
1
|
+
import { t as PowerlinesEngineContext } from "../engine-context-C6bNxumd.cjs";
|
|
2
2
|
export { PowerlinesEngineContext };
|
package/dist/context/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PowerlinesEngineContext } from "../engine-context-
|
|
1
|
+
import { t as PowerlinesEngineContext } from "../engine-context-BBSMtv0b.mjs";
|
|
2
2
|
export { PowerlinesEngineContext };
|
|
@@ -103,7 +103,7 @@ interface EngineExecutionItem {
|
|
|
103
103
|
* @remarks
|
|
104
104
|
* This context is used during the execution of the Powerlines engine, providing access to the input user configurations.
|
|
105
105
|
*/
|
|
106
|
-
interface EngineContext<TSystemContext = unknown> extends BaseContext<TSystemContext>, Pick<Required<EngineOptions>, "framework"
|
|
106
|
+
interface EngineContext<TSystemContext = unknown> extends BaseContext<TSystemContext>, Pick<Required<EngineOptions>, "framework"> {
|
|
107
107
|
/**
|
|
108
108
|
* The options provided to the Powerlines process
|
|
109
109
|
*/
|
|
@@ -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-
|
|
149
|
+
//# sourceMappingURL=context-DrNQXXRC.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-
|
|
1
|
+
{"version":3,"file":"context-DrNQXXRC.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,UAAsB,WAAA;AAAA;AAAA,UAG3B,mBAAA;;;;EAIf,GAAA,EAAK,SAAA;AAAA"}
|
|
@@ -103,7 +103,7 @@ interface EngineExecutionItem {
|
|
|
103
103
|
* @remarks
|
|
104
104
|
* This context is used during the execution of the Powerlines engine, providing access to the input user configurations.
|
|
105
105
|
*/
|
|
106
|
-
interface EngineContext<TSystemContext = unknown> extends BaseContext<TSystemContext>, Pick<Required<EngineOptions>, "framework"
|
|
106
|
+
interface EngineContext<TSystemContext = unknown> extends BaseContext<TSystemContext>, Pick<Required<EngineOptions>, "framework"> {
|
|
107
107
|
/**
|
|
108
108
|
* The options provided to the Powerlines process
|
|
109
109
|
*/
|
|
@@ -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-
|
|
149
|
+
//# sourceMappingURL=context-LQBeYY23.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-
|
|
1
|
+
{"version":3,"file":"context-LQBeYY23.d.cts","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,UAAsB,WAAA;AAAA;AAAA,UAG3B,mBAAA;;;;EAIf,GAAA,EAAK,SAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as EngineOptions } from "./config-FB8Zqjjz.mjs";
|
|
2
|
-
import { n as EngineExecutionItem, t as EngineContext } from "./context-
|
|
2
|
+
import { n as EngineExecutionItem, t as EngineContext } from "./context-DrNQXXRC.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-
|
|
54
|
+
//# sourceMappingURL=engine-context-BBSMtv0b.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-context-
|
|
1
|
+
{"version":3,"file":"engine-context-BBSMtv0b.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,5 +1,5 @@
|
|
|
1
1
|
import { n as EngineOptions } from "./config-B_E_HMcT.cjs";
|
|
2
|
-
import { n as EngineExecutionItem, t as EngineContext } from "./context-
|
|
2
|
+
import { n as EngineExecutionItem, t as EngineContext } from "./context-LQBeYY23.cjs";
|
|
3
3
|
import * as _$_powerlines_core0 from "@powerlines/core";
|
|
4
4
|
import { FrameworkOptions, InlineConfig, LogFn, LoggerOptions } from "@powerlines/core";
|
|
5
5
|
import { ConnectionMeta, DevToolsHost, DevToolsNodeContext } from "devframe/types";
|
|
@@ -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-
|
|
54
|
+
//# sourceMappingURL=engine-context-C6bNxumd.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-context-
|
|
1
|
+
{"version":3,"file":"engine-context-C6bNxumd.d.cts","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.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as EngineOptions } from "./config-B_E_HMcT.cjs";
|
|
2
|
-
import { t as EngineContext } from "./context-
|
|
3
|
-
import { t as PowerlinesEngineContext } from "./engine-context-
|
|
4
|
-
import { n as ExecutionHost, t as Engine } from "./api-
|
|
2
|
+
import { t as EngineContext } from "./context-LQBeYY23.cjs";
|
|
3
|
+
import { t as PowerlinesEngineContext } from "./engine-context-C6bNxumd.cjs";
|
|
4
|
+
import { n as ExecutionHost, t as Engine } from "./api-Bi_h4LMX.cjs";
|
|
5
5
|
import { BuildInlineConfig, CleanInlineConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, InlineConfig, LintInlineConfig, PrepareInlineConfig, TestInlineConfig, TypesInlineConfig } from "@powerlines/core";
|
|
6
6
|
import { EXECUTION_API_METHODS } from "@powerlines/core/constants";
|
|
7
7
|
|
package/dist/engine.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as EngineOptions } from "./config-FB8Zqjjz.mjs";
|
|
2
|
-
import { t as EngineContext } from "./context-
|
|
3
|
-
import { t as PowerlinesEngineContext } from "./engine-context-
|
|
4
|
-
import { n as ExecutionHost, t as Engine } from "./api-
|
|
2
|
+
import { t as EngineContext } from "./context-DrNQXXRC.mjs";
|
|
3
|
+
import { t as PowerlinesEngineContext } from "./engine-context-BBSMtv0b.mjs";
|
|
4
|
+
import { n as ExecutionHost, t as Engine } from "./api-oIs2Wp3t.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
|
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_chunk = require('../chunk-C0xms8kb.cjs');
|
|
3
|
+
const require_helpers_rpc = require('./rpc.cjs');
|
|
4
|
+
let _powerlines_core_plugin_utils = require("@powerlines/core/plugin-utils");
|
|
5
|
+
let _stryke_unique_id_uuid = require("@stryke/unique-id/uuid");
|
|
6
|
+
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
3
7
|
let _powerlines_core_context_execution_context = require("@powerlines/core/context/execution-context");
|
|
4
8
|
let _powerlines_core_lib_context_helpers = require("@powerlines/core/lib/context-helpers");
|
|
9
|
+
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
5
10
|
|
|
6
11
|
//#region src/helpers/create-execution-host.ts
|
|
7
12
|
/**
|
|
@@ -12,8 +17,28 @@ let _powerlines_core_lib_context_helpers = require("@powerlines/core/lib/context
|
|
|
12
17
|
*/
|
|
13
18
|
function createExecutionHost(methods) {
|
|
14
19
|
return Object.fromEntries(Object.entries(methods).map(([method, fn]) => [method, async (params) => {
|
|
15
|
-
const
|
|
16
|
-
|
|
20
|
+
const { options, inlineConfig } = params;
|
|
21
|
+
let rpc;
|
|
22
|
+
if (options.baseURL && options.connection) rpc = require_helpers_rpc.createRpcClient(options);
|
|
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.`);
|
|
24
|
+
const logFn = (meta, message) => {
|
|
25
|
+
(0, _powerlines_core_plugin_utils.consoleLogger)(meta, message);
|
|
26
|
+
if (rpc) rpc.callEvent("powerlines:log", {
|
|
27
|
+
meta: {
|
|
28
|
+
category: "general",
|
|
29
|
+
...options,
|
|
30
|
+
...(0, _stryke_type_checks_is_set_object.isSetObject)(meta) ? meta : { type: meta },
|
|
31
|
+
logId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
32
|
+
timestamp: Date.now()
|
|
33
|
+
},
|
|
34
|
+
message
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
const context = await _powerlines_core_context_execution_context.PowerlinesExecutionContext.from({
|
|
38
|
+
...options,
|
|
39
|
+
logFn
|
|
40
|
+
}, inlineConfig ?? {}, { rpc });
|
|
41
|
+
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})`);
|
|
17
42
|
await (0, _powerlines_core_lib_context_helpers.resolvePluginConfig)(context);
|
|
18
43
|
await fn(context);
|
|
19
44
|
}]));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-B_E_HMcT.cjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
3
|
-
import { r as ExecutionHostParams } from "../api-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-LQBeYY23.cjs";
|
|
3
|
+
import { r as ExecutionHostParams } from "../api-Bi_h4LMX.cjs";
|
|
4
4
|
import { PowerlinesExecutionContext } from "@powerlines/core/context/execution-context";
|
|
5
5
|
|
|
6
6
|
//#region src/helpers/create-execution-host.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-execution-host.d.cts","names":[],"sources":["../../src/helpers/create-execution-host.ts"],"mappings":";;;;;;;;
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import { r as EngineResolvedConfig } from "../config-FB8Zqjjz.mjs";
|
|
2
|
-
import { r as EngineSystemContext } from "../context-
|
|
3
|
-
import { r as ExecutionHostParams } from "../api-
|
|
2
|
+
import { r as EngineSystemContext } from "../context-DrNQXXRC.mjs";
|
|
3
|
+
import { r as ExecutionHostParams } from "../api-oIs2Wp3t.mjs";
|
|
4
4
|
import { PowerlinesExecutionContext } from "@powerlines/core/context/execution-context";
|
|
5
5
|
|
|
6
6
|
//#region src/helpers/create-execution-host.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-execution-host.d.mts","names":[],"sources":["../../src/helpers/create-execution-host.ts"],"mappings":";;;;;;;;
|
|
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,5 +1,10 @@
|
|
|
1
|
+
import { createRpcClient } from "./rpc.mjs";
|
|
2
|
+
import { consoleLogger } from "@powerlines/core/plugin-utils";
|
|
3
|
+
import { uuid } from "@stryke/unique-id/uuid";
|
|
4
|
+
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
1
5
|
import { PowerlinesExecutionContext } from "@powerlines/core/context/execution-context";
|
|
2
6
|
import { resolvePluginConfig } from "@powerlines/core/lib/context-helpers";
|
|
7
|
+
import { titleCase } from "@stryke/string-format/title-case";
|
|
3
8
|
|
|
4
9
|
//#region src/helpers/create-execution-host.ts
|
|
5
10
|
/**
|
|
@@ -10,8 +15,28 @@ import { resolvePluginConfig } from "@powerlines/core/lib/context-helpers";
|
|
|
10
15
|
*/
|
|
11
16
|
function createExecutionHost(methods) {
|
|
12
17
|
return Object.fromEntries(Object.entries(methods).map(([method, fn]) => [method, async (params) => {
|
|
13
|
-
const
|
|
14
|
-
|
|
18
|
+
const { options, inlineConfig } = params;
|
|
19
|
+
let rpc;
|
|
20
|
+
if (options.baseURL && options.connection) rpc = createRpcClient(options);
|
|
21
|
+
else throw new Error(`Execution RPC client could not be created - Missing ${!options.baseURL ? `baseURL${options.connection ? ` and connection information` : ""}` : "connection"} or connection information.`);
|
|
22
|
+
const logFn = (meta, message) => {
|
|
23
|
+
consoleLogger(meta, message);
|
|
24
|
+
if (rpc) rpc.callEvent("powerlines:log", {
|
|
25
|
+
meta: {
|
|
26
|
+
category: "general",
|
|
27
|
+
...options,
|
|
28
|
+
...isSetObject(meta) ? meta : { type: meta },
|
|
29
|
+
logId: uuid(),
|
|
30
|
+
timestamp: Date.now()
|
|
31
|
+
},
|
|
32
|
+
message
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
const context = await PowerlinesExecutionContext.from({
|
|
36
|
+
...options,
|
|
37
|
+
logFn
|
|
38
|
+
}, inlineConfig ?? {}, { rpc });
|
|
39
|
+
context.logger.info(`Starting ${titleCase(options.framework?.name) || "Powerlines"} - ${titleCase(method)} execution (${options.executionId})`);
|
|
15
40
|
await resolvePluginConfig(context);
|
|
16
41
|
await fn(context);
|
|
17
42
|
}]));
|
|
@@ -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 { PowerlinesExecutionContext } from \"@powerlines/core/context/execution-context\";\nimport { resolvePluginConfig } from \"@powerlines/core/lib/context-helpers\";\nimport { ExecutionHostParams } from \"../types/api\";\nimport { EngineResolvedConfig } from \"../types/config\";\nimport { EngineSystemContext } from \"../types/context\";\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
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { t as EngineContext } from "../context-
|
|
2
|
-
import { n as ExecutionHost } from "../api-
|
|
1
|
+
import { t as EngineContext } from "../context-LQBeYY23.cjs";
|
|
2
|
+
import { n as ExecutionHost } from "../api-Bi_h4LMX.cjs";
|
|
3
3
|
import { Mode } from "@powerlines/core";
|
|
4
4
|
import { Worker } from "jest-worker";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as EngineContext } from "../context-
|
|
2
|
-
import { n as ExecutionHost } from "../api-
|
|
1
|
+
import { t as EngineContext } from "../context-DrNQXXRC.mjs";
|
|
2
|
+
import { n as ExecutionHost } from "../api-oIs2Wp3t.mjs";
|
|
3
3
|
import { Worker } from "jest-worker";
|
|
4
4
|
import { Mode } from "@powerlines/core";
|
|
5
5
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as RpcServerFunctions, D as WrappedRpcFunctions, E as WrappedRpcFunction, S as RpcPayloadMetadata, T as WrapRpcFunctions, _ as RpcClientRemoteFunctions, a as ExtractRpcFunction, b as RpcFunctions, c as InputRpcFunctions, d as RpcClientCall, f as RpcClientCallEvent, g as RpcClientHost, h as RpcClientFunctions, i as RpcClientOptions, l as LogPayload, m as RpcClientEvents, n as EngineOptions, o as ExtractRpcFunctions, p as RpcClientCallOptional, r as EngineResolvedConfig, s as InputRpcFunction, t as EngineExecutionOptions, u as RpcClient, v as RpcContext, w as WrapRpcFunction, x as RpcPayloadEnvelop, y as RpcFunction } from "./config-B_E_HMcT.cjs";
|
|
2
|
-
import { a as ExecutionHookScopeState, c as ExecutionScopeType, i as ExecutionCommandScopeState, l as ExecutionState, n as EngineExecutionItem, o as ExecutionPluginScopeState, r as EngineSystemContext, s as ExecutionScopeState, t as EngineContext } from "./context-
|
|
3
|
-
import { a as PowerlinesExecutionHost, i as ExecutionInterface, n as ExecutionHost, o as Worker, r as ExecutionHostParams, t as Engine } from "./api-
|
|
2
|
+
import { a as ExecutionHookScopeState, c as ExecutionScopeType, i as ExecutionCommandScopeState, l as ExecutionState, n as EngineExecutionItem, o as ExecutionPluginScopeState, r as EngineSystemContext, s as ExecutionScopeState, t as EngineContext } from "./context-LQBeYY23.cjs";
|
|
3
|
+
import { a as PowerlinesExecutionHost, i as ExecutionInterface, n as ExecutionHost, o as Worker, r as ExecutionHostParams, t as Engine } from "./api-Bi_h4LMX.cjs";
|
|
4
4
|
import { PowerlinesEngine, createContext, createEngine } from "./engine.cjs";
|
|
5
5
|
export { Engine, EngineContext, EngineExecutionItem, EngineExecutionOptions, EngineOptions, EngineResolvedConfig, EngineSystemContext, ExecutionCommandScopeState, ExecutionHookScopeState, ExecutionHost, ExecutionHostParams, ExecutionInterface, ExecutionPluginScopeState, ExecutionScopeState, ExecutionScopeType, ExecutionState, ExtractRpcFunction, ExtractRpcFunctions, InputRpcFunction, InputRpcFunctions, LogPayload, type PowerlinesEngine, PowerlinesExecutionHost, RpcClient, RpcClientCall, RpcClientCallEvent, RpcClientCallOptional, RpcClientEvents, RpcClientFunctions, RpcClientHost, RpcClientOptions, RpcClientRemoteFunctions, RpcContext, RpcFunction, RpcFunctions, RpcPayloadEnvelop, RpcPayloadMetadata, RpcServerFunctions, Worker, WrapRpcFunction, WrapRpcFunctions, WrappedRpcFunction, WrappedRpcFunctions, createContext, createEngine };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as RpcServerFunctions, D as WrappedRpcFunctions, E as WrappedRpcFunction, S as RpcPayloadMetadata, T as WrapRpcFunctions, _ as RpcClientRemoteFunctions, a as ExtractRpcFunction, b as RpcFunctions, c as InputRpcFunctions, d as RpcClientCall, f as RpcClientCallEvent, g as RpcClientHost, h as RpcClientFunctions, i as RpcClientOptions, l as LogPayload, m as RpcClientEvents, n as EngineOptions, o as ExtractRpcFunctions, p as RpcClientCallOptional, r as EngineResolvedConfig, s as InputRpcFunction, t as EngineExecutionOptions, u as RpcClient, v as RpcContext, w as WrapRpcFunction, x as RpcPayloadEnvelop, y as RpcFunction } from "./config-FB8Zqjjz.mjs";
|
|
2
|
-
import { a as ExecutionHookScopeState, c as ExecutionScopeType, i as ExecutionCommandScopeState, l as ExecutionState, n as EngineExecutionItem, o as ExecutionPluginScopeState, r as EngineSystemContext, s as ExecutionScopeState, t as EngineContext } from "./context-
|
|
3
|
-
import { a as PowerlinesExecutionHost, i as ExecutionInterface, n as ExecutionHost, o as Worker, r as ExecutionHostParams, t as Engine } from "./api-
|
|
2
|
+
import { a as ExecutionHookScopeState, c as ExecutionScopeType, i as ExecutionCommandScopeState, l as ExecutionState, n as EngineExecutionItem, o as ExecutionPluginScopeState, r as EngineSystemContext, s as ExecutionScopeState, t as EngineContext } from "./context-DrNQXXRC.mjs";
|
|
3
|
+
import { a as PowerlinesExecutionHost, i as ExecutionInterface, n as ExecutionHost, o as Worker, r as ExecutionHostParams, t as Engine } from "./api-oIs2Wp3t.mjs";
|
|
4
4
|
import { PowerlinesEngine, createContext, createEngine } from "./engine.mjs";
|
|
5
5
|
export { Engine, EngineContext, EngineExecutionItem, EngineExecutionOptions, EngineOptions, EngineResolvedConfig, EngineSystemContext, ExecutionCommandScopeState, ExecutionHookScopeState, ExecutionHost, ExecutionHostParams, ExecutionInterface, ExecutionPluginScopeState, ExecutionScopeState, ExecutionScopeType, ExecutionState, ExtractRpcFunction, ExtractRpcFunctions, InputRpcFunction, InputRpcFunctions, LogPayload, type PowerlinesEngine, PowerlinesExecutionHost, RpcClient, RpcClientCall, RpcClientCallEvent, RpcClientCallOptional, RpcClientEvents, RpcClientFunctions, RpcClientHost, RpcClientOptions, RpcClientRemoteFunctions, RpcContext, RpcFunction, RpcFunctions, RpcPayloadEnvelop, RpcPayloadMetadata, RpcServerFunctions, Worker, WrapRpcFunction, WrapRpcFunctions, WrappedRpcFunction, WrappedRpcFunctions, createContext, createEngine };
|