@ericrisco/rsc 1.0.31 → 1.0.32
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 +1 -1
- package/targets/session-start.mjs +12 -1
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -57,7 +57,18 @@ function versionAt(scopeRoot) {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
function isWiredScope(scopeRoot) {
|
|
60
|
-
|
|
60
|
+
// settings.json stores the wired command with the separator the installing platform produced, and
|
|
61
|
+
// JSON escapes a Windows backslash as a pair. Looking only for `.rsc/` therefore answered "not
|
|
62
|
+
// wired" for every Windows scope — which made THIS detector, the one that warns about a duplicated
|
|
63
|
+
// always-on body, blind on the exact platform where the body was being injected four times.
|
|
64
|
+
//
|
|
65
|
+
// Normalized inline rather than imported: hooks are materialized file by file, so this script can
|
|
66
|
+
// only import a sibling in `.rsc/`. `targets/claude.js` (hookWiringOf) and `scripts/doctor.js`
|
|
67
|
+
// carry the same one-liner for the same reason; the duplication is the price of the hook layout.
|
|
68
|
+
try {
|
|
69
|
+
const raw = readFileSync(join(scopeRoot, '.claude', 'settings.json'), 'utf8');
|
|
70
|
+
return raw.replace(/\\\\/g, '/').includes('.rsc/');
|
|
71
|
+
} catch { return false; }
|
|
61
72
|
}
|
|
62
73
|
|
|
63
74
|
function olderThan(a, b) {
|