@ericrisco/rsc 2.0.19 → 2.0.20
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/manifest.json +1 -1
- package/package.json +5 -1
- package/scripts/doctor.js +8 -2
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ericrisco/rsc",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.20",
|
|
4
4
|
"description": "A guided harness builder that turns your goal into a minimal, verified AI-agent setup using strict best practices.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -105,6 +105,10 @@
|
|
|
105
105
|
{
|
|
106
106
|
"fixedIn": "2.0.19",
|
|
107
107
|
"symptom": "rsc doctor reported missing pieces or an unwired hook but still exited with 0, so a CI or an editor extension could not tell"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"fixedIn": "2.0.20",
|
|
111
|
+
"symptom": "In a project whose path contains a space, rsc doctor reported every hook script as missing and exited 1, though the scripts were there and the hooks ran"
|
|
108
112
|
}
|
|
109
113
|
]
|
|
110
114
|
}
|
package/scripts/doctor.js
CHANGED
|
@@ -65,6 +65,10 @@ function selloStatus(root) {
|
|
|
65
65
|
//
|
|
66
66
|
// Hookless targets get an empty list by construction: their always-on surface is a
|
|
67
67
|
// markdown block with no script behind it, so there is nothing that can go missing.
|
|
68
|
+
// A quoted span counts as a path only if it starts like one and holds no shell operator: a whole
|
|
69
|
+
// `sh -c '…'` snippet is not a path, and reading it as one reports a present script missing.
|
|
70
|
+
const SCRIPT_RE =
|
|
71
|
+
/"((?:[A-Za-z]:)?[\\/~][^"&;|]*[\\/]\.rsc[\\/][^"\s]+?\.mjs)"|'((?:[A-Za-z]:)?[\\/~][^'&;|]*[\\/]\.rsc[\\/][^'\s]+?\.mjs)'|([^"'\s]*[\\/]\.rsc[\\/][^"'\s]+\.mjs)/g;
|
|
68
72
|
export function missingHookScripts({ target, home = homedir(), cwd = process.cwd() } = {}) {
|
|
69
73
|
if (HOOKLESS_TARGETS.has(target)) return [];
|
|
70
74
|
const file = targetPaths(target, home, cwd).hookTarget;
|
|
@@ -84,8 +88,10 @@ export function missingHookScripts({ target, home = homedir(), cwd = process.cwd
|
|
|
84
88
|
const expand = (c) => c.split('${CLAUDE_PROJECT_DIR}').join(cwd);
|
|
85
89
|
for (const raw of commands) {
|
|
86
90
|
const cmd = expand(raw);
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
// Quoted forms first: a project path may hold a space, and stopping at whitespace kept only
|
|
92
|
+
// the tail (`entreno/.rsc/x.mjs`), which then resolved against the cwd and read as missing (#283).
|
|
93
|
+
for (const m of cmd.matchAll(SCRIPT_RE)) {
|
|
94
|
+
const script = m[1] ?? m[2] ?? m[3];
|
|
89
95
|
if (!existsSync(script)) seen.add(script);
|
|
90
96
|
}
|
|
91
97
|
}
|