@base44-preview/cli 0.0.25-pr.151.1ef8126 → 0.0.25-pr.151.32c1047
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 +97 -99
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ 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";
|
|
@@ -893,7 +893,7 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
893
893
|
const childProcess$1 = __require("node:child_process");
|
|
894
894
|
const path$15 = __require("node:path");
|
|
895
895
|
const fs$10 = __require("node:fs");
|
|
896
|
-
const process$
|
|
896
|
+
const process$3 = __require("node:process");
|
|
897
897
|
const { Argument, humanReadableArgName } = require_argument();
|
|
898
898
|
const { CommanderError } = require_error$1();
|
|
899
899
|
const { Help } = require_help();
|
|
@@ -944,10 +944,10 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
944
944
|
this._showHelpAfterError = false;
|
|
945
945
|
this._showSuggestionAfterError = true;
|
|
946
946
|
this._outputConfiguration = {
|
|
947
|
-
writeOut: (str) => process$
|
|
948
|
-
writeErr: (str) => process$
|
|
949
|
-
getOutHelpWidth: () => process$
|
|
950
|
-
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,
|
|
951
951
|
outputError: (str, write) => write(str)
|
|
952
952
|
};
|
|
953
953
|
this._hidden = false;
|
|
@@ -1301,7 +1301,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1301
1301
|
*/
|
|
1302
1302
|
_exit(exitCode, code$1, message) {
|
|
1303
1303
|
if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code$1, message));
|
|
1304
|
-
process$
|
|
1304
|
+
process$3.exit(exitCode);
|
|
1305
1305
|
}
|
|
1306
1306
|
/**
|
|
1307
1307
|
* Register callback `fn` for the command.
|
|
@@ -1640,11 +1640,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1640
1640
|
if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
|
|
1641
1641
|
parseOptions = parseOptions || {};
|
|
1642
1642
|
if (argv === void 0 && parseOptions.from === void 0) {
|
|
1643
|
-
if (process$
|
|
1644
|
-
const execArgv$1 = process$
|
|
1643
|
+
if (process$3.versions?.electron) parseOptions.from = "electron";
|
|
1644
|
+
const execArgv$1 = process$3.execArgv ?? [];
|
|
1645
1645
|
if (execArgv$1.includes("-e") || execArgv$1.includes("--eval") || execArgv$1.includes("-p") || execArgv$1.includes("--print")) parseOptions.from = "eval";
|
|
1646
1646
|
}
|
|
1647
|
-
if (argv === void 0) argv = process$
|
|
1647
|
+
if (argv === void 0) argv = process$3.argv;
|
|
1648
1648
|
this.rawArgs = argv.slice();
|
|
1649
1649
|
let userArgs;
|
|
1650
1650
|
switch (parseOptions.from) {
|
|
@@ -1654,7 +1654,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1654
1654
|
userArgs = argv.slice(2);
|
|
1655
1655
|
break;
|
|
1656
1656
|
case "electron":
|
|
1657
|
-
if (process$
|
|
1657
|
+
if (process$3.defaultApp) {
|
|
1658
1658
|
this._scriptPath = argv[1];
|
|
1659
1659
|
userArgs = argv.slice(2);
|
|
1660
1660
|
} else userArgs = argv.slice(1);
|
|
@@ -1768,15 +1768,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1768
1768
|
}
|
|
1769
1769
|
launchWithNode = sourceExt.includes(path$15.extname(executableFile));
|
|
1770
1770
|
let proc$1;
|
|
1771
|
-
if (process$
|
|
1771
|
+
if (process$3.platform !== "win32") if (launchWithNode) {
|
|
1772
1772
|
args.unshift(executableFile);
|
|
1773
|
-
args = incrementNodeInspectorPort(process$
|
|
1774
|
-
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" });
|
|
1775
1775
|
} else proc$1 = childProcess$1.spawn(executableFile, args, { stdio: "inherit" });
|
|
1776
1776
|
else {
|
|
1777
1777
|
args.unshift(executableFile);
|
|
1778
|
-
args = incrementNodeInspectorPort(process$
|
|
1779
|
-
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" });
|
|
1780
1780
|
}
|
|
1781
1781
|
if (!proc$1.killed) [
|
|
1782
1782
|
"SIGUSR1",
|
|
@@ -1785,14 +1785,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1785
1785
|
"SIGINT",
|
|
1786
1786
|
"SIGHUP"
|
|
1787
1787
|
].forEach((signal) => {
|
|
1788
|
-
process$
|
|
1788
|
+
process$3.on(signal, () => {
|
|
1789
1789
|
if (proc$1.killed === false && proc$1.exitCode === null) proc$1.kill(signal);
|
|
1790
1790
|
});
|
|
1791
1791
|
});
|
|
1792
1792
|
const exitCallback = this._exitCallback;
|
|
1793
1793
|
proc$1.on("close", (code$1) => {
|
|
1794
1794
|
code$1 = code$1 ?? 1;
|
|
1795
|
-
if (!exitCallback) process$
|
|
1795
|
+
if (!exitCallback) process$3.exit(code$1);
|
|
1796
1796
|
else exitCallback(new CommanderError(code$1, "commander.executeSubCommandAsync", "(close)"));
|
|
1797
1797
|
});
|
|
1798
1798
|
proc$1.on("error", (err) => {
|
|
@@ -1804,7 +1804,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1804
1804
|
- ${executableDirMessage}`;
|
|
1805
1805
|
throw new Error(executableMissing);
|
|
1806
1806
|
} else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
|
|
1807
|
-
if (!exitCallback) process$
|
|
1807
|
+
if (!exitCallback) process$3.exit(1);
|
|
1808
1808
|
else {
|
|
1809
1809
|
const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
|
|
1810
1810
|
wrappedError.nestedError = err;
|
|
@@ -2210,13 +2210,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2210
2210
|
*/
|
|
2211
2211
|
_parseOptionsEnv() {
|
|
2212
2212
|
this.options.forEach((option) => {
|
|
2213
|
-
if (option.envVar && option.envVar in process$
|
|
2213
|
+
if (option.envVar && option.envVar in process$3.env) {
|
|
2214
2214
|
const optionKey = option.attributeName();
|
|
2215
2215
|
if (this.getOptionValue(optionKey) === void 0 || [
|
|
2216
2216
|
"default",
|
|
2217
2217
|
"config",
|
|
2218
2218
|
"env"
|
|
2219
|
-
].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]);
|
|
2220
2220
|
else this.emit(`optionEnv:${option.name()}`);
|
|
2221
2221
|
}
|
|
2222
2222
|
});
|
|
@@ -2595,7 +2595,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2595
2595
|
*/
|
|
2596
2596
|
help(contextOptions) {
|
|
2597
2597
|
this.outputHelp(contextOptions);
|
|
2598
|
-
let exitCode = process$
|
|
2598
|
+
let exitCode = process$3.exitCode || 0;
|
|
2599
2599
|
if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
|
|
2600
2600
|
this._exit(exitCode, "commander.help", "(outputHelp)");
|
|
2601
2601
|
}
|
|
@@ -2711,16 +2711,16 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2711
2711
|
const CSI = `${ESC}[`;
|
|
2712
2712
|
const beep = "\x07";
|
|
2713
2713
|
const cursor = {
|
|
2714
|
-
to(x$2, y$
|
|
2715
|
-
if (!y$
|
|
2716
|
-
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`;
|
|
2717
2717
|
},
|
|
2718
|
-
move(x$2, y$
|
|
2718
|
+
move(x$2, y$2) {
|
|
2719
2719
|
let ret = "";
|
|
2720
2720
|
if (x$2 < 0) ret += `${CSI}${-x$2}D`;
|
|
2721
2721
|
else if (x$2 > 0) ret += `${CSI}${x$2}C`;
|
|
2722
|
-
if (y$
|
|
2723
|
-
else if (y$
|
|
2722
|
+
if (y$2 < 0) ret += `${CSI}${-y$2}A`;
|
|
2723
|
+
else if (y$2 > 0) ret += `${CSI}${y$2}B`;
|
|
2724
2724
|
return ret;
|
|
2725
2725
|
},
|
|
2726
2726
|
up: (count$1 = 1) => `${CSI}${count$1}A`,
|
|
@@ -3030,13 +3030,13 @@ function rD() {
|
|
|
3030
3030
|
}
|
|
3031
3031
|
}), r;
|
|
3032
3032
|
}
|
|
3033
|
-
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) => {
|
|
3034
3034
|
const F$1 = [...u$2];
|
|
3035
3035
|
let s = !1, i$1 = !1, D$1 = p(P$1(e$1[e$1.length - 1]));
|
|
3036
3036
|
for (const [C$1, n$1] of F$1.entries()) {
|
|
3037
3037
|
const E = p(n$1);
|
|
3038
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) {
|
|
3039
|
-
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);
|
|
3040
3040
|
continue;
|
|
3041
3041
|
}
|
|
3042
3042
|
D$1 += E, D$1 === t && C$1 < F$1.length - 1 && (e$1.push(""), D$1 = 0);
|
|
@@ -3078,7 +3078,7 @@ const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y = "\x07", V$1 = "[",
|
|
|
3078
3078
|
`)];
|
|
3079
3079
|
for (const [E, a$1] of n$1.entries()) {
|
|
3080
3080
|
if (F$1 += a$1, d$1.has(a$1)) {
|
|
3081
|
-
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: {} };
|
|
3082
3082
|
if (c$1.code !== void 0) {
|
|
3083
3083
|
const f = Number.parseFloat(c$1.code);
|
|
3084
3084
|
s = f === oD ? void 0 : f;
|
|
@@ -3479,7 +3479,7 @@ var RD = class extends x$1 {
|
|
|
3479
3479
|
//#endregion
|
|
3480
3480
|
//#region node_modules/@clack/prompts/dist/index.mjs
|
|
3481
3481
|
function ce() {
|
|
3482
|
-
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";
|
|
3483
3483
|
}
|
|
3484
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) => {
|
|
3485
3485
|
switch (t) {
|
|
@@ -6691,7 +6691,7 @@ function initializeContext(params) {
|
|
|
6691
6691
|
external: params?.external ?? void 0
|
|
6692
6692
|
};
|
|
6693
6693
|
}
|
|
6694
|
-
function process$
|
|
6694
|
+
function process$2(schema, ctx, _params = {
|
|
6695
6695
|
path: [],
|
|
6696
6696
|
schemaPath: []
|
|
6697
6697
|
}) {
|
|
@@ -6728,7 +6728,7 @@ function process$3(schema, ctx, _params = {
|
|
|
6728
6728
|
const parent = schema._zod.parent;
|
|
6729
6729
|
if (parent) {
|
|
6730
6730
|
if (!result.ref) result.ref = parent;
|
|
6731
|
-
process$
|
|
6731
|
+
process$2(parent, ctx, params);
|
|
6732
6732
|
ctx.seen.get(parent).isParent = true;
|
|
6733
6733
|
}
|
|
6734
6734
|
}
|
|
@@ -6940,7 +6940,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
6940
6940
|
...params,
|
|
6941
6941
|
processors
|
|
6942
6942
|
});
|
|
6943
|
-
process$
|
|
6943
|
+
process$2(schema, ctx);
|
|
6944
6944
|
extractDefs(ctx, schema);
|
|
6945
6945
|
return finalize(ctx, schema);
|
|
6946
6946
|
};
|
|
@@ -6952,7 +6952,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
6952
6952
|
io,
|
|
6953
6953
|
processors
|
|
6954
6954
|
});
|
|
6955
|
-
process$
|
|
6955
|
+
process$2(schema, ctx);
|
|
6956
6956
|
extractDefs(ctx, schema);
|
|
6957
6957
|
return finalize(ctx, schema);
|
|
6958
6958
|
};
|
|
@@ -7060,7 +7060,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
7060
7060
|
if (typeof minimum === "number") json.minItems = minimum;
|
|
7061
7061
|
if (typeof maximum === "number") json.maxItems = maximum;
|
|
7062
7062
|
json.type = "array";
|
|
7063
|
-
json.items = process$
|
|
7063
|
+
json.items = process$2(def.element, ctx, {
|
|
7064
7064
|
...params,
|
|
7065
7065
|
path: [...params.path, "items"]
|
|
7066
7066
|
});
|
|
@@ -7071,7 +7071,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7071
7071
|
json.type = "object";
|
|
7072
7072
|
json.properties = {};
|
|
7073
7073
|
const shape = def.shape;
|
|
7074
|
-
for (const key in shape) json.properties[key] = process$
|
|
7074
|
+
for (const key in shape) json.properties[key] = process$2(shape[key], ctx, {
|
|
7075
7075
|
...params,
|
|
7076
7076
|
path: [
|
|
7077
7077
|
...params.path,
|
|
@@ -7089,7 +7089,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7089
7089
|
if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
|
|
7090
7090
|
else if (!def.catchall) {
|
|
7091
7091
|
if (ctx.io === "output") json.additionalProperties = false;
|
|
7092
|
-
} else if (def.catchall) json.additionalProperties = process$
|
|
7092
|
+
} else if (def.catchall) json.additionalProperties = process$2(def.catchall, ctx, {
|
|
7093
7093
|
...params,
|
|
7094
7094
|
path: [...params.path, "additionalProperties"]
|
|
7095
7095
|
});
|
|
@@ -7097,7 +7097,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7097
7097
|
const unionProcessor = (schema, ctx, json, params) => {
|
|
7098
7098
|
const def = schema._zod.def;
|
|
7099
7099
|
const isExclusive = def.inclusive === false;
|
|
7100
|
-
const options = def.options.map((x$2, i$1) => process$
|
|
7100
|
+
const options = def.options.map((x$2, i$1) => process$2(x$2, ctx, {
|
|
7101
7101
|
...params,
|
|
7102
7102
|
path: [
|
|
7103
7103
|
...params.path,
|
|
@@ -7110,7 +7110,7 @@ const unionProcessor = (schema, ctx, json, params) => {
|
|
|
7110
7110
|
};
|
|
7111
7111
|
const intersectionProcessor = (schema, ctx, json, params) => {
|
|
7112
7112
|
const def = schema._zod.def;
|
|
7113
|
-
const a$1 = process$
|
|
7113
|
+
const a$1 = process$2(def.left, ctx, {
|
|
7114
7114
|
...params,
|
|
7115
7115
|
path: [
|
|
7116
7116
|
...params.path,
|
|
@@ -7118,7 +7118,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
|
|
|
7118
7118
|
0
|
|
7119
7119
|
]
|
|
7120
7120
|
});
|
|
7121
|
-
const b$2 = process$
|
|
7121
|
+
const b$2 = process$2(def.right, ctx, {
|
|
7122
7122
|
...params,
|
|
7123
7123
|
path: [
|
|
7124
7124
|
...params.path,
|
|
@@ -7136,7 +7136,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7136
7136
|
const keyType = def.keyType;
|
|
7137
7137
|
const patterns = keyType._zod.bag?.patterns;
|
|
7138
7138
|
if (def.mode === "loose" && patterns && patterns.size > 0) {
|
|
7139
|
-
const valueSchema = process$
|
|
7139
|
+
const valueSchema = process$2(def.valueType, ctx, {
|
|
7140
7140
|
...params,
|
|
7141
7141
|
path: [
|
|
7142
7142
|
...params.path,
|
|
@@ -7147,11 +7147,11 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7147
7147
|
json.patternProperties = {};
|
|
7148
7148
|
for (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;
|
|
7149
7149
|
} else {
|
|
7150
|
-
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$
|
|
7150
|
+
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$2(def.keyType, ctx, {
|
|
7151
7151
|
...params,
|
|
7152
7152
|
path: [...params.path, "propertyNames"]
|
|
7153
7153
|
});
|
|
7154
|
-
json.additionalProperties = process$
|
|
7154
|
+
json.additionalProperties = process$2(def.valueType, ctx, {
|
|
7155
7155
|
...params,
|
|
7156
7156
|
path: [...params.path, "additionalProperties"]
|
|
7157
7157
|
});
|
|
@@ -7164,7 +7164,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7164
7164
|
};
|
|
7165
7165
|
const nullableProcessor = (schema, ctx, json, params) => {
|
|
7166
7166
|
const def = schema._zod.def;
|
|
7167
|
-
const inner = process$
|
|
7167
|
+
const inner = process$2(def.innerType, ctx, params);
|
|
7168
7168
|
const seen = ctx.seen.get(schema);
|
|
7169
7169
|
if (ctx.target === "openapi-3.0") {
|
|
7170
7170
|
seen.ref = def.innerType;
|
|
@@ -7173,27 +7173,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
|
|
|
7173
7173
|
};
|
|
7174
7174
|
const nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
7175
7175
|
const def = schema._zod.def;
|
|
7176
|
-
process$
|
|
7176
|
+
process$2(def.innerType, ctx, params);
|
|
7177
7177
|
const seen = ctx.seen.get(schema);
|
|
7178
7178
|
seen.ref = def.innerType;
|
|
7179
7179
|
};
|
|
7180
7180
|
const defaultProcessor = (schema, ctx, json, params) => {
|
|
7181
7181
|
const def = schema._zod.def;
|
|
7182
|
-
process$
|
|
7182
|
+
process$2(def.innerType, ctx, params);
|
|
7183
7183
|
const seen = ctx.seen.get(schema);
|
|
7184
7184
|
seen.ref = def.innerType;
|
|
7185
7185
|
json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7186
7186
|
};
|
|
7187
7187
|
const prefaultProcessor = (schema, ctx, json, params) => {
|
|
7188
7188
|
const def = schema._zod.def;
|
|
7189
|
-
process$
|
|
7189
|
+
process$2(def.innerType, ctx, params);
|
|
7190
7190
|
const seen = ctx.seen.get(schema);
|
|
7191
7191
|
seen.ref = def.innerType;
|
|
7192
7192
|
if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7193
7193
|
};
|
|
7194
7194
|
const catchProcessor = (schema, ctx, json, params) => {
|
|
7195
7195
|
const def = schema._zod.def;
|
|
7196
|
-
process$
|
|
7196
|
+
process$2(def.innerType, ctx, params);
|
|
7197
7197
|
const seen = ctx.seen.get(schema);
|
|
7198
7198
|
seen.ref = def.innerType;
|
|
7199
7199
|
let catchValue;
|
|
@@ -7207,20 +7207,20 @@ const catchProcessor = (schema, ctx, json, params) => {
|
|
|
7207
7207
|
const pipeProcessor = (schema, ctx, _json, params) => {
|
|
7208
7208
|
const def = schema._zod.def;
|
|
7209
7209
|
const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
7210
|
-
process$
|
|
7210
|
+
process$2(innerType, ctx, params);
|
|
7211
7211
|
const seen = ctx.seen.get(schema);
|
|
7212
7212
|
seen.ref = innerType;
|
|
7213
7213
|
};
|
|
7214
7214
|
const readonlyProcessor = (schema, ctx, json, params) => {
|
|
7215
7215
|
const def = schema._zod.def;
|
|
7216
|
-
process$
|
|
7216
|
+
process$2(def.innerType, ctx, params);
|
|
7217
7217
|
const seen = ctx.seen.get(schema);
|
|
7218
7218
|
seen.ref = def.innerType;
|
|
7219
7219
|
json.readOnly = true;
|
|
7220
7220
|
};
|
|
7221
7221
|
const optionalProcessor = (schema, ctx, _json, params) => {
|
|
7222
7222
|
const def = schema._zod.def;
|
|
7223
|
-
process$
|
|
7223
|
+
process$2(def.innerType, ctx, params);
|
|
7224
7224
|
const seen = ctx.seen.get(schema);
|
|
7225
7225
|
seen.ref = def.innerType;
|
|
7226
7226
|
};
|
|
@@ -16271,7 +16271,7 @@ const createIgnorePredicate = (patterns, cwd, baseDir) => {
|
|
|
16271
16271
|
};
|
|
16272
16272
|
const normalizeOptions$2 = (options = {}) => {
|
|
16273
16273
|
const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
|
|
16274
|
-
const cwd = toPath$1(options.cwd) ??
|
|
16274
|
+
const cwd = toPath$1(options.cwd) ?? y.cwd();
|
|
16275
16275
|
const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
|
|
16276
16276
|
return {
|
|
16277
16277
|
cwd,
|
|
@@ -16368,7 +16368,7 @@ const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
|
16368
16368
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
16369
16369
|
return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
16370
16370
|
};
|
|
16371
|
-
const directoryToGlob = async (directoryPaths, { cwd =
|
|
16371
|
+
const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => {
|
|
16372
16372
|
return (await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
16373
16373
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16374
16374
|
directoryPath,
|
|
@@ -16382,7 +16382,7 @@ const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, e
|
|
|
16382
16382
|
}) : directoryPath;
|
|
16383
16383
|
}))).flat();
|
|
16384
16384
|
};
|
|
16385
|
-
const directoryToGlobSync = (directoryPaths, { cwd =
|
|
16385
|
+
const directoryToGlobSync = (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
|
|
16386
16386
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16387
16387
|
directoryPath,
|
|
16388
16388
|
files,
|
|
@@ -16478,7 +16478,7 @@ const applyIgnoreFilesAndGetFilterSync = (options) => {
|
|
|
16478
16478
|
};
|
|
16479
16479
|
const createFilterFunction = (isIgnored, cwd) => {
|
|
16480
16480
|
const seen = /* @__PURE__ */ new Set();
|
|
16481
|
-
const basePath = cwd ||
|
|
16481
|
+
const basePath = cwd || y.cwd();
|
|
16482
16482
|
const pathCache = /* @__PURE__ */ new Map();
|
|
16483
16483
|
return (fastGlobResult) => {
|
|
16484
16484
|
const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
@@ -16918,14 +16918,12 @@ const BackendFunctionToolConfigSchema = object({
|
|
|
16918
16918
|
description: string().default("agent backend function")
|
|
16919
16919
|
});
|
|
16920
16920
|
const ToolConfigSchema = union([EntityToolConfigSchema, BackendFunctionToolConfigSchema]);
|
|
16921
|
-
const ModelSchema = string().regex(/^(default|(anthropic|gemini|openai|vertex_ai)\/.+)$/, "Model must be \"default\" or start with: anthropic/, gemini/, openai/, vertex_ai/");
|
|
16922
16921
|
const AgentConfigSchema = looseObject({
|
|
16923
16922
|
name: string().regex(/^[a-z0-9_]+$/, "Agent name must be lowercase alphanumeric with underscores").min(1).max(100),
|
|
16924
16923
|
description: string().trim().min(1, "Description is required"),
|
|
16925
16924
|
instructions: string().trim().min(1, "Instructions are required"),
|
|
16926
16925
|
tool_configs: array(ToolConfigSchema).optional().default([]),
|
|
16927
|
-
whatsapp_greeting: string().nullable().optional()
|
|
16928
|
-
model: ModelSchema.optional().default("default")
|
|
16926
|
+
whatsapp_greeting: string().nullable().optional()
|
|
16929
16927
|
});
|
|
16930
16928
|
const SyncAgentsResponseSchema = object({
|
|
16931
16929
|
created: array(string()),
|
|
@@ -31143,13 +31141,13 @@ var ansi_styles_default = ansiStyles;
|
|
|
31143
31141
|
|
|
31144
31142
|
//#endregion
|
|
31145
31143
|
//#region node_modules/chalk/source/vendor/supports-color/index.js
|
|
31146
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
31144
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : y.argv) {
|
|
31147
31145
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
31148
31146
|
const position = argv.indexOf(prefix + flag);
|
|
31149
31147
|
const terminatorPosition = argv.indexOf("--");
|
|
31150
31148
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
31151
31149
|
}
|
|
31152
|
-
const { env } =
|
|
31150
|
+
const { env } = y;
|
|
31153
31151
|
let flagForceColor;
|
|
31154
31152
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
31155
31153
|
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
@@ -31182,7 +31180,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
31182
31180
|
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
31183
31181
|
const min = forceColor || 0;
|
|
31184
31182
|
if (env.TERM === "dumb") return min;
|
|
31185
|
-
if (
|
|
31183
|
+
if (y.platform === "win32") {
|
|
31186
31184
|
const osRelease = os.release().split(".");
|
|
31187
31185
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
31188
31186
|
return 1;
|
|
@@ -31973,9 +31971,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
|
|
|
31973
31971
|
//#region node_modules/execa/lib/utils/standard-stream.js
|
|
31974
31972
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
31975
31973
|
const STANDARD_STREAMS = [
|
|
31976
|
-
|
|
31977
|
-
|
|
31978
|
-
|
|
31974
|
+
y.stdin,
|
|
31975
|
+
y.stdout,
|
|
31976
|
+
y.stderr
|
|
31979
31977
|
];
|
|
31980
31978
|
const STANDARD_STREAMS_ALIASES = [
|
|
31981
31979
|
"stdin",
|
|
@@ -32100,9 +32098,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
32100
32098
|
//#endregion
|
|
32101
32099
|
//#region node_modules/is-unicode-supported/index.js
|
|
32102
32100
|
function isUnicodeSupported() {
|
|
32103
|
-
const { env: env$1 } =
|
|
32101
|
+
const { env: env$1 } = y;
|
|
32104
32102
|
const { TERM, TERM_PROGRAM } = env$1;
|
|
32105
|
-
if (
|
|
32103
|
+
if (y.platform !== "win32") return TERM !== "linux";
|
|
32106
32104
|
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";
|
|
32107
32105
|
}
|
|
32108
32106
|
|
|
@@ -33029,7 +33027,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
33029
33027
|
|
|
33030
33028
|
//#endregion
|
|
33031
33029
|
//#region node_modules/npm-run-path/index.js
|
|
33032
|
-
const npmRunPath = ({ cwd =
|
|
33030
|
+
const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
|
|
33033
33031
|
const cwdPath = path.resolve(toPath(cwd));
|
|
33034
33032
|
const result = [];
|
|
33035
33033
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -33047,7 +33045,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
|
33047
33045
|
const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
|
|
33048
33046
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
33049
33047
|
};
|
|
33050
|
-
const npmRunPathEnv = ({ env: env$1 =
|
|
33048
|
+
const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
|
|
33051
33049
|
env$1 = { ...env$1 };
|
|
33052
33050
|
const pathName = pathKey({ env: env$1 });
|
|
33053
33051
|
options.path = env$1[pathName];
|
|
@@ -34182,7 +34180,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
34182
34180
|
};
|
|
34183
34181
|
const getDefaultCwd = () => {
|
|
34184
34182
|
try {
|
|
34185
|
-
return
|
|
34183
|
+
return y.cwd();
|
|
34186
34184
|
} catch (error) {
|
|
34187
34185
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
34188
34186
|
throw error;
|
|
@@ -34217,7 +34215,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
34217
34215
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
34218
34216
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
34219
34217
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
34220
|
-
if (
|
|
34218
|
+
if (y.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
34221
34219
|
return {
|
|
34222
34220
|
file,
|
|
34223
34221
|
commandArguments,
|
|
@@ -34244,7 +34242,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
34244
34242
|
});
|
|
34245
34243
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
34246
34244
|
const env$1 = extendEnv ? {
|
|
34247
|
-
...
|
|
34245
|
+
...y.env,
|
|
34248
34246
|
...envOption
|
|
34249
34247
|
} : envOption;
|
|
34250
34248
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -35244,12 +35242,12 @@ const guessStreamDirection = {
|
|
|
35244
35242
|
}
|
|
35245
35243
|
};
|
|
35246
35244
|
const getStandardStreamDirection = (value) => {
|
|
35247
|
-
if ([0,
|
|
35245
|
+
if ([0, y.stdin].includes(value)) return "input";
|
|
35248
35246
|
if ([
|
|
35249
35247
|
1,
|
|
35250
35248
|
2,
|
|
35251
|
-
|
|
35252
|
-
|
|
35249
|
+
y.stdout,
|
|
35250
|
+
y.stderr
|
|
35253
35251
|
].includes(value)) return "output";
|
|
35254
35252
|
};
|
|
35255
35253
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -36313,9 +36311,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
36313
36311
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
36314
36312
|
};
|
|
36315
36313
|
const getIpcExport = () => {
|
|
36316
|
-
const anyProcess =
|
|
36314
|
+
const anyProcess = y;
|
|
36317
36315
|
const isSubprocess = true;
|
|
36318
|
-
const ipc =
|
|
36316
|
+
const ipc = y.channel !== void 0;
|
|
36319
36317
|
return {
|
|
36320
36318
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
36321
36319
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -36557,7 +36555,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
|
|
|
36557
36555
|
|
|
36558
36556
|
//#endregion
|
|
36559
36557
|
//#region node_modules/signal-exit/dist/mjs/index.js
|
|
36560
|
-
const processOk = (process$
|
|
36558
|
+
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";
|
|
36561
36559
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
36562
36560
|
const global$1 = globalThis;
|
|
36563
36561
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -36625,7 +36623,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
36625
36623
|
};
|
|
36626
36624
|
var SignalExit = class extends SignalExitBase {
|
|
36627
36625
|
/* c8 ignore start */
|
|
36628
|
-
#hupSig = process$
|
|
36626
|
+
#hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
36629
36627
|
/* c8 ignore stop */
|
|
36630
36628
|
#emitter = new Emitter();
|
|
36631
36629
|
#process;
|
|
@@ -36633,15 +36631,15 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36633
36631
|
#originalProcessReallyExit;
|
|
36634
36632
|
#sigListeners = {};
|
|
36635
36633
|
#loaded = false;
|
|
36636
|
-
constructor(process$
|
|
36634
|
+
constructor(process$4) {
|
|
36637
36635
|
super();
|
|
36638
|
-
this.#process = process$
|
|
36636
|
+
this.#process = process$4;
|
|
36639
36637
|
this.#sigListeners = {};
|
|
36640
36638
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
36641
36639
|
const listeners = this.#process.listeners(sig);
|
|
36642
36640
|
let { count: count$1 } = this.#emitter;
|
|
36643
36641
|
/* c8 ignore start */
|
|
36644
|
-
const p$1 = process$
|
|
36642
|
+
const p$1 = process$4;
|
|
36645
36643
|
if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
|
|
36646
36644
|
/* c8 ignore stop */
|
|
36647
36645
|
if (listeners.length === count$1) {
|
|
@@ -36649,11 +36647,11 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36649
36647
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
36650
36648
|
/* c8 ignore start */
|
|
36651
36649
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
36652
|
-
if (!ret) process$
|
|
36650
|
+
if (!ret) process$4.kill(process$4.pid, s);
|
|
36653
36651
|
}
|
|
36654
36652
|
};
|
|
36655
|
-
this.#originalProcessReallyExit = process$
|
|
36656
|
-
this.#originalProcessEmit = process$
|
|
36653
|
+
this.#originalProcessReallyExit = process$4.reallyExit;
|
|
36654
|
+
this.#originalProcessEmit = process$4.emit;
|
|
36657
36655
|
}
|
|
36658
36656
|
onExit(cb, opts) {
|
|
36659
36657
|
/* c8 ignore start */
|
|
@@ -36720,8 +36718,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36720
36718
|
} else return og.call(this.#process, ev, ...args);
|
|
36721
36719
|
}
|
|
36722
36720
|
};
|
|
36723
|
-
const process$
|
|
36724
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$
|
|
36721
|
+
const process$1 = globalThis.process;
|
|
36722
|
+
const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
36725
36723
|
|
|
36726
36724
|
//#endregion
|
|
36727
36725
|
//#region node_modules/execa/lib/terminate/cleanup.js
|
|
@@ -38675,7 +38673,7 @@ function isInsideContainer() {
|
|
|
38675
38673
|
//#endregion
|
|
38676
38674
|
//#region node_modules/is-wsl/index.js
|
|
38677
38675
|
const isWsl = () => {
|
|
38678
|
-
if (
|
|
38676
|
+
if (y.platform !== "linux") return false;
|
|
38679
38677
|
if (os.release().toLowerCase().includes("microsoft")) {
|
|
38680
38678
|
if (isInsideContainer()) return false;
|
|
38681
38679
|
return true;
|
|
@@ -38686,12 +38684,12 @@ const isWsl = () => {
|
|
|
38686
38684
|
return false;
|
|
38687
38685
|
}
|
|
38688
38686
|
};
|
|
38689
|
-
var is_wsl_default =
|
|
38687
|
+
var is_wsl_default = y.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
38690
38688
|
|
|
38691
38689
|
//#endregion
|
|
38692
38690
|
//#region node_modules/powershell-utils/index.js
|
|
38693
38691
|
const execFile$2 = promisify(childProcess.execFile);
|
|
38694
|
-
const powerShellPath$1 = () => `${
|
|
38692
|
+
const powerShellPath$1 = () => `${y.env.SYSTEMROOT || y.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
38695
38693
|
const executePowerShell = async (command, options = {}) => {
|
|
38696
38694
|
const { powerShellPath: psPath, ...execFileOptions } = options;
|
|
38697
38695
|
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
@@ -38802,7 +38800,7 @@ function defineLazyProperty(object$1, propertyName, valueGetter) {
|
|
|
38802
38800
|
//#region node_modules/default-browser-id/index.js
|
|
38803
38801
|
const execFileAsync$3 = promisify(execFile);
|
|
38804
38802
|
async function defaultBrowserId() {
|
|
38805
|
-
if (
|
|
38803
|
+
if (y.platform !== "darwin") throw new Error("macOS only");
|
|
38806
38804
|
const { stdout: stdout$1 } = await execFileAsync$3("defaults", [
|
|
38807
38805
|
"read",
|
|
38808
38806
|
"com.apple.LaunchServices/com.apple.launchservices.secure",
|
|
@@ -38817,7 +38815,7 @@ async function defaultBrowserId() {
|
|
|
38817
38815
|
//#region node_modules/run-applescript/index.js
|
|
38818
38816
|
const execFileAsync$2 = promisify(execFile);
|
|
38819
38817
|
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
38820
|
-
if (
|
|
38818
|
+
if (y.platform !== "darwin") throw new Error("macOS only");
|
|
38821
38819
|
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
38822
38820
|
const execOptions = {};
|
|
38823
38821
|
if (signal) execOptions.signal = signal;
|
|
@@ -38926,14 +38924,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
|
|
|
38926
38924
|
const execFileAsync = promisify(execFile);
|
|
38927
38925
|
const titleize = (string$2) => string$2.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x$2) => x$2.toUpperCase());
|
|
38928
38926
|
async function defaultBrowser() {
|
|
38929
|
-
if (
|
|
38927
|
+
if (y.platform === "darwin") {
|
|
38930
38928
|
const id = await defaultBrowserId();
|
|
38931
38929
|
return {
|
|
38932
38930
|
name: await bundleName(id),
|
|
38933
38931
|
id
|
|
38934
38932
|
};
|
|
38935
38933
|
}
|
|
38936
|
-
if (
|
|
38934
|
+
if (y.platform === "linux") {
|
|
38937
38935
|
const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
|
|
38938
38936
|
"query",
|
|
38939
38937
|
"default",
|
|
@@ -38945,13 +38943,13 @@ async function defaultBrowser() {
|
|
|
38945
38943
|
id
|
|
38946
38944
|
};
|
|
38947
38945
|
}
|
|
38948
|
-
if (
|
|
38946
|
+
if (y.platform === "win32") return defaultBrowser$1();
|
|
38949
38947
|
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
38950
38948
|
}
|
|
38951
38949
|
|
|
38952
38950
|
//#endregion
|
|
38953
38951
|
//#region node_modules/is-in-ssh/index.js
|
|
38954
|
-
const isInSsh = Boolean(
|
|
38952
|
+
const isInSsh = Boolean(y.env.SSH_CONNECTION || y.env.SSH_CLIENT || y.env.SSH_TTY);
|
|
38955
38953
|
var is_in_ssh_default = isInSsh;
|
|
38956
38954
|
|
|
38957
38955
|
//#endregion
|
|
@@ -38959,7 +38957,7 @@ var is_in_ssh_default = isInSsh;
|
|
|
38959
38957
|
const fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
38960
38958
|
const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
|
|
38961
38959
|
const localXdgOpenPath = path.join(__dirname, "xdg-open");
|
|
38962
|
-
const { platform: platform$1, arch } =
|
|
38960
|
+
const { platform: platform$1, arch } = y;
|
|
38963
38961
|
const tryEachApp = async (apps$1, opener) => {
|
|
38964
38962
|
if (apps$1.length === 0) return;
|
|
38965
38963
|
const errors = [];
|
|
@@ -39072,7 +39070,7 @@ const baseOpen = async (options) => {
|
|
|
39072
39070
|
await fs$1.access(localXdgOpenPath, constants$1.X_OK);
|
|
39073
39071
|
exeLocalXdgOpen = true;
|
|
39074
39072
|
} catch {}
|
|
39075
|
-
command =
|
|
39073
|
+
command = y.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
|
|
39076
39074
|
}
|
|
39077
39075
|
if (appArguments.length > 0) cliArguments.push(...appArguments);
|
|
39078
39076
|
if (!options.wait) {
|