refacil-sdd-ai 5.0.7 → 5.0.9
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/bin/cli.js +1 -15
- package/lib/hooks.js +8 -1
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -645,7 +645,6 @@ async function init() {
|
|
|
645
645
|
}
|
|
646
646
|
|
|
647
647
|
writeGlobalVersion(getPackageVersion(packageRoot));
|
|
648
|
-
writeRepoVersion(projectRoot, getPackageVersion(packageRoot));
|
|
649
648
|
|
|
650
649
|
if (installClaude) {
|
|
651
650
|
if (createClaudeMd(packageRoot, projectRoot)) console.log(' CLAUDE.md OK');
|
|
@@ -662,12 +661,6 @@ async function init() {
|
|
|
662
661
|
}
|
|
663
662
|
|
|
664
663
|
if (installOpenCode) {
|
|
665
|
-
try {
|
|
666
|
-
installOpenCodeJson(projectRoot);
|
|
667
|
-
console.log(' .opencode/opencode.json created/updated');
|
|
668
|
-
} catch (err) {
|
|
669
|
-
console.error(` Warning: could not create opencode.json: ${err.message}`);
|
|
670
|
-
}
|
|
671
664
|
if (installHooks('.opencode', homeDir, projectRoot)) {
|
|
672
665
|
console.log(' OpenCode plugin installed to global plugins directory');
|
|
673
666
|
}
|
|
@@ -776,8 +769,6 @@ function update() {
|
|
|
776
769
|
}
|
|
777
770
|
|
|
778
771
|
writeGlobalVersion(getPackageVersion(packageRoot));
|
|
779
|
-
writeRepoVersion(projectRoot, getPackageVersion(packageRoot));
|
|
780
|
-
|
|
781
772
|
if (hasClaudeDir) {
|
|
782
773
|
createClaudeMd(packageRoot, projectRoot);
|
|
783
774
|
if (installHooks('.claude', homeDir, projectRoot)) {
|
|
@@ -793,11 +784,6 @@ function update() {
|
|
|
793
784
|
}
|
|
794
785
|
|
|
795
786
|
if (hasOpenCodeDir) {
|
|
796
|
-
try {
|
|
797
|
-
installOpenCodeJson(projectRoot);
|
|
798
|
-
} catch (err) {
|
|
799
|
-
console.error(` Warning: could not update opencode.json: ${err.message}`);
|
|
800
|
-
}
|
|
801
787
|
if (installHooks('.opencode', homeDir, projectRoot)) {
|
|
802
788
|
console.log(' OpenCode plugin updated in global config directory');
|
|
803
789
|
}
|
package/lib/hooks.js
CHANGED
|
@@ -371,7 +371,14 @@ function removeProjectLevelHooks(projectRoot) {
|
|
|
371
371
|
if (hooksObj[evt].length === 0) delete hooksObj[evt];
|
|
372
372
|
}
|
|
373
373
|
if (Object.keys(hooksObj).length === 0) delete config.hooks;
|
|
374
|
-
if (changed)
|
|
374
|
+
if (changed) {
|
|
375
|
+
const remainingKeys = Object.keys(config).filter(k => k !== 'version');
|
|
376
|
+
if (remainingKeys.length === 0) {
|
|
377
|
+
fs.unlinkSync(cursorPath);
|
|
378
|
+
} else {
|
|
379
|
+
fs.writeFileSync(cursorPath, JSON.stringify(config, null, 2) + '\n');
|
|
380
|
+
}
|
|
381
|
+
}
|
|
375
382
|
} catch (_) {}
|
|
376
383
|
}
|
|
377
384
|
}
|
package/package.json
CHANGED