@base44-preview/cli 0.0.25-pr.153.d36ccdd → 0.0.25-pr.156.f6042c0
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/run.js
CHANGED
|
@@ -1,19 +1,40 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { program, CLIExitError, errorReporter } from "../dist/index.js";
|
|
2
3
|
|
|
3
4
|
// Disable Clack spinners and animations in non-interactive environments.
|
|
4
5
|
// Clack only checks the CI env var, so we set it when stdin/stdout aren't TTYs.
|
|
5
6
|
if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
6
|
-
process.env.CI =
|
|
7
|
+
process.env.CI = "true";
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
// Initialize error reporter
|
|
11
|
+
// The API key should be provided via environment variable
|
|
12
|
+
const posthogApiKey = process.env.POSTHOG_API_KEY;
|
|
13
|
+
if (posthogApiKey) {
|
|
14
|
+
errorReporter.initialize(posthogApiKey, process.env.POSTHOG_HOST);
|
|
15
|
+
}
|
|
10
16
|
|
|
11
17
|
try {
|
|
12
18
|
await program.parseAsync();
|
|
13
19
|
} catch (error) {
|
|
20
|
+
// Report the error to PostHog if it's not a controlled exit
|
|
21
|
+
if (!(error instanceof CLIExitError)) {
|
|
22
|
+
await errorReporter.captureException(error, {
|
|
23
|
+
command: process.argv.slice(2).join(" "),
|
|
24
|
+
node_version: process.version,
|
|
25
|
+
platform: process.platform,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Ensure PostHog events are sent before exiting
|
|
30
|
+
await errorReporter.shutdown();
|
|
31
|
+
|
|
14
32
|
if (error instanceof CLIExitError) {
|
|
15
33
|
process.exit(error.code);
|
|
16
34
|
}
|
|
17
35
|
console.error(error);
|
|
18
36
|
process.exit(1);
|
|
37
|
+
} finally {
|
|
38
|
+
// Always shutdown error reporter on normal exit too
|
|
39
|
+
await errorReporter.shutdown();
|
|
19
40
|
}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:
|
|
|
3
3
|
import childProcess, { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
|
|
4
4
|
import path, { basename, dirname, join, posix, resolve, win32 } from "node:path";
|
|
5
5
|
import fs, { appendFileSync, createReadStream, createWriteStream, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
6
|
-
import
|
|
6
|
+
import y, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
|
|
7
7
|
import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
|
|
8
8
|
import * as g from "node:readline";
|
|
9
9
|
import O from "node:readline";
|
|
@@ -26,6 +26,7 @@ import tty from "node:tty";
|
|
|
26
26
|
import { scheduler, setImmediate as setImmediate$1, setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
27
27
|
import { serialize } from "node:v8";
|
|
28
28
|
import { Buffer as Buffer$2 } from "node:buffer";
|
|
29
|
+
import { PostHog } from "posthog-node";
|
|
29
30
|
|
|
30
31
|
//#region rolldown:runtime
|
|
31
32
|
var __create = Object.create;
|
|
@@ -893,7 +894,7 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
893
894
|
const childProcess$1 = __require("node:child_process");
|
|
894
895
|
const path$15 = __require("node:path");
|
|
895
896
|
const fs$10 = __require("node:fs");
|
|
896
|
-
const process$
|
|
897
|
+
const process$3 = __require("node:process");
|
|
897
898
|
const { Argument, humanReadableArgName } = require_argument();
|
|
898
899
|
const { CommanderError } = require_error$1();
|
|
899
900
|
const { Help } = require_help();
|
|
@@ -944,10 +945,10 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
944
945
|
this._showHelpAfterError = false;
|
|
945
946
|
this._showSuggestionAfterError = true;
|
|
946
947
|
this._outputConfiguration = {
|
|
947
|
-
writeOut: (str) => process$
|
|
948
|
-
writeErr: (str) => process$
|
|
949
|
-
getOutHelpWidth: () => process$
|
|
950
|
-
getErrHelpWidth: () => process$
|
|
948
|
+
writeOut: (str) => process$3.stdout.write(str),
|
|
949
|
+
writeErr: (str) => process$3.stderr.write(str),
|
|
950
|
+
getOutHelpWidth: () => process$3.stdout.isTTY ? process$3.stdout.columns : void 0,
|
|
951
|
+
getErrHelpWidth: () => process$3.stderr.isTTY ? process$3.stderr.columns : void 0,
|
|
951
952
|
outputError: (str, write) => write(str)
|
|
952
953
|
};
|
|
953
954
|
this._hidden = false;
|
|
@@ -1301,7 +1302,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1301
1302
|
*/
|
|
1302
1303
|
_exit(exitCode, code$1, message) {
|
|
1303
1304
|
if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code$1, message));
|
|
1304
|
-
process$
|
|
1305
|
+
process$3.exit(exitCode);
|
|
1305
1306
|
}
|
|
1306
1307
|
/**
|
|
1307
1308
|
* Register callback `fn` for the command.
|
|
@@ -1640,11 +1641,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1640
1641
|
if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
|
|
1641
1642
|
parseOptions = parseOptions || {};
|
|
1642
1643
|
if (argv === void 0 && parseOptions.from === void 0) {
|
|
1643
|
-
if (process$
|
|
1644
|
-
const execArgv$1 = process$
|
|
1644
|
+
if (process$3.versions?.electron) parseOptions.from = "electron";
|
|
1645
|
+
const execArgv$1 = process$3.execArgv ?? [];
|
|
1645
1646
|
if (execArgv$1.includes("-e") || execArgv$1.includes("--eval") || execArgv$1.includes("-p") || execArgv$1.includes("--print")) parseOptions.from = "eval";
|
|
1646
1647
|
}
|
|
1647
|
-
if (argv === void 0) argv = process$
|
|
1648
|
+
if (argv === void 0) argv = process$3.argv;
|
|
1648
1649
|
this.rawArgs = argv.slice();
|
|
1649
1650
|
let userArgs;
|
|
1650
1651
|
switch (parseOptions.from) {
|
|
@@ -1654,7 +1655,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1654
1655
|
userArgs = argv.slice(2);
|
|
1655
1656
|
break;
|
|
1656
1657
|
case "electron":
|
|
1657
|
-
if (process$
|
|
1658
|
+
if (process$3.defaultApp) {
|
|
1658
1659
|
this._scriptPath = argv[1];
|
|
1659
1660
|
userArgs = argv.slice(2);
|
|
1660
1661
|
} else userArgs = argv.slice(1);
|
|
@@ -1768,15 +1769,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1768
1769
|
}
|
|
1769
1770
|
launchWithNode = sourceExt.includes(path$15.extname(executableFile));
|
|
1770
1771
|
let proc$1;
|
|
1771
|
-
if (process$
|
|
1772
|
+
if (process$3.platform !== "win32") if (launchWithNode) {
|
|
1772
1773
|
args.unshift(executableFile);
|
|
1773
|
-
args = incrementNodeInspectorPort(process$
|
|
1774
|
-
proc$1 = childProcess$1.spawn(process$
|
|
1774
|
+
args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
|
|
1775
|
+
proc$1 = childProcess$1.spawn(process$3.argv[0], args, { stdio: "inherit" });
|
|
1775
1776
|
} else proc$1 = childProcess$1.spawn(executableFile, args, { stdio: "inherit" });
|
|
1776
1777
|
else {
|
|
1777
1778
|
args.unshift(executableFile);
|
|
1778
|
-
args = incrementNodeInspectorPort(process$
|
|
1779
|
-
proc$1 = childProcess$1.spawn(process$
|
|
1779
|
+
args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
|
|
1780
|
+
proc$1 = childProcess$1.spawn(process$3.execPath, args, { stdio: "inherit" });
|
|
1780
1781
|
}
|
|
1781
1782
|
if (!proc$1.killed) [
|
|
1782
1783
|
"SIGUSR1",
|
|
@@ -1785,14 +1786,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1785
1786
|
"SIGINT",
|
|
1786
1787
|
"SIGHUP"
|
|
1787
1788
|
].forEach((signal) => {
|
|
1788
|
-
process$
|
|
1789
|
+
process$3.on(signal, () => {
|
|
1789
1790
|
if (proc$1.killed === false && proc$1.exitCode === null) proc$1.kill(signal);
|
|
1790
1791
|
});
|
|
1791
1792
|
});
|
|
1792
1793
|
const exitCallback = this._exitCallback;
|
|
1793
1794
|
proc$1.on("close", (code$1) => {
|
|
1794
1795
|
code$1 = code$1 ?? 1;
|
|
1795
|
-
if (!exitCallback) process$
|
|
1796
|
+
if (!exitCallback) process$3.exit(code$1);
|
|
1796
1797
|
else exitCallback(new CommanderError(code$1, "commander.executeSubCommandAsync", "(close)"));
|
|
1797
1798
|
});
|
|
1798
1799
|
proc$1.on("error", (err) => {
|
|
@@ -1804,7 +1805,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1804
1805
|
- ${executableDirMessage}`;
|
|
1805
1806
|
throw new Error(executableMissing);
|
|
1806
1807
|
} else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
|
|
1807
|
-
if (!exitCallback) process$
|
|
1808
|
+
if (!exitCallback) process$3.exit(1);
|
|
1808
1809
|
else {
|
|
1809
1810
|
const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
|
|
1810
1811
|
wrappedError.nestedError = err;
|
|
@@ -2210,13 +2211,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2210
2211
|
*/
|
|
2211
2212
|
_parseOptionsEnv() {
|
|
2212
2213
|
this.options.forEach((option) => {
|
|
2213
|
-
if (option.envVar && option.envVar in process$
|
|
2214
|
+
if (option.envVar && option.envVar in process$3.env) {
|
|
2214
2215
|
const optionKey = option.attributeName();
|
|
2215
2216
|
if (this.getOptionValue(optionKey) === void 0 || [
|
|
2216
2217
|
"default",
|
|
2217
2218
|
"config",
|
|
2218
2219
|
"env"
|
|
2219
|
-
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$
|
|
2220
|
+
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$3.env[option.envVar]);
|
|
2220
2221
|
else this.emit(`optionEnv:${option.name()}`);
|
|
2221
2222
|
}
|
|
2222
2223
|
});
|
|
@@ -2595,7 +2596,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2595
2596
|
*/
|
|
2596
2597
|
help(contextOptions) {
|
|
2597
2598
|
this.outputHelp(contextOptions);
|
|
2598
|
-
let exitCode = process$
|
|
2599
|
+
let exitCode = process$3.exitCode || 0;
|
|
2599
2600
|
if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
|
|
2600
2601
|
this._exit(exitCode, "commander.help", "(outputHelp)");
|
|
2601
2602
|
}
|
|
@@ -2711,16 +2712,16 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2711
2712
|
const CSI = `${ESC}[`;
|
|
2712
2713
|
const beep = "\x07";
|
|
2713
2714
|
const cursor = {
|
|
2714
|
-
to(x$2, y$
|
|
2715
|
-
if (!y$
|
|
2716
|
-
return `${CSI}${y$
|
|
2715
|
+
to(x$2, y$2) {
|
|
2716
|
+
if (!y$2) return `${CSI}${x$2 + 1}G`;
|
|
2717
|
+
return `${CSI}${y$2 + 1};${x$2 + 1}H`;
|
|
2717
2718
|
},
|
|
2718
|
-
move(x$2, y$
|
|
2719
|
+
move(x$2, y$2) {
|
|
2719
2720
|
let ret = "";
|
|
2720
2721
|
if (x$2 < 0) ret += `${CSI}${-x$2}D`;
|
|
2721
2722
|
else if (x$2 > 0) ret += `${CSI}${x$2}C`;
|
|
2722
|
-
if (y$
|
|
2723
|
-
else if (y$
|
|
2723
|
+
if (y$2 < 0) ret += `${CSI}${-y$2}A`;
|
|
2724
|
+
else if (y$2 > 0) ret += `${CSI}${y$2}B`;
|
|
2724
2725
|
return ret;
|
|
2725
2726
|
},
|
|
2726
2727
|
up: (count$1 = 1) => `${CSI}${count$1}A`,
|
|
@@ -3030,13 +3031,13 @@ function rD() {
|
|
|
3030
3031
|
}
|
|
3031
3032
|
}), r;
|
|
3032
3033
|
}
|
|
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
|
+
const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y$1 = "\x07", V$1 = "[", nD = "]", G$1 = "m", _$1 = `${nD}8;;`, z = (e$1) => `${d$1.values().next().value}${V$1}${e$1}${G$1}`, K$1 = (e$1) => `${d$1.values().next().value}${_$1}${e$1}${y$1}`, aD = (e$1) => e$1.split(" ").map((u$2) => p(u$2)), k$1 = (e$1, u$2, t) => {
|
|
3034
3035
|
const F$1 = [...u$2];
|
|
3035
3036
|
let s = !1, i$1 = !1, D$1 = p(P$1(e$1[e$1.length - 1]));
|
|
3036
3037
|
for (const [C$1, n$1] of F$1.entries()) {
|
|
3037
3038
|
const E = p(n$1);
|
|
3038
3039
|
if (D$1 + E <= t ? e$1[e$1.length - 1] += n$1 : (e$1.push(n$1), D$1 = 0), d$1.has(n$1) && (s = !0, i$1 = F$1.slice(C$1 + 1).join("").startsWith(_$1)), s) {
|
|
3039
|
-
i$1 ? n$1 === y && (s = !1, i$1 = !1) : n$1 === G$1 && (s = !1);
|
|
3040
|
+
i$1 ? n$1 === y$1 && (s = !1, i$1 = !1) : n$1 === G$1 && (s = !1);
|
|
3040
3041
|
continue;
|
|
3041
3042
|
}
|
|
3042
3043
|
D$1 += E, D$1 === t && C$1 < F$1.length - 1 && (e$1.push(""), D$1 = 0);
|
|
@@ -3078,7 +3079,7 @@ const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y = "\x07", V$1 = "[",
|
|
|
3078
3079
|
`)];
|
|
3079
3080
|
for (const [E, a$1] of n$1.entries()) {
|
|
3080
3081
|
if (F$1 += a$1, d$1.has(a$1)) {
|
|
3081
|
-
const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y})`)).exec(n$1.slice(E).join("")) || { groups: {} };
|
|
3082
|
+
const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y$1})`)).exec(n$1.slice(E).join("")) || { groups: {} };
|
|
3082
3083
|
if (c$1.code !== void 0) {
|
|
3083
3084
|
const f = Number.parseFloat(c$1.code);
|
|
3084
3085
|
s = f === oD ? void 0 : f;
|
|
@@ -3479,7 +3480,7 @@ var RD = class extends x$1 {
|
|
|
3479
3480
|
//#endregion
|
|
3480
3481
|
//#region node_modules/@clack/prompts/dist/index.mjs
|
|
3481
3482
|
function ce() {
|
|
3482
|
-
return
|
|
3483
|
+
return y.platform !== "win32" ? y.env.TERM !== "linux" : !!y.env.CI || !!y.env.WT_SESSION || !!y.env.TERMINUS_SUBLIME || y.env.ConEmuTask === "{cmd::Cmder}" || y.env.TERM_PROGRAM === "Terminus-Sublime" || y.env.TERM_PROGRAM === "vscode" || y.env.TERM === "xterm-256color" || y.env.TERM === "alacritty" || y.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
3483
3484
|
}
|
|
3484
3485
|
const V = ce(), u$1 = (t, n$1) => V ? t : n$1, le = u$1("◆", "*"), L = u$1("■", "x"), W = u$1("▲", "x"), C = u$1("◇", "o"), ue = u$1("┌", "T"), o$1 = u$1("│", "|"), d = u$1("└", "—"), k = u$1("●", ">"), P = u$1("○", " "), A = u$1("◻", "[•]"), T = u$1("◼", "[+]"), F = u$1("◻", "[ ]"), $e = u$1("▪", "•"), _ = u$1("─", "-"), me = u$1("╮", "+"), de = u$1("├", "+"), pe = u$1("╯", "+"), q = u$1("●", "•"), D = u$1("◆", "*"), U = u$1("▲", "!"), K = u$1("■", "x"), b = (t) => {
|
|
3485
3486
|
switch (t) {
|
|
@@ -6744,7 +6745,7 @@ function initializeContext(params) {
|
|
|
6744
6745
|
external: params?.external ?? void 0
|
|
6745
6746
|
};
|
|
6746
6747
|
}
|
|
6747
|
-
function process$
|
|
6748
|
+
function process$2(schema, ctx, _params = {
|
|
6748
6749
|
path: [],
|
|
6749
6750
|
schemaPath: []
|
|
6750
6751
|
}) {
|
|
@@ -6781,7 +6782,7 @@ function process$3(schema, ctx, _params = {
|
|
|
6781
6782
|
const parent = schema._zod.parent;
|
|
6782
6783
|
if (parent) {
|
|
6783
6784
|
if (!result.ref) result.ref = parent;
|
|
6784
|
-
process$
|
|
6785
|
+
process$2(parent, ctx, params);
|
|
6785
6786
|
ctx.seen.get(parent).isParent = true;
|
|
6786
6787
|
}
|
|
6787
6788
|
}
|
|
@@ -6993,7 +6994,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
6993
6994
|
...params,
|
|
6994
6995
|
processors
|
|
6995
6996
|
});
|
|
6996
|
-
process$
|
|
6997
|
+
process$2(schema, ctx);
|
|
6997
6998
|
extractDefs(ctx, schema);
|
|
6998
6999
|
return finalize(ctx, schema);
|
|
6999
7000
|
};
|
|
@@ -7005,7 +7006,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
7005
7006
|
io,
|
|
7006
7007
|
processors
|
|
7007
7008
|
});
|
|
7008
|
-
process$
|
|
7009
|
+
process$2(schema, ctx);
|
|
7009
7010
|
extractDefs(ctx, schema);
|
|
7010
7011
|
return finalize(ctx, schema);
|
|
7011
7012
|
};
|
|
@@ -7092,7 +7093,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
7092
7093
|
if (typeof minimum === "number") json.minItems = minimum;
|
|
7093
7094
|
if (typeof maximum === "number") json.maxItems = maximum;
|
|
7094
7095
|
json.type = "array";
|
|
7095
|
-
json.items = process$
|
|
7096
|
+
json.items = process$2(def.element, ctx, {
|
|
7096
7097
|
...params,
|
|
7097
7098
|
path: [...params.path, "items"]
|
|
7098
7099
|
});
|
|
@@ -7103,7 +7104,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7103
7104
|
json.type = "object";
|
|
7104
7105
|
json.properties = {};
|
|
7105
7106
|
const shape = def.shape;
|
|
7106
|
-
for (const key in shape) json.properties[key] = process$
|
|
7107
|
+
for (const key in shape) json.properties[key] = process$2(shape[key], ctx, {
|
|
7107
7108
|
...params,
|
|
7108
7109
|
path: [
|
|
7109
7110
|
...params.path,
|
|
@@ -7121,7 +7122,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7121
7122
|
if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
|
|
7122
7123
|
else if (!def.catchall) {
|
|
7123
7124
|
if (ctx.io === "output") json.additionalProperties = false;
|
|
7124
|
-
} else if (def.catchall) json.additionalProperties = process$
|
|
7125
|
+
} else if (def.catchall) json.additionalProperties = process$2(def.catchall, ctx, {
|
|
7125
7126
|
...params,
|
|
7126
7127
|
path: [...params.path, "additionalProperties"]
|
|
7127
7128
|
});
|
|
@@ -7129,7 +7130,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7129
7130
|
const unionProcessor = (schema, ctx, json, params) => {
|
|
7130
7131
|
const def = schema._zod.def;
|
|
7131
7132
|
const isExclusive = def.inclusive === false;
|
|
7132
|
-
const options = def.options.map((x$2, i$1) => process$
|
|
7133
|
+
const options = def.options.map((x$2, i$1) => process$2(x$2, ctx, {
|
|
7133
7134
|
...params,
|
|
7134
7135
|
path: [
|
|
7135
7136
|
...params.path,
|
|
@@ -7142,7 +7143,7 @@ const unionProcessor = (schema, ctx, json, params) => {
|
|
|
7142
7143
|
};
|
|
7143
7144
|
const intersectionProcessor = (schema, ctx, json, params) => {
|
|
7144
7145
|
const def = schema._zod.def;
|
|
7145
|
-
const a$1 = process$
|
|
7146
|
+
const a$1 = process$2(def.left, ctx, {
|
|
7146
7147
|
...params,
|
|
7147
7148
|
path: [
|
|
7148
7149
|
...params.path,
|
|
@@ -7150,7 +7151,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
|
|
|
7150
7151
|
0
|
|
7151
7152
|
]
|
|
7152
7153
|
});
|
|
7153
|
-
const b$2 = process$
|
|
7154
|
+
const b$2 = process$2(def.right, ctx, {
|
|
7154
7155
|
...params,
|
|
7155
7156
|
path: [
|
|
7156
7157
|
...params.path,
|
|
@@ -7167,7 +7168,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7167
7168
|
json.type = "array";
|
|
7168
7169
|
const prefixPath$1 = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
7169
7170
|
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
7170
|
-
const prefixItems = def.items.map((x$2, i$1) => process$
|
|
7171
|
+
const prefixItems = def.items.map((x$2, i$1) => process$2(x$2, ctx, {
|
|
7171
7172
|
...params,
|
|
7172
7173
|
path: [
|
|
7173
7174
|
...params.path,
|
|
@@ -7175,7 +7176,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7175
7176
|
i$1
|
|
7176
7177
|
]
|
|
7177
7178
|
}));
|
|
7178
|
-
const rest = def.rest ? process$
|
|
7179
|
+
const rest = def.rest ? process$2(def.rest, ctx, {
|
|
7179
7180
|
...params,
|
|
7180
7181
|
path: [
|
|
7181
7182
|
...params.path,
|
|
@@ -7206,7 +7207,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7206
7207
|
const keyType = def.keyType;
|
|
7207
7208
|
const patterns = keyType._zod.bag?.patterns;
|
|
7208
7209
|
if (def.mode === "loose" && patterns && patterns.size > 0) {
|
|
7209
|
-
const valueSchema = process$
|
|
7210
|
+
const valueSchema = process$2(def.valueType, ctx, {
|
|
7210
7211
|
...params,
|
|
7211
7212
|
path: [
|
|
7212
7213
|
...params.path,
|
|
@@ -7217,11 +7218,11 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7217
7218
|
json.patternProperties = {};
|
|
7218
7219
|
for (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;
|
|
7219
7220
|
} else {
|
|
7220
|
-
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$
|
|
7221
|
+
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$2(def.keyType, ctx, {
|
|
7221
7222
|
...params,
|
|
7222
7223
|
path: [...params.path, "propertyNames"]
|
|
7223
7224
|
});
|
|
7224
|
-
json.additionalProperties = process$
|
|
7225
|
+
json.additionalProperties = process$2(def.valueType, ctx, {
|
|
7225
7226
|
...params,
|
|
7226
7227
|
path: [...params.path, "additionalProperties"]
|
|
7227
7228
|
});
|
|
@@ -7234,7 +7235,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7234
7235
|
};
|
|
7235
7236
|
const nullableProcessor = (schema, ctx, json, params) => {
|
|
7236
7237
|
const def = schema._zod.def;
|
|
7237
|
-
const inner = process$
|
|
7238
|
+
const inner = process$2(def.innerType, ctx, params);
|
|
7238
7239
|
const seen = ctx.seen.get(schema);
|
|
7239
7240
|
if (ctx.target === "openapi-3.0") {
|
|
7240
7241
|
seen.ref = def.innerType;
|
|
@@ -7243,27 +7244,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
|
|
|
7243
7244
|
};
|
|
7244
7245
|
const nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
7245
7246
|
const def = schema._zod.def;
|
|
7246
|
-
process$
|
|
7247
|
+
process$2(def.innerType, ctx, params);
|
|
7247
7248
|
const seen = ctx.seen.get(schema);
|
|
7248
7249
|
seen.ref = def.innerType;
|
|
7249
7250
|
};
|
|
7250
7251
|
const defaultProcessor = (schema, ctx, json, params) => {
|
|
7251
7252
|
const def = schema._zod.def;
|
|
7252
|
-
process$
|
|
7253
|
+
process$2(def.innerType, ctx, params);
|
|
7253
7254
|
const seen = ctx.seen.get(schema);
|
|
7254
7255
|
seen.ref = def.innerType;
|
|
7255
7256
|
json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7256
7257
|
};
|
|
7257
7258
|
const prefaultProcessor = (schema, ctx, json, params) => {
|
|
7258
7259
|
const def = schema._zod.def;
|
|
7259
|
-
process$
|
|
7260
|
+
process$2(def.innerType, ctx, params);
|
|
7260
7261
|
const seen = ctx.seen.get(schema);
|
|
7261
7262
|
seen.ref = def.innerType;
|
|
7262
7263
|
if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7263
7264
|
};
|
|
7264
7265
|
const catchProcessor = (schema, ctx, json, params) => {
|
|
7265
7266
|
const def = schema._zod.def;
|
|
7266
|
-
process$
|
|
7267
|
+
process$2(def.innerType, ctx, params);
|
|
7267
7268
|
const seen = ctx.seen.get(schema);
|
|
7268
7269
|
seen.ref = def.innerType;
|
|
7269
7270
|
let catchValue;
|
|
@@ -7277,20 +7278,20 @@ const catchProcessor = (schema, ctx, json, params) => {
|
|
|
7277
7278
|
const pipeProcessor = (schema, ctx, _json, params) => {
|
|
7278
7279
|
const def = schema._zod.def;
|
|
7279
7280
|
const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
7280
|
-
process$
|
|
7281
|
+
process$2(innerType, ctx, params);
|
|
7281
7282
|
const seen = ctx.seen.get(schema);
|
|
7282
7283
|
seen.ref = innerType;
|
|
7283
7284
|
};
|
|
7284
7285
|
const readonlyProcessor = (schema, ctx, json, params) => {
|
|
7285
7286
|
const def = schema._zod.def;
|
|
7286
|
-
process$
|
|
7287
|
+
process$2(def.innerType, ctx, params);
|
|
7287
7288
|
const seen = ctx.seen.get(schema);
|
|
7288
7289
|
seen.ref = def.innerType;
|
|
7289
7290
|
json.readOnly = true;
|
|
7290
7291
|
};
|
|
7291
7292
|
const optionalProcessor = (schema, ctx, _json, params) => {
|
|
7292
7293
|
const def = schema._zod.def;
|
|
7293
|
-
process$
|
|
7294
|
+
process$2(def.innerType, ctx, params);
|
|
7294
7295
|
const seen = ctx.seen.get(schema);
|
|
7295
7296
|
seen.ref = def.innerType;
|
|
7296
7297
|
};
|
|
@@ -16335,7 +16336,7 @@ const createIgnorePredicate = (patterns, cwd, baseDir) => {
|
|
|
16335
16336
|
};
|
|
16336
16337
|
const normalizeOptions$2 = (options = {}) => {
|
|
16337
16338
|
const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
|
|
16338
|
-
const cwd = toPath$1(options.cwd) ??
|
|
16339
|
+
const cwd = toPath$1(options.cwd) ?? y.cwd();
|
|
16339
16340
|
const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
|
|
16340
16341
|
return {
|
|
16341
16342
|
cwd,
|
|
@@ -16432,7 +16433,7 @@ const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
|
16432
16433
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
16433
16434
|
return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
16434
16435
|
};
|
|
16435
|
-
const directoryToGlob = async (directoryPaths, { cwd =
|
|
16436
|
+
const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => {
|
|
16436
16437
|
return (await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
16437
16438
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16438
16439
|
directoryPath,
|
|
@@ -16446,7 +16447,7 @@ const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, e
|
|
|
16446
16447
|
}) : directoryPath;
|
|
16447
16448
|
}))).flat();
|
|
16448
16449
|
};
|
|
16449
|
-
const directoryToGlobSync = (directoryPaths, { cwd =
|
|
16450
|
+
const directoryToGlobSync = (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
|
|
16450
16451
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16451
16452
|
directoryPath,
|
|
16452
16453
|
files,
|
|
@@ -16542,7 +16543,7 @@ const applyIgnoreFilesAndGetFilterSync = (options) => {
|
|
|
16542
16543
|
};
|
|
16543
16544
|
const createFilterFunction = (isIgnored, cwd) => {
|
|
16544
16545
|
const seen = /* @__PURE__ */ new Set();
|
|
16545
|
-
const basePath = cwd ||
|
|
16546
|
+
const basePath = cwd || y.cwd();
|
|
16546
16547
|
const pathCache = /* @__PURE__ */ new Map();
|
|
16547
16548
|
return (fastGlobResult) => {
|
|
16548
16549
|
const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
@@ -31053,13 +31054,13 @@ var ansi_styles_default = ansiStyles;
|
|
|
31053
31054
|
|
|
31054
31055
|
//#endregion
|
|
31055
31056
|
//#region node_modules/chalk/source/vendor/supports-color/index.js
|
|
31056
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
31057
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : y.argv) {
|
|
31057
31058
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
31058
31059
|
const position = argv.indexOf(prefix + flag);
|
|
31059
31060
|
const terminatorPosition = argv.indexOf("--");
|
|
31060
31061
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
31061
31062
|
}
|
|
31062
|
-
const { env } =
|
|
31063
|
+
const { env } = y;
|
|
31063
31064
|
let flagForceColor;
|
|
31064
31065
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
31065
31066
|
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
@@ -31092,7 +31093,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
31092
31093
|
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
31093
31094
|
const min = forceColor || 0;
|
|
31094
31095
|
if (env.TERM === "dumb") return min;
|
|
31095
|
-
if (
|
|
31096
|
+
if (y.platform === "win32") {
|
|
31096
31097
|
const osRelease = os.release().split(".");
|
|
31097
31098
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
31098
31099
|
return 1;
|
|
@@ -31883,9 +31884,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
|
|
|
31883
31884
|
//#region node_modules/execa/lib/utils/standard-stream.js
|
|
31884
31885
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
31885
31886
|
const STANDARD_STREAMS = [
|
|
31886
|
-
|
|
31887
|
-
|
|
31888
|
-
|
|
31887
|
+
y.stdin,
|
|
31888
|
+
y.stdout,
|
|
31889
|
+
y.stderr
|
|
31889
31890
|
];
|
|
31890
31891
|
const STANDARD_STREAMS_ALIASES = [
|
|
31891
31892
|
"stdin",
|
|
@@ -32010,9 +32011,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
32010
32011
|
//#endregion
|
|
32011
32012
|
//#region node_modules/is-unicode-supported/index.js
|
|
32012
32013
|
function isUnicodeSupported() {
|
|
32013
|
-
const { env: env$1 } =
|
|
32014
|
+
const { env: env$1 } = y;
|
|
32014
32015
|
const { TERM, TERM_PROGRAM } = env$1;
|
|
32015
|
-
if (
|
|
32016
|
+
if (y.platform !== "win32") return TERM !== "linux";
|
|
32016
32017
|
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";
|
|
32017
32018
|
}
|
|
32018
32019
|
|
|
@@ -32939,7 +32940,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
32939
32940
|
|
|
32940
32941
|
//#endregion
|
|
32941
32942
|
//#region node_modules/npm-run-path/index.js
|
|
32942
|
-
const npmRunPath = ({ cwd =
|
|
32943
|
+
const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
|
|
32943
32944
|
const cwdPath = path.resolve(toPath(cwd));
|
|
32944
32945
|
const result = [];
|
|
32945
32946
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -32957,7 +32958,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
|
32957
32958
|
const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
|
|
32958
32959
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32959
32960
|
};
|
|
32960
|
-
const npmRunPathEnv = ({ env: env$1 =
|
|
32961
|
+
const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
|
|
32961
32962
|
env$1 = { ...env$1 };
|
|
32962
32963
|
const pathName = pathKey({ env: env$1 });
|
|
32963
32964
|
options.path = env$1[pathName];
|
|
@@ -34092,7 +34093,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
34092
34093
|
};
|
|
34093
34094
|
const getDefaultCwd = () => {
|
|
34094
34095
|
try {
|
|
34095
|
-
return
|
|
34096
|
+
return y.cwd();
|
|
34096
34097
|
} catch (error) {
|
|
34097
34098
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
34098
34099
|
throw error;
|
|
@@ -34127,7 +34128,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
34127
34128
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
34128
34129
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
34129
34130
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
34130
|
-
if (
|
|
34131
|
+
if (y.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
34131
34132
|
return {
|
|
34132
34133
|
file,
|
|
34133
34134
|
commandArguments,
|
|
@@ -34154,7 +34155,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
34154
34155
|
});
|
|
34155
34156
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
34156
34157
|
const env$1 = extendEnv ? {
|
|
34157
|
-
...
|
|
34158
|
+
...y.env,
|
|
34158
34159
|
...envOption
|
|
34159
34160
|
} : envOption;
|
|
34160
34161
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -35154,12 +35155,12 @@ const guessStreamDirection = {
|
|
|
35154
35155
|
}
|
|
35155
35156
|
};
|
|
35156
35157
|
const getStandardStreamDirection = (value) => {
|
|
35157
|
-
if ([0,
|
|
35158
|
+
if ([0, y.stdin].includes(value)) return "input";
|
|
35158
35159
|
if ([
|
|
35159
35160
|
1,
|
|
35160
35161
|
2,
|
|
35161
|
-
|
|
35162
|
-
|
|
35162
|
+
y.stdout,
|
|
35163
|
+
y.stderr
|
|
35163
35164
|
].includes(value)) return "output";
|
|
35164
35165
|
};
|
|
35165
35166
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -36223,9 +36224,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
36223
36224
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
36224
36225
|
};
|
|
36225
36226
|
const getIpcExport = () => {
|
|
36226
|
-
const anyProcess =
|
|
36227
|
+
const anyProcess = y;
|
|
36227
36228
|
const isSubprocess = true;
|
|
36228
|
-
const ipc =
|
|
36229
|
+
const ipc = y.channel !== void 0;
|
|
36229
36230
|
return {
|
|
36230
36231
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
36231
36232
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -36467,7 +36468,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
|
|
|
36467
36468
|
|
|
36468
36469
|
//#endregion
|
|
36469
36470
|
//#region node_modules/signal-exit/dist/mjs/index.js
|
|
36470
|
-
const processOk = (process$
|
|
36471
|
+
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";
|
|
36471
36472
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
36472
36473
|
const global$1 = globalThis;
|
|
36473
36474
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -36535,7 +36536,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
36535
36536
|
};
|
|
36536
36537
|
var SignalExit = class extends SignalExitBase {
|
|
36537
36538
|
/* c8 ignore start */
|
|
36538
|
-
#hupSig = process$
|
|
36539
|
+
#hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
36539
36540
|
/* c8 ignore stop */
|
|
36540
36541
|
#emitter = new Emitter();
|
|
36541
36542
|
#process;
|
|
@@ -36543,15 +36544,15 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36543
36544
|
#originalProcessReallyExit;
|
|
36544
36545
|
#sigListeners = {};
|
|
36545
36546
|
#loaded = false;
|
|
36546
|
-
constructor(process$
|
|
36547
|
+
constructor(process$4) {
|
|
36547
36548
|
super();
|
|
36548
|
-
this.#process = process$
|
|
36549
|
+
this.#process = process$4;
|
|
36549
36550
|
this.#sigListeners = {};
|
|
36550
36551
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
36551
36552
|
const listeners = this.#process.listeners(sig);
|
|
36552
36553
|
let { count: count$1 } = this.#emitter;
|
|
36553
36554
|
/* c8 ignore start */
|
|
36554
|
-
const p$1 = process$
|
|
36555
|
+
const p$1 = process$4;
|
|
36555
36556
|
if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
|
|
36556
36557
|
/* c8 ignore stop */
|
|
36557
36558
|
if (listeners.length === count$1) {
|
|
@@ -36559,11 +36560,11 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36559
36560
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
36560
36561
|
/* c8 ignore start */
|
|
36561
36562
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
36562
|
-
if (!ret) process$
|
|
36563
|
+
if (!ret) process$4.kill(process$4.pid, s);
|
|
36563
36564
|
}
|
|
36564
36565
|
};
|
|
36565
|
-
this.#originalProcessReallyExit = process$
|
|
36566
|
-
this.#originalProcessEmit = process$
|
|
36566
|
+
this.#originalProcessReallyExit = process$4.reallyExit;
|
|
36567
|
+
this.#originalProcessEmit = process$4.emit;
|
|
36567
36568
|
}
|
|
36568
36569
|
onExit(cb, opts) {
|
|
36569
36570
|
/* c8 ignore start */
|
|
@@ -36630,8 +36631,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36630
36631
|
} else return og.call(this.#process, ev, ...args);
|
|
36631
36632
|
}
|
|
36632
36633
|
};
|
|
36633
|
-
const process$
|
|
36634
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$
|
|
36634
|
+
const process$1 = globalThis.process;
|
|
36635
|
+
const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
36635
36636
|
|
|
36636
36637
|
//#endregion
|
|
36637
36638
|
//#region node_modules/execa/lib/terminate/cleanup.js
|
|
@@ -38473,7 +38474,7 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38473
38474
|
id: projectId,
|
|
38474
38475
|
projectRoot: resolvedPath
|
|
38475
38476
|
});
|
|
38476
|
-
const { project, entities
|
|
38477
|
+
const { project, entities } = await readProjectConfig(resolvedPath);
|
|
38477
38478
|
let finalAppUrl;
|
|
38478
38479
|
if (entities.length > 0) {
|
|
38479
38480
|
let shouldPushEntities;
|
|
@@ -38488,19 +38489,6 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38488
38489
|
errorMessage: "Failed to push data models"
|
|
38489
38490
|
});
|
|
38490
38491
|
}
|
|
38491
|
-
if (agents.length > 0) {
|
|
38492
|
-
let shouldPushAgents;
|
|
38493
|
-
if (isInteractive) {
|
|
38494
|
-
const result = await ye({ message: "Configure AI agent? (This sets up the AI assistant included in the template)" });
|
|
38495
|
-
shouldPushAgents = !pD(result) && result;
|
|
38496
|
-
} else shouldPushAgents = !!deploy;
|
|
38497
|
-
if (shouldPushAgents) await runTask(`Configuring ${agents.length} AI agent${agents.length > 1 ? "s" : ""}...`, async () => {
|
|
38498
|
-
await pushAgents(agents);
|
|
38499
|
-
}, {
|
|
38500
|
-
successMessage: theme.colors.base44Orange("AI agent configured successfully"),
|
|
38501
|
-
errorMessage: "Failed to configure AI agent"
|
|
38502
|
-
});
|
|
38503
|
-
}
|
|
38504
38492
|
if (project.site) {
|
|
38505
38493
|
const { installCommand, buildCommand, outputDirectory } = project.site;
|
|
38506
38494
|
let shouldDeploy;
|
|
@@ -38598,7 +38586,7 @@ function isInsideContainer() {
|
|
|
38598
38586
|
//#endregion
|
|
38599
38587
|
//#region node_modules/is-wsl/index.js
|
|
38600
38588
|
const isWsl = () => {
|
|
38601
|
-
if (
|
|
38589
|
+
if (y.platform !== "linux") return false;
|
|
38602
38590
|
if (os.release().toLowerCase().includes("microsoft")) {
|
|
38603
38591
|
if (isInsideContainer()) return false;
|
|
38604
38592
|
return true;
|
|
@@ -38609,12 +38597,12 @@ const isWsl = () => {
|
|
|
38609
38597
|
return false;
|
|
38610
38598
|
}
|
|
38611
38599
|
};
|
|
38612
|
-
var is_wsl_default =
|
|
38600
|
+
var is_wsl_default = y.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
38613
38601
|
|
|
38614
38602
|
//#endregion
|
|
38615
38603
|
//#region node_modules/powershell-utils/index.js
|
|
38616
38604
|
const execFile$2 = promisify(childProcess.execFile);
|
|
38617
|
-
const powerShellPath$1 = () => `${
|
|
38605
|
+
const powerShellPath$1 = () => `${y.env.SYSTEMROOT || y.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
38618
38606
|
const executePowerShell = async (command, options = {}) => {
|
|
38619
38607
|
const { powerShellPath: psPath, ...execFileOptions } = options;
|
|
38620
38608
|
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
@@ -38725,7 +38713,7 @@ function defineLazyProperty(object$1, propertyName, valueGetter) {
|
|
|
38725
38713
|
//#region node_modules/default-browser-id/index.js
|
|
38726
38714
|
const execFileAsync$3 = promisify(execFile);
|
|
38727
38715
|
async function defaultBrowserId() {
|
|
38728
|
-
if (
|
|
38716
|
+
if (y.platform !== "darwin") throw new Error("macOS only");
|
|
38729
38717
|
const { stdout: stdout$1 } = await execFileAsync$3("defaults", [
|
|
38730
38718
|
"read",
|
|
38731
38719
|
"com.apple.LaunchServices/com.apple.launchservices.secure",
|
|
@@ -38740,7 +38728,7 @@ async function defaultBrowserId() {
|
|
|
38740
38728
|
//#region node_modules/run-applescript/index.js
|
|
38741
38729
|
const execFileAsync$2 = promisify(execFile);
|
|
38742
38730
|
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
38743
|
-
if (
|
|
38731
|
+
if (y.platform !== "darwin") throw new Error("macOS only");
|
|
38744
38732
|
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
38745
38733
|
const execOptions = {};
|
|
38746
38734
|
if (signal) execOptions.signal = signal;
|
|
@@ -38849,14 +38837,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
|
|
|
38849
38837
|
const execFileAsync = promisify(execFile);
|
|
38850
38838
|
const titleize = (string$2) => string$2.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x$2) => x$2.toUpperCase());
|
|
38851
38839
|
async function defaultBrowser() {
|
|
38852
|
-
if (
|
|
38840
|
+
if (y.platform === "darwin") {
|
|
38853
38841
|
const id = await defaultBrowserId();
|
|
38854
38842
|
return {
|
|
38855
38843
|
name: await bundleName(id),
|
|
38856
38844
|
id
|
|
38857
38845
|
};
|
|
38858
38846
|
}
|
|
38859
|
-
if (
|
|
38847
|
+
if (y.platform === "linux") {
|
|
38860
38848
|
const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
|
|
38861
38849
|
"query",
|
|
38862
38850
|
"default",
|
|
@@ -38868,13 +38856,13 @@ async function defaultBrowser() {
|
|
|
38868
38856
|
id
|
|
38869
38857
|
};
|
|
38870
38858
|
}
|
|
38871
|
-
if (
|
|
38859
|
+
if (y.platform === "win32") return defaultBrowser$1();
|
|
38872
38860
|
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
38873
38861
|
}
|
|
38874
38862
|
|
|
38875
38863
|
//#endregion
|
|
38876
38864
|
//#region node_modules/is-in-ssh/index.js
|
|
38877
|
-
const isInSsh = Boolean(
|
|
38865
|
+
const isInSsh = Boolean(y.env.SSH_CONNECTION || y.env.SSH_CLIENT || y.env.SSH_TTY);
|
|
38878
38866
|
var is_in_ssh_default = isInSsh;
|
|
38879
38867
|
|
|
38880
38868
|
//#endregion
|
|
@@ -38882,7 +38870,7 @@ var is_in_ssh_default = isInSsh;
|
|
|
38882
38870
|
const fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
38883
38871
|
const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
|
|
38884
38872
|
const localXdgOpenPath = path.join(__dirname, "xdg-open");
|
|
38885
|
-
const { platform: platform$1, arch } =
|
|
38873
|
+
const { platform: platform$1, arch } = y;
|
|
38886
38874
|
const tryEachApp = async (apps$1, opener) => {
|
|
38887
38875
|
if (apps$1.length === 0) return;
|
|
38888
38876
|
const errors = [];
|
|
@@ -38995,7 +38983,7 @@ const baseOpen = async (options) => {
|
|
|
38995
38983
|
await fs$1.access(localXdgOpenPath, constants$1.X_OK);
|
|
38996
38984
|
exeLocalXdgOpen = true;
|
|
38997
38985
|
} catch {}
|
|
38998
|
-
command =
|
|
38986
|
+
command = y.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
|
|
38999
38987
|
}
|
|
39000
38988
|
if (appArguments.length > 0) cliArguments.push(...appArguments);
|
|
39001
38989
|
if (!options.wait) {
|
|
@@ -39299,4 +39287,87 @@ program.addCommand(functionsDeployCommand);
|
|
|
39299
39287
|
program.addCommand(siteDeployCommand);
|
|
39300
39288
|
|
|
39301
39289
|
//#endregion
|
|
39302
|
-
|
|
39290
|
+
//#region src/cli/error-reporter.ts
|
|
39291
|
+
/**
|
|
39292
|
+
* Error reporter using PostHog for CLI executions.
|
|
39293
|
+
* Designed for short-running CLI tools with proper shutdown handling.
|
|
39294
|
+
*/
|
|
39295
|
+
var ErrorReporter = class {
|
|
39296
|
+
client = null;
|
|
39297
|
+
isEnabled = false;
|
|
39298
|
+
shutdownPromise = null;
|
|
39299
|
+
/**
|
|
39300
|
+
* Initialize the error reporter with PostHog configuration.
|
|
39301
|
+
* @param apiKey - PostHog API key
|
|
39302
|
+
* @param host - PostHog host URL (optional, defaults to PostHog cloud)
|
|
39303
|
+
*/
|
|
39304
|
+
initialize(apiKey, host) {
|
|
39305
|
+
if (!apiKey) {
|
|
39306
|
+
console.warn("PostHog API key not provided. Error reporting disabled.");
|
|
39307
|
+
return;
|
|
39308
|
+
}
|
|
39309
|
+
try {
|
|
39310
|
+
this.client = new PostHog(apiKey, {
|
|
39311
|
+
host: host || "https://us.i.posthog.com",
|
|
39312
|
+
flushAt: 1,
|
|
39313
|
+
flushInterval: 0
|
|
39314
|
+
});
|
|
39315
|
+
this.isEnabled = true;
|
|
39316
|
+
} catch (error) {
|
|
39317
|
+
console.error("Failed to initialize PostHog client:", error);
|
|
39318
|
+
this.isEnabled = false;
|
|
39319
|
+
}
|
|
39320
|
+
}
|
|
39321
|
+
/**
|
|
39322
|
+
* Capture an exception and report it to PostHog.
|
|
39323
|
+
* @param error - The error to capture
|
|
39324
|
+
* @param context - Optional additional context about the error
|
|
39325
|
+
*/
|
|
39326
|
+
async captureException(error, context) {
|
|
39327
|
+
if (!this.isEnabled || !this.client) return;
|
|
39328
|
+
try {
|
|
39329
|
+
const properties = {
|
|
39330
|
+
error_name: error.name,
|
|
39331
|
+
error_message: error.message,
|
|
39332
|
+
error_stack: error.stack,
|
|
39333
|
+
...context
|
|
39334
|
+
};
|
|
39335
|
+
this.client.capture({
|
|
39336
|
+
distinctId: "cli-user",
|
|
39337
|
+
event: "cli_error",
|
|
39338
|
+
properties
|
|
39339
|
+
});
|
|
39340
|
+
await this.client.flush();
|
|
39341
|
+
} catch (captureError) {
|
|
39342
|
+
console.error("Failed to capture exception:", captureError);
|
|
39343
|
+
}
|
|
39344
|
+
}
|
|
39345
|
+
/**
|
|
39346
|
+
* Shutdown the error reporter and ensure all events are sent.
|
|
39347
|
+
* MUST be called before CLI exits to ensure events are flushed.
|
|
39348
|
+
*/
|
|
39349
|
+
async shutdown() {
|
|
39350
|
+
if (!this.client || this.shutdownPromise) return this.shutdownPromise || Promise.resolve();
|
|
39351
|
+
this.shutdownPromise = (async () => {
|
|
39352
|
+
try {
|
|
39353
|
+
await this.client.shutdown();
|
|
39354
|
+
} catch (error) {
|
|
39355
|
+
console.error("Error during PostHog shutdown:", error);
|
|
39356
|
+
} finally {
|
|
39357
|
+
this.isEnabled = false;
|
|
39358
|
+
this.client = null;
|
|
39359
|
+
}
|
|
39360
|
+
})();
|
|
39361
|
+
return this.shutdownPromise;
|
|
39362
|
+
}
|
|
39363
|
+
/**
|
|
39364
|
+
* Check if error reporting is enabled.
|
|
39365
|
+
*/
|
|
39366
|
+
get enabled() {
|
|
39367
|
+
return this.isEnabled;
|
|
39368
|
+
}
|
|
39369
|
+
};
|
|
39370
|
+
const errorReporter = new ErrorReporter();
|
|
39371
|
+
|
|
39372
|
+
//#endregion
|
|
39373
|
+
export { CLIExitError, errorReporter, program };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"instructions": "You are a helpful task management assistant. You can help users create, update, mark as completed, and delete tasks using the entity tool. When a user asks to change a task, help them modify it by updating the appropriate fields. Always be conversational and helpful.",
|
|
5
5
|
"tool_configs": [
|
|
6
6
|
{
|
|
7
|
-
"entity_name": "
|
|
7
|
+
"entity_name": "Task",
|
|
8
8
|
"allowed_operations": ["read", "create", "update", "delete"]
|
|
9
9
|
}
|
|
10
10
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@base44-preview/cli",
|
|
3
|
-
"version": "0.0.25-pr.
|
|
3
|
+
"version": "0.0.25-pr.156.f6042c0",
|
|
4
4
|
"description": "Base44 CLI - Unified interface for managing Base44 applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -31,6 +31,9 @@
|
|
|
31
31
|
"type": "git",
|
|
32
32
|
"url": "https://github.com/base44/cli"
|
|
33
33
|
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"posthog-node": "^4.2.1"
|
|
36
|
+
},
|
|
34
37
|
"devDependencies": {
|
|
35
38
|
"@clack/prompts": "^0.11.0",
|
|
36
39
|
"@stylistic/eslint-plugin": "^5.6.1",
|