@powerlines/engine 0.49.34 → 0.49.35

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 (120) hide show
  1. package/dist/{engine-BKEDCOCb.cjs → _internal/execution-api-worker.cjs} +4 -277
  2. package/dist/_internal/execution-api-worker.d.cts +64 -0
  3. package/dist/_internal/execution-api-worker.d.cts.map +1 -0
  4. package/dist/_internal/execution-api-worker.d.mts +64 -0
  5. package/dist/_internal/execution-api-worker.d.mts.map +1 -0
  6. package/dist/{engine-DRAFIm5M.mjs → _internal/execution-api-worker.mjs} +3 -258
  7. package/dist/_internal/execution-api-worker.mjs.map +1 -0
  8. package/dist/{chunk-C_NdSu1c.cjs → _virtual/_rolldown/runtime.cjs} +1 -6
  9. package/dist/api/build.cjs +4 -4
  10. package/dist/api/build.d.cts +2 -2
  11. package/dist/api/build.d.cts.map +1 -1
  12. package/dist/api/build.d.mts +2 -2
  13. package/dist/api/build.d.mts.map +1 -1
  14. package/dist/api/build.mjs +2 -2
  15. package/dist/api/build.mjs.map +1 -1
  16. package/dist/api/clean.d.cts +2 -2
  17. package/dist/api/clean.d.mts +2 -2
  18. package/dist/api/create.cjs +2 -2
  19. package/dist/api/create.d.cts +2 -2
  20. package/dist/api/create.d.mts +2 -2
  21. package/dist/api/deploy.d.cts +2 -2
  22. package/dist/api/deploy.d.mts +2 -2
  23. package/dist/api/docs.d.cts +2 -2
  24. package/dist/api/docs.d.mts +2 -2
  25. package/dist/api/lint.d.cts +2 -2
  26. package/dist/api/lint.d.mts +2 -2
  27. package/dist/api/prepare.d.cts +2 -2
  28. package/dist/api/prepare.d.mts +2 -2
  29. package/dist/api/test.d.cts +2 -2
  30. package/dist/api/test.d.mts +2 -2
  31. package/dist/api/types.d.cts +2 -2
  32. package/dist/api/types.d.mts +2 -2
  33. package/dist/api.d.cts +1 -1
  34. package/dist/api.d.mts +1 -1
  35. package/dist/context/engine-context.cjs +2 -2
  36. package/dist/context/engine-context.d.cts +53 -2
  37. package/dist/context/engine-context.d.cts.map +1 -0
  38. package/dist/context/engine-context.d.mts +53 -2
  39. package/dist/context/engine-context.d.mts.map +1 -0
  40. package/dist/context/index.d.cts +1 -1
  41. package/dist/context/index.d.mts +1 -1
  42. package/dist/engine.cjs +261 -4
  43. package/dist/engine.d.cts +143 -2
  44. package/dist/engine.d.cts.map +1 -0
  45. package/dist/engine.d.mts +143 -2
  46. package/dist/engine.d.mts.map +1 -0
  47. package/dist/engine.mjs +258 -2
  48. package/dist/engine.mjs.map +1 -0
  49. package/dist/helpers/create-api.d.cts +18 -2
  50. package/dist/helpers/create-api.d.cts.map +1 -0
  51. package/dist/helpers/create-api.d.mts +18 -2
  52. package/dist/helpers/create-api.d.mts.map +1 -0
  53. package/dist/helpers/finalize.d.cts +12 -2
  54. package/dist/helpers/finalize.d.cts.map +1 -0
  55. package/dist/helpers/finalize.d.mts +12 -2
  56. package/dist/helpers/finalize.d.mts.map +1 -0
  57. package/dist/helpers/index.d.cts +5 -4
  58. package/dist/helpers/index.d.mts +5 -4
  59. package/dist/helpers/rpc.d.cts +8 -2
  60. package/dist/helpers/rpc.d.cts.map +1 -0
  61. package/dist/helpers/rpc.d.mts +8 -2
  62. package/dist/helpers/rpc.d.mts.map +1 -0
  63. package/dist/helpers/stream.d.cts +45 -2
  64. package/dist/helpers/stream.d.cts.map +1 -0
  65. package/dist/helpers/stream.d.mts +45 -2
  66. package/dist/helpers/stream.d.mts.map +1 -0
  67. package/dist/helpers/type-checks.d.cts +19 -2
  68. package/dist/helpers/type-checks.d.cts.map +1 -0
  69. package/dist/helpers/type-checks.d.mts +19 -2
  70. package/dist/helpers/type-checks.d.mts.map +1 -0
  71. package/dist/index.cjs +1 -1
  72. package/dist/index.d.cts +6 -5
  73. package/dist/index.d.mts +6 -5
  74. package/dist/index.mjs +1 -1
  75. package/dist/{index-CBobV6Wm.d.mts → types/api.d.cts} +5 -31
  76. package/dist/types/api.d.cts.map +1 -0
  77. package/dist/{index-QuLZgb8w.d.cts → types/api.d.mts} +5 -31
  78. package/dist/types/api.d.mts.map +1 -0
  79. package/dist/types/config.d.cts +72 -0
  80. package/dist/types/config.d.cts.map +1 -0
  81. package/dist/types/config.d.mts +72 -0
  82. package/dist/types/config.d.mts.map +1 -0
  83. package/dist/{context-C71mv_aw.d.mts → types/context.d.cts} +4 -3
  84. package/dist/types/context.d.cts.map +1 -0
  85. package/dist/{context-ZbJRDGpl.d.cts → types/context.d.mts} +4 -3
  86. package/dist/types/context.d.mts.map +1 -0
  87. package/dist/types/index.d.cts +4 -0
  88. package/dist/types/index.d.mts +4 -0
  89. package/dist/{config-B6udgcnD.d.cts → types/rpc.d.cts} +7 -70
  90. package/dist/types/rpc.d.cts.map +1 -0
  91. package/dist/{config-DXxu0y4t.d.mts → types/rpc.d.mts} +7 -70
  92. package/dist/types/rpc.d.mts.map +1 -0
  93. package/package.json +7 -7
  94. package/dist/config-B6udgcnD.d.cts.map +0 -1
  95. package/dist/config-DXxu0y4t.d.mts.map +0 -1
  96. package/dist/context-C71mv_aw.d.mts.map +0 -1
  97. package/dist/context-ZbJRDGpl.d.cts.map +0 -1
  98. package/dist/engine-B5pbfMyg.d.cts +0 -199
  99. package/dist/engine-B5pbfMyg.d.cts.map +0 -1
  100. package/dist/engine-CeWEM0TT.d.mts +0 -199
  101. package/dist/engine-CeWEM0TT.d.mts.map +0 -1
  102. package/dist/engine-DRAFIm5M.mjs.map +0 -1
  103. package/dist/engine-context-CaPJFek0.d.mts +0 -53
  104. package/dist/engine-context-CaPJFek0.d.mts.map +0 -1
  105. package/dist/engine-context-DDbpdZHC.d.cts +0 -53
  106. package/dist/engine-context-DDbpdZHC.d.cts.map +0 -1
  107. package/dist/finalize-CuV0r3jg.d.cts +0 -12
  108. package/dist/finalize-CuV0r3jg.d.cts.map +0 -1
  109. package/dist/finalize-CuV0r3jg.d.mts +0 -12
  110. package/dist/finalize-CuV0r3jg.d.mts.map +0 -1
  111. package/dist/index-CBobV6Wm.d.mts.map +0 -1
  112. package/dist/index-QuLZgb8w.d.cts.map +0 -1
  113. package/dist/rpc-5MpqPBPa.d.cts +0 -7
  114. package/dist/rpc-5MpqPBPa.d.cts.map +0 -1
  115. package/dist/rpc-BvVZXS5K.d.mts +0 -7
  116. package/dist/rpc-BvVZXS5K.d.mts.map +0 -1
  117. package/dist/stream-B9jffNbk.d.cts +0 -45
  118. package/dist/stream-B9jffNbk.d.cts.map +0 -1
  119. package/dist/stream-B9jffNbk.d.mts +0 -45
  120. package/dist/stream-B9jffNbk.d.mts.map +0 -1
