@chat-js/cli 0.3.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1173 -964
- package/package.json +1 -1
- package/templates/chat-app/app/(auth)/device-login/page.tsx +37 -0
- package/templates/chat-app/app/(auth)/login/page.tsx +26 -2
- package/templates/chat-app/app/(auth)/register/page.tsx +0 -12
- package/templates/chat-app/app/(chat)/api/chat/filter-reasoning-parts.ts +1 -1
- package/templates/chat-app/app/(chat)/api/chat/prepare/route.ts +94 -0
- package/templates/chat-app/app/(chat)/api/chat/route.ts +107 -16
- package/templates/chat-app/app/(chat)/layout.tsx +4 -1
- package/templates/chat-app/app/api/trpc/[trpc]/route.ts +1 -0
- package/templates/chat-app/app/globals.css +9 -9
- package/templates/chat-app/app/layout.tsx +4 -2
- package/templates/chat-app/biome.jsonc +3 -3
- package/templates/chat-app/chat.config.ts +32 -12
- package/templates/chat-app/components/ai-elements/prompt-input.tsx +1 -1
- package/templates/chat-app/components/anonymous-session-init.tsx +10 -6
- package/templates/chat-app/components/artifact-actions.tsx +81 -18
- package/templates/chat-app/components/artifact-panel.tsx +142 -41
- package/templates/chat-app/components/attachment-list.tsx +1 -1
- package/templates/chat-app/components/{social-auth-providers.tsx → auth-providers.tsx} +49 -4
- package/templates/chat-app/components/chat/chat-welcome.tsx +3 -3
- package/templates/chat-app/components/chat-menu-items.tsx +1 -1
- package/templates/chat-app/components/chat-sync.tsx +9 -11
- package/templates/chat-app/components/console.tsx +9 -9
- package/templates/chat-app/components/context-usage.tsx +2 -2
- package/templates/chat-app/components/create-artifact.tsx +15 -5
- package/templates/chat-app/components/data-stream-handler.tsx +57 -16
- package/templates/chat-app/components/device-login-page.tsx +191 -0
- package/templates/chat-app/components/diffview.tsx +8 -2
- package/templates/chat-app/components/electron-auth-handler.tsx +184 -0
- package/templates/chat-app/components/electron-auth-ui.tsx +121 -0
- package/templates/chat-app/components/favicon-group.tsx +1 -1
- package/templates/chat-app/components/feedback-actions.tsx +7 -3
- package/templates/chat-app/components/greeting.tsx +1 -1
- package/templates/chat-app/components/interactive-chart-impl.tsx +3 -4
- package/templates/chat-app/components/interactive-charts.tsx +1 -1
- package/templates/chat-app/components/login-form.tsx +52 -10
- package/templates/chat-app/components/message-editor.tsx +7 -3
- package/templates/chat-app/components/message-siblings.tsx +14 -1
- package/templates/chat-app/components/model-selector.tsx +295 -27
- package/templates/chat-app/components/multimodal-input.tsx +259 -22
- package/templates/chat-app/components/parallel-response-cards.tsx +175 -0
- package/templates/chat-app/components/part/code-execution.tsx +8 -2
- package/templates/chat-app/components/part/document-common.tsx +1 -1
- package/templates/chat-app/components/part/document-preview.tsx +5 -5
- package/templates/chat-app/components/part/retrieve-url.tsx +12 -12
- package/templates/chat-app/components/part/text-message-part.tsx +9 -1
- package/templates/chat-app/components/project-chat-item.tsx +1 -1
- package/templates/chat-app/components/project-menu-items.tsx +1 -1
- package/templates/chat-app/components/research-task.tsx +1 -1
- package/templates/chat-app/components/research-tasks.tsx +1 -1
- package/templates/chat-app/components/retry-button.tsx +25 -8
- package/templates/chat-app/components/sandbox.tsx +1 -1
- package/templates/chat-app/components/sheet-editor.tsx +7 -7
- package/templates/chat-app/components/sidebar-chats-list.tsx +1 -1
- package/templates/chat-app/components/sidebar-toggle.tsx +15 -2
- package/templates/chat-app/components/sidebar-top-row.tsx +27 -12
- package/templates/chat-app/components/sidebar-user-nav.tsx +10 -1
- package/templates/chat-app/components/signup-form.tsx +49 -10
- package/templates/chat-app/components/sources.tsx +4 -4
- package/templates/chat-app/components/text-editor.tsx +5 -2
- package/templates/chat-app/components/toolbar.tsx +3 -3
- package/templates/chat-app/components/ui/sidebar.tsx +0 -1
- package/templates/chat-app/components/upgrade-cta/limit-display.tsx +1 -1
- package/templates/chat-app/components/user-message.tsx +14 -2
- package/templates/chat-app/electron.d.ts +41 -0
- package/templates/chat-app/evals/my-eval.eval.ts +3 -1
- package/templates/chat-app/hooks/chat-sync-hooks.ts +11 -0
- package/templates/chat-app/hooks/use-artifact.tsx +13 -13
- package/templates/chat-app/hooks/use-navigate-to-message.ts +39 -0
- package/templates/chat-app/lib/ai/gateways/provider-types.ts +19 -10
- package/templates/chat-app/lib/ai/stream-errors.test.ts +72 -0
- package/templates/chat-app/lib/ai/stream-errors.ts +94 -0
- package/templates/chat-app/lib/ai/tools/code-execution.javascript.ts +171 -0
- package/templates/chat-app/lib/ai/tools/code-execution.python.ts +336 -0
- package/templates/chat-app/lib/ai/tools/code-execution.shared.test.ts +71 -0
- package/templates/chat-app/lib/ai/tools/code-execution.shared.ts +59 -0
- package/templates/chat-app/lib/ai/tools/code-execution.ts +62 -391
- package/templates/chat-app/lib/ai/tools/code-execution.types.ts +24 -0
- package/templates/chat-app/lib/ai/tools/steps/multi-query-web-search.ts +3 -2
- package/templates/chat-app/lib/ai/types.ts +74 -3
- package/templates/chat-app/lib/anonymous-session-client.ts +0 -3
- package/templates/chat-app/lib/artifacts/code/client.tsx +35 -5
- package/templates/chat-app/lib/artifacts/sheet/client.tsx +11 -3
- package/templates/chat-app/lib/auth-client.ts +23 -1
- package/templates/chat-app/lib/auth.ts +18 -1
- package/templates/chat-app/lib/blob.ts +1 -1
- package/templates/chat-app/lib/clone-messages.ts +1 -1
- package/templates/chat-app/lib/config-schema.ts +18 -1
- package/templates/chat-app/lib/constants.ts +3 -4
- package/templates/chat-app/lib/db/migrations/0044_gray_red_shift.sql +5 -0
- package/templates/chat-app/lib/db/migrations/meta/0044_snapshot.json +1480 -0
- package/templates/chat-app/lib/db/migrations/meta/_journal.json +7 -0
- package/templates/chat-app/lib/db/queries.ts +84 -4
- package/templates/chat-app/lib/db/schema.ts +4 -1
- package/templates/chat-app/lib/editor/config.ts +4 -4
- package/templates/chat-app/lib/electron-auth.ts +96 -0
- package/templates/chat-app/lib/env-schema.ts +33 -4
- package/templates/chat-app/lib/message-conversion.ts +14 -2
- package/templates/chat-app/lib/playwright-test-environment.ts +18 -0
- package/templates/chat-app/lib/social-auth.ts +5 -0
- package/templates/chat-app/lib/stores/hooks-threads.ts +38 -1
- package/templates/chat-app/lib/stores/with-threads.test.ts +137 -0
- package/templates/chat-app/lib/stores/with-threads.ts +159 -7
- package/templates/chat-app/lib/stores/with-tracing.ts +1 -1
- package/templates/chat-app/lib/thread-utils.ts +22 -3
- package/templates/chat-app/lib/utils/download-assets.ts +6 -7
- package/templates/chat-app/lib/utils/rate-limit.ts +9 -3
- package/templates/chat-app/package.json +20 -18
- package/templates/chat-app/playwright.config.ts +0 -19
- package/templates/chat-app/providers/chat-input-provider.tsx +40 -2
- package/templates/chat-app/proxy.ts +28 -3
- package/templates/chat-app/scripts/check-env.ts +10 -0
- package/templates/chat-app/scripts/db-branch-delete.sh +7 -1
- package/templates/chat-app/scripts/db-branch-use.sh +7 -1
- package/templates/chat-app/scripts/with-db.sh +7 -1
- package/templates/chat-app/trpc/server.tsx +7 -2
- package/templates/chat-app/tsconfig.json +2 -1
- package/templates/chat-app/vercel.json +0 -10
- package/templates/chat-app/vitest.config.ts +2 -0
- package/templates/electron/CHANGELOG.md +7 -0
- package/templates/electron/README.md +54 -0
- package/templates/electron/entitlements.mac.plist +10 -0
- package/templates/electron/forge.config.ts +157 -0
- package/templates/electron/icon.png +0 -0
- package/templates/electron/package.json +53 -0
- package/templates/electron/scripts/generate-icons.test.js +37 -0
- package/templates/electron/scripts/generate-icons.ts +29 -0
- package/templates/electron/scripts/run-forge.cjs +28 -0
- package/templates/electron/scripts/write-branding.ts +18 -0
- package/templates/electron/src/config.ts +16 -0
- package/templates/electron/src/lib/auth-client.ts +64 -0
- package/templates/electron/src/main.ts +670 -0
- package/templates/electron/src/preload.d.ts +27 -0
- package/templates/electron/src/preload.ts +25 -0
- package/templates/electron/tsconfig.json +18 -0
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ var __export = (target, all) => {
|
|
|
28
28
|
};
|
|
29
29
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
30
30
|
|
|
31
|
-
// ../../node_modules/commander/lib/error.js
|
|
31
|
+
// ../../node_modules/.bun/commander@14.0.3/node_modules/commander/lib/error.js
|
|
32
32
|
var require_error = __commonJS((exports) => {
|
|
33
33
|
class CommanderError extends Error {
|
|
34
34
|
constructor(exitCode, code, message) {
|
|
@@ -52,7 +52,7 @@ var require_error = __commonJS((exports) => {
|
|
|
52
52
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
-
// ../../node_modules/commander/lib/argument.js
|
|
55
|
+
// ../../node_modules/.bun/commander@14.0.3/node_modules/commander/lib/argument.js
|
|
56
56
|
var require_argument = __commonJS((exports) => {
|
|
57
57
|
var { InvalidArgumentError } = require_error();
|
|
58
58
|
|
|
@@ -132,7 +132,7 @@ var require_argument = __commonJS((exports) => {
|
|
|
132
132
|
exports.humanReadableArgName = humanReadableArgName;
|
|
133
133
|
});
|
|
134
134
|
|
|
135
|
-
// ../../node_modules/commander/lib/help.js
|
|
135
|
+
// ../../node_modules/.bun/commander@14.0.3/node_modules/commander/lib/help.js
|
|
136
136
|
var require_help = __commonJS((exports) => {
|
|
137
137
|
var { humanReadableArgName } = require_argument();
|
|
138
138
|
|
|
@@ -489,7 +489,7 @@ ${itemIndentStr}`);
|
|
|
489
489
|
exports.stripColor = stripColor;
|
|
490
490
|
});
|
|
491
491
|
|
|
492
|
-
// ../../node_modules/commander/lib/option.js
|
|
492
|
+
// ../../node_modules/.bun/commander@14.0.3/node_modules/commander/lib/option.js
|
|
493
493
|
var require_option = __commonJS((exports) => {
|
|
494
494
|
var { InvalidArgumentError } = require_error();
|
|
495
495
|
|
|
@@ -673,7 +673,7 @@ var require_option = __commonJS((exports) => {
|
|
|
673
673
|
exports.DualOptions = DualOptions;
|
|
674
674
|
});
|
|
675
675
|
|
|
676
|
-
// ../../node_modules/commander/lib/suggestSimilar.js
|
|
676
|
+
// ../../node_modules/.bun/commander@14.0.3/node_modules/commander/lib/suggestSimilar.js
|
|
677
677
|
var require_suggestSimilar = __commonJS((exports) => {
|
|
678
678
|
var maxDistance = 3;
|
|
679
679
|
function editDistance(a, b) {
|
|
@@ -746,7 +746,7 @@ var require_suggestSimilar = __commonJS((exports) => {
|
|
|
746
746
|
exports.suggestSimilar = suggestSimilar;
|
|
747
747
|
});
|
|
748
748
|
|
|
749
|
-
// ../../node_modules/commander/lib/command.js
|
|
749
|
+
// ../../node_modules/.bun/commander@14.0.3/node_modules/commander/lib/command.js
|
|
750
750
|
var require_command = __commonJS((exports) => {
|
|
751
751
|
var EventEmitter = __require("node:events").EventEmitter;
|
|
752
752
|
var childProcess = __require("node:child_process");
|
|
@@ -2101,7 +2101,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2101
2101
|
exports.useColor = useColor;
|
|
2102
2102
|
});
|
|
2103
2103
|
|
|
2104
|
-
// ../../node_modules/commander/index.js
|
|
2104
|
+
// ../../node_modules/.bun/commander@14.0.3/node_modules/commander/index.js
|
|
2105
2105
|
var require_commander = __commonJS((exports) => {
|
|
2106
2106
|
var { Argument } = require_argument();
|
|
2107
2107
|
var { Command } = require_command();
|
|
@@ -2121,122 +2121,52 @@ var require_commander = __commonJS((exports) => {
|
|
|
2121
2121
|
exports.InvalidOptionArgumentError = InvalidArgumentError;
|
|
2122
2122
|
});
|
|
2123
2123
|
|
|
2124
|
-
// ../../node_modules/
|
|
2125
|
-
var require_picocolors = __commonJS((exports, module) => {
|
|
2126
|
-
var p = process || {};
|
|
2127
|
-
var argv = p.argv || [];
|
|
2128
|
-
var env = p.env || {};
|
|
2129
|
-
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
2130
|
-
var formatter = (open, close, replace = open) => (input) => {
|
|
2131
|
-
let string4 = "" + input, index = string4.indexOf(close, open.length);
|
|
2132
|
-
return ~index ? open + replaceClose(string4, close, replace, index) + close : open + string4 + close;
|
|
2133
|
-
};
|
|
2134
|
-
var replaceClose = (string4, close, replace, index) => {
|
|
2135
|
-
let result = "", cursor = 0;
|
|
2136
|
-
do {
|
|
2137
|
-
result += string4.substring(cursor, index) + replace;
|
|
2138
|
-
cursor = index + close.length;
|
|
2139
|
-
index = string4.indexOf(close, cursor);
|
|
2140
|
-
} while (~index);
|
|
2141
|
-
return result + string4.substring(cursor);
|
|
2142
|
-
};
|
|
2143
|
-
var createColors = (enabled = isColorSupported) => {
|
|
2144
|
-
let f = enabled ? formatter : () => String;
|
|
2145
|
-
return {
|
|
2146
|
-
isColorSupported: enabled,
|
|
2147
|
-
reset: f("\x1B[0m", "\x1B[0m"),
|
|
2148
|
-
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
2149
|
-
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
2150
|
-
italic: f("\x1B[3m", "\x1B[23m"),
|
|
2151
|
-
underline: f("\x1B[4m", "\x1B[24m"),
|
|
2152
|
-
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
2153
|
-
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
2154
|
-
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
2155
|
-
black: f("\x1B[30m", "\x1B[39m"),
|
|
2156
|
-
red: f("\x1B[31m", "\x1B[39m"),
|
|
2157
|
-
green: f("\x1B[32m", "\x1B[39m"),
|
|
2158
|
-
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
2159
|
-
blue: f("\x1B[34m", "\x1B[39m"),
|
|
2160
|
-
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
2161
|
-
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
2162
|
-
white: f("\x1B[37m", "\x1B[39m"),
|
|
2163
|
-
gray: f("\x1B[90m", "\x1B[39m"),
|
|
2164
|
-
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
2165
|
-
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
2166
|
-
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
2167
|
-
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
2168
|
-
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
2169
|
-
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
2170
|
-
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
2171
|
-
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
2172
|
-
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
2173
|
-
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
2174
|
-
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
2175
|
-
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
2176
|
-
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
2177
|
-
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
2178
|
-
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
2179
|
-
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
2180
|
-
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
2181
|
-
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
2182
|
-
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
2183
|
-
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
2184
|
-
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
2185
|
-
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
2186
|
-
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
2187
|
-
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
2188
|
-
};
|
|
2189
|
-
};
|
|
2190
|
-
module.exports = createColors();
|
|
2191
|
-
module.exports.createColors = createColors;
|
|
2192
|
-
});
|
|
2193
|
-
|
|
2194
|
-
// ../../node_modules/sisteransi/src/index.js
|
|
2124
|
+
// ../../node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
2195
2125
|
var require_src = __commonJS((exports, module) => {
|
|
2196
|
-
var
|
|
2197
|
-
var
|
|
2126
|
+
var ESC2 = "\x1B";
|
|
2127
|
+
var CSI2 = `${ESC2}[`;
|
|
2198
2128
|
var beep = "\x07";
|
|
2199
2129
|
var cursor = {
|
|
2200
2130
|
to(x, y) {
|
|
2201
2131
|
if (!y)
|
|
2202
|
-
return `${
|
|
2203
|
-
return `${
|
|
2132
|
+
return `${CSI2}${x + 1}G`;
|
|
2133
|
+
return `${CSI2}${y + 1};${x + 1}H`;
|
|
2204
2134
|
},
|
|
2205
2135
|
move(x, y) {
|
|
2206
2136
|
let ret = "";
|
|
2207
2137
|
if (x < 0)
|
|
2208
|
-
ret += `${
|
|
2138
|
+
ret += `${CSI2}${-x}D`;
|
|
2209
2139
|
else if (x > 0)
|
|
2210
|
-
ret += `${
|
|
2140
|
+
ret += `${CSI2}${x}C`;
|
|
2211
2141
|
if (y < 0)
|
|
2212
|
-
ret += `${
|
|
2142
|
+
ret += `${CSI2}${-y}A`;
|
|
2213
2143
|
else if (y > 0)
|
|
2214
|
-
ret += `${
|
|
2144
|
+
ret += `${CSI2}${y}B`;
|
|
2215
2145
|
return ret;
|
|
2216
2146
|
},
|
|
2217
|
-
up: (count = 1) => `${
|
|
2218
|
-
down: (count = 1) => `${
|
|
2219
|
-
forward: (count = 1) => `${
|
|
2220
|
-
backward: (count = 1) => `${
|
|
2221
|
-
nextLine: (count = 1) => `${
|
|
2222
|
-
prevLine: (count = 1) => `${
|
|
2223
|
-
left: `${
|
|
2224
|
-
hide: `${
|
|
2225
|
-
show: `${
|
|
2226
|
-
save: `${
|
|
2227
|
-
restore: `${
|
|
2147
|
+
up: (count = 1) => `${CSI2}${count}A`,
|
|
2148
|
+
down: (count = 1) => `${CSI2}${count}B`,
|
|
2149
|
+
forward: (count = 1) => `${CSI2}${count}C`,
|
|
2150
|
+
backward: (count = 1) => `${CSI2}${count}D`,
|
|
2151
|
+
nextLine: (count = 1) => `${CSI2}E`.repeat(count),
|
|
2152
|
+
prevLine: (count = 1) => `${CSI2}F`.repeat(count),
|
|
2153
|
+
left: `${CSI2}G`,
|
|
2154
|
+
hide: `${CSI2}?25l`,
|
|
2155
|
+
show: `${CSI2}?25h`,
|
|
2156
|
+
save: `${ESC2}7`,
|
|
2157
|
+
restore: `${ESC2}8`
|
|
2228
2158
|
};
|
|
2229
2159
|
var scroll = {
|
|
2230
|
-
up: (count = 1) => `${
|
|
2231
|
-
down: (count = 1) => `${
|
|
2160
|
+
up: (count = 1) => `${CSI2}S`.repeat(count),
|
|
2161
|
+
down: (count = 1) => `${CSI2}T`.repeat(count)
|
|
2232
2162
|
};
|
|
2233
2163
|
var erase = {
|
|
2234
|
-
screen: `${
|
|
2235
|
-
up: (count = 1) => `${
|
|
2236
|
-
down: (count = 1) => `${
|
|
2237
|
-
line: `${
|
|
2238
|
-
lineEnd: `${
|
|
2239
|
-
lineStart: `${
|
|
2164
|
+
screen: `${CSI2}2J`,
|
|
2165
|
+
up: (count = 1) => `${CSI2}1J`.repeat(count),
|
|
2166
|
+
down: (count = 1) => `${CSI2}J`.repeat(count),
|
|
2167
|
+
line: `${CSI2}2K`,
|
|
2168
|
+
lineEnd: `${CSI2}K`,
|
|
2169
|
+
lineStart: `${CSI2}1K`,
|
|
2240
2170
|
lines(count) {
|
|
2241
2171
|
let clear = "";
|
|
2242
2172
|
for (let i = 0;i < count; i++)
|
|
@@ -2249,7 +2179,7 @@ var require_src = __commonJS((exports, module) => {
|
|
|
2249
2179
|
module.exports = { cursor, scroll, erase, beep };
|
|
2250
2180
|
});
|
|
2251
2181
|
|
|
2252
|
-
// ../../node_modules/cli-spinners/spinners.json
|
|
2182
|
+
// ../../node_modules/.bun/cli-spinners@2.9.2/node_modules/cli-spinners/spinners.json
|
|
2253
2183
|
var require_spinners = __commonJS((exports, module) => {
|
|
2254
2184
|
module.exports = {
|
|
2255
2185
|
dots: {
|
|
@@ -3875,7 +3805,7 @@ var require_spinners = __commonJS((exports, module) => {
|
|
|
3875
3805
|
};
|
|
3876
3806
|
});
|
|
3877
3807
|
|
|
3878
|
-
// ../../node_modules/cli-spinners/index.js
|
|
3808
|
+
// ../../node_modules/.bun/cli-spinners@2.9.2/node_modules/cli-spinners/index.js
|
|
3879
3809
|
var require_cli_spinners = __commonJS((exports, module) => {
|
|
3880
3810
|
var spinners = Object.assign({}, require_spinners());
|
|
3881
3811
|
var spinnersList = Object.keys(spinners);
|
|
@@ -3889,14 +3819,14 @@ var require_cli_spinners = __commonJS((exports, module) => {
|
|
|
3889
3819
|
module.exports = spinners;
|
|
3890
3820
|
});
|
|
3891
3821
|
|
|
3892
|
-
// ../../node_modules/emoji-regex/index.js
|
|
3822
|
+
// ../../node_modules/.bun/emoji-regex@10.6.0/node_modules/emoji-regex/index.js
|
|
3893
3823
|
var require_emoji_regex = __commonJS((exports, module) => {
|
|
3894
3824
|
module.exports = () => {
|
|
3895
3825
|
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
3896
3826
|
};
|
|
3897
3827
|
});
|
|
3898
3828
|
|
|
3899
|
-
// ../../node_modules/commander/esm.mjs
|
|
3829
|
+
// ../../node_modules/.bun/commander@14.0.3/node_modules/commander/esm.mjs
|
|
3900
3830
|
var import__ = __toESM(require_commander(), 1);
|
|
3901
3831
|
var {
|
|
3902
3832
|
program,
|
|
@@ -3914,7 +3844,7 @@ var {
|
|
|
3914
3844
|
// package.json
|
|
3915
3845
|
var package_default = {
|
|
3916
3846
|
name: "@chat-js/cli",
|
|
3917
|
-
version: "0.
|
|
3847
|
+
version: "0.6.0",
|
|
3918
3848
|
description: "CLI for creating and extending ChatJS apps",
|
|
3919
3849
|
license: "Apache-2.0",
|
|
3920
3850
|
repository: {
|
|
@@ -3963,7 +3893,7 @@ var package_default = {
|
|
|
3963
3893
|
}
|
|
3964
3894
|
};
|
|
3965
3895
|
|
|
3966
|
-
// ../../node_modules/zod/v4/classic/external.js
|
|
3896
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
3967
3897
|
var exports_external = {};
|
|
3968
3898
|
__export(exports_external, {
|
|
3969
3899
|
xor: () => xor,
|
|
@@ -4204,7 +4134,7 @@ __export(exports_external, {
|
|
|
4204
4134
|
$brand: () => $brand
|
|
4205
4135
|
});
|
|
4206
4136
|
|
|
4207
|
-
// ../../node_modules/zod/v4/core/index.js
|
|
4137
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/index.js
|
|
4208
4138
|
var exports_core2 = {};
|
|
4209
4139
|
__export(exports_core2, {
|
|
4210
4140
|
version: () => version,
|
|
@@ -4482,7 +4412,7 @@ __export(exports_core2, {
|
|
|
4482
4412
|
$ZodAny: () => $ZodAny
|
|
4483
4413
|
});
|
|
4484
4414
|
|
|
4485
|
-
// ../../node_modules/zod/v4/core/core.js
|
|
4415
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/core.js
|
|
4486
4416
|
var NEVER = Object.freeze({
|
|
4487
4417
|
status: "aborted"
|
|
4488
4418
|
});
|
|
@@ -4558,7 +4488,7 @@ function config(newConfig) {
|
|
|
4558
4488
|
Object.assign(globalConfig, newConfig);
|
|
4559
4489
|
return globalConfig;
|
|
4560
4490
|
}
|
|
4561
|
-
// ../../node_modules/zod/v4/core/util.js
|
|
4491
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/util.js
|
|
4562
4492
|
var exports_util = {};
|
|
4563
4493
|
__export(exports_util, {
|
|
4564
4494
|
unwrapMessage: () => unwrapMessage,
|
|
@@ -5232,7 +5162,7 @@ class Class {
|
|
|
5232
5162
|
constructor(..._args) {}
|
|
5233
5163
|
}
|
|
5234
5164
|
|
|
5235
|
-
// ../../node_modules/zod/v4/core/errors.js
|
|
5165
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/errors.js
|
|
5236
5166
|
var initializer = (inst, def) => {
|
|
5237
5167
|
inst.name = "$ZodError";
|
|
5238
5168
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -5369,7 +5299,7 @@ function prettifyError(error) {
|
|
|
5369
5299
|
`);
|
|
5370
5300
|
}
|
|
5371
5301
|
|
|
5372
|
-
// ../../node_modules/zod/v4/core/parse.js
|
|
5302
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/parse.js
|
|
5373
5303
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
5374
5304
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
|
5375
5305
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
@@ -5456,7 +5386,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
5456
5386
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
5457
5387
|
};
|
|
5458
5388
|
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
5459
|
-
// ../../node_modules/zod/v4/core/regexes.js
|
|
5389
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/regexes.js
|
|
5460
5390
|
var exports_regexes = {};
|
|
5461
5391
|
__export(exports_regexes, {
|
|
5462
5392
|
xid: () => xid,
|
|
@@ -5613,7 +5543,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
|
5613
5543
|
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
5614
5544
|
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
5615
5545
|
|
|
5616
|
-
// ../../node_modules/zod/v4/core/checks.js
|
|
5546
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/checks.js
|
|
5617
5547
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
5618
5548
|
var _a;
|
|
5619
5549
|
inst._zod ?? (inst._zod = {});
|
|
@@ -6160,7 +6090,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
6160
6090
|
};
|
|
6161
6091
|
});
|
|
6162
6092
|
|
|
6163
|
-
// ../../node_modules/zod/v4/core/doc.js
|
|
6093
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/doc.js
|
|
6164
6094
|
class Doc {
|
|
6165
6095
|
constructor(args = []) {
|
|
6166
6096
|
this.content = [];
|
|
@@ -6198,14 +6128,14 @@ class Doc {
|
|
|
6198
6128
|
}
|
|
6199
6129
|
}
|
|
6200
6130
|
|
|
6201
|
-
// ../../node_modules/zod/v4/core/versions.js
|
|
6131
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/versions.js
|
|
6202
6132
|
var version = {
|
|
6203
6133
|
major: 4,
|
|
6204
6134
|
minor: 3,
|
|
6205
6135
|
patch: 6
|
|
6206
6136
|
};
|
|
6207
6137
|
|
|
6208
|
-
// ../../node_modules/zod/v4/core/schemas.js
|
|
6138
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/schemas.js
|
|
6209
6139
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
6210
6140
|
var _a;
|
|
6211
6141
|
inst ?? (inst = {});
|
|
@@ -8167,7 +8097,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
8167
8097
|
payload.issues.push(issue(_iss));
|
|
8168
8098
|
}
|
|
8169
8099
|
}
|
|
8170
|
-
// ../../node_modules/zod/v4/locales/index.js
|
|
8100
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/index.js
|
|
8171
8101
|
var exports_locales = {};
|
|
8172
8102
|
__export(exports_locales, {
|
|
8173
8103
|
zhTW: () => zh_TW_default,
|
|
@@ -8221,7 +8151,7 @@ __export(exports_locales, {
|
|
|
8221
8151
|
ar: () => ar_default
|
|
8222
8152
|
});
|
|
8223
8153
|
|
|
8224
|
-
// ../../node_modules/zod/v4/locales/ar.js
|
|
8154
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ar.js
|
|
8225
8155
|
var error = () => {
|
|
8226
8156
|
const Sizable = {
|
|
8227
8157
|
string: { unit: "حرف", verb: "أن يحوي" },
|
|
@@ -8327,7 +8257,7 @@ function ar_default() {
|
|
|
8327
8257
|
localeError: error()
|
|
8328
8258
|
};
|
|
8329
8259
|
}
|
|
8330
|
-
// ../../node_modules/zod/v4/locales/az.js
|
|
8260
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/az.js
|
|
8331
8261
|
var error2 = () => {
|
|
8332
8262
|
const Sizable = {
|
|
8333
8263
|
string: { unit: "simvol", verb: "olmalıdır" },
|
|
@@ -8432,7 +8362,7 @@ function az_default() {
|
|
|
8432
8362
|
localeError: error2()
|
|
8433
8363
|
};
|
|
8434
8364
|
}
|
|
8435
|
-
// ../../node_modules/zod/v4/locales/be.js
|
|
8365
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/be.js
|
|
8436
8366
|
function getBelarusianPlural(count, one, few, many) {
|
|
8437
8367
|
const absCount = Math.abs(count);
|
|
8438
8368
|
const lastDigit = absCount % 10;
|
|
@@ -8588,7 +8518,7 @@ function be_default() {
|
|
|
8588
8518
|
localeError: error3()
|
|
8589
8519
|
};
|
|
8590
8520
|
}
|
|
8591
|
-
// ../../node_modules/zod/v4/locales/bg.js
|
|
8521
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/bg.js
|
|
8592
8522
|
var error4 = () => {
|
|
8593
8523
|
const Sizable = {
|
|
8594
8524
|
string: { unit: "символа", verb: "да съдържа" },
|
|
@@ -8708,7 +8638,7 @@ function bg_default() {
|
|
|
8708
8638
|
localeError: error4()
|
|
8709
8639
|
};
|
|
8710
8640
|
}
|
|
8711
|
-
// ../../node_modules/zod/v4/locales/ca.js
|
|
8641
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ca.js
|
|
8712
8642
|
var error5 = () => {
|
|
8713
8643
|
const Sizable = {
|
|
8714
8644
|
string: { unit: "caràcters", verb: "contenir" },
|
|
@@ -8815,7 +8745,7 @@ function ca_default() {
|
|
|
8815
8745
|
localeError: error5()
|
|
8816
8746
|
};
|
|
8817
8747
|
}
|
|
8818
|
-
// ../../node_modules/zod/v4/locales/cs.js
|
|
8748
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/cs.js
|
|
8819
8749
|
var error6 = () => {
|
|
8820
8750
|
const Sizable = {
|
|
8821
8751
|
string: { unit: "znaků", verb: "mít" },
|
|
@@ -8926,7 +8856,7 @@ function cs_default() {
|
|
|
8926
8856
|
localeError: error6()
|
|
8927
8857
|
};
|
|
8928
8858
|
}
|
|
8929
|
-
// ../../node_modules/zod/v4/locales/da.js
|
|
8859
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/da.js
|
|
8930
8860
|
var error7 = () => {
|
|
8931
8861
|
const Sizable = {
|
|
8932
8862
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -9041,7 +8971,7 @@ function da_default() {
|
|
|
9041
8971
|
localeError: error7()
|
|
9042
8972
|
};
|
|
9043
8973
|
}
|
|
9044
|
-
// ../../node_modules/zod/v4/locales/de.js
|
|
8974
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/de.js
|
|
9045
8975
|
var error8 = () => {
|
|
9046
8976
|
const Sizable = {
|
|
9047
8977
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -9149,7 +9079,7 @@ function de_default() {
|
|
|
9149
9079
|
localeError: error8()
|
|
9150
9080
|
};
|
|
9151
9081
|
}
|
|
9152
|
-
// ../../node_modules/zod/v4/locales/en.js
|
|
9082
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/en.js
|
|
9153
9083
|
var error9 = () => {
|
|
9154
9084
|
const Sizable = {
|
|
9155
9085
|
string: { unit: "characters", verb: "to have" },
|
|
@@ -9255,7 +9185,7 @@ function en_default() {
|
|
|
9255
9185
|
localeError: error9()
|
|
9256
9186
|
};
|
|
9257
9187
|
}
|
|
9258
|
-
// ../../node_modules/zod/v4/locales/eo.js
|
|
9188
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/eo.js
|
|
9259
9189
|
var error10 = () => {
|
|
9260
9190
|
const Sizable = {
|
|
9261
9191
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
@@ -9364,7 +9294,7 @@ function eo_default() {
|
|
|
9364
9294
|
localeError: error10()
|
|
9365
9295
|
};
|
|
9366
9296
|
}
|
|
9367
|
-
// ../../node_modules/zod/v4/locales/es.js
|
|
9297
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/es.js
|
|
9368
9298
|
var error11 = () => {
|
|
9369
9299
|
const Sizable = {
|
|
9370
9300
|
string: { unit: "caracteres", verb: "tener" },
|
|
@@ -9496,7 +9426,7 @@ function es_default() {
|
|
|
9496
9426
|
localeError: error11()
|
|
9497
9427
|
};
|
|
9498
9428
|
}
|
|
9499
|
-
// ../../node_modules/zod/v4/locales/fa.js
|
|
9429
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/fa.js
|
|
9500
9430
|
var error12 = () => {
|
|
9501
9431
|
const Sizable = {
|
|
9502
9432
|
string: { unit: "کاراکتر", verb: "داشته باشد" },
|
|
@@ -9610,7 +9540,7 @@ function fa_default() {
|
|
|
9610
9540
|
localeError: error12()
|
|
9611
9541
|
};
|
|
9612
9542
|
}
|
|
9613
|
-
// ../../node_modules/zod/v4/locales/fi.js
|
|
9543
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/fi.js
|
|
9614
9544
|
var error13 = () => {
|
|
9615
9545
|
const Sizable = {
|
|
9616
9546
|
string: { unit: "merkkiä", subject: "merkkijonon" },
|
|
@@ -9722,7 +9652,7 @@ function fi_default() {
|
|
|
9722
9652
|
localeError: error13()
|
|
9723
9653
|
};
|
|
9724
9654
|
}
|
|
9725
|
-
// ../../node_modules/zod/v4/locales/fr.js
|
|
9655
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/fr.js
|
|
9726
9656
|
var error14 = () => {
|
|
9727
9657
|
const Sizable = {
|
|
9728
9658
|
string: { unit: "caractères", verb: "avoir" },
|
|
@@ -9830,7 +9760,7 @@ function fr_default() {
|
|
|
9830
9760
|
localeError: error14()
|
|
9831
9761
|
};
|
|
9832
9762
|
}
|
|
9833
|
-
// ../../node_modules/zod/v4/locales/fr-CA.js
|
|
9763
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/fr-CA.js
|
|
9834
9764
|
var error15 = () => {
|
|
9835
9765
|
const Sizable = {
|
|
9836
9766
|
string: { unit: "caractères", verb: "avoir" },
|
|
@@ -9937,7 +9867,7 @@ function fr_CA_default() {
|
|
|
9937
9867
|
localeError: error15()
|
|
9938
9868
|
};
|
|
9939
9869
|
}
|
|
9940
|
-
// ../../node_modules/zod/v4/locales/he.js
|
|
9870
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/he.js
|
|
9941
9871
|
var error16 = () => {
|
|
9942
9872
|
const TypeNames = {
|
|
9943
9873
|
string: { label: "מחרוזת", gender: "f" },
|
|
@@ -10130,7 +10060,7 @@ function he_default() {
|
|
|
10130
10060
|
localeError: error16()
|
|
10131
10061
|
};
|
|
10132
10062
|
}
|
|
10133
|
-
// ../../node_modules/zod/v4/locales/hu.js
|
|
10063
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/hu.js
|
|
10134
10064
|
var error17 = () => {
|
|
10135
10065
|
const Sizable = {
|
|
10136
10066
|
string: { unit: "karakter", verb: "legyen" },
|
|
@@ -10238,7 +10168,7 @@ function hu_default() {
|
|
|
10238
10168
|
localeError: error17()
|
|
10239
10169
|
};
|
|
10240
10170
|
}
|
|
10241
|
-
// ../../node_modules/zod/v4/locales/hy.js
|
|
10171
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/hy.js
|
|
10242
10172
|
function getArmenianPlural(count, one, many) {
|
|
10243
10173
|
return Math.abs(count) === 1 ? one : many;
|
|
10244
10174
|
}
|
|
@@ -10385,7 +10315,7 @@ function hy_default() {
|
|
|
10385
10315
|
localeError: error18()
|
|
10386
10316
|
};
|
|
10387
10317
|
}
|
|
10388
|
-
// ../../node_modules/zod/v4/locales/id.js
|
|
10318
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/id.js
|
|
10389
10319
|
var error19 = () => {
|
|
10390
10320
|
const Sizable = {
|
|
10391
10321
|
string: { unit: "karakter", verb: "memiliki" },
|
|
@@ -10491,7 +10421,7 @@ function id_default() {
|
|
|
10491
10421
|
localeError: error19()
|
|
10492
10422
|
};
|
|
10493
10423
|
}
|
|
10494
|
-
// ../../node_modules/zod/v4/locales/is.js
|
|
10424
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/is.js
|
|
10495
10425
|
var error20 = () => {
|
|
10496
10426
|
const Sizable = {
|
|
10497
10427
|
string: { unit: "stafi", verb: "að hafa" },
|
|
@@ -10600,7 +10530,7 @@ function is_default() {
|
|
|
10600
10530
|
localeError: error20()
|
|
10601
10531
|
};
|
|
10602
10532
|
}
|
|
10603
|
-
// ../../node_modules/zod/v4/locales/it.js
|
|
10533
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/it.js
|
|
10604
10534
|
var error21 = () => {
|
|
10605
10535
|
const Sizable = {
|
|
10606
10536
|
string: { unit: "caratteri", verb: "avere" },
|
|
@@ -10708,7 +10638,7 @@ function it_default() {
|
|
|
10708
10638
|
localeError: error21()
|
|
10709
10639
|
};
|
|
10710
10640
|
}
|
|
10711
|
-
// ../../node_modules/zod/v4/locales/ja.js
|
|
10641
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ja.js
|
|
10712
10642
|
var error22 = () => {
|
|
10713
10643
|
const Sizable = {
|
|
10714
10644
|
string: { unit: "文字", verb: "である" },
|
|
@@ -10815,7 +10745,7 @@ function ja_default() {
|
|
|
10815
10745
|
localeError: error22()
|
|
10816
10746
|
};
|
|
10817
10747
|
}
|
|
10818
|
-
// ../../node_modules/zod/v4/locales/ka.js
|
|
10748
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ka.js
|
|
10819
10749
|
var error23 = () => {
|
|
10820
10750
|
const Sizable = {
|
|
10821
10751
|
string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
|
|
@@ -10927,7 +10857,7 @@ function ka_default() {
|
|
|
10927
10857
|
localeError: error23()
|
|
10928
10858
|
};
|
|
10929
10859
|
}
|
|
10930
|
-
// ../../node_modules/zod/v4/locales/km.js
|
|
10860
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/km.js
|
|
10931
10861
|
var error24 = () => {
|
|
10932
10862
|
const Sizable = {
|
|
10933
10863
|
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
|
|
@@ -11038,11 +10968,11 @@ function km_default() {
|
|
|
11038
10968
|
};
|
|
11039
10969
|
}
|
|
11040
10970
|
|
|
11041
|
-
// ../../node_modules/zod/v4/locales/kh.js
|
|
10971
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/kh.js
|
|
11042
10972
|
function kh_default() {
|
|
11043
10973
|
return km_default();
|
|
11044
10974
|
}
|
|
11045
|
-
// ../../node_modules/zod/v4/locales/ko.js
|
|
10975
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ko.js
|
|
11046
10976
|
var error25 = () => {
|
|
11047
10977
|
const Sizable = {
|
|
11048
10978
|
string: { unit: "문자", verb: "to have" },
|
|
@@ -11153,7 +11083,7 @@ function ko_default() {
|
|
|
11153
11083
|
localeError: error25()
|
|
11154
11084
|
};
|
|
11155
11085
|
}
|
|
11156
|
-
// ../../node_modules/zod/v4/locales/lt.js
|
|
11086
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/lt.js
|
|
11157
11087
|
var capitalizeFirstCharacter = (text) => {
|
|
11158
11088
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
11159
11089
|
};
|
|
@@ -11356,7 +11286,7 @@ function lt_default() {
|
|
|
11356
11286
|
localeError: error26()
|
|
11357
11287
|
};
|
|
11358
11288
|
}
|
|
11359
|
-
// ../../node_modules/zod/v4/locales/mk.js
|
|
11289
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/mk.js
|
|
11360
11290
|
var error27 = () => {
|
|
11361
11291
|
const Sizable = {
|
|
11362
11292
|
string: { unit: "знаци", verb: "да имаат" },
|
|
@@ -11465,7 +11395,7 @@ function mk_default() {
|
|
|
11465
11395
|
localeError: error27()
|
|
11466
11396
|
};
|
|
11467
11397
|
}
|
|
11468
|
-
// ../../node_modules/zod/v4/locales/ms.js
|
|
11398
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ms.js
|
|
11469
11399
|
var error28 = () => {
|
|
11470
11400
|
const Sizable = {
|
|
11471
11401
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
@@ -11572,7 +11502,7 @@ function ms_default() {
|
|
|
11572
11502
|
localeError: error28()
|
|
11573
11503
|
};
|
|
11574
11504
|
}
|
|
11575
|
-
// ../../node_modules/zod/v4/locales/nl.js
|
|
11505
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/nl.js
|
|
11576
11506
|
var error29 = () => {
|
|
11577
11507
|
const Sizable = {
|
|
11578
11508
|
string: { unit: "tekens", verb: "heeft" },
|
|
@@ -11682,7 +11612,7 @@ function nl_default() {
|
|
|
11682
11612
|
localeError: error29()
|
|
11683
11613
|
};
|
|
11684
11614
|
}
|
|
11685
|
-
// ../../node_modules/zod/v4/locales/no.js
|
|
11615
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/no.js
|
|
11686
11616
|
var error30 = () => {
|
|
11687
11617
|
const Sizable = {
|
|
11688
11618
|
string: { unit: "tegn", verb: "å ha" },
|
|
@@ -11790,7 +11720,7 @@ function no_default() {
|
|
|
11790
11720
|
localeError: error30()
|
|
11791
11721
|
};
|
|
11792
11722
|
}
|
|
11793
|
-
// ../../node_modules/zod/v4/locales/ota.js
|
|
11723
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ota.js
|
|
11794
11724
|
var error31 = () => {
|
|
11795
11725
|
const Sizable = {
|
|
11796
11726
|
string: { unit: "harf", verb: "olmalıdır" },
|
|
@@ -11899,7 +11829,7 @@ function ota_default() {
|
|
|
11899
11829
|
localeError: error31()
|
|
11900
11830
|
};
|
|
11901
11831
|
}
|
|
11902
|
-
// ../../node_modules/zod/v4/locales/ps.js
|
|
11832
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ps.js
|
|
11903
11833
|
var error32 = () => {
|
|
11904
11834
|
const Sizable = {
|
|
11905
11835
|
string: { unit: "توکي", verb: "ولري" },
|
|
@@ -12013,7 +11943,7 @@ function ps_default() {
|
|
|
12013
11943
|
localeError: error32()
|
|
12014
11944
|
};
|
|
12015
11945
|
}
|
|
12016
|
-
// ../../node_modules/zod/v4/locales/pl.js
|
|
11946
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/pl.js
|
|
12017
11947
|
var error33 = () => {
|
|
12018
11948
|
const Sizable = {
|
|
12019
11949
|
string: { unit: "znaków", verb: "mieć" },
|
|
@@ -12122,7 +12052,7 @@ function pl_default() {
|
|
|
12122
12052
|
localeError: error33()
|
|
12123
12053
|
};
|
|
12124
12054
|
}
|
|
12125
|
-
// ../../node_modules/zod/v4/locales/pt.js
|
|
12055
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/pt.js
|
|
12126
12056
|
var error34 = () => {
|
|
12127
12057
|
const Sizable = {
|
|
12128
12058
|
string: { unit: "caracteres", verb: "ter" },
|
|
@@ -12230,7 +12160,7 @@ function pt_default() {
|
|
|
12230
12160
|
localeError: error34()
|
|
12231
12161
|
};
|
|
12232
12162
|
}
|
|
12233
|
-
// ../../node_modules/zod/v4/locales/ru.js
|
|
12163
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ru.js
|
|
12234
12164
|
function getRussianPlural(count, one, few, many) {
|
|
12235
12165
|
const absCount = Math.abs(count);
|
|
12236
12166
|
const lastDigit = absCount % 10;
|
|
@@ -12386,7 +12316,7 @@ function ru_default() {
|
|
|
12386
12316
|
localeError: error35()
|
|
12387
12317
|
};
|
|
12388
12318
|
}
|
|
12389
|
-
// ../../node_modules/zod/v4/locales/sl.js
|
|
12319
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/sl.js
|
|
12390
12320
|
var error36 = () => {
|
|
12391
12321
|
const Sizable = {
|
|
12392
12322
|
string: { unit: "znakov", verb: "imeti" },
|
|
@@ -12495,7 +12425,7 @@ function sl_default() {
|
|
|
12495
12425
|
localeError: error36()
|
|
12496
12426
|
};
|
|
12497
12427
|
}
|
|
12498
|
-
// ../../node_modules/zod/v4/locales/sv.js
|
|
12428
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/sv.js
|
|
12499
12429
|
var error37 = () => {
|
|
12500
12430
|
const Sizable = {
|
|
12501
12431
|
string: { unit: "tecken", verb: "att ha" },
|
|
@@ -12605,7 +12535,7 @@ function sv_default() {
|
|
|
12605
12535
|
localeError: error37()
|
|
12606
12536
|
};
|
|
12607
12537
|
}
|
|
12608
|
-
// ../../node_modules/zod/v4/locales/ta.js
|
|
12538
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ta.js
|
|
12609
12539
|
var error38 = () => {
|
|
12610
12540
|
const Sizable = {
|
|
12611
12541
|
string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
@@ -12715,7 +12645,7 @@ function ta_default() {
|
|
|
12715
12645
|
localeError: error38()
|
|
12716
12646
|
};
|
|
12717
12647
|
}
|
|
12718
|
-
// ../../node_modules/zod/v4/locales/th.js
|
|
12648
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/th.js
|
|
12719
12649
|
var error39 = () => {
|
|
12720
12650
|
const Sizable = {
|
|
12721
12651
|
string: { unit: "ตัวอักษร", verb: "ควรมี" },
|
|
@@ -12825,7 +12755,7 @@ function th_default() {
|
|
|
12825
12755
|
localeError: error39()
|
|
12826
12756
|
};
|
|
12827
12757
|
}
|
|
12828
|
-
// ../../node_modules/zod/v4/locales/tr.js
|
|
12758
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/tr.js
|
|
12829
12759
|
var error40 = () => {
|
|
12830
12760
|
const Sizable = {
|
|
12831
12761
|
string: { unit: "karakter", verb: "olmalı" },
|
|
@@ -12930,7 +12860,7 @@ function tr_default() {
|
|
|
12930
12860
|
localeError: error40()
|
|
12931
12861
|
};
|
|
12932
12862
|
}
|
|
12933
|
-
// ../../node_modules/zod/v4/locales/uk.js
|
|
12863
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/uk.js
|
|
12934
12864
|
var error41 = () => {
|
|
12935
12865
|
const Sizable = {
|
|
12936
12866
|
string: { unit: "символів", verb: "матиме" },
|
|
@@ -13039,11 +12969,11 @@ function uk_default() {
|
|
|
13039
12969
|
};
|
|
13040
12970
|
}
|
|
13041
12971
|
|
|
13042
|
-
// ../../node_modules/zod/v4/locales/ua.js
|
|
12972
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ua.js
|
|
13043
12973
|
function ua_default() {
|
|
13044
12974
|
return uk_default();
|
|
13045
12975
|
}
|
|
13046
|
-
// ../../node_modules/zod/v4/locales/ur.js
|
|
12976
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ur.js
|
|
13047
12977
|
var error42 = () => {
|
|
13048
12978
|
const Sizable = {
|
|
13049
12979
|
string: { unit: "حروف", verb: "ہونا" },
|
|
@@ -13153,7 +13083,7 @@ function ur_default() {
|
|
|
13153
13083
|
localeError: error42()
|
|
13154
13084
|
};
|
|
13155
13085
|
}
|
|
13156
|
-
// ../../node_modules/zod/v4/locales/uz.js
|
|
13086
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/uz.js
|
|
13157
13087
|
var error43 = () => {
|
|
13158
13088
|
const Sizable = {
|
|
13159
13089
|
string: { unit: "belgi", verb: "bo‘lishi kerak" },
|
|
@@ -13262,7 +13192,7 @@ function uz_default() {
|
|
|
13262
13192
|
localeError: error43()
|
|
13263
13193
|
};
|
|
13264
13194
|
}
|
|
13265
|
-
// ../../node_modules/zod/v4/locales/vi.js
|
|
13195
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/vi.js
|
|
13266
13196
|
var error44 = () => {
|
|
13267
13197
|
const Sizable = {
|
|
13268
13198
|
string: { unit: "ký tự", verb: "có" },
|
|
@@ -13370,7 +13300,7 @@ function vi_default() {
|
|
|
13370
13300
|
localeError: error44()
|
|
13371
13301
|
};
|
|
13372
13302
|
}
|
|
13373
|
-
// ../../node_modules/zod/v4/locales/zh-CN.js
|
|
13303
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/zh-CN.js
|
|
13374
13304
|
var error45 = () => {
|
|
13375
13305
|
const Sizable = {
|
|
13376
13306
|
string: { unit: "字符", verb: "包含" },
|
|
@@ -13479,7 +13409,7 @@ function zh_CN_default() {
|
|
|
13479
13409
|
localeError: error45()
|
|
13480
13410
|
};
|
|
13481
13411
|
}
|
|
13482
|
-
// ../../node_modules/zod/v4/locales/zh-TW.js
|
|
13412
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/zh-TW.js
|
|
13483
13413
|
var error46 = () => {
|
|
13484
13414
|
const Sizable = {
|
|
13485
13415
|
string: { unit: "字元", verb: "擁有" },
|
|
@@ -13586,7 +13516,7 @@ function zh_TW_default() {
|
|
|
13586
13516
|
localeError: error46()
|
|
13587
13517
|
};
|
|
13588
13518
|
}
|
|
13589
|
-
// ../../node_modules/zod/v4/locales/yo.js
|
|
13519
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/yo.js
|
|
13590
13520
|
var error47 = () => {
|
|
13591
13521
|
const Sizable = {
|
|
13592
13522
|
string: { unit: "àmi", verb: "ní" },
|
|
@@ -13693,7 +13623,7 @@ function yo_default() {
|
|
|
13693
13623
|
localeError: error47()
|
|
13694
13624
|
};
|
|
13695
13625
|
}
|
|
13696
|
-
// ../../node_modules/zod/v4/core/registries.js
|
|
13626
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/registries.js
|
|
13697
13627
|
var _a;
|
|
13698
13628
|
var $output = Symbol("ZodOutput");
|
|
13699
13629
|
var $input = Symbol("ZodInput");
|
|
@@ -13743,7 +13673,7 @@ function registry() {
|
|
|
13743
13673
|
}
|
|
13744
13674
|
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
13745
13675
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
13746
|
-
// ../../node_modules/zod/v4/core/api.js
|
|
13676
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/api.js
|
|
13747
13677
|
function _string(Class2, params) {
|
|
13748
13678
|
return new Class2({
|
|
13749
13679
|
type: "string",
|
|
@@ -14663,7 +14593,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
14663
14593
|
const inst = new Class2(def);
|
|
14664
14594
|
return inst;
|
|
14665
14595
|
}
|
|
14666
|
-
// ../../node_modules/zod/v4/core/to-json-schema.js
|
|
14596
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js
|
|
14667
14597
|
function initializeContext(params) {
|
|
14668
14598
|
let target = params?.target ?? "draft-2020-12";
|
|
14669
14599
|
if (target === "draft-4")
|
|
@@ -15008,7 +14938,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
|
|
|
15008
14938
|
extractDefs(ctx, schema);
|
|
15009
14939
|
return finalize(ctx, schema);
|
|
15010
14940
|
};
|
|
15011
|
-
// ../../node_modules/zod/v4/core/json-schema-processors.js
|
|
14941
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
|
|
15012
14942
|
var formatMap = {
|
|
15013
14943
|
guid: "uuid",
|
|
15014
14944
|
url: "uri",
|
|
@@ -15553,7 +15483,7 @@ function toJSONSchema(input, params) {
|
|
|
15553
15483
|
extractDefs(ctx, input);
|
|
15554
15484
|
return finalize(ctx, input);
|
|
15555
15485
|
}
|
|
15556
|
-
// ../../node_modules/zod/v4/core/json-schema-generator.js
|
|
15486
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema-generator.js
|
|
15557
15487
|
class JSONSchemaGenerator {
|
|
15558
15488
|
get metadataRegistry() {
|
|
15559
15489
|
return this.ctx.metadataRegistry;
|
|
@@ -15612,9 +15542,9 @@ class JSONSchemaGenerator {
|
|
|
15612
15542
|
return plainResult;
|
|
15613
15543
|
}
|
|
15614
15544
|
}
|
|
15615
|
-
// ../../node_modules/zod/v4/core/json-schema.js
|
|
15545
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema.js
|
|
15616
15546
|
var exports_json_schema = {};
|
|
15617
|
-
// ../../node_modules/zod/v4/classic/schemas.js
|
|
15547
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
|
|
15618
15548
|
var exports_schemas2 = {};
|
|
15619
15549
|
__export(exports_schemas2, {
|
|
15620
15550
|
xor: () => xor,
|
|
@@ -15783,7 +15713,7 @@ __export(exports_schemas2, {
|
|
|
15783
15713
|
ZodAny: () => ZodAny
|
|
15784
15714
|
});
|
|
15785
15715
|
|
|
15786
|
-
// ../../node_modules/zod/v4/classic/checks.js
|
|
15716
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/checks.js
|
|
15787
15717
|
var exports_checks2 = {};
|
|
15788
15718
|
__export(exports_checks2, {
|
|
15789
15719
|
uppercase: () => _uppercase,
|
|
@@ -15817,7 +15747,7 @@ __export(exports_checks2, {
|
|
|
15817
15747
|
endsWith: () => _endsWith
|
|
15818
15748
|
});
|
|
15819
15749
|
|
|
15820
|
-
// ../../node_modules/zod/v4/classic/iso.js
|
|
15750
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/iso.js
|
|
15821
15751
|
var exports_iso = {};
|
|
15822
15752
|
__export(exports_iso, {
|
|
15823
15753
|
time: () => time2,
|
|
@@ -15858,7 +15788,7 @@ function duration2(params) {
|
|
|
15858
15788
|
return _isoDuration(ZodISODuration, params);
|
|
15859
15789
|
}
|
|
15860
15790
|
|
|
15861
|
-
// ../../node_modules/zod/v4/classic/errors.js
|
|
15791
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/errors.js
|
|
15862
15792
|
var initializer2 = (inst, issues) => {
|
|
15863
15793
|
$ZodError.init(inst, issues);
|
|
15864
15794
|
inst.name = "ZodError";
|
|
@@ -15893,7 +15823,7 @@ var ZodRealError = $constructor("ZodError", initializer2, {
|
|
|
15893
15823
|
Parent: Error
|
|
15894
15824
|
});
|
|
15895
15825
|
|
|
15896
|
-
// ../../node_modules/zod/v4/classic/parse.js
|
|
15826
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/parse.js
|
|
15897
15827
|
var parse3 = /* @__PURE__ */ _parse(ZodRealError);
|
|
15898
15828
|
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
15899
15829
|
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -15907,7 +15837,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
15907
15837
|
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
15908
15838
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
15909
15839
|
|
|
15910
|
-
// ../../node_modules/zod/v4/classic/schemas.js
|
|
15840
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
|
|
15911
15841
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
15912
15842
|
$ZodType.init(inst, def);
|
|
15913
15843
|
Object.assign(inst["~standard"], {
|
|
@@ -16983,7 +16913,7 @@ function json(params) {
|
|
|
16983
16913
|
function preprocess(fn, schema) {
|
|
16984
16914
|
return pipe(transform(fn), schema);
|
|
16985
16915
|
}
|
|
16986
|
-
// ../../node_modules/zod/v4/classic/compat.js
|
|
16916
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/compat.js
|
|
16987
16917
|
var ZodIssueCode = {
|
|
16988
16918
|
invalid_type: "invalid_type",
|
|
16989
16919
|
too_big: "too_big",
|
|
@@ -17007,7 +16937,7 @@ function getErrorMap() {
|
|
|
17007
16937
|
}
|
|
17008
16938
|
var ZodFirstPartyTypeKind;
|
|
17009
16939
|
(function(ZodFirstPartyTypeKind2) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
17010
|
-
// ../../node_modules/zod/v4/classic/from-json-schema.js
|
|
16940
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js
|
|
17011
16941
|
var z = {
|
|
17012
16942
|
...exports_schemas2,
|
|
17013
16943
|
...exports_checks2,
|
|
@@ -17468,7 +17398,7 @@ function fromJSONSchema(schema, params) {
|
|
|
17468
17398
|
};
|
|
17469
17399
|
return convertSchema(schema, ctx);
|
|
17470
17400
|
}
|
|
17471
|
-
// ../../node_modules/zod/v4/classic/coerce.js
|
|
17401
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/coerce.js
|
|
17472
17402
|
var exports_coerce = {};
|
|
17473
17403
|
__export(exports_coerce, {
|
|
17474
17404
|
string: () => string3,
|
|
@@ -17493,9 +17423,9 @@ function date4(params) {
|
|
|
17493
17423
|
return _coercedDate(ZodDate, params);
|
|
17494
17424
|
}
|
|
17495
17425
|
|
|
17496
|
-
// ../../node_modules/zod/v4/classic/external.js
|
|
17426
|
+
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
17497
17427
|
config(en_default());
|
|
17498
|
-
// ../../node_modules/kleur/colors.mjs
|
|
17428
|
+
// ../../node_modules/.bun/kleur@4.1.5/node_modules/kleur/colors.mjs
|
|
17499
17429
|
var FORCE_COLOR;
|
|
17500
17430
|
var NODE_DISABLE_COLORS;
|
|
17501
17431
|
var NO_COLOR;
|
|
@@ -17677,239 +17607,445 @@ ${stderr.join("").trim()}`));
|
|
|
17677
17607
|
});
|
|
17678
17608
|
|
|
17679
17609
|
// src/commands/create.ts
|
|
17680
|
-
import { readFile, writeFile } from "node:fs/promises";
|
|
17610
|
+
import { readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
|
|
17681
17611
|
import { join as join2, resolve as resolve2 } from "node:path";
|
|
17682
17612
|
|
|
17683
|
-
// ../../node_modules/@clack/core/dist/index.mjs
|
|
17684
|
-
|
|
17685
|
-
import { stdout as
|
|
17686
|
-
|
|
17687
|
-
|
|
17688
|
-
|
|
17689
|
-
|
|
17690
|
-
|
|
17691
|
-
|
|
17692
|
-
|
|
17693
|
-
|
|
17694
|
-
|
|
17695
|
-
var
|
|
17696
|
-
|
|
17697
|
-
|
|
17698
|
-
|
|
17699
|
-
|
|
17700
|
-
var
|
|
17701
|
-
var
|
|
17702
|
-
var
|
|
17703
|
-
var
|
|
17704
|
-
var
|
|
17705
|
-
|
|
17706
|
-
|
|
17707
|
-
|
|
17708
|
-
|
|
17709
|
-
|
|
17710
|
-
|
|
17711
|
-
|
|
17712
|
-
|
|
17713
|
-
|
|
17714
|
-
|
|
17715
|
-
|
|
17716
|
-
|
|
17613
|
+
// ../../node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
|
|
17614
|
+
import { styleText as y } from "node:util";
|
|
17615
|
+
import { stdout as S, stdin as $2 } from "node:process";
|
|
17616
|
+
import P from "node:readline";
|
|
17617
|
+
|
|
17618
|
+
// ../../node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
|
|
17619
|
+
var isAmbiguous = (x) => {
|
|
17620
|
+
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
17621
|
+
};
|
|
17622
|
+
var isFullWidth = (x) => {
|
|
17623
|
+
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
17624
|
+
};
|
|
17625
|
+
var isWide = (x) => {
|
|
17626
|
+
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
17627
|
+
};
|
|
17628
|
+
|
|
17629
|
+
// ../../node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
|
|
17630
|
+
var ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
|
|
17631
|
+
var CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
17632
|
+
var TAB_RE = /\t{1,1000}/y;
|
|
17633
|
+
var EMOJI_RE = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu;
|
|
17634
|
+
var LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
|
|
17635
|
+
var MODIFIER_RE = /\p{M}+/gu;
|
|
17636
|
+
var NO_TRUNCATION = { limit: Infinity, ellipsis: "" };
|
|
17637
|
+
var getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {
|
|
17638
|
+
const LIMIT = truncationOptions.limit ?? Infinity;
|
|
17639
|
+
const ELLIPSIS = truncationOptions.ellipsis ?? "";
|
|
17640
|
+
const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
|
|
17641
|
+
const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
|
|
17642
|
+
const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
|
|
17643
|
+
const TAB_WIDTH = widthOptions.tabWidth ?? 8;
|
|
17644
|
+
const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
|
|
17645
|
+
const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
|
|
17646
|
+
const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
|
|
17647
|
+
const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
|
|
17648
|
+
const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
|
|
17649
|
+
let indexPrev = 0;
|
|
17650
|
+
let index = 0;
|
|
17651
|
+
let length = input.length;
|
|
17652
|
+
let lengthExtra = 0;
|
|
17653
|
+
let truncationEnabled = false;
|
|
17654
|
+
let truncationIndex = length;
|
|
17655
|
+
let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH);
|
|
17656
|
+
let unmatchedStart = 0;
|
|
17657
|
+
let unmatchedEnd = 0;
|
|
17658
|
+
let width = 0;
|
|
17659
|
+
let widthExtra = 0;
|
|
17660
|
+
outer:
|
|
17661
|
+
while (true) {
|
|
17662
|
+
if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
|
|
17663
|
+
const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
|
|
17664
|
+
lengthExtra = 0;
|
|
17665
|
+
for (const char of unmatched.replaceAll(MODIFIER_RE, "")) {
|
|
17666
|
+
const codePoint = char.codePointAt(0) || 0;
|
|
17667
|
+
if (isFullWidth(codePoint)) {
|
|
17668
|
+
widthExtra = FULL_WIDTH_WIDTH;
|
|
17669
|
+
} else if (isWide(codePoint)) {
|
|
17670
|
+
widthExtra = WIDE_WIDTH;
|
|
17671
|
+
} else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
|
|
17672
|
+
widthExtra = AMBIGUOUS_WIDTH;
|
|
17673
|
+
} else {
|
|
17674
|
+
widthExtra = REGULAR_WIDTH;
|
|
17675
|
+
}
|
|
17676
|
+
if (width + widthExtra > truncationLimit) {
|
|
17677
|
+
truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
|
|
17717
17678
|
}
|
|
17718
|
-
|
|
17679
|
+
if (width + widthExtra > LIMIT) {
|
|
17680
|
+
truncationEnabled = true;
|
|
17681
|
+
break outer;
|
|
17682
|
+
}
|
|
17683
|
+
lengthExtra += char.length;
|
|
17684
|
+
width += widthExtra;
|
|
17719
17685
|
}
|
|
17720
|
-
|
|
17686
|
+
unmatchedStart = unmatchedEnd = 0;
|
|
17721
17687
|
}
|
|
17722
|
-
if (
|
|
17688
|
+
if (index >= length)
|
|
17723
17689
|
break;
|
|
17724
|
-
|
|
17725
|
-
|
|
17726
|
-
|
|
17690
|
+
LATIN_RE.lastIndex = index;
|
|
17691
|
+
if (LATIN_RE.test(input)) {
|
|
17692
|
+
lengthExtra = LATIN_RE.lastIndex - index;
|
|
17693
|
+
widthExtra = lengthExtra * REGULAR_WIDTH;
|
|
17694
|
+
if (width + widthExtra > truncationLimit) {
|
|
17695
|
+
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
|
|
17696
|
+
}
|
|
17697
|
+
if (width + widthExtra > LIMIT) {
|
|
17698
|
+
truncationEnabled = true;
|
|
17727
17699
|
break;
|
|
17728
17700
|
}
|
|
17729
|
-
|
|
17701
|
+
width += widthExtra;
|
|
17702
|
+
unmatchedStart = indexPrev;
|
|
17703
|
+
unmatchedEnd = index;
|
|
17704
|
+
index = indexPrev = LATIN_RE.lastIndex;
|
|
17730
17705
|
continue;
|
|
17731
17706
|
}
|
|
17732
|
-
|
|
17733
|
-
|
|
17734
|
-
|
|
17707
|
+
ANSI_RE.lastIndex = index;
|
|
17708
|
+
if (ANSI_RE.test(input)) {
|
|
17709
|
+
if (width + ANSI_WIDTH > truncationLimit) {
|
|
17710
|
+
truncationIndex = Math.min(truncationIndex, index);
|
|
17711
|
+
}
|
|
17712
|
+
if (width + ANSI_WIDTH > LIMIT) {
|
|
17713
|
+
truncationEnabled = true;
|
|
17735
17714
|
break;
|
|
17736
17715
|
}
|
|
17737
|
-
|
|
17716
|
+
width += ANSI_WIDTH;
|
|
17717
|
+
unmatchedStart = indexPrev;
|
|
17718
|
+
unmatchedEnd = index;
|
|
17719
|
+
index = indexPrev = ANSI_RE.lastIndex;
|
|
17738
17720
|
continue;
|
|
17739
17721
|
}
|
|
17740
|
-
|
|
17741
|
-
|
|
17742
|
-
|
|
17722
|
+
CONTROL_RE.lastIndex = index;
|
|
17723
|
+
if (CONTROL_RE.test(input)) {
|
|
17724
|
+
lengthExtra = CONTROL_RE.lastIndex - index;
|
|
17725
|
+
widthExtra = lengthExtra * CONTROL_WIDTH;
|
|
17726
|
+
if (width + widthExtra > truncationLimit) {
|
|
17727
|
+
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
|
|
17728
|
+
}
|
|
17729
|
+
if (width + widthExtra > LIMIT) {
|
|
17730
|
+
truncationEnabled = true;
|
|
17743
17731
|
break;
|
|
17744
17732
|
}
|
|
17745
|
-
|
|
17733
|
+
width += widthExtra;
|
|
17734
|
+
unmatchedStart = indexPrev;
|
|
17735
|
+
unmatchedEnd = index;
|
|
17736
|
+
index = indexPrev = CONTROL_RE.lastIndex;
|
|
17746
17737
|
continue;
|
|
17747
17738
|
}
|
|
17748
|
-
|
|
17749
|
-
|
|
17750
|
-
|
|
17739
|
+
TAB_RE.lastIndex = index;
|
|
17740
|
+
if (TAB_RE.test(input)) {
|
|
17741
|
+
lengthExtra = TAB_RE.lastIndex - index;
|
|
17742
|
+
widthExtra = lengthExtra * TAB_WIDTH;
|
|
17743
|
+
if (width + widthExtra > truncationLimit) {
|
|
17744
|
+
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
|
|
17745
|
+
}
|
|
17746
|
+
if (width + widthExtra > LIMIT) {
|
|
17747
|
+
truncationEnabled = true;
|
|
17751
17748
|
break;
|
|
17752
17749
|
}
|
|
17753
|
-
|
|
17750
|
+
width += widthExtra;
|
|
17751
|
+
unmatchedStart = indexPrev;
|
|
17752
|
+
unmatchedEnd = index;
|
|
17753
|
+
index = indexPrev = TAB_RE.lastIndex;
|
|
17754
17754
|
continue;
|
|
17755
17755
|
}
|
|
17756
|
-
|
|
17757
|
-
|
|
17758
|
-
|
|
17756
|
+
EMOJI_RE.lastIndex = index;
|
|
17757
|
+
if (EMOJI_RE.test(input)) {
|
|
17758
|
+
if (width + EMOJI_WIDTH > truncationLimit) {
|
|
17759
|
+
truncationIndex = Math.min(truncationIndex, index);
|
|
17760
|
+
}
|
|
17761
|
+
if (width + EMOJI_WIDTH > LIMIT) {
|
|
17762
|
+
truncationEnabled = true;
|
|
17759
17763
|
break;
|
|
17760
17764
|
}
|
|
17761
|
-
|
|
17765
|
+
width += EMOJI_WIDTH;
|
|
17766
|
+
unmatchedStart = indexPrev;
|
|
17767
|
+
unmatchedEnd = index;
|
|
17768
|
+
index = indexPrev = EMOJI_RE.lastIndex;
|
|
17762
17769
|
continue;
|
|
17763
17770
|
}
|
|
17764
|
-
|
|
17771
|
+
index += 1;
|
|
17765
17772
|
}
|
|
17766
|
-
return {
|
|
17773
|
+
return {
|
|
17774
|
+
width: truncationEnabled ? truncationLimit : width,
|
|
17775
|
+
index: truncationEnabled ? truncationIndex : length,
|
|
17776
|
+
truncated: truncationEnabled,
|
|
17777
|
+
ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
|
|
17778
|
+
};
|
|
17767
17779
|
};
|
|
17768
|
-
var
|
|
17769
|
-
|
|
17770
|
-
|
|
17771
|
-
var
|
|
17772
|
-
|
|
17773
|
-
|
|
17774
|
-
|
|
17775
|
-
|
|
17776
|
-
var
|
|
17777
|
-
|
|
17778
|
-
|
|
17779
|
-
var
|
|
17780
|
-
|
|
17780
|
+
var dist_default = getStringTruncatedWidth;
|
|
17781
|
+
|
|
17782
|
+
// ../../node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
|
|
17783
|
+
var NO_TRUNCATION2 = {
|
|
17784
|
+
limit: Infinity,
|
|
17785
|
+
ellipsis: "",
|
|
17786
|
+
ellipsisWidth: 0
|
|
17787
|
+
};
|
|
17788
|
+
var fastStringWidth = (input, options = {}) => {
|
|
17789
|
+
return dist_default(input, NO_TRUNCATION2, options).width;
|
|
17790
|
+
};
|
|
17791
|
+
var dist_default2 = fastStringWidth;
|
|
17792
|
+
|
|
17793
|
+
// ../../node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
|
|
17794
|
+
var ESC = "\x1B";
|
|
17795
|
+
var CSI = "";
|
|
17796
|
+
var END_CODE = 39;
|
|
17797
|
+
var ANSI_ESCAPE_BELL = "\x07";
|
|
17798
|
+
var ANSI_CSI = "[";
|
|
17799
|
+
var ANSI_OSC = "]";
|
|
17800
|
+
var ANSI_SGR_TERMINATOR = "m";
|
|
17801
|
+
var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
17802
|
+
var GROUP_REGEX = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, "y");
|
|
17803
|
+
var getClosingCode = (openingCode) => {
|
|
17804
|
+
if (openingCode >= 30 && openingCode <= 37)
|
|
17781
17805
|
return 39;
|
|
17782
|
-
if (
|
|
17806
|
+
if (openingCode >= 90 && openingCode <= 97)
|
|
17807
|
+
return 39;
|
|
17808
|
+
if (openingCode >= 40 && openingCode <= 47)
|
|
17809
|
+
return 49;
|
|
17810
|
+
if (openingCode >= 100 && openingCode <= 107)
|
|
17783
17811
|
return 49;
|
|
17784
|
-
if (
|
|
17812
|
+
if (openingCode === 1 || openingCode === 2)
|
|
17785
17813
|
return 22;
|
|
17786
|
-
if (
|
|
17814
|
+
if (openingCode === 3)
|
|
17787
17815
|
return 23;
|
|
17788
|
-
if (
|
|
17816
|
+
if (openingCode === 4)
|
|
17789
17817
|
return 24;
|
|
17790
|
-
if (
|
|
17818
|
+
if (openingCode === 7)
|
|
17791
17819
|
return 27;
|
|
17792
|
-
if (
|
|
17820
|
+
if (openingCode === 8)
|
|
17793
17821
|
return 28;
|
|
17794
|
-
if (
|
|
17822
|
+
if (openingCode === 9)
|
|
17795
17823
|
return 29;
|
|
17796
|
-
if (
|
|
17824
|
+
if (openingCode === 0)
|
|
17797
17825
|
return 0;
|
|
17826
|
+
return;
|
|
17798
17827
|
};
|
|
17799
|
-
var
|
|
17800
|
-
var
|
|
17801
|
-
var
|
|
17802
|
-
|
|
17803
|
-
|
|
17804
|
-
let
|
|
17805
|
-
|
|
17806
|
-
|
|
17807
|
-
|
|
17808
|
-
|
|
17809
|
-
|
|
17828
|
+
var wrapAnsiCode = (code) => `${ESC}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
17829
|
+
var wrapAnsiHyperlink = (url2) => `${ESC}${ANSI_ESCAPE_LINK}${url2}${ANSI_ESCAPE_BELL}`;
|
|
17830
|
+
var wrapWord = (rows, word, columns) => {
|
|
17831
|
+
const characters = word[Symbol.iterator]();
|
|
17832
|
+
let isInsideEscape = false;
|
|
17833
|
+
let isInsideLinkEscape = false;
|
|
17834
|
+
let lastRow = rows.at(-1);
|
|
17835
|
+
let visible = lastRow === undefined ? 0 : dist_default2(lastRow);
|
|
17836
|
+
let currentCharacter = characters.next();
|
|
17837
|
+
let nextCharacter = characters.next();
|
|
17838
|
+
let rawCharacterIndex = 0;
|
|
17839
|
+
while (!currentCharacter.done) {
|
|
17840
|
+
const character = currentCharacter.value;
|
|
17841
|
+
const characterLength = dist_default2(character);
|
|
17842
|
+
if (visible + characterLength <= columns) {
|
|
17843
|
+
rows[rows.length - 1] += character;
|
|
17844
|
+
} else {
|
|
17845
|
+
rows.push(character);
|
|
17846
|
+
visible = 0;
|
|
17847
|
+
}
|
|
17848
|
+
if (character === ESC || character === CSI) {
|
|
17849
|
+
isInsideEscape = true;
|
|
17850
|
+
isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK, rawCharacterIndex + 1);
|
|
17851
|
+
}
|
|
17852
|
+
if (isInsideEscape) {
|
|
17853
|
+
if (isInsideLinkEscape) {
|
|
17854
|
+
if (character === ANSI_ESCAPE_BELL) {
|
|
17855
|
+
isInsideEscape = false;
|
|
17856
|
+
isInsideLinkEscape = false;
|
|
17857
|
+
}
|
|
17858
|
+
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
17859
|
+
isInsideEscape = false;
|
|
17860
|
+
}
|
|
17861
|
+
} else {
|
|
17862
|
+
visible += characterLength;
|
|
17863
|
+
if (visible === columns && !nextCharacter.done) {
|
|
17864
|
+
rows.push("");
|
|
17865
|
+
visible = 0;
|
|
17866
|
+
}
|
|
17867
|
+
}
|
|
17868
|
+
currentCharacter = nextCharacter;
|
|
17869
|
+
nextCharacter = characters.next();
|
|
17870
|
+
rawCharacterIndex += character.length;
|
|
17871
|
+
}
|
|
17872
|
+
lastRow = rows.at(-1);
|
|
17873
|
+
if (!visible && lastRow !== undefined && lastRow.length && rows.length > 1) {
|
|
17874
|
+
rows[rows.length - 2] += rows.pop();
|
|
17875
|
+
}
|
|
17810
17876
|
};
|
|
17811
|
-
var
|
|
17812
|
-
const
|
|
17813
|
-
let
|
|
17814
|
-
|
|
17815
|
-
|
|
17816
|
-
|
|
17877
|
+
var stringVisibleTrimSpacesRight = (string4) => {
|
|
17878
|
+
const words = string4.split(" ");
|
|
17879
|
+
let last = words.length;
|
|
17880
|
+
while (last) {
|
|
17881
|
+
if (dist_default2(words[last - 1])) {
|
|
17882
|
+
break;
|
|
17883
|
+
}
|
|
17884
|
+
last--;
|
|
17885
|
+
}
|
|
17886
|
+
if (last === words.length) {
|
|
17887
|
+
return string4;
|
|
17888
|
+
}
|
|
17889
|
+
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
17817
17890
|
};
|
|
17818
|
-
var
|
|
17819
|
-
if (
|
|
17891
|
+
var exec = (string4, columns, options = {}) => {
|
|
17892
|
+
if (options.trim !== false && string4.trim() === "") {
|
|
17820
17893
|
return "";
|
|
17821
|
-
|
|
17822
|
-
|
|
17823
|
-
let
|
|
17824
|
-
|
|
17825
|
-
|
|
17826
|
-
|
|
17827
|
-
|
|
17828
|
-
|
|
17829
|
-
|
|
17894
|
+
}
|
|
17895
|
+
let returnValue = "";
|
|
17896
|
+
let escapeCode;
|
|
17897
|
+
let escapeUrl;
|
|
17898
|
+
const words = string4.split(" ");
|
|
17899
|
+
let rows = [""];
|
|
17900
|
+
let rowLength = 0;
|
|
17901
|
+
for (let index = 0;index < words.length; index++) {
|
|
17902
|
+
const word = words[index];
|
|
17903
|
+
if (options.trim !== false) {
|
|
17904
|
+
const row = rows.at(-1) ?? "";
|
|
17905
|
+
const trimmed = row.trimStart();
|
|
17906
|
+
if (row.length !== trimmed.length) {
|
|
17907
|
+
rows[rows.length - 1] = trimmed;
|
|
17908
|
+
rowLength = dist_default2(trimmed);
|
|
17909
|
+
}
|
|
17910
|
+
}
|
|
17911
|
+
if (index !== 0) {
|
|
17912
|
+
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
17913
|
+
rows.push("");
|
|
17914
|
+
rowLength = 0;
|
|
17915
|
+
}
|
|
17916
|
+
if (rowLength || options.trim === false) {
|
|
17917
|
+
rows[rows.length - 1] += " ";
|
|
17918
|
+
rowLength++;
|
|
17919
|
+
}
|
|
17920
|
+
}
|
|
17921
|
+
const wordLength = dist_default2(word);
|
|
17922
|
+
if (options.hard && wordLength > columns) {
|
|
17923
|
+
const remainingColumns = columns - rowLength;
|
|
17924
|
+
const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);
|
|
17925
|
+
const breaksStartingNextLine = Math.floor((wordLength - 1) / columns);
|
|
17926
|
+
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
17927
|
+
rows.push("");
|
|
17928
|
+
}
|
|
17929
|
+
wrapWord(rows, word, columns);
|
|
17930
|
+
rowLength = dist_default2(rows.at(-1) ?? "");
|
|
17830
17931
|
continue;
|
|
17831
17932
|
}
|
|
17832
|
-
if (
|
|
17833
|
-
if (
|
|
17834
|
-
|
|
17933
|
+
if (rowLength + wordLength > columns && rowLength && wordLength) {
|
|
17934
|
+
if (options.wordWrap === false && rowLength < columns) {
|
|
17935
|
+
wrapWord(rows, word, columns);
|
|
17936
|
+
rowLength = dist_default2(rows.at(-1) ?? "");
|
|
17835
17937
|
continue;
|
|
17836
17938
|
}
|
|
17837
|
-
|
|
17939
|
+
rows.push("");
|
|
17940
|
+
rowLength = 0;
|
|
17838
17941
|
}
|
|
17839
|
-
if (
|
|
17840
|
-
|
|
17942
|
+
if (rowLength + wordLength > columns && options.wordWrap === false) {
|
|
17943
|
+
wrapWord(rows, word, columns);
|
|
17944
|
+
rowLength = dist_default2(rows.at(-1) ?? "");
|
|
17841
17945
|
continue;
|
|
17842
17946
|
}
|
|
17843
|
-
|
|
17844
|
-
|
|
17845
|
-
|
|
17846
|
-
|
|
17847
|
-
|
|
17848
|
-
|
|
17849
|
-
|
|
17850
|
-
|
|
17851
|
-
|
|
17852
|
-
|
|
17853
|
-
|
|
17854
|
-
|
|
17855
|
-
|
|
17856
|
-
|
|
17857
|
-
|
|
17858
|
-
|
|
17947
|
+
rows[rows.length - 1] += word;
|
|
17948
|
+
rowLength += wordLength;
|
|
17949
|
+
}
|
|
17950
|
+
if (options.trim !== false) {
|
|
17951
|
+
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
17952
|
+
}
|
|
17953
|
+
const preString = rows.join(`
|
|
17954
|
+
`);
|
|
17955
|
+
let inSurrogate = false;
|
|
17956
|
+
for (let i = 0;i < preString.length; i++) {
|
|
17957
|
+
const character = preString[i];
|
|
17958
|
+
returnValue += character;
|
|
17959
|
+
if (!inSurrogate) {
|
|
17960
|
+
inSurrogate = character >= "\uD800" && character <= "\uDBFF";
|
|
17961
|
+
} else {
|
|
17962
|
+
continue;
|
|
17963
|
+
}
|
|
17964
|
+
if (character === ESC || character === CSI) {
|
|
17965
|
+
GROUP_REGEX.lastIndex = i + 1;
|
|
17966
|
+
const groupsResult = GROUP_REGEX.exec(preString);
|
|
17967
|
+
const groups = groupsResult?.groups;
|
|
17968
|
+
if (groups?.code !== undefined) {
|
|
17969
|
+
const code = Number.parseFloat(groups.code);
|
|
17970
|
+
escapeCode = code === END_CODE ? undefined : code;
|
|
17971
|
+
} else if (groups?.uri !== undefined) {
|
|
17972
|
+
escapeUrl = groups.uri.length === 0 ? undefined : groups.uri;
|
|
17973
|
+
}
|
|
17974
|
+
}
|
|
17975
|
+
if (preString[i + 1] === `
|
|
17976
|
+
`) {
|
|
17977
|
+
if (escapeUrl) {
|
|
17978
|
+
returnValue += wrapAnsiHyperlink("");
|
|
17979
|
+
}
|
|
17980
|
+
const closingCode = escapeCode ? getClosingCode(escapeCode) : undefined;
|
|
17981
|
+
if (escapeCode && closingCode) {
|
|
17982
|
+
returnValue += wrapAnsiCode(closingCode);
|
|
17983
|
+
}
|
|
17984
|
+
} else if (character === `
|
|
17985
|
+
`) {
|
|
17986
|
+
if (escapeCode && getClosingCode(escapeCode)) {
|
|
17987
|
+
returnValue += wrapAnsiCode(escapeCode);
|
|
17988
|
+
}
|
|
17989
|
+
if (escapeUrl) {
|
|
17990
|
+
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
17991
|
+
}
|
|
17859
17992
|
}
|
|
17860
|
-
const p = r ? mt(r) : undefined;
|
|
17861
|
-
o === `
|
|
17862
|
-
` ? (n && (i += it("")), r && p && (i += st(p))) : h === `
|
|
17863
|
-
` && (r && p && (i += st(r)), n && (i += it(n))), V += h.length, m = A, A = g.next();
|
|
17864
17993
|
}
|
|
17865
|
-
return
|
|
17994
|
+
return returnValue;
|
|
17866
17995
|
};
|
|
17867
|
-
|
|
17868
|
-
|
|
17869
|
-
|
|
17870
|
-
`).split(`
|
|
17871
|
-
`).map((i) => Et(i, e, s)).join(`
|
|
17996
|
+
var CRLF_OR_LF = /\r?\n/;
|
|
17997
|
+
function wrapAnsi(string4, columns, options) {
|
|
17998
|
+
return String(string4).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join(`
|
|
17872
17999
|
`);
|
|
17873
18000
|
}
|
|
17874
|
-
|
|
17875
|
-
|
|
17876
|
-
|
|
17877
|
-
|
|
17878
|
-
|
|
17879
|
-
|
|
17880
|
-
|
|
18001
|
+
|
|
18002
|
+
// ../../node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
|
|
18003
|
+
var import_sisteransi = __toESM(require_src(), 1);
|
|
18004
|
+
function d(r, t, e) {
|
|
18005
|
+
if (!e.some((o) => !o.disabled))
|
|
18006
|
+
return r;
|
|
18007
|
+
const s = r + t, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
|
|
18008
|
+
return e[n].disabled ? d(n, t < 0 ? -1 : 1, e) : n;
|
|
18009
|
+
}
|
|
18010
|
+
var E = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
18011
|
+
var G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
18012
|
+
var u = { actions: new Set(E), aliases: new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["\x03", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...G], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t) => `There are only ${r} days in ${t}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
|
|
18013
|
+
function V(r, t) {
|
|
18014
|
+
if (typeof r == "string")
|
|
18015
|
+
return u.aliases.get(r) === t;
|
|
18016
|
+
for (const e of r)
|
|
18017
|
+
if (e !== undefined && V(e, t))
|
|
17881
18018
|
return true;
|
|
17882
18019
|
return false;
|
|
17883
18020
|
}
|
|
17884
|
-
function
|
|
17885
|
-
if (
|
|
18021
|
+
function j(r, t) {
|
|
18022
|
+
if (r === t)
|
|
17886
18023
|
return;
|
|
17887
|
-
const
|
|
17888
|
-
`),
|
|
17889
|
-
`),
|
|
17890
|
-
for (let
|
|
17891
|
-
|
|
17892
|
-
return { lines: n, numLinesBefore:
|
|
17893
|
-
}
|
|
17894
|
-
var
|
|
17895
|
-
var
|
|
17896
|
-
function
|
|
17897
|
-
return
|
|
17898
|
-
}
|
|
17899
|
-
function
|
|
17900
|
-
const
|
|
17901
|
-
|
|
17902
|
-
}
|
|
17903
|
-
var
|
|
17904
|
-
var
|
|
17905
|
-
function
|
|
17906
|
-
const
|
|
17907
|
-
return
|
|
17908
|
-
`).map((n,
|
|
18024
|
+
const e = r.split(`
|
|
18025
|
+
`), s = t.split(`
|
|
18026
|
+
`), i = Math.max(e.length, s.length), n = [];
|
|
18027
|
+
for (let o = 0;o < i; o++)
|
|
18028
|
+
e[o] !== s[o] && n.push(o);
|
|
18029
|
+
return { lines: n, numLinesBefore: e.length, numLinesAfter: s.length, numLines: i };
|
|
18030
|
+
}
|
|
18031
|
+
var Y = globalThis.process.platform.startsWith("win");
|
|
18032
|
+
var C = Symbol("clack:cancel");
|
|
18033
|
+
function q(r) {
|
|
18034
|
+
return r === C;
|
|
18035
|
+
}
|
|
18036
|
+
function w(r, t) {
|
|
18037
|
+
const e = r;
|
|
18038
|
+
e.isTTY && e.setRawMode(t);
|
|
18039
|
+
}
|
|
18040
|
+
var O = (r) => ("columns" in r) && typeof r.columns == "number" ? r.columns : 80;
|
|
18041
|
+
var A = (r) => ("rows" in r) && typeof r.rows == "number" ? r.rows : 20;
|
|
18042
|
+
function R(r, t, e, s = e) {
|
|
18043
|
+
const i = O(r ?? S);
|
|
18044
|
+
return wrapAnsi(t, i - e.length, { hard: true, trim: false }).split(`
|
|
18045
|
+
`).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
|
|
17909
18046
|
`);
|
|
17910
18047
|
}
|
|
17911
|
-
|
|
17912
|
-
class x {
|
|
18048
|
+
var p = class {
|
|
17913
18049
|
input;
|
|
17914
18050
|
output;
|
|
17915
18051
|
_abortSignal;
|
|
@@ -17924,250 +18060,436 @@ class x {
|
|
|
17924
18060
|
error = "";
|
|
17925
18061
|
value;
|
|
17926
18062
|
userInput = "";
|
|
17927
|
-
constructor(
|
|
17928
|
-
const { input:
|
|
17929
|
-
this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track =
|
|
18063
|
+
constructor(t, e = true) {
|
|
18064
|
+
const { input: s = $2, output: i = S, render: n, signal: o, ...a } = t;
|
|
18065
|
+
this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = e, this._abortSignal = o, this.input = s, this.output = i;
|
|
17930
18066
|
}
|
|
17931
18067
|
unsubscribe() {
|
|
17932
18068
|
this._subscribers.clear();
|
|
17933
18069
|
}
|
|
17934
|
-
setSubscriber(
|
|
17935
|
-
const
|
|
17936
|
-
|
|
18070
|
+
setSubscriber(t, e) {
|
|
18071
|
+
const s = this._subscribers.get(t) ?? [];
|
|
18072
|
+
s.push(e), this._subscribers.set(t, s);
|
|
17937
18073
|
}
|
|
17938
|
-
on(
|
|
17939
|
-
this.setSubscriber(
|
|
18074
|
+
on(t, e) {
|
|
18075
|
+
this.setSubscriber(t, { cb: e });
|
|
17940
18076
|
}
|
|
17941
|
-
once(
|
|
17942
|
-
this.setSubscriber(
|
|
18077
|
+
once(t, e) {
|
|
18078
|
+
this.setSubscriber(t, { cb: e, once: true });
|
|
17943
18079
|
}
|
|
17944
|
-
emit(
|
|
17945
|
-
const
|
|
18080
|
+
emit(t, ...e) {
|
|
18081
|
+
const s = this._subscribers.get(t) ?? [], i = [];
|
|
18082
|
+
for (const n of s)
|
|
18083
|
+
n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
|
|
17946
18084
|
for (const n of i)
|
|
17947
|
-
n.cb(...s), n.once && r.push(() => i.splice(i.indexOf(n), 1));
|
|
17948
|
-
for (const n of r)
|
|
17949
18085
|
n();
|
|
17950
18086
|
}
|
|
17951
18087
|
prompt() {
|
|
17952
|
-
return new Promise((
|
|
18088
|
+
return new Promise((t) => {
|
|
17953
18089
|
if (this._abortSignal) {
|
|
17954
18090
|
if (this._abortSignal.aborted)
|
|
17955
|
-
return this.state = "cancel", this.close(),
|
|
18091
|
+
return this.state = "cancel", this.close(), t(C);
|
|
17956
18092
|
this._abortSignal.addEventListener("abort", () => {
|
|
17957
18093
|
this.state = "cancel", this.close();
|
|
17958
18094
|
}, { once: true });
|
|
17959
18095
|
}
|
|
17960
|
-
this.rl =
|
|
17961
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render),
|
|
18096
|
+
this.rl = P.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== undefined && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), w(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
18097
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t(this.value);
|
|
17962
18098
|
}), this.once("cancel", () => {
|
|
17963
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render),
|
|
18099
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t(C);
|
|
17964
18100
|
});
|
|
17965
18101
|
});
|
|
17966
18102
|
}
|
|
17967
|
-
_isActionKey(
|
|
17968
|
-
return
|
|
18103
|
+
_isActionKey(t, e) {
|
|
18104
|
+
return t === "\t";
|
|
17969
18105
|
}
|
|
17970
|
-
_setValue(
|
|
17971
|
-
this.value =
|
|
18106
|
+
_setValue(t) {
|
|
18107
|
+
this.value = t, this.emit("value", this.value);
|
|
17972
18108
|
}
|
|
17973
|
-
_setUserInput(
|
|
17974
|
-
this.userInput =
|
|
18109
|
+
_setUserInput(t, e) {
|
|
18110
|
+
this.userInput = t ?? "", this.emit("userInput", this.userInput), e && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
|
|
17975
18111
|
}
|
|
17976
18112
|
_clearUserInput() {
|
|
17977
18113
|
this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
|
|
17978
18114
|
}
|
|
17979
|
-
onKeypress(
|
|
17980
|
-
if (this._track &&
|
|
18115
|
+
onKeypress(t, e) {
|
|
18116
|
+
if (this._track && e.name !== "return" && (e.name && this._isActionKey(t, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && u.aliases.has(e.name) && this.emit("cursor", u.aliases.get(e.name)), u.actions.has(e.name) && this.emit("cursor", e.name)), t && (t.toLowerCase() === "y" || t.toLowerCase() === "n") && this.emit("confirm", t.toLowerCase() === "y"), this.emit("key", t?.toLowerCase(), e), e?.name === "return") {
|
|
17981
18117
|
if (this.opts.validate) {
|
|
17982
|
-
const
|
|
17983
|
-
|
|
18118
|
+
const s = this.opts.validate(this.value);
|
|
18119
|
+
s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
|
|
17984
18120
|
}
|
|
17985
18121
|
this.state !== "error" && (this.state = "submit");
|
|
17986
18122
|
}
|
|
17987
|
-
|
|
18123
|
+
V([t, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
17988
18124
|
}
|
|
17989
18125
|
close() {
|
|
17990
18126
|
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
17991
|
-
`),
|
|
18127
|
+
`), w(this.input, false), this.rl?.close(), this.rl = undefined, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
17992
18128
|
}
|
|
17993
18129
|
restoreCursor() {
|
|
17994
|
-
const
|
|
18130
|
+
const t = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
|
|
17995
18131
|
`).length - 1;
|
|
17996
|
-
this.output.write(import_sisteransi.cursor.move(-999,
|
|
18132
|
+
this.output.write(import_sisteransi.cursor.move(-999, t * -1));
|
|
17997
18133
|
}
|
|
17998
18134
|
render() {
|
|
17999
|
-
const
|
|
18000
|
-
if (
|
|
18135
|
+
const t = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
|
|
18136
|
+
if (t !== this._prevFrame) {
|
|
18001
18137
|
if (this.state === "initial")
|
|
18002
18138
|
this.output.write(import_sisteransi.cursor.hide);
|
|
18003
18139
|
else {
|
|
18004
|
-
const
|
|
18005
|
-
if (this.restoreCursor(),
|
|
18006
|
-
const
|
|
18007
|
-
let
|
|
18008
|
-
if (
|
|
18009
|
-
this._prevFrame =
|
|
18140
|
+
const e = j(this._prevFrame, t), s = A(this.output);
|
|
18141
|
+
if (this.restoreCursor(), e) {
|
|
18142
|
+
const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
|
|
18143
|
+
let o = e.lines.find((a) => a >= i);
|
|
18144
|
+
if (o === undefined) {
|
|
18145
|
+
this._prevFrame = t;
|
|
18010
18146
|
return;
|
|
18011
18147
|
}
|
|
18012
|
-
if (
|
|
18013
|
-
this.output.write(import_sisteransi.cursor.move(0,
|
|
18014
|
-
const a =
|
|
18148
|
+
if (e.lines.length === 1) {
|
|
18149
|
+
this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
|
|
18150
|
+
const a = t.split(`
|
|
18015
18151
|
`);
|
|
18016
|
-
this.output.write(a[
|
|
18152
|
+
this.output.write(a[o]), this._prevFrame = t, this.output.write(import_sisteransi.cursor.move(0, a.length - o - 1));
|
|
18017
18153
|
return;
|
|
18018
|
-
} else if (
|
|
18019
|
-
if (
|
|
18020
|
-
|
|
18154
|
+
} else if (e.lines.length > 1) {
|
|
18155
|
+
if (i < n)
|
|
18156
|
+
o = i;
|
|
18021
18157
|
else {
|
|
18022
|
-
const
|
|
18023
|
-
|
|
18158
|
+
const h = o - n;
|
|
18159
|
+
h > 0 && this.output.write(import_sisteransi.cursor.move(0, h));
|
|
18024
18160
|
}
|
|
18025
18161
|
this.output.write(import_sisteransi.erase.down());
|
|
18026
|
-
const a =
|
|
18027
|
-
`).slice(
|
|
18162
|
+
const a = t.split(`
|
|
18163
|
+
`).slice(o);
|
|
18028
18164
|
this.output.write(a.join(`
|
|
18029
|
-
`)), this._prevFrame =
|
|
18165
|
+
`)), this._prevFrame = t;
|
|
18030
18166
|
return;
|
|
18031
18167
|
}
|
|
18032
18168
|
}
|
|
18033
18169
|
this.output.write(import_sisteransi.erase.down());
|
|
18034
18170
|
}
|
|
18035
|
-
this.output.write(
|
|
18171
|
+
this.output.write(t), this.state === "initial" && (this.state = "active"), this._prevFrame = t;
|
|
18036
18172
|
}
|
|
18037
18173
|
}
|
|
18038
|
-
}
|
|
18039
|
-
function
|
|
18040
|
-
if (
|
|
18174
|
+
};
|
|
18175
|
+
function W(r, t) {
|
|
18176
|
+
if (r === undefined || t.length === 0)
|
|
18041
18177
|
return 0;
|
|
18042
|
-
const
|
|
18043
|
-
return
|
|
18178
|
+
const e = t.findIndex((s) => s.value === r);
|
|
18179
|
+
return e !== -1 ? e : 0;
|
|
18044
18180
|
}
|
|
18045
|
-
function
|
|
18046
|
-
return (
|
|
18181
|
+
function B(r, t) {
|
|
18182
|
+
return (t.label ?? String(t.value)).toLowerCase().includes(r.toLowerCase());
|
|
18047
18183
|
}
|
|
18048
|
-
function
|
|
18049
|
-
if (
|
|
18050
|
-
return
|
|
18184
|
+
function J(r, t) {
|
|
18185
|
+
if (t)
|
|
18186
|
+
return r ? t : t[0];
|
|
18051
18187
|
}
|
|
18052
|
-
|
|
18053
|
-
class Vt extends x {
|
|
18188
|
+
var H = class extends p {
|
|
18054
18189
|
filteredOptions;
|
|
18055
18190
|
multiple;
|
|
18056
18191
|
isNavigating = false;
|
|
18057
18192
|
selectedValues = [];
|
|
18058
18193
|
focusedValue;
|
|
18059
|
-
#
|
|
18060
|
-
#
|
|
18061
|
-
#
|
|
18062
|
-
#
|
|
18194
|
+
#e = 0;
|
|
18195
|
+
#o = "";
|
|
18196
|
+
#t;
|
|
18197
|
+
#n;
|
|
18198
|
+
#a;
|
|
18063
18199
|
get cursor() {
|
|
18064
|
-
return this.#
|
|
18200
|
+
return this.#e;
|
|
18065
18201
|
}
|
|
18066
18202
|
get userInputWithCursor() {
|
|
18067
18203
|
if (!this.userInput)
|
|
18068
|
-
return
|
|
18204
|
+
return y(["inverse", "hidden"], "_");
|
|
18069
18205
|
if (this._cursor >= this.userInput.length)
|
|
18070
18206
|
return `${this.userInput}█`;
|
|
18071
|
-
const
|
|
18072
|
-
return `${
|
|
18207
|
+
const t = this.userInput.slice(0, this._cursor), [e, ...s] = this.userInput.slice(this._cursor);
|
|
18208
|
+
return `${t}${y("inverse", e)}${s.join("")}`;
|
|
18073
18209
|
}
|
|
18074
18210
|
get options() {
|
|
18075
|
-
return typeof this.#
|
|
18076
|
-
}
|
|
18077
|
-
constructor(
|
|
18078
|
-
super(
|
|
18079
|
-
const
|
|
18080
|
-
this.filteredOptions = [...
|
|
18081
|
-
let
|
|
18082
|
-
if (
|
|
18083
|
-
for (const
|
|
18084
|
-
const n =
|
|
18085
|
-
n !== -1 && (this.toggleSelected(
|
|
18086
|
-
}
|
|
18087
|
-
this.focusedValue = this.options[this.#
|
|
18088
|
-
}
|
|
18089
|
-
_isActionKey(
|
|
18090
|
-
return
|
|
18091
|
-
}
|
|
18092
|
-
#
|
|
18093
|
-
const
|
|
18094
|
-
|
|
18211
|
+
return typeof this.#n == "function" ? this.#n() : this.#n;
|
|
18212
|
+
}
|
|
18213
|
+
constructor(t) {
|
|
18214
|
+
super(t), this.#n = t.options, this.#a = t.placeholder;
|
|
18215
|
+
const e = this.options;
|
|
18216
|
+
this.filteredOptions = [...e], this.multiple = t.multiple === true, this.#t = typeof t.options == "function" ? t.filter : t.filter ?? B;
|
|
18217
|
+
let s;
|
|
18218
|
+
if (t.initialValue && Array.isArray(t.initialValue) ? this.multiple ? s = t.initialValue : s = t.initialValue.slice(0, 1) : !this.multiple && this.options.length > 0 && (s = [this.options[0].value]), s)
|
|
18219
|
+
for (const i of s) {
|
|
18220
|
+
const n = e.findIndex((o) => o.value === i);
|
|
18221
|
+
n !== -1 && (this.toggleSelected(i), this.#e = n);
|
|
18222
|
+
}
|
|
18223
|
+
this.focusedValue = this.options[this.#e]?.value, this.on("key", (i, n) => this.#s(i, n)), this.on("userInput", (i) => this.#i(i));
|
|
18224
|
+
}
|
|
18225
|
+
_isActionKey(t, e) {
|
|
18226
|
+
return t === "\t" || this.multiple && this.isNavigating && e.name === "space" && t !== undefined && t !== "";
|
|
18227
|
+
}
|
|
18228
|
+
#s(t, e) {
|
|
18229
|
+
const s = e.name === "up", i = e.name === "down", n = e.name === "return", o = this.userInput === "" || this.userInput === "\t", a = this.#a, h = this.options, l = a !== undefined && a !== "" && h.some((f) => !f.disabled && (this.#t ? this.#t(a, f) : true));
|
|
18230
|
+
if (e.name === "tab" && o && l) {
|
|
18231
|
+
this.userInput === "\t" && this._clearUserInput(), this._setUserInput(a, true), this.isNavigating = false;
|
|
18232
|
+
return;
|
|
18233
|
+
}
|
|
18234
|
+
s || i ? (this.#e = d(this.#e, s ? -1 : 1, this.filteredOptions), this.focusedValue = this.filteredOptions[this.#e]?.value, this.multiple || (this.selectedValues = [this.focusedValue]), this.isNavigating = true) : n ? this.value = J(this.multiple, this.selectedValues) : this.multiple ? this.focusedValue !== undefined && (e.name === "tab" || this.isNavigating && e.name === "space") ? this.toggleSelected(this.focusedValue) : this.isNavigating = false : (this.focusedValue && (this.selectedValues = [this.focusedValue]), this.isNavigating = false);
|
|
18095
18235
|
}
|
|
18096
18236
|
deselectAll() {
|
|
18097
18237
|
this.selectedValues = [];
|
|
18098
18238
|
}
|
|
18099
|
-
toggleSelected(
|
|
18100
|
-
this.filteredOptions.length !== 0 && (this.multiple ? this.selectedValues.includes(
|
|
18239
|
+
toggleSelected(t) {
|
|
18240
|
+
this.filteredOptions.length !== 0 && (this.multiple ? this.selectedValues.includes(t) ? this.selectedValues = this.selectedValues.filter((e) => e !== t) : this.selectedValues = [...this.selectedValues, t] : this.selectedValues = [t]);
|
|
18101
18241
|
}
|
|
18102
|
-
#
|
|
18103
|
-
if (
|
|
18104
|
-
this.#
|
|
18105
|
-
const
|
|
18106
|
-
|
|
18107
|
-
const
|
|
18108
|
-
this.#
|
|
18109
|
-
const
|
|
18110
|
-
|
|
18242
|
+
#i(t) {
|
|
18243
|
+
if (t !== this.#o) {
|
|
18244
|
+
this.#o = t;
|
|
18245
|
+
const e = this.options;
|
|
18246
|
+
t && this.#t ? this.filteredOptions = e.filter((n) => this.#t?.(t, n)) : this.filteredOptions = [...e];
|
|
18247
|
+
const s = W(this.focusedValue, this.filteredOptions);
|
|
18248
|
+
this.#e = d(s, 0, this.filteredOptions);
|
|
18249
|
+
const i = this.filteredOptions[this.#e];
|
|
18250
|
+
i && !i.disabled ? this.focusedValue = i.value : this.focusedValue = undefined, this.multiple || (this.focusedValue !== undefined ? this.toggleSelected(this.focusedValue) : this.deselectAll());
|
|
18111
18251
|
}
|
|
18112
18252
|
}
|
|
18113
|
-
}
|
|
18253
|
+
};
|
|
18114
18254
|
|
|
18115
|
-
class
|
|
18255
|
+
class Q extends p {
|
|
18116
18256
|
get cursor() {
|
|
18117
18257
|
return this.value ? 0 : 1;
|
|
18118
18258
|
}
|
|
18119
18259
|
get _value() {
|
|
18120
18260
|
return this.cursor === 0;
|
|
18121
18261
|
}
|
|
18122
|
-
constructor(
|
|
18123
|
-
super(
|
|
18262
|
+
constructor(t) {
|
|
18263
|
+
super(t, false), this.value = !!t.initialValue, this.on("userInput", () => {
|
|
18124
18264
|
this.value = this._value;
|
|
18125
|
-
}), this.on("confirm", (
|
|
18126
|
-
this.output.write(import_sisteransi.cursor.move(0, -1)), this.value =
|
|
18265
|
+
}), this.on("confirm", (e) => {
|
|
18266
|
+
this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = e, this.state = "submit", this.close();
|
|
18127
18267
|
}), this.on("cursor", () => {
|
|
18128
18268
|
this.value = !this.value;
|
|
18129
18269
|
});
|
|
18130
18270
|
}
|
|
18131
18271
|
}
|
|
18272
|
+
var X = { Y: { type: "year", len: 4 }, M: { type: "month", len: 2 }, D: { type: "day", len: 2 } };
|
|
18273
|
+
function L(r) {
|
|
18274
|
+
return [...r].map((t) => X[t]);
|
|
18275
|
+
}
|
|
18276
|
+
function Z(r) {
|
|
18277
|
+
const t = new Intl.DateTimeFormat(r, { year: "numeric", month: "2-digit", day: "2-digit" }).formatToParts(new Date(2000, 0, 15)), e = [];
|
|
18278
|
+
let s = "/";
|
|
18279
|
+
for (const i of t)
|
|
18280
|
+
i.type === "literal" ? s = i.value.trim() || i.value : (i.type === "year" || i.type === "month" || i.type === "day") && e.push({ type: i.type, len: i.type === "year" ? 4 : 2 });
|
|
18281
|
+
return { segments: e, separator: s };
|
|
18282
|
+
}
|
|
18283
|
+
function k(r) {
|
|
18284
|
+
return Number.parseInt((r || "0").replace(/_/g, "0"), 10) || 0;
|
|
18285
|
+
}
|
|
18286
|
+
function I(r) {
|
|
18287
|
+
return { year: k(r.year), month: k(r.month), day: k(r.day) };
|
|
18288
|
+
}
|
|
18289
|
+
function T(r, t) {
|
|
18290
|
+
return new Date(r || 2001, t || 1, 0).getDate();
|
|
18291
|
+
}
|
|
18292
|
+
function F(r) {
|
|
18293
|
+
const { year: t, month: e, day: s } = I(r);
|
|
18294
|
+
if (!t || t < 0 || t > 9999 || !e || e < 1 || e > 12 || !s || s < 1)
|
|
18295
|
+
return;
|
|
18296
|
+
const i = new Date(Date.UTC(t, e - 1, s));
|
|
18297
|
+
if (!(i.getUTCFullYear() !== t || i.getUTCMonth() !== e - 1 || i.getUTCDate() !== s))
|
|
18298
|
+
return { year: t, month: e, day: s };
|
|
18299
|
+
}
|
|
18300
|
+
function N(r) {
|
|
18301
|
+
const t = F(r);
|
|
18302
|
+
return t ? new Date(Date.UTC(t.year, t.month - 1, t.day)) : undefined;
|
|
18303
|
+
}
|
|
18304
|
+
function tt(r, t, e, s) {
|
|
18305
|
+
const i = e ? { year: e.getUTCFullYear(), month: e.getUTCMonth() + 1, day: e.getUTCDate() } : null, n = s ? { year: s.getUTCFullYear(), month: s.getUTCMonth() + 1, day: s.getUTCDate() } : null;
|
|
18306
|
+
return r === "year" ? { min: i?.year ?? 1, max: n?.year ?? 9999 } : r === "month" ? { min: i && t.year === i.year ? i.month : 1, max: n && t.year === n.year ? n.month : 12 } : { min: i && t.year === i.year && t.month === i.month ? i.day : 1, max: n && t.year === n.year && t.month === n.month ? n.day : T(t.year, t.month) };
|
|
18307
|
+
}
|
|
18132
18308
|
|
|
18133
|
-
class
|
|
18309
|
+
class et extends p {
|
|
18310
|
+
#e;
|
|
18311
|
+
#o;
|
|
18312
|
+
#t;
|
|
18313
|
+
#n;
|
|
18314
|
+
#a;
|
|
18315
|
+
#s = { segmentIndex: 0, positionInSegment: 0 };
|
|
18316
|
+
#i = true;
|
|
18317
|
+
#r = null;
|
|
18318
|
+
inlineError = "";
|
|
18319
|
+
get segmentCursor() {
|
|
18320
|
+
return { ...this.#s };
|
|
18321
|
+
}
|
|
18322
|
+
get segmentValues() {
|
|
18323
|
+
return { ...this.#t };
|
|
18324
|
+
}
|
|
18325
|
+
get segments() {
|
|
18326
|
+
return this.#e;
|
|
18327
|
+
}
|
|
18328
|
+
get separator() {
|
|
18329
|
+
return this.#o;
|
|
18330
|
+
}
|
|
18331
|
+
get formattedValue() {
|
|
18332
|
+
return this.#c(this.#t);
|
|
18333
|
+
}
|
|
18334
|
+
#c(t) {
|
|
18335
|
+
return this.#e.map((e) => t[e.type]).join(this.#o);
|
|
18336
|
+
}
|
|
18337
|
+
#h() {
|
|
18338
|
+
this._setUserInput(this.#c(this.#t)), this._setValue(N(this.#t) ?? undefined);
|
|
18339
|
+
}
|
|
18340
|
+
constructor(t) {
|
|
18341
|
+
const e = t.format ? { segments: L(t.format), separator: t.separator ?? "/" } : Z(t.locale), s = t.separator ?? e.separator, i = t.format ? L(t.format) : e.segments, n = t.initialValue ?? t.defaultValue, o = n ? { year: String(n.getUTCFullYear()).padStart(4, "0"), month: String(n.getUTCMonth() + 1).padStart(2, "0"), day: String(n.getUTCDate()).padStart(2, "0") } : { year: "____", month: "__", day: "__" }, a = i.map((h) => o[h.type]).join(s);
|
|
18342
|
+
super({ ...t, initialUserInput: a }, false), this.#e = i, this.#o = s, this.#t = o, this.#n = t.minDate, this.#a = t.maxDate, this.#h(), this.on("cursor", (h) => this.#d(h)), this.on("key", (h, l) => this.#f(h, l)), this.on("finalize", () => this.#g(t));
|
|
18343
|
+
}
|
|
18344
|
+
#u() {
|
|
18345
|
+
const t = Math.max(0, Math.min(this.#s.segmentIndex, this.#e.length - 1)), e = this.#e[t];
|
|
18346
|
+
if (e)
|
|
18347
|
+
return this.#s.positionInSegment = Math.max(0, Math.min(this.#s.positionInSegment, e.len - 1)), { segment: e, index: t };
|
|
18348
|
+
}
|
|
18349
|
+
#l(t) {
|
|
18350
|
+
this.inlineError = "", this.#r = null;
|
|
18351
|
+
const e = this.#u();
|
|
18352
|
+
e && (this.#s.segmentIndex = Math.max(0, Math.min(this.#e.length - 1, e.index + t)), this.#s.positionInSegment = 0, this.#i = true);
|
|
18353
|
+
}
|
|
18354
|
+
#p(t) {
|
|
18355
|
+
const e = this.#u();
|
|
18356
|
+
if (!e)
|
|
18357
|
+
return;
|
|
18358
|
+
const { segment: s } = e, i = this.#t[s.type], n = !i || i.replace(/_/g, "") === "", o = Number.parseInt((i || "0").replace(/_/g, "0"), 10) || 0, a = tt(s.type, I(this.#t), this.#n, this.#a);
|
|
18359
|
+
let h;
|
|
18360
|
+
n ? h = t === 1 ? a.min : a.max : h = Math.max(Math.min(a.max, o + t), a.min), this.#t = { ...this.#t, [s.type]: h.toString().padStart(s.len, "0") }, this.#i = true, this.#r = null, this.#h();
|
|
18361
|
+
}
|
|
18362
|
+
#d(t) {
|
|
18363
|
+
if (t)
|
|
18364
|
+
switch (t) {
|
|
18365
|
+
case "right":
|
|
18366
|
+
return this.#l(1);
|
|
18367
|
+
case "left":
|
|
18368
|
+
return this.#l(-1);
|
|
18369
|
+
case "up":
|
|
18370
|
+
return this.#p(1);
|
|
18371
|
+
case "down":
|
|
18372
|
+
return this.#p(-1);
|
|
18373
|
+
}
|
|
18374
|
+
}
|
|
18375
|
+
#f(t, e) {
|
|
18376
|
+
if (e?.name === "backspace" || e?.sequence === "" || e?.sequence === "\b" || t === "" || t === "\b") {
|
|
18377
|
+
this.inlineError = "";
|
|
18378
|
+
const s = this.#u();
|
|
18379
|
+
if (!s)
|
|
18380
|
+
return;
|
|
18381
|
+
if (!this.#t[s.segment.type].replace(/_/g, "")) {
|
|
18382
|
+
this.#l(-1);
|
|
18383
|
+
return;
|
|
18384
|
+
}
|
|
18385
|
+
this.#t[s.segment.type] = "_".repeat(s.segment.len), this.#i = true, this.#s.positionInSegment = 0, this.#h();
|
|
18386
|
+
return;
|
|
18387
|
+
}
|
|
18388
|
+
if (e?.name === "tab") {
|
|
18389
|
+
this.inlineError = "";
|
|
18390
|
+
const s = this.#u();
|
|
18391
|
+
if (!s)
|
|
18392
|
+
return;
|
|
18393
|
+
const i = e.shift ? -1 : 1, n = s.index + i;
|
|
18394
|
+
n >= 0 && n < this.#e.length && (this.#s.segmentIndex = n, this.#s.positionInSegment = 0, this.#i = true);
|
|
18395
|
+
return;
|
|
18396
|
+
}
|
|
18397
|
+
if (t && /^[0-9]$/.test(t)) {
|
|
18398
|
+
const s = this.#u();
|
|
18399
|
+
if (!s)
|
|
18400
|
+
return;
|
|
18401
|
+
const { segment: i } = s, n = !this.#t[i.type].replace(/_/g, "");
|
|
18402
|
+
if (this.#i && this.#r !== null && !n) {
|
|
18403
|
+
const m = this.#r + t, g = { ...this.#t, [i.type]: m }, b = this.#m(g, i);
|
|
18404
|
+
if (b) {
|
|
18405
|
+
this.inlineError = b, this.#r = null, this.#i = false;
|
|
18406
|
+
return;
|
|
18407
|
+
}
|
|
18408
|
+
this.inlineError = "", this.#t[i.type] = m, this.#r = null, this.#i = false, this.#h(), s.index < this.#e.length - 1 && (this.#s.segmentIndex = s.index + 1, this.#s.positionInSegment = 0, this.#i = true);
|
|
18409
|
+
return;
|
|
18410
|
+
}
|
|
18411
|
+
this.#i && !n && (this.#t[i.type] = "_".repeat(i.len), this.#s.positionInSegment = 0), this.#i = false, this.#r = null;
|
|
18412
|
+
const o = this.#t[i.type], a = o.indexOf("_"), h = a >= 0 ? a : Math.min(this.#s.positionInSegment, i.len - 1);
|
|
18413
|
+
if (h < 0 || h >= i.len)
|
|
18414
|
+
return;
|
|
18415
|
+
let l = o.slice(0, h) + t + o.slice(h + 1), f = false;
|
|
18416
|
+
if (h === 0 && o === "__" && (i.type === "month" || i.type === "day")) {
|
|
18417
|
+
const m = Number.parseInt(t, 10);
|
|
18418
|
+
l = `0${t}`, f = m <= (i.type === "month" ? 1 : 2);
|
|
18419
|
+
}
|
|
18420
|
+
if (i.type === "year" && (l = (o.replace(/_/g, "") + t).padStart(i.len, "_")), !l.includes("_")) {
|
|
18421
|
+
const m = { ...this.#t, [i.type]: l }, g = this.#m(m, i);
|
|
18422
|
+
if (g) {
|
|
18423
|
+
this.inlineError = g;
|
|
18424
|
+
return;
|
|
18425
|
+
}
|
|
18426
|
+
}
|
|
18427
|
+
this.inlineError = "", this.#t[i.type] = l;
|
|
18428
|
+
const v = l.includes("_") ? undefined : F(this.#t);
|
|
18429
|
+
if (v) {
|
|
18430
|
+
const { year: m, month: g } = v, b = T(m, g);
|
|
18431
|
+
this.#t = { year: String(Math.max(0, Math.min(9999, m))).padStart(4, "0"), month: String(Math.max(1, Math.min(12, g))).padStart(2, "0"), day: String(Math.max(1, Math.min(b, v.day))).padStart(2, "0") };
|
|
18432
|
+
}
|
|
18433
|
+
this.#h();
|
|
18434
|
+
const U = l.indexOf("_");
|
|
18435
|
+
f ? (this.#i = true, this.#r = t) : U >= 0 ? this.#s.positionInSegment = U : a >= 0 && s.index < this.#e.length - 1 ? (this.#s.segmentIndex = s.index + 1, this.#s.positionInSegment = 0, this.#i = true) : this.#s.positionInSegment = Math.min(h + 1, i.len - 1);
|
|
18436
|
+
}
|
|
18437
|
+
}
|
|
18438
|
+
#m(t, e) {
|
|
18439
|
+
const { month: s, day: i } = I(t);
|
|
18440
|
+
if (e.type === "month" && (s < 0 || s > 12))
|
|
18441
|
+
return u.date.messages.invalidMonth;
|
|
18442
|
+
if (e.type === "day" && (i < 0 || i > 31))
|
|
18443
|
+
return u.date.messages.invalidDay(31, "any month");
|
|
18444
|
+
}
|
|
18445
|
+
#g(t) {
|
|
18446
|
+
const { year: e, month: s, day: i } = I(this.#t);
|
|
18447
|
+
if (e && s && i) {
|
|
18448
|
+
const n = T(e, s);
|
|
18449
|
+
this.#t = { ...this.#t, day: String(Math.min(i, n)).padStart(2, "0") };
|
|
18450
|
+
}
|
|
18451
|
+
this.value = N(this.#t) ?? t.defaultValue ?? undefined;
|
|
18452
|
+
}
|
|
18453
|
+
}
|
|
18454
|
+
|
|
18455
|
+
class st extends p {
|
|
18134
18456
|
options;
|
|
18135
18457
|
cursor = 0;
|
|
18136
|
-
#
|
|
18137
|
-
getGroupItems(
|
|
18138
|
-
return this.options.filter((
|
|
18458
|
+
#e;
|
|
18459
|
+
getGroupItems(t) {
|
|
18460
|
+
return this.options.filter((e) => e.group === t);
|
|
18139
18461
|
}
|
|
18140
|
-
isGroupSelected(
|
|
18141
|
-
const
|
|
18142
|
-
return
|
|
18462
|
+
isGroupSelected(t) {
|
|
18463
|
+
const e = this.getGroupItems(t), s = this.value;
|
|
18464
|
+
return s === undefined ? false : e.every((i) => s.includes(i.value));
|
|
18143
18465
|
}
|
|
18144
18466
|
toggleValue() {
|
|
18145
|
-
const
|
|
18146
|
-
if (this.value === undefined && (this.value = []),
|
|
18147
|
-
const
|
|
18148
|
-
this.isGroupSelected(
|
|
18467
|
+
const t = this.options[this.cursor];
|
|
18468
|
+
if (this.value === undefined && (this.value = []), t.group === true) {
|
|
18469
|
+
const e = t.value, s = this.getGroupItems(e);
|
|
18470
|
+
this.isGroupSelected(e) ? this.value = this.value.filter((i) => s.findIndex((n) => n.value === i) === -1) : this.value = [...this.value, ...s.map((i) => i.value)], this.value = Array.from(new Set(this.value));
|
|
18149
18471
|
} else {
|
|
18150
|
-
const
|
|
18151
|
-
this.value =
|
|
18472
|
+
const e = this.value.includes(t.value);
|
|
18473
|
+
this.value = e ? this.value.filter((s) => s !== t.value) : [...this.value, t.value];
|
|
18152
18474
|
}
|
|
18153
18475
|
}
|
|
18154
|
-
constructor(
|
|
18155
|
-
super(
|
|
18156
|
-
const { options:
|
|
18157
|
-
this.#
|
|
18158
|
-
switch (
|
|
18476
|
+
constructor(t) {
|
|
18477
|
+
super(t, false);
|
|
18478
|
+
const { options: e } = t;
|
|
18479
|
+
this.#e = t.selectableGroups !== false, this.options = Object.entries(e).flatMap(([s, i]) => [{ value: s, group: true, label: s }, ...i.map((n) => ({ ...n, group: s }))]), this.value = [...t.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: s }) => s === t.cursorAt), this.#e ? 0 : 1), this.on("cursor", (s) => {
|
|
18480
|
+
switch (s) {
|
|
18159
18481
|
case "left":
|
|
18160
18482
|
case "up": {
|
|
18161
18483
|
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
18162
|
-
const
|
|
18163
|
-
!this.#
|
|
18484
|
+
const i = this.options[this.cursor]?.group === true;
|
|
18485
|
+
!this.#e && i && (this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1);
|
|
18164
18486
|
break;
|
|
18165
18487
|
}
|
|
18166
18488
|
case "down":
|
|
18167
18489
|
case "right": {
|
|
18168
18490
|
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
18169
|
-
const
|
|
18170
|
-
!this.#
|
|
18491
|
+
const i = this.options[this.cursor]?.group === true;
|
|
18492
|
+
!this.#e && i && (this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1);
|
|
18171
18493
|
break;
|
|
18172
18494
|
}
|
|
18173
18495
|
case "space":
|
|
@@ -18177,46 +18499,45 @@ class yt extends x {
|
|
|
18177
18499
|
});
|
|
18178
18500
|
}
|
|
18179
18501
|
}
|
|
18180
|
-
|
|
18181
|
-
class Lt extends x {
|
|
18502
|
+
var it = class extends p {
|
|
18182
18503
|
options;
|
|
18183
18504
|
cursor = 0;
|
|
18184
18505
|
get _value() {
|
|
18185
18506
|
return this.options[this.cursor].value;
|
|
18186
18507
|
}
|
|
18187
18508
|
get _enabledOptions() {
|
|
18188
|
-
return this.options.filter((
|
|
18509
|
+
return this.options.filter((t) => t.disabled !== true);
|
|
18189
18510
|
}
|
|
18190
18511
|
toggleAll() {
|
|
18191
|
-
const
|
|
18192
|
-
this.value =
|
|
18512
|
+
const t = this._enabledOptions, e = this.value !== undefined && this.value.length === t.length;
|
|
18513
|
+
this.value = e ? [] : t.map((s) => s.value);
|
|
18193
18514
|
}
|
|
18194
18515
|
toggleInvert() {
|
|
18195
|
-
const
|
|
18196
|
-
if (!
|
|
18516
|
+
const t = this.value;
|
|
18517
|
+
if (!t)
|
|
18197
18518
|
return;
|
|
18198
|
-
const
|
|
18199
|
-
this.value =
|
|
18519
|
+
const e = this._enabledOptions.filter((s) => !t.includes(s.value));
|
|
18520
|
+
this.value = e.map((s) => s.value);
|
|
18200
18521
|
}
|
|
18201
18522
|
toggleValue() {
|
|
18202
18523
|
this.value === undefined && (this.value = []);
|
|
18203
|
-
const
|
|
18204
|
-
this.value =
|
|
18205
|
-
}
|
|
18206
|
-
constructor(
|
|
18207
|
-
super(
|
|
18208
|
-
const
|
|
18209
|
-
this.cursor = this.options[
|
|
18210
|
-
|
|
18211
|
-
}), this.on("cursor", (
|
|
18212
|
-
switch (
|
|
18524
|
+
const t = this.value.includes(this._value);
|
|
18525
|
+
this.value = t ? this.value.filter((e) => e !== this._value) : [...this.value, this._value];
|
|
18526
|
+
}
|
|
18527
|
+
constructor(t) {
|
|
18528
|
+
super(t, false), this.options = t.options, this.value = [...t.initialValues ?? []];
|
|
18529
|
+
const e = Math.max(this.options.findIndex(({ value: s }) => s === t.cursorAt), 0);
|
|
18530
|
+
this.cursor = this.options[e].disabled ? d(e, 1, this.options) : e, this.on("key", (s) => {
|
|
18531
|
+
s === "a" && this.toggleAll(), s === "i" && this.toggleInvert();
|
|
18532
|
+
}), this.on("cursor", (s) => {
|
|
18533
|
+
switch (s) {
|
|
18213
18534
|
case "left":
|
|
18214
18535
|
case "up":
|
|
18215
|
-
this.cursor =
|
|
18536
|
+
this.cursor = d(this.cursor, -1, this.options);
|
|
18216
18537
|
break;
|
|
18217
18538
|
case "down":
|
|
18218
18539
|
case "right":
|
|
18219
|
-
this.cursor =
|
|
18540
|
+
this.cursor = d(this.cursor, 1, this.options);
|
|
18220
18541
|
break;
|
|
18221
18542
|
case "space":
|
|
18222
18543
|
this.toggleValue();
|
|
@@ -18224,8 +18545,8 @@ class Lt extends x {
|
|
|
18224
18545
|
}
|
|
18225
18546
|
});
|
|
18226
18547
|
}
|
|
18227
|
-
}
|
|
18228
|
-
class
|
|
18548
|
+
};
|
|
18549
|
+
class nt extends p {
|
|
18229
18550
|
options;
|
|
18230
18551
|
cursor = 0;
|
|
18231
18552
|
get _selectedValue() {
|
|
@@ -18234,492 +18555,314 @@ class Wt extends x {
|
|
|
18234
18555
|
changeValue() {
|
|
18235
18556
|
this.value = this._selectedValue.value;
|
|
18236
18557
|
}
|
|
18237
|
-
constructor(
|
|
18238
|
-
super(
|
|
18239
|
-
const
|
|
18240
|
-
this.cursor = this.options[
|
|
18241
|
-
switch (
|
|
18558
|
+
constructor(t) {
|
|
18559
|
+
super(t, false), this.options = t.options;
|
|
18560
|
+
const e = this.options.findIndex(({ value: i }) => i === t.initialValue), s = e === -1 ? 0 : e;
|
|
18561
|
+
this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.changeValue(), this.on("cursor", (i) => {
|
|
18562
|
+
switch (i) {
|
|
18242
18563
|
case "left":
|
|
18243
18564
|
case "up":
|
|
18244
|
-
this.cursor =
|
|
18565
|
+
this.cursor = d(this.cursor, -1, this.options);
|
|
18245
18566
|
break;
|
|
18246
18567
|
case "down":
|
|
18247
18568
|
case "right":
|
|
18248
|
-
this.cursor =
|
|
18569
|
+
this.cursor = d(this.cursor, 1, this.options);
|
|
18249
18570
|
break;
|
|
18250
18571
|
}
|
|
18251
18572
|
this.changeValue();
|
|
18252
18573
|
});
|
|
18253
18574
|
}
|
|
18254
18575
|
}
|
|
18255
|
-
class
|
|
18576
|
+
class at extends p {
|
|
18256
18577
|
get userInputWithCursor() {
|
|
18257
18578
|
if (this.state === "submit")
|
|
18258
18579
|
return this.userInput;
|
|
18259
|
-
const
|
|
18260
|
-
if (this.cursor >=
|
|
18580
|
+
const t = this.userInput;
|
|
18581
|
+
if (this.cursor >= t.length)
|
|
18261
18582
|
return `${this.userInput}█`;
|
|
18262
|
-
const
|
|
18263
|
-
return `${
|
|
18583
|
+
const e = t.slice(0, this.cursor), [s, ...i] = t.slice(this.cursor);
|
|
18584
|
+
return `${e}${y("inverse", s)}${i.join("")}`;
|
|
18264
18585
|
}
|
|
18265
18586
|
get cursor() {
|
|
18266
18587
|
return this._cursor;
|
|
18267
18588
|
}
|
|
18268
|
-
constructor(
|
|
18269
|
-
super({ ...
|
|
18270
|
-
this._setValue(
|
|
18589
|
+
constructor(t) {
|
|
18590
|
+
super({ ...t, initialUserInput: t.initialUserInput ?? t.initialValue }), this.on("userInput", (e) => {
|
|
18591
|
+
this._setValue(e);
|
|
18271
18592
|
}), this.on("finalize", () => {
|
|
18272
|
-
this.value || (this.value =
|
|
18593
|
+
this.value || (this.value = t.defaultValue), this.value === undefined && (this.value = "");
|
|
18273
18594
|
});
|
|
18274
18595
|
}
|
|
18275
18596
|
}
|
|
18276
18597
|
|
|
18277
|
-
// ../../node_modules/@clack/prompts/dist/index.mjs
|
|
18278
|
-
|
|
18279
|
-
import
|
|
18598
|
+
// ../../node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
|
|
18599
|
+
import { styleText as t, stripVTControlCharacters as ne } from "node:util";
|
|
18600
|
+
import P2 from "node:process";
|
|
18280
18601
|
var import_sisteransi2 = __toESM(require_src(), 1);
|
|
18281
|
-
function
|
|
18282
|
-
return
|
|
18283
|
-
}
|
|
18284
|
-
var
|
|
18285
|
-
var
|
|
18286
|
-
var
|
|
18287
|
-
var
|
|
18288
|
-
var
|
|
18289
|
-
var
|
|
18290
|
-
var
|
|
18291
|
-
var
|
|
18292
|
-
var
|
|
18293
|
-
var
|
|
18294
|
-
var
|
|
18295
|
-
var
|
|
18296
|
-
var H2 =
|
|
18297
|
-
var
|
|
18298
|
-
var
|
|
18299
|
-
var
|
|
18300
|
-
var
|
|
18301
|
-
var
|
|
18302
|
-
var
|
|
18303
|
-
var
|
|
18304
|
-
var
|
|
18305
|
-
var
|
|
18306
|
-
var
|
|
18307
|
-
var
|
|
18308
|
-
var
|
|
18309
|
-
var
|
|
18310
|
-
var
|
|
18311
|
-
var
|
|
18312
|
-
switch (
|
|
18602
|
+
function Ze() {
|
|
18603
|
+
return P2.platform !== "win32" ? P2.env.TERM !== "linux" : !!P2.env.CI || !!P2.env.WT_SESSION || !!P2.env.TERMINUS_SUBLIME || P2.env.ConEmuTask === "{cmd::Cmder}" || P2.env.TERM_PROGRAM === "Terminus-Sublime" || P2.env.TERM_PROGRAM === "vscode" || P2.env.TERM === "xterm-256color" || P2.env.TERM === "alacritty" || P2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
18604
|
+
}
|
|
18605
|
+
var ee = Ze();
|
|
18606
|
+
var w2 = (e, i) => ee ? e : i;
|
|
18607
|
+
var _e = w2("◆", "*");
|
|
18608
|
+
var oe = w2("■", "x");
|
|
18609
|
+
var ue = w2("▲", "x");
|
|
18610
|
+
var F2 = w2("◇", "o");
|
|
18611
|
+
var le = w2("┌", "T");
|
|
18612
|
+
var d2 = w2("│", "|");
|
|
18613
|
+
var E2 = w2("└", "—");
|
|
18614
|
+
var Ie = w2("┐", "T");
|
|
18615
|
+
var Ee = w2("┘", "—");
|
|
18616
|
+
var z3 = w2("●", ">");
|
|
18617
|
+
var H2 = w2("○", " ");
|
|
18618
|
+
var te = w2("◻", "[•]");
|
|
18619
|
+
var U = w2("◼", "[+]");
|
|
18620
|
+
var J2 = w2("◻", "[ ]");
|
|
18621
|
+
var xe = w2("▪", "•");
|
|
18622
|
+
var se = w2("─", "-");
|
|
18623
|
+
var ce = w2("╮", "+");
|
|
18624
|
+
var Ge = w2("├", "+");
|
|
18625
|
+
var $e = w2("╯", "+");
|
|
18626
|
+
var de = w2("╰", "+");
|
|
18627
|
+
var Oe = w2("╭", "+");
|
|
18628
|
+
var he = w2("●", "•");
|
|
18629
|
+
var pe = w2("◆", "*");
|
|
18630
|
+
var me = w2("▲", "!");
|
|
18631
|
+
var ge = w2("■", "x");
|
|
18632
|
+
var V2 = (e) => {
|
|
18633
|
+
switch (e) {
|
|
18313
18634
|
case "initial":
|
|
18314
18635
|
case "active":
|
|
18315
|
-
return
|
|
18636
|
+
return t("cyan", _e);
|
|
18316
18637
|
case "cancel":
|
|
18317
|
-
return
|
|
18638
|
+
return t("red", oe);
|
|
18318
18639
|
case "error":
|
|
18319
|
-
return
|
|
18640
|
+
return t("yellow", ue);
|
|
18320
18641
|
case "submit":
|
|
18321
|
-
return
|
|
18642
|
+
return t("green", F2);
|
|
18322
18643
|
}
|
|
18323
18644
|
};
|
|
18324
|
-
var
|
|
18325
|
-
switch (
|
|
18645
|
+
var ye = (e) => {
|
|
18646
|
+
switch (e) {
|
|
18326
18647
|
case "initial":
|
|
18327
18648
|
case "active":
|
|
18328
|
-
return
|
|
18649
|
+
return t("cyan", d2);
|
|
18329
18650
|
case "cancel":
|
|
18330
|
-
return
|
|
18651
|
+
return t("red", d2);
|
|
18331
18652
|
case "error":
|
|
18332
|
-
return
|
|
18653
|
+
return t("yellow", d2);
|
|
18333
18654
|
case "submit":
|
|
18334
|
-
return
|
|
18655
|
+
return t("green", d2);
|
|
18335
18656
|
}
|
|
18336
18657
|
};
|
|
18337
|
-
var
|
|
18338
|
-
|
|
18339
|
-
|
|
18340
|
-
|
|
18341
|
-
|
|
18342
|
-
var nt2 = /\t{1,1000}/y;
|
|
18343
|
-
var wt2 = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu;
|
|
18344
|
-
var at2 = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
|
|
18345
|
-
var Fe = /\p{M}+/gu;
|
|
18346
|
-
var ye = { limit: 1 / 0, ellipsis: "" };
|
|
18347
|
-
var jt = (t, r = {}, s = {}) => {
|
|
18348
|
-
const i = r.limit ?? 1 / 0, a = r.ellipsis ?? "", o = r?.ellipsisWidth ?? (a ? jt(a, ye, s).width : 0), u = s.ansiWidth ?? 0, l = s.controlWidth ?? 0, n = s.tabWidth ?? 8, c = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, F = s.fullWidthWidth ?? 2, p = s.regularWidth ?? 1, E = s.wideWidth ?? 2;
|
|
18349
|
-
let $2 = 0, m = 0, h = t.length, y2 = 0, f = false, v = h, S2 = Math.max(0, i - o), I2 = 0, B2 = 0, A = 0, w = 0;
|
|
18350
|
-
t:
|
|
18351
|
-
for (;; ) {
|
|
18352
|
-
if (B2 > I2 || m >= h && m > $2) {
|
|
18353
|
-
const _2 = t.slice(I2, B2) || t.slice($2, m);
|
|
18354
|
-
y2 = 0;
|
|
18355
|
-
for (const D2 of _2.replaceAll(Fe, "")) {
|
|
18356
|
-
const T2 = D2.codePointAt(0) || 0;
|
|
18357
|
-
if (ge(T2) ? w = F : fe(T2) ? w = E : c !== p && pe(T2) ? w = c : w = p, A + w > S2 && (v = Math.min(v, Math.max(I2, $2) + y2)), A + w > i) {
|
|
18358
|
-
f = true;
|
|
18359
|
-
break t;
|
|
18360
|
-
}
|
|
18361
|
-
y2 += D2.length, A += w;
|
|
18362
|
-
}
|
|
18363
|
-
I2 = B2 = 0;
|
|
18364
|
-
}
|
|
18365
|
-
if (m >= h)
|
|
18366
|
-
break;
|
|
18367
|
-
if (at2.lastIndex = m, at2.test(t)) {
|
|
18368
|
-
if (y2 = at2.lastIndex - m, w = y2 * p, A + w > S2 && (v = Math.min(v, m + Math.floor((S2 - A) / p))), A + w > i) {
|
|
18369
|
-
f = true;
|
|
18370
|
-
break;
|
|
18371
|
-
}
|
|
18372
|
-
A += w, I2 = $2, B2 = m, m = $2 = at2.lastIndex;
|
|
18373
|
-
continue;
|
|
18374
|
-
}
|
|
18375
|
-
if (At2.lastIndex = m, At2.test(t)) {
|
|
18376
|
-
if (A + u > S2 && (v = Math.min(v, m)), A + u > i) {
|
|
18377
|
-
f = true;
|
|
18378
|
-
break;
|
|
18379
|
-
}
|
|
18380
|
-
A += u, I2 = $2, B2 = m, m = $2 = At2.lastIndex;
|
|
18381
|
-
continue;
|
|
18382
|
-
}
|
|
18383
|
-
if (it2.lastIndex = m, it2.test(t)) {
|
|
18384
|
-
if (y2 = it2.lastIndex - m, w = y2 * l, A + w > S2 && (v = Math.min(v, m + Math.floor((S2 - A) / l))), A + w > i) {
|
|
18385
|
-
f = true;
|
|
18386
|
-
break;
|
|
18387
|
-
}
|
|
18388
|
-
A += w, I2 = $2, B2 = m, m = $2 = it2.lastIndex;
|
|
18389
|
-
continue;
|
|
18390
|
-
}
|
|
18391
|
-
if (nt2.lastIndex = m, nt2.test(t)) {
|
|
18392
|
-
if (y2 = nt2.lastIndex - m, w = y2 * n, A + w > S2 && (v = Math.min(v, m + Math.floor((S2 - A) / n))), A + w > i) {
|
|
18393
|
-
f = true;
|
|
18394
|
-
break;
|
|
18395
|
-
}
|
|
18396
|
-
A += w, I2 = $2, B2 = m, m = $2 = nt2.lastIndex;
|
|
18397
|
-
continue;
|
|
18398
|
-
}
|
|
18399
|
-
if (wt2.lastIndex = m, wt2.test(t)) {
|
|
18400
|
-
if (A + g > S2 && (v = Math.min(v, m)), A + g > i) {
|
|
18401
|
-
f = true;
|
|
18402
|
-
break;
|
|
18403
|
-
}
|
|
18404
|
-
A += g, I2 = $2, B2 = m, m = $2 = wt2.lastIndex;
|
|
18405
|
-
continue;
|
|
18406
|
-
}
|
|
18407
|
-
m += 1;
|
|
18408
|
-
}
|
|
18409
|
-
return { width: f ? S2 : A, index: f ? v : h, truncated: f, ellipsed: f && i >= o };
|
|
18410
|
-
};
|
|
18411
|
-
var Ee = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
|
|
18412
|
-
var M2 = (t, r = {}) => jt(t, Ee, r).width;
|
|
18413
|
-
var ot2 = "\x1B";
|
|
18414
|
-
var Gt = "";
|
|
18415
|
-
var ve = 39;
|
|
18416
|
-
var Ct2 = "\x07";
|
|
18417
|
-
var kt2 = "[";
|
|
18418
|
-
var Ae = "]";
|
|
18419
|
-
var Vt2 = "m";
|
|
18420
|
-
var St2 = `${Ae}8;;`;
|
|
18421
|
-
var Ht = new RegExp(`(?:\\${kt2}(?<code>\\d+)m|\\${St2}(?<uri>.*)${Ct2})`, "y");
|
|
18422
|
-
var we = (t) => {
|
|
18423
|
-
if (t >= 30 && t <= 37 || t >= 90 && t <= 97)
|
|
18424
|
-
return 39;
|
|
18425
|
-
if (t >= 40 && t <= 47 || t >= 100 && t <= 107)
|
|
18426
|
-
return 49;
|
|
18427
|
-
if (t === 1 || t === 2)
|
|
18428
|
-
return 22;
|
|
18429
|
-
if (t === 3)
|
|
18430
|
-
return 23;
|
|
18431
|
-
if (t === 4)
|
|
18432
|
-
return 24;
|
|
18433
|
-
if (t === 7)
|
|
18434
|
-
return 27;
|
|
18435
|
-
if (t === 8)
|
|
18436
|
-
return 28;
|
|
18437
|
-
if (t === 9)
|
|
18438
|
-
return 29;
|
|
18439
|
-
if (t === 0)
|
|
18440
|
-
return 0;
|
|
18441
|
-
};
|
|
18442
|
-
var Ut = (t) => `${ot2}${kt2}${t}${Vt2}`;
|
|
18443
|
-
var Kt = (t) => `${ot2}${St2}${t}${Ct2}`;
|
|
18444
|
-
var Ce = (t) => t.map((r) => M2(r));
|
|
18445
|
-
var It2 = (t, r, s) => {
|
|
18446
|
-
const i = r[Symbol.iterator]();
|
|
18447
|
-
let a = false, o = false, u = t.at(-1), l = u === undefined ? 0 : M2(u), n = i.next(), c = i.next(), g = 0;
|
|
18448
|
-
for (;!n.done; ) {
|
|
18449
|
-
const F = n.value, p = M2(F);
|
|
18450
|
-
l + p <= s ? t[t.length - 1] += F : (t.push(F), l = 0), (F === ot2 || F === Gt) && (a = true, o = r.startsWith(St2, g + 1)), a ? o ? F === Ct2 && (a = false, o = false) : F === Vt2 && (a = false) : (l += p, l === s && !c.done && (t.push(""), l = 0)), n = c, c = i.next(), g += F.length;
|
|
18451
|
-
}
|
|
18452
|
-
u = t.at(-1), !l && u !== undefined && u.length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
|
|
18453
|
-
};
|
|
18454
|
-
var Se = (t) => {
|
|
18455
|
-
const r = t.split(" ");
|
|
18456
|
-
let s = r.length;
|
|
18457
|
-
for (;s > 0 && !(M2(r[s - 1]) > 0); )
|
|
18458
|
-
s--;
|
|
18459
|
-
return s === r.length ? t : r.slice(0, s).join(" ") + r.slice(s).join("");
|
|
18460
|
-
};
|
|
18461
|
-
var Ie = (t, r, s = {}) => {
|
|
18462
|
-
if (s.trim !== false && t.trim() === "")
|
|
18463
|
-
return "";
|
|
18464
|
-
let i = "", a, o;
|
|
18465
|
-
const u = t.split(" "), l = Ce(u);
|
|
18466
|
-
let n = [""];
|
|
18467
|
-
for (const [$2, m] of u.entries()) {
|
|
18468
|
-
s.trim !== false && (n[n.length - 1] = (n.at(-1) ?? "").trimStart());
|
|
18469
|
-
let h = M2(n.at(-1) ?? "");
|
|
18470
|
-
if ($2 !== 0 && (h >= r && (s.wordWrap === false || s.trim === false) && (n.push(""), h = 0), (h > 0 || s.trim === false) && (n[n.length - 1] += " ", h++)), s.hard && l[$2] > r) {
|
|
18471
|
-
const y2 = r - h, f = 1 + Math.floor((l[$2] - y2 - 1) / r);
|
|
18472
|
-
Math.floor((l[$2] - 1) / r) < f && n.push(""), It2(n, m, r);
|
|
18473
|
-
continue;
|
|
18474
|
-
}
|
|
18475
|
-
if (h + l[$2] > r && h > 0 && l[$2] > 0) {
|
|
18476
|
-
if (s.wordWrap === false && h < r) {
|
|
18477
|
-
It2(n, m, r);
|
|
18478
|
-
continue;
|
|
18479
|
-
}
|
|
18480
|
-
n.push("");
|
|
18481
|
-
}
|
|
18482
|
-
if (h + l[$2] > r && s.wordWrap === false) {
|
|
18483
|
-
It2(n, m, r);
|
|
18484
|
-
continue;
|
|
18485
|
-
}
|
|
18486
|
-
n[n.length - 1] += m;
|
|
18487
|
-
}
|
|
18488
|
-
s.trim !== false && (n = n.map(($2) => Se($2)));
|
|
18489
|
-
const c = n.join(`
|
|
18490
|
-
`), g = c[Symbol.iterator]();
|
|
18491
|
-
let F = g.next(), p = g.next(), E = 0;
|
|
18492
|
-
for (;!F.done; ) {
|
|
18493
|
-
const $2 = F.value, m = p.value;
|
|
18494
|
-
if (i += $2, $2 === ot2 || $2 === Gt) {
|
|
18495
|
-
Ht.lastIndex = E + 1;
|
|
18496
|
-
const f = Ht.exec(c)?.groups;
|
|
18497
|
-
if (f?.code !== undefined) {
|
|
18498
|
-
const v = Number.parseFloat(f.code);
|
|
18499
|
-
a = v === ve ? undefined : v;
|
|
18500
|
-
} else
|
|
18501
|
-
f?.uri !== undefined && (o = f.uri.length === 0 ? undefined : f.uri);
|
|
18502
|
-
}
|
|
18503
|
-
const h = a ? we(a) : undefined;
|
|
18504
|
-
m === `
|
|
18505
|
-
` ? (o && (i += Kt("")), a && h && (i += Ut(h))) : $2 === `
|
|
18506
|
-
` && (a && h && (i += Ut(a)), o && (i += Kt(o))), E += $2.length, F = p, p = g.next();
|
|
18507
|
-
}
|
|
18508
|
-
return i;
|
|
18509
|
-
};
|
|
18510
|
-
function J(t, r, s) {
|
|
18511
|
-
return String(t).normalize().replaceAll(`\r
|
|
18512
|
-
`, `
|
|
18513
|
-
`).split(`
|
|
18514
|
-
`).map((i) => Ie(i, r, s)).join(`
|
|
18515
|
-
`);
|
|
18516
|
-
}
|
|
18517
|
-
var be = (t, r, s, i, a) => {
|
|
18518
|
-
let o = r, u = 0;
|
|
18519
|
-
for (let l = s;l < i; l++) {
|
|
18520
|
-
const n = t[l];
|
|
18521
|
-
if (o = o - n.length, u++, o <= a)
|
|
18658
|
+
var et2 = (e, i, s, r, u2) => {
|
|
18659
|
+
let n = i, o = 0;
|
|
18660
|
+
for (let c2 = s;c2 < r; c2++) {
|
|
18661
|
+
const a = e[c2];
|
|
18662
|
+
if (n = n - a.length, o++, n <= u2)
|
|
18522
18663
|
break;
|
|
18523
18664
|
}
|
|
18524
|
-
return { lineCount:
|
|
18665
|
+
return { lineCount: n, removals: o };
|
|
18525
18666
|
};
|
|
18526
|
-
var
|
|
18527
|
-
const
|
|
18528
|
-
let
|
|
18529
|
-
|
|
18530
|
-
let m =
|
|
18531
|
-
const
|
|
18532
|
-
let
|
|
18533
|
-
m &&
|
|
18534
|
-
const
|
|
18535
|
-
for (let
|
|
18536
|
-
const
|
|
18667
|
+
var Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
|
|
18668
|
+
const c2 = O(r) - n, a = A(r), l = t("dim", "..."), $3 = Math.max(a - o, 0), y2 = Math.max(Math.min(u2, $3), 5);
|
|
18669
|
+
let p2 = 0;
|
|
18670
|
+
e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
|
|
18671
|
+
let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
|
|
18672
|
+
const S2 = Math.min(p2 + y2, i.length), h = [];
|
|
18673
|
+
let f = 0;
|
|
18674
|
+
m && f++, g && f++;
|
|
18675
|
+
const v = p2 + (m ? 1 : 0), T2 = S2 - (g ? 1 : 0);
|
|
18676
|
+
for (let b = v;b < T2; b++) {
|
|
18677
|
+
const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
|
|
18537
18678
|
`);
|
|
18538
|
-
|
|
18539
|
-
}
|
|
18540
|
-
if (
|
|
18541
|
-
let
|
|
18542
|
-
const
|
|
18543
|
-
m ? ({ lineCount:
|
|
18544
|
-
}
|
|
18545
|
-
const
|
|
18546
|
-
m &&
|
|
18547
|
-
for (const
|
|
18548
|
-
for (const
|
|
18549
|
-
|
|
18550
|
-
return
|
|
18679
|
+
h.push(x), f += x.length;
|
|
18680
|
+
}
|
|
18681
|
+
if (f > $3) {
|
|
18682
|
+
let b = 0, x = 0, G2 = f;
|
|
18683
|
+
const M2 = e - v, R2 = (j2, D) => et2(h, G2, j2, D, $3);
|
|
18684
|
+
m ? ({ lineCount: G2, removals: b } = R2(0, M2), G2 > $3 && ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length))) : ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length), G2 > $3 && ({ lineCount: G2, removals: b } = R2(0, M2))), b > 0 && (m = true, h.splice(0, b)), x > 0 && (g = true, h.splice(h.length - x, x));
|
|
18685
|
+
}
|
|
18686
|
+
const C2 = [];
|
|
18687
|
+
m && C2.push(l);
|
|
18688
|
+
for (const b of h)
|
|
18689
|
+
for (const x of b)
|
|
18690
|
+
C2.push(x);
|
|
18691
|
+
return g && C2.push(l), C2;
|
|
18551
18692
|
};
|
|
18552
|
-
var
|
|
18553
|
-
const
|
|
18554
|
-
return new
|
|
18555
|
-
const
|
|
18556
|
-
` : ""}${
|
|
18557
|
-
`,
|
|
18693
|
+
var ot2 = (e) => {
|
|
18694
|
+
const i = e.active ?? "Yes", s = e.inactive ?? "No";
|
|
18695
|
+
return new Q({ active: i, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
|
|
18696
|
+
const r = e.withGuide ?? u.withGuide, u2 = `${V2(this.state)} `, n = r ? `${t("gray", d2)} ` : "", o = R(e.output, e.message, n, u2), c2 = `${r ? `${t("gray", d2)}
|
|
18697
|
+
` : ""}${o}
|
|
18698
|
+
`, a = this.value ? i : s;
|
|
18558
18699
|
switch (this.state) {
|
|
18559
18700
|
case "submit": {
|
|
18560
|
-
const
|
|
18561
|
-
return `${
|
|
18701
|
+
const l = r ? `${t("gray", d2)} ` : "";
|
|
18702
|
+
return `${c2}${l}${t("dim", a)}`;
|
|
18562
18703
|
}
|
|
18563
18704
|
case "cancel": {
|
|
18564
|
-
const
|
|
18565
|
-
return `${
|
|
18566
|
-
${
|
|
18705
|
+
const l = r ? `${t("gray", d2)} ` : "";
|
|
18706
|
+
return `${c2}${l}${t(["strikethrough", "dim"], a)}${r ? `
|
|
18707
|
+
${t("gray", d2)}` : ""}`;
|
|
18567
18708
|
}
|
|
18568
18709
|
default: {
|
|
18569
|
-
const
|
|
18570
|
-
return `${
|
|
18571
|
-
${
|
|
18572
|
-
` : ` ${
|
|
18573
|
-
${
|
|
18710
|
+
const l = r ? `${t("cyan", d2)} ` : "", $3 = r ? t("cyan", E2) : "";
|
|
18711
|
+
return `${c2}${l}${this.value ? `${t("green", z3)} ${i}` : `${t("dim", H2)} ${t("dim", i)}`}${e.vertical ? r ? `
|
|
18712
|
+
${t("cyan", d2)} ` : `
|
|
18713
|
+
` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z3)} ${s}`}
|
|
18714
|
+
${$3}
|
|
18574
18715
|
`;
|
|
18575
18716
|
}
|
|
18576
18717
|
}
|
|
18577
18718
|
} }).prompt();
|
|
18578
18719
|
};
|
|
18579
|
-
var
|
|
18580
|
-
|
|
18720
|
+
var pt = (e = "", i) => {
|
|
18721
|
+
const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", E2)} ` : "";
|
|
18722
|
+
s.write(`${r}${t("red", e)}
|
|
18581
18723
|
|
|
18582
18724
|
`);
|
|
18583
18725
|
};
|
|
18584
|
-
var
|
|
18585
|
-
|
|
18726
|
+
var mt = (e = "", i) => {
|
|
18727
|
+
const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", le)} ` : "";
|
|
18728
|
+
s.write(`${r}${e}
|
|
18586
18729
|
`);
|
|
18587
18730
|
};
|
|
18588
|
-
var
|
|
18589
|
-
|
|
18590
|
-
${
|
|
18731
|
+
var gt = (e = "", i) => {
|
|
18732
|
+
const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", d2)}
|
|
18733
|
+
${t("gray", E2)} ` : "";
|
|
18734
|
+
s.write(`${r}${e}
|
|
18591
18735
|
|
|
18592
18736
|
`);
|
|
18593
18737
|
};
|
|
18594
|
-
var
|
|
18595
|
-
`).map((s) =>
|
|
18738
|
+
var Q2 = (e, i) => e.split(`
|
|
18739
|
+
`).map((s) => i(s)).join(`
|
|
18596
18740
|
`);
|
|
18597
|
-
var
|
|
18598
|
-
const
|
|
18599
|
-
const
|
|
18600
|
-
return
|
|
18601
|
-
}, s =
|
|
18602
|
-
return new
|
|
18603
|
-
if (s && (
|
|
18741
|
+
var yt = (e) => {
|
|
18742
|
+
const i = (r, u2) => {
|
|
18743
|
+
const n = r.label ?? String(r.value);
|
|
18744
|
+
return u2 === "disabled" ? `${t("gray", J2)} ${Q2(n, (o) => t(["strikethrough", "gray"], o))}${r.hint ? ` ${t("dim", `(${r.hint ?? "disabled"})`)}` : ""}` : u2 === "active" ? `${t("cyan", te)} ${n}${r.hint ? ` ${t("dim", `(${r.hint})`)}` : ""}` : u2 === "selected" ? `${t("green", U)} ${Q2(n, (o) => t("dim", o))}${r.hint ? ` ${t("dim", `(${r.hint})`)}` : ""}` : u2 === "cancelled" ? `${Q2(n, (o) => t(["strikethrough", "dim"], o))}` : u2 === "active-selected" ? `${t("green", U)} ${n}${r.hint ? ` ${t("dim", `(${r.hint})`)}` : ""}` : u2 === "submitted" ? `${Q2(n, (o) => t("dim", o))}` : `${t("dim", J2)} ${Q2(n, (o) => t("dim", o))}`;
|
|
18745
|
+
}, s = e.required ?? true;
|
|
18746
|
+
return new it({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: s, cursorAt: e.cursorAt, validate(r) {
|
|
18747
|
+
if (s && (r === undefined || r.length === 0))
|
|
18604
18748
|
return `Please select at least one option.
|
|
18605
|
-
${
|
|
18749
|
+
${t("reset", t("dim", `Press ${t(["gray", "bgWhite", "inverse"], " space ")} to select, ${t("gray", t("bgWhite", t("inverse", " enter ")))} to submit`))}`;
|
|
18606
18750
|
}, render() {
|
|
18607
|
-
const
|
|
18608
|
-
${
|
|
18609
|
-
`, o = this.value ?? [],
|
|
18610
|
-
if (
|
|
18611
|
-
return
|
|
18612
|
-
const
|
|
18613
|
-
return
|
|
18751
|
+
const r = e.withGuide ?? u.withGuide, u2 = R(e.output, e.message, r ? `${ye(this.state)} ` : "", `${V2(this.state)} `), n = `${r ? `${t("gray", d2)}
|
|
18752
|
+
` : ""}${u2}
|
|
18753
|
+
`, o = this.value ?? [], c2 = (a, l) => {
|
|
18754
|
+
if (a.disabled)
|
|
18755
|
+
return i(a, "disabled");
|
|
18756
|
+
const $3 = o.includes(a.value);
|
|
18757
|
+
return l && $3 ? i(a, "active-selected") : $3 ? i(a, "selected") : i(a, l ? "active" : "inactive");
|
|
18614
18758
|
};
|
|
18615
18759
|
switch (this.state) {
|
|
18616
18760
|
case "submit": {
|
|
18617
|
-
const
|
|
18618
|
-
return `${
|
|
18761
|
+
const a = this.options.filter(({ value: $3 }) => o.includes($3)).map(($3) => i($3, "submitted")).join(t("dim", ", ")) || t("dim", "none"), l = R(e.output, a, r ? `${t("gray", d2)} ` : "");
|
|
18762
|
+
return `${n}${l}`;
|
|
18619
18763
|
}
|
|
18620
18764
|
case "cancel": {
|
|
18621
|
-
const
|
|
18622
|
-
if (
|
|
18623
|
-
return `${
|
|
18624
|
-
const
|
|
18625
|
-
return `${
|
|
18626
|
-
${
|
|
18765
|
+
const a = this.options.filter(({ value: $3 }) => o.includes($3)).map(($3) => i($3, "cancelled")).join(t("dim", ", "));
|
|
18766
|
+
if (a.trim() === "")
|
|
18767
|
+
return `${n}${t("gray", d2)}`;
|
|
18768
|
+
const l = R(e.output, a, r ? `${t("gray", d2)} ` : "");
|
|
18769
|
+
return `${n}${l}${r ? `
|
|
18770
|
+
${t("gray", d2)}` : ""}`;
|
|
18627
18771
|
}
|
|
18628
18772
|
case "error": {
|
|
18629
|
-
const
|
|
18630
|
-
`).map((
|
|
18631
|
-
`),
|
|
18632
|
-
`).length,
|
|
18773
|
+
const a = r ? `${t("yellow", d2)} ` : "", l = this.error.split(`
|
|
18774
|
+
`).map((p2, m) => m === 0 ? `${r ? `${t("yellow", E2)} ` : ""}${t("yellow", p2)}` : ` ${p2}`).join(`
|
|
18775
|
+
`), $3 = n.split(`
|
|
18776
|
+
`).length, y2 = l.split(`
|
|
18633
18777
|
`).length + 1;
|
|
18634
|
-
return `${
|
|
18635
|
-
${
|
|
18636
|
-
${
|
|
18778
|
+
return `${n}${a}${Y2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, rowPadding: $3 + y2, style: c2 }).join(`
|
|
18779
|
+
${a}`)}
|
|
18780
|
+
${l}
|
|
18637
18781
|
`;
|
|
18638
18782
|
}
|
|
18639
18783
|
default: {
|
|
18640
|
-
const
|
|
18641
|
-
`).length;
|
|
18642
|
-
return `${
|
|
18643
|
-
${
|
|
18644
|
-
${
|
|
18784
|
+
const a = r ? `${t("cyan", d2)} ` : "", l = n.split(`
|
|
18785
|
+
`).length, $3 = r ? 2 : 1;
|
|
18786
|
+
return `${n}${a}${Y2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, rowPadding: l + $3, style: c2 }).join(`
|
|
18787
|
+
${a}`)}
|
|
18788
|
+
${r ? t("cyan", E2) : ""}
|
|
18645
18789
|
`;
|
|
18646
18790
|
}
|
|
18647
18791
|
}
|
|
18648
18792
|
} }).prompt();
|
|
18649
18793
|
};
|
|
18650
|
-
var
|
|
18651
|
-
var
|
|
18652
|
-
|
|
18653
|
-
`)
|
|
18654
|
-
`)
|
|
18655
|
-
|
|
18656
|
-
|
|
18657
|
-
|
|
18658
|
-
|
|
18659
|
-
switch (i) {
|
|
18794
|
+
var Ve = { light: w2("─", "-"), heavy: w2("━", "="), block: w2("█", "#") };
|
|
18795
|
+
var re = (e, i) => e.includes(`
|
|
18796
|
+
`) ? e.split(`
|
|
18797
|
+
`).map((s) => i(s)).join(`
|
|
18798
|
+
`) : i(e);
|
|
18799
|
+
var _t = (e) => {
|
|
18800
|
+
const i = (s, r) => {
|
|
18801
|
+
const u2 = s.label ?? String(s.value);
|
|
18802
|
+
switch (r) {
|
|
18660
18803
|
case "disabled":
|
|
18661
|
-
return `${
|
|
18804
|
+
return `${t("gray", H2)} ${re(u2, (n) => t("gray", n))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
|
|
18662
18805
|
case "selected":
|
|
18663
|
-
return `${
|
|
18806
|
+
return `${re(u2, (n) => t("dim", n))}`;
|
|
18664
18807
|
case "active":
|
|
18665
|
-
return `${
|
|
18808
|
+
return `${t("green", z3)} ${u2}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
|
|
18666
18809
|
case "cancelled":
|
|
18667
|
-
return `${
|
|
18810
|
+
return `${re(u2, (n) => t(["strikethrough", "dim"], n))}`;
|
|
18668
18811
|
default:
|
|
18669
|
-
return `${
|
|
18812
|
+
return `${t("dim", H2)} ${re(u2, (n) => t("dim", n))}`;
|
|
18670
18813
|
}
|
|
18671
18814
|
};
|
|
18672
|
-
return new
|
|
18673
|
-
const s =
|
|
18674
|
-
` : ""}${
|
|
18815
|
+
return new nt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
|
|
18816
|
+
const s = e.withGuide ?? u.withGuide, r = `${V2(this.state)} `, u2 = `${ye(this.state)} `, n = R(e.output, e.message, u2, r), o = `${s ? `${t("gray", d2)}
|
|
18817
|
+
` : ""}${n}
|
|
18675
18818
|
`;
|
|
18676
18819
|
switch (this.state) {
|
|
18677
18820
|
case "submit": {
|
|
18678
|
-
const
|
|
18679
|
-
return `${
|
|
18821
|
+
const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "selected"), c2);
|
|
18822
|
+
return `${o}${a}`;
|
|
18680
18823
|
}
|
|
18681
18824
|
case "cancel": {
|
|
18682
|
-
const
|
|
18683
|
-
return `${
|
|
18684
|
-
${
|
|
18825
|
+
const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "cancelled"), c2);
|
|
18826
|
+
return `${o}${a}${s ? `
|
|
18827
|
+
${t("gray", d2)}` : ""}`;
|
|
18685
18828
|
}
|
|
18686
18829
|
default: {
|
|
18687
|
-
const
|
|
18688
|
-
`).length,
|
|
18689
|
-
return `${
|
|
18690
|
-
${
|
|
18691
|
-
${
|
|
18830
|
+
const c2 = s ? `${t("cyan", d2)} ` : "", a = s ? t("cyan", E2) : "", l = o.split(`
|
|
18831
|
+
`).length, $3 = s ? 2 : 1;
|
|
18832
|
+
return `${o}${c2}${Y2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: c2.length, rowPadding: l + $3, style: (y2, p2) => i(y2, y2.disabled ? "disabled" : p2 ? "active" : "inactive") }).join(`
|
|
18833
|
+
${c2}`)}
|
|
18834
|
+
${a}
|
|
18692
18835
|
`;
|
|
18693
18836
|
}
|
|
18694
18837
|
}
|
|
18695
18838
|
} }).prompt();
|
|
18696
18839
|
};
|
|
18697
|
-
var
|
|
18698
|
-
var
|
|
18699
|
-
const
|
|
18700
|
-
` : ""}${
|
|
18701
|
-
`,
|
|
18840
|
+
var je = `${t("gray", d2)} `;
|
|
18841
|
+
var Ot = (e) => new at({ validate: e.validate, placeholder: e.placeholder, defaultValue: e.defaultValue, initialValue: e.initialValue, output: e.output, signal: e.signal, input: e.input, render() {
|
|
18842
|
+
const i = e?.withGuide ?? u.withGuide, s = `${`${i ? `${t("gray", d2)}
|
|
18843
|
+
` : ""}${V2(this.state)} `}${e.message}
|
|
18844
|
+
`, r = e.placeholder ? t("inverse", e.placeholder[0]) + t("dim", e.placeholder.slice(1)) : t(["inverse", "hidden"], "_"), u2 = this.userInput ? this.userInputWithCursor : r, n = this.value ?? "";
|
|
18702
18845
|
switch (this.state) {
|
|
18703
18846
|
case "error": {
|
|
18704
|
-
const
|
|
18847
|
+
const o = this.error ? ` ${t("yellow", this.error)}` : "", c2 = i ? `${t("yellow", d2)} ` : "", a = i ? t("yellow", E2) : "";
|
|
18705
18848
|
return `${s.trim()}
|
|
18706
|
-
${
|
|
18707
|
-
${
|
|
18849
|
+
${c2}${u2}
|
|
18850
|
+
${a}${o}
|
|
18708
18851
|
`;
|
|
18709
18852
|
}
|
|
18710
18853
|
case "submit": {
|
|
18711
|
-
const
|
|
18712
|
-
return `${s}${
|
|
18854
|
+
const o = n ? ` ${t("dim", n)}` : "", c2 = i ? t("gray", d2) : "";
|
|
18855
|
+
return `${s}${c2}${o}`;
|
|
18713
18856
|
}
|
|
18714
18857
|
case "cancel": {
|
|
18715
|
-
const
|
|
18716
|
-
return `${s}${
|
|
18717
|
-
${
|
|
18858
|
+
const o = n ? ` ${t(["strikethrough", "dim"], n)}` : "", c2 = i ? t("gray", d2) : "";
|
|
18859
|
+
return `${s}${c2}${o}${n.trim() ? `
|
|
18860
|
+
${c2}` : ""}`;
|
|
18718
18861
|
}
|
|
18719
18862
|
default: {
|
|
18720
|
-
const
|
|
18721
|
-
return `${s}${
|
|
18722
|
-
${
|
|
18863
|
+
const o = i ? `${t("cyan", d2)} ` : "", c2 = i ? t("cyan", E2) : "";
|
|
18864
|
+
return `${s}${o}${u2}
|
|
18865
|
+
${c2}
|
|
18723
18866
|
`;
|
|
18724
18867
|
}
|
|
18725
18868
|
}
|
|
@@ -19051,9 +19194,11 @@ var attachmentsConfigSchema = exports_external.object({
|
|
|
19051
19194
|
}
|
|
19052
19195
|
});
|
|
19053
19196
|
var featuresConfigSchema = exports_external.object({
|
|
19054
|
-
attachments: exports_external.boolean().describe("File attachments (requires BLOB_READ_WRITE_TOKEN)")
|
|
19197
|
+
attachments: exports_external.boolean().describe("File attachments (requires BLOB_READ_WRITE_TOKEN)"),
|
|
19198
|
+
parallelResponses: exports_external.boolean().default(true).describe("Send one message to multiple models simultaneously")
|
|
19055
19199
|
}).default({
|
|
19056
|
-
attachments: false
|
|
19200
|
+
attachments: false,
|
|
19201
|
+
parallelResponses: true
|
|
19057
19202
|
});
|
|
19058
19203
|
var authenticationConfigSchema = exports_external.object({
|
|
19059
19204
|
google: exports_external.boolean().describe("Google OAuth (requires AUTH_GOOGLE_ID + AUTH_GOOGLE_SECRET)"),
|
|
@@ -19064,6 +19209,11 @@ var authenticationConfigSchema = exports_external.object({
|
|
|
19064
19209
|
github: true,
|
|
19065
19210
|
vercel: false
|
|
19066
19211
|
});
|
|
19212
|
+
var desktopAppConfigSchema = exports_external.object({
|
|
19213
|
+
enabled: exports_external.boolean().describe("Enable Electron desktop auth/runtime integration")
|
|
19214
|
+
}).default({
|
|
19215
|
+
enabled: false
|
|
19216
|
+
});
|
|
19067
19217
|
var configSchema = exports_external.object({
|
|
19068
19218
|
appPrefix: exports_external.string().default("chatjs"),
|
|
19069
19219
|
appName: exports_external.string().default("My AI Chat"),
|
|
@@ -19117,6 +19267,7 @@ var configSchema = exports_external.object({
|
|
|
19117
19267
|
terms: { title: "Terms of Service" }
|
|
19118
19268
|
}),
|
|
19119
19269
|
authentication: authenticationConfigSchema,
|
|
19270
|
+
desktopApp: desktopAppConfigSchema,
|
|
19120
19271
|
ai: aiConfigSchema,
|
|
19121
19272
|
anonymous: anonymousConfigSchema,
|
|
19122
19273
|
attachments: attachmentsConfigSchema
|
|
@@ -19168,7 +19319,7 @@ ${spaces}]`;
|
|
|
19168
19319
|
if (entries.length === 0)
|
|
19169
19320
|
return "{}";
|
|
19170
19321
|
return `{
|
|
19171
|
-
${entries.map(([
|
|
19322
|
+
${entries.map(([k2, v]) => `${inner}${formatKey(k2)}: ${formatValue(v, indent + 1)}`).join(`,
|
|
19172
19323
|
`)},
|
|
19173
19324
|
${spaces}}`;
|
|
19174
19325
|
}
|
|
@@ -19219,6 +19370,9 @@ function buildConfigTs(input) {
|
|
|
19219
19370
|
terms: { title: "Terms of Service" }
|
|
19220
19371
|
},
|
|
19221
19372
|
authentication: input.auth,
|
|
19373
|
+
desktopApp: {
|
|
19374
|
+
enabled: input.withElectron
|
|
19375
|
+
},
|
|
19222
19376
|
ai: { gateway: input.gateway },
|
|
19223
19377
|
anonymous: {
|
|
19224
19378
|
credits: 10,
|
|
@@ -19312,10 +19466,23 @@ var authEnvRequirements = {
|
|
|
19312
19466
|
}
|
|
19313
19467
|
};
|
|
19314
19468
|
|
|
19469
|
+
// ../../apps/chat/lib/playwright-test-environment.ts
|
|
19470
|
+
function isEnabledFlag(value) {
|
|
19471
|
+
if (!value) {
|
|
19472
|
+
return false;
|
|
19473
|
+
}
|
|
19474
|
+
const normalizedValue = value.trim().toLowerCase();
|
|
19475
|
+
return !["0", "false", "no", "off"].includes(normalizedValue);
|
|
19476
|
+
}
|
|
19477
|
+
function isPlaywrightTestEnvironment(env = process.env) {
|
|
19478
|
+
return Boolean(env.PLAYWRIGHT_TEST_BASE_URL || isEnabledFlag(env.PLAYWRIGHT) || isEnabledFlag(env.CI_PLAYWRIGHT));
|
|
19479
|
+
}
|
|
19480
|
+
|
|
19315
19481
|
// ../../apps/chat/lib/env-schema.ts
|
|
19482
|
+
var isPlaywrightTestEnvironmentEnabled = isPlaywrightTestEnvironment(process.env);
|
|
19316
19483
|
var serverEnvSchema = {
|
|
19317
|
-
DATABASE_URL: exports_external.string().min(1).describe("Postgres connection string"),
|
|
19318
|
-
AUTH_SECRET: exports_external.string().min(1).describe("NextAuth.js secret for signing session tokens"),
|
|
19484
|
+
DATABASE_URL: exports_external.preprocess((value) => isPlaywrightTestEnvironmentEnabled && (value == null || value === "") ? "postgres://postgres:postgres@127.0.0.1:5432/playwright" : value, exports_external.string().min(1)).describe("Postgres connection string"),
|
|
19485
|
+
AUTH_SECRET: exports_external.preprocess((value) => isPlaywrightTestEnvironmentEnabled && (value == null || value === "") ? "playwright-test-auth-secret" : value, exports_external.string().min(1)).describe("NextAuth.js secret for signing session tokens"),
|
|
19319
19486
|
BLOB_READ_WRITE_TOKEN: exports_external.string().optional().describe("Vercel Blob storage token for file uploads"),
|
|
19320
19487
|
AUTH_GOOGLE_ID: exports_external.string().optional().describe("Google OAuth client ID"),
|
|
19321
19488
|
AUTH_GOOGLE_SECRET: exports_external.string().optional().describe("Google OAuth client secret"),
|
|
@@ -19338,7 +19505,9 @@ var serverEnvSchema = {
|
|
|
19338
19505
|
VERCEL_TEAM_ID: exports_external.string().optional().describe("Vercel team ID for sandbox (non-Vercel deployments)"),
|
|
19339
19506
|
VERCEL_PROJECT_ID: exports_external.string().optional().describe("Vercel project ID for sandbox (non-Vercel deployments)"),
|
|
19340
19507
|
VERCEL_TOKEN: exports_external.string().optional().describe("Vercel API token for sandbox (non-Vercel deployments)"),
|
|
19341
|
-
VERCEL_SANDBOX_RUNTIME: exports_external.string().optional().describe("Vercel sandbox runtime identifier"),
|
|
19508
|
+
VERCEL_SANDBOX_RUNTIME: exports_external.string().min(1).optional().describe("Legacy default Vercel sandbox runtime identifier for Python"),
|
|
19509
|
+
VERCEL_SANDBOX_RUNTIME_PYTHON: exports_external.string().min(1).optional().describe("Vercel sandbox runtime identifier for Python execution"),
|
|
19510
|
+
VERCEL_SANDBOX_RUNTIME_JAVASCRIPT: exports_external.string().min(1).optional().describe("Vercel sandbox runtime identifier for JavaScript execution"),
|
|
19342
19511
|
APP_URL: exports_external.url().optional().describe("App URL for non-Vercel deployments (full URL including https://)"),
|
|
19343
19512
|
VERCEL_URL: exports_external.string().optional().describe("Auto-set by Vercel platform")
|
|
19344
19513
|
};
|
|
@@ -19352,7 +19521,8 @@ var FEATURE_KEYS = [
|
|
|
19352
19521
|
"mcp",
|
|
19353
19522
|
"imageGeneration",
|
|
19354
19523
|
"attachments",
|
|
19355
|
-
"followupSuggestions"
|
|
19524
|
+
"followupSuggestions",
|
|
19525
|
+
"parallelResponses"
|
|
19356
19526
|
];
|
|
19357
19527
|
|
|
19358
19528
|
// src/helpers/env-checklist.ts
|
|
@@ -19427,7 +19597,8 @@ var FEATURE_DEFAULTS = {
|
|
|
19427
19597
|
mcp: false,
|
|
19428
19598
|
imageGeneration: false,
|
|
19429
19599
|
attachments: false,
|
|
19430
|
-
followupSuggestions: true
|
|
19600
|
+
followupSuggestions: true,
|
|
19601
|
+
parallelResponses: true
|
|
19431
19602
|
};
|
|
19432
19603
|
var AUTH_DEFAULTS = {
|
|
19433
19604
|
google: false,
|
|
@@ -19442,7 +19613,8 @@ var FEATURE_LABELS = {
|
|
|
19442
19613
|
mcp: "MCP Tool Servers",
|
|
19443
19614
|
imageGeneration: "Image Generation",
|
|
19444
19615
|
attachments: "File Attachments",
|
|
19445
|
-
followupSuggestions: "Follow-up Suggestions"
|
|
19616
|
+
followupSuggestions: "Follow-up Suggestions",
|
|
19617
|
+
parallelResponses: "Parallel Responses"
|
|
19446
19618
|
};
|
|
19447
19619
|
var AUTH_LABELS = {
|
|
19448
19620
|
google: "Google OAuth",
|
|
@@ -19450,8 +19622,8 @@ var AUTH_LABELS = {
|
|
|
19450
19622
|
vercel: "Vercel OAuth"
|
|
19451
19623
|
};
|
|
19452
19624
|
function handleCancel(value) {
|
|
19453
|
-
if (
|
|
19454
|
-
|
|
19625
|
+
if (q(value)) {
|
|
19626
|
+
pt("Operation cancelled.");
|
|
19455
19627
|
process.exit(1);
|
|
19456
19628
|
}
|
|
19457
19629
|
}
|
|
@@ -19461,7 +19633,7 @@ function toKebabCase(value) {
|
|
|
19461
19633
|
async function promptProjectName(targetArg, skipPrompt) {
|
|
19462
19634
|
if (skipPrompt)
|
|
19463
19635
|
return toKebabCase(targetArg ?? "my-chat-app") || "my-chat-app";
|
|
19464
|
-
const name = await
|
|
19636
|
+
const name = await Ot({
|
|
19465
19637
|
message: "What is your project named?",
|
|
19466
19638
|
initialValue: targetArg ?? "my-chat-app",
|
|
19467
19639
|
validate: (value) => {
|
|
@@ -19477,7 +19649,7 @@ async function promptGateway(skipPrompt) {
|
|
|
19477
19649
|
if (skipPrompt)
|
|
19478
19650
|
return "vercel";
|
|
19479
19651
|
const gateways = Object.keys(gatewayEnvRequirements);
|
|
19480
|
-
const gateway = await
|
|
19652
|
+
const gateway = await _t({
|
|
19481
19653
|
message: `Which ${highlighter.info("AI gateway")} would you like to use?`,
|
|
19482
19654
|
options: gateways.map((gw) => ({
|
|
19483
19655
|
value: gw,
|
|
@@ -19493,7 +19665,7 @@ async function promptFeatures(skipPrompt) {
|
|
|
19493
19665
|
if (skipPrompt)
|
|
19494
19666
|
return { ...FEATURE_DEFAULTS };
|
|
19495
19667
|
const defaultFeatures = FEATURE_KEYS.filter((key) => FEATURE_DEFAULTS[key]);
|
|
19496
|
-
const selectedFeatures = await
|
|
19668
|
+
const selectedFeatures = await yt({
|
|
19497
19669
|
message: `Which ${highlighter.info("features")} would you like to enable? ${highlighter.dim("(space to toggle, enter to submit)")}`,
|
|
19498
19670
|
options: FEATURE_KEYS.map((key) => ({
|
|
19499
19671
|
value: key,
|
|
@@ -19520,15 +19692,15 @@ async function promptAuth(skipPrompt) {
|
|
|
19520
19692
|
if (skipPrompt)
|
|
19521
19693
|
return { ...AUTH_DEFAULTS };
|
|
19522
19694
|
const providers = Object.keys(authEnvRequirements);
|
|
19523
|
-
const defaultProviders = providers.filter((
|
|
19695
|
+
const defaultProviders = providers.filter((p2) => AUTH_DEFAULTS[p2]);
|
|
19524
19696
|
let selectedProviders = [];
|
|
19525
19697
|
while (selectedProviders.length === 0) {
|
|
19526
|
-
const selected = await
|
|
19698
|
+
const selected = await yt({
|
|
19527
19699
|
message: `Which ${highlighter.info("auth providers")} would you like to enable? ${highlighter.warn("(at least one required)")} ${highlighter.dim("(space to toggle, enter to submit)")}`,
|
|
19528
|
-
options: providers.map((
|
|
19529
|
-
value:
|
|
19530
|
-
label: AUTH_LABELS[
|
|
19531
|
-
hint: authEnvRequirements[
|
|
19700
|
+
options: providers.map((p2) => ({
|
|
19701
|
+
value: p2,
|
|
19702
|
+
label: AUTH_LABELS[p2],
|
|
19703
|
+
hint: authEnvRequirements[p2].description
|
|
19532
19704
|
})),
|
|
19533
19705
|
initialValues: defaultProviders,
|
|
19534
19706
|
required: false
|
|
@@ -19544,15 +19716,28 @@ async function promptAuth(skipPrompt) {
|
|
|
19544
19716
|
github: false,
|
|
19545
19717
|
vercel: false
|
|
19546
19718
|
};
|
|
19547
|
-
for (const
|
|
19548
|
-
auth[
|
|
19719
|
+
for (const p2 of selectedProviders) {
|
|
19720
|
+
auth[p2] = true;
|
|
19549
19721
|
}
|
|
19550
19722
|
return auth;
|
|
19551
19723
|
}
|
|
19724
|
+
async function promptElectron(skipPrompt, explicitChoice) {
|
|
19725
|
+
if (typeof explicitChoice === "boolean") {
|
|
19726
|
+
return explicitChoice;
|
|
19727
|
+
}
|
|
19728
|
+
if (skipPrompt)
|
|
19729
|
+
return false;
|
|
19730
|
+
const wantsElectron = await ot2({
|
|
19731
|
+
message: `Include an ${highlighter.info("Electron")} desktop app?`,
|
|
19732
|
+
initialValue: false
|
|
19733
|
+
});
|
|
19734
|
+
handleCancel(wantsElectron);
|
|
19735
|
+
return wantsElectron;
|
|
19736
|
+
}
|
|
19552
19737
|
async function promptInstall(packageManager, skipPrompt) {
|
|
19553
19738
|
if (skipPrompt)
|
|
19554
19739
|
return true;
|
|
19555
|
-
const install = await
|
|
19740
|
+
const install = await ot2({
|
|
19556
19741
|
message: `Install dependencies with ${highlighter.info(packageManager)}?`,
|
|
19557
19742
|
initialValue: true
|
|
19558
19743
|
});
|
|
@@ -19562,7 +19747,7 @@ async function promptInstall(packageManager, skipPrompt) {
|
|
|
19562
19747
|
|
|
19563
19748
|
// src/helpers/scaffold.ts
|
|
19564
19749
|
import { existsSync } from "node:fs";
|
|
19565
|
-
import { cp, rm } from "node:fs/promises";
|
|
19750
|
+
import { cp, readFile, rm, writeFile } from "node:fs/promises";
|
|
19566
19751
|
import { dirname, join, resolve } from "node:path";
|
|
19567
19752
|
import { fileURLToPath } from "node:url";
|
|
19568
19753
|
|
|
@@ -19587,28 +19772,36 @@ ${stderr.join("")}`.trim()));
|
|
|
19587
19772
|
}
|
|
19588
19773
|
|
|
19589
19774
|
// src/helpers/scaffold.ts
|
|
19590
|
-
function findTemplateDir() {
|
|
19775
|
+
function findTemplateDir(name) {
|
|
19591
19776
|
const __dir = dirname(fileURLToPath(import.meta.url));
|
|
19592
|
-
for (const relative of [
|
|
19777
|
+
for (const relative of [`../templates/${name}`, `../../templates/${name}`]) {
|
|
19593
19778
|
const candidate = resolve(__dir, relative);
|
|
19594
19779
|
if (existsSync(candidate))
|
|
19595
19780
|
return candidate;
|
|
19596
19781
|
}
|
|
19597
|
-
throw new Error(
|
|
19782
|
+
throw new Error(`Template "${name}" not found. Run \`bun template:sync\` to generate templates.`);
|
|
19598
19783
|
}
|
|
19599
19784
|
async function scaffoldFromTemplate(destination) {
|
|
19600
|
-
const templateDir = findTemplateDir();
|
|
19785
|
+
const templateDir = findTemplateDir("chat-app");
|
|
19786
|
+
await cp(templateDir, destination, { recursive: true });
|
|
19787
|
+
}
|
|
19788
|
+
async function scaffoldElectron(projectDir, opts) {
|
|
19789
|
+
const templateDir = findTemplateDir("electron");
|
|
19790
|
+
const destination = join(projectDir, "electron");
|
|
19601
19791
|
await cp(templateDir, destination, { recursive: true });
|
|
19792
|
+
const packageJsonPath = join(destination, "package.json");
|
|
19793
|
+
const packageJson = (await readFile(packageJsonPath, "utf8")).replace("__PROJECT_NAME__-electron", `${opts.projectName}-electron`).replace("__GITHUB_OWNER__", "your-github-username").replace("__GITHUB_REPO__", opts.projectName);
|
|
19794
|
+
await writeFile(packageJsonPath, packageJson);
|
|
19602
19795
|
}
|
|
19603
19796
|
async function scaffoldFromGit(url2, destination) {
|
|
19604
19797
|
await runCommand("git", ["clone", "--depth", "1", url2, destination], process.cwd());
|
|
19605
19798
|
await rm(join(destination, ".git"), { recursive: true, force: true });
|
|
19606
19799
|
}
|
|
19607
19800
|
|
|
19608
|
-
// ../../node_modules/ora/index.js
|
|
19801
|
+
// ../../node_modules/.bun/ora@8.2.0/node_modules/ora/index.js
|
|
19609
19802
|
import process10 from "node:process";
|
|
19610
19803
|
|
|
19611
|
-
// ../../node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
19804
|
+
// ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
19612
19805
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
19613
19806
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
19614
19807
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -19785,7 +19978,7 @@ function assembleStyles() {
|
|
|
19785
19978
|
var ansiStyles = assembleStyles();
|
|
19786
19979
|
var ansi_styles_default = ansiStyles;
|
|
19787
19980
|
|
|
19788
|
-
// ../../node_modules/chalk/source/vendor/supports-color/index.js
|
|
19981
|
+
// ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
|
|
19789
19982
|
import process3 from "node:process";
|
|
19790
19983
|
import os from "node:os";
|
|
19791
19984
|
import tty from "node:tty";
|
|
@@ -19917,7 +20110,7 @@ var supportsColor = {
|
|
|
19917
20110
|
};
|
|
19918
20111
|
var supports_color_default = supportsColor;
|
|
19919
20112
|
|
|
19920
|
-
// ../../node_modules/chalk/source/utilities.js
|
|
20113
|
+
// ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/utilities.js
|
|
19921
20114
|
function stringReplaceAll(string4, substring, replacer) {
|
|
19922
20115
|
let index = string4.indexOf(substring);
|
|
19923
20116
|
if (index === -1) {
|
|
@@ -19950,7 +20143,7 @@ function stringEncaseCRLFWithFirstIndex(string4, prefix, postfix, index) {
|
|
|
19950
20143
|
return returnValue;
|
|
19951
20144
|
}
|
|
19952
20145
|
|
|
19953
|
-
// ../../node_modules/chalk/source/index.js
|
|
20146
|
+
// ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/index.js
|
|
19954
20147
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
19955
20148
|
var GENERATOR = Symbol("GENERATOR");
|
|
19956
20149
|
var STYLER = Symbol("STYLER");
|
|
@@ -20097,13 +20290,13 @@ var chalk = createChalk();
|
|
|
20097
20290
|
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
20098
20291
|
var source_default = chalk;
|
|
20099
20292
|
|
|
20100
|
-
// ../../node_modules/cli-cursor/index.js
|
|
20293
|
+
// ../../node_modules/.bun/cli-cursor@5.0.0/node_modules/cli-cursor/index.js
|
|
20101
20294
|
import process6 from "node:process";
|
|
20102
20295
|
|
|
20103
|
-
// ../../node_modules/restore-cursor/index.js
|
|
20296
|
+
// ../../node_modules/.bun/restore-cursor@5.1.0/node_modules/restore-cursor/index.js
|
|
20104
20297
|
import process5 from "node:process";
|
|
20105
20298
|
|
|
20106
|
-
// ../../node_modules/mimic-function/index.js
|
|
20299
|
+
// ../../node_modules/.bun/mimic-function@5.0.1/node_modules/mimic-function/index.js
|
|
20107
20300
|
var copyProperty = (to, from, property, ignoreNonConfigurable) => {
|
|
20108
20301
|
if (property === "length" || property === "prototype") {
|
|
20109
20302
|
return;
|
|
@@ -20149,7 +20342,7 @@ function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
|
|
|
20149
20342
|
return to;
|
|
20150
20343
|
}
|
|
20151
20344
|
|
|
20152
|
-
// ../../node_modules/onetime/index.js
|
|
20345
|
+
// ../../node_modules/.bun/onetime@7.0.0/node_modules/onetime/index.js
|
|
20153
20346
|
var calledFunctions = new WeakMap;
|
|
20154
20347
|
var onetime = (function_, options = {}) => {
|
|
20155
20348
|
if (typeof function_ !== "function") {
|
|
@@ -20180,7 +20373,7 @@ onetime.callCount = (function_) => {
|
|
|
20180
20373
|
};
|
|
20181
20374
|
var onetime_default = onetime;
|
|
20182
20375
|
|
|
20183
|
-
// ../../node_modules/signal-exit/dist/mjs/signals.js
|
|
20376
|
+
// ../../node_modules/.bun/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
20184
20377
|
var signals = [];
|
|
20185
20378
|
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
20186
20379
|
if (process.platform !== "win32") {
|
|
@@ -20190,7 +20383,7 @@ if (process.platform === "linux") {
|
|
|
20190
20383
|
signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
20191
20384
|
}
|
|
20192
20385
|
|
|
20193
|
-
// ../../node_modules/signal-exit/dist/mjs/index.js
|
|
20386
|
+
// ../../node_modules/.bun/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
20194
20387
|
var processOk = (process4) => !!process4 && typeof process4 === "object" && typeof process4.removeListener === "function" && typeof process4.emit === "function" && typeof process4.reallyExit === "function" && typeof process4.listeners === "function" && typeof process4.kill === "function" && typeof process4.pid === "number" && typeof process4.on === "function";
|
|
20195
20388
|
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
20196
20389
|
var global = globalThis;
|
|
@@ -20289,9 +20482,9 @@ class SignalExit extends SignalExitBase {
|
|
|
20289
20482
|
this.#sigListeners[sig] = () => {
|
|
20290
20483
|
const listeners = this.#process.listeners(sig);
|
|
20291
20484
|
let { count } = this.#emitter;
|
|
20292
|
-
const
|
|
20293
|
-
if (typeof
|
|
20294
|
-
count +=
|
|
20485
|
+
const p2 = process4;
|
|
20486
|
+
if (typeof p2.__signal_exit_emitter__ === "object" && typeof p2.__signal_exit_emitter__.count === "number") {
|
|
20487
|
+
count += p2.__signal_exit_emitter__.count;
|
|
20295
20488
|
}
|
|
20296
20489
|
if (listeners.length === count) {
|
|
20297
20490
|
this.unload();
|
|
@@ -20332,7 +20525,7 @@ class SignalExit extends SignalExitBase {
|
|
|
20332
20525
|
const fn = this.#sigListeners[sig];
|
|
20333
20526
|
if (fn)
|
|
20334
20527
|
this.#process.on(sig, fn);
|
|
20335
|
-
} catch (
|
|
20528
|
+
} catch (_) {}
|
|
20336
20529
|
}
|
|
20337
20530
|
this.#process.emit = (ev, ...a) => {
|
|
20338
20531
|
return this.#processEmit(ev, ...a);
|
|
@@ -20353,7 +20546,7 @@ class SignalExit extends SignalExitBase {
|
|
|
20353
20546
|
}
|
|
20354
20547
|
try {
|
|
20355
20548
|
this.#process.removeListener(sig, listener);
|
|
20356
|
-
} catch (
|
|
20549
|
+
} catch (_) {}
|
|
20357
20550
|
});
|
|
20358
20551
|
this.#process.emit = this.#originalProcessEmit;
|
|
20359
20552
|
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
@@ -20388,7 +20581,7 @@ var {
|
|
|
20388
20581
|
unload
|
|
20389
20582
|
} = signalExitWrap(processOk(process4) ? new SignalExit(process4) : new SignalExitFallback);
|
|
20390
20583
|
|
|
20391
|
-
// ../../node_modules/restore-cursor/index.js
|
|
20584
|
+
// ../../node_modules/.bun/restore-cursor@5.1.0/node_modules/restore-cursor/index.js
|
|
20392
20585
|
var terminal = process5.stderr.isTTY ? process5.stderr : process5.stdout.isTTY ? process5.stdout : undefined;
|
|
20393
20586
|
var restoreCursor = terminal ? onetime_default(() => {
|
|
20394
20587
|
onExit(() => {
|
|
@@ -20397,7 +20590,7 @@ var restoreCursor = terminal ? onetime_default(() => {
|
|
|
20397
20590
|
}) : () => {};
|
|
20398
20591
|
var restore_cursor_default = restoreCursor;
|
|
20399
20592
|
|
|
20400
|
-
// ../../node_modules/cli-cursor/index.js
|
|
20593
|
+
// ../../node_modules/.bun/cli-cursor@5.0.0/node_modules/cli-cursor/index.js
|
|
20401
20594
|
var isHidden = false;
|
|
20402
20595
|
var cliCursor = {};
|
|
20403
20596
|
cliCursor.show = (writableStream = process6.stderr) => {
|
|
@@ -20427,10 +20620,10 @@ cliCursor.toggle = (force, writableStream) => {
|
|
|
20427
20620
|
};
|
|
20428
20621
|
var cli_cursor_default = cliCursor;
|
|
20429
20622
|
|
|
20430
|
-
// ../../node_modules/ora/index.js
|
|
20623
|
+
// ../../node_modules/.bun/ora@8.2.0/node_modules/ora/index.js
|
|
20431
20624
|
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
20432
20625
|
|
|
20433
|
-
// ../../node_modules/
|
|
20626
|
+
// ../../node_modules/.bun/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js
|
|
20434
20627
|
import process7 from "node:process";
|
|
20435
20628
|
function isUnicodeSupported() {
|
|
20436
20629
|
if (process7.platform !== "win32") {
|
|
@@ -20439,7 +20632,7 @@ function isUnicodeSupported() {
|
|
|
20439
20632
|
return Boolean(process7.env.CI) || Boolean(process7.env.WT_SESSION) || Boolean(process7.env.TERMINUS_SUBLIME) || process7.env.ConEmuTask === "{cmd::Cmder}" || process7.env.TERM_PROGRAM === "Terminus-Sublime" || process7.env.TERM_PROGRAM === "vscode" || process7.env.TERM === "xterm-256color" || process7.env.TERM === "alacritty" || process7.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
20440
20633
|
}
|
|
20441
20634
|
|
|
20442
|
-
// ../../node_modules/log-symbols/index.js
|
|
20635
|
+
// ../../node_modules/.bun/log-symbols@6.0.0/node_modules/log-symbols/index.js
|
|
20443
20636
|
var main = {
|
|
20444
20637
|
info: source_default.blue("ℹ"),
|
|
20445
20638
|
success: source_default.green("✔"),
|
|
@@ -20455,7 +20648,7 @@ var fallback = {
|
|
|
20455
20648
|
var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
20456
20649
|
var log_symbols_default = logSymbols;
|
|
20457
20650
|
|
|
20458
|
-
// ../../node_modules/ansi-regex/index.js
|
|
20651
|
+
// ../../node_modules/.bun/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
20459
20652
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
20460
20653
|
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
20461
20654
|
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
@@ -20464,23 +20657,26 @@ function ansiRegex({ onlyFirst = false } = {}) {
|
|
|
20464
20657
|
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
20465
20658
|
}
|
|
20466
20659
|
|
|
20467
|
-
// ../../node_modules/strip-ansi/index.js
|
|
20660
|
+
// ../../node_modules/.bun/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
|
|
20468
20661
|
var regex = ansiRegex();
|
|
20469
20662
|
function stripAnsi(string4) {
|
|
20470
20663
|
if (typeof string4 !== "string") {
|
|
20471
20664
|
throw new TypeError(`Expected a \`string\`, got \`${typeof string4}\``);
|
|
20472
20665
|
}
|
|
20666
|
+
if (!string4.includes("\x1B") && !string4.includes("")) {
|
|
20667
|
+
return string4;
|
|
20668
|
+
}
|
|
20473
20669
|
return string4.replace(regex, "");
|
|
20474
20670
|
}
|
|
20475
20671
|
|
|
20476
|
-
// ../../node_modules/get-east-asian-width/lookup-data.js
|
|
20672
|
+
// ../../node_modules/.bun/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js
|
|
20477
20673
|
var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
|
|
20478
20674
|
var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
|
|
20479
20675
|
var halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
|
|
20480
20676
|
var narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
|
|
20481
20677
|
var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
|
|
20482
20678
|
|
|
20483
|
-
// ../../node_modules/get-east-asian-width/utilities.js
|
|
20679
|
+
// ../../node_modules/.bun/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.js
|
|
20484
20680
|
var isInRange = (ranges, codePoint) => {
|
|
20485
20681
|
let low = 0;
|
|
20486
20682
|
let high = Math.floor(ranges.length / 2) - 1;
|
|
@@ -20498,7 +20694,7 @@ var isInRange = (ranges, codePoint) => {
|
|
|
20498
20694
|
return false;
|
|
20499
20695
|
};
|
|
20500
20696
|
|
|
20501
|
-
// ../../node_modules/get-east-asian-width/lookup.js
|
|
20697
|
+
// ../../node_modules/.bun/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
|
|
20502
20698
|
var minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
20503
20699
|
var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
20504
20700
|
var minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
@@ -20527,19 +20723,19 @@ function findWideFastPathRange(ranges) {
|
|
|
20527
20723
|
}
|
|
20528
20724
|
return [fastPathStart, fastPathEnd];
|
|
20529
20725
|
}
|
|
20530
|
-
var
|
|
20726
|
+
var isAmbiguous2 = (codePoint) => {
|
|
20531
20727
|
if (codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint) {
|
|
20532
20728
|
return false;
|
|
20533
20729
|
}
|
|
20534
20730
|
return isInRange(ambiguousRanges, codePoint);
|
|
20535
20731
|
};
|
|
20536
|
-
var
|
|
20732
|
+
var isFullWidth2 = (codePoint) => {
|
|
20537
20733
|
if (codePoint < minimumFullWidthCodePoint || codePoint > maximumFullWidthCodePoint) {
|
|
20538
20734
|
return false;
|
|
20539
20735
|
}
|
|
20540
20736
|
return isInRange(fullwidthRanges, codePoint);
|
|
20541
20737
|
};
|
|
20542
|
-
var
|
|
20738
|
+
var isWide2 = (codePoint) => {
|
|
20543
20739
|
if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
|
|
20544
20740
|
return true;
|
|
20545
20741
|
}
|
|
@@ -20549,7 +20745,7 @@ var isWide = (codePoint) => {
|
|
|
20549
20745
|
return isInRange(wideRanges, codePoint);
|
|
20550
20746
|
};
|
|
20551
20747
|
|
|
20552
|
-
// ../../node_modules/get-east-asian-width/index.js
|
|
20748
|
+
// ../../node_modules/.bun/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
|
|
20553
20749
|
function validate(codePoint) {
|
|
20554
20750
|
if (!Number.isSafeInteger(codePoint)) {
|
|
20555
20751
|
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
@@ -20557,13 +20753,13 @@ function validate(codePoint) {
|
|
|
20557
20753
|
}
|
|
20558
20754
|
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
20559
20755
|
validate(codePoint);
|
|
20560
|
-
if (
|
|
20756
|
+
if (isFullWidth2(codePoint) || isWide2(codePoint) || ambiguousAsWide && isAmbiguous2(codePoint)) {
|
|
20561
20757
|
return 2;
|
|
20562
20758
|
}
|
|
20563
20759
|
return 1;
|
|
20564
20760
|
}
|
|
20565
20761
|
|
|
20566
|
-
// ../../node_modules/string-width/index.js
|
|
20762
|
+
// ../../node_modules/.bun/string-width@7.2.0/node_modules/string-width/index.js
|
|
20567
20763
|
var import_emoji_regex = __toESM(require_emoji_regex(), 1);
|
|
20568
20764
|
var segmenter = new Intl.Segmenter;
|
|
20569
20765
|
var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
@@ -20612,12 +20808,12 @@ function stringWidth(string4, options = {}) {
|
|
|
20612
20808
|
return width;
|
|
20613
20809
|
}
|
|
20614
20810
|
|
|
20615
|
-
// ../../node_modules/is-interactive/index.js
|
|
20811
|
+
// ../../node_modules/.bun/is-interactive@2.0.0/node_modules/is-interactive/index.js
|
|
20616
20812
|
function isInteractive({ stream = process.stdout } = {}) {
|
|
20617
20813
|
return Boolean(stream && stream.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env));
|
|
20618
20814
|
}
|
|
20619
20815
|
|
|
20620
|
-
// ../../node_modules/is-unicode-supported/index.js
|
|
20816
|
+
// ../../node_modules/.bun/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
20621
20817
|
import process8 from "node:process";
|
|
20622
20818
|
function isUnicodeSupported2() {
|
|
20623
20819
|
const { env: env2 } = process8;
|
|
@@ -20628,7 +20824,7 @@ function isUnicodeSupported2() {
|
|
|
20628
20824
|
return Boolean(env2.WT_SESSION) || Boolean(env2.TERMINUS_SUBLIME) || env2.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM2 === "xterm-256color" || TERM2 === "alacritty" || TERM2 === "rxvt-unicode" || TERM2 === "rxvt-unicode-256color" || env2.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
20629
20825
|
}
|
|
20630
20826
|
|
|
20631
|
-
// ../../node_modules/stdin-discarder/index.js
|
|
20827
|
+
// ../../node_modules/.bun/stdin-discarder@0.2.2/node_modules/stdin-discarder/index.js
|
|
20632
20828
|
import process9 from "node:process";
|
|
20633
20829
|
var ASCII_ETX_CODE = 3;
|
|
20634
20830
|
|
|
@@ -20674,7 +20870,7 @@ class StdinDiscarder {
|
|
|
20674
20870
|
var stdinDiscarder = new StdinDiscarder;
|
|
20675
20871
|
var stdin_discarder_default = stdinDiscarder;
|
|
20676
20872
|
|
|
20677
|
-
// ../../node_modules/ora/index.js
|
|
20873
|
+
// ../../node_modules/.bun/ora@8.2.0/node_modules/ora/index.js
|
|
20678
20874
|
var import_cli_spinners2 = __toESM(require_cli_spinners(), 1);
|
|
20679
20875
|
|
|
20680
20876
|
class Ora {
|
|
@@ -21000,9 +21196,10 @@ var createOptionsSchema = exports_external.object({
|
|
|
21000
21196
|
target: exports_external.string().optional(),
|
|
21001
21197
|
yes: exports_external.boolean(),
|
|
21002
21198
|
install: exports_external.boolean(),
|
|
21199
|
+
electron: exports_external.boolean().optional(),
|
|
21003
21200
|
fromGit: exports_external.string().optional()
|
|
21004
21201
|
});
|
|
21005
|
-
var create = new Command().name("create").description("scaffold a new ChatJS chat application").argument("[directory]", "target directory for the project").option("-y, --yes", "skip prompts and use defaults", false).option("--no-install", "skip dependency installation").option("--from-git <url>", "clone from a git repository instead of the built-in scaffold").action(async (directory, opts) => {
|
|
21202
|
+
var create = new Command().name("create").description("scaffold a new ChatJS chat application").argument("[directory]", "target directory for the project").option("-y, --yes", "skip prompts and use defaults", false).option("--no-install", "skip dependency installation").option("--electron", "include the Electron desktop app").option("--no-electron", "do not include the Electron desktop app").option("--from-git <url>", "clone from a git repository instead of the built-in scaffold").action(async (directory, opts) => {
|
|
21006
21203
|
try {
|
|
21007
21204
|
const options = createOptionsSchema.parse({
|
|
21008
21205
|
target: directory,
|
|
@@ -21010,17 +21207,18 @@ var create = new Command().name("create").description("scaffold a new ChatJS cha
|
|
|
21010
21207
|
});
|
|
21011
21208
|
const packageManager = inferPackageManager();
|
|
21012
21209
|
if (!options.yes) {
|
|
21013
|
-
|
|
21210
|
+
mt("Create ChatJS App");
|
|
21014
21211
|
}
|
|
21015
21212
|
const projectName = await promptProjectName(options.target, options.yes);
|
|
21016
21213
|
const targetDir = resolve2(process.cwd(), projectName);
|
|
21017
21214
|
await ensureTargetEmpty(targetDir);
|
|
21018
|
-
const appName = projectName.split("-").map((
|
|
21215
|
+
const appName = projectName.split("-").map((w3) => w3.charAt(0).toUpperCase() + w3.slice(1)).join(" ");
|
|
21019
21216
|
const appPrefix = projectName;
|
|
21020
21217
|
const appUrl = "http://localhost:3000";
|
|
21021
21218
|
const gateway = await promptGateway(options.yes);
|
|
21022
21219
|
const features = await promptFeatures(options.yes);
|
|
21023
21220
|
const auth = await promptAuth(options.yes);
|
|
21221
|
+
const withElectron = await promptElectron(options.yes, options.electron);
|
|
21024
21222
|
logger.break();
|
|
21025
21223
|
const scaffoldSpinner = spinner("Scaffolding project...").start();
|
|
21026
21224
|
try {
|
|
@@ -21029,6 +21227,11 @@ var create = new Command().name("create").description("scaffold a new ChatJS cha
|
|
|
21029
21227
|
} else {
|
|
21030
21228
|
await scaffoldFromTemplate(targetDir);
|
|
21031
21229
|
}
|
|
21230
|
+
if (withElectron) {
|
|
21231
|
+
await scaffoldElectron(targetDir, {
|
|
21232
|
+
projectName
|
|
21233
|
+
});
|
|
21234
|
+
}
|
|
21032
21235
|
scaffoldSpinner.succeed("Project scaffolded.");
|
|
21033
21236
|
} catch (error48) {
|
|
21034
21237
|
scaffoldSpinner.fail("Failed to scaffold project.");
|
|
@@ -21037,19 +21240,20 @@ var create = new Command().name("create").description("scaffold a new ChatJS cha
|
|
|
21037
21240
|
const configSpinner = spinner("Writing configuration...").start();
|
|
21038
21241
|
try {
|
|
21039
21242
|
const packageJsonPath = join2(targetDir, "package.json");
|
|
21040
|
-
const packageJson = JSON.parse(await
|
|
21243
|
+
const packageJson = JSON.parse(await readFile2(packageJsonPath, "utf8"));
|
|
21041
21244
|
packageJson.name = projectName;
|
|
21042
|
-
await
|
|
21245
|
+
await writeFile2(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}
|
|
21043
21246
|
`);
|
|
21044
21247
|
const configSource = buildConfigTs({
|
|
21045
21248
|
appName,
|
|
21046
21249
|
appPrefix,
|
|
21047
21250
|
appUrl,
|
|
21251
|
+
withElectron,
|
|
21048
21252
|
gateway,
|
|
21049
21253
|
features,
|
|
21050
21254
|
auth
|
|
21051
21255
|
});
|
|
21052
|
-
await
|
|
21256
|
+
await writeFile2(join2(targetDir, "chat.config.ts"), configSource);
|
|
21053
21257
|
configSpinner.succeed("Configuration written.");
|
|
21054
21258
|
} catch (error48) {
|
|
21055
21259
|
configSpinner.fail("Failed to write configuration.");
|
|
@@ -21067,7 +21271,7 @@ var create = new Command().name("create").description("scaffold a new ChatJS cha
|
|
|
21067
21271
|
}
|
|
21068
21272
|
}
|
|
21069
21273
|
const envEntries = collectEnvChecklist({ gateway, features, auth });
|
|
21070
|
-
|
|
21274
|
+
gt("Your ChatJS app is ready!");
|
|
21071
21275
|
logger.info("Next steps:");
|
|
21072
21276
|
logger.break();
|
|
21073
21277
|
logger.log(` ${highlighter.dim("1.")} cd ${highlighter.info(projectName)}`);
|
|
@@ -21080,6 +21284,11 @@ var create = new Command().name("create").description("scaffold a new ChatJS cha
|
|
|
21080
21284
|
logger.log(` ${highlighter.dim("3.")} ${highlighter.info(`${packageManager} run db:push`)}`);
|
|
21081
21285
|
logger.log(` ${highlighter.dim("4.")} ${highlighter.info(`${packageManager} run dev`)}`);
|
|
21082
21286
|
}
|
|
21287
|
+
if (withElectron) {
|
|
21288
|
+
logger.break();
|
|
21289
|
+
logger.info("Electron desktop app:");
|
|
21290
|
+
logger.log(` Run the web app first, then: ${highlighter.info(`cd electron && bun install && bun run dev`)}`);
|
|
21291
|
+
}
|
|
21083
21292
|
logger.break();
|
|
21084
21293
|
printEnvChecklist(envEntries);
|
|
21085
21294
|
logger.break();
|