shiva-code 0.7.12 → 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 +25 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11561,21 +11561,35 @@ function detectInstallationType() {
11561
11561
  }
11562
11562
  return "npm";
11563
11563
  }
11564
+ var CLI_VERSION = "0.7.13";
11564
11565
  function getCurrentVersion() {
11565
11566
  try {
11566
- const packageJsonPath = path13.resolve(__dirname, "../../package.json");
11567
- if (fs12.existsSync(packageJsonPath)) {
11568
- const packageJson = JSON.parse(fs12.readFileSync(packageJsonPath, "utf-8"));
11569
- return packageJson.version || "0.0.0";
11570
- }
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;
11571
11574
  } catch {
11572
11575
  }
11573
- try {
11574
- const output = execSync3(`"${process.execPath}" --version 2>/dev/null`, { encoding: "utf-8" }).trim();
11575
- return output || "0.0.0";
11576
- } catch {
11577
- 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
+ }
11578
11591
  }
11592
+ return CLI_VERSION;
11579
11593
  }
11580
11594
  async function getLatestNpmVersion() {
11581
11595
  try {
@@ -14524,7 +14538,7 @@ sandboxCommand.command("delete <id>").description("Sandbox l\xF6schen").option("
14524
14538
 
14525
14539
  // src/index.ts
14526
14540
  var program = new Command40();
14527
- program.name("shiva").description("SHIVA Code - Control Station for Claude Code").version("0.7.12").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) => {
14528
14542
  const opts = thisCommand.opts();
14529
14543
  if (opts.debug) {
14530
14544
  enableDebug();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shiva-code",
3
- "version": "0.7.12",
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",