@mailwoman/sqlite 10.0.0 → 10.2.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/lib/batched.ts +7 -13
- package/lib/client.ts +18 -45
- package/lib/database-schema.ts +13 -20
- package/lib/driver.ts +2 -2
- package/lib/index.ts +6 -5
- package/lib/introspection.ts +15 -8
- package/lib/lookup.ts +77 -0
- package/lib/schema-columns.ts +43 -19
- package/lib/sealed/build.ts +18 -29
- package/lib/sealed/db.ts +74 -53
- package/lib/{sealed/index.ts → sealed.ts} +13 -8
- package/out/batched.d.ts +7 -13
- package/out/batched.d.ts.map +1 -1
- package/out/batched.js +3 -5
- package/out/batched.js.map +1 -1
- package/out/client.d.ts +13 -40
- package/out/client.d.ts.map +1 -1
- package/out/client.js +12 -20
- package/out/client.js.map +1 -1
- package/out/database-schema.d.ts +12 -20
- package/out/database-schema.d.ts.map +1 -1
- package/out/database-schema.js +1 -14
- package/out/database-schema.js.map +1 -1
- package/out/{dialect/index.d.ts → dialect.d.ts} +1 -1
- package/out/dialect.d.ts.map +1 -0
- package/out/{dialect/index.js → dialect.js} +1 -1
- package/out/dialect.js.map +1 -0
- package/out/driver.js +2 -2
- package/out/driver.js.map +1 -1
- package/out/index.d.ts +6 -5
- package/out/index.d.ts.map +1 -1
- package/out/index.js +6 -5
- package/out/index.js.map +1 -1
- package/out/introspection.d.ts +15 -8
- package/out/introspection.d.ts.map +1 -1
- package/out/introspection.js +15 -8
- package/out/introspection.js.map +1 -1
- package/out/lookup.d.ts +49 -0
- package/out/lookup.d.ts.map +1 -0
- package/out/lookup.js +55 -0
- package/out/lookup.js.map +1 -0
- package/out/schema-columns.d.ts +42 -19
- package/out/schema-columns.d.ts.map +1 -1
- package/out/schema-columns.js +14 -17
- package/out/schema-columns.js.map +1 -1
- package/out/sealed/build.d.ts +14 -25
- package/out/sealed/build.d.ts.map +1 -1
- package/out/sealed/build.js +2 -15
- package/out/sealed/build.js.map +1 -1
- package/out/sealed/db.d.ts +51 -35
- package/out/sealed/db.d.ts.map +1 -1
- package/out/sealed/db.js +63 -43
- package/out/sealed/db.js.map +1 -1
- package/out/{sealed/index.d.ts → sealed.d.ts} +13 -9
- package/out/sealed.d.ts.map +1 -0
- package/out/{sealed/index.js → sealed.js} +11 -8
- package/out/sealed.js.map +1 -0
- package/out/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +16 -105
- package/out/dialect/index.d.ts.map +0 -1
- package/out/dialect/index.js.map +0 -1
- package/out/sealed/index.d.ts.map +0 -1
- package/out/sealed/index.js.map +0 -1
- /package/lib/{dialect/index.ts → dialect.ts} +0 -0
package/out/sealed/build.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../lib/sealed/build.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../lib/sealed/build.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAGhE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AA+BhE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACxC,OAAyD;IAEzD,MAAM,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,QAAQ,OAAO,CAAC,GAAG,EAAE,CAAA;IAEnD,IAAI,QAAyB,CAAA;IAE7B,CAAC;QACA,MAAM,GAAG,GAAG,IAAI,cAAc,CAAK,OAAO,CAAC,CAAA;QAE3C,IAAI,CAAC;YACJ,GAAG,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAA;YACrC,GAAG,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAA;YAEpC,MAAM,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;YAE/B,QAAQ,GAAG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,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;QAC1C,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAA;QAElC,MAAM,KAAK,CAAA;IACZ,CAAC;AACF,CAAC"}
|
package/out/sealed/db.d.ts
CHANGED
|
@@ -3,72 +3,88 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* The sealed-artifact invariant: every SQLite DB a build produces is a
|
|
6
|
+
* The sealed-artifact invariant: every SQLite DB a build produces is a read-only asset. `sealDatabase`
|
|
7
7
|
* is the last step of every builder — checkpoint, freeze the journal, chmod 0444. `openBuiltClient`
|
|
8
|
-
* (`@mailwoman/sqlite/sealed`) is how anything opens a data artifact
|
|
9
|
-
* file throws a
|
|
10
|
-
* manual
|
|
8
|
+
* (`@mailwoman/sqlite/sealed`) is how anything opens a data artifact. a write-mode open of a sealed
|
|
9
|
+
* file throws a descriptive error pointing at the rebuild command instead of a cryptic SQLITE_READONLY.
|
|
10
|
+
* A caller can restore write permission only with manual `chmod u+w`; the program never changes permissions.
|
|
11
|
+
* Rebuild the artifact to make changes.
|
|
11
12
|
*
|
|
12
|
-
* `swapDatabaseIntoPlace` is the
|
|
13
|
-
* specifies in prose ("build it successfully
|
|
14
|
-
*
|
|
15
|
-
* built-artifact lifecycle
|
|
16
|
-
*
|
|
13
|
+
* `swapDatabaseIntoPlace` is the atomic publish step agents.md
|
|
14
|
+
* specifies in prose ("build it successfully. Move the previous version to a temp directory.
|
|
15
|
+
* Move the new version into place."). It lives here because this module already owns the
|
|
16
|
+
* built-artifact lifecycle. A rule stated in project prose and implemented by several builders belongs in a
|
|
17
|
+
* shared function.
|
|
17
18
|
*/
|
|
18
19
|
import type { DatabaseSync } from "node:sqlite";
|
|
20
|
+
import { type PathBuilderLike } from "path-ts";
|
|
19
21
|
/**
|
|
20
|
-
* The one capability {@link assertDatabaseIntegrity} needs.
|
|
21
|
-
*
|
|
22
|
+
* The one capability {@link assertDatabaseIntegrity} needs.
|
|
23
|
+
*
|
|
24
|
+
* A narrow callback type lets a `DatabaseClient` satisfy the parameter with no import and no cast.
|
|
22
25
|
*/
|
|
23
26
|
type IntegrityProbe = Pick<DatabaseSync, "prepare">;
|
|
24
27
|
/**
|
|
25
28
|
* A write-mode open was attempted on a sealed (0444) data artifact.
|
|
26
29
|
*/
|
|
27
30
|
export declare class SealedArtifactError extends Error {
|
|
28
|
-
constructor(path:
|
|
31
|
+
constructor(path: PathBuilderLike);
|
|
29
32
|
}
|
|
30
33
|
/**
|
|
31
|
-
* True when the artifact exists and
|
|
34
|
+
* True when the artifact exists and has no write bits (the sealed state {@link sealDatabase} leaves).
|
|
32
35
|
*/
|
|
33
|
-
export declare function isSealed(path:
|
|
36
|
+
export declare function isSealed(path: PathBuilderLike): Promise<boolean>;
|
|
34
37
|
/**
|
|
35
|
-
* Finalize a built DB: WAL-checkpoint → `journal_mode =
|
|
36
|
-
*
|
|
38
|
+
* Finalize a built DB: WAL-checkpoint → `journal_mode = delete` → remove
|
|
39
|
+
* `-wal`/`-shm` sidecars → `chmod 0o444`.
|
|
40
|
+
*
|
|
41
|
+
* Idempotent.
|
|
42
|
+
* Throws if the checkpoint cannot complete (another writer holds the DB).
|
|
37
43
|
*/
|
|
38
|
-
export declare function sealDatabase(path:
|
|
44
|
+
export declare function sealDatabase(path: PathBuilderLike): Promise<void>;
|
|
39
45
|
/**
|
|
40
46
|
* Verify a freshly-built database is not corrupt, immediately before it is sealed and published.
|
|
41
47
|
*
|
|
42
|
-
* Belongs beside {@link sealDatabase} for the same reason `swapDatabaseIntoPlace` does
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
48
|
+
* Belongs beside {@link sealDatabase} for the same reason `swapDatabaseIntoPlace` does.
|
|
49
|
+
* The check is part of the built-artifact lifecycle.
|
|
50
|
+
*
|
|
51
|
+
* Every builder previously ran its own copy.
|
|
52
|
+
* `integrity_check` answers with the single row `{ integrity_check: "ok" }` on a healthy file
|
|
53
|
+
* and one row per problem otherwise, so only the first matters.
|
|
54
|
+
*
|
|
55
|
+
* A builder that reads the column and compares it to `"ok"` has done the whole check.
|
|
46
56
|
*
|
|
47
57
|
* @throws When the database reports anything other than `ok`, naming the artifact and what SQLite said.
|
|
48
58
|
*/
|
|
49
|
-
export declare function assertDatabaseIntegrity(db: IntegrityProbe, artifact:
|
|
59
|
+
export declare function assertDatabaseIntegrity(db: IntegrityProbe, artifact: PathBuilderLike): void;
|
|
50
60
|
/**
|
|
51
|
-
* Refuse a write-mode open of a sealed artifact, naming the rebuild command
|
|
52
|
-
* `SQLITE_READONLY`.
|
|
61
|
+
* Refuse a write-mode open of a sealed artifact, naming the rebuild command
|
|
62
|
+
* instead of letting SQLite answer `SQLITE_READONLY`.
|
|
63
|
+
*
|
|
64
|
+
* The open itself lives in `@mailwoman/sqlite/sealed`.
|
|
65
|
+
* `openBuiltClient`, which every caller uses.
|
|
53
66
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
67
|
+
* This half stays here because it is a filesystem predicate.
|
|
68
|
+
* This module reaches `node:sqlite` through {@link process.getBuiltinModule} to
|
|
69
|
+
* keep the `@mailwoman/core/utils` barrel free of it.
|
|
57
70
|
*
|
|
58
71
|
* @throws {SealedArtifactError} When `path` is sealed.
|
|
59
72
|
*/
|
|
60
|
-
export declare function assertUnsealedForWrite(path:
|
|
73
|
+
export declare function assertUnsealedForWrite(path: PathBuilderLike): Promise<void>;
|
|
61
74
|
/**
|
|
62
75
|
* Atomically move a freshly-built database into its published location.
|
|
63
76
|
*
|
|
64
|
-
* The build writes to a temp path, so a mid-build crash never leaves a half-written DB at `finalPath`.
|
|
65
|
-
* prior version aside, slots the new one in, then drops the old
|
|
66
|
-
*
|
|
67
|
-
*
|
|
77
|
+
* The build writes to a temp path, so a mid-build crash never leaves a half-written DB at `finalPath`.
|
|
78
|
+
* This moves any prior version aside, slots the new one in, then drops the old.
|
|
79
|
+
*
|
|
80
|
+
* The previous file stays intact until the replacement is committed.
|
|
81
|
+
* The function clears the `-wal` and `-shm` siblings of both paths, so a stale
|
|
82
|
+
* journal cannot pair with a new main file.
|
|
68
83
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
84
|
+
* The code seals (`sealDatabase`) the temp file before the swap.
|
|
85
|
+
* The published artifact is sealed.
|
|
86
|
+
* Mode 0444 still permits a rename.
|
|
71
87
|
*/
|
|
72
|
-
export declare function swapDatabaseIntoPlace(tmpPath:
|
|
88
|
+
export declare function swapDatabaseIntoPlace(tmpPath: PathBuilderLike, finalPath: PathBuilderLike): Promise<void>;
|
|
73
89
|
export {};
|
|
74
90
|
//# sourceMappingURL=db.d.ts.map
|
package/out/sealed/db.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../lib/sealed/db.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../lib/sealed/db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAI/C,OAAO,EAAY,KAAK,eAAe,EAAE,MAAM,SAAS,CAAA;AAExD;;;;GAIG;AACH,KAAK,cAAc,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;AAenD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC7C,YAAY,IAAI,EAAE,eAAe,EAOhC;CACD;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAEtE;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA8BvE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAO3F;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B/G"}
|
package/out/sealed/db.js
CHANGED
|
@@ -3,26 +3,30 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* The sealed-artifact invariant: every SQLite DB a build produces is a
|
|
6
|
+
* The sealed-artifact invariant: every SQLite DB a build produces is a read-only asset. `sealDatabase`
|
|
7
7
|
* is the last step of every builder — checkpoint, freeze the journal, chmod 0444. `openBuiltClient`
|
|
8
|
-
* (`@mailwoman/sqlite/sealed`) is how anything opens a data artifact
|
|
9
|
-
* file throws a
|
|
10
|
-
* manual
|
|
8
|
+
* (`@mailwoman/sqlite/sealed`) is how anything opens a data artifact. a write-mode open of a sealed
|
|
9
|
+
* file throws a descriptive error pointing at the rebuild command instead of a cryptic SQLITE_READONLY.
|
|
10
|
+
* A caller can restore write permission only with manual `chmod u+w`; the program never changes permissions.
|
|
11
|
+
* Rebuild the artifact to make changes.
|
|
11
12
|
*
|
|
12
|
-
* `swapDatabaseIntoPlace` is the
|
|
13
|
-
* specifies in prose ("build it successfully
|
|
14
|
-
*
|
|
15
|
-
* built-artifact lifecycle
|
|
16
|
-
*
|
|
13
|
+
* `swapDatabaseIntoPlace` is the atomic publish step agents.md
|
|
14
|
+
* specifies in prose ("build it successfully. Move the previous version to a temp directory.
|
|
15
|
+
* Move the new version into place."). It lives here because this module already owns the
|
|
16
|
+
* built-artifact lifecycle. A rule stated in project prose and implemented by several builders belongs in a
|
|
17
|
+
* shared function.
|
|
17
18
|
*/
|
|
18
|
-
import { pathExists, statPath } from "@mailwoman/core/fs/readers";
|
|
19
|
+
import { pathExists, statPath } from "@mailwoman/core/fs/readers/stat";
|
|
19
20
|
import { changeMode, movePath, removePath, removePathIfPresent } from "@mailwoman/core/fs/writers";
|
|
20
21
|
import { basename } from "path-ts";
|
|
21
22
|
/**
|
|
22
|
-
* `node:sqlite` via {@link process.getBuiltinModule} — invisible to bundlers.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* `node:sqlite` via {@link process.getBuiltinModule} — invisible to bundlers.
|
|
24
|
+
*
|
|
25
|
+
* A static import here would ride the `@mailwoman/core/utils` barrel into every consumer.
|
|
26
|
+
* The docs' plugin loader transpiles `docusaurus.config` imports and cannot resolve
|
|
27
|
+
* `node:sqlite` (CI: "Cannot find module 'sqlite'").
|
|
28
|
+
*
|
|
29
|
+
* The builtin accessor keeps `node:sqlite` out of the static import graph with zero resolve surface.
|
|
26
30
|
*/
|
|
27
31
|
function sqlite() {
|
|
28
32
|
return process.getBuiltinModule("node:sqlite");
|
|
@@ -38,14 +42,17 @@ export class SealedArtifactError extends Error {
|
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
/**
|
|
41
|
-
* True when the artifact exists and
|
|
45
|
+
* True when the artifact exists and has no write bits (the sealed state {@link sealDatabase} leaves).
|
|
42
46
|
*/
|
|
43
47
|
export async function isSealed(path) {
|
|
44
48
|
return (await pathExists(path)) && ((await statPath(path)).mode & 0o222) === 0;
|
|
45
49
|
}
|
|
46
50
|
/**
|
|
47
|
-
* Finalize a built DB: WAL-checkpoint → `journal_mode =
|
|
48
|
-
*
|
|
51
|
+
* Finalize a built DB: WAL-checkpoint → `journal_mode = delete` → remove
|
|
52
|
+
* `-wal`/`-shm` sidecars → `chmod 0o444`.
|
|
53
|
+
*
|
|
54
|
+
* Idempotent.
|
|
55
|
+
* Throws if the checkpoint cannot complete (another writer holds the DB).
|
|
49
56
|
*/
|
|
50
57
|
export async function sealDatabase(path) {
|
|
51
58
|
// A previously sealed artifact needs the write bit back for the journal-mode switch.
|
|
@@ -54,7 +61,7 @@ export async function sealDatabase(path) {
|
|
|
54
61
|
}
|
|
55
62
|
let mode;
|
|
56
63
|
{
|
|
57
|
-
using db = new (sqlite().DatabaseSync)(path);
|
|
64
|
+
using db = new (sqlite().DatabaseSync)(path.toString());
|
|
58
65
|
const checkpoint = db.prepare("PRAGMA wal_checkpoint(TRUNCATE)").get();
|
|
59
66
|
if (checkpoint.busy !== 0) {
|
|
60
67
|
throw new Error(`sealDatabase: WAL checkpoint busy on ${path} — close all writers first`);
|
|
@@ -74,10 +81,14 @@ export async function sealDatabase(path) {
|
|
|
74
81
|
/**
|
|
75
82
|
* Verify a freshly-built database is not corrupt, immediately before it is sealed and published.
|
|
76
83
|
*
|
|
77
|
-
* Belongs beside {@link sealDatabase} for the same reason `swapDatabaseIntoPlace` does
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
84
|
+
* Belongs beside {@link sealDatabase} for the same reason `swapDatabaseIntoPlace` does.
|
|
85
|
+
* The check is part of the built-artifact lifecycle.
|
|
86
|
+
*
|
|
87
|
+
* Every builder previously ran its own copy.
|
|
88
|
+
* `integrity_check` answers with the single row `{ integrity_check: "ok" }` on a healthy file
|
|
89
|
+
* and one row per problem otherwise, so only the first matters.
|
|
90
|
+
*
|
|
91
|
+
* A builder that reads the column and compares it to `"ok"` has done the whole check.
|
|
81
92
|
*
|
|
82
93
|
* @throws When the database reports anything other than `ok`, naming the artifact and what SQLite said.
|
|
83
94
|
*/
|
|
@@ -89,12 +100,15 @@ export function assertDatabaseIntegrity(db, artifact) {
|
|
|
89
100
|
}
|
|
90
101
|
}
|
|
91
102
|
/**
|
|
92
|
-
* Refuse a write-mode open of a sealed artifact, naming the rebuild command
|
|
93
|
-
* `SQLITE_READONLY`.
|
|
103
|
+
* Refuse a write-mode open of a sealed artifact, naming the rebuild command
|
|
104
|
+
* instead of letting SQLite answer `SQLITE_READONLY`.
|
|
105
|
+
*
|
|
106
|
+
* The open itself lives in `@mailwoman/sqlite/sealed`.
|
|
107
|
+
* `openBuiltClient`, which every caller uses.
|
|
94
108
|
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
109
|
+
* This half stays here because it is a filesystem predicate.
|
|
110
|
+
* This module reaches `node:sqlite` through {@link process.getBuiltinModule} to
|
|
111
|
+
* keep the `@mailwoman/core/utils` barrel free of it.
|
|
98
112
|
*
|
|
99
113
|
* @throws {SealedArtifactError} When `path` is sealed.
|
|
100
114
|
*/
|
|
@@ -105,35 +119,41 @@ export async function assertUnsealedForWrite(path) {
|
|
|
105
119
|
/**
|
|
106
120
|
* Atomically move a freshly-built database into its published location.
|
|
107
121
|
*
|
|
108
|
-
* The build writes to a temp path, so a mid-build crash never leaves a half-written DB at `finalPath`.
|
|
109
|
-
* prior version aside, slots the new one in, then drops the old
|
|
110
|
-
*
|
|
111
|
-
*
|
|
122
|
+
* The build writes to a temp path, so a mid-build crash never leaves a half-written DB at `finalPath`.
|
|
123
|
+
* This moves any prior version aside, slots the new one in, then drops the old.
|
|
124
|
+
*
|
|
125
|
+
* The previous file stays intact until the replacement is committed.
|
|
126
|
+
* The function clears the `-wal` and `-shm` siblings of both paths, so a stale
|
|
127
|
+
* journal cannot pair with a new main file.
|
|
112
128
|
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
129
|
+
* The code seals (`sealDatabase`) the temp file before the swap.
|
|
130
|
+
* The published artifact is sealed.
|
|
131
|
+
* Mode 0444 still permits a rename.
|
|
115
132
|
*/
|
|
116
133
|
export async function swapDatabaseIntoPlace(tmpPath, finalPath) {
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
134
|
+
const tmpPathString = tmpPath.toString();
|
|
135
|
+
const finalPathString = finalPath.toString();
|
|
136
|
+
const aside = `${finalPathString}.old-${process.pid}`;
|
|
137
|
+
if (await pathExists(finalPathString)) {
|
|
138
|
+
await movePath(finalPathString, aside);
|
|
120
139
|
}
|
|
121
140
|
for (const sfx of ["-wal", "-shm"]) {
|
|
122
|
-
await removePathIfPresent(
|
|
141
|
+
await removePathIfPresent(finalPathString + sfx);
|
|
123
142
|
}
|
|
124
143
|
try {
|
|
125
|
-
await movePath(
|
|
144
|
+
await movePath(tmpPathString, finalPathString);
|
|
126
145
|
}
|
|
127
146
|
catch (error) {
|
|
128
|
-
// The prior version is already aside at this point
|
|
129
|
-
// the slot empty while a restorable
|
|
130
|
-
|
|
131
|
-
|
|
147
|
+
// The prior version is already aside at this point.
|
|
148
|
+
// A failed forward rename must not leave the slot empty while a restorable
|
|
149
|
+
// artifact sits one rename away.
|
|
150
|
+
if ((await pathExists(aside)) && !(await pathExists(finalPathString))) {
|
|
151
|
+
await movePath(aside, finalPathString);
|
|
132
152
|
}
|
|
133
153
|
throw error;
|
|
134
154
|
}
|
|
135
155
|
for (const sfx of ["-wal", "-shm"]) {
|
|
136
|
-
await removePathIfPresent(
|
|
156
|
+
await removePathIfPresent(tmpPathString + sfx);
|
|
137
157
|
}
|
|
138
158
|
await removePathIfPresent(aside);
|
|
139
159
|
}
|
package/out/sealed/db.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.js","sourceRoot":"","sources":["../../lib/sealed/db.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"db.js","sourceRoot":"","sources":["../../lib/sealed/db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAClG,OAAO,EAAE,QAAQ,EAAwB,MAAM,SAAS,CAAA;AASxD;;;;;;;;GAQG;AACH,SAAS,MAAM;IACd,OAAO,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CA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ACvC,MAAM,QAAQ,CAAC,eAAe,EAAE,KAAK,CAAC,CAAA;IACvC,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;QACpC,MAAM,mBAAmB,CAAC,eAAe,GAAG,GAAG,CAAC,CAAA;IACjD,CAAC;IAED,IAAI,CAAC;QACJ,MAAM,QAAQ,CAAC,aAAa,EAAE,eAAe,CAAC,CAAA;IAC/C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,oDAAoD;QACpD,2EAA2E;QAC3E,iCAAiC;QACjC,IAAI,CAAC,MAAM,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,UAAU,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC;YACvE,MAAM,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,CAAA;QACvC,CAAC;QAED,MAAM,KAAK,CAAA;IACZ,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;QACpC,MAAM,mBAAmB,CAAC,aAAa,GAAG,GAAG,CAAC,CAAA;IAC/C,CAAC;IAED,MAAM,mBAAmB,CAAC,KAAK,CAAC,CAAA;AACjC,CAAC"}
|
|
@@ -3,25 +3,29 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Open a built data artifact.
|
|
7
7
|
*
|
|
8
8
|
* This is the other half of the sealed-artifact invariant in `../utils/sealed-db.ts`: that module owns the
|
|
9
9
|
* filesystem side (seal, unseal-refusal, atomic swap) and stays free of a static `node:sqlite` import, because it
|
|
10
|
-
*
|
|
10
|
+
* flows through the `@mailwoman/core/utils` barrel into consumers that cannot resolve one. The open lives here, where
|
|
11
11
|
* `DatabaseClient` is already imported and the cost is paid. The open is asynchronous: the write branch awaits the
|
|
12
12
|
* seal check against the filesystem before the handle is constructed.
|
|
13
13
|
*/
|
|
14
|
+
import type { PathBuilderLike } from "path-ts";
|
|
14
15
|
import { DatabaseClient } from "#client";
|
|
15
16
|
import type { Database } from "#database-schema";
|
|
16
17
|
/**
|
|
17
|
-
* Open a built data artifact.
|
|
18
|
-
* throws `SealedArtifactError` against a sealed file.
|
|
18
|
+
* Open a built data artifact.
|
|
19
19
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* Read-only by default.
|
|
21
|
+
* Builders set `write: true` when working on UNsealed staging.
|
|
22
|
+
* A sealed file raises `SealedArtifactError`.
|
|
23
|
+
*
|
|
24
|
+
* Together with `new DatabaseClient(path)` this is the whole set of ways a connection comes into being.
|
|
25
|
+
* `DatabaseSync` is constructed in exactly one place, inside `DatabaseClient`,
|
|
26
|
+
* so no caller holds a raw handle and no database ends up described by two schemas.
|
|
23
27
|
*/
|
|
24
|
-
export declare function openBuiltClient<DB = Database>(path:
|
|
28
|
+
export declare function openBuiltClient<DB = Database>(path: PathBuilderLike, opts?: {
|
|
25
29
|
write?: boolean;
|
|
26
30
|
}): Promise<DatabaseClient<DB>>;
|
|
27
|
-
//# sourceMappingURL=
|
|
31
|
+
//# sourceMappingURL=sealed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sealed.d.ts","sourceRoot":"","sources":["../lib/sealed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAGhD;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CAAC,EAAE,GAAG,QAAQ,EAClD,IAAI,EAAE,eAAe,EACrB,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAC5B,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAQ7B"}
|
|
@@ -3,23 +3,26 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Open a built data artifact.
|
|
7
7
|
*
|
|
8
8
|
* This is the other half of the sealed-artifact invariant in `../utils/sealed-db.ts`: that module owns the
|
|
9
9
|
* filesystem side (seal, unseal-refusal, atomic swap) and stays free of a static `node:sqlite` import, because it
|
|
10
|
-
*
|
|
10
|
+
* flows through the `@mailwoman/core/utils` barrel into consumers that cannot resolve one. The open lives here, where
|
|
11
11
|
* `DatabaseClient` is already imported and the cost is paid. The open is asynchronous: the write branch awaits the
|
|
12
12
|
* seal check against the filesystem before the handle is constructed.
|
|
13
13
|
*/
|
|
14
14
|
import { DatabaseClient } from "#client";
|
|
15
15
|
import { assertUnsealedForWrite } from "#sealed/db";
|
|
16
16
|
/**
|
|
17
|
-
* Open a built data artifact.
|
|
18
|
-
* throws `SealedArtifactError` against a sealed file.
|
|
17
|
+
* Open a built data artifact.
|
|
19
18
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
19
|
+
* Read-only by default.
|
|
20
|
+
* Builders set `write: true` when working on UNsealed staging.
|
|
21
|
+
* A sealed file raises `SealedArtifactError`.
|
|
22
|
+
*
|
|
23
|
+
* Together with `new DatabaseClient(path)` this is the whole set of ways a connection comes into being.
|
|
24
|
+
* `DatabaseSync` is constructed in exactly one place, inside `DatabaseClient`,
|
|
25
|
+
* so no caller holds a raw handle and no database ends up described by two schemas.
|
|
23
26
|
*/
|
|
24
27
|
export async function openBuiltClient(path, opts = {}) {
|
|
25
28
|
if (opts.write) {
|
|
@@ -28,4 +31,4 @@ export async function openBuiltClient(path, opts = {}) {
|
|
|
28
31
|
}
|
|
29
32
|
return new DatabaseClient(path, { readOnly: true });
|
|
30
33
|
}
|
|
31
|
-
//# sourceMappingURL=
|
|
34
|
+
//# sourceMappingURL=sealed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sealed.js","sourceRoot":"","sources":["../lib/sealed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAEnD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACpC,IAAqB,EACrB,IAAI,GAAwB,EAAE;IAE9B,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAChB,MAAM,sBAAsB,CAAC,IAAI,CAAC,CAAA;QAElC,OAAO,IAAI,cAAc,CAAK,IAAI,CAAC,CAAA;IACpC,CAAC;IAED,OAAO,IAAI,cAAc,CAAK,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;AACxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"7.0.2","root":["../test/unit/client.test.ts","../test/unit/introspection.test.ts","../test/unit/schema-columns.test.ts","../test/unit/sealed-db.test.ts"],"packageJsons":["../../../node_modules/@standard-schema/spec/package.json","../../../node_modules/@types/chai/package.json","../../../node_modules/@types/deep-eql/package.json","../../../node_modules/@types/node/package.json","../../../node_modules/@vitest/browser-playwright/package.json","../../../node_modules/@vitest/coverage-v8/package.json","../../../node_modules/@vitest/expect/package.json","../../../node_modules/@vitest/mocker/package.json","../../../node_modules/@vitest/pretty-format/package.json","../../../node_modules/@vitest/runner/package.json","../../../node_modules/@vitest/snapshot/package.json","../../../node_modules/@vitest/spy/package.json","../../../node_modules/@vitest/utils/package.json","../../../node_modules/assertion-error/package.json","../../../node_modules/chai/package.json","../../../node_modules/deep-eql/package.json","../../../node_modules/esbuild/package.json","../../../node_modules/events/package.json","../../../node_modules/expect-type/package.json","../../../node_modules/jiti/package.json","../../../node_modules/jsdom/package.json","../../../node_modules/kysely/package.json","../../../node_modules/path-ts/package.json","../../../node_modules/punycode/package.json","../../../node_modules/string_decoder/package.json","../../../node_modules/terser/package.json","../../../node_modules/tinybench/package.json","../../../node_modules/tinyrainbow/package.json","../../../node_modules/undici-types/package.json","../../../node_modules/vite/package.json","../../../node_modules/vitest/package.json","../../../node_modules/yaml/package.json","../../core/package.json","../package.json"],"missingPackageJsons":["../../../node_modules/@edge-runtime/vm/package.json","../../../node_modules/@mailwoman/core/fs/readers/package.json","../../../node_modules/@mailwoman/core/fs/temporary/package.json","../../../node_modules/@opentelemetry/api/package.json","../../../node_modules/@standard-schema/spec/dist/package.json","../../../node_modules/@types/assert/package.json","../../../node_modules/@types/assert/strict/package.json","../../../node_modules/@types/async_hooks/package.json","../../../node_modules/@types/buffer/package.json","../../../node_modules/@types/child_process/package.json","../../../node_modules/@types/cluster/package.json","../../../node_modules/@types/console/package.json","../../../node_modules/@types/constants/package.json","../../../node_modules/@types/crypto/package.json","../../../node_modules/@types/dgram/package.json","../../../node_modules/@types/diagnostics_channel/package.json","../../../node_modules/@types/dns/package.json","../../../node_modules/@types/dns/promises/package.json","../../../node_modules/@types/domain/package.json","../../../node_modules/@types/events/package.json","../../../node_modules/@types/fs/package.json","../../../node_modules/@types/fs/promises/package.json","../../../node_modules/@types/http/package.json","../../../node_modules/@types/http2/package.json","../../../node_modules/@types/https/package.json","../../../node_modules/@types/inspector/package.json","../../../node_modules/@types/inspector/promises/package.json","../../../node_modules/@types/module/package.json","../../../node_modules/@types/net/package.json","../../../node_modules/@types/node/assert/package.json","../../../node_modules/@types/node/dns/package.json","../../../node_modules/@types/node/fs/package.json","../../../node_modules/@types/node/inspector/package.json","../../../node_modules/@types/node/path/package.json","../../../node_modules/@types/node/readline/package.json","../../../node_modules/@types/node/stream/package.json","../../../node_modules/@types/node/test/package.json","../../../node_modules/@types/node/timers/package.json","../../../node_modules/@types/node/util/package.json","../../../node_modules/@types/node/web-globals/package.json","../../../node_modules/@types/node/zlib/package.json","../../../node_modules/@types/os/package.json","../../../node_modules/@types/path/package.json","../../../node_modules/@types/path/posix/package.json","../../../node_modules/@types/path/win32/package.json","../../../node_modules/@types/perf_hooks/package.json","../../../node_modules/@types/process/package.json","../../../node_modules/@types/punycode/package.json","../../../node_modules/@types/querystring/package.json","../../../node_modules/@types/readline/package.json","../../../node_modules/@types/readline/promises/package.json","../../../node_modules/@types/repl/package.json","../../../node_modules/@types/stream/consumers/package.json","../../../node_modules/@types/stream/iter/package.json","../../../node_modules/@types/stream/package.json","../../../node_modules/@types/stream/promises/package.json","../../../node_modules/@types/stream/web/package.json","../../../node_modules/@types/string_decoder/package.json","../../../node_modules/@types/timers/package.json","../../../node_modules/@types/timers/promises/package.json","../../../node_modules/@types/tls/package.json","../../../node_modules/@types/trace_events/package.json","../../../node_modules/@types/tty/package.json","../../../node_modules/@types/url/package.json","../../../node_modules/@types/util/package.json","../../../node_modules/@types/util/types/package.json","../../../node_modules/@types/v8/package.json","../../../node_modules/@types/vm/package.json","../../../node_modules/@types/wasi/package.json","../../../node_modules/@types/worker_threads/package.json","../../../node_modules/@types/zlib/package.json","../../../node_modules/@vitejs/devtools/package.json","../../../node_modules/@vitest/browser-preview/package.json","../../../node_modules/@vitest/browser-webdriverio/package.json","../../../node_modules/@vitest/coverage-istanbul/package.json","../../../node_modules/@vitest/expect/dist/package.json","../../../node_modules/@vitest/mocker/dist/package.json","../../../node_modules/@vitest/pretty-format/dist/package.json","../../../node_modules/@vitest/runner/dist/package.json","../../../node_modules/@vitest/runner/utils/package.json","../../../node_modules/@vitest/snapshot/dist/package.json","../../../node_modules/@vitest/spy/dist/package.json","../../../node_modules/@vitest/ui/package.json","../../../node_modules/@vitest/utils/diff/package.json","../../../node_modules/@vitest/utils/display/package.json","../../../node_modules/@vitest/utils/dist/package.json","../../../node_modules/assert/package.json","../../../node_modules/assert/strict/package.json","../../../node_modules/async_hooks/package.json","../../../node_modules/buffer/package.json","../../../node_modules/child_process/package.json","../../../node_modules/cluster/package.json","../../../node_modules/console/package.json","../../../node_modules/constants/package.json","../../../node_modules/crypto/package.json","../../../node_modules/dgram/package.json","../../../node_modules/diagnostics_channel/package.json","../../../node_modules/dns/package.json","../../../node_modules/dns/promises/package.json","../../../node_modules/domain/package.json","../../../node_modules/expect-type/dist/package.json","../../../node_modules/fs/package.json","../../../node_modules/fs/promises/package.json","../../../node_modules/happy-dom/package.json","../../../node_modules/http/package.json","../../../node_modules/http2/package.json","../../../node_modules/https/package.json","../../../node_modules/inspector/package.json","../../../node_modules/inspector/promises/package.json","../../../node_modules/kysely/dist/dialect/mssql/package.json","../../../node_modules/kysely/dist/dialect/mysql/package.json","../../../node_modules/kysely/dist/dialect/package.json","../../../node_modules/kysely/dist/dialect/pglite/package.json","../../../node_modules/kysely/dist/dialect/postgres/package.json","../../../node_modules/kysely/dist/dialect/sqlite/package.json","../../../node_modules/kysely/dist/driver/package.json","../../../node_modules/kysely/dist/dynamic/package.json","../../../node_modules/kysely/dist/expression/package.json","../../../node_modules/kysely/dist/operation-node/package.json","../../../node_modules/kysely/dist/package.json","../../../node_modules/kysely/dist/parser/package.json","../../../node_modules/kysely/dist/plugin/camel-case/package.json","../../../node_modules/kysely/dist/plugin/deduplicate-joins/package.json","../../../node_modules/kysely/dist/plugin/handle-empty-in-lists/package.json","../../../node_modules/kysely/dist/plugin/package.json","../../../node_modules/kysely/dist/plugin/parse-json-results/package.json","../../../node_modules/kysely/dist/plugin/safe-null-comparison/package.json","../../../node_modules/kysely/dist/plugin/with-schema/package.json","../../../node_modules/kysely/dist/query-builder/package.json","../../../node_modules/kysely/dist/query-compiler/package.json","../../../node_modules/kysely/dist/query-executor/package.json","../../../node_modules/kysely/dist/raw-builder/package.json","../../../node_modules/kysely/dist/schema/package.json","../../../node_modules/kysely/dist/util/package.json","../../../node_modules/less/package.json","../../../node_modules/module/package.json","../../../node_modules/msw/package.json","../../../node_modules/net/package.json","../../../node_modules/os/package.json","../../../node_modules/path-ts/out/lib/package.json","../../../node_modules/path-ts/out/package.json","../../../node_modules/path/package.json","../../../node_modules/path/posix/package.json","../../../node_modules/path/win32/package.json","../../../node_modules/perf_hooks/package.json","../../../node_modules/process/package.json","../../../node_modules/querystring/package.json","../../../node_modules/readline/package.json","../../../node_modules/readline/promises/package.json","../../../node_modules/repl/package.json","../../../node_modules/sass-embedded/package.json","../../../node_modules/sass/package.json","../../../node_modules/stream/consumers/package.json","../../../node_modules/stream/iter/package.json","../../../node_modules/stream/package.json","../../../node_modules/stream/promises/package.json","../../../node_modules/stream/web/package.json","../../../node_modules/stylus/package.json","../../../node_modules/sugarss/package.json","../../../node_modules/timers/package.json","../../../node_modules/timers/promises/package.json","../../../node_modules/tinybench/dist/package.json","../../../node_modules/tinyrainbow/dist/package.json","../../../node_modules/tls/package.json","../../../node_modules/trace_events/package.json","../../../node_modules/tsx/package.json","../../../node_modules/tty/package.json","../../../node_modules/url/package.json","../../../node_modules/util/package.json","../../../node_modules/util/types/package.json","../../../node_modules/v8/package.json","../../../node_modules/vite/dist/node/chunks/package.json","../../../node_modules/vite/dist/node/package.json","../../../node_modules/vite/dist/package.json","../../../node_modules/vite/module-runner/package.json","../../../node_modules/vite/types/package.json","../../../node_modules/vitest/dist/chunks/package.json","../../../node_modules/vitest/dist/package.json","../../../node_modules/vm/package.json","../../../node_modules/wasi/package.json","../../../node_modules/worker_threads/package.json","../../../node_modules/zlib/package.json"]}
|
|
1
|
+
{"version":"7.0.2","root":["../lib/client.test.ts","../lib/introspection.test.ts","../lib/lookup.test.ts","../lib/schema-columns.test.ts","../lib/sealed/sealed-db.test.ts"],"packageJsons":["../../../node_modules/@types/chai/package.json","../../../node_modules/@types/deep-eql/package.json","../../../node_modules/@types/node/package.json","../../../node_modules/@vitest/browser-playwright/package.json","../../../node_modules/@vitest/coverage-v8/package.json","../../../node_modules/@vitest/mocker/package.json","../../../node_modules/@vitest/ui/package.json","../../../node_modules/assertion-error/package.json","../../../node_modules/buffer/package.json","../../../node_modules/chai/package.json","../../../node_modules/deep-eql/package.json","../../../node_modules/esbuild/package.json","../../../node_modules/events/package.json","../../../node_modules/expect-type/package.json","../../../node_modules/jiti/package.json","../../../node_modules/jsdom/package.json","../../../node_modules/kysely/package.json","../../../node_modules/path-ts/package.json","../../../node_modules/punycode/package.json","../../../node_modules/string_decoder/package.json","../../../node_modules/terser/package.json","../../../node_modules/tinybench/package.json","../../../node_modules/undici-types/package.json","../../../node_modules/vite/package.json","../../../node_modules/vitest/package.json","../../../node_modules/yaml/package.json","../../core/package.json","../package.json"],"missingPackageJsons":["../../../node_modules/@edge-runtime/vm/package.json","../../../node_modules/@mailwoman/core/fs/readers/stat/package.json","../../../node_modules/@mailwoman/core/fs/temporary/package.json","../../../node_modules/@opentelemetry/api/package.json","../../../node_modules/@types/assert/package.json","../../../node_modules/@types/assert/strict/package.json","../../../node_modules/@types/async_hooks/package.json","../../../node_modules/@types/child_process/package.json","../../../node_modules/@types/cluster/package.json","../../../node_modules/@types/console/package.json","../../../node_modules/@types/constants/package.json","../../../node_modules/@types/crypto/package.json","../../../node_modules/@types/dgram/package.json","../../../node_modules/@types/diagnostics_channel/package.json","../../../node_modules/@types/dns/package.json","../../../node_modules/@types/dns/promises/package.json","../../../node_modules/@types/domain/package.json","../../../node_modules/@types/events/package.json","../../../node_modules/@types/fs/package.json","../../../node_modules/@types/fs/promises/package.json","../../../node_modules/@types/http/package.json","../../../node_modules/@types/http2/package.json","../../../node_modules/@types/https/package.json","../../../node_modules/@types/inspector/package.json","../../../node_modules/@types/inspector/promises/package.json","../../../node_modules/@types/module/package.json","../../../node_modules/@types/net/package.json","../../../node_modules/@types/node/assert/package.json","../../../node_modules/@types/node/dns/package.json","../../../node_modules/@types/node/fs/package.json","../../../node_modules/@types/node/inspector/package.json","../../../node_modules/@types/node/path/package.json","../../../node_modules/@types/node/readline/package.json","../../../node_modules/@types/node/stream/package.json","../../../node_modules/@types/node/test/package.json","../../../node_modules/@types/node/timers/package.json","../../../node_modules/@types/node/util/package.json","../../../node_modules/@types/node/web-globals/package.json","../../../node_modules/@types/node/zlib/package.json","../../../node_modules/@types/os/package.json","../../../node_modules/@types/path/package.json","../../../node_modules/@types/path/posix/package.json","../../../node_modules/@types/path/win32/package.json","../../../node_modules/@types/perf_hooks/package.json","../../../node_modules/@types/process/package.json","../../../node_modules/@types/punycode/package.json","../../../node_modules/@types/querystring/package.json","../../../node_modules/@types/readline/package.json","../../../node_modules/@types/readline/promises/package.json","../../../node_modules/@types/repl/package.json","../../../node_modules/@types/stream/consumers/package.json","../../../node_modules/@types/stream/iter/package.json","../../../node_modules/@types/stream/package.json","../../../node_modules/@types/stream/promises/package.json","../../../node_modules/@types/stream/web/package.json","../../../node_modules/@types/string_decoder/package.json","../../../node_modules/@types/timers/package.json","../../../node_modules/@types/timers/promises/package.json","../../../node_modules/@types/tls/package.json","../../../node_modules/@types/trace_events/package.json","../../../node_modules/@types/tty/package.json","../../../node_modules/@types/url/package.json","../../../node_modules/@types/util/package.json","../../../node_modules/@types/util/types/package.json","../../../node_modules/@types/v8/package.json","../../../node_modules/@types/vm/package.json","../../../node_modules/@types/wasi/package.json","../../../node_modules/@types/worker_threads/package.json","../../../node_modules/@types/zlib/package.json","../../../node_modules/@vitejs/devtools/package.json","../../../node_modules/@vitest/browser-preview/package.json","../../../node_modules/@vitest/browser-webdriverio/package.json","../../../node_modules/@vitest/coverage-istanbul/package.json","../../../node_modules/@vitest/mocker/dist/package.json","../../../node_modules/assert/package.json","../../../node_modules/assert/strict/package.json","../../../node_modules/async_hooks/package.json","../../../node_modules/child_process/package.json","../../../node_modules/cluster/package.json","../../../node_modules/console/package.json","../../../node_modules/constants/package.json","../../../node_modules/crypto/package.json","../../../node_modules/dgram/package.json","../../../node_modules/diagnostics_channel/package.json","../../../node_modules/dns/package.json","../../../node_modules/dns/promises/package.json","../../../node_modules/domain/package.json","../../../node_modules/expect-type/dist/package.json","../../../node_modules/fs/package.json","../../../node_modules/fs/promises/package.json","../../../node_modules/happy-dom/package.json","../../../node_modules/http/package.json","../../../node_modules/http2/package.json","../../../node_modules/https/package.json","../../../node_modules/inspector/package.json","../../../node_modules/inspector/promises/package.json","../../../node_modules/kysely/dist/dialect/mssql/package.json","../../../node_modules/kysely/dist/dialect/mysql/package.json","../../../node_modules/kysely/dist/dialect/package.json","../../../node_modules/kysely/dist/dialect/pglite/package.json","../../../node_modules/kysely/dist/dialect/postgres/package.json","../../../node_modules/kysely/dist/dialect/sqlite/package.json","../../../node_modules/kysely/dist/driver/package.json","../../../node_modules/kysely/dist/dynamic/package.json","../../../node_modules/kysely/dist/expression/package.json","../../../node_modules/kysely/dist/operation-node/package.json","../../../node_modules/kysely/dist/package.json","../../../node_modules/kysely/dist/parser/package.json","../../../node_modules/kysely/dist/plugin/camel-case/package.json","../../../node_modules/kysely/dist/plugin/deduplicate-joins/package.json","../../../node_modules/kysely/dist/plugin/handle-empty-in-lists/package.json","../../../node_modules/kysely/dist/plugin/package.json","../../../node_modules/kysely/dist/plugin/parse-json-results/package.json","../../../node_modules/kysely/dist/plugin/safe-null-comparison/package.json","../../../node_modules/kysely/dist/plugin/with-schema/package.json","../../../node_modules/kysely/dist/query-builder/package.json","../../../node_modules/kysely/dist/query-compiler/package.json","../../../node_modules/kysely/dist/query-executor/package.json","../../../node_modules/kysely/dist/raw-builder/package.json","../../../node_modules/kysely/dist/schema/package.json","../../../node_modules/kysely/dist/util/package.json","../../../node_modules/less/package.json","../../../node_modules/module/package.json","../../../node_modules/msw/package.json","../../../node_modules/net/package.json","../../../node_modules/os/package.json","../../../node_modules/path-ts/out/lib/package.json","../../../node_modules/path-ts/out/package.json","../../../node_modules/path/package.json","../../../node_modules/path/posix/package.json","../../../node_modules/path/win32/package.json","../../../node_modules/perf_hooks/package.json","../../../node_modules/process/package.json","../../../node_modules/querystring/package.json","../../../node_modules/readline/package.json","../../../node_modules/readline/promises/package.json","../../../node_modules/repl/package.json","../../../node_modules/sass-embedded/package.json","../../../node_modules/sass/package.json","../../../node_modules/stream/consumers/package.json","../../../node_modules/stream/iter/package.json","../../../node_modules/stream/package.json","../../../node_modules/stream/promises/package.json","../../../node_modules/stream/web/package.json","../../../node_modules/stylus/package.json","../../../node_modules/sugarss/package.json","../../../node_modules/timers/package.json","../../../node_modules/timers/promises/package.json","../../../node_modules/tinybench/dist/package.json","../../../node_modules/tls/package.json","../../../node_modules/trace_events/package.json","../../../node_modules/tsx/package.json","../../../node_modules/tty/package.json","../../../node_modules/url/package.json","../../../node_modules/util/package.json","../../../node_modules/util/types/package.json","../../../node_modules/v8/package.json","../../../node_modules/vite/dist/node/chunks/package.json","../../../node_modules/vite/dist/node/package.json","../../../node_modules/vite/dist/package.json","../../../node_modules/vite/module-runner/package.json","../../../node_modules/vite/types/package.json","../../../node_modules/vitest/dist/chunks/package.json","../../../node_modules/vitest/dist/package.json","../../../node_modules/vitest/node_modules/@vitest/mocker/package.json","../../../node_modules/vitest/node_modules/chai/package.json","../../../node_modules/vitest/node_modules/expect-type/package.json","../../../node_modules/vitest/node_modules/tinybench/package.json","../../../node_modules/vitest/node_modules/vite/module-runner/package.json","../../../node_modules/vitest/node_modules/vite/package.json","../../../node_modules/vm/package.json","../../../node_modules/wasi/package.json","../../../node_modules/worker_threads/package.json","../../../node_modules/zlib/package.json"]}
|