@divergeai/cli 0.1.5 → 0.1.6
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/diverge.mjs +8 -2
- package/package.json +1 -1
package/dist/diverge.mjs
CHANGED
|
@@ -7387,7 +7387,7 @@ import path10 from "node:path";
|
|
|
7387
7387
|
import { parseArgs } from "node:util";
|
|
7388
7388
|
|
|
7389
7389
|
// src/version.ts
|
|
7390
|
-
var VERSION = true ? "0.1.
|
|
7390
|
+
var VERSION = true ? "0.1.6" : "dev";
|
|
7391
7391
|
var USER_AGENT = `diverge/${VERSION}`;
|
|
7392
7392
|
|
|
7393
7393
|
// src/http.ts
|
|
@@ -7441,7 +7441,13 @@ function openerCommand(url, env = process.env, platform = process.platform) {
|
|
|
7441
7441
|
if (custom) return { command: custom, args: [url] };
|
|
7442
7442
|
if (platform === "darwin") return { command: "open", args: [url] };
|
|
7443
7443
|
if (platform === "win32") {
|
|
7444
|
-
|
|
7444
|
+
const root = env.SYSTEMROOT || env.windir || "C:\\Windows";
|
|
7445
|
+
const script = `Start-Process -FilePath '${url.replace(/'/g, "''")}'`;
|
|
7446
|
+
return {
|
|
7447
|
+
command: `${root}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`,
|
|
7448
|
+
args: ["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-EncodedCommand", Buffer.from(script, "utf16le").toString("base64")],
|
|
7449
|
+
windowsVerbatimArguments: true
|
|
7450
|
+
};
|
|
7445
7451
|
}
|
|
7446
7452
|
return { command: "xdg-open", args: [url] };
|
|
7447
7453
|
}
|