shiva-code 0.7.10 → 0.7.12
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 +50 -23
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -143,6 +143,7 @@ import { homedir } from "os";
|
|
|
143
143
|
import { join } from "path";
|
|
144
144
|
import Conf from "conf";
|
|
145
145
|
import inquirer from "inquirer";
|
|
146
|
+
import chalk from "chalk";
|
|
146
147
|
var onboardingStore = new Conf({
|
|
147
148
|
projectName: "shiva-code",
|
|
148
149
|
configName: "onboarding",
|
|
@@ -231,8 +232,8 @@ async function selectTheme() {
|
|
|
231
232
|
log.newline();
|
|
232
233
|
console.log(colors.bold(" W\xE4hle ein Theme f\xFCr bessere Lesbarkeit:"));
|
|
233
234
|
log.newline();
|
|
234
|
-
console.log(" " +
|
|
235
|
-
console.log(" " +
|
|
235
|
+
console.log(" " + chalk.bgWhite.black(" Dark Mode ") + " F\xFCr dunkle Terminals (Standard)");
|
|
236
|
+
console.log(" " + chalk.bgBlack.white(" Light Mode ") + " F\xFCr helle Terminals");
|
|
236
237
|
log.newline();
|
|
237
238
|
const { theme } = await inquirer.prompt([
|
|
238
239
|
{
|
|
@@ -11804,63 +11805,89 @@ async function runPackageManagerUpgrade(pm) {
|
|
|
11804
11805
|
}
|
|
11805
11806
|
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
11807
|
log.newline();
|
|
11807
|
-
console.log(colors.orange.bold("\
|
|
11808
|
+
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"));
|
|
11809
|
+
console.log(colors.orange.bold("\u2502") + " \u{1F680} " + colors.orange.bold("SHIVA") + " " + colors.cyan("Upgrade") + " " + colors.orange.bold("\u2502"));
|
|
11810
|
+
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
11811
|
log.newline();
|
|
11809
11812
|
let installType = detectInstallationType();
|
|
11810
11813
|
if (options.native) installType = "native";
|
|
11811
11814
|
else if (options.npm) installType = "npm";
|
|
11812
11815
|
else if (options.yarn) installType = "yarn";
|
|
11813
11816
|
else if (options.pnpm) installType = "pnpm";
|
|
11814
|
-
|
|
11817
|
+
const installBadge = installType === "native" ? colors.purple("binary") : colors.cyan(installType);
|
|
11818
|
+
console.log(colors.dim(" Installation:") + " " + installBadge);
|
|
11815
11819
|
log.newline();
|
|
11816
|
-
log.
|
|
11820
|
+
console.log(colors.orange(" \u25CC") + " Pr\xFCfe auf Updates...");
|
|
11817
11821
|
const versionInfo = await checkForUpdates(installType);
|
|
11818
|
-
|
|
11819
|
-
console.log(
|
|
11820
|
-
|
|
11822
|
+
process.stdout.write("\x1B[1A\x1B[2K");
|
|
11823
|
+
console.log(colors.orange(" \u25CF") + " Version-Check abgeschlossen");
|
|
11824
|
+
log.newline();
|
|
11825
|
+
const currentDisplay = colors.dim("v") + colors.bold(versionInfo.current);
|
|
11826
|
+
const latestDisplay = colors.dim("v") + colors.green.bold(versionInfo.latest);
|
|
11827
|
+
const arrow = versionInfo.isOutdated ? colors.orange(" \u2500\u2500\u25B6 ") : colors.green(" \u2550\u2550\u2550 ");
|
|
11828
|
+
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"));
|
|
11829
|
+
if (versionInfo.isOutdated) {
|
|
11830
|
+
console.log(colors.orange(" \u2502") + " " + currentDisplay + arrow + latestDisplay + " " + colors.orange("\u2502"));
|
|
11831
|
+
console.log(colors.orange(" \u2502") + " " + colors.yellow.bold("UPDATE VERF\xDCGBAR") + " " + colors.orange("\u2502"));
|
|
11832
|
+
} else {
|
|
11833
|
+
console.log(colors.orange(" \u2502") + " " + currentDisplay + arrow + latestDisplay + " " + colors.orange("\u2502"));
|
|
11834
|
+
console.log(colors.orange(" \u2502") + " " + colors.green.bold("AKTUELL \u2713") + " " + colors.orange("\u2502"));
|
|
11835
|
+
}
|
|
11836
|
+
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"));
|
|
11837
|
+
log.newline();
|
|
11838
|
+
const sourceIcon = versionInfo.source === "npm" ? "\u{1F4E6}" : "\u{1F419}";
|
|
11839
|
+
console.log(colors.dim(` ${sourceIcon} Quelle: ${versionInfo.source}`));
|
|
11821
11840
|
log.newline();
|
|
11822
11841
|
if (!versionInfo.isOutdated && !options.force) {
|
|
11823
|
-
log.
|
|
11842
|
+
console.log(colors.green(" \u2713") + " SHIVA ist bereits auf dem neuesten Stand!");
|
|
11843
|
+
log.newline();
|
|
11824
11844
|
return;
|
|
11825
11845
|
}
|
|
11826
|
-
if (versionInfo.isOutdated) {
|
|
11827
|
-
log.warn(`Update verf\xFCgbar: ${versionInfo.current} \u2192 ${versionInfo.latest}`);
|
|
11828
|
-
}
|
|
11829
11846
|
if (options.check) {
|
|
11830
11847
|
if (versionInfo.isOutdated) {
|
|
11831
11848
|
log.newline();
|
|
11832
|
-
log.
|
|
11849
|
+
console.log(colors.cyan(" \u2192") + " Zum Aktualisieren: " + colors.bold("shiva upgrade"));
|
|
11833
11850
|
}
|
|
11851
|
+
log.newline();
|
|
11834
11852
|
return;
|
|
11835
11853
|
}
|
|
11854
|
+
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
11855
|
log.newline();
|
|
11837
11856
|
let success;
|
|
11838
11857
|
if (installType === "native") {
|
|
11839
11858
|
success = await updateNativeBinary(versionInfo.latest);
|
|
11840
11859
|
} else {
|
|
11841
|
-
log.
|
|
11860
|
+
console.log(colors.cyan(" \u2192") + ` Verwende ${colors.bold(installType)}`);
|
|
11861
|
+
log.newline();
|
|
11842
11862
|
success = await runPackageManagerUpgrade(installType);
|
|
11843
11863
|
}
|
|
11844
11864
|
log.newline();
|
|
11845
11865
|
if (success) {
|
|
11846
|
-
log.
|
|
11866
|
+
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"));
|
|
11867
|
+
console.log(colors.green(" \u2502") + " \u2713 " + colors.green.bold("Upgrade erfolgreich!") + " " + colors.green("\u2502"));
|
|
11868
|
+
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"));
|
|
11869
|
+
log.newline();
|
|
11847
11870
|
if (installType !== "native" || os6.platform() !== "win32") {
|
|
11848
11871
|
const newVersion = getCurrentVersion();
|
|
11849
11872
|
if (newVersion !== versionInfo.current) {
|
|
11850
|
-
log.
|
|
11873
|
+
console.log(colors.dim(" Neue Version:") + " " + colors.green.bold("v" + newVersion));
|
|
11874
|
+
log.newline();
|
|
11851
11875
|
}
|
|
11852
11876
|
}
|
|
11853
11877
|
} else {
|
|
11854
|
-
log.
|
|
11878
|
+
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"));
|
|
11879
|
+
console.log(colors.red(" \u2502") + " \u2717 " + colors.red.bold("Upgrade fehlgeschlagen") + " " + colors.red("\u2502"));
|
|
11880
|
+
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
11881
|
log.newline();
|
|
11856
11882
|
if (installType === "native") {
|
|
11857
|
-
log.
|
|
11858
|
-
log.
|
|
11859
|
-
log.
|
|
11883
|
+
console.log(colors.dim(" Alternativen:"));
|
|
11884
|
+
console.log(" " + colors.cyan("curl -fsSL https://shiva.li/install | bash"));
|
|
11885
|
+
console.log(" " + colors.cyan("npm install -g shiva-code"));
|
|
11860
11886
|
} else {
|
|
11861
|
-
log.
|
|
11862
|
-
log.
|
|
11887
|
+
console.log(colors.dim(" Versuche manuell:"));
|
|
11888
|
+
console.log(" " + colors.cyan(getUpgradeCommand(installType)));
|
|
11863
11889
|
}
|
|
11890
|
+
log.newline();
|
|
11864
11891
|
}
|
|
11865
11892
|
});
|
|
11866
11893
|
var selfUpdateCommand = new Command29("self-update").description('Alias f\xFCr "shiva upgrade"').action(async () => {
|
|
@@ -14497,7 +14524,7 @@ sandboxCommand.command("delete <id>").description("Sandbox l\xF6schen").option("
|
|
|
14497
14524
|
|
|
14498
14525
|
// src/index.ts
|
|
14499
14526
|
var program = new Command40();
|
|
14500
|
-
program.name("shiva").description("SHIVA Code - Control Station for Claude Code").version("0.7.
|
|
14527
|
+
program.name("shiva").description("SHIVA Code - Control Station for Claude Code").version("0.7.12").option("--debug", "Debug-Modus aktivieren").hook("preAction", (thisCommand) => {
|
|
14501
14528
|
const opts = thisCommand.opts();
|
|
14502
14529
|
if (opts.debug) {
|
|
14503
14530
|
enableDebug();
|