@batijs/cli 0.0.572 → 0.0.580
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/boilerplates/@batijs/auth0/files/$.env.js +5 -5
- package/dist/boilerplates/@batijs/auth0/files/$TODO.md.js +3 -3
- package/dist/boilerplates/@batijs/auth0/files/$wrangler.jsonc.js +3 -3
- package/dist/boilerplates/@batijs/authjs/files/$package.json.js +3 -3
- package/dist/boilerplates/@batijs/aws/files/$README.md.js +5 -5
- package/dist/boilerplates/@batijs/aws/files/$TODO.md.js +5 -5
- package/dist/boilerplates/@batijs/aws/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/aws/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/biome/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/cloudflare/files/$TODO.md.js +5 -5
- package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/cloudflare/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/compiled/files/$package.json.js +3 -3
- package/dist/boilerplates/@batijs/compiled/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/d1/files/$TODO.md.js +5 -5
- package/dist/boilerplates/@batijs/d1/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/d1/files/$wrangler.jsonc.js +3 -3
- package/dist/boilerplates/@batijs/d1-kysely/files/$package.json.js +3 -3
- package/dist/boilerplates/@batijs/d1-sqlite/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/drizzle/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/drizzle/files/$TODO.md.js +5 -5
- package/dist/boilerplates/@batijs/drizzle/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/eslint/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/express/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/fastify/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/google-analytics/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/h3/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/hono/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/kysely/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/kysely/files/$TODO.md.js +5 -5
- package/dist/boilerplates/@batijs/kysely/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/mantine/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/mantine/files/$package.json.js +9 -9
- package/dist/boilerplates/@batijs/oxlint/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/photon/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/photon/files/$package.json.js +3 -3
- package/dist/boilerplates/@batijs/plausible.io/files/$TODO.md.js +3 -3
- package/dist/boilerplates/@batijs/pnpm/files/$pnpm-workspace.yaml.js +3 -3
- package/dist/boilerplates/@batijs/prettier/files/$package.json.js +3 -3
- package/dist/boilerplates/@batijs/prisma/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/prisma/files/$TODO.md.js +5 -5
- package/dist/boilerplates/@batijs/prisma/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/react/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/react/files/$package.json.js +11 -11
- package/dist/boilerplates/@batijs/react/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/react/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/sentry/files/$.env.js +4 -4
- package/dist/boilerplates/@batijs/sentry/files/$README.md.js +5 -5
- package/dist/boilerplates/@batijs/sentry/files/$TODO.md.js +3 -3
- package/dist/boilerplates/@batijs/sentry/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +7 -7
- package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +9 -9
- package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +5 -5
- package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/shadcn-ui/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/shared/files/$README.md.js +7 -7
- package/dist/boilerplates/@batijs/shared/files/$TODO.md.js +3 -3
- package/dist/boilerplates/@batijs/shared/files/package.json +1 -1
- package/dist/boilerplates/@batijs/shared-server/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/solid/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/solid/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/solid/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/solid/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/sqlite/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/sqlite/files/$TODO.md.js +5 -5
- package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/tailwindcss/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/telefunc/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/trpc/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/trpc/types/trpc/client.d.ts +1 -1
- package/dist/boilerplates/@batijs/ts-rest/files/$package.json.js +3 -3
- package/dist/boilerplates/@batijs/vercel/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/vercel/files/pages/$+config.ts.js +3 -3
- package/dist/boilerplates/@batijs/vue/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/vue/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/vue/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/vue/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +6 -6
- package/dist/{chunk-I2653DTQ.js → chunk-O3FMMPWU.js} +67694 -67406
- package/dist/index.js +286 -381
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -3,14 +3,14 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
Cst,
|
|
7
|
+
JBs,
|
|
8
|
+
bir,
|
|
8
9
|
export_which,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from "./chunk-I2653DTQ.js";
|
|
10
|
+
fhe,
|
|
11
|
+
o_s,
|
|
12
|
+
s_s
|
|
13
|
+
} from "./chunk-O3FMMPWU.js";
|
|
14
14
|
import "./chunk-IAWYWZSL.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
@@ -206,8 +206,8 @@ async function mergeDts({
|
|
|
206
206
|
filepath,
|
|
207
207
|
meta
|
|
208
208
|
}) {
|
|
209
|
-
const previousAst =
|
|
210
|
-
const currentAst =
|
|
209
|
+
const previousAst = fhe(previousContent);
|
|
210
|
+
const currentAst = fhe(fileContent);
|
|
211
211
|
for (const imp of previousAst.imports.$items) {
|
|
212
212
|
currentAst.imports[imp.local] = imp;
|
|
213
213
|
}
|
|
@@ -224,7 +224,7 @@ async function mergeDts({
|
|
|
224
224
|
currentAst.$ast.body.splice(index, 0, node);
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
const res = await
|
|
227
|
+
const res = await s_s(currentAst.generate().code, meta, {
|
|
228
228
|
filepath
|
|
229
229
|
});
|
|
230
230
|
return clearExports(res.code, meta);
|
|
@@ -248,7 +248,7 @@ async function executeOperationFile(op, {
|
|
|
248
248
|
}) {
|
|
249
249
|
const code = await readFile(op.sourceAbsolute, { encoding: "utf-8" });
|
|
250
250
|
const filepath = relative(op.source, op.sourceAbsolute);
|
|
251
|
-
const result = await
|
|
251
|
+
const result = await s_s(code, meta, {
|
|
252
252
|
filepath
|
|
253
253
|
});
|
|
254
254
|
let fileContent = result.code;
|
|
@@ -332,7 +332,7 @@ async function transformFileAfterExec(filepath, fileContent) {
|
|
|
332
332
|
case ".js":
|
|
333
333
|
case ".tsx":
|
|
334
334
|
case ".jsx":
|
|
335
|
-
return
|
|
335
|
+
return Cst(fileContent, {
|
|
336
336
|
filepath
|
|
337
337
|
});
|
|
338
338
|
case ".env":
|
|
@@ -1270,7 +1270,7 @@ function execRules(fts, rulesMessages2) {
|
|
|
1270
1270
|
return messages;
|
|
1271
1271
|
}
|
|
1272
1272
|
|
|
1273
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1273
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/key.js
|
|
1274
1274
|
var isUpKey = (key, keybindings = []) => (
|
|
1275
1275
|
// The up key
|
|
1276
1276
|
key.name === "up" || // Vim keybinding: hjkl keys map to left/down/up/right
|
|
@@ -1287,7 +1287,7 @@ var isBackspaceKey = (key) => key.name === "backspace";
|
|
|
1287
1287
|
var isNumberKey = (key) => "1234567890".includes(key.name);
|
|
1288
1288
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
1289
1289
|
|
|
1290
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1290
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/errors.js
|
|
1291
1291
|
var AbortPromptError = class extends Error {
|
|
1292
1292
|
name = "AbortPromptError";
|
|
1293
1293
|
message = "Prompt was aborted";
|
|
@@ -1310,10 +1310,10 @@ var ValidationError = class extends Error {
|
|
|
1310
1310
|
name = "ValidationError";
|
|
1311
1311
|
};
|
|
1312
1312
|
|
|
1313
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1313
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
1314
1314
|
import { AsyncResource as AsyncResource2 } from "async_hooks";
|
|
1315
1315
|
|
|
1316
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1316
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/hook-engine.js
|
|
1317
1317
|
import { AsyncLocalStorage, AsyncResource } from "async_hooks";
|
|
1318
1318
|
var hookStorage = new AsyncLocalStorage();
|
|
1319
1319
|
function createStore(rl) {
|
|
@@ -1419,7 +1419,7 @@ var effectScheduler = {
|
|
|
1419
1419
|
}
|
|
1420
1420
|
};
|
|
1421
1421
|
|
|
1422
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1422
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
1423
1423
|
function useState(defaultValue) {
|
|
1424
1424
|
return withPointer((pointer) => {
|
|
1425
1425
|
const setState = AsyncResource2.bind(function setState2(newValue) {
|
|
@@ -1437,7 +1437,7 @@ function useState(defaultValue) {
|
|
|
1437
1437
|
});
|
|
1438
1438
|
}
|
|
1439
1439
|
|
|
1440
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1440
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/use-effect.js
|
|
1441
1441
|
function useEffect(cb, depArray) {
|
|
1442
1442
|
withPointer((pointer) => {
|
|
1443
1443
|
const oldDeps = pointer.get();
|
|
@@ -1449,7 +1449,7 @@ function useEffect(cb, depArray) {
|
|
|
1449
1449
|
});
|
|
1450
1450
|
}
|
|
1451
1451
|
|
|
1452
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1452
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/theme.js
|
|
1453
1453
|
import { styleText } from "util";
|
|
1454
1454
|
|
|
1455
1455
|
// ../../node_modules/.pnpm/@inquirer+figures@2.0.3/node_modules/@inquirer/figures/dist/index.js
|
|
@@ -1744,7 +1744,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
|
1744
1744
|
var dist_default = figures;
|
|
1745
1745
|
var replacements = Object.entries(specialMainSymbols);
|
|
1746
1746
|
|
|
1747
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1747
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/theme.js
|
|
1748
1748
|
var defaultTheme = {
|
|
1749
1749
|
prefix: {
|
|
1750
1750
|
idle: styleText("blue", "?"),
|
|
@@ -1765,7 +1765,7 @@ var defaultTheme = {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
};
|
|
1767
1767
|
|
|
1768
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1768
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/make-theme.js
|
|
1769
1769
|
function isPlainObject(value) {
|
|
1770
1770
|
if (typeof value !== "object" || value === null)
|
|
1771
1771
|
return false;
|
|
@@ -1793,7 +1793,7 @@ function makeTheme(...themes) {
|
|
|
1793
1793
|
return deepMerge(...themesToMerge);
|
|
1794
1794
|
}
|
|
1795
1795
|
|
|
1796
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1796
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/use-prefix.js
|
|
1797
1797
|
function usePrefix({ status = "idle", theme }) {
|
|
1798
1798
|
const [showLoader, setShowLoader] = useState(false);
|
|
1799
1799
|
const [tick, setTick] = useState(0);
|
|
@@ -1824,7 +1824,7 @@ function usePrefix({ status = "idle", theme }) {
|
|
|
1824
1824
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
1825
1825
|
}
|
|
1826
1826
|
|
|
1827
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1827
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/use-memo.js
|
|
1828
1828
|
function useMemo(fn, dependencies) {
|
|
1829
1829
|
return withPointer((pointer) => {
|
|
1830
1830
|
const prev = pointer.get();
|
|
@@ -1837,12 +1837,12 @@ function useMemo(fn, dependencies) {
|
|
|
1837
1837
|
});
|
|
1838
1838
|
}
|
|
1839
1839
|
|
|
1840
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1840
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/use-ref.js
|
|
1841
1841
|
function useRef(val) {
|
|
1842
1842
|
return useState({ current: val })[0];
|
|
1843
1843
|
}
|
|
1844
1844
|
|
|
1845
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1845
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/use-keypress.js
|
|
1846
1846
|
function useKeypress(userHandler) {
|
|
1847
1847
|
const signal = useRef(userHandler);
|
|
1848
1848
|
signal.current = userHandler;
|
|
@@ -1861,322 +1861,195 @@ function useKeypress(userHandler) {
|
|
|
1861
1861
|
}, []);
|
|
1862
1862
|
}
|
|
1863
1863
|
|
|
1864
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
1864
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/utils.js
|
|
1865
1865
|
var import_cli_width = __toESM(require_cli_width(), 1);
|
|
1866
1866
|
|
|
1867
|
-
// ../../node_modules/.pnpm/
|
|
1868
|
-
|
|
1869
|
-
const
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
1881
|
-
}
|
|
1882
|
-
return string.replace(regex, "");
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1885
|
-
// ../../node_modules/.pnpm/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/lookup.js
|
|
1886
|
-
function isAmbiguous(x) {
|
|
1887
|
-
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;
|
|
1888
|
-
}
|
|
1889
|
-
function isFullWidth(x) {
|
|
1867
|
+
// ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
|
|
1868
|
+
var getCodePointsLength = /* @__PURE__ */ (() => {
|
|
1869
|
+
const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
1870
|
+
return (input) => {
|
|
1871
|
+
let surrogatePairsNr = 0;
|
|
1872
|
+
SURROGATE_PAIR_RE.lastIndex = 0;
|
|
1873
|
+
while (SURROGATE_PAIR_RE.test(input)) {
|
|
1874
|
+
surrogatePairsNr += 1;
|
|
1875
|
+
}
|
|
1876
|
+
return input.length - surrogatePairsNr;
|
|
1877
|
+
};
|
|
1878
|
+
})();
|
|
1879
|
+
var isFullWidth = (x) => {
|
|
1890
1880
|
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
|
-
return x
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
// ../../node_modules/.pnpm/get-east-asian-width@1.4.0/node_modules/get-east-asian-width/index.js
|
|
1897
|
-
function validate(codePoint) {
|
|
1898
|
-
if (!Number.isSafeInteger(codePoint)) {
|
|
1899
|
-
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
1903
|
-
validate(codePoint);
|
|
1904
|
-
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
1905
|
-
return 2;
|
|
1906
|
-
}
|
|
1907
|
-
return 1;
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
// ../../node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs
|
|
1911
|
-
var emoji_regex_default = () => {
|
|
1912
|
-
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;
|
|
1881
|
+
};
|
|
1882
|
+
var isWideNotCJKTNotEmoji = (x) => {
|
|
1883
|
+
return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || 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 >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
1913
1884
|
};
|
|
1914
1885
|
|
|
1915
|
-
// ../../node_modules/.pnpm/string-width@
|
|
1916
|
-
var
|
|
1917
|
-
var
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1886
|
+
// ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
|
|
1887
|
+
var ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
|
|
1888
|
+
var CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
1889
|
+
var CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
|
|
1890
|
+
var TAB_RE = /\t{1,1000}/y;
|
|
1891
|
+
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;
|
|
1892
|
+
var LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
|
|
1893
|
+
var MODIFIER_RE = /\p{M}+/gu;
|
|
1894
|
+
var NO_TRUNCATION = { limit: Infinity, ellipsis: "" };
|
|
1895
|
+
var getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {
|
|
1896
|
+
const LIMIT = truncationOptions.limit ?? Infinity;
|
|
1897
|
+
const ELLIPSIS = truncationOptions.ellipsis ?? "";
|
|
1898
|
+
const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
|
|
1899
|
+
const ANSI_WIDTH = 0;
|
|
1900
|
+
const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
|
|
1901
|
+
const TAB_WIDTH = widthOptions.tabWidth ?? 8;
|
|
1902
|
+
const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
|
|
1903
|
+
const FULL_WIDTH_WIDTH = 2;
|
|
1904
|
+
const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
|
|
1905
|
+
const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
|
|
1906
|
+
const PARSE_BLOCKS = [
|
|
1907
|
+
[LATIN_RE, REGULAR_WIDTH],
|
|
1908
|
+
[ANSI_RE, ANSI_WIDTH],
|
|
1909
|
+
[CONTROL_RE, CONTROL_WIDTH],
|
|
1910
|
+
[TAB_RE, TAB_WIDTH],
|
|
1911
|
+
[EMOJI_RE, EMOJI_WIDTH],
|
|
1912
|
+
[CJKT_WIDE_RE, WIDE_WIDTH]
|
|
1913
|
+
];
|
|
1914
|
+
let indexPrev = 0;
|
|
1915
|
+
let index = 0;
|
|
1916
|
+
let length = input.length;
|
|
1917
|
+
let lengthExtra = 0;
|
|
1918
|
+
let truncationEnabled = false;
|
|
1919
|
+
let truncationIndex = length;
|
|
1920
|
+
let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH);
|
|
1921
|
+
let unmatchedStart = 0;
|
|
1922
|
+
let unmatchedEnd = 0;
|
|
1932
1923
|
let width = 0;
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
continue;
|
|
1947
|
-
}
|
|
1948
|
-
if (codePoint >= 65024 && codePoint <= 65039) {
|
|
1949
|
-
continue;
|
|
1950
|
-
}
|
|
1951
|
-
if (defaultIgnorableCodePointRegex.test(character)) {
|
|
1952
|
-
continue;
|
|
1953
|
-
}
|
|
1954
|
-
if (emoji_regex_default().test(character)) {
|
|
1955
|
-
width += 2;
|
|
1956
|
-
continue;
|
|
1957
|
-
}
|
|
1958
|
-
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
1959
|
-
}
|
|
1960
|
-
return width;
|
|
1961
|
-
}
|
|
1962
|
-
|
|
1963
|
-
// ../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
|
|
1964
|
-
var ANSI_BACKGROUND_OFFSET = 10;
|
|
1965
|
-
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
1966
|
-
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
1967
|
-
var wrapAnsi16m = (offset = 0) => (red2, green2, blue2) => `\x1B[${38 + offset};2;${red2};${green2};${blue2}m`;
|
|
1968
|
-
var styles = {
|
|
1969
|
-
modifier: {
|
|
1970
|
-
reset: [0, 0],
|
|
1971
|
-
// 21 isn't widely supported and 22 does the same thing
|
|
1972
|
-
bold: [1, 22],
|
|
1973
|
-
dim: [2, 22],
|
|
1974
|
-
italic: [3, 23],
|
|
1975
|
-
underline: [4, 24],
|
|
1976
|
-
overline: [53, 55],
|
|
1977
|
-
inverse: [7, 27],
|
|
1978
|
-
hidden: [8, 28],
|
|
1979
|
-
strikethrough: [9, 29]
|
|
1980
|
-
},
|
|
1981
|
-
color: {
|
|
1982
|
-
black: [30, 39],
|
|
1983
|
-
red: [31, 39],
|
|
1984
|
-
green: [32, 39],
|
|
1985
|
-
yellow: [33, 39],
|
|
1986
|
-
blue: [34, 39],
|
|
1987
|
-
magenta: [35, 39],
|
|
1988
|
-
cyan: [36, 39],
|
|
1989
|
-
white: [37, 39],
|
|
1990
|
-
// Bright color
|
|
1991
|
-
blackBright: [90, 39],
|
|
1992
|
-
gray: [90, 39],
|
|
1993
|
-
// Alias of `blackBright`
|
|
1994
|
-
grey: [90, 39],
|
|
1995
|
-
// Alias of `blackBright`
|
|
1996
|
-
redBright: [91, 39],
|
|
1997
|
-
greenBright: [92, 39],
|
|
1998
|
-
yellowBright: [93, 39],
|
|
1999
|
-
blueBright: [94, 39],
|
|
2000
|
-
magentaBright: [95, 39],
|
|
2001
|
-
cyanBright: [96, 39],
|
|
2002
|
-
whiteBright: [97, 39]
|
|
2003
|
-
},
|
|
2004
|
-
bgColor: {
|
|
2005
|
-
bgBlack: [40, 49],
|
|
2006
|
-
bgRed: [41, 49],
|
|
2007
|
-
bgGreen: [42, 49],
|
|
2008
|
-
bgYellow: [43, 49],
|
|
2009
|
-
bgBlue: [44, 49],
|
|
2010
|
-
bgMagenta: [45, 49],
|
|
2011
|
-
bgCyan: [46, 49],
|
|
2012
|
-
bgWhite: [47, 49],
|
|
2013
|
-
// Bright color
|
|
2014
|
-
bgBlackBright: [100, 49],
|
|
2015
|
-
bgGray: [100, 49],
|
|
2016
|
-
// Alias of `bgBlackBright`
|
|
2017
|
-
bgGrey: [100, 49],
|
|
2018
|
-
// Alias of `bgBlackBright`
|
|
2019
|
-
bgRedBright: [101, 49],
|
|
2020
|
-
bgGreenBright: [102, 49],
|
|
2021
|
-
bgYellowBright: [103, 49],
|
|
2022
|
-
bgBlueBright: [104, 49],
|
|
2023
|
-
bgMagentaBright: [105, 49],
|
|
2024
|
-
bgCyanBright: [106, 49],
|
|
2025
|
-
bgWhiteBright: [107, 49]
|
|
2026
|
-
}
|
|
2027
|
-
};
|
|
2028
|
-
var modifierNames = Object.keys(styles.modifier);
|
|
2029
|
-
var foregroundColorNames = Object.keys(styles.color);
|
|
2030
|
-
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
2031
|
-
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
2032
|
-
function assembleStyles() {
|
|
2033
|
-
const codes = /* @__PURE__ */ new Map();
|
|
2034
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
2035
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
2036
|
-
styles[styleName] = {
|
|
2037
|
-
open: `\x1B[${style[0]}m`,
|
|
2038
|
-
close: `\x1B[${style[1]}m`
|
|
2039
|
-
};
|
|
2040
|
-
group[styleName] = styles[styleName];
|
|
2041
|
-
codes.set(style[0], style[1]);
|
|
2042
|
-
}
|
|
2043
|
-
Object.defineProperty(styles, groupName, {
|
|
2044
|
-
value: group,
|
|
2045
|
-
enumerable: false
|
|
2046
|
-
});
|
|
2047
|
-
}
|
|
2048
|
-
Object.defineProperty(styles, "codes", {
|
|
2049
|
-
value: codes,
|
|
2050
|
-
enumerable: false
|
|
2051
|
-
});
|
|
2052
|
-
styles.color.close = "\x1B[39m";
|
|
2053
|
-
styles.bgColor.close = "\x1B[49m";
|
|
2054
|
-
styles.color.ansi = wrapAnsi16();
|
|
2055
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
2056
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
2057
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
2058
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
2059
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
2060
|
-
Object.defineProperties(styles, {
|
|
2061
|
-
rgbToAnsi256: {
|
|
2062
|
-
value(red2, green2, blue2) {
|
|
2063
|
-
if (red2 === green2 && green2 === blue2) {
|
|
2064
|
-
if (red2 < 8) {
|
|
2065
|
-
return 16;
|
|
2066
|
-
}
|
|
2067
|
-
if (red2 > 248) {
|
|
2068
|
-
return 231;
|
|
2069
|
-
}
|
|
2070
|
-
return Math.round((red2 - 8) / 247 * 24) + 232;
|
|
2071
|
-
}
|
|
2072
|
-
return 16 + 36 * Math.round(red2 / 255 * 5) + 6 * Math.round(green2 / 255 * 5) + Math.round(blue2 / 255 * 5);
|
|
2073
|
-
},
|
|
2074
|
-
enumerable: false
|
|
2075
|
-
},
|
|
2076
|
-
hexToRgb: {
|
|
2077
|
-
value(hex) {
|
|
2078
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
2079
|
-
if (!matches) {
|
|
2080
|
-
return [0, 0, 0];
|
|
2081
|
-
}
|
|
2082
|
-
let [colorString] = matches;
|
|
2083
|
-
if (colorString.length === 3) {
|
|
2084
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
2085
|
-
}
|
|
2086
|
-
const integer = Number.parseInt(colorString, 16);
|
|
2087
|
-
return [
|
|
2088
|
-
/* eslint-disable no-bitwise */
|
|
2089
|
-
integer >> 16 & 255,
|
|
2090
|
-
integer >> 8 & 255,
|
|
2091
|
-
integer & 255
|
|
2092
|
-
/* eslint-enable no-bitwise */
|
|
2093
|
-
];
|
|
2094
|
-
},
|
|
2095
|
-
enumerable: false
|
|
2096
|
-
},
|
|
2097
|
-
hexToAnsi256: {
|
|
2098
|
-
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
2099
|
-
enumerable: false
|
|
2100
|
-
},
|
|
2101
|
-
ansi256ToAnsi: {
|
|
2102
|
-
value(code) {
|
|
2103
|
-
if (code < 8) {
|
|
2104
|
-
return 30 + code;
|
|
1924
|
+
let widthExtra = 0;
|
|
1925
|
+
outer: while (true) {
|
|
1926
|
+
if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
|
|
1927
|
+
const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
|
|
1928
|
+
lengthExtra = 0;
|
|
1929
|
+
for (const char of unmatched.replaceAll(MODIFIER_RE, "")) {
|
|
1930
|
+
const codePoint = char.codePointAt(0) || 0;
|
|
1931
|
+
if (isFullWidth(codePoint)) {
|
|
1932
|
+
widthExtra = FULL_WIDTH_WIDTH;
|
|
1933
|
+
} else if (isWideNotCJKTNotEmoji(codePoint)) {
|
|
1934
|
+
widthExtra = WIDE_WIDTH;
|
|
1935
|
+
} else {
|
|
1936
|
+
widthExtra = REGULAR_WIDTH;
|
|
2105
1937
|
}
|
|
2106
|
-
if (
|
|
2107
|
-
|
|
1938
|
+
if (width + widthExtra > truncationLimit) {
|
|
1939
|
+
truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
|
|
2108
1940
|
}
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
if (code >= 232) {
|
|
2113
|
-
red2 = ((code - 232) * 10 + 8) / 255;
|
|
2114
|
-
green2 = red2;
|
|
2115
|
-
blue2 = red2;
|
|
2116
|
-
} else {
|
|
2117
|
-
code -= 16;
|
|
2118
|
-
const remainder = code % 36;
|
|
2119
|
-
red2 = Math.floor(code / 36) / 5;
|
|
2120
|
-
green2 = Math.floor(remainder / 6) / 5;
|
|
2121
|
-
blue2 = remainder % 6 / 5;
|
|
1941
|
+
if (width + widthExtra > LIMIT) {
|
|
1942
|
+
truncationEnabled = true;
|
|
1943
|
+
break outer;
|
|
2122
1944
|
}
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
1945
|
+
lengthExtra += char.length;
|
|
1946
|
+
width += widthExtra;
|
|
1947
|
+
}
|
|
1948
|
+
unmatchedStart = unmatchedEnd = 0;
|
|
1949
|
+
}
|
|
1950
|
+
if (index >= length) {
|
|
1951
|
+
break outer;
|
|
1952
|
+
}
|
|
1953
|
+
for (let i = 0, l = PARSE_BLOCKS.length; i < l; i++) {
|
|
1954
|
+
const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i];
|
|
1955
|
+
BLOCK_RE.lastIndex = index;
|
|
1956
|
+
if (BLOCK_RE.test(input)) {
|
|
1957
|
+
lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
|
|
1958
|
+
widthExtra = lengthExtra * BLOCK_WIDTH;
|
|
1959
|
+
if (width + widthExtra > truncationLimit) {
|
|
1960
|
+
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
|
|
2126
1961
|
}
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
1962
|
+
if (width + widthExtra > LIMIT) {
|
|
1963
|
+
truncationEnabled = true;
|
|
1964
|
+
break outer;
|
|
2130
1965
|
}
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
enumerable: false
|
|
2138
|
-
},
|
|
2139
|
-
hexToAnsi: {
|
|
2140
|
-
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
2141
|
-
enumerable: false
|
|
1966
|
+
width += widthExtra;
|
|
1967
|
+
unmatchedStart = indexPrev;
|
|
1968
|
+
unmatchedEnd = index;
|
|
1969
|
+
index = indexPrev = BLOCK_RE.lastIndex;
|
|
1970
|
+
continue outer;
|
|
1971
|
+
}
|
|
2142
1972
|
}
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
1973
|
+
index += 1;
|
|
1974
|
+
}
|
|
1975
|
+
return {
|
|
1976
|
+
width: truncationEnabled ? truncationLimit : width,
|
|
1977
|
+
index: truncationEnabled ? truncationIndex : length,
|
|
1978
|
+
truncated: truncationEnabled,
|
|
1979
|
+
ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
|
|
1980
|
+
};
|
|
1981
|
+
};
|
|
1982
|
+
var dist_default2 = getStringTruncatedWidth;
|
|
2148
1983
|
|
|
2149
|
-
// ../../node_modules/.pnpm/
|
|
2150
|
-
var
|
|
2151
|
-
|
|
2152
|
-
"
|
|
2153
|
-
|
|
1984
|
+
// ../../node_modules/.pnpm/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
|
|
1985
|
+
var NO_TRUNCATION2 = {
|
|
1986
|
+
limit: Infinity,
|
|
1987
|
+
ellipsis: "",
|
|
1988
|
+
ellipsisWidth: 0
|
|
1989
|
+
};
|
|
1990
|
+
var fastStringWidth = (input, options = {}) => {
|
|
1991
|
+
return dist_default2(input, NO_TRUNCATION2, options).width;
|
|
1992
|
+
};
|
|
1993
|
+
var dist_default3 = fastStringWidth;
|
|
1994
|
+
|
|
1995
|
+
// ../../node_modules/.pnpm/fast-wrap-ansi@0.2.0/node_modules/fast-wrap-ansi/lib/main.js
|
|
1996
|
+
var ESC = "\x1B";
|
|
1997
|
+
var CSI = "\x9B";
|
|
2154
1998
|
var END_CODE = 39;
|
|
2155
1999
|
var ANSI_ESCAPE_BELL = "\x07";
|
|
2156
2000
|
var ANSI_CSI = "[";
|
|
2157
2001
|
var ANSI_OSC = "]";
|
|
2158
2002
|
var ANSI_SGR_TERMINATOR = "m";
|
|
2159
2003
|
var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
2160
|
-
var
|
|
2161
|
-
var
|
|
2162
|
-
|
|
2004
|
+
var GROUP_REGEX = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, "y");
|
|
2005
|
+
var getClosingCode = (openingCode) => {
|
|
2006
|
+
if (openingCode >= 30 && openingCode <= 37)
|
|
2007
|
+
return 39;
|
|
2008
|
+
if (openingCode >= 90 && openingCode <= 97)
|
|
2009
|
+
return 39;
|
|
2010
|
+
if (openingCode >= 40 && openingCode <= 47)
|
|
2011
|
+
return 49;
|
|
2012
|
+
if (openingCode >= 100 && openingCode <= 107)
|
|
2013
|
+
return 49;
|
|
2014
|
+
if (openingCode === 1 || openingCode === 2)
|
|
2015
|
+
return 22;
|
|
2016
|
+
if (openingCode === 3)
|
|
2017
|
+
return 23;
|
|
2018
|
+
if (openingCode === 4)
|
|
2019
|
+
return 24;
|
|
2020
|
+
if (openingCode === 7)
|
|
2021
|
+
return 27;
|
|
2022
|
+
if (openingCode === 8)
|
|
2023
|
+
return 28;
|
|
2024
|
+
if (openingCode === 9)
|
|
2025
|
+
return 29;
|
|
2026
|
+
if (openingCode === 0)
|
|
2027
|
+
return 0;
|
|
2028
|
+
return void 0;
|
|
2029
|
+
};
|
|
2030
|
+
var wrapAnsiCode = (code) => `${ESC}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
2031
|
+
var wrapAnsiHyperlink = (url) => `${ESC}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
|
|
2163
2032
|
var wrapWord = (rows, word, columns) => {
|
|
2164
|
-
const characters = [
|
|
2033
|
+
const characters = word[Symbol.iterator]();
|
|
2165
2034
|
let isInsideEscape = false;
|
|
2166
2035
|
let isInsideLinkEscape = false;
|
|
2167
|
-
let
|
|
2168
|
-
|
|
2169
|
-
|
|
2036
|
+
let lastRow = rows.at(-1);
|
|
2037
|
+
let visible = lastRow === void 0 ? 0 : dist_default3(lastRow);
|
|
2038
|
+
let currentCharacter = characters.next();
|
|
2039
|
+
let nextCharacter = characters.next();
|
|
2040
|
+
let rawCharacterIndex = 0;
|
|
2041
|
+
while (!currentCharacter.done) {
|
|
2042
|
+
const character = currentCharacter.value;
|
|
2043
|
+
const characterLength = dist_default3(character);
|
|
2170
2044
|
if (visible + characterLength <= columns) {
|
|
2171
2045
|
rows[rows.length - 1] += character;
|
|
2172
2046
|
} else {
|
|
2173
2047
|
rows.push(character);
|
|
2174
2048
|
visible = 0;
|
|
2175
2049
|
}
|
|
2176
|
-
if (
|
|
2050
|
+
if (character === ESC || character === CSI) {
|
|
2177
2051
|
isInsideEscape = true;
|
|
2178
|
-
|
|
2179
|
-
isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
|
|
2052
|
+
isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK, rawCharacterIndex + 1);
|
|
2180
2053
|
}
|
|
2181
2054
|
if (isInsideEscape) {
|
|
2182
2055
|
if (isInsideLinkEscape) {
|
|
@@ -2187,23 +2060,27 @@ var wrapWord = (rows, word, columns) => {
|
|
|
2187
2060
|
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
2188
2061
|
isInsideEscape = false;
|
|
2189
2062
|
}
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2063
|
+
} else {
|
|
2064
|
+
visible += characterLength;
|
|
2065
|
+
if (visible === columns && !nextCharacter.done) {
|
|
2066
|
+
rows.push("");
|
|
2067
|
+
visible = 0;
|
|
2068
|
+
}
|
|
2196
2069
|
}
|
|
2070
|
+
currentCharacter = nextCharacter;
|
|
2071
|
+
nextCharacter = characters.next();
|
|
2072
|
+
rawCharacterIndex += character.length;
|
|
2197
2073
|
}
|
|
2198
|
-
|
|
2074
|
+
lastRow = rows.at(-1);
|
|
2075
|
+
if (!visible && lastRow !== void 0 && lastRow.length && rows.length > 1) {
|
|
2199
2076
|
rows[rows.length - 2] += rows.pop();
|
|
2200
2077
|
}
|
|
2201
2078
|
};
|
|
2202
2079
|
var stringVisibleTrimSpacesRight = (string) => {
|
|
2203
2080
|
const words = string.split(" ");
|
|
2204
2081
|
let last = words.length;
|
|
2205
|
-
while (last
|
|
2206
|
-
if (
|
|
2082
|
+
while (last) {
|
|
2083
|
+
if (dist_default3(words[last - 1])) {
|
|
2207
2084
|
break;
|
|
2208
2085
|
}
|
|
2209
2086
|
last--;
|
|
@@ -2220,88 +2097,110 @@ var exec = (string, columns, options = {}) => {
|
|
|
2220
2097
|
let returnValue = "";
|
|
2221
2098
|
let escapeCode;
|
|
2222
2099
|
let escapeUrl;
|
|
2223
|
-
const
|
|
2100
|
+
const words = string.split(" ");
|
|
2224
2101
|
let rows = [""];
|
|
2225
|
-
|
|
2102
|
+
let rowLength = 0;
|
|
2103
|
+
for (let index = 0; index < words.length; index++) {
|
|
2104
|
+
const word = words[index];
|
|
2226
2105
|
if (options.trim !== false) {
|
|
2227
|
-
|
|
2106
|
+
const row = rows.at(-1) ?? "";
|
|
2107
|
+
const trimmed = row.trimStart();
|
|
2108
|
+
if (row.length !== trimmed.length) {
|
|
2109
|
+
rows[rows.length - 1] = trimmed;
|
|
2110
|
+
rowLength = dist_default3(trimmed);
|
|
2111
|
+
}
|
|
2228
2112
|
}
|
|
2229
|
-
let rowLength = stringWidth(rows.at(-1));
|
|
2230
2113
|
if (index !== 0) {
|
|
2231
2114
|
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
2232
2115
|
rows.push("");
|
|
2233
2116
|
rowLength = 0;
|
|
2234
2117
|
}
|
|
2235
|
-
if (rowLength
|
|
2118
|
+
if (rowLength || options.trim === false) {
|
|
2236
2119
|
rows[rows.length - 1] += " ";
|
|
2237
2120
|
rowLength++;
|
|
2238
2121
|
}
|
|
2239
2122
|
}
|
|
2240
|
-
|
|
2123
|
+
const wordLength = dist_default3(word);
|
|
2124
|
+
if (options.hard && wordLength > columns) {
|
|
2241
2125
|
const remainingColumns = columns - rowLength;
|
|
2242
|
-
const breaksStartingThisLine = 1 + Math.floor((
|
|
2243
|
-
const breaksStartingNextLine = Math.floor((
|
|
2126
|
+
const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);
|
|
2127
|
+
const breaksStartingNextLine = Math.floor((wordLength - 1) / columns);
|
|
2244
2128
|
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
2245
2129
|
rows.push("");
|
|
2246
2130
|
}
|
|
2247
2131
|
wrapWord(rows, word, columns);
|
|
2132
|
+
rowLength = dist_default3(rows.at(-1) ?? "");
|
|
2248
2133
|
continue;
|
|
2249
2134
|
}
|
|
2250
|
-
if (rowLength +
|
|
2135
|
+
if (rowLength + wordLength > columns && rowLength && wordLength) {
|
|
2251
2136
|
if (options.wordWrap === false && rowLength < columns) {
|
|
2252
2137
|
wrapWord(rows, word, columns);
|
|
2138
|
+
rowLength = dist_default3(rows.at(-1) ?? "");
|
|
2253
2139
|
continue;
|
|
2254
2140
|
}
|
|
2255
2141
|
rows.push("");
|
|
2142
|
+
rowLength = 0;
|
|
2256
2143
|
}
|
|
2257
|
-
if (rowLength +
|
|
2144
|
+
if (rowLength + wordLength > columns && options.wordWrap === false) {
|
|
2258
2145
|
wrapWord(rows, word, columns);
|
|
2146
|
+
rowLength = dist_default3(rows.at(-1) ?? "");
|
|
2259
2147
|
continue;
|
|
2260
2148
|
}
|
|
2261
2149
|
rows[rows.length - 1] += word;
|
|
2150
|
+
rowLength += wordLength;
|
|
2262
2151
|
}
|
|
2263
2152
|
if (options.trim !== false) {
|
|
2264
2153
|
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
2265
2154
|
}
|
|
2266
2155
|
const preString = rows.join("\n");
|
|
2267
|
-
|
|
2268
|
-
let
|
|
2269
|
-
|
|
2156
|
+
let inSurrogate = false;
|
|
2157
|
+
for (let i = 0; i < preString.length; i++) {
|
|
2158
|
+
const character = preString[i];
|
|
2270
2159
|
returnValue += character;
|
|
2271
|
-
if (
|
|
2272
|
-
|
|
2273
|
-
if (
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2160
|
+
if (!inSurrogate) {
|
|
2161
|
+
inSurrogate = character >= "\uD800" && character <= "\uDBFF";
|
|
2162
|
+
if (inSurrogate) {
|
|
2163
|
+
continue;
|
|
2164
|
+
}
|
|
2165
|
+
} else {
|
|
2166
|
+
inSurrogate = false;
|
|
2167
|
+
}
|
|
2168
|
+
if (character === ESC || character === CSI) {
|
|
2169
|
+
GROUP_REGEX.lastIndex = i + 1;
|
|
2170
|
+
const groupsResult = GROUP_REGEX.exec(preString);
|
|
2171
|
+
const groups = groupsResult?.groups;
|
|
2172
|
+
if (groups?.code !== void 0) {
|
|
2173
|
+
const code = Number.parseFloat(groups.code);
|
|
2174
|
+
escapeCode = code === END_CODE ? void 0 : code;
|
|
2175
|
+
} else if (groups?.uri !== void 0) {
|
|
2277
2176
|
escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
2278
2177
|
}
|
|
2279
2178
|
}
|
|
2280
|
-
|
|
2281
|
-
if (pre[index + 1] === "\n") {
|
|
2179
|
+
if (preString[i + 1] === "\n") {
|
|
2282
2180
|
if (escapeUrl) {
|
|
2283
2181
|
returnValue += wrapAnsiHyperlink("");
|
|
2284
2182
|
}
|
|
2285
|
-
|
|
2286
|
-
|
|
2183
|
+
const closingCode = escapeCode ? getClosingCode(escapeCode) : void 0;
|
|
2184
|
+
if (escapeCode && closingCode) {
|
|
2185
|
+
returnValue += wrapAnsiCode(closingCode);
|
|
2287
2186
|
}
|
|
2288
2187
|
} else if (character === "\n") {
|
|
2289
|
-
if (escapeCode &&
|
|
2188
|
+
if (escapeCode && getClosingCode(escapeCode)) {
|
|
2290
2189
|
returnValue += wrapAnsiCode(escapeCode);
|
|
2291
2190
|
}
|
|
2292
2191
|
if (escapeUrl) {
|
|
2293
2192
|
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
2294
2193
|
}
|
|
2295
2194
|
}
|
|
2296
|
-
preStringIndex += character.length;
|
|
2297
2195
|
}
|
|
2298
2196
|
return returnValue;
|
|
2299
2197
|
};
|
|
2198
|
+
var CRLF_OR_LF = /\r?\n/;
|
|
2300
2199
|
function wrapAnsi(string, columns, options) {
|
|
2301
|
-
return String(string).normalize().
|
|
2200
|
+
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
|
|
2302
2201
|
}
|
|
2303
2202
|
|
|
2304
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
2203
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/utils.js
|
|
2305
2204
|
function breakLines(content, width) {
|
|
2306
2205
|
return content.split("\n").flatMap((line) => wrapAnsi(line, width, { trim: false, hard: true }).split("\n").map((str) => str.trimEnd())).join("\n");
|
|
2307
2206
|
}
|
|
@@ -2309,7 +2208,7 @@ function readlineWidth() {
|
|
|
2309
2208
|
return (0, import_cli_width.default)({ defaultWidth: 80, output: readline().output });
|
|
2310
2209
|
}
|
|
2311
2210
|
|
|
2312
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
2211
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
|
|
2313
2212
|
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
2314
2213
|
const state = useRef({
|
|
2315
2214
|
lastPointer: active,
|
|
@@ -2398,7 +2297,7 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
|
2398
2297
|
return pageBuffer.filter((line) => typeof line === "string").join("\n");
|
|
2399
2298
|
}
|
|
2400
2299
|
|
|
2401
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
2300
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
2402
2301
|
var import_mute_stream = __toESM(require_lib(), 1);
|
|
2403
2302
|
import * as readline2 from "readline";
|
|
2404
2303
|
import { AsyncResource as AsyncResource3 } from "async_hooks";
|
|
@@ -2654,26 +2553,26 @@ var {
|
|
|
2654
2553
|
unload
|
|
2655
2554
|
} = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback());
|
|
2656
2555
|
|
|
2657
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
2556
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
2658
2557
|
import { stripVTControlCharacters } from "util";
|
|
2659
2558
|
|
|
2660
2559
|
// ../../node_modules/.pnpm/@inquirer+ansi@2.0.3/node_modules/@inquirer/ansi/dist/index.js
|
|
2661
|
-
var
|
|
2662
|
-
var cursorLeft =
|
|
2663
|
-
var cursorHide =
|
|
2664
|
-
var cursorShow =
|
|
2665
|
-
var cursorUp = (rows = 1) => rows > 0 ? `${
|
|
2666
|
-
var cursorDown = (rows = 1) => rows > 0 ? `${
|
|
2560
|
+
var ESC2 = "\x1B[";
|
|
2561
|
+
var cursorLeft = ESC2 + "G";
|
|
2562
|
+
var cursorHide = ESC2 + "?25l";
|
|
2563
|
+
var cursorShow = ESC2 + "?25h";
|
|
2564
|
+
var cursorUp = (rows = 1) => rows > 0 ? `${ESC2}${rows}A` : "";
|
|
2565
|
+
var cursorDown = (rows = 1) => rows > 0 ? `${ESC2}${rows}B` : "";
|
|
2667
2566
|
var cursorTo = (x, y) => {
|
|
2668
2567
|
if (typeof y === "number" && !Number.isNaN(y)) {
|
|
2669
|
-
return `${
|
|
2568
|
+
return `${ESC2}${y + 1};${x + 1}H`;
|
|
2670
2569
|
}
|
|
2671
|
-
return `${
|
|
2570
|
+
return `${ESC2}${x + 1}G`;
|
|
2672
2571
|
};
|
|
2673
|
-
var eraseLine =
|
|
2572
|
+
var eraseLine = ESC2 + "2K";
|
|
2674
2573
|
var eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
|
|
2675
2574
|
|
|
2676
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
2575
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
2677
2576
|
var height = (content) => content.split("\n").length;
|
|
2678
2577
|
var lastLine = (content) => content.split("\n").pop() ?? "";
|
|
2679
2578
|
var ScreenManager = class {
|
|
@@ -2733,7 +2632,7 @@ var ScreenManager = class {
|
|
|
2733
2632
|
}
|
|
2734
2633
|
};
|
|
2735
2634
|
|
|
2736
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
2635
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
|
|
2737
2636
|
var PromisePolyfill = class extends Promise {
|
|
2738
2637
|
// Available starting from Node 22
|
|
2739
2638
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
|
|
@@ -2748,7 +2647,7 @@ var PromisePolyfill = class extends Promise {
|
|
|
2748
2647
|
}
|
|
2749
2648
|
};
|
|
2750
2649
|
|
|
2751
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
2650
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
2752
2651
|
function getCallSites() {
|
|
2753
2652
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
2754
2653
|
let result = [];
|
|
@@ -2835,7 +2734,7 @@ function createPrompt(view) {
|
|
|
2835
2734
|
return prompt;
|
|
2836
2735
|
}
|
|
2837
2736
|
|
|
2838
|
-
// ../../node_modules/.pnpm/@inquirer+core@11.1.
|
|
2737
|
+
// ../../node_modules/.pnpm/@inquirer+core@11.1.3_@types+node@20.19.30/node_modules/@inquirer/core/dist/lib/Separator.js
|
|
2839
2738
|
import { styleText as styleText2 } from "util";
|
|
2840
2739
|
var Separator = class {
|
|
2841
2740
|
separator = styleText2("dim", Array.from({ length: 15 }).join(dist_default.line));
|
|
@@ -2850,7 +2749,7 @@ var Separator = class {
|
|
|
2850
2749
|
}
|
|
2851
2750
|
};
|
|
2852
2751
|
|
|
2853
|
-
// ../../node_modules/.pnpm/@inquirer+select@5.0.
|
|
2752
|
+
// ../../node_modules/.pnpm/@inquirer+select@5.0.6_@types+node@20.19.30/node_modules/@inquirer/select/dist/index.js
|
|
2854
2753
|
import { styleText as styleText3 } from "util";
|
|
2855
2754
|
var selectTheme = {
|
|
2856
2755
|
icon: { cursor: dist_default.pointer },
|
|
@@ -2891,7 +2790,7 @@ function normalizeChoices(choices2) {
|
|
|
2891
2790
|
return normalizedChoice;
|
|
2892
2791
|
});
|
|
2893
2792
|
}
|
|
2894
|
-
var
|
|
2793
|
+
var dist_default4 = createPrompt((config, done) => {
|
|
2895
2794
|
const { loop = true, pageSize = 7 } = config;
|
|
2896
2795
|
const theme = makeTheme(selectTheme, config.theme);
|
|
2897
2796
|
const { keybindings } = theme;
|
|
@@ -3006,7 +2905,7 @@ var dist_default2 = createPrompt((config, done) => {
|
|
|
3006
2905
|
return `${lines}${cursorHide}`;
|
|
3007
2906
|
});
|
|
3008
2907
|
|
|
3009
|
-
// ../../node_modules/.pnpm/citty@0.2.
|
|
2908
|
+
// ../../node_modules/.pnpm/citty@0.2.1/node_modules/citty/dist/_chunks/libs/scule.mjs
|
|
3010
2909
|
var NUMBER_CHAR_RE = /\d/;
|
|
3011
2910
|
var STR_SPLITTERS = [
|
|
3012
2911
|
"-",
|
|
@@ -3072,7 +2971,7 @@ function kebabCase(str, joiner) {
|
|
|
3072
2971
|
return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => p.toLowerCase()).join(joiner ?? "-") : "";
|
|
3073
2972
|
}
|
|
3074
2973
|
|
|
3075
|
-
// ../../node_modules/.pnpm/citty@0.2.
|
|
2974
|
+
// ../../node_modules/.pnpm/citty@0.2.1/node_modules/citty/dist/index.mjs
|
|
3076
2975
|
import { parseArgs as parseArgs$1 } from "util";
|
|
3077
2976
|
function toArray(val) {
|
|
3078
2977
|
if (Array.isArray(val)) return val;
|
|
@@ -3163,7 +3062,13 @@ function parseRawArgs(args = [], opts = {}) {
|
|
|
3163
3062
|
const out = { _: [] };
|
|
3164
3063
|
out._ = parsed.positionals;
|
|
3165
3064
|
for (const [key, value] of Object.entries(parsed.values)) out[key] = value;
|
|
3166
|
-
for (const [name] of Object.entries(negatedFlags))
|
|
3065
|
+
for (const [name] of Object.entries(negatedFlags)) {
|
|
3066
|
+
out[name] = false;
|
|
3067
|
+
const mainName = aliasToMain.get(name);
|
|
3068
|
+
if (mainName) out[mainName] = false;
|
|
3069
|
+
const aliases = mainToAliases.get(name);
|
|
3070
|
+
if (aliases) for (const alias of aliases) out[alias] = false;
|
|
3071
|
+
}
|
|
3167
3072
|
for (const [alias, main2] of aliasToMain.entries()) {
|
|
3168
3073
|
if (out[alias] !== void 0 && out[main2] === void 0) out[main2] = out[alias];
|
|
3169
3074
|
if (out[main2] !== void 0 && out[alias] === void 0) out[alias] = out[main2];
|
|
@@ -3577,7 +3482,7 @@ function kebabCase2(str, joiner) {
|
|
|
3577
3482
|
// package.json
|
|
3578
3483
|
var package_default = {
|
|
3579
3484
|
name: "@batijs/cli",
|
|
3580
|
-
version: "0.0.
|
|
3485
|
+
version: "0.0.580",
|
|
3581
3486
|
type: "module",
|
|
3582
3487
|
scripts: {
|
|
3583
3488
|
"check-types": "tsc --noEmit",
|
|
@@ -3592,12 +3497,12 @@ var package_default = {
|
|
|
3592
3497
|
devDependencies: {
|
|
3593
3498
|
"@batijs/build": "workspace:*",
|
|
3594
3499
|
"@batijs/compile": "workspace:*",
|
|
3595
|
-
"@inquirer/prompts": "^8.2.
|
|
3500
|
+
"@inquirer/prompts": "^8.2.1",
|
|
3596
3501
|
"@types/node": "^20.19.30",
|
|
3597
3502
|
"@types/which": "^3.0.4",
|
|
3598
|
-
citty: "^0.2.
|
|
3503
|
+
citty: "^0.2.1",
|
|
3599
3504
|
colorette: "^2.0.20",
|
|
3600
|
-
esbuild: "^0.27.
|
|
3505
|
+
esbuild: "^0.27.3",
|
|
3601
3506
|
execa: "^9.6.1",
|
|
3602
3507
|
scule: "^1.3.0",
|
|
3603
3508
|
tsup: "^8.5.1",
|
|
@@ -3675,7 +3580,7 @@ printInit();
|
|
|
3675
3580
|
var __filename = fileURLToPath(import.meta.url);
|
|
3676
3581
|
var __dirname = dirname(__filename);
|
|
3677
3582
|
var isWin2 = process.platform === "win32";
|
|
3678
|
-
var pm =
|
|
3583
|
+
var pm = o_s();
|
|
3679
3584
|
function boilerplatesDir() {
|
|
3680
3585
|
if (existsSync2(join(__dirname, "boilerplates", "boilerplates.json"))) {
|
|
3681
3586
|
return join(__dirname, "boilerplates");
|
|
@@ -3786,7 +3691,7 @@ async function hasRemainingSteps(dist) {
|
|
|
3786
3691
|
}
|
|
3787
3692
|
}
|
|
3788
3693
|
function printInit() {
|
|
3789
|
-
const v =
|
|
3694
|
+
const v = JBs();
|
|
3790
3695
|
const version = v.semver.at(-1);
|
|
3791
3696
|
assert(version);
|
|
3792
3697
|
console.log(`
|
|
@@ -3795,8 +3700,8 @@ function printInit() {
|
|
|
3795
3700
|
}
|
|
3796
3701
|
async function printOK(dist, flags2, nextSteps) {
|
|
3797
3702
|
const indent = 1;
|
|
3798
|
-
const list =
|
|
3799
|
-
const cmd =
|
|
3703
|
+
const list = bir("-", gray2, indent);
|
|
3704
|
+
const cmd = bir("$", gray2, indent);
|
|
3800
3705
|
const distPretty = prettifyDist(dist);
|
|
3801
3706
|
console.log(`${green(`${bold2("\u2713")} Project created: ${bold2(distPretty)}`)}`);
|
|
3802
3707
|
console.log(list("Vike"));
|
|
@@ -3814,11 +3719,11 @@ ${bold2("Next steps:")}`);
|
|
|
3814
3719
|
if (step.type === "command") {
|
|
3815
3720
|
console.log(cmd(step.step));
|
|
3816
3721
|
} else {
|
|
3817
|
-
console.log(
|
|
3722
|
+
console.log(bir("\u2022\uFE0F", gray2, indent)(step.step));
|
|
3818
3723
|
}
|
|
3819
3724
|
}
|
|
3820
3725
|
} else if (await hasRemainingSteps(dist)) {
|
|
3821
|
-
console.log(
|
|
3726
|
+
console.log(bir("\u2022\uFE0F", gray2, indent)(`Check ${bold2("TODO.md")} for remaining steps`));
|
|
3822
3727
|
}
|
|
3823
3728
|
console.log(cmd(`${pm.run} dev`));
|
|
3824
3729
|
console.log("\nHappy coding! \u{1F680}\n");
|
|
@@ -3944,7 +3849,7 @@ async function checkFlagsIncludesUiFramework(flags2) {
|
|
|
3944
3849
|
);
|
|
3945
3850
|
}
|
|
3946
3851
|
if (!flagsUiFound) {
|
|
3947
|
-
const ui = await
|
|
3852
|
+
const ui = await dist_default4({
|
|
3948
3853
|
theme: {
|
|
3949
3854
|
style: {
|
|
3950
3855
|
highlight(t) {
|
|
@@ -3964,7 +3869,7 @@ async function checkFlagsIncludesUiFramework(flags2) {
|
|
|
3964
3869
|
}
|
|
3965
3870
|
function checkFlagsExist(flags2) {
|
|
3966
3871
|
const inValidOptions = flags2.reduce((acc, flag) => {
|
|
3967
|
-
if (!Object.hasOwn(defaultDef, flag) && !features.some((f) => f.flag === flag || kebabCase2(f.flag) === kebabCase2(flag))) {
|
|
3872
|
+
if (!Object.hasOwn(defaultDef, flag) && !Object.hasOwn(defaultDef, kebabCase2(flag)) && !features.some((f) => f.flag === flag || kebabCase2(f.flag) === kebabCase2(flag))) {
|
|
3968
3873
|
acc.push(flag);
|
|
3969
3874
|
}
|
|
3970
3875
|
return acc;
|