@@ -1,10 +1,9 @@
1
- import { CustomLogger, ExecutionOptions, FrameworkOptions, LogMeta, Options, ResolvedConfig, UserConfig } from "@powerlines/core";
1
+ import { LogMeta } from "@powerlines/core";
2
2
  import { RpcStreamingClientHost } from "devframe/client";
3
- import { RpcCacheManager, RpcCacheOptions, RpcFunctionsCollector } from "devframe/rpc";
4
- import { WsRpcChannelOptions } from "devframe/rpc/transports/ws-client";
5
- import { MaybePromise, PartialKeys, RequiredKeys } from "@stryke/types/base";
6
- import { BirpcOptions, BirpcReturn, ProxifiedRemoteFunctions } from "birpc";
7
- import { ConnectionMeta, DevToolsRpcClientFunctions, DevToolsRpcServerFunctions, DevframeDefinition, EventEmitter, RpcSharedStateHost } from "devframe/types";
3
+ import { RpcCacheManager, RpcFunctionsCollector } from "devframe/rpc";
4
+ import { MaybePromise } from "@stryke/types/base";
5
+ import { BirpcReturn, ProxifiedRemoteFunctions } from "birpc";
6
+ import { ConnectionMeta, DevToolsRpcClientFunctions, DevToolsRpcServerFunctions, EventEmitter, RpcSharedStateHost } from "devframe/types";
8
7
  import { Asyncify } from "@stryke/types/async";
9
8
 
10
9
  //#region src/types/rpc.d.ts
@@ -143,67 +142,5 @@ interface RpcClient {
143
142
  cacheManager: RpcCacheManager;
144
143
  }
145
144
  //#endregion
