@qodalis/cli-guid 2.0.0-beta.17 → 2.0.0-beta.19
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/package.json +2 -2
- package/public-api.d.mts +3 -3
- package/public-api.d.ts +3 -3
- package/public-api.js +7 -8
- package/public-api.js.map +1 -1
- package/public-api.mjs +8 -9
- package/public-api.mjs.map +1 -1
- package/umd/index.global.js +212 -73
package/umd/index.global.js
CHANGED
|
@@ -8,7 +8,11 @@ var guid = (() => {
|
|
|
8
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
10
|
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
-
|
|
11
|
+
try {
|
|
12
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
|
+
} catch (e) {
|
|
14
|
+
throw mod = 0, e;
|
|
15
|
+
}
|
|
12
16
|
};
|
|
13
17
|
var __copyProps = (to, from, except, desc) => {
|
|
14
18
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -27,7 +31,7 @@ var guid = (() => {
|
|
|
27
31
|
mod
|
|
28
32
|
));
|
|
29
33
|
var require_constants = __commonJS({
|
|
30
|
-
"../../node_modules/.pnpm/semver@7.
|
|
34
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js"(exports, module2) {
|
|
31
35
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
32
36
|
var MAX_LENGTH = 256;
|
|
33
37
|
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
@@ -56,26 +60,26 @@ var guid = (() => {
|
|
|
56
60
|
}
|
|
57
61
|
});
|
|
58
62
|
var require_debug = __commonJS({
|
|
59
|
-
"../../node_modules/.pnpm/semver@7.
|
|
63
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js"(exports, module2) {
|
|
60
64
|
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
61
65
|
};
|
|
62
66
|
module2.exports = debug;
|
|
63
67
|
}
|
|
64
68
|
});
|
|
65
69
|
var require_re = __commonJS({
|
|
66
|
-
"../../node_modules/.pnpm/semver@7.
|
|
70
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js"(exports, module2) {
|
|
67
71
|
var {
|
|
68
72
|
MAX_SAFE_COMPONENT_LENGTH,
|
|
69
73
|
MAX_SAFE_BUILD_LENGTH,
|
|
70
74
|
MAX_LENGTH
|
|
71
75
|
} = require_constants();
|
|
72
76
|
var debug = require_debug();
|
|
73
|
-
exports
|
|
74
|
-
var re = exports
|
|
75
|
-
var safeRe = exports
|
|
76
|
-
var src = exports
|
|
77
|
-
var safeSrc = exports
|
|
78
|
-
var t = exports
|
|
77
|
+
exports = module2.exports = {};
|
|
78
|
+
var re = exports.re = [];
|
|
79
|
+
var safeRe = exports.safeRe = [];
|
|
80
|
+
var src = exports.src = [];
|
|
81
|
+
var safeSrc = exports.safeSrc = [];
|
|
82
|
+
var t = exports.t = {};
|
|
79
83
|
var R = 0;
|
|
80
84
|
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
81
85
|
var safeRegexReplacements = [
|
|
@@ -128,18 +132,18 @@ var guid = (() => {
|
|
|
128
132
|
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
129
133
|
createToken("LONETILDE", "(?:~>?)");
|
|
130
134
|
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
131
|
-
exports
|
|
135
|
+
exports.tildeTrimReplace = "$1~";
|
|
132
136
|
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
133
137
|
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
134
138
|
createToken("LONECARET", "(?:\\^)");
|
|
135
139
|
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
136
|
-
exports
|
|
140
|
+
exports.caretTrimReplace = "$1^";
|
|
137
141
|
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
138
142
|
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
139
143
|
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
140
144
|
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
141
145
|
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
142
|
-
exports
|
|
146
|
+
exports.comparatorTrimReplace = "$1$2$3";
|
|
143
147
|
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
144
148
|
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
145
149
|
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
@@ -148,7 +152,7 @@ var guid = (() => {
|
|
|
148
152
|
}
|
|
149
153
|
});
|
|
150
154
|
var require_parse_options = __commonJS({
|
|
151
|
-
"../../node_modules/.pnpm/semver@7.
|
|
155
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js"(exports, module2) {
|
|
152
156
|
var looseOption = Object.freeze({ loose: true });
|
|
153
157
|
var emptyOpts = Object.freeze({});
|
|
154
158
|
var parseOptions = (options) => {
|
|
@@ -164,7 +168,7 @@ var guid = (() => {
|
|
|
164
168
|
}
|
|
165
169
|
});
|
|
166
170
|
var require_identifiers = __commonJS({
|
|
167
|
-
"../../node_modules/.pnpm/semver@7.
|
|
171
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js"(exports, module2) {
|
|
168
172
|
var numeric = /^[0-9]+$/;
|
|
169
173
|
var compareIdentifiers = (a, b) => {
|
|
170
174
|
if (typeof a === "number" && typeof b === "number") {
|
|
@@ -186,12 +190,24 @@ var guid = (() => {
|
|
|
186
190
|
}
|
|
187
191
|
});
|
|
188
192
|
var require_semver = __commonJS({
|
|
189
|
-
"../../node_modules/.pnpm/semver@7.
|
|
193
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js"(exports, module2) {
|
|
190
194
|
var debug = require_debug();
|
|
191
195
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
192
196
|
var { safeRe: re, t } = require_re();
|
|
193
197
|
var parseOptions = require_parse_options();
|
|
194
198
|
var { compareIdentifiers } = require_identifiers();
|
|
199
|
+
var isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
200
|
+
const identifiers = identifier.split(".");
|
|
201
|
+
if (identifiers.length > prerelease.length) {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
for (let i = 0; i < identifiers.length; i++) {
|
|
205
|
+
if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
return true;
|
|
210
|
+
};
|
|
195
211
|
var SemVer = class _SemVer {
|
|
196
212
|
constructor(version, options) {
|
|
197
213
|
options = parseOptions(options);
|
|
@@ -438,8 +454,9 @@ var guid = (() => {
|
|
|
438
454
|
if (identifierBase === false) {
|
|
439
455
|
prerelease = [identifier];
|
|
440
456
|
}
|
|
441
|
-
if (
|
|
442
|
-
|
|
457
|
+
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
458
|
+
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
459
|
+
if (isNaN(prereleaseBase)) {
|
|
443
460
|
this.prerelease = prerelease;
|
|
444
461
|
}
|
|
445
462
|
} else {
|
|
@@ -462,7 +479,7 @@ var guid = (() => {
|
|
|
462
479
|
}
|
|
463
480
|
});
|
|
464
481
|
var require_parse = __commonJS({
|
|
465
|
-
"../../node_modules/.pnpm/semver@7.
|
|
482
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js"(exports, module2) {
|
|
466
483
|
var SemVer = require_semver();
|
|
467
484
|
var parse = (version, options, throwErrors = false) => {
|
|
468
485
|
if (version instanceof SemVer) {
|
|
@@ -481,7 +498,7 @@ var guid = (() => {
|
|
|
481
498
|
}
|
|
482
499
|
});
|
|
483
500
|
var require_valid = __commonJS({
|
|
484
|
-
"../../node_modules/.pnpm/semver@7.
|
|
501
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js"(exports, module2) {
|
|
485
502
|
var parse = require_parse();
|
|
486
503
|
var valid2 = (version, options) => {
|
|
487
504
|
const v = parse(version, options);
|
|
@@ -491,7 +508,7 @@ var guid = (() => {
|
|
|
491
508
|
}
|
|
492
509
|
});
|
|
493
510
|
var require_clean = __commonJS({
|
|
494
|
-
"../../node_modules/.pnpm/semver@7.
|
|
511
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js"(exports, module2) {
|
|
495
512
|
var parse = require_parse();
|
|
496
513
|
var clean = (version, options) => {
|
|
497
514
|
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
@@ -501,7 +518,7 @@ var guid = (() => {
|
|
|
501
518
|
}
|
|
502
519
|
});
|
|
503
520
|
var require_inc = __commonJS({
|
|
504
|
-
"../../node_modules/.pnpm/semver@7.
|
|
521
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js"(exports, module2) {
|
|
505
522
|
var SemVer = require_semver();
|
|
506
523
|
var inc = (version, release, options, identifier, identifierBase) => {
|
|
507
524
|
if (typeof options === "string") {
|
|
@@ -522,7 +539,7 @@ var guid = (() => {
|
|
|
522
539
|
}
|
|
523
540
|
});
|
|
524
541
|
var require_diff = __commonJS({
|
|
525
|
-
"../../node_modules/.pnpm/semver@7.
|
|
542
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js"(exports, module2) {
|
|
526
543
|
var parse = require_parse();
|
|
527
544
|
var diff = (version1, version2) => {
|
|
528
545
|
const v1 = parse(version1, null, true);
|
|
@@ -563,28 +580,28 @@ var guid = (() => {
|
|
|
563
580
|
}
|
|
564
581
|
});
|
|
565
582
|
var require_major = __commonJS({
|
|
566
|
-
"../../node_modules/.pnpm/semver@7.
|
|
583
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js"(exports, module2) {
|
|
567
584
|
var SemVer = require_semver();
|
|
568
585
|
var major = (a, loose) => new SemVer(a, loose).major;
|
|
569
586
|
module2.exports = major;
|
|
570
587
|
}
|
|
571
588
|
});
|
|
572
589
|
var require_minor = __commonJS({
|
|
573
|
-
"../../node_modules/.pnpm/semver@7.
|
|
590
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js"(exports, module2) {
|
|
574
591
|
var SemVer = require_semver();
|
|
575
592
|
var minor = (a, loose) => new SemVer(a, loose).minor;
|
|
576
593
|
module2.exports = minor;
|
|
577
594
|
}
|
|
578
595
|
});
|
|
579
596
|
var require_patch = __commonJS({
|
|
580
|
-
"../../node_modules/.pnpm/semver@7.
|
|
597
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js"(exports, module2) {
|
|
581
598
|
var SemVer = require_semver();
|
|
582
599
|
var patch = (a, loose) => new SemVer(a, loose).patch;
|
|
583
600
|
module2.exports = patch;
|
|
584
601
|
}
|
|
585
602
|
});
|
|
586
603
|
var require_prerelease = __commonJS({
|
|
587
|
-
"../../node_modules/.pnpm/semver@7.
|
|
604
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js"(exports, module2) {
|
|
588
605
|
var parse = require_parse();
|
|
589
606
|
var prerelease = (version, options) => {
|
|
590
607
|
const parsed = parse(version, options);
|
|
@@ -594,28 +611,28 @@ var guid = (() => {
|
|
|
594
611
|
}
|
|
595
612
|
});
|
|
596
613
|
var require_compare = __commonJS({
|
|
597
|
-
"../../node_modules/.pnpm/semver@7.
|
|
614
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js"(exports, module2) {
|
|
598
615
|
var SemVer = require_semver();
|
|
599
616
|
var compare2 = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
600
617
|
module2.exports = compare2;
|
|
601
618
|
}
|
|
602
619
|
});
|
|
603
620
|
var require_rcompare = __commonJS({
|
|
604
|
-
"../../node_modules/.pnpm/semver@7.
|
|
621
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js"(exports, module2) {
|
|
605
622
|
var compare2 = require_compare();
|
|
606
623
|
var rcompare = (a, b, loose) => compare2(b, a, loose);
|
|
607
624
|
module2.exports = rcompare;
|
|
608
625
|
}
|
|
609
626
|
});
|
|
610
627
|
var require_compare_loose = __commonJS({
|
|
611
|
-
"../../node_modules/.pnpm/semver@7.
|
|
628
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js"(exports, module2) {
|
|
612
629
|
var compare2 = require_compare();
|
|
613
630
|
var compareLoose = (a, b) => compare2(a, b, true);
|
|
614
631
|
module2.exports = compareLoose;
|
|
615
632
|
}
|
|
616
633
|
});
|
|
617
634
|
var require_compare_build = __commonJS({
|
|
618
|
-
"../../node_modules/.pnpm/semver@7.
|
|
635
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js"(exports, module2) {
|
|
619
636
|
var SemVer = require_semver();
|
|
620
637
|
var compareBuild = (a, b, loose) => {
|
|
621
638
|
const versionA = new SemVer(a, loose);
|
|
@@ -626,63 +643,63 @@ var guid = (() => {
|
|
|
626
643
|
}
|
|
627
644
|
});
|
|
628
645
|
var require_sort = __commonJS({
|
|
629
|
-
"../../node_modules/.pnpm/semver@7.
|
|
646
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js"(exports, module2) {
|
|
630
647
|
var compareBuild = require_compare_build();
|
|
631
648
|
var sort = (list2, loose) => list2.sort((a, b) => compareBuild(a, b, loose));
|
|
632
649
|
module2.exports = sort;
|
|
633
650
|
}
|
|
634
651
|
});
|
|
635
652
|
var require_rsort = __commonJS({
|
|
636
|
-
"../../node_modules/.pnpm/semver@7.
|
|
653
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js"(exports, module2) {
|
|
637
654
|
var compareBuild = require_compare_build();
|
|
638
655
|
var rsort = (list2, loose) => list2.sort((a, b) => compareBuild(b, a, loose));
|
|
639
656
|
module2.exports = rsort;
|
|
640
657
|
}
|
|
641
658
|
});
|
|
642
659
|
var require_gt = __commonJS({
|
|
643
|
-
"../../node_modules/.pnpm/semver@7.
|
|
660
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js"(exports, module2) {
|
|
644
661
|
var compare2 = require_compare();
|
|
645
662
|
var gt = (a, b, loose) => compare2(a, b, loose) > 0;
|
|
646
663
|
module2.exports = gt;
|
|
647
664
|
}
|
|
648
665
|
});
|
|
649
666
|
var require_lt = __commonJS({
|
|
650
|
-
"../../node_modules/.pnpm/semver@7.
|
|
667
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js"(exports, module2) {
|
|
651
668
|
var compare2 = require_compare();
|
|
652
669
|
var lt = (a, b, loose) => compare2(a, b, loose) < 0;
|
|
653
670
|
module2.exports = lt;
|
|
654
671
|
}
|
|
655
672
|
});
|
|
656
673
|
var require_eq = __commonJS({
|
|
657
|
-
"../../node_modules/.pnpm/semver@7.
|
|
674
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js"(exports, module2) {
|
|
658
675
|
var compare2 = require_compare();
|
|
659
676
|
var eq = (a, b, loose) => compare2(a, b, loose) === 0;
|
|
660
677
|
module2.exports = eq;
|
|
661
678
|
}
|
|
662
679
|
});
|
|
663
680
|
var require_neq = __commonJS({
|
|
664
|
-
"../../node_modules/.pnpm/semver@7.
|
|
681
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js"(exports, module2) {
|
|
665
682
|
var compare2 = require_compare();
|
|
666
683
|
var neq = (a, b, loose) => compare2(a, b, loose) !== 0;
|
|
667
684
|
module2.exports = neq;
|
|
668
685
|
}
|
|
669
686
|
});
|
|
670
687
|
var require_gte = __commonJS({
|
|
671
|
-
"../../node_modules/.pnpm/semver@7.
|
|
688
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js"(exports, module2) {
|
|
672
689
|
var compare2 = require_compare();
|
|
673
690
|
var gte2 = (a, b, loose) => compare2(a, b, loose) >= 0;
|
|
674
691
|
module2.exports = gte2;
|
|
675
692
|
}
|
|
676
693
|
});
|
|
677
694
|
var require_lte = __commonJS({
|
|
678
|
-
"../../node_modules/.pnpm/semver@7.
|
|
695
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js"(exports, module2) {
|
|
679
696
|
var compare2 = require_compare();
|
|
680
697
|
var lte = (a, b, loose) => compare2(a, b, loose) <= 0;
|
|
681
698
|
module2.exports = lte;
|
|
682
699
|
}
|
|
683
700
|
});
|
|
684
701
|
var require_cmp = __commonJS({
|
|
685
|
-
"../../node_modules/.pnpm/semver@7.
|
|
702
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js"(exports, module2) {
|
|
686
703
|
var eq = require_eq();
|
|
687
704
|
var neq = require_neq();
|
|
688
705
|
var gt = require_gt();
|
|
@@ -729,7 +746,7 @@ var guid = (() => {
|
|
|
729
746
|
}
|
|
730
747
|
});
|
|
731
748
|
var require_coerce = __commonJS({
|
|
732
|
-
"../../node_modules/.pnpm/semver@7.
|
|
749
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js"(exports, module2) {
|
|
733
750
|
var SemVer = require_semver();
|
|
734
751
|
var parse = require_parse();
|
|
735
752
|
var { safeRe: re, t } = require_re();
|
|
@@ -771,8 +788,46 @@ var guid = (() => {
|
|
|
771
788
|
module2.exports = coerce2;
|
|
772
789
|
}
|
|
773
790
|
});
|
|
791
|
+
var require_truncate = __commonJS({
|
|
792
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js"(exports, module2) {
|
|
793
|
+
var parse = require_parse();
|
|
794
|
+
var constants2 = require_constants();
|
|
795
|
+
var SemVer = require_semver();
|
|
796
|
+
var truncate = (version, truncation, options) => {
|
|
797
|
+
if (!constants2.RELEASE_TYPES.includes(truncation)) {
|
|
798
|
+
return null;
|
|
799
|
+
}
|
|
800
|
+
const clonedVersion = cloneInputVersion(version, options);
|
|
801
|
+
return clonedVersion && doTruncation(clonedVersion, truncation);
|
|
802
|
+
};
|
|
803
|
+
var cloneInputVersion = (version, options) => {
|
|
804
|
+
const versionStringToParse = version instanceof SemVer ? version.version : version;
|
|
805
|
+
return parse(versionStringToParse, options);
|
|
806
|
+
};
|
|
807
|
+
var doTruncation = (version, truncation) => {
|
|
808
|
+
if (isPrerelease(truncation)) {
|
|
809
|
+
return version.version;
|
|
810
|
+
}
|
|
811
|
+
version.prerelease = [];
|
|
812
|
+
switch (truncation) {
|
|
813
|
+
case "major":
|
|
814
|
+
version.minor = 0;
|
|
815
|
+
version.patch = 0;
|
|
816
|
+
break;
|
|
817
|
+
case "minor":
|
|
818
|
+
version.patch = 0;
|
|
819
|
+
break;
|
|
820
|
+
}
|
|
821
|
+
return version.format();
|
|
822
|
+
};
|
|
823
|
+
var isPrerelease = (type) => {
|
|
824
|
+
return type.startsWith("pre");
|
|
825
|
+
};
|
|
826
|
+
module2.exports = truncate;
|
|
827
|
+
}
|
|
828
|
+
});
|
|
774
829
|
var require_lrucache = __commonJS({
|
|
775
|
-
"../../node_modules/.pnpm/semver@7.
|
|
830
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js"(exports, module2) {
|
|
776
831
|
var LRUCache = class {
|
|
777
832
|
constructor() {
|
|
778
833
|
this.max = 1e3;
|
|
@@ -807,7 +862,7 @@ var guid = (() => {
|
|
|
807
862
|
}
|
|
808
863
|
});
|
|
809
864
|
var require_range = __commonJS({
|
|
810
|
-
"../../node_modules/.pnpm/semver@7.
|
|
865
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js"(exports, module2) {
|
|
811
866
|
var SPACE_CHARACTERS = /\s+/g;
|
|
812
867
|
var Range = class _Range {
|
|
813
868
|
constructor(range, options) {
|
|
@@ -874,6 +929,7 @@ var guid = (() => {
|
|
|
874
929
|
return this.range;
|
|
875
930
|
}
|
|
876
931
|
parseRange(range) {
|
|
932
|
+
range = range.replace(BUILDSTRIPRE, "");
|
|
877
933
|
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
878
934
|
const memoKey = memoOpts + ":" + range;
|
|
879
935
|
const cached = cache.get(memoKey);
|
|
@@ -956,12 +1012,14 @@ var guid = (() => {
|
|
|
956
1012
|
var SemVer = require_semver();
|
|
957
1013
|
var {
|
|
958
1014
|
safeRe: re,
|
|
1015
|
+
src,
|
|
959
1016
|
t,
|
|
960
1017
|
comparatorTrimReplace,
|
|
961
1018
|
tildeTrimReplace,
|
|
962
1019
|
caretTrimReplace
|
|
963
1020
|
} = require_re();
|
|
964
1021
|
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
1022
|
+
var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
|
|
965
1023
|
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
966
1024
|
var isAny = (c) => c.value === "";
|
|
967
1025
|
var isSatisfiable = (comparators, options) => {
|
|
@@ -990,20 +1048,22 @@ var guid = (() => {
|
|
|
990
1048
|
return comp;
|
|
991
1049
|
};
|
|
992
1050
|
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
1051
|
+
var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
|
|
993
1052
|
var replaceTildes = (comp, options) => {
|
|
994
1053
|
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
995
1054
|
};
|
|
996
1055
|
var replaceTilde = (comp, options) => {
|
|
997
1056
|
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
1057
|
+
const z = options.includePrerelease ? "-0" : "";
|
|
998
1058
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
999
1059
|
debug("tilde", comp, _, M, m, p, pr);
|
|
1000
1060
|
let ret;
|
|
1001
1061
|
if (isX(M)) {
|
|
1002
1062
|
ret = "";
|
|
1003
1063
|
} else if (isX(m)) {
|
|
1004
|
-
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
1064
|
+
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
1005
1065
|
} else if (isX(p)) {
|
|
1006
|
-
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
1066
|
+
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
1007
1067
|
} else if (pr) {
|
|
1008
1068
|
debug("replaceTilde pr", pr);
|
|
1009
1069
|
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
@@ -1049,9 +1109,9 @@ var guid = (() => {
|
|
|
1049
1109
|
debug("no pr");
|
|
1050
1110
|
if (M === "0") {
|
|
1051
1111
|
if (m === "0") {
|
|
1052
|
-
ret = `>=${M}.${m}.${p}
|
|
1112
|
+
ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
|
|
1053
1113
|
} else {
|
|
1054
|
-
ret = `>=${M}.${m}.${p}
|
|
1114
|
+
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
1055
1115
|
}
|
|
1056
1116
|
} else {
|
|
1057
1117
|
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
@@ -1070,6 +1130,9 @@ var guid = (() => {
|
|
|
1070
1130
|
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
1071
1131
|
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
1072
1132
|
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
1133
|
+
if (invalidXRangeOrder(M, m, p)) {
|
|
1134
|
+
return comp;
|
|
1135
|
+
}
|
|
1073
1136
|
const xM = isX(M);
|
|
1074
1137
|
const xm = xM || isX(m);
|
|
1075
1138
|
const xp = xm || isX(p);
|
|
@@ -1181,7 +1244,7 @@ var guid = (() => {
|
|
|
1181
1244
|
}
|
|
1182
1245
|
});
|
|
1183
1246
|
var require_comparator = __commonJS({
|
|
1184
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1247
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js"(exports, module2) {
|
|
1185
1248
|
var ANY = /* @__PURE__ */ Symbol("SemVer ANY");
|
|
1186
1249
|
var Comparator = class _Comparator {
|
|
1187
1250
|
static get ANY() {
|
|
@@ -1291,7 +1354,7 @@ var guid = (() => {
|
|
|
1291
1354
|
}
|
|
1292
1355
|
});
|
|
1293
1356
|
var require_satisfies = __commonJS({
|
|
1294
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1357
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js"(exports, module2) {
|
|
1295
1358
|
var Range = require_range();
|
|
1296
1359
|
var satisfies2 = (version, range, options) => {
|
|
1297
1360
|
try {
|
|
@@ -1305,14 +1368,14 @@ var guid = (() => {
|
|
|
1305
1368
|
}
|
|
1306
1369
|
});
|
|
1307
1370
|
var require_to_comparators = __commonJS({
|
|
1308
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1371
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js"(exports, module2) {
|
|
1309
1372
|
var Range = require_range();
|
|
1310
1373
|
var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
1311
1374
|
module2.exports = toComparators;
|
|
1312
1375
|
}
|
|
1313
1376
|
});
|
|
1314
1377
|
var require_max_satisfying = __commonJS({
|
|
1315
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1378
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js"(exports, module2) {
|
|
1316
1379
|
var SemVer = require_semver();
|
|
1317
1380
|
var Range = require_range();
|
|
1318
1381
|
var maxSatisfying = (versions, range, options) => {
|
|
@@ -1338,7 +1401,7 @@ var guid = (() => {
|
|
|
1338
1401
|
}
|
|
1339
1402
|
});
|
|
1340
1403
|
var require_min_satisfying = __commonJS({
|
|
1341
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1404
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js"(exports, module2) {
|
|
1342
1405
|
var SemVer = require_semver();
|
|
1343
1406
|
var Range = require_range();
|
|
1344
1407
|
var minSatisfying = (versions, range, options) => {
|
|
@@ -1364,7 +1427,7 @@ var guid = (() => {
|
|
|
1364
1427
|
}
|
|
1365
1428
|
});
|
|
1366
1429
|
var require_min_version = __commonJS({
|
|
1367
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1430
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js"(exports, module2) {
|
|
1368
1431
|
var SemVer = require_semver();
|
|
1369
1432
|
var Range = require_range();
|
|
1370
1433
|
var gt = require_gt();
|
|
@@ -1420,7 +1483,7 @@ var guid = (() => {
|
|
|
1420
1483
|
}
|
|
1421
1484
|
});
|
|
1422
1485
|
var require_valid2 = __commonJS({
|
|
1423
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1486
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js"(exports, module2) {
|
|
1424
1487
|
var Range = require_range();
|
|
1425
1488
|
var validRange = (range, options) => {
|
|
1426
1489
|
try {
|
|
@@ -1433,7 +1496,7 @@ var guid = (() => {
|
|
|
1433
1496
|
}
|
|
1434
1497
|
});
|
|
1435
1498
|
var require_outside = __commonJS({
|
|
1436
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1499
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js"(exports, module2) {
|
|
1437
1500
|
var SemVer = require_semver();
|
|
1438
1501
|
var Comparator = require_comparator();
|
|
1439
1502
|
var { ANY } = Comparator;
|
|
@@ -1499,21 +1562,21 @@ var guid = (() => {
|
|
|
1499
1562
|
}
|
|
1500
1563
|
});
|
|
1501
1564
|
var require_gtr = __commonJS({
|
|
1502
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1565
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js"(exports, module2) {
|
|
1503
1566
|
var outside = require_outside();
|
|
1504
1567
|
var gtr = (version, range, options) => outside(version, range, ">", options);
|
|
1505
1568
|
module2.exports = gtr;
|
|
1506
1569
|
}
|
|
1507
1570
|
});
|
|
1508
1571
|
var require_ltr = __commonJS({
|
|
1509
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1572
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js"(exports, module2) {
|
|
1510
1573
|
var outside = require_outside();
|
|
1511
1574
|
var ltr = (version, range, options) => outside(version, range, "<", options);
|
|
1512
1575
|
module2.exports = ltr;
|
|
1513
1576
|
}
|
|
1514
1577
|
});
|
|
1515
1578
|
var require_intersects = __commonJS({
|
|
1516
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1579
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js"(exports, module2) {
|
|
1517
1580
|
var Range = require_range();
|
|
1518
1581
|
var intersects = (r1, r2, options) => {
|
|
1519
1582
|
r1 = new Range(r1, options);
|
|
@@ -1524,7 +1587,7 @@ var guid = (() => {
|
|
|
1524
1587
|
}
|
|
1525
1588
|
});
|
|
1526
1589
|
var require_simplify = __commonJS({
|
|
1527
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1590
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js"(exports, module2) {
|
|
1528
1591
|
var satisfies2 = require_satisfies();
|
|
1529
1592
|
var compare2 = require_compare();
|
|
1530
1593
|
module2.exports = (versions, range, options) => {
|
|
@@ -1571,7 +1634,7 @@ var guid = (() => {
|
|
|
1571
1634
|
}
|
|
1572
1635
|
});
|
|
1573
1636
|
var require_subset = __commonJS({
|
|
1574
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1637
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js"(exports, module2) {
|
|
1575
1638
|
var Range = require_range();
|
|
1576
1639
|
var Comparator = require_comparator();
|
|
1577
1640
|
var { ANY } = Comparator;
|
|
@@ -1678,7 +1741,7 @@ var guid = (() => {
|
|
|
1678
1741
|
if (higher === c && higher !== gt) {
|
|
1679
1742
|
return false;
|
|
1680
1743
|
}
|
|
1681
|
-
} else if (gt.operator === ">=" && !
|
|
1744
|
+
} else if (gt.operator === ">=" && !c.test(gt.semver)) {
|
|
1682
1745
|
return false;
|
|
1683
1746
|
}
|
|
1684
1747
|
}
|
|
@@ -1693,7 +1756,7 @@ var guid = (() => {
|
|
|
1693
1756
|
if (lower === c && lower !== lt) {
|
|
1694
1757
|
return false;
|
|
1695
1758
|
}
|
|
1696
|
-
} else if (lt.operator === "<=" && !
|
|
1759
|
+
} else if (lt.operator === "<=" && !c.test(lt.semver)) {
|
|
1697
1760
|
return false;
|
|
1698
1761
|
}
|
|
1699
1762
|
}
|
|
@@ -1730,7 +1793,7 @@ var guid = (() => {
|
|
|
1730
1793
|
}
|
|
1731
1794
|
});
|
|
1732
1795
|
var require_semver2 = __commonJS({
|
|
1733
|
-
"../../node_modules/.pnpm/semver@7.
|
|
1796
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js"(exports, module2) {
|
|
1734
1797
|
var internalRe = require_re();
|
|
1735
1798
|
var constants2 = require_constants();
|
|
1736
1799
|
var SemVer = require_semver();
|
|
@@ -1758,6 +1821,7 @@ var guid = (() => {
|
|
|
1758
1821
|
var lte = require_lte();
|
|
1759
1822
|
var cmp = require_cmp();
|
|
1760
1823
|
var coerce2 = require_coerce();
|
|
1824
|
+
var truncate = require_truncate();
|
|
1761
1825
|
var Comparator = require_comparator();
|
|
1762
1826
|
var Range = require_range();
|
|
1763
1827
|
var satisfies2 = require_satisfies();
|
|
@@ -1796,6 +1860,7 @@ var guid = (() => {
|
|
|
1796
1860
|
lte,
|
|
1797
1861
|
cmp,
|
|
1798
1862
|
coerce: coerce2,
|
|
1863
|
+
truncate,
|
|
1799
1864
|
Comparator,
|
|
1800
1865
|
Range,
|
|
1801
1866
|
satisfies: satisfies2,
|
|
@@ -1833,14 +1898,83 @@ var guid = (() => {
|
|
|
1833
1898
|
CliForegroundColor2["Reset"] = "\x1B[0m";
|
|
1834
1899
|
return CliForegroundColor2;
|
|
1835
1900
|
})(CliForegroundColor || {});
|
|
1901
|
+
function createCliToken(name) {
|
|
1902
|
+
return name;
|
|
1903
|
+
}
|
|
1904
|
+
var ICliUserSessionService_TOKEN = createCliToken("cli-user-session-service");
|
|
1905
|
+
var ICliUsersStoreService_TOKEN = createCliToken("cli-users-store-service");
|
|
1906
|
+
var ICliGroupsStoreService_TOKEN = createCliToken("cli-groups-store-service");
|
|
1907
|
+
var ICliAuthService_TOKEN = createCliToken("cli-auth-service");
|
|
1908
|
+
var ICliCompletionProvider_TOKEN = createCliToken("cli-completion-provider");
|
|
1909
|
+
var ICliDragDropService_TOKEN = createCliToken("cli-drag-drop-service");
|
|
1910
|
+
var ICliFileTransferService_TOKEN = createCliToken("cli-file-transfer-service");
|
|
1911
|
+
var ICliTranslationService_TOKEN = createCliToken("cli-translation-service");
|
|
1912
|
+
var ICliPermissionService_TOKEN = createCliToken("cli-permission-service");
|
|
1913
|
+
var ICliFilePickerProvider_TOKEN = createCliToken("cli-file-picker-provider");
|
|
1914
|
+
var ICliHttpClient_TOKEN = createCliToken("cli-http-client");
|
|
1915
|
+
var ICliUserEventService_TOKEN = createCliToken("cli-user-event-service");
|
|
1916
|
+
var ICliAuditService_TOKEN = createCliToken("cli-audit-service");
|
|
1917
|
+
var ICliAuthorizationService_TOKEN = createCliToken("cli-authorization-service");
|
|
1918
|
+
var ICliPermissionRegistry_TOKEN = createCliToken("cli-permission-registry");
|
|
1919
|
+
var ICliSessionsService_TOKEN = createCliToken("cli-sessions-service");
|
|
1920
|
+
var ICliKeyValueStore_TOKEN = createCliToken("cli-key-value-store");
|
|
1921
|
+
var ICliServerAuthTokenProvider_TOKEN = createCliToken("cli-server-auth-token-provider");
|
|
1922
|
+
var ICliServerAuthService_TOKEN = createCliToken("cli-server-auth-service");
|
|
1923
|
+
var ICliServerManager_TOKEN = createCliToken("cli-server-manager");
|
|
1836
1924
|
function resolveHeaders(provider) {
|
|
1837
1925
|
if (!provider) return {};
|
|
1838
1926
|
return typeof provider === "function" ? provider() : provider;
|
|
1839
1927
|
}
|
|
1928
|
+
var ICliCommandGuard_TOKEN = createCliToken("cli-command-guard");
|
|
1929
|
+
var ICliEventBus_TOKEN = createCliToken("cli-event-bus");
|
|
1840
1930
|
var DefaultLibraryAuthor = {
|
|
1841
1931
|
name: "Nicolae Lupei",
|
|
1842
1932
|
email: "nicolae.lupei@qodalis.com"
|
|
1843
1933
|
};
|
|
1934
|
+
function splitShellWords(text) {
|
|
1935
|
+
const words = [];
|
|
1936
|
+
let current = "";
|
|
1937
|
+
let inWord = false;
|
|
1938
|
+
for (let i = 0; i < text.length; i++) {
|
|
1939
|
+
const ch = text[i];
|
|
1940
|
+
if (ch === "\\" && i + 1 < text.length) {
|
|
1941
|
+
current += text[++i];
|
|
1942
|
+
inWord = true;
|
|
1943
|
+
} else if (ch === "'" && text.indexOf("'", i + 1) !== -1) {
|
|
1944
|
+
const end = text.indexOf("'", i + 1);
|
|
1945
|
+
current += text.slice(i + 1, end);
|
|
1946
|
+
inWord = true;
|
|
1947
|
+
i = end;
|
|
1948
|
+
} else if (ch === '"' && closingDoubleQuote(text, i) !== -1) {
|
|
1949
|
+
const end = closingDoubleQuote(text, i);
|
|
1950
|
+
current += unescapeDoubleQuoted(text.slice(i + 1, end));
|
|
1951
|
+
inWord = true;
|
|
1952
|
+
i = end;
|
|
1953
|
+
} else if (/\s/.test(ch)) {
|
|
1954
|
+
if (inWord) words.push(current);
|
|
1955
|
+
current = "";
|
|
1956
|
+
inWord = false;
|
|
1957
|
+
} else {
|
|
1958
|
+
current += ch;
|
|
1959
|
+
inWord = true;
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
if (inWord) words.push(current);
|
|
1963
|
+
return words;
|
|
1964
|
+
}
|
|
1965
|
+
function joinShellWords(text) {
|
|
1966
|
+
return splitShellWords(text).join(" ");
|
|
1967
|
+
}
|
|
1968
|
+
function closingDoubleQuote(text, start) {
|
|
1969
|
+
for (let i = start + 1; i < text.length; i++) {
|
|
1970
|
+
if (text[i] === "\\") i++;
|
|
1971
|
+
else if (text[i] === '"') return i;
|
|
1972
|
+
}
|
|
1973
|
+
return -1;
|
|
1974
|
+
}
|
|
1975
|
+
function unescapeDoubleQuoted(text) {
|
|
1976
|
+
return text.replace(/\\(["\\$`])/g, "$1");
|
|
1977
|
+
}
|
|
1844
1978
|
var CLI_CONFIGURE_STORE_NAME = "configure";
|
|
1845
1979
|
function getConfigValue(state, category, key, defaultValue) {
|
|
1846
1980
|
try {
|
|
@@ -1888,12 +2022,18 @@ var guid = (() => {
|
|
|
1888
2022
|
* Returns the negotiated API version and the base path for all subsequent calls,
|
|
1889
2023
|
* or null if the server is unreachable or incompatible.
|
|
1890
2024
|
*/
|
|
1891
|
-
static async discover(baseUrl, headers) {
|
|
2025
|
+
static async discover(baseUrl, headers, options) {
|
|
2026
|
+
let response;
|
|
1892
2027
|
try {
|
|
1893
2028
|
const resolved = resolveHeaders(headers);
|
|
1894
|
-
|
|
2029
|
+
response = await fetch(`${baseUrl}${VERSIONS_ENDPOINT}`, {
|
|
1895
2030
|
headers: Object.keys(resolved).length > 0 ? resolved : void 0
|
|
1896
2031
|
});
|
|
2032
|
+
} catch (e) {
|
|
2033
|
+
if (options?.rethrowNetworkErrors) throw e;
|
|
2034
|
+
return null;
|
|
2035
|
+
}
|
|
2036
|
+
try {
|
|
1897
2037
|
if (!response.ok) return null;
|
|
1898
2038
|
const info = await response.json();
|
|
1899
2039
|
const version = this.negotiate(info);
|
|
@@ -2790,7 +2930,7 @@ var guid = (() => {
|
|
|
2790
2930
|
};
|
|
2791
2931
|
|
|
2792
2932
|
// src/lib/version.ts
|
|
2793
|
-
var LIBRARY_VERSION = "2.0.0-beta.
|
|
2933
|
+
var LIBRARY_VERSION = "2.0.0-beta.19";
|
|
2794
2934
|
var API_VERSION2 = 2;
|
|
2795
2935
|
|
|
2796
2936
|
// src/lib/processors/cli-guid-command-processor.ts
|
|
@@ -2938,7 +3078,7 @@ var guid = (() => {
|
|
|
2938
3078
|
}
|
|
2939
3079
|
],
|
|
2940
3080
|
processCommand: async (command, context) => {
|
|
2941
|
-
const input = command.value;
|
|
3081
|
+
const input = joinShellWords(command.value ?? "");
|
|
2942
3082
|
const strict = command.args["strict"];
|
|
2943
3083
|
const isValid = strict ? validateGUID(input) : validateAnyGUID(input);
|
|
2944
3084
|
if (isValid) {
|
|
@@ -2996,7 +3136,7 @@ var guid = (() => {
|
|
|
2996
3136
|
}
|
|
2997
3137
|
],
|
|
2998
3138
|
processCommand: async (command, context) => {
|
|
2999
|
-
const input = command.value;
|
|
3139
|
+
const input = joinShellWords(command.value ?? "");
|
|
3000
3140
|
const clean = input.replace(/[-{}()urn:uuid ]/g, "");
|
|
3001
3141
|
if (!/^[0-9a-fA-F]{32}$/.test(clean)) {
|
|
3002
3142
|
context.writer.writeError(
|
|
@@ -3053,7 +3193,7 @@ var guid = (() => {
|
|
|
3053
3193
|
acceptsRawInput: true,
|
|
3054
3194
|
valueRequired: true,
|
|
3055
3195
|
processCommand: async (command, context) => {
|
|
3056
|
-
const input = command.value;
|
|
3196
|
+
const input = joinShellWords(command.value ?? "");
|
|
3057
3197
|
const { writer } = context;
|
|
3058
3198
|
if (!validateAnyGUID(input)) {
|
|
3059
3199
|
writer.writeError(`Invalid UUID: ${input}`);
|
|
@@ -3154,8 +3294,7 @@ var guid = (() => {
|
|
|
3154
3294
|
description: "Check if two UUIDs are equal (case/format insensitive)",
|
|
3155
3295
|
acceptsRawInput: true,
|
|
3156
3296
|
processCommand: async (command, context) => {
|
|
3157
|
-
const
|
|
3158
|
-
const parts = raw.split(/\s+/);
|
|
3297
|
+
const parts = command.positionals ?? [];
|
|
3159
3298
|
if (parts.length !== 2) {
|
|
3160
3299
|
context.writer.writeError(
|
|
3161
3300
|
"Provide exactly two UUIDs to compare"
|
|
@@ -3167,8 +3306,8 @@ var guid = (() => {
|
|
|
3167
3306
|
return;
|
|
3168
3307
|
}
|
|
3169
3308
|
const [a, b] = parts;
|
|
3170
|
-
const cleanA = a.replace(/[-{}()
|
|
3171
|
-
const cleanB = b.replace(/[-{}()
|
|
3309
|
+
const cleanA = a.replace(/^urn:uuid:/i, "").replace(/[-{}() ]/g, "").toLowerCase();
|
|
3310
|
+
const cleanB = b.replace(/^urn:uuid:/i, "").replace(/[-{}() ]/g, "").toLowerCase();
|
|
3172
3311
|
if (!/^[0-9a-f]{32}$/.test(cleanA) || !/^[0-9a-f]{32}$/.test(cleanB)) {
|
|
3173
3312
|
context.writer.writeError(
|
|
3174
3313
|
"One or both inputs are not valid UUIDs"
|