@base44-preview/cli 0.0.11-pr.81.ba90b4e → 0.0.11-pr.82.5adefb8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +725 -171
- package/package.json +2 -1
package/dist/cli/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:events";
|
|
4
|
-
import { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
|
|
4
|
+
import childProcess, { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
|
|
5
5
|
import path, { basename, dirname, join, posix, resolve, win32 } from "node:path";
|
|
6
6
|
import fs, { appendFileSync, createReadStream, createWriteStream, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
7
|
-
import
|
|
7
|
+
import process$1, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
|
|
8
8
|
import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
|
|
9
9
|
import * as g from "node:readline";
|
|
10
10
|
import O from "node:readline";
|
|
@@ -15,7 +15,7 @@ import fs$1 from "fs";
|
|
|
15
15
|
import path$1, { dirname as dirname$1, parse } from "path";
|
|
16
16
|
import { finished } from "node:stream/promises";
|
|
17
17
|
import EE, { EventEmitter as EventEmitter$1 } from "events";
|
|
18
|
-
import
|
|
18
|
+
import fs$2, { access, constants as constants$1, copyFile, mkdir, readFile, unlink, writeFile } from "node:fs/promises";
|
|
19
19
|
import { Buffer as Buffer$1 } from "buffer";
|
|
20
20
|
import tty from "node:tty";
|
|
21
21
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
@@ -891,10 +891,10 @@ var require_suggestSimilar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
891
891
|
//#region node_modules/commander/lib/command.js
|
|
892
892
|
var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
893
893
|
const EventEmitter$2 = __require("node:events").EventEmitter;
|
|
894
|
-
const childProcess = __require("node:child_process");
|
|
894
|
+
const childProcess$1 = __require("node:child_process");
|
|
895
895
|
const path$16 = __require("node:path");
|
|
896
|
-
const fs$
|
|
897
|
-
const process$
|
|
896
|
+
const fs$11 = __require("node:fs");
|
|
897
|
+
const process$4 = __require("node:process");
|
|
898
898
|
const { Argument, humanReadableArgName } = require_argument();
|
|
899
899
|
const { CommanderError } = require_error$1();
|
|
900
900
|
const { Help } = require_help();
|
|
@@ -945,10 +945,10 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
945
945
|
this._showHelpAfterError = false;
|
|
946
946
|
this._showSuggestionAfterError = true;
|
|
947
947
|
this._outputConfiguration = {
|
|
948
|
-
writeOut: (str) => process$
|
|
949
|
-
writeErr: (str) => process$
|
|
950
|
-
getOutHelpWidth: () => process$
|
|
951
|
-
getErrHelpWidth: () => process$
|
|
948
|
+
writeOut: (str) => process$4.stdout.write(str),
|
|
949
|
+
writeErr: (str) => process$4.stderr.write(str),
|
|
950
|
+
getOutHelpWidth: () => process$4.stdout.isTTY ? process$4.stdout.columns : void 0,
|
|
951
|
+
getErrHelpWidth: () => process$4.stderr.isTTY ? process$4.stderr.columns : void 0,
|
|
952
952
|
outputError: (str, write) => write(str)
|
|
953
953
|
};
|
|
954
954
|
this._hidden = false;
|
|
@@ -1302,7 +1302,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1302
1302
|
*/
|
|
1303
1303
|
_exit(exitCode, code$1, message) {
|
|
1304
1304
|
if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code$1, message));
|
|
1305
|
-
process$
|
|
1305
|
+
process$4.exit(exitCode);
|
|
1306
1306
|
}
|
|
1307
1307
|
/**
|
|
1308
1308
|
* Register callback `fn` for the command.
|
|
@@ -1641,11 +1641,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1641
1641
|
if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
|
|
1642
1642
|
parseOptions = parseOptions || {};
|
|
1643
1643
|
if (argv === void 0 && parseOptions.from === void 0) {
|
|
1644
|
-
if (process$
|
|
1645
|
-
const execArgv$1 = process$
|
|
1644
|
+
if (process$4.versions?.electron) parseOptions.from = "electron";
|
|
1645
|
+
const execArgv$1 = process$4.execArgv ?? [];
|
|
1646
1646
|
if (execArgv$1.includes("-e") || execArgv$1.includes("--eval") || execArgv$1.includes("-p") || execArgv$1.includes("--print")) parseOptions.from = "eval";
|
|
1647
1647
|
}
|
|
1648
|
-
if (argv === void 0) argv = process$
|
|
1648
|
+
if (argv === void 0) argv = process$4.argv;
|
|
1649
1649
|
this.rawArgs = argv.slice();
|
|
1650
1650
|
let userArgs;
|
|
1651
1651
|
switch (parseOptions.from) {
|
|
@@ -1655,7 +1655,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1655
1655
|
userArgs = argv.slice(2);
|
|
1656
1656
|
break;
|
|
1657
1657
|
case "electron":
|
|
1658
|
-
if (process$
|
|
1658
|
+
if (process$4.defaultApp) {
|
|
1659
1659
|
this._scriptPath = argv[1];
|
|
1660
1660
|
userArgs = argv.slice(2);
|
|
1661
1661
|
} else userArgs = argv.slice(1);
|
|
@@ -1741,9 +1741,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1741
1741
|
];
|
|
1742
1742
|
function findFile(baseDir, baseName) {
|
|
1743
1743
|
const localBin = path$16.resolve(baseDir, baseName);
|
|
1744
|
-
if (fs$
|
|
1744
|
+
if (fs$11.existsSync(localBin)) return localBin;
|
|
1745
1745
|
if (sourceExt.includes(path$16.extname(baseName))) return void 0;
|
|
1746
|
-
const foundExt = sourceExt.find((ext) => fs$
|
|
1746
|
+
const foundExt = sourceExt.find((ext) => fs$11.existsSync(`${localBin}${ext}`));
|
|
1747
1747
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
1748
1748
|
}
|
|
1749
1749
|
this._checkForMissingMandatoryOptions();
|
|
@@ -1753,7 +1753,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1753
1753
|
if (this._scriptPath) {
|
|
1754
1754
|
let resolvedScriptPath;
|
|
1755
1755
|
try {
|
|
1756
|
-
resolvedScriptPath = fs$
|
|
1756
|
+
resolvedScriptPath = fs$11.realpathSync(this._scriptPath);
|
|
1757
1757
|
} catch (err) {
|
|
1758
1758
|
resolvedScriptPath = this._scriptPath;
|
|
1759
1759
|
}
|
|
@@ -1769,15 +1769,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1769
1769
|
}
|
|
1770
1770
|
launchWithNode = sourceExt.includes(path$16.extname(executableFile));
|
|
1771
1771
|
let proc$1;
|
|
1772
|
-
if (process$
|
|
1772
|
+
if (process$4.platform !== "win32") if (launchWithNode) {
|
|
1773
1773
|
args.unshift(executableFile);
|
|
1774
|
-
args = incrementNodeInspectorPort(process$
|
|
1775
|
-
proc$1 = childProcess.spawn(process$
|
|
1776
|
-
} else proc$1 = childProcess.spawn(executableFile, args, { stdio: "inherit" });
|
|
1774
|
+
args = incrementNodeInspectorPort(process$4.execArgv).concat(args);
|
|
1775
|
+
proc$1 = childProcess$1.spawn(process$4.argv[0], args, { stdio: "inherit" });
|
|
1776
|
+
} else proc$1 = childProcess$1.spawn(executableFile, args, { stdio: "inherit" });
|
|
1777
1777
|
else {
|
|
1778
1778
|
args.unshift(executableFile);
|
|
1779
|
-
args = incrementNodeInspectorPort(process$
|
|
1780
|
-
proc$1 = childProcess.spawn(process$
|
|
1779
|
+
args = incrementNodeInspectorPort(process$4.execArgv).concat(args);
|
|
1780
|
+
proc$1 = childProcess$1.spawn(process$4.execPath, args, { stdio: "inherit" });
|
|
1781
1781
|
}
|
|
1782
1782
|
if (!proc$1.killed) [
|
|
1783
1783
|
"SIGUSR1",
|
|
@@ -1786,14 +1786,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1786
1786
|
"SIGINT",
|
|
1787
1787
|
"SIGHUP"
|
|
1788
1788
|
].forEach((signal) => {
|
|
1789
|
-
process$
|
|
1789
|
+
process$4.on(signal, () => {
|
|
1790
1790
|
if (proc$1.killed === false && proc$1.exitCode === null) proc$1.kill(signal);
|
|
1791
1791
|
});
|
|
1792
1792
|
});
|
|
1793
1793
|
const exitCallback = this._exitCallback;
|
|
1794
1794
|
proc$1.on("close", (code$1) => {
|
|
1795
1795
|
code$1 = code$1 ?? 1;
|
|
1796
|
-
if (!exitCallback) process$
|
|
1796
|
+
if (!exitCallback) process$4.exit(code$1);
|
|
1797
1797
|
else exitCallback(new CommanderError(code$1, "commander.executeSubCommandAsync", "(close)"));
|
|
1798
1798
|
});
|
|
1799
1799
|
proc$1.on("error", (err) => {
|
|
@@ -1805,7 +1805,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1805
1805
|
- ${executableDirMessage}`;
|
|
1806
1806
|
throw new Error(executableMissing);
|
|
1807
1807
|
} else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
|
|
1808
|
-
if (!exitCallback) process$
|
|
1808
|
+
if (!exitCallback) process$4.exit(1);
|
|
1809
1809
|
else {
|
|
1810
1810
|
const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
|
|
1811
1811
|
wrappedError.nestedError = err;
|
|
@@ -2211,13 +2211,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2211
2211
|
*/
|
|
2212
2212
|
_parseOptionsEnv() {
|
|
2213
2213
|
this.options.forEach((option) => {
|
|
2214
|
-
if (option.envVar && option.envVar in process$
|
|
2214
|
+
if (option.envVar && option.envVar in process$4.env) {
|
|
2215
2215
|
const optionKey = option.attributeName();
|
|
2216
2216
|
if (this.getOptionValue(optionKey) === void 0 || [
|
|
2217
2217
|
"default",
|
|
2218
2218
|
"config",
|
|
2219
2219
|
"env"
|
|
2220
|
-
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$
|
|
2220
|
+
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$4.env[option.envVar]);
|
|
2221
2221
|
else this.emit(`optionEnv:${option.name()}`);
|
|
2222
2222
|
}
|
|
2223
2223
|
});
|
|
@@ -2596,7 +2596,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2596
2596
|
*/
|
|
2597
2597
|
help(contextOptions) {
|
|
2598
2598
|
this.outputHelp(contextOptions);
|
|
2599
|
-
let exitCode = process$
|
|
2599
|
+
let exitCode = process$4.exitCode || 0;
|
|
2600
2600
|
if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
|
|
2601
2601
|
this._exit(exitCode, "commander.help", "(outputHelp)");
|
|
2602
2602
|
}
|
|
@@ -2712,16 +2712,16 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2712
2712
|
const CSI = `${ESC}[`;
|
|
2713
2713
|
const beep = "\x07";
|
|
2714
2714
|
const cursor = {
|
|
2715
|
-
to(x$2, y$
|
|
2716
|
-
if (!y$
|
|
2717
|
-
return `${CSI}${y$
|
|
2715
|
+
to(x$2, y$1) {
|
|
2716
|
+
if (!y$1) return `${CSI}${x$2 + 1}G`;
|
|
2717
|
+
return `${CSI}${y$1 + 1};${x$2 + 1}H`;
|
|
2718
2718
|
},
|
|
2719
|
-
move(x$2, y$
|
|
2719
|
+
move(x$2, y$1) {
|
|
2720
2720
|
let ret = "";
|
|
2721
2721
|
if (x$2 < 0) ret += `${CSI}${-x$2}D`;
|
|
2722
2722
|
else if (x$2 > 0) ret += `${CSI}${x$2}C`;
|
|
2723
|
-
if (y$
|
|
2724
|
-
else if (y$
|
|
2723
|
+
if (y$1 < 0) ret += `${CSI}${-y$1}A`;
|
|
2724
|
+
else if (y$1 > 0) ret += `${CSI}${y$1}B`;
|
|
2725
2725
|
return ret;
|
|
2726
2726
|
},
|
|
2727
2727
|
up: (count$1 = 1) => `${CSI}${count$1}A`,
|
|
@@ -2767,9 +2767,9 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2767
2767
|
var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2768
2768
|
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
2769
2769
|
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
2770
|
-
let formatter = (open, close, replace$1 = open) => (input) => {
|
|
2771
|
-
let string$2 = "" + input, index = string$2.indexOf(close, open.length);
|
|
2772
|
-
return ~index ? open + replaceClose(string$2, close, replace$1, index) + close : open + string$2 + close;
|
|
2770
|
+
let formatter = (open$1, close, replace$1 = open$1) => (input) => {
|
|
2771
|
+
let string$2 = "" + input, index = string$2.indexOf(close, open$1.length);
|
|
2772
|
+
return ~index ? open$1 + replaceClose(string$2, close, replace$1, index) + close : open$1 + string$2 + close;
|
|
2773
2773
|
};
|
|
2774
2774
|
let replaceClose = (string$2, close, replace$1, index) => {
|
|
2775
2775
|
let result = "", cursor = 0;
|
|
@@ -3031,13 +3031,13 @@ function rD() {
|
|
|
3031
3031
|
}
|
|
3032
3032
|
}), r;
|
|
3033
3033
|
}
|
|
3034
|
-
const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y
|
|
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) => {
|
|
3035
3035
|
const F$1 = [...u$2];
|
|
3036
3036
|
let s = !1, i$1 = !1, D$1 = p(P$1(e$1[e$1.length - 1]));
|
|
3037
3037
|
for (const [C$1, n$1] of F$1.entries()) {
|
|
3038
3038
|
const E = p(n$1);
|
|
3039
3039
|
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
|
|
3040
|
+
i$1 ? n$1 === y && (s = !1, i$1 = !1) : n$1 === G$1 && (s = !1);
|
|
3041
3041
|
continue;
|
|
3042
3042
|
}
|
|
3043
3043
|
D$1 += E, D$1 === t && C$1 < F$1.length - 1 && (e$1.push(""), D$1 = 0);
|
|
@@ -3079,7 +3079,7 @@ const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y$1 = "\x07", V$1 = "["
|
|
|
3079
3079
|
`)];
|
|
3080
3080
|
for (const [E, a$1] of n$1.entries()) {
|
|
3081
3081
|
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
|
|
3082
|
+
const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y})`)).exec(n$1.slice(E).join("")) || { groups: {} };
|
|
3083
3083
|
if (c$1.code !== void 0) {
|
|
3084
3084
|
const f = Number.parseFloat(c$1.code);
|
|
3085
3085
|
s = f === oD ? void 0 : f;
|
|
@@ -3480,7 +3480,7 @@ var RD = class extends x$1 {
|
|
|
3480
3480
|
//#endregion
|
|
3481
3481
|
//#region node_modules/@clack/prompts/dist/index.mjs
|
|
3482
3482
|
function ce() {
|
|
3483
|
-
return
|
|
3483
|
+
return process$1.platform !== "win32" ? process$1.env.TERM !== "linux" : !!process$1.env.CI || !!process$1.env.WT_SESSION || !!process$1.env.TERMINUS_SUBLIME || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
3484
3484
|
}
|
|
3485
3485
|
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
3486
|
switch (t) {
|
|
@@ -6628,7 +6628,7 @@ function initializeContext(params) {
|
|
|
6628
6628
|
external: params?.external ?? void 0
|
|
6629
6629
|
};
|
|
6630
6630
|
}
|
|
6631
|
-
function process$
|
|
6631
|
+
function process$3(schema, ctx, _params = {
|
|
6632
6632
|
path: [],
|
|
6633
6633
|
schemaPath: []
|
|
6634
6634
|
}) {
|
|
@@ -6665,7 +6665,7 @@ function process$2(schema, ctx, _params = {
|
|
|
6665
6665
|
const parent = schema._zod.parent;
|
|
6666
6666
|
if (parent) {
|
|
6667
6667
|
if (!result.ref) result.ref = parent;
|
|
6668
|
-
process$
|
|
6668
|
+
process$3(parent, ctx, params);
|
|
6669
6669
|
ctx.seen.get(parent).isParent = true;
|
|
6670
6670
|
}
|
|
6671
6671
|
}
|
|
@@ -6877,7 +6877,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
6877
6877
|
...params,
|
|
6878
6878
|
processors
|
|
6879
6879
|
});
|
|
6880
|
-
process$
|
|
6880
|
+
process$3(schema, ctx);
|
|
6881
6881
|
extractDefs(ctx, schema);
|
|
6882
6882
|
return finalize(ctx, schema);
|
|
6883
6883
|
};
|
|
@@ -6889,7 +6889,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
6889
6889
|
io,
|
|
6890
6890
|
processors
|
|
6891
6891
|
});
|
|
6892
|
-
process$
|
|
6892
|
+
process$3(schema, ctx);
|
|
6893
6893
|
extractDefs(ctx, schema);
|
|
6894
6894
|
return finalize(ctx, schema);
|
|
6895
6895
|
};
|
|
@@ -6973,7 +6973,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
6973
6973
|
if (typeof minimum === "number") json.minItems = minimum;
|
|
6974
6974
|
if (typeof maximum === "number") json.maxItems = maximum;
|
|
6975
6975
|
json.type = "array";
|
|
6976
|
-
json.items = process$
|
|
6976
|
+
json.items = process$3(def.element, ctx, {
|
|
6977
6977
|
...params,
|
|
6978
6978
|
path: [...params.path, "items"]
|
|
6979
6979
|
});
|
|
@@ -6984,7 +6984,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
6984
6984
|
json.type = "object";
|
|
6985
6985
|
json.properties = {};
|
|
6986
6986
|
const shape = def.shape;
|
|
6987
|
-
for (const key in shape) json.properties[key] = process$
|
|
6987
|
+
for (const key in shape) json.properties[key] = process$3(shape[key], ctx, {
|
|
6988
6988
|
...params,
|
|
6989
6989
|
path: [
|
|
6990
6990
|
...params.path,
|
|
@@ -7002,7 +7002,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7002
7002
|
if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
|
|
7003
7003
|
else if (!def.catchall) {
|
|
7004
7004
|
if (ctx.io === "output") json.additionalProperties = false;
|
|
7005
|
-
} else if (def.catchall) json.additionalProperties = process$
|
|
7005
|
+
} else if (def.catchall) json.additionalProperties = process$3(def.catchall, ctx, {
|
|
7006
7006
|
...params,
|
|
7007
7007
|
path: [...params.path, "additionalProperties"]
|
|
7008
7008
|
});
|
|
@@ -7010,7 +7010,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7010
7010
|
const unionProcessor = (schema, ctx, json, params) => {
|
|
7011
7011
|
const def = schema._zod.def;
|
|
7012
7012
|
const isExclusive = def.inclusive === false;
|
|
7013
|
-
const options = def.options.map((x$2, i$1) => process$
|
|
7013
|
+
const options = def.options.map((x$2, i$1) => process$3(x$2, ctx, {
|
|
7014
7014
|
...params,
|
|
7015
7015
|
path: [
|
|
7016
7016
|
...params.path,
|
|
@@ -7023,7 +7023,7 @@ const unionProcessor = (schema, ctx, json, params) => {
|
|
|
7023
7023
|
};
|
|
7024
7024
|
const intersectionProcessor = (schema, ctx, json, params) => {
|
|
7025
7025
|
const def = schema._zod.def;
|
|
7026
|
-
const a$1 = process$
|
|
7026
|
+
const a$1 = process$3(def.left, ctx, {
|
|
7027
7027
|
...params,
|
|
7028
7028
|
path: [
|
|
7029
7029
|
...params.path,
|
|
@@ -7031,7 +7031,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
|
|
|
7031
7031
|
0
|
|
7032
7032
|
]
|
|
7033
7033
|
});
|
|
7034
|
-
const b$2 = process$
|
|
7034
|
+
const b$2 = process$3(def.right, ctx, {
|
|
7035
7035
|
...params,
|
|
7036
7036
|
path: [
|
|
7037
7037
|
...params.path,
|
|
@@ -7048,7 +7048,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7048
7048
|
json.type = "array";
|
|
7049
7049
|
const prefixPath$1 = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
7050
7050
|
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
7051
|
-
const prefixItems = def.items.map((x$2, i$1) => process$
|
|
7051
|
+
const prefixItems = def.items.map((x$2, i$1) => process$3(x$2, ctx, {
|
|
7052
7052
|
...params,
|
|
7053
7053
|
path: [
|
|
7054
7054
|
...params.path,
|
|
@@ -7056,7 +7056,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7056
7056
|
i$1
|
|
7057
7057
|
]
|
|
7058
7058
|
}));
|
|
7059
|
-
const rest = def.rest ? process$
|
|
7059
|
+
const rest = def.rest ? process$3(def.rest, ctx, {
|
|
7060
7060
|
...params,
|
|
7061
7061
|
path: [
|
|
7062
7062
|
...params.path,
|
|
@@ -7082,7 +7082,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7082
7082
|
};
|
|
7083
7083
|
const nullableProcessor = (schema, ctx, json, params) => {
|
|
7084
7084
|
const def = schema._zod.def;
|
|
7085
|
-
const inner = process$
|
|
7085
|
+
const inner = process$3(def.innerType, ctx, params);
|
|
7086
7086
|
const seen = ctx.seen.get(schema);
|
|
7087
7087
|
if (ctx.target === "openapi-3.0") {
|
|
7088
7088
|
seen.ref = def.innerType;
|
|
@@ -7091,27 +7091,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
|
|
|
7091
7091
|
};
|
|
7092
7092
|
const nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
7093
7093
|
const def = schema._zod.def;
|
|
7094
|
-
process$
|
|
7094
|
+
process$3(def.innerType, ctx, params);
|
|
7095
7095
|
const seen = ctx.seen.get(schema);
|
|
7096
7096
|
seen.ref = def.innerType;
|
|
7097
7097
|
};
|
|
7098
7098
|
const defaultProcessor = (schema, ctx, json, params) => {
|
|
7099
7099
|
const def = schema._zod.def;
|
|
7100
|
-
process$
|
|
7100
|
+
process$3(def.innerType, ctx, params);
|
|
7101
7101
|
const seen = ctx.seen.get(schema);
|
|
7102
7102
|
seen.ref = def.innerType;
|
|
7103
7103
|
json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7104
7104
|
};
|
|
7105
7105
|
const prefaultProcessor = (schema, ctx, json, params) => {
|
|
7106
7106
|
const def = schema._zod.def;
|
|
7107
|
-
process$
|
|
7107
|
+
process$3(def.innerType, ctx, params);
|
|
7108
7108
|
const seen = ctx.seen.get(schema);
|
|
7109
7109
|
seen.ref = def.innerType;
|
|
7110
7110
|
if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7111
7111
|
};
|
|
7112
7112
|
const catchProcessor = (schema, ctx, json, params) => {
|
|
7113
7113
|
const def = schema._zod.def;
|
|
7114
|
-
process$
|
|
7114
|
+
process$3(def.innerType, ctx, params);
|
|
7115
7115
|
const seen = ctx.seen.get(schema);
|
|
7116
7116
|
seen.ref = def.innerType;
|
|
7117
7117
|
let catchValue;
|
|
@@ -7125,20 +7125,20 @@ const catchProcessor = (schema, ctx, json, params) => {
|
|
|
7125
7125
|
const pipeProcessor = (schema, ctx, _json, params) => {
|
|
7126
7126
|
const def = schema._zod.def;
|
|
7127
7127
|
const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
7128
|
-
process$
|
|
7128
|
+
process$3(innerType, ctx, params);
|
|
7129
7129
|
const seen = ctx.seen.get(schema);
|
|
7130
7130
|
seen.ref = innerType;
|
|
7131
7131
|
};
|
|
7132
7132
|
const readonlyProcessor = (schema, ctx, json, params) => {
|
|
7133
7133
|
const def = schema._zod.def;
|
|
7134
|
-
process$
|
|
7134
|
+
process$3(def.innerType, ctx, params);
|
|
7135
7135
|
const seen = ctx.seen.get(schema);
|
|
7136
7136
|
seen.ref = def.innerType;
|
|
7137
7137
|
json.readOnly = true;
|
|
7138
7138
|
};
|
|
7139
7139
|
const optionalProcessor = (schema, ctx, _json, params) => {
|
|
7140
7140
|
const def = schema._zod.def;
|
|
7141
|
-
process$
|
|
7141
|
+
process$3(def.innerType, ctx, params);
|
|
7142
7142
|
const seen = ctx.seen.get(schema);
|
|
7143
7143
|
seen.ref = def.innerType;
|
|
7144
7144
|
};
|
|
@@ -8770,7 +8770,7 @@ var require_package$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
8770
8770
|
//#endregion
|
|
8771
8771
|
//#region node_modules/dotenv/lib/main.js
|
|
8772
8772
|
var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8773
|
-
const fs$
|
|
8773
|
+
const fs$10 = __require("fs");
|
|
8774
8774
|
const path$15 = __require("path");
|
|
8775
8775
|
const os$3 = __require("os");
|
|
8776
8776
|
const crypto = __require("crypto");
|
|
@@ -8907,10 +8907,10 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
8907
8907
|
function _vaultPath(options) {
|
|
8908
8908
|
let possibleVaultPath = null;
|
|
8909
8909
|
if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
|
|
8910
|
-
for (const filepath of options.path) if (fs$
|
|
8910
|
+
for (const filepath of options.path) if (fs$10.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
8911
8911
|
} else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
8912
8912
|
else possibleVaultPath = path$15.resolve(process.cwd(), ".env.vault");
|
|
8913
|
-
if (fs$
|
|
8913
|
+
if (fs$10.existsSync(possibleVaultPath)) return possibleVaultPath;
|
|
8914
8914
|
return null;
|
|
8915
8915
|
}
|
|
8916
8916
|
function _resolveHome(envPath) {
|
|
@@ -8944,7 +8944,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
8944
8944
|
let lastError;
|
|
8945
8945
|
const parsedAll = {};
|
|
8946
8946
|
for (const path$17 of optionPaths) try {
|
|
8947
|
-
const parsed = DotenvModule.parse(fs$
|
|
8947
|
+
const parsed = DotenvModule.parse(fs$10.readFileSync(path$17, { encoding }));
|
|
8948
8948
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
8949
8949
|
} catch (e$1) {
|
|
8950
8950
|
if (debug) _debug(`Failed to load ${path$17} ${e$1.message}`);
|
|
@@ -9414,9 +9414,9 @@ var require_is_glob = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9414
9414
|
}
|
|
9415
9415
|
}
|
|
9416
9416
|
if (str[index] === "\\") {
|
|
9417
|
-
var open = str[index + 1];
|
|
9417
|
+
var open$1 = str[index + 1];
|
|
9418
9418
|
index += 2;
|
|
9419
|
-
var close = chars[open];
|
|
9419
|
+
var close = chars[open$1];
|
|
9420
9420
|
if (close) {
|
|
9421
9421
|
var n$1 = str.indexOf(close, index);
|
|
9422
9422
|
if (n$1 !== -1) index = n$1 + 1;
|
|
@@ -9432,9 +9432,9 @@ var require_is_glob = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9432
9432
|
while (index < str.length) {
|
|
9433
9433
|
if (/[*?{}()[\]]/.test(str[index])) return true;
|
|
9434
9434
|
if (str[index] === "\\") {
|
|
9435
|
-
var open = str[index + 1];
|
|
9435
|
+
var open$1 = str[index + 1];
|
|
9436
9436
|
index += 2;
|
|
9437
|
-
var close = chars[open];
|
|
9437
|
+
var close = chars[open$1];
|
|
9438
9438
|
if (close) {
|
|
9439
9439
|
var n$1 = str.indexOf(close, index);
|
|
9440
9440
|
if (n$1 !== -1) index = n$1 + 1;
|
|
@@ -10286,7 +10286,7 @@ var require_parse$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10286
10286
|
* Quotes: '|"|`
|
|
10287
10287
|
*/
|
|
10288
10288
|
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
|
10289
|
-
const open = value;
|
|
10289
|
+
const open$1 = value;
|
|
10290
10290
|
let next;
|
|
10291
10291
|
if (options.keepQuotes !== true) value = "";
|
|
10292
10292
|
while (index < length && (next = advance())) {
|
|
@@ -10294,7 +10294,7 @@ var require_parse$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10294
10294
|
value += next + advance();
|
|
10295
10295
|
continue;
|
|
10296
10296
|
}
|
|
10297
|
-
if (next === open) {
|
|
10297
|
+
if (next === open$1) {
|
|
10298
10298
|
if (options.keepQuotes === true) value += next;
|
|
10299
10299
|
break;
|
|
10300
10300
|
}
|
|
@@ -10356,8 +10356,8 @@ var require_parse$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10356
10356
|
if (value === CHAR_COMMA && depth > 0) {
|
|
10357
10357
|
if (block.ranges > 0) {
|
|
10358
10358
|
block.ranges = 0;
|
|
10359
|
-
const open = block.nodes.shift();
|
|
10360
|
-
block.nodes = [open, {
|
|
10359
|
+
const open$1 = block.nodes.shift();
|
|
10360
|
+
block.nodes = [open$1, {
|
|
10361
10361
|
type: "text",
|
|
10362
10362
|
value: stringify(block)
|
|
10363
10363
|
}];
|
|
@@ -11462,15 +11462,15 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11462
11462
|
*/
|
|
11463
11463
|
if (value === "{" && opts.nobrace !== true) {
|
|
11464
11464
|
increment$1("braces");
|
|
11465
|
-
const open = {
|
|
11465
|
+
const open$1 = {
|
|
11466
11466
|
type: "brace",
|
|
11467
11467
|
value,
|
|
11468
11468
|
output: "(",
|
|
11469
11469
|
outputIndex: state.output.length,
|
|
11470
11470
|
tokensIndex: state.tokens.length
|
|
11471
11471
|
};
|
|
11472
|
-
braces.push(open);
|
|
11473
|
-
push$1(open);
|
|
11472
|
+
braces.push(open$1);
|
|
11473
|
+
push$1(open$1);
|
|
11474
11474
|
continue;
|
|
11475
11475
|
}
|
|
11476
11476
|
if (value === "}") {
|
|
@@ -13110,12 +13110,12 @@ var require_sync$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13110
13110
|
var require_fs$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13111
13111
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13112
13112
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
13113
|
-
const fs$
|
|
13113
|
+
const fs$9 = __require("fs");
|
|
13114
13114
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
13115
|
-
lstat: fs$
|
|
13116
|
-
stat: fs$
|
|
13117
|
-
lstatSync: fs$
|
|
13118
|
-
statSync: fs$
|
|
13115
|
+
lstat: fs$9.lstat,
|
|
13116
|
+
stat: fs$9.stat,
|
|
13117
|
+
lstatSync: fs$9.lstatSync,
|
|
13118
|
+
statSync: fs$9.statSync
|
|
13119
13119
|
};
|
|
13120
13120
|
function createFileSystemAdapter(fsMethods) {
|
|
13121
13121
|
if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER;
|
|
@@ -13448,14 +13448,14 @@ var require_sync$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13448
13448
|
var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13449
13449
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13450
13450
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
13451
|
-
const fs$
|
|
13451
|
+
const fs$8 = __require("fs");
|
|
13452
13452
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
13453
|
-
lstat: fs$
|
|
13454
|
-
stat: fs$
|
|
13455
|
-
lstatSync: fs$
|
|
13456
|
-
statSync: fs$
|
|
13457
|
-
readdir: fs$
|
|
13458
|
-
readdirSync: fs$
|
|
13453
|
+
lstat: fs$8.lstat,
|
|
13454
|
+
stat: fs$8.stat,
|
|
13455
|
+
lstatSync: fs$8.lstatSync,
|
|
13456
|
+
statSync: fs$8.statSync,
|
|
13457
|
+
readdir: fs$8.readdir,
|
|
13458
|
+
readdirSync: fs$8.readdirSync
|
|
13459
13459
|
};
|
|
13460
13460
|
function createFileSystemAdapter(fsMethods) {
|
|
13461
13461
|
if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER;
|
|
@@ -14677,7 +14677,7 @@ var require_sync = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14677
14677
|
var require_settings = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14678
14678
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14679
14679
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
14680
|
-
const fs$
|
|
14680
|
+
const fs$7 = __require("fs");
|
|
14681
14681
|
const os$1 = __require("os");
|
|
14682
14682
|
/**
|
|
14683
14683
|
* The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
|
|
@@ -14685,12 +14685,12 @@ var require_settings = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14685
14685
|
*/
|
|
14686
14686
|
const CPU_COUNT = Math.max(os$1.cpus().length, 1);
|
|
14687
14687
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
14688
|
-
lstat: fs$
|
|
14689
|
-
lstatSync: fs$
|
|
14690
|
-
stat: fs$
|
|
14691
|
-
statSync: fs$
|
|
14692
|
-
readdir: fs$
|
|
14693
|
-
readdirSync: fs$
|
|
14688
|
+
lstat: fs$7.lstat,
|
|
14689
|
+
lstatSync: fs$7.lstatSync,
|
|
14690
|
+
stat: fs$7.stat,
|
|
14691
|
+
statSync: fs$7.statSync,
|
|
14692
|
+
readdir: fs$7.readdir,
|
|
14693
|
+
readdirSync: fs$7.readdirSync
|
|
14694
14694
|
};
|
|
14695
14695
|
var Settings = class {
|
|
14696
14696
|
constructor(_options = {}) {
|
|
@@ -15269,7 +15269,7 @@ const ignoreFilesGlobOptions = {
|
|
|
15269
15269
|
dot: true
|
|
15270
15270
|
};
|
|
15271
15271
|
const GITIGNORE_FILES_PATTERN = "**/.gitignore";
|
|
15272
|
-
const getReadFileMethod = (fsImplementation) => bindFsMethod(fsImplementation?.promises, "readFile") ?? bindFsMethod(
|
|
15272
|
+
const getReadFileMethod = (fsImplementation) => bindFsMethod(fsImplementation?.promises, "readFile") ?? bindFsMethod(fs$2, "readFile") ?? promisifyFsMethod(fsImplementation, "readFile");
|
|
15273
15273
|
const getReadFileSyncMethod = (fsImplementation) => bindFsMethod(fsImplementation, "readFileSync") ?? bindFsMethod(fs, "readFileSync");
|
|
15274
15274
|
const shouldSkipIgnoreFileError = (error, suppressErrors) => {
|
|
15275
15275
|
if (!error) return Boolean(suppressErrors);
|
|
@@ -15371,7 +15371,7 @@ const createIgnorePredicate = (patterns, cwd, baseDir) => {
|
|
|
15371
15371
|
};
|
|
15372
15372
|
const normalizeOptions$2 = (options = {}) => {
|
|
15373
15373
|
const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
|
|
15374
|
-
const cwd = toPath$1(options.cwd) ??
|
|
15374
|
+
const cwd = toPath$1(options.cwd) ?? process$1.cwd();
|
|
15375
15375
|
const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
|
|
15376
15376
|
return {
|
|
15377
15377
|
cwd,
|
|
@@ -15468,7 +15468,7 @@ const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
|
15468
15468
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
15469
15469
|
return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
15470
15470
|
};
|
|
15471
|
-
const directoryToGlob = async (directoryPaths, { cwd =
|
|
15471
|
+
const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => {
|
|
15472
15472
|
return (await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
15473
15473
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
15474
15474
|
directoryPath,
|
|
@@ -15482,7 +15482,7 @@ const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extension
|
|
|
15482
15482
|
}) : directoryPath;
|
|
15483
15483
|
}))).flat();
|
|
15484
15484
|
};
|
|
15485
|
-
const directoryToGlobSync = (directoryPaths, { cwd =
|
|
15485
|
+
const directoryToGlobSync = (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
|
|
15486
15486
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
15487
15487
|
directoryPath,
|
|
15488
15488
|
files,
|
|
@@ -15578,7 +15578,7 @@ const applyIgnoreFilesAndGetFilterSync = (options) => {
|
|
|
15578
15578
|
};
|
|
15579
15579
|
const createFilterFunction = (isIgnored, cwd) => {
|
|
15580
15580
|
const seen = /* @__PURE__ */ new Set();
|
|
15581
|
-
const basePath = cwd ||
|
|
15581
|
+
const basePath = cwd || process$1.cwd();
|
|
15582
15582
|
const pathCache = /* @__PURE__ */ new Map();
|
|
15583
15583
|
return (fastGlobResult) => {
|
|
15584
15584
|
const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
@@ -16744,7 +16744,7 @@ async function readAllEntities(entitiesDir) {
|
|
|
16744
16744
|
async function pushEntities(entities) {
|
|
16745
16745
|
const appClient = getAppClient();
|
|
16746
16746
|
const schemaSyncPayload = Object.fromEntries(entities.map((entity) => [entity.name, entity]));
|
|
16747
|
-
const response = await appClient.put("
|
|
16747
|
+
const response = await appClient.put("entities-schemas/sync-all", {
|
|
16748
16748
|
json: { entityNameToSchema: schemaSyncPayload },
|
|
16749
16749
|
throwHttpErrors: false
|
|
16750
16750
|
});
|
|
@@ -17207,7 +17207,7 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17207
17207
|
* @module ejs
|
|
17208
17208
|
* @public
|
|
17209
17209
|
*/
|
|
17210
|
-
var fs$
|
|
17210
|
+
var fs$6 = __require("fs");
|
|
17211
17211
|
var path$5 = __require("path");
|
|
17212
17212
|
var utils = require_utils();
|
|
17213
17213
|
var scopeOptionWarned = false;
|
|
@@ -17249,7 +17249,7 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17249
17249
|
*
|
|
17250
17250
|
* @type {fileLoader}
|
|
17251
17251
|
*/
|
|
17252
|
-
exports.fileLoader = fs$
|
|
17252
|
+
exports.fileLoader = fs$6.readFileSync;
|
|
17253
17253
|
/**
|
|
17254
17254
|
* Name of the object containing the locals.
|
|
17255
17255
|
*
|
|
@@ -17296,7 +17296,7 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17296
17296
|
var filePath;
|
|
17297
17297
|
if (paths.some(function(v$1) {
|
|
17298
17298
|
filePath = exports.resolveInclude(name$1, v$1, true);
|
|
17299
|
-
return fs$
|
|
17299
|
+
return fs$6.existsSync(filePath);
|
|
17300
17300
|
})) return filePath;
|
|
17301
17301
|
}
|
|
17302
17302
|
/**
|
|
@@ -17318,7 +17318,7 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17318
17318
|
} else {
|
|
17319
17319
|
if (options.filename) {
|
|
17320
17320
|
filePath = exports.resolveInclude(path$17, options.filename);
|
|
17321
|
-
if (fs$
|
|
17321
|
+
if (fs$6.existsSync(filePath)) includePath = filePath;
|
|
17322
17322
|
}
|
|
17323
17323
|
if (!includePath && Array.isArray(views)) includePath = resolvePaths(path$17, views);
|
|
17324
17324
|
if (!includePath && typeof options.includer !== "function") throw new Error("Could not find the include file \"" + options.escapeFunction(path$17) + "\"");
|
|
@@ -17591,9 +17591,9 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17591
17591
|
createRegex: function() {
|
|
17592
17592
|
var str = _REGEX_STRING;
|
|
17593
17593
|
var delim = utils.escapeRegExpChars(this.opts.delimiter);
|
|
17594
|
-
var open = utils.escapeRegExpChars(this.opts.openDelimiter);
|
|
17594
|
+
var open$1 = utils.escapeRegExpChars(this.opts.openDelimiter);
|
|
17595
17595
|
var close = utils.escapeRegExpChars(this.opts.closeDelimiter);
|
|
17596
|
-
str = str.replace(/%/g, delim).replace(/</g, open).replace(/>/g, close);
|
|
17596
|
+
str = str.replace(/%/g, delim).replace(/</g, open$1).replace(/>/g, close);
|
|
17597
17597
|
return new RegExp(str);
|
|
17598
17598
|
},
|
|
17599
17599
|
compile: function() {
|
|
@@ -25534,7 +25534,7 @@ async function createProjectFiles(options) {
|
|
|
25534
25534
|
|
|
25535
25535
|
//#endregion
|
|
25536
25536
|
//#region src/core/config.ts
|
|
25537
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
25537
|
+
const __dirname$1 = dirname(fileURLToPath(import.meta.url));
|
|
25538
25538
|
function getBase44GlobalDir() {
|
|
25539
25539
|
return join(homedir(), ".base44");
|
|
25540
25540
|
}
|
|
@@ -25542,7 +25542,7 @@ function getAuthFilePath() {
|
|
|
25542
25542
|
return join(getBase44GlobalDir(), "auth", "auth.json");
|
|
25543
25543
|
}
|
|
25544
25544
|
function getTemplatesDir() {
|
|
25545
|
-
return join(__dirname, "templates");
|
|
25545
|
+
return join(__dirname$1, "templates");
|
|
25546
25546
|
}
|
|
25547
25547
|
function getTemplatesIndexPath() {
|
|
25548
25548
|
return join(getTemplatesDir(), "templates.json");
|
|
@@ -25958,13 +25958,13 @@ var ansi_styles_default = ansiStyles;
|
|
|
25958
25958
|
|
|
25959
25959
|
//#endregion
|
|
25960
25960
|
//#region node_modules/chalk/source/vendor/supports-color/index.js
|
|
25961
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
25961
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process$1.argv) {
|
|
25962
25962
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
25963
25963
|
const position = argv.indexOf(prefix + flag);
|
|
25964
25964
|
const terminatorPosition = argv.indexOf("--");
|
|
25965
25965
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
25966
25966
|
}
|
|
25967
|
-
const { env } =
|
|
25967
|
+
const { env } = process$1;
|
|
25968
25968
|
let flagForceColor;
|
|
25969
25969
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
25970
25970
|
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
@@ -25997,7 +25997,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
25997
25997
|
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
25998
25998
|
const min = forceColor || 0;
|
|
25999
25999
|
if (env.TERM === "dumb") return min;
|
|
26000
|
-
if (
|
|
26000
|
+
if (process$1.platform === "win32") {
|
|
26001
26001
|
const osRelease = os.release().split(".");
|
|
26002
26002
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
26003
26003
|
return 1;
|
|
@@ -26155,18 +26155,18 @@ const proto = Object.defineProperties(() => {}, {
|
|
|
26155
26155
|
}
|
|
26156
26156
|
}
|
|
26157
26157
|
});
|
|
26158
|
-
const createStyler = (open, close, parent) => {
|
|
26158
|
+
const createStyler = (open$1, close, parent) => {
|
|
26159
26159
|
let openAll;
|
|
26160
26160
|
let closeAll;
|
|
26161
26161
|
if (parent === void 0) {
|
|
26162
|
-
openAll = open;
|
|
26162
|
+
openAll = open$1;
|
|
26163
26163
|
closeAll = close;
|
|
26164
26164
|
} else {
|
|
26165
|
-
openAll = parent.openAll + open;
|
|
26165
|
+
openAll = parent.openAll + open$1;
|
|
26166
26166
|
closeAll = close + parent.closeAll;
|
|
26167
26167
|
}
|
|
26168
26168
|
return {
|
|
26169
|
-
open,
|
|
26169
|
+
open: open$1,
|
|
26170
26170
|
close,
|
|
26171
26171
|
openAll,
|
|
26172
26172
|
closeAll,
|
|
@@ -27792,7 +27792,7 @@ const makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate$1) =
|
|
|
27792
27792
|
/* c8 ignore start */
|
|
27793
27793
|
const realZlibConstants = realZlib.constants || { ZLIB_VERNUM: 4736 };
|
|
27794
27794
|
/* c8 ignore stop */
|
|
27795
|
-
const constants$
|
|
27795
|
+
const constants$2 = Object.freeze(Object.assign(Object.create(null), {
|
|
27796
27796
|
Z_NO_FLUSH: 0,
|
|
27797
27797
|
Z_PARTIAL_FLUSH: 1,
|
|
27798
27798
|
Z_SYNC_FLUSH: 2,
|
|
@@ -28054,9 +28054,9 @@ var Zlib = class extends ZlibBase {
|
|
|
28054
28054
|
#strategy;
|
|
28055
28055
|
constructor(opts, mode) {
|
|
28056
28056
|
opts = opts || {};
|
|
28057
|
-
opts.flush = opts.flush || constants$
|
|
28058
|
-
opts.finishFlush = opts.finishFlush || constants$
|
|
28059
|
-
opts.fullFlushFlag = constants$
|
|
28057
|
+
opts.flush = opts.flush || constants$2.Z_NO_FLUSH;
|
|
28058
|
+
opts.finishFlush = opts.finishFlush || constants$2.Z_FINISH;
|
|
28059
|
+
opts.fullFlushFlag = constants$2.Z_FULL_FLUSH;
|
|
28060
28060
|
super(opts, mode);
|
|
28061
28061
|
this.#level = opts.level;
|
|
28062
28062
|
this.#strategy = opts.strategy;
|
|
@@ -28068,7 +28068,7 @@ var Zlib = class extends ZlibBase {
|
|
|
28068
28068
|
if (!this.handle.params) throw new Error("not supported in this implementation");
|
|
28069
28069
|
/* c8 ignore stop */
|
|
28070
28070
|
if (this.#level !== level || this.#strategy !== strategy) {
|
|
28071
|
-
this.flush(constants$
|
|
28071
|
+
this.flush(constants$2.Z_SYNC_FLUSH);
|
|
28072
28072
|
assert(this.handle, "zlib binding closed");
|
|
28073
28073
|
const origFlush = this.handle.flush;
|
|
28074
28074
|
this.handle.flush = (flushFlag, cb) => {
|
|
@@ -28115,9 +28115,9 @@ var Unzip = class extends Zlib {
|
|
|
28115
28115
|
var Brotli = class extends ZlibBase {
|
|
28116
28116
|
constructor(opts, mode) {
|
|
28117
28117
|
opts = opts || {};
|
|
28118
|
-
opts.flush = opts.flush || constants$
|
|
28119
|
-
opts.finishFlush = opts.finishFlush || constants$
|
|
28120
|
-
opts.fullFlushFlag = constants$
|
|
28118
|
+
opts.flush = opts.flush || constants$2.BROTLI_OPERATION_PROCESS;
|
|
28119
|
+
opts.finishFlush = opts.finishFlush || constants$2.BROTLI_OPERATION_FINISH;
|
|
28120
|
+
opts.fullFlushFlag = constants$2.BROTLI_OPERATION_FLUSH;
|
|
28121
28121
|
super(opts, mode);
|
|
28122
28122
|
}
|
|
28123
28123
|
};
|
|
@@ -28134,9 +28134,9 @@ var BrotliDecompress = class extends Brotli {
|
|
|
28134
28134
|
var Zstd = class extends ZlibBase {
|
|
28135
28135
|
constructor(opts, mode) {
|
|
28136
28136
|
opts = opts || {};
|
|
28137
|
-
opts.flush = opts.flush || constants$
|
|
28138
|
-
opts.finishFlush = opts.finishFlush || constants$
|
|
28139
|
-
opts.fullFlushFlag = constants$
|
|
28137
|
+
opts.flush = opts.flush || constants$2.ZSTD_e_continue;
|
|
28138
|
+
opts.finishFlush = opts.finishFlush || constants$2.ZSTD_e_end;
|
|
28139
|
+
opts.fullFlushFlag = constants$2.ZSTD_e_flush;
|
|
28140
28140
|
super(opts, mode);
|
|
28141
28141
|
}
|
|
28142
28142
|
};
|
|
@@ -28522,8 +28522,8 @@ const parseKVLine = (set, line) => {
|
|
|
28522
28522
|
|
|
28523
28523
|
//#endregion
|
|
28524
28524
|
//#region node_modules/tar/dist/esm/normalize-windows-path.js
|
|
28525
|
-
const platform$
|
|
28526
|
-
const normalizeWindowsPath = platform$
|
|
28525
|
+
const platform$2 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
28526
|
+
const normalizeWindowsPath = platform$2 !== "win32" ? (p$1) => p$1 : (p$1) => p$1 && p$1.replace(/\\/g, "/");
|
|
28527
28527
|
|
|
28528
28528
|
//#endregion
|
|
28529
28529
|
//#region node_modules/tar/dist/esm/read-entry.js
|
|
@@ -30487,7 +30487,7 @@ const mkdir$1 = (dir, opt, cb) => {
|
|
|
30487
30487
|
else cb();
|
|
30488
30488
|
};
|
|
30489
30489
|
if (dir === cwd) return checkCwd(dir, done);
|
|
30490
|
-
if (preserve) return
|
|
30490
|
+
if (preserve) return fs$2.mkdir(dir, {
|
|
30491
30491
|
mode,
|
|
30492
30492
|
recursive: true
|
|
30493
30493
|
}).then((made) => done(null, made ?? void 0), done);
|
|
@@ -31709,9 +31709,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
|
|
|
31709
31709
|
//#region node_modules/execa/lib/utils/standard-stream.js
|
|
31710
31710
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
31711
31711
|
const STANDARD_STREAMS = [
|
|
31712
|
-
|
|
31713
|
-
|
|
31714
|
-
|
|
31712
|
+
process$1.stdin,
|
|
31713
|
+
process$1.stdout,
|
|
31714
|
+
process$1.stderr
|
|
31715
31715
|
];
|
|
31716
31716
|
const STANDARD_STREAMS_ALIASES = [
|
|
31717
31717
|
"stdin",
|
|
@@ -31836,9 +31836,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
31836
31836
|
//#endregion
|
|
31837
31837
|
//#region node_modules/is-unicode-supported/index.js
|
|
31838
31838
|
function isUnicodeSupported() {
|
|
31839
|
-
const { env: env$1 } =
|
|
31839
|
+
const { env: env$1 } = process$1;
|
|
31840
31840
|
const { TERM, TERM_PROGRAM } = env$1;
|
|
31841
|
-
if (
|
|
31841
|
+
if (process$1.platform !== "win32") return TERM !== "linux";
|
|
31842
31842
|
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";
|
|
31843
31843
|
}
|
|
31844
31844
|
|
|
@@ -32128,9 +32128,9 @@ const replacements = Object.entries(specialMainSymbols);
|
|
|
32128
32128
|
//#endregion
|
|
32129
32129
|
//#region node_modules/yoctocolors/base.js
|
|
32130
32130
|
const hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
32131
|
-
const format = (open, close) => {
|
|
32131
|
+
const format = (open$1, close) => {
|
|
32132
32132
|
if (!hasColors) return (input) => input;
|
|
32133
|
-
const openCode = `\u001B[${open}m`;
|
|
32133
|
+
const openCode = `\u001B[${open$1}m`;
|
|
32134
32134
|
const closeCode = `\u001B[${close}m`;
|
|
32135
32135
|
return (input) => {
|
|
32136
32136
|
const string$2 = input + "";
|
|
@@ -32331,7 +32331,7 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
32331
32331
|
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32332
32332
|
module.exports = isexe;
|
|
32333
32333
|
isexe.sync = sync;
|
|
32334
|
-
var fs$
|
|
32334
|
+
var fs$5 = __require("fs");
|
|
32335
32335
|
function checkPathExt(path$17, options) {
|
|
32336
32336
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
32337
32337
|
if (!pathext) return true;
|
|
@@ -32348,12 +32348,12 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32348
32348
|
return checkPathExt(path$17, options);
|
|
32349
32349
|
}
|
|
32350
32350
|
function isexe(path$17, options, cb) {
|
|
32351
|
-
fs$
|
|
32351
|
+
fs$5.stat(path$17, function(er, stat) {
|
|
32352
32352
|
cb(er, er ? false : checkStat(stat, path$17, options));
|
|
32353
32353
|
});
|
|
32354
32354
|
}
|
|
32355
32355
|
function sync(path$17, options) {
|
|
32356
|
-
return checkStat(fs$
|
|
32356
|
+
return checkStat(fs$5.statSync(path$17), path$17, options);
|
|
32357
32357
|
}
|
|
32358
32358
|
}));
|
|
32359
32359
|
|
|
@@ -32362,14 +32362,14 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32362
32362
|
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32363
32363
|
module.exports = isexe;
|
|
32364
32364
|
isexe.sync = sync;
|
|
32365
|
-
var fs$
|
|
32365
|
+
var fs$4 = __require("fs");
|
|
32366
32366
|
function isexe(path$17, options, cb) {
|
|
32367
|
-
fs$
|
|
32367
|
+
fs$4.stat(path$17, function(er, stat) {
|
|
32368
32368
|
cb(er, er ? false : checkStat(stat, options));
|
|
32369
32369
|
});
|
|
32370
32370
|
}
|
|
32371
32371
|
function sync(path$17, options) {
|
|
32372
|
-
return checkStat(fs$
|
|
32372
|
+
return checkStat(fs$4.statSync(path$17), options);
|
|
32373
32373
|
}
|
|
32374
32374
|
function checkStat(stat, options) {
|
|
32375
32375
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -32592,16 +32592,16 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
32592
32592
|
//#endregion
|
|
32593
32593
|
//#region node_modules/cross-spawn/lib/util/readShebang.js
|
|
32594
32594
|
var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32595
|
-
const fs$
|
|
32595
|
+
const fs$3 = __require("fs");
|
|
32596
32596
|
const shebangCommand = require_shebang_command();
|
|
32597
32597
|
function readShebang(command) {
|
|
32598
32598
|
const size = 150;
|
|
32599
32599
|
const buffer = Buffer.alloc(size);
|
|
32600
32600
|
let fd;
|
|
32601
32601
|
try {
|
|
32602
|
-
fd = fs$
|
|
32603
|
-
fs$
|
|
32604
|
-
fs$
|
|
32602
|
+
fd = fs$3.openSync(command, "r");
|
|
32603
|
+
fs$3.readSync(fd, buffer, 0, size, 0);
|
|
32604
|
+
fs$3.closeSync(fd);
|
|
32605
32605
|
} catch (e$1) {}
|
|
32606
32606
|
return shebangCommand(buffer.toString());
|
|
32607
32607
|
}
|
|
@@ -32739,8 +32739,8 @@ var require_cross_spawn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32739
32739
|
//#region node_modules/npm-run-path/node_modules/path-key/index.js
|
|
32740
32740
|
var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
|
|
32741
32741
|
function pathKey(options = {}) {
|
|
32742
|
-
const { env: env$1 = process.env, platform: platform$
|
|
32743
|
-
if (platform$
|
|
32742
|
+
const { env: env$1 = process.env, platform: platform$3 = process.platform } = options;
|
|
32743
|
+
if (platform$3 !== "win32") return "PATH";
|
|
32744
32744
|
return Object.keys(env$1).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
32745
32745
|
}
|
|
32746
32746
|
|
|
@@ -32765,7 +32765,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
32765
32765
|
|
|
32766
32766
|
//#endregion
|
|
32767
32767
|
//#region node_modules/npm-run-path/index.js
|
|
32768
|
-
const npmRunPath = ({ cwd =
|
|
32768
|
+
const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath: execPath$1 = process$1.execPath, addExecPath = true } = {}) => {
|
|
32769
32769
|
const cwdPath = path.resolve(toPath(cwd));
|
|
32770
32770
|
const result = [];
|
|
32771
32771
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -32783,7 +32783,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
|
32783
32783
|
const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
|
|
32784
32784
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32785
32785
|
};
|
|
32786
|
-
const npmRunPathEnv = ({ env: env$1 =
|
|
32786
|
+
const npmRunPathEnv = ({ env: env$1 = process$1.env, ...options } = {}) => {
|
|
32787
32787
|
env$1 = { ...env$1 };
|
|
32788
32788
|
const pathName = pathKey({ env: env$1 });
|
|
32789
32789
|
options.path = env$1[pathName];
|
|
@@ -33918,7 +33918,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
33918
33918
|
};
|
|
33919
33919
|
const getDefaultCwd = () => {
|
|
33920
33920
|
try {
|
|
33921
|
-
return
|
|
33921
|
+
return process$1.cwd();
|
|
33922
33922
|
} catch (error) {
|
|
33923
33923
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
33924
33924
|
throw error;
|
|
@@ -33953,7 +33953,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
33953
33953
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
33954
33954
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
33955
33955
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
33956
|
-
if (
|
|
33956
|
+
if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
33957
33957
|
return {
|
|
33958
33958
|
file,
|
|
33959
33959
|
commandArguments,
|
|
@@ -33980,7 +33980,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
33980
33980
|
});
|
|
33981
33981
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
33982
33982
|
const env$1 = extendEnv ? {
|
|
33983
|
-
...
|
|
33983
|
+
...process$1.env,
|
|
33984
33984
|
...envOption
|
|
33985
33985
|
} : envOption;
|
|
33986
33986
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -34980,12 +34980,12 @@ const guessStreamDirection = {
|
|
|
34980
34980
|
}
|
|
34981
34981
|
};
|
|
34982
34982
|
const getStandardStreamDirection = (value) => {
|
|
34983
|
-
if ([0,
|
|
34983
|
+
if ([0, process$1.stdin].includes(value)) return "input";
|
|
34984
34984
|
if ([
|
|
34985
34985
|
1,
|
|
34986
34986
|
2,
|
|
34987
|
-
|
|
34988
|
-
|
|
34987
|
+
process$1.stdout,
|
|
34988
|
+
process$1.stderr
|
|
34989
34989
|
].includes(value)) return "output";
|
|
34990
34990
|
};
|
|
34991
34991
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -36049,9 +36049,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
36049
36049
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
36050
36050
|
};
|
|
36051
36051
|
const getIpcExport = () => {
|
|
36052
|
-
const anyProcess =
|
|
36052
|
+
const anyProcess = process$1;
|
|
36053
36053
|
const isSubprocess = true;
|
|
36054
|
-
const ipc =
|
|
36054
|
+
const ipc = process$1.channel !== void 0;
|
|
36055
36055
|
return {
|
|
36056
36056
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
36057
36057
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -36293,7 +36293,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
|
|
|
36293
36293
|
|
|
36294
36294
|
//#endregion
|
|
36295
36295
|
//#region node_modules/signal-exit/dist/mjs/index.js
|
|
36296
|
-
const processOk = (process$
|
|
36296
|
+
const processOk = (process$5) => !!process$5 && typeof process$5 === "object" && typeof process$5.removeListener === "function" && typeof process$5.emit === "function" && typeof process$5.reallyExit === "function" && typeof process$5.listeners === "function" && typeof process$5.kill === "function" && typeof process$5.pid === "number" && typeof process$5.on === "function";
|
|
36297
36297
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
36298
36298
|
const global$1 = globalThis;
|
|
36299
36299
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -36361,7 +36361,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
36361
36361
|
};
|
|
36362
36362
|
var SignalExit = class extends SignalExitBase {
|
|
36363
36363
|
/* c8 ignore start */
|
|
36364
|
-
#hupSig = process$
|
|
36364
|
+
#hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
36365
36365
|
/* c8 ignore stop */
|
|
36366
36366
|
#emitter = new Emitter();
|
|
36367
36367
|
#process;
|
|
@@ -36369,15 +36369,15 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36369
36369
|
#originalProcessReallyExit;
|
|
36370
36370
|
#sigListeners = {};
|
|
36371
36371
|
#loaded = false;
|
|
36372
|
-
constructor(process$
|
|
36372
|
+
constructor(process$5) {
|
|
36373
36373
|
super();
|
|
36374
|
-
this.#process = process$
|
|
36374
|
+
this.#process = process$5;
|
|
36375
36375
|
this.#sigListeners = {};
|
|
36376
36376
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
36377
36377
|
const listeners = this.#process.listeners(sig);
|
|
36378
36378
|
let { count: count$1 } = this.#emitter;
|
|
36379
36379
|
/* c8 ignore start */
|
|
36380
|
-
const p$1 = process$
|
|
36380
|
+
const p$1 = process$5;
|
|
36381
36381
|
if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
|
|
36382
36382
|
/* c8 ignore stop */
|
|
36383
36383
|
if (listeners.length === count$1) {
|
|
@@ -36385,11 +36385,11 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36385
36385
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
36386
36386
|
/* c8 ignore start */
|
|
36387
36387
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
36388
|
-
if (!ret) process$
|
|
36388
|
+
if (!ret) process$5.kill(process$5.pid, s);
|
|
36389
36389
|
}
|
|
36390
36390
|
};
|
|
36391
|
-
this.#originalProcessReallyExit = process$
|
|
36392
|
-
this.#originalProcessEmit = process$
|
|
36391
|
+
this.#originalProcessReallyExit = process$5.reallyExit;
|
|
36392
|
+
this.#originalProcessEmit = process$5.emit;
|
|
36393
36393
|
}
|
|
36394
36394
|
onExit(cb, opts) {
|
|
36395
36395
|
/* c8 ignore start */
|
|
@@ -36456,8 +36456,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36456
36456
|
} else return og.call(this.#process, ev, ...args);
|
|
36457
36457
|
}
|
|
36458
36458
|
};
|
|
36459
|
-
const process$
|
|
36460
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$
|
|
36459
|
+
const process$2 = globalThis.process;
|
|
36460
|
+
const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
|
|
36461
36461
|
|
|
36462
36462
|
//#endregion
|
|
36463
36463
|
//#region node_modules/execa/lib/terminate/cleanup.js
|
|
@@ -38342,6 +38342,559 @@ const createCommand = new Command("create").description("Create a new Base44 pro
|
|
|
38342
38342
|
await chooseCreate(options);
|
|
38343
38343
|
});
|
|
38344
38344
|
|
|
38345
|
+
//#endregion
|
|
38346
|
+
//#region node_modules/is-docker/index.js
|
|
38347
|
+
let isDockerCached;
|
|
38348
|
+
function hasDockerEnv() {
|
|
38349
|
+
try {
|
|
38350
|
+
fs.statSync("/.dockerenv");
|
|
38351
|
+
return true;
|
|
38352
|
+
} catch {
|
|
38353
|
+
return false;
|
|
38354
|
+
}
|
|
38355
|
+
}
|
|
38356
|
+
function hasDockerCGroup() {
|
|
38357
|
+
try {
|
|
38358
|
+
return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
38359
|
+
} catch {
|
|
38360
|
+
return false;
|
|
38361
|
+
}
|
|
38362
|
+
}
|
|
38363
|
+
function isDocker() {
|
|
38364
|
+
if (isDockerCached === void 0) isDockerCached = hasDockerEnv() || hasDockerCGroup();
|
|
38365
|
+
return isDockerCached;
|
|
38366
|
+
}
|
|
38367
|
+
|
|
38368
|
+
//#endregion
|
|
38369
|
+
//#region node_modules/is-inside-container/index.js
|
|
38370
|
+
let cachedResult;
|
|
38371
|
+
const hasContainerEnv = () => {
|
|
38372
|
+
try {
|
|
38373
|
+
fs.statSync("/run/.containerenv");
|
|
38374
|
+
return true;
|
|
38375
|
+
} catch {
|
|
38376
|
+
return false;
|
|
38377
|
+
}
|
|
38378
|
+
};
|
|
38379
|
+
function isInsideContainer() {
|
|
38380
|
+
if (cachedResult === void 0) cachedResult = hasContainerEnv() || isDocker();
|
|
38381
|
+
return cachedResult;
|
|
38382
|
+
}
|
|
38383
|
+
|
|
38384
|
+
//#endregion
|
|
38385
|
+
//#region node_modules/is-wsl/index.js
|
|
38386
|
+
const isWsl = () => {
|
|
38387
|
+
if (process$1.platform !== "linux") return false;
|
|
38388
|
+
if (os.release().toLowerCase().includes("microsoft")) {
|
|
38389
|
+
if (isInsideContainer()) return false;
|
|
38390
|
+
return true;
|
|
38391
|
+
}
|
|
38392
|
+
try {
|
|
38393
|
+
return fs.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
|
38394
|
+
} catch {
|
|
38395
|
+
return false;
|
|
38396
|
+
}
|
|
38397
|
+
};
|
|
38398
|
+
var is_wsl_default = process$1.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
38399
|
+
|
|
38400
|
+
//#endregion
|
|
38401
|
+
//#region node_modules/powershell-utils/index.js
|
|
38402
|
+
const execFile$2 = promisify(childProcess.execFile);
|
|
38403
|
+
const powerShellPath$1 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
38404
|
+
const executePowerShell = async (command, options = {}) => {
|
|
38405
|
+
const { powerShellPath: psPath, ...execFileOptions } = options;
|
|
38406
|
+
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
38407
|
+
return execFile$2(psPath ?? powerShellPath$1(), [...executePowerShell.argumentsPrefix, encodedCommand], {
|
|
38408
|
+
encoding: "utf8",
|
|
38409
|
+
...execFileOptions
|
|
38410
|
+
});
|
|
38411
|
+
};
|
|
38412
|
+
executePowerShell.argumentsPrefix = [
|
|
38413
|
+
"-NoProfile",
|
|
38414
|
+
"-NonInteractive",
|
|
38415
|
+
"-ExecutionPolicy",
|
|
38416
|
+
"Bypass",
|
|
38417
|
+
"-EncodedCommand"
|
|
38418
|
+
];
|
|
38419
|
+
executePowerShell.encodeCommand = (command) => Buffer$2.from(command, "utf16le").toString("base64");
|
|
38420
|
+
executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
|
|
38421
|
+
|
|
38422
|
+
//#endregion
|
|
38423
|
+
//#region node_modules/wsl-utils/utilities.js
|
|
38424
|
+
function parseMountPointFromConfig(content) {
|
|
38425
|
+
for (const line of content.split("\n")) {
|
|
38426
|
+
if (/^\s*#/.test(line)) continue;
|
|
38427
|
+
const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
|
|
38428
|
+
if (!match) continue;
|
|
38429
|
+
return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
|
|
38430
|
+
}
|
|
38431
|
+
}
|
|
38432
|
+
|
|
38433
|
+
//#endregion
|
|
38434
|
+
//#region node_modules/wsl-utils/index.js
|
|
38435
|
+
const execFile$1 = promisify(childProcess.execFile);
|
|
38436
|
+
const wslDrivesMountPoint = (() => {
|
|
38437
|
+
const defaultMountPoint = "/mnt/";
|
|
38438
|
+
let mountPoint;
|
|
38439
|
+
return async function() {
|
|
38440
|
+
if (mountPoint) return mountPoint;
|
|
38441
|
+
const configFilePath = "/etc/wsl.conf";
|
|
38442
|
+
let isConfigFileExists = false;
|
|
38443
|
+
try {
|
|
38444
|
+
await fs$2.access(configFilePath, constants$1.F_OK);
|
|
38445
|
+
isConfigFileExists = true;
|
|
38446
|
+
} catch {}
|
|
38447
|
+
if (!isConfigFileExists) return defaultMountPoint;
|
|
38448
|
+
const parsedMountPoint = parseMountPointFromConfig(await fs$2.readFile(configFilePath, { encoding: "utf8" }));
|
|
38449
|
+
if (parsedMountPoint === void 0) return defaultMountPoint;
|
|
38450
|
+
mountPoint = parsedMountPoint;
|
|
38451
|
+
mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
|
|
38452
|
+
return mountPoint;
|
|
38453
|
+
};
|
|
38454
|
+
})();
|
|
38455
|
+
const powerShellPathFromWsl = async () => {
|
|
38456
|
+
return `${await wslDrivesMountPoint()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
|
|
38457
|
+
};
|
|
38458
|
+
const powerShellPath = is_wsl_default ? powerShellPathFromWsl : powerShellPath$1;
|
|
38459
|
+
let canAccessPowerShellPromise;
|
|
38460
|
+
const canAccessPowerShell = async () => {
|
|
38461
|
+
canAccessPowerShellPromise ??= (async () => {
|
|
38462
|
+
try {
|
|
38463
|
+
const psPath = await powerShellPath();
|
|
38464
|
+
await fs$2.access(psPath, constants$1.X_OK);
|
|
38465
|
+
return true;
|
|
38466
|
+
} catch {
|
|
38467
|
+
return false;
|
|
38468
|
+
}
|
|
38469
|
+
})();
|
|
38470
|
+
return canAccessPowerShellPromise;
|
|
38471
|
+
};
|
|
38472
|
+
const wslDefaultBrowser = async () => {
|
|
38473
|
+
const psPath = await powerShellPath();
|
|
38474
|
+
const { stdout: stdout$1 } = await executePowerShell(String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`, { powerShellPath: psPath });
|
|
38475
|
+
return stdout$1.trim();
|
|
38476
|
+
};
|
|
38477
|
+
const convertWslPathToWindows = async (path$17) => {
|
|
38478
|
+
if (/^[a-z]+:\/\//i.test(path$17)) return path$17;
|
|
38479
|
+
try {
|
|
38480
|
+
const { stdout: stdout$1 } = await execFile$1("wslpath", ["-aw", path$17], { encoding: "utf8" });
|
|
38481
|
+
return stdout$1.trim();
|
|
38482
|
+
} catch {
|
|
38483
|
+
return path$17;
|
|
38484
|
+
}
|
|
38485
|
+
};
|
|
38486
|
+
|
|
38487
|
+
//#endregion
|
|
38488
|
+
//#region node_modules/define-lazy-prop/index.js
|
|
38489
|
+
function defineLazyProperty(object$1, propertyName, valueGetter) {
|
|
38490
|
+
const define$1 = (value) => Object.defineProperty(object$1, propertyName, {
|
|
38491
|
+
value,
|
|
38492
|
+
enumerable: true,
|
|
38493
|
+
writable: true
|
|
38494
|
+
});
|
|
38495
|
+
Object.defineProperty(object$1, propertyName, {
|
|
38496
|
+
configurable: true,
|
|
38497
|
+
enumerable: true,
|
|
38498
|
+
get() {
|
|
38499
|
+
const result = valueGetter();
|
|
38500
|
+
define$1(result);
|
|
38501
|
+
return result;
|
|
38502
|
+
},
|
|
38503
|
+
set(value) {
|
|
38504
|
+
define$1(value);
|
|
38505
|
+
}
|
|
38506
|
+
});
|
|
38507
|
+
return object$1;
|
|
38508
|
+
}
|
|
38509
|
+
|
|
38510
|
+
//#endregion
|
|
38511
|
+
//#region node_modules/default-browser-id/index.js
|
|
38512
|
+
const execFileAsync$3 = promisify(execFile);
|
|
38513
|
+
async function defaultBrowserId() {
|
|
38514
|
+
if (process$1.platform !== "darwin") throw new Error("macOS only");
|
|
38515
|
+
const { stdout: stdout$1 } = await execFileAsync$3("defaults", [
|
|
38516
|
+
"read",
|
|
38517
|
+
"com.apple.LaunchServices/com.apple.launchservices.secure",
|
|
38518
|
+
"LSHandlers"
|
|
38519
|
+
]);
|
|
38520
|
+
const browserId = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout$1)?.groups.id ?? "com.apple.Safari";
|
|
38521
|
+
if (browserId === "com.apple.safari") return "com.apple.Safari";
|
|
38522
|
+
return browserId;
|
|
38523
|
+
}
|
|
38524
|
+
|
|
38525
|
+
//#endregion
|
|
38526
|
+
//#region node_modules/run-applescript/index.js
|
|
38527
|
+
const execFileAsync$2 = promisify(execFile);
|
|
38528
|
+
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
38529
|
+
if (process$1.platform !== "darwin") throw new Error("macOS only");
|
|
38530
|
+
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
38531
|
+
const execOptions = {};
|
|
38532
|
+
if (signal) execOptions.signal = signal;
|
|
38533
|
+
const { stdout: stdout$1 } = await execFileAsync$2("osascript", [
|
|
38534
|
+
"-e",
|
|
38535
|
+
script,
|
|
38536
|
+
outputArguments
|
|
38537
|
+
], execOptions);
|
|
38538
|
+
return stdout$1.trim();
|
|
38539
|
+
}
|
|
38540
|
+
|
|
38541
|
+
//#endregion
|
|
38542
|
+
//#region node_modules/bundle-name/index.js
|
|
38543
|
+
async function bundleName(bundleId) {
|
|
38544
|
+
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")`);
|
|
38545
|
+
}
|
|
38546
|
+
|
|
38547
|
+
//#endregion
|
|
38548
|
+
//#region node_modules/default-browser/windows.js
|
|
38549
|
+
const execFileAsync$1 = promisify(execFile);
|
|
38550
|
+
const windowsBrowserProgIds = {
|
|
38551
|
+
MSEdgeHTM: {
|
|
38552
|
+
name: "Edge",
|
|
38553
|
+
id: "com.microsoft.edge"
|
|
38554
|
+
},
|
|
38555
|
+
MSEdgeBHTML: {
|
|
38556
|
+
name: "Edge Beta",
|
|
38557
|
+
id: "com.microsoft.edge.beta"
|
|
38558
|
+
},
|
|
38559
|
+
MSEdgeDHTML: {
|
|
38560
|
+
name: "Edge Dev",
|
|
38561
|
+
id: "com.microsoft.edge.dev"
|
|
38562
|
+
},
|
|
38563
|
+
AppXq0fevzme2pys62n3e0fbqa7peapykr8v: {
|
|
38564
|
+
name: "Edge",
|
|
38565
|
+
id: "com.microsoft.edge.old"
|
|
38566
|
+
},
|
|
38567
|
+
ChromeHTML: {
|
|
38568
|
+
name: "Chrome",
|
|
38569
|
+
id: "com.google.chrome"
|
|
38570
|
+
},
|
|
38571
|
+
ChromeBHTML: {
|
|
38572
|
+
name: "Chrome Beta",
|
|
38573
|
+
id: "com.google.chrome.beta"
|
|
38574
|
+
},
|
|
38575
|
+
ChromeDHTML: {
|
|
38576
|
+
name: "Chrome Dev",
|
|
38577
|
+
id: "com.google.chrome.dev"
|
|
38578
|
+
},
|
|
38579
|
+
ChromiumHTM: {
|
|
38580
|
+
name: "Chromium",
|
|
38581
|
+
id: "org.chromium.Chromium"
|
|
38582
|
+
},
|
|
38583
|
+
BraveHTML: {
|
|
38584
|
+
name: "Brave",
|
|
38585
|
+
id: "com.brave.Browser"
|
|
38586
|
+
},
|
|
38587
|
+
BraveBHTML: {
|
|
38588
|
+
name: "Brave Beta",
|
|
38589
|
+
id: "com.brave.Browser.beta"
|
|
38590
|
+
},
|
|
38591
|
+
BraveDHTML: {
|
|
38592
|
+
name: "Brave Dev",
|
|
38593
|
+
id: "com.brave.Browser.dev"
|
|
38594
|
+
},
|
|
38595
|
+
BraveSSHTM: {
|
|
38596
|
+
name: "Brave Nightly",
|
|
38597
|
+
id: "com.brave.Browser.nightly"
|
|
38598
|
+
},
|
|
38599
|
+
FirefoxURL: {
|
|
38600
|
+
name: "Firefox",
|
|
38601
|
+
id: "org.mozilla.firefox"
|
|
38602
|
+
},
|
|
38603
|
+
OperaStable: {
|
|
38604
|
+
name: "Opera",
|
|
38605
|
+
id: "com.operasoftware.Opera"
|
|
38606
|
+
},
|
|
38607
|
+
VivaldiHTM: {
|
|
38608
|
+
name: "Vivaldi",
|
|
38609
|
+
id: "com.vivaldi.Vivaldi"
|
|
38610
|
+
},
|
|
38611
|
+
"IE.HTTP": {
|
|
38612
|
+
name: "Internet Explorer",
|
|
38613
|
+
id: "com.microsoft.ie"
|
|
38614
|
+
}
|
|
38615
|
+
};
|
|
38616
|
+
const _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
|
|
38617
|
+
var UnknownBrowserError = class extends Error {};
|
|
38618
|
+
async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
|
|
38619
|
+
const { stdout: stdout$1 } = await _execFileAsync("reg", [
|
|
38620
|
+
"QUERY",
|
|
38621
|
+
" HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
|
|
38622
|
+
"/v",
|
|
38623
|
+
"ProgId"
|
|
38624
|
+
]);
|
|
38625
|
+
const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout$1);
|
|
38626
|
+
if (!match) throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout$1)}`);
|
|
38627
|
+
const { id } = match.groups;
|
|
38628
|
+
const browser = windowsBrowserProgIds[id];
|
|
38629
|
+
if (!browser) throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
|
|
38630
|
+
return browser;
|
|
38631
|
+
}
|
|
38632
|
+
|
|
38633
|
+
//#endregion
|
|
38634
|
+
//#region node_modules/default-browser/index.js
|
|
38635
|
+
const execFileAsync = promisify(execFile);
|
|
38636
|
+
const titleize = (string$2) => string$2.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x$2) => x$2.toUpperCase());
|
|
38637
|
+
async function defaultBrowser() {
|
|
38638
|
+
if (process$1.platform === "darwin") {
|
|
38639
|
+
const id = await defaultBrowserId();
|
|
38640
|
+
return {
|
|
38641
|
+
name: await bundleName(id),
|
|
38642
|
+
id
|
|
38643
|
+
};
|
|
38644
|
+
}
|
|
38645
|
+
if (process$1.platform === "linux") {
|
|
38646
|
+
const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
|
|
38647
|
+
"query",
|
|
38648
|
+
"default",
|
|
38649
|
+
"x-scheme-handler/http"
|
|
38650
|
+
]);
|
|
38651
|
+
const id = stdout$1.trim();
|
|
38652
|
+
return {
|
|
38653
|
+
name: titleize(id.replace(/.desktop$/, "").replace("-", " ")),
|
|
38654
|
+
id
|
|
38655
|
+
};
|
|
38656
|
+
}
|
|
38657
|
+
if (process$1.platform === "win32") return defaultBrowser$1();
|
|
38658
|
+
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
38659
|
+
}
|
|
38660
|
+
|
|
38661
|
+
//#endregion
|
|
38662
|
+
//#region node_modules/is-in-ssh/index.js
|
|
38663
|
+
const isInSsh = Boolean(process$1.env.SSH_CONNECTION || process$1.env.SSH_CLIENT || process$1.env.SSH_TTY);
|
|
38664
|
+
var is_in_ssh_default = isInSsh;
|
|
38665
|
+
|
|
38666
|
+
//#endregion
|
|
38667
|
+
//#region node_modules/open/index.js
|
|
38668
|
+
const fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
38669
|
+
const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
|
|
38670
|
+
const localXdgOpenPath = path.join(__dirname, "xdg-open");
|
|
38671
|
+
const { platform: platform$1, arch } = process$1;
|
|
38672
|
+
const tryEachApp = async (apps$1, opener) => {
|
|
38673
|
+
if (apps$1.length === 0) return;
|
|
38674
|
+
const errors = [];
|
|
38675
|
+
for (const app of apps$1) try {
|
|
38676
|
+
return await opener(app);
|
|
38677
|
+
} catch (error) {
|
|
38678
|
+
errors.push(error);
|
|
38679
|
+
}
|
|
38680
|
+
throw new AggregateError(errors, "Failed to open in all supported apps");
|
|
38681
|
+
};
|
|
38682
|
+
const baseOpen = async (options) => {
|
|
38683
|
+
options = {
|
|
38684
|
+
wait: false,
|
|
38685
|
+
background: false,
|
|
38686
|
+
newInstance: false,
|
|
38687
|
+
allowNonzeroExitCode: false,
|
|
38688
|
+
...options
|
|
38689
|
+
};
|
|
38690
|
+
const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
|
|
38691
|
+
delete options[fallbackAttemptSymbol];
|
|
38692
|
+
if (Array.isArray(options.app)) return tryEachApp(options.app, (singleApp) => baseOpen({
|
|
38693
|
+
...options,
|
|
38694
|
+
app: singleApp,
|
|
38695
|
+
[fallbackAttemptSymbol]: true
|
|
38696
|
+
}));
|
|
38697
|
+
let { name: app, arguments: appArguments = [] } = options.app ?? {};
|
|
38698
|
+
appArguments = [...appArguments];
|
|
38699
|
+
if (Array.isArray(app)) return tryEachApp(app, (appName) => baseOpen({
|
|
38700
|
+
...options,
|
|
38701
|
+
app: {
|
|
38702
|
+
name: appName,
|
|
38703
|
+
arguments: appArguments
|
|
38704
|
+
},
|
|
38705
|
+
[fallbackAttemptSymbol]: true
|
|
38706
|
+
}));
|
|
38707
|
+
if (app === "browser" || app === "browserPrivate") {
|
|
38708
|
+
const ids = {
|
|
38709
|
+
"com.google.chrome": "chrome",
|
|
38710
|
+
"google-chrome.desktop": "chrome",
|
|
38711
|
+
"com.brave.browser": "brave",
|
|
38712
|
+
"org.mozilla.firefox": "firefox",
|
|
38713
|
+
"firefox.desktop": "firefox",
|
|
38714
|
+
"com.microsoft.msedge": "edge",
|
|
38715
|
+
"com.microsoft.edge": "edge",
|
|
38716
|
+
"com.microsoft.edgemac": "edge",
|
|
38717
|
+
"microsoft-edge.desktop": "edge",
|
|
38718
|
+
"com.apple.safari": "safari"
|
|
38719
|
+
};
|
|
38720
|
+
const flags = {
|
|
38721
|
+
chrome: "--incognito",
|
|
38722
|
+
brave: "--incognito",
|
|
38723
|
+
firefox: "--private-window",
|
|
38724
|
+
edge: "--inPrivate"
|
|
38725
|
+
};
|
|
38726
|
+
let browser;
|
|
38727
|
+
if (is_wsl_default) {
|
|
38728
|
+
const progId = await wslDefaultBrowser();
|
|
38729
|
+
browser = _windowsBrowserProgIdMap.get(progId) ?? {};
|
|
38730
|
+
} else browser = await defaultBrowser();
|
|
38731
|
+
if (browser.id in ids) {
|
|
38732
|
+
const browserName = ids[browser.id.toLowerCase()];
|
|
38733
|
+
if (app === "browserPrivate") {
|
|
38734
|
+
if (browserName === "safari") throw new Error("Safari doesn't support opening in private mode via command line");
|
|
38735
|
+
appArguments.push(flags[browserName]);
|
|
38736
|
+
}
|
|
38737
|
+
return baseOpen({
|
|
38738
|
+
...options,
|
|
38739
|
+
app: {
|
|
38740
|
+
name: apps[browserName],
|
|
38741
|
+
arguments: appArguments
|
|
38742
|
+
}
|
|
38743
|
+
});
|
|
38744
|
+
}
|
|
38745
|
+
throw new Error(`${browser.name} is not supported as a default browser`);
|
|
38746
|
+
}
|
|
38747
|
+
let command;
|
|
38748
|
+
const cliArguments = [];
|
|
38749
|
+
const childProcessOptions = {};
|
|
38750
|
+
let shouldUseWindowsInWsl = false;
|
|
38751
|
+
if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) shouldUseWindowsInWsl = await canAccessPowerShell();
|
|
38752
|
+
if (platform$1 === "darwin") {
|
|
38753
|
+
command = "open";
|
|
38754
|
+
if (options.wait) cliArguments.push("--wait-apps");
|
|
38755
|
+
if (options.background) cliArguments.push("--background");
|
|
38756
|
+
if (options.newInstance) cliArguments.push("--new");
|
|
38757
|
+
if (app) cliArguments.push("-a", app);
|
|
38758
|
+
} else if (platform$1 === "win32" || shouldUseWindowsInWsl) {
|
|
38759
|
+
command = await powerShellPath();
|
|
38760
|
+
cliArguments.push(...executePowerShell.argumentsPrefix);
|
|
38761
|
+
if (!is_wsl_default) childProcessOptions.windowsVerbatimArguments = true;
|
|
38762
|
+
if (is_wsl_default && options.target) options.target = await convertWslPathToWindows(options.target);
|
|
38763
|
+
const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
|
|
38764
|
+
if (options.wait) encodedArguments.push("-Wait");
|
|
38765
|
+
if (app) {
|
|
38766
|
+
encodedArguments.push(executePowerShell.escapeArgument(app));
|
|
38767
|
+
if (options.target) appArguments.push(options.target);
|
|
38768
|
+
} else if (options.target) encodedArguments.push(executePowerShell.escapeArgument(options.target));
|
|
38769
|
+
if (appArguments.length > 0) {
|
|
38770
|
+
appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
|
|
38771
|
+
encodedArguments.push("-ArgumentList", appArguments.join(","));
|
|
38772
|
+
}
|
|
38773
|
+
options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
|
|
38774
|
+
if (!options.wait) childProcessOptions.stdio = "ignore";
|
|
38775
|
+
} else {
|
|
38776
|
+
if (app) command = app;
|
|
38777
|
+
else {
|
|
38778
|
+
const isBundled = !__dirname || __dirname === "/";
|
|
38779
|
+
let exeLocalXdgOpen = false;
|
|
38780
|
+
try {
|
|
38781
|
+
await fs$2.access(localXdgOpenPath, constants$1.X_OK);
|
|
38782
|
+
exeLocalXdgOpen = true;
|
|
38783
|
+
} catch {}
|
|
38784
|
+
command = process$1.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
|
|
38785
|
+
}
|
|
38786
|
+
if (appArguments.length > 0) cliArguments.push(...appArguments);
|
|
38787
|
+
if (!options.wait) {
|
|
38788
|
+
childProcessOptions.stdio = "ignore";
|
|
38789
|
+
childProcessOptions.detached = true;
|
|
38790
|
+
}
|
|
38791
|
+
}
|
|
38792
|
+
if (platform$1 === "darwin" && appArguments.length > 0) cliArguments.push("--args", ...appArguments);
|
|
38793
|
+
if (options.target) cliArguments.push(options.target);
|
|
38794
|
+
const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
|
|
38795
|
+
if (options.wait) return new Promise((resolve$1, reject) => {
|
|
38796
|
+
subprocess.once("error", reject);
|
|
38797
|
+
subprocess.once("close", (exitCode) => {
|
|
38798
|
+
if (!options.allowNonzeroExitCode && exitCode !== 0) {
|
|
38799
|
+
reject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));
|
|
38800
|
+
return;
|
|
38801
|
+
}
|
|
38802
|
+
resolve$1(subprocess);
|
|
38803
|
+
});
|
|
38804
|
+
});
|
|
38805
|
+
if (isFallbackAttempt) return new Promise((resolve$1, reject) => {
|
|
38806
|
+
subprocess.once("error", reject);
|
|
38807
|
+
subprocess.once("spawn", () => {
|
|
38808
|
+
subprocess.once("close", (exitCode) => {
|
|
38809
|
+
subprocess.off("error", reject);
|
|
38810
|
+
if (exitCode !== 0) {
|
|
38811
|
+
reject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));
|
|
38812
|
+
return;
|
|
38813
|
+
}
|
|
38814
|
+
subprocess.unref();
|
|
38815
|
+
resolve$1(subprocess);
|
|
38816
|
+
});
|
|
38817
|
+
});
|
|
38818
|
+
});
|
|
38819
|
+
subprocess.unref();
|
|
38820
|
+
return new Promise((resolve$1, reject) => {
|
|
38821
|
+
subprocess.once("error", reject);
|
|
38822
|
+
subprocess.once("spawn", () => {
|
|
38823
|
+
subprocess.off("error", reject);
|
|
38824
|
+
resolve$1(subprocess);
|
|
38825
|
+
});
|
|
38826
|
+
});
|
|
38827
|
+
};
|
|
38828
|
+
const open = (target, options) => {
|
|
38829
|
+
if (typeof target !== "string") throw new TypeError("Expected a `target`");
|
|
38830
|
+
return baseOpen({
|
|
38831
|
+
...options,
|
|
38832
|
+
target
|
|
38833
|
+
});
|
|
38834
|
+
};
|
|
38835
|
+
function detectArchBinary(binary) {
|
|
38836
|
+
if (typeof binary === "string" || Array.isArray(binary)) return binary;
|
|
38837
|
+
const { [arch]: archBinary } = binary;
|
|
38838
|
+
if (!archBinary) throw new Error(`${arch} is not supported`);
|
|
38839
|
+
return archBinary;
|
|
38840
|
+
}
|
|
38841
|
+
function detectPlatformBinary({ [platform$1]: platformBinary }, { wsl } = {}) {
|
|
38842
|
+
if (wsl && is_wsl_default) return detectArchBinary(wsl);
|
|
38843
|
+
if (!platformBinary) throw new Error(`${platform$1} is not supported`);
|
|
38844
|
+
return detectArchBinary(platformBinary);
|
|
38845
|
+
}
|
|
38846
|
+
const apps = {
|
|
38847
|
+
browser: "browser",
|
|
38848
|
+
browserPrivate: "browserPrivate"
|
|
38849
|
+
};
|
|
38850
|
+
defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
|
|
38851
|
+
darwin: "google chrome",
|
|
38852
|
+
win32: "chrome",
|
|
38853
|
+
linux: [
|
|
38854
|
+
"google-chrome",
|
|
38855
|
+
"google-chrome-stable",
|
|
38856
|
+
"chromium",
|
|
38857
|
+
"chromium-browser"
|
|
38858
|
+
]
|
|
38859
|
+
}, { wsl: {
|
|
38860
|
+
ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
|
|
38861
|
+
x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
|
|
38862
|
+
} }));
|
|
38863
|
+
defineLazyProperty(apps, "brave", () => detectPlatformBinary({
|
|
38864
|
+
darwin: "brave browser",
|
|
38865
|
+
win32: "brave",
|
|
38866
|
+
linux: ["brave-browser", "brave"]
|
|
38867
|
+
}, { wsl: {
|
|
38868
|
+
ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
|
|
38869
|
+
x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
|
|
38870
|
+
} }));
|
|
38871
|
+
defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
|
|
38872
|
+
darwin: "firefox",
|
|
38873
|
+
win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
|
|
38874
|
+
linux: "firefox"
|
|
38875
|
+
}, { wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe" }));
|
|
38876
|
+
defineLazyProperty(apps, "edge", () => detectPlatformBinary({
|
|
38877
|
+
darwin: "microsoft edge",
|
|
38878
|
+
win32: "msedge",
|
|
38879
|
+
linux: ["microsoft-edge", "microsoft-edge-dev"]
|
|
38880
|
+
}, { wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" }));
|
|
38881
|
+
defineLazyProperty(apps, "safari", () => detectPlatformBinary({ darwin: "Safari" }));
|
|
38882
|
+
var open_default = open;
|
|
38883
|
+
|
|
38884
|
+
//#endregion
|
|
38885
|
+
//#region src/cli/commands/project/dashboard.ts
|
|
38886
|
+
async function openDashboard() {
|
|
38887
|
+
await loadProjectEnv();
|
|
38888
|
+
const projectId = getBase44ClientId();
|
|
38889
|
+
if (!projectId) throw new Error("App not configured. BASE44_CLIENT_ID environment variable is required. Set it in your .env.local file.");
|
|
38890
|
+
const dashboardUrl = `${getBase44ApiUrl()}/apps/${projectId}/editor/workspace/overview`;
|
|
38891
|
+
await open_default(dashboardUrl);
|
|
38892
|
+
return { outroMessage: `Dashboard opened at ${dashboardUrl}` };
|
|
38893
|
+
}
|
|
38894
|
+
const dashboardCommand = new Command("dashboard").description("Open the app dashboard in your browser").action(async () => {
|
|
38895
|
+
await runCommand(openDashboard, { requireAuth: true });
|
|
38896
|
+
});
|
|
38897
|
+
|
|
38345
38898
|
//#endregion
|
|
38346
38899
|
//#region src/cli/commands/site/deploy.ts
|
|
38347
38900
|
async function deployAction(options) {
|
|
@@ -38375,6 +38928,7 @@ program.addCommand(loginCommand);
|
|
|
38375
38928
|
program.addCommand(whoamiCommand);
|
|
38376
38929
|
program.addCommand(logoutCommand);
|
|
38377
38930
|
program.addCommand(createCommand);
|
|
38931
|
+
program.addCommand(dashboardCommand);
|
|
38378
38932
|
program.addCommand(entitiesPushCommand);
|
|
38379
38933
|
program.addCommand(functionsDeployCommand);
|
|
38380
38934
|
program.addCommand(siteDeployCommand);
|