@powerlines/engine 0.15.18 → 0.15.20

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 (110) hide show
  1. package/dist/api/build.cjs +1 -1
  2. package/dist/api/build.d.mts +2 -2
  3. package/dist/api/build.mjs +1 -1
  4. package/dist/api/clean.d.mts +2 -2
  5. package/dist/api/create.d.mts +2 -2
  6. package/dist/api/deploy.d.mts +2 -2
  7. package/dist/api/docs.d.mts +2 -2
  8. package/dist/api/lint.d.mts +2 -2
  9. package/dist/api/prepare.cjs +2 -2
  10. package/dist/api/prepare.d.mts +2 -2
  11. package/dist/api/prepare.mjs +2 -2
  12. package/dist/api/test.d.mts +2 -2
  13. package/dist/api/types.cjs +2 -2
  14. package/dist/api/types.d.mts +2 -2
  15. package/dist/api/types.mjs +2 -2
  16. package/dist/{api-Cdw4v0W4.d.mts → api-B2dWvRMM.d.mts} +10 -7
  17. package/dist/api-B2dWvRMM.d.mts.map +1 -0
  18. package/dist/{api-6w4hZL6n.d.cts → api-DgxYwNuZ.d.cts} +8 -5
  19. package/dist/api-DgxYwNuZ.d.cts.map +1 -0
  20. package/dist/{execution-host.cjs → api.cjs} +1 -1
  21. package/dist/{execution-host.d.mts → api.d.cts} +3 -3
  22. package/dist/api.d.cts.map +1 -0
  23. package/dist/{execution-host.d.cts → api.d.mts} +3 -3
  24. package/dist/api.d.mts.map +1 -0
  25. package/dist/{execution-host.mjs → api.mjs} +2 -2
  26. package/dist/api.mjs.map +1 -0
  27. package/dist/{config-BNe23XHx.d.mts → config-C9AD-erz.d.mts} +1 -1
  28. package/dist/{config-BNe23XHx.d.mts.map → config-C9AD-erz.d.mts.map} +1 -1
  29. package/dist/context/engine-context.cjs +4 -4
  30. package/dist/context/engine-context.d.cts +1 -1
  31. package/dist/context/engine-context.d.mts +1 -1
  32. package/dist/context/engine-context.mjs +4 -4
  33. package/dist/context/index.d.cts +1 -1
  34. package/dist/context/index.d.mts +1 -1
  35. package/dist/{context-DzgsMSWr.d.mts → context-S3XH2DWP.d.mts} +2 -2
  36. package/dist/{context-DzgsMSWr.d.mts.map → context-S3XH2DWP.d.mts.map} +1 -1
  37. package/dist/engine-DELjWFmN.mjs +564 -0
  38. package/dist/engine-DELjWFmN.mjs.map +1 -0
  39. package/dist/engine-DTKq6gFT.cjs +583 -0
  40. package/dist/{engine-context-Dw8odBCo.d.cts → engine-context-5-_EGiKp.d.cts} +1 -1
  41. package/dist/{engine-context-DEotmVzB.d.mts.map → engine-context-5-_EGiKp.d.cts.map} +1 -1
  42. package/dist/{engine-context-DEotmVzB.d.mts → engine-context-zsn1PoRl.d.mts} +5 -5
  43. package/dist/{engine-context-Dw8odBCo.d.cts.map → engine-context-zsn1PoRl.d.mts.map} +1 -1
  44. package/dist/engine.cjs +4 -266
  45. package/dist/engine.d.cts +3 -3
  46. package/dist/engine.d.cts.map +1 -1
  47. package/dist/engine.d.mts +6 -6
  48. package/dist/engine.d.mts.map +1 -1
  49. package/dist/engine.mjs +2 -263
  50. package/dist/helpers/create-execution-host.cjs +9 -2
  51. package/dist/helpers/create-execution-host.d.cts +20 -2
  52. package/dist/helpers/create-execution-host.d.cts.map +1 -0
  53. package/dist/helpers/create-execution-host.d.mts +20 -2
  54. package/dist/helpers/create-execution-host.d.mts.map +1 -0
  55. package/dist/helpers/create-execution-host.mjs +9 -2
  56. package/dist/helpers/create-execution-host.mjs.map +1 -1
  57. package/dist/helpers/finalize.d.cts +12 -2
  58. package/dist/helpers/finalize.d.cts.map +1 -0
  59. package/dist/helpers/finalize.d.mts +12 -2
  60. package/dist/helpers/finalize.d.mts.map +1 -0
  61. package/dist/helpers/index.cjs +4 -2
  62. package/dist/helpers/index.d.cts +5 -5
  63. package/dist/helpers/index.d.mts +5 -5
  64. package/dist/helpers/index.mjs +2 -2
  65. package/dist/helpers/rpc.cjs +2 -2
  66. package/dist/helpers/rpc.d.cts +7 -2
  67. package/dist/helpers/rpc.d.cts.map +1 -0
  68. package/dist/helpers/rpc.d.mts +7 -2
  69. package/dist/helpers/rpc.d.mts.map +1 -0
  70. package/dist/helpers/rpc.mjs +2 -2
  71. package/dist/helpers/stream.cjs +120 -0
  72. package/dist/helpers/stream.d.cts +45 -0
  73. package/dist/helpers/stream.d.cts.map +1 -0
  74. package/dist/helpers/stream.d.mts +45 -0
  75. package/dist/helpers/stream.d.mts.map +1 -0
  76. package/dist/helpers/stream.mjs +117 -0
  77. package/dist/helpers/stream.mjs.map +1 -0
  78. package/dist/index.cjs +2 -11
  79. package/dist/index.d.cts +3 -7
  80. package/dist/index.d.mts +5 -9
  81. package/dist/index.mjs +2 -7
  82. package/package.json +10 -12
  83. package/dist/api-6w4hZL6n.d.cts.map +0 -1
  84. package/dist/api-Cdw4v0W4.d.mts.map +0 -1
  85. package/dist/create-execution-host-CdpuL_YG.d.mts +0 -20
  86. package/dist/create-execution-host-CdpuL_YG.d.mts.map +0 -1
  87. package/dist/create-execution-host-DbOCE5bd.d.cts +0 -20
  88. package/dist/create-execution-host-DbOCE5bd.d.cts.map +0 -1
  89. package/dist/engine.mjs.map +0 -1
  90. package/dist/execution-host-worker-B8TS4clU.d.mts +0 -68
  91. package/dist/execution-host-worker-B8TS4clU.d.mts.map +0 -1
  92. package/dist/execution-host-worker-BjXO7l3Q.d.cts +0 -68
  93. package/dist/execution-host-worker-BjXO7l3Q.d.cts.map +0 -1
  94. package/dist/execution-host.d.cts.map +0 -1
  95. package/dist/execution-host.d.mts.map +0 -1
  96. package/dist/execution-host.mjs.map +0 -1
  97. package/dist/finalize-CW0cO75l.d.cts +0 -12
  98. package/dist/finalize-CW0cO75l.d.cts.map +0 -1
  99. package/dist/finalize-DeSY1r74.d.mts +0 -12
  100. package/dist/finalize-DeSY1r74.d.mts.map +0 -1
  101. package/dist/helpers/execution-host-worker.cjs +0 -315
  102. package/dist/helpers/execution-host-worker.d.cts +0 -2
  103. package/dist/helpers/execution-host-worker.d.mts +0 -2
  104. package/dist/helpers/execution-host-worker.mjs +0 -314
  105. package/dist/helpers/execution-host-worker.mjs.map +0 -1
  106. package/dist/rpc-BsFxzyAK.d.cts +0 -7
  107. package/dist/rpc-BsFxzyAK.d.cts.map +0 -1
  108. package/dist/rpc-xwbFMMNu.d.mts +0 -7
  109. package/dist/rpc-xwbFMMNu.d.mts.map +0 -1
  110. /package/dist/{index-D_TYgLX3.d.cts → index-DDRpa5CJ.d.cts} +0 -0
