@mailwoman/sqlite 10.0.0 → 10.1.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.
Files changed (64) hide show
  1. package/lib/batched.ts +7 -13
  2. package/lib/client.ts +15 -42
  3. package/lib/database-schema.ts +2 -20
  4. package/lib/driver.ts +2 -2
  5. package/lib/index.ts +6 -5
  6. package/lib/introspection.ts +15 -8
  7. package/lib/lookup.ts +77 -0
  8. package/lib/schema-columns.ts +18 -19
  9. package/lib/sealed/build.ts +14 -25
  10. package/lib/sealed/db.ts +73 -52
  11. package/lib/{sealed/index.ts → sealed.ts} +13 -8
  12. package/out/batched.d.ts +7 -13
  13. package/out/batched.d.ts.map +1 -1
  14. package/out/batched.js +3 -5
  15. package/out/batched.js.map +1 -1
  16. package/out/client.d.ts +13 -40
  17. package/out/client.d.ts.map +1 -1
  18. package/out/client.js +10 -18
  19. package/out/client.js.map +1 -1
  20. package/out/database-schema.d.ts +2 -20
  21. package/out/database-schema.d.ts.map +1 -1
  22. package/out/database-schema.js +1 -14
  23. package/out/database-schema.js.map +1 -1
  24. package/out/{dialect/index.d.ts → dialect.d.ts} +1 -1
  25. package/out/dialect.d.ts.map +1 -0
  26. package/out/{dialect/index.js → dialect.js} +1 -1
  27. package/out/dialect.js.map +1 -0
  28. package/out/driver.js +2 -2
  29. package/out/driver.js.map +1 -1
  30. package/out/index.d.ts +6 -5
  31. package/out/index.d.ts.map +1 -1
  32. package/out/index.js +6 -5
  33. package/out/index.js.map +1 -1
  34. package/out/introspection.d.ts +15 -8
  35. package/out/introspection.d.ts.map +1 -1
  36. package/out/introspection.js +15 -8
  37. package/out/introspection.js.map +1 -1
  38. package/out/lookup.d.ts +49 -0
  39. package/out/lookup.d.ts.map +1 -0
  40. package/out/lookup.js +55 -0
  41. package/out/lookup.js.map +1 -0
  42. package/out/schema-columns.d.ts +18 -19
  43. package/out/schema-columns.d.ts.map +1 -1
  44. package/out/schema-columns.js +14 -17
  45. package/out/schema-columns.js.map +1 -1
  46. package/out/sealed/build.d.ts +13 -24
  47. package/out/sealed/build.d.ts.map +1 -1
  48. package/out/sealed/build.js +1 -14
  49. package/out/sealed/build.js.map +1 -1
  50. package/out/sealed/db.d.ts +51 -35
  51. package/out/sealed/db.d.ts.map +1 -1
  52. package/out/sealed/db.js +62 -42
  53. package/out/sealed/db.js.map +1 -1
  54. package/out/{sealed/index.d.ts → sealed.d.ts} +13 -9
  55. package/out/sealed.d.ts.map +1 -0
  56. package/out/{sealed/index.js → sealed.js} +11 -8
  57. package/out/sealed.js.map +1 -0
  58. package/out/tsconfig.test.tsbuildinfo +1 -1
  59. package/package.json +15 -104
  60. package/out/dialect/index.d.ts.map +0 -1
  61. package/out/dialect/index.js.map +0 -1
  62. package/out/sealed/index.d.ts.map +0 -1
  63. package/out/sealed/index.js.map +0 -1
  64. /package/lib/{dialect/index.ts → dialect.ts} +0 -0
@@ -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 READ-ONLY asset. `sealDatabase`
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; a write-mode open of a sealed
9
- * file throws a NAMED error pointing at the rebuild command instead of a cryptic SQLITE_READONLY. Unsealing is deliberate and
10
- * manual (`chmod u+w`), never programmatic — rebuild, don't mutate.
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 other half of that invariant — the atomic publish step AGENTS.md
13
- * specifies in prose ("build it successfully, then move the previous version to a temp directory,
14
- * and then move the new version into place"). It lives here because this module already owns the
15
- * built-artifact lifecycle, and because a rule the project states in prose and implements more than
16
- * once in code should be a function.
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. Narrowing to it rather than naming a handle type lets a
21
- * `DatabaseClient` satisfy the parameter with no import and no cast.
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: string);
31
+ constructor(path: PathBuilderLike);
29
32
  }
30
33
  /**
31
- * True when the artifact exists and carries no write bits (the sealed state {@link sealDatabase} leaves).
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: string): Promise<boolean>;
36
+ export declare function isSealed(path: PathBuilderLike): Promise<boolean>;
34
37
  /**
35
- * Finalize a built DB: WAL-checkpoint → `journal_mode = DELETE` → remove `-wal`/`-shm` sidecars → `chmod 0o444`.
36
- * Idempotent. Throws if the checkpoint cannot complete (another writer holds the DB).
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: string): Promise<void>;
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: the check is part of the
43
- * built-artifact lifecycle, and every builder was running it from its own copy. `integrity_check` answers with the
44
- * single row `{ integrity_check: "ok" }` on a healthy file and one row per problem otherwise, so only the first matters
45
- * — a builder that reads the column and compares it to `"ok"` has done the whole check.
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: string): void;
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 instead of letting SQLite answer
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
- * The open itself lives in `@mailwoman/sqlite/sealed` — `openBuiltClient`, which every caller uses. This half stays
55
- * here because it is a filesystem predicate, and because this module reaches `node:sqlite` through
56
- * {@link process.getBuiltinModule} to keep the `@mailwoman/core/utils` barrel free of it.
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: string): Promise<void>;
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`. This moves any
65
- * prior version aside, slots the new one in, then drops the old — the previous file stays intact until the replacement
66
- * is committed, and the `-wal`/`-shm` siblings of BOTH paths are cleared so a stale journal can never be paired with a
67
- * new main file.
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
- * Sealing (`sealDatabase`) happens on the temp file BEFORE the swap: a sealed artifact is what gets published, and 0444
70
- * does not prevent a rename.
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: string, finalPath: string): Promise<void>;
88
+ export declare function swapDatabaseIntoPlace(tmpPath: PathBuilderLike, finalPath: PathBuilderLike): Promise<void>;
73
89
  export {};
74
90
  //# sourceMappingURL=db.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../lib/sealed/db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAM/C;;;GAGG;AACH,KAAK,cAAc,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;AAYnD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC7C,YAAY,IAAI,EAAE,MAAM,EAOvB;CACD;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,GA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Ae,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 READ-ONLY asset. `sealDatabase`
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; a write-mode open of a sealed
9
- * file throws a NAMED error pointing at the rebuild command instead of a cryptic SQLITE_READONLY. Unsealing is deliberate and
10
- * manual (`chmod u+w`), never programmatic — rebuild, don't mutate.
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 other half of that invariant — the atomic publish step AGENTS.md
13
- * specifies in prose ("build it successfully, then move the previous version to a temp directory,
14
- * and then move the new version into place"). It lives here because this module already owns the
15
- * built-artifact lifecycle, and because a rule the project states in prose and implements more than
16
- * once in code should be a function.
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 { pathExists, statPath } from "@mailwoman/core/fs/readers";
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. A static import here would ride the
23
- * `@mailwoman/core/utils` barrel into every consumer, and the docs' plugin loader (which transpiles `docusaurus.config`
24
- * imports) can't resolve `node:sqlite` (CI: "Cannot find module 'sqlite'"). The builtin accessor keeps `node:sqlite`
25
- * out of the static import graph with zero resolve surface.
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 carries no write bits (the sealed state {@link sealDatabase} leaves).
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 = DELETE` → remove `-wal`/`-shm` sidecars → `chmod 0o444`.
48
- * Idempotent. Throws if the checkpoint cannot complete (another writer holds the DB).
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: the check is part of the
78
- * built-artifact lifecycle, and every builder was running it from its own copy. `integrity_check` answers with the
79
- * single row `{ integrity_check: "ok" }` on a healthy file and one row per problem otherwise, so only the first matters
80
- * — a builder that reads the column and compares it to `"ok"` has done the whole check.
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 instead of letting SQLite answer
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
- * The open itself lives in `@mailwoman/sqlite/sealed` — `openBuiltClient`, which every caller uses. This half stays
96
- * here because it is a filesystem predicate, and because this module reaches `node:sqlite` through
97
- * {@link process.getBuiltinModule} to keep the `@mailwoman/core/utils` barrel free of it.
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`. This moves any
109
- * prior version aside, slots the new one in, then drops the old — the previous file stays intact until the replacement
110
- * is committed, and the `-wal`/`-shm` siblings of BOTH paths are cleared so a stale journal can never be paired with a
111
- * new main file.
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
- * Sealing (`sealDatabase`) happens on the temp file BEFORE the swap: a sealed artifact is what gets published, and 0444
114
- * does not prevent a rename.
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 aside = `${finalPath}.old-${process.pid}`;
118
- if (await pathExists(finalPath)) {
119
- await movePath(finalPath, aside);
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(finalPath + sfx);
141
+ await removePathIfPresent(finalPathString + sfx);
123
142
  }
124
143
  try {
125
- await movePath(tmpPath, finalPath);
144
+ await movePath(tmpPathString, finalPathString);
126
145
  }
127
146
  catch (error) {
128
- // The prior version is already aside at this point — a failed forward rename must not leave
129
- // the slot empty while a restorable artifact sits one rename away.
130
- if ((await pathExists(aside)) && !(await pathExists(finalPath))) {
131
- await movePath(aside, finalPath);
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(tmpPath + sfx);
156
+ await removePathIfPresent(tmpPathString + sfx);
137
157
  }
138
158
  await removePathIfPresent(aside);
139
159
  }
@@ -1 +1 @@
1
- {"version":3,"file":"db.js","sourceRoot":"","sources":["../../lib/sealed/db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAClG,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAQlC;;;;;GAKG;AACH,SAAS,MAAM;IACd,OAAO,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAA;AAC/C,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC7C,YAAY,IAAY;QACvB,KAAK,CACJ,GAAG,QAAQ,CAAC,IAAI,CAAC,oFAAoF;YACpG,yEAAyE,CAC1E,CAAA;QAED,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAA;IAClC,CAAC;CACD;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,IAAY;IAC1C,OAAO,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,C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AC;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
- * Opening a built data artifact.
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
- * rides the `@mailwoman/core/utils` barrel into consumers that cannot resolve one. The open lives here, where
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. Read-only by default; `write: true` is for builders working on UNsealed staging, and
18
- * throws `SealedArtifactError` against a sealed file.
18
+ * Open a built data artifact.
19
19
  *
20
- * Together with `new DatabaseClient(path)` this is the whole set of ways a connection comes into being. `DatabaseSync`
21
- * is constructed in exactly one place, inside `DatabaseClient`, so no caller holds a raw handle and no database ends up
22
- * described by two schemas.
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: string, opts?: {
28
+ export declare function openBuiltClient<DB = Database>(path: PathBuilderLike, opts?: {
25
29
  write?: boolean;
26
30
  }): Promise<DatabaseClient<DB>>;
27
- //# sourceMappingURL=index.d.ts.map
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
- * Opening a built data artifact.
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
- * rides the `@mailwoman/core/utils` barrel into consumers that cannot resolve one. The open lives here, where
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. Read-only by default; `write: true` is for builders working on UNsealed staging, and
18
- * throws `SealedArtifactError` against a sealed file.
17
+ * Open a built data artifact.
19
18
  *
20
- * Together with `new DatabaseClient(path)` this is the whole set of ways a connection comes into being. `DatabaseSync`
21
- * is constructed in exactly one place, inside `DatabaseClient`, so no caller holds a raw handle and no database ends up
22
- * described by two schemas.
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=index.js.map
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/@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/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/tagged-tag/package.json","../../../node_modules/terser/package.json","../../../node_modules/tinybench/package.json","../../../node_modules/tinyrainbow/package.json","../../../node_modules/type-fest/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/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/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/type-fest/source/internal/package.json","../../../node_modules/type-fest/source/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"]}