@powerlines/engine 0.49.26 → 0.49.28
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 +2 -2
- package/dist/api/build.d.mts +2 -2
- package/dist/api/clean.d.cts +2 -2
- package/dist/api/clean.d.mts +2 -2
- package/dist/api/create.d.cts +2 -2
- package/dist/api/create.d.mts +2 -2
- package/dist/api/deploy.d.cts +2 -2
- package/dist/api/deploy.d.mts +2 -2
- package/dist/api/docs.d.cts +2 -2
- package/dist/api/docs.d.mts +2 -2
- package/dist/api/lint.d.cts +2 -2
- package/dist/api/lint.d.mts +2 -2
- package/dist/api/prepare.d.cts +2 -2
- package/dist/api/prepare.d.mts +2 -2
- package/dist/api/test.d.cts +2 -2
- package/dist/api/test.d.mts +2 -2
- package/dist/api/types.d.cts +2 -2
- package/dist/api/types.d.mts +2 -2
- package/dist/api.d.cts +4 -4
- package/dist/api.d.cts.map +1 -1
- package/dist/api.d.mts +4 -4
- package/dist/api.d.mts.map +1 -1
- package/dist/api.mjs.map +1 -1
- package/dist/{config-ByLyzMI0.d.mts → config-B6udgcnD.d.cts} +10 -5
- package/dist/{config-ByLyzMI0.d.mts.map → config-B6udgcnD.d.cts.map} +1 -1
- package/dist/{config-DKEmqMrh.d.cts → config-DXxu0y4t.d.mts} +10 -5
- package/dist/{config-DKEmqMrh.d.cts.map → config-DXxu0y4t.d.mts.map} +1 -1
- package/dist/context/engine-context.cjs +6 -6
- package/dist/context/engine-context.d.cts +1 -1
- package/dist/context/engine-context.d.mts +1 -1
- package/dist/context/engine-context.mjs +7 -7
- package/dist/context/engine-context.mjs.map +1 -1
- package/dist/context/index.d.cts +1 -1
- package/dist/context/index.d.mts +1 -1
- package/dist/{context-D0_a0kRO.d.cts → context-C71mv_aw.d.mts} +5 -5
- package/dist/context-C71mv_aw.d.mts.map +1 -0
- package/dist/{context-DcXV6_GL.d.mts → context-ZbJRDGpl.d.cts} +5 -5
- package/dist/context-ZbJRDGpl.d.cts.map +1 -0
- package/dist/{engine-BLp7JcAB.d.mts → engine-B5pbfMyg.d.cts} +7 -7
- package/dist/engine-B5pbfMyg.d.cts.map +1 -0
- package/dist/{engine-CwATBJKZ.cjs → engine-BKEDCOCb.cjs} +5 -3
- package/dist/{engine-DFKgU8-G.d.cts → engine-CeWEM0TT.d.mts} +7 -7
- package/dist/engine-CeWEM0TT.d.mts.map +1 -0
- package/dist/{engine-DL7ZeYlx.mjs → engine-DRAFIm5M.mjs} +6 -4
- package/dist/engine-DRAFIm5M.mjs.map +1 -0
- package/dist/{engine-context-B8K6Jtkk.d.cts → engine-context-CaPJFek0.d.mts} +6 -6
- package/dist/{engine-context-B8K6Jtkk.d.cts.map → engine-context-CaPJFek0.d.mts.map} +1 -1
- package/dist/{engine-context-DKlA5Pgu.d.mts → engine-context-DDbpdZHC.d.cts} +6 -6
- package/dist/{engine-context-DKlA5Pgu.d.mts.map → engine-context-DDbpdZHC.d.cts.map} +1 -1
- package/dist/engine.cjs +1 -1
- package/dist/engine.d.cts +1 -1
- package/dist/engine.d.mts +1 -1
- package/dist/engine.mjs +1 -1
- package/dist/finalize-CuV0r3jg.d.cts +12 -0
- package/dist/finalize-CuV0r3jg.d.cts.map +1 -0
- package/dist/finalize-CuV0r3jg.d.mts +12 -0
- package/dist/finalize-CuV0r3jg.d.mts.map +1 -0
- package/dist/helpers/create-api.cjs +17 -11
- package/dist/helpers/create-api.d.cts +2 -18
- package/dist/helpers/create-api.d.mts +2 -18
- package/dist/helpers/create-api.mjs +18 -12
- package/dist/helpers/create-api.mjs.map +1 -1
- package/dist/helpers/finalize.d.cts +2 -12
- package/dist/helpers/finalize.d.mts +2 -12
- package/dist/helpers/index.cjs +4 -1
- package/dist/helpers/index.d.cts +5 -5
- package/dist/helpers/index.d.mts +5 -5
- package/dist/helpers/index.mjs +2 -1
- package/dist/helpers/rpc.d.cts +2 -7
- package/dist/helpers/rpc.d.mts +2 -7
- package/dist/helpers/stream.d.cts +2 -45
- package/dist/helpers/stream.d.mts +2 -45
- package/dist/helpers/type-checks.cjs +25 -0
- package/dist/helpers/type-checks.d.cts +2 -0
- package/dist/helpers/type-checks.d.mts +2 -0
- package/dist/helpers/type-checks.mjs +23 -0
- package/dist/helpers/type-checks.mjs.map +1 -0
- package/dist/{api-D1r7WAQA.d.cts → index-CBobV6Wm.d.mts} +39 -15
- package/dist/index-CBobV6Wm.d.mts.map +1 -0
- package/dist/{api-DRcC7Ry-.d.mts → index-QuLZgb8w.d.cts} +39 -15
- package/dist/index-QuLZgb8w.d.cts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +1 -1
- package/dist/rpc-5MpqPBPa.d.cts +7 -0
- package/dist/rpc-5MpqPBPa.d.cts.map +1 -0
- package/dist/rpc-BvVZXS5K.d.mts +7 -0
- package/dist/rpc-BvVZXS5K.d.mts.map +1 -0
- package/dist/stream-B9jffNbk.d.cts +45 -0
- package/dist/stream-B9jffNbk.d.cts.map +1 -0
- package/dist/stream-B9jffNbk.d.mts +45 -0
- package/dist/stream-B9jffNbk.d.mts.map +1 -0
- package/package.json +6 -6
- package/dist/api-D1r7WAQA.d.cts.map +0 -1
- package/dist/api-DRcC7Ry-.d.mts.map +0 -1
- package/dist/context-D0_a0kRO.d.cts.map +0 -1
- package/dist/context-DcXV6_GL.d.mts.map +0 -1
- package/dist/engine-BLp7JcAB.d.mts.map +0 -1
- package/dist/engine-DFKgU8-G.d.cts.map +0 -1
- package/dist/engine-DL7ZeYlx.mjs.map +0 -1
- package/dist/helpers/create-api.d.cts.map +0 -1
- package/dist/helpers/create-api.d.mts.map +0 -1
- package/dist/helpers/finalize.d.cts.map +0 -1
- package/dist/helpers/finalize.d.mts.map +0 -1
- package/dist/helpers/rpc.d.cts.map +0 -1
- package/dist/helpers/rpc.d.mts.map +0 -1
- package/dist/helpers/stream.d.cts.map +0 -1
- package/dist/helpers/stream.d.mts.map +0 -1
- package/dist/index-BVVgDSdq.d.cts +0 -1
- package/dist/index-BVVgDSdq.d.mts +0 -1
package/dist/helpers/index.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_helpers_rpc = require('./rpc.cjs');
|
|
3
3
|
const require_helpers_stream = require('./stream.cjs');
|
|
4
|
+
const require_helpers_type_checks = require('./type-checks.cjs');
|
|
4
5
|
const require_helpers_create_api = require('./create-api.cjs');
|
|
5
6
|
const require_helpers_finalize = require('./finalize.cjs');
|
|
6
7
|
|
|
@@ -9,4 +10,6 @@ exports.MessagePortReadable = require_helpers_stream.MessagePortReadable;
|
|
|
9
10
|
exports.MessagePortWritable = require_helpers_stream.MessagePortWritable;
|
|
10
11
|
exports.createApi = require_helpers_create_api.createApi;
|
|
11
12
|
exports.createRpcClient = require_helpers_rpc.createRpcClient;
|
|
12
|
-
exports.finalize = require_helpers_finalize.finalize;
|
|
13
|
+
exports.finalize = require_helpers_finalize.finalize;
|
|
14
|
+
exports.isApiExecutionOptions = require_helpers_type_checks.isApiExecutionOptions;
|
|
15
|
+
exports.isEngineExecutionOptions = require_helpers_type_checks.isEngineExecutionOptions;
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createApi } from "
|
|
2
|
-
import { finalize } from "
|
|
3
|
-
import { createRpcClient } from "
|
|
4
|
-
import {
|
|
5
|
-
export { MessagePortDuplex, MessagePortDuplexOptions, MessagePortReadable, MessagePortWritable, createApi, createRpcClient, finalize };
|
|
1
|
+
import { c as createApi, o as isApiExecutionOptions, s as isEngineExecutionOptions } from "../index-QuLZgb8w.cjs";
|
|
2
|
+
import { t as finalize } from "../finalize-CuV0r3jg.cjs";
|
|
3
|
+
import { t as createRpcClient } from "../rpc-5MpqPBPa.cjs";
|
|
4
|
+
import { i as MessagePortWritable, n as MessagePortDuplexOptions, r as MessagePortReadable, t as MessagePortDuplex } from "../stream-B9jffNbk.cjs";
|
|
5
|
+
export { MessagePortDuplex, MessagePortDuplexOptions, MessagePortReadable, MessagePortWritable, createApi, createRpcClient, finalize, isApiExecutionOptions, isEngineExecutionOptions };
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createApi } from "
|
|
2
|
-
import { finalize } from "
|
|
3
|
-
import { createRpcClient } from "
|
|
4
|
-
import {
|
|
5
|
-
export { MessagePortDuplex, MessagePortDuplexOptions, MessagePortReadable, MessagePortWritable, createApi, createRpcClient, finalize };
|
|
1
|
+
import { c as createApi, o as isApiExecutionOptions, s as isEngineExecutionOptions } from "../index-CBobV6Wm.mjs";
|
|
2
|
+
import { t as finalize } from "../finalize-CuV0r3jg.mjs";
|
|
3
|
+
import { t as createRpcClient } from "../rpc-BvVZXS5K.mjs";
|
|
4
|
+
import { i as MessagePortWritable, n as MessagePortDuplexOptions, r as MessagePortReadable, t as MessagePortDuplex } from "../stream-B9jffNbk.mjs";
|
|
5
|
+
export { MessagePortDuplex, MessagePortDuplexOptions, MessagePortReadable, MessagePortWritable, createApi, createRpcClient, finalize, isApiExecutionOptions, isEngineExecutionOptions };
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createRpcClient } from "./rpc.mjs";
|
|
2
2
|
import { MessagePortDuplex, MessagePortReadable, MessagePortWritable } from "./stream.mjs";
|
|
3
|
+
import { isApiExecutionOptions, isEngineExecutionOptions } from "./type-checks.mjs";
|
|
3
4
|
import { createApi } from "./create-api.mjs";
|
|
4
5
|
import { finalize } from "./finalize.mjs";
|
|
5
6
|
|
|
6
|
-
export { MessagePortDuplex, MessagePortReadable, MessagePortWritable, createApi, createRpcClient, finalize };
|
|
7
|
+
export { MessagePortDuplex, MessagePortReadable, MessagePortWritable, createApi, createRpcClient, finalize, isApiExecutionOptions, isEngineExecutionOptions };
|
package/dist/helpers/rpc.d.cts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/rpc.d.ts
|
|
4
|
-
declare function createRpcClient(options: RpcClientOptions): RpcClient;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { createRpcClient };
|
|
7
|
-
//# sourceMappingURL=rpc.d.cts.map
|
|
1
|
+
import { t as createRpcClient } from "../rpc-5MpqPBPa.cjs";
|
|
2
|
+
export { createRpcClient };
|
package/dist/helpers/rpc.d.mts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/rpc.d.ts
|
|
4
|
-
declare function createRpcClient(options: RpcClientOptions): RpcClient;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { createRpcClient };
|
|
7
|
-
//# sourceMappingURL=rpc.d.mts.map
|
|
1
|
+
import { t as createRpcClient } from "../rpc-BvVZXS5K.mjs";
|
|
2
|
+
export { createRpcClient };
|
|
@@ -1,45 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/stream.d.ts
|
|
5
|
-
declare const kPort: unique symbol;
|
|
6
|
-
interface WritevChunk {
|
|
7
|
-
chunk: unknown;
|
|
8
|
-
encoding: BufferEncoding;
|
|
9
|
-
}
|
|
10
|
-
declare class MessagePortWritable extends Writable {
|
|
11
|
-
private [kPort];
|
|
12
|
-
constructor(port: MessagePort, options?: WritableOptions);
|
|
13
|
-
_write(chunk: unknown, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
14
|
-
_writev(data: WritevChunk[], callback: (error?: Error | null) => void): void;
|
|
15
|
-
_final(callback: (error?: Error | null) => void): void;
|
|
16
|
-
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
17
|
-
unref(): this;
|
|
18
|
-
ref(): this;
|
|
19
|
-
}
|
|
20
|
-
declare class MessagePortReadable extends Readable {
|
|
21
|
-
private [kPort];
|
|
22
|
-
constructor(port: MessagePort, options?: ReadableOptions);
|
|
23
|
-
_read(_size: number): void;
|
|
24
|
-
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
25
|
-
unref(): this;
|
|
26
|
-
ref(): this;
|
|
27
|
-
}
|
|
28
|
-
interface MessagePortDuplexOptions extends DuplexOptions {
|
|
29
|
-
onActivityAbort?: () => void;
|
|
30
|
-
}
|
|
31
|
-
declare class MessagePortDuplex extends Duplex {
|
|
32
|
-
private [kPort];
|
|
33
|
-
private _activityAbortHandler?;
|
|
34
|
-
constructor(port: MessagePort, options?: MessagePortDuplexOptions);
|
|
35
|
-
_read(_size: number): void;
|
|
36
|
-
_write(chunk: unknown, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
37
|
-
_writev(data: WritevChunk[], callback: (error?: Error | null) => void): void;
|
|
38
|
-
_final(callback: (error?: Error | null) => void): void;
|
|
39
|
-
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
40
|
-
unref(): this;
|
|
41
|
-
ref(): this;
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
|
-
export { MessagePortDuplex, MessagePortDuplexOptions, MessagePortReadable, MessagePortWritable };
|
|
45
|
-
//# sourceMappingURL=stream.d.cts.map
|
|
1
|
+
import { i as MessagePortWritable, n as MessagePortDuplexOptions, r as MessagePortReadable, t as MessagePortDuplex } from "../stream-B9jffNbk.cjs";
|
|
2
|
+
export { MessagePortDuplex, MessagePortDuplexOptions, MessagePortReadable, MessagePortWritable };
|
|
@@ -1,45 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/stream.d.ts
|
|
5
|
-
declare const kPort: unique symbol;
|
|
6
|
-
interface WritevChunk {
|
|
7
|
-
chunk: unknown;
|
|
8
|
-
encoding: BufferEncoding;
|
|
9
|
-
}
|
|
10
|
-
declare class MessagePortWritable extends Writable {
|
|
11
|
-
private [kPort];
|
|
12
|
-
constructor(port: MessagePort, options?: WritableOptions);
|
|
13
|
-
_write(chunk: unknown, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
14
|
-
_writev(data: WritevChunk[], callback: (error?: Error | null) => void): void;
|
|
15
|
-
_final(callback: (error?: Error | null) => void): void;
|
|
16
|
-
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
17
|
-
unref(): this;
|
|
18
|
-
ref(): this;
|
|
19
|
-
}
|
|
20
|
-
declare class MessagePortReadable extends Readable {
|
|
21
|
-
private [kPort];
|
|
22
|
-
constructor(port: MessagePort, options?: ReadableOptions);
|
|
23
|
-
_read(_size: number): void;
|
|
24
|
-
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
25
|
-
unref(): this;
|
|
26
|
-
ref(): this;
|
|
27
|
-
}
|
|
28
|
-
interface MessagePortDuplexOptions extends DuplexOptions {
|
|
29
|
-
onActivityAbort?: () => void;
|
|
30
|
-
}
|
|
31
|
-
declare class MessagePortDuplex extends Duplex {
|
|
32
|
-
private [kPort];
|
|
33
|
-
private _activityAbortHandler?;
|
|
34
|
-
constructor(port: MessagePort, options?: MessagePortDuplexOptions);
|
|
35
|
-
_read(_size: number): void;
|
|
36
|
-
_write(chunk: unknown, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
37
|
-
_writev(data: WritevChunk[], callback: (error?: Error | null) => void): void;
|
|
38
|
-
_final(callback: (error?: Error | null) => void): void;
|
|
39
|
-
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
40
|
-
unref(): this;
|
|
41
|
-
ref(): this;
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
|
-
export { MessagePortDuplex, MessagePortDuplexOptions, MessagePortReadable, MessagePortWritable };
|
|
45
|
-
//# sourceMappingURL=stream.d.mts.map
|
|
1
|
+
import { i as MessagePortWritable, n as MessagePortDuplexOptions, r as MessagePortReadable, t as MessagePortDuplex } from "../stream-B9jffNbk.mjs";
|
|
2
|
+
export { MessagePortDuplex, MessagePortDuplexOptions, MessagePortReadable, MessagePortWritable };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/helpers/type-checks.ts
|
|
4
|
+
/**
|
|
5
|
+
* Type guard to check if the provided options are EngineExecutionOptions. This is determined by checking for the presence of the "channel" property, which is specific to EngineExecutionOptions and not present in ApiExecutionOptions.
|
|
6
|
+
*
|
|
7
|
+
* @param options - The execution options to check, which can be either ApiExecutionOptions or EngineExecutionOptions.
|
|
8
|
+
* @returns True if the options are EngineExecutionOptions, false otherwise.
|
|
9
|
+
*/
|
|
10
|
+
function isEngineExecutionOptions(options) {
|
|
11
|
+
return options.channel !== void 0;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Type guard to check if the provided options are ApiExecutionOptions. This is determined by checking for the absence of the "channel" property, which is specific to EngineExecutionOptions and not present in ApiExecutionOptions.
|
|
15
|
+
*
|
|
16
|
+
* @param options - The execution options to check, which can be either ApiExecutionOptions or EngineExecutionOptions.
|
|
17
|
+
* @returns True if the options are ApiExecutionOptions, false otherwise.
|
|
18
|
+
*/
|
|
19
|
+
function isApiExecutionOptions(options) {
|
|
20
|
+
return options.channel === void 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
exports.isApiExecutionOptions = isApiExecutionOptions;
|
|
25
|
+
exports.isEngineExecutionOptions = isEngineExecutionOptions;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/helpers/type-checks.ts
|
|
2
|
+
/**
|
|
3
|
+
* Type guard to check if the provided options are EngineExecutionOptions. This is determined by checking for the presence of the "channel" property, which is specific to EngineExecutionOptions and not present in ApiExecutionOptions.
|
|
4
|
+
*
|
|
5
|
+
* @param options - The execution options to check, which can be either ApiExecutionOptions or EngineExecutionOptions.
|
|
6
|
+
* @returns True if the options are EngineExecutionOptions, false otherwise.
|
|
7
|
+
*/
|
|
8
|
+
function isEngineExecutionOptions(options) {
|
|
9
|
+
return options.channel !== void 0;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Type guard to check if the provided options are ApiExecutionOptions. This is determined by checking for the absence of the "channel" property, which is specific to EngineExecutionOptions and not present in ApiExecutionOptions.
|
|
13
|
+
*
|
|
14
|
+
* @param options - The execution options to check, which can be either ApiExecutionOptions or EngineExecutionOptions.
|
|
15
|
+
* @returns True if the options are ApiExecutionOptions, false otherwise.
|
|
16
|
+
*/
|
|
17
|
+
function isApiExecutionOptions(options) {
|
|
18
|
+
return options.channel === void 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { isApiExecutionOptions, isEngineExecutionOptions };
|
|
23
|
+
//# sourceMappingURL=type-checks.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-checks.mjs","names":[],"sources":["../../src/helpers/type-checks.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 { ApiExecutionOptions, EngineExecutionOptions } from \"../types\";\n\n/**\n * Type guard to check if the provided options are EngineExecutionOptions. This is determined by checking for the presence of the \"channel\" property, which is specific to EngineExecutionOptions and not present in ApiExecutionOptions.\n *\n * @param options - The execution options to check, which can be either ApiExecutionOptions or EngineExecutionOptions.\n * @returns True if the options are EngineExecutionOptions, false otherwise.\n */\nexport function isEngineExecutionOptions(\n options: ApiExecutionOptions | EngineExecutionOptions\n): options is EngineExecutionOptions {\n return (options as EngineExecutionOptions).channel !== undefined;\n}\n\n/**\n * Type guard to check if the provided options are ApiExecutionOptions. This is determined by checking for the absence of the \"channel\" property, which is specific to EngineExecutionOptions and not present in ApiExecutionOptions.\n *\n * @param options - The execution options to check, which can be either ApiExecutionOptions or EngineExecutionOptions.\n * @returns True if the options are ApiExecutionOptions, false otherwise.\n */\nexport function isApiExecutionOptions(\n options: ApiExecutionOptions | EngineExecutionOptions\n): options is ApiExecutionOptions {\n return (options as EngineExecutionOptions).channel === undefined;\n}\n"],"mappings":";;;;;;;AA0BA,SAAgB,yBACd,SACmC;CACnC,OAAQ,QAAmC,YAAY;AACzD;;;;;;;AAQA,SAAgB,sBACd,SACgC;CAChC,OAAQ,QAAmC,YAAY;AACzD"}
|
|
@@ -1,7 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as EngineContext } from "./context-
|
|
3
|
-
import { BuildInlineConfig, CleanInlineConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, InlineConfig, LintInlineConfig, PrepareInlineConfig, TestInlineConfig, TypesInlineConfig } from "@powerlines/core";
|
|
1
|
+
import { i as EngineResolvedConfig, n as EngineExecutionOptions, t as ApiExecutionOptions } from "./config-DXxu0y4t.mjs";
|
|
2
|
+
import { r as EngineSystemContext, t as EngineContext } from "./context-C71mv_aw.mjs";
|
|
3
|
+
import { BuildInlineConfig, CleanInlineConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, ExecutionContext, ExecutionOptions, InlineConfig, LintInlineConfig, PrepareInlineConfig, TestInlineConfig, TypesInlineConfig } from "@powerlines/core";
|
|
4
|
+
import { DeepPartial, MaybePromise } from "@stryke/types/base";
|
|
4
5
|
|
|
6
|
+
//#region src/helpers/create-api.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Creates an execution API with the provided methods. Each method will be wrapped to create an execution context and handle errors appropriately.
|
|
9
|
+
*
|
|
10
|
+
* @param handlers - An object where keys are command names and values are functions that take an execution context and return a promise.
|
|
11
|
+
* @param inlineConfig - An optional partial inline configuration object that will be merged with the context's options when creating the execution context for each command.
|
|
12
|
+
* @returns A function that can be used as an execution API handler, which takes execution parameters and invokes the appropriate command handler with a properly constructed execution context.
|
|
13
|
+
*/
|
|
14
|
+
declare function createApi<TContext extends ExecutionContext<EngineResolvedConfig, EngineSystemContext> = ExecutionContext<EngineResolvedConfig, EngineSystemContext>, TOptions extends ExecutionOptions = ExecutionOptions, THandlers extends Record<string, (context: TContext) => Promise<void>> = Record<string, (context: TContext) => Promise<void>>>(handlers: THandlers, inlineConfig?: DeepPartial<InlineConfig> | ((prev: InlineConfig) => MaybePromise<InlineConfig>)): (params: ExecutionApiParams<TOptions, keyof THandlers & string>) => Promise<void>;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/helpers/type-checks.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* Type guard to check if the provided options are EngineExecutionOptions. This is determined by checking for the presence of the "channel" property, which is specific to EngineExecutionOptions and not present in ApiExecutionOptions.
|
|
19
|
+
*
|
|
20
|
+
* @param options - The execution options to check, which can be either ApiExecutionOptions or EngineExecutionOptions.
|
|
21
|
+
* @returns True if the options are EngineExecutionOptions, false otherwise.
|
|
22
|
+
*/
|
|
23
|
+
declare function isEngineExecutionOptions(options: ApiExecutionOptions | EngineExecutionOptions): options is EngineExecutionOptions;
|
|
24
|
+
/**
|
|
25
|
+
* Type guard to check if the provided options are ApiExecutionOptions. This is determined by checking for the absence of the "channel" property, which is specific to EngineExecutionOptions and not present in ApiExecutionOptions.
|
|
26
|
+
*
|
|
27
|
+
* @param options - The execution options to check, which can be either ApiExecutionOptions or EngineExecutionOptions.
|
|
28
|
+
* @returns True if the options are ApiExecutionOptions, false otherwise.
|
|
29
|
+
*/
|
|
30
|
+
declare function isApiExecutionOptions(options: ApiExecutionOptions | EngineExecutionOptions): options is ApiExecutionOptions;
|
|
31
|
+
//#endregion
|
|
5
32
|
//#region src/types/api.d.ts
|
|
6
33
|
/**
|
|
7
34
|
* The Powerlines Base API Interface
|
|
@@ -98,19 +125,15 @@ interface ExecutionInterface {
|
|
|
98
125
|
*/
|
|
99
126
|
finalize: () => Promise<void>;
|
|
100
127
|
}
|
|
101
|
-
interface ExecutionApiParams {
|
|
102
|
-
/**
|
|
103
|
-
* The command being executed, which corresponds to the method name in the execution API. This value is used to identify which command is being invoked and can be used for logging, error handling, and other purposes within the execution host.
|
|
104
|
-
*/
|
|
105
|
-
command: string;
|
|
128
|
+
interface ExecutionApiParams<TOptions extends ExecutionOptions = ExecutionOptions, TCommand extends string = string> {
|
|
106
129
|
/**
|
|
107
|
-
* The
|
|
130
|
+
* The execution options for the current execution instance
|
|
108
131
|
*/
|
|
109
|
-
|
|
132
|
+
options: TOptions;
|
|
110
133
|
/**
|
|
111
|
-
* The execution
|
|
134
|
+
* The command being executed, which corresponds to the method name in the execution API. This value is used to identify which command is being invoked and can be used for logging, error handling, and other purposes within the execution host.
|
|
112
135
|
*/
|
|
113
|
-
|
|
136
|
+
command: TCommand;
|
|
114
137
|
/**
|
|
115
138
|
* 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.
|
|
116
139
|
*/
|
|
@@ -129,10 +152,11 @@ interface Engine extends ExecutionInterface {
|
|
|
129
152
|
*/
|
|
130
153
|
context: EngineContext;
|
|
131
154
|
/**
|
|
132
|
-
* The execution
|
|
155
|
+
* The execution API worker, 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.
|
|
133
156
|
*/
|
|
134
157
|
api: ExecutionApiWorkerInterface;
|
|
135
158
|
}
|
|
159
|
+
type ExecutionApi = ReturnType<typeof createApi<ExecutionContext<EngineResolvedConfig, EngineSystemContext>, ExecutionOptions>>;
|
|
136
160
|
//#endregion
|
|
137
|
-
export { ExecutionInterface as i,
|
|
138
|
-
//# sourceMappingURL=
|
|
161
|
+
export { ExecutionInterface as a, createApi as c, ExecutionApiWorkerInterface as i, ExecutionApi as n, isApiExecutionOptions as o, ExecutionApiParams as r, isEngineExecutionOptions as s, Engine as t };
|
|
162
|
+
//# sourceMappingURL=index-CBobV6Wm.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CBobV6Wm.d.mts","names":[],"sources":["../src/helpers/create-api.ts","../src/helpers/type-checks.ts","../src/types/api.ts"],"mappings":";;;;;;;;;AAoDA;;;;iBAAgB,SAAA,kBACG,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,IACtD,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,oBACxB,gBAAA,GAAmB,gBAAA,oBAClB,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,UACtD,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,QAAA,CAExC,QAAA,EAAU,SAAA,EACV,YAAA,GACI,WAAA,CAAY,YAAA,MACV,IAAA,EAAM,YAAA,KAAiB,YAAA,CAAa,YAAA,MAE1C,MAAA,EAAQ,kBAAA,CAAmB,QAAA,QAAgB,SAAA,eACxC,OAAA;;;;;;;;;iBCvCW,wBAAA,CACd,OAAA,EAAS,mBAAA,GAAsB,sBAAA,GAC9B,OAAA,IAAW,sBAAA;ADwBd;;;;;;AAAA,iBCdgB,qBAAA,CACd,OAAA,EAAS,mBAAA,GAAsB,sBAAA,GAC9B,OAAA,IAAW,mBAAA;;;;;;;ADYd;;UEViB,kBAAA;EFWmB;;;;;;;;EEFlC,OAAA,GAAU,YAAA,EAAc,mBAAA,KAAwB,OAAA;EFKQ;;;;;;;;EEKxD,KAAA,GAAQ,YAAA,EAAc,iBAAA,KAAsB,OAAA;EFCF;;;;;;;;;EEU1C,MAAA,GAAS,YAAA,EAAc,kBAAA,KAAuB,OAAA;EFnBZ;;;;;;;;;EE8BlC,KAAA,GAAQ,YAAA,EAAc,iBAAA,KAAsB,OAAA;EF3BD;;;;;;EEmC3C,IAAA,GAAO,YAAA,EAAc,gBAAA,KAAqB,OAAA;EFhChC;;;;;;EEwCV,IAAA,GAAO,YAAA,EAAc,gBAAA,KAAqB,OAAA;EFrCA;;;;;;;;AAGhC;EE6CV,KAAA,GAAQ,YAAA,EAAc,iBAAA,KAAsB,OAAA;;;ADpF9C;;;;EC4FE,IAAA,GAAO,YAAA,EAAc,gBAAA,KAAqB,OAAA;ED1F9B;;;;;;;;ECoGZ,MAAA,GAAS,YAAA,EAAc,kBAAA,KAAuB,OAAA;EDpGZ;AAUpC;;;;;;;ECoGE,QAAA,QAAgB,OAAA;AAAA;AAAA,UAGD,kBAAA,kBACE,gBAAA,GAAmB,gBAAA;EDvGpC;;;EC6GA,OAAA,EAAS,QAAA;ED5GsB;;;ECiH/B,OAAA,EAAS,QAAA;EA/GM;;;EAoHf,YAAA,EAAc,YAAA;AAAA;AAAA,UAGC,2BAAA;EACf,OAAA,GACE,OAAA,UACA,OAAA,EAAS,sBAAA,EACT,YAAA,EAAc,YAAA,KACX,OAAA;EACL,QAAA,QAAgB,OAAA;AAAA;;;;UAMD,MAAA,SAAe,kBAAA;EA1ET;;;EA8ErB,OAAA,EAAS,aAAA;EA3DY;;;EAgErB,GAAA,EAAK,2BAAA;AAAA;AAAA,KAGK,YAAA,GAAe,UAAA,QAClB,SAAA,CACL,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,GACvC,gBAAA"}
|
|
@@ -1,7 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as EngineContext } from "./context-
|
|
3
|
-
import { BuildInlineConfig, CleanInlineConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, InlineConfig, LintInlineConfig, PrepareInlineConfig, TestInlineConfig, TypesInlineConfig } from "@powerlines/core";
|
|
1
|
+
import { i as EngineResolvedConfig, n as EngineExecutionOptions, t as ApiExecutionOptions } from "./config-B6udgcnD.cjs";
|
|
2
|
+
import { r as EngineSystemContext, t as EngineContext } from "./context-ZbJRDGpl.cjs";
|
|
3
|
+
import { BuildInlineConfig, CleanInlineConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, ExecutionContext, ExecutionOptions, InlineConfig, LintInlineConfig, PrepareInlineConfig, TestInlineConfig, TypesInlineConfig } from "@powerlines/core";
|
|
4
|
+
import { DeepPartial, MaybePromise } from "@stryke/types/base";
|
|
4
5
|
|
|
6
|
+
//#region src/helpers/create-api.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Creates an execution API with the provided methods. Each method will be wrapped to create an execution context and handle errors appropriately.
|
|
9
|
+
*
|
|
10
|
+
* @param handlers - An object where keys are command names and values are functions that take an execution context and return a promise.
|
|
11
|
+
* @param inlineConfig - An optional partial inline configuration object that will be merged with the context's options when creating the execution context for each command.
|
|
12
|
+
* @returns A function that can be used as an execution API handler, which takes execution parameters and invokes the appropriate command handler with a properly constructed execution context.
|
|
13
|
+
*/
|
|
14
|
+
declare function createApi<TContext extends ExecutionContext<EngineResolvedConfig, EngineSystemContext> = ExecutionContext<EngineResolvedConfig, EngineSystemContext>, TOptions extends ExecutionOptions = ExecutionOptions, THandlers extends Record<string, (context: TContext) => Promise<void>> = Record<string, (context: TContext) => Promise<void>>>(handlers: THandlers, inlineConfig?: DeepPartial<InlineConfig> | ((prev: InlineConfig) => MaybePromise<InlineConfig>)): (params: ExecutionApiParams<TOptions, keyof THandlers & string>) => Promise<void>;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/helpers/type-checks.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* Type guard to check if the provided options are EngineExecutionOptions. This is determined by checking for the presence of the "channel" property, which is specific to EngineExecutionOptions and not present in ApiExecutionOptions.
|
|
19
|
+
*
|
|
20
|
+
* @param options - The execution options to check, which can be either ApiExecutionOptions or EngineExecutionOptions.
|
|
21
|
+
* @returns True if the options are EngineExecutionOptions, false otherwise.
|
|
22
|
+
*/
|
|
23
|
+
declare function isEngineExecutionOptions(options: ApiExecutionOptions | EngineExecutionOptions): options is EngineExecutionOptions;
|
|
24
|
+
/**
|
|
25
|
+
* Type guard to check if the provided options are ApiExecutionOptions. This is determined by checking for the absence of the "channel" property, which is specific to EngineExecutionOptions and not present in ApiExecutionOptions.
|
|
26
|
+
*
|
|
27
|
+
* @param options - The execution options to check, which can be either ApiExecutionOptions or EngineExecutionOptions.
|
|
28
|
+
* @returns True if the options are ApiExecutionOptions, false otherwise.
|
|
29
|
+
*/
|
|
30
|
+
declare function isApiExecutionOptions(options: ApiExecutionOptions | EngineExecutionOptions): options is ApiExecutionOptions;
|
|
31
|
+
//#endregion
|
|
5
32
|
//#region src/types/api.d.ts
|
|
6
33
|
/**
|
|
7
34
|
* The Powerlines Base API Interface
|
|
@@ -98,19 +125,15 @@ interface ExecutionInterface {
|
|
|
98
125
|
*/
|
|
99
126
|
finalize: () => Promise<void>;
|
|
100
127
|
}
|
|
101
|
-
interface ExecutionApiParams {
|
|
102
|
-
/**
|
|
103
|
-
* The command being executed, which corresponds to the method name in the execution API. This value is used to identify which command is being invoked and can be used for logging, error handling, and other purposes within the execution host.
|
|
104
|
-
*/
|
|
105
|
-
command: string;
|
|
128
|
+
interface ExecutionApiParams<TOptions extends ExecutionOptions = ExecutionOptions, TCommand extends string = string> {
|
|
106
129
|
/**
|
|
107
|
-
* The
|
|
130
|
+
* The execution options for the current execution instance
|
|
108
131
|
*/
|
|
109
|
-
|
|
132
|
+
options: TOptions;
|
|
110
133
|
/**
|
|
111
|
-
* The execution
|
|
134
|
+
* The command being executed, which corresponds to the method name in the execution API. This value is used to identify which command is being invoked and can be used for logging, error handling, and other purposes within the execution host.
|
|
112
135
|
*/
|
|
113
|
-
|
|
136
|
+
command: TCommand;
|
|
114
137
|
/**
|
|
115
138
|
* 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.
|
|
116
139
|
*/
|
|
@@ -129,10 +152,11 @@ interface Engine extends ExecutionInterface {
|
|
|
129
152
|
*/
|
|
130
153
|
context: EngineContext;
|
|
131
154
|
/**
|
|
132
|
-
* The execution
|
|
155
|
+
* The execution API worker, 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.
|
|
133
156
|
*/
|
|
134
157
|
api: ExecutionApiWorkerInterface;
|
|
135
158
|
}
|
|
159
|
+
type ExecutionApi = ReturnType<typeof createApi<ExecutionContext<EngineResolvedConfig, EngineSystemContext>, ExecutionOptions>>;
|
|
136
160
|
//#endregion
|
|
137
|
-
export { ExecutionInterface as i,
|
|
138
|
-
//# sourceMappingURL=
|
|
161
|
+
export { ExecutionInterface as a, createApi as c, ExecutionApiWorkerInterface as i, ExecutionApi as n, isApiExecutionOptions as o, ExecutionApiParams as r, isEngineExecutionOptions as s, Engine as t };
|
|
162
|
+
//# sourceMappingURL=index-QuLZgb8w.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-QuLZgb8w.d.cts","names":[],"sources":["../src/helpers/create-api.ts","../src/helpers/type-checks.ts","../src/types/api.ts"],"mappings":";;;;;;;;;AAoDA;;;;iBAAgB,SAAA,kBACG,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,IACtD,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,oBACxB,gBAAA,GAAmB,gBAAA,oBAClB,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,UACtD,MAAA,UAAgB,OAAA,EAAS,QAAA,KAAa,OAAA,QAAA,CAExC,QAAA,EAAU,SAAA,EACV,YAAA,GACI,WAAA,CAAY,YAAA,MACV,IAAA,EAAM,YAAA,KAAiB,YAAA,CAAa,YAAA,MAE1C,MAAA,EAAQ,kBAAA,CAAmB,QAAA,QAAgB,SAAA,eACxC,OAAA;;;;;;;;;iBCvCW,wBAAA,CACd,OAAA,EAAS,mBAAA,GAAsB,sBAAA,GAC9B,OAAA,IAAW,sBAAA;ADwBd;;;;;;AAAA,iBCdgB,qBAAA,CACd,OAAA,EAAS,mBAAA,GAAsB,sBAAA,GAC9B,OAAA,IAAW,mBAAA;;;;;;;ADYd;;UEViB,kBAAA;EFWmB;;;;;;;;EEFlC,OAAA,GAAU,YAAA,EAAc,mBAAA,KAAwB,OAAA;EFKQ;;;;;;;;EEKxD,KAAA,GAAQ,YAAA,EAAc,iBAAA,KAAsB,OAAA;EFCF;;;;;;;;;EEU1C,MAAA,GAAS,YAAA,EAAc,kBAAA,KAAuB,OAAA;EFnBZ;;;;;;;;;EE8BlC,KAAA,GAAQ,YAAA,EAAc,iBAAA,KAAsB,OAAA;EF3BD;;;;;;EEmC3C,IAAA,GAAO,YAAA,EAAc,gBAAA,KAAqB,OAAA;EFhChC;;;;;;EEwCV,IAAA,GAAO,YAAA,EAAc,gBAAA,KAAqB,OAAA;EFrCA;;;;;;;;AAGhC;EE6CV,KAAA,GAAQ,YAAA,EAAc,iBAAA,KAAsB,OAAA;;;ADpF9C;;;;EC4FE,IAAA,GAAO,YAAA,EAAc,gBAAA,KAAqB,OAAA;ED1F9B;;;;;;;;ECoGZ,MAAA,GAAS,YAAA,EAAc,kBAAA,KAAuB,OAAA;EDpGZ;AAUpC;;;;;;;ECoGE,QAAA,QAAgB,OAAA;AAAA;AAAA,UAGD,kBAAA,kBACE,gBAAA,GAAmB,gBAAA;EDvGpC;;;EC6GA,OAAA,EAAS,QAAA;ED5GsB;;;ECiH/B,OAAA,EAAS,QAAA;EA/GM;;;EAoHf,YAAA,EAAc,YAAA;AAAA;AAAA,UAGC,2BAAA;EACf,OAAA,GACE,OAAA,UACA,OAAA,EAAS,sBAAA,EACT,YAAA,EAAc,YAAA,KACX,OAAA;EACL,QAAA,QAAgB,OAAA;AAAA;;;;UAMD,MAAA,SAAe,kBAAA;EA1ET;;;EA8ErB,OAAA,EAAS,aAAA;EA3DY;;;EAgErB,GAAA,EAAK,2BAAA;AAAA;AAAA,KAGK,YAAA,GAAe,UAAA,QAClB,SAAA,CACL,gBAAA,CAAiB,oBAAA,EAAsB,mBAAA,GACvC,gBAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_engine = require('./engine-
|
|
2
|
+
const require_engine = require('./engine-BKEDCOCb.cjs');
|
|
3
3
|
const require_context_engine_context = require('./context/engine-context.cjs');
|
|
4
4
|
require('./context/index.cjs');
|
|
5
5
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as
|
|
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 {
|
|
4
|
-
import { t as PowerlinesEngineContext } from "./engine-context-
|
|
5
|
-
import { n as createContext, r as createEngine, t as PowerlinesEngine } from "./engine-
|
|
6
|
-
export { type Engine, type EngineContext, type EngineExecutionItem, type EngineExecutionOptions, type EngineOptions, type EngineResolvedConfig, type EngineSystemContext, type ExecutionApiParams, type ExecutionApiWorkerInterface, type ExecutionCommandScopeState, type ExecutionHookScopeState, type ExecutionInterface, type ExecutionPluginScopeState, type ExecutionScopeState, type ExecutionScopeType, type ExecutionState, type ExtractRpcFunction, type ExtractRpcFunctions, type InputRpcFunction, type InputRpcFunctions, type LogPayload, PowerlinesEngine, PowerlinesEngineContext, type RpcClient, type RpcClientCall, type RpcClientCallEvent, type RpcClientCallOptional, type RpcClientEvents, type RpcClientFunctions, type RpcClientHost, type RpcClientOptions, type RpcClientRemoteFunctions, type RpcContext, type RpcFunction, type RpcFunctions, type RpcPayloadEnvelop, type RpcPayloadMetadata, type RpcServerFunctions, type WrapRpcFunction, type WrapRpcFunctions, type WrappedRpcFunction, type WrappedRpcFunctions, createContext, createEngine };
|
|
1
|
+
import { C as RpcPayloadMetadata, D as WrappedRpcFunction, E as WrapRpcFunctions, O as WrappedRpcFunctions, S as RpcPayloadEnvelop, T as WrapRpcFunction, _ as RpcClientHost, a as RpcClientOptions, b as RpcFunction, c as InputRpcFunction, d as RpcClient, f as RpcClientCall, g as RpcClientFunctions, h as RpcClientEvents, i as EngineResolvedConfig, l as InputRpcFunctions, m as RpcClientCallOptional, n as EngineExecutionOptions, o as ExtractRpcFunction, p as RpcClientCallEvent, r as EngineOptions, s as ExtractRpcFunctions, t as ApiExecutionOptions, u as LogPayload, v as RpcClientRemoteFunctions, w as RpcServerFunctions, x as RpcFunctions, y as RpcContext } from "./config-B6udgcnD.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-ZbJRDGpl.cjs";
|
|
3
|
+
import { a as ExecutionInterface, i as ExecutionApiWorkerInterface, n as ExecutionApi, r as ExecutionApiParams, t as Engine } from "./index-QuLZgb8w.cjs";
|
|
4
|
+
import { t as PowerlinesEngineContext } from "./engine-context-DDbpdZHC.cjs";
|
|
5
|
+
import { n as createContext, r as createEngine, t as PowerlinesEngine } from "./engine-B5pbfMyg.cjs";
|
|
6
|
+
export { type ApiExecutionOptions, type Engine, type EngineContext, type EngineExecutionItem, type EngineExecutionOptions, type EngineOptions, type EngineResolvedConfig, type EngineSystemContext, type ExecutionApi, type ExecutionApiParams, type ExecutionApiWorkerInterface, type ExecutionCommandScopeState, type ExecutionHookScopeState, type ExecutionInterface, type ExecutionPluginScopeState, type ExecutionScopeState, type ExecutionScopeType, type ExecutionState, type ExtractRpcFunction, type ExtractRpcFunctions, type InputRpcFunction, type InputRpcFunctions, type LogPayload, PowerlinesEngine, PowerlinesEngineContext, type RpcClient, type RpcClientCall, type RpcClientCallEvent, type RpcClientCallOptional, type RpcClientEvents, type RpcClientFunctions, type RpcClientHost, type RpcClientOptions, type RpcClientRemoteFunctions, type RpcContext, type RpcFunction, type RpcFunctions, type RpcPayloadEnvelop, type RpcPayloadMetadata, type RpcServerFunctions, type WrapRpcFunction, type WrapRpcFunctions, type WrappedRpcFunction, type WrappedRpcFunctions, createContext, createEngine };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as
|
|
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 {
|
|
4
|
-
import { t as PowerlinesEngineContext } from "./engine-context-
|
|
5
|
-
import { n as createContext, r as createEngine, t as PowerlinesEngine } from "./engine-
|
|
6
|
-
export { type Engine, type EngineContext, type EngineExecutionItem, type EngineExecutionOptions, type EngineOptions, type EngineResolvedConfig, type EngineSystemContext, type ExecutionApiParams, type ExecutionApiWorkerInterface, type ExecutionCommandScopeState, type ExecutionHookScopeState, type ExecutionInterface, type ExecutionPluginScopeState, type ExecutionScopeState, type ExecutionScopeType, type ExecutionState, type ExtractRpcFunction, type ExtractRpcFunctions, type InputRpcFunction, type InputRpcFunctions, type LogPayload, PowerlinesEngine, PowerlinesEngineContext, type RpcClient, type RpcClientCall, type RpcClientCallEvent, type RpcClientCallOptional, type RpcClientEvents, type RpcClientFunctions, type RpcClientHost, type RpcClientOptions, type RpcClientRemoteFunctions, type RpcContext, type RpcFunction, type RpcFunctions, type RpcPayloadEnvelop, type RpcPayloadMetadata, type RpcServerFunctions, type WrapRpcFunction, type WrapRpcFunctions, type WrappedRpcFunction, type WrappedRpcFunctions, createContext, createEngine };
|
|
1
|
+
import { C as RpcPayloadMetadata, D as WrappedRpcFunction, E as WrapRpcFunctions, O as WrappedRpcFunctions, S as RpcPayloadEnvelop, T as WrapRpcFunction, _ as RpcClientHost, a as RpcClientOptions, b as RpcFunction, c as InputRpcFunction, d as RpcClient, f as RpcClientCall, g as RpcClientFunctions, h as RpcClientEvents, i as EngineResolvedConfig, l as InputRpcFunctions, m as RpcClientCallOptional, n as EngineExecutionOptions, o as ExtractRpcFunction, p as RpcClientCallEvent, r as EngineOptions, s as ExtractRpcFunctions, t as ApiExecutionOptions, u as LogPayload, v as RpcClientRemoteFunctions, w as RpcServerFunctions, x as RpcFunctions, y as RpcContext } from "./config-DXxu0y4t.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-C71mv_aw.mjs";
|
|
3
|
+
import { a as ExecutionInterface, i as ExecutionApiWorkerInterface, n as ExecutionApi, r as ExecutionApiParams, t as Engine } from "./index-CBobV6Wm.mjs";
|
|
4
|
+
import { t as PowerlinesEngineContext } from "./engine-context-CaPJFek0.mjs";
|
|
5
|
+
import { n as createContext, r as createEngine, t as PowerlinesEngine } from "./engine-CeWEM0TT.mjs";
|
|
6
|
+
export { type ApiExecutionOptions, type Engine, type EngineContext, type EngineExecutionItem, type EngineExecutionOptions, type EngineOptions, type EngineResolvedConfig, type EngineSystemContext, type ExecutionApi, type ExecutionApiParams, type ExecutionApiWorkerInterface, type ExecutionCommandScopeState, type ExecutionHookScopeState, type ExecutionInterface, type ExecutionPluginScopeState, type ExecutionScopeState, type ExecutionScopeType, type ExecutionState, type ExtractRpcFunction, type ExtractRpcFunctions, type InputRpcFunction, type InputRpcFunctions, type LogPayload, PowerlinesEngine, PowerlinesEngineContext, type RpcClient, type RpcClientCall, type RpcClientCallEvent, type RpcClientCallOptional, type RpcClientEvents, type RpcClientFunctions, type RpcClientHost, type RpcClientOptions, type RpcClientRemoteFunctions, type RpcContext, type RpcFunction, type RpcFunctions, type RpcPayloadEnvelop, type RpcPayloadMetadata, type RpcServerFunctions, type WrapRpcFunction, type WrapRpcFunctions, type WrappedRpcFunction, type WrappedRpcFunctions, createContext, createEngine };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createContext, r as createEngine, t as PowerlinesEngine } from "./engine-
|
|
1
|
+
import { n as createContext, r as createEngine, t as PowerlinesEngine } from "./engine-DRAFIm5M.mjs";
|
|
2
2
|
import { PowerlinesEngineContext } from "./context/engine-context.mjs";
|
|
3
3
|
import "./context/index.mjs";
|
|
4
4
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { a as RpcClientOptions, d as RpcClient } from "./config-B6udgcnD.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/helpers/rpc.d.ts
|
|
4
|
+
declare function createRpcClient(options: RpcClientOptions): RpcClient;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { createRpcClient as t };
|
|
7
|
+
//# sourceMappingURL=rpc-5MpqPBPa.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc-5MpqPBPa.d.cts","names":[],"sources":["../src/helpers/rpc.ts"],"mappings":";;;iBA0LgB,eAAA,CAAgB,OAAA,EAAS,gBAAA,GAAgB,SAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { a as RpcClientOptions, d as RpcClient } from "./config-DXxu0y4t.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/helpers/rpc.d.ts
|
|
4
|
+
declare function createRpcClient(options: RpcClientOptions): RpcClient;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { createRpcClient as t };
|
|
7
|
+
//# sourceMappingURL=rpc-BvVZXS5K.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc-BvVZXS5K.d.mts","names":[],"sources":["../src/helpers/rpc.ts"],"mappings":";;;iBA0LgB,eAAA,CAAgB,OAAA,EAAS,gBAAA,GAAgB,SAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Duplex, DuplexOptions, Readable, ReadableOptions, Writable, WritableOptions } from "node:stream";
|
|
2
|
+
import { MessagePort } from "node:worker_threads";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/stream.d.ts
|
|
5
|
+
declare const kPort: unique symbol;
|
|
6
|
+
interface WritevChunk {
|
|
7
|
+
chunk: unknown;
|
|
8
|
+
encoding: BufferEncoding;
|
|
9
|
+
}
|
|
10
|
+
declare class MessagePortWritable extends Writable {
|
|
11
|
+
private [kPort];
|
|
12
|
+
constructor(port: MessagePort, options?: WritableOptions);
|
|
13
|
+
_write(chunk: unknown, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
14
|
+
_writev(data: WritevChunk[], callback: (error?: Error | null) => void): void;
|
|
15
|
+
_final(callback: (error?: Error | null) => void): void;
|
|
16
|
+
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
17
|
+
unref(): this;
|
|
18
|
+
ref(): this;
|
|
19
|
+
}
|
|
20
|
+
declare class MessagePortReadable extends Readable {
|
|
21
|
+
private [kPort];
|
|
22
|
+
constructor(port: MessagePort, options?: ReadableOptions);
|
|
23
|
+
_read(_size: number): void;
|
|
24
|
+
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
25
|
+
unref(): this;
|
|
26
|
+
ref(): this;
|
|
27
|
+
}
|
|
28
|
+
interface MessagePortDuplexOptions extends DuplexOptions {
|
|
29
|
+
onActivityAbort?: () => void;
|
|
30
|
+
}
|
|
31
|
+
declare class MessagePortDuplex extends Duplex {
|
|
32
|
+
private [kPort];
|
|
33
|
+
private _activityAbortHandler?;
|
|
34
|
+
constructor(port: MessagePort, options?: MessagePortDuplexOptions);
|
|
35
|
+
_read(_size: number): void;
|
|
36
|
+
_write(chunk: unknown, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
37
|
+
_writev(data: WritevChunk[], callback: (error?: Error | null) => void): void;
|
|
38
|
+
_final(callback: (error?: Error | null) => void): void;
|
|
39
|
+
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
40
|
+
unref(): this;
|
|
41
|
+
ref(): this;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { MessagePortWritable as i, MessagePortDuplexOptions as n, MessagePortReadable as r, MessagePortDuplex as t };
|
|
45
|
+
//# sourceMappingURL=stream-B9jffNbk.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-B9jffNbk.d.cts","names":[],"sources":["../src/helpers/stream.ts"],"mappings":";;;;cA0BM,KAAA;AAAA,UAMI,WAAA;EACR,KAAA;EACA,QAAA,EAAU,cAAc;AAAA;AAAA,cAeb,mBAAA,SAA4B,QAAA;EAAA,SAC9B,KAAA;cAEU,IAAA,EAAM,WAAA,EAAa,OAAA,GAAU,eAAA;EAKhC,MAAA,CACd,KAAA,WACA,SAAA,EAAW,cAAA,EACX,QAAA,GAAW,KAAA,GAAQ,KAAA;EAOL,OAAA,CACd,IAAA,EAAM,WAAA,IACN,QAAA,GAAW,KAAA,GAAQ,KAAA;EAWL,MAAA,CAAO,QAAA,GAAW,KAAA,GAAQ,KAAA;EAK1B,QAAA,CACd,KAAA,EAAO,KAAA,SACP,QAAA,GAAW,KAAA,GAAQ,KAAA;EAKd,KAAA,CAAA;EAKA,GAAA,CAAA;AAAA;AAAA,cAMI,mBAAA,SAA4B,QAAA;EAAA,SAC9B,KAAA;cAEU,IAAA,EAAM,WAAA,EAAa,OAAA,GAAU,eAAA;EAQhC,KAAA,CAAM,KAAA;EAIN,QAAA,CACd,KAAA,EAAO,KAAA,SACP,QAAA,GAAW,KAAA,GAAQ,KAAA;EAQd,KAAA,CAAA;EAKA,GAAA,CAAA;AAAA;AAAA,UAMQ,wBAAA,SAAiC,aAAa;EAC7D,eAAe;AAAA;AAAA,cAGJ,iBAAA,SAA0B,MAAA;EAAA,SAC5B,KAAA;EAAA,QAED,qBAAA;cAEW,IAAA,EAAM,WAAA,EAAa,OAAA,GAAU,wBAAA;EAUhC,KAAA,CAAM,KAAA;EAIN,MAAA,CACd,KAAA,WACA,SAAA,EAAW,cAAA,EACX,QAAA,GAAW,KAAA,GAAQ,KAAA;EAUL,OAAA,CACd,IAAA,EAAM,WAAA,IACN,QAAA,GAAW,KAAA,GAAQ,KAAA;EAWL,MAAA,CAAO,QAAA,GAAW,KAAA,GAAQ,KAAA;EAK1B,QAAA,CACd,KAAA,EAAO,KAAA,SACP,QAAA,GAAW,KAAA,GAAQ,KAAA;EAQd,KAAA,CAAA;EAKA,GAAA,CAAA;AAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Duplex, DuplexOptions, Readable, ReadableOptions, Writable, WritableOptions } from "node:stream";
|
|
2
|
+
import { MessagePort } from "node:worker_threads";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/stream.d.ts
|
|
5
|
+
declare const kPort: unique symbol;
|
|
6
|
+
interface WritevChunk {
|
|
7
|
+
chunk: unknown;
|
|
8
|
+
encoding: BufferEncoding;
|
|
9
|
+
}
|
|
10
|
+
declare class MessagePortWritable extends Writable {
|
|
11
|
+
private [kPort];
|
|
12
|
+
constructor(port: MessagePort, options?: WritableOptions);
|
|
13
|
+
_write(chunk: unknown, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
14
|
+
_writev(data: WritevChunk[], callback: (error?: Error | null) => void): void;
|
|
15
|
+
_final(callback: (error?: Error | null) => void): void;
|
|
16
|
+
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
17
|
+
unref(): this;
|
|
18
|
+
ref(): this;
|
|
19
|
+
}
|
|
20
|
+
declare class MessagePortReadable extends Readable {
|
|
21
|
+
private [kPort];
|
|
22
|
+
constructor(port: MessagePort, options?: ReadableOptions);
|
|
23
|
+
_read(_size: number): void;
|
|
24
|
+
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
25
|
+
unref(): this;
|
|
26
|
+
ref(): this;
|
|
27
|
+
}
|
|
28
|
+
interface MessagePortDuplexOptions extends DuplexOptions {
|
|
29
|
+
onActivityAbort?: () => void;
|
|
30
|
+
}
|
|
31
|
+
declare class MessagePortDuplex extends Duplex {
|
|
32
|
+
private [kPort];
|
|
33
|
+
private _activityAbortHandler?;
|
|
34
|
+
constructor(port: MessagePort, options?: MessagePortDuplexOptions);
|
|
35
|
+
_read(_size: number): void;
|
|
36
|
+
_write(chunk: unknown, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
37
|
+
_writev(data: WritevChunk[], callback: (error?: Error | null) => void): void;
|
|
38
|
+
_final(callback: (error?: Error | null) => void): void;
|
|
39
|
+
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
40
|
+
unref(): this;
|
|
41
|
+
ref(): this;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { MessagePortWritable as i, MessagePortDuplexOptions as n, MessagePortReadable as r, MessagePortDuplex as t };
|
|
45
|
+
//# sourceMappingURL=stream-B9jffNbk.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-B9jffNbk.d.mts","names":[],"sources":["../src/helpers/stream.ts"],"mappings":";;;;cA0BM,KAAA;AAAA,UAMI,WAAA;EACR,KAAA;EACA,QAAA,EAAU,cAAc;AAAA;AAAA,cAeb,mBAAA,SAA4B,QAAA;EAAA,SAC9B,KAAA;cAEU,IAAA,EAAM,WAAA,EAAa,OAAA,GAAU,eAAA;EAKhC,MAAA,CACd,KAAA,WACA,SAAA,EAAW,cAAA,EACX,QAAA,GAAW,KAAA,GAAQ,KAAA;EAOL,OAAA,CACd,IAAA,EAAM,WAAA,IACN,QAAA,GAAW,KAAA,GAAQ,KAAA;EAWL,MAAA,CAAO,QAAA,GAAW,KAAA,GAAQ,KAAA;EAK1B,QAAA,CACd,KAAA,EAAO,KAAA,SACP,QAAA,GAAW,KAAA,GAAQ,KAAA;EAKd,KAAA,CAAA;EAKA,GAAA,CAAA;AAAA;AAAA,cAMI,mBAAA,SAA4B,QAAA;EAAA,SAC9B,KAAA;cAEU,IAAA,EAAM,WAAA,EAAa,OAAA,GAAU,eAAA;EAQhC,KAAA,CAAM,KAAA;EAIN,QAAA,CACd,KAAA,EAAO,KAAA,SACP,QAAA,GAAW,KAAA,GAAQ,KAAA;EAQd,KAAA,CAAA;EAKA,GAAA,CAAA;AAAA;AAAA,UAMQ,wBAAA,SAAiC,aAAa;EAC7D,eAAe;AAAA;AAAA,cAGJ,iBAAA,SAA0B,MAAA;EAAA,SAC5B,KAAA;EAAA,QAED,qBAAA;cAEW,IAAA,EAAM,WAAA,EAAa,OAAA,GAAU,wBAAA;EAUhC,KAAA,CAAM,KAAA;EAIN,MAAA,CACd,KAAA,WACA,SAAA,EAAW,cAAA,EACX,QAAA,GAAW,KAAA,GAAQ,KAAA;EAUL,OAAA,CACd,IAAA,EAAM,WAAA,IACN,QAAA,GAAW,KAAA,GAAQ,KAAA;EAWL,MAAA,CAAO,QAAA,GAAW,KAAA,GAAQ,KAAA;EAK1B,QAAA,CACd,KAAA,EAAO,KAAA,SACP,QAAA,GAAW,KAAA,GAAQ,KAAA;EAQd,KAAA,CAAA;EAKA,GAAA,CAAA;AAAA"}
|