run402 2.15.0 → 2.15.1
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/lib/doctor.mjs +12 -8
- package/package.json +1 -1
package/lib/doctor.mjs
CHANGED
|
@@ -96,21 +96,25 @@ export async function run(sub, args = []) {
|
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
// 3.
|
|
99
|
+
// 3. Project keystore. The wallet itself lives in allowance.json (verified
|
|
100
|
+
// by check 2 above); this checks the per-project keys (anon_key /
|
|
101
|
+
// service_key) that `run402 projects provision` writes. An empty store is
|
|
102
|
+
// normal for fresh installs that haven't provisioned a project yet, so
|
|
103
|
+
// report informationally as `ok` rather than warning.
|
|
100
104
|
try {
|
|
101
105
|
const keystore = loadKeyStore();
|
|
102
|
-
const
|
|
106
|
+
const projectCount = Object.keys(keystore?.projects ?? {}).length;
|
|
103
107
|
checks.push({
|
|
104
|
-
name: "
|
|
105
|
-
status:
|
|
106
|
-
value: {
|
|
107
|
-
...(
|
|
108
|
-
hint: "
|
|
108
|
+
name: "projects",
|
|
109
|
+
status: "ok",
|
|
110
|
+
value: { project_count: projectCount },
|
|
111
|
+
...(projectCount === 0 && {
|
|
112
|
+
hint: "No projects yet — run 'run402 projects provision' to create one (wallet is already set up).",
|
|
109
113
|
}),
|
|
110
114
|
});
|
|
111
115
|
} catch (err) {
|
|
112
116
|
checks.push({
|
|
113
|
-
name: "
|
|
117
|
+
name: "projects",
|
|
114
118
|
status: "error",
|
|
115
119
|
message: err instanceof Error ? err.message : String(err),
|
|
116
120
|
});
|
package/package.json
CHANGED