great-cto 0.1.2 → 0.1.4
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/README.md +9 -2
- package/dist/installer.js +8 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,10 +75,17 @@ npx great-cto init [options]
|
|
|
75
75
|
|
|
76
76
|
## Requirements
|
|
77
77
|
|
|
78
|
-
- Node.js ≥
|
|
79
|
-
- Git (to clone the plugin repo)
|
|
78
|
+
- **Node.js ≥ 18.17.0** (Node 18 / 20 / 22 all tested in CI)
|
|
79
|
+
- **Git** (to clone the plugin repo)
|
|
80
80
|
- [Claude Code](https://claude.com/claude-code)
|
|
81
81
|
|
|
82
|
+
## Trust signals
|
|
83
|
+
|
|
84
|
+
- Zero runtime dependencies — only Node built-ins (`node:fs`, `node:path`, etc.)
|
|
85
|
+
- 47 unit tests covering stack detection, archetype scoring, settings merge
|
|
86
|
+
- CI matrix: Node 18/20/22 × Ubuntu/macOS/Windows
|
|
87
|
+
- Source: [`packages/cli/src/`](https://github.com/avelikiy/great_cto/tree/main/packages/cli/src) — ~1.2k LOC TypeScript
|
|
88
|
+
|
|
82
89
|
## License
|
|
83
90
|
|
|
84
91
|
MIT — same as the plugin.
|
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)
|
|
78
|
-
// Verify it has plugin.json (otherwise corrupted install)
|
|
77
|
+
if (existsSync(pluginDir)) {
|
|
79
78
|
const manifest = join(pluginDir, ".claude-plugin", "plugin.json");
|
|
80
|
-
|
|
79
|
+
const looksValid = existsSync(manifest);
|
|
80
|
+
if (looksValid && !opts.force) {
|
|
81
81
|
return { installed: false, pluginDir, version, alreadyInstalled: true };
|
|
82
82
|
}
|
|
83
|
-
//
|
|
84
|
-
|
|
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(
|
|
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