mirror of
https://github.com/SuperClaude-Org/SuperClaude_Framework.git
synced 2025-12-29 16:16:08 +00:00
🚀 Prepare for dual PyPI/NPM release v4.0
- Fix version consistency (PyPI: 4.0.0, NPM: 4.0.3) - Update license format to PEP 639 compliance - Restore NPM package components (bin/ and package.json) - Fix NPM package name to @superclaude-org/superclaude - Add comprehensive RELEASE_INSTRUCTIONS.md - Update .gitignore to include NPM files - Ready for production release on both PyPI and NPM Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
36
bin/checkEnv.js
Normal file
36
bin/checkEnv.js
Normal file
@@ -0,0 +1,36 @@
|
||||
const { spawnSync } = require("child_process");
|
||||
|
||||
function run(cmd, args = [], opts = {}) {
|
||||
return spawnSync(cmd, args, {
|
||||
stdio: opts.stdio || "pipe",
|
||||
shell: true
|
||||
});
|
||||
}
|
||||
|
||||
function checkCommand(cmd, args = ["--version"]) {
|
||||
const result = run(cmd, args);
|
||||
return result.status === 0;
|
||||
}
|
||||
|
||||
function detectPython() {
|
||||
const candidates = ["python3", "python", "py"];
|
||||
for (let c of candidates) {
|
||||
if (checkCommand(c)) return c;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function detectPip() {
|
||||
const candidates = ["pip3", "pip", "py -m pip"];
|
||||
for (let c of candidates) {
|
||||
if (checkCommand(c.split(" ")[0])) return c;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function isSuperClaudeInstalled(pipCmd) {
|
||||
const result = run(pipCmd, ["show", "SuperClaude"]);
|
||||
return result.status === 0;
|
||||
}
|
||||
|
||||
module.exports = { run, detectPython, detectPip, isSuperClaudeInstalled };
|
||||
Reference in New Issue
Block a user