@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 +6 -4
- package/package.json +1 -1
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.
|
|
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
|
|
6444
|
-
|
|
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
|
});
|