aivory-ui 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1466 -708
- package/dist/index.js.map +4 -4
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -32,9 +32,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
mod
|
|
33
33
|
));
|
|
34
34
|
|
|
35
|
-
// node_modules/commander/lib/error.js
|
|
35
|
+
// ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js
|
|
36
36
|
var require_error = __commonJS({
|
|
37
|
-
"node_modules/commander/lib/error.js"(exports) {
|
|
37
|
+
"../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js"(exports) {
|
|
38
38
|
var CommanderError2 = class extends Error {
|
|
39
39
|
/**
|
|
40
40
|
* Constructs the CommanderError class
|
|
@@ -67,9 +67,9 @@ var require_error = __commonJS({
|
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
|
|
70
|
-
// node_modules/commander/lib/argument.js
|
|
70
|
+
// ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/argument.js
|
|
71
71
|
var require_argument = __commonJS({
|
|
72
|
-
"node_modules/commander/lib/argument.js"(exports) {
|
|
72
|
+
"../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/argument.js"(exports) {
|
|
73
73
|
var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
|
|
74
74
|
var Argument2 = class {
|
|
75
75
|
/**
|
|
@@ -101,7 +101,7 @@ var require_argument = __commonJS({
|
|
|
101
101
|
this._name = name;
|
|
102
102
|
break;
|
|
103
103
|
}
|
|
104
|
-
if (this._name.
|
|
104
|
+
if (this._name.endsWith("...")) {
|
|
105
105
|
this.variadic = true;
|
|
106
106
|
this._name = this._name.slice(0, -3);
|
|
107
107
|
}
|
|
@@ -117,11 +117,12 @@ var require_argument = __commonJS({
|
|
|
117
117
|
/**
|
|
118
118
|
* @package
|
|
119
119
|
*/
|
|
120
|
-
|
|
120
|
+
_collectValue(value, previous) {
|
|
121
121
|
if (previous === this.defaultValue || !Array.isArray(previous)) {
|
|
122
122
|
return [value];
|
|
123
123
|
}
|
|
124
|
-
|
|
124
|
+
previous.push(value);
|
|
125
|
+
return previous;
|
|
125
126
|
}
|
|
126
127
|
/**
|
|
127
128
|
* Set the default value, and optionally supply the description to be displayed in the help.
|
|
@@ -160,7 +161,7 @@ var require_argument = __commonJS({
|
|
|
160
161
|
);
|
|
161
162
|
}
|
|
162
163
|
if (this.variadic) {
|
|
163
|
-
return this.
|
|
164
|
+
return this._collectValue(arg, previous);
|
|
164
165
|
}
|
|
165
166
|
return arg;
|
|
166
167
|
};
|
|
@@ -194,9 +195,9 @@ var require_argument = __commonJS({
|
|
|
194
195
|
}
|
|
195
196
|
});
|
|
196
197
|
|
|
197
|
-
// node_modules/commander/lib/help.js
|
|
198
|
+
// ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/help.js
|
|
198
199
|
var require_help = __commonJS({
|
|
199
|
-
"node_modules/commander/lib/help.js"(exports) {
|
|
200
|
+
"../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/help.js"(exports) {
|
|
200
201
|
var { humanReadableArgName } = require_argument();
|
|
201
202
|
var Help2 = class {
|
|
202
203
|
constructor() {
|
|
@@ -473,7 +474,11 @@ var require_help = __commonJS({
|
|
|
473
474
|
extraInfo.push(`env: ${option.envVar}`);
|
|
474
475
|
}
|
|
475
476
|
if (extraInfo.length > 0) {
|
|
476
|
-
|
|
477
|
+
const extraDescription = `(${extraInfo.join(", ")})`;
|
|
478
|
+
if (option.description) {
|
|
479
|
+
return `${option.description} ${extraDescription}`;
|
|
480
|
+
}
|
|
481
|
+
return extraDescription;
|
|
477
482
|
}
|
|
478
483
|
return option.description;
|
|
479
484
|
}
|
|
@@ -505,6 +510,41 @@ var require_help = __commonJS({
|
|
|
505
510
|
}
|
|
506
511
|
return argument.description;
|
|
507
512
|
}
|
|
513
|
+
/**
|
|
514
|
+
* Format a list of items, given a heading and an array of formatted items.
|
|
515
|
+
*
|
|
516
|
+
* @param {string} heading
|
|
517
|
+
* @param {string[]} items
|
|
518
|
+
* @param {Help} helper
|
|
519
|
+
* @returns string[]
|
|
520
|
+
*/
|
|
521
|
+
formatItemList(heading, items, helper) {
|
|
522
|
+
if (items.length === 0) return [];
|
|
523
|
+
return [helper.styleTitle(heading), ...items, ""];
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Group items by their help group heading.
|
|
527
|
+
*
|
|
528
|
+
* @param {Command[] | Option[]} unsortedItems
|
|
529
|
+
* @param {Command[] | Option[]} visibleItems
|
|
530
|
+
* @param {Function} getGroup
|
|
531
|
+
* @returns {Map<string, Command[] | Option[]>}
|
|
532
|
+
*/
|
|
533
|
+
groupItems(unsortedItems, visibleItems, getGroup) {
|
|
534
|
+
const result = /* @__PURE__ */ new Map();
|
|
535
|
+
unsortedItems.forEach((item) => {
|
|
536
|
+
const group = getGroup(item);
|
|
537
|
+
if (!result.has(group)) result.set(group, []);
|
|
538
|
+
});
|
|
539
|
+
visibleItems.forEach((item) => {
|
|
540
|
+
const group = getGroup(item);
|
|
541
|
+
if (!result.has(group)) {
|
|
542
|
+
result.set(group, []);
|
|
543
|
+
}
|
|
544
|
+
result.get(group).push(item);
|
|
545
|
+
});
|
|
546
|
+
return result;
|
|
547
|
+
}
|
|
508
548
|
/**
|
|
509
549
|
* Generate the built-in help text.
|
|
510
550
|
*
|
|
@@ -538,26 +578,23 @@ var require_help = __commonJS({
|
|
|
538
578
|
helper.styleArgumentDescription(helper.argumentDescription(argument))
|
|
539
579
|
);
|
|
540
580
|
});
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
581
|
+
output = output.concat(
|
|
582
|
+
this.formatItemList("Arguments:", argumentList, helper)
|
|
583
|
+
);
|
|
584
|
+
const optionGroups = this.groupItems(
|
|
585
|
+
cmd.options,
|
|
586
|
+
helper.visibleOptions(cmd),
|
|
587
|
+
(option) => option.helpGroupHeading ?? "Options:"
|
|
588
|
+
);
|
|
589
|
+
optionGroups.forEach((options, group) => {
|
|
590
|
+
const optionList = options.map((option) => {
|
|
591
|
+
return callFormatItem(
|
|
592
|
+
helper.styleOptionTerm(helper.optionTerm(option)),
|
|
593
|
+
helper.styleOptionDescription(helper.optionDescription(option))
|
|
594
|
+
);
|
|
595
|
+
});
|
|
596
|
+
output = output.concat(this.formatItemList(group, optionList, helper));
|
|
553
597
|
});
|
|
554
|
-
if (optionList.length > 0) {
|
|
555
|
-
output = output.concat([
|
|
556
|
-
helper.styleTitle("Options:"),
|
|
557
|
-
...optionList,
|
|
558
|
-
""
|
|
559
|
-
]);
|
|
560
|
-
}
|
|
561
598
|
if (helper.showGlobalOptions) {
|
|
562
599
|
const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
|
|
563
600
|
return callFormatItem(
|
|
@@ -565,27 +602,24 @@ var require_help = __commonJS({
|
|
|
565
602
|
helper.styleOptionDescription(helper.optionDescription(option))
|
|
566
603
|
);
|
|
567
604
|
});
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
helper.styleTitle("Global Options:"),
|
|
571
|
-
...globalOptionList,
|
|
572
|
-
""
|
|
573
|
-
]);
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
const commandList = helper.visibleCommands(cmd).map((cmd2) => {
|
|
577
|
-
return callFormatItem(
|
|
578
|
-
helper.styleSubcommandTerm(helper.subcommandTerm(cmd2)),
|
|
579
|
-
helper.styleSubcommandDescription(helper.subcommandDescription(cmd2))
|
|
605
|
+
output = output.concat(
|
|
606
|
+
this.formatItemList("Global Options:", globalOptionList, helper)
|
|
580
607
|
);
|
|
581
|
-
});
|
|
582
|
-
if (commandList.length > 0) {
|
|
583
|
-
output = output.concat([
|
|
584
|
-
helper.styleTitle("Commands:"),
|
|
585
|
-
...commandList,
|
|
586
|
-
""
|
|
587
|
-
]);
|
|
588
608
|
}
|
|
609
|
+
const commandGroups = this.groupItems(
|
|
610
|
+
cmd.commands,
|
|
611
|
+
helper.visibleCommands(cmd),
|
|
612
|
+
(sub) => sub.helpGroup() || "Commands:"
|
|
613
|
+
);
|
|
614
|
+
commandGroups.forEach((commands, group) => {
|
|
615
|
+
const commandList = commands.map((sub) => {
|
|
616
|
+
return callFormatItem(
|
|
617
|
+
helper.styleSubcommandTerm(helper.subcommandTerm(sub)),
|
|
618
|
+
helper.styleSubcommandDescription(helper.subcommandDescription(sub))
|
|
619
|
+
);
|
|
620
|
+
});
|
|
621
|
+
output = output.concat(this.formatItemList(group, commandList, helper));
|
|
622
|
+
});
|
|
589
623
|
return output.join("\n");
|
|
590
624
|
}
|
|
591
625
|
/**
|
|
@@ -763,9 +797,9 @@ ${itemIndentStr}`);
|
|
|
763
797
|
}
|
|
764
798
|
});
|
|
765
799
|
|
|
766
|
-
// node_modules/commander/lib/option.js
|
|
800
|
+
// ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/option.js
|
|
767
801
|
var require_option = __commonJS({
|
|
768
|
-
"node_modules/commander/lib/option.js"(exports) {
|
|
802
|
+
"../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/option.js"(exports) {
|
|
769
803
|
var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
|
|
770
804
|
var Option2 = class {
|
|
771
805
|
/**
|
|
@@ -797,6 +831,7 @@ var require_option = __commonJS({
|
|
|
797
831
|
this.argChoices = void 0;
|
|
798
832
|
this.conflictsWith = [];
|
|
799
833
|
this.implied = void 0;
|
|
834
|
+
this.helpGroupHeading = void 0;
|
|
800
835
|
}
|
|
801
836
|
/**
|
|
802
837
|
* Set the default value, and optionally supply the description to be displayed in the help.
|
|
@@ -907,11 +942,12 @@ var require_option = __commonJS({
|
|
|
907
942
|
/**
|
|
908
943
|
* @package
|
|
909
944
|
*/
|
|
910
|
-
|
|
945
|
+
_collectValue(value, previous) {
|
|
911
946
|
if (previous === this.defaultValue || !Array.isArray(previous)) {
|
|
912
947
|
return [value];
|
|
913
948
|
}
|
|
914
|
-
|
|
949
|
+
previous.push(value);
|
|
950
|
+
return previous;
|
|
915
951
|
}
|
|
916
952
|
/**
|
|
917
953
|
* Only allow option value to be one of choices.
|
|
@@ -928,7 +964,7 @@ var require_option = __commonJS({
|
|
|
928
964
|
);
|
|
929
965
|
}
|
|
930
966
|
if (this.variadic) {
|
|
931
|
-
return this.
|
|
967
|
+
return this._collectValue(arg, previous);
|
|
932
968
|
}
|
|
933
969
|
return arg;
|
|
934
970
|
};
|
|
@@ -957,6 +993,16 @@ var require_option = __commonJS({
|
|
|
957
993
|
}
|
|
958
994
|
return camelcase(this.name());
|
|
959
995
|
}
|
|
996
|
+
/**
|
|
997
|
+
* Set the help group heading.
|
|
998
|
+
*
|
|
999
|
+
* @param {string} heading
|
|
1000
|
+
* @return {Option}
|
|
1001
|
+
*/
|
|
1002
|
+
helpGroup(heading) {
|
|
1003
|
+
this.helpGroupHeading = heading;
|
|
1004
|
+
return this;
|
|
1005
|
+
}
|
|
960
1006
|
/**
|
|
961
1007
|
* Check if `arg` matches the short or long flag.
|
|
962
1008
|
*
|
|
@@ -1064,9 +1110,9 @@ var require_option = __commonJS({
|
|
|
1064
1110
|
}
|
|
1065
1111
|
});
|
|
1066
1112
|
|
|
1067
|
-
// node_modules/commander/lib/suggestSimilar.js
|
|
1113
|
+
// ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/suggestSimilar.js
|
|
1068
1114
|
var require_suggestSimilar = __commonJS({
|
|
1069
|
-
"node_modules/commander/lib/suggestSimilar.js"(exports) {
|
|
1115
|
+
"../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/suggestSimilar.js"(exports) {
|
|
1070
1116
|
var maxDistance = 3;
|
|
1071
1117
|
function editDistance(a, b) {
|
|
1072
1118
|
if (Math.abs(a.length - b.length) > maxDistance)
|
|
@@ -1144,13 +1190,13 @@ var require_suggestSimilar = __commonJS({
|
|
|
1144
1190
|
}
|
|
1145
1191
|
});
|
|
1146
1192
|
|
|
1147
|
-
// node_modules/commander/lib/command.js
|
|
1193
|
+
// ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/command.js
|
|
1148
1194
|
var require_command = __commonJS({
|
|
1149
|
-
"node_modules/commander/lib/command.js"(exports) {
|
|
1195
|
+
"../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/command.js"(exports) {
|
|
1150
1196
|
var EventEmitter = __require("node:events").EventEmitter;
|
|
1151
1197
|
var childProcess = __require("node:child_process");
|
|
1152
|
-
var
|
|
1153
|
-
var
|
|
1198
|
+
var path9 = __require("node:path");
|
|
1199
|
+
var fs9 = __require("node:fs");
|
|
1154
1200
|
var process2 = __require("node:process");
|
|
1155
1201
|
var { Argument: Argument2, humanReadableArgName } = require_argument();
|
|
1156
1202
|
var { CommanderError: CommanderError2 } = require_error();
|
|
@@ -1212,6 +1258,9 @@ var require_command = __commonJS({
|
|
|
1212
1258
|
this._addImplicitHelpCommand = void 0;
|
|
1213
1259
|
this._helpCommand = void 0;
|
|
1214
1260
|
this._helpConfiguration = {};
|
|
1261
|
+
this._helpGroupHeading = void 0;
|
|
1262
|
+
this._defaultCommandGroup = void 0;
|
|
1263
|
+
this._defaultOptionGroup = void 0;
|
|
1215
1264
|
}
|
|
1216
1265
|
/**
|
|
1217
1266
|
* Copy settings that are useful to have in common across root command and subcommands.
|
|
@@ -1351,7 +1400,10 @@ var require_command = __commonJS({
|
|
|
1351
1400
|
*/
|
|
1352
1401
|
configureOutput(configuration) {
|
|
1353
1402
|
if (configuration === void 0) return this._outputConfiguration;
|
|
1354
|
-
|
|
1403
|
+
this._outputConfiguration = {
|
|
1404
|
+
...this._outputConfiguration,
|
|
1405
|
+
...configuration
|
|
1406
|
+
};
|
|
1355
1407
|
return this;
|
|
1356
1408
|
}
|
|
1357
1409
|
/**
|
|
@@ -1422,16 +1474,16 @@ var require_command = __commonJS({
|
|
|
1422
1474
|
*
|
|
1423
1475
|
* @param {string} name
|
|
1424
1476
|
* @param {string} [description]
|
|
1425
|
-
* @param {(Function|*)} [
|
|
1477
|
+
* @param {(Function|*)} [parseArg] - custom argument processing function or default value
|
|
1426
1478
|
* @param {*} [defaultValue]
|
|
1427
1479
|
* @return {Command} `this` command for chaining
|
|
1428
1480
|
*/
|
|
1429
|
-
argument(name, description,
|
|
1481
|
+
argument(name, description, parseArg, defaultValue) {
|
|
1430
1482
|
const argument = this.createArgument(name, description);
|
|
1431
|
-
if (typeof
|
|
1432
|
-
argument.default(defaultValue).argParser(
|
|
1483
|
+
if (typeof parseArg === "function") {
|
|
1484
|
+
argument.default(defaultValue).argParser(parseArg);
|
|
1433
1485
|
} else {
|
|
1434
|
-
argument.default(
|
|
1486
|
+
argument.default(parseArg);
|
|
1435
1487
|
}
|
|
1436
1488
|
this.addArgument(argument);
|
|
1437
1489
|
return this;
|
|
@@ -1461,7 +1513,7 @@ var require_command = __commonJS({
|
|
|
1461
1513
|
*/
|
|
1462
1514
|
addArgument(argument) {
|
|
1463
1515
|
const previousArgument = this.registeredArguments.slice(-1)[0];
|
|
1464
|
-
if (previousArgument
|
|
1516
|
+
if (previousArgument?.variadic) {
|
|
1465
1517
|
throw new Error(
|
|
1466
1518
|
`only the last argument can be variadic '${previousArgument.name()}'`
|
|
1467
1519
|
);
|
|
@@ -1490,10 +1542,13 @@ var require_command = __commonJS({
|
|
|
1490
1542
|
helpCommand(enableOrNameAndArgs, description) {
|
|
1491
1543
|
if (typeof enableOrNameAndArgs === "boolean") {
|
|
1492
1544
|
this._addImplicitHelpCommand = enableOrNameAndArgs;
|
|
1545
|
+
if (enableOrNameAndArgs && this._defaultCommandGroup) {
|
|
1546
|
+
this._initCommandGroup(this._getHelpCommand());
|
|
1547
|
+
}
|
|
1493
1548
|
return this;
|
|
1494
1549
|
}
|
|
1495
|
-
|
|
1496
|
-
const [, helpName, helpArgs] =
|
|
1550
|
+
const nameAndArgs = enableOrNameAndArgs ?? "help [command]";
|
|
1551
|
+
const [, helpName, helpArgs] = nameAndArgs.match(/([^ ]+) *(.*)/);
|
|
1497
1552
|
const helpDescription = description ?? "display help for command";
|
|
1498
1553
|
const helpCommand = this.createCommand(helpName);
|
|
1499
1554
|
helpCommand.helpOption(false);
|
|
@@ -1501,6 +1556,7 @@ var require_command = __commonJS({
|
|
|
1501
1556
|
if (helpDescription) helpCommand.description(helpDescription);
|
|
1502
1557
|
this._addImplicitHelpCommand = true;
|
|
1503
1558
|
this._helpCommand = helpCommand;
|
|
1559
|
+
if (enableOrNameAndArgs || description) this._initCommandGroup(helpCommand);
|
|
1504
1560
|
return this;
|
|
1505
1561
|
}
|
|
1506
1562
|
/**
|
|
@@ -1517,6 +1573,7 @@ var require_command = __commonJS({
|
|
|
1517
1573
|
}
|
|
1518
1574
|
this._addImplicitHelpCommand = true;
|
|
1519
1575
|
this._helpCommand = helpCommand;
|
|
1576
|
+
this._initCommandGroup(helpCommand);
|
|
1520
1577
|
return this;
|
|
1521
1578
|
}
|
|
1522
1579
|
/**
|
|
@@ -1665,6 +1722,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1665
1722
|
throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'
|
|
1666
1723
|
- already used by option '${matchingOption.flags}'`);
|
|
1667
1724
|
}
|
|
1725
|
+
this._initOptionGroup(option);
|
|
1668
1726
|
this.options.push(option);
|
|
1669
1727
|
}
|
|
1670
1728
|
/**
|
|
@@ -1688,6 +1746,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1688
1746
|
`cannot add command '${newCmd}' as already have command '${existingCmd}'`
|
|
1689
1747
|
);
|
|
1690
1748
|
}
|
|
1749
|
+
this._initCommandGroup(command);
|
|
1691
1750
|
this.commands.push(command);
|
|
1692
1751
|
}
|
|
1693
1752
|
/**
|
|
@@ -1720,7 +1779,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1720
1779
|
if (val !== null && option.parseArg) {
|
|
1721
1780
|
val = this._callParseArg(option, val, oldValue, invalidValueMessage);
|
|
1722
1781
|
} else if (val !== null && option.variadic) {
|
|
1723
|
-
val = option.
|
|
1782
|
+
val = option._collectValue(val, oldValue);
|
|
1724
1783
|
}
|
|
1725
1784
|
if (val == null) {
|
|
1726
1785
|
if (option.negate) {
|
|
@@ -2131,7 +2190,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2131
2190
|
* @param {string} subcommandName
|
|
2132
2191
|
*/
|
|
2133
2192
|
_checkForMissingExecutable(executableFile, executableDir, subcommandName) {
|
|
2134
|
-
if (
|
|
2193
|
+
if (fs9.existsSync(executableFile)) return;
|
|
2135
2194
|
const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
|
|
2136
2195
|
const executableMissing = `'${executableFile}' does not exist
|
|
2137
2196
|
- if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
@@ -2149,11 +2208,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2149
2208
|
let launchWithNode = false;
|
|
2150
2209
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
2151
2210
|
function findFile(baseDir, baseName) {
|
|
2152
|
-
const localBin =
|
|
2153
|
-
if (
|
|
2154
|
-
if (sourceExt.includes(
|
|
2211
|
+
const localBin = path9.resolve(baseDir, baseName);
|
|
2212
|
+
if (fs9.existsSync(localBin)) return localBin;
|
|
2213
|
+
if (sourceExt.includes(path9.extname(baseName))) return void 0;
|
|
2155
2214
|
const foundExt = sourceExt.find(
|
|
2156
|
-
(ext) =>
|
|
2215
|
+
(ext) => fs9.existsSync(`${localBin}${ext}`)
|
|
2157
2216
|
);
|
|
2158
2217
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
2159
2218
|
return void 0;
|
|
@@ -2165,21 +2224,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2165
2224
|
if (this._scriptPath) {
|
|
2166
2225
|
let resolvedScriptPath;
|
|
2167
2226
|
try {
|
|
2168
|
-
resolvedScriptPath =
|
|
2227
|
+
resolvedScriptPath = fs9.realpathSync(this._scriptPath);
|
|
2169
2228
|
} catch {
|
|
2170
2229
|
resolvedScriptPath = this._scriptPath;
|
|
2171
2230
|
}
|
|
2172
|
-
executableDir =
|
|
2173
|
-
|
|
2231
|
+
executableDir = path9.resolve(
|
|
2232
|
+
path9.dirname(resolvedScriptPath),
|
|
2174
2233
|
executableDir
|
|
2175
2234
|
);
|
|
2176
2235
|
}
|
|
2177
2236
|
if (executableDir) {
|
|
2178
2237
|
let localFile = findFile(executableDir, executableFile);
|
|
2179
2238
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
2180
|
-
const legacyName =
|
|
2239
|
+
const legacyName = path9.basename(
|
|
2181
2240
|
this._scriptPath,
|
|
2182
|
-
|
|
2241
|
+
path9.extname(this._scriptPath)
|
|
2183
2242
|
);
|
|
2184
2243
|
if (legacyName !== this._name) {
|
|
2185
2244
|
localFile = findFile(
|
|
@@ -2190,7 +2249,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2190
2249
|
}
|
|
2191
2250
|
executableFile = localFile || executableFile;
|
|
2192
2251
|
}
|
|
2193
|
-
launchWithNode = sourceExt.includes(
|
|
2252
|
+
launchWithNode = sourceExt.includes(path9.extname(executableFile));
|
|
2194
2253
|
let proc;
|
|
2195
2254
|
if (process2.platform !== "win32") {
|
|
2196
2255
|
if (launchWithNode) {
|
|
@@ -2372,7 +2431,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2372
2431
|
* @private
|
|
2373
2432
|
*/
|
|
2374
2433
|
_chainOrCall(promise, fn) {
|
|
2375
|
-
if (promise
|
|
2434
|
+
if (promise?.then && typeof promise.then === "function") {
|
|
2376
2435
|
return promise.then(() => fn());
|
|
2377
2436
|
}
|
|
2378
2437
|
return fn();
|
|
@@ -2477,7 +2536,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2477
2536
|
promiseChain = this._chainOrCallHooks(promiseChain, "postAction");
|
|
2478
2537
|
return promiseChain;
|
|
2479
2538
|
}
|
|
2480
|
-
if (this.parent
|
|
2539
|
+
if (this.parent?.listenerCount(commandEvent)) {
|
|
2481
2540
|
checkForUnknownOptions();
|
|
2482
2541
|
this._processArguments();
|
|
2483
2542
|
this.parent.emit(commandEvent, operands, unknown);
|
|
@@ -2588,26 +2647,34 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2588
2647
|
* sub --unknown uuu op => [sub], [--unknown uuu op]
|
|
2589
2648
|
* sub -- --unknown uuu op => [sub --unknown uuu op], []
|
|
2590
2649
|
*
|
|
2591
|
-
* @param {string[]}
|
|
2650
|
+
* @param {string[]} args
|
|
2592
2651
|
* @return {{operands: string[], unknown: string[]}}
|
|
2593
2652
|
*/
|
|
2594
|
-
parseOptions(
|
|
2653
|
+
parseOptions(args) {
|
|
2595
2654
|
const operands = [];
|
|
2596
2655
|
const unknown = [];
|
|
2597
2656
|
let dest = operands;
|
|
2598
|
-
const args = argv.slice();
|
|
2599
2657
|
function maybeOption(arg) {
|
|
2600
2658
|
return arg.length > 1 && arg[0] === "-";
|
|
2601
2659
|
}
|
|
2660
|
+
const negativeNumberArg = (arg) => {
|
|
2661
|
+
if (!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(arg)) return false;
|
|
2662
|
+
return !this._getCommandAndAncestors().some(
|
|
2663
|
+
(cmd) => cmd.options.map((opt) => opt.short).some((short) => /^-\d$/.test(short))
|
|
2664
|
+
);
|
|
2665
|
+
};
|
|
2602
2666
|
let activeVariadicOption = null;
|
|
2603
|
-
|
|
2604
|
-
|
|
2667
|
+
let activeGroup = null;
|
|
2668
|
+
let i = 0;
|
|
2669
|
+
while (i < args.length || activeGroup) {
|
|
2670
|
+
const arg = activeGroup ?? args[i++];
|
|
2671
|
+
activeGroup = null;
|
|
2605
2672
|
if (arg === "--") {
|
|
2606
2673
|
if (dest === unknown) dest.push(arg);
|
|
2607
|
-
dest.push(...args);
|
|
2674
|
+
dest.push(...args.slice(i));
|
|
2608
2675
|
break;
|
|
2609
2676
|
}
|
|
2610
|
-
if (activeVariadicOption && !maybeOption(arg)) {
|
|
2677
|
+
if (activeVariadicOption && (!maybeOption(arg) || negativeNumberArg(arg))) {
|
|
2611
2678
|
this.emit(`option:${activeVariadicOption.name()}`, arg);
|
|
2612
2679
|
continue;
|
|
2613
2680
|
}
|
|
@@ -2616,13 +2683,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2616
2683
|
const option = this._findOption(arg);
|
|
2617
2684
|
if (option) {
|
|
2618
2685
|
if (option.required) {
|
|
2619
|
-
const value = args
|
|
2686
|
+
const value = args[i++];
|
|
2620
2687
|
if (value === void 0) this.optionMissingArgument(option);
|
|
2621
2688
|
this.emit(`option:${option.name()}`, value);
|
|
2622
2689
|
} else if (option.optional) {
|
|
2623
2690
|
let value = null;
|
|
2624
|
-
if (args.length
|
|
2625
|
-
value = args
|
|
2691
|
+
if (i < args.length && (!maybeOption(args[i]) || negativeNumberArg(args[i]))) {
|
|
2692
|
+
value = args[i++];
|
|
2626
2693
|
}
|
|
2627
2694
|
this.emit(`option:${option.name()}`, value);
|
|
2628
2695
|
} else {
|
|
@@ -2639,7 +2706,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2639
2706
|
this.emit(`option:${option.name()}`, arg.slice(2));
|
|
2640
2707
|
} else {
|
|
2641
2708
|
this.emit(`option:${option.name()}`);
|
|
2642
|
-
|
|
2709
|
+
activeGroup = `-${arg.slice(2)}`;
|
|
2643
2710
|
}
|
|
2644
2711
|
continue;
|
|
2645
2712
|
}
|
|
@@ -2652,27 +2719,24 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2652
2719
|
continue;
|
|
2653
2720
|
}
|
|
2654
2721
|
}
|
|
2655
|
-
if (maybeOption(arg)) {
|
|
2722
|
+
if (dest === operands && maybeOption(arg) && !(this.commands.length === 0 && negativeNumberArg(arg))) {
|
|
2656
2723
|
dest = unknown;
|
|
2657
2724
|
}
|
|
2658
2725
|
if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown.length === 0) {
|
|
2659
2726
|
if (this._findCommand(arg)) {
|
|
2660
2727
|
operands.push(arg);
|
|
2661
|
-
|
|
2728
|
+
unknown.push(...args.slice(i));
|
|
2662
2729
|
break;
|
|
2663
2730
|
} else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {
|
|
2664
|
-
operands.push(arg);
|
|
2665
|
-
if (args.length > 0) operands.push(...args);
|
|
2731
|
+
operands.push(arg, ...args.slice(i));
|
|
2666
2732
|
break;
|
|
2667
2733
|
} else if (this._defaultCommandName) {
|
|
2668
|
-
unknown.push(arg);
|
|
2669
|
-
if (args.length > 0) unknown.push(...args);
|
|
2734
|
+
unknown.push(arg, ...args.slice(i));
|
|
2670
2735
|
break;
|
|
2671
2736
|
}
|
|
2672
2737
|
}
|
|
2673
2738
|
if (this._passThroughOptions) {
|
|
2674
|
-
dest.push(arg);
|
|
2675
|
-
if (args.length > 0) dest.push(...args);
|
|
2739
|
+
dest.push(arg, ...args.slice(i));
|
|
2676
2740
|
break;
|
|
2677
2741
|
}
|
|
2678
2742
|
dest.push(arg);
|
|
@@ -3024,6 +3088,69 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3024
3088
|
this._name = str;
|
|
3025
3089
|
return this;
|
|
3026
3090
|
}
|
|
3091
|
+
/**
|
|
3092
|
+
* Set/get the help group heading for this subcommand in parent command's help.
|
|
3093
|
+
*
|
|
3094
|
+
* @param {string} [heading]
|
|
3095
|
+
* @return {Command | string}
|
|
3096
|
+
*/
|
|
3097
|
+
helpGroup(heading) {
|
|
3098
|
+
if (heading === void 0) return this._helpGroupHeading ?? "";
|
|
3099
|
+
this._helpGroupHeading = heading;
|
|
3100
|
+
return this;
|
|
3101
|
+
}
|
|
3102
|
+
/**
|
|
3103
|
+
* Set/get the default help group heading for subcommands added to this command.
|
|
3104
|
+
* (This does not override a group set directly on the subcommand using .helpGroup().)
|
|
3105
|
+
*
|
|
3106
|
+
* @example
|
|
3107
|
+
* program.commandsGroup('Development Commands:);
|
|
3108
|
+
* program.command('watch')...
|
|
3109
|
+
* program.command('lint')...
|
|
3110
|
+
* ...
|
|
3111
|
+
*
|
|
3112
|
+
* @param {string} [heading]
|
|
3113
|
+
* @returns {Command | string}
|
|
3114
|
+
*/
|
|
3115
|
+
commandsGroup(heading) {
|
|
3116
|
+
if (heading === void 0) return this._defaultCommandGroup ?? "";
|
|
3117
|
+
this._defaultCommandGroup = heading;
|
|
3118
|
+
return this;
|
|
3119
|
+
}
|
|
3120
|
+
/**
|
|
3121
|
+
* Set/get the default help group heading for options added to this command.
|
|
3122
|
+
* (This does not override a group set directly on the option using .helpGroup().)
|
|
3123
|
+
*
|
|
3124
|
+
* @example
|
|
3125
|
+
* program
|
|
3126
|
+
* .optionsGroup('Development Options:')
|
|
3127
|
+
* .option('-d, --debug', 'output extra debugging')
|
|
3128
|
+
* .option('-p, --profile', 'output profiling information')
|
|
3129
|
+
*
|
|
3130
|
+
* @param {string} [heading]
|
|
3131
|
+
* @returns {Command | string}
|
|
3132
|
+
*/
|
|
3133
|
+
optionsGroup(heading) {
|
|
3134
|
+
if (heading === void 0) return this._defaultOptionGroup ?? "";
|
|
3135
|
+
this._defaultOptionGroup = heading;
|
|
3136
|
+
return this;
|
|
3137
|
+
}
|
|
3138
|
+
/**
|
|
3139
|
+
* @param {Option} option
|
|
3140
|
+
* @private
|
|
3141
|
+
*/
|
|
3142
|
+
_initOptionGroup(option) {
|
|
3143
|
+
if (this._defaultOptionGroup && !option.helpGroupHeading)
|
|
3144
|
+
option.helpGroup(this._defaultOptionGroup);
|
|
3145
|
+
}
|
|
3146
|
+
/**
|
|
3147
|
+
* @param {Command} cmd
|
|
3148
|
+
* @private
|
|
3149
|
+
*/
|
|
3150
|
+
_initCommandGroup(cmd) {
|
|
3151
|
+
if (this._defaultCommandGroup && !cmd.helpGroup())
|
|
3152
|
+
cmd.helpGroup(this._defaultCommandGroup);
|
|
3153
|
+
}
|
|
3027
3154
|
/**
|
|
3028
3155
|
* Set the name of the command from script filename, such as process.argv[1],
|
|
3029
3156
|
* or require.main.filename, or __filename.
|
|
@@ -3037,7 +3164,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3037
3164
|
* @return {Command}
|
|
3038
3165
|
*/
|
|
3039
3166
|
nameFromFilename(filename) {
|
|
3040
|
-
this._name =
|
|
3167
|
+
this._name = path9.basename(filename, path9.extname(filename));
|
|
3041
3168
|
return this;
|
|
3042
3169
|
}
|
|
3043
3170
|
/**
|
|
@@ -3051,9 +3178,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3051
3178
|
* @param {string} [path]
|
|
3052
3179
|
* @return {(string|null|Command)}
|
|
3053
3180
|
*/
|
|
3054
|
-
executableDir(
|
|
3055
|
-
if (
|
|
3056
|
-
this._executableDir =
|
|
3181
|
+
executableDir(path10) {
|
|
3182
|
+
if (path10 === void 0) return this._executableDir;
|
|
3183
|
+
this._executableDir = path10;
|
|
3057
3184
|
return this;
|
|
3058
3185
|
}
|
|
3059
3186
|
/**
|
|
@@ -3158,15 +3285,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3158
3285
|
helpOption(flags, description) {
|
|
3159
3286
|
if (typeof flags === "boolean") {
|
|
3160
3287
|
if (flags) {
|
|
3161
|
-
this._helpOption
|
|
3288
|
+
if (this._helpOption === null) this._helpOption = void 0;
|
|
3289
|
+
if (this._defaultOptionGroup) {
|
|
3290
|
+
this._initOptionGroup(this._getHelpOption());
|
|
3291
|
+
}
|
|
3162
3292
|
} else {
|
|
3163
3293
|
this._helpOption = null;
|
|
3164
3294
|
}
|
|
3165
3295
|
return this;
|
|
3166
3296
|
}
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3297
|
+
this._helpOption = this.createOption(
|
|
3298
|
+
flags ?? "-h, --help",
|
|
3299
|
+
description ?? "display help for command"
|
|
3300
|
+
);
|
|
3301
|
+
if (flags || description) this._initOptionGroup(this._helpOption);
|
|
3170
3302
|
return this;
|
|
3171
3303
|
}
|
|
3172
3304
|
/**
|
|
@@ -3191,6 +3323,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3191
3323
|
*/
|
|
3192
3324
|
addHelpOption(option) {
|
|
3193
3325
|
this._helpOption = option;
|
|
3326
|
+
this._initOptionGroup(option);
|
|
3194
3327
|
return this;
|
|
3195
3328
|
}
|
|
3196
3329
|
/**
|
|
@@ -3303,9 +3436,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3303
3436
|
}
|
|
3304
3437
|
});
|
|
3305
3438
|
|
|
3306
|
-
// node_modules/commander/index.js
|
|
3439
|
+
// ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/index.js
|
|
3307
3440
|
var require_commander = __commonJS({
|
|
3308
|
-
"node_modules/commander/index.js"(exports) {
|
|
3441
|
+
"../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/index.js"(exports) {
|
|
3309
3442
|
var { Argument: Argument2 } = require_argument();
|
|
3310
3443
|
var { Command: Command2 } = require_command();
|
|
3311
3444
|
var { CommanderError: CommanderError2, InvalidArgumentError: InvalidArgumentError2 } = require_error();
|
|
@@ -3325,9 +3458,9 @@ var require_commander = __commonJS({
|
|
|
3325
3458
|
}
|
|
3326
3459
|
});
|
|
3327
3460
|
|
|
3328
|
-
// node_modules/universalify/index.js
|
|
3461
|
+
// ../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
|
|
3329
3462
|
var require_universalify = __commonJS({
|
|
3330
|
-
"node_modules/universalify/index.js"(exports) {
|
|
3463
|
+
"../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports) {
|
|
3331
3464
|
"use strict";
|
|
3332
3465
|
exports.fromCallback = function(fn) {
|
|
3333
3466
|
return Object.defineProperty(function(...args) {
|
|
@@ -3353,9 +3486,9 @@ var require_universalify = __commonJS({
|
|
|
3353
3486
|
}
|
|
3354
3487
|
});
|
|
3355
3488
|
|
|
3356
|
-
// node_modules/graceful-fs/polyfills.js
|
|
3489
|
+
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
|
|
3357
3490
|
var require_polyfills = __commonJS({
|
|
3358
|
-
"node_modules/graceful-fs/polyfills.js"(exports, module) {
|
|
3491
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module) {
|
|
3359
3492
|
var constants = __require("constants");
|
|
3360
3493
|
var origCwd = process.cwd;
|
|
3361
3494
|
var cwd = null;
|
|
@@ -3379,54 +3512,54 @@ var require_polyfills = __commonJS({
|
|
|
3379
3512
|
}
|
|
3380
3513
|
var chdir;
|
|
3381
3514
|
module.exports = patch;
|
|
3382
|
-
function patch(
|
|
3515
|
+
function patch(fs9) {
|
|
3383
3516
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
3384
|
-
patchLchmod(
|
|
3385
|
-
}
|
|
3386
|
-
if (!
|
|
3387
|
-
patchLutimes(
|
|
3388
|
-
}
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
if (
|
|
3408
|
-
|
|
3517
|
+
patchLchmod(fs9);
|
|
3518
|
+
}
|
|
3519
|
+
if (!fs9.lutimes) {
|
|
3520
|
+
patchLutimes(fs9);
|
|
3521
|
+
}
|
|
3522
|
+
fs9.chown = chownFix(fs9.chown);
|
|
3523
|
+
fs9.fchown = chownFix(fs9.fchown);
|
|
3524
|
+
fs9.lchown = chownFix(fs9.lchown);
|
|
3525
|
+
fs9.chmod = chmodFix(fs9.chmod);
|
|
3526
|
+
fs9.fchmod = chmodFix(fs9.fchmod);
|
|
3527
|
+
fs9.lchmod = chmodFix(fs9.lchmod);
|
|
3528
|
+
fs9.chownSync = chownFixSync(fs9.chownSync);
|
|
3529
|
+
fs9.fchownSync = chownFixSync(fs9.fchownSync);
|
|
3530
|
+
fs9.lchownSync = chownFixSync(fs9.lchownSync);
|
|
3531
|
+
fs9.chmodSync = chmodFixSync(fs9.chmodSync);
|
|
3532
|
+
fs9.fchmodSync = chmodFixSync(fs9.fchmodSync);
|
|
3533
|
+
fs9.lchmodSync = chmodFixSync(fs9.lchmodSync);
|
|
3534
|
+
fs9.stat = statFix(fs9.stat);
|
|
3535
|
+
fs9.fstat = statFix(fs9.fstat);
|
|
3536
|
+
fs9.lstat = statFix(fs9.lstat);
|
|
3537
|
+
fs9.statSync = statFixSync(fs9.statSync);
|
|
3538
|
+
fs9.fstatSync = statFixSync(fs9.fstatSync);
|
|
3539
|
+
fs9.lstatSync = statFixSync(fs9.lstatSync);
|
|
3540
|
+
if (fs9.chmod && !fs9.lchmod) {
|
|
3541
|
+
fs9.lchmod = function(path9, mode, cb) {
|
|
3409
3542
|
if (cb) process.nextTick(cb);
|
|
3410
3543
|
};
|
|
3411
|
-
|
|
3544
|
+
fs9.lchmodSync = function() {
|
|
3412
3545
|
};
|
|
3413
3546
|
}
|
|
3414
|
-
if (
|
|
3415
|
-
|
|
3547
|
+
if (fs9.chown && !fs9.lchown) {
|
|
3548
|
+
fs9.lchown = function(path9, uid, gid, cb) {
|
|
3416
3549
|
if (cb) process.nextTick(cb);
|
|
3417
3550
|
};
|
|
3418
|
-
|
|
3551
|
+
fs9.lchownSync = function() {
|
|
3419
3552
|
};
|
|
3420
3553
|
}
|
|
3421
3554
|
if (platform === "win32") {
|
|
3422
|
-
|
|
3555
|
+
fs9.rename = typeof fs9.rename !== "function" ? fs9.rename : (function(fs$rename) {
|
|
3423
3556
|
function rename(from, to, cb) {
|
|
3424
3557
|
var start = Date.now();
|
|
3425
3558
|
var backoff = 0;
|
|
3426
3559
|
fs$rename(from, to, function CB(er) {
|
|
3427
3560
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
3428
3561
|
setTimeout(function() {
|
|
3429
|
-
|
|
3562
|
+
fs9.stat(to, function(stater, st) {
|
|
3430
3563
|
if (stater && stater.code === "ENOENT")
|
|
3431
3564
|
fs$rename(from, to, CB);
|
|
3432
3565
|
else
|
|
@@ -3442,9 +3575,9 @@ var require_polyfills = __commonJS({
|
|
|
3442
3575
|
}
|
|
3443
3576
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
3444
3577
|
return rename;
|
|
3445
|
-
})(
|
|
3578
|
+
})(fs9.rename);
|
|
3446
3579
|
}
|
|
3447
|
-
|
|
3580
|
+
fs9.read = typeof fs9.read !== "function" ? fs9.read : (function(fs$read) {
|
|
3448
3581
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
3449
3582
|
var callback;
|
|
3450
3583
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -3452,22 +3585,22 @@ var require_polyfills = __commonJS({
|
|
|
3452
3585
|
callback = function(er, _, __) {
|
|
3453
3586
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
3454
3587
|
eagCounter++;
|
|
3455
|
-
return fs$read.call(
|
|
3588
|
+
return fs$read.call(fs9, fd, buffer, offset, length, position, callback);
|
|
3456
3589
|
}
|
|
3457
3590
|
callback_.apply(this, arguments);
|
|
3458
3591
|
};
|
|
3459
3592
|
}
|
|
3460
|
-
return fs$read.call(
|
|
3593
|
+
return fs$read.call(fs9, fd, buffer, offset, length, position, callback);
|
|
3461
3594
|
}
|
|
3462
3595
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
3463
3596
|
return read;
|
|
3464
|
-
})(
|
|
3465
|
-
|
|
3597
|
+
})(fs9.read);
|
|
3598
|
+
fs9.readSync = typeof fs9.readSync !== "function" ? fs9.readSync : /* @__PURE__ */ (function(fs$readSync) {
|
|
3466
3599
|
return function(fd, buffer, offset, length, position) {
|
|
3467
3600
|
var eagCounter = 0;
|
|
3468
3601
|
while (true) {
|
|
3469
3602
|
try {
|
|
3470
|
-
return fs$readSync.call(
|
|
3603
|
+
return fs$readSync.call(fs9, fd, buffer, offset, length, position);
|
|
3471
3604
|
} catch (er) {
|
|
3472
3605
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
3473
3606
|
eagCounter++;
|
|
@@ -3477,11 +3610,11 @@ var require_polyfills = __commonJS({
|
|
|
3477
3610
|
}
|
|
3478
3611
|
}
|
|
3479
3612
|
};
|
|
3480
|
-
})(
|
|
3481
|
-
function patchLchmod(
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3613
|
+
})(fs9.readSync);
|
|
3614
|
+
function patchLchmod(fs10) {
|
|
3615
|
+
fs10.lchmod = function(path9, mode, callback) {
|
|
3616
|
+
fs10.open(
|
|
3617
|
+
path9,
|
|
3485
3618
|
constants.O_WRONLY | constants.O_SYMLINK,
|
|
3486
3619
|
mode,
|
|
3487
3620
|
function(err, fd) {
|
|
@@ -3489,80 +3622,80 @@ var require_polyfills = __commonJS({
|
|
|
3489
3622
|
if (callback) callback(err);
|
|
3490
3623
|
return;
|
|
3491
3624
|
}
|
|
3492
|
-
|
|
3493
|
-
|
|
3625
|
+
fs10.fchmod(fd, mode, function(err2) {
|
|
3626
|
+
fs10.close(fd, function(err22) {
|
|
3494
3627
|
if (callback) callback(err2 || err22);
|
|
3495
3628
|
});
|
|
3496
3629
|
});
|
|
3497
3630
|
}
|
|
3498
3631
|
);
|
|
3499
3632
|
};
|
|
3500
|
-
|
|
3501
|
-
var fd =
|
|
3633
|
+
fs10.lchmodSync = function(path9, mode) {
|
|
3634
|
+
var fd = fs10.openSync(path9, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
3502
3635
|
var threw = true;
|
|
3503
3636
|
var ret;
|
|
3504
3637
|
try {
|
|
3505
|
-
ret =
|
|
3638
|
+
ret = fs10.fchmodSync(fd, mode);
|
|
3506
3639
|
threw = false;
|
|
3507
3640
|
} finally {
|
|
3508
3641
|
if (threw) {
|
|
3509
3642
|
try {
|
|
3510
|
-
|
|
3643
|
+
fs10.closeSync(fd);
|
|
3511
3644
|
} catch (er) {
|
|
3512
3645
|
}
|
|
3513
3646
|
} else {
|
|
3514
|
-
|
|
3647
|
+
fs10.closeSync(fd);
|
|
3515
3648
|
}
|
|
3516
3649
|
}
|
|
3517
3650
|
return ret;
|
|
3518
3651
|
};
|
|
3519
3652
|
}
|
|
3520
|
-
function patchLutimes(
|
|
3521
|
-
if (constants.hasOwnProperty("O_SYMLINK") &&
|
|
3522
|
-
|
|
3523
|
-
|
|
3653
|
+
function patchLutimes(fs10) {
|
|
3654
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs10.futimes) {
|
|
3655
|
+
fs10.lutimes = function(path9, at, mt, cb) {
|
|
3656
|
+
fs10.open(path9, constants.O_SYMLINK, function(er, fd) {
|
|
3524
3657
|
if (er) {
|
|
3525
3658
|
if (cb) cb(er);
|
|
3526
3659
|
return;
|
|
3527
3660
|
}
|
|
3528
|
-
|
|
3529
|
-
|
|
3661
|
+
fs10.futimes(fd, at, mt, function(er2) {
|
|
3662
|
+
fs10.close(fd, function(er22) {
|
|
3530
3663
|
if (cb) cb(er2 || er22);
|
|
3531
3664
|
});
|
|
3532
3665
|
});
|
|
3533
3666
|
});
|
|
3534
3667
|
};
|
|
3535
|
-
|
|
3536
|
-
var fd =
|
|
3668
|
+
fs10.lutimesSync = function(path9, at, mt) {
|
|
3669
|
+
var fd = fs10.openSync(path9, constants.O_SYMLINK);
|
|
3537
3670
|
var ret;
|
|
3538
3671
|
var threw = true;
|
|
3539
3672
|
try {
|
|
3540
|
-
ret =
|
|
3673
|
+
ret = fs10.futimesSync(fd, at, mt);
|
|
3541
3674
|
threw = false;
|
|
3542
3675
|
} finally {
|
|
3543
3676
|
if (threw) {
|
|
3544
3677
|
try {
|
|
3545
|
-
|
|
3678
|
+
fs10.closeSync(fd);
|
|
3546
3679
|
} catch (er) {
|
|
3547
3680
|
}
|
|
3548
3681
|
} else {
|
|
3549
|
-
|
|
3682
|
+
fs10.closeSync(fd);
|
|
3550
3683
|
}
|
|
3551
3684
|
}
|
|
3552
3685
|
return ret;
|
|
3553
3686
|
};
|
|
3554
|
-
} else if (
|
|
3555
|
-
|
|
3687
|
+
} else if (fs10.futimes) {
|
|
3688
|
+
fs10.lutimes = function(_a, _b, _c, cb) {
|
|
3556
3689
|
if (cb) process.nextTick(cb);
|
|
3557
3690
|
};
|
|
3558
|
-
|
|
3691
|
+
fs10.lutimesSync = function() {
|
|
3559
3692
|
};
|
|
3560
3693
|
}
|
|
3561
3694
|
}
|
|
3562
3695
|
function chmodFix(orig) {
|
|
3563
3696
|
if (!orig) return orig;
|
|
3564
3697
|
return function(target, mode, cb) {
|
|
3565
|
-
return orig.call(
|
|
3698
|
+
return orig.call(fs9, target, mode, function(er) {
|
|
3566
3699
|
if (chownErOk(er)) er = null;
|
|
3567
3700
|
if (cb) cb.apply(this, arguments);
|
|
3568
3701
|
});
|
|
@@ -3572,7 +3705,7 @@ var require_polyfills = __commonJS({
|
|
|
3572
3705
|
if (!orig) return orig;
|
|
3573
3706
|
return function(target, mode) {
|
|
3574
3707
|
try {
|
|
3575
|
-
return orig.call(
|
|
3708
|
+
return orig.call(fs9, target, mode);
|
|
3576
3709
|
} catch (er) {
|
|
3577
3710
|
if (!chownErOk(er)) throw er;
|
|
3578
3711
|
}
|
|
@@ -3581,7 +3714,7 @@ var require_polyfills = __commonJS({
|
|
|
3581
3714
|
function chownFix(orig) {
|
|
3582
3715
|
if (!orig) return orig;
|
|
3583
3716
|
return function(target, uid, gid, cb) {
|
|
3584
|
-
return orig.call(
|
|
3717
|
+
return orig.call(fs9, target, uid, gid, function(er) {
|
|
3585
3718
|
if (chownErOk(er)) er = null;
|
|
3586
3719
|
if (cb) cb.apply(this, arguments);
|
|
3587
3720
|
});
|
|
@@ -3591,7 +3724,7 @@ var require_polyfills = __commonJS({
|
|
|
3591
3724
|
if (!orig) return orig;
|
|
3592
3725
|
return function(target, uid, gid) {
|
|
3593
3726
|
try {
|
|
3594
|
-
return orig.call(
|
|
3727
|
+
return orig.call(fs9, target, uid, gid);
|
|
3595
3728
|
} catch (er) {
|
|
3596
3729
|
if (!chownErOk(er)) throw er;
|
|
3597
3730
|
}
|
|
@@ -3611,13 +3744,13 @@ var require_polyfills = __commonJS({
|
|
|
3611
3744
|
}
|
|
3612
3745
|
if (cb) cb.apply(this, arguments);
|
|
3613
3746
|
}
|
|
3614
|
-
return options ? orig.call(
|
|
3747
|
+
return options ? orig.call(fs9, target, options, callback) : orig.call(fs9, target, callback);
|
|
3615
3748
|
};
|
|
3616
3749
|
}
|
|
3617
3750
|
function statFixSync(orig) {
|
|
3618
3751
|
if (!orig) return orig;
|
|
3619
3752
|
return function(target, options) {
|
|
3620
|
-
var stats = options ? orig.call(
|
|
3753
|
+
var stats = options ? orig.call(fs9, target, options) : orig.call(fs9, target);
|
|
3621
3754
|
if (stats) {
|
|
3622
3755
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
3623
3756
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -3641,21 +3774,21 @@ var require_polyfills = __commonJS({
|
|
|
3641
3774
|
}
|
|
3642
3775
|
});
|
|
3643
3776
|
|
|
3644
|
-
// node_modules/graceful-fs/legacy-streams.js
|
|
3777
|
+
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js
|
|
3645
3778
|
var require_legacy_streams = __commonJS({
|
|
3646
|
-
"node_modules/graceful-fs/legacy-streams.js"(exports, module) {
|
|
3779
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module) {
|
|
3647
3780
|
var Stream = __require("stream").Stream;
|
|
3648
3781
|
module.exports = legacy;
|
|
3649
|
-
function legacy(
|
|
3782
|
+
function legacy(fs9) {
|
|
3650
3783
|
return {
|
|
3651
3784
|
ReadStream,
|
|
3652
3785
|
WriteStream
|
|
3653
3786
|
};
|
|
3654
|
-
function ReadStream(
|
|
3655
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
3787
|
+
function ReadStream(path9, options) {
|
|
3788
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path9, options);
|
|
3656
3789
|
Stream.call(this);
|
|
3657
3790
|
var self = this;
|
|
3658
|
-
this.path =
|
|
3791
|
+
this.path = path9;
|
|
3659
3792
|
this.fd = null;
|
|
3660
3793
|
this.readable = true;
|
|
3661
3794
|
this.paused = false;
|
|
@@ -3689,7 +3822,7 @@ var require_legacy_streams = __commonJS({
|
|
|
3689
3822
|
});
|
|
3690
3823
|
return;
|
|
3691
3824
|
}
|
|
3692
|
-
|
|
3825
|
+
fs9.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
3693
3826
|
if (err) {
|
|
3694
3827
|
self.emit("error", err);
|
|
3695
3828
|
self.readable = false;
|
|
@@ -3700,10 +3833,10 @@ var require_legacy_streams = __commonJS({
|
|
|
3700
3833
|
self._read();
|
|
3701
3834
|
});
|
|
3702
3835
|
}
|
|
3703
|
-
function WriteStream(
|
|
3704
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
3836
|
+
function WriteStream(path9, options) {
|
|
3837
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path9, options);
|
|
3705
3838
|
Stream.call(this);
|
|
3706
|
-
this.path =
|
|
3839
|
+
this.path = path9;
|
|
3707
3840
|
this.fd = null;
|
|
3708
3841
|
this.writable = true;
|
|
3709
3842
|
this.flags = "w";
|
|
@@ -3728,7 +3861,7 @@ var require_legacy_streams = __commonJS({
|
|
|
3728
3861
|
this.busy = false;
|
|
3729
3862
|
this._queue = [];
|
|
3730
3863
|
if (this.fd === null) {
|
|
3731
|
-
this._open =
|
|
3864
|
+
this._open = fs9.open;
|
|
3732
3865
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
3733
3866
|
this.flush();
|
|
3734
3867
|
}
|
|
@@ -3737,9 +3870,9 @@ var require_legacy_streams = __commonJS({
|
|
|
3737
3870
|
}
|
|
3738
3871
|
});
|
|
3739
3872
|
|
|
3740
|
-
// node_modules/graceful-fs/clone.js
|
|
3873
|
+
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js
|
|
3741
3874
|
var require_clone = __commonJS({
|
|
3742
|
-
"node_modules/graceful-fs/clone.js"(exports, module) {
|
|
3875
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports, module) {
|
|
3743
3876
|
"use strict";
|
|
3744
3877
|
module.exports = clone;
|
|
3745
3878
|
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
|
|
@@ -3760,10 +3893,10 @@ var require_clone = __commonJS({
|
|
|
3760
3893
|
}
|
|
3761
3894
|
});
|
|
3762
3895
|
|
|
3763
|
-
// node_modules/graceful-fs/graceful-fs.js
|
|
3896
|
+
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
|
|
3764
3897
|
var require_graceful_fs = __commonJS({
|
|
3765
|
-
"node_modules/graceful-fs/graceful-fs.js"(exports, module) {
|
|
3766
|
-
var
|
|
3898
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module) {
|
|
3899
|
+
var fs9 = __require("fs");
|
|
3767
3900
|
var polyfills = require_polyfills();
|
|
3768
3901
|
var legacy = require_legacy_streams();
|
|
3769
3902
|
var clone = require_clone();
|
|
@@ -3771,8 +3904,8 @@ var require_graceful_fs = __commonJS({
|
|
|
3771
3904
|
var gracefulQueue;
|
|
3772
3905
|
var previousSymbol;
|
|
3773
3906
|
if (typeof Symbol === "function" && typeof Symbol.for === "function") {
|
|
3774
|
-
gracefulQueue = Symbol.for("graceful-fs.queue");
|
|
3775
|
-
previousSymbol = Symbol.for("graceful-fs.previous");
|
|
3907
|
+
gracefulQueue = /* @__PURE__ */ Symbol.for("graceful-fs.queue");
|
|
3908
|
+
previousSymbol = /* @__PURE__ */ Symbol.for("graceful-fs.previous");
|
|
3776
3909
|
} else {
|
|
3777
3910
|
gracefulQueue = "___graceful-fs.queue";
|
|
3778
3911
|
previousSymbol = "___graceful-fs.previous";
|
|
@@ -3795,12 +3928,12 @@ var require_graceful_fs = __commonJS({
|
|
|
3795
3928
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
3796
3929
|
console.error(m);
|
|
3797
3930
|
};
|
|
3798
|
-
if (!
|
|
3931
|
+
if (!fs9[gracefulQueue]) {
|
|
3799
3932
|
queue = global[gracefulQueue] || [];
|
|
3800
|
-
publishQueue(
|
|
3801
|
-
|
|
3933
|
+
publishQueue(fs9, queue);
|
|
3934
|
+
fs9.close = (function(fs$close) {
|
|
3802
3935
|
function close(fd, cb) {
|
|
3803
|
-
return fs$close.call(
|
|
3936
|
+
return fs$close.call(fs9, fd, function(err) {
|
|
3804
3937
|
if (!err) {
|
|
3805
3938
|
resetQueue();
|
|
3806
3939
|
}
|
|
@@ -3812,48 +3945,48 @@ var require_graceful_fs = __commonJS({
|
|
|
3812
3945
|
value: fs$close
|
|
3813
3946
|
});
|
|
3814
3947
|
return close;
|
|
3815
|
-
})(
|
|
3816
|
-
|
|
3948
|
+
})(fs9.close);
|
|
3949
|
+
fs9.closeSync = (function(fs$closeSync) {
|
|
3817
3950
|
function closeSync(fd) {
|
|
3818
|
-
fs$closeSync.apply(
|
|
3951
|
+
fs$closeSync.apply(fs9, arguments);
|
|
3819
3952
|
resetQueue();
|
|
3820
3953
|
}
|
|
3821
3954
|
Object.defineProperty(closeSync, previousSymbol, {
|
|
3822
3955
|
value: fs$closeSync
|
|
3823
3956
|
});
|
|
3824
3957
|
return closeSync;
|
|
3825
|
-
})(
|
|
3958
|
+
})(fs9.closeSync);
|
|
3826
3959
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
3827
3960
|
process.on("exit", function() {
|
|
3828
|
-
debug(
|
|
3829
|
-
__require("assert").equal(
|
|
3961
|
+
debug(fs9[gracefulQueue]);
|
|
3962
|
+
__require("assert").equal(fs9[gracefulQueue].length, 0);
|
|
3830
3963
|
});
|
|
3831
3964
|
}
|
|
3832
3965
|
}
|
|
3833
3966
|
var queue;
|
|
3834
3967
|
if (!global[gracefulQueue]) {
|
|
3835
|
-
publishQueue(global,
|
|
3836
|
-
}
|
|
3837
|
-
module.exports = patch(clone(
|
|
3838
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
3839
|
-
module.exports = patch(
|
|
3840
|
-
|
|
3841
|
-
}
|
|
3842
|
-
function patch(
|
|
3843
|
-
polyfills(
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
var fs$readFile =
|
|
3848
|
-
|
|
3849
|
-
function readFile(
|
|
3968
|
+
publishQueue(global, fs9[gracefulQueue]);
|
|
3969
|
+
}
|
|
3970
|
+
module.exports = patch(clone(fs9));
|
|
3971
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs9.__patched) {
|
|
3972
|
+
module.exports = patch(fs9);
|
|
3973
|
+
fs9.__patched = true;
|
|
3974
|
+
}
|
|
3975
|
+
function patch(fs10) {
|
|
3976
|
+
polyfills(fs10);
|
|
3977
|
+
fs10.gracefulify = patch;
|
|
3978
|
+
fs10.createReadStream = createReadStream;
|
|
3979
|
+
fs10.createWriteStream = createWriteStream;
|
|
3980
|
+
var fs$readFile = fs10.readFile;
|
|
3981
|
+
fs10.readFile = readFile;
|
|
3982
|
+
function readFile(path9, options, cb) {
|
|
3850
3983
|
if (typeof options === "function")
|
|
3851
3984
|
cb = options, options = null;
|
|
3852
|
-
return go$readFile(
|
|
3853
|
-
function go$readFile(
|
|
3854
|
-
return fs$readFile(
|
|
3985
|
+
return go$readFile(path9, options, cb);
|
|
3986
|
+
function go$readFile(path10, options2, cb2, startTime) {
|
|
3987
|
+
return fs$readFile(path10, options2, function(err) {
|
|
3855
3988
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3856
|
-
enqueue([go$readFile, [
|
|
3989
|
+
enqueue([go$readFile, [path10, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
3857
3990
|
else {
|
|
3858
3991
|
if (typeof cb2 === "function")
|
|
3859
3992
|
cb2.apply(this, arguments);
|
|
@@ -3861,16 +3994,16 @@ var require_graceful_fs = __commonJS({
|
|
|
3861
3994
|
});
|
|
3862
3995
|
}
|
|
3863
3996
|
}
|
|
3864
|
-
var fs$writeFile =
|
|
3865
|
-
|
|
3866
|
-
function writeFile(
|
|
3997
|
+
var fs$writeFile = fs10.writeFile;
|
|
3998
|
+
fs10.writeFile = writeFile;
|
|
3999
|
+
function writeFile(path9, data, options, cb) {
|
|
3867
4000
|
if (typeof options === "function")
|
|
3868
4001
|
cb = options, options = null;
|
|
3869
|
-
return go$writeFile(
|
|
3870
|
-
function go$writeFile(
|
|
3871
|
-
return fs$writeFile(
|
|
4002
|
+
return go$writeFile(path9, data, options, cb);
|
|
4003
|
+
function go$writeFile(path10, data2, options2, cb2, startTime) {
|
|
4004
|
+
return fs$writeFile(path10, data2, options2, function(err) {
|
|
3872
4005
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3873
|
-
enqueue([go$writeFile, [
|
|
4006
|
+
enqueue([go$writeFile, [path10, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
3874
4007
|
else {
|
|
3875
4008
|
if (typeof cb2 === "function")
|
|
3876
4009
|
cb2.apply(this, arguments);
|
|
@@ -3878,17 +4011,17 @@ var require_graceful_fs = __commonJS({
|
|
|
3878
4011
|
});
|
|
3879
4012
|
}
|
|
3880
4013
|
}
|
|
3881
|
-
var fs$appendFile =
|
|
4014
|
+
var fs$appendFile = fs10.appendFile;
|
|
3882
4015
|
if (fs$appendFile)
|
|
3883
|
-
|
|
3884
|
-
function appendFile(
|
|
4016
|
+
fs10.appendFile = appendFile;
|
|
4017
|
+
function appendFile(path9, data, options, cb) {
|
|
3885
4018
|
if (typeof options === "function")
|
|
3886
4019
|
cb = options, options = null;
|
|
3887
|
-
return go$appendFile(
|
|
3888
|
-
function go$appendFile(
|
|
3889
|
-
return fs$appendFile(
|
|
4020
|
+
return go$appendFile(path9, data, options, cb);
|
|
4021
|
+
function go$appendFile(path10, data2, options2, cb2, startTime) {
|
|
4022
|
+
return fs$appendFile(path10, data2, options2, function(err) {
|
|
3890
4023
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3891
|
-
enqueue([go$appendFile, [
|
|
4024
|
+
enqueue([go$appendFile, [path10, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
3892
4025
|
else {
|
|
3893
4026
|
if (typeof cb2 === "function")
|
|
3894
4027
|
cb2.apply(this, arguments);
|
|
@@ -3896,9 +4029,9 @@ var require_graceful_fs = __commonJS({
|
|
|
3896
4029
|
});
|
|
3897
4030
|
}
|
|
3898
4031
|
}
|
|
3899
|
-
var fs$copyFile =
|
|
4032
|
+
var fs$copyFile = fs10.copyFile;
|
|
3900
4033
|
if (fs$copyFile)
|
|
3901
|
-
|
|
4034
|
+
fs10.copyFile = copyFile;
|
|
3902
4035
|
function copyFile(src, dest, flags, cb) {
|
|
3903
4036
|
if (typeof flags === "function") {
|
|
3904
4037
|
cb = flags;
|
|
@@ -3916,34 +4049,34 @@ var require_graceful_fs = __commonJS({
|
|
|
3916
4049
|
});
|
|
3917
4050
|
}
|
|
3918
4051
|
}
|
|
3919
|
-
var fs$readdir =
|
|
3920
|
-
|
|
4052
|
+
var fs$readdir = fs10.readdir;
|
|
4053
|
+
fs10.readdir = readdir;
|
|
3921
4054
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
3922
|
-
function readdir(
|
|
4055
|
+
function readdir(path9, options, cb) {
|
|
3923
4056
|
if (typeof options === "function")
|
|
3924
4057
|
cb = options, options = null;
|
|
3925
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(
|
|
3926
|
-
return fs$readdir(
|
|
3927
|
-
|
|
4058
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path10, options2, cb2, startTime) {
|
|
4059
|
+
return fs$readdir(path10, fs$readdirCallback(
|
|
4060
|
+
path10,
|
|
3928
4061
|
options2,
|
|
3929
4062
|
cb2,
|
|
3930
4063
|
startTime
|
|
3931
4064
|
));
|
|
3932
|
-
} : function go$readdir2(
|
|
3933
|
-
return fs$readdir(
|
|
3934
|
-
|
|
4065
|
+
} : function go$readdir2(path10, options2, cb2, startTime) {
|
|
4066
|
+
return fs$readdir(path10, options2, fs$readdirCallback(
|
|
4067
|
+
path10,
|
|
3935
4068
|
options2,
|
|
3936
4069
|
cb2,
|
|
3937
4070
|
startTime
|
|
3938
4071
|
));
|
|
3939
4072
|
};
|
|
3940
|
-
return go$readdir(
|
|
3941
|
-
function fs$readdirCallback(
|
|
4073
|
+
return go$readdir(path9, options, cb);
|
|
4074
|
+
function fs$readdirCallback(path10, options2, cb2, startTime) {
|
|
3942
4075
|
return function(err, files) {
|
|
3943
4076
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
3944
4077
|
enqueue([
|
|
3945
4078
|
go$readdir,
|
|
3946
|
-
[
|
|
4079
|
+
[path10, options2, cb2],
|
|
3947
4080
|
err,
|
|
3948
4081
|
startTime || Date.now(),
|
|
3949
4082
|
Date.now()
|
|
@@ -3958,21 +4091,21 @@ var require_graceful_fs = __commonJS({
|
|
|
3958
4091
|
}
|
|
3959
4092
|
}
|
|
3960
4093
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
3961
|
-
var legStreams = legacy(
|
|
4094
|
+
var legStreams = legacy(fs10);
|
|
3962
4095
|
ReadStream = legStreams.ReadStream;
|
|
3963
4096
|
WriteStream = legStreams.WriteStream;
|
|
3964
4097
|
}
|
|
3965
|
-
var fs$ReadStream =
|
|
4098
|
+
var fs$ReadStream = fs10.ReadStream;
|
|
3966
4099
|
if (fs$ReadStream) {
|
|
3967
4100
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
3968
4101
|
ReadStream.prototype.open = ReadStream$open;
|
|
3969
4102
|
}
|
|
3970
|
-
var fs$WriteStream =
|
|
4103
|
+
var fs$WriteStream = fs10.WriteStream;
|
|
3971
4104
|
if (fs$WriteStream) {
|
|
3972
4105
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
3973
4106
|
WriteStream.prototype.open = WriteStream$open;
|
|
3974
4107
|
}
|
|
3975
|
-
Object.defineProperty(
|
|
4108
|
+
Object.defineProperty(fs10, "ReadStream", {
|
|
3976
4109
|
get: function() {
|
|
3977
4110
|
return ReadStream;
|
|
3978
4111
|
},
|
|
@@ -3982,7 +4115,7 @@ var require_graceful_fs = __commonJS({
|
|
|
3982
4115
|
enumerable: true,
|
|
3983
4116
|
configurable: true
|
|
3984
4117
|
});
|
|
3985
|
-
Object.defineProperty(
|
|
4118
|
+
Object.defineProperty(fs10, "WriteStream", {
|
|
3986
4119
|
get: function() {
|
|
3987
4120
|
return WriteStream;
|
|
3988
4121
|
},
|
|
@@ -3993,7 +4126,7 @@ var require_graceful_fs = __commonJS({
|
|
|
3993
4126
|
configurable: true
|
|
3994
4127
|
});
|
|
3995
4128
|
var FileReadStream = ReadStream;
|
|
3996
|
-
Object.defineProperty(
|
|
4129
|
+
Object.defineProperty(fs10, "FileReadStream", {
|
|
3997
4130
|
get: function() {
|
|
3998
4131
|
return FileReadStream;
|
|
3999
4132
|
},
|
|
@@ -4004,7 +4137,7 @@ var require_graceful_fs = __commonJS({
|
|
|
4004
4137
|
configurable: true
|
|
4005
4138
|
});
|
|
4006
4139
|
var FileWriteStream = WriteStream;
|
|
4007
|
-
Object.defineProperty(
|
|
4140
|
+
Object.defineProperty(fs10, "FileWriteStream", {
|
|
4008
4141
|
get: function() {
|
|
4009
4142
|
return FileWriteStream;
|
|
4010
4143
|
},
|
|
@@ -4014,7 +4147,7 @@ var require_graceful_fs = __commonJS({
|
|
|
4014
4147
|
enumerable: true,
|
|
4015
4148
|
configurable: true
|
|
4016
4149
|
});
|
|
4017
|
-
function ReadStream(
|
|
4150
|
+
function ReadStream(path9, options) {
|
|
4018
4151
|
if (this instanceof ReadStream)
|
|
4019
4152
|
return fs$ReadStream.apply(this, arguments), this;
|
|
4020
4153
|
else
|
|
@@ -4034,7 +4167,7 @@ var require_graceful_fs = __commonJS({
|
|
|
4034
4167
|
}
|
|
4035
4168
|
});
|
|
4036
4169
|
}
|
|
4037
|
-
function WriteStream(
|
|
4170
|
+
function WriteStream(path9, options) {
|
|
4038
4171
|
if (this instanceof WriteStream)
|
|
4039
4172
|
return fs$WriteStream.apply(this, arguments), this;
|
|
4040
4173
|
else
|
|
@@ -4052,22 +4185,22 @@ var require_graceful_fs = __commonJS({
|
|
|
4052
4185
|
}
|
|
4053
4186
|
});
|
|
4054
4187
|
}
|
|
4055
|
-
function createReadStream(
|
|
4056
|
-
return new
|
|
4188
|
+
function createReadStream(path9, options) {
|
|
4189
|
+
return new fs10.ReadStream(path9, options);
|
|
4057
4190
|
}
|
|
4058
|
-
function createWriteStream(
|
|
4059
|
-
return new
|
|
4191
|
+
function createWriteStream(path9, options) {
|
|
4192
|
+
return new fs10.WriteStream(path9, options);
|
|
4060
4193
|
}
|
|
4061
|
-
var fs$open =
|
|
4062
|
-
|
|
4063
|
-
function open(
|
|
4194
|
+
var fs$open = fs10.open;
|
|
4195
|
+
fs10.open = open;
|
|
4196
|
+
function open(path9, flags, mode, cb) {
|
|
4064
4197
|
if (typeof mode === "function")
|
|
4065
4198
|
cb = mode, mode = null;
|
|
4066
|
-
return go$open(
|
|
4067
|
-
function go$open(
|
|
4068
|
-
return fs$open(
|
|
4199
|
+
return go$open(path9, flags, mode, cb);
|
|
4200
|
+
function go$open(path10, flags2, mode2, cb2, startTime) {
|
|
4201
|
+
return fs$open(path10, flags2, mode2, function(err, fd) {
|
|
4069
4202
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
4070
|
-
enqueue([go$open, [
|
|
4203
|
+
enqueue([go$open, [path10, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
4071
4204
|
else {
|
|
4072
4205
|
if (typeof cb2 === "function")
|
|
4073
4206
|
cb2.apply(this, arguments);
|
|
@@ -4075,20 +4208,20 @@ var require_graceful_fs = __commonJS({
|
|
|
4075
4208
|
});
|
|
4076
4209
|
}
|
|
4077
4210
|
}
|
|
4078
|
-
return
|
|
4211
|
+
return fs10;
|
|
4079
4212
|
}
|
|
4080
4213
|
function enqueue(elem) {
|
|
4081
4214
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
4082
|
-
|
|
4215
|
+
fs9[gracefulQueue].push(elem);
|
|
4083
4216
|
retry();
|
|
4084
4217
|
}
|
|
4085
4218
|
var retryTimer;
|
|
4086
4219
|
function resetQueue() {
|
|
4087
4220
|
var now = Date.now();
|
|
4088
|
-
for (var i = 0; i <
|
|
4089
|
-
if (
|
|
4090
|
-
|
|
4091
|
-
|
|
4221
|
+
for (var i = 0; i < fs9[gracefulQueue].length; ++i) {
|
|
4222
|
+
if (fs9[gracefulQueue][i].length > 2) {
|
|
4223
|
+
fs9[gracefulQueue][i][3] = now;
|
|
4224
|
+
fs9[gracefulQueue][i][4] = now;
|
|
4092
4225
|
}
|
|
4093
4226
|
}
|
|
4094
4227
|
retry();
|
|
@@ -4096,9 +4229,9 @@ var require_graceful_fs = __commonJS({
|
|
|
4096
4229
|
function retry() {
|
|
4097
4230
|
clearTimeout(retryTimer);
|
|
4098
4231
|
retryTimer = void 0;
|
|
4099
|
-
if (
|
|
4232
|
+
if (fs9[gracefulQueue].length === 0)
|
|
4100
4233
|
return;
|
|
4101
|
-
var elem =
|
|
4234
|
+
var elem = fs9[gracefulQueue].shift();
|
|
4102
4235
|
var fn = elem[0];
|
|
4103
4236
|
var args = elem[1];
|
|
4104
4237
|
var err = elem[2];
|
|
@@ -4120,7 +4253,7 @@ var require_graceful_fs = __commonJS({
|
|
|
4120
4253
|
debug("RETRY", fn.name, args);
|
|
4121
4254
|
fn.apply(null, args.concat([startTime]));
|
|
4122
4255
|
} else {
|
|
4123
|
-
|
|
4256
|
+
fs9[gracefulQueue].push(elem);
|
|
4124
4257
|
}
|
|
4125
4258
|
}
|
|
4126
4259
|
if (retryTimer === void 0) {
|
|
@@ -4130,12 +4263,12 @@ var require_graceful_fs = __commonJS({
|
|
|
4130
4263
|
}
|
|
4131
4264
|
});
|
|
4132
4265
|
|
|
4133
|
-
// node_modules/fs-extra/lib/fs/index.js
|
|
4266
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/fs/index.js
|
|
4134
4267
|
var require_fs = __commonJS({
|
|
4135
|
-
"node_modules/fs-extra/lib/fs/index.js"(exports) {
|
|
4268
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/fs/index.js"(exports) {
|
|
4136
4269
|
"use strict";
|
|
4137
4270
|
var u = require_universalify().fromCallback;
|
|
4138
|
-
var
|
|
4271
|
+
var fs9 = require_graceful_fs();
|
|
4139
4272
|
var api = [
|
|
4140
4273
|
"access",
|
|
4141
4274
|
"appendFile",
|
|
@@ -4176,26 +4309,26 @@ var require_fs = __commonJS({
|
|
|
4176
4309
|
"utimes",
|
|
4177
4310
|
"writeFile"
|
|
4178
4311
|
].filter((key) => {
|
|
4179
|
-
return typeof
|
|
4312
|
+
return typeof fs9[key] === "function";
|
|
4180
4313
|
});
|
|
4181
|
-
Object.assign(exports,
|
|
4314
|
+
Object.assign(exports, fs9);
|
|
4182
4315
|
api.forEach((method) => {
|
|
4183
|
-
exports[method] = u(
|
|
4316
|
+
exports[method] = u(fs9[method]);
|
|
4184
4317
|
});
|
|
4185
4318
|
exports.exists = function(filename, callback) {
|
|
4186
4319
|
if (typeof callback === "function") {
|
|
4187
|
-
return
|
|
4320
|
+
return fs9.exists(filename, callback);
|
|
4188
4321
|
}
|
|
4189
4322
|
return new Promise((resolve) => {
|
|
4190
|
-
return
|
|
4323
|
+
return fs9.exists(filename, resolve);
|
|
4191
4324
|
});
|
|
4192
4325
|
};
|
|
4193
4326
|
exports.read = function(fd, buffer, offset, length, position, callback) {
|
|
4194
4327
|
if (typeof callback === "function") {
|
|
4195
|
-
return
|
|
4328
|
+
return fs9.read(fd, buffer, offset, length, position, callback);
|
|
4196
4329
|
}
|
|
4197
4330
|
return new Promise((resolve, reject) => {
|
|
4198
|
-
|
|
4331
|
+
fs9.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
4199
4332
|
if (err) return reject(err);
|
|
4200
4333
|
resolve({ bytesRead, buffer: buffer2 });
|
|
4201
4334
|
});
|
|
@@ -4203,10 +4336,10 @@ var require_fs = __commonJS({
|
|
|
4203
4336
|
};
|
|
4204
4337
|
exports.write = function(fd, buffer, ...args) {
|
|
4205
4338
|
if (typeof args[args.length - 1] === "function") {
|
|
4206
|
-
return
|
|
4339
|
+
return fs9.write(fd, buffer, ...args);
|
|
4207
4340
|
}
|
|
4208
4341
|
return new Promise((resolve, reject) => {
|
|
4209
|
-
|
|
4342
|
+
fs9.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
4210
4343
|
if (err) return reject(err);
|
|
4211
4344
|
resolve({ bytesWritten, buffer: buffer2 });
|
|
4212
4345
|
});
|
|
@@ -4214,10 +4347,10 @@ var require_fs = __commonJS({
|
|
|
4214
4347
|
};
|
|
4215
4348
|
exports.readv = function(fd, buffers, ...args) {
|
|
4216
4349
|
if (typeof args[args.length - 1] === "function") {
|
|
4217
|
-
return
|
|
4350
|
+
return fs9.readv(fd, buffers, ...args);
|
|
4218
4351
|
}
|
|
4219
4352
|
return new Promise((resolve, reject) => {
|
|
4220
|
-
|
|
4353
|
+
fs9.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
|
|
4221
4354
|
if (err) return reject(err);
|
|
4222
4355
|
resolve({ bytesRead, buffers: buffers2 });
|
|
4223
4356
|
});
|
|
@@ -4225,17 +4358,17 @@ var require_fs = __commonJS({
|
|
|
4225
4358
|
};
|
|
4226
4359
|
exports.writev = function(fd, buffers, ...args) {
|
|
4227
4360
|
if (typeof args[args.length - 1] === "function") {
|
|
4228
|
-
return
|
|
4361
|
+
return fs9.writev(fd, buffers, ...args);
|
|
4229
4362
|
}
|
|
4230
4363
|
return new Promise((resolve, reject) => {
|
|
4231
|
-
|
|
4364
|
+
fs9.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
4232
4365
|
if (err) return reject(err);
|
|
4233
4366
|
resolve({ bytesWritten, buffers: buffers2 });
|
|
4234
4367
|
});
|
|
4235
4368
|
});
|
|
4236
4369
|
};
|
|
4237
|
-
if (typeof
|
|
4238
|
-
exports.realpath.native = u(
|
|
4370
|
+
if (typeof fs9.realpath.native === "function") {
|
|
4371
|
+
exports.realpath.native = u(fs9.realpath.native);
|
|
4239
4372
|
} else {
|
|
4240
4373
|
process.emitWarning(
|
|
4241
4374
|
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
@@ -4246,14 +4379,14 @@ var require_fs = __commonJS({
|
|
|
4246
4379
|
}
|
|
4247
4380
|
});
|
|
4248
4381
|
|
|
4249
|
-
// node_modules/fs-extra/lib/mkdirs/utils.js
|
|
4382
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/mkdirs/utils.js
|
|
4250
4383
|
var require_utils = __commonJS({
|
|
4251
|
-
"node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
|
|
4384
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
|
|
4252
4385
|
"use strict";
|
|
4253
|
-
var
|
|
4386
|
+
var path9 = __require("path");
|
|
4254
4387
|
module.exports.checkPath = function checkPath(pth) {
|
|
4255
4388
|
if (process.platform === "win32") {
|
|
4256
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(
|
|
4389
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path9.parse(pth).root, ""));
|
|
4257
4390
|
if (pathHasInvalidWinCharacters) {
|
|
4258
4391
|
const error = new Error(`Path contains invalid characters: ${pth}`);
|
|
4259
4392
|
error.code = "EINVAL";
|
|
@@ -4264,11 +4397,11 @@ var require_utils = __commonJS({
|
|
|
4264
4397
|
}
|
|
4265
4398
|
});
|
|
4266
4399
|
|
|
4267
|
-
// node_modules/fs-extra/lib/mkdirs/make-dir.js
|
|
4400
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/mkdirs/make-dir.js
|
|
4268
4401
|
var require_make_dir = __commonJS({
|
|
4269
|
-
"node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module) {
|
|
4402
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module) {
|
|
4270
4403
|
"use strict";
|
|
4271
|
-
var
|
|
4404
|
+
var fs9 = require_fs();
|
|
4272
4405
|
var { checkPath } = require_utils();
|
|
4273
4406
|
var getMode = (options) => {
|
|
4274
4407
|
const defaults = { mode: 511 };
|
|
@@ -4277,14 +4410,14 @@ var require_make_dir = __commonJS({
|
|
|
4277
4410
|
};
|
|
4278
4411
|
module.exports.makeDir = async (dir, options) => {
|
|
4279
4412
|
checkPath(dir);
|
|
4280
|
-
return
|
|
4413
|
+
return fs9.mkdir(dir, {
|
|
4281
4414
|
mode: getMode(options),
|
|
4282
4415
|
recursive: true
|
|
4283
4416
|
});
|
|
4284
4417
|
};
|
|
4285
4418
|
module.exports.makeDirSync = (dir, options) => {
|
|
4286
4419
|
checkPath(dir);
|
|
4287
|
-
return
|
|
4420
|
+
return fs9.mkdirSync(dir, {
|
|
4288
4421
|
mode: getMode(options),
|
|
4289
4422
|
recursive: true
|
|
4290
4423
|
});
|
|
@@ -4292,9 +4425,9 @@ var require_make_dir = __commonJS({
|
|
|
4292
4425
|
}
|
|
4293
4426
|
});
|
|
4294
4427
|
|
|
4295
|
-
// node_modules/fs-extra/lib/mkdirs/index.js
|
|
4428
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/mkdirs/index.js
|
|
4296
4429
|
var require_mkdirs = __commonJS({
|
|
4297
|
-
"node_modules/fs-extra/lib/mkdirs/index.js"(exports, module) {
|
|
4430
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module) {
|
|
4298
4431
|
"use strict";
|
|
4299
4432
|
var u = require_universalify().fromPromise;
|
|
4300
4433
|
var { makeDir: _makeDir, makeDirSync } = require_make_dir();
|
|
@@ -4311,36 +4444,36 @@ var require_mkdirs = __commonJS({
|
|
|
4311
4444
|
}
|
|
4312
4445
|
});
|
|
4313
4446
|
|
|
4314
|
-
// node_modules/fs-extra/lib/path-exists/index.js
|
|
4447
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/path-exists/index.js
|
|
4315
4448
|
var require_path_exists = __commonJS({
|
|
4316
|
-
"node_modules/fs-extra/lib/path-exists/index.js"(exports, module) {
|
|
4449
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/path-exists/index.js"(exports, module) {
|
|
4317
4450
|
"use strict";
|
|
4318
4451
|
var u = require_universalify().fromPromise;
|
|
4319
|
-
var
|
|
4320
|
-
function pathExists(
|
|
4321
|
-
return
|
|
4452
|
+
var fs9 = require_fs();
|
|
4453
|
+
function pathExists(path9) {
|
|
4454
|
+
return fs9.access(path9).then(() => true).catch(() => false);
|
|
4322
4455
|
}
|
|
4323
4456
|
module.exports = {
|
|
4324
4457
|
pathExists: u(pathExists),
|
|
4325
|
-
pathExistsSync:
|
|
4458
|
+
pathExistsSync: fs9.existsSync
|
|
4326
4459
|
};
|
|
4327
4460
|
}
|
|
4328
4461
|
});
|
|
4329
4462
|
|
|
4330
|
-
// node_modules/fs-extra/lib/util/utimes.js
|
|
4463
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/util/utimes.js
|
|
4331
4464
|
var require_utimes = __commonJS({
|
|
4332
|
-
"node_modules/fs-extra/lib/util/utimes.js"(exports, module) {
|
|
4465
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/util/utimes.js"(exports, module) {
|
|
4333
4466
|
"use strict";
|
|
4334
|
-
var
|
|
4467
|
+
var fs9 = require_fs();
|
|
4335
4468
|
var u = require_universalify().fromPromise;
|
|
4336
|
-
async function utimesMillis(
|
|
4337
|
-
const fd = await
|
|
4469
|
+
async function utimesMillis(path9, atime, mtime) {
|
|
4470
|
+
const fd = await fs9.open(path9, "r+");
|
|
4338
4471
|
let closeErr = null;
|
|
4339
4472
|
try {
|
|
4340
|
-
await
|
|
4473
|
+
await fs9.futimes(fd, atime, mtime);
|
|
4341
4474
|
} finally {
|
|
4342
4475
|
try {
|
|
4343
|
-
await
|
|
4476
|
+
await fs9.close(fd);
|
|
4344
4477
|
} catch (e) {
|
|
4345
4478
|
closeErr = e;
|
|
4346
4479
|
}
|
|
@@ -4349,10 +4482,10 @@ var require_utimes = __commonJS({
|
|
|
4349
4482
|
throw closeErr;
|
|
4350
4483
|
}
|
|
4351
4484
|
}
|
|
4352
|
-
function utimesMillisSync(
|
|
4353
|
-
const fd =
|
|
4354
|
-
|
|
4355
|
-
return
|
|
4485
|
+
function utimesMillisSync(path9, atime, mtime) {
|
|
4486
|
+
const fd = fs9.openSync(path9, "r+");
|
|
4487
|
+
fs9.futimesSync(fd, atime, mtime);
|
|
4488
|
+
return fs9.closeSync(fd);
|
|
4356
4489
|
}
|
|
4357
4490
|
module.exports = {
|
|
4358
4491
|
utimesMillis: u(utimesMillis),
|
|
@@ -4361,15 +4494,15 @@ var require_utimes = __commonJS({
|
|
|
4361
4494
|
}
|
|
4362
4495
|
});
|
|
4363
4496
|
|
|
4364
|
-
// node_modules/fs-extra/lib/util/stat.js
|
|
4497
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/util/stat.js
|
|
4365
4498
|
var require_stat = __commonJS({
|
|
4366
|
-
"node_modules/fs-extra/lib/util/stat.js"(exports, module) {
|
|
4499
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/util/stat.js"(exports, module) {
|
|
4367
4500
|
"use strict";
|
|
4368
|
-
var
|
|
4369
|
-
var
|
|
4501
|
+
var fs9 = require_fs();
|
|
4502
|
+
var path9 = __require("path");
|
|
4370
4503
|
var u = require_universalify().fromPromise;
|
|
4371
4504
|
function getStats(src, dest, opts) {
|
|
4372
|
-
const statFunc = opts.dereference ? (file) =>
|
|
4505
|
+
const statFunc = opts.dereference ? (file) => fs9.stat(file, { bigint: true }) : (file) => fs9.lstat(file, { bigint: true });
|
|
4373
4506
|
return Promise.all([
|
|
4374
4507
|
statFunc(src),
|
|
4375
4508
|
statFunc(dest).catch((err) => {
|
|
@@ -4380,7 +4513,7 @@ var require_stat = __commonJS({
|
|
|
4380
4513
|
}
|
|
4381
4514
|
function getStatsSync(src, dest, opts) {
|
|
4382
4515
|
let destStat;
|
|
4383
|
-
const statFunc = opts.dereference ? (file) =>
|
|
4516
|
+
const statFunc = opts.dereference ? (file) => fs9.statSync(file, { bigint: true }) : (file) => fs9.lstatSync(file, { bigint: true });
|
|
4384
4517
|
const srcStat = statFunc(src);
|
|
4385
4518
|
try {
|
|
4386
4519
|
destStat = statFunc(dest);
|
|
@@ -4394,8 +4527,8 @@ var require_stat = __commonJS({
|
|
|
4394
4527
|
const { srcStat, destStat } = await getStats(src, dest, opts);
|
|
4395
4528
|
if (destStat) {
|
|
4396
4529
|
if (areIdentical(srcStat, destStat)) {
|
|
4397
|
-
const srcBaseName =
|
|
4398
|
-
const destBaseName =
|
|
4530
|
+
const srcBaseName = path9.basename(src);
|
|
4531
|
+
const destBaseName = path9.basename(dest);
|
|
4399
4532
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
4400
4533
|
return { srcStat, destStat, isChangingCase: true };
|
|
4401
4534
|
}
|
|
@@ -4417,8 +4550,8 @@ var require_stat = __commonJS({
|
|
|
4417
4550
|
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
4418
4551
|
if (destStat) {
|
|
4419
4552
|
if (areIdentical(srcStat, destStat)) {
|
|
4420
|
-
const srcBaseName =
|
|
4421
|
-
const destBaseName =
|
|
4553
|
+
const srcBaseName = path9.basename(src);
|
|
4554
|
+
const destBaseName = path9.basename(dest);
|
|
4422
4555
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
4423
4556
|
return { srcStat, destStat, isChangingCase: true };
|
|
4424
4557
|
}
|
|
@@ -4437,12 +4570,12 @@ var require_stat = __commonJS({
|
|
|
4437
4570
|
return { srcStat, destStat };
|
|
4438
4571
|
}
|
|
4439
4572
|
async function checkParentPaths(src, srcStat, dest, funcName) {
|
|
4440
|
-
const srcParent =
|
|
4441
|
-
const destParent =
|
|
4442
|
-
if (destParent === srcParent || destParent ===
|
|
4573
|
+
const srcParent = path9.resolve(path9.dirname(src));
|
|
4574
|
+
const destParent = path9.resolve(path9.dirname(dest));
|
|
4575
|
+
if (destParent === srcParent || destParent === path9.parse(destParent).root) return;
|
|
4443
4576
|
let destStat;
|
|
4444
4577
|
try {
|
|
4445
|
-
destStat = await
|
|
4578
|
+
destStat = await fs9.stat(destParent, { bigint: true });
|
|
4446
4579
|
} catch (err) {
|
|
4447
4580
|
if (err.code === "ENOENT") return;
|
|
4448
4581
|
throw err;
|
|
@@ -4453,12 +4586,12 @@ var require_stat = __commonJS({
|
|
|
4453
4586
|
return checkParentPaths(src, srcStat, destParent, funcName);
|
|
4454
4587
|
}
|
|
4455
4588
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
4456
|
-
const srcParent =
|
|
4457
|
-
const destParent =
|
|
4458
|
-
if (destParent === srcParent || destParent ===
|
|
4589
|
+
const srcParent = path9.resolve(path9.dirname(src));
|
|
4590
|
+
const destParent = path9.resolve(path9.dirname(dest));
|
|
4591
|
+
if (destParent === srcParent || destParent === path9.parse(destParent).root) return;
|
|
4459
4592
|
let destStat;
|
|
4460
4593
|
try {
|
|
4461
|
-
destStat =
|
|
4594
|
+
destStat = fs9.statSync(destParent, { bigint: true });
|
|
4462
4595
|
} catch (err) {
|
|
4463
4596
|
if (err.code === "ENOENT") return;
|
|
4464
4597
|
throw err;
|
|
@@ -4472,8 +4605,8 @@ var require_stat = __commonJS({
|
|
|
4472
4605
|
return destStat.ino !== void 0 && destStat.dev !== void 0 && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
4473
4606
|
}
|
|
4474
4607
|
function isSrcSubdir(src, dest) {
|
|
4475
|
-
const srcArr =
|
|
4476
|
-
const destArr =
|
|
4608
|
+
const srcArr = path9.resolve(src).split(path9.sep).filter((i) => i);
|
|
4609
|
+
const destArr = path9.resolve(dest).split(path9.sep).filter((i) => i);
|
|
4477
4610
|
return srcArr.every((cur, i) => destArr[i] === cur);
|
|
4478
4611
|
}
|
|
4479
4612
|
function errMsg(src, dest, funcName) {
|
|
@@ -4493,9 +4626,9 @@ var require_stat = __commonJS({
|
|
|
4493
4626
|
}
|
|
4494
4627
|
});
|
|
4495
4628
|
|
|
4496
|
-
// node_modules/fs-extra/lib/util/async.js
|
|
4629
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/util/async.js
|
|
4497
4630
|
var require_async = __commonJS({
|
|
4498
|
-
"node_modules/fs-extra/lib/util/async.js"(exports, module) {
|
|
4631
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/util/async.js"(exports, module) {
|
|
4499
4632
|
"use strict";
|
|
4500
4633
|
async function asyncIteratorConcurrentProcess(iterator, fn) {
|
|
4501
4634
|
const promises = [];
|
|
@@ -4521,12 +4654,12 @@ var require_async = __commonJS({
|
|
|
4521
4654
|
}
|
|
4522
4655
|
});
|
|
4523
4656
|
|
|
4524
|
-
// node_modules/fs-extra/lib/copy/copy.js
|
|
4657
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/copy/copy.js
|
|
4525
4658
|
var require_copy = __commonJS({
|
|
4526
|
-
"node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
|
|
4659
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
|
|
4527
4660
|
"use strict";
|
|
4528
|
-
var
|
|
4529
|
-
var
|
|
4661
|
+
var fs9 = require_fs();
|
|
4662
|
+
var path9 = __require("path");
|
|
4530
4663
|
var { mkdirs } = require_mkdirs();
|
|
4531
4664
|
var { pathExists } = require_path_exists();
|
|
4532
4665
|
var { utimesMillis } = require_utimes();
|
|
@@ -4549,7 +4682,7 @@ var require_copy = __commonJS({
|
|
|
4549
4682
|
await stat.checkParentPaths(src, srcStat, dest, "copy");
|
|
4550
4683
|
const include = await runFilter(src, dest, opts);
|
|
4551
4684
|
if (!include) return;
|
|
4552
|
-
const destParent =
|
|
4685
|
+
const destParent = path9.dirname(dest);
|
|
4553
4686
|
const dirExists = await pathExists(destParent);
|
|
4554
4687
|
if (!dirExists) {
|
|
4555
4688
|
await mkdirs(destParent);
|
|
@@ -4561,7 +4694,7 @@ var require_copy = __commonJS({
|
|
|
4561
4694
|
return opts.filter(src, dest);
|
|
4562
4695
|
}
|
|
4563
4696
|
async function getStatsAndPerformCopy(destStat, src, dest, opts) {
|
|
4564
|
-
const statFn = opts.dereference ?
|
|
4697
|
+
const statFn = opts.dereference ? fs9.stat : fs9.lstat;
|
|
4565
4698
|
const srcStat = await statFn(src);
|
|
4566
4699
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
4567
4700
|
if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
@@ -4573,7 +4706,7 @@ var require_copy = __commonJS({
|
|
|
4573
4706
|
async function onFile(srcStat, destStat, src, dest, opts) {
|
|
4574
4707
|
if (!destStat) return copyFile(srcStat, src, dest, opts);
|
|
4575
4708
|
if (opts.overwrite) {
|
|
4576
|
-
await
|
|
4709
|
+
await fs9.unlink(dest);
|
|
4577
4710
|
return copyFile(srcStat, src, dest, opts);
|
|
4578
4711
|
}
|
|
4579
4712
|
if (opts.errorOnExist) {
|
|
@@ -4581,29 +4714,29 @@ var require_copy = __commonJS({
|
|
|
4581
4714
|
}
|
|
4582
4715
|
}
|
|
4583
4716
|
async function copyFile(srcStat, src, dest, opts) {
|
|
4584
|
-
await
|
|
4717
|
+
await fs9.copyFile(src, dest);
|
|
4585
4718
|
if (opts.preserveTimestamps) {
|
|
4586
4719
|
if (fileIsNotWritable(srcStat.mode)) {
|
|
4587
4720
|
await makeFileWritable(dest, srcStat.mode);
|
|
4588
4721
|
}
|
|
4589
|
-
const updatedSrcStat = await
|
|
4722
|
+
const updatedSrcStat = await fs9.stat(src);
|
|
4590
4723
|
await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
4591
4724
|
}
|
|
4592
|
-
return
|
|
4725
|
+
return fs9.chmod(dest, srcStat.mode);
|
|
4593
4726
|
}
|
|
4594
4727
|
function fileIsNotWritable(srcMode) {
|
|
4595
4728
|
return (srcMode & 128) === 0;
|
|
4596
4729
|
}
|
|
4597
4730
|
function makeFileWritable(dest, srcMode) {
|
|
4598
|
-
return
|
|
4731
|
+
return fs9.chmod(dest, srcMode | 128);
|
|
4599
4732
|
}
|
|
4600
4733
|
async function onDir(srcStat, destStat, src, dest, opts) {
|
|
4601
4734
|
if (!destStat) {
|
|
4602
|
-
await
|
|
4735
|
+
await fs9.mkdir(dest);
|
|
4603
4736
|
}
|
|
4604
|
-
await asyncIteratorConcurrentProcess(await
|
|
4605
|
-
const srcItem =
|
|
4606
|
-
const destItem =
|
|
4737
|
+
await asyncIteratorConcurrentProcess(await fs9.opendir(src), async (item) => {
|
|
4738
|
+
const srcItem = path9.join(src, item.name);
|
|
4739
|
+
const destItem = path9.join(dest, item.name);
|
|
4607
4740
|
const include = await runFilter(srcItem, destItem, opts);
|
|
4608
4741
|
if (include) {
|
|
4609
4742
|
const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
|
|
@@ -4611,26 +4744,26 @@ var require_copy = __commonJS({
|
|
|
4611
4744
|
}
|
|
4612
4745
|
});
|
|
4613
4746
|
if (!destStat) {
|
|
4614
|
-
await
|
|
4747
|
+
await fs9.chmod(dest, srcStat.mode);
|
|
4615
4748
|
}
|
|
4616
4749
|
}
|
|
4617
4750
|
async function onLink(destStat, src, dest, opts) {
|
|
4618
|
-
let resolvedSrc = await
|
|
4751
|
+
let resolvedSrc = await fs9.readlink(src);
|
|
4619
4752
|
if (opts.dereference) {
|
|
4620
|
-
resolvedSrc =
|
|
4753
|
+
resolvedSrc = path9.resolve(process.cwd(), resolvedSrc);
|
|
4621
4754
|
}
|
|
4622
4755
|
if (!destStat) {
|
|
4623
|
-
return
|
|
4756
|
+
return fs9.symlink(resolvedSrc, dest);
|
|
4624
4757
|
}
|
|
4625
4758
|
let resolvedDest = null;
|
|
4626
4759
|
try {
|
|
4627
|
-
resolvedDest = await
|
|
4760
|
+
resolvedDest = await fs9.readlink(dest);
|
|
4628
4761
|
} catch (e) {
|
|
4629
|
-
if (e.code === "EINVAL" || e.code === "UNKNOWN") return
|
|
4762
|
+
if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs9.symlink(resolvedSrc, dest);
|
|
4630
4763
|
throw e;
|
|
4631
4764
|
}
|
|
4632
4765
|
if (opts.dereference) {
|
|
4633
|
-
resolvedDest =
|
|
4766
|
+
resolvedDest = path9.resolve(process.cwd(), resolvedDest);
|
|
4634
4767
|
}
|
|
4635
4768
|
if (resolvedSrc !== resolvedDest) {
|
|
4636
4769
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
@@ -4640,19 +4773,19 @@ var require_copy = __commonJS({
|
|
|
4640
4773
|
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
4641
4774
|
}
|
|
4642
4775
|
}
|
|
4643
|
-
await
|
|
4644
|
-
return
|
|
4776
|
+
await fs9.unlink(dest);
|
|
4777
|
+
return fs9.symlink(resolvedSrc, dest);
|
|
4645
4778
|
}
|
|
4646
4779
|
module.exports = copy;
|
|
4647
4780
|
}
|
|
4648
4781
|
});
|
|
4649
4782
|
|
|
4650
|
-
// node_modules/fs-extra/lib/copy/copy-sync.js
|
|
4783
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/copy/copy-sync.js
|
|
4651
4784
|
var require_copy_sync = __commonJS({
|
|
4652
|
-
"node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
|
|
4785
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
|
|
4653
4786
|
"use strict";
|
|
4654
|
-
var
|
|
4655
|
-
var
|
|
4787
|
+
var fs9 = require_graceful_fs();
|
|
4788
|
+
var path9 = __require("path");
|
|
4656
4789
|
var mkdirsSync = require_mkdirs().mkdirsSync;
|
|
4657
4790
|
var utimesMillisSync = require_utimes().utimesMillisSync;
|
|
4658
4791
|
var stat = require_stat();
|
|
@@ -4673,12 +4806,12 @@ var require_copy_sync = __commonJS({
|
|
|
4673
4806
|
const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
4674
4807
|
stat.checkParentPathsSync(src, srcStat, dest, "copy");
|
|
4675
4808
|
if (opts.filter && !opts.filter(src, dest)) return;
|
|
4676
|
-
const destParent =
|
|
4677
|
-
if (!
|
|
4809
|
+
const destParent = path9.dirname(dest);
|
|
4810
|
+
if (!fs9.existsSync(destParent)) mkdirsSync(destParent);
|
|
4678
4811
|
return getStats(destStat, src, dest, opts);
|
|
4679
4812
|
}
|
|
4680
4813
|
function getStats(destStat, src, dest, opts) {
|
|
4681
|
-
const statSync = opts.dereference ?
|
|
4814
|
+
const statSync = opts.dereference ? fs9.statSync : fs9.lstatSync;
|
|
4682
4815
|
const srcStat = statSync(src);
|
|
4683
4816
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
4684
4817
|
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
@@ -4693,14 +4826,14 @@ var require_copy_sync = __commonJS({
|
|
|
4693
4826
|
}
|
|
4694
4827
|
function mayCopyFile(srcStat, src, dest, opts) {
|
|
4695
4828
|
if (opts.overwrite) {
|
|
4696
|
-
|
|
4829
|
+
fs9.unlinkSync(dest);
|
|
4697
4830
|
return copyFile(srcStat, src, dest, opts);
|
|
4698
4831
|
} else if (opts.errorOnExist) {
|
|
4699
4832
|
throw new Error(`'${dest}' already exists`);
|
|
4700
4833
|
}
|
|
4701
4834
|
}
|
|
4702
4835
|
function copyFile(srcStat, src, dest, opts) {
|
|
4703
|
-
|
|
4836
|
+
fs9.copyFileSync(src, dest);
|
|
4704
4837
|
if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
|
|
4705
4838
|
return setDestMode(dest, srcStat.mode);
|
|
4706
4839
|
}
|
|
@@ -4715,10 +4848,10 @@ var require_copy_sync = __commonJS({
|
|
|
4715
4848
|
return setDestMode(dest, srcMode | 128);
|
|
4716
4849
|
}
|
|
4717
4850
|
function setDestMode(dest, srcMode) {
|
|
4718
|
-
return
|
|
4851
|
+
return fs9.chmodSync(dest, srcMode);
|
|
4719
4852
|
}
|
|
4720
4853
|
function setDestTimestamps(src, dest) {
|
|
4721
|
-
const updatedSrcStat =
|
|
4854
|
+
const updatedSrcStat = fs9.statSync(src);
|
|
4722
4855
|
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
4723
4856
|
}
|
|
4724
4857
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
@@ -4726,12 +4859,12 @@ var require_copy_sync = __commonJS({
|
|
|
4726
4859
|
return copyDir(src, dest, opts);
|
|
4727
4860
|
}
|
|
4728
4861
|
function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
4729
|
-
|
|
4862
|
+
fs9.mkdirSync(dest);
|
|
4730
4863
|
copyDir(src, dest, opts);
|
|
4731
4864
|
return setDestMode(dest, srcMode);
|
|
4732
4865
|
}
|
|
4733
4866
|
function copyDir(src, dest, opts) {
|
|
4734
|
-
const dir =
|
|
4867
|
+
const dir = fs9.opendirSync(src);
|
|
4735
4868
|
try {
|
|
4736
4869
|
let dirent;
|
|
4737
4870
|
while ((dirent = dir.readSync()) !== null) {
|
|
@@ -4742,29 +4875,29 @@ var require_copy_sync = __commonJS({
|
|
|
4742
4875
|
}
|
|
4743
4876
|
}
|
|
4744
4877
|
function copyDirItem(item, src, dest, opts) {
|
|
4745
|
-
const srcItem =
|
|
4746
|
-
const destItem =
|
|
4878
|
+
const srcItem = path9.join(src, item);
|
|
4879
|
+
const destItem = path9.join(dest, item);
|
|
4747
4880
|
if (opts.filter && !opts.filter(srcItem, destItem)) return;
|
|
4748
4881
|
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
|
|
4749
4882
|
return getStats(destStat, srcItem, destItem, opts);
|
|
4750
4883
|
}
|
|
4751
4884
|
function onLink(destStat, src, dest, opts) {
|
|
4752
|
-
let resolvedSrc =
|
|
4885
|
+
let resolvedSrc = fs9.readlinkSync(src);
|
|
4753
4886
|
if (opts.dereference) {
|
|
4754
|
-
resolvedSrc =
|
|
4887
|
+
resolvedSrc = path9.resolve(process.cwd(), resolvedSrc);
|
|
4755
4888
|
}
|
|
4756
4889
|
if (!destStat) {
|
|
4757
|
-
return
|
|
4890
|
+
return fs9.symlinkSync(resolvedSrc, dest);
|
|
4758
4891
|
} else {
|
|
4759
4892
|
let resolvedDest;
|
|
4760
4893
|
try {
|
|
4761
|
-
resolvedDest =
|
|
4894
|
+
resolvedDest = fs9.readlinkSync(dest);
|
|
4762
4895
|
} catch (err) {
|
|
4763
|
-
if (err.code === "EINVAL" || err.code === "UNKNOWN") return
|
|
4896
|
+
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs9.symlinkSync(resolvedSrc, dest);
|
|
4764
4897
|
throw err;
|
|
4765
4898
|
}
|
|
4766
4899
|
if (opts.dereference) {
|
|
4767
|
-
resolvedDest =
|
|
4900
|
+
resolvedDest = path9.resolve(process.cwd(), resolvedDest);
|
|
4768
4901
|
}
|
|
4769
4902
|
if (resolvedSrc !== resolvedDest) {
|
|
4770
4903
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
@@ -4778,16 +4911,16 @@ var require_copy_sync = __commonJS({
|
|
|
4778
4911
|
}
|
|
4779
4912
|
}
|
|
4780
4913
|
function copyLink(resolvedSrc, dest) {
|
|
4781
|
-
|
|
4782
|
-
return
|
|
4914
|
+
fs9.unlinkSync(dest);
|
|
4915
|
+
return fs9.symlinkSync(resolvedSrc, dest);
|
|
4783
4916
|
}
|
|
4784
4917
|
module.exports = copySync;
|
|
4785
4918
|
}
|
|
4786
4919
|
});
|
|
4787
4920
|
|
|
4788
|
-
// node_modules/fs-extra/lib/copy/index.js
|
|
4921
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/copy/index.js
|
|
4789
4922
|
var require_copy2 = __commonJS({
|
|
4790
|
-
"node_modules/fs-extra/lib/copy/index.js"(exports, module) {
|
|
4923
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/copy/index.js"(exports, module) {
|
|
4791
4924
|
"use strict";
|
|
4792
4925
|
var u = require_universalify().fromPromise;
|
|
4793
4926
|
module.exports = {
|
|
@@ -4797,53 +4930,53 @@ var require_copy2 = __commonJS({
|
|
|
4797
4930
|
}
|
|
4798
4931
|
});
|
|
4799
4932
|
|
|
4800
|
-
// node_modules/fs-extra/lib/remove/index.js
|
|
4933
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/remove/index.js
|
|
4801
4934
|
var require_remove = __commonJS({
|
|
4802
|
-
"node_modules/fs-extra/lib/remove/index.js"(exports, module) {
|
|
4935
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/remove/index.js"(exports, module) {
|
|
4803
4936
|
"use strict";
|
|
4804
|
-
var
|
|
4937
|
+
var fs9 = require_graceful_fs();
|
|
4805
4938
|
var u = require_universalify().fromCallback;
|
|
4806
|
-
function
|
|
4807
|
-
|
|
4939
|
+
function remove2(path9, callback) {
|
|
4940
|
+
fs9.rm(path9, { recursive: true, force: true }, callback);
|
|
4808
4941
|
}
|
|
4809
|
-
function removeSync(
|
|
4810
|
-
|
|
4942
|
+
function removeSync(path9) {
|
|
4943
|
+
fs9.rmSync(path9, { recursive: true, force: true });
|
|
4811
4944
|
}
|
|
4812
4945
|
module.exports = {
|
|
4813
|
-
remove: u(
|
|
4946
|
+
remove: u(remove2),
|
|
4814
4947
|
removeSync
|
|
4815
4948
|
};
|
|
4816
4949
|
}
|
|
4817
4950
|
});
|
|
4818
4951
|
|
|
4819
|
-
// node_modules/fs-extra/lib/empty/index.js
|
|
4952
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/empty/index.js
|
|
4820
4953
|
var require_empty = __commonJS({
|
|
4821
|
-
"node_modules/fs-extra/lib/empty/index.js"(exports, module) {
|
|
4954
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/empty/index.js"(exports, module) {
|
|
4822
4955
|
"use strict";
|
|
4823
4956
|
var u = require_universalify().fromPromise;
|
|
4824
|
-
var
|
|
4825
|
-
var
|
|
4957
|
+
var fs9 = require_fs();
|
|
4958
|
+
var path9 = __require("path");
|
|
4826
4959
|
var mkdir = require_mkdirs();
|
|
4827
|
-
var
|
|
4960
|
+
var remove2 = require_remove();
|
|
4828
4961
|
var emptyDir = u(async function emptyDir2(dir) {
|
|
4829
4962
|
let items;
|
|
4830
4963
|
try {
|
|
4831
|
-
items = await
|
|
4964
|
+
items = await fs9.readdir(dir);
|
|
4832
4965
|
} catch {
|
|
4833
4966
|
return mkdir.mkdirs(dir);
|
|
4834
4967
|
}
|
|
4835
|
-
return Promise.all(items.map((item) =>
|
|
4968
|
+
return Promise.all(items.map((item) => remove2.remove(path9.join(dir, item))));
|
|
4836
4969
|
});
|
|
4837
4970
|
function emptyDirSync(dir) {
|
|
4838
4971
|
let items;
|
|
4839
4972
|
try {
|
|
4840
|
-
items =
|
|
4973
|
+
items = fs9.readdirSync(dir);
|
|
4841
4974
|
} catch {
|
|
4842
4975
|
return mkdir.mkdirsSync(dir);
|
|
4843
4976
|
}
|
|
4844
4977
|
items.forEach((item) => {
|
|
4845
|
-
item =
|
|
4846
|
-
|
|
4978
|
+
item = path9.join(dir, item);
|
|
4979
|
+
remove2.removeSync(item);
|
|
4847
4980
|
});
|
|
4848
4981
|
}
|
|
4849
4982
|
module.exports = {
|
|
@@ -4855,57 +4988,57 @@ var require_empty = __commonJS({
|
|
|
4855
4988
|
}
|
|
4856
4989
|
});
|
|
4857
4990
|
|
|
4858
|
-
// node_modules/fs-extra/lib/ensure/file.js
|
|
4991
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/file.js
|
|
4859
4992
|
var require_file = __commonJS({
|
|
4860
|
-
"node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
|
|
4993
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
|
|
4861
4994
|
"use strict";
|
|
4862
4995
|
var u = require_universalify().fromPromise;
|
|
4863
|
-
var
|
|
4864
|
-
var
|
|
4996
|
+
var path9 = __require("path");
|
|
4997
|
+
var fs9 = require_fs();
|
|
4865
4998
|
var mkdir = require_mkdirs();
|
|
4866
4999
|
async function createFile(file) {
|
|
4867
5000
|
let stats;
|
|
4868
5001
|
try {
|
|
4869
|
-
stats = await
|
|
5002
|
+
stats = await fs9.stat(file);
|
|
4870
5003
|
} catch {
|
|
4871
5004
|
}
|
|
4872
5005
|
if (stats && stats.isFile()) return;
|
|
4873
|
-
const dir =
|
|
5006
|
+
const dir = path9.dirname(file);
|
|
4874
5007
|
let dirStats = null;
|
|
4875
5008
|
try {
|
|
4876
|
-
dirStats = await
|
|
5009
|
+
dirStats = await fs9.stat(dir);
|
|
4877
5010
|
} catch (err) {
|
|
4878
5011
|
if (err.code === "ENOENT") {
|
|
4879
5012
|
await mkdir.mkdirs(dir);
|
|
4880
|
-
await
|
|
5013
|
+
await fs9.writeFile(file, "");
|
|
4881
5014
|
return;
|
|
4882
5015
|
} else {
|
|
4883
5016
|
throw err;
|
|
4884
5017
|
}
|
|
4885
5018
|
}
|
|
4886
5019
|
if (dirStats.isDirectory()) {
|
|
4887
|
-
await
|
|
5020
|
+
await fs9.writeFile(file, "");
|
|
4888
5021
|
} else {
|
|
4889
|
-
await
|
|
5022
|
+
await fs9.readdir(dir);
|
|
4890
5023
|
}
|
|
4891
5024
|
}
|
|
4892
5025
|
function createFileSync(file) {
|
|
4893
5026
|
let stats;
|
|
4894
5027
|
try {
|
|
4895
|
-
stats =
|
|
5028
|
+
stats = fs9.statSync(file);
|
|
4896
5029
|
} catch {
|
|
4897
5030
|
}
|
|
4898
5031
|
if (stats && stats.isFile()) return;
|
|
4899
|
-
const dir =
|
|
5032
|
+
const dir = path9.dirname(file);
|
|
4900
5033
|
try {
|
|
4901
|
-
if (!
|
|
4902
|
-
|
|
5034
|
+
if (!fs9.statSync(dir).isDirectory()) {
|
|
5035
|
+
fs9.readdirSync(dir);
|
|
4903
5036
|
}
|
|
4904
5037
|
} catch (err) {
|
|
4905
5038
|
if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
|
|
4906
5039
|
else throw err;
|
|
4907
5040
|
}
|
|
4908
|
-
|
|
5041
|
+
fs9.writeFileSync(file, "");
|
|
4909
5042
|
}
|
|
4910
5043
|
module.exports = {
|
|
4911
5044
|
createFile: u(createFile),
|
|
@@ -4914,55 +5047,55 @@ var require_file = __commonJS({
|
|
|
4914
5047
|
}
|
|
4915
5048
|
});
|
|
4916
5049
|
|
|
4917
|
-
// node_modules/fs-extra/lib/ensure/link.js
|
|
5050
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/link.js
|
|
4918
5051
|
var require_link = __commonJS({
|
|
4919
|
-
"node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
|
|
5052
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
|
|
4920
5053
|
"use strict";
|
|
4921
5054
|
var u = require_universalify().fromPromise;
|
|
4922
|
-
var
|
|
4923
|
-
var
|
|
5055
|
+
var path9 = __require("path");
|
|
5056
|
+
var fs9 = require_fs();
|
|
4924
5057
|
var mkdir = require_mkdirs();
|
|
4925
5058
|
var { pathExists } = require_path_exists();
|
|
4926
5059
|
var { areIdentical } = require_stat();
|
|
4927
5060
|
async function createLink(srcpath, dstpath) {
|
|
4928
5061
|
let dstStat;
|
|
4929
5062
|
try {
|
|
4930
|
-
dstStat = await
|
|
5063
|
+
dstStat = await fs9.lstat(dstpath);
|
|
4931
5064
|
} catch {
|
|
4932
5065
|
}
|
|
4933
5066
|
let srcStat;
|
|
4934
5067
|
try {
|
|
4935
|
-
srcStat = await
|
|
5068
|
+
srcStat = await fs9.lstat(srcpath);
|
|
4936
5069
|
} catch (err) {
|
|
4937
5070
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
4938
5071
|
throw err;
|
|
4939
5072
|
}
|
|
4940
5073
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
4941
|
-
const dir =
|
|
5074
|
+
const dir = path9.dirname(dstpath);
|
|
4942
5075
|
const dirExists = await pathExists(dir);
|
|
4943
5076
|
if (!dirExists) {
|
|
4944
5077
|
await mkdir.mkdirs(dir);
|
|
4945
5078
|
}
|
|
4946
|
-
await
|
|
5079
|
+
await fs9.link(srcpath, dstpath);
|
|
4947
5080
|
}
|
|
4948
5081
|
function createLinkSync(srcpath, dstpath) {
|
|
4949
5082
|
let dstStat;
|
|
4950
5083
|
try {
|
|
4951
|
-
dstStat =
|
|
5084
|
+
dstStat = fs9.lstatSync(dstpath);
|
|
4952
5085
|
} catch {
|
|
4953
5086
|
}
|
|
4954
5087
|
try {
|
|
4955
|
-
const srcStat =
|
|
5088
|
+
const srcStat = fs9.lstatSync(srcpath);
|
|
4956
5089
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
4957
5090
|
} catch (err) {
|
|
4958
5091
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
4959
5092
|
throw err;
|
|
4960
5093
|
}
|
|
4961
|
-
const dir =
|
|
4962
|
-
const dirExists =
|
|
4963
|
-
if (dirExists) return
|
|
5094
|
+
const dir = path9.dirname(dstpath);
|
|
5095
|
+
const dirExists = fs9.existsSync(dir);
|
|
5096
|
+
if (dirExists) return fs9.linkSync(srcpath, dstpath);
|
|
4964
5097
|
mkdir.mkdirsSync(dir);
|
|
4965
|
-
return
|
|
5098
|
+
return fs9.linkSync(srcpath, dstpath);
|
|
4966
5099
|
}
|
|
4967
5100
|
module.exports = {
|
|
4968
5101
|
createLink: u(createLink),
|
|
@@ -4971,18 +5104,18 @@ var require_link = __commonJS({
|
|
|
4971
5104
|
}
|
|
4972
5105
|
});
|
|
4973
5106
|
|
|
4974
|
-
// node_modules/fs-extra/lib/ensure/symlink-paths.js
|
|
5107
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/symlink-paths.js
|
|
4975
5108
|
var require_symlink_paths = __commonJS({
|
|
4976
|
-
"node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
|
|
5109
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
|
|
4977
5110
|
"use strict";
|
|
4978
|
-
var
|
|
4979
|
-
var
|
|
5111
|
+
var path9 = __require("path");
|
|
5112
|
+
var fs9 = require_fs();
|
|
4980
5113
|
var { pathExists } = require_path_exists();
|
|
4981
5114
|
var u = require_universalify().fromPromise;
|
|
4982
5115
|
async function symlinkPaths(srcpath, dstpath) {
|
|
4983
|
-
if (
|
|
5116
|
+
if (path9.isAbsolute(srcpath)) {
|
|
4984
5117
|
try {
|
|
4985
|
-
await
|
|
5118
|
+
await fs9.lstat(srcpath);
|
|
4986
5119
|
} catch (err) {
|
|
4987
5120
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
4988
5121
|
throw err;
|
|
@@ -4992,8 +5125,8 @@ var require_symlink_paths = __commonJS({
|
|
|
4992
5125
|
toDst: srcpath
|
|
4993
5126
|
};
|
|
4994
5127
|
}
|
|
4995
|
-
const dstdir =
|
|
4996
|
-
const relativeToDst =
|
|
5128
|
+
const dstdir = path9.dirname(dstpath);
|
|
5129
|
+
const relativeToDst = path9.join(dstdir, srcpath);
|
|
4997
5130
|
const exists = await pathExists(relativeToDst);
|
|
4998
5131
|
if (exists) {
|
|
4999
5132
|
return {
|
|
@@ -5002,39 +5135,39 @@ var require_symlink_paths = __commonJS({
|
|
|
5002
5135
|
};
|
|
5003
5136
|
}
|
|
5004
5137
|
try {
|
|
5005
|
-
await
|
|
5138
|
+
await fs9.lstat(srcpath);
|
|
5006
5139
|
} catch (err) {
|
|
5007
5140
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
5008
5141
|
throw err;
|
|
5009
5142
|
}
|
|
5010
5143
|
return {
|
|
5011
5144
|
toCwd: srcpath,
|
|
5012
|
-
toDst:
|
|
5145
|
+
toDst: path9.relative(dstdir, srcpath)
|
|
5013
5146
|
};
|
|
5014
5147
|
}
|
|
5015
5148
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
5016
|
-
if (
|
|
5017
|
-
const exists2 =
|
|
5149
|
+
if (path9.isAbsolute(srcpath)) {
|
|
5150
|
+
const exists2 = fs9.existsSync(srcpath);
|
|
5018
5151
|
if (!exists2) throw new Error("absolute srcpath does not exist");
|
|
5019
5152
|
return {
|
|
5020
5153
|
toCwd: srcpath,
|
|
5021
5154
|
toDst: srcpath
|
|
5022
5155
|
};
|
|
5023
5156
|
}
|
|
5024
|
-
const dstdir =
|
|
5025
|
-
const relativeToDst =
|
|
5026
|
-
const exists =
|
|
5157
|
+
const dstdir = path9.dirname(dstpath);
|
|
5158
|
+
const relativeToDst = path9.join(dstdir, srcpath);
|
|
5159
|
+
const exists = fs9.existsSync(relativeToDst);
|
|
5027
5160
|
if (exists) {
|
|
5028
5161
|
return {
|
|
5029
5162
|
toCwd: relativeToDst,
|
|
5030
5163
|
toDst: srcpath
|
|
5031
5164
|
};
|
|
5032
5165
|
}
|
|
5033
|
-
const srcExists =
|
|
5166
|
+
const srcExists = fs9.existsSync(srcpath);
|
|
5034
5167
|
if (!srcExists) throw new Error("relative srcpath does not exist");
|
|
5035
5168
|
return {
|
|
5036
5169
|
toCwd: srcpath,
|
|
5037
|
-
toDst:
|
|
5170
|
+
toDst: path9.relative(dstdir, srcpath)
|
|
5038
5171
|
};
|
|
5039
5172
|
}
|
|
5040
5173
|
module.exports = {
|
|
@@ -5044,17 +5177,17 @@ var require_symlink_paths = __commonJS({
|
|
|
5044
5177
|
}
|
|
5045
5178
|
});
|
|
5046
5179
|
|
|
5047
|
-
// node_modules/fs-extra/lib/ensure/symlink-type.js
|
|
5180
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/symlink-type.js
|
|
5048
5181
|
var require_symlink_type = __commonJS({
|
|
5049
|
-
"node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module) {
|
|
5182
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module) {
|
|
5050
5183
|
"use strict";
|
|
5051
|
-
var
|
|
5184
|
+
var fs9 = require_fs();
|
|
5052
5185
|
var u = require_universalify().fromPromise;
|
|
5053
5186
|
async function symlinkType(srcpath, type) {
|
|
5054
5187
|
if (type) return type;
|
|
5055
5188
|
let stats;
|
|
5056
5189
|
try {
|
|
5057
|
-
stats = await
|
|
5190
|
+
stats = await fs9.lstat(srcpath);
|
|
5058
5191
|
} catch {
|
|
5059
5192
|
return "file";
|
|
5060
5193
|
}
|
|
@@ -5064,7 +5197,7 @@ var require_symlink_type = __commonJS({
|
|
|
5064
5197
|
if (type) return type;
|
|
5065
5198
|
let stats;
|
|
5066
5199
|
try {
|
|
5067
|
-
stats =
|
|
5200
|
+
stats = fs9.lstatSync(srcpath);
|
|
5068
5201
|
} catch {
|
|
5069
5202
|
return "file";
|
|
5070
5203
|
}
|
|
@@ -5077,13 +5210,13 @@ var require_symlink_type = __commonJS({
|
|
|
5077
5210
|
}
|
|
5078
5211
|
});
|
|
5079
5212
|
|
|
5080
|
-
// node_modules/fs-extra/lib/ensure/symlink.js
|
|
5213
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/symlink.js
|
|
5081
5214
|
var require_symlink = __commonJS({
|
|
5082
|
-
"node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
|
|
5215
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
|
|
5083
5216
|
"use strict";
|
|
5084
5217
|
var u = require_universalify().fromPromise;
|
|
5085
|
-
var
|
|
5086
|
-
var
|
|
5218
|
+
var path9 = __require("path");
|
|
5219
|
+
var fs9 = require_fs();
|
|
5087
5220
|
var { mkdirs, mkdirsSync } = require_mkdirs();
|
|
5088
5221
|
var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
|
|
5089
5222
|
var { symlinkType, symlinkTypeSync } = require_symlink_type();
|
|
@@ -5092,64 +5225,64 @@ var require_symlink = __commonJS({
|
|
|
5092
5225
|
async function createSymlink(srcpath, dstpath, type) {
|
|
5093
5226
|
let stats;
|
|
5094
5227
|
try {
|
|
5095
|
-
stats = await
|
|
5228
|
+
stats = await fs9.lstat(dstpath);
|
|
5096
5229
|
} catch {
|
|
5097
5230
|
}
|
|
5098
5231
|
if (stats && stats.isSymbolicLink()) {
|
|
5099
5232
|
let srcStat;
|
|
5100
|
-
if (
|
|
5101
|
-
srcStat = await
|
|
5233
|
+
if (path9.isAbsolute(srcpath)) {
|
|
5234
|
+
srcStat = await fs9.stat(srcpath);
|
|
5102
5235
|
} else {
|
|
5103
|
-
const dstdir =
|
|
5104
|
-
const relativeToDst =
|
|
5236
|
+
const dstdir = path9.dirname(dstpath);
|
|
5237
|
+
const relativeToDst = path9.join(dstdir, srcpath);
|
|
5105
5238
|
try {
|
|
5106
|
-
srcStat = await
|
|
5239
|
+
srcStat = await fs9.stat(relativeToDst);
|
|
5107
5240
|
} catch {
|
|
5108
|
-
srcStat = await
|
|
5241
|
+
srcStat = await fs9.stat(srcpath);
|
|
5109
5242
|
}
|
|
5110
5243
|
}
|
|
5111
|
-
const dstStat = await
|
|
5244
|
+
const dstStat = await fs9.stat(dstpath);
|
|
5112
5245
|
if (areIdentical(srcStat, dstStat)) return;
|
|
5113
5246
|
}
|
|
5114
5247
|
const relative = await symlinkPaths(srcpath, dstpath);
|
|
5115
5248
|
srcpath = relative.toDst;
|
|
5116
5249
|
const toType = await symlinkType(relative.toCwd, type);
|
|
5117
|
-
const dir =
|
|
5250
|
+
const dir = path9.dirname(dstpath);
|
|
5118
5251
|
if (!await pathExists(dir)) {
|
|
5119
5252
|
await mkdirs(dir);
|
|
5120
5253
|
}
|
|
5121
|
-
return
|
|
5254
|
+
return fs9.symlink(srcpath, dstpath, toType);
|
|
5122
5255
|
}
|
|
5123
5256
|
function createSymlinkSync(srcpath, dstpath, type) {
|
|
5124
5257
|
let stats;
|
|
5125
5258
|
try {
|
|
5126
|
-
stats =
|
|
5259
|
+
stats = fs9.lstatSync(dstpath);
|
|
5127
5260
|
} catch {
|
|
5128
5261
|
}
|
|
5129
5262
|
if (stats && stats.isSymbolicLink()) {
|
|
5130
5263
|
let srcStat;
|
|
5131
|
-
if (
|
|
5132
|
-
srcStat =
|
|
5264
|
+
if (path9.isAbsolute(srcpath)) {
|
|
5265
|
+
srcStat = fs9.statSync(srcpath);
|
|
5133
5266
|
} else {
|
|
5134
|
-
const dstdir =
|
|
5135
|
-
const relativeToDst =
|
|
5267
|
+
const dstdir = path9.dirname(dstpath);
|
|
5268
|
+
const relativeToDst = path9.join(dstdir, srcpath);
|
|
5136
5269
|
try {
|
|
5137
|
-
srcStat =
|
|
5270
|
+
srcStat = fs9.statSync(relativeToDst);
|
|
5138
5271
|
} catch {
|
|
5139
|
-
srcStat =
|
|
5272
|
+
srcStat = fs9.statSync(srcpath);
|
|
5140
5273
|
}
|
|
5141
5274
|
}
|
|
5142
|
-
const dstStat =
|
|
5275
|
+
const dstStat = fs9.statSync(dstpath);
|
|
5143
5276
|
if (areIdentical(srcStat, dstStat)) return;
|
|
5144
5277
|
}
|
|
5145
5278
|
const relative = symlinkPathsSync(srcpath, dstpath);
|
|
5146
5279
|
srcpath = relative.toDst;
|
|
5147
5280
|
type = symlinkTypeSync(relative.toCwd, type);
|
|
5148
|
-
const dir =
|
|
5149
|
-
const exists =
|
|
5150
|
-
if (exists) return
|
|
5281
|
+
const dir = path9.dirname(dstpath);
|
|
5282
|
+
const exists = fs9.existsSync(dir);
|
|
5283
|
+
if (exists) return fs9.symlinkSync(srcpath, dstpath, type);
|
|
5151
5284
|
mkdirsSync(dir);
|
|
5152
|
-
return
|
|
5285
|
+
return fs9.symlinkSync(srcpath, dstpath, type);
|
|
5153
5286
|
}
|
|
5154
5287
|
module.exports = {
|
|
5155
5288
|
createSymlink: u(createSymlink),
|
|
@@ -5158,9 +5291,9 @@ var require_symlink = __commonJS({
|
|
|
5158
5291
|
}
|
|
5159
5292
|
});
|
|
5160
5293
|
|
|
5161
|
-
// node_modules/fs-extra/lib/ensure/index.js
|
|
5294
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/index.js
|
|
5162
5295
|
var require_ensure = __commonJS({
|
|
5163
|
-
"node_modules/fs-extra/lib/ensure/index.js"(exports, module) {
|
|
5296
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/ensure/index.js"(exports, module) {
|
|
5164
5297
|
"use strict";
|
|
5165
5298
|
var { createFile, createFileSync } = require_file();
|
|
5166
5299
|
var { createLink, createLinkSync } = require_link();
|
|
@@ -5185,9 +5318,9 @@ var require_ensure = __commonJS({
|
|
|
5185
5318
|
}
|
|
5186
5319
|
});
|
|
5187
5320
|
|
|
5188
|
-
// node_modules/jsonfile/utils.js
|
|
5321
|
+
// ../../node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/utils.js
|
|
5189
5322
|
var require_utils2 = __commonJS({
|
|
5190
|
-
"node_modules/jsonfile/utils.js"(exports, module) {
|
|
5323
|
+
"../../node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/utils.js"(exports, module) {
|
|
5191
5324
|
function stringify(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
|
|
5192
5325
|
const EOF = finalEOL ? EOL : "";
|
|
5193
5326
|
const str = JSON.stringify(obj, replacer, spaces);
|
|
@@ -5201,9 +5334,9 @@ var require_utils2 = __commonJS({
|
|
|
5201
5334
|
}
|
|
5202
5335
|
});
|
|
5203
5336
|
|
|
5204
|
-
// node_modules/jsonfile/index.js
|
|
5337
|
+
// ../../node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/index.js
|
|
5205
5338
|
var require_jsonfile = __commonJS({
|
|
5206
|
-
"node_modules/jsonfile/index.js"(exports, module) {
|
|
5339
|
+
"../../node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/index.js"(exports, module) {
|
|
5207
5340
|
var _fs;
|
|
5208
5341
|
try {
|
|
5209
5342
|
_fs = require_graceful_fs();
|
|
@@ -5216,9 +5349,9 @@ var require_jsonfile = __commonJS({
|
|
|
5216
5349
|
if (typeof options === "string") {
|
|
5217
5350
|
options = { encoding: options };
|
|
5218
5351
|
}
|
|
5219
|
-
const
|
|
5352
|
+
const fs9 = options.fs || _fs;
|
|
5220
5353
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
5221
|
-
let data = await universalify.fromCallback(
|
|
5354
|
+
let data = await universalify.fromCallback(fs9.readFile)(file, options);
|
|
5222
5355
|
data = stripBom(data);
|
|
5223
5356
|
let obj;
|
|
5224
5357
|
try {
|
|
@@ -5238,10 +5371,10 @@ var require_jsonfile = __commonJS({
|
|
|
5238
5371
|
if (typeof options === "string") {
|
|
5239
5372
|
options = { encoding: options };
|
|
5240
5373
|
}
|
|
5241
|
-
const
|
|
5374
|
+
const fs9 = options.fs || _fs;
|
|
5242
5375
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
5243
5376
|
try {
|
|
5244
|
-
let content =
|
|
5377
|
+
let content = fs9.readFileSync(file, options);
|
|
5245
5378
|
content = stripBom(content);
|
|
5246
5379
|
return JSON.parse(content, options.reviver);
|
|
5247
5380
|
} catch (err) {
|
|
@@ -5254,15 +5387,15 @@ var require_jsonfile = __commonJS({
|
|
|
5254
5387
|
}
|
|
5255
5388
|
}
|
|
5256
5389
|
async function _writeFile(file, obj, options = {}) {
|
|
5257
|
-
const
|
|
5390
|
+
const fs9 = options.fs || _fs;
|
|
5258
5391
|
const str = stringify(obj, options);
|
|
5259
|
-
await universalify.fromCallback(
|
|
5392
|
+
await universalify.fromCallback(fs9.writeFile)(file, str, options);
|
|
5260
5393
|
}
|
|
5261
5394
|
var writeFile = universalify.fromPromise(_writeFile);
|
|
5262
5395
|
function writeFileSync(file, obj, options = {}) {
|
|
5263
|
-
const
|
|
5396
|
+
const fs9 = options.fs || _fs;
|
|
5264
5397
|
const str = stringify(obj, options);
|
|
5265
|
-
return
|
|
5398
|
+
return fs9.writeFileSync(file, str, options);
|
|
5266
5399
|
}
|
|
5267
5400
|
module.exports = {
|
|
5268
5401
|
readFile,
|
|
@@ -5273,9 +5406,9 @@ var require_jsonfile = __commonJS({
|
|
|
5273
5406
|
}
|
|
5274
5407
|
});
|
|
5275
5408
|
|
|
5276
|
-
// node_modules/fs-extra/lib/json/jsonfile.js
|
|
5409
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/jsonfile.js
|
|
5277
5410
|
var require_jsonfile2 = __commonJS({
|
|
5278
|
-
"node_modules/fs-extra/lib/json/jsonfile.js"(exports, module) {
|
|
5411
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module) {
|
|
5279
5412
|
"use strict";
|
|
5280
5413
|
var jsonFile = require_jsonfile();
|
|
5281
5414
|
module.exports = {
|
|
@@ -5288,28 +5421,28 @@ var require_jsonfile2 = __commonJS({
|
|
|
5288
5421
|
}
|
|
5289
5422
|
});
|
|
5290
5423
|
|
|
5291
|
-
// node_modules/fs-extra/lib/output-file/index.js
|
|
5424
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/output-file/index.js
|
|
5292
5425
|
var require_output_file = __commonJS({
|
|
5293
|
-
"node_modules/fs-extra/lib/output-file/index.js"(exports, module) {
|
|
5426
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/output-file/index.js"(exports, module) {
|
|
5294
5427
|
"use strict";
|
|
5295
5428
|
var u = require_universalify().fromPromise;
|
|
5296
|
-
var
|
|
5297
|
-
var
|
|
5429
|
+
var fs9 = require_fs();
|
|
5430
|
+
var path9 = __require("path");
|
|
5298
5431
|
var mkdir = require_mkdirs();
|
|
5299
5432
|
var pathExists = require_path_exists().pathExists;
|
|
5300
5433
|
async function outputFile(file, data, encoding = "utf-8") {
|
|
5301
|
-
const dir =
|
|
5434
|
+
const dir = path9.dirname(file);
|
|
5302
5435
|
if (!await pathExists(dir)) {
|
|
5303
5436
|
await mkdir.mkdirs(dir);
|
|
5304
5437
|
}
|
|
5305
|
-
return
|
|
5438
|
+
return fs9.writeFile(file, data, encoding);
|
|
5306
5439
|
}
|
|
5307
5440
|
function outputFileSync(file, ...args) {
|
|
5308
|
-
const dir =
|
|
5309
|
-
if (!
|
|
5441
|
+
const dir = path9.dirname(file);
|
|
5442
|
+
if (!fs9.existsSync(dir)) {
|
|
5310
5443
|
mkdir.mkdirsSync(dir);
|
|
5311
5444
|
}
|
|
5312
|
-
|
|
5445
|
+
fs9.writeFileSync(file, ...args);
|
|
5313
5446
|
}
|
|
5314
5447
|
module.exports = {
|
|
5315
5448
|
outputFile: u(outputFile),
|
|
@@ -5318,9 +5451,9 @@ var require_output_file = __commonJS({
|
|
|
5318
5451
|
}
|
|
5319
5452
|
});
|
|
5320
5453
|
|
|
5321
|
-
// node_modules/fs-extra/lib/json/output-json.js
|
|
5454
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/output-json.js
|
|
5322
5455
|
var require_output_json = __commonJS({
|
|
5323
|
-
"node_modules/fs-extra/lib/json/output-json.js"(exports, module) {
|
|
5456
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/output-json.js"(exports, module) {
|
|
5324
5457
|
"use strict";
|
|
5325
5458
|
var { stringify } = require_utils2();
|
|
5326
5459
|
var { outputFile } = require_output_file();
|
|
@@ -5332,9 +5465,9 @@ var require_output_json = __commonJS({
|
|
|
5332
5465
|
}
|
|
5333
5466
|
});
|
|
5334
5467
|
|
|
5335
|
-
// node_modules/fs-extra/lib/json/output-json-sync.js
|
|
5468
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/output-json-sync.js
|
|
5336
5469
|
var require_output_json_sync = __commonJS({
|
|
5337
|
-
"node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module) {
|
|
5470
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module) {
|
|
5338
5471
|
"use strict";
|
|
5339
5472
|
var { stringify } = require_utils2();
|
|
5340
5473
|
var { outputFileSync } = require_output_file();
|
|
@@ -5346,9 +5479,9 @@ var require_output_json_sync = __commonJS({
|
|
|
5346
5479
|
}
|
|
5347
5480
|
});
|
|
5348
5481
|
|
|
5349
|
-
// node_modules/fs-extra/lib/json/index.js
|
|
5482
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/index.js
|
|
5350
5483
|
var require_json = __commonJS({
|
|
5351
|
-
"node_modules/fs-extra/lib/json/index.js"(exports, module) {
|
|
5484
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/json/index.js"(exports, module) {
|
|
5352
5485
|
"use strict";
|
|
5353
5486
|
var u = require_universalify().fromPromise;
|
|
5354
5487
|
var jsonFile = require_jsonfile2();
|
|
@@ -5364,14 +5497,14 @@ var require_json = __commonJS({
|
|
|
5364
5497
|
}
|
|
5365
5498
|
});
|
|
5366
5499
|
|
|
5367
|
-
// node_modules/fs-extra/lib/move/move.js
|
|
5500
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/move/move.js
|
|
5368
5501
|
var require_move = __commonJS({
|
|
5369
|
-
"node_modules/fs-extra/lib/move/move.js"(exports, module) {
|
|
5502
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/move/move.js"(exports, module) {
|
|
5370
5503
|
"use strict";
|
|
5371
|
-
var
|
|
5372
|
-
var
|
|
5504
|
+
var fs9 = require_fs();
|
|
5505
|
+
var path9 = __require("path");
|
|
5373
5506
|
var { copy } = require_copy2();
|
|
5374
|
-
var { remove } = require_remove();
|
|
5507
|
+
var { remove: remove2 } = require_remove();
|
|
5375
5508
|
var { mkdirp } = require_mkdirs();
|
|
5376
5509
|
var { pathExists } = require_path_exists();
|
|
5377
5510
|
var stat = require_stat();
|
|
@@ -5379,8 +5512,8 @@ var require_move = __commonJS({
|
|
|
5379
5512
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
5380
5513
|
const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
|
|
5381
5514
|
await stat.checkParentPaths(src, srcStat, dest, "move");
|
|
5382
|
-
const destParent =
|
|
5383
|
-
const parsedParentPath =
|
|
5515
|
+
const destParent = path9.dirname(dest);
|
|
5516
|
+
const parsedParentPath = path9.parse(destParent);
|
|
5384
5517
|
if (parsedParentPath.root !== destParent) {
|
|
5385
5518
|
await mkdirp(destParent);
|
|
5386
5519
|
}
|
|
@@ -5389,13 +5522,13 @@ var require_move = __commonJS({
|
|
|
5389
5522
|
async function doRename(src, dest, overwrite, isChangingCase) {
|
|
5390
5523
|
if (!isChangingCase) {
|
|
5391
5524
|
if (overwrite) {
|
|
5392
|
-
await
|
|
5525
|
+
await remove2(dest);
|
|
5393
5526
|
} else if (await pathExists(dest)) {
|
|
5394
5527
|
throw new Error("dest already exists.");
|
|
5395
5528
|
}
|
|
5396
5529
|
}
|
|
5397
5530
|
try {
|
|
5398
|
-
await
|
|
5531
|
+
await fs9.rename(src, dest);
|
|
5399
5532
|
} catch (err) {
|
|
5400
5533
|
if (err.code !== "EXDEV") {
|
|
5401
5534
|
throw err;
|
|
@@ -5410,18 +5543,18 @@ var require_move = __commonJS({
|
|
|
5410
5543
|
preserveTimestamps: true
|
|
5411
5544
|
};
|
|
5412
5545
|
await copy(src, dest, opts);
|
|
5413
|
-
return
|
|
5546
|
+
return remove2(src);
|
|
5414
5547
|
}
|
|
5415
5548
|
module.exports = move;
|
|
5416
5549
|
}
|
|
5417
5550
|
});
|
|
5418
5551
|
|
|
5419
|
-
// node_modules/fs-extra/lib/move/move-sync.js
|
|
5552
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/move/move-sync.js
|
|
5420
5553
|
var require_move_sync = __commonJS({
|
|
5421
|
-
"node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
|
|
5554
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
|
|
5422
5555
|
"use strict";
|
|
5423
|
-
var
|
|
5424
|
-
var
|
|
5556
|
+
var fs9 = require_graceful_fs();
|
|
5557
|
+
var path9 = __require("path");
|
|
5425
5558
|
var copySync = require_copy2().copySync;
|
|
5426
5559
|
var removeSync = require_remove().removeSync;
|
|
5427
5560
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
@@ -5431,12 +5564,12 @@ var require_move_sync = __commonJS({
|
|
|
5431
5564
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
5432
5565
|
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
|
5433
5566
|
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
5434
|
-
if (!isParentRoot(dest)) mkdirpSync(
|
|
5567
|
+
if (!isParentRoot(dest)) mkdirpSync(path9.dirname(dest));
|
|
5435
5568
|
return doRename(src, dest, overwrite, isChangingCase);
|
|
5436
5569
|
}
|
|
5437
5570
|
function isParentRoot(dest) {
|
|
5438
|
-
const parent =
|
|
5439
|
-
const parsedPath =
|
|
5571
|
+
const parent = path9.dirname(dest);
|
|
5572
|
+
const parsedPath = path9.parse(parent);
|
|
5440
5573
|
return parsedPath.root === parent;
|
|
5441
5574
|
}
|
|
5442
5575
|
function doRename(src, dest, overwrite, isChangingCase) {
|
|
@@ -5445,12 +5578,12 @@ var require_move_sync = __commonJS({
|
|
|
5445
5578
|
removeSync(dest);
|
|
5446
5579
|
return rename(src, dest, overwrite);
|
|
5447
5580
|
}
|
|
5448
|
-
if (
|
|
5581
|
+
if (fs9.existsSync(dest)) throw new Error("dest already exists.");
|
|
5449
5582
|
return rename(src, dest, overwrite);
|
|
5450
5583
|
}
|
|
5451
5584
|
function rename(src, dest, overwrite) {
|
|
5452
5585
|
try {
|
|
5453
|
-
|
|
5586
|
+
fs9.renameSync(src, dest);
|
|
5454
5587
|
} catch (err) {
|
|
5455
5588
|
if (err.code !== "EXDEV") throw err;
|
|
5456
5589
|
return moveAcrossDevice(src, dest, overwrite);
|
|
@@ -5469,9 +5602,9 @@ var require_move_sync = __commonJS({
|
|
|
5469
5602
|
}
|
|
5470
5603
|
});
|
|
5471
5604
|
|
|
5472
|
-
// node_modules/fs-extra/lib/move/index.js
|
|
5605
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/move/index.js
|
|
5473
5606
|
var require_move2 = __commonJS({
|
|
5474
|
-
"node_modules/fs-extra/lib/move/index.js"(exports, module) {
|
|
5607
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/move/index.js"(exports, module) {
|
|
5475
5608
|
"use strict";
|
|
5476
5609
|
var u = require_universalify().fromPromise;
|
|
5477
5610
|
module.exports = {
|
|
@@ -5481,9 +5614,9 @@ var require_move2 = __commonJS({
|
|
|
5481
5614
|
}
|
|
5482
5615
|
});
|
|
5483
5616
|
|
|
5484
|
-
// node_modules/fs-extra/lib/index.js
|
|
5617
|
+
// ../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/index.js
|
|
5485
5618
|
var require_lib = __commonJS({
|
|
5486
|
-
"node_modules/fs-extra/lib/index.js"(exports, module) {
|
|
5619
|
+
"../../node_modules/.pnpm/fs-extra@11.3.4/node_modules/fs-extra/lib/index.js"(exports, module) {
|
|
5487
5620
|
"use strict";
|
|
5488
5621
|
module.exports = {
|
|
5489
5622
|
// Export promiseified graceful-fs:
|
|
@@ -5502,9 +5635,9 @@ var require_lib = __commonJS({
|
|
|
5502
5635
|
}
|
|
5503
5636
|
});
|
|
5504
5637
|
|
|
5505
|
-
// node_modules/kleur/index.js
|
|
5638
|
+
// ../../node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js
|
|
5506
5639
|
var require_kleur = __commonJS({
|
|
5507
|
-
"node_modules/kleur/index.js"(exports, module) {
|
|
5640
|
+
"../../node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js"(exports, module) {
|
|
5508
5641
|
"use strict";
|
|
5509
5642
|
var { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env;
|
|
5510
5643
|
var $ = {
|
|
@@ -5599,9 +5732,9 @@ var require_kleur = __commonJS({
|
|
|
5599
5732
|
}
|
|
5600
5733
|
});
|
|
5601
5734
|
|
|
5602
|
-
// node_modules/prompts/dist/util/action.js
|
|
5735
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/action.js
|
|
5603
5736
|
var require_action = __commonJS({
|
|
5604
|
-
"node_modules/prompts/dist/util/action.js"(exports, module) {
|
|
5737
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/action.js"(exports, module) {
|
|
5605
5738
|
"use strict";
|
|
5606
5739
|
module.exports = (key, isSelect) => {
|
|
5607
5740
|
if (key.meta && key.name !== "escape") return;
|
|
@@ -5636,9 +5769,9 @@ var require_action = __commonJS({
|
|
|
5636
5769
|
}
|
|
5637
5770
|
});
|
|
5638
5771
|
|
|
5639
|
-
// node_modules/prompts/dist/util/strip.js
|
|
5772
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/strip.js
|
|
5640
5773
|
var require_strip = __commonJS({
|
|
5641
|
-
"node_modules/prompts/dist/util/strip.js"(exports, module) {
|
|
5774
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/strip.js"(exports, module) {
|
|
5642
5775
|
"use strict";
|
|
5643
5776
|
module.exports = (str) => {
|
|
5644
5777
|
const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");
|
|
@@ -5648,9 +5781,9 @@ var require_strip = __commonJS({
|
|
|
5648
5781
|
}
|
|
5649
5782
|
});
|
|
5650
5783
|
|
|
5651
|
-
// node_modules/sisteransi/src/index.js
|
|
5784
|
+
// ../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
5652
5785
|
var require_src = __commonJS({
|
|
5653
|
-
"node_modules/sisteransi/src/index.js"(exports, module) {
|
|
5786
|
+
"../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
|
|
5654
5787
|
"use strict";
|
|
5655
5788
|
var ESC = "\x1B";
|
|
5656
5789
|
var CSI = `${ESC}[`;
|
|
@@ -5704,9 +5837,9 @@ var require_src = __commonJS({
|
|
|
5704
5837
|
}
|
|
5705
5838
|
});
|
|
5706
5839
|
|
|
5707
|
-
// node_modules/prompts/dist/util/clear.js
|
|
5840
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/clear.js
|
|
5708
5841
|
var require_clear = __commonJS({
|
|
5709
|
-
"node_modules/prompts/dist/util/clear.js"(exports, module) {
|
|
5842
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/clear.js"(exports, module) {
|
|
5710
5843
|
"use strict";
|
|
5711
5844
|
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
5712
5845
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
@@ -5781,9 +5914,9 @@ var require_clear = __commonJS({
|
|
|
5781
5914
|
}
|
|
5782
5915
|
});
|
|
5783
5916
|
|
|
5784
|
-
// node_modules/prompts/dist/util/figures.js
|
|
5917
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/figures.js
|
|
5785
5918
|
var require_figures = __commonJS({
|
|
5786
|
-
"node_modules/prompts/dist/util/figures.js"(exports, module) {
|
|
5919
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/figures.js"(exports, module) {
|
|
5787
5920
|
"use strict";
|
|
5788
5921
|
var main = {
|
|
5789
5922
|
arrowUp: "\u2191",
|
|
@@ -5818,9 +5951,9 @@ var require_figures = __commonJS({
|
|
|
5818
5951
|
}
|
|
5819
5952
|
});
|
|
5820
5953
|
|
|
5821
|
-
// node_modules/prompts/dist/util/style.js
|
|
5954
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/style.js
|
|
5822
5955
|
var require_style = __commonJS({
|
|
5823
|
-
"node_modules/prompts/dist/util/style.js"(exports, module) {
|
|
5956
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/style.js"(exports, module) {
|
|
5824
5957
|
"use strict";
|
|
5825
5958
|
var c = require_kleur();
|
|
5826
5959
|
var figures = require_figures();
|
|
@@ -5863,9 +5996,9 @@ var require_style = __commonJS({
|
|
|
5863
5996
|
}
|
|
5864
5997
|
});
|
|
5865
5998
|
|
|
5866
|
-
// node_modules/prompts/dist/util/lines.js
|
|
5999
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/lines.js
|
|
5867
6000
|
var require_lines = __commonJS({
|
|
5868
|
-
"node_modules/prompts/dist/util/lines.js"(exports, module) {
|
|
6001
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/lines.js"(exports, module) {
|
|
5869
6002
|
"use strict";
|
|
5870
6003
|
var strip = require_strip();
|
|
5871
6004
|
module.exports = function(msg, perLine) {
|
|
@@ -5876,9 +6009,9 @@ var require_lines = __commonJS({
|
|
|
5876
6009
|
}
|
|
5877
6010
|
});
|
|
5878
6011
|
|
|
5879
|
-
// node_modules/prompts/dist/util/wrap.js
|
|
6012
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/wrap.js
|
|
5880
6013
|
var require_wrap = __commonJS({
|
|
5881
|
-
"node_modules/prompts/dist/util/wrap.js"(exports, module) {
|
|
6014
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/wrap.js"(exports, module) {
|
|
5882
6015
|
"use strict";
|
|
5883
6016
|
module.exports = (msg, opts = {}) => {
|
|
5884
6017
|
const tab = Number.isSafeInteger(parseInt(opts.margin)) ? new Array(parseInt(opts.margin)).fill(" ").join("") : opts.margin || "";
|
|
@@ -5892,9 +6025,9 @@ var require_wrap = __commonJS({
|
|
|
5892
6025
|
}
|
|
5893
6026
|
});
|
|
5894
6027
|
|
|
5895
|
-
// node_modules/prompts/dist/util/entriesToDisplay.js
|
|
6028
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/entriesToDisplay.js
|
|
5896
6029
|
var require_entriesToDisplay = __commonJS({
|
|
5897
|
-
"node_modules/prompts/dist/util/entriesToDisplay.js"(exports, module) {
|
|
6030
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/entriesToDisplay.js"(exports, module) {
|
|
5898
6031
|
"use strict";
|
|
5899
6032
|
module.exports = (cursor, total, maxVisible) => {
|
|
5900
6033
|
maxVisible = maxVisible || total;
|
|
@@ -5909,9 +6042,9 @@ var require_entriesToDisplay = __commonJS({
|
|
|
5909
6042
|
}
|
|
5910
6043
|
});
|
|
5911
6044
|
|
|
5912
|
-
// node_modules/prompts/dist/util/index.js
|
|
6045
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/index.js
|
|
5913
6046
|
var require_util = __commonJS({
|
|
5914
|
-
"node_modules/prompts/dist/util/index.js"(exports, module) {
|
|
6047
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/index.js"(exports, module) {
|
|
5915
6048
|
"use strict";
|
|
5916
6049
|
module.exports = {
|
|
5917
6050
|
action: require_action(),
|
|
@@ -5926,9 +6059,9 @@ var require_util = __commonJS({
|
|
|
5926
6059
|
}
|
|
5927
6060
|
});
|
|
5928
6061
|
|
|
5929
|
-
// node_modules/prompts/dist/elements/prompt.js
|
|
6062
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/prompt.js
|
|
5930
6063
|
var require_prompt = __commonJS({
|
|
5931
|
-
"node_modules/prompts/dist/elements/prompt.js"(exports, module) {
|
|
6064
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/prompt.js"(exports, module) {
|
|
5932
6065
|
"use strict";
|
|
5933
6066
|
var readline = __require("readline");
|
|
5934
6067
|
var _require = require_util();
|
|
@@ -5991,9 +6124,9 @@ var require_prompt = __commonJS({
|
|
|
5991
6124
|
}
|
|
5992
6125
|
});
|
|
5993
6126
|
|
|
5994
|
-
// node_modules/prompts/dist/elements/text.js
|
|
6127
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/text.js
|
|
5995
6128
|
var require_text = __commonJS({
|
|
5996
|
-
"node_modules/prompts/dist/elements/text.js"(exports, module) {
|
|
6129
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/text.js"(exports, module) {
|
|
5997
6130
|
"use strict";
|
|
5998
6131
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
5999
6132
|
try {
|
|
@@ -6207,9 +6340,9 @@ ${i ? " " : figures.pointerSmall} ${color.red().italic(l)}`, ``);
|
|
|
6207
6340
|
}
|
|
6208
6341
|
});
|
|
6209
6342
|
|
|
6210
|
-
// node_modules/prompts/dist/elements/select.js
|
|
6343
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/select.js
|
|
6211
6344
|
var require_select = __commonJS({
|
|
6212
|
-
"node_modules/prompts/dist/elements/select.js"(exports, module) {
|
|
6345
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/select.js"(exports, module) {
|
|
6213
6346
|
"use strict";
|
|
6214
6347
|
var color = require_kleur();
|
|
6215
6348
|
var Prompt = require_prompt();
|
|
@@ -6355,9 +6488,9 @@ var require_select = __commonJS({
|
|
|
6355
6488
|
}
|
|
6356
6489
|
});
|
|
6357
6490
|
|
|
6358
|
-
// node_modules/prompts/dist/elements/toggle.js
|
|
6491
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/toggle.js
|
|
6359
6492
|
var require_toggle = __commonJS({
|
|
6360
|
-
"node_modules/prompts/dist/elements/toggle.js"(exports, module) {
|
|
6493
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/toggle.js"(exports, module) {
|
|
6361
6494
|
"use strict";
|
|
6362
6495
|
var color = require_kleur();
|
|
6363
6496
|
var Prompt = require_prompt();
|
|
@@ -6453,9 +6586,9 @@ var require_toggle = __commonJS({
|
|
|
6453
6586
|
}
|
|
6454
6587
|
});
|
|
6455
6588
|
|
|
6456
|
-
// node_modules/prompts/dist/dateparts/datepart.js
|
|
6589
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/datepart.js
|
|
6457
6590
|
var require_datepart = __commonJS({
|
|
6458
|
-
"node_modules/prompts/dist/dateparts/datepart.js"(exports, module) {
|
|
6591
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/datepart.js"(exports, module) {
|
|
6459
6592
|
"use strict";
|
|
6460
6593
|
var DatePart = class _DatePart {
|
|
6461
6594
|
constructor({
|
|
@@ -6492,9 +6625,9 @@ var require_datepart = __commonJS({
|
|
|
6492
6625
|
}
|
|
6493
6626
|
});
|
|
6494
6627
|
|
|
6495
|
-
// node_modules/prompts/dist/dateparts/meridiem.js
|
|
6628
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/meridiem.js
|
|
6496
6629
|
var require_meridiem = __commonJS({
|
|
6497
|
-
"node_modules/prompts/dist/dateparts/meridiem.js"(exports, module) {
|
|
6630
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/meridiem.js"(exports, module) {
|
|
6498
6631
|
"use strict";
|
|
6499
6632
|
var DatePart = require_datepart();
|
|
6500
6633
|
var Meridiem = class extends DatePart {
|
|
@@ -6516,9 +6649,9 @@ var require_meridiem = __commonJS({
|
|
|
6516
6649
|
}
|
|
6517
6650
|
});
|
|
6518
6651
|
|
|
6519
|
-
// node_modules/prompts/dist/dateparts/day.js
|
|
6652
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/day.js
|
|
6520
6653
|
var require_day = __commonJS({
|
|
6521
|
-
"node_modules/prompts/dist/dateparts/day.js"(exports, module) {
|
|
6654
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/day.js"(exports, module) {
|
|
6522
6655
|
"use strict";
|
|
6523
6656
|
var DatePart = require_datepart();
|
|
6524
6657
|
var pos = (n) => {
|
|
@@ -6548,9 +6681,9 @@ var require_day = __commonJS({
|
|
|
6548
6681
|
}
|
|
6549
6682
|
});
|
|
6550
6683
|
|
|
6551
|
-
// node_modules/prompts/dist/dateparts/hours.js
|
|
6684
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/hours.js
|
|
6552
6685
|
var require_hours = __commonJS({
|
|
6553
|
-
"node_modules/prompts/dist/dateparts/hours.js"(exports, module) {
|
|
6686
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/hours.js"(exports, module) {
|
|
6554
6687
|
"use strict";
|
|
6555
6688
|
var DatePart = require_datepart();
|
|
6556
6689
|
var Hours = class extends DatePart {
|
|
@@ -6576,9 +6709,9 @@ var require_hours = __commonJS({
|
|
|
6576
6709
|
}
|
|
6577
6710
|
});
|
|
6578
6711
|
|
|
6579
|
-
// node_modules/prompts/dist/dateparts/milliseconds.js
|
|
6712
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/milliseconds.js
|
|
6580
6713
|
var require_milliseconds = __commonJS({
|
|
6581
|
-
"node_modules/prompts/dist/dateparts/milliseconds.js"(exports, module) {
|
|
6714
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/milliseconds.js"(exports, module) {
|
|
6582
6715
|
"use strict";
|
|
6583
6716
|
var DatePart = require_datepart();
|
|
6584
6717
|
var Milliseconds = class extends DatePart {
|
|
@@ -6602,9 +6735,9 @@ var require_milliseconds = __commonJS({
|
|
|
6602
6735
|
}
|
|
6603
6736
|
});
|
|
6604
6737
|
|
|
6605
|
-
// node_modules/prompts/dist/dateparts/minutes.js
|
|
6738
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/minutes.js
|
|
6606
6739
|
var require_minutes = __commonJS({
|
|
6607
|
-
"node_modules/prompts/dist/dateparts/minutes.js"(exports, module) {
|
|
6740
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/minutes.js"(exports, module) {
|
|
6608
6741
|
"use strict";
|
|
6609
6742
|
var DatePart = require_datepart();
|
|
6610
6743
|
var Minutes = class extends DatePart {
|
|
@@ -6629,9 +6762,9 @@ var require_minutes = __commonJS({
|
|
|
6629
6762
|
}
|
|
6630
6763
|
});
|
|
6631
6764
|
|
|
6632
|
-
// node_modules/prompts/dist/dateparts/month.js
|
|
6765
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/month.js
|
|
6633
6766
|
var require_month = __commonJS({
|
|
6634
|
-
"node_modules/prompts/dist/dateparts/month.js"(exports, module) {
|
|
6767
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/month.js"(exports, module) {
|
|
6635
6768
|
"use strict";
|
|
6636
6769
|
var DatePart = require_datepart();
|
|
6637
6770
|
var Month = class extends DatePart {
|
|
@@ -6658,9 +6791,9 @@ var require_month = __commonJS({
|
|
|
6658
6791
|
}
|
|
6659
6792
|
});
|
|
6660
6793
|
|
|
6661
|
-
// node_modules/prompts/dist/dateparts/seconds.js
|
|
6794
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/seconds.js
|
|
6662
6795
|
var require_seconds = __commonJS({
|
|
6663
|
-
"node_modules/prompts/dist/dateparts/seconds.js"(exports, module) {
|
|
6796
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/seconds.js"(exports, module) {
|
|
6664
6797
|
"use strict";
|
|
6665
6798
|
var DatePart = require_datepart();
|
|
6666
6799
|
var Seconds = class extends DatePart {
|
|
@@ -6685,9 +6818,9 @@ var require_seconds = __commonJS({
|
|
|
6685
6818
|
}
|
|
6686
6819
|
});
|
|
6687
6820
|
|
|
6688
|
-
// node_modules/prompts/dist/dateparts/year.js
|
|
6821
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/year.js
|
|
6689
6822
|
var require_year = __commonJS({
|
|
6690
|
-
"node_modules/prompts/dist/dateparts/year.js"(exports, module) {
|
|
6823
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/year.js"(exports, module) {
|
|
6691
6824
|
"use strict";
|
|
6692
6825
|
var DatePart = require_datepart();
|
|
6693
6826
|
var Year = class extends DatePart {
|
|
@@ -6712,9 +6845,9 @@ var require_year = __commonJS({
|
|
|
6712
6845
|
}
|
|
6713
6846
|
});
|
|
6714
6847
|
|
|
6715
|
-
// node_modules/prompts/dist/dateparts/index.js
|
|
6848
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/index.js
|
|
6716
6849
|
var require_dateparts = __commonJS({
|
|
6717
|
-
"node_modules/prompts/dist/dateparts/index.js"(exports, module) {
|
|
6850
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/index.js"(exports, module) {
|
|
6718
6851
|
"use strict";
|
|
6719
6852
|
module.exports = {
|
|
6720
6853
|
DatePart: require_datepart(),
|
|
@@ -6730,9 +6863,9 @@ var require_dateparts = __commonJS({
|
|
|
6730
6863
|
}
|
|
6731
6864
|
});
|
|
6732
6865
|
|
|
6733
|
-
// node_modules/prompts/dist/elements/date.js
|
|
6866
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/date.js
|
|
6734
6867
|
var require_date = __commonJS({
|
|
6735
|
-
"node_modules/prompts/dist/elements/date.js"(exports, module) {
|
|
6868
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/date.js"(exports, module) {
|
|
6736
6869
|
"use strict";
|
|
6737
6870
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
6738
6871
|
try {
|
|
@@ -6956,9 +7089,9 @@ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
|
|
|
6956
7089
|
}
|
|
6957
7090
|
});
|
|
6958
7091
|
|
|
6959
|
-
// node_modules/prompts/dist/elements/number.js
|
|
7092
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/number.js
|
|
6960
7093
|
var require_number = __commonJS({
|
|
6961
|
-
"node_modules/prompts/dist/elements/number.js"(exports, module) {
|
|
7094
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/number.js"(exports, module) {
|
|
6962
7095
|
"use strict";
|
|
6963
7096
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
6964
7097
|
try {
|
|
@@ -7171,9 +7304,9 @@ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
|
|
|
7171
7304
|
}
|
|
7172
7305
|
});
|
|
7173
7306
|
|
|
7174
|
-
// node_modules/prompts/dist/elements/multiselect.js
|
|
7307
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/multiselect.js
|
|
7175
7308
|
var require_multiselect = __commonJS({
|
|
7176
|
-
"node_modules/prompts/dist/elements/multiselect.js"(exports, module) {
|
|
7309
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/multiselect.js"(exports, module) {
|
|
7177
7310
|
"use strict";
|
|
7178
7311
|
var color = require_kleur();
|
|
7179
7312
|
var _require = require_src();
|
|
@@ -7402,9 +7535,9 @@ Instructions:
|
|
|
7402
7535
|
}
|
|
7403
7536
|
});
|
|
7404
7537
|
|
|
7405
|
-
// node_modules/prompts/dist/elements/autocomplete.js
|
|
7538
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/autocomplete.js
|
|
7406
7539
|
var require_autocomplete = __commonJS({
|
|
7407
|
-
"node_modules/prompts/dist/elements/autocomplete.js"(exports, module) {
|
|
7540
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/autocomplete.js"(exports, module) {
|
|
7408
7541
|
"use strict";
|
|
7409
7542
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
7410
7543
|
try {
|
|
@@ -7657,9 +7790,9 @@ var require_autocomplete = __commonJS({
|
|
|
7657
7790
|
}
|
|
7658
7791
|
});
|
|
7659
7792
|
|
|
7660
|
-
// node_modules/prompts/dist/elements/autocompleteMultiselect.js
|
|
7793
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/autocompleteMultiselect.js
|
|
7661
7794
|
var require_autocompleteMultiselect = __commonJS({
|
|
7662
|
-
"node_modules/prompts/dist/elements/autocompleteMultiselect.js"(exports, module) {
|
|
7795
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/autocompleteMultiselect.js"(exports, module) {
|
|
7663
7796
|
"use strict";
|
|
7664
7797
|
var color = require_kleur();
|
|
7665
7798
|
var _require = require_src();
|
|
@@ -7816,9 +7949,9 @@ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter so
|
|
|
7816
7949
|
}
|
|
7817
7950
|
});
|
|
7818
7951
|
|
|
7819
|
-
// node_modules/prompts/dist/elements/confirm.js
|
|
7952
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/confirm.js
|
|
7820
7953
|
var require_confirm = __commonJS({
|
|
7821
|
-
"node_modules/prompts/dist/elements/confirm.js"(exports, module) {
|
|
7954
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/confirm.js"(exports, module) {
|
|
7822
7955
|
"use strict";
|
|
7823
7956
|
var color = require_kleur();
|
|
7824
7957
|
var Prompt = require_prompt();
|
|
@@ -7888,9 +8021,9 @@ var require_confirm = __commonJS({
|
|
|
7888
8021
|
}
|
|
7889
8022
|
});
|
|
7890
8023
|
|
|
7891
|
-
// node_modules/prompts/dist/elements/index.js
|
|
8024
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/index.js
|
|
7892
8025
|
var require_elements = __commonJS({
|
|
7893
|
-
"node_modules/prompts/dist/elements/index.js"(exports, module) {
|
|
8026
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/index.js"(exports, module) {
|
|
7894
8027
|
"use strict";
|
|
7895
8028
|
module.exports = {
|
|
7896
8029
|
TextPrompt: require_text(),
|
|
@@ -7906,9 +8039,9 @@ var require_elements = __commonJS({
|
|
|
7906
8039
|
}
|
|
7907
8040
|
});
|
|
7908
8041
|
|
|
7909
|
-
// node_modules/prompts/dist/prompts.js
|
|
8042
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/prompts.js
|
|
7910
8043
|
var require_prompts = __commonJS({
|
|
7911
|
-
"node_modules/prompts/dist/prompts.js"(exports) {
|
|
8044
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/prompts.js"(exports) {
|
|
7912
8045
|
"use strict";
|
|
7913
8046
|
var $ = exports;
|
|
7914
8047
|
var el = require_elements();
|
|
@@ -7970,9 +8103,9 @@ var require_prompts = __commonJS({
|
|
|
7970
8103
|
}
|
|
7971
8104
|
});
|
|
7972
8105
|
|
|
7973
|
-
// node_modules/prompts/dist/index.js
|
|
8106
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.js
|
|
7974
8107
|
var require_dist = __commonJS({
|
|
7975
|
-
"node_modules/prompts/dist/index.js"(exports, module) {
|
|
8108
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.js"(exports, module) {
|
|
7976
8109
|
"use strict";
|
|
7977
8110
|
function ownKeys(object, enumerableOnly) {
|
|
7978
8111
|
var keys = Object.keys(object);
|
|
@@ -8089,7 +8222,7 @@ var require_dist = __commonJS({
|
|
|
8089
8222
|
});
|
|
8090
8223
|
};
|
|
8091
8224
|
}
|
|
8092
|
-
var
|
|
8225
|
+
var prompts5 = require_prompts();
|
|
8093
8226
|
var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
|
|
8094
8227
|
var noop = () => {
|
|
8095
8228
|
};
|
|
@@ -8140,7 +8273,7 @@ var require_dist = __commonJS({
|
|
|
8140
8273
|
var _question2 = question;
|
|
8141
8274
|
name = _question2.name;
|
|
8142
8275
|
type = _question2.type;
|
|
8143
|
-
if (
|
|
8276
|
+
if (prompts5[type] === void 0) {
|
|
8144
8277
|
throw new Error(`prompt type (${type}) is not defined`);
|
|
8145
8278
|
}
|
|
8146
8279
|
if (override2[question.name] !== void 0) {
|
|
@@ -8151,7 +8284,7 @@ var require_dist = __commonJS({
|
|
|
8151
8284
|
}
|
|
8152
8285
|
}
|
|
8153
8286
|
try {
|
|
8154
|
-
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : yield
|
|
8287
|
+
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : yield prompts5[type](question);
|
|
8155
8288
|
answers[name] = answer = yield getFormattedAnswer(question, answer, true);
|
|
8156
8289
|
quit = yield onSubmit(question, answer, answers);
|
|
8157
8290
|
} catch (err) {
|
|
@@ -8183,16 +8316,16 @@ var require_dist = __commonJS({
|
|
|
8183
8316
|
}
|
|
8184
8317
|
module.exports = Object.assign(prompt, {
|
|
8185
8318
|
prompt,
|
|
8186
|
-
prompts:
|
|
8319
|
+
prompts: prompts5,
|
|
8187
8320
|
inject,
|
|
8188
8321
|
override
|
|
8189
8322
|
});
|
|
8190
8323
|
}
|
|
8191
8324
|
});
|
|
8192
8325
|
|
|
8193
|
-
// node_modules/prompts/lib/util/action.js
|
|
8326
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/action.js
|
|
8194
8327
|
var require_action2 = __commonJS({
|
|
8195
|
-
"node_modules/prompts/lib/util/action.js"(exports, module) {
|
|
8328
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/action.js"(exports, module) {
|
|
8196
8329
|
"use strict";
|
|
8197
8330
|
module.exports = (key, isSelect) => {
|
|
8198
8331
|
if (key.meta && key.name !== "escape") return;
|
|
@@ -8227,9 +8360,9 @@ var require_action2 = __commonJS({
|
|
|
8227
8360
|
}
|
|
8228
8361
|
});
|
|
8229
8362
|
|
|
8230
|
-
// node_modules/prompts/lib/util/strip.js
|
|
8363
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/strip.js
|
|
8231
8364
|
var require_strip2 = __commonJS({
|
|
8232
|
-
"node_modules/prompts/lib/util/strip.js"(exports, module) {
|
|
8365
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/strip.js"(exports, module) {
|
|
8233
8366
|
"use strict";
|
|
8234
8367
|
module.exports = (str) => {
|
|
8235
8368
|
const pattern = [
|
|
@@ -8242,9 +8375,9 @@ var require_strip2 = __commonJS({
|
|
|
8242
8375
|
}
|
|
8243
8376
|
});
|
|
8244
8377
|
|
|
8245
|
-
// node_modules/prompts/lib/util/clear.js
|
|
8378
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/clear.js
|
|
8246
8379
|
var require_clear2 = __commonJS({
|
|
8247
|
-
"node_modules/prompts/lib/util/clear.js"(exports, module) {
|
|
8380
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/clear.js"(exports, module) {
|
|
8248
8381
|
"use strict";
|
|
8249
8382
|
var strip = require_strip2();
|
|
8250
8383
|
var { erase, cursor } = require_src();
|
|
@@ -8261,9 +8394,9 @@ var require_clear2 = __commonJS({
|
|
|
8261
8394
|
}
|
|
8262
8395
|
});
|
|
8263
8396
|
|
|
8264
|
-
// node_modules/prompts/lib/util/figures.js
|
|
8397
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/figures.js
|
|
8265
8398
|
var require_figures2 = __commonJS({
|
|
8266
|
-
"node_modules/prompts/lib/util/figures.js"(exports, module) {
|
|
8399
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/figures.js"(exports, module) {
|
|
8267
8400
|
"use strict";
|
|
8268
8401
|
var main = {
|
|
8269
8402
|
arrowUp: "\u2191",
|
|
@@ -8298,9 +8431,9 @@ var require_figures2 = __commonJS({
|
|
|
8298
8431
|
}
|
|
8299
8432
|
});
|
|
8300
8433
|
|
|
8301
|
-
// node_modules/prompts/lib/util/style.js
|
|
8434
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/style.js
|
|
8302
8435
|
var require_style2 = __commonJS({
|
|
8303
|
-
"node_modules/prompts/lib/util/style.js"(exports, module) {
|
|
8436
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/style.js"(exports, module) {
|
|
8304
8437
|
"use strict";
|
|
8305
8438
|
var c = require_kleur();
|
|
8306
8439
|
var figures = require_figures2();
|
|
@@ -8331,9 +8464,9 @@ var require_style2 = __commonJS({
|
|
|
8331
8464
|
}
|
|
8332
8465
|
});
|
|
8333
8466
|
|
|
8334
|
-
// node_modules/prompts/lib/util/lines.js
|
|
8467
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/lines.js
|
|
8335
8468
|
var require_lines2 = __commonJS({
|
|
8336
|
-
"node_modules/prompts/lib/util/lines.js"(exports, module) {
|
|
8469
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/lines.js"(exports, module) {
|
|
8337
8470
|
"use strict";
|
|
8338
8471
|
var strip = require_strip2();
|
|
8339
8472
|
module.exports = function(msg, perLine) {
|
|
@@ -8344,9 +8477,9 @@ var require_lines2 = __commonJS({
|
|
|
8344
8477
|
}
|
|
8345
8478
|
});
|
|
8346
8479
|
|
|
8347
|
-
// node_modules/prompts/lib/util/wrap.js
|
|
8480
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/wrap.js
|
|
8348
8481
|
var require_wrap2 = __commonJS({
|
|
8349
|
-
"node_modules/prompts/lib/util/wrap.js"(exports, module) {
|
|
8482
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/wrap.js"(exports, module) {
|
|
8350
8483
|
"use strict";
|
|
8351
8484
|
module.exports = (msg, opts = {}) => {
|
|
8352
8485
|
const tab = Number.isSafeInteger(parseInt(opts.margin)) ? new Array(parseInt(opts.margin)).fill(" ").join("") : opts.margin || "";
|
|
@@ -8361,9 +8494,9 @@ var require_wrap2 = __commonJS({
|
|
|
8361
8494
|
}
|
|
8362
8495
|
});
|
|
8363
8496
|
|
|
8364
|
-
// node_modules/prompts/lib/util/entriesToDisplay.js
|
|
8497
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/entriesToDisplay.js
|
|
8365
8498
|
var require_entriesToDisplay2 = __commonJS({
|
|
8366
|
-
"node_modules/prompts/lib/util/entriesToDisplay.js"(exports, module) {
|
|
8499
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/entriesToDisplay.js"(exports, module) {
|
|
8367
8500
|
"use strict";
|
|
8368
8501
|
module.exports = (cursor, total, maxVisible) => {
|
|
8369
8502
|
maxVisible = maxVisible || total;
|
|
@@ -8375,9 +8508,9 @@ var require_entriesToDisplay2 = __commonJS({
|
|
|
8375
8508
|
}
|
|
8376
8509
|
});
|
|
8377
8510
|
|
|
8378
|
-
// node_modules/prompts/lib/util/index.js
|
|
8511
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/index.js
|
|
8379
8512
|
var require_util2 = __commonJS({
|
|
8380
|
-
"node_modules/prompts/lib/util/index.js"(exports, module) {
|
|
8513
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/index.js"(exports, module) {
|
|
8381
8514
|
"use strict";
|
|
8382
8515
|
module.exports = {
|
|
8383
8516
|
action: require_action2(),
|
|
@@ -8392,9 +8525,9 @@ var require_util2 = __commonJS({
|
|
|
8392
8525
|
}
|
|
8393
8526
|
});
|
|
8394
8527
|
|
|
8395
|
-
// node_modules/prompts/lib/elements/prompt.js
|
|
8528
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/prompt.js
|
|
8396
8529
|
var require_prompt2 = __commonJS({
|
|
8397
|
-
"node_modules/prompts/lib/elements/prompt.js"(exports, module) {
|
|
8530
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/prompt.js"(exports, module) {
|
|
8398
8531
|
"use strict";
|
|
8399
8532
|
var readline = __require("readline");
|
|
8400
8533
|
var { action } = require_util2();
|
|
@@ -8451,9 +8584,9 @@ var require_prompt2 = __commonJS({
|
|
|
8451
8584
|
}
|
|
8452
8585
|
});
|
|
8453
8586
|
|
|
8454
|
-
// node_modules/prompts/lib/elements/text.js
|
|
8587
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/text.js
|
|
8455
8588
|
var require_text2 = __commonJS({
|
|
8456
|
-
"node_modules/prompts/lib/elements/text.js"(exports, module) {
|
|
8589
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/text.js"(exports, module) {
|
|
8457
8590
|
var color = require_kleur();
|
|
8458
8591
|
var Prompt = require_prompt2();
|
|
8459
8592
|
var { erase, cursor } = require_src();
|
|
@@ -8631,9 +8764,9 @@ ${i ? " " : figures.pointerSmall} ${color.red().italic(l)}`, ``);
|
|
|
8631
8764
|
}
|
|
8632
8765
|
});
|
|
8633
8766
|
|
|
8634
|
-
// node_modules/prompts/lib/elements/select.js
|
|
8767
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/select.js
|
|
8635
8768
|
var require_select2 = __commonJS({
|
|
8636
|
-
"node_modules/prompts/lib/elements/select.js"(exports, module) {
|
|
8769
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/select.js"(exports, module) {
|
|
8637
8770
|
"use strict";
|
|
8638
8771
|
var color = require_kleur();
|
|
8639
8772
|
var Prompt = require_prompt2();
|
|
@@ -8774,9 +8907,9 @@ var require_select2 = __commonJS({
|
|
|
8774
8907
|
}
|
|
8775
8908
|
});
|
|
8776
8909
|
|
|
8777
|
-
// node_modules/prompts/lib/elements/toggle.js
|
|
8910
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/toggle.js
|
|
8778
8911
|
var require_toggle2 = __commonJS({
|
|
8779
|
-
"node_modules/prompts/lib/elements/toggle.js"(exports, module) {
|
|
8912
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/toggle.js"(exports, module) {
|
|
8780
8913
|
var color = require_kleur();
|
|
8781
8914
|
var Prompt = require_prompt2();
|
|
8782
8915
|
var { style, clear } = require_util2();
|
|
@@ -8874,9 +9007,9 @@ var require_toggle2 = __commonJS({
|
|
|
8874
9007
|
}
|
|
8875
9008
|
});
|
|
8876
9009
|
|
|
8877
|
-
// node_modules/prompts/lib/dateparts/datepart.js
|
|
9010
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/datepart.js
|
|
8878
9011
|
var require_datepart2 = __commonJS({
|
|
8879
|
-
"node_modules/prompts/lib/dateparts/datepart.js"(exports, module) {
|
|
9012
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/datepart.js"(exports, module) {
|
|
8880
9013
|
"use strict";
|
|
8881
9014
|
var DatePart = class _DatePart {
|
|
8882
9015
|
constructor({ token, date, parts, locales }) {
|
|
@@ -8908,9 +9041,9 @@ var require_datepart2 = __commonJS({
|
|
|
8908
9041
|
}
|
|
8909
9042
|
});
|
|
8910
9043
|
|
|
8911
|
-
// node_modules/prompts/lib/dateparts/meridiem.js
|
|
9044
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/meridiem.js
|
|
8912
9045
|
var require_meridiem2 = __commonJS({
|
|
8913
|
-
"node_modules/prompts/lib/dateparts/meridiem.js"(exports, module) {
|
|
9046
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/meridiem.js"(exports, module) {
|
|
8914
9047
|
"use strict";
|
|
8915
9048
|
var DatePart = require_datepart2();
|
|
8916
9049
|
var Meridiem = class extends DatePart {
|
|
@@ -8932,9 +9065,9 @@ var require_meridiem2 = __commonJS({
|
|
|
8932
9065
|
}
|
|
8933
9066
|
});
|
|
8934
9067
|
|
|
8935
|
-
// node_modules/prompts/lib/dateparts/day.js
|
|
9068
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/day.js
|
|
8936
9069
|
var require_day2 = __commonJS({
|
|
8937
|
-
"node_modules/prompts/lib/dateparts/day.js"(exports, module) {
|
|
9070
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/day.js"(exports, module) {
|
|
8938
9071
|
"use strict";
|
|
8939
9072
|
var DatePart = require_datepart2();
|
|
8940
9073
|
var pos = (n) => {
|
|
@@ -8964,9 +9097,9 @@ var require_day2 = __commonJS({
|
|
|
8964
9097
|
}
|
|
8965
9098
|
});
|
|
8966
9099
|
|
|
8967
|
-
// node_modules/prompts/lib/dateparts/hours.js
|
|
9100
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/hours.js
|
|
8968
9101
|
var require_hours2 = __commonJS({
|
|
8969
|
-
"node_modules/prompts/lib/dateparts/hours.js"(exports, module) {
|
|
9102
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/hours.js"(exports, module) {
|
|
8970
9103
|
"use strict";
|
|
8971
9104
|
var DatePart = require_datepart2();
|
|
8972
9105
|
var Hours = class extends DatePart {
|
|
@@ -8993,9 +9126,9 @@ var require_hours2 = __commonJS({
|
|
|
8993
9126
|
}
|
|
8994
9127
|
});
|
|
8995
9128
|
|
|
8996
|
-
// node_modules/prompts/lib/dateparts/milliseconds.js
|
|
9129
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/milliseconds.js
|
|
8997
9130
|
var require_milliseconds2 = __commonJS({
|
|
8998
|
-
"node_modules/prompts/lib/dateparts/milliseconds.js"(exports, module) {
|
|
9131
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/milliseconds.js"(exports, module) {
|
|
8999
9132
|
"use strict";
|
|
9000
9133
|
var DatePart = require_datepart2();
|
|
9001
9134
|
var Milliseconds = class extends DatePart {
|
|
@@ -9019,9 +9152,9 @@ var require_milliseconds2 = __commonJS({
|
|
|
9019
9152
|
}
|
|
9020
9153
|
});
|
|
9021
9154
|
|
|
9022
|
-
// node_modules/prompts/lib/dateparts/minutes.js
|
|
9155
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/minutes.js
|
|
9023
9156
|
var require_minutes2 = __commonJS({
|
|
9024
|
-
"node_modules/prompts/lib/dateparts/minutes.js"(exports, module) {
|
|
9157
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/minutes.js"(exports, module) {
|
|
9025
9158
|
"use strict";
|
|
9026
9159
|
var DatePart = require_datepart2();
|
|
9027
9160
|
var Minutes = class extends DatePart {
|
|
@@ -9046,9 +9179,9 @@ var require_minutes2 = __commonJS({
|
|
|
9046
9179
|
}
|
|
9047
9180
|
});
|
|
9048
9181
|
|
|
9049
|
-
// node_modules/prompts/lib/dateparts/month.js
|
|
9182
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/month.js
|
|
9050
9183
|
var require_month2 = __commonJS({
|
|
9051
|
-
"node_modules/prompts/lib/dateparts/month.js"(exports, module) {
|
|
9184
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/month.js"(exports, module) {
|
|
9052
9185
|
"use strict";
|
|
9053
9186
|
var DatePart = require_datepart2();
|
|
9054
9187
|
var Month = class extends DatePart {
|
|
@@ -9075,9 +9208,9 @@ var require_month2 = __commonJS({
|
|
|
9075
9208
|
}
|
|
9076
9209
|
});
|
|
9077
9210
|
|
|
9078
|
-
// node_modules/prompts/lib/dateparts/seconds.js
|
|
9211
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/seconds.js
|
|
9079
9212
|
var require_seconds2 = __commonJS({
|
|
9080
|
-
"node_modules/prompts/lib/dateparts/seconds.js"(exports, module) {
|
|
9213
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/seconds.js"(exports, module) {
|
|
9081
9214
|
"use strict";
|
|
9082
9215
|
var DatePart = require_datepart2();
|
|
9083
9216
|
var Seconds = class extends DatePart {
|
|
@@ -9102,9 +9235,9 @@ var require_seconds2 = __commonJS({
|
|
|
9102
9235
|
}
|
|
9103
9236
|
});
|
|
9104
9237
|
|
|
9105
|
-
// node_modules/prompts/lib/dateparts/year.js
|
|
9238
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/year.js
|
|
9106
9239
|
var require_year2 = __commonJS({
|
|
9107
|
-
"node_modules/prompts/lib/dateparts/year.js"(exports, module) {
|
|
9240
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/year.js"(exports, module) {
|
|
9108
9241
|
"use strict";
|
|
9109
9242
|
var DatePart = require_datepart2();
|
|
9110
9243
|
var Year = class extends DatePart {
|
|
@@ -9129,9 +9262,9 @@ var require_year2 = __commonJS({
|
|
|
9129
9262
|
}
|
|
9130
9263
|
});
|
|
9131
9264
|
|
|
9132
|
-
// node_modules/prompts/lib/dateparts/index.js
|
|
9265
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/index.js
|
|
9133
9266
|
var require_dateparts2 = __commonJS({
|
|
9134
|
-
"node_modules/prompts/lib/dateparts/index.js"(exports, module) {
|
|
9267
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/index.js"(exports, module) {
|
|
9135
9268
|
"use strict";
|
|
9136
9269
|
module.exports = {
|
|
9137
9270
|
DatePart: require_datepart2(),
|
|
@@ -9147,9 +9280,9 @@ var require_dateparts2 = __commonJS({
|
|
|
9147
9280
|
}
|
|
9148
9281
|
});
|
|
9149
9282
|
|
|
9150
|
-
// node_modules/prompts/lib/elements/date.js
|
|
9283
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/date.js
|
|
9151
9284
|
var require_date2 = __commonJS({
|
|
9152
|
-
"node_modules/prompts/lib/elements/date.js"(exports, module) {
|
|
9285
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/date.js"(exports, module) {
|
|
9153
9286
|
"use strict";
|
|
9154
9287
|
var color = require_kleur();
|
|
9155
9288
|
var Prompt = require_prompt2();
|
|
@@ -9326,9 +9459,9 @@ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`,
|
|
|
9326
9459
|
}
|
|
9327
9460
|
});
|
|
9328
9461
|
|
|
9329
|
-
// node_modules/prompts/lib/elements/number.js
|
|
9462
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/number.js
|
|
9330
9463
|
var require_number2 = __commonJS({
|
|
9331
|
-
"node_modules/prompts/lib/elements/number.js"(exports, module) {
|
|
9464
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/number.js"(exports, module) {
|
|
9332
9465
|
var color = require_kleur();
|
|
9333
9466
|
var Prompt = require_prompt2();
|
|
9334
9467
|
var { cursor, erase } = require_src();
|
|
@@ -9505,9 +9638,9 @@ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
|
|
|
9505
9638
|
}
|
|
9506
9639
|
});
|
|
9507
9640
|
|
|
9508
|
-
// node_modules/prompts/lib/elements/multiselect.js
|
|
9641
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/multiselect.js
|
|
9509
9642
|
var require_multiselect2 = __commonJS({
|
|
9510
|
-
"node_modules/prompts/lib/elements/multiselect.js"(exports, module) {
|
|
9643
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/multiselect.js"(exports, module) {
|
|
9511
9644
|
"use strict";
|
|
9512
9645
|
var color = require_kleur();
|
|
9513
9646
|
var { cursor } = require_src();
|
|
@@ -9730,9 +9863,9 @@ Instructions:
|
|
|
9730
9863
|
}
|
|
9731
9864
|
});
|
|
9732
9865
|
|
|
9733
|
-
// node_modules/prompts/lib/elements/autocomplete.js
|
|
9866
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocomplete.js
|
|
9734
9867
|
var require_autocomplete2 = __commonJS({
|
|
9735
|
-
"node_modules/prompts/lib/elements/autocomplete.js"(exports, module) {
|
|
9868
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocomplete.js"(exports, module) {
|
|
9736
9869
|
"use strict";
|
|
9737
9870
|
var color = require_kleur();
|
|
9738
9871
|
var Prompt = require_prompt2();
|
|
@@ -9946,9 +10079,9 @@ var require_autocomplete2 = __commonJS({
|
|
|
9946
10079
|
}
|
|
9947
10080
|
});
|
|
9948
10081
|
|
|
9949
|
-
// node_modules/prompts/lib/elements/autocompleteMultiselect.js
|
|
10082
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocompleteMultiselect.js
|
|
9950
10083
|
var require_autocompleteMultiselect2 = __commonJS({
|
|
9951
|
-
"node_modules/prompts/lib/elements/autocompleteMultiselect.js"(exports, module) {
|
|
10084
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocompleteMultiselect.js"(exports, module) {
|
|
9952
10085
|
"use strict";
|
|
9953
10086
|
var color = require_kleur();
|
|
9954
10087
|
var { cursor } = require_src();
|
|
@@ -10106,9 +10239,9 @@ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter so
|
|
|
10106
10239
|
}
|
|
10107
10240
|
});
|
|
10108
10241
|
|
|
10109
|
-
// node_modules/prompts/lib/elements/confirm.js
|
|
10242
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/confirm.js
|
|
10110
10243
|
var require_confirm2 = __commonJS({
|
|
10111
|
-
"node_modules/prompts/lib/elements/confirm.js"(exports, module) {
|
|
10244
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/confirm.js"(exports, module) {
|
|
10112
10245
|
var color = require_kleur();
|
|
10113
10246
|
var Prompt = require_prompt2();
|
|
10114
10247
|
var { style, clear } = require_util2();
|
|
@@ -10178,9 +10311,9 @@ var require_confirm2 = __commonJS({
|
|
|
10178
10311
|
}
|
|
10179
10312
|
});
|
|
10180
10313
|
|
|
10181
|
-
// node_modules/prompts/lib/elements/index.js
|
|
10314
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/index.js
|
|
10182
10315
|
var require_elements2 = __commonJS({
|
|
10183
|
-
"node_modules/prompts/lib/elements/index.js"(exports, module) {
|
|
10316
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/index.js"(exports, module) {
|
|
10184
10317
|
"use strict";
|
|
10185
10318
|
module.exports = {
|
|
10186
10319
|
TextPrompt: require_text2(),
|
|
@@ -10196,9 +10329,9 @@ var require_elements2 = __commonJS({
|
|
|
10196
10329
|
}
|
|
10197
10330
|
});
|
|
10198
10331
|
|
|
10199
|
-
// node_modules/prompts/lib/prompts.js
|
|
10332
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/prompts.js
|
|
10200
10333
|
var require_prompts2 = __commonJS({
|
|
10201
|
-
"node_modules/prompts/lib/prompts.js"(exports) {
|
|
10334
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/prompts.js"(exports) {
|
|
10202
10335
|
"use strict";
|
|
10203
10336
|
var $ = exports;
|
|
10204
10337
|
var el = require_elements2();
|
|
@@ -10262,11 +10395,11 @@ var require_prompts2 = __commonJS({
|
|
|
10262
10395
|
}
|
|
10263
10396
|
});
|
|
10264
10397
|
|
|
10265
|
-
// node_modules/prompts/lib/index.js
|
|
10398
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/index.js
|
|
10266
10399
|
var require_lib2 = __commonJS({
|
|
10267
|
-
"node_modules/prompts/lib/index.js"(exports, module) {
|
|
10400
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/index.js"(exports, module) {
|
|
10268
10401
|
"use strict";
|
|
10269
|
-
var
|
|
10402
|
+
var prompts5 = require_prompts2();
|
|
10270
10403
|
var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
|
|
10271
10404
|
var noop = () => {
|
|
10272
10405
|
};
|
|
@@ -10298,7 +10431,7 @@ var require_lib2 = __commonJS({
|
|
|
10298
10431
|
throw new Error("prompt message is required");
|
|
10299
10432
|
}
|
|
10300
10433
|
({ name, type } = question);
|
|
10301
|
-
if (
|
|
10434
|
+
if (prompts5[type] === void 0) {
|
|
10302
10435
|
throw new Error(`prompt type (${type}) is not defined`);
|
|
10303
10436
|
}
|
|
10304
10437
|
if (override2[question.name] !== void 0) {
|
|
@@ -10309,7 +10442,7 @@ var require_lib2 = __commonJS({
|
|
|
10309
10442
|
}
|
|
10310
10443
|
}
|
|
10311
10444
|
try {
|
|
10312
|
-
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await
|
|
10445
|
+
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts5[type](question);
|
|
10313
10446
|
answers[name] = answer = await getFormattedAnswer(question, answer, true);
|
|
10314
10447
|
quit = await onSubmit(question, answer, answers);
|
|
10315
10448
|
} catch (err) {
|
|
@@ -10332,13 +10465,13 @@ var require_lib2 = __commonJS({
|
|
|
10332
10465
|
function override(answers) {
|
|
10333
10466
|
prompt._override = Object.assign({}, answers);
|
|
10334
10467
|
}
|
|
10335
|
-
module.exports = Object.assign(prompt, { prompt, prompts:
|
|
10468
|
+
module.exports = Object.assign(prompt, { prompt, prompts: prompts5, inject, override });
|
|
10336
10469
|
}
|
|
10337
10470
|
});
|
|
10338
10471
|
|
|
10339
|
-
// node_modules/prompts/index.js
|
|
10472
|
+
// ../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/index.js
|
|
10340
10473
|
var require_prompts3 = __commonJS({
|
|
10341
|
-
"node_modules/prompts/index.js"(exports, module) {
|
|
10474
|
+
"../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/index.js"(exports, module) {
|
|
10342
10475
|
function isNodeLT(tar) {
|
|
10343
10476
|
tar = (Array.isArray(tar) ? tar : tar.split(".")).map(Number);
|
|
10344
10477
|
let i = 0, src = process.versions.node.split(".").map(Number);
|
|
@@ -10352,9 +10485,9 @@ var require_prompts3 = __commonJS({
|
|
|
10352
10485
|
}
|
|
10353
10486
|
});
|
|
10354
10487
|
|
|
10355
|
-
// node_modules/picocolors/picocolors.js
|
|
10488
|
+
// ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
10356
10489
|
var require_picocolors = __commonJS({
|
|
10357
|
-
"node_modules/picocolors/picocolors.js"(exports, module) {
|
|
10490
|
+
"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
10358
10491
|
var p = process || {};
|
|
10359
10492
|
var argv = p.argv || [];
|
|
10360
10493
|
var env = p.env || {};
|
|
@@ -10424,7 +10557,7 @@ var require_picocolors = __commonJS({
|
|
|
10424
10557
|
}
|
|
10425
10558
|
});
|
|
10426
10559
|
|
|
10427
|
-
// node_modules/commander/esm.mjs
|
|
10560
|
+
// ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/esm.mjs
|
|
10428
10561
|
var import_index = __toESM(require_commander(), 1);
|
|
10429
10562
|
var {
|
|
10430
10563
|
program,
|
|
@@ -10787,7 +10920,7 @@ import path4 from "path";
|
|
|
10787
10920
|
var registry_data_default = {
|
|
10788
10921
|
$schema: "./schema.json",
|
|
10789
10922
|
name: "aivory-ui",
|
|
10790
|
-
version: "0.
|
|
10923
|
+
version: "0.2.0",
|
|
10791
10924
|
components: {
|
|
10792
10925
|
accordion: {
|
|
10793
10926
|
files: ["ui/accordion.tsx"],
|
|
@@ -11069,12 +11202,66 @@ var registry_data_default = {
|
|
|
11069
11202
|
files: ["ui/tooltip.tsx"],
|
|
11070
11203
|
dependencies: ["radix-ui"],
|
|
11071
11204
|
registryDependencies: []
|
|
11205
|
+
},
|
|
11206
|
+
"data-table": {
|
|
11207
|
+
files: ["ui/data-table.tsx"],
|
|
11208
|
+
dependencies: ["@tanstack/react-table", "lucide-react"],
|
|
11209
|
+
registryDependencies: ["button", "input", "select", "table"]
|
|
11210
|
+
},
|
|
11211
|
+
"date-range-picker": {
|
|
11212
|
+
files: ["ui/date-range-picker.tsx"],
|
|
11213
|
+
dependencies: ["lucide-react", "react-day-picker"],
|
|
11214
|
+
registryDependencies: ["button", "calendar", "popover"]
|
|
11215
|
+
},
|
|
11216
|
+
"file-upload": {
|
|
11217
|
+
files: ["ui/file-upload.tsx"],
|
|
11218
|
+
dependencies: ["lucide-react"],
|
|
11219
|
+
registryDependencies: ["button"]
|
|
11220
|
+
},
|
|
11221
|
+
stepper: {
|
|
11222
|
+
files: ["ui/stepper.tsx"],
|
|
11223
|
+
dependencies: ["lucide-react"],
|
|
11224
|
+
registryDependencies: []
|
|
11225
|
+
},
|
|
11226
|
+
timeline: {
|
|
11227
|
+
files: ["ui/timeline.tsx"],
|
|
11228
|
+
dependencies: [],
|
|
11229
|
+
registryDependencies: []
|
|
11230
|
+
},
|
|
11231
|
+
"tree-view": {
|
|
11232
|
+
files: ["ui/tree-view.tsx"],
|
|
11233
|
+
dependencies: ["lucide-react"],
|
|
11234
|
+
registryDependencies: []
|
|
11072
11235
|
}
|
|
11073
11236
|
},
|
|
11074
11237
|
hooks: {
|
|
11075
11238
|
"use-mobile": {
|
|
11076
11239
|
files: ["hooks/use-mobile.ts"],
|
|
11077
11240
|
dependencies: []
|
|
11241
|
+
},
|
|
11242
|
+
"use-debounce": {
|
|
11243
|
+
files: ["hooks/use-debounce.ts"],
|
|
11244
|
+
dependencies: []
|
|
11245
|
+
},
|
|
11246
|
+
"use-throttle": {
|
|
11247
|
+
files: ["hooks/use-throttle.ts"],
|
|
11248
|
+
dependencies: []
|
|
11249
|
+
},
|
|
11250
|
+
"use-clipboard": {
|
|
11251
|
+
files: ["hooks/use-clipboard.ts"],
|
|
11252
|
+
dependencies: []
|
|
11253
|
+
},
|
|
11254
|
+
"use-media-query": {
|
|
11255
|
+
files: ["hooks/use-media-query.ts"],
|
|
11256
|
+
dependencies: []
|
|
11257
|
+
},
|
|
11258
|
+
"use-local-storage": {
|
|
11259
|
+
files: ["hooks/use-local-storage.ts"],
|
|
11260
|
+
dependencies: []
|
|
11261
|
+
},
|
|
11262
|
+
"use-session-storage": {
|
|
11263
|
+
files: ["hooks/use-session-storage.ts"],
|
|
11264
|
+
dependencies: []
|
|
11078
11265
|
}
|
|
11079
11266
|
},
|
|
11080
11267
|
lib: {
|
|
@@ -11156,7 +11343,13 @@ function transformImports(source, config) {
|
|
|
11156
11343
|
|
|
11157
11344
|
// registry-files.json
|
|
11158
11345
|
var registry_files_default = {
|
|
11346
|
+
"hooks/use-clipboard.ts": 'import * as React from "react"\n\ninterface UseClipboardReturn {\n copy: (text: string) => Promise<void>\n copied: boolean\n}\n\nexport function useClipboard(timeout = 2000): UseClipboardReturn {\n const [copied, setCopied] = React.useState(false)\n\n const copy = React.useCallback(\n async (text: string) => {\n await navigator.clipboard.writeText(text)\n setCopied(true)\n },\n [],\n )\n\n React.useEffect(() => {\n if (!copied) return\n const timer = setTimeout(() => setCopied(false), timeout)\n return () => clearTimeout(timer)\n }, [copied, timeout])\n\n return { copy, copied }\n}\n',
|
|
11347
|
+
"hooks/use-debounce.ts": 'import * as React from "react"\n\nexport function useDebounce<T>(value: T, delay: number): T {\n const [debouncedValue, setDebouncedValue] = React.useState<T>(value)\n\n React.useEffect(() => {\n const timer = setTimeout(() => setDebouncedValue(value), delay)\n return () => clearTimeout(timer)\n }, [value, delay])\n\n return debouncedValue\n}\n',
|
|
11348
|
+
"hooks/use-local-storage.ts": 'import * as React from "react"\n\nexport function useLocalStorage<T>(key: string, initialValue: T): [T, React.Dispatch<React.SetStateAction<T>>] {\n const [storedValue, setStoredValue] = React.useState<T>(() => {\n if (typeof window === "undefined") return initialValue\n try {\n const item = window.localStorage.getItem(key)\n return item ? (JSON.parse(item) as T) : initialValue\n } catch {\n return initialValue\n }\n })\n\n React.useEffect(() => {\n try {\n window.localStorage.setItem(key, JSON.stringify(storedValue))\n } catch {\n // Storage full or unavailable\n }\n }, [key, storedValue])\n\n return [storedValue, setStoredValue]\n}\n',
|
|
11349
|
+
"hooks/use-media-query.ts": 'import * as React from "react"\n\nexport function useMediaQuery(query: string): boolean {\n const [matches, setMatches] = React.useState(false)\n\n React.useEffect(() => {\n const mql = window.matchMedia(query)\n const onChange = (e: MediaQueryListEvent) => setMatches(e.matches)\n\n setMatches(mql.matches)\n mql.addEventListener("change", onChange)\n return () => mql.removeEventListener("change", onChange)\n }, [query])\n\n return matches\n}\n',
|
|
11159
11350
|
"hooks/use-mobile.ts": 'import * as React from "react"\n\nconst MOBILE_BREAKPOINT = 768\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n }\n mql.addEventListener("change", onChange)\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n return () => mql.removeEventListener("change", onChange)\n }, [])\n\n return !!isMobile\n}\n',
|
|
11351
|
+
"hooks/use-session-storage.ts": 'import * as React from "react"\n\nexport function useSessionStorage<T>(key: string, initialValue: T): [T, React.Dispatch<React.SetStateAction<T>>] {\n const [storedValue, setStoredValue] = React.useState<T>(() => {\n if (typeof window === "undefined") return initialValue\n try {\n const item = window.sessionStorage.getItem(key)\n return item ? (JSON.parse(item) as T) : initialValue\n } catch {\n return initialValue\n }\n })\n\n React.useEffect(() => {\n try {\n window.sessionStorage.setItem(key, JSON.stringify(storedValue))\n } catch {\n // Storage full or unavailable\n }\n }, [key, storedValue])\n\n return [storedValue, setStoredValue]\n}\n',
|
|
11352
|
+
"hooks/use-throttle.ts": 'import * as React from "react"\n\nexport function useThrottle<T>(value: T, interval: number): T {\n const [throttledValue, setThrottledValue] = React.useState<T>(value)\n const lastUpdated = React.useRef<number>(0)\n\n React.useEffect(() => {\n const now = Date.now()\n\n if (now - lastUpdated.current >= interval) {\n lastUpdated.current = now\n setThrottledValue(value)\n } else {\n const timer = setTimeout(() => {\n lastUpdated.current = Date.now()\n setThrottledValue(value)\n }, interval - (now - lastUpdated.current))\n\n return () => clearTimeout(timer)\n }\n }, [value, interval])\n\n return throttledValue\n}\n',
|
|
11160
11353
|
"lib/utils.ts": 'import { clsx, type ClassValue } from "clsx"\nimport { twMerge } from "tailwind-merge"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n',
|
|
11161
11354
|
"ui/accordion.tsx": '"use client"\n\nimport { ChevronDownIcon } from "lucide-react"\nimport { Accordion as AccordionPrimitive } from "radix-ui"\nimport * as React from "react"\n\nimport { cn } from "@/lib/utils"\n\nfunction Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>) {\n return <AccordionPrimitive.Root data-slot="accordion" {...props} />\n}\n\nfunction AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>) {\n return (\n <AccordionPrimitive.Item\n data-slot="accordion-item"\n className={cn("border-b last:border-b-0", className)}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {\n return (\n <AccordionPrimitive.Header className="flex">\n <AccordionPrimitive.Trigger\n data-slot="accordion-trigger"\n className={cn(\n "flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronDownIcon className="pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>) {\n return (\n <AccordionPrimitive.Content\n data-slot="accordion-content"\n className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"\n {...props}\n >\n <div className={cn("pt-0 pb-4", className)}>{children}</div>\n </AccordionPrimitive.Content>\n )\n}\n\nexport { Accordion, AccordionContent, AccordionItem, AccordionTrigger }\n',
|
|
11162
11355
|
"ui/alert-dialog.tsx": `"use client"
|
|
@@ -12091,6 +12284,8 @@ export {
|
|
|
12091
12284
|
ContextMenuTrigger,
|
|
12092
12285
|
}
|
|
12093
12286
|
`,
|
|
12287
|
+
"ui/data-table.tsx": '"use client"\n\nimport * as React from "react"\nimport {\n type ColumnDef,\n type ColumnFiltersState,\n type SortingState,\n type VisibilityState,\n flexRender,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from "@tanstack/react-table"\nimport { ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react"\n\nimport { Button } from "@/components/ui/button"\nimport { Input } from "@/components/ui/input"\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"\nimport { cn } from "@/lib/utils"\n\ninterface DataTableProps<TData, TValue> {\n columns: ColumnDef<TData, TValue>[]\n data: TData[]\n searchKey?: string\n searchPlaceholder?: string\n pageSize?: number\n pageSizeOptions?: number[]\n className?: string\n}\n\nfunction DataTable<TData, TValue>({\n columns,\n data,\n searchKey,\n searchPlaceholder = "Search...",\n pageSize = 10,\n pageSizeOptions = [10, 20, 30, 50],\n className,\n}: DataTableProps<TData, TValue>) {\n const [sorting, setSorting] = React.useState<SortingState>([])\n const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>([])\n const [columnVisibility, setColumnVisibility] = React.useState<VisibilityState>({})\n const [rowSelection, setRowSelection] = React.useState({})\n\n const table = useReactTable({\n data,\n columns,\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n getSortedRowModel: getSortedRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n onSortingChange: setSorting,\n onColumnFiltersChange: setColumnFilters,\n onColumnVisibilityChange: setColumnVisibility,\n onRowSelectionChange: setRowSelection,\n state: {\n sorting,\n columnFilters,\n columnVisibility,\n rowSelection,\n },\n initialState: {\n pagination: { pageSize },\n },\n })\n\n return (\n <div data-slot="data-table" className={cn("space-y-4", className)}>\n {searchKey && (\n <div data-slot="data-table-toolbar" className="flex items-center gap-2">\n <Input\n placeholder={searchPlaceholder}\n value={(table.getColumn(searchKey)?.getFilterValue() as string) ?? ""}\n onChange={(e) => table.getColumn(searchKey)?.setFilterValue(e.target.value)}\n className="max-w-sm"\n />\n </div>\n )}\n\n <div data-slot="data-table-content" className="rounded-md border">\n <Table>\n <TableHeader>\n {table.getHeaderGroups().map((headerGroup) => (\n <TableRow key={headerGroup.id}>\n {headerGroup.headers.map((header) => (\n <TableHead key={header.id}>\n {header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext())}\n </TableHead>\n ))}\n </TableRow>\n ))}\n </TableHeader>\n <TableBody>\n {table.getRowModel().rows?.length ? (\n table.getRowModel().rows.map((row) => (\n <TableRow key={row.id} data-state={row.getIsSelected() && "selected"}>\n {row.getVisibleCells().map((cell) => (\n <TableCell key={cell.id}>{flexRender(cell.column.columnDef.cell, cell.getContext())}</TableCell>\n ))}\n </TableRow>\n ))\n ) : (\n <TableRow>\n <TableCell colSpan={columns.length} className="h-24 text-center">\n No results.\n </TableCell>\n </TableRow>\n )}\n </TableBody>\n </Table>\n </div>\n\n <div data-slot="data-table-pagination" className="flex items-center justify-between gap-4">\n <div className="text-sm text-muted-foreground">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s)\n selected.\n </div>\n <div className="flex items-center gap-2">\n <div className="flex items-center gap-2">\n <p className="text-sm font-medium">Rows per page</p>\n <Select\n value={`${table.getState().pagination.pageSize}`}\n onValueChange={(value) => table.setPageSize(Number(value))}\n >\n <SelectTrigger className="h-8 w-[70px]">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side="top">\n {pageSizeOptions.map((size) => (\n <SelectItem key={size} value={`${size}`}>\n {size}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className="text-sm font-medium">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <Button variant="outline" size="icon-sm" onClick={() => table.previousPage()} disabled={!table.getCanPreviousPage()}>\n <ChevronLeftIcon />\n </Button>\n <Button variant="outline" size="icon-sm" onClick={() => table.nextPage()} disabled={!table.getCanNextPage()}>\n <ChevronRightIcon />\n </Button>\n </div>\n </div>\n </div>\n )\n}\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: {\n column: import("@tanstack/react-table").Column<TData, TValue>\n title: string\n className?: string\n}) {\n if (!column.getCanSort()) {\n return <div className={cn(className)}>{title}</div>\n }\n\n return (\n <Button\n variant="ghost"\n size="sm"\n className={cn("-ml-3 h-8", className)}\n onClick={() => column.toggleSorting(column.getIsSorted() === "asc")}\n >\n {title}\n {column.getIsSorted() === "desc" ? (\n <ArrowDownIcon />\n ) : column.getIsSorted() === "asc" ? (\n <ArrowUpIcon />\n ) : (\n <ArrowUpDownIcon />\n )}\n </Button>\n )\n}\n\nexport { DataTable, DataTableColumnHeader }\nexport type { DataTableProps }\n',
|
|
12288
|
+
"ui/date-range-picker.tsx": '"use client"\n\nimport { CalendarIcon } from "lucide-react"\nimport * as React from "react"\nimport { type DateRange } from "react-day-picker"\n\nimport { Button } from "@/components/ui/button"\nimport { Calendar } from "@/components/ui/calendar"\nimport { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"\nimport { cn } from "@/lib/utils"\n\ninterface DateRangePickerProps {\n value?: DateRange\n onChange?: (range: DateRange | undefined) => void\n placeholder?: string\n presets?: { label: string; range: DateRange }[]\n numberOfMonths?: number\n className?: string\n align?: "start" | "center" | "end"\n disabled?: boolean\n}\n\nfunction formatDate(date: Date): string {\n return date.toLocaleDateString("en-US", {\n month: "short",\n day: "numeric",\n year: "numeric",\n })\n}\n\nfunction DateRangePicker({\n value,\n onChange,\n placeholder = "Pick a date range",\n presets,\n numberOfMonths = 2,\n className,\n align = "start",\n disabled = false,\n}: DateRangePickerProps) {\n const [open, setOpen] = React.useState(false)\n\n const displayValue = React.useMemo(() => {\n if (!value?.from) return placeholder\n if (!value.to) return formatDate(value.from)\n return `${formatDate(value.from)} - ${formatDate(value.to)}`\n }, [value, placeholder])\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n data-slot="date-range-picker"\n variant="outline"\n disabled={disabled}\n className={cn(\n "w-[300px] justify-start text-left font-normal",\n !value?.from && "text-muted-foreground",\n className,\n )}\n >\n <CalendarIcon />\n <span className="truncate">{displayValue}</span>\n </Button>\n </PopoverTrigger>\n <PopoverContent className="w-auto p-0" align={align}>\n <div data-slot="date-range-picker-content" className="flex">\n {presets && presets.length > 0 && (\n <div\n data-slot="date-range-picker-presets"\n className="flex flex-col gap-1 border-r p-3"\n >\n <p className="mb-1 text-xs font-medium text-muted-foreground">Presets</p>\n {presets.map((preset) => (\n <Button\n key={preset.label}\n variant="ghost"\n size="sm"\n className="justify-start"\n onClick={() => {\n onChange?.(preset.range)\n setOpen(false)\n }}\n >\n {preset.label}\n </Button>\n ))}\n </div>\n )}\n <Calendar\n mode="range"\n defaultMonth={value?.from}\n selected={value}\n onSelect={onChange}\n numberOfMonths={numberOfMonths}\n />\n </div>\n </PopoverContent>\n </Popover>\n )\n}\n\nexport { DateRangePicker }\nexport type { DateRangePickerProps }\n',
|
|
12094
12289
|
"ui/dialog.tsx": `"use client"
|
|
12095
12290
|
|
|
12096
12291
|
import { XIcon } from "lucide-react"
|
|
@@ -12539,6 +12734,7 @@ function EmptyContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
12539
12734
|
export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle }
|
|
12540
12735
|
`,
|
|
12541
12736
|
"ui/field.tsx": '"use client"\n\nimport { cva, type VariantProps } from "class-variance-authority"\nimport { useMemo } from "react"\n\nimport { Label } from "@/components/ui/label"\nimport { Separator } from "@/components/ui/separator"\nimport { cn } from "@/lib/utils"\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {\n return (\n <fieldset\n data-slot="field-set"\n className={cn(\n "flex flex-col gap-6",\n "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction FieldLegend({\n className,\n variant = "legend",\n ...props\n}: React.ComponentProps<"legend"> & { variant?: "legend" | "label" }) {\n return (\n <legend\n data-slot="field-legend"\n data-variant={variant}\n className={cn("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", className)}\n {...props}\n />\n )\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<"div">) {\n return (\n <div\n data-slot="field-group"\n className={cn(\n "group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",\n className,\n )}\n {...props}\n />\n )\n}\n\nconst fieldVariants = cva("group/field flex w-full gap-3 data-[invalid=true]:text-destructive", {\n variants: {\n orientation: {\n vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],\n horizontal: [\n "flex-row items-center",\n "[&>[data-slot=field-label]]:flex-auto",\n "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",\n ],\n responsive: [\n "flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",\n "@md/field-group:[&>[data-slot=field-label]]:flex-auto",\n "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",\n ],\n },\n },\n defaultVariants: {\n orientation: "vertical",\n },\n})\n\nfunction Field({\n className,\n orientation = "vertical",\n ...props\n}: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>) {\n return (\n <div\n role="group"\n data-slot="field"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n )\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<"div">) {\n return (\n <div\n data-slot="field-content"\n className={cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className)}\n {...props}\n />\n )\n}\n\nfunction FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>) {\n return (\n <Label\n data-slot="field-label"\n className={cn(\n "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",\n "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4",\n "has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<"div">) {\n return (\n <div\n data-slot="field-label"\n className={cn(\n "flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<"p">) {\n return (\n <p\n data-slot="field-description"\n className={cn(\n "text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance",\n "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",\n "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentProps<"div"> & {\n children?: React.ReactNode\n}) {\n return (\n <div\n data-slot="field-separator"\n data-content={!!children}\n className={cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className)}\n {...props}\n >\n <Separator className="absolute inset-0 top-1/2" />\n {children && (\n <span\n className="relative mx-auto block w-fit bg-background px-2 text-muted-foreground"\n data-slot="field-separator-content"\n >\n {children}\n </span>\n )}\n </div>\n )\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<"div"> & {\n errors?: Array<{ message?: string } | undefined>\n}) {\n const content = useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()]\n\n if (uniqueErrors?.length == 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n <ul className="ml-4 flex list-disc flex-col gap-1">\n {uniqueErrors.map((error, index) => error?.message && <li key={index}>{error.message}</li>)}\n </ul>\n )\n }, [children, errors])\n\n if (!content) {\n return null\n }\n\n return (\n <div\n role="alert"\n data-slot="field-error"\n className={cn("text-sm font-normal text-destructive", className)}\n {...props}\n >\n {content}\n </div>\n )\n}\n\nexport {\n Field,\n FieldContent,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldTitle,\n}\n',
|
|
12737
|
+
"ui/file-upload.tsx": '"use client"\n\nimport { FileIcon, UploadCloudIcon, XIcon } from "lucide-react"\nimport * as React from "react"\n\nimport { Button } from "@/components/ui/button"\nimport { cn } from "@/lib/utils"\n\ninterface FileUploadProps {\n value?: File[]\n onChange?: (files: File[]) => void\n accept?: string\n multiple?: boolean\n maxFiles?: number\n maxSize?: number\n disabled?: boolean\n className?: string\n}\n\nfunction formatFileSize(bytes: number): string {\n if (bytes < 1024) return `${bytes} B`\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`\n}\n\nfunction FileUpload({\n value = [],\n onChange,\n accept,\n multiple = false,\n maxFiles = 10,\n maxSize,\n disabled = false,\n className,\n}: FileUploadProps) {\n const [dragActive, setDragActive] = React.useState(false)\n const inputRef = React.useRef<HTMLInputElement>(null)\n\n const handleFiles = React.useCallback(\n (fileList: FileList) => {\n let files = Array.from(fileList)\n\n if (maxSize) {\n files = files.filter((f) => f.size <= maxSize)\n }\n\n if (!multiple) {\n files = files.slice(0, 1)\n }\n\n const newFiles = multiple ? [...value, ...files].slice(0, maxFiles) : files\n onChange?.(newFiles)\n },\n [value, onChange, multiple, maxFiles, maxSize],\n )\n\n const handleDrop = React.useCallback(\n (e: React.DragEvent) => {\n e.preventDefault()\n e.stopPropagation()\n setDragActive(false)\n if (disabled) return\n if (e.dataTransfer.files?.length) {\n handleFiles(e.dataTransfer.files)\n }\n },\n [disabled, handleFiles],\n )\n\n const handleDragOver = React.useCallback(\n (e: React.DragEvent) => {\n e.preventDefault()\n e.stopPropagation()\n if (!disabled) setDragActive(true)\n },\n [disabled],\n )\n\n const handleDragLeave = React.useCallback((e: React.DragEvent) => {\n e.preventDefault()\n e.stopPropagation()\n setDragActive(false)\n }, [])\n\n const removeFile = React.useCallback(\n (index: number) => {\n const newFiles = value.filter((_, i) => i !== index)\n onChange?.(newFiles)\n },\n [value, onChange],\n )\n\n return (\n <div data-slot="file-upload" className={cn("space-y-3", className)}>\n <div\n data-slot="file-upload-dropzone"\n data-drag-active={dragActive}\n className={cn(\n "flex cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-8 text-center transition-colors",\n dragActive\n ? "border-ring bg-accent/50"\n : "border-input hover:border-ring/50 hover:bg-accent/20",\n disabled && "pointer-events-none opacity-50",\n )}\n onDrop={handleDrop}\n onDragOver={handleDragOver}\n onDragLeave={handleDragLeave}\n onClick={() => inputRef.current?.click()}\n >\n <UploadCloudIcon className="size-10 text-muted-foreground" />\n <div className="space-y-1">\n <p className="text-sm font-medium">\n Drop files here or <span className="text-primary underline">browse</span>\n </p>\n <p className="text-xs text-muted-foreground">\n {accept ? `Accepted: ${accept}` : "Any file type"}\n {maxSize && ` (max ${formatFileSize(maxSize)})`}\n </p>\n </div>\n <input\n ref={inputRef}\n type="file"\n accept={accept}\n multiple={multiple}\n disabled={disabled}\n className="hidden"\n onChange={(e) => {\n if (e.target.files?.length) {\n handleFiles(e.target.files)\n e.target.value = ""\n }\n }}\n />\n </div>\n\n {value.length > 0 && (\n <ul data-slot="file-upload-list" className="space-y-2">\n {value.map((file, index) => (\n <li\n key={`${file.name}-${index}`}\n data-slot="file-upload-item"\n className="flex items-center gap-3 rounded-md border bg-card p-2 text-sm"\n >\n <FileIcon className="size-4 shrink-0 text-muted-foreground" />\n <div className="min-w-0 flex-1">\n <p className="truncate font-medium">{file.name}</p>\n <p className="text-xs text-muted-foreground">{formatFileSize(file.size)}</p>\n </div>\n <Button\n variant="ghost"\n size="icon-xs"\n onClick={(e) => {\n e.stopPropagation()\n removeFile(index)\n }}\n >\n <XIcon />\n </Button>\n </li>\n ))}\n </ul>\n )}\n </div>\n )\n}\n\nexport { FileUpload }\nexport type { FileUploadProps }\n',
|
|
12542
12738
|
"ui/form.tsx": '"use client"\n\nimport type { Label as LabelPrimitive } from "radix-ui"\nimport { Slot } from "radix-ui"\nimport * as React from "react"\nimport {\n Controller,\n FormProvider,\n useFormContext,\n useFormState,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from "react-hook-form"\n\nimport { Label } from "@/components/ui/label"\nimport { cn } from "@/lib/utils"\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue)\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState } = useFormContext()\n const formState = useFormState({ name: fieldContext.name })\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error("useFormField should be used within <FormField>")\n }\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue)\n\nfunction FormItem({ className, ...props }: React.ComponentProps<"div">) {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div data-slot="form-item" className={cn("grid gap-2", className)} {...props} />\n </FormItemContext.Provider>\n )\n}\n\nfunction FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField()\n\n return (\n <Label\n data-slot="form-label"\n data-error={!!error}\n className={cn("data-[error=true]:text-destructive", className)}\n htmlFor={formItemId}\n {...props}\n />\n )\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot.Root>) {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n\n return (\n <Slot.Root\n data-slot="form-control"\n id={formItemId}\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n )\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<"p">) {\n const { formDescriptionId } = useFormField()\n\n return (\n <p\n data-slot="form-description"\n id={formDescriptionId}\n className={cn("text-sm text-muted-foreground", className)}\n {...props}\n />\n )\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<"p">) {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message ?? "") : props.children\n\n if (!body) {\n return null\n }\n\n return (\n <p data-slot="form-message" id={formMessageId} className={cn("text-sm text-destructive", className)} {...props}>\n {body}\n </p>\n )\n}\n\nexport { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField }\n',
|
|
12543
12739
|
"ui/hover-card.tsx": '"use client"\n\nimport { HoverCard as HoverCardPrimitive } from "radix-ui"\nimport * as React from "react"\n\nimport { cn } from "@/lib/utils"\n\nfunction HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>) {\n return <HoverCardPrimitive.Root data-slot="hover-card" {...props} />\n}\n\nfunction HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {\n return <HoverCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />\n}\n\nfunction HoverCardContent({\n className,\n align = "center",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Content>) {\n return (\n <HoverCardPrimitive.Portal data-slot="hover-card-portal">\n <HoverCardPrimitive.Content\n data-slot="hover-card-content"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n "z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",\n className,\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n )\n}\n\nexport { HoverCard, HoverCardContent, HoverCardTrigger }\n',
|
|
12544
12740
|
"ui/input-group.tsx": `"use client"
|
|
@@ -13433,6 +13629,7 @@ export {
|
|
|
13433
13629
|
"ui/slider.tsx": '"use client"\n\nimport { Slider as SliderPrimitive } from "radix-ui"\nimport * as React from "react"\n\nimport { cn } from "@/lib/utils"\n\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n ...props\n}: React.ComponentProps<typeof SliderPrimitive.Root>) {\n const _values = React.useMemo(\n () => (Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max]),\n [value, defaultValue, min, max],\n )\n\n return (\n <SliderPrimitive.Root\n data-slot="slider"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",\n className,\n )}\n {...props}\n >\n <SliderPrimitive.Track\n data-slot="slider-track"\n className={cn(\n "relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5",\n )}\n >\n <SliderPrimitive.Range\n data-slot="slider-range"\n className={cn("absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")}\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot="slider-thumb"\n key={index}\n className="block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"\n />\n ))}\n </SliderPrimitive.Root>\n )\n}\n\nexport { Slider }\n',
|
|
13434
13630
|
"ui/sonner.tsx": '"use client"\n\nimport { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon } from "lucide-react"\nimport { useTheme } from "next-themes"\nimport { Toaster as Sonner, type ToasterProps } from "sonner"\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n const { theme = "system" } = useTheme()\n\n return (\n <Sonner\n theme={theme as ToasterProps["theme"]}\n className="toaster group"\n icons={{\n success: <CircleCheckIcon className="size-4" />,\n info: <InfoIcon className="size-4" />,\n warning: <TriangleAlertIcon className="size-4" />,\n error: <OctagonXIcon className="size-4" />,\n loading: <Loader2Icon className="size-4 animate-spin" />,\n }}\n style={\n {\n "--normal-bg": "var(--popover)",\n "--normal-text": "var(--popover-foreground)",\n "--normal-border": "var(--border)",\n "--border-radius": "var(--radius)",\n } as React.CSSProperties\n }\n {...props}\n />\n )\n}\n\nexport { Toaster }\n',
|
|
13435
13631
|
"ui/spinner.tsx": 'import { Loader2Icon } from "lucide-react"\n\nimport { cn } from "@/lib/utils"\n\nfunction Spinner({ className, ...props }: React.ComponentProps<"svg">) {\n return <Loader2Icon role="status" aria-label="Loading" className={cn("size-4 animate-spin", className)} {...props} />\n}\n\nexport { Spinner }\n',
|
|
13632
|
+
"ui/stepper.tsx": '"use client"\n\nimport { CheckIcon } from "lucide-react"\nimport * as React from "react"\n\nimport { cn } from "@/lib/utils"\n\ninterface StepperProps {\n activeStep: number\n children: React.ReactNode\n orientation?: "horizontal" | "vertical"\n className?: string\n}\n\nfunction Stepper({ activeStep, children, orientation = "horizontal", className }: StepperProps) {\n const steps = React.Children.toArray(children)\n\n return (\n <div\n data-slot="stepper"\n data-orientation={orientation}\n className={cn(\n "flex gap-2",\n orientation === "horizontal" ? "flex-row items-center" : "flex-col",\n className,\n )}\n >\n {steps.map((step, index) => (\n <React.Fragment key={index}>\n {React.isValidElement<StepProps>(step) &&\n React.cloneElement(step, {\n stepIndex: index,\n isActive: index === activeStep,\n isCompleted: index < activeStep,\n isLast: index === steps.length - 1,\n orientation,\n })}\n {index < steps.length - 1 && (\n <div\n data-slot="stepper-separator"\n data-completed={index < activeStep}\n className={cn(\n "transition-colors",\n orientation === "horizontal"\n ? "h-0.5 flex-1 rounded-full"\n : "ml-4 w-0.5 self-stretch rounded-full min-h-8",\n index < activeStep ? "bg-primary" : "bg-border",\n )}\n />\n )}\n </React.Fragment>\n ))}\n </div>\n )\n}\n\ninterface StepProps {\n title: string\n description?: string\n icon?: React.ReactNode\n /** Injected by Stepper */\n stepIndex?: number\n isActive?: boolean\n isCompleted?: boolean\n isLast?: boolean\n orientation?: "horizontal" | "vertical"\n}\n\nfunction Step({\n title,\n description,\n icon,\n stepIndex = 0,\n isActive = false,\n isCompleted = false,\n orientation = "horizontal",\n}: StepProps) {\n return (\n <div\n data-slot="step"\n data-active={isActive}\n data-completed={isCompleted}\n className={cn(\n "flex items-center gap-3",\n orientation === "horizontal" ? "flex-row" : "flex-row",\n )}\n >\n <div\n data-slot="step-indicator"\n className={cn(\n "flex size-8 shrink-0 items-center justify-center rounded-full border-2 text-sm font-medium transition-colors",\n isCompleted\n ? "border-primary bg-primary text-primary-foreground"\n : isActive\n ? "border-primary text-primary"\n : "border-muted-foreground/30 text-muted-foreground",\n )}\n >\n {isCompleted ? <CheckIcon className="size-4" /> : icon ?? stepIndex + 1}\n </div>\n <div data-slot="step-content" className="space-y-0.5">\n <p\n className={cn(\n "text-sm font-medium leading-none",\n isActive || isCompleted ? "text-foreground" : "text-muted-foreground",\n )}\n >\n {title}\n </p>\n {description && (\n <p className="text-xs text-muted-foreground">{description}</p>\n )}\n </div>\n </div>\n )\n}\n\nexport { Stepper, Step }\nexport type { StepperProps, StepProps }\n',
|
|
13436
13633
|
"ui/switch.tsx": '"use client"\n\nimport { Switch as SwitchPrimitive } from "radix-ui"\nimport * as React from "react"\n\nimport { cn } from "@/lib/utils"\n\nfunction Switch({\n className,\n size = "default",\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n size?: "sm" | "default"\n}) {\n return (\n <SwitchPrimitive.Root\n data-slot="switch"\n data-size={size}\n className={cn(\n "peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot="switch-thumb"\n className={cn(\n "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground",\n )}\n />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch }\n',
|
|
13437
13634
|
"ui/table.tsx": '"use client"\n\nimport * as React from "react"\n\nimport { cn } from "@/lib/utils"\n\nfunction Table({ className, ...props }: React.ComponentProps<"table">) {\n return (\n <div data-slot="table-container" className="relative w-full overflow-x-auto">\n <table data-slot="table" className={cn("w-full caption-bottom text-sm", className)} {...props} />\n </div>\n )\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<"thead">) {\n return <thead data-slot="table-header" className={cn("[&_tr]:border-b", className)} {...props} />\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<"tbody">) {\n return <tbody data-slot="table-body" className={cn("[&_tr:last-child]:border-0", className)} {...props} />\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {\n return (\n <tfoot\n data-slot="table-footer"\n className={cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className)}\n {...props}\n />\n )\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<"tr">) {\n return (\n <tr\n data-slot="table-row"\n className={cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className)}\n {...props}\n />\n )\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<"th">) {\n return (\n <th\n data-slot="table-head"\n className={cn(\n "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<"td">) {\n return (\n <td\n data-slot="table-cell"\n className={cn(\n "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<"caption">) {\n return (\n <caption data-slot="table-caption" className={cn("mt-4 text-sm text-muted-foreground", className)} {...props} />\n )\n}\n\nexport { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow }\n',
|
|
13438
13635
|
"ui/tabs.tsx": `"use client"
|
|
@@ -13508,6 +13705,7 @@ function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPr
|
|
|
13508
13705
|
export { Tabs, TabsContent, TabsList, tabsListVariants, TabsTrigger }
|
|
13509
13706
|
`,
|
|
13510
13707
|
"ui/textarea.tsx": 'import * as React from "react"\n\nimport { cn } from "@/lib/utils"\n\nfunction Textarea({ className, ...props }: React.ComponentProps<"textarea">) {\n return (\n <textarea\n data-slot="textarea"\n className={cn(\n "flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",\n className,\n )}\n {...props}\n />\n )\n}\n\nexport { Textarea }\n',
|
|
13708
|
+
"ui/timeline.tsx": 'import * as React from "react"\n\nimport { cn } from "@/lib/utils"\n\nfunction Timeline({ className, children, ...props }: React.ComponentProps<"div">) {\n return (\n <div data-slot="timeline" className={cn("relative space-y-0", className)} {...props}>\n {children}\n </div>\n )\n}\n\nfunction TimelineItem({ className, children, ...props }: React.ComponentProps<"div">) {\n return (\n <div\n data-slot="timeline-item"\n className={cn("relative flex gap-4 pb-8 last:pb-0", className)}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nfunction TimelineIndicator({\n className,\n children,\n ...props\n}: React.ComponentProps<"div">) {\n return (\n <div\n data-slot="timeline-indicator"\n className={cn(\n "relative z-10 flex size-8 shrink-0 items-center justify-center rounded-full border-2 border-border bg-background text-muted-foreground",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nfunction TimelineConnector({ className, ...props }: React.ComponentProps<"div">) {\n return (\n <div\n data-slot="timeline-connector"\n className={cn(\n "absolute left-4 top-8 -ml-px h-[calc(100%-2rem)] w-0.5 bg-border",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction TimelineContent({ className, children, ...props }: React.ComponentProps<"div">) {\n return (\n <div\n data-slot="timeline-content"\n className={cn("flex-1 pt-0.5 pb-2", className)}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nfunction TimelineTitle({ className, ...props }: React.ComponentProps<"p">) {\n return (\n <p\n data-slot="timeline-title"\n className={cn("text-sm font-medium leading-none", className)}\n {...props}\n />\n )\n}\n\nfunction TimelineDescription({ className, ...props }: React.ComponentProps<"p">) {\n return (\n <p\n data-slot="timeline-description"\n className={cn("mt-1 text-sm text-muted-foreground", className)}\n {...props}\n />\n )\n}\n\nfunction TimelineTime({ className, ...props }: React.ComponentProps<"time">) {\n return (\n <time\n data-slot="timeline-time"\n className={cn("mt-0.5 text-xs text-muted-foreground", className)}\n {...props}\n />\n )\n}\n\nexport {\n Timeline,\n TimelineItem,\n TimelineIndicator,\n TimelineConnector,\n TimelineContent,\n TimelineTitle,\n TimelineDescription,\n TimelineTime,\n}\n',
|
|
13511
13709
|
"ui/toggle-group.tsx": '"use client"\n\nimport { type VariantProps } from "class-variance-authority"\nimport { ToggleGroup as ToggleGroupPrimitive } from "radix-ui"\nimport * as React from "react"\n\nimport { toggleVariants } from "@/components/ui/toggle"\nimport { cn } from "@/lib/utils"\n\nconst ToggleGroupContext = React.createContext<\n VariantProps<typeof toggleVariants> & {\n spacing?: number\n }\n>({\n size: "default",\n variant: "default",\n spacing: 0,\n})\n\nfunction ToggleGroup({\n className,\n variant,\n size,\n spacing = 0,\n children,\n ...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &\n VariantProps<typeof toggleVariants> & {\n spacing?: number\n }) {\n return (\n <ToggleGroupPrimitive.Root\n data-slot="toggle-group"\n data-variant={variant}\n data-size={size}\n data-spacing={spacing}\n style={{ "--gap": spacing } as React.CSSProperties}\n className={cn(\n "group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",\n className,\n )}\n {...props}\n >\n <ToggleGroupContext.Provider value={{ variant, size, spacing }}>{children}</ToggleGroupContext.Provider>\n </ToggleGroupPrimitive.Root>\n )\n}\n\nfunction ToggleGroupItem({\n className,\n children,\n variant,\n size,\n ...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>) {\n const context = React.useContext(ToggleGroupContext)\n\n return (\n <ToggleGroupPrimitive.Item\n data-slot="toggle-group-item"\n data-variant={context.variant || variant}\n data-size={context.size || size}\n data-spacing={context.spacing}\n className={cn(\n toggleVariants({\n variant: context.variant || variant,\n size: context.size || size,\n }),\n "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10",\n "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",\n className,\n )}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n )\n}\n\nexport { ToggleGroup, ToggleGroupItem }\n',
|
|
13512
13710
|
"ui/toggle.tsx": `"use client"
|
|
13513
13711
|
|
|
@@ -13551,11 +13749,12 @@ function Toggle({
|
|
|
13551
13749
|
|
|
13552
13750
|
export { Toggle, toggleVariants }
|
|
13553
13751
|
`,
|
|
13554
|
-
"ui/tooltip.tsx": '"use client"\n\nimport { Tooltip as TooltipPrimitive } from "radix-ui"\nimport * as React from "react"\n\nimport { cn } from "@/lib/utils"\n\nfunction TooltipProvider({ delayDuration = 0, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return <TooltipPrimitive.Provider data-slot="tooltip-provider" delayDuration={delayDuration} {...props} />\n}\n\nfunction Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return <TooltipPrimitive.Root data-slot="tooltip" {...props} />\n}\n\nfunction TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot="tooltip-content"\n sideOffset={sideOffset}\n className={cn(\n "z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }\n'
|
|
13752
|
+
"ui/tooltip.tsx": '"use client"\n\nimport { Tooltip as TooltipPrimitive } from "radix-ui"\nimport * as React from "react"\n\nimport { cn } from "@/lib/utils"\n\nfunction TooltipProvider({ delayDuration = 0, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return <TooltipPrimitive.Provider data-slot="tooltip-provider" delayDuration={delayDuration} {...props} />\n}\n\nfunction Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return <TooltipPrimitive.Root data-slot="tooltip" {...props} />\n}\n\nfunction TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot="tooltip-content"\n sideOffset={sideOffset}\n className={cn(\n "z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }\n',
|
|
13753
|
+
"ui/tree-view.tsx": '"use client"\n\nimport { ChevronRightIcon, FileIcon, FolderIcon, FolderOpenIcon } from "lucide-react"\nimport * as React from "react"\n\nimport { cn } from "@/lib/utils"\n\ninterface TreeNode {\n id: string\n label: string\n icon?: React.ReactNode\n children?: TreeNode[]\n}\n\ninterface TreeViewProps {\n data: TreeNode[]\n defaultExpanded?: string[]\n onSelect?: (node: TreeNode) => void\n selectedId?: string\n className?: string\n}\n\nfunction TreeView({ data, defaultExpanded = [], onSelect, selectedId, className }: TreeViewProps) {\n const [expanded, setExpanded] = React.useState<Set<string>>(new Set(defaultExpanded))\n\n const toggleExpand = React.useCallback((id: string) => {\n setExpanded((prev) => {\n const next = new Set(prev)\n if (next.has(id)) {\n next.delete(id)\n } else {\n next.add(id)\n }\n return next\n })\n }, [])\n\n return (\n <div data-slot="tree-view" role="tree" className={cn("text-sm", className)}>\n {data.map((node) => (\n <TreeItem\n key={node.id}\n node={node}\n level={0}\n expanded={expanded}\n toggleExpand={toggleExpand}\n onSelect={onSelect}\n selectedId={selectedId}\n />\n ))}\n </div>\n )\n}\n\ninterface TreeItemProps {\n node: TreeNode\n level: number\n expanded: Set<string>\n toggleExpand: (id: string) => void\n onSelect?: (node: TreeNode) => void\n selectedId?: string\n}\n\nfunction TreeItem({ node, level, expanded, toggleExpand, onSelect, selectedId }: TreeItemProps) {\n const hasChildren = node.children && node.children.length > 0\n const isExpanded = expanded.has(node.id)\n const isSelected = selectedId === node.id\n\n return (\n <div data-slot="tree-item" role="treeitem" aria-expanded={hasChildren ? isExpanded : undefined}>\n <div\n data-slot="tree-item-content"\n data-selected={isSelected}\n className={cn(\n "flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 hover:bg-accent/50",\n isSelected && "bg-accent text-accent-foreground",\n )}\n style={{ paddingLeft: `${level * 16 + 8}px` }}\n onClick={() => {\n if (hasChildren) toggleExpand(node.id)\n onSelect?.(node)\n }}\n >\n {hasChildren ? (\n <ChevronRightIcon\n className={cn(\n "size-4 shrink-0 text-muted-foreground transition-transform",\n isExpanded && "rotate-90",\n )}\n />\n ) : (\n <span className="size-4 shrink-0" />\n )}\n <span className="shrink-0">\n {node.icon ??\n (hasChildren ? (\n isExpanded ? (\n <FolderOpenIcon className="size-4 text-muted-foreground" />\n ) : (\n <FolderIcon className="size-4 text-muted-foreground" />\n )\n ) : (\n <FileIcon className="size-4 text-muted-foreground" />\n ))}\n </span>\n <span className="truncate">{node.label}</span>\n </div>\n {hasChildren && isExpanded && (\n <div role="group">\n {node.children!.map((child) => (\n <TreeItem\n key={child.id}\n node={child}\n level={level + 1}\n expanded={expanded}\n toggleExpand={toggleExpand}\n onSelect={onSelect}\n selectedId={selectedId}\n />\n ))}\n </div>\n )}\n </div>\n )\n}\n\nexport { TreeView, TreeItem }\nexport type { TreeNode, TreeViewProps }\n'
|
|
13555
13754
|
};
|
|
13556
13755
|
|
|
13557
13756
|
// src/commands/add.ts
|
|
13558
|
-
async function add(cwd, componentNames) {
|
|
13757
|
+
async function add(cwd, componentNames, opts = {}) {
|
|
13559
13758
|
const config = await readConfig(cwd);
|
|
13560
13759
|
if (!config) {
|
|
13561
13760
|
console.log(import_picocolors2.default.red("\n Error:"), "aivory-ui.json not found. Run", import_picocolors2.default.cyan("npx aivory-ui init"), "first.\n");
|
|
@@ -13594,6 +13793,15 @@ async function add(cwd, componentNames) {
|
|
|
13594
13793
|
if (resolved.hooks.length > 0) {
|
|
13595
13794
|
console.log(import_picocolors2.default.bold(" Hooks:"), resolved.hooks.join(", "));
|
|
13596
13795
|
}
|
|
13796
|
+
if (opts.dryRun) {
|
|
13797
|
+
const installed2 = getInstalledDeps(cwd);
|
|
13798
|
+
const missing2 = resolved.dependencies.filter((d) => !installed2.has(d));
|
|
13799
|
+
if (missing2.length > 0) {
|
|
13800
|
+
console.log(import_picocolors2.default.cyan("\n Would install:"), missing2.join(", "));
|
|
13801
|
+
}
|
|
13802
|
+
console.log(import_picocolors2.default.dim("\n Dry run \u2014 no files written.\n"));
|
|
13803
|
+
return;
|
|
13804
|
+
}
|
|
13597
13805
|
const hasSrcDir = await import_fs_extra4.default.pathExists(path4.join(cwd, "src"));
|
|
13598
13806
|
const files = registry_files_default;
|
|
13599
13807
|
for (const comp of resolved.components) {
|
|
@@ -13647,14 +13855,564 @@ function resolveHookPath(cwd, hooksAlias, file, hasSrcDir) {
|
|
|
13647
13855
|
return path4.join(base, fileName);
|
|
13648
13856
|
}
|
|
13649
13857
|
|
|
13858
|
+
// src/commands/remove.ts
|
|
13859
|
+
var import_fs_extra5 = __toESM(require_lib(), 1);
|
|
13860
|
+
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
13861
|
+
var import_prompts3 = __toESM(require_prompts3(), 1);
|
|
13862
|
+
import path5 from "path";
|
|
13863
|
+
async function remove(cwd, componentNames) {
|
|
13864
|
+
const config = await readConfig(cwd);
|
|
13865
|
+
if (!config) {
|
|
13866
|
+
console.log(import_picocolors3.default.red("\n Error:"), "aivory-ui.json not found. Run", import_picocolors3.default.cyan("npx aivory-ui init"), "first.\n");
|
|
13867
|
+
process.exit(1);
|
|
13868
|
+
}
|
|
13869
|
+
const registry = getRegistry();
|
|
13870
|
+
const allNames = getComponentNames();
|
|
13871
|
+
if (componentNames.length === 0) {
|
|
13872
|
+
const { selected } = await (0, import_prompts3.default)({
|
|
13873
|
+
type: "multiselect",
|
|
13874
|
+
name: "selected",
|
|
13875
|
+
message: "Select components to remove:",
|
|
13876
|
+
choices: allNames.map((name) => ({
|
|
13877
|
+
title: name,
|
|
13878
|
+
value: name
|
|
13879
|
+
}))
|
|
13880
|
+
});
|
|
13881
|
+
if (!selected || selected.length === 0) {
|
|
13882
|
+
console.log(import_picocolors3.default.yellow(" No components selected."));
|
|
13883
|
+
return;
|
|
13884
|
+
}
|
|
13885
|
+
componentNames = selected;
|
|
13886
|
+
}
|
|
13887
|
+
const invalid = componentNames.filter((n) => !registry.components[n]);
|
|
13888
|
+
if (invalid.length > 0) {
|
|
13889
|
+
console.log(import_picocolors3.default.red("\n Unknown components:"), invalid.join(", "));
|
|
13890
|
+
process.exit(1);
|
|
13891
|
+
}
|
|
13892
|
+
const hasSrcDir = await import_fs_extra5.default.pathExists(path5.join(cwd, "src"));
|
|
13893
|
+
const dependents = {};
|
|
13894
|
+
for (const [name, entry] of Object.entries(registry.components)) {
|
|
13895
|
+
if (componentNames.includes(name)) continue;
|
|
13896
|
+
const compPath = resolveComponentPath2(cwd, config.aliases.ui, entry.files[0], hasSrcDir);
|
|
13897
|
+
if (await import_fs_extra5.default.pathExists(compPath)) {
|
|
13898
|
+
for (const dep of entry.registryDependencies) {
|
|
13899
|
+
if (componentNames.includes(dep)) {
|
|
13900
|
+
if (!dependents[dep]) dependents[dep] = [];
|
|
13901
|
+
dependents[dep].push(name);
|
|
13902
|
+
}
|
|
13903
|
+
}
|
|
13904
|
+
}
|
|
13905
|
+
}
|
|
13906
|
+
if (Object.keys(dependents).length > 0) {
|
|
13907
|
+
console.log(import_picocolors3.default.yellow("\n Warning: these installed components depend on components being removed:"));
|
|
13908
|
+
for (const [comp, deps] of Object.entries(dependents)) {
|
|
13909
|
+
console.log(import_picocolors3.default.dim(` ${comp} \u2190 ${deps.join(", ")}`));
|
|
13910
|
+
}
|
|
13911
|
+
const { proceed } = await (0, import_prompts3.default)({
|
|
13912
|
+
type: "confirm",
|
|
13913
|
+
name: "proceed",
|
|
13914
|
+
message: "Continue anyway?",
|
|
13915
|
+
initial: false
|
|
13916
|
+
});
|
|
13917
|
+
if (!proceed) {
|
|
13918
|
+
console.log(import_picocolors3.default.yellow(" Aborted."));
|
|
13919
|
+
return;
|
|
13920
|
+
}
|
|
13921
|
+
}
|
|
13922
|
+
let removedCount = 0;
|
|
13923
|
+
for (const comp of componentNames) {
|
|
13924
|
+
const entry = registry.components[comp];
|
|
13925
|
+
for (const file of entry.files) {
|
|
13926
|
+
const targetPath = resolveComponentPath2(cwd, config.aliases.ui, file, hasSrcDir);
|
|
13927
|
+
if (await import_fs_extra5.default.pathExists(targetPath)) {
|
|
13928
|
+
await import_fs_extra5.default.remove(targetPath);
|
|
13929
|
+
console.log(import_picocolors3.default.red(" Removed"), path5.relative(cwd, targetPath));
|
|
13930
|
+
removedCount++;
|
|
13931
|
+
} else {
|
|
13932
|
+
console.log(import_picocolors3.default.dim(" Not found:"), path5.relative(cwd, targetPath));
|
|
13933
|
+
}
|
|
13934
|
+
}
|
|
13935
|
+
}
|
|
13936
|
+
if (removedCount === 0) {
|
|
13937
|
+
console.log(import_picocolors3.default.yellow("\n No files were removed.\n"));
|
|
13938
|
+
} else {
|
|
13939
|
+
console.log(import_picocolors3.default.green(`
|
|
13940
|
+
Removed ${removedCount} file(s).
|
|
13941
|
+
`));
|
|
13942
|
+
}
|
|
13943
|
+
}
|
|
13944
|
+
function resolveComponentPath2(cwd, uiAlias, file, hasSrcDir) {
|
|
13945
|
+
const fileName = file.replace(/^ui\//, "");
|
|
13946
|
+
const aliasDir = uiAlias.replace(/^@\//, "");
|
|
13947
|
+
const base = hasSrcDir ? path5.join(cwd, "src", aliasDir) : path5.join(cwd, aliasDir);
|
|
13948
|
+
return path5.join(base, fileName);
|
|
13949
|
+
}
|
|
13950
|
+
|
|
13951
|
+
// src/commands/diff.ts
|
|
13952
|
+
var import_fs_extra6 = __toESM(require_lib(), 1);
|
|
13953
|
+
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
13954
|
+
import path6 from "path";
|
|
13955
|
+
async function diff(cwd, componentNames) {
|
|
13956
|
+
const config = await readConfig(cwd);
|
|
13957
|
+
if (!config) {
|
|
13958
|
+
console.log(import_picocolors4.default.red("\n Error:"), "aivory-ui.json not found. Run", import_picocolors4.default.cyan("npx aivory-ui init"), "first.\n");
|
|
13959
|
+
process.exit(1);
|
|
13960
|
+
}
|
|
13961
|
+
const registry = getRegistry();
|
|
13962
|
+
const allNames = getComponentNames();
|
|
13963
|
+
if (componentNames.length === 0) {
|
|
13964
|
+
const hasSrcDir2 = await import_fs_extra6.default.pathExists(path6.join(cwd, "src"));
|
|
13965
|
+
for (const name of allNames) {
|
|
13966
|
+
const entry = registry.components[name];
|
|
13967
|
+
const targetPath = resolveComponentPath3(cwd, config.aliases.ui, entry.files[0], hasSrcDir2);
|
|
13968
|
+
if (await import_fs_extra6.default.pathExists(targetPath)) {
|
|
13969
|
+
componentNames.push(name);
|
|
13970
|
+
}
|
|
13971
|
+
}
|
|
13972
|
+
}
|
|
13973
|
+
if (componentNames.length === 0) {
|
|
13974
|
+
console.log(import_picocolors4.default.yellow("\n No installed components found.\n"));
|
|
13975
|
+
return;
|
|
13976
|
+
}
|
|
13977
|
+
const files = registry_files_default;
|
|
13978
|
+
const hasSrcDir = await import_fs_extra6.default.pathExists(path6.join(cwd, "src"));
|
|
13979
|
+
let hasChanges = false;
|
|
13980
|
+
for (const comp of componentNames) {
|
|
13981
|
+
const entry = registry.components[comp];
|
|
13982
|
+
if (!entry) {
|
|
13983
|
+
console.log(import_picocolors4.default.red(" Unknown component:"), comp);
|
|
13984
|
+
continue;
|
|
13985
|
+
}
|
|
13986
|
+
for (const file of entry.files) {
|
|
13987
|
+
const source = files[file];
|
|
13988
|
+
if (!source) continue;
|
|
13989
|
+
const transformed = transformImports(source, config);
|
|
13990
|
+
const targetPath = resolveComponentPath3(cwd, config.aliases.ui, file, hasSrcDir);
|
|
13991
|
+
if (!await import_fs_extra6.default.pathExists(targetPath)) {
|
|
13992
|
+
console.log(import_picocolors4.default.yellow(`
|
|
13993
|
+
${comp}:`), "not installed");
|
|
13994
|
+
continue;
|
|
13995
|
+
}
|
|
13996
|
+
const local = await import_fs_extra6.default.readFile(targetPath, "utf-8");
|
|
13997
|
+
if (local === transformed) {
|
|
13998
|
+
console.log(import_picocolors4.default.green(` ${comp}:`), "up to date");
|
|
13999
|
+
} else {
|
|
14000
|
+
hasChanges = true;
|
|
14001
|
+
console.log(import_picocolors4.default.yellow(`
|
|
14002
|
+
${comp}:`), "has changes");
|
|
14003
|
+
showSimpleDiff(local, transformed);
|
|
14004
|
+
}
|
|
14005
|
+
}
|
|
14006
|
+
}
|
|
14007
|
+
if (!hasChanges) {
|
|
14008
|
+
console.log(import_picocolors4.default.green("\n All components are up to date.\n"));
|
|
14009
|
+
} else {
|
|
14010
|
+
console.log(import_picocolors4.default.dim("\n Run"), import_picocolors4.default.cyan("npx aivory-ui add <component>"), import_picocolors4.default.dim("to update.\n"));
|
|
14011
|
+
}
|
|
14012
|
+
}
|
|
14013
|
+
function showSimpleDiff(local, registry) {
|
|
14014
|
+
const localLines = local.split("\n");
|
|
14015
|
+
const registryLines = registry.split("\n");
|
|
14016
|
+
const maxLines = Math.max(localLines.length, registryLines.length);
|
|
14017
|
+
let diffCount = 0;
|
|
14018
|
+
for (let i = 0; i < maxLines; i++) {
|
|
14019
|
+
const l = localLines[i];
|
|
14020
|
+
const r = registryLines[i];
|
|
14021
|
+
if (l !== r) {
|
|
14022
|
+
diffCount++;
|
|
14023
|
+
if (diffCount <= 20) {
|
|
14024
|
+
if (l !== void 0 && r === void 0) {
|
|
14025
|
+
console.log(import_picocolors4.default.red(` - L${i + 1}: ${l.trim()}`));
|
|
14026
|
+
} else if (l === void 0 && r !== void 0) {
|
|
14027
|
+
console.log(import_picocolors4.default.green(` + L${i + 1}: ${r.trim()}`));
|
|
14028
|
+
} else {
|
|
14029
|
+
console.log(import_picocolors4.default.red(` - L${i + 1}: ${l.trim()}`));
|
|
14030
|
+
console.log(import_picocolors4.default.green(` + L${i + 1}: ${r.trim()}`));
|
|
14031
|
+
}
|
|
14032
|
+
}
|
|
14033
|
+
}
|
|
14034
|
+
}
|
|
14035
|
+
if (diffCount > 20) {
|
|
14036
|
+
console.log(import_picocolors4.default.dim(` ... and ${diffCount - 20} more line(s) changed`));
|
|
14037
|
+
}
|
|
14038
|
+
}
|
|
14039
|
+
function resolveComponentPath3(cwd, uiAlias, file, hasSrcDir) {
|
|
14040
|
+
const fileName = file.replace(/^ui\//, "");
|
|
14041
|
+
const aliasDir = uiAlias.replace(/^@\//, "");
|
|
14042
|
+
const base = hasSrcDir ? path6.join(cwd, "src", aliasDir) : path6.join(cwd, aliasDir);
|
|
14043
|
+
return path6.join(base, fileName);
|
|
14044
|
+
}
|
|
14045
|
+
|
|
14046
|
+
// src/commands/doctor.ts
|
|
14047
|
+
var import_fs_extra7 = __toESM(require_lib(), 1);
|
|
14048
|
+
var import_picocolors5 = __toESM(require_picocolors(), 1);
|
|
14049
|
+
import path7 from "path";
|
|
14050
|
+
async function doctor(cwd) {
|
|
14051
|
+
console.log(import_picocolors5.default.bold("\n aivory-ui doctor\n"));
|
|
14052
|
+
let issues = 0;
|
|
14053
|
+
let warnings = 0;
|
|
14054
|
+
const configPath = getConfigPath(cwd);
|
|
14055
|
+
if (!await import_fs_extra7.default.pathExists(configPath)) {
|
|
14056
|
+
console.log(import_picocolors5.default.red(" \u2717"), "aivory-ui.json not found");
|
|
14057
|
+
console.log(import_picocolors5.default.dim(" Run"), import_picocolors5.default.cyan("npx aivory-ui init"), import_picocolors5.default.dim("to set up your project.\n"));
|
|
14058
|
+
return;
|
|
14059
|
+
}
|
|
14060
|
+
console.log(import_picocolors5.default.green(" \u2713"), "aivory-ui.json found");
|
|
14061
|
+
const config = await readConfig(cwd);
|
|
14062
|
+
if (!config) {
|
|
14063
|
+
console.log(import_picocolors5.default.red(" \u2717"), "Failed to parse aivory-ui.json");
|
|
14064
|
+
return;
|
|
14065
|
+
}
|
|
14066
|
+
if (!config.aliases?.ui || !config.aliases?.utils || !config.aliases?.hooks) {
|
|
14067
|
+
console.log(import_picocolors5.default.red(" \u2717"), "Missing alias configuration");
|
|
14068
|
+
issues++;
|
|
14069
|
+
} else {
|
|
14070
|
+
console.log(import_picocolors5.default.green(" \u2713"), "Aliases configured");
|
|
14071
|
+
}
|
|
14072
|
+
const cssPath = path7.join(cwd, config.css);
|
|
14073
|
+
if (!await import_fs_extra7.default.pathExists(cssPath)) {
|
|
14074
|
+
console.log(import_picocolors5.default.red(" \u2717"), `CSS file not found: ${config.css}`);
|
|
14075
|
+
issues++;
|
|
14076
|
+
} else {
|
|
14077
|
+
const css = await import_fs_extra7.default.readFile(cssPath, "utf-8");
|
|
14078
|
+
if (!css.includes("--color-primary")) {
|
|
14079
|
+
console.log(import_picocolors5.default.yellow(" !"), `CSS file exists but missing theme variables: ${config.css}`);
|
|
14080
|
+
warnings++;
|
|
14081
|
+
} else {
|
|
14082
|
+
console.log(import_picocolors5.default.green(" \u2713"), `Theme CSS: ${config.css}`);
|
|
14083
|
+
}
|
|
14084
|
+
}
|
|
14085
|
+
const hasSrcDir = await import_fs_extra7.default.pathExists(path7.join(cwd, "src"));
|
|
14086
|
+
const utilsDir = config.aliases.utils.replace(/^@\//, "");
|
|
14087
|
+
const utilsPath = hasSrcDir ? path7.join(cwd, "src", utilsDir + ".ts") : path7.join(cwd, utilsDir + ".ts");
|
|
14088
|
+
if (!await import_fs_extra7.default.pathExists(utilsPath)) {
|
|
14089
|
+
console.log(import_picocolors5.default.red(" \u2717"), `Utils file not found: ${utilsDir}.ts`);
|
|
14090
|
+
issues++;
|
|
14091
|
+
} else {
|
|
14092
|
+
const utils = await import_fs_extra7.default.readFile(utilsPath, "utf-8");
|
|
14093
|
+
if (!utils.includes("export function cn(")) {
|
|
14094
|
+
console.log(import_picocolors5.default.yellow(" !"), "Utils file missing cn() function");
|
|
14095
|
+
warnings++;
|
|
14096
|
+
} else {
|
|
14097
|
+
console.log(import_picocolors5.default.green(" \u2713"), "cn() utility found");
|
|
14098
|
+
}
|
|
14099
|
+
}
|
|
14100
|
+
const installed = getInstalledDeps(cwd);
|
|
14101
|
+
const requiredPeers = ["react", "tailwindcss"];
|
|
14102
|
+
for (const peer of requiredPeers) {
|
|
14103
|
+
if (installed.has(peer)) {
|
|
14104
|
+
console.log(import_picocolors5.default.green(" \u2713"), `${peer} installed`);
|
|
14105
|
+
} else {
|
|
14106
|
+
console.log(import_picocolors5.default.yellow(" !"), `${peer} not found in package.json`);
|
|
14107
|
+
warnings++;
|
|
14108
|
+
}
|
|
14109
|
+
}
|
|
14110
|
+
const baseDeps = ["clsx", "tailwind-merge", "class-variance-authority"];
|
|
14111
|
+
const missingBase = baseDeps.filter((d) => !installed.has(d));
|
|
14112
|
+
if (missingBase.length > 0) {
|
|
14113
|
+
console.log(import_picocolors5.default.red(" \u2717"), "Missing base dependencies:", missingBase.join(", "));
|
|
14114
|
+
issues++;
|
|
14115
|
+
} else {
|
|
14116
|
+
console.log(import_picocolors5.default.green(" \u2713"), "Base dependencies installed");
|
|
14117
|
+
}
|
|
14118
|
+
const registry = getRegistry();
|
|
14119
|
+
const allNames = getComponentNames();
|
|
14120
|
+
const installedComponents = [];
|
|
14121
|
+
for (const name of allNames) {
|
|
14122
|
+
const entry = registry.components[name];
|
|
14123
|
+
const compPath = resolveComponentPath4(cwd, config.aliases.ui, entry.files[0], hasSrcDir);
|
|
14124
|
+
if (await import_fs_extra7.default.pathExists(compPath)) {
|
|
14125
|
+
installedComponents.push(name);
|
|
14126
|
+
}
|
|
14127
|
+
}
|
|
14128
|
+
console.log(import_picocolors5.default.green(" \u2713"), `${installedComponents.length} component(s) installed`);
|
|
14129
|
+
const requiredNpmDeps = /* @__PURE__ */ new Set();
|
|
14130
|
+
for (const name of installedComponents) {
|
|
14131
|
+
const entry = registry.components[name];
|
|
14132
|
+
for (const dep of entry.dependencies) {
|
|
14133
|
+
requiredNpmDeps.add(dep);
|
|
14134
|
+
}
|
|
14135
|
+
}
|
|
14136
|
+
const missingNpm = Array.from(requiredNpmDeps).filter((d) => !installed.has(d));
|
|
14137
|
+
if (missingNpm.length > 0) {
|
|
14138
|
+
console.log(import_picocolors5.default.yellow(" !"), "Missing component dependencies:", missingNpm.join(", "));
|
|
14139
|
+
console.log(import_picocolors5.default.dim(" Run"), import_picocolors5.default.cyan(`npm install ${missingNpm.join(" ")}`));
|
|
14140
|
+
warnings++;
|
|
14141
|
+
}
|
|
14142
|
+
for (const name of installedComponents) {
|
|
14143
|
+
const entry = registry.components[name];
|
|
14144
|
+
for (const dep of entry.registryDependencies) {
|
|
14145
|
+
if (!installedComponents.includes(dep)) {
|
|
14146
|
+
console.log(import_picocolors5.default.yellow(" !"), `${name} depends on ${dep} which is not installed`);
|
|
14147
|
+
warnings++;
|
|
14148
|
+
}
|
|
14149
|
+
}
|
|
14150
|
+
}
|
|
14151
|
+
console.log("");
|
|
14152
|
+
if (issues === 0 && warnings === 0) {
|
|
14153
|
+
console.log(import_picocolors5.default.green(" Everything looks good!\n"));
|
|
14154
|
+
} else {
|
|
14155
|
+
if (issues > 0) console.log(import_picocolors5.default.red(` ${issues} issue(s)`));
|
|
14156
|
+
if (warnings > 0) console.log(import_picocolors5.default.yellow(` ${warnings} warning(s)`));
|
|
14157
|
+
console.log("");
|
|
14158
|
+
}
|
|
14159
|
+
}
|
|
14160
|
+
function resolveComponentPath4(cwd, uiAlias, file, hasSrcDir) {
|
|
14161
|
+
const fileName = file.replace(/^ui\//, "");
|
|
14162
|
+
const aliasDir = uiAlias.replace(/^@\//, "");
|
|
14163
|
+
const base = hasSrcDir ? path7.join(cwd, "src", aliasDir) : path7.join(cwd, aliasDir);
|
|
14164
|
+
return path7.join(base, fileName);
|
|
14165
|
+
}
|
|
14166
|
+
|
|
14167
|
+
// src/commands/theme.ts
|
|
14168
|
+
var import_fs_extra8 = __toESM(require_lib(), 1);
|
|
14169
|
+
var import_picocolors6 = __toESM(require_picocolors(), 1);
|
|
14170
|
+
var import_prompts4 = __toESM(require_prompts3(), 1);
|
|
14171
|
+
import path8 from "path";
|
|
14172
|
+
var PRESETS = {
|
|
14173
|
+
earth: {
|
|
14174
|
+
light: {
|
|
14175
|
+
background: "#f5f0e4",
|
|
14176
|
+
foreground: "#1a1612",
|
|
14177
|
+
primary: "#1e3a5f",
|
|
14178
|
+
"primary-foreground": "#ffffff",
|
|
14179
|
+
secondary: "#ede8dc",
|
|
14180
|
+
"secondary-foreground": "#1a1612",
|
|
14181
|
+
muted: "#ede8dc",
|
|
14182
|
+
"muted-foreground": "#6b5e45",
|
|
14183
|
+
accent: "#c4a23e",
|
|
14184
|
+
"accent-foreground": "#ffffff",
|
|
14185
|
+
card: "#fffdf7",
|
|
14186
|
+
"card-foreground": "#1a1612",
|
|
14187
|
+
popover: "#fffdf7",
|
|
14188
|
+
"popover-foreground": "#1a1612",
|
|
14189
|
+
border: "#d6cdb8",
|
|
14190
|
+
input: "#d6cdb8",
|
|
14191
|
+
ring: "#c4a23e",
|
|
14192
|
+
destructive: "oklch(0.577 0.245 27.325)"
|
|
14193
|
+
},
|
|
14194
|
+
dark: {
|
|
14195
|
+
background: "oklch(0.145 0 0)",
|
|
14196
|
+
foreground: "oklch(0.985 0 0)",
|
|
14197
|
+
primary: "oklch(0.922 0 0)",
|
|
14198
|
+
"primary-foreground": "oklch(0.205 0 0)",
|
|
14199
|
+
secondary: "oklch(0.269 0 0)",
|
|
14200
|
+
"secondary-foreground": "oklch(0.985 0 0)",
|
|
14201
|
+
muted: "oklch(0.269 0 0)",
|
|
14202
|
+
"muted-foreground": "oklch(0.708 0 0)",
|
|
14203
|
+
accent: "oklch(0.269 0 0)",
|
|
14204
|
+
"accent-foreground": "oklch(0.985 0 0)",
|
|
14205
|
+
card: "oklch(0.205 0 0)",
|
|
14206
|
+
"card-foreground": "oklch(0.985 0 0)",
|
|
14207
|
+
popover: "oklch(0.205 0 0)",
|
|
14208
|
+
"popover-foreground": "oklch(0.985 0 0)",
|
|
14209
|
+
border: "oklch(1 0 0 / 10%)",
|
|
14210
|
+
input: "oklch(1 0 0 / 15%)",
|
|
14211
|
+
ring: "oklch(0.556 0 0)",
|
|
14212
|
+
destructive: "oklch(0.704 0.191 22.216)"
|
|
14213
|
+
}
|
|
14214
|
+
},
|
|
14215
|
+
slate: {
|
|
14216
|
+
light: {
|
|
14217
|
+
background: "#f8fafc",
|
|
14218
|
+
foreground: "#0f172a",
|
|
14219
|
+
primary: "#0f172a",
|
|
14220
|
+
"primary-foreground": "#f8fafc",
|
|
14221
|
+
secondary: "#f1f5f9",
|
|
14222
|
+
"secondary-foreground": "#0f172a",
|
|
14223
|
+
muted: "#f1f5f9",
|
|
14224
|
+
"muted-foreground": "#64748b",
|
|
14225
|
+
accent: "#3b82f6",
|
|
14226
|
+
"accent-foreground": "#ffffff",
|
|
14227
|
+
card: "#ffffff",
|
|
14228
|
+
"card-foreground": "#0f172a",
|
|
14229
|
+
popover: "#ffffff",
|
|
14230
|
+
"popover-foreground": "#0f172a",
|
|
14231
|
+
border: "#e2e8f0",
|
|
14232
|
+
input: "#e2e8f0",
|
|
14233
|
+
ring: "#3b82f6",
|
|
14234
|
+
destructive: "#ef4444"
|
|
14235
|
+
},
|
|
14236
|
+
dark: {
|
|
14237
|
+
background: "#020617",
|
|
14238
|
+
foreground: "#f8fafc",
|
|
14239
|
+
primary: "#f8fafc",
|
|
14240
|
+
"primary-foreground": "#0f172a",
|
|
14241
|
+
secondary: "#1e293b",
|
|
14242
|
+
"secondary-foreground": "#f8fafc",
|
|
14243
|
+
muted: "#1e293b",
|
|
14244
|
+
"muted-foreground": "#94a3b8",
|
|
14245
|
+
accent: "#1e293b",
|
|
14246
|
+
"accent-foreground": "#f8fafc",
|
|
14247
|
+
card: "#020617",
|
|
14248
|
+
"card-foreground": "#f8fafc",
|
|
14249
|
+
popover: "#020617",
|
|
14250
|
+
"popover-foreground": "#f8fafc",
|
|
14251
|
+
border: "#1e293b",
|
|
14252
|
+
input: "#1e293b",
|
|
14253
|
+
ring: "#3b82f6",
|
|
14254
|
+
destructive: "#ef4444"
|
|
14255
|
+
}
|
|
14256
|
+
},
|
|
14257
|
+
forest: {
|
|
14258
|
+
light: {
|
|
14259
|
+
background: "#f5f7f2",
|
|
14260
|
+
foreground: "#1a2e1a",
|
|
14261
|
+
primary: "#2d5a27",
|
|
14262
|
+
"primary-foreground": "#ffffff",
|
|
14263
|
+
secondary: "#e8ede4",
|
|
14264
|
+
"secondary-foreground": "#1a2e1a",
|
|
14265
|
+
muted: "#e8ede4",
|
|
14266
|
+
"muted-foreground": "#4a6741",
|
|
14267
|
+
accent: "#d4a843",
|
|
14268
|
+
"accent-foreground": "#1a2e1a",
|
|
14269
|
+
card: "#fafcf8",
|
|
14270
|
+
"card-foreground": "#1a2e1a",
|
|
14271
|
+
popover: "#fafcf8",
|
|
14272
|
+
"popover-foreground": "#1a2e1a",
|
|
14273
|
+
border: "#c8d4c0",
|
|
14274
|
+
input: "#c8d4c0",
|
|
14275
|
+
ring: "#2d5a27",
|
|
14276
|
+
destructive: "#dc2626"
|
|
14277
|
+
},
|
|
14278
|
+
dark: {
|
|
14279
|
+
background: "#0f1a0f",
|
|
14280
|
+
foreground: "#e8f0e8",
|
|
14281
|
+
primary: "#6abf5e",
|
|
14282
|
+
"primary-foreground": "#0f1a0f",
|
|
14283
|
+
secondary: "#1a2e1a",
|
|
14284
|
+
"secondary-foreground": "#e8f0e8",
|
|
14285
|
+
muted: "#1a2e1a",
|
|
14286
|
+
"muted-foreground": "#8aab82",
|
|
14287
|
+
accent: "#1a2e1a",
|
|
14288
|
+
"accent-foreground": "#e8f0e8",
|
|
14289
|
+
card: "#152115",
|
|
14290
|
+
"card-foreground": "#e8f0e8",
|
|
14291
|
+
popover: "#152115",
|
|
14292
|
+
"popover-foreground": "#e8f0e8",
|
|
14293
|
+
border: "#2a3f2a",
|
|
14294
|
+
input: "#2a3f2a",
|
|
14295
|
+
ring: "#6abf5e",
|
|
14296
|
+
destructive: "#ef4444"
|
|
14297
|
+
}
|
|
14298
|
+
},
|
|
14299
|
+
rose: {
|
|
14300
|
+
light: {
|
|
14301
|
+
background: "#fdf2f4",
|
|
14302
|
+
foreground: "#1c1017",
|
|
14303
|
+
primary: "#9f1239",
|
|
14304
|
+
"primary-foreground": "#ffffff",
|
|
14305
|
+
secondary: "#fce7f3",
|
|
14306
|
+
"secondary-foreground": "#1c1017",
|
|
14307
|
+
muted: "#fce7f3",
|
|
14308
|
+
"muted-foreground": "#9d6b7d",
|
|
14309
|
+
accent: "#e11d48",
|
|
14310
|
+
"accent-foreground": "#ffffff",
|
|
14311
|
+
card: "#fffbfc",
|
|
14312
|
+
"card-foreground": "#1c1017",
|
|
14313
|
+
popover: "#fffbfc",
|
|
14314
|
+
"popover-foreground": "#1c1017",
|
|
14315
|
+
border: "#f5d0d8",
|
|
14316
|
+
input: "#f5d0d8",
|
|
14317
|
+
ring: "#e11d48",
|
|
14318
|
+
destructive: "#dc2626"
|
|
14319
|
+
},
|
|
14320
|
+
dark: {
|
|
14321
|
+
background: "#0f0608",
|
|
14322
|
+
foreground: "#fdf2f4",
|
|
14323
|
+
primary: "#fb7185",
|
|
14324
|
+
"primary-foreground": "#0f0608",
|
|
14325
|
+
secondary: "#1c1017",
|
|
14326
|
+
"secondary-foreground": "#fdf2f4",
|
|
14327
|
+
muted: "#1c1017",
|
|
14328
|
+
"muted-foreground": "#c08898",
|
|
14329
|
+
accent: "#1c1017",
|
|
14330
|
+
"accent-foreground": "#fdf2f4",
|
|
14331
|
+
card: "#150a0e",
|
|
14332
|
+
"card-foreground": "#fdf2f4",
|
|
14333
|
+
popover: "#150a0e",
|
|
14334
|
+
"popover-foreground": "#fdf2f4",
|
|
14335
|
+
border: "#2d1520",
|
|
14336
|
+
input: "#2d1520",
|
|
14337
|
+
ring: "#fb7185",
|
|
14338
|
+
destructive: "#ef4444"
|
|
14339
|
+
}
|
|
14340
|
+
}
|
|
14341
|
+
};
|
|
14342
|
+
async function theme(cwd, presetName) {
|
|
14343
|
+
const config = await readConfig(cwd);
|
|
14344
|
+
if (!config) {
|
|
14345
|
+
console.log(import_picocolors6.default.red("\n Error:"), "aivory-ui.json not found. Run", import_picocolors6.default.cyan("npx aivory-ui init"), "first.\n");
|
|
14346
|
+
process.exit(1);
|
|
14347
|
+
}
|
|
14348
|
+
console.log(import_picocolors6.default.bold("\n aivory-ui theme\n"));
|
|
14349
|
+
const presetKeys = Object.keys(PRESETS);
|
|
14350
|
+
if (!presetName) {
|
|
14351
|
+
const { selected } = await (0, import_prompts4.default)({
|
|
14352
|
+
type: "select",
|
|
14353
|
+
name: "selected",
|
|
14354
|
+
message: "Choose a theme preset:",
|
|
14355
|
+
choices: presetKeys.map((key) => ({ title: key, value: key }))
|
|
14356
|
+
});
|
|
14357
|
+
if (!selected) {
|
|
14358
|
+
console.log(import_picocolors6.default.yellow(" Aborted."));
|
|
14359
|
+
return;
|
|
14360
|
+
}
|
|
14361
|
+
presetName = selected;
|
|
14362
|
+
}
|
|
14363
|
+
if (!PRESETS[presetName]) {
|
|
14364
|
+
console.log(import_picocolors6.default.red(" Unknown preset:"), presetName);
|
|
14365
|
+
console.log(import_picocolors6.default.dim(" Available:"), presetKeys.join(", "));
|
|
14366
|
+
process.exit(1);
|
|
14367
|
+
}
|
|
14368
|
+
const preset = PRESETS[presetName];
|
|
14369
|
+
const cssPath = path8.join(cwd, config.css);
|
|
14370
|
+
if (!await import_fs_extra8.default.pathExists(cssPath)) {
|
|
14371
|
+
console.log(import_picocolors6.default.red(" CSS file not found:"), config.css);
|
|
14372
|
+
console.log(import_picocolors6.default.dim(" Run"), import_picocolors6.default.cyan("npx aivory-ui init"), import_picocolors6.default.dim("first."));
|
|
14373
|
+
process.exit(1);
|
|
14374
|
+
}
|
|
14375
|
+
let css = await import_fs_extra8.default.readFile(cssPath, "utf-8");
|
|
14376
|
+
for (const [key, value] of Object.entries(preset.light)) {
|
|
14377
|
+
const regex = new RegExp(`(--${key}\\s*:\\s*)[^;]+`, "g");
|
|
14378
|
+
css = css.replace(regex, `$1${value}`);
|
|
14379
|
+
}
|
|
14380
|
+
for (const [key, value] of Object.entries(preset.dark)) {
|
|
14381
|
+
const darkBlockRegex = /\.dark\s*\{([^}]+)\}/s;
|
|
14382
|
+
const darkMatch = css.match(darkBlockRegex);
|
|
14383
|
+
if (darkMatch) {
|
|
14384
|
+
let darkBlock = darkMatch[1];
|
|
14385
|
+
const varRegex = new RegExp(`(--${key}\\s*:\\s*)[^;]+`, "g");
|
|
14386
|
+
darkBlock = darkBlock.replace(varRegex, `$1${value}`);
|
|
14387
|
+
css = css.replace(darkBlockRegex, `.dark {${darkBlock}}`);
|
|
14388
|
+
}
|
|
14389
|
+
}
|
|
14390
|
+
await import_fs_extra8.default.writeFile(cssPath, css);
|
|
14391
|
+
console.log(import_picocolors6.default.green(" Applied theme:"), presetName);
|
|
14392
|
+
console.log(import_picocolors6.default.green(" Updated"), config.css);
|
|
14393
|
+
console.log("");
|
|
14394
|
+
}
|
|
14395
|
+
|
|
13650
14396
|
// src/index.ts
|
|
13651
14397
|
var program2 = new Command();
|
|
13652
|
-
program2.name("aivory-ui").description("A warm, earth-tone design system. Copy-paste components into your project.").version("0.
|
|
14398
|
+
program2.name("aivory-ui").description("A warm, earth-tone design system. Copy-paste components into your project.").version("0.2.0");
|
|
13653
14399
|
program2.command("init").description("Initialize aivory-ui in your project").option("-y, --yes", "Use default settings without prompts").action(async (opts) => {
|
|
13654
14400
|
await init(process.cwd(), { defaults: opts.yes });
|
|
13655
14401
|
});
|
|
13656
|
-
program2.command("add").description("Add components to your project").argument("[components...]", "Component names to add").action(async (components) => {
|
|
13657
|
-
await add(process.cwd(), components);
|
|
14402
|
+
program2.command("add").description("Add components to your project").argument("[components...]", "Component names to add").option("--dry-run", "Show what would be installed without writing files").action(async (components, opts) => {
|
|
14403
|
+
await add(process.cwd(), components, { dryRun: opts.dryRun });
|
|
14404
|
+
});
|
|
14405
|
+
program2.command("remove").description("Remove components from your project").argument("[components...]", "Component names to remove").action(async (components) => {
|
|
14406
|
+
await remove(process.cwd(), components);
|
|
14407
|
+
});
|
|
14408
|
+
program2.command("diff").description("Show differences between local and registry versions of components").argument("[components...]", "Component names to diff (defaults to all installed)").action(async (components) => {
|
|
14409
|
+
await diff(process.cwd(), components);
|
|
14410
|
+
});
|
|
14411
|
+
program2.command("doctor").description("Check your project setup for issues").action(async () => {
|
|
14412
|
+
await doctor(process.cwd());
|
|
14413
|
+
});
|
|
14414
|
+
program2.command("theme").description("Apply a theme preset to your project").argument("[preset]", "Theme preset name (earth, slate, forest, rose)").action(async (preset) => {
|
|
14415
|
+
await theme(process.cwd(), preset);
|
|
13658
14416
|
});
|
|
13659
14417
|
program2.command("list").description("List all available components").action(() => {
|
|
13660
14418
|
const names = getComponentNames();
|