146
- //#region src/types/config.d.ts
147
- /**
148
- * The options required to start the Powerlines engine.
149
- */
150
- type EngineOptions = Omit<PartialKeys<DevframeDefinition, "name" | "setup">, "id" | "basePath"> & Options & {
151
- /**
152
- * The host URL for the engine's WebSocket server, which is used for communication between the engine and the various hosts (e.g., dev server, CLI, etc.) that interact with it. This value is required for the engine to function properly, as it allows the engine to establish a WebSocket connection and facilitate communication with other components of the system.
153
- */
154
- host?: string;
155
- /**
156
- * The port number to use for the websocket connection between the engine and the various hosts.
157
- */
158
- port?: number;
159
- /**
160
- * An optional root directory for the engine to use when resolving paths and loading configuration files. This value can be used to specify a custom root directory for the engine, which can be useful in cases where the default behavior of using the current working directory is not desirable. If this option is not provided, the engine will use the current working directory as the root directory by default.
161
- */
162
- root?: string;
163
- /**
164
- * A custom logger instance that implements the {@link CustomLogger} interface, which can be used for logging messages during the build process instead of the default Powerlines logger.
165
- *
166
- * @remarks
167
- * Providing a custom logger allows you to integrate Powerlines logging with your own logging system or to customize the logging behavior, such as formatting log messages differently or sending logs to an external service. If a custom logger is not provided, Powerlines will use its default logger implementation.
168
- */
169
- customLogger?: CustomLogger;
170
- /**
171
- * The framework for which the engine is being used, which can be used by plugins to customize their behavior based on the specific framework being targeted. This value is optional and can be set to `undefined` if not applicable, but providing it allows plugins to make informed decisions about how to handle certain tasks or configurations based on the framework being used.
172
- */
173
- framework?: FrameworkOptions;
174
- };
175
- interface ApiExecutionOptions extends ExecutionOptions {}
176
- interface EngineExecutionOptions extends ExecutionOptions {
177
- /**
178
- * The base URL for the dev server, which can be used by plugins to construct URLs for assets or API endpoints during development. This value is only relevant in "dev" mode and will be `undefined` in "build" mode.
179
- */
180
- baseURL: string;
181
- /**
182
- * Metadata for the connection used by the dev server, including the backend type and websocket configuration.
183
- */
184
- connection: ConnectionMeta;
185
- /**
186
- * The {@link MessagePort} used for communication between the execution host and the engine. This port will be used to send and receive messages, allowing the execution host to invoke API methods and return results to the engine.
187
- */
188
- channel: MessagePort;
189
- /**
190
- * Options for configuring the WebSocket RPC channel used for communication between the dev server and the client, which can be used by plugins to customize the behavior of the WebSocket connection, such as setting custom timeouts, retry strategies, or other options.
191
- */
192
- wsOptions?: Partial<WsRpcChannelOptions>;
193
- /**
194
- * Options for configuring the RPC client used for communication between the dev server and the client, which can be used by plugins to customize the behavior of the RPC client, such as setting custom timeouts, retry strategies, or other options.
195
- */
196
- rpcOptions?: Partial<BirpcOptions<RpcServerFunctions, RpcClientFunctions, boolean>>;
197
- /**
198
- * Options for configuring the RPC cache used for caching RPC responses between the dev server and the client, which can be used by plugins to customize the behavior of the RPC cache, such as setting custom cache keys, expiration times, or other options.
199
- *
200
- * @remarks
201
- * This option can be set to `true` to enable caching with default options, or it can be set to a configuration object that allows for fine-grained control over the caching behavior.
202
- */
203
- cacheOptions?: boolean | Partial<RpcCacheOptions>;
204
- }
205
- type RpcClientOptions = RequiredKeys<EngineExecutionOptions, "baseURL" | "connection">;
206
- type EngineResolvedConfig<TUserConfig extends UserConfig = UserConfig> = ResolvedConfig<TUserConfig, EngineExecutionOptions>;
207
- //#endregion
208
- export { RpcPayloadMetadata as C, WrappedRpcFunction as D, WrapRpcFunctions as E, WrappedRpcFunctions as O, RpcPayloadEnvelop as S, WrapRpcFunction as T, RpcClientHost as _, RpcClientOptions as a, RpcFunction as b, InputRpcFunction as c, RpcClient as d, RpcClientCall as f, RpcClientFunctions as g, RpcClientEvents as h, EngineResolvedConfig as i, InputRpcFunctions as l, RpcClientCallOptional as m, EngineExecutionOptions as n, ExtractRpcFunction as o, RpcClientCallEvent as p, EngineOptions as r, ExtractRpcFunctions as s, ApiExecutionOptions as t, LogPayload as u, RpcClientRemoteFunctions as v, RpcServerFunctions as w, RpcFunctions as x, RpcContext as y };
209
- //# sourceMappingURL=config-DXxu0y4t.d.mts.map
145
+ export { ExtractRpcFunction, ExtractRpcFunctions, InputRpcFunction, InputRpcFunctions, LogPayload, RpcClient, RpcClientCall, RpcClientCallEvent, RpcClientCallOptional, RpcClientEvents, RpcClientFunctions, RpcClientHost, RpcClientRemoteFunctions, RpcContext, RpcFunction, RpcFunctions, RpcPayloadEnvelop, RpcPayloadMetadata, RpcServerFunctions, WrapRpcFunction, WrapRpcFunctions, WrappedRpcFunction, WrappedRpcFunctions };
146
+ //# sourceMappingURL=rpc.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc.d.mts","names":[],"sources":["../../src/types/rpc.ts"],"mappings":";;;;;;;;;UAkCiB,kBAAA;EAAA;;;EAIf,SAAA;EAAA;;;EAIA,IAAA;EAYA;;;EARA,SAAA;EAee;;;EAXf,WAAA;EAWiC;;;EAPjC,WAAA;EAWiB;AAAA;AAGnB;EAVE,WAAA;AAAA;AAAA,UAGe,iBAAA,mBAAoC,kBAAkB;EAOf;AACxD;;EAJE,OAAA,EAAS,QAAA;AAAA;AAAA,KAGC,WAAA,IAAe,OAAA,UAAiB,YAAY;AAAA,KAC5C,YAAA,GAAe,MAAM,SAAS,WAAA;AAAA,KAE9B,gBAAA,IAAoB,OAA+B,EAAtB,iBAAiB;AAAA,KAC9C,iBAAA,GAAoB,MAAM,SAAS,gBAAA;AAAA,KAEnC,kBAAA,IACV,OAAA,EAAS,iBAAA,UACN,OAAO;AAAA,KACA,mBAAA,GAAsB,MAAM,SAAS,kBAAA;AAAA,KAErC,kBAAA,mBAAqC,kBAAA,KAC/C,OAAA,EAAS,UAAA,CAAW,SAAA,oBACjB,UAAA,CAAW,QAAA,CAAS,SAAA;AAAA,KAEb,mBAAA,oBAAuC,mBAAA,qBAClC,UAAA,GAAa,kBAAA,CAAmB,UAAA,CAAW,IAAA;AAAA,KAGhD,eAAA,mBAAkC,WAAA,KAC5C,OAAA,EAAS,iBAAA,CAAkB,UAAA,CAAW,SAAA,UACnC,UAAA,CAAW,SAAA,UAAmB,OAAA,YAAmB,CAAA,GAAI,UAAA,CAAW,SAAA;AAAA,KAEzD,gBAAA,oBAAoC,YAAA,qBAC/B,UAAA,GAAa,eAAA,CAAgB,UAAA,CAAW,IAAA;AAAA,KAG7C,wBAAA,oBAA4C,mBAAA,IACtD,wBAAA,CAAyB,mBAAA,CAAoB,UAA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3
+ "version": "0.49.35",
4
4
  "private": false,
