@atlashub/smartstack-cli 4.7.0 → 4.8.0
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/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -112712,6 +112712,14 @@ async function installCommands(options = {}) {
|
|
|
112712
112712
|
logger.info(`Installing to: ${claudeDir}`);
|
|
112713
112713
|
const dirsToInstall = installAll ? INSTALL_DIRS : INSTALL_DIRS.filter((d) => components.includes(d));
|
|
112714
112714
|
const version2 = getPackageVersion();
|
|
112715
|
+
let forceUpdate = options.force ?? false;
|
|
112716
|
+
if (!forceUpdate) {
|
|
112717
|
+
const existingManifest = await readManifest(claudeDir);
|
|
112718
|
+
if (existingManifest && existingManifest.version !== version2) {
|
|
112719
|
+
logger.info(`Version upgrade detected: ${existingManifest.version} \u2192 ${version2} (forcing update)`);
|
|
112720
|
+
forceUpdate = true;
|
|
112721
|
+
}
|
|
112722
|
+
}
|
|
112715
112723
|
for (const dir of dirsToInstall) {
|
|
112716
112724
|
const sourceDir = (0, import_path2.join)(TEMPLATES_DIR, dir);
|
|
112717
112725
|
const targetDir = (0, import_path2.join)(claudeDir, dir);
|
|
@@ -112726,7 +112734,7 @@ async function installCommands(options = {}) {
|
|
|
112726
112734
|
const relativePath = (0, import_path2.join)(dir, file);
|
|
112727
112735
|
try {
|
|
112728
112736
|
const exists = await import_fs_extra2.default.pathExists(dest);
|
|
112729
|
-
if (exists && !
|
|
112737
|
+
if (exists && !forceUpdate) {
|
|
112730
112738
|
result.skipped++;
|
|
112731
112739
|
result.installedFiles.push(relativePath);
|
|
112732
112740
|
continue;
|
|
@@ -112737,7 +112745,7 @@ async function installCommands(options = {}) {
|
|
|
112737
112745
|
const processed = processTemplateVariables(content, version2);
|
|
112738
112746
|
await import_fs_extra2.default.writeFile(dest, processed, "utf-8");
|
|
112739
112747
|
} else {
|
|
112740
|
-
await import_fs_extra2.default.copy(src, dest, { overwrite:
|
|
112748
|
+
await import_fs_extra2.default.copy(src, dest, { overwrite: forceUpdate });
|
|
112741
112749
|
}
|
|
112742
112750
|
result.installed++;
|
|
112743
112751
|
result.installedFiles.push(relativePath);
|