@yorz/cli 0.6.0 → 0.6.2

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/cli/index.js CHANGED
@@ -22,7 +22,7 @@ import { createOpencode } from "@opencode-ai/sdk";
22
22
  import { createInterface as createInterface$1 } from "node:readline/promises";
23
23
  import MarkdownIt from "markdown-it";
24
24
  const name = "@yorz/cli";
25
- const version = "0.6.0";
25
+ const version = "0.6.2";
26
26
  const type = "module";
27
27
  const description = "";
28
28
  const bin = { "yorz": "./dist/cli/index.js" };
@@ -6417,6 +6417,9 @@ function resolveGlobalInstallCommand(env = process.env, argv = process.argv) {
6417
6417
  return { cmd: "npm", args: ["install", "-g", "@yorz/cli@latest"] };
6418
6418
  }
6419
6419
  }
6420
+ function resolveRestartCommand(platform2 = process.platform) {
6421
+ return { cmd: platform2 === "win32" ? "yorz.cmd" : "yorz", args: ["serve", "restart"] };
6422
+ }
6420
6423
  function detectPackageManager(values) {
6421
6424
  const source = values.filter(Boolean).join(" ").toLowerCase();
6422
6425
  if (source.includes("pnpm")) return "pnpm";
@@ -6440,9 +6443,8 @@ function defaultRunUpdate() {
6440
6443
  return runProcess(install2.cmd, install2.args);
6441
6444
  }
6442
6445
  function defaultRunRestart() {
6443
- const entry = process.argv[1];
6444
- if (!entry) throw new Error("Cannot resolve CLI entrypoint for restart");
6445
- const child = spawn(process.execPath, [entry, "serve", "restart"], {
6446
+ const restart = resolveRestartCommand();
6447
+ const child = spawn(restart.cmd, restart.args, {
6446
6448
  detached: true,
6447
6449
  stdio: "ignore"
6448
6450
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yorz/cli",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "bin": {