package/dist/index.d.cts CHANGED
@@ -1,10 +1,6 @@
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-D6xUniHh.cjs";
2
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-epL7NPvL.cjs";
3
- import { t as PowerlinesEngineContext } from "./engine-context-Dw8odBCo.cjs";
4
- import { a as PowerlinesExecutionHost, i as ExecutionInterface, n as ExecutionHost, o as Worker, r as ExecutionHostParams, t as Engine } from "./api-6w4hZL6n.cjs";
3
+ import { a as PowerlinesExecutionHost, i as ExecutionInterface, n as ExecutionHost, o as Worker, r as ExecutionHostParams, t as Engine } from "./api-DgxYwNuZ.cjs";
4
+ import { t as PowerlinesEngineContext } from "./engine-context-5-_EGiKp.cjs";
5
5
  import { PowerlinesEngine, createContext, createEngine } from "./engine.cjs";
6
- import { t as createExecutionHost } from "./create-execution-host-DbOCE5bd.cjs";
7
- import { n as ExecutionHostWorkerOptions, r as NodeOptions, t as ExecutionHostWorker } from "./execution-host-worker-BjXO7l3Q.cjs";
8
- import { t as finalize } from "./finalize-CW0cO75l.cjs";
9
- import { t as createRpcClient } from "./rpc-BsFxzyAK.cjs";
10
- export { Engine, EngineContext, EngineExecutionItem, EngineExecutionOptions, EngineOptions, EngineResolvedConfig, EngineSystemContext, ExecutionCommandScopeState, ExecutionHookScopeState, ExecutionHost, ExecutionHostParams, ExecutionHostWorker, ExecutionHostWorkerOptions, ExecutionInterface, ExecutionPluginScopeState, ExecutionScopeState, ExecutionScopeType, ExecutionState, ExtractRpcFunction, ExtractRpcFunctions, InputRpcFunction, InputRpcFunctions, LogPayload, NodeOptions, PowerlinesEngine, PowerlinesEngineContext, PowerlinesExecutionHost, RpcClient, RpcClientCall, RpcClientCallEvent, RpcClientCallOptional, RpcClientEvents, RpcClientFunctions, RpcClientHost, RpcClientOptions, RpcClientRemoteFunctions, RpcContext, RpcFunction, RpcFunctions, RpcPayloadEnvelop, RpcPayloadMetadata, RpcServerFunctions, Worker, WrapRpcFunction, WrapRpcFunctions, WrappedRpcFunction, WrappedRpcFunctions, createContext, createEngine, createExecutionHost, createRpcClient, finalize };
6
+ export { Engine, EngineContext, EngineExecutionItem, EngineExecutionOptions, EngineOptions, EngineResolvedConfig, EngineSystemContext, ExecutionCommandScopeState, ExecutionHookScopeState, ExecutionHost, ExecutionHostParams, ExecutionInterface, ExecutionPluginScopeState, ExecutionScopeState, ExecutionScopeType, ExecutionState, ExtractRpcFunction, ExtractRpcFunctions, InputRpcFunction, InputRpcFunctions, LogPayload, PowerlinesEngine, PowerlinesEngineContext, 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,10 +1,6 @@
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-BNe23XHx.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-DzgsMSWr.mjs";
3
- import { t as PowerlinesEngineContext } from "./engine-context-DEotmVzB.mjs";
4
- import { a as PowerlinesExecutionHost, i as ExecutionInterface, n as ExecutionHost, o as Worker, r as ExecutionHostParams, t as Engine } from "./api-Cdw4v0W4.mjs";
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-C9AD-erz.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-S3XH2DWP.mjs";
3
+ import { a as PowerlinesExecutionHost, i as ExecutionInterface, n as ExecutionHost, o as Worker, r as ExecutionHostParams, t as Engine } from "./api-B2dWvRMM.mjs";
4
+ import { t as PowerlinesEngineContext } from "./engine-context-zsn1PoRl.mjs";
5
5
  import { PowerlinesEngine, createContext, createEngine } from "./engine.mjs";
6
- import { t as createExecutionHost } from "./create-execution-host-CdpuL_YG.mjs";
7
- import { n as ExecutionHostWorkerOptions, r as NodeOptions, t as ExecutionHostWorker } from "./execution-host-worker-B8TS4clU.mjs";
8
- import { t as finalize } from "./finalize-DeSY1r74.mjs";
9
- import { t as createRpcClient } from "./rpc-xwbFMMNu.mjs";
10
- export { Engine, EngineContext, EngineExecutionItem, EngineExecutionOptions, EngineOptions, EngineResolvedConfig, EngineSystemContext, ExecutionCommandScopeState, ExecutionHookScopeState, ExecutionHost, ExecutionHostParams, ExecutionHostWorker, ExecutionHostWorkerOptions, ExecutionInterface, ExecutionPluginScopeState, ExecutionScopeState, ExecutionScopeType, ExecutionState, ExtractRpcFunction, ExtractRpcFunctions, InputRpcFunction, InputRpcFunctions, LogPayload, NodeOptions, PowerlinesEngine, PowerlinesEngineContext, PowerlinesExecutionHost, RpcClient, RpcClientCall, RpcClientCallEvent, RpcClientCallOptional, RpcClientEvents, RpcClientFunctions, RpcClientHost, RpcClientOptions, RpcClientRemoteFunctions, RpcContext, RpcFunction, RpcFunctions, RpcPayloadEnvelop, RpcPayloadMetadata, RpcServerFunctions, Worker, WrapRpcFunction, WrapRpcFunctions, WrappedRpcFunction, WrappedRpcFunctions, createContext, createEngine, createExecutionHost, createRpcClient, finalize };
6
+ export { Engine, EngineContext, EngineExecutionItem, EngineExecutionOptions, EngineOptions, EngineResolvedConfig, EngineSystemContext, ExecutionCommandScopeState, ExecutionHookScopeState, ExecutionHost, ExecutionHostParams, ExecutionInterface, ExecutionPluginScopeState, ExecutionScopeState, ExecutionScopeType, ExecutionState, ExtractRpcFunction, ExtractRpcFunctions, InputRpcFunction, InputRpcFunctions, LogPayload, PowerlinesEngine, PowerlinesEngineContext, 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.mjs CHANGED
@@ -1,10 +1,5 @@
1
+ import { n as createContext, r as createEngine, t as PowerlinesEngine } from "./engine-DELjWFmN.mjs";
1
2
  import { PowerlinesEngineContext } from "./context/engine-context.mjs";
2
- import { ExecutionHostWorker } from "./helpers/execution-host-worker.mjs";
3
- import { PowerlinesEngine, createContext, createEngine } from "./engine.mjs";
4
- import { createRpcClient } from "./helpers/rpc.mjs";
5
- import { createExecutionHost } from "./helpers/create-execution-host.mjs";
6
3
  import "./context/index.mjs";
7
- import { finalize } from "./helpers/finalize.mjs";
8
- import "./helpers/index.mjs";
9
4
 
10
- export { ExecutionHostWorker, PowerlinesEngine, PowerlinesEngineContext, createContext, createEngine, createExecutionHost, createRpcClient, finalize };
5
+ export { PowerlinesEngine, PowerlinesEngineContext, createContext, createEngine };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/engine",
3
- "version": "0.15.18",
3
+ "version": "0.15.20",
4
4
  "private": false,
5
5
  "description": "An internal package containing the core engine modules for Powerlines.",
6
6
  "homepage": "https://stormsoftware.com",
@@ -40,6 +40,7 @@
40
40
  "type": "module",
41
41
  "exports": {
42
42
  ".": { "import": "./dist/index.mjs", "require": "./dist/index.cjs" },
43
+ "./api": { "import": "./dist/api.mjs", "require": "./dist/api.cjs" },
43
44
  "./api/build": {
44
45
  "import": "./dist/api/build.mjs",
45
46
  "require": "./dist/api/build.cjs"
@@ -88,10 +89,6 @@
88
89
  "import": "./dist/engine.mjs",
89
90
  "require": "./dist/engine.cjs"
90
91
  },
91
- "./execution-host": {
92
- "import": "./dist/execution-host.mjs",
93
- "require": "./dist/execution-host.cjs"
94
- },
95
92
  "./helpers": {
96
93
  "import": "./dist/helpers/index.mjs",
97
94
  "require": "./dist/helpers/index.cjs"
@@ -100,10 +97,6 @@
100
97
  "import": "./dist/helpers/create-execution-host.mjs",
101
98
  "require": "./dist/helpers/create-execution-host.cjs"
102
99
  },
103
- "./helpers/execution-host-worker": {
104
- "import": "./dist/helpers/execution-host-worker.mjs",
105
- "require": "./dist/helpers/execution-host-worker.cjs"
106
- },
107
100
  "./helpers/finalize": {
108
101
  "import": "./dist/helpers/finalize.mjs",
109
102
  "require": "./dist/helpers/finalize.cjs"
@@ -112,6 +105,10 @@
112
105
  "import": "./dist/helpers/rpc.mjs",
113
106
  "require": "./dist/helpers/rpc.cjs"
114
107
  },
108
+ "./helpers/stream": {
109
+ "import": "./dist/helpers/stream.mjs",
110
+ "require": "./dist/helpers/stream.cjs"
111
+ },
115
112
  "./package.json": "./package.json"
116
113
  },
117
114
  "main": "./dist/index.cjs",
@@ -119,7 +116,7 @@
119
116
  "types": "./dist/index.d.cts",
120
117
  "files": ["dist"],
121
118
  "dependencies": {
122
- "@powerlines/core": "^0.15.17",
119
+ "@powerlines/core": "^0.15.18",
123
120
  "@storm-software/config": "^1.137.52",
124
121
  "@storm-software/config-tools": "^1.190.20",
125
122
  "@stryke/async": "^0.1.5",
@@ -142,9 +139,10 @@
142
139
  "h3": "^1.15.11",
143
140
  "handlebars": "^4.7.9",
144
141
  "human-id": "^4.1.3",
145
- "jest-worker": "^30.4.1",
146
142
  "jiti": "^2.7.0",
143
+ "piscina": "^5.1.4",
147
144
  "sirv": "^3.0.2",
145
+ "structured-clone-es": "^2.0.0",
148
146
  "ua-parser-modern": "^0.1.1",
149
147
  "unimport": "^5.7.0",
150
148
  "unplugin": "^3.0.0"
@@ -155,5 +153,5 @@
155
153
  "@types/node": "^25.8.0",
156
154
  "typescript": "^6.0.3"
157
155
  },
158
- "gitHead": "3a81361fe40ac713daf61003a349ec9fd7d97f0e"
156
+ "gitHead": "c5c293e753d59ab690265988c77bd535680ac71b"
159
157
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-6w4hZL6n.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;;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AgB,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,20 +0,0 @@
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 { ExecutionContext, InlineConfig } from "@powerlines/core";
5
- import { DeepPartial, MaybePromise } from "@stryke/types/base";
6
-
7
- //#region src/helpers/create-execution-host.d.ts
8
- /**
9
- * Creates an execution host with the provided methods. Each method will be wrapped to create an execution context and handle errors appropriately.
10
- *
11
- * @param methods - An object where keys are method names and values are functions that take an execution context and return a promise.
12
- * @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.
13
- * @returns An object with the same keys as the input methods, but each function is wrapped to create an execution context and handle errors.
14
- */
15
- declare function createExecutionHost<TContext extends ExecutionContext<EngineResolvedConfig, EngineSystemContext> = ExecutionContext<EngineResolvedConfig, EngineSystemContext>>(methods: Record<string, (context: TContext) => Promise<void>>, inlineConfig?: DeepPartial<InlineConfig> | ((prev: InlineConfig) => MaybePromise<InlineConfig>)): {
16
- [k: string]: (params: ExecutionHostParams) => Promise<void>;
17
- };
18
- //#endregion
19
- export { createExecutionHost as t };
20
- //# sourceMappingURL=create-execution-host-CdpuL_YG.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-execution-host-CdpuL_YG.d.mts","names":[],"sources":["../src/helpers/create-execution-host.ts"],"mappings":";;;;;;;;;AA6CA;;;;;iBAAgB,mBAAA,kBACG,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,IACtD,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,EAAA,CAEzC,OAAA,EAAS,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,SAC/C,YAAA,GACI,WAAA,CAAY,YAAA,MACV,IAAA,EAAM,YAAA,KAAiB,YAAA,CAAa,YAAA;EAAA,sBAKvB,mBAAA,KAAmB,OAAA;AAAA"}
@@ -1,20 +0,0 @@
1
- import { r as EngineResolvedConfig } from "./config-D6xUniHh.cjs";
2
- import { r as EngineSystemContext } from "./context-epL7NPvL.cjs";
3
- import { r as ExecutionHostParams } from "./api-6w4hZL6n.cjs";
4
- import { ExecutionContext, InlineConfig } from "@powerlines/core";
5
- import { DeepPartial, MaybePromise } from "@stryke/types/base";
6
-
7
- //#region src/helpers/create-execution-host.d.ts
8
- /**
9
- * Creates an execution host with the provided methods. Each method will be wrapped to create an execution context and handle errors appropriately.
10
- *
11
- * @param methods - An object where keys are method names and values are functions that take an execution context and return a promise.
12
- * @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.
13
- * @returns An object with the same keys as the input methods, but each function is wrapped to create an execution context and handle errors.
14
- */
15
- declare function createExecutionHost<TContext extends ExecutionContext<EngineResolvedConfig, EngineSystemContext> = ExecutionContext<EngineResolvedConfig, EngineSystemContext>>(methods: Record<string, (context: TContext) => Promise<void>>, inlineConfig?: DeepPartial<InlineConfig> | ((prev: InlineConfig) => MaybePromise<InlineConfig>)): {
16
- [k: string]: (params: ExecutionHostParams) => Promise<void>;
17
- };
18
- //#endregion
19
- export { createExecutionHost as t };
20
- //# sourceMappingURL=create-execution-host-DbOCE5bd.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-execution-host-DbOCE5bd.d.cts","names":[],"sources":["../src/helpers/create-execution-host.ts"],"mappings":";;;;;;;;;AA6CA;;;;;iBAAgB,mBAAA,kBACG,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,IACtD,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,EAAA,CAEzC,OAAA,EAAS,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,SAC/C,YAAA,GACI,WAAA,CAAY,YAAA,MACV,IAAA,EAAM,YAAA,KAAiB,YAAA,CAAa,YAAA;EAAA,sBAKvB,mBAAA,KAAmB,OAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"engine.mjs","names":["#context","#host"],"sources":["../src/engine.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 BuildInlineConfig,\n CleanInlineConfig,\n CreateInlineConfig,\n DeployInlineConfig,\n DocsInlineConfig,\n InlineConfig,\n LintInlineConfig,\n PrepareInlineConfig,\n TestInlineConfig,\n TypesInlineConfig\n} from \"@powerlines/core\";\nimport { EXECUTION_API_METHODS } from \"@powerlines/core/constants\";\nimport { createH3DevToolsHost } from \"devframe/node\";\nimport { getPort } from \"get-port-please\";\nimport { createApp, fromNodeMiddleware } from \"h3\";\nimport { EventEmitter } from \"node:events\";\nimport sirv from \"sirv\";\nimport { PowerlinesEngineContext } from \"./context/engine-context\";\nimport { ExecutionHostWorker } from \"./helpers/execution-host-worker\";\nimport { Engine, ExecutionHost } from \"./types/api\";\nimport { EngineOptions } from \"./types/config\";\nimport { EngineContext } from \"./types/context\";\n\n/**\n * The Powerlines process' orchestration and coordination API.\n *\n * @public\n */\nexport class PowerlinesEngine<\n TExecutionAPI extends ReadonlyArray<string> = typeof EXECUTION_API_METHODS\n>\n implements Engine<TExecutionAPI>, AsyncDisposable\n{\n /**\n * The Powerlines context\n */\n #context: EngineContext;\n\n /**\n * The execution host, which provides methods to call the execution API functions from the engine context. This allows the engine to invoke commands and other API functions during the execution of Powerlines commands, enabling communication between the engine and the execution contexts.\n */\n #host: ExecutionHost<TExecutionAPI>;\n\n /**\n * The Powerlines context\n */\n public get context(): EngineContext {\n return this.#context;\n }\n\n /**\n * The execution host, which provides methods to call the execution API functions from the engine context. This allows the engine to invoke commands and other API functions during the execution of Powerlines commands, enabling communication between the engine and the execution contexts.\n */\n public get host(): ExecutionHost<TExecutionAPI> {\n return this.#host;\n }\n\n /**\n * Create a new Powerlines Engine instance\n *\n * @param context - The Powerlines context\n * @param host - The API host for the execution workers\n * @returns A new instance of the Powerlines Engine\n */\n public constructor(\n context: EngineContext,\n host: ExecutionHost<TExecutionAPI>\n ) {\n this.#context = context;\n this.#host = host;\n }\n\n /**\n * Create a new Powerlines project\n *\n * @remarks\n * This method will create a new Powerlines project in the current directory.\n *\n * @param inlineConfig - The inline configuration for the create command\n * @returns A promise that resolves when the project has been created\n */\n public async create(inlineConfig: CreateInlineConfig) {\n const timer = this.context.timer(\"Create\");\n this.context.info(\"🆕 Creating a new project\");\n\n await this.execute(\"create\", inlineConfig);\n\n this.context.debug(\"✔ Create command completed successfully\");\n timer();\n }\n\n /**\n * Generate the Powerlines typescript declaration file\n *\n * @remarks\n * This method will only generate the typescript declaration file for the Powerlines project. It is generally recommended to run the full `prepare` command, which will run this method as part of its process.\n *\n * @param inlineConfig - The inline configuration for the types command\n */\n public async types(inlineConfig: TypesInlineConfig) {\n const timer = this.context.timer(\"Types\");\n this.context.info(\"🏗️ Generating typescript declarations for the project\");\n\n await this.execute(\"types\", inlineConfig);\n\n this.context.debug(\"✔ Types generation has completed successfully\");\n timer();\n }\n\n /**\n * Prepare the Powerlines API\n *\n * @remarks\n * This method will prepare the Powerlines API for use, initializing any necessary resources.\n *\n * @param inlineConfig - The inline configuration for the prepare command\n */\n public async prepare(inlineConfig: PrepareInlineConfig) {\n const timer = this.context.timer(\"Prepare\");\n this.context.info(\"🏗️ Preparing the project\");\n\n await this.execute(\"prepare\", inlineConfig);\n\n this.context.debug(\"✔ Preparation has completed successfully\");\n timer();\n }\n\n /**\n * Clean any previously prepared artifacts\n *\n * @remarks\n * This method will remove the previous Powerlines artifacts from the project.\n *\n * @param inlineConfig - The inline configuration for the clean command\n * @returns A promise that resolves when the clean command has completed\n */\n public async clean(inlineConfig: CleanInlineConfig) {\n const timer = this.context.timer(\"Clean\");\n this.context.info(\"🧹 Cleaning the previous artifacts\");\n\n await this.execute(\"clean\", inlineConfig);\n\n this.context.debug(\"✔ Cleaning completed successfully\");\n timer();\n }\n\n /**\n * Lint the project\n *\n * @param inlineConfig - The inline configuration for the lint command\n * @returns A promise that resolves when the lint command has completed\n */\n public async lint(inlineConfig: LintInlineConfig) {\n const timer = this.context.timer(\"Lint\");\n this.context.info(\"📝 Linting the project\");\n\n await this.execute(\"lint\", inlineConfig);\n\n this.context.debug(\"✔ Linting completed successfully\");\n timer();\n }\n\n /**\n * Test the project\n *\n * @remarks\n * This method will run the tests for the Powerlines project.\n *\n * @param inlineConfig - The inline configuration for the test command\n * @returns A promise that resolves when the test command has completed\n */\n public async test(inlineConfig: TestInlineConfig) {\n const timer = this.context.timer(\"Test\");\n this.context.info(\"🧪 Running tests for the project\");\n\n await this.execute(\"test\", inlineConfig);\n\n this.context.debug(\"✔ Testing completed successfully\");\n timer();\n }\n\n /**\n * Build the project\n *\n * @remarks\n * This method will build the Powerlines project, generating the necessary artifacts.\n *\n * @param inlineConfig - The inline configuration for the build command\n * @returns A promise that resolves when the build command has completed\n */\n public async build(inlineConfig: BuildInlineConfig) {\n const timer = this.context.timer(\"Build\");\n this.context.info(\"📦 Building the project\");\n\n await this.execute(\"build\", inlineConfig);\n\n this.context.debug(\"✔ Build completed successfully\");\n timer();\n }\n\n /**\n * Prepare the documentation for the project\n *\n * @param inlineConfig - The inline configuration for the docs command\n * @returns A promise that resolves when the documentation generation has completed\n */\n public async docs(inlineConfig: DocsInlineConfig) {\n const timer = this.context.timer(\"Docs\");\n this.context.info(\"📓 Generating documentation for the project\");\n\n await this.execute(\"docs\", inlineConfig);\n\n this.context.debug(\"✔ Documentation generation completed successfully\");\n timer();\n }\n\n /**\n * Deploy the project source code\n *\n * @remarks\n * This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.\n *\n * @param inlineConfig - The inline configuration for the deploy command\n * @returns A promise that resolves when the deploy command has completed\n */\n public async deploy(inlineConfig: DeployInlineConfig) {\n const timer = this.context.timer(\"Deploy\");\n this.context.info(\"🚀 Deploying the project\");\n\n await this.execute(\"deploy\", inlineConfig);\n\n this.context.debug(\"✔ Deployment completed successfully\");\n timer();\n }\n\n /**\n * Finalization/cleanup processing for the Powerlines API\n *\n * @remarks\n * This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.\n *\n * @returns A promise that resolves when the finalization process has completed\n */\n public async finalize() {\n const timer = this.context.timer(\"Finalize\");\n this.context.info(\"🏁 Finalization processes started\");\n\n await this.host.end();\n\n this.context.debug(\"✔ Finalization completed successfully\");\n timer();\n }\n\n /**\n * Asynchronous disposal method for the Powerlines Engine, which will call the finalize method to perform any necessary cleanup when the engine is disposed of.\n */\n public async [Symbol.asyncDispose]() {\n return this.finalize();\n }\n\n /**\n * Execute a Powerlines command based on the provided execution path and inline configuration, loading the necessary executions from the context and managing their lifecycle.\n *\n * @remarks\n * This method will load the executions for the specified command and inline configuration, then execute each one while managing their lifecycle, including handling their completion and any errors that may occur during execution.\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 * @returns A promise that resolves when all executions for the specified command have completed\n */\n protected async execute(\n method: TExecutionAPI[number],\n inlineConfig: InlineConfig\n ) {\n await Promise.all(\n (await this.context.loadExecutions(method, inlineConfig)).map(\n async execution => {\n try {\n await this.host[method]({\n options: execution.options,\n inlineConfig\n });\n } catch (error) {\n this.context.error(\n `Execution of method \"${method}\" failed for execution with invocation ID \"${\n execution.invocationId\n }\" and execution ID \"${execution.options.executionId}\": \\n\\n${\n error instanceof Error\n ? error.stack || error.message\n : String(error)\n }`\n );\n\n throw error;\n } finally {\n this.context.completeExecution(\n execution.invocationId,\n execution.options.executionId\n );\n }\n }\n )\n );\n }\n}\n\nexport async function createContext(options: EngineOptions) {\n const port =\n options.port ??\n (await getPort({\n host: options.host || \"localhost\",\n random: true\n }));\n\n const app = createApp();\n const host = createH3DevToolsHost({\n appName: options.framework?.name || \"powerlines\",\n origin: `http://${options.host || \"localhost\"}:${port}`,\n mount: (base, dir) => {\n app.use(base, fromNodeMiddleware(sirv(dir, { dev: true, single: true })));\n }\n });\n\n return PowerlinesEngineContext.from(options, host, {\n backend: \"websocket\",\n websocket: port\n });\n}\n\nexport async function createEngine<TExecutionAPI extends ReadonlyArray<string>>(\n options: EngineOptions,\n executionHostPath = \"@powerlines/engine/execution-host\",\n executionMethods: TExecutionAPI = EXECUTION_API_METHODS as unknown as TExecutionAPI\n) {\n EventEmitter.setMaxListeners(100);\n\n const context = await createContext(options);\n const host = await ExecutionHostWorker.from<TExecutionAPI>(\n executionHostPath,\n {\n root: options.root,\n context,\n executionMethods\n }\n );\n\n return new PowerlinesEngine<TExecutionAPI>(context, host);\n}\n"],"mappings":";;;;;;;;;;;;;;;AA+CA,IAAa,mBAAb,MAIA;;;;CAIE;;;;CAKA;;;;CAKA,IAAW,UAAyB;AAClC,SAAO,MAAKA;;;;;CAMd,IAAW,OAAqC;AAC9C,SAAO,MAAKC;;;;;;;;;CAUd,AAAO,YACL,SACA,MACA;AACA,QAAKD,UAAW;AAChB,QAAKC,OAAQ;;;;;;;;;;;CAYf,MAAa,OAAO,cAAkC;EACpD,MAAM,QAAQ,KAAK,QAAQ,M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ACJ,QAAQ,QACP,MAAM,QAAQ;EACb,MAAM,QAAQ,QAAQ;EACtB,QAAQ;EACT,CAAC;CAEJ,MAAM,MAAM,WAAW;CACvB,MAAM,OAAO,qBAAqB;EAChC,SAAS,QAAQ,WAAW,QAAQ;EACpC,QAAQ,UAAU,QAAQ,QAAQ,YAAY,GAAG;EACjD,QAAQ,MAAM,QAAQ;AACpB,OAAI,IAAI,MAAM,mBAAmB,KAAK,KAAK;IAAE,KAAK;IAAM,QAAQ;IAAM,CAAC,CAAC,CAAC;;EAE5E,CAAC;AAEF,QAAO,wBAAwB,KAAK,SAAS,MAAM;EACjD,SAAS;EACT,WAAW;EACZ,CAAC;;AAGJ,eAAsB,aACpB,SACA,oBAAoB,qCACpB,mBAAkC,uBAClC;AACA,cAAa,gBAAgB,IAAI;CAEjC,MAAM,UAAU,MAAM,cAAc,QAAQ;AAU5C,QAAO,IAAI,iBAAgC,SAAS,MATjC,oBAAoB,KACrC,mBACA;EACE,MAAM,QAAQ;EACd;EACA;EACD,CACF,CAEwD"}
@@ -1,68 +0,0 @@
1
- import { t as EngineContext } from "./context-DzgsMSWr.mjs";
2
- import { n as ExecutionHost } from "./api-Cdw4v0W4.mjs";
3
- import { Worker } from "jest-worker";
4
- import { Mode } from "@powerlines/core";
5
-
6
- //#region src/helpers/execution-host-worker.d.ts
7
- type NodeOptions = Record<string, string | boolean | undefined>;
8
- interface ExecutionHostWorkerOptions<TExecutionAPI extends ReadonlyArray<string>> {
9
- /**
10
- * The maximum time in milliseconds a worker can run before being terminated.
11
- *
12
- * @defaultValue 900000 (15 minutes)
13
- */
14
- timeout?: number;
15
- /**
16
- * True if `--max-old-space-size` should not be forwarded to the worker.
17
- */
18
- isolatedMemory?: boolean;
19
- /**
20
- * The mode to run the worker in, which can affect how the worker is initialized and how it behaves. This is determined based on the resolved configuration of the engine, and can be used to optimize the worker for different environments (e.g., development, production, etc.).
21
- */
22
- mode?: Mode;
23
- /**
24
- * An optional root to resolve the execution host path from, which can be used to specify a custom root directory for the worker to use when resolving paths and loading configuration files. If this option is not provided, the worker will use the current working directory as the root directory by default.
25
- */
26
- root?: string;
27
- /**
28
- * The context of the {@link @powerlines/engine#Engine | Engine instance}, which can be used to access the engine's state and services within the worker.
29
- */
30
- context: EngineContext;
31
- /**
32
- * An array of method names that the worker exposes. These methods will be available on the Worker instance and can be called to execute tasks in the worker process.
33
- */
34
- executionMethods: TExecutionAPI;
35
- }
36
- declare class ExecutionHostWorker<TExecutionAPI extends ReadonlyArray<string>> {
37
- #private;
38
- protected executionHostPath: string;
39
- protected options: ExecutionHostWorkerOptions<TExecutionAPI>;
40
- /**
41
- * Creates a new instance of the ExecutionHostWorker class, which manages a worker process for executing tasks related to the Powerlines Engine. The worker is initialized with the specified options and can be used to run tasks in an isolated environment, with support for automatic restarts and activity monitoring.
42
- *
43
- * @param executionHostPath - The path to the Execution Host file.
44
- * @param options - The options for configuring the worker, including the execution context, exposed methods, timeout, and mode.
45
- * @returns A promise that resolves to an instance of the ExecutionHostWorker class.
46
- */
47
- static from<TExecutionAPI extends ReadonlyArray<string>>(executionHostPath: string, options: ExecutionHostWorkerOptions<TExecutionAPI>): Promise<ExecutionHost<TExecutionAPI>>;
48
- /**
49
- * Create a new worker instance.
50
- *
51
- * @param executionHostPath - The path to the worker file.
52
- * @param options - The options for the worker, including exposed methods, timeout, and hooks for activity and restart.
53
- */
54
- constructor(executionHostPath: string, options: ExecutionHostWorkerOptions<TExecutionAPI>);
55
- /**
56
- * Ends the worker process and cleans up any resources associated with it. This method should be called when the worker is no longer needed, to ensure that it is properly terminated and does not continue to consume system resources. If the worker is already terminated or was never initialized, this method will throw an error.
57
- *
58
- * @returns A promise that resolves when the worker has been successfully terminated.
59
- */
60
- end(): ReturnType<Worker["end"]>;
61
- /**
62
- * Quietly end the worker if it exists
63
- */
64
- close(): void;
65
- }
66
- //#endregion
67
- export { ExecutionHostWorkerOptions as n, NodeOptions as r, ExecutionHostWorker as t };
68
- //# sourceMappingURL=execution-host-worker-B8TS4clU.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution-host-worker-B8TS4clU.d.mts","names":[],"sources":["../src/helpers/execution-host-worker.ts"],"mappings":";;;;;;KAoDY,WAAA,GAAc,MAAA;AAAA,UAqDT,0BAAA,uBACO,aAAA;EAtDZ;;;;;EAuEV,OAAA;EAlByC;;;EAuBzC,cAAA;EAeS;;;EAVT,IAAA,GAAO,IAAA;EA3BP;;;EAgCA,IAAA;EALA;;;EAUA,OAAA,EAAS,aAAA;EAAA;;;EAKT,gBAAA,EAAkB,aAAA;AAAA;AAAA,cAGP,mBAAA,uBAA0C,aAAA;EAAA;YAyCzC,iBAAA;EAAA,UACA,OAAA,EAAS,0BAAA,CAA2B,aAAA;EAAA;;;;;;;EAAA,OAhC5B,IAAA,uBAA2B,aAAA,SAAA,CAC7C,iBAAA,UACA,OAAA,EAAS,0BAAA,CAA2B,aAAA,IAAc,OAAA,CAAA,aAAA,CAAA,aAAA;EA8BJ;;;;;;cADpC,iBAAA,UACA,OAAA,EAAS,0BAAA,CAA2B,aAAA;EA1CK;;;;;EAycxC,GAAA,CAAA,GAAO,UAAA,CAAW,MAAA;EA/bX;;;EA6cb,KAAA,CAAA;AAAA"}
@@ -1,68 +0,0 @@
1
- import { t as EngineContext } from "./context-epL7NPvL.cjs";
2
- import { n as ExecutionHost } from "./api-6w4hZL6n.cjs";
3
- import { Mode } from "@powerlines/core";
4
- import { Worker } from "jest-worker";
5
-
6
- //#region src/helpers/execution-host-worker.d.ts
7
- type NodeOptions = Record<string, string | boolean | undefined>;
8
- interface ExecutionHostWorkerOptions<TExecutionAPI extends ReadonlyArray<string>> {
9
- /**
10
- * The maximum time in milliseconds a worker can run before being terminated.
11
- *
12
- * @defaultValue 900000 (15 minutes)
13
- */
14
- timeout?: number;
15
- /**
16
- * True if `--max-old-space-size` should not be forwarded to the worker.
17
- */
18
- isolatedMemory?: boolean;
19
- /**
20
- * The mode to run the worker in, which can affect how the worker is initialized and how it behaves. This is determined based on the resolved configuration of the engine, and can be used to optimize the worker for different environments (e.g., development, production, etc.).
21
- */
22
- mode?: Mode;
23
- /**
24
- * An optional root to resolve the execution host path from, which can be used to specify a custom root directory for the worker to use when resolving paths and loading configuration files. If this option is not provided, the worker will use the current working directory as the root directory by default.
25
- */
26
- root?: string;
27
- /**
28
- * The context of the {@link @powerlines/engine#Engine | Engine instance}, which can be used to access the engine's state and services within the worker.
29
- */
30
- context: EngineContext;
31
- /**
32
- * An array of method names that the worker exposes. These methods will be available on the Worker instance and can be called to execute tasks in the worker process.
33
- */
34
- executionMethods: TExecutionAPI;
35
- }
36
- declare class ExecutionHostWorker<TExecutionAPI extends ReadonlyArray<string>> {
37
- #private;
38
- protected executionHostPath: string;
39
- protected options: ExecutionHostWorkerOptions<TExecutionAPI>;
40
- /**
41
- * Creates a new instance of the ExecutionHostWorker class, which manages a worker process for executing tasks related to the Powerlines Engine. The worker is initialized with the specified options and can be used to run tasks in an isolated environment, with support for automatic restarts and activity monitoring.
42
- *
43
- * @param executionHostPath - The path to the Execution Host file.
44
- * @param options - The options for configuring the worker, including the execution context, exposed methods, timeout, and mode.
45
- * @returns A promise that resolves to an instance of the ExecutionHostWorker class.
46
- */
47
- static from<TExecutionAPI extends ReadonlyArray<string>>(executionHostPath: string, options: ExecutionHostWorkerOptions<TExecutionAPI>): Promise<ExecutionHost<TExecutionAPI>>;
48
- /**
49
- * Create a new worker instance.
50
- *
51
- * @param executionHostPath - The path to the worker file.
52
- * @param options - The options for the worker, including exposed methods, timeout, and hooks for activity and restart.
53
- */
54
- constructor(executionHostPath: string, options: ExecutionHostWorkerOptions<TExecutionAPI>);
55
- /**
56
- * Ends the worker process and cleans up any resources associated with it. This method should be called when the worker is no longer needed, to ensure that it is properly terminated and does not continue to consume system resources. If the worker is already terminated or was never initialized, this method will throw an error.
57
- *
58
- * @returns A promise that resolves when the worker has been successfully terminated.
59
- */
60
- end(): ReturnType<Worker["end"]>;
61
- /**
62
- * Quietly end the worker if it exists
63
- */
64
- close(): void;
65
- }
66
- //#endregion
67
- export { ExecutionHostWorkerOptions as n, NodeOptions as r, ExecutionHostWorker as t };
68
- //# sourceMappingURL=execution-host-worker-BjXO7l3Q.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution-host-worker-BjXO7l3Q.d.cts","names":[],"sources":["../src/helpers/execution-host-worker.ts"],"mappings":";;;;;;KAoDY,WAAA,GAAc,MAAA;AAAA,UAqDT,0BAAA,uBACO,aAAA;EAtDZ;;;;;EAuEV,OAAA;EAlByC;;;EAuBzC,cAAA;EAeS;;;EAVT,IAAA,GAAO,IAAA;EA3BP;;;EAgCA,IAAA;EALA;;;EAUA,OAAA,EAAS,aAAA;EAAA;;;EAKT,gBAAA,EAAkB,aAAA;AAAA;AAAA,cAGP,mBAAA,uBAA0C,aAAA;EAAA;YAyCzC,iBAAA;EAAA,UACA,OAAA,EAAS,0BAAA,CAA2B,aAAA;EAAA;;;;;;;EAAA,OAhC5B,IAAA,uBAA2B,aAAA,SAAA,CAC7C,iBAAA,UACA,OAAA,EAAS,0BAAA,CAA2B,aAAA,IAAc,OAAA,CAAA,aAAA,CAAA,aAAA;EA8BJ;;;;;;cADpC,iBAAA,UACA,OAAA,EAAS,0BAAA,CAA2B,aAAA;EA1CK;;;;;EAycxC,GAAA,CAAA,GAAO,UAAA,CAAW,MAAA;EA/bX;;;EA6cb,KAAA,CAAA;AAAA"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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"}
@@ -1,12 +0,0 @@
1
- import { ExecutionContext, ResolvedConfig } from "@powerlines/core";
2
-
3
- //#region src/helpers/finalize.d.ts
4
- /**
5
- * Finalize the execution context by disposing resources and cleaning up.
6
- *
7
- * @param context - The execution context to finalize
8
- */
9
- declare function finalize<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(context: ExecutionContext<TResolvedConfig>): Promise<void>;
10
- //#endregion
11
- export { finalize as t };
12
- //# sourceMappingURL=finalize-CW0cO75l.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"finalize-CW0cO75l.d.cts","names":[],"sources":["../src/helpers/finalize.ts"],"mappings":";;;;;AA+BA;;;iBAAsB,QAAA,yBACI,cAAA,GAAiB,cAAA,CAAA,CACzC,OAAA,EAAS,gBAAA,CAAiB,eAAA,IAAgB,OAAA"}
@@ -1,12 +0,0 @@
1
- import { ExecutionContext, ResolvedConfig } from "@powerlines/core";
2
-
3
- //#region src/helpers/finalize.d.ts
4
- /**
5
- * Finalize the execution context by disposing resources and cleaning up.
6
- *
7
- * @param context - The execution context to finalize
8
- */
9
- declare function finalize<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(context: ExecutionContext<TResolvedConfig>): Promise<void>;
10
- //#endregion
11
- export { finalize as t };
12
- //# sourceMappingURL=finalize-DeSY1r74.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"finalize-DeSY1r74.d.mts","names":[],"sources":["../src/helpers/finalize.ts"],"mappings":";;;;;AA+BA;;;iBAAsB,QAAA,yBACI,cAAA,GAAiB,cAAA,CAAA,CACzC,OAAA,EAAS,gBAAA,CAAiB,eAAA,IAAgB,OAAA"}