@gaganref/confect-test 10.3.1-fork.88 → 10.3.1-fork.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/internal/Attempt.d.ts +77 -0
- package/dist/internal/Attempt.d.ts.map +1 -0
- package/dist/internal/Attempt.js +154 -0
- package/dist/internal/Attempt.js.map +1 -0
- package/dist/internal/ConvexTest.d.ts +34 -0
- package/dist/internal/ConvexTest.d.ts.map +1 -0
- package/dist/internal/ConvexTest.js +59 -0
- package/dist/internal/ConvexTest.js.map +1 -0
- package/dist/internal/Execution.d.ts +167 -0
- package/dist/internal/Execution.d.ts.map +1 -0
- package/dist/internal/Execution.js +790 -0
- package/dist/internal/Execution.js.map +1 -0
- package/dist/internal/Globals.d.ts +11 -0
- package/dist/internal/Globals.d.ts.map +1 -0
- package/dist/internal/Globals.js +76 -0
- package/dist/internal/Globals.js.map +1 -0
- package/dist/internal/Kernel.d.ts +93 -0
- package/dist/internal/Kernel.d.ts.map +1 -0
- package/dist/internal/Kernel.js +91 -0
- package/dist/internal/Kernel.js.map +1 -0
- package/dist/internal/KernelQuery.d.ts +55 -0
- package/dist/internal/KernelQuery.d.ts.map +1 -0
- package/dist/internal/KernelQuery.js +205 -0
- package/dist/internal/KernelQuery.js.map +1 -0
- package/dist/internal/KernelRefusal.d.ts +77 -0
- package/dist/internal/KernelRefusal.d.ts.map +1 -0
- package/dist/internal/KernelRefusal.js +73 -0
- package/dist/internal/KernelRefusal.js.map +1 -0
- package/dist/internal/KernelValues.d.ts +136 -0
- package/dist/internal/KernelValues.d.ts.map +1 -0
- package/dist/internal/KernelValues.js +266 -0
- package/dist/internal/KernelValues.js.map +1 -0
- package/dist/internal/ReadSet.d.ts +55 -0
- package/dist/internal/ReadSet.d.ts.map +1 -0
- package/dist/internal/ReadSet.js +29 -0
- package/dist/internal/ReadSet.js.map +1 -0
- package/package.json +3 -3
- package/src/internal/Attempt.ts +185 -0
- package/src/internal/ConvexTest.ts +118 -0
- package/src/internal/Execution.ts +1430 -0
- package/src/internal/Globals.ts +93 -0
- package/src/internal/Kernel.ts +190 -0
- package/src/internal/KernelQuery.ts +405 -0
- package/src/internal/KernelRefusal.ts +88 -0
- package/src/internal/KernelValues.ts +725 -0
- package/src/internal/ReadSet.ts +108 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The kernel never answers this operation in process. Only the binary does.
|
|
5
|
+
*/
|
|
6
|
+
export class RequiresBinary extends Schema.TaggedError<RequiresBinary>()(
|
|
7
|
+
"RequiresBinary",
|
|
8
|
+
{
|
|
9
|
+
operation: Schema.Literals(["textSearch", "vectorSearch"]),
|
|
10
|
+
message: Schema.String,
|
|
11
|
+
},
|
|
12
|
+
) {}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A later kernel row supplies this operation. Until then the kernel refuses it
|
|
16
|
+
* rather than answer with convex-test's behaviour.
|
|
17
|
+
*/
|
|
18
|
+
export class KernelRowPending extends Schema.TaggedError<KernelRowPending>()(
|
|
19
|
+
"KernelRowPending",
|
|
20
|
+
{
|
|
21
|
+
operation: Schema.String,
|
|
22
|
+
row: Schema.Int,
|
|
23
|
+
message: Schema.String,
|
|
24
|
+
},
|
|
25
|
+
) {}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A component was registered after the test backend opened, so its modules
|
|
29
|
+
* would load after a function had already run.
|
|
30
|
+
*/
|
|
31
|
+
export class RegisteredAfterOpen extends Schema.TaggedError<RegisteredAfterOpen>()(
|
|
32
|
+
"RegisteredAfterOpen",
|
|
33
|
+
{ componentPath: Schema.String, message: Schema.String },
|
|
34
|
+
) {}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Every attempt of a mutation read data a commit changed before it could
|
|
38
|
+
* publish. The kernel gives up on attempt 5.
|
|
39
|
+
*/
|
|
40
|
+
export class OptimisticConcurrencyControlFailure extends Schema.TaggedError<OptimisticConcurrencyControlFailure>()(
|
|
41
|
+
"OptimisticConcurrencyControlFailure",
|
|
42
|
+
{ attempts: Schema.Int, message: Schema.String },
|
|
43
|
+
) {}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A syscall reached a mutation's attempt after the mutation returned and its
|
|
47
|
+
* syscalls drained, so the attempt was already held or published.
|
|
48
|
+
*/
|
|
49
|
+
export class ClosedAttempt extends Schema.TaggedError<ClosedAttempt>()(
|
|
50
|
+
"ClosedAttempt",
|
|
51
|
+
{ operation: Schema.String, message: Schema.String },
|
|
52
|
+
) {}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* `apply` named an attempt the kernel does not hold: it was already applied, or
|
|
56
|
+
* never prepared.
|
|
57
|
+
*/
|
|
58
|
+
export class StaleAttempt extends Schema.TaggedError<StaleAttempt>()(
|
|
59
|
+
"StaleAttempt",
|
|
60
|
+
{ id: Schema.String, message: Schema.String },
|
|
61
|
+
) {}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The runtime answered a commit timestamp no greater than the previous
|
|
65
|
+
* commit's.
|
|
66
|
+
*/
|
|
67
|
+
export class CommitTsNotIncreasing extends Schema.TaggedError<CommitTsNotIncreasing>()(
|
|
68
|
+
"CommitTsNotIncreasing",
|
|
69
|
+
{
|
|
70
|
+
version: Schema.Int,
|
|
71
|
+
previous: Schema.BigInt,
|
|
72
|
+
commitTs: Schema.BigInt,
|
|
73
|
+
message: Schema.String,
|
|
74
|
+
},
|
|
75
|
+
) {}
|
|
76
|
+
|
|
77
|
+
export const requiresBinary = (operation: RequiresBinary["operation"]) =>
|
|
78
|
+
new RequiresBinary({
|
|
79
|
+
operation,
|
|
80
|
+
message: `The test kernel does not simulate ${operation}. Run this case against the Convex binary.`,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export const rowPending = (operation: string, row: number) =>
|
|
84
|
+
new KernelRowPending({
|
|
85
|
+
operation,
|
|
86
|
+
row,
|
|
87
|
+
message: `The test kernel supplies ${operation} in build-order row ${row}.`,
|
|
88
|
+
});
|