@spine-event-engine/server 2.0.0-snapshot.2
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/LICENSE +201 -0
- package/README.md +569 -0
- package/REFERENCE.md +488 -0
- package/dist/bus/command-bus.d.ts +61 -0
- package/dist/bus/command-bus.d.ts.map +1 -0
- package/dist/bus/command-bus.js +201 -0
- package/dist/bus/command-bus.js.map +1 -0
- package/dist/bus/command-dispatcher-registry.d.ts +33 -0
- package/dist/bus/command-dispatcher-registry.d.ts.map +1 -0
- package/dist/bus/command-dispatcher-registry.js +75 -0
- package/dist/bus/command-dispatcher-registry.js.map +1 -0
- package/dist/bus/command-dispatcher.d.ts +25 -0
- package/dist/bus/command-dispatcher.d.ts.map +1 -0
- package/dist/bus/command-dispatcher.js +15 -0
- package/dist/bus/command-dispatcher.js.map +1 -0
- package/dist/bus/command-errors.d.ts +23 -0
- package/dist/bus/command-errors.d.ts.map +1 -0
- package/dist/bus/command-errors.js +52 -0
- package/dist/bus/command-errors.js.map +1 -0
- package/dist/bus/event-bus.d.ts +113 -0
- package/dist/bus/event-bus.d.ts.map +1 -0
- package/dist/bus/event-bus.js +518 -0
- package/dist/bus/event-bus.js.map +1 -0
- package/dist/bus/event-dispatcher-origin-schemas.d.ts +17 -0
- package/dist/bus/event-dispatcher-origin-schemas.d.ts.map +1 -0
- package/dist/bus/event-dispatcher-origin-schemas.js +32 -0
- package/dist/bus/event-dispatcher-origin-schemas.js.map +1 -0
- package/dist/bus/event-dispatcher-registry.d.ts +48 -0
- package/dist/bus/event-dispatcher-registry.d.ts.map +1 -0
- package/dist/bus/event-dispatcher-registry.js +176 -0
- package/dist/bus/event-dispatcher-registry.js.map +1 -0
- package/dist/bus/event-dispatcher.d.ts +48 -0
- package/dist/bus/event-dispatcher.d.ts.map +1 -0
- package/dist/bus/event-dispatcher.js +15 -0
- package/dist/bus/event-dispatcher.js.map +1 -0
- package/dist/context/bounded-context.d.ts +606 -0
- package/dist/context/bounded-context.d.ts.map +1 -0
- package/dist/context/bounded-context.js +1780 -0
- package/dist/context/bounded-context.js.map +1 -0
- package/dist/context/entity-inbox.d.ts +63 -0
- package/dist/context/entity-inbox.d.ts.map +1 -0
- package/dist/context/entity-inbox.js +380 -0
- package/dist/context/entity-inbox.js.map +1 -0
- package/dist/context/local-inbox-handoff.d.ts +244 -0
- package/dist/context/local-inbox-handoff.d.ts.map +1 -0
- package/dist/context/local-inbox-handoff.js +334 -0
- package/dist/context/local-inbox-handoff.js.map +1 -0
- package/dist/context/projection-handoff.d.ts +46 -0
- package/dist/context/projection-handoff.d.ts.map +1 -0
- package/dist/context/projection-handoff.js +172 -0
- package/dist/context/projection-handoff.js.map +1 -0
- package/dist/context/tenant-index.d.ts +41 -0
- package/dist/context/tenant-index.d.ts.map +1 -0
- package/dist/context/tenant-index.js +92 -0
- package/dist/context/tenant-index.js.map +1 -0
- package/dist/delivery/conditional-pickup.d.ts +25 -0
- package/dist/delivery/conditional-pickup.d.ts.map +1 -0
- package/dist/delivery/conditional-pickup.js +26 -0
- package/dist/delivery/conditional-pickup.js.map +1 -0
- package/dist/delivery/delivery-builder.d.ts +216 -0
- package/dist/delivery/delivery-builder.d.ts.map +1 -0
- package/dist/delivery/delivery-builder.js +323 -0
- package/dist/delivery/delivery-builder.js.map +1 -0
- package/dist/delivery/delivery-lease.d.ts +15 -0
- package/dist/delivery/delivery-lease.d.ts.map +1 -0
- package/dist/delivery/delivery-lease.js +44 -0
- package/dist/delivery/delivery-lease.js.map +1 -0
- package/dist/delivery/delivery-loop.d.ts +113 -0
- package/dist/delivery/delivery-loop.d.ts.map +1 -0
- package/dist/delivery/delivery-loop.js +119 -0
- package/dist/delivery/delivery-loop.js.map +1 -0
- package/dist/delivery/delivery-monitor.d.ts +165 -0
- package/dist/delivery/delivery-monitor.d.ts.map +1 -0
- package/dist/delivery/delivery-monitor.js +168 -0
- package/dist/delivery/delivery-monitor.js.map +1 -0
- package/dist/delivery/delivery-ports.d.ts +141 -0
- package/dist/delivery/delivery-ports.d.ts.map +1 -0
- package/dist/delivery/delivery-ports.js +15 -0
- package/dist/delivery/delivery-ports.js.map +1 -0
- package/dist/delivery/delivery-run-control.d.ts +50 -0
- package/dist/delivery/delivery-run-control.d.ts.map +1 -0
- package/dist/delivery/delivery-run-control.js +66 -0
- package/dist/delivery/delivery-run-control.js.map +1 -0
- package/dist/delivery/delivery-run-coordinator.d.ts +218 -0
- package/dist/delivery/delivery-run-coordinator.d.ts.map +1 -0
- package/dist/delivery/delivery-run-coordinator.js +609 -0
- package/dist/delivery/delivery-run-coordinator.js.map +1 -0
- package/dist/delivery/delivery-storage-error.d.ts +13 -0
- package/dist/delivery/delivery-storage-error.d.ts.map +1 -0
- package/dist/delivery/delivery-storage-error.js +30 -0
- package/dist/delivery/delivery-storage-error.js.map +1 -0
- package/dist/delivery/delivery-supervisor.d.ts +175 -0
- package/dist/delivery/delivery-supervisor.d.ts.map +1 -0
- package/dist/delivery/delivery-supervisor.js +469 -0
- package/dist/delivery/delivery-supervisor.js.map +1 -0
- package/dist/delivery/delivery-worker.d.ts +180 -0
- package/dist/delivery/delivery-worker.d.ts.map +1 -0
- package/dist/delivery/delivery-worker.js +232 -0
- package/dist/delivery/delivery-worker.js.map +1 -0
- package/dist/delivery/delivery.d.ts +238 -0
- package/dist/delivery/delivery.d.ts.map +1 -0
- package/dist/delivery/delivery.js +400 -0
- package/dist/delivery/delivery.js.map +1 -0
- package/dist/delivery/inbox-records.d.ts +19 -0
- package/dist/delivery/inbox-records.d.ts.map +1 -0
- package/dist/delivery/inbox-records.js +291 -0
- package/dist/delivery/inbox-records.js.map +1 -0
- package/dist/delivery/inbox-storage.d.ts +81 -0
- package/dist/delivery/inbox-storage.d.ts.map +1 -0
- package/dist/delivery/inbox-storage.js +353 -0
- package/dist/delivery/inbox-storage.js.map +1 -0
- package/dist/delivery/inbox.d.ts +263 -0
- package/dist/delivery/inbox.d.ts.map +1 -0
- package/dist/delivery/inbox.js +172 -0
- package/dist/delivery/inbox.js.map +1 -0
- package/dist/delivery/parked-delivery-obligations.d.ts +182 -0
- package/dist/delivery/parked-delivery-obligations.d.ts.map +1 -0
- package/dist/delivery/parked-delivery-obligations.js +390 -0
- package/dist/delivery/parked-delivery-obligations.js.map +1 -0
- package/dist/delivery/shard-index.d.ts +41 -0
- package/dist/delivery/shard-index.d.ts.map +1 -0
- package/dist/delivery/shard-index.js +67 -0
- package/dist/delivery/shard-index.js.map +1 -0
- package/dist/delivery/sharded-work-registry.d.ts +114 -0
- package/dist/delivery/sharded-work-registry.d.ts.map +1 -0
- package/dist/delivery/sharded-work-registry.js +360 -0
- package/dist/delivery/sharded-work-registry.js.map +1 -0
- package/dist/entity/entity-metadata.d.ts +173 -0
- package/dist/entity/entity-metadata.d.ts.map +1 -0
- package/dist/entity/entity-metadata.js +187 -0
- package/dist/entity/entity-metadata.js.map +1 -0
- package/dist/entity/entity-storage-descriptor.d.ts +64 -0
- package/dist/entity/entity-storage-descriptor.d.ts.map +1 -0
- package/dist/entity/entity-storage-descriptor.js +227 -0
- package/dist/entity/entity-storage-descriptor.js.map +1 -0
- package/dist/entity/entity-transaction.d.ts +372 -0
- package/dist/entity/entity-transaction.d.ts.map +1 -0
- package/dist/entity/entity-transaction.js +413 -0
- package/dist/entity/entity-transaction.js.map +1 -0
- package/dist/entity/entity-transition-validation.d.ts +47 -0
- package/dist/entity/entity-transition-validation.d.ts.map +1 -0
- package/dist/entity/entity-transition-validation.js +327 -0
- package/dist/entity/entity-transition-validation.js.map +1 -0
- package/dist/entity/entity.d.ts +499 -0
- package/dist/entity/entity.d.ts.map +1 -0
- package/dist/entity/entity.js +829 -0
- package/dist/entity/entity.js.map +1 -0
- package/dist/entity/implicit-required-id.d.ts +15 -0
- package/dist/entity/implicit-required-id.d.ts.map +1 -0
- package/dist/entity/implicit-required-id.js +123 -0
- package/dist/entity/implicit-required-id.js.map +1 -0
- package/dist/entity/spec-scanner.d.ts +14 -0
- package/dist/entity/spec-scanner.d.ts.map +1 -0
- package/dist/entity/spec-scanner.js +37 -0
- package/dist/entity/spec-scanner.js.map +1 -0
- package/dist/handler/build-time-handler-analyzer.d.ts +150 -0
- package/dist/handler/build-time-handler-analyzer.d.ts.map +1 -0
- package/dist/handler/build-time-handler-analyzer.js +1101 -0
- package/dist/handler/build-time-handler-analyzer.js.map +1 -0
- package/dist/handler/command-registration-readiness.d.ts +99 -0
- package/dist/handler/command-registration-readiness.d.ts.map +1 -0
- package/dist/handler/command-registration-readiness.js +118 -0
- package/dist/handler/command-registration-readiness.js.map +1 -0
- package/dist/handler/event-handler-filter.d.ts +43 -0
- package/dist/handler/event-handler-filter.d.ts.map +1 -0
- package/dist/handler/event-handler-filter.js +128 -0
- package/dist/handler/event-handler-filter.js.map +1 -0
- package/dist/handler/event-registration-readiness.d.ts +196 -0
- package/dist/handler/event-registration-readiness.d.ts.map +1 -0
- package/dist/handler/event-registration-readiness.js +187 -0
- package/dist/handler/event-registration-readiness.js.map +1 -0
- package/dist/handler/external.d.ts +10 -0
- package/dist/handler/external.d.ts.map +1 -0
- package/dist/handler/external.js +15 -0
- package/dist/handler/external.js.map +1 -0
- package/dist/handler/generated-handler-registry.d.ts +154 -0
- package/dist/handler/generated-handler-registry.d.ts.map +1 -0
- package/dist/handler/generated-handler-registry.js +223 -0
- package/dist/handler/generated-handler-registry.js.map +1 -0
- package/dist/handler/generated-registry-discovery.d.ts +94 -0
- package/dist/handler/generated-registry-discovery.d.ts.map +1 -0
- package/dist/handler/generated-registry-discovery.js +228 -0
- package/dist/handler/generated-registry-discovery.js.map +1 -0
- package/dist/handler/generated-registry-writer.d.ts +58 -0
- package/dist/handler/generated-registry-writer.d.ts.map +1 -0
- package/dist/handler/generated-registry-writer.js +458 -0
- package/dist/handler/generated-registry-writer.js.map +1 -0
- package/dist/handler/handler-codegen.d.ts +48 -0
- package/dist/handler/handler-codegen.d.ts.map +1 -0
- package/dist/handler/handler-codegen.js +214 -0
- package/dist/handler/handler-codegen.js.map +1 -0
- package/dist/handler/handler-decorators.d.ts +134 -0
- package/dist/handler/handler-decorators.d.ts.map +1 -0
- package/dist/handler/handler-decorators.js +239 -0
- package/dist/handler/handler-decorators.js.map +1 -0
- package/dist/handler/handler-metadata.d.ts +510 -0
- package/dist/handler/handler-metadata.d.ts.map +1 -0
- package/dist/handler/handler-metadata.js +391 -0
- package/dist/handler/handler-metadata.js.map +1 -0
- package/dist/handler/registration-readiness-metadata.d.ts +68 -0
- package/dist/handler/registration-readiness-metadata.d.ts.map +1 -0
- package/dist/handler/registration-readiness-metadata.js +170 -0
- package/dist/handler/registration-readiness-metadata.js.map +1 -0
- package/dist/handler/rejection-source.d.ts +11 -0
- package/dist/handler/rejection-source.d.ts.map +1 -0
- package/dist/handler/rejection-source.js +25 -0
- package/dist/handler/rejection-source.js.map +1 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -0
- package/dist/integration/external-messages.d.ts +49 -0
- package/dist/integration/external-messages.d.ts.map +1 -0
- package/dist/integration/external-messages.js +112 -0
- package/dist/integration/external-messages.js.map +1 -0
- package/dist/integration/integration-broker.d.ts +74 -0
- package/dist/integration/integration-broker.d.ts.map +1 -0
- package/dist/integration/integration-broker.js +444 -0
- package/dist/integration/integration-broker.js.map +1 -0
- package/dist/integration/third-party-context.d.ts +56 -0
- package/dist/integration/third-party-context.d.ts.map +1 -0
- package/dist/integration/third-party-context.js +130 -0
- package/dist/integration/third-party-context.js.map +1 -0
- package/dist/repository/command-errors.d.ts +25 -0
- package/dist/repository/command-errors.d.ts.map +1 -0
- package/dist/repository/command-errors.js +43 -0
- package/dist/repository/command-errors.js.map +1 -0
- package/dist/repository/command-routing.d.ts +72 -0
- package/dist/repository/command-routing.d.ts.map +1 -0
- package/dist/repository/command-routing.js +98 -0
- package/dist/repository/command-routing.js.map +1 -0
- package/dist/repository/commit-fence.d.ts +22 -0
- package/dist/repository/commit-fence.d.ts.map +1 -0
- package/dist/repository/commit-fence.js +37 -0
- package/dist/repository/commit-fence.js.map +1 -0
- package/dist/repository/event-routing.d.ts +71 -0
- package/dist/repository/event-routing.d.ts.map +1 -0
- package/dist/repository/event-routing.js +96 -0
- package/dist/repository/event-routing.js.map +1 -0
- package/dist/repository/primitive-id.d.ts +86 -0
- package/dist/repository/primitive-id.d.ts.map +1 -0
- package/dist/repository/primitive-id.js +110 -0
- package/dist/repository/primitive-id.js.map +1 -0
- package/dist/repository/repository.d.ts +670 -0
- package/dist/repository/repository.d.ts.map +1 -0
- package/dist/repository/repository.js +3298 -0
- package/dist/repository/repository.js.map +1 -0
- package/dist/repository/routing-declarations.d.ts +75 -0
- package/dist/repository/routing-declarations.d.ts.map +1 -0
- package/dist/repository/routing-declarations.js +101 -0
- package/dist/repository/routing-declarations.js.map +1 -0
- package/dist/repository/state-update-routing.d.ts +66 -0
- package/dist/repository/state-update-routing.d.ts.map +1 -0
- package/dist/repository/state-update-routing.js +91 -0
- package/dist/repository/state-update-routing.js.map +1 -0
- package/dist/runtime/runtime.d.ts +156 -0
- package/dist/runtime/runtime.d.ts.map +1 -0
- package/dist/runtime/runtime.js +215 -0
- package/dist/runtime/runtime.js.map +1 -0
- package/dist/runtime/signal-intake.d.ts +84 -0
- package/dist/runtime/signal-intake.d.ts.map +1 -0
- package/dist/runtime/signal-intake.js +94 -0
- package/dist/runtime/signal-intake.js.map +1 -0
- package/dist/runtime/signal-metadata.d.ts +242 -0
- package/dist/runtime/signal-metadata.d.ts.map +1 -0
- package/dist/runtime/signal-metadata.js +368 -0
- package/dist/runtime/signal-metadata.js.map +1 -0
- package/dist/server/browser-server.d.ts +49 -0
- package/dist/server/browser-server.d.ts.map +1 -0
- package/dist/server/browser-server.js +633 -0
- package/dist/server/browser-server.js.map +1 -0
- package/dist/server/durable-subscription-bindings.d.ts +122 -0
- package/dist/server/durable-subscription-bindings.d.ts.map +1 -0
- package/dist/server/durable-subscription-bindings.js +524 -0
- package/dist/server/durable-subscription-bindings.js.map +1 -0
- package/dist/server/environment-attachment.d.ts +356 -0
- package/dist/server/environment-attachment.d.ts.map +1 -0
- package/dist/server/environment-attachment.js +2061 -0
- package/dist/server/environment-attachment.js.map +1 -0
- package/dist/server/environment-delivery-records.d.ts +77 -0
- package/dist/server/environment-delivery-records.d.ts.map +1 -0
- package/dist/server/environment-delivery-records.js +282 -0
- package/dist/server/environment-delivery-records.js.map +1 -0
- package/dist/server/environment-delivery-worker.d.ts +161 -0
- package/dist/server/environment-delivery-worker.d.ts.map +1 -0
- package/dist/server/environment-delivery-worker.js +664 -0
- package/dist/server/environment-delivery-worker.js.map +1 -0
- package/dist/server/environment.d.ts +43 -0
- package/dist/server/environment.d.ts.map +1 -0
- package/dist/server/environment.js +90 -0
- package/dist/server/environment.js.map +1 -0
- package/dist/server/managed-child-subscription.d.ts +11 -0
- package/dist/server/managed-child-subscription.d.ts.map +1 -0
- package/dist/server/managed-child-subscription.js +44 -0
- package/dist/server/managed-child-subscription.js.map +1 -0
- package/dist/server/managed-server-application.d.ts +324 -0
- package/dist/server/managed-server-application.d.ts.map +1 -0
- package/dist/server/managed-server-application.js +937 -0
- package/dist/server/managed-server-application.js.map +1 -0
- package/dist/server/node-coordinator.d.ts +191 -0
- package/dist/server/node-coordinator.d.ts.map +1 -0
- package/dist/server/node-coordinator.js +552 -0
- package/dist/server/node-coordinator.js.map +1 -0
- package/dist/server/process-server-coordinator.d.ts +15 -0
- package/dist/server/process-server-coordinator.d.ts.map +1 -0
- package/dist/server/process-server-coordinator.js +112 -0
- package/dist/server/process-server-coordinator.js.map +1 -0
- package/dist/server/reserved-spine-rpc-paths.json +8 -0
- package/dist/server/retryable-close.d.ts +28 -0
- package/dist/server/retryable-close.d.ts.map +1 -0
- package/dist/server/retryable-close.js +129 -0
- package/dist/server/retryable-close.js.map +1 -0
- package/dist/server/server-environment.d.ts +180 -0
- package/dist/server/server-environment.d.ts.map +1 -0
- package/dist/server/server-environment.js +418 -0
- package/dist/server/server-environment.js.map +1 -0
- package/dist/server/server-log.d.ts +18 -0
- package/dist/server/server-log.d.ts.map +1 -0
- package/dist/server/server-log.js +96 -0
- package/dist/server/server-log.js.map +1 -0
- package/dist/server/server.d.ts +389 -0
- package/dist/server/server.d.ts.map +1 -0
- package/dist/server/server.js +752 -0
- package/dist/server/server.js.map +1 -0
- package/dist/services/spine-services.d.ts +88 -0
- package/dist/services/spine-services.d.ts.map +1 -0
- package/dist/services/spine-services.js +1586 -0
- package/dist/services/spine-services.js.map +1 -0
- package/dist/stand/stand.d.ts +294 -0
- package/dist/stand/stand.d.ts.map +1 -0
- package/dist/stand/stand.js +680 -0
- package/dist/stand/stand.js.map +1 -0
- package/dist/stand/subscription-observer.d.ts +53 -0
- package/dist/stand/subscription-observer.d.ts.map +1 -0
- package/dist/stand/subscription-observer.js +444 -0
- package/dist/stand/subscription-observer.js.map +1 -0
- package/dist/stand/subscription-records.d.ts +12 -0
- package/dist/stand/subscription-records.d.ts.map +1 -0
- package/dist/stand/subscription-records.js +99 -0
- package/dist/stand/subscription-records.js.map +1 -0
- package/dist/stand/subscription-registry.d.ts +285 -0
- package/dist/stand/subscription-registry.d.ts.map +1 -0
- package/dist/stand/subscription-registry.js +403 -0
- package/dist/stand/subscription-registry.js.map +1 -0
- package/dist/stand/subscription-runtime.d.ts +102 -0
- package/dist/stand/subscription-runtime.d.ts.map +1 -0
- package/dist/stand/subscription-runtime.js +380 -0
- package/dist/stand/subscription-runtime.js.map +1 -0
- package/dist/testing/index.d.ts +14 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +34 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ValidationError } from "@spine-event-engine/proto";
|
|
2
|
+
/**
|
|
3
|
+
* Error raised when aggregate command execution rejects a state transition.
|
|
4
|
+
*/
|
|
5
|
+
export declare class TransitionValidationError extends Error {
|
|
6
|
+
/**
|
|
7
|
+
* Stable client-visible error type returned in `Ack.status.error.type`.
|
|
8
|
+
*/
|
|
9
|
+
readonly type = "COMMAND_STATE_TRANSITION_VALIDATION_FAILED";
|
|
10
|
+
/**
|
|
11
|
+
* Stable client-visible error message returned in `Ack.status.error.message`.
|
|
12
|
+
*/
|
|
13
|
+
readonly clientMessage = "Command state transition validation failed.";
|
|
14
|
+
/**
|
|
15
|
+
* Structured transition validation details from the entity transaction boundary.
|
|
16
|
+
*/
|
|
17
|
+
readonly validationError: ValidationError;
|
|
18
|
+
/**
|
|
19
|
+
* Creates an aggregate transition validation error.
|
|
20
|
+
*
|
|
21
|
+
* @param validationError Structured details explaining the rejected transition.
|
|
22
|
+
*/
|
|
23
|
+
constructor(validationError: ValidationError);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=command-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-errors.d.ts","sourceRoot":"","sources":["../../src/repository/command-errors.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,KAAK;IAGlD;;OAEG;IACH,QAAQ,CAAC,IAAI,gDAAgD;IAE7D;;OAEG;IACH,QAAQ,CAAC,aAAa,iDAAiD;IAEvE;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAE1C;;;;OAIG;gBACS,eAAe,EAAE,eAAe;CAM7C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, CodeMatters. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
5
|
+
* in compliance with the License. You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
10
|
+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
11
|
+
* or implied. See the License for the specific language governing permissions and limitations under
|
|
12
|
+
* the License.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Error raised when aggregate command execution rejects a state transition.
|
|
16
|
+
*/
|
|
17
|
+
export class TransitionValidationError extends Error {
|
|
18
|
+
// prettier-ignore
|
|
19
|
+
/**
|
|
20
|
+
* Stable client-visible error type returned in `Ack.status.error.type`.
|
|
21
|
+
*/
|
|
22
|
+
type = "COMMAND_STATE_TRANSITION_VALIDATION_FAILED";
|
|
23
|
+
/**
|
|
24
|
+
* Stable client-visible error message returned in `Ack.status.error.message`.
|
|
25
|
+
*/
|
|
26
|
+
clientMessage = "Command state transition validation failed.";
|
|
27
|
+
/**
|
|
28
|
+
* Structured transition validation details from the entity transaction boundary.
|
|
29
|
+
*/
|
|
30
|
+
validationError;
|
|
31
|
+
/**
|
|
32
|
+
* Creates an aggregate transition validation error.
|
|
33
|
+
*
|
|
34
|
+
* @param validationError Structured details explaining the rejected transition.
|
|
35
|
+
*/
|
|
36
|
+
constructor(validationError) {
|
|
37
|
+
super("Command state transition validation failed.");
|
|
38
|
+
this.name = "TransitionValidationError";
|
|
39
|
+
this.validationError = validationError;
|
|
40
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=command-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-errors.js","sourceRoot":"","sources":["../../src/repository/command-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH;;GAEG;AACH,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAClD,kBAAkB;IAElB;;OAEG;IACM,IAAI,GAAG,4CAA4C,CAAC;IAE7D;;OAEG;IACM,aAAa,GAAG,6CAA6C,CAAC;IAEvE;;OAEG;IACM,eAAe,CAAkB;IAE1C;;;;OAIG;IACH,YAAY,eAAgC;QAC1C,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACrD,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;QACxC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;CACF"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { MessageShape } from "@bufbuild/protobuf";
|
|
2
|
+
import { type MessageInterface, type MessageSchema } from "@spine-event-engine/core";
|
|
3
|
+
import type { CommandContext } from "@spine-event-engine/proto";
|
|
4
|
+
import { type InterfaceRouteSchemas, type InterfaceRouteMessage, type RoutingDeclarationSnapshot, type RoutingDeclarationState } from "./routing-declarations.js";
|
|
5
|
+
/**
|
|
6
|
+
* Calculates one Entity ID for a Command message.
|
|
7
|
+
*
|
|
8
|
+
* @typeParam Id Entity ID type owned by the receiving repository.
|
|
9
|
+
* @typeParam Schema Generated Command message schema.
|
|
10
|
+
* @param message Unpacked Command message.
|
|
11
|
+
* @param context Normalized Command context. When the signal omits its context,
|
|
12
|
+
* the framework supplies the default generated `CommandContext` value.
|
|
13
|
+
* The route must be deterministic and side-effect-free. The framework invokes
|
|
14
|
+
* it once for each accepted admission, and durable replay uses the stored
|
|
15
|
+
* target instead of invoking it again.
|
|
16
|
+
*
|
|
17
|
+
* @returns Target Entity ID.
|
|
18
|
+
*/
|
|
19
|
+
export type CommandRoute<Id, Schema extends MessageSchema = MessageSchema> = (message: MessageShape<Schema>, context: CommandContext) => Id;
|
|
20
|
+
type CommandRoutingState<Id> = RoutingDeclarationState<CommandRoute<Id>>;
|
|
21
|
+
/**
|
|
22
|
+
* Mutable Command route declarations that repositories snapshot at construction.
|
|
23
|
+
*
|
|
24
|
+
* @typeParam Id Entity ID type owned by the receiving repository.
|
|
25
|
+
*/
|
|
26
|
+
export declare class CommandRouting<Id> {
|
|
27
|
+
/**
|
|
28
|
+
* Creates empty mutable Command route declarations.
|
|
29
|
+
*/
|
|
30
|
+
private constructor();
|
|
31
|
+
/**
|
|
32
|
+
* Creates empty Command route declarations.
|
|
33
|
+
*
|
|
34
|
+
* @typeParam Id Entity ID type owned by the receiving repository.
|
|
35
|
+
* @returns Mutable Command route declarations.
|
|
36
|
+
*/
|
|
37
|
+
static create<Id>(): CommandRouting<Id>;
|
|
38
|
+
/**
|
|
39
|
+
* Registers a route for one exact generated Command schema.
|
|
40
|
+
*
|
|
41
|
+
* @param schemaOrToken Generated Command schema.
|
|
42
|
+
* @param via Route that calculates the target Entity ID.
|
|
43
|
+
* @returns These mutable route declarations.
|
|
44
|
+
*/
|
|
45
|
+
route<Schema extends MessageSchema>(schemaOrToken: Schema, via: CommandRoute<Id, Schema>): this;
|
|
46
|
+
/**
|
|
47
|
+
* Registers a route for a nominal Command message-interface token.
|
|
48
|
+
*
|
|
49
|
+
* @param schemaOrToken Generated Command message-interface token.
|
|
50
|
+
* @param via Route that calculates the target Entity ID.
|
|
51
|
+
* @returns These mutable route declarations.
|
|
52
|
+
*/
|
|
53
|
+
route<TInterface extends object, Schemas extends InterfaceRouteSchemas>(schemaOrToken: MessageInterface<TInterface, Schemas>, via: (message: InterfaceRouteMessage<TInterface, Schemas>, context: CommandContext) => Id): this;
|
|
54
|
+
/**
|
|
55
|
+
* Replaces the declaration-first default Command route.
|
|
56
|
+
*
|
|
57
|
+
* @param via Route that calculates the target Entity ID.
|
|
58
|
+
* @returns These mutable route declarations.
|
|
59
|
+
*/
|
|
60
|
+
replaceDefault(via: CommandRoute<Id>): this;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Internal access to Command-routing declaration state.
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
export declare const CommandRoutingInternals: Readonly<{
|
|
68
|
+
state<Id>(routing: CommandRouting<Id>): CommandRoutingState<Id>;
|
|
69
|
+
snapshot<Id>(routing: CommandRouting<Id> | undefined): RoutingDeclarationSnapshot<CommandRoute<Id>>;
|
|
70
|
+
}>;
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=command-routing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-routing.d.ts","sourceRoot":"","sources":["../../src/repository/command-routing.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC7B,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,YAAY,CAAC,EAAE,EAAE,MAAM,SAAS,aAAa,GAAG,aAAa,IAAI,CAC3E,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAC7B,OAAO,EAAE,cAAc,KACpB,EAAE,CAAC;AAER,KAAK,mBAAmB,CAAC,EAAE,IAAI,uBAAuB,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;AAIzE;;;;GAIG;AACH,qBAAa,cAAc,CAAC,EAAE;IAG5B;;OAEG;IACH,OAAO;IAIP;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,cAAc,CAAC,EAAE,CAAC;IAIvC;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,SAAS,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,CAAC,EAAE,EAAE,MAAM,CAAC,GAAG,IAAI;IAE/F;;;;;;OAMG;IACH,KAAK,CAAC,UAAU,SAAS,MAAM,EAAE,OAAO,SAAS,qBAAqB,EACpE,aAAa,EAAE,gBAAgB,CAAC,UAAU,EAAE,OAAO,CAAC,EACpD,GAAG,EAAE,CAAC,OAAO,EAAE,qBAAqB,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,cAAc,KAAK,EAAE,GACxF,IAAI;IAwCP;;;;;OAKG;IACH,cAAc,CAAC,GAAG,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI;CAM5C;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC;IAC7C,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,CAAC,GAAG,mBAAmB,CAAC,EAAE,CAAC,CAAC;IAChE,QAAQ,CAAC,EAAE,EACT,OAAO,EAAE,cAAc,CAAC,EAAE,CAAC,GAAG,SAAS,GACtC,0BAA0B,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;CACjD,CAYC,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, CodeMatters. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
5
|
+
* in compliance with the License. You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
10
|
+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
11
|
+
* or implied. See the License for the specific language governing permissions and limitations under
|
|
12
|
+
* the License.
|
|
13
|
+
*/
|
|
14
|
+
import {} from "@spine-event-engine/core";
|
|
15
|
+
import { RoutingDeclarations, } from "./routing-declarations.js";
|
|
16
|
+
const routingStates = new WeakMap();
|
|
17
|
+
/**
|
|
18
|
+
* Mutable Command route declarations that repositories snapshot at construction.
|
|
19
|
+
*
|
|
20
|
+
* @typeParam Id Entity ID type owned by the receiving repository.
|
|
21
|
+
*/
|
|
22
|
+
export class CommandRouting {
|
|
23
|
+
// prettier-ignore
|
|
24
|
+
/**
|
|
25
|
+
* Creates empty mutable Command route declarations.
|
|
26
|
+
*/
|
|
27
|
+
constructor() {
|
|
28
|
+
routingStates.set(this, RoutingDeclarations.create());
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Creates empty Command route declarations.
|
|
32
|
+
*
|
|
33
|
+
* @typeParam Id Entity ID type owned by the receiving repository.
|
|
34
|
+
* @returns Mutable Command route declarations.
|
|
35
|
+
*/
|
|
36
|
+
static create() {
|
|
37
|
+
return new CommandRouting();
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Registers an exact generated Command-schema route or a nominal message-interface route.
|
|
41
|
+
*
|
|
42
|
+
* A schema route receives its exact message shape. An interface route receives
|
|
43
|
+
* {@link InterfaceRouteMessage}, the member-message union intersected with
|
|
44
|
+
* the declared interface. Routing selects an exact schema route first, then
|
|
45
|
+
* the first matching interface token in registration order, then the
|
|
46
|
+
* replacement/default route.
|
|
47
|
+
*
|
|
48
|
+
* Copied or malformed tokens fail during declaration. Every token member must
|
|
49
|
+
* be registered by the repository, or construction fails. The selected route
|
|
50
|
+
* runs once for an accepted admission; durable replay uses stored targets and
|
|
51
|
+
* does not run routing again.
|
|
52
|
+
*
|
|
53
|
+
* @param schemaOrToken Generated Command schema or nominal message-interface token.
|
|
54
|
+
* @param via Route that calculates the target Entity ID.
|
|
55
|
+
* @returns These mutable route declarations.
|
|
56
|
+
*/
|
|
57
|
+
route(schemaOrToken, via) {
|
|
58
|
+
if (typeof via !== "function")
|
|
59
|
+
throw new TypeError("Command routing requires a route function.");
|
|
60
|
+
const state = CommandRoutingInternals.state(this);
|
|
61
|
+
if (RoutingDeclarations.isInterfaceTokenCandidate(schemaOrToken)) {
|
|
62
|
+
RoutingDeclarations.routeInterface(state, schemaOrToken, via, "Command routing");
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
RoutingDeclarations.exact(state, schemaOrToken, via, "Command routing has a duplicate exact command route.");
|
|
66
|
+
}
|
|
67
|
+
return this;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Replaces the declaration-first default Command route.
|
|
71
|
+
*
|
|
72
|
+
* @param via Route that calculates the target Entity ID.
|
|
73
|
+
* @returns These mutable route declarations.
|
|
74
|
+
*/
|
|
75
|
+
replaceDefault(via) {
|
|
76
|
+
if (typeof via !== "function")
|
|
77
|
+
throw new TypeError("Command routing requires a route function.");
|
|
78
|
+
RoutingDeclarations.default(CommandRoutingInternals.state(this), via);
|
|
79
|
+
return this;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Internal access to Command-routing declaration state.
|
|
84
|
+
*
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
export const CommandRoutingInternals = Object.freeze({
|
|
88
|
+
state(routing) {
|
|
89
|
+
return routingStates.get(routing);
|
|
90
|
+
},
|
|
91
|
+
snapshot(routing) {
|
|
92
|
+
if (routing === undefined) {
|
|
93
|
+
return RoutingDeclarations.snapshot(RoutingDeclarations.create());
|
|
94
|
+
}
|
|
95
|
+
return RoutingDeclarations.snapshot(CommandRoutingInternals.state(routing));
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
//# sourceMappingURL=command-routing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-routing.js","sourceRoot":"","sources":["../../src/repository/command-routing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAA6C,MAAM,0BAA0B,CAAC;AAErF,OAAO,EACL,mBAAmB,GAKpB,MAAM,2BAA2B,CAAC;AAuBnC,MAAM,aAAa,GAAG,IAAI,OAAO,EAAwC,CAAC;AAE1E;;;;GAIG;AACH,MAAM,OAAO,cAAc;IACzB,kBAAkB;IAElB;;OAEG;IACH;QACE,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,mBAAmB,CAAC,MAAM,EAAoB,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,cAAc,EAAM,CAAC;IAClC,CAAC;IAuBD;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CACH,aAA8E,EAC9E,GAAqB;QAErB,IAAI,OAAO,GAAG,KAAK,UAAU;YAC3B,MAAM,IAAI,SAAS,CAAC,4CAA4C,CAAC,CAAC;QACpE,MAAM,KAAK,GAAG,uBAAuB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,mBAAmB,CAAC,yBAAyB,CAAC,aAAa,CAAC,EAAE,CAAC;YACjE,mBAAmB,CAAC,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,iBAAiB,CAAC,CAAC;QACnF,CAAC;aAAM,CAAC;YACN,mBAAmB,CAAC,KAAK,CACvB,KAAK,EACL,aAAa,EACb,GAAG,EACH,sDAAsD,CACvD,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,GAAqB;QAClC,IAAI,OAAO,GAAG,KAAK,UAAU;YAC3B,MAAM,IAAI,SAAS,CAAC,4CAA4C,CAAC,CAAC;QACpE,mBAAmB,CAAC,OAAO,CAAC,uBAAuB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAK/B,MAAM,CAAC,MAAM,CAAC;IACjB,KAAK,CAAK,OAA2B;QACnC,OAAO,aAAa,CAAC,GAAG,CAAC,OAAO,CAA4B,CAAC;IAC/D,CAAC;IACD,QAAQ,CACN,OAAuC;QAEvC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,mBAAmB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,MAAM,EAAoB,CAAC,CAAC;QACtF,CAAC;QACD,OAAO,mBAAmB,CAAC,QAAQ,CAAC,uBAAuB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9E,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface Commit {
|
|
2
|
+
readonly status: string;
|
|
3
|
+
}
|
|
4
|
+
type Guard = () => Promise<void>;
|
|
5
|
+
/**
|
|
6
|
+
* Executes a delivery callback with a commit-time ownership guard.
|
|
7
|
+
*
|
|
8
|
+
* @param guard Verifies that the delivery worker still owns its shard.
|
|
9
|
+
* @param callback Performs the delivery work within the guarded scope.
|
|
10
|
+
* @returns The value produced by the delivery callback.
|
|
11
|
+
*/
|
|
12
|
+
export declare function withDeliveryCommitFence<T>(guard: Guard, callback: () => Promise<T>): Promise<T>;
|
|
13
|
+
/**
|
|
14
|
+
* Verifies delivery ownership immediately before committing an Entity.
|
|
15
|
+
*
|
|
16
|
+
* @param entity Supplies the Entity whose transaction is committed.
|
|
17
|
+
* @param commit Commits the active Entity transaction synchronously.
|
|
18
|
+
* @returns The result produced by the Entity transaction commit.
|
|
19
|
+
*/
|
|
20
|
+
export declare function commitFenced<T extends Commit>(entity: object, commit: (entity: object) => T): Promise<T>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=commit-fence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-fence.d.ts","sourceRoot":"","sources":["../../src/repository/commit-fence.ts"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACd,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AACD,KAAK,KAAK,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;AAIjC;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAAC,CAAC,EAC7C,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACzB,OAAO,CAAC,CAAC,CAAC,CAEZ;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,CAAC,SAAS,MAAM,EACjD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,CAAC,GAC5B,OAAO,CAAC,CAAC,CAAC,CAGZ"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, CodeMatters. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
5
|
+
* in compliance with the License. You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
10
|
+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
11
|
+
* or implied. See the License for the specific language governing permissions and limitations under
|
|
12
|
+
* the License.
|
|
13
|
+
*/
|
|
14
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
15
|
+
const fences = new AsyncLocalStorage();
|
|
16
|
+
/**
|
|
17
|
+
* Executes a delivery callback with a commit-time ownership guard.
|
|
18
|
+
*
|
|
19
|
+
* @param guard Verifies that the delivery worker still owns its shard.
|
|
20
|
+
* @param callback Performs the delivery work within the guarded scope.
|
|
21
|
+
* @returns The value produced by the delivery callback.
|
|
22
|
+
*/
|
|
23
|
+
export async function withDeliveryCommitFence(guard, callback) {
|
|
24
|
+
return fences.run(guard, callback);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Verifies delivery ownership immediately before committing an Entity.
|
|
28
|
+
*
|
|
29
|
+
* @param entity Supplies the Entity whose transaction is committed.
|
|
30
|
+
* @param commit Commits the active Entity transaction synchronously.
|
|
31
|
+
* @returns The result produced by the Entity transaction commit.
|
|
32
|
+
*/
|
|
33
|
+
export async function commitFenced(entity, commit) {
|
|
34
|
+
await fences.getStore()?.();
|
|
35
|
+
return commit(entity);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=commit-fence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-fence.js","sourceRoot":"","sources":["../../src/repository/commit-fence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAOrD,MAAM,MAAM,GAAG,IAAI,iBAAiB,EAAS,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,KAAY,EACZ,QAA0B;IAE1B,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAc,EACd,MAA6B;IAE7B,MAAM,MAAM,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC;IAC5B,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { MessageShape } from "@bufbuild/protobuf";
|
|
2
|
+
import { type MessageInterface, type MessageSchema } from "@spine-event-engine/core";
|
|
3
|
+
import type { EventContext } from "@spine-event-engine/proto";
|
|
4
|
+
import { type InterfaceRouteSchemas, type InterfaceRouteMessage, type RoutingDeclarationSnapshot, type RoutingDeclarationState } from "./routing-declarations.js";
|
|
5
|
+
/**
|
|
6
|
+
* Calculates target Entity IDs for one Event admission.
|
|
7
|
+
*
|
|
8
|
+
* The route must be deterministic and side-effect-free. It runs once for an
|
|
9
|
+
* accepted admission; durable replay uses stored targets instead.
|
|
10
|
+
*
|
|
11
|
+
* @typeParam Id Entity ID type used by the receiving repository.
|
|
12
|
+
* @typeParam Schema Generated Event message schema.
|
|
13
|
+
* @param message Unpacked Event message.
|
|
14
|
+
* @param context Normalized Event context. When the signal omits its context,
|
|
15
|
+
* the framework supplies the default generated `EventContext` value.
|
|
16
|
+
* @returns Up to 1,000 target Entity IDs. The framework validates the complete
|
|
17
|
+
* result, copies and stable-deduplicates its IDs, and freezes the accepted
|
|
18
|
+
* plan. An empty array deliberately suppresses delivery to this repository.
|
|
19
|
+
*/
|
|
20
|
+
export type EventRoute<Id, Schema extends MessageSchema = MessageSchema> = (message: MessageShape<Schema>, context: EventContext) => readonly Id[];
|
|
21
|
+
type State<Id> = RoutingDeclarationState<EventRoute<Id>>;
|
|
22
|
+
/**
|
|
23
|
+
* Mutable Event route declarations snapshotted by repository construction.
|
|
24
|
+
*/
|
|
25
|
+
export declare class EventRouting<Id> {
|
|
26
|
+
/**
|
|
27
|
+
* Creates empty mutable Event route declarations.
|
|
28
|
+
*/
|
|
29
|
+
private constructor();
|
|
30
|
+
/**
|
|
31
|
+
* Creates empty Event route declarations.
|
|
32
|
+
*
|
|
33
|
+
* @typeParam Id Entity ID type used by the receiving repository.
|
|
34
|
+
* @returns Mutable Event route declarations.
|
|
35
|
+
*/
|
|
36
|
+
static create<Id>(): EventRouting<Id>;
|
|
37
|
+
/**
|
|
38
|
+
* Registers a route for one exact generated Event schema.
|
|
39
|
+
*
|
|
40
|
+
* @param schemaOrToken Generated Event schema.
|
|
41
|
+
* @param via Route that calculates target Entity IDs.
|
|
42
|
+
* @returns These mutable route declarations.
|
|
43
|
+
*/
|
|
44
|
+
route<Schema extends MessageSchema>(schemaOrToken: Schema, via: EventRoute<Id, Schema>): this;
|
|
45
|
+
/**
|
|
46
|
+
* Registers a route for a nominal Event message-interface token.
|
|
47
|
+
*
|
|
48
|
+
* @param schemaOrToken Generated Event message-interface token.
|
|
49
|
+
* @param via Route that calculates target Entity IDs.
|
|
50
|
+
* @returns These mutable route declarations.
|
|
51
|
+
*/
|
|
52
|
+
route<TInterface extends object, Schemas extends InterfaceRouteSchemas>(schemaOrToken: MessageInterface<TInterface, Schemas>, via: (message: InterfaceRouteMessage<TInterface, Schemas>, context: EventContext) => readonly Id[]): this;
|
|
53
|
+
/**
|
|
54
|
+
* Replaces the producer-aware default Event route.
|
|
55
|
+
*
|
|
56
|
+
* @param via Route that calculates target Entity IDs.
|
|
57
|
+
* @returns These mutable route declarations.
|
|
58
|
+
*/
|
|
59
|
+
replaceDefault(via: EventRoute<Id>): this;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Internal access to Event-routing declaration state.
|
|
63
|
+
*
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
export declare const EventRoutingInternals: Readonly<{
|
|
67
|
+
state<Id>(routing: EventRouting<Id>): State<Id>;
|
|
68
|
+
snapshot<Id>(routing: EventRouting<Id> | undefined): RoutingDeclarationSnapshot<EventRoute<Id>>;
|
|
69
|
+
}>;
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=event-routing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-routing.d.ts","sourceRoot":"","sources":["../../src/repository/event-routing.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC7B,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,UAAU,CAAC,EAAE,EAAE,MAAM,SAAS,aAAa,GAAG,aAAa,IAAI,CACzE,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAC7B,OAAO,EAAE,YAAY,KAClB,SAAS,EAAE,EAAE,CAAC;AAEnB,KAAK,KAAK,CAAC,EAAE,IAAI,uBAAuB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;AAGzD;;GAEG;AACH,qBAAa,YAAY,CAAC,EAAE;IAG1B;;OAEG;IACH,OAAO;IAIP;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,YAAY,CAAC,EAAE,CAAC;IAIrC;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,SAAS,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC,GAAG,IAAI;IAE7F;;;;;;OAMG;IACH,KAAK,CAAC,UAAU,SAAS,MAAM,EAAE,OAAO,SAAS,qBAAqB,EACpE,aAAa,EAAE,gBAAgB,CAAC,UAAU,EAAE,OAAO,CAAC,EACpD,GAAG,EAAE,CACH,OAAO,EAAE,qBAAqB,CAAC,UAAU,EAAE,OAAO,CAAC,EACnD,OAAO,EAAE,YAAY,KAClB,SAAS,EAAE,EAAE,GACjB,IAAI;IAuCP;;;;;OAKG;IACH,cAAc,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI;CAK1C;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC;IAC3C,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,SAAS,GAAG,0BAA0B,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;CACjG,CAUC,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, CodeMatters. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
5
|
+
* in compliance with the License. You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
10
|
+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
11
|
+
* or implied. See the License for the specific language governing permissions and limitations under
|
|
12
|
+
* the License.
|
|
13
|
+
*/
|
|
14
|
+
import {} from "@spine-event-engine/core";
|
|
15
|
+
import { RoutingDeclarations, } from "./routing-declarations.js";
|
|
16
|
+
const states = new WeakMap();
|
|
17
|
+
/**
|
|
18
|
+
* Mutable Event route declarations snapshotted by repository construction.
|
|
19
|
+
*/
|
|
20
|
+
export class EventRouting {
|
|
21
|
+
// prettier-ignore
|
|
22
|
+
/**
|
|
23
|
+
* Creates empty mutable Event route declarations.
|
|
24
|
+
*/
|
|
25
|
+
constructor() {
|
|
26
|
+
states.set(this, RoutingDeclarations.create());
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Creates empty Event route declarations.
|
|
30
|
+
*
|
|
31
|
+
* @typeParam Id Entity ID type used by the receiving repository.
|
|
32
|
+
* @returns Mutable Event route declarations.
|
|
33
|
+
*/
|
|
34
|
+
static create() {
|
|
35
|
+
return new EventRouting();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Registers an exact generated Event-schema route or a nominal message-interface route.
|
|
39
|
+
*
|
|
40
|
+
* A schema route receives its exact message shape. An interface route receives
|
|
41
|
+
* {@link InterfaceRouteMessage}, the member-message union intersected with
|
|
42
|
+
* the declared interface. Routing selects an exact schema route first, then
|
|
43
|
+
* the first matching interface token in registration order, then the
|
|
44
|
+
* replacement/default route.
|
|
45
|
+
*
|
|
46
|
+
* Copied or malformed tokens fail during declaration. Every token member must
|
|
47
|
+
* be registered by the repository, or construction fails. The selected route
|
|
48
|
+
* runs once for an accepted admission; durable replay uses stored targets and
|
|
49
|
+
* does not run routing again.
|
|
50
|
+
*
|
|
51
|
+
* @param schemaOrToken Generated Event schema or nominal message-interface token.
|
|
52
|
+
* @param via Route that calculates target Entity IDs.
|
|
53
|
+
* @returns These mutable route declarations.
|
|
54
|
+
*/
|
|
55
|
+
route(schemaOrToken, via) {
|
|
56
|
+
if (typeof via !== "function")
|
|
57
|
+
throw new TypeError("Event routing requires a route function.");
|
|
58
|
+
const state = EventRoutingInternals.state(this);
|
|
59
|
+
if (RoutingDeclarations.isInterfaceTokenCandidate(schemaOrToken)) {
|
|
60
|
+
RoutingDeclarations.routeInterface(state, schemaOrToken, via, "Event routing");
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
RoutingDeclarations.exact(state, schemaOrToken, via, "Event routing has a duplicate exact event route.");
|
|
64
|
+
}
|
|
65
|
+
return this;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Replaces the producer-aware default Event route.
|
|
69
|
+
*
|
|
70
|
+
* @param via Route that calculates target Entity IDs.
|
|
71
|
+
* @returns These mutable route declarations.
|
|
72
|
+
*/
|
|
73
|
+
replaceDefault(via) {
|
|
74
|
+
if (typeof via !== "function")
|
|
75
|
+
throw new TypeError("Event routing requires a route function.");
|
|
76
|
+
RoutingDeclarations.default(EventRoutingInternals.state(this), via);
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Internal access to Event-routing declaration state.
|
|
82
|
+
*
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
export const EventRoutingInternals = Object.freeze({
|
|
86
|
+
state(routing) {
|
|
87
|
+
return states.get(routing);
|
|
88
|
+
},
|
|
89
|
+
snapshot(routing) {
|
|
90
|
+
if (routing === undefined) {
|
|
91
|
+
return RoutingDeclarations.snapshot(RoutingDeclarations.create());
|
|
92
|
+
}
|
|
93
|
+
return RoutingDeclarations.snapshot(EventRoutingInternals.state(routing));
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
//# sourceMappingURL=event-routing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-routing.js","sourceRoot":"","sources":["../../src/repository/event-routing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAA6C,MAAM,0BAA0B,CAAC;AAErF,OAAO,EACL,mBAAmB,GAKpB,MAAM,2BAA2B,CAAC;AAuBnC,MAAM,MAAM,GAAG,IAAI,OAAO,EAA0B,CAAC;AAErD;;GAEG;AACH,MAAM,OAAO,YAAY;IACvB,kBAAkB;IAElB;;OAEG;IACH;QACE,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,mBAAmB,CAAC,MAAM,EAAkB,CAAC,CAAC;IACjE,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,YAAY,EAAM,CAAC;IAChC,CAAC;IA0BD;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CACH,aAA8E,EAC9E,GAAmB;QAEnB,IAAI,OAAO,GAAG,KAAK,UAAU;YAAE,MAAM,IAAI,SAAS,CAAC,0CAA0C,CAAC,CAAC;QAC/F,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,mBAAmB,CAAC,yBAAyB,CAAC,aAAa,CAAC,EAAE,CAAC;YACjE,mBAAmB,CAAC,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,CAAC,CAAC;QACjF,CAAC;aAAM,CAAC;YACN,mBAAmB,CAAC,KAAK,CACvB,KAAK,EACL,aAAa,EACb,GAAG,EACH,kDAAkD,CACnD,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,GAAmB;QAChC,IAAI,OAAO,GAAG,KAAK,UAAU;YAAE,MAAM,IAAI,SAAS,CAAC,0CAA0C,CAAC,CAAC;QAC/F,mBAAmB,CAAC,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACpE,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAG7B,MAAM,CAAC,MAAM,CAAC;IACjB,KAAK,CAAK,OAAyB;QACjC,OAAO,MAAM,CAAC,GAAG,CAAC,OAAO,CAAc,CAAC;IAC1C,CAAC;IACD,QAAQ,CAAK,OAAqC;QAChD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,mBAAmB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,MAAM,EAAkB,CAAC,CAAC;QACpF,CAAC;QACD,OAAO,mBAAmB,CAAC,QAAQ,CAAC,qBAAqB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5E,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type Any } from "@bufbuild/protobuf/wkt";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a scalar value that may identify an entity.
|
|
4
|
+
*/
|
|
5
|
+
export type PrimitiveId = string | number | bigint | boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Packs and reads scalar entity identifiers.
|
|
8
|
+
*/
|
|
9
|
+
export interface PrimitiveIdCodec {
|
|
10
|
+
/**
|
|
11
|
+
* Packs an identifier into a Protobuf `Any` value.
|
|
12
|
+
*
|
|
13
|
+
* @param id Identifier to pack.
|
|
14
|
+
* @returns Packed identifier.
|
|
15
|
+
*/
|
|
16
|
+
pack(id: PrimitiveId): Any;
|
|
17
|
+
/**
|
|
18
|
+
* Reads a scalar identifier from an unknown value.
|
|
19
|
+
*
|
|
20
|
+
* @param value Value to inspect.
|
|
21
|
+
* @returns Scalar identifier, or `undefined` when the value is unsupported.
|
|
22
|
+
*/
|
|
23
|
+
read(value: unknown): PrimitiveId | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Reads a finite scalar identifier from an unknown value.
|
|
26
|
+
*
|
|
27
|
+
* @param value Value to inspect.
|
|
28
|
+
* @returns Scalar identifier, or `undefined` when it is unsupported or non-finite.
|
|
29
|
+
*/
|
|
30
|
+
readFinite(value: unknown): PrimitiveId | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Unpacks a scalar identifier from a Protobuf `Any` value.
|
|
33
|
+
*
|
|
34
|
+
* @param id Packed identifier to unpack.
|
|
35
|
+
* @returns Scalar identifier, or `undefined` when it is absent or unsupported.
|
|
36
|
+
*/
|
|
37
|
+
unpack(id: Any | undefined): PrimitiveId | undefined;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Describes the type name and scalar value of a message-shaped identifier.
|
|
41
|
+
*/
|
|
42
|
+
export interface MessageId {
|
|
43
|
+
/**
|
|
44
|
+
* Declares the fully-qualified Protobuf message type name.
|
|
45
|
+
*/
|
|
46
|
+
readonly $typeName: string;
|
|
47
|
+
/**
|
|
48
|
+
* Holds the scalar identifier value.
|
|
49
|
+
*/
|
|
50
|
+
readonly value: PrimitiveId;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Reads and keys message-shaped entity identifiers.
|
|
54
|
+
*/
|
|
55
|
+
export interface MessageIdCodec {
|
|
56
|
+
/**
|
|
57
|
+
* Reads a message-shaped identifier from an unknown value.
|
|
58
|
+
*
|
|
59
|
+
* @param value Value to inspect.
|
|
60
|
+
* @returns Identifier, or `undefined` when the value is malformed.
|
|
61
|
+
*/
|
|
62
|
+
read(value: unknown): MessageId | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Reads the scalar value from a message-shaped identifier.
|
|
65
|
+
*
|
|
66
|
+
* @param value Value to inspect.
|
|
67
|
+
* @returns Scalar identifier, or `undefined` when the value is malformed.
|
|
68
|
+
*/
|
|
69
|
+
readValue(value: unknown): PrimitiveId | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Creates a stable storage key for a message-shaped identifier.
|
|
72
|
+
*
|
|
73
|
+
* @param id Identifier to encode.
|
|
74
|
+
* @returns Stable key that distinguishes message type and scalar value type.
|
|
75
|
+
*/
|
|
76
|
+
key(id: MessageId): string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Provides the default scalar identifier codec.
|
|
80
|
+
*/
|
|
81
|
+
export declare const PrimitiveIds: PrimitiveIdCodec;
|
|
82
|
+
/**
|
|
83
|
+
* Provides the default message-shaped identifier codec.
|
|
84
|
+
*/
|
|
85
|
+
export declare const MessageIds: MessageIdCodec;
|
|
86
|
+
//# sourceMappingURL=primitive-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitive-id.d.ts","sourceRoot":"","sources":["../../src/repository/primitive-id.ts"],"names":[],"mappings":"AAeA,OAAO,EAML,KAAK,GAAG,EACT,MAAM,wBAAwB,CAAC;AAIhC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAG/B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC;IAE3B;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC;IAE9C;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC;IAEpD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,EAAE,GAAG,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IAGxB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAG7B;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAE5C;;;;;OAKG;IACH,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC;IAEnD;;;;;OAKG;IACH,GAAG,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,gBAsCzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,cAmBvB,CAAC"}
|