@blue-labs/document-processor 3.0.0 → 3.2.0
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/engine/channel-runner.d.ts +3 -6
- package/dist/engine/channel-runner.d.ts.map +1 -1
- package/dist/engine/composite-channel-validation.d.ts +14 -0
- package/dist/engine/composite-channel-validation.d.ts.map +1 -0
- package/dist/engine/contract-bundle.d.ts +7 -15
- package/dist/engine/contract-bundle.d.ts.map +1 -1
- package/dist/engine/contract-loader.d.ts +2 -1
- package/dist/engine/contract-loader.d.ts.map +1 -1
- package/dist/engine/processor-engine.d.ts.map +1 -1
- package/dist/index.js +1399 -1176
- package/dist/model/channels/composite-timeline-channel.d.ts +47 -0
- package/dist/model/channels/composite-timeline-channel.d.ts.map +1 -0
- package/dist/model/channels/document-update-channel.d.ts +4 -4
- package/dist/model/channels/embedded-node-channel.d.ts +4 -4
- package/dist/model/channels/index.d.ts +1 -0
- package/dist/model/channels/index.d.ts.map +1 -1
- package/dist/model/channels/lifecycle-channel.d.ts +4 -4
- package/dist/model/channels/myos-timeline-channel.d.ts +4 -4
- package/dist/model/channels/timeline-channel.d.ts +4 -4
- package/dist/model/channels/triggered-event-channel.d.ts +4 -4
- package/dist/model/handlers/sequential-workflow-operation.d.ts +6 -6
- package/dist/model/handlers/sequential-workflow.d.ts +6 -6
- package/dist/model/markers/channel-event-checkpoint.d.ts +2 -2
- package/dist/model/markers/document-anchors.d.ts +2 -2
- package/dist/model/markers/document-links.d.ts +2 -2
- package/dist/model/markers/initialization-marker.d.ts +2 -2
- package/dist/model/markers/myos-participants-orchestration.d.ts +2 -2
- package/dist/model/markers/myos-session-interaction.d.ts +2 -2
- package/dist/model/markers/myos-worker-agency.d.ts +2 -2
- package/dist/model/markers/operation.d.ts +2 -2
- package/dist/model/markers/process-embedded.d.ts +2 -2
- package/dist/model/markers/processing-terminated-marker.d.ts +2 -2
- package/dist/model/shared/channel-contract-base.d.ts +4 -4
- package/dist/model/shared/handler-contract-base.d.ts +4 -4
- package/dist/model/shared/marker-contract-base.d.ts +2 -2
- package/dist/model/types.d.ts +2 -2
- package/dist/model/types.d.ts.map +1 -1
- package/dist/registry/contract-processor-registry-builder.d.ts.map +1 -1
- package/dist/registry/processors/composite-timeline-channel-processor.d.ts +81 -0
- package/dist/registry/processors/composite-timeline-channel-processor.d.ts.map +1 -0
- package/dist/registry/processors/myos-timeline-channel-processor.d.ts +4 -4
- package/dist/registry/processors/myos-timeline-channel-processor.d.ts.map +1 -1
- package/dist/registry/processors/operation-marker-processor.d.ts +2 -2
- package/dist/registry/processors/operation-marker-processor.d.ts.map +1 -1
- package/dist/registry/processors/sequential-workflow-operation-processor.d.ts +6 -6
- package/dist/registry/processors/sequential-workflow-operation-processor.d.ts.map +1 -1
- package/dist/registry/processors/sequential-workflow-processor.d.ts +6 -6
- package/dist/registry/processors/sequential-workflow-processor.d.ts.map +1 -1
- package/dist/registry/processors/steps/javascript-code-step-executor.d.ts +6 -0
- package/dist/registry/processors/steps/javascript-code-step-executor.d.ts.map +1 -1
- package/dist/registry/processors/steps/trigger-event-step-executor.d.ts.map +1 -1
- package/dist/registry/processors/steps/update-document-step-executor.d.ts.map +1 -1
- package/dist/registry/processors/timeline-channel-processor.d.ts +4 -4
- package/dist/registry/processors/timeline-channel-processor.d.ts.map +1 -1
- package/dist/registry/types.d.ts +26 -0
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/runtime/gas-helpers.d.ts +0 -3
- package/dist/runtime/gas-helpers.d.ts.map +1 -1
- package/dist/runtime/gas-meter.d.ts +1 -3
- package/dist/runtime/gas-meter.d.ts.map +1 -1
- package/dist/runtime/gas-schedule.d.ts +8 -0
- package/dist/runtime/gas-schedule.d.ts.map +1 -0
- package/dist/test-support/blue.d.ts.map +1 -1
- package/dist/types/channel-contract-entry.d.ts +7 -0
- package/dist/types/channel-contract-entry.d.ts.map +1 -0
- package/dist/types/handler-contract-entry.d.ts +7 -0
- package/dist/types/handler-contract-entry.d.ts.map +1 -0
- package/dist/types/marker-contract-entry.d.ts +7 -0
- package/dist/types/marker-contract-entry.d.ts.map +1 -0
- package/dist/util/expression/quickjs-config.d.ts +2 -0
- package/dist/util/expression/quickjs-config.d.ts.map +1 -0
- package/dist/util/expression/quickjs-evaluator.d.ts +23 -22
- package/dist/util/expression/quickjs-evaluator.d.ts.map +1 -1
- package/dist/util/expression/quickjs-expression-utils.d.ts +3 -3
- package/dist/util/expression/quickjs-expression-utils.d.ts.map +1 -1
- package/package.json +9 -7
|
@@ -37,21 +37,21 @@ export declare class MyOSTimelineChannelProcessor implements ChannelProcessor<My
|
|
|
37
37
|
path: import('zod').ZodOptional<import('zod').ZodString>;
|
|
38
38
|
definition: import('zod').ZodOptional<import('zod').ZodType<BlueNode, import('zod').ZodTypeDef, BlueNode>>;
|
|
39
39
|
}>>, "strip", import('zod').ZodTypeAny, {
|
|
40
|
+
event?: BlueNode | undefined;
|
|
41
|
+
name?: string | undefined;
|
|
40
42
|
path?: string | undefined;
|
|
41
43
|
description?: string | undefined;
|
|
42
|
-
name?: string | undefined;
|
|
43
44
|
order?: number | undefined;
|
|
44
|
-
event?: BlueNode | undefined;
|
|
45
45
|
definition?: BlueNode | undefined;
|
|
46
46
|
timelineId?: string | undefined;
|
|
47
47
|
accountId?: string | undefined;
|
|
48
48
|
email?: string | undefined;
|
|
49
49
|
}, {
|
|
50
|
+
event?: BlueNode | undefined;
|
|
51
|
+
name?: string | undefined;
|
|
50
52
|
path?: string | undefined;
|
|
51
53
|
description?: string | undefined;
|
|
52
|
-
name?: string | undefined;
|
|
53
54
|
order?: number | undefined;
|
|
54
|
-
event?: BlueNode | undefined;
|
|
55
55
|
definition?: BlueNode | undefined;
|
|
56
56
|
timelineId?: string | undefined;
|
|
57
57
|
accountId?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"myos-timeline-channel-processor.d.ts","sourceRoot":"","sources":["../../../src/registry/processors/myos-timeline-channel-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAW/C,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAgB9E,qBAAa,
|
|
1
|
+
{"version":3,"file":"myos-timeline-channel-processor.d.ts","sourceRoot":"","sources":["../../../src/registry/processors/myos-timeline-channel-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAW/C,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAgB9E,qBAAa,4BAA6B,YAAW,gBAAgB,CAAC,mBAAmB,CAAC;IACxF,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IACnC,QAAQ,CAAC,OAAO,4DAAwD;IACxE,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAA6B;IAE5C,OAAO,CACL,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,wBAAwB,GAChC,OAAO;IAmBV,UAAU,CACR,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,wBAAwB,GAChC,QAAQ,GAAG,IAAI,GAAG,SAAS;IAc9B,YAAY,CACV,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,wBAAwB,EACjC,SAAS,EAAE,QAAQ,GAClB,OAAO;CAOX"}
|
|
@@ -27,14 +27,14 @@ export declare class OperationMarkerProcessor implements MarkerProcessor<Operati
|
|
|
27
27
|
name: import('zod').ZodOptional<import('zod').ZodString>;
|
|
28
28
|
order: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
29
29
|
}>>, "strip", import('zod').ZodTypeAny, {
|
|
30
|
-
description?: string | undefined;
|
|
31
30
|
name?: string | undefined;
|
|
31
|
+
description?: string | undefined;
|
|
32
32
|
order?: number | undefined;
|
|
33
33
|
channel?: string | undefined;
|
|
34
34
|
request?: import('@blue-labs/language').BlueNode | undefined;
|
|
35
35
|
}, {
|
|
36
|
-
description?: string | undefined;
|
|
37
36
|
name?: string | undefined;
|
|
37
|
+
description?: string | undefined;
|
|
38
38
|
order?: number | undefined;
|
|
39
39
|
channel?: string | undefined;
|
|
40
40
|
request?: import('@blue-labs/language').BlueNode | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-marker-processor.d.ts","sourceRoot":"","sources":["../../../src/registry/processors/operation-marker-processor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,qBAAa,
|
|
1
|
+
{"version":3,"file":"operation-marker-processor.d.ts","sourceRoot":"","sources":["../../../src/registry/processors/operation-marker-processor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,qBAAa,wBAAyB,YAAW,eAAe,CAAC,eAAe,CAAC;IAC/E,QAAQ,CAAC,IAAI,EAAG,QAAQ,CAAU;IAClC,QAAQ,CAAC,OAAO,4DAA4D;IAC5E,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAyB;CACzC"}
|
|
@@ -48,20 +48,20 @@ export declare class SequentialWorkflowOperationProcessor implements HandlerProc
|
|
|
48
48
|
}>>, {
|
|
49
49
|
steps: import('zod').ZodOptional<import('zod').ZodArray<import('zod').ZodType<import('@blue-labs/language').BlueNode, import('zod').ZodTypeDef, import('@blue-labs/language').BlueNode>, "many">>;
|
|
50
50
|
}>, "strip", import('zod').ZodTypeAny, {
|
|
51
|
-
|
|
51
|
+
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
52
|
+
steps?: import('@blue-labs/language').BlueNode[] | undefined;
|
|
52
53
|
name?: string | undefined;
|
|
54
|
+
description?: string | undefined;
|
|
53
55
|
order?: number | undefined;
|
|
54
|
-
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
55
56
|
channel?: string | undefined;
|
|
56
|
-
steps?: import('@blue-labs/language').BlueNode[] | undefined;
|
|
57
57
|
operation?: string | undefined;
|
|
58
58
|
}, {
|
|
59
|
-
|
|
59
|
+
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
60
|
+
steps?: import('@blue-labs/language').BlueNode[] | undefined;
|
|
60
61
|
name?: string | undefined;
|
|
62
|
+
description?: string | undefined;
|
|
61
63
|
order?: number | undefined;
|
|
62
|
-
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
63
64
|
channel?: string | undefined;
|
|
64
|
-
steps?: import('@blue-labs/language').BlueNode[] | undefined;
|
|
65
65
|
operation?: string | undefined;
|
|
66
66
|
}>;
|
|
67
67
|
private readonly runner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequential-workflow-operation-processor.d.ts","sourceRoot":"","sources":["../../../src/registry/processors/sequential-workflow-operation-processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAKhD,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAGL,KAAK,8BAA8B,EACpC,MAAM,2BAA2B,CAAC;AAUnC,qBAAa,
|
|
1
|
+
{"version":3,"file":"sequential-workflow-operation-processor.d.ts","sourceRoot":"","sources":["../../../src/registry/processors/sequential-workflow-operation-processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAKhD,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAGL,KAAK,8BAA8B,EACpC,MAAM,2BAA2B,CAAC;AAUnC,qBAAa,oCAAqC,YAAW,gBAAgB,CAAC,2BAA2B,CAAC;IACxG,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IACnC,QAAQ,CAAC,OAAO,4DAEL;IACX,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;uBAd0B,CAAC;gBACvC,CAAC;;uBAEmB,CAAC;gBACG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAUwB;IAEpD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;gBAG1C,SAAS,GAAE,SAAS,8BAA8B,EAA2B;IAK/E,aAAa,CACX,QAAQ,EAAE,2BAA2B,EACrC,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI,CAAC;QACX,cAAc,EAAE,mBAAmB,CAAC;KACrC,GACA,MAAM,GAAG,IAAI,GAAG,SAAS;IAuBtB,OAAO,CACX,QAAQ,EAAE,2BAA2B,EACrC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,OAAO,CAAC;IA4Db,OAAO,CACX,QAAQ,EAAE,2BAA2B,EACrC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC;CAYjB"}
|
|
@@ -42,19 +42,19 @@ export declare class SequentialWorkflowHandlerProcessor implements HandlerProces
|
|
|
42
42
|
}>>, {
|
|
43
43
|
steps: import('zod').ZodOptional<import('zod').ZodArray<import('zod').ZodType<import('@blue-labs/language').BlueNode, import('zod').ZodTypeDef, import('@blue-labs/language').BlueNode>, "many">>;
|
|
44
44
|
}>, "strip", import('zod').ZodTypeAny, {
|
|
45
|
-
|
|
45
|
+
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
46
|
+
steps?: import('@blue-labs/language').BlueNode[] | undefined;
|
|
46
47
|
name?: string | undefined;
|
|
48
|
+
description?: string | undefined;
|
|
47
49
|
order?: number | undefined;
|
|
48
|
-
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
49
50
|
channel?: string | undefined;
|
|
50
|
-
steps?: import('@blue-labs/language').BlueNode[] | undefined;
|
|
51
51
|
}, {
|
|
52
|
-
|
|
52
|
+
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
53
|
+
steps?: import('@blue-labs/language').BlueNode[] | undefined;
|
|
53
54
|
name?: string | undefined;
|
|
55
|
+
description?: string | undefined;
|
|
54
56
|
order?: number | undefined;
|
|
55
|
-
event?: import('@blue-labs/language').BlueNode | undefined;
|
|
56
57
|
channel?: string | undefined;
|
|
57
|
-
steps?: import('@blue-labs/language').BlueNode[] | undefined;
|
|
58
58
|
}>;
|
|
59
59
|
private readonly runner;
|
|
60
60
|
constructor(executors?: readonly SequentialWorkflowStepExecutor[]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequential-workflow-processor.d.ts","sourceRoot":"","sources":["../../../src/registry/processors/sequential-workflow-processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAGL,KAAK,8BAA8B,EACpC,MAAM,2BAA2B,CAAC;AAEnC,qBAAa,
|
|
1
|
+
{"version":3,"file":"sequential-workflow-processor.d.ts","sourceRoot":"","sources":["../../../src/registry/processors/sequential-workflow-processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAGL,KAAK,8BAA8B,EACpC,MAAM,2BAA2B,CAAC;AAEnC,qBAAa,kCAAmC,YAAW,gBAAgB,CAAC,kBAAkB,CAAC;IAC7F,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IACnC,QAAQ,CAAC,OAAO,4DAEL;IACX,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;uBAK0B,CAAC;gBAAkC,CAAC;;uBAEvC,CAAC;gBAIrC,CAAH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAX4C;IAE3C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;gBAG1C,SAAS,GAAE,SAAS,8BAA8B,EAA2B;IAKzE,OAAO,CACX,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,OAAO,CAAC;IAcb,OAAO,CACX,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC;CAQjB"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { SequentialWorkflowStepExecutor, StepExecutionArgs } from '../workflow/step-runner.js';
|
|
2
|
+
interface JavaScriptCodeStepExecutorOptions {
|
|
3
|
+
readonly wasmGasLimit?: bigint | number;
|
|
4
|
+
}
|
|
2
5
|
export declare class JavaScriptCodeStepExecutor implements SequentialWorkflowStepExecutor {
|
|
3
6
|
readonly supportedBlueIds: readonly ["3hYcmWMtMUPAzXBLFLb7BpuG9537tuTJPCr7pxWXvTZK"];
|
|
4
7
|
private readonly evaluator;
|
|
8
|
+
private readonly wasmGasLimit;
|
|
9
|
+
constructor(options?: JavaScriptCodeStepExecutorOptions);
|
|
5
10
|
execute(args: StepExecutionArgs): Promise<unknown>;
|
|
6
11
|
private handleEvents;
|
|
7
12
|
}
|
|
13
|
+
export {};
|
|
8
14
|
//# sourceMappingURL=javascript-code-step-executor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"javascript-code-step-executor.d.ts","sourceRoot":"","sources":["../../../../src/registry/processors/steps/javascript-code-step-executor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,8BAA8B,EAC9B,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"javascript-code-step-executor.d.ts","sourceRoot":"","sources":["../../../../src/registry/processors/steps/javascript-code-step-executor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,8BAA8B,EAC9B,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AASpC,UAAU,iCAAiC;IACzC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzC;AAED,qBAAa,0BAA2B,YAAW,8BAA8B;IAC/E,QAAQ,CAAC,gBAAgB,4DAEd;IAEX,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0B;IACpD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAkB;gBAEnC,OAAO,GAAE,iCAAsC;IAIrD,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAqCxD,OAAO,CAAC,YAAY;CAgBrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-event-step-executor.d.ts","sourceRoot":"","sources":["../../../../src/registry/processors/steps/trigger-event-step-executor.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,8BAA8B,EAC9B,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AAOpC,qBAAa,
|
|
1
|
+
{"version":3,"file":"trigger-event-step-executor.d.ts","sourceRoot":"","sources":["../../../../src/registry/processors/steps/trigger-event-step-executor.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,8BAA8B,EAC9B,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AAOpC,qBAAa,wBAAyB,YAAW,8BAA8B;IAC7E,QAAQ,CAAC,gBAAgB,4DAEd;IAEX,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0B;IAE9C,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;CAiCzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-document-step-executor.d.ts","sourceRoot":"","sources":["../../../../src/registry/processors/steps/update-document-step-executor.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,8BAA8B,EAC9B,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AAWpC,qBAAa,
|
|
1
|
+
{"version":3,"file":"update-document-step-executor.d.ts","sourceRoot":"","sources":["../../../../src/registry/processors/steps/update-document-step-executor.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,8BAA8B,EAC9B,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AAWpC,qBAAa,0BAA2B,YAAW,8BAA8B;IAC/E,QAAQ,CAAC,gBAAgB,4DAEd;IAEX,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0B;IAE9C,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IA4BxD,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,kBAAkB;IAgB1B,OAAO,CAAC,aAAa;CAetB"}
|
|
@@ -32,19 +32,19 @@ export declare class TimelineChannelProcessor implements ChannelProcessor<Timeli
|
|
|
32
32
|
path: import('zod').ZodOptional<import('zod').ZodString>;
|
|
33
33
|
definition: import('zod').ZodOptional<import('zod').ZodType<BlueNode, import('zod').ZodTypeDef, BlueNode>>;
|
|
34
34
|
}>>, "strip", import('zod').ZodTypeAny, {
|
|
35
|
+
event?: BlueNode | undefined;
|
|
36
|
+
name?: string | undefined;
|
|
35
37
|
path?: string | undefined;
|
|
36
38
|
description?: string | undefined;
|
|
37
|
-
name?: string | undefined;
|
|
38
39
|
order?: number | undefined;
|
|
39
|
-
event?: BlueNode | undefined;
|
|
40
40
|
definition?: BlueNode | undefined;
|
|
41
41
|
timelineId?: string | undefined;
|
|
42
42
|
}, {
|
|
43
|
+
event?: BlueNode | undefined;
|
|
44
|
+
name?: string | undefined;
|
|
43
45
|
path?: string | undefined;
|
|
44
46
|
description?: string | undefined;
|
|
45
|
-
name?: string | undefined;
|
|
46
47
|
order?: number | undefined;
|
|
47
|
-
event?: BlueNode | undefined;
|
|
48
48
|
definition?: BlueNode | undefined;
|
|
49
49
|
timelineId?: string | undefined;
|
|
50
50
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-channel-processor.d.ts","sourceRoot":"","sources":["../../../src/registry/processors/timeline-channel-processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI/C,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAG9B,qBAAa,
|
|
1
|
+
{"version":3,"file":"timeline-channel-processor.d.ts","sourceRoot":"","sources":["../../../src/registry/processors/timeline-channel-processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI/C,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAG9B,qBAAa,wBAAyB,YAAW,gBAAgB,CAAC,eAAe,CAAC;IAChF,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IACnC,QAAQ,CAAC,OAAO,4DAAuD;IACvE,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAyB;IAExC,OAAO,CACL,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,wBAAwB,GAChC,OAAO;IAkBV,UAAU,CACR,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,wBAAwB,GAChC,QAAQ,GAAG,IAAI,GAAG,SAAS;IAQ9B,YAAY,CACV,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,wBAAwB,EACjC,SAAS,EAAE,QAAQ,GAClB,OAAO;CAOX"}
|
package/dist/registry/types.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { BlueNode, Blue } from '@blue-labs/language';
|
|
|
3
3
|
import { ScopeContractsIndex } from '../types/scope-contracts.js';
|
|
4
4
|
import { JsonPatch } from '../model/shared/json-patch.js';
|
|
5
5
|
import { MarkerContract } from '../model/index.js';
|
|
6
|
+
import { ChannelContractEntry } from '../types/channel-contract-entry.js';
|
|
6
7
|
import { GasMeter } from '../runtime/gas-meter.js';
|
|
7
8
|
export type ContractProcessorKind = 'handler' | 'channel' | 'marker';
|
|
8
9
|
export interface ContractProcessor<TContract> {
|
|
@@ -53,6 +54,26 @@ export interface ChannelEvaluationContext {
|
|
|
53
54
|
* Key assigned to the contract within the scope's contract map.
|
|
54
55
|
*/
|
|
55
56
|
readonly bindingKey: string;
|
|
57
|
+
/**
|
|
58
|
+
* Optional resolver for channel contracts within the same scope.
|
|
59
|
+
*/
|
|
60
|
+
readonly resolveChannel?: (key: string) => ChannelContractEntry | null;
|
|
61
|
+
/**
|
|
62
|
+
* Optional lookup for channel processors by BlueId.
|
|
63
|
+
*/
|
|
64
|
+
readonly channelProcessorFor?: (blueId: string) => ChannelProcessor<unknown> | null;
|
|
65
|
+
}
|
|
66
|
+
export interface ChannelDelivery {
|
|
67
|
+
readonly eventNode: BlueNode;
|
|
68
|
+
readonly eventId?: string | null;
|
|
69
|
+
readonly checkpointKey?: string | null;
|
|
70
|
+
readonly shouldProcess?: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface ChannelMatch {
|
|
73
|
+
readonly matches: boolean;
|
|
74
|
+
readonly eventId?: string | null;
|
|
75
|
+
readonly eventNode?: BlueNode | null;
|
|
76
|
+
readonly deliveries?: readonly ChannelDelivery[];
|
|
56
77
|
}
|
|
57
78
|
export interface ChannelProcessor<TContract> extends ContractProcessor<TContract> {
|
|
58
79
|
readonly kind: 'channel';
|
|
@@ -63,6 +84,11 @@ export interface ChannelProcessor<TContract> extends ContractProcessor<TContract
|
|
|
63
84
|
* checkpoint signatures and storage from the original external event.
|
|
64
85
|
*/
|
|
65
86
|
channelize?(contract: TContract, context: ChannelEvaluationContext): BlueNode | null | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Optional: Provide custom evaluation details, including multi-delivery
|
|
89
|
+
* channel matches.
|
|
90
|
+
*/
|
|
91
|
+
evaluate?(contract: TContract, context: ChannelEvaluationContext): ChannelMatch | Promise<ChannelMatch>;
|
|
66
92
|
/**
|
|
67
93
|
* Optional: Determine whether an event should be processed relative to the
|
|
68
94
|
* last checkpointed event for this channel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAErE,MAAM,WAAW,iBAAiB,CAAC,SAAS;IAC1C,QAAQ,CAAC,IAAI,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CAAC;CACzB;AAED,MAAM,MAAM,oBAAoB,GAC5B,gBAAgB,CAAC,OAAO,CAAC,GACzB,gBAAgB,CAAC,OAAO,CAAC,GACzB,eAAe,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
export declare function ceil100(n: number): number;
|
|
2
2
|
export declare function utf8(text: string): number;
|
|
3
3
|
export declare function pointerDepth(absPointer: string): number;
|
|
4
|
-
export declare function jsCodeBaseAmount(code: string): number;
|
|
5
4
|
export declare function updateDocumentBaseAmount(changesetLength: number): number;
|
|
6
|
-
export declare function expressionAmount(expression: string): number;
|
|
7
|
-
export declare function templateAmount(placeholderCount: number, template: string): number;
|
|
8
5
|
export declare function documentSnapshotAmount(absPointer: string, snapshotBytes: number): number;
|
|
9
6
|
//# sourceMappingURL=gas-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gas-helpers.d.ts","sourceRoot":"","sources":["../../src/runtime/gas-helpers.ts"],"names":[],"mappings":"AAEA,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED,wBAAgB,
|
|
1
|
+
{"version":3,"file":"gas-helpers.d.ts","sourceRoot":"","sources":["../../src/runtime/gas-helpers.ts"],"names":[],"mappings":"AAEA,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,GACpB,MAAM,CAER"}
|
|
@@ -20,12 +20,10 @@ export declare class GasMeter {
|
|
|
20
20
|
chargeTerminationMarker(): void;
|
|
21
21
|
chargeLifecycleDelivery(): void;
|
|
22
22
|
chargeFatalTerminationOverhead(): void;
|
|
23
|
-
chargeJavaScriptCodeBase(code: string): void;
|
|
24
23
|
chargeTriggerEventBase(): void;
|
|
25
24
|
chargeUpdateDocumentBase(changesLen: number): void;
|
|
26
|
-
chargeExpression(expression: string): void;
|
|
27
|
-
chargeTemplate(placeholderCount: number, template: string): void;
|
|
28
25
|
chargeDocumentSnapshot(absPointer: string, snapshot: BlueNode | null | undefined): void;
|
|
26
|
+
chargeWasmGas(amount: bigint | number): void;
|
|
29
27
|
private payloadSizeCharge;
|
|
30
28
|
private scopeDepth;
|
|
31
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gas-meter.d.ts","sourceRoot":"","sources":["../../src/runtime/gas-meter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"gas-meter.d.ts","sourceRoot":"","sources":["../../src/runtime/gas-meter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAuCrD,qBAAa,QAAQ;IAGP,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,KAAK,CAAK;gBAEW,IAAI,EAAE,IAAI;IAEvC,QAAQ,IAAI,MAAM;IAIlB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIzB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIzC,oBAAoB,IAAI,IAAI;IAI5B,yBAAyB,IAAI,IAAI;IAIjC,qBAAqB,IAAI,IAAI;IAI7B,mBAAmB,IAAI,IAAI;IAI3B,uBAAuB,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI;IAIjE,iBAAiB,IAAI,IAAI;IAIzB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAM9C,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI;IAIzD,YAAY,IAAI,IAAI;IAIpB,gBAAgB,IAAI,IAAI;IAIxB,sBAAsB,IAAI,IAAI;IAI9B,uBAAuB,IAAI,IAAI;IAI/B,uBAAuB,IAAI,IAAI;IAI/B,8BAA8B,IAAI,IAAI;IAItC,sBAAsB,IAAI,IAAI;IAI9B,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAIlD,sBAAsB,CACpB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GACpC,IAAI;IAKP,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAO5C,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,UAAU;CAanB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const WASM_FUEL_PER_HOST_GAS_UNIT = 1700;
|
|
2
|
+
export declare const DEFAULT_JS_STEP_HOST_GAS_LIMIT = 40000;
|
|
3
|
+
export declare const DEFAULT_EXPRESSION_HOST_GAS_LIMIT = 40000;
|
|
4
|
+
export declare function wasmFuelToHostGas(amount: bigint | number): number;
|
|
5
|
+
export declare function hostGasToWasmFuel(amount: number | bigint): bigint;
|
|
6
|
+
export declare const DEFAULT_WASM_GAS_LIMIT: bigint;
|
|
7
|
+
export declare const DEFAULT_EXPRESSION_WASM_GAS_LIMIT: bigint;
|
|
8
|
+
//# sourceMappingURL=gas-schedule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gas-schedule.d.ts","sourceRoot":"","sources":["../../src/runtime/gas-schedule.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,2BAA2B,OAAuC,CAAC;AAEhF,eAAO,MAAM,8BAA8B,QAAS,CAAC;AACrD,eAAO,MAAM,iCAAiC,QAAS,CAAC;AAExD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAuBjE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CASjE;AAED,eAAO,MAAM,sBAAsB,QAElC,CAAC;AAEF,eAAO,MAAM,iCAAiC,QAE7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blue.d.ts","sourceRoot":"","sources":["../../src/test-support/blue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"blue.d.ts","sourceRoot":"","sources":["../../src/test-support/blue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AAqEvD,wBAAgB,UAAU,IAAI,IAAI,CAKjC;AAED,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;CAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel-contract-entry.d.ts","sourceRoot":"","sources":["../../src/types/channel-contract-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler-contract-entry.d.ts","sourceRoot":"","sources":["../../src/types/handler-contract-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marker-contract-entry.d.ts","sourceRoot":"","sources":["../../src/types/marker-contract-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quickjs-config.d.ts","sourceRoot":"","sources":["../../../src/util/expression/quickjs-config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,iCAAiC,EACjC,8BAA8B,EAC9B,iCAAiC,EACjC,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,+BAA+B,CAAC"}
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
+
type DocumentBinding = ((pointer?: unknown) => unknown) & {
|
|
2
|
+
canonical?: (pointer?: unknown) => unknown;
|
|
3
|
+
};
|
|
4
|
+
type EmitBinding = (value: unknown) => unknown;
|
|
1
5
|
export interface QuickJSBindings {
|
|
2
|
-
readonly
|
|
6
|
+
readonly event?: unknown;
|
|
7
|
+
readonly eventCanonical?: unknown;
|
|
8
|
+
readonly steps?: unknown;
|
|
9
|
+
readonly document?: DocumentBinding;
|
|
10
|
+
readonly emit?: EmitBinding;
|
|
3
11
|
}
|
|
4
12
|
export interface QuickJSEvaluationOptions {
|
|
5
13
|
readonly code: string;
|
|
6
14
|
readonly bindings?: QuickJSBindings;
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
15
|
+
readonly wasmGasLimit?: bigint | number;
|
|
16
|
+
readonly onWasmGasUsed?: (usage: {
|
|
17
|
+
used: bigint;
|
|
18
|
+
remaining: bigint;
|
|
19
|
+
}) => void;
|
|
9
20
|
}
|
|
10
21
|
export declare class QuickJSEvaluator {
|
|
11
|
-
private
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
|
|
22
|
+
private evaluationQueue;
|
|
23
|
+
private readonly handlerState;
|
|
24
|
+
private readonly handlers;
|
|
25
|
+
evaluate(options: QuickJSEvaluationOptions): Promise<unknown>;
|
|
26
|
+
private evaluateOnce;
|
|
27
|
+
private prepareBindings;
|
|
28
|
+
private extractDocumentBinding;
|
|
29
|
+
private extractEmitBinding;
|
|
15
30
|
private wrapCode;
|
|
16
|
-
private installConsole;
|
|
17
|
-
private installDeterministicGlobals;
|
|
18
|
-
private installCanonNamespace;
|
|
19
|
-
private installBindings;
|
|
20
|
-
private createFunctionHandle;
|
|
21
|
-
/**
|
|
22
|
-
* Copies enumerable properties from a host function onto the QuickJS handle.
|
|
23
|
-
* Nested functions (e.g. `document.canonical = () => {}`) are recursively wrapped
|
|
24
|
-
* so they stay callable inside QuickJS; plain values are serialized via
|
|
25
|
-
* `createOwnedHandle`. This preserves helper namespaces on binding functions.
|
|
26
|
-
*/
|
|
27
|
-
private applyFunctionProperties;
|
|
28
|
-
private createOwnedHandle;
|
|
29
|
-
private createReturnHandle;
|
|
30
|
-
private resolveHandle;
|
|
31
31
|
}
|
|
32
|
+
export {};
|
|
32
33
|
//# sourceMappingURL=quickjs-evaluator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quickjs-evaluator.d.ts","sourceRoot":"","sources":["../../../src/util/expression/quickjs-evaluator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"quickjs-evaluator.d.ts","sourceRoot":"","sources":["../../../src/util/expression/quickjs-evaluator.ts"],"names":[],"mappings":"AAYA,KAAK,eAA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ue-labs/language';
|
|
2
2
|
import { ContractProcessorContext } from '../../registry/types.js';
|
|
3
|
-
import { QuickJSEvaluator, QuickJSBindings } from './quickjs-evaluator.js';
|
|
3
|
+
import { QuickJSEvaluator, QuickJSBindings, QuickJSEvaluationOptions } from './quickjs-evaluator.js';
|
|
4
4
|
export declare function isExpression(value: unknown): value is string;
|
|
5
5
|
export declare function containsExpression(value: unknown): value is string;
|
|
6
6
|
export declare function extractExpressionContent(expression: string): string;
|
|
7
|
-
export declare function evaluateQuickJSExpression(evaluator: QuickJSEvaluator, expression: string, bindings: QuickJSBindings): Promise<unknown>;
|
|
8
|
-
export declare function resolveTemplateString(evaluator: QuickJSEvaluator, template: string, bindings: QuickJSBindings): Promise<string>;
|
|
7
|
+
export declare function evaluateQuickJSExpression(evaluator: QuickJSEvaluator, expression: string, bindings: QuickJSBindings, wasmGasLimit?: bigint | number, onWasmGasUsed?: QuickJSEvaluationOptions['onWasmGasUsed']): Promise<unknown>;
|
|
8
|
+
export declare function resolveTemplateString(evaluator: QuickJSEvaluator, template: string, bindings: QuickJSBindings, wasmGasLimit?: bigint | number, onWasmGasUsed?: QuickJSEvaluationOptions['onWasmGasUsed']): Promise<string>;
|
|
9
9
|
export type ExpressionResolverPredicate = (pointer: string) => boolean;
|
|
10
10
|
export type ExpressionTraversalPredicate = (pointer: string, node: BlueNode) => boolean;
|
|
11
11
|
export type PicomatchShouldResolveOptions = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quickjs-expression-utils.d.ts","sourceRoot":"","sources":["../../../src/util/expression/quickjs-expression-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAGxE,OAAO,
|
|
1
|
+
{"version":3,"file":"quickjs-expression-utils.d.ts","sourceRoot":"","sources":["../../../src/util/expression/quickjs-expression-utils.ts"],"names":[],"mappings":"A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AO,CAAC;QACd,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,eAAe,CAAC;IAC1B,aAAa,EAAE,2BAA2B,CAAC;IAC3C,aAAa,CAAC,EAAE,4BAA4B,CAAC;IAC7C,OAAO,EAAE,wBAAwB,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,EAC3C,OAAO,EACP,OAAY,EACZ,OAAO,GACR,EAAE,6BAA6B,GAAG,2BAA2B,CAe7D;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,QAAQ,CAAC,CAgFnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blue-labs/document-processor",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -19,10 +19,12 @@
|
|
|
19
19
|
"!dist/package.json"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"
|
|
23
|
-
"@blue-labs/
|
|
24
|
-
"@blue-
|
|
25
|
-
"quickjs
|
|
22
|
+
"@blue-labs/language": "3.2.0",
|
|
23
|
+
"@blue-labs/shared-utils": "3.2.0",
|
|
24
|
+
"@blue-quickjs/abi-manifest": "0.2.4",
|
|
25
|
+
"@blue-quickjs/dv": "0.2.4",
|
|
26
|
+
"@blue-quickjs/quickjs-runtime": "0.2.4",
|
|
27
|
+
"picomatch": "4.0.3"
|
|
26
28
|
},
|
|
27
29
|
"license": "MIT",
|
|
28
30
|
"publishConfig": {
|
|
@@ -33,7 +35,7 @@
|
|
|
33
35
|
"url": "git+https://github.com/bluecontract/blue-js.git"
|
|
34
36
|
},
|
|
35
37
|
"peerDependencies": {
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
+
"@blue-repository/types": ">=0.1.0 <1",
|
|
39
|
+
"zod": "^3.20.0"
|
|
38
40
|
}
|
|
39
41
|
}
|