create-claude-cabinet 0.25.0 → 0.25.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/cli.js +19 -1
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -690,6 +690,14 @@ async function run() {
|
|
|
690
690
|
// Explicit module selection via --modules <key1,key2,...>. Mandatory
|
|
691
691
|
// modules are always included regardless of the flag value, so the
|
|
692
692
|
// installer always has session-loop etc. available.
|
|
693
|
+
//
|
|
694
|
+
// On an upgrade (existing .ccrc.json present), --modules is treated
|
|
695
|
+
// ADDITIVELY: the requested keys are merged with whatever the
|
|
696
|
+
// existing installation already had enabled. Otherwise an `--modules
|
|
697
|
+
// verify` invocation on a project with 9 enabled modules would
|
|
698
|
+
// silently deregister 8 of them. Replacing the existing set on
|
|
699
|
+
// upgrade is almost never what the operator wants. (Fresh installs
|
|
700
|
+
// unchanged — there's no prior set to merge with.)
|
|
693
701
|
const mandatoryKeys = Object.entries(MODULES)
|
|
694
702
|
.filter(([, mod]) => mod.mandatory)
|
|
695
703
|
.map(([key]) => key);
|
|
@@ -699,7 +707,17 @@ async function run() {
|
|
|
699
707
|
console.log(` ⚠ Unknown modules ignored: ${unknown.join(', ')}`);
|
|
700
708
|
console.log(` Known modules: ${Object.keys(MODULES).join(', ')}`);
|
|
701
709
|
}
|
|
702
|
-
|
|
710
|
+
let existingEnabled = [];
|
|
711
|
+
if (dirState === 'existing-install') {
|
|
712
|
+
const existing = readMetadata(projectDir);
|
|
713
|
+
existingEnabled = Object.entries(existing.modules || {})
|
|
714
|
+
.filter(([k, enabled]) => enabled && MODULES[k])
|
|
715
|
+
.map(([k]) => k);
|
|
716
|
+
if (existingEnabled.length > 0) {
|
|
717
|
+
console.log(` Existing modules carried forward: ${existingEnabled.join(', ')}`);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
selectedModules = [...new Set([...mandatoryKeys, ...existingEnabled, ...requested])];
|
|
703
721
|
const skippedKeys = Object.keys(MODULES).filter(k => !selectedModules.includes(k));
|
|
704
722
|
for (const k of skippedKeys) {
|
|
705
723
|
skippedModules[k] = `Skipped by --modules flag`;
|
package/package.json
CHANGED