@kronos-ts/axon-server 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/axon-server-event-store.d.ts +0 -16
- package/dist/axon-server-event-store.d.ts.map +1 -1
- package/dist/axon-server-event-store.js +73 -45
- package/dist/axon-server-event-store.js.map +1 -1
- package/dist/axon-server-snapshotting-event-store.d.ts +30 -0
- package/dist/axon-server-snapshotting-event-store.d.ts.map +1 -0
- package/dist/axon-server-snapshotting-event-store.js +154 -0
- package/dist/axon-server-snapshotting-event-store.js.map +1 -0
- package/dist/axon-server.d.ts +46 -65
- package/dist/axon-server.d.ts.map +1 -1
- package/dist/axon-server.js +490 -317
- package/dist/axon-server.js.map +1 -1
- package/dist/bounded-read.d.ts +19 -0
- package/dist/bounded-read.d.ts.map +1 -0
- package/dist/bounded-read.js +39 -0
- package/dist/bounded-read.js.map +1 -0
- package/dist/connection-manager.d.ts +2 -2
- package/dist/connection-manager.d.ts.map +1 -1
- package/dist/connection.d.ts +36 -21
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +84 -45
- package/dist/connection.js.map +1 -1
- package/dist/context-view.d.ts +2 -2
- package/dist/context-view.d.ts.map +1 -1
- package/dist/control-plane.d.ts +14 -24
- package/dist/control-plane.d.ts.map +1 -1
- package/dist/control-plane.js +6 -37
- package/dist/control-plane.js.map +1 -1
- package/dist/event-processor-info.d.ts +7 -25
- package/dist/event-processor-info.d.ts.map +1 -1
- package/dist/event-processor-info.js +16 -20
- package/dist/event-processor-info.js.map +1 -1
- package/dist/flow-controlled-sender.d.ts +2 -2
- package/dist/flow-controlled-sender.d.ts.map +1 -1
- package/dist/flow-controlled-sender.js +37 -17
- package/dist/flow-controlled-sender.js.map +1 -1
- package/dist/generated/command.d.ts +20 -20
- package/dist/generated/command.d.ts.map +1 -1
- package/dist/generated/common.d.ts +20 -20
- package/dist/generated/common.d.ts.map +1 -1
- package/dist/generated/control.d.ts +36 -40
- package/dist/generated/control.d.ts.map +1 -1
- package/dist/generated/dcb.d.ts +88 -94
- package/dist/generated/dcb.d.ts.map +1 -1
- package/dist/generated/event.d.ts +81 -84
- package/dist/generated/event.d.ts.map +1 -1
- package/dist/generated/google/protobuf/empty.d.ts +3 -4
- package/dist/generated/google/protobuf/empty.d.ts.map +1 -1
- package/dist/generated/query.d.ts +40 -40
- package/dist/generated/query.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/message-size.d.ts +2 -2
- package/dist/message-size.d.ts.map +1 -1
- package/dist/outbound-stream.d.ts +7 -11
- package/dist/outbound-stream.d.ts.map +1 -1
- package/dist/outbound-stream.js +65 -16
- package/dist/outbound-stream.js.map +1 -1
- package/dist/platform-service.d.ts +14 -5
- package/dist/platform-service.d.ts.map +1 -1
- package/dist/platform-service.js +70 -10
- package/dist/platform-service.js.map +1 -1
- package/dist/resilience.d.ts +62 -0
- package/dist/resilience.d.ts.map +1 -0
- package/dist/resilience.js +103 -0
- package/dist/resilience.js.map +1 -0
- package/dist/shutdown-latch.d.ts +5 -4
- package/dist/shutdown-latch.d.ts.map +1 -1
- package/dist/shutdown-latch.js +20 -1
- package/dist/shutdown-latch.js.map +1 -1
- package/dist/stream-recovery.d.ts +9 -0
- package/dist/stream-recovery.d.ts.map +1 -0
- package/dist/stream-recovery.js +70 -0
- package/dist/stream-recovery.js.map +1 -0
- package/package.json +3 -3
- package/src/axon-server-event-store.ts +77 -47
- package/src/axon-server-snapshotting-event-store.ts +194 -0
- package/src/axon-server.ts +472 -374
- package/src/bounded-read.ts +43 -0
- package/src/connection-manager.ts +1 -1
- package/src/connection.ts +93 -59
- package/src/context-view.ts +1 -1
- package/src/control-plane.ts +22 -66
- package/src/event-processor-info.ts +23 -44
- package/src/flow-controlled-sender.ts +34 -15
- package/src/generated/command.ts +10 -10
- package/src/generated/common.ts +10 -10
- package/src/generated/control.ts +20 -20
- package/src/generated/dcb.ts +47 -47
- package/src/generated/event.ts +42 -42
- package/src/generated/google/protobuf/empty.ts +2 -2
- package/src/generated/query.ts +20 -20
- package/src/index.ts +1 -2
- package/src/message-size.ts +1 -1
- package/src/outbound-stream.ts +58 -28
- package/src/platform-service.ts +77 -13
- package/src/resilience.ts +149 -0
- package/src/shutdown-latch.ts +16 -3
- package/src/stream-recovery.ts +72 -0
- package/dist/axon-server-snapshot-store.d.ts +0 -12
- package/dist/axon-server-snapshot-store.d.ts.map +0 -1
- package/dist/axon-server-snapshot-store.js +0 -82
- package/dist/axon-server-snapshot-store.js.map +0 -1
- package/src/axon-server-snapshot-store.ts +0 -110
|
@@ -3,7 +3,7 @@ import type { CallContext, CallOptions } from "nice-grpc-common";
|
|
|
3
3
|
import { ErrorMessage, FlowControl, InstructionAck, MetaDataValue, ProcessingInstruction, SerializedObject } from "./common.js";
|
|
4
4
|
export declare const protobufPackage = "io.axoniq.axonserver.grpc.query";
|
|
5
5
|
/** Message containing Query related instructions for Axon Server */
|
|
6
|
-
export
|
|
6
|
+
export type QueryProviderOutbound = {
|
|
7
7
|
/** Registers a Query Handler with AxonServer */
|
|
8
8
|
subscribe?: QuerySubscription | undefined;
|
|
9
9
|
/** Unregisters a Query Handler with AxonServer */
|
|
@@ -20,9 +20,9 @@ export interface QueryProviderOutbound {
|
|
|
20
20
|
ack?: InstructionAck | undefined;
|
|
21
21
|
/** Instruction identifier. If this identifier is set, this instruction will be acknowledged via inbound stream */
|
|
22
22
|
instructionId: string;
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
24
|
/** Queries or Query related instructions from AxonServer for the connected application */
|
|
25
|
-
export
|
|
25
|
+
export type QueryProviderInbound = {
|
|
26
26
|
/** Acknowledgement of previously sent instruction via outbound stream */
|
|
27
27
|
ack?: InstructionAck | undefined;
|
|
28
28
|
/** Represents an incoming Query, for which this component is expected to provide a response */
|
|
@@ -35,27 +35,27 @@ export interface QueryProviderInbound {
|
|
|
35
35
|
queryFlowControl?: QueryFlowControl | undefined;
|
|
36
36
|
/** Instruction identifier. If this identifier is set, this instruction will be acknowledged via outbound stream */
|
|
37
37
|
instructionId: string;
|
|
38
|
-
}
|
|
39
|
-
export
|
|
38
|
+
};
|
|
39
|
+
export type QueryReference = {
|
|
40
40
|
/** The identifier of the query request. */
|
|
41
41
|
requestId: string;
|
|
42
|
-
}
|
|
42
|
+
};
|
|
43
43
|
/** Message indicating that query has been completed. */
|
|
44
|
-
export
|
|
44
|
+
export type QueryComplete = {
|
|
45
45
|
/** A unique identifier for this message */
|
|
46
46
|
messageId: string;
|
|
47
47
|
/** The identifier of the incoming query to complete */
|
|
48
48
|
requestId: string;
|
|
49
|
-
}
|
|
49
|
+
};
|
|
50
50
|
/** Message indicating that consumer is requesting more messages from producer. */
|
|
51
|
-
export
|
|
51
|
+
export type QueryFlowControl = {
|
|
52
52
|
/** The identifier of the incoming query to complete */
|
|
53
53
|
queryReference: QueryReference | undefined;
|
|
54
54
|
/** Number of messages requested */
|
|
55
55
|
permits: bigint;
|
|
56
|
-
}
|
|
56
|
+
};
|
|
57
57
|
/** Message representing an incoming Query */
|
|
58
|
-
export
|
|
58
|
+
export type QueryRequest = {
|
|
59
59
|
/** The message ID of the incoming Query */
|
|
60
60
|
messageIdentifier: string;
|
|
61
61
|
/** The name of the Query to execute */
|
|
@@ -80,13 +80,13 @@ export interface QueryRequest {
|
|
|
80
80
|
clientId: string;
|
|
81
81
|
/** The Name of the Component dispatching the query */
|
|
82
82
|
componentName: string;
|
|
83
|
-
}
|
|
84
|
-
export
|
|
83
|
+
};
|
|
84
|
+
export type QueryRequest_MetaDataEntry = {
|
|
85
85
|
key: string;
|
|
86
86
|
value: MetaDataValue | undefined;
|
|
87
|
-
}
|
|
87
|
+
};
|
|
88
88
|
/** Message that represents the Response to a Query */
|
|
89
|
-
export
|
|
89
|
+
export type QueryResponse = {
|
|
90
90
|
/** The unique identifier of the Response Message */
|
|
91
91
|
messageIdentifier: string;
|
|
92
92
|
/** An Error Code identifying the type of error, if any */
|
|
@@ -103,13 +103,13 @@ export interface QueryResponse {
|
|
|
103
103
|
processingInstructions: ProcessingInstruction[];
|
|
104
104
|
/** The unique identifier of the Query to which this is a response */
|
|
105
105
|
requestIdentifier: string;
|
|
106
|
-
}
|
|
107
|
-
export
|
|
106
|
+
};
|
|
107
|
+
export type QueryResponse_MetaDataEntry = {
|
|
108
108
|
key: string;
|
|
109
109
|
value: MetaDataValue | undefined;
|
|
110
|
-
}
|
|
110
|
+
};
|
|
111
111
|
/** Message that represents a Subscription Query */
|
|
112
|
-
export
|
|
112
|
+
export type SubscriptionQuery = {
|
|
113
113
|
/** A unique identifier for this subscription */
|
|
114
114
|
subscriptionIdentifier: string;
|
|
115
115
|
/** The number of messages the Server may send before needing to await additional permits */
|
|
@@ -122,9 +122,9 @@ export interface SubscriptionQuery {
|
|
|
122
122
|
* @deprecated
|
|
123
123
|
*/
|
|
124
124
|
updateResponseType: SerializedObject | undefined;
|
|
125
|
-
}
|
|
125
|
+
};
|
|
126
126
|
/** A message containing an Update of a Query Subscription Response */
|
|
127
|
-
export
|
|
127
|
+
export type QueryUpdate = {
|
|
128
128
|
/** The unique identifier of this Update */
|
|
129
129
|
messageIdentifier: string;
|
|
130
130
|
/** The object representing the Update */
|
|
@@ -141,20 +141,20 @@ export interface QueryUpdate {
|
|
|
141
141
|
errorCode: string;
|
|
142
142
|
/** A detailed description of the error, if any */
|
|
143
143
|
errorMessage: ErrorMessage | undefined;
|
|
144
|
-
}
|
|
145
|
-
export
|
|
144
|
+
};
|
|
145
|
+
export type QueryUpdate_MetaDataEntry = {
|
|
146
146
|
key: string;
|
|
147
147
|
value: MetaDataValue | undefined;
|
|
148
|
-
}
|
|
148
|
+
};
|
|
149
149
|
/** Message indicating that all relevant Updates have been sent for a Subscription Query, and that no further Updates are available */
|
|
150
|
-
export
|
|
150
|
+
export type QueryUpdateComplete = {
|
|
151
151
|
/** The identifier of the Client instance providing the Update */
|
|
152
152
|
clientId: string;
|
|
153
153
|
/** The Component Name of the Client providing the Update */
|
|
154
154
|
componentName: string;
|
|
155
|
-
}
|
|
155
|
+
};
|
|
156
156
|
/** Message indicating that an Error occurred and that no Updates will be sent for a Subscription Query */
|
|
157
|
-
export
|
|
157
|
+
export type QueryUpdateCompleteExceptionally = {
|
|
158
158
|
/** The identifier of the Client instance providing the Update */
|
|
159
159
|
clientId: string;
|
|
160
160
|
/** The Component Name of the Client providing the Update */
|
|
@@ -163,9 +163,9 @@ export interface QueryUpdateCompleteExceptionally {
|
|
|
163
163
|
errorCode: string;
|
|
164
164
|
/** A detailed description of the error, if available */
|
|
165
165
|
errorMessage: ErrorMessage | undefined;
|
|
166
|
-
}
|
|
166
|
+
};
|
|
167
167
|
/** Message describing possible interactions for a Subscription Query */
|
|
168
|
-
export
|
|
168
|
+
export type SubscriptionQueryRequest = {
|
|
169
169
|
/** Start a Subscription Query with the given details. */
|
|
170
170
|
subscribe?: SubscriptionQuery | undefined;
|
|
171
171
|
/** Ends a previously started Subscription Query with the given details */
|
|
@@ -184,9 +184,9 @@ export interface SubscriptionQueryRequest {
|
|
|
184
184
|
* set on this message.
|
|
185
185
|
*/
|
|
186
186
|
flowControl?: SubscriptionQuery | undefined;
|
|
187
|
-
}
|
|
187
|
+
};
|
|
188
188
|
/** Represents a Response Message for a Subscription Query */
|
|
189
|
-
export
|
|
189
|
+
export type SubscriptionQueryResponse = {
|
|
190
190
|
/** The unique identifier for this message */
|
|
191
191
|
messageIdentifier: string;
|
|
192
192
|
/** The identifier of the subscription query this is a response for */
|
|
@@ -199,9 +199,9 @@ export interface SubscriptionQueryResponse {
|
|
|
199
199
|
complete?: QueryUpdateComplete | undefined;
|
|
200
200
|
/** Indicates the Query failed exceptionally, and no more Updates will be sent */
|
|
201
201
|
completeExceptionally?: QueryUpdateCompleteExceptionally | undefined;
|
|
202
|
-
}
|
|
202
|
+
};
|
|
203
203
|
/** Message containing details of a Registration of a Query Handler in a component */
|
|
204
|
-
export
|
|
204
|
+
export type QuerySubscription = {
|
|
205
205
|
/** The unique identifier of this Message */
|
|
206
206
|
messageId: string;
|
|
207
207
|
/** The name of the Query the Handler is subscribed to */
|
|
@@ -212,7 +212,7 @@ export interface QuerySubscription {
|
|
|
212
212
|
componentName: string;
|
|
213
213
|
/** The unique identifier of the Client Instance containing the Query Handler */
|
|
214
214
|
clientId: string;
|
|
215
|
-
}
|
|
215
|
+
};
|
|
216
216
|
export declare const QueryProviderOutbound: MessageFns<QueryProviderOutbound>;
|
|
217
217
|
export declare const QueryProviderInbound: MessageFns<QueryProviderInbound>;
|
|
218
218
|
export declare const QueryReference: MessageFns<QueryReference>;
|
|
@@ -265,22 +265,22 @@ export declare const QueryServiceDefinition: {
|
|
|
265
265
|
};
|
|
266
266
|
};
|
|
267
267
|
};
|
|
268
|
-
export
|
|
268
|
+
export type QueryServiceImplementation<CallContextExt = {}> = {
|
|
269
269
|
/** Opens a Query- and Instruction stream to AxonServer. */
|
|
270
270
|
openStream(request: AsyncIterable<QueryProviderOutbound>, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<QueryProviderInbound>>;
|
|
271
271
|
/** Sends a point-to-point or scatter-gather Query */
|
|
272
272
|
query(request: QueryRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<QueryResponse>>;
|
|
273
273
|
/** Opens a Subscription Query */
|
|
274
274
|
subscription(request: AsyncIterable<SubscriptionQueryRequest>, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<SubscriptionQueryResponse>>;
|
|
275
|
-
}
|
|
276
|
-
export
|
|
275
|
+
};
|
|
276
|
+
export type QueryServiceClient<CallOptionsExt = {}> = {
|
|
277
277
|
/** Opens a Query- and Instruction stream to AxonServer. */
|
|
278
278
|
openStream(request: AsyncIterable<DeepPartial<QueryProviderOutbound>>, options?: CallOptions & CallOptionsExt): AsyncIterable<QueryProviderInbound>;
|
|
279
279
|
/** Sends a point-to-point or scatter-gather Query */
|
|
280
280
|
query(request: DeepPartial<QueryRequest>, options?: CallOptions & CallOptionsExt): AsyncIterable<QueryResponse>;
|
|
281
281
|
/** Opens a Subscription Query */
|
|
282
282
|
subscription(request: AsyncIterable<DeepPartial<SubscriptionQueryRequest>>, options?: CallOptions & CallOptionsExt): AsyncIterable<SubscriptionQueryResponse>;
|
|
283
|
-
}
|
|
283
|
+
};
|
|
284
284
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
285
285
|
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
286
286
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -288,13 +288,13 @@ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<
|
|
|
288
288
|
export type ServerStreamingMethodResult<Response> = {
|
|
289
289
|
[Symbol.asyncIterator](): AsyncIterator<Response, void>;
|
|
290
290
|
};
|
|
291
|
-
export
|
|
291
|
+
export type MessageFns<T> = {
|
|
292
292
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
293
293
|
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
294
294
|
fromJSON(object: any): T;
|
|
295
295
|
toJSON(message: T): unknown;
|
|
296
296
|
create(base?: DeepPartial<T>): T;
|
|
297
297
|
fromPartial(object: DeepPartial<T>): T;
|
|
298
|
-
}
|
|
298
|
+
};
|
|
299
299
|
export {};
|
|
300
300
|
//# sourceMappingURL=query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/generated/query.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EACL,YAAY,EACZ,WAAW,EACX,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,eAAe,oCAAoC,CAAC;AAEjE,oEAAoE;AACpE,MAAM,
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/generated/query.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EACL,YAAY,EACZ,WAAW,EACX,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,eAAe,oCAAoC,CAAC;AAEjE,oEAAoE;AACpE,MAAM,MAAM,qBAAqB,GAAG;IAClC,gDAAgD;IAChD,SAAS,CAAC,EACN,iBAAiB,GACjB,SAAS,CAAC;IACd,kDAAkD;IAClD,WAAW,CAAC,EACR,iBAAiB,GACjB,SAAS,CAAC;IACd,6EAA6E;IAC7E,WAAW,CAAC,EACR,WAAW,GACX,SAAS,CAAC;IACd,kEAAkE;IAClE,aAAa,CAAC,EACV,aAAa,GACb,SAAS,CAAC;IACd,4DAA4D;IAC5D,aAAa,CAAC,EACV,aAAa,GACb,SAAS,CAAC;IACd,8FAA8F;IAC9F,yBAAyB,CAAC,EACtB,yBAAyB,GACzB,SAAS,CAAC;IACd,wEAAwE;IACxE,GAAG,CAAC,EACA,cAAc,GACd,SAAS,CAAC;IACd,kHAAkH;IAClH,aAAa,EAAE,MAAM,CAAC;CACvB,CAAA;AAED,0FAA0F;AAC1F,MAAM,MAAM,oBAAoB,GAAG;IACjC,yEAAyE;IACzE,GAAG,CAAC,EACA,cAAc,GACd,SAAS,CAAC;IACd,+FAA+F;IAC/F,KAAK,CAAC,EACF,YAAY,GACZ,SAAS,CAAC;IACd,wHAAwH;IACxH,wBAAwB,CA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,EAAE,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACrD,OAAO,CAAC,CAAC,CAAC,CAAC;AAUf,MAAM,MAAM,2BAA2B,CAAC,QAAQ,IAAI;IAAE,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;CAAE,CAAC;AAEhH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI;IAC1B,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,YAAY,CAAC;IACxD,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IAC7D,QAAQ,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;IACzB,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;IAC5B,MAAM,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACjC,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACxC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { type AxonServerConnectionConfig, type AxonServerConnection, type AxonServerConnectionOptions, type AxonServerConnectionHandle, type AxonServerStoreSource, type AxonServerBusSource, type AxonServerPlatformSource, connectToAxonServer, axonServerConnection, } from "./connection.js";
|
|
2
2
|
export { axonServerEventStore } from "./axon-server-event-store.js";
|
|
3
|
-
export {
|
|
3
|
+
export { axonServerSnapshottingEventStore } from "./axon-server-snapshotting-event-store.js";
|
|
4
4
|
export { axonServerCommandBus, axonServerQueryBus, type AxonServerCommandBusOptions, type AxonServerQueryBusOptions, type FlowControlConfig, type ProcessingInstructions, } from "./axon-server.js";
|
|
5
5
|
export { axonServerControlPlane, type AxonServerControlPlane, type ManagedEventProcessor, } from "./control-plane.js";
|
|
6
6
|
export { type MessageSizeConfig, MessageSizeExceededError, messageSizeValidator, } from "./message-size.js";
|
|
7
|
-
export { type ProcessorStatus, type
|
|
7
|
+
export { type ProcessorStatus, type ProcessorStatusSupplier, toEventProcessorInfo, } from "./event-processor-info.js";
|
|
8
8
|
export { type PlatformConnection, type PlatformInstruction, type InstructionHandler, type PlatformServiceOptions, platformConnection, } from "./platform-service.js";
|
|
9
9
|
export { type FlowControlledSender, flowControlledSender, } from "./flow-controlled-sender.js";
|
|
10
10
|
export { type ShutdownLatch, type ActivityHandle, ShutdownInProgressError, shutdownLatch, } from "./shutdown-latch.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAEnE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAEnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAA;AAE5F,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC5B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,GAC3B,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EACL,KAAK,iBAAiB,EACtB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,oBAAoB,GACrB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,KAAK,oBAAoB,EACzB,oBAAoB,GACrB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,uBAAuB,EACvB,aAAa,GACd,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,eAAe,EACf,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,GACjB,MAAM,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { connectToAxonServer, axonServerConnection, } from "./connection.js";
|
|
2
2
|
export { axonServerEventStore } from "./axon-server-event-store.js";
|
|
3
|
-
export {
|
|
3
|
+
export { axonServerSnapshottingEventStore } from "./axon-server-snapshotting-event-store.js";
|
|
4
4
|
export { axonServerCommandBus, axonServerQueryBus, } from "./axon-server.js";
|
|
5
5
|
export { axonServerControlPlane, } from "./control-plane.js";
|
|
6
6
|
export { MessageSizeExceededError, messageSizeValidator, } from "./message-size.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAEnE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAEnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAA;AAE5F,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GAKnB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACL,sBAAsB,GAGvB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAEL,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAGL,oBAAoB,GACrB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAKL,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAEL,oBAAoB,GACrB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAGL,uBAAuB,EACvB,aAAa,GACd,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,mBAAmB,EAEnB,eAAe,EACf,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,GACjB,MAAM,aAAa,CAAA"}
|
package/dist/message-size.d.ts
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* This module pre-checks message sizes before sending and warns
|
|
6
6
|
* when approaching the limit.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type MessageSizeConfig = {
|
|
9
9
|
/** Maximum message size in bytes. Default: 4MB */
|
|
10
10
|
maxMessageSize?: number;
|
|
11
11
|
/** Warning threshold as a fraction (0-1). Default: 0.75 */
|
|
12
12
|
warningThreshold?: number;
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
export declare class MessageSizeExceededError extends Error {
|
|
15
15
|
readonly actualSize: number;
|
|
16
16
|
readonly maxSize: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-size.d.ts","sourceRoot":"","sources":["../src/message-size.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,MAAM,
|
|
1
|
+
{"version":3,"file":"message-size.d.ts","sourceRoot":"","sources":["../src/message-size.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,kDAAkD;IAClD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,2DAA2D;IAC3D,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IAExB,YAAY,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAO9C;CACF;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE,iBAAiB;IAM3D;;;OAGG;mBACY,UAAU,YAAY,MAAM,GAAG,IAAI;IAalD;;OAEG;0BACmB,OAAO,GAAG,MAAM;IAItC,4CAA4C;;EAG/C"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
* bidirectional gRPC stream. Buffers messages when the stream isn't
|
|
4
|
-
* consuming, and resolves promises when the stream is waiting.
|
|
5
|
-
*/
|
|
6
|
-
export interface OutboundStream<T> {
|
|
7
|
-
/** Send a message into the stream. */
|
|
1
|
+
/** Bounded single-consumer queue feeding a gRPC request stream. */
|
|
2
|
+
export type OutboundStream<T> = {
|
|
8
3
|
send(message: T): void;
|
|
9
|
-
/** The async iterable to pass to the gRPC client. */
|
|
10
4
|
readonly iterable: AsyncIterable<T>;
|
|
11
|
-
/**
|
|
5
|
+
/** Wait until the consumer has requested the next frame after this batch. Not a server acknowledgement. */
|
|
6
|
+
flush(): Promise<void>;
|
|
7
|
+
readonly buffered: number;
|
|
12
8
|
close(): void;
|
|
13
|
-
}
|
|
14
|
-
export declare function outboundStream<T>(): OutboundStream<T>;
|
|
9
|
+
};
|
|
10
|
+
export declare function outboundStream<T>(maxBuffered?: number): OutboundStream<T>;
|
|
15
11
|
//# sourceMappingURL=outbound-stream.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbound-stream.d.ts","sourceRoot":"","sources":["../src/outbound-stream.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"outbound-stream.d.ts","sourceRoot":"","sources":["../src/outbound-stream.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC9B,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,CAAA;IACtB,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IACnC,2GAA2G;IAC3G,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,KAAK,IAAI,IAAI,CAAA;CACd,CAAA;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,WAAW,SAAO,GAAG,cAAc,CAAC,CAAC,CAAC,CAuEvE"}
|
package/dist/outbound-stream.js
CHANGED
|
@@ -1,39 +1,88 @@
|
|
|
1
|
-
export function outboundStream() {
|
|
2
|
-
|
|
1
|
+
export function outboundStream(maxBuffered = 4096) {
|
|
2
|
+
if (!Number.isSafeInteger(maxBuffered) || maxBuffered <= 0)
|
|
3
|
+
throw new RangeError("maxBuffered must be a positive integer");
|
|
4
|
+
let resolve;
|
|
3
5
|
const queue = [];
|
|
4
6
|
let closed = false;
|
|
7
|
+
let claimed = false;
|
|
8
|
+
let handingOff = false;
|
|
9
|
+
let flushed;
|
|
10
|
+
function acknowledgeRead() {
|
|
11
|
+
handingOff = false;
|
|
12
|
+
if (!queue.length) {
|
|
13
|
+
flushed?.resolve();
|
|
14
|
+
flushed = undefined;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const done = () => ({ value: undefined, done: true });
|
|
18
|
+
function close() {
|
|
19
|
+
closed = true;
|
|
20
|
+
if (!queue.length && !handingOff) {
|
|
21
|
+
flushed?.resolve();
|
|
22
|
+
flushed = undefined;
|
|
23
|
+
}
|
|
24
|
+
resolve?.(done());
|
|
25
|
+
resolve = undefined;
|
|
26
|
+
}
|
|
5
27
|
return {
|
|
28
|
+
get buffered() { return queue.length; },
|
|
29
|
+
flush() {
|
|
30
|
+
if (!queue.length && !handingOff)
|
|
31
|
+
return Promise.resolve();
|
|
32
|
+
if (closed)
|
|
33
|
+
return Promise.reject(new Error("Outbound stream closed before flush"));
|
|
34
|
+
if (!flushed) {
|
|
35
|
+
let resolve, reject;
|
|
36
|
+
const promise = new Promise((a, b) => { resolve = a; reject = b; });
|
|
37
|
+
flushed = { promise, resolve, reject };
|
|
38
|
+
}
|
|
39
|
+
return flushed.promise;
|
|
40
|
+
},
|
|
6
41
|
send(message) {
|
|
42
|
+
if (closed)
|
|
43
|
+
throw new Error("Outbound stream is closed");
|
|
7
44
|
if (resolve) {
|
|
8
|
-
const
|
|
9
|
-
resolve =
|
|
10
|
-
|
|
45
|
+
const waiter = resolve;
|
|
46
|
+
resolve = undefined;
|
|
47
|
+
handingOff = true;
|
|
48
|
+
waiter({ value: message, done: false });
|
|
11
49
|
}
|
|
12
50
|
else {
|
|
51
|
+
if (queue.length >= maxBuffered)
|
|
52
|
+
throw new Error("Outbound stream buffer overflow");
|
|
13
53
|
queue.push(message);
|
|
14
54
|
}
|
|
15
55
|
},
|
|
16
56
|
iterable: {
|
|
17
57
|
[Symbol.asyncIterator]() {
|
|
58
|
+
if (claimed)
|
|
59
|
+
throw new Error("Outbound stream supports one consumer");
|
|
60
|
+
claimed = true;
|
|
18
61
|
return {
|
|
19
62
|
next() {
|
|
20
|
-
|
|
21
|
-
if (
|
|
22
|
-
|
|
63
|
+
acknowledgeRead();
|
|
64
|
+
if (queue.length) {
|
|
65
|
+
handingOff = true;
|
|
66
|
+
return Promise.resolve({ value: queue.shift(), done: false });
|
|
67
|
+
}
|
|
23
68
|
if (closed)
|
|
24
|
-
return Promise.resolve(
|
|
69
|
+
return Promise.resolve(done());
|
|
70
|
+
if (resolve)
|
|
71
|
+
return Promise.reject(new Error("Concurrent outbound stream reads are not supported"));
|
|
25
72
|
return new Promise((r) => { resolve = r; });
|
|
26
73
|
},
|
|
74
|
+
return() {
|
|
75
|
+
queue.length = 0;
|
|
76
|
+
flushed?.reject(new Error("Outbound stream cancelled before flush"));
|
|
77
|
+
flushed = undefined;
|
|
78
|
+
handingOff = false;
|
|
79
|
+
close();
|
|
80
|
+
return Promise.resolve(done());
|
|
81
|
+
},
|
|
27
82
|
};
|
|
28
83
|
},
|
|
29
84
|
},
|
|
30
|
-
close
|
|
31
|
-
closed = true;
|
|
32
|
-
if (resolve) {
|
|
33
|
-
resolve({ value: undefined, done: true });
|
|
34
|
-
resolve = null;
|
|
35
|
-
}
|
|
36
|
-
},
|
|
85
|
+
close,
|
|
37
86
|
};
|
|
38
87
|
}
|
|
39
88
|
//# sourceMappingURL=outbound-stream.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbound-stream.js","sourceRoot":"","sources":["../src/outbound-stream.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"outbound-stream.js","sourceRoot":"","sources":["../src/outbound-stream.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,cAAc,CAAI,WAAW,GAAG,IAAI;IAClD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,WAAW,IAAI,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,wCAAwC,CAAC,CAAA;IAC1H,IAAI,OAAyD,CAAA;IAC7D,MAAM,KAAK,GAAQ,EAAE,CAAA;IACrB,IAAI,MAAM,GAAG,KAAK,CAAA;IAClB,IAAI,OAAO,GAAG,KAAK,CAAA;IACnB,IAAI,UAAU,GAAG,KAAK,CAAA;IACtB,IAAI,OAA4F,CAAA;IAChG,SAAS,eAAe;QACtB,UAAU,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YAAC,OAAO,EAAE,OAAO,EAAE,CAAC;YAAC,OAAO,GAAG,SAAS,CAAA;QAAC,CAAC;IAChE,CAAC;IACD,MAAM,IAAI,GAAG,GAAsB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;IACxE,SAAS,KAAK;QACZ,MAAM,GAAG,IAAI,CAAA;QACb,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;YAAC,OAAO,EAAE,OAAO,EAAE,CAAC;YAAC,OAAO,GAAG,SAAS,CAAA;QAAC,CAAC;QAC7E,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,CAAA;QACjB,OAAO,GAAG,SAAS,CAAA;IACrB,CAAC;IACD,OAAO;QACL,IAAI,QAAQ,KAAK,OAAO,KAAK,CAAC,MAAM,CAAA,CAAC,CAAC;QACtC,KAAK;YACH,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,CA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,KAAK,CAAC,MAAM,EAAE,CAAC;4BACjB,UAAU,GAAG,IAAI,CAAA;4BACjB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAG,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;wBAChE,CAAC;wBACD,IAAI,MAAM;4BAAE,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;wBAC1C,IAAI,OAAO;4BAAE,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC,CAAA;wBACnG,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,OAAO,GAAG,CAAC,CAAA,CAAC,CAAC,CAAC,CAAA;oBAC5C,CAAC;oBACD,MAAM;wBACJ,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;wBAChB,OAAO,EAAE,MAAM,CAAC,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC,CAAA;wBACpE,OAAO,GAAG,SAAS,CAAA;wBACnB,UAAU,GAAG,KAAK,CAAA;wBAClB,KAAK,EAAE,CAAA;wBACP,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;oBAChC,CAAC;iBACF,CAAA;YACH,CAAC;SACF;QACD,KAAK;KACN,CAAA;AACH,CAAC"}
|
|
@@ -54,7 +54,7 @@ export type InstructionHandler = (instruction: PlatformInstruction) => void | Pr
|
|
|
54
54
|
* - Heartbeat protocol to detect dead connections
|
|
55
55
|
* - Receives server-initiated instructions (pause, resume, split, merge segments)
|
|
56
56
|
*/
|
|
57
|
-
export
|
|
57
|
+
export type PlatformConnection = {
|
|
58
58
|
/**
|
|
59
59
|
* DATA PATH. Open the platform stream, register this client, and arm the
|
|
60
60
|
* heartbeat that calls `connection.reconnect()` when the server stops
|
|
@@ -121,9 +121,18 @@ export interface PlatformConnection {
|
|
|
121
121
|
* two extensions structurally symmetric.
|
|
122
122
|
*/
|
|
123
123
|
subscriptionsAcked(): Promise<boolean>;
|
|
124
|
-
}
|
|
125
|
-
export
|
|
126
|
-
/**
|
|
124
|
+
};
|
|
125
|
+
export type PlatformServiceOptions = {
|
|
126
|
+
/**
|
|
127
|
+
* Heartbeat interval in ms. Default: 2500.
|
|
128
|
+
*
|
|
129
|
+
* Axon Server's `client-heartbeat-timeout` defaults to 5000 ms and is
|
|
130
|
+
* refreshed ONLY by heartbeats the client sends (`HeartbeatMonitor`), checked
|
|
131
|
+
* every second. A 10 s cadence — Axon Framework's own default — survives
|
|
132
|
+
* there only because the framework also answers every heartbeat the SERVER
|
|
133
|
+
* sends; this client does both, and beats at half the server's window so a
|
|
134
|
+
* paused runner still fits.
|
|
135
|
+
*/
|
|
127
136
|
heartbeatIntervalMs?: number;
|
|
128
137
|
/** Heartbeat timeout in ms. If no response within this window, reconnect. Default: 7500 */
|
|
129
138
|
heartbeatTimeoutMs?: number;
|
|
@@ -137,7 +146,7 @@ export interface PlatformServiceOptions {
|
|
|
137
146
|
* Aligned with Java's `processorsNotificationInitialDelay`. Default: 5000.
|
|
138
147
|
*/
|
|
139
148
|
processorsNotificationInitialDelayMs?: number;
|
|
140
|
-
}
|
|
149
|
+
};
|
|
141
150
|
/**
|
|
142
151
|
* Creates a PlatformService connection to Axon Server.
|
|
143
152
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-service.d.ts","sourceRoot":"","sources":["../src/platform-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAI3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAGxE;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC3B;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,aAAa,EAAE,MAAM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