@base44-preview/cli 0.0.22-pr.135.f4b78d8 → 0.0.22-pr.136.936d765
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 +122 -143
- 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) {
|
|
@@ -6744,7 +6744,7 @@ function initializeContext(params) {
|
|
|
6744
6744
|
external: params?.external ?? void 0
|
|
6745
6745
|
};
|
|
6746
6746
|
}
|
|
6747
|
-
function process$
|
|
6747
|
+
function process$2(schema, ctx, _params = {
|
|
6748
6748
|
path: [],
|
|
6749
6749
|
schemaPath: []
|
|
6750
6750
|
}) {
|
|
@@ -6781,7 +6781,7 @@ function process$3(schema, ctx, _params = {
|
|
|
6781
6781
|
const parent = schema._zod.parent;
|
|
6782
6782
|
if (parent) {
|
|
6783
6783
|
if (!result.ref) result.ref = parent;
|
|
6784
|
-
process$
|
|
6784
|
+
process$2(parent, ctx, params);
|
|
6785
6785
|
ctx.seen.get(parent).isParent = true;
|
|
6786
6786
|
}
|
|
6787
6787
|
}
|
|
@@ -6993,7 +6993,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
6993
6993
|
...params,
|
|
6994
6994
|
processors
|
|
6995
6995
|
});
|
|
6996
|
-
process$
|
|
6996
|
+
process$2(schema, ctx);
|
|
6997
6997
|
extractDefs(ctx, schema);
|
|
6998
6998
|
return finalize(ctx, schema);
|
|
6999
6999
|
};
|
|
@@ -7005,7 +7005,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
7005
7005
|
io,
|
|
7006
7006
|
processors
|
|
7007
7007
|
});
|
|
7008
|
-
process$
|
|
7008
|
+
process$2(schema, ctx);
|
|
7009
7009
|
extractDefs(ctx, schema);
|
|
7010
7010
|
return finalize(ctx, schema);
|
|
7011
7011
|
};
|
|
@@ -7092,7 +7092,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
7092
7092
|
if (typeof minimum === "number") json.minItems = minimum;
|
|
7093
7093
|
if (typeof maximum === "number") json.maxItems = maximum;
|
|
7094
7094
|
json.type = "array";
|
|
7095
|
-
json.items = process$
|
|
7095
|
+
json.items = process$2(def.element, ctx, {
|
|
7096
7096
|
...params,
|
|
7097
7097
|
path: [...params.path, "items"]
|
|
7098
7098
|
});
|
|
@@ -7103,7 +7103,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7103
7103
|
json.type = "object";
|
|
7104
7104
|
json.properties = {};
|
|
7105
7105
|
const shape = def.shape;
|
|
7106
|
-
for (const key in shape) json.properties[key] = process$
|
|
7106
|
+
for (const key in shape) json.properties[key] = process$2(shape[key], ctx, {
|
|
7107
7107
|
...params,
|
|
7108
7108
|
path: [
|
|
7109
7109
|
...params.path,
|
|
@@ -7121,7 +7121,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7121
7121
|
if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
|
|
7122
7122
|
else if (!def.catchall) {
|
|
7123
7123
|
if (ctx.io === "output") json.additionalProperties = false;
|
|
7124
|
-
} else if (def.catchall) json.additionalProperties = process$
|
|
7124
|
+
} else if (def.catchall) json.additionalProperties = process$2(def.catchall, ctx, {
|
|
7125
7125
|
...params,
|
|
7126
7126
|
path: [...params.path, "additionalProperties"]
|
|
7127
7127
|
});
|
|
@@ -7129,7 +7129,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7129
7129
|
const unionProcessor = (schema, ctx, json, params) => {
|
|
7130
7130
|
const def = schema._zod.def;
|
|
7131
7131
|
const isExclusive = def.inclusive === false;
|
|
7132
|
-
const options = def.options.map((x$2, i$1) => process$
|
|
7132
|
+
const options = def.options.map((x$2, i$1) => process$2(x$2, ctx, {
|
|
7133
7133
|
...params,
|
|
7134
7134
|
path: [
|
|
7135
7135
|
...params.path,
|
|
@@ -7142,7 +7142,7 @@ const unionProcessor = (schema, ctx, json, params) => {
|
|
|
7142
7142
|
};
|
|
7143
7143
|
const intersectionProcessor = (schema, ctx, json, params) => {
|
|
7144
7144
|
const def = schema._zod.def;
|
|
7145
|
-
const a$1 = process$
|
|
7145
|
+
const a$1 = process$2(def.left, ctx, {
|
|
7146
7146
|
...params,
|
|
7147
7147
|
path: [
|
|
7148
7148
|
...params.path,
|
|
@@ -7150,7 +7150,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
|
|
|
7150
7150
|
0
|
|
7151
7151
|
]
|
|
7152
7152
|
});
|
|
7153
|
-
const b$2 = process$
|
|
7153
|
+
const b$2 = process$2(def.right, ctx, {
|
|
7154
7154
|
...params,
|
|
7155
7155
|
path: [
|
|
7156
7156
|
...params.path,
|
|
@@ -7167,7 +7167,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7167
7167
|
json.type = "array";
|
|
7168
7168
|
const prefixPath$1 = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
7169
7169
|
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
7170
|
-
const prefixItems = def.items.map((x$2, i$1) => process$
|
|
7170
|
+
const prefixItems = def.items.map((x$2, i$1) => process$2(x$2, ctx, {
|
|
7171
7171
|
...params,
|
|
7172
7172
|
path: [
|
|
7173
7173
|
...params.path,
|
|
@@ -7175,7 +7175,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7175
7175
|
i$1
|
|
7176
7176
|
]
|
|
7177
7177
|
}));
|
|
7178
|
-
const rest = def.rest ? process$
|
|
7178
|
+
const rest = def.rest ? process$2(def.rest, ctx, {
|
|
7179
7179
|
...params,
|
|
7180
7180
|
path: [
|
|
7181
7181
|
...params.path,
|
|
@@ -7206,7 +7206,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7206
7206
|
const keyType = def.keyType;
|
|
7207
7207
|
const patterns = keyType._zod.bag?.patterns;
|
|
7208
7208
|
if (def.mode === "loose" && patterns && patterns.size > 0) {
|
|
7209
|
-
const valueSchema = process$
|
|
7209
|
+
const valueSchema = process$2(def.valueType, ctx, {
|
|
7210
7210
|
...params,
|
|
7211
7211
|
path: [
|
|
7212
7212
|
...params.path,
|
|
@@ -7217,11 +7217,11 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7217
7217
|
json.patternProperties = {};
|
|
7218
7218
|
for (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;
|
|
7219
7219
|
} else {
|
|
7220
|
-
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$
|
|
7220
|
+
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$2(def.keyType, ctx, {
|
|
7221
7221
|
...params,
|
|
7222
7222
|
path: [...params.path, "propertyNames"]
|
|
7223
7223
|
});
|
|
7224
|
-
json.additionalProperties = process$
|
|
7224
|
+
json.additionalProperties = process$2(def.valueType, ctx, {
|
|
7225
7225
|
...params,
|
|
7226
7226
|
path: [...params.path, "additionalProperties"]
|
|
7227
7227
|
});
|
|
@@ -7234,7 +7234,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7234
7234
|
};
|
|
7235
7235
|
const nullableProcessor = (schema, ctx, json, params) => {
|
|
7236
7236
|
const def = schema._zod.def;
|
|
7237
|
-
const inner = process$
|
|
7237
|
+
const inner = process$2(def.innerType, ctx, params);
|
|
7238
7238
|
const seen = ctx.seen.get(schema);
|
|
7239
7239
|
if (ctx.target === "openapi-3.0") {
|
|
7240
7240
|
seen.ref = def.innerType;
|
|
@@ -7243,27 +7243,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
|
|
|
7243
7243
|
};
|
|
7244
7244
|
const nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
7245
7245
|
const def = schema._zod.def;
|
|
7246
|
-
process$
|
|
7246
|
+
process$2(def.innerType, ctx, params);
|
|
7247
7247
|
const seen = ctx.seen.get(schema);
|
|
7248
7248
|
seen.ref = def.innerType;
|
|
7249
7249
|
};
|
|
7250
7250
|
const defaultProcessor = (schema, ctx, json, params) => {
|
|
7251
7251
|
const def = schema._zod.def;
|
|
7252
|
-
process$
|
|
7252
|
+
process$2(def.innerType, ctx, params);
|
|
7253
7253
|
const seen = ctx.seen.get(schema);
|
|
7254
7254
|
seen.ref = def.innerType;
|
|
7255
7255
|
json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7256
7256
|
};
|
|
7257
7257
|
const prefaultProcessor = (schema, ctx, json, params) => {
|
|
7258
7258
|
const def = schema._zod.def;
|
|
7259
|
-
process$
|
|
7259
|
+
process$2(def.innerType, ctx, params);
|
|
7260
7260
|
const seen = ctx.seen.get(schema);
|
|
7261
7261
|
seen.ref = def.innerType;
|
|
7262
7262
|
if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7263
7263
|
};
|
|
7264
7264
|
const catchProcessor = (schema, ctx, json, params) => {
|
|
7265
7265
|
const def = schema._zod.def;
|
|
7266
|
-
process$
|
|
7266
|
+
process$2(def.innerType, ctx, params);
|
|
7267
7267
|
const seen = ctx.seen.get(schema);
|
|
7268
7268
|
seen.ref = def.innerType;
|
|
7269
7269
|
let catchValue;
|
|
@@ -7277,20 +7277,20 @@ const catchProcessor = (schema, ctx, json, params) => {
|
|
|
7277
7277
|
const pipeProcessor = (schema, ctx, _json, params) => {
|
|
7278
7278
|
const def = schema._zod.def;
|
|
7279
7279
|
const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
7280
|
-
process$
|
|
7280
|
+
process$2(innerType, ctx, params);
|
|
7281
7281
|
const seen = ctx.seen.get(schema);
|
|
7282
7282
|
seen.ref = innerType;
|
|
7283
7283
|
};
|
|
7284
7284
|
const readonlyProcessor = (schema, ctx, json, params) => {
|
|
7285
7285
|
const def = schema._zod.def;
|
|
7286
|
-
process$
|
|
7286
|
+
process$2(def.innerType, ctx, params);
|
|
7287
7287
|
const seen = ctx.seen.get(schema);
|
|
7288
7288
|
seen.ref = def.innerType;
|
|
7289
7289
|
json.readOnly = true;
|
|
7290
7290
|
};
|
|
7291
7291
|
const optionalProcessor = (schema, ctx, _json, params) => {
|
|
7292
7292
|
const def = schema._zod.def;
|
|
7293
|
-
process$
|
|
7293
|
+
process$2(def.innerType, ctx, params);
|
|
7294
7294
|
const seen = ctx.seen.get(schema);
|
|
7295
7295
|
seen.ref = def.innerType;
|
|
7296
7296
|
};
|
|
@@ -16335,7 +16335,7 @@ const createIgnorePredicate = (patterns, cwd, baseDir) => {
|
|
|
16335
16335
|
};
|
|
16336
16336
|
const normalizeOptions$2 = (options = {}) => {
|
|
16337
16337
|
const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
|
|
16338
|
-
const cwd = toPath$1(options.cwd) ??
|
|
16338
|
+
const cwd = toPath$1(options.cwd) ?? y.cwd();
|
|
16339
16339
|
const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
|
|
16340
16340
|
return {
|
|
16341
16341
|
cwd,
|
|
@@ -16432,7 +16432,7 @@ const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
|
16432
16432
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
16433
16433
|
return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
16434
16434
|
};
|
|
16435
|
-
const directoryToGlob = async (directoryPaths, { cwd =
|
|
16435
|
+
const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => {
|
|
16436
16436
|
return (await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
16437
16437
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16438
16438
|
directoryPath,
|
|
@@ -16446,7 +16446,7 @@ const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, e
|
|
|
16446
16446
|
}) : directoryPath;
|
|
16447
16447
|
}))).flat();
|
|
16448
16448
|
};
|
|
16449
|
-
const directoryToGlobSync = (directoryPaths, { cwd =
|
|
16449
|
+
const directoryToGlobSync = (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
|
|
16450
16450
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16451
16451
|
directoryPath,
|
|
16452
16452
|
files,
|
|
@@ -16542,7 +16542,7 @@ const applyIgnoreFilesAndGetFilterSync = (options) => {
|
|
|
16542
16542
|
};
|
|
16543
16543
|
const createFilterFunction = (isIgnored, cwd) => {
|
|
16544
16544
|
const seen = /* @__PURE__ */ new Set();
|
|
16545
|
-
const basePath = cwd ||
|
|
16545
|
+
const basePath = cwd || y.cwd();
|
|
16546
16546
|
const pathCache = /* @__PURE__ */ new Map();
|
|
16547
16547
|
return (fastGlobResult) => {
|
|
16548
16548
|
const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
@@ -16693,13 +16693,16 @@ async function readAllEntities(entitiesDir) {
|
|
|
16693
16693
|
async function syncEntities(entities) {
|
|
16694
16694
|
const appClient = getAppClient();
|
|
16695
16695
|
const schemaSyncPayload = Object.fromEntries(entities.map((entity) => [entity.name, entity]));
|
|
16696
|
-
|
|
16697
|
-
|
|
16698
|
-
|
|
16699
|
-
}
|
|
16700
|
-
|
|
16701
|
-
|
|
16696
|
+
const response = await appClient.put("entity-schemas", {
|
|
16697
|
+
json: { entityNameToSchema: schemaSyncPayload },
|
|
16698
|
+
throwHttpErrors: false
|
|
16699
|
+
});
|
|
16700
|
+
if (!response.ok) {
|
|
16701
|
+
const errorJson = await response.json();
|
|
16702
|
+
if (response.status === 428) throw new Error(`Failed to delete entity: ${formatApiError(errorJson)}`);
|
|
16703
|
+
throw new Error(`Error occurred while syncing entities: ${formatApiError(errorJson)}`);
|
|
16702
16704
|
}
|
|
16705
|
+
return SyncEntitiesResponseSchema.parse(await response.json());
|
|
16703
16706
|
}
|
|
16704
16707
|
|
|
16705
16708
|
//#endregion
|
|
@@ -16874,22 +16877,23 @@ async function writeAgents(agentsDir, remoteAgents) {
|
|
|
16874
16877
|
//#endregion
|
|
16875
16878
|
//#region src/core/resources/agent/api.ts
|
|
16876
16879
|
async function pushAgents(agents) {
|
|
16877
|
-
const
|
|
16878
|
-
|
|
16879
|
-
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
|
|
16880
|
+
const response = await getAppClient().put("agent-configs", {
|
|
16881
|
+
json: agents,
|
|
16882
|
+
throwHttpErrors: false
|
|
16883
|
+
});
|
|
16884
|
+
if (!response.ok) {
|
|
16885
|
+
const errorJson = await response.json();
|
|
16886
|
+
throw new Error(`Error occurred while syncing agents: ${formatApiError(errorJson)}`);
|
|
16883
16887
|
}
|
|
16888
|
+
return SyncAgentsResponseSchema.parse(await response.json());
|
|
16884
16889
|
}
|
|
16885
16890
|
async function fetchAgents() {
|
|
16886
|
-
const
|
|
16887
|
-
|
|
16888
|
-
const
|
|
16889
|
-
|
|
16890
|
-
} catch (error) {
|
|
16891
|
-
throw new Error(`Error occurred while fetching agents: ${error instanceof Error ? error.message : String(error)}`);
|
|
16891
|
+
const response = await getAppClient().get("agent-configs", { throwHttpErrors: false });
|
|
16892
|
+
if (!response.ok) {
|
|
16893
|
+
const errorJson = await response.json();
|
|
16894
|
+
throw new Error(`Error occurred while fetching agents: ${formatApiError(errorJson)}`);
|
|
16892
16895
|
}
|
|
16896
|
+
return ListAgentsResponseSchema.parse(await response.json());
|
|
16893
16897
|
}
|
|
16894
16898
|
|
|
16895
16899
|
//#endregion
|
|
@@ -30690,10 +30694,6 @@ async function readAppConfig(projectRoot) {
|
|
|
30690
30694
|
* Authenticated HTTP client for Base44 API.
|
|
30691
30695
|
* Automatically handles token refresh and retry on 401 responses.
|
|
30692
30696
|
*/
|
|
30693
|
-
/**
|
|
30694
|
-
* Formats API error responses into human-readable strings.
|
|
30695
|
-
* Internal utility used by error handling hooks.
|
|
30696
|
-
*/
|
|
30697
30697
|
function formatApiError(errorJson) {
|
|
30698
30698
|
const error = errorJson;
|
|
30699
30699
|
const content = error?.message ?? error?.detail ?? errorJson;
|
|
@@ -30713,28 +30713,8 @@ async function handleUnauthorized(request, _options, response) {
|
|
|
30713
30713
|
return distribution_default(request, { headers: { Authorization: `Bearer ${newAccessToken}` } });
|
|
30714
30714
|
}
|
|
30715
30715
|
/**
|
|
30716
|
-
*
|
|
30717
|
-
* This hook runs before ky throws the error, allowing us to customize the error message.
|
|
30718
|
-
*/
|
|
30719
|
-
async function handleApiErrors(error) {
|
|
30720
|
-
if (error.name !== "HTTPError") return error;
|
|
30721
|
-
const httpError = error;
|
|
30722
|
-
if (!httpError.response) return error;
|
|
30723
|
-
try {
|
|
30724
|
-
const formattedMessage = formatApiError(await httpError.response.clone().json());
|
|
30725
|
-
const newError = new Error(formattedMessage);
|
|
30726
|
-
newError.name = error.name;
|
|
30727
|
-
newError.stack = error.stack;
|
|
30728
|
-
newError.response = httpError.response;
|
|
30729
|
-
return newError;
|
|
30730
|
-
} catch {
|
|
30731
|
-
return error;
|
|
30732
|
-
}
|
|
30733
|
-
}
|
|
30734
|
-
/**
|
|
30735
|
-
* Base44 API client with automatic authentication and error handling.
|
|
30716
|
+
* Base44 API client with automatic authentication.
|
|
30736
30717
|
* Use this for general API calls that require authentication.
|
|
30737
|
-
* All non-OK responses are automatically caught and formatted into Error objects.
|
|
30738
30718
|
*/
|
|
30739
30719
|
const base44Client = distribution_default.create({
|
|
30740
30720
|
prefixUrl: getBase44ApiUrl(),
|
|
@@ -30753,8 +30733,7 @@ const base44Client = distribution_default.create({
|
|
|
30753
30733
|
request.headers.set("Authorization", `Bearer ${auth.accessToken}`);
|
|
30754
30734
|
} catch {}
|
|
30755
30735
|
}],
|
|
30756
|
-
afterResponse: [handleUnauthorized]
|
|
30757
|
-
beforeError: [handleApiErrors]
|
|
30736
|
+
afterResponse: [handleUnauthorized]
|
|
30758
30737
|
}
|
|
30759
30738
|
});
|
|
30760
30739
|
/**
|
|
@@ -31035,13 +31014,13 @@ var ansi_styles_default = ansiStyles;
|
|
|
31035
31014
|
|
|
31036
31015
|
//#endregion
|
|
31037
31016
|
//#region node_modules/chalk/source/vendor/supports-color/index.js
|
|
31038
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
31017
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : y.argv) {
|
|
31039
31018
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
31040
31019
|
const position = argv.indexOf(prefix + flag);
|
|
31041
31020
|
const terminatorPosition = argv.indexOf("--");
|
|
31042
31021
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
31043
31022
|
}
|
|
31044
|
-
const { env } =
|
|
31023
|
+
const { env } = y;
|
|
31045
31024
|
let flagForceColor;
|
|
31046
31025
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
31047
31026
|
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
@@ -31074,7 +31053,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
31074
31053
|
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
31075
31054
|
const min = forceColor || 0;
|
|
31076
31055
|
if (env.TERM === "dumb") return min;
|
|
31077
|
-
if (
|
|
31056
|
+
if (y.platform === "win32") {
|
|
31078
31057
|
const osRelease = os.release().split(".");
|
|
31079
31058
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
31080
31059
|
return 1;
|
|
@@ -31863,9 +31842,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
|
|
|
31863
31842
|
//#region node_modules/execa/lib/utils/standard-stream.js
|
|
31864
31843
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
31865
31844
|
const STANDARD_STREAMS = [
|
|
31866
|
-
|
|
31867
|
-
|
|
31868
|
-
|
|
31845
|
+
y.stdin,
|
|
31846
|
+
y.stdout,
|
|
31847
|
+
y.stderr
|
|
31869
31848
|
];
|
|
31870
31849
|
const STANDARD_STREAMS_ALIASES = [
|
|
31871
31850
|
"stdin",
|
|
@@ -31990,9 +31969,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
31990
31969
|
//#endregion
|
|
31991
31970
|
//#region node_modules/is-unicode-supported/index.js
|
|
31992
31971
|
function isUnicodeSupported() {
|
|
31993
|
-
const { env: env$1 } =
|
|
31972
|
+
const { env: env$1 } = y;
|
|
31994
31973
|
const { TERM, TERM_PROGRAM } = env$1;
|
|
31995
|
-
if (
|
|
31974
|
+
if (y.platform !== "win32") return TERM !== "linux";
|
|
31996
31975
|
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";
|
|
31997
31976
|
}
|
|
31998
31977
|
|
|
@@ -32919,7 +32898,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
32919
32898
|
|
|
32920
32899
|
//#endregion
|
|
32921
32900
|
//#region node_modules/npm-run-path/index.js
|
|
32922
|
-
const npmRunPath = ({ cwd =
|
|
32901
|
+
const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
|
|
32923
32902
|
const cwdPath = path.resolve(toPath(cwd));
|
|
32924
32903
|
const result = [];
|
|
32925
32904
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -32937,7 +32916,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
|
32937
32916
|
const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
|
|
32938
32917
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32939
32918
|
};
|
|
32940
|
-
const npmRunPathEnv = ({ env: env$1 =
|
|
32919
|
+
const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
|
|
32941
32920
|
env$1 = { ...env$1 };
|
|
32942
32921
|
const pathName = pathKey({ env: env$1 });
|
|
32943
32922
|
options.path = env$1[pathName];
|
|
@@ -34072,7 +34051,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
34072
34051
|
};
|
|
34073
34052
|
const getDefaultCwd = () => {
|
|
34074
34053
|
try {
|
|
34075
|
-
return
|
|
34054
|
+
return y.cwd();
|
|
34076
34055
|
} catch (error) {
|
|
34077
34056
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
34078
34057
|
throw error;
|
|
@@ -34107,7 +34086,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
34107
34086
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
34108
34087
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
34109
34088
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
34110
|
-
if (
|
|
34089
|
+
if (y.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
34111
34090
|
return {
|
|
34112
34091
|
file,
|
|
34113
34092
|
commandArguments,
|
|
@@ -34134,7 +34113,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
34134
34113
|
});
|
|
34135
34114
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
34136
34115
|
const env$1 = extendEnv ? {
|
|
34137
|
-
...
|
|
34116
|
+
...y.env,
|
|
34138
34117
|
...envOption
|
|
34139
34118
|
} : envOption;
|
|
34140
34119
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -35134,12 +35113,12 @@ const guessStreamDirection = {
|
|
|
35134
35113
|
}
|
|
35135
35114
|
};
|
|
35136
35115
|
const getStandardStreamDirection = (value) => {
|
|
35137
|
-
if ([0,
|
|
35116
|
+
if ([0, y.stdin].includes(value)) return "input";
|
|
35138
35117
|
if ([
|
|
35139
35118
|
1,
|
|
35140
35119
|
2,
|
|
35141
|
-
|
|
35142
|
-
|
|
35120
|
+
y.stdout,
|
|
35121
|
+
y.stderr
|
|
35143
35122
|
].includes(value)) return "output";
|
|
35144
35123
|
};
|
|
35145
35124
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -36203,9 +36182,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
36203
36182
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
36204
36183
|
};
|
|
36205
36184
|
const getIpcExport = () => {
|
|
36206
|
-
const anyProcess =
|
|
36185
|
+
const anyProcess = y;
|
|
36207
36186
|
const isSubprocess = true;
|
|
36208
|
-
const ipc =
|
|
36187
|
+
const ipc = y.channel !== void 0;
|
|
36209
36188
|
return {
|
|
36210
36189
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
36211
36190
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -36447,7 +36426,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
|
|
|
36447
36426
|
|
|
36448
36427
|
//#endregion
|
|
36449
36428
|
//#region node_modules/signal-exit/dist/mjs/index.js
|
|
36450
|
-
const processOk = (process$
|
|
36429
|
+
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";
|
|
36451
36430
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
36452
36431
|
const global$1 = globalThis;
|
|
36453
36432
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -36515,7 +36494,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
36515
36494
|
};
|
|
36516
36495
|
var SignalExit = class extends SignalExitBase {
|
|
36517
36496
|
/* c8 ignore start */
|
|
36518
|
-
#hupSig = process$
|
|
36497
|
+
#hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
36519
36498
|
/* c8 ignore stop */
|
|
36520
36499
|
#emitter = new Emitter();
|
|
36521
36500
|
#process;
|
|
@@ -36523,15 +36502,15 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36523
36502
|
#originalProcessReallyExit;
|
|
36524
36503
|
#sigListeners = {};
|
|
36525
36504
|
#loaded = false;
|
|
36526
|
-
constructor(process$
|
|
36505
|
+
constructor(process$4) {
|
|
36527
36506
|
super();
|
|
36528
|
-
this.#process = process$
|
|
36507
|
+
this.#process = process$4;
|
|
36529
36508
|
this.#sigListeners = {};
|
|
36530
36509
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
36531
36510
|
const listeners = this.#process.listeners(sig);
|
|
36532
36511
|
let { count: count$1 } = this.#emitter;
|
|
36533
36512
|
/* c8 ignore start */
|
|
36534
|
-
const p$1 = process$
|
|
36513
|
+
const p$1 = process$4;
|
|
36535
36514
|
if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
|
|
36536
36515
|
/* c8 ignore stop */
|
|
36537
36516
|
if (listeners.length === count$1) {
|
|
@@ -36539,11 +36518,11 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36539
36518
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
36540
36519
|
/* c8 ignore start */
|
|
36541
36520
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
36542
|
-
if (!ret) process$
|
|
36521
|
+
if (!ret) process$4.kill(process$4.pid, s);
|
|
36543
36522
|
}
|
|
36544
36523
|
};
|
|
36545
|
-
this.#originalProcessReallyExit = process$
|
|
36546
|
-
this.#originalProcessEmit = process$
|
|
36524
|
+
this.#originalProcessReallyExit = process$4.reallyExit;
|
|
36525
|
+
this.#originalProcessEmit = process$4.emit;
|
|
36547
36526
|
}
|
|
36548
36527
|
onExit(cb, opts) {
|
|
36549
36528
|
/* c8 ignore start */
|
|
@@ -36610,8 +36589,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36610
36589
|
} else return og.call(this.#process, ev, ...args);
|
|
36611
36590
|
}
|
|
36612
36591
|
};
|
|
36613
|
-
const process$
|
|
36614
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$
|
|
36592
|
+
const process$1 = globalThis.process;
|
|
36593
|
+
const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
36615
36594
|
|
|
36616
36595
|
//#endregion
|
|
36617
36596
|
//#region node_modules/execa/lib/terminate/cleanup.js
|
|
@@ -38565,7 +38544,7 @@ function isInsideContainer() {
|
|
|
38565
38544
|
//#endregion
|
|
38566
38545
|
//#region node_modules/is-wsl/index.js
|
|
38567
38546
|
const isWsl = () => {
|
|
38568
|
-
if (
|
|
38547
|
+
if (y.platform !== "linux") return false;
|
|
38569
38548
|
if (os.release().toLowerCase().includes("microsoft")) {
|
|
38570
38549
|
if (isInsideContainer()) return false;
|
|
38571
38550
|
return true;
|
|
@@ -38576,12 +38555,12 @@ const isWsl = () => {
|
|
|
38576
38555
|
return false;
|
|
38577
38556
|
}
|
|
38578
38557
|
};
|
|
38579
|
-
var is_wsl_default =
|
|
38558
|
+
var is_wsl_default = y.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
38580
38559
|
|
|
38581
38560
|
//#endregion
|
|
38582
38561
|
//#region node_modules/powershell-utils/index.js
|
|
38583
38562
|
const execFile$2 = promisify(childProcess.execFile);
|
|
38584
|
-
const powerShellPath$1 = () => `${
|
|
38563
|
+
const powerShellPath$1 = () => `${y.env.SYSTEMROOT || y.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
38585
38564
|
const executePowerShell = async (command, options = {}) => {
|
|
38586
38565
|
const { powerShellPath: psPath, ...execFileOptions } = options;
|
|
38587
38566
|
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
@@ -38692,7 +38671,7 @@ function defineLazyProperty(object$1, propertyName, valueGetter) {
|
|
|
38692
38671
|
//#region node_modules/default-browser-id/index.js
|
|
38693
38672
|
const execFileAsync$3 = promisify(execFile);
|
|
38694
38673
|
async function defaultBrowserId() {
|
|
38695
|
-
if (
|
|
38674
|
+
if (y.platform !== "darwin") throw new Error("macOS only");
|
|
38696
38675
|
const { stdout: stdout$1 } = await execFileAsync$3("defaults", [
|
|
38697
38676
|
"read",
|
|
38698
38677
|
"com.apple.LaunchServices/com.apple.launchservices.secure",
|
|
@@ -38707,7 +38686,7 @@ async function defaultBrowserId() {
|
|
|
38707
38686
|
//#region node_modules/run-applescript/index.js
|
|
38708
38687
|
const execFileAsync$2 = promisify(execFile);
|
|
38709
38688
|
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
38710
|
-
if (
|
|
38689
|
+
if (y.platform !== "darwin") throw new Error("macOS only");
|
|
38711
38690
|
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
38712
38691
|
const execOptions = {};
|
|
38713
38692
|
if (signal) execOptions.signal = signal;
|
|
@@ -38816,14 +38795,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
|
|
|
38816
38795
|
const execFileAsync = promisify(execFile);
|
|
38817
38796
|
const titleize = (string$2) => string$2.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x$2) => x$2.toUpperCase());
|
|
38818
38797
|
async function defaultBrowser() {
|
|
38819
|
-
if (
|
|
38798
|
+
if (y.platform === "darwin") {
|
|
38820
38799
|
const id = await defaultBrowserId();
|
|
38821
38800
|
return {
|
|
38822
38801
|
name: await bundleName(id),
|
|
38823
38802
|
id
|
|
38824
38803
|
};
|
|
38825
38804
|
}
|
|
38826
|
-
if (
|
|
38805
|
+
if (y.platform === "linux") {
|
|
38827
38806
|
const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
|
|
38828
38807
|
"query",
|
|
38829
38808
|
"default",
|
|
@@ -38835,13 +38814,13 @@ async function defaultBrowser() {
|
|
|
38835
38814
|
id
|
|
38836
38815
|
};
|
|
38837
38816
|
}
|
|
38838
|
-
if (
|
|
38817
|
+
if (y.platform === "win32") return defaultBrowser$1();
|
|
38839
38818
|
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
38840
38819
|
}
|
|
38841
38820
|
|
|
38842
38821
|
//#endregion
|
|
38843
38822
|
//#region node_modules/is-in-ssh/index.js
|
|
38844
|
-
const isInSsh = Boolean(
|
|
38823
|
+
const isInSsh = Boolean(y.env.SSH_CONNECTION || y.env.SSH_CLIENT || y.env.SSH_TTY);
|
|
38845
38824
|
var is_in_ssh_default = isInSsh;
|
|
38846
38825
|
|
|
38847
38826
|
//#endregion
|
|
@@ -38849,7 +38828,7 @@ var is_in_ssh_default = isInSsh;
|
|
|
38849
38828
|
const fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
38850
38829
|
const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
|
|
38851
38830
|
const localXdgOpenPath = path.join(__dirname, "xdg-open");
|
|
38852
|
-
const { platform: platform$1, arch } =
|
|
38831
|
+
const { platform: platform$1, arch } = y;
|
|
38853
38832
|
const tryEachApp = async (apps$1, opener) => {
|
|
38854
38833
|
if (apps$1.length === 0) return;
|
|
38855
38834
|
const errors = [];
|
|
@@ -38962,7 +38941,7 @@ const baseOpen = async (options) => {
|
|
|
38962
38941
|
await fs$1.access(localXdgOpenPath, constants$1.X_OK);
|
|
38963
38942
|
exeLocalXdgOpen = true;
|
|
38964
38943
|
} catch {}
|
|
38965
|
-
command =
|
|
38944
|
+
command = y.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
|
|
38966
38945
|
}
|
|
38967
38946
|
if (appArguments.length > 0) cliArguments.push(...appArguments);
|
|
38968
38947
|
if (!options.wait) {
|