@wise/wds-codemods 0.0.1-experimental-db88b03 → 0.0.1-experimental-aaa0fc3
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 +179 -1883
- package/dist/index.js.map +1 -1
- package/dist/{reportManualReview-CQm-npxR.js → reportManualReview-DXT7jYE1.js} +2 -2
- package/dist/reportManualReview-DXT7jYE1.js.map +1 -0
- package/dist/transforms/{button/transformer.js → button.js} +3 -2
- package/dist/transforms/button.js.map +1 -0
- package/package.json +2 -2
- package/dist/reportManualReview-CQm-npxR.js.map +0 -1
- package/dist/transforms/button/config.json +0 -6
- package/dist/transforms/button/transformer.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,1729 +1,88 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const require_reportManualReview = require('./reportManualReview-
|
|
2
|
+
const require_reportManualReview = require('./reportManualReview-DXT7jYE1.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"));
|
|
6
6
|
const node_url = require_reportManualReview.__toESM(require("node:url"));
|
|
7
|
-
const node_fs = require_reportManualReview.__toESM(require("node:fs"));
|
|
8
7
|
const __inquirer_prompts = require_reportManualReview.__toESM(require("@inquirer/prompts"));
|
|
8
|
+
const node_fs = require_reportManualReview.__toESM(require("node:fs"));
|
|
9
9
|
require("jscodeshift/src/testUtils");
|
|
10
10
|
|
|
11
|
-
//#region
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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"
|
|
11
|
+
//#region src/controller/helpers/getOptions.ts
|
|
12
|
+
async function getOptions(transformFiles) {
|
|
13
|
+
const args = process.argv.slice(2);
|
|
14
|
+
if (args.length > 0) {
|
|
15
|
+
const [transformFile$1, targetPath$1] = args;
|
|
16
|
+
const dry$1 = args.includes("--dry") || args.includes("--dry-run");
|
|
17
|
+
const print$1 = args.includes("--print");
|
|
18
|
+
const ignorePatternIndex = args.findIndex((arg) => arg === "--ignore-pattern");
|
|
19
|
+
let ignorePattern$1;
|
|
20
|
+
if (ignorePatternIndex !== -1 && args.length > ignorePatternIndex + 1) ignorePattern$1 = args[ignorePatternIndex + 1];
|
|
21
|
+
const gitignore$1 = args.includes("--gitignore");
|
|
22
|
+
const noGitignore = args.includes("--no-gitignore");
|
|
23
|
+
if (!transformFile$1 || !transformFiles.includes(transformFile$1)) throw new Error("Invalid transform file specified.");
|
|
24
|
+
if (!targetPath$1) throw new Error("Target path cannot be empty.");
|
|
25
|
+
const useGitignore = !!(gitignore$1 || !gitignore$1 && !noGitignore);
|
|
26
|
+
return {
|
|
27
|
+
transformFile: transformFile$1,
|
|
28
|
+
targetPath: targetPath$1,
|
|
29
|
+
dry: dry$1,
|
|
30
|
+
print: print$1,
|
|
31
|
+
ignorePattern: ignorePattern$1,
|
|
32
|
+
gitignore: useGitignore
|
|
1529
33
|
};
|
|
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
|
|
1562
|
-
//#region src/utils/getOptions.ts
|
|
1563
|
-
/**
|
|
1564
|
-
* if args are provided via CLI, log them to the console in
|
|
1565
|
-
* a formatted way matching Inquirer's style
|
|
1566
|
-
*/
|
|
1567
|
-
const logToInquirer = (label, value) => {
|
|
1568
|
-
const checkmark = "\x1B[32m✔\x1B[0m";
|
|
1569
|
-
const boldLabel = `\x1b[1m${label}\x1b[0m`;
|
|
1570
|
-
const greenValue = `\x1b[32m${value}\x1b[0m`;
|
|
1571
|
-
console.info(`${checkmark} ${boldLabel} ${greenValue}`);
|
|
1572
|
-
};
|
|
1573
|
-
/**
|
|
1574
|
-
* Lets user pick from available packages to run the codemod on
|
|
1575
|
-
*/
|
|
1576
|
-
const queryPackages = async (packages) => {
|
|
1577
|
-
const message = "Path to run codemod on:";
|
|
1578
|
-
const nonRootPackages = packages.filter((pkg$1) => pkg$1 !== ".");
|
|
1579
|
-
if (packages.length === 1 && nonRootPackages.length === 0) {
|
|
1580
|
-
logToInquirer(message, packages[0]);
|
|
1581
|
-
return packages;
|
|
1582
34
|
}
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
message: "Select packages to transform:",
|
|
1586
|
-
choices: nonRootPackages.map((file) => ({
|
|
1587
|
-
name: file,
|
|
1588
|
-
value: file,
|
|
1589
|
-
checked: true
|
|
1590
|
-
}))
|
|
1591
|
-
});
|
|
1592
|
-
};
|
|
1593
|
-
/**
|
|
1594
|
-
* Determine user choice between CLI arg and Inquirer prompt: codemod
|
|
1595
|
-
*/
|
|
1596
|
-
const determineTransformer = async ({ candidate, transformFiles }) => {
|
|
1597
|
-
const codemodMessage = "Select codemod to run:";
|
|
1598
|
-
if (candidate && transformFiles.includes(candidate)) {
|
|
1599
|
-
logToInquirer(codemodMessage, candidate);
|
|
1600
|
-
return candidate;
|
|
1601
|
-
}
|
|
1602
|
-
return (0, __inquirer_prompts.select)({
|
|
1603
|
-
message: codemodMessage,
|
|
35
|
+
const transformFile = await (0, __inquirer_prompts.select)({
|
|
36
|
+
message: "Select a codemod transform to run:",
|
|
1604
37
|
choices: transformFiles.map((file) => ({
|
|
1605
38
|
name: file,
|
|
1606
39
|
value: file
|
|
1607
40
|
}))
|
|
1608
41
|
});
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
*/
|
|
1613
|
-
const determinePaths = async ({ candidate, root, packages }) => {
|
|
1614
|
-
const targetPaths = [];
|
|
1615
|
-
if (candidate && (0, node_fs.existsSync)((0, node_path.join)(root, candidate))) {
|
|
1616
|
-
logToInquirer("Path to run codemod on", candidate);
|
|
1617
|
-
targetPaths.push(candidate);
|
|
1618
|
-
}
|
|
1619
|
-
if (!targetPaths.length) {
|
|
1620
|
-
const packagesToProcess = await queryPackages(packages);
|
|
1621
|
-
targetPaths.push(...packagesToProcess ?? []);
|
|
1622
|
-
}
|
|
1623
|
-
return targetPaths;
|
|
1624
|
-
};
|
|
1625
|
-
/**
|
|
1626
|
-
* Determine user choice between CLI arg and Inquirer prompt: dry mode
|
|
1627
|
-
*/
|
|
1628
|
-
const determineIsDryMode = async (args) => {
|
|
1629
|
-
const message = "Run in dry mode (no changes written to files)?";
|
|
1630
|
-
if (args.includes("--dry") || args.includes("--dry-run")) {
|
|
1631
|
-
logToInquirer(message, "Yes");
|
|
1632
|
-
return true;
|
|
1633
|
-
}
|
|
1634
|
-
return (0, __inquirer_prompts.confirm)({
|
|
1635
|
-
message,
|
|
1636
|
-
default: false
|
|
42
|
+
const targetPath = await (0, __inquirer_prompts.input)({
|
|
43
|
+
message: "Enter the target directory or file path to run codemod on:",
|
|
44
|
+
validate: (value) => value.trim() !== "" || "Target path cannot be empty"
|
|
1637
45
|
});
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1644
|
-
if (args.includes("--print")) {
|
|
1645
|
-
logToInquirer(message, "Yes");
|
|
1646
|
-
return true;
|
|
1647
|
-
}
|
|
1648
|
-
return (0, __inquirer_prompts.confirm)({
|
|
1649
|
-
message,
|
|
46
|
+
const dry = await (0, __inquirer_prompts.confirm)({
|
|
47
|
+
message: "Run in dry mode (no changes written to files)?",
|
|
48
|
+
default: true
|
|
49
|
+
});
|
|
50
|
+
const print = await (0, __inquirer_prompts.confirm)({
|
|
51
|
+
message: "Print transformed source to console?",
|
|
1650
52
|
default: false
|
|
1651
53
|
});
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
*/
|
|
1656
|
-
const determineIgnorePatterns = async (args) => {
|
|
1657
|
-
const message = "Enter ignore pattern(s) (comma separated) or leave empty:";
|
|
1658
|
-
const ignorePatternIndex = args.findIndex((arg) => arg === "--ignore-pattern");
|
|
1659
|
-
let ignorePattern;
|
|
1660
|
-
if (ignorePatternIndex !== -1 && args.length > ignorePatternIndex + 1) ignorePattern = args[ignorePatternIndex + 1];
|
|
1661
|
-
if (ignorePattern) {
|
|
1662
|
-
logToInquirer(message, ignorePattern);
|
|
1663
|
-
return ignorePattern;
|
|
1664
|
-
}
|
|
1665
|
-
return (0, __inquirer_prompts.input)({
|
|
1666
|
-
message,
|
|
1667
|
-
validate: () => true
|
|
54
|
+
const ignorePattern = await (0, __inquirer_prompts.input)({
|
|
55
|
+
message: "Enter ignore pattern(s) (comma separated) or leave empty:",
|
|
56
|
+
validate: (value) => true
|
|
1668
57
|
});
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
* Determine user choice between CLI arg and Inquirer prompt: gitignore
|
|
1672
|
-
*/
|
|
1673
|
-
const determineGitIgnore = async (args) => {
|
|
1674
|
-
const message = "Respect .gitignore files?";
|
|
1675
|
-
if (args.includes("--gitignore")) {
|
|
1676
|
-
logToInquirer(message, "Yes");
|
|
1677
|
-
return true;
|
|
1678
|
-
}
|
|
1679
|
-
if (args.includes("--no-gitignore")) {
|
|
1680
|
-
logToInquirer(message, "No");
|
|
1681
|
-
return false;
|
|
1682
|
-
}
|
|
1683
|
-
return (0, __inquirer_prompts.confirm)({
|
|
1684
|
-
message,
|
|
58
|
+
const gitignore = await (0, __inquirer_prompts.confirm)({
|
|
59
|
+
message: "Respect .gitignore files?",
|
|
1685
60
|
default: true
|
|
1686
61
|
});
|
|
1687
|
-
};
|
|
1688
|
-
async function getOptions({ transformFiles, packages, root }) {
|
|
1689
|
-
const args = process.argv.slice(2);
|
|
1690
|
-
const transformFile = await determineTransformer({
|
|
1691
|
-
candidate: args[0],
|
|
1692
|
-
transformFiles
|
|
1693
|
-
});
|
|
1694
|
-
const targetPaths = await determinePaths({
|
|
1695
|
-
candidate: args[1],
|
|
1696
|
-
packages,
|
|
1697
|
-
root
|
|
1698
|
-
});
|
|
1699
|
-
const isDry = await determineIsDryMode(args);
|
|
1700
|
-
const isPrint = await determineIsPrint(args);
|
|
1701
|
-
const ignorePatterns = await determineIgnorePatterns(args);
|
|
1702
|
-
const useGitIgnore = await determineGitIgnore(args);
|
|
1703
62
|
return {
|
|
1704
63
|
transformFile,
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
64
|
+
targetPath,
|
|
65
|
+
dry,
|
|
66
|
+
print,
|
|
67
|
+
ignorePattern,
|
|
68
|
+
gitignore
|
|
1710
69
|
};
|
|
1711
70
|
}
|
|
1712
71
|
var getOptions_default = getOptions;
|
|
1713
72
|
|
|
1714
73
|
//#endregion
|
|
1715
|
-
//#region src/
|
|
74
|
+
//#region src/controller/helpers/loadTransformModules.ts
|
|
1716
75
|
async function loadTransformModules(transformsDir) {
|
|
1717
76
|
let transformModules = {};
|
|
1718
|
-
const
|
|
1719
|
-
const transformFiles = await Promise.all(
|
|
1720
|
-
const transformPath = node_path.default.join(transformsDir,
|
|
77
|
+
const files = await node_fs.promises.readdir(transformsDir);
|
|
78
|
+
const transformFiles = await Promise.all(files.filter((file) => file.endsWith(".js")).map(async (file) => {
|
|
79
|
+
const transformPath = node_path.default.join(transformsDir, file);
|
|
1721
80
|
const transformModule = await import(transformPath);
|
|
1722
81
|
transformModules = {
|
|
1723
82
|
...transformModules,
|
|
1724
|
-
[
|
|
83
|
+
[file]: transformModule.default.default
|
|
1725
84
|
};
|
|
1726
|
-
return
|
|
85
|
+
return file.replace(".js", "");
|
|
1727
86
|
}));
|
|
1728
87
|
return {
|
|
1729
88
|
transformModules,
|
|
@@ -1732,52 +91,6 @@ async function loadTransformModules(transformsDir) {
|
|
|
1732
91
|
}
|
|
1733
92
|
var loadTransformModules_default = loadTransformModules;
|
|
1734
93
|
|
|
1735
|
-
//#endregion
|
|
1736
|
-
//#region src/utils/repository.ts
|
|
1737
|
-
/**
|
|
1738
|
-
* Finds the root of the project by looking for the `.git` directory.
|
|
1739
|
-
*/
|
|
1740
|
-
function findProjectRoot() {
|
|
1741
|
-
try {
|
|
1742
|
-
const gitRoot = (0, node_child_process.execSync)("git rev-parse --show-toplevel", {
|
|
1743
|
-
cwd: process.cwd(),
|
|
1744
|
-
encoding: "utf8",
|
|
1745
|
-
stdio: [
|
|
1746
|
-
"ignore",
|
|
1747
|
-
"pipe",
|
|
1748
|
-
"ignore"
|
|
1749
|
-
]
|
|
1750
|
-
}).trim();
|
|
1751
|
-
return gitRoot && (0, node_fs.existsSync)(gitRoot) ? gitRoot : "";
|
|
1752
|
-
} catch {
|
|
1753
|
-
return "";
|
|
1754
|
-
}
|
|
1755
|
-
}
|
|
1756
|
-
/**
|
|
1757
|
-
* Quick and dirty way of determining package roots based on
|
|
1758
|
-
* the presence of `package.json` files and them optimistically
|
|
1759
|
-
* containing a `@transferwise/components` string.
|
|
1760
|
-
* */
|
|
1761
|
-
function findPackages() {
|
|
1762
|
-
try {
|
|
1763
|
-
const packages = (0, node_child_process.execSync)([
|
|
1764
|
-
"find ./",
|
|
1765
|
-
"-type f",
|
|
1766
|
-
"-name \"package.json\"",
|
|
1767
|
-
"-not -path \"*/node_modules/*\"",
|
|
1768
|
-
"|",
|
|
1769
|
-
"xargs grep -l \"@transferwise/components\""
|
|
1770
|
-
].join(" "), {
|
|
1771
|
-
cwd: findProjectRoot(),
|
|
1772
|
-
encoding: "utf8"
|
|
1773
|
-
}).trim().split("\n").map(node_path.default.dirname);
|
|
1774
|
-
if (packages.length === 0) throw new Error();
|
|
1775
|
-
return packages;
|
|
1776
|
-
} catch {
|
|
1777
|
-
throw new Error("No suitable package roots found in the repository.");
|
|
1778
|
-
}
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
94
|
//#endregion
|
|
1782
95
|
//#region node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js
|
|
1783
96
|
var require_color_name = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js": ((exports, module) => {
|
|
@@ -2647,15 +960,15 @@ var require_conversions = /* @__PURE__ */ require_reportManualReview.__commonJS(
|
|
|
2647
960
|
const g$1 = rgb[1] / 255;
|
|
2648
961
|
const b$1 = rgb[2] / 255;
|
|
2649
962
|
const v$1 = Math.max(r, g$1, b$1);
|
|
2650
|
-
const diff$
|
|
963
|
+
const diff$2 = v$1 - Math.min(r, g$1, b$1);
|
|
2651
964
|
const diffc = function(c$1) {
|
|
2652
|
-
return (v$1 - c$1) / 6 / diff$
|
|
965
|
+
return (v$1 - c$1) / 6 / diff$2 + 1 / 2;
|
|
2653
966
|
};
|
|
2654
|
-
if (diff$
|
|
967
|
+
if (diff$2 === 0) {
|
|
2655
968
|
h$1 = 0;
|
|
2656
969
|
s = 0;
|
|
2657
970
|
} else {
|
|
2658
|
-
s = diff$
|
|
971
|
+
s = diff$2 / v$1;
|
|
2659
972
|
rdif = diffc(r);
|
|
2660
973
|
gdif = diffc(g$1);
|
|
2661
974
|
bdif = diffc(b$1);
|
|
@@ -2816,12 +1129,12 @@ var require_conversions = /* @__PURE__ */ require_reportManualReview.__commonJS(
|
|
|
2816
1129
|
const f$1 = h$1 - Math.floor(h$1);
|
|
2817
1130
|
const p$1 = 255 * v$1 * (1 - s);
|
|
2818
1131
|
const q$1 = 255 * v$1 * (1 - s * f$1);
|
|
2819
|
-
const t$
|
|
1132
|
+
const t$1 = 255 * v$1 * (1 - s * (1 - f$1));
|
|
2820
1133
|
v$1 *= 255;
|
|
2821
1134
|
switch (hi) {
|
|
2822
1135
|
case 0: return [
|
|
2823
1136
|
v$1,
|
|
2824
|
-
t$
|
|
1137
|
+
t$1,
|
|
2825
1138
|
p$1
|
|
2826
1139
|
];
|
|
2827
1140
|
case 1: return [
|
|
@@ -2832,7 +1145,7 @@ var require_conversions = /* @__PURE__ */ require_reportManualReview.__commonJS(
|
|
|
2832
1145
|
case 2: return [
|
|
2833
1146
|
p$1,
|
|
2834
1147
|
v$1,
|
|
2835
|
-
t$
|
|
1148
|
+
t$1
|
|
2836
1149
|
];
|
|
2837
1150
|
case 3: return [
|
|
2838
1151
|
p$1,
|
|
@@ -2840,7 +1153,7 @@ var require_conversions = /* @__PURE__ */ require_reportManualReview.__commonJS(
|
|
|
2840
1153
|
v$1
|
|
2841
1154
|
];
|
|
2842
1155
|
case 4: return [
|
|
2843
|
-
t$
|
|
1156
|
+
t$1,
|
|
2844
1157
|
p$1,
|
|
2845
1158
|
v$1
|
|
2846
1159
|
];
|
|
@@ -3379,15 +1692,15 @@ var require_route = /* @__PURE__ */ require_reportManualReview.__commonJS({ "nod
|
|
|
3379
1692
|
};
|
|
3380
1693
|
}
|
|
3381
1694
|
function wrapConversion(toModel, graph) {
|
|
3382
|
-
const path$
|
|
1695
|
+
const path$4 = [graph[toModel].parent, toModel];
|
|
3383
1696
|
let fn = conversions$1[graph[toModel].parent][toModel];
|
|
3384
1697
|
let cur = graph[toModel].parent;
|
|
3385
1698
|
while (graph[cur].parent) {
|
|
3386
|
-
path$
|
|
1699
|
+
path$4.unshift(graph[cur].parent);
|
|
3387
1700
|
fn = link(conversions$1[graph[cur].parent][cur], fn);
|
|
3388
1701
|
cur = graph[cur].parent;
|
|
3389
1702
|
}
|
|
3390
|
-
fn.conversion = path$
|
|
1703
|
+
fn.conversion = path$4;
|
|
3391
1704
|
return fn;
|
|
3392
1705
|
}
|
|
3393
1706
|
module.exports = function(fromModel) {
|
|
@@ -4783,8 +3096,8 @@ var require_ReactElement = /* @__PURE__ */ require_reportManualReview.__commonJS
|
|
|
4783
3096
|
function _interopRequireWildcard(obj, nodeInterop) {
|
|
4784
3097
|
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
4785
3098
|
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
|
|
4786
|
-
var cache
|
|
4787
|
-
if (cache
|
|
3099
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
3100
|
+
if (cache && cache.has(obj)) return cache.get(obj);
|
|
4788
3101
|
var newObj = {};
|
|
4789
3102
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
4790
3103
|
for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -4793,7 +3106,7 @@ var require_ReactElement = /* @__PURE__ */ require_reportManualReview.__commonJS
|
|
|
4793
3106
|
else newObj[key] = obj[key];
|
|
4794
3107
|
}
|
|
4795
3108
|
newObj.default = obj;
|
|
4796
|
-
if (cache
|
|
3109
|
+
if (cache) cache.set(obj, newObj);
|
|
4797
3110
|
return newObj;
|
|
4798
3111
|
}
|
|
4799
3112
|
/**
|
|
@@ -5949,10 +4262,10 @@ var require_joinAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__comm
|
|
|
5949
4262
|
return lines.join("\n");
|
|
5950
4263
|
};
|
|
5951
4264
|
exports.joinAlignedDiffsNoExpand = joinAlignedDiffsNoExpand;
|
|
5952
|
-
const joinAlignedDiffsExpand = (diffs, options) => diffs.map((diff$
|
|
5953
|
-
const line = diff$
|
|
4265
|
+
const joinAlignedDiffsExpand = (diffs, options) => diffs.map((diff$2, i, diffs$1) => {
|
|
4266
|
+
const line = diff$2[1];
|
|
5954
4267
|
const isFirstOrLast = i === 0 || i === diffs$1.length - 1;
|
|
5955
|
-
switch (diff$
|
|
4268
|
+
switch (diff$2[0]) {
|
|
5956
4269
|
case _cleanupSemantic$5.DIFF_DELETE: return printDeleteLine(line, isFirstOrLast, options);
|
|
5957
4270
|
case _cleanupSemantic$5.DIFF_INSERT: return printInsertLine(line, isFirstOrLast, options);
|
|
5958
4271
|
default: return printCommonLine(line, isFirstOrLast, options);
|
|
@@ -6032,8 +4345,8 @@ var require_diffLines = /* @__PURE__ */ require_reportManualReview.__commonJS({
|
|
|
6032
4345
|
const countChanges = (diffs) => {
|
|
6033
4346
|
let a = 0;
|
|
6034
4347
|
let b$1 = 0;
|
|
6035
|
-
diffs.forEach((diff$
|
|
6036
|
-
switch (diff$
|
|
4348
|
+
diffs.forEach((diff$2) => {
|
|
4349
|
+
switch (diff$2[0]) {
|
|
6037
4350
|
case _cleanupSemantic$4.DIFF_DELETE:
|
|
6038
4351
|
a += 1;
|
|
6039
4352
|
break;
|
|
@@ -6084,18 +4397,18 @@ var require_diffLines = /* @__PURE__ */ require_reportManualReview.__commonJS({
|
|
|
6084
4397
|
const diffs = diffLinesRaw(aLinesCompare, bLinesCompare);
|
|
6085
4398
|
let aIndex = 0;
|
|
6086
4399
|
let bIndex = 0;
|
|
6087
|
-
diffs.forEach((diff$
|
|
6088
|
-
switch (diff$
|
|
4400
|
+
diffs.forEach((diff$2) => {
|
|
4401
|
+
switch (diff$2[0]) {
|
|
6089
4402
|
case _cleanupSemantic$4.DIFF_DELETE:
|
|
6090
|
-
diff$
|
|
4403
|
+
diff$2[1] = aLinesDisplay[aIndex];
|
|
6091
4404
|
aIndex += 1;
|
|
6092
4405
|
break;
|
|
6093
4406
|
case _cleanupSemantic$4.DIFF_INSERT:
|
|
6094
|
-
diff$
|
|
4407
|
+
diff$2[1] = bLinesDisplay[bIndex];
|
|
6095
4408
|
bIndex += 1;
|
|
6096
4409
|
break;
|
|
6097
4410
|
default:
|
|
6098
|
-
diff$
|
|
4411
|
+
diff$2[1] = bLinesDisplay[bIndex];
|
|
6099
4412
|
aIndex += 1;
|
|
6100
4413
|
bIndex += 1;
|
|
6101
4414
|
}
|
|
@@ -6172,7 +4485,7 @@ var require_getAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__commo
|
|
|
6172
4485
|
* This source code is licensed under the MIT license found in the
|
|
6173
4486
|
* LICENSE file in the root directory of this source tree.
|
|
6174
4487
|
*/
|
|
6175
|
-
const concatenateRelevantDiffs = (op, diffs, changeColor) => diffs.reduce((reduced, diff$
|
|
4488
|
+
const concatenateRelevantDiffs = (op, diffs, changeColor) => diffs.reduce((reduced, diff$2) => reduced + (diff$2[0] === _cleanupSemantic$2.DIFF_EQUAL ? diff$2[1] : diff$2[0] === op && diff$2[1].length !== 0 ? changeColor(diff$2[1]) : ""), "");
|
|
6176
4489
|
var ChangeBuffer = class {
|
|
6177
4490
|
op;
|
|
6178
4491
|
line;
|
|
@@ -6194,11 +4507,11 @@ var require_getAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__commo
|
|
|
6194
4507
|
isLineEmpty() {
|
|
6195
4508
|
return this.line.length === 0;
|
|
6196
4509
|
}
|
|
6197
|
-
pushDiff(diff$
|
|
6198
|
-
this.line.push(diff$
|
|
4510
|
+
pushDiff(diff$2) {
|
|
4511
|
+
this.line.push(diff$2);
|
|
6199
4512
|
}
|
|
6200
|
-
align(diff$
|
|
6201
|
-
const string = diff$
|
|
4513
|
+
align(diff$2) {
|
|
4514
|
+
const string = diff$2[1];
|
|
6202
4515
|
if (string.includes("\n")) {
|
|
6203
4516
|
const substrings = string.split("\n");
|
|
6204
4517
|
const iLast = substrings.length - 1;
|
|
@@ -6208,7 +4521,7 @@ var require_getAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__commo
|
|
|
6208
4521
|
this.pushLine();
|
|
6209
4522
|
} else if (substring.length !== 0) this.pushSubstring(substring);
|
|
6210
4523
|
});
|
|
6211
|
-
} else this.pushDiff(diff$
|
|
4524
|
+
} else this.pushDiff(diff$2);
|
|
6212
4525
|
}
|
|
6213
4526
|
moveLinesTo(lines) {
|
|
6214
4527
|
if (!this.isLineEmpty()) this.pushLine();
|
|
@@ -6225,21 +4538,21 @@ var require_getAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__commo
|
|
|
6225
4538
|
this.insertBuffer = insertBuffer;
|
|
6226
4539
|
this.lines = [];
|
|
6227
4540
|
}
|
|
6228
|
-
pushDiffCommonLine(diff$
|
|
6229
|
-
this.lines.push(diff$
|
|
4541
|
+
pushDiffCommonLine(diff$2) {
|
|
4542
|
+
this.lines.push(diff$2);
|
|
6230
4543
|
}
|
|
6231
|
-
pushDiffChangeLines(diff$
|
|
6232
|
-
const isDiffEmpty = diff$
|
|
6233
|
-
if (!isDiffEmpty || this.deleteBuffer.isLineEmpty()) this.deleteBuffer.pushDiff(diff$
|
|
6234
|
-
if (!isDiffEmpty || this.insertBuffer.isLineEmpty()) this.insertBuffer.pushDiff(diff$
|
|
4544
|
+
pushDiffChangeLines(diff$2) {
|
|
4545
|
+
const isDiffEmpty = diff$2[1].length === 0;
|
|
4546
|
+
if (!isDiffEmpty || this.deleteBuffer.isLineEmpty()) this.deleteBuffer.pushDiff(diff$2);
|
|
4547
|
+
if (!isDiffEmpty || this.insertBuffer.isLineEmpty()) this.insertBuffer.pushDiff(diff$2);
|
|
6235
4548
|
}
|
|
6236
4549
|
flushChangeLines() {
|
|
6237
4550
|
this.deleteBuffer.moveLinesTo(this.lines);
|
|
6238
4551
|
this.insertBuffer.moveLinesTo(this.lines);
|
|
6239
4552
|
}
|
|
6240
|
-
align(diff$
|
|
6241
|
-
const op = diff$
|
|
6242
|
-
const string = diff$
|
|
4553
|
+
align(diff$2) {
|
|
4554
|
+
const op = diff$2[0];
|
|
4555
|
+
const string = diff$2[1];
|
|
6243
4556
|
if (string.includes("\n")) {
|
|
6244
4557
|
const substrings = string.split("\n");
|
|
6245
4558
|
const iLast = substrings.length - 1;
|
|
@@ -6256,7 +4569,7 @@ var require_getAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__commo
|
|
|
6256
4569
|
} else if (i < iLast) this.pushDiffCommonLine(new _cleanupSemantic$2.Diff(op, substring));
|
|
6257
4570
|
else if (substring.length !== 0) this.pushDiffChangeLines(new _cleanupSemantic$2.Diff(op, substring));
|
|
6258
4571
|
});
|
|
6259
|
-
} else this.pushDiffChangeLines(diff$
|
|
4572
|
+
} else this.pushDiffChangeLines(diff$2);
|
|
6260
4573
|
}
|
|
6261
4574
|
getLines() {
|
|
6262
4575
|
this.flushChangeLines();
|
|
@@ -6267,15 +4580,15 @@ var require_getAlignedDiffs = /* @__PURE__ */ require_reportManualReview.__commo
|
|
|
6267
4580
|
const deleteBuffer = new ChangeBuffer(_cleanupSemantic$2.DIFF_DELETE, changeColor);
|
|
6268
4581
|
const insertBuffer = new ChangeBuffer(_cleanupSemantic$2.DIFF_INSERT, changeColor);
|
|
6269
4582
|
const commonBuffer = new CommonBuffer(deleteBuffer, insertBuffer);
|
|
6270
|
-
diffs.forEach((diff$
|
|
6271
|
-
switch (diff$
|
|
4583
|
+
diffs.forEach((diff$2) => {
|
|
4584
|
+
switch (diff$2[0]) {
|
|
6272
4585
|
case _cleanupSemantic$2.DIFF_DELETE:
|
|
6273
|
-
deleteBuffer.align(diff$
|
|
4586
|
+
deleteBuffer.align(diff$2);
|
|
6274
4587
|
break;
|
|
6275
4588
|
case _cleanupSemantic$2.DIFF_INSERT:
|
|
6276
|
-
insertBuffer.align(diff$
|
|
4589
|
+
insertBuffer.align(diff$2);
|
|
6277
4590
|
break;
|
|
6278
|
-
default: commonBuffer.align(diff$
|
|
4591
|
+
default: commonBuffer.align(diff$2);
|
|
6279
4592
|
}
|
|
6280
4593
|
});
|
|
6281
4594
|
return commonBuffer.getLines();
|
|
@@ -6306,9 +4619,9 @@ var require_printDiffs = /* @__PURE__ */ require_reportManualReview.__commonJS({
|
|
|
6306
4619
|
const hasCommonDiff = (diffs, isMultiline) => {
|
|
6307
4620
|
if (isMultiline) {
|
|
6308
4621
|
const iLast = diffs.length - 1;
|
|
6309
|
-
return diffs.some((diff$
|
|
4622
|
+
return diffs.some((diff$2, i) => diff$2[0] === _cleanupSemantic$1.DIFF_EQUAL && (i !== iLast || diff$2[1] !== "\n"));
|
|
6310
4623
|
}
|
|
6311
|
-
return diffs.some((diff$
|
|
4624
|
+
return diffs.some((diff$2) => diff$2[0] === _cleanupSemantic$1.DIFF_EQUAL);
|
|
6312
4625
|
};
|
|
6313
4626
|
const diffStringsUnified = (a, b$1, options) => {
|
|
6314
4627
|
if (a !== b$1 && a.length !== 0 && b$1.length !== 0) {
|
|
@@ -6518,11 +4831,11 @@ var require_opts_arg = /* @__PURE__ */ require_reportManualReview.__commonJS({ "
|
|
|
6518
4831
|
const resolved = opts;
|
|
6519
4832
|
const optsFs = opts.fs || {};
|
|
6520
4833
|
opts.mkdir = opts.mkdir || optsFs.mkdir || fs_1$1.mkdir;
|
|
6521
|
-
opts.mkdirAsync = opts.mkdirAsync ? opts.mkdirAsync : async (path$
|
|
6522
|
-
return new Promise((res, rej) => resolved.mkdir(path$
|
|
4834
|
+
opts.mkdirAsync = opts.mkdirAsync ? opts.mkdirAsync : async (path$4, options) => {
|
|
4835
|
+
return new Promise((res, rej) => resolved.mkdir(path$4, options, (er, made) => er ? rej(er) : res(made)));
|
|
6523
4836
|
};
|
|
6524
4837
|
opts.stat = opts.stat || optsFs.stat || fs_1$1.stat;
|
|
6525
|
-
opts.statAsync = opts.statAsync ? opts.statAsync : async (path$
|
|
4838
|
+
opts.statAsync = opts.statAsync ? opts.statAsync : async (path$4) => new Promise((res, rej) => resolved.stat(path$4, (err, stats) => err ? rej(err) : res(stats)));
|
|
6526
4839
|
opts.statSync = opts.statSync || optsFs.statSync || fs_1$1.statSync;
|
|
6527
4840
|
opts.mkdirSync = opts.mkdirSync || optsFs.mkdirSync || fs_1$1.mkdirSync;
|
|
6528
4841
|
return resolved;
|
|
@@ -6537,47 +4850,47 @@ var require_mkdirp_manual = /* @__PURE__ */ require_reportManualReview.__commonJ
|
|
|
6537
4850
|
exports.mkdirpManual = exports.mkdirpManualSync = void 0;
|
|
6538
4851
|
const path_1$3 = require("node:path");
|
|
6539
4852
|
const opts_arg_js_1$3 = require_opts_arg();
|
|
6540
|
-
const mkdirpManualSync = (path$
|
|
6541
|
-
const parent = (0, path_1$3.dirname)(path$
|
|
4853
|
+
const mkdirpManualSync = (path$4, options, made) => {
|
|
4854
|
+
const parent = (0, path_1$3.dirname)(path$4);
|
|
6542
4855
|
const opts = {
|
|
6543
4856
|
...(0, opts_arg_js_1$3.optsArg)(options),
|
|
6544
4857
|
recursive: false
|
|
6545
4858
|
};
|
|
6546
|
-
if (parent === path$
|
|
6547
|
-
return opts.mkdirSync(path$
|
|
4859
|
+
if (parent === path$4) try {
|
|
4860
|
+
return opts.mkdirSync(path$4, opts);
|
|
6548
4861
|
} catch (er) {
|
|
6549
4862
|
const fer = er;
|
|
6550
4863
|
if (fer && fer.code !== "EISDIR") throw er;
|
|
6551
4864
|
return;
|
|
6552
4865
|
}
|
|
6553
4866
|
try {
|
|
6554
|
-
opts.mkdirSync(path$
|
|
6555
|
-
return made || path$
|
|
4867
|
+
opts.mkdirSync(path$4, opts);
|
|
4868
|
+
return made || path$4;
|
|
6556
4869
|
} catch (er) {
|
|
6557
4870
|
const fer = er;
|
|
6558
|
-
if (fer && fer.code === "ENOENT") return (0, exports.mkdirpManualSync)(path$
|
|
4871
|
+
if (fer && fer.code === "ENOENT") return (0, exports.mkdirpManualSync)(path$4, opts, (0, exports.mkdirpManualSync)(parent, opts, made));
|
|
6559
4872
|
if (fer && fer.code !== "EEXIST" && fer && fer.code !== "EROFS") throw er;
|
|
6560
4873
|
try {
|
|
6561
|
-
if (!opts.statSync(path$
|
|
4874
|
+
if (!opts.statSync(path$4).isDirectory()) throw er;
|
|
6562
4875
|
} catch (_) {
|
|
6563
4876
|
throw er;
|
|
6564
4877
|
}
|
|
6565
4878
|
}
|
|
6566
4879
|
};
|
|
6567
4880
|
exports.mkdirpManualSync = mkdirpManualSync;
|
|
6568
|
-
exports.mkdirpManual = Object.assign(async (path$
|
|
4881
|
+
exports.mkdirpManual = Object.assign(async (path$4, options, made) => {
|
|
6569
4882
|
const opts = (0, opts_arg_js_1$3.optsArg)(options);
|
|
6570
4883
|
opts.recursive = false;
|
|
6571
|
-
const parent = (0, path_1$3.dirname)(path$
|
|
6572
|
-
if (parent === path$
|
|
4884
|
+
const parent = (0, path_1$3.dirname)(path$4);
|
|
4885
|
+
if (parent === path$4) return opts.mkdirAsync(path$4, opts).catch((er) => {
|
|
6573
4886
|
const fer = er;
|
|
6574
4887
|
if (fer && fer.code !== "EISDIR") throw er;
|
|
6575
4888
|
});
|
|
6576
|
-
return opts.mkdirAsync(path$
|
|
4889
|
+
return opts.mkdirAsync(path$4, opts).then(() => made || path$4, async (er) => {
|
|
6577
4890
|
const fer = er;
|
|
6578
|
-
if (fer && fer.code === "ENOENT") return (0, exports.mkdirpManual)(parent, opts).then((made$1) => (0, exports.mkdirpManual)(path$
|
|
4891
|
+
if (fer && fer.code === "ENOENT") return (0, exports.mkdirpManual)(parent, opts).then((made$1) => (0, exports.mkdirpManual)(path$4, opts, made$1));
|
|
6579
4892
|
if (fer && fer.code !== "EEXIST" && fer.code !== "EROFS") throw er;
|
|
6580
|
-
return opts.statAsync(path$
|
|
4893
|
+
return opts.statAsync(path$4).then((st) => {
|
|
6581
4894
|
if (st.isDirectory()) return made;
|
|
6582
4895
|
else throw er;
|
|
6583
4896
|
}, () => {
|
|
@@ -6593,18 +4906,18 @@ var require_find_made = /* @__PURE__ */ require_reportManualReview.__commonJS({
|
|
|
6593
4906
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6594
4907
|
exports.findMadeSync = exports.findMade = void 0;
|
|
6595
4908
|
const path_1$2 = require("node:path");
|
|
6596
|
-
const findMade = async (opts, parent, path$
|
|
6597
|
-
if (path$
|
|
6598
|
-
return opts.statAsync(parent).then((st) => st.isDirectory() ? path$
|
|
4909
|
+
const findMade = async (opts, parent, path$4) => {
|
|
4910
|
+
if (path$4 === parent) return;
|
|
4911
|
+
return opts.statAsync(parent).then((st) => st.isDirectory() ? path$4 : void 0, (er) => {
|
|
6599
4912
|
const fer = er;
|
|
6600
4913
|
return fer && fer.code === "ENOENT" ? (0, exports.findMade)(opts, (0, path_1$2.dirname)(parent), parent) : void 0;
|
|
6601
4914
|
});
|
|
6602
4915
|
};
|
|
6603
4916
|
exports.findMade = findMade;
|
|
6604
|
-
const findMadeSync = (opts, parent, path$
|
|
6605
|
-
if (path$
|
|
4917
|
+
const findMadeSync = (opts, parent, path$4) => {
|
|
4918
|
+
if (path$4 === parent) return void 0;
|
|
6606
4919
|
try {
|
|
6607
|
-
return opts.statSync(parent).isDirectory() ? path$
|
|
4920
|
+
return opts.statSync(parent).isDirectory() ? path$4 : void 0;
|
|
6608
4921
|
} catch (er) {
|
|
6609
4922
|
const fer = er;
|
|
6610
4923
|
return fer && fer.code === "ENOENT" ? (0, exports.findMadeSync)(opts, (0, path_1$2.dirname)(parent), parent) : void 0;
|
|
@@ -6622,32 +4935,32 @@ var require_mkdirp_native = /* @__PURE__ */ require_reportManualReview.__commonJ
|
|
|
6622
4935
|
const find_made_js_1 = require_find_made();
|
|
6623
4936
|
const mkdirp_manual_js_1$1 = require_mkdirp_manual();
|
|
6624
4937
|
const opts_arg_js_1$2 = require_opts_arg();
|
|
6625
|
-
const mkdirpNativeSync = (path$
|
|
4938
|
+
const mkdirpNativeSync = (path$4, options) => {
|
|
6626
4939
|
const opts = (0, opts_arg_js_1$2.optsArg)(options);
|
|
6627
4940
|
opts.recursive = true;
|
|
6628
|
-
const parent = (0, path_1$1.dirname)(path$
|
|
6629
|
-
if (parent === path$
|
|
6630
|
-
const made = (0, find_made_js_1.findMadeSync)(opts, path$
|
|
4941
|
+
const parent = (0, path_1$1.dirname)(path$4);
|
|
4942
|
+
if (parent === path$4) return opts.mkdirSync(path$4, opts);
|
|
4943
|
+
const made = (0, find_made_js_1.findMadeSync)(opts, path$4);
|
|
6631
4944
|
try {
|
|
6632
|
-
opts.mkdirSync(path$
|
|
4945
|
+
opts.mkdirSync(path$4, opts);
|
|
6633
4946
|
return made;
|
|
6634
4947
|
} catch (er) {
|
|
6635
4948
|
const fer = er;
|
|
6636
|
-
if (fer && fer.code === "ENOENT") return (0, mkdirp_manual_js_1$1.mkdirpManualSync)(path$
|
|
4949
|
+
if (fer && fer.code === "ENOENT") return (0, mkdirp_manual_js_1$1.mkdirpManualSync)(path$4, opts);
|
|
6637
4950
|
else throw er;
|
|
6638
4951
|
}
|
|
6639
4952
|
};
|
|
6640
4953
|
exports.mkdirpNativeSync = mkdirpNativeSync;
|
|
6641
|
-
exports.mkdirpNative = Object.assign(async (path$
|
|
4954
|
+
exports.mkdirpNative = Object.assign(async (path$4, options) => {
|
|
6642
4955
|
const opts = {
|
|
6643
4956
|
...(0, opts_arg_js_1$2.optsArg)(options),
|
|
6644
4957
|
recursive: true
|
|
6645
4958
|
};
|
|
6646
|
-
const parent = (0, path_1$1.dirname)(path$
|
|
6647
|
-
if (parent === path$
|
|
6648
|
-
return (0, find_made_js_1.findMade)(opts, path$
|
|
4959
|
+
const parent = (0, path_1$1.dirname)(path$4);
|
|
4960
|
+
if (parent === path$4) return await opts.mkdirAsync(path$4, opts);
|
|
4961
|
+
return (0, find_made_js_1.findMade)(opts, path$4).then((made) => opts.mkdirAsync(path$4, opts).then((m$1) => made || m$1).catch((er) => {
|
|
6649
4962
|
const fer = er;
|
|
6650
|
-
if (fer && fer.code === "ENOENT") return (0, mkdirp_manual_js_1$1.mkdirpManual)(path$
|
|
4963
|
+
if (fer && fer.code === "ENOENT") return (0, mkdirp_manual_js_1$1.mkdirpManual)(path$4, opts);
|
|
6651
4964
|
else throw er;
|
|
6652
4965
|
}));
|
|
6653
4966
|
}, { sync: exports.mkdirpNativeSync });
|
|
@@ -6660,21 +4973,21 @@ var require_path_arg = /* @__PURE__ */ require_reportManualReview.__commonJS({ "
|
|
|
6660
4973
|
exports.pathArg = void 0;
|
|
6661
4974
|
const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
|
|
6662
4975
|
const path_1 = require("node:path");
|
|
6663
|
-
const pathArg = (path$
|
|
6664
|
-
if (/\0/.test(path$
|
|
6665
|
-
path: path$
|
|
4976
|
+
const pathArg = (path$4) => {
|
|
4977
|
+
if (/\0/.test(path$4)) throw Object.assign(/* @__PURE__ */ new TypeError("path must be a string without null bytes"), {
|
|
4978
|
+
path: path$4,
|
|
6666
4979
|
code: "ERR_INVALID_ARG_VALUE"
|
|
6667
4980
|
});
|
|
6668
|
-
path$
|
|
4981
|
+
path$4 = (0, path_1.resolve)(path$4);
|
|
6669
4982
|
if (platform === "win32") {
|
|
6670
4983
|
const badWinChars = /[*|"<>?:]/;
|
|
6671
|
-
const { root } = (0, path_1.parse)(path$
|
|
6672
|
-
if (badWinChars.test(path$
|
|
6673
|
-
path: path$
|
|
4984
|
+
const { root } = (0, path_1.parse)(path$4);
|
|
4985
|
+
if (badWinChars.test(path$4.substring(root.length))) throw Object.assign(/* @__PURE__ */ new Error("Illegal characters in path."), {
|
|
4986
|
+
path: path$4,
|
|
6674
4987
|
code: "EINVAL"
|
|
6675
4988
|
});
|
|
6676
4989
|
}
|
|
6677
|
-
return path$
|
|
4990
|
+
return path$4;
|
|
6678
4991
|
};
|
|
6679
4992
|
exports.pathArg = pathArg;
|
|
6680
4993
|
}) });
|
|
@@ -6744,10 +5057,10 @@ var require_src = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_
|
|
|
6744
5057
|
}
|
|
6745
5058
|
});
|
|
6746
5059
|
/* c8 ignore stop */
|
|
6747
|
-
const mkdirpSync = (path$
|
|
6748
|
-
path$
|
|
5060
|
+
const mkdirpSync = (path$4, opts) => {
|
|
5061
|
+
path$4 = (0, path_arg_js_1.pathArg)(path$4);
|
|
6749
5062
|
const resolved = (0, opts_arg_js_1.optsArg)(opts);
|
|
6750
|
-
return (0, use_native_js_1.useNativeSync)(resolved) ? (0, mkdirp_native_js_1.mkdirpNativeSync)(path$
|
|
5063
|
+
return (0, use_native_js_1.useNativeSync)(resolved) ? (0, mkdirp_native_js_1.mkdirpNativeSync)(path$4, resolved) : (0, mkdirp_manual_js_1.mkdirpManualSync)(path$4, resolved);
|
|
6751
5064
|
};
|
|
6752
5065
|
exports.mkdirpSync = mkdirpSync;
|
|
6753
5066
|
exports.sync = exports.mkdirpSync;
|
|
@@ -6755,10 +5068,10 @@ var require_src = /* @__PURE__ */ require_reportManualReview.__commonJS({ "node_
|
|
|
6755
5068
|
exports.manualSync = mkdirp_manual_js_1.mkdirpManualSync;
|
|
6756
5069
|
exports.native = mkdirp_native_js_1.mkdirpNative;
|
|
6757
5070
|
exports.nativeSync = mkdirp_native_js_1.mkdirpNativeSync;
|
|
6758
|
-
exports.mkdirp = Object.assign(async (path$
|
|
6759
|
-
path$
|
|
5071
|
+
exports.mkdirp = Object.assign(async (path$4, opts) => {
|
|
5072
|
+
path$4 = (0, path_arg_js_1.pathArg)(path$4);
|
|
6760
5073
|
const resolved = (0, opts_arg_js_1.optsArg)(opts);
|
|
6761
|
-
return (0, use_native_js_1.useNative)(resolved) ? (0, mkdirp_native_js_1.mkdirpNative)(path$
|
|
5074
|
+
return (0, use_native_js_1.useNative)(resolved) ? (0, mkdirp_native_js_1.mkdirpNative)(path$4, resolved) : (0, mkdirp_manual_js_1.mkdirpManual)(path$4, resolved);
|
|
6762
5075
|
}, {
|
|
6763
5076
|
mkdirpSync: exports.mkdirpSync,
|
|
6764
5077
|
mkdirpNative: mkdirp_native_js_1.mkdirpNative,
|
|
@@ -6965,69 +5278,52 @@ This is likely because this test is run in a ${chalk.blue("continuous integratio
|
|
|
6965
5278
|
}) });
|
|
6966
5279
|
|
|
6967
5280
|
//#endregion
|
|
6968
|
-
//#region src/
|
|
5281
|
+
//#region src/controller/helpers/snapshotOrchestrator.ts
|
|
6969
5282
|
var import_jest_file_snapshot = /* @__PURE__ */ require_reportManualReview.__toESM(require_jest_file_snapshot());
|
|
6970
5283
|
expect.extend({ toMatchFile: import_jest_file_snapshot.toMatchFile });
|
|
6971
5284
|
|
|
6972
5285
|
//#endregion
|
|
6973
|
-
//#region src/
|
|
5286
|
+
//#region src/controller/index.ts
|
|
6974
5287
|
const currentFilePath = (0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href);
|
|
6975
5288
|
const currentDirPath = node_path.default.dirname(currentFilePath);
|
|
6976
|
-
const resetReportFile = async (reportPath) => {
|
|
6977
|
-
try {
|
|
6978
|
-
await node_fs_promises.default.access(reportPath);
|
|
6979
|
-
await node_fs_promises.default.rm(reportPath);
|
|
6980
|
-
console.debug(`Removed existing report file: ${reportPath}`);
|
|
6981
|
-
} catch {
|
|
6982
|
-
console.debug(`No existing report file to remove: ${reportPath}`);
|
|
6983
|
-
}
|
|
6984
|
-
};
|
|
6985
|
-
const summariseReportFile = async (reportPath) => {
|
|
6986
|
-
try {
|
|
6987
|
-
const reportContent = await node_fs_promises.default.readFile(reportPath, "utf8");
|
|
6988
|
-
const lines = reportContent.split("\n").filter(Boolean);
|
|
6989
|
-
if (lines.length) console.log(`\n⚠️ ${lines.length} manual review${lines.length > 1 ? "s are" : " is"} required. See ${reportPath} for details.`);
|
|
6990
|
-
else console.debug(`Report file exists but is empty: ${reportPath}`);
|
|
6991
|
-
} catch {
|
|
6992
|
-
console.debug(`No report file generated - no manual reviews needed`);
|
|
6993
|
-
}
|
|
6994
|
-
};
|
|
6995
5289
|
async function runCodemod(transformsDir) {
|
|
6996
5290
|
try {
|
|
6997
|
-
const packages = findPackages();
|
|
6998
|
-
const reportPath = node_path.default.resolve(process.cwd(), "codemod-report.txt");
|
|
6999
5291
|
const resolvedTransformsDir = transformsDir ?? node_path.default.resolve(currentDirPath, "../dist/transforms");
|
|
7000
5292
|
console.debug(`Resolved transforms directory: ${resolvedTransformsDir}`);
|
|
7001
|
-
await resetReportFile(reportPath);
|
|
7002
5293
|
const { transformFiles } = await loadTransformModules_default(resolvedTransformsDir);
|
|
7003
5294
|
if (transformFiles.length === 0) throw new Error(`No transform scripts found in directory: ${resolvedTransformsDir}`);
|
|
7004
|
-
const
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
transformFiles: await Promise.all(transformFiles)
|
|
7008
|
-
});
|
|
7009
|
-
const codemodPath = node_path.default.resolve(resolvedTransformsDir, options.transformFile, `transformer.js`);
|
|
5295
|
+
const resolvedTransformFiles = await Promise.all(transformFiles);
|
|
5296
|
+
const options = await getOptions_default(resolvedTransformFiles);
|
|
5297
|
+
const codemodPath = node_path.default.resolve(resolvedTransformsDir, `${options.transformFile}.js`);
|
|
7010
5298
|
console.debug(`Resolved codemod path: ${codemodPath}`);
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
}
|
|
7030
|
-
|
|
5299
|
+
const args = [
|
|
5300
|
+
"-t",
|
|
5301
|
+
codemodPath,
|
|
5302
|
+
options.targetPath,
|
|
5303
|
+
options.dry ? "--dry" : "",
|
|
5304
|
+
options.print ? "--print" : "",
|
|
5305
|
+
options.ignorePattern ? options.ignorePattern.split(",").map((pattern) => `--ignore-pattern=${pattern.trim()}`).join(" ") : "",
|
|
5306
|
+
options.gitignore ? "--gitignore" : ""
|
|
5307
|
+
].filter(Boolean);
|
|
5308
|
+
const command = `npx jscodeshift ${args.join(" ")}`;
|
|
5309
|
+
console.debug(`Running: ${command}`);
|
|
5310
|
+
const reportPath = node_path.default.resolve(process.cwd(), "codemod-report.txt");
|
|
5311
|
+
try {
|
|
5312
|
+
await node_fs_promises.default.access(reportPath);
|
|
5313
|
+
await node_fs_promises.default.rm(reportPath);
|
|
5314
|
+
console.debug(`Removed existing report file: ${reportPath}`);
|
|
5315
|
+
} catch {
|
|
5316
|
+
console.debug(`No existing report file to remove: ${reportPath}`);
|
|
5317
|
+
}
|
|
5318
|
+
(0, node_child_process.execSync)(command, { stdio: "inherit" });
|
|
5319
|
+
try {
|
|
5320
|
+
const reportContent = await node_fs_promises.default.readFile(reportPath, "utf8");
|
|
5321
|
+
const lines = reportContent.split("\n").filter(Boolean);
|
|
5322
|
+
if (lines.length) console.log(`\n⚠️ ${lines.length} manual review${lines.length > 1 ? "s are" : " is"} required. See ${reportPath} for details.`);
|
|
5323
|
+
else console.debug(`Report file exists but is empty: ${reportPath}`);
|
|
5324
|
+
} catch {
|
|
5325
|
+
console.debug(`No report file generated - no manual reviews needed`);
|
|
5326
|
+
}
|
|
7031
5327
|
} catch (error) {
|
|
7032
5328
|
if (error instanceof Error) console.error("Error running codemod:", error.message);
|
|
7033
5329
|
else console.error("Error running codemod:", error);
|