@zukhruf/sqlite-open 0.8.102 → 0.8.104

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 CHANGED
@@ -106,7 +106,7 @@ A write-ahead log syncs the `-wal` file to the disk before each checkpoint, not
106
106
 
107
107
  ### Result codes
108
108
 
109
- `sqliteResultCode(error)` reads the result code of an error that `node:sqlite` threw, in the two parts that go-sqlite3 names: `code` is the primary code, the same for each variant, and `extendedCode` names the variant. It is `undefined` for any other value. `node:sqlite` puts only the extended code on the error's `errcode`, and Node names none of the codes, so this package exports the ones that zukhruf reads, by their names in [SQLite](https://www.sqlite.org/rescode.html): `SQLITE_ERROR`, `SQLITE_BUSY`, `SQLITE_CANTOPEN`, `SQLITE_NOTADB`, `SQLITE_CONSTRAINT_FOREIGNKEY`, `SQLITE_CONSTRAINT_NOTNULL`, `SQLITE_CONSTRAINT_UNIQUE` and `SQLITE_READONLY_DIRECTORY`.
109
+ `sqliteResultCode(error)` reads the result code of an error that `node:sqlite` threw, in the two parts that go-sqlite3 names: `code` is the primary code, the same for each variant, and `extendedCode` names the variant. It is `undefined` for any other value. `node:sqlite` puts only the extended code on the error's `errcode`, and Node names none of the codes, so this package exports the ones that zukhruf reads, by their names in [SQLite](https://www.sqlite.org/rescode.html): `SQLITE_ERROR`, `SQLITE_BUSY`, `SQLITE_READONLY`, `SQLITE_CANTOPEN`, `SQLITE_NOTADB`, `SQLITE_CONSTRAINT_FOREIGNKEY`, `SQLITE_CONSTRAINT_NOTNULL`, `SQLITE_CONSTRAINT_UNIQUE` and `SQLITE_READONLY_DIRECTORY`.
110
110
 
111
111
  ```ts
112
112
  import {
@@ -223,6 +223,7 @@ function sqliteResultCode(error: unknown): SqliteResultCode | undefined;
223
223
 
224
224
  const SQLITE_ERROR = 1;
225
225
  const SQLITE_BUSY = 5;
226
+ const SQLITE_READONLY = 8;
226
227
  const SQLITE_CANTOPEN = 14;
227
228
  const SQLITE_NOTADB = 26;
228
229
  const SQLITE_CONSTRAINT_FOREIGNKEY = 787;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export type { Journal } from './journal.ts';
2
2
  export { open, type OwnerOptions, type ReaderOptions } from './open.ts';
3
3
  export { PersistentWriteAheadLog } from './persistent-write-ahead-log.ts';
4
- export { SQLITE_BUSY, SQLITE_CANTOPEN, SQLITE_CONSTRAINT_FOREIGNKEY, SQLITE_CONSTRAINT_NOTNULL, SQLITE_CONSTRAINT_UNIQUE, SQLITE_ERROR, SQLITE_NOTADB, SQLITE_READONLY_DIRECTORY, type SqliteResultCode, sqliteResultCode, } from './result-code.ts';
4
+ export { SQLITE_BUSY, SQLITE_CANTOPEN, SQLITE_CONSTRAINT_FOREIGNKEY, SQLITE_CONSTRAINT_NOTNULL, SQLITE_CONSTRAINT_UNIQUE, SQLITE_ERROR, SQLITE_NOTADB, SQLITE_READONLY, SQLITE_READONLY_DIRECTORY, type SqliteResultCode, sqliteResultCode, } from './result-code.ts';
5
5
  export { RollbackJournal } from './rollback-journal.ts';
6
6
  export { DeniedError, MissingError, UnavailableError, } from './unavailable-error.ts';
7
7
  export { UnchangedJournal } from './unchanged-journal.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EACL,WAAW,EACX,eAAe,EACf,4BAA4B,EAC5B,yBAAyB,EACzB,wBAAwB,EACxB,YAAY,EACZ,aAAa,EACb,yBAAyB,EACzB,KAAK,gBAAgB,EACrB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,KAAK,QAAQ,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EACL,WAAW,EACX,eAAe,EACf,4BAA4B,EAC5B,yBAAyB,EACzB,wBAAwB,EACxB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,yBAAyB,EACzB,KAAK,gBAAgB,EACrB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,KAAK,QAAQ,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { open } from './open.js';
2
2
  export { PersistentWriteAheadLog } from './persistent-write-ahead-log.js';
3
- export { SQLITE_BUSY, SQLITE_CANTOPEN, SQLITE_CONSTRAINT_FOREIGNKEY, SQLITE_CONSTRAINT_NOTNULL, SQLITE_CONSTRAINT_UNIQUE, SQLITE_ERROR, SQLITE_NOTADB, SQLITE_READONLY_DIRECTORY, sqliteResultCode, } from './result-code.js';
3
+ export { SQLITE_BUSY, SQLITE_CANTOPEN, SQLITE_CONSTRAINT_FOREIGNKEY, SQLITE_CONSTRAINT_NOTNULL, SQLITE_CONSTRAINT_UNIQUE, SQLITE_ERROR, SQLITE_NOTADB, SQLITE_READONLY, SQLITE_READONLY_DIRECTORY, sqliteResultCode, } from './result-code.js';
4
4
  export { RollbackJournal } from './rollback-journal.js';
5
5
  export { DeniedError, MissingError, UnavailableError, } from './unavailable-error.js';
6
6
  export { UnchangedJournal } from './unchanged-journal.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAyC,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EACL,WAAW,EACX,eAAe,EACf,4BAA4B,EAC5B,yBAAyB,EACzB,wBAAwB,EACxB,YAAY,EACZ,aAAa,EACb,yBAAyB,EAEzB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAiB,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAyC,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EACL,WAAW,EACX,eAAe,EACf,4BAA4B,EAC5B,yBAAyB,EACzB,wBAAwB,EACxB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,yBAAyB,EAEzB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAiB,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export declare const SQLITE_ERROR = 1;
2
2
  export declare const SQLITE_BUSY = 5;
3
+ export declare const SQLITE_READONLY = 8;
3
4
  export declare const SQLITE_CANTOPEN = 14;
4
5
  export declare const SQLITE_NOTADB = 26;
5
6
  export declare const SQLITE_CONSTRAINT_FOREIGNKEY = 787;
@@ -1 +1 @@
1
- {"version":3,"file":"result-code.d.ts","sourceRoot":"","sources":["../src/result-code.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,GAAG,SAAS,CAS7E"}
1
+ {"version":3,"file":"result-code.d.ts","sourceRoot":"","sources":["../src/result-code.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,GAAG,SAAS,CAS7E"}
@@ -3,6 +3,7 @@
3
3
  // an extended code keeps its primary code in that byte.
4
4
  export const SQLITE_ERROR = 1;
5
5
  export const SQLITE_BUSY = 5;
6
+ export const SQLITE_READONLY = 8;
6
7
  export const SQLITE_CANTOPEN = 14;
7
8
  export const SQLITE_NOTADB = 26;
8
9
  export const SQLITE_CONSTRAINT_FOREIGNKEY = 787;
@@ -1 +1 @@
1
- {"version":3,"file":"result-code.js","sourceRoot":"","sources":["../src/result-code.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,8EAA8E;AAC9E,wDAAwD;AACxD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAC9B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAC7B,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC;AAChC,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAChD,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAY7C;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC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}
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zukhruf/sqlite-open",
3
- "version": "0.8.102",
3
+ "version": "0.8.104",
4
4
  "description": "One open for every node:sqlite connection: a reader, or an owner whose journal is a strategy (WAL by default, persistent WAL for readers that cannot write the folder), a 5 s busy timeout, and UnavailableError.",
5
5
  "license": "MIT",
6
6
  "repository": {