5
5
  "description": "An internal package containing the core engine modules for Powerlines.",
6
6
  "homepage": "https://stormsoftware.com",
@@ -120,20 +120,20 @@
120
120
  "types": "./dist/index.d.cts",
121
121
  "files": ["dist"],
122
122
  "dependencies": {
123
- "@powerlines/core": "^0.48.32",
123
+ "@powerlines/core": "^0.48.33",
124
124
  "@storm-software/config": "^1.137.69",
125
125
  "@storm-software/config-tools": "^1.190.37",
126
126
  "@stryke/async": "^0.1.10",
127
127
  "@stryke/convert": "^0.7.13",
128
- "@stryke/env": "^0.20.99",
129
- "@stryke/fs": "^0.33.82",
130
- "@stryke/hash": "^0.13.35",
128
+ "@stryke/env": "^0.20.100",
129
+ "@stryke/fs": "^0.33.83",
130
+ "@stryke/hash": "^0.13.36",
131
131
  "@stryke/helpers": "^0.10.22",
132
132
  "@stryke/json": "^0.15.6",
133
133
  "@stryke/path": "^0.29.9",
134
134
  "@stryke/string-format": "^0.17.24",
135
135
  "@stryke/type-checks": "^0.6.15",
136
- "@stryke/unique-id": "^0.3.93",
136
+ "@stryke/unique-id": "^0.3.94",
137
137
  "@stryke/url": "^0.4.33",
138
138
  "birpc": "^4.0.0",
139
139
  "defu": "^6.1.7",
@@ -156,5 +156,5 @@
156
156
  "@types/node": "^25.9.1",
157
157
  "typescript": "^6.0.3"
158
158
  },
159
- "gitHead": "796932c328e29c623584c8c58fc0ae421674ba4e"
159
+ "gitHead": "f4ad7ee552b89cc860cb1cc2e56b20a5b779620d"
160
160
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-B6udgcnD.d.cts","names":[],"sources":["../src/types/rpc.ts","../src/types/config.ts"],"mappings":";;;;;;;;;;UAkCiB,kBAAA;;AAAjB;;EAIE,SAAA;EAJiC;;;EAQjC,IAAA;EAQA;;;EAJA,SAAA;EAYW;AAGb;;EAXE,WAAA;EAWqE;;;EAPrE,WAAA;EAWS;;AAAQ;EAPjB,WAAA;AAAA;AAAA,UAGe,iBAAA,mBAAoC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EAwBpE;;;EApBA,IAAI;AAAA;;;;UAMW,cAAA;EAuCH;;;EAnCZ,OAAA,EAAS,0BAAA;EAoBT;;;EAfA,IAAA,EAAM,uBAAA;EAyBQ;;;EApBd,MAAA,EAAQ,yBAAA;AAAA;;AA8Ba;AASvB;UAjCiB,mBAAA;EAiCa;;;EA7B5B,YAAA;EAoCS;;;EA/BT,OAAA;EA2DgB;;;EAtDhB,OAAA,EAAS,IAAA,CAAK,sBAAA;EAsBZ;;;EAjBF,UAAA,EAAY,gBAAA;EAgBV;;;EAXF,KAAA,EAAO,cAAA;AAAA;;;;;;;UASQ,aAAA,mCAEb,WAAA,CAAY,cAAA,GACZ,IAAA,CAAK,QAAA,CAAS,aAAA;EAsBJ;;;EAlBZ,OAAA,EAAS,aAAA;EA4BP;;;EAvBF,UAAA,EAAY,cAAA;EAgCQ;;;AAAyC;AAG/D;;EA3BE,QAAA,EAAU,mBAAA;EA+BV;AAAc;;EA1Bd,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,SAAS;AAAA"}
@@ -1,199 +0,0 @@
1
- import { n as EngineExecutionOptions, r as EngineOptions } from "./config-B6udgcnD.cjs";
2
- import { t as EngineContext } from "./context-ZbJRDGpl.cjs";
3
- import { i as ExecutionApiWorkerInterface, t as Engine } from "./index-QuLZgb8w.cjs";
4
- import { t as PowerlinesEngineContext } from "./engine-context-DDbpdZHC.cjs";
5
- import { BuildInlineConfig, CleanInlineConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, InlineConfig, LintInlineConfig, Mode, PrepareInlineConfig, TestInlineConfig, TypesInlineConfig } from "@powerlines/core";
6
-
7
- //#region src/_internal/execution-api-worker.d.ts
8
- declare const RESTARTED: unique symbol;
9
- interface ExecutionApiWorkerOptions {
10
- /**
11
- * The maximum time in milliseconds a worker can run before being terminated.
12
- *
13
- * @defaultValue 900000 (15 minutes)
14
- */
15
- timeout?: number;
16
- /**
17
- * True if `--max-old-space-size` should not be forwarded to the worker.
18
- */
19
- isolatedMemory?: boolean;
20
- /**
21
- * 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.).
22
- */
23
- mode?: Mode;
24
- /**
25
- * 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.
26
- */
27
- root?: string;
28
- /**
29
- * 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.
30
- */
31
- context: EngineContext;
32
- }
33
- declare class ExecutionApiWorker implements ExecutionApiWorkerInterface {
34
- #private;
35
- protected executionApiPath: string;
36
- protected options: ExecutionApiWorkerOptions;
37
- protected get restartPromise(): Promise<typeof RESTARTED>;
38
- protected resolveRestartPromise(): void;
39
- /**
40
- * Creates a new instance of the Execution API Worker 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.
41
- *
42
- * @param apiPath - The path to the Execution API file.
43
- * @param options - The options for configuring the worker, including the execution context, exposed methods, timeout, and mode.
44
- * @returns A promise that resolves to an instance of the ExecutionApiWorker class.
45
- */
46
- static from(apiPath: string, options: ExecutionApiWorkerOptions): Promise<ExecutionApiWorker>;
47
- /**
48
- * Create a new API worker instance.
49
- *
50
- * @param executionApiPath - The path to the worker file.
51
- * @param options - The options for the worker, including exposed commands, timeout, and hooks for activity and restart.
52
- */
53
- protected constructor(executionApiPath: string, options: ExecutionApiWorkerOptions);
54
- execute(command: string, options: Omit<EngineExecutionOptions, "channel">, inlineConfig: InlineConfig): Promise<void>;
55
- /**
56
- * Closes the worker process, terminating it if it's still running. This method should be called when the worker is no longer needed, to free up system resources and ensure a clean shutdown. If the worker has already been terminated, this method will have no effect.
57
- */
58
- finalize(): Promise<void>;
59
- protected onHanging(): void;
60
- protected onActivity(): void;
61
- protected innerExecute(command: string, options: Omit<EngineExecutionOptions, "channel">, inlineConfig: InlineConfig): Promise<void>;
62
- }
63
- //#endregion
64
- //#region src/engine.d.ts
65
- /**
66
- * The Powerlines process' orchestration and coordination API.
67
- *
68
- * @public
69
- */
70
- declare class PowerlinesEngine implements Engine, AsyncDisposable {
71
- #private;
72
- /**
73
- * The Powerlines context
74
- */
75
- get context(): EngineContext;
76
- /**
77
- * 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.
78
- */
79
- get api(): ExecutionApiWorker;
80
- /**
81
- * Create a new Powerlines Engine instance
82
- *
83
- * @param context - The Powerlines context
84
- * @param api - The API host for the execution workers
85
- * @returns A new instance of the Powerlines Engine
86
- */
87
- constructor(context: EngineContext, api: ExecutionApiWorker);
88
- /**
89
- * Create a new Powerlines project
90
- *
91
- * @remarks
92
- * This method will create a new Powerlines project in the current directory.
93
- *
94
- * @param inlineConfig - The inline configuration for the create command
95
- * @returns A promise that resolves when the project has been created
96
- */
97
- create(inlineConfig: CreateInlineConfig): Promise<void>;
98
- /**
99
- * Generate the Powerlines typescript declaration file
100
- *
101
- * @remarks
102
- * 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.
103
- *
104
- * @param inlineConfig - The inline configuration for the types command
105
- */
106
- types(inlineConfig: TypesInlineConfig): Promise<void>;
107
- /**
108
- * Prepare the Powerlines API
109
- *
110
- * @remarks
111
- * This method will prepare the Powerlines API for use, initializing any necessary resources.
112
- *
113
- * @param inlineConfig - The inline configuration for the prepare command
114
- */
115
- prepare(inlineConfig: PrepareInlineConfig): Promise<void>;
116
- /**
117
- * Clean any previously prepared artifacts
118
- *
119
- * @remarks
120
- * This method will remove the previous Powerlines artifacts from the project.
121
- *
122
- * @param inlineConfig - The inline configuration for the clean command
123
- * @returns A promise that resolves when the clean command has completed
124
- */
125
- clean(inlineConfig: CleanInlineConfig): Promise<void>;
126
- /**
127
- * Lint the project
128
- *
129
- * @param inlineConfig - The inline configuration for the lint command
130
- * @returns A promise that resolves when the lint command has completed
131
- */
132
- lint(inlineConfig: LintInlineConfig): Promise<void>;
133
- /**
134
- * Test the project
135
- *
136
- * @remarks
137
- * This method will run the tests for the Powerlines project.
138
- *
139
- * @param inlineConfig - The inline configuration for the test command
140
- * @returns A promise that resolves when the test command has completed
141
- */
142
- test(inlineConfig: TestInlineConfig): Promise<void>;
143
- /**
144
- * Build the project
145
- *
146
- * @remarks
147
- * This method will build the Powerlines project, generating the necessary artifacts.
148
- *
149
- * @param inlineConfig - The inline configuration for the build command
150
- * @returns A promise that resolves when the build command has completed
151
- */
152
- build(inlineConfig: BuildInlineConfig): Promise<void>;
153
- /**
154
- * Prepare the documentation for the project
155
- *
156
- * @param inlineConfig - The inline configuration for the docs command
157
- * @returns A promise that resolves when the documentation generation has completed
158
- */
159
- docs(inlineConfig: DocsInlineConfig): Promise<void>;
160
- /**
161
- * Deploy the project source code
162
- *
163
- * @remarks
164
- * This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
165
- *
166
- * @param inlineConfig - The inline configuration for the deploy command
167
- * @returns A promise that resolves when the deploy command has completed
168
- */
169
- deploy(inlineConfig: DeployInlineConfig): Promise<void>;
170
- /**
171
- * Finalization/cleanup processing for the Powerlines API
172
- *
173
- * @remarks
174
- * This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
175
- *
176
- * @returns A promise that resolves when the finalization process has completed
177
- */
178
- finalize(): Promise<void>;
179
- /**
180
- * Asynchronous disposal method for the Powerlines Engine, which will call the finalize method to perform any necessary cleanup when the engine is disposed of.
181
- */
182
- [Symbol.asyncDispose](): Promise<void>;
183
- /**
184
- * Execute a Powerlines command based on the provided execution path and inline configuration, loading the necessary executions from the context and managing their lifecycle.
185
- *
186
- * @remarks
187
- * 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.
188
- *
189
- * @param command - The path to the execution configuration to load and run, which can be used to specify different execution configurations for different commands or scenarios.
190
- * @param inlineConfig - Additional configuration options provided at runtime, which can override or supplement the options defined in the user configuration file.
191
- * @returns A promise that resolves when all executions for the specified command have completed
192
- */
193
- protected execute(command: string, inlineConfig: InlineConfig): Promise<void>;
194
- }
195
- declare function createContext(options: EngineOptions): Promise<PowerlinesEngineContext<unknown>>;
196
- declare function createEngine(options: EngineOptions, apiPath?: string): Promise<PowerlinesEngine>;
197
- //#endregion
198
- export { createContext as n, createEngine as r, PowerlinesEngine as t };
199
- //# sourceMappingURL=engine-B5pbfMyg.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"engine-B5pbfMyg.d.cts","names":[],"sources":["../src/_internal/execution-api-worker.ts","../src/engine.ts"],"mappings":";;;;;;;cAwCM,SAAA;AAAA,UA8DW,yBAAA;EA9DX;;;;AAAiD;EA8ErD,OAAA;EAhBwC;;;EAqBxC,cAAA;EAAA;;;EAKA,IAAA,GAAO,IAAA;EAUP;;;EALA,IAAA;EAQW;;;EAHX,OAAA,EAAS,aAAa;AAAA;AAAA,cAGX,kBAAA,YAA8B,2BAAA;EAAA;YAsE7B,gBAAA;EAAA,UACA,OAAA,EAAS,yBAAA;EAAA,cAxDP,cAAA,IAAc,OAAA,QAAA,SAAA;EAAA,UASlB,qBAAA;EAuWC;;;;;;;EAAA,OAxVS,IAAA,CAClB,OAAA,UACA,OAAA,EAAS,yBAAA,GAAyB,OAAA,CAAA,kBAAA;EAzCK;;;;;;EAAA,UAqEhC,WAAA,CACG,gBAAA,UACA,OAAA,EAAS,yBAAA;EAsTR,OAAA,CACX,OAAA,UACA,OAAA,EAAS,IAAA,CAAK,sBAAA,cACd,YAAA,EAAc,YAAA,GAAY,OAAA;EAjXd;;;EAoZD,QAAA,IAAY,OAAA;EAA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Aa,OAAA,CAAA,uBAAA;AAAA,iBAuBpC,YAAA,CACpB,OAAA,EAAS,aAAA,EACT,OAAA,YAAkC,OAAA,CAAA,gBAAA"}
@@ -1,199 +0,0 @@
1
- import { n as EngineExecutionOptions, r as EngineOptions } from "./config-DXxu0y4t.mjs";
2
- import { t as EngineContext } from "./context-C71mv_aw.mjs";
3
- import { i as ExecutionApiWorkerInterface, t as Engine } from "./index-CBobV6Wm.mjs";
4
- import { t as PowerlinesEngineContext } from "./engine-context-CaPJFek0.mjs";
5
- import { BuildInlineConfig, CleanInlineConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, InlineConfig, LintInlineConfig, Mode, PrepareInlineConfig, TestInlineConfig, TypesInlineConfig } from "@powerlines/core";
6
-
7
- //#region src/_internal/execution-api-worker.d.ts
8
- declare const RESTARTED: unique symbol;
9
- interface ExecutionApiWorkerOptions {
10
- /**
11
- * The maximum time in milliseconds a worker can run before being terminated.
12
- *
13
- * @defaultValue 900000 (15 minutes)
14
- */
15
- timeout?: number;
16
- /**
17
- * True if `--max-old-space-size` should not be forwarded to the worker.
18
- */
19
- isolatedMemory?: boolean;
20
- /**
21
- * 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.).
22
- */
23
- mode?: Mode;
24
- /**
25
- * 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.
26
- */
27
- root?: string;
28
- /**
29
- * 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.
30
- */
31
- context: EngineContext;
32
- }
33
- declare class ExecutionApiWorker implements ExecutionApiWorkerInterface {
34
- #private;
35
- protected executionApiPath: string;
36
- protected options: ExecutionApiWorkerOptions;
37
- protected get restartPromise(): Promise<typeof RESTARTED>;
38
- protected resolveRestartPromise(): void;
39
- /**
40
- * Creates a new instance of the Execution API Worker 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.
41
- *
42
- * @param apiPath - The path to the Execution API file.
43
- * @param options - The options for configuring the worker, including the execution context, exposed methods, timeout, and mode.
44
- * @returns A promise that resolves to an instance of the ExecutionApiWorker class.
45
- */
46
- static from(apiPath: string, options: ExecutionApiWorkerOptions): Promise<ExecutionApiWorker>;
47
- /**
48
- * Create a new API worker instance.
49
- *
50
- * @param executionApiPath - The path to the worker file.
51
- * @param options - The options for the worker, including exposed commands, timeout, and hooks for activity and restart.
52
- */
53
- protected constructor(executionApiPath: string, options: ExecutionApiWorkerOptions);
54
- execute(command: string, options: Omit<EngineExecutionOptions, "channel">, inlineConfig: InlineConfig): Promise<void>;
55
- /**
56
- * Closes the worker process, terminating it if it's still running. This method should be called when the worker is no longer needed, to free up system resources and ensure a clean shutdown. If the worker has already been terminated, this method will have no effect.
57
- */
58
- finalize(): Promise<void>;
59
- protected onHanging(): void;
60
- protected onActivity(): void;
61
- protected innerExecute(command: string, options: Omit<EngineExecutionOptions, "channel">, inlineConfig: InlineConfig): Promise<void>;
62
- }
63
- //#endregion
64
- //#region src/engine.d.ts
65
- /**
66
- * The Powerlines process' orchestration and coordination API.
67
- *
68
- * @public
69
- */
70
- declare class PowerlinesEngine implements Engine, AsyncDisposable {
71
- #private;
72
- /**
73
- * The Powerlines context
74
- */
75
- get context(): EngineContext;
76
- /**
77
- * 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.
78
- */
79
- get api(): ExecutionApiWorker;
80
- /**
81
- * Create a new Powerlines Engine instance
82
- *
83
- * @param context - The Powerlines context
84
- * @param api - The API host for the execution workers
85
- * @returns A new instance of the Powerlines Engine
86
- */
87
- constructor(context: EngineContext, api: ExecutionApiWorker);
88
- /**
89
- * Create a new Powerlines project
90
- *
91
- * @remarks
92
- * This method will create a new Powerlines project in the current directory.
93
- *
94
- * @param inlineConfig - The inline configuration for the create command
95
- * @returns A promise that resolves when the project has been created
96
- */
97
- create(inlineConfig: CreateInlineConfig): Promise<void>;
98
- /**
99
- * Generate the Powerlines typescript declaration file
100
- *
101
- * @remarks
102
- * 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.
103
- *
104
- * @param inlineConfig - The inline configuration for the types command
105
- */
106
- types(inlineConfig: TypesInlineConfig): Promise<void>;
107
- /**
108
- * Prepare the Powerlines API
109
- *
110
- * @remarks
111
- * This method will prepare the Powerlines API for use, initializing any necessary resources.
112
- *
113
- * @param inlineConfig - The inline configuration for the prepare command
114
- */
115
- prepare(inlineConfig: PrepareInlineConfig): Promise<void>;
116
- /**
117
- * Clean any previously prepared artifacts
118
- *
119
- * @remarks
120
- * This method will remove the previous Powerlines artifacts from the project.
121
- *
122
- * @param inlineConfig - The inline configuration for the clean command
123
- * @returns A promise that resolves when the clean command has completed
124
- */
125
- clean(inlineConfig: CleanInlineConfig): Promise<void>;
126
- /**
127
- * Lint the project
128
- *
129
- * @param inlineConfig - The inline configuration for the lint command
130
- * @returns A promise that resolves when the lint command has completed
131
- */
132
- lint(inlineConfig: LintInlineConfig): Promise<void>;
133
- /**
134
- * Test the project
135
- *
136
- * @remarks
137
- * This method will run the tests for the Powerlines project.
138
- *
139
- * @param inlineConfig - The inline configuration for the test command
140
- * @returns A promise that resolves when the test command has completed
141
- */
142
- test(inlineConfig: TestInlineConfig): Promise<void>;
143
- /**
144
- * Build the project
145
- *
146
- * @remarks
147
- * This method will build the Powerlines project, generating the necessary artifacts.
148
- *
149
- * @param inlineConfig - The inline configuration for the build command
150
- * @returns A promise that resolves when the build command has completed
151
- */
152
- build(inlineConfig: BuildInlineConfig): Promise<void>;
153
- /**
154
- * Prepare the documentation for the project
155
- *
156
- * @param inlineConfig - The inline configuration for the docs command
157
- * @returns A promise that resolves when the documentation generation has completed
158
- */
159
- docs(inlineConfig: DocsInlineConfig): Promise<void>;
160
- /**
161
- * Deploy the project source code
162
- *
163
- * @remarks
164
- * This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
165
- *
166
- * @param inlineConfig - The inline configuration for the deploy command
167
- * @returns A promise that resolves when the deploy command has completed
168
- */
169
- deploy(inlineConfig: DeployInlineConfig): Promise<void>;
170
- /**
171
- * Finalization/cleanup processing for the Powerlines API
172
- *
173
- * @remarks
174
- * This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
175
- *
176
- * @returns A promise that resolves when the finalization process has completed
177
- */
178
- finalize(): Promise<void>;
179
- /**
180
- * Asynchronous disposal method for the Powerlines Engine, which will call the finalize method to perform any necessary cleanup when the engine is disposed of.
181
- */
182
- [Symbol.asyncDispose](): Promise<void>;
183
- /**
184
- * Execute a Powerlines command based on the provided execution path and inline configuration, loading the necessary executions from the context and managing their lifecycle.
185
- *
186
- * @remarks
187
- * 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.
188
- *
189
- * @param command - The path to the execution configuration to load and run, which can be used to specify different execution configurations for different commands or scenarios.
190
- * @param inlineConfig - Additional configuration options provided at runtime, which can override or supplement the options defined in the user configuration file.
191
- * @returns A promise that resolves when all executions for the specified command have completed
192
- */
193
- protected execute(command: string, inlineConfig: InlineConfig): Promise<void>;
194
- }
195
- declare function createContext(options: EngineOptions): Promise<PowerlinesEngineContext<unknown>>;
196
- declare function createEngine(options: EngineOptions, apiPath?: string): Promise<PowerlinesEngine>;
197
- //#endregion
198
- export { createContext as n, createEngine as r, PowerlinesEngine as t };
199
- //# sourceMappingURL=engine-CeWEM0TT.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"engine-CeWEM0TT.d.mts","names":[],"sources":["../src/_internal/execution-api-worker.ts","../src/engine.ts"],"mappings":";;;;;;;cAwCM,SAAA;AAAA,UA8DW,yBAAA;EA9DX;;;;AAAiD;EA8ErD,OAAA;EAhBwC;;;EAqBxC,cAAA;EA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