@blue-labs/document-processor 1.37.3 → 2.0.0-rc.1
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/document-processor.d.ts +38 -0
- package/dist/api/document-processor.d.ts.map +1 -0
- package/dist/constants/processor-contract-constants.d.ts +24 -0
- package/dist/constants/processor-contract-constants.d.ts.map +1 -0
- package/dist/constants/processor-pointer-constants.d.ts +21 -0
- package/dist/constants/processor-pointer-constants.d.ts.map +1 -0
- package/dist/engine/boundary-violation-exception.d.ts +4 -0
- package/dist/engine/boundary-violation-exception.d.ts.map +1 -0
- package/dist/engine/channel-runner.d.ts +27 -0
- package/dist/engine/channel-runner.d.ts.map +1 -0
- package/dist/engine/checkpoint-manager.d.ts +23 -0
- package/dist/engine/checkpoint-manager.d.ts.map +1 -0
- package/dist/engine/contract-bundle.d.ts +70 -0
- package/dist/engine/contract-bundle.d.ts.map +1 -0
- package/dist/engine/contract-loader.d.ts +17 -0
- package/dist/engine/contract-loader.d.ts.map +1 -0
- package/dist/engine/handler-registration-service.d.ts +27 -0
- package/dist/engine/handler-registration-service.d.ts.map +1 -0
- package/dist/engine/illegal-state-exception.d.ts +5 -0
- package/dist/engine/illegal-state-exception.d.ts.map +1 -0
- package/dist/engine/index.d.ts +11 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/must-understand-failure.d.ts +4 -0
- package/dist/engine/must-understand-failure.d.ts.map +1 -0
- package/dist/engine/processor-engine.d.ts +66 -0
- package/dist/engine/processor-engine.d.ts.map +1 -0
- package/dist/engine/processor-execution-context.d.ts +38 -0
- package/dist/engine/processor-execution-context.d.ts.map +1 -0
- package/dist/engine/processor-fatal-error.d.ts +6 -0
- package/dist/engine/processor-fatal-error.d.ts.map +1 -0
- package/dist/engine/run-termination-error.d.ts +5 -0
- package/dist/engine/run-termination-error.d.ts.map +1 -0
- package/dist/engine/scope-executor.d.ts +60 -0
- package/dist/engine/scope-executor.d.ts.map +1 -0
- package/dist/engine/termination-service.d.ts +17 -0
- package/dist/engine/termination-service.d.ts.map +1 -0
- package/dist/index.d.ts +14 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3176 -9
- package/dist/merge/index.d.ts +2 -2
- package/dist/merge/index.d.ts.map +1 -1
- package/dist/merge/processors/index.d.ts +1 -1
- package/dist/merge/processors/index.d.ts.map +1 -1
- package/dist/model/channels/document-update-channel.d.ts +41 -0
- package/dist/model/channels/document-update-channel.d.ts.map +1 -0
- package/dist/model/channels/embedded-node-channel.d.ts +43 -0
- package/dist/model/channels/embedded-node-channel.d.ts.map +1 -0
- package/dist/model/channels/index.d.ts +7 -0
- package/dist/model/channels/index.d.ts.map +1 -0
- package/dist/model/channels/lifecycle-channel.d.ts +40 -0
- package/dist/model/channels/lifecycle-channel.d.ts.map +1 -0
- package/dist/model/channels/myos-timeline-channel.d.ts +52 -0
- package/dist/model/channels/myos-timeline-channel.d.ts.map +1 -0
- package/dist/model/channels/timeline-channel.d.ts +43 -0
- package/dist/model/channels/timeline-channel.d.ts.map +1 -0
- package/dist/model/channels/triggered-event-channel.d.ts +40 -0
- package/dist/model/channels/triggered-event-channel.d.ts.map +1 -0
- package/dist/model/events/document-update.d.ts +15 -0
- package/dist/model/events/document-update.d.ts.map +1 -0
- package/dist/model/handlers/index.d.ts +3 -0
- package/dist/model/handlers/index.d.ts.map +1 -0
- package/dist/model/handlers/sequential-workflow-operation.d.ts +61 -0
- package/dist/model/handlers/sequential-workflow-operation.d.ts.map +1 -0
- package/dist/model/handlers/sequential-workflow.d.ts +57 -0
- package/dist/model/handlers/sequential-workflow.d.ts.map +1 -0
- package/dist/model/index.d.ts +6 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/markers/channel-event-checkpoint.d.ts +40 -0
- package/dist/model/markers/channel-event-checkpoint.d.ts.map +1 -0
- package/dist/model/markers/index.d.ts +6 -0
- package/dist/model/markers/index.d.ts.map +1 -0
- package/dist/model/markers/initialization-marker.d.ts +36 -0
- package/dist/model/markers/initialization-marker.d.ts.map +1 -0
- package/dist/model/markers/operation.d.ts +39 -0
- package/dist/model/markers/operation.d.ts.map +1 -0
- package/dist/model/markers/process-embedded.d.ts +36 -0
- package/dist/model/markers/process-embedded.d.ts.map +1 -0
- package/dist/model/markers/processing-terminated-marker.d.ts +39 -0
- package/dist/model/markers/processing-terminated-marker.d.ts.map +1 -0
- package/dist/model/shared/channel-contract-base.d.ts +30 -0
- package/dist/model/shared/channel-contract-base.d.ts.map +1 -0
- package/dist/model/shared/contract-base.d.ts +16 -0
- package/dist/model/shared/contract-base.d.ts.map +1 -0
- package/dist/model/shared/handler-contract-base.d.ts +29 -0
- package/dist/model/shared/handler-contract-base.d.ts.map +1 -0
- package/dist/model/shared/index.d.ts +6 -0
- package/dist/model/shared/index.d.ts.map +1 -0
- package/dist/model/shared/json-patch.d.ts +24 -0
- package/dist/model/shared/json-patch.d.ts.map +1 -0
- package/dist/model/shared/marker-contract-base.d.ts +23 -0
- package/dist/model/shared/marker-contract-base.d.ts.map +1 -0
- package/dist/model/types.d.ts +13 -0
- package/dist/model/types.d.ts.map +1 -0
- package/dist/registry/contract-processor-registry-builder.d.ts +11 -0
- package/dist/registry/contract-processor-registry-builder.d.ts.map +1 -0
- package/dist/registry/contract-processor-registry.d.ts +17 -0
- package/dist/registry/contract-processor-registry.d.ts.map +1 -0
- package/dist/registry/index.d.ts +4 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/processors/myos-timeline-channel-processor.d.ts +59 -0
- package/dist/registry/processors/myos-timeline-channel-processor.d.ts.map +1 -0
- package/dist/registry/processors/operation-marker-processor.d.ts +43 -0
- package/dist/registry/processors/operation-marker-processor.d.ts.map +1 -0
- package/dist/registry/processors/sequential-workflow-operation-processor.d.ts +76 -0
- package/dist/registry/processors/sequential-workflow-operation-processor.d.ts.map +1 -0
- package/dist/registry/processors/sequential-workflow-processor.d.ts +64 -0
- package/dist/registry/processors/sequential-workflow-processor.d.ts.map +1 -0
- package/dist/registry/processors/steps/javascript-code-step-executor.d.ts +8 -0
- package/dist/registry/processors/steps/javascript-code-step-executor.d.ts.map +1 -0
- package/dist/registry/processors/steps/quickjs-step-bindings.d.ts +4 -0
- package/dist/registry/processors/steps/quickjs-step-bindings.d.ts.map +1 -0
- package/dist/registry/processors/steps/trigger-event-step-executor.d.ts +7 -0
- package/dist/registry/processors/steps/trigger-event-step-executor.d.ts.map +1 -0
- package/dist/registry/processors/steps/update-document-step-executor.d.ts +11 -0
- package/dist/registry/processors/steps/update-document-step-executor.d.ts.map +1 -0
- package/dist/registry/processors/timeline-channel-processor.d.ts +50 -0
- package/dist/registry/processors/timeline-channel-processor.d.ts.map +1 -0
- package/dist/registry/processors/utils/operation-utils.d.ts +6 -0
- package/dist/registry/processors/utils/operation-utils.d.ts.map +1 -0
- package/dist/registry/processors/workflow/operation-matcher.d.ts +17 -0
- package/dist/registry/processors/workflow/operation-matcher.d.ts.map +1 -0
- package/dist/registry/processors/workflow/step-runner.d.ts +28 -0
- package/dist/registry/processors/workflow/step-runner.d.ts.map +1 -0
- package/dist/registry/types.d.ts +71 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/runtime/document-processing-runtime.d.ts +31 -0
- package/dist/runtime/document-processing-runtime.d.ts.map +1 -0
- package/dist/runtime/emission-registry.d.ts +14 -0
- package/dist/runtime/emission-registry.d.ts.map +1 -0
- package/dist/runtime/gas-helpers.d.ts +9 -0
- package/dist/runtime/gas-helpers.d.ts.map +1 -0
- package/dist/runtime/gas-meter.d.ts +32 -0
- package/dist/runtime/gas-meter.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +6 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/patch-engine.d.ts +28 -0
- package/dist/runtime/patch-engine.d.ts.map +1 -0
- package/dist/runtime/scope-runtime-context.d.ts +31 -0
- package/dist/runtime/scope-runtime-context.d.ts.map +1 -0
- package/dist/test-support/blue.d.ts +27 -0
- package/dist/test-support/blue.d.ts.map +1 -0
- package/dist/test-support/workflow.d.ts +18 -0
- package/dist/test-support/workflow.d.ts.map +1 -0
- package/dist/types/document-processing-result.d.ts +13 -0
- package/dist/types/document-processing-result.d.ts.map +1 -0
- package/dist/types/errors.d.ts +42 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/result.d.ts +23 -0
- package/dist/types/result.d.ts.map +1 -0
- package/dist/types/scope-contracts.d.ts +7 -0
- package/dist/types/scope-contracts.d.ts.map +1 -0
- package/dist/util/expression/exceptions.d.ts +6 -0
- package/dist/util/expression/exceptions.d.ts.map +1 -0
- package/dist/util/expression/quickjs-evaluator.d.ts +23 -0
- package/dist/util/expression/quickjs-evaluator.d.ts.map +1 -0
- package/dist/util/expression/quickjs-expression-utils.d.ts +29 -0
- package/dist/util/expression/quickjs-expression-utils.d.ts.map +1 -0
- package/dist/util/node-canonicalizer.d.ts +4 -0
- package/dist/util/node-canonicalizer.d.ts.map +1 -0
- package/dist/util/pointer-utils.d.ts +7 -0
- package/dist/util/pointer-utils.d.ts.map +1 -0
- package/package.json +21 -19
- package/dist/BlueDocumentProcessor.d.ts +0 -50
- package/dist/BlueDocumentProcessor.d.ts.map +0 -1
- package/dist/config.d.ts +0 -3
- package/dist/config.d.ts.map +0 -1
- package/dist/context.d.ts +0 -21
- package/dist/context.d.ts.map +0 -1
- package/dist/index.mjs +0 -1657
- package/dist/processors/BaseChannelProcessor.d.ts +0 -22
- package/dist/processors/BaseChannelProcessor.d.ts.map +0 -1
- package/dist/processors/ChannelEventCheckpointProcessor.d.ts +0 -13
- package/dist/processors/ChannelEventCheckpointProcessor.d.ts.map +0 -1
- package/dist/processors/CompositeTimelineChannelProcessor.d.ts +0 -9
- package/dist/processors/CompositeTimelineChannelProcessor.d.ts.map +0 -1
- package/dist/processors/DocumentUpdateChannelProcessor.d.ts +0 -9
- package/dist/processors/DocumentUpdateChannelProcessor.d.ts.map +0 -1
- package/dist/processors/EmbeddedNodeChannelProcessor.d.ts +0 -9
- package/dist/processors/EmbeddedNodeChannelProcessor.d.ts.map +0 -1
- package/dist/processors/InitializedMarkerProcessor.d.ts +0 -9
- package/dist/processors/InitializedMarkerProcessor.d.ts.map +0 -1
- package/dist/processors/LifecycleEventChannelProcessor.d.ts +0 -33
- package/dist/processors/LifecycleEventChannelProcessor.d.ts.map +0 -1
- package/dist/processors/MyOSAgentChannelProcessor.d.ts +0 -60
- package/dist/processors/MyOSAgentChannelProcessor.d.ts.map +0 -1
- package/dist/processors/MyOSTimelineChannelProcessor.d.ts +0 -9
- package/dist/processors/MyOSTimelineChannelProcessor.d.ts.map +0 -1
- package/dist/processors/OperationProcessor.d.ts +0 -13
- package/dist/processors/OperationProcessor.d.ts.map +0 -1
- package/dist/processors/ProcessEmbeddedProcessor.d.ts +0 -9
- package/dist/processors/ProcessEmbeddedProcessor.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowOperationProcessor.d.ts +0 -12
- package/dist/processors/SequentialWorkflowOperationProcessor.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/SequentialWorkflowProcessor.d.ts +0 -19
- package/dist/processors/SequentialWorkflowProcessor/SequentialWorkflowProcessor.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/index.d.ts +0 -2
- package/dist/processors/SequentialWorkflowProcessor/index.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/steps/JavaScriptCodeExecutor.d.ts +0 -8
- package/dist/processors/SequentialWorkflowProcessor/steps/JavaScriptCodeExecutor.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/steps/TriggerEventExecutor.d.ts +0 -8
- package/dist/processors/SequentialWorkflowProcessor/steps/TriggerEventExecutor.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/steps/UpdateDocumentExecutor.d.ts +0 -14
- package/dist/processors/SequentialWorkflowProcessor/steps/UpdateDocumentExecutor.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/types.d.ts +0 -7
- package/dist/processors/SequentialWorkflowProcessor/types.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/utils/BindingsFactory.d.ts +0 -12
- package/dist/processors/SequentialWorkflowProcessor/utils/BindingsFactory.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/utils/ExpressionEvaluator.d.ts +0 -61
- package/dist/processors/SequentialWorkflowProcessor/utils/ExpressionEvaluator.d.ts.map +0 -1
- package/dist/processors/SequentialWorkflowProcessor/utils/ExpressionResolver.d.ts +0 -8
- package/dist/processors/SequentialWorkflowProcessor/utils/ExpressionResolver.d.ts.map +0 -1
- package/dist/processors/TimelineChannelProcessor.d.ts +0 -9
- package/dist/processors/TimelineChannelProcessor.d.ts.map +0 -1
- package/dist/processors/TriggeredEventChannelProcessor.d.ts +0 -12
- package/dist/processors/TriggeredEventChannelProcessor.d.ts.map +0 -1
- package/dist/processors/index.d.ts +0 -15
- package/dist/processors/index.d.ts.map +0 -1
- package/dist/queue/TaskKey.d.ts +0 -22
- package/dist/queue/TaskKey.d.ts.map +0 -1
- package/dist/queue/TaskQueue.d.ts +0 -31
- package/dist/queue/TaskQueue.d.ts.map +0 -1
- package/dist/registry/ContractRegistry.d.ts +0 -47
- package/dist/registry/ContractRegistry.d.ts.map +0 -1
- package/dist/routing/EventRouter.d.ts +0 -51
- package/dist/routing/EventRouter.d.ts.map +0 -1
- package/dist/routing/buildContractEntries.d.ts +0 -3
- package/dist/routing/buildContractEntries.d.ts.map +0 -1
- package/dist/testUtils.d.ts +0 -15
- package/dist/testUtils.d.ts.map +0 -1
- package/dist/types.d.ts +0 -84
- package/dist/types.d.ts.map +0 -1
- package/dist/utils/CheckpointCache.d.ts +0 -10
- package/dist/utils/CheckpointCache.d.ts.map +0 -1
- package/dist/utils/EventTraceManager.d.ts +0 -47
- package/dist/utils/EventTraceManager.d.ts.map +0 -1
- package/dist/utils/TinyQueue.d.ts +0 -12
- package/dist/utils/TinyQueue.d.ts.map +0 -1
- package/dist/utils/checkpoint.d.ts +0 -4
- package/dist/utils/checkpoint.d.ts.map +0 -1
- package/dist/utils/document.d.ts +0 -29
- package/dist/utils/document.d.ts.map +0 -1
- package/dist/utils/eventFactories.d.ts +0 -37
- package/dist/utils/eventFactories.d.ts.map +0 -1
- package/dist/utils/exceptions.d.ts +0 -28
- package/dist/utils/exceptions.d.ts.map +0 -1
- package/dist/utils/expressionUtils.d.ts +0 -18
- package/dist/utils/expressionUtils.d.ts.map +0 -1
- package/dist/utils/initialized.d.ts +0 -5
- package/dist/utils/initialized.d.ts.map +0 -1
- package/dist/utils/logPatchError.d.ts +0 -3
- package/dist/utils/logPatchError.d.ts.map +0 -1
- package/dist/utils/path.d.ts +0 -2
- package/dist/utils/path.d.ts.map +0 -1
- package/dist/utils/typeGuard.d.ts +0 -5
- package/dist/utils/typeGuard.d.ts.map +0 -1
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { BlueNode } from '@blue-labs/language';
|
|
2
|
-
import { ContractProcessor } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Registry for contract processors with type ordering
|
|
5
|
-
*
|
|
6
|
-
* Manages the registration and lookup of contract processors
|
|
7
|
-
* while preserving order information for execution priority.
|
|
8
|
-
*/
|
|
9
|
-
export declare class ContractRegistry {
|
|
10
|
-
private readonly processors;
|
|
11
|
-
private readonly typeOrder;
|
|
12
|
-
/**
|
|
13
|
-
* Creates a new contract registry
|
|
14
|
-
*
|
|
15
|
-
* @param list - Initial list of processors to register
|
|
16
|
-
*/
|
|
17
|
-
constructor(list?: ContractProcessor[]);
|
|
18
|
-
/**
|
|
19
|
-
* Registers a new contract processor
|
|
20
|
-
*
|
|
21
|
-
* @param proc - The processor to register
|
|
22
|
-
* @param orderHint - Optional priority value for execution order
|
|
23
|
-
* @throws Error if a processor for the same contract type is already registered
|
|
24
|
-
*/
|
|
25
|
-
register(proc: ContractProcessor, orderHint?: number): void;
|
|
26
|
-
/**
|
|
27
|
-
* Gets a processor by contract type node
|
|
28
|
-
*
|
|
29
|
-
* @param typeNode - The contract type node
|
|
30
|
-
* @returns The associated processor or undefined
|
|
31
|
-
*/
|
|
32
|
-
get(typeNode?: BlueNode): ContractProcessor | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* Gets the order priority for a contract type node
|
|
35
|
-
*
|
|
36
|
-
* @param typeNode - The contract type node
|
|
37
|
-
* @returns The priority value (0 if not found)
|
|
38
|
-
*/
|
|
39
|
-
orderOf(typeNode?: BlueNode): number;
|
|
40
|
-
/**
|
|
41
|
-
* Gets all registered processors
|
|
42
|
-
*
|
|
43
|
-
* @returns Iterator of all registered processors
|
|
44
|
-
*/
|
|
45
|
-
values(): IterableIterator<ContractProcessor>;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=ContractRegistry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContractRegistry.d.ts","sourceRoot":"","sources":["../../src/registry/ContractRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;GAKG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwC;IACnE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6B;IAEvD;;;;OAIG;gBACS,IAAI,GAAE,iBAAiB,EAAO;IAI1C;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,iBAAiB,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAU3D;;;;;OAKG;IACH,GAAG,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,iBAAiB,GAAG,SAAS;IAOvD;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM;IAOpC;;;;OAIG;IACH,MAAM,IAAI,gBAAgB,CAAC,iBAAiB,CAAC;CAG9C"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { DocumentNode, EventNode } from '../types';
|
|
2
|
-
import { TaskQueue } from '../queue/TaskQueue';
|
|
3
|
-
import { ContractRegistry } from '../registry/ContractRegistry';
|
|
4
|
-
import { Blue } from '@blue-labs/language';
|
|
5
|
-
/**
|
|
6
|
-
* Routes events to matching contracts in the document tree
|
|
7
|
-
*/
|
|
8
|
-
export declare class EventRouter {
|
|
9
|
-
private readonly blue;
|
|
10
|
-
private readonly registry;
|
|
11
|
-
private readonly queue;
|
|
12
|
-
private readonly getNextTaskId;
|
|
13
|
-
private readonly getNextEventSeq;
|
|
14
|
-
private readonly traceManager;
|
|
15
|
-
/**
|
|
16
|
-
* Creates a new event router
|
|
17
|
-
*
|
|
18
|
-
* @param registry - Contract registry for looking up processors
|
|
19
|
-
* @param queue - Task queue for scheduling handlers
|
|
20
|
-
* @param getNextTaskId - Function to get the next task ID
|
|
21
|
-
* @param getNextEventSeq - Function to get the next event sequence number
|
|
22
|
-
*/
|
|
23
|
-
constructor(blue: Blue, registry: ContractRegistry, queue: TaskQueue, getNextTaskId: () => number, getNextEventSeq: () => number);
|
|
24
|
-
/**
|
|
25
|
-
* Routes an event to matching contracts in the document
|
|
26
|
-
*
|
|
27
|
-
* @param doc - The document to route events in
|
|
28
|
-
* @param pathSegments - Path segments to the current node
|
|
29
|
-
* @param event - The event to route
|
|
30
|
-
* @param afterTaskId - Minimum task ID to use
|
|
31
|
-
* @param inlineDepth - Current adapter recursion depth
|
|
32
|
-
*/
|
|
33
|
-
route(doc: DocumentNode, pathSegments: string[], event: EventNode, afterTaskId: number, inlineDepth?: number): Promise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* Traverses contracts at the current node and routes to matching ones
|
|
36
|
-
*/
|
|
37
|
-
private traverseContracts;
|
|
38
|
-
/**
|
|
39
|
-
* Processes an adapter contract and routes any emitted events
|
|
40
|
-
*/
|
|
41
|
-
private processAdapter;
|
|
42
|
-
/**
|
|
43
|
-
* Schedules a handler contract for future execution
|
|
44
|
-
*/
|
|
45
|
-
private scheduleHandler;
|
|
46
|
-
/**
|
|
47
|
-
* Checks if an event should be skipped because it came from another channel node
|
|
48
|
-
*/
|
|
49
|
-
private shouldSkipForChannel;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=EventRouter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EventRouter.d.ts","sourceRoot":"","sources":["../../src/routing/EventRouter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,SAAS,EAEV,MAAM,UAAU,CAAC;AAKlB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAe,MAAM,qBAAqB,CAAC;AAMxD;;GAEG;AACH,qBAAa,WAAW;IAYpB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAflC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoB;IAEjD;;;;;;;OAOG;gBAEgB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,gBAAgB,EAC1B,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,MAAM,MAAM,EAC3B,eAAe,EAAE,MAAM,MAAM;IAKhD;;;;;;;;OAQG;IACG,KAAK,CACT,GAAG,EAAE,YAAY,EACjB,YAAY,EAAE,MAAM,EAAE,EACtB,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,EACnB,WAAW,SAAI,GACd,OAAO,CAAC,IAAI,CAAC;IAsChB;;OAEG;YACW,iBAAiB;IA0E/B;;OAEG;YACW,cAAc;IAkD5B;;OAEG;IACH,OAAO,CAAC,eAAe;IA6DvB;;OAEG;IACH,OAAO,CAAC,oBAAoB;CAO7B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buildContractEntries.d.ts","sourceRoot":"","sources":["../../src/routing/buildContractEntries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,YAAY,GACjB,KAAK,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAI/B"}
|
package/dist/testUtils.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Blue } from '@blue-labs/language';
|
|
2
|
-
import { BlueDocumentProcessor } from './BlueDocumentProcessor';
|
|
3
|
-
export declare const prepareToProcess: (doc: unknown, deps: {
|
|
4
|
-
blue: Blue;
|
|
5
|
-
documentProcessor: BlueDocumentProcessor;
|
|
6
|
-
}) => Promise<{
|
|
7
|
-
initializedState: import('@blue-labs/language').BlueNode;
|
|
8
|
-
}>;
|
|
9
|
-
export declare const prepareToProcessYaml: (doc: string, deps: {
|
|
10
|
-
blue: Blue;
|
|
11
|
-
documentProcessor: BlueDocumentProcessor;
|
|
12
|
-
}) => Promise<{
|
|
13
|
-
initializedState: import('@blue-labs/language').BlueNode;
|
|
14
|
-
}>;
|
|
15
|
-
//# sourceMappingURL=testUtils.d.ts.map
|
package/dist/testUtils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testUtils.d.ts","sourceRoot":"","sources":["../src/testUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,eAAO,MAAM,gBAAgB,GAC3B,KAAK,OAAO,EACZ,MAAM;IACJ,IAAI,EAAE,IAAI,CAAC;IACX,iBAAiB,EAAE,qBAAqB,CAAC;CAC1C;;EAYF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,KAAK,MAAM,EACX,MAAM;IACJ,IAAI,EAAE,IAAI,CAAC;IACX,iBAAiB,EAAE,qBAAqB,CAAC;CAC1C;;EAYF,CAAC"}
|
package/dist/types.d.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Blue, BlueNode, BlueNodePatch, ResolvedBlueNode } from '@blue-labs/language';
|
|
2
|
-
export type BlueId = string;
|
|
3
|
-
export type DocumentNode = BlueNode;
|
|
4
|
-
export type EventNodePayload = BlueNode | ResolvedBlueNode;
|
|
5
|
-
export interface EventNode<Payload = EventNodePayload> {
|
|
6
|
-
payload: Payload;
|
|
7
|
-
source?: 'channel' | 'external' | 'internal';
|
|
8
|
-
/** Absolute path of the document node that emitted this event */
|
|
9
|
-
originNodePath?: string;
|
|
10
|
-
/** Channel of the node that emitted this event */
|
|
11
|
-
channelName?: string;
|
|
12
|
-
/** Absolute path that hints the router where to start */
|
|
13
|
-
dispatchPath?: string;
|
|
14
|
-
/** Sequence number for event ordering */
|
|
15
|
-
seq?: number;
|
|
16
|
-
/** The very first event in the chain that led to this one */
|
|
17
|
-
rootEvent?: EventNode;
|
|
18
|
-
/** Linear path trace: each hop = "<absNodePath>#<contractName>" */
|
|
19
|
-
trace?: string[];
|
|
20
|
-
/** Semantic producer of the event used for channel intent filtering */
|
|
21
|
-
emissionType?: 'lifecycle' | 'update' | 'triggered';
|
|
22
|
-
}
|
|
23
|
-
export interface ProcessingResult {
|
|
24
|
-
/** Final document state */
|
|
25
|
-
state: DocumentNode;
|
|
26
|
-
/** All emitted events */
|
|
27
|
-
emitted: EventNodePayload[];
|
|
28
|
-
}
|
|
29
|
-
export type ContractRole = 'adapter' | 'validator' | 'handler' | 'marker';
|
|
30
|
-
export interface ContractProcessor {
|
|
31
|
-
readonly contractType: string;
|
|
32
|
-
readonly contractBlueId: BlueId;
|
|
33
|
-
readonly role: ContractRole;
|
|
34
|
-
supports(evt: EventNode, contractNode: DocumentNode, ctx: ProcessingContext, contractName: string): boolean;
|
|
35
|
-
handle(evt: EventNode, contractNode: DocumentNode, ctx: ProcessingContext, contractName: string): void;
|
|
36
|
-
}
|
|
37
|
-
export type ProcessingAction = {
|
|
38
|
-
kind: 'patch';
|
|
39
|
-
patch: BlueNodePatch;
|
|
40
|
-
} | {
|
|
41
|
-
kind: 'event';
|
|
42
|
-
event: EventNode;
|
|
43
|
-
};
|
|
44
|
-
export type BlueNodeGetResult = ReturnType<typeof BlueNode.prototype.get>;
|
|
45
|
-
export type ProcessingContext = {
|
|
46
|
-
get(path: string): BlueNodeGetResult;
|
|
47
|
-
addPatch(patch: BlueNodePatch): void;
|
|
48
|
-
getNodePath(): string;
|
|
49
|
-
resolvePath(path: string): string;
|
|
50
|
-
/**
|
|
51
|
-
* Emit an event for immediate processing
|
|
52
|
-
* @param event Event to be processed immediately
|
|
53
|
-
*/
|
|
54
|
-
emitEvent(event: EventNode): void;
|
|
55
|
-
/**
|
|
56
|
-
* Flush all pending patches and events
|
|
57
|
-
*/
|
|
58
|
-
flush(): Promise<ProcessingAction[]>;
|
|
59
|
-
/**
|
|
60
|
-
* Get the Blue instance
|
|
61
|
-
* @returns The Blue instance
|
|
62
|
-
*/
|
|
63
|
-
getBlue(): Blue;
|
|
64
|
-
/**
|
|
65
|
-
* Load external module
|
|
66
|
-
* @param url URL of the module to load
|
|
67
|
-
*/
|
|
68
|
-
loadExternalModule(url: string): Promise<string>;
|
|
69
|
-
/**
|
|
70
|
-
* Load blue content
|
|
71
|
-
* @param blueId ID of the blue to load
|
|
72
|
-
*/
|
|
73
|
-
loadBlueContent(blueId: string): Promise<string>;
|
|
74
|
-
};
|
|
75
|
-
export interface HandlerTask {
|
|
76
|
-
nodePath: string;
|
|
77
|
-
contractName: string;
|
|
78
|
-
contractNode: DocumentNode;
|
|
79
|
-
event: EventNode;
|
|
80
|
-
}
|
|
81
|
-
export interface Task extends HandlerTask {
|
|
82
|
-
key: [number, number, number, number, string, number];
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DocumentNode, EventNode } from '../types';
|
|
2
|
-
import { BlueNodePatch } from '@blue-labs/language';
|
|
3
|
-
export declare class CheckpointCache {
|
|
4
|
-
private firstSeen;
|
|
5
|
-
record(docBase: string, event: EventNode, eventBlueId: string): void;
|
|
6
|
-
/** Turn cached data into JSON-Patch ops */
|
|
7
|
-
flush(document: DocumentNode): BlueNodePatch[];
|
|
8
|
-
clear(): void;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=CheckpointCache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CheckpointCache.d.ts","sourceRoot":"","sources":["../../src/utils/CheckpointCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,EAAY,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQ9D,qBAAa,eAAe;IAC1B,OAAO,CAAC,SAAS,CAA4B;IAE7C,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM;IAO7D,2CAA2C;IAC3C,KAAK,CAAC,QAAQ,EAAE,YAAY,GAAG,aAAa,EAAE;IA+B9C,KAAK;CAGN"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { EventNode } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Manages event tracing functionality for the Blue Document Processor
|
|
4
|
-
*/
|
|
5
|
-
export declare class EventTraceManager {
|
|
6
|
-
private readonly isEnabled;
|
|
7
|
-
private static readonly MAX_TRACE_LENGTH;
|
|
8
|
-
constructor();
|
|
9
|
-
/**
|
|
10
|
-
* Creates a hop entry for the trace
|
|
11
|
-
* @param nodePath - The path to the node
|
|
12
|
-
* @param contractName - The name of the contract
|
|
13
|
-
* @returns A formatted hop string
|
|
14
|
-
*/
|
|
15
|
-
private makeHop;
|
|
16
|
-
/**
|
|
17
|
-
* Checks if tracing is enabled
|
|
18
|
-
* @returns Whether tracing is enabled
|
|
19
|
-
*/
|
|
20
|
-
private shouldTrace;
|
|
21
|
-
/**
|
|
22
|
-
* Adds a hop to the event's trace if tracing is enabled
|
|
23
|
-
* @param event - The event to add the trace to
|
|
24
|
-
* @param nodePath - The path to the node
|
|
25
|
-
* @param contractName - The name of the contract
|
|
26
|
-
* @returns A new event with the updated trace
|
|
27
|
-
*/
|
|
28
|
-
addHop(event: EventNode, nodePath: string, contractName: string): EventNode;
|
|
29
|
-
/**
|
|
30
|
-
* Gets the current trace for an event
|
|
31
|
-
* @param event - The event to get the trace for
|
|
32
|
-
* @returns The current trace array or an empty array if none exists
|
|
33
|
-
*/
|
|
34
|
-
getTrace(event: EventNode): string[];
|
|
35
|
-
/**
|
|
36
|
-
* Clears the trace for an event
|
|
37
|
-
* @param event - The event to clear the trace for
|
|
38
|
-
* @returns A new event with an empty trace
|
|
39
|
-
*/
|
|
40
|
-
clearTrace(event: EventNode): EventNode;
|
|
41
|
-
/**
|
|
42
|
-
* Checks if tracing is enabled globally
|
|
43
|
-
* @returns Whether tracing is enabled
|
|
44
|
-
*/
|
|
45
|
-
isTracingEnabled(): boolean;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=EventTraceManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EventTraceManager.d.ts","sourceRoot":"","sources":["../../src/utils/EventTraceManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAU;IACpC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAO;;IAO/C;;;;;OAKG;IACH,OAAO,CAAC,OAAO;IAIf;;;OAGG;IACH,OAAO,CAAC,WAAW;IAInB;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS;IAiB3E;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,EAAE;IAIpC;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS;IAOvC;;;OAGG;IACH,gBAAgB,IAAI,OAAO;CAG5B"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare class TinyQueue<T> {
|
|
2
|
-
data: T[];
|
|
3
|
-
length: number;
|
|
4
|
-
compare: (a: T, b: T) => number;
|
|
5
|
-
constructor(data?: T[], compare?: (a: T, b: T) => number);
|
|
6
|
-
push(item: T): void;
|
|
7
|
-
pop(): T | undefined;
|
|
8
|
-
peek(): T;
|
|
9
|
-
_up(pos: number): void;
|
|
10
|
-
_down(pos: number): void;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=TinyQueue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TinyQueue.d.ts","sourceRoot":"","sources":["../../src/utils/TinyQueue.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS,CAAC,CAAC;IACtB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC;gBAG9B,IAAI,GAAE,CAAC,EAAO,EACd,OAAO,GAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAA+C;IAW1E,IAAI,CAAC,IAAI,EAAE,CAAC;IAKZ,GAAG;IAcH,IAAI;IAIJ,GAAG,CAAC,GAAG,EAAE,MAAM;IAef,KAAK,CAAC,GAAG,EAAE,MAAM;CAoBlB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkpoint.d.ts","sourceRoot":"","sources":["../../src/utils/checkpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,OAAO,EAAE,IAAI,EAAsB,MAAM,qBAAqB,CAAC;AAM/D,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,0CAyCtE"}
|
package/dist/utils/document.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { DocumentNode } from '../types';
|
|
2
|
-
import { BlueNodePatch, Blue } from '@blue-labs/language';
|
|
3
|
-
type EmbeddedSpec = {
|
|
4
|
-
absPath: string;
|
|
5
|
-
contractPath: string;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Makes a document immutable during processing for safety
|
|
9
|
-
*/
|
|
10
|
-
export declare function freeze(doc: DocumentNode): DocumentNode;
|
|
11
|
-
/**
|
|
12
|
-
* Creates a mutable copy of a document for processing
|
|
13
|
-
*/
|
|
14
|
-
export declare function mutable(doc: DocumentNode): DocumentNode;
|
|
15
|
-
/**
|
|
16
|
-
* Collects all paths to embedded documents
|
|
17
|
-
* @param doc - The document to collect embedded paths from
|
|
18
|
-
* @param blue - The Blue instance
|
|
19
|
-
* @param base - The base path
|
|
20
|
-
* @param out - The output array
|
|
21
|
-
*/
|
|
22
|
-
export declare function collectEmbeddedPathSpecs(doc: DocumentNode, blue: Blue, base?: string, out?: EmbeddedSpec[]): EmbeddedSpec[];
|
|
23
|
-
export declare function isInside(target: string, root: string): boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Apply a collection of patches to a document
|
|
26
|
-
*/
|
|
27
|
-
export declare function applyPatches(document: DocumentNode, patches: BlueNodePatch[]): DocumentNode;
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=document.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/utils/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,OAAO,EAEL,KAAK,aAAa,EAClB,IAAI,EACL,MAAM,qBAAqB,CAAC;AAM7B,KAAK,YAAY,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D;;GAEG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,YAAY,GAAG,YAAY,CAEtD;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,YAAY,GAAG,YAAY,CAEvD;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,IAAI,EACV,IAAI,SAAM,EACV,GAAG,GAAE,YAAY,EAAO,GACvB,YAAY,EAAE,CA8BhB;AAKD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAI9D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,aAAa,EAAE,GACvB,YAAY,CAcd"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { EventNodePayload } from '../types';
|
|
2
|
-
import { Blue } from '@blue-labs/language';
|
|
3
|
-
/**
|
|
4
|
-
* Factory functions for creating common event payloads
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Document Update event operations
|
|
8
|
-
*/
|
|
9
|
-
export type DocumentUpdateOp = 'add' | 'remove' | 'replace' | 'move' | 'copy';
|
|
10
|
-
/**
|
|
11
|
-
* Options for creating a Document Update event
|
|
12
|
-
*/
|
|
13
|
-
export interface DocumentUpdateEventOptions {
|
|
14
|
-
/** The JSON Patch operation type */
|
|
15
|
-
op: DocumentUpdateOp;
|
|
16
|
-
/** The JSON Pointer path where the operation is applied */
|
|
17
|
-
path: string;
|
|
18
|
-
/** The value to set (for add/replace operations) */
|
|
19
|
-
val?: unknown;
|
|
20
|
-
/** The source path (for move/copy operations) */
|
|
21
|
-
from?: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Creates a Document Update event payload
|
|
25
|
-
*/
|
|
26
|
-
export declare function createDocumentUpdateEvent(options: DocumentUpdateEventOptions, blue: Blue): EventNodePayload;
|
|
27
|
-
/**
|
|
28
|
-
* Creates a Timeline Entry event payload
|
|
29
|
-
*/
|
|
30
|
-
export declare function createTimelineEntryEvent(timelineId: string, message: unknown, blue: Blue): EventNodePayload;
|
|
31
|
-
export declare function createMyOSTimelineEntryEvent(timelineId: string, message: unknown, blue: Blue): EventNodePayload;
|
|
32
|
-
/**
|
|
33
|
-
* Creates a Document Processing Initiated event payload
|
|
34
|
-
* This is a lifecycle event emitted when document processing starts
|
|
35
|
-
*/
|
|
36
|
-
export declare function createDocumentProcessingInitiatedEvent(blue: Blue): import('@blue-labs/language').BlueNode;
|
|
37
|
-
//# sourceMappingURL=eventFactories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventFactories.d.ts","sourceRoot":"","sources":["../../src/utils/eventFactories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,oCAAoC;IACpC,EAAE,EAAE,gBAAgB,CAAC;IACrB,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,0BAA0B,EACnC,IAAI,EAAE,IAAI,GACT,gBAAgB,CAqBlB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,GACT,gBAAgB,CAMlB;AAED,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,GACT,gBAAgB,CAMlB;AAED;;;GAGG;AACH,wBAAgB,sCAAsC,CAAC,IAAI,EAAE,IAAI,0CAIhE"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { BlueNodePatch } from '@blue-labs/language';
|
|
2
|
-
/** Custom error gives you the offending patch for logging / alerting */
|
|
3
|
-
export declare class PatchApplicationError extends Error {
|
|
4
|
-
readonly patch: BlueNodePatch;
|
|
5
|
-
readonly cause?: unknown | undefined;
|
|
6
|
-
constructor(patch: BlueNodePatch, cause?: unknown | undefined);
|
|
7
|
-
}
|
|
8
|
-
/** Thrown when a patch targets a path protected by a Process Embedded contract */
|
|
9
|
-
export declare class EmbeddedDocumentModificationError extends Error {
|
|
10
|
-
readonly patch: BlueNodePatch;
|
|
11
|
-
readonly offendingPath: string;
|
|
12
|
-
readonly contractNodePath: string;
|
|
13
|
-
constructor(patch: BlueNodePatch, offendingPath: string, // the embedded path that was hit
|
|
14
|
-
contractNodePath: string);
|
|
15
|
-
}
|
|
16
|
-
/** Thrown when a document update expression fails to evaluate */
|
|
17
|
-
export declare class ExpressionEvaluationError extends Error {
|
|
18
|
-
readonly code: string;
|
|
19
|
-
readonly cause?: unknown | undefined;
|
|
20
|
-
constructor(code: string, cause?: unknown | undefined);
|
|
21
|
-
}
|
|
22
|
-
/** Thrown when a step code block fails to evaluate */
|
|
23
|
-
export declare class CodeBlockEvaluationError extends Error {
|
|
24
|
-
readonly code: string;
|
|
25
|
-
readonly cause?: unknown | undefined;
|
|
26
|
-
constructor(code: string, cause?: unknown | undefined);
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=exceptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exceptions.d.ts","sourceRoot":"","sources":["../../src/utils/exceptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,wEAAwE;AACxE,qBAAa,qBAAsB,SAAQ,KAAK;IAE5C,QAAQ,CAAC,KAAK,EAAE,aAAa;aACX,KAAK,CAAC,EAAE,OAAO;gBADxB,KAAK,EAAE,aAAa,EACX,KAAK,CAAC,EAAE,OAAO,YAAA;CAKpC;AAED,kFAAkF;AAClF,qBAAa,iCAAkC,SAAQ,KAAK;IAExD,QAAQ,CAAC,KAAK,EAAE,aAAa;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,MAAM;gBAFxB,KAAK,EAAE,aAAa,EACpB,aAAa,EAAE,MAAM,EAAE,iCAAiC;IACxD,gBAAgB,EAAE,MAAM;CAWpC;AAED,iEAAiE;AACjE,qBAAa,yBAA0B,SAAQ,KAAK;IAEhD,QAAQ,CAAC,IAAI,EAAE,MAAM;aACH,KAAK,CAAC,EAAE,OAAO;gBADxB,IAAI,EAAE,MAAM,EACH,KAAK,CAAC,EAAE,OAAO,YAAA;CAKpC;AAED,sDAAsD;AACtD,qBAAa,wBAAyB,SAAQ,KAAK;IAE/C,QAAQ,CAAC,IAAI,EAAE,MAAM;aACH,KAAK,CAAC,EAAE,OAAO;gBADxB,IAAI,EAAE,MAAM,EACH,KAAK,CAAC,EAAE,OAAO,YAAA;CAKpC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks if a value is an expression (starts with "${" and ends with "}")
|
|
3
|
-
* @param value - The value to check
|
|
4
|
-
* @returns True if the value is an expression, false otherwise
|
|
5
|
-
*/
|
|
6
|
-
export declare const isExpression: (value: unknown) => value is string;
|
|
7
|
-
/**
|
|
8
|
-
* Checks if a string contains at least one ${...} expression anywhere inside
|
|
9
|
-
*/
|
|
10
|
-
export declare const containsExpression: (value: unknown) => value is string;
|
|
11
|
-
/**
|
|
12
|
-
* Extracts the expression content from an expression string
|
|
13
|
-
* @param expression - The expression string (e.g., "${some.expression}")
|
|
14
|
-
* @returns The expression content without the wrapping syntax (e.g., "some.expression")
|
|
15
|
-
* @throws Error if the value is not a valid expression
|
|
16
|
-
*/
|
|
17
|
-
export declare const extractExpressionContent: (expression: string) => string;
|
|
18
|
-
//# sourceMappingURL=expressionUtils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expressionUtils.d.ts","sourceRoot":"","sources":["../../src/utils/expressionUtils.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAKtD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAK5D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GAAI,YAAY,MAAM,KAAG,MAK7D,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DocumentNode } from '../types';
|
|
2
|
-
import { Blue } from '@blue-labs/language';
|
|
3
|
-
export declare function ensureInitializedContract(doc: DocumentNode, blue: Blue): DocumentNode;
|
|
4
|
-
export declare function isInitialized(doc: DocumentNode, blue: Blue): boolean;
|
|
5
|
-
//# sourceMappingURL=initialized.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initialized.d.ts","sourceRoot":"","sources":["../../src/utils/initialized.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAG3C,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,IAAI,GACT,YAAY,CAsBd;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAOpE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logPatchError.d.ts","sourceRoot":"","sources":["../../src/utils/logPatchError.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,aAAa,GACxB,cAAc,MAAM,EACpB,OAAO,SAAS,EAChB,KAAK,OAAO,SAYb,CAAC"}
|
package/dist/utils/path.d.ts
DELETED
package/dist/utils/path.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/utils/path.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,GAAG,OAAO,MAAM,EAAE,WAkBf,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DocumentNode } from '../types';
|
|
2
|
-
export declare function isNonNullable<T>(value: T): value is NonNullable<T>;
|
|
3
|
-
export declare function isString(value: unknown): value is string;
|
|
4
|
-
export declare function isDocumentNode(value: unknown): value is DocumentNode;
|
|
5
|
-
//# sourceMappingURL=typeGuard.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typeGuard.d.ts","sourceRoot":"","sources":["../../src/utils/typeGuard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,IAAI,WAAW,CAAC,CAAC,CAAC,CAElE;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAExD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE"}
|