@voltro/testing 0.84.0 → 0.85.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 +549 -0
- package/THIRD-PARTY-NOTICES.md +71 -525
- package/dist/client.d.ts +4 -9
- package/dist/dialect.d.ts +1 -1
- package/dist/dialect.js +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +116 -116
- package/package.json +10 -11
package/dist/client.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
2
|
import { Exit } from 'effect/Exit';
|
|
3
|
+
import { Fiber } from 'effect/Fiber';
|
|
3
4
|
import { FieldErrors } from '@voltro/client';
|
|
4
5
|
import { FormBinding } from '@voltro/client';
|
|
5
6
|
import { FormStateSnapshot } from '@voltro/client';
|
|
6
7
|
import { ReactElement } from 'react';
|
|
7
8
|
import { ReactNode } from 'react';
|
|
8
|
-
import { RunForkOptions } from 'effect/Runtime';
|
|
9
|
-
import { RuntimeFiber } from 'effect/Fiber';
|
|
10
9
|
import { UseFormBindingOptions } from '@voltro/client';
|
|
11
10
|
|
|
12
11
|
/** The snapshot shape `useConnectionStatus` subscribes to. */
|
|
@@ -38,13 +37,9 @@ declare interface ConnectionFacts {
|
|
|
38
37
|
* starts calling goes red here instead of in whichever hook reaches it first.
|
|
39
38
|
*/
|
|
40
39
|
export declare const FAKE_RUNTIME: {
|
|
41
|
-
runPromise: <A, E>(effect: Effect.Effect<A, E
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
runPromiseExit: <A, E>(effect: Effect.Effect<A, E, never>, options?: {
|
|
45
|
-
readonly signal?: AbortSignal;
|
|
46
|
-
} | undefined) => Promise< Exit<A, E>>;
|
|
47
|
-
runFork: <A, E>(effect: Effect.Effect<A, E>, options?: RunForkOptions) => RuntimeFiber<A, E>;
|
|
40
|
+
runPromise: <A, E>(effect: Effect.Effect<A, E>, options?: Effect.RunOptions | undefined) => Promise<A>;
|
|
41
|
+
runPromiseExit: <A, E>(effect: Effect.Effect<A, E>, options?: Effect.RunOptions | undefined) => Promise< Exit<A, E>>;
|
|
42
|
+
runFork: <A, E>(effect: Effect.Effect<A, E, never>, options?: Effect.RunOptions | undefined) => Fiber<A, E>;
|
|
48
43
|
dispose: () => Effect.Effect<void, never, never>;
|
|
49
44
|
};
|
|
50
45
|
|
package/dist/dialect.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { applySchema } from '@voltro/database/sql';
|
|
2
2
|
import { DataStore } from '@voltro/database';
|
|
3
3
|
import { Effect } from 'effect';
|
|
4
|
-
import { SqlClient } from '
|
|
4
|
+
import { SqlClient } from 'effect/sql';
|
|
5
5
|
import { SqlDialect } from '@voltro/database';
|
|
6
6
|
|
|
7
7
|
export { applySchema }
|
package/dist/dialect.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _voltroMigrationPlansTable as e, array as t, boolean as n, bulkInsertLi
|
|
|
2
2
|
import { Effect as b } from "effect";
|
|
3
3
|
import { _voltroUndoLogTable as x, applyInverses as S, makeSchemaRegistry as C, synthesizeInverse as w, wrapStoreWithMixinBehaviour as T } from "@voltro/runtime";
|
|
4
4
|
import { afterEach as E, beforeEach as D, describe as O, expect as k, it as A } from "vitest";
|
|
5
|
-
import { SqlClient as j } from "
|
|
5
|
+
import { SqlClient as j } from "effect/sql";
|
|
6
6
|
import { applyPlan as M, applySchema as N, declaredSnapshot as P, fingerprintSchema as F, introspectSchema as I, planMigrations as L } from "@voltro/database/sql";
|
|
7
7
|
//#region src/dialectParity.ts
|
|
8
8
|
var R = (e) => ({
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ import { EventPublisher } from '@voltro/runtime';
|
|
|
13
13
|
import { InspectedStep } from '@voltro/workflow';
|
|
14
14
|
import { InspectedWorkflow } from '@voltro/workflow';
|
|
15
15
|
import { Layer } from 'effect';
|
|
16
|
-
import { ParseResult } from 'effect';
|
|
17
16
|
import { ProcedureDescriptor } from '@voltro/protocol';
|
|
18
17
|
import { PublicApiDescriptor } from '@voltro/protocol/rest';
|
|
19
18
|
import { PublicApiProfileConfig } from '@voltro/protocol';
|
|
@@ -27,6 +26,7 @@ import { RpcConnection } from '@voltro/runtime';
|
|
|
27
26
|
import { RpcInterceptor } from '@voltro/protocol';
|
|
28
27
|
import { RpcKind } from '@voltro/protocol';
|
|
29
28
|
import { Schema } from 'effect';
|
|
29
|
+
import { SchemaError } from 'effect/Schema';
|
|
30
30
|
import { Scope } from 'effect';
|
|
31
31
|
import { ServiceApi } from '@voltro/protocol';
|
|
32
32
|
import { Subject } from '@voltro/protocol';
|
|
@@ -678,8 +678,6 @@ export declare const nextSequence: () => number;
|
|
|
678
678
|
/** Delivery nudges emitted through `ctx.outbox` on this context. */
|
|
679
679
|
export declare const outboxNudgesOf: (ctx: TestContext) => ReadonlyArray<string>;
|
|
680
680
|
|
|
681
|
-
export { ParseResult }
|
|
682
|
-
|
|
683
681
|
/** The plugins a context was built with — for the REST harness, which hands
|
|
684
682
|
* their cross-cutting errors to the `publicApi` projection the way both boot
|
|
685
683
|
* paths do. */
|
|
@@ -809,6 +807,8 @@ export declare const runAfterCommit: (ctx: TestContext) => Promise<void>;
|
|
|
809
807
|
*/
|
|
810
808
|
export declare const runInStoreTransaction: <T>(ctx: TestContext, work: (txCtx: TestContext) => Promise<T>) => Promise<T>;
|
|
811
809
|
|
|
810
|
+
export { SchemaError }
|
|
811
|
+
|
|
812
812
|
/** A machine subject scoped to ONE tenant (a per-tenant integration, a
|
|
813
813
|
* `storeForTenant` view). NOT the cross-tenant `system()` below. */
|
|
814
814
|
export declare const serviceAccount: (id: string, options?: TestSubjectOptions) => Subject;
|
|
@@ -1020,11 +1020,11 @@ export declare interface TestEventBus {
|
|
|
1020
1020
|
* descriptor fails here, which is the point: a harness that skipped validation
|
|
1021
1021
|
* would let a test pass on a payload production rejects.
|
|
1022
1022
|
*/
|
|
1023
|
-
publish<Name extends string, Key extends Schema.
|
|
1023
|
+
publish<Name extends string, Key extends Schema.Top, Payload extends Schema.Top>(descriptor: EventDescriptor<Name, Key, Payload>, key: Schema.Schema.Type<Key>, payload: Schema.Schema.Type<Payload>): Promise<{
|
|
1024
1024
|
readonly n: number;
|
|
1025
1025
|
}>;
|
|
1026
1026
|
/** Publish and ASSERT it succeeded — the common case, one line. */
|
|
1027
|
-
subscribe<Name extends string, Key extends Schema.
|
|
1027
|
+
subscribe<Name extends string, Key extends Schema.Top, Payload extends Schema.Top>(descriptor: EventDescriptor<Name, Key, Payload>, key: Schema.Schema.Type<Key>, options?: {
|
|
1028
1028
|
readonly tenantId?: string | null;
|
|
1029
1029
|
readonly resume?: ReadonlyArray<{
|
|
1030
1030
|
origin: string;
|
|
@@ -1040,7 +1040,7 @@ export declare interface TestEventBus {
|
|
|
1040
1040
|
* is owed messages the ring never held — exactly the shape a slow consumer
|
|
1041
1041
|
* produces, deterministically.
|
|
1042
1042
|
*/
|
|
1043
|
-
skipSerials<Name extends string, Key extends Schema.
|
|
1043
|
+
skipSerials<Name extends string, Key extends Schema.Top, Payload extends Schema.Top>(descriptor: EventDescriptor<Name, Key, Payload>, key: Schema.Schema.Type<Key>, count: number, options?: {
|
|
1044
1044
|
readonly tenantId?: string | null;
|
|
1045
1045
|
}): void;
|
|
1046
1046
|
/** The underlying bus, for a test that needs something not exposed here. */
|
|
@@ -1161,7 +1161,7 @@ export declare const withFrozenTime: <A>(at: Date | number | string | MockClock,
|
|
|
1161
1161
|
export declare const withRpcConnection: (ctx: TestContext, connection: RpcConnection | undefined) => TestContext;
|
|
1162
1162
|
|
|
1163
1163
|
/** A workflow + its execute function, as the framework pairs them via
|
|
1164
|
-
* `workflow.toLayer(execute)`. Structural (no
|
|
1164
|
+
* `workflow.toLayer(execute)`. Structural (no `effect/workflow` generic
|
|
1165
1165
|
* signature) so callers can pass the value from `workflow({ name, ... })`
|
|
1166
1166
|
* plus its `(payload, executionId) => Effect` execute directly — type-erased
|
|
1167
1167
|
* over the workflow's payload/success/error/requirement shapes. */
|