@vibesdotdev/localdb 0.0.1 → 1.0.0-rc.2

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 (199) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +134 -112
  3. package/dist/cli/commands/_shared.consumer.d.ts +1 -3
  4. package/dist/cli/commands/_shared.consumer.d.ts.map +1 -1
  5. package/dist/cli/commands/_shared.consumer.js +1 -11
  6. package/dist/cli/commands/_shared.consumer.js.map +1 -1
  7. package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.descriptor.js +1 -1
  8. package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.descriptor.js.map +1 -1
  9. package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.d.ts +9 -3
  10. package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.d.ts.map +1 -1
  11. package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.js +59 -45
  12. package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.js.map +1 -1
  13. package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.descriptor.js +1 -1
  14. package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.descriptor.js.map +1 -1
  15. package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.d.ts +8 -3
  16. package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.d.ts.map +1 -1
  17. package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.js +12 -10
  18. package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.js.map +1 -1
  19. package/dist/cli/commands/pools/dev.localdb.pools.cli-command.descriptor.js +1 -1
  20. package/dist/cli/commands/pools/dev.localdb.pools.cli-command.descriptor.js.map +1 -1
  21. package/dist/cli/commands/pools/dev.localdb.pools.cli-command.impl.d.ts +6 -3
  22. package/dist/cli/commands/pools/dev.localdb.pools.cli-command.impl.d.ts.map +1 -1
  23. package/dist/cli/commands/pools/dev.localdb.pools.cli-command.impl.js +8 -7
  24. package/dist/cli/commands/pools/dev.localdb.pools.cli-command.impl.js.map +1 -1
  25. package/dist/cli/commands/query/dev.localdb.query.cli-command.descriptor.js +1 -1
  26. package/dist/cli/commands/query/dev.localdb.query.cli-command.descriptor.js.map +1 -1
  27. package/dist/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.d.ts +13 -3
  28. package/dist/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.d.ts.map +1 -1
  29. package/dist/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.js +66 -51
  30. package/dist/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.js.map +1 -1
  31. package/dist/cli/commands/status/dev.localdb.status.cli-command.descriptor.js +1 -1
  32. package/dist/cli/commands/status/dev.localdb.status.cli-command.descriptor.js.map +1 -1
  33. package/dist/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.d.ts +9 -3
  34. package/dist/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.d.ts.map +1 -1
  35. package/dist/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.js +41 -29
  36. package/dist/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.js.map +1 -1
  37. package/dist/cli/inputs.d.ts +25 -0
  38. package/dist/cli/inputs.d.ts.map +1 -0
  39. package/dist/cli/inputs.js +81 -0
  40. package/dist/cli/inputs.js.map +1 -0
  41. package/dist/cli/types.d.ts +45 -0
  42. package/dist/cli/types.d.ts.map +1 -0
  43. package/dist/cli/types.js +14 -0
  44. package/dist/cli/types.js.map +1 -0
  45. package/dist/core/connection-pool.d.ts +204 -46
  46. package/dist/core/connection-pool.d.ts.map +1 -1
  47. package/dist/core/connection-pool.js +610 -101
  48. package/dist/core/connection-pool.js.map +1 -1
  49. package/dist/core/database.d.ts +243 -63
  50. package/dist/core/database.d.ts.map +1 -1
  51. package/dist/core/database.js +937 -203
  52. package/dist/core/database.js.map +1 -1
  53. package/dist/core/holders.d.ts +15 -0
  54. package/dist/core/holders.d.ts.map +1 -0
  55. package/dist/core/holders.js +4 -0
  56. package/dist/core/holders.js.map +1 -0
  57. package/dist/core/host-kinds.d.ts +22 -0
  58. package/dist/core/host-kinds.d.ts.map +1 -0
  59. package/dist/core/host-kinds.js +52 -0
  60. package/dist/core/host-kinds.js.map +1 -0
  61. package/dist/core/live-runtime.d.ts +17 -0
  62. package/dist/core/live-runtime.d.ts.map +1 -0
  63. package/dist/core/live-runtime.js +28 -0
  64. package/dist/core/live-runtime.js.map +1 -0
  65. package/dist/core/migration-registry.d.ts +115 -80
  66. package/dist/core/migration-registry.d.ts.map +1 -1
  67. package/dist/core/migration-registry.js +340 -199
  68. package/dist/core/migration-registry.js.map +1 -1
  69. package/dist/core/open-connection.d.ts +11 -0
  70. package/dist/core/open-connection.d.ts.map +1 -0
  71. package/dist/core/open-connection.js +70 -0
  72. package/dist/core/open-connection.js.map +1 -0
  73. package/dist/core/outcome.d.ts +21 -0
  74. package/dist/core/outcome.d.ts.map +1 -0
  75. package/dist/core/outcome.js +22 -0
  76. package/dist/core/outcome.js.map +1 -0
  77. package/dist/core/pool-api.d.ts +19 -0
  78. package/dist/core/pool-api.d.ts.map +1 -0
  79. package/dist/core/pool-api.js +59 -0
  80. package/dist/core/pool-api.js.map +1 -0
  81. package/dist/core/slow-statement.d.ts +81 -0
  82. package/dist/core/slow-statement.d.ts.map +1 -0
  83. package/dist/core/slow-statement.js +149 -0
  84. package/dist/core/slow-statement.js.map +1 -0
  85. package/dist/core/wal-policy.d.ts +86 -0
  86. package/dist/core/wal-policy.d.ts.map +1 -0
  87. package/dist/core/wal-policy.js +115 -0
  88. package/dist/core/wal-policy.js.map +1 -0
  89. package/dist/dev.localdb.cli-group.descriptor.d.ts +1 -1
  90. package/dist/dev.localdb.cli-group.descriptor.d.ts.map +1 -1
  91. package/dist/dev.localdb.context.descriptor.d.ts +15 -1
  92. package/dist/dev.localdb.context.descriptor.d.ts.map +1 -1
  93. package/dist/dev.localdb.context.descriptor.js +1 -1
  94. package/dist/dev.localdb.context.descriptor.js.map +1 -1
  95. package/dist/dev.localdb.context.impl.consumer.d.ts +12 -5
  96. package/dist/dev.localdb.context.impl.consumer.d.ts.map +1 -1
  97. package/dist/dev.localdb.context.impl.consumer.js +14 -5
  98. package/dist/dev.localdb.context.impl.consumer.js.map +1 -1
  99. package/dist/driver/sqlite-driver.base.d.ts +107 -0
  100. package/dist/driver/sqlite-driver.base.d.ts.map +1 -0
  101. package/dist/driver/sqlite-driver.base.js +426 -0
  102. package/dist/driver/sqlite-driver.base.js.map +1 -0
  103. package/dist/driver/sqlite-driver.d.ts +154 -0
  104. package/dist/driver/sqlite-driver.d.ts.map +1 -0
  105. package/dist/driver/sqlite-driver.js +103 -0
  106. package/dist/driver/sqlite-driver.js.map +1 -0
  107. package/dist/index.d.ts +11 -5
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/index.js +8 -4
  110. package/dist/index.js.map +1 -1
  111. package/dist/localdb.client.descriptor.d.ts +10 -0
  112. package/dist/localdb.client.descriptor.d.ts.map +1 -0
  113. package/dist/localdb.client.descriptor.js +13 -0
  114. package/dist/localdb.client.descriptor.js.map +1 -0
  115. package/dist/localdb.client.impl.consumer.d.ts +11 -0
  116. package/dist/localdb.client.impl.consumer.d.ts.map +1 -0
  117. package/dist/localdb.client.impl.consumer.js +11 -0
  118. package/dist/localdb.client.impl.consumer.js.map +1 -0
  119. package/dist/localdb.plugin.d.ts +2 -2
  120. package/dist/localdb.plugin.d.ts.map +1 -1
  121. package/dist/localdb.plugin.js +58 -10
  122. package/dist/localdb.plugin.js.map +1 -1
  123. package/dist/location.d.ts +6 -0
  124. package/dist/location.d.ts.map +1 -0
  125. package/dist/location.js +6 -0
  126. package/dist/location.js.map +1 -0
  127. package/dist/migrations/load-sql.d.ts +25 -21
  128. package/dist/migrations/load-sql.d.ts.map +1 -1
  129. package/dist/migrations/load-sql.js +91 -76
  130. package/dist/migrations/load-sql.js.map +1 -1
  131. package/dist/pool.d.ts +3 -0
  132. package/dist/pool.d.ts.map +1 -0
  133. package/dist/pool.js +3 -0
  134. package/dist/pool.js.map +1 -0
  135. package/dist/schemas/api.d.ts +133 -59
  136. package/dist/schemas/api.d.ts.map +1 -1
  137. package/dist/schemas/api.js +1 -1
  138. package/dist/schemas/api.js.map +1 -1
  139. package/dist/schemas/migrations.d.ts +123 -0
  140. package/dist/schemas/migrations.d.ts.map +1 -0
  141. package/dist/schemas/migrations.js +55 -0
  142. package/dist/schemas/migrations.js.map +1 -0
  143. package/dist/schemas/pool.d.ts +27 -0
  144. package/dist/schemas/pool.d.ts.map +1 -0
  145. package/dist/schemas/pool.js +7 -0
  146. package/dist/schemas/pool.js.map +1 -0
  147. package/dist/schemas/sqlite-driver-base.d.ts +50 -0
  148. package/dist/schemas/sqlite-driver-base.d.ts.map +1 -0
  149. package/dist/schemas/sqlite-driver-base.js +2 -0
  150. package/dist/schemas/sqlite-driver-base.js.map +1 -0
  151. package/dist/testing/sqlite-driver-conformance.d.ts +42 -0
  152. package/dist/testing/sqlite-driver-conformance.d.ts.map +1 -0
  153. package/dist/testing/sqlite-driver-conformance.js +471 -0
  154. package/dist/testing/sqlite-driver-conformance.js.map +1 -0
  155. package/package.json +79 -106
  156. package/SPEC.md +0 -119
  157. package/dist/core/error-context.d.ts +0 -2
  158. package/dist/core/error-context.d.ts.map +0 -1
  159. package/dist/core/error-context.js +0 -17
  160. package/dist/core/error-context.js.map +0 -1
  161. package/dist/core/runtime.d.ts +0 -3
  162. package/dist/core/runtime.d.ts.map +0 -1
  163. package/dist/core/runtime.js +0 -17
  164. package/dist/core/runtime.js.map +0 -1
  165. package/dist/localdb.cloud.plugin.d.ts +0 -17
  166. package/dist/localdb.cloud.plugin.d.ts.map +0 -1
  167. package/dist/localdb.cloud.plugin.js +0 -23
  168. package/dist/localdb.cloud.plugin.js.map +0 -1
  169. package/src/cli/commands/_shared.consumer.ts +0 -20
  170. package/src/cli/commands/migrate/dev.localdb.migrate.cli-command.descriptor.ts +0 -20
  171. package/src/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.ts +0 -97
  172. package/src/cli/commands/namespaces/dev.localdb.namespaces.cli-command.descriptor.ts +0 -17
  173. package/src/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.ts +0 -46
  174. package/src/cli/commands/pools/dev.localdb.pools.cli-command.descriptor.ts +0 -16
  175. package/src/cli/commands/pools/dev.localdb.pools.cli-command.impl.ts +0 -37
  176. package/src/cli/commands/query/dev.localdb.query.cli-command.descriptor.ts +0 -21
  177. package/src/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.ts +0 -69
  178. package/src/cli/commands/status/dev.localdb.status.cli-command.descriptor.ts +0 -20
  179. package/src/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.ts +0 -93
  180. package/src/core/connection-pool.ts +0 -240
  181. package/src/core/database.ts +0 -419
  182. package/src/core/error-context.ts +0 -19
  183. package/src/core/migration-registry.ts +0 -321
  184. package/src/core/runtime.ts +0 -17
  185. package/src/dev.localdb.cli-group.descriptor.ts +0 -20
  186. package/src/dev.localdb.context.descriptor.ts +0 -13
  187. package/src/dev.localdb.context.impl.consumer.ts +0 -12
  188. package/src/index.ts +0 -28
  189. package/src/localdb.cloud.plugin.ts +0 -24
  190. package/src/localdb.plugin.ts +0 -43
  191. package/src/migrations/atlas/001-initial-schema.sql +0 -173
  192. package/src/migrations/atlas/002-lang-server-fields.sql +0 -12
  193. package/src/migrations/atlas/003-config-id-dedup.sql +0 -31
  194. package/src/migrations/atlas/004-fix-on-conflict-constraints.sql +0 -25
  195. package/src/migrations/atlas/005-diagnostics.sql +0 -66
  196. package/src/migrations/atlas/006-diagnostic-summaries.sql +0 -65
  197. package/src/migrations/atlas/007-diagnostic-slice.sql +0 -83
  198. package/src/migrations/load-sql.ts +0 -133
  199. package/src/schemas/api.ts +0 -92
@@ -0,0 +1,123 @@
1
+ import * as z from 'zod/v4';
2
+ import type { SqliteConnection } from '../driver/sqlite-driver.ts';
3
+ export declare const MigrationFunctionSchema: z.ZodCustom<(db: SqliteConnection) => void | Promise<void>, (db: SqliteConnection) => void | Promise<void>>;
4
+ export declare const MigrationSchema: z.ZodObject<{
5
+ version: z.ZodNumber;
6
+ name: z.ZodString;
7
+ up: z.ZodCustom<(db: SqliteConnection) => void | Promise<void>, (db: SqliteConnection) => void | Promise<void>>;
8
+ down: z.ZodOptional<z.ZodCustom<(db: SqliteConnection) => void | Promise<void>, (db: SqliteConnection) => void | Promise<void>>>;
9
+ }, z.core.$strip>;
10
+ export declare const NamespaceDatabaseLocationSchema: z.ZodObject<{
11
+ description: z.ZodString;
12
+ expectedPaths: z.ZodArray<z.ZodString>;
13
+ createdOnDemand: z.ZodOptional<z.ZodBoolean>;
14
+ }, z.core.$strip>;
15
+ export declare const RecoveryOptionsSchema: z.ZodObject<{
16
+ autoReset: z.ZodOptional<z.ZodBoolean>;
17
+ }, z.core.$strict>;
18
+ export declare const RegisterMigrationsOptionsSchema: z.ZodObject<{
19
+ autoReset: z.ZodOptional<z.ZodBoolean>;
20
+ location: z.ZodOptional<z.ZodCustom<() => NamespaceDatabaseLocation, () => NamespaceDatabaseLocation>>;
21
+ }, z.core.$strict>;
22
+ export declare const ReplaceMigrationsOptionsSchema: z.ZodObject<{
23
+ expectedRegisteredIds: z.ZodArray<z.ZodString>;
24
+ }, z.core.$strict>;
25
+ export declare const MigrationRegistrationSchema: z.ZodObject<{
26
+ namespace: z.ZodString;
27
+ migrations: z.ZodPipe<z.ZodArray<z.ZodObject<{
28
+ version: z.ZodNumber;
29
+ name: z.ZodString;
30
+ up: z.ZodCustom<(db: SqliteConnection) => void | Promise<void>, (db: SqliteConnection) => void | Promise<void>>;
31
+ down: z.ZodOptional<z.ZodCustom<(db: SqliteConnection) => void | Promise<void>, (db: SqliteConnection) => void | Promise<void>>>;
32
+ }, z.core.$strip>>, z.ZodTransform<{
33
+ version: number;
34
+ name: string;
35
+ up: (db: SqliteConnection) => void | Promise<void>;
36
+ down?: ((db: SqliteConnection) => void | Promise<void>) | undefined;
37
+ }[], {
38
+ version: number;
39
+ name: string;
40
+ up: (db: SqliteConnection) => void | Promise<void>;
41
+ down?: ((db: SqliteConnection) => void | Promise<void>) | undefined;
42
+ }[]>>;
43
+ options: z.ZodOptional<z.ZodObject<{
44
+ autoReset: z.ZodOptional<z.ZodBoolean>;
45
+ location: z.ZodOptional<z.ZodCustom<() => NamespaceDatabaseLocation, () => NamespaceDatabaseLocation>>;
46
+ }, z.core.$strict>>;
47
+ }, z.core.$strip>;
48
+ export declare const MigrationReplacementSchema: z.ZodObject<{
49
+ namespace: z.ZodString;
50
+ migrations: z.ZodPipe<z.ZodArray<z.ZodObject<{
51
+ version: z.ZodNumber;
52
+ name: z.ZodString;
53
+ up: z.ZodCustom<(db: SqliteConnection) => void | Promise<void>, (db: SqliteConnection) => void | Promise<void>>;
54
+ down: z.ZodOptional<z.ZodCustom<(db: SqliteConnection) => void | Promise<void>, (db: SqliteConnection) => void | Promise<void>>>;
55
+ }, z.core.$strip>>, z.ZodTransform<{
56
+ version: number;
57
+ name: string;
58
+ up: (db: SqliteConnection) => void | Promise<void>;
59
+ down?: ((db: SqliteConnection) => void | Promise<void>) | undefined;
60
+ }[], {
61
+ version: number;
62
+ name: string;
63
+ up: (db: SqliteConnection) => void | Promise<void>;
64
+ down?: ((db: SqliteConnection) => void | Promise<void>) | undefined;
65
+ }[]>>;
66
+ options: z.ZodObject<{
67
+ expectedRegisteredIds: z.ZodArray<z.ZodString>;
68
+ }, z.core.$strict>;
69
+ }, z.core.$strip>;
70
+ export declare const MigrationNamespaceSchema: z.ZodObject<{
71
+ namespace: z.ZodString;
72
+ migrations: z.ZodArray<z.ZodObject<{
73
+ version: z.ZodNumber;
74
+ name: z.ZodString;
75
+ up: z.ZodCustom<(db: SqliteConnection) => void | Promise<void>, (db: SqliteConnection) => void | Promise<void>>;
76
+ down: z.ZodOptional<z.ZodCustom<(db: SqliteConnection) => void | Promise<void>, (db: SqliteConnection) => void | Promise<void>>>;
77
+ }, z.core.$strip>>;
78
+ currentVersion: z.ZodNumber;
79
+ autoReset: z.ZodBoolean;
80
+ location: z.ZodOptional<z.ZodCustom<() => NamespaceDatabaseLocation, () => NamespaceDatabaseLocation>>;
81
+ }, z.core.$strip>;
82
+ export declare const MigrationDescriptorSchema: z.ZodObject<{
83
+ id: z.ZodString;
84
+ name: z.ZodOptional<z.ZodString>;
85
+ description: z.ZodOptional<z.ZodString>;
86
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
87
+ hardware: z.ZodOptional<z.ZodArray<z.ZodString>>;
88
+ enabled: z.ZodOptional<z.ZodBoolean>;
89
+ priority: z.ZodOptional<z.ZodNumber>;
90
+ capabilityId: z.ZodOptional<z.ZodString>;
91
+ requiredContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
92
+ optionalContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
93
+ config: z.ZodOptional<z.ZodUnknown>;
94
+ retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
95
+ maxAgeDays: z.ZodOptional<z.ZodNumber>;
96
+ maxEntries: z.ZodOptional<z.ZodNumber>;
97
+ maxBytes: z.ZodOptional<z.ZodNumber>;
98
+ cascadeFrom: z.ZodOptional<z.ZodString>;
99
+ ageField: z.ZodOptional<z.ZodString>;
100
+ reason: z.ZodString;
101
+ enforcedBy: z.ZodOptional<z.ZodString>;
102
+ }, z.core.$strip>]>>;
103
+ namespace: z.ZodString;
104
+ migrations: z.ZodArray<z.ZodObject<{
105
+ version: z.ZodNumber;
106
+ name: z.ZodString;
107
+ up: z.ZodCustom<(db: SqliteConnection) => void | Promise<void>, (db: SqliteConnection) => void | Promise<void>>;
108
+ down: z.ZodOptional<z.ZodCustom<(db: SqliteConnection) => void | Promise<void>, (db: SqliteConnection) => void | Promise<void>>>;
109
+ }, z.core.$strip>>;
110
+ currentVersion: z.ZodNumber;
111
+ autoReset: z.ZodBoolean;
112
+ location: z.ZodOptional<z.ZodCustom<() => NamespaceDatabaseLocation, () => NamespaceDatabaseLocation>>;
113
+ kind: z.ZodLiteral<"localdb/migrations">;
114
+ }, z.core.$strip>;
115
+ export type MigrationFunction = z.infer<typeof MigrationFunctionSchema>;
116
+ export type Migration = z.infer<typeof MigrationSchema>;
117
+ export type NamespaceDatabaseLocation = z.infer<typeof NamespaceDatabaseLocationSchema>;
118
+ export type RegisterMigrationsOptions = z.infer<typeof RegisterMigrationsOptionsSchema>;
119
+ export type ReplaceMigrationsOptions = z.infer<typeof ReplaceMigrationsOptionsSchema>;
120
+ export type RecoveryOptions = z.infer<typeof RecoveryOptionsSchema>;
121
+ export type MigrationNamespace = z.infer<typeof MigrationNamespaceSchema>;
122
+ export type MigrationDescriptor = z.infer<typeof MigrationDescriptorSchema>;
123
+ //# sourceMappingURL=migrations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/schemas/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,eAAO,MAAM,uBAAuB,mBAAiB,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,OAAzC,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7F,CAAC;AACF,eAAO,MAAM,eAAe;;;yBAHyB,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,OAAzC,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;yCAAzC,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,OAAzC,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;iBAQ5F,CAAC;AACH,eAAO,MAAM,+BAA+B;;;;iBAI1C,CAAC;AACH,eAAO,MAAM,qBAAqB;;kBAG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AAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -0,0 +1,55 @@
1
+ import * as z from 'zod/v4';
2
+ import { RuntimeDescriptorSchema } from '@vibesdotdev/kernel';
3
+ export const MigrationFunctionSchema = z.custom(value => value instanceof Function);
4
+ export const MigrationSchema = z.object({
5
+ version: z.number().int().positive(),
6
+ name: z.string().min(1).refine(value => value.trim().length > 0),
7
+ up: MigrationFunctionSchema,
8
+ down: MigrationFunctionSchema.optional()
9
+ });
10
+ export const NamespaceDatabaseLocationSchema = z.object({
11
+ description: z.string().min(1),
12
+ expectedPaths: z.array(z.string().min(1).refine(path => path.startsWith('/') || /^[A-Za-z]:[\\/]/.test(path), 'Expected an absolute path')),
13
+ createdOnDemand: z.boolean().optional()
14
+ });
15
+ export const RecoveryOptionsSchema = z.object({
16
+ /** Destructive recovery is allowed only for data rebuildable from source. */
17
+ autoReset: z.boolean().optional()
18
+ }).strict();
19
+ export const RegisterMigrationsOptionsSchema = RecoveryOptionsSchema.extend({
20
+ /** Evaluated lazily against the owner's current runtime binding. */
21
+ location: z.custom(value => value instanceof Function).optional()
22
+ });
23
+ export const ReplaceMigrationsOptionsSchema = z.object({
24
+ expectedRegisteredIds: z.array(z.string().min(1))
25
+ }).strict();
26
+ export const MigrationRegistrationSchema = z.object({
27
+ namespace: z.string().min(1).refine(value => value.trim().length > 0),
28
+ migrations: z.array(MigrationSchema).transform(migrations => [...migrations].sort((a, b) => a.version - b.version))
29
+ .superRefine((migrations, ctx) => {
30
+ migrations.forEach((migration, index) => {
31
+ if (migration.version !== index + 1)
32
+ ctx.addIssue({
33
+ code: 'custom', message: `expected version ${index + 1}, got ${migration.version}`
34
+ });
35
+ });
36
+ }),
37
+ options: RegisterMigrationsOptionsSchema.optional()
38
+ });
39
+ export const MigrationReplacementSchema = MigrationRegistrationSchema.omit({ options: true }).extend({
40
+ options: ReplaceMigrationsOptionsSchema
41
+ });
42
+ export const MigrationNamespaceSchema = z.object({
43
+ namespace: z.string().min(1),
44
+ migrations: z.array(MigrationSchema),
45
+ currentVersion: z.number().int().nonnegative(),
46
+ autoReset: z.boolean(),
47
+ location: RegisterMigrationsOptionsSchema.shape.location
48
+ });
49
+ export const MigrationDescriptorSchema = RuntimeDescriptorSchema.extend({
50
+ kind: z.literal('localdb/migrations'),
51
+ ...MigrationNamespaceSchema.shape
52
+ }).refine(declaration => declaration.id === declaration.namespace &&
53
+ declaration.currentVersion === declaration.migrations.length &&
54
+ declaration.migrations.every((migration, index) => migration.version === index + 1), 'Migration descriptor identity and versions must agree');
55
+ //# sourceMappingURL=migrations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../src/schemas/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAG9D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAC9C,KAAK,CAAC,EAAE,CAAC,KAAK,YAAY,QAAQ,CAClC,CAAC;AACF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACpC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;IAChE,EAAE,EAAE,uBAAuB;IAC3B,IAAI,EAAE,uBAAuB,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IA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AAoB,CAAC;IACrC,GAAG,wBAAwB,CAAC,KAAK;CACjC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CACvB,WAAW,CAAC,EAAE,KAAK,WAAW,CAAC,SAAS;IACxC,WAAW,CAAC,cAAc,KAAK,WAAW,CAAC,UAAU,CAAC,MAAM;IAC5D,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,KAAK,KAAK,GAAG,CAAC,CAAC,EACnF,uDAAuD,CACvD,CAAC"}
@@ -0,0 +1,27 @@
1
+ import * as z from 'zod/v4';
2
+ /** Physical pool ownership, selected by kernel loader priority. */
3
+ export declare const PoolDescriptorSchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ name: z.ZodOptional<z.ZodString>;
6
+ description: z.ZodOptional<z.ZodString>;
7
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
8
+ hardware: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
+ enabled: z.ZodOptional<z.ZodBoolean>;
10
+ priority: z.ZodOptional<z.ZodNumber>;
11
+ capabilityId: z.ZodOptional<z.ZodString>;
12
+ requiredContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
+ optionalContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
+ config: z.ZodOptional<z.ZodUnknown>;
15
+ retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
16
+ maxAgeDays: z.ZodOptional<z.ZodNumber>;
17
+ maxEntries: z.ZodOptional<z.ZodNumber>;
18
+ maxBytes: z.ZodOptional<z.ZodNumber>;
19
+ cascadeFrom: z.ZodOptional<z.ZodString>;
20
+ ageField: z.ZodOptional<z.ZodString>;
21
+ reason: z.ZodString;
22
+ enforcedBy: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>]>>;
24
+ kind: z.ZodLiteral<"localdb/pool">;
25
+ }, z.core.$strip>;
26
+ export type PoolDescriptor = z.infer<typeof PoolDescriptorSchema>;
27
+ //# sourceMappingURL=pool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../../src/schemas/pool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,mEAAmE;AACnE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;iBAE/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { RuntimeDescriptorSchema } from '@vibesdotdev/kernel';
2
+ import * as z from 'zod/v4';
3
+ /** Physical pool ownership, selected by kernel loader priority. */
4
+ export const PoolDescriptorSchema = RuntimeDescriptorSchema.extend({
5
+ kind: z.literal('localdb/pool')
6
+ });
7
+ //# sourceMappingURL=pool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pool.js","sourceRoot":"","sources":["../../src/schemas/pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,mEAAmE;AACnE,MAAM,CAAC,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,MAAM,CAAC;IAClE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;CAC/B,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * The types of the shared SQLite driver base (`driver/sqlite-driver.base.ts`):
3
+ * what an open request reads as, what one refusal is, the host facts a failure
4
+ * yields, what the transaction runner needs from a connection, and the
5
+ * primitives a host lends the base.
6
+ */
7
+ import type { CapabilityErrorCode, ValueFreeFailure } from '@vibesdotdev/kernel';
8
+ import type { SQLITE_DRIVER_REFUSALS } from '../driver/sqlite-driver.ts';
9
+ /**
10
+ * What a host lends the shared driver guards: its own path rules and file
11
+ * facts. Each host package implements it over its own API.
12
+ */
13
+ export interface SqliteDriverHost {
14
+ /** Whether `path` (a string without NUL bytes) is absolute on this host. */
15
+ isAbsolutePath(path: string): boolean;
16
+ /**
17
+ * Examine the entry at `path`, following links. Returns when there is one;
18
+ * otherwise throws the host's failure, whose errno `code` (ENOENT, ENOTDIR,
19
+ * EACCES, ...) the base classifies.
20
+ */
21
+ statPath(path: string): void;
22
+ }
23
+ /** An open request read once through `readSqliteOpenRequest`. */
24
+ export interface SqliteOpenRequest {
25
+ readonly path: string;
26
+ readonly memory: boolean;
27
+ readonly create: boolean;
28
+ readonly readonly: boolean;
29
+ }
30
+ /** What one refusal is: its code, reason, message, retryability and details. */
31
+ export interface SqliteFailureDescription {
32
+ readonly message: string;
33
+ readonly code: CapabilityErrorCode;
34
+ readonly reason: (typeof SQLITE_DRIVER_REFUSALS)[keyof typeof SQLITE_DRIVER_REFUSALS];
35
+ readonly retryable: boolean;
36
+ readonly details?: Readonly<Record<string, number | string>>;
37
+ }
38
+ /** The bounded facts read once from one host failure. */
39
+ export interface SqliteHostFailure {
40
+ readonly errcode?: number;
41
+ readonly message?: string;
42
+ readonly errcodeReadFailure?: ValueFreeFailure;
43
+ readonly messageReadFailure?: ValueFreeFailure;
44
+ }
45
+ /** What the transaction runner needs from a connection. */
46
+ export interface SqliteTransactionTarget {
47
+ exec(sql: string): void;
48
+ readonly inTransaction: boolean;
49
+ }
50
+ //# sourceMappingURL=sqlite-driver-base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite-driver-base.d.ts","sourceRoot":"","sources":["../../src/schemas/sqlite-driver-base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEzE;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC,4EAA4E;IAC5E,cAA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sqlite-driver-base.js","sourceRoot":"","sources":["../../src/schemas/sqlite-driver-base.ts"],"names":[],"mappings":""}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * The conformance matrix every `localdb/sqlite-driver` implementation passes
3
+ * (`./test-tooling/sqlite-driver-conformance`).
4
+ *
5
+ * Test tooling, host- and framework-neutral: each case throws a typed
6
+ * `sqlite-driver-conformance-failed` refusal on a broken promise, so each
7
+ * host's `bun:test` suite and a real-Node `node --test` run all execute the
8
+ * same cases against their own driver. `at(name)` returns an absolute path
9
+ * inside a fresh fixture directory the caller owns; `files` is the caller's
10
+ * host, for the facts a driver-neutral case cannot observe.
11
+ */
12
+ import { CapabilityError } from '@vibesdotdev/kernel';
13
+ import { type SqliteDriver } from '../driver/sqlite-driver.ts';
14
+ /** The fixture files a case observes through the caller's host. */
15
+ export interface SqliteConformanceFiles {
16
+ /** Whether an entry exists at `path`. */
17
+ exists(path: string): boolean;
18
+ /** Rename `from` to `to`. */
19
+ rename(from: string, to: string): void;
20
+ }
21
+ export interface SqliteDriverConformanceCase {
22
+ readonly name: string;
23
+ run(driver: SqliteDriver, at: (name: string) => string, files: SqliteConformanceFiles): void;
24
+ }
25
+ /** A broken conformance promise, typed. */
26
+ export declare class SqliteDriverConformanceError extends CapabilityError {
27
+ constructor(message: string, options?: ErrorOptions);
28
+ }
29
+ /** The typed refusal `run` raises; anything else (no throw, another error) fails the case. */
30
+ export declare function refusalOf<T>(run: () => T): CapabilityError;
31
+ /** Every case. */
32
+ export declare const sqliteDriverConformance: readonly SqliteDriverConformanceCase[];
33
+ /**
34
+ * A closed connection releases its file at once, even after prepared
35
+ * statements ran: the set renamed aside reopens. LocalDB's recovery and
36
+ * `resetDatabase()` archive a database this way. Run by the Bun host's suite and
37
+ * by the Node host under real Node; Bun's `node:sqlite` holds a closed file
38
+ * until its statements are collected, so the Node driver's Bun-run suite
39
+ * leaves this case out.
40
+ */
41
+ export declare const closeReleasesFileCase: SqliteDriverConformanceCase;
42
+ //# sourceMappingURL=sqlite-driver-conformance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite-driver-conformance.d.ts","sourceRoot":"","sources":["../../src/testing/sqlite-driver-conformance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAiD,KAAK,YAAY,EAAkF,MAAM,4BAA4B,CAAC;AAE9L,mEAAmE;AACnE,MAAM,WAAW,sBAAsB;IACtC,yCAAyC;IACzC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,6BAA6B;IAC7B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,2BAA2B;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAAE,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAAC;CAC7F;AAED,2CAA2C;AAC3C,qBAAa,4BAA6B,SAAQ,eAAe;gBACpD,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAQnD;AA4CD,8FAA8F;AAC9F,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,eAAe,CAQ1D;AA2CD,kBAAkB;AAClB,eAAO,MAAM,uBAAuB,EAAE,SAAS,2BAA2B,EAoWzE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,2BAmBnC,CAAC"}