@wise/wds-codemods 1.0.0 → 1.1.0
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/README.md +128 -86
- package/dist/constants-CcE2TmzN.js +59 -0
- package/dist/constants-CcE2TmzN.js.map +1 -0
- package/dist/{helpers-auDAwIcO.js → helpers-Z1jZGLmt.js} +571 -546
- package/dist/helpers-Z1jZGLmt.js.map +1 -0
- package/dist/index.js +87 -46
- package/dist/index.js.map +1 -1
- package/dist/transforms/button/transformer.js +3 -8
- package/dist/transforms/button/transformer.js.map +1 -1
- package/dist/transforms/list-item/config.json +6 -0
- package/dist/transforms/list-item/transformer.js +426 -0
- package/dist/transforms/list-item/transformer.js.map +1 -0
- package/package.json +9 -3
- package/dist/helpers-auDAwIcO.js.map +0 -1
|
@@ -1,47 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJS = (cb, mod) => function() {
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
13
|
-
key = keys[i];
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
-
get: ((k) => from[k]).bind(null, key),
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
22
|
-
value: mod,
|
|
23
|
-
enumerable: true
|
|
24
|
-
}) : target, mod));
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
1
|
+
const require_constants$1 = require('./constants-CcE2TmzN.js');
|
|
27
2
|
let node_child_process = require("node:child_process");
|
|
28
|
-
node_child_process = __toESM(node_child_process);
|
|
29
3
|
let node_fs_promises = require("node:fs/promises");
|
|
30
|
-
node_fs_promises = __toESM(node_fs_promises);
|
|
4
|
+
node_fs_promises = require_constants$1.__toESM(node_fs_promises);
|
|
31
5
|
let node_path = require("node:path");
|
|
32
|
-
node_path = __toESM(node_path);
|
|
33
|
-
let
|
|
34
|
-
__inquirer_prompts = __toESM(__inquirer_prompts);
|
|
6
|
+
node_path = require_constants$1.__toESM(node_path);
|
|
7
|
+
let _inquirer_prompts = require("@inquirer/prompts");
|
|
35
8
|
let node_fs = require("node:fs");
|
|
36
|
-
node_fs = __toESM(node_fs);
|
|
9
|
+
node_fs = require_constants$1.__toESM(node_fs);
|
|
10
|
+
let node_util = require("node:util");
|
|
37
11
|
|
|
38
12
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
|
|
39
|
-
var require_constants = /* @__PURE__ */
|
|
13
|
+
var require_constants = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
40
14
|
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
41
|
-
const MAX_LENGTH
|
|
42
|
-
const MAX_SAFE_INTEGER
|
|
43
|
-
const MAX_SAFE_COMPONENT_LENGTH
|
|
44
|
-
const MAX_SAFE_BUILD_LENGTH
|
|
15
|
+
const MAX_LENGTH = 256;
|
|
16
|
+
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
17
|
+
const MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
18
|
+
const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
45
19
|
const RELEASE_TYPES = [
|
|
46
20
|
"major",
|
|
47
21
|
"premajor",
|
|
@@ -52,40 +26,40 @@ var require_constants = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@
|
|
|
52
26
|
"prerelease"
|
|
53
27
|
];
|
|
54
28
|
module.exports = {
|
|
55
|
-
MAX_LENGTH
|
|
56
|
-
MAX_SAFE_COMPONENT_LENGTH
|
|
57
|
-
MAX_SAFE_BUILD_LENGTH
|
|
58
|
-
MAX_SAFE_INTEGER
|
|
29
|
+
MAX_LENGTH,
|
|
30
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
31
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
32
|
+
MAX_SAFE_INTEGER,
|
|
59
33
|
RELEASE_TYPES,
|
|
60
34
|
SEMVER_SPEC_VERSION,
|
|
61
35
|
FLAG_INCLUDE_PRERELEASE: 1,
|
|
62
36
|
FLAG_LOOSE: 2
|
|
63
37
|
};
|
|
64
|
-
})
|
|
38
|
+
}));
|
|
65
39
|
|
|
66
40
|
//#endregion
|
|
67
41
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js
|
|
68
|
-
var require_debug = /* @__PURE__ */
|
|
69
|
-
const debug
|
|
70
|
-
module.exports = debug
|
|
71
|
-
})
|
|
42
|
+
var require_debug = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
43
|
+
const debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
44
|
+
module.exports = debug;
|
|
45
|
+
}));
|
|
72
46
|
|
|
73
47
|
//#endregion
|
|
74
48
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js
|
|
75
|
-
var require_re = /* @__PURE__ */
|
|
76
|
-
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH
|
|
77
|
-
const debug
|
|
49
|
+
var require_re = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
50
|
+
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
|
|
51
|
+
const debug = require_debug();
|
|
78
52
|
exports = module.exports = {};
|
|
79
|
-
const re
|
|
53
|
+
const re = exports.re = [];
|
|
80
54
|
const safeRe = exports.safeRe = [];
|
|
81
55
|
const src = exports.src = [];
|
|
82
56
|
const safeSrc = exports.safeSrc = [];
|
|
83
|
-
const t
|
|
57
|
+
const t = exports.t = {};
|
|
84
58
|
let R = 0;
|
|
85
59
|
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
86
60
|
const safeRegexReplacements = [
|
|
87
61
|
["\\s", 1],
|
|
88
|
-
["\\d", MAX_LENGTH
|
|
62
|
+
["\\d", MAX_LENGTH],
|
|
89
63
|
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
90
64
|
];
|
|
91
65
|
const makeSafeRegex = (value) => {
|
|
@@ -95,79 +69,79 @@ var require_re = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.2/n
|
|
|
95
69
|
const createToken = (name, value, isGlobal) => {
|
|
96
70
|
const safe = makeSafeRegex(value);
|
|
97
71
|
const index = R++;
|
|
98
|
-
debug
|
|
99
|
-
t
|
|
72
|
+
debug(name, index, value);
|
|
73
|
+
t[name] = index;
|
|
100
74
|
src[index] = value;
|
|
101
75
|
safeSrc[index] = safe;
|
|
102
|
-
re
|
|
76
|
+
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
103
77
|
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
104
78
|
};
|
|
105
79
|
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
106
80
|
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
107
81
|
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
108
|
-
createToken("MAINVERSION", `(${src[t
|
|
109
|
-
createToken("MAINVERSIONLOOSE", `(${src[t
|
|
110
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t
|
|
111
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t
|
|
112
|
-
createToken("PRERELEASE", `(?:-(${src[t
|
|
113
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t
|
|
82
|
+
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
83
|
+
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
84
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
|
|
85
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
86
|
+
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
87
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
114
88
|
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
115
|
-
createToken("BUILD", `(?:\\+(${src[t
|
|
116
|
-
createToken("FULLPLAIN", `v?${src[t
|
|
117
|
-
createToken("FULL", `^${src[t
|
|
118
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t
|
|
119
|
-
createToken("LOOSE", `^${src[t
|
|
89
|
+
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
90
|
+
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
91
|
+
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
92
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
93
|
+
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
120
94
|
createToken("GTLT", "((?:<|>)?=?)");
|
|
121
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t
|
|
122
|
-
createToken("XRANGEIDENTIFIER", `${src[t
|
|
123
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t
|
|
124
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t
|
|
125
|
-
createToken("XRANGE", `^${src[t
|
|
126
|
-
createToken("XRANGELOOSE", `^${src[t
|
|
95
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
96
|
+
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
97
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
98
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
99
|
+
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
100
|
+
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
127
101
|
createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
128
|
-
createToken("COERCE", `${src[t
|
|
129
|
-
createToken("COERCEFULL", src[t
|
|
130
|
-
createToken("COERCERTL", src[t
|
|
131
|
-
createToken("COERCERTLFULL", src[t
|
|
102
|
+
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
103
|
+
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
104
|
+
createToken("COERCERTL", src[t.COERCE], true);
|
|
105
|
+
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
132
106
|
createToken("LONETILDE", "(?:~>?)");
|
|
133
|
-
createToken("TILDETRIM", `(\\s*)${src[t
|
|
107
|
+
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
134
108
|
exports.tildeTrimReplace = "$1~";
|
|
135
|
-
createToken("TILDE", `^${src[t
|
|
136
|
-
createToken("TILDELOOSE", `^${src[t
|
|
109
|
+
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
110
|
+
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
137
111
|
createToken("LONECARET", "(?:\\^)");
|
|
138
|
-
createToken("CARETTRIM", `(\\s*)${src[t
|
|
112
|
+
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
139
113
|
exports.caretTrimReplace = "$1^";
|
|
140
|
-
createToken("CARET", `^${src[t
|
|
141
|
-
createToken("CARETLOOSE", `^${src[t
|
|
142
|
-
createToken("COMPARATORLOOSE", `^${src[t
|
|
143
|
-
createToken("COMPARATOR", `^${src[t
|
|
144
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t
|
|
114
|
+
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
115
|
+
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
116
|
+
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
117
|
+
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
118
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
145
119
|
exports.comparatorTrimReplace = "$1$2$3";
|
|
146
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t
|
|
147
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t
|
|
120
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
121
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
148
122
|
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
149
123
|
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
150
124
|
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
151
|
-
})
|
|
125
|
+
}));
|
|
152
126
|
|
|
153
127
|
//#endregion
|
|
154
128
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js
|
|
155
|
-
var require_parse_options = /* @__PURE__ */
|
|
129
|
+
var require_parse_options = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
156
130
|
const looseOption = Object.freeze({ loose: true });
|
|
157
131
|
const emptyOpts = Object.freeze({});
|
|
158
|
-
const parseOptions
|
|
132
|
+
const parseOptions = (options) => {
|
|
159
133
|
if (!options) return emptyOpts;
|
|
160
134
|
if (typeof options !== "object") return looseOption;
|
|
161
135
|
return options;
|
|
162
136
|
};
|
|
163
|
-
module.exports = parseOptions
|
|
164
|
-
})
|
|
137
|
+
module.exports = parseOptions;
|
|
138
|
+
}));
|
|
165
139
|
|
|
166
140
|
//#endregion
|
|
167
141
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js
|
|
168
|
-
var require_identifiers = /* @__PURE__ */
|
|
142
|
+
var require_identifiers = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
169
143
|
const numeric = /^[0-9]+$/;
|
|
170
|
-
const compareIdentifiers
|
|
144
|
+
const compareIdentifiers = (a, b) => {
|
|
171
145
|
const anum = numeric.test(a);
|
|
172
146
|
const bnum = numeric.test(b);
|
|
173
147
|
if (anum && bnum) {
|
|
@@ -176,33 +150,33 @@ var require_identifiers = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semve
|
|
|
176
150
|
}
|
|
177
151
|
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
178
152
|
};
|
|
179
|
-
const rcompareIdentifiers = (a, b) => compareIdentifiers
|
|
153
|
+
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
180
154
|
module.exports = {
|
|
181
|
-
compareIdentifiers
|
|
155
|
+
compareIdentifiers,
|
|
182
156
|
rcompareIdentifiers
|
|
183
157
|
};
|
|
184
|
-
})
|
|
158
|
+
}));
|
|
185
159
|
|
|
186
160
|
//#endregion
|
|
187
161
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js
|
|
188
|
-
var require_semver$1 = /* @__PURE__ */
|
|
189
|
-
const debug
|
|
162
|
+
var require_semver$1 = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
163
|
+
const debug = require_debug();
|
|
190
164
|
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
191
|
-
const { safeRe: re
|
|
192
|
-
const parseOptions
|
|
165
|
+
const { safeRe: re, t } = require_re();
|
|
166
|
+
const parseOptions = require_parse_options();
|
|
193
167
|
const { compareIdentifiers } = require_identifiers();
|
|
194
|
-
var SemVer
|
|
168
|
+
var SemVer = class SemVer {
|
|
195
169
|
constructor(version, options) {
|
|
196
|
-
options = parseOptions
|
|
197
|
-
if (version instanceof SemVer
|
|
170
|
+
options = parseOptions(options);
|
|
171
|
+
if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
198
172
|
else version = version.version;
|
|
199
173
|
else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
200
174
|
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
201
|
-
debug
|
|
175
|
+
debug("SemVer", version, options);
|
|
202
176
|
this.options = options;
|
|
203
177
|
this.loose = !!options.loose;
|
|
204
178
|
this.includePrerelease = !!options.includePrerelease;
|
|
205
|
-
const m = version.trim().match(options.loose ? re
|
|
179
|
+
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
206
180
|
if (!m) throw new TypeError(`Invalid Version: ${version}`);
|
|
207
181
|
this.raw = version;
|
|
208
182
|
this.major = +m[1];
|
|
@@ -231,20 +205,20 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7
|
|
|
231
205
|
return this.version;
|
|
232
206
|
}
|
|
233
207
|
compare(other) {
|
|
234
|
-
debug
|
|
235
|
-
if (!(other instanceof SemVer
|
|
208
|
+
debug("SemVer.compare", this.version, this.options, other);
|
|
209
|
+
if (!(other instanceof SemVer)) {
|
|
236
210
|
if (typeof other === "string" && other === this.version) return 0;
|
|
237
|
-
other = new SemVer
|
|
211
|
+
other = new SemVer(other, this.options);
|
|
238
212
|
}
|
|
239
213
|
if (other.version === this.version) return 0;
|
|
240
214
|
return this.compareMain(other) || this.comparePre(other);
|
|
241
215
|
}
|
|
242
216
|
compareMain(other) {
|
|
243
|
-
if (!(other instanceof SemVer
|
|
217
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
244
218
|
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
245
219
|
}
|
|
246
220
|
comparePre(other) {
|
|
247
|
-
if (!(other instanceof SemVer
|
|
221
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
248
222
|
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
249
223
|
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
250
224
|
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
@@ -252,7 +226,7 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7
|
|
|
252
226
|
do {
|
|
253
227
|
const a = this.prerelease[i];
|
|
254
228
|
const b = other.prerelease[i];
|
|
255
|
-
debug
|
|
229
|
+
debug("prerelease compare", i, a, b);
|
|
256
230
|
if (a === void 0 && b === void 0) return 0;
|
|
257
231
|
else if (b === void 0) return 1;
|
|
258
232
|
else if (a === void 0) return -1;
|
|
@@ -261,12 +235,12 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7
|
|
|
261
235
|
} while (++i);
|
|
262
236
|
}
|
|
263
237
|
compareBuild(other) {
|
|
264
|
-
if (!(other instanceof SemVer
|
|
238
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
265
239
|
let i = 0;
|
|
266
240
|
do {
|
|
267
241
|
const a = this.build[i];
|
|
268
242
|
const b = other.build[i];
|
|
269
|
-
debug
|
|
243
|
+
debug("build compare", i, a, b);
|
|
270
244
|
if (a === void 0 && b === void 0) return 0;
|
|
271
245
|
else if (b === void 0) return 1;
|
|
272
246
|
else if (a === void 0) return -1;
|
|
@@ -278,7 +252,7 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7
|
|
|
278
252
|
if (release.startsWith("pre")) {
|
|
279
253
|
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
280
254
|
if (identifier) {
|
|
281
|
-
const match = `-${identifier}`.match(this.options.loose ? re
|
|
255
|
+
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
282
256
|
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
283
257
|
}
|
|
284
258
|
}
|
|
@@ -339,11 +313,11 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7
|
|
|
339
313
|
}
|
|
340
314
|
}
|
|
341
315
|
if (identifier) {
|
|
342
|
-
let prerelease
|
|
343
|
-
if (identifierBase === false) prerelease
|
|
316
|
+
let prerelease = [identifier, base];
|
|
317
|
+
if (identifierBase === false) prerelease = [identifier];
|
|
344
318
|
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
345
|
-
if (isNaN(this.prerelease[1])) this.prerelease = prerelease
|
|
346
|
-
} else this.prerelease = prerelease
|
|
319
|
+
if (isNaN(this.prerelease[1])) this.prerelease = prerelease;
|
|
320
|
+
} else this.prerelease = prerelease;
|
|
347
321
|
}
|
|
348
322
|
break;
|
|
349
323
|
}
|
|
@@ -354,73 +328,73 @@ var require_semver$1 = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7
|
|
|
354
328
|
return this;
|
|
355
329
|
}
|
|
356
330
|
};
|
|
357
|
-
module.exports = SemVer
|
|
358
|
-
})
|
|
331
|
+
module.exports = SemVer;
|
|
332
|
+
}));
|
|
359
333
|
|
|
360
334
|
//#endregion
|
|
361
335
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js
|
|
362
|
-
var require_parse = /* @__PURE__ */
|
|
363
|
-
const SemVer
|
|
364
|
-
const parse
|
|
365
|
-
if (version instanceof SemVer
|
|
336
|
+
var require_parse = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
337
|
+
const SemVer = require_semver$1();
|
|
338
|
+
const parse = (version, options, throwErrors = false) => {
|
|
339
|
+
if (version instanceof SemVer) return version;
|
|
366
340
|
try {
|
|
367
|
-
return new SemVer
|
|
341
|
+
return new SemVer(version, options);
|
|
368
342
|
} catch (er) {
|
|
369
343
|
if (!throwErrors) return null;
|
|
370
344
|
throw er;
|
|
371
345
|
}
|
|
372
346
|
};
|
|
373
|
-
module.exports = parse
|
|
374
|
-
})
|
|
347
|
+
module.exports = parse;
|
|
348
|
+
}));
|
|
375
349
|
|
|
376
350
|
//#endregion
|
|
377
351
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js
|
|
378
|
-
var require_valid$1 = /* @__PURE__ */
|
|
379
|
-
const parse
|
|
380
|
-
const valid
|
|
381
|
-
const v = parse
|
|
352
|
+
var require_valid$1 = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
353
|
+
const parse = require_parse();
|
|
354
|
+
const valid = (version, options) => {
|
|
355
|
+
const v = parse(version, options);
|
|
382
356
|
return v ? v.version : null;
|
|
383
357
|
};
|
|
384
|
-
module.exports = valid
|
|
385
|
-
})
|
|
358
|
+
module.exports = valid;
|
|
359
|
+
}));
|
|
386
360
|
|
|
387
361
|
//#endregion
|
|
388
362
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js
|
|
389
|
-
var require_clean = /* @__PURE__ */
|
|
390
|
-
const parse
|
|
391
|
-
const clean
|
|
392
|
-
const s = parse
|
|
363
|
+
var require_clean = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
364
|
+
const parse = require_parse();
|
|
365
|
+
const clean = (version, options) => {
|
|
366
|
+
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
393
367
|
return s ? s.version : null;
|
|
394
368
|
};
|
|
395
|
-
module.exports = clean
|
|
396
|
-
})
|
|
369
|
+
module.exports = clean;
|
|
370
|
+
}));
|
|
397
371
|
|
|
398
372
|
//#endregion
|
|
399
373
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js
|
|
400
|
-
var require_inc = /* @__PURE__ */
|
|
401
|
-
const SemVer
|
|
402
|
-
const inc
|
|
374
|
+
var require_inc = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
375
|
+
const SemVer = require_semver$1();
|
|
376
|
+
const inc = (version, release, options, identifier, identifierBase) => {
|
|
403
377
|
if (typeof options === "string") {
|
|
404
378
|
identifierBase = identifier;
|
|
405
379
|
identifier = options;
|
|
406
380
|
options = void 0;
|
|
407
381
|
}
|
|
408
382
|
try {
|
|
409
|
-
return new SemVer
|
|
383
|
+
return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
410
384
|
} catch (er) {
|
|
411
385
|
return null;
|
|
412
386
|
}
|
|
413
387
|
};
|
|
414
|
-
module.exports = inc
|
|
415
|
-
})
|
|
388
|
+
module.exports = inc;
|
|
389
|
+
}));
|
|
416
390
|
|
|
417
391
|
//#endregion
|
|
418
392
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js
|
|
419
|
-
var require_diff = /* @__PURE__ */
|
|
420
|
-
const parse
|
|
421
|
-
const diff
|
|
422
|
-
const v1 = parse
|
|
423
|
-
const v2 = parse
|
|
393
|
+
var require_diff = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
394
|
+
const parse = require_parse();
|
|
395
|
+
const diff = (version1, version2) => {
|
|
396
|
+
const v1 = parse(version1, null, true);
|
|
397
|
+
const v2 = parse(version2, null, true);
|
|
424
398
|
const comparison = v1.compare(v2);
|
|
425
399
|
if (comparison === 0) return null;
|
|
426
400
|
const v1Higher = comparison > 0;
|
|
@@ -440,154 +414,154 @@ var require_diff = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.2
|
|
|
440
414
|
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
441
415
|
return "prerelease";
|
|
442
416
|
};
|
|
443
|
-
module.exports = diff
|
|
444
|
-
})
|
|
417
|
+
module.exports = diff;
|
|
418
|
+
}));
|
|
445
419
|
|
|
446
420
|
//#endregion
|
|
447
421
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js
|
|
448
|
-
var require_major = /* @__PURE__ */
|
|
449
|
-
const SemVer
|
|
450
|
-
const major
|
|
451
|
-
module.exports = major
|
|
452
|
-
})
|
|
422
|
+
var require_major = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
423
|
+
const SemVer = require_semver$1();
|
|
424
|
+
const major = (a, loose) => new SemVer(a, loose).major;
|
|
425
|
+
module.exports = major;
|
|
426
|
+
}));
|
|
453
427
|
|
|
454
428
|
//#endregion
|
|
455
429
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js
|
|
456
|
-
var require_minor = /* @__PURE__ */
|
|
457
|
-
const SemVer
|
|
458
|
-
const minor
|
|
459
|
-
module.exports = minor
|
|
460
|
-
})
|
|
430
|
+
var require_minor = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
431
|
+
const SemVer = require_semver$1();
|
|
432
|
+
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
433
|
+
module.exports = minor;
|
|
434
|
+
}));
|
|
461
435
|
|
|
462
436
|
//#endregion
|
|
463
437
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js
|
|
464
|
-
var require_patch = /* @__PURE__ */
|
|
465
|
-
const SemVer
|
|
466
|
-
const patch
|
|
467
|
-
module.exports = patch
|
|
468
|
-
})
|
|
438
|
+
var require_patch = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
439
|
+
const SemVer = require_semver$1();
|
|
440
|
+
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
441
|
+
module.exports = patch;
|
|
442
|
+
}));
|
|
469
443
|
|
|
470
444
|
//#endregion
|
|
471
445
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js
|
|
472
|
-
var require_prerelease = /* @__PURE__ */
|
|
473
|
-
const parse
|
|
474
|
-
const prerelease
|
|
475
|
-
const parsed = parse
|
|
446
|
+
var require_prerelease = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
447
|
+
const parse = require_parse();
|
|
448
|
+
const prerelease = (version, options) => {
|
|
449
|
+
const parsed = parse(version, options);
|
|
476
450
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
477
451
|
};
|
|
478
|
-
module.exports = prerelease
|
|
479
|
-
})
|
|
452
|
+
module.exports = prerelease;
|
|
453
|
+
}));
|
|
480
454
|
|
|
481
455
|
//#endregion
|
|
482
456
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js
|
|
483
|
-
var require_compare = /* @__PURE__ */
|
|
484
|
-
const SemVer
|
|
485
|
-
const compare
|
|
486
|
-
module.exports = compare
|
|
487
|
-
})
|
|
457
|
+
var require_compare = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
458
|
+
const SemVer = require_semver$1();
|
|
459
|
+
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
460
|
+
module.exports = compare;
|
|
461
|
+
}));
|
|
488
462
|
|
|
489
463
|
//#endregion
|
|
490
464
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js
|
|
491
|
-
var require_rcompare = /* @__PURE__ */
|
|
492
|
-
const compare
|
|
493
|
-
const rcompare
|
|
494
|
-
module.exports = rcompare
|
|
495
|
-
})
|
|
465
|
+
var require_rcompare = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
466
|
+
const compare = require_compare();
|
|
467
|
+
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
468
|
+
module.exports = rcompare;
|
|
469
|
+
}));
|
|
496
470
|
|
|
497
471
|
//#endregion
|
|
498
472
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js
|
|
499
|
-
var require_compare_loose = /* @__PURE__ */
|
|
500
|
-
const compare
|
|
501
|
-
const compareLoose
|
|
502
|
-
module.exports = compareLoose
|
|
503
|
-
})
|
|
473
|
+
var require_compare_loose = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
474
|
+
const compare = require_compare();
|
|
475
|
+
const compareLoose = (a, b) => compare(a, b, true);
|
|
476
|
+
module.exports = compareLoose;
|
|
477
|
+
}));
|
|
504
478
|
|
|
505
479
|
//#endregion
|
|
506
480
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js
|
|
507
|
-
var require_compare_build = /* @__PURE__ */
|
|
508
|
-
const SemVer
|
|
509
|
-
const compareBuild
|
|
510
|
-
const versionA = new SemVer
|
|
511
|
-
const versionB = new SemVer
|
|
481
|
+
var require_compare_build = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
482
|
+
const SemVer = require_semver$1();
|
|
483
|
+
const compareBuild = (a, b, loose) => {
|
|
484
|
+
const versionA = new SemVer(a, loose);
|
|
485
|
+
const versionB = new SemVer(b, loose);
|
|
512
486
|
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
513
487
|
};
|
|
514
|
-
module.exports = compareBuild
|
|
515
|
-
})
|
|
488
|
+
module.exports = compareBuild;
|
|
489
|
+
}));
|
|
516
490
|
|
|
517
491
|
//#endregion
|
|
518
492
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js
|
|
519
|
-
var require_sort = /* @__PURE__ */
|
|
520
|
-
const compareBuild
|
|
521
|
-
const sort
|
|
522
|
-
module.exports = sort
|
|
523
|
-
})
|
|
493
|
+
var require_sort = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
494
|
+
const compareBuild = require_compare_build();
|
|
495
|
+
const sort = (list$1, loose) => list$1.sort((a, b) => compareBuild(a, b, loose));
|
|
496
|
+
module.exports = sort;
|
|
497
|
+
}));
|
|
524
498
|
|
|
525
499
|
//#endregion
|
|
526
500
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js
|
|
527
|
-
var require_rsort = /* @__PURE__ */
|
|
528
|
-
const compareBuild
|
|
529
|
-
const rsort
|
|
530
|
-
module.exports = rsort
|
|
531
|
-
})
|
|
501
|
+
var require_rsort = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
502
|
+
const compareBuild = require_compare_build();
|
|
503
|
+
const rsort = (list$1, loose) => list$1.sort((a, b) => compareBuild(b, a, loose));
|
|
504
|
+
module.exports = rsort;
|
|
505
|
+
}));
|
|
532
506
|
|
|
533
507
|
//#endregion
|
|
534
508
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js
|
|
535
|
-
var require_gt = /* @__PURE__ */
|
|
536
|
-
const compare
|
|
537
|
-
const gt
|
|
538
|
-
module.exports = gt
|
|
539
|
-
})
|
|
509
|
+
var require_gt = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
510
|
+
const compare = require_compare();
|
|
511
|
+
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
512
|
+
module.exports = gt;
|
|
513
|
+
}));
|
|
540
514
|
|
|
541
515
|
//#endregion
|
|
542
516
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js
|
|
543
|
-
var require_lt = /* @__PURE__ */
|
|
544
|
-
const compare
|
|
545
|
-
const lt
|
|
546
|
-
module.exports = lt
|
|
547
|
-
})
|
|
517
|
+
var require_lt = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
518
|
+
const compare = require_compare();
|
|
519
|
+
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
520
|
+
module.exports = lt;
|
|
521
|
+
}));
|
|
548
522
|
|
|
549
523
|
//#endregion
|
|
550
524
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js
|
|
551
|
-
var require_eq = /* @__PURE__ */
|
|
552
|
-
const compare
|
|
553
|
-
const eq
|
|
554
|
-
module.exports = eq
|
|
555
|
-
})
|
|
525
|
+
var require_eq = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
526
|
+
const compare = require_compare();
|
|
527
|
+
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
528
|
+
module.exports = eq;
|
|
529
|
+
}));
|
|
556
530
|
|
|
557
531
|
//#endregion
|
|
558
532
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js
|
|
559
|
-
var require_neq = /* @__PURE__ */
|
|
560
|
-
const compare
|
|
561
|
-
const neq
|
|
562
|
-
module.exports = neq
|
|
563
|
-
})
|
|
533
|
+
var require_neq = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
534
|
+
const compare = require_compare();
|
|
535
|
+
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
536
|
+
module.exports = neq;
|
|
537
|
+
}));
|
|
564
538
|
|
|
565
539
|
//#endregion
|
|
566
540
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js
|
|
567
|
-
var require_gte = /* @__PURE__ */
|
|
568
|
-
const compare
|
|
569
|
-
const gte
|
|
570
|
-
module.exports = gte
|
|
571
|
-
})
|
|
541
|
+
var require_gte = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
542
|
+
const compare = require_compare();
|
|
543
|
+
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
544
|
+
module.exports = gte;
|
|
545
|
+
}));
|
|
572
546
|
|
|
573
547
|
//#endregion
|
|
574
548
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js
|
|
575
|
-
var require_lte = /* @__PURE__ */
|
|
576
|
-
const compare
|
|
577
|
-
const lte
|
|
578
|
-
module.exports = lte
|
|
579
|
-
})
|
|
549
|
+
var require_lte = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
550
|
+
const compare = require_compare();
|
|
551
|
+
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
552
|
+
module.exports = lte;
|
|
553
|
+
}));
|
|
580
554
|
|
|
581
555
|
//#endregion
|
|
582
556
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js
|
|
583
|
-
var require_cmp = /* @__PURE__ */
|
|
584
|
-
const eq
|
|
585
|
-
const neq
|
|
586
|
-
const gt
|
|
587
|
-
const gte
|
|
588
|
-
const lt
|
|
589
|
-
const lte
|
|
590
|
-
const cmp
|
|
557
|
+
var require_cmp = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
558
|
+
const eq = require_eq();
|
|
559
|
+
const neq = require_neq();
|
|
560
|
+
const gt = require_gt();
|
|
561
|
+
const gte = require_gte();
|
|
562
|
+
const lt = require_lt();
|
|
563
|
+
const lte = require_lte();
|
|
564
|
+
const cmp = (a, op, b, loose) => {
|
|
591
565
|
switch (op) {
|
|
592
566
|
case "===":
|
|
593
567
|
if (typeof a === "object") a = a.version;
|
|
@@ -599,33 +573,33 @@ var require_cmp = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.2/
|
|
|
599
573
|
return a !== b;
|
|
600
574
|
case "":
|
|
601
575
|
case "=":
|
|
602
|
-
case "==": return eq
|
|
603
|
-
case "!=": return neq
|
|
604
|
-
case ">": return gt
|
|
605
|
-
case ">=": return gte
|
|
606
|
-
case "<": return lt
|
|
607
|
-
case "<=": return lte
|
|
576
|
+
case "==": return eq(a, b, loose);
|
|
577
|
+
case "!=": return neq(a, b, loose);
|
|
578
|
+
case ">": return gt(a, b, loose);
|
|
579
|
+
case ">=": return gte(a, b, loose);
|
|
580
|
+
case "<": return lt(a, b, loose);
|
|
581
|
+
case "<=": return lte(a, b, loose);
|
|
608
582
|
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
609
583
|
}
|
|
610
584
|
};
|
|
611
|
-
module.exports = cmp
|
|
612
|
-
})
|
|
585
|
+
module.exports = cmp;
|
|
586
|
+
}));
|
|
613
587
|
|
|
614
588
|
//#endregion
|
|
615
589
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js
|
|
616
|
-
var require_coerce = /* @__PURE__ */
|
|
617
|
-
const SemVer
|
|
618
|
-
const parse
|
|
619
|
-
const { safeRe: re
|
|
620
|
-
const coerce
|
|
621
|
-
if (version instanceof SemVer
|
|
590
|
+
var require_coerce = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
591
|
+
const SemVer = require_semver$1();
|
|
592
|
+
const parse = require_parse();
|
|
593
|
+
const { safeRe: re, t } = require_re();
|
|
594
|
+
const coerce = (version, options) => {
|
|
595
|
+
if (version instanceof SemVer) return version;
|
|
622
596
|
if (typeof version === "number") version = String(version);
|
|
623
597
|
if (typeof version !== "string") return null;
|
|
624
598
|
options = options || {};
|
|
625
599
|
let match = null;
|
|
626
|
-
if (!options.rtl) match = version.match(options.includePrerelease ? re
|
|
600
|
+
if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
627
601
|
else {
|
|
628
|
-
const coerceRtlRegex = options.includePrerelease ? re
|
|
602
|
+
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
629
603
|
let next;
|
|
630
604
|
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
631
605
|
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
@@ -634,19 +608,15 @@ var require_coerce = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7
|
|
|
634
608
|
coerceRtlRegex.lastIndex = -1;
|
|
635
609
|
}
|
|
636
610
|
if (match === null) return null;
|
|
637
|
-
const major
|
|
638
|
-
|
|
639
|
-
const patch$2 = match[4] || "0";
|
|
640
|
-
const prerelease$2 = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
641
|
-
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
642
|
-
return parse$1(`${major$2}.${minor$2}.${patch$2}${prerelease$2}${build}`, options);
|
|
611
|
+
const major = match[2];
|
|
612
|
+
return parse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
|
|
643
613
|
};
|
|
644
|
-
module.exports = coerce
|
|
645
|
-
})
|
|
614
|
+
module.exports = coerce;
|
|
615
|
+
}));
|
|
646
616
|
|
|
647
617
|
//#endregion
|
|
648
618
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js
|
|
649
|
-
var require_lrucache = /* @__PURE__ */
|
|
619
|
+
var require_lrucache = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
650
620
|
var LRUCache = class {
|
|
651
621
|
constructor() {
|
|
652
622
|
this.max = 1e3;
|
|
@@ -676,18 +646,18 @@ var require_lrucache = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7
|
|
|
676
646
|
}
|
|
677
647
|
};
|
|
678
648
|
module.exports = LRUCache;
|
|
679
|
-
})
|
|
649
|
+
}));
|
|
680
650
|
|
|
681
651
|
//#endregion
|
|
682
652
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js
|
|
683
|
-
var require_range = /* @__PURE__ */
|
|
653
|
+
var require_range = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
684
654
|
const SPACE_CHARACTERS = /\s+/g;
|
|
685
|
-
var Range
|
|
655
|
+
var Range = class Range {
|
|
686
656
|
constructor(range, options) {
|
|
687
|
-
options = parseOptions
|
|
688
|
-
if (range instanceof Range
|
|
689
|
-
else return new Range
|
|
690
|
-
if (range instanceof Comparator
|
|
657
|
+
options = parseOptions(options);
|
|
658
|
+
if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
|
|
659
|
+
else return new Range(range.raw, options);
|
|
660
|
+
if (range instanceof Comparator) {
|
|
691
661
|
this.raw = range.value;
|
|
692
662
|
this.set = [[range]];
|
|
693
663
|
this.formatted = void 0;
|
|
@@ -737,23 +707,23 @@ var require_range = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.
|
|
|
737
707
|
const cached = cache.get(memoKey);
|
|
738
708
|
if (cached) return cached;
|
|
739
709
|
const loose = this.options.loose;
|
|
740
|
-
const hr = loose ? re
|
|
710
|
+
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
741
711
|
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
742
|
-
debug
|
|
743
|
-
range = range.replace(re
|
|
744
|
-
debug
|
|
745
|
-
range = range.replace(re
|
|
746
|
-
debug
|
|
747
|
-
range = range.replace(re
|
|
748
|
-
debug
|
|
712
|
+
debug("hyphen replace", range);
|
|
713
|
+
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
714
|
+
debug("comparator trim", range);
|
|
715
|
+
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
716
|
+
debug("tilde trim", range);
|
|
717
|
+
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
718
|
+
debug("caret trim", range);
|
|
749
719
|
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
750
720
|
if (loose) rangeList = rangeList.filter((comp) => {
|
|
751
|
-
debug
|
|
752
|
-
return !!comp.match(re
|
|
721
|
+
debug("loose invalid filter", comp, this.options);
|
|
722
|
+
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
753
723
|
});
|
|
754
|
-
debug
|
|
724
|
+
debug("range list", rangeList);
|
|
755
725
|
const rangeMap = /* @__PURE__ */ new Map();
|
|
756
|
-
const comparators = rangeList.map((comp) => new Comparator
|
|
726
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
757
727
|
for (const comp of comparators) {
|
|
758
728
|
if (isNullSet(comp)) return [comp];
|
|
759
729
|
rangeMap.set(comp.value, comp);
|
|
@@ -764,7 +734,7 @@ var require_range = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.
|
|
|
764
734
|
return result;
|
|
765
735
|
}
|
|
766
736
|
intersects(range, options) {
|
|
767
|
-
if (!(range instanceof Range
|
|
737
|
+
if (!(range instanceof Range)) throw new TypeError("a Range is required");
|
|
768
738
|
return this.set.some((thisComparators) => {
|
|
769
739
|
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
770
740
|
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
@@ -778,7 +748,7 @@ var require_range = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.
|
|
|
778
748
|
test(version) {
|
|
779
749
|
if (!version) return false;
|
|
780
750
|
if (typeof version === "string") try {
|
|
781
|
-
version = new SemVer
|
|
751
|
+
version = new SemVer(version, this.options);
|
|
782
752
|
} catch (er) {
|
|
783
753
|
return false;
|
|
784
754
|
}
|
|
@@ -786,13 +756,13 @@ var require_range = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.
|
|
|
786
756
|
return false;
|
|
787
757
|
}
|
|
788
758
|
};
|
|
789
|
-
module.exports = Range
|
|
759
|
+
module.exports = Range;
|
|
790
760
|
const cache = new (require_lrucache())();
|
|
791
|
-
const parseOptions
|
|
792
|
-
const Comparator
|
|
793
|
-
const debug
|
|
794
|
-
const SemVer
|
|
795
|
-
const { safeRe: re
|
|
761
|
+
const parseOptions = require_parse_options();
|
|
762
|
+
const Comparator = require_comparator();
|
|
763
|
+
const debug = require_debug();
|
|
764
|
+
const SemVer = require_semver$1();
|
|
765
|
+
const { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
796
766
|
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
797
767
|
const isNullSet = (c) => c.value === "<0.0.0-0";
|
|
798
768
|
const isAny = (c) => c.value === "";
|
|
@@ -809,15 +779,15 @@ var require_range = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.
|
|
|
809
779
|
return result;
|
|
810
780
|
};
|
|
811
781
|
const parseComparator = (comp, options) => {
|
|
812
|
-
debug
|
|
782
|
+
debug("comp", comp, options);
|
|
813
783
|
comp = replaceCarets(comp, options);
|
|
814
|
-
debug
|
|
784
|
+
debug("caret", comp);
|
|
815
785
|
comp = replaceTildes(comp, options);
|
|
816
|
-
debug
|
|
786
|
+
debug("tildes", comp);
|
|
817
787
|
comp = replaceXRanges(comp, options);
|
|
818
|
-
debug
|
|
788
|
+
debug("xrange", comp);
|
|
819
789
|
comp = replaceStars(comp, options);
|
|
820
|
-
debug
|
|
790
|
+
debug("stars", comp);
|
|
821
791
|
return comp;
|
|
822
792
|
};
|
|
823
793
|
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
@@ -825,18 +795,18 @@ var require_range = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.
|
|
|
825
795
|
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
826
796
|
};
|
|
827
797
|
const replaceTilde = (comp, options) => {
|
|
828
|
-
const r = options.loose ? re
|
|
798
|
+
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
829
799
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
830
|
-
debug
|
|
800
|
+
debug("tilde", comp, _, M, m, p, pr);
|
|
831
801
|
let ret;
|
|
832
802
|
if (isX(M)) ret = "";
|
|
833
803
|
else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
834
804
|
else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
835
805
|
else if (pr) {
|
|
836
|
-
debug
|
|
806
|
+
debug("replaceTilde pr", pr);
|
|
837
807
|
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
838
808
|
} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
839
|
-
debug
|
|
809
|
+
debug("tilde return", ret);
|
|
840
810
|
return ret;
|
|
841
811
|
});
|
|
842
812
|
};
|
|
@@ -844,40 +814,40 @@ var require_range = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.
|
|
|
844
814
|
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
845
815
|
};
|
|
846
816
|
const replaceCaret = (comp, options) => {
|
|
847
|
-
debug
|
|
848
|
-
const r = options.loose ? re
|
|
817
|
+
debug("caret", comp, options);
|
|
818
|
+
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
849
819
|
const z = options.includePrerelease ? "-0" : "";
|
|
850
820
|
return comp.replace(r, (_, M, m, p, pr) => {
|
|
851
|
-
debug
|
|
821
|
+
debug("caret", comp, _, M, m, p, pr);
|
|
852
822
|
let ret;
|
|
853
823
|
if (isX(M)) ret = "";
|
|
854
824
|
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
855
825
|
else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
856
826
|
else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
857
827
|
else if (pr) {
|
|
858
|
-
debug
|
|
828
|
+
debug("replaceCaret pr", pr);
|
|
859
829
|
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
860
830
|
else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
861
831
|
else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
862
832
|
} else {
|
|
863
|
-
debug
|
|
833
|
+
debug("no pr");
|
|
864
834
|
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
865
835
|
else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
866
836
|
else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
867
837
|
}
|
|
868
|
-
debug
|
|
838
|
+
debug("caret return", ret);
|
|
869
839
|
return ret;
|
|
870
840
|
});
|
|
871
841
|
};
|
|
872
842
|
const replaceXRanges = (comp, options) => {
|
|
873
|
-
debug
|
|
843
|
+
debug("replaceXRanges", comp, options);
|
|
874
844
|
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
875
845
|
};
|
|
876
846
|
const replaceXRange = (comp, options) => {
|
|
877
847
|
comp = comp.trim();
|
|
878
|
-
const r = options.loose ? re
|
|
848
|
+
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
879
849
|
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
880
|
-
debug
|
|
850
|
+
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
881
851
|
const xM = isX(M);
|
|
882
852
|
const xm = xM || isX(m);
|
|
883
853
|
const xp = xm || isX(p);
|
|
@@ -908,17 +878,17 @@ var require_range = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.
|
|
|
908
878
|
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
909
879
|
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
910
880
|
else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
911
|
-
debug
|
|
881
|
+
debug("xRange return", ret);
|
|
912
882
|
return ret;
|
|
913
883
|
});
|
|
914
884
|
};
|
|
915
885
|
const replaceStars = (comp, options) => {
|
|
916
|
-
debug
|
|
917
|
-
return comp.trim().replace(re
|
|
886
|
+
debug("replaceStars", comp, options);
|
|
887
|
+
return comp.trim().replace(re[t.STAR], "");
|
|
918
888
|
};
|
|
919
889
|
const replaceGTE0 = (comp, options) => {
|
|
920
|
-
debug
|
|
921
|
-
return comp.trim().replace(re
|
|
890
|
+
debug("replaceGTE0", comp, options);
|
|
891
|
+
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
922
892
|
};
|
|
923
893
|
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
924
894
|
if (isX(fM)) from = "";
|
|
@@ -938,8 +908,8 @@ var require_range = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.
|
|
|
938
908
|
for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
|
|
939
909
|
if (version.prerelease.length && !options.includePrerelease) {
|
|
940
910
|
for (let i = 0; i < set.length; i++) {
|
|
941
|
-
debug
|
|
942
|
-
if (set[i].semver === Comparator
|
|
911
|
+
debug(set[i].semver);
|
|
912
|
+
if (set[i].semver === Comparator.ANY) continue;
|
|
943
913
|
if (set[i].semver.prerelease.length > 0) {
|
|
944
914
|
const allowed = set[i].semver;
|
|
945
915
|
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
|
|
@@ -949,26 +919,26 @@ var require_range = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.
|
|
|
949
919
|
}
|
|
950
920
|
return true;
|
|
951
921
|
};
|
|
952
|
-
})
|
|
922
|
+
}));
|
|
953
923
|
|
|
954
924
|
//#endregion
|
|
955
925
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js
|
|
956
|
-
var require_comparator = /* @__PURE__ */
|
|
957
|
-
const ANY
|
|
958
|
-
var Comparator
|
|
926
|
+
var require_comparator = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
927
|
+
const ANY = Symbol("SemVer ANY");
|
|
928
|
+
var Comparator = class Comparator {
|
|
959
929
|
static get ANY() {
|
|
960
|
-
return ANY
|
|
930
|
+
return ANY;
|
|
961
931
|
}
|
|
962
932
|
constructor(comp, options) {
|
|
963
933
|
options = parseOptions(options);
|
|
964
|
-
if (comp instanceof Comparator
|
|
934
|
+
if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp;
|
|
965
935
|
else comp = comp.value;
|
|
966
936
|
comp = comp.trim().split(/\s+/).join(" ");
|
|
967
937
|
debug("comparator", comp, options);
|
|
968
938
|
this.options = options;
|
|
969
939
|
this.loose = !!options.loose;
|
|
970
940
|
this.parse(comp);
|
|
971
|
-
if (this.semver === ANY
|
|
941
|
+
if (this.semver === ANY) this.value = "";
|
|
972
942
|
else this.value = this.operator + this.semver.version;
|
|
973
943
|
debug("comp", this);
|
|
974
944
|
}
|
|
@@ -978,30 +948,30 @@ var require_comparator = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver
|
|
|
978
948
|
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
979
949
|
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
980
950
|
if (this.operator === "=") this.operator = "";
|
|
981
|
-
if (!m[2]) this.semver = ANY
|
|
982
|
-
else this.semver = new SemVer
|
|
951
|
+
if (!m[2]) this.semver = ANY;
|
|
952
|
+
else this.semver = new SemVer(m[2], this.options.loose);
|
|
983
953
|
}
|
|
984
954
|
toString() {
|
|
985
955
|
return this.value;
|
|
986
956
|
}
|
|
987
957
|
test(version) {
|
|
988
958
|
debug("Comparator.test", version, this.options.loose);
|
|
989
|
-
if (this.semver === ANY
|
|
959
|
+
if (this.semver === ANY || version === ANY) return true;
|
|
990
960
|
if (typeof version === "string") try {
|
|
991
|
-
version = new SemVer
|
|
961
|
+
version = new SemVer(version, this.options);
|
|
992
962
|
} catch (er) {
|
|
993
963
|
return false;
|
|
994
964
|
}
|
|
995
|
-
return cmp
|
|
965
|
+
return cmp(version, this.operator, this.semver, this.options);
|
|
996
966
|
}
|
|
997
967
|
intersects(comp, options) {
|
|
998
|
-
if (!(comp instanceof Comparator
|
|
968
|
+
if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
|
|
999
969
|
if (this.operator === "") {
|
|
1000
970
|
if (this.value === "") return true;
|
|
1001
|
-
return new Range
|
|
971
|
+
return new Range(comp.value, options).test(this.value);
|
|
1002
972
|
} else if (comp.operator === "") {
|
|
1003
973
|
if (comp.value === "") return true;
|
|
1004
|
-
return new Range
|
|
974
|
+
return new Range(this.value, options).test(comp.semver);
|
|
1005
975
|
}
|
|
1006
976
|
options = parseOptions(options);
|
|
1007
977
|
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
@@ -1009,54 +979,54 @@ var require_comparator = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver
|
|
|
1009
979
|
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
1010
980
|
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
1011
981
|
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
1012
|
-
if (cmp
|
|
1013
|
-
if (cmp
|
|
982
|
+
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
983
|
+
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
1014
984
|
return false;
|
|
1015
985
|
}
|
|
1016
986
|
};
|
|
1017
|
-
module.exports = Comparator
|
|
987
|
+
module.exports = Comparator;
|
|
1018
988
|
const parseOptions = require_parse_options();
|
|
1019
989
|
const { safeRe: re, t } = require_re();
|
|
1020
|
-
const cmp
|
|
990
|
+
const cmp = require_cmp();
|
|
1021
991
|
const debug = require_debug();
|
|
1022
|
-
const SemVer
|
|
1023
|
-
const Range
|
|
1024
|
-
})
|
|
992
|
+
const SemVer = require_semver$1();
|
|
993
|
+
const Range = require_range();
|
|
994
|
+
}));
|
|
1025
995
|
|
|
1026
996
|
//#endregion
|
|
1027
997
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js
|
|
1028
|
-
var require_satisfies = /* @__PURE__ */
|
|
1029
|
-
const Range
|
|
1030
|
-
const satisfies
|
|
998
|
+
var require_satisfies = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
999
|
+
const Range = require_range();
|
|
1000
|
+
const satisfies = (version, range, options) => {
|
|
1031
1001
|
try {
|
|
1032
|
-
range = new Range
|
|
1002
|
+
range = new Range(range, options);
|
|
1033
1003
|
} catch (er) {
|
|
1034
1004
|
return false;
|
|
1035
1005
|
}
|
|
1036
1006
|
return range.test(version);
|
|
1037
1007
|
};
|
|
1038
|
-
module.exports = satisfies
|
|
1039
|
-
})
|
|
1008
|
+
module.exports = satisfies;
|
|
1009
|
+
}));
|
|
1040
1010
|
|
|
1041
1011
|
//#endregion
|
|
1042
1012
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js
|
|
1043
|
-
var require_to_comparators = /* @__PURE__ */
|
|
1044
|
-
const Range
|
|
1045
|
-
const toComparators
|
|
1046
|
-
module.exports = toComparators
|
|
1047
|
-
})
|
|
1013
|
+
var require_to_comparators = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1014
|
+
const Range = require_range();
|
|
1015
|
+
const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
1016
|
+
module.exports = toComparators;
|
|
1017
|
+
}));
|
|
1048
1018
|
|
|
1049
1019
|
//#endregion
|
|
1050
1020
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js
|
|
1051
|
-
var require_max_satisfying = /* @__PURE__ */
|
|
1052
|
-
const SemVer
|
|
1053
|
-
const Range
|
|
1054
|
-
const maxSatisfying
|
|
1021
|
+
var require_max_satisfying = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1022
|
+
const SemVer = require_semver$1();
|
|
1023
|
+
const Range = require_range();
|
|
1024
|
+
const maxSatisfying = (versions, range, options) => {
|
|
1055
1025
|
let max = null;
|
|
1056
1026
|
let maxSV = null;
|
|
1057
1027
|
let rangeObj = null;
|
|
1058
1028
|
try {
|
|
1059
|
-
rangeObj = new Range
|
|
1029
|
+
rangeObj = new Range(range, options);
|
|
1060
1030
|
} catch (er) {
|
|
1061
1031
|
return null;
|
|
1062
1032
|
}
|
|
@@ -1064,26 +1034,26 @@ var require_max_satisfying = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/se
|
|
|
1064
1034
|
if (rangeObj.test(v)) {
|
|
1065
1035
|
if (!max || maxSV.compare(v) === -1) {
|
|
1066
1036
|
max = v;
|
|
1067
|
-
maxSV = new SemVer
|
|
1037
|
+
maxSV = new SemVer(max, options);
|
|
1068
1038
|
}
|
|
1069
1039
|
}
|
|
1070
1040
|
});
|
|
1071
1041
|
return max;
|
|
1072
1042
|
};
|
|
1073
|
-
module.exports = maxSatisfying
|
|
1074
|
-
})
|
|
1043
|
+
module.exports = maxSatisfying;
|
|
1044
|
+
}));
|
|
1075
1045
|
|
|
1076
1046
|
//#endregion
|
|
1077
1047
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js
|
|
1078
|
-
var require_min_satisfying = /* @__PURE__ */
|
|
1079
|
-
const SemVer
|
|
1080
|
-
const Range
|
|
1081
|
-
const minSatisfying
|
|
1048
|
+
var require_min_satisfying = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1049
|
+
const SemVer = require_semver$1();
|
|
1050
|
+
const Range = require_range();
|
|
1051
|
+
const minSatisfying = (versions, range, options) => {
|
|
1082
1052
|
let min = null;
|
|
1083
1053
|
let minSV = null;
|
|
1084
1054
|
let rangeObj = null;
|
|
1085
1055
|
try {
|
|
1086
|
-
rangeObj = new Range
|
|
1056
|
+
rangeObj = new Range(range, options);
|
|
1087
1057
|
} catch (er) {
|
|
1088
1058
|
return null;
|
|
1089
1059
|
}
|
|
@@ -1091,33 +1061,33 @@ var require_min_satisfying = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/se
|
|
|
1091
1061
|
if (rangeObj.test(v)) {
|
|
1092
1062
|
if (!min || minSV.compare(v) === 1) {
|
|
1093
1063
|
min = v;
|
|
1094
|
-
minSV = new SemVer
|
|
1064
|
+
minSV = new SemVer(min, options);
|
|
1095
1065
|
}
|
|
1096
1066
|
}
|
|
1097
1067
|
});
|
|
1098
1068
|
return min;
|
|
1099
1069
|
};
|
|
1100
|
-
module.exports = minSatisfying
|
|
1101
|
-
})
|
|
1070
|
+
module.exports = minSatisfying;
|
|
1071
|
+
}));
|
|
1102
1072
|
|
|
1103
1073
|
//#endregion
|
|
1104
1074
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js
|
|
1105
|
-
var require_min_version = /* @__PURE__ */
|
|
1106
|
-
const SemVer
|
|
1107
|
-
const Range
|
|
1108
|
-
const gt
|
|
1109
|
-
const minVersion
|
|
1110
|
-
range = new Range
|
|
1111
|
-
let minver = new SemVer
|
|
1075
|
+
var require_min_version = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1076
|
+
const SemVer = require_semver$1();
|
|
1077
|
+
const Range = require_range();
|
|
1078
|
+
const gt = require_gt();
|
|
1079
|
+
const minVersion = (range, loose) => {
|
|
1080
|
+
range = new Range(range, loose);
|
|
1081
|
+
let minver = new SemVer("0.0.0");
|
|
1112
1082
|
if (range.test(minver)) return minver;
|
|
1113
|
-
minver = new SemVer
|
|
1083
|
+
minver = new SemVer("0.0.0-0");
|
|
1114
1084
|
if (range.test(minver)) return minver;
|
|
1115
1085
|
minver = null;
|
|
1116
1086
|
for (let i = 0; i < range.set.length; ++i) {
|
|
1117
1087
|
const comparators = range.set[i];
|
|
1118
1088
|
let setMin = null;
|
|
1119
1089
|
comparators.forEach((comparator) => {
|
|
1120
|
-
const compver = new SemVer
|
|
1090
|
+
const compver = new SemVer(comparator.semver.version);
|
|
1121
1091
|
switch (comparator.operator) {
|
|
1122
1092
|
case ">":
|
|
1123
1093
|
if (compver.prerelease.length === 0) compver.patch++;
|
|
@@ -1125,75 +1095,75 @@ var require_min_version = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semve
|
|
|
1125
1095
|
compver.raw = compver.format();
|
|
1126
1096
|
case "":
|
|
1127
1097
|
case ">=":
|
|
1128
|
-
if (!setMin || gt
|
|
1098
|
+
if (!setMin || gt(compver, setMin)) setMin = compver;
|
|
1129
1099
|
break;
|
|
1130
1100
|
case "<":
|
|
1131
1101
|
case "<=": break;
|
|
1132
1102
|
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
1133
1103
|
}
|
|
1134
1104
|
});
|
|
1135
|
-
if (setMin && (!minver || gt
|
|
1105
|
+
if (setMin && (!minver || gt(minver, setMin))) minver = setMin;
|
|
1136
1106
|
}
|
|
1137
1107
|
if (minver && range.test(minver)) return minver;
|
|
1138
1108
|
return null;
|
|
1139
1109
|
};
|
|
1140
|
-
module.exports = minVersion
|
|
1141
|
-
})
|
|
1110
|
+
module.exports = minVersion;
|
|
1111
|
+
}));
|
|
1142
1112
|
|
|
1143
1113
|
//#endregion
|
|
1144
1114
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js
|
|
1145
|
-
var require_valid = /* @__PURE__ */
|
|
1146
|
-
const Range
|
|
1147
|
-
const validRange
|
|
1115
|
+
var require_valid = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1116
|
+
const Range = require_range();
|
|
1117
|
+
const validRange = (range, options) => {
|
|
1148
1118
|
try {
|
|
1149
|
-
return new Range
|
|
1119
|
+
return new Range(range, options).range || "*";
|
|
1150
1120
|
} catch (er) {
|
|
1151
1121
|
return null;
|
|
1152
1122
|
}
|
|
1153
1123
|
};
|
|
1154
|
-
module.exports = validRange
|
|
1155
|
-
})
|
|
1124
|
+
module.exports = validRange;
|
|
1125
|
+
}));
|
|
1156
1126
|
|
|
1157
1127
|
//#endregion
|
|
1158
1128
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js
|
|
1159
|
-
var require_outside = /* @__PURE__ */
|
|
1160
|
-
const SemVer
|
|
1161
|
-
const Comparator
|
|
1162
|
-
const { ANY
|
|
1163
|
-
const Range
|
|
1164
|
-
const satisfies
|
|
1165
|
-
const gt
|
|
1166
|
-
const lt
|
|
1167
|
-
const lte
|
|
1168
|
-
const gte
|
|
1169
|
-
const outside
|
|
1170
|
-
version = new SemVer
|
|
1171
|
-
range = new Range
|
|
1129
|
+
var require_outside = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1130
|
+
const SemVer = require_semver$1();
|
|
1131
|
+
const Comparator = require_comparator();
|
|
1132
|
+
const { ANY } = Comparator;
|
|
1133
|
+
const Range = require_range();
|
|
1134
|
+
const satisfies = require_satisfies();
|
|
1135
|
+
const gt = require_gt();
|
|
1136
|
+
const lt = require_lt();
|
|
1137
|
+
const lte = require_lte();
|
|
1138
|
+
const gte = require_gte();
|
|
1139
|
+
const outside = (version, range, hilo, options) => {
|
|
1140
|
+
version = new SemVer(version, options);
|
|
1141
|
+
range = new Range(range, options);
|
|
1172
1142
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
1173
1143
|
switch (hilo) {
|
|
1174
1144
|
case ">":
|
|
1175
|
-
gtfn = gt
|
|
1176
|
-
ltefn = lte
|
|
1177
|
-
ltfn = lt
|
|
1145
|
+
gtfn = gt;
|
|
1146
|
+
ltefn = lte;
|
|
1147
|
+
ltfn = lt;
|
|
1178
1148
|
comp = ">";
|
|
1179
1149
|
ecomp = ">=";
|
|
1180
1150
|
break;
|
|
1181
1151
|
case "<":
|
|
1182
|
-
gtfn = lt
|
|
1183
|
-
ltefn = gte
|
|
1184
|
-
ltfn = gt
|
|
1152
|
+
gtfn = lt;
|
|
1153
|
+
ltefn = gte;
|
|
1154
|
+
ltfn = gt;
|
|
1185
1155
|
comp = "<";
|
|
1186
1156
|
ecomp = "<=";
|
|
1187
1157
|
break;
|
|
1188
1158
|
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
1189
1159
|
}
|
|
1190
|
-
if (satisfies
|
|
1160
|
+
if (satisfies(version, range, options)) return false;
|
|
1191
1161
|
for (let i = 0; i < range.set.length; ++i) {
|
|
1192
1162
|
const comparators = range.set[i];
|
|
1193
1163
|
let high = null;
|
|
1194
1164
|
let low = null;
|
|
1195
1165
|
comparators.forEach((comparator) => {
|
|
1196
|
-
if (comparator.semver === ANY
|
|
1166
|
+
if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0");
|
|
1197
1167
|
high = high || comparator;
|
|
1198
1168
|
low = low || comparator;
|
|
1199
1169
|
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
@@ -1205,48 +1175,48 @@ var require_outside = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.
|
|
|
1205
1175
|
}
|
|
1206
1176
|
return true;
|
|
1207
1177
|
};
|
|
1208
|
-
module.exports = outside
|
|
1209
|
-
})
|
|
1178
|
+
module.exports = outside;
|
|
1179
|
+
}));
|
|
1210
1180
|
|
|
1211
1181
|
//#endregion
|
|
1212
1182
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js
|
|
1213
|
-
var require_gtr = /* @__PURE__ */
|
|
1214
|
-
const outside
|
|
1215
|
-
const gtr
|
|
1216
|
-
module.exports = gtr
|
|
1217
|
-
})
|
|
1183
|
+
var require_gtr = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1184
|
+
const outside = require_outside();
|
|
1185
|
+
const gtr = (version, range, options) => outside(version, range, ">", options);
|
|
1186
|
+
module.exports = gtr;
|
|
1187
|
+
}));
|
|
1218
1188
|
|
|
1219
1189
|
//#endregion
|
|
1220
1190
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js
|
|
1221
|
-
var require_ltr = /* @__PURE__ */
|
|
1222
|
-
const outside
|
|
1223
|
-
const ltr
|
|
1224
|
-
module.exports = ltr
|
|
1225
|
-
})
|
|
1191
|
+
var require_ltr = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1192
|
+
const outside = require_outside();
|
|
1193
|
+
const ltr = (version, range, options) => outside(version, range, "<", options);
|
|
1194
|
+
module.exports = ltr;
|
|
1195
|
+
}));
|
|
1226
1196
|
|
|
1227
1197
|
//#endregion
|
|
1228
1198
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js
|
|
1229
|
-
var require_intersects = /* @__PURE__ */
|
|
1230
|
-
const Range
|
|
1231
|
-
const intersects
|
|
1232
|
-
r1 = new Range
|
|
1233
|
-
r2 = new Range
|
|
1199
|
+
var require_intersects = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1200
|
+
const Range = require_range();
|
|
1201
|
+
const intersects = (r1, r2, options) => {
|
|
1202
|
+
r1 = new Range(r1, options);
|
|
1203
|
+
r2 = new Range(r2, options);
|
|
1234
1204
|
return r1.intersects(r2, options);
|
|
1235
1205
|
};
|
|
1236
|
-
module.exports = intersects
|
|
1237
|
-
})
|
|
1206
|
+
module.exports = intersects;
|
|
1207
|
+
}));
|
|
1238
1208
|
|
|
1239
1209
|
//#endregion
|
|
1240
1210
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js
|
|
1241
|
-
var require_simplify = /* @__PURE__ */
|
|
1242
|
-
const satisfies
|
|
1243
|
-
const compare
|
|
1211
|
+
var require_simplify = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1212
|
+
const satisfies = require_satisfies();
|
|
1213
|
+
const compare = require_compare();
|
|
1244
1214
|
module.exports = (versions, range, options) => {
|
|
1245
1215
|
const set = [];
|
|
1246
1216
|
let first = null;
|
|
1247
1217
|
let prev = null;
|
|
1248
|
-
const v = versions.sort((a, b) => compare
|
|
1249
|
-
for (const version of v) if (satisfies
|
|
1218
|
+
const v = versions.sort((a, b) => compare(a, b, options));
|
|
1219
|
+
for (const version of v) if (satisfies(version, range, options)) {
|
|
1250
1220
|
prev = version;
|
|
1251
1221
|
if (!first) first = version;
|
|
1252
1222
|
} else {
|
|
@@ -1265,20 +1235,20 @@ var require_simplify = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7
|
|
|
1265
1235
|
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
1266
1236
|
return simplified.length < original.length ? simplified : range;
|
|
1267
1237
|
};
|
|
1268
|
-
})
|
|
1238
|
+
}));
|
|
1269
1239
|
|
|
1270
1240
|
//#endregion
|
|
1271
1241
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js
|
|
1272
|
-
var require_subset = /* @__PURE__ */
|
|
1273
|
-
const Range
|
|
1274
|
-
const Comparator
|
|
1275
|
-
const { ANY } = Comparator
|
|
1276
|
-
const satisfies
|
|
1277
|
-
const compare
|
|
1278
|
-
const subset
|
|
1242
|
+
var require_subset = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1243
|
+
const Range = require_range();
|
|
1244
|
+
const Comparator = require_comparator();
|
|
1245
|
+
const { ANY } = Comparator;
|
|
1246
|
+
const satisfies = require_satisfies();
|
|
1247
|
+
const compare = require_compare();
|
|
1248
|
+
const subset = (sub, dom, options = {}) => {
|
|
1279
1249
|
if (sub === dom) return true;
|
|
1280
|
-
sub = new Range
|
|
1281
|
-
dom = new Range
|
|
1250
|
+
sub = new Range(sub, options);
|
|
1251
|
+
dom = new Range(dom, options);
|
|
1282
1252
|
let sawNonNull = false;
|
|
1283
1253
|
OUTER: for (const simpleSub of sub.set) {
|
|
1284
1254
|
for (const simpleDom of dom.set) {
|
|
@@ -1290,8 +1260,8 @@ var require_subset = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7
|
|
|
1290
1260
|
}
|
|
1291
1261
|
return true;
|
|
1292
1262
|
};
|
|
1293
|
-
const minimumVersionWithPreRelease = [new Comparator
|
|
1294
|
-
const minimumVersion = [new Comparator
|
|
1263
|
+
const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
1264
|
+
const minimumVersion = [new Comparator(">=0.0.0")];
|
|
1295
1265
|
const simpleSubset = (sub, dom, options) => {
|
|
1296
1266
|
if (sub === dom) return true;
|
|
1297
1267
|
if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
|
|
@@ -1300,72 +1270,72 @@ var require_subset = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7
|
|
|
1300
1270
|
if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
|
|
1301
1271
|
else dom = minimumVersion;
|
|
1302
1272
|
const eqSet = /* @__PURE__ */ new Set();
|
|
1303
|
-
let gt
|
|
1304
|
-
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt
|
|
1305
|
-
else if (c.operator === "<" || c.operator === "<=") lt
|
|
1273
|
+
let gt, lt;
|
|
1274
|
+
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
|
|
1275
|
+
else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options);
|
|
1306
1276
|
else eqSet.add(c.semver);
|
|
1307
1277
|
if (eqSet.size > 1) return null;
|
|
1308
1278
|
let gtltComp;
|
|
1309
|
-
if (gt
|
|
1310
|
-
gtltComp = compare
|
|
1279
|
+
if (gt && lt) {
|
|
1280
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
1311
1281
|
if (gtltComp > 0) return null;
|
|
1312
|
-
else if (gtltComp === 0 && (gt
|
|
1282
|
+
else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null;
|
|
1313
1283
|
}
|
|
1314
|
-
for (const eq
|
|
1315
|
-
if (gt
|
|
1316
|
-
if (lt
|
|
1317
|
-
for (const c of dom) if (!satisfies
|
|
1284
|
+
for (const eq of eqSet) {
|
|
1285
|
+
if (gt && !satisfies(eq, String(gt), options)) return null;
|
|
1286
|
+
if (lt && !satisfies(eq, String(lt), options)) return null;
|
|
1287
|
+
for (const c of dom) if (!satisfies(eq, String(c), options)) return false;
|
|
1318
1288
|
return true;
|
|
1319
1289
|
}
|
|
1320
1290
|
let higher, lower;
|
|
1321
1291
|
let hasDomLT, hasDomGT;
|
|
1322
|
-
let needDomLTPre = lt
|
|
1323
|
-
let needDomGTPre = gt
|
|
1324
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt
|
|
1292
|
+
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
1293
|
+
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
1294
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
1325
1295
|
for (const c of dom) {
|
|
1326
1296
|
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
1327
1297
|
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
1328
|
-
if (gt
|
|
1298
|
+
if (gt) {
|
|
1329
1299
|
if (needDomGTPre) {
|
|
1330
1300
|
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) needDomGTPre = false;
|
|
1331
1301
|
}
|
|
1332
1302
|
if (c.operator === ">" || c.operator === ">=") {
|
|
1333
|
-
higher = higherGT(gt
|
|
1334
|
-
if (higher === c && higher !== gt
|
|
1335
|
-
} else if (gt
|
|
1303
|
+
higher = higherGT(gt, c, options);
|
|
1304
|
+
if (higher === c && higher !== gt) return false;
|
|
1305
|
+
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) return false;
|
|
1336
1306
|
}
|
|
1337
|
-
if (lt
|
|
1307
|
+
if (lt) {
|
|
1338
1308
|
if (needDomLTPre) {
|
|
1339
1309
|
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) needDomLTPre = false;
|
|
1340
1310
|
}
|
|
1341
1311
|
if (c.operator === "<" || c.operator === "<=") {
|
|
1342
|
-
lower = lowerLT(lt
|
|
1343
|
-
if (lower === c && lower !== lt
|
|
1344
|
-
} else if (lt
|
|
1312
|
+
lower = lowerLT(lt, c, options);
|
|
1313
|
+
if (lower === c && lower !== lt) return false;
|
|
1314
|
+
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) return false;
|
|
1345
1315
|
}
|
|
1346
|
-
if (!c.operator && (lt
|
|
1316
|
+
if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
|
|
1347
1317
|
}
|
|
1348
|
-
if (gt
|
|
1349
|
-
if (lt
|
|
1318
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
|
|
1319
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
|
|
1350
1320
|
if (needDomGTPre || needDomLTPre) return false;
|
|
1351
1321
|
return true;
|
|
1352
1322
|
};
|
|
1353
1323
|
const higherGT = (a, b, options) => {
|
|
1354
1324
|
if (!a) return b;
|
|
1355
|
-
const comp = compare
|
|
1325
|
+
const comp = compare(a.semver, b.semver, options);
|
|
1356
1326
|
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
1357
1327
|
};
|
|
1358
1328
|
const lowerLT = (a, b, options) => {
|
|
1359
1329
|
if (!a) return b;
|
|
1360
|
-
const comp = compare
|
|
1330
|
+
const comp = compare(a.semver, b.semver, options);
|
|
1361
1331
|
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
1362
1332
|
};
|
|
1363
|
-
module.exports = subset
|
|
1364
|
-
})
|
|
1333
|
+
module.exports = subset;
|
|
1334
|
+
}));
|
|
1365
1335
|
|
|
1366
1336
|
//#endregion
|
|
1367
1337
|
//#region node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js
|
|
1368
|
-
var require_semver = /* @__PURE__ */
|
|
1338
|
+
var require_semver = /* @__PURE__ */ require_constants$1.__commonJSMin(((exports, module) => {
|
|
1369
1339
|
const internalRe = require_re();
|
|
1370
1340
|
const constants = require_constants();
|
|
1371
1341
|
const SemVer = require_semver$1();
|
|
@@ -1454,10 +1424,11 @@ var require_semver = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7
|
|
|
1454
1424
|
compareIdentifiers: identifiers.compareIdentifiers,
|
|
1455
1425
|
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
1456
1426
|
};
|
|
1457
|
-
})
|
|
1427
|
+
}));
|
|
1458
1428
|
|
|
1459
1429
|
//#endregion
|
|
1460
1430
|
//#region src/controller/helpers/getCodemodConfig.ts
|
|
1431
|
+
/** Retrieves a JSON object from a file path, returning null if the file does not exist */
|
|
1461
1432
|
const getJsonFromPath = (baseDir, fileName) => {
|
|
1462
1433
|
const jsonPath = (0, node_path.join)(baseDir, fileName);
|
|
1463
1434
|
try {
|
|
@@ -1467,18 +1438,17 @@ const getJsonFromPath = (baseDir, fileName) => {
|
|
|
1467
1438
|
throw new Error(`Error reading ${jsonPath}`);
|
|
1468
1439
|
}
|
|
1469
1440
|
};
|
|
1470
|
-
function getCodemodConfig(codemodPath
|
|
1471
|
-
const { throwOnError = false } = options;
|
|
1441
|
+
function getCodemodConfig(codemodPath) {
|
|
1472
1442
|
try {
|
|
1473
1443
|
return getJsonFromPath((0, node_path.dirname)(codemodPath), "config.json");
|
|
1474
|
-
} catch
|
|
1475
|
-
|
|
1476
|
-
return null;
|
|
1444
|
+
} catch {
|
|
1445
|
+
throw new Error(`Error reading codemod config for ${codemodPath}`);
|
|
1477
1446
|
}
|
|
1478
1447
|
}
|
|
1479
1448
|
|
|
1480
1449
|
//#endregion
|
|
1481
1450
|
//#region src/controller/helpers/repository.ts
|
|
1451
|
+
const execAsync = (0, node_util.promisify)(node_child_process.exec);
|
|
1482
1452
|
/**
|
|
1483
1453
|
* Finds the root of the project by looking for the `.git` directory.
|
|
1484
1454
|
*/
|
|
@@ -1503,9 +1473,9 @@ function findProjectRoot() {
|
|
|
1503
1473
|
* the presence of `package.json` files and them optimistically
|
|
1504
1474
|
* containing a `@transferwise/components` string.
|
|
1505
1475
|
* */
|
|
1506
|
-
function findPackages() {
|
|
1476
|
+
async function findPackages() {
|
|
1507
1477
|
try {
|
|
1508
|
-
const
|
|
1478
|
+
const { stdout } = await execAsync([
|
|
1509
1479
|
"find ./",
|
|
1510
1480
|
"-type f",
|
|
1511
1481
|
"-name \"package.json\"",
|
|
@@ -1515,7 +1485,8 @@ function findPackages() {
|
|
|
1515
1485
|
].join(" "), {
|
|
1516
1486
|
cwd: findProjectRoot(),
|
|
1517
1487
|
encoding: "utf8"
|
|
1518
|
-
})
|
|
1488
|
+
});
|
|
1489
|
+
const packages = stdout.trim().split("\n").filter(Boolean).map(node_path.default.dirname);
|
|
1519
1490
|
if (packages.length === 0) throw new Error();
|
|
1520
1491
|
return packages;
|
|
1521
1492
|
} catch {
|
|
@@ -1553,9 +1524,7 @@ const renderTable = (data, indexHeading = "index") => {
|
|
|
1553
1524
|
const endSeparator = `└${firstCellLine}┴${remainingLines.join("┴")}┘`;
|
|
1554
1525
|
const formatRow = (cells) => {
|
|
1555
1526
|
return `│${cells.map((cell, index) => {
|
|
1556
|
-
const
|
|
1557
|
-
const displayWidth = getDisplayWidth(cell);
|
|
1558
|
-
const padding = width - displayWidth;
|
|
1527
|
+
const padding = columnWidths[index] - getDisplayWidth(cell);
|
|
1559
1528
|
return ` ${cell}${" ".repeat(Math.max(0, padding))} `;
|
|
1560
1529
|
}).join("│")}│`;
|
|
1561
1530
|
};
|
|
@@ -1570,7 +1539,7 @@ const renderTable = (data, indexHeading = "index") => {
|
|
|
1570
1539
|
|
|
1571
1540
|
//#endregion
|
|
1572
1541
|
//#region src/controller/helpers/dependencyChecks.ts
|
|
1573
|
-
var import_semver = /* @__PURE__ */ __toESM(require_semver());
|
|
1542
|
+
var import_semver = /* @__PURE__ */ require_constants$1.__toESM(require_semver());
|
|
1574
1543
|
/**
|
|
1575
1544
|
* Checks if the installed version satisfies the given version requirement.
|
|
1576
1545
|
*/
|
|
@@ -1598,8 +1567,7 @@ function getVersionFromNodeModules(packagePath, packageName) {
|
|
|
1598
1567
|
function findClosestPackageJson(currentPath) {
|
|
1599
1568
|
const resolvedPath = (0, node_path.resolve)(currentPath);
|
|
1600
1569
|
const projectRoot = findProjectRoot();
|
|
1601
|
-
|
|
1602
|
-
if ((0, node_fs.existsSync)(packageJsonPath)) return resolvedPath;
|
|
1570
|
+
if ((0, node_fs.existsSync)((0, node_path.join)(resolvedPath, "package.json"))) return resolvedPath;
|
|
1603
1571
|
if (projectRoot && resolvedPath === projectRoot) return null;
|
|
1604
1572
|
const parentPath = (0, node_path.dirname)(resolvedPath);
|
|
1605
1573
|
if (parentPath === resolvedPath) return null;
|
|
@@ -1610,22 +1578,20 @@ function findClosestPackageJson(currentPath) {
|
|
|
1610
1578
|
*/
|
|
1611
1579
|
const assessPrerequisites = (packagePath, codemodPath) => {
|
|
1612
1580
|
try {
|
|
1613
|
-
const
|
|
1614
|
-
OK: "\x1B[32m✔\x1B[0m",
|
|
1615
|
-
FAIL: "\x1B[31m✗\x1B[0m"
|
|
1616
|
-
};
|
|
1617
|
-
const codemodConfig = getJsonFromPath((0, node_path.dirname)(codemodPath), "config.json");
|
|
1581
|
+
const codemodConfig = getCodemodConfig(codemodPath);
|
|
1618
1582
|
const resolvedPackagePath = (0, node_path.resolve)(process.cwd(), packagePath);
|
|
1619
1583
|
const actualPackagePath = (0, node_fs.existsSync)((0, node_path.join)(resolvedPackagePath, "package.json")) ? resolvedPackagePath : findClosestPackageJson(resolvedPackagePath);
|
|
1620
1584
|
if (!actualPackagePath) {
|
|
1621
|
-
console.error(`${
|
|
1585
|
+
console.error(`${require_constants$1.CONSOLE_ICONS.error} \x1b[1mCould not find a package.json in or above ${packagePath}\x1b[0m`);
|
|
1622
1586
|
return false;
|
|
1623
1587
|
}
|
|
1624
|
-
if (actualPackagePath !== resolvedPackagePath) console.info(
|
|
1625
|
-
const
|
|
1588
|
+
if (actualPackagePath !== resolvedPackagePath) console.info(`${require_constants$1.CONSOLE_ICONS.info} Using package.json from ${actualPackagePath} for dependency checks`);
|
|
1589
|
+
const packageJson = getJsonFromPath(actualPackagePath, "package.json");
|
|
1590
|
+
if (!packageJson) return false;
|
|
1591
|
+
const { dependencies = {}, peerDependencies = {} } = packageJson;
|
|
1626
1592
|
const comparisons = {};
|
|
1627
1593
|
let isCompliant = true;
|
|
1628
|
-
if (codemodConfig
|
|
1594
|
+
if (codemodConfig?.prerequisites) Object.entries(codemodConfig.prerequisites).forEach(([name, versionRequirement]) => {
|
|
1629
1595
|
const nodeModulesVersion = getVersionFromNodeModules(actualPackagePath, name);
|
|
1630
1596
|
const isDependencySatisfied = isVersionSatisfied(dependencies[name], versionRequirement);
|
|
1631
1597
|
const isPeerDependencySatisfied = isVersionSatisfied(peerDependencies[name], versionRequirement);
|
|
@@ -1634,14 +1600,14 @@ const assessPrerequisites = (packagePath, codemodPath) => {
|
|
|
1634
1600
|
isCompliant = false;
|
|
1635
1601
|
comparisons[name] = {
|
|
1636
1602
|
required: versionRequirement,
|
|
1637
|
-
dependencies: isDependencySatisfied ?
|
|
1638
|
-
peerDependencies: isPeerDependencySatisfied ?
|
|
1639
|
-
node_modules: isInstalledSatisfied ?
|
|
1603
|
+
dependencies: isDependencySatisfied ? require_constants$1.CONSOLE_ICONS.success : `${require_constants$1.CONSOLE_ICONS.error} ${dependencies[name] || "N/A"}`,
|
|
1604
|
+
peerDependencies: isPeerDependencySatisfied ? require_constants$1.CONSOLE_ICONS.success : `${require_constants$1.CONSOLE_ICONS.error} ${peerDependencies[name] || "N/A"}`,
|
|
1605
|
+
node_modules: isInstalledSatisfied ? require_constants$1.CONSOLE_ICONS.success : `${require_constants$1.CONSOLE_ICONS.error} ${nodeModulesVersion || "N/A"}`
|
|
1640
1606
|
};
|
|
1641
1607
|
}
|
|
1642
1608
|
});
|
|
1643
1609
|
if (!isCompliant) {
|
|
1644
|
-
console.info(`${
|
|
1610
|
+
console.info(`${require_constants$1.CONSOLE_ICONS.error} \x1b[31mPrerequisite check failed -\x1b[0m \x1b[2m${packagePath}\x1b[0m`);
|
|
1645
1611
|
renderTable(comparisons, "package");
|
|
1646
1612
|
return false;
|
|
1647
1613
|
}
|
|
@@ -1651,6 +1617,53 @@ const assessPrerequisites = (packagePath, codemodPath) => {
|
|
|
1651
1617
|
return false;
|
|
1652
1618
|
}
|
|
1653
1619
|
};
|
|
1620
|
+
/**
|
|
1621
|
+
* Batch prerequisite assessment across multiple target paths.
|
|
1622
|
+
* - Resolves each target to its effective package root (closest package.json)
|
|
1623
|
+
* - Deduplicates by package root and checks each unique root once
|
|
1624
|
+
* - Logs a concise summary; detailed table is logged by assessPrerequisites on failure
|
|
1625
|
+
*/
|
|
1626
|
+
const assessPrerequisitesBatch = (targetPaths, codemodPath, spinnies) => {
|
|
1627
|
+
const packageRootToTargets = /* @__PURE__ */ new Map();
|
|
1628
|
+
const failedTargetsNoPackage = [];
|
|
1629
|
+
for (const target of targetPaths) {
|
|
1630
|
+
const resolved = (0, node_path.resolve)(process.cwd(), target);
|
|
1631
|
+
const actual = (0, node_fs.existsSync)((0, node_path.join)(resolved, "package.json")) ? resolved : findClosestPackageJson(resolved);
|
|
1632
|
+
if (actual) {
|
|
1633
|
+
const list$1 = packageRootToTargets.get(actual) ?? [];
|
|
1634
|
+
list$1.push(target);
|
|
1635
|
+
packageRootToTargets.set(target, list$1);
|
|
1636
|
+
} else failedTargetsNoPackage.push(target);
|
|
1637
|
+
}
|
|
1638
|
+
let allPassed = true;
|
|
1639
|
+
const results = /* @__PURE__ */ new Map();
|
|
1640
|
+
for (const [pkgRoot] of packageRootToTargets.entries()) {
|
|
1641
|
+
const passed = assessPrerequisites(pkgRoot, codemodPath);
|
|
1642
|
+
results.set(pkgRoot, passed);
|
|
1643
|
+
if (!passed) allPassed = false;
|
|
1644
|
+
}
|
|
1645
|
+
const totalTargets = targetPaths.length;
|
|
1646
|
+
const uniquePackages = packageRootToTargets.size;
|
|
1647
|
+
const passedCount = Array.from(results.values()).filter(Boolean).length;
|
|
1648
|
+
const failedCount = uniquePackages - passedCount;
|
|
1649
|
+
if (failedTargetsNoPackage.length || !passedCount) if (!passedCount) spinnies.fail("prerequisite-check", { text: "All targets failed prerequisite checks" });
|
|
1650
|
+
else {
|
|
1651
|
+
spinnies.fail("prerequisite-check", { text: `No package.json found for ${failedTargetsNoPackage.length} target${failedTargetsNoPackage.length !== 1 ? "s" : ""} (searching upwards to project root).` });
|
|
1652
|
+
failedTargetsNoPackage.forEach((t) => console.error(`- ${t}`));
|
|
1653
|
+
}
|
|
1654
|
+
else {
|
|
1655
|
+
const failedPart = failedCount > 0 ? `, \x1b[31m${failedCount} failed\x1b[0m` : "";
|
|
1656
|
+
spinnies.succeed("prerequisite-check", { text: `\x1b[0mChecked ${totalTargets} target${totalTargets !== 1 ? "s" : ""} across ${uniquePackages} package${uniquePackages !== 1 ? "s" : ""}:\x1b[0m \x1b[32m${passedCount} passed\x1b[0m${failedPart}` });
|
|
1657
|
+
}
|
|
1658
|
+
const failedPackageRoots = Array.from(results.entries()).filter(([, ok]) => !ok).map(([root]) => root);
|
|
1659
|
+
return {
|
|
1660
|
+
allPassed,
|
|
1661
|
+
results,
|
|
1662
|
+
packageRootToTargets,
|
|
1663
|
+
failedPackageRoots,
|
|
1664
|
+
failedTargetsNoPackage
|
|
1665
|
+
};
|
|
1666
|
+
};
|
|
1654
1667
|
|
|
1655
1668
|
//#endregion
|
|
1656
1669
|
//#region src/controller/helpers/getOptions.ts
|
|
@@ -1714,23 +1727,22 @@ const queryPackages = async (packages) => {
|
|
|
1714
1727
|
const message = "Path to run codemod on:";
|
|
1715
1728
|
const nonRootPackages = packages.filter((pkg) => pkg !== "." && pkg !== "./");
|
|
1716
1729
|
if (packages.length === 1 && (packages[0] === "." || packages[0] === "./")) {
|
|
1717
|
-
if (await (0,
|
|
1730
|
+
if (await (0, _inquirer_prompts.confirm)({
|
|
1718
1731
|
message: "Do you want to target a specific folder instead of the entire project?",
|
|
1719
1732
|
default: false
|
|
1720
1733
|
})) {
|
|
1721
|
-
const customPath = await (0,
|
|
1734
|
+
const customPath = await (0, _inquirer_prompts.search)({
|
|
1722
1735
|
message: "Enter the folder path (relative to project root):",
|
|
1723
1736
|
source: async (searchInput) => {
|
|
1724
|
-
|
|
1725
|
-
return getDirectoryChoices(rootPath, searchInput || "").map((choice) => ({
|
|
1737
|
+
return getDirectoryChoices(process.cwd(), searchInput || "").map((choice) => ({
|
|
1726
1738
|
name: choice === "." ? ". (entire project)" : choice,
|
|
1727
1739
|
value: choice,
|
|
1728
1740
|
description: choice === "." ? "Target the entire project" : `Target ${choice} directory`
|
|
1729
1741
|
}));
|
|
1730
1742
|
},
|
|
1731
|
-
validate: (path$
|
|
1732
|
-
if (!path$
|
|
1733
|
-
const fullPath = (0, node_path.join)(process.cwd(), path$
|
|
1743
|
+
validate: (path$4) => {
|
|
1744
|
+
if (!path$4?.trim()) return "Path cannot be empty";
|
|
1745
|
+
const fullPath = (0, node_path.join)(process.cwd(), path$4);
|
|
1734
1746
|
if (!(0, node_fs.existsSync)(fullPath)) return "Folder does not exist";
|
|
1735
1747
|
if (!(0, node_fs.statSync)(fullPath).isDirectory()) return "Path must be a directory";
|
|
1736
1748
|
return true;
|
|
@@ -1742,7 +1754,7 @@ const queryPackages = async (packages) => {
|
|
|
1742
1754
|
logToInquirer(message, packages[0] === "./" ? "." : packages[0]);
|
|
1743
1755
|
return [packages[0] === "./" ? "." : packages[0]];
|
|
1744
1756
|
}
|
|
1745
|
-
if (nonRootPackages.length >= 1) return (0,
|
|
1757
|
+
if (nonRootPackages.length >= 1) return (0, _inquirer_prompts.checkbox)({
|
|
1746
1758
|
required: true,
|
|
1747
1759
|
message: "Select packages to transform:",
|
|
1748
1760
|
choices: nonRootPackages.map((file) => ({
|
|
@@ -1762,7 +1774,7 @@ const determineTransformer = async ({ candidate, transformFiles }) => {
|
|
|
1762
1774
|
logToInquirer(codemodMessage, candidate);
|
|
1763
1775
|
return candidate;
|
|
1764
1776
|
}
|
|
1765
|
-
return (0,
|
|
1777
|
+
return (0, _inquirer_prompts.select)({
|
|
1766
1778
|
message: codemodMessage,
|
|
1767
1779
|
choices: transformFiles.map((file) => ({
|
|
1768
1780
|
name: file,
|
|
@@ -1794,7 +1806,7 @@ const determineIsDryMode = async (args) => {
|
|
|
1794
1806
|
logToInquirer(message, "Yes");
|
|
1795
1807
|
return true;
|
|
1796
1808
|
}
|
|
1797
|
-
return (0,
|
|
1809
|
+
return (0, _inquirer_prompts.confirm)({
|
|
1798
1810
|
message,
|
|
1799
1811
|
default: false
|
|
1800
1812
|
});
|
|
@@ -1808,7 +1820,7 @@ const determineIsPrint = async (args) => {
|
|
|
1808
1820
|
logToInquirer(message, "Yes");
|
|
1809
1821
|
return true;
|
|
1810
1822
|
}
|
|
1811
|
-
return (0,
|
|
1823
|
+
return (0, _inquirer_prompts.confirm)({
|
|
1812
1824
|
message,
|
|
1813
1825
|
default: false
|
|
1814
1826
|
});
|
|
@@ -1826,12 +1838,12 @@ const determineIgnorePatterns = async (args) => {
|
|
|
1826
1838
|
if (ignorePattern) {
|
|
1827
1839
|
logToInquirer(message, ignorePattern);
|
|
1828
1840
|
userPatterns = ignorePattern;
|
|
1829
|
-
} else userPatterns = await (0,
|
|
1841
|
+
} else userPatterns = await (0, _inquirer_prompts.input)({
|
|
1830
1842
|
message,
|
|
1831
1843
|
validate: () => true
|
|
1832
1844
|
});
|
|
1833
1845
|
const allPatterns = [...ALWAYS_IGNORED_FOLDERS];
|
|
1834
|
-
if (userPatterns
|
|
1846
|
+
if (userPatterns?.trim()) allPatterns.push(...userPatterns.split(",").map((p) => p.trim()));
|
|
1835
1847
|
return allPatterns.join(",");
|
|
1836
1848
|
};
|
|
1837
1849
|
/**
|
|
@@ -1847,35 +1859,28 @@ const determineGitIgnore = async (args) => {
|
|
|
1847
1859
|
logToInquirer(message, "No");
|
|
1848
1860
|
return false;
|
|
1849
1861
|
}
|
|
1850
|
-
return (0,
|
|
1862
|
+
return (0, _inquirer_prompts.confirm)({
|
|
1851
1863
|
message,
|
|
1852
1864
|
default: true
|
|
1853
1865
|
});
|
|
1854
1866
|
};
|
|
1855
|
-
async function getOptions({ transformFiles, packages, root, preselectedTransformFile }) {
|
|
1867
|
+
async function getOptions({ transformFiles, transformerType, packages, root, preselectedTransformFile }) {
|
|
1856
1868
|
const args = process.argv.slice(2);
|
|
1857
1869
|
if (preselectedTransformFile && args[0] === preselectedTransformFile) args.shift();
|
|
1858
|
-
const transformFile = preselectedTransformFile || await determineTransformer({
|
|
1859
|
-
candidate: args[0] ?? "",
|
|
1860
|
-
transformFiles
|
|
1861
|
-
});
|
|
1862
|
-
const pathCandidate = preselectedTransformFile ? args[0] ?? "" : args[1] ?? "";
|
|
1863
|
-
const targetPaths = await determinePaths({
|
|
1864
|
-
candidate: pathCandidate,
|
|
1865
|
-
root,
|
|
1866
|
-
packages
|
|
1867
|
-
});
|
|
1868
|
-
const isDry = await determineIsDryMode(args);
|
|
1869
|
-
const isPrint = await determineIsPrint(args);
|
|
1870
|
-
const ignorePatterns = await determineIgnorePatterns(args);
|
|
1871
|
-
const useGitIgnore = await determineGitIgnore(args);
|
|
1872
1870
|
return {
|
|
1873
|
-
transformFile
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1871
|
+
transformFile: preselectedTransformFile || await determineTransformer({
|
|
1872
|
+
candidate: args[0] ?? "",
|
|
1873
|
+
transformFiles
|
|
1874
|
+
}),
|
|
1875
|
+
targetPaths: await determinePaths({
|
|
1876
|
+
candidate: preselectedTransformFile ? args[0] ?? "" : args[1] ?? "",
|
|
1877
|
+
root,
|
|
1878
|
+
packages
|
|
1879
|
+
}),
|
|
1880
|
+
isDry: transformerType === "jscodeshift" ? await determineIsDryMode(args) : false,
|
|
1881
|
+
isPrint: await determineIsPrint(args),
|
|
1882
|
+
ignorePatterns: transformerType === "claude" ? ALWAYS_IGNORED_FOLDERS.join(",") : await determineIgnorePatterns(args),
|
|
1883
|
+
useGitIgnore: transformerType === "jscodeshift" ? await determineGitIgnore(args) : true
|
|
1879
1884
|
};
|
|
1880
1885
|
}
|
|
1881
1886
|
var getOptions_default = getOptions;
|
|
@@ -1927,7 +1932,7 @@ var reportManualReview_default = reportManualReview;
|
|
|
1927
1932
|
//#region src/controller/helpers/runTransformPrompts.ts
|
|
1928
1933
|
async function askPrompt(p) {
|
|
1929
1934
|
switch (p.type) {
|
|
1930
|
-
case "select": return (0,
|
|
1935
|
+
case "select": return (0, _inquirer_prompts.select)({
|
|
1931
1936
|
message: p.message,
|
|
1932
1937
|
choices: (p.choices ?? []).map((c) => ({
|
|
1933
1938
|
name: c.name,
|
|
@@ -1935,12 +1940,12 @@ async function askPrompt(p) {
|
|
|
1935
1940
|
})),
|
|
1936
1941
|
default: p.default
|
|
1937
1942
|
});
|
|
1938
|
-
case "confirm": return (0,
|
|
1943
|
+
case "confirm": return (0, _inquirer_prompts.confirm)({
|
|
1939
1944
|
message: p.message,
|
|
1940
1945
|
default: typeof p.default === "boolean" ? p.default : false
|
|
1941
1946
|
});
|
|
1942
1947
|
case "input":
|
|
1943
|
-
default: return (0,
|
|
1948
|
+
default: return (0, _inquirer_prompts.input)({
|
|
1944
1949
|
message: p.message,
|
|
1945
1950
|
default: p.default ?? ""
|
|
1946
1951
|
});
|
|
@@ -1963,16 +1968,24 @@ async function runTransformPrompts(codemodPath) {
|
|
|
1963
1968
|
}
|
|
1964
1969
|
|
|
1965
1970
|
//#endregion
|
|
1966
|
-
|
|
1971
|
+
//#region src/controller/helpers/validateClaudeConfig.ts
|
|
1972
|
+
const CLAUDE_SETTINGS_FILE = ".claude/settings.json";
|
|
1973
|
+
function validateClaudeConfig() {
|
|
1974
|
+
const claudeSettingsPath = node_path.default.resolve(process.env.HOME || "", CLAUDE_SETTINGS_FILE);
|
|
1975
|
+
if (!node_fs.default.existsSync(claudeSettingsPath)) throw new Error(`${require_constants$1.CONSOLE_ICONS.error} Claude Code is not configured. Expected settings file at: ${claudeSettingsPath}. Please follow the setup instructions:\n https://transferwise.atlassian.net/wiki/spaces/GenAIP/pages/3709765113/Configuring+Claude+Code\n`);
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
//#endregion
|
|
1979
|
+
Object.defineProperty(exports, 'assessPrerequisites', {
|
|
1967
1980
|
enumerable: true,
|
|
1968
1981
|
get: function () {
|
|
1969
|
-
return
|
|
1982
|
+
return assessPrerequisites;
|
|
1970
1983
|
}
|
|
1971
1984
|
});
|
|
1972
|
-
Object.defineProperty(exports, '
|
|
1985
|
+
Object.defineProperty(exports, 'assessPrerequisitesBatch', {
|
|
1973
1986
|
enumerable: true,
|
|
1974
1987
|
get: function () {
|
|
1975
|
-
return
|
|
1988
|
+
return assessPrerequisitesBatch;
|
|
1976
1989
|
}
|
|
1977
1990
|
});
|
|
1978
1991
|
Object.defineProperty(exports, 'findPackages', {
|
|
@@ -1987,6 +2000,12 @@ Object.defineProperty(exports, 'findProjectRoot', {
|
|
|
1987
2000
|
return findProjectRoot;
|
|
1988
2001
|
}
|
|
1989
2002
|
});
|
|
2003
|
+
Object.defineProperty(exports, 'getCodemodConfig', {
|
|
2004
|
+
enumerable: true,
|
|
2005
|
+
get: function () {
|
|
2006
|
+
return getCodemodConfig;
|
|
2007
|
+
}
|
|
2008
|
+
});
|
|
1990
2009
|
Object.defineProperty(exports, 'getOptions_default', {
|
|
1991
2010
|
enumerable: true,
|
|
1992
2011
|
get: function () {
|
|
@@ -2017,4 +2036,10 @@ Object.defineProperty(exports, 'runTransformPrompts', {
|
|
|
2017
2036
|
return runTransformPrompts;
|
|
2018
2037
|
}
|
|
2019
2038
|
});
|
|
2020
|
-
|
|
2039
|
+
Object.defineProperty(exports, 'validateClaudeConfig', {
|
|
2040
|
+
enumerable: true,
|
|
2041
|
+
get: function () {
|
|
2042
|
+
return validateClaudeConfig;
|
|
2043
|
+
}
|
|
2044
|
+
});
|
|
2045
|
+
//# sourceMappingURL=helpers-Z1jZGLmt.js.map
|