@base44-preview/cli 0.0.17-pr.93.acb621a → 0.0.17-pr.95.543227e
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/bin/dev.js +12 -0
- package/bin/run.js +12 -0
- package/dist/{cli/index.js → index.js} +157 -102
- package/package.json +7 -8
- /package/dist/{cli/templates → templates}/backend-and-client/.nvmrc +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/README.md +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/base44/app.jsonc.ejs +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/base44/config.jsonc.ejs +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/base44/entities/task.jsonc +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/components.json +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/index.html +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/jsconfig.json +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/package.json +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/postcss.config.js +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/App.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/api/base44Client.js.ejs +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/components/Base44Logo.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/button.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/checkbox.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/input.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/index.css +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/main.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/tailwind.config.js +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/vite.config.js +0 -0
- /package/dist/{cli/templates → templates}/backend-only/base44/app.jsonc.ejs +0 -0
- /package/dist/{cli/templates → templates}/backend-only/base44/config.jsonc.ejs +0 -0
- /package/dist/{cli/templates → templates}/templates.json +0 -0
package/bin/dev.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
import { program, CLIExitError } from "../src/cli/index.ts";
|
|
3
|
+
|
|
4
|
+
try {
|
|
5
|
+
await program.parseAsync();
|
|
6
|
+
} catch (error) {
|
|
7
|
+
if (error instanceof CLIExitError) {
|
|
8
|
+
process.exit(error.code);
|
|
9
|
+
}
|
|
10
|
+
console.error(error);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
package/bin/run.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { program, CLIExitError } from "../dist/index.js";
|
|
3
|
+
|
|
4
|
+
try {
|
|
5
|
+
await program.parseAsync();
|
|
6
|
+
} catch (error) {
|
|
7
|
+
if (error instanceof CLIExitError) {
|
|
8
|
+
process.exit(error.code);
|
|
9
|
+
}
|
|
10
|
+
console.error(error);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import { createRequire } from "node:module";
|
|
3
2
|
import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:events";
|
|
4
3
|
import childProcess, { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
|
|
5
4
|
import path, { basename, dirname, join, posix, resolve, win32 } from "node:path";
|
|
6
5
|
import fs, { appendFileSync, createReadStream, createWriteStream, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
7
|
-
import
|
|
6
|
+
import y, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
|
|
8
7
|
import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
|
|
9
8
|
import * as g from "node:readline";
|
|
10
9
|
import O from "node:readline";
|
|
@@ -894,7 +893,7 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
894
893
|
const childProcess$1 = __require("node:child_process");
|
|
895
894
|
const path$15 = __require("node:path");
|
|
896
895
|
const fs$10 = __require("node:fs");
|
|
897
|
-
const process$
|
|
896
|
+
const process$3 = __require("node:process");
|
|
898
897
|
const { Argument, humanReadableArgName } = require_argument();
|
|
899
898
|
const { CommanderError } = require_error$1();
|
|
900
899
|
const { Help } = require_help();
|
|
@@ -945,10 +944,10 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
945
944
|
this._showHelpAfterError = false;
|
|
946
945
|
this._showSuggestionAfterError = true;
|
|
947
946
|
this._outputConfiguration = {
|
|
948
|
-
writeOut: (str) => process$
|
|
949
|
-
writeErr: (str) => process$
|
|
950
|
-
getOutHelpWidth: () => process$
|
|
951
|
-
getErrHelpWidth: () => process$
|
|
947
|
+
writeOut: (str) => process$3.stdout.write(str),
|
|
948
|
+
writeErr: (str) => process$3.stderr.write(str),
|
|
949
|
+
getOutHelpWidth: () => process$3.stdout.isTTY ? process$3.stdout.columns : void 0,
|
|
950
|
+
getErrHelpWidth: () => process$3.stderr.isTTY ? process$3.stderr.columns : void 0,
|
|
952
951
|
outputError: (str, write) => write(str)
|
|
953
952
|
};
|
|
954
953
|
this._hidden = false;
|
|
@@ -1302,7 +1301,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1302
1301
|
*/
|
|
1303
1302
|
_exit(exitCode, code$1, message) {
|
|
1304
1303
|
if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code$1, message));
|
|
1305
|
-
process$
|
|
1304
|
+
process$3.exit(exitCode);
|
|
1306
1305
|
}
|
|
1307
1306
|
/**
|
|
1308
1307
|
* Register callback `fn` for the command.
|
|
@@ -1641,11 +1640,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1641
1640
|
if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
|
|
1642
1641
|
parseOptions = parseOptions || {};
|
|
1643
1642
|
if (argv === void 0 && parseOptions.from === void 0) {
|
|
1644
|
-
if (process$
|
|
1645
|
-
const execArgv$1 = process$
|
|
1643
|
+
if (process$3.versions?.electron) parseOptions.from = "electron";
|
|
1644
|
+
const execArgv$1 = process$3.execArgv ?? [];
|
|
1646
1645
|
if (execArgv$1.includes("-e") || execArgv$1.includes("--eval") || execArgv$1.includes("-p") || execArgv$1.includes("--print")) parseOptions.from = "eval";
|
|
1647
1646
|
}
|
|
1648
|
-
if (argv === void 0) argv = process$
|
|
1647
|
+
if (argv === void 0) argv = process$3.argv;
|
|
1649
1648
|
this.rawArgs = argv.slice();
|
|
1650
1649
|
let userArgs;
|
|
1651
1650
|
switch (parseOptions.from) {
|
|
@@ -1655,7 +1654,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1655
1654
|
userArgs = argv.slice(2);
|
|
1656
1655
|
break;
|
|
1657
1656
|
case "electron":
|
|
1658
|
-
if (process$
|
|
1657
|
+
if (process$3.defaultApp) {
|
|
1659
1658
|
this._scriptPath = argv[1];
|
|
1660
1659
|
userArgs = argv.slice(2);
|
|
1661
1660
|
} else userArgs = argv.slice(1);
|
|
@@ -1769,15 +1768,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1769
1768
|
}
|
|
1770
1769
|
launchWithNode = sourceExt.includes(path$15.extname(executableFile));
|
|
1771
1770
|
let proc$1;
|
|
1772
|
-
if (process$
|
|
1771
|
+
if (process$3.platform !== "win32") if (launchWithNode) {
|
|
1773
1772
|
args.unshift(executableFile);
|
|
1774
|
-
args = incrementNodeInspectorPort(process$
|
|
1775
|
-
proc$1 = childProcess$1.spawn(process$
|
|
1773
|
+
args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
|
|
1774
|
+
proc$1 = childProcess$1.spawn(process$3.argv[0], args, { stdio: "inherit" });
|
|
1776
1775
|
} else proc$1 = childProcess$1.spawn(executableFile, args, { stdio: "inherit" });
|
|
1777
1776
|
else {
|
|
1778
1777
|
args.unshift(executableFile);
|
|
1779
|
-
args = incrementNodeInspectorPort(process$
|
|
1780
|
-
proc$1 = childProcess$1.spawn(process$
|
|
1778
|
+
args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
|
|
1779
|
+
proc$1 = childProcess$1.spawn(process$3.execPath, args, { stdio: "inherit" });
|
|
1781
1780
|
}
|
|
1782
1781
|
if (!proc$1.killed) [
|
|
1783
1782
|
"SIGUSR1",
|
|
@@ -1786,14 +1785,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1786
1785
|
"SIGINT",
|
|
1787
1786
|
"SIGHUP"
|
|
1788
1787
|
].forEach((signal) => {
|
|
1789
|
-
process$
|
|
1788
|
+
process$3.on(signal, () => {
|
|
1790
1789
|
if (proc$1.killed === false && proc$1.exitCode === null) proc$1.kill(signal);
|
|
1791
1790
|
});
|
|
1792
1791
|
});
|
|
1793
1792
|
const exitCallback = this._exitCallback;
|
|
1794
1793
|
proc$1.on("close", (code$1) => {
|
|
1795
1794
|
code$1 = code$1 ?? 1;
|
|
1796
|
-
if (!exitCallback) process$
|
|
1795
|
+
if (!exitCallback) process$3.exit(code$1);
|
|
1797
1796
|
else exitCallback(new CommanderError(code$1, "commander.executeSubCommandAsync", "(close)"));
|
|
1798
1797
|
});
|
|
1799
1798
|
proc$1.on("error", (err) => {
|
|
@@ -1805,7 +1804,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1805
1804
|
- ${executableDirMessage}`;
|
|
1806
1805
|
throw new Error(executableMissing);
|
|
1807
1806
|
} else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
|
|
1808
|
-
if (!exitCallback) process$
|
|
1807
|
+
if (!exitCallback) process$3.exit(1);
|
|
1809
1808
|
else {
|
|
1810
1809
|
const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
|
|
1811
1810
|
wrappedError.nestedError = err;
|
|
@@ -2211,13 +2210,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2211
2210
|
*/
|
|
2212
2211
|
_parseOptionsEnv() {
|
|
2213
2212
|
this.options.forEach((option) => {
|
|
2214
|
-
if (option.envVar && option.envVar in process$
|
|
2213
|
+
if (option.envVar && option.envVar in process$3.env) {
|
|
2215
2214
|
const optionKey = option.attributeName();
|
|
2216
2215
|
if (this.getOptionValue(optionKey) === void 0 || [
|
|
2217
2216
|
"default",
|
|
2218
2217
|
"config",
|
|
2219
2218
|
"env"
|
|
2220
|
-
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$
|
|
2219
|
+
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$3.env[option.envVar]);
|
|
2221
2220
|
else this.emit(`optionEnv:${option.name()}`);
|
|
2222
2221
|
}
|
|
2223
2222
|
});
|
|
@@ -2596,7 +2595,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2596
2595
|
*/
|
|
2597
2596
|
help(contextOptions) {
|
|
2598
2597
|
this.outputHelp(contextOptions);
|
|
2599
|
-
let exitCode = process$
|
|
2598
|
+
let exitCode = process$3.exitCode || 0;
|
|
2600
2599
|
if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
|
|
2601
2600
|
this._exit(exitCode, "commander.help", "(outputHelp)");
|
|
2602
2601
|
}
|
|
@@ -2712,16 +2711,16 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2712
2711
|
const CSI = `${ESC}[`;
|
|
2713
2712
|
const beep = "\x07";
|
|
2714
2713
|
const cursor = {
|
|
2715
|
-
to(x$2, y$
|
|
2716
|
-
if (!y$
|
|
2717
|
-
return `${CSI}${y$
|
|
2714
|
+
to(x$2, y$2) {
|
|
2715
|
+
if (!y$2) return `${CSI}${x$2 + 1}G`;
|
|
2716
|
+
return `${CSI}${y$2 + 1};${x$2 + 1}H`;
|
|
2718
2717
|
},
|
|
2719
|
-
move(x$2, y$
|
|
2718
|
+
move(x$2, y$2) {
|
|
2720
2719
|
let ret = "";
|
|
2721
2720
|
if (x$2 < 0) ret += `${CSI}${-x$2}D`;
|
|
2722
2721
|
else if (x$2 > 0) ret += `${CSI}${x$2}C`;
|
|
2723
|
-
if (y$
|
|
2724
|
-
else if (y$
|
|
2722
|
+
if (y$2 < 0) ret += `${CSI}${-y$2}A`;
|
|
2723
|
+
else if (y$2 > 0) ret += `${CSI}${y$2}B`;
|
|
2725
2724
|
return ret;
|
|
2726
2725
|
},
|
|
2727
2726
|
up: (count$1 = 1) => `${CSI}${count$1}A`,
|
|
@@ -3031,13 +3030,13 @@ function rD() {
|
|
|
3031
3030
|
}
|
|
3032
3031
|
}), r;
|
|
3033
3032
|
}
|
|
3034
|
-
const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y = "\x07", V$1 = "[", nD = "]", G$1 = "m", _$1 = `${nD}8;;`, z = (e$1) => `${d$1.values().next().value}${V$1}${e$1}${G$1}`, K$1 = (e$1) => `${d$1.values().next().value}${_$1}${e$1}${y}`, aD = (e$1) => e$1.split(" ").map((u$2) => p(u$2)), k$1 = (e$1, u$2, t) => {
|
|
3033
|
+
const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y$1 = "\x07", V$1 = "[", nD = "]", G$1 = "m", _$1 = `${nD}8;;`, z = (e$1) => `${d$1.values().next().value}${V$1}${e$1}${G$1}`, K$1 = (e$1) => `${d$1.values().next().value}${_$1}${e$1}${y$1}`, aD = (e$1) => e$1.split(" ").map((u$2) => p(u$2)), k$1 = (e$1, u$2, t) => {
|
|
3035
3034
|
const F$1 = [...u$2];
|
|
3036
3035
|
let s = !1, i$1 = !1, D$1 = p(P$1(e$1[e$1.length - 1]));
|
|
3037
3036
|
for (const [C$1, n$1] of F$1.entries()) {
|
|
3038
3037
|
const E = p(n$1);
|
|
3039
3038
|
if (D$1 + E <= t ? e$1[e$1.length - 1] += n$1 : (e$1.push(n$1), D$1 = 0), d$1.has(n$1) && (s = !0, i$1 = F$1.slice(C$1 + 1).join("").startsWith(_$1)), s) {
|
|
3040
|
-
i$1 ? n$1 === y && (s = !1, i$1 = !1) : n$1 === G$1 && (s = !1);
|
|
3039
|
+
i$1 ? n$1 === y$1 && (s = !1, i$1 = !1) : n$1 === G$1 && (s = !1);
|
|
3041
3040
|
continue;
|
|
3042
3041
|
}
|
|
3043
3042
|
D$1 += E, D$1 === t && C$1 < F$1.length - 1 && (e$1.push(""), D$1 = 0);
|
|
@@ -3079,7 +3078,7 @@ const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y = "\x07", V$1 = "[",
|
|
|
3079
3078
|
`)];
|
|
3080
3079
|
for (const [E, a$1] of n$1.entries()) {
|
|
3081
3080
|
if (F$1 += a$1, d$1.has(a$1)) {
|
|
3082
|
-
const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y})`)).exec(n$1.slice(E).join("")) || { groups: {} };
|
|
3081
|
+
const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y$1})`)).exec(n$1.slice(E).join("")) || { groups: {} };
|
|
3083
3082
|
if (c$1.code !== void 0) {
|
|
3084
3083
|
const f = Number.parseFloat(c$1.code);
|
|
3085
3084
|
s = f === oD ? void 0 : f;
|
|
@@ -3480,7 +3479,7 @@ var RD = class extends x$1 {
|
|
|
3480
3479
|
//#endregion
|
|
3481
3480
|
//#region node_modules/@clack/prompts/dist/index.mjs
|
|
3482
3481
|
function ce() {
|
|
3483
|
-
return
|
|
3482
|
+
return y.platform !== "win32" ? y.env.TERM !== "linux" : !!y.env.CI || !!y.env.WT_SESSION || !!y.env.TERMINUS_SUBLIME || y.env.ConEmuTask === "{cmd::Cmder}" || y.env.TERM_PROGRAM === "Terminus-Sublime" || y.env.TERM_PROGRAM === "vscode" || y.env.TERM === "xterm-256color" || y.env.TERM === "alacritty" || y.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
3484
3483
|
}
|
|
3485
3484
|
const V = ce(), u$1 = (t, n$1) => V ? t : n$1, le = u$1("◆", "*"), L = u$1("■", "x"), W = u$1("▲", "x"), C = u$1("◇", "o"), ue = u$1("┌", "T"), o$1 = u$1("│", "|"), d = u$1("└", "—"), k = u$1("●", ">"), P = u$1("○", " "), A = u$1("◻", "[•]"), T = u$1("◼", "[+]"), F = u$1("◻", "[ ]"), $e = u$1("▪", "•"), _ = u$1("─", "-"), me = u$1("╮", "+"), de = u$1("├", "+"), pe = u$1("╯", "+"), q = u$1("●", "•"), D = u$1("◆", "*"), U = u$1("▲", "!"), K = u$1("■", "x"), b = (t) => {
|
|
3486
3485
|
switch (t) {
|
|
@@ -6654,7 +6653,7 @@ function initializeContext(params) {
|
|
|
6654
6653
|
external: params?.external ?? void 0
|
|
6655
6654
|
};
|
|
6656
6655
|
}
|
|
6657
|
-
function process$
|
|
6656
|
+
function process$2(schema, ctx, _params = {
|
|
6658
6657
|
path: [],
|
|
6659
6658
|
schemaPath: []
|
|
6660
6659
|
}) {
|
|
@@ -6691,7 +6690,7 @@ function process$3(schema, ctx, _params = {
|
|
|
6691
6690
|
const parent = schema._zod.parent;
|
|
6692
6691
|
if (parent) {
|
|
6693
6692
|
if (!result.ref) result.ref = parent;
|
|
6694
|
-
process$
|
|
6693
|
+
process$2(parent, ctx, params);
|
|
6695
6694
|
ctx.seen.get(parent).isParent = true;
|
|
6696
6695
|
}
|
|
6697
6696
|
}
|
|
@@ -6903,7 +6902,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
6903
6902
|
...params,
|
|
6904
6903
|
processors
|
|
6905
6904
|
});
|
|
6906
|
-
process$
|
|
6905
|
+
process$2(schema, ctx);
|
|
6907
6906
|
extractDefs(ctx, schema);
|
|
6908
6907
|
return finalize(ctx, schema);
|
|
6909
6908
|
};
|
|
@@ -6915,7 +6914,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
6915
6914
|
io,
|
|
6916
6915
|
processors
|
|
6917
6916
|
});
|
|
6918
|
-
process$
|
|
6917
|
+
process$2(schema, ctx);
|
|
6919
6918
|
extractDefs(ctx, schema);
|
|
6920
6919
|
return finalize(ctx, schema);
|
|
6921
6920
|
};
|
|
@@ -7002,7 +7001,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
7002
7001
|
if (typeof minimum === "number") json.minItems = minimum;
|
|
7003
7002
|
if (typeof maximum === "number") json.maxItems = maximum;
|
|
7004
7003
|
json.type = "array";
|
|
7005
|
-
json.items = process$
|
|
7004
|
+
json.items = process$2(def.element, ctx, {
|
|
7006
7005
|
...params,
|
|
7007
7006
|
path: [...params.path, "items"]
|
|
7008
7007
|
});
|
|
@@ -7013,7 +7012,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7013
7012
|
json.type = "object";
|
|
7014
7013
|
json.properties = {};
|
|
7015
7014
|
const shape = def.shape;
|
|
7016
|
-
for (const key in shape) json.properties[key] = process$
|
|
7015
|
+
for (const key in shape) json.properties[key] = process$2(shape[key], ctx, {
|
|
7017
7016
|
...params,
|
|
7018
7017
|
path: [
|
|
7019
7018
|
...params.path,
|
|
@@ -7031,7 +7030,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7031
7030
|
if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
|
|
7032
7031
|
else if (!def.catchall) {
|
|
7033
7032
|
if (ctx.io === "output") json.additionalProperties = false;
|
|
7034
|
-
} else if (def.catchall) json.additionalProperties = process$
|
|
7033
|
+
} else if (def.catchall) json.additionalProperties = process$2(def.catchall, ctx, {
|
|
7035
7034
|
...params,
|
|
7036
7035
|
path: [...params.path, "additionalProperties"]
|
|
7037
7036
|
});
|
|
@@ -7039,7 +7038,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7039
7038
|
const unionProcessor = (schema, ctx, json, params) => {
|
|
7040
7039
|
const def = schema._zod.def;
|
|
7041
7040
|
const isExclusive = def.inclusive === false;
|
|
7042
|
-
const options = def.options.map((x$2, i$1) => process$
|
|
7041
|
+
const options = def.options.map((x$2, i$1) => process$2(x$2, ctx, {
|
|
7043
7042
|
...params,
|
|
7044
7043
|
path: [
|
|
7045
7044
|
...params.path,
|
|
@@ -7052,7 +7051,7 @@ const unionProcessor = (schema, ctx, json, params) => {
|
|
|
7052
7051
|
};
|
|
7053
7052
|
const intersectionProcessor = (schema, ctx, json, params) => {
|
|
7054
7053
|
const def = schema._zod.def;
|
|
7055
|
-
const a$1 = process$
|
|
7054
|
+
const a$1 = process$2(def.left, ctx, {
|
|
7056
7055
|
...params,
|
|
7057
7056
|
path: [
|
|
7058
7057
|
...params.path,
|
|
@@ -7060,7 +7059,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
|
|
|
7060
7059
|
0
|
|
7061
7060
|
]
|
|
7062
7061
|
});
|
|
7063
|
-
const b$2 = process$
|
|
7062
|
+
const b$2 = process$2(def.right, ctx, {
|
|
7064
7063
|
...params,
|
|
7065
7064
|
path: [
|
|
7066
7065
|
...params.path,
|
|
@@ -7077,7 +7076,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7077
7076
|
json.type = "array";
|
|
7078
7077
|
const prefixPath$1 = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
7079
7078
|
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
7080
|
-
const prefixItems = def.items.map((x$2, i$1) => process$
|
|
7079
|
+
const prefixItems = def.items.map((x$2, i$1) => process$2(x$2, ctx, {
|
|
7081
7080
|
...params,
|
|
7082
7081
|
path: [
|
|
7083
7082
|
...params.path,
|
|
@@ -7085,7 +7084,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7085
7084
|
i$1
|
|
7086
7085
|
]
|
|
7087
7086
|
}));
|
|
7088
|
-
const rest = def.rest ? process$
|
|
7087
|
+
const rest = def.rest ? process$2(def.rest, ctx, {
|
|
7089
7088
|
...params,
|
|
7090
7089
|
path: [
|
|
7091
7090
|
...params.path,
|
|
@@ -7111,7 +7110,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7111
7110
|
};
|
|
7112
7111
|
const nullableProcessor = (schema, ctx, json, params) => {
|
|
7113
7112
|
const def = schema._zod.def;
|
|
7114
|
-
const inner = process$
|
|
7113
|
+
const inner = process$2(def.innerType, ctx, params);
|
|
7115
7114
|
const seen = ctx.seen.get(schema);
|
|
7116
7115
|
if (ctx.target === "openapi-3.0") {
|
|
7117
7116
|
seen.ref = def.innerType;
|
|
@@ -7120,27 +7119,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
|
|
|
7120
7119
|
};
|
|
7121
7120
|
const nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
7122
7121
|
const def = schema._zod.def;
|
|
7123
|
-
process$
|
|
7122
|
+
process$2(def.innerType, ctx, params);
|
|
7124
7123
|
const seen = ctx.seen.get(schema);
|
|
7125
7124
|
seen.ref = def.innerType;
|
|
7126
7125
|
};
|
|
7127
7126
|
const defaultProcessor = (schema, ctx, json, params) => {
|
|
7128
7127
|
const def = schema._zod.def;
|
|
7129
|
-
process$
|
|
7128
|
+
process$2(def.innerType, ctx, params);
|
|
7130
7129
|
const seen = ctx.seen.get(schema);
|
|
7131
7130
|
seen.ref = def.innerType;
|
|
7132
7131
|
json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7133
7132
|
};
|
|
7134
7133
|
const prefaultProcessor = (schema, ctx, json, params) => {
|
|
7135
7134
|
const def = schema._zod.def;
|
|
7136
|
-
process$
|
|
7135
|
+
process$2(def.innerType, ctx, params);
|
|
7137
7136
|
const seen = ctx.seen.get(schema);
|
|
7138
7137
|
seen.ref = def.innerType;
|
|
7139
7138
|
if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7140
7139
|
};
|
|
7141
7140
|
const catchProcessor = (schema, ctx, json, params) => {
|
|
7142
7141
|
const def = schema._zod.def;
|
|
7143
|
-
process$
|
|
7142
|
+
process$2(def.innerType, ctx, params);
|
|
7144
7143
|
const seen = ctx.seen.get(schema);
|
|
7145
7144
|
seen.ref = def.innerType;
|
|
7146
7145
|
let catchValue;
|
|
@@ -7154,20 +7153,20 @@ const catchProcessor = (schema, ctx, json, params) => {
|
|
|
7154
7153
|
const pipeProcessor = (schema, ctx, _json, params) => {
|
|
7155
7154
|
const def = schema._zod.def;
|
|
7156
7155
|
const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
7157
|
-
process$
|
|
7156
|
+
process$2(innerType, ctx, params);
|
|
7158
7157
|
const seen = ctx.seen.get(schema);
|
|
7159
7158
|
seen.ref = innerType;
|
|
7160
7159
|
};
|
|
7161
7160
|
const readonlyProcessor = (schema, ctx, json, params) => {
|
|
7162
7161
|
const def = schema._zod.def;
|
|
7163
|
-
process$
|
|
7162
|
+
process$2(def.innerType, ctx, params);
|
|
7164
7163
|
const seen = ctx.seen.get(schema);
|
|
7165
7164
|
seen.ref = def.innerType;
|
|
7166
7165
|
json.readOnly = true;
|
|
7167
7166
|
};
|
|
7168
7167
|
const optionalProcessor = (schema, ctx, _json, params) => {
|
|
7169
7168
|
const def = schema._zod.def;
|
|
7170
|
-
process$
|
|
7169
|
+
process$2(def.innerType, ctx, params);
|
|
7171
7170
|
const seen = ctx.seen.get(schema);
|
|
7172
7171
|
seen.ref = def.innerType;
|
|
7173
7172
|
};
|
|
@@ -16193,7 +16192,7 @@ const createIgnorePredicate = (patterns, cwd, baseDir) => {
|
|
|
16193
16192
|
};
|
|
16194
16193
|
const normalizeOptions$2 = (options = {}) => {
|
|
16195
16194
|
const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
|
|
16196
|
-
const cwd = toPath$1(options.cwd) ??
|
|
16195
|
+
const cwd = toPath$1(options.cwd) ?? y.cwd();
|
|
16197
16196
|
const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
|
|
16198
16197
|
return {
|
|
16199
16198
|
cwd,
|
|
@@ -16290,7 +16289,7 @@ const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
|
16290
16289
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
16291
16290
|
return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
16292
16291
|
};
|
|
16293
|
-
const directoryToGlob = async (directoryPaths, { cwd =
|
|
16292
|
+
const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => {
|
|
16294
16293
|
return (await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
16295
16294
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16296
16295
|
directoryPath,
|
|
@@ -16304,7 +16303,7 @@ const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, e
|
|
|
16304
16303
|
}) : directoryPath;
|
|
16305
16304
|
}))).flat();
|
|
16306
16305
|
};
|
|
16307
|
-
const directoryToGlobSync = (directoryPaths, { cwd =
|
|
16306
|
+
const directoryToGlobSync = (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
|
|
16308
16307
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16309
16308
|
directoryPath,
|
|
16310
16309
|
files,
|
|
@@ -16400,7 +16399,7 @@ const applyIgnoreFilesAndGetFilterSync = (options) => {
|
|
|
16400
16399
|
};
|
|
16401
16400
|
const createFilterFunction = (isIgnored, cwd) => {
|
|
16402
16401
|
const seen = /* @__PURE__ */ new Set();
|
|
16403
|
-
const basePath = cwd ||
|
|
16402
|
+
const basePath = cwd || y.cwd();
|
|
16404
16403
|
const pathCache = /* @__PURE__ */ new Map();
|
|
16405
16404
|
return (fastGlobResult) => {
|
|
16406
16405
|
const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
@@ -30586,6 +30585,21 @@ async function getUserInfo(accessToken) {
|
|
|
30586
30585
|
return result.data;
|
|
30587
30586
|
}
|
|
30588
30587
|
|
|
30588
|
+
//#endregion
|
|
30589
|
+
//#region src/cli/errors.ts
|
|
30590
|
+
/**
|
|
30591
|
+
* Error thrown to signal a controlled CLI exit with a specific exit code.
|
|
30592
|
+
* This allows proper error propagation without calling process.exit() directly,
|
|
30593
|
+
* making the code more testable and maintaining a single exit point.
|
|
30594
|
+
*/
|
|
30595
|
+
var CLIExitError = class extends Error {
|
|
30596
|
+
constructor(code$1) {
|
|
30597
|
+
super(`CLI exited with code ${code$1}`);
|
|
30598
|
+
this.code = code$1;
|
|
30599
|
+
this.name = "CLIExitError";
|
|
30600
|
+
}
|
|
30601
|
+
};
|
|
30602
|
+
|
|
30589
30603
|
//#endregion
|
|
30590
30604
|
//#region node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
30591
30605
|
const ANSI_BACKGROUND_OFFSET = 10;
|
|
@@ -30754,13 +30768,13 @@ var ansi_styles_default = ansiStyles;
|
|
|
30754
30768
|
|
|
30755
30769
|
//#endregion
|
|
30756
30770
|
//#region node_modules/chalk/source/vendor/supports-color/index.js
|
|
30757
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
30771
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : y.argv) {
|
|
30758
30772
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
30759
30773
|
const position = argv.indexOf(prefix + flag);
|
|
30760
30774
|
const terminatorPosition = argv.indexOf("--");
|
|
30761
30775
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
30762
30776
|
}
|
|
30763
|
-
const { env } =
|
|
30777
|
+
const { env } = y;
|
|
30764
30778
|
let flagForceColor;
|
|
30765
30779
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
30766
30780
|
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
@@ -30793,7 +30807,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
30793
30807
|
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
30794
30808
|
const min = forceColor || 0;
|
|
30795
30809
|
if (env.TERM === "dumb") return min;
|
|
30796
|
-
if (
|
|
30810
|
+
if (y.platform === "win32") {
|
|
30797
30811
|
const osRelease = os.release().split(".");
|
|
30798
30812
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
30799
30813
|
return 1;
|
|
@@ -31152,7 +31166,7 @@ async function runCommand(commandFn, options) {
|
|
|
31152
31166
|
} catch (e$1) {
|
|
31153
31167
|
if (e$1 instanceof Error) M.error(e$1.stack ?? e$1.message);
|
|
31154
31168
|
else M.error(String(e$1));
|
|
31155
|
-
|
|
31169
|
+
throw new CLIExitError(1);
|
|
31156
31170
|
}
|
|
31157
31171
|
}
|
|
31158
31172
|
|
|
@@ -31532,9 +31546,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
|
|
|
31532
31546
|
//#region node_modules/execa/lib/utils/standard-stream.js
|
|
31533
31547
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
31534
31548
|
const STANDARD_STREAMS = [
|
|
31535
|
-
|
|
31536
|
-
|
|
31537
|
-
|
|
31549
|
+
y.stdin,
|
|
31550
|
+
y.stdout,
|
|
31551
|
+
y.stderr
|
|
31538
31552
|
];
|
|
31539
31553
|
const STANDARD_STREAMS_ALIASES = [
|
|
31540
31554
|
"stdin",
|
|
@@ -31659,9 +31673,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
31659
31673
|
//#endregion
|
|
31660
31674
|
//#region node_modules/is-unicode-supported/index.js
|
|
31661
31675
|
function isUnicodeSupported() {
|
|
31662
|
-
const { env: env$1 } =
|
|
31676
|
+
const { env: env$1 } = y;
|
|
31663
31677
|
const { TERM, TERM_PROGRAM } = env$1;
|
|
31664
|
-
if (
|
|
31678
|
+
if (y.platform !== "win32") return TERM !== "linux";
|
|
31665
31679
|
return Boolean(env$1.WT_SESSION) || Boolean(env$1.TERMINUS_SUBLIME) || env$1.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env$1.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
31666
31680
|
}
|
|
31667
31681
|
|
|
@@ -32588,7 +32602,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
32588
32602
|
|
|
32589
32603
|
//#endregion
|
|
32590
32604
|
//#region node_modules/npm-run-path/index.js
|
|
32591
|
-
const npmRunPath = ({ cwd =
|
|
32605
|
+
const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
|
|
32592
32606
|
const cwdPath = path.resolve(toPath(cwd));
|
|
32593
32607
|
const result = [];
|
|
32594
32608
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -32606,7 +32620,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
|
32606
32620
|
const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
|
|
32607
32621
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32608
32622
|
};
|
|
32609
|
-
const npmRunPathEnv = ({ env: env$1 =
|
|
32623
|
+
const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
|
|
32610
32624
|
env$1 = { ...env$1 };
|
|
32611
32625
|
const pathName = pathKey({ env: env$1 });
|
|
32612
32626
|
options.path = env$1[pathName];
|
|
@@ -33741,7 +33755,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
33741
33755
|
};
|
|
33742
33756
|
const getDefaultCwd = () => {
|
|
33743
33757
|
try {
|
|
33744
|
-
return
|
|
33758
|
+
return y.cwd();
|
|
33745
33759
|
} catch (error) {
|
|
33746
33760
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
33747
33761
|
throw error;
|
|
@@ -33776,7 +33790,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
33776
33790
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
33777
33791
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
33778
33792
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
33779
|
-
if (
|
|
33793
|
+
if (y.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
33780
33794
|
return {
|
|
33781
33795
|
file,
|
|
33782
33796
|
commandArguments,
|
|
@@ -33803,7 +33817,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
33803
33817
|
});
|
|
33804
33818
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
33805
33819
|
const env$1 = extendEnv ? {
|
|
33806
|
-
...
|
|
33820
|
+
...y.env,
|
|
33807
33821
|
...envOption
|
|
33808
33822
|
} : envOption;
|
|
33809
33823
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -34803,12 +34817,12 @@ const guessStreamDirection = {
|
|
|
34803
34817
|
}
|
|
34804
34818
|
};
|
|
34805
34819
|
const getStandardStreamDirection = (value) => {
|
|
34806
|
-
if ([0,
|
|
34820
|
+
if ([0, y.stdin].includes(value)) return "input";
|
|
34807
34821
|
if ([
|
|
34808
34822
|
1,
|
|
34809
34823
|
2,
|
|
34810
|
-
|
|
34811
|
-
|
|
34824
|
+
y.stdout,
|
|
34825
|
+
y.stderr
|
|
34812
34826
|
].includes(value)) return "output";
|
|
34813
34827
|
};
|
|
34814
34828
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -35872,9 +35886,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
35872
35886
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
35873
35887
|
};
|
|
35874
35888
|
const getIpcExport = () => {
|
|
35875
|
-
const anyProcess =
|
|
35889
|
+
const anyProcess = y;
|
|
35876
35890
|
const isSubprocess = true;
|
|
35877
|
-
const ipc =
|
|
35891
|
+
const ipc = y.channel !== void 0;
|
|
35878
35892
|
return {
|
|
35879
35893
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
35880
35894
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -36116,7 +36130,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
|
|
|
36116
36130
|
|
|
36117
36131
|
//#endregion
|
|
36118
36132
|
//#region node_modules/signal-exit/dist/mjs/index.js
|
|
36119
|
-
const processOk = (process$
|
|
36133
|
+
const processOk = (process$4) => !!process$4 && typeof process$4 === "object" && typeof process$4.removeListener === "function" && typeof process$4.emit === "function" && typeof process$4.reallyExit === "function" && typeof process$4.listeners === "function" && typeof process$4.kill === "function" && typeof process$4.pid === "number" && typeof process$4.on === "function";
|
|
36120
36134
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
36121
36135
|
const global$1 = globalThis;
|
|
36122
36136
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -36184,7 +36198,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
36184
36198
|
};
|
|
36185
36199
|
var SignalExit = class extends SignalExitBase {
|
|
36186
36200
|
/* c8 ignore start */
|
|
36187
|
-
#hupSig = process$
|
|
36201
|
+
#hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
36188
36202
|
/* c8 ignore stop */
|
|
36189
36203
|
#emitter = new Emitter();
|
|
36190
36204
|
#process;
|
|
@@ -36192,15 +36206,15 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36192
36206
|
#originalProcessReallyExit;
|
|
36193
36207
|
#sigListeners = {};
|
|
36194
36208
|
#loaded = false;
|
|
36195
|
-
constructor(process$
|
|
36209
|
+
constructor(process$4) {
|
|
36196
36210
|
super();
|
|
36197
|
-
this.#process = process$
|
|
36211
|
+
this.#process = process$4;
|
|
36198
36212
|
this.#sigListeners = {};
|
|
36199
36213
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
36200
36214
|
const listeners = this.#process.listeners(sig);
|
|
36201
36215
|
let { count: count$1 } = this.#emitter;
|
|
36202
36216
|
/* c8 ignore start */
|
|
36203
|
-
const p$1 = process$
|
|
36217
|
+
const p$1 = process$4;
|
|
36204
36218
|
if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
|
|
36205
36219
|
/* c8 ignore stop */
|
|
36206
36220
|
if (listeners.length === count$1) {
|
|
@@ -36208,11 +36222,11 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36208
36222
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
36209
36223
|
/* c8 ignore start */
|
|
36210
36224
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
36211
|
-
if (!ret) process$
|
|
36225
|
+
if (!ret) process$4.kill(process$4.pid, s);
|
|
36212
36226
|
}
|
|
36213
36227
|
};
|
|
36214
|
-
this.#originalProcessReallyExit = process$
|
|
36215
|
-
this.#originalProcessEmit = process$
|
|
36228
|
+
this.#originalProcessReallyExit = process$4.reallyExit;
|
|
36229
|
+
this.#originalProcessEmit = process$4.emit;
|
|
36216
36230
|
}
|
|
36217
36231
|
onExit(cb, opts) {
|
|
36218
36232
|
/* c8 ignore start */
|
|
@@ -36279,8 +36293,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36279
36293
|
} else return og.call(this.#process, ev, ...args);
|
|
36280
36294
|
}
|
|
36281
36295
|
};
|
|
36282
|
-
const process$
|
|
36283
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$
|
|
36296
|
+
const process$1 = globalThis.process;
|
|
36297
|
+
const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
36284
36298
|
|
|
36285
36299
|
//#endregion
|
|
36286
36300
|
//#region node_modules/execa/lib/terminate/cleanup.js
|
|
@@ -38031,6 +38045,13 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38031
38045
|
//#region src/cli/commands/project/create.ts
|
|
38032
38046
|
var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
|
|
38033
38047
|
const DEFAULT_TEMPLATE_ID = "backend-only";
|
|
38048
|
+
const SUPPORTED_AGENTS = [{
|
|
38049
|
+
value: "cursor",
|
|
38050
|
+
label: "Cursor"
|
|
38051
|
+
}, {
|
|
38052
|
+
value: "claude-code",
|
|
38053
|
+
label: "Claude Code"
|
|
38054
|
+
}];
|
|
38034
38055
|
async function getTemplateById(templateId) {
|
|
38035
38056
|
const templates = await listTemplates();
|
|
38036
38057
|
const template = templates.find((t) => t.id === templateId);
|
|
@@ -38093,6 +38114,7 @@ async function createInteractive(options) {
|
|
|
38093
38114
|
description: result.description || void 0,
|
|
38094
38115
|
projectPath: result.projectPath,
|
|
38095
38116
|
deploy: options.deploy,
|
|
38117
|
+
skills: options.skills,
|
|
38096
38118
|
isInteractive: true
|
|
38097
38119
|
});
|
|
38098
38120
|
}
|
|
@@ -38103,10 +38125,11 @@ async function createNonInteractive(options) {
|
|
|
38103
38125
|
description: options.description,
|
|
38104
38126
|
projectPath: options.path,
|
|
38105
38127
|
deploy: options.deploy,
|
|
38128
|
+
skills: options.skills,
|
|
38106
38129
|
isInteractive: false
|
|
38107
38130
|
});
|
|
38108
38131
|
}
|
|
38109
|
-
async function executeCreate({ template, name: rawName, description, projectPath, deploy, isInteractive }) {
|
|
38132
|
+
async function executeCreate({ template, name: rawName, description, projectPath, deploy, skills, isInteractive }) {
|
|
38110
38133
|
const name$1 = rawName.trim();
|
|
38111
38134
|
const resolvedPath = resolve(projectPath);
|
|
38112
38135
|
const { projectId } = await runTask("Setting up your project...", async () => {
|
|
@@ -38166,12 +38189,45 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38166
38189
|
finalAppUrl = appUrl;
|
|
38167
38190
|
}
|
|
38168
38191
|
}
|
|
38192
|
+
let selectedAgents = [];
|
|
38193
|
+
if (isInteractive) {
|
|
38194
|
+
const result = await fe({
|
|
38195
|
+
message: "Add AI agent skills? (Select agents to configure)",
|
|
38196
|
+
options: SUPPORTED_AGENTS,
|
|
38197
|
+
initialValues: SUPPORTED_AGENTS.map((agent) => agent.value),
|
|
38198
|
+
required: false
|
|
38199
|
+
});
|
|
38200
|
+
if (!pD(result)) selectedAgents = result;
|
|
38201
|
+
} else if (skills) selectedAgents = SUPPORTED_AGENTS.map((agent) => agent.value);
|
|
38202
|
+
if (selectedAgents.length > 0) {
|
|
38203
|
+
const agentArgs = selectedAgents.flatMap((agent) => ["-a", agent]);
|
|
38204
|
+
M.step("Installing skills for: " + selectedAgents.join(", "));
|
|
38205
|
+
await runTask("Installing skills for: " + selectedAgents.join(", "), async () => {
|
|
38206
|
+
await execa("npx", [
|
|
38207
|
+
"-y",
|
|
38208
|
+
"add-skill",
|
|
38209
|
+
"base44/skills",
|
|
38210
|
+
"-y",
|
|
38211
|
+
"-s",
|
|
38212
|
+
"base44-cli",
|
|
38213
|
+
"-s",
|
|
38214
|
+
"base44-sdk",
|
|
38215
|
+
...agentArgs
|
|
38216
|
+
], {
|
|
38217
|
+
cwd: resolvedPath,
|
|
38218
|
+
stdio: "inherit"
|
|
38219
|
+
});
|
|
38220
|
+
}, {
|
|
38221
|
+
successMessage: theme.colors.base44Orange("AI agent skills added successfully"),
|
|
38222
|
+
errorMessage: "Failed to add AI agent skills - you can add them later with: npx add-skill base44/skills"
|
|
38223
|
+
});
|
|
38224
|
+
}
|
|
38169
38225
|
M.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name$1)}`);
|
|
38170
38226
|
M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(projectId))}`);
|
|
38171
38227
|
if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
|
|
38172
38228
|
return { outroMessage: "Your project is set up and ready to use" };
|
|
38173
38229
|
}
|
|
38174
|
-
const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-p, --path <path>", "Path where to create the project").option("-t, --template <id>", "Template ID (e.g., backend-only, backend-and-client)").option("--deploy", "Build and deploy the site").hook("preAction", validateNonInteractiveFlags$1).action(async (options) => {
|
|
38230
|
+
const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-p, --path <path>", "Path where to create the project").option("-t, --template <id>", "Template ID (e.g., backend-only, backend-and-client)").option("--deploy", "Build and deploy the site").option("--skills", "Add AI agent skills (Cursor, Claude Code)").hook("preAction", validateNonInteractiveFlags$1).action(async (options) => {
|
|
38175
38231
|
await chooseCreate(options);
|
|
38176
38232
|
});
|
|
38177
38233
|
|
|
@@ -38217,7 +38273,7 @@ function isInsideContainer() {
|
|
|
38217
38273
|
//#endregion
|
|
38218
38274
|
//#region node_modules/is-wsl/index.js
|
|
38219
38275
|
const isWsl = () => {
|
|
38220
|
-
if (
|
|
38276
|
+
if (y.platform !== "linux") return false;
|
|
38221
38277
|
if (os.release().toLowerCase().includes("microsoft")) {
|
|
38222
38278
|
if (isInsideContainer()) return false;
|
|
38223
38279
|
return true;
|
|
@@ -38228,12 +38284,12 @@ const isWsl = () => {
|
|
|
38228
38284
|
return false;
|
|
38229
38285
|
}
|
|
38230
38286
|
};
|
|
38231
|
-
var is_wsl_default =
|
|
38287
|
+
var is_wsl_default = y.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
38232
38288
|
|
|
38233
38289
|
//#endregion
|
|
38234
38290
|
//#region node_modules/powershell-utils/index.js
|
|
38235
38291
|
const execFile$2 = promisify(childProcess.execFile);
|
|
38236
|
-
const powerShellPath$1 = () => `${
|
|
38292
|
+
const powerShellPath$1 = () => `${y.env.SYSTEMROOT || y.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
38237
38293
|
const executePowerShell = async (command, options = {}) => {
|
|
38238
38294
|
const { powerShellPath: psPath, ...execFileOptions } = options;
|
|
38239
38295
|
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
@@ -38344,7 +38400,7 @@ function defineLazyProperty(object$1, propertyName, valueGetter) {
|
|
|
38344
38400
|
//#region node_modules/default-browser-id/index.js
|
|
38345
38401
|
const execFileAsync$3 = promisify(execFile);
|
|
38346
38402
|
async function defaultBrowserId() {
|
|
38347
|
-
if (
|
|
38403
|
+
if (y.platform !== "darwin") throw new Error("macOS only");
|
|
38348
38404
|
const { stdout: stdout$1 } = await execFileAsync$3("defaults", [
|
|
38349
38405
|
"read",
|
|
38350
38406
|
"com.apple.LaunchServices/com.apple.launchservices.secure",
|
|
@@ -38359,7 +38415,7 @@ async function defaultBrowserId() {
|
|
|
38359
38415
|
//#region node_modules/run-applescript/index.js
|
|
38360
38416
|
const execFileAsync$2 = promisify(execFile);
|
|
38361
38417
|
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
38362
|
-
if (
|
|
38418
|
+
if (y.platform !== "darwin") throw new Error("macOS only");
|
|
38363
38419
|
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
38364
38420
|
const execOptions = {};
|
|
38365
38421
|
if (signal) execOptions.signal = signal;
|
|
@@ -38468,14 +38524,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
|
|
|
38468
38524
|
const execFileAsync = promisify(execFile);
|
|
38469
38525
|
const titleize = (string$2) => string$2.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x$2) => x$2.toUpperCase());
|
|
38470
38526
|
async function defaultBrowser() {
|
|
38471
|
-
if (
|
|
38527
|
+
if (y.platform === "darwin") {
|
|
38472
38528
|
const id = await defaultBrowserId();
|
|
38473
38529
|
return {
|
|
38474
38530
|
name: await bundleName(id),
|
|
38475
38531
|
id
|
|
38476
38532
|
};
|
|
38477
38533
|
}
|
|
38478
|
-
if (
|
|
38534
|
+
if (y.platform === "linux") {
|
|
38479
38535
|
const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
|
|
38480
38536
|
"query",
|
|
38481
38537
|
"default",
|
|
@@ -38487,13 +38543,13 @@ async function defaultBrowser() {
|
|
|
38487
38543
|
id
|
|
38488
38544
|
};
|
|
38489
38545
|
}
|
|
38490
|
-
if (
|
|
38546
|
+
if (y.platform === "win32") return defaultBrowser$1();
|
|
38491
38547
|
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
38492
38548
|
}
|
|
38493
38549
|
|
|
38494
38550
|
//#endregion
|
|
38495
38551
|
//#region node_modules/is-in-ssh/index.js
|
|
38496
|
-
const isInSsh = Boolean(
|
|
38552
|
+
const isInSsh = Boolean(y.env.SSH_CONNECTION || y.env.SSH_CLIENT || y.env.SSH_TTY);
|
|
38497
38553
|
var is_in_ssh_default = isInSsh;
|
|
38498
38554
|
|
|
38499
38555
|
//#endregion
|
|
@@ -38501,7 +38557,7 @@ var is_in_ssh_default = isInSsh;
|
|
|
38501
38557
|
const fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
38502
38558
|
const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
|
|
38503
38559
|
const localXdgOpenPath = path.join(__dirname, "xdg-open");
|
|
38504
|
-
const { platform: platform$1, arch } =
|
|
38560
|
+
const { platform: platform$1, arch } = y;
|
|
38505
38561
|
const tryEachApp = async (apps$1, opener) => {
|
|
38506
38562
|
if (apps$1.length === 0) return;
|
|
38507
38563
|
const errors = [];
|
|
@@ -38614,7 +38670,7 @@ const baseOpen = async (options) => {
|
|
|
38614
38670
|
await fs$1.access(localXdgOpenPath, constants$1.X_OK);
|
|
38615
38671
|
exeLocalXdgOpen = true;
|
|
38616
38672
|
} catch {}
|
|
38617
|
-
command =
|
|
38673
|
+
command = y.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
|
|
38618
38674
|
}
|
|
38619
38675
|
if (appArguments.length > 0) cliArguments.push(...appArguments);
|
|
38620
38676
|
if (!options.wait) {
|
|
@@ -38900,7 +38956,7 @@ const siteDeployCommand = new Command("site").description("Manage site deploymen
|
|
|
38900
38956
|
var version = "0.0.17";
|
|
38901
38957
|
|
|
38902
38958
|
//#endregion
|
|
38903
|
-
//#region src/cli/
|
|
38959
|
+
//#region src/cli/program.ts
|
|
38904
38960
|
const program = new Command();
|
|
38905
38961
|
program.name("base44").description("Base44 CLI - Unified interface for managing Base44 applications").version(version);
|
|
38906
38962
|
program.configureHelp({ sortSubcommands: true });
|
|
@@ -38914,7 +38970,6 @@ program.addCommand(linkCommand);
|
|
|
38914
38970
|
program.addCommand(entitiesPushCommand);
|
|
38915
38971
|
program.addCommand(functionsDeployCommand);
|
|
38916
38972
|
program.addCommand(siteDeployCommand);
|
|
38917
|
-
program.parse();
|
|
38918
38973
|
|
|
38919
38974
|
//#endregion
|
|
38920
|
-
export {
|
|
38975
|
+
export { CLIExitError, program };
|
package/package.json
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@base44-preview/cli",
|
|
3
|
-
"version": "0.0.17-pr.
|
|
3
|
+
"version": "0.0.17-pr.95.543227e",
|
|
4
4
|
"description": "Base44 CLI - Unified interface for managing Base44 applications",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"exports": {
|
|
9
|
-
".": "./dist/cli/index.js"
|
|
6
|
+
"bin": {
|
|
7
|
+
"base44": "./bin/run.js"
|
|
10
8
|
},
|
|
11
9
|
"files": [
|
|
12
|
-
"dist"
|
|
10
|
+
"dist",
|
|
11
|
+
"bin"
|
|
13
12
|
],
|
|
14
13
|
"scripts": {
|
|
15
14
|
"build": "tsdown",
|
|
16
15
|
"typecheck": "tsc --noEmit",
|
|
17
|
-
"dev": "
|
|
18
|
-
"start": "
|
|
16
|
+
"dev": "./bin/dev.js",
|
|
17
|
+
"start": "./bin/run.js",
|
|
19
18
|
"clean": "rm -rf dist",
|
|
20
19
|
"lint": "eslint src",
|
|
21
20
|
"test": "vitest run",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|