@voltro/testing 0.87.0 → 0.88.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 +169 -6
- package/THIRD-PARTY-NOTICES.md +644 -48
- package/dist/client.js +1 -2
- package/dist/crdt.js +1 -2
- package/dist/dialect.js +1 -2
- package/dist/factory.js +1 -2
- package/dist/fieldKeys.js +1 -2
- package/dist/fieldKeysSql.js +1 -2
- package/dist/fixtureRow.js +1 -2
- package/dist/formBindingHarness.js +1 -2
- package/dist/hotStoreSqlParity.js +5 -2
- package/dist/hydrateFixtureRows.js +1 -2
- package/dist/index.js +1 -2
- package/dist/invoke.js +1 -2
- package/dist/mockClock.js +1 -2
- package/dist/mockLLM.js +1 -2
- package/dist/mockWebhooks.js +1 -2
- package/dist/platform.js +1 -2
- package/dist/reachable.js +1 -2
- package/dist/serviceApiMock.js +1 -2
- package/dist/subject.js +1 -2
- package/dist/subscribeContext.js +1 -2
- package/dist/system.js +1 -2
- package/dist/testApps.js +1 -2
- package/dist/testContext.js +1 -2
- package/dist/testEventBus.js +1 -2
- package/dist/testRequest.js +1 -2
- package/dist/withConnections.js +1 -2
- package/dist/workflowRunner.js +1 -2
- package/package.json +12 -12
package/dist/client.js
CHANGED
|
@@ -2,7 +2,7 @@ import { renderFormBinding as e } from "./formBindingHarness.js";
|
|
|
2
2
|
import { Effect as t } from "effect";
|
|
3
3
|
import { createElement as n } from "react";
|
|
4
4
|
import { FrameworkRuntimesContext as r, INITIAL_RECOVERY_SNAPSHOT as i, RpcErrorBus as a, resolveRecoveryOptions as o } from "@voltro/client";
|
|
5
|
-
|
|
5
|
+
// src/client.tsx
|
|
6
6
|
var s = {
|
|
7
7
|
runPromise: t.runPromise,
|
|
8
8
|
runPromiseExit: t.runPromiseExit,
|
|
@@ -168,5 +168,4 @@ var s = {
|
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
|
-
//#endregion
|
|
172
171
|
export { s as FAKE_RUNTIME, c as makeVoltroTestClient, e as renderFormBinding };
|
package/dist/crdt.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe as e, expect as t, it as n } from "vitest";
|
|
2
|
-
|
|
2
|
+
// src/crdtBackendConformance.ts
|
|
3
3
|
var r = (r, i) => {
|
|
4
4
|
let a = i.backend, o = (e) => a.createText(e).encodeState(), s = (e, t, n) => {
|
|
5
5
|
let r = a.createText();
|
|
@@ -73,5 +73,4 @@ var r = (r, i) => {
|
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
|
-
//#endregion
|
|
77
76
|
export { r as crdtBackendConformance };
|
package/dist/dialect.js
CHANGED
|
@@ -6,7 +6,7 @@ import { afterEach as ue, beforeEach as de, describe as V, expect as H, it as U
|
|
|
6
6
|
import { randomUUID as W } from "node:crypto";
|
|
7
7
|
import { SqlClient as G } from "effect/sql";
|
|
8
8
|
import { applyPlan as K, applySchema as q, declaredSnapshot as fe, fingerprintSchema as pe, introspectSchema as J, planMigrations as Y } from "@voltro/database/sql";
|
|
9
|
-
|
|
9
|
+
// src/dialectParity.ts
|
|
10
10
|
var X = (e) => ({
|
|
11
11
|
table: e,
|
|
12
12
|
predicate: void 0,
|
|
@@ -2229,5 +2229,4 @@ var ye = C("voltro_parity_composite", {
|
|
|
2229
2229
|
});
|
|
2230
2230
|
});
|
|
2231
2231
|
};
|
|
2232
|
-
//#endregion
|
|
2233
2232
|
export { q as applySchema, $ as runDialectParity, e as runHotStoreSqlParity };
|
package/dist/factory.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fixtureRow as e, nextSequence as t } from "./fixtureRow.js";
|
|
2
2
|
import { missingRequiredColumns as n } from "@voltro/database";
|
|
3
|
-
|
|
3
|
+
// src/factory.ts
|
|
4
4
|
var r = (e) => {
|
|
5
5
|
let n = {};
|
|
6
6
|
for (let [r, i] of Object.entries(e)) n[r] = typeof i == "function" ? i(t()) : i;
|
|
@@ -61,5 +61,4 @@ var r = (e) => {
|
|
|
61
61
|
};
|
|
62
62
|
return c(n.defaults ?? {});
|
|
63
63
|
};
|
|
64
|
-
//#endregion
|
|
65
64
|
export { c as defineFactory };
|
package/dist/fieldKeys.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { declaredEncryptedColumns as e, declaredRenames as t, getFieldCipher as n, isFieldKeyring as r, makeFieldKeyring as i, openCell as a, setFieldCipher as o } from "@voltro/runtime";
|
|
2
|
-
|
|
2
|
+
// src/fieldKeys.ts
|
|
3
3
|
var s = /* @__PURE__ */ new WeakMap(), c = (e) => {
|
|
4
4
|
let t = i(e);
|
|
5
5
|
return s.set(t, e), o(t), t;
|
|
@@ -69,5 +69,4 @@ var s = /* @__PURE__ */ new WeakMap(), c = (e) => {
|
|
|
69
69
|
if (n.unopened.length > 0) throw Error(h(n));
|
|
70
70
|
return n;
|
|
71
71
|
};
|
|
72
|
-
//#endregion
|
|
73
72
|
export { u as activeKeyAlone, h as describeActiveKeyAloneFailures, g as expectSealedWithActiveKeyAlone, f as recordTestRawStore, c as registerTestFieldKeys, m as sealedValuesWithActiveKeyAlone };
|
package/dist/fieldKeysSql.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { activeKeyAlone as e } from "./fieldKeys.js";
|
|
2
2
|
import { Effect as t } from "effect";
|
|
3
3
|
import { verifySealedValues as n } from "@voltro/runtime";
|
|
4
|
-
|
|
4
|
+
// src/fieldKeysSql.ts
|
|
5
5
|
var r = async (r) => {
|
|
6
6
|
let i = e(r.keyring, r.fieldKeys), a = await t.runPromise(t.scoped(n(r.dialect, i, r.tables ?? [])).pipe(t.provide(r.layer))), o = {
|
|
7
7
|
activeKeyId: i.activeKeyId,
|
|
@@ -10,5 +10,4 @@ var r = async (r) => {
|
|
|
10
10
|
if (o.unopened.length > 0 || o.unreadable.length > 0) throw Error(`${o.unopened.reduce((e, t) => e + t.count, 0)} sealed value(s) do not open with the active key ${o.activeKeyId} alone` + (o.unopened.length === 0 ? "" : `:\n${o.unopened.map((e) => ` ${e.table}.${e.column}: ${e.count}`).join("\n")}`) + (o.unreadable.length === 0 ? "" : `\n${o.unreadable.length} column(s) could not be read:\n${o.unreadable.map((e) => ` ${e.table}.${e.column}: ${e.reason}`).join("\n")}`));
|
|
11
11
|
return o;
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
13
|
export { r as expectSealedWithActiveKeyAloneInSql };
|
package/dist/fixtureRow.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AUTO_FILLED_COLUMNS as e, missingRequiredColumns as t } from "@voltro/database";
|
|
2
|
-
|
|
2
|
+
// src/fixtureRow.ts
|
|
3
3
|
var n = new Set(e), r = 0, i = () => ++r, a = (e, t) => {
|
|
4
4
|
if (t.oneOf && t.oneOf.length > 0) return t.oneOf[0];
|
|
5
5
|
if (t.enumValues && t.enumValues.length > 0) return t.enumValues[0];
|
|
@@ -26,5 +26,4 @@ var n = new Set(e), r = 0, i = () => ++r, a = (e, t) => {
|
|
|
26
26
|
...r
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
//#endregion
|
|
30
29
|
export { o as fixtureRow, i as nextSequence };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { makeVoltroTestClient as e } from "./client.js";
|
|
2
2
|
import { act as t, createElement as n } from "react";
|
|
3
3
|
import { useFormBinding as r } from "@voltro/client";
|
|
4
|
-
|
|
4
|
+
// src/formBindingHarness.tsx
|
|
5
5
|
var i = async (i, a = {}) => {
|
|
6
6
|
if (globalThis.document === void 0) throw Error("renderFormBinding needs a DOM to render hooks — add `// @vitest-environment jsdom` to the spec.");
|
|
7
7
|
let { createRoot: o } = await import("react-dom/client"), s = a.apiName ?? "app", c = e({
|
|
@@ -42,5 +42,4 @@ var i = async (i, a = {}) => {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
//#endregion
|
|
46
45
|
export { i as renderFormBinding };
|
|
@@ -5,7 +5,7 @@ import { randomUUID as d } from "node:crypto";
|
|
|
5
5
|
import { HotStore as f } from "@voltro/kv/hot/contract";
|
|
6
6
|
import { hotStoreConformance as p } from "@voltro/kv/hot/testing";
|
|
7
7
|
import { dataStoreHotStore as m, hotDataStoreTables as h, hotKvTable as g, hotZTable as _ } from "@voltro/runtime/hot";
|
|
8
|
-
|
|
8
|
+
// src/hotStoreSqlParity.ts
|
|
9
9
|
var v = (v) => {
|
|
10
10
|
h.forEach(n), p(v.name, () => {
|
|
11
11
|
let e = 0;
|
|
@@ -24,6 +24,10 @@ var v = (v) => {
|
|
|
24
24
|
persistent: !0
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
+
}, {
|
|
28
|
+
describe: c,
|
|
29
|
+
it: u,
|
|
30
|
+
expect: l
|
|
27
31
|
});
|
|
28
32
|
let y = (e, t) => u(e, async () => {
|
|
29
33
|
let e = await v.make();
|
|
@@ -128,5 +132,4 @@ var v = (v) => {
|
|
|
128
132
|
});
|
|
129
133
|
});
|
|
130
134
|
};
|
|
131
|
-
//#endregion
|
|
132
135
|
export { v as runHotStoreSqlParity };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Result as e, Schema as t } from "effect";
|
|
2
|
-
|
|
2
|
+
// src/hydrateFixtureRows.ts
|
|
3
3
|
var n = t.decodeUnknownResult(t.DateFromString), r = /^\d{4}-\d{2}-\d{2}$/, i = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/, a = (t, a) => {
|
|
4
4
|
if (typeof t != "string" || !i.test(t) && !(a === "date" && r.test(t))) return !1;
|
|
5
5
|
let o = t.slice(0, 10), s = n(o);
|
|
@@ -18,5 +18,4 @@ var n = t.decodeUnknownResult(t.DateFromString), r = /^\d{4}-\d{2}-\d{2}$/, i =
|
|
|
18
18
|
return s;
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
export { o as hydrateFixtureRows };
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,6 @@ import { makeWorkflowRunner as G } from "./workflowRunner.js";
|
|
|
17
17
|
import { makeServiceApiMock as K } from "./serviceApiMock.js";
|
|
18
18
|
import { startTestApps as q } from "./testApps.js";
|
|
19
19
|
import { withConnections as J } from "./withConnections.js";
|
|
20
|
-
|
|
20
|
+
// src/index.ts
|
|
21
21
|
var Y = 1;
|
|
22
|
-
//#endregion
|
|
23
22
|
export { i as MockClock, p as MockLLM, d as MockWebhooks, Y as TESTING_PRESET_VERSION, M as TEST_TENANT_ID, s as activeKeyAlone, N as anonymous, P as apiKey, B as changeDelete, V as changeInsert, H as changeSoftDelete, U as changeUpdate, r as defineFactory, O as describeIfAvailable, k as describeIfReachable, c as expectSealedWithActiveKeyAlone, z as expectSealedWithActiveKeyAloneInSql, e as fixtureRow, a as frozenTime, n as hydrateFixtureRows, D as invoke, A as isTcpReachable, K as makeServiceApiMock, W as makeSubscribeContext, R as makeTestApp, m as makeTestContext, G as makeWorkflowRunner, h as markRestInvocation, g as mockStore, t as nextSequence, _ as outboxNudgesOf, v as pluginsOf, y as queryCacheOf, l as registerTestFieldKeys, j as reportEngineVersion, b as resetAfterCommit, x as restInvocationOf, S as rpcInterceptorFor, C as runAfterCommit, w as runInStoreTransaction, u as sealedValuesWithActiveKeyAlone, F as serviceAccount, T as serviceLayerFor, q as startTestApps, I as system, f as testEventBus, L as user, J as withConnections, o as withFrozenTime, E as withRpcConnection };
|
package/dist/invoke.js
CHANGED
|
@@ -2,7 +2,7 @@ import { queryCacheOf as e, resetAfterCommit as t, restInvocationOf as n, rpcInt
|
|
|
2
2
|
import { Cause as s, Effect as c, Exit as l, Schema as u } from "effect";
|
|
3
3
|
import { SubjectService as d, checkGuardsEffect as f } from "@voltro/protocol";
|
|
4
4
|
import { cachedComputedCall as p, computedCacheKey as m, makeEffectStoreLayer as h, runProvidedEffect as g, runWithDeadlockRetry as _ } from "@voltro/runtime";
|
|
5
|
-
|
|
5
|
+
// src/invoke.ts
|
|
6
6
|
var v = (e, t) => {
|
|
7
7
|
let n = o(t);
|
|
8
8
|
return (n === void 0 ? e : c.provide(e, n)).pipe(c.provide(h(t.store)), c.provideService(d, t.request.subject));
|
|
@@ -78,5 +78,4 @@ var v = (e, t) => {
|
|
|
78
78
|
if (l.isSuccess(N)) return N.value;
|
|
79
79
|
throw s.squash(N.cause);
|
|
80
80
|
}, b = Symbol("voltro:testing:not-cached");
|
|
81
|
-
//#endregion
|
|
82
81
|
export { y as invoke };
|
package/dist/mockClock.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect as e } from "effect";
|
|
2
|
-
|
|
2
|
+
// src/mockClock.ts
|
|
3
3
|
var t = Symbol.for("voltro/testing/mockClock.installed"), n = () => globalThis, r = (e, t) => new Proxy(e, {
|
|
4
4
|
construct: (e, n, r) => Reflect.construct(e, n.length === 0 ? [t()] : n, r),
|
|
5
5
|
apply: () => new e(t()).toString(),
|
|
@@ -74,5 +74,4 @@ var t = Symbol.for("voltro/testing/mockClock.installed"), n = () => globalThis,
|
|
|
74
74
|
default: throw Error(`mockClock: unknown unit '${r}'`);
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
//#endregion
|
|
78
77
|
export { a as MockClock, c as frozenTime, s as withFrozenTime };
|
package/dist/mockLLM.js
CHANGED
package/dist/mockWebhooks.js
CHANGED
package/dist/platform.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe as e, expect as t, it as n } from "vitest";
|
|
2
|
-
|
|
2
|
+
// src/platformConformance.ts
|
|
3
3
|
var r = (r, i) => {
|
|
4
4
|
let a = i.scratchKey ?? "voltro:conformance", o = async () => i.adapter();
|
|
5
5
|
e(`platform adapter conformance — ${r}`, () => {
|
|
@@ -38,5 +38,4 @@ var r = (r, i) => {
|
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
-
//#endregion
|
|
42
41
|
export { r as platformAdapterConformance };
|
package/dist/reachable.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "node:net";
|
|
2
2
|
import { describe as t } from "vitest";
|
|
3
|
-
|
|
3
|
+
// src/reachable.ts
|
|
4
4
|
var n = (t) => new Promise((n) => {
|
|
5
5
|
let r = new e.Socket(), i = (e) => {
|
|
6
6
|
clearTimeout(a), r.destroy(), n(e);
|
|
@@ -23,5 +23,4 @@ var n = (t) => new Promise((n) => {
|
|
|
23
23
|
n !== void 0 && n !== "" && console.log(`[engine] ${e}: ${n}`);
|
|
24
24
|
} catch {}
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
export { r as describeIfAvailable, i as describeIfReachable, n as isTcpReachable, a as reportEngineVersion };
|
package/dist/serviceApiMock.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect as e, Schema as t } from "effect";
|
|
2
2
|
import { ApiUnavailable as n } from "@voltro/protocol";
|
|
3
|
-
|
|
3
|
+
// src/serviceApiMock.ts
|
|
4
4
|
var r = (r, i, a = {}) => {
|
|
5
5
|
let o = a.name ?? "mock", s = [], c = /* @__PURE__ */ new Map(), l = (e, t) => `${e}\u0000${JSON.stringify(t)}`, u = async (e, a, c) => {
|
|
6
6
|
let l = r[e];
|
|
@@ -49,5 +49,4 @@ var r = (r, i, a = {}) => {
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
|
-
//#endregion
|
|
53
52
|
export { r as makeServiceApiMock };
|
package/dist/subject.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { anonymousSubject as e, systemSubject as t } from "@voltro/protocol";
|
|
2
|
-
|
|
2
|
+
// src/subject.ts
|
|
3
3
|
var n = "test-tenant", r = (e, t, n) => ({
|
|
4
4
|
type: e,
|
|
5
5
|
id: t,
|
|
@@ -7,5 +7,4 @@ var n = "test-tenant", r = (e, t, n) => ({
|
|
|
7
7
|
scopes: n.scopes ?? [],
|
|
8
8
|
...n.metadata === void 0 ? {} : { metadata: n.metadata }
|
|
9
9
|
}), i = (e, t = {}) => r("user", e, t), a = (e, t = {}) => r("apiKey", e, t), o = (e, t = {}) => r("serviceAccount", e, t), s = (t = null) => e(t), c = (e = "job:test", n) => n === void 0 ? t(e) : t(e, n);
|
|
10
|
-
//#endregion
|
|
11
10
|
export { n as TEST_TENANT_ID, s as anonymous, a as apiKey, o as serviceAccount, c as system, i as user };
|
package/dist/subscribeContext.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { changeDelete as e, changeInsert as t, changeSoftDelete as n, changeUpdate as r } from "@voltro/database";
|
|
2
2
|
import { createLogger as i } from "@voltro/logger";
|
|
3
|
-
|
|
3
|
+
// src/subscribeContext.ts
|
|
4
4
|
var a = (e = {}) => {
|
|
5
5
|
let t = e.id ?? "test", n = e.store ?? new Proxy({}, { get: (e, t) => {
|
|
6
6
|
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.`);
|
|
@@ -12,5 +12,4 @@ var a = (e = {}) => {
|
|
|
12
12
|
...e.publish === void 0 ? {} : { publish: e.publish }
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { e as changeDelete, t as changeInsert, n as changeSoftDelete, r as changeUpdate, a as makeSubscribeContext };
|
package/dist/system.js
CHANGED
|
@@ -2,7 +2,7 @@ import { testEventBus as e } from "./testEventBus.js";
|
|
|
2
2
|
import { Context as t, Effect as n, Layer as r } from "effect";
|
|
3
3
|
import { createPluginPrivacyRegistry as i } from "@voltro/protocol";
|
|
4
4
|
import { describe as a, expect as o, it as s } from "vitest";
|
|
5
|
-
|
|
5
|
+
// src/systemContractConformance.ts
|
|
6
6
|
var c = (e) => ({
|
|
7
7
|
kind: "port",
|
|
8
8
|
tag: e.tag,
|
|
@@ -90,5 +90,4 @@ var c = (e) => ({
|
|
|
90
90
|
});
|
|
91
91
|
});
|
|
92
92
|
};
|
|
93
|
-
//#endregion
|
|
94
93
|
export { g as systemContractConformance, c as systemPortFixture };
|
package/dist/testApps.js
CHANGED
|
@@ -4,7 +4,7 @@ import { randomBytes as a } from "node:crypto";
|
|
|
4
4
|
import { spawn as o } from "node:child_process";
|
|
5
5
|
import { createRequire as s } from "node:module";
|
|
6
6
|
import { dirname as c, join as l } from "node:path";
|
|
7
|
-
|
|
7
|
+
// src/testApps.ts
|
|
8
8
|
var u = () => new Promise((e, t) => {
|
|
9
9
|
let n = i.createServer();
|
|
10
10
|
n.once("error", t), n.listen(0, "127.0.0.1", () => {
|
|
@@ -107,5 +107,4 @@ var u = () => new Promise((e, t) => {
|
|
|
107
107
|
stop: C
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
|
-
//#endregion
|
|
111
110
|
export { h as startTestApps };
|
package/dist/testContext.js
CHANGED
|
@@ -9,7 +9,7 @@ import { anonymousSubject as d, composeRpcInterceptors as f, tenantScopedSubject
|
|
|
9
9
|
import { InMemoryDataStore as m, NO_ROW_FILTER as h, appValidation as g, applyRowFilterToDescriptor as _, clearSystemStoreHandle as v, getRowFilter as y, getSystemStoreHandle as b, installComputedQueryCacheCapture as x, makeAppAccess as S, makeConnectionState as ee, makeDataLoader as te, makeEventPublisher as ne, makeFieldCipher as C, makeOutboxFacade as w, makeSchemaRegistry as T, queryCachePolicy as E, recordingStore as D, resolveRowFilterScopeFor as O, resolveTransactionSubject as k, runProvidedEffect as A, setFieldCipher as j, setSystemStoreHandle as M, wrapStoreWithMixinBehaviour as N } from "@voltro/runtime";
|
|
10
10
|
import { installEnvSnapshot as re } from "@voltro/env";
|
|
11
11
|
import { Cache as ie, layerMemory as ae } from "@voltro/cache";
|
|
12
|
-
|
|
12
|
+
// src/testContext.ts
|
|
13
13
|
var P = (e) => e, F = "00000000000000000000000000000000", I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), R = (e, t) => {
|
|
14
14
|
let n = L.get(e);
|
|
15
15
|
if (n === void 0) throw Error("withRpcConnection requires a context created by makeTestContext");
|
|
@@ -265,5 +265,4 @@ var P = (e) => e, F = "00000000000000000000000000000000", I = /* @__PURE__ */ ne
|
|
|
265
265
|
};
|
|
266
266
|
return q(u.subject ?? d(null), u.connection);
|
|
267
267
|
};
|
|
268
|
-
//#endregion
|
|
269
268
|
export { he as makeTestContext, K as markRestInvocation, P as mockStore, X as outboxNudgesOf, H as pluginsOf, G as queryCacheOf, ce as resetAfterCommit, q as restInvocationOf, oe as rpcInterceptorFor, Y as runAfterCommit, Z as runInStoreTransaction, se as serviceLayerFor, R as withRpcConnection };
|
package/dist/testEventBus.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Effect as e, Result as t } from "effect";
|
|
2
2
|
import { eventRoute as n } from "@voltro/protocol";
|
|
3
3
|
import { EventBus as r, publishEvent as i } from "@voltro/runtime";
|
|
4
|
-
|
|
4
|
+
// src/testEventBus.ts
|
|
5
5
|
var a = (a = {}) => {
|
|
6
6
|
let o = a.tenantId ?? null, s = new r({
|
|
7
7
|
origin: a.origin ?? "test",
|
|
@@ -69,5 +69,4 @@ var a = (a = {}) => {
|
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
|
-
//#endregion
|
|
73
72
|
export { a as testEventBus };
|
package/dist/testRequest.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Effect as r } from "effect";
|
|
|
4
4
|
import { composeAuthStrategies as i, composeReplayAuthorityBindings as a } from "@voltro/protocol";
|
|
5
5
|
import { resolveRequestClientAddress as o, resolveTrustedProxies as s } from "@voltro/runtime";
|
|
6
6
|
import { collectPublicApiRoutes as c, dispatchSharedPath as l, restRoutesToHttpRoutes as u } from "@voltro/protocol/rest";
|
|
7
|
-
|
|
7
|
+
// src/testRequest.ts
|
|
8
8
|
var d = "127.0.0.1", f = (e) => {
|
|
9
9
|
let t = e.indexOf("?");
|
|
10
10
|
return t === -1 ? {
|
|
@@ -117,5 +117,4 @@ var d = "127.0.0.1", f = (e) => {
|
|
|
117
117
|
};
|
|
118
118
|
return C(void 0, {});
|
|
119
119
|
};
|
|
120
|
-
//#endregion
|
|
121
120
|
export { _ as makeTestApp };
|
package/dist/withConnections.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Layer as e } from "effect";
|
|
2
2
|
import { layerConfiguredConnections as t } from "@voltro/kv/connection";
|
|
3
|
-
|
|
3
|
+
// src/withConnections.ts
|
|
4
4
|
var n = (n, r = {}) => {
|
|
5
5
|
let i = r.connections ?? {}, a = { ...i.redis };
|
|
6
6
|
for (let [e, t] of Object.entries(n)) {
|
|
@@ -22,5 +22,4 @@ var n = (n, r = {}) => {
|
|
|
22
22
|
...r.connectAnalytics === void 0 ? {} : { connectAnalytics: r.connectAnalytics }
|
|
23
23
|
}).pipe(e.orDie);
|
|
24
24
|
};
|
|
25
|
-
//#endregion
|
|
26
25
|
export { n as withConnections };
|
package/dist/workflowRunner.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Effect as e, Layer as t, Result as n } from "effect";
|
|
|
2
2
|
import { getFieldCipher as r, makeEffectStoreLayer as i, makeFieldCipher as a } from "@voltro/runtime";
|
|
3
3
|
import { randomBytes as o } from "node:crypto";
|
|
4
4
|
import { CurrentWorkflowRunId as s, failureMessage as c, getWorkflowJournalCipher as l, inMemoryWorkflowEngineLayer as u, makeInMemoryRecorder as d, setWorkflowJournalCipher as f } from "@voltro/workflow";
|
|
5
|
-
|
|
5
|
+
// src/workflowRunner.ts
|
|
6
6
|
var p = (e) => {
|
|
7
7
|
let t = /* @__PURE__ */ new Map();
|
|
8
8
|
for (let n of e) {
|
|
@@ -81,5 +81,4 @@ var p = (e) => {
|
|
|
81
81
|
inspect: async (e) => o.get(e) ?? null
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
|
-
//#endregion
|
|
85
84
|
export { h as makeWorkflowRunner };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/testing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.0",
|
|
4
4
|
"description": "Test utilities for Voltro apps — deterministic clock, subject and row factories, a handler-level invoke and a request-level app harness, queued LLM responses, scoped subject/tenant runners, and a cross-dialect parity harness.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltro",
|
|
@@ -58,19 +58,19 @@
|
|
|
58
58
|
"node": ">=24.0.0"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@voltro/cache": "0.
|
|
62
|
-
"@voltro/database": "0.
|
|
63
|
-
"@voltro/env": "0.
|
|
64
|
-
"@voltro/kv": "0.
|
|
65
|
-
"@voltro/local-first": "0.
|
|
66
|
-
"@voltro/logger": "0.
|
|
67
|
-
"@voltro/protocol": "0.
|
|
68
|
-
"@voltro/runtime": "0.
|
|
69
|
-
"@voltro/workflow": "0.
|
|
61
|
+
"@voltro/cache": "0.88.0",
|
|
62
|
+
"@voltro/database": "0.88.0",
|
|
63
|
+
"@voltro/env": "0.88.0",
|
|
64
|
+
"@voltro/kv": "0.88.0",
|
|
65
|
+
"@voltro/local-first": "0.88.0",
|
|
66
|
+
"@voltro/logger": "0.88.0",
|
|
67
|
+
"@voltro/protocol": "0.88.0",
|
|
68
|
+
"@voltro/runtime": "0.88.0",
|
|
69
|
+
"@voltro/workflow": "0.88.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@voltro/client": "0.
|
|
73
|
-
"effect": "4.0
|
|
72
|
+
"@voltro/client": "0.88.0",
|
|
73
|
+
"effect": "4.1.0",
|
|
74
74
|
"react": "^19.0.0",
|
|
75
75
|
"react-dom": "^19.0.0",
|
|
76
76
|
"vitest": ">=3.0.0"
|