@yamada-ui/cli 2.0.0-dev-20250813085050 → 2.0.0-dev-20250814094224
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 +900 -1527
- package/package.json +14 -4
package/dist/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { Command } from "commander";
|
|
3
|
-
import * as c$1 from "picocolors";
|
|
4
|
-
import c from "picocolors";
|
|
5
|
-
import dns from "dns";
|
|
6
|
-
import fs, { existsSync, realpathSync } from "fs";
|
|
7
|
-
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
8
|
-
import { Readable } from "node:stream";
|
|
9
|
-
import { pipeline } from "node:stream/promises";
|
|
10
|
-
import ora from "ora";
|
|
11
|
-
import path from "path";
|
|
12
|
-
import { t } from "tar";
|
|
13
|
-
import { NewLineKind, ScriptTarget, createPrinter, createSourceFile, factory, isImportDeclaration, isNamedImports, transform, visitEachChild, visitNode } from "typescript";
|
|
14
2
|
import checkNode from "cli-check-node";
|
|
15
3
|
import unhandledError from "cli-handle-unhandled";
|
|
4
|
+
import { Command } from "commander";
|
|
5
|
+
import c from "picocolors";
|
|
16
6
|
import process$1, { env } from "node:process";
|
|
17
7
|
import { spawn } from "node:child_process";
|
|
18
8
|
import { fileURLToPath } from "node:url";
|
|
19
|
-
import path
|
|
9
|
+
import path from "node:path";
|
|
20
10
|
import { format, promisify } from "node:util";
|
|
21
11
|
import os from "node:os";
|
|
12
|
+
import { existsSync, realpathSync } from "fs";
|
|
22
13
|
import os$1 from "os";
|
|
23
|
-
import
|
|
14
|
+
import path$1 from "path";
|
|
15
|
+
import fs from "node:fs";
|
|
24
16
|
import tty from "node:tty";
|
|
17
|
+
import boxen from "boxen";
|
|
18
|
+
import ora from "ora";
|
|
19
|
+
import prompts from "prompts";
|
|
20
|
+
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
21
|
+
import { execSync } from "child_process";
|
|
22
|
+
import { getObject, isArray, isObject, isString, omitObject } from "@yamada-ui/utils";
|
|
25
23
|
import { build } from "esbuild";
|
|
26
24
|
import nodeEval from "node-eval";
|
|
27
25
|
import { Script } from "vm";
|
|
28
|
-
import
|
|
29
|
-
import
|
|
26
|
+
import "validate-npm-package-name";
|
|
27
|
+
import YAML from "yamljs";
|
|
28
|
+
import { format as format$1, resolveConfig, resolveConfigFile } from "prettier";
|
|
29
|
+
import { ESLint } from "eslint";
|
|
30
30
|
|
|
31
31
|
//#region rolldown:runtime
|
|
32
32
|
var __create = Object.create;
|
|
@@ -57,18 +57,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
57
57
|
}) : target, mod));
|
|
58
58
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
59
59
|
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region src/utils/assertion.ts
|
|
62
|
-
function isString(value) {
|
|
63
|
-
return Object.prototype.toString.call(value) === "[object String]";
|
|
64
|
-
}
|
|
65
|
-
function isObject(value) {
|
|
66
|
-
return value !== null && (typeof value === "object" || typeof value === "function") && !isArray(value);
|
|
67
|
-
}
|
|
68
|
-
function isArray(value) {
|
|
69
|
-
return Array.isArray(value);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
60
|
//#endregion
|
|
73
61
|
//#region ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
|
|
74
62
|
var require_polyfills$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js": ((exports, module) => {
|
|
@@ -606,7 +594,7 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
|
606
594
|
};
|
|
607
595
|
return go$readdir(path$9, options, cb);
|
|
608
596
|
function fs$readdirCallback(path$10, options$1, cb$1, startTime) {
|
|
609
|
-
return function(err, files) {
|
|
597
|
+
return function(err, files$1) {
|
|
610
598
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue$1([
|
|
611
599
|
go$readdir,
|
|
612
600
|
[
|
|
@@ -619,8 +607,8 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
|
619
607
|
Date.now()
|
|
620
608
|
]);
|
|
621
609
|
else {
|
|
622
|
-
if (files && files.sort) files.sort();
|
|
623
|
-
if (typeof cb$1 === "function") cb$1.call(this, err, files);
|
|
610
|
+
if (files$1 && files$1.sort) files$1.sort();
|
|
611
|
+
if (typeof cb$1 === "function") cb$1.call(this, err, files$1);
|
|
624
612
|
}
|
|
625
613
|
};
|
|
626
614
|
}
|
|
@@ -794,10 +782,10 @@ var require_graceful_fs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
|
794
782
|
//#region ../../node_modules/.pnpm/xdg-basedir@5.1.0/node_modules/xdg-basedir/index.js
|
|
795
783
|
const homeDirectory = os$1.homedir();
|
|
796
784
|
const { env: env$2 } = process;
|
|
797
|
-
const xdgData = env$2.XDG_DATA_HOME || (homeDirectory ? path.join(homeDirectory, ".local", "share") : void 0);
|
|
798
|
-
const xdgConfig = env$2.XDG_CONFIG_HOME || (homeDirectory ? path.join(homeDirectory, ".config") : void 0);
|
|
799
|
-
const xdgState = env$2.XDG_STATE_HOME || (homeDirectory ? path.join(homeDirectory, ".local", "state") : void 0);
|
|
800
|
-
const xdgCache = env$2.XDG_CACHE_HOME || (homeDirectory ? path.join(homeDirectory, ".cache") : void 0);
|
|
785
|
+
const xdgData = env$2.XDG_DATA_HOME || (homeDirectory ? path$1.join(homeDirectory, ".local", "share") : void 0);
|
|
786
|
+
const xdgConfig = env$2.XDG_CONFIG_HOME || (homeDirectory ? path$1.join(homeDirectory, ".config") : void 0);
|
|
787
|
+
const xdgState = env$2.XDG_STATE_HOME || (homeDirectory ? path$1.join(homeDirectory, ".local", "state") : void 0);
|
|
788
|
+
const xdgCache = env$2.XDG_CACHE_HOME || (homeDirectory ? path$1.join(homeDirectory, ".cache") : void 0);
|
|
801
789
|
const xdgRuntime = env$2.XDG_RUNTIME_DIR || void 0;
|
|
802
790
|
const xdgDataDirectories = (env$2.XDG_DATA_DIRS || "/usr/local/share/:/usr/share/").split(":");
|
|
803
791
|
if (xdgData) xdgDataDirectories.unshift(xdgData);
|
|
@@ -945,41 +933,41 @@ const retryifySync = (fn, isRetriableError) => {
|
|
|
945
933
|
//#region ../../node_modules/.pnpm/stubborn-fs@1.2.5/node_modules/stubborn-fs/dist/index.js
|
|
946
934
|
const FS = {
|
|
947
935
|
attempt: {
|
|
948
|
-
chmod: attemptifyAsync(promisify(fs
|
|
949
|
-
chown: attemptifyAsync(promisify(fs
|
|
950
|
-
close: attemptifyAsync(promisify(fs
|
|
951
|
-
fsync: attemptifyAsync(promisify(fs
|
|
952
|
-
mkdir: attemptifyAsync(promisify(fs
|
|
953
|
-
realpath: attemptifyAsync(promisify(fs
|
|
954
|
-
stat: attemptifyAsync(promisify(fs
|
|
955
|
-
unlink: attemptifyAsync(promisify(fs
|
|
956
|
-
chmodSync: attemptifySync(fs
|
|
957
|
-
chownSync: attemptifySync(fs
|
|
958
|
-
closeSync: attemptifySync(fs
|
|
959
|
-
existsSync: attemptifySync(fs
|
|
960
|
-
fsyncSync: attemptifySync(fs
|
|
961
|
-
mkdirSync: attemptifySync(fs
|
|
962
|
-
realpathSync: attemptifySync(fs
|
|
963
|
-
statSync: attemptifySync(fs
|
|
964
|
-
unlinkSync: attemptifySync(fs
|
|
936
|
+
chmod: attemptifyAsync(promisify(fs.chmod), handlers_default.onChangeError),
|
|
937
|
+
chown: attemptifyAsync(promisify(fs.chown), handlers_default.onChangeError),
|
|
938
|
+
close: attemptifyAsync(promisify(fs.close), NOOP),
|
|
939
|
+
fsync: attemptifyAsync(promisify(fs.fsync), NOOP),
|
|
940
|
+
mkdir: attemptifyAsync(promisify(fs.mkdir), NOOP),
|
|
941
|
+
realpath: attemptifyAsync(promisify(fs.realpath), NOOP),
|
|
942
|
+
stat: attemptifyAsync(promisify(fs.stat), NOOP),
|
|
943
|
+
unlink: attemptifyAsync(promisify(fs.unlink), NOOP),
|
|
944
|
+
chmodSync: attemptifySync(fs.chmodSync, handlers_default.onChangeError),
|
|
945
|
+
chownSync: attemptifySync(fs.chownSync, handlers_default.onChangeError),
|
|
946
|
+
closeSync: attemptifySync(fs.closeSync, NOOP),
|
|
947
|
+
existsSync: attemptifySync(fs.existsSync, NOOP),
|
|
948
|
+
fsyncSync: attemptifySync(fs.fsync, NOOP),
|
|
949
|
+
mkdirSync: attemptifySync(fs.mkdirSync, NOOP),
|
|
950
|
+
realpathSync: attemptifySync(fs.realpathSync, NOOP),
|
|
951
|
+
statSync: attemptifySync(fs.statSync, NOOP),
|
|
952
|
+
unlinkSync: attemptifySync(fs.unlinkSync, NOOP)
|
|
965
953
|
},
|
|
966
954
|
retry: {
|
|
967
|
-
close: retryifyAsync(promisify(fs
|
|
968
|
-
fsync: retryifyAsync(promisify(fs
|
|
969
|
-
open: retryifyAsync(promisify(fs
|
|
970
|
-
readFile: retryifyAsync(promisify(fs
|
|
971
|
-
rename: retryifyAsync(promisify(fs
|
|
972
|
-
stat: retryifyAsync(promisify(fs
|
|
973
|
-
write: retryifyAsync(promisify(fs
|
|
974
|
-
writeFile: retryifyAsync(promisify(fs
|
|
975
|
-
closeSync: retryifySync(fs
|
|
976
|
-
fsyncSync: retryifySync(fs
|
|
977
|
-
openSync: retryifySync(fs
|
|
978
|
-
readFileSync: retryifySync(fs
|
|
979
|
-
renameSync: retryifySync(fs
|
|
980
|
-
statSync: retryifySync(fs
|
|
981
|
-
writeSync: retryifySync(fs
|
|
982
|
-
writeFileSync: retryifySync(fs
|
|
955
|
+
close: retryifyAsync(promisify(fs.close), handlers_default.isRetriableError),
|
|
956
|
+
fsync: retryifyAsync(promisify(fs.fsync), handlers_default.isRetriableError),
|
|
957
|
+
open: retryifyAsync(promisify(fs.open), handlers_default.isRetriableError),
|
|
958
|
+
readFile: retryifyAsync(promisify(fs.readFile), handlers_default.isRetriableError),
|
|
959
|
+
rename: retryifyAsync(promisify(fs.rename), handlers_default.isRetriableError),
|
|
960
|
+
stat: retryifyAsync(promisify(fs.stat), handlers_default.isRetriableError),
|
|
961
|
+
write: retryifyAsync(promisify(fs.write), handlers_default.isRetriableError),
|
|
962
|
+
writeFile: retryifyAsync(promisify(fs.writeFile), handlers_default.isRetriableError),
|
|
963
|
+
closeSync: retryifySync(fs.closeSync, handlers_default.isRetriableError),
|
|
964
|
+
fsyncSync: retryifySync(fs.fsyncSync, handlers_default.isRetriableError),
|
|
965
|
+
openSync: retryifySync(fs.openSync, handlers_default.isRetriableError),
|
|
966
|
+
readFileSync: retryifySync(fs.readFileSync, handlers_default.isRetriableError),
|
|
967
|
+
renameSync: retryifySync(fs.renameSync, handlers_default.isRetriableError),
|
|
968
|
+
statSync: retryifySync(fs.statSync, handlers_default.isRetriableError),
|
|
969
|
+
writeSync: retryifySync(fs.writeSync, handlers_default.isRetriableError),
|
|
970
|
+
writeFileSync: retryifySync(fs.writeFileSync, handlers_default.isRetriableError)
|
|
983
971
|
}
|
|
984
972
|
};
|
|
985
973
|
var dist_default = FS;
|
|
@@ -1095,7 +1083,7 @@ const Temp = {
|
|
|
1095
1083
|
for (const filePath in Temp.store) Temp.purgeSync(filePath);
|
|
1096
1084
|
},
|
|
1097
1085
|
truncate: (filePath) => {
|
|
1098
|
-
const basename = path
|
|
1086
|
+
const basename = path.basename(filePath);
|
|
1099
1087
|
if (basename.length <= LIMIT_BASENAME_LENGTH) return filePath;
|
|
1100
1088
|
const truncable = /^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(basename);
|
|
1101
1089
|
if (!truncable) return filePath;
|
|
@@ -1133,7 +1121,7 @@ function writeFileSync(filePath, data, options = DEFAULT_WRITE_OPTIONS) {
|
|
|
1133
1121
|
}
|
|
1134
1122
|
}
|
|
1135
1123
|
if (!filePathExists) {
|
|
1136
|
-
const parentPath = path
|
|
1124
|
+
const parentPath = path.dirname(filePath);
|
|
1137
1125
|
dist_default.attempt.mkdirSync(parentPath, {
|
|
1138
1126
|
mode: DEFAULT_FOLDER_MODE,
|
|
1139
1127
|
recursive: true
|
|
@@ -1167,8 +1155,8 @@ function writeFileSync(filePath, data, options = DEFAULT_WRITE_OPTIONS) {
|
|
|
1167
1155
|
//#endregion
|
|
1168
1156
|
//#region ../../node_modules/.pnpm/dot-prop@9.0.0/node_modules/dot-prop/index.js
|
|
1169
1157
|
const isObject$2 = (value) => {
|
|
1170
|
-
const type = typeof value;
|
|
1171
|
-
return value !== null && (type === "object" || type === "function");
|
|
1158
|
+
const type$1 = typeof value;
|
|
1159
|
+
return value !== null && (type$1 === "object" || type$1 === "function");
|
|
1172
1160
|
};
|
|
1173
1161
|
const disallowedKeys = new Set([
|
|
1174
1162
|
"__proto__",
|
|
@@ -1321,9 +1309,9 @@ function hasProperty(object, path$9) {
|
|
|
1321
1309
|
//#region ../../node_modules/.pnpm/configstore@7.0.0/node_modules/configstore/index.js
|
|
1322
1310
|
var import_graceful_fs = /* @__PURE__ */ __toESM(require_graceful_fs$1(), 1);
|
|
1323
1311
|
function getConfigDirectory(id, globalConfigPath) {
|
|
1324
|
-
const pathPrefix = globalConfigPath ? path
|
|
1325
|
-
const configDirectory = xdgConfig ?? import_graceful_fs.default.mkdtempSync(import_graceful_fs.default.realpathSync(os.tmpdir()) + path
|
|
1326
|
-
return path
|
|
1312
|
+
const pathPrefix = globalConfigPath ? path.join(id, "config.json") : path.join("configstore", `${id}.json`);
|
|
1313
|
+
const configDirectory = xdgConfig ?? import_graceful_fs.default.mkdtempSync(import_graceful_fs.default.realpathSync(os.tmpdir()) + path.sep);
|
|
1314
|
+
return path.join(configDirectory, pathPrefix);
|
|
1327
1315
|
}
|
|
1328
1316
|
const permissionError = "You don't have access to this file.";
|
|
1329
1317
|
const mkdirOptions = {
|
|
@@ -1354,7 +1342,7 @@ var Configstore = class {
|
|
|
1354
1342
|
}
|
|
1355
1343
|
set all(value) {
|
|
1356
1344
|
try {
|
|
1357
|
-
import_graceful_fs.default.mkdirSync(path
|
|
1345
|
+
import_graceful_fs.default.mkdirSync(path.dirname(this._path), mkdirOptions);
|
|
1358
1346
|
writeFileSync(this._path, JSON.stringify(value, void 0, " "), writeFileOptions);
|
|
1359
1347
|
} catch (error) {
|
|
1360
1348
|
if (error.code === "EACCES") error.message = `${error.message}\n${permissionError}\n`;
|
|
@@ -1391,11 +1379,11 @@ var Configstore = class {
|
|
|
1391
1379
|
|
|
1392
1380
|
//#endregion
|
|
1393
1381
|
//#region ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
1394
|
-
const ANSI_BACKGROUND_OFFSET
|
|
1395
|
-
const wrapAnsi16
|
|
1396
|
-
const wrapAnsi256
|
|
1397
|
-
const wrapAnsi16m
|
|
1398
|
-
const styles$
|
|
1382
|
+
const ANSI_BACKGROUND_OFFSET = 10;
|
|
1383
|
+
const wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
|
|
1384
|
+
const wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
|
|
1385
|
+
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
|
|
1386
|
+
const styles$1 = {
|
|
1399
1387
|
modifier: {
|
|
1400
1388
|
reset: [0, 0],
|
|
1401
1389
|
bold: [1, 22],
|
|
@@ -1448,39 +1436,39 @@ const styles$2 = {
|
|
|
1448
1436
|
bgWhiteBright: [107, 49]
|
|
1449
1437
|
}
|
|
1450
1438
|
};
|
|
1451
|
-
const modifierNames
|
|
1452
|
-
const foregroundColorNames
|
|
1453
|
-
const backgroundColorNames
|
|
1454
|
-
const colorNames
|
|
1455
|
-
function assembleStyles
|
|
1439
|
+
const modifierNames = Object.keys(styles$1.modifier);
|
|
1440
|
+
const foregroundColorNames = Object.keys(styles$1.color);
|
|
1441
|
+
const backgroundColorNames = Object.keys(styles$1.bgColor);
|
|
1442
|
+
const colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
1443
|
+
function assembleStyles() {
|
|
1456
1444
|
const codes = /* @__PURE__ */ new Map();
|
|
1457
|
-
for (const [groupName, group] of Object.entries(styles$
|
|
1445
|
+
for (const [groupName, group] of Object.entries(styles$1)) {
|
|
1458
1446
|
for (const [styleName, style] of Object.entries(group)) {
|
|
1459
|
-
styles$
|
|
1447
|
+
styles$1[styleName] = {
|
|
1460
1448
|
open: `\u001B[${style[0]}m`,
|
|
1461
1449
|
close: `\u001B[${style[1]}m`
|
|
1462
1450
|
};
|
|
1463
|
-
group[styleName] = styles$
|
|
1451
|
+
group[styleName] = styles$1[styleName];
|
|
1464
1452
|
codes.set(style[0], style[1]);
|
|
1465
1453
|
}
|
|
1466
|
-
Object.defineProperty(styles$
|
|
1454
|
+
Object.defineProperty(styles$1, groupName, {
|
|
1467
1455
|
value: group,
|
|
1468
1456
|
enumerable: false
|
|
1469
1457
|
});
|
|
1470
1458
|
}
|
|
1471
|
-
Object.defineProperty(styles$
|
|
1459
|
+
Object.defineProperty(styles$1, "codes", {
|
|
1472
1460
|
value: codes,
|
|
1473
1461
|
enumerable: false
|
|
1474
1462
|
});
|
|
1475
|
-
styles$
|
|
1476
|
-
styles$
|
|
1477
|
-
styles$
|
|
1478
|
-
styles$
|
|
1479
|
-
styles$
|
|
1480
|
-
styles$
|
|
1481
|
-
styles$
|
|
1482
|
-
styles$
|
|
1483
|
-
Object.defineProperties(styles$
|
|
1463
|
+
styles$1.color.close = "\x1B[39m";
|
|
1464
|
+
styles$1.bgColor.close = "\x1B[49m";
|
|
1465
|
+
styles$1.color.ansi = wrapAnsi16();
|
|
1466
|
+
styles$1.color.ansi256 = wrapAnsi256();
|
|
1467
|
+
styles$1.color.ansi16m = wrapAnsi16m();
|
|
1468
|
+
styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
1469
|
+
styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
1470
|
+
styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
1471
|
+
Object.defineProperties(styles$1, {
|
|
1484
1472
|
rgbToAnsi256: {
|
|
1485
1473
|
value(red, green, blue) {
|
|
1486
1474
|
if (red === green && green === blue) {
|
|
@@ -1512,7 +1500,7 @@ function assembleStyles$1() {
|
|
|
1512
1500
|
enumerable: false
|
|
1513
1501
|
},
|
|
1514
1502
|
hexToAnsi256: {
|
|
1515
|
-
value: (hex) => styles$
|
|
1503
|
+
value: (hex) => styles$1.rgbToAnsi256(...styles$1.hexToRgb(hex)),
|
|
1516
1504
|
enumerable: false
|
|
1517
1505
|
},
|
|
1518
1506
|
ansi256ToAnsi: {
|
|
@@ -1542,18 +1530,18 @@ function assembleStyles$1() {
|
|
|
1542
1530
|
enumerable: false
|
|
1543
1531
|
},
|
|
1544
1532
|
rgbToAnsi: {
|
|
1545
|
-
value: (red, green, blue) => styles$
|
|
1533
|
+
value: (red, green, blue) => styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red, green, blue)),
|
|
1546
1534
|
enumerable: false
|
|
1547
1535
|
},
|
|
1548
1536
|
hexToAnsi: {
|
|
1549
|
-
value: (hex) => styles$
|
|
1537
|
+
value: (hex) => styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex)),
|
|
1550
1538
|
enumerable: false
|
|
1551
1539
|
}
|
|
1552
1540
|
});
|
|
1553
|
-
return styles$
|
|
1541
|
+
return styles$1;
|
|
1554
1542
|
}
|
|
1555
|
-
const ansiStyles
|
|
1556
|
-
var ansi_styles_default
|
|
1543
|
+
const ansiStyles = assembleStyles();
|
|
1544
|
+
var ansi_styles_default = ansiStyles;
|
|
1557
1545
|
|
|
1558
1546
|
//#endregion
|
|
1559
1547
|
//#region ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/supports-color/index.js
|
|
@@ -1620,9 +1608,9 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
1620
1608
|
if (env$1.COLORTERM === "truecolor") return 3;
|
|
1621
1609
|
if (env$1.TERM === "xterm-kitty") return 3;
|
|
1622
1610
|
if ("TERM_PROGRAM" in env$1) {
|
|
1623
|
-
const version = Number.parseInt((env$1.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
1611
|
+
const version$1 = Number.parseInt((env$1.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
1624
1612
|
switch (env$1.TERM_PROGRAM) {
|
|
1625
|
-
case "iTerm.app": return version >= 3 ? 3 : 2;
|
|
1613
|
+
case "iTerm.app": return version$1 >= 3 ? 3 : 2;
|
|
1626
1614
|
case "Apple_Terminal": return 2;
|
|
1627
1615
|
}
|
|
1628
1616
|
}
|
|
@@ -1685,7 +1673,7 @@ const levelMapping = [
|
|
|
1685
1673
|
"ansi256",
|
|
1686
1674
|
"ansi16m"
|
|
1687
1675
|
];
|
|
1688
|
-
const styles
|
|
1676
|
+
const styles = Object.create(null);
|
|
1689
1677
|
const applyOptions = (object, options = {}) => {
|
|
1690
1678
|
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
|
|
1691
1679
|
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
@@ -1701,24 +1689,24 @@ function createChalk(options) {
|
|
|
1701
1689
|
return chalkFactory(options);
|
|
1702
1690
|
}
|
|
1703
1691
|
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
1704
|
-
for (const [styleName, style] of Object.entries(ansi_styles_default
|
|
1692
|
+
for (const [styleName, style] of Object.entries(ansi_styles_default)) styles[styleName] = { get() {
|
|
1705
1693
|
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
1706
1694
|
Object.defineProperty(this, styleName, { value: builder });
|
|
1707
1695
|
return builder;
|
|
1708
1696
|
} };
|
|
1709
|
-
styles
|
|
1697
|
+
styles.visible = { get() {
|
|
1710
1698
|
const builder = createBuilder(this, this[STYLER], true);
|
|
1711
1699
|
Object.defineProperty(this, "visible", { value: builder });
|
|
1712
1700
|
return builder;
|
|
1713
1701
|
} };
|
|
1714
|
-
const getModelAnsi = (model, level, type, ...arguments_) => {
|
|
1702
|
+
const getModelAnsi = (model, level, type$1, ...arguments_) => {
|
|
1715
1703
|
if (model === "rgb") {
|
|
1716
|
-
if (level === "ansi16m") return ansi_styles_default$1
|
|
1717
|
-
if (level === "ansi256") return ansi_styles_default$1
|
|
1718
|
-
return ansi_styles_default$1
|
|
1704
|
+
if (level === "ansi16m") return ansi_styles_default[type$1].ansi16m(...arguments_);
|
|
1705
|
+
if (level === "ansi256") return ansi_styles_default[type$1].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
1706
|
+
return ansi_styles_default[type$1].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
1719
1707
|
}
|
|
1720
|
-
if (model === "hex") return getModelAnsi("rgb", level, type, ...ansi_styles_default
|
|
1721
|
-
return ansi_styles_default$1
|
|
1708
|
+
if (model === "hex") return getModelAnsi("rgb", level, type$1, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
1709
|
+
return ansi_styles_default[type$1][model](...arguments_);
|
|
1722
1710
|
};
|
|
1723
1711
|
const usedModels = [
|
|
1724
1712
|
"rgb",
|
|
@@ -1726,24 +1714,24 @@ const usedModels = [
|
|
|
1726
1714
|
"ansi256"
|
|
1727
1715
|
];
|
|
1728
1716
|
for (const model of usedModels) {
|
|
1729
|
-
styles
|
|
1717
|
+
styles[model] = { get() {
|
|
1730
1718
|
const { level } = this;
|
|
1731
1719
|
return function(...arguments_) {
|
|
1732
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default
|
|
1720
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
1733
1721
|
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
1734
1722
|
};
|
|
1735
1723
|
} };
|
|
1736
1724
|
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
1737
|
-
styles
|
|
1725
|
+
styles[bgModel] = { get() {
|
|
1738
1726
|
const { level } = this;
|
|
1739
1727
|
return function(...arguments_) {
|
|
1740
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default
|
|
1728
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
1741
1729
|
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
1742
1730
|
};
|
|
1743
1731
|
} };
|
|
1744
1732
|
}
|
|
1745
1733
|
const proto = Object.defineProperties(() => {}, {
|
|
1746
|
-
...styles
|
|
1734
|
+
...styles,
|
|
1747
1735
|
level: {
|
|
1748
1736
|
enumerable: true,
|
|
1749
1737
|
get() {
|
|
@@ -1793,7 +1781,7 @@ const applyStyle = (self, string) => {
|
|
|
1793
1781
|
if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
1794
1782
|
return openAll + string + closeAll;
|
|
1795
1783
|
};
|
|
1796
|
-
Object.defineProperties(createChalk.prototype, styles
|
|
1784
|
+
Object.defineProperties(createChalk.prototype, styles);
|
|
1797
1785
|
const chalk = createChalk();
|
|
1798
1786
|
const chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
1799
1787
|
var source_default = chalk;
|
|
@@ -1844,7 +1832,7 @@ var require_re = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7
|
|
|
1844
1832
|
const safeRe = exports.safeRe = [];
|
|
1845
1833
|
const src = exports.src = [];
|
|
1846
1834
|
const safeSrc = exports.safeSrc = [];
|
|
1847
|
-
const t$
|
|
1835
|
+
const t$4 = exports.t = {};
|
|
1848
1836
|
let R = 0;
|
|
1849
1837
|
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
1850
1838
|
const safeRegexReplacements = [
|
|
@@ -1856,11 +1844,11 @@ var require_re = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7
|
|
|
1856
1844
|
for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
1857
1845
|
return value;
|
|
1858
1846
|
};
|
|
1859
|
-
const createToken = (name, value, isGlobal) => {
|
|
1847
|
+
const createToken = (name$1, value, isGlobal) => {
|
|
1860
1848
|
const safe$2 = makeSafeRegex(value);
|
|
1861
1849
|
const index = R++;
|
|
1862
|
-
debug$4(name, index, value);
|
|
1863
|
-
t$
|
|
1850
|
+
debug$4(name$1, index, value);
|
|
1851
|
+
t$4[name$1] = index;
|
|
1864
1852
|
src[index] = value;
|
|
1865
1853
|
safeSrc[index] = safe$2;
|
|
1866
1854
|
re$4[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
@@ -1869,46 +1857,46 @@ var require_re = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7
|
|
|
1869
1857
|
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
1870
1858
|
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
1871
1859
|
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
1872
|
-
createToken("MAINVERSION", `(${src[t$
|
|
1873
|
-
createToken("MAINVERSIONLOOSE", `(${src[t$
|
|
1874
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t$
|
|
1875
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t$
|
|
1876
|
-
createToken("PRERELEASE", `(?:-(${src[t$
|
|
1877
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t$
|
|
1860
|
+
createToken("MAINVERSION", `(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})`);
|
|
1861
|
+
createToken("MAINVERSIONLOOSE", `(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})`);
|
|
1862
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIER]})`);
|
|
1863
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIERLOOSE]})`);
|
|
1864
|
+
createToken("PRERELEASE", `(?:-(${src[t$4.PRERELEASEIDENTIFIER]}(?:\\.${src[t$4.PRERELEASEIDENTIFIER]})*))`);
|
|
1865
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t$4.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t$4.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
1878
1866
|
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
1879
|
-
createToken("BUILD", `(?:\\+(${src[t$
|
|
1880
|
-
createToken("FULLPLAIN", `v?${src[t$
|
|
1881
|
-
createToken("FULL", `^${src[t$
|
|
1882
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t$
|
|
1883
|
-
createToken("LOOSE", `^${src[t$
|
|
1867
|
+
createToken("BUILD", `(?:\\+(${src[t$4.BUILDIDENTIFIER]}(?:\\.${src[t$4.BUILDIDENTIFIER]})*))`);
|
|
1868
|
+
createToken("FULLPLAIN", `v?${src[t$4.MAINVERSION]}${src[t$4.PRERELEASE]}?${src[t$4.BUILD]}?`);
|
|
1869
|
+
createToken("FULL", `^${src[t$4.FULLPLAIN]}$`);
|
|
1870
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t$4.MAINVERSIONLOOSE]}${src[t$4.PRERELEASELOOSE]}?${src[t$4.BUILD]}?`);
|
|
1871
|
+
createToken("LOOSE", `^${src[t$4.LOOSEPLAIN]}$`);
|
|
1884
1872
|
createToken("GTLT", "((?:<|>)?=?)");
|
|
1885
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t$
|
|
1886
|
-
createToken("XRANGEIDENTIFIER", `${src[t$
|
|
1887
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t$
|
|
1888
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t$
|
|
1889
|
-
createToken("XRANGE", `^${src[t$
|
|
1890
|
-
createToken("XRANGELOOSE", `^${src[t$
|
|
1873
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t$4.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
1874
|
+
createToken("XRANGEIDENTIFIER", `${src[t$4.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
1875
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:${src[t$4.PRERELEASE]})?${src[t$4.BUILD]}?)?)?`);
|
|
1876
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:${src[t$4.PRERELEASELOOSE]})?${src[t$4.BUILD]}?)?)?`);
|
|
1877
|
+
createToken("XRANGE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAIN]}$`);
|
|
1878
|
+
createToken("XRANGELOOSE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAINLOOSE]}$`);
|
|
1891
1879
|
createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
1892
|
-
createToken("COERCE", `${src[t$
|
|
1893
|
-
createToken("COERCEFULL", src[t$
|
|
1894
|
-
createToken("COERCERTL", src[t$
|
|
1895
|
-
createToken("COERCERTLFULL", src[t$
|
|
1880
|
+
createToken("COERCE", `${src[t$4.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
1881
|
+
createToken("COERCEFULL", src[t$4.COERCEPLAIN] + `(?:${src[t$4.PRERELEASE]})?(?:${src[t$4.BUILD]})?(?:$|[^\\d])`);
|
|
1882
|
+
createToken("COERCERTL", src[t$4.COERCE], true);
|
|
1883
|
+
createToken("COERCERTLFULL", src[t$4.COERCEFULL], true);
|
|
1896
1884
|
createToken("LONETILDE", "(?:~>?)");
|
|
1897
|
-
createToken("TILDETRIM", `(\\s*)${src[t$
|
|
1885
|
+
createToken("TILDETRIM", `(\\s*)${src[t$4.LONETILDE]}\\s+`, true);
|
|
1898
1886
|
exports.tildeTrimReplace = "$1~";
|
|
1899
|
-
createToken("TILDE", `^${src[t$
|
|
1900
|
-
createToken("TILDELOOSE", `^${src[t$
|
|
1887
|
+
createToken("TILDE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAIN]}$`);
|
|
1888
|
+
createToken("TILDELOOSE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAINLOOSE]}$`);
|
|
1901
1889
|
createToken("LONECARET", "(?:\\^)");
|
|
1902
|
-
createToken("CARETTRIM", `(\\s*)${src[t$
|
|
1890
|
+
createToken("CARETTRIM", `(\\s*)${src[t$4.LONECARET]}\\s+`, true);
|
|
1903
1891
|
exports.caretTrimReplace = "$1^";
|
|
1904
|
-
createToken("CARET", `^${src[t$
|
|
1905
|
-
createToken("CARETLOOSE", `^${src[t$
|
|
1906
|
-
createToken("COMPARATORLOOSE", `^${src[t$
|
|
1907
|
-
createToken("COMPARATOR", `^${src[t$
|
|
1908
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t$
|
|
1892
|
+
createToken("CARET", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAIN]}$`);
|
|
1893
|
+
createToken("CARETLOOSE", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAINLOOSE]}$`);
|
|
1894
|
+
createToken("COMPARATORLOOSE", `^${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]})$|^$`);
|
|
1895
|
+
createToken("COMPARATOR", `^${src[t$4.GTLT]}\\s*(${src[t$4.FULLPLAIN]})$|^$`);
|
|
1896
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]}|${src[t$4.XRANGEPLAIN]})`, true);
|
|
1909
1897
|
exports.comparatorTrimReplace = "$1$2$3";
|
|
1910
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t$
|
|
1911
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t$
|
|
1898
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t$4.XRANGEPLAIN]})\\s+-\\s+(${src[t$4.XRANGEPLAIN]})\\s*$`);
|
|
1899
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t$4.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t$4.XRANGEPLAINLOOSE]})\\s*$`);
|
|
1912
1900
|
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
1913
1901
|
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
1914
1902
|
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
@@ -1952,23 +1940,23 @@ var require_identifiers = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
1952
1940
|
var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js": ((exports, module) => {
|
|
1953
1941
|
const debug$3 = require_debug();
|
|
1954
1942
|
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
1955
|
-
const { safeRe: re$3, t: t$
|
|
1943
|
+
const { safeRe: re$3, t: t$3 } = require_re();
|
|
1956
1944
|
const parseOptions$2 = require_parse_options();
|
|
1957
1945
|
const { compareIdentifiers } = require_identifiers();
|
|
1958
1946
|
var SemVer$15 = class SemVer$15 {
|
|
1959
|
-
constructor(version, options) {
|
|
1947
|
+
constructor(version$1, options) {
|
|
1960
1948
|
options = parseOptions$2(options);
|
|
1961
|
-
if (version instanceof SemVer$15) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
1962
|
-
else version = version.version;
|
|
1963
|
-
else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
1964
|
-
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
1965
|
-
debug$3("SemVer", version, options);
|
|
1949
|
+
if (version$1 instanceof SemVer$15) if (version$1.loose === !!options.loose && version$1.includePrerelease === !!options.includePrerelease) return version$1;
|
|
1950
|
+
else version$1 = version$1.version;
|
|
1951
|
+
else if (typeof version$1 !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version$1}".`);
|
|
1952
|
+
if (version$1.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
1953
|
+
debug$3("SemVer", version$1, options);
|
|
1966
1954
|
this.options = options;
|
|
1967
1955
|
this.loose = !!options.loose;
|
|
1968
1956
|
this.includePrerelease = !!options.includePrerelease;
|
|
1969
|
-
const m = version.trim().match(options.loose ? re$3[t$
|
|
1970
|
-
if (!m) throw new TypeError(`Invalid Version: ${version}`);
|
|
1971
|
-
this.raw = version;
|
|
1957
|
+
const m = version$1.trim().match(options.loose ? re$3[t$3.LOOSE] : re$3[t$3.FULL]);
|
|
1958
|
+
if (!m) throw new TypeError(`Invalid Version: ${version$1}`);
|
|
1959
|
+
this.raw = version$1;
|
|
1972
1960
|
this.major = +m[1];
|
|
1973
1961
|
this.minor = +m[2];
|
|
1974
1962
|
this.patch = +m[3];
|
|
@@ -2042,7 +2030,7 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
2042
2030
|
if (release.startsWith("pre")) {
|
|
2043
2031
|
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
2044
2032
|
if (identifier) {
|
|
2045
|
-
const match = `-${identifier}`.match(this.options.loose ? re$3[t$
|
|
2033
|
+
const match = `-${identifier}`.match(this.options.loose ? re$3[t$3.PRERELEASELOOSE] : re$3[t$3.PRERELEASE]);
|
|
2046
2034
|
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
2047
2035
|
}
|
|
2048
2036
|
}
|
|
@@ -2125,10 +2113,10 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
2125
2113
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js
|
|
2126
2114
|
var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js": ((exports, module) => {
|
|
2127
2115
|
const SemVer$14 = require_semver$1();
|
|
2128
|
-
const parse$8 = (version, options, throwErrors = false) => {
|
|
2129
|
-
if (version instanceof SemVer$14) return version;
|
|
2116
|
+
const parse$8 = (version$1, options, throwErrors = false) => {
|
|
2117
|
+
if (version$1 instanceof SemVer$14) return version$1;
|
|
2130
2118
|
try {
|
|
2131
|
-
return new SemVer$14(version, options);
|
|
2119
|
+
return new SemVer$14(version$1, options);
|
|
2132
2120
|
} catch (er) {
|
|
2133
2121
|
if (!throwErrors) return null;
|
|
2134
2122
|
throw er;
|
|
@@ -2141,7 +2129,7 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
2141
2129
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js
|
|
2142
2130
|
var require_diff = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js": ((exports, module) => {
|
|
2143
2131
|
const parse$7 = require_parse();
|
|
2144
|
-
const diff$
|
|
2132
|
+
const diff$2 = (version1, version2) => {
|
|
2145
2133
|
const v1 = parse$7(version1, null, true);
|
|
2146
2134
|
const v2 = parse$7(version2, null, true);
|
|
2147
2135
|
const comparison = v1.compare(v2);
|
|
@@ -2164,7 +2152,7 @@ var require_diff = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver
|
|
|
2164
2152
|
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
2165
2153
|
return "prerelease";
|
|
2166
2154
|
};
|
|
2167
|
-
module.exports = diff$
|
|
2155
|
+
module.exports = diff$2;
|
|
2168
2156
|
}) });
|
|
2169
2157
|
|
|
2170
2158
|
//#endregion
|
|
@@ -2247,8 +2235,8 @@ const requestMethods = [
|
|
|
2247
2235
|
"head",
|
|
2248
2236
|
"delete"
|
|
2249
2237
|
];
|
|
2250
|
-
const validate
|
|
2251
|
-
validate
|
|
2238
|
+
const validate = () => void 0;
|
|
2239
|
+
validate();
|
|
2252
2240
|
const responseTypes = {
|
|
2253
2241
|
json: "application/json",
|
|
2254
2242
|
text: "text/*",
|
|
@@ -2502,13 +2490,13 @@ const normalizeRetryOptions = (retry$2 = {}) => {
|
|
|
2502
2490
|
|
|
2503
2491
|
//#endregion
|
|
2504
2492
|
//#region ../../node_modules/.pnpm/ky@1.8.2/node_modules/ky/distribution/utils/timeout.js
|
|
2505
|
-
async function timeout(request, init, abortController, options) {
|
|
2493
|
+
async function timeout(request, init$1, abortController, options) {
|
|
2506
2494
|
return new Promise((resolve, reject) => {
|
|
2507
2495
|
const timeoutId = setTimeout(() => {
|
|
2508
2496
|
if (abortController) abortController.abort();
|
|
2509
2497
|
reject(new TimeoutError(request));
|
|
2510
2498
|
}, options.timeout);
|
|
2511
|
-
options.fetch(request, init).then(resolve).catch(reject).then(() => {
|
|
2499
|
+
options.fetch(request, init$1).then(resolve).catch(reject).then(() => {
|
|
2512
2500
|
clearTimeout(timeoutId);
|
|
2513
2501
|
});
|
|
2514
2502
|
});
|
|
@@ -2571,17 +2559,17 @@ var Ky = class Ky {
|
|
|
2571
2559
|
const result = (isRetriableMethod ? ky$1._retry(function_) : function_()).finally(async () => {
|
|
2572
2560
|
if (!ky$1.request.bodyUsed) await ky$1.request.body?.cancel();
|
|
2573
2561
|
});
|
|
2574
|
-
for (const [type, mimeType] of Object.entries(responseTypes)) result[type] = async () => {
|
|
2562
|
+
for (const [type$1, mimeType] of Object.entries(responseTypes)) result[type$1] = async () => {
|
|
2575
2563
|
ky$1.request.headers.set("accept", ky$1.request.headers.get("accept") || mimeType);
|
|
2576
2564
|
const response = await result;
|
|
2577
|
-
if (type === "json") {
|
|
2565
|
+
if (type$1 === "json") {
|
|
2578
2566
|
if (response.status === 204) return "";
|
|
2579
2567
|
const arrayBuffer = await response.clone().arrayBuffer();
|
|
2580
2568
|
const responseSize = arrayBuffer.byteLength;
|
|
2581
2569
|
if (responseSize === 0) return "";
|
|
2582
2570
|
if (options.parseJson) return options.parseJson(await response.text());
|
|
2583
2571
|
}
|
|
2584
|
-
return response[type]();
|
|
2572
|
+
return response[type$1]();
|
|
2585
2573
|
};
|
|
2586
2574
|
return result;
|
|
2587
2575
|
}
|
|
@@ -2831,14 +2819,14 @@ var require_ini$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@1
|
|
|
2831
2819
|
var esc = false;
|
|
2832
2820
|
var unesc = "";
|
|
2833
2821
|
for (var i = 0, l = val.length; i < l; i++) {
|
|
2834
|
-
var c$
|
|
2822
|
+
var c$1 = val.charAt(i);
|
|
2835
2823
|
if (esc) {
|
|
2836
|
-
if ("\\;#".indexOf(c$
|
|
2837
|
-
else unesc += "\\" + c$
|
|
2824
|
+
if ("\\;#".indexOf(c$1) !== -1) unesc += c$1;
|
|
2825
|
+
else unesc += "\\" + c$1;
|
|
2838
2826
|
esc = false;
|
|
2839
|
-
} else if (";#".indexOf(c$
|
|
2840
|
-
else if (c$
|
|
2841
|
-
else unesc += c$
|
|
2827
|
+
} else if (";#".indexOf(c$1) !== -1) break;
|
|
2828
|
+
else if (c$1 === "\\") esc = true;
|
|
2829
|
+
else unesc += c$1;
|
|
2842
2830
|
}
|
|
2843
2831
|
if (esc) unesc += "\\";
|
|
2844
2832
|
return unesc.trim();
|
|
@@ -3222,12 +3210,12 @@ var require_rc = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/rc@1.2.8
|
|
|
3222
3210
|
var etc = "/etc";
|
|
3223
3211
|
var win = process.platform === "win32";
|
|
3224
3212
|
var home$1 = win ? process.env.USERPROFILE : process.env.HOME;
|
|
3225
|
-
module.exports = function(name, defaults$1, argv, parse$9) {
|
|
3226
|
-
if ("string" !== typeof name) throw new Error("rc(name): name *must* be string");
|
|
3213
|
+
module.exports = function(name$1, defaults$1, argv, parse$9) {
|
|
3214
|
+
if ("string" !== typeof name$1) throw new Error("rc(name): name *must* be string");
|
|
3227
3215
|
if (!argv) argv = require_minimist()(process.argv.slice(2));
|
|
3228
3216
|
defaults$1 = ("string" === typeof defaults$1 ? cc.json(defaults$1) : defaults$1) || {};
|
|
3229
3217
|
parse$9 = parse$9 || cc.parse;
|
|
3230
|
-
var env$3 = cc.env(name + "_");
|
|
3218
|
+
var env$3 = cc.env(name$1 + "_");
|
|
3231
3219
|
var configs = [defaults$1];
|
|
3232
3220
|
var configFiles = [];
|
|
3233
3221
|
function addConfigFile(file$1) {
|
|
@@ -3238,14 +3226,14 @@ var require_rc = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/rc@1.2.8
|
|
|
3238
3226
|
configFiles.push(file$1);
|
|
3239
3227
|
}
|
|
3240
3228
|
}
|
|
3241
|
-
if (!win) [join(etc, name, "config"), join(etc, name + "rc")].forEach(addConfigFile);
|
|
3229
|
+
if (!win) [join(etc, name$1, "config"), join(etc, name$1 + "rc")].forEach(addConfigFile);
|
|
3242
3230
|
if (home$1) [
|
|
3243
|
-
join(home$1, ".config", name, "config"),
|
|
3244
|
-
join(home$1, ".config", name),
|
|
3245
|
-
join(home$1, "." + name, "config"),
|
|
3246
|
-
join(home$1, "." + name + "rc")
|
|
3231
|
+
join(home$1, ".config", name$1, "config"),
|
|
3232
|
+
join(home$1, ".config", name$1),
|
|
3233
|
+
join(home$1, "." + name$1, "config"),
|
|
3234
|
+
join(home$1, "." + name$1 + "rc")
|
|
3247
3235
|
].forEach(addConfigFile);
|
|
3248
|
-
addConfigFile(cc.find("." + name + "rc"));
|
|
3236
|
+
addConfigFile(cc.find("." + name$1 + "rc"));
|
|
3249
3237
|
if (env$3.config) addConfigFile(env$3.config);
|
|
3250
3238
|
if (argv.config) addConfigFile(argv.config);
|
|
3251
3239
|
return deepExtend.apply(null, configs.concat([
|
|
@@ -3805,7 +3793,7 @@ var require_graceful_fs = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
3805
3793
|
};
|
|
3806
3794
|
return go$readdir(path$9, options, cb);
|
|
3807
3795
|
function fs$readdirCallback(path$10, options$1, cb$1, startTime) {
|
|
3808
|
-
return function(err, files) {
|
|
3796
|
+
return function(err, files$1) {
|
|
3809
3797
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([
|
|
3810
3798
|
go$readdir,
|
|
3811
3799
|
[
|
|
@@ -3818,8 +3806,8 @@ var require_graceful_fs = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
3818
3806
|
Date.now()
|
|
3819
3807
|
]);
|
|
3820
3808
|
else {
|
|
3821
|
-
if (files && files.sort) files.sort();
|
|
3822
|
-
if (typeof cb$1 === "function") cb$1.call(this, err, files);
|
|
3809
|
+
if (files$1 && files$1.sort) files$1.sort();
|
|
3810
|
+
if (typeof cb$1 === "function") cb$1.call(this, err, files$1);
|
|
3823
3811
|
}
|
|
3824
3812
|
};
|
|
3825
3813
|
}
|
|
@@ -4041,7 +4029,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnp
|
|
|
4041
4029
|
var getFilename, getDirname, __dirname$2;
|
|
4042
4030
|
var init_esm_shims = __esm({ "../../node_modules/.pnpm/tsdown@0.13.1_typescript@5.9.2/node_modules/tsdown/esm-shims.js": (() => {
|
|
4043
4031
|
getFilename = () => fileURLToPath(import.meta.url);
|
|
4044
|
-
getDirname = () => path
|
|
4032
|
+
getDirname = () => path.dirname(getFilename());
|
|
4045
4033
|
__dirname$2 = /* @__PURE__ */ getDirname();
|
|
4046
4034
|
}) });
|
|
4047
4035
|
|
|
@@ -4153,14 +4141,14 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
4153
4141
|
}
|
|
4154
4142
|
return find(__dirname$2, rel);
|
|
4155
4143
|
};
|
|
4156
|
-
var parse$5 = exports$1.parse = function(content, file$1, type) {
|
|
4144
|
+
var parse$5 = exports$1.parse = function(content, file$1, type$1) {
|
|
4157
4145
|
content = "" + content;
|
|
4158
|
-
if (!type) try {
|
|
4146
|
+
if (!type$1) try {
|
|
4159
4147
|
return JSON.parse(content);
|
|
4160
4148
|
} catch (er) {
|
|
4161
4149
|
return ini$1.parse(content);
|
|
4162
4150
|
}
|
|
4163
|
-
else if (type === "json") if (this.emit) try {
|
|
4151
|
+
else if (type$1 === "json") if (this.emit) try {
|
|
4164
4152
|
return JSON.parse(content);
|
|
4165
4153
|
} catch (er) {
|
|
4166
4154
|
this.emit("error", er);
|
|
@@ -4232,8 +4220,8 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
4232
4220
|
}
|
|
4233
4221
|
return this.list[0][key];
|
|
4234
4222
|
};
|
|
4235
|
-
ConfigChain$1.prototype.save = function(where, type, cb) {
|
|
4236
|
-
if (typeof type === "function") cb = type, type = null;
|
|
4223
|
+
ConfigChain$1.prototype.save = function(where, type$1, cb) {
|
|
4224
|
+
if (typeof type$1 === "function") cb = type$1, type$1 = null;
|
|
4237
4225
|
var target = this.sources[where];
|
|
4238
4226
|
if (!target || !(target.path || target.source) || !target.data) return this.emit("error", /* @__PURE__ */ new Error("bad save target: " + where));
|
|
4239
4227
|
if (target.source) {
|
|
@@ -4243,7 +4231,7 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
4243
4231
|
});
|
|
4244
4232
|
return this;
|
|
4245
4233
|
}
|
|
4246
|
-
var type = type || target.type;
|
|
4234
|
+
var type$1 = type$1 || target.type;
|
|
4247
4235
|
var data = target.data;
|
|
4248
4236
|
if (target.type === "json") data = JSON.stringify(data);
|
|
4249
4237
|
else data = ini$1.stringify(data);
|
|
@@ -4259,56 +4247,56 @@ var require_config_chain = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
4259
4247
|
}.bind(this));
|
|
4260
4248
|
return this;
|
|
4261
4249
|
};
|
|
4262
|
-
ConfigChain$1.prototype.addFile = function(file$1, type, name) {
|
|
4263
|
-
name = name || file$1;
|
|
4264
|
-
var marker = { __source__: name };
|
|
4265
|
-
this.sources[name] = {
|
|
4250
|
+
ConfigChain$1.prototype.addFile = function(file$1, type$1, name$1) {
|
|
4251
|
+
name$1 = name$1 || file$1;
|
|
4252
|
+
var marker = { __source__: name$1 };
|
|
4253
|
+
this.sources[name$1] = {
|
|
4266
4254
|
path: file$1,
|
|
4267
|
-
type
|
|
4255
|
+
type: type$1
|
|
4268
4256
|
};
|
|
4269
4257
|
this.push(marker);
|
|
4270
4258
|
this._await();
|
|
4271
4259
|
fs$4.readFile(file$1, "utf8", function(er, data) {
|
|
4272
4260
|
if (er) this.emit("error", er);
|
|
4273
|
-
this.addString(data, file$1, type, marker);
|
|
4261
|
+
this.addString(data, file$1, type$1, marker);
|
|
4274
4262
|
}.bind(this));
|
|
4275
4263
|
return this;
|
|
4276
4264
|
};
|
|
4277
|
-
ConfigChain$1.prototype.addEnv = function(prefix, env$3, name) {
|
|
4278
|
-
name = name || "env";
|
|
4265
|
+
ConfigChain$1.prototype.addEnv = function(prefix, env$3, name$1) {
|
|
4266
|
+
name$1 = name$1 || "env";
|
|
4279
4267
|
var data = exports$1.env(prefix, env$3);
|
|
4280
|
-
this.sources[name] = {
|
|
4268
|
+
this.sources[name$1] = {
|
|
4281
4269
|
data,
|
|
4282
4270
|
source: env$3,
|
|
4283
4271
|
prefix
|
|
4284
4272
|
};
|
|
4285
|
-
return this.add(data, name);
|
|
4273
|
+
return this.add(data, name$1);
|
|
4286
4274
|
};
|
|
4287
|
-
ConfigChain$1.prototype.addUrl = function(req, type, name) {
|
|
4275
|
+
ConfigChain$1.prototype.addUrl = function(req, type$1, name$1) {
|
|
4288
4276
|
this._await();
|
|
4289
4277
|
var href = url$1.format(req);
|
|
4290
|
-
name = name || href;
|
|
4291
|
-
var marker = { __source__: name };
|
|
4292
|
-
this.sources[name] = {
|
|
4278
|
+
name$1 = name$1 || href;
|
|
4279
|
+
var marker = { __source__: name$1 };
|
|
4280
|
+
this.sources[name$1] = {
|
|
4293
4281
|
href,
|
|
4294
|
-
type
|
|
4282
|
+
type: type$1
|
|
4295
4283
|
};
|
|
4296
4284
|
this.push(marker);
|
|
4297
4285
|
http.request(req, function(res) {
|
|
4298
|
-
var c$
|
|
4286
|
+
var c$1 = [];
|
|
4299
4287
|
var ct = res.headers["content-type"];
|
|
4300
|
-
if (!type) {
|
|
4301
|
-
type = ct.indexOf("json") !== -1 ? "json" : ct.indexOf("ini") !== -1 ? "ini" : href.match(/\.json$/) ? "json" : href.match(/\.ini$/) ? "ini" : null;
|
|
4302
|
-
marker.type = type;
|
|
4288
|
+
if (!type$1) {
|
|
4289
|
+
type$1 = ct.indexOf("json") !== -1 ? "json" : ct.indexOf("ini") !== -1 ? "ini" : href.match(/\.json$/) ? "json" : href.match(/\.ini$/) ? "ini" : null;
|
|
4290
|
+
marker.type = type$1;
|
|
4303
4291
|
}
|
|
4304
|
-
res.on("data", c$
|
|
4305
|
-
this.addString(Buffer.concat(c$
|
|
4292
|
+
res.on("data", c$1.push.bind(c$1)).on("end", function() {
|
|
4293
|
+
this.addString(Buffer.concat(c$1), href, type$1, marker);
|
|
4306
4294
|
}.bind(this)).on("error", this.emit.bind(this, "error"));
|
|
4307
4295
|
}.bind(this)).on("error", this.emit.bind(this, "error")).end();
|
|
4308
4296
|
return this;
|
|
4309
4297
|
};
|
|
4310
|
-
ConfigChain$1.prototype.addString = function(data, file$1, type, marker) {
|
|
4311
|
-
data = this.parse(data, file$1, type);
|
|
4298
|
+
ConfigChain$1.prototype.addString = function(data, file$1, type$1, marker) {
|
|
4299
|
+
data = this.parse(data, file$1, type$1);
|
|
4312
4300
|
this.add(data, marker);
|
|
4313
4301
|
return this;
|
|
4314
4302
|
};
|
|
@@ -4371,16 +4359,16 @@ var require_env_replace = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
4371
4359
|
return settingValue.replace(ENV_EXPR, replaceEnvMatch.bind(null, env$3));
|
|
4372
4360
|
}
|
|
4373
4361
|
exports.envReplace = envReplace$1;
|
|
4374
|
-
function replaceEnvMatch(env$3, orig, escape, name) {
|
|
4362
|
+
function replaceEnvMatch(env$3, orig, escape, name$1) {
|
|
4375
4363
|
if (escape.length % 2) return orig.slice((escape.length + 1) / 2);
|
|
4376
|
-
const envValue = getEnvValue(env$3, name);
|
|
4364
|
+
const envValue = getEnvValue(env$3, name$1);
|
|
4377
4365
|
if (envValue === void 0) throw new Error(`Failed to replace env in config: ${orig}`);
|
|
4378
4366
|
return `${escape.slice(escape.length / 2)}${envValue}`;
|
|
4379
4367
|
}
|
|
4380
4368
|
const ENV_VALUE = /([^:-]+)(:?)-(.+)/;
|
|
4381
|
-
function getEnvValue(env$3, name) {
|
|
4382
|
-
const matched = name.match(ENV_VALUE);
|
|
4383
|
-
if (!matched) return env$3[name];
|
|
4369
|
+
function getEnvValue(env$3, name$1) {
|
|
4370
|
+
const matched = name$1.match(ENV_VALUE);
|
|
4371
|
+
if (!matched) return env$3[name$1];
|
|
4384
4372
|
const [, variableName, colon, fallback] = matched;
|
|
4385
4373
|
if (Object.prototype.hasOwnProperty.call(env$3, variableName)) return !env$3[variableName] && colon ? fallback : env$3[variableName];
|
|
4386
4374
|
return fallback;
|
|
@@ -4433,39 +4421,39 @@ var require_util = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+
|
|
|
4433
4421
|
}
|
|
4434
4422
|
field = envReplace(field, process.env);
|
|
4435
4423
|
if (isPath) {
|
|
4436
|
-
const regex
|
|
4437
|
-
if (regex
|
|
4424
|
+
const regex = process.platform === "win32" ? /^~(\/|\\)/ : /^~\//;
|
|
4425
|
+
if (regex.test(field) && process.env.HOME) field = path$6.resolve(process.env.HOME, field.substr(2));
|
|
4438
4426
|
field = path$6.resolve(field);
|
|
4439
4427
|
}
|
|
4440
4428
|
if (isNumber$1 && !isNaN(field)) field = Number(field);
|
|
4441
4429
|
return field;
|
|
4442
4430
|
};
|
|
4443
|
-
const findPrefix = (name) => {
|
|
4444
|
-
name = path$6.resolve(name);
|
|
4431
|
+
const findPrefix = (name$1) => {
|
|
4432
|
+
name$1 = path$6.resolve(name$1);
|
|
4445
4433
|
let walkedUp = false;
|
|
4446
|
-
while (path$6.basename(name) === "node_modules") {
|
|
4447
|
-
name = path$6.dirname(name);
|
|
4434
|
+
while (path$6.basename(name$1) === "node_modules") {
|
|
4435
|
+
name$1 = path$6.dirname(name$1);
|
|
4448
4436
|
walkedUp = true;
|
|
4449
4437
|
}
|
|
4450
|
-
if (walkedUp) return name;
|
|
4451
|
-
const find = (name$
|
|
4452
|
-
const regex
|
|
4453
|
-
if (name$
|
|
4438
|
+
if (walkedUp) return name$1;
|
|
4439
|
+
const find = (name$2, original) => {
|
|
4440
|
+
const regex = /^[a-zA-Z]:(\\|\/)?$/;
|
|
4441
|
+
if (name$2 === "/" || process.platform === "win32" && regex.test(name$2)) return original;
|
|
4454
4442
|
try {
|
|
4455
|
-
const files = fs$3.readdirSync(name$
|
|
4456
|
-
if (files.includes("node_modules") || files.includes("package.json") || files.includes("package.json5") || files.includes("package.yaml") || files.includes("pnpm-workspace.yaml")) return name$
|
|
4457
|
-
const dirname = path$6.dirname(name$
|
|
4458
|
-
if (dirname === name$
|
|
4443
|
+
const files$1 = fs$3.readdirSync(name$2);
|
|
4444
|
+
if (files$1.includes("node_modules") || files$1.includes("package.json") || files$1.includes("package.json5") || files$1.includes("package.yaml") || files$1.includes("pnpm-workspace.yaml")) return name$2;
|
|
4445
|
+
const dirname = path$6.dirname(name$2);
|
|
4446
|
+
if (dirname === name$2) return original;
|
|
4459
4447
|
return find(dirname, original);
|
|
4460
4448
|
} catch (error) {
|
|
4461
|
-
if (name$
|
|
4449
|
+
if (name$2 === original) {
|
|
4462
4450
|
if (error.code === "ENOENT") return original;
|
|
4463
4451
|
throw error;
|
|
4464
4452
|
}
|
|
4465
4453
|
return original;
|
|
4466
4454
|
}
|
|
4467
4455
|
};
|
|
4468
|
-
return find(name, name);
|
|
4456
|
+
return find(name$1, name$1);
|
|
4469
4457
|
};
|
|
4470
4458
|
exports.envReplace = envReplace;
|
|
4471
4459
|
exports.findPrefix = findPrefix;
|
|
@@ -4686,10 +4674,10 @@ var require_conf = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@pnpm+
|
|
|
4686
4674
|
}
|
|
4687
4675
|
return super.add(data, marker);
|
|
4688
4676
|
}
|
|
4689
|
-
addFile(file$1, name) {
|
|
4690
|
-
name = name || file$1;
|
|
4691
|
-
const marker = { __source__: name };
|
|
4692
|
-
this.sources[name] = {
|
|
4677
|
+
addFile(file$1, name$1) {
|
|
4678
|
+
name$1 = name$1 || file$1;
|
|
4679
|
+
const marker = { __source__: name$1 };
|
|
4680
|
+
this.sources[name$1] = {
|
|
4693
4681
|
path: file$1,
|
|
4694
4682
|
type: "ini"
|
|
4695
4683
|
};
|
|
@@ -5109,8 +5097,8 @@ var require_registry_auth_token = /* @__PURE__ */ __commonJS({ "../../node_modul
|
|
|
5109
5097
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js
|
|
5110
5098
|
var require_valid$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js": ((exports, module) => {
|
|
5111
5099
|
const parse$4 = require_parse();
|
|
5112
|
-
const valid$1 = (version, options) => {
|
|
5113
|
-
const v = parse$4(version, options);
|
|
5100
|
+
const valid$1 = (version$1, options) => {
|
|
5101
|
+
const v = parse$4(version$1, options);
|
|
5114
5102
|
return v ? v.version : null;
|
|
5115
5103
|
};
|
|
5116
5104
|
module.exports = valid$1;
|
|
@@ -5120,8 +5108,8 @@ var require_valid$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/sem
|
|
|
5120
5108
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js
|
|
5121
5109
|
var require_clean = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js": ((exports, module) => {
|
|
5122
5110
|
const parse$3 = require_parse();
|
|
5123
|
-
const clean$1 = (version, options) => {
|
|
5124
|
-
const s = parse$3(version.trim().replace(/^[=v]+/, ""), options);
|
|
5111
|
+
const clean$1 = (version$1, options) => {
|
|
5112
|
+
const s = parse$3(version$1.trim().replace(/^[=v]+/, ""), options);
|
|
5125
5113
|
return s ? s.version : null;
|
|
5126
5114
|
};
|
|
5127
5115
|
module.exports = clean$1;
|
|
@@ -5131,14 +5119,14 @@ var require_clean = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
5131
5119
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js
|
|
5132
5120
|
var require_inc = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js": ((exports, module) => {
|
|
5133
5121
|
const SemVer$12 = require_semver$1();
|
|
5134
|
-
const inc$1 = (version, release, options, identifier, identifierBase) => {
|
|
5122
|
+
const inc$1 = (version$1, release, options, identifier, identifierBase) => {
|
|
5135
5123
|
if (typeof options === "string") {
|
|
5136
5124
|
identifierBase = identifier;
|
|
5137
5125
|
identifier = options;
|
|
5138
5126
|
options = void 0;
|
|
5139
5127
|
}
|
|
5140
5128
|
try {
|
|
5141
|
-
return new SemVer$12(version instanceof SemVer$12 ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
5129
|
+
return new SemVer$12(version$1 instanceof SemVer$12 ? version$1.version : version$1, options).inc(release, identifier, identifierBase).version;
|
|
5142
5130
|
} catch (er) {
|
|
5143
5131
|
return null;
|
|
5144
5132
|
}
|
|
@@ -5174,8 +5162,8 @@ var require_patch = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
5174
5162
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js
|
|
5175
5163
|
var require_prerelease = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js": ((exports, module) => {
|
|
5176
5164
|
const parse$2 = require_parse();
|
|
5177
|
-
const prerelease$1 = (version, options) => {
|
|
5178
|
-
const parsed = parse$2(version, options);
|
|
5165
|
+
const prerelease$1 = (version$1, options) => {
|
|
5166
|
+
const parsed = parse$2(version$1, options);
|
|
5179
5167
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
5180
5168
|
};
|
|
5181
5169
|
module.exports = prerelease$1;
|
|
@@ -5303,18 +5291,18 @@ var require_cmp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@
|
|
|
5303
5291
|
var require_coerce = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js": ((exports, module) => {
|
|
5304
5292
|
const SemVer$7 = require_semver$1();
|
|
5305
5293
|
const parse$1 = require_parse();
|
|
5306
|
-
const { safeRe: re$2, t: t$
|
|
5307
|
-
const coerce$1 = (version, options) => {
|
|
5308
|
-
if (version instanceof SemVer$7) return version;
|
|
5309
|
-
if (typeof version === "number") version = String(version);
|
|
5310
|
-
if (typeof version !== "string") return null;
|
|
5294
|
+
const { safeRe: re$2, t: t$2 } = require_re();
|
|
5295
|
+
const coerce$1 = (version$1, options) => {
|
|
5296
|
+
if (version$1 instanceof SemVer$7) return version$1;
|
|
5297
|
+
if (typeof version$1 === "number") version$1 = String(version$1);
|
|
5298
|
+
if (typeof version$1 !== "string") return null;
|
|
5311
5299
|
options = options || {};
|
|
5312
5300
|
let match = null;
|
|
5313
|
-
if (!options.rtl) match = version.match(options.includePrerelease ? re$2[t$
|
|
5301
|
+
if (!options.rtl) match = version$1.match(options.includePrerelease ? re$2[t$2.COERCEFULL] : re$2[t$2.COERCE]);
|
|
5314
5302
|
else {
|
|
5315
|
-
const coerceRtlRegex = options.includePrerelease ? re$2[t$
|
|
5303
|
+
const coerceRtlRegex = options.includePrerelease ? re$2[t$2.COERCERTLFULL] : re$2[t$2.COERCERTL];
|
|
5316
5304
|
let next;
|
|
5317
|
-
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
5305
|
+
while ((next = coerceRtlRegex.exec(version$1)) && (!match || match.index + match[0].length !== version$1.length)) {
|
|
5318
5306
|
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
5319
5307
|
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
5320
5308
|
}
|
|
@@ -5385,15 +5373,15 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
5385
5373
|
this.loose = !!options.loose;
|
|
5386
5374
|
this.includePrerelease = !!options.includePrerelease;
|
|
5387
5375
|
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
5388
|
-
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c$
|
|
5376
|
+
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c$1) => c$1.length);
|
|
5389
5377
|
if (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
5390
5378
|
if (this.set.length > 1) {
|
|
5391
5379
|
const first = this.set[0];
|
|
5392
|
-
this.set = this.set.filter((c$
|
|
5380
|
+
this.set = this.set.filter((c$1) => !isNullSet(c$1[0]));
|
|
5393
5381
|
if (this.set.length === 0) this.set = [first];
|
|
5394
5382
|
else if (this.set.length > 1) {
|
|
5395
|
-
for (const c$
|
|
5396
|
-
this.set = [c$
|
|
5383
|
+
for (const c$1 of this.set) if (c$1.length === 1 && isAny(c$1[0])) {
|
|
5384
|
+
this.set = [c$1];
|
|
5397
5385
|
break;
|
|
5398
5386
|
}
|
|
5399
5387
|
}
|
|
@@ -5426,19 +5414,19 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
5426
5414
|
const cached = cache.get(memoKey);
|
|
5427
5415
|
if (cached) return cached;
|
|
5428
5416
|
const loose = this.options.loose;
|
|
5429
|
-
const hr = loose ? re$1[t$
|
|
5417
|
+
const hr = loose ? re$1[t$1.HYPHENRANGELOOSE] : re$1[t$1.HYPHENRANGE];
|
|
5430
5418
|
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
5431
5419
|
debug$1("hyphen replace", range);
|
|
5432
|
-
range = range.replace(re$1[t$
|
|
5420
|
+
range = range.replace(re$1[t$1.COMPARATORTRIM], comparatorTrimReplace);
|
|
5433
5421
|
debug$1("comparator trim", range);
|
|
5434
|
-
range = range.replace(re$1[t$
|
|
5422
|
+
range = range.replace(re$1[t$1.TILDETRIM], tildeTrimReplace);
|
|
5435
5423
|
debug$1("tilde trim", range);
|
|
5436
|
-
range = range.replace(re$1[t$
|
|
5424
|
+
range = range.replace(re$1[t$1.CARETTRIM], caretTrimReplace);
|
|
5437
5425
|
debug$1("caret trim", range);
|
|
5438
5426
|
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
5439
5427
|
if (loose) rangeList = rangeList.filter((comp) => {
|
|
5440
5428
|
debug$1("loose invalid filter", comp, this.options);
|
|
5441
|
-
return !!comp.match(re$1[t$
|
|
5429
|
+
return !!comp.match(re$1[t$1.COMPARATORLOOSE]);
|
|
5442
5430
|
});
|
|
5443
5431
|
debug$1("range list", rangeList);
|
|
5444
5432
|
const rangeMap = /* @__PURE__ */ new Map();
|
|
@@ -5464,14 +5452,14 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
5464
5452
|
});
|
|
5465
5453
|
});
|
|
5466
5454
|
}
|
|
5467
|
-
test(version) {
|
|
5468
|
-
if (!version) return false;
|
|
5469
|
-
if (typeof version === "string") try {
|
|
5470
|
-
version = new SemVer$6(version, this.options);
|
|
5455
|
+
test(version$1) {
|
|
5456
|
+
if (!version$1) return false;
|
|
5457
|
+
if (typeof version$1 === "string") try {
|
|
5458
|
+
version$1 = new SemVer$6(version$1, this.options);
|
|
5471
5459
|
} catch (er) {
|
|
5472
5460
|
return false;
|
|
5473
5461
|
}
|
|
5474
|
-
for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true;
|
|
5462
|
+
for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version$1, this.options)) return true;
|
|
5475
5463
|
return false;
|
|
5476
5464
|
}
|
|
5477
5465
|
};
|
|
@@ -5482,10 +5470,10 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
5482
5470
|
const Comparator$4 = require_comparator();
|
|
5483
5471
|
const debug$1 = require_debug();
|
|
5484
5472
|
const SemVer$6 = require_semver$1();
|
|
5485
|
-
const { safeRe: re$1, t: t$
|
|
5473
|
+
const { safeRe: re$1, t: t$1, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
5486
5474
|
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
5487
|
-
const isNullSet = (c$
|
|
5488
|
-
const isAny = (c$
|
|
5475
|
+
const isNullSet = (c$1) => c$1.value === "<0.0.0-0";
|
|
5476
|
+
const isAny = (c$1) => c$1.value === "";
|
|
5489
5477
|
const isSatisfiable = (comparators, options) => {
|
|
5490
5478
|
let result = true;
|
|
5491
5479
|
const remainingComparators = comparators.slice();
|
|
@@ -5512,10 +5500,10 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
5512
5500
|
};
|
|
5513
5501
|
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
5514
5502
|
const replaceTildes = (comp, options) => {
|
|
5515
|
-
return comp.trim().split(/\s+/).map((c$
|
|
5503
|
+
return comp.trim().split(/\s+/).map((c$1) => replaceTilde(c$1, options)).join(" ");
|
|
5516
5504
|
};
|
|
5517
5505
|
const replaceTilde = (comp, options) => {
|
|
5518
|
-
const r = options.loose ? re$1[t$
|
|
5506
|
+
const r = options.loose ? re$1[t$1.TILDELOOSE] : re$1[t$1.TILDE];
|
|
5519
5507
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
5520
5508
|
debug$1("tilde", comp, _, M, m, p, pr);
|
|
5521
5509
|
let ret;
|
|
@@ -5531,11 +5519,11 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
5531
5519
|
});
|
|
5532
5520
|
};
|
|
5533
5521
|
const replaceCarets = (comp, options) => {
|
|
5534
|
-
return comp.trim().split(/\s+/).map((c$
|
|
5522
|
+
return comp.trim().split(/\s+/).map((c$1) => replaceCaret(c$1, options)).join(" ");
|
|
5535
5523
|
};
|
|
5536
5524
|
const replaceCaret = (comp, options) => {
|
|
5537
5525
|
debug$1("caret", comp, options);
|
|
5538
|
-
const r = options.loose ? re$1[t$
|
|
5526
|
+
const r = options.loose ? re$1[t$1.CARETLOOSE] : re$1[t$1.CARET];
|
|
5539
5527
|
const z = options.includePrerelease ? "-0" : "";
|
|
5540
5528
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
5541
5529
|
debug$1("caret", comp, _, M, m, p, pr);
|
|
@@ -5561,11 +5549,11 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
5561
5549
|
};
|
|
5562
5550
|
const replaceXRanges = (comp, options) => {
|
|
5563
5551
|
debug$1("replaceXRanges", comp, options);
|
|
5564
|
-
return comp.split(/\s+/).map((c$
|
|
5552
|
+
return comp.split(/\s+/).map((c$1) => replaceXRange(c$1, options)).join(" ");
|
|
5565
5553
|
};
|
|
5566
5554
|
const replaceXRange = (comp, options) => {
|
|
5567
5555
|
comp = comp.trim();
|
|
5568
|
-
const r = options.loose ? re$1[t$
|
|
5556
|
+
const r = options.loose ? re$1[t$1.XRANGELOOSE] : re$1[t$1.XRANGE];
|
|
5569
5557
|
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
5570
5558
|
debug$1("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
5571
5559
|
const xM = isX(M);
|
|
@@ -5604,11 +5592,11 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
5604
5592
|
};
|
|
5605
5593
|
const replaceStars = (comp, options) => {
|
|
5606
5594
|
debug$1("replaceStars", comp, options);
|
|
5607
|
-
return comp.trim().replace(re$1[t$
|
|
5595
|
+
return comp.trim().replace(re$1[t$1.STAR], "");
|
|
5608
5596
|
};
|
|
5609
5597
|
const replaceGTE0 = (comp, options) => {
|
|
5610
5598
|
debug$1("replaceGTE0", comp, options);
|
|
5611
|
-
return comp.trim().replace(re$1[options.includePrerelease ? t$
|
|
5599
|
+
return comp.trim().replace(re$1[options.includePrerelease ? t$1.GTE0PRE : t$1.GTE0], "");
|
|
5612
5600
|
};
|
|
5613
5601
|
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
5614
5602
|
if (isX(fM)) from = "";
|
|
@@ -5624,15 +5612,15 @@ var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semve
|
|
|
5624
5612
|
else to = `<=${to}`;
|
|
5625
5613
|
return `${from} ${to}`.trim();
|
|
5626
5614
|
};
|
|
5627
|
-
const testSet = (set, version, options) => {
|
|
5628
|
-
for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
|
|
5629
|
-
if (version.prerelease.length && !options.includePrerelease) {
|
|
5615
|
+
const testSet = (set, version$1, options) => {
|
|
5616
|
+
for (let i = 0; i < set.length; i++) if (!set[i].test(version$1)) return false;
|
|
5617
|
+
if (version$1.prerelease.length && !options.includePrerelease) {
|
|
5630
5618
|
for (let i = 0; i < set.length; i++) {
|
|
5631
5619
|
debug$1(set[i].semver);
|
|
5632
5620
|
if (set[i].semver === Comparator$4.ANY) continue;
|
|
5633
5621
|
if (set[i].semver.prerelease.length > 0) {
|
|
5634
5622
|
const allowed = set[i].semver;
|
|
5635
|
-
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
|
|
5623
|
+
if (allowed.major === version$1.major && allowed.minor === version$1.minor && allowed.patch === version$1.patch) return true;
|
|
5636
5624
|
}
|
|
5637
5625
|
}
|
|
5638
5626
|
return false;
|
|
@@ -5663,7 +5651,7 @@ var require_comparator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
5663
5651
|
debug("comp", this);
|
|
5664
5652
|
}
|
|
5665
5653
|
parse(comp) {
|
|
5666
|
-
const r = this.options.loose ? re[t
|
|
5654
|
+
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
5667
5655
|
const m = comp.match(r);
|
|
5668
5656
|
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
5669
5657
|
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
@@ -5674,15 +5662,15 @@ var require_comparator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
5674
5662
|
toString() {
|
|
5675
5663
|
return this.value;
|
|
5676
5664
|
}
|
|
5677
|
-
test(version) {
|
|
5678
|
-
debug("Comparator.test", version, this.options.loose);
|
|
5679
|
-
if (this.semver === ANY$2 || version === ANY$2) return true;
|
|
5680
|
-
if (typeof version === "string") try {
|
|
5681
|
-
version = new SemVer$5(version, this.options);
|
|
5665
|
+
test(version$1) {
|
|
5666
|
+
debug("Comparator.test", version$1, this.options.loose);
|
|
5667
|
+
if (this.semver === ANY$2 || version$1 === ANY$2) return true;
|
|
5668
|
+
if (typeof version$1 === "string") try {
|
|
5669
|
+
version$1 = new SemVer$5(version$1, this.options);
|
|
5682
5670
|
} catch (er) {
|
|
5683
5671
|
return false;
|
|
5684
5672
|
}
|
|
5685
|
-
return cmp$1(version, this.operator, this.semver, this.options);
|
|
5673
|
+
return cmp$1(version$1, this.operator, this.semver, this.options);
|
|
5686
5674
|
}
|
|
5687
5675
|
intersects(comp, options) {
|
|
5688
5676
|
if (!(comp instanceof Comparator$3)) throw new TypeError("a Comparator is required");
|
|
@@ -5706,7 +5694,7 @@ var require_comparator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
5706
5694
|
};
|
|
5707
5695
|
module.exports = Comparator$3;
|
|
5708
5696
|
const parseOptions = require_parse_options();
|
|
5709
|
-
const { safeRe: re, t
|
|
5697
|
+
const { safeRe: re, t } = require_re();
|
|
5710
5698
|
const cmp$1 = require_cmp();
|
|
5711
5699
|
const debug = require_debug();
|
|
5712
5700
|
const SemVer$5 = require_semver$1();
|
|
@@ -5717,13 +5705,13 @@ var require_comparator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
5717
5705
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js
|
|
5718
5706
|
var require_satisfies = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js": ((exports, module) => {
|
|
5719
5707
|
const Range$9 = require_range();
|
|
5720
|
-
const satisfies$4 = (version, range, options) => {
|
|
5708
|
+
const satisfies$4 = (version$1, range, options) => {
|
|
5721
5709
|
try {
|
|
5722
5710
|
range = new Range$9(range, options);
|
|
5723
5711
|
} catch (er) {
|
|
5724
5712
|
return false;
|
|
5725
5713
|
}
|
|
5726
|
-
return range.test(version);
|
|
5714
|
+
return range.test(version$1);
|
|
5727
5715
|
};
|
|
5728
5716
|
module.exports = satisfies$4;
|
|
5729
5717
|
}) });
|
|
@@ -5732,7 +5720,7 @@ var require_satisfies = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/s
|
|
|
5732
5720
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js
|
|
5733
5721
|
var require_to_comparators = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js": ((exports, module) => {
|
|
5734
5722
|
const Range$8 = require_range();
|
|
5735
|
-
const toComparators$1 = (range, options) => new Range$8(range, options).set.map((comp) => comp.map((c$
|
|
5723
|
+
const toComparators$1 = (range, options) => new Range$8(range, options).set.map((comp) => comp.map((c$1) => c$1.value).join(" ").trim().split(" "));
|
|
5736
5724
|
module.exports = toComparators$1;
|
|
5737
5725
|
}) });
|
|
5738
5726
|
|
|
@@ -5856,8 +5844,8 @@ var require_outside = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/sem
|
|
|
5856
5844
|
const lt$1 = require_lt();
|
|
5857
5845
|
const lte$1 = require_lte();
|
|
5858
5846
|
const gte$1 = require_gte();
|
|
5859
|
-
const outside$3 = (version, range, hilo, options) => {
|
|
5860
|
-
version = new SemVer$1(version, options);
|
|
5847
|
+
const outside$3 = (version$1, range, hilo, options) => {
|
|
5848
|
+
version$1 = new SemVer$1(version$1, options);
|
|
5861
5849
|
range = new Range$3(range, options);
|
|
5862
5850
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
5863
5851
|
switch (hilo) {
|
|
@@ -5877,7 +5865,7 @@ var require_outside = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/sem
|
|
|
5877
5865
|
break;
|
|
5878
5866
|
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
5879
5867
|
}
|
|
5880
|
-
if (satisfies$3(version, range, options)) return false;
|
|
5868
|
+
if (satisfies$3(version$1, range, options)) return false;
|
|
5881
5869
|
for (let i = 0; i < range.set.length; ++i) {
|
|
5882
5870
|
const comparators = range.set[i];
|
|
5883
5871
|
let high = null;
|
|
@@ -5890,8 +5878,8 @@ var require_outside = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/sem
|
|
|
5890
5878
|
else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
|
|
5891
5879
|
});
|
|
5892
5880
|
if (high.operator === comp || high.operator === ecomp) return false;
|
|
5893
|
-
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;
|
|
5894
|
-
else if (low.operator === ecomp && ltfn(version, low.semver)) return false;
|
|
5881
|
+
if ((!low.operator || low.operator === comp) && ltefn(version$1, low.semver)) return false;
|
|
5882
|
+
else if (low.operator === ecomp && ltfn(version$1, low.semver)) return false;
|
|
5895
5883
|
}
|
|
5896
5884
|
return true;
|
|
5897
5885
|
};
|
|
@@ -5902,7 +5890,7 @@ var require_outside = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/sem
|
|
|
5902
5890
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js
|
|
5903
5891
|
var require_gtr = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js": ((exports, module) => {
|
|
5904
5892
|
const outside$2 = require_outside();
|
|
5905
|
-
const gtr$1 = (version, range, options) => outside$2(version, range, ">", options);
|
|
5893
|
+
const gtr$1 = (version$1, range, options) => outside$2(version$1, range, ">", options);
|
|
5906
5894
|
module.exports = gtr$1;
|
|
5907
5895
|
}) });
|
|
5908
5896
|
|
|
@@ -5910,7 +5898,7 @@ var require_gtr = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@
|
|
|
5910
5898
|
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js
|
|
5911
5899
|
var require_ltr = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js": ((exports, module) => {
|
|
5912
5900
|
const outside$1 = require_outside();
|
|
5913
|
-
const ltr$1 = (version, range, options) => outside$1(version, range, "<", options);
|
|
5901
|
+
const ltr$1 = (version$1, range, options) => outside$1(version$1, range, "<", options);
|
|
5914
5902
|
module.exports = ltr$1;
|
|
5915
5903
|
}) });
|
|
5916
5904
|
|
|
@@ -5936,11 +5924,11 @@ var require_simplify = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/se
|
|
|
5936
5924
|
let first = null;
|
|
5937
5925
|
let prev = null;
|
|
5938
5926
|
const v = versions.sort((a, b) => compare$2(a, b, options));
|
|
5939
|
-
for (const version of v) {
|
|
5940
|
-
const included = satisfies$2(version, range, options);
|
|
5927
|
+
for (const version$1 of v) {
|
|
5928
|
+
const included = satisfies$2(version$1, range, options);
|
|
5941
5929
|
if (included) {
|
|
5942
|
-
prev = version;
|
|
5943
|
-
if (!first) first = version;
|
|
5930
|
+
prev = version$1;
|
|
5931
|
+
if (!first) first = version$1;
|
|
5944
5932
|
} else {
|
|
5945
5933
|
if (prev) set.push([first, prev]);
|
|
5946
5934
|
prev = null;
|
|
@@ -5994,9 +5982,9 @@ var require_subset = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semv
|
|
|
5994
5982
|
else dom = minimumVersion;
|
|
5995
5983
|
const eqSet = /* @__PURE__ */ new Set();
|
|
5996
5984
|
let gt$5, lt$4;
|
|
5997
|
-
for (const c$
|
|
5998
|
-
else if (c$
|
|
5999
|
-
else eqSet.add(c$
|
|
5985
|
+
for (const c$1 of sub) if (c$1.operator === ">" || c$1.operator === ">=") gt$5 = higherGT(gt$5, c$1, options);
|
|
5986
|
+
else if (c$1.operator === "<" || c$1.operator === "<=") lt$4 = lowerLT(lt$4, c$1, options);
|
|
5987
|
+
else eqSet.add(c$1.semver);
|
|
6000
5988
|
if (eqSet.size > 1) return null;
|
|
6001
5989
|
let gtltComp;
|
|
6002
5990
|
if (gt$5 && lt$4) {
|
|
@@ -6007,7 +5995,7 @@ var require_subset = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semv
|
|
|
6007
5995
|
for (const eq$3 of eqSet) {
|
|
6008
5996
|
if (gt$5 && !satisfies$1(eq$3, String(gt$5), options)) return null;
|
|
6009
5997
|
if (lt$4 && !satisfies$1(eq$3, String(lt$4), options)) return null;
|
|
6010
|
-
for (const c$
|
|
5998
|
+
for (const c$1 of dom) if (!satisfies$1(eq$3, String(c$1), options)) return false;
|
|
6011
5999
|
return true;
|
|
6012
6000
|
}
|
|
6013
6001
|
let higher, lower;
|
|
@@ -6015,28 +6003,28 @@ var require_subset = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semv
|
|
|
6015
6003
|
let needDomLTPre = lt$4 && !options.includePrerelease && lt$4.semver.prerelease.length ? lt$4.semver : false;
|
|
6016
6004
|
let needDomGTPre = gt$5 && !options.includePrerelease && gt$5.semver.prerelease.length ? gt$5.semver : false;
|
|
6017
6005
|
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt$4.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
6018
|
-
for (const c$
|
|
6019
|
-
hasDomGT = hasDomGT || c$
|
|
6020
|
-
hasDomLT = hasDomLT || c$
|
|
6006
|
+
for (const c$1 of dom) {
|
|
6007
|
+
hasDomGT = hasDomGT || c$1.operator === ">" || c$1.operator === ">=";
|
|
6008
|
+
hasDomLT = hasDomLT || c$1.operator === "<" || c$1.operator === "<=";
|
|
6021
6009
|
if (gt$5) {
|
|
6022
6010
|
if (needDomGTPre) {
|
|
6023
|
-
if (c$
|
|
6011
|
+
if (c$1.semver.prerelease && c$1.semver.prerelease.length && c$1.semver.major === needDomGTPre.major && c$1.semver.minor === needDomGTPre.minor && c$1.semver.patch === needDomGTPre.patch) needDomGTPre = false;
|
|
6024
6012
|
}
|
|
6025
|
-
if (c$
|
|
6026
|
-
higher = higherGT(gt$5, c$
|
|
6027
|
-
if (higher === c$
|
|
6028
|
-
} else if (gt$5.operator === ">=" && !satisfies$1(gt$5.semver, String(c$
|
|
6013
|
+
if (c$1.operator === ">" || c$1.operator === ">=") {
|
|
6014
|
+
higher = higherGT(gt$5, c$1, options);
|
|
6015
|
+
if (higher === c$1 && higher !== gt$5) return false;
|
|
6016
|
+
} else if (gt$5.operator === ">=" && !satisfies$1(gt$5.semver, String(c$1), options)) return false;
|
|
6029
6017
|
}
|
|
6030
6018
|
if (lt$4) {
|
|
6031
6019
|
if (needDomLTPre) {
|
|
6032
|
-
if (c$
|
|
6020
|
+
if (c$1.semver.prerelease && c$1.semver.prerelease.length && c$1.semver.major === needDomLTPre.major && c$1.semver.minor === needDomLTPre.minor && c$1.semver.patch === needDomLTPre.patch) needDomLTPre = false;
|
|
6033
6021
|
}
|
|
6034
|
-
if (c$
|
|
6035
|
-
lower = lowerLT(lt$4, c$
|
|
6036
|
-
if (lower === c$
|
|
6037
|
-
} else if (lt$4.operator === "<=" && !satisfies$1(lt$4.semver, String(c$
|
|
6022
|
+
if (c$1.operator === "<" || c$1.operator === "<=") {
|
|
6023
|
+
lower = lowerLT(lt$4, c$1, options);
|
|
6024
|
+
if (lower === c$1 && lower !== lt$4) return false;
|
|
6025
|
+
} else if (lt$4.operator === "<=" && !satisfies$1(lt$4.semver, String(c$1), options)) return false;
|
|
6038
6026
|
}
|
|
6039
|
-
if (!c$
|
|
6027
|
+
if (!c$1.operator && (lt$4 || gt$5) && gtltComp !== 0) return false;
|
|
6040
6028
|
}
|
|
6041
6029
|
if (gt$5 && hasDomLT && !lt$4 && gtltComp !== 0) return false;
|
|
6042
6030
|
if (lt$4 && hasDomGT && !gt$5 && gtltComp !== 0) return false;
|
|
@@ -6067,7 +6055,7 @@ var require_semver = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semv
|
|
|
6067
6055
|
const valid = require_valid$1();
|
|
6068
6056
|
const clean = require_clean();
|
|
6069
6057
|
const inc = require_inc();
|
|
6070
|
-
const diff = require_diff();
|
|
6058
|
+
const diff$1 = require_diff();
|
|
6071
6059
|
const major = require_major();
|
|
6072
6060
|
const minor = require_minor();
|
|
6073
6061
|
const patch = require_patch();
|
|
@@ -6105,7 +6093,7 @@ var require_semver = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semv
|
|
|
6105
6093
|
valid,
|
|
6106
6094
|
clean,
|
|
6107
6095
|
inc,
|
|
6108
|
-
diff,
|
|
6096
|
+
diff: diff$1,
|
|
6109
6097
|
major,
|
|
6110
6098
|
minor,
|
|
6111
6099
|
patch,
|
|
@@ -6160,13 +6148,13 @@ var PackageNotFoundError = class extends Error {
|
|
|
6160
6148
|
}
|
|
6161
6149
|
};
|
|
6162
6150
|
var VersionNotFoundError = class extends Error {
|
|
6163
|
-
constructor(packageName, version) {
|
|
6164
|
-
super(`Version \`${version}\` for package \`${packageName}\` could not be found`);
|
|
6151
|
+
constructor(packageName, version$1) {
|
|
6152
|
+
super(`Version \`${version$1}\` for package \`${packageName}\` could not be found`);
|
|
6165
6153
|
this.name = "VersionNotFoundError";
|
|
6166
6154
|
}
|
|
6167
6155
|
};
|
|
6168
6156
|
async function packageJson$1(packageName, options = {}) {
|
|
6169
|
-
let { version = "latest" } = options;
|
|
6157
|
+
let { version: version$1 = "latest" } = options;
|
|
6170
6158
|
const { omitDeprecated = true } = options;
|
|
6171
6159
|
const scope = packageName.split("/")[0];
|
|
6172
6160
|
const registryUrl_ = options.registryUrl ?? registryUrl(scope);
|
|
@@ -6186,23 +6174,23 @@ async function packageJson$1(packageName, options = {}) {
|
|
|
6186
6174
|
throw error;
|
|
6187
6175
|
}
|
|
6188
6176
|
if (options.allVersions) return data;
|
|
6189
|
-
const versionError = new VersionNotFoundError(packageName, version);
|
|
6190
|
-
if (data["dist-tags"][version]) {
|
|
6177
|
+
const versionError = new VersionNotFoundError(packageName, version$1);
|
|
6178
|
+
if (data["dist-tags"][version$1]) {
|
|
6191
6179
|
const { time } = data;
|
|
6192
|
-
data = data.versions[data["dist-tags"][version]];
|
|
6180
|
+
data = data.versions[data["dist-tags"][version$1]];
|
|
6193
6181
|
data.time = time;
|
|
6194
|
-
} else if (version) {
|
|
6195
|
-
const versionExists = Boolean(data.versions[version]);
|
|
6182
|
+
} else if (version$1) {
|
|
6183
|
+
const versionExists = Boolean(data.versions[version$1]);
|
|
6196
6184
|
if (omitDeprecated && !versionExists) {
|
|
6197
6185
|
for (const [metadataVersion, metadata] of Object.entries(data.versions)) if (metadata.deprecated) delete data.versions[metadataVersion];
|
|
6198
6186
|
}
|
|
6199
6187
|
if (!versionExists) {
|
|
6200
6188
|
const versions = Object.keys(data.versions);
|
|
6201
|
-
version = import_semver.default.maxSatisfying(versions, version);
|
|
6202
|
-
if (!version) throw versionError;
|
|
6189
|
+
version$1 = import_semver.default.maxSatisfying(versions, version$1);
|
|
6190
|
+
if (!version$1) throw versionError;
|
|
6203
6191
|
}
|
|
6204
6192
|
const { time } = data;
|
|
6205
|
-
data = data.versions[version];
|
|
6193
|
+
data = data.versions[version$1];
|
|
6206
6194
|
data.time = time;
|
|
6207
6195
|
if (!data) throw versionError;
|
|
6208
6196
|
}
|
|
@@ -6212,8 +6200,8 @@ async function packageJson$1(packageName, options = {}) {
|
|
|
6212
6200
|
//#endregion
|
|
6213
6201
|
//#region ../../node_modules/.pnpm/latest-version@9.0.0/node_modules/latest-version/index.js
|
|
6214
6202
|
async function latestVersion(packageName, options) {
|
|
6215
|
-
const { version } = await packageJson$1(packageName.toLowerCase(), options);
|
|
6216
|
-
return version;
|
|
6203
|
+
const { version: version$1 } = await packageJson$1(packageName.toLowerCase(), options);
|
|
6204
|
+
return version$1;
|
|
6217
6205
|
}
|
|
6218
6206
|
|
|
6219
6207
|
//#endregion
|
|
@@ -6360,14 +6348,14 @@ var require_ini = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ini@4.1
|
|
|
6360
6348
|
let esc = false;
|
|
6361
6349
|
let unesc = "";
|
|
6362
6350
|
for (let i = 0, l = val.length; i < l; i++) {
|
|
6363
|
-
const c$
|
|
6351
|
+
const c$1 = val.charAt(i);
|
|
6364
6352
|
if (esc) {
|
|
6365
|
-
if ("\\;#".indexOf(c$
|
|
6366
|
-
else unesc += "\\" + c$
|
|
6353
|
+
if ("\\;#".indexOf(c$1) !== -1) unesc += c$1;
|
|
6354
|
+
else unesc += "\\" + c$1;
|
|
6367
6355
|
esc = false;
|
|
6368
|
-
} else if (";#".indexOf(c$
|
|
6369
|
-
else if (c$
|
|
6370
|
-
else unesc += c$
|
|
6356
|
+
} else if (";#".indexOf(c$1) !== -1) break;
|
|
6357
|
+
else if (c$1 === "\\") esc = true;
|
|
6358
|
+
else unesc += c$1;
|
|
6371
6359
|
}
|
|
6372
6360
|
if (esc) unesc += "\\";
|
|
6373
6361
|
return unesc.trim();
|
|
@@ -6390,43 +6378,43 @@ var import_ini = /* @__PURE__ */ __toESM(require_ini(), 1);
|
|
|
6390
6378
|
const isWindows = process$1.platform === "win32";
|
|
6391
6379
|
const readRc = (filePath) => {
|
|
6392
6380
|
try {
|
|
6393
|
-
return import_ini.default.parse(fs
|
|
6381
|
+
return import_ini.default.parse(fs.readFileSync(filePath, "utf8")).prefix;
|
|
6394
6382
|
} catch {}
|
|
6395
6383
|
};
|
|
6396
|
-
const getEnvNpmPrefix = () => Object.keys(process$1.env).reduce((prefix, name) => /^npm_config_prefix$/i.test(name) ? process$1.env[name] : prefix, void 0);
|
|
6384
|
+
const getEnvNpmPrefix = () => Object.keys(process$1.env).reduce((prefix, name$1) => /^npm_config_prefix$/i.test(name$1) ? process$1.env[name$1] : prefix, void 0);
|
|
6397
6385
|
const getGlobalNpmrc = () => {
|
|
6398
|
-
if (isWindows && process$1.env.APPDATA) return path
|
|
6386
|
+
if (isWindows && process$1.env.APPDATA) return path.join(process$1.env.APPDATA, "/npm/etc/npmrc");
|
|
6399
6387
|
if (process$1.execPath.includes("/Cellar/node")) {
|
|
6400
6388
|
const homebrewPrefix = process$1.execPath.slice(0, process$1.execPath.indexOf("/Cellar/node"));
|
|
6401
|
-
return path
|
|
6389
|
+
return path.join(homebrewPrefix, "/lib/node_modules/npm/npmrc");
|
|
6402
6390
|
}
|
|
6403
6391
|
if (process$1.execPath.endsWith("/bin/node")) {
|
|
6404
|
-
const installDir = path
|
|
6405
|
-
return path
|
|
6392
|
+
const installDir = path.dirname(path.dirname(process$1.execPath));
|
|
6393
|
+
return path.join(installDir, "/etc/npmrc");
|
|
6406
6394
|
}
|
|
6407
6395
|
};
|
|
6408
6396
|
const getDefaultNpmPrefix = () => {
|
|
6409
6397
|
if (isWindows) {
|
|
6410
6398
|
const { APPDATA } = process$1.env;
|
|
6411
|
-
return APPDATA ? path
|
|
6399
|
+
return APPDATA ? path.join(APPDATA, "npm") : path.dirname(process$1.execPath);
|
|
6412
6400
|
}
|
|
6413
|
-
return path
|
|
6401
|
+
return path.dirname(path.dirname(process$1.execPath));
|
|
6414
6402
|
};
|
|
6415
6403
|
const getNpmPrefix = () => {
|
|
6416
6404
|
const envPrefix = getEnvNpmPrefix();
|
|
6417
6405
|
if (envPrefix) return envPrefix;
|
|
6418
|
-
const homePrefix = readRc(path
|
|
6406
|
+
const homePrefix = readRc(path.join(os.homedir(), ".npmrc"));
|
|
6419
6407
|
if (homePrefix) return homePrefix;
|
|
6420
6408
|
if (process$1.env.PREFIX) return process$1.env.PREFIX;
|
|
6421
6409
|
const globalPrefix$1 = readRc(getGlobalNpmrc());
|
|
6422
6410
|
if (globalPrefix$1) return globalPrefix$1;
|
|
6423
6411
|
return getDefaultNpmPrefix();
|
|
6424
6412
|
};
|
|
6425
|
-
const npmPrefix = path
|
|
6413
|
+
const npmPrefix = path.resolve(getNpmPrefix());
|
|
6426
6414
|
const getYarnWindowsDirectory = () => {
|
|
6427
6415
|
if (isWindows && process$1.env.LOCALAPPDATA) {
|
|
6428
|
-
const dir = path
|
|
6429
|
-
if (fs
|
|
6416
|
+
const dir = path.join(process$1.env.LOCALAPPDATA, "Yarn");
|
|
6417
|
+
if (fs.existsSync(dir)) return dir;
|
|
6430
6418
|
}
|
|
6431
6419
|
return false;
|
|
6432
6420
|
};
|
|
@@ -6434,924 +6422,43 @@ const getYarnPrefix = () => {
|
|
|
6434
6422
|
if (process$1.env.PREFIX) return process$1.env.PREFIX;
|
|
6435
6423
|
const windowsPrefix = getYarnWindowsDirectory();
|
|
6436
6424
|
if (windowsPrefix) return windowsPrefix;
|
|
6437
|
-
const configPrefix = path
|
|
6438
|
-
if (fs
|
|
6439
|
-
const homePrefix = path
|
|
6440
|
-
if (fs
|
|
6425
|
+
const configPrefix = path.join(os.homedir(), ".config/yarn");
|
|
6426
|
+
if (fs.existsSync(configPrefix)) return configPrefix;
|
|
6427
|
+
const homePrefix = path.join(os.homedir(), ".yarn-config");
|
|
6428
|
+
if (fs.existsSync(homePrefix)) return homePrefix;
|
|
6441
6429
|
return npmPrefix;
|
|
6442
6430
|
};
|
|
6443
6431
|
const globalDirectory = {};
|
|
6444
6432
|
globalDirectory.npm = {};
|
|
6445
6433
|
globalDirectory.npm.prefix = npmPrefix;
|
|
6446
|
-
globalDirectory.npm.packages = path
|
|
6447
|
-
globalDirectory.npm.binaries = isWindows ? npmPrefix : path
|
|
6448
|
-
const yarnPrefix = path
|
|
6434
|
+
globalDirectory.npm.packages = path.join(npmPrefix, isWindows ? "node_modules" : "lib/node_modules");
|
|
6435
|
+
globalDirectory.npm.binaries = isWindows ? npmPrefix : path.join(npmPrefix, "bin");
|
|
6436
|
+
const yarnPrefix = path.resolve(getYarnPrefix());
|
|
6449
6437
|
globalDirectory.yarn = {};
|
|
6450
6438
|
globalDirectory.yarn.prefix = yarnPrefix;
|
|
6451
|
-
globalDirectory.yarn.packages = path
|
|
6452
|
-
globalDirectory.yarn.binaries = path
|
|
6439
|
+
globalDirectory.yarn.packages = path.join(yarnPrefix, getYarnWindowsDirectory() ? "Data/global/node_modules" : "global/node_modules");
|
|
6440
|
+
globalDirectory.yarn.binaries = path.join(globalDirectory.yarn.packages, ".bin");
|
|
6453
6441
|
var global_directory_default = globalDirectory;
|
|
6454
6442
|
|
|
6455
6443
|
//#endregion
|
|
6456
6444
|
//#region ../../node_modules/.pnpm/is-path-inside@4.0.0/node_modules/is-path-inside/index.js
|
|
6457
6445
|
function isPathInside(childPath, parentPath) {
|
|
6458
|
-
const relation = path
|
|
6459
|
-
return Boolean(relation && relation !== ".." && !relation.startsWith(`..${path
|
|
6446
|
+
const relation = path.relative(parentPath, childPath);
|
|
6447
|
+
return Boolean(relation && relation !== ".." && !relation.startsWith(`..${path.sep}`) && relation !== path.resolve(childPath));
|
|
6460
6448
|
}
|
|
6461
6449
|
|
|
6462
6450
|
//#endregion
|
|
6463
6451
|
//#region ../../node_modules/.pnpm/is-installed-globally@1.0.0/node_modules/is-installed-globally/index.js
|
|
6464
|
-
const __dirname$1 = path
|
|
6452
|
+
const __dirname$1 = path.dirname(fileURLToPath(import.meta.url));
|
|
6465
6453
|
const isInstalledGlobally = (() => {
|
|
6466
6454
|
try {
|
|
6467
|
-
return isPathInside(__dirname$1, global_directory_default.yarn.packages) || isPathInside(__dirname$1, fs
|
|
6455
|
+
return isPathInside(__dirname$1, global_directory_default.yarn.packages) || isPathInside(__dirname$1, fs.realpathSync(global_directory_default.npm.packages));
|
|
6468
6456
|
} catch {
|
|
6469
6457
|
return false;
|
|
6470
6458
|
}
|
|
6471
6459
|
})();
|
|
6472
6460
|
var is_installed_globally_default = isInstalledGlobally;
|
|
6473
6461
|
|
|
6474
|
-
//#endregion
|
|
6475
|
-
//#region ../../node_modules/.pnpm/ansi-regex@6.1.0/node_modules/ansi-regex/index.js
|
|
6476
|
-
function ansiRegex$1({ onlyFirst = false } = {}) {
|
|
6477
|
-
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
6478
|
-
const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
6479
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
6480
|
-
}
|
|
6481
|
-
|
|
6482
|
-
//#endregion
|
|
6483
|
-
//#region ../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
|
|
6484
|
-
const regex = ansiRegex$1();
|
|
6485
|
-
function stripAnsi(string) {
|
|
6486
|
-
if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
6487
|
-
return string.replace(regex, "");
|
|
6488
|
-
}
|
|
6489
|
-
|
|
6490
|
-
//#endregion
|
|
6491
|
-
//#region ../../node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/lookup.js
|
|
6492
|
-
function isAmbiguous(x) {
|
|
6493
|
-
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;
|
|
6494
|
-
}
|
|
6495
|
-
function isFullWidth(x) {
|
|
6496
|
-
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
6497
|
-
}
|
|
6498
|
-
function isWide(x) {
|
|
6499
|
-
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 >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || 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 <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && 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 >= 101631 && 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 >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || 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 <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
6500
|
-
}
|
|
6501
|
-
|
|
6502
|
-
//#endregion
|
|
6503
|
-
//#region ../../node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/index.js
|
|
6504
|
-
function validate(codePoint) {
|
|
6505
|
-
if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
6506
|
-
}
|
|
6507
|
-
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
6508
|
-
validate(codePoint);
|
|
6509
|
-
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) return 2;
|
|
6510
|
-
return 1;
|
|
6511
|
-
}
|
|
6512
|
-
|
|
6513
|
-
//#endregion
|
|
6514
|
-
//#region ../../node_modules/.pnpm/emoji-regex@10.4.0/node_modules/emoji-regex/index.js
|
|
6515
|
-
var require_emoji_regex$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/emoji-regex@10.4.0/node_modules/emoji-regex/index.js": ((exports, module) => {
|
|
6516
|
-
module.exports = () => {
|
|
6517
|
-
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\uDC70\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-\uDED7\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\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\uDD3D\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-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\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]|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\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;
|
|
6518
|
-
};
|
|
6519
|
-
}) });
|
|
6520
|
-
|
|
6521
|
-
//#endregion
|
|
6522
|
-
//#region ../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
|
|
6523
|
-
var import_emoji_regex = /* @__PURE__ */ __toESM(require_emoji_regex$1(), 1);
|
|
6524
|
-
const segmenter = new Intl.Segmenter();
|
|
6525
|
-
const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
6526
|
-
function stringWidth(string, options = {}) {
|
|
6527
|
-
if (typeof string !== "string" || string.length === 0) return 0;
|
|
6528
|
-
const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
|
|
6529
|
-
if (!countAnsiEscapeCodes) string = stripAnsi(string);
|
|
6530
|
-
if (string.length === 0) return 0;
|
|
6531
|
-
let width = 0;
|
|
6532
|
-
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
6533
|
-
for (const { segment: character } of segmenter.segment(string)) {
|
|
6534
|
-
const codePoint = character.codePointAt(0);
|
|
6535
|
-
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
|
|
6536
|
-
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) continue;
|
|
6537
|
-
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) continue;
|
|
6538
|
-
if (codePoint >= 55296 && codePoint <= 57343) continue;
|
|
6539
|
-
if (codePoint >= 65024 && codePoint <= 65039) continue;
|
|
6540
|
-
if (defaultIgnorableCodePointRegex.test(character)) continue;
|
|
6541
|
-
if ((0, import_emoji_regex.default)().test(character)) {
|
|
6542
|
-
width += 2;
|
|
6543
|
-
continue;
|
|
6544
|
-
}
|
|
6545
|
-
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
6546
|
-
}
|
|
6547
|
-
return width;
|
|
6548
|
-
}
|
|
6549
|
-
|
|
6550
|
-
//#endregion
|
|
6551
|
-
//#region ../../node_modules/.pnpm/widest-line@5.0.0/node_modules/widest-line/index.js
|
|
6552
|
-
function widestLine(string) {
|
|
6553
|
-
let lineWidth = 0;
|
|
6554
|
-
for (const line of string.split("\n")) lineWidth = Math.max(lineWidth, stringWidth(line));
|
|
6555
|
-
return lineWidth;
|
|
6556
|
-
}
|
|
6557
|
-
|
|
6558
|
-
//#endregion
|
|
6559
|
-
//#region ../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json
|
|
6560
|
-
var require_boxes = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json": ((exports, module) => {
|
|
6561
|
-
module.exports = {
|
|
6562
|
-
"single": {
|
|
6563
|
-
"topLeft": "┌",
|
|
6564
|
-
"top": "─",
|
|
6565
|
-
"topRight": "┐",
|
|
6566
|
-
"right": "│",
|
|
6567
|
-
"bottomRight": "┘",
|
|
6568
|
-
"bottom": "─",
|
|
6569
|
-
"bottomLeft": "└",
|
|
6570
|
-
"left": "│"
|
|
6571
|
-
},
|
|
6572
|
-
"double": {
|
|
6573
|
-
"topLeft": "╔",
|
|
6574
|
-
"top": "═",
|
|
6575
|
-
"topRight": "╗",
|
|
6576
|
-
"right": "║",
|
|
6577
|
-
"bottomRight": "╝",
|
|
6578
|
-
"bottom": "═",
|
|
6579
|
-
"bottomLeft": "╚",
|
|
6580
|
-
"left": "║"
|
|
6581
|
-
},
|
|
6582
|
-
"round": {
|
|
6583
|
-
"topLeft": "╭",
|
|
6584
|
-
"top": "─",
|
|
6585
|
-
"topRight": "╮",
|
|
6586
|
-
"right": "│",
|
|
6587
|
-
"bottomRight": "╯",
|
|
6588
|
-
"bottom": "─",
|
|
6589
|
-
"bottomLeft": "╰",
|
|
6590
|
-
"left": "│"
|
|
6591
|
-
},
|
|
6592
|
-
"bold": {
|
|
6593
|
-
"topLeft": "┏",
|
|
6594
|
-
"top": "━",
|
|
6595
|
-
"topRight": "┓",
|
|
6596
|
-
"right": "┃",
|
|
6597
|
-
"bottomRight": "┛",
|
|
6598
|
-
"bottom": "━",
|
|
6599
|
-
"bottomLeft": "┗",
|
|
6600
|
-
"left": "┃"
|
|
6601
|
-
},
|
|
6602
|
-
"singleDouble": {
|
|
6603
|
-
"topLeft": "╓",
|
|
6604
|
-
"top": "─",
|
|
6605
|
-
"topRight": "╖",
|
|
6606
|
-
"right": "║",
|
|
6607
|
-
"bottomRight": "╜",
|
|
6608
|
-
"bottom": "─",
|
|
6609
|
-
"bottomLeft": "╙",
|
|
6610
|
-
"left": "║"
|
|
6611
|
-
},
|
|
6612
|
-
"doubleSingle": {
|
|
6613
|
-
"topLeft": "╒",
|
|
6614
|
-
"top": "═",
|
|
6615
|
-
"topRight": "╕",
|
|
6616
|
-
"right": "│",
|
|
6617
|
-
"bottomRight": "╛",
|
|
6618
|
-
"bottom": "═",
|
|
6619
|
-
"bottomLeft": "╘",
|
|
6620
|
-
"left": "│"
|
|
6621
|
-
},
|
|
6622
|
-
"classic": {
|
|
6623
|
-
"topLeft": "+",
|
|
6624
|
-
"top": "-",
|
|
6625
|
-
"topRight": "+",
|
|
6626
|
-
"right": "|",
|
|
6627
|
-
"bottomRight": "+",
|
|
6628
|
-
"bottom": "-",
|
|
6629
|
-
"bottomLeft": "+",
|
|
6630
|
-
"left": "|"
|
|
6631
|
-
},
|
|
6632
|
-
"arrow": {
|
|
6633
|
-
"topLeft": "↘",
|
|
6634
|
-
"top": "↓",
|
|
6635
|
-
"topRight": "↙",
|
|
6636
|
-
"right": "←",
|
|
6637
|
-
"bottomRight": "↖",
|
|
6638
|
-
"bottom": "↑",
|
|
6639
|
-
"bottomLeft": "↗",
|
|
6640
|
-
"left": "→"
|
|
6641
|
-
}
|
|
6642
|
-
};
|
|
6643
|
-
}) });
|
|
6644
|
-
|
|
6645
|
-
//#endregion
|
|
6646
|
-
//#region ../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/index.js
|
|
6647
|
-
var require_cli_boxes = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/index.js": ((exports, module) => {
|
|
6648
|
-
const cliBoxes$1 = require_boxes();
|
|
6649
|
-
module.exports = cliBoxes$1;
|
|
6650
|
-
module.exports.default = cliBoxes$1;
|
|
6651
|
-
}) });
|
|
6652
|
-
|
|
6653
|
-
//#endregion
|
|
6654
|
-
//#region ../../node_modules/.pnpm/camelcase@8.0.0/node_modules/camelcase/index.js
|
|
6655
|
-
const UPPERCASE = /[\p{Lu}]/u;
|
|
6656
|
-
const LOWERCASE = /[\p{Ll}]/u;
|
|
6657
|
-
const LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
|
|
6658
|
-
const IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
|
|
6659
|
-
const SEPARATORS = /[_.\- ]+/;
|
|
6660
|
-
const LEADING_SEPARATORS = /* @__PURE__ */ new RegExp("^" + SEPARATORS.source);
|
|
6661
|
-
const SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
|
|
6662
|
-
const NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
|
|
6663
|
-
const preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase$1) => {
|
|
6664
|
-
let isLastCharLower = false;
|
|
6665
|
-
let isLastCharUpper = false;
|
|
6666
|
-
let isLastLastCharUpper = false;
|
|
6667
|
-
let isLastLastCharPreserved = false;
|
|
6668
|
-
for (let index = 0; index < string.length; index++) {
|
|
6669
|
-
const character = string[index];
|
|
6670
|
-
isLastLastCharPreserved = index > 2 ? string[index - 3] === "-" : true;
|
|
6671
|
-
if (isLastCharLower && UPPERCASE.test(character)) {
|
|
6672
|
-
string = string.slice(0, index) + "-" + string.slice(index);
|
|
6673
|
-
isLastCharLower = false;
|
|
6674
|
-
isLastLastCharUpper = isLastCharUpper;
|
|
6675
|
-
isLastCharUpper = true;
|
|
6676
|
-
index++;
|
|
6677
|
-
} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase$1)) {
|
|
6678
|
-
string = string.slice(0, index - 1) + "-" + string.slice(index - 1);
|
|
6679
|
-
isLastLastCharUpper = isLastCharUpper;
|
|
6680
|
-
isLastCharUpper = false;
|
|
6681
|
-
isLastCharLower = true;
|
|
6682
|
-
} else {
|
|
6683
|
-
isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
|
|
6684
|
-
isLastLastCharUpper = isLastCharUpper;
|
|
6685
|
-
isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
|
|
6686
|
-
}
|
|
6687
|
-
}
|
|
6688
|
-
return string;
|
|
6689
|
-
};
|
|
6690
|
-
const preserveConsecutiveUppercase = (input, toLowerCase) => {
|
|
6691
|
-
LEADING_CAPITAL.lastIndex = 0;
|
|
6692
|
-
return input.replaceAll(LEADING_CAPITAL, (match) => toLowerCase(match));
|
|
6693
|
-
};
|
|
6694
|
-
const postProcess = (input, toUpperCase) => {
|
|
6695
|
-
SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
|
|
6696
|
-
NUMBERS_AND_IDENTIFIER.lastIndex = 0;
|
|
6697
|
-
return input.replaceAll(NUMBERS_AND_IDENTIFIER, (match, pattern, offset) => ["_", "-"].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match)).replaceAll(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier));
|
|
6698
|
-
};
|
|
6699
|
-
function camelCase(input, options) {
|
|
6700
|
-
if (!(typeof input === "string" || Array.isArray(input))) throw new TypeError("Expected the input to be `string | string[]`");
|
|
6701
|
-
options = {
|
|
6702
|
-
pascalCase: false,
|
|
6703
|
-
preserveConsecutiveUppercase: false,
|
|
6704
|
-
...options
|
|
6705
|
-
};
|
|
6706
|
-
if (Array.isArray(input)) input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
|
|
6707
|
-
else input = input.trim();
|
|
6708
|
-
if (input.length === 0) return "";
|
|
6709
|
-
const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
|
|
6710
|
-
const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
|
|
6711
|
-
if (input.length === 1) {
|
|
6712
|
-
if (SEPARATORS.test(input)) return "";
|
|
6713
|
-
return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
|
|
6714
|
-
}
|
|
6715
|
-
const hasUpperCase = input !== toLowerCase(input);
|
|
6716
|
-
if (hasUpperCase) input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);
|
|
6717
|
-
input = input.replace(LEADING_SEPARATORS, "");
|
|
6718
|
-
input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
|
|
6719
|
-
if (options.pascalCase) input = toUpperCase(input.charAt(0)) + input.slice(1);
|
|
6720
|
-
return postProcess(input, toUpperCase);
|
|
6721
|
-
}
|
|
6722
|
-
|
|
6723
|
-
//#endregion
|
|
6724
|
-
//#region ../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
|
|
6725
|
-
var require_ansi_regex = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js": ((exports, module) => {
|
|
6726
|
-
module.exports = ({ onlyFirst = false } = {}) => {
|
|
6727
|
-
const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
|
|
6728
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
6729
|
-
};
|
|
6730
|
-
}) });
|
|
6731
|
-
|
|
6732
|
-
//#endregion
|
|
6733
|
-
//#region ../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
|
|
6734
|
-
var require_strip_ansi = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js": ((exports, module) => {
|
|
6735
|
-
const ansiRegex = require_ansi_regex();
|
|
6736
|
-
module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
|
|
6737
|
-
}) });
|
|
6738
|
-
|
|
6739
|
-
//#endregion
|
|
6740
|
-
//#region ../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
|
|
6741
|
-
var require_is_fullwidth_code_point = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js": ((exports, module) => {
|
|
6742
|
-
const isFullwidthCodePoint$1 = (codePoint) => {
|
|
6743
|
-
if (Number.isNaN(codePoint)) return false;
|
|
6744
|
-
if (codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141)) return true;
|
|
6745
|
-
return false;
|
|
6746
|
-
};
|
|
6747
|
-
module.exports = isFullwidthCodePoint$1;
|
|
6748
|
-
module.exports.default = isFullwidthCodePoint$1;
|
|
6749
|
-
}) });
|
|
6750
|
-
|
|
6751
|
-
//#endregion
|
|
6752
|
-
//#region ../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
|
|
6753
|
-
var require_emoji_regex = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js": ((exports, module) => {
|
|
6754
|
-
module.exports = function() {
|
|
6755
|
-
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
6756
|
-
};
|
|
6757
|
-
}) });
|
|
6758
|
-
|
|
6759
|
-
//#endregion
|
|
6760
|
-
//#region ../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
|
|
6761
|
-
var require_string_width = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js": ((exports, module) => {
|
|
6762
|
-
const stripAnsi$1 = require_strip_ansi();
|
|
6763
|
-
const isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
6764
|
-
const emojiRegex = require_emoji_regex();
|
|
6765
|
-
const stringWidth$2 = (string) => {
|
|
6766
|
-
if (typeof string !== "string" || string.length === 0) return 0;
|
|
6767
|
-
string = stripAnsi$1(string);
|
|
6768
|
-
if (string.length === 0) return 0;
|
|
6769
|
-
string = string.replace(emojiRegex(), " ");
|
|
6770
|
-
let width = 0;
|
|
6771
|
-
for (let i = 0; i < string.length; i++) {
|
|
6772
|
-
const code = string.codePointAt(i);
|
|
6773
|
-
if (code <= 31 || code >= 127 && code <= 159) continue;
|
|
6774
|
-
if (code >= 768 && code <= 879) continue;
|
|
6775
|
-
if (code > 65535) i++;
|
|
6776
|
-
width += isFullwidthCodePoint(code) ? 2 : 1;
|
|
6777
|
-
}
|
|
6778
|
-
return width;
|
|
6779
|
-
};
|
|
6780
|
-
module.exports = stringWidth$2;
|
|
6781
|
-
module.exports.default = stringWidth$2;
|
|
6782
|
-
}) });
|
|
6783
|
-
|
|
6784
|
-
//#endregion
|
|
6785
|
-
//#region ../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js
|
|
6786
|
-
var require_ansi_align = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js": ((exports, module) => {
|
|
6787
|
-
const stringWidth$1 = require_string_width();
|
|
6788
|
-
function ansiAlign$1(text, opts) {
|
|
6789
|
-
if (!text) return text;
|
|
6790
|
-
opts = opts || {};
|
|
6791
|
-
const align = opts.align || "center";
|
|
6792
|
-
if (align === "left") return text;
|
|
6793
|
-
const split = opts.split || "\n";
|
|
6794
|
-
const pad = opts.pad || " ";
|
|
6795
|
-
const widthDiffFn = align !== "right" ? halfDiff : fullDiff;
|
|
6796
|
-
let returnString = false;
|
|
6797
|
-
if (!Array.isArray(text)) {
|
|
6798
|
-
returnString = true;
|
|
6799
|
-
text = String(text).split(split);
|
|
6800
|
-
}
|
|
6801
|
-
let width;
|
|
6802
|
-
let maxWidth = 0;
|
|
6803
|
-
text = text.map(function(str) {
|
|
6804
|
-
str = String(str);
|
|
6805
|
-
width = stringWidth$1(str);
|
|
6806
|
-
maxWidth = Math.max(width, maxWidth);
|
|
6807
|
-
return {
|
|
6808
|
-
str,
|
|
6809
|
-
width
|
|
6810
|
-
};
|
|
6811
|
-
}).map(function(obj) {
|
|
6812
|
-
return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str;
|
|
6813
|
-
});
|
|
6814
|
-
return returnString ? text.join(split) : text;
|
|
6815
|
-
}
|
|
6816
|
-
ansiAlign$1.left = function left(text) {
|
|
6817
|
-
return ansiAlign$1(text, { align: "left" });
|
|
6818
|
-
};
|
|
6819
|
-
ansiAlign$1.center = function center(text) {
|
|
6820
|
-
return ansiAlign$1(text, { align: "center" });
|
|
6821
|
-
};
|
|
6822
|
-
ansiAlign$1.right = function right(text) {
|
|
6823
|
-
return ansiAlign$1(text, { align: "right" });
|
|
6824
|
-
};
|
|
6825
|
-
module.exports = ansiAlign$1;
|
|
6826
|
-
function halfDiff(maxWidth, curWidth) {
|
|
6827
|
-
return Math.floor((maxWidth - curWidth) / 2);
|
|
6828
|
-
}
|
|
6829
|
-
function fullDiff(maxWidth, curWidth) {
|
|
6830
|
-
return maxWidth - curWidth;
|
|
6831
|
-
}
|
|
6832
|
-
}) });
|
|
6833
|
-
|
|
6834
|
-
//#endregion
|
|
6835
|
-
//#region ../../node_modules/.pnpm/ansi-styles@6.2.1/node_modules/ansi-styles/index.js
|
|
6836
|
-
const ANSI_BACKGROUND_OFFSET = 10;
|
|
6837
|
-
const wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
|
|
6838
|
-
const wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
|
|
6839
|
-
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
|
|
6840
|
-
const styles = {
|
|
6841
|
-
modifier: {
|
|
6842
|
-
reset: [0, 0],
|
|
6843
|
-
bold: [1, 22],
|
|
6844
|
-
dim: [2, 22],
|
|
6845
|
-
italic: [3, 23],
|
|
6846
|
-
underline: [4, 24],
|
|
6847
|
-
overline: [53, 55],
|
|
6848
|
-
inverse: [7, 27],
|
|
6849
|
-
hidden: [8, 28],
|
|
6850
|
-
strikethrough: [9, 29]
|
|
6851
|
-
},
|
|
6852
|
-
color: {
|
|
6853
|
-
black: [30, 39],
|
|
6854
|
-
red: [31, 39],
|
|
6855
|
-
green: [32, 39],
|
|
6856
|
-
yellow: [33, 39],
|
|
6857
|
-
blue: [34, 39],
|
|
6858
|
-
magenta: [35, 39],
|
|
6859
|
-
cyan: [36, 39],
|
|
6860
|
-
white: [37, 39],
|
|
6861
|
-
blackBright: [90, 39],
|
|
6862
|
-
gray: [90, 39],
|
|
6863
|
-
grey: [90, 39],
|
|
6864
|
-
redBright: [91, 39],
|
|
6865
|
-
greenBright: [92, 39],
|
|
6866
|
-
yellowBright: [93, 39],
|
|
6867
|
-
blueBright: [94, 39],
|
|
6868
|
-
magentaBright: [95, 39],
|
|
6869
|
-
cyanBright: [96, 39],
|
|
6870
|
-
whiteBright: [97, 39]
|
|
6871
|
-
},
|
|
6872
|
-
bgColor: {
|
|
6873
|
-
bgBlack: [40, 49],
|
|
6874
|
-
bgRed: [41, 49],
|
|
6875
|
-
bgGreen: [42, 49],
|
|
6876
|
-
bgYellow: [43, 49],
|
|
6877
|
-
bgBlue: [44, 49],
|
|
6878
|
-
bgMagenta: [45, 49],
|
|
6879
|
-
bgCyan: [46, 49],
|
|
6880
|
-
bgWhite: [47, 49],
|
|
6881
|
-
bgBlackBright: [100, 49],
|
|
6882
|
-
bgGray: [100, 49],
|
|
6883
|
-
bgGrey: [100, 49],
|
|
6884
|
-
bgRedBright: [101, 49],
|
|
6885
|
-
bgGreenBright: [102, 49],
|
|
6886
|
-
bgYellowBright: [103, 49],
|
|
6887
|
-
bgBlueBright: [104, 49],
|
|
6888
|
-
bgMagentaBright: [105, 49],
|
|
6889
|
-
bgCyanBright: [106, 49],
|
|
6890
|
-
bgWhiteBright: [107, 49]
|
|
6891
|
-
}
|
|
6892
|
-
};
|
|
6893
|
-
const modifierNames = Object.keys(styles.modifier);
|
|
6894
|
-
const foregroundColorNames = Object.keys(styles.color);
|
|
6895
|
-
const backgroundColorNames = Object.keys(styles.bgColor);
|
|
6896
|
-
const colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
6897
|
-
function assembleStyles() {
|
|
6898
|
-
const codes = /* @__PURE__ */ new Map();
|
|
6899
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
6900
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
6901
|
-
styles[styleName] = {
|
|
6902
|
-
open: `\u001B[${style[0]}m`,
|
|
6903
|
-
close: `\u001B[${style[1]}m`
|
|
6904
|
-
};
|
|
6905
|
-
group[styleName] = styles[styleName];
|
|
6906
|
-
codes.set(style[0], style[1]);
|
|
6907
|
-
}
|
|
6908
|
-
Object.defineProperty(styles, groupName, {
|
|
6909
|
-
value: group,
|
|
6910
|
-
enumerable: false
|
|
6911
|
-
});
|
|
6912
|
-
}
|
|
6913
|
-
Object.defineProperty(styles, "codes", {
|
|
6914
|
-
value: codes,
|
|
6915
|
-
enumerable: false
|
|
6916
|
-
});
|
|
6917
|
-
styles.color.close = "\x1B[39m";
|
|
6918
|
-
styles.bgColor.close = "\x1B[49m";
|
|
6919
|
-
styles.color.ansi = wrapAnsi16();
|
|
6920
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
6921
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
6922
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
6923
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
6924
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
6925
|
-
Object.defineProperties(styles, {
|
|
6926
|
-
rgbToAnsi256: {
|
|
6927
|
-
value: (red, green, blue) => {
|
|
6928
|
-
if (red === green && green === blue) {
|
|
6929
|
-
if (red < 8) return 16;
|
|
6930
|
-
if (red > 248) return 231;
|
|
6931
|
-
return Math.round((red - 8) / 247 * 24) + 232;
|
|
6932
|
-
}
|
|
6933
|
-
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
6934
|
-
},
|
|
6935
|
-
enumerable: false
|
|
6936
|
-
},
|
|
6937
|
-
hexToRgb: {
|
|
6938
|
-
value: (hex) => {
|
|
6939
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
6940
|
-
if (!matches) return [
|
|
6941
|
-
0,
|
|
6942
|
-
0,
|
|
6943
|
-
0
|
|
6944
|
-
];
|
|
6945
|
-
let [colorString] = matches;
|
|
6946
|
-
if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
|
|
6947
|
-
const integer = Number.parseInt(colorString, 16);
|
|
6948
|
-
return [
|
|
6949
|
-
integer >> 16 & 255,
|
|
6950
|
-
integer >> 8 & 255,
|
|
6951
|
-
integer & 255
|
|
6952
|
-
];
|
|
6953
|
-
},
|
|
6954
|
-
enumerable: false
|
|
6955
|
-
},
|
|
6956
|
-
hexToAnsi256: {
|
|
6957
|
-
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
6958
|
-
enumerable: false
|
|
6959
|
-
},
|
|
6960
|
-
ansi256ToAnsi: {
|
|
6961
|
-
value: (code) => {
|
|
6962
|
-
if (code < 8) return 30 + code;
|
|
6963
|
-
if (code < 16) return 90 + (code - 8);
|
|
6964
|
-
let red;
|
|
6965
|
-
let green;
|
|
6966
|
-
let blue;
|
|
6967
|
-
if (code >= 232) {
|
|
6968
|
-
red = ((code - 232) * 10 + 8) / 255;
|
|
6969
|
-
green = red;
|
|
6970
|
-
blue = red;
|
|
6971
|
-
} else {
|
|
6972
|
-
code -= 16;
|
|
6973
|
-
const remainder = code % 36;
|
|
6974
|
-
red = Math.floor(code / 36) / 5;
|
|
6975
|
-
green = Math.floor(remainder / 6) / 5;
|
|
6976
|
-
blue = remainder % 6 / 5;
|
|
6977
|
-
}
|
|
6978
|
-
const value = Math.max(red, green, blue) * 2;
|
|
6979
|
-
if (value === 0) return 30;
|
|
6980
|
-
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
6981
|
-
if (value === 2) result += 60;
|
|
6982
|
-
return result;
|
|
6983
|
-
},
|
|
6984
|
-
enumerable: false
|
|
6985
|
-
},
|
|
6986
|
-
rgbToAnsi: {
|
|
6987
|
-
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
6988
|
-
enumerable: false
|
|
6989
|
-
},
|
|
6990
|
-
hexToAnsi: {
|
|
6991
|
-
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
6992
|
-
enumerable: false
|
|
6993
|
-
}
|
|
6994
|
-
});
|
|
6995
|
-
return styles;
|
|
6996
|
-
}
|
|
6997
|
-
const ansiStyles = assembleStyles();
|
|
6998
|
-
var ansi_styles_default = ansiStyles;
|
|
6999
|
-
|
|
7000
|
-
//#endregion
|
|
7001
|
-
//#region ../../node_modules/.pnpm/wrap-ansi@9.0.0/node_modules/wrap-ansi/index.js
|
|
7002
|
-
const ESCAPES = new Set(["\x1B", ""]);
|
|
7003
|
-
const END_CODE = 39;
|
|
7004
|
-
const ANSI_ESCAPE_BELL = "\x07";
|
|
7005
|
-
const ANSI_CSI = "[";
|
|
7006
|
-
const ANSI_OSC = "]";
|
|
7007
|
-
const ANSI_SGR_TERMINATOR = "m";
|
|
7008
|
-
const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
7009
|
-
const wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
7010
|
-
const wrapAnsiHyperlink = (url$2) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url$2}${ANSI_ESCAPE_BELL}`;
|
|
7011
|
-
const wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
|
|
7012
|
-
const wrapWord = (rows, word, columns) => {
|
|
7013
|
-
const characters = [...word];
|
|
7014
|
-
let isInsideEscape = false;
|
|
7015
|
-
let isInsideLinkEscape = false;
|
|
7016
|
-
let visible = stringWidth(stripAnsi(rows.at(-1)));
|
|
7017
|
-
for (const [index, character] of characters.entries()) {
|
|
7018
|
-
const characterLength = stringWidth(character);
|
|
7019
|
-
if (visible + characterLength <= columns) rows[rows.length - 1] += character;
|
|
7020
|
-
else {
|
|
7021
|
-
rows.push(character);
|
|
7022
|
-
visible = 0;
|
|
7023
|
-
}
|
|
7024
|
-
if (ESCAPES.has(character)) {
|
|
7025
|
-
isInsideEscape = true;
|
|
7026
|
-
const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
|
|
7027
|
-
isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
|
|
7028
|
-
}
|
|
7029
|
-
if (isInsideEscape) {
|
|
7030
|
-
if (isInsideLinkEscape) {
|
|
7031
|
-
if (character === ANSI_ESCAPE_BELL) {
|
|
7032
|
-
isInsideEscape = false;
|
|
7033
|
-
isInsideLinkEscape = false;
|
|
7034
|
-
}
|
|
7035
|
-
} else if (character === ANSI_SGR_TERMINATOR) isInsideEscape = false;
|
|
7036
|
-
continue;
|
|
7037
|
-
}
|
|
7038
|
-
visible += characterLength;
|
|
7039
|
-
if (visible === columns && index < characters.length - 1) {
|
|
7040
|
-
rows.push("");
|
|
7041
|
-
visible = 0;
|
|
7042
|
-
}
|
|
7043
|
-
}
|
|
7044
|
-
if (!visible && rows.at(-1).length > 0 && rows.length > 1) rows[rows.length - 2] += rows.pop();
|
|
7045
|
-
};
|
|
7046
|
-
const stringVisibleTrimSpacesRight = (string) => {
|
|
7047
|
-
const words = string.split(" ");
|
|
7048
|
-
let last = words.length;
|
|
7049
|
-
while (last > 0) {
|
|
7050
|
-
if (stringWidth(words[last - 1]) > 0) break;
|
|
7051
|
-
last--;
|
|
7052
|
-
}
|
|
7053
|
-
if (last === words.length) return string;
|
|
7054
|
-
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
7055
|
-
};
|
|
7056
|
-
const exec = (string, columns, options = {}) => {
|
|
7057
|
-
if (options.trim !== false && string.trim() === "") return "";
|
|
7058
|
-
let returnValue = "";
|
|
7059
|
-
let escapeCode;
|
|
7060
|
-
let escapeUrl;
|
|
7061
|
-
const lengths = wordLengths(string);
|
|
7062
|
-
let rows = [""];
|
|
7063
|
-
for (const [index, word] of string.split(" ").entries()) {
|
|
7064
|
-
if (options.trim !== false) rows[rows.length - 1] = rows.at(-1).trimStart();
|
|
7065
|
-
let rowLength = stringWidth(rows.at(-1));
|
|
7066
|
-
if (index !== 0) {
|
|
7067
|
-
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
7068
|
-
rows.push("");
|
|
7069
|
-
rowLength = 0;
|
|
7070
|
-
}
|
|
7071
|
-
if (rowLength > 0 || options.trim === false) {
|
|
7072
|
-
rows[rows.length - 1] += " ";
|
|
7073
|
-
rowLength++;
|
|
7074
|
-
}
|
|
7075
|
-
}
|
|
7076
|
-
if (options.hard && lengths[index] > columns) {
|
|
7077
|
-
const remainingColumns = columns - rowLength;
|
|
7078
|
-
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
7079
|
-
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
7080
|
-
if (breaksStartingNextLine < breaksStartingThisLine) rows.push("");
|
|
7081
|
-
wrapWord(rows, word, columns);
|
|
7082
|
-
continue;
|
|
7083
|
-
}
|
|
7084
|
-
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
7085
|
-
if (options.wordWrap === false && rowLength < columns) {
|
|
7086
|
-
wrapWord(rows, word, columns);
|
|
7087
|
-
continue;
|
|
7088
|
-
}
|
|
7089
|
-
rows.push("");
|
|
7090
|
-
}
|
|
7091
|
-
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
7092
|
-
wrapWord(rows, word, columns);
|
|
7093
|
-
continue;
|
|
7094
|
-
}
|
|
7095
|
-
rows[rows.length - 1] += word;
|
|
7096
|
-
}
|
|
7097
|
-
if (options.trim !== false) rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
7098
|
-
const preString = rows.join("\n");
|
|
7099
|
-
const pre = [...preString];
|
|
7100
|
-
let preStringIndex = 0;
|
|
7101
|
-
for (const [index, character] of pre.entries()) {
|
|
7102
|
-
returnValue += character;
|
|
7103
|
-
if (ESCAPES.has(character)) {
|
|
7104
|
-
const { groups } = (/* @__PURE__ */ new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`)).exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
7105
|
-
if (groups.code !== void 0) {
|
|
7106
|
-
const code$1 = Number.parseFloat(groups.code);
|
|
7107
|
-
escapeCode = code$1 === END_CODE ? void 0 : code$1;
|
|
7108
|
-
} else if (groups.uri !== void 0) escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
7109
|
-
}
|
|
7110
|
-
const code = ansi_styles_default.codes.get(Number(escapeCode));
|
|
7111
|
-
if (pre[index + 1] === "\n") {
|
|
7112
|
-
if (escapeUrl) returnValue += wrapAnsiHyperlink("");
|
|
7113
|
-
if (escapeCode && code) returnValue += wrapAnsiCode(code);
|
|
7114
|
-
} else if (character === "\n") {
|
|
7115
|
-
if (escapeCode && code) returnValue += wrapAnsiCode(escapeCode);
|
|
7116
|
-
if (escapeUrl) returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
7117
|
-
}
|
|
7118
|
-
preStringIndex += character.length;
|
|
7119
|
-
}
|
|
7120
|
-
return returnValue;
|
|
7121
|
-
};
|
|
7122
|
-
function wrapAnsi(string, columns, options) {
|
|
7123
|
-
return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
|
|
7124
|
-
}
|
|
7125
|
-
|
|
7126
|
-
//#endregion
|
|
7127
|
-
//#region ../../node_modules/.pnpm/boxen@8.0.1/node_modules/boxen/index.js
|
|
7128
|
-
var import_cli_boxes = /* @__PURE__ */ __toESM(require_cli_boxes(), 1);
|
|
7129
|
-
var import_ansi_align = /* @__PURE__ */ __toESM(require_ansi_align(), 1);
|
|
7130
|
-
var import_cli_boxes$1 = /* @__PURE__ */ __toESM(require_cli_boxes(), 1);
|
|
7131
|
-
const NEWLINE = "\n";
|
|
7132
|
-
const PAD = " ";
|
|
7133
|
-
const NONE = "none";
|
|
7134
|
-
const terminalColumns = () => {
|
|
7135
|
-
const { env: env$3, stdout, stderr } = process$1;
|
|
7136
|
-
if (stdout?.columns) return stdout.columns;
|
|
7137
|
-
if (stderr?.columns) return stderr.columns;
|
|
7138
|
-
if (env$3.COLUMNS) return Number.parseInt(env$3.COLUMNS, 10);
|
|
7139
|
-
return 80;
|
|
7140
|
-
};
|
|
7141
|
-
const getObject$1 = (detail) => typeof detail === "number" ? {
|
|
7142
|
-
top: detail,
|
|
7143
|
-
right: detail * 3,
|
|
7144
|
-
bottom: detail,
|
|
7145
|
-
left: detail * 3
|
|
7146
|
-
} : {
|
|
7147
|
-
top: 0,
|
|
7148
|
-
right: 0,
|
|
7149
|
-
bottom: 0,
|
|
7150
|
-
left: 0,
|
|
7151
|
-
...detail
|
|
7152
|
-
};
|
|
7153
|
-
const getBorderWidth = (borderStyle) => borderStyle === NONE ? 0 : 2;
|
|
7154
|
-
const getBorderChars = (borderStyle) => {
|
|
7155
|
-
const sides = [
|
|
7156
|
-
"topLeft",
|
|
7157
|
-
"topRight",
|
|
7158
|
-
"bottomRight",
|
|
7159
|
-
"bottomLeft",
|
|
7160
|
-
"left",
|
|
7161
|
-
"right",
|
|
7162
|
-
"top",
|
|
7163
|
-
"bottom"
|
|
7164
|
-
];
|
|
7165
|
-
let characters;
|
|
7166
|
-
if (borderStyle === NONE) {
|
|
7167
|
-
borderStyle = {};
|
|
7168
|
-
for (const side of sides) borderStyle[side] = "";
|
|
7169
|
-
}
|
|
7170
|
-
if (typeof borderStyle === "string") {
|
|
7171
|
-
characters = import_cli_boxes.default[borderStyle];
|
|
7172
|
-
if (!characters) throw new TypeError(`Invalid border style: ${borderStyle}`);
|
|
7173
|
-
} else {
|
|
7174
|
-
if (typeof borderStyle?.vertical === "string") {
|
|
7175
|
-
borderStyle.left = borderStyle.vertical;
|
|
7176
|
-
borderStyle.right = borderStyle.vertical;
|
|
7177
|
-
}
|
|
7178
|
-
if (typeof borderStyle?.horizontal === "string") {
|
|
7179
|
-
borderStyle.top = borderStyle.horizontal;
|
|
7180
|
-
borderStyle.bottom = borderStyle.horizontal;
|
|
7181
|
-
}
|
|
7182
|
-
for (const side of sides) if (borderStyle[side] === null || typeof borderStyle[side] !== "string") throw new TypeError(`Invalid border style: ${side}`);
|
|
7183
|
-
characters = borderStyle;
|
|
7184
|
-
}
|
|
7185
|
-
return characters;
|
|
7186
|
-
};
|
|
7187
|
-
const makeTitle = (text, horizontal, alignment) => {
|
|
7188
|
-
let title = "";
|
|
7189
|
-
const textWidth = stringWidth(text);
|
|
7190
|
-
switch (alignment) {
|
|
7191
|
-
case "left":
|
|
7192
|
-
title = text + horizontal.slice(textWidth);
|
|
7193
|
-
break;
|
|
7194
|
-
case "right":
|
|
7195
|
-
title = horizontal.slice(textWidth) + text;
|
|
7196
|
-
break;
|
|
7197
|
-
default:
|
|
7198
|
-
horizontal = horizontal.slice(textWidth);
|
|
7199
|
-
if (horizontal.length % 2 === 1) {
|
|
7200
|
-
horizontal = horizontal.slice(Math.floor(horizontal.length / 2));
|
|
7201
|
-
title = horizontal.slice(1) + text + horizontal;
|
|
7202
|
-
} else {
|
|
7203
|
-
horizontal = horizontal.slice(horizontal.length / 2);
|
|
7204
|
-
title = horizontal + text + horizontal;
|
|
7205
|
-
}
|
|
7206
|
-
break;
|
|
7207
|
-
}
|
|
7208
|
-
return title;
|
|
7209
|
-
};
|
|
7210
|
-
const makeContentText = (text, { padding, width, textAlignment, height }) => {
|
|
7211
|
-
text = (0, import_ansi_align.default)(text, { align: textAlignment });
|
|
7212
|
-
let lines = text.split(NEWLINE);
|
|
7213
|
-
const textWidth = widestLine(text);
|
|
7214
|
-
const max = width - padding.left - padding.right;
|
|
7215
|
-
if (textWidth > max) {
|
|
7216
|
-
const newLines = [];
|
|
7217
|
-
for (const line of lines) {
|
|
7218
|
-
const createdLines = wrapAnsi(line, max, { hard: true });
|
|
7219
|
-
const alignedLines = (0, import_ansi_align.default)(createdLines, { align: textAlignment });
|
|
7220
|
-
const alignedLinesArray = alignedLines.split("\n");
|
|
7221
|
-
const longestLength = Math.max(...alignedLinesArray.map((s) => stringWidth(s)));
|
|
7222
|
-
for (const alignedLine of alignedLinesArray) {
|
|
7223
|
-
let paddedLine;
|
|
7224
|
-
switch (textAlignment) {
|
|
7225
|
-
case "center":
|
|
7226
|
-
paddedLine = PAD.repeat((max - longestLength) / 2) + alignedLine;
|
|
7227
|
-
break;
|
|
7228
|
-
case "right":
|
|
7229
|
-
paddedLine = PAD.repeat(max - longestLength) + alignedLine;
|
|
7230
|
-
break;
|
|
7231
|
-
default:
|
|
7232
|
-
paddedLine = alignedLine;
|
|
7233
|
-
break;
|
|
7234
|
-
}
|
|
7235
|
-
newLines.push(paddedLine);
|
|
7236
|
-
}
|
|
7237
|
-
}
|
|
7238
|
-
lines = newLines;
|
|
7239
|
-
}
|
|
7240
|
-
if (textAlignment === "center" && textWidth < max) lines = lines.map((line) => PAD.repeat((max - textWidth) / 2) + line);
|
|
7241
|
-
else if (textAlignment === "right" && textWidth < max) lines = lines.map((line) => PAD.repeat(max - textWidth) + line);
|
|
7242
|
-
const paddingLeft = PAD.repeat(padding.left);
|
|
7243
|
-
const paddingRight = PAD.repeat(padding.right);
|
|
7244
|
-
lines = lines.map((line) => {
|
|
7245
|
-
const newLine = paddingLeft + line + paddingRight;
|
|
7246
|
-
return newLine + PAD.repeat(width - stringWidth(newLine));
|
|
7247
|
-
});
|
|
7248
|
-
if (padding.top > 0) lines = [...Array.from({ length: padding.top }).fill(PAD.repeat(width)), ...lines];
|
|
7249
|
-
if (padding.bottom > 0) lines = [...lines, ...Array.from({ length: padding.bottom }).fill(PAD.repeat(width))];
|
|
7250
|
-
if (height && lines.length > height) lines = lines.slice(0, height);
|
|
7251
|
-
else if (height && lines.length < height) lines = [...lines, ...Array.from({ length: height - lines.length }).fill(PAD.repeat(width))];
|
|
7252
|
-
return lines.join(NEWLINE);
|
|
7253
|
-
};
|
|
7254
|
-
const boxContent = (content, contentWidth, options) => {
|
|
7255
|
-
const colorizeBorder = (border) => {
|
|
7256
|
-
const newBorder = options.borderColor ? getColorFunction(options.borderColor)(border) : border;
|
|
7257
|
-
return options.dimBorder ? source_default.dim(newBorder) : newBorder;
|
|
7258
|
-
};
|
|
7259
|
-
const colorizeContent = (content$1) => options.backgroundColor ? getBGColorFunction(options.backgroundColor)(content$1) : content$1;
|
|
7260
|
-
const chars = getBorderChars(options.borderStyle);
|
|
7261
|
-
const columns = terminalColumns();
|
|
7262
|
-
let marginLeft = PAD.repeat(options.margin.left);
|
|
7263
|
-
if (options.float === "center") {
|
|
7264
|
-
const marginWidth = Math.max((columns - contentWidth - getBorderWidth(options.borderStyle)) / 2, 0);
|
|
7265
|
-
marginLeft = PAD.repeat(marginWidth);
|
|
7266
|
-
} else if (options.float === "right") {
|
|
7267
|
-
const marginWidth = Math.max(columns - contentWidth - options.margin.right - getBorderWidth(options.borderStyle), 0);
|
|
7268
|
-
marginLeft = PAD.repeat(marginWidth);
|
|
7269
|
-
}
|
|
7270
|
-
let result = "";
|
|
7271
|
-
if (options.margin.top) result += NEWLINE.repeat(options.margin.top);
|
|
7272
|
-
if (options.borderStyle !== NONE || options.title) result += colorizeBorder(marginLeft + chars.topLeft + (options.title ? makeTitle(options.title, chars.top.repeat(contentWidth), options.titleAlignment) : chars.top.repeat(contentWidth)) + chars.topRight) + NEWLINE;
|
|
7273
|
-
const lines = content.split(NEWLINE);
|
|
7274
|
-
result += lines.map((line) => marginLeft + colorizeBorder(chars.left) + colorizeContent(line) + colorizeBorder(chars.right)).join(NEWLINE);
|
|
7275
|
-
if (options.borderStyle !== NONE) result += NEWLINE + colorizeBorder(marginLeft + chars.bottomLeft + chars.bottom.repeat(contentWidth) + chars.bottomRight);
|
|
7276
|
-
if (options.margin.bottom) result += NEWLINE.repeat(options.margin.bottom);
|
|
7277
|
-
return result;
|
|
7278
|
-
};
|
|
7279
|
-
const sanitizeOptions = (options) => {
|
|
7280
|
-
if (options.fullscreen && process$1?.stdout) {
|
|
7281
|
-
let newDimensions = [process$1.stdout.columns, process$1.stdout.rows];
|
|
7282
|
-
if (typeof options.fullscreen === "function") newDimensions = options.fullscreen(...newDimensions);
|
|
7283
|
-
options.width ||= newDimensions[0];
|
|
7284
|
-
options.height ||= newDimensions[1];
|
|
7285
|
-
}
|
|
7286
|
-
options.width &&= Math.max(1, options.width - getBorderWidth(options.borderStyle));
|
|
7287
|
-
options.height &&= Math.max(1, options.height - getBorderWidth(options.borderStyle));
|
|
7288
|
-
return options;
|
|
7289
|
-
};
|
|
7290
|
-
const formatTitle = (title, borderStyle) => borderStyle === NONE ? title : ` ${title} `;
|
|
7291
|
-
const determineDimensions = (text, options) => {
|
|
7292
|
-
options = sanitizeOptions(options);
|
|
7293
|
-
const widthOverride = options.width !== void 0;
|
|
7294
|
-
const columns = terminalColumns();
|
|
7295
|
-
const borderWidth = getBorderWidth(options.borderStyle);
|
|
7296
|
-
const maxWidth = columns - options.margin.left - options.margin.right - borderWidth;
|
|
7297
|
-
const widest = widestLine(wrapAnsi(text, columns - borderWidth, {
|
|
7298
|
-
hard: true,
|
|
7299
|
-
trim: false
|
|
7300
|
-
})) + options.padding.left + options.padding.right;
|
|
7301
|
-
if (options.title && widthOverride) {
|
|
7302
|
-
options.title = options.title.slice(0, Math.max(0, options.width - 2));
|
|
7303
|
-
options.title &&= formatTitle(options.title, options.borderStyle);
|
|
7304
|
-
} else if (options.title) {
|
|
7305
|
-
options.title = options.title.slice(0, Math.max(0, maxWidth - 2));
|
|
7306
|
-
if (options.title) {
|
|
7307
|
-
options.title = formatTitle(options.title, options.borderStyle);
|
|
7308
|
-
if (stringWidth(options.title) > widest) options.width = stringWidth(options.title);
|
|
7309
|
-
}
|
|
7310
|
-
}
|
|
7311
|
-
options.width ||= widest;
|
|
7312
|
-
if (!widthOverride) {
|
|
7313
|
-
if (options.margin.left && options.margin.right && options.width > maxWidth) {
|
|
7314
|
-
const spaceForMargins = columns - options.width - borderWidth;
|
|
7315
|
-
const multiplier = spaceForMargins / (options.margin.left + options.margin.right);
|
|
7316
|
-
options.margin.left = Math.max(0, Math.floor(options.margin.left * multiplier));
|
|
7317
|
-
options.margin.right = Math.max(0, Math.floor(options.margin.right * multiplier));
|
|
7318
|
-
}
|
|
7319
|
-
options.width = Math.min(options.width, columns - borderWidth - options.margin.left - options.margin.right);
|
|
7320
|
-
}
|
|
7321
|
-
if (options.width - (options.padding.left + options.padding.right) <= 0) {
|
|
7322
|
-
options.padding.left = 0;
|
|
7323
|
-
options.padding.right = 0;
|
|
7324
|
-
}
|
|
7325
|
-
if (options.height && options.height - (options.padding.top + options.padding.bottom) <= 0) {
|
|
7326
|
-
options.padding.top = 0;
|
|
7327
|
-
options.padding.bottom = 0;
|
|
7328
|
-
}
|
|
7329
|
-
return options;
|
|
7330
|
-
};
|
|
7331
|
-
const isHex = (color) => color.match(/^#(?:[0-f]{3}){1,2}$/i);
|
|
7332
|
-
const isColorValid = (color) => typeof color === "string" && (source_default[color] ?? isHex(color));
|
|
7333
|
-
const getColorFunction = (color) => isHex(color) ? source_default.hex(color) : source_default[color];
|
|
7334
|
-
const getBGColorFunction = (color) => isHex(color) ? source_default.bgHex(color) : source_default[camelCase(["bg", color])];
|
|
7335
|
-
function boxen(text, options) {
|
|
7336
|
-
options = {
|
|
7337
|
-
padding: 0,
|
|
7338
|
-
borderStyle: "single",
|
|
7339
|
-
dimBorder: false,
|
|
7340
|
-
textAlignment: "left",
|
|
7341
|
-
float: "left",
|
|
7342
|
-
titleAlignment: "left",
|
|
7343
|
-
...options
|
|
7344
|
-
};
|
|
7345
|
-
if (options.align) options.textAlignment = options.align;
|
|
7346
|
-
if (options.borderColor && !isColorValid(options.borderColor)) throw new Error(`${options.borderColor} is not a valid borderColor`);
|
|
7347
|
-
if (options.backgroundColor && !isColorValid(options.backgroundColor)) throw new Error(`${options.backgroundColor} is not a valid backgroundColor`);
|
|
7348
|
-
options.padding = getObject$1(options.padding);
|
|
7349
|
-
options.margin = getObject$1(options.margin);
|
|
7350
|
-
options = determineDimensions(text, options);
|
|
7351
|
-
text = makeContentText(text, options);
|
|
7352
|
-
return boxContent(text, options.width, options);
|
|
7353
|
-
}
|
|
7354
|
-
|
|
7355
6462
|
//#endregion
|
|
7356
6463
|
//#region ../../node_modules/.pnpm/is-in-ci@1.0.0/node_modules/is-in-ci/index.js
|
|
7357
6464
|
const isInCi = env.CI !== "0" && env.CI !== "false" && ("CI" in env || "CONTINUOUS_INTEGRATION" in env || Object.keys(env).some((key) => key.startsWith("CI_")));
|
|
@@ -7376,13 +6483,13 @@ var MissingValueError = class extends Error {
|
|
|
7376
6483
|
this.key = key;
|
|
7377
6484
|
}
|
|
7378
6485
|
};
|
|
7379
|
-
function pupa(template, data, { ignoreMissing = false, transform
|
|
6486
|
+
function pupa(template, data, { ignoreMissing = false, transform = ({ value }) => value } = {}) {
|
|
7380
6487
|
if (typeof template !== "string") throw new TypeError(`Expected a \`string\` in the first argument, got \`${typeof template}\``);
|
|
7381
6488
|
if (typeof data !== "object") throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof data}\``);
|
|
7382
6489
|
const replace = (placeholder, key) => {
|
|
7383
6490
|
let value = data;
|
|
7384
6491
|
for (const property of key.split(".")) value = value ? value[property] : void 0;
|
|
7385
|
-
const transformedValue = transform
|
|
6492
|
+
const transformedValue = transform({
|
|
7386
6493
|
value,
|
|
7387
6494
|
key
|
|
7388
6495
|
});
|
|
@@ -7403,7 +6510,7 @@ function pupa(template, data, { ignoreMissing = false, transform: transform$1 =
|
|
|
7403
6510
|
//#region ../../node_modules/.pnpm/update-notifier@7.3.1/node_modules/update-notifier/update-notifier.js
|
|
7404
6511
|
var import_diff = /* @__PURE__ */ __toESM(require_diff(), 1);
|
|
7405
6512
|
var import_gt = /* @__PURE__ */ __toESM(require_gt(), 1);
|
|
7406
|
-
const __dirname = path
|
|
6513
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7407
6514
|
const ONE_DAY = 1e3 * 60 * 60 * 24;
|
|
7408
6515
|
var UpdateNotifier = class {
|
|
7409
6516
|
config;
|
|
@@ -7448,7 +6555,7 @@ var UpdateNotifier = class {
|
|
|
7448
6555
|
this.config.delete("update");
|
|
7449
6556
|
}
|
|
7450
6557
|
if (Date.now() - this.config.get("lastUpdateCheck") < this.#updateCheckInterval) return;
|
|
7451
|
-
spawn(process$1.execPath, [path
|
|
6558
|
+
spawn(process$1.execPath, [path.join(__dirname, "check.js"), JSON.stringify(this.#options)], {
|
|
7452
6559
|
detached: true,
|
|
7453
6560
|
stdio: "ignore"
|
|
7454
6561
|
}).unref();
|
|
@@ -7503,34 +6610,202 @@ function updateNotifier(options) {
|
|
|
7503
6610
|
}
|
|
7504
6611
|
|
|
7505
6612
|
//#endregion
|
|
7506
|
-
//#region
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
6613
|
+
//#region package.json
|
|
6614
|
+
var name = "@yamada-ui/cli";
|
|
6615
|
+
var type = "module";
|
|
6616
|
+
var version = "1.2.4";
|
|
6617
|
+
var description = "The official CLI for Yamada UI projects";
|
|
6618
|
+
var keywords = [
|
|
6619
|
+
"theme",
|
|
6620
|
+
"theming",
|
|
6621
|
+
"typings",
|
|
6622
|
+
"generator",
|
|
6623
|
+
"yamada ui",
|
|
6624
|
+
"yamada",
|
|
6625
|
+
"ui mode",
|
|
6626
|
+
"ui"
|
|
6627
|
+
];
|
|
6628
|
+
var author = "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>";
|
|
6629
|
+
var license = "MIT";
|
|
6630
|
+
var main = "dist/index.js";
|
|
6631
|
+
var files = ["dist", "bin"];
|
|
6632
|
+
var sideEffects = false;
|
|
6633
|
+
var publishConfig = { "access": "public" };
|
|
6634
|
+
var homepage = "https://yamada-ui.com";
|
|
6635
|
+
var repository = {
|
|
6636
|
+
"type": "git",
|
|
6637
|
+
"url": "https://github.com/yamada-ui/yamada-ui",
|
|
6638
|
+
"directory": "packages/cli"
|
|
6639
|
+
};
|
|
6640
|
+
var bugs = { "url": "https://github.com/yamada-ui/yamada-ui/issues" };
|
|
6641
|
+
var bin = { "yamada-cli": "bin/index.js" };
|
|
6642
|
+
var scripts = {
|
|
6643
|
+
"clean": "rimraf node_modules dist trace coverage .turbo .eslintcache",
|
|
6644
|
+
"start": "tsx src/index.ts --run",
|
|
6645
|
+
"build": "tsdown",
|
|
6646
|
+
"typecheck": " tsc --noEmit",
|
|
6647
|
+
"typetrace": "tsc --noEmit --generateTrace ./trace --incremental false",
|
|
6648
|
+
"typeanalyze": "npx analyze-trace ./trace --expandTypes=false",
|
|
6649
|
+
"lint": "eslint . --max-warnings=0 --cache",
|
|
6650
|
+
"format": "prettier . --ignore-path ../../.prettierignore --check --cache"
|
|
6651
|
+
};
|
|
6652
|
+
var dependencies = {
|
|
6653
|
+
"@yamada-ui/utils": "workspace:*",
|
|
6654
|
+
"boxen": "^8.0.1",
|
|
6655
|
+
"cli-check-node": "^1.3.4",
|
|
6656
|
+
"cli-handle-unhandled": "^1.1.2",
|
|
6657
|
+
"commander": "^14.0.0",
|
|
6658
|
+
"esbuild": "^0.25.8",
|
|
6659
|
+
"eslint": "^9.32.0",
|
|
6660
|
+
"execa": "9.3.1",
|
|
6661
|
+
"glob": "^11.0.3",
|
|
6662
|
+
"node-eval": "^2.0.0",
|
|
6663
|
+
"ora": "^8.2.0",
|
|
6664
|
+
"picocolors": "^1.1.1",
|
|
6665
|
+
"prettier": "^3.6.2",
|
|
6666
|
+
"prompts": "^2.4.2",
|
|
6667
|
+
"validate-npm-package-name": "^6.0.2",
|
|
6668
|
+
"yamljs": "^0.3.0"
|
|
6669
|
+
};
|
|
6670
|
+
var devDependencies = {
|
|
6671
|
+
"@types/prompts": "^2.4.9",
|
|
6672
|
+
"@types/update-notifier": "6.0.8",
|
|
6673
|
+
"@types/validate-npm-package-name": "^4.0.2",
|
|
6674
|
+
"@types/yamljs": "^0.2.34",
|
|
6675
|
+
"tsx": "^4.20.3",
|
|
6676
|
+
"typescript": "^5.9.2",
|
|
6677
|
+
"update-notifier": "^7.3.1"
|
|
6678
|
+
};
|
|
6679
|
+
var package_default = {
|
|
6680
|
+
name,
|
|
6681
|
+
type,
|
|
6682
|
+
version,
|
|
6683
|
+
description,
|
|
6684
|
+
keywords,
|
|
6685
|
+
author,
|
|
6686
|
+
license,
|
|
6687
|
+
main,
|
|
6688
|
+
files,
|
|
6689
|
+
sideEffects,
|
|
6690
|
+
publishConfig,
|
|
6691
|
+
homepage,
|
|
6692
|
+
repository,
|
|
6693
|
+
bugs,
|
|
6694
|
+
bin,
|
|
6695
|
+
scripts,
|
|
6696
|
+
dependencies,
|
|
6697
|
+
devDependencies
|
|
7518
6698
|
};
|
|
7519
6699
|
|
|
7520
6700
|
//#endregion
|
|
7521
|
-
//#region src/
|
|
7522
|
-
const
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
6701
|
+
//#region src/constant.ts
|
|
6702
|
+
const CONFIG_FILE_NAME = "ui.json";
|
|
6703
|
+
const DEFAULT_PACKAGE_NAME = "@workspaces/ui";
|
|
6704
|
+
const REGISTRY_URL = "https://v2.yamada-ui.com/registry/v2";
|
|
6705
|
+
const PATH = {
|
|
6706
|
+
COMPONENTS: "./components",
|
|
6707
|
+
HOOKS: "./hooks",
|
|
6708
|
+
MONOREPO: "./workspaces/ui",
|
|
6709
|
+
POLYREPO: "./ui",
|
|
6710
|
+
PROVIDERS: "./providers"
|
|
6711
|
+
};
|
|
6712
|
+
const DEFAULT_PACKAGE_JSON = {
|
|
6713
|
+
version: "1.0.0",
|
|
6714
|
+
type: "module",
|
|
6715
|
+
private: true,
|
|
6716
|
+
scripts: {},
|
|
6717
|
+
exports: {
|
|
6718
|
+
".": "./src/index.ts",
|
|
6719
|
+
"./components/*": "./src/components/*/index.ts",
|
|
6720
|
+
"./hooks/*": "./src/hooks/*/index.ts",
|
|
6721
|
+
"./providers/*": "./src/providers/*/index.ts"
|
|
6722
|
+
},
|
|
6723
|
+
dependencies: {
|
|
6724
|
+
react: ">=19",
|
|
6725
|
+
"react-dom": ">=19",
|
|
6726
|
+
"@yamada-ui/react": ">=2"
|
|
6727
|
+
},
|
|
6728
|
+
devDependencies: {
|
|
6729
|
+
"@types/react": ">=19",
|
|
6730
|
+
"@types/react-dom": ">=19"
|
|
7528
6731
|
}
|
|
7529
6732
|
};
|
|
6733
|
+
const TSCONFIG_JSON = {
|
|
6734
|
+
compilerOptions: {
|
|
6735
|
+
target: "ESNext",
|
|
6736
|
+
module: "ESNext",
|
|
6737
|
+
lib: [
|
|
6738
|
+
"DOM",
|
|
6739
|
+
"DOM.Iterable",
|
|
6740
|
+
"ESNext"
|
|
6741
|
+
],
|
|
6742
|
+
moduleResolution: "Bundler",
|
|
6743
|
+
moduleDetection: "force",
|
|
6744
|
+
jsx: "preserve",
|
|
6745
|
+
strict: true,
|
|
6746
|
+
declaration: true,
|
|
6747
|
+
declarationMap: true,
|
|
6748
|
+
esModuleInterop: true,
|
|
6749
|
+
isolatedModules: true,
|
|
6750
|
+
resolveJsonModule: true,
|
|
6751
|
+
incremental: false,
|
|
6752
|
+
noEmit: true,
|
|
6753
|
+
skipLibCheck: true,
|
|
6754
|
+
allowJs: true,
|
|
6755
|
+
allowSyntheticDefaultImports: true,
|
|
6756
|
+
noUncheckedSideEffectImports: true,
|
|
6757
|
+
noFallthroughCasesInSwitch: true,
|
|
6758
|
+
noUncheckedIndexedAccess: true
|
|
6759
|
+
},
|
|
6760
|
+
include: ["src/**/*.ts", "src/**/*.tsx"],
|
|
6761
|
+
exclude: ["node_modules"]
|
|
6762
|
+
};
|
|
6763
|
+
|
|
6764
|
+
//#endregion
|
|
6765
|
+
//#region src/commands/add/index.ts
|
|
6766
|
+
const add = new Command("add").description("Add a component to your project").option("--cwd <path>", "Current working directory", process.cwd()).option("-c, --config <path>", "Path to the config file", CONFIG_FILE_NAME).action(function({ cwd: cwd$2 }) {
|
|
6767
|
+
const spinner = ora();
|
|
6768
|
+
try {
|
|
6769
|
+
const start = process.hrtime.bigint();
|
|
6770
|
+
console.log(cwd$2);
|
|
6771
|
+
const end = process.hrtime.bigint();
|
|
6772
|
+
const duration = (Number(end - start) / 1e9).toFixed(2);
|
|
6773
|
+
console.log("\n", c.green(`Done in ${duration}s`));
|
|
6774
|
+
} catch (e) {
|
|
6775
|
+
if (e instanceof Error) spinner.fail(e.message);
|
|
6776
|
+
else spinner.fail("An unknown error occurred");
|
|
6777
|
+
}
|
|
6778
|
+
});
|
|
6779
|
+
|
|
6780
|
+
//#endregion
|
|
6781
|
+
//#region src/commands/diff/index.ts
|
|
6782
|
+
const diff = new Command("diff").description("Check for updates against the registry").option("--cwd <path>", "Current working directory", process.cwd()).option("-c, --config <path>", "Path to the config file", CONFIG_FILE_NAME).action(function({ cwd: cwd$2 }) {
|
|
6783
|
+
const spinner = ora();
|
|
6784
|
+
try {
|
|
6785
|
+
const start = process.hrtime.bigint();
|
|
6786
|
+
console.log(cwd$2);
|
|
6787
|
+
const end = process.hrtime.bigint();
|
|
6788
|
+
const duration = (Number(end - start) / 1e9).toFixed(2);
|
|
6789
|
+
console.log("\n", c.green(`Done in ${duration}s`));
|
|
6790
|
+
} catch (e) {
|
|
6791
|
+
if (e instanceof Error) spinner.fail(e.message);
|
|
6792
|
+
else spinner.fail("An unknown error occurred");
|
|
6793
|
+
}
|
|
6794
|
+
});
|
|
6795
|
+
|
|
6796
|
+
//#endregion
|
|
6797
|
+
//#region src/utils/fs.ts
|
|
6798
|
+
async function writeFileSafe(path$9, content, options) {
|
|
6799
|
+
if (path$9.includes("/")) {
|
|
6800
|
+
const dirPath = path$9.split("/").slice(0, -1).join("/");
|
|
6801
|
+
if (!existsSync(dirPath)) await mkdir(dirPath, { recursive: true });
|
|
6802
|
+
}
|
|
6803
|
+
await writeFile(path$9, content, options);
|
|
6804
|
+
}
|
|
7530
6805
|
|
|
7531
6806
|
//#endregion
|
|
7532
6807
|
//#region src/utils/module.ts
|
|
7533
|
-
|
|
6808
|
+
async function getModule(file$1, cwd$2) {
|
|
7534
6809
|
const result = await build({
|
|
7535
6810
|
absWorkingDir: cwd$2,
|
|
7536
6811
|
bundle: true,
|
|
@@ -7544,7 +6819,7 @@ const getModule = async (file$1, cwd$2) => {
|
|
|
7544
6819
|
write: false
|
|
7545
6820
|
});
|
|
7546
6821
|
const { text: code } = result.outputFiles[0] ?? {};
|
|
7547
|
-
const dependencies = isObject(result.metafile) ? Object.keys(result.metafile.inputs) : [];
|
|
6822
|
+
const dependencies$1 = isObject(result.metafile) ? Object.keys(result.metafile.inputs) : [];
|
|
7548
6823
|
try {
|
|
7549
6824
|
const realFileName = realpathSync.native(file$1);
|
|
7550
6825
|
if (!code) throw new Error("code is undefined");
|
|
@@ -7554,208 +6829,302 @@ const getModule = async (file$1, cwd$2) => {
|
|
|
7554
6829
|
script.runInThisContext()(mod.exports, require$1, mod);
|
|
7555
6830
|
return {
|
|
7556
6831
|
code,
|
|
7557
|
-
dependencies,
|
|
6832
|
+
dependencies: dependencies$1,
|
|
7558
6833
|
mod
|
|
7559
6834
|
};
|
|
7560
6835
|
} catch {
|
|
7561
6836
|
const mod = nodeEval(code);
|
|
7562
6837
|
return {
|
|
7563
6838
|
code,
|
|
7564
|
-
dependencies,
|
|
6839
|
+
dependencies: dependencies$1,
|
|
7565
6840
|
mod
|
|
7566
6841
|
};
|
|
7567
6842
|
}
|
|
7568
|
-
}
|
|
7569
|
-
|
|
7570
|
-
//#endregion
|
|
7571
|
-
//#region src/utils/object.ts
|
|
7572
|
-
const getObject = (obj, path$9) => {
|
|
7573
|
-
const keys = path$9.split(".");
|
|
7574
|
-
return keys.reduce((obj$1, key) => obj$1[key] ?? {}, obj);
|
|
7575
|
-
};
|
|
7576
|
-
const omitObject = (obj, keys) => {
|
|
7577
|
-
const result = {};
|
|
7578
|
-
Object.keys(obj).forEach((key) => {
|
|
7579
|
-
if (keys.includes(key)) return;
|
|
7580
|
-
result[key] = obj[key];
|
|
7581
|
-
});
|
|
7582
|
-
return result;
|
|
7583
|
-
};
|
|
6843
|
+
}
|
|
7584
6844
|
|
|
7585
6845
|
//#endregion
|
|
7586
6846
|
//#region src/utils/prettier.ts
|
|
7587
|
-
|
|
7588
|
-
const
|
|
6847
|
+
async function format$2(content, options) {
|
|
6848
|
+
const path$9 = await resolveConfigFile();
|
|
6849
|
+
const config$1 = path$9 ? await resolveConfig(path$9) : {};
|
|
7589
6850
|
try {
|
|
7590
6851
|
return format$1(content, {
|
|
7591
|
-
...
|
|
6852
|
+
...config$1,
|
|
7592
6853
|
parser: "typescript",
|
|
7593
6854
|
...options
|
|
7594
6855
|
});
|
|
7595
6856
|
} catch {
|
|
7596
6857
|
return content;
|
|
7597
6858
|
}
|
|
7598
|
-
}
|
|
6859
|
+
}
|
|
7599
6860
|
|
|
7600
6861
|
//#endregion
|
|
7601
|
-
//#region src/
|
|
7602
|
-
|
|
7603
|
-
const
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
});
|
|
7611
|
-
});
|
|
7612
|
-
};
|
|
7613
|
-
const checkHasReact = async (cwd$2) => {
|
|
6862
|
+
//#region src/utils/package.ts
|
|
6863
|
+
function getPackageManager() {
|
|
6864
|
+
const userAgent$1 = process.env.npm_config_user_agent || "";
|
|
6865
|
+
if (userAgent$1.startsWith("yarn")) return "yarn";
|
|
6866
|
+
if (userAgent$1.startsWith("pnpm")) return "pnpm";
|
|
6867
|
+
if (userAgent$1.startsWith("bun")) return "bun";
|
|
6868
|
+
return "npm";
|
|
6869
|
+
}
|
|
6870
|
+
async function getPackageJson(cwd$2) {
|
|
7614
6871
|
try {
|
|
7615
|
-
const packageJson$2 = await readFile(path.
|
|
7616
|
-
|
|
7617
|
-
return !!dependencies?.["@yamada-ui/react"] || !!devDependencies?.["@yamada-ui/react"];
|
|
6872
|
+
const packageJson$2 = await readFile(path$1.resolve(cwd$2, "package.json"), "utf8");
|
|
6873
|
+
return JSON.parse(packageJson$2);
|
|
7618
6874
|
} catch {
|
|
7619
|
-
|
|
6875
|
+
throw new Error(`No package.json found. Please run ${c.cyan(`${getPackageManager()} init`)}.`);
|
|
7620
6876
|
}
|
|
7621
|
-
}
|
|
7622
|
-
|
|
7623
|
-
if (
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
return
|
|
7628
|
-
}
|
|
7629
|
-
|
|
7630
|
-
const
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
const onReadEntry = (entry) => {
|
|
7637
|
-
if (entry.type !== "Directory") {
|
|
7638
|
-
const filePath = entry.path.replace(`${targetPath}/`, "");
|
|
7639
|
-
let content = "";
|
|
7640
|
-
entry.on("data", (chunk) => {
|
|
7641
|
-
content += chunk.toString();
|
|
6877
|
+
}
|
|
6878
|
+
function hasDependencies({ dependencies: dependencies$1, devDependencies: devDependencies$1 }, name$1) {
|
|
6879
|
+
if (isObject(dependencies$1) && name$1 in dependencies$1) return dependencies$1[name$1];
|
|
6880
|
+
if (isObject(devDependencies$1) && name$1 in devDependencies$1) return devDependencies$1[name$1];
|
|
6881
|
+
}
|
|
6882
|
+
function requireDependencies(packageJson$2, dependencies$1) {
|
|
6883
|
+
return Object.fromEntries(dependencies$1.map((dependency) => [dependency, hasDependencies(packageJson$2, dependency)]));
|
|
6884
|
+
}
|
|
6885
|
+
function installDependencies(cwd$2, dependencies$1) {
|
|
6886
|
+
const packageManager = getPackageManager();
|
|
6887
|
+
switch (packageManager) {
|
|
6888
|
+
case "bun":
|
|
6889
|
+
if (dependencies$1?.length) execSync(`bun add ${dependencies$1.join(" ")}`, {
|
|
6890
|
+
cwd: cwd$2,
|
|
6891
|
+
stdio: "ignore"
|
|
7642
6892
|
});
|
|
7643
|
-
|
|
7644
|
-
|
|
6893
|
+
else execSync(`bun install`, {
|
|
6894
|
+
cwd: cwd$2,
|
|
6895
|
+
stdio: "ignore"
|
|
7645
6896
|
});
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
6897
|
+
break;
|
|
6898
|
+
case "pnpm":
|
|
6899
|
+
if (dependencies$1?.length) execSync(`pnpm add ${dependencies$1.join(" ")}`, {
|
|
6900
|
+
cwd: cwd$2,
|
|
6901
|
+
stdio: "ignore"
|
|
6902
|
+
});
|
|
6903
|
+
else execSync(`pnpm install`, {
|
|
6904
|
+
cwd: cwd$2,
|
|
6905
|
+
stdio: "ignore"
|
|
6906
|
+
});
|
|
6907
|
+
break;
|
|
6908
|
+
case "yarn":
|
|
6909
|
+
if (dependencies$1?.length) execSync(`yarn add ${dependencies$1.join(" ")}`, {
|
|
6910
|
+
cwd: cwd$2,
|
|
6911
|
+
stdio: "ignore"
|
|
6912
|
+
});
|
|
6913
|
+
else execSync(`yarn install`, {
|
|
6914
|
+
cwd: cwd$2,
|
|
6915
|
+
stdio: "ignore"
|
|
6916
|
+
});
|
|
6917
|
+
break;
|
|
6918
|
+
default:
|
|
6919
|
+
if (dependencies$1?.length) execSync(`npm install ${dependencies$1.join(" ")}`, {
|
|
6920
|
+
cwd: cwd$2,
|
|
6921
|
+
stdio: "ignore"
|
|
6922
|
+
});
|
|
6923
|
+
else execSync(`npm install`, {
|
|
6924
|
+
cwd: cwd$2,
|
|
6925
|
+
stdio: "ignore"
|
|
6926
|
+
});
|
|
6927
|
+
break;
|
|
6928
|
+
}
|
|
6929
|
+
}
|
|
6930
|
+
async function addWorkspace(cwd$2, workspacePath) {
|
|
6931
|
+
const packageManager = getPackageManager();
|
|
6932
|
+
switch (packageManager) {
|
|
6933
|
+
case "pnpm":
|
|
6934
|
+
if (existsSync(path$1.resolve(cwd$2, "pnpm-workspace.yaml"))) {
|
|
6935
|
+
const content = await readFile(path$1.resolve(cwd$2, "pnpm-workspace.yaml"), "utf8");
|
|
6936
|
+
const json$1 = YAML.parse(content);
|
|
6937
|
+
json$1.packages ??= [];
|
|
6938
|
+
if (!json$1.packages.includes(workspacePath)) {
|
|
6939
|
+
json$1.packages.push(workspacePath);
|
|
6940
|
+
const content$1 = await format$2(YAML.stringify(json$1), { parser: "yaml" });
|
|
6941
|
+
await writeFileSafe(path$1.resolve(cwd$2, "pnpm-workspace.yaml"), content$1);
|
|
7668
6942
|
}
|
|
6943
|
+
} else {
|
|
6944
|
+
const data = YAML.stringify({ packages: [workspacePath] });
|
|
6945
|
+
const content = await format$2(data, { parser: "yaml" });
|
|
6946
|
+
await writeFileSafe(path$1.resolve(cwd$2, "pnpm-workspace.yaml"), content);
|
|
7669
6947
|
}
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
ImportTypeDeclarations,
|
|
7679
|
-
transformedSourceFile
|
|
7680
|
-
};
|
|
7681
|
-
};
|
|
7682
|
-
const createImportDeclaration = (isTypeOnly, declarations) => {
|
|
7683
|
-
const elements = declarations.flatMap(({ importClause: importClause$1 }) => importClause$1?.namedBindings && isNamedImports(importClause$1.namedBindings) ? importClause$1.namedBindings.elements : []);
|
|
7684
|
-
const namedBindings = factory.createNamedImports(elements);
|
|
7685
|
-
const importClause = factory.createImportClause(isTypeOnly, void 0, namedBindings);
|
|
7686
|
-
return factory.createImportDeclaration(void 0, importClause, factory.createStringLiteral("@yamada-ui/react"));
|
|
7687
|
-
};
|
|
7688
|
-
const replaceContent = (content) => {
|
|
7689
|
-
const sourceFile = createSourceFile("temp.ts", content, ScriptTarget.Latest, true);
|
|
7690
|
-
const printer = createPrinter({ newLine: NewLineKind.LineFeed });
|
|
7691
|
-
const { ImportDeclarations, ImportTypeDeclarations, transformedSourceFile } = transformSourceFile(sourceFile);
|
|
7692
|
-
const statements = [...transformedSourceFile.statements];
|
|
7693
|
-
if (ImportTypeDeclarations.length) {
|
|
7694
|
-
const newImportTypeDeclarations = createImportDeclaration(true, ImportTypeDeclarations);
|
|
7695
|
-
statements.unshift(newImportTypeDeclarations);
|
|
7696
|
-
}
|
|
7697
|
-
if (ImportDeclarations.length) {
|
|
7698
|
-
const newImportDeclarations = createImportDeclaration(false, ImportDeclarations);
|
|
7699
|
-
statements.unshift(newImportDeclarations);
|
|
7700
|
-
}
|
|
7701
|
-
const updatedSourceFile = factory.updateSourceFile(transformedSourceFile, statements);
|
|
7702
|
-
let printedContent = printer.printFile(updatedSourceFile);
|
|
7703
|
-
printedContent = printedContent.replace(/^;$/gm, "");
|
|
7704
|
-
printedContent = printedContent.replace(/\s\n*(?=import)/g, "");
|
|
7705
|
-
printedContent = printedContent.replace(/(import .*\n)+(?!import)/, "$&\n");
|
|
7706
|
-
return printedContent;
|
|
7707
|
-
};
|
|
7708
|
-
const replaceIndex = (content) => {
|
|
7709
|
-
const index = content.indexOf("export const baseTheme");
|
|
7710
|
-
content = content.slice(0, index);
|
|
7711
|
-
content = content.replace(/export const baseTheme/, "export const theme");
|
|
7712
|
-
content = content.replace(/\nimport { config } from ".\/config"/, "");
|
|
7713
|
-
content += "\nexport { config } from './config'";
|
|
7714
|
-
return content;
|
|
7715
|
-
};
|
|
7716
|
-
const generateTheme = async (outPath, fileMap, isReactReplace, isForceReplace) => {
|
|
7717
|
-
if (!await isWriteable(path.dirname(outPath))) throw new Error("The provided path is not writable, please check folder permissions and try again. It is likely you do not have write permissions for this folder.");
|
|
7718
|
-
await mkdir(outPath, { recursive: true });
|
|
7719
|
-
await Promise.all([...fileMap.entries()].map(async ([filePath, _content]) => {
|
|
7720
|
-
const targetPath = path.join(outPath, filePath);
|
|
7721
|
-
let content = _content;
|
|
7722
|
-
if (filePath === "index.ts") content = replaceIndex(content);
|
|
7723
|
-
else if (isReactReplace) content = replaceContent(content);
|
|
7724
|
-
const formattedContent = await prettier(content);
|
|
7725
|
-
try {
|
|
7726
|
-
if (!isForceReplace && existsSync(targetPath)) return;
|
|
7727
|
-
await writeFile(targetPath, formattedContent, "utf-8");
|
|
7728
|
-
} catch (e) {
|
|
7729
|
-
if (e instanceof Error && "code" in e && e.code === "ENOENT") {
|
|
7730
|
-
const dirPath = path.dirname(targetPath);
|
|
7731
|
-
await mkdir(dirPath, { recursive: true });
|
|
7732
|
-
if (!isForceReplace && existsSync(targetPath)) return;
|
|
7733
|
-
await writeFile(targetPath, formattedContent, "utf-8");
|
|
6948
|
+
break;
|
|
6949
|
+
default: {
|
|
6950
|
+
const packageJson$2 = await getPackageJson(cwd$2);
|
|
6951
|
+
packageJson$2.workspaces ??= [];
|
|
6952
|
+
if (!packageJson$2.workspaces.includes(workspacePath)) {
|
|
6953
|
+
packageJson$2.workspaces.push(workspacePath);
|
|
6954
|
+
const content = await format$2(JSON.stringify(packageJson$2), { parser: "json" });
|
|
6955
|
+
await writeFileSafe(path$1.resolve(cwd$2, "package.json"), content);
|
|
7734
6956
|
}
|
|
6957
|
+
break;
|
|
7735
6958
|
}
|
|
7736
|
-
}
|
|
7737
|
-
}
|
|
7738
|
-
|
|
6959
|
+
}
|
|
6960
|
+
}
|
|
6961
|
+
|
|
6962
|
+
//#endregion
|
|
6963
|
+
//#region src/commands/init/index.ts
|
|
6964
|
+
const init = new Command("init").description("Initialize your project and install dependencies").option("--cwd <path>", "Current working directory", process.cwd()).option("-c, --config <path>", "Path to the config file", CONFIG_FILE_NAME).action(async function({ config: configPath, cwd: cwd$2 }) {
|
|
7739
6965
|
const spinner = ora();
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
}
|
|
6966
|
+
try {
|
|
6967
|
+
const start = process.hrtime.bigint();
|
|
6968
|
+
const configFileName = configPath.includes("/") ? configPath.split("/").at(-1) : configPath;
|
|
6969
|
+
const config$1 = {
|
|
6970
|
+
components: {
|
|
6971
|
+
ignore: [],
|
|
6972
|
+
path: "./components"
|
|
6973
|
+
},
|
|
6974
|
+
hooks: {
|
|
6975
|
+
ignore: [],
|
|
6976
|
+
path: "./hooks"
|
|
6977
|
+
},
|
|
6978
|
+
providers: {
|
|
6979
|
+
ignore: [],
|
|
6980
|
+
path: "./providers"
|
|
6981
|
+
}
|
|
6982
|
+
};
|
|
6983
|
+
configPath = path$1.resolve(cwd$2, configPath);
|
|
6984
|
+
let dependencies$1;
|
|
6985
|
+
let { monorepo = true, outdir, packageName } = await prompts([
|
|
6986
|
+
{
|
|
6987
|
+
type: "toggle",
|
|
6988
|
+
name: "monorepo",
|
|
6989
|
+
active: "Yes",
|
|
6990
|
+
inactive: "No",
|
|
6991
|
+
initial: true,
|
|
6992
|
+
message: `Would you like to use monorepo? (recommended)`
|
|
6993
|
+
},
|
|
6994
|
+
{
|
|
6995
|
+
type: "text",
|
|
6996
|
+
name: "outdir",
|
|
6997
|
+
initial: (_, { monorepo: monorepo$1 }) => monorepo$1 ? PATH.MONOREPO : PATH.POLYREPO,
|
|
6998
|
+
message: (_, { monorepo: monorepo$1 }) => monorepo$1 ? `What is the path to the monorepo?` : `What is the path to the directory?`
|
|
6999
|
+
},
|
|
7000
|
+
{
|
|
7001
|
+
type: (_, { monorepo: monorepo$1 }) => monorepo$1 ? "text" : null,
|
|
7002
|
+
name: "packageName",
|
|
7003
|
+
initial: DEFAULT_PACKAGE_NAME,
|
|
7004
|
+
message: "What is the package name?"
|
|
7005
|
+
}
|
|
7006
|
+
]);
|
|
7007
|
+
outdir = outdir.replace(/\x17/g, "").trim();
|
|
7008
|
+
outdir ||= monorepo ? PATH.MONOREPO : PATH.POLYREPO;
|
|
7009
|
+
packageName = packageName.replace(/\x17/g, "").trim();
|
|
7010
|
+
packageName ||= DEFAULT_PACKAGE_NAME;
|
|
7011
|
+
config$1.monorepo = monorepo;
|
|
7012
|
+
config$1.path = outdir;
|
|
7013
|
+
const { generate } = await prompts({
|
|
7014
|
+
type: "confirm",
|
|
7015
|
+
name: "generate",
|
|
7016
|
+
initial: true,
|
|
7017
|
+
message: `Generate ${c.cyan(configFileName)}. Proceed?`
|
|
7018
|
+
});
|
|
7019
|
+
if (!generate) process.exit(0);
|
|
7020
|
+
if (existsSync(configPath)) {
|
|
7021
|
+
const { overwrite } = await prompts({
|
|
7022
|
+
type: "confirm",
|
|
7023
|
+
name: "overwrite",
|
|
7024
|
+
initial: false,
|
|
7025
|
+
message: `The config file already exists. Do you want to overwrite it?`
|
|
7026
|
+
});
|
|
7027
|
+
if (!overwrite) process.exit(0);
|
|
7028
|
+
}
|
|
7029
|
+
spinner.start(`Generating ${c.cyan(configFileName)}`);
|
|
7030
|
+
await writeFileSafe(configPath, await format$2(JSON.stringify(config$1), { parser: "json" }));
|
|
7031
|
+
spinner.succeed(`Generated ${c.cyan(configFileName)}`);
|
|
7032
|
+
if (monorepo) {
|
|
7033
|
+
const outdirPath = path$1.resolve(cwd$2, outdir);
|
|
7034
|
+
if (existsSync(outdirPath)) throw new Error(`${outdir} already exists`);
|
|
7035
|
+
const packageJson$2 = {
|
|
7036
|
+
name: packageName,
|
|
7037
|
+
...DEFAULT_PACKAGE_JSON
|
|
7038
|
+
};
|
|
7039
|
+
const tsconfigJson = { ...TSCONFIG_JSON };
|
|
7040
|
+
spinner.start("Fetching data");
|
|
7041
|
+
const data = await fetch(path$1.join(REGISTRY_URL, "index.json"));
|
|
7042
|
+
const { sources } = await data.json();
|
|
7043
|
+
spinner.succeed("Fetched data");
|
|
7044
|
+
const { generate: generate$1 } = await prompts({
|
|
7045
|
+
type: "confirm",
|
|
7046
|
+
name: "generate",
|
|
7047
|
+
initial: true,
|
|
7048
|
+
message: `Generate ${c.cyan(packageName)}. Proceed?`
|
|
7049
|
+
});
|
|
7050
|
+
if (!generate$1) process.exit(0);
|
|
7051
|
+
spinner.start(`Generating ${c.cyan(packageName)}`);
|
|
7052
|
+
await Promise.all([
|
|
7053
|
+
{
|
|
7054
|
+
content: await format$2(JSON.stringify(packageJson$2), { parser: "json" }),
|
|
7055
|
+
path: path$1.resolve(outdirPath, "package.json")
|
|
7056
|
+
},
|
|
7057
|
+
{
|
|
7058
|
+
content: await format$2(JSON.stringify(tsconfigJson), { parser: "json" }),
|
|
7059
|
+
path: path$1.resolve(outdirPath, "tsconfig.json")
|
|
7060
|
+
},
|
|
7061
|
+
...await Promise.all(sources.map(async ({ name: name$1, content }) => ({
|
|
7062
|
+
content: await format$2(content),
|
|
7063
|
+
path: path$1.resolve(outdirPath, "src", name$1)
|
|
7064
|
+
})))
|
|
7065
|
+
].map(({ content, path: path$9 }) => writeFileSafe(path$9, content)));
|
|
7066
|
+
spinner.succeed(`Generated ${c.cyan(packageName)}`);
|
|
7067
|
+
spinner.start("Adding workspace");
|
|
7068
|
+
if (outdir.includes("/")) {
|
|
7069
|
+
const path$9 = `${outdir.replace(/^\.\//, "").split("/")[0]}/**`;
|
|
7070
|
+
await addWorkspace(cwd$2, path$9);
|
|
7071
|
+
} else await addWorkspace(cwd$2, outdir);
|
|
7072
|
+
spinner.succeed("Added workspace");
|
|
7073
|
+
const { install } = await prompts({
|
|
7074
|
+
type: "confirm",
|
|
7075
|
+
name: "install",
|
|
7076
|
+
initial: true,
|
|
7077
|
+
message: `The workspace is generated. Do you want to install dependencies?`
|
|
7078
|
+
});
|
|
7079
|
+
if (install) dependencies$1 = [];
|
|
7080
|
+
} else {
|
|
7081
|
+
spinner.start("Getting package.json");
|
|
7082
|
+
const packageJson$2 = await getPackageJson(cwd$2);
|
|
7083
|
+
const requiredDependencies = requireDependencies(packageJson$2, [
|
|
7084
|
+
"react",
|
|
7085
|
+
"react-dom",
|
|
7086
|
+
"@yamada-ui/react"
|
|
7087
|
+
]);
|
|
7088
|
+
const notInstalledDependencies = Object.entries(requiredDependencies).filter(([_, version$1]) => !version$1);
|
|
7089
|
+
spinner.succeed("Got package.json");
|
|
7090
|
+
if (notInstalledDependencies.length) {
|
|
7091
|
+
const dependencyNames = notInstalledDependencies.map(([name$1]) => c.cyan(name$1));
|
|
7092
|
+
const { install } = await prompts({
|
|
7093
|
+
type: "confirm",
|
|
7094
|
+
name: "install",
|
|
7095
|
+
initial: true,
|
|
7096
|
+
message: `The following dependencies are not installed: ${dependencyNames.join(", ")}. Do you want to install them?`
|
|
7097
|
+
});
|
|
7098
|
+
if (install) dependencies$1 = dependencyNames;
|
|
7099
|
+
}
|
|
7100
|
+
}
|
|
7101
|
+
if (dependencies$1) {
|
|
7102
|
+
spinner.start("Installing dependencies");
|
|
7103
|
+
installDependencies(cwd$2, dependencies$1);
|
|
7104
|
+
spinner.succeed("Installed dependencies");
|
|
7105
|
+
}
|
|
7106
|
+
if (packageName) {
|
|
7107
|
+
const packageManager = getPackageManager();
|
|
7108
|
+
const command = packageManager === "npm" ? "install" : "add";
|
|
7109
|
+
console.log(boxen(`Run ${c.cyan(`${packageManager} ${command} "${packageName}@workspace:*"`)} in your application.`, {
|
|
7110
|
+
borderColor: "yellow",
|
|
7111
|
+
borderStyle: "round",
|
|
7112
|
+
margin: 1,
|
|
7113
|
+
padding: 1,
|
|
7114
|
+
textAlignment: "center"
|
|
7115
|
+
}));
|
|
7116
|
+
}
|
|
7117
|
+
const end = process.hrtime.bigint();
|
|
7118
|
+
const duration = (Number(end - start) / 1e9).toFixed(2);
|
|
7119
|
+
console.log("\n", c.green(`Done in ${duration}s`));
|
|
7120
|
+
} catch (e) {
|
|
7121
|
+
if (e instanceof Error) spinner.fail(e.message);
|
|
7122
|
+
else spinner.fail("An unknown error occurred");
|
|
7123
|
+
}
|
|
7124
|
+
});
|
|
7756
7125
|
|
|
7757
7126
|
//#endregion
|
|
7758
|
-
//#region src/
|
|
7127
|
+
//#region src/commands/tokens/config.ts
|
|
7759
7128
|
const config = [
|
|
7760
7129
|
{ key: "borders" },
|
|
7761
7130
|
{ key: "breakpoints" },
|
|
@@ -7793,7 +7162,7 @@ const config = [
|
|
|
7793
7162
|
];
|
|
7794
7163
|
|
|
7795
7164
|
//#endregion
|
|
7796
|
-
//#region src/
|
|
7165
|
+
//#region src/commands/tokens/index.ts
|
|
7797
7166
|
const TONES = [
|
|
7798
7167
|
50,
|
|
7799
7168
|
100,
|
|
@@ -7807,13 +7176,15 @@ const TONES = [
|
|
|
7807
7176
|
900,
|
|
7808
7177
|
950
|
|
7809
7178
|
];
|
|
7810
|
-
|
|
7811
|
-
const isTone = (value) => {
|
|
7179
|
+
function isTone(value) {
|
|
7812
7180
|
if (!isObject(value)) return false;
|
|
7813
7181
|
const keys = Object.keys(value);
|
|
7814
7182
|
return TONES.every((key) => keys.includes(key.toString()));
|
|
7815
|
-
}
|
|
7816
|
-
|
|
7183
|
+
}
|
|
7184
|
+
function print(unions) {
|
|
7185
|
+
return Object.entries(unions).sort(([a], [b]) => a.localeCompare(b)).map(([key, union]) => `${key}: ${!union.length ? "never" : union.map((value) => `"${value}"`).join(" | ")};`).join("\n");
|
|
7186
|
+
}
|
|
7187
|
+
function extractColorSchemes(theme, colorTokens = []) {
|
|
7817
7188
|
colorTokens.push("colorScheme.contrast", "colorScheme.fg", "colorScheme.subtle", "colorScheme.muted", "colorScheme.emphasized", "colorScheme.ghost", "colorScheme.solid", "colorScheme.outline");
|
|
7818
7189
|
const { colors, semanticTokens } = theme;
|
|
7819
7190
|
const colorSchemes = [];
|
|
@@ -7838,12 +7209,12 @@ const extractColorSchemes = (theme, colorTokens = []) => {
|
|
|
7838
7209
|
}
|
|
7839
7210
|
});
|
|
7840
7211
|
return { colorSchemes };
|
|
7841
|
-
}
|
|
7842
|
-
|
|
7212
|
+
}
|
|
7213
|
+
function extractThemeSchemes(theme) {
|
|
7843
7214
|
const { themeSchemes } = theme;
|
|
7844
7215
|
return Object.keys(themeSchemes ?? {});
|
|
7845
|
-
}
|
|
7846
|
-
|
|
7216
|
+
}
|
|
7217
|
+
function extractPaths(target, { maxDepth = Infinity, replaceKey = (key) => key, shouldProcess = () => true } = {}) {
|
|
7847
7218
|
if (!isObject(target) && !isArray(target)) return [];
|
|
7848
7219
|
return Object.entries(target).reduce((prev, [key, value]) => {
|
|
7849
7220
|
if (isObject(value) && shouldProcess(value) && maxDepth > 1) extractPaths(value, {
|
|
@@ -7854,13 +7225,13 @@ const extractPaths = (target, { maxDepth = Infinity, replaceKey = (key) => key,
|
|
|
7854
7225
|
else prev.push(replaceKey(key));
|
|
7855
7226
|
return prev;
|
|
7856
7227
|
}, []);
|
|
7857
|
-
}
|
|
7858
|
-
|
|
7228
|
+
}
|
|
7229
|
+
function extractKeys(obj, key) {
|
|
7859
7230
|
const property = getObject(obj, key);
|
|
7860
7231
|
if (!isObject(property)) return [];
|
|
7861
7232
|
return Object.keys(property);
|
|
7862
|
-
}
|
|
7863
|
-
|
|
7233
|
+
}
|
|
7234
|
+
async function generateThemeTokens(theme, { internal = false, theme: { responsive = false } = {} }) {
|
|
7864
7235
|
let shouldProcess = () => true;
|
|
7865
7236
|
if (responsive && isObject(theme.breakpoints)) {
|
|
7866
7237
|
const keys = ["base", ...Object.keys(theme.breakpoints)];
|
|
@@ -7872,7 +7243,7 @@ const generateThemeTokens = async (theme, { responsive = false }, internal) => {
|
|
|
7872
7243
|
};
|
|
7873
7244
|
shouldProcess = (obj) => !isResponsive(obj);
|
|
7874
7245
|
}
|
|
7875
|
-
const tokens = config.reduce((prev, { key, flatMap = (value) => value, maxDepth, replaceKey, shouldProcess: additionalShouldProcess = () => true }) => {
|
|
7246
|
+
const tokens$1 = config.reduce((prev, { key, flatMap = (value) => value, maxDepth, replaceKey, shouldProcess: additionalShouldProcess = () => true }) => {
|
|
7876
7247
|
const target = getObject(theme, key);
|
|
7877
7248
|
prev[key] = [];
|
|
7878
7249
|
if (isObject(target) || isArray(target)) prev[key] = extractPaths(target, {
|
|
@@ -7899,14 +7270,14 @@ const generateThemeTokens = async (theme, { responsive = false }, internal) => {
|
|
|
7899
7270
|
"resetStyle",
|
|
7900
7271
|
"textStyles"
|
|
7901
7272
|
]), { maxDepth: 2 });
|
|
7902
|
-
const { colorSchemes } = extractColorSchemes(theme, tokens.colors);
|
|
7273
|
+
const { colorSchemes } = extractColorSchemes(theme, tokens$1.colors);
|
|
7903
7274
|
const themeSchemes = extractThemeSchemes(theme);
|
|
7904
|
-
if (internal) return
|
|
7275
|
+
if (internal) return await format$2([
|
|
7905
7276
|
`import type { UsageThemeTokens } from "./system"`,
|
|
7906
7277
|
``,
|
|
7907
7278
|
`export interface GeneratedThemeTokens extends UsageThemeTokens {`,
|
|
7908
7279
|
print({
|
|
7909
|
-
...tokens,
|
|
7280
|
+
...tokens$1,
|
|
7910
7281
|
apply,
|
|
7911
7282
|
colorSchemes,
|
|
7912
7283
|
layerStyles,
|
|
@@ -7915,13 +7286,13 @@ const generateThemeTokens = async (theme, { responsive = false }, internal) => {
|
|
|
7915
7286
|
}),
|
|
7916
7287
|
`}`
|
|
7917
7288
|
].join("\n"));
|
|
7918
|
-
else return
|
|
7289
|
+
else return format$2([
|
|
7919
7290
|
`import type { UsageThemeTokens } from "@yamada-ui/react"`,
|
|
7920
7291
|
``,
|
|
7921
7292
|
`declare module '@yamada-ui/react' {`,
|
|
7922
7293
|
` interface CustomThemeTokens extends UsageThemeTokens {`,
|
|
7923
7294
|
` ${print({
|
|
7924
|
-
...tokens,
|
|
7295
|
+
...tokens$1,
|
|
7925
7296
|
apply,
|
|
7926
7297
|
colorSchemes,
|
|
7927
7298
|
layerStyles,
|
|
@@ -7931,68 +7302,70 @@ const generateThemeTokens = async (theme, { responsive = false }, internal) => {
|
|
|
7931
7302
|
` }`,
|
|
7932
7303
|
`}`
|
|
7933
7304
|
].join("\n"));
|
|
7934
|
-
}
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
//#region src/command/tokens/index.ts
|
|
7938
|
-
const buildThemeTokens = async ({ config: config$1, internal, outPath, theme }) => {
|
|
7939
|
-
const themeTokens = await generateThemeTokens(theme, config$1.theme ?? {}, internal);
|
|
7940
|
-
await writeFile(outPath, themeTokens, "utf8");
|
|
7941
|
-
};
|
|
7942
|
-
const getTheme = async (path$9, cwd$2) => {
|
|
7943
|
-
const { dependencies, mod } = await getModule(path$9, cwd$2);
|
|
7305
|
+
}
|
|
7306
|
+
async function getTheme(path$9, cwd$2) {
|
|
7307
|
+
const { dependencies: dependencies$1, mod } = await getModule(path$9, cwd$2);
|
|
7944
7308
|
const theme = mod?.default ?? mod?.theme ?? mod?.customTheme ?? mod?.defaultTheme ?? {};
|
|
7945
7309
|
const config$1 = mod?.config ?? mod?.customConfig ?? mod?.defaultConfig ?? {};
|
|
7946
7310
|
return {
|
|
7947
7311
|
config: config$1,
|
|
7948
|
-
dependencies,
|
|
7312
|
+
dependencies: dependencies$1,
|
|
7949
7313
|
theme
|
|
7950
7314
|
};
|
|
7951
|
-
}
|
|
7952
|
-
const
|
|
7315
|
+
}
|
|
7316
|
+
const tokens = new Command("tokens").description("Generate theme typings").argument("<path>", "Path to the theme file").option("--cwd <path>", "Current working directory", process.cwd()).option("-o, --out <path>", `Output path`).option("-l, --lint", "Lint the output file", false).option("--internal", "Generate internal tokens", false).action(async function(inputPath, { cwd: cwd$2, internal, lint, out: outPath }) {
|
|
7953
7317
|
const spinner = ora();
|
|
7318
|
+
const eslint = new ESLint({ fix: true });
|
|
7319
|
+
const start = process.hrtime.bigint();
|
|
7954
7320
|
spinner.start(`Getting theme`);
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7321
|
+
cwd$2 = path$1.resolve(cwd$2);
|
|
7322
|
+
inputPath = path$1.resolve(cwd$2, inputPath);
|
|
7323
|
+
if (outPath) outPath = path$1.resolve(cwd$2, outPath);
|
|
7324
|
+
else if (inputPath.includes("/")) {
|
|
7325
|
+
const dirPath = inputPath.split("/").slice(0, -1).join("/");
|
|
7326
|
+
outPath = path$1.join(dirPath, "index.types.ts");
|
|
7327
|
+
} else outPath = path$1.join(cwd$2, "index.types.ts");
|
|
7328
|
+
const { config: config$1, theme } = await getTheme(inputPath, cwd$2);
|
|
7958
7329
|
spinner.succeed(`Got theme`);
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
spinner.succeed(`Generated theme typings`);
|
|
7968
|
-
if (watch) spinner.info("Watching for changes...");
|
|
7969
|
-
};
|
|
7970
|
-
if (watch) {
|
|
7971
|
-
const watchPath = isString(watch) ? watch : dependencies;
|
|
7972
|
-
chokidar.watch(watchPath).on("ready", buildFile).on("change", async (path$9) => {
|
|
7973
|
-
spinner.info(`File changed ${path$9}`);
|
|
7974
|
-
file$1 = await getTheme(inputPath, cwd$2);
|
|
7975
|
-
return buildFile();
|
|
7976
|
-
});
|
|
7977
|
-
} else {
|
|
7978
|
-
const start = process.hrtime.bigint();
|
|
7979
|
-
await buildFile();
|
|
7980
|
-
const end = process.hrtime.bigint();
|
|
7981
|
-
const duration = (Number(end - start) / 1e9).toFixed(2);
|
|
7982
|
-
console.log("\n", c.green(`Done in ${duration}s`));
|
|
7330
|
+
spinner.start(`Generating theme typings`);
|
|
7331
|
+
let content = await generateThemeTokens(theme, {
|
|
7332
|
+
...config$1,
|
|
7333
|
+
internal
|
|
7334
|
+
});
|
|
7335
|
+
if (lint) {
|
|
7336
|
+
const [result] = await eslint.lintText(content, { filePath: inputPath });
|
|
7337
|
+
if (result?.output) content = result.output;
|
|
7983
7338
|
}
|
|
7984
|
-
|
|
7339
|
+
await writeFile(outPath, content, "utf8");
|
|
7340
|
+
spinner.succeed(`Generated theme typings`);
|
|
7341
|
+
const end = process.hrtime.bigint();
|
|
7342
|
+
const duration = (Number(end - start) / 1e9).toFixed(2);
|
|
7343
|
+
console.log("\n", c.green(`Done in ${duration}s`));
|
|
7344
|
+
});
|
|
7985
7345
|
|
|
7986
7346
|
//#endregion
|
|
7987
7347
|
//#region src/index.ts
|
|
7988
|
-
|
|
7989
|
-
|
|
7990
|
-
await
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7348
|
+
async function run() {
|
|
7349
|
+
checkNode("22");
|
|
7350
|
+
await unhandledError();
|
|
7351
|
+
updateNotifier({
|
|
7352
|
+
pkg: package_default,
|
|
7353
|
+
shouldNotifyInNpmScript: true,
|
|
7354
|
+
updateCheckInterval: 1e3 * 60 * 60 * 24 * 3
|
|
7355
|
+
}).notify({ isGlobal: true });
|
|
7356
|
+
console.log(`\n${c.bold(c.green("Yamada UI CLI"))} v${package_default.version} ${c.dim("by Yamada UI")}`);
|
|
7357
|
+
console.log(`${c.dim(package_default.description)}\n`);
|
|
7358
|
+
const program = new Command("Yamada UI CLI").version(package_default.version, "-v, --version", "Display the version number").usage(`${c.green("<command>")} [options]`);
|
|
7359
|
+
program.addCommand(init);
|
|
7360
|
+
program.addCommand(add);
|
|
7361
|
+
program.addCommand(diff);
|
|
7362
|
+
program.addCommand(tokens);
|
|
7994
7363
|
program.parse();
|
|
7995
|
-
}
|
|
7364
|
+
}
|
|
7365
|
+
if (process.argv.includes("--run")) {
|
|
7366
|
+
process.argv = process.argv.filter((arg) => arg !== "--run");
|
|
7367
|
+
run();
|
|
7368
|
+
}
|
|
7996
7369
|
|
|
7997
7370
|
//#endregion
|
|
7998
7371
|
export { run };
|