@nodetool-ai/cli-local 0.8.9-bootstrap.0 → 0.8.10
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/dist/.nodetool-build-stamp +1 -1
- package/dist/local-db.d.ts.map +1 -1
- package/dist/local-db.js +8 -4
- package/dist/local-db.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
2026-
|
|
1
|
+
2026-11-01T20:33:36.084Z
|
package/dist/local-db.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-db.d.ts","sourceRoot":"","sources":["../src/local-db.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,qDAAqD;AACrD,eAAO,MAAM,aAAa,MAAM,CAAC;AAIjC;;;;;;GAMG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"local-db.d.ts","sourceRoot":"","sources":["../src/local-db.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,qDAAqD;AACrD,eAAO,MAAM,aAAa,MAAM,CAAC;AAIjC;;;;;;GAMG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAmB5C;AAED,oFAAoF;AACpF,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAEhD"}
|
package/dist/local-db.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* than against a running server. Mirrors the `setupDb` in nodetool.ts (secrets
|
|
4
4
|
* commands) without pulling in the heavy deploy stack.
|
|
5
5
|
*/
|
|
6
|
-
import { initDb } from "@nodetool-ai/models";
|
|
7
|
-
import { initMasterKey } from "@nodetool-ai/security";
|
|
6
|
+
import { initDb, migrateSqliteDb } from "@nodetool-ai/models";
|
|
7
|
+
import { initMasterKey, isKeychainBackendMissing } from "@nodetool-ai/security";
|
|
8
8
|
import { getDefaultDbPath } from "@nodetool-ai/config";
|
|
9
9
|
/** Local single-user id used across the TS stack. */
|
|
10
10
|
export const LOCAL_USER_ID = "1";
|
|
@@ -18,11 +18,17 @@ let ready = null;
|
|
|
18
18
|
*/
|
|
19
19
|
export function setupLocalDb() {
|
|
20
20
|
ready ??= (async () => {
|
|
21
|
+
// initDb applies only the baseline schema. Migrate first, or a command
|
|
22
|
+
// that writes an asset fails on a column added later.
|
|
23
|
+
await migrateSqliteDb(getDefaultDbPath());
|
|
21
24
|
initDb(getDefaultDbPath());
|
|
22
25
|
try {
|
|
23
26
|
await initMasterKey();
|
|
24
27
|
}
|
|
25
28
|
catch (err) {
|
|
29
|
+
// A missing keychain module matters only when a stored secret is read.
|
|
30
|
+
if (err instanceof Error && isKeychainBackendMissing(err))
|
|
31
|
+
return;
|
|
26
32
|
const msg = err instanceof Error ? err.message : String(err);
|
|
27
33
|
process.stderr.write(`Could not unlock the secret store: ${msg}\n` +
|
|
28
34
|
`Tip: set SECRETS_MASTER_KEY or grant keychain access.\n`);
|
|
@@ -32,8 +38,6 @@ export function setupLocalDb() {
|
|
|
32
38
|
}
|
|
33
39
|
/** Migrate a standalone command database before unlocking its local credentials. */
|
|
34
40
|
export async function setupCliDb() {
|
|
35
|
-
const { migrateSqliteDb } = await import("@nodetool-ai/models");
|
|
36
|
-
await migrateSqliteDb(getDefaultDbPath());
|
|
37
41
|
await setupLocalDb();
|
|
38
42
|
}
|
|
39
43
|
//# sourceMappingURL=local-db.js.map
|
package/dist/local-db.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-db.js","sourceRoot":"","sources":["../src/local-db.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"local-db.js","sourceRoot":"","sources":["../src/local-db.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,qDAAqD;AACrD,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC,IAAI,KAAK,GAAyB,IAAI,CAAC;AAEvC;;;;;;GAMG;AACH,MAAM,UAAU,YAAY;IAC1B,KAAK,KAAK,CAAC,KAAK,IAAI,EAAE;QACpB,uEAAuE;QACvE,sDAAsD;QACtD,MAAM,eAAe,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAC1C,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAC3B,IAAI,CAAC;YACH,MAAM,aAAa,EAAE,CAAC;QACxB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,uEAAuE;YACvE,IAAI,GAAG,YAAY,KAAK,IAAI,wBAAwB,CAAC,GAAG,CAAC;gBAAE,OAAO;YAClE,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,sCAAsC,GAAG,IAAI;gBAC3C,yDAAyD,CAC5D,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,EAAE,CAAC;IACL,OAAO,KAAK,CAAC;AACf,CAAC;AAED,oFAAoF;AACpF,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,MAAM,YAAY,EAAE,CAAC;AACvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodetool-ai/cli-local",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.10",
|
|
4
4
|
"description": "Shared NodeTool local host helpers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"lint": "node ../../scripts/run-tsc.mjs --noEmit"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@nodetool-ai/cli-common": "0.8.
|
|
32
|
-
"@nodetool-ai/config": "0.8.
|
|
33
|
-
"@nodetool-ai/models": "0.8.
|
|
34
|
-
"@nodetool-ai/security": "0.8.
|
|
31
|
+
"@nodetool-ai/cli-common": "0.8.10",
|
|
32
|
+
"@nodetool-ai/config": "0.8.10",
|
|
33
|
+
"@nodetool-ai/models": "0.8.10",
|
|
34
|
+
"@nodetool-ai/security": "0.8.10"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^22.0.0",
|