@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.
Files changed (46) hide show
  1. package/dist/internal/Attempt.d.ts +77 -0
  2. package/dist/internal/Attempt.d.ts.map +1 -0
  3. package/dist/internal/Attempt.js +154 -0
  4. package/dist/internal/Attempt.js.map +1 -0
  5. package/dist/internal/ConvexTest.d.ts +34 -0
  6. package/dist/internal/ConvexTest.d.ts.map +1 -0
  7. package/dist/internal/ConvexTest.js +59 -0
  8. package/dist/internal/ConvexTest.js.map +1 -0
  9. package/dist/internal/Execution.d.ts +167 -0
  10. package/dist/internal/Execution.d.ts.map +1 -0
  11. package/dist/internal/Execution.js +790 -0
  12. package/dist/internal/Execution.js.map +1 -0
  13. package/dist/internal/Globals.d.ts +11 -0
  14. package/dist/internal/Globals.d.ts.map +1 -0
  15. package/dist/internal/Globals.js +76 -0
  16. package/dist/internal/Globals.js.map +1 -0
  17. package/dist/internal/Kernel.d.ts +93 -0
  18. package/dist/internal/Kernel.d.ts.map +1 -0
  19. package/dist/internal/Kernel.js +91 -0
  20. package/dist/internal/Kernel.js.map +1 -0
  21. package/dist/internal/KernelQuery.d.ts +55 -0
  22. package/dist/internal/KernelQuery.d.ts.map +1 -0
  23. package/dist/internal/KernelQuery.js +205 -0
  24. package/dist/internal/KernelQuery.js.map +1 -0
  25. package/dist/internal/KernelRefusal.d.ts +77 -0
  26. package/dist/internal/KernelRefusal.d.ts.map +1 -0
  27. package/dist/internal/KernelRefusal.js +73 -0
  28. package/dist/internal/KernelRefusal.js.map +1 -0
  29. package/dist/internal/KernelValues.d.ts +136 -0
  30. package/dist/internal/KernelValues.d.ts.map +1 -0
  31. package/dist/internal/KernelValues.js +266 -0
  32. package/dist/internal/KernelValues.js.map +1 -0
  33. package/dist/internal/ReadSet.d.ts +55 -0
  34. package/dist/internal/ReadSet.d.ts.map +1 -0
  35. package/dist/internal/ReadSet.js +29 -0
  36. package/dist/internal/ReadSet.js.map +1 -0
  37. package/package.json +3 -3
  38. package/src/internal/Attempt.ts +185 -0
  39. package/src/internal/ConvexTest.ts +118 -0
  40. package/src/internal/Execution.ts +1430 -0
  41. package/src/internal/Globals.ts +93 -0
  42. package/src/internal/Kernel.ts +190 -0
  43. package/src/internal/KernelQuery.ts +405 -0
  44. package/src/internal/KernelRefusal.ts +88 -0
  45. package/src/internal/KernelValues.ts +725 -0
  46. 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
+ });