@vibesdotdev/localdb 0.0.2 → 1.0.0-rc.3
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/LICENSE +18 -0
- package/README.md +123 -2
- package/dist/cli/commands/_shared.consumer.d.ts +1 -3
- package/dist/cli/commands/_shared.consumer.d.ts.map +1 -1
- package/dist/cli/commands/_shared.consumer.js +1 -11
- package/dist/cli/commands/_shared.consumer.js.map +1 -1
- package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.descriptor.js +1 -1
- package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.descriptor.js.map +1 -1
- package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.d.ts +9 -3
- package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.d.ts.map +1 -1
- package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.js +59 -45
- package/dist/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.js.map +1 -1
- package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.descriptor.js +1 -1
- package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.descriptor.js.map +1 -1
- package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.d.ts +8 -3
- package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.js +12 -10
- package/dist/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.js.map +1 -1
- package/dist/cli/commands/pools/dev.localdb.pools.cli-command.descriptor.js +1 -1
- package/dist/cli/commands/pools/dev.localdb.pools.cli-command.descriptor.js.map +1 -1
- package/dist/cli/commands/pools/dev.localdb.pools.cli-command.impl.d.ts +6 -3
- package/dist/cli/commands/pools/dev.localdb.pools.cli-command.impl.d.ts.map +1 -1
- package/dist/cli/commands/pools/dev.localdb.pools.cli-command.impl.js +8 -7
- package/dist/cli/commands/pools/dev.localdb.pools.cli-command.impl.js.map +1 -1
- package/dist/cli/commands/query/dev.localdb.query.cli-command.descriptor.js +1 -1
- package/dist/cli/commands/query/dev.localdb.query.cli-command.descriptor.js.map +1 -1
- package/dist/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.d.ts +13 -3
- package/dist/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.d.ts.map +1 -1
- package/dist/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.js +66 -51
- package/dist/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.js.map +1 -1
- package/dist/cli/commands/status/dev.localdb.status.cli-command.descriptor.js +1 -1
- package/dist/cli/commands/status/dev.localdb.status.cli-command.descriptor.js.map +1 -1
- package/dist/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.d.ts +9 -3
- package/dist/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.d.ts.map +1 -1
- package/dist/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.js +41 -29
- package/dist/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.js.map +1 -1
- package/dist/cli/inputs.d.ts +25 -0
- package/dist/cli/inputs.d.ts.map +1 -0
- package/dist/cli/inputs.js +81 -0
- package/dist/cli/inputs.js.map +1 -0
- package/dist/cli/types.d.ts +45 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +14 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/core/connection-pool.d.ts +204 -46
- package/dist/core/connection-pool.d.ts.map +1 -1
- package/dist/core/connection-pool.js +610 -101
- package/dist/core/connection-pool.js.map +1 -1
- package/dist/core/database.d.ts +243 -63
- package/dist/core/database.d.ts.map +1 -1
- package/dist/core/database.js +937 -203
- package/dist/core/database.js.map +1 -1
- package/dist/core/holders.d.ts +15 -0
- package/dist/core/holders.d.ts.map +1 -0
- package/dist/core/holders.js +4 -0
- package/dist/core/holders.js.map +1 -0
- package/dist/core/host-kinds.d.ts +22 -0
- package/dist/core/host-kinds.d.ts.map +1 -0
- package/dist/core/host-kinds.js +52 -0
- package/dist/core/host-kinds.js.map +1 -0
- package/dist/core/live-runtime.d.ts +17 -0
- package/dist/core/live-runtime.d.ts.map +1 -0
- package/dist/core/live-runtime.js +28 -0
- package/dist/core/live-runtime.js.map +1 -0
- package/dist/core/migration-registry.d.ts +115 -80
- package/dist/core/migration-registry.d.ts.map +1 -1
- package/dist/core/migration-registry.js +340 -199
- package/dist/core/migration-registry.js.map +1 -1
- package/dist/core/open-connection.d.ts +11 -0
- package/dist/core/open-connection.d.ts.map +1 -0
- package/dist/core/open-connection.js +70 -0
- package/dist/core/open-connection.js.map +1 -0
- package/dist/core/outcome.d.ts +21 -0
- package/dist/core/outcome.d.ts.map +1 -0
- package/dist/core/outcome.js +22 -0
- package/dist/core/outcome.js.map +1 -0
- package/dist/core/pool-api.d.ts +19 -0
- package/dist/core/pool-api.d.ts.map +1 -0
- package/dist/core/pool-api.js +59 -0
- package/dist/core/pool-api.js.map +1 -0
- package/dist/core/slow-statement.d.ts +81 -0
- package/dist/core/slow-statement.d.ts.map +1 -0
- package/dist/core/slow-statement.js +149 -0
- package/dist/core/slow-statement.js.map +1 -0
- package/dist/core/wal-policy.d.ts +86 -0
- package/dist/core/wal-policy.d.ts.map +1 -0
- package/dist/core/wal-policy.js +115 -0
- package/dist/core/wal-policy.js.map +1 -0
- package/dist/dev.localdb.cli-group.descriptor.d.ts +1 -1
- package/dist/dev.localdb.cli-group.descriptor.d.ts.map +1 -1
- package/dist/dev.localdb.context.descriptor.d.ts +15 -1
- package/dist/dev.localdb.context.descriptor.d.ts.map +1 -1
- package/dist/dev.localdb.context.descriptor.js +1 -1
- package/dist/dev.localdb.context.descriptor.js.map +1 -1
- package/dist/dev.localdb.context.impl.consumer.d.ts +12 -5
- package/dist/dev.localdb.context.impl.consumer.d.ts.map +1 -1
- package/dist/dev.localdb.context.impl.consumer.js +14 -5
- package/dist/dev.localdb.context.impl.consumer.js.map +1 -1
- package/dist/driver/sqlite-driver.base.d.ts +107 -0
- package/dist/driver/sqlite-driver.base.d.ts.map +1 -0
- package/dist/driver/sqlite-driver.base.js +426 -0
- package/dist/driver/sqlite-driver.base.js.map +1 -0
- package/dist/driver/sqlite-driver.d.ts +154 -0
- package/dist/driver/sqlite-driver.d.ts.map +1 -0
- package/dist/driver/sqlite-driver.js +103 -0
- package/dist/driver/sqlite-driver.js.map +1 -0
- package/dist/index.d.ts +11 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/localdb.client.descriptor.d.ts +10 -0
- package/dist/localdb.client.descriptor.d.ts.map +1 -0
- package/dist/localdb.client.descriptor.js +13 -0
- package/dist/localdb.client.descriptor.js.map +1 -0
- package/dist/localdb.client.impl.consumer.d.ts +11 -0
- package/dist/localdb.client.impl.consumer.d.ts.map +1 -0
- package/dist/localdb.client.impl.consumer.js +11 -0
- package/dist/localdb.client.impl.consumer.js.map +1 -0
- package/dist/localdb.plugin.d.ts +2 -2
- package/dist/localdb.plugin.d.ts.map +1 -1
- package/dist/localdb.plugin.js +58 -10
- package/dist/localdb.plugin.js.map +1 -1
- package/dist/location.d.ts +6 -0
- package/dist/location.d.ts.map +1 -0
- package/dist/location.js +6 -0
- package/dist/location.js.map +1 -0
- package/dist/migrations/load-sql.d.ts +25 -21
- package/dist/migrations/load-sql.d.ts.map +1 -1
- package/dist/migrations/load-sql.js +91 -76
- package/dist/migrations/load-sql.js.map +1 -1
- package/dist/pool.d.ts +3 -0
- package/dist/pool.d.ts.map +1 -0
- package/dist/pool.js +3 -0
- package/dist/pool.js.map +1 -0
- package/dist/schemas/api.d.ts +133 -59
- package/dist/schemas/api.d.ts.map +1 -1
- package/dist/schemas/api.js +1 -1
- package/dist/schemas/api.js.map +1 -1
- package/dist/schemas/migrations.d.ts +123 -0
- package/dist/schemas/migrations.d.ts.map +1 -0
- package/dist/schemas/migrations.js +55 -0
- package/dist/schemas/migrations.js.map +1 -0
- package/dist/schemas/pool.d.ts +27 -0
- package/dist/schemas/pool.d.ts.map +1 -0
- package/dist/schemas/pool.js +7 -0
- package/dist/schemas/pool.js.map +1 -0
- package/dist/schemas/sqlite-driver-base.d.ts +50 -0
- package/dist/schemas/sqlite-driver-base.d.ts.map +1 -0
- package/dist/schemas/sqlite-driver-base.js +2 -0
- package/dist/schemas/sqlite-driver-base.js.map +1 -0
- package/dist/testing/sqlite-driver-conformance.d.ts +42 -0
- package/dist/testing/sqlite-driver-conformance.d.ts.map +1 -0
- package/dist/testing/sqlite-driver-conformance.js +471 -0
- package/dist/testing/sqlite-driver-conformance.js.map +1 -0
- package/package.json +78 -104
- package/dist/core/error-context.d.ts +0 -2
- package/dist/core/error-context.d.ts.map +0 -1
- package/dist/core/error-context.js +0 -17
- package/dist/core/error-context.js.map +0 -1
- package/dist/core/runtime.d.ts +0 -3
- package/dist/core/runtime.d.ts.map +0 -1
- package/dist/core/runtime.js +0 -17
- package/dist/core/runtime.js.map +0 -1
- package/dist/localdb.cloud.plugin.d.ts +0 -17
- package/dist/localdb.cloud.plugin.d.ts.map +0 -1
- package/dist/localdb.cloud.plugin.js +0 -23
- package/dist/localdb.cloud.plugin.js.map +0 -1
- package/src/cli/commands/_shared.consumer.ts +0 -20
- package/src/cli/commands/migrate/dev.localdb.migrate.cli-command.descriptor.ts +0 -20
- package/src/cli/commands/migrate/dev.localdb.migrate.cli-command.impl.consumer.ts +0 -97
- package/src/cli/commands/namespaces/dev.localdb.namespaces.cli-command.descriptor.ts +0 -17
- package/src/cli/commands/namespaces/dev.localdb.namespaces.cli-command.impl.ts +0 -46
- package/src/cli/commands/pools/dev.localdb.pools.cli-command.descriptor.ts +0 -16
- package/src/cli/commands/pools/dev.localdb.pools.cli-command.impl.ts +0 -37
- package/src/cli/commands/query/dev.localdb.query.cli-command.descriptor.ts +0 -21
- package/src/cli/commands/query/dev.localdb.query.cli-command.impl.consumer.ts +0 -69
- package/src/cli/commands/status/dev.localdb.status.cli-command.descriptor.ts +0 -20
- package/src/cli/commands/status/dev.localdb.status.cli-command.impl.consumer.ts +0 -93
- package/src/core/connection-pool.ts +0 -240
- package/src/core/database.ts +0 -419
- package/src/core/error-context.ts +0 -19
- package/src/core/migration-registry.ts +0 -321
- package/src/core/runtime.ts +0 -17
- package/src/dev.localdb.cli-group.descriptor.ts +0 -20
- package/src/dev.localdb.context.descriptor.ts +0 -13
- package/src/dev.localdb.context.impl.consumer.ts +0 -12
- package/src/index.ts +0 -28
- package/src/localdb.cloud.plugin.ts +0 -24
- package/src/localdb.plugin.ts +0 -43
- package/src/migrations/atlas/001-initial-schema.sql +0 -173
- package/src/migrations/atlas/002-lang-server-fields.sql +0 -12
- package/src/migrations/atlas/003-config-id-dedup.sql +0 -31
- package/src/migrations/atlas/004-fix-on-conflict-constraints.sql +0 -25
- package/src/migrations/atlas/005-diagnostics.sql +0 -66
- package/src/migrations/atlas/006-diagnostic-summaries.sql +0 -65
- package/src/migrations/atlas/007-diagnostic-slice.sql +0 -83
- package/src/migrations/load-sql.ts +0 -133
- package/src/schemas/api.ts +0 -92
|
@@ -1,115 +1,130 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SQL Migration Loader
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Reads an owner's migration SQL files from the absolute directory the owner
|
|
5
|
+
* passes (PM and Workspace pass their own `migrations/<namespace>` directory),
|
|
6
|
+
* through the runtime's filesystem (`filesystem/adapter`). LocalDB ships no SQL
|
|
7
|
+
* of its own, so there is no package-relative lookup.
|
|
6
8
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
10
|
+
import * as z from 'zod/v4';
|
|
11
|
+
import { fileSystemOf } from "../core/host-kinds.js";
|
|
12
|
+
/** The owner's migration directory; a relative path is refused rather than resolved against a guessed base. */
|
|
13
|
+
function migrationDirectory(files, directory) {
|
|
14
|
+
if (!files.isAbsolute(directory)) {
|
|
15
|
+
throw new CapabilityError(`Migration directory must be an absolute path: ${directory}`, 'INVALID_INPUT', {
|
|
16
|
+
reason: 'migration-directory-relative',
|
|
17
|
+
retryable: false,
|
|
18
|
+
details: { directory }
|
|
19
|
+
});
|
|
16
20
|
}
|
|
21
|
+
return directory;
|
|
17
22
|
}
|
|
23
|
+
const SqlTextSchema = z.string();
|
|
18
24
|
/**
|
|
19
|
-
* Load a SQL migration file
|
|
25
|
+
* Load a SQL migration file from an owner's migration directory, through the
|
|
26
|
+
* runtime's filesystem.
|
|
20
27
|
*
|
|
21
|
-
* @param
|
|
28
|
+
* @param runtime - The runtime the owner was handed
|
|
29
|
+
* @param directory - The owner's absolute migration directory
|
|
22
30
|
* @param filename - The SQL filename (e.g., '001-initial-schema.sql')
|
|
23
|
-
* @returns
|
|
31
|
+
* @returns The SQL content; every failure rejects (`INVALID_INPUT
|
|
32
|
+
* migration-directory-relative`, `NOT_FOUND migration-file-missing`, or the
|
|
33
|
+
* filesystem's own refusal)
|
|
24
34
|
*/
|
|
25
|
-
export function loadMigrationSQL(
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
29
|
-
throw new
|
|
35
|
+
export async function loadMigrationSQL(runtime, directory, filename) {
|
|
36
|
+
const files = await fileSystemOf(runtime);
|
|
37
|
+
const filePath = files.join(migrationDirectory(files, directory), filename);
|
|
38
|
+
if (!(await files.exists(filePath))) {
|
|
39
|
+
throw new CapabilityError(`Migration file not found: ${filePath}`, 'NOT_FOUND', {
|
|
40
|
+
reason: 'migration-file-missing',
|
|
41
|
+
details: { directory, filename }
|
|
42
|
+
});
|
|
30
43
|
}
|
|
31
|
-
|
|
32
|
-
if (!existsSync(filePath)) {
|
|
33
|
-
throw new Error(`Migration file not found: ${filePath}`);
|
|
34
|
-
}
|
|
35
|
-
return Bun.file(filePath).text();
|
|
44
|
+
return SqlTextSchema.parse(await files.readFile(filePath, 'utf-8'));
|
|
36
45
|
}
|
|
37
46
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
47
|
+
* List the SQL files in an owner's migration directory, sorted by version,
|
|
48
|
+
* through the runtime's filesystem. A directory that does not exist lists
|
|
49
|
+
* nothing.
|
|
40
50
|
*
|
|
41
|
-
* @param
|
|
42
|
-
* @param
|
|
43
|
-
* @returns
|
|
51
|
+
* @param runtime - The runtime the owner was handed
|
|
52
|
+
* @param directory - The owner's absolute migration directory
|
|
53
|
+
* @returns SQL filenames sorted by their numeric version prefix
|
|
44
54
|
*/
|
|
45
|
-
export function
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
if (!
|
|
49
|
-
throw new Error(`Migration namespace not found: ${namespace}`);
|
|
50
|
-
}
|
|
51
|
-
const filePath = join(namespaceDir, filename);
|
|
52
|
-
if (!existsSync(filePath)) {
|
|
53
|
-
throw new Error(`Migration file not found: ${filePath}`);
|
|
54
|
-
}
|
|
55
|
-
return readFileSync(filePath, 'utf-8');
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* List all SQL files in a namespace directory
|
|
59
|
-
*
|
|
60
|
-
* @param namespace - The migration namespace (atlas, session, external)
|
|
61
|
-
* @returns Array of SQL filenames sorted by version number
|
|
62
|
-
*/
|
|
63
|
-
export function listMigrationFiles(namespace) {
|
|
64
|
-
throwIfBrowser();
|
|
65
|
-
const dirPath = resolveMigrationNamespaceDir(namespace);
|
|
66
|
-
if (!dirPath || !existsSync(dirPath)) {
|
|
55
|
+
export async function listMigrationFiles(runtime, directory) {
|
|
56
|
+
const files = await fileSystemOf(runtime);
|
|
57
|
+
const dirPath = migrationDirectory(files, directory);
|
|
58
|
+
if (!(await files.exists(dirPath))) {
|
|
67
59
|
return [];
|
|
68
60
|
}
|
|
69
|
-
return
|
|
70
|
-
.
|
|
71
|
-
.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
61
|
+
return (await files.list(dirPath))
|
|
62
|
+
.map((entry) => entry.name)
|
|
63
|
+
.filter((name) => name.endsWith('.sql') && !name.startsWith('.'))
|
|
64
|
+
.sort((a, b) => leadingVersion(a) - leadingVersion(b));
|
|
65
|
+
}
|
|
66
|
+
/** The numeric prefix of a migration filename ('001-initial-schema.sql' and '001_init.sql' are both 1). */
|
|
67
|
+
function leadingVersion(filename) {
|
|
68
|
+
return Number.parseInt(filename, 10);
|
|
69
|
+
}
|
|
70
|
+
const MigrationFilenameSchema = z.string();
|
|
71
|
+
/** The typed refusal of a migration filename that is not a string with a leading `<digits>-` version. */
|
|
72
|
+
function filenameInvalid(message, details, cause) {
|
|
73
|
+
return new CapabilityError(message, 'INVALID_INPUT', {
|
|
74
|
+
reason: 'migration-filename-invalid',
|
|
75
|
+
retryable: false,
|
|
76
|
+
details,
|
|
77
|
+
cause
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Read a migration filename once: a string, or the typed refusal. Zod's string
|
|
82
|
+
* check throws on a revoked Proxy; that throw is the refusal's cause.
|
|
83
|
+
*/
|
|
84
|
+
function readFilename(filename) {
|
|
85
|
+
let error;
|
|
86
|
+
try {
|
|
87
|
+
const parsed = MigrationFilenameSchema.safeParse(filename);
|
|
88
|
+
if (parsed.success)
|
|
89
|
+
return parsed.data;
|
|
90
|
+
error = parsed.error;
|
|
83
91
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
92
|
+
catch (cause) {
|
|
93
|
+
throw new CapabilityError('Invalid migration filename format: it could not be read', 'INVALID_INPUT', {
|
|
94
|
+
reason: 'migration-filename-invalid',
|
|
95
|
+
retryable: false,
|
|
96
|
+
cause
|
|
97
|
+
});
|
|
88
98
|
}
|
|
89
|
-
|
|
99
|
+
throw filenameInvalid('Invalid migration filename format: not a string', {}, error);
|
|
90
100
|
}
|
|
91
101
|
/**
|
|
92
102
|
* Parse version number from a migration filename
|
|
93
103
|
*
|
|
94
104
|
* @param filename - The SQL filename (e.g., '001-initial-schema.sql')
|
|
95
|
-
* @returns The version number
|
|
105
|
+
* @returns The version number; a filename without a leading `<digits>-`, or
|
|
106
|
+
* whose version is not a safe integer, refuses `INVALID_INPUT
|
|
107
|
+
* migration-filename-invalid`
|
|
96
108
|
*/
|
|
97
109
|
export function parseVersionFromFilename(filename) {
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
110
|
+
const text = readFilename(filename);
|
|
111
|
+
const digits = /^(\d+)-/.exec(text)?.[1];
|
|
112
|
+
const version = digits === undefined ? Number.NaN : Number.parseInt(digits, 10);
|
|
113
|
+
if (!Number.isSafeInteger(version))
|
|
114
|
+
throw filenameInvalid(`Invalid migration filename format: ${text}`, { filename: text });
|
|
115
|
+
return version;
|
|
103
116
|
}
|
|
104
117
|
/**
|
|
105
118
|
* Parse migration name from a filename
|
|
106
119
|
*
|
|
107
120
|
* @param filename - The SQL filename (e.g., '001-initial-schema.sql')
|
|
108
|
-
* @returns The migration name (e.g., 'initial_schema')
|
|
121
|
+
* @returns The migration name (e.g., 'initial_schema'); a filename that is not
|
|
122
|
+
* a string refuses `INVALID_INPUT migration-filename-invalid`
|
|
109
123
|
*/
|
|
110
124
|
export function parseMigrationName(filename) {
|
|
125
|
+
const text = readFilename(filename);
|
|
111
126
|
// Remove version prefix and .sql extension
|
|
112
|
-
const withoutVersion =
|
|
127
|
+
const withoutVersion = text.replace(/^\d+-/, '');
|
|
113
128
|
const withoutExtension = withoutVersion.replace(/\.sql$/, '');
|
|
114
129
|
// Convert hyphens to underscores
|
|
115
130
|
return withoutExtension.replace(/-/g, '_');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-sql.js","sourceRoot":"","sources":["../../src/migrations/load-sql.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"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O,EAAE,EAAE,CAAC,CAAC;IACjD,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC9D,iCAAiC;IACjC,OAAO,gBAAgB,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC"}
|
package/dist/pool.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../src/pool.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,OAAO,EACN,oBAAoB,EAAE,oBAAoB,EAAE,mBAAmB,EAC/D,MAAM,2BAA2B,CAAC"}
|
package/dist/pool.js
ADDED
package/dist/pool.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool.js","sourceRoot":"","sources":["../src/pool.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,OAAO,EACN,oBAAoB,EAAE,oBAAoB,EAAE,mBAAmB,EAC/D,MAAM,2BAA2B,CAAC"}
|
package/dist/schemas/api.d.ts
CHANGED
|
@@ -1,35 +1,60 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { Disposer, RuntimeRef } from '@vibesdotdev/kernel';
|
|
2
|
+
import type { SqliteConnection } from '../driver/sqlite-driver.ts';
|
|
3
|
+
import type { SlowStatementRecorder } from '../core/slow-statement.ts';
|
|
4
|
+
import type { WalCheckpointMode, WalCheckpointOutcome } from '../core/wal-policy.ts';
|
|
5
|
+
/** The connection LocalDB hands out: the host's `localdb/sqlite-driver` connection. */
|
|
6
|
+
export type LocaldbRawDatabase = SqliteConnection;
|
|
7
|
+
import type { Migration, NamespaceDatabaseLocation, RegisterMigrationsOptions, ReplaceMigrationsOptions } from './migrations.ts';
|
|
8
|
+
export * from './migrations.ts';
|
|
9
|
+
export interface DatabaseOptions {
|
|
10
|
+
namespace: string;
|
|
11
|
+
dbPath: string;
|
|
12
|
+
consumer?: string;
|
|
13
|
+
skipMigrations?: boolean;
|
|
14
|
+
usePool?: boolean;
|
|
6
15
|
}
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
export type WalCheckpointTrigger = 'idle' | 'release' | 'close' | 'shutdown';
|
|
17
|
+
/** Physical connection state shared per path; logical migration ownership belongs to the runtime API. */
|
|
18
|
+
export interface PooledConnection {
|
|
19
|
+
db: SqliteConnection;
|
|
20
|
+
slowStatements: SlowStatementRecorder;
|
|
21
|
+
refCount: number;
|
|
22
|
+
lastUsed: number;
|
|
23
|
+
createdAt: number;
|
|
24
|
+
consumer: string;
|
|
25
|
+
readonly holders: Set<RuntimeRef>;
|
|
26
|
+
maintenance?: {
|
|
27
|
+
readonly runtime: RuntimeRef;
|
|
28
|
+
readonly signal: AbortSignal;
|
|
29
|
+
readonly stop: Disposer;
|
|
30
|
+
};
|
|
31
|
+
transactionObservedAt?: number;
|
|
32
|
+
consecutiveCheckpointBusy: number;
|
|
33
|
+
lastCheckpoint?: WalCheckpointOutcome & {
|
|
34
|
+
at: number;
|
|
35
|
+
trigger: WalCheckpointTrigger;
|
|
36
|
+
};
|
|
37
|
+
nextCheckpointMode: WalCheckpointMode;
|
|
38
|
+
nextIdleCheckpointAt: number;
|
|
28
39
|
}
|
|
29
|
-
|
|
40
|
+
import type { LocalDatabase } from '../core/database.ts';
|
|
41
|
+
export type { LocalDatabase };
|
|
42
|
+
/**
|
|
43
|
+
* One managed database. Every call that can report something takes the runtime
|
|
44
|
+
* it serves: that runtime's Logging reports it (C083a), never an ambient one.
|
|
45
|
+
*/
|
|
46
|
+
export interface LocalDatabaseContract {
|
|
30
47
|
initialize(): Promise<void>;
|
|
31
|
-
getDatabase():
|
|
32
|
-
|
|
48
|
+
getDatabase(): SqliteConnection;
|
|
49
|
+
/** Give this instance's connection back, reported on the releasing runtime. */
|
|
50
|
+
close(runtime: RuntimeRef): void;
|
|
51
|
+
/**
|
|
52
|
+
* Check if database is healthy. A health probe answers false, with the
|
|
53
|
+
* reason logged on the probing runtime.
|
|
54
|
+
*/
|
|
55
|
+
healthCheck(runtime: RuntimeRef): boolean;
|
|
56
|
+
/** Get migration status for this database. */
|
|
57
|
+
getMigrationStatus(): DatabaseMigrationStatus;
|
|
33
58
|
}
|
|
34
59
|
export interface ConnectionStats {
|
|
35
60
|
total: number;
|
|
@@ -40,43 +65,92 @@ export interface ConnectionStats {
|
|
|
40
65
|
refCount: number;
|
|
41
66
|
ageMs: number;
|
|
42
67
|
consumer: string;
|
|
68
|
+
/** Whether a live persistent runtime runs this connection's maintenance tick. */
|
|
69
|
+
maintained: boolean;
|
|
70
|
+
/** Runtimes recorded as holding this connection; ended ones are dropped on the next acquisition. */
|
|
71
|
+
holders: number;
|
|
72
|
+
/** Consecutive WAL checkpoints that came back busy or incomplete (D-WAL). */
|
|
73
|
+
consecutiveCheckpointBusy: number;
|
|
74
|
+
/** Most recent observed WAL checkpoint; absent until the first one runs. */
|
|
75
|
+
lastCheckpoint?: {
|
|
76
|
+
at: number;
|
|
77
|
+
trigger: 'idle' | 'release' | 'close' | 'shutdown';
|
|
78
|
+
status: 'complete' | 'busy' | 'not-wal';
|
|
79
|
+
mode: 'TRUNCATE' | 'RESTART';
|
|
80
|
+
busy: number;
|
|
81
|
+
log: number;
|
|
82
|
+
checkpointed: number;
|
|
83
|
+
};
|
|
43
84
|
}>;
|
|
44
85
|
}
|
|
86
|
+
/** A namespace's tracked schema version in one database, and the newest version this build knows. */
|
|
87
|
+
export interface MigrationVersions {
|
|
88
|
+
tracked: number | null;
|
|
89
|
+
current: number;
|
|
90
|
+
}
|
|
91
|
+
/** One registered migration and whether a database has applied it. */
|
|
92
|
+
export interface MigrationApplication {
|
|
93
|
+
version: number;
|
|
94
|
+
name: string;
|
|
95
|
+
applied: boolean;
|
|
96
|
+
}
|
|
97
|
+
/** A namespace's migration state in one database. */
|
|
98
|
+
export interface DatabaseMigrationStatus {
|
|
99
|
+
namespace: string;
|
|
100
|
+
currentVersion: number;
|
|
101
|
+
targetVersion: number;
|
|
102
|
+
pendingMigrations: number;
|
|
103
|
+
migrations: MigrationApplication[];
|
|
104
|
+
}
|
|
105
|
+
/** A registered namespace's target version (per-database state is reported by `getDatabaseStatus`). */
|
|
106
|
+
export interface NamespaceMigrationStatus {
|
|
107
|
+
namespace: string;
|
|
108
|
+
currentVersion: number;
|
|
109
|
+
targetVersion: number;
|
|
110
|
+
pendingMigrations: number;
|
|
111
|
+
}
|
|
45
112
|
export interface MigrationRegistryApi {
|
|
46
|
-
listNamespaces(): string[];
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
version: number;
|
|
55
|
-
name: string;
|
|
56
|
-
applied: boolean;
|
|
57
|
-
}>;
|
|
58
|
-
};
|
|
59
|
-
needsMigration(db: Database, namespace: string): boolean;
|
|
60
|
-
runMigrations(db: Database, namespace: string): Promise<void>;
|
|
61
|
-
getStatus(): Array<{
|
|
62
|
-
namespace: string;
|
|
63
|
-
currentVersion: number;
|
|
64
|
-
targetVersion: number;
|
|
65
|
-
pendingMigrations: number;
|
|
66
|
-
}>;
|
|
113
|
+
listNamespaces(runtime: RuntimeRef): string[];
|
|
114
|
+
getNamespaceLocation(runtime: RuntimeRef, namespace: string): NamespaceDatabaseLocation | undefined;
|
|
115
|
+
getMigrations(runtime: RuntimeRef, namespace: string): Migration[];
|
|
116
|
+
replaceMigrations(runtime: RuntimeRef, namespace: string, migrations: Migration[], options: ReplaceMigrationsOptions): boolean;
|
|
117
|
+
getDatabaseStatus(runtime: RuntimeRef, db: SqliteConnection, namespace: string): DatabaseMigrationStatus;
|
|
118
|
+
needsMigration(runtime: RuntimeRef, db: SqliteConnection, namespace: string): boolean;
|
|
119
|
+
runMigrations(runtime: RuntimeRef, db: SqliteConnection, namespace: string): Promise<void>;
|
|
120
|
+
getStatus(runtime: RuntimeRef): NamespaceMigrationStatus[];
|
|
67
121
|
}
|
|
68
122
|
export interface ConnectionPoolApi {
|
|
123
|
+
getConnection(runtime: RuntimeRef, dbPath: string, consumer?: string): Promise<SqliteConnection>;
|
|
124
|
+
releaseConnection(runtime: RuntimeRef, dbPath: string): void;
|
|
125
|
+
retain(runtime: RuntimeRef, dbPath: string): void;
|
|
126
|
+
closeConnection(runtime: RuntimeRef, dbPath: string, force?: boolean): boolean;
|
|
127
|
+
maintain(runtime: RuntimeRef, now?: number): void;
|
|
69
128
|
getStats(): ConnectionStats;
|
|
70
|
-
closeAll(): void;
|
|
129
|
+
closeAll(runtime: RuntimeRef, retainedPaths?: ReadonlySet<string>): void;
|
|
130
|
+
withDatabasePathLock<T>(dbPath: string, task: () => Promise<T>): Promise<T>;
|
|
131
|
+
assertCanReplaceDatabase(runtime: RuntimeRef, dbPath: string, ownedConnection?: SqliteConnection): void;
|
|
132
|
+
releaseOrphanedConnection(dbPath: string): boolean;
|
|
133
|
+
ownsConnection(dbPath: string, db: SqliteConnection): boolean;
|
|
71
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* The `localdb` manager. Every call that opens, registers, releases or closes
|
|
137
|
+
* takes the runtime it serves first: that runtime's Logging reports the call,
|
|
138
|
+
* and a connection it opens is maintained on its lifecycle when it is
|
|
139
|
+
* persistent.
|
|
140
|
+
*/
|
|
72
141
|
export interface LocaldbApi {
|
|
73
|
-
registerMigrations(namespace: string, migrations: Migration[]): void;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
142
|
+
registerMigrations(runtime: RuntimeRef, namespace: string, migrations: Migration[], options?: RegisterMigrationsOptions): void;
|
|
143
|
+
getNamespaceLocation(namespace: string, runtime?: RuntimeRef): NamespaceDatabaseLocation | undefined;
|
|
144
|
+
replaceMigrations(runtime: RuntimeRef, namespace: string, migrations: Migration[], options: ReplaceMigrationsOptions): boolean;
|
|
145
|
+
getDatabase(runtime: RuntimeRef, namespace: string, dbPath: string, consumer?: string): Promise<LocalDatabase>;
|
|
146
|
+
getRawDatabase(runtime: RuntimeRef, dbPath: string, consumer?: string): Promise<SqliteConnection>;
|
|
147
|
+
releaseDatabase(runtime: RuntimeRef, namespace: string, dbPath: string): Promise<void>;
|
|
148
|
+
/** Archive and rebuild only when the caller exclusively owns the physical database. */
|
|
149
|
+
resetDatabase(runtime: RuntimeRef, namespace: string, dbPath: string, consumer?: string): Promise<LocalDatabase>;
|
|
150
|
+
/** Pool statistics for `runtime`'s pool; a missing runtime is refused `INVALID_INPUT localdb-runtime-required`. */
|
|
151
|
+
getPoolStats(runtime?: RuntimeRef): ConnectionStats;
|
|
152
|
+
getMigrationStatus(runtime?: RuntimeRef): NamespaceMigrationStatus[];
|
|
153
|
+
listNamespaces(runtime?: RuntimeRef): string[];
|
|
154
|
+
closeAll(runtime: RuntimeRef): Promise<void>;
|
|
81
155
|
}
|
|
82
156
|
//# sourceMappingURL=api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/schemas/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/schemas/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MA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U,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C"}
|
package/dist/schemas/api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./migrations.js";
|
|
2
2
|
//# sourceMappingURL=api.js.map
|
package/dist/schemas/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/schemas/api.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/schemas/api.ts"],"names":[],"mappings":"AASA,cAAc,iBAAiB,CAAC"}
|