@mailwoman/sqlite 11.0.0 → 11.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/README.md +2 -2
- package/lib/batched.ts +5 -6
- package/lib/client.ts +4 -7
- package/lib/database-schema.ts +3 -4
- package/lib/dialect/config.ts +3 -6
- package/lib/dialect.ts +2 -5
- package/lib/driver.ts +2 -5
- package/lib/index.ts +12 -9
- package/lib/introspection.ts +3 -3
- package/lib/lookup.ts +6 -6
- package/lib/schema-columns.ts +2 -5
- package/lib/sealed/build.ts +13 -9
- package/lib/sealed/db.ts +99 -18
- package/lib/sealed/digest.ts +211 -0
- package/lib/sealed.ts +11 -9
- package/out/batched.d.ts +2 -6
- package/out/batched.d.ts.map +1 -1
- package/out/batched.js +2 -8
- package/out/batched.js.map +1 -1
- package/out/client.d.ts +2 -7
- package/out/client.d.ts.map +1 -1
- package/out/client.js +3 -6
- package/out/client.js.map +1 -1
- package/out/database-schema.d.ts +0 -4
- package/out/database-schema.d.ts.map +1 -1
- package/out/database-schema.js +2 -7
- package/out/database-schema.js.map +1 -1
- package/out/dialect/config.d.ts +1 -6
- package/out/dialect/config.d.ts.map +1 -1
- package/out/dialect/config.js +2 -5
- package/out/dialect/config.js.map +1 -1
- package/out/dialect.d.ts +0 -5
- package/out/dialect.d.ts.map +1 -1
- package/out/dialect.js +2 -5
- package/out/dialect.js.map +1 -1
- package/out/driver.d.ts +0 -5
- package/out/driver.d.ts.map +1 -1
- package/out/driver.js +2 -5
- package/out/driver.js.map +1 -1
- package/out/index.d.ts +9 -9
- package/out/index.d.ts.map +1 -1
- package/out/index.js +11 -9
- package/out/index.js.map +1 -1
- package/out/introspection.d.ts +0 -3
- package/out/introspection.d.ts.map +1 -1
- package/out/introspection.js +2 -11
- package/out/introspection.js.map +1 -1
- package/out/lookup.d.ts +3 -6
- package/out/lookup.d.ts.map +1 -1
- package/out/lookup.js +2 -9
- package/out/lookup.js.map +1 -1
- package/out/schema-columns.d.ts +0 -5
- package/out/schema-columns.d.ts.map +1 -1
- package/out/schema-columns.js +2 -5
- package/out/schema-columns.js.map +1 -1
- package/out/sealed/build.d.ts +2 -7
- package/out/sealed/build.d.ts.map +1 -1
- package/out/sealed/build.js +10 -7
- package/out/sealed/build.js.map +1 -1
- package/out/sealed/db.d.ts +45 -15
- package/out/sealed/db.d.ts.map +1 -1
- package/out/sealed/db.js +50 -22
- package/out/sealed/db.js.map +1 -1
- package/out/sealed/digest.d.ts +53 -0
- package/out/sealed/digest.d.ts.map +1 -0
- package/out/sealed/digest.js +122 -0
- package/out/sealed/digest.js.map +1 -0
- package/out/sealed.d.ts +8 -9
- package/out/sealed.d.ts.map +1 -1
- package/out/sealed.js +2 -13
- package/out/sealed.js.map +1 -1
- package/out/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +3 -3
package/out/sealed/db.js
CHANGED
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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.
|
|
11
|
-
* Rebuild the artifact to make changes.
|
|
12
|
-
*
|
|
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.
|
|
18
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
import { processExists } from "@mailwoman/core/fs/lock";
|
|
4
|
+
import { sortedGlob } from "@mailwoman/core/fs/readers";
|
|
19
5
|
import { pathExists, statPath } from "@mailwoman/core/fs/readers/stat";
|
|
20
6
|
import { changeMode, movePath, removePath, removePathIfPresent } from "@mailwoman/core/fs/writers";
|
|
21
|
-
import { basename } from "path-ts";
|
|
7
|
+
import { basename, dirname } from "path-ts";
|
|
22
8
|
/**
|
|
23
9
|
* `node:sqlite` via {@link process.getBuiltinModule} — invisible to bundlers.
|
|
24
10
|
*
|
|
@@ -79,7 +65,7 @@ export async function sealDatabase(path) {
|
|
|
79
65
|
await changeMode(path, 0o444);
|
|
80
66
|
}
|
|
81
67
|
/**
|
|
82
|
-
* Verify a freshly-built database
|
|
68
|
+
* Verify a freshly-built database isn't corrupt, immediately before it is sealed and published.
|
|
83
69
|
*
|
|
84
70
|
* Belongs beside {@link sealDatabase} for the same reason `swapDatabaseIntoPlace` does.
|
|
85
71
|
* The check is part of the built-artifact lifecycle.
|
|
@@ -145,8 +131,7 @@ export async function swapDatabaseIntoPlace(tmpPath, finalPath) {
|
|
|
145
131
|
}
|
|
146
132
|
catch (error) {
|
|
147
133
|
// The prior version is already aside at this point.
|
|
148
|
-
// A failed forward rename
|
|
149
|
-
// artifact sits one rename away.
|
|
134
|
+
// A failed forward rename mustn't leave the slot empty while a restorable artifact sits one rename away.
|
|
150
135
|
if ((await pathExists(aside)) && !(await pathExists(finalPathString))) {
|
|
151
136
|
await movePath(aside, finalPathString);
|
|
152
137
|
}
|
|
@@ -156,5 +141,48 @@ export async function swapDatabaseIntoPlace(tmpPath, finalPath) {
|
|
|
156
141
|
await removePathIfPresent(tmpPathString + sfx);
|
|
157
142
|
}
|
|
158
143
|
await removePathIfPresent(aside);
|
|
144
|
+
await recoverInterruptedBuilds(finalPath);
|
|
145
|
+
}
|
|
146
|
+
const SEALED_BUILD_SUFFIXES = { building: "tmp", setAside: "old" };
|
|
147
|
+
/**
|
|
148
|
+
* Restores or removes what an interrupted write of `finalPath` left beside it.
|
|
149
|
+
*
|
|
150
|
+
* A sealed build writes `<final>.tmp-<pid>` and, during its swap, moves the
|
|
151
|
+
* published file to `<final>.old-<pid>`.
|
|
152
|
+
* A process killed in between leaves those files on disk under a pid no later build shares.
|
|
153
|
+
*
|
|
154
|
+
* Another writer that follows the same pattern under other names passes its `suffixes`.
|
|
155
|
+
* A sibling may be a file or a directory, and a file's `-wal` and `-shm` sidecars count with it.
|
|
156
|
+
*
|
|
157
|
+
* When the published slot is empty, the newest set-aside sibling of an exited process
|
|
158
|
+
* is the last published version, and it moves back into the slot.
|
|
159
|
+
* Every other sibling of an exited process is removed.
|
|
160
|
+
*
|
|
161
|
+
* A sibling whose process still runs belongs to a write in progress and stays.
|
|
162
|
+
*/
|
|
163
|
+
export async function recoverInterruptedBuilds(finalPath, suffixes = SEALED_BUILD_SUFFIXES) {
|
|
164
|
+
const finalPathString = finalPath.toString();
|
|
165
|
+
const directory = dirname(finalPathString).toString();
|
|
166
|
+
if (!(await pathExists(directory)))
|
|
167
|
+
return;
|
|
168
|
+
const name = basename(finalPathString).toString();
|
|
169
|
+
const siblingPattern = new RegExp(`\\.(${RegExp.escape(suffixes.building)}|${RegExp.escape(suffixes.setAside)})-(\\d+)(-wal|-shm)?$`, "u");
|
|
170
|
+
const siblings = [
|
|
171
|
+
...(await sortedGlob(directory, `${name}.${suffixes.building}-*`, { onlyFiles: false })),
|
|
172
|
+
...(await sortedGlob(directory, `${name}.${suffixes.setAside}-*`, { onlyFiles: false })),
|
|
173
|
+
].flatMap((path) => {
|
|
174
|
+
const match = siblingPattern.exec(path);
|
|
175
|
+
return match && !processExists(Number(match[2])) ? [{ path, kind: match[1], sidecar: match[3] ?? null }] : [];
|
|
176
|
+
});
|
|
177
|
+
if (!(await pathExists(finalPathString))) {
|
|
178
|
+
const stranded = siblings.filter((sibling) => sibling.kind === suffixes.setAside && !sibling.sidecar);
|
|
179
|
+
const newest = (await Promise.all(stranded.map(async (sibling) => ({ ...sibling, mtimeMs: (await statPath(sibling.path)).mtimeMs })))).toSorted((a, b) => b.mtimeMs - a.mtimeMs)[0];
|
|
180
|
+
if (newest) {
|
|
181
|
+
await movePath(newest.path, finalPathString);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
for (const sibling of siblings) {
|
|
185
|
+
await removePathIfPresent(sibling.path);
|
|
186
|
+
}
|
|
159
187
|
}
|
|
160
188
|
//# sourceMappingURL=db.js.map
|
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,kEAAkE;AAClE,kEAAkE;AAuBlE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,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,EAAE,OAAO,EAAwB,MAAM,SAAS,CAAA;AASjE;;;;;;;;GAQG;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,IAAqB;QAChC,KAAK,CACJ,GAAG,QAAQ,CAAC,IAAI,CAAC,oFAAoF;YACpG,yEAAyE,CAC1E,CAAA;QAED,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAA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AC,CAClG,CACD,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;QAE9C,IAAI,MAAM,EAAE,CAAC;YACZ,MAAM,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,CAAA;QAC7C,CAAC;IACF,CAAC;IAED,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAChC,MAAM,mBAAmB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACxC,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { DatabaseClient } from "#client";
|
|
2
|
+
/**
|
|
3
|
+
* The columns a build writes from its own clock or checkout, left out of every digest by default.
|
|
4
|
+
*/
|
|
5
|
+
export declare const BUILD_STAMP_COLUMNS: Readonly<Record<string, readonly string[]>>;
|
|
6
|
+
/**
|
|
7
|
+
* What a content digest leaves out, and how it splits a table by country.
|
|
8
|
+
*/
|
|
9
|
+
export interface ContentDigestSpec {
|
|
10
|
+
/**
|
|
11
|
+
* Tables left out by name, beside the `sqlite_*` tables and every virtual table's shadow tables.
|
|
12
|
+
*/
|
|
13
|
+
excludeTables?: readonly string[];
|
|
14
|
+
/**
|
|
15
|
+
* Columns left out per table.
|
|
16
|
+
* Defaults to {@linkcode BUILD_STAMP_COLUMNS}.
|
|
17
|
+
*/
|
|
18
|
+
excludeColumns?: Readonly<Record<string, readonly string[]>>;
|
|
19
|
+
/**
|
|
20
|
+
* A column whose value also splits each table that has it into one digest per value,
|
|
21
|
+
* so a change can be traced to the countries it touched.
|
|
22
|
+
*/
|
|
23
|
+
countryColumn?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* One table's digest.
|
|
27
|
+
*/
|
|
28
|
+
export interface TableContentDigest {
|
|
29
|
+
rows: number;
|
|
30
|
+
digest: string;
|
|
31
|
+
/**
|
|
32
|
+
* One digest per value of the spec's country column, when the table has that column.
|
|
33
|
+
*/
|
|
34
|
+
byCountry?: Record<string, string>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A database's content digest: one digest per table and a root digest over them all.
|
|
38
|
+
*/
|
|
39
|
+
export interface DatabaseContentDigest {
|
|
40
|
+
root: string;
|
|
41
|
+
tables: Record<string, TableContentDigest>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The digest of every table's rows, read in primary-key order, or in the order of all columns
|
|
45
|
+
* for a table without a primary key, so insertion order and page layout leave it unchanged.
|
|
46
|
+
*
|
|
47
|
+
* A virtual table is read through its own rows, in rowid order, and its shadow
|
|
48
|
+
* tables (`<name>_data`, `<name>_node` and the rest) are left out, because they
|
|
49
|
+
* store an index layout that depends on insertion order.
|
|
50
|
+
* Each value is tagged with its storage type, so the integer `1` and the real `1.0` digest differently.
|
|
51
|
+
*/
|
|
52
|
+
export declare function databaseContentDigest<DB>(db: DatabaseClient<DB>, spec?: ContentDigestSpec): DatabaseContentDigest;
|
|
53
|
+
//# sourceMappingURL=digest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["../../lib/sealed/digest.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAG7C;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAE3E,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACjC;;;OAGG;IACH,cAAc,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAA;IAC5D;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;CAC1C;AAiBD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,EAAE,EAAE,cAAc,CAAC,EAAE,CAAC,EAAE,IAAI,GAAE,iBAAsB,GAAG,qBAAqB,CAgCrH"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
/**
|
|
4
|
+
* @file A digest of a database's table contents, equal for two databases that hold the same rows.
|
|
5
|
+
*
|
|
6
|
+
* A file's md5 differs between two builds of the same rows, because page layout, free pages and a
|
|
7
|
+
* build timestamp all reach the bytes. This digest reads rows in key order instead, so a cached
|
|
8
|
+
* build and a build from scratch compare equal exactly when every table holds the same rows.
|
|
9
|
+
*
|
|
10
|
+
* `@mailwoman/core` depends on this package, so hashing comes from `node:crypto` here, the module
|
|
11
|
+
* core's hash helpers wrap.
|
|
12
|
+
*/
|
|
13
|
+
import { createHash } from "node:crypto";
|
|
14
|
+
import { listTables } from "#introspection";
|
|
15
|
+
/**
|
|
16
|
+
* The columns a build writes from its own clock or checkout, left out of every digest by default.
|
|
17
|
+
*/
|
|
18
|
+
export const BUILD_STAMP_COLUMNS = {
|
|
19
|
+
layer_manifest: ["created_at", "build_sha"],
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Separates the fields of one row in the hash input.
|
|
23
|
+
*/
|
|
24
|
+
const FIELD_SEPARATOR = "\u0000";
|
|
25
|
+
/**
|
|
26
|
+
* Ends one row in the hash input.
|
|
27
|
+
*/
|
|
28
|
+
const ROW_SEPARATOR = "\u0001";
|
|
29
|
+
/**
|
|
30
|
+
* The digest of every table's rows, read in primary-key order, or in the order of all columns
|
|
31
|
+
* for a table without a primary key, so insertion order and page layout leave it unchanged.
|
|
32
|
+
*
|
|
33
|
+
* A virtual table is read through its own rows, in rowid order, and its shadow
|
|
34
|
+
* tables (`<name>_data`, `<name>_node` and the rest) are left out, because they
|
|
35
|
+
* store an index layout that depends on insertion order.
|
|
36
|
+
* Each value is tagged with its storage type, so the integer `1` and the real `1.0` digest differently.
|
|
37
|
+
*/
|
|
38
|
+
export function databaseContentDigest(db, spec = {}) {
|
|
39
|
+
const excludeColumns = spec.excludeColumns ?? BUILD_STAMP_COLUMNS;
|
|
40
|
+
const excludeTables = new Set(spec.excludeTables);
|
|
41
|
+
const virtualTables = db
|
|
42
|
+
.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND sql LIKE 'CREATE VIRTUAL TABLE%'")
|
|
43
|
+
.all().map((row) => row.name);
|
|
44
|
+
const isShadow = (table) => virtualTables.some((name) => table.startsWith(`${name}_`));
|
|
45
|
+
const tables = {};
|
|
46
|
+
for (const table of listTables(db)) {
|
|
47
|
+
if (table.startsWith("sqlite_") || excludeTables.has(table) || isShadow(table))
|
|
48
|
+
continue;
|
|
49
|
+
tables[table] = digestTable(db, table, {
|
|
50
|
+
virtual: virtualTables.includes(table),
|
|
51
|
+
excluded: new Set(excludeColumns[table]),
|
|
52
|
+
countryColumn: spec.countryColumn,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const root = createHash("sha256");
|
|
56
|
+
for (const [table, { digest }] of Object.entries(tables)) {
|
|
57
|
+
root.update(`${table}${FIELD_SEPARATOR}${digest}${ROW_SEPARATOR}`);
|
|
58
|
+
}
|
|
59
|
+
return { root: root.digest("hex"), tables };
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The digest of one table, with its per-country split.
|
|
63
|
+
*/
|
|
64
|
+
function digestTable(db, table, options) {
|
|
65
|
+
const columnInfo = db
|
|
66
|
+
.prepare(`PRAGMA table_info("${table}")`)
|
|
67
|
+
.all()
|
|
68
|
+
.map((row) => ({ name: String(row["name"]), pk: Number(row["pk"]) }));
|
|
69
|
+
const columns = columnInfo.map((column) => column.name).filter((name) => !options.excluded.has(name));
|
|
70
|
+
const keyColumns = columnInfo
|
|
71
|
+
.filter((column) => column.pk > 0)
|
|
72
|
+
.toSorted((a, b) => a.pk - b.pk)
|
|
73
|
+
.map((column) => column.name);
|
|
74
|
+
const quoted = (name) => `"${name.replaceAll('"', '""')}"`;
|
|
75
|
+
const selected = (options.virtual ? ["rowid", ...columns] : columns).flatMap((name) => [
|
|
76
|
+
`typeof(${quoted(name)})`,
|
|
77
|
+
quoted(name),
|
|
78
|
+
]);
|
|
79
|
+
const order = options.virtual ? ["rowid"] : keyColumns.length ? keyColumns : columns;
|
|
80
|
+
const countryIndex = options.countryColumn ? columns.indexOf(options.countryColumn) : -1;
|
|
81
|
+
const offset = options.virtual ? 1 : 0;
|
|
82
|
+
const statement = db.prepare(`SELECT ${selected.join(", ")} FROM ${quoted(table)} ORDER BY ${order.map(quoted).join(", ")}`);
|
|
83
|
+
// A 64-bit id past 2^53 loses precision as a JavaScript number.
|
|
84
|
+
statement.setReadBigInts(true);
|
|
85
|
+
statement.setReturnArrays(true);
|
|
86
|
+
const hash = createHash("sha256");
|
|
87
|
+
const byCountry = new Map();
|
|
88
|
+
let rows = 0;
|
|
89
|
+
for (const row of statement.iterate()) {
|
|
90
|
+
const encoded = encodeRow(row);
|
|
91
|
+
hash.update(encoded);
|
|
92
|
+
rows++;
|
|
93
|
+
if (countryIndex >= 0) {
|
|
94
|
+
const country = String(row[2 * (countryIndex + offset) + 1] ?? "");
|
|
95
|
+
const countryHash = byCountry.get(country) ?? createHash("sha256");
|
|
96
|
+
countryHash.update(encoded);
|
|
97
|
+
byCountry.set(country, countryHash);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
rows,
|
|
102
|
+
digest: hash.digest("hex"),
|
|
103
|
+
...(countryIndex >= 0
|
|
104
|
+
? {
|
|
105
|
+
byCountry: Object.fromEntries([...byCountry].toSorted(([a], [b]) => a.localeCompare(b)).map(([country, h]) => [country, h.digest("hex")])),
|
|
106
|
+
}
|
|
107
|
+
: {}),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* One row as hash input: each value after its SQLite storage type, with blobs in hex.
|
|
112
|
+
*/
|
|
113
|
+
function encodeRow(row) {
|
|
114
|
+
const fields = [];
|
|
115
|
+
for (let index = 0; index < row.length; index += 2) {
|
|
116
|
+
const type = String(row[index]);
|
|
117
|
+
const value = row[index + 1];
|
|
118
|
+
fields.push(`${type}:${value instanceof Uint8Array ? Buffer.from(value).toString("hex") : String(value)}`);
|
|
119
|
+
}
|
|
120
|
+
return `${fields.join(FIELD_SEPARATOR)}${ROW_SEPARATOR}`;
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=digest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digest.js","sourceRoot":"","sources":["../../lib/sealed/digest.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,aAAa,CAAA;AAGnD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAgD;IAC/E,cAAc,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;CAC3C,CAAA;AA+CD;;GAEG;AACH,MAAM,eAAe,GAAG,QAAQ,CAAA;AAEhC;;GAEG;AACH,MAAM,aAAa,GAAG,QAAQ,CAAA;AAE9B;;;;;;;;GAQG;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AAK,CAAC,CAAC,CAAA;QAC/B,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;QAE5B,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,KAAK,YAAY,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IAC3G,CAAC;IAED,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,aAAa,EAAE,CAAA;AACzD,CAAC"}
|
package/out/sealed.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
2
|
* Open a built data artifact.
|
|
7
3
|
*
|
|
8
|
-
* This is the other half of the sealed-artifact invariant in `../utils/sealed-db.ts`:
|
|
9
|
-
* filesystem side (seal, unseal-refusal, atomic swap)
|
|
10
|
-
*
|
|
11
|
-
* `
|
|
12
|
-
*
|
|
4
|
+
* This is the other half of the sealed-artifact invariant in `../utils/sealed-db.ts`:
|
|
5
|
+
* that module owns the filesystem side (seal, unseal-refusal, atomic swap)
|
|
6
|
+
* and stays free of a static `node:sqlite` import, because it flows through the
|
|
7
|
+
* `@mailwoman/core/utils` barrel into consumers that cannot resolve one.
|
|
8
|
+
* The open lives here, where `DatabaseClient` is already imported and the cost is paid.
|
|
9
|
+
*
|
|
10
|
+
* The open is asynchronous: the write branch awaits the seal check against the
|
|
11
|
+
* filesystem before the handle is constructed.
|
|
13
12
|
*/
|
|
14
13
|
import type { PathBuilderLike } from "path-ts";
|
|
15
14
|
import { DatabaseClient } from "#client";
|
package/out/sealed.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sealed.d.ts","sourceRoot":"","sources":["../lib/sealed.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sealed.d.ts","sourceRoot":"","sources":["../lib/sealed.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;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"}
|
package/out/sealed.js
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Open a built data artifact.
|
|
7
|
-
*
|
|
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.
|
|
13
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
14
3
|
import { DatabaseClient } from "#client";
|
|
15
4
|
import { assertUnsealedForWrite } from "#sealed/db";
|
|
16
5
|
/**
|
package/out/sealed.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sealed.js","sourceRoot":"","sources":["../lib/sealed.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sealed.js","sourceRoot":"","sources":["../lib/sealed.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAiBlE,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":["../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/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/build.test.ts","../lib/sealed/digest.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/pino-std-serializers/package.json","../../../node_modules/pino/package.json","../../../node_modules/punycode/package.json","../../../node_modules/read-excel-file/package.json","../../../node_modules/sonic-boom/package.json","../../../node_modules/spliterator/package.json","../../../node_modules/string_decoder/package.json","../../../node_modules/tagged-tag/package.json","../../../node_modules/terser/package.json","../../../node_modules/thread-stream/package.json","../../../node_modules/tinybench/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/write-excel-file/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/readers/stat/package.json","../../../node_modules/@mailwoman/core/fs/temporary/package.json","../../../node_modules/@mailwoman/core/fs/writers/package.json","../../../node_modules/@mailwoman/core/process/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/sonic-boom/types/package.json","../../../node_modules/spliterator/node/fs/package.json","../../../node_modules/spliterator/out/lib/core/package.json","../../../node_modules/spliterator/out/lib/formats/package.json","../../../node_modules/spliterator/out/lib/internal/package.json","../../../node_modules/spliterator/out/lib/io/package.json","../../../node_modules/spliterator/out/lib/iterators/package.json","../../../node_modules/spliterator/out/lib/package.json","../../../node_modules/spliterator/out/lib/parallel/package.json","../../../node_modules/spliterator/out/node/fs/package.json","../../../node_modules/spliterator/out/node/package.json","../../../node_modules/spliterator/out/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/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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/sqlite",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "The one way a Mailwoman SQLite connection is opened: a typed Kysely client over node:sqlite, plus the sealed-artifact lifecycle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kysely",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"path-ts": "^2.5.0"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@mailwoman/core": "11.
|
|
78
|
+
"@mailwoman/core": "11.2.0"
|
|
79
79
|
},
|
|
80
80
|
"engines": {
|
|
81
|
-
"node": "^24.22.
|
|
81
|
+
"node": "^24.22.3 || >=26.13.1"
|
|
82
82
|
}
|
|
83
83
|
}
|