@base44-preview/cli 0.0.17-pr.110.9a4891a → 0.0.17-pr.111.1ac2475
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/index.js +865 -898
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,21 +3,19 @@ import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:
|
|
|
3
3
|
import childProcess, { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
|
|
4
4
|
import path, { basename, dirname, join, posix, resolve, win32 } from "node:path";
|
|
5
5
|
import fs, { appendFileSync, createReadStream, createWriteStream, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
6
|
-
import
|
|
6
|
+
import y, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
|
|
7
7
|
import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
|
|
8
8
|
import * as g from "node:readline";
|
|
9
9
|
import O from "node:readline";
|
|
10
10
|
import Stream, { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark } from "node:stream";
|
|
11
|
+
import os, { constants, homedir, tmpdir } from "node:os";
|
|
11
12
|
import { fileURLToPath } from "node:url";
|
|
12
|
-
import fs$1, { access, constants, copyFile, mkdir, readFile, unlink, writeFile } from "node:fs/promises";
|
|
13
|
-
import os, { constants as constants$1, homedir, tmpdir } from "node:os";
|
|
14
|
-
import { Buffer as Buffer$1 } from "node:buffer";
|
|
15
|
-
import * as readline from "readline";
|
|
13
|
+
import fs$1, { access, constants as constants$1, copyFile, mkdir, readFile, unlink, writeFile } from "node:fs/promises";
|
|
16
14
|
import { finished } from "node:stream/promises";
|
|
17
15
|
import path$1, { dirname as dirname$1, parse } from "path";
|
|
18
16
|
import EE, { EventEmitter as EventEmitter$1 } from "events";
|
|
19
17
|
import fs$2 from "fs";
|
|
20
|
-
import { Buffer as Buffer$
|
|
18
|
+
import { Buffer as Buffer$1 } from "buffer";
|
|
21
19
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
22
20
|
import { StringDecoder } from "node:string_decoder";
|
|
23
21
|
import assert from "assert";
|
|
@@ -27,6 +25,7 @@ import assert$1 from "node:assert";
|
|
|
27
25
|
import tty from "node:tty";
|
|
28
26
|
import { scheduler, setImmediate as setImmediate$1, setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
29
27
|
import { serialize } from "node:v8";
|
|
28
|
+
import { Buffer as Buffer$2 } from "node:buffer";
|
|
30
29
|
|
|
31
30
|
//#region rolldown:runtime
|
|
32
31
|
var __create = Object.create;
|
|
@@ -894,7 +893,7 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
894
893
|
const childProcess$1 = __require("node:child_process");
|
|
895
894
|
const path$15 = __require("node:path");
|
|
896
895
|
const fs$10 = __require("node:fs");
|
|
897
|
-
const process$
|
|
896
|
+
const process$3 = __require("node:process");
|
|
898
897
|
const { Argument, humanReadableArgName } = require_argument();
|
|
899
898
|
const { CommanderError } = require_error$1();
|
|
900
899
|
const { Help } = require_help();
|
|
@@ -945,10 +944,10 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
945
944
|
this._showHelpAfterError = false;
|
|
946
945
|
this._showSuggestionAfterError = true;
|
|
947
946
|
this._outputConfiguration = {
|
|
948
|
-
writeOut: (str) => process$
|
|
949
|
-
writeErr: (str) => process$
|
|
950
|
-
getOutHelpWidth: () => process$
|
|
951
|
-
getErrHelpWidth: () => process$
|
|
947
|
+
writeOut: (str) => process$3.stdout.write(str),
|
|
948
|
+
writeErr: (str) => process$3.stderr.write(str),
|
|
949
|
+
getOutHelpWidth: () => process$3.stdout.isTTY ? process$3.stdout.columns : void 0,
|
|
950
|
+
getErrHelpWidth: () => process$3.stderr.isTTY ? process$3.stderr.columns : void 0,
|
|
952
951
|
outputError: (str, write) => write(str)
|
|
953
952
|
};
|
|
954
953
|
this._hidden = false;
|
|
@@ -1302,7 +1301,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1302
1301
|
*/
|
|
1303
1302
|
_exit(exitCode, code$1, message) {
|
|
1304
1303
|
if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code$1, message));
|
|
1305
|
-
process$
|
|
1304
|
+
process$3.exit(exitCode);
|
|
1306
1305
|
}
|
|
1307
1306
|
/**
|
|
1308
1307
|
* Register callback `fn` for the command.
|
|
@@ -1641,11 +1640,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1641
1640
|
if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
|
|
1642
1641
|
parseOptions = parseOptions || {};
|
|
1643
1642
|
if (argv === void 0 && parseOptions.from === void 0) {
|
|
1644
|
-
if (process$
|
|
1645
|
-
const execArgv$1 = process$
|
|
1643
|
+
if (process$3.versions?.electron) parseOptions.from = "electron";
|
|
1644
|
+
const execArgv$1 = process$3.execArgv ?? [];
|
|
1646
1645
|
if (execArgv$1.includes("-e") || execArgv$1.includes("--eval") || execArgv$1.includes("-p") || execArgv$1.includes("--print")) parseOptions.from = "eval";
|
|
1647
1646
|
}
|
|
1648
|
-
if (argv === void 0) argv = process$
|
|
1647
|
+
if (argv === void 0) argv = process$3.argv;
|
|
1649
1648
|
this.rawArgs = argv.slice();
|
|
1650
1649
|
let userArgs;
|
|
1651
1650
|
switch (parseOptions.from) {
|
|
@@ -1655,7 +1654,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1655
1654
|
userArgs = argv.slice(2);
|
|
1656
1655
|
break;
|
|
1657
1656
|
case "electron":
|
|
1658
|
-
if (process$
|
|
1657
|
+
if (process$3.defaultApp) {
|
|
1659
1658
|
this._scriptPath = argv[1];
|
|
1660
1659
|
userArgs = argv.slice(2);
|
|
1661
1660
|
} else userArgs = argv.slice(1);
|
|
@@ -1769,15 +1768,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1769
1768
|
}
|
|
1770
1769
|
launchWithNode = sourceExt.includes(path$15.extname(executableFile));
|
|
1771
1770
|
let proc$1;
|
|
1772
|
-
if (process$
|
|
1771
|
+
if (process$3.platform !== "win32") if (launchWithNode) {
|
|
1773
1772
|
args.unshift(executableFile);
|
|
1774
|
-
args = incrementNodeInspectorPort(process$
|
|
1775
|
-
proc$1 = childProcess$1.spawn(process$
|
|
1773
|
+
args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
|
|
1774
|
+
proc$1 = childProcess$1.spawn(process$3.argv[0], args, { stdio: "inherit" });
|
|
1776
1775
|
} else proc$1 = childProcess$1.spawn(executableFile, args, { stdio: "inherit" });
|
|
1777
1776
|
else {
|
|
1778
1777
|
args.unshift(executableFile);
|
|
1779
|
-
args = incrementNodeInspectorPort(process$
|
|
1780
|
-
proc$1 = childProcess$1.spawn(process$
|
|
1778
|
+
args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
|
|
1779
|
+
proc$1 = childProcess$1.spawn(process$3.execPath, args, { stdio: "inherit" });
|
|
1781
1780
|
}
|
|
1782
1781
|
if (!proc$1.killed) [
|
|
1783
1782
|
"SIGUSR1",
|
|
@@ -1786,14 +1785,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1786
1785
|
"SIGINT",
|
|
1787
1786
|
"SIGHUP"
|
|
1788
1787
|
].forEach((signal) => {
|
|
1789
|
-
process$
|
|
1788
|
+
process$3.on(signal, () => {
|
|
1790
1789
|
if (proc$1.killed === false && proc$1.exitCode === null) proc$1.kill(signal);
|
|
1791
1790
|
});
|
|
1792
1791
|
});
|
|
1793
1792
|
const exitCallback = this._exitCallback;
|
|
1794
1793
|
proc$1.on("close", (code$1) => {
|
|
1795
1794
|
code$1 = code$1 ?? 1;
|
|
1796
|
-
if (!exitCallback) process$
|
|
1795
|
+
if (!exitCallback) process$3.exit(code$1);
|
|
1797
1796
|
else exitCallback(new CommanderError(code$1, "commander.executeSubCommandAsync", "(close)"));
|
|
1798
1797
|
});
|
|
1799
1798
|
proc$1.on("error", (err) => {
|
|
@@ -1805,7 +1804,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1805
1804
|
- ${executableDirMessage}`;
|
|
1806
1805
|
throw new Error(executableMissing);
|
|
1807
1806
|
} else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
|
|
1808
|
-
if (!exitCallback) process$
|
|
1807
|
+
if (!exitCallback) process$3.exit(1);
|
|
1809
1808
|
else {
|
|
1810
1809
|
const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
|
|
1811
1810
|
wrappedError.nestedError = err;
|
|
@@ -2211,13 +2210,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2211
2210
|
*/
|
|
2212
2211
|
_parseOptionsEnv() {
|
|
2213
2212
|
this.options.forEach((option) => {
|
|
2214
|
-
if (option.envVar && option.envVar in process$
|
|
2213
|
+
if (option.envVar && option.envVar in process$3.env) {
|
|
2215
2214
|
const optionKey = option.attributeName();
|
|
2216
2215
|
if (this.getOptionValue(optionKey) === void 0 || [
|
|
2217
2216
|
"default",
|
|
2218
2217
|
"config",
|
|
2219
2218
|
"env"
|
|
2220
|
-
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$
|
|
2219
|
+
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$3.env[option.envVar]);
|
|
2221
2220
|
else this.emit(`optionEnv:${option.name()}`);
|
|
2222
2221
|
}
|
|
2223
2222
|
});
|
|
@@ -2596,7 +2595,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2596
2595
|
*/
|
|
2597
2596
|
help(contextOptions) {
|
|
2598
2597
|
this.outputHelp(contextOptions);
|
|
2599
|
-
let exitCode = process$
|
|
2598
|
+
let exitCode = process$3.exitCode || 0;
|
|
2600
2599
|
if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
|
|
2601
2600
|
this._exit(exitCode, "commander.help", "(outputHelp)");
|
|
2602
2601
|
}
|
|
@@ -2712,16 +2711,16 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2712
2711
|
const CSI = `${ESC}[`;
|
|
2713
2712
|
const beep = "\x07";
|
|
2714
2713
|
const cursor = {
|
|
2715
|
-
to(x$2, y$
|
|
2716
|
-
if (!y$
|
|
2717
|
-
return `${CSI}${y$
|
|
2714
|
+
to(x$2, y$2) {
|
|
2715
|
+
if (!y$2) return `${CSI}${x$2 + 1}G`;
|
|
2716
|
+
return `${CSI}${y$2 + 1};${x$2 + 1}H`;
|
|
2718
2717
|
},
|
|
2719
|
-
move(x$2, y$
|
|
2718
|
+
move(x$2, y$2) {
|
|
2720
2719
|
let ret = "";
|
|
2721
2720
|
if (x$2 < 0) ret += `${CSI}${-x$2}D`;
|
|
2722
2721
|
else if (x$2 > 0) ret += `${CSI}${x$2}C`;
|
|
2723
|
-
if (y$
|
|
2724
|
-
else if (y$
|
|
2722
|
+
if (y$2 < 0) ret += `${CSI}${-y$2}A`;
|
|
2723
|
+
else if (y$2 > 0) ret += `${CSI}${y$2}B`;
|
|
2725
2724
|
return ret;
|
|
2726
2725
|
},
|
|
2727
2726
|
up: (count$1 = 1) => `${CSI}${count$1}A`,
|
|
@@ -3031,13 +3030,13 @@ function rD() {
|
|
|
3031
3030
|
}
|
|
3032
3031
|
}), r;
|
|
3033
3032
|
}
|
|
3034
|
-
const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y = "\x07", V$1 = "[", nD = "]", G$1 = "m", _$1 = `${nD}8;;`, z = (e$1) => `${d$1.values().next().value}${V$1}${e$1}${G$1}`, K$1 = (e$1) => `${d$1.values().next().value}${_$1}${e$1}${y}`, aD = (e$1) => e$1.split(" ").map((u$2) => p(u$2)), k$1 = (e$1, u$2, t) => {
|
|
3033
|
+
const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y$1 = "\x07", V$1 = "[", nD = "]", G$1 = "m", _$1 = `${nD}8;;`, z = (e$1) => `${d$1.values().next().value}${V$1}${e$1}${G$1}`, K$1 = (e$1) => `${d$1.values().next().value}${_$1}${e$1}${y$1}`, aD = (e$1) => e$1.split(" ").map((u$2) => p(u$2)), k$1 = (e$1, u$2, t) => {
|
|
3035
3034
|
const F$1 = [...u$2];
|
|
3036
3035
|
let s = !1, i$1 = !1, D$1 = p(P$1(e$1[e$1.length - 1]));
|
|
3037
3036
|
for (const [C$1, n$1] of F$1.entries()) {
|
|
3038
3037
|
const E = p(n$1);
|
|
3039
3038
|
if (D$1 + E <= t ? e$1[e$1.length - 1] += n$1 : (e$1.push(n$1), D$1 = 0), d$1.has(n$1) && (s = !0, i$1 = F$1.slice(C$1 + 1).join("").startsWith(_$1)), s) {
|
|
3040
|
-
i$1 ? n$1 === y && (s = !1, i$1 = !1) : n$1 === G$1 && (s = !1);
|
|
3039
|
+
i$1 ? n$1 === y$1 && (s = !1, i$1 = !1) : n$1 === G$1 && (s = !1);
|
|
3041
3040
|
continue;
|
|
3042
3041
|
}
|
|
3043
3042
|
D$1 += E, D$1 === t && C$1 < F$1.length - 1 && (e$1.push(""), D$1 = 0);
|
|
@@ -3079,7 +3078,7 @@ const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y = "\x07", V$1 = "[",
|
|
|
3079
3078
|
`)];
|
|
3080
3079
|
for (const [E, a$1] of n$1.entries()) {
|
|
3081
3080
|
if (F$1 += a$1, d$1.has(a$1)) {
|
|
3082
|
-
const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y})`)).exec(n$1.slice(E).join("")) || { groups: {} };
|
|
3081
|
+
const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y$1})`)).exec(n$1.slice(E).join("")) || { groups: {} };
|
|
3083
3082
|
if (c$1.code !== void 0) {
|
|
3084
3083
|
const f = Number.parseFloat(c$1.code);
|
|
3085
3084
|
s = f === oD ? void 0 : f;
|
|
@@ -3480,7 +3479,7 @@ var RD = class extends x$1 {
|
|
|
3480
3479
|
//#endregion
|
|
3481
3480
|
//#region node_modules/@clack/prompts/dist/index.mjs
|
|
3482
3481
|
function ce() {
|
|
3483
|
-
return
|
|
3482
|
+
return y.platform !== "win32" ? y.env.TERM !== "linux" : !!y.env.CI || !!y.env.WT_SESSION || !!y.env.TERMINUS_SUBLIME || y.env.ConEmuTask === "{cmd::Cmder}" || y.env.TERM_PROGRAM === "Terminus-Sublime" || y.env.TERM_PROGRAM === "vscode" || y.env.TERM === "xterm-256color" || y.env.TERM === "alacritty" || y.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
3484
3483
|
}
|
|
3485
3484
|
const V = ce(), u$1 = (t, n$1) => V ? t : n$1, le = u$1("◆", "*"), L = u$1("■", "x"), W = u$1("▲", "x"), C = u$1("◇", "o"), ue = u$1("┌", "T"), o$1 = u$1("│", "|"), d = u$1("└", "—"), k = u$1("●", ">"), P = u$1("○", " "), A = u$1("◻", "[•]"), T = u$1("◼", "[+]"), F = u$1("◻", "[ ]"), $e = u$1("▪", "•"), _ = u$1("─", "-"), me = u$1("╮", "+"), de = u$1("├", "+"), pe = u$1("╯", "+"), q = u$1("●", "•"), D = u$1("◆", "*"), U = u$1("▲", "!"), K = u$1("■", "x"), b = (t) => {
|
|
3486
3485
|
switch (t) {
|
|
@@ -3957,767 +3956,228 @@ var TimeoutError$1 = class extends Error {
|
|
|
3957
3956
|
};
|
|
3958
3957
|
|
|
3959
3958
|
//#endregion
|
|
3960
|
-
//#region node_modules/
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3959
|
+
//#region node_modules/zod/v4/core/core.js
|
|
3960
|
+
/** A special constant with type `never` */
|
|
3961
|
+
const NEVER = Object.freeze({ status: "aborted" });
|
|
3962
|
+
function $constructor(name$1, initializer$2, params) {
|
|
3963
|
+
function init(inst, def) {
|
|
3964
|
+
if (!inst._zod) Object.defineProperty(inst, "_zod", {
|
|
3965
|
+
value: {
|
|
3966
|
+
def,
|
|
3967
|
+
constr: _$2,
|
|
3968
|
+
traits: /* @__PURE__ */ new Set()
|
|
3969
|
+
},
|
|
3970
|
+
enumerable: false
|
|
3971
|
+
});
|
|
3972
|
+
if (inst._zod.traits.has(name$1)) return;
|
|
3973
|
+
inst._zod.traits.add(name$1);
|
|
3974
|
+
initializer$2(inst, def);
|
|
3975
|
+
const proto$1 = _$2.prototype;
|
|
3976
|
+
const keys = Object.keys(proto$1);
|
|
3977
|
+
for (let i$1 = 0; i$1 < keys.length; i$1++) {
|
|
3978
|
+
const k$2 = keys[i$1];
|
|
3979
|
+
if (!(k$2 in inst)) inst[k$2] = proto$1[k$2].bind(inst);
|
|
3980
|
+
}
|
|
3968
3981
|
}
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3982
|
+
const Parent = params?.Parent ?? Object;
|
|
3983
|
+
class Definition extends Parent {}
|
|
3984
|
+
Object.defineProperty(Definition, "name", { value: name$1 });
|
|
3985
|
+
function _$2(def) {
|
|
3986
|
+
var _a$1;
|
|
3987
|
+
const inst = params?.Parent ? new Definition() : this;
|
|
3988
|
+
init(inst, def);
|
|
3989
|
+
(_a$1 = inst._zod).deferred ?? (_a$1.deferred = []);
|
|
3990
|
+
for (const fn of inst._zod.deferred) fn();
|
|
3991
|
+
return inst;
|
|
3975
3992
|
}
|
|
3993
|
+
Object.defineProperty(_$2, "init", { value: init });
|
|
3994
|
+
Object.defineProperty(_$2, Symbol.hasInstance, { value: (inst) => {
|
|
3995
|
+
if (params?.Parent && inst instanceof params.Parent) return true;
|
|
3996
|
+
return inst?._zod?.traits?.has(name$1);
|
|
3997
|
+
} });
|
|
3998
|
+
Object.defineProperty(_$2, "name", { value: name$1 });
|
|
3999
|
+
return _$2;
|
|
3976
4000
|
}
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
}
|
|
3981
|
-
|
|
3982
|
-
//#endregion
|
|
3983
|
-
//#region node_modules/is-inside-container/index.js
|
|
3984
|
-
let cachedResult;
|
|
3985
|
-
const hasContainerEnv = () => {
|
|
3986
|
-
try {
|
|
3987
|
-
fs.statSync("/run/.containerenv");
|
|
3988
|
-
return true;
|
|
3989
|
-
} catch {
|
|
3990
|
-
return false;
|
|
4001
|
+
var $ZodAsyncError = class extends Error {
|
|
4002
|
+
constructor() {
|
|
4003
|
+
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
3991
4004
|
}
|
|
3992
4005
|
};
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
//#endregion
|
|
3999
|
-
//#region node_modules/is-wsl/index.js
|
|
4000
|
-
const isWsl = () => {
|
|
4001
|
-
if (process$1.platform !== "linux") return false;
|
|
4002
|
-
if (os.release().toLowerCase().includes("microsoft")) {
|
|
4003
|
-
if (isInsideContainer()) return false;
|
|
4004
|
-
return true;
|
|
4005
|
-
}
|
|
4006
|
-
try {
|
|
4007
|
-
return fs.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
|
4008
|
-
} catch {
|
|
4009
|
-
return false;
|
|
4006
|
+
var $ZodEncodeError = class extends Error {
|
|
4007
|
+
constructor(name$1) {
|
|
4008
|
+
super(`Encountered unidirectional transform during encode: ${name$1}`);
|
|
4009
|
+
this.name = "ZodEncodeError";
|
|
4010
4010
|
}
|
|
4011
4011
|
};
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
const execFile$2 = promisify(childProcess.execFile);
|
|
4017
|
-
const powerShellPath$1 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
4018
|
-
const executePowerShell = async (command, options = {}) => {
|
|
4019
|
-
const { powerShellPath: psPath, ...execFileOptions } = options;
|
|
4020
|
-
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
4021
|
-
return execFile$2(psPath ?? powerShellPath$1(), [...executePowerShell.argumentsPrefix, encodedCommand], {
|
|
4022
|
-
encoding: "utf8",
|
|
4023
|
-
...execFileOptions
|
|
4024
|
-
});
|
|
4025
|
-
};
|
|
4026
|
-
executePowerShell.argumentsPrefix = [
|
|
4027
|
-
"-NoProfile",
|
|
4028
|
-
"-NonInteractive",
|
|
4029
|
-
"-ExecutionPolicy",
|
|
4030
|
-
"Bypass",
|
|
4031
|
-
"-EncodedCommand"
|
|
4032
|
-
];
|
|
4033
|
-
executePowerShell.encodeCommand = (command) => Buffer$1.from(command, "utf16le").toString("base64");
|
|
4034
|
-
executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
|
|
4035
|
-
|
|
4036
|
-
//#endregion
|
|
4037
|
-
//#region node_modules/wsl-utils/utilities.js
|
|
4038
|
-
function parseMountPointFromConfig(content) {
|
|
4039
|
-
for (const line of content.split("\n")) {
|
|
4040
|
-
if (/^\s*#/.test(line)) continue;
|
|
4041
|
-
const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
|
|
4042
|
-
if (!match) continue;
|
|
4043
|
-
return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
|
|
4044
|
-
}
|
|
4012
|
+
const globalConfig = {};
|
|
4013
|
+
function config(newConfig) {
|
|
4014
|
+
if (newConfig) Object.assign(globalConfig, newConfig);
|
|
4015
|
+
return globalConfig;
|
|
4045
4016
|
}
|
|
4046
4017
|
|
|
4047
4018
|
//#endregion
|
|
4048
|
-
//#region node_modules/
|
|
4049
|
-
|
|
4050
|
-
const
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
if (parsedMountPoint === void 0) return defaultMountPoint;
|
|
4064
|
-
mountPoint = parsedMountPoint;
|
|
4065
|
-
mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
|
|
4066
|
-
return mountPoint;
|
|
4067
|
-
};
|
|
4068
|
-
})();
|
|
4069
|
-
const powerShellPathFromWsl = async () => {
|
|
4070
|
-
return `${await wslDrivesMountPoint()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
|
|
4071
|
-
};
|
|
4072
|
-
const powerShellPath = is_wsl_default ? powerShellPathFromWsl : powerShellPath$1;
|
|
4073
|
-
let canAccessPowerShellPromise;
|
|
4074
|
-
const canAccessPowerShell = async () => {
|
|
4075
|
-
canAccessPowerShellPromise ??= (async () => {
|
|
4076
|
-
try {
|
|
4077
|
-
const psPath = await powerShellPath();
|
|
4078
|
-
await fs$1.access(psPath, constants.X_OK);
|
|
4079
|
-
return true;
|
|
4080
|
-
} catch {
|
|
4081
|
-
return false;
|
|
4019
|
+
//#region node_modules/zod/v4/core/util.js
|
|
4020
|
+
function getEnumValues(entries) {
|
|
4021
|
+
const numericValues = Object.values(entries).filter((v$1) => typeof v$1 === "number");
|
|
4022
|
+
return Object.entries(entries).filter(([k$2, _$2]) => numericValues.indexOf(+k$2) === -1).map(([_$2, v$1]) => v$1);
|
|
4023
|
+
}
|
|
4024
|
+
function jsonStringifyReplacer(_$2, value) {
|
|
4025
|
+
if (typeof value === "bigint") return value.toString();
|
|
4026
|
+
return value;
|
|
4027
|
+
}
|
|
4028
|
+
function cached(getter) {
|
|
4029
|
+
return { get value() {
|
|
4030
|
+
{
|
|
4031
|
+
const value = getter();
|
|
4032
|
+
Object.defineProperty(this, "value", { value });
|
|
4033
|
+
return value;
|
|
4082
4034
|
}
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
}
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
const
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4035
|
+
throw new Error("cached value already set");
|
|
4036
|
+
} };
|
|
4037
|
+
}
|
|
4038
|
+
function nullish(input) {
|
|
4039
|
+
return input === null || input === void 0;
|
|
4040
|
+
}
|
|
4041
|
+
function cleanRegex(source) {
|
|
4042
|
+
const start = source.startsWith("^") ? 1 : 0;
|
|
4043
|
+
const end = source.endsWith("$") ? source.length - 1 : source.length;
|
|
4044
|
+
return source.slice(start, end);
|
|
4045
|
+
}
|
|
4046
|
+
function floatSafeRemainder(val, step) {
|
|
4047
|
+
const valDecCount = (val.toString().split(".")[1] || "").length;
|
|
4048
|
+
const stepString = step.toString();
|
|
4049
|
+
let stepDecCount = (stepString.split(".")[1] || "").length;
|
|
4050
|
+
if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
|
|
4051
|
+
const match = stepString.match(/\d?e-(\d?)/);
|
|
4052
|
+
if (match?.[1]) stepDecCount = Number.parseInt(match[1]);
|
|
4098
4053
|
}
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
function
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
enumerable: true,
|
|
4107
|
-
writable: true
|
|
4108
|
-
});
|
|
4109
|
-
Object.defineProperty(object$1, propertyName, {
|
|
4110
|
-
configurable: true,
|
|
4111
|
-
enumerable: true,
|
|
4054
|
+
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
4055
|
+
return Number.parseInt(val.toFixed(decCount).replace(".", "")) % Number.parseInt(step.toFixed(decCount).replace(".", "")) / 10 ** decCount;
|
|
4056
|
+
}
|
|
4057
|
+
const EVALUATING = Symbol("evaluating");
|
|
4058
|
+
function defineLazy(object$1, key, getter) {
|
|
4059
|
+
let value = void 0;
|
|
4060
|
+
Object.defineProperty(object$1, key, {
|
|
4112
4061
|
get() {
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4062
|
+
if (value === EVALUATING) return;
|
|
4063
|
+
if (value === void 0) {
|
|
4064
|
+
value = EVALUATING;
|
|
4065
|
+
value = getter();
|
|
4066
|
+
}
|
|
4067
|
+
return value;
|
|
4116
4068
|
},
|
|
4117
|
-
set(
|
|
4118
|
-
|
|
4119
|
-
}
|
|
4069
|
+
set(v$1) {
|
|
4070
|
+
Object.defineProperty(object$1, key, { value: v$1 });
|
|
4071
|
+
},
|
|
4072
|
+
configurable: true
|
|
4120
4073
|
});
|
|
4121
|
-
return object$1;
|
|
4122
4074
|
}
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
"read",
|
|
4131
|
-
"com.apple.LaunchServices/com.apple.launchservices.secure",
|
|
4132
|
-
"LSHandlers"
|
|
4133
|
-
]);
|
|
4134
|
-
const browserId = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout$1)?.groups.id ?? "com.apple.Safari";
|
|
4135
|
-
if (browserId === "com.apple.safari") return "com.apple.Safari";
|
|
4136
|
-
return browserId;
|
|
4075
|
+
function assignProp(target, prop, value) {
|
|
4076
|
+
Object.defineProperty(target, prop, {
|
|
4077
|
+
value,
|
|
4078
|
+
writable: true,
|
|
4079
|
+
enumerable: true,
|
|
4080
|
+
configurable: true
|
|
4081
|
+
});
|
|
4137
4082
|
}
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
const
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
const execOptions = {};
|
|
4146
|
-
if (signal) execOptions.signal = signal;
|
|
4147
|
-
const { stdout: stdout$1 } = await execFileAsync$2("osascript", [
|
|
4148
|
-
"-e",
|
|
4149
|
-
script,
|
|
4150
|
-
outputArguments
|
|
4151
|
-
], execOptions);
|
|
4152
|
-
return stdout$1.trim();
|
|
4083
|
+
function mergeDefs(...defs) {
|
|
4084
|
+
const mergedDescriptors = {};
|
|
4085
|
+
for (const def of defs) {
|
|
4086
|
+
const descriptors$1 = Object.getOwnPropertyDescriptors(def);
|
|
4087
|
+
Object.assign(mergedDescriptors, descriptors$1);
|
|
4088
|
+
}
|
|
4089
|
+
return Object.defineProperties({}, mergedDescriptors);
|
|
4153
4090
|
}
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
//#region node_modules/bundle-name/index.js
|
|
4157
|
-
async function bundleName(bundleId) {
|
|
4158
|
-
return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string\ntell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
|
|
4091
|
+
function esc(str) {
|
|
4092
|
+
return JSON.stringify(str);
|
|
4159
4093
|
}
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
//#region node_modules/default-browser/windows.js
|
|
4163
|
-
const execFileAsync$1 = promisify(execFile);
|
|
4164
|
-
const windowsBrowserProgIds = {
|
|
4165
|
-
MSEdgeHTM: {
|
|
4166
|
-
name: "Edge",
|
|
4167
|
-
id: "com.microsoft.edge"
|
|
4168
|
-
},
|
|
4169
|
-
MSEdgeBHTML: {
|
|
4170
|
-
name: "Edge Beta",
|
|
4171
|
-
id: "com.microsoft.edge.beta"
|
|
4172
|
-
},
|
|
4173
|
-
MSEdgeDHTML: {
|
|
4174
|
-
name: "Edge Dev",
|
|
4175
|
-
id: "com.microsoft.edge.dev"
|
|
4176
|
-
},
|
|
4177
|
-
AppXq0fevzme2pys62n3e0fbqa7peapykr8v: {
|
|
4178
|
-
name: "Edge",
|
|
4179
|
-
id: "com.microsoft.edge.old"
|
|
4180
|
-
},
|
|
4181
|
-
ChromeHTML: {
|
|
4182
|
-
name: "Chrome",
|
|
4183
|
-
id: "com.google.chrome"
|
|
4184
|
-
},
|
|
4185
|
-
ChromeBHTML: {
|
|
4186
|
-
name: "Chrome Beta",
|
|
4187
|
-
id: "com.google.chrome.beta"
|
|
4188
|
-
},
|
|
4189
|
-
ChromeDHTML: {
|
|
4190
|
-
name: "Chrome Dev",
|
|
4191
|
-
id: "com.google.chrome.dev"
|
|
4192
|
-
},
|
|
4193
|
-
ChromiumHTM: {
|
|
4194
|
-
name: "Chromium",
|
|
4195
|
-
id: "org.chromium.Chromium"
|
|
4196
|
-
},
|
|
4197
|
-
BraveHTML: {
|
|
4198
|
-
name: "Brave",
|
|
4199
|
-
id: "com.brave.Browser"
|
|
4200
|
-
},
|
|
4201
|
-
BraveBHTML: {
|
|
4202
|
-
name: "Brave Beta",
|
|
4203
|
-
id: "com.brave.Browser.beta"
|
|
4204
|
-
},
|
|
4205
|
-
BraveDHTML: {
|
|
4206
|
-
name: "Brave Dev",
|
|
4207
|
-
id: "com.brave.Browser.dev"
|
|
4208
|
-
},
|
|
4209
|
-
BraveSSHTM: {
|
|
4210
|
-
name: "Brave Nightly",
|
|
4211
|
-
id: "com.brave.Browser.nightly"
|
|
4212
|
-
},
|
|
4213
|
-
FirefoxURL: {
|
|
4214
|
-
name: "Firefox",
|
|
4215
|
-
id: "org.mozilla.firefox"
|
|
4216
|
-
},
|
|
4217
|
-
OperaStable: {
|
|
4218
|
-
name: "Opera",
|
|
4219
|
-
id: "com.operasoftware.Opera"
|
|
4220
|
-
},
|
|
4221
|
-
VivaldiHTM: {
|
|
4222
|
-
name: "Vivaldi",
|
|
4223
|
-
id: "com.vivaldi.Vivaldi"
|
|
4224
|
-
},
|
|
4225
|
-
"IE.HTTP": {
|
|
4226
|
-
name: "Internet Explorer",
|
|
4227
|
-
id: "com.microsoft.ie"
|
|
4228
|
-
}
|
|
4229
|
-
};
|
|
4230
|
-
const _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
|
|
4231
|
-
var UnknownBrowserError = class extends Error {};
|
|
4232
|
-
async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
|
|
4233
|
-
const { stdout: stdout$1 } = await _execFileAsync("reg", [
|
|
4234
|
-
"QUERY",
|
|
4235
|
-
" HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
|
|
4236
|
-
"/v",
|
|
4237
|
-
"ProgId"
|
|
4238
|
-
]);
|
|
4239
|
-
const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout$1);
|
|
4240
|
-
if (!match) throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout$1)}`);
|
|
4241
|
-
const { id } = match.groups;
|
|
4242
|
-
const browser = windowsBrowserProgIds[id];
|
|
4243
|
-
if (!browser) throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
|
|
4244
|
-
return browser;
|
|
4094
|
+
function slugify(input) {
|
|
4095
|
+
return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
4245
4096
|
}
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
const
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
return
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
};
|
|
4258
|
-
}
|
|
4259
|
-
if (process$1.platform === "linux") {
|
|
4260
|
-
const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
|
|
4261
|
-
"query",
|
|
4262
|
-
"default",
|
|
4263
|
-
"x-scheme-handler/http"
|
|
4264
|
-
]);
|
|
4265
|
-
const id = stdout$1.trim();
|
|
4266
|
-
return {
|
|
4267
|
-
name: titleize(id.replace(/.desktop$/, "").replace("-", " ")),
|
|
4268
|
-
id
|
|
4269
|
-
};
|
|
4097
|
+
const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
|
|
4098
|
+
function isObject$2(data) {
|
|
4099
|
+
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
4100
|
+
}
|
|
4101
|
+
const allowsEval = cached(() => {
|
|
4102
|
+
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false;
|
|
4103
|
+
try {
|
|
4104
|
+
new Function("");
|
|
4105
|
+
return true;
|
|
4106
|
+
} catch (_$2) {
|
|
4107
|
+
return false;
|
|
4270
4108
|
}
|
|
4271
|
-
|
|
4272
|
-
|
|
4109
|
+
});
|
|
4110
|
+
function isPlainObject$1(o$2) {
|
|
4111
|
+
if (isObject$2(o$2) === false) return false;
|
|
4112
|
+
const ctor = o$2.constructor;
|
|
4113
|
+
if (ctor === void 0) return true;
|
|
4114
|
+
if (typeof ctor !== "function") return true;
|
|
4115
|
+
const prot = ctor.prototype;
|
|
4116
|
+
if (isObject$2(prot) === false) return false;
|
|
4117
|
+
if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) return false;
|
|
4118
|
+
return true;
|
|
4273
4119
|
}
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
const
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4120
|
+
function shallowClone(o$2) {
|
|
4121
|
+
if (isPlainObject$1(o$2)) return { ...o$2 };
|
|
4122
|
+
if (Array.isArray(o$2)) return [...o$2];
|
|
4123
|
+
return o$2;
|
|
4124
|
+
}
|
|
4125
|
+
const propertyKeyTypes = new Set([
|
|
4126
|
+
"string",
|
|
4127
|
+
"number",
|
|
4128
|
+
"symbol"
|
|
4129
|
+
]);
|
|
4130
|
+
function escapeRegex(str) {
|
|
4131
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4132
|
+
}
|
|
4133
|
+
function clone(inst, def, params) {
|
|
4134
|
+
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
4135
|
+
if (!def || params?.parent) cl._zod.parent = inst;
|
|
4136
|
+
return cl;
|
|
4137
|
+
}
|
|
4138
|
+
function normalizeParams(_params) {
|
|
4139
|
+
const params = _params;
|
|
4140
|
+
if (!params) return {};
|
|
4141
|
+
if (typeof params === "string") return { error: () => params };
|
|
4142
|
+
if (params?.message !== void 0) {
|
|
4143
|
+
if (params?.error !== void 0) throw new Error("Cannot specify both `message` and `error` params");
|
|
4144
|
+
params.error = params.message;
|
|
4293
4145
|
}
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
wait: false,
|
|
4299
|
-
background: false,
|
|
4300
|
-
newInstance: false,
|
|
4301
|
-
allowNonzeroExitCode: false,
|
|
4302
|
-
...options
|
|
4146
|
+
delete params.message;
|
|
4147
|
+
if (typeof params.error === "string") return {
|
|
4148
|
+
...params,
|
|
4149
|
+
error: () => params.error
|
|
4303
4150
|
};
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
if (
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
const flags = {
|
|
4335
|
-
chrome: "--incognito",
|
|
4336
|
-
brave: "--incognito",
|
|
4337
|
-
firefox: "--private-window",
|
|
4338
|
-
edge: "--inPrivate"
|
|
4339
|
-
};
|
|
4340
|
-
let browser;
|
|
4341
|
-
if (is_wsl_default) {
|
|
4342
|
-
const progId = await wslDefaultBrowser();
|
|
4343
|
-
browser = _windowsBrowserProgIdMap.get(progId) ?? {};
|
|
4344
|
-
} else browser = await defaultBrowser();
|
|
4345
|
-
if (browser.id in ids) {
|
|
4346
|
-
const browserName = ids[browser.id.toLowerCase()];
|
|
4347
|
-
if (app === "browserPrivate") {
|
|
4348
|
-
if (browserName === "safari") throw new Error("Safari doesn't support opening in private mode via command line");
|
|
4349
|
-
appArguments.push(flags[browserName]);
|
|
4350
|
-
}
|
|
4351
|
-
return baseOpen({
|
|
4352
|
-
...options,
|
|
4353
|
-
app: {
|
|
4354
|
-
name: apps[browserName],
|
|
4355
|
-
arguments: appArguments
|
|
4356
|
-
}
|
|
4357
|
-
});
|
|
4358
|
-
}
|
|
4359
|
-
throw new Error(`${browser.name} is not supported as a default browser`);
|
|
4360
|
-
}
|
|
4361
|
-
let command;
|
|
4362
|
-
const cliArguments = [];
|
|
4363
|
-
const childProcessOptions = {};
|
|
4364
|
-
let shouldUseWindowsInWsl = false;
|
|
4365
|
-
if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) shouldUseWindowsInWsl = await canAccessPowerShell();
|
|
4366
|
-
if (platform$2 === "darwin") {
|
|
4367
|
-
command = "open";
|
|
4368
|
-
if (options.wait) cliArguments.push("--wait-apps");
|
|
4369
|
-
if (options.background) cliArguments.push("--background");
|
|
4370
|
-
if (options.newInstance) cliArguments.push("--new");
|
|
4371
|
-
if (app) cliArguments.push("-a", app);
|
|
4372
|
-
} else if (platform$2 === "win32" || shouldUseWindowsInWsl) {
|
|
4373
|
-
command = await powerShellPath();
|
|
4374
|
-
cliArguments.push(...executePowerShell.argumentsPrefix);
|
|
4375
|
-
if (!is_wsl_default) childProcessOptions.windowsVerbatimArguments = true;
|
|
4376
|
-
if (is_wsl_default && options.target) options.target = await convertWslPathToWindows(options.target);
|
|
4377
|
-
const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
|
|
4378
|
-
if (options.wait) encodedArguments.push("-Wait");
|
|
4379
|
-
if (app) {
|
|
4380
|
-
encodedArguments.push(executePowerShell.escapeArgument(app));
|
|
4381
|
-
if (options.target) appArguments.push(options.target);
|
|
4382
|
-
} else if (options.target) encodedArguments.push(executePowerShell.escapeArgument(options.target));
|
|
4383
|
-
if (appArguments.length > 0) {
|
|
4384
|
-
appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
|
|
4385
|
-
encodedArguments.push("-ArgumentList", appArguments.join(","));
|
|
4386
|
-
}
|
|
4387
|
-
options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
|
|
4388
|
-
if (!options.wait) childProcessOptions.stdio = "ignore";
|
|
4389
|
-
} else {
|
|
4390
|
-
if (app) command = app;
|
|
4391
|
-
else {
|
|
4392
|
-
const isBundled = !__dirname$1 || __dirname$1 === "/";
|
|
4393
|
-
let exeLocalXdgOpen = false;
|
|
4394
|
-
try {
|
|
4395
|
-
await fs$1.access(localXdgOpenPath, constants.X_OK);
|
|
4396
|
-
exeLocalXdgOpen = true;
|
|
4397
|
-
} catch {}
|
|
4398
|
-
command = process$1.versions.electron ?? (platform$2 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
|
|
4399
|
-
}
|
|
4400
|
-
if (appArguments.length > 0) cliArguments.push(...appArguments);
|
|
4401
|
-
if (!options.wait) {
|
|
4402
|
-
childProcessOptions.stdio = "ignore";
|
|
4403
|
-
childProcessOptions.detached = true;
|
|
4404
|
-
}
|
|
4405
|
-
}
|
|
4406
|
-
if (platform$2 === "darwin" && appArguments.length > 0) cliArguments.push("--args", ...appArguments);
|
|
4407
|
-
if (options.target) cliArguments.push(options.target);
|
|
4408
|
-
const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
|
|
4409
|
-
if (options.wait) return new Promise((resolve$1, reject) => {
|
|
4410
|
-
subprocess.once("error", reject);
|
|
4411
|
-
subprocess.once("close", (exitCode) => {
|
|
4412
|
-
if (!options.allowNonzeroExitCode && exitCode !== 0) {
|
|
4413
|
-
reject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));
|
|
4414
|
-
return;
|
|
4415
|
-
}
|
|
4416
|
-
resolve$1(subprocess);
|
|
4417
|
-
});
|
|
4418
|
-
});
|
|
4419
|
-
if (isFallbackAttempt) return new Promise((resolve$1, reject) => {
|
|
4420
|
-
subprocess.once("error", reject);
|
|
4421
|
-
subprocess.once("spawn", () => {
|
|
4422
|
-
subprocess.once("close", (exitCode) => {
|
|
4423
|
-
subprocess.off("error", reject);
|
|
4424
|
-
if (exitCode !== 0) {
|
|
4425
|
-
reject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));
|
|
4426
|
-
return;
|
|
4427
|
-
}
|
|
4428
|
-
subprocess.unref();
|
|
4429
|
-
resolve$1(subprocess);
|
|
4430
|
-
});
|
|
4431
|
-
});
|
|
4432
|
-
});
|
|
4433
|
-
subprocess.unref();
|
|
4434
|
-
return new Promise((resolve$1, reject) => {
|
|
4435
|
-
subprocess.once("error", reject);
|
|
4436
|
-
subprocess.once("spawn", () => {
|
|
4437
|
-
subprocess.off("error", reject);
|
|
4438
|
-
resolve$1(subprocess);
|
|
4439
|
-
});
|
|
4440
|
-
});
|
|
4441
|
-
};
|
|
4442
|
-
const open = (target, options) => {
|
|
4443
|
-
if (typeof target !== "string") throw new TypeError("Expected a `target`");
|
|
4444
|
-
return baseOpen({
|
|
4445
|
-
...options,
|
|
4446
|
-
target
|
|
4447
|
-
});
|
|
4448
|
-
};
|
|
4449
|
-
function detectArchBinary(binary) {
|
|
4450
|
-
if (typeof binary === "string" || Array.isArray(binary)) return binary;
|
|
4451
|
-
const { [arch]: archBinary } = binary;
|
|
4452
|
-
if (!archBinary) throw new Error(`${arch} is not supported`);
|
|
4453
|
-
return archBinary;
|
|
4454
|
-
}
|
|
4455
|
-
function detectPlatformBinary({ [platform$2]: platformBinary }, { wsl } = {}) {
|
|
4456
|
-
if (wsl && is_wsl_default) return detectArchBinary(wsl);
|
|
4457
|
-
if (!platformBinary) throw new Error(`${platform$2} is not supported`);
|
|
4458
|
-
return detectArchBinary(platformBinary);
|
|
4459
|
-
}
|
|
4460
|
-
const apps = {
|
|
4461
|
-
browser: "browser",
|
|
4462
|
-
browserPrivate: "browserPrivate"
|
|
4463
|
-
};
|
|
4464
|
-
defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
|
|
4465
|
-
darwin: "google chrome",
|
|
4466
|
-
win32: "chrome",
|
|
4467
|
-
linux: [
|
|
4468
|
-
"google-chrome",
|
|
4469
|
-
"google-chrome-stable",
|
|
4470
|
-
"chromium",
|
|
4471
|
-
"chromium-browser"
|
|
4472
|
-
]
|
|
4473
|
-
}, { wsl: {
|
|
4474
|
-
ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
|
|
4475
|
-
x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
|
|
4476
|
-
} }));
|
|
4477
|
-
defineLazyProperty(apps, "brave", () => detectPlatformBinary({
|
|
4478
|
-
darwin: "brave browser",
|
|
4479
|
-
win32: "brave",
|
|
4480
|
-
linux: ["brave-browser", "brave"]
|
|
4481
|
-
}, { wsl: {
|
|
4482
|
-
ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
|
|
4483
|
-
x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
|
|
4484
|
-
} }));
|
|
4485
|
-
defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
|
|
4486
|
-
darwin: "firefox",
|
|
4487
|
-
win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
|
|
4488
|
-
linux: "firefox"
|
|
4489
|
-
}, { wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe" }));
|
|
4490
|
-
defineLazyProperty(apps, "edge", () => detectPlatformBinary({
|
|
4491
|
-
darwin: "microsoft edge",
|
|
4492
|
-
win32: "msedge",
|
|
4493
|
-
linux: ["microsoft-edge", "microsoft-edge-dev"]
|
|
4494
|
-
}, { wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" }));
|
|
4495
|
-
defineLazyProperty(apps, "safari", () => detectPlatformBinary({ darwin: "Safari" }));
|
|
4496
|
-
var open_default = open;
|
|
4497
|
-
|
|
4498
|
-
//#endregion
|
|
4499
|
-
//#region node_modules/zod/v4/core/core.js
|
|
4500
|
-
/** A special constant with type `never` */
|
|
4501
|
-
const NEVER = Object.freeze({ status: "aborted" });
|
|
4502
|
-
function $constructor(name$1, initializer$2, params) {
|
|
4503
|
-
function init(inst, def) {
|
|
4504
|
-
if (!inst._zod) Object.defineProperty(inst, "_zod", {
|
|
4505
|
-
value: {
|
|
4506
|
-
def,
|
|
4507
|
-
constr: _$2,
|
|
4508
|
-
traits: /* @__PURE__ */ new Set()
|
|
4509
|
-
},
|
|
4510
|
-
enumerable: false
|
|
4511
|
-
});
|
|
4512
|
-
if (inst._zod.traits.has(name$1)) return;
|
|
4513
|
-
inst._zod.traits.add(name$1);
|
|
4514
|
-
initializer$2(inst, def);
|
|
4515
|
-
const proto$1 = _$2.prototype;
|
|
4516
|
-
const keys = Object.keys(proto$1);
|
|
4517
|
-
for (let i$1 = 0; i$1 < keys.length; i$1++) {
|
|
4518
|
-
const k$2 = keys[i$1];
|
|
4519
|
-
if (!(k$2 in inst)) inst[k$2] = proto$1[k$2].bind(inst);
|
|
4520
|
-
}
|
|
4521
|
-
}
|
|
4522
|
-
const Parent = params?.Parent ?? Object;
|
|
4523
|
-
class Definition extends Parent {}
|
|
4524
|
-
Object.defineProperty(Definition, "name", { value: name$1 });
|
|
4525
|
-
function _$2(def) {
|
|
4526
|
-
var _a$1;
|
|
4527
|
-
const inst = params?.Parent ? new Definition() : this;
|
|
4528
|
-
init(inst, def);
|
|
4529
|
-
(_a$1 = inst._zod).deferred ?? (_a$1.deferred = []);
|
|
4530
|
-
for (const fn of inst._zod.deferred) fn();
|
|
4531
|
-
return inst;
|
|
4532
|
-
}
|
|
4533
|
-
Object.defineProperty(_$2, "init", { value: init });
|
|
4534
|
-
Object.defineProperty(_$2, Symbol.hasInstance, { value: (inst) => {
|
|
4535
|
-
if (params?.Parent && inst instanceof params.Parent) return true;
|
|
4536
|
-
return inst?._zod?.traits?.has(name$1);
|
|
4537
|
-
} });
|
|
4538
|
-
Object.defineProperty(_$2, "name", { value: name$1 });
|
|
4539
|
-
return _$2;
|
|
4540
|
-
}
|
|
4541
|
-
var $ZodAsyncError = class extends Error {
|
|
4542
|
-
constructor() {
|
|
4543
|
-
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
4544
|
-
}
|
|
4545
|
-
};
|
|
4546
|
-
var $ZodEncodeError = class extends Error {
|
|
4547
|
-
constructor(name$1) {
|
|
4548
|
-
super(`Encountered unidirectional transform during encode: ${name$1}`);
|
|
4549
|
-
this.name = "ZodEncodeError";
|
|
4550
|
-
}
|
|
4551
|
-
};
|
|
4552
|
-
const globalConfig = {};
|
|
4553
|
-
function config(newConfig) {
|
|
4554
|
-
if (newConfig) Object.assign(globalConfig, newConfig);
|
|
4555
|
-
return globalConfig;
|
|
4556
|
-
}
|
|
4557
|
-
|
|
4558
|
-
//#endregion
|
|
4559
|
-
//#region node_modules/zod/v4/core/util.js
|
|
4560
|
-
function getEnumValues(entries) {
|
|
4561
|
-
const numericValues = Object.values(entries).filter((v$1) => typeof v$1 === "number");
|
|
4562
|
-
return Object.entries(entries).filter(([k$2, _$2]) => numericValues.indexOf(+k$2) === -1).map(([_$2, v$1]) => v$1);
|
|
4563
|
-
}
|
|
4564
|
-
function jsonStringifyReplacer(_$2, value) {
|
|
4565
|
-
if (typeof value === "bigint") return value.toString();
|
|
4566
|
-
return value;
|
|
4567
|
-
}
|
|
4568
|
-
function cached(getter) {
|
|
4569
|
-
return { get value() {
|
|
4570
|
-
{
|
|
4571
|
-
const value = getter();
|
|
4572
|
-
Object.defineProperty(this, "value", { value });
|
|
4573
|
-
return value;
|
|
4574
|
-
}
|
|
4575
|
-
throw new Error("cached value already set");
|
|
4576
|
-
} };
|
|
4577
|
-
}
|
|
4578
|
-
function nullish(input) {
|
|
4579
|
-
return input === null || input === void 0;
|
|
4580
|
-
}
|
|
4581
|
-
function cleanRegex(source) {
|
|
4582
|
-
const start = source.startsWith("^") ? 1 : 0;
|
|
4583
|
-
const end = source.endsWith("$") ? source.length - 1 : source.length;
|
|
4584
|
-
return source.slice(start, end);
|
|
4585
|
-
}
|
|
4586
|
-
function floatSafeRemainder(val, step) {
|
|
4587
|
-
const valDecCount = (val.toString().split(".")[1] || "").length;
|
|
4588
|
-
const stepString = step.toString();
|
|
4589
|
-
let stepDecCount = (stepString.split(".")[1] || "").length;
|
|
4590
|
-
if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
|
|
4591
|
-
const match = stepString.match(/\d?e-(\d?)/);
|
|
4592
|
-
if (match?.[1]) stepDecCount = Number.parseInt(match[1]);
|
|
4593
|
-
}
|
|
4594
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
4595
|
-
return Number.parseInt(val.toFixed(decCount).replace(".", "")) % Number.parseInt(step.toFixed(decCount).replace(".", "")) / 10 ** decCount;
|
|
4596
|
-
}
|
|
4597
|
-
const EVALUATING = Symbol("evaluating");
|
|
4598
|
-
function defineLazy(object$1, key, getter) {
|
|
4599
|
-
let value = void 0;
|
|
4600
|
-
Object.defineProperty(object$1, key, {
|
|
4601
|
-
get() {
|
|
4602
|
-
if (value === EVALUATING) return;
|
|
4603
|
-
if (value === void 0) {
|
|
4604
|
-
value = EVALUATING;
|
|
4605
|
-
value = getter();
|
|
4606
|
-
}
|
|
4607
|
-
return value;
|
|
4608
|
-
},
|
|
4609
|
-
set(v$1) {
|
|
4610
|
-
Object.defineProperty(object$1, key, { value: v$1 });
|
|
4611
|
-
},
|
|
4612
|
-
configurable: true
|
|
4613
|
-
});
|
|
4614
|
-
}
|
|
4615
|
-
function assignProp(target, prop, value) {
|
|
4616
|
-
Object.defineProperty(target, prop, {
|
|
4617
|
-
value,
|
|
4618
|
-
writable: true,
|
|
4619
|
-
enumerable: true,
|
|
4620
|
-
configurable: true
|
|
4621
|
-
});
|
|
4622
|
-
}
|
|
4623
|
-
function mergeDefs(...defs) {
|
|
4624
|
-
const mergedDescriptors = {};
|
|
4625
|
-
for (const def of defs) {
|
|
4626
|
-
const descriptors$1 = Object.getOwnPropertyDescriptors(def);
|
|
4627
|
-
Object.assign(mergedDescriptors, descriptors$1);
|
|
4628
|
-
}
|
|
4629
|
-
return Object.defineProperties({}, mergedDescriptors);
|
|
4630
|
-
}
|
|
4631
|
-
function esc(str) {
|
|
4632
|
-
return JSON.stringify(str);
|
|
4633
|
-
}
|
|
4634
|
-
function slugify(input) {
|
|
4635
|
-
return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
4636
|
-
}
|
|
4637
|
-
const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
|
|
4638
|
-
function isObject$2(data) {
|
|
4639
|
-
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
4640
|
-
}
|
|
4641
|
-
const allowsEval = cached(() => {
|
|
4642
|
-
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false;
|
|
4643
|
-
try {
|
|
4644
|
-
new Function("");
|
|
4645
|
-
return true;
|
|
4646
|
-
} catch (_$2) {
|
|
4647
|
-
return false;
|
|
4648
|
-
}
|
|
4649
|
-
});
|
|
4650
|
-
function isPlainObject$1(o$2) {
|
|
4651
|
-
if (isObject$2(o$2) === false) return false;
|
|
4652
|
-
const ctor = o$2.constructor;
|
|
4653
|
-
if (ctor === void 0) return true;
|
|
4654
|
-
if (typeof ctor !== "function") return true;
|
|
4655
|
-
const prot = ctor.prototype;
|
|
4656
|
-
if (isObject$2(prot) === false) return false;
|
|
4657
|
-
if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) return false;
|
|
4658
|
-
return true;
|
|
4659
|
-
}
|
|
4660
|
-
function shallowClone(o$2) {
|
|
4661
|
-
if (isPlainObject$1(o$2)) return { ...o$2 };
|
|
4662
|
-
if (Array.isArray(o$2)) return [...o$2];
|
|
4663
|
-
return o$2;
|
|
4664
|
-
}
|
|
4665
|
-
const propertyKeyTypes = new Set([
|
|
4666
|
-
"string",
|
|
4667
|
-
"number",
|
|
4668
|
-
"symbol"
|
|
4669
|
-
]);
|
|
4670
|
-
function escapeRegex(str) {
|
|
4671
|
-
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4672
|
-
}
|
|
4673
|
-
function clone(inst, def, params) {
|
|
4674
|
-
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
4675
|
-
if (!def || params?.parent) cl._zod.parent = inst;
|
|
4676
|
-
return cl;
|
|
4677
|
-
}
|
|
4678
|
-
function normalizeParams(_params) {
|
|
4679
|
-
const params = _params;
|
|
4680
|
-
if (!params) return {};
|
|
4681
|
-
if (typeof params === "string") return { error: () => params };
|
|
4682
|
-
if (params?.message !== void 0) {
|
|
4683
|
-
if (params?.error !== void 0) throw new Error("Cannot specify both `message` and `error` params");
|
|
4684
|
-
params.error = params.message;
|
|
4685
|
-
}
|
|
4686
|
-
delete params.message;
|
|
4687
|
-
if (typeof params.error === "string") return {
|
|
4688
|
-
...params,
|
|
4689
|
-
error: () => params.error
|
|
4690
|
-
};
|
|
4691
|
-
return params;
|
|
4692
|
-
}
|
|
4693
|
-
function optionalKeys(shape) {
|
|
4694
|
-
return Object.keys(shape).filter((k$2) => {
|
|
4695
|
-
return shape[k$2]._zod.optin === "optional" && shape[k$2]._zod.optout === "optional";
|
|
4696
|
-
});
|
|
4697
|
-
}
|
|
4698
|
-
const NUMBER_FORMAT_RANGES = {
|
|
4699
|
-
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
4700
|
-
int32: [-2147483648, 2147483647],
|
|
4701
|
-
uint32: [0, 4294967295],
|
|
4702
|
-
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
4703
|
-
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
4704
|
-
};
|
|
4705
|
-
function pick(schema, mask) {
|
|
4706
|
-
const currDef = schema._zod.def;
|
|
4707
|
-
const checks = currDef.checks;
|
|
4708
|
-
if (checks && checks.length > 0) throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
4709
|
-
return clone(schema, mergeDefs(schema._zod.def, {
|
|
4710
|
-
get shape() {
|
|
4711
|
-
const newShape = {};
|
|
4712
|
-
for (const key in mask) {
|
|
4713
|
-
if (!(key in currDef.shape)) throw new Error(`Unrecognized key: "${key}"`);
|
|
4714
|
-
if (!mask[key]) continue;
|
|
4715
|
-
newShape[key] = currDef.shape[key];
|
|
4716
|
-
}
|
|
4717
|
-
assignProp(this, "shape", newShape);
|
|
4718
|
-
return newShape;
|
|
4719
|
-
},
|
|
4720
|
-
checks: []
|
|
4151
|
+
return params;
|
|
4152
|
+
}
|
|
4153
|
+
function optionalKeys(shape) {
|
|
4154
|
+
return Object.keys(shape).filter((k$2) => {
|
|
4155
|
+
return shape[k$2]._zod.optin === "optional" && shape[k$2]._zod.optout === "optional";
|
|
4156
|
+
});
|
|
4157
|
+
}
|
|
4158
|
+
const NUMBER_FORMAT_RANGES = {
|
|
4159
|
+
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
4160
|
+
int32: [-2147483648, 2147483647],
|
|
4161
|
+
uint32: [0, 4294967295],
|
|
4162
|
+
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
4163
|
+
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
4164
|
+
};
|
|
4165
|
+
function pick(schema, mask) {
|
|
4166
|
+
const currDef = schema._zod.def;
|
|
4167
|
+
const checks = currDef.checks;
|
|
4168
|
+
if (checks && checks.length > 0) throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
4169
|
+
return clone(schema, mergeDefs(schema._zod.def, {
|
|
4170
|
+
get shape() {
|
|
4171
|
+
const newShape = {};
|
|
4172
|
+
for (const key in mask) {
|
|
4173
|
+
if (!(key in currDef.shape)) throw new Error(`Unrecognized key: "${key}"`);
|
|
4174
|
+
if (!mask[key]) continue;
|
|
4175
|
+
newShape[key] = currDef.shape[key];
|
|
4176
|
+
}
|
|
4177
|
+
assignProp(this, "shape", newShape);
|
|
4178
|
+
return newShape;
|
|
4179
|
+
},
|
|
4180
|
+
checks: []
|
|
4721
4181
|
}));
|
|
4722
4182
|
}
|
|
4723
4183
|
function omit(schema, mask) {
|
|
@@ -7193,7 +6653,7 @@ function initializeContext(params) {
|
|
|
7193
6653
|
external: params?.external ?? void 0
|
|
7194
6654
|
};
|
|
7195
6655
|
}
|
|
7196
|
-
function process$
|
|
6656
|
+
function process$2(schema, ctx, _params = {
|
|
7197
6657
|
path: [],
|
|
7198
6658
|
schemaPath: []
|
|
7199
6659
|
}) {
|
|
@@ -7230,7 +6690,7 @@ function process$3(schema, ctx, _params = {
|
|
|
7230
6690
|
const parent = schema._zod.parent;
|
|
7231
6691
|
if (parent) {
|
|
7232
6692
|
if (!result.ref) result.ref = parent;
|
|
7233
|
-
process$
|
|
6693
|
+
process$2(parent, ctx, params);
|
|
7234
6694
|
ctx.seen.get(parent).isParent = true;
|
|
7235
6695
|
}
|
|
7236
6696
|
}
|
|
@@ -7442,7 +6902,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
7442
6902
|
...params,
|
|
7443
6903
|
processors
|
|
7444
6904
|
});
|
|
7445
|
-
process$
|
|
6905
|
+
process$2(schema, ctx);
|
|
7446
6906
|
extractDefs(ctx, schema);
|
|
7447
6907
|
return finalize(ctx, schema);
|
|
7448
6908
|
};
|
|
@@ -7454,7 +6914,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
7454
6914
|
io,
|
|
7455
6915
|
processors
|
|
7456
6916
|
});
|
|
7457
|
-
process$
|
|
6917
|
+
process$2(schema, ctx);
|
|
7458
6918
|
extractDefs(ctx, schema);
|
|
7459
6919
|
return finalize(ctx, schema);
|
|
7460
6920
|
};
|
|
@@ -7541,7 +7001,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
7541
7001
|
if (typeof minimum === "number") json.minItems = minimum;
|
|
7542
7002
|
if (typeof maximum === "number") json.maxItems = maximum;
|
|
7543
7003
|
json.type = "array";
|
|
7544
|
-
json.items = process$
|
|
7004
|
+
json.items = process$2(def.element, ctx, {
|
|
7545
7005
|
...params,
|
|
7546
7006
|
path: [...params.path, "items"]
|
|
7547
7007
|
});
|
|
@@ -7552,7 +7012,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7552
7012
|
json.type = "object";
|
|
7553
7013
|
json.properties = {};
|
|
7554
7014
|
const shape = def.shape;
|
|
7555
|
-
for (const key in shape) json.properties[key] = process$
|
|
7015
|
+
for (const key in shape) json.properties[key] = process$2(shape[key], ctx, {
|
|
7556
7016
|
...params,
|
|
7557
7017
|
path: [
|
|
7558
7018
|
...params.path,
|
|
@@ -7570,7 +7030,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7570
7030
|
if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
|
|
7571
7031
|
else if (!def.catchall) {
|
|
7572
7032
|
if (ctx.io === "output") json.additionalProperties = false;
|
|
7573
|
-
} else if (def.catchall) json.additionalProperties = process$
|
|
7033
|
+
} else if (def.catchall) json.additionalProperties = process$2(def.catchall, ctx, {
|
|
7574
7034
|
...params,
|
|
7575
7035
|
path: [...params.path, "additionalProperties"]
|
|
7576
7036
|
});
|
|
@@ -7578,7 +7038,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7578
7038
|
const unionProcessor = (schema, ctx, json, params) => {
|
|
7579
7039
|
const def = schema._zod.def;
|
|
7580
7040
|
const isExclusive = def.inclusive === false;
|
|
7581
|
-
const options = def.options.map((x$2, i$1) => process$
|
|
7041
|
+
const options = def.options.map((x$2, i$1) => process$2(x$2, ctx, {
|
|
7582
7042
|
...params,
|
|
7583
7043
|
path: [
|
|
7584
7044
|
...params.path,
|
|
@@ -7591,7 +7051,7 @@ const unionProcessor = (schema, ctx, json, params) => {
|
|
|
7591
7051
|
};
|
|
7592
7052
|
const intersectionProcessor = (schema, ctx, json, params) => {
|
|
7593
7053
|
const def = schema._zod.def;
|
|
7594
|
-
const a$1 = process$
|
|
7054
|
+
const a$1 = process$2(def.left, ctx, {
|
|
7595
7055
|
...params,
|
|
7596
7056
|
path: [
|
|
7597
7057
|
...params.path,
|
|
@@ -7599,7 +7059,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
|
|
|
7599
7059
|
0
|
|
7600
7060
|
]
|
|
7601
7061
|
});
|
|
7602
|
-
const b$2 = process$
|
|
7062
|
+
const b$2 = process$2(def.right, ctx, {
|
|
7603
7063
|
...params,
|
|
7604
7064
|
path: [
|
|
7605
7065
|
...params.path,
|
|
@@ -7616,7 +7076,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7616
7076
|
json.type = "array";
|
|
7617
7077
|
const prefixPath$1 = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
7618
7078
|
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
7619
|
-
const prefixItems = def.items.map((x$2, i$1) => process$
|
|
7079
|
+
const prefixItems = def.items.map((x$2, i$1) => process$2(x$2, ctx, {
|
|
7620
7080
|
...params,
|
|
7621
7081
|
path: [
|
|
7622
7082
|
...params.path,
|
|
@@ -7624,7 +7084,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7624
7084
|
i$1
|
|
7625
7085
|
]
|
|
7626
7086
|
}));
|
|
7627
|
-
const rest = def.rest ? process$
|
|
7087
|
+
const rest = def.rest ? process$2(def.rest, ctx, {
|
|
7628
7088
|
...params,
|
|
7629
7089
|
path: [
|
|
7630
7090
|
...params.path,
|
|
@@ -7650,7 +7110,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7650
7110
|
};
|
|
7651
7111
|
const nullableProcessor = (schema, ctx, json, params) => {
|
|
7652
7112
|
const def = schema._zod.def;
|
|
7653
|
-
const inner = process$
|
|
7113
|
+
const inner = process$2(def.innerType, ctx, params);
|
|
7654
7114
|
const seen = ctx.seen.get(schema);
|
|
7655
7115
|
if (ctx.target === "openapi-3.0") {
|
|
7656
7116
|
seen.ref = def.innerType;
|
|
@@ -7659,27 +7119,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
|
|
|
7659
7119
|
};
|
|
7660
7120
|
const nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
7661
7121
|
const def = schema._zod.def;
|
|
7662
|
-
process$
|
|
7122
|
+
process$2(def.innerType, ctx, params);
|
|
7663
7123
|
const seen = ctx.seen.get(schema);
|
|
7664
7124
|
seen.ref = def.innerType;
|
|
7665
7125
|
};
|
|
7666
7126
|
const defaultProcessor = (schema, ctx, json, params) => {
|
|
7667
7127
|
const def = schema._zod.def;
|
|
7668
|
-
process$
|
|
7128
|
+
process$2(def.innerType, ctx, params);
|
|
7669
7129
|
const seen = ctx.seen.get(schema);
|
|
7670
7130
|
seen.ref = def.innerType;
|
|
7671
7131
|
json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7672
7132
|
};
|
|
7673
7133
|
const prefaultProcessor = (schema, ctx, json, params) => {
|
|
7674
7134
|
const def = schema._zod.def;
|
|
7675
|
-
process$
|
|
7135
|
+
process$2(def.innerType, ctx, params);
|
|
7676
7136
|
const seen = ctx.seen.get(schema);
|
|
7677
7137
|
seen.ref = def.innerType;
|
|
7678
7138
|
if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7679
7139
|
};
|
|
7680
7140
|
const catchProcessor = (schema, ctx, json, params) => {
|
|
7681
7141
|
const def = schema._zod.def;
|
|
7682
|
-
process$
|
|
7142
|
+
process$2(def.innerType, ctx, params);
|
|
7683
7143
|
const seen = ctx.seen.get(schema);
|
|
7684
7144
|
seen.ref = def.innerType;
|
|
7685
7145
|
let catchValue;
|
|
@@ -7693,20 +7153,20 @@ const catchProcessor = (schema, ctx, json, params) => {
|
|
|
7693
7153
|
const pipeProcessor = (schema, ctx, _json, params) => {
|
|
7694
7154
|
const def = schema._zod.def;
|
|
7695
7155
|
const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
7696
|
-
process$
|
|
7156
|
+
process$2(innerType, ctx, params);
|
|
7697
7157
|
const seen = ctx.seen.get(schema);
|
|
7698
7158
|
seen.ref = innerType;
|
|
7699
7159
|
};
|
|
7700
7160
|
const readonlyProcessor = (schema, ctx, json, params) => {
|
|
7701
7161
|
const def = schema._zod.def;
|
|
7702
|
-
process$
|
|
7162
|
+
process$2(def.innerType, ctx, params);
|
|
7703
7163
|
const seen = ctx.seen.get(schema);
|
|
7704
7164
|
seen.ref = def.innerType;
|
|
7705
7165
|
json.readOnly = true;
|
|
7706
7166
|
};
|
|
7707
7167
|
const optionalProcessor = (schema, ctx, _json, params) => {
|
|
7708
7168
|
const def = schema._zod.def;
|
|
7709
|
-
process$
|
|
7169
|
+
process$2(def.innerType, ctx, params);
|
|
7710
7170
|
const seen = ctx.seen.get(schema);
|
|
7711
7171
|
seen.ref = def.innerType;
|
|
7712
7172
|
};
|
|
@@ -9277,7 +8737,7 @@ var distribution_default = ky;
|
|
|
9277
8737
|
|
|
9278
8738
|
//#endregion
|
|
9279
8739
|
//#region src/core/config.ts
|
|
9280
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8740
|
+
const __dirname$1 = dirname(fileURLToPath(import.meta.url));
|
|
9281
8741
|
function getBase44GlobalDir() {
|
|
9282
8742
|
return join(homedir(), ".base44");
|
|
9283
8743
|
}
|
|
@@ -9285,7 +8745,7 @@ function getAuthFilePath() {
|
|
|
9285
8745
|
return join(getBase44GlobalDir(), "auth", "auth.json");
|
|
9286
8746
|
}
|
|
9287
8747
|
function getTemplatesDir() {
|
|
9288
|
-
return join(__dirname, "templates");
|
|
8748
|
+
return join(__dirname$1, "templates");
|
|
9289
8749
|
}
|
|
9290
8750
|
function getTemplatesIndexPath() {
|
|
9291
8751
|
return join(getTemplatesDir(), "templates.json");
|
|
@@ -16732,7 +16192,7 @@ const createIgnorePredicate = (patterns, cwd, baseDir) => {
|
|
|
16732
16192
|
};
|
|
16733
16193
|
const normalizeOptions$2 = (options = {}) => {
|
|
16734
16194
|
const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
|
|
16735
|
-
const cwd = toPath$1(options.cwd) ??
|
|
16195
|
+
const cwd = toPath$1(options.cwd) ?? y.cwd();
|
|
16736
16196
|
const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
|
|
16737
16197
|
return {
|
|
16738
16198
|
cwd,
|
|
@@ -16829,7 +16289,7 @@ const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
|
16829
16289
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
16830
16290
|
return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
16831
16291
|
};
|
|
16832
|
-
const directoryToGlob = async (directoryPaths, { cwd =
|
|
16292
|
+
const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => {
|
|
16833
16293
|
return (await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
16834
16294
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16835
16295
|
directoryPath,
|
|
@@ -16843,7 +16303,7 @@ const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, e
|
|
|
16843
16303
|
}) : directoryPath;
|
|
16844
16304
|
}))).flat();
|
|
16845
16305
|
};
|
|
16846
|
-
const directoryToGlobSync = (directoryPaths, { cwd =
|
|
16306
|
+
const directoryToGlobSync = (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
|
|
16847
16307
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16848
16308
|
directoryPath,
|
|
16849
16309
|
files,
|
|
@@ -16939,7 +16399,7 @@ const applyIgnoreFilesAndGetFilterSync = (options) => {
|
|
|
16939
16399
|
};
|
|
16940
16400
|
const createFilterFunction = (isIgnored, cwd) => {
|
|
16941
16401
|
const seen = /* @__PURE__ */ new Set();
|
|
16942
|
-
const basePath = cwd ||
|
|
16402
|
+
const basePath = cwd || y.cwd();
|
|
16943
16403
|
const pathCache = /* @__PURE__ */ new Map();
|
|
16944
16404
|
return (fastGlobResult) => {
|
|
16945
16405
|
const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
@@ -27303,11 +26763,11 @@ const constants$2 = Object.freeze(Object.assign(Object.create(null), {
|
|
|
27303
26763
|
|
|
27304
26764
|
//#endregion
|
|
27305
26765
|
//#region node_modules/minizlib/dist/esm/index.js
|
|
27306
|
-
const OriginalBufferConcat = Buffer$
|
|
27307
|
-
const desc = Object.getOwnPropertyDescriptor(Buffer$
|
|
26766
|
+
const OriginalBufferConcat = Buffer$1.concat;
|
|
26767
|
+
const desc = Object.getOwnPropertyDescriptor(Buffer$1, "concat");
|
|
27308
26768
|
const noop$2 = (args) => args;
|
|
27309
26769
|
const passthroughBufferConcat = desc?.writable === true || desc?.set !== void 0 ? (makeNoOp) => {
|
|
27310
|
-
Buffer$
|
|
26770
|
+
Buffer$1.concat = makeNoOp ? noop$2 : OriginalBufferConcat;
|
|
27311
26771
|
} : (_$2) => {};
|
|
27312
26772
|
const _superWrite = Symbol("_superWrite");
|
|
27313
26773
|
var ZlibError = class extends Error {
|
|
@@ -27385,7 +26845,7 @@ var ZlibBase = class extends Minipass {
|
|
|
27385
26845
|
flush(flushFlag) {
|
|
27386
26846
|
if (this.ended) return;
|
|
27387
26847
|
if (typeof flushFlag !== "number") flushFlag = this.#fullFlushFlag;
|
|
27388
|
-
this.write(Object.assign(Buffer$
|
|
26848
|
+
this.write(Object.assign(Buffer$1.alloc(0), { [_flushFlag]: flushFlag }));
|
|
27389
26849
|
}
|
|
27390
26850
|
end(chunk, encoding, cb) {
|
|
27391
26851
|
/* c8 ignore start */
|
|
@@ -27413,7 +26873,7 @@ var ZlibBase = class extends Minipass {
|
|
|
27413
26873
|
}
|
|
27414
26874
|
write(chunk, encoding, cb) {
|
|
27415
26875
|
if (typeof encoding === "function") cb = encoding, encoding = "utf8";
|
|
27416
|
-
if (typeof chunk === "string") chunk = Buffer$
|
|
26876
|
+
if (typeof chunk === "string") chunk = Buffer$1.from(chunk, encoding);
|
|
27417
26877
|
if (this.#sawError) return;
|
|
27418
26878
|
assert(this.#handle, "zlib binding closed");
|
|
27419
26879
|
const nativeHandle = this.#handle._handle;
|
|
@@ -27442,9 +26902,9 @@ var ZlibBase = class extends Minipass {
|
|
|
27442
26902
|
let writeReturn;
|
|
27443
26903
|
if (result) if (Array.isArray(result) && result.length > 0) {
|
|
27444
26904
|
const r$1 = result[0];
|
|
27445
|
-
writeReturn = this[_superWrite](Buffer$
|
|
26905
|
+
writeReturn = this[_superWrite](Buffer$1.from(r$1));
|
|
27446
26906
|
for (let i$1 = 1; i$1 < result.length; i$1++) writeReturn = this[_superWrite](result[i$1]);
|
|
27447
|
-
} else writeReturn = this[_superWrite](Buffer$
|
|
26907
|
+
} else writeReturn = this[_superWrite](Buffer$1.from(result));
|
|
27448
26908
|
if (cb) cb();
|
|
27449
26909
|
return writeReturn;
|
|
27450
26910
|
}
|
|
@@ -27922,8 +27382,8 @@ const parseKVLine = (set, line) => {
|
|
|
27922
27382
|
|
|
27923
27383
|
//#endregion
|
|
27924
27384
|
//#region node_modules/tar/dist/esm/normalize-windows-path.js
|
|
27925
|
-
const platform$
|
|
27926
|
-
const normalizeWindowsPath = platform$
|
|
27385
|
+
const platform$2 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
27386
|
+
const normalizeWindowsPath = platform$2 !== "win32" ? (p$1) => p$1 : (p$1) => p$1 && p$1.replace(/\\/g, "/");
|
|
27927
27387
|
|
|
27928
27388
|
//#endregion
|
|
27929
27389
|
//#region node_modules/tar/dist/esm/read-entry.js
|
|
@@ -31308,13 +30768,13 @@ var ansi_styles_default = ansiStyles;
|
|
|
31308
30768
|
|
|
31309
30769
|
//#endregion
|
|
31310
30770
|
//#region node_modules/chalk/source/vendor/supports-color/index.js
|
|
31311
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
30771
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : y.argv) {
|
|
31312
30772
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
31313
30773
|
const position = argv.indexOf(prefix + flag);
|
|
31314
30774
|
const terminatorPosition = argv.indexOf("--");
|
|
31315
30775
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
31316
30776
|
}
|
|
31317
|
-
const { env } =
|
|
30777
|
+
const { env } = y;
|
|
31318
30778
|
let flagForceColor;
|
|
31319
30779
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
31320
30780
|
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
@@ -31347,7 +30807,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
31347
30807
|
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
31348
30808
|
const min = forceColor || 0;
|
|
31349
30809
|
if (env.TERM === "dumb") return min;
|
|
31350
|
-
if (
|
|
30810
|
+
if (y.platform === "win32") {
|
|
31351
30811
|
const osRelease = os.release().split(".");
|
|
31352
30812
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
31353
30813
|
return 1;
|
|
@@ -31798,18 +31258,7 @@ async function generateAndDisplayDeviceCode() {
|
|
|
31798
31258
|
successMessage: "Device code generated",
|
|
31799
31259
|
errorMessage: "Failed to generate device code"
|
|
31800
31260
|
});
|
|
31801
|
-
M.info(`Verification code: ${theme.styles.bold(deviceCodeResponse.userCode)}\nPlease confirm this code at: ${
|
|
31802
|
-
const rl = readline.createInterface({
|
|
31803
|
-
input: process.stdin,
|
|
31804
|
-
output: process.stdout
|
|
31805
|
-
});
|
|
31806
|
-
await new Promise((resolve$1) => {
|
|
31807
|
-
rl.question("Press Enter to open in browser...", () => {
|
|
31808
|
-
rl.close();
|
|
31809
|
-
resolve$1();
|
|
31810
|
-
});
|
|
31811
|
-
});
|
|
31812
|
-
await open_default(deviceCodeResponse.verificationUri);
|
|
31261
|
+
M.info(`Verification code: ${theme.styles.bold(deviceCodeResponse.userCode)}\nPlease confirm this code at: ${deviceCodeResponse.verificationUri}`);
|
|
31813
31262
|
return deviceCodeResponse;
|
|
31814
31263
|
}
|
|
31815
31264
|
async function waitForAuthentication(deviceCode, expiresIn, interval) {
|
|
@@ -32097,9 +31546,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
|
|
|
32097
31546
|
//#region node_modules/execa/lib/utils/standard-stream.js
|
|
32098
31547
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
32099
31548
|
const STANDARD_STREAMS = [
|
|
32100
|
-
|
|
32101
|
-
|
|
32102
|
-
|
|
31549
|
+
y.stdin,
|
|
31550
|
+
y.stdout,
|
|
31551
|
+
y.stderr
|
|
32103
31552
|
];
|
|
32104
31553
|
const STANDARD_STREAMS_ALIASES = [
|
|
32105
31554
|
"stdin",
|
|
@@ -32224,9 +31673,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
32224
31673
|
//#endregion
|
|
32225
31674
|
//#region node_modules/is-unicode-supported/index.js
|
|
32226
31675
|
function isUnicodeSupported() {
|
|
32227
|
-
const { env: env$1 } =
|
|
31676
|
+
const { env: env$1 } = y;
|
|
32228
31677
|
const { TERM, TERM_PROGRAM } = env$1;
|
|
32229
|
-
if (
|
|
31678
|
+
if (y.platform !== "win32") return TERM !== "linux";
|
|
32230
31679
|
return Boolean(env$1.WT_SESSION) || Boolean(env$1.TERMINUS_SUBLIME) || env$1.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env$1.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
32231
31680
|
}
|
|
32232
31681
|
|
|
@@ -33153,7 +32602,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
33153
32602
|
|
|
33154
32603
|
//#endregion
|
|
33155
32604
|
//#region node_modules/npm-run-path/index.js
|
|
33156
|
-
const npmRunPath = ({ cwd =
|
|
32605
|
+
const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
|
|
33157
32606
|
const cwdPath = path.resolve(toPath(cwd));
|
|
33158
32607
|
const result = [];
|
|
33159
32608
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -33171,7 +32620,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
|
33171
32620
|
const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
|
|
33172
32621
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
33173
32622
|
};
|
|
33174
|
-
const npmRunPathEnv = ({ env: env$1 =
|
|
32623
|
+
const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
|
|
33175
32624
|
env$1 = { ...env$1 };
|
|
33176
32625
|
const pathName = pathKey({ env: env$1 });
|
|
33177
32626
|
options.path = env$1[pathName];
|
|
@@ -33504,7 +32953,7 @@ const getSignals = () => {
|
|
|
33504
32953
|
return [...SIGNALS, ...realtimeSignals].map(normalizeSignal$1);
|
|
33505
32954
|
};
|
|
33506
32955
|
const normalizeSignal$1 = ({ name: name$1, number: defaultNumber, description, action, forced = false, standard }) => {
|
|
33507
|
-
const { signals: { [name$1]: constantSignal } } = constants
|
|
32956
|
+
const { signals: { [name$1]: constantSignal } } = constants;
|
|
33508
32957
|
const supported = constantSignal !== void 0;
|
|
33509
32958
|
return {
|
|
33510
32959
|
name: name$1,
|
|
@@ -33554,7 +33003,7 @@ const getSignalByNumber = (number$2, signals$1) => {
|
|
|
33554
33003
|
} };
|
|
33555
33004
|
};
|
|
33556
33005
|
const findSignalByNumber = (number$2, signals$1) => {
|
|
33557
|
-
const signal = signals$1.find(({ name: name$1 }) => constants
|
|
33006
|
+
const signal = signals$1.find(({ name: name$1 }) => constants.signals[name$1] === number$2);
|
|
33558
33007
|
if (signal !== void 0) return signal;
|
|
33559
33008
|
return signals$1.find((signalA) => signalA.number === number$2);
|
|
33560
33009
|
};
|
|
@@ -33577,17 +33026,17 @@ const normalizeSignalInteger = (signalInteger, optionName) => {
|
|
|
33577
33026
|
if (signalsIntegerToName.has(signalInteger)) return signalsIntegerToName.get(signalInteger);
|
|
33578
33027
|
throw new TypeError(`Invalid ${optionName} ${signalInteger}: this signal integer does not exist.\n${getAvailableSignals()}`);
|
|
33579
33028
|
};
|
|
33580
|
-
const getSignalsIntegerToName = () => new Map(Object.entries(constants
|
|
33029
|
+
const getSignalsIntegerToName = () => new Map(Object.entries(constants.signals).reverse().map(([signalName, signalInteger]) => [signalInteger, signalName]));
|
|
33581
33030
|
const signalsIntegerToName = getSignalsIntegerToName();
|
|
33582
33031
|
const normalizeSignalName = (signalName, optionName) => {
|
|
33583
|
-
if (signalName in constants
|
|
33584
|
-
if (signalName.toUpperCase() in constants
|
|
33032
|
+
if (signalName in constants.signals) return signalName;
|
|
33033
|
+
if (signalName.toUpperCase() in constants.signals) throw new TypeError(`Invalid ${optionName} '${signalName}': please rename it to '${signalName.toUpperCase()}'.`);
|
|
33585
33034
|
throw new TypeError(`Invalid ${optionName} '${signalName}': this signal name does not exist.\n${getAvailableSignals()}`);
|
|
33586
33035
|
};
|
|
33587
33036
|
const getAvailableSignals = () => `Available signal names: ${getAvailableSignalNames()}.
|
|
33588
33037
|
Available signal numbers: ${getAvailableSignalIntegers()}.`;
|
|
33589
|
-
const getAvailableSignalNames = () => Object.keys(constants
|
|
33590
|
-
const getAvailableSignalIntegers = () => [...new Set(Object.values(constants
|
|
33038
|
+
const getAvailableSignalNames = () => Object.keys(constants.signals).sort().map((signalName) => `'${signalName}'`).join(", ");
|
|
33039
|
+
const getAvailableSignalIntegers = () => [...new Set(Object.values(constants.signals).sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))].join(", ");
|
|
33591
33040
|
const getSignalDescription = (signal) => signalsByName[signal].description;
|
|
33592
33041
|
|
|
33593
33042
|
//#endregion
|
|
@@ -34306,7 +33755,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
34306
33755
|
};
|
|
34307
33756
|
const getDefaultCwd = () => {
|
|
34308
33757
|
try {
|
|
34309
|
-
return
|
|
33758
|
+
return y.cwd();
|
|
34310
33759
|
} catch (error) {
|
|
34311
33760
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
34312
33761
|
throw error;
|
|
@@ -34341,7 +33790,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
34341
33790
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
34342
33791
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
34343
33792
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
34344
|
-
if (
|
|
33793
|
+
if (y.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
34345
33794
|
return {
|
|
34346
33795
|
file,
|
|
34347
33796
|
commandArguments,
|
|
@@ -34368,7 +33817,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
34368
33817
|
});
|
|
34369
33818
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
34370
33819
|
const env$1 = extendEnv ? {
|
|
34371
|
-
...
|
|
33820
|
+
...y.env,
|
|
34372
33821
|
...envOption
|
|
34373
33822
|
} : envOption;
|
|
34374
33823
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -35368,12 +34817,12 @@ const guessStreamDirection = {
|
|
|
35368
34817
|
}
|
|
35369
34818
|
};
|
|
35370
34819
|
const getStandardStreamDirection = (value) => {
|
|
35371
|
-
if ([0,
|
|
34820
|
+
if ([0, y.stdin].includes(value)) return "input";
|
|
35372
34821
|
if ([
|
|
35373
34822
|
1,
|
|
35374
34823
|
2,
|
|
35375
|
-
|
|
35376
|
-
|
|
34824
|
+
y.stdout,
|
|
34825
|
+
y.stderr
|
|
35377
34826
|
].includes(value)) return "output";
|
|
35378
34827
|
};
|
|
35379
34828
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -35827,7 +35276,7 @@ const linesUint8ArrayInfo = {
|
|
|
35827
35276
|
//#region node_modules/execa/lib/transform/validate.js
|
|
35828
35277
|
const getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? void 0 : validateStringTransformInput.bind(void 0, optionName);
|
|
35829
35278
|
const validateStringTransformInput = function* (optionName, chunk) {
|
|
35830
|
-
if (typeof chunk !== "string" && !isUint8Array(chunk) && !Buffer$
|
|
35279
|
+
if (typeof chunk !== "string" && !isUint8Array(chunk) && !Buffer$2.isBuffer(chunk)) throw new TypeError(`The \`${optionName}\` option's transform must use "objectMode: true" to receive as input: ${typeof chunk}.`);
|
|
35831
35280
|
yield chunk;
|
|
35832
35281
|
};
|
|
35833
35282
|
const getValidateTransformReturn = (readableObjectMode, optionName) => readableObjectMode ? validateObjectTransformReturn.bind(void 0, optionName) : validateStringTransformReturn.bind(void 0, optionName);
|
|
@@ -35858,7 +35307,7 @@ const getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
|
35858
35307
|
};
|
|
35859
35308
|
};
|
|
35860
35309
|
const encodingUint8ArrayGenerator = function* (textEncoder$2, chunk) {
|
|
35861
|
-
if (Buffer$
|
|
35310
|
+
if (Buffer$2.isBuffer(chunk)) yield bufferToUint8Array(chunk);
|
|
35862
35311
|
else if (typeof chunk === "string") yield textEncoder$2.encode(chunk);
|
|
35863
35312
|
else yield chunk;
|
|
35864
35313
|
};
|
|
@@ -36437,9 +35886,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
36437
35886
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
36438
35887
|
};
|
|
36439
35888
|
const getIpcExport = () => {
|
|
36440
|
-
const anyProcess =
|
|
35889
|
+
const anyProcess = y;
|
|
36441
35890
|
const isSubprocess = true;
|
|
36442
|
-
const ipc =
|
|
35891
|
+
const ipc = y.channel !== void 0;
|
|
36443
35892
|
return {
|
|
36444
35893
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
36445
35894
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -36555,7 +36004,7 @@ const addPropertiesAsync = {
|
|
|
36555
36004
|
iterable: ({ value }) => ({ stream: Readable.from(value) }),
|
|
36556
36005
|
asyncIterable: ({ value }) => ({ stream: Readable.from(value) }),
|
|
36557
36006
|
string: ({ value }) => ({ stream: Readable.from(value) }),
|
|
36558
|
-
uint8Array: ({ value }) => ({ stream: Readable.from(Buffer$
|
|
36007
|
+
uint8Array: ({ value }) => ({ stream: Readable.from(Buffer$2.from(value)) })
|
|
36559
36008
|
},
|
|
36560
36009
|
output: {
|
|
36561
36010
|
...addProperties,
|
|
@@ -36681,7 +36130,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
|
|
|
36681
36130
|
|
|
36682
36131
|
//#endregion
|
|
36683
36132
|
//#region node_modules/signal-exit/dist/mjs/index.js
|
|
36684
|
-
const processOk = (process$
|
|
36133
|
+
const processOk = (process$4) => !!process$4 && typeof process$4 === "object" && typeof process$4.removeListener === "function" && typeof process$4.emit === "function" && typeof process$4.reallyExit === "function" && typeof process$4.listeners === "function" && typeof process$4.kill === "function" && typeof process$4.pid === "number" && typeof process$4.on === "function";
|
|
36685
36134
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
36686
36135
|
const global$1 = globalThis;
|
|
36687
36136
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -36749,7 +36198,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
36749
36198
|
};
|
|
36750
36199
|
var SignalExit = class extends SignalExitBase {
|
|
36751
36200
|
/* c8 ignore start */
|
|
36752
|
-
#hupSig = process$
|
|
36201
|
+
#hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
36753
36202
|
/* c8 ignore stop */
|
|
36754
36203
|
#emitter = new Emitter();
|
|
36755
36204
|
#process;
|
|
@@ -36757,15 +36206,15 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36757
36206
|
#originalProcessReallyExit;
|
|
36758
36207
|
#sigListeners = {};
|
|
36759
36208
|
#loaded = false;
|
|
36760
|
-
constructor(process$
|
|
36209
|
+
constructor(process$4) {
|
|
36761
36210
|
super();
|
|
36762
|
-
this.#process = process$
|
|
36211
|
+
this.#process = process$4;
|
|
36763
36212
|
this.#sigListeners = {};
|
|
36764
36213
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
36765
36214
|
const listeners = this.#process.listeners(sig);
|
|
36766
36215
|
let { count: count$1 } = this.#emitter;
|
|
36767
36216
|
/* c8 ignore start */
|
|
36768
|
-
const p$1 = process$
|
|
36217
|
+
const p$1 = process$4;
|
|
36769
36218
|
if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
|
|
36770
36219
|
/* c8 ignore stop */
|
|
36771
36220
|
if (listeners.length === count$1) {
|
|
@@ -36773,11 +36222,11 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36773
36222
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
36774
36223
|
/* c8 ignore start */
|
|
36775
36224
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
36776
|
-
if (!ret) process$
|
|
36225
|
+
if (!ret) process$4.kill(process$4.pid, s);
|
|
36777
36226
|
}
|
|
36778
36227
|
};
|
|
36779
|
-
this.#originalProcessReallyExit = process$
|
|
36780
|
-
this.#originalProcessEmit = process$
|
|
36228
|
+
this.#originalProcessReallyExit = process$4.reallyExit;
|
|
36229
|
+
this.#originalProcessEmit = process$4.emit;
|
|
36781
36230
|
}
|
|
36782
36231
|
onExit(cb, opts) {
|
|
36783
36232
|
/* c8 ignore start */
|
|
@@ -36844,8 +36293,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36844
36293
|
} else return og.call(this.#process, ev, ...args);
|
|
36845
36294
|
}
|
|
36846
36295
|
};
|
|
36847
|
-
const process$
|
|
36848
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$
|
|
36296
|
+
const process$1 = globalThis.process;
|
|
36297
|
+
const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
36849
36298
|
|
|
36850
36299
|
//#endregion
|
|
36851
36300
|
//#region node_modules/execa/lib/terminate/cleanup.js
|
|
@@ -38596,13 +38045,6 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38596
38045
|
//#region src/cli/commands/project/create.ts
|
|
38597
38046
|
var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
|
|
38598
38047
|
const DEFAULT_TEMPLATE_ID = "backend-only";
|
|
38599
|
-
const SUPPORTED_AGENTS = [{
|
|
38600
|
-
value: "cursor",
|
|
38601
|
-
label: "Cursor"
|
|
38602
|
-
}, {
|
|
38603
|
-
value: "claude-code",
|
|
38604
|
-
label: "Claude Code"
|
|
38605
|
-
}];
|
|
38606
38048
|
async function getTemplateById(templateId) {
|
|
38607
38049
|
const templates = await listTemplates();
|
|
38608
38050
|
const template = templates.find((t) => t.id === templateId);
|
|
@@ -38740,48 +38182,573 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38740
38182
|
finalAppUrl = appUrl;
|
|
38741
38183
|
}
|
|
38742
38184
|
}
|
|
38743
|
-
let
|
|
38185
|
+
let shouldAddSkills = false;
|
|
38744
38186
|
if (isInteractive) {
|
|
38745
|
-
const result = await
|
|
38746
|
-
|
|
38747
|
-
|
|
38748
|
-
|
|
38749
|
-
|
|
38187
|
+
const result = await ye({ message: "Add AI agent skills?" });
|
|
38188
|
+
shouldAddSkills = !pD(result) && result;
|
|
38189
|
+
} else shouldAddSkills = !!skills;
|
|
38190
|
+
if (shouldAddSkills) await runTask("Installing AI agent skills...", async () => {
|
|
38191
|
+
await execa("npx", [
|
|
38192
|
+
"-y",
|
|
38193
|
+
"add-skill",
|
|
38194
|
+
"base44/skills",
|
|
38195
|
+
"-y"
|
|
38196
|
+
], {
|
|
38197
|
+
cwd: resolvedPath,
|
|
38198
|
+
stdio: "inherit"
|
|
38750
38199
|
});
|
|
38751
|
-
|
|
38752
|
-
|
|
38753
|
-
|
|
38754
|
-
|
|
38755
|
-
M.step(`Installing skills for: ${selectedAgents.join(", ")}`);
|
|
38756
|
-
await runTask(`Installing skills for: ${selectedAgents.join(", ")}`, async () => {
|
|
38757
|
-
await execa("npx", [
|
|
38758
|
-
"-y",
|
|
38759
|
-
"add-skill",
|
|
38760
|
-
"base44/skills",
|
|
38761
|
-
"-y",
|
|
38762
|
-
"-s",
|
|
38763
|
-
"base44-cli",
|
|
38764
|
-
"-s",
|
|
38765
|
-
"base44-sdk",
|
|
38766
|
-
...agentArgs
|
|
38767
|
-
], {
|
|
38768
|
-
cwd: resolvedPath,
|
|
38769
|
-
stdio: "inherit"
|
|
38770
|
-
});
|
|
38771
|
-
}, {
|
|
38772
|
-
successMessage: theme.colors.base44Orange("AI agent skills added successfully"),
|
|
38773
|
-
errorMessage: "Failed to add AI agent skills - you can add them later with: npx add-skill base44/skills"
|
|
38774
|
-
});
|
|
38775
|
-
}
|
|
38200
|
+
}, {
|
|
38201
|
+
successMessage: theme.colors.base44Orange("AI agent skills added successfully"),
|
|
38202
|
+
errorMessage: "Failed to add AI agent skills - you can add them later with: npx add-skill base44/skills"
|
|
38203
|
+
});
|
|
38776
38204
|
M.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name$1)}`);
|
|
38777
38205
|
M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(projectId))}`);
|
|
38778
38206
|
if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
|
|
38779
38207
|
return { outroMessage: "Your project is set up and ready to use" };
|
|
38780
38208
|
}
|
|
38781
|
-
const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-p, --path <path>", "Path where to create the project").option("-t, --template <id>", "Template ID (e.g., backend-only, backend-and-client)").option("--deploy", "Build and deploy the site").option("--skills", "Add AI agent skills
|
|
38209
|
+
const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-p, --path <path>", "Path where to create the project").option("-t, --template <id>", "Template ID (e.g., backend-only, backend-and-client)").option("--deploy", "Build and deploy the site").option("--skills", "Add AI agent skills").hook("preAction", validateNonInteractiveFlags$1).action(async (options) => {
|
|
38782
38210
|
await chooseCreate(options);
|
|
38783
38211
|
});
|
|
38784
38212
|
|
|
38213
|
+
//#endregion
|
|
38214
|
+
//#region node_modules/is-docker/index.js
|
|
38215
|
+
let isDockerCached;
|
|
38216
|
+
function hasDockerEnv() {
|
|
38217
|
+
try {
|
|
38218
|
+
fs.statSync("/.dockerenv");
|
|
38219
|
+
return true;
|
|
38220
|
+
} catch {
|
|
38221
|
+
return false;
|
|
38222
|
+
}
|
|
38223
|
+
}
|
|
38224
|
+
function hasDockerCGroup() {
|
|
38225
|
+
try {
|
|
38226
|
+
return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
38227
|
+
} catch {
|
|
38228
|
+
return false;
|
|
38229
|
+
}
|
|
38230
|
+
}
|
|
38231
|
+
function isDocker() {
|
|
38232
|
+
if (isDockerCached === void 0) isDockerCached = hasDockerEnv() || hasDockerCGroup();
|
|
38233
|
+
return isDockerCached;
|
|
38234
|
+
}
|
|
38235
|
+
|
|
38236
|
+
//#endregion
|
|
38237
|
+
//#region node_modules/is-inside-container/index.js
|
|
38238
|
+
let cachedResult;
|
|
38239
|
+
const hasContainerEnv = () => {
|
|
38240
|
+
try {
|
|
38241
|
+
fs.statSync("/run/.containerenv");
|
|
38242
|
+
return true;
|
|
38243
|
+
} catch {
|
|
38244
|
+
return false;
|
|
38245
|
+
}
|
|
38246
|
+
};
|
|
38247
|
+
function isInsideContainer() {
|
|
38248
|
+
if (cachedResult === void 0) cachedResult = hasContainerEnv() || isDocker();
|
|
38249
|
+
return cachedResult;
|
|
38250
|
+
}
|
|
38251
|
+
|
|
38252
|
+
//#endregion
|
|
38253
|
+
//#region node_modules/is-wsl/index.js
|
|
38254
|
+
const isWsl = () => {
|
|
38255
|
+
if (y.platform !== "linux") return false;
|
|
38256
|
+
if (os.release().toLowerCase().includes("microsoft")) {
|
|
38257
|
+
if (isInsideContainer()) return false;
|
|
38258
|
+
return true;
|
|
38259
|
+
}
|
|
38260
|
+
try {
|
|
38261
|
+
return fs.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
|
38262
|
+
} catch {
|
|
38263
|
+
return false;
|
|
38264
|
+
}
|
|
38265
|
+
};
|
|
38266
|
+
var is_wsl_default = y.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
38267
|
+
|
|
38268
|
+
//#endregion
|
|
38269
|
+
//#region node_modules/powershell-utils/index.js
|
|
38270
|
+
const execFile$2 = promisify(childProcess.execFile);
|
|
38271
|
+
const powerShellPath$1 = () => `${y.env.SYSTEMROOT || y.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
38272
|
+
const executePowerShell = async (command, options = {}) => {
|
|
38273
|
+
const { powerShellPath: psPath, ...execFileOptions } = options;
|
|
38274
|
+
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
38275
|
+
return execFile$2(psPath ?? powerShellPath$1(), [...executePowerShell.argumentsPrefix, encodedCommand], {
|
|
38276
|
+
encoding: "utf8",
|
|
38277
|
+
...execFileOptions
|
|
38278
|
+
});
|
|
38279
|
+
};
|
|
38280
|
+
executePowerShell.argumentsPrefix = [
|
|
38281
|
+
"-NoProfile",
|
|
38282
|
+
"-NonInteractive",
|
|
38283
|
+
"-ExecutionPolicy",
|
|
38284
|
+
"Bypass",
|
|
38285
|
+
"-EncodedCommand"
|
|
38286
|
+
];
|
|
38287
|
+
executePowerShell.encodeCommand = (command) => Buffer$2.from(command, "utf16le").toString("base64");
|
|
38288
|
+
executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
|
|
38289
|
+
|
|
38290
|
+
//#endregion
|
|
38291
|
+
//#region node_modules/wsl-utils/utilities.js
|
|
38292
|
+
function parseMountPointFromConfig(content) {
|
|
38293
|
+
for (const line of content.split("\n")) {
|
|
38294
|
+
if (/^\s*#/.test(line)) continue;
|
|
38295
|
+
const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
|
|
38296
|
+
if (!match) continue;
|
|
38297
|
+
return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
|
|
38298
|
+
}
|
|
38299
|
+
}
|
|
38300
|
+
|
|
38301
|
+
//#endregion
|
|
38302
|
+
//#region node_modules/wsl-utils/index.js
|
|
38303
|
+
const execFile$1 = promisify(childProcess.execFile);
|
|
38304
|
+
const wslDrivesMountPoint = (() => {
|
|
38305
|
+
const defaultMountPoint = "/mnt/";
|
|
38306
|
+
let mountPoint;
|
|
38307
|
+
return async function() {
|
|
38308
|
+
if (mountPoint) return mountPoint;
|
|
38309
|
+
const configFilePath = "/etc/wsl.conf";
|
|
38310
|
+
let isConfigFileExists = false;
|
|
38311
|
+
try {
|
|
38312
|
+
await fs$1.access(configFilePath, constants$1.F_OK);
|
|
38313
|
+
isConfigFileExists = true;
|
|
38314
|
+
} catch {}
|
|
38315
|
+
if (!isConfigFileExists) return defaultMountPoint;
|
|
38316
|
+
const parsedMountPoint = parseMountPointFromConfig(await fs$1.readFile(configFilePath, { encoding: "utf8" }));
|
|
38317
|
+
if (parsedMountPoint === void 0) return defaultMountPoint;
|
|
38318
|
+
mountPoint = parsedMountPoint;
|
|
38319
|
+
mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
|
|
38320
|
+
return mountPoint;
|
|
38321
|
+
};
|
|
38322
|
+
})();
|
|
38323
|
+
const powerShellPathFromWsl = async () => {
|
|
38324
|
+
return `${await wslDrivesMountPoint()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
|
|
38325
|
+
};
|
|
38326
|
+
const powerShellPath = is_wsl_default ? powerShellPathFromWsl : powerShellPath$1;
|
|
38327
|
+
let canAccessPowerShellPromise;
|
|
38328
|
+
const canAccessPowerShell = async () => {
|
|
38329
|
+
canAccessPowerShellPromise ??= (async () => {
|
|
38330
|
+
try {
|
|
38331
|
+
const psPath = await powerShellPath();
|
|
38332
|
+
await fs$1.access(psPath, constants$1.X_OK);
|
|
38333
|
+
return true;
|
|
38334
|
+
} catch {
|
|
38335
|
+
return false;
|
|
38336
|
+
}
|
|
38337
|
+
})();
|
|
38338
|
+
return canAccessPowerShellPromise;
|
|
38339
|
+
};
|
|
38340
|
+
const wslDefaultBrowser = async () => {
|
|
38341
|
+
const psPath = await powerShellPath();
|
|
38342
|
+
const { stdout: stdout$1 } = await executePowerShell(String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`, { powerShellPath: psPath });
|
|
38343
|
+
return stdout$1.trim();
|
|
38344
|
+
};
|
|
38345
|
+
const convertWslPathToWindows = async (path$16) => {
|
|
38346
|
+
if (/^[a-z]+:\/\//i.test(path$16)) return path$16;
|
|
38347
|
+
try {
|
|
38348
|
+
const { stdout: stdout$1 } = await execFile$1("wslpath", ["-aw", path$16], { encoding: "utf8" });
|
|
38349
|
+
return stdout$1.trim();
|
|
38350
|
+
} catch {
|
|
38351
|
+
return path$16;
|
|
38352
|
+
}
|
|
38353
|
+
};
|
|
38354
|
+
|
|
38355
|
+
//#endregion
|
|
38356
|
+
//#region node_modules/define-lazy-prop/index.js
|
|
38357
|
+
function defineLazyProperty(object$1, propertyName, valueGetter) {
|
|
38358
|
+
const define$1 = (value) => Object.defineProperty(object$1, propertyName, {
|
|
38359
|
+
value,
|
|
38360
|
+
enumerable: true,
|
|
38361
|
+
writable: true
|
|
38362
|
+
});
|
|
38363
|
+
Object.defineProperty(object$1, propertyName, {
|
|
38364
|
+
configurable: true,
|
|
38365
|
+
enumerable: true,
|
|
38366
|
+
get() {
|
|
38367
|
+
const result = valueGetter();
|
|
38368
|
+
define$1(result);
|
|
38369
|
+
return result;
|
|
38370
|
+
},
|
|
38371
|
+
set(value) {
|
|
38372
|
+
define$1(value);
|
|
38373
|
+
}
|
|
38374
|
+
});
|
|
38375
|
+
return object$1;
|
|
38376
|
+
}
|
|
38377
|
+
|
|
38378
|
+
//#endregion
|
|
38379
|
+
//#region node_modules/default-browser-id/index.js
|
|
38380
|
+
const execFileAsync$3 = promisify(execFile);
|
|
38381
|
+
async function defaultBrowserId() {
|
|
38382
|
+
if (y.platform !== "darwin") throw new Error("macOS only");
|
|
38383
|
+
const { stdout: stdout$1 } = await execFileAsync$3("defaults", [
|
|
38384
|
+
"read",
|
|
38385
|
+
"com.apple.LaunchServices/com.apple.launchservices.secure",
|
|
38386
|
+
"LSHandlers"
|
|
38387
|
+
]);
|
|
38388
|
+
const browserId = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout$1)?.groups.id ?? "com.apple.Safari";
|
|
38389
|
+
if (browserId === "com.apple.safari") return "com.apple.Safari";
|
|
38390
|
+
return browserId;
|
|
38391
|
+
}
|
|
38392
|
+
|
|
38393
|
+
//#endregion
|
|
38394
|
+
//#region node_modules/run-applescript/index.js
|
|
38395
|
+
const execFileAsync$2 = promisify(execFile);
|
|
38396
|
+
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
38397
|
+
if (y.platform !== "darwin") throw new Error("macOS only");
|
|
38398
|
+
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
38399
|
+
const execOptions = {};
|
|
38400
|
+
if (signal) execOptions.signal = signal;
|
|
38401
|
+
const { stdout: stdout$1 } = await execFileAsync$2("osascript", [
|
|
38402
|
+
"-e",
|
|
38403
|
+
script,
|
|
38404
|
+
outputArguments
|
|
38405
|
+
], execOptions);
|
|
38406
|
+
return stdout$1.trim();
|
|
38407
|
+
}
|
|
38408
|
+
|
|
38409
|
+
//#endregion
|
|
38410
|
+
//#region node_modules/bundle-name/index.js
|
|
38411
|
+
async function bundleName(bundleId) {
|
|
38412
|
+
return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string\ntell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
|
|
38413
|
+
}
|
|
38414
|
+
|
|
38415
|
+
//#endregion
|
|
38416
|
+
//#region node_modules/default-browser/windows.js
|
|
38417
|
+
const execFileAsync$1 = promisify(execFile);
|
|
38418
|
+
const windowsBrowserProgIds = {
|
|
38419
|
+
MSEdgeHTM: {
|
|
38420
|
+
name: "Edge",
|
|
38421
|
+
id: "com.microsoft.edge"
|
|
38422
|
+
},
|
|
38423
|
+
MSEdgeBHTML: {
|
|
38424
|
+
name: "Edge Beta",
|
|
38425
|
+
id: "com.microsoft.edge.beta"
|
|
38426
|
+
},
|
|
38427
|
+
MSEdgeDHTML: {
|
|
38428
|
+
name: "Edge Dev",
|
|
38429
|
+
id: "com.microsoft.edge.dev"
|
|
38430
|
+
},
|
|
38431
|
+
AppXq0fevzme2pys62n3e0fbqa7peapykr8v: {
|
|
38432
|
+
name: "Edge",
|
|
38433
|
+
id: "com.microsoft.edge.old"
|
|
38434
|
+
},
|
|
38435
|
+
ChromeHTML: {
|
|
38436
|
+
name: "Chrome",
|
|
38437
|
+
id: "com.google.chrome"
|
|
38438
|
+
},
|
|
38439
|
+
ChromeBHTML: {
|
|
38440
|
+
name: "Chrome Beta",
|
|
38441
|
+
id: "com.google.chrome.beta"
|
|
38442
|
+
},
|
|
38443
|
+
ChromeDHTML: {
|
|
38444
|
+
name: "Chrome Dev",
|
|
38445
|
+
id: "com.google.chrome.dev"
|
|
38446
|
+
},
|
|
38447
|
+
ChromiumHTM: {
|
|
38448
|
+
name: "Chromium",
|
|
38449
|
+
id: "org.chromium.Chromium"
|
|
38450
|
+
},
|
|
38451
|
+
BraveHTML: {
|
|
38452
|
+
name: "Brave",
|
|
38453
|
+
id: "com.brave.Browser"
|
|
38454
|
+
},
|
|
38455
|
+
BraveBHTML: {
|
|
38456
|
+
name: "Brave Beta",
|
|
38457
|
+
id: "com.brave.Browser.beta"
|
|
38458
|
+
},
|
|
38459
|
+
BraveDHTML: {
|
|
38460
|
+
name: "Brave Dev",
|
|
38461
|
+
id: "com.brave.Browser.dev"
|
|
38462
|
+
},
|
|
38463
|
+
BraveSSHTM: {
|
|
38464
|
+
name: "Brave Nightly",
|
|
38465
|
+
id: "com.brave.Browser.nightly"
|
|
38466
|
+
},
|
|
38467
|
+
FirefoxURL: {
|
|
38468
|
+
name: "Firefox",
|
|
38469
|
+
id: "org.mozilla.firefox"
|
|
38470
|
+
},
|
|
38471
|
+
OperaStable: {
|
|
38472
|
+
name: "Opera",
|
|
38473
|
+
id: "com.operasoftware.Opera"
|
|
38474
|
+
},
|
|
38475
|
+
VivaldiHTM: {
|
|
38476
|
+
name: "Vivaldi",
|
|
38477
|
+
id: "com.vivaldi.Vivaldi"
|
|
38478
|
+
},
|
|
38479
|
+
"IE.HTTP": {
|
|
38480
|
+
name: "Internet Explorer",
|
|
38481
|
+
id: "com.microsoft.ie"
|
|
38482
|
+
}
|
|
38483
|
+
};
|
|
38484
|
+
const _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
|
|
38485
|
+
var UnknownBrowserError = class extends Error {};
|
|
38486
|
+
async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
|
|
38487
|
+
const { stdout: stdout$1 } = await _execFileAsync("reg", [
|
|
38488
|
+
"QUERY",
|
|
38489
|
+
" HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
|
|
38490
|
+
"/v",
|
|
38491
|
+
"ProgId"
|
|
38492
|
+
]);
|
|
38493
|
+
const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout$1);
|
|
38494
|
+
if (!match) throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout$1)}`);
|
|
38495
|
+
const { id } = match.groups;
|
|
38496
|
+
const browser = windowsBrowserProgIds[id];
|
|
38497
|
+
if (!browser) throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
|
|
38498
|
+
return browser;
|
|
38499
|
+
}
|
|
38500
|
+
|
|
38501
|
+
//#endregion
|
|
38502
|
+
//#region node_modules/default-browser/index.js
|
|
38503
|
+
const execFileAsync = promisify(execFile);
|
|
38504
|
+
const titleize = (string$2) => string$2.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x$2) => x$2.toUpperCase());
|
|
38505
|
+
async function defaultBrowser() {
|
|
38506
|
+
if (y.platform === "darwin") {
|
|
38507
|
+
const id = await defaultBrowserId();
|
|
38508
|
+
return {
|
|
38509
|
+
name: await bundleName(id),
|
|
38510
|
+
id
|
|
38511
|
+
};
|
|
38512
|
+
}
|
|
38513
|
+
if (y.platform === "linux") {
|
|
38514
|
+
const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
|
|
38515
|
+
"query",
|
|
38516
|
+
"default",
|
|
38517
|
+
"x-scheme-handler/http"
|
|
38518
|
+
]);
|
|
38519
|
+
const id = stdout$1.trim();
|
|
38520
|
+
return {
|
|
38521
|
+
name: titleize(id.replace(/.desktop$/, "").replace("-", " ")),
|
|
38522
|
+
id
|
|
38523
|
+
};
|
|
38524
|
+
}
|
|
38525
|
+
if (y.platform === "win32") return defaultBrowser$1();
|
|
38526
|
+
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
38527
|
+
}
|
|
38528
|
+
|
|
38529
|
+
//#endregion
|
|
38530
|
+
//#region node_modules/is-in-ssh/index.js
|
|
38531
|
+
const isInSsh = Boolean(y.env.SSH_CONNECTION || y.env.SSH_CLIENT || y.env.SSH_TTY);
|
|
38532
|
+
var is_in_ssh_default = isInSsh;
|
|
38533
|
+
|
|
38534
|
+
//#endregion
|
|
38535
|
+
//#region node_modules/open/index.js
|
|
38536
|
+
const fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
38537
|
+
const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
|
|
38538
|
+
const localXdgOpenPath = path.join(__dirname, "xdg-open");
|
|
38539
|
+
const { platform: platform$1, arch } = y;
|
|
38540
|
+
const tryEachApp = async (apps$1, opener) => {
|
|
38541
|
+
if (apps$1.length === 0) return;
|
|
38542
|
+
const errors = [];
|
|
38543
|
+
for (const app of apps$1) try {
|
|
38544
|
+
return await opener(app);
|
|
38545
|
+
} catch (error) {
|
|
38546
|
+
errors.push(error);
|
|
38547
|
+
}
|
|
38548
|
+
throw new AggregateError(errors, "Failed to open in all supported apps");
|
|
38549
|
+
};
|
|
38550
|
+
const baseOpen = async (options) => {
|
|
38551
|
+
options = {
|
|
38552
|
+
wait: false,
|
|
38553
|
+
background: false,
|
|
38554
|
+
newInstance: false,
|
|
38555
|
+
allowNonzeroExitCode: false,
|
|
38556
|
+
...options
|
|
38557
|
+
};
|
|
38558
|
+
const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
|
|
38559
|
+
delete options[fallbackAttemptSymbol];
|
|
38560
|
+
if (Array.isArray(options.app)) return tryEachApp(options.app, (singleApp) => baseOpen({
|
|
38561
|
+
...options,
|
|
38562
|
+
app: singleApp,
|
|
38563
|
+
[fallbackAttemptSymbol]: true
|
|
38564
|
+
}));
|
|
38565
|
+
let { name: app, arguments: appArguments = [] } = options.app ?? {};
|
|
38566
|
+
appArguments = [...appArguments];
|
|
38567
|
+
if (Array.isArray(app)) return tryEachApp(app, (appName) => baseOpen({
|
|
38568
|
+
...options,
|
|
38569
|
+
app: {
|
|
38570
|
+
name: appName,
|
|
38571
|
+
arguments: appArguments
|
|
38572
|
+
},
|
|
38573
|
+
[fallbackAttemptSymbol]: true
|
|
38574
|
+
}));
|
|
38575
|
+
if (app === "browser" || app === "browserPrivate") {
|
|
38576
|
+
const ids = {
|
|
38577
|
+
"com.google.chrome": "chrome",
|
|
38578
|
+
"google-chrome.desktop": "chrome",
|
|
38579
|
+
"com.brave.browser": "brave",
|
|
38580
|
+
"org.mozilla.firefox": "firefox",
|
|
38581
|
+
"firefox.desktop": "firefox",
|
|
38582
|
+
"com.microsoft.msedge": "edge",
|
|
38583
|
+
"com.microsoft.edge": "edge",
|
|
38584
|
+
"com.microsoft.edgemac": "edge",
|
|
38585
|
+
"microsoft-edge.desktop": "edge",
|
|
38586
|
+
"com.apple.safari": "safari"
|
|
38587
|
+
};
|
|
38588
|
+
const flags = {
|
|
38589
|
+
chrome: "--incognito",
|
|
38590
|
+
brave: "--incognito",
|
|
38591
|
+
firefox: "--private-window",
|
|
38592
|
+
edge: "--inPrivate"
|
|
38593
|
+
};
|
|
38594
|
+
let browser;
|
|
38595
|
+
if (is_wsl_default) {
|
|
38596
|
+
const progId = await wslDefaultBrowser();
|
|
38597
|
+
browser = _windowsBrowserProgIdMap.get(progId) ?? {};
|
|
38598
|
+
} else browser = await defaultBrowser();
|
|
38599
|
+
if (browser.id in ids) {
|
|
38600
|
+
const browserName = ids[browser.id.toLowerCase()];
|
|
38601
|
+
if (app === "browserPrivate") {
|
|
38602
|
+
if (browserName === "safari") throw new Error("Safari doesn't support opening in private mode via command line");
|
|
38603
|
+
appArguments.push(flags[browserName]);
|
|
38604
|
+
}
|
|
38605
|
+
return baseOpen({
|
|
38606
|
+
...options,
|
|
38607
|
+
app: {
|
|
38608
|
+
name: apps[browserName],
|
|
38609
|
+
arguments: appArguments
|
|
38610
|
+
}
|
|
38611
|
+
});
|
|
38612
|
+
}
|
|
38613
|
+
throw new Error(`${browser.name} is not supported as a default browser`);
|
|
38614
|
+
}
|
|
38615
|
+
let command;
|
|
38616
|
+
const cliArguments = [];
|
|
38617
|
+
const childProcessOptions = {};
|
|
38618
|
+
let shouldUseWindowsInWsl = false;
|
|
38619
|
+
if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) shouldUseWindowsInWsl = await canAccessPowerShell();
|
|
38620
|
+
if (platform$1 === "darwin") {
|
|
38621
|
+
command = "open";
|
|
38622
|
+
if (options.wait) cliArguments.push("--wait-apps");
|
|
38623
|
+
if (options.background) cliArguments.push("--background");
|
|
38624
|
+
if (options.newInstance) cliArguments.push("--new");
|
|
38625
|
+
if (app) cliArguments.push("-a", app);
|
|
38626
|
+
} else if (platform$1 === "win32" || shouldUseWindowsInWsl) {
|
|
38627
|
+
command = await powerShellPath();
|
|
38628
|
+
cliArguments.push(...executePowerShell.argumentsPrefix);
|
|
38629
|
+
if (!is_wsl_default) childProcessOptions.windowsVerbatimArguments = true;
|
|
38630
|
+
if (is_wsl_default && options.target) options.target = await convertWslPathToWindows(options.target);
|
|
38631
|
+
const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
|
|
38632
|
+
if (options.wait) encodedArguments.push("-Wait");
|
|
38633
|
+
if (app) {
|
|
38634
|
+
encodedArguments.push(executePowerShell.escapeArgument(app));
|
|
38635
|
+
if (options.target) appArguments.push(options.target);
|
|
38636
|
+
} else if (options.target) encodedArguments.push(executePowerShell.escapeArgument(options.target));
|
|
38637
|
+
if (appArguments.length > 0) {
|
|
38638
|
+
appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
|
|
38639
|
+
encodedArguments.push("-ArgumentList", appArguments.join(","));
|
|
38640
|
+
}
|
|
38641
|
+
options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
|
|
38642
|
+
if (!options.wait) childProcessOptions.stdio = "ignore";
|
|
38643
|
+
} else {
|
|
38644
|
+
if (app) command = app;
|
|
38645
|
+
else {
|
|
38646
|
+
const isBundled = !__dirname || __dirname === "/";
|
|
38647
|
+
let exeLocalXdgOpen = false;
|
|
38648
|
+
try {
|
|
38649
|
+
await fs$1.access(localXdgOpenPath, constants$1.X_OK);
|
|
38650
|
+
exeLocalXdgOpen = true;
|
|
38651
|
+
} catch {}
|
|
38652
|
+
command = y.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
|
|
38653
|
+
}
|
|
38654
|
+
if (appArguments.length > 0) cliArguments.push(...appArguments);
|
|
38655
|
+
if (!options.wait) {
|
|
38656
|
+
childProcessOptions.stdio = "ignore";
|
|
38657
|
+
childProcessOptions.detached = true;
|
|
38658
|
+
}
|
|
38659
|
+
}
|
|
38660
|
+
if (platform$1 === "darwin" && appArguments.length > 0) cliArguments.push("--args", ...appArguments);
|
|
38661
|
+
if (options.target) cliArguments.push(options.target);
|
|
38662
|
+
const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
|
|
38663
|
+
if (options.wait) return new Promise((resolve$1, reject) => {
|
|
38664
|
+
subprocess.once("error", reject);
|
|
38665
|
+
subprocess.once("close", (exitCode) => {
|
|
38666
|
+
if (!options.allowNonzeroExitCode && exitCode !== 0) {
|
|
38667
|
+
reject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));
|
|
38668
|
+
return;
|
|
38669
|
+
}
|
|
38670
|
+
resolve$1(subprocess);
|
|
38671
|
+
});
|
|
38672
|
+
});
|
|
38673
|
+
if (isFallbackAttempt) return new Promise((resolve$1, reject) => {
|
|
38674
|
+
subprocess.once("error", reject);
|
|
38675
|
+
subprocess.once("spawn", () => {
|
|
38676
|
+
subprocess.once("close", (exitCode) => {
|
|
38677
|
+
subprocess.off("error", reject);
|
|
38678
|
+
if (exitCode !== 0) {
|
|
38679
|
+
reject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));
|
|
38680
|
+
return;
|
|
38681
|
+
}
|
|
38682
|
+
subprocess.unref();
|
|
38683
|
+
resolve$1(subprocess);
|
|
38684
|
+
});
|
|
38685
|
+
});
|
|
38686
|
+
});
|
|
38687
|
+
subprocess.unref();
|
|
38688
|
+
return new Promise((resolve$1, reject) => {
|
|
38689
|
+
subprocess.once("error", reject);
|
|
38690
|
+
subprocess.once("spawn", () => {
|
|
38691
|
+
subprocess.off("error", reject);
|
|
38692
|
+
resolve$1(subprocess);
|
|
38693
|
+
});
|
|
38694
|
+
});
|
|
38695
|
+
};
|
|
38696
|
+
const open = (target, options) => {
|
|
38697
|
+
if (typeof target !== "string") throw new TypeError("Expected a `target`");
|
|
38698
|
+
return baseOpen({
|
|
38699
|
+
...options,
|
|
38700
|
+
target
|
|
38701
|
+
});
|
|
38702
|
+
};
|
|
38703
|
+
function detectArchBinary(binary) {
|
|
38704
|
+
if (typeof binary === "string" || Array.isArray(binary)) return binary;
|
|
38705
|
+
const { [arch]: archBinary } = binary;
|
|
38706
|
+
if (!archBinary) throw new Error(`${arch} is not supported`);
|
|
38707
|
+
return archBinary;
|
|
38708
|
+
}
|
|
38709
|
+
function detectPlatformBinary({ [platform$1]: platformBinary }, { wsl } = {}) {
|
|
38710
|
+
if (wsl && is_wsl_default) return detectArchBinary(wsl);
|
|
38711
|
+
if (!platformBinary) throw new Error(`${platform$1} is not supported`);
|
|
38712
|
+
return detectArchBinary(platformBinary);
|
|
38713
|
+
}
|
|
38714
|
+
const apps = {
|
|
38715
|
+
browser: "browser",
|
|
38716
|
+
browserPrivate: "browserPrivate"
|
|
38717
|
+
};
|
|
38718
|
+
defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
|
|
38719
|
+
darwin: "google chrome",
|
|
38720
|
+
win32: "chrome",
|
|
38721
|
+
linux: [
|
|
38722
|
+
"google-chrome",
|
|
38723
|
+
"google-chrome-stable",
|
|
38724
|
+
"chromium",
|
|
38725
|
+
"chromium-browser"
|
|
38726
|
+
]
|
|
38727
|
+
}, { wsl: {
|
|
38728
|
+
ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
|
|
38729
|
+
x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
|
|
38730
|
+
} }));
|
|
38731
|
+
defineLazyProperty(apps, "brave", () => detectPlatformBinary({
|
|
38732
|
+
darwin: "brave browser",
|
|
38733
|
+
win32: "brave",
|
|
38734
|
+
linux: ["brave-browser", "brave"]
|
|
38735
|
+
}, { wsl: {
|
|
38736
|
+
ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
|
|
38737
|
+
x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
|
|
38738
|
+
} }));
|
|
38739
|
+
defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
|
|
38740
|
+
darwin: "firefox",
|
|
38741
|
+
win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
|
|
38742
|
+
linux: "firefox"
|
|
38743
|
+
}, { wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe" }));
|
|
38744
|
+
defineLazyProperty(apps, "edge", () => detectPlatformBinary({
|
|
38745
|
+
darwin: "microsoft edge",
|
|
38746
|
+
win32: "msedge",
|
|
38747
|
+
linux: ["microsoft-edge", "microsoft-edge-dev"]
|
|
38748
|
+
}, { wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" }));
|
|
38749
|
+
defineLazyProperty(apps, "safari", () => detectPlatformBinary({ darwin: "Safari" }));
|
|
38750
|
+
var open_default = open;
|
|
38751
|
+
|
|
38785
38752
|
//#endregion
|
|
38786
38753
|
//#region src/cli/commands/project/dashboard.ts
|
|
38787
38754
|
async function openDashboard() {
|