great-cto 0.1.2 → 0.1.3

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/installer.js CHANGED
@@ -74,17 +74,19 @@ export function install(opts = {}) {
74
74
  }
75
75
  }
76
76
  const pluginDir = join(getPluginBaseDir(), version);
77
- if (existsSync(pluginDir) && !opts.force) {
78
- // Verify it has plugin.json (otherwise corrupted install)
77
+ if (existsSync(pluginDir)) {
79
78
  const manifest = join(pluginDir, ".claude-plugin", "plugin.json");
80
- if (existsSync(manifest)) {
79
+ const looksValid = existsSync(manifest);
80
+ if (looksValid && !opts.force) {
81
81
  return { installed: false, pluginDir, version, alreadyInstalled: true };
82
82
  }
83
- // Corrupted remove and reinstall
84
- warn(`Previous install at ${pluginDir} looks corrupted — reinstalling.`);
83
+ // Either corrupted, or --force: wipe and reinstall
84
+ if (!looksValid) {
85
+ warn(`Previous install at ${pluginDir} looks corrupted — reinstalling.`);
86
+ }
85
87
  rmSync(pluginDir, { recursive: true, force: true });
86
88
  }
87
- mkdirSync(join(getPluginBaseDir()), { recursive: true });
89
+ mkdirSync(getPluginBaseDir(), { recursive: true });
88
90
  log(dim(` cloning ${REPO_URL} into ${pluginDir}`));
89
91
  const ref = /^[0-9]+\.[0-9]+\.[0-9]+$/.test(version) ? `v${version}` : version;
90
92
  const result = spawnSync("git", ["clone", "--depth=1", "--branch", ref, REPO_URL, pluginDir], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "great-cto",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "One command install for the great_cto Claude Code plugin. Auto-detects your stack, picks the right archetype, bootstraps PROJECT.md.",
5
5
  "keywords": [
6
6
  "claude-code",