@spine-event-engine/server 2.0.0-snapshot.2 → 2.0.0-snapshot.21
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/README.md +225 -518
- package/REFERENCE.md +498 -49
- package/dist/browser/browser-server.d.ts +95 -0
- package/dist/browser/browser-server.d.ts.map +1 -0
- package/dist/{server → browser}/browser-server.js +93 -7
- package/dist/browser/browser-server.js.map +1 -0
- package/dist/browser/durable-subscription-bindings.d.ts.map +1 -0
- package/dist/browser/durable-subscription-bindings.js.map +1 -0
- package/dist/browser/index.d.ts +12 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +24 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/options.d.ts +183 -0
- package/dist/browser/options.d.ts.map +1 -0
- package/dist/browser/options.js +15 -0
- package/dist/browser/options.js.map +1 -0
- package/dist/bus/command-bus.d.ts +2 -0
- package/dist/bus/command-bus.d.ts.map +1 -1
- package/dist/bus/command-bus.js +36 -1
- package/dist/bus/command-bus.js.map +1 -1
- package/dist/bus/event-dispatcher-registry.d.ts +2 -2
- package/dist/bus/event-dispatcher-registry.js +3 -3
- package/dist/bus/event-dispatcher-registry.js.map +1 -1
- package/dist/context/bounded-context.d.ts +238 -83
- package/dist/context/bounded-context.d.ts.map +1 -1
- package/dist/context/bounded-context.js +1083 -286
- package/dist/context/bounded-context.js.map +1 -1
- package/dist/context/effective-tenant.d.ts +9 -0
- package/dist/context/effective-tenant.d.ts.map +1 -0
- package/dist/context/effective-tenant.js +58 -0
- package/dist/context/effective-tenant.js.map +1 -0
- package/dist/context/entity-inbox.d.ts.map +1 -1
- package/dist/context/entity-inbox.js +24 -17
- package/dist/context/entity-inbox.js.map +1 -1
- package/dist/context/local-inbox-handoff.d.ts +7 -3
- package/dist/context/local-inbox-handoff.d.ts.map +1 -1
- package/dist/context/local-inbox-handoff.js +32 -26
- package/dist/context/local-inbox-handoff.js.map +1 -1
- package/dist/context/projection-handoff.d.ts.map +1 -1
- package/dist/context/projection-handoff.js +36 -31
- package/dist/context/projection-handoff.js.map +1 -1
- package/dist/context/tenant-index.d.ts.map +1 -1
- package/dist/context/tenant-index.js +72 -2
- package/dist/context/tenant-index.js.map +1 -1
- package/dist/delivery/delivery-ports.d.ts +14 -4
- package/dist/delivery/delivery-ports.d.ts.map +1 -1
- package/dist/delivery/delivery.d.ts +19 -21
- package/dist/delivery/delivery.d.ts.map +1 -1
- package/dist/delivery/delivery.js +541 -158
- package/dist/delivery/delivery.js.map +1 -1
- package/dist/delivery/inbox-storage.d.ts +12 -3
- package/dist/delivery/inbox-storage.d.ts.map +1 -1
- package/dist/delivery/inbox-storage.js +160 -67
- package/dist/delivery/inbox-storage.js.map +1 -1
- package/dist/delivery/inbox.d.ts +9 -0
- package/dist/delivery/inbox.d.ts.map +1 -1
- package/dist/delivery/inbox.js +11 -0
- package/dist/delivery/inbox.js.map +1 -1
- package/dist/delivery/sharded-work-registry.d.ts.map +1 -1
- package/dist/delivery/sharded-work-registry.js +2 -1
- package/dist/delivery/sharded-work-registry.js.map +1 -1
- package/dist/entity/entity-metadata.d.ts +14 -5
- package/dist/entity/entity-metadata.d.ts.map +1 -1
- package/dist/entity/entity-metadata.js +38 -2
- package/dist/entity/entity-metadata.js.map +1 -1
- package/dist/entity/entity-storage-descriptor.d.ts +25 -5
- package/dist/entity/entity-storage-descriptor.d.ts.map +1 -1
- package/dist/entity/entity-storage-descriptor.js +69 -23
- package/dist/entity/entity-storage-descriptor.js.map +1 -1
- package/dist/entity/entity-transaction.d.ts +46 -42
- package/dist/entity/entity-transaction.d.ts.map +1 -1
- package/dist/entity/entity-transaction.js +130 -35
- package/dist/entity/entity-transaction.js.map +1 -1
- package/dist/entity/entity.d.ts +243 -98
- package/dist/entity/entity.d.ts.map +1 -1
- package/dist/entity/entity.js +405 -226
- package/dist/entity/entity.js.map +1 -1
- package/dist/entity/spec-scanner.d.ts +13 -1
- package/dist/entity/spec-scanner.d.ts.map +1 -1
- package/dist/entity/spec-scanner.js +20 -3
- package/dist/entity/spec-scanner.js.map +1 -1
- package/dist/handler/command-registration-readiness.d.ts +6 -6
- package/dist/handler/command-registration-readiness.d.ts.map +1 -1
- package/dist/handler/command-registration-readiness.js +4 -2
- package/dist/handler/command-registration-readiness.js.map +1 -1
- package/dist/handler/declared-rejections.d.ts +11 -0
- package/dist/handler/declared-rejections.d.ts.map +1 -0
- package/dist/handler/declared-rejections.js +34 -0
- package/dist/handler/declared-rejections.js.map +1 -0
- package/dist/handler/event-registration-readiness.d.ts +13 -56
- package/dist/handler/event-registration-readiness.d.ts.map +1 -1
- package/dist/handler/event-registration-readiness.js +23 -43
- package/dist/handler/event-registration-readiness.js.map +1 -1
- package/dist/handler/generated-handler-registry.d.ts +72 -33
- package/dist/handler/generated-handler-registry.d.ts.map +1 -1
- package/dist/handler/generated-handler-registry.js +421 -43
- package/dist/handler/generated-handler-registry.js.map +1 -1
- package/dist/handler/generated-registry-discovery.d.ts.map +1 -1
- package/dist/handler/generated-registry-discovery.js +2 -4
- package/dist/handler/generated-registry-discovery.js.map +1 -1
- package/dist/handler/handler-decorators.d.ts +91 -37
- package/dist/handler/handler-decorators.d.ts.map +1 -1
- package/dist/handler/handler-decorators.js +124 -31
- package/dist/handler/handler-decorators.js.map +1 -1
- package/dist/handler/handler-metadata.d.ts +105 -60
- package/dist/handler/handler-metadata.d.ts.map +1 -1
- package/dist/handler/handler-metadata.js +275 -57
- package/dist/handler/handler-metadata.js.map +1 -1
- package/dist/handler/registration-readiness-metadata.d.ts +4 -0
- package/dist/handler/registration-readiness-metadata.d.ts.map +1 -1
- package/dist/handler/registration-readiness-metadata.js +84 -2
- package/dist/handler/registration-readiness-metadata.js.map +1 -1
- package/dist/handler/standalone.d.ts +25 -0
- package/dist/handler/standalone.d.ts.map +1 -0
- package/dist/handler/standalone.js +38 -0
- package/dist/handler/standalone.js.map +1 -0
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/repository/command-routing.d.ts +63 -10
- package/dist/repository/command-routing.d.ts.map +1 -1
- package/dist/repository/command-routing.js +41 -8
- package/dist/repository/command-routing.js.map +1 -1
- package/dist/repository/event-routing.d.ts +64 -9
- package/dist/repository/event-routing.d.ts.map +1 -1
- package/dist/repository/event-routing.js +42 -7
- package/dist/repository/event-routing.js.map +1 -1
- package/dist/repository/primitive-id.d.ts +12 -23
- package/dist/repository/primitive-id.d.ts.map +1 -1
- package/dist/repository/primitive-id.js +2 -27
- package/dist/repository/primitive-id.js.map +1 -1
- package/dist/repository/repository.d.ts +317 -87
- package/dist/repository/repository.d.ts.map +1 -1
- package/dist/repository/repository.js +3746 -856
- package/dist/repository/repository.js.map +1 -1
- package/dist/repository/state-update-routing.d.ts +67 -8
- package/dist/repository/state-update-routing.d.ts.map +1 -1
- package/dist/repository/state-update-routing.js +45 -6
- package/dist/repository/state-update-routing.js.map +1 -1
- package/dist/runtime/runtime.js +1 -1
- package/dist/runtime/runtime.js.map +1 -1
- package/dist/runtime/signal-metadata.d.ts +22 -47
- package/dist/runtime/signal-metadata.d.ts.map +1 -1
- package/dist/runtime/signal-metadata.js +34 -69
- package/dist/runtime/signal-metadata.js.map +1 -1
- package/dist/runtime/signal-publisher.d.ts +144 -0
- package/dist/runtime/signal-publisher.d.ts.map +1 -0
- package/dist/runtime/signal-publisher.js +248 -0
- package/dist/runtime/signal-publisher.js.map +1 -0
- package/dist/runtime/standalone-handler-runtime.d.ts +130 -0
- package/dist/runtime/standalone-handler-runtime.d.ts.map +1 -0
- package/dist/runtime/standalone-handler-runtime.js +382 -0
- package/dist/runtime/standalone-handler-runtime.js.map +1 -0
- package/dist/server/environment-attachment.d.ts.map +1 -1
- package/dist/server/environment-attachment.js +2 -1
- package/dist/server/environment-attachment.js.map +1 -1
- package/dist/server/environment-delivery-worker.d.ts.map +1 -1
- package/dist/server/environment-delivery-worker.js +21 -12
- package/dist/server/environment-delivery-worker.js.map +1 -1
- package/dist/server/managed-server-application.d.ts +4 -1
- package/dist/server/managed-server-application.d.ts.map +1 -1
- package/dist/server/managed-server-application.js +2 -2
- package/dist/server/managed-server-application.js.map +1 -1
- package/dist/server/node-coordinator.js +2 -2
- package/dist/server/node-coordinator.js.map +1 -1
- package/dist/server/server-log.d.ts.map +1 -1
- package/dist/server/server-log.js +4 -0
- package/dist/server/server-log.js.map +1 -1
- package/dist/server/server.d.ts +9 -177
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/server.js +428 -178
- package/dist/server/server.js.map +1 -1
- package/dist/services/query-reader.d.ts +19 -0
- package/dist/services/query-reader.d.ts.map +1 -0
- package/dist/services/query-reader.js +43 -0
- package/dist/services/query-reader.js.map +1 -0
- package/dist/services/registered-targets.d.ts +73 -0
- package/dist/services/registered-targets.d.ts.map +1 -0
- package/dist/services/registered-targets.js +127 -0
- package/dist/services/registered-targets.js.map +1 -0
- package/dist/services/spine-services.d.ts +26 -12
- package/dist/services/spine-services.d.ts.map +1 -1
- package/dist/services/spine-services.js +1047 -969
- package/dist/services/spine-services.js.map +1 -1
- package/dist/spi/delivery.d.ts +5 -0
- package/dist/spi/delivery.d.ts.map +1 -0
- package/dist/spi/delivery.js +18 -0
- package/dist/spi/delivery.js.map +1 -0
- package/dist/spi/handler-registry.d.ts +8 -0
- package/dist/spi/handler-registry.d.ts.map +1 -0
- package/dist/spi/handler-registry.js +15 -0
- package/dist/spi/handler-registry.js.map +1 -0
- package/dist/stand/stand.d.ts +73 -1
- package/dist/stand/stand.d.ts.map +1 -1
- package/dist/stand/stand.js +221 -48
- package/dist/stand/stand.js.map +1 -1
- package/dist/stand/subscription-observer.d.ts.map +1 -1
- package/dist/stand/subscription-observer.js +5 -12
- package/dist/stand/subscription-observer.js.map +1 -1
- package/dist/stand/subscription-registry.js +1 -1
- package/dist/stand/subscription-registry.js.map +1 -1
- package/dist/testing/index.d.ts +25 -3
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +23 -3
- package/dist/testing/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +33 -23
- package/dist/handler/build-time-handler-analyzer.d.ts +0 -150
- package/dist/handler/build-time-handler-analyzer.d.ts.map +0 -1
- package/dist/handler/build-time-handler-analyzer.js +0 -1101
- package/dist/handler/build-time-handler-analyzer.js.map +0 -1
- package/dist/handler/generated-registry-writer.d.ts +0 -58
- package/dist/handler/generated-registry-writer.d.ts.map +0 -1
- package/dist/handler/generated-registry-writer.js +0 -458
- package/dist/handler/generated-registry-writer.js.map +0 -1
- package/dist/handler/handler-codegen.d.ts +0 -48
- package/dist/handler/handler-codegen.d.ts.map +0 -1
- package/dist/handler/handler-codegen.js +0 -214
- package/dist/handler/handler-codegen.js.map +0 -1
- package/dist/server/browser-server.d.ts +0 -49
- package/dist/server/browser-server.d.ts.map +0 -1
- package/dist/server/browser-server.js.map +0 -1
- package/dist/server/durable-subscription-bindings.d.ts.map +0 -1
- package/dist/server/durable-subscription-bindings.js.map +0 -1
- /package/dist/{server → browser}/durable-subscription-bindings.d.ts +0 -0
- /package/dist/{server → browser}/durable-subscription-bindings.js +0 -0
|
@@ -18,7 +18,6 @@ import { HandlerMetadataRegistry } from "./handler-metadata.js";
|
|
|
18
18
|
const defaultExportName = "generatedHandlerRegistry";
|
|
19
19
|
const generatedRegistryFile = "generated/handler/generated-handler-registry.js";
|
|
20
20
|
const moduleSchemeRe = /^[A-Za-z][A-Za-z\d+.-]*:/;
|
|
21
|
-
const registryVersion = 3;
|
|
22
21
|
/**
|
|
23
22
|
* Error thrown when generated registry discovery or loading fails.
|
|
24
23
|
*/
|
|
@@ -177,9 +176,8 @@ const RegistryModules = Object.freeze({
|
|
|
177
176
|
if (value === null || typeof value !== "object") {
|
|
178
177
|
return false;
|
|
179
178
|
}
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
return version === registryVersion && Array.isArray(entities);
|
|
179
|
+
const receivers = value.receivers;
|
|
180
|
+
return Array.isArray(receivers);
|
|
183
181
|
},
|
|
184
182
|
normalize(moduleRef) {
|
|
185
183
|
if (moduleRef instanceof URL) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-registry-discovery.js","sourceRoot":"","sources":["../../src/handler/generated-registry-discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,OAAO,EAEL,uBAAuB,GACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AACrD,MAAM,qBAAqB,GAAG,iDAAiD,CAAC;AAChF,MAAM,cAAc,GAAG,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"generated-registry-discovery.js","sourceRoot":"","sources":["../../src/handler/generated-registry-discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,OAAO,EAEL,uBAAuB,GACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AACrD,MAAM,qBAAqB,GAAG,iDAAiD,CAAC;AAChF,MAAM,cAAc,GAAG,0BAA0B,CAAC;AAoClD;;GAEG;AACH,MAAM,OAAO,+BAAgC,SAAQ,KAAK;IACxD,kBAAkB;IAElB;;OAEG;IACM,IAAI,CAA6B;IAE1C;;OAEG;IACM,QAAQ,CAAS;IAE1B;;OAEG;IACe,KAAK,CAAU;IAEjC;;;;;;;OAOG;IACH,YACE,IAAgC,EAChC,OAAe,EACf,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B,CACvC,2BAA2B,EAC3B,sCAAsC,QAAQ,8BAA8B,EAC5E,QAAQ,CACT,CAAC;YACJ,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { DescriptorMessageSchema } from "../entity/entity-metadata.js";
|
|
2
|
-
import { type EntityClass, type EntityHandlersMetadata, type
|
|
2
|
+
import { type EntityClass, type EntityHandlersMetadata, type WhereOptions } from "./handler-metadata.js";
|
|
3
3
|
export type { WhereOptions } from "./handler-metadata.js";
|
|
4
4
|
/**
|
|
5
5
|
* Describes the standard TypeScript method decorator accepted by Spine handler declarations.
|
|
6
6
|
*
|
|
7
|
-
* @typeParam This
|
|
7
|
+
* @typeParam This Receiver instance on which the decorated method runs.
|
|
8
8
|
* @typeParam Parameters - Parameters accepted by the decorated method.
|
|
9
9
|
* @typeParam Return - Result returned by the decorated method.
|
|
10
10
|
* @param value Decorated method implementation.
|
|
@@ -14,7 +14,7 @@ export type HandlerMethodDecorator = <This extends object, Parameters extends re
|
|
|
14
14
|
/**
|
|
15
15
|
* Describes an instance method shape accepted by public handler decorators.
|
|
16
16
|
*
|
|
17
|
-
* @typeParam This
|
|
17
|
+
* @typeParam This Receiver instance on which the method runs.
|
|
18
18
|
* @typeParam Parameters - Parameters accepted by the method.
|
|
19
19
|
* @typeParam Return - Result returned by the method.
|
|
20
20
|
* @param this Entity instance that receives the invocation.
|
|
@@ -22,6 +22,27 @@ export type HandlerMethodDecorator = <This extends object, Parameters extends re
|
|
|
22
22
|
* @returns Handler result.
|
|
23
23
|
*/
|
|
24
24
|
export type HandlerMethodValue<This extends object = object, Parameters extends readonly unknown[] = readonly unknown[], Return = unknown> = (this: This, ...parameters: Parameters) => Return;
|
|
25
|
+
/**
|
|
26
|
+
* Generated companion declaration for a rejection that a command receptor may throw.
|
|
27
|
+
*/
|
|
28
|
+
export interface RejectionDeclaration {
|
|
29
|
+
/**
|
|
30
|
+
* Generated Protobuf schema of the declared rejection.
|
|
31
|
+
*/
|
|
32
|
+
readonly schema: DescriptorMessageSchema;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Validates declared domain rejections for build-time handler discovery.
|
|
36
|
+
*
|
|
37
|
+
* Put `@Assign` or `@Command` first and `@Throws` last for readability; either
|
|
38
|
+
* order is accepted. The generated registry registers these rejection types
|
|
39
|
+
* even when no server handler consumes them. Rejections are thrown, not normal
|
|
40
|
+
* return values, and do not belong in the handler's return union or tuple.
|
|
41
|
+
*
|
|
42
|
+
* @param declarations Generated rejection companions.
|
|
43
|
+
* @returns A method decorator that validates the annotated instance method.
|
|
44
|
+
*/
|
|
45
|
+
export declare function Throws(...declarations: readonly RejectionDeclaration[]): HandlerMethodDecorator;
|
|
25
46
|
/**
|
|
26
47
|
* Creates a command-assignee declaration.
|
|
27
48
|
*
|
|
@@ -31,7 +52,21 @@ export type HandlerMethodValue<This extends object = object, Parameters extends
|
|
|
31
52
|
* throwable. The decorator records metadata only; it does not register the
|
|
32
53
|
* handler, instantiate the entity, or invoke the method.
|
|
33
54
|
*
|
|
34
|
-
*
|
|
55
|
+
* Declare a generated Event type, a union such as `TaskAssigned | TaskReassigned`,
|
|
56
|
+
* a flat Event array (`T[]`, `readonly T[]`, `Array<T>`, or `ReadonlyArray<T>`),
|
|
57
|
+
* or a fixed tuple such as `readonly [TaskCreated, TaskAssigned?]`. Tuples may
|
|
58
|
+
* have named entries and union alternatives. Concrete local/imported aliases
|
|
59
|
+
* and exactly one outer built-in `Promise` are supported. A successful command
|
|
60
|
+
* must produce at least one Event; `void`, whole-result `undefined`, and
|
|
61
|
+
* optional-only tuples are not valid assignment declarations.
|
|
62
|
+
*
|
|
63
|
+
* Return domain messages, not framework envelopes or rejections. Nested
|
|
64
|
+
* collections, rest tuples, nested promises, custom thenables, `any`, and
|
|
65
|
+
* `unknown` are unsupported. TypeScript checks tuple structure; Spine validates
|
|
66
|
+
* each returned message against this handler's declarations and keeps its order.
|
|
67
|
+
* Declare thrown domain rejections separately with {@link Throws}.
|
|
68
|
+
*
|
|
69
|
+
* @typeParam This Receiver instance on which the method runs.
|
|
35
70
|
* @typeParam Parameters - Parameters accepted by the method.
|
|
36
71
|
* @typeParam Return - Result returned by the method.
|
|
37
72
|
* @param value Decorated method implementation or command schema.
|
|
@@ -39,15 +74,32 @@ export type HandlerMethodValue<This extends object = object, Parameters extends
|
|
|
39
74
|
*/
|
|
40
75
|
export declare function Assign<This extends object, Parameters extends readonly unknown[], Return>(value: HandlerMethodValue<This, Parameters, Return>, context: ClassMethodDecoratorContext<This, HandlerMethodValue<This, Parameters, Return>>): void;
|
|
41
76
|
/**
|
|
42
|
-
* Creates a command
|
|
43
|
-
*
|
|
44
|
-
* Bare `@Command`
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
77
|
+
* Creates a command handler declaration.
|
|
78
|
+
*
|
|
79
|
+
* Bare `@Command` accepts a generated Command, Event, or rejection input.
|
|
80
|
+
* A Command input is the unique command-substitution receptor for its type and
|
|
81
|
+
* substitutes it with one or more Commands. Among Entity repositories, only
|
|
82
|
+
* Process Managers support `@Command`; Aggregates and Projections reject it.
|
|
83
|
+
* Standalone receivers use `AbstractCommander`.
|
|
84
|
+
* Event and rejection inputs are Event Bus reactions that may return Commands.
|
|
85
|
+
* Rejections are thrown, not returned.
|
|
86
|
+
*
|
|
87
|
+
* Declare a generated Command, a union such as
|
|
88
|
+
* `CreateAccessGrant | ExtendAccessGrant`, a flat Command array, or a fixed
|
|
89
|
+
* tuple. Arrays support `T[]`, `readonly T[]`, `Array<T>`, and `ReadonlyArray<T>`;
|
|
90
|
+
* tuples support readonly, named, optional, and union-valued entries. Concrete
|
|
91
|
+
* local/imported aliases and one outer built-in `Promise` are supported.
|
|
92
|
+
* A Command-input handler must declare a guaranteed Command output. An
|
|
93
|
+
* Event/rejection reaction may declare `undefined` alone or in any supported
|
|
94
|
+
* union, and may return an empty typed Command array. `void` is not supported
|
|
95
|
+
* for reactions; optional-only tuples are rejected for Command inputs.
|
|
96
|
+
*
|
|
97
|
+
* Every result must be a declared domain Command, not a framework envelope.
|
|
98
|
+
* Nested collections, rest tuples, nested promises, custom thenables, `any`,
|
|
99
|
+
* and `unknown` are unsupported. TypeScript checks tuple structure; Spine
|
|
100
|
+
* validates returned message types and preserves their order.
|
|
101
|
+
*
|
|
102
|
+
* @typeParam This Receiver instance on which the method runs.
|
|
51
103
|
* @typeParam Parameters - Parameters accepted by the method.
|
|
52
104
|
* @typeParam Return - Result returned by the method.
|
|
53
105
|
* @param value Decorated method implementation or command schema.
|
|
@@ -58,12 +110,17 @@ export declare function Command<This extends object, Parameters extends readonly
|
|
|
58
110
|
* Creates an Event/rejection or Entity-state subscriber declaration.
|
|
59
111
|
*
|
|
60
112
|
* Bare `@Subscribe` accepts generated Event/rejection or descriptor-marked
|
|
61
|
-
* Entity-state inputs and
|
|
113
|
+
* Entity-state inputs and declares `void` or one built-in `Promise<void>`;
|
|
114
|
+
* aliases and parenthesized forms of `void` are supported, but `undefined`
|
|
115
|
+
* alone is not a subscriber return type.
|
|
116
|
+
* It does not return signals; unions, arrays, and tuples of messages belong in
|
|
117
|
+
* producing handlers such as {@link React}, not subscribers. Nested promises
|
|
118
|
+
* and custom thenables are unsupported. Event/rejection inputs produce
|
|
62
119
|
* event-subscription metadata; Entity state inputs produce state-subscription
|
|
63
120
|
* metadata. Subscribers are metadata-only declarations bridged by generated
|
|
64
121
|
* registry and runtime metadata.
|
|
65
122
|
*
|
|
66
|
-
* @typeParam This
|
|
123
|
+
* @typeParam This Receiver instance on which the method runs.
|
|
67
124
|
* @typeParam Parameters - Parameters accepted by the method.
|
|
68
125
|
* @typeParam Return - Result returned by the method.
|
|
69
126
|
* @param value Decorated method implementation.
|
|
@@ -73,12 +130,23 @@ export declare function Subscribe<This extends object, Parameters extends readon
|
|
|
73
130
|
/**
|
|
74
131
|
* Creates an event-reactor declaration.
|
|
75
132
|
*
|
|
76
|
-
* Bare `@React` accepts generated
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
133
|
+
* Bare `@React` accepts generated Event or rejection inputs and returns domain
|
|
134
|
+
* Events, not rejections or framework envelopes. Declare one Event, a union of
|
|
135
|
+
* Event types, a flat array, or a fixed tuple. Arrays support `T[]`, `readonly T[]`,
|
|
136
|
+
* `Array<T>`, and `ReadonlyArray<T>`; tuples support readonly, named, optional,
|
|
137
|
+
* and union-valued entries. Concrete local/imported aliases are supported.
|
|
138
|
+
*
|
|
139
|
+
* Declare explicit `undefined` for no output, or a type such as
|
|
140
|
+
* `TaskRenamed | undefined` when a reaction sometimes emits an Event. Empty
|
|
141
|
+
* arrays and absent optional tuple entries produce no signals. Any supported
|
|
142
|
+
* result may have exactly one outer built-in `Promise`, including `Promise<undefined>`.
|
|
143
|
+
* `void` is not a valid reactor return type.
|
|
144
|
+
* Nested collections, rest tuples, nested promises, custom thenables, `any`,
|
|
145
|
+
* and `unknown` are unsupported. TypeScript checks tuple structure; Spine checks
|
|
146
|
+
* each actual Event against this handler's declarations and preserves order.
|
|
147
|
+
* Generated registry metadata connects the declaration to runtime dispatch.
|
|
148
|
+
*
|
|
149
|
+
* @typeParam This Receiver instance on which the method runs.
|
|
82
150
|
* @typeParam Parameters - Parameters accepted by the method.
|
|
83
151
|
* @typeParam Return - Result returned by the method.
|
|
84
152
|
* @param value Decorated method implementation or event schema.
|
|
@@ -96,20 +164,6 @@ export declare function React<This extends object, Parameters extends readonly u
|
|
|
96
164
|
* @returns Decorator for a public instance handler method.
|
|
97
165
|
*/
|
|
98
166
|
export declare function Where(options: WhereOptions): HandlerMethodDecorator;
|
|
99
|
-
/**
|
|
100
|
-
* Creates legacy framework event-application metadata.
|
|
101
|
-
*
|
|
102
|
-
* New application aggregates must not use `@Apply`; managed aggregates are no
|
|
103
|
-
* longer event-sourced and the framework owns state transactions. This
|
|
104
|
-
* decorator is kept only for compatibility code that still needs explicit
|
|
105
|
-
* schema-bearing event application metadata. The optional `allowImport` flag
|
|
106
|
-
* is preserved only as part of that legacy metadata shape.
|
|
107
|
-
*
|
|
108
|
-
* @param schema Event schema accepted by the decorated method.
|
|
109
|
-
* @param options Legacy event-application metadata options.
|
|
110
|
-
* @returns Decorator that records the application metadata.
|
|
111
|
-
*/
|
|
112
|
-
export declare function Apply(schema: DescriptorMessageSchema, options?: EventApplicationOptions): HandlerMethodDecorator;
|
|
113
167
|
/**
|
|
114
168
|
* Builds schema-bearing decorator declarations for framework compatibility.
|
|
115
169
|
*
|
|
@@ -117,14 +171,14 @@ export declare function Apply(schema: DescriptorMessageSchema, options?: EventAp
|
|
|
117
171
|
* produced by `EntityHandlers.define()` and accepted by
|
|
118
172
|
* `HandlerMetadataRegistry`. Only own prototype methods of `entityType` are
|
|
119
173
|
* inspected; inherited decorated methods are intentionally not materialized by
|
|
120
|
-
* this class
|
|
174
|
+
* this per-class adapter.
|
|
121
175
|
*
|
|
122
176
|
* Application code must not call this function and must not provide its own
|
|
123
177
|
* handler discovery/materialization. Generated framework registries own schema
|
|
124
178
|
* inference for bare decorators; this adapter only supports legacy
|
|
125
179
|
* schema-bearing decorator metadata.
|
|
126
180
|
*
|
|
127
|
-
* @typeParam Instance
|
|
181
|
+
* @typeParam Instance Entity instance on which the handlers run.
|
|
128
182
|
* @typeParam StateSchema - Schema that describes the entity state.
|
|
129
183
|
* @param entityType Entity class whose own decorated methods are read.
|
|
130
184
|
* @param stateSchema Schema that describes the entity state.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler-decorators.d.ts","sourceRoot":"","sources":["../../src/handler/handler-decorators.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,sBAAsB,
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;;;;;;;;;;GAmBG;AACH,wBAAgB,kCAAkC,CAChD,QAAQ,SAAS,MAAM,EACvB,WAAW,SAAS,uBAAuB,EAE3C,UAAU,EAAE,WAAW,CAAC,QAAQ,CAAC,EACjC,WAAW,EAAE,WAAW,GACvB,sBAAsB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAQ/C"}
|
|
@@ -13,6 +13,41 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { EntityHandlers, } from "./handler-metadata.js";
|
|
15
15
|
const handlerDecoratorMetadataKey = Symbol("@spine-event-engine/server.handlerDecorators");
|
|
16
|
+
/**
|
|
17
|
+
* Validates declared domain rejections for build-time handler discovery.
|
|
18
|
+
*
|
|
19
|
+
* Put `@Assign` or `@Command` first and `@Throws` last for readability; either
|
|
20
|
+
* order is accepted. The generated registry registers these rejection types
|
|
21
|
+
* even when no server handler consumes them. Rejections are thrown, not normal
|
|
22
|
+
* return values, and do not belong in the handler's return union or tuple.
|
|
23
|
+
*
|
|
24
|
+
* @param declarations Generated rejection companions.
|
|
25
|
+
* @returns A method decorator that validates the annotated instance method.
|
|
26
|
+
*/
|
|
27
|
+
export function Throws(...declarations) {
|
|
28
|
+
if (declarations.length === 0) {
|
|
29
|
+
throw new TypeError("@Throws requires at least one generated rejection declaration.");
|
|
30
|
+
}
|
|
31
|
+
const schemas = declarations.map((declaration) => {
|
|
32
|
+
const value = declaration;
|
|
33
|
+
const schema = value !== null && typeof value === "object"
|
|
34
|
+
? value.schema
|
|
35
|
+
: undefined;
|
|
36
|
+
if (schema === null ||
|
|
37
|
+
typeof schema !== "object" ||
|
|
38
|
+
typeof schema.typeName !== "string") {
|
|
39
|
+
throw new TypeError("@Throws accepts only generated rejection declarations.");
|
|
40
|
+
}
|
|
41
|
+
return schema;
|
|
42
|
+
});
|
|
43
|
+
const typeNames = schemas.map((schema) => schema.typeName);
|
|
44
|
+
if (new Set(typeNames).size !== typeNames.length) {
|
|
45
|
+
throw new TypeError("@Throws cannot declare the same rejection more than once.");
|
|
46
|
+
}
|
|
47
|
+
return (_value, context) => {
|
|
48
|
+
DecoratorMetadata.methodName(context);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
16
51
|
/**
|
|
17
52
|
* Creates command-assignment decorator metadata or a schema-bearing decorator.
|
|
18
53
|
*
|
|
@@ -24,9 +59,13 @@ export function Assign(schemaOrValue, context) {
|
|
|
24
59
|
return DecoratorMetadata.decorateOrCreate("command-assignment", schemaOrValue, context);
|
|
25
60
|
}
|
|
26
61
|
/**
|
|
27
|
-
* Creates command-
|
|
62
|
+
* Creates command-handler decorator metadata or a schema-bearing decorator.
|
|
63
|
+
* Command input declares a Process Manager command substitution; Event or rejection
|
|
64
|
+
* input declares an Event Bus command reaction. Schema-bearing metadata cannot
|
|
65
|
+
* provide declared returned schemas and is rejected during materialization.
|
|
28
66
|
*
|
|
29
|
-
* @param schemaOrValue Command
|
|
67
|
+
* @param schemaOrValue Generated Command, Event, or rejection schema, or
|
|
68
|
+
* decorated method implementation.
|
|
30
69
|
* @param context Standard decorator context for bare usage.
|
|
31
70
|
* @returns A decorator for schema-bearing usage, or `undefined` after bare usage.
|
|
32
71
|
*/
|
|
@@ -71,22 +110,6 @@ export function Where(options) {
|
|
|
71
110
|
DecoratorMetadata.methodName(context);
|
|
72
111
|
};
|
|
73
112
|
}
|
|
74
|
-
/**
|
|
75
|
-
* Creates legacy framework event-application metadata.
|
|
76
|
-
*
|
|
77
|
-
* New application aggregates must not use `@Apply`; managed aggregates are no
|
|
78
|
-
* longer event-sourced and the framework owns state transactions. This
|
|
79
|
-
* decorator is kept only for compatibility code that still needs explicit
|
|
80
|
-
* schema-bearing event application metadata. The optional `allowImport` flag
|
|
81
|
-
* is preserved only as part of that legacy metadata shape.
|
|
82
|
-
*
|
|
83
|
-
* @param schema Event schema accepted by the decorated method.
|
|
84
|
-
* @param options Legacy event-application metadata options.
|
|
85
|
-
* @returns Decorator that records the application metadata.
|
|
86
|
-
*/
|
|
87
|
-
export function Apply(schema, options = {}) {
|
|
88
|
-
return DecoratorMetadata.create("event-application", schema, options);
|
|
89
|
-
}
|
|
90
113
|
/**
|
|
91
114
|
* Builds schema-bearing decorator declarations for framework compatibility.
|
|
92
115
|
*
|
|
@@ -94,14 +117,14 @@ export function Apply(schema, options = {}) {
|
|
|
94
117
|
* produced by `EntityHandlers.define()` and accepted by
|
|
95
118
|
* `HandlerMetadataRegistry`. Only own prototype methods of `entityType` are
|
|
96
119
|
* inspected; inherited decorated methods are intentionally not materialized by
|
|
97
|
-
* this class
|
|
120
|
+
* this per-class adapter.
|
|
98
121
|
*
|
|
99
122
|
* Application code must not call this function and must not provide its own
|
|
100
123
|
* handler discovery/materialization. Generated framework registries own schema
|
|
101
124
|
* inference for bare decorators; this adapter only supports legacy
|
|
102
125
|
* schema-bearing decorator metadata.
|
|
103
126
|
*
|
|
104
|
-
* @typeParam Instance
|
|
127
|
+
* @typeParam Instance Entity instance on which the handlers run.
|
|
105
128
|
* @typeParam StateSchema - Schema that describes the entity state.
|
|
106
129
|
* @param entityType Entity class whose own decorated methods are read.
|
|
107
130
|
* @param stateSchema Schema that describes the entity state.
|
|
@@ -109,25 +132,38 @@ export function Apply(schema, options = {}) {
|
|
|
109
132
|
*/
|
|
110
133
|
export function materializeDecoratedEntityHandlers(entityType, stateSchema) {
|
|
111
134
|
const decoratedHandlers = DecoratorMetadata.collect(entityType);
|
|
112
|
-
return EntityHandlers.define(entityType, stateSchema, (builder) => decoratedHandlers.map((handler) =>
|
|
135
|
+
return EntityHandlers.define(entityType, stateSchema, (builder) => decoratedHandlers.map((handler) => DecoratorMetadata.materializeLegacyHandler(builder, handler)));
|
|
136
|
+
}
|
|
137
|
+
const DecoratorMetadata = Object.freeze({
|
|
138
|
+
/**
|
|
139
|
+
* Builds legacy schema-bearing metadata for one decorated Entity method.
|
|
140
|
+
*
|
|
141
|
+
* @typeParam Instance Entity receiver type.
|
|
142
|
+
* @param builder Entity handler registration builder.
|
|
143
|
+
* @param handler Decorated method record.
|
|
144
|
+
* @returns Canonical handler metadata.
|
|
145
|
+
*/
|
|
146
|
+
materializeLegacyHandler(builder, handler) {
|
|
113
147
|
const methodName = handler.methodName;
|
|
114
148
|
switch (handler.kind) {
|
|
115
149
|
case "command-assignment":
|
|
116
150
|
return builder.assign(DecoratorMetadata.schema(handler), methodName);
|
|
151
|
+
case "command-substitution":
|
|
152
|
+
throw new TypeError("Command substitutions require generated registry metadata with emitted schemas.");
|
|
117
153
|
case "command-reaction":
|
|
118
|
-
|
|
154
|
+
throw new TypeError("@Command handlers require generated registry metadata with emitted schemas.");
|
|
119
155
|
case "event-subscription":
|
|
120
156
|
return builder.subscribe(DecoratorMetadata.schema(handler), methodName);
|
|
121
157
|
case "event-reaction":
|
|
122
158
|
return builder.react(DecoratorMetadata.schema(handler), methodName);
|
|
123
|
-
case "event-application":
|
|
124
|
-
return builder.apply(DecoratorMetadata.schema(handler), methodName, {
|
|
125
|
-
allowImport: handler.allowImport ?? false,
|
|
126
|
-
});
|
|
127
159
|
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
160
|
+
},
|
|
161
|
+
/**
|
|
162
|
+
* Validates a public instance method and reads its string name.
|
|
163
|
+
*
|
|
164
|
+
* @param context TypeScript decorator context identifying the method.
|
|
165
|
+
* @returns The method name used in handler metadata.
|
|
166
|
+
*/
|
|
131
167
|
methodName(context) {
|
|
132
168
|
if (context.static || context.private) {
|
|
133
169
|
throw new TypeError("Spine handler decorators must be applied to public instance methods.");
|
|
@@ -137,6 +173,14 @@ const DecoratorMetadata = Object.freeze({
|
|
|
137
173
|
}
|
|
138
174
|
return context.name;
|
|
139
175
|
},
|
|
176
|
+
/**
|
|
177
|
+
* Applies a bare decorator or creates the internal schema-bearing form.
|
|
178
|
+
*
|
|
179
|
+
* @param kind Handler role recorded for the method.
|
|
180
|
+
* @param schemaOrValue Decorated method, or schema for the internal form.
|
|
181
|
+
* @param context Present when TypeScript invokes a bare decorator.
|
|
182
|
+
* @returns The internal decorator, or undefined after bare decoration.
|
|
183
|
+
*/
|
|
140
184
|
decorateOrCreate(kind, schemaOrValue, context) {
|
|
141
185
|
if (context !== undefined) {
|
|
142
186
|
DecoratorMetadata.create(kind)(schemaOrValue, context);
|
|
@@ -144,14 +188,20 @@ const DecoratorMetadata = Object.freeze({
|
|
|
144
188
|
}
|
|
145
189
|
return DecoratorMetadata.create(kind, schemaOrValue);
|
|
146
190
|
},
|
|
147
|
-
|
|
191
|
+
/**
|
|
192
|
+
* Creates a decorator that appends immutable metadata for one method.
|
|
193
|
+
*
|
|
194
|
+
* @param kind Handler role recorded for the method.
|
|
195
|
+
* @param schema Optional schema supplied by internal compatibility tooling.
|
|
196
|
+
* @returns A standard TypeScript method decorator.
|
|
197
|
+
*/
|
|
198
|
+
create(kind, schema) {
|
|
148
199
|
return (_value, context) => {
|
|
149
200
|
const methodName = DecoratorMetadata.methodName(context);
|
|
150
201
|
const record = Object.freeze({
|
|
151
202
|
kind,
|
|
152
203
|
...(schema === undefined ? {} : { schema }),
|
|
153
204
|
methodName,
|
|
154
|
-
...(kind === "event-application" ? { allowImport: options.allowImport ?? false } : {}),
|
|
155
205
|
});
|
|
156
206
|
const metadata = DecoratorMetadata.require(context);
|
|
157
207
|
const previous = DecoratorMetadata.read(metadata);
|
|
@@ -163,6 +213,12 @@ const DecoratorMetadata = Object.freeze({
|
|
|
163
213
|
});
|
|
164
214
|
};
|
|
165
215
|
},
|
|
216
|
+
/**
|
|
217
|
+
* Reads a legacy declaration's schema, rejecting bare declarations.
|
|
218
|
+
*
|
|
219
|
+
* @param handler Decorator record being materialized.
|
|
220
|
+
* @returns Its explicitly supplied message schema.
|
|
221
|
+
*/
|
|
166
222
|
schema(handler) {
|
|
167
223
|
if (handler.schema === undefined) {
|
|
168
224
|
throw new TypeError(`Decorated handler "${handler.methodName}" was declared without a schema; ` +
|
|
@@ -170,6 +226,13 @@ const DecoratorMetadata = Object.freeze({
|
|
|
170
226
|
}
|
|
171
227
|
return handler.schema;
|
|
172
228
|
},
|
|
229
|
+
/**
|
|
230
|
+
* Reads handler declarations for methods defined on this class prototype.
|
|
231
|
+
*
|
|
232
|
+
* @typeParam Instance Entity instance represented by the constructor.
|
|
233
|
+
* @param entityType Constructor whose declared handlers are collected.
|
|
234
|
+
* @returns A frozen list of matching decorator records.
|
|
235
|
+
*/
|
|
173
236
|
collect(entityType) {
|
|
174
237
|
const metadata = DecoratorMetadata.classMetadata(entityType);
|
|
175
238
|
if (metadata === undefined) {
|
|
@@ -181,6 +244,11 @@ const DecoratorMetadata = Object.freeze({
|
|
|
181
244
|
});
|
|
182
245
|
return Object.freeze(records);
|
|
183
246
|
},
|
|
247
|
+
/**
|
|
248
|
+
* Initializes Symbol.metadata when the runtime does not yet supply it.
|
|
249
|
+
*
|
|
250
|
+
* @returns The existing or newly installed decorator metadata symbol.
|
|
251
|
+
*/
|
|
184
252
|
installSymbol() {
|
|
185
253
|
const existingMetadata = Reflect.get(Symbol, "metadata");
|
|
186
254
|
if (typeof existingMetadata === "symbol") {
|
|
@@ -195,12 +263,25 @@ const DecoratorMetadata = Object.freeze({
|
|
|
195
263
|
});
|
|
196
264
|
return metadata;
|
|
197
265
|
},
|
|
266
|
+
/**
|
|
267
|
+
* Reads TypeScript's class metadata object, rejecting missing support.
|
|
268
|
+
*
|
|
269
|
+
* @param context Decorator context with optional runtime metadata support.
|
|
270
|
+
* @returns The writable class metadata object.
|
|
271
|
+
*/
|
|
198
272
|
require(context) {
|
|
199
273
|
if (context.metadata === undefined) {
|
|
200
274
|
throw new TypeError("Spine handler decorators require standard decorator metadata support.");
|
|
201
275
|
}
|
|
202
276
|
return context.metadata;
|
|
203
277
|
},
|
|
278
|
+
/**
|
|
279
|
+
* Reads metadata defined directly on the Entity constructor.
|
|
280
|
+
*
|
|
281
|
+
* @typeParam Instance Entity instance represented by the constructor.
|
|
282
|
+
* @param entityType Constructor whose metadata is inspected.
|
|
283
|
+
* @returns Its metadata object, or undefined when none is present.
|
|
284
|
+
*/
|
|
204
285
|
classMetadata(entityType) {
|
|
205
286
|
const descriptor = Object.getOwnPropertyDescriptor(entityType, decoratorMetadataSymbol);
|
|
206
287
|
const metadata = descriptor?.value;
|
|
@@ -209,6 +290,12 @@ const DecoratorMetadata = Object.freeze({
|
|
|
209
290
|
}
|
|
210
291
|
return metadata;
|
|
211
292
|
},
|
|
293
|
+
/**
|
|
294
|
+
* Reads Spine handler records without inheriting a parent metadata array.
|
|
295
|
+
*
|
|
296
|
+
* @param metadata Class metadata object to inspect.
|
|
297
|
+
* @returns Stored handler records, or an empty list when absent.
|
|
298
|
+
*/
|
|
212
299
|
read(metadata) {
|
|
213
300
|
if (!Object.hasOwn(metadata, handlerDecoratorMetadataKey)) {
|
|
214
301
|
return [];
|
|
@@ -218,6 +305,12 @@ const DecoratorMetadata = Object.freeze({
|
|
|
218
305
|
},
|
|
219
306
|
});
|
|
220
307
|
const WhereValues = Object.freeze({
|
|
308
|
+
/**
|
|
309
|
+
* Validates and copies the supported single-field Event filter.
|
|
310
|
+
*
|
|
311
|
+
* @param options Field name and comparison value supplied to the decorator.
|
|
312
|
+
* @returns A frozen filter independent of the caller's object.
|
|
313
|
+
*/
|
|
221
314
|
snapshot(options) {
|
|
222
315
|
const value = options;
|
|
223
316
|
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler-decorators.js","sourceRoot":"","sources":["../../src/handler/handler-decorators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EACL,cAAc,GAQf,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"handler-decorators.js","sourceRoot":"","sources":["../../src/handler/handler-decorators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EACL,cAAc,GAQf,MAAM,uBAAuB,CAAC;AAgE/B,MAAM,2BAA2B,GAAG,MAAM,CAAC,8CAA8C,CAAC,CAAC;AAE3F;;;;;;;;;;GAUG;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