@spine-event-engine/testing 2.0.0-snapshot.11
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 +118 -0
- package/REFERENCE.md +54 -0
- package/dist/black-box/black-box.d.ts +221 -0
- package/dist/black-box/black-box.d.ts.map +1 -0
- package/dist/black-box/black-box.js +648 -0
- package/dist/black-box/black-box.js.map +1 -0
- package/dist/black-box/internal-test-access.d.ts +5 -0
- package/dist/black-box/internal-test-access.d.ts.map +1 -0
- package/dist/black-box/internal-test-access.js +18 -0
- package/dist/black-box/internal-test-access.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +34 -0
|
@@ -0,0 +1,648 @@
|
|
|
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 { clone, create } from "@bufbuild/protobuf";
|
|
15
|
+
import { TimestampSchema } from "@bufbuild/protobuf/wkt";
|
|
16
|
+
import { Client as NodeClient, } from "@spine-event-engine/client-node";
|
|
17
|
+
import { SignalEnvelopes } from "@spine-event-engine/core";
|
|
18
|
+
import { ActorContextSchema, CommandSchema, EventContextSchema, EventSchema, TenantIdSchema, UserIdSchema, ZoneIdSchema, } from "@spine-event-engine/proto";
|
|
19
|
+
import { BoundedContext, Server, } from "@spine-event-engine/server";
|
|
20
|
+
import { observeProducedSignals, postExternalEvent } from "@spine-event-engine/server/testing";
|
|
21
|
+
/**
|
|
22
|
+
* Stable error thrown when an eventual read cannot satisfy its predicate.
|
|
23
|
+
*/
|
|
24
|
+
export class BlackBoxTimeoutError extends Error {
|
|
25
|
+
// prettier-ignore
|
|
26
|
+
/**
|
|
27
|
+
* Creates a timeout error.
|
|
28
|
+
*
|
|
29
|
+
* @param timeoutMs The elapsed wait limit in milliseconds.
|
|
30
|
+
*/
|
|
31
|
+
constructor(timeoutMs) {
|
|
32
|
+
super(`BlackBox eventually timed out after ${timeoutMs.toString()} milliseconds.`);
|
|
33
|
+
this.name = "BlackBoxTimeoutError";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Stable error thrown when an operation is attempted after BlackBox close begins.
|
|
38
|
+
*/
|
|
39
|
+
export class BlackBoxClosedError extends Error {
|
|
40
|
+
// prettier-ignore
|
|
41
|
+
/**
|
|
42
|
+
* Creates a closed error.
|
|
43
|
+
*/
|
|
44
|
+
constructor() {
|
|
45
|
+
super("BlackBox is closed.");
|
|
46
|
+
this.name = "BlackBoxClosedError";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A runner-neutral public-client test facade over one local bounded context.
|
|
51
|
+
*/
|
|
52
|
+
export class BlackBox {
|
|
53
|
+
#context;
|
|
54
|
+
#server;
|
|
55
|
+
#client;
|
|
56
|
+
#tenant;
|
|
57
|
+
#zoneId;
|
|
58
|
+
#timeoutMs;
|
|
59
|
+
#intervalMs;
|
|
60
|
+
#waits = new AbortController();
|
|
61
|
+
#subscriptions = new Set();
|
|
62
|
+
#commands = [];
|
|
63
|
+
#events = [];
|
|
64
|
+
#observation;
|
|
65
|
+
#admitting = true;
|
|
66
|
+
#closing;
|
|
67
|
+
constructor(context, server, client, options, observation) {
|
|
68
|
+
this.#context = context;
|
|
69
|
+
this.#server = server;
|
|
70
|
+
this.#client = client;
|
|
71
|
+
this.#tenant = BlackBoxOptionsValues.cloneTenant(options.tenant);
|
|
72
|
+
this.#zoneId = clone(ZoneIdSchema, options.zoneId);
|
|
73
|
+
this.#timeoutMs = options.timeoutMs;
|
|
74
|
+
this.#intervalMs = options.intervalMs;
|
|
75
|
+
this.#observation =
|
|
76
|
+
observation ??
|
|
77
|
+
observeProducedSignals(context, {
|
|
78
|
+
onCommand: (command) => this.#commands.push(clone(CommandSchema, command)),
|
|
79
|
+
onEvent: (event) => this.#events.push(clone(EventSchema, event)),
|
|
80
|
+
});
|
|
81
|
+
BlackBoxAccess.set(this, {
|
|
82
|
+
assertOpen: () => {
|
|
83
|
+
this.#assertOpen();
|
|
84
|
+
},
|
|
85
|
+
postEvent: (actor, schema, message) => this.#postEvent(actor, schema, message),
|
|
86
|
+
postExternalEvent: (actor, schema, message) => this.#postExternalEvent(actor, schema, message),
|
|
87
|
+
track: (handle) => this.#track(handle),
|
|
88
|
+
onRelease: (handle) => {
|
|
89
|
+
this.#release(handle);
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Starts an ephemeral local server and public client for a context or builder.
|
|
95
|
+
*
|
|
96
|
+
* @param contextOrBuilder The bounded context or builder to exercise.
|
|
97
|
+
* @param options The tenant, zone, and eventual-wait options.
|
|
98
|
+
* @returns A ready BlackBox.
|
|
99
|
+
*/
|
|
100
|
+
static async from(contextOrBuilder, options = {}) {
|
|
101
|
+
const normalized = BlackBoxOptionsValues.normalize(contextOrBuilder, options);
|
|
102
|
+
const context = contextOrBuilder instanceof BoundedContext
|
|
103
|
+
? contextOrBuilder
|
|
104
|
+
: await contextOrBuilder.buildAsync();
|
|
105
|
+
return BlackBoxLifecycle.open(context, normalized, () => new Server({ contexts: [context] }).start(), (server) => NodeClient.connectTo(server.baseUrl, {
|
|
106
|
+
...(normalized.tenant === undefined ? {} : { tenant: normalized.tenant }),
|
|
107
|
+
zoneId: normalized.zoneId,
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Creates the guest scope.
|
|
112
|
+
*
|
|
113
|
+
* @returns An immutable guest request scope.
|
|
114
|
+
*/
|
|
115
|
+
asGuest() {
|
|
116
|
+
this.#assertOpen();
|
|
117
|
+
return new Request(this, this.#client.asGuest(), "guest");
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Creates an immutable scope for one actor.
|
|
121
|
+
*
|
|
122
|
+
* @param actor The actor identifier for requests and direct events.
|
|
123
|
+
* @returns An immutable actor request scope.
|
|
124
|
+
*/
|
|
125
|
+
onBehalfOf(actor) {
|
|
126
|
+
this.#assertOpen();
|
|
127
|
+
return new Request(this, this.#client.onBehalfOf(actor), actor);
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Returns cloned snapshots of produced Commands in admission order.
|
|
131
|
+
*
|
|
132
|
+
* @returns The Commands produced by this context.
|
|
133
|
+
*/
|
|
134
|
+
assertCommands() {
|
|
135
|
+
this.#assertOpen();
|
|
136
|
+
return Object.freeze(this.#commands.map((command) => clone(CommandSchema, command)));
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Returns cloned snapshots of committed produced Events in admission order.
|
|
140
|
+
*
|
|
141
|
+
* @returns The Events produced by this context.
|
|
142
|
+
*/
|
|
143
|
+
assertEvents() {
|
|
144
|
+
this.#assertOpen();
|
|
145
|
+
return Object.freeze(this.#events.map((event) => clone(EventSchema, event)));
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Reads repeatedly until the predicate accepts or the bounded wait expires.
|
|
149
|
+
*
|
|
150
|
+
* @param read The value-producing operation to retry.
|
|
151
|
+
* @param accept The predicate that accepts a produced value.
|
|
152
|
+
* @param options Optional wait limits for this operation.
|
|
153
|
+
* @returns The first accepted value.
|
|
154
|
+
*/
|
|
155
|
+
async eventually(read, accept, options = {}) {
|
|
156
|
+
this.#assertOpen();
|
|
157
|
+
const timeoutMs = BlackBoxOptionsValues.positiveInteger(options.timeoutMs ?? this.#timeoutMs, "timeoutMs");
|
|
158
|
+
const intervalMs = BlackBoxOptionsValues.positiveInteger(options.intervalMs ?? this.#intervalMs, "intervalMs");
|
|
159
|
+
const deadline = Date.now() + timeoutMs;
|
|
160
|
+
for (;;) {
|
|
161
|
+
const value = await read();
|
|
162
|
+
this.#assertOpen();
|
|
163
|
+
if (accept(value))
|
|
164
|
+
return value;
|
|
165
|
+
if (Date.now() >= deadline)
|
|
166
|
+
throw new BlackBoxTimeoutError(timeoutMs);
|
|
167
|
+
await BlackBoxClock.wait(Math.min(intervalMs, deadline - Date.now()), this.#waits.signal);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Stops admission, cancels owned subscriptions, and closes the client and server once.
|
|
172
|
+
*
|
|
173
|
+
* @returns A shared promise that resolves after cleanup completes.
|
|
174
|
+
*/
|
|
175
|
+
close() {
|
|
176
|
+
this.#closing ??= this.closeOnce();
|
|
177
|
+
return this.#closing;
|
|
178
|
+
}
|
|
179
|
+
#assertOpen() {
|
|
180
|
+
if (!this.#admitting)
|
|
181
|
+
throw new BlackBoxClosedError();
|
|
182
|
+
}
|
|
183
|
+
async #postEvent(actor, schema, message) {
|
|
184
|
+
this.#assertOpen();
|
|
185
|
+
await this.#context.eventBus().post(SignalEnvelopes.event({
|
|
186
|
+
context: create(EventContextSchema, {
|
|
187
|
+
timestamp: BlackBoxClock.timestamp(),
|
|
188
|
+
origin: { case: "importContext", value: this.#actorContext(actor) },
|
|
189
|
+
}),
|
|
190
|
+
schema,
|
|
191
|
+
message,
|
|
192
|
+
}));
|
|
193
|
+
}
|
|
194
|
+
async #postExternalEvent(actor, schema, message) {
|
|
195
|
+
this.#assertOpen();
|
|
196
|
+
await postExternalEvent(this.#context, SignalEnvelopes.event({
|
|
197
|
+
context: create(EventContextSchema, {
|
|
198
|
+
timestamp: BlackBoxClock.timestamp(),
|
|
199
|
+
origin: { case: "importContext", value: this.#actorContext(actor) },
|
|
200
|
+
}),
|
|
201
|
+
schema,
|
|
202
|
+
message,
|
|
203
|
+
}));
|
|
204
|
+
}
|
|
205
|
+
#track(handle) {
|
|
206
|
+
this.#assertOpen();
|
|
207
|
+
this.#subscriptions.add(handle);
|
|
208
|
+
return handle;
|
|
209
|
+
}
|
|
210
|
+
#release(handle) {
|
|
211
|
+
this.#subscriptions.delete(handle);
|
|
212
|
+
}
|
|
213
|
+
#actorContext(actor) {
|
|
214
|
+
return create(ActorContextSchema, {
|
|
215
|
+
...(this.#tenant === undefined ? {} : { tenantId: clone(TenantIdSchema, this.#tenant) }),
|
|
216
|
+
actor: create(UserIdSchema, { value: actor }),
|
|
217
|
+
zoneId: clone(ZoneIdSchema, this.#zoneId),
|
|
218
|
+
timestamp: BlackBoxClock.timestamp(),
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
async closeOnce() {
|
|
222
|
+
this.#admitting = false;
|
|
223
|
+
this.#waits.abort(new BlackBoxClosedError());
|
|
224
|
+
const failures = BlackBoxFailures.rejected(await Promise.allSettled([...this.#subscriptions].map((item) => item.cancel())));
|
|
225
|
+
for (const operation of [() => this.#client.close(), () => this.#server.close()]) {
|
|
226
|
+
try {
|
|
227
|
+
await operation();
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
failures.push(error);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
try {
|
|
234
|
+
this.#observation.close();
|
|
235
|
+
}
|
|
236
|
+
finally {
|
|
237
|
+
this.#commands.length = 0;
|
|
238
|
+
this.#events.length = 0;
|
|
239
|
+
}
|
|
240
|
+
if (failures.length > 0)
|
|
241
|
+
throw new AggregateError(failures, "BlackBox cleanup failed.");
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Holds internal operations without exposing them through the BlackBox facade.
|
|
246
|
+
*/
|
|
247
|
+
const BlackBoxAccess = (() => {
|
|
248
|
+
const values = new WeakMap();
|
|
249
|
+
return Object.freeze({
|
|
250
|
+
// prettier-ignore
|
|
251
|
+
/**
|
|
252
|
+
* Associates internal operations with a BlackBox.
|
|
253
|
+
*/
|
|
254
|
+
set(blackBox, internals) {
|
|
255
|
+
values.set(blackBox, internals);
|
|
256
|
+
},
|
|
257
|
+
/**
|
|
258
|
+
* Obtains the internal operations for a BlackBox.
|
|
259
|
+
*/
|
|
260
|
+
get(blackBox) {
|
|
261
|
+
const internals = values.get(blackBox);
|
|
262
|
+
if (internals === undefined)
|
|
263
|
+
throw new Error("BlackBox internals are unavailable.");
|
|
264
|
+
return internals;
|
|
265
|
+
},
|
|
266
|
+
});
|
|
267
|
+
})();
|
|
268
|
+
/**
|
|
269
|
+
* Provides internal-only lifecycle seams for BlackBox regression tests.
|
|
270
|
+
*/
|
|
271
|
+
export const BlackBoxTestAccess = Object.freeze({
|
|
272
|
+
// prettier-ignore
|
|
273
|
+
/**
|
|
274
|
+
* Creates a BlackBox with supplied closeable resources.
|
|
275
|
+
*
|
|
276
|
+
* @param resources The test client, server, and optional subscriptions.
|
|
277
|
+
* @returns A BlackBox that owns the supplied resources.
|
|
278
|
+
*/
|
|
279
|
+
create(resources) {
|
|
280
|
+
const blackBox = BlackBoxLifecycle.instantiate({}, resources.server, resources.client, BlackBoxOptionsValues.defaults(), resources.observation ?? Object.freeze({ close: () => undefined }));
|
|
281
|
+
for (const subscription of resources.subscriptions ?? [])
|
|
282
|
+
BlackBoxAccess.get(blackBox).track(subscription);
|
|
283
|
+
return blackBox;
|
|
284
|
+
},
|
|
285
|
+
/**
|
|
286
|
+
* Returns a generic subscription-like handle for lifecycle regression tests.
|
|
287
|
+
*
|
|
288
|
+
* @param blackBox The BlackBox that owns the handle.
|
|
289
|
+
* @param handle The cancelable async handle to track.
|
|
290
|
+
* @returns The tracked handle.
|
|
291
|
+
*/
|
|
292
|
+
track(blackBox, handle) {
|
|
293
|
+
const tracked = new Tracked(handle, () => {
|
|
294
|
+
BlackBoxAccess.get(blackBox).onRelease(tracked);
|
|
295
|
+
});
|
|
296
|
+
return BlackBoxAccess.get(blackBox).track(tracked);
|
|
297
|
+
},
|
|
298
|
+
/**
|
|
299
|
+
* Opens a BlackBox through supplied lifecycle seams for startup regression tests.
|
|
300
|
+
*
|
|
301
|
+
* @param resources The test startup and connection operations.
|
|
302
|
+
* @returns A BlackBox created through the supplied operations.
|
|
303
|
+
*/
|
|
304
|
+
open(resources) {
|
|
305
|
+
return BlackBoxLifecycle.open({}, BlackBoxOptionsValues.defaults(), resources.start, resources.connect);
|
|
306
|
+
},
|
|
307
|
+
});
|
|
308
|
+
/**
|
|
309
|
+
* Constructs BlackBox instances and compensates for failed startup.
|
|
310
|
+
*/
|
|
311
|
+
const BlackBoxLifecycle = Object.freeze({
|
|
312
|
+
// prettier-ignore
|
|
313
|
+
/**
|
|
314
|
+
* Opens the server and client before constructing a BlackBox.
|
|
315
|
+
*/
|
|
316
|
+
async open(context, options, start, connect) {
|
|
317
|
+
let server;
|
|
318
|
+
let client;
|
|
319
|
+
try {
|
|
320
|
+
server = await start();
|
|
321
|
+
client = connect(server);
|
|
322
|
+
return this.instantiate(context, server, client, options);
|
|
323
|
+
}
|
|
324
|
+
catch (error) {
|
|
325
|
+
const failures = [error];
|
|
326
|
+
for (const resource of [client, server]) {
|
|
327
|
+
if (resource === undefined)
|
|
328
|
+
continue;
|
|
329
|
+
try {
|
|
330
|
+
await resource.close();
|
|
331
|
+
}
|
|
332
|
+
catch (cleanupError) {
|
|
333
|
+
failures.push(cleanupError);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
if (failures.length === 1)
|
|
337
|
+
throw error;
|
|
338
|
+
throw new AggregateError(failures, "BlackBox startup cleanup failed.");
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
/**
|
|
342
|
+
* Instantiates a BlackBox through its deliberately private constructor.
|
|
343
|
+
*/
|
|
344
|
+
instantiate(context, server, client, options, observation) {
|
|
345
|
+
const Constructor = BlackBox;
|
|
346
|
+
return new Constructor(context, server, client, options, observation);
|
|
347
|
+
},
|
|
348
|
+
});
|
|
349
|
+
class Request {
|
|
350
|
+
#internals;
|
|
351
|
+
#request;
|
|
352
|
+
#actor;
|
|
353
|
+
constructor(blackBox, request, actor) {
|
|
354
|
+
this.#internals = BlackBoxAccess.get(blackBox);
|
|
355
|
+
this.#request = request;
|
|
356
|
+
this.#actor = actor;
|
|
357
|
+
}
|
|
358
|
+
post(schema, message, options = {}) {
|
|
359
|
+
this.#internals.assertOpen();
|
|
360
|
+
return this.#request.post(schema, message, options);
|
|
361
|
+
}
|
|
362
|
+
postEvent(schema, message) {
|
|
363
|
+
return this.#internals.postEvent(this.#actor, schema, message);
|
|
364
|
+
}
|
|
365
|
+
postExternalEvent(schema, message) {
|
|
366
|
+
return this.#internals.postExternalEvent(this.#actor, schema, message);
|
|
367
|
+
}
|
|
368
|
+
send(query, options) {
|
|
369
|
+
this.#internals.assertOpen();
|
|
370
|
+
return this.#request.send(query, options);
|
|
371
|
+
}
|
|
372
|
+
async createSubscription(topic, options) {
|
|
373
|
+
this.#internals.assertOpen();
|
|
374
|
+
const subscription = await this.#request.createSubscription(topic, options);
|
|
375
|
+
const tracked = new TrackedSubscription(subscription, () => {
|
|
376
|
+
this.#internals.onRelease(tracked);
|
|
377
|
+
});
|
|
378
|
+
return this.#internals.track(tracked);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
class TrackedSubscription {
|
|
382
|
+
#handle;
|
|
383
|
+
#onRelease;
|
|
384
|
+
#released = false;
|
|
385
|
+
#cancellation;
|
|
386
|
+
constructor(handle, onRelease) {
|
|
387
|
+
this.#handle = handle;
|
|
388
|
+
this.#onRelease = onRelease;
|
|
389
|
+
}
|
|
390
|
+
get updates() {
|
|
391
|
+
return this.trackStream(this.#handle.updates);
|
|
392
|
+
}
|
|
393
|
+
get lifecycle() {
|
|
394
|
+
return this.trackStream(this.#handle.lifecycle);
|
|
395
|
+
}
|
|
396
|
+
activate(options) {
|
|
397
|
+
return this.#handle.activate(options);
|
|
398
|
+
}
|
|
399
|
+
async cancel() {
|
|
400
|
+
try {
|
|
401
|
+
this.#cancellation ??= this.#handle.cancel();
|
|
402
|
+
await this.#cancellation;
|
|
403
|
+
}
|
|
404
|
+
finally {
|
|
405
|
+
this.release();
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
trackStream(source) {
|
|
409
|
+
const onRelease = () => {
|
|
410
|
+
this.release();
|
|
411
|
+
};
|
|
412
|
+
const onCancel = () => this.cancel();
|
|
413
|
+
return {
|
|
414
|
+
[Symbol.asyncIterator]() {
|
|
415
|
+
const iterator = source[Symbol.asyncIterator]();
|
|
416
|
+
return {
|
|
417
|
+
next: async () => {
|
|
418
|
+
try {
|
|
419
|
+
const result = await iterator.next();
|
|
420
|
+
if (result.done)
|
|
421
|
+
onRelease();
|
|
422
|
+
return result;
|
|
423
|
+
}
|
|
424
|
+
catch (error) {
|
|
425
|
+
onRelease();
|
|
426
|
+
throw error;
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
return: async (value) => {
|
|
430
|
+
try {
|
|
431
|
+
await onCancel();
|
|
432
|
+
const returned = await iterator.return?.(value);
|
|
433
|
+
return returned ?? { done: true, value: undefined };
|
|
434
|
+
}
|
|
435
|
+
finally {
|
|
436
|
+
onRelease();
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
throw: async (error) => {
|
|
440
|
+
try {
|
|
441
|
+
await onCancel();
|
|
442
|
+
if (iterator.throw === undefined)
|
|
443
|
+
throw error;
|
|
444
|
+
return await iterator.throw(error);
|
|
445
|
+
}
|
|
446
|
+
finally {
|
|
447
|
+
onRelease();
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
};
|
|
451
|
+
},
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
release() {
|
|
455
|
+
if (this.#released)
|
|
456
|
+
return;
|
|
457
|
+
this.#released = true;
|
|
458
|
+
this.#onRelease();
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
class Tracked {
|
|
462
|
+
#handle;
|
|
463
|
+
#onRelease;
|
|
464
|
+
#cancellation;
|
|
465
|
+
constructor(handle, onRelease) {
|
|
466
|
+
this.#handle = handle;
|
|
467
|
+
this.#onRelease = onRelease;
|
|
468
|
+
}
|
|
469
|
+
async activate(...arguments_) {
|
|
470
|
+
const subscription = this.#handle;
|
|
471
|
+
if (subscription.activate === undefined) {
|
|
472
|
+
throw new TypeError("Tracked handle does not support activation.");
|
|
473
|
+
}
|
|
474
|
+
await subscription.activate(...arguments_);
|
|
475
|
+
}
|
|
476
|
+
[Symbol.asyncIterator]() {
|
|
477
|
+
const iterator = this.#handle[Symbol.asyncIterator]();
|
|
478
|
+
return {
|
|
479
|
+
next: async (...arguments_) => {
|
|
480
|
+
try {
|
|
481
|
+
const result = await iterator.next(...arguments_);
|
|
482
|
+
if (result.done)
|
|
483
|
+
this.#onRelease();
|
|
484
|
+
return result;
|
|
485
|
+
}
|
|
486
|
+
catch (error) {
|
|
487
|
+
this.#onRelease();
|
|
488
|
+
throw error;
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
return: async (value) => {
|
|
492
|
+
try {
|
|
493
|
+
await this.cancel();
|
|
494
|
+
const returned = await iterator.return?.(value);
|
|
495
|
+
if (returned !== undefined)
|
|
496
|
+
return returned;
|
|
497
|
+
return { done: true, value: undefined };
|
|
498
|
+
}
|
|
499
|
+
finally {
|
|
500
|
+
this.#onRelease();
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
throw: async (error) => {
|
|
504
|
+
try {
|
|
505
|
+
await this.cancel();
|
|
506
|
+
if (iterator.throw === undefined)
|
|
507
|
+
throw error;
|
|
508
|
+
return await iterator.throw(error);
|
|
509
|
+
}
|
|
510
|
+
finally {
|
|
511
|
+
this.#onRelease();
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
async cancel() {
|
|
517
|
+
try {
|
|
518
|
+
this.#cancellation ??= this.#handle.cancel();
|
|
519
|
+
await this.#cancellation;
|
|
520
|
+
}
|
|
521
|
+
finally {
|
|
522
|
+
this.#onRelease();
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Normalizes BlackBox configuration and validates its tenant and timing rules.
|
|
528
|
+
*/
|
|
529
|
+
const BlackBoxOptionsValues = Object.freeze({
|
|
530
|
+
// prettier-ignore
|
|
531
|
+
/**
|
|
532
|
+
* Normalizes options for one context.
|
|
533
|
+
*/
|
|
534
|
+
normalize(context, options) {
|
|
535
|
+
const multi = context instanceof BoundedContext ? context.isMultitenant : context.isMultitenant();
|
|
536
|
+
const selectedTenant = this.tenant(options.tenant);
|
|
537
|
+
if (multi && selectedTenant === undefined)
|
|
538
|
+
throw new TypeError("BlackBox multitenant context requires a tenant.");
|
|
539
|
+
if (!multi && selectedTenant !== undefined)
|
|
540
|
+
throw new TypeError("BlackBox single-tenant context rejects a tenant.");
|
|
541
|
+
return Object.freeze({
|
|
542
|
+
tenant: selectedTenant,
|
|
543
|
+
zoneId: this.zoneId(options.zoneId),
|
|
544
|
+
timeoutMs: this.positiveInteger(options.timeoutMs ?? 500, "timeoutMs"),
|
|
545
|
+
intervalMs: this.positiveInteger(options.intervalMs ?? 5, "intervalMs"),
|
|
546
|
+
});
|
|
547
|
+
},
|
|
548
|
+
/**
|
|
549
|
+
* Clones an optional tenant message.
|
|
550
|
+
*/
|
|
551
|
+
cloneTenant(value) {
|
|
552
|
+
return value === undefined ? undefined : clone(TenantIdSchema, value);
|
|
553
|
+
},
|
|
554
|
+
/**
|
|
555
|
+
* Creates default normalized options for internal test seams.
|
|
556
|
+
*/
|
|
557
|
+
defaults() {
|
|
558
|
+
return Object.freeze({
|
|
559
|
+
tenant: undefined,
|
|
560
|
+
zoneId: this.zoneId(undefined),
|
|
561
|
+
timeoutMs: 500,
|
|
562
|
+
intervalMs: 5,
|
|
563
|
+
});
|
|
564
|
+
},
|
|
565
|
+
/**
|
|
566
|
+
* Converts a tenant option to its message form.
|
|
567
|
+
*/
|
|
568
|
+
tenant(value) {
|
|
569
|
+
if (value === undefined)
|
|
570
|
+
return undefined;
|
|
571
|
+
if (typeof value !== "string") {
|
|
572
|
+
if (value.kind.case !== "value" || value.kind.value.length === 0)
|
|
573
|
+
throw new TypeError("BlackBox tenant must not be empty.");
|
|
574
|
+
return clone(TenantIdSchema, value);
|
|
575
|
+
}
|
|
576
|
+
if (value.length === 0)
|
|
577
|
+
throw new TypeError("BlackBox tenant must not be empty.");
|
|
578
|
+
return create(TenantIdSchema, { kind: { case: "value", value } });
|
|
579
|
+
},
|
|
580
|
+
/**
|
|
581
|
+
* Converts a zone option to its message form.
|
|
582
|
+
*/
|
|
583
|
+
zoneId(value) {
|
|
584
|
+
if (typeof value !== "string" && value !== undefined) {
|
|
585
|
+
if (value.value.length === 0)
|
|
586
|
+
throw new TypeError("BlackBox zoneId must not be empty.");
|
|
587
|
+
return clone(ZoneIdSchema, value);
|
|
588
|
+
}
|
|
589
|
+
const zone = value ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
590
|
+
if (zone.length === 0)
|
|
591
|
+
throw new TypeError("BlackBox zoneId must not be empty.");
|
|
592
|
+
return create(ZoneIdSchema, { value: zone });
|
|
593
|
+
},
|
|
594
|
+
/**
|
|
595
|
+
* Validates a positive whole-number duration.
|
|
596
|
+
*/
|
|
597
|
+
positiveInteger(value, name) {
|
|
598
|
+
if (!Number.isInteger(value) || value <= 0)
|
|
599
|
+
throw new TypeError(`BlackBox ${name} must be a positive integer.`);
|
|
600
|
+
return value;
|
|
601
|
+
},
|
|
602
|
+
});
|
|
603
|
+
/**
|
|
604
|
+
* Supplies time values and cancellable delays for BlackBox operations.
|
|
605
|
+
*/
|
|
606
|
+
const BlackBoxClock = Object.freeze({
|
|
607
|
+
// prettier-ignore
|
|
608
|
+
/**
|
|
609
|
+
* Creates the current Protobuf timestamp.
|
|
610
|
+
*/
|
|
611
|
+
timestamp() {
|
|
612
|
+
return create(TimestampSchema, { seconds: BigInt(Math.floor(Date.now() / 1_000)) });
|
|
613
|
+
},
|
|
614
|
+
/**
|
|
615
|
+
* Waits for a delay or rejects when the supplied signal aborts.
|
|
616
|
+
*/
|
|
617
|
+
wait(milliseconds, signal) {
|
|
618
|
+
return new Promise((resolve, reject) => {
|
|
619
|
+
const abort = () => {
|
|
620
|
+
clearTimeout(timer);
|
|
621
|
+
reject(signal.reason instanceof Error ? signal.reason : new Error(String(signal.reason)));
|
|
622
|
+
};
|
|
623
|
+
const timer = setTimeout(() => {
|
|
624
|
+
signal.removeEventListener("abort", abort);
|
|
625
|
+
resolve();
|
|
626
|
+
}, milliseconds);
|
|
627
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
628
|
+
});
|
|
629
|
+
},
|
|
630
|
+
});
|
|
631
|
+
/**
|
|
632
|
+
* Collects rejected results while preserving their settlement order.
|
|
633
|
+
*/
|
|
634
|
+
const BlackBoxFailures = Object.freeze({
|
|
635
|
+
// prettier-ignore
|
|
636
|
+
/**
|
|
637
|
+
* Returns reasons from rejected promises.
|
|
638
|
+
*/
|
|
639
|
+
rejected(results) {
|
|
640
|
+
const failures = [];
|
|
641
|
+
for (const result of results) {
|
|
642
|
+
if (result.status === "rejected")
|
|
643
|
+
failures.push(result.reason);
|
|
644
|
+
}
|
|
645
|
+
return failures;
|
|
646
|
+
},
|
|
647
|
+
});
|
|
648
|
+
//# sourceMappingURL=black-box.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"black-box.js","sourceRoot":"","sources":["../../src/black-box/black-box.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAmC,MAAM,oBAAoB,CAAC;AAEpF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,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