shiva-code 0.7.10 → 0.7.11
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 +47 -21
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11804,63 +11804,89 @@ async function runPackageManagerUpgrade(pm) {
|
|
|
11804
11804
|
}
|
|
11805
11805
|
var upgradeCommand = new Command29("upgrade").description("SHIVA CLI aktualisieren").option("-c, --check", "Nur auf Updates pr\xFCfen, nicht installieren").option("-f, --force", "Update erzwingen, auch wenn aktuell").option("--npm", "npm verwenden (f\xFCr npm-Installationen)").option("--yarn", "yarn verwenden").option("--pnpm", "pnpm verwenden").option("--native", "Native Binary Update erzwingen").action(async (options) => {
|
|
11806
11806
|
log.newline();
|
|
11807
|
-
console.log(colors.orange.bold("\
|
|
11807
|
+
console.log(colors.orange.bold("\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E"));
|
|
11808
|
+
console.log(colors.orange.bold("\u2502") + " \u{1F680} " + colors.orange.bold("SHIVA") + " " + colors.cyan("Upgrade") + " " + colors.orange.bold("\u2502"));
|
|
11809
|
+
console.log(colors.orange.bold("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"));
|
|
11808
11810
|
log.newline();
|
|
11809
11811
|
let installType = detectInstallationType();
|
|
11810
11812
|
if (options.native) installType = "native";
|
|
11811
11813
|
else if (options.npm) installType = "npm";
|
|
11812
11814
|
else if (options.yarn) installType = "yarn";
|
|
11813
11815
|
else if (options.pnpm) installType = "pnpm";
|
|
11814
|
-
|
|
11816
|
+
const installBadge = installType === "native" ? colors.purple("binary") : colors.cyan(installType);
|
|
11817
|
+
console.log(colors.dim(" Installation:") + " " + installBadge);
|
|
11815
11818
|
log.newline();
|
|
11816
|
-
log.
|
|
11819
|
+
console.log(colors.orange(" \u25CC") + " Pr\xFCfe auf Updates...");
|
|
11817
11820
|
const versionInfo = await checkForUpdates(installType);
|
|
11818
|
-
|
|
11819
|
-
console.log(
|
|
11820
|
-
|
|
11821
|
+
process.stdout.write("\x1B[1A\x1B[2K");
|
|
11822
|
+
console.log(colors.orange(" \u25CF") + " Version-Check abgeschlossen");
|
|
11823
|
+
log.newline();
|
|
11824
|
+
const currentDisplay = colors.dim("v") + colors.bold(versionInfo.current);
|
|
11825
|
+
const latestDisplay = colors.dim("v") + colors.green.bold(versionInfo.latest);
|
|
11826
|
+
const arrow = versionInfo.isOutdated ? colors.orange(" \u2500\u2500\u25B6 ") : colors.green(" \u2550\u2550\u2550 ");
|
|
11827
|
+
console.log(colors.orange(" \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"));
|
|
11828
|
+
if (versionInfo.isOutdated) {
|
|
11829
|
+
console.log(colors.orange(" \u2502") + " " + currentDisplay + arrow + latestDisplay + " " + colors.orange("\u2502"));
|
|
11830
|
+
console.log(colors.orange(" \u2502") + " " + colors.yellow.bold("UPDATE VERF\xDCGBAR") + " " + colors.orange("\u2502"));
|
|
11831
|
+
} else {
|
|
11832
|
+
console.log(colors.orange(" \u2502") + " " + currentDisplay + arrow + latestDisplay + " " + colors.orange("\u2502"));
|
|
11833
|
+
console.log(colors.orange(" \u2502") + " " + colors.green.bold("AKTUELL \u2713") + " " + colors.orange("\u2502"));
|
|
11834
|
+
}
|
|
11835
|
+
console.log(colors.orange(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"));
|
|
11836
|
+
log.newline();
|
|
11837
|
+
const sourceIcon = versionInfo.source === "npm" ? "\u{1F4E6}" : "\u{1F419}";
|
|
11838
|
+
console.log(colors.dim(` ${sourceIcon} Quelle: ${versionInfo.source}`));
|
|
11821
11839
|
log.newline();
|
|
11822
11840
|
if (!versionInfo.isOutdated && !options.force) {
|
|
11823
|
-
log.
|
|
11841
|
+
console.log(colors.green(" \u2713") + " SHIVA ist bereits auf dem neuesten Stand!");
|
|
11842
|
+
log.newline();
|
|
11824
11843
|
return;
|
|
11825
11844
|
}
|
|
11826
|
-
if (versionInfo.isOutdated) {
|
|
11827
|
-
log.warn(`Update verf\xFCgbar: ${versionInfo.current} \u2192 ${versionInfo.latest}`);
|
|
11828
|
-
}
|
|
11829
11845
|
if (options.check) {
|
|
11830
11846
|
if (versionInfo.isOutdated) {
|
|
11831
11847
|
log.newline();
|
|
11832
|
-
log.
|
|
11848
|
+
console.log(colors.cyan(" \u2192") + " Zum Aktualisieren: " + colors.bold("shiva upgrade"));
|
|
11833
11849
|
}
|
|
11850
|
+
log.newline();
|
|
11834
11851
|
return;
|
|
11835
11852
|
}
|
|
11853
|
+
console.log(colors.orange(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
|
|
11836
11854
|
log.newline();
|
|
11837
11855
|
let success;
|
|
11838
11856
|
if (installType === "native") {
|
|
11839
11857
|
success = await updateNativeBinary(versionInfo.latest);
|
|
11840
11858
|
} else {
|
|
11841
|
-
log.
|
|
11859
|
+
console.log(colors.cyan(" \u2192") + ` Verwende ${colors.bold(installType)}`);
|
|
11860
|
+
log.newline();
|
|
11842
11861
|
success = await runPackageManagerUpgrade(installType);
|
|
11843
11862
|
}
|
|
11844
11863
|
log.newline();
|
|
11845
11864
|
if (success) {
|
|
11846
|
-
log.
|
|
11865
|
+
console.log(colors.green(" \u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E"));
|
|
11866
|
+
console.log(colors.green(" \u2502") + " \u2713 " + colors.green.bold("Upgrade erfolgreich!") + " " + colors.green("\u2502"));
|
|
11867
|
+
console.log(colors.green(" \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"));
|
|
11868
|
+
log.newline();
|
|
11847
11869
|
if (installType !== "native" || os6.platform() !== "win32") {
|
|
11848
11870
|
const newVersion = getCurrentVersion();
|
|
11849
11871
|
if (newVersion !== versionInfo.current) {
|
|
11850
|
-
log.
|
|
11872
|
+
console.log(colors.dim(" Neue Version:") + " " + colors.green.bold("v" + newVersion));
|
|
11873
|
+
log.newline();
|
|
11851
11874
|
}
|
|
11852
11875
|
}
|
|
11853
11876
|
} else {
|
|
11854
|
-
log.
|
|
11877
|
+
console.log(colors.red(" \u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E"));
|
|
11878
|
+
console.log(colors.red(" \u2502") + " \u2717 " + colors.red.bold("Upgrade fehlgeschlagen") + " " + colors.red("\u2502"));
|
|
11879
|
+
console.log(colors.red(" \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"));
|
|
11855
11880
|
log.newline();
|
|
11856
11881
|
if (installType === "native") {
|
|
11857
|
-
log.
|
|
11858
|
-
log.
|
|
11859
|
-
log.
|
|
11882
|
+
console.log(colors.dim(" Alternativen:"));
|
|
11883
|
+
console.log(" " + colors.cyan("curl -fsSL https://shiva.li/install | bash"));
|
|
11884
|
+
console.log(" " + colors.cyan("npm install -g shiva-code"));
|
|
11860
11885
|
} else {
|
|
11861
|
-
log.
|
|
11862
|
-
log.
|
|
11886
|
+
console.log(colors.dim(" Versuche manuell:"));
|
|
11887
|
+
console.log(" " + colors.cyan(getUpgradeCommand(installType)));
|
|
11863
11888
|
}
|
|
11889
|
+
log.newline();
|
|
11864
11890
|
}
|
|
11865
11891
|
});
|
|
11866
11892
|
var selfUpdateCommand = new Command29("self-update").description('Alias f\xFCr "shiva upgrade"').action(async () => {
|
|
@@ -14497,7 +14523,7 @@ sandboxCommand.command("delete <id>").description("Sandbox l\xF6schen").option("
|
|
|
14497
14523
|
|
|
14498
14524
|
// src/index.ts
|
|
14499
14525
|
var program = new Command40();
|
|
14500
|
-
program.name("shiva").description("SHIVA Code - Control Station for Claude Code").version("0.7.
|
|
14526
|
+
program.name("shiva").description("SHIVA Code - Control Station for Claude Code").version("0.7.11").option("--debug", "Debug-Modus aktivieren").hook("preAction", (thisCommand) => {
|
|
14501
14527
|
const opts = thisCommand.opts();
|
|
14502
14528
|
if (opts.debug) {
|
|
14503
14529
|
enableDebug();
|