@wise/wds-codemods 0.0.1-experimental-4e597ee → 0.0.1-experimental-db88b03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1623 -66
- package/dist/index.js.map +1 -1
- package/dist/{reportManualReview-cd73vDXT.js → reportManualReview-CQm-npxR.js} +4 -3
- package/dist/{reportManualReview-cd73vDXT.js.map → reportManualReview-CQm-npxR.js.map} +1 -1
- package/dist/transforms/button/config.json +6 -0
- package/dist/transforms/{button.js → button/transformer.js} +15 -12
- package/dist/transforms/button/transformer.js.map +1 -0
- package/package.json +6 -6
- package/dist/transforms/button.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const require_reportManualReview = require('./reportManualReview-
|
|
2
|
+
const require_reportManualReview = require('./reportManualReview-CQm-npxR.js');
|
|
3
3
|
const node_child_process = require_reportManualReview.__toESM(require("node:child_process"));
|
|
4
4
|
const node_fs_promises = require_reportManualReview.__toESM(require("node:fs/promises"));
|
|
5
5
|
const node_path = require_reportManualReview.__toESM(require("node:path"));
|
|
@@ -8,6 +8,1557 @@ const node_fs = require_reportManualReview.__toESM(require("node:fs"));
|
|
|
8
8
|
const __inquirer_prompts = require_reportManualReview.__toESM(require("@inquirer/prompts"));
|
|
9
9
|
require("jscodeshift/src/testUtils");
|
|
10
10
|
|
|
11
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
|
|
12
|
+
var require_constants$1 = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js": ((exports, module) => {
|
|
13
|
+
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
14
|
+
const MAX_LENGTH$2 = 256;
|
|
15
|
+
const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
16
|
+
const MAX_SAFE_COMPONENT_LENGTH$1 = 16;
|
|
17
|
+
const MAX_SAFE_BUILD_LENGTH$1 = MAX_LENGTH$2 - 6;
|
|
18
|
+
const RELEASE_TYPES = [
|
|
19
|
+
"major",
|
|
20
|
+
"premajor",
|
|
21
|
+
"minor",
|
|
22
|
+
"preminor",
|
|
23
|
+
"patch",
|
|
24
|
+
"prepatch",
|
|
25
|
+
"prerelease"
|
|
26
|
+
];
|
|
27
|
+
module.exports = {
|
|
28
|
+
MAX_LENGTH: MAX_LENGTH$2,
|
|
29
|
+
MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH$1,
|
|
30
|
+
MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH$1,
|
|
31
|
+
MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,
|
|
32
|
+
RELEASE_TYPES,
|
|
33
|
+
SEMVER_SPEC_VERSION,
|
|
34
|
+
FLAG_INCLUDE_PRERELEASE: 1,
|
|
35
|
+
FLAG_LOOSE: 2
|
|
36
|
+
};
|
|
37
|
+
}) });
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js
|
|
41
|
+
var require_debug = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js": ((exports, module) => {
|
|
42
|
+
const debug$4 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
43
|
+
module.exports = debug$4;
|
|
44
|
+
}) });
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js
|
|
48
|
+
var require_re = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js": ((exports, module) => {
|
|
49
|
+
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH: MAX_LENGTH$1 } = require_constants$1();
|
|
50
|
+
const debug$3 = require_debug();
|
|
51
|
+
exports = module.exports = {};
|
|
52
|
+
const re$4 = exports.re = [];
|
|
53
|
+
const safeRe = exports.safeRe = [];
|
|
54
|
+
const src = exports.src = [];
|
|
55
|
+
const safeSrc = exports.safeSrc = [];
|
|
56
|
+
const t$5 = exports.t = {};
|
|
57
|
+
let R = 0;
|
|
58
|
+
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
59
|
+
const safeRegexReplacements = [
|
|
60
|
+
["\\s", 1],
|
|
61
|
+
["\\d", MAX_LENGTH$1],
|
|
62
|
+
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
63
|
+
];
|
|
64
|
+
const makeSafeRegex = (value) => {
|
|
65
|
+
for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
66
|
+
return value;
|
|
67
|
+
};
|
|
68
|
+
const createToken = (name, value, isGlobal) => {
|
|
69
|
+
const safe = makeSafeRegex(value);
|
|
70
|
+
const index = R++;
|
|
71
|
+
debug$3(name, index, value);
|
|
72
|
+
t$5[name] = index;
|
|
73
|
+
src[index] = value;
|
|
74
|
+
safeSrc[index] = safe;
|
|
75
|
+
re$4[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
76
|
+
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
77
|
+
};
|
|
78
|
+
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
79
|
+
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
80
|
+
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
81
|
+
createToken("MAINVERSION", `(${src[t$5.NUMERICIDENTIFIER]})\\.(${src[t$5.NUMERICIDENTIFIER]})\\.(${src[t$5.NUMERICIDENTIFIER]})`);
|
|
82
|
+
createToken("MAINVERSIONLOOSE", `(${src[t$5.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$5.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$5.NUMERICIDENTIFIERLOOSE]})`);
|
|
83
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t$5.NONNUMERICIDENTIFIER]}|${src[t$5.NUMERICIDENTIFIER]})`);
|
|
84
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t$5.NONNUMERICIDENTIFIER]}|${src[t$5.NUMERICIDENTIFIERLOOSE]})`);
|
|
85
|
+
createToken("PRERELEASE", `(?:-(${src[t$5.PRERELEASEIDENTIFIER]}(?:\\.${src[t$5.PRERELEASEIDENTIFIER]})*))`);
|
|
86
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t$5.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t$5.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
87
|
+
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
88
|
+
createToken("BUILD", `(?:\\+(${src[t$5.BUILDIDENTIFIER]}(?:\\.${src[t$5.BUILDIDENTIFIER]})*))`);
|
|
89
|
+
createToken("FULLPLAIN", `v?${src[t$5.MAINVERSION]}${src[t$5.PRERELEASE]}?${src[t$5.BUILD]}?`);
|
|
90
|
+
createToken("FULL", `^${src[t$5.FULLPLAIN]}$`);
|
|
91
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t$5.MAINVERSIONLOOSE]}${src[t$5.PRERELEASELOOSE]}?${src[t$5.BUILD]}?`);
|
|
92
|
+
createToken("LOOSE", `^${src[t$5.LOOSEPLAIN]}$`);
|
|
93
|
+
createToken("GTLT", "((?:<|>)?=?)");
|
|
94
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t$5.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
95
|
+
createToken("XRANGEIDENTIFIER", `${src[t$5.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
96
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t$5.XRANGEIDENTIFIER]})(?:\\.(${src[t$5.XRANGEIDENTIFIER]})(?:\\.(${src[t$5.XRANGEIDENTIFIER]})(?:${src[t$5.PRERELEASE]})?${src[t$5.BUILD]}?)?)?`);
|
|
97
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t$5.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$5.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$5.XRANGEIDENTIFIERLOOSE]})(?:${src[t$5.PRERELEASELOOSE]})?${src[t$5.BUILD]}?)?)?`);
|
|
98
|
+
createToken("XRANGE", `^${src[t$5.GTLT]}\\s*${src[t$5.XRANGEPLAIN]}$`);
|
|
99
|
+
createToken("XRANGELOOSE", `^${src[t$5.GTLT]}\\s*${src[t$5.XRANGEPLAINLOOSE]}$`);
|
|
100
|
+
createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
101
|
+
createToken("COERCE", `${src[t$5.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
102
|
+
createToken("COERCEFULL", src[t$5.COERCEPLAIN] + `(?:${src[t$5.PRERELEASE]})?(?:${src[t$5.BUILD]})?(?:$|[^\\d])`);
|
|
103
|
+
createToken("COERCERTL", src[t$5.COERCE], true);
|
|
104
|
+
createToken("COERCERTLFULL", src[t$5.COERCEFULL], true);
|
|
105
|
+
createToken("LONETILDE", "(?:~>?)");
|
|
106
|
+
createToken("TILDETRIM", `(\\s*)${src[t$5.LONETILDE]}\\s+`, true);
|
|
107
|
+
exports.tildeTrimReplace = "$1~";
|
|
108
|
+
createToken("TILDE", `^${src[t$5.LONETILDE]}${src[t$5.XRANGEPLAIN]}$`);
|
|
109
|
+
createToken("TILDELOOSE", `^${src[t$5.LONETILDE]}${src[t$5.XRANGEPLAINLOOSE]}$`);
|
|
110
|
+
createToken("LONECARET", "(?:\\^)");
|
|
111
|
+
createToken("CARETTRIM", `(\\s*)${src[t$5.LONECARET]}\\s+`, true);
|
|
112
|
+
exports.caretTrimReplace = "$1^";
|
|
113
|
+
createToken("CARET", `^${src[t$5.LONECARET]}${src[t$5.XRANGEPLAIN]}$`);
|
|
114
|
+
createToken("CARETLOOSE", `^${src[t$5.LONECARET]}${src[t$5.XRANGEPLAINLOOSE]}$`);
|
|
115
|
+
createToken("COMPARATORLOOSE", `^${src[t$5.GTLT]}\\s*(${src[t$5.LOOSEPLAIN]})$|^$`);
|
|
116
|
+
createToken("COMPARATOR", `^${src[t$5.GTLT]}\\s*(${src[t$5.FULLPLAIN]})$|^$`);
|
|
117
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t$5.GTLT]}\\s*(${src[t$5.LOOSEPLAIN]}|${src[t$5.XRANGEPLAIN]})`, true);
|
|
118
|
+
exports.comparatorTrimReplace = "$1$2$3";
|
|
119
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t$5.XRANGEPLAIN]})\\s+-\\s+(${src[t$5.XRANGEPLAIN]})\\s*$`);
|
|
120
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t$5.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t$5.XRANGEPLAINLOOSE]})\\s*$`);
|
|
121
|
+
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
122
|
+
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
123
|
+
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
124
|
+
}) });
|
|
125
|
+
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js
|
|
128
|
+
var require_parse_options = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js": ((exports, module) => {
|
|
129
|
+
const looseOption = Object.freeze({ loose: true });
|
|
130
|
+
const emptyOpts = Object.freeze({});
|
|
131
|
+
const parseOptions$3 = (options) => {
|
|
132
|
+
if (!options) return emptyOpts;
|
|
133
|
+
if (typeof options !== "object") return looseOption;
|
|
134
|
+
return options;
|
|
135
|
+
};
|
|
136
|
+
module.exports = parseOptions$3;
|
|
137
|
+
}) });
|
|
138
|
+
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js
|
|
141
|
+
var require_identifiers = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js": ((exports, module) => {
|
|
142
|
+
const numeric = /^[0-9]+$/;
|
|
143
|
+
const compareIdentifiers$1 = (a, b$1) => {
|
|
144
|
+
const anum = numeric.test(a);
|
|
145
|
+
const bnum = numeric.test(b$1);
|
|
146
|
+
if (anum && bnum) {
|
|
147
|
+
a = +a;
|
|
148
|
+
b$1 = +b$1;
|
|
149
|
+
}
|
|
150
|
+
return a === b$1 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b$1 ? -1 : 1;
|
|
151
|
+
};
|
|
152
|
+
const rcompareIdentifiers = (a, b$1) => compareIdentifiers$1(b$1, a);
|
|
153
|
+
module.exports = {
|
|
154
|
+
compareIdentifiers: compareIdentifiers$1,
|
|
155
|
+
rcompareIdentifiers
|
|
156
|
+
};
|
|
157
|
+
}) });
|
|
158
|
+
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js
|
|
161
|
+
var require_semver$1 = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js": ((exports, module) => {
|
|
162
|
+
const debug$2 = require_debug();
|
|
163
|
+
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants$1();
|
|
164
|
+
const { safeRe: re$3, t: t$4 } = require_re();
|
|
165
|
+
const parseOptions$2 = require_parse_options();
|
|
166
|
+
const { compareIdentifiers } = require_identifiers();
|
|
167
|
+
var SemVer$15 = class SemVer$15 {
|
|
168
|
+
constructor(version$1, options) {
|
|
169
|
+
options = parseOptions$2(options);
|
|
170
|
+
if (version$1 instanceof SemVer$15) if (version$1.loose === !!options.loose && version$1.includePrerelease === !!options.includePrerelease) return version$1;
|
|
171
|
+
else version$1 = version$1.version;
|
|
172
|
+
else if (typeof version$1 !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version$1}".`);
|
|
173
|
+
if (version$1.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
174
|
+
debug$2("SemVer", version$1, options);
|
|
175
|
+
this.options = options;
|
|
176
|
+
this.loose = !!options.loose;
|
|
177
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
178
|
+
const m$1 = version$1.trim().match(options.loose ? re$3[t$4.LOOSE] : re$3[t$4.FULL]);
|
|
179
|
+
if (!m$1) throw new TypeError(`Invalid Version: ${version$1}`);
|
|
180
|
+
this.raw = version$1;
|
|
181
|
+
this.major = +m$1[1];
|
|
182
|
+
this.minor = +m$1[2];
|
|
183
|
+
this.patch = +m$1[3];
|
|
184
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
|
|
185
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
|
|
186
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
|
|
187
|
+
if (!m$1[4]) this.prerelease = [];
|
|
188
|
+
else this.prerelease = m$1[4].split(".").map((id) => {
|
|
189
|
+
if (/^[0-9]+$/.test(id)) {
|
|
190
|
+
const num = +id;
|
|
191
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
|
|
192
|
+
}
|
|
193
|
+
return id;
|
|
194
|
+
});
|
|
195
|
+
this.build = m$1[5] ? m$1[5].split(".") : [];
|
|
196
|
+
this.format();
|
|
197
|
+
}
|
|
198
|
+
format() {
|
|
199
|
+
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
200
|
+
if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`;
|
|
201
|
+
return this.version;
|
|
202
|
+
}
|
|
203
|
+
toString() {
|
|
204
|
+
return this.version;
|
|
205
|
+
}
|
|
206
|
+
compare(other) {
|
|
207
|
+
debug$2("SemVer.compare", this.version, this.options, other);
|
|
208
|
+
if (!(other instanceof SemVer$15)) {
|
|
209
|
+
if (typeof other === "string" && other === this.version) return 0;
|
|
210
|
+
other = new SemVer$15(other, this.options);
|
|
211
|
+
}
|
|
212
|
+
if (other.version === this.version) return 0;
|
|
213
|
+
return this.compareMain(other) || this.comparePre(other);
|
|
214
|
+
}
|
|
215
|
+
compareMain(other) {
|
|
216
|
+
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
217
|
+
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
218
|
+
}
|
|
219
|
+
comparePre(other) {
|
|
220
|
+
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
221
|
+
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
222
|
+
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
223
|
+
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
224
|
+
let i = 0;
|
|
225
|
+
do {
|
|
226
|
+
const a = this.prerelease[i];
|
|
227
|
+
const b$1 = other.prerelease[i];
|
|
228
|
+
debug$2("prerelease compare", i, a, b$1);
|
|
229
|
+
if (a === void 0 && b$1 === void 0) return 0;
|
|
230
|
+
else if (b$1 === void 0) return 1;
|
|
231
|
+
else if (a === void 0) return -1;
|
|
232
|
+
else if (a === b$1) continue;
|
|
233
|
+
else return compareIdentifiers(a, b$1);
|
|
234
|
+
} while (++i);
|
|
235
|
+
}
|
|
236
|
+
compareBuild(other) {
|
|
237
|
+
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
238
|
+
let i = 0;
|
|
239
|
+
do {
|
|
240
|
+
const a = this.build[i];
|
|
241
|
+
const b$1 = other.build[i];
|
|
242
|
+
debug$2("build compare", i, a, b$1);
|
|
243
|
+
if (a === void 0 && b$1 === void 0) return 0;
|
|
244
|
+
else if (b$1 === void 0) return 1;
|
|
245
|
+
else if (a === void 0) return -1;
|
|
246
|
+
else if (a === b$1) continue;
|
|
247
|
+
else return compareIdentifiers(a, b$1);
|
|
248
|
+
} while (++i);
|
|
249
|
+
}
|
|
250
|
+
inc(release, identifier, identifierBase) {
|
|
251
|
+
if (release.startsWith("pre")) {
|
|
252
|
+
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
253
|
+
if (identifier) {
|
|
254
|
+
const match = `-${identifier}`.match(this.options.loose ? re$3[t$4.PRERELEASELOOSE] : re$3[t$4.PRERELEASE]);
|
|
255
|
+
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
switch (release) {
|
|
259
|
+
case "premajor":
|
|
260
|
+
this.prerelease.length = 0;
|
|
261
|
+
this.patch = 0;
|
|
262
|
+
this.minor = 0;
|
|
263
|
+
this.major++;
|
|
264
|
+
this.inc("pre", identifier, identifierBase);
|
|
265
|
+
break;
|
|
266
|
+
case "preminor":
|
|
267
|
+
this.prerelease.length = 0;
|
|
268
|
+
this.patch = 0;
|
|
269
|
+
this.minor++;
|
|
270
|
+
this.inc("pre", identifier, identifierBase);
|
|
271
|
+
break;
|
|
272
|
+
case "prepatch":
|
|
273
|
+
this.prerelease.length = 0;
|
|
274
|
+
this.inc("patch", identifier, identifierBase);
|
|
275
|
+
this.inc("pre", identifier, identifierBase);
|
|
276
|
+
break;
|
|
277
|
+
case "prerelease":
|
|
278
|
+
if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase);
|
|
279
|
+
this.inc("pre", identifier, identifierBase);
|
|
280
|
+
break;
|
|
281
|
+
case "release":
|
|
282
|
+
if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);
|
|
283
|
+
this.prerelease.length = 0;
|
|
284
|
+
break;
|
|
285
|
+
case "major":
|
|
286
|
+
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
|
|
287
|
+
this.minor = 0;
|
|
288
|
+
this.patch = 0;
|
|
289
|
+
this.prerelease = [];
|
|
290
|
+
break;
|
|
291
|
+
case "minor":
|
|
292
|
+
if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
|
|
293
|
+
this.patch = 0;
|
|
294
|
+
this.prerelease = [];
|
|
295
|
+
break;
|
|
296
|
+
case "patch":
|
|
297
|
+
if (this.prerelease.length === 0) this.patch++;
|
|
298
|
+
this.prerelease = [];
|
|
299
|
+
break;
|
|
300
|
+
case "pre": {
|
|
301
|
+
const base = Number(identifierBase) ? 1 : 0;
|
|
302
|
+
if (this.prerelease.length === 0) this.prerelease = [base];
|
|
303
|
+
else {
|
|
304
|
+
let i = this.prerelease.length;
|
|
305
|
+
while (--i >= 0) if (typeof this.prerelease[i] === "number") {
|
|
306
|
+
this.prerelease[i]++;
|
|
307
|
+
i = -2;
|
|
308
|
+
}
|
|
309
|
+
if (i === -1) {
|
|
310
|
+
if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists");
|
|
311
|
+
this.prerelease.push(base);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (identifier) {
|
|
315
|
+
let prerelease$2 = [identifier, base];
|
|
316
|
+
if (identifierBase === false) prerelease$2 = [identifier];
|
|
317
|
+
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
318
|
+
if (isNaN(this.prerelease[1])) this.prerelease = prerelease$2;
|
|
319
|
+
} else this.prerelease = prerelease$2;
|
|
320
|
+
}
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
default: throw new Error(`invalid increment argument: ${release}`);
|
|
324
|
+
}
|
|
325
|
+
this.raw = this.format();
|
|
326
|
+
if (this.build.length) this.raw += `+${this.build.join(".")}`;
|
|
327
|
+
return this;
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
module.exports = SemVer$15;
|
|
331
|
+
}) });
|
|
332
|
+
|
|
333
|
+
//#endregion
|
|
334
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js
|
|
335
|
+
var require_parse = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js": ((exports, module) => {
|
|
336
|
+
const SemVer$14 = require_semver$1();
|
|
337
|
+
const parse$6 = (version$1, options, throwErrors = false) => {
|
|
338
|
+
if (version$1 instanceof SemVer$14) return version$1;
|
|
339
|
+
try {
|
|
340
|
+
return new SemVer$14(version$1, options);
|
|
341
|
+
} catch (er) {
|
|
342
|
+
if (!throwErrors) return null;
|
|
343
|
+
throw er;
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
module.exports = parse$6;
|
|
347
|
+
}) });
|
|
348
|
+
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js
|
|
351
|
+
var require_valid$1 = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js": ((exports, module) => {
|
|
352
|
+
const parse$5 = require_parse();
|
|
353
|
+
const valid$1 = (version$1, options) => {
|
|
354
|
+
const v$1 = parse$5(version$1, options);
|
|
355
|
+
return v$1 ? v$1.version : null;
|
|
356
|
+
};
|
|
357
|
+
module.exports = valid$1;
|
|
358
|
+
}) });
|
|
359
|
+
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js
|
|
362
|
+
var require_clean = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js": ((exports, module) => {
|
|
363
|
+
const parse$4 = require_parse();
|
|
364
|
+
const clean$1 = (version$1, options) => {
|
|
365
|
+
const s = parse$4(version$1.trim().replace(/^[=v]+/, ""), options);
|
|
366
|
+
return s ? s.version : null;
|
|
367
|
+
};
|
|
368
|
+
module.exports = clean$1;
|
|
369
|
+
}) });
|
|
370
|
+
|
|
371
|
+
//#endregion
|
|
372
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js
|
|
373
|
+
var require_inc = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js": ((exports, module) => {
|
|
374
|
+
const SemVer$13 = require_semver$1();
|
|
375
|
+
const inc$1 = (version$1, release, options, identifier, identifierBase) => {
|
|
376
|
+
if (typeof options === "string") {
|
|
377
|
+
identifierBase = identifier;
|
|
378
|
+
identifier = options;
|
|
379
|
+
options = void 0;
|
|
380
|
+
}
|
|
381
|
+
try {
|
|
382
|
+
return new SemVer$13(version$1 instanceof SemVer$13 ? version$1.version : version$1, options).inc(release, identifier, identifierBase).version;
|
|
383
|
+
} catch (er) {
|
|
384
|
+
return null;
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
module.exports = inc$1;
|
|
388
|
+
}) });
|
|
389
|
+
|
|
390
|
+
//#endregion
|
|
391
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js
|
|
392
|
+
var require_diff = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js": ((exports, module) => {
|
|
393
|
+
const parse$3 = require_parse();
|
|
394
|
+
const diff$3 = (version1, version2) => {
|
|
395
|
+
const v1 = parse$3(version1, null, true);
|
|
396
|
+
const v2 = parse$3(version2, null, true);
|
|
397
|
+
const comparison = v1.compare(v2);
|
|
398
|
+
if (comparison === 0) return null;
|
|
399
|
+
const v1Higher = comparison > 0;
|
|
400
|
+
const highVersion = v1Higher ? v1 : v2;
|
|
401
|
+
const lowVersion = v1Higher ? v2 : v1;
|
|
402
|
+
const highHasPre = !!highVersion.prerelease.length;
|
|
403
|
+
const lowHasPre = !!lowVersion.prerelease.length;
|
|
404
|
+
if (lowHasPre && !highHasPre) {
|
|
405
|
+
if (!lowVersion.patch && !lowVersion.minor) return "major";
|
|
406
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
407
|
+
if (lowVersion.minor && !lowVersion.patch) return "minor";
|
|
408
|
+
return "patch";
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
const prefix = highHasPre ? "pre" : "";
|
|
412
|
+
if (v1.major !== v2.major) return prefix + "major";
|
|
413
|
+
if (v1.minor !== v2.minor) return prefix + "minor";
|
|
414
|
+
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
415
|
+
return "prerelease";
|
|
416
|
+
};
|
|
417
|
+
module.exports = diff$3;
|
|
418
|
+
}) });
|
|
419
|
+
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js
|
|
422
|
+
var require_major = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js": ((exports, module) => {
|
|
423
|
+
const SemVer$12 = require_semver$1();
|
|
424
|
+
const major$1 = (a, loose) => new SemVer$12(a, loose).major;
|
|
425
|
+
module.exports = major$1;
|
|
426
|
+
}) });
|
|
427
|
+
|
|
428
|
+
//#endregion
|
|
429
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js
|
|
430
|
+
var require_minor = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js": ((exports, module) => {
|
|
431
|
+
const SemVer$11 = require_semver$1();
|
|
432
|
+
const minor$1 = (a, loose) => new SemVer$11(a, loose).minor;
|
|
433
|
+
module.exports = minor$1;
|
|
434
|
+
}) });
|
|
435
|
+
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js
|
|
438
|
+
var require_patch = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js": ((exports, module) => {
|
|
439
|
+
const SemVer$10 = require_semver$1();
|
|
440
|
+
const patch$1 = (a, loose) => new SemVer$10(a, loose).patch;
|
|
441
|
+
module.exports = patch$1;
|
|
442
|
+
}) });
|
|
443
|
+
|
|
444
|
+
//#endregion
|
|
445
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js
|
|
446
|
+
var require_prerelease = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js": ((exports, module) => {
|
|
447
|
+
const parse$2 = require_parse();
|
|
448
|
+
const prerelease$1 = (version$1, options) => {
|
|
449
|
+
const parsed = parse$2(version$1, options);
|
|
450
|
+
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
451
|
+
};
|
|
452
|
+
module.exports = prerelease$1;
|
|
453
|
+
}) });
|
|
454
|
+
|
|
455
|
+
//#endregion
|
|
456
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js
|
|
457
|
+
var require_compare = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js": ((exports, module) => {
|
|
458
|
+
const SemVer$9 = require_semver$1();
|
|
459
|
+
const compare$11 = (a, b$1, loose) => new SemVer$9(a, loose).compare(new SemVer$9(b$1, loose));
|
|
460
|
+
module.exports = compare$11;
|
|
461
|
+
}) });
|
|
462
|
+
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js
|
|
465
|
+
var require_rcompare = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js": ((exports, module) => {
|
|
466
|
+
const compare$10 = require_compare();
|
|
467
|
+
const rcompare$1 = (a, b$1, loose) => compare$10(b$1, a, loose);
|
|
468
|
+
module.exports = rcompare$1;
|
|
469
|
+
}) });
|
|
470
|
+
|
|
471
|
+
//#endregion
|
|
472
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js
|
|
473
|
+
var require_compare_loose = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js": ((exports, module) => {
|
|
474
|
+
const compare$9 = require_compare();
|
|
475
|
+
const compareLoose$1 = (a, b$1) => compare$9(a, b$1, true);
|
|
476
|
+
module.exports = compareLoose$1;
|
|
477
|
+
}) });
|
|
478
|
+
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js
|
|
481
|
+
var require_compare_build = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js": ((exports, module) => {
|
|
482
|
+
const SemVer$8 = require_semver$1();
|
|
483
|
+
const compareBuild$3 = (a, b$1, loose) => {
|
|
484
|
+
const versionA = new SemVer$8(a, loose);
|
|
485
|
+
const versionB = new SemVer$8(b$1, loose);
|
|
486
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
487
|
+
};
|
|
488
|
+
module.exports = compareBuild$3;
|
|
489
|
+
}) });
|
|
490
|
+
|
|
491
|
+
//#endregion
|
|
492
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js
|
|
493
|
+
var require_sort = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js": ((exports, module) => {
|
|
494
|
+
const compareBuild$2 = require_compare_build();
|
|
495
|
+
const sort$1 = (list$1, loose) => list$1.sort((a, b$1) => compareBuild$2(a, b$1, loose));
|
|
496
|
+
module.exports = sort$1;
|
|
497
|
+
}) });
|
|
498
|
+
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js
|
|
501
|
+
var require_rsort = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js": ((exports, module) => {
|
|
502
|
+
const compareBuild$1 = require_compare_build();
|
|
503
|
+
const rsort$1 = (list$1, loose) => list$1.sort((a, b$1) => compareBuild$1(b$1, a, loose));
|
|
504
|
+
module.exports = rsort$1;
|
|
505
|
+
}) });
|
|
506
|
+
|
|
507
|
+
//#endregion
|
|
508
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js
|
|
509
|
+
var require_gt = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js": ((exports, module) => {
|
|
510
|
+
const compare$8 = require_compare();
|
|
511
|
+
const gt$4 = (a, b$1, loose) => compare$8(a, b$1, loose) > 0;
|
|
512
|
+
module.exports = gt$4;
|
|
513
|
+
}) });
|
|
514
|
+
|
|
515
|
+
//#endregion
|
|
516
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js
|
|
517
|
+
var require_lt = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js": ((exports, module) => {
|
|
518
|
+
const compare$7 = require_compare();
|
|
519
|
+
const lt$3 = (a, b$1, loose) => compare$7(a, b$1, loose) < 0;
|
|
520
|
+
module.exports = lt$3;
|
|
521
|
+
}) });
|
|
522
|
+
|
|
523
|
+
//#endregion
|
|
524
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js
|
|
525
|
+
var require_eq = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js": ((exports, module) => {
|
|
526
|
+
const compare$6 = require_compare();
|
|
527
|
+
const eq$2 = (a, b$1, loose) => compare$6(a, b$1, loose) === 0;
|
|
528
|
+
module.exports = eq$2;
|
|
529
|
+
}) });
|
|
530
|
+
|
|
531
|
+
//#endregion
|
|
532
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js
|
|
533
|
+
var require_neq = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js": ((exports, module) => {
|
|
534
|
+
const compare$5 = require_compare();
|
|
535
|
+
const neq$2 = (a, b$1, loose) => compare$5(a, b$1, loose) !== 0;
|
|
536
|
+
module.exports = neq$2;
|
|
537
|
+
}) });
|
|
538
|
+
|
|
539
|
+
//#endregion
|
|
540
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js
|
|
541
|
+
var require_gte = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js": ((exports, module) => {
|
|
542
|
+
const compare$4 = require_compare();
|
|
543
|
+
const gte$3 = (a, b$1, loose) => compare$4(a, b$1, loose) >= 0;
|
|
544
|
+
module.exports = gte$3;
|
|
545
|
+
}) });
|
|
546
|
+
|
|
547
|
+
//#endregion
|
|
548
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js
|
|
549
|
+
var require_lte = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js": ((exports, module) => {
|
|
550
|
+
const compare$3 = require_compare();
|
|
551
|
+
const lte$3 = (a, b$1, loose) => compare$3(a, b$1, loose) <= 0;
|
|
552
|
+
module.exports = lte$3;
|
|
553
|
+
}) });
|
|
554
|
+
|
|
555
|
+
//#endregion
|
|
556
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js
|
|
557
|
+
var require_cmp = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js": ((exports, module) => {
|
|
558
|
+
const eq$1 = require_eq();
|
|
559
|
+
const neq$1 = require_neq();
|
|
560
|
+
const gt$3 = require_gt();
|
|
561
|
+
const gte$2 = require_gte();
|
|
562
|
+
const lt$2 = require_lt();
|
|
563
|
+
const lte$2 = require_lte();
|
|
564
|
+
const cmp$2 = (a, op, b$1, loose) => {
|
|
565
|
+
switch (op) {
|
|
566
|
+
case "===":
|
|
567
|
+
if (typeof a === "object") a = a.version;
|
|
568
|
+
if (typeof b$1 === "object") b$1 = b$1.version;
|
|
569
|
+
return a === b$1;
|
|
570
|
+
case "!==":
|
|
571
|
+
if (typeof a === "object") a = a.version;
|
|
572
|
+
if (typeof b$1 === "object") b$1 = b$1.version;
|
|
573
|
+
return a !== b$1;
|
|
574
|
+
case "":
|
|
575
|
+
case "=":
|
|
576
|
+
case "==": return eq$1(a, b$1, loose);
|
|
577
|
+
case "!=": return neq$1(a, b$1, loose);
|
|
578
|
+
case ">": return gt$3(a, b$1, loose);
|
|
579
|
+
case ">=": return gte$2(a, b$1, loose);
|
|
580
|
+
case "<": return lt$2(a, b$1, loose);
|
|
581
|
+
case "<=": return lte$2(a, b$1, loose);
|
|
582
|
+
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
module.exports = cmp$2;
|
|
586
|
+
}) });
|
|
587
|
+
|
|
588
|
+
//#endregion
|
|
589
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js
|
|
590
|
+
var require_coerce = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js": ((exports, module) => {
|
|
591
|
+
const SemVer$7 = require_semver$1();
|
|
592
|
+
const parse$1 = require_parse();
|
|
593
|
+
const { safeRe: re$2, t: t$3 } = require_re();
|
|
594
|
+
const coerce$1 = (version$1, options) => {
|
|
595
|
+
if (version$1 instanceof SemVer$7) return version$1;
|
|
596
|
+
if (typeof version$1 === "number") version$1 = String(version$1);
|
|
597
|
+
if (typeof version$1 !== "string") return null;
|
|
598
|
+
options = options || {};
|
|
599
|
+
let match = null;
|
|
600
|
+
if (!options.rtl) match = version$1.match(options.includePrerelease ? re$2[t$3.COERCEFULL] : re$2[t$3.COERCE]);
|
|
601
|
+
else {
|
|
602
|
+
const coerceRtlRegex = options.includePrerelease ? re$2[t$3.COERCERTLFULL] : re$2[t$3.COERCERTL];
|
|
603
|
+
let next;
|
|
604
|
+
while ((next = coerceRtlRegex.exec(version$1)) && (!match || match.index + match[0].length !== version$1.length)) {
|
|
605
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
606
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
607
|
+
}
|
|
608
|
+
coerceRtlRegex.lastIndex = -1;
|
|
609
|
+
}
|
|
610
|
+
if (match === null) return null;
|
|
611
|
+
const major$2 = match[2];
|
|
612
|
+
const minor$2 = match[3] || "0";
|
|
613
|
+
const patch$2 = match[4] || "0";
|
|
614
|
+
const prerelease$2 = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
615
|
+
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
616
|
+
return parse$1(`${major$2}.${minor$2}.${patch$2}${prerelease$2}${build}`, options);
|
|
617
|
+
};
|
|
618
|
+
module.exports = coerce$1;
|
|
619
|
+
}) });
|
|
620
|
+
|
|
621
|
+
//#endregion
|
|
622
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js
|
|
623
|
+
var require_lrucache = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js": ((exports, module) => {
|
|
624
|
+
var LRUCache = class {
|
|
625
|
+
constructor() {
|
|
626
|
+
this.max = 1e3;
|
|
627
|
+
this.map = /* @__PURE__ */ new Map();
|
|
628
|
+
}
|
|
629
|
+
get(key) {
|
|
630
|
+
const value = this.map.get(key);
|
|
631
|
+
if (value === void 0) return void 0;
|
|
632
|
+
else {
|
|
633
|
+
this.map.delete(key);
|
|
634
|
+
this.map.set(key, value);
|
|
635
|
+
return value;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
delete(key) {
|
|
639
|
+
return this.map.delete(key);
|
|
640
|
+
}
|
|
641
|
+
set(key, value) {
|
|
642
|
+
const deleted = this.delete(key);
|
|
643
|
+
if (!deleted && value !== void 0) {
|
|
644
|
+
if (this.map.size >= this.max) {
|
|
645
|
+
const firstKey = this.map.keys().next().value;
|
|
646
|
+
this.delete(firstKey);
|
|
647
|
+
}
|
|
648
|
+
this.map.set(key, value);
|
|
649
|
+
}
|
|
650
|
+
return this;
|
|
651
|
+
}
|
|
652
|
+
};
|
|
653
|
+
module.exports = LRUCache;
|
|
654
|
+
}) });
|
|
655
|
+
|
|
656
|
+
//#endregion
|
|
657
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js
|
|
658
|
+
var require_range = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js": ((exports, module) => {
|
|
659
|
+
const SPACE_CHARACTERS = /\s+/g;
|
|
660
|
+
var Range$11 = class Range$11 {
|
|
661
|
+
constructor(range, options) {
|
|
662
|
+
options = parseOptions$1(options);
|
|
663
|
+
if (range instanceof Range$11) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
|
|
664
|
+
else return new Range$11(range.raw, options);
|
|
665
|
+
if (range instanceof Comparator$4) {
|
|
666
|
+
this.raw = range.value;
|
|
667
|
+
this.set = [[range]];
|
|
668
|
+
this.formatted = void 0;
|
|
669
|
+
return this;
|
|
670
|
+
}
|
|
671
|
+
this.options = options;
|
|
672
|
+
this.loose = !!options.loose;
|
|
673
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
674
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
675
|
+
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c$1) => c$1.length);
|
|
676
|
+
if (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
677
|
+
if (this.set.length > 1) {
|
|
678
|
+
const first = this.set[0];
|
|
679
|
+
this.set = this.set.filter((c$1) => !isNullSet(c$1[0]));
|
|
680
|
+
if (this.set.length === 0) this.set = [first];
|
|
681
|
+
else if (this.set.length > 1) {
|
|
682
|
+
for (const c$1 of this.set) if (c$1.length === 1 && isAny(c$1[0])) {
|
|
683
|
+
this.set = [c$1];
|
|
684
|
+
break;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
this.formatted = void 0;
|
|
689
|
+
}
|
|
690
|
+
get range() {
|
|
691
|
+
if (this.formatted === void 0) {
|
|
692
|
+
this.formatted = "";
|
|
693
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
694
|
+
if (i > 0) this.formatted += "||";
|
|
695
|
+
const comps = this.set[i];
|
|
696
|
+
for (let k$1 = 0; k$1 < comps.length; k$1++) {
|
|
697
|
+
if (k$1 > 0) this.formatted += " ";
|
|
698
|
+
this.formatted += comps[k$1].toString().trim();
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
return this.formatted;
|
|
703
|
+
}
|
|
704
|
+
format() {
|
|
705
|
+
return this.range;
|
|
706
|
+
}
|
|
707
|
+
toString() {
|
|
708
|
+
return this.range;
|
|
709
|
+
}
|
|
710
|
+
parseRange(range) {
|
|
711
|
+
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
712
|
+
const memoKey = memoOpts + ":" + range;
|
|
713
|
+
const cached = cache.get(memoKey);
|
|
714
|
+
if (cached) return cached;
|
|
715
|
+
const loose = this.options.loose;
|
|
716
|
+
const hr = loose ? re$1[t$2.HYPHENRANGELOOSE] : re$1[t$2.HYPHENRANGE];
|
|
717
|
+
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
718
|
+
debug$1("hyphen replace", range);
|
|
719
|
+
range = range.replace(re$1[t$2.COMPARATORTRIM], comparatorTrimReplace);
|
|
720
|
+
debug$1("comparator trim", range);
|
|
721
|
+
range = range.replace(re$1[t$2.TILDETRIM], tildeTrimReplace);
|
|
722
|
+
debug$1("tilde trim", range);
|
|
723
|
+
range = range.replace(re$1[t$2.CARETTRIM], caretTrimReplace);
|
|
724
|
+
debug$1("caret trim", range);
|
|
725
|
+
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
726
|
+
if (loose) rangeList = rangeList.filter((comp) => {
|
|
727
|
+
debug$1("loose invalid filter", comp, this.options);
|
|
728
|
+
return !!comp.match(re$1[t$2.COMPARATORLOOSE]);
|
|
729
|
+
});
|
|
730
|
+
debug$1("range list", rangeList);
|
|
731
|
+
const rangeMap = /* @__PURE__ */ new Map();
|
|
732
|
+
const comparators = rangeList.map((comp) => new Comparator$4(comp, this.options));
|
|
733
|
+
for (const comp of comparators) {
|
|
734
|
+
if (isNullSet(comp)) return [comp];
|
|
735
|
+
rangeMap.set(comp.value, comp);
|
|
736
|
+
}
|
|
737
|
+
if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete("");
|
|
738
|
+
const result = [...rangeMap.values()];
|
|
739
|
+
cache.set(memoKey, result);
|
|
740
|
+
return result;
|
|
741
|
+
}
|
|
742
|
+
intersects(range, options) {
|
|
743
|
+
if (!(range instanceof Range$11)) throw new TypeError("a Range is required");
|
|
744
|
+
return this.set.some((thisComparators) => {
|
|
745
|
+
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
746
|
+
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
747
|
+
return rangeComparators.every((rangeComparator) => {
|
|
748
|
+
return thisComparator.intersects(rangeComparator, options);
|
|
749
|
+
});
|
|
750
|
+
});
|
|
751
|
+
});
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
test(version$1) {
|
|
755
|
+
if (!version$1) return false;
|
|
756
|
+
if (typeof version$1 === "string") try {
|
|
757
|
+
version$1 = new SemVer$6(version$1, this.options);
|
|
758
|
+
} catch (er) {
|
|
759
|
+
return false;
|
|
760
|
+
}
|
|
761
|
+
for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version$1, this.options)) return true;
|
|
762
|
+
return false;
|
|
763
|
+
}
|
|
764
|
+
};
|
|
765
|
+
module.exports = Range$11;
|
|
766
|
+
const LRU = require_lrucache();
|
|
767
|
+
const cache = new LRU();
|
|
768
|
+
const parseOptions$1 = require_parse_options();
|
|
769
|
+
const Comparator$4 = require_comparator();
|
|
770
|
+
const debug$1 = require_debug();
|
|
771
|
+
const SemVer$6 = require_semver$1();
|
|
772
|
+
const { safeRe: re$1, t: t$2, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
773
|
+
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants$1();
|
|
774
|
+
const isNullSet = (c$1) => c$1.value === "<0.0.0-0";
|
|
775
|
+
const isAny = (c$1) => c$1.value === "";
|
|
776
|
+
const isSatisfiable = (comparators, options) => {
|
|
777
|
+
let result = true;
|
|
778
|
+
const remainingComparators = comparators.slice();
|
|
779
|
+
let testComparator = remainingComparators.pop();
|
|
780
|
+
while (result && remainingComparators.length) {
|
|
781
|
+
result = remainingComparators.every((otherComparator) => {
|
|
782
|
+
return testComparator.intersects(otherComparator, options);
|
|
783
|
+
});
|
|
784
|
+
testComparator = remainingComparators.pop();
|
|
785
|
+
}
|
|
786
|
+
return result;
|
|
787
|
+
};
|
|
788
|
+
const parseComparator = (comp, options) => {
|
|
789
|
+
debug$1("comp", comp, options);
|
|
790
|
+
comp = replaceCarets(comp, options);
|
|
791
|
+
debug$1("caret", comp);
|
|
792
|
+
comp = replaceTildes(comp, options);
|
|
793
|
+
debug$1("tildes", comp);
|
|
794
|
+
comp = replaceXRanges(comp, options);
|
|
795
|
+
debug$1("xrange", comp);
|
|
796
|
+
comp = replaceStars(comp, options);
|
|
797
|
+
debug$1("stars", comp);
|
|
798
|
+
return comp;
|
|
799
|
+
};
|
|
800
|
+
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
801
|
+
const replaceTildes = (comp, options) => {
|
|
802
|
+
return comp.trim().split(/\s+/).map((c$1) => replaceTilde(c$1, options)).join(" ");
|
|
803
|
+
};
|
|
804
|
+
const replaceTilde = (comp, options) => {
|
|
805
|
+
const r = options.loose ? re$1[t$2.TILDELOOSE] : re$1[t$2.TILDE];
|
|
806
|
+
return comp.replace(r, (_, M, m$1, p$1, pr) => {
|
|
807
|
+
debug$1("tilde", comp, _, M, m$1, p$1, pr);
|
|
808
|
+
let ret;
|
|
809
|
+
if (isX(M)) ret = "";
|
|
810
|
+
else if (isX(m$1)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
811
|
+
else if (isX(p$1)) ret = `>=${M}.${m$1}.0 <${M}.${+m$1 + 1}.0-0`;
|
|
812
|
+
else if (pr) {
|
|
813
|
+
debug$1("replaceTilde pr", pr);
|
|
814
|
+
ret = `>=${M}.${m$1}.${p$1}-${pr} <${M}.${+m$1 + 1}.0-0`;
|
|
815
|
+
} else ret = `>=${M}.${m$1}.${p$1} <${M}.${+m$1 + 1}.0-0`;
|
|
816
|
+
debug$1("tilde return", ret);
|
|
817
|
+
return ret;
|
|
818
|
+
});
|
|
819
|
+
};
|
|
820
|
+
const replaceCarets = (comp, options) => {
|
|
821
|
+
return comp.trim().split(/\s+/).map((c$1) => replaceCaret(c$1, options)).join(" ");
|
|
822
|
+
};
|
|
823
|
+
const replaceCaret = (comp, options) => {
|
|
824
|
+
debug$1("caret", comp, options);
|
|
825
|
+
const r = options.loose ? re$1[t$2.CARETLOOSE] : re$1[t$2.CARET];
|
|
826
|
+
const z = options.includePrerelease ? "-0" : "";
|
|
827
|
+
return comp.replace(r, (_, M, m$1, p$1, pr) => {
|
|
828
|
+
debug$1("caret", comp, _, M, m$1, p$1, pr);
|
|
829
|
+
let ret;
|
|
830
|
+
if (isX(M)) ret = "";
|
|
831
|
+
else if (isX(m$1)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
832
|
+
else if (isX(p$1)) if (M === "0") ret = `>=${M}.${m$1}.0${z} <${M}.${+m$1 + 1}.0-0`;
|
|
833
|
+
else ret = `>=${M}.${m$1}.0${z} <${+M + 1}.0.0-0`;
|
|
834
|
+
else if (pr) {
|
|
835
|
+
debug$1("replaceCaret pr", pr);
|
|
836
|
+
if (M === "0") if (m$1 === "0") ret = `>=${M}.${m$1}.${p$1}-${pr} <${M}.${m$1}.${+p$1 + 1}-0`;
|
|
837
|
+
else ret = `>=${M}.${m$1}.${p$1}-${pr} <${M}.${+m$1 + 1}.0-0`;
|
|
838
|
+
else ret = `>=${M}.${m$1}.${p$1}-${pr} <${+M + 1}.0.0-0`;
|
|
839
|
+
} else {
|
|
840
|
+
debug$1("no pr");
|
|
841
|
+
if (M === "0") if (m$1 === "0") ret = `>=${M}.${m$1}.${p$1}${z} <${M}.${m$1}.${+p$1 + 1}-0`;
|
|
842
|
+
else ret = `>=${M}.${m$1}.${p$1}${z} <${M}.${+m$1 + 1}.0-0`;
|
|
843
|
+
else ret = `>=${M}.${m$1}.${p$1} <${+M + 1}.0.0-0`;
|
|
844
|
+
}
|
|
845
|
+
debug$1("caret return", ret);
|
|
846
|
+
return ret;
|
|
847
|
+
});
|
|
848
|
+
};
|
|
849
|
+
const replaceXRanges = (comp, options) => {
|
|
850
|
+
debug$1("replaceXRanges", comp, options);
|
|
851
|
+
return comp.split(/\s+/).map((c$1) => replaceXRange(c$1, options)).join(" ");
|
|
852
|
+
};
|
|
853
|
+
const replaceXRange = (comp, options) => {
|
|
854
|
+
comp = comp.trim();
|
|
855
|
+
const r = options.loose ? re$1[t$2.XRANGELOOSE] : re$1[t$2.XRANGE];
|
|
856
|
+
return comp.replace(r, (ret, gtlt, M, m$1, p$1, pr) => {
|
|
857
|
+
debug$1("xRange", comp, ret, gtlt, M, m$1, p$1, pr);
|
|
858
|
+
const xM = isX(M);
|
|
859
|
+
const xm = xM || isX(m$1);
|
|
860
|
+
const xp = xm || isX(p$1);
|
|
861
|
+
const anyX = xp;
|
|
862
|
+
if (gtlt === "=" && anyX) gtlt = "";
|
|
863
|
+
pr = options.includePrerelease ? "-0" : "";
|
|
864
|
+
if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
|
|
865
|
+
else ret = "*";
|
|
866
|
+
else if (gtlt && anyX) {
|
|
867
|
+
if (xm) m$1 = 0;
|
|
868
|
+
p$1 = 0;
|
|
869
|
+
if (gtlt === ">") {
|
|
870
|
+
gtlt = ">=";
|
|
871
|
+
if (xm) {
|
|
872
|
+
M = +M + 1;
|
|
873
|
+
m$1 = 0;
|
|
874
|
+
p$1 = 0;
|
|
875
|
+
} else {
|
|
876
|
+
m$1 = +m$1 + 1;
|
|
877
|
+
p$1 = 0;
|
|
878
|
+
}
|
|
879
|
+
} else if (gtlt === "<=") {
|
|
880
|
+
gtlt = "<";
|
|
881
|
+
if (xm) M = +M + 1;
|
|
882
|
+
else m$1 = +m$1 + 1;
|
|
883
|
+
}
|
|
884
|
+
if (gtlt === "<") pr = "-0";
|
|
885
|
+
ret = `${gtlt + M}.${m$1}.${p$1}${pr}`;
|
|
886
|
+
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
887
|
+
else if (xp) ret = `>=${M}.${m$1}.0${pr} <${M}.${+m$1 + 1}.0-0`;
|
|
888
|
+
debug$1("xRange return", ret);
|
|
889
|
+
return ret;
|
|
890
|
+
});
|
|
891
|
+
};
|
|
892
|
+
const replaceStars = (comp, options) => {
|
|
893
|
+
debug$1("replaceStars", comp, options);
|
|
894
|
+
return comp.trim().replace(re$1[t$2.STAR], "");
|
|
895
|
+
};
|
|
896
|
+
const replaceGTE0 = (comp, options) => {
|
|
897
|
+
debug$1("replaceGTE0", comp, options);
|
|
898
|
+
return comp.trim().replace(re$1[options.includePrerelease ? t$2.GTE0PRE : t$2.GTE0], "");
|
|
899
|
+
};
|
|
900
|
+
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
901
|
+
if (isX(fM)) from = "";
|
|
902
|
+
else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
903
|
+
else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
904
|
+
else if (fpr) from = `>=${from}`;
|
|
905
|
+
else from = `>=${from}${incPr ? "-0" : ""}`;
|
|
906
|
+
if (isX(tM)) to = "";
|
|
907
|
+
else if (isX(tm)) to = `<${+tM + 1}.0.0-0`;
|
|
908
|
+
else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;
|
|
909
|
+
else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
910
|
+
else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
911
|
+
else to = `<=${to}`;
|
|
912
|
+
return `${from} ${to}`.trim();
|
|
913
|
+
};
|
|
914
|
+
const testSet = (set, version$1, options) => {
|
|
915
|
+
for (let i = 0; i < set.length; i++) if (!set[i].test(version$1)) return false;
|
|
916
|
+
if (version$1.prerelease.length && !options.includePrerelease) {
|
|
917
|
+
for (let i = 0; i < set.length; i++) {
|
|
918
|
+
debug$1(set[i].semver);
|
|
919
|
+
if (set[i].semver === Comparator$4.ANY) continue;
|
|
920
|
+
if (set[i].semver.prerelease.length > 0) {
|
|
921
|
+
const allowed = set[i].semver;
|
|
922
|
+
if (allowed.major === version$1.major && allowed.minor === version$1.minor && allowed.patch === version$1.patch) return true;
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
return false;
|
|
926
|
+
}
|
|
927
|
+
return true;
|
|
928
|
+
};
|
|
929
|
+
}) });
|
|
930
|
+
|
|
931
|
+
//#endregion
|
|
932
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js
|
|
933
|
+
var require_comparator = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js": ((exports, module) => {
|
|
934
|
+
const ANY$2 = Symbol("SemVer ANY");
|
|
935
|
+
var Comparator$3 = class Comparator$3 {
|
|
936
|
+
static get ANY() {
|
|
937
|
+
return ANY$2;
|
|
938
|
+
}
|
|
939
|
+
constructor(comp, options) {
|
|
940
|
+
options = parseOptions(options);
|
|
941
|
+
if (comp instanceof Comparator$3) if (comp.loose === !!options.loose) return comp;
|
|
942
|
+
else comp = comp.value;
|
|
943
|
+
comp = comp.trim().split(/\s+/).join(" ");
|
|
944
|
+
debug("comparator", comp, options);
|
|
945
|
+
this.options = options;
|
|
946
|
+
this.loose = !!options.loose;
|
|
947
|
+
this.parse(comp);
|
|
948
|
+
if (this.semver === ANY$2) this.value = "";
|
|
949
|
+
else this.value = this.operator + this.semver.version;
|
|
950
|
+
debug("comp", this);
|
|
951
|
+
}
|
|
952
|
+
parse(comp) {
|
|
953
|
+
const r = this.options.loose ? re[t$1.COMPARATORLOOSE] : re[t$1.COMPARATOR];
|
|
954
|
+
const m$1 = comp.match(r);
|
|
955
|
+
if (!m$1) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
956
|
+
this.operator = m$1[1] !== void 0 ? m$1[1] : "";
|
|
957
|
+
if (this.operator === "=") this.operator = "";
|
|
958
|
+
if (!m$1[2]) this.semver = ANY$2;
|
|
959
|
+
else this.semver = new SemVer$5(m$1[2], this.options.loose);
|
|
960
|
+
}
|
|
961
|
+
toString() {
|
|
962
|
+
return this.value;
|
|
963
|
+
}
|
|
964
|
+
test(version$1) {
|
|
965
|
+
debug("Comparator.test", version$1, this.options.loose);
|
|
966
|
+
if (this.semver === ANY$2 || version$1 === ANY$2) return true;
|
|
967
|
+
if (typeof version$1 === "string") try {
|
|
968
|
+
version$1 = new SemVer$5(version$1, this.options);
|
|
969
|
+
} catch (er) {
|
|
970
|
+
return false;
|
|
971
|
+
}
|
|
972
|
+
return cmp$1(version$1, this.operator, this.semver, this.options);
|
|
973
|
+
}
|
|
974
|
+
intersects(comp, options) {
|
|
975
|
+
if (!(comp instanceof Comparator$3)) throw new TypeError("a Comparator is required");
|
|
976
|
+
if (this.operator === "") {
|
|
977
|
+
if (this.value === "") return true;
|
|
978
|
+
return new Range$10(comp.value, options).test(this.value);
|
|
979
|
+
} else if (comp.operator === "") {
|
|
980
|
+
if (comp.value === "") return true;
|
|
981
|
+
return new Range$10(this.value, options).test(comp.semver);
|
|
982
|
+
}
|
|
983
|
+
options = parseOptions(options);
|
|
984
|
+
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
985
|
+
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false;
|
|
986
|
+
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
987
|
+
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
988
|
+
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
989
|
+
if (cmp$1(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
990
|
+
if (cmp$1(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
991
|
+
return false;
|
|
992
|
+
}
|
|
993
|
+
};
|
|
994
|
+
module.exports = Comparator$3;
|
|
995
|
+
const parseOptions = require_parse_options();
|
|
996
|
+
const { safeRe: re, t: t$1 } = require_re();
|
|
997
|
+
const cmp$1 = require_cmp();
|
|
998
|
+
const debug = require_debug();
|
|
999
|
+
const SemVer$5 = require_semver$1();
|
|
1000
|
+
const Range$10 = require_range();
|
|
1001
|
+
}) });
|
|
1002
|
+
|
|
1003
|
+
//#endregion
|
|
1004
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js
|
|
1005
|
+
var require_satisfies = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js": ((exports, module) => {
|
|
1006
|
+
const Range$9 = require_range();
|
|
1007
|
+
const satisfies$4 = (version$1, range, options) => {
|
|
1008
|
+
try {
|
|
1009
|
+
range = new Range$9(range, options);
|
|
1010
|
+
} catch (er) {
|
|
1011
|
+
return false;
|
|
1012
|
+
}
|
|
1013
|
+
return range.test(version$1);
|
|
1014
|
+
};
|
|
1015
|
+
module.exports = satisfies$4;
|
|
1016
|
+
}) });
|
|
1017
|
+
|
|
1018
|
+
//#endregion
|
|
1019
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js
|
|
1020
|
+
var require_to_comparators = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js": ((exports, module) => {
|
|
1021
|
+
const Range$8 = require_range();
|
|
1022
|
+
const toComparators$1 = (range, options) => new Range$8(range, options).set.map((comp) => comp.map((c$1) => c$1.value).join(" ").trim().split(" "));
|
|
1023
|
+
module.exports = toComparators$1;
|
|
1024
|
+
}) });
|
|
1025
|
+
|
|
1026
|
+
//#endregion
|
|
1027
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js
|
|
1028
|
+
var require_max_satisfying = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js": ((exports, module) => {
|
|
1029
|
+
const SemVer$4 = require_semver$1();
|
|
1030
|
+
const Range$7 = require_range();
|
|
1031
|
+
const maxSatisfying$1 = (versions, range, options) => {
|
|
1032
|
+
let max = null;
|
|
1033
|
+
let maxSV = null;
|
|
1034
|
+
let rangeObj = null;
|
|
1035
|
+
try {
|
|
1036
|
+
rangeObj = new Range$7(range, options);
|
|
1037
|
+
} catch (er) {
|
|
1038
|
+
return null;
|
|
1039
|
+
}
|
|
1040
|
+
versions.forEach((v$1) => {
|
|
1041
|
+
if (rangeObj.test(v$1)) {
|
|
1042
|
+
if (!max || maxSV.compare(v$1) === -1) {
|
|
1043
|
+
max = v$1;
|
|
1044
|
+
maxSV = new SemVer$4(max, options);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
});
|
|
1048
|
+
return max;
|
|
1049
|
+
};
|
|
1050
|
+
module.exports = maxSatisfying$1;
|
|
1051
|
+
}) });
|
|
1052
|
+
|
|
1053
|
+
//#endregion
|
|
1054
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js
|
|
1055
|
+
var require_min_satisfying = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js": ((exports, module) => {
|
|
1056
|
+
const SemVer$3 = require_semver$1();
|
|
1057
|
+
const Range$6 = require_range();
|
|
1058
|
+
const minSatisfying$1 = (versions, range, options) => {
|
|
1059
|
+
let min = null;
|
|
1060
|
+
let minSV = null;
|
|
1061
|
+
let rangeObj = null;
|
|
1062
|
+
try {
|
|
1063
|
+
rangeObj = new Range$6(range, options);
|
|
1064
|
+
} catch (er) {
|
|
1065
|
+
return null;
|
|
1066
|
+
}
|
|
1067
|
+
versions.forEach((v$1) => {
|
|
1068
|
+
if (rangeObj.test(v$1)) {
|
|
1069
|
+
if (!min || minSV.compare(v$1) === 1) {
|
|
1070
|
+
min = v$1;
|
|
1071
|
+
minSV = new SemVer$3(min, options);
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
});
|
|
1075
|
+
return min;
|
|
1076
|
+
};
|
|
1077
|
+
module.exports = minSatisfying$1;
|
|
1078
|
+
}) });
|
|
1079
|
+
|
|
1080
|
+
//#endregion
|
|
1081
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js
|
|
1082
|
+
var require_min_version = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js": ((exports, module) => {
|
|
1083
|
+
const SemVer$2 = require_semver$1();
|
|
1084
|
+
const Range$5 = require_range();
|
|
1085
|
+
const gt$2 = require_gt();
|
|
1086
|
+
const minVersion$1 = (range, loose) => {
|
|
1087
|
+
range = new Range$5(range, loose);
|
|
1088
|
+
let minver = new SemVer$2("0.0.0");
|
|
1089
|
+
if (range.test(minver)) return minver;
|
|
1090
|
+
minver = new SemVer$2("0.0.0-0");
|
|
1091
|
+
if (range.test(minver)) return minver;
|
|
1092
|
+
minver = null;
|
|
1093
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
1094
|
+
const comparators = range.set[i];
|
|
1095
|
+
let setMin = null;
|
|
1096
|
+
comparators.forEach((comparator) => {
|
|
1097
|
+
const compver = new SemVer$2(comparator.semver.version);
|
|
1098
|
+
switch (comparator.operator) {
|
|
1099
|
+
case ">":
|
|
1100
|
+
if (compver.prerelease.length === 0) compver.patch++;
|
|
1101
|
+
else compver.prerelease.push(0);
|
|
1102
|
+
compver.raw = compver.format();
|
|
1103
|
+
case "":
|
|
1104
|
+
case ">=":
|
|
1105
|
+
if (!setMin || gt$2(compver, setMin)) setMin = compver;
|
|
1106
|
+
break;
|
|
1107
|
+
case "<":
|
|
1108
|
+
case "<=": break;
|
|
1109
|
+
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
1110
|
+
}
|
|
1111
|
+
});
|
|
1112
|
+
if (setMin && (!minver || gt$2(minver, setMin))) minver = setMin;
|
|
1113
|
+
}
|
|
1114
|
+
if (minver && range.test(minver)) return minver;
|
|
1115
|
+
return null;
|
|
1116
|
+
};
|
|
1117
|
+
module.exports = minVersion$1;
|
|
1118
|
+
}) });
|
|
1119
|
+
|
|
1120
|
+
//#endregion
|
|
1121
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js
|
|
1122
|
+
var require_valid = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js": ((exports, module) => {
|
|
1123
|
+
const Range$4 = require_range();
|
|
1124
|
+
const validRange$1 = (range, options) => {
|
|
1125
|
+
try {
|
|
1126
|
+
return new Range$4(range, options).range || "*";
|
|
1127
|
+
} catch (er) {
|
|
1128
|
+
return null;
|
|
1129
|
+
}
|
|
1130
|
+
};
|
|
1131
|
+
module.exports = validRange$1;
|
|
1132
|
+
}) });
|
|
1133
|
+
|
|
1134
|
+
//#endregion
|
|
1135
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js
|
|
1136
|
+
var require_outside = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js": ((exports, module) => {
|
|
1137
|
+
const SemVer$1 = require_semver$1();
|
|
1138
|
+
const Comparator$2 = require_comparator();
|
|
1139
|
+
const { ANY: ANY$1 } = Comparator$2;
|
|
1140
|
+
const Range$3 = require_range();
|
|
1141
|
+
const satisfies$3 = require_satisfies();
|
|
1142
|
+
const gt$1 = require_gt();
|
|
1143
|
+
const lt$1 = require_lt();
|
|
1144
|
+
const lte$1 = require_lte();
|
|
1145
|
+
const gte$1 = require_gte();
|
|
1146
|
+
const outside$3 = (version$1, range, hilo, options) => {
|
|
1147
|
+
version$1 = new SemVer$1(version$1, options);
|
|
1148
|
+
range = new Range$3(range, options);
|
|
1149
|
+
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
1150
|
+
switch (hilo) {
|
|
1151
|
+
case ">":
|
|
1152
|
+
gtfn = gt$1;
|
|
1153
|
+
ltefn = lte$1;
|
|
1154
|
+
ltfn = lt$1;
|
|
1155
|
+
comp = ">";
|
|
1156
|
+
ecomp = ">=";
|
|
1157
|
+
break;
|
|
1158
|
+
case "<":
|
|
1159
|
+
gtfn = lt$1;
|
|
1160
|
+
ltefn = gte$1;
|
|
1161
|
+
ltfn = gt$1;
|
|
1162
|
+
comp = "<";
|
|
1163
|
+
ecomp = "<=";
|
|
1164
|
+
break;
|
|
1165
|
+
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
1166
|
+
}
|
|
1167
|
+
if (satisfies$3(version$1, range, options)) return false;
|
|
1168
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
1169
|
+
const comparators = range.set[i];
|
|
1170
|
+
let high = null;
|
|
1171
|
+
let low = null;
|
|
1172
|
+
comparators.forEach((comparator) => {
|
|
1173
|
+
if (comparator.semver === ANY$1) comparator = new Comparator$2(">=0.0.0");
|
|
1174
|
+
high = high || comparator;
|
|
1175
|
+
low = low || comparator;
|
|
1176
|
+
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
1177
|
+
else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
|
|
1178
|
+
});
|
|
1179
|
+
if (high.operator === comp || high.operator === ecomp) return false;
|
|
1180
|
+
if ((!low.operator || low.operator === comp) && ltefn(version$1, low.semver)) return false;
|
|
1181
|
+
else if (low.operator === ecomp && ltfn(version$1, low.semver)) return false;
|
|
1182
|
+
}
|
|
1183
|
+
return true;
|
|
1184
|
+
};
|
|
1185
|
+
module.exports = outside$3;
|
|
1186
|
+
}) });
|
|
1187
|
+
|
|
1188
|
+
//#endregion
|
|
1189
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js
|
|
1190
|
+
var require_gtr = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js": ((exports, module) => {
|
|
1191
|
+
const outside$2 = require_outside();
|
|
1192
|
+
const gtr$1 = (version$1, range, options) => outside$2(version$1, range, ">", options);
|
|
1193
|
+
module.exports = gtr$1;
|
|
1194
|
+
}) });
|
|
1195
|
+
|
|
1196
|
+
//#endregion
|
|
1197
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js
|
|
1198
|
+
var require_ltr = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js": ((exports, module) => {
|
|
1199
|
+
const outside$1 = require_outside();
|
|
1200
|
+
const ltr$1 = (version$1, range, options) => outside$1(version$1, range, "<", options);
|
|
1201
|
+
module.exports = ltr$1;
|
|
1202
|
+
}) });
|
|
1203
|
+
|
|
1204
|
+
//#endregion
|
|
1205
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js
|
|
1206
|
+
var require_intersects = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js": ((exports, module) => {
|
|
1207
|
+
const Range$2 = require_range();
|
|
1208
|
+
const intersects$1 = (r1, r2, options) => {
|
|
1209
|
+
r1 = new Range$2(r1, options);
|
|
1210
|
+
r2 = new Range$2(r2, options);
|
|
1211
|
+
return r1.intersects(r2, options);
|
|
1212
|
+
};
|
|
1213
|
+
module.exports = intersects$1;
|
|
1214
|
+
}) });
|
|
1215
|
+
|
|
1216
|
+
//#endregion
|
|
1217
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js
|
|
1218
|
+
var require_simplify = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js": ((exports, module) => {
|
|
1219
|
+
const satisfies$2 = require_satisfies();
|
|
1220
|
+
const compare$2 = require_compare();
|
|
1221
|
+
module.exports = (versions, range, options) => {
|
|
1222
|
+
const set = [];
|
|
1223
|
+
let first = null;
|
|
1224
|
+
let prev = null;
|
|
1225
|
+
const v$1 = versions.sort((a, b$1) => compare$2(a, b$1, options));
|
|
1226
|
+
for (const version$1 of v$1) {
|
|
1227
|
+
const included = satisfies$2(version$1, range, options);
|
|
1228
|
+
if (included) {
|
|
1229
|
+
prev = version$1;
|
|
1230
|
+
if (!first) first = version$1;
|
|
1231
|
+
} else {
|
|
1232
|
+
if (prev) set.push([first, prev]);
|
|
1233
|
+
prev = null;
|
|
1234
|
+
first = null;
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
if (first) set.push([first, null]);
|
|
1238
|
+
const ranges = [];
|
|
1239
|
+
for (const [min, max] of set) if (min === max) ranges.push(min);
|
|
1240
|
+
else if (!max && min === v$1[0]) ranges.push("*");
|
|
1241
|
+
else if (!max) ranges.push(`>=${min}`);
|
|
1242
|
+
else if (min === v$1[0]) ranges.push(`<=${max}`);
|
|
1243
|
+
else ranges.push(`${min} - ${max}`);
|
|
1244
|
+
const simplified = ranges.join(" || ");
|
|
1245
|
+
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
1246
|
+
return simplified.length < original.length ? simplified : range;
|
|
1247
|
+
};
|
|
1248
|
+
}) });
|
|
1249
|
+
|
|
1250
|
+
//#endregion
|
|
1251
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js
|
|
1252
|
+
var require_subset = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js": ((exports, module) => {
|
|
1253
|
+
const Range$1 = require_range();
|
|
1254
|
+
const Comparator$1 = require_comparator();
|
|
1255
|
+
const { ANY } = Comparator$1;
|
|
1256
|
+
const satisfies$1 = require_satisfies();
|
|
1257
|
+
const compare$1 = require_compare();
|
|
1258
|
+
const subset$1 = (sub, dom, options = {}) => {
|
|
1259
|
+
if (sub === dom) return true;
|
|
1260
|
+
sub = new Range$1(sub, options);
|
|
1261
|
+
dom = new Range$1(dom, options);
|
|
1262
|
+
let sawNonNull = false;
|
|
1263
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
1264
|
+
for (const simpleDom of dom.set) {
|
|
1265
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
1266
|
+
sawNonNull = sawNonNull || isSub !== null;
|
|
1267
|
+
if (isSub) continue OUTER;
|
|
1268
|
+
}
|
|
1269
|
+
if (sawNonNull) return false;
|
|
1270
|
+
}
|
|
1271
|
+
return true;
|
|
1272
|
+
};
|
|
1273
|
+
const minimumVersionWithPreRelease = [new Comparator$1(">=0.0.0-0")];
|
|
1274
|
+
const minimumVersion = [new Comparator$1(">=0.0.0")];
|
|
1275
|
+
const simpleSubset = (sub, dom, options) => {
|
|
1276
|
+
if (sub === dom) return true;
|
|
1277
|
+
if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
|
|
1278
|
+
else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
|
|
1279
|
+
else sub = minimumVersion;
|
|
1280
|
+
if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
|
|
1281
|
+
else dom = minimumVersion;
|
|
1282
|
+
const eqSet = /* @__PURE__ */ new Set();
|
|
1283
|
+
let gt$5, lt$4;
|
|
1284
|
+
for (const c$1 of sub) if (c$1.operator === ">" || c$1.operator === ">=") gt$5 = higherGT(gt$5, c$1, options);
|
|
1285
|
+
else if (c$1.operator === "<" || c$1.operator === "<=") lt$4 = lowerLT(lt$4, c$1, options);
|
|
1286
|
+
else eqSet.add(c$1.semver);
|
|
1287
|
+
if (eqSet.size > 1) return null;
|
|
1288
|
+
let gtltComp;
|
|
1289
|
+
if (gt$5 && lt$4) {
|
|
1290
|
+
gtltComp = compare$1(gt$5.semver, lt$4.semver, options);
|
|
1291
|
+
if (gtltComp > 0) return null;
|
|
1292
|
+
else if (gtltComp === 0 && (gt$5.operator !== ">=" || lt$4.operator !== "<=")) return null;
|
|
1293
|
+
}
|
|
1294
|
+
for (const eq$3 of eqSet) {
|
|
1295
|
+
if (gt$5 && !satisfies$1(eq$3, String(gt$5), options)) return null;
|
|
1296
|
+
if (lt$4 && !satisfies$1(eq$3, String(lt$4), options)) return null;
|
|
1297
|
+
for (const c$1 of dom) if (!satisfies$1(eq$3, String(c$1), options)) return false;
|
|
1298
|
+
return true;
|
|
1299
|
+
}
|
|
1300
|
+
let higher, lower;
|
|
1301
|
+
let hasDomLT, hasDomGT;
|
|
1302
|
+
let needDomLTPre = lt$4 && !options.includePrerelease && lt$4.semver.prerelease.length ? lt$4.semver : false;
|
|
1303
|
+
let needDomGTPre = gt$5 && !options.includePrerelease && gt$5.semver.prerelease.length ? gt$5.semver : false;
|
|
1304
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt$4.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
1305
|
+
for (const c$1 of dom) {
|
|
1306
|
+
hasDomGT = hasDomGT || c$1.operator === ">" || c$1.operator === ">=";
|
|
1307
|
+
hasDomLT = hasDomLT || c$1.operator === "<" || c$1.operator === "<=";
|
|
1308
|
+
if (gt$5) {
|
|
1309
|
+
if (needDomGTPre) {
|
|
1310
|
+
if (c$1.semver.prerelease && c$1.semver.prerelease.length && c$1.semver.major === needDomGTPre.major && c$1.semver.minor === needDomGTPre.minor && c$1.semver.patch === needDomGTPre.patch) needDomGTPre = false;
|
|
1311
|
+
}
|
|
1312
|
+
if (c$1.operator === ">" || c$1.operator === ">=") {
|
|
1313
|
+
higher = higherGT(gt$5, c$1, options);
|
|
1314
|
+
if (higher === c$1 && higher !== gt$5) return false;
|
|
1315
|
+
} else if (gt$5.operator === ">=" && !satisfies$1(gt$5.semver, String(c$1), options)) return false;
|
|
1316
|
+
}
|
|
1317
|
+
if (lt$4) {
|
|
1318
|
+
if (needDomLTPre) {
|
|
1319
|
+
if (c$1.semver.prerelease && c$1.semver.prerelease.length && c$1.semver.major === needDomLTPre.major && c$1.semver.minor === needDomLTPre.minor && c$1.semver.patch === needDomLTPre.patch) needDomLTPre = false;
|
|
1320
|
+
}
|
|
1321
|
+
if (c$1.operator === "<" || c$1.operator === "<=") {
|
|
1322
|
+
lower = lowerLT(lt$4, c$1, options);
|
|
1323
|
+
if (lower === c$1 && lower !== lt$4) return false;
|
|
1324
|
+
} else if (lt$4.operator === "<=" && !satisfies$1(lt$4.semver, String(c$1), options)) return false;
|
|
1325
|
+
}
|
|
1326
|
+
if (!c$1.operator && (lt$4 || gt$5) && gtltComp !== 0) return false;
|
|
1327
|
+
}
|
|
1328
|
+
if (gt$5 && hasDomLT && !lt$4 && gtltComp !== 0) return false;
|
|
1329
|
+
if (lt$4 && hasDomGT && !gt$5 && gtltComp !== 0) return false;
|
|
1330
|
+
if (needDomGTPre || needDomLTPre) return false;
|
|
1331
|
+
return true;
|
|
1332
|
+
};
|
|
1333
|
+
const higherGT = (a, b$1, options) => {
|
|
1334
|
+
if (!a) return b$1;
|
|
1335
|
+
const comp = compare$1(a.semver, b$1.semver, options);
|
|
1336
|
+
return comp > 0 ? a : comp < 0 ? b$1 : b$1.operator === ">" && a.operator === ">=" ? b$1 : a;
|
|
1337
|
+
};
|
|
1338
|
+
const lowerLT = (a, b$1, options) => {
|
|
1339
|
+
if (!a) return b$1;
|
|
1340
|
+
const comp = compare$1(a.semver, b$1.semver, options);
|
|
1341
|
+
return comp < 0 ? a : comp > 0 ? b$1 : b$1.operator === "<" && a.operator === "<=" ? b$1 : a;
|
|
1342
|
+
};
|
|
1343
|
+
module.exports = subset$1;
|
|
1344
|
+
}) });
|
|
1345
|
+
|
|
1346
|
+
//#endregion
|
|
1347
|
+
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js
|
|
1348
|
+
var require_semver = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js": ((exports, module) => {
|
|
1349
|
+
const internalRe = require_re();
|
|
1350
|
+
const constants = require_constants$1();
|
|
1351
|
+
const SemVer = require_semver$1();
|
|
1352
|
+
const identifiers = require_identifiers();
|
|
1353
|
+
const parse = require_parse();
|
|
1354
|
+
const valid = require_valid$1();
|
|
1355
|
+
const clean = require_clean();
|
|
1356
|
+
const inc = require_inc();
|
|
1357
|
+
const diff$2 = require_diff();
|
|
1358
|
+
const major = require_major();
|
|
1359
|
+
const minor = require_minor();
|
|
1360
|
+
const patch = require_patch();
|
|
1361
|
+
const prerelease = require_prerelease();
|
|
1362
|
+
const compare = require_compare();
|
|
1363
|
+
const rcompare = require_rcompare();
|
|
1364
|
+
const compareLoose = require_compare_loose();
|
|
1365
|
+
const compareBuild = require_compare_build();
|
|
1366
|
+
const sort = require_sort();
|
|
1367
|
+
const rsort = require_rsort();
|
|
1368
|
+
const gt = require_gt();
|
|
1369
|
+
const lt = require_lt();
|
|
1370
|
+
const eq = require_eq();
|
|
1371
|
+
const neq = require_neq();
|
|
1372
|
+
const gte = require_gte();
|
|
1373
|
+
const lte = require_lte();
|
|
1374
|
+
const cmp = require_cmp();
|
|
1375
|
+
const coerce = require_coerce();
|
|
1376
|
+
const Comparator = require_comparator();
|
|
1377
|
+
const Range = require_range();
|
|
1378
|
+
const satisfies = require_satisfies();
|
|
1379
|
+
const toComparators = require_to_comparators();
|
|
1380
|
+
const maxSatisfying = require_max_satisfying();
|
|
1381
|
+
const minSatisfying = require_min_satisfying();
|
|
1382
|
+
const minVersion = require_min_version();
|
|
1383
|
+
const validRange = require_valid();
|
|
1384
|
+
const outside = require_outside();
|
|
1385
|
+
const gtr = require_gtr();
|
|
1386
|
+
const ltr = require_ltr();
|
|
1387
|
+
const intersects = require_intersects();
|
|
1388
|
+
const simplifyRange = require_simplify();
|
|
1389
|
+
const subset = require_subset();
|
|
1390
|
+
module.exports = {
|
|
1391
|
+
parse,
|
|
1392
|
+
valid,
|
|
1393
|
+
clean,
|
|
1394
|
+
inc,
|
|
1395
|
+
diff: diff$2,
|
|
1396
|
+
major,
|
|
1397
|
+
minor,
|
|
1398
|
+
patch,
|
|
1399
|
+
prerelease,
|
|
1400
|
+
compare,
|
|
1401
|
+
rcompare,
|
|
1402
|
+
compareLoose,
|
|
1403
|
+
compareBuild,
|
|
1404
|
+
sort,
|
|
1405
|
+
rsort,
|
|
1406
|
+
gt,
|
|
1407
|
+
lt,
|
|
1408
|
+
eq,
|
|
1409
|
+
neq,
|
|
1410
|
+
gte,
|
|
1411
|
+
lte,
|
|
1412
|
+
cmp,
|
|
1413
|
+
coerce,
|
|
1414
|
+
Comparator,
|
|
1415
|
+
Range,
|
|
1416
|
+
satisfies,
|
|
1417
|
+
toComparators,
|
|
1418
|
+
maxSatisfying,
|
|
1419
|
+
minSatisfying,
|
|
1420
|
+
minVersion,
|
|
1421
|
+
validRange,
|
|
1422
|
+
outside,
|
|
1423
|
+
gtr,
|
|
1424
|
+
ltr,
|
|
1425
|
+
intersects,
|
|
1426
|
+
simplifyRange,
|
|
1427
|
+
subset,
|
|
1428
|
+
SemVer,
|
|
1429
|
+
re: internalRe.re,
|
|
1430
|
+
src: internalRe.src,
|
|
1431
|
+
tokens: internalRe.t,
|
|
1432
|
+
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
1433
|
+
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
1434
|
+
compareIdentifiers: identifiers.compareIdentifiers,
|
|
1435
|
+
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
1436
|
+
};
|
|
1437
|
+
}) });
|
|
1438
|
+
|
|
1439
|
+
//#endregion
|
|
1440
|
+
//#region src/utils/table.ts
|
|
1441
|
+
var import_semver = /* @__PURE__ */ require_reportManualReview.__toESM(require_semver());
|
|
1442
|
+
/**
|
|
1443
|
+
* Renders an object as a table in terminal
|
|
1444
|
+
*/
|
|
1445
|
+
const renderTable = (data, indexHeading = "index") => {
|
|
1446
|
+
const firstEntry = Object.values(data)[0];
|
|
1447
|
+
if (!firstEntry) {
|
|
1448
|
+
console.info("No data to display");
|
|
1449
|
+
return;
|
|
1450
|
+
}
|
|
1451
|
+
const headings = [indexHeading, ...Object.keys(firstEntry)];
|
|
1452
|
+
const tableData = [];
|
|
1453
|
+
Object.entries(data).forEach(([packageName, details]) => {
|
|
1454
|
+
tableData.push([packageName, ...Object.values(details)]);
|
|
1455
|
+
});
|
|
1456
|
+
const getDisplayWidth = (str) => {
|
|
1457
|
+
return str.replace(/\x1b\[[0-9;]*m/gu, "").length;
|
|
1458
|
+
};
|
|
1459
|
+
const columnWidths = headings.map((heading, index) => {
|
|
1460
|
+
const maxDataWidth = Math.max(...tableData.map((row) => getDisplayWidth(row[index] || "")));
|
|
1461
|
+
return Math.max(heading.length, maxDataWidth);
|
|
1462
|
+
});
|
|
1463
|
+
const firstCellLine = "─".repeat(columnWidths[0] + 2);
|
|
1464
|
+
const remainingLines = columnWidths.slice(1).map((width) => "─".repeat(width + 2));
|
|
1465
|
+
const topSeparator = `┌${firstCellLine}┬${remainingLines.join("┬")}┐`;
|
|
1466
|
+
const midSeparator = `├${firstCellLine}┼${remainingLines.join("┼")}┤`;
|
|
1467
|
+
const endSeparator = `└${firstCellLine}┴${remainingLines.join("┴")}┘`;
|
|
1468
|
+
const formatRow = (cells) => {
|
|
1469
|
+
const formattedCells = cells.map((cell, index) => {
|
|
1470
|
+
const width = columnWidths[index];
|
|
1471
|
+
const displayWidth = getDisplayWidth(cell);
|
|
1472
|
+
const padding = width - displayWidth;
|
|
1473
|
+
return ` ${cell}${" ".repeat(Math.max(0, padding))} `;
|
|
1474
|
+
});
|
|
1475
|
+
return `│${formattedCells.join("│")}│`;
|
|
1476
|
+
};
|
|
1477
|
+
console.info(topSeparator);
|
|
1478
|
+
console.info(formatRow(headings));
|
|
1479
|
+
console.info(midSeparator);
|
|
1480
|
+
tableData.forEach((row) => {
|
|
1481
|
+
console.info(formatRow(row));
|
|
1482
|
+
});
|
|
1483
|
+
console.info(endSeparator);
|
|
1484
|
+
};
|
|
1485
|
+
|
|
1486
|
+
//#endregion
|
|
1487
|
+
//#region src/utils/dependencyChecks.ts
|
|
1488
|
+
/**
|
|
1489
|
+
* Retrieves and parses a JSON file from a specified path.
|
|
1490
|
+
*/
|
|
1491
|
+
const getJsonFromPath = (filePath, fileName) => {
|
|
1492
|
+
const jsonPath = (0, node_path.join)(filePath, fileName);
|
|
1493
|
+
try {
|
|
1494
|
+
const jsonContent = (0, node_fs.readFileSync)(jsonPath, "utf8");
|
|
1495
|
+
return JSON.parse(jsonContent);
|
|
1496
|
+
} catch {
|
|
1497
|
+
throw new Error(`Error reading ${jsonPath}`);
|
|
1498
|
+
}
|
|
1499
|
+
};
|
|
1500
|
+
/**
|
|
1501
|
+
* Checks if the installed version satisfies the given version requirement.
|
|
1502
|
+
*/
|
|
1503
|
+
function isVersionSatisfied(installedVersion, versionRequirement) {
|
|
1504
|
+
if (import_semver.default.valid(installedVersion) && import_semver.default.satisfies(installedVersion, versionRequirement)) return true;
|
|
1505
|
+
const cleanVersion = import_semver.default.coerce(installedVersion);
|
|
1506
|
+
return cleanVersion ? import_semver.default.satisfies(cleanVersion.version, versionRequirement) : false;
|
|
1507
|
+
}
|
|
1508
|
+
/**
|
|
1509
|
+
* Retrieves the version of a dependency from node_modules of a specific package.
|
|
1510
|
+
*/
|
|
1511
|
+
function getVersionFromNodeModules(packagePath, packageName) {
|
|
1512
|
+
try {
|
|
1513
|
+
const nodeModulesPackageJson = (0, node_path.join)(packagePath, "node_modules", packageName, "package.json");
|
|
1514
|
+
if (!(0, node_fs.existsSync)(nodeModulesPackageJson)) return "";
|
|
1515
|
+
const packageJson = JSON.parse((0, node_fs.readFileSync)(nodeModulesPackageJson, "utf8"));
|
|
1516
|
+
return packageJson.version || "";
|
|
1517
|
+
} catch {
|
|
1518
|
+
return "";
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
/**
|
|
1522
|
+
* Assesses whether the given package meets the prerequisites defined in the codemod's config.json.
|
|
1523
|
+
*/
|
|
1524
|
+
const assessPrerequisites = (packagePath, codemodPath) => {
|
|
1525
|
+
try {
|
|
1526
|
+
const SYMBOL = {
|
|
1527
|
+
OK: "\x1B[32m✔\x1B[0m",
|
|
1528
|
+
FAIL: "\x1B[31m✗\x1B[0m"
|
|
1529
|
+
};
|
|
1530
|
+
const codemodConfig = getJsonFromPath((0, node_path.dirname)(codemodPath), "config.json");
|
|
1531
|
+
const { dependencies = {}, peerDependencies = {} } = getJsonFromPath(packagePath, "package.json");
|
|
1532
|
+
const comparisons = {};
|
|
1533
|
+
let isCompliant = true;
|
|
1534
|
+
if (codemodConfig.prerequisites) Object.entries(codemodConfig.prerequisites).forEach(([name, versionRequirement]) => {
|
|
1535
|
+
const nodeModulesVersion = getVersionFromNodeModules(packagePath, name);
|
|
1536
|
+
const isDependencySatisfied = isVersionSatisfied(dependencies[name], versionRequirement);
|
|
1537
|
+
const isPeerDependencySatisfied = isVersionSatisfied(peerDependencies[name], versionRequirement);
|
|
1538
|
+
const isInstalledSatisfied = isVersionSatisfied(nodeModulesVersion, versionRequirement);
|
|
1539
|
+
if (!isDependencySatisfied && !isPeerDependencySatisfied || !isInstalledSatisfied) {
|
|
1540
|
+
isCompliant = false;
|
|
1541
|
+
comparisons[name] = {
|
|
1542
|
+
required: versionRequirement,
|
|
1543
|
+
dependencies: isDependencySatisfied ? SYMBOL.OK : `${SYMBOL.FAIL} ${dependencies[name] || "N/A"}`,
|
|
1544
|
+
peerDependencies: isPeerDependencySatisfied ? SYMBOL.OK : `${SYMBOL.FAIL} ${peerDependencies[name] || "N/A"}`,
|
|
1545
|
+
node_modules: isInstalledSatisfied ? SYMBOL.OK : `${SYMBOL.FAIL} ${nodeModulesVersion || "N/A"}`
|
|
1546
|
+
};
|
|
1547
|
+
}
|
|
1548
|
+
});
|
|
1549
|
+
if (!isCompliant) {
|
|
1550
|
+
console.info(`${SYMBOL.FAIL} \x1b[1mPrerequisite check failed.\x1b[0m`);
|
|
1551
|
+
renderTable(comparisons, "package");
|
|
1552
|
+
return false;
|
|
1553
|
+
}
|
|
1554
|
+
return true;
|
|
1555
|
+
} catch (error) {
|
|
1556
|
+
console.error("Cannot assess the state of prerequisites:", error);
|
|
1557
|
+
return false;
|
|
1558
|
+
}
|
|
1559
|
+
};
|
|
1560
|
+
|
|
1561
|
+
//#endregion
|
|
11
1562
|
//#region src/utils/getOptions.ts
|
|
12
1563
|
/**
|
|
13
1564
|
* if args are provided via CLI, log them to the console in
|
|
@@ -158,26 +1709,28 @@ async function getOptions({ transformFiles, packages, root }) {
|
|
|
158
1709
|
useGitIgnore
|
|
159
1710
|
};
|
|
160
1711
|
}
|
|
1712
|
+
var getOptions_default = getOptions;
|
|
161
1713
|
|
|
162
1714
|
//#endregion
|
|
163
1715
|
//#region src/utils/loadTransformModules.ts
|
|
164
1716
|
async function loadTransformModules(transformsDir) {
|
|
165
1717
|
let transformModules = {};
|
|
166
|
-
const
|
|
167
|
-
const transformFiles = await Promise.all(
|
|
168
|
-
const transformPath = node_path.default.join(transformsDir,
|
|
1718
|
+
const transformers = await node_fs.promises.readdir(transformsDir);
|
|
1719
|
+
const transformFiles = await Promise.all(transformers.map(async (name) => {
|
|
1720
|
+
const transformPath = node_path.default.join(transformsDir, name, "transformer.js");
|
|
169
1721
|
const transformModule = await import(transformPath);
|
|
170
1722
|
transformModules = {
|
|
171
1723
|
...transformModules,
|
|
172
|
-
[
|
|
1724
|
+
[name]: transformModule.default.default
|
|
173
1725
|
};
|
|
174
|
-
return
|
|
1726
|
+
return name.replace(".js", "");
|
|
175
1727
|
}));
|
|
176
1728
|
return {
|
|
177
1729
|
transformModules,
|
|
178
1730
|
transformFiles
|
|
179
1731
|
};
|
|
180
1732
|
}
|
|
1733
|
+
var loadTransformModules_default = loadTransformModules;
|
|
181
1734
|
|
|
182
1735
|
//#endregion
|
|
183
1736
|
//#region src/utils/repository.ts
|
|
@@ -1094,15 +2647,15 @@ var require_conversions = /* @__PURE__ */ require_reportManualReview.__commonJS(
|
|
|
1094
2647
|
const g$1 = rgb[1] / 255;
|
|
1095
2648
|
const b$1 = rgb[2] / 255;
|
|
1096
2649
|
const v$1 = Math.max(r, g$1, b$1);
|
|
1097
|
-
const diff$
|
|
2650
|
+
const diff$4 = v$1 - Math.min(r, g$1, b$1);
|
|
1098
2651
|
const diffc = function(c$1) {
|
|
1099
|
-
return (v$1 - c$1) / 6 / diff$
|
|
2652
|
+
return (v$1 - c$1) / 6 / diff$4 + 1 / 2;
|
|
1100
2653
|
};
|
|
1101
|
-
if (diff$
|
|
2654
|
+
if (diff$4 === 0) {
|
|
1102
2655
|
h$1 = 0;
|
|
1103
2656
|
s = 0;
|
|
1104
2657
|
} else {
|
|
1105
|
-
s = diff$
|
|
2658
|
+
s = diff$4 / v$1;
|
|
1106
2659
|
rdif = diffc(r);
|
|
1107
2660
|
gdif = diffc(g$1);
|
|
1108
2661
|
bdif = diffc(b$1);
|
|
@@ -1263,12 +2816,12 @@ var require_conversions = /* @__PURE__ */ require_reportManualReview.__commonJS(
|
|
|
1263
2816
|
const f$1 = h$1 - Math.floor(h$1);
|
|
1264
2817
|
const p$1 = 255 * v$1 * (1 - s);
|
|
1265
2818
|
const q$1 = 255 * v$1 * (1 - s * f$1);
|
|
1266
|
-
const t$
|
|
2819
|
+
const t$6 = 255 * v$1 * (1 - s * (1 - f$1));
|
|
1267
2820
|
v$1 *= 255;
|
|
1268
2821
|
switch (hi) {
|
|
1269
2822
|
case 0: return [
|
|
1270
2823
|
v$1,
|
|
1271
|
-
t$
|
|
2824
|
+
t$6,
|
|
1272
2825
|
p$1
|
|
1273
2826
|
];
|
|
1274
2827
|
case 1: return [
|
|
@@ -1279,7 +2832,7 @@ var require_conversions = /* @__PURE__ */ require_reportManualReview.__commonJS(
|
|
|
1279
2832
|
case 2: return [
|
|
1280
2833
|
p$1,
|
|
1281
2834
|
v$1,
|
|
1282
|
-
t$
|
|
2835
|
+
t$6
|
|
1283
2836
|
];
|
|
1284
2837
|
case 3: return [
|
|
1285
2838
|
p$1,
|
|
@@ -1287,7 +2840,7 @@ var require_conversions = /* @__PURE__ */ require_reportManualReview.__commonJS(
|
|
|
1287
2840
|
v$1
|
|
1288
2841
|
];
|
|
1289
2842
|
case 4: return [
|
|
1290
|
-
t$
|
|
2843
|
+
t$6,
|
|
1291
2844
|
p$1,
|
|
1292
2845
|
v$1
|
|
1293
2846
|
];
|
|
@@ -3230,8 +4783,8 @@ var require_ReactElement = /* @__PURE__ */ require_reportManualReview.__commonJS
|
|
|
3230
4783
|
function _interopRequireWildcard(obj, nodeInterop) {
|
|
3231
4784
|
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
3232
4785
|
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
|
|
3233
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
3234
|
-
if (cache && cache.has(obj)) return cache.get(obj);
|
|
4786
|
+
var cache$1 = _getRequireWildcardCache(nodeInterop);
|
|
4787
|
+
if (cache$1 && cache$1.has(obj)) return cache$1.get(obj);
|
|
3235
4788
|
var newObj = {};
|
|
3236
4789
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
3237
4790
|
for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -3240,7 +4793,7 @@ var require_ReactElement = /* @__PURE__ */ require_reportManualReview.__commonJS
|
|
|
3240
4793
|
else newObj[key] = obj[key];
|
|
3241
4794
|
}
|
|
3242
4795
|
newObj.default = obj;
|
|
3243
|
-
if (cache) cache.set(obj, newObj);
|
|
4796
|
+
if (cache$1) cache$1.set(obj, newObj);
|
|
3244
4797
|
return newObj;
|
|
3245
4798
|
}
|
|
3246
4799
|
/**
|
|
@@ -4396,10 +5949,10 @@ var require_joinAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__comm
|
|
|
4396
5949
|
return lines.join("\n");
|
|
4397
5950
|
};
|
|
4398
5951
|
exports.joinAlignedDiffsNoExpand = joinAlignedDiffsNoExpand;
|
|
4399
|
-
const joinAlignedDiffsExpand = (diffs, options) => diffs.map((diff$
|
|
4400
|
-
const line = diff$
|
|
5952
|
+
const joinAlignedDiffsExpand = (diffs, options) => diffs.map((diff$4, i, diffs$1) => {
|
|
5953
|
+
const line = diff$4[1];
|
|
4401
5954
|
const isFirstOrLast = i === 0 || i === diffs$1.length - 1;
|
|
4402
|
-
switch (diff$
|
|
5955
|
+
switch (diff$4[0]) {
|
|
4403
5956
|
case _cleanupSemantic$5.DIFF_DELETE: return printDeleteLine(line, isFirstOrLast, options);
|
|
4404
5957
|
case _cleanupSemantic$5.DIFF_INSERT: return printInsertLine(line, isFirstOrLast, options);
|
|
4405
5958
|
default: return printCommonLine(line, isFirstOrLast, options);
|
|
@@ -4479,8 +6032,8 @@ var require_diffLines = /* @__PURE__ */ require_reportManualReview.__commonJS({
|
|
|
4479
6032
|
const countChanges = (diffs) => {
|
|
4480
6033
|
let a = 0;
|
|
4481
6034
|
let b$1 = 0;
|
|
4482
|
-
diffs.forEach((diff$
|
|
4483
|
-
switch (diff$
|
|
6035
|
+
diffs.forEach((diff$4) => {
|
|
6036
|
+
switch (diff$4[0]) {
|
|
4484
6037
|
case _cleanupSemantic$4.DIFF_DELETE:
|
|
4485
6038
|
a += 1;
|
|
4486
6039
|
break;
|
|
@@ -4531,18 +6084,18 @@ var require_diffLines = /* @__PURE__ */ require_reportManualReview.__commonJS({
|
|
|
4531
6084
|
const diffs = diffLinesRaw(aLinesCompare, bLinesCompare);
|
|
4532
6085
|
let aIndex = 0;
|
|
4533
6086
|
let bIndex = 0;
|
|
4534
|
-
diffs.forEach((diff$
|
|
4535
|
-
switch (diff$
|
|
6087
|
+
diffs.forEach((diff$4) => {
|
|
6088
|
+
switch (diff$4[0]) {
|
|
4536
6089
|
case _cleanupSemantic$4.DIFF_DELETE:
|
|
4537
|
-
diff$
|
|
6090
|
+
diff$4[1] = aLinesDisplay[aIndex];
|
|
4538
6091
|
aIndex += 1;
|
|
4539
6092
|
break;
|
|
4540
6093
|
case _cleanupSemantic$4.DIFF_INSERT:
|
|
4541
|
-
diff$
|
|
6094
|
+
diff$4[1] = bLinesDisplay[bIndex];
|
|
4542
6095
|
bIndex += 1;
|
|
4543
6096
|
break;
|
|
4544
6097
|
default:
|
|
4545
|
-
diff$
|
|
6098
|
+
diff$4[1] = bLinesDisplay[bIndex];
|
|
4546
6099
|
aIndex += 1;
|
|
4547
6100
|
bIndex += 1;
|
|
4548
6101
|
}
|
|
@@ -4619,7 +6172,7 @@ var require_getAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__commo
|
|
|
4619
6172
|
* This source code is licensed under the MIT license found in the
|
|
4620
6173
|
* LICENSE file in the root directory of this source tree.
|
|
4621
6174
|
*/
|
|
4622
|
-
const concatenateRelevantDiffs = (op, diffs, changeColor) => diffs.reduce((reduced, diff$
|
|
6175
|
+
const concatenateRelevantDiffs = (op, diffs, changeColor) => diffs.reduce((reduced, diff$4) => reduced + (diff$4[0] === _cleanupSemantic$2.DIFF_EQUAL ? diff$4[1] : diff$4[0] === op && diff$4[1].length !== 0 ? changeColor(diff$4[1]) : ""), "");
|
|
4623
6176
|
var ChangeBuffer = class {
|
|
4624
6177
|
op;
|
|
4625
6178
|
line;
|
|
@@ -4641,11 +6194,11 @@ var require_getAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__commo
|
|
|
4641
6194
|
isLineEmpty() {
|
|
4642
6195
|
return this.line.length === 0;
|
|
4643
6196
|
}
|
|
4644
|
-
pushDiff(diff$
|
|
4645
|
-
this.line.push(diff$
|
|
6197
|
+
pushDiff(diff$4) {
|
|
6198
|
+
this.line.push(diff$4);
|
|
4646
6199
|
}
|
|
4647
|
-
align(diff$
|
|
4648
|
-
const string = diff$
|
|
6200
|
+
align(diff$4) {
|
|
6201
|
+
const string = diff$4[1];
|
|
4649
6202
|
if (string.includes("\n")) {
|
|
4650
6203
|
const substrings = string.split("\n");
|
|
4651
6204
|
const iLast = substrings.length - 1;
|
|
@@ -4655,7 +6208,7 @@ var require_getAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__commo
|
|
|
4655
6208
|
this.pushLine();
|
|
4656
6209
|
} else if (substring.length !== 0) this.pushSubstring(substring);
|
|
4657
6210
|
});
|
|
4658
|
-
} else this.pushDiff(diff$
|
|
6211
|
+
} else this.pushDiff(diff$4);
|
|
4659
6212
|
}
|
|
4660
6213
|
moveLinesTo(lines) {
|
|
4661
6214
|
if (!this.isLineEmpty()) this.pushLine();
|
|
@@ -4672,21 +6225,21 @@ var require_getAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__commo
|
|
|
4672
6225
|
this.insertBuffer = insertBuffer;
|
|
4673
6226
|
this.lines = [];
|
|
4674
6227
|
}
|
|
4675
|
-
pushDiffCommonLine(diff$
|
|
4676
|
-
this.lines.push(diff$
|
|
6228
|
+
pushDiffCommonLine(diff$4) {
|
|
6229
|
+
this.lines.push(diff$4);
|
|
4677
6230
|
}
|
|
4678
|
-
pushDiffChangeLines(diff$
|
|
4679
|
-
const isDiffEmpty = diff$
|
|
4680
|
-
if (!isDiffEmpty || this.deleteBuffer.isLineEmpty()) this.deleteBuffer.pushDiff(diff$
|
|
4681
|
-
if (!isDiffEmpty || this.insertBuffer.isLineEmpty()) this.insertBuffer.pushDiff(diff$
|
|
6231
|
+
pushDiffChangeLines(diff$4) {
|
|
6232
|
+
const isDiffEmpty = diff$4[1].length === 0;
|
|
6233
|
+
if (!isDiffEmpty || this.deleteBuffer.isLineEmpty()) this.deleteBuffer.pushDiff(diff$4);
|
|
6234
|
+
if (!isDiffEmpty || this.insertBuffer.isLineEmpty()) this.insertBuffer.pushDiff(diff$4);
|
|
4682
6235
|
}
|
|
4683
6236
|
flushChangeLines() {
|
|
4684
6237
|
this.deleteBuffer.moveLinesTo(this.lines);
|
|
4685
6238
|
this.insertBuffer.moveLinesTo(this.lines);
|
|
4686
6239
|
}
|
|
4687
|
-
align(diff$
|
|
4688
|
-
const op = diff$
|
|
4689
|
-
const string = diff$
|
|
6240
|
+
align(diff$4) {
|
|
6241
|
+
const op = diff$4[0];
|
|
6242
|
+
const string = diff$4[1];
|
|
4690
6243
|
if (string.includes("\n")) {
|
|
4691
6244
|
const substrings = string.split("\n");
|
|
4692
6245
|
const iLast = substrings.length - 1;
|
|
@@ -4703,7 +6256,7 @@ var require_getAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__commo
|
|
|
4703
6256
|
} else if (i < iLast) this.pushDiffCommonLine(new _cleanupSemantic$2.Diff(op, substring));
|
|
4704
6257
|
else if (substring.length !== 0) this.pushDiffChangeLines(new _cleanupSemantic$2.Diff(op, substring));
|
|
4705
6258
|
});
|
|
4706
|
-
} else this.pushDiffChangeLines(diff$
|
|
6259
|
+
} else this.pushDiffChangeLines(diff$4);
|
|
4707
6260
|
}
|
|
4708
6261
|
getLines() {
|
|
4709
6262
|
this.flushChangeLines();
|
|
@@ -4714,15 +6267,15 @@ var require_getAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__commo
|
|
|
4714
6267
|
const deleteBuffer = new ChangeBuffer(_cleanupSemantic$2.DIFF_DELETE, changeColor);
|
|
4715
6268
|
const insertBuffer = new ChangeBuffer(_cleanupSemantic$2.DIFF_INSERT, changeColor);
|
|
4716
6269
|
const commonBuffer = new CommonBuffer(deleteBuffer, insertBuffer);
|
|
4717
|
-
diffs.forEach((diff$
|
|
4718
|
-
switch (diff$
|
|
6270
|
+
diffs.forEach((diff$4) => {
|
|
6271
|
+
switch (diff$4[0]) {
|
|
4719
6272
|
case _cleanupSemantic$2.DIFF_DELETE:
|
|
4720
|
-
deleteBuffer.align(diff$
|
|
6273
|
+
deleteBuffer.align(diff$4);
|
|
4721
6274
|
break;
|
|
4722
6275
|
case _cleanupSemantic$2.DIFF_INSERT:
|
|
4723
|
-
insertBuffer.align(diff$
|
|
6276
|
+
insertBuffer.align(diff$4);
|
|
4724
6277
|
break;
|
|
4725
|
-
default: commonBuffer.align(diff$
|
|
6278
|
+
default: commonBuffer.align(diff$4);
|
|
4726
6279
|
}
|
|
4727
6280
|
});
|
|
4728
6281
|
return commonBuffer.getLines();
|
|
@@ -4753,9 +6306,9 @@ var require_printDiffs = /* @__PURE__ */ require_reportManualReview.__commonJS({
|
|
|
4753
6306
|
const hasCommonDiff = (diffs, isMultiline) => {
|
|
4754
6307
|
if (isMultiline) {
|
|
4755
6308
|
const iLast = diffs.length - 1;
|
|
4756
|
-
return diffs.some((diff$
|
|
6309
|
+
return diffs.some((diff$4, i) => diff$4[0] === _cleanupSemantic$1.DIFF_EQUAL && (i !== iLast || diff$4[1] !== "\n"));
|
|
4757
6310
|
}
|
|
4758
|
-
return diffs.some((diff$
|
|
6311
|
+
return diffs.some((diff$4) => diff$4[0] === _cleanupSemantic$1.DIFF_EQUAL);
|
|
4759
6312
|
};
|
|
4760
6313
|
const diffStringsUnified = (a, b$1, options) => {
|
|
4761
6314
|
if (a !== b$1 && a.length !== 0 && b$1.length !== 0) {
|
|
@@ -5446,29 +6999,33 @@ async function runCodemod(transformsDir) {
|
|
|
5446
6999
|
const resolvedTransformsDir = transformsDir ?? node_path.default.resolve(currentDirPath, "../dist/transforms");
|
|
5447
7000
|
console.debug(`Resolved transforms directory: ${resolvedTransformsDir}`);
|
|
5448
7001
|
await resetReportFile(reportPath);
|
|
5449
|
-
const { transformFiles } = await
|
|
7002
|
+
const { transformFiles } = await loadTransformModules_default(resolvedTransformsDir);
|
|
5450
7003
|
if (transformFiles.length === 0) throw new Error(`No transform scripts found in directory: ${resolvedTransformsDir}`);
|
|
5451
|
-
const options = await
|
|
7004
|
+
const options = await getOptions_default({
|
|
5452
7005
|
packages,
|
|
5453
7006
|
root: findProjectRoot(),
|
|
5454
7007
|
transformFiles: await Promise.all(transformFiles)
|
|
5455
7008
|
});
|
|
5456
|
-
const codemodPath = node_path.default.resolve(resolvedTransformsDir,
|
|
7009
|
+
const codemodPath = node_path.default.resolve(resolvedTransformsDir, options.transformFile, `transformer.js`);
|
|
5457
7010
|
console.debug(`Resolved codemod path: ${codemodPath}`);
|
|
5458
7011
|
options.targetPaths.map((targetPath) => {
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
7012
|
+
console.info(`\n\x1b[34m➙\x1b[0m \x1b[1mProcessing:\x1b[0m \x1b[32m${targetPath}\x1b[0m`);
|
|
7013
|
+
const isCompliant = assessPrerequisites(targetPath, codemodPath);
|
|
7014
|
+
if (isCompliant) {
|
|
7015
|
+
const args = [
|
|
7016
|
+
"-t",
|
|
7017
|
+
codemodPath,
|
|
7018
|
+
targetPath,
|
|
7019
|
+
options.isDry ? "--dry" : "",
|
|
7020
|
+
options.isPrint ? "--print" : "",
|
|
7021
|
+
options.ignorePatterns ? options.ignorePatterns.split(",").map((pattern) => `--ignore-pattern=${pattern.trim()}`).join(" ") : "",
|
|
7022
|
+
options.useGitIgnore ? "--gitignore" : ""
|
|
7023
|
+
].filter(Boolean);
|
|
7024
|
+
const command = `npx jscodeshift ${args.join(" ")}`;
|
|
7025
|
+
console.debug(`Running: ${command}`);
|
|
7026
|
+
return (0, node_child_process.execSync)(command, { stdio: "inherit" });
|
|
7027
|
+
}
|
|
7028
|
+
return void 0;
|
|
5472
7029
|
});
|
|
5473
7030
|
await summariseReportFile(reportPath);
|
|
5474
7031
|
} catch (error) {
|