@base44-preview/cli 0.0.21-pr.131.bec5316 → 0.0.22-pr.135.f4b78d8
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 +940 -650
- 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 process$1, { 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$4 = __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$4.stdout.write(str),
|
|
948
|
+
writeErr: (str) => process$4.stderr.write(str),
|
|
949
|
+
getOutHelpWidth: () => process$4.stdout.isTTY ? process$4.stdout.columns : void 0,
|
|
950
|
+
getErrHelpWidth: () => process$4.stderr.isTTY ? process$4.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$4.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$4.versions?.electron) parseOptions.from = "electron";
|
|
1644
|
+
const execArgv$1 = process$4.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$4.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$4.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$4.platform !== "win32") if (launchWithNode) {
|
|
1772
1772
|
args.unshift(executableFile);
|
|
1773
|
-
args = incrementNodeInspectorPort(process$
|
|
1774
|
-
proc$1 = childProcess$1.spawn(process$
|
|
1773
|
+
args = incrementNodeInspectorPort(process$4.execArgv).concat(args);
|
|
1774
|
+
proc$1 = childProcess$1.spawn(process$4.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$4.execArgv).concat(args);
|
|
1779
|
+
proc$1 = childProcess$1.spawn(process$4.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$4.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$4.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$4.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$4.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$4.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$4.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$1) {
|
|
2715
|
+
if (!y$1) return `${CSI}${x$2 + 1}G`;
|
|
2716
|
+
return `${CSI}${y$1 + 1};${x$2 + 1}H`;
|
|
2717
2717
|
},
|
|
2718
|
-
move(x$2, y$
|
|
2718
|
+
move(x$2, y$1) {
|
|
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$1 < 0) ret += `${CSI}${-y$1}A`;
|
|
2723
|
+
else if (y$1 > 0) ret += `${CSI}${y$1}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
|
|
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) => {
|
|
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
|
|
3039
|
+
i$1 ? n$1 === y && (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$1 = "\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
|
|
3081
|
+
const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y})`)).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 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";
|
|
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) {
|
|
@@ -5818,6 +5818,97 @@ function handleTupleResult(result, final, index) {
|
|
|
5818
5818
|
if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
|
|
5819
5819
|
final.value[index] = result.value;
|
|
5820
5820
|
}
|
|
5821
|
+
const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
5822
|
+
$ZodType.init(inst, def);
|
|
5823
|
+
inst._zod.parse = (payload, ctx) => {
|
|
5824
|
+
const input = payload.value;
|
|
5825
|
+
if (!isPlainObject$1(input)) {
|
|
5826
|
+
payload.issues.push({
|
|
5827
|
+
expected: "record",
|
|
5828
|
+
code: "invalid_type",
|
|
5829
|
+
input,
|
|
5830
|
+
inst
|
|
5831
|
+
});
|
|
5832
|
+
return payload;
|
|
5833
|
+
}
|
|
5834
|
+
const proms = [];
|
|
5835
|
+
const values = def.keyType._zod.values;
|
|
5836
|
+
if (values) {
|
|
5837
|
+
payload.value = {};
|
|
5838
|
+
const recordKeys = /* @__PURE__ */ new Set();
|
|
5839
|
+
for (const key of values) if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
5840
|
+
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
5841
|
+
const result = def.valueType._zod.run({
|
|
5842
|
+
value: input[key],
|
|
5843
|
+
issues: []
|
|
5844
|
+
}, ctx);
|
|
5845
|
+
if (result instanceof Promise) proms.push(result.then((result$1) => {
|
|
5846
|
+
if (result$1.issues.length) payload.issues.push(...prefixIssues(key, result$1.issues));
|
|
5847
|
+
payload.value[key] = result$1.value;
|
|
5848
|
+
}));
|
|
5849
|
+
else {
|
|
5850
|
+
if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
|
|
5851
|
+
payload.value[key] = result.value;
|
|
5852
|
+
}
|
|
5853
|
+
}
|
|
5854
|
+
let unrecognized;
|
|
5855
|
+
for (const key in input) if (!recordKeys.has(key)) {
|
|
5856
|
+
unrecognized = unrecognized ?? [];
|
|
5857
|
+
unrecognized.push(key);
|
|
5858
|
+
}
|
|
5859
|
+
if (unrecognized && unrecognized.length > 0) payload.issues.push({
|
|
5860
|
+
code: "unrecognized_keys",
|
|
5861
|
+
input,
|
|
5862
|
+
inst,
|
|
5863
|
+
keys: unrecognized
|
|
5864
|
+
});
|
|
5865
|
+
} else {
|
|
5866
|
+
payload.value = {};
|
|
5867
|
+
for (const key of Reflect.ownKeys(input)) {
|
|
5868
|
+
if (key === "__proto__") continue;
|
|
5869
|
+
let keyResult = def.keyType._zod.run({
|
|
5870
|
+
value: key,
|
|
5871
|
+
issues: []
|
|
5872
|
+
}, ctx);
|
|
5873
|
+
if (keyResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
|
|
5874
|
+
if (typeof key === "string" && number$1.test(key) && keyResult.issues.length && keyResult.issues.some((iss) => iss.code === "invalid_type" && iss.expected === "number")) {
|
|
5875
|
+
const retryResult = def.keyType._zod.run({
|
|
5876
|
+
value: Number(key),
|
|
5877
|
+
issues: []
|
|
5878
|
+
}, ctx);
|
|
5879
|
+
if (retryResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
|
|
5880
|
+
if (retryResult.issues.length === 0) keyResult = retryResult;
|
|
5881
|
+
}
|
|
5882
|
+
if (keyResult.issues.length) {
|
|
5883
|
+
if (def.mode === "loose") payload.value[key] = input[key];
|
|
5884
|
+
else payload.issues.push({
|
|
5885
|
+
code: "invalid_key",
|
|
5886
|
+
origin: "record",
|
|
5887
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
5888
|
+
input: key,
|
|
5889
|
+
path: [key],
|
|
5890
|
+
inst
|
|
5891
|
+
});
|
|
5892
|
+
continue;
|
|
5893
|
+
}
|
|
5894
|
+
const result = def.valueType._zod.run({
|
|
5895
|
+
value: input[key],
|
|
5896
|
+
issues: []
|
|
5897
|
+
}, ctx);
|
|
5898
|
+
if (result instanceof Promise) proms.push(result.then((result$1) => {
|
|
5899
|
+
if (result$1.issues.length) payload.issues.push(...prefixIssues(key, result$1.issues));
|
|
5900
|
+
payload.value[keyResult.value] = result$1.value;
|
|
5901
|
+
}));
|
|
5902
|
+
else {
|
|
5903
|
+
if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
|
|
5904
|
+
payload.value[keyResult.value] = result.value;
|
|
5905
|
+
}
|
|
5906
|
+
}
|
|
5907
|
+
}
|
|
5908
|
+
if (proms.length) return Promise.all(proms).then(() => payload);
|
|
5909
|
+
return payload;
|
|
5910
|
+
};
|
|
5911
|
+
});
|
|
5821
5912
|
const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
5822
5913
|
$ZodType.init(inst, def);
|
|
5823
5914
|
const values = getEnumValues(def.entries);
|
|
@@ -6653,7 +6744,7 @@ function initializeContext(params) {
|
|
|
6653
6744
|
external: params?.external ?? void 0
|
|
6654
6745
|
};
|
|
6655
6746
|
}
|
|
6656
|
-
function process$
|
|
6747
|
+
function process$3(schema, ctx, _params = {
|
|
6657
6748
|
path: [],
|
|
6658
6749
|
schemaPath: []
|
|
6659
6750
|
}) {
|
|
@@ -6690,7 +6781,7 @@ function process$2(schema, ctx, _params = {
|
|
|
6690
6781
|
const parent = schema._zod.parent;
|
|
6691
6782
|
if (parent) {
|
|
6692
6783
|
if (!result.ref) result.ref = parent;
|
|
6693
|
-
process$
|
|
6784
|
+
process$3(parent, ctx, params);
|
|
6694
6785
|
ctx.seen.get(parent).isParent = true;
|
|
6695
6786
|
}
|
|
6696
6787
|
}
|
|
@@ -6902,7 +6993,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
6902
6993
|
...params,
|
|
6903
6994
|
processors
|
|
6904
6995
|
});
|
|
6905
|
-
process$
|
|
6996
|
+
process$3(schema, ctx);
|
|
6906
6997
|
extractDefs(ctx, schema);
|
|
6907
6998
|
return finalize(ctx, schema);
|
|
6908
6999
|
};
|
|
@@ -6914,7 +7005,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
6914
7005
|
io,
|
|
6915
7006
|
processors
|
|
6916
7007
|
});
|
|
6917
|
-
process$
|
|
7008
|
+
process$3(schema, ctx);
|
|
6918
7009
|
extractDefs(ctx, schema);
|
|
6919
7010
|
return finalize(ctx, schema);
|
|
6920
7011
|
};
|
|
@@ -7001,7 +7092,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
7001
7092
|
if (typeof minimum === "number") json.minItems = minimum;
|
|
7002
7093
|
if (typeof maximum === "number") json.maxItems = maximum;
|
|
7003
7094
|
json.type = "array";
|
|
7004
|
-
json.items = process$
|
|
7095
|
+
json.items = process$3(def.element, ctx, {
|
|
7005
7096
|
...params,
|
|
7006
7097
|
path: [...params.path, "items"]
|
|
7007
7098
|
});
|
|
@@ -7012,7 +7103,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7012
7103
|
json.type = "object";
|
|
7013
7104
|
json.properties = {};
|
|
7014
7105
|
const shape = def.shape;
|
|
7015
|
-
for (const key in shape) json.properties[key] = process$
|
|
7106
|
+
for (const key in shape) json.properties[key] = process$3(shape[key], ctx, {
|
|
7016
7107
|
...params,
|
|
7017
7108
|
path: [
|
|
7018
7109
|
...params.path,
|
|
@@ -7030,7 +7121,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7030
7121
|
if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
|
|
7031
7122
|
else if (!def.catchall) {
|
|
7032
7123
|
if (ctx.io === "output") json.additionalProperties = false;
|
|
7033
|
-
} else if (def.catchall) json.additionalProperties = process$
|
|
7124
|
+
} else if (def.catchall) json.additionalProperties = process$3(def.catchall, ctx, {
|
|
7034
7125
|
...params,
|
|
7035
7126
|
path: [...params.path, "additionalProperties"]
|
|
7036
7127
|
});
|
|
@@ -7038,7 +7129,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7038
7129
|
const unionProcessor = (schema, ctx, json, params) => {
|
|
7039
7130
|
const def = schema._zod.def;
|
|
7040
7131
|
const isExclusive = def.inclusive === false;
|
|
7041
|
-
const options = def.options.map((x$2, i$1) => process$
|
|
7132
|
+
const options = def.options.map((x$2, i$1) => process$3(x$2, ctx, {
|
|
7042
7133
|
...params,
|
|
7043
7134
|
path: [
|
|
7044
7135
|
...params.path,
|
|
@@ -7051,7 +7142,7 @@ const unionProcessor = (schema, ctx, json, params) => {
|
|
|
7051
7142
|
};
|
|
7052
7143
|
const intersectionProcessor = (schema, ctx, json, params) => {
|
|
7053
7144
|
const def = schema._zod.def;
|
|
7054
|
-
const a$1 = process$
|
|
7145
|
+
const a$1 = process$3(def.left, ctx, {
|
|
7055
7146
|
...params,
|
|
7056
7147
|
path: [
|
|
7057
7148
|
...params.path,
|
|
@@ -7059,7 +7150,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
|
|
|
7059
7150
|
0
|
|
7060
7151
|
]
|
|
7061
7152
|
});
|
|
7062
|
-
const b$2 = process$
|
|
7153
|
+
const b$2 = process$3(def.right, ctx, {
|
|
7063
7154
|
...params,
|
|
7064
7155
|
path: [
|
|
7065
7156
|
...params.path,
|
|
@@ -7076,7 +7167,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7076
7167
|
json.type = "array";
|
|
7077
7168
|
const prefixPath$1 = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
7078
7169
|
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
7079
|
-
const prefixItems = def.items.map((x$2, i$1) => process$
|
|
7170
|
+
const prefixItems = def.items.map((x$2, i$1) => process$3(x$2, ctx, {
|
|
7080
7171
|
...params,
|
|
7081
7172
|
path: [
|
|
7082
7173
|
...params.path,
|
|
@@ -7084,7 +7175,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7084
7175
|
i$1
|
|
7085
7176
|
]
|
|
7086
7177
|
}));
|
|
7087
|
-
const rest = def.rest ? process$
|
|
7178
|
+
const rest = def.rest ? process$3(def.rest, ctx, {
|
|
7088
7179
|
...params,
|
|
7089
7180
|
path: [
|
|
7090
7181
|
...params.path,
|
|
@@ -7108,9 +7199,42 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7108
7199
|
if (typeof minimum === "number") json.minItems = minimum;
|
|
7109
7200
|
if (typeof maximum === "number") json.maxItems = maximum;
|
|
7110
7201
|
};
|
|
7202
|
+
const recordProcessor = (schema, ctx, _json, params) => {
|
|
7203
|
+
const json = _json;
|
|
7204
|
+
const def = schema._zod.def;
|
|
7205
|
+
json.type = "object";
|
|
7206
|
+
const keyType = def.keyType;
|
|
7207
|
+
const patterns = keyType._zod.bag?.patterns;
|
|
7208
|
+
if (def.mode === "loose" && patterns && patterns.size > 0) {
|
|
7209
|
+
const valueSchema = process$3(def.valueType, ctx, {
|
|
7210
|
+
...params,
|
|
7211
|
+
path: [
|
|
7212
|
+
...params.path,
|
|
7213
|
+
"patternProperties",
|
|
7214
|
+
"*"
|
|
7215
|
+
]
|
|
7216
|
+
});
|
|
7217
|
+
json.patternProperties = {};
|
|
7218
|
+
for (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;
|
|
7219
|
+
} else {
|
|
7220
|
+
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$3(def.keyType, ctx, {
|
|
7221
|
+
...params,
|
|
7222
|
+
path: [...params.path, "propertyNames"]
|
|
7223
|
+
});
|
|
7224
|
+
json.additionalProperties = process$3(def.valueType, ctx, {
|
|
7225
|
+
...params,
|
|
7226
|
+
path: [...params.path, "additionalProperties"]
|
|
7227
|
+
});
|
|
7228
|
+
}
|
|
7229
|
+
const keyValues = keyType._zod.values;
|
|
7230
|
+
if (keyValues) {
|
|
7231
|
+
const validKeyValues = [...keyValues].filter((v$1) => typeof v$1 === "string" || typeof v$1 === "number");
|
|
7232
|
+
if (validKeyValues.length > 0) json.required = validKeyValues;
|
|
7233
|
+
}
|
|
7234
|
+
};
|
|
7111
7235
|
const nullableProcessor = (schema, ctx, json, params) => {
|
|
7112
7236
|
const def = schema._zod.def;
|
|
7113
|
-
const inner = process$
|
|
7237
|
+
const inner = process$3(def.innerType, ctx, params);
|
|
7114
7238
|
const seen = ctx.seen.get(schema);
|
|
7115
7239
|
if (ctx.target === "openapi-3.0") {
|
|
7116
7240
|
seen.ref = def.innerType;
|
|
@@ -7119,27 +7243,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
|
|
|
7119
7243
|
};
|
|
7120
7244
|
const nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
7121
7245
|
const def = schema._zod.def;
|
|
7122
|
-
process$
|
|
7246
|
+
process$3(def.innerType, ctx, params);
|
|
7123
7247
|
const seen = ctx.seen.get(schema);
|
|
7124
7248
|
seen.ref = def.innerType;
|
|
7125
7249
|
};
|
|
7126
7250
|
const defaultProcessor = (schema, ctx, json, params) => {
|
|
7127
7251
|
const def = schema._zod.def;
|
|
7128
|
-
process$
|
|
7252
|
+
process$3(def.innerType, ctx, params);
|
|
7129
7253
|
const seen = ctx.seen.get(schema);
|
|
7130
7254
|
seen.ref = def.innerType;
|
|
7131
7255
|
json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7132
7256
|
};
|
|
7133
7257
|
const prefaultProcessor = (schema, ctx, json, params) => {
|
|
7134
7258
|
const def = schema._zod.def;
|
|
7135
|
-
process$
|
|
7259
|
+
process$3(def.innerType, ctx, params);
|
|
7136
7260
|
const seen = ctx.seen.get(schema);
|
|
7137
7261
|
seen.ref = def.innerType;
|
|
7138
7262
|
if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7139
7263
|
};
|
|
7140
7264
|
const catchProcessor = (schema, ctx, json, params) => {
|
|
7141
7265
|
const def = schema._zod.def;
|
|
7142
|
-
process$
|
|
7266
|
+
process$3(def.innerType, ctx, params);
|
|
7143
7267
|
const seen = ctx.seen.get(schema);
|
|
7144
7268
|
seen.ref = def.innerType;
|
|
7145
7269
|
let catchValue;
|
|
@@ -7153,20 +7277,20 @@ const catchProcessor = (schema, ctx, json, params) => {
|
|
|
7153
7277
|
const pipeProcessor = (schema, ctx, _json, params) => {
|
|
7154
7278
|
const def = schema._zod.def;
|
|
7155
7279
|
const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
7156
|
-
process$
|
|
7280
|
+
process$3(innerType, ctx, params);
|
|
7157
7281
|
const seen = ctx.seen.get(schema);
|
|
7158
7282
|
seen.ref = innerType;
|
|
7159
7283
|
};
|
|
7160
7284
|
const readonlyProcessor = (schema, ctx, json, params) => {
|
|
7161
7285
|
const def = schema._zod.def;
|
|
7162
|
-
process$
|
|
7286
|
+
process$3(def.innerType, ctx, params);
|
|
7163
7287
|
const seen = ctx.seen.get(schema);
|
|
7164
7288
|
seen.ref = def.innerType;
|
|
7165
7289
|
json.readOnly = true;
|
|
7166
7290
|
};
|
|
7167
7291
|
const optionalProcessor = (schema, ctx, _json, params) => {
|
|
7168
7292
|
const def = schema._zod.def;
|
|
7169
|
-
process$
|
|
7293
|
+
process$3(def.innerType, ctx, params);
|
|
7170
7294
|
const seen = ctx.seen.get(schema);
|
|
7171
7295
|
seen.ref = def.innerType;
|
|
7172
7296
|
};
|
|
@@ -7637,6 +7761,21 @@ function tuple(items, _paramsOrRest, _params) {
|
|
|
7637
7761
|
...normalizeParams(params)
|
|
7638
7762
|
});
|
|
7639
7763
|
}
|
|
7764
|
+
const ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
7765
|
+
$ZodRecord.init(inst, def);
|
|
7766
|
+
ZodType.init(inst, def);
|
|
7767
|
+
inst._zod.processJSONSchema = (ctx, json, params) => recordProcessor(inst, ctx, json, params);
|
|
7768
|
+
inst.keyType = def.keyType;
|
|
7769
|
+
inst.valueType = def.valueType;
|
|
7770
|
+
});
|
|
7771
|
+
function record(keyType, valueType, params) {
|
|
7772
|
+
return new ZodRecord({
|
|
7773
|
+
type: "record",
|
|
7774
|
+
keyType,
|
|
7775
|
+
valueType,
|
|
7776
|
+
...normalizeParams(params)
|
|
7777
|
+
});
|
|
7778
|
+
}
|
|
7640
7779
|
const ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
|
|
7641
7780
|
$ZodEnum.init(inst, def);
|
|
7642
7781
|
ZodType.init(inst, def);
|
|
@@ -7903,6 +8042,7 @@ var AuthValidationError = class extends Error {
|
|
|
7903
8042
|
//#endregion
|
|
7904
8043
|
//#region src/core/consts.ts
|
|
7905
8044
|
const PROJECT_SUBDIR = "base44";
|
|
8045
|
+
const CONFIG_FILE_EXTENSION = "jsonc";
|
|
7906
8046
|
const CONFIG_FILE_EXTENSION_GLOB = "{json,jsonc}";
|
|
7907
8047
|
const FUNCTION_CONFIG_FILE = `function.${CONFIG_FILE_EXTENSION_GLOB}`;
|
|
7908
8048
|
const APP_CONFIG_PATTERN = `**/.app.${CONFIG_FILE_EXTENSION_GLOB}`;
|
|
@@ -16195,7 +16335,7 @@ const createIgnorePredicate = (patterns, cwd, baseDir) => {
|
|
|
16195
16335
|
};
|
|
16196
16336
|
const normalizeOptions$2 = (options = {}) => {
|
|
16197
16337
|
const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
|
|
16198
|
-
const cwd = toPath$1(options.cwd) ??
|
|
16338
|
+
const cwd = toPath$1(options.cwd) ?? process$1.cwd();
|
|
16199
16339
|
const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
|
|
16200
16340
|
return {
|
|
16201
16341
|
cwd,
|
|
@@ -16292,7 +16432,7 @@ const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
|
16292
16432
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
16293
16433
|
return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
16294
16434
|
};
|
|
16295
|
-
const directoryToGlob = async (directoryPaths, { cwd =
|
|
16435
|
+
const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => {
|
|
16296
16436
|
return (await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
16297
16437
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16298
16438
|
directoryPath,
|
|
@@ -16306,7 +16446,7 @@ const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extension
|
|
|
16306
16446
|
}) : directoryPath;
|
|
16307
16447
|
}))).flat();
|
|
16308
16448
|
};
|
|
16309
|
-
const directoryToGlobSync = (directoryPaths, { cwd =
|
|
16449
|
+
const directoryToGlobSync = (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
|
|
16310
16450
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16311
16451
|
directoryPath,
|
|
16312
16452
|
files,
|
|
@@ -16402,7 +16542,7 @@ const applyIgnoreFilesAndGetFilterSync = (options) => {
|
|
|
16402
16542
|
};
|
|
16403
16543
|
const createFilterFunction = (isIgnored, cwd) => {
|
|
16404
16544
|
const seen = /* @__PURE__ */ new Set();
|
|
16405
|
-
const basePath = cwd ||
|
|
16545
|
+
const basePath = cwd || process$1.cwd();
|
|
16406
16546
|
const pathCache = /* @__PURE__ */ new Map();
|
|
16407
16547
|
return (fastGlobResult) => {
|
|
16408
16548
|
const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
@@ -16537,9 +16677,7 @@ const SyncEntitiesResponseSchema = object({
|
|
|
16537
16677
|
//#region src/core/resources/entity/config.ts
|
|
16538
16678
|
async function readEntityFile(entityPath) {
|
|
16539
16679
|
const parsed = await readJsonFile(entityPath);
|
|
16540
|
-
|
|
16541
|
-
if (!result.success) throw new Error(`Invalid entity configuration in ${entityPath}: ${result.error.issues.map((e$1) => e$1.message).join(", ")}`);
|
|
16542
|
-
return result.data;
|
|
16680
|
+
return EntitySchema.parse(parsed);
|
|
16543
16681
|
}
|
|
16544
16682
|
async function readAllEntities(entitiesDir) {
|
|
16545
16683
|
if (!await pathExists(entitiesDir)) return [];
|
|
@@ -16555,16 +16693,13 @@ async function readAllEntities(entitiesDir) {
|
|
|
16555
16693
|
async function syncEntities(entities) {
|
|
16556
16694
|
const appClient = getAppClient();
|
|
16557
16695
|
const schemaSyncPayload = Object.fromEntries(entities.map((entity) => [entity.name, entity]));
|
|
16558
|
-
|
|
16559
|
-
json: { entityNameToSchema: schemaSyncPayload }
|
|
16560
|
-
|
|
16561
|
-
})
|
|
16562
|
-
|
|
16563
|
-
|
|
16564
|
-
if (response.status === 428) throw new Error(`Failed to delete entity: ${errorJson.message}`);
|
|
16565
|
-
throw new Error(`Error occurred while syncing entities ${errorJson.message}`);
|
|
16696
|
+
try {
|
|
16697
|
+
const response = await appClient.put("entity-schemas", { json: { entityNameToSchema: schemaSyncPayload } });
|
|
16698
|
+
return SyncEntitiesResponseSchema.parse(await response.json());
|
|
16699
|
+
} catch (error) {
|
|
16700
|
+
if (error instanceof HTTPError && error.response.status === 428) throw new Error(`Failed to delete entity: ${error instanceof Error ? error.message : String(error)}`);
|
|
16701
|
+
throw new Error(`Error occurred while syncing entities: ${error instanceof Error ? error.message : String(error)}`);
|
|
16566
16702
|
}
|
|
16567
|
-
return SyncEntitiesResponseSchema.parse(await response.json());
|
|
16568
16703
|
}
|
|
16569
16704
|
|
|
16570
16705
|
//#endregion
|
|
@@ -16602,517 +16737,8 @@ const DeployFunctionsResponseSchema = object({
|
|
|
16602
16737
|
})).nullable()
|
|
16603
16738
|
});
|
|
16604
16739
|
|
|
16605
|
-
//#endregion
|
|
16606
|
-
//#region node_modules/lodash.kebabcase/index.js
|
|
16607
|
-
var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16608
|
-
/**
|
|
16609
|
-
* lodash (Custom Build) <https://lodash.com/>
|
|
16610
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
16611
|
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
16612
|
-
* Released under MIT license <https://lodash.com/license>
|
|
16613
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
16614
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
16615
|
-
*/
|
|
16616
|
-
/** Used as references for various `Number` constants. */
|
|
16617
|
-
var INFINITY = Infinity;
|
|
16618
|
-
/** `Object#toString` result references. */
|
|
16619
|
-
var symbolTag = "[object Symbol]";
|
|
16620
|
-
/** Used to match words composed of alphanumeric characters. */
|
|
16621
|
-
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
16622
|
-
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
16623
|
-
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
16624
|
-
/** Used to compose unicode character classes. */
|
|
16625
|
-
var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23", rsComboSymbolsRange = "\\u20d0-\\u20f0", rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
16626
|
-
/** Used to compose unicode capture groups. */
|
|
16627
|
-
var rsApos = "['’]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsModifier = "(?:" + rsCombo + "|\\ud83c[\\udffb-\\udfff])", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
|
|
16628
|
-
/** Used to compose unicode regexes. */
|
|
16629
|
-
var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")", rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [
|
|
16630
|
-
rsNonAstral,
|
|
16631
|
-
rsRegional,
|
|
16632
|
-
rsSurrPair
|
|
16633
|
-
].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [
|
|
16634
|
-
rsDingbat,
|
|
16635
|
-
rsRegional,
|
|
16636
|
-
rsSurrPair
|
|
16637
|
-
].join("|") + ")" + rsSeq;
|
|
16638
|
-
/** Used to match apostrophes. */
|
|
16639
|
-
var reApos = RegExp(rsApos, "g");
|
|
16640
|
-
/**
|
|
16641
|
-
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
16642
|
-
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
16643
|
-
*/
|
|
16644
|
-
var reComboMark = RegExp(rsCombo, "g");
|
|
16645
|
-
/** Used to match complex or compound words. */
|
|
16646
|
-
var reUnicodeWord = RegExp([
|
|
16647
|
-
rsUpper + "?" + rsLower + "+" + rsOptLowerContr + "(?=" + [
|
|
16648
|
-
rsBreak,
|
|
16649
|
-
rsUpper,
|
|
16650
|
-
"$"
|
|
16651
|
-
].join("|") + ")",
|
|
16652
|
-
rsUpperMisc + "+" + rsOptUpperContr + "(?=" + [
|
|
16653
|
-
rsBreak,
|
|
16654
|
-
rsUpper + rsLowerMisc,
|
|
16655
|
-
"$"
|
|
16656
|
-
].join("|") + ")",
|
|
16657
|
-
rsUpper + "?" + rsLowerMisc + "+" + rsOptLowerContr,
|
|
16658
|
-
rsUpper + "+" + rsOptUpperContr,
|
|
16659
|
-
rsDigits,
|
|
16660
|
-
rsEmoji
|
|
16661
|
-
].join("|"), "g");
|
|
16662
|
-
/** Used to detect strings that need a more robust regexp to match words. */
|
|
16663
|
-
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
16664
|
-
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
16665
|
-
var deburredLetters = {
|
|
16666
|
-
"À": "A",
|
|
16667
|
-
"Á": "A",
|
|
16668
|
-
"Â": "A",
|
|
16669
|
-
"Ã": "A",
|
|
16670
|
-
"Ä": "A",
|
|
16671
|
-
"Å": "A",
|
|
16672
|
-
"à": "a",
|
|
16673
|
-
"á": "a",
|
|
16674
|
-
"â": "a",
|
|
16675
|
-
"ã": "a",
|
|
16676
|
-
"ä": "a",
|
|
16677
|
-
"å": "a",
|
|
16678
|
-
"Ç": "C",
|
|
16679
|
-
"ç": "c",
|
|
16680
|
-
"Ð": "D",
|
|
16681
|
-
"ð": "d",
|
|
16682
|
-
"È": "E",
|
|
16683
|
-
"É": "E",
|
|
16684
|
-
"Ê": "E",
|
|
16685
|
-
"Ë": "E",
|
|
16686
|
-
"è": "e",
|
|
16687
|
-
"é": "e",
|
|
16688
|
-
"ê": "e",
|
|
16689
|
-
"ë": "e",
|
|
16690
|
-
"Ì": "I",
|
|
16691
|
-
"Í": "I",
|
|
16692
|
-
"Î": "I",
|
|
16693
|
-
"Ï": "I",
|
|
16694
|
-
"ì": "i",
|
|
16695
|
-
"í": "i",
|
|
16696
|
-
"î": "i",
|
|
16697
|
-
"ï": "i",
|
|
16698
|
-
"Ñ": "N",
|
|
16699
|
-
"ñ": "n",
|
|
16700
|
-
"Ò": "O",
|
|
16701
|
-
"Ó": "O",
|
|
16702
|
-
"Ô": "O",
|
|
16703
|
-
"Õ": "O",
|
|
16704
|
-
"Ö": "O",
|
|
16705
|
-
"Ø": "O",
|
|
16706
|
-
"ò": "o",
|
|
16707
|
-
"ó": "o",
|
|
16708
|
-
"ô": "o",
|
|
16709
|
-
"õ": "o",
|
|
16710
|
-
"ö": "o",
|
|
16711
|
-
"ø": "o",
|
|
16712
|
-
"Ù": "U",
|
|
16713
|
-
"Ú": "U",
|
|
16714
|
-
"Û": "U",
|
|
16715
|
-
"Ü": "U",
|
|
16716
|
-
"ù": "u",
|
|
16717
|
-
"ú": "u",
|
|
16718
|
-
"û": "u",
|
|
16719
|
-
"ü": "u",
|
|
16720
|
-
"Ý": "Y",
|
|
16721
|
-
"ý": "y",
|
|
16722
|
-
"ÿ": "y",
|
|
16723
|
-
"Æ": "Ae",
|
|
16724
|
-
"æ": "ae",
|
|
16725
|
-
"Þ": "Th",
|
|
16726
|
-
"þ": "th",
|
|
16727
|
-
"ß": "ss",
|
|
16728
|
-
"Ā": "A",
|
|
16729
|
-
"Ă": "A",
|
|
16730
|
-
"Ą": "A",
|
|
16731
|
-
"ā": "a",
|
|
16732
|
-
"ă": "a",
|
|
16733
|
-
"ą": "a",
|
|
16734
|
-
"Ć": "C",
|
|
16735
|
-
"Ĉ": "C",
|
|
16736
|
-
"Ċ": "C",
|
|
16737
|
-
"Č": "C",
|
|
16738
|
-
"ć": "c",
|
|
16739
|
-
"ĉ": "c",
|
|
16740
|
-
"ċ": "c",
|
|
16741
|
-
"č": "c",
|
|
16742
|
-
"Ď": "D",
|
|
16743
|
-
"Đ": "D",
|
|
16744
|
-
"ď": "d",
|
|
16745
|
-
"đ": "d",
|
|
16746
|
-
"Ē": "E",
|
|
16747
|
-
"Ĕ": "E",
|
|
16748
|
-
"Ė": "E",
|
|
16749
|
-
"Ę": "E",
|
|
16750
|
-
"Ě": "E",
|
|
16751
|
-
"ē": "e",
|
|
16752
|
-
"ĕ": "e",
|
|
16753
|
-
"ė": "e",
|
|
16754
|
-
"ę": "e",
|
|
16755
|
-
"ě": "e",
|
|
16756
|
-
"Ĝ": "G",
|
|
16757
|
-
"Ğ": "G",
|
|
16758
|
-
"Ġ": "G",
|
|
16759
|
-
"Ģ": "G",
|
|
16760
|
-
"ĝ": "g",
|
|
16761
|
-
"ğ": "g",
|
|
16762
|
-
"ġ": "g",
|
|
16763
|
-
"ģ": "g",
|
|
16764
|
-
"Ĥ": "H",
|
|
16765
|
-
"Ħ": "H",
|
|
16766
|
-
"ĥ": "h",
|
|
16767
|
-
"ħ": "h",
|
|
16768
|
-
"Ĩ": "I",
|
|
16769
|
-
"Ī": "I",
|
|
16770
|
-
"Ĭ": "I",
|
|
16771
|
-
"Į": "I",
|
|
16772
|
-
"İ": "I",
|
|
16773
|
-
"ĩ": "i",
|
|
16774
|
-
"ī": "i",
|
|
16775
|
-
"ĭ": "i",
|
|
16776
|
-
"į": "i",
|
|
16777
|
-
"ı": "i",
|
|
16778
|
-
"Ĵ": "J",
|
|
16779
|
-
"ĵ": "j",
|
|
16780
|
-
"Ķ": "K",
|
|
16781
|
-
"ķ": "k",
|
|
16782
|
-
"ĸ": "k",
|
|
16783
|
-
"Ĺ": "L",
|
|
16784
|
-
"Ļ": "L",
|
|
16785
|
-
"Ľ": "L",
|
|
16786
|
-
"Ŀ": "L",
|
|
16787
|
-
"Ł": "L",
|
|
16788
|
-
"ĺ": "l",
|
|
16789
|
-
"ļ": "l",
|
|
16790
|
-
"ľ": "l",
|
|
16791
|
-
"ŀ": "l",
|
|
16792
|
-
"ł": "l",
|
|
16793
|
-
"Ń": "N",
|
|
16794
|
-
"Ņ": "N",
|
|
16795
|
-
"Ň": "N",
|
|
16796
|
-
"Ŋ": "N",
|
|
16797
|
-
"ń": "n",
|
|
16798
|
-
"ņ": "n",
|
|
16799
|
-
"ň": "n",
|
|
16800
|
-
"ŋ": "n",
|
|
16801
|
-
"Ō": "O",
|
|
16802
|
-
"Ŏ": "O",
|
|
16803
|
-
"Ő": "O",
|
|
16804
|
-
"ō": "o",
|
|
16805
|
-
"ŏ": "o",
|
|
16806
|
-
"ő": "o",
|
|
16807
|
-
"Ŕ": "R",
|
|
16808
|
-
"Ŗ": "R",
|
|
16809
|
-
"Ř": "R",
|
|
16810
|
-
"ŕ": "r",
|
|
16811
|
-
"ŗ": "r",
|
|
16812
|
-
"ř": "r",
|
|
16813
|
-
"Ś": "S",
|
|
16814
|
-
"Ŝ": "S",
|
|
16815
|
-
"Ş": "S",
|
|
16816
|
-
"Š": "S",
|
|
16817
|
-
"ś": "s",
|
|
16818
|
-
"ŝ": "s",
|
|
16819
|
-
"ş": "s",
|
|
16820
|
-
"š": "s",
|
|
16821
|
-
"Ţ": "T",
|
|
16822
|
-
"Ť": "T",
|
|
16823
|
-
"Ŧ": "T",
|
|
16824
|
-
"ţ": "t",
|
|
16825
|
-
"ť": "t",
|
|
16826
|
-
"ŧ": "t",
|
|
16827
|
-
"Ũ": "U",
|
|
16828
|
-
"Ū": "U",
|
|
16829
|
-
"Ŭ": "U",
|
|
16830
|
-
"Ů": "U",
|
|
16831
|
-
"Ű": "U",
|
|
16832
|
-
"Ų": "U",
|
|
16833
|
-
"ũ": "u",
|
|
16834
|
-
"ū": "u",
|
|
16835
|
-
"ŭ": "u",
|
|
16836
|
-
"ů": "u",
|
|
16837
|
-
"ű": "u",
|
|
16838
|
-
"ų": "u",
|
|
16839
|
-
"Ŵ": "W",
|
|
16840
|
-
"ŵ": "w",
|
|
16841
|
-
"Ŷ": "Y",
|
|
16842
|
-
"ŷ": "y",
|
|
16843
|
-
"Ÿ": "Y",
|
|
16844
|
-
"Ź": "Z",
|
|
16845
|
-
"Ż": "Z",
|
|
16846
|
-
"Ž": "Z",
|
|
16847
|
-
"ź": "z",
|
|
16848
|
-
"ż": "z",
|
|
16849
|
-
"ž": "z",
|
|
16850
|
-
"IJ": "IJ",
|
|
16851
|
-
"ij": "ij",
|
|
16852
|
-
"Œ": "Oe",
|
|
16853
|
-
"œ": "oe",
|
|
16854
|
-
"ʼn": "'n",
|
|
16855
|
-
"ſ": "ss"
|
|
16856
|
-
};
|
|
16857
|
-
/** Detect free variable `global` from Node.js. */
|
|
16858
|
-
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
16859
|
-
/** Detect free variable `self`. */
|
|
16860
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
16861
|
-
/** Used as a reference to the global object. */
|
|
16862
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
|
16863
|
-
/**
|
|
16864
|
-
* A specialized version of `_.reduce` for arrays without support for
|
|
16865
|
-
* iteratee shorthands.
|
|
16866
|
-
*
|
|
16867
|
-
* @private
|
|
16868
|
-
* @param {Array} [array] The array to iterate over.
|
|
16869
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
16870
|
-
* @param {*} [accumulator] The initial value.
|
|
16871
|
-
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
16872
|
-
* the initial value.
|
|
16873
|
-
* @returns {*} Returns the accumulated value.
|
|
16874
|
-
*/
|
|
16875
|
-
function arrayReduce(array$1, iteratee, accumulator, initAccum) {
|
|
16876
|
-
var index = -1, length = array$1 ? array$1.length : 0;
|
|
16877
|
-
if (initAccum && length) accumulator = array$1[++index];
|
|
16878
|
-
while (++index < length) accumulator = iteratee(accumulator, array$1[index], index, array$1);
|
|
16879
|
-
return accumulator;
|
|
16880
|
-
}
|
|
16881
|
-
/**
|
|
16882
|
-
* Splits an ASCII `string` into an array of its words.
|
|
16883
|
-
*
|
|
16884
|
-
* @private
|
|
16885
|
-
* @param {string} The string to inspect.
|
|
16886
|
-
* @returns {Array} Returns the words of `string`.
|
|
16887
|
-
*/
|
|
16888
|
-
function asciiWords(string$2) {
|
|
16889
|
-
return string$2.match(reAsciiWord) || [];
|
|
16890
|
-
}
|
|
16891
|
-
/**
|
|
16892
|
-
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
16893
|
-
*
|
|
16894
|
-
* @private
|
|
16895
|
-
* @param {Object} object The object to query.
|
|
16896
|
-
* @returns {Function} Returns the new accessor function.
|
|
16897
|
-
*/
|
|
16898
|
-
function basePropertyOf(object$1) {
|
|
16899
|
-
return function(key) {
|
|
16900
|
-
return object$1 == null ? void 0 : object$1[key];
|
|
16901
|
-
};
|
|
16902
|
-
}
|
|
16903
|
-
/**
|
|
16904
|
-
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
16905
|
-
* letters to basic Latin letters.
|
|
16906
|
-
*
|
|
16907
|
-
* @private
|
|
16908
|
-
* @param {string} letter The matched letter to deburr.
|
|
16909
|
-
* @returns {string} Returns the deburred letter.
|
|
16910
|
-
*/
|
|
16911
|
-
var deburrLetter = basePropertyOf(deburredLetters);
|
|
16912
|
-
/**
|
|
16913
|
-
* Checks if `string` contains a word composed of Unicode symbols.
|
|
16914
|
-
*
|
|
16915
|
-
* @private
|
|
16916
|
-
* @param {string} string The string to inspect.
|
|
16917
|
-
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
16918
|
-
*/
|
|
16919
|
-
function hasUnicodeWord(string$2) {
|
|
16920
|
-
return reHasUnicodeWord.test(string$2);
|
|
16921
|
-
}
|
|
16922
|
-
/**
|
|
16923
|
-
* Splits a Unicode `string` into an array of its words.
|
|
16924
|
-
*
|
|
16925
|
-
* @private
|
|
16926
|
-
* @param {string} The string to inspect.
|
|
16927
|
-
* @returns {Array} Returns the words of `string`.
|
|
16928
|
-
*/
|
|
16929
|
-
function unicodeWords(string$2) {
|
|
16930
|
-
return string$2.match(reUnicodeWord) || [];
|
|
16931
|
-
}
|
|
16932
|
-
/**
|
|
16933
|
-
* Used to resolve the
|
|
16934
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
16935
|
-
* of values.
|
|
16936
|
-
*/
|
|
16937
|
-
var objectToString = Object.prototype.toString;
|
|
16938
|
-
/** Built-in value references. */
|
|
16939
|
-
var Symbol = root.Symbol;
|
|
16940
|
-
/** Used to convert symbols to primitives and strings. */
|
|
16941
|
-
var symbolProto = Symbol ? Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
16942
|
-
/**
|
|
16943
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
16944
|
-
* values to empty strings.
|
|
16945
|
-
*
|
|
16946
|
-
* @private
|
|
16947
|
-
* @param {*} value The value to process.
|
|
16948
|
-
* @returns {string} Returns the string.
|
|
16949
|
-
*/
|
|
16950
|
-
function baseToString(value) {
|
|
16951
|
-
if (typeof value == "string") return value;
|
|
16952
|
-
if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
|
|
16953
|
-
var result = value + "";
|
|
16954
|
-
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
16955
|
-
}
|
|
16956
|
-
/**
|
|
16957
|
-
* Creates a function like `_.camelCase`.
|
|
16958
|
-
*
|
|
16959
|
-
* @private
|
|
16960
|
-
* @param {Function} callback The function to combine each word.
|
|
16961
|
-
* @returns {Function} Returns the new compounder function.
|
|
16962
|
-
*/
|
|
16963
|
-
function createCompounder(callback) {
|
|
16964
|
-
return function(string$2) {
|
|
16965
|
-
return arrayReduce(words(deburr(string$2).replace(reApos, "")), callback, "");
|
|
16966
|
-
};
|
|
16967
|
-
}
|
|
16968
|
-
/**
|
|
16969
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
16970
|
-
* and has a `typeof` result of "object".
|
|
16971
|
-
*
|
|
16972
|
-
* @static
|
|
16973
|
-
* @memberOf _
|
|
16974
|
-
* @since 4.0.0
|
|
16975
|
-
* @category Lang
|
|
16976
|
-
* @param {*} value The value to check.
|
|
16977
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
16978
|
-
* @example
|
|
16979
|
-
*
|
|
16980
|
-
* _.isObjectLike({});
|
|
16981
|
-
* // => true
|
|
16982
|
-
*
|
|
16983
|
-
* _.isObjectLike([1, 2, 3]);
|
|
16984
|
-
* // => true
|
|
16985
|
-
*
|
|
16986
|
-
* _.isObjectLike(_.noop);
|
|
16987
|
-
* // => false
|
|
16988
|
-
*
|
|
16989
|
-
* _.isObjectLike(null);
|
|
16990
|
-
* // => false
|
|
16991
|
-
*/
|
|
16992
|
-
function isObjectLike(value) {
|
|
16993
|
-
return !!value && typeof value == "object";
|
|
16994
|
-
}
|
|
16995
|
-
/**
|
|
16996
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
16997
|
-
*
|
|
16998
|
-
* @static
|
|
16999
|
-
* @memberOf _
|
|
17000
|
-
* @since 4.0.0
|
|
17001
|
-
* @category Lang
|
|
17002
|
-
* @param {*} value The value to check.
|
|
17003
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
17004
|
-
* @example
|
|
17005
|
-
*
|
|
17006
|
-
* _.isSymbol(Symbol.iterator);
|
|
17007
|
-
* // => true
|
|
17008
|
-
*
|
|
17009
|
-
* _.isSymbol('abc');
|
|
17010
|
-
* // => false
|
|
17011
|
-
*/
|
|
17012
|
-
function isSymbol(value) {
|
|
17013
|
-
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
17014
|
-
}
|
|
17015
|
-
/**
|
|
17016
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
17017
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
17018
|
-
*
|
|
17019
|
-
* @static
|
|
17020
|
-
* @memberOf _
|
|
17021
|
-
* @since 4.0.0
|
|
17022
|
-
* @category Lang
|
|
17023
|
-
* @param {*} value The value to process.
|
|
17024
|
-
* @returns {string} Returns the string.
|
|
17025
|
-
* @example
|
|
17026
|
-
*
|
|
17027
|
-
* _.toString(null);
|
|
17028
|
-
* // => ''
|
|
17029
|
-
*
|
|
17030
|
-
* _.toString(-0);
|
|
17031
|
-
* // => '-0'
|
|
17032
|
-
*
|
|
17033
|
-
* _.toString([1, 2, 3]);
|
|
17034
|
-
* // => '1,2,3'
|
|
17035
|
-
*/
|
|
17036
|
-
function toString(value) {
|
|
17037
|
-
return value == null ? "" : baseToString(value);
|
|
17038
|
-
}
|
|
17039
|
-
/**
|
|
17040
|
-
* Deburrs `string` by converting
|
|
17041
|
-
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
17042
|
-
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
17043
|
-
* letters to basic Latin letters and removing
|
|
17044
|
-
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
17045
|
-
*
|
|
17046
|
-
* @static
|
|
17047
|
-
* @memberOf _
|
|
17048
|
-
* @since 3.0.0
|
|
17049
|
-
* @category String
|
|
17050
|
-
* @param {string} [string=''] The string to deburr.
|
|
17051
|
-
* @returns {string} Returns the deburred string.
|
|
17052
|
-
* @example
|
|
17053
|
-
*
|
|
17054
|
-
* _.deburr('déjà vu');
|
|
17055
|
-
* // => 'deja vu'
|
|
17056
|
-
*/
|
|
17057
|
-
function deburr(string$2) {
|
|
17058
|
-
string$2 = toString(string$2);
|
|
17059
|
-
return string$2 && string$2.replace(reLatin, deburrLetter).replace(reComboMark, "");
|
|
17060
|
-
}
|
|
17061
|
-
/**
|
|
17062
|
-
* Converts `string` to
|
|
17063
|
-
* [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
|
|
17064
|
-
*
|
|
17065
|
-
* @static
|
|
17066
|
-
* @memberOf _
|
|
17067
|
-
* @since 3.0.0
|
|
17068
|
-
* @category String
|
|
17069
|
-
* @param {string} [string=''] The string to convert.
|
|
17070
|
-
* @returns {string} Returns the kebab cased string.
|
|
17071
|
-
* @example
|
|
17072
|
-
*
|
|
17073
|
-
* _.kebabCase('Foo Bar');
|
|
17074
|
-
* // => 'foo-bar'
|
|
17075
|
-
*
|
|
17076
|
-
* _.kebabCase('fooBar');
|
|
17077
|
-
* // => 'foo-bar'
|
|
17078
|
-
*
|
|
17079
|
-
* _.kebabCase('__FOO_BAR__');
|
|
17080
|
-
* // => 'foo-bar'
|
|
17081
|
-
*/
|
|
17082
|
-
var kebabCase = createCompounder(function(result, word, index) {
|
|
17083
|
-
return result + (index ? "-" : "") + word.toLowerCase();
|
|
17084
|
-
});
|
|
17085
|
-
/**
|
|
17086
|
-
* Splits `string` into an array of its words.
|
|
17087
|
-
*
|
|
17088
|
-
* @static
|
|
17089
|
-
* @memberOf _
|
|
17090
|
-
* @since 3.0.0
|
|
17091
|
-
* @category String
|
|
17092
|
-
* @param {string} [string=''] The string to inspect.
|
|
17093
|
-
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
17094
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
17095
|
-
* @returns {Array} Returns the words of `string`.
|
|
17096
|
-
* @example
|
|
17097
|
-
*
|
|
17098
|
-
* _.words('fred, barney, & pebbles');
|
|
17099
|
-
* // => ['fred', 'barney', 'pebbles']
|
|
17100
|
-
*
|
|
17101
|
-
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
17102
|
-
* // => ['fred', 'barney', '&', 'pebbles']
|
|
17103
|
-
*/
|
|
17104
|
-
function words(string$2, pattern, guard) {
|
|
17105
|
-
string$2 = toString(string$2);
|
|
17106
|
-
pattern = guard ? void 0 : pattern;
|
|
17107
|
-
if (pattern === void 0) return hasUnicodeWord(string$2) ? unicodeWords(string$2) : asciiWords(string$2);
|
|
17108
|
-
return string$2.match(pattern) || [];
|
|
17109
|
-
}
|
|
17110
|
-
module.exports = kebabCase;
|
|
17111
|
-
}));
|
|
17112
|
-
|
|
17113
16740
|
//#endregion
|
|
17114
16741
|
//#region src/core/resources/function/config.ts
|
|
17115
|
-
var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
|
|
17116
16742
|
async function readFunctionConfig(configPath) {
|
|
17117
16743
|
const parsed = await readJsonFile(configPath);
|
|
17118
16744
|
const result = FunctionConfigSchema.safeParse(parsed);
|
|
@@ -17131,38 +16757,13 @@ async function readFunction(configPath) {
|
|
|
17131
16757
|
if (!result.success) throw new Error(`Invalid function in ${configPath}: ${result.error.message}`);
|
|
17132
16758
|
return result.data;
|
|
17133
16759
|
}
|
|
17134
|
-
/**
|
|
17135
|
-
* Creates a function from a directory without a config file.
|
|
17136
|
-
* Looks for index.ts and uses the folder name as the function name.
|
|
17137
|
-
*/
|
|
17138
|
-
async function readFunctionFromDirectory(functionDir) {
|
|
17139
|
-
const indexPath = join(functionDir, "index.ts");
|
|
17140
|
-
if (!await pathExists(indexPath)) return null;
|
|
17141
|
-
const functionData = {
|
|
17142
|
-
name: (0, import_lodash.default)(basename(functionDir)),
|
|
17143
|
-
entry: "index.ts",
|
|
17144
|
-
codePath: indexPath
|
|
17145
|
-
};
|
|
17146
|
-
const result = FunctionSchema.safeParse(functionData);
|
|
17147
|
-
if (!result.success) throw new Error(`Invalid auto-detected function in ${functionDir}: ${result.error.message}`);
|
|
17148
|
-
return result.data;
|
|
17149
|
-
}
|
|
17150
16760
|
async function readAllFunctions(functionsDir) {
|
|
17151
16761
|
if (!await pathExists(functionsDir)) return [];
|
|
17152
16762
|
const configFiles = await globby(`*/${FUNCTION_CONFIG_FILE}`, {
|
|
17153
16763
|
cwd: functionsDir,
|
|
17154
16764
|
absolute: true
|
|
17155
16765
|
});
|
|
17156
|
-
const
|
|
17157
|
-
const allDirs = await globby("*/", {
|
|
17158
|
-
cwd: functionsDir,
|
|
17159
|
-
absolute: true,
|
|
17160
|
-
onlyDirectories: true
|
|
17161
|
-
});
|
|
17162
|
-
const dirsWithConfig = new Set(configFiles.map((configPath) => dirname(configPath)));
|
|
17163
|
-
const dirsWithoutConfig = allDirs.filter((dir) => !dirsWithConfig.has(dir));
|
|
17164
|
-
const autoDetectedFunctions = (await Promise.all(dirsWithoutConfig.map((dir) => readFunctionFromDirectory(dir)))).filter((fn) => fn !== null);
|
|
17165
|
-
const functions = [...functionsWithConfig, ...autoDetectedFunctions];
|
|
16766
|
+
const functions = await Promise.all(configFiles.map((configPath) => readFunction(configPath)));
|
|
17166
16767
|
const names = /* @__PURE__ */ new Set();
|
|
17167
16768
|
for (const fn of functions) {
|
|
17168
16769
|
if (names.has(fn.name)) throw new Error(`Duplicate function name "${fn.name}"`);
|
|
@@ -17218,6 +16819,86 @@ const functionResource = {
|
|
|
17218
16819
|
push: pushFunctions
|
|
17219
16820
|
};
|
|
17220
16821
|
|
|
16822
|
+
//#endregion
|
|
16823
|
+
//#region src/core/resources/agent/schema.ts
|
|
16824
|
+
const AgentConfigSchema = looseObject({ name: string().regex(/^[a-z0-9_]+$/, "Agent name must be lowercase alphanumeric with underscores").min(1).max(100) });
|
|
16825
|
+
const SyncAgentsResponseSchema = object({
|
|
16826
|
+
created: array(string()),
|
|
16827
|
+
updated: array(string()),
|
|
16828
|
+
deleted: array(string())
|
|
16829
|
+
});
|
|
16830
|
+
const AgentConfigApiResponseSchema = looseObject({ name: string() });
|
|
16831
|
+
const ListAgentsResponseSchema = object({
|
|
16832
|
+
items: array(AgentConfigApiResponseSchema),
|
|
16833
|
+
total: number()
|
|
16834
|
+
});
|
|
16835
|
+
|
|
16836
|
+
//#endregion
|
|
16837
|
+
//#region src/core/resources/agent/config.ts
|
|
16838
|
+
async function readAgentFile(agentPath) {
|
|
16839
|
+
const parsed = await readJsonFile(agentPath);
|
|
16840
|
+
return AgentConfigSchema.parse(parsed);
|
|
16841
|
+
}
|
|
16842
|
+
async function readAllAgents(agentsDir) {
|
|
16843
|
+
if (!await pathExists(agentsDir)) return [];
|
|
16844
|
+
const files = await globby(`*.${CONFIG_FILE_EXTENSION_GLOB}`, {
|
|
16845
|
+
cwd: agentsDir,
|
|
16846
|
+
absolute: true
|
|
16847
|
+
});
|
|
16848
|
+
const agents = await Promise.all(files.map((filePath) => readAgentFile(filePath)));
|
|
16849
|
+
const names = /* @__PURE__ */ new Set();
|
|
16850
|
+
for (const agent of agents) {
|
|
16851
|
+
if (names.has(agent.name)) throw new Error(`Duplicate agent name "${agent.name}"`);
|
|
16852
|
+
names.add(agent.name);
|
|
16853
|
+
}
|
|
16854
|
+
return agents;
|
|
16855
|
+
}
|
|
16856
|
+
async function writeAgents(agentsDir, remoteAgents) {
|
|
16857
|
+
const existingAgents = await readAllAgents(agentsDir);
|
|
16858
|
+
const newNames = new Set(remoteAgents.map((a$1) => a$1.name));
|
|
16859
|
+
const toDelete = existingAgents.filter((a$1) => !newNames.has(a$1.name));
|
|
16860
|
+
for (const agent of toDelete) {
|
|
16861
|
+
const files = await globby(`${agent.name}.${CONFIG_FILE_EXTENSION_GLOB}`, {
|
|
16862
|
+
cwd: agentsDir,
|
|
16863
|
+
absolute: true
|
|
16864
|
+
});
|
|
16865
|
+
for (const filePath of files) await deleteFile(filePath);
|
|
16866
|
+
}
|
|
16867
|
+
for (const agent of remoteAgents) await writeJsonFile(join(agentsDir, `${agent.name}.${CONFIG_FILE_EXTENSION}`), agent);
|
|
16868
|
+
return {
|
|
16869
|
+
written: remoteAgents.map((a$1) => a$1.name),
|
|
16870
|
+
deleted: toDelete.map((a$1) => a$1.name)
|
|
16871
|
+
};
|
|
16872
|
+
}
|
|
16873
|
+
|
|
16874
|
+
//#endregion
|
|
16875
|
+
//#region src/core/resources/agent/api.ts
|
|
16876
|
+
async function pushAgents(agents) {
|
|
16877
|
+
const appClient = getAppClient();
|
|
16878
|
+
try {
|
|
16879
|
+
const response = await appClient.put("agent-configs", { json: agents });
|
|
16880
|
+
return SyncAgentsResponseSchema.parse(await response.json());
|
|
16881
|
+
} catch (error) {
|
|
16882
|
+
throw new Error(`Error occurred while syncing agents: ${error instanceof Error ? error.message : String(error)}`);
|
|
16883
|
+
}
|
|
16884
|
+
}
|
|
16885
|
+
async function fetchAgents() {
|
|
16886
|
+
const appClient = getAppClient();
|
|
16887
|
+
try {
|
|
16888
|
+
const response = await appClient.get("agent-configs");
|
|
16889
|
+
return ListAgentsResponseSchema.parse(await response.json());
|
|
16890
|
+
} catch (error) {
|
|
16891
|
+
throw new Error(`Error occurred while fetching agents: ${error instanceof Error ? error.message : String(error)}`);
|
|
16892
|
+
}
|
|
16893
|
+
}
|
|
16894
|
+
|
|
16895
|
+
//#endregion
|
|
16896
|
+
//#region src/core/resources/agent/resource.ts
|
|
16897
|
+
const agentResource = {
|
|
16898
|
+
readAll: readAllAgents,
|
|
16899
|
+
push: pushAgents
|
|
16900
|
+
};
|
|
16901
|
+
|
|
17221
16902
|
//#endregion
|
|
17222
16903
|
//#region src/core/project/schema.ts
|
|
17223
16904
|
const TemplateSchema = object({
|
|
@@ -17238,7 +16919,8 @@ const ProjectConfigSchema = object({
|
|
|
17238
16919
|
description: string().optional(),
|
|
17239
16920
|
site: SiteConfigSchema.optional(),
|
|
17240
16921
|
entitiesDir: string().optional().default("entities"),
|
|
17241
|
-
functionsDir: string().optional().default("functions")
|
|
16922
|
+
functionsDir: string().optional().default("functions"),
|
|
16923
|
+
agentsDir: string().optional().default("agents")
|
|
17242
16924
|
});
|
|
17243
16925
|
const AppConfigSchema = object({ id: string().min(1, "id cannot be empty") });
|
|
17244
16926
|
const CreateProjectResponseSchema = looseObject({ id: string() });
|
|
@@ -17310,7 +16992,11 @@ async function readProjectConfig(projectRoot) {
|
|
|
17310
16992
|
if (!result.success) throw new Error(`Invalid project configuration: ${result.error.message}`);
|
|
17311
16993
|
const project = result.data;
|
|
17312
16994
|
const configDir = dirname(configPath);
|
|
17313
|
-
const [entities, functions] = await Promise.all([
|
|
16995
|
+
const [entities, functions, agents] = await Promise.all([
|
|
16996
|
+
entityResource.readAll(join(configDir, project.entitiesDir)),
|
|
16997
|
+
functionResource.readAll(join(configDir, project.functionsDir)),
|
|
16998
|
+
agentResource.readAll(join(configDir, project.agentsDir))
|
|
16999
|
+
]);
|
|
17314
17000
|
return {
|
|
17315
17001
|
project: {
|
|
17316
17002
|
...project,
|
|
@@ -17318,7 +17004,8 @@ async function readProjectConfig(projectRoot) {
|
|
|
17318
17004
|
configPath
|
|
17319
17005
|
},
|
|
17320
17006
|
entities,
|
|
17321
|
-
functions
|
|
17007
|
+
functions,
|
|
17008
|
+
agents
|
|
17322
17009
|
};
|
|
17323
17010
|
}
|
|
17324
17011
|
|
|
@@ -31003,6 +30690,15 @@ async function readAppConfig(projectRoot) {
|
|
|
31003
30690
|
* Authenticated HTTP client for Base44 API.
|
|
31004
30691
|
* Automatically handles token refresh and retry on 401 responses.
|
|
31005
30692
|
*/
|
|
30693
|
+
/**
|
|
30694
|
+
* Formats API error responses into human-readable strings.
|
|
30695
|
+
* Internal utility used by error handling hooks.
|
|
30696
|
+
*/
|
|
30697
|
+
function formatApiError(errorJson) {
|
|
30698
|
+
const error = errorJson;
|
|
30699
|
+
const content = error?.message ?? error?.detail ?? errorJson;
|
|
30700
|
+
return typeof content === "string" ? content : JSON.stringify(content, null, 2);
|
|
30701
|
+
}
|
|
31006
30702
|
const retriedRequests = /* @__PURE__ */ new WeakSet();
|
|
31007
30703
|
/**
|
|
31008
30704
|
* Handles 401 responses by refreshing the token and retrying the request.
|
|
@@ -31017,8 +30713,28 @@ async function handleUnauthorized(request, _options, response) {
|
|
|
31017
30713
|
return distribution_default(request, { headers: { Authorization: `Bearer ${newAccessToken}` } });
|
|
31018
30714
|
}
|
|
31019
30715
|
/**
|
|
31020
|
-
*
|
|
30716
|
+
* Handles HTTPErrors by formatting the API error response into a readable message.
|
|
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.
|
|
31021
30736
|
* Use this for general API calls that require authentication.
|
|
30737
|
+
* All non-OK responses are automatically caught and formatted into Error objects.
|
|
31022
30738
|
*/
|
|
31023
30739
|
const base44Client = distribution_default.create({
|
|
31024
30740
|
prefixUrl: getBase44ApiUrl(),
|
|
@@ -31037,7 +30753,8 @@ const base44Client = distribution_default.create({
|
|
|
31037
30753
|
request.headers.set("Authorization", `Bearer ${auth.accessToken}`);
|
|
31038
30754
|
} catch {}
|
|
31039
30755
|
}],
|
|
31040
|
-
afterResponse: [handleUnauthorized]
|
|
30756
|
+
afterResponse: [handleUnauthorized],
|
|
30757
|
+
beforeError: [handleApiErrors]
|
|
31041
30758
|
}
|
|
31042
30759
|
});
|
|
31043
30760
|
/**
|
|
@@ -31056,6 +30773,19 @@ function getAppClient() {
|
|
|
31056
30773
|
return base44Client.extend({ prefixUrl: new URL(`/api/apps/${id}/`, getBase44ApiUrl()).href });
|
|
31057
30774
|
}
|
|
31058
30775
|
|
|
30776
|
+
//#endregion
|
|
30777
|
+
//#region src/core/clients/schemas.ts
|
|
30778
|
+
const ApiErrorSchema = object({
|
|
30779
|
+
error_type: string().optional(),
|
|
30780
|
+
message: union([string(), record(string(), unknown())]).optional(),
|
|
30781
|
+
detail: union([
|
|
30782
|
+
string(),
|
|
30783
|
+
record(string(), unknown()),
|
|
30784
|
+
array(unknown())
|
|
30785
|
+
]).optional(),
|
|
30786
|
+
traceback: string().optional()
|
|
30787
|
+
});
|
|
30788
|
+
|
|
31059
30789
|
//#endregion
|
|
31060
30790
|
//#region src/core/auth/api.ts
|
|
31061
30791
|
async function generateDeviceCode() {
|
|
@@ -31305,13 +31035,13 @@ var ansi_styles_default = ansiStyles;
|
|
|
31305
31035
|
|
|
31306
31036
|
//#endregion
|
|
31307
31037
|
//#region node_modules/chalk/source/vendor/supports-color/index.js
|
|
31308
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
31038
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process$1.argv) {
|
|
31309
31039
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
31310
31040
|
const position = argv.indexOf(prefix + flag);
|
|
31311
31041
|
const terminatorPosition = argv.indexOf("--");
|
|
31312
31042
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
31313
31043
|
}
|
|
31314
|
-
const { env } =
|
|
31044
|
+
const { env } = process$1;
|
|
31315
31045
|
let flagForceColor;
|
|
31316
31046
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
31317
31047
|
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
@@ -31344,7 +31074,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
31344
31074
|
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
31345
31075
|
const min = forceColor || 0;
|
|
31346
31076
|
if (env.TERM === "dumb") return min;
|
|
31347
|
-
if (
|
|
31077
|
+
if (process$1.platform === "win32") {
|
|
31348
31078
|
const osRelease = os.release().split(".");
|
|
31349
31079
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
31350
31080
|
return 1;
|
|
@@ -31883,12 +31613,62 @@ async function pushEntitiesAction() {
|
|
|
31883
31613
|
if (result.created.length > 0) M.success(`Created: ${result.created.join(", ")}`);
|
|
31884
31614
|
if (result.updated.length > 0) M.success(`Updated: ${result.updated.join(", ")}`);
|
|
31885
31615
|
if (result.deleted.length > 0) M.warn(`Deleted: ${result.deleted.join(", ")}`);
|
|
31886
|
-
return {};
|
|
31616
|
+
return { outroMessage: "Entities pushed to Base44" };
|
|
31887
31617
|
}
|
|
31888
31618
|
const entitiesPushCommand = new Command("entities").description("Manage project entities").addCommand(new Command("push").description("Push local entities to Base44").action(async () => {
|
|
31889
31619
|
await runCommand(pushEntitiesAction, { requireAuth: true });
|
|
31890
31620
|
}));
|
|
31891
31621
|
|
|
31622
|
+
//#endregion
|
|
31623
|
+
//#region src/cli/commands/agents/push.ts
|
|
31624
|
+
async function pushAgentsAction() {
|
|
31625
|
+
const { agents } = await readProjectConfig();
|
|
31626
|
+
M.info(agents.length === 0 ? "No local agents found - this will delete all remote agents" : `Found ${agents.length} agents to push`);
|
|
31627
|
+
const result = await runTask("Pushing agents to Base44", async () => {
|
|
31628
|
+
return await pushAgents(agents);
|
|
31629
|
+
}, {
|
|
31630
|
+
successMessage: "Agents pushed successfully",
|
|
31631
|
+
errorMessage: "Failed to push agents"
|
|
31632
|
+
});
|
|
31633
|
+
if (result.created.length > 0) M.success(`Created: ${result.created.join(", ")}`);
|
|
31634
|
+
if (result.updated.length > 0) M.success(`Updated: ${result.updated.join(", ")}`);
|
|
31635
|
+
if (result.deleted.length > 0) M.warn(`Deleted: ${result.deleted.join(", ")}`);
|
|
31636
|
+
return { outroMessage: "Agents pushed to Base44" };
|
|
31637
|
+
}
|
|
31638
|
+
const agentsPushCommand = new Command("push").description("Push local agents to Base44 (replaces all remote agent configs)").action(async () => {
|
|
31639
|
+
await runCommand(pushAgentsAction, { requireAuth: true });
|
|
31640
|
+
});
|
|
31641
|
+
|
|
31642
|
+
//#endregion
|
|
31643
|
+
//#region src/cli/commands/agents/pull.ts
|
|
31644
|
+
async function pullAgentsAction() {
|
|
31645
|
+
const { project } = await readProjectConfig();
|
|
31646
|
+
const agentsDir = join(dirname(project.configPath), project.agentsDir);
|
|
31647
|
+
const remoteAgents = await runTask("Fetching agents from Base44", async () => {
|
|
31648
|
+
return await fetchAgents();
|
|
31649
|
+
}, {
|
|
31650
|
+
successMessage: "Agents fetched successfully",
|
|
31651
|
+
errorMessage: "Failed to fetch agents"
|
|
31652
|
+
});
|
|
31653
|
+
if (remoteAgents.items.length === 0) return { outroMessage: "No agents found on Base44" };
|
|
31654
|
+
const { written, deleted } = await runTask("Writing agent files", async () => {
|
|
31655
|
+
return await writeAgents(agentsDir, remoteAgents.items);
|
|
31656
|
+
}, {
|
|
31657
|
+
successMessage: "Agent files written successfully",
|
|
31658
|
+
errorMessage: "Failed to write agent files"
|
|
31659
|
+
});
|
|
31660
|
+
if (written.length > 0) M.success(`Written: ${written.join(", ")}`);
|
|
31661
|
+
if (deleted.length > 0) M.warn(`Deleted: ${deleted.join(", ")}`);
|
|
31662
|
+
return { outroMessage: `Pulled ${remoteAgents.total} agents to ${agentsDir}` };
|
|
31663
|
+
}
|
|
31664
|
+
const agentsPullCommand = new Command("pull").description("Pull agents from Base44 to local files (replaces all local agent configs)").action(async () => {
|
|
31665
|
+
await runCommand(pullAgentsAction, { requireAuth: true });
|
|
31666
|
+
});
|
|
31667
|
+
|
|
31668
|
+
//#endregion
|
|
31669
|
+
//#region src/cli/commands/agents/index.ts
|
|
31670
|
+
const agentsCommand = new Command("agents").description("Manage project agents").addCommand(agentsPushCommand).addCommand(agentsPullCommand);
|
|
31671
|
+
|
|
31892
31672
|
//#endregion
|
|
31893
31673
|
//#region src/cli/commands/functions/deploy.ts
|
|
31894
31674
|
async function deployFunctionsAction() {
|
|
@@ -31907,7 +31687,7 @@ async function deployFunctionsAction() {
|
|
|
31907
31687
|
const errorMessages = result.errors.map((e$1) => `'${e$1.name}' function: ${e$1.message}`).join("\n");
|
|
31908
31688
|
throw new Error(`Function deployment errors:\n${errorMessages}`);
|
|
31909
31689
|
}
|
|
31910
|
-
return {};
|
|
31690
|
+
return { outroMessage: "Functions deployed to Base44" };
|
|
31911
31691
|
}
|
|
31912
31692
|
const functionsDeployCommand = new Command("functions").description("Manage project functions").addCommand(new Command("deploy").description("Deploy local functions to Base44").action(async () => {
|
|
31913
31693
|
await runCommand(deployFunctionsAction, { requireAuth: true });
|
|
@@ -32083,9 +31863,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
|
|
|
32083
31863
|
//#region node_modules/execa/lib/utils/standard-stream.js
|
|
32084
31864
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
32085
31865
|
const STANDARD_STREAMS = [
|
|
32086
|
-
|
|
32087
|
-
|
|
32088
|
-
|
|
31866
|
+
process$1.stdin,
|
|
31867
|
+
process$1.stdout,
|
|
31868
|
+
process$1.stderr
|
|
32089
31869
|
];
|
|
32090
31870
|
const STANDARD_STREAMS_ALIASES = [
|
|
32091
31871
|
"stdin",
|
|
@@ -32210,9 +31990,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
32210
31990
|
//#endregion
|
|
32211
31991
|
//#region node_modules/is-unicode-supported/index.js
|
|
32212
31992
|
function isUnicodeSupported() {
|
|
32213
|
-
const { env: env$1 } =
|
|
31993
|
+
const { env: env$1 } = process$1;
|
|
32214
31994
|
const { TERM, TERM_PROGRAM } = env$1;
|
|
32215
|
-
if (
|
|
31995
|
+
if (process$1.platform !== "win32") return TERM !== "linux";
|
|
32216
31996
|
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";
|
|
32217
31997
|
}
|
|
32218
31998
|
|
|
@@ -33139,7 +32919,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
33139
32919
|
|
|
33140
32920
|
//#endregion
|
|
33141
32921
|
//#region node_modules/npm-run-path/index.js
|
|
33142
|
-
const npmRunPath = ({ cwd =
|
|
32922
|
+
const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath: execPath$1 = process$1.execPath, addExecPath = true } = {}) => {
|
|
33143
32923
|
const cwdPath = path.resolve(toPath(cwd));
|
|
33144
32924
|
const result = [];
|
|
33145
32925
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -33157,7 +32937,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
|
33157
32937
|
const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
|
|
33158
32938
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
33159
32939
|
};
|
|
33160
|
-
const npmRunPathEnv = ({ env: env$1 =
|
|
32940
|
+
const npmRunPathEnv = ({ env: env$1 = process$1.env, ...options } = {}) => {
|
|
33161
32941
|
env$1 = { ...env$1 };
|
|
33162
32942
|
const pathName = pathKey({ env: env$1 });
|
|
33163
32943
|
options.path = env$1[pathName];
|
|
@@ -34292,7 +34072,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
34292
34072
|
};
|
|
34293
34073
|
const getDefaultCwd = () => {
|
|
34294
34074
|
try {
|
|
34295
|
-
return
|
|
34075
|
+
return process$1.cwd();
|
|
34296
34076
|
} catch (error) {
|
|
34297
34077
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
34298
34078
|
throw error;
|
|
@@ -34327,7 +34107,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
34327
34107
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
34328
34108
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
34329
34109
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
34330
|
-
if (
|
|
34110
|
+
if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
34331
34111
|
return {
|
|
34332
34112
|
file,
|
|
34333
34113
|
commandArguments,
|
|
@@ -34354,7 +34134,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
34354
34134
|
});
|
|
34355
34135
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
34356
34136
|
const env$1 = extendEnv ? {
|
|
34357
|
-
...
|
|
34137
|
+
...process$1.env,
|
|
34358
34138
|
...envOption
|
|
34359
34139
|
} : envOption;
|
|
34360
34140
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -35354,12 +35134,12 @@ const guessStreamDirection = {
|
|
|
35354
35134
|
}
|
|
35355
35135
|
};
|
|
35356
35136
|
const getStandardStreamDirection = (value) => {
|
|
35357
|
-
if ([0,
|
|
35137
|
+
if ([0, process$1.stdin].includes(value)) return "input";
|
|
35358
35138
|
if ([
|
|
35359
35139
|
1,
|
|
35360
35140
|
2,
|
|
35361
|
-
|
|
35362
|
-
|
|
35141
|
+
process$1.stdout,
|
|
35142
|
+
process$1.stderr
|
|
35363
35143
|
].includes(value)) return "output";
|
|
35364
35144
|
};
|
|
35365
35145
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -36423,9 +36203,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
36423
36203
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
36424
36204
|
};
|
|
36425
36205
|
const getIpcExport = () => {
|
|
36426
|
-
const anyProcess =
|
|
36206
|
+
const anyProcess = process$1;
|
|
36427
36207
|
const isSubprocess = true;
|
|
36428
|
-
const ipc =
|
|
36208
|
+
const ipc = process$1.channel !== void 0;
|
|
36429
36209
|
return {
|
|
36430
36210
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
36431
36211
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -36667,7 +36447,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
|
|
|
36667
36447
|
|
|
36668
36448
|
//#endregion
|
|
36669
36449
|
//#region node_modules/signal-exit/dist/mjs/index.js
|
|
36670
|
-
const processOk = (process$
|
|
36450
|
+
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";
|
|
36671
36451
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
36672
36452
|
const global$1 = globalThis;
|
|
36673
36453
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -36735,7 +36515,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
36735
36515
|
};
|
|
36736
36516
|
var SignalExit = class extends SignalExitBase {
|
|
36737
36517
|
/* c8 ignore start */
|
|
36738
|
-
#hupSig = process$
|
|
36518
|
+
#hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
36739
36519
|
/* c8 ignore stop */
|
|
36740
36520
|
#emitter = new Emitter();
|
|
36741
36521
|
#process;
|
|
@@ -36743,15 +36523,15 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36743
36523
|
#originalProcessReallyExit;
|
|
36744
36524
|
#sigListeners = {};
|
|
36745
36525
|
#loaded = false;
|
|
36746
|
-
constructor(process$
|
|
36526
|
+
constructor(process$5) {
|
|
36747
36527
|
super();
|
|
36748
|
-
this.#process = process$
|
|
36528
|
+
this.#process = process$5;
|
|
36749
36529
|
this.#sigListeners = {};
|
|
36750
36530
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
36751
36531
|
const listeners = this.#process.listeners(sig);
|
|
36752
36532
|
let { count: count$1 } = this.#emitter;
|
|
36753
36533
|
/* c8 ignore start */
|
|
36754
|
-
const p$1 = process$
|
|
36534
|
+
const p$1 = process$5;
|
|
36755
36535
|
if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
|
|
36756
36536
|
/* c8 ignore stop */
|
|
36757
36537
|
if (listeners.length === count$1) {
|
|
@@ -36759,11 +36539,11 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36759
36539
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
36760
36540
|
/* c8 ignore start */
|
|
36761
36541
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
36762
|
-
if (!ret) process$
|
|
36542
|
+
if (!ret) process$5.kill(process$5.pid, s);
|
|
36763
36543
|
}
|
|
36764
36544
|
};
|
|
36765
|
-
this.#originalProcessReallyExit = process$
|
|
36766
|
-
this.#originalProcessEmit = process$
|
|
36545
|
+
this.#originalProcessReallyExit = process$5.reallyExit;
|
|
36546
|
+
this.#originalProcessEmit = process$5.emit;
|
|
36767
36547
|
}
|
|
36768
36548
|
onExit(cb, opts) {
|
|
36769
36549
|
/* c8 ignore start */
|
|
@@ -36830,8 +36610,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36830
36610
|
} else return og.call(this.#process, ev, ...args);
|
|
36831
36611
|
}
|
|
36832
36612
|
};
|
|
36833
|
-
const process$
|
|
36834
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$
|
|
36613
|
+
const process$2 = globalThis.process;
|
|
36614
|
+
const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
|
|
36835
36615
|
|
|
36836
36616
|
//#endregion
|
|
36837
36617
|
//#region node_modules/execa/lib/terminate/cleanup.js
|
|
@@ -38070,8 +37850,517 @@ const execaNode = createExeca(mapNode);
|
|
|
38070
37850
|
const $ = createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
|
|
38071
37851
|
const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcExport();
|
|
38072
37852
|
|
|
37853
|
+
//#endregion
|
|
37854
|
+
//#region node_modules/lodash.kebabcase/index.js
|
|
37855
|
+
var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
37856
|
+
/**
|
|
37857
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
37858
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
37859
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
37860
|
+
* Released under MIT license <https://lodash.com/license>
|
|
37861
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
37862
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
37863
|
+
*/
|
|
37864
|
+
/** Used as references for various `Number` constants. */
|
|
37865
|
+
var INFINITY = Infinity;
|
|
37866
|
+
/** `Object#toString` result references. */
|
|
37867
|
+
var symbolTag = "[object Symbol]";
|
|
37868
|
+
/** Used to match words composed of alphanumeric characters. */
|
|
37869
|
+
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
37870
|
+
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
37871
|
+
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
37872
|
+
/** Used to compose unicode character classes. */
|
|
37873
|
+
var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23", rsComboSymbolsRange = "\\u20d0-\\u20f0", rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
37874
|
+
/** Used to compose unicode capture groups. */
|
|
37875
|
+
var rsApos = "['’]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsModifier = "(?:" + rsCombo + "|\\ud83c[\\udffb-\\udfff])", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
|
|
37876
|
+
/** Used to compose unicode regexes. */
|
|
37877
|
+
var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")", rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [
|
|
37878
|
+
rsNonAstral,
|
|
37879
|
+
rsRegional,
|
|
37880
|
+
rsSurrPair
|
|
37881
|
+
].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [
|
|
37882
|
+
rsDingbat,
|
|
37883
|
+
rsRegional,
|
|
37884
|
+
rsSurrPair
|
|
37885
|
+
].join("|") + ")" + rsSeq;
|
|
37886
|
+
/** Used to match apostrophes. */
|
|
37887
|
+
var reApos = RegExp(rsApos, "g");
|
|
37888
|
+
/**
|
|
37889
|
+
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
37890
|
+
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
37891
|
+
*/
|
|
37892
|
+
var reComboMark = RegExp(rsCombo, "g");
|
|
37893
|
+
/** Used to match complex or compound words. */
|
|
37894
|
+
var reUnicodeWord = RegExp([
|
|
37895
|
+
rsUpper + "?" + rsLower + "+" + rsOptLowerContr + "(?=" + [
|
|
37896
|
+
rsBreak,
|
|
37897
|
+
rsUpper,
|
|
37898
|
+
"$"
|
|
37899
|
+
].join("|") + ")",
|
|
37900
|
+
rsUpperMisc + "+" + rsOptUpperContr + "(?=" + [
|
|
37901
|
+
rsBreak,
|
|
37902
|
+
rsUpper + rsLowerMisc,
|
|
37903
|
+
"$"
|
|
37904
|
+
].join("|") + ")",
|
|
37905
|
+
rsUpper + "?" + rsLowerMisc + "+" + rsOptLowerContr,
|
|
37906
|
+
rsUpper + "+" + rsOptUpperContr,
|
|
37907
|
+
rsDigits,
|
|
37908
|
+
rsEmoji
|
|
37909
|
+
].join("|"), "g");
|
|
37910
|
+
/** Used to detect strings that need a more robust regexp to match words. */
|
|
37911
|
+
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
37912
|
+
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
37913
|
+
var deburredLetters = {
|
|
37914
|
+
"À": "A",
|
|
37915
|
+
"Á": "A",
|
|
37916
|
+
"Â": "A",
|
|
37917
|
+
"Ã": "A",
|
|
37918
|
+
"Ä": "A",
|
|
37919
|
+
"Å": "A",
|
|
37920
|
+
"à": "a",
|
|
37921
|
+
"á": "a",
|
|
37922
|
+
"â": "a",
|
|
37923
|
+
"ã": "a",
|
|
37924
|
+
"ä": "a",
|
|
37925
|
+
"å": "a",
|
|
37926
|
+
"Ç": "C",
|
|
37927
|
+
"ç": "c",
|
|
37928
|
+
"Ð": "D",
|
|
37929
|
+
"ð": "d",
|
|
37930
|
+
"È": "E",
|
|
37931
|
+
"É": "E",
|
|
37932
|
+
"Ê": "E",
|
|
37933
|
+
"Ë": "E",
|
|
37934
|
+
"è": "e",
|
|
37935
|
+
"é": "e",
|
|
37936
|
+
"ê": "e",
|
|
37937
|
+
"ë": "e",
|
|
37938
|
+
"Ì": "I",
|
|
37939
|
+
"Í": "I",
|
|
37940
|
+
"Î": "I",
|
|
37941
|
+
"Ï": "I",
|
|
37942
|
+
"ì": "i",
|
|
37943
|
+
"í": "i",
|
|
37944
|
+
"î": "i",
|
|
37945
|
+
"ï": "i",
|
|
37946
|
+
"Ñ": "N",
|
|
37947
|
+
"ñ": "n",
|
|
37948
|
+
"Ò": "O",
|
|
37949
|
+
"Ó": "O",
|
|
37950
|
+
"Ô": "O",
|
|
37951
|
+
"Õ": "O",
|
|
37952
|
+
"Ö": "O",
|
|
37953
|
+
"Ø": "O",
|
|
37954
|
+
"ò": "o",
|
|
37955
|
+
"ó": "o",
|
|
37956
|
+
"ô": "o",
|
|
37957
|
+
"õ": "o",
|
|
37958
|
+
"ö": "o",
|
|
37959
|
+
"ø": "o",
|
|
37960
|
+
"Ù": "U",
|
|
37961
|
+
"Ú": "U",
|
|
37962
|
+
"Û": "U",
|
|
37963
|
+
"Ü": "U",
|
|
37964
|
+
"ù": "u",
|
|
37965
|
+
"ú": "u",
|
|
37966
|
+
"û": "u",
|
|
37967
|
+
"ü": "u",
|
|
37968
|
+
"Ý": "Y",
|
|
37969
|
+
"ý": "y",
|
|
37970
|
+
"ÿ": "y",
|
|
37971
|
+
"Æ": "Ae",
|
|
37972
|
+
"æ": "ae",
|
|
37973
|
+
"Þ": "Th",
|
|
37974
|
+
"þ": "th",
|
|
37975
|
+
"ß": "ss",
|
|
37976
|
+
"Ā": "A",
|
|
37977
|
+
"Ă": "A",
|
|
37978
|
+
"Ą": "A",
|
|
37979
|
+
"ā": "a",
|
|
37980
|
+
"ă": "a",
|
|
37981
|
+
"ą": "a",
|
|
37982
|
+
"Ć": "C",
|
|
37983
|
+
"Ĉ": "C",
|
|
37984
|
+
"Ċ": "C",
|
|
37985
|
+
"Č": "C",
|
|
37986
|
+
"ć": "c",
|
|
37987
|
+
"ĉ": "c",
|
|
37988
|
+
"ċ": "c",
|
|
37989
|
+
"č": "c",
|
|
37990
|
+
"Ď": "D",
|
|
37991
|
+
"Đ": "D",
|
|
37992
|
+
"ď": "d",
|
|
37993
|
+
"đ": "d",
|
|
37994
|
+
"Ē": "E",
|
|
37995
|
+
"Ĕ": "E",
|
|
37996
|
+
"Ė": "E",
|
|
37997
|
+
"Ę": "E",
|
|
37998
|
+
"Ě": "E",
|
|
37999
|
+
"ē": "e",
|
|
38000
|
+
"ĕ": "e",
|
|
38001
|
+
"ė": "e",
|
|
38002
|
+
"ę": "e",
|
|
38003
|
+
"ě": "e",
|
|
38004
|
+
"Ĝ": "G",
|
|
38005
|
+
"Ğ": "G",
|
|
38006
|
+
"Ġ": "G",
|
|
38007
|
+
"Ģ": "G",
|
|
38008
|
+
"ĝ": "g",
|
|
38009
|
+
"ğ": "g",
|
|
38010
|
+
"ġ": "g",
|
|
38011
|
+
"ģ": "g",
|
|
38012
|
+
"Ĥ": "H",
|
|
38013
|
+
"Ħ": "H",
|
|
38014
|
+
"ĥ": "h",
|
|
38015
|
+
"ħ": "h",
|
|
38016
|
+
"Ĩ": "I",
|
|
38017
|
+
"Ī": "I",
|
|
38018
|
+
"Ĭ": "I",
|
|
38019
|
+
"Į": "I",
|
|
38020
|
+
"İ": "I",
|
|
38021
|
+
"ĩ": "i",
|
|
38022
|
+
"ī": "i",
|
|
38023
|
+
"ĭ": "i",
|
|
38024
|
+
"į": "i",
|
|
38025
|
+
"ı": "i",
|
|
38026
|
+
"Ĵ": "J",
|
|
38027
|
+
"ĵ": "j",
|
|
38028
|
+
"Ķ": "K",
|
|
38029
|
+
"ķ": "k",
|
|
38030
|
+
"ĸ": "k",
|
|
38031
|
+
"Ĺ": "L",
|
|
38032
|
+
"Ļ": "L",
|
|
38033
|
+
"Ľ": "L",
|
|
38034
|
+
"Ŀ": "L",
|
|
38035
|
+
"Ł": "L",
|
|
38036
|
+
"ĺ": "l",
|
|
38037
|
+
"ļ": "l",
|
|
38038
|
+
"ľ": "l",
|
|
38039
|
+
"ŀ": "l",
|
|
38040
|
+
"ł": "l",
|
|
38041
|
+
"Ń": "N",
|
|
38042
|
+
"Ņ": "N",
|
|
38043
|
+
"Ň": "N",
|
|
38044
|
+
"Ŋ": "N",
|
|
38045
|
+
"ń": "n",
|
|
38046
|
+
"ņ": "n",
|
|
38047
|
+
"ň": "n",
|
|
38048
|
+
"ŋ": "n",
|
|
38049
|
+
"Ō": "O",
|
|
38050
|
+
"Ŏ": "O",
|
|
38051
|
+
"Ő": "O",
|
|
38052
|
+
"ō": "o",
|
|
38053
|
+
"ŏ": "o",
|
|
38054
|
+
"ő": "o",
|
|
38055
|
+
"Ŕ": "R",
|
|
38056
|
+
"Ŗ": "R",
|
|
38057
|
+
"Ř": "R",
|
|
38058
|
+
"ŕ": "r",
|
|
38059
|
+
"ŗ": "r",
|
|
38060
|
+
"ř": "r",
|
|
38061
|
+
"Ś": "S",
|
|
38062
|
+
"Ŝ": "S",
|
|
38063
|
+
"Ş": "S",
|
|
38064
|
+
"Š": "S",
|
|
38065
|
+
"ś": "s",
|
|
38066
|
+
"ŝ": "s",
|
|
38067
|
+
"ş": "s",
|
|
38068
|
+
"š": "s",
|
|
38069
|
+
"Ţ": "T",
|
|
38070
|
+
"Ť": "T",
|
|
38071
|
+
"Ŧ": "T",
|
|
38072
|
+
"ţ": "t",
|
|
38073
|
+
"ť": "t",
|
|
38074
|
+
"ŧ": "t",
|
|
38075
|
+
"Ũ": "U",
|
|
38076
|
+
"Ū": "U",
|
|
38077
|
+
"Ŭ": "U",
|
|
38078
|
+
"Ů": "U",
|
|
38079
|
+
"Ű": "U",
|
|
38080
|
+
"Ų": "U",
|
|
38081
|
+
"ũ": "u",
|
|
38082
|
+
"ū": "u",
|
|
38083
|
+
"ŭ": "u",
|
|
38084
|
+
"ů": "u",
|
|
38085
|
+
"ű": "u",
|
|
38086
|
+
"ų": "u",
|
|
38087
|
+
"Ŵ": "W",
|
|
38088
|
+
"ŵ": "w",
|
|
38089
|
+
"Ŷ": "Y",
|
|
38090
|
+
"ŷ": "y",
|
|
38091
|
+
"Ÿ": "Y",
|
|
38092
|
+
"Ź": "Z",
|
|
38093
|
+
"Ż": "Z",
|
|
38094
|
+
"Ž": "Z",
|
|
38095
|
+
"ź": "z",
|
|
38096
|
+
"ż": "z",
|
|
38097
|
+
"ž": "z",
|
|
38098
|
+
"IJ": "IJ",
|
|
38099
|
+
"ij": "ij",
|
|
38100
|
+
"Œ": "Oe",
|
|
38101
|
+
"œ": "oe",
|
|
38102
|
+
"ʼn": "'n",
|
|
38103
|
+
"ſ": "ss"
|
|
38104
|
+
};
|
|
38105
|
+
/** Detect free variable `global` from Node.js. */
|
|
38106
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
38107
|
+
/** Detect free variable `self`. */
|
|
38108
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
38109
|
+
/** Used as a reference to the global object. */
|
|
38110
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
38111
|
+
/**
|
|
38112
|
+
* A specialized version of `_.reduce` for arrays without support for
|
|
38113
|
+
* iteratee shorthands.
|
|
38114
|
+
*
|
|
38115
|
+
* @private
|
|
38116
|
+
* @param {Array} [array] The array to iterate over.
|
|
38117
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
38118
|
+
* @param {*} [accumulator] The initial value.
|
|
38119
|
+
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
38120
|
+
* the initial value.
|
|
38121
|
+
* @returns {*} Returns the accumulated value.
|
|
38122
|
+
*/
|
|
38123
|
+
function arrayReduce(array$1, iteratee, accumulator, initAccum) {
|
|
38124
|
+
var index = -1, length = array$1 ? array$1.length : 0;
|
|
38125
|
+
if (initAccum && length) accumulator = array$1[++index];
|
|
38126
|
+
while (++index < length) accumulator = iteratee(accumulator, array$1[index], index, array$1);
|
|
38127
|
+
return accumulator;
|
|
38128
|
+
}
|
|
38129
|
+
/**
|
|
38130
|
+
* Splits an ASCII `string` into an array of its words.
|
|
38131
|
+
*
|
|
38132
|
+
* @private
|
|
38133
|
+
* @param {string} The string to inspect.
|
|
38134
|
+
* @returns {Array} Returns the words of `string`.
|
|
38135
|
+
*/
|
|
38136
|
+
function asciiWords(string$2) {
|
|
38137
|
+
return string$2.match(reAsciiWord) || [];
|
|
38138
|
+
}
|
|
38139
|
+
/**
|
|
38140
|
+
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
38141
|
+
*
|
|
38142
|
+
* @private
|
|
38143
|
+
* @param {Object} object The object to query.
|
|
38144
|
+
* @returns {Function} Returns the new accessor function.
|
|
38145
|
+
*/
|
|
38146
|
+
function basePropertyOf(object$1) {
|
|
38147
|
+
return function(key) {
|
|
38148
|
+
return object$1 == null ? void 0 : object$1[key];
|
|
38149
|
+
};
|
|
38150
|
+
}
|
|
38151
|
+
/**
|
|
38152
|
+
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
38153
|
+
* letters to basic Latin letters.
|
|
38154
|
+
*
|
|
38155
|
+
* @private
|
|
38156
|
+
* @param {string} letter The matched letter to deburr.
|
|
38157
|
+
* @returns {string} Returns the deburred letter.
|
|
38158
|
+
*/
|
|
38159
|
+
var deburrLetter = basePropertyOf(deburredLetters);
|
|
38160
|
+
/**
|
|
38161
|
+
* Checks if `string` contains a word composed of Unicode symbols.
|
|
38162
|
+
*
|
|
38163
|
+
* @private
|
|
38164
|
+
* @param {string} string The string to inspect.
|
|
38165
|
+
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
38166
|
+
*/
|
|
38167
|
+
function hasUnicodeWord(string$2) {
|
|
38168
|
+
return reHasUnicodeWord.test(string$2);
|
|
38169
|
+
}
|
|
38170
|
+
/**
|
|
38171
|
+
* Splits a Unicode `string` into an array of its words.
|
|
38172
|
+
*
|
|
38173
|
+
* @private
|
|
38174
|
+
* @param {string} The string to inspect.
|
|
38175
|
+
* @returns {Array} Returns the words of `string`.
|
|
38176
|
+
*/
|
|
38177
|
+
function unicodeWords(string$2) {
|
|
38178
|
+
return string$2.match(reUnicodeWord) || [];
|
|
38179
|
+
}
|
|
38180
|
+
/**
|
|
38181
|
+
* Used to resolve the
|
|
38182
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
38183
|
+
* of values.
|
|
38184
|
+
*/
|
|
38185
|
+
var objectToString = Object.prototype.toString;
|
|
38186
|
+
/** Built-in value references. */
|
|
38187
|
+
var Symbol = root.Symbol;
|
|
38188
|
+
/** Used to convert symbols to primitives and strings. */
|
|
38189
|
+
var symbolProto = Symbol ? Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
38190
|
+
/**
|
|
38191
|
+
* The base implementation of `_.toString` which doesn't convert nullish
|
|
38192
|
+
* values to empty strings.
|
|
38193
|
+
*
|
|
38194
|
+
* @private
|
|
38195
|
+
* @param {*} value The value to process.
|
|
38196
|
+
* @returns {string} Returns the string.
|
|
38197
|
+
*/
|
|
38198
|
+
function baseToString(value) {
|
|
38199
|
+
if (typeof value == "string") return value;
|
|
38200
|
+
if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
|
|
38201
|
+
var result = value + "";
|
|
38202
|
+
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
38203
|
+
}
|
|
38204
|
+
/**
|
|
38205
|
+
* Creates a function like `_.camelCase`.
|
|
38206
|
+
*
|
|
38207
|
+
* @private
|
|
38208
|
+
* @param {Function} callback The function to combine each word.
|
|
38209
|
+
* @returns {Function} Returns the new compounder function.
|
|
38210
|
+
*/
|
|
38211
|
+
function createCompounder(callback) {
|
|
38212
|
+
return function(string$2) {
|
|
38213
|
+
return arrayReduce(words(deburr(string$2).replace(reApos, "")), callback, "");
|
|
38214
|
+
};
|
|
38215
|
+
}
|
|
38216
|
+
/**
|
|
38217
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
38218
|
+
* and has a `typeof` result of "object".
|
|
38219
|
+
*
|
|
38220
|
+
* @static
|
|
38221
|
+
* @memberOf _
|
|
38222
|
+
* @since 4.0.0
|
|
38223
|
+
* @category Lang
|
|
38224
|
+
* @param {*} value The value to check.
|
|
38225
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
38226
|
+
* @example
|
|
38227
|
+
*
|
|
38228
|
+
* _.isObjectLike({});
|
|
38229
|
+
* // => true
|
|
38230
|
+
*
|
|
38231
|
+
* _.isObjectLike([1, 2, 3]);
|
|
38232
|
+
* // => true
|
|
38233
|
+
*
|
|
38234
|
+
* _.isObjectLike(_.noop);
|
|
38235
|
+
* // => false
|
|
38236
|
+
*
|
|
38237
|
+
* _.isObjectLike(null);
|
|
38238
|
+
* // => false
|
|
38239
|
+
*/
|
|
38240
|
+
function isObjectLike(value) {
|
|
38241
|
+
return !!value && typeof value == "object";
|
|
38242
|
+
}
|
|
38243
|
+
/**
|
|
38244
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
38245
|
+
*
|
|
38246
|
+
* @static
|
|
38247
|
+
* @memberOf _
|
|
38248
|
+
* @since 4.0.0
|
|
38249
|
+
* @category Lang
|
|
38250
|
+
* @param {*} value The value to check.
|
|
38251
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
38252
|
+
* @example
|
|
38253
|
+
*
|
|
38254
|
+
* _.isSymbol(Symbol.iterator);
|
|
38255
|
+
* // => true
|
|
38256
|
+
*
|
|
38257
|
+
* _.isSymbol('abc');
|
|
38258
|
+
* // => false
|
|
38259
|
+
*/
|
|
38260
|
+
function isSymbol(value) {
|
|
38261
|
+
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
38262
|
+
}
|
|
38263
|
+
/**
|
|
38264
|
+
* Converts `value` to a string. An empty string is returned for `null`
|
|
38265
|
+
* and `undefined` values. The sign of `-0` is preserved.
|
|
38266
|
+
*
|
|
38267
|
+
* @static
|
|
38268
|
+
* @memberOf _
|
|
38269
|
+
* @since 4.0.0
|
|
38270
|
+
* @category Lang
|
|
38271
|
+
* @param {*} value The value to process.
|
|
38272
|
+
* @returns {string} Returns the string.
|
|
38273
|
+
* @example
|
|
38274
|
+
*
|
|
38275
|
+
* _.toString(null);
|
|
38276
|
+
* // => ''
|
|
38277
|
+
*
|
|
38278
|
+
* _.toString(-0);
|
|
38279
|
+
* // => '-0'
|
|
38280
|
+
*
|
|
38281
|
+
* _.toString([1, 2, 3]);
|
|
38282
|
+
* // => '1,2,3'
|
|
38283
|
+
*/
|
|
38284
|
+
function toString(value) {
|
|
38285
|
+
return value == null ? "" : baseToString(value);
|
|
38286
|
+
}
|
|
38287
|
+
/**
|
|
38288
|
+
* Deburrs `string` by converting
|
|
38289
|
+
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
38290
|
+
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
38291
|
+
* letters to basic Latin letters and removing
|
|
38292
|
+
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
38293
|
+
*
|
|
38294
|
+
* @static
|
|
38295
|
+
* @memberOf _
|
|
38296
|
+
* @since 3.0.0
|
|
38297
|
+
* @category String
|
|
38298
|
+
* @param {string} [string=''] The string to deburr.
|
|
38299
|
+
* @returns {string} Returns the deburred string.
|
|
38300
|
+
* @example
|
|
38301
|
+
*
|
|
38302
|
+
* _.deburr('déjà vu');
|
|
38303
|
+
* // => 'deja vu'
|
|
38304
|
+
*/
|
|
38305
|
+
function deburr(string$2) {
|
|
38306
|
+
string$2 = toString(string$2);
|
|
38307
|
+
return string$2 && string$2.replace(reLatin, deburrLetter).replace(reComboMark, "");
|
|
38308
|
+
}
|
|
38309
|
+
/**
|
|
38310
|
+
* Converts `string` to
|
|
38311
|
+
* [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
|
|
38312
|
+
*
|
|
38313
|
+
* @static
|
|
38314
|
+
* @memberOf _
|
|
38315
|
+
* @since 3.0.0
|
|
38316
|
+
* @category String
|
|
38317
|
+
* @param {string} [string=''] The string to convert.
|
|
38318
|
+
* @returns {string} Returns the kebab cased string.
|
|
38319
|
+
* @example
|
|
38320
|
+
*
|
|
38321
|
+
* _.kebabCase('Foo Bar');
|
|
38322
|
+
* // => 'foo-bar'
|
|
38323
|
+
*
|
|
38324
|
+
* _.kebabCase('fooBar');
|
|
38325
|
+
* // => 'foo-bar'
|
|
38326
|
+
*
|
|
38327
|
+
* _.kebabCase('__FOO_BAR__');
|
|
38328
|
+
* // => 'foo-bar'
|
|
38329
|
+
*/
|
|
38330
|
+
var kebabCase = createCompounder(function(result, word, index) {
|
|
38331
|
+
return result + (index ? "-" : "") + word.toLowerCase();
|
|
38332
|
+
});
|
|
38333
|
+
/**
|
|
38334
|
+
* Splits `string` into an array of its words.
|
|
38335
|
+
*
|
|
38336
|
+
* @static
|
|
38337
|
+
* @memberOf _
|
|
38338
|
+
* @since 3.0.0
|
|
38339
|
+
* @category String
|
|
38340
|
+
* @param {string} [string=''] The string to inspect.
|
|
38341
|
+
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
38342
|
+
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
38343
|
+
* @returns {Array} Returns the words of `string`.
|
|
38344
|
+
* @example
|
|
38345
|
+
*
|
|
38346
|
+
* _.words('fred, barney, & pebbles');
|
|
38347
|
+
* // => ['fred', 'barney', 'pebbles']
|
|
38348
|
+
*
|
|
38349
|
+
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
38350
|
+
* // => ['fred', 'barney', '&', 'pebbles']
|
|
38351
|
+
*/
|
|
38352
|
+
function words(string$2, pattern, guard) {
|
|
38353
|
+
string$2 = toString(string$2);
|
|
38354
|
+
pattern = guard ? void 0 : pattern;
|
|
38355
|
+
if (pattern === void 0) return hasUnicodeWord(string$2) ? unicodeWords(string$2) : asciiWords(string$2);
|
|
38356
|
+
return string$2.match(pattern) || [];
|
|
38357
|
+
}
|
|
38358
|
+
module.exports = kebabCase;
|
|
38359
|
+
}));
|
|
38360
|
+
|
|
38073
38361
|
//#endregion
|
|
38074
38362
|
//#region src/cli/commands/project/create.ts
|
|
38363
|
+
var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
|
|
38075
38364
|
const DEFAULT_TEMPLATE_ID = "backend-only";
|
|
38076
38365
|
async function getTemplateById(templateId) {
|
|
38077
38366
|
const templates = await listTemplates();
|
|
@@ -38276,7 +38565,7 @@ function isInsideContainer() {
|
|
|
38276
38565
|
//#endregion
|
|
38277
38566
|
//#region node_modules/is-wsl/index.js
|
|
38278
38567
|
const isWsl = () => {
|
|
38279
|
-
if (
|
|
38568
|
+
if (process$1.platform !== "linux") return false;
|
|
38280
38569
|
if (os.release().toLowerCase().includes("microsoft")) {
|
|
38281
38570
|
if (isInsideContainer()) return false;
|
|
38282
38571
|
return true;
|
|
@@ -38287,12 +38576,12 @@ const isWsl = () => {
|
|
|
38287
38576
|
return false;
|
|
38288
38577
|
}
|
|
38289
38578
|
};
|
|
38290
|
-
var is_wsl_default =
|
|
38579
|
+
var is_wsl_default = process$1.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
38291
38580
|
|
|
38292
38581
|
//#endregion
|
|
38293
38582
|
//#region node_modules/powershell-utils/index.js
|
|
38294
38583
|
const execFile$2 = promisify(childProcess.execFile);
|
|
38295
|
-
const powerShellPath$1 = () => `${
|
|
38584
|
+
const powerShellPath$1 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
38296
38585
|
const executePowerShell = async (command, options = {}) => {
|
|
38297
38586
|
const { powerShellPath: psPath, ...execFileOptions } = options;
|
|
38298
38587
|
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
@@ -38403,7 +38692,7 @@ function defineLazyProperty(object$1, propertyName, valueGetter) {
|
|
|
38403
38692
|
//#region node_modules/default-browser-id/index.js
|
|
38404
38693
|
const execFileAsync$3 = promisify(execFile);
|
|
38405
38694
|
async function defaultBrowserId() {
|
|
38406
|
-
if (
|
|
38695
|
+
if (process$1.platform !== "darwin") throw new Error("macOS only");
|
|
38407
38696
|
const { stdout: stdout$1 } = await execFileAsync$3("defaults", [
|
|
38408
38697
|
"read",
|
|
38409
38698
|
"com.apple.LaunchServices/com.apple.launchservices.secure",
|
|
@@ -38418,7 +38707,7 @@ async function defaultBrowserId() {
|
|
|
38418
38707
|
//#region node_modules/run-applescript/index.js
|
|
38419
38708
|
const execFileAsync$2 = promisify(execFile);
|
|
38420
38709
|
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
38421
|
-
if (
|
|
38710
|
+
if (process$1.platform !== "darwin") throw new Error("macOS only");
|
|
38422
38711
|
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
38423
38712
|
const execOptions = {};
|
|
38424
38713
|
if (signal) execOptions.signal = signal;
|
|
@@ -38527,14 +38816,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
|
|
|
38527
38816
|
const execFileAsync = promisify(execFile);
|
|
38528
38817
|
const titleize = (string$2) => string$2.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x$2) => x$2.toUpperCase());
|
|
38529
38818
|
async function defaultBrowser() {
|
|
38530
|
-
if (
|
|
38819
|
+
if (process$1.platform === "darwin") {
|
|
38531
38820
|
const id = await defaultBrowserId();
|
|
38532
38821
|
return {
|
|
38533
38822
|
name: await bundleName(id),
|
|
38534
38823
|
id
|
|
38535
38824
|
};
|
|
38536
38825
|
}
|
|
38537
|
-
if (
|
|
38826
|
+
if (process$1.platform === "linux") {
|
|
38538
38827
|
const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
|
|
38539
38828
|
"query",
|
|
38540
38829
|
"default",
|
|
@@ -38546,13 +38835,13 @@ async function defaultBrowser() {
|
|
|
38546
38835
|
id
|
|
38547
38836
|
};
|
|
38548
38837
|
}
|
|
38549
|
-
if (
|
|
38838
|
+
if (process$1.platform === "win32") return defaultBrowser$1();
|
|
38550
38839
|
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
38551
38840
|
}
|
|
38552
38841
|
|
|
38553
38842
|
//#endregion
|
|
38554
38843
|
//#region node_modules/is-in-ssh/index.js
|
|
38555
|
-
const isInSsh = Boolean(
|
|
38844
|
+
const isInSsh = Boolean(process$1.env.SSH_CONNECTION || process$1.env.SSH_CLIENT || process$1.env.SSH_TTY);
|
|
38556
38845
|
var is_in_ssh_default = isInSsh;
|
|
38557
38846
|
|
|
38558
38847
|
//#endregion
|
|
@@ -38560,7 +38849,7 @@ var is_in_ssh_default = isInSsh;
|
|
|
38560
38849
|
const fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
38561
38850
|
const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
|
|
38562
38851
|
const localXdgOpenPath = path.join(__dirname, "xdg-open");
|
|
38563
|
-
const { platform: platform$1, arch } =
|
|
38852
|
+
const { platform: platform$1, arch } = process$1;
|
|
38564
38853
|
const tryEachApp = async (apps$1, opener) => {
|
|
38565
38854
|
if (apps$1.length === 0) return;
|
|
38566
38855
|
const errors = [];
|
|
@@ -38673,7 +38962,7 @@ const baseOpen = async (options) => {
|
|
|
38673
38962
|
await fs$1.access(localXdgOpenPath, constants$1.X_OK);
|
|
38674
38963
|
exeLocalXdgOpen = true;
|
|
38675
38964
|
} catch {}
|
|
38676
|
-
command =
|
|
38965
|
+
command = process$1.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
|
|
38677
38966
|
}
|
|
38678
38967
|
if (appArguments.length > 0) cliArguments.push(...appArguments);
|
|
38679
38968
|
if (!options.wait) {
|
|
@@ -38956,7 +39245,7 @@ const siteDeployCommand = new Command("site").description("Manage site deploymen
|
|
|
38956
39245
|
|
|
38957
39246
|
//#endregion
|
|
38958
39247
|
//#region package.json
|
|
38959
|
-
var version = "0.0.
|
|
39248
|
+
var version = "0.0.22";
|
|
38960
39249
|
|
|
38961
39250
|
//#endregion
|
|
38962
39251
|
//#region src/cli/program.ts
|
|
@@ -38971,6 +39260,7 @@ program.addCommand(dashboardCommand);
|
|
|
38971
39260
|
program.addCommand(deployCommand);
|
|
38972
39261
|
program.addCommand(linkCommand);
|
|
38973
39262
|
program.addCommand(entitiesPushCommand);
|
|
39263
|
+
program.addCommand(agentsCommand);
|
|
38974
39264
|
program.addCommand(functionsDeployCommand);
|
|
38975
39265
|
program.addCommand(siteDeployCommand);
|
|
38976
39266
|
|