@wise/wds-codemods 1.0.0-experimental-a1aceef → 1.0.0-experimental-51ae005
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/{helpers-IFtIGywc.js → helpers-Du-iz0Iu.js} +378 -371
- package/dist/helpers-Du-iz0Iu.js.map +1 -0
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/dist/transformer-BBzz1o9D.js +382 -0
- package/dist/transformer-BBzz1o9D.js.map +1 -0
- package/dist/transforms/button/transformer.js +1 -2
- package/dist/transforms/button/transformer.js.map +1 -1
- package/dist/transforms/list-item/transformer.js +1 -2
- package/package.json +5 -4
- package/dist/helpers-IFtIGywc.js.map +0 -1
- package/dist/transformer-SaG5yPbG.js +0 -500
- package/dist/transformer-SaG5yPbG.js.map +0 -1
|
@@ -4,7 +4,7 @@ let node_fs_promises = require("node:fs/promises");
|
|
|
4
4
|
node_fs_promises = require_constants$1.__toESM(node_fs_promises);
|
|
5
5
|
let node_path = require("node:path");
|
|
6
6
|
node_path = require_constants$1.__toESM(node_path);
|
|
7
|
-
let
|
|
7
|
+
let _inquirer_prompts = require("@inquirer/prompts");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_constants$1.__toESM(node_fs);
|
|
10
10
|
let node_util = require("node:util");
|
|
@@ -12,10 +12,10 @@ let node_util = require("node:util");
|
|
|
12
12
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
|
|
13
13
|
var require_constants = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
14
14
|
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
15
|
-
const MAX_LENGTH
|
|
16
|
-
const MAX_SAFE_INTEGER
|
|
17
|
-
const MAX_SAFE_COMPONENT_LENGTH
|
|
18
|
-
const MAX_SAFE_BUILD_LENGTH
|
|
15
|
+
const MAX_LENGTH = 256;
|
|
16
|
+
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
17
|
+
const MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
18
|
+
const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
19
19
|
const RELEASE_TYPES = [
|
|
20
20
|
"major",
|
|
21
21
|
"premajor",
|
|
@@ -26,10 +26,10 @@ var require_constants = /* @__PURE__ */ require_constants$1.__commonJSMin(((expo
|
|
|
26
26
|
"prerelease"
|
|
27
27
|
];
|
|
28
28
|
module.exports = {
|
|
29
|
-
MAX_LENGTH
|
|
30
|
-
MAX_SAFE_COMPONENT_LENGTH
|
|
31
|
-
MAX_SAFE_BUILD_LENGTH
|
|
32
|
-
MAX_SAFE_INTEGER
|
|
29
|
+
MAX_LENGTH,
|
|
30
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
31
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
32
|
+
MAX_SAFE_INTEGER,
|
|
33
33
|
RELEASE_TYPES,
|
|
34
34
|
SEMVER_SPEC_VERSION,
|
|
35
35
|
FLAG_INCLUDE_PRERELEASE: 1,
|
|
@@ -40,26 +40,26 @@ var require_constants = /* @__PURE__ */ require_constants$1.__commonJSMin(((expo
|
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js
|
|
42
42
|
var require_debug = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
43
|
-
const debug
|
|
44
|
-
module.exports = debug
|
|
43
|
+
const debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
44
|
+
module.exports = debug;
|
|
45
45
|
}));
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js
|
|
49
49
|
var require_re = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
50
|
-
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH
|
|
51
|
-
const debug
|
|
50
|
+
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
|
|
51
|
+
const debug = require_debug();
|
|
52
52
|
exports = module.exports = {};
|
|
53
|
-
const re
|
|
53
|
+
const re = exports.re = [];
|
|
54
54
|
const safeRe = exports.safeRe = [];
|
|
55
55
|
const src = exports.src = [];
|
|
56
56
|
const safeSrc = exports.safeSrc = [];
|
|
57
|
-
const t
|
|
57
|
+
const t = exports.t = {};
|
|
58
58
|
let R = 0;
|
|
59
59
|
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
60
60
|
const safeRegexReplacements = [
|
|
61
61
|
["\\s", 1],
|
|
62
|
-
["\\d", MAX_LENGTH
|
|
62
|
+
["\\d", MAX_LENGTH],
|
|
63
63
|
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
64
64
|
];
|
|
65
65
|
const makeSafeRegex = (value) => {
|
|
@@ -69,56 +69,56 @@ var require_re = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, mo
|
|
|
69
69
|
const createToken = (name, value, isGlobal) => {
|
|
70
70
|
const safe = makeSafeRegex(value);
|
|
71
71
|
const index = R++;
|
|
72
|
-
debug
|
|
73
|
-
t
|
|
72
|
+
debug(name, index, value);
|
|
73
|
+
t[name] = index;
|
|
74
74
|
src[index] = value;
|
|
75
75
|
safeSrc[index] = safe;
|
|
76
|
-
re
|
|
76
|
+
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
77
77
|
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
78
78
|
};
|
|
79
79
|
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
80
80
|
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
81
81
|
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
82
|
-
createToken("MAINVERSION", `(${src[t
|
|
83
|
-
createToken("MAINVERSIONLOOSE", `(${src[t
|
|
84
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t
|
|
85
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t
|
|
86
|
-
createToken("PRERELEASE", `(?:-(${src[t
|
|
87
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t
|
|
82
|
+
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
83
|
+
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
84
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
|
|
85
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
86
|
+
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
87
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
88
88
|
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
89
|
-
createToken("BUILD", `(?:\\+(${src[t
|
|
90
|
-
createToken("FULLPLAIN", `v?${src[t
|
|
91
|
-
createToken("FULL", `^${src[t
|
|
92
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t
|
|
93
|
-
createToken("LOOSE", `^${src[t
|
|
89
|
+
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
90
|
+
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
91
|
+
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
92
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
93
|
+
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
94
94
|
createToken("GTLT", "((?:<|>)?=?)");
|
|
95
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t
|
|
96
|
-
createToken("XRANGEIDENTIFIER", `${src[t
|
|
97
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t
|
|
98
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t
|
|
99
|
-
createToken("XRANGE", `^${src[t
|
|
100
|
-
createToken("XRANGELOOSE", `^${src[t
|
|
95
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
96
|
+
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
97
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
98
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
99
|
+
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
100
|
+
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
101
101
|
createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
102
|
-
createToken("COERCE", `${src[t
|
|
103
|
-
createToken("COERCEFULL", src[t
|
|
104
|
-
createToken("COERCERTL", src[t
|
|
105
|
-
createToken("COERCERTLFULL", src[t
|
|
102
|
+
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
103
|
+
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
104
|
+
createToken("COERCERTL", src[t.COERCE], true);
|
|
105
|
+
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
106
106
|
createToken("LONETILDE", "(?:~>?)");
|
|
107
|
-
createToken("TILDETRIM", `(\\s*)${src[t
|
|
107
|
+
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
108
108
|
exports.tildeTrimReplace = "$1~";
|
|
109
|
-
createToken("TILDE", `^${src[t
|
|
110
|
-
createToken("TILDELOOSE", `^${src[t
|
|
109
|
+
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
110
|
+
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
111
111
|
createToken("LONECARET", "(?:\\^)");
|
|
112
|
-
createToken("CARETTRIM", `(\\s*)${src[t
|
|
112
|
+
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
113
113
|
exports.caretTrimReplace = "$1^";
|
|
114
|
-
createToken("CARET", `^${src[t
|
|
115
|
-
createToken("CARETLOOSE", `^${src[t
|
|
116
|
-
createToken("COMPARATORLOOSE", `^${src[t
|
|
117
|
-
createToken("COMPARATOR", `^${src[t
|
|
118
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t
|
|
114
|
+
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
115
|
+
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
116
|
+
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
117
|
+
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
118
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
119
119
|
exports.comparatorTrimReplace = "$1$2$3";
|
|
120
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t
|
|
121
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t
|
|
120
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
121
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
122
122
|
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
123
123
|
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
124
124
|
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
@@ -129,19 +129,19 @@ var require_re = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, mo
|
|
|
129
129
|
var require_parse_options = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
130
130
|
const looseOption = Object.freeze({ loose: true });
|
|
131
131
|
const emptyOpts = Object.freeze({});
|
|
132
|
-
const parseOptions
|
|
132
|
+
const parseOptions = (options) => {
|
|
133
133
|
if (!options) return emptyOpts;
|
|
134
134
|
if (typeof options !== "object") return looseOption;
|
|
135
135
|
return options;
|
|
136
136
|
};
|
|
137
|
-
module.exports = parseOptions
|
|
137
|
+
module.exports = parseOptions;
|
|
138
138
|
}));
|
|
139
139
|
|
|
140
140
|
//#endregion
|
|
141
141
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js
|
|
142
142
|
var require_identifiers = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
143
143
|
const numeric = /^[0-9]+$/;
|
|
144
|
-
const compareIdentifiers
|
|
144
|
+
const compareIdentifiers = (a, b) => {
|
|
145
145
|
const anum = numeric.test(a);
|
|
146
146
|
const bnum = numeric.test(b);
|
|
147
147
|
if (anum && bnum) {
|
|
@@ -150,9 +150,9 @@ var require_identifiers = /* @__PURE__ */ require_constants$1.__commonJSMin(((ex
|
|
|
150
150
|
}
|
|
151
151
|
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
152
152
|
};
|
|
153
|
-
const rcompareIdentifiers = (a, b) => compareIdentifiers
|
|
153
|
+
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
154
154
|
module.exports = {
|
|
155
|
-
compareIdentifiers
|
|
155
|
+
compareIdentifiers,
|
|
156
156
|
rcompareIdentifiers
|
|
157
157
|
};
|
|
158
158
|
}));
|
|
@@ -160,23 +160,23 @@ var require_identifiers = /* @__PURE__ */ require_constants$1.__commonJSMin(((ex
|
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js
|
|
162
162
|
var require_semver$1 = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
163
|
-
const debug
|
|
163
|
+
const debug = require_debug();
|
|
164
164
|
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
165
|
-
const { safeRe: re
|
|
166
|
-
const parseOptions
|
|
165
|
+
const { safeRe: re, t } = require_re();
|
|
166
|
+
const parseOptions = require_parse_options();
|
|
167
167
|
const { compareIdentifiers } = require_identifiers();
|
|
168
|
-
var SemVer
|
|
168
|
+
var SemVer = class SemVer {
|
|
169
169
|
constructor(version, options) {
|
|
170
|
-
options = parseOptions
|
|
171
|
-
if (version instanceof SemVer
|
|
170
|
+
options = parseOptions(options);
|
|
171
|
+
if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
172
172
|
else version = version.version;
|
|
173
173
|
else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
174
174
|
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
175
|
-
debug
|
|
175
|
+
debug("SemVer", version, options);
|
|
176
176
|
this.options = options;
|
|
177
177
|
this.loose = !!options.loose;
|
|
178
178
|
this.includePrerelease = !!options.includePrerelease;
|
|
179
|
-
const m = version.trim().match(options.loose ? re
|
|
179
|
+
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
180
180
|
if (!m) throw new TypeError(`Invalid Version: ${version}`);
|
|
181
181
|
this.raw = version;
|
|
182
182
|
this.major = +m[1];
|
|
@@ -205,20 +205,20 @@ var require_semver$1 = /* @__PURE__ */ require_constants$1.__commonJSMin(((expor
|
|
|
205
205
|
return this.version;
|
|
206
206
|
}
|
|
207
207
|
compare(other) {
|
|
208
|
-
debug
|
|
209
|
-
if (!(other instanceof SemVer
|
|
208
|
+
debug("SemVer.compare", this.version, this.options, other);
|
|
209
|
+
if (!(other instanceof SemVer)) {
|
|
210
210
|
if (typeof other === "string" && other === this.version) return 0;
|
|
211
|
-
other = new SemVer
|
|
211
|
+
other = new SemVer(other, this.options);
|
|
212
212
|
}
|
|
213
213
|
if (other.version === this.version) return 0;
|
|
214
214
|
return this.compareMain(other) || this.comparePre(other);
|
|
215
215
|
}
|
|
216
216
|
compareMain(other) {
|
|
217
|
-
if (!(other instanceof SemVer
|
|
217
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
218
218
|
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
219
219
|
}
|
|
220
220
|
comparePre(other) {
|
|
221
|
-
if (!(other instanceof SemVer
|
|
221
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
222
222
|
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
223
223
|
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
224
224
|
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
@@ -226,7 +226,7 @@ var require_semver$1 = /* @__PURE__ */ require_constants$1.__commonJSMin(((expor
|
|
|
226
226
|
do {
|
|
227
227
|
const a = this.prerelease[i];
|
|
228
228
|
const b = other.prerelease[i];
|
|
229
|
-
debug
|
|
229
|
+
debug("prerelease compare", i, a, b);
|
|
230
230
|
if (a === void 0 && b === void 0) return 0;
|
|
231
231
|
else if (b === void 0) return 1;
|
|
232
232
|
else if (a === void 0) return -1;
|
|
@@ -235,12 +235,12 @@ var require_semver$1 = /* @__PURE__ */ require_constants$1.__commonJSMin(((expor
|
|
|
235
235
|
} while (++i);
|
|
236
236
|
}
|
|
237
237
|
compareBuild(other) {
|
|
238
|
-
if (!(other instanceof SemVer
|
|
238
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
239
239
|
let i = 0;
|
|
240
240
|
do {
|
|
241
241
|
const a = this.build[i];
|
|
242
242
|
const b = other.build[i];
|
|
243
|
-
debug
|
|
243
|
+
debug("build compare", i, a, b);
|
|
244
244
|
if (a === void 0 && b === void 0) return 0;
|
|
245
245
|
else if (b === void 0) return 1;
|
|
246
246
|
else if (a === void 0) return -1;
|
|
@@ -252,7 +252,7 @@ var require_semver$1 = /* @__PURE__ */ require_constants$1.__commonJSMin(((expor
|
|
|
252
252
|
if (release.startsWith("pre")) {
|
|
253
253
|
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
254
254
|
if (identifier) {
|
|
255
|
-
const match = `-${identifier}`.match(this.options.loose ? re
|
|
255
|
+
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
256
256
|
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
257
257
|
}
|
|
258
258
|
}
|
|
@@ -313,11 +313,11 @@ var require_semver$1 = /* @__PURE__ */ require_constants$1.__commonJSMin(((expor
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
if (identifier) {
|
|
316
|
-
let prerelease
|
|
317
|
-
if (identifierBase === false) prerelease
|
|
316
|
+
let prerelease = [identifier, base];
|
|
317
|
+
if (identifierBase === false) prerelease = [identifier];
|
|
318
318
|
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
319
|
-
if (isNaN(this.prerelease[1])) this.prerelease = prerelease
|
|
320
|
-
} else this.prerelease = prerelease
|
|
319
|
+
if (isNaN(this.prerelease[1])) this.prerelease = prerelease;
|
|
320
|
+
} else this.prerelease = prerelease;
|
|
321
321
|
}
|
|
322
322
|
break;
|
|
323
323
|
}
|
|
@@ -328,73 +328,73 @@ var require_semver$1 = /* @__PURE__ */ require_constants$1.__commonJSMin(((expor
|
|
|
328
328
|
return this;
|
|
329
329
|
}
|
|
330
330
|
};
|
|
331
|
-
module.exports = SemVer
|
|
331
|
+
module.exports = SemVer;
|
|
332
332
|
}));
|
|
333
333
|
|
|
334
334
|
//#endregion
|
|
335
335
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js
|
|
336
336
|
var require_parse = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
337
|
-
const SemVer
|
|
338
|
-
const parse
|
|
339
|
-
if (version instanceof SemVer
|
|
337
|
+
const SemVer = require_semver$1();
|
|
338
|
+
const parse = (version, options, throwErrors = false) => {
|
|
339
|
+
if (version instanceof SemVer) return version;
|
|
340
340
|
try {
|
|
341
|
-
return new SemVer
|
|
341
|
+
return new SemVer(version, options);
|
|
342
342
|
} catch (er) {
|
|
343
343
|
if (!throwErrors) return null;
|
|
344
344
|
throw er;
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
|
-
module.exports = parse
|
|
347
|
+
module.exports = parse;
|
|
348
348
|
}));
|
|
349
349
|
|
|
350
350
|
//#endregion
|
|
351
351
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js
|
|
352
352
|
var require_valid$1 = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
353
|
-
const parse
|
|
354
|
-
const valid
|
|
355
|
-
const v = parse
|
|
353
|
+
const parse = require_parse();
|
|
354
|
+
const valid = (version, options) => {
|
|
355
|
+
const v = parse(version, options);
|
|
356
356
|
return v ? v.version : null;
|
|
357
357
|
};
|
|
358
|
-
module.exports = valid
|
|
358
|
+
module.exports = valid;
|
|
359
359
|
}));
|
|
360
360
|
|
|
361
361
|
//#endregion
|
|
362
362
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js
|
|
363
363
|
var require_clean = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
364
|
-
const parse
|
|
365
|
-
const clean
|
|
366
|
-
const s = parse
|
|
364
|
+
const parse = require_parse();
|
|
365
|
+
const clean = (version, options) => {
|
|
366
|
+
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
367
367
|
return s ? s.version : null;
|
|
368
368
|
};
|
|
369
|
-
module.exports = clean
|
|
369
|
+
module.exports = clean;
|
|
370
370
|
}));
|
|
371
371
|
|
|
372
372
|
//#endregion
|
|
373
373
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js
|
|
374
374
|
var require_inc = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
375
|
-
const SemVer
|
|
376
|
-
const inc
|
|
375
|
+
const SemVer = require_semver$1();
|
|
376
|
+
const inc = (version, release, options, identifier, identifierBase) => {
|
|
377
377
|
if (typeof options === "string") {
|
|
378
378
|
identifierBase = identifier;
|
|
379
379
|
identifier = options;
|
|
380
380
|
options = void 0;
|
|
381
381
|
}
|
|
382
382
|
try {
|
|
383
|
-
return new SemVer
|
|
383
|
+
return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
384
384
|
} catch (er) {
|
|
385
385
|
return null;
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
|
-
module.exports = inc
|
|
388
|
+
module.exports = inc;
|
|
389
389
|
}));
|
|
390
390
|
|
|
391
391
|
//#endregion
|
|
392
392
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js
|
|
393
393
|
var require_diff = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
394
|
-
const parse
|
|
395
|
-
const diff
|
|
396
|
-
const v1 = parse
|
|
397
|
-
const v2 = parse
|
|
394
|
+
const parse = require_parse();
|
|
395
|
+
const diff = (version1, version2) => {
|
|
396
|
+
const v1 = parse(version1, null, true);
|
|
397
|
+
const v2 = parse(version2, null, true);
|
|
398
398
|
const comparison = v1.compare(v2);
|
|
399
399
|
if (comparison === 0) return null;
|
|
400
400
|
const v1Higher = comparison > 0;
|
|
@@ -414,154 +414,154 @@ var require_diff = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
414
414
|
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
415
415
|
return "prerelease";
|
|
416
416
|
};
|
|
417
|
-
module.exports = diff
|
|
417
|
+
module.exports = diff;
|
|
418
418
|
}));
|
|
419
419
|
|
|
420
420
|
//#endregion
|
|
421
421
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js
|
|
422
422
|
var require_major = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
423
|
-
const SemVer
|
|
424
|
-
const major
|
|
425
|
-
module.exports = major
|
|
423
|
+
const SemVer = require_semver$1();
|
|
424
|
+
const major = (a, loose) => new SemVer(a, loose).major;
|
|
425
|
+
module.exports = major;
|
|
426
426
|
}));
|
|
427
427
|
|
|
428
428
|
//#endregion
|
|
429
429
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js
|
|
430
430
|
var require_minor = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
431
|
-
const SemVer
|
|
432
|
-
const minor
|
|
433
|
-
module.exports = minor
|
|
431
|
+
const SemVer = require_semver$1();
|
|
432
|
+
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
433
|
+
module.exports = minor;
|
|
434
434
|
}));
|
|
435
435
|
|
|
436
436
|
//#endregion
|
|
437
437
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js
|
|
438
438
|
var require_patch = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
439
|
-
const SemVer
|
|
440
|
-
const patch
|
|
441
|
-
module.exports = patch
|
|
439
|
+
const SemVer = require_semver$1();
|
|
440
|
+
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
441
|
+
module.exports = patch;
|
|
442
442
|
}));
|
|
443
443
|
|
|
444
444
|
//#endregion
|
|
445
445
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js
|
|
446
446
|
var require_prerelease = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
447
|
-
const parse
|
|
448
|
-
const prerelease
|
|
449
|
-
const parsed = parse
|
|
447
|
+
const parse = require_parse();
|
|
448
|
+
const prerelease = (version, options) => {
|
|
449
|
+
const parsed = parse(version, options);
|
|
450
450
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
451
451
|
};
|
|
452
|
-
module.exports = prerelease
|
|
452
|
+
module.exports = prerelease;
|
|
453
453
|
}));
|
|
454
454
|
|
|
455
455
|
//#endregion
|
|
456
456
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js
|
|
457
457
|
var require_compare = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
458
|
-
const SemVer
|
|
459
|
-
const compare
|
|
460
|
-
module.exports = compare
|
|
458
|
+
const SemVer = require_semver$1();
|
|
459
|
+
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
460
|
+
module.exports = compare;
|
|
461
461
|
}));
|
|
462
462
|
|
|
463
463
|
//#endregion
|
|
464
464
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js
|
|
465
465
|
var require_rcompare = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
466
|
-
const compare
|
|
467
|
-
const rcompare
|
|
468
|
-
module.exports = rcompare
|
|
466
|
+
const compare = require_compare();
|
|
467
|
+
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
468
|
+
module.exports = rcompare;
|
|
469
469
|
}));
|
|
470
470
|
|
|
471
471
|
//#endregion
|
|
472
472
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js
|
|
473
473
|
var require_compare_loose = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
474
|
-
const compare
|
|
475
|
-
const compareLoose
|
|
476
|
-
module.exports = compareLoose
|
|
474
|
+
const compare = require_compare();
|
|
475
|
+
const compareLoose = (a, b) => compare(a, b, true);
|
|
476
|
+
module.exports = compareLoose;
|
|
477
477
|
}));
|
|
478
478
|
|
|
479
479
|
//#endregion
|
|
480
480
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js
|
|
481
481
|
var require_compare_build = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
482
|
-
const SemVer
|
|
483
|
-
const compareBuild
|
|
484
|
-
const versionA = new SemVer
|
|
485
|
-
const versionB = new SemVer
|
|
482
|
+
const SemVer = require_semver$1();
|
|
483
|
+
const compareBuild = (a, b, loose) => {
|
|
484
|
+
const versionA = new SemVer(a, loose);
|
|
485
|
+
const versionB = new SemVer(b, loose);
|
|
486
486
|
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
487
487
|
};
|
|
488
|
-
module.exports = compareBuild
|
|
488
|
+
module.exports = compareBuild;
|
|
489
489
|
}));
|
|
490
490
|
|
|
491
491
|
//#endregion
|
|
492
492
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js
|
|
493
493
|
var require_sort = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
494
|
-
const compareBuild
|
|
495
|
-
const sort
|
|
496
|
-
module.exports = sort
|
|
494
|
+
const compareBuild = require_compare_build();
|
|
495
|
+
const sort = (list$1, loose) => list$1.sort((a, b) => compareBuild(a, b, loose));
|
|
496
|
+
module.exports = sort;
|
|
497
497
|
}));
|
|
498
498
|
|
|
499
499
|
//#endregion
|
|
500
500
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js
|
|
501
501
|
var require_rsort = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
502
|
-
const compareBuild
|
|
503
|
-
const rsort
|
|
504
|
-
module.exports = rsort
|
|
502
|
+
const compareBuild = require_compare_build();
|
|
503
|
+
const rsort = (list$1, loose) => list$1.sort((a, b) => compareBuild(b, a, loose));
|
|
504
|
+
module.exports = rsort;
|
|
505
505
|
}));
|
|
506
506
|
|
|
507
507
|
//#endregion
|
|
508
508
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js
|
|
509
509
|
var require_gt = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
510
|
-
const compare
|
|
511
|
-
const gt
|
|
512
|
-
module.exports = gt
|
|
510
|
+
const compare = require_compare();
|
|
511
|
+
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
512
|
+
module.exports = gt;
|
|
513
513
|
}));
|
|
514
514
|
|
|
515
515
|
//#endregion
|
|
516
516
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js
|
|
517
517
|
var require_lt = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
518
|
-
const compare
|
|
519
|
-
const lt
|
|
520
|
-
module.exports = lt
|
|
518
|
+
const compare = require_compare();
|
|
519
|
+
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
520
|
+
module.exports = lt;
|
|
521
521
|
}));
|
|
522
522
|
|
|
523
523
|
//#endregion
|
|
524
524
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js
|
|
525
525
|
var require_eq = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
526
|
-
const compare
|
|
527
|
-
const eq
|
|
528
|
-
module.exports = eq
|
|
526
|
+
const compare = require_compare();
|
|
527
|
+
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
528
|
+
module.exports = eq;
|
|
529
529
|
}));
|
|
530
530
|
|
|
531
531
|
//#endregion
|
|
532
532
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js
|
|
533
533
|
var require_neq = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
534
|
-
const compare
|
|
535
|
-
const neq
|
|
536
|
-
module.exports = neq
|
|
534
|
+
const compare = require_compare();
|
|
535
|
+
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
536
|
+
module.exports = neq;
|
|
537
537
|
}));
|
|
538
538
|
|
|
539
539
|
//#endregion
|
|
540
540
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js
|
|
541
541
|
var require_gte = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
542
|
-
const compare
|
|
543
|
-
const gte
|
|
544
|
-
module.exports = gte
|
|
542
|
+
const compare = require_compare();
|
|
543
|
+
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
544
|
+
module.exports = gte;
|
|
545
545
|
}));
|
|
546
546
|
|
|
547
547
|
//#endregion
|
|
548
548
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js
|
|
549
549
|
var require_lte = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
550
|
-
const compare
|
|
551
|
-
const lte
|
|
552
|
-
module.exports = lte
|
|
550
|
+
const compare = require_compare();
|
|
551
|
+
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
552
|
+
module.exports = lte;
|
|
553
553
|
}));
|
|
554
554
|
|
|
555
555
|
//#endregion
|
|
556
556
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js
|
|
557
557
|
var require_cmp = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
558
|
-
const eq
|
|
559
|
-
const neq
|
|
560
|
-
const gt
|
|
561
|
-
const gte
|
|
562
|
-
const lt
|
|
563
|
-
const lte
|
|
564
|
-
const cmp
|
|
558
|
+
const eq = require_eq();
|
|
559
|
+
const neq = require_neq();
|
|
560
|
+
const gt = require_gt();
|
|
561
|
+
const gte = require_gte();
|
|
562
|
+
const lt = require_lt();
|
|
563
|
+
const lte = require_lte();
|
|
564
|
+
const cmp = (a, op, b, loose) => {
|
|
565
565
|
switch (op) {
|
|
566
566
|
case "===":
|
|
567
567
|
if (typeof a === "object") a = a.version;
|
|
@@ -573,33 +573,33 @@ var require_cmp = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, m
|
|
|
573
573
|
return a !== b;
|
|
574
574
|
case "":
|
|
575
575
|
case "=":
|
|
576
|
-
case "==": return eq
|
|
577
|
-
case "!=": return neq
|
|
578
|
-
case ">": return gt
|
|
579
|
-
case ">=": return gte
|
|
580
|
-
case "<": return lt
|
|
581
|
-
case "<=": return lte
|
|
576
|
+
case "==": return eq(a, b, loose);
|
|
577
|
+
case "!=": return neq(a, b, loose);
|
|
578
|
+
case ">": return gt(a, b, loose);
|
|
579
|
+
case ">=": return gte(a, b, loose);
|
|
580
|
+
case "<": return lt(a, b, loose);
|
|
581
|
+
case "<=": return lte(a, b, loose);
|
|
582
582
|
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
583
583
|
}
|
|
584
584
|
};
|
|
585
|
-
module.exports = cmp
|
|
585
|
+
module.exports = cmp;
|
|
586
586
|
}));
|
|
587
587
|
|
|
588
588
|
//#endregion
|
|
589
589
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js
|
|
590
590
|
var require_coerce = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
591
|
-
const SemVer
|
|
592
|
-
const parse
|
|
593
|
-
const { safeRe: re
|
|
594
|
-
const coerce
|
|
595
|
-
if (version instanceof SemVer
|
|
591
|
+
const SemVer = require_semver$1();
|
|
592
|
+
const parse = require_parse();
|
|
593
|
+
const { safeRe: re, t } = require_re();
|
|
594
|
+
const coerce = (version, options) => {
|
|
595
|
+
if (version instanceof SemVer) return version;
|
|
596
596
|
if (typeof version === "number") version = String(version);
|
|
597
597
|
if (typeof version !== "string") return null;
|
|
598
598
|
options = options || {};
|
|
599
599
|
let match = null;
|
|
600
|
-
if (!options.rtl) match = version.match(options.includePrerelease ? re
|
|
600
|
+
if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
601
601
|
else {
|
|
602
|
-
const coerceRtlRegex = options.includePrerelease ? re
|
|
602
|
+
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
603
603
|
let next;
|
|
604
604
|
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
605
605
|
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
@@ -608,10 +608,10 @@ var require_coerce = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports
|
|
|
608
608
|
coerceRtlRegex.lastIndex = -1;
|
|
609
609
|
}
|
|
610
610
|
if (match === null) return null;
|
|
611
|
-
const major
|
|
612
|
-
return parse
|
|
611
|
+
const major = match[2];
|
|
612
|
+
return parse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
|
|
613
613
|
};
|
|
614
|
-
module.exports = coerce
|
|
614
|
+
module.exports = coerce;
|
|
615
615
|
}));
|
|
616
616
|
|
|
617
617
|
//#endregion
|
|
@@ -652,12 +652,12 @@ var require_lrucache = /* @__PURE__ */ require_constants$1.__commonJSMin(((expor
|
|
|
652
652
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js
|
|
653
653
|
var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
654
654
|
const SPACE_CHARACTERS = /\s+/g;
|
|
655
|
-
var Range
|
|
655
|
+
var Range = class Range {
|
|
656
656
|
constructor(range, options) {
|
|
657
|
-
options = parseOptions
|
|
658
|
-
if (range instanceof Range
|
|
659
|
-
else return new Range
|
|
660
|
-
if (range instanceof Comparator
|
|
657
|
+
options = parseOptions(options);
|
|
658
|
+
if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
|
|
659
|
+
else return new Range(range.raw, options);
|
|
660
|
+
if (range instanceof Comparator) {
|
|
661
661
|
this.raw = range.value;
|
|
662
662
|
this.set = [[range]];
|
|
663
663
|
this.formatted = void 0;
|
|
@@ -707,23 +707,23 @@ var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
707
707
|
const cached = cache.get(memoKey);
|
|
708
708
|
if (cached) return cached;
|
|
709
709
|
const loose = this.options.loose;
|
|
710
|
-
const hr = loose ? re
|
|
710
|
+
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
711
711
|
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
712
|
-
debug
|
|
713
|
-
range = range.replace(re
|
|
714
|
-
debug
|
|
715
|
-
range = range.replace(re
|
|
716
|
-
debug
|
|
717
|
-
range = range.replace(re
|
|
718
|
-
debug
|
|
712
|
+
debug("hyphen replace", range);
|
|
713
|
+
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
714
|
+
debug("comparator trim", range);
|
|
715
|
+
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
716
|
+
debug("tilde trim", range);
|
|
717
|
+
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
718
|
+
debug("caret trim", range);
|
|
719
719
|
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
720
720
|
if (loose) rangeList = rangeList.filter((comp) => {
|
|
721
|
-
debug
|
|
722
|
-
return !!comp.match(re
|
|
721
|
+
debug("loose invalid filter", comp, this.options);
|
|
722
|
+
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
723
723
|
});
|
|
724
|
-
debug
|
|
724
|
+
debug("range list", rangeList);
|
|
725
725
|
const rangeMap = /* @__PURE__ */ new Map();
|
|
726
|
-
const comparators = rangeList.map((comp) => new Comparator
|
|
726
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
727
727
|
for (const comp of comparators) {
|
|
728
728
|
if (isNullSet(comp)) return [comp];
|
|
729
729
|
rangeMap.set(comp.value, comp);
|
|
@@ -734,7 +734,7 @@ var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
734
734
|
return result;
|
|
735
735
|
}
|
|
736
736
|
intersects(range, options) {
|
|
737
|
-
if (!(range instanceof Range
|
|
737
|
+
if (!(range instanceof Range)) throw new TypeError("a Range is required");
|
|
738
738
|
return this.set.some((thisComparators) => {
|
|
739
739
|
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
740
740
|
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
@@ -748,7 +748,7 @@ var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
748
748
|
test(version) {
|
|
749
749
|
if (!version) return false;
|
|
750
750
|
if (typeof version === "string") try {
|
|
751
|
-
version = new SemVer
|
|
751
|
+
version = new SemVer(version, this.options);
|
|
752
752
|
} catch (er) {
|
|
753
753
|
return false;
|
|
754
754
|
}
|
|
@@ -756,13 +756,13 @@ var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
756
756
|
return false;
|
|
757
757
|
}
|
|
758
758
|
};
|
|
759
|
-
module.exports = Range
|
|
759
|
+
module.exports = Range;
|
|
760
760
|
const cache = new (require_lrucache())();
|
|
761
|
-
const parseOptions
|
|
762
|
-
const Comparator
|
|
763
|
-
const debug
|
|
764
|
-
const SemVer
|
|
765
|
-
const { safeRe: re
|
|
761
|
+
const parseOptions = require_parse_options();
|
|
762
|
+
const Comparator = require_comparator();
|
|
763
|
+
const debug = require_debug();
|
|
764
|
+
const SemVer = require_semver$1();
|
|
765
|
+
const { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
766
766
|
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
767
767
|
const isNullSet = (c) => c.value === "<0.0.0-0";
|
|
768
768
|
const isAny = (c) => c.value === "";
|
|
@@ -779,15 +779,15 @@ var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
779
779
|
return result;
|
|
780
780
|
};
|
|
781
781
|
const parseComparator = (comp, options) => {
|
|
782
|
-
debug
|
|
782
|
+
debug("comp", comp, options);
|
|
783
783
|
comp = replaceCarets(comp, options);
|
|
784
|
-
debug
|
|
784
|
+
debug("caret", comp);
|
|
785
785
|
comp = replaceTildes(comp, options);
|
|
786
|
-
debug
|
|
786
|
+
debug("tildes", comp);
|
|
787
787
|
comp = replaceXRanges(comp, options);
|
|
788
|
-
debug
|
|
788
|
+
debug("xrange", comp);
|
|
789
789
|
comp = replaceStars(comp, options);
|
|
790
|
-
debug
|
|
790
|
+
debug("stars", comp);
|
|
791
791
|
return comp;
|
|
792
792
|
};
|
|
793
793
|
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
@@ -795,18 +795,18 @@ var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
795
795
|
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
796
796
|
};
|
|
797
797
|
const replaceTilde = (comp, options) => {
|
|
798
|
-
const r = options.loose ? re
|
|
798
|
+
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
799
799
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
800
|
-
debug
|
|
800
|
+
debug("tilde", comp, _, M, m, p, pr);
|
|
801
801
|
let ret;
|
|
802
802
|
if (isX(M)) ret = "";
|
|
803
803
|
else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
804
804
|
else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
805
805
|
else if (pr) {
|
|
806
|
-
debug
|
|
806
|
+
debug("replaceTilde pr", pr);
|
|
807
807
|
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
808
808
|
} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
809
|
-
debug
|
|
809
|
+
debug("tilde return", ret);
|
|
810
810
|
return ret;
|
|
811
811
|
});
|
|
812
812
|
};
|
|
@@ -814,40 +814,40 @@ var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
814
814
|
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
815
815
|
};
|
|
816
816
|
const replaceCaret = (comp, options) => {
|
|
817
|
-
debug
|
|
818
|
-
const r = options.loose ? re
|
|
817
|
+
debug("caret", comp, options);
|
|
818
|
+
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
819
819
|
const z = options.includePrerelease ? "-0" : "";
|
|
820
820
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
821
|
-
debug
|
|
821
|
+
debug("caret", comp, _, M, m, p, pr);
|
|
822
822
|
let ret;
|
|
823
823
|
if (isX(M)) ret = "";
|
|
824
824
|
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
825
825
|
else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
826
826
|
else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
827
827
|
else if (pr) {
|
|
828
|
-
debug
|
|
828
|
+
debug("replaceCaret pr", pr);
|
|
829
829
|
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
830
830
|
else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
831
831
|
else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
832
832
|
} else {
|
|
833
|
-
debug
|
|
833
|
+
debug("no pr");
|
|
834
834
|
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
835
835
|
else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
836
836
|
else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
837
837
|
}
|
|
838
|
-
debug
|
|
838
|
+
debug("caret return", ret);
|
|
839
839
|
return ret;
|
|
840
840
|
});
|
|
841
841
|
};
|
|
842
842
|
const replaceXRanges = (comp, options) => {
|
|
843
|
-
debug
|
|
843
|
+
debug("replaceXRanges", comp, options);
|
|
844
844
|
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
845
845
|
};
|
|
846
846
|
const replaceXRange = (comp, options) => {
|
|
847
847
|
comp = comp.trim();
|
|
848
|
-
const r = options.loose ? re
|
|
848
|
+
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
849
849
|
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
850
|
-
debug
|
|
850
|
+
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
851
851
|
const xM = isX(M);
|
|
852
852
|
const xm = xM || isX(m);
|
|
853
853
|
const xp = xm || isX(p);
|
|
@@ -878,17 +878,17 @@ var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
878
878
|
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
879
879
|
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
880
880
|
else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
881
|
-
debug
|
|
881
|
+
debug("xRange return", ret);
|
|
882
882
|
return ret;
|
|
883
883
|
});
|
|
884
884
|
};
|
|
885
885
|
const replaceStars = (comp, options) => {
|
|
886
|
-
debug
|
|
887
|
-
return comp.trim().replace(re
|
|
886
|
+
debug("replaceStars", comp, options);
|
|
887
|
+
return comp.trim().replace(re[t.STAR], "");
|
|
888
888
|
};
|
|
889
889
|
const replaceGTE0 = (comp, options) => {
|
|
890
|
-
debug
|
|
891
|
-
return comp.trim().replace(re
|
|
890
|
+
debug("replaceGTE0", comp, options);
|
|
891
|
+
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
892
892
|
};
|
|
893
893
|
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
894
894
|
if (isX(fM)) from = "";
|
|
@@ -908,8 +908,8 @@ var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
908
908
|
for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
|
|
909
909
|
if (version.prerelease.length && !options.includePrerelease) {
|
|
910
910
|
for (let i = 0; i < set.length; i++) {
|
|
911
|
-
debug
|
|
912
|
-
if (set[i].semver === Comparator
|
|
911
|
+
debug(set[i].semver);
|
|
912
|
+
if (set[i].semver === Comparator.ANY) continue;
|
|
913
913
|
if (set[i].semver.prerelease.length > 0) {
|
|
914
914
|
const allowed = set[i].semver;
|
|
915
915
|
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
|
|
@@ -924,21 +924,21 @@ var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports,
|
|
|
924
924
|
//#endregion
|
|
925
925
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js
|
|
926
926
|
var require_comparator = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
927
|
-
const ANY
|
|
928
|
-
var Comparator
|
|
927
|
+
const ANY = Symbol("SemVer ANY");
|
|
928
|
+
var Comparator = class Comparator {
|
|
929
929
|
static get ANY() {
|
|
930
|
-
return ANY
|
|
930
|
+
return ANY;
|
|
931
931
|
}
|
|
932
932
|
constructor(comp, options) {
|
|
933
933
|
options = parseOptions(options);
|
|
934
|
-
if (comp instanceof Comparator
|
|
934
|
+
if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp;
|
|
935
935
|
else comp = comp.value;
|
|
936
936
|
comp = comp.trim().split(/\s+/).join(" ");
|
|
937
937
|
debug("comparator", comp, options);
|
|
938
938
|
this.options = options;
|
|
939
939
|
this.loose = !!options.loose;
|
|
940
940
|
this.parse(comp);
|
|
941
|
-
if (this.semver === ANY
|
|
941
|
+
if (this.semver === ANY) this.value = "";
|
|
942
942
|
else this.value = this.operator + this.semver.version;
|
|
943
943
|
debug("comp", this);
|
|
944
944
|
}
|
|
@@ -948,30 +948,30 @@ var require_comparator = /* @__PURE__ */ require_constants$1.__commonJSMin(((exp
|
|
|
948
948
|
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
949
949
|
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
950
950
|
if (this.operator === "=") this.operator = "";
|
|
951
|
-
if (!m[2]) this.semver = ANY
|
|
952
|
-
else this.semver = new SemVer
|
|
951
|
+
if (!m[2]) this.semver = ANY;
|
|
952
|
+
else this.semver = new SemVer(m[2], this.options.loose);
|
|
953
953
|
}
|
|
954
954
|
toString() {
|
|
955
955
|
return this.value;
|
|
956
956
|
}
|
|
957
957
|
test(version) {
|
|
958
958
|
debug("Comparator.test", version, this.options.loose);
|
|
959
|
-
if (this.semver === ANY
|
|
959
|
+
if (this.semver === ANY || version === ANY) return true;
|
|
960
960
|
if (typeof version === "string") try {
|
|
961
|
-
version = new SemVer
|
|
961
|
+
version = new SemVer(version, this.options);
|
|
962
962
|
} catch (er) {
|
|
963
963
|
return false;
|
|
964
964
|
}
|
|
965
|
-
return cmp
|
|
965
|
+
return cmp(version, this.operator, this.semver, this.options);
|
|
966
966
|
}
|
|
967
967
|
intersects(comp, options) {
|
|
968
|
-
if (!(comp instanceof Comparator
|
|
968
|
+
if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
|
|
969
969
|
if (this.operator === "") {
|
|
970
970
|
if (this.value === "") return true;
|
|
971
|
-
return new Range
|
|
971
|
+
return new Range(comp.value, options).test(this.value);
|
|
972
972
|
} else if (comp.operator === "") {
|
|
973
973
|
if (comp.value === "") return true;
|
|
974
|
-
return new Range
|
|
974
|
+
return new Range(this.value, options).test(comp.semver);
|
|
975
975
|
}
|
|
976
976
|
options = parseOptions(options);
|
|
977
977
|
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
@@ -979,54 +979,54 @@ var require_comparator = /* @__PURE__ */ require_constants$1.__commonJSMin(((exp
|
|
|
979
979
|
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
980
980
|
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
981
981
|
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
982
|
-
if (cmp
|
|
983
|
-
if (cmp
|
|
982
|
+
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
983
|
+
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
984
984
|
return false;
|
|
985
985
|
}
|
|
986
986
|
};
|
|
987
|
-
module.exports = Comparator
|
|
987
|
+
module.exports = Comparator;
|
|
988
988
|
const parseOptions = require_parse_options();
|
|
989
989
|
const { safeRe: re, t } = require_re();
|
|
990
|
-
const cmp
|
|
990
|
+
const cmp = require_cmp();
|
|
991
991
|
const debug = require_debug();
|
|
992
|
-
const SemVer
|
|
993
|
-
const Range
|
|
992
|
+
const SemVer = require_semver$1();
|
|
993
|
+
const Range = require_range();
|
|
994
994
|
}));
|
|
995
995
|
|
|
996
996
|
//#endregion
|
|
997
997
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js
|
|
998
998
|
var require_satisfies = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
999
|
-
const Range
|
|
1000
|
-
const satisfies
|
|
999
|
+
const Range = require_range();
|
|
1000
|
+
const satisfies = (version, range, options) => {
|
|
1001
1001
|
try {
|
|
1002
|
-
range = new Range
|
|
1002
|
+
range = new Range(range, options);
|
|
1003
1003
|
} catch (er) {
|
|
1004
1004
|
return false;
|
|
1005
1005
|
}
|
|
1006
1006
|
return range.test(version);
|
|
1007
1007
|
};
|
|
1008
|
-
module.exports = satisfies
|
|
1008
|
+
module.exports = satisfies;
|
|
1009
1009
|
}));
|
|
1010
1010
|
|
|
1011
1011
|
//#endregion
|
|
1012
1012
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js
|
|
1013
1013
|
var require_to_comparators = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1014
|
-
const Range
|
|
1015
|
-
const toComparators
|
|
1016
|
-
module.exports = toComparators
|
|
1014
|
+
const Range = require_range();
|
|
1015
|
+
const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
1016
|
+
module.exports = toComparators;
|
|
1017
1017
|
}));
|
|
1018
1018
|
|
|
1019
1019
|
//#endregion
|
|
1020
1020
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js
|
|
1021
1021
|
var require_max_satisfying = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1022
|
-
const SemVer
|
|
1023
|
-
const Range
|
|
1024
|
-
const maxSatisfying
|
|
1022
|
+
const SemVer = require_semver$1();
|
|
1023
|
+
const Range = require_range();
|
|
1024
|
+
const maxSatisfying = (versions, range, options) => {
|
|
1025
1025
|
let max = null;
|
|
1026
1026
|
let maxSV = null;
|
|
1027
1027
|
let rangeObj = null;
|
|
1028
1028
|
try {
|
|
1029
|
-
rangeObj = new Range
|
|
1029
|
+
rangeObj = new Range(range, options);
|
|
1030
1030
|
} catch (er) {
|
|
1031
1031
|
return null;
|
|
1032
1032
|
}
|
|
@@ -1034,26 +1034,26 @@ var require_max_satisfying = /* @__PURE__ */ require_constants$1.__commonJSMin((
|
|
|
1034
1034
|
if (rangeObj.test(v)) {
|
|
1035
1035
|
if (!max || maxSV.compare(v) === -1) {
|
|
1036
1036
|
max = v;
|
|
1037
|
-
maxSV = new SemVer
|
|
1037
|
+
maxSV = new SemVer(max, options);
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
1040
|
});
|
|
1041
1041
|
return max;
|
|
1042
1042
|
};
|
|
1043
|
-
module.exports = maxSatisfying
|
|
1043
|
+
module.exports = maxSatisfying;
|
|
1044
1044
|
}));
|
|
1045
1045
|
|
|
1046
1046
|
//#endregion
|
|
1047
1047
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js
|
|
1048
1048
|
var require_min_satisfying = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1049
|
-
const SemVer
|
|
1050
|
-
const Range
|
|
1051
|
-
const minSatisfying
|
|
1049
|
+
const SemVer = require_semver$1();
|
|
1050
|
+
const Range = require_range();
|
|
1051
|
+
const minSatisfying = (versions, range, options) => {
|
|
1052
1052
|
let min = null;
|
|
1053
1053
|
let minSV = null;
|
|
1054
1054
|
let rangeObj = null;
|
|
1055
1055
|
try {
|
|
1056
|
-
rangeObj = new Range
|
|
1056
|
+
rangeObj = new Range(range, options);
|
|
1057
1057
|
} catch (er) {
|
|
1058
1058
|
return null;
|
|
1059
1059
|
}
|
|
@@ -1061,33 +1061,33 @@ var require_min_satisfying = /* @__PURE__ */ require_constants$1.__commonJSMin((
|
|
|
1061
1061
|
if (rangeObj.test(v)) {
|
|
1062
1062
|
if (!min || minSV.compare(v) === 1) {
|
|
1063
1063
|
min = v;
|
|
1064
|
-
minSV = new SemVer
|
|
1064
|
+
minSV = new SemVer(min, options);
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
});
|
|
1068
1068
|
return min;
|
|
1069
1069
|
};
|
|
1070
|
-
module.exports = minSatisfying
|
|
1070
|
+
module.exports = minSatisfying;
|
|
1071
1071
|
}));
|
|
1072
1072
|
|
|
1073
1073
|
//#endregion
|
|
1074
1074
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js
|
|
1075
1075
|
var require_min_version = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1076
|
-
const SemVer
|
|
1077
|
-
const Range
|
|
1078
|
-
const gt
|
|
1079
|
-
const minVersion
|
|
1080
|
-
range = new Range
|
|
1081
|
-
let minver = new SemVer
|
|
1076
|
+
const SemVer = require_semver$1();
|
|
1077
|
+
const Range = require_range();
|
|
1078
|
+
const gt = require_gt();
|
|
1079
|
+
const minVersion = (range, loose) => {
|
|
1080
|
+
range = new Range(range, loose);
|
|
1081
|
+
let minver = new SemVer("0.0.0");
|
|
1082
1082
|
if (range.test(minver)) return minver;
|
|
1083
|
-
minver = new SemVer
|
|
1083
|
+
minver = new SemVer("0.0.0-0");
|
|
1084
1084
|
if (range.test(minver)) return minver;
|
|
1085
1085
|
minver = null;
|
|
1086
1086
|
for (let i = 0; i < range.set.length; ++i) {
|
|
1087
1087
|
const comparators = range.set[i];
|
|
1088
1088
|
let setMin = null;
|
|
1089
1089
|
comparators.forEach((comparator) => {
|
|
1090
|
-
const compver = new SemVer
|
|
1090
|
+
const compver = new SemVer(comparator.semver.version);
|
|
1091
1091
|
switch (comparator.operator) {
|
|
1092
1092
|
case ">":
|
|
1093
1093
|
if (compver.prerelease.length === 0) compver.patch++;
|
|
@@ -1095,75 +1095,75 @@ var require_min_version = /* @__PURE__ */ require_constants$1.__commonJSMin(((ex
|
|
|
1095
1095
|
compver.raw = compver.format();
|
|
1096
1096
|
case "":
|
|
1097
1097
|
case ">=":
|
|
1098
|
-
if (!setMin || gt
|
|
1098
|
+
if (!setMin || gt(compver, setMin)) setMin = compver;
|
|
1099
1099
|
break;
|
|
1100
1100
|
case "<":
|
|
1101
1101
|
case "<=": break;
|
|
1102
1102
|
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
1103
1103
|
}
|
|
1104
1104
|
});
|
|
1105
|
-
if (setMin && (!minver || gt
|
|
1105
|
+
if (setMin && (!minver || gt(minver, setMin))) minver = setMin;
|
|
1106
1106
|
}
|
|
1107
1107
|
if (minver && range.test(minver)) return minver;
|
|
1108
1108
|
return null;
|
|
1109
1109
|
};
|
|
1110
|
-
module.exports = minVersion
|
|
1110
|
+
module.exports = minVersion;
|
|
1111
1111
|
}));
|
|
1112
1112
|
|
|
1113
1113
|
//#endregion
|
|
1114
1114
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js
|
|
1115
1115
|
var require_valid = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1116
|
-
const Range
|
|
1117
|
-
const validRange
|
|
1116
|
+
const Range = require_range();
|
|
1117
|
+
const validRange = (range, options) => {
|
|
1118
1118
|
try {
|
|
1119
|
-
return new Range
|
|
1119
|
+
return new Range(range, options).range || "*";
|
|
1120
1120
|
} catch (er) {
|
|
1121
1121
|
return null;
|
|
1122
1122
|
}
|
|
1123
1123
|
};
|
|
1124
|
-
module.exports = validRange
|
|
1124
|
+
module.exports = validRange;
|
|
1125
1125
|
}));
|
|
1126
1126
|
|
|
1127
1127
|
//#endregion
|
|
1128
1128
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js
|
|
1129
1129
|
var require_outside = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1130
|
-
const SemVer
|
|
1131
|
-
const Comparator
|
|
1132
|
-
const { ANY
|
|
1133
|
-
const Range
|
|
1134
|
-
const satisfies
|
|
1135
|
-
const gt
|
|
1136
|
-
const lt
|
|
1137
|
-
const lte
|
|
1138
|
-
const gte
|
|
1139
|
-
const outside
|
|
1140
|
-
version = new SemVer
|
|
1141
|
-
range = new Range
|
|
1130
|
+
const SemVer = require_semver$1();
|
|
1131
|
+
const Comparator = require_comparator();
|
|
1132
|
+
const { ANY } = Comparator;
|
|
1133
|
+
const Range = require_range();
|
|
1134
|
+
const satisfies = require_satisfies();
|
|
1135
|
+
const gt = require_gt();
|
|
1136
|
+
const lt = require_lt();
|
|
1137
|
+
const lte = require_lte();
|
|
1138
|
+
const gte = require_gte();
|
|
1139
|
+
const outside = (version, range, hilo, options) => {
|
|
1140
|
+
version = new SemVer(version, options);
|
|
1141
|
+
range = new Range(range, options);
|
|
1142
1142
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
1143
1143
|
switch (hilo) {
|
|
1144
1144
|
case ">":
|
|
1145
|
-
gtfn = gt
|
|
1146
|
-
ltefn = lte
|
|
1147
|
-
ltfn = lt
|
|
1145
|
+
gtfn = gt;
|
|
1146
|
+
ltefn = lte;
|
|
1147
|
+
ltfn = lt;
|
|
1148
1148
|
comp = ">";
|
|
1149
1149
|
ecomp = ">=";
|
|
1150
1150
|
break;
|
|
1151
1151
|
case "<":
|
|
1152
|
-
gtfn = lt
|
|
1153
|
-
ltefn = gte
|
|
1154
|
-
ltfn = gt
|
|
1152
|
+
gtfn = lt;
|
|
1153
|
+
ltefn = gte;
|
|
1154
|
+
ltfn = gt;
|
|
1155
1155
|
comp = "<";
|
|
1156
1156
|
ecomp = "<=";
|
|
1157
1157
|
break;
|
|
1158
1158
|
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
1159
1159
|
}
|
|
1160
|
-
if (satisfies
|
|
1160
|
+
if (satisfies(version, range, options)) return false;
|
|
1161
1161
|
for (let i = 0; i < range.set.length; ++i) {
|
|
1162
1162
|
const comparators = range.set[i];
|
|
1163
1163
|
let high = null;
|
|
1164
1164
|
let low = null;
|
|
1165
1165
|
comparators.forEach((comparator) => {
|
|
1166
|
-
if (comparator.semver === ANY
|
|
1166
|
+
if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0");
|
|
1167
1167
|
high = high || comparator;
|
|
1168
1168
|
low = low || comparator;
|
|
1169
1169
|
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
@@ -1175,48 +1175,48 @@ var require_outside = /* @__PURE__ */ require_constants$1.__commonJSMin(((export
|
|
|
1175
1175
|
}
|
|
1176
1176
|
return true;
|
|
1177
1177
|
};
|
|
1178
|
-
module.exports = outside
|
|
1178
|
+
module.exports = outside;
|
|
1179
1179
|
}));
|
|
1180
1180
|
|
|
1181
1181
|
//#endregion
|
|
1182
1182
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js
|
|
1183
1183
|
var require_gtr = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1184
|
-
const outside
|
|
1185
|
-
const gtr
|
|
1186
|
-
module.exports = gtr
|
|
1184
|
+
const outside = require_outside();
|
|
1185
|
+
const gtr = (version, range, options) => outside(version, range, ">", options);
|
|
1186
|
+
module.exports = gtr;
|
|
1187
1187
|
}));
|
|
1188
1188
|
|
|
1189
1189
|
//#endregion
|
|
1190
1190
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js
|
|
1191
1191
|
var require_ltr = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1192
|
-
const outside
|
|
1193
|
-
const ltr
|
|
1194
|
-
module.exports = ltr
|
|
1192
|
+
const outside = require_outside();
|
|
1193
|
+
const ltr = (version, range, options) => outside(version, range, "<", options);
|
|
1194
|
+
module.exports = ltr;
|
|
1195
1195
|
}));
|
|
1196
1196
|
|
|
1197
1197
|
//#endregion
|
|
1198
1198
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js
|
|
1199
1199
|
var require_intersects = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1200
|
-
const Range
|
|
1201
|
-
const intersects
|
|
1202
|
-
r1 = new Range
|
|
1203
|
-
r2 = new Range
|
|
1200
|
+
const Range = require_range();
|
|
1201
|
+
const intersects = (r1, r2, options) => {
|
|
1202
|
+
r1 = new Range(r1, options);
|
|
1203
|
+
r2 = new Range(r2, options);
|
|
1204
1204
|
return r1.intersects(r2, options);
|
|
1205
1205
|
};
|
|
1206
|
-
module.exports = intersects
|
|
1206
|
+
module.exports = intersects;
|
|
1207
1207
|
}));
|
|
1208
1208
|
|
|
1209
1209
|
//#endregion
|
|
1210
1210
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js
|
|
1211
1211
|
var require_simplify = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1212
|
-
const satisfies
|
|
1213
|
-
const compare
|
|
1212
|
+
const satisfies = require_satisfies();
|
|
1213
|
+
const compare = require_compare();
|
|
1214
1214
|
module.exports = (versions, range, options) => {
|
|
1215
1215
|
const set = [];
|
|
1216
1216
|
let first = null;
|
|
1217
1217
|
let prev = null;
|
|
1218
|
-
const v = versions.sort((a, b) => compare
|
|
1219
|
-
for (const version of v) if (satisfies
|
|
1218
|
+
const v = versions.sort((a, b) => compare(a, b, options));
|
|
1219
|
+
for (const version of v) if (satisfies(version, range, options)) {
|
|
1220
1220
|
prev = version;
|
|
1221
1221
|
if (!first) first = version;
|
|
1222
1222
|
} else {
|
|
@@ -1240,15 +1240,15 @@ var require_simplify = /* @__PURE__ */ require_constants$1.__commonJSMin(((expor
|
|
|
1240
1240
|
//#endregion
|
|
1241
1241
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js
|
|
1242
1242
|
var require_subset = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1243
|
-
const Range
|
|
1244
|
-
const Comparator
|
|
1245
|
-
const { ANY } = Comparator
|
|
1246
|
-
const satisfies
|
|
1247
|
-
const compare
|
|
1248
|
-
const subset
|
|
1243
|
+
const Range = require_range();
|
|
1244
|
+
const Comparator = require_comparator();
|
|
1245
|
+
const { ANY } = Comparator;
|
|
1246
|
+
const satisfies = require_satisfies();
|
|
1247
|
+
const compare = require_compare();
|
|
1248
|
+
const subset = (sub, dom, options = {}) => {
|
|
1249
1249
|
if (sub === dom) return true;
|
|
1250
|
-
sub = new Range
|
|
1251
|
-
dom = new Range
|
|
1250
|
+
sub = new Range(sub, options);
|
|
1251
|
+
dom = new Range(dom, options);
|
|
1252
1252
|
let sawNonNull = false;
|
|
1253
1253
|
OUTER: for (const simpleSub of sub.set) {
|
|
1254
1254
|
for (const simpleDom of dom.set) {
|
|
@@ -1260,8 +1260,8 @@ var require_subset = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports
|
|
|
1260
1260
|
}
|
|
1261
1261
|
return true;
|
|
1262
1262
|
};
|
|
1263
|
-
const minimumVersionWithPreRelease = [new Comparator
|
|
1264
|
-
const minimumVersion = [new Comparator
|
|
1263
|
+
const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
1264
|
+
const minimumVersion = [new Comparator(">=0.0.0")];
|
|
1265
1265
|
const simpleSubset = (sub, dom, options) => {
|
|
1266
1266
|
if (sub === dom) return true;
|
|
1267
1267
|
if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
|
|
@@ -1270,67 +1270,67 @@ var require_subset = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports
|
|
|
1270
1270
|
if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
|
|
1271
1271
|
else dom = minimumVersion;
|
|
1272
1272
|
const eqSet = /* @__PURE__ */ new Set();
|
|
1273
|
-
let gt
|
|
1274
|
-
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt
|
|
1275
|
-
else if (c.operator === "<" || c.operator === "<=") lt
|
|
1273
|
+
let gt, lt;
|
|
1274
|
+
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
|
|
1275
|
+
else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options);
|
|
1276
1276
|
else eqSet.add(c.semver);
|
|
1277
1277
|
if (eqSet.size > 1) return null;
|
|
1278
1278
|
let gtltComp;
|
|
1279
|
-
if (gt
|
|
1280
|
-
gtltComp = compare
|
|
1279
|
+
if (gt && lt) {
|
|
1280
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
1281
1281
|
if (gtltComp > 0) return null;
|
|
1282
|
-
else if (gtltComp === 0 && (gt
|
|
1282
|
+
else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null;
|
|
1283
1283
|
}
|
|
1284
|
-
for (const eq
|
|
1285
|
-
if (gt
|
|
1286
|
-
if (lt
|
|
1287
|
-
for (const c of dom) if (!satisfies
|
|
1284
|
+
for (const eq of eqSet) {
|
|
1285
|
+
if (gt && !satisfies(eq, String(gt), options)) return null;
|
|
1286
|
+
if (lt && !satisfies(eq, String(lt), options)) return null;
|
|
1287
|
+
for (const c of dom) if (!satisfies(eq, String(c), options)) return false;
|
|
1288
1288
|
return true;
|
|
1289
1289
|
}
|
|
1290
1290
|
let higher, lower;
|
|
1291
1291
|
let hasDomLT, hasDomGT;
|
|
1292
|
-
let needDomLTPre = lt
|
|
1293
|
-
let needDomGTPre = gt
|
|
1294
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt
|
|
1292
|
+
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
1293
|
+
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
1294
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
1295
1295
|
for (const c of dom) {
|
|
1296
1296
|
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
1297
1297
|
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
1298
|
-
if (gt
|
|
1298
|
+
if (gt) {
|
|
1299
1299
|
if (needDomGTPre) {
|
|
1300
1300
|
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) needDomGTPre = false;
|
|
1301
1301
|
}
|
|
1302
1302
|
if (c.operator === ">" || c.operator === ">=") {
|
|
1303
|
-
higher = higherGT(gt
|
|
1304
|
-
if (higher === c && higher !== gt
|
|
1305
|
-
} else if (gt
|
|
1303
|
+
higher = higherGT(gt, c, options);
|
|
1304
|
+
if (higher === c && higher !== gt) return false;
|
|
1305
|
+
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) return false;
|
|
1306
1306
|
}
|
|
1307
|
-
if (lt
|
|
1307
|
+
if (lt) {
|
|
1308
1308
|
if (needDomLTPre) {
|
|
1309
1309
|
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) needDomLTPre = false;
|
|
1310
1310
|
}
|
|
1311
1311
|
if (c.operator === "<" || c.operator === "<=") {
|
|
1312
|
-
lower = lowerLT(lt
|
|
1313
|
-
if (lower === c && lower !== lt
|
|
1314
|
-
} else if (lt
|
|
1312
|
+
lower = lowerLT(lt, c, options);
|
|
1313
|
+
if (lower === c && lower !== lt) return false;
|
|
1314
|
+
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) return false;
|
|
1315
1315
|
}
|
|
1316
|
-
if (!c.operator && (lt
|
|
1316
|
+
if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
|
|
1317
1317
|
}
|
|
1318
|
-
if (gt
|
|
1319
|
-
if (lt
|
|
1318
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
|
|
1319
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
|
|
1320
1320
|
if (needDomGTPre || needDomLTPre) return false;
|
|
1321
1321
|
return true;
|
|
1322
1322
|
};
|
|
1323
1323
|
const higherGT = (a, b, options) => {
|
|
1324
1324
|
if (!a) return b;
|
|
1325
|
-
const comp = compare
|
|
1325
|
+
const comp = compare(a.semver, b.semver, options);
|
|
1326
1326
|
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
1327
1327
|
};
|
|
1328
1328
|
const lowerLT = (a, b, options) => {
|
|
1329
1329
|
if (!a) return b;
|
|
1330
|
-
const comp = compare
|
|
1330
|
+
const comp = compare(a.semver, b.semver, options);
|
|
1331
1331
|
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
1332
1332
|
};
|
|
1333
|
-
module.exports = subset
|
|
1333
|
+
module.exports = subset;
|
|
1334
1334
|
}));
|
|
1335
1335
|
|
|
1336
1336
|
//#endregion
|
|
@@ -1438,13 +1438,11 @@ const getJsonFromPath = (baseDir, fileName) => {
|
|
|
1438
1438
|
throw new Error(`Error reading ${jsonPath}`);
|
|
1439
1439
|
}
|
|
1440
1440
|
};
|
|
1441
|
-
function getCodemodConfig(codemodPath
|
|
1442
|
-
const { throwOnError = false } = options;
|
|
1441
|
+
function getCodemodConfig(codemodPath) {
|
|
1443
1442
|
try {
|
|
1444
1443
|
return getJsonFromPath((0, node_path.dirname)(codemodPath), "config.json");
|
|
1445
|
-
} catch
|
|
1446
|
-
|
|
1447
|
-
return null;
|
|
1444
|
+
} catch {
|
|
1445
|
+
throw new Error(`Error reading codemod config for ${codemodPath}`);
|
|
1448
1446
|
}
|
|
1449
1447
|
}
|
|
1450
1448
|
|
|
@@ -1580,7 +1578,7 @@ function findClosestPackageJson(currentPath) {
|
|
|
1580
1578
|
*/
|
|
1581
1579
|
const assessPrerequisites = (packagePath, codemodPath) => {
|
|
1582
1580
|
try {
|
|
1583
|
-
const codemodConfig =
|
|
1581
|
+
const codemodConfig = getCodemodConfig(codemodPath);
|
|
1584
1582
|
const resolvedPackagePath = (0, node_path.resolve)(process.cwd(), packagePath);
|
|
1585
1583
|
const actualPackagePath = (0, node_fs.existsSync)((0, node_path.join)(resolvedPackagePath, "package.json")) ? resolvedPackagePath : findClosestPackageJson(resolvedPackagePath);
|
|
1586
1584
|
if (!actualPackagePath) {
|
|
@@ -1651,9 +1649,12 @@ const assessPrerequisitesBatch = (targetPaths, codemodPath, spinnies) => {
|
|
|
1651
1649
|
if (failedTargetsNoPackage.length || !passedCount) if (!passedCount) spinnies.fail("prerequisite-check", { text: "All targets failed prerequisite checks" });
|
|
1652
1650
|
else {
|
|
1653
1651
|
spinnies.fail("prerequisite-check", { text: `No package.json found for ${failedTargetsNoPackage.length} target${failedTargetsNoPackage.length !== 1 ? "s" : ""} (searching upwards to project root).` });
|
|
1654
|
-
failedTargetsNoPackage.forEach((t
|
|
1652
|
+
failedTargetsNoPackage.forEach((t) => console.error(`- ${t}`));
|
|
1653
|
+
}
|
|
1654
|
+
else {
|
|
1655
|
+
const failedPart = failedCount > 0 ? `, \x1b[31m${failedCount} failed\x1b[0m` : "";
|
|
1656
|
+
spinnies.succeed("prerequisite-check", { text: `\x1b[0mChecked ${totalTargets} target${totalTargets !== 1 ? "s" : ""} across ${uniquePackages} package${uniquePackages !== 1 ? "s" : ""}:\x1b[0m \x1b[32m${passedCount} passed\x1b[0m${failedPart}` });
|
|
1655
1657
|
}
|
|
1656
|
-
else spinnies.succeed("prerequisite-check", { text: `\x1b[0mChecked ${totalTargets} target${totalTargets !== 1 ? "s" : ""} across ${uniquePackages} package${uniquePackages !== 1 ? "s" : ""}:\x1b[0m \x1b[32m${passedCount} passed\x1b[0m, \x1b[31m${failedCount} failed\x1b[0m.` });
|
|
1657
1658
|
const failedPackageRoots = Array.from(results.entries()).filter(([, ok]) => !ok).map(([root]) => root);
|
|
1658
1659
|
return {
|
|
1659
1660
|
allPassed,
|
|
@@ -1726,11 +1727,11 @@ const queryPackages = async (packages) => {
|
|
|
1726
1727
|
const message = "Path to run codemod on:";
|
|
1727
1728
|
const nonRootPackages = packages.filter((pkg) => pkg !== "." && pkg !== "./");
|
|
1728
1729
|
if (packages.length === 1 && (packages[0] === "." || packages[0] === "./")) {
|
|
1729
|
-
if (await (0,
|
|
1730
|
+
if (await (0, _inquirer_prompts.confirm)({
|
|
1730
1731
|
message: "Do you want to target a specific folder instead of the entire project?",
|
|
1731
1732
|
default: false
|
|
1732
1733
|
})) {
|
|
1733
|
-
const customPath = await (0,
|
|
1734
|
+
const customPath = await (0, _inquirer_prompts.search)({
|
|
1734
1735
|
message: "Enter the folder path (relative to project root):",
|
|
1735
1736
|
source: async (searchInput) => {
|
|
1736
1737
|
return getDirectoryChoices(process.cwd(), searchInput || "").map((choice) => ({
|
|
@@ -1753,7 +1754,7 @@ const queryPackages = async (packages) => {
|
|
|
1753
1754
|
logToInquirer(message, packages[0] === "./" ? "." : packages[0]);
|
|
1754
1755
|
return [packages[0] === "./" ? "." : packages[0]];
|
|
1755
1756
|
}
|
|
1756
|
-
if (nonRootPackages.length >= 1) return (0,
|
|
1757
|
+
if (nonRootPackages.length >= 1) return (0, _inquirer_prompts.checkbox)({
|
|
1757
1758
|
required: true,
|
|
1758
1759
|
message: "Select packages to transform:",
|
|
1759
1760
|
choices: nonRootPackages.map((file) => ({
|
|
@@ -1773,7 +1774,7 @@ const determineTransformer = async ({ candidate, transformFiles }) => {
|
|
|
1773
1774
|
logToInquirer(codemodMessage, candidate);
|
|
1774
1775
|
return candidate;
|
|
1775
1776
|
}
|
|
1776
|
-
return (0,
|
|
1777
|
+
return (0, _inquirer_prompts.select)({
|
|
1777
1778
|
message: codemodMessage,
|
|
1778
1779
|
choices: transformFiles.map((file) => ({
|
|
1779
1780
|
name: file,
|
|
@@ -1805,7 +1806,7 @@ const determineIsDryMode = async (args) => {
|
|
|
1805
1806
|
logToInquirer(message, "Yes");
|
|
1806
1807
|
return true;
|
|
1807
1808
|
}
|
|
1808
|
-
return (0,
|
|
1809
|
+
return (0, _inquirer_prompts.confirm)({
|
|
1809
1810
|
message,
|
|
1810
1811
|
default: false
|
|
1811
1812
|
});
|
|
@@ -1819,7 +1820,7 @@ const determineIsPrint = async (args) => {
|
|
|
1819
1820
|
logToInquirer(message, "Yes");
|
|
1820
1821
|
return true;
|
|
1821
1822
|
}
|
|
1822
|
-
return (0,
|
|
1823
|
+
return (0, _inquirer_prompts.confirm)({
|
|
1823
1824
|
message,
|
|
1824
1825
|
default: false
|
|
1825
1826
|
});
|
|
@@ -1837,7 +1838,7 @@ const determineIgnorePatterns = async (args) => {
|
|
|
1837
1838
|
if (ignorePattern) {
|
|
1838
1839
|
logToInquirer(message, ignorePattern);
|
|
1839
1840
|
userPatterns = ignorePattern;
|
|
1840
|
-
} else userPatterns = await (0,
|
|
1841
|
+
} else userPatterns = await (0, _inquirer_prompts.input)({
|
|
1841
1842
|
message,
|
|
1842
1843
|
validate: () => true
|
|
1843
1844
|
});
|
|
@@ -1858,7 +1859,7 @@ const determineGitIgnore = async (args) => {
|
|
|
1858
1859
|
logToInquirer(message, "No");
|
|
1859
1860
|
return false;
|
|
1860
1861
|
}
|
|
1861
|
-
return (0,
|
|
1862
|
+
return (0, _inquirer_prompts.confirm)({
|
|
1862
1863
|
message,
|
|
1863
1864
|
default: true
|
|
1864
1865
|
});
|
|
@@ -1932,7 +1933,7 @@ var reportManualReview_default = reportManualReview;
|
|
|
1932
1933
|
//#region src/controller/helpers/runTransformPrompts.ts
|
|
1933
1934
|
async function askPrompt(p) {
|
|
1934
1935
|
switch (p.type) {
|
|
1935
|
-
case "select": return (0,
|
|
1936
|
+
case "select": return (0, _inquirer_prompts.select)({
|
|
1936
1937
|
message: p.message,
|
|
1937
1938
|
choices: (p.choices ?? []).map((c) => ({
|
|
1938
1939
|
name: c.name,
|
|
@@ -1940,12 +1941,12 @@ async function askPrompt(p) {
|
|
|
1940
1941
|
})),
|
|
1941
1942
|
default: p.default
|
|
1942
1943
|
});
|
|
1943
|
-
case "confirm": return (0,
|
|
1944
|
+
case "confirm": return (0, _inquirer_prompts.confirm)({
|
|
1944
1945
|
message: p.message,
|
|
1945
1946
|
default: typeof p.default === "boolean" ? p.default : false
|
|
1946
1947
|
});
|
|
1947
1948
|
case "input":
|
|
1948
|
-
default: return (0,
|
|
1949
|
+
default: return (0, _inquirer_prompts.input)({
|
|
1949
1950
|
message: p.message,
|
|
1950
1951
|
default: p.default ?? ""
|
|
1951
1952
|
});
|
|
@@ -2000,6 +2001,12 @@ Object.defineProperty(exports, 'findProjectRoot', {
|
|
|
2000
2001
|
return findProjectRoot;
|
|
2001
2002
|
}
|
|
2002
2003
|
});
|
|
2004
|
+
Object.defineProperty(exports, 'getCodemodConfig', {
|
|
2005
|
+
enumerable: true,
|
|
2006
|
+
get: function () {
|
|
2007
|
+
return getCodemodConfig;
|
|
2008
|
+
}
|
|
2009
|
+
});
|
|
2003
2010
|
Object.defineProperty(exports, 'getOptions_default', {
|
|
2004
2011
|
enumerable: true,
|
|
2005
2012
|
get: function () {
|
|
@@ -2036,4 +2043,4 @@ Object.defineProperty(exports, 'validateClaudeConfig', {
|
|
|
2036
2043
|
return validateClaudeConfig;
|
|
2037
2044
|
}
|
|
2038
2045
|
});
|
|
2039
|
-
//# sourceMappingURL=helpers-
|
|
2046
|
+
//# sourceMappingURL=helpers-Du-iz0Iu.js.map
|