@voltro/testing 0.81.0 → 0.83.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/CHANGELOG.md +1806 -6
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/dist/index.d.ts +13 -3
- package/dist/index.js +143 -133
- package/dist/platform.d.ts +14 -0
- package/dist/platform.js +46 -0
- package/package.json +13 -8
package/dist/index.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { AUTO_FILLED_COLUMNS as e, allRegisteredTables as t, changeDelete as n, changeInsert as r, changeSoftDelete as i, changeUpdate as a, clearRelationsRegistry as o, missingRequiredColumns as s, registerRelations as c } from "@voltro/database";
|
|
2
2
|
import { Cause as l, Effect as u, Either as d, Exit as f, Layer as p, Schema as m } from "effect";
|
|
3
3
|
import { ApiUnavailable as h, SubjectService as g, anonymousSubject as _, checkGuardsEffect as v, composeAuthStrategies as y, composeRpcInterceptors as b, eventRoute as x, systemSubject as S, tenantScopedSubject as ee } from "@voltro/protocol";
|
|
4
|
-
import { EventBus as te, InMemoryDataStore as ne, NO_ROW_FILTER as C, apiBindingTokenEnv as re, apiBindingUrlEnv as ie, appValidation as ae, applyRowFilterToDescriptor as oe, clearSystemStoreHandle as se, getRowFilter as w, getSystemStoreHandle as
|
|
4
|
+
import { EventBus as te, InMemoryDataStore as ne, NO_ROW_FILTER as C, apiBindingTokenEnv as re, apiBindingUrlEnv as ie, appValidation as ae, applyRowFilterToDescriptor as oe, clearSystemStoreHandle as se, getFieldCipher as ce, getRowFilter as w, getSystemStoreHandle as le, makeAppAccess as ue, makeConnectionState as de, makeDataLoader as fe, makeEffectStoreLayer as T, makeEventPublisher as pe, makeFieldCipher as me, makeOutboxFacade as he, makeSchemaRegistry as ge, mintServiceToken as _e, publishEvent as ve, resolveRequestClientAddress as ye, resolveRowFilterScopeFor as be, resolveTransactionSubject as xe, resolveTrustedProxies as Se, runProvidedEffect as E, runWithDeadlockRetry as Ce, serviceCallerTokenEnv as we, setFieldCipher as Te, setSystemStoreHandle as D, wrapStoreWithMixinBehaviour as O } from "@voltro/runtime";
|
|
5
5
|
import { installEnvSnapshot as Ee } from "@voltro/env";
|
|
6
|
-
import
|
|
6
|
+
import k from "node:net";
|
|
7
7
|
import { describe as De } from "vitest";
|
|
8
8
|
import { collectPublicApiRoutes as Oe, dispatchSharedPath as ke, restRoutesToHttpRoutes as Ae } from "@voltro/protocol/rest";
|
|
9
9
|
import { createLogger as je } from "@voltro/logger";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { createRequire as
|
|
14
|
-
import { dirname as
|
|
10
|
+
import { randomBytes as Me } from "node:crypto";
|
|
11
|
+
import { CurrentWorkflowRunId as Ne, getWorkflowJournalCipher as Pe, inMemoryWorkflowEngineLayer as Fe, makeInMemoryRecorder as Ie, setWorkflowJournalCipher as Le } from "@voltro/workflow";
|
|
12
|
+
import { spawn as Re } from "node:child_process";
|
|
13
|
+
import { createRequire as ze } from "node:module";
|
|
14
|
+
import { dirname as Be, join as A } from "node:path";
|
|
15
15
|
//#region src/fixtureRow.ts
|
|
16
|
-
var
|
|
16
|
+
var Ve = new Set(e), j = 0, M = () => ++j, He = (e, t) => {
|
|
17
17
|
if (t.oneOf && t.oneOf.length > 0) return t.oneOf[0];
|
|
18
18
|
if (t.enumValues && t.enumValues.length > 0) return t.enumValues[0];
|
|
19
19
|
let n = t.unique === !0;
|
|
20
20
|
switch (t.type) {
|
|
21
21
|
case "text":
|
|
22
22
|
case "id":
|
|
23
|
-
case "enum": return n ? `${e}-${++
|
|
24
|
-
case "reference": return t.referenceStorage === "numeric" ? n ? ++
|
|
23
|
+
case "enum": return n ? `${e}-${++j}` : e;
|
|
24
|
+
case "reference": return t.referenceStorage === "numeric" ? n ? ++j : 0 : n ? `${e}-${++j}` : e;
|
|
25
25
|
case "integer":
|
|
26
|
-
case "real": return n ? ++
|
|
26
|
+
case "real": return n ? ++j : 0;
|
|
27
27
|
case "decimal":
|
|
28
|
-
case "bigint": return n ? String(++
|
|
28
|
+
case "bigint": return n ? String(++j) : "0";
|
|
29
29
|
case "boolean": return !1;
|
|
30
30
|
case "timestamp":
|
|
31
31
|
case "date": return /* @__PURE__ */ new Date(0);
|
|
32
32
|
default: throw Error(`fixtureRow: column '${e}' is a required '${t.type}' with no default, and fixtureRow can't synthesize a safe placeholder for that type. Pass it explicitly: fixtureRow(table, { ${e}: … }).`);
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, N = (e, t = {}) => {
|
|
35
35
|
let n = {};
|
|
36
|
-
for (let r of s(e, t))
|
|
36
|
+
for (let r of s(e, t)) Ve.has(r) || (n[r] = He(r, e.fields[r]));
|
|
37
37
|
return {
|
|
38
38
|
...n,
|
|
39
39
|
...t
|
|
40
40
|
};
|
|
41
|
-
},
|
|
41
|
+
}, P = m.decodeUnknownEither(m.DateFromString), Ue = /^\d{4}-\d{2}-\d{2}$/, We = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/, Ge = (e, t) => {
|
|
42
42
|
if (typeof e != "string" || !We.test(e) && !(t === "date" && Ue.test(e))) return !1;
|
|
43
|
-
let n = e.slice(0, 10), r =
|
|
43
|
+
let n = e.slice(0, 10), r = P(n);
|
|
44
44
|
return d.isRight(r) && Number.isFinite(r.right.getTime()) && r.right.toISOString().slice(0, 10) === n;
|
|
45
45
|
}, Ke = (e, t) => {
|
|
46
46
|
let n = Object.entries(e.fields).filter(([, e]) => e.type === "timestamp" || e.type === "date");
|
|
@@ -49,7 +49,7 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
49
49
|
for (let [a, o] of n) {
|
|
50
50
|
let n = t[a];
|
|
51
51
|
if (n == null || n instanceof Date && Number.isFinite(n.getTime())) continue;
|
|
52
|
-
let s =
|
|
52
|
+
let s = P(n);
|
|
53
53
|
if (!Ge(n, o.type) || d.isLeft(s) || !Number.isFinite(s.right.getTime())) throw TypeError(`hydrateFixtureRows: table '${e.tableName}', row ${r}, column '${a}' requires a valid Date or ISO date-time with Z or an offset${o.type === "date" ? " (YYYY-MM-DD is also accepted as UTC midnight)" : ""}.`);
|
|
54
54
|
i[a] = s.right;
|
|
55
55
|
}
|
|
@@ -57,7 +57,7 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
57
57
|
});
|
|
58
58
|
}, qe = (e) => {
|
|
59
59
|
let t = {};
|
|
60
|
-
for (let [n, r] of Object.entries(e)) t[n] = typeof r == "function" ? r(
|
|
60
|
+
for (let [n, r] of Object.entries(e)) t[n] = typeof r == "function" ? r(M()) : r;
|
|
61
61
|
return t;
|
|
62
62
|
}, Je = (e) => {
|
|
63
63
|
for (let [t, n] of Object.entries(e.fields)) if (n.type === "id") return t;
|
|
@@ -70,29 +70,29 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
70
70
|
let s = n.references();
|
|
71
71
|
if (i.includes(s.tableName)) throw Error(`defineFactory: creating '${t.tableName}' requires '${s.tableName}' via '${o}', and that reference is cyclic (${[...i, s.tableName].join(" → ")}). Insert one side first and pass the id: create(store, { ${o}: existing.id }).`);
|
|
72
72
|
let c = r[o];
|
|
73
|
-
a[o] = (c === void 0 ? await
|
|
73
|
+
a[o] = (c === void 0 ? await F(e, s, {}, {}, [...i, s.tableName]) : await c.create(e, {}))[n.referenceColumn ?? Je(s)];
|
|
74
74
|
}
|
|
75
75
|
return a;
|
|
76
|
-
},
|
|
76
|
+
}, F = async (e, t, n, r, i) => {
|
|
77
77
|
let a = {
|
|
78
78
|
...await Ye(e, t, n, r, i),
|
|
79
79
|
...n
|
|
80
80
|
};
|
|
81
|
-
return e.insert(t.tableName,
|
|
82
|
-
},
|
|
81
|
+
return e.insert(t.tableName, N(t, a));
|
|
82
|
+
}, Xe = (e, t) => typeof e == "function" ? e(t) : e ?? {}, Ze = (e, t = {}) => {
|
|
83
83
|
let n = t.traits ?? {}, r = t.associations ?? {}, i = (t) => {
|
|
84
84
|
let a = (e = {}) => ({
|
|
85
85
|
...qe(t),
|
|
86
86
|
...e
|
|
87
|
-
}), o = (t = {}) =>
|
|
87
|
+
}), o = (t = {}) => N(e, a(t));
|
|
88
88
|
return {
|
|
89
89
|
table: e,
|
|
90
90
|
build: o,
|
|
91
|
-
buildList: (e, t) => Array.from({ length: e }, (e, n) => o(
|
|
92
|
-
create: (t, n = {}) =>
|
|
91
|
+
buildList: (e, t) => Array.from({ length: e }, (e, n) => o(Xe(t, n))),
|
|
92
|
+
create: (t, n = {}) => F(t, e, a(n), r, [e.tableName]),
|
|
93
93
|
createList: async (t, n, i) => {
|
|
94
94
|
let o = [];
|
|
95
|
-
for (let s = 0; s < n; s++) o.push(await
|
|
95
|
+
for (let s = 0; s < n; s++) o.push(await F(t, e, a(Xe(i, s)), r, [e.tableName]));
|
|
96
96
|
return o;
|
|
97
97
|
},
|
|
98
98
|
with: (...r) => {
|
|
@@ -114,19 +114,19 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
114
114
|
};
|
|
115
115
|
};
|
|
116
116
|
return i(t.defaults ?? {});
|
|
117
|
-
},
|
|
117
|
+
}, I = Symbol.for("voltro/testing/mockClock.installed"), L = () => globalThis, Qe = (e, t) => new Proxy(e, {
|
|
118
118
|
construct: (e, n, r) => Reflect.construct(e, n.length === 0 ? [t()] : n, r),
|
|
119
119
|
apply: () => new e(t()).toString(),
|
|
120
120
|
get: (e, n, r) => n === "now" ? () => t() : Reflect.get(e, n, r)
|
|
121
|
-
}),
|
|
121
|
+
}), R = (e) => {
|
|
122
122
|
if (typeof e == "number") return e;
|
|
123
123
|
let t = e instanceof Date ? e.getTime() : Date.parse(e);
|
|
124
124
|
if (Number.isNaN(t)) throw Error(`mockClock: cannot read an instant from '${String(e)}'`);
|
|
125
125
|
return t;
|
|
126
|
-
},
|
|
126
|
+
}, z = class {
|
|
127
127
|
currentMs;
|
|
128
128
|
constructor(e = "2026-01-01T00:00:00Z") {
|
|
129
|
-
this.currentMs =
|
|
129
|
+
this.currentMs = R(e);
|
|
130
130
|
}
|
|
131
131
|
now() {
|
|
132
132
|
return this.currentMs;
|
|
@@ -138,28 +138,28 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
138
138
|
this.currentMs += typeof e == "number" ? e : nt(e);
|
|
139
139
|
}
|
|
140
140
|
set(e) {
|
|
141
|
-
this.currentMs =
|
|
141
|
+
this.currentMs = R(e);
|
|
142
142
|
}
|
|
143
143
|
get installed() {
|
|
144
|
-
return
|
|
144
|
+
return L()[I]?.clock === this;
|
|
145
145
|
}
|
|
146
146
|
install() {
|
|
147
|
-
let e =
|
|
147
|
+
let e = L(), t = e[I];
|
|
148
148
|
if (t !== void 0) throw Error("mockClock: global time is already faked" + (t.clock === this ? " by this same clock" : " by another MockClock") + ". Uninstall it before installing again — a nested install restores the outer fake on the way out, which leaves the realm frozen with nothing pointing at why. `withFrozenTime` always restores, including on a throw.");
|
|
149
149
|
let n = globalThis.Date;
|
|
150
|
-
return e[
|
|
150
|
+
return e[I] = {
|
|
151
151
|
realDate: n,
|
|
152
152
|
clock: this
|
|
153
|
-
}, globalThis.Date =
|
|
153
|
+
}, globalThis.Date = Qe(n, () => this.currentMs), () => {
|
|
154
154
|
this.uninstall();
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
uninstall() {
|
|
158
|
-
let e =
|
|
159
|
-
t !== void 0 && t.clock === this && (globalThis.Date = t.realDate, delete e[
|
|
158
|
+
let e = L(), t = e[I];
|
|
159
|
+
t !== void 0 && t.clock === this && (globalThis.Date = t.realDate, delete e[I]);
|
|
160
160
|
}
|
|
161
161
|
}, $e = (e) => typeof e == "object" && !!e && typeof e.then == "function", et = (e, t) => {
|
|
162
|
-
let n = e instanceof
|
|
162
|
+
let n = e instanceof z ? e : new z(e);
|
|
163
163
|
n.install();
|
|
164
164
|
let r = !1;
|
|
165
165
|
try {
|
|
@@ -171,7 +171,7 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
171
171
|
r || n.uninstall();
|
|
172
172
|
}
|
|
173
173
|
}, tt = (e) => u.acquireRelease(u.sync(() => {
|
|
174
|
-
let t = e instanceof
|
|
174
|
+
let t = e instanceof z ? e : new z(e);
|
|
175
175
|
return t.install(), t;
|
|
176
176
|
}), (e) => u.sync(() => {
|
|
177
177
|
e.uninstall();
|
|
@@ -187,16 +187,19 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
187
187
|
case "d": return n * 864e5;
|
|
188
188
|
default: throw Error(`mockClock: unknown unit '${r}'`);
|
|
189
189
|
}
|
|
190
|
-
},
|
|
190
|
+
}, B = class {
|
|
191
191
|
emitted = [];
|
|
192
192
|
async emit(e, t) {
|
|
193
|
-
let n = typeof e == "string" ? e : e.id ?? e.event ?? "(unnamed event)";
|
|
193
|
+
let n = typeof e == "string" ? e : e.name ?? e.id ?? e.event ?? "(unnamed event)";
|
|
194
194
|
return this.emitted.push({
|
|
195
195
|
event: n,
|
|
196
196
|
payload: t,
|
|
197
197
|
emittedAt: /* @__PURE__ */ new Date()
|
|
198
198
|
}), { delivered: 0 };
|
|
199
199
|
}
|
|
200
|
+
async listTargets(e, t) {
|
|
201
|
+
return [];
|
|
202
|
+
}
|
|
200
203
|
payloadsFor(e) {
|
|
201
204
|
return this.emitted.filter((t) => t.event === e).map((e) => e.payload);
|
|
202
205
|
}
|
|
@@ -206,7 +209,7 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
206
209
|
clear() {
|
|
207
210
|
this.emitted.length = 0;
|
|
208
211
|
}
|
|
209
|
-
},
|
|
212
|
+
}, V = (e = {}) => {
|
|
210
213
|
let t = e.tenantId ?? null, n = new te({
|
|
211
214
|
origin: e.origin ?? "test",
|
|
212
215
|
...e.ringSize === void 0 ? {} : { ringSize: e.ringSize }
|
|
@@ -276,7 +279,7 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
276
279
|
n.clear();
|
|
277
280
|
}
|
|
278
281
|
};
|
|
279
|
-
},
|
|
282
|
+
}, H = class {
|
|
280
283
|
queue;
|
|
281
284
|
calls = [];
|
|
282
285
|
constructor(e) {
|
|
@@ -291,41 +294,41 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
291
294
|
remaining() {
|
|
292
295
|
return this.queue.length;
|
|
293
296
|
}
|
|
294
|
-
}, rt = (e) => e,
|
|
295
|
-
let n =
|
|
297
|
+
}, rt = (e) => e, U = "00000000000000000000000000000000", W = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), it = (e, t) => {
|
|
298
|
+
let n = G.get(e);
|
|
296
299
|
if (n === void 0) throw Error("withRpcConnection requires a context created by makeTestContext");
|
|
297
300
|
return n(t);
|
|
298
|
-
},
|
|
299
|
-
|
|
301
|
+
}, K = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Y = (e) => J.get(e) ?? [], X = /* @__PURE__ */ new WeakMap(), Z = (e, t, n) => {
|
|
302
|
+
X.set(e, {
|
|
300
303
|
publicApi: t,
|
|
301
304
|
...n === void 0 ? {} : { remoteAddr: n }
|
|
302
305
|
});
|
|
303
|
-
},
|
|
304
|
-
let n =
|
|
306
|
+
}, at = (e) => X.get(e), ot = /* @__PURE__ */ new WeakMap(), st = (e, t) => {
|
|
307
|
+
let n = J.get(e) ?? [], r = t === "mutation" ? "interceptMutation" : t === "query" ? "interceptQuery" : "interceptAction", i = [];
|
|
305
308
|
for (let e of n) {
|
|
306
309
|
let t = e[r];
|
|
307
310
|
typeof t == "function" && i.push(t);
|
|
308
311
|
}
|
|
309
312
|
return b(i);
|
|
310
|
-
},
|
|
311
|
-
let t = (
|
|
313
|
+
}, ct = (e) => {
|
|
314
|
+
let t = (J.get(e) ?? []).map((e) => e.services).filter((e) => e !== void 0), n = ot.get(e) ?? [], r = [...t, ...n];
|
|
312
315
|
if (r.length !== 0) return p.mergeAll(...r);
|
|
313
|
-
},
|
|
314
|
-
let t =
|
|
316
|
+
}, lt = (e) => {
|
|
317
|
+
let t = K.get(e);
|
|
315
318
|
t !== void 0 && (t.length = 0);
|
|
316
|
-
},
|
|
317
|
-
let t =
|
|
319
|
+
}, Q = async (e) => {
|
|
320
|
+
let t = K.get(e);
|
|
318
321
|
if (t === void 0 || t.length === 0) return;
|
|
319
322
|
let n = [...t];
|
|
320
323
|
t.length = 0;
|
|
321
324
|
for (let e of n) await e();
|
|
322
|
-
},
|
|
323
|
-
let n =
|
|
325
|
+
}, ut = (e) => q.get(e) ?? [], dt = async (e, t) => {
|
|
326
|
+
let n = W.get(e);
|
|
324
327
|
return n === void 0 ? e.store.transactional(async (n) => t({
|
|
325
328
|
...e,
|
|
326
329
|
store: n
|
|
327
330
|
})) : n(t);
|
|
328
|
-
},
|
|
331
|
+
}, ft = (e) => {
|
|
329
332
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = (n) => {
|
|
330
333
|
let r = t.get(n);
|
|
331
334
|
return r === void 0 ? !1 : r.expiresAt !== null && r.expiresAt <= e() ? (t.delete(n), !1) : !0;
|
|
@@ -364,7 +367,7 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
364
367
|
return i(e, o, n.ttlMs, n.tags), o;
|
|
365
368
|
}
|
|
366
369
|
};
|
|
367
|
-
},
|
|
370
|
+
}, pt = (e) => {
|
|
368
371
|
let t = /* @__PURE__ */ new Map(), n = (n) => {
|
|
369
372
|
let r = t.get(n);
|
|
370
373
|
return r === void 0 ? !1 : r.expiresAt !== null && r.expiresAt <= e() ? (t.delete(n), !1) : !0;
|
|
@@ -392,29 +395,29 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
392
395
|
t.clear();
|
|
393
396
|
}
|
|
394
397
|
};
|
|
395
|
-
},
|
|
396
|
-
let n =
|
|
397
|
-
|
|
398
|
+
}, mt = async (e, t) => {
|
|
399
|
+
let n = le();
|
|
400
|
+
D(e);
|
|
398
401
|
try {
|
|
399
402
|
return await t();
|
|
400
403
|
} finally {
|
|
401
|
-
n === void 0 ? se() :
|
|
404
|
+
n === void 0 ? se() : D(n);
|
|
402
405
|
}
|
|
403
|
-
},
|
|
404
|
-
|
|
405
|
-
},
|
|
406
|
-
let r =
|
|
406
|
+
}, ht = /* @__PURE__ */ new Set(), gt = (e) => {
|
|
407
|
+
ht.has(e) || (ht.add(e), console.warn(e));
|
|
408
|
+
}, _t = (e, t, n) => {
|
|
409
|
+
let r = vt, i;
|
|
407
410
|
return () => {
|
|
408
411
|
let a = t ?? w();
|
|
409
|
-
return t !== void 0 && w() !== void 0 && t !== w() &&
|
|
412
|
+
return t !== void 0 && w() !== void 0 && t !== w() && gt("[voltro:testing] this test passes `rowFilter:` while a DIFFERENT filter is registered via `setRowFilter`. The option wins, so this test does not exercise your app's registration. Drop `rowFilter:` to run the real process-global one."), (i === void 0 || a !== r) && (r = a, i = mt(n, () => E(be(a, e, (e) => {
|
|
410
413
|
console.error("[voltro:testing] row filter failed to load — reads refused for this subject", e);
|
|
411
414
|
})))), i;
|
|
412
415
|
};
|
|
413
|
-
},
|
|
416
|
+
}, vt = Symbol("unresolved"), yt = (e, t) => new Proxy(e, { get: (e, n) => {
|
|
414
417
|
if (n === "query") return async (n) => e.query(oe(await t(), n));
|
|
415
418
|
let r = Reflect.get(e, n, e);
|
|
416
419
|
return typeof r == "function" ? r.bind(e) : r;
|
|
417
|
-
} }),
|
|
420
|
+
} }), bt = (e = {}) => {
|
|
418
421
|
if (Ee({
|
|
419
422
|
...process.env,
|
|
420
423
|
...e.env ?? {}
|
|
@@ -422,15 +425,17 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
422
425
|
o();
|
|
423
426
|
for (let t of e.relations) c(t);
|
|
424
427
|
}
|
|
425
|
-
let n = e.tables ?? t(), r = ge(n), i = new ne(e.store ?? {})
|
|
428
|
+
let n = e.tables ?? t(), r = ge(n), i = new ne(e.store ?? {});
|
|
429
|
+
for (let t of e.plugins ?? []) t.bindDataStore?.(i);
|
|
430
|
+
let a = {
|
|
426
431
|
dataStore: i,
|
|
427
432
|
schemaRegistry: r
|
|
428
433
|
};
|
|
429
|
-
|
|
430
|
-
let s = new
|
|
434
|
+
D(a);
|
|
435
|
+
let s = new z(e.clockStart), l = new B(), u = V(), d = new H(e.llmResponses ?? []), f = ft(() => s.now()), p = pt(() => s.now()), m = (t, n, o = i, c, h = !1) => {
|
|
431
436
|
let g = {
|
|
432
437
|
subject: t,
|
|
433
|
-
traceId:
|
|
438
|
+
traceId: U,
|
|
434
439
|
...n === void 0 ? {} : { connection: n }
|
|
435
440
|
}, _ = c?.queued ?? [], v = c?.nudges ?? [], y = pe({
|
|
436
441
|
bus: u.bus,
|
|
@@ -440,7 +445,7 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
440
445
|
e();
|
|
441
446
|
});
|
|
442
447
|
} }
|
|
443
|
-
}), b =
|
|
448
|
+
}), b = fe({ store: o }), x = h ? async () => C : _t(t, e.rowFilter, a), S = {
|
|
444
449
|
apis: e.apis ?? Object.freeze({}),
|
|
445
450
|
transaction: async (e, r) => {
|
|
446
451
|
let a = xe(t, r?.tenantId, o !== i);
|
|
@@ -453,7 +458,7 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
453
458
|
}, h), a = await e(i);
|
|
454
459
|
return s = i, a;
|
|
455
460
|
});
|
|
456
|
-
return s !== void 0 && (await
|
|
461
|
+
return s !== void 0 && (await Q(s), v.push(...ut(s))), c;
|
|
457
462
|
},
|
|
458
463
|
clock: s,
|
|
459
464
|
webhooks: l,
|
|
@@ -462,19 +467,19 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
462
467
|
llm: d,
|
|
463
468
|
...e.ai === void 0 ? {} : { ai: e.ai },
|
|
464
469
|
request: g,
|
|
465
|
-
...n === void 0 ? {} : { connectionState:
|
|
470
|
+
...n === void 0 ? {} : { connectionState: de(n, o === i ? void 0 : (e) => {
|
|
466
471
|
_.push(e);
|
|
467
472
|
}) },
|
|
468
473
|
validation: ae,
|
|
469
|
-
access:
|
|
474
|
+
access: ue(t),
|
|
470
475
|
cache: f,
|
|
471
476
|
kv: p,
|
|
472
|
-
store:
|
|
477
|
+
store: O(yt(o, x), {
|
|
473
478
|
subject: t,
|
|
474
479
|
schemaRegistry: r,
|
|
475
480
|
rowFilter: C
|
|
476
481
|
}),
|
|
477
|
-
storeForTenant: (e) =>
|
|
482
|
+
storeForTenant: (e) => O(yt(o, x), {
|
|
478
483
|
subject: ee(t, e),
|
|
479
484
|
schemaRegistry: r,
|
|
480
485
|
rowFilter: C
|
|
@@ -482,9 +487,9 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
482
487
|
outbox: he({
|
|
483
488
|
store: o,
|
|
484
489
|
subject: t,
|
|
485
|
-
traceId:
|
|
490
|
+
traceId: U,
|
|
486
491
|
nudge: () => {
|
|
487
|
-
v.push(
|
|
492
|
+
v.push(U);
|
|
488
493
|
},
|
|
489
494
|
afterCommit: (e) => {
|
|
490
495
|
_.push(e);
|
|
@@ -515,22 +520,22 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
515
520
|
nudges: v
|
|
516
521
|
})
|
|
517
522
|
};
|
|
518
|
-
return
|
|
523
|
+
return K.set(S, _), G.set(S, (e) => m(t, e, o, {
|
|
519
524
|
queued: _,
|
|
520
525
|
nudges: v
|
|
521
|
-
})),
|
|
526
|
+
})), q.set(S, v), J.set(S, e.plugins ?? []), ot.set(S, e.layers ?? []), W.set(S, (e) => o.transactional((r) => e(m(t, n, r, {
|
|
522
527
|
queued: _,
|
|
523
528
|
nudges: v
|
|
524
529
|
})))), S;
|
|
525
530
|
};
|
|
526
531
|
return m(e.subject ?? _(null), e.connection);
|
|
527
|
-
},
|
|
528
|
-
let n =
|
|
529
|
-
return (n === void 0 ? e : u.provide(e, n)).pipe(u.provide(
|
|
530
|
-
},
|
|
532
|
+
}, xt = (e, t) => {
|
|
533
|
+
let n = ct(t);
|
|
534
|
+
return (n === void 0 ? e : u.provide(e, n)).pipe(u.provide(T(t.store)), u.provideService(g, t.request.subject));
|
|
535
|
+
}, St = async (e, t, n, r) => {
|
|
531
536
|
let i = e.input, a = await m.decodeUnknownPromise(i)(n), o = e.kind, s = async (e) => {
|
|
532
537
|
let n = t(a, e);
|
|
533
|
-
return u.isEffect(n) ?
|
|
538
|
+
return u.isEffect(n) ? E(xt(n, e)) : n;
|
|
534
539
|
}, c = async () => {
|
|
535
540
|
let t = e.guards;
|
|
536
541
|
if (t !== void 0 && t.length > 0) {
|
|
@@ -538,14 +543,14 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
538
543
|
if (e !== null) throw e;
|
|
539
544
|
}
|
|
540
545
|
if (o !== "mutation") return s(r);
|
|
541
|
-
let n = await Ce(async () =>
|
|
542
|
-
return await
|
|
543
|
-
}, d = o === "mutation" || o === "query" || o === "action" ? o : void 0, p = d === void 0 ? void 0 :
|
|
546
|
+
let n = await Ce(async () => dt(r, async (e) => (lt(r), s(e))), { delay: () => Promise.resolve() });
|
|
547
|
+
return await Q(r), n;
|
|
548
|
+
}, d = o === "mutation" || o === "query" || o === "action" ? o : void 0, p = d === void 0 ? void 0 : st(r, d);
|
|
544
549
|
if (p === void 0 || d === void 0) return await c();
|
|
545
550
|
let h = u.tryPromise({
|
|
546
551
|
try: () => c(),
|
|
547
552
|
catch: (e) => e
|
|
548
|
-
}), g =
|
|
553
|
+
}), g = at(r), _ = p(h, {
|
|
549
554
|
tag: e.name ?? "",
|
|
550
555
|
kind: d,
|
|
551
556
|
input: a,
|
|
@@ -560,12 +565,12 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
560
565
|
}), y = await u.runPromiseExit(_);
|
|
561
566
|
if (f.isSuccess(y)) return y.value;
|
|
562
567
|
throw l.squash(y.cause);
|
|
563
|
-
},
|
|
564
|
-
let n = new
|
|
568
|
+
}, Ct = (e) => new Promise((t) => {
|
|
569
|
+
let n = new k.Socket(), r = (e) => {
|
|
565
570
|
clearTimeout(i), n.destroy(), t(e);
|
|
566
571
|
}, i = setTimeout(() => r(!1), e.timeoutMs ?? 750);
|
|
567
572
|
n.once("connect", () => r(!0)), n.once("error", () => r(!1)), n.connect(e.port, e.host);
|
|
568
|
-
}),
|
|
573
|
+
}), wt = async (e, t, n, r) => {
|
|
569
574
|
if (typeof t != "string" || typeof n != "function" || typeof r != "function") throw TypeError(`describeIfAvailable('${e}', ...): expected (label, dependency, probe, suite) — got dependency: ${typeof t}, probe: ${typeof n}, suite: ${typeof r}. Three arguments means the suite body is being used as the probe: it would run at file scope, unconditionally, and the skip would silently do nothing.`);
|
|
570
575
|
let i = !1;
|
|
571
576
|
try {
|
|
@@ -574,20 +579,20 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
574
579
|
i = !1;
|
|
575
580
|
}
|
|
576
581
|
De.skipIf(!i)(i ? e : `${e} [SKIPPED: needs ${t}]`, r);
|
|
577
|
-
},
|
|
578
|
-
await
|
|
579
|
-
},
|
|
582
|
+
}, Tt = async (e, t, n) => {
|
|
583
|
+
await wt(e, `${t.name} at ${t.host}:${t.port}`, () => Ct(t), n);
|
|
584
|
+
}, Et = async (e, t) => {
|
|
580
585
|
try {
|
|
581
586
|
let n = await t();
|
|
582
587
|
n !== void 0 && n !== "" && console.log(`[engine] ${e}: ${n}`);
|
|
583
588
|
} catch {}
|
|
584
|
-
},
|
|
589
|
+
}, Dt = "test-tenant", $ = (e, t, n) => ({
|
|
585
590
|
type: e,
|
|
586
591
|
id: t,
|
|
587
592
|
tenantId: n.tenantId ?? "test-tenant",
|
|
588
593
|
scopes: n.scopes ?? [],
|
|
589
594
|
...n.metadata === void 0 ? {} : { metadata: n.metadata }
|
|
590
|
-
}),
|
|
595
|
+
}), Ot = (e, t = {}) => $("user", e, t), kt = (e, t = {}) => $("apiKey", e, t), At = (e, t = {}) => $("serviceAccount", e, t), jt = (e = null) => _(e), Mt = (e = "job:test", t) => t === void 0 ? S(e) : S(e, t), Nt = "127.0.0.1", Pt = (e) => {
|
|
591
596
|
let t = e.indexOf("?");
|
|
592
597
|
return t === -1 ? {
|
|
593
598
|
path: e,
|
|
@@ -596,22 +601,22 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
596
601
|
path: e.slice(0, t),
|
|
597
602
|
query: e.slice(t + 1)
|
|
598
603
|
};
|
|
599
|
-
},
|
|
604
|
+
}, Ft = (e, t) => {
|
|
600
605
|
let n = e.split("/").filter((e) => e.length > 0), r = t.split("/").filter((e) => e.length > 0);
|
|
601
606
|
return n.length === r.length && n.every((e, t) => e.startsWith(":") || e === r[t]);
|
|
602
|
-
},
|
|
607
|
+
}, It = (e) => {
|
|
603
608
|
let t = {};
|
|
604
609
|
for (let [n, r] of Object.entries(e)) t[n.toLowerCase()] = r;
|
|
605
610
|
return t;
|
|
606
|
-
},
|
|
611
|
+
}, Lt = (e) => e === void 0 ? /* @__PURE__ */ new Uint8Array() : new TextEncoder().encode(JSON.stringify(e)), Rt = (e) => e === void 0 ? "" : typeof e == "string" ? e : new TextDecoder().decode(e), zt = (e) => {
|
|
607
612
|
let t = Se(e.security?.trustedProxies, process.env, e.security?.clientAddressHeader), { ctx: n } = e, r = Oe((e.publicApi ?? []).map((e) => ({
|
|
608
613
|
descriptor: e.descriptor,
|
|
609
|
-
invoke: (t, r) => n.withSubject(r.subject, (n) => (e.descriptor.publicApi !== void 0 &&
|
|
614
|
+
invoke: (t, r) => n.withSubject(r.subject, (n) => (e.descriptor.publicApi !== void 0 && Z(n, e.descriptor.publicApi, r.remoteAddr), St(e.descriptor, e.handler, t, n)))
|
|
610
615
|
})), {
|
|
611
|
-
pluginErrors:
|
|
616
|
+
pluginErrors: Y(n).flatMap((e) => e.errorSchemas ?? []),
|
|
612
617
|
...e.publicApiProfile === void 0 ? {} : { profile: e.publicApiProfile }
|
|
613
618
|
}), i = [...e.restRoutes ?? [], ...r], a = y(e.strategies ?? [], {
|
|
614
|
-
|
|
619
|
+
anonymous: e.anonymous ?? { headerOrTenant: "acme" },
|
|
615
620
|
getStore: () => n.store
|
|
616
621
|
}), o = (r, s) => {
|
|
617
622
|
let c = {
|
|
@@ -626,7 +631,7 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
626
631
|
pattern: i[t].path,
|
|
627
632
|
route: e
|
|
628
633
|
})), u = async (e, r, a = {}) => {
|
|
629
|
-
let { path: o, query: c } =
|
|
634
|
+
let { path: o, query: c } = Pt(r), u = l.filter((e) => Ft(e.pattern, o)).map((e) => e.route);
|
|
630
635
|
if (u.length === 0) return {
|
|
631
636
|
status: 404,
|
|
632
637
|
headers: {},
|
|
@@ -638,10 +643,10 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
638
643
|
stream: !1
|
|
639
644
|
};
|
|
640
645
|
let d = {
|
|
641
|
-
...
|
|
642
|
-
...
|
|
646
|
+
...It(s),
|
|
647
|
+
...It(a.headers ?? {})
|
|
643
648
|
}, f = ye({
|
|
644
|
-
socketAddress: a.remoteAddr ??
|
|
649
|
+
socketAddress: a.remoteAddr ?? Nt,
|
|
645
650
|
headers: d,
|
|
646
651
|
config: t
|
|
647
652
|
}), p = {
|
|
@@ -649,13 +654,13 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
649
654
|
path: o,
|
|
650
655
|
query: c,
|
|
651
656
|
headers: d,
|
|
652
|
-
rawBody:
|
|
657
|
+
rawBody: Lt(a.body),
|
|
653
658
|
store: n.store,
|
|
654
659
|
...f === void 0 ? {} : { remoteAddr: f }
|
|
655
660
|
}, m = await ke(u, p), h = {};
|
|
656
661
|
for (let [e, t] of Object.entries(m.headers ?? {})) h[e.toLowerCase()] = t;
|
|
657
662
|
m.contentType !== void 0 && (h["content-type"] = m.contentType);
|
|
658
|
-
let g =
|
|
663
|
+
let g = Rt(m.body), _ = (m.contentType ?? "").includes("json");
|
|
659
664
|
return {
|
|
660
665
|
status: m.status,
|
|
661
666
|
headers: h,
|
|
@@ -689,7 +694,7 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
689
694
|
};
|
|
690
695
|
};
|
|
691
696
|
return o(void 0, {});
|
|
692
|
-
},
|
|
697
|
+
}, Bt = (e = {}) => {
|
|
693
698
|
let t = e.id ?? "test", n = e.store ?? new Proxy({}, { get: (e, t) => {
|
|
694
699
|
throw Error(`makeSubscribeContext: this subscriber reached ctx.store.${String(t)} and the test passed no store. Pass \`{ store: makeTestContext().store }\` so the subscriber and the code under test share one — an empty stand-in would let a read of the wrong table pass.`);
|
|
695
700
|
} });
|
|
@@ -699,7 +704,7 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
699
704
|
store: n,
|
|
700
705
|
...e.publish === void 0 ? {} : { publish: e.publish }
|
|
701
706
|
};
|
|
702
|
-
},
|
|
707
|
+
}, Vt = (e) => {
|
|
703
708
|
let t = /* @__PURE__ */ new Map();
|
|
704
709
|
for (let n of e) {
|
|
705
710
|
let e = t.get(n.stepName);
|
|
@@ -725,13 +730,18 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
725
730
|
});
|
|
726
731
|
}
|
|
727
732
|
return n.sort((e, t) => e._startedAt - t._startedAt), n.map(({ _startedAt: e, ...t }) => t);
|
|
728
|
-
},
|
|
733
|
+
}, Ht = () => {
|
|
734
|
+
if (Pe() !== void 0) return;
|
|
735
|
+
let e = me(Me(32).toString("hex"));
|
|
736
|
+
Le(() => ce() ?? e);
|
|
737
|
+
}, Ut = (e) => {
|
|
738
|
+
Ht();
|
|
729
739
|
let t = e.workflows ?? [], n = /* @__PURE__ */ new Map(), r = 0;
|
|
730
740
|
return {
|
|
731
741
|
start: async (i, a) => {
|
|
732
742
|
let o = t.find((e) => e.workflow.name === i);
|
|
733
743
|
if (o === void 0) throw Error(`makeWorkflowRunner: no workflow named '${i}' — pass it in makeWorkflowRunner({ ctx, workflows: [{ workflow, execute }] }).`);
|
|
734
|
-
let s = `wfrun_test_${++r}`, c =
|
|
744
|
+
let s = `wfrun_test_${++r}`, c = Ie(), l = o.workflow.toLayer(o.execute).pipe(p.provideMerge(Fe)), d = /* @__PURE__ */ new Date(), f = o.workflow.execute(a).pipe(u.locally(Ne, s), u.provide(c.layer), u.provide(l)), m = (e.ctx.store === void 0 ? f : u.provide(f, T(e.ctx.store))).pipe(u.either), h = await u.runPromise(m), g = Vt(c.readSteps()), _ = /* @__PURE__ */ new Date(), v;
|
|
735
745
|
if (h._tag === "Right") v = {
|
|
736
746
|
status: "succeeded",
|
|
737
747
|
output: h.right,
|
|
@@ -771,7 +781,7 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
771
781
|
},
|
|
772
782
|
inspect: async (e) => n.get(e) ?? null
|
|
773
783
|
};
|
|
774
|
-
},
|
|
784
|
+
}, Wt = (e, t, n = {}) => {
|
|
775
785
|
let r = n.name ?? "mock", i = [], a = /* @__PURE__ */ new Map(), o = (e, t) => `${e}\u0000${JSON.stringify(t)}`, s = async (n, a, o) => {
|
|
776
786
|
let s = e[n];
|
|
777
787
|
if (s === void 0) throw Error(`makeServiceApiMock: '${n}' is not a service procedure of this api`);
|
|
@@ -818,31 +828,31 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
818
828
|
for (let e of a.get(o(t, n)) ?? []) e(s);
|
|
819
829
|
}
|
|
820
830
|
};
|
|
821
|
-
},
|
|
822
|
-
let n =
|
|
831
|
+
}, Gt = () => new Promise((e, t) => {
|
|
832
|
+
let n = k.createServer();
|
|
823
833
|
n.once("error", t), n.listen(0, "127.0.0.1", () => {
|
|
824
834
|
let t = n.address(), r = typeof t == "object" && t ? t.port : 0;
|
|
825
835
|
n.close(() => e(r));
|
|
826
836
|
});
|
|
827
|
-
}),
|
|
837
|
+
}), Kt = async (e) => {
|
|
828
838
|
try {
|
|
829
839
|
return (await fetch(`http://127.0.0.1:${e}/internal/readiness`)).status === 200;
|
|
830
840
|
} catch {
|
|
831
841
|
return !1;
|
|
832
842
|
}
|
|
833
|
-
},
|
|
843
|
+
}, qt = (e) => A(Be(ze(A(e, "package.json")).resolve("@voltro/cli/package.json")), "bin", "voltro.mjs"), Jt = 1e4, Yt = (e) => new Promise((t) => {
|
|
834
844
|
if (e.exitCode !== null || e.signalCode !== null) return t();
|
|
835
845
|
let n = setTimeout(() => {
|
|
836
846
|
e.kill("SIGKILL");
|
|
837
|
-
},
|
|
847
|
+
}, Jt);
|
|
838
848
|
e.once("exit", () => {
|
|
839
849
|
clearTimeout(n), t();
|
|
840
850
|
}), e.kill("SIGTERM");
|
|
841
|
-
}),
|
|
851
|
+
}), Xt = async (e) => {
|
|
842
852
|
let t = Object.keys(e.apps);
|
|
843
853
|
if (t.length === 0) throw Error("startTestApps: no apps given");
|
|
844
|
-
let n = e.mode ?? "dev", r = e.bootTimeoutMs ?? 3e5, i = e.cli ??
|
|
845
|
-
for (let e of t) a.set(e, await
|
|
854
|
+
let n = e.mode ?? "dev", r = e.bootTimeoutMs ?? 3e5, i = e.cli ?? qt(e.apps[t[0]].root), a = /* @__PURE__ */ new Map();
|
|
855
|
+
for (let e of t) a.set(e, await Gt());
|
|
846
856
|
let o = /* @__PURE__ */ new Map(), s = new Map(t.map((e) => [e, {}]));
|
|
847
857
|
for (let n of e.edges ?? []) {
|
|
848
858
|
for (let e of [n.caller, n.callee]) if (!t.includes(e)) throw Error(`startTestApps: edge names '${e}', which is not among the apps (${t.join(", ")})`);
|
|
@@ -862,10 +872,10 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
862
872
|
};
|
|
863
873
|
for (let e of t) u(e);
|
|
864
874
|
let d = [], f = /* @__PURE__ */ new Map(), p = async () => {
|
|
865
|
-
await Promise.all(d.map(
|
|
875
|
+
await Promise.all(d.map(Yt));
|
|
866
876
|
};
|
|
867
877
|
for (let t of c) {
|
|
868
|
-
let o = e.apps[t], c = a.get(t), l = "", u =
|
|
878
|
+
let o = e.apps[t], c = a.get(t), l = "", u = Re(process.execPath, [
|
|
869
879
|
i,
|
|
870
880
|
n,
|
|
871
881
|
...n === "serve" ? ["."] : []
|
|
@@ -873,7 +883,7 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
873
883
|
cwd: o.root,
|
|
874
884
|
env: {
|
|
875
885
|
...process.env,
|
|
876
|
-
...n === "serve" ? { VOLTRO_SESSION_SECRET:
|
|
886
|
+
...n === "serve" ? { VOLTRO_SESSION_SECRET: Me(32).toString("base64url") } : {},
|
|
877
887
|
...o.env,
|
|
878
888
|
...s.get(t),
|
|
879
889
|
PORT: String(c)
|
|
@@ -897,11 +907,11 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
897
907
|
url: `http://127.0.0.1:${c}`,
|
|
898
908
|
wsUrl: `ws://127.0.0.1:${c}/ws`,
|
|
899
909
|
log: () => l,
|
|
900
|
-
stop: () =>
|
|
910
|
+
stop: () => Yt(u)
|
|
901
911
|
};
|
|
902
912
|
f.set(t, m);
|
|
903
913
|
let h = Date.now() + r;
|
|
904
|
-
for (; !await
|
|
914
|
+
for (; !await Kt(c);) {
|
|
905
915
|
if (u.exitCode !== null || u.signalCode !== null || Date.now() > h) {
|
|
906
916
|
await p();
|
|
907
917
|
let e = u.exitCode !== null || u.signalCode !== null ? "exited before it was ready" : `was not ready within ${r} ms`;
|
|
@@ -919,6 +929,6 @@ var Be = new Set(e), k = 0, Ve = () => ++k, He = (e, t) => {
|
|
|
919
929
|
},
|
|
920
930
|
stop: p
|
|
921
931
|
};
|
|
922
|
-
},
|
|
932
|
+
}, Zt = 1;
|
|
923
933
|
//#endregion
|
|
924
|
-
export {
|
|
934
|
+
export { z as MockClock, H as MockLLM, B as MockWebhooks, Zt as TESTING_PRESET_VERSION, Dt as TEST_TENANT_ID, jt as anonymous, kt as apiKey, n as changeDelete, r as changeInsert, i as changeSoftDelete, a as changeUpdate, Ze as defineFactory, wt as describeIfAvailable, Tt as describeIfReachable, N as fixtureRow, tt as frozenTime, Ke as hydrateFixtureRows, St as invoke, Ct as isTcpReachable, Wt as makeServiceApiMock, Bt as makeSubscribeContext, zt as makeTestApp, bt as makeTestContext, Ut as makeWorkflowRunner, Z as markRestInvocation, rt as mockStore, M as nextSequence, ut as outboxNudgesOf, Y as pluginsOf, Et as reportEngineVersion, lt as resetAfterCommit, at as restInvocationOf, st as rpcInterceptorFor, Q as runAfterCommit, dt as runInStoreTransaction, At as serviceAccount, ct as serviceLayerFor, Xt as startTestApps, Mt as system, V as testEventBus, Ot as user, et as withFrozenTime, it as withRpcConnection };
|