shiva-code 0.7.16 → 0.7.17

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.
Files changed (2) hide show
  1. package/dist/index.js +41 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -12845,7 +12845,7 @@ function detectInstallationType() {
12845
12845
  }
12846
12846
  return "npm";
12847
12847
  }
12848
- var CLI_VERSION = "0.7.16";
12848
+ var CLI_VERSION = "0.7.17";
12849
12849
  function getCurrentVersion() {
12850
12850
  try {
12851
12851
  const output = execSync3(`npm list -g ${PACKAGE_NAME} --depth=0 --json 2>/dev/null`, {
@@ -13101,11 +13101,18 @@ async function runPackageManagerUpgrade(pm) {
13101
13101
  });
13102
13102
  });
13103
13103
  }
13104
+ function drawUpgradeBox(title, width = 40) {
13105
+ const innerWidth = width - 2;
13106
+ const visibleLen = title.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "").length;
13107
+ const paddingLeft = Math.floor((innerWidth - visibleLen) / 2);
13108
+ const paddingRight = innerWidth - visibleLen - paddingLeft;
13109
+ console.log(colors.orange(" \u256D" + "\u2500".repeat(innerWidth) + "\u256E"));
13110
+ console.log(colors.orange(" \u2502") + " ".repeat(paddingLeft) + title + " ".repeat(paddingRight) + colors.orange("\u2502"));
13111
+ console.log(colors.orange(" \u2570" + "\u2500".repeat(innerWidth) + "\u256F"));
13112
+ }
13104
13113
  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) => {
13105
13114
  log.newline();
13106
- 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"));
13107
- console.log(colors.orange.bold("\u2502") + " \u{1F680} " + colors.orange.bold("SHIVA") + " " + colors.cyan("Upgrade") + " " + colors.orange.bold("\u2502"));
13108
- 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"));
13115
+ drawUpgradeBox("\u{1F680} " + colors.bold("SHIVA") + " " + colors.cyan("Upgrade"), 36);
13109
13116
  log.newline();
13110
13117
  let installType = detectInstallationType();
13111
13118
  if (options.native) installType = "native";
@@ -13120,18 +13127,24 @@ var upgradeCommand = new Command29("upgrade").description("SHIVA CLI aktualisier
13120
13127
  process.stdout.write("\x1B[1A\x1B[2K");
13121
13128
  console.log(colors.orange(" \u25CF") + " Version-Check abgeschlossen");
13122
13129
  log.newline();
13123
- const currentDisplay = colors.dim("v") + colors.bold(versionInfo.current);
13124
- const latestDisplay = colors.dim("v") + colors.green.bold(versionInfo.latest);
13125
- const arrow = versionInfo.isOutdated ? colors.orange(" \u2500\u2500\u25B6 ") : colors.green(" \u2550\u2550\u2550 ");
13126
- 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"));
13130
+ const BOX_WIDTH = 34;
13131
+ const current = `v${versionInfo.current}`;
13132
+ const latest = `v${versionInfo.latest}`;
13133
+ const arrow = versionInfo.isOutdated ? " \u2192 " : " = ";
13134
+ const versionLine = current + arrow + latest;
13135
+ const statusText = versionInfo.isOutdated ? "UPDATE VERF\xDCGBAR" : "AKTUELL \u2713";
13136
+ const vPadLeft = Math.floor((BOX_WIDTH - 2 - versionLine.length) / 2);
13137
+ const vPadRight = BOX_WIDTH - 2 - versionLine.length - vPadLeft;
13138
+ const sPadLeft = Math.floor((BOX_WIDTH - 2 - statusText.length) / 2);
13139
+ const sPadRight = BOX_WIDTH - 2 - statusText.length - sPadLeft;
13140
+ console.log(colors.orange(" \u250C" + "\u2500".repeat(BOX_WIDTH - 2) + "\u2510"));
13141
+ console.log(colors.orange(" \u2502") + " ".repeat(vPadLeft) + colors.bold(current) + colors.dim(arrow) + colors.green.bold(latest) + " ".repeat(vPadRight) + colors.orange("\u2502"));
13127
13142
  if (versionInfo.isOutdated) {
13128
- console.log(colors.orange(" \u2502") + " " + currentDisplay + arrow + latestDisplay + " " + colors.orange("\u2502"));
13129
- console.log(colors.orange(" \u2502") + " " + colors.yellow.bold("UPDATE VERF\xDCGBAR") + " " + colors.orange("\u2502"));
13143
+ console.log(colors.orange(" \u2502") + " ".repeat(sPadLeft) + colors.yellow.bold(statusText) + " ".repeat(sPadRight) + colors.orange("\u2502"));
13130
13144
  } else {
13131
- console.log(colors.orange(" \u2502") + " " + currentDisplay + arrow + latestDisplay + " " + colors.orange("\u2502"));
13132
- console.log(colors.orange(" \u2502") + " " + colors.green.bold("AKTUELL \u2713") + " " + colors.orange("\u2502"));
13145
+ console.log(colors.orange(" \u2502") + " ".repeat(sPadLeft) + colors.green.bold(statusText) + " ".repeat(sPadRight) + colors.orange("\u2502"));
13133
13146
  }
13134
- 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"));
13147
+ console.log(colors.orange(" \u2514" + "\u2500".repeat(BOX_WIDTH - 2) + "\u2518"));
13135
13148
  log.newline();
13136
13149
  const sourceIcon = versionInfo.source === "npm" ? "\u{1F4E6}" : "\u{1F419}";
13137
13150
  console.log(colors.dim(` ${sourceIcon} Quelle: ${versionInfo.source}`));
@@ -13161,9 +13174,13 @@ var upgradeCommand = new Command29("upgrade").description("SHIVA CLI aktualisier
13161
13174
  }
13162
13175
  log.newline();
13163
13176
  if (success) {
13164
- 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"));
13165
- console.log(colors.green(" \u2502") + " \u2713 " + colors.green.bold("Upgrade erfolgreich!") + " " + colors.green("\u2502"));
13166
- 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"));
13177
+ const successMsg = "\u2713 Upgrade erfolgreich!";
13178
+ const sWidth = 32;
13179
+ const sPad = Math.floor((sWidth - 2 - successMsg.length) / 2);
13180
+ const sPadR = sWidth - 2 - successMsg.length - sPad;
13181
+ console.log(colors.green(" \u256D" + "\u2500".repeat(sWidth - 2) + "\u256E"));
13182
+ console.log(colors.green(" \u2502") + " ".repeat(sPad) + colors.green.bold(successMsg) + " ".repeat(sPadR) + colors.green("\u2502"));
13183
+ console.log(colors.green(" \u2570" + "\u2500".repeat(sWidth - 2) + "\u256F"));
13167
13184
  log.newline();
13168
13185
  if (installType !== "native" || os6.platform() !== "win32") {
13169
13186
  const newVersion = getCurrentVersion();
@@ -13173,9 +13190,13 @@ var upgradeCommand = new Command29("upgrade").description("SHIVA CLI aktualisier
13173
13190
  }
13174
13191
  }
13175
13192
  } else {
13176
- 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"));
13177
- console.log(colors.red(" \u2502") + " \u2717 " + colors.red.bold("Upgrade fehlgeschlagen") + " " + colors.red("\u2502"));
13178
- 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"));
13193
+ const errorMsg = "\u2717 Upgrade fehlgeschlagen";
13194
+ const eWidth = 32;
13195
+ const ePad = Math.floor((eWidth - 2 - errorMsg.length) / 2);
13196
+ const ePadR = eWidth - 2 - errorMsg.length - ePad;
13197
+ console.log(colors.red(" \u256D" + "\u2500".repeat(eWidth - 2) + "\u256E"));
13198
+ console.log(colors.red(" \u2502") + " ".repeat(ePad) + colors.red.bold(errorMsg) + " ".repeat(ePadR) + colors.red("\u2502"));
13199
+ console.log(colors.red(" \u2570" + "\u2500".repeat(eWidth - 2) + "\u256F"));
13179
13200
  log.newline();
13180
13201
  if (installType === "native") {
13181
13202
  console.log(colors.dim(" Alternativen:"));
@@ -16602,7 +16623,7 @@ sandboxCommand.command("delete <id>").description("Sandbox l\xF6schen").option("
16602
16623
 
16603
16624
  // src/index.ts
16604
16625
  var program = new Command41();
16605
- program.name("shiva").description("SHIVA Code - Control Station for Claude Code").version("0.7.16").option("--debug", "Debug-Modus aktivieren").hook("preAction", (thisCommand) => {
16626
+ program.name("shiva").description("SHIVA Code - Control Station for Claude Code").version("0.7.17").option("--debug", "Debug-Modus aktivieren").hook("preAction", (thisCommand) => {
16606
16627
  const opts = thisCommand.opts();
16607
16628
  if (opts.debug) {
16608
16629
  enableDebug();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shiva-code",
3
- "version": "0.7.16",
3
+ "version": "0.7.17",
4
4
  "description": "Makes Claude Code Persistent - Cross-Project Memory CLI",
5
5
  "author": "SHIVA AI",
6
6
  "license": "MIT",