@mailwoman/sqlite 11.0.0 → 11.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 (68) hide show
  1. package/README.md +1 -1
  2. package/lib/batched.ts +5 -6
  3. package/lib/client.ts +4 -7
  4. package/lib/database-schema.ts +3 -4
  5. package/lib/dialect/config.ts +3 -6
  6. package/lib/dialect.ts +2 -5
  7. package/lib/driver.ts +2 -5
  8. package/lib/index.ts +12 -9
  9. package/lib/introspection.ts +3 -3
  10. package/lib/lookup.ts +6 -6
  11. package/lib/schema-columns.ts +2 -5
  12. package/lib/sealed/build.ts +8 -7
  13. package/lib/sealed/db.ts +99 -18
  14. package/lib/sealed.ts +11 -9
  15. package/out/batched.d.ts +2 -6
  16. package/out/batched.d.ts.map +1 -1
  17. package/out/batched.js +2 -8
  18. package/out/batched.js.map +1 -1
  19. package/out/client.d.ts +2 -7
  20. package/out/client.d.ts.map +1 -1
  21. package/out/client.js +3 -6
  22. package/out/client.js.map +1 -1
  23. package/out/database-schema.d.ts +0 -4
  24. package/out/database-schema.d.ts.map +1 -1
  25. package/out/database-schema.js +2 -7
  26. package/out/database-schema.js.map +1 -1
  27. package/out/dialect/config.d.ts +1 -6
  28. package/out/dialect/config.d.ts.map +1 -1
  29. package/out/dialect/config.js +2 -5
  30. package/out/dialect/config.js.map +1 -1
  31. package/out/dialect.d.ts +0 -5
  32. package/out/dialect.d.ts.map +1 -1
  33. package/out/dialect.js +2 -5
  34. package/out/dialect.js.map +1 -1
  35. package/out/driver.d.ts +0 -5
  36. package/out/driver.d.ts.map +1 -1
  37. package/out/driver.js +2 -5
  38. package/out/driver.js.map +1 -1
  39. package/out/index.d.ts +9 -9
  40. package/out/index.d.ts.map +1 -1
  41. package/out/index.js +11 -9
  42. package/out/index.js.map +1 -1
  43. package/out/introspection.d.ts +0 -3
  44. package/out/introspection.d.ts.map +1 -1
  45. package/out/introspection.js +2 -11
  46. package/out/introspection.js.map +1 -1
  47. package/out/lookup.d.ts +3 -6
  48. package/out/lookup.d.ts.map +1 -1
  49. package/out/lookup.js +2 -9
  50. package/out/lookup.js.map +1 -1
  51. package/out/schema-columns.d.ts +0 -5
  52. package/out/schema-columns.d.ts.map +1 -1
  53. package/out/schema-columns.js +2 -5
  54. package/out/schema-columns.js.map +1 -1
  55. package/out/sealed/build.d.ts +1 -6
  56. package/out/sealed/build.d.ts.map +1 -1
  57. package/out/sealed/build.js +6 -6
  58. package/out/sealed/build.js.map +1 -1
  59. package/out/sealed/db.d.ts +45 -15
  60. package/out/sealed/db.d.ts.map +1 -1
  61. package/out/sealed/db.js +50 -22
  62. package/out/sealed/db.js.map +1 -1
  63. package/out/sealed.d.ts +8 -9
  64. package/out/sealed.d.ts.map +1 -1
  65. package/out/sealed.js +2 -13
  66. package/out/sealed.js.map +1 -1
  67. package/out/tsconfig.test.tsbuildinfo +1 -1
  68. package/package.json +2 -2
package/README.md CHANGED
@@ -44,7 +44,7 @@ const places = await db.selectFrom("places").selectAll().execute()
44
44
 
45
45
  `openBuiltClient` opens read-only by default. Its `{ write: true }` option checks
46
46
  the file's write permissions before opening it and rejects a sealed file with
47
- `SealedArtifactError`. A read-only open does not require that the file has
47
+ `SealedArtifactError`. A read-only open doesn't require that the file has
48
48
  already been sealed.
49
49
 
50
50
  Use `using` even when the factory is asynchronous. The connection's
package/lib/batched.ts CHANGED
@@ -1,10 +1,9 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * Batched bulk-write transactions — the `commit`/`begin` cadence every streaming ingest repeats around its
7
- * raw prepared-statement loop.
5
+ * Batched bulk-write transactions — the `commit`/`begin` cadence every streaming
6
+ * ingest repeats around its raw prepared-statement loop.
8
7
  */
9
8
 
10
9
  /**
package/lib/client.ts CHANGED
@@ -1,8 +1,5 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
6
3
 
7
4
  import {
8
5
  DatabaseSync,
@@ -21,7 +18,7 @@ import { SqliteDialect } from "#dialect"
21
18
  import type { SqliteDialectConfig } from "#dialect/config"
22
19
 
23
20
  /**
24
- * A connection's non-Kysely surface: the statements Kysely does not model, plus ending the connection.
21
+ * A connection's non-Kysely surface: the statements Kysely doesn't model, plus ending the connection.
25
22
  *
26
23
  * Schema-agnostic because Kysely is invariant in `DB`: a parameter typed
27
24
  * `DatabaseClient` would reject every real client.
@@ -84,7 +81,7 @@ export class DatabaseClient<DB = Database> extends Kysely<DB> implements Disposa
84
81
  }
85
82
 
86
83
  /**
87
- * Run a statement Kysely does not model: `pragma`, `vacuum`, `analyze`, `attach`, FTS5 virtual-table DDL.
84
+ * Run a statement Kysely doesn't model: `pragma`, `vacuum`, `analyze`, `attach`, FTS5 virtual-table DDL.
88
85
  */
89
86
  exec(sql: string): void {
90
87
  this.#database.exec(sql)
@@ -1,8 +1,7 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
5
  * Default schema type for {@link DatabaseClient}; consumers supply their own table schema.
7
6
  */
8
7
 
@@ -1,8 +1,5 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
6
3
 
7
4
  import type { DatabaseSync } from "node:sqlite"
8
5
 
@@ -24,7 +21,7 @@ export interface SqliteDialectConfig {
24
21
  /**
25
22
  * Called once when the first query is executed.
26
23
  *
27
- * This is a Kysely specific feature and does not come from the `node:sqlite` module.
24
+ * This is a Kysely specific feature and doesn't come from the `node:sqlite` module.
28
25
  */
29
26
  onCreateConnection?: (connection: DatabaseConnection) => Promise<void>
30
27
  }
package/lib/dialect.ts CHANGED
@@ -1,8 +1,5 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
6
3
 
7
4
  import {
8
5
  SqliteAdapter,
package/lib/driver.ts CHANGED
@@ -1,8 +1,5 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
6
3
 
7
4
  import type { DatabaseSync, StatementSync } from "node:sqlite"
8
5
 
package/lib/index.ts CHANGED
@@ -1,16 +1,19 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
5
  * The one way a Mailwoman SQLite connection comes into being.
7
6
  *
8
- * `DatabaseClient` opens the file; `openBuiltClient` opens a built artifact with the seal check. A caller specifies which
9
- * file and schema. It never constructs the connection, so one database has one schema, one owner and a
10
- * lifetime `using` can end. `new DatabaseSync` appears once in this package and nowhere else in the repository.
7
+ * `DatabaseClient` opens the file; `openBuiltClient` opens a built artifact with the seal check.
8
+ * A caller specifies which file and schema.
9
+ *
10
+ * It never constructs the connection, so one database has one schema, one owner
11
+ * and a lifetime `using` can end.
12
+ * `new DatabaseSync` appears once in this package and nowhere else in the repository.
11
13
  *
12
- * It lives outside `@mailwoman/core` because it needs none of core's 11 MB of parser reference data. Its whole
13
- * dependency set is `kysely`. That is what lets the leaf lookups use it.
14
+ * It lives outside `@mailwoman/core` because it needs none of core's 11 MB of parser reference data.
15
+ * Its whole dependency set is `kysely`.
16
+ * That's what lets the leaf lookups use it.
14
17
  */
15
18
 
16
19
  export * from "#batched"
@@ -1,7 +1,7 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
5
  * @file Questions asked of `sqlite_master`.
6
6
  *
7
7
  * its own subpath on purpose — do not fold this into the package barrel. `@mailwoman/sqlite`'s root export
package/lib/lookup.ts CHANGED
@@ -1,11 +1,11 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
5
  * The shared shape of a reader over one SQLite artifact.
7
- * A lookup either opens the file it is given or adopts a connection already held by the caller.
8
- * and it closes on disposal only what it opened.
6
+ *
7
+ * A lookup either opens the file it is given or adopts a connection already held
8
+ * by the caller. and it closes on disposal only what it opened.
9
9
  */
10
10
 
11
11
  import type { PathBuilderLike } from "path-ts"
@@ -1,8 +1,5 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
6
3
 
7
4
  import type { CreateTableBuilder, Kysely } from "kysely"
8
5
 
@@ -1,14 +1,11 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
6
3
 
7
4
  import { removePathIfPresent } from "@mailwoman/core/fs/writers"
8
5
  import type { PathBuilderLike } from "path-ts"
9
6
 
10
7
  import { DatabaseClient } from "#client"
11
- import { sealDatabase, swapDatabaseIntoPlace } from "#sealed/db"
8
+ import { recoverInterruptedBuilds, sealDatabase, swapDatabaseIntoPlace } from "#sealed/db"
12
9
 
13
10
  export interface BuildSealedArtifactOptions<DB, Streamed, Result> {
14
11
  /**
@@ -27,7 +24,7 @@ export interface BuildSealedArtifactOptions<DB, Streamed, Result> {
27
24
  ingest: (database: DatabaseClient<DB>) => Promise<Streamed | null>
28
25
  /**
29
26
  * The bounded child-process ingest, run while the parent holds no handle: each child opens the
30
- * temp file and appends one chunk at a time, so there is exactly one writer at every instant.
27
+ * temp file and appends one chunk at a time, so there's exactly one writer at every instant.
31
28
  */
32
29
  batched?: (tmpPath: string) => Promise<Streamed>
33
30
  /**
@@ -47,6 +44,10 @@ export async function buildSealedArtifact<DB, Streamed, Result>(
47
44
  ): Promise<Result> {
48
45
  const tmpPath = `${options.out}.tmp-${process.pid}`
49
46
 
47
+ // A killed earlier build's temp file is removed before this one writes its own, and a version
48
+ // it set aside moves back into an empty slot so readers keep a database while this build runs.
49
+ await recoverInterruptedBuilds(options.out)
50
+
50
51
  let streamed: Streamed | null
51
52
 
52
53
  {
package/lib/sealed/db.ts CHANGED
@@ -1,27 +1,32 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * The sealed-artifact invariant: every SQLite DB a build produces is a read-only asset. `sealDatabase`
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 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.
5
+ * The sealed-artifact invariant: every SQLite DB a build produces is a read-only asset.
6
+ *
7
+ * `sealDatabase` is the last step of every builder — checkpoint, freeze the journal, chmod 0444.
8
+ * `openBuiltClient` (`@mailwoman/sqlite/sealed`) is how anything opens a data
9
+ * artifact. a write-mode open of a sealed file throws a descriptive error pointing
10
+ * at the rebuild command instead of a cryptic SQLITE_READONLY.
11
+ *
12
+ * A caller can restore write permission only with manual `chmod u+w`;
13
+ * the program never changes permissions.
11
14
  * Rebuild the artifact to make changes.
12
15
  *
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.
16
+ * `swapDatabaseIntoPlace` is the atomic publish step agents.md specifies in prose
17
+ * ("build it successfully. Move the previous version to a temp directory. Move the new version into place.").
18
+ * It lives here because this module already owns the built-artifact lifecycle.
19
+ *
20
+ * A rule stated in project prose and implemented by several builders belongs in a shared function.
18
21
  */
19
22
 
20
23
  import type { DatabaseSync } from "node:sqlite"
21
24
 
25
+ import { processExists } from "@mailwoman/core/fs/lock"
26
+ import { sortedGlob } from "@mailwoman/core/fs/readers"
22
27
  import { pathExists, statPath } from "@mailwoman/core/fs/readers/stat"
23
28
  import { changeMode, movePath, removePath, removePathIfPresent } from "@mailwoman/core/fs/writers"
24
- import { basename, type PathBuilderLike } from "path-ts"
29
+ import { basename, dirname, type PathBuilderLike } from "path-ts"
25
30
 
26
31
  /**
27
32
  * The one capability {@link assertDatabaseIntegrity} needs.
@@ -104,7 +109,7 @@ export async function sealDatabase(path: PathBuilderLike): Promise<void> {
104
109
  }
105
110
 
106
111
  /**
107
- * Verify a freshly-built database is not corrupt, immediately before it is sealed and published.
112
+ * Verify a freshly-built database isn't corrupt, immediately before it is sealed and published.
108
113
  *
109
114
  * Belongs beside {@link sealDatabase} for the same reason `swapDatabaseIntoPlace` does.
110
115
  * The check is part of the built-artifact lifecycle.
@@ -174,8 +179,7 @@ export async function swapDatabaseIntoPlace(tmpPath: PathBuilderLike, finalPath:
174
179
  await movePath(tmpPathString, finalPathString)
175
180
  } catch (error) {
176
181
  // The prior version is already aside at this point.
177
- // A failed forward rename must not leave the slot empty while a restorable
178
- // artifact sits one rename away.
182
+ // A failed forward rename mustn't leave the slot empty while a restorable artifact sits one rename away.
179
183
  if ((await pathExists(aside)) && !(await pathExists(finalPathString))) {
180
184
  await movePath(aside, finalPathString)
181
185
  }
@@ -188,4 +192,81 @@ export async function swapDatabaseIntoPlace(tmpPath: PathBuilderLike, finalPath:
188
192
  }
189
193
 
190
194
  await removePathIfPresent(aside)
195
+ await recoverInterruptedBuilds(finalPath)
196
+ }
197
+
198
+ /**
199
+ * The suffixes a writer gives the two siblings of a published path, each followed by `-<pid>`.
200
+ */
201
+ export interface BuildSiblingSuffixes {
202
+ /**
203
+ * The sibling a writer fills before the swap, such as `tmp` or `staging`.
204
+ */
205
+ building: string
206
+ /**
207
+ * The sibling the swap moves the published version to, such as `old` or `replaced`.
208
+ */
209
+ setAside: string
210
+ }
211
+
212
+ const SEALED_BUILD_SUFFIXES: BuildSiblingSuffixes = { building: "tmp", setAside: "old" }
213
+
214
+ /**
215
+ * Restores or removes what an interrupted write of `finalPath` left beside it.
216
+ *
217
+ * A sealed build writes `<final>.tmp-<pid>` and, during its swap, moves the
218
+ * published file to `<final>.old-<pid>`.
219
+ * A process killed in between leaves those files on disk under a pid no later build shares.
220
+ *
221
+ * Another writer that follows the same pattern under other names passes its `suffixes`.
222
+ * A sibling may be a file or a directory, and a file's `-wal` and `-shm` sidecars count with it.
223
+ *
224
+ * When the published slot is empty, the newest set-aside sibling of an exited process
225
+ * is the last published version, and it moves back into the slot.
226
+ * Every other sibling of an exited process is removed.
227
+ *
228
+ * A sibling whose process still runs belongs to a write in progress and stays.
229
+ */
230
+ export async function recoverInterruptedBuilds(
231
+ finalPath: PathBuilderLike,
232
+ suffixes: BuildSiblingSuffixes = SEALED_BUILD_SUFFIXES
233
+ ): Promise<void> {
234
+ const finalPathString = finalPath.toString()
235
+ const directory = dirname(finalPathString).toString()
236
+
237
+ if (!(await pathExists(directory))) return
238
+
239
+ const name = basename(finalPathString).toString()
240
+
241
+ const siblingPattern = new RegExp(
242
+ `\\.(${RegExp.escape(suffixes.building)}|${RegExp.escape(suffixes.setAside)})-(\\d+)(-wal|-shm)?$`,
243
+ "u"
244
+ )
245
+
246
+ const siblings = [
247
+ ...(await sortedGlob(directory, `${name}.${suffixes.building}-*`, { onlyFiles: false })),
248
+ ...(await sortedGlob(directory, `${name}.${suffixes.setAside}-*`, { onlyFiles: false })),
249
+ ].flatMap((path) => {
250
+ const match = siblingPattern.exec(path)
251
+
252
+ return match && !processExists(Number(match[2])) ? [{ path, kind: match[1], sidecar: match[3] ?? null }] : []
253
+ })
254
+
255
+ if (!(await pathExists(finalPathString))) {
256
+ const stranded = siblings.filter((sibling) => sibling.kind === suffixes.setAside && !sibling.sidecar)
257
+
258
+ const newest = (
259
+ await Promise.all(
260
+ stranded.map(async (sibling) => ({ ...sibling, mtimeMs: (await statPath(sibling.path)).mtimeMs }))
261
+ )
262
+ ).toSorted((a, b) => b.mtimeMs - a.mtimeMs)[0]
263
+
264
+ if (newest) {
265
+ await movePath(newest.path, finalPathString)
266
+ }
267
+ }
268
+
269
+ for (const sibling of siblings) {
270
+ await removePathIfPresent(sibling.path)
271
+ }
191
272
  }
package/lib/sealed.ts CHANGED
@@ -1,15 +1,17 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
5
  * Open a built data artifact.
7
6
  *
8
- * This is the other half of the sealed-artifact invariant in `../utils/sealed-db.ts`: that module owns the
9
- * filesystem side (seal, unseal-refusal, atomic swap) and stays free of a static `node:sqlite` import, because it
10
- * flows through the `@mailwoman/core/utils` barrel into consumers that cannot resolve one. The open lives here, where
11
- * `DatabaseClient` is already imported and the cost is paid. The open is asynchronous: the write branch awaits the
12
- * seal check against the filesystem before the handle is constructed.
7
+ * This is the other half of the sealed-artifact invariant in `../utils/sealed-db.ts`:
8
+ * that module owns the filesystem side (seal, unseal-refusal, atomic swap)
9
+ * and stays free of a static `node:sqlite` import, because it flows through the
10
+ * `@mailwoman/core/utils` barrel into consumers that cannot resolve one.
11
+ * The open lives here, where `DatabaseClient` is already imported and the cost is paid.
12
+ *
13
+ * The open is asynchronous: the write branch awaits the seal check against the
14
+ * filesystem before the handle is constructed.
13
15
  */
14
16
 
15
17
  import type { PathBuilderLike } from "path-ts"
package/out/batched.d.ts CHANGED
@@ -1,10 +1,6 @@
1
1
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * Batched bulk-write transactions — the `commit`/`begin` cadence every streaming ingest repeats around its
7
- * raw prepared-statement loop.
2
+ * Batched bulk-write transactions — the `commit`/`begin` cadence every streaming
3
+ * ingest repeats around its raw prepared-statement loop.
8
4
  */
9
5
  /**
10
6
  * One open batched transaction over a connection.
@@ -1 +1 @@
1
- {"version":3,"file":"batched.d.ts","sourceRoot":"","sources":["../lib/batched.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;;OAGG;IACH,UAAU,IAAI,OAAO,CAAA;IACrB,MAAM,IAAI,IAAI,CAAA;IACd;;;OAGG;IACH,eAAe,IAAI,IAAI,CAAA;CACvB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC3B,QAAQ,EAAE;IAAE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EACrC,OAAO,EAAE;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,GAChC,kBAAkB,CA6BpB"}
1
+ {"version":3,"file":"batched.d.ts","sourceRoot":"","sources":["../lib/batched.ts"],"names":[],"mappings":"AAGA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;;OAGG;IACH,UAAU,IAAI,OAAO,CAAA;IACrB,MAAM,IAAI,IAAI,CAAA;IACd;;;OAGG;IACH,eAAe,IAAI,IAAI,CAAA;CACvB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC3B,QAAQ,EAAE;IAAE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EACrC,OAAO,EAAE;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,GAChC,kBAAkB,CA6BpB"}
package/out/batched.js CHANGED
@@ -1,11 +1,5 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * Batched bulk-write transactions — the `commit`/`begin` cadence every streaming ingest repeats around its
7
- * raw prepared-statement loop.
8
- */
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
9
3
  /**
10
4
  * Open a transaction that commits and reopens itself every `rowsPerCommit` written rows,
11
5
  * with the batch size left to the caller.
@@ -1 +1 @@
1
- {"version":3,"file":"batched.js","sourceRoot":"","sources":["../lib/batched.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAmBH;;;GAGG;AACH,MAAM,UAAU,YAAY,CAC3B,QAAqC,EACrC,OAAkC;IAElC,IAAI,OAAO,GAAG,CAAC,CAAA;IAEf,QAAQ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AC,CAAA;YAC1B,CAAC;YAAC,MAAM,CAAC;gBACR,6CAA6C;YAC9C,CAAC;QACF,CAAC;KACD,CAAA;AACF,CAAC"}
package/out/client.d.ts CHANGED
@@ -1,15 +1,10 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
6
1
  import { DatabaseSync, type DatabaseSyncOptions, type FunctionOptions, type SQLInputValue, type SQLOutputValue, type StatementSync } from "node:sqlite";
7
2
  import { Kysely, type KyselyConfig } from "kysely";
8
3
  import { type PathBuilderLike } from "path-ts";
9
4
  import type { Database } from "#database-schema";
10
5
  import type { SqliteDialectConfig } from "#dialect/config";
11
6
  /**
12
- * A connection's non-Kysely surface: the statements Kysely does not model, plus ending the connection.
7
+ * A connection's non-Kysely surface: the statements Kysely doesn't model, plus ending the connection.
13
8
  *
14
9
  * Schema-agnostic because Kysely is invariant in `DB`: a parameter typed
15
10
  * `DatabaseClient` would reject every real client.
@@ -29,7 +24,7 @@ export declare class DatabaseClient<DB = Database> extends Kysely<DB> implements
29
24
  constructor(database: DatabaseSync, config?: Partial<KyselyConfig>);
30
25
  constructor(dialectConfig: SqliteDialectConfig, config?: Partial<KyselyConfig>);
31
26
  /**
32
- * Run a statement Kysely does not model: `pragma`, `vacuum`, `analyze`, `attach`, FTS5 virtual-table DDL.
27
+ * Run a statement Kysely doesn't model: `pragma`, `vacuum`, `analyze`, `attach`, FTS5 virtual-table DDL.
33
28
  */
34
29
  exec(sql: string): void;
35
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../lib/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACN,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM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C,YAAY,CAAC,EAAC;IAuC/E;;OAEG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEtB;IAED;;OAEG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAElC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,cAAc,EAAE,KAAK,aAAa,GAAG,IAAI,CAAA;IACxG,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,cAAc,EAAE,KAAK,aAAa,GAAG,IAAI,CAAA;IAe9E;;;;;OAKG;IACH,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAEvB;CACD;AAED;;GAEG;AACH,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA"}
package/out/client.js CHANGED
@@ -1,8 +1,5 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
6
3
  import { DatabaseSync, } from "node:sqlite";
7
4
  import { Kysely } from "kysely";
8
5
  import { PathBuilder } from "path-ts";
@@ -46,7 +43,7 @@ export class DatabaseClient extends Kysely {
46
43
  this.#database = database;
47
44
  }
48
45
  /**
49
- * Run a statement Kysely does not model: `pragma`, `vacuum`, `analyze`, `attach`, FTS5 virtual-table DDL.
46
+ * Run a statement Kysely doesn't model: `pragma`, `vacuum`, `analyze`, `attach`, FTS5 virtual-table DDL.
50
47
  */
51
48
  exec(sql) {
52
49
  this.#database.exec(sql);
package/out/client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../lib/client.ts"],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AAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACzB,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,GAAW;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IACnC,CAAC;IAUD,QAAQ,CACP,IAAY,EACZ,WAA6E,EAC7E,EAAiD;QAEjD,IAAI,OAAO,WAAW,KAAK,UAAU,EAAE,CAAC;YACvC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,CAAA;YAE1C,OAAM;QACP,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,EAAG,CAAC,CAAA;IAChD,CAAC;IAED;;;;;OAKG;IACH,CAAC,MAAM,CAAC,OAAO,CAAC;QACf,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAA;IACjC,CAAC;CACD"}
@@ -1,8 +1,4 @@
1
1
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
2
  * Default schema type for {@link DatabaseClient}; consumers supply their own table schema.
7
3
  */
8
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"database-schema.d.ts","sourceRoot":"","sources":["../lib/database-schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB"}
1
+ {"version":3,"file":"database-schema.d.ts","sourceRoot":"","sources":["../lib/database-schema.ts"],"names":[],"mappings":"AAGA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB"}
@@ -1,9 +1,4 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * Default schema type for {@link DatabaseClient}; consumers supply their own table schema.
7
- */
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
8
3
  export {};
9
4
  //# sourceMappingURL=database-schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"database-schema.js","sourceRoot":"","sources":["../lib/database-schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
1
+ {"version":3,"file":"database-schema.js","sourceRoot":"","sources":["../lib/database-schema.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE"}
@@ -1,8 +1,3 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
6
1
  import type { DatabaseSync } from "node:sqlite";
7
2
  import type { DatabaseConnection } from "kysely";
8
3
  /**
@@ -20,7 +15,7 @@ export interface SqliteDialectConfig {
20
15
  /**
21
16
  * Called once when the first query is executed.
22
17
  *
23
- * This is a Kysely specific feature and does not come from the `node:sqlite` module.
18
+ * This is a Kysely specific feature and doesn't come from the `node:sqlite` module.
24
19
  */
25
20
  onCreateConnection?: (connection: DatabaseConnection) => Promise<void>;
26
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../lib/dialect/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AAEhD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;;;;OAMG;IACH,QAAQ,EAAE,YAAY,GAAG,CAAC,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC,CAAA;IAEtD;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACtE"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../lib/dialect/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AAEhD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;;;;OAMG;IACH,QAAQ,EAAE,YAAY,GAAG,CAAC,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC,CAAA;IAEtD;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACtE"}
@@ -1,7 +1,4 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
6
3
  export {};
7
4
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../lib/dialect/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../lib/dialect/config.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE"}
package/out/dialect.d.ts CHANGED
@@ -1,8 +1,3 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
6
1
  import { type DatabaseIntrospector, type Dialect, type DialectAdapter, type Driver, type Kysely, type QueryCompiler } from "kysely";
7
2
  import type { SqliteDialectConfig } from "#dialect/config";
8
3
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dialect.d.ts","sourceRoot":"","sources":["../lib/dialect.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAIN,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAG1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,aAAc,YAAW,OAAO;IAC5C,SAAS,CAAC,MAAM,EAAE,mBAAmB,CAAA;IAErC,YAAY,MAAM,EAAE,mBAAmB,EAEtC;IAED,YAAY,IAAI,MAAM,CAErB;IAED,mBAAmB,IAAI,aAAa,CAEnC;IAED,aAAa,IAAI,cAAc,CAE9B;IAED,kBAAkB,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,oBAAoB,CAE5D;CACD"}
1
+ {"version":3,"file":"dialect.d.ts","sourceRoot":"","sources":["../lib/dialect.ts"],"names":[],"mappings":"AAGA,OAAO,EAIN,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAG1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,aAAc,YAAW,OAAO;IAC5C,SAAS,CAAC,MAAM,EAAE,mBAAmB,CAAA;IAErC,YAAY,MAAM,EAAE,mBAAmB,EAEtC;IAED,YAAY,IAAI,MAAM,CAErB;IAED,mBAAmB,IAAI,aAAa,CAEnC;IAED,aAAa,IAAI,cAAc,CAE9B;IAED,kBAAkB,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,oBAAoB,CAE5D;CACD"}
package/out/dialect.js CHANGED
@@ -1,8 +1,5 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
6
3
  import { SqliteAdapter, SqliteIntrospector, SqliteQueryCompiler, } from "kysely";
7
4
  import { SqliteDriver } from "#driver";
8
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dialect.js","sourceRoot":"","sources":["../lib/dialect.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACN,aAAa,EACb,kBAAkB,EAClB,mBAAmB,GAOnB,MAAM,QAAQ,CAAA;AAGf,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,aAAa;IACf,MAAM,CAAqB;IAErC,YAAY,MAA2B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;IAC3C,CAAC;IAED,YAAY;QACX,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACrC,CAAC;IAED,mBAAmB;QAClB,OAAO,IAAI,mBAAmB,EAAE,CAAA;IACjC,CAAC;IAED,aAAa;QACZ,OAAO,IAAI,aAAa,EAAE,CAAA;IAC3B,CAAC;IAED,kBAAkB,CAAC,EAAmB;QACrC,OAAO,IAAI,kBAAkB,CAAC,EAAE,CAAC,CAAA;IAClC,CAAC;CACD"}
1
+ {"version":3,"file":"dialect.js","sourceRoot":"","sources":["../lib/dialect.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE,OAAO,EACN,aAAa,EACb,kBAAkB,EAClB,mBAAmB,GAOnB,MAAM,QAAQ,CAAA;AAGf,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,aAAa;IACf,MAAM,CAAqB;IAErC,YAAY,MAA2B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;IAC3C,CAAC;IAED,YAAY;QACX,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACrC,CAAC;IAED,mBAAmB;QAClB,OAAO,IAAI,mBAAmB,EAAE,CAAA;IACjC,CAAC;IAED,aAAa;QACZ,OAAO,IAAI,aAAa,EAAE,CAAA;IAC3B,CAAC;IAED,kBAAkB,CAAC,EAAmB;QACrC,OAAO,IAAI,kBAAkB,CAAC,EAAE,CAAC,CAAA;IAClC,CAAC;CACD"}
package/out/driver.d.ts CHANGED
@@ -1,8 +1,3 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
6
1
  import { type DatabaseConnection, type Driver, type QueryCompiler } from "kysely";
7
2
  import type { SqliteDialectConfig } from "#dialect/config";
8
3
  export declare class SqliteDriver implements Driver {