shiva-code 0.7.11 → 0.7.13

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 +28 -13
  2. 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(" " + colors.bgWhite.black(" Dark Mode ") + " F\xFCr dunkle Terminals (Standard)");
235
- console.log(" " + colors.bgBlack.white(" Light Mode ") + " F\xFCr helle Terminals");
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
  {
@@ -11560,21 +11561,35 @@ function detectInstallationType() {
11560
11561
  }
11561
11562
  return "npm";
11562
11563
  }
11564
+ var CLI_VERSION = "0.7.13";
11563
11565
  function getCurrentVersion() {
11564
11566
  try {
11565
- const packageJsonPath = path13.resolve(__dirname, "../../package.json");
11566
- if (fs12.existsSync(packageJsonPath)) {
11567
- const packageJson = JSON.parse(fs12.readFileSync(packageJsonPath, "utf-8"));
11568
- return packageJson.version || "0.0.0";
11569
- }
11567
+ const output = execSync3(`npm list -g ${PACKAGE_NAME} --depth=0 --json 2>/dev/null`, {
11568
+ encoding: "utf-8",
11569
+ timeout: 5e3
11570
+ });
11571
+ const data = JSON.parse(output);
11572
+ const version = data.dependencies?.[PACKAGE_NAME]?.version;
11573
+ if (version) return version;
11570
11574
  } catch {
11571
11575
  }
11572
- try {
11573
- const output = execSync3(`"${process.execPath}" --version 2>/dev/null`, { encoding: "utf-8" }).trim();
11574
- return output || "0.0.0";
11575
- } catch {
11576
- return "0.7.0";
11576
+ const possiblePaths = [
11577
+ path13.resolve(__dirname, "../package.json"),
11578
+ path13.resolve(__dirname, "../../package.json"),
11579
+ path13.resolve(__dirname, "../../../package.json")
11580
+ ];
11581
+ for (const pkgPath of possiblePaths) {
11582
+ try {
11583
+ if (fs12.existsSync(pkgPath)) {
11584
+ const packageJson = JSON.parse(fs12.readFileSync(pkgPath, "utf-8"));
11585
+ if (packageJson.name === PACKAGE_NAME && packageJson.version) {
11586
+ return packageJson.version;
11587
+ }
11588
+ }
11589
+ } catch {
11590
+ }
11577
11591
  }
11592
+ return CLI_VERSION;
11578
11593
  }
11579
11594
  async function getLatestNpmVersion() {
11580
11595
  try {
@@ -14523,7 +14538,7 @@ sandboxCommand.command("delete <id>").description("Sandbox l\xF6schen").option("
14523
14538
 
14524
14539
  // src/index.ts
14525
14540
  var program = new Command40();
14526
- program.name("shiva").description("SHIVA Code - Control Station for Claude Code").version("0.7.11").option("--debug", "Debug-Modus aktivieren").hook("preAction", (thisCommand) => {
14541
+ program.name("shiva").description("SHIVA Code - Control Station for Claude Code").version("0.7.13").option("--debug", "Debug-Modus aktivieren").hook("preAction", (thisCommand) => {
14527
14542
  const opts = thisCommand.opts();
14528
14543
  if (opts.debug) {
14529
14544
  enableDebug();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shiva-code",
3
- "version": "0.7.11",
3
+ "version": "0.7.13",
4
4
  "description": "Makes Claude Code Persistent - Cross-Project Memory CLI",
5
5
  "author": "SHIVA AI",
6
6
  "license": "MIT",