@altertable/cli 1.5.1 → 1.6.1
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/cli.js +244 -920
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -20,12 +20,14 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
20
20
|
}
|
|
21
21
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
22
22
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
24
|
+
for (let key of __getOwnPropNames(mod))
|
|
25
|
+
if (!__hasOwnProp.call(to, key))
|
|
26
|
+
__defProp(to, key, {
|
|
27
|
+
get: __accessProp.bind(mod, key),
|
|
28
|
+
enumerable: true
|
|
29
|
+
});
|
|
30
|
+
}
|
|
29
31
|
if (canCache)
|
|
30
32
|
cache.set(mod, to);
|
|
31
33
|
return to;
|
|
@@ -34,7 +36,7 @@ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports,
|
|
|
34
36
|
var __require = import.meta.require;
|
|
35
37
|
|
|
36
38
|
// node_modules/sisteransi/src/index.js
|
|
37
|
-
var require_src = __commonJS((exports, module)
|
|
39
|
+
var require_src = __commonJS(function(exports, module) {
|
|
38
40
|
var ESC2 = "\x1B";
|
|
39
41
|
var CSI2 = `${ESC2}[`;
|
|
40
42
|
var beep = "\x07";
|
|
@@ -92,7 +94,7 @@ var require_src = __commonJS((exports, module) => {
|
|
|
92
94
|
});
|
|
93
95
|
|
|
94
96
|
// node_modules/yaml/dist/nodes/identity.js
|
|
95
|
-
var require_identity = __commonJS((exports)
|
|
97
|
+
var require_identity = __commonJS(function(exports) {
|
|
96
98
|
var ALIAS = Symbol.for("yaml.alias");
|
|
97
99
|
var DOC = Symbol.for("yaml.document");
|
|
98
100
|
var MAP = Symbol.for("yaml.map");
|
|
@@ -146,7 +148,7 @@ var require_identity = __commonJS((exports) => {
|
|
|
146
148
|
});
|
|
147
149
|
|
|
148
150
|
// node_modules/yaml/dist/visit.js
|
|
149
|
-
var require_visit = __commonJS((exports)
|
|
151
|
+
var require_visit = __commonJS(function(exports) {
|
|
150
152
|
var identity = require_identity();
|
|
151
153
|
var BREAK = Symbol("break visit");
|
|
152
154
|
var SKIP = Symbol("skip children");
|
|
@@ -301,7 +303,7 @@ var require_visit = __commonJS((exports) => {
|
|
|
301
303
|
});
|
|
302
304
|
|
|
303
305
|
// node_modules/yaml/dist/doc/directives.js
|
|
304
|
-
var require_directives = __commonJS((exports)
|
|
306
|
+
var require_directives = __commonJS(function(exports) {
|
|
305
307
|
var identity = require_identity();
|
|
306
308
|
var visit = require_visit();
|
|
307
309
|
var escapeChars = {
|
|
@@ -453,7 +455,7 @@ var require_directives = __commonJS((exports) => {
|
|
|
453
455
|
});
|
|
454
456
|
|
|
455
457
|
// node_modules/yaml/dist/doc/anchors.js
|
|
456
|
-
var require_anchors = __commonJS((exports)
|
|
458
|
+
var require_anchors = __commonJS(function(exports) {
|
|
457
459
|
var identity = require_identity();
|
|
458
460
|
var visit = require_visit();
|
|
459
461
|
function anchorIsValid(anchor) {
|
|
@@ -515,7 +517,7 @@ var require_anchors = __commonJS((exports) => {
|
|
|
515
517
|
});
|
|
516
518
|
|
|
517
519
|
// node_modules/yaml/dist/doc/applyReviver.js
|
|
518
|
-
var require_applyReviver = __commonJS((exports)
|
|
520
|
+
var require_applyReviver = __commonJS(function(exports) {
|
|
519
521
|
function applyReviver(reviver, obj, key, val) {
|
|
520
522
|
if (val && typeof val === "object") {
|
|
521
523
|
if (Array.isArray(val)) {
|
|
@@ -562,7 +564,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
|
562
564
|
});
|
|
563
565
|
|
|
564
566
|
// node_modules/yaml/dist/nodes/toJS.js
|
|
565
|
-
var require_toJS = __commonJS((exports)
|
|
567
|
+
var require_toJS = __commonJS(function(exports) {
|
|
566
568
|
var identity = require_identity();
|
|
567
569
|
function toJS(value, arg, ctx) {
|
|
568
570
|
if (Array.isArray(value))
|
|
@@ -589,7 +591,7 @@ var require_toJS = __commonJS((exports) => {
|
|
|
589
591
|
});
|
|
590
592
|
|
|
591
593
|
// node_modules/yaml/dist/nodes/Node.js
|
|
592
|
-
var require_Node = __commonJS((exports)
|
|
594
|
+
var require_Node = __commonJS(function(exports) {
|
|
593
595
|
var applyReviver = require_applyReviver();
|
|
594
596
|
var identity = require_identity();
|
|
595
597
|
var toJS = require_toJS();
|
|
@@ -626,7 +628,7 @@ var require_Node = __commonJS((exports) => {
|
|
|
626
628
|
});
|
|
627
629
|
|
|
628
630
|
// node_modules/yaml/dist/nodes/Alias.js
|
|
629
|
-
var require_Alias = __commonJS((exports)
|
|
631
|
+
var require_Alias = __commonJS(function(exports) {
|
|
630
632
|
var anchors = require_anchors();
|
|
631
633
|
var visit = require_visit();
|
|
632
634
|
var identity = require_identity();
|
|
@@ -720,9 +722,9 @@ var require_Alias = __commonJS((exports) => {
|
|
|
720
722
|
} else if (identity.isCollection(node)) {
|
|
721
723
|
let count = 0;
|
|
722
724
|
for (const item of node.items) {
|
|
723
|
-
const
|
|
724
|
-
if (
|
|
725
|
-
count =
|
|
725
|
+
const c2 = getAliasCount(doc, item, anchors2);
|
|
726
|
+
if (c2 > count)
|
|
727
|
+
count = c2;
|
|
726
728
|
}
|
|
727
729
|
return count;
|
|
728
730
|
} else if (identity.isPair(node)) {
|
|
@@ -736,7 +738,7 @@ var require_Alias = __commonJS((exports) => {
|
|
|
736
738
|
});
|
|
737
739
|
|
|
738
740
|
// node_modules/yaml/dist/nodes/Scalar.js
|
|
739
|
-
var require_Scalar = __commonJS((exports)
|
|
741
|
+
var require_Scalar = __commonJS(function(exports) {
|
|
740
742
|
var identity = require_identity();
|
|
741
743
|
var Node = require_Node();
|
|
742
744
|
var toJS = require_toJS();
|
|
@@ -764,7 +766,7 @@ var require_Scalar = __commonJS((exports) => {
|
|
|
764
766
|
});
|
|
765
767
|
|
|
766
768
|
// node_modules/yaml/dist/doc/createNode.js
|
|
767
|
-
var require_createNode = __commonJS((exports)
|
|
769
|
+
var require_createNode = __commonJS(function(exports) {
|
|
768
770
|
var Alias = require_Alias();
|
|
769
771
|
var identity = require_identity();
|
|
770
772
|
var Scalar = require_Scalar();
|
|
@@ -836,7 +838,7 @@ var require_createNode = __commonJS((exports) => {
|
|
|
836
838
|
});
|
|
837
839
|
|
|
838
840
|
// node_modules/yaml/dist/nodes/Collection.js
|
|
839
|
-
var require_Collection = __commonJS((exports)
|
|
841
|
+
var require_Collection = __commonJS(function(exports) {
|
|
840
842
|
var createNode = require_createNode();
|
|
841
843
|
var identity = require_identity();
|
|
842
844
|
var Node = require_Node();
|
|
@@ -951,7 +953,7 @@ var require_Collection = __commonJS((exports) => {
|
|
|
951
953
|
});
|
|
952
954
|
|
|
953
955
|
// node_modules/yaml/dist/stringify/stringifyComment.js
|
|
954
|
-
var require_stringifyComment = __commonJS((exports)
|
|
956
|
+
var require_stringifyComment = __commonJS(function(exports) {
|
|
955
957
|
var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
|
|
956
958
|
function indentComment(comment, indent) {
|
|
957
959
|
if (/^\n+$/.test(comment))
|
|
@@ -968,7 +970,7 @@ var require_stringifyComment = __commonJS((exports) => {
|
|
|
968
970
|
});
|
|
969
971
|
|
|
970
972
|
// node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
971
|
-
var require_foldFlowLines = __commonJS((exports)
|
|
973
|
+
var require_foldFlowLines = __commonJS(function(exports) {
|
|
972
974
|
var FOLD_FLOW = "flow";
|
|
973
975
|
var FOLD_BLOCK = "block";
|
|
974
976
|
var FOLD_QUOTED = "quoted";
|
|
@@ -1105,7 +1107,7 @@ ${indent}${text3.slice(fold + 1, end2)}`;
|
|
|
1105
1107
|
});
|
|
1106
1108
|
|
|
1107
1109
|
// node_modules/yaml/dist/stringify/stringifyString.js
|
|
1108
|
-
var require_stringifyString = __commonJS((exports)
|
|
1110
|
+
var require_stringifyString = __commonJS(function(exports) {
|
|
1109
1111
|
var Scalar = require_Scalar();
|
|
1110
1112
|
var foldFlowLines = require_foldFlowLines();
|
|
1111
1113
|
var getFoldOptions = (ctx, isBlock) => ({
|
|
@@ -1403,7 +1405,7 @@ ${indent}`);
|
|
|
1403
1405
|
});
|
|
1404
1406
|
|
|
1405
1407
|
// node_modules/yaml/dist/stringify/stringify.js
|
|
1406
|
-
var require_stringify = __commonJS((exports)
|
|
1408
|
+
var require_stringify = __commonJS(function(exports) {
|
|
1407
1409
|
var anchors = require_anchors();
|
|
1408
1410
|
var identity = require_identity();
|
|
1409
1411
|
var stringifyComment = require_stringifyComment();
|
|
@@ -1508,7 +1510,7 @@ var require_stringify = __commonJS((exports) => {
|
|
|
1508
1510
|
}
|
|
1509
1511
|
}
|
|
1510
1512
|
let tagObj = undefined;
|
|
1511
|
-
const node = identity.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (
|
|
1513
|
+
const node = identity.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
|
|
1512
1514
|
tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
|
|
1513
1515
|
const props = stringifyProps(node, tagObj, ctx);
|
|
1514
1516
|
if (props.length > 0)
|
|
@@ -1524,7 +1526,7 @@ ${ctx.indent}${str}`;
|
|
|
1524
1526
|
});
|
|
1525
1527
|
|
|
1526
1528
|
// node_modules/yaml/dist/stringify/stringifyPair.js
|
|
1527
|
-
var require_stringifyPair = __commonJS((exports)
|
|
1529
|
+
var require_stringifyPair = __commonJS(function(exports) {
|
|
1528
1530
|
var identity = require_identity();
|
|
1529
1531
|
var Scalar = require_Scalar();
|
|
1530
1532
|
var stringify = require_stringify();
|
|
@@ -1660,7 +1662,7 @@ ${ctx.indent}`;
|
|
|
1660
1662
|
});
|
|
1661
1663
|
|
|
1662
1664
|
// node_modules/yaml/dist/log.js
|
|
1663
|
-
var require_log = __commonJS((exports)
|
|
1665
|
+
var require_log = __commonJS(function(exports) {
|
|
1664
1666
|
var node_process = __require("process");
|
|
1665
1667
|
function debug(logLevel, ...messages) {
|
|
1666
1668
|
if (logLevel === "debug")
|
|
@@ -1679,7 +1681,7 @@ var require_log = __commonJS((exports) => {
|
|
|
1679
1681
|
});
|
|
1680
1682
|
|
|
1681
1683
|
// node_modules/yaml/dist/schema/yaml-1.1/merge.js
|
|
1682
|
-
var require_merge = __commonJS((exports)
|
|
1684
|
+
var require_merge = __commonJS(function(exports) {
|
|
1683
1685
|
var identity = require_identity();
|
|
1684
1686
|
var Scalar = require_Scalar();
|
|
1685
1687
|
var MERGE_KEY = "<<";
|
|
@@ -1736,7 +1738,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
1736
1738
|
});
|
|
1737
1739
|
|
|
1738
1740
|
// node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
1739
|
-
var require_addPairToJSMap = __commonJS((exports)
|
|
1741
|
+
var require_addPairToJSMap = __commonJS(function(exports) {
|
|
1740
1742
|
var log = require_log();
|
|
1741
1743
|
var merge = require_merge();
|
|
1742
1744
|
var stringify = require_stringify();
|
|
@@ -1797,7 +1799,7 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
|
1797
1799
|
});
|
|
1798
1800
|
|
|
1799
1801
|
// node_modules/yaml/dist/nodes/Pair.js
|
|
1800
|
-
var require_Pair = __commonJS((exports)
|
|
1802
|
+
var require_Pair = __commonJS(function(exports) {
|
|
1801
1803
|
var createNode = require_createNode();
|
|
1802
1804
|
var stringifyPair = require_stringifyPair();
|
|
1803
1805
|
var addPairToJSMap = require_addPairToJSMap();
|
|
@@ -1822,7 +1824,7 @@ var require_Pair = __commonJS((exports) => {
|
|
|
1822
1824
|
value = value.clone(schema);
|
|
1823
1825
|
return new Pair(key, value);
|
|
1824
1826
|
}
|
|
1825
|
-
toJSON(
|
|
1827
|
+
toJSON(_, ctx) {
|
|
1826
1828
|
const pair = ctx?.mapAsMap ? new Map : {};
|
|
1827
1829
|
return addPairToJSMap.addPairToJSMap(ctx, pair, this);
|
|
1828
1830
|
}
|
|
@@ -1835,7 +1837,7 @@ var require_Pair = __commonJS((exports) => {
|
|
|
1835
1837
|
});
|
|
1836
1838
|
|
|
1837
1839
|
// node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
1838
|
-
var require_stringifyCollection = __commonJS((exports)
|
|
1840
|
+
var require_stringifyCollection = __commonJS(function(exports) {
|
|
1839
1841
|
var identity = require_identity();
|
|
1840
1842
|
var stringify = require_stringify();
|
|
1841
1843
|
var stringifyComment = require_stringifyComment();
|
|
@@ -1987,7 +1989,7 @@ ${indent}${end}`;
|
|
|
1987
1989
|
});
|
|
1988
1990
|
|
|
1989
1991
|
// node_modules/yaml/dist/nodes/YAMLMap.js
|
|
1990
|
-
var require_YAMLMap = __commonJS((exports)
|
|
1992
|
+
var require_YAMLMap = __commonJS(function(exports) {
|
|
1991
1993
|
var stringifyCollection = require_stringifyCollection();
|
|
1992
1994
|
var addPairToJSMap = require_addPairToJSMap();
|
|
1993
1995
|
var Collection = require_Collection();
|
|
@@ -2083,7 +2085,7 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
2083
2085
|
set(key, value) {
|
|
2084
2086
|
this.add(new Pair.Pair(key, value), true);
|
|
2085
2087
|
}
|
|
2086
|
-
toJSON(
|
|
2088
|
+
toJSON(_, ctx, Type) {
|
|
2087
2089
|
const map = Type ? new Type : ctx?.mapAsMap ? new Map : {};
|
|
2088
2090
|
if (ctx?.onCreate)
|
|
2089
2091
|
ctx.onCreate(map);
|
|
@@ -2114,7 +2116,7 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
2114
2116
|
});
|
|
2115
2117
|
|
|
2116
2118
|
// node_modules/yaml/dist/schema/common/map.js
|
|
2117
|
-
var require_map = __commonJS((exports)
|
|
2119
|
+
var require_map = __commonJS(function(exports) {
|
|
2118
2120
|
var identity = require_identity();
|
|
2119
2121
|
var YAMLMap = require_YAMLMap();
|
|
2120
2122
|
var map = {
|
|
@@ -2133,7 +2135,7 @@ var require_map = __commonJS((exports) => {
|
|
|
2133
2135
|
});
|
|
2134
2136
|
|
|
2135
2137
|
// node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
2136
|
-
var require_YAMLSeq = __commonJS((exports)
|
|
2138
|
+
var require_YAMLSeq = __commonJS(function(exports) {
|
|
2137
2139
|
var createNode = require_createNode();
|
|
2138
2140
|
var stringifyCollection = require_stringifyCollection();
|
|
2139
2141
|
var Collection = require_Collection();
|
|
@@ -2180,7 +2182,7 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
2180
2182
|
else
|
|
2181
2183
|
this.items[idx] = value;
|
|
2182
2184
|
}
|
|
2183
|
-
toJSON(
|
|
2185
|
+
toJSON(_, ctx) {
|
|
2184
2186
|
const seq = [];
|
|
2185
2187
|
if (ctx?.onCreate)
|
|
2186
2188
|
ctx.onCreate(seq);
|
|
@@ -2226,7 +2228,7 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
2226
2228
|
});
|
|
2227
2229
|
|
|
2228
2230
|
// node_modules/yaml/dist/schema/common/seq.js
|
|
2229
|
-
var require_seq = __commonJS((exports)
|
|
2231
|
+
var require_seq = __commonJS(function(exports) {
|
|
2230
2232
|
var identity = require_identity();
|
|
2231
2233
|
var YAMLSeq = require_YAMLSeq();
|
|
2232
2234
|
var seq = {
|
|
@@ -2245,7 +2247,7 @@ var require_seq = __commonJS((exports) => {
|
|
|
2245
2247
|
});
|
|
2246
2248
|
|
|
2247
2249
|
// node_modules/yaml/dist/schema/common/string.js
|
|
2248
|
-
var require_string = __commonJS((exports)
|
|
2250
|
+
var require_string = __commonJS(function(exports) {
|
|
2249
2251
|
var stringifyString = require_stringifyString();
|
|
2250
2252
|
var string = {
|
|
2251
2253
|
identify: (value) => typeof value === "string",
|
|
@@ -2261,7 +2263,7 @@ var require_string = __commonJS((exports) => {
|
|
|
2261
2263
|
});
|
|
2262
2264
|
|
|
2263
2265
|
// node_modules/yaml/dist/schema/common/null.js
|
|
2264
|
-
var require_null = __commonJS((exports)
|
|
2266
|
+
var require_null = __commonJS(function(exports) {
|
|
2265
2267
|
var Scalar = require_Scalar();
|
|
2266
2268
|
var nullTag = {
|
|
2267
2269
|
identify: (value) => value == null,
|
|
@@ -2276,7 +2278,7 @@ var require_null = __commonJS((exports) => {
|
|
|
2276
2278
|
});
|
|
2277
2279
|
|
|
2278
2280
|
// node_modules/yaml/dist/schema/core/bool.js
|
|
2279
|
-
var require_bool = __commonJS((exports)
|
|
2281
|
+
var require_bool = __commonJS(function(exports) {
|
|
2280
2282
|
var Scalar = require_Scalar();
|
|
2281
2283
|
var boolTag = {
|
|
2282
2284
|
identify: (value) => typeof value === "boolean",
|
|
@@ -2297,7 +2299,7 @@ var require_bool = __commonJS((exports) => {
|
|
|
2297
2299
|
});
|
|
2298
2300
|
|
|
2299
2301
|
// node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
2300
|
-
var require_stringifyNumber = __commonJS((exports)
|
|
2302
|
+
var require_stringifyNumber = __commonJS(function(exports) {
|
|
2301
2303
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
2302
2304
|
if (typeof value === "bigint")
|
|
2303
2305
|
return String(value);
|
|
@@ -2321,7 +2323,7 @@ var require_stringifyNumber = __commonJS((exports) => {
|
|
|
2321
2323
|
});
|
|
2322
2324
|
|
|
2323
2325
|
// node_modules/yaml/dist/schema/core/float.js
|
|
2324
|
-
var require_float = __commonJS((exports)
|
|
2326
|
+
var require_float = __commonJS(function(exports) {
|
|
2325
2327
|
var Scalar = require_Scalar();
|
|
2326
2328
|
var stringifyNumber = require_stringifyNumber();
|
|
2327
2329
|
var floatNaN = {
|
|
@@ -2364,7 +2366,7 @@ var require_float = __commonJS((exports) => {
|
|
|
2364
2366
|
});
|
|
2365
2367
|
|
|
2366
2368
|
// node_modules/yaml/dist/schema/core/int.js
|
|
2367
|
-
var require_int = __commonJS((exports)
|
|
2369
|
+
var require_int = __commonJS(function(exports) {
|
|
2368
2370
|
var stringifyNumber = require_stringifyNumber();
|
|
2369
2371
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
2370
2372
|
var intResolve = (str, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix);
|
|
@@ -2406,7 +2408,7 @@ var require_int = __commonJS((exports) => {
|
|
|
2406
2408
|
});
|
|
2407
2409
|
|
|
2408
2410
|
// node_modules/yaml/dist/schema/core/schema.js
|
|
2409
|
-
var require_schema = __commonJS((exports)
|
|
2411
|
+
var require_schema = __commonJS(function(exports) {
|
|
2410
2412
|
var map = require_map();
|
|
2411
2413
|
var _null = require_null();
|
|
2412
2414
|
var seq = require_seq();
|
|
@@ -2431,7 +2433,7 @@ var require_schema = __commonJS((exports) => {
|
|
|
2431
2433
|
});
|
|
2432
2434
|
|
|
2433
2435
|
// node_modules/yaml/dist/schema/json/schema.js
|
|
2434
|
-
var require_schema2 = __commonJS((exports)
|
|
2436
|
+
var require_schema2 = __commonJS(function(exports) {
|
|
2435
2437
|
var Scalar = require_Scalar();
|
|
2436
2438
|
var map = require_map();
|
|
2437
2439
|
var seq = require_seq();
|
|
@@ -2495,7 +2497,7 @@ var require_schema2 = __commonJS((exports) => {
|
|
|
2495
2497
|
});
|
|
2496
2498
|
|
|
2497
2499
|
// node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
2498
|
-
var require_binary = __commonJS((exports)
|
|
2500
|
+
var require_binary = __commonJS(function(exports) {
|
|
2499
2501
|
var node_buffer = __require("buffer");
|
|
2500
2502
|
var Scalar = require_Scalar();
|
|
2501
2503
|
var stringifyString = require_stringifyString();
|
|
@@ -2537,8 +2539,8 @@ var require_binary = __commonJS((exports) => {
|
|
|
2537
2539
|
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
|
|
2538
2540
|
const n3 = Math.ceil(str.length / lineWidth);
|
|
2539
2541
|
const lines = new Array(n3);
|
|
2540
|
-
for (let i2 = 0,
|
|
2541
|
-
lines[i2] = str.substr(
|
|
2542
|
+
for (let i2 = 0, o = 0;i2 < n3; ++i2, o += lineWidth) {
|
|
2543
|
+
lines[i2] = str.substr(o, lineWidth);
|
|
2542
2544
|
}
|
|
2543
2545
|
str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? `
|
|
2544
2546
|
` : " ");
|
|
@@ -2550,7 +2552,7 @@ var require_binary = __commonJS((exports) => {
|
|
|
2550
2552
|
});
|
|
2551
2553
|
|
|
2552
2554
|
// node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
2553
|
-
var require_pairs = __commonJS((exports)
|
|
2555
|
+
var require_pairs = __commonJS(function(exports) {
|
|
2554
2556
|
var identity = require_identity();
|
|
2555
2557
|
var Pair = require_Pair();
|
|
2556
2558
|
var Scalar = require_Scalar();
|
|
@@ -2625,7 +2627,7 @@ ${cn.comment}` : item.comment;
|
|
|
2625
2627
|
});
|
|
2626
2628
|
|
|
2627
2629
|
// node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
2628
|
-
var require_omap = __commonJS((exports)
|
|
2630
|
+
var require_omap = __commonJS(function(exports) {
|
|
2629
2631
|
var identity = require_identity();
|
|
2630
2632
|
var toJS = require_toJS();
|
|
2631
2633
|
var YAMLMap = require_YAMLMap();
|
|
@@ -2642,9 +2644,9 @@ var require_omap = __commonJS((exports) => {
|
|
|
2642
2644
|
this.set = YAMLMap.YAMLMap.prototype.set.bind(this);
|
|
2643
2645
|
this.tag = YAMLOMap.tag;
|
|
2644
2646
|
}
|
|
2645
|
-
toJSON(
|
|
2647
|
+
toJSON(_, ctx) {
|
|
2646
2648
|
if (!ctx)
|
|
2647
|
-
return super.toJSON(
|
|
2649
|
+
return super.toJSON(_);
|
|
2648
2650
|
const map = new Map;
|
|
2649
2651
|
if (ctx?.onCreate)
|
|
2650
2652
|
ctx.onCreate(map);
|
|
@@ -2697,7 +2699,7 @@ var require_omap = __commonJS((exports) => {
|
|
|
2697
2699
|
});
|
|
2698
2700
|
|
|
2699
2701
|
// node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
2700
|
-
var require_bool2 = __commonJS((exports)
|
|
2702
|
+
var require_bool2 = __commonJS(function(exports) {
|
|
2701
2703
|
var Scalar = require_Scalar();
|
|
2702
2704
|
function boolStringify({ value, source }, ctx) {
|
|
2703
2705
|
const boolObj = value ? trueTag : falseTag;
|
|
@@ -2726,7 +2728,7 @@ var require_bool2 = __commonJS((exports) => {
|
|
|
2726
2728
|
});
|
|
2727
2729
|
|
|
2728
2730
|
// node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
2729
|
-
var require_float2 = __commonJS((exports)
|
|
2731
|
+
var require_float2 = __commonJS(function(exports) {
|
|
2730
2732
|
var Scalar = require_Scalar();
|
|
2731
2733
|
var stringifyNumber = require_stringifyNumber();
|
|
2732
2734
|
var floatNaN = {
|
|
@@ -2758,9 +2760,9 @@ var require_float2 = __commonJS((exports) => {
|
|
|
2758
2760
|
const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, "")));
|
|
2759
2761
|
const dot = str.indexOf(".");
|
|
2760
2762
|
if (dot !== -1) {
|
|
2761
|
-
const
|
|
2762
|
-
if (
|
|
2763
|
-
node.minFractionDigits =
|
|
2763
|
+
const f = str.substring(dot + 1).replace(/_/g, "");
|
|
2764
|
+
if (f[f.length - 1] === "0")
|
|
2765
|
+
node.minFractionDigits = f.length;
|
|
2764
2766
|
}
|
|
2765
2767
|
return node;
|
|
2766
2768
|
},
|
|
@@ -2772,7 +2774,7 @@ var require_float2 = __commonJS((exports) => {
|
|
|
2772
2774
|
});
|
|
2773
2775
|
|
|
2774
2776
|
// node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
2775
|
-
var require_int2 = __commonJS((exports)
|
|
2777
|
+
var require_int2 = __commonJS(function(exports) {
|
|
2776
2778
|
var stringifyNumber = require_stringifyNumber();
|
|
2777
2779
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
2778
2780
|
function intResolve(str, offset, radix, { intAsBigInt }) {
|
|
@@ -2848,7 +2850,7 @@ var require_int2 = __commonJS((exports) => {
|
|
|
2848
2850
|
});
|
|
2849
2851
|
|
|
2850
2852
|
// node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
2851
|
-
var require_set = __commonJS((exports)
|
|
2853
|
+
var require_set = __commonJS(function(exports) {
|
|
2852
2854
|
var identity = require_identity();
|
|
2853
2855
|
var Pair = require_Pair();
|
|
2854
2856
|
var YAMLMap = require_YAMLMap();
|
|
@@ -2884,8 +2886,8 @@ var require_set = __commonJS((exports) => {
|
|
|
2884
2886
|
this.items.push(new Pair.Pair(key));
|
|
2885
2887
|
}
|
|
2886
2888
|
}
|
|
2887
|
-
toJSON(
|
|
2888
|
-
return super.toJSON(
|
|
2889
|
+
toJSON(_, ctx) {
|
|
2890
|
+
return super.toJSON(_, ctx, Set);
|
|
2889
2891
|
}
|
|
2890
2892
|
toString(ctx, onComment, onChompKeep) {
|
|
2891
2893
|
if (!ctx)
|
|
@@ -2931,13 +2933,13 @@ var require_set = __commonJS((exports) => {
|
|
|
2931
2933
|
});
|
|
2932
2934
|
|
|
2933
2935
|
// node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
2934
|
-
var require_timestamp = __commonJS((exports)
|
|
2936
|
+
var require_timestamp = __commonJS(function(exports) {
|
|
2935
2937
|
var stringifyNumber = require_stringifyNumber();
|
|
2936
2938
|
function parseSexagesimal(str, asBigInt) {
|
|
2937
2939
|
const sign = str[0];
|
|
2938
2940
|
const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
|
|
2939
2941
|
const num = (n3) => asBigInt ? BigInt(n3) : Number(n3);
|
|
2940
|
-
const res = parts.replace(/_/g, "").split(":").reduce((res2,
|
|
2942
|
+
const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
|
|
2941
2943
|
return sign === "-" ? num(-1) * res : res;
|
|
2942
2944
|
}
|
|
2943
2945
|
function stringifySexagesimal(node) {
|
|
@@ -3013,7 +3015,7 @@ var require_timestamp = __commonJS((exports) => {
|
|
|
3013
3015
|
});
|
|
3014
3016
|
|
|
3015
3017
|
// node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
3016
|
-
var require_schema3 = __commonJS((exports)
|
|
3018
|
+
var require_schema3 = __commonJS(function(exports) {
|
|
3017
3019
|
var map = require_map();
|
|
3018
3020
|
var _null = require_null();
|
|
3019
3021
|
var seq = require_seq();
|
|
@@ -3054,7 +3056,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
3054
3056
|
});
|
|
3055
3057
|
|
|
3056
3058
|
// node_modules/yaml/dist/schema/tags.js
|
|
3057
|
-
var require_tags = __commonJS((exports)
|
|
3059
|
+
var require_tags = __commonJS(function(exports) {
|
|
3058
3060
|
var map = require_map();
|
|
3059
3061
|
var _null = require_null();
|
|
3060
3062
|
var seq = require_seq();
|
|
@@ -3145,13 +3147,13 @@ var require_tags = __commonJS((exports) => {
|
|
|
3145
3147
|
});
|
|
3146
3148
|
|
|
3147
3149
|
// node_modules/yaml/dist/schema/Schema.js
|
|
3148
|
-
var require_Schema = __commonJS((exports)
|
|
3150
|
+
var require_Schema = __commonJS(function(exports) {
|
|
3149
3151
|
var identity = require_identity();
|
|
3150
3152
|
var map = require_map();
|
|
3151
3153
|
var seq = require_seq();
|
|
3152
3154
|
var string = require_string();
|
|
3153
3155
|
var tags = require_tags();
|
|
3154
|
-
var sortMapEntriesByKey = (a2,
|
|
3156
|
+
var sortMapEntriesByKey = (a2, b) => a2.key < b.key ? -1 : a2.key > b.key ? 1 : 0;
|
|
3155
3157
|
|
|
3156
3158
|
class Schema {
|
|
3157
3159
|
constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
@@ -3175,7 +3177,7 @@ var require_Schema = __commonJS((exports) => {
|
|
|
3175
3177
|
});
|
|
3176
3178
|
|
|
3177
3179
|
// node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
3178
|
-
var require_stringifyDocument = __commonJS((exports)
|
|
3180
|
+
var require_stringifyDocument = __commonJS(function(exports) {
|
|
3179
3181
|
var identity = require_identity();
|
|
3180
3182
|
var stringify = require_stringify();
|
|
3181
3183
|
var stringifyComment = require_stringifyComment();
|
|
@@ -3255,7 +3257,7 @@ var require_stringifyDocument = __commonJS((exports) => {
|
|
|
3255
3257
|
});
|
|
3256
3258
|
|
|
3257
3259
|
// node_modules/yaml/dist/doc/Document.js
|
|
3258
|
-
var require_Document = __commonJS((exports)
|
|
3260
|
+
var require_Document = __commonJS(function(exports) {
|
|
3259
3261
|
var Alias = require_Alias();
|
|
3260
3262
|
var Collection = require_Collection();
|
|
3261
3263
|
var identity = require_identity();
|
|
@@ -3490,7 +3492,7 @@ var require_Document = __commonJS((exports) => {
|
|
|
3490
3492
|
});
|
|
3491
3493
|
|
|
3492
3494
|
// node_modules/yaml/dist/errors.js
|
|
3493
|
-
var require_errors = __commonJS((exports)
|
|
3495
|
+
var require_errors = __commonJS(function(exports) {
|
|
3494
3496
|
class YAMLError extends Error {
|
|
3495
3497
|
constructor(name, pos, code, message) {
|
|
3496
3498
|
super();
|
|
@@ -3555,7 +3557,7 @@ ${pointer}
|
|
|
3555
3557
|
});
|
|
3556
3558
|
|
|
3557
3559
|
// node_modules/yaml/dist/compose/resolve-props.js
|
|
3558
|
-
var require_resolve_props = __commonJS((exports)
|
|
3560
|
+
var require_resolve_props = __commonJS(function(exports) {
|
|
3559
3561
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
|
|
3560
3562
|
let spaceBefore = false;
|
|
3561
3563
|
let atNewline = startOnNewline;
|
|
@@ -3685,7 +3687,7 @@ var require_resolve_props = __commonJS((exports) => {
|
|
|
3685
3687
|
});
|
|
3686
3688
|
|
|
3687
3689
|
// node_modules/yaml/dist/compose/util-contains-newline.js
|
|
3688
|
-
var require_util_contains_newline = __commonJS((exports)
|
|
3690
|
+
var require_util_contains_newline = __commonJS(function(exports) {
|
|
3689
3691
|
function containsNewline(key) {
|
|
3690
3692
|
if (!key)
|
|
3691
3693
|
return null;
|
|
@@ -3725,7 +3727,7 @@ var require_util_contains_newline = __commonJS((exports) => {
|
|
|
3725
3727
|
});
|
|
3726
3728
|
|
|
3727
3729
|
// node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
3728
|
-
var require_util_flow_indent_check = __commonJS((exports)
|
|
3730
|
+
var require_util_flow_indent_check = __commonJS(function(exports) {
|
|
3729
3731
|
var utilContainsNewline = require_util_contains_newline();
|
|
3730
3732
|
function flowIndentCheck(indent, fc, onError) {
|
|
3731
3733
|
if (fc?.type === "flow-collection") {
|
|
@@ -3740,20 +3742,20 @@ var require_util_flow_indent_check = __commonJS((exports) => {
|
|
|
3740
3742
|
});
|
|
3741
3743
|
|
|
3742
3744
|
// node_modules/yaml/dist/compose/util-map-includes.js
|
|
3743
|
-
var require_util_map_includes = __commonJS((exports)
|
|
3745
|
+
var require_util_map_includes = __commonJS(function(exports) {
|
|
3744
3746
|
var identity = require_identity();
|
|
3745
3747
|
function mapIncludes(ctx, items, search) {
|
|
3746
3748
|
const { uniqueKeys } = ctx.options;
|
|
3747
3749
|
if (uniqueKeys === false)
|
|
3748
3750
|
return false;
|
|
3749
|
-
const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a2,
|
|
3751
|
+
const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a2, b) => a2 === b || identity.isScalar(a2) && identity.isScalar(b) && a2.value === b.value;
|
|
3750
3752
|
return items.some((pair) => isEqual(pair.key, search));
|
|
3751
3753
|
}
|
|
3752
3754
|
exports.mapIncludes = mapIncludes;
|
|
3753
3755
|
});
|
|
3754
3756
|
|
|
3755
3757
|
// node_modules/yaml/dist/compose/resolve-block-map.js
|
|
3756
|
-
var require_resolve_block_map = __commonJS((exports)
|
|
3758
|
+
var require_resolve_block_map = __commonJS(function(exports) {
|
|
3757
3759
|
var Pair = require_Pair();
|
|
3758
3760
|
var YAMLMap = require_YAMLMap();
|
|
3759
3761
|
var resolveProps = require_resolve_props();
|
|
@@ -3860,7 +3862,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
3860
3862
|
});
|
|
3861
3863
|
|
|
3862
3864
|
// node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
3863
|
-
var require_resolve_block_seq = __commonJS((exports)
|
|
3865
|
+
var require_resolve_block_seq = __commonJS(function(exports) {
|
|
3864
3866
|
var YAMLSeq = require_YAMLSeq();
|
|
3865
3867
|
var resolveProps = require_resolve_props();
|
|
3866
3868
|
var utilFlowIndentCheck = require_util_flow_indent_check();
|
|
@@ -3908,7 +3910,7 @@ var require_resolve_block_seq = __commonJS((exports) => {
|
|
|
3908
3910
|
});
|
|
3909
3911
|
|
|
3910
3912
|
// node_modules/yaml/dist/compose/resolve-end.js
|
|
3911
|
-
var require_resolve_end = __commonJS((exports)
|
|
3913
|
+
var require_resolve_end = __commonJS(function(exports) {
|
|
3912
3914
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
3913
3915
|
let comment = "";
|
|
3914
3916
|
if (end) {
|
|
@@ -3948,7 +3950,7 @@ var require_resolve_end = __commonJS((exports) => {
|
|
|
3948
3950
|
});
|
|
3949
3951
|
|
|
3950
3952
|
// node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
3951
|
-
var require_resolve_flow_collection = __commonJS((exports)
|
|
3953
|
+
var require_resolve_flow_collection = __commonJS(function(exports) {
|
|
3952
3954
|
var identity = require_identity();
|
|
3953
3955
|
var Pair = require_Pair();
|
|
3954
3956
|
var YAMLMap = require_YAMLMap();
|
|
@@ -4139,7 +4141,7 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
|
4139
4141
|
});
|
|
4140
4142
|
|
|
4141
4143
|
// node_modules/yaml/dist/compose/compose-collection.js
|
|
4142
|
-
var require_compose_collection = __commonJS((exports)
|
|
4144
|
+
var require_compose_collection = __commonJS(function(exports) {
|
|
4143
4145
|
var identity = require_identity();
|
|
4144
4146
|
var Scalar = require_Scalar();
|
|
4145
4147
|
var YAMLMap = require_YAMLMap();
|
|
@@ -4201,7 +4203,7 @@ var require_compose_collection = __commonJS((exports) => {
|
|
|
4201
4203
|
});
|
|
4202
4204
|
|
|
4203
4205
|
// node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
4204
|
-
var require_resolve_block_scalar = __commonJS((exports)
|
|
4206
|
+
var require_resolve_block_scalar = __commonJS(function(exports) {
|
|
4205
4207
|
var Scalar = require_Scalar();
|
|
4206
4208
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
4207
4209
|
const start = scalar.offset;
|
|
@@ -4383,8 +4385,8 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
4383
4385
|
function splitLines(source) {
|
|
4384
4386
|
const split = source.split(/\n( *)/);
|
|
4385
4387
|
const first = split[0];
|
|
4386
|
-
const
|
|
4387
|
-
const line0 =
|
|
4388
|
+
const m = first.match(/^( *)/);
|
|
4389
|
+
const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
|
|
4388
4390
|
const lines = [line0];
|
|
4389
4391
|
for (let i2 = 1;i2 < split.length; i2 += 2)
|
|
4390
4392
|
lines.push([split[i2], split[i2 + 1]]);
|
|
@@ -4394,7 +4396,7 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
4394
4396
|
});
|
|
4395
4397
|
|
|
4396
4398
|
// node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
4397
|
-
var require_resolve_flow_scalar = __commonJS((exports)
|
|
4399
|
+
var require_resolve_flow_scalar = __commonJS(function(exports) {
|
|
4398
4400
|
var Scalar = require_Scalar();
|
|
4399
4401
|
var resolveEnd = require_resolve_end();
|
|
4400
4402
|
function resolveFlowScalar(scalar, strict, onError) {
|
|
@@ -4611,7 +4613,7 @@ var require_resolve_flow_scalar = __commonJS((exports) => {
|
|
|
4611
4613
|
});
|
|
4612
4614
|
|
|
4613
4615
|
// node_modules/yaml/dist/compose/compose-scalar.js
|
|
4614
|
-
var require_compose_scalar = __commonJS((exports)
|
|
4616
|
+
var require_compose_scalar = __commonJS(function(exports) {
|
|
4615
4617
|
var identity = require_identity();
|
|
4616
4618
|
var Scalar = require_Scalar();
|
|
4617
4619
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
@@ -4689,7 +4691,7 @@ var require_compose_scalar = __commonJS((exports) => {
|
|
|
4689
4691
|
});
|
|
4690
4692
|
|
|
4691
4693
|
// node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
4692
|
-
var require_util_empty_scalar_position = __commonJS((exports)
|
|
4694
|
+
var require_util_empty_scalar_position = __commonJS(function(exports) {
|
|
4693
4695
|
function emptyScalarPosition(offset, before, pos) {
|
|
4694
4696
|
if (before) {
|
|
4695
4697
|
pos ?? (pos = before.length);
|
|
@@ -4716,7 +4718,7 @@ var require_util_empty_scalar_position = __commonJS((exports) => {
|
|
|
4716
4718
|
});
|
|
4717
4719
|
|
|
4718
4720
|
// node_modules/yaml/dist/compose/compose-node.js
|
|
4719
|
-
var require_compose_node = __commonJS((exports)
|
|
4721
|
+
var require_compose_node = __commonJS(function(exports) {
|
|
4720
4722
|
var Alias = require_Alias();
|
|
4721
4723
|
var identity = require_identity();
|
|
4722
4724
|
var composeCollection = require_compose_collection();
|
|
@@ -4819,7 +4821,7 @@ var require_compose_node = __commonJS((exports) => {
|
|
|
4819
4821
|
});
|
|
4820
4822
|
|
|
4821
4823
|
// node_modules/yaml/dist/compose/compose-doc.js
|
|
4822
|
-
var require_compose_doc = __commonJS((exports)
|
|
4824
|
+
var require_compose_doc = __commonJS(function(exports) {
|
|
4823
4825
|
var Document = require_Document();
|
|
4824
4826
|
var composeNode = require_compose_node();
|
|
4825
4827
|
var resolveEnd = require_resolve_end();
|
|
@@ -4859,7 +4861,7 @@ var require_compose_doc = __commonJS((exports) => {
|
|
|
4859
4861
|
});
|
|
4860
4862
|
|
|
4861
4863
|
// node_modules/yaml/dist/compose/composer.js
|
|
4862
|
-
var require_composer = __commonJS((exports)
|
|
4864
|
+
var require_composer = __commonJS(function(exports) {
|
|
4863
4865
|
var node_process = __require("process");
|
|
4864
4866
|
var directives = require_directives();
|
|
4865
4867
|
var Document = require_Document();
|
|
@@ -5050,7 +5052,7 @@ ${end.comment}` : end.comment;
|
|
|
5050
5052
|
});
|
|
5051
5053
|
|
|
5052
5054
|
// node_modules/yaml/dist/parse/cst-scalar.js
|
|
5053
|
-
var require_cst_scalar = __commonJS((exports)
|
|
5055
|
+
var require_cst_scalar = __commonJS(function(exports) {
|
|
5054
5056
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
5055
5057
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
5056
5058
|
var errors = require_errors();
|
|
@@ -5240,7 +5242,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
|
5240
5242
|
});
|
|
5241
5243
|
|
|
5242
5244
|
// node_modules/yaml/dist/parse/cst-stringify.js
|
|
5243
|
-
var require_cst_stringify = __commonJS((exports)
|
|
5245
|
+
var require_cst_stringify = __commonJS(function(exports) {
|
|
5244
5246
|
var stringify = (cst) => ("type" in cst) ? stringifyToken(cst) : stringifyItem(cst);
|
|
5245
5247
|
function stringifyToken(token) {
|
|
5246
5248
|
switch (token.type) {
|
|
@@ -5298,7 +5300,7 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
|
5298
5300
|
});
|
|
5299
5301
|
|
|
5300
5302
|
// node_modules/yaml/dist/parse/cst-visit.js
|
|
5301
|
-
var require_cst_visit = __commonJS((exports)
|
|
5303
|
+
var require_cst_visit = __commonJS(function(exports) {
|
|
5302
5304
|
var BREAK = Symbol("break visit");
|
|
5303
5305
|
var SKIP = Symbol("skip children");
|
|
5304
5306
|
var REMOVE = Symbol("remove item");
|
|
@@ -5357,7 +5359,7 @@ var require_cst_visit = __commonJS((exports) => {
|
|
|
5357
5359
|
});
|
|
5358
5360
|
|
|
5359
5361
|
// node_modules/yaml/dist/parse/cst.js
|
|
5360
|
-
var require_cst = __commonJS((exports)
|
|
5362
|
+
var require_cst = __commonJS(function(exports) {
|
|
5361
5363
|
var cstScalar = require_cst_scalar();
|
|
5362
5364
|
var cstStringify = require_cst_stringify();
|
|
5363
5365
|
var cstVisit = require_cst_visit();
|
|
@@ -5458,7 +5460,7 @@ var require_cst = __commonJS((exports) => {
|
|
|
5458
5460
|
});
|
|
5459
5461
|
|
|
5460
5462
|
// node_modules/yaml/dist/parse/lexer.js
|
|
5461
|
-
var require_lexer = __commonJS((exports)
|
|
5463
|
+
var require_lexer = __commonJS(function(exports) {
|
|
5462
5464
|
var cst = require_cst();
|
|
5463
5465
|
function isEmpty(ch) {
|
|
5464
5466
|
switch (ch) {
|
|
@@ -6055,7 +6057,7 @@ var require_lexer = __commonJS((exports) => {
|
|
|
6055
6057
|
});
|
|
6056
6058
|
|
|
6057
6059
|
// node_modules/yaml/dist/parse/line-counter.js
|
|
6058
|
-
var require_line_counter = __commonJS((exports)
|
|
6060
|
+
var require_line_counter = __commonJS(function(exports) {
|
|
6059
6061
|
class LineCounter {
|
|
6060
6062
|
constructor() {
|
|
6061
6063
|
this.lineStarts = [];
|
|
@@ -6083,7 +6085,7 @@ var require_line_counter = __commonJS((exports) => {
|
|
|
6083
6085
|
});
|
|
6084
6086
|
|
|
6085
6087
|
// node_modules/yaml/dist/parse/parser.js
|
|
6086
|
-
var require_parser = __commonJS((exports)
|
|
6088
|
+
var require_parser = __commonJS(function(exports) {
|
|
6087
6089
|
var node_process = __require("process");
|
|
6088
6090
|
var cst = require_cst();
|
|
6089
6091
|
var lexer = require_lexer();
|
|
@@ -6939,7 +6941,7 @@ var require_parser = __commonJS((exports) => {
|
|
|
6939
6941
|
});
|
|
6940
6942
|
|
|
6941
6943
|
// node_modules/yaml/dist/public-api.js
|
|
6942
|
-
var require_public_api = __commonJS((exports)
|
|
6944
|
+
var require_public_api = __commonJS(function(exports) {
|
|
6943
6945
|
var composer = require_composer();
|
|
6944
6946
|
var Document = require_Document();
|
|
6945
6947
|
var errors = require_errors();
|
|
@@ -7033,7 +7035,7 @@ var require_public_api = __commonJS((exports) => {
|
|
|
7033
7035
|
});
|
|
7034
7036
|
|
|
7035
7037
|
// src/version.ts
|
|
7036
|
-
var VERSION = "1.
|
|
7038
|
+
var VERSION = "1.6.1";
|
|
7037
7039
|
var USER_AGENT = `altertable-cli/${VERSION}`;
|
|
7038
7040
|
|
|
7039
7041
|
// src/lib/transport-defaults.ts
|
|
@@ -7358,6 +7360,7 @@ var ENV_SCHEMA = {
|
|
|
7358
7360
|
ALTERTABLE_DOCKER_USER: { parse: optional },
|
|
7359
7361
|
ALTERTABLE_ENV: { parse: optional },
|
|
7360
7362
|
ALTERTABLE_HTTP_LOG: { parse: optional },
|
|
7363
|
+
ALTERTABLE_IGNORE_SSL_ERRORS: { parse: booleanValue },
|
|
7361
7364
|
ALTERTABLE_LAKEHOUSE_PASSWORD: { parse: optional, secret: true },
|
|
7362
7365
|
ALTERTABLE_LAKEHOUSE_USERNAME: { parse: optional },
|
|
7363
7366
|
ALTERTABLE_MANAGEMENT_API_BASE: { parse: optional },
|
|
@@ -8350,6 +8353,9 @@ function mergeGlobalFlagsFromArgs(context, args) {
|
|
|
8350
8353
|
if (args["read-timeout"] !== undefined) {
|
|
8351
8354
|
merged.readTimeoutMs = parseTimeoutSeconds(args["read-timeout"], "--read-timeout");
|
|
8352
8355
|
}
|
|
8356
|
+
if (args["ignore-ssl-errors"] !== undefined) {
|
|
8357
|
+
merged.ignoreSslErrors = Boolean(args["ignore-ssl-errors"]);
|
|
8358
|
+
}
|
|
8353
8359
|
return merged;
|
|
8354
8360
|
}
|
|
8355
8361
|
|
|
@@ -8634,6 +8640,14 @@ async function delayBeforeHttpRetry(attemptIndex, retryAfterHeader) {
|
|
|
8634
8640
|
}
|
|
8635
8641
|
|
|
8636
8642
|
// src/lib/http.ts
|
|
8643
|
+
function createDispatcher(options) {
|
|
8644
|
+
try {
|
|
8645
|
+
const undici = __require("undici");
|
|
8646
|
+
return new undici.Agent(options);
|
|
8647
|
+
} catch {
|
|
8648
|
+
return;
|
|
8649
|
+
}
|
|
8650
|
+
}
|
|
8637
8651
|
var sharedDispatcher;
|
|
8638
8652
|
var sharedDispatcherInitialized = false;
|
|
8639
8653
|
function getSharedDispatcher() {
|
|
@@ -8641,17 +8655,51 @@ function getSharedDispatcher() {
|
|
|
8641
8655
|
return sharedDispatcher;
|
|
8642
8656
|
}
|
|
8643
8657
|
sharedDispatcherInitialized = true;
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
keepAliveMaxTimeout: 60000
|
|
8649
|
-
});
|
|
8650
|
-
} catch {
|
|
8651
|
-
sharedDispatcher = undefined;
|
|
8652
|
-
}
|
|
8658
|
+
sharedDispatcher = createDispatcher({
|
|
8659
|
+
keepAliveTimeout: 30000,
|
|
8660
|
+
keepAliveMaxTimeout: 60000
|
|
8661
|
+
});
|
|
8653
8662
|
return sharedDispatcher;
|
|
8654
8663
|
}
|
|
8664
|
+
var insecureDispatcher;
|
|
8665
|
+
var insecureDispatcherInitialized = false;
|
|
8666
|
+
function getInsecureDispatcher() {
|
|
8667
|
+
if (insecureDispatcherInitialized) {
|
|
8668
|
+
return insecureDispatcher;
|
|
8669
|
+
}
|
|
8670
|
+
insecureDispatcherInitialized = true;
|
|
8671
|
+
insecureDispatcher = createDispatcher({
|
|
8672
|
+
keepAliveTimeout: 30000,
|
|
8673
|
+
keepAliveMaxTimeout: 60000,
|
|
8674
|
+
connect: { rejectUnauthorized: false }
|
|
8675
|
+
});
|
|
8676
|
+
return insecureDispatcher;
|
|
8677
|
+
}
|
|
8678
|
+
function shouldIgnoreSslErrors() {
|
|
8679
|
+
return getCliContext().ignoreSslErrors === true || readEnv("ALTERTABLE_IGNORE_SSL_ERRORS") === true;
|
|
8680
|
+
}
|
|
8681
|
+
var insecureTlsWarned = false;
|
|
8682
|
+
function warnInsecureTlsOnce() {
|
|
8683
|
+
if (insecureTlsWarned) {
|
|
8684
|
+
return;
|
|
8685
|
+
}
|
|
8686
|
+
insecureTlsWarned = true;
|
|
8687
|
+
logWarn("TLS certificate verification is disabled (--ignore-ssl-errors); connections are not protected against interception.");
|
|
8688
|
+
}
|
|
8689
|
+
function buildFetchInit(options, headers, signal) {
|
|
8690
|
+
const ignoreSslErrors = shouldIgnoreSslErrors();
|
|
8691
|
+
if (ignoreSslErrors) {
|
|
8692
|
+
warnInsecureTlsOnce();
|
|
8693
|
+
}
|
|
8694
|
+
return {
|
|
8695
|
+
method: options.method,
|
|
8696
|
+
headers,
|
|
8697
|
+
body: options.body,
|
|
8698
|
+
signal,
|
|
8699
|
+
dispatcher: ignoreSslErrors ? getInsecureDispatcher() : getSharedDispatcher(),
|
|
8700
|
+
...ignoreSslErrors ? { tls: { rejectUnauthorized: false } } : {}
|
|
8701
|
+
};
|
|
8702
|
+
}
|
|
8655
8703
|
function resolveConnectTimeoutMs(options) {
|
|
8656
8704
|
return options.connectTimeoutMs ?? getConnectTimeoutMs();
|
|
8657
8705
|
}
|
|
@@ -8901,13 +8949,7 @@ async function executeLiveRequest(options) {
|
|
|
8901
8949
|
]);
|
|
8902
8950
|
let response;
|
|
8903
8951
|
try {
|
|
8904
|
-
response = await fetch(options.url,
|
|
8905
|
-
method: options.method,
|
|
8906
|
-
headers,
|
|
8907
|
-
body: options.body,
|
|
8908
|
-
signal,
|
|
8909
|
-
dispatcher: getSharedDispatcher()
|
|
8910
|
-
});
|
|
8952
|
+
response = await fetch(options.url, buildFetchInit(options, headers, signal));
|
|
8911
8953
|
} catch (error) {
|
|
8912
8954
|
throw transportError(options, signal, error);
|
|
8913
8955
|
}
|
|
@@ -8948,13 +8990,7 @@ async function executeLiveStream(options) {
|
|
|
8948
8990
|
logDebug(`Request: ${options.method} ${options.url}`);
|
|
8949
8991
|
let response;
|
|
8950
8992
|
try {
|
|
8951
|
-
response = await fetch(options.url,
|
|
8952
|
-
method: options.method,
|
|
8953
|
-
headers,
|
|
8954
|
-
body: options.body,
|
|
8955
|
-
signal: abortController.signal,
|
|
8956
|
-
dispatcher: getSharedDispatcher()
|
|
8957
|
-
});
|
|
8993
|
+
response = await fetch(options.url, buildFetchInit(options, headers, abortController.signal));
|
|
8958
8994
|
clearActiveTimeout();
|
|
8959
8995
|
} catch (error) {
|
|
8960
8996
|
clearActiveTimeout();
|
|
@@ -9155,60 +9191,6 @@ class OperationProcessingError extends Error {
|
|
|
9155
9191
|
function OPE(message, code, cause) {
|
|
9156
9192
|
return new OperationProcessingError(message, { code, cause });
|
|
9157
9193
|
}
|
|
9158
|
-
async function calculateJwkThumbprint(jwk) {
|
|
9159
|
-
let components;
|
|
9160
|
-
switch (jwk.kty) {
|
|
9161
|
-
case "EC":
|
|
9162
|
-
components = {
|
|
9163
|
-
crv: jwk.crv,
|
|
9164
|
-
kty: jwk.kty,
|
|
9165
|
-
x: jwk.x,
|
|
9166
|
-
y: jwk.y
|
|
9167
|
-
};
|
|
9168
|
-
break;
|
|
9169
|
-
case "OKP":
|
|
9170
|
-
components = {
|
|
9171
|
-
crv: jwk.crv,
|
|
9172
|
-
kty: jwk.kty,
|
|
9173
|
-
x: jwk.x
|
|
9174
|
-
};
|
|
9175
|
-
break;
|
|
9176
|
-
case "AKP":
|
|
9177
|
-
components = {
|
|
9178
|
-
alg: jwk.alg,
|
|
9179
|
-
kty: jwk.kty,
|
|
9180
|
-
pub: jwk.pub
|
|
9181
|
-
};
|
|
9182
|
-
break;
|
|
9183
|
-
case "RSA":
|
|
9184
|
-
components = {
|
|
9185
|
-
e: jwk.e,
|
|
9186
|
-
kty: jwk.kty,
|
|
9187
|
-
n: jwk.n
|
|
9188
|
-
};
|
|
9189
|
-
break;
|
|
9190
|
-
default:
|
|
9191
|
-
throw new UnsupportedOperationError("unsupported JWK key type", { cause: jwk });
|
|
9192
|
-
}
|
|
9193
|
-
return b64u(await crypto.subtle.digest("SHA-256", buf(JSON.stringify(components))));
|
|
9194
|
-
}
|
|
9195
|
-
function assertCryptoKey(key, it) {
|
|
9196
|
-
if (!(key instanceof CryptoKey)) {
|
|
9197
|
-
throw CodedTypeError(`${it} must be a CryptoKey`, ERR_INVALID_ARG_TYPE);
|
|
9198
|
-
}
|
|
9199
|
-
}
|
|
9200
|
-
function assertPrivateKey(key, it) {
|
|
9201
|
-
assertCryptoKey(key, it);
|
|
9202
|
-
if (key.type !== "private") {
|
|
9203
|
-
throw CodedTypeError(`${it} must be a private CryptoKey`, ERR_INVALID_ARG_VALUE);
|
|
9204
|
-
}
|
|
9205
|
-
}
|
|
9206
|
-
function assertPublicKey(key, it) {
|
|
9207
|
-
assertCryptoKey(key, it);
|
|
9208
|
-
if (key.type !== "public") {
|
|
9209
|
-
throw CodedTypeError(`${it} must be a public CryptoKey`, ERR_INVALID_ARG_VALUE);
|
|
9210
|
-
}
|
|
9211
|
-
}
|
|
9212
9194
|
function isJsonObject(input) {
|
|
9213
9195
|
if (input === null || typeof input !== "object" || Array.isArray(input)) {
|
|
9214
9196
|
return false;
|
|
@@ -9309,65 +9291,6 @@ async function calculatePKCECodeChallenge(codeVerifier) {
|
|
|
9309
9291
|
assertString(codeVerifier, "codeVerifier");
|
|
9310
9292
|
return b64u(await crypto.subtle.digest("SHA-256", buf(codeVerifier)));
|
|
9311
9293
|
}
|
|
9312
|
-
function psAlg(key) {
|
|
9313
|
-
switch (key.algorithm.hash.name) {
|
|
9314
|
-
case "SHA-256":
|
|
9315
|
-
return "PS256";
|
|
9316
|
-
case "SHA-384":
|
|
9317
|
-
return "PS384";
|
|
9318
|
-
case "SHA-512":
|
|
9319
|
-
return "PS512";
|
|
9320
|
-
default:
|
|
9321
|
-
throw new UnsupportedOperationError("unsupported RsaHashedKeyAlgorithm hash name", {
|
|
9322
|
-
cause: key
|
|
9323
|
-
});
|
|
9324
|
-
}
|
|
9325
|
-
}
|
|
9326
|
-
function rsAlg(key) {
|
|
9327
|
-
switch (key.algorithm.hash.name) {
|
|
9328
|
-
case "SHA-256":
|
|
9329
|
-
return "RS256";
|
|
9330
|
-
case "SHA-384":
|
|
9331
|
-
return "RS384";
|
|
9332
|
-
case "SHA-512":
|
|
9333
|
-
return "RS512";
|
|
9334
|
-
default:
|
|
9335
|
-
throw new UnsupportedOperationError("unsupported RsaHashedKeyAlgorithm hash name", {
|
|
9336
|
-
cause: key
|
|
9337
|
-
});
|
|
9338
|
-
}
|
|
9339
|
-
}
|
|
9340
|
-
function esAlg(key) {
|
|
9341
|
-
switch (key.algorithm.namedCurve) {
|
|
9342
|
-
case "P-256":
|
|
9343
|
-
return "ES256";
|
|
9344
|
-
case "P-384":
|
|
9345
|
-
return "ES384";
|
|
9346
|
-
case "P-521":
|
|
9347
|
-
return "ES512";
|
|
9348
|
-
default:
|
|
9349
|
-
throw new UnsupportedOperationError("unsupported EcKeyAlgorithm namedCurve", { cause: key });
|
|
9350
|
-
}
|
|
9351
|
-
}
|
|
9352
|
-
function keyToJws(key) {
|
|
9353
|
-
switch (key.algorithm.name) {
|
|
9354
|
-
case "RSA-PSS":
|
|
9355
|
-
return psAlg(key);
|
|
9356
|
-
case "RSASSA-PKCS1-v1_5":
|
|
9357
|
-
return rsAlg(key);
|
|
9358
|
-
case "ECDSA":
|
|
9359
|
-
return esAlg(key);
|
|
9360
|
-
case "Ed25519":
|
|
9361
|
-
case "ML-DSA-44":
|
|
9362
|
-
case "ML-DSA-65":
|
|
9363
|
-
case "ML-DSA-87":
|
|
9364
|
-
return key.algorithm.name;
|
|
9365
|
-
case "EdDSA":
|
|
9366
|
-
return "Ed25519";
|
|
9367
|
-
default:
|
|
9368
|
-
throw new UnsupportedOperationError("unsupported CryptoKey algorithm name", { cause: key });
|
|
9369
|
-
}
|
|
9370
|
-
}
|
|
9371
9294
|
function getClockSkew(client) {
|
|
9372
9295
|
const skew = client?.[clockSkew];
|
|
9373
9296
|
return typeof skew === "number" && Number.isFinite(skew) ? skew : 0;
|
|
@@ -9396,27 +9319,6 @@ function None() {
|
|
|
9396
9319
|
body.set("client_id", client.client_id);
|
|
9397
9320
|
};
|
|
9398
9321
|
}
|
|
9399
|
-
async function signJwt(header, payload, key) {
|
|
9400
|
-
if (!key.usages.includes("sign")) {
|
|
9401
|
-
throw CodedTypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"', ERR_INVALID_ARG_VALUE);
|
|
9402
|
-
}
|
|
9403
|
-
const input = `${b64u(buf(JSON.stringify(header)))}.${b64u(buf(JSON.stringify(payload)))}`;
|
|
9404
|
-
const signature = b64u(await crypto.subtle.sign(keyToSubtle(key), key, buf(input)));
|
|
9405
|
-
return `${input}.${signature}`;
|
|
9406
|
-
}
|
|
9407
|
-
var jwkCache;
|
|
9408
|
-
async function getSetPublicJwkCache(key, alg) {
|
|
9409
|
-
const { kty, e, n, x, y, crv, pub } = await crypto.subtle.exportKey("jwk", key);
|
|
9410
|
-
const jwk = { kty, e, n, x, y, crv, pub };
|
|
9411
|
-
if (kty === "AKP")
|
|
9412
|
-
jwk.alg = alg;
|
|
9413
|
-
jwkCache.set(key, jwk);
|
|
9414
|
-
return jwk;
|
|
9415
|
-
}
|
|
9416
|
-
async function publicJwk(key, alg) {
|
|
9417
|
-
jwkCache ||= new WeakMap;
|
|
9418
|
-
return jwkCache.get(key) || getSetPublicJwkCache(key, alg);
|
|
9419
|
-
}
|
|
9420
9322
|
var URLParse = URL.parse ? (url, base) => URL.parse(url, base) : (url, base) => {
|
|
9421
9323
|
try {
|
|
9422
9324
|
return new URL(url, base);
|
|
@@ -9446,79 +9348,6 @@ function resolveEndpoint(as, endpoint, useMtlsAlias, enforceHttps) {
|
|
|
9446
9348
|
}
|
|
9447
9349
|
return validateEndpoint(as[endpoint], endpoint, useMtlsAlias, enforceHttps);
|
|
9448
9350
|
}
|
|
9449
|
-
class DPoPHandler {
|
|
9450
|
-
#header;
|
|
9451
|
-
#privateKey;
|
|
9452
|
-
#publicKey;
|
|
9453
|
-
#clockSkew;
|
|
9454
|
-
#modifyAssertion;
|
|
9455
|
-
#map;
|
|
9456
|
-
#jkt;
|
|
9457
|
-
constructor(client, keyPair, options) {
|
|
9458
|
-
assertPrivateKey(keyPair?.privateKey, '"DPoP.privateKey"');
|
|
9459
|
-
assertPublicKey(keyPair?.publicKey, '"DPoP.publicKey"');
|
|
9460
|
-
if (!keyPair.publicKey.extractable) {
|
|
9461
|
-
throw CodedTypeError('"DPoP.publicKey.extractable" must be true', ERR_INVALID_ARG_VALUE);
|
|
9462
|
-
}
|
|
9463
|
-
this.#modifyAssertion = options?.[modifyAssertion];
|
|
9464
|
-
this.#clockSkew = getClockSkew(client);
|
|
9465
|
-
this.#privateKey = keyPair.privateKey;
|
|
9466
|
-
this.#publicKey = keyPair.publicKey;
|
|
9467
|
-
branded.add(this);
|
|
9468
|
-
}
|
|
9469
|
-
#get(key) {
|
|
9470
|
-
this.#map ||= new Map;
|
|
9471
|
-
let item = this.#map.get(key);
|
|
9472
|
-
if (item) {
|
|
9473
|
-
this.#map.delete(key);
|
|
9474
|
-
this.#map.set(key, item);
|
|
9475
|
-
}
|
|
9476
|
-
return item;
|
|
9477
|
-
}
|
|
9478
|
-
#set(key, val) {
|
|
9479
|
-
this.#map ||= new Map;
|
|
9480
|
-
this.#map.delete(key);
|
|
9481
|
-
if (this.#map.size === 100) {
|
|
9482
|
-
this.#map.delete(this.#map.keys().next().value);
|
|
9483
|
-
}
|
|
9484
|
-
this.#map.set(key, val);
|
|
9485
|
-
}
|
|
9486
|
-
async calculateThumbprint() {
|
|
9487
|
-
if (!this.#jkt) {
|
|
9488
|
-
const jwk = await crypto.subtle.exportKey("jwk", this.#publicKey);
|
|
9489
|
-
this.#jkt ||= await calculateJwkThumbprint(jwk);
|
|
9490
|
-
}
|
|
9491
|
-
return this.#jkt;
|
|
9492
|
-
}
|
|
9493
|
-
async addProof(url, headers, htm, accessToken) {
|
|
9494
|
-
const alg = keyToJws(this.#privateKey);
|
|
9495
|
-
this.#header ||= {
|
|
9496
|
-
alg,
|
|
9497
|
-
typ: "dpop+jwt",
|
|
9498
|
-
jwk: await publicJwk(this.#publicKey, alg)
|
|
9499
|
-
};
|
|
9500
|
-
const nonce = this.#get(url.origin);
|
|
9501
|
-
const now = epochTime() + this.#clockSkew;
|
|
9502
|
-
const payload = {
|
|
9503
|
-
iat: now,
|
|
9504
|
-
jti: randomBytes2(),
|
|
9505
|
-
htm,
|
|
9506
|
-
nonce,
|
|
9507
|
-
htu: `${url.origin}${url.pathname}`,
|
|
9508
|
-
ath: accessToken ? b64u(await crypto.subtle.digest("SHA-256", buf(accessToken))) : undefined
|
|
9509
|
-
};
|
|
9510
|
-
this.#modifyAssertion?.(this.#header, payload);
|
|
9511
|
-
headers.set("dpop", await signJwt(this.#header, payload, this.#privateKey));
|
|
9512
|
-
}
|
|
9513
|
-
cacheNonce(response, url) {
|
|
9514
|
-
try {
|
|
9515
|
-
const nonce = response.headers.get("dpop-nonce");
|
|
9516
|
-
if (nonce) {
|
|
9517
|
-
this.#set(url.origin, nonce);
|
|
9518
|
-
}
|
|
9519
|
-
} catch {}
|
|
9520
|
-
}
|
|
9521
|
-
}
|
|
9522
9351
|
class ResponseBodyError extends Error {
|
|
9523
9352
|
cause;
|
|
9524
9353
|
code;
|
|
@@ -9987,59 +9816,6 @@ function assertReadableResponse(response) {
|
|
|
9987
9816
|
throw CodedTypeError('"response" body has been used already', ERR_INVALID_ARG_VALUE);
|
|
9988
9817
|
}
|
|
9989
9818
|
}
|
|
9990
|
-
function checkRsaKeyAlgorithm(key) {
|
|
9991
|
-
const { algorithm } = key;
|
|
9992
|
-
if (typeof algorithm.modulusLength !== "number" || algorithm.modulusLength < 2048) {
|
|
9993
|
-
throw new UnsupportedOperationError(`unsupported ${algorithm.name} modulusLength`, {
|
|
9994
|
-
cause: key
|
|
9995
|
-
});
|
|
9996
|
-
}
|
|
9997
|
-
}
|
|
9998
|
-
function ecdsaHashName(key) {
|
|
9999
|
-
const { algorithm } = key;
|
|
10000
|
-
switch (algorithm.namedCurve) {
|
|
10001
|
-
case "P-256":
|
|
10002
|
-
return "SHA-256";
|
|
10003
|
-
case "P-384":
|
|
10004
|
-
return "SHA-384";
|
|
10005
|
-
case "P-521":
|
|
10006
|
-
return "SHA-512";
|
|
10007
|
-
default:
|
|
10008
|
-
throw new UnsupportedOperationError("unsupported ECDSA namedCurve", { cause: key });
|
|
10009
|
-
}
|
|
10010
|
-
}
|
|
10011
|
-
function keyToSubtle(key) {
|
|
10012
|
-
switch (key.algorithm.name) {
|
|
10013
|
-
case "ECDSA":
|
|
10014
|
-
return {
|
|
10015
|
-
name: key.algorithm.name,
|
|
10016
|
-
hash: ecdsaHashName(key)
|
|
10017
|
-
};
|
|
10018
|
-
case "RSA-PSS": {
|
|
10019
|
-
checkRsaKeyAlgorithm(key);
|
|
10020
|
-
switch (key.algorithm.hash.name) {
|
|
10021
|
-
case "SHA-256":
|
|
10022
|
-
case "SHA-384":
|
|
10023
|
-
case "SHA-512":
|
|
10024
|
-
return {
|
|
10025
|
-
name: key.algorithm.name,
|
|
10026
|
-
saltLength: parseInt(key.algorithm.hash.name.slice(-3), 10) >> 3
|
|
10027
|
-
};
|
|
10028
|
-
default:
|
|
10029
|
-
throw new UnsupportedOperationError("unsupported RSA-PSS hash name", { cause: key });
|
|
10030
|
-
}
|
|
10031
|
-
}
|
|
10032
|
-
case "RSASSA-PKCS1-v1_5":
|
|
10033
|
-
checkRsaKeyAlgorithm(key);
|
|
10034
|
-
return key.algorithm.name;
|
|
10035
|
-
case "ML-DSA-44":
|
|
10036
|
-
case "ML-DSA-65":
|
|
10037
|
-
case "ML-DSA-87":
|
|
10038
|
-
case "Ed25519":
|
|
10039
|
-
return key.algorithm.name;
|
|
10040
|
-
}
|
|
10041
|
-
throw new UnsupportedOperationError("unsupported CryptoKey algorithm name", { cause: key });
|
|
10042
|
-
}
|
|
10043
9819
|
async function validateJwt(jws, checkAlg, clockSkew2, clockTolerance2, decryptJwt) {
|
|
10044
9820
|
let { 0: protectedHeader, 1: payload, length } = jws.split(".");
|
|
10045
9821
|
if (length === 5) {
|
|
@@ -13360,25 +13136,6 @@ function findCursor(s, o, l) {
|
|
|
13360
13136
|
const t = s + o, n = Math.max(l.length - 1, 0), e = t < 0 ? n : t > n ? 0 : t;
|
|
13361
13137
|
return l[e]?.disabled ? findCursor(e, o < 0 ? -1 : 1, l) : e;
|
|
13362
13138
|
}
|
|
13363
|
-
function findTextCursor(s, o, l, i) {
|
|
13364
|
-
const t = i.split(`
|
|
13365
|
-
`);
|
|
13366
|
-
let n = 0, e = s;
|
|
13367
|
-
for (const r of t) {
|
|
13368
|
-
if (e <= r.length)
|
|
13369
|
-
break;
|
|
13370
|
-
e -= r.length + 1, n++;
|
|
13371
|
-
}
|
|
13372
|
-
for (n = Math.max(0, Math.min(t.length - 1, n + l)), e = Math.min(e, t[n].length) + o;e < 0 && n > 0; )
|
|
13373
|
-
n--, e += t[n].length + 1;
|
|
13374
|
-
for (;e > t[n].length && n < t.length - 1; )
|
|
13375
|
-
e -= t[n].length + 1, n++;
|
|
13376
|
-
e = Math.max(0, Math.min(t[n].length, e));
|
|
13377
|
-
let h = 0;
|
|
13378
|
-
for (let r = 0;r < n; r++)
|
|
13379
|
-
h += t[r].length + 1;
|
|
13380
|
-
return h + e;
|
|
13381
|
-
}
|
|
13382
13139
|
var a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
13383
13140
|
var t = [
|
|
13384
13141
|
"January",
|
|
@@ -13615,86 +13372,6 @@ class V {
|
|
|
13615
13372
|
}
|
|
13616
13373
|
}
|
|
13617
13374
|
}
|
|
13618
|
-
function p$1(l, e) {
|
|
13619
|
-
if (l === undefined || e.length === 0)
|
|
13620
|
-
return 0;
|
|
13621
|
-
const i = e.findIndex((s) => s.value === l);
|
|
13622
|
-
return i !== -1 ? i : 0;
|
|
13623
|
-
}
|
|
13624
|
-
function g(l, e) {
|
|
13625
|
-
return (e.label ?? String(e.value)).toLowerCase().includes(l.toLowerCase());
|
|
13626
|
-
}
|
|
13627
|
-
function m(l, e) {
|
|
13628
|
-
if (e)
|
|
13629
|
-
return l ? e : e[0];
|
|
13630
|
-
}
|
|
13631
|
-
var T$1 = class T extends V {
|
|
13632
|
-
filteredOptions;
|
|
13633
|
-
multiple;
|
|
13634
|
-
isNavigating = false;
|
|
13635
|
-
selectedValues = [];
|
|
13636
|
-
focusedValue;
|
|
13637
|
-
#e = 0;
|
|
13638
|
-
#s = "";
|
|
13639
|
-
#t;
|
|
13640
|
-
#i;
|
|
13641
|
-
#n;
|
|
13642
|
-
get cursor() {
|
|
13643
|
-
return this.#e;
|
|
13644
|
-
}
|
|
13645
|
-
get userInputWithCursor() {
|
|
13646
|
-
if (!this.userInput)
|
|
13647
|
-
return styleText(["inverse", "hidden"], "_");
|
|
13648
|
-
if (this._cursor >= this.userInput.length)
|
|
13649
|
-
return `${this.userInput}\u2588`;
|
|
13650
|
-
const e = this.userInput.slice(0, this.cursor), t2 = this.userInput.slice(this.cursor, this.cursor + 1), i = this.userInput.slice(this.cursor + 1);
|
|
13651
|
-
return `${e}${styleText("inverse", t2)}${i}`;
|
|
13652
|
-
}
|
|
13653
|
-
get options() {
|
|
13654
|
-
return typeof this.#i == "function" ? this.#i() : this.#i;
|
|
13655
|
-
}
|
|
13656
|
-
constructor(e) {
|
|
13657
|
-
super(e), this.#i = e.options, this.#n = e.placeholder;
|
|
13658
|
-
const t2 = this.options;
|
|
13659
|
-
this.filteredOptions = [...t2], this.multiple = e.multiple === true, this.#t = typeof e.options == "function" ? e.filter : e.filter ?? g;
|
|
13660
|
-
let i;
|
|
13661
|
-
if (e.initialValue && Array.isArray(e.initialValue) ? this.multiple ? i = e.initialValue : i = e.initialValue.slice(0, 1) : !this.multiple && this.options.length > 0 && (i = [this.options[0]?.value]), i)
|
|
13662
|
-
for (const s of i) {
|
|
13663
|
-
const n = t2.findIndex((o) => o.value === s);
|
|
13664
|
-
n !== -1 && (this.toggleSelected(s), this.#e = n);
|
|
13665
|
-
}
|
|
13666
|
-
this.focusedValue = this.options[this.#e]?.value, this.on("key", (s, n) => this.#l(s, n)), this.on("userInput", (s) => this.#u(s));
|
|
13667
|
-
}
|
|
13668
|
-
_isActionKey(e, t2) {
|
|
13669
|
-
return e === "\t" || this.multiple && this.isNavigating && t2.name === "space" && e !== undefined && e !== "";
|
|
13670
|
-
}
|
|
13671
|
-
#l(e, t2) {
|
|
13672
|
-
const i = t2.name === "up", s = t2.name === "down", n = t2.name === "return", o = this.userInput === "" || this.userInput === "\t", u = this.#n, a = this.options, f = u !== undefined && u !== "" && a.some((r) => !r.disabled && (this.#t ? this.#t(u, r) : true));
|
|
13673
|
-
if (t2.name === "tab" && o && f) {
|
|
13674
|
-
this.userInput === "\t" && this._clearUserInput(), this._setUserInput(u, true), this.isNavigating = false;
|
|
13675
|
-
return;
|
|
13676
|
-
}
|
|
13677
|
-
i || s ? (this.#e = findCursor(this.#e, i ? -1 : 1, this.filteredOptions), this.focusedValue = this.filteredOptions[this.#e]?.value, this.multiple || (this.selectedValues = [this.focusedValue]), this.isNavigating = true) : n ? this.value = m(this.multiple, this.selectedValues) : this.multiple ? this.focusedValue !== undefined && (t2.name === "tab" || this.isNavigating && t2.name === "space") ? this.toggleSelected(this.focusedValue) : this.isNavigating = false : (this.focusedValue && (this.selectedValues = [this.focusedValue]), this.isNavigating = false);
|
|
13678
|
-
}
|
|
13679
|
-
deselectAll() {
|
|
13680
|
-
this.selectedValues = [];
|
|
13681
|
-
}
|
|
13682
|
-
toggleSelected(e) {
|
|
13683
|
-
this.filteredOptions.length !== 0 && (this.multiple ? this.selectedValues.includes(e) ? this.selectedValues = this.selectedValues.filter((t2) => t2 !== e) : this.selectedValues = [...this.selectedValues, e] : this.selectedValues = [e]);
|
|
13684
|
-
}
|
|
13685
|
-
#u(e) {
|
|
13686
|
-
if (e !== this.#s) {
|
|
13687
|
-
this.#s = e;
|
|
13688
|
-
const t2 = this.options;
|
|
13689
|
-
e && this.#t ? this.filteredOptions = t2.filter((n) => this.#t?.(e, n)) : this.filteredOptions = [...t2];
|
|
13690
|
-
const i = p$1(this.focusedValue, this.filteredOptions);
|
|
13691
|
-
this.#e = findCursor(i, 0, this.filteredOptions);
|
|
13692
|
-
const s = this.filteredOptions[this.#e];
|
|
13693
|
-
s && !s.disabled ? this.focusedValue = s.value : this.focusedValue = undefined, this.multiple || (this.focusedValue !== undefined ? this.toggleSelected(this.focusedValue) : this.deselectAll());
|
|
13694
|
-
}
|
|
13695
|
-
}
|
|
13696
|
-
};
|
|
13697
|
-
|
|
13698
13375
|
class r extends V {
|
|
13699
13376
|
get cursor() {
|
|
13700
13377
|
return this.value ? 0 : 1;
|
|
@@ -13712,365 +13389,7 @@ class r extends V {
|
|
|
13712
13389
|
});
|
|
13713
13390
|
}
|
|
13714
13391
|
}
|
|
13715
|
-
var
|
|
13716
|
-
Y: { type: "year", len: 4 },
|
|
13717
|
-
M: { type: "month", len: 2 },
|
|
13718
|
-
D: { type: "day", len: 2 }
|
|
13719
|
-
};
|
|
13720
|
-
function M(r2) {
|
|
13721
|
-
return [...r2].map((t2) => _[t2]);
|
|
13722
|
-
}
|
|
13723
|
-
function P(r2) {
|
|
13724
|
-
const i = new Intl.DateTimeFormat(r2, {
|
|
13725
|
-
year: "numeric",
|
|
13726
|
-
month: "2-digit",
|
|
13727
|
-
day: "2-digit"
|
|
13728
|
-
}).formatToParts(new Date(2000, 0, 15)), s = [];
|
|
13729
|
-
let n = "/";
|
|
13730
|
-
for (const e of i)
|
|
13731
|
-
e.type === "literal" ? n = e.value.trim() || e.value : (e.type === "year" || e.type === "month" || e.type === "day") && s.push({ type: e.type, len: e.type === "year" ? 4 : 2 });
|
|
13732
|
-
return { segments: s, separator: n };
|
|
13733
|
-
}
|
|
13734
|
-
function p(r2) {
|
|
13735
|
-
return Number.parseInt((r2 || "0").replace(/_/g, "0"), 10) || 0;
|
|
13736
|
-
}
|
|
13737
|
-
function f(r2) {
|
|
13738
|
-
return {
|
|
13739
|
-
year: p(r2.year),
|
|
13740
|
-
month: p(r2.month),
|
|
13741
|
-
day: p(r2.day)
|
|
13742
|
-
};
|
|
13743
|
-
}
|
|
13744
|
-
function c(r2, t2) {
|
|
13745
|
-
return new Date(r2 || 2001, t2 || 1, 0).getDate();
|
|
13746
|
-
}
|
|
13747
|
-
function b(r2) {
|
|
13748
|
-
const { year: t2, month: i, day: s } = f(r2);
|
|
13749
|
-
if (!t2 || t2 < 0 || t2 > 9999 || !i || i < 1 || i > 12 || !s || s < 1)
|
|
13750
|
-
return;
|
|
13751
|
-
const n = new Date(Date.UTC(t2, i - 1, s));
|
|
13752
|
-
if (!(n.getUTCFullYear() !== t2 || n.getUTCMonth() !== i - 1 || n.getUTCDate() !== s))
|
|
13753
|
-
return { year: t2, month: i, day: s };
|
|
13754
|
-
}
|
|
13755
|
-
function C(r2) {
|
|
13756
|
-
const t2 = b(r2);
|
|
13757
|
-
return t2 ? new Date(Date.UTC(t2.year, t2.month - 1, t2.day)) : undefined;
|
|
13758
|
-
}
|
|
13759
|
-
function T2(r2, t2, i, s) {
|
|
13760
|
-
const n = i ? {
|
|
13761
|
-
year: i.getUTCFullYear(),
|
|
13762
|
-
month: i.getUTCMonth() + 1,
|
|
13763
|
-
day: i.getUTCDate()
|
|
13764
|
-
} : null, e = s ? {
|
|
13765
|
-
year: s.getUTCFullYear(),
|
|
13766
|
-
month: s.getUTCMonth() + 1,
|
|
13767
|
-
day: s.getUTCDate()
|
|
13768
|
-
} : null;
|
|
13769
|
-
return r2 === "year" ? { min: n?.year ?? 1, max: e?.year ?? 9999 } : r2 === "month" ? {
|
|
13770
|
-
min: n && t2.year === n.year ? n.month : 1,
|
|
13771
|
-
max: e && t2.year === e.year ? e.month : 12
|
|
13772
|
-
} : {
|
|
13773
|
-
min: n && t2.year === n.year && t2.month === n.month ? n.day : 1,
|
|
13774
|
-
max: e && t2.year === e.year && t2.month === e.month ? e.day : c(t2.year, t2.month)
|
|
13775
|
-
};
|
|
13776
|
-
}
|
|
13777
|
-
|
|
13778
|
-
class U extends V {
|
|
13779
|
-
#i;
|
|
13780
|
-
#o;
|
|
13781
|
-
#t;
|
|
13782
|
-
#h;
|
|
13783
|
-
#u;
|
|
13784
|
-
#e = { segmentIndex: 0, positionInSegment: 0 };
|
|
13785
|
-
#n = true;
|
|
13786
|
-
#s = null;
|
|
13787
|
-
inlineError = "";
|
|
13788
|
-
get segmentCursor() {
|
|
13789
|
-
return { ...this.#e };
|
|
13790
|
-
}
|
|
13791
|
-
get segmentValues() {
|
|
13792
|
-
return { ...this.#t };
|
|
13793
|
-
}
|
|
13794
|
-
get segments() {
|
|
13795
|
-
return this.#i;
|
|
13796
|
-
}
|
|
13797
|
-
get separator() {
|
|
13798
|
-
return this.#o;
|
|
13799
|
-
}
|
|
13800
|
-
get formattedValue() {
|
|
13801
|
-
return this.#l(this.#t);
|
|
13802
|
-
}
|
|
13803
|
-
#l(t2) {
|
|
13804
|
-
return this.#i.map((i) => t2[i.type]).join(this.#o);
|
|
13805
|
-
}
|
|
13806
|
-
#r() {
|
|
13807
|
-
this._setUserInput(this.#l(this.#t)), this._setValue(C(this.#t) ?? undefined);
|
|
13808
|
-
}
|
|
13809
|
-
constructor(t2) {
|
|
13810
|
-
const i = t2.format ? { segments: M(t2.format), separator: t2.separator ?? "/" } : P(t2.locale), s = t2.separator ?? i.separator, n = t2.format ? M(t2.format) : i.segments, e = t2.initialValue ?? t2.defaultValue, m2 = e ? {
|
|
13811
|
-
year: String(e.getUTCFullYear()).padStart(4, "0"),
|
|
13812
|
-
month: String(e.getUTCMonth() + 1).padStart(2, "0"),
|
|
13813
|
-
day: String(e.getUTCDate()).padStart(2, "0")
|
|
13814
|
-
} : { year: "____", month: "__", day: "__" }, o = n.map((a) => m2[a.type]).join(s);
|
|
13815
|
-
super({ ...t2, initialUserInput: o }, false), this.#i = n, this.#o = s, this.#t = m2, this.#h = t2.minDate, this.#u = t2.maxDate, this.#r(), this.on("cursor", (a) => this.#f(a)), this.on("key", (a, u) => this.#y(a, u)), this.on("finalize", () => this.#p(t2));
|
|
13816
|
-
}
|
|
13817
|
-
#a() {
|
|
13818
|
-
const t2 = Math.max(0, Math.min(this.#e.segmentIndex, this.#i.length - 1)), i = this.#i[t2];
|
|
13819
|
-
if (i)
|
|
13820
|
-
return this.#e.positionInSegment = Math.max(0, Math.min(this.#e.positionInSegment, i.len - 1)), { segment: i, index: t2 };
|
|
13821
|
-
}
|
|
13822
|
-
#m(t2) {
|
|
13823
|
-
this.inlineError = "", this.#s = null;
|
|
13824
|
-
const i = this.#a();
|
|
13825
|
-
i && (this.#e.segmentIndex = Math.max(0, Math.min(this.#i.length - 1, i.index + t2)), this.#e.positionInSegment = 0, this.#n = true);
|
|
13826
|
-
}
|
|
13827
|
-
#d(t2) {
|
|
13828
|
-
const i = this.#a();
|
|
13829
|
-
if (!i)
|
|
13830
|
-
return;
|
|
13831
|
-
const { segment: s } = i, n = this.#t[s.type], e = !n || n.replace(/_/g, "") === "", m2 = Number.parseInt((n || "0").replace(/_/g, "0"), 10) || 0, o = T2(s.type, f(this.#t), this.#h, this.#u);
|
|
13832
|
-
let a;
|
|
13833
|
-
e ? a = t2 === 1 ? o.min : o.max : a = Math.max(Math.min(o.max, m2 + t2), o.min), this.#t = {
|
|
13834
|
-
...this.#t,
|
|
13835
|
-
[s.type]: a.toString().padStart(s.len, "0")
|
|
13836
|
-
}, this.#n = true, this.#s = null, this.#r();
|
|
13837
|
-
}
|
|
13838
|
-
#f(t2) {
|
|
13839
|
-
if (t2)
|
|
13840
|
-
switch (t2) {
|
|
13841
|
-
case "right":
|
|
13842
|
-
return this.#m(1);
|
|
13843
|
-
case "left":
|
|
13844
|
-
return this.#m(-1);
|
|
13845
|
-
case "up":
|
|
13846
|
-
return this.#d(1);
|
|
13847
|
-
case "down":
|
|
13848
|
-
return this.#d(-1);
|
|
13849
|
-
}
|
|
13850
|
-
}
|
|
13851
|
-
#y(t2, i) {
|
|
13852
|
-
if (i?.name === "backspace" || i?.sequence === "\x7F" || i?.sequence === "\b" || t2 === "\x7F" || t2 === "\b") {
|
|
13853
|
-
this.inlineError = "";
|
|
13854
|
-
const n = this.#a();
|
|
13855
|
-
if (!n)
|
|
13856
|
-
return;
|
|
13857
|
-
if (!this.#t[n.segment.type].replace(/_/g, "")) {
|
|
13858
|
-
this.#m(-1);
|
|
13859
|
-
return;
|
|
13860
|
-
}
|
|
13861
|
-
this.#t[n.segment.type] = "_".repeat(n.segment.len), this.#n = true, this.#e.positionInSegment = 0, this.#r();
|
|
13862
|
-
return;
|
|
13863
|
-
}
|
|
13864
|
-
if (i?.name === "tab") {
|
|
13865
|
-
this.inlineError = "";
|
|
13866
|
-
const n = this.#a();
|
|
13867
|
-
if (!n)
|
|
13868
|
-
return;
|
|
13869
|
-
const e = i.shift ? -1 : 1, m2 = n.index + e;
|
|
13870
|
-
m2 >= 0 && m2 < this.#i.length && (this.#e.segmentIndex = m2, this.#e.positionInSegment = 0, this.#n = true);
|
|
13871
|
-
return;
|
|
13872
|
-
}
|
|
13873
|
-
if (t2 && /^[0-9]$/.test(t2)) {
|
|
13874
|
-
const n = this.#a();
|
|
13875
|
-
if (!n)
|
|
13876
|
-
return;
|
|
13877
|
-
const { segment: e } = n, m2 = !this.#t[e.type].replace(/_/g, "");
|
|
13878
|
-
if (this.#n && this.#s !== null && !m2) {
|
|
13879
|
-
const h = this.#s + t2, d = { ...this.#t, [e.type]: h }, g2 = this.#g(d, e);
|
|
13880
|
-
if (g2) {
|
|
13881
|
-
this.inlineError = g2, this.#s = null, this.#n = false;
|
|
13882
|
-
return;
|
|
13883
|
-
}
|
|
13884
|
-
this.inlineError = "", this.#t[e.type] = h, this.#s = null, this.#n = false, this.#r(), n.index < this.#i.length - 1 && (this.#e.segmentIndex = n.index + 1, this.#e.positionInSegment = 0, this.#n = true);
|
|
13885
|
-
return;
|
|
13886
|
-
}
|
|
13887
|
-
this.#n && !m2 && (this.#t[e.type] = "_".repeat(e.len), this.#e.positionInSegment = 0), this.#n = false, this.#s = null;
|
|
13888
|
-
const o = this.#t[e.type], a = o.indexOf("_"), u = a >= 0 ? a : Math.min(this.#e.positionInSegment, e.len - 1);
|
|
13889
|
-
if (u < 0 || u >= e.len)
|
|
13890
|
-
return;
|
|
13891
|
-
let l = o.slice(0, u) + t2 + o.slice(u + 1), D = false;
|
|
13892
|
-
if (u === 0 && o === "__" && (e.type === "month" || e.type === "day")) {
|
|
13893
|
-
const h = Number.parseInt(t2, 10);
|
|
13894
|
-
l = `0${t2}`, D = h <= (e.type === "month" ? 1 : 2);
|
|
13895
|
-
}
|
|
13896
|
-
if (e.type === "year" && (l = (o.replace(/_/g, "") + t2).padStart(e.len, "_")), !l.includes("_")) {
|
|
13897
|
-
const h = { ...this.#t, [e.type]: l }, d = this.#g(h, e);
|
|
13898
|
-
if (d) {
|
|
13899
|
-
this.inlineError = d;
|
|
13900
|
-
return;
|
|
13901
|
-
}
|
|
13902
|
-
}
|
|
13903
|
-
this.inlineError = "", this.#t[e.type] = l;
|
|
13904
|
-
const y = l.includes("_") ? undefined : b(this.#t);
|
|
13905
|
-
if (y) {
|
|
13906
|
-
const { year: h, month: d } = y, g2 = c(h, d);
|
|
13907
|
-
this.#t = {
|
|
13908
|
-
year: String(Math.max(0, Math.min(9999, h))).padStart(4, "0"),
|
|
13909
|
-
month: String(Math.max(1, Math.min(12, d))).padStart(2, "0"),
|
|
13910
|
-
day: String(Math.max(1, Math.min(g2, y.day))).padStart(2, "0")
|
|
13911
|
-
};
|
|
13912
|
-
}
|
|
13913
|
-
this.#r();
|
|
13914
|
-
const S = l.indexOf("_");
|
|
13915
|
-
D ? (this.#n = true, this.#s = t2) : S >= 0 ? this.#e.positionInSegment = S : a >= 0 && n.index < this.#i.length - 1 ? (this.#e.segmentIndex = n.index + 1, this.#e.positionInSegment = 0, this.#n = true) : this.#e.positionInSegment = Math.min(u + 1, e.len - 1);
|
|
13916
|
-
}
|
|
13917
|
-
}
|
|
13918
|
-
#g(t2, i) {
|
|
13919
|
-
const { month: s, day: n } = f(t2);
|
|
13920
|
-
if (i.type === "month" && (s < 0 || s > 12))
|
|
13921
|
-
return settings.date.messages.invalidMonth;
|
|
13922
|
-
if (i.type === "day" && (n < 0 || n > 31))
|
|
13923
|
-
return settings.date.messages.invalidDay(31, "any month");
|
|
13924
|
-
}
|
|
13925
|
-
#p(t2) {
|
|
13926
|
-
const { year: i, month: s, day: n } = f(this.#t);
|
|
13927
|
-
if (i && s && n) {
|
|
13928
|
-
const e = c(i, s);
|
|
13929
|
-
this.#t = {
|
|
13930
|
-
...this.#t,
|
|
13931
|
-
day: String(Math.min(n, e)).padStart(2, "0")
|
|
13932
|
-
};
|
|
13933
|
-
}
|
|
13934
|
-
this.value = C(this.#t) ?? t2.defaultValue ?? undefined;
|
|
13935
|
-
}
|
|
13936
|
-
}
|
|
13937
|
-
var u$2 = class u extends V {
|
|
13938
|
-
options;
|
|
13939
|
-
cursor = 0;
|
|
13940
|
-
#t;
|
|
13941
|
-
getGroupItems(t2) {
|
|
13942
|
-
return this.options.filter((r2) => r2.group === t2);
|
|
13943
|
-
}
|
|
13944
|
-
isGroupSelected(t2) {
|
|
13945
|
-
const r2 = this.getGroupItems(t2), e = this.value;
|
|
13946
|
-
return e === undefined ? false : r2.every((s) => e.includes(s.value));
|
|
13947
|
-
}
|
|
13948
|
-
toggleValue() {
|
|
13949
|
-
const t2 = this.options[this.cursor];
|
|
13950
|
-
if (t2 !== undefined)
|
|
13951
|
-
if (this.value === undefined && (this.value = []), t2.group === true) {
|
|
13952
|
-
const r2 = t2.value, e = this.getGroupItems(r2);
|
|
13953
|
-
this.isGroupSelected(r2) ? this.value = this.value.filter((s) => e.findIndex((i) => i.value === s) === -1) : this.value = [...this.value, ...e.map((s) => s.value)], this.value = Array.from(new Set(this.value));
|
|
13954
|
-
} else {
|
|
13955
|
-
const r2 = this.value.includes(t2.value);
|
|
13956
|
-
this.value = r2 ? this.value.filter((e) => e !== t2.value) : [...this.value, t2.value];
|
|
13957
|
-
}
|
|
13958
|
-
}
|
|
13959
|
-
constructor(t2) {
|
|
13960
|
-
super(t2, false);
|
|
13961
|
-
const { options: r2 } = t2;
|
|
13962
|
-
this.#t = t2.selectableGroups !== false, this.options = Object.entries(r2).flatMap(([e, s]) => [
|
|
13963
|
-
{ value: e, group: true, label: e },
|
|
13964
|
-
...s.map((i) => ({ ...i, group: e }))
|
|
13965
|
-
]), this.value = [...t2.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: e }) => e === t2.cursorAt), this.#t ? 0 : 1), this.on("cursor", (e) => {
|
|
13966
|
-
switch (e) {
|
|
13967
|
-
case "left":
|
|
13968
|
-
case "up": {
|
|
13969
|
-
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
13970
|
-
const s = this.options[this.cursor]?.group === true;
|
|
13971
|
-
!this.#t && s && (this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1);
|
|
13972
|
-
break;
|
|
13973
|
-
}
|
|
13974
|
-
case "down":
|
|
13975
|
-
case "right": {
|
|
13976
|
-
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
13977
|
-
const s = this.options[this.cursor]?.group === true;
|
|
13978
|
-
!this.#t && s && (this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1);
|
|
13979
|
-
break;
|
|
13980
|
-
}
|
|
13981
|
-
case "space":
|
|
13982
|
-
this.toggleValue();
|
|
13983
|
-
break;
|
|
13984
|
-
}
|
|
13985
|
-
});
|
|
13986
|
-
}
|
|
13987
|
-
};
|
|
13988
|
-
var o = /* @__PURE__ */ new Set(["up", "down", "left", "right"]);
|
|
13989
|
-
|
|
13990
|
-
class h extends V {
|
|
13991
|
-
#t = false;
|
|
13992
|
-
#s;
|
|
13993
|
-
focused = "editor";
|
|
13994
|
-
get userInputWithCursor() {
|
|
13995
|
-
if (this.state === "submit")
|
|
13996
|
-
return this.userInput;
|
|
13997
|
-
const t2 = this.userInput;
|
|
13998
|
-
if (this.cursor >= t2.length)
|
|
13999
|
-
return `${t2}\u2588`;
|
|
14000
|
-
const s = t2.slice(0, this.cursor), r2 = t2.slice(this.cursor, this.cursor + 1), i = t2.slice(this.cursor + 1);
|
|
14001
|
-
return r2 === `
|
|
14002
|
-
` ? `${s}\u2588
|
|
14003
|
-
${i}` : `${s}${styleText("inverse", r2)}${i}`;
|
|
14004
|
-
}
|
|
14005
|
-
get cursor() {
|
|
14006
|
-
return this._cursor;
|
|
14007
|
-
}
|
|
14008
|
-
#r(t2) {
|
|
14009
|
-
if (this.userInput.length === 0) {
|
|
14010
|
-
this._setUserInput(t2);
|
|
14011
|
-
return;
|
|
14012
|
-
}
|
|
14013
|
-
this._setUserInput(this.userInput.slice(0, this.cursor) + t2 + this.userInput.slice(this.cursor));
|
|
14014
|
-
}
|
|
14015
|
-
#i(t2) {
|
|
14016
|
-
const s = this.value ?? "";
|
|
14017
|
-
switch (t2) {
|
|
14018
|
-
case "up":
|
|
14019
|
-
this._cursor = findTextCursor(this._cursor, 0, -1, s);
|
|
14020
|
-
return;
|
|
14021
|
-
case "down":
|
|
14022
|
-
this._cursor = findTextCursor(this._cursor, 0, 1, s);
|
|
14023
|
-
return;
|
|
14024
|
-
case "left":
|
|
14025
|
-
this._cursor = findTextCursor(this._cursor, -1, 0, s);
|
|
14026
|
-
return;
|
|
14027
|
-
case "right":
|
|
14028
|
-
this._cursor = findTextCursor(this._cursor, 1, 0, s);
|
|
14029
|
-
return;
|
|
14030
|
-
}
|
|
14031
|
-
}
|
|
14032
|
-
_shouldSubmit(t2, s) {
|
|
14033
|
-
if (this.#s)
|
|
14034
|
-
return this.focused === "submit" ? true : (this.#r(`
|
|
14035
|
-
`), this._cursor++, false);
|
|
14036
|
-
const r2 = this.#t;
|
|
14037
|
-
return this.#t = true, r2 && this.cursor === this.userInput.length ? (this.userInput[this.cursor - 1] === `
|
|
14038
|
-
` && (this._setUserInput(this.userInput.slice(0, this.cursor - 1) + this.userInput.slice(this.cursor)), this._cursor--), true) : (this.#r(`
|
|
14039
|
-
`), this._cursor++, false);
|
|
14040
|
-
}
|
|
14041
|
-
constructor(t2) {
|
|
14042
|
-
const s = t2.initialUserInput ?? t2.initialValue;
|
|
14043
|
-
super({
|
|
14044
|
-
...t2,
|
|
14045
|
-
initialUserInput: s
|
|
14046
|
-
}, false), s !== undefined && (this._cursor = s.length), this.#s = t2.showSubmit ?? false, this.on("key", (r2, i) => {
|
|
14047
|
-
if (i?.name && o.has(i.name)) {
|
|
14048
|
-
this.#t = false, this.#i(i.name);
|
|
14049
|
-
return;
|
|
14050
|
-
}
|
|
14051
|
-
if (r2 === "\t" && this.#s) {
|
|
14052
|
-
this.focused = this.focused === "editor" ? "submit" : "editor";
|
|
14053
|
-
return;
|
|
14054
|
-
}
|
|
14055
|
-
if (i?.name !== "return") {
|
|
14056
|
-
if (this.#t = false, i?.name === "backspace" && this.cursor > 0) {
|
|
14057
|
-
this._setUserInput(this.userInput.slice(0, this.cursor - 1) + this.userInput.slice(this.cursor)), this._cursor--;
|
|
14058
|
-
return;
|
|
14059
|
-
}
|
|
14060
|
-
if (i?.name === "delete" && this.cursor < this.userInput.length) {
|
|
14061
|
-
this._setUserInput(this.userInput.slice(0, this.cursor) + this.userInput.slice(this.cursor + 1));
|
|
14062
|
-
return;
|
|
14063
|
-
}
|
|
14064
|
-
r2 && (this.#s && this.focused === "submit" && (this.focused = "editor"), this.#r(r2 ?? ""), this._cursor++);
|
|
14065
|
-
}
|
|
14066
|
-
}), this.on("userInput", (r2) => {
|
|
14067
|
-
this._setValue(r2);
|
|
14068
|
-
}), this.on("finalize", () => {
|
|
14069
|
-
this.value || (this.value = t2.defaultValue), this.value === undefined && (this.value = "");
|
|
14070
|
-
});
|
|
14071
|
-
}
|
|
14072
|
-
}
|
|
14073
|
-
var u$1 = class u2 extends V {
|
|
13392
|
+
var u$1 = class u extends V {
|
|
14074
13393
|
_mask = "\u2022";
|
|
14075
13394
|
get cursor() {
|
|
14076
13395
|
return this._cursor;
|
|
@@ -14084,8 +13403,8 @@ var u$1 = class u2 extends V {
|
|
|
14084
13403
|
const t2 = this.userInput;
|
|
14085
13404
|
if (this.cursor >= t2.length)
|
|
14086
13405
|
return `${this.masked}${styleText(["inverse", "hidden"], "_")}`;
|
|
14087
|
-
const s = this.masked, r2 = s.slice(0, this.cursor), i = s.slice(this.cursor, this.cursor + 1),
|
|
14088
|
-
return `${r2}${styleText("inverse", i)}${
|
|
13406
|
+
const s = this.masked, r2 = s.slice(0, this.cursor), i = s.slice(this.cursor, this.cursor + 1), o = s.slice(this.cursor + 1);
|
|
13407
|
+
return `${r2}${styleText("inverse", i)}${o}`;
|
|
14089
13408
|
}
|
|
14090
13409
|
clear() {
|
|
14091
13410
|
this._clearUserInput();
|
|
@@ -14110,7 +13429,7 @@ var n$1 = class n extends V {
|
|
|
14110
13429
|
}
|
|
14111
13430
|
constructor(e) {
|
|
14112
13431
|
super(e, false), this.options = e.options;
|
|
14113
|
-
const
|
|
13432
|
+
const o = this.options.findIndex(({ value: s }) => s === e.initialValue), t2 = o === -1 ? 0 : o;
|
|
14114
13433
|
this.cursor = this.options[t2]?.disabled ? findCursor(t2, 1, this.options) : t2, this.changeValue(), this.on("cursor", (s) => {
|
|
14115
13434
|
switch (s) {
|
|
14116
13435
|
case "left":
|
|
@@ -14162,7 +13481,7 @@ function isUnicodeSupported() {
|
|
|
14162
13481
|
return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
14163
13482
|
}
|
|
14164
13483
|
var unicode = isUnicodeSupported();
|
|
14165
|
-
var unicodeOr = (
|
|
13484
|
+
var unicodeOr = (o, e) => unicode ? o : e;
|
|
14166
13485
|
var S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
|
|
14167
13486
|
var S_STEP_CANCEL = unicodeOr("\u25A0", "x");
|
|
14168
13487
|
var S_STEP_ERROR = unicodeOr("\u25B2", "x");
|
|
@@ -14188,8 +13507,8 @@ var S_INFO = unicodeOr("\u25CF", "\u2022");
|
|
|
14188
13507
|
var S_SUCCESS = unicodeOr("\u25C6", "*");
|
|
14189
13508
|
var S_WARN = unicodeOr("\u25B2", "!");
|
|
14190
13509
|
var S_ERROR = unicodeOr("\u25A0", "x");
|
|
14191
|
-
var symbol = (
|
|
14192
|
-
switch (
|
|
13510
|
+
var symbol = (o) => {
|
|
13511
|
+
switch (o) {
|
|
14193
13512
|
case "initial":
|
|
14194
13513
|
case "active":
|
|
14195
13514
|
return styleText2("cyan", S_STEP_ACTIVE);
|
|
@@ -14201,8 +13520,8 @@ var symbol = (o2) => {
|
|
|
14201
13520
|
return styleText2("green", S_STEP_SUBMIT);
|
|
14202
13521
|
}
|
|
14203
13522
|
};
|
|
14204
|
-
var symbolBar = (
|
|
14205
|
-
switch (
|
|
13523
|
+
var symbolBar = (o) => {
|
|
13524
|
+
switch (o) {
|
|
14206
13525
|
case "initial":
|
|
14207
13526
|
case "active":
|
|
14208
13527
|
return styleText2("cyan", S_BAR);
|
|
@@ -14214,22 +13533,22 @@ var symbolBar = (o2) => {
|
|
|
14214
13533
|
return styleText2("green", S_BAR);
|
|
14215
13534
|
}
|
|
14216
13535
|
};
|
|
14217
|
-
function formatInstructionFooter(
|
|
14218
|
-
const r2 = [`${e ? `${styleText2("cyan", S_BAR)} ` : ""}${
|
|
13536
|
+
function formatInstructionFooter(o, e) {
|
|
13537
|
+
const r2 = [`${e ? `${styleText2("cyan", S_BAR)} ` : ""}${o.join(" \u2022 ")}`];
|
|
14219
13538
|
return e && r2.push(styleText2("cyan", S_BAR_END)), r2;
|
|
14220
13539
|
}
|
|
14221
|
-
var I = (l, e, w,
|
|
13540
|
+
var I = (l, e, w, p, b, C = false) => {
|
|
14222
13541
|
let r2 = e, O = 0;
|
|
14223
|
-
if (
|
|
14224
|
-
for (let i =
|
|
14225
|
-
const
|
|
14226
|
-
if (
|
|
13542
|
+
if (C)
|
|
13543
|
+
for (let i = p - 1;i >= w; i--) {
|
|
13544
|
+
const m = l[i];
|
|
13545
|
+
if (m && (r2 -= m.length), O++, r2 <= b)
|
|
14227
13546
|
break;
|
|
14228
13547
|
}
|
|
14229
13548
|
else
|
|
14230
|
-
for (let i = w;i <
|
|
14231
|
-
const
|
|
14232
|
-
if (
|
|
13549
|
+
for (let i = w;i < p; i++) {
|
|
13550
|
+
const m = l[i];
|
|
13551
|
+
if (m && (r2 -= m.length), O++, r2 <= b)
|
|
14233
13552
|
break;
|
|
14234
13553
|
}
|
|
14235
13554
|
return { lineCount: r2, removals: O };
|
|
@@ -14238,40 +13557,40 @@ var limitOptions = ({
|
|
|
14238
13557
|
cursor: l,
|
|
14239
13558
|
options: e,
|
|
14240
13559
|
style: w,
|
|
14241
|
-
output:
|
|
14242
|
-
maxItems:
|
|
14243
|
-
columnPadding:
|
|
13560
|
+
output: p = process.stdout,
|
|
13561
|
+
maxItems: b = Number.POSITIVE_INFINITY,
|
|
13562
|
+
columnPadding: C = 0,
|
|
14244
13563
|
rowPadding: r2 = 4
|
|
14245
13564
|
}) => {
|
|
14246
|
-
const i = getColumns(
|
|
14247
|
-
let
|
|
14248
|
-
l >= a2 - 3 && (
|
|
14249
|
-
let d = a2 < e.length &&
|
|
14250
|
-
const W = Math.min(
|
|
14251
|
-
let
|
|
14252
|
-
d &&
|
|
14253
|
-
const
|
|
14254
|
-
for (let t2 =
|
|
14255
|
-
const n3 = e[t2],
|
|
13565
|
+
const i = getColumns(p) - C, m = getRows(p), M = styleText2("dim", "..."), v = Math.max(m - r2, 0), a2 = Math.max(Math.min(b, v), 5);
|
|
13566
|
+
let f = 0;
|
|
13567
|
+
l >= a2 - 3 && (f = Math.max(Math.min(l - a2 + 3, e.length - a2), 0));
|
|
13568
|
+
let d = a2 < e.length && f > 0, c = a2 < e.length && f + a2 < e.length;
|
|
13569
|
+
const W = Math.min(f + a2, e.length), s = [];
|
|
13570
|
+
let g = 0;
|
|
13571
|
+
d && g++, c && g++;
|
|
13572
|
+
const T = f + (d ? 1 : 0), y = W - (c ? 1 : 0);
|
|
13573
|
+
for (let t2 = T;t2 < y; t2++) {
|
|
13574
|
+
const n3 = e[t2], o = n3 ? w(n3, t2 === l) : "", h2 = wrapAnsi(o, i, {
|
|
14256
13575
|
hard: true,
|
|
14257
13576
|
trim: false
|
|
14258
13577
|
}).split(`
|
|
14259
13578
|
`);
|
|
14260
|
-
s.push(h2),
|
|
13579
|
+
s.push(h2), g += h2.length;
|
|
14261
13580
|
}
|
|
14262
|
-
if (
|
|
14263
|
-
let t2 = 0, n3 = 0,
|
|
14264
|
-
const h2 = l -
|
|
14265
|
-
let
|
|
14266
|
-
const L = () => I(s,
|
|
14267
|
-
d ? ({ lineCount:
|
|
13581
|
+
if (g > v) {
|
|
13582
|
+
let t2 = 0, n3 = 0, o = g;
|
|
13583
|
+
const h2 = l - T;
|
|
13584
|
+
let u3 = v;
|
|
13585
|
+
const L = () => I(s, o, 0, h2, u3), E = () => I(s, o, h2 + 1, s.length, u3, true);
|
|
13586
|
+
d ? ({ lineCount: o, removals: t2 } = L(), o > u3 && (c || (u3 -= 1), { lineCount: o, removals: n3 } = E())) : (c || (u3 -= 1), { lineCount: o, removals: n3 } = E(), o > u3 && (u3 -= 1, { lineCount: o, removals: t2 } = L())), t2 > 0 && (d = true, s.splice(0, t2)), n3 > 0 && (c = true, s.splice(s.length - n3, n3));
|
|
14268
13587
|
}
|
|
14269
13588
|
const x = [];
|
|
14270
|
-
d && x.push(
|
|
13589
|
+
d && x.push(M);
|
|
14271
13590
|
for (const t2 of s)
|
|
14272
13591
|
for (const n3 of t2)
|
|
14273
13592
|
x.push(n3);
|
|
14274
|
-
return
|
|
13593
|
+
return c && x.push(M), x;
|
|
14275
13594
|
};
|
|
14276
13595
|
var confirm = (i) => {
|
|
14277
13596
|
const a2 = i.active ?? "Yes", s = i.inactive ?? "No";
|
|
@@ -14283,25 +13602,25 @@ var confirm = (i) => {
|
|
|
14283
13602
|
output: i.output,
|
|
14284
13603
|
initialValue: i.initialValue ?? true,
|
|
14285
13604
|
render() {
|
|
14286
|
-
const e = i.withGuide ?? settings.withGuide,
|
|
14287
|
-
` : ""}${
|
|
14288
|
-
`,
|
|
13605
|
+
const e = i.withGuide ?? settings.withGuide, u3 = `${symbol(this.state)} `, l = e ? `${styleText2("gray", S_BAR)} ` : "", f = wrapTextWithPrefix(i.output, i.message, l, u3), o = `${e ? `${styleText2("gray", S_BAR)}
|
|
13606
|
+
` : ""}${f}
|
|
13607
|
+
`, c = this.value ? a2 : s;
|
|
14289
13608
|
switch (this.state) {
|
|
14290
13609
|
case "submit": {
|
|
14291
13610
|
const r2 = e ? `${styleText2("gray", S_BAR)} ` : "";
|
|
14292
|
-
return `${
|
|
13611
|
+
return `${o}${r2}${styleText2("dim", c)}`;
|
|
14293
13612
|
}
|
|
14294
13613
|
case "cancel": {
|
|
14295
13614
|
const r2 = e ? `${styleText2("gray", S_BAR)} ` : "";
|
|
14296
|
-
return `${
|
|
13615
|
+
return `${o}${r2}${styleText2(["strikethrough", "dim"], c)}${e ? `
|
|
14297
13616
|
${styleText2("gray", S_BAR)}` : ""}`;
|
|
14298
13617
|
}
|
|
14299
13618
|
default: {
|
|
14300
|
-
const r2 = e ? `${styleText2("cyan", S_BAR)} ` : "",
|
|
14301
|
-
return `${
|
|
13619
|
+
const r2 = e ? `${styleText2("cyan", S_BAR)} ` : "", g = e ? styleText2("cyan", S_BAR_END) : "";
|
|
13620
|
+
return `${o}${r2}${this.value ? `${styleText2("green", S_RADIO_ACTIVE)} ${a2}` : `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", a2)}`}${i.vertical ? e ? `
|
|
14302
13621
|
${styleText2("cyan", S_BAR)} ` : `
|
|
14303
13622
|
` : ` ${styleText2("dim", "/")} `}${this.value ? `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", s)}` : `${styleText2("green", S_RADIO_ACTIVE)} ${s}`}
|
|
14304
|
-
${
|
|
13623
|
+
${g}
|
|
14305
13624
|
`;
|
|
14306
13625
|
}
|
|
14307
13626
|
}
|
|
@@ -14320,36 +13639,36 @@ var password = (r2) => new u$1({
|
|
|
14320
13639
|
input: r2.input,
|
|
14321
13640
|
output: r2.output,
|
|
14322
13641
|
render() {
|
|
14323
|
-
const e = r2.withGuide ?? settings.withGuide,
|
|
13642
|
+
const e = r2.withGuide ?? settings.withGuide, o = `${e ? `${styleText2("gray", S_BAR)}
|
|
14324
13643
|
` : ""}${symbol(this.state)} ${r2.message}
|
|
14325
|
-
`,
|
|
13644
|
+
`, c = this.userInputWithCursor, i = this.masked;
|
|
14326
13645
|
switch (this.state) {
|
|
14327
13646
|
case "error": {
|
|
14328
13647
|
const s = e ? `${styleText2("yellow", S_BAR)} ` : "", n3 = e ? `${styleText2("yellow", S_BAR_END)} ` : "", l = i ?? "";
|
|
14329
|
-
return r2.clearOnError && this.clear(), `${
|
|
13648
|
+
return r2.clearOnError && this.clear(), `${o.trim()}
|
|
14330
13649
|
${s}${l}
|
|
14331
13650
|
${n3}${styleText2("yellow", this.error)}
|
|
14332
13651
|
`;
|
|
14333
13652
|
}
|
|
14334
13653
|
case "submit": {
|
|
14335
13654
|
const s = e ? `${styleText2("gray", S_BAR)} ` : "", n3 = i ? styleText2("dim", i) : "";
|
|
14336
|
-
return `${
|
|
13655
|
+
return `${o}${s}${n3}`;
|
|
14337
13656
|
}
|
|
14338
13657
|
case "cancel": {
|
|
14339
13658
|
const s = e ? `${styleText2("gray", S_BAR)} ` : "", n3 = i ? styleText2(["strikethrough", "dim"], i) : "";
|
|
14340
|
-
return `${
|
|
13659
|
+
return `${o}${s}${n3}${i && e ? `
|
|
14341
13660
|
${styleText2("gray", S_BAR)}` : ""}`;
|
|
14342
13661
|
}
|
|
14343
13662
|
default: {
|
|
14344
13663
|
const s = e ? `${styleText2("cyan", S_BAR)} ` : "", n3 = e ? styleText2("cyan", S_BAR_END) : "";
|
|
14345
|
-
return `${
|
|
13664
|
+
return `${o}${s}${c}
|
|
14346
13665
|
${n3}
|
|
14347
13666
|
`;
|
|
14348
13667
|
}
|
|
14349
13668
|
}
|
|
14350
13669
|
}
|
|
14351
13670
|
}).prompt();
|
|
14352
|
-
var
|
|
13671
|
+
var u3 = {
|
|
14353
13672
|
light: unicodeOr("\u2500", "-"),
|
|
14354
13673
|
heavy: unicodeOr("\u2501", "="),
|
|
14355
13674
|
block: unicodeOr("\u2588", "#")
|
|
@@ -14358,26 +13677,26 @@ var SELECT_INSTRUCTIONS = [
|
|
|
14358
13677
|
`${styleText2("dim", "\u2191/\u2193")} to navigate`,
|
|
14359
13678
|
`${styleText2("dim", "Enter:")} confirm`
|
|
14360
13679
|
];
|
|
14361
|
-
var
|
|
13680
|
+
var c = (t2, o) => t2.includes(`
|
|
14362
13681
|
`) ? t2.split(`
|
|
14363
|
-
`).map((d) =>
|
|
14364
|
-
`) :
|
|
13682
|
+
`).map((d) => o(d)).join(`
|
|
13683
|
+
`) : o(t2);
|
|
14365
13684
|
var select = (t2) => {
|
|
14366
|
-
const
|
|
13685
|
+
const o = (n3, m) => {
|
|
14367
13686
|
if (n3 === undefined)
|
|
14368
13687
|
return "";
|
|
14369
13688
|
const s = n3.label ?? String(n3.value);
|
|
14370
|
-
switch (
|
|
13689
|
+
switch (m) {
|
|
14371
13690
|
case "disabled":
|
|
14372
|
-
return `${styleText2("gray", S_RADIO_INACTIVE)} ${
|
|
13691
|
+
return `${styleText2("gray", S_RADIO_INACTIVE)} ${c(s, (i) => styleText2("gray", i))}${n3.hint ? ` ${styleText2("dim", `(${n3.hint ?? "disabled"})`)}` : ""}`;
|
|
14373
13692
|
case "selected":
|
|
14374
|
-
return `${
|
|
13693
|
+
return `${c(s, (i) => styleText2("dim", i))}`;
|
|
14375
13694
|
case "active":
|
|
14376
13695
|
return `${styleText2("green", S_RADIO_ACTIVE)} ${s}${n3.hint ? ` ${styleText2("dim", `(${n3.hint})`)}` : ""}`;
|
|
14377
13696
|
case "cancelled":
|
|
14378
|
-
return `${
|
|
13697
|
+
return `${c(s, (i) => styleText2(["strikethrough", "dim"], i))}`;
|
|
14379
13698
|
default:
|
|
14380
|
-
return `${styleText2("dim", S_RADIO_INACTIVE)} ${
|
|
13699
|
+
return `${styleText2("dim", S_RADIO_INACTIVE)} ${c(s, (i) => styleText2("dim", i))}`;
|
|
14381
13700
|
}
|
|
14382
13701
|
}, d = t2.showInstructions ?? true;
|
|
14383
13702
|
return new n$1({
|
|
@@ -14387,34 +13706,34 @@ var select = (t2) => {
|
|
|
14387
13706
|
output: t2.output,
|
|
14388
13707
|
initialValue: t2.initialValue,
|
|
14389
13708
|
render() {
|
|
14390
|
-
const n3 = t2.withGuide ?? settings.withGuide,
|
|
13709
|
+
const n3 = t2.withGuide ?? settings.withGuide, m = `${symbol(this.state)} `, s = `${symbolBar(this.state)} `, i = wrapTextWithPrefix(t2.output, t2.message, s, m), u4 = `${n3 ? `${styleText2("gray", S_BAR)}
|
|
14391
13710
|
` : ""}${i}
|
|
14392
13711
|
`;
|
|
14393
13712
|
switch (this.state) {
|
|
14394
13713
|
case "submit": {
|
|
14395
|
-
const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(t2.output,
|
|
14396
|
-
return `${
|
|
13714
|
+
const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(t2.output, o(this.options[this.cursor], "selected"), r2);
|
|
13715
|
+
return `${u4}${a2}`;
|
|
14397
13716
|
}
|
|
14398
13717
|
case "cancel": {
|
|
14399
|
-
const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(t2.output,
|
|
14400
|
-
return `${
|
|
13718
|
+
const r2 = n3 ? `${styleText2("gray", S_BAR)} ` : "", a2 = wrapTextWithPrefix(t2.output, o(this.options[this.cursor], "cancelled"), r2);
|
|
13719
|
+
return `${u4}${a2}${n3 ? `
|
|
14401
13720
|
${styleText2("gray", S_BAR)}` : ""}`;
|
|
14402
13721
|
}
|
|
14403
13722
|
default: {
|
|
14404
|
-
const r2 = n3 ? `${styleText2("cyan", S_BAR)} ` : "", a2 =
|
|
14405
|
-
`).length,
|
|
14406
|
-
`),
|
|
14407
|
-
return `${
|
|
13723
|
+
const r2 = n3 ? `${styleText2("cyan", S_BAR)} ` : "", a2 = u4.split(`
|
|
13724
|
+
`).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n3) : n3 ? [styleText2("cyan", S_BAR_END)] : [], b = p.join(`
|
|
13725
|
+
`), f = p.length + 1;
|
|
13726
|
+
return `${u4}${r2}${limitOptions({
|
|
14408
13727
|
output: t2.output,
|
|
14409
13728
|
cursor: this.cursor,
|
|
14410
13729
|
options: this.options,
|
|
14411
13730
|
maxItems: t2.maxItems,
|
|
14412
13731
|
columnPadding: r2.length,
|
|
14413
|
-
rowPadding: a2 +
|
|
14414
|
-
style: (
|
|
13732
|
+
rowPadding: a2 + f,
|
|
13733
|
+
style: (g, x) => o(g, g.disabled ? "disabled" : x ? "active" : "inactive")
|
|
14415
13734
|
}).join(`
|
|
14416
13735
|
${r2}`)}
|
|
14417
|
-
${
|
|
13736
|
+
${b}
|
|
14418
13737
|
`;
|
|
14419
13738
|
}
|
|
14420
13739
|
}
|
|
@@ -14433,12 +13752,12 @@ var text2 = (e) => new n2({
|
|
|
14433
13752
|
render() {
|
|
14434
13753
|
const i2 = e?.withGuide ?? settings.withGuide, s = `${`${i2 ? `${styleText2("gray", S_BAR)}
|
|
14435
13754
|
` : ""}${symbol(this.state)} `}${e.message}
|
|
14436
|
-
`,
|
|
13755
|
+
`, c2 = e.placeholder && e.placeholder.length > 0 ? styleText2("inverse", e.placeholder[0]) + styleText2("dim", e.placeholder.slice(1)) : styleText2(["inverse", "hidden"], "_"), o = this.userInput ? this.userInputWithCursor : c2, l = this.value ?? "";
|
|
14437
13756
|
switch (this.state) {
|
|
14438
13757
|
case "error": {
|
|
14439
13758
|
const n3 = this.error ? ` ${styleText2("yellow", this.error)}` : "", r2 = i2 ? `${styleText2("yellow", S_BAR)} ` : "", d = i2 ? styleText2("yellow", S_BAR_END) : "";
|
|
14440
13759
|
return `${s.trim()}
|
|
14441
|
-
${r2}${
|
|
13760
|
+
${r2}${o}
|
|
14442
13761
|
${d}${n3}
|
|
14443
13762
|
`;
|
|
14444
13763
|
}
|
|
@@ -14453,7 +13772,7 @@ ${r2}` : ""}`;
|
|
|
14453
13772
|
}
|
|
14454
13773
|
default: {
|
|
14455
13774
|
const n3 = i2 ? `${styleText2("cyan", S_BAR)} ` : "", r2 = i2 ? styleText2("cyan", S_BAR_END) : "";
|
|
14456
|
-
return `${s}${n3}${
|
|
13775
|
+
return `${s}${n3}${o}
|
|
14457
13776
|
${r2}
|
|
14458
13777
|
`;
|
|
14459
13778
|
}
|
|
@@ -22548,6 +21867,11 @@ var ROOT_ARGS = defineArguments({
|
|
|
22548
21867
|
type: "string",
|
|
22549
21868
|
description: "HTTP read timeout in seconds (default 60; 0 = no limit for streams)",
|
|
22550
21869
|
flagScope: "global"
|
|
21870
|
+
},
|
|
21871
|
+
"ignore-ssl-errors": {
|
|
21872
|
+
type: "boolean",
|
|
21873
|
+
description: "Skip TLS certificate verification for HTTPS requests (for development only, e.g. self-signed local servers)",
|
|
21874
|
+
flagScope: "global"
|
|
22551
21875
|
}
|
|
22552
21876
|
});
|
|
22553
21877
|
function buildMainCommand() {
|