react-doctor 0.4.2-dev.93d4eec → 0.4.2-dev.a254414

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lsp.js CHANGED
@@ -190,7 +190,7 @@ var JsonReportV2 = class extends Schema.Class("JsonReportV2")({
190
190
  Schema.Union([JsonReportV1, JsonReportV2]);
191
191
  //#endregion
192
192
  //#region ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/constants.js
193
- var require_constants = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
193
+ var require_constants$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
194
194
  const WIN_SLASH = "\\\\/";
195
195
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
196
196
  const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
@@ -360,7 +360,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
360
360
  //#endregion
361
361
  //#region ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/utils.js
362
362
  var require_utils = /* @__PURE__ */ __commonJSMin$1(((exports) => {
363
- const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
363
+ const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$1();
364
364
  exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
365
365
  exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
366
366
  exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
@@ -409,7 +409,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin$1(((exports) => {
409
409
  //#region ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/scan.js
410
410
  var require_scan = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
411
411
  const utils = require_utils();
412
- const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants();
412
+ const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants$1();
413
413
  const isPathSeparator = (code) => {
414
414
  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
415
415
  };
@@ -694,8 +694,8 @@ var require_scan = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
694
694
  }));
695
695
  //#endregion
696
696
  //#region ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/parse.js
697
- var require_parse = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
698
- const constants = require_constants();
697
+ var require_parse$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
698
+ const constants = require_constants$1();
699
699
  const utils = require_utils();
700
700
  /**
701
701
  * Constants
@@ -1751,9 +1751,9 @@ var require_parse = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
1751
1751
  //#region ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/picomatch.js
1752
1752
  var require_picomatch$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
1753
1753
  const scan = require_scan();
1754
- const parse = require_parse();
1754
+ const parse = require_parse$1();
1755
1755
  const utils = require_utils();
1756
- const constants = require_constants();
1756
+ const constants = require_constants$1();
1757
1757
  const isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
1758
1758
  /**
1759
1759
  * Creates a matcher function from one or more glob patterns. The
@@ -2048,8 +2048,8 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) =>
2048
2048
  module.exports = picomatch;
2049
2049
  }));
2050
2050
  //#endregion
2051
- //#region ../core/dist/index.js
2052
- var import_picomatch = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2051
+ //#region ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/index.js
2052
+ var require_picomatch = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2053
2053
  const pico = require_picomatch$1();
2054
2054
  const utils = require_utils();
2055
2055
  function picomatch(glob, options, returnState = false) {
@@ -2061,7 +2061,1349 @@ var import_picomatch = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin$
2061
2061
  }
2062
2062
  Object.assign(picomatch, pico);
2063
2063
  module.exports = picomatch;
2064
- })))(), 1);
2064
+ }));
2065
+ //#endregion
2066
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.js
2067
+ var require_constants = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2068
+ const SEMVER_SPEC_VERSION = "2.0.0";
2069
+ const MAX_LENGTH = 256;
2070
+ const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
2071
+ module.exports = {
2072
+ MAX_LENGTH,
2073
+ MAX_SAFE_COMPONENT_LENGTH: 16,
2074
+ MAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6,
2075
+ MAX_SAFE_INTEGER,
2076
+ RELEASE_TYPES: [
2077
+ "major",
2078
+ "premajor",
2079
+ "minor",
2080
+ "preminor",
2081
+ "patch",
2082
+ "prepatch",
2083
+ "prerelease"
2084
+ ],
2085
+ SEMVER_SPEC_VERSION,
2086
+ FLAG_INCLUDE_PRERELEASE: 1,
2087
+ FLAG_LOOSE: 2
2088
+ };
2089
+ }));
2090
+ //#endregion
2091
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.js
2092
+ var require_debug = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2093
+ module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
2094
+ }));
2095
+ //#endregion
2096
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.js
2097
+ var require_re = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2098
+ const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
2099
+ const debug = require_debug();
2100
+ exports = module.exports = {};
2101
+ const re = exports.re = [];
2102
+ const safeRe = exports.safeRe = [];
2103
+ const src = exports.src = [];
2104
+ const safeSrc = exports.safeSrc = [];
2105
+ const t = exports.t = {};
2106
+ let R = 0;
2107
+ const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
2108
+ const safeRegexReplacements = [
2109
+ ["\\s", 1],
2110
+ ["\\d", MAX_LENGTH],
2111
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
2112
+ ];
2113
+ const makeSafeRegex = (value) => {
2114
+ for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
2115
+ return value;
2116
+ };
2117
+ const createToken = (name, value, isGlobal) => {
2118
+ const safe = makeSafeRegex(value);
2119
+ const index = R++;
2120
+ debug(name, index, value);
2121
+ t[name] = index;
2122
+ src[index] = value;
2123
+ safeSrc[index] = safe;
2124
+ re[index] = new RegExp(value, isGlobal ? "g" : void 0);
2125
+ safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
2126
+ };
2127
+ createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
2128
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
2129
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
2130
+ createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
2131
+ createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
2132
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
2133
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
2134
+ createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
2135
+ createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
2136
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
2137
+ createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
2138
+ createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
2139
+ createToken("FULL", `^${src[t.FULLPLAIN]}$`);
2140
+ createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
2141
+ createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
2142
+ createToken("GTLT", "((?:<|>)?=?)");
2143
+ createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
2144
+ createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
2145
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
2146
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
2147
+ createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
2148
+ createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
2149
+ createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
2150
+ createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
2151
+ createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
2152
+ createToken("COERCERTL", src[t.COERCE], true);
2153
+ createToken("COERCERTLFULL", src[t.COERCEFULL], true);
2154
+ createToken("LONETILDE", "(?:~>?)");
2155
+ createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
2156
+ exports.tildeTrimReplace = "$1~";
2157
+ createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
2158
+ createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
2159
+ createToken("LONECARET", "(?:\\^)");
2160
+ createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
2161
+ exports.caretTrimReplace = "$1^";
2162
+ createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
2163
+ createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
2164
+ createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
2165
+ createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
2166
+ createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
2167
+ exports.comparatorTrimReplace = "$1$2$3";
2168
+ createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
2169
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
2170
+ createToken("STAR", "(<|>)?=?\\s*\\*");
2171
+ createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
2172
+ createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
2173
+ }));
2174
+ //#endregion
2175
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.js
2176
+ var require_parse_options = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2177
+ const looseOption = Object.freeze({ loose: true });
2178
+ const emptyOpts = Object.freeze({});
2179
+ const parseOptions = (options) => {
2180
+ if (!options) return emptyOpts;
2181
+ if (typeof options !== "object") return looseOption;
2182
+ return options;
2183
+ };
2184
+ module.exports = parseOptions;
2185
+ }));
2186
+ //#endregion
2187
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.js
2188
+ var require_identifiers = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2189
+ const numeric = /^[0-9]+$/;
2190
+ const compareIdentifiers = (a, b) => {
2191
+ if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
2192
+ const anum = numeric.test(a);
2193
+ const bnum = numeric.test(b);
2194
+ if (anum && bnum) {
2195
+ a = +a;
2196
+ b = +b;
2197
+ }
2198
+ return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
2199
+ };
2200
+ const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
2201
+ module.exports = {
2202
+ compareIdentifiers,
2203
+ rcompareIdentifiers
2204
+ };
2205
+ }));
2206
+ //#endregion
2207
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.js
2208
+ var require_semver$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2209
+ const debug = require_debug();
2210
+ const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
2211
+ const { safeRe: re, t } = require_re();
2212
+ const parseOptions = require_parse_options();
2213
+ const { compareIdentifiers } = require_identifiers();
2214
+ module.exports = class SemVer {
2215
+ constructor(version, options) {
2216
+ options = parseOptions(options);
2217
+ if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
2218
+ else version = version.version;
2219
+ else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
2220
+ if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
2221
+ debug("SemVer", version, options);
2222
+ this.options = options;
2223
+ this.loose = !!options.loose;
2224
+ this.includePrerelease = !!options.includePrerelease;
2225
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
2226
+ if (!m) throw new TypeError(`Invalid Version: ${version}`);
2227
+ this.raw = version;
2228
+ this.major = +m[1];
2229
+ this.minor = +m[2];
2230
+ this.patch = +m[3];
2231
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
2232
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
2233
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
2234
+ if (!m[4]) this.prerelease = [];
2235
+ else this.prerelease = m[4].split(".").map((id) => {
2236
+ if (/^[0-9]+$/.test(id)) {
2237
+ const num = +id;
2238
+ if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
2239
+ }
2240
+ return id;
2241
+ });
2242
+ this.build = m[5] ? m[5].split(".") : [];
2243
+ this.format();
2244
+ }
2245
+ format() {
2246
+ this.version = `${this.major}.${this.minor}.${this.patch}`;
2247
+ if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`;
2248
+ return this.version;
2249
+ }
2250
+ toString() {
2251
+ return this.version;
2252
+ }
2253
+ compare(other) {
2254
+ debug("SemVer.compare", this.version, this.options, other);
2255
+ if (!(other instanceof SemVer)) {
2256
+ if (typeof other === "string" && other === this.version) return 0;
2257
+ other = new SemVer(other, this.options);
2258
+ }
2259
+ if (other.version === this.version) return 0;
2260
+ return this.compareMain(other) || this.comparePre(other);
2261
+ }
2262
+ compareMain(other) {
2263
+ if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
2264
+ if (this.major < other.major) return -1;
2265
+ if (this.major > other.major) return 1;
2266
+ if (this.minor < other.minor) return -1;
2267
+ if (this.minor > other.minor) return 1;
2268
+ if (this.patch < other.patch) return -1;
2269
+ if (this.patch > other.patch) return 1;
2270
+ return 0;
2271
+ }
2272
+ comparePre(other) {
2273
+ if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
2274
+ if (this.prerelease.length && !other.prerelease.length) return -1;
2275
+ else if (!this.prerelease.length && other.prerelease.length) return 1;
2276
+ else if (!this.prerelease.length && !other.prerelease.length) return 0;
2277
+ let i = 0;
2278
+ do {
2279
+ const a = this.prerelease[i];
2280
+ const b = other.prerelease[i];
2281
+ debug("prerelease compare", i, a, b);
2282
+ if (a === void 0 && b === void 0) return 0;
2283
+ else if (b === void 0) return 1;
2284
+ else if (a === void 0) return -1;
2285
+ else if (a === b) continue;
2286
+ else return compareIdentifiers(a, b);
2287
+ } while (++i);
2288
+ }
2289
+ compareBuild(other) {
2290
+ if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
2291
+ let i = 0;
2292
+ do {
2293
+ const a = this.build[i];
2294
+ const b = other.build[i];
2295
+ debug("build compare", i, a, b);
2296
+ if (a === void 0 && b === void 0) return 0;
2297
+ else if (b === void 0) return 1;
2298
+ else if (a === void 0) return -1;
2299
+ else if (a === b) continue;
2300
+ else return compareIdentifiers(a, b);
2301
+ } while (++i);
2302
+ }
2303
+ inc(release, identifier, identifierBase) {
2304
+ if (release.startsWith("pre")) {
2305
+ if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
2306
+ if (identifier) {
2307
+ const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
2308
+ if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
2309
+ }
2310
+ }
2311
+ switch (release) {
2312
+ case "premajor":
2313
+ this.prerelease.length = 0;
2314
+ this.patch = 0;
2315
+ this.minor = 0;
2316
+ this.major++;
2317
+ this.inc("pre", identifier, identifierBase);
2318
+ break;
2319
+ case "preminor":
2320
+ this.prerelease.length = 0;
2321
+ this.patch = 0;
2322
+ this.minor++;
2323
+ this.inc("pre", identifier, identifierBase);
2324
+ break;
2325
+ case "prepatch":
2326
+ this.prerelease.length = 0;
2327
+ this.inc("patch", identifier, identifierBase);
2328
+ this.inc("pre", identifier, identifierBase);
2329
+ break;
2330
+ case "prerelease":
2331
+ if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase);
2332
+ this.inc("pre", identifier, identifierBase);
2333
+ break;
2334
+ case "release":
2335
+ if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);
2336
+ this.prerelease.length = 0;
2337
+ break;
2338
+ case "major":
2339
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
2340
+ this.minor = 0;
2341
+ this.patch = 0;
2342
+ this.prerelease = [];
2343
+ break;
2344
+ case "minor":
2345
+ if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
2346
+ this.patch = 0;
2347
+ this.prerelease = [];
2348
+ break;
2349
+ case "patch":
2350
+ if (this.prerelease.length === 0) this.patch++;
2351
+ this.prerelease = [];
2352
+ break;
2353
+ case "pre": {
2354
+ const base = Number(identifierBase) ? 1 : 0;
2355
+ if (this.prerelease.length === 0) this.prerelease = [base];
2356
+ else {
2357
+ let i = this.prerelease.length;
2358
+ while (--i >= 0) if (typeof this.prerelease[i] === "number") {
2359
+ this.prerelease[i]++;
2360
+ i = -2;
2361
+ }
2362
+ if (i === -1) {
2363
+ if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists");
2364
+ this.prerelease.push(base);
2365
+ }
2366
+ }
2367
+ if (identifier) {
2368
+ let prerelease = [identifier, base];
2369
+ if (identifierBase === false) prerelease = [identifier];
2370
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
2371
+ if (isNaN(this.prerelease[1])) this.prerelease = prerelease;
2372
+ } else this.prerelease = prerelease;
2373
+ }
2374
+ break;
2375
+ }
2376
+ default: throw new Error(`invalid increment argument: ${release}`);
2377
+ }
2378
+ this.raw = this.format();
2379
+ if (this.build.length) this.raw += `+${this.build.join(".")}`;
2380
+ return this;
2381
+ }
2382
+ };
2383
+ }));
2384
+ //#endregion
2385
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.js
2386
+ var require_parse = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2387
+ const SemVer = require_semver$1();
2388
+ const parse = (version, options, throwErrors = false) => {
2389
+ if (version instanceof SemVer) return version;
2390
+ try {
2391
+ return new SemVer(version, options);
2392
+ } catch (er) {
2393
+ if (!throwErrors) return null;
2394
+ throw er;
2395
+ }
2396
+ };
2397
+ module.exports = parse;
2398
+ }));
2399
+ //#endregion
2400
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.js
2401
+ var require_valid$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2402
+ const parse = require_parse();
2403
+ const valid = (version, options) => {
2404
+ const v = parse(version, options);
2405
+ return v ? v.version : null;
2406
+ };
2407
+ module.exports = valid;
2408
+ }));
2409
+ //#endregion
2410
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.js
2411
+ var require_clean = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2412
+ const parse = require_parse();
2413
+ const clean = (version, options) => {
2414
+ const s = parse(version.trim().replace(/^[=v]+/, ""), options);
2415
+ return s ? s.version : null;
2416
+ };
2417
+ module.exports = clean;
2418
+ }));
2419
+ //#endregion
2420
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.js
2421
+ var require_inc = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2422
+ const SemVer = require_semver$1();
2423
+ const inc = (version, release, options, identifier, identifierBase) => {
2424
+ if (typeof options === "string") {
2425
+ identifierBase = identifier;
2426
+ identifier = options;
2427
+ options = void 0;
2428
+ }
2429
+ try {
2430
+ return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
2431
+ } catch (er) {
2432
+ return null;
2433
+ }
2434
+ };
2435
+ module.exports = inc;
2436
+ }));
2437
+ //#endregion
2438
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.js
2439
+ var require_diff = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2440
+ const parse = require_parse();
2441
+ const diff = (version1, version2) => {
2442
+ const v1 = parse(version1, null, true);
2443
+ const v2 = parse(version2, null, true);
2444
+ const comparison = v1.compare(v2);
2445
+ if (comparison === 0) return null;
2446
+ const v1Higher = comparison > 0;
2447
+ const highVersion = v1Higher ? v1 : v2;
2448
+ const lowVersion = v1Higher ? v2 : v1;
2449
+ const highHasPre = !!highVersion.prerelease.length;
2450
+ if (!!lowVersion.prerelease.length && !highHasPre) {
2451
+ if (!lowVersion.patch && !lowVersion.minor) return "major";
2452
+ if (lowVersion.compareMain(highVersion) === 0) {
2453
+ if (lowVersion.minor && !lowVersion.patch) return "minor";
2454
+ return "patch";
2455
+ }
2456
+ }
2457
+ const prefix = highHasPre ? "pre" : "";
2458
+ if (v1.major !== v2.major) return prefix + "major";
2459
+ if (v1.minor !== v2.minor) return prefix + "minor";
2460
+ if (v1.patch !== v2.patch) return prefix + "patch";
2461
+ return "prerelease";
2462
+ };
2463
+ module.exports = diff;
2464
+ }));
2465
+ //#endregion
2466
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.js
2467
+ var require_major = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2468
+ const SemVer = require_semver$1();
2469
+ const major = (a, loose) => new SemVer(a, loose).major;
2470
+ module.exports = major;
2471
+ }));
2472
+ //#endregion
2473
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.js
2474
+ var require_minor = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2475
+ const SemVer = require_semver$1();
2476
+ const minor = (a, loose) => new SemVer(a, loose).minor;
2477
+ module.exports = minor;
2478
+ }));
2479
+ //#endregion
2480
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.js
2481
+ var require_patch = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2482
+ const SemVer = require_semver$1();
2483
+ const patch = (a, loose) => new SemVer(a, loose).patch;
2484
+ module.exports = patch;
2485
+ }));
2486
+ //#endregion
2487
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.js
2488
+ var require_prerelease = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2489
+ const parse = require_parse();
2490
+ const prerelease = (version, options) => {
2491
+ const parsed = parse(version, options);
2492
+ return parsed && parsed.prerelease.length ? parsed.prerelease : null;
2493
+ };
2494
+ module.exports = prerelease;
2495
+ }));
2496
+ //#endregion
2497
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.js
2498
+ var require_compare = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2499
+ const SemVer = require_semver$1();
2500
+ const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
2501
+ module.exports = compare;
2502
+ }));
2503
+ //#endregion
2504
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.js
2505
+ var require_rcompare = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2506
+ const compare = require_compare();
2507
+ const rcompare = (a, b, loose) => compare(b, a, loose);
2508
+ module.exports = rcompare;
2509
+ }));
2510
+ //#endregion
2511
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.js
2512
+ var require_compare_loose = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2513
+ const compare = require_compare();
2514
+ const compareLoose = (a, b) => compare(a, b, true);
2515
+ module.exports = compareLoose;
2516
+ }));
2517
+ //#endregion
2518
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.js
2519
+ var require_compare_build = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2520
+ const SemVer = require_semver$1();
2521
+ const compareBuild = (a, b, loose) => {
2522
+ const versionA = new SemVer(a, loose);
2523
+ const versionB = new SemVer(b, loose);
2524
+ return versionA.compare(versionB) || versionA.compareBuild(versionB);
2525
+ };
2526
+ module.exports = compareBuild;
2527
+ }));
2528
+ //#endregion
2529
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.js
2530
+ var require_sort = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2531
+ const compareBuild = require_compare_build();
2532
+ const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
2533
+ module.exports = sort;
2534
+ }));
2535
+ //#endregion
2536
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.js
2537
+ var require_rsort = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2538
+ const compareBuild = require_compare_build();
2539
+ const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
2540
+ module.exports = rsort;
2541
+ }));
2542
+ //#endregion
2543
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.js
2544
+ var require_gt = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2545
+ const compare = require_compare();
2546
+ const gt = (a, b, loose) => compare(a, b, loose) > 0;
2547
+ module.exports = gt;
2548
+ }));
2549
+ //#endregion
2550
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.js
2551
+ var require_lt = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2552
+ const compare = require_compare();
2553
+ const lt = (a, b, loose) => compare(a, b, loose) < 0;
2554
+ module.exports = lt;
2555
+ }));
2556
+ //#endregion
2557
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.js
2558
+ var require_eq = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2559
+ const compare = require_compare();
2560
+ const eq = (a, b, loose) => compare(a, b, loose) === 0;
2561
+ module.exports = eq;
2562
+ }));
2563
+ //#endregion
2564
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.js
2565
+ var require_neq = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2566
+ const compare = require_compare();
2567
+ const neq = (a, b, loose) => compare(a, b, loose) !== 0;
2568
+ module.exports = neq;
2569
+ }));
2570
+ //#endregion
2571
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.js
2572
+ var require_gte = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2573
+ const compare = require_compare();
2574
+ const gte = (a, b, loose) => compare(a, b, loose) >= 0;
2575
+ module.exports = gte;
2576
+ }));
2577
+ //#endregion
2578
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.js
2579
+ var require_lte = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2580
+ const compare = require_compare();
2581
+ const lte = (a, b, loose) => compare(a, b, loose) <= 0;
2582
+ module.exports = lte;
2583
+ }));
2584
+ //#endregion
2585
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.js
2586
+ var require_cmp = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2587
+ const eq = require_eq();
2588
+ const neq = require_neq();
2589
+ const gt = require_gt();
2590
+ const gte = require_gte();
2591
+ const lt = require_lt();
2592
+ const lte = require_lte();
2593
+ const cmp = (a, op, b, loose) => {
2594
+ switch (op) {
2595
+ case "===":
2596
+ if (typeof a === "object") a = a.version;
2597
+ if (typeof b === "object") b = b.version;
2598
+ return a === b;
2599
+ case "!==":
2600
+ if (typeof a === "object") a = a.version;
2601
+ if (typeof b === "object") b = b.version;
2602
+ return a !== b;
2603
+ case "":
2604
+ case "=":
2605
+ case "==": return eq(a, b, loose);
2606
+ case "!=": return neq(a, b, loose);
2607
+ case ">": return gt(a, b, loose);
2608
+ case ">=": return gte(a, b, loose);
2609
+ case "<": return lt(a, b, loose);
2610
+ case "<=": return lte(a, b, loose);
2611
+ default: throw new TypeError(`Invalid operator: ${op}`);
2612
+ }
2613
+ };
2614
+ module.exports = cmp;
2615
+ }));
2616
+ //#endregion
2617
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.js
2618
+ var require_coerce = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2619
+ const SemVer = require_semver$1();
2620
+ const parse = require_parse();
2621
+ const { safeRe: re, t } = require_re();
2622
+ const coerce = (version, options) => {
2623
+ if (version instanceof SemVer) return version;
2624
+ if (typeof version === "number") version = String(version);
2625
+ if (typeof version !== "string") return null;
2626
+ options = options || {};
2627
+ let match = null;
2628
+ if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
2629
+ else {
2630
+ const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
2631
+ let next;
2632
+ while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
2633
+ if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
2634
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
2635
+ }
2636
+ coerceRtlRegex.lastIndex = -1;
2637
+ }
2638
+ if (match === null) return null;
2639
+ const major = match[2];
2640
+ return parse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
2641
+ };
2642
+ module.exports = coerce;
2643
+ }));
2644
+ //#endregion
2645
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.js
2646
+ var require_lrucache = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2647
+ var LRUCache = class {
2648
+ constructor() {
2649
+ this.max = 1e3;
2650
+ this.map = /* @__PURE__ */ new Map();
2651
+ }
2652
+ get(key) {
2653
+ const value = this.map.get(key);
2654
+ if (value === void 0) return;
2655
+ else {
2656
+ this.map.delete(key);
2657
+ this.map.set(key, value);
2658
+ return value;
2659
+ }
2660
+ }
2661
+ delete(key) {
2662
+ return this.map.delete(key);
2663
+ }
2664
+ set(key, value) {
2665
+ if (!this.delete(key) && value !== void 0) {
2666
+ if (this.map.size >= this.max) {
2667
+ const firstKey = this.map.keys().next().value;
2668
+ this.delete(firstKey);
2669
+ }
2670
+ this.map.set(key, value);
2671
+ }
2672
+ return this;
2673
+ }
2674
+ };
2675
+ module.exports = LRUCache;
2676
+ }));
2677
+ //#endregion
2678
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.js
2679
+ var require_range = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2680
+ const SPACE_CHARACTERS = /\s+/g;
2681
+ module.exports = class Range {
2682
+ constructor(range, options) {
2683
+ options = parseOptions(options);
2684
+ if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
2685
+ else return new Range(range.raw, options);
2686
+ if (range instanceof Comparator) {
2687
+ this.raw = range.value;
2688
+ this.set = [[range]];
2689
+ this.formatted = void 0;
2690
+ return this;
2691
+ }
2692
+ this.options = options;
2693
+ this.loose = !!options.loose;
2694
+ this.includePrerelease = !!options.includePrerelease;
2695
+ this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
2696
+ this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
2697
+ if (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
2698
+ if (this.set.length > 1) {
2699
+ const first = this.set[0];
2700
+ this.set = this.set.filter((c) => !isNullSet(c[0]));
2701
+ if (this.set.length === 0) this.set = [first];
2702
+ else if (this.set.length > 1) {
2703
+ for (const c of this.set) if (c.length === 1 && isAny(c[0])) {
2704
+ this.set = [c];
2705
+ break;
2706
+ }
2707
+ }
2708
+ }
2709
+ this.formatted = void 0;
2710
+ }
2711
+ get range() {
2712
+ if (this.formatted === void 0) {
2713
+ this.formatted = "";
2714
+ for (let i = 0; i < this.set.length; i++) {
2715
+ if (i > 0) this.formatted += "||";
2716
+ const comps = this.set[i];
2717
+ for (let k = 0; k < comps.length; k++) {
2718
+ if (k > 0) this.formatted += " ";
2719
+ this.formatted += comps[k].toString().trim();
2720
+ }
2721
+ }
2722
+ }
2723
+ return this.formatted;
2724
+ }
2725
+ format() {
2726
+ return this.range;
2727
+ }
2728
+ toString() {
2729
+ return this.range;
2730
+ }
2731
+ parseRange(range) {
2732
+ const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range;
2733
+ const cached = cache.get(memoKey);
2734
+ if (cached) return cached;
2735
+ const loose = this.options.loose;
2736
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
2737
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
2738
+ debug("hyphen replace", range);
2739
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
2740
+ debug("comparator trim", range);
2741
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
2742
+ debug("tilde trim", range);
2743
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace);
2744
+ debug("caret trim", range);
2745
+ let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
2746
+ if (loose) rangeList = rangeList.filter((comp) => {
2747
+ debug("loose invalid filter", comp, this.options);
2748
+ return !!comp.match(re[t.COMPARATORLOOSE]);
2749
+ });
2750
+ debug("range list", rangeList);
2751
+ const rangeMap = /* @__PURE__ */ new Map();
2752
+ const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
2753
+ for (const comp of comparators) {
2754
+ if (isNullSet(comp)) return [comp];
2755
+ rangeMap.set(comp.value, comp);
2756
+ }
2757
+ if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete("");
2758
+ const result = [...rangeMap.values()];
2759
+ cache.set(memoKey, result);
2760
+ return result;
2761
+ }
2762
+ intersects(range, options) {
2763
+ if (!(range instanceof Range)) throw new TypeError("a Range is required");
2764
+ return this.set.some((thisComparators) => {
2765
+ return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
2766
+ return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
2767
+ return rangeComparators.every((rangeComparator) => {
2768
+ return thisComparator.intersects(rangeComparator, options);
2769
+ });
2770
+ });
2771
+ });
2772
+ });
2773
+ }
2774
+ test(version) {
2775
+ if (!version) return false;
2776
+ if (typeof version === "string") try {
2777
+ version = new SemVer(version, this.options);
2778
+ } catch (er) {
2779
+ return false;
2780
+ }
2781
+ for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true;
2782
+ return false;
2783
+ }
2784
+ };
2785
+ const cache = new (require_lrucache())();
2786
+ const parseOptions = require_parse_options();
2787
+ const Comparator = require_comparator();
2788
+ const debug = require_debug();
2789
+ const SemVer = require_semver$1();
2790
+ const { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
2791
+ const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
2792
+ const isNullSet = (c) => c.value === "<0.0.0-0";
2793
+ const isAny = (c) => c.value === "";
2794
+ const isSatisfiable = (comparators, options) => {
2795
+ let result = true;
2796
+ const remainingComparators = comparators.slice();
2797
+ let testComparator = remainingComparators.pop();
2798
+ while (result && remainingComparators.length) {
2799
+ result = remainingComparators.every((otherComparator) => {
2800
+ return testComparator.intersects(otherComparator, options);
2801
+ });
2802
+ testComparator = remainingComparators.pop();
2803
+ }
2804
+ return result;
2805
+ };
2806
+ const parseComparator = (comp, options) => {
2807
+ comp = comp.replace(re[t.BUILD], "");
2808
+ debug("comp", comp, options);
2809
+ comp = replaceCarets(comp, options);
2810
+ debug("caret", comp);
2811
+ comp = replaceTildes(comp, options);
2812
+ debug("tildes", comp);
2813
+ comp = replaceXRanges(comp, options);
2814
+ debug("xrange", comp);
2815
+ comp = replaceStars(comp, options);
2816
+ debug("stars", comp);
2817
+ return comp;
2818
+ };
2819
+ const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
2820
+ const replaceTildes = (comp, options) => {
2821
+ return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
2822
+ };
2823
+ const replaceTilde = (comp, options) => {
2824
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
2825
+ return comp.replace(r, (_, M, m, p, pr) => {
2826
+ debug("tilde", comp, _, M, m, p, pr);
2827
+ let ret;
2828
+ if (isX(M)) ret = "";
2829
+ else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
2830
+ else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
2831
+ else if (pr) {
2832
+ debug("replaceTilde pr", pr);
2833
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
2834
+ } else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
2835
+ debug("tilde return", ret);
2836
+ return ret;
2837
+ });
2838
+ };
2839
+ const replaceCarets = (comp, options) => {
2840
+ return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
2841
+ };
2842
+ const replaceCaret = (comp, options) => {
2843
+ debug("caret", comp, options);
2844
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
2845
+ const z = options.includePrerelease ? "-0" : "";
2846
+ return comp.replace(r, (_, M, m, p, pr) => {
2847
+ debug("caret", comp, _, M, m, p, pr);
2848
+ let ret;
2849
+ if (isX(M)) ret = "";
2850
+ else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
2851
+ else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
2852
+ else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
2853
+ else if (pr) {
2854
+ debug("replaceCaret pr", pr);
2855
+ if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
2856
+ else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
2857
+ else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
2858
+ } else {
2859
+ debug("no pr");
2860
+ if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
2861
+ else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
2862
+ else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
2863
+ }
2864
+ debug("caret return", ret);
2865
+ return ret;
2866
+ });
2867
+ };
2868
+ const replaceXRanges = (comp, options) => {
2869
+ debug("replaceXRanges", comp, options);
2870
+ return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
2871
+ };
2872
+ const replaceXRange = (comp, options) => {
2873
+ comp = comp.trim();
2874
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
2875
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
2876
+ debug("xRange", comp, ret, gtlt, M, m, p, pr);
2877
+ const xM = isX(M);
2878
+ const xm = xM || isX(m);
2879
+ const xp = xm || isX(p);
2880
+ const anyX = xp;
2881
+ if (gtlt === "=" && anyX) gtlt = "";
2882
+ pr = options.includePrerelease ? "-0" : "";
2883
+ if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
2884
+ else ret = "*";
2885
+ else if (gtlt && anyX) {
2886
+ if (xm) m = 0;
2887
+ p = 0;
2888
+ if (gtlt === ">") {
2889
+ gtlt = ">=";
2890
+ if (xm) {
2891
+ M = +M + 1;
2892
+ m = 0;
2893
+ p = 0;
2894
+ } else {
2895
+ m = +m + 1;
2896
+ p = 0;
2897
+ }
2898
+ } else if (gtlt === "<=") {
2899
+ gtlt = "<";
2900
+ if (xm) M = +M + 1;
2901
+ else m = +m + 1;
2902
+ }
2903
+ if (gtlt === "<") pr = "-0";
2904
+ ret = `${gtlt + M}.${m}.${p}${pr}`;
2905
+ } else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
2906
+ else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
2907
+ debug("xRange return", ret);
2908
+ return ret;
2909
+ });
2910
+ };
2911
+ const replaceStars = (comp, options) => {
2912
+ debug("replaceStars", comp, options);
2913
+ return comp.trim().replace(re[t.STAR], "");
2914
+ };
2915
+ const replaceGTE0 = (comp, options) => {
2916
+ debug("replaceGTE0", comp, options);
2917
+ return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
2918
+ };
2919
+ const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
2920
+ if (isX(fM)) from = "";
2921
+ else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
2922
+ else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
2923
+ else if (fpr) from = `>=${from}`;
2924
+ else from = `>=${from}${incPr ? "-0" : ""}`;
2925
+ if (isX(tM)) to = "";
2926
+ else if (isX(tm)) to = `<${+tM + 1}.0.0-0`;
2927
+ else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;
2928
+ else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;
2929
+ else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;
2930
+ else to = `<=${to}`;
2931
+ return `${from} ${to}`.trim();
2932
+ };
2933
+ const testSet = (set, version, options) => {
2934
+ for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
2935
+ if (version.prerelease.length && !options.includePrerelease) {
2936
+ for (let i = 0; i < set.length; i++) {
2937
+ debug(set[i].semver);
2938
+ if (set[i].semver === Comparator.ANY) continue;
2939
+ if (set[i].semver.prerelease.length > 0) {
2940
+ const allowed = set[i].semver;
2941
+ if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
2942
+ }
2943
+ }
2944
+ return false;
2945
+ }
2946
+ return true;
2947
+ };
2948
+ }));
2949
+ //#endregion
2950
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.js
2951
+ var require_comparator = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2952
+ const ANY = Symbol("SemVer ANY");
2953
+ module.exports = class Comparator {
2954
+ static get ANY() {
2955
+ return ANY;
2956
+ }
2957
+ constructor(comp, options) {
2958
+ options = parseOptions(options);
2959
+ if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp;
2960
+ else comp = comp.value;
2961
+ comp = comp.trim().split(/\s+/).join(" ");
2962
+ debug("comparator", comp, options);
2963
+ this.options = options;
2964
+ this.loose = !!options.loose;
2965
+ this.parse(comp);
2966
+ if (this.semver === ANY) this.value = "";
2967
+ else this.value = this.operator + this.semver.version;
2968
+ debug("comp", this);
2969
+ }
2970
+ parse(comp) {
2971
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
2972
+ const m = comp.match(r);
2973
+ if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
2974
+ this.operator = m[1] !== void 0 ? m[1] : "";
2975
+ if (this.operator === "=") this.operator = "";
2976
+ if (!m[2]) this.semver = ANY;
2977
+ else this.semver = new SemVer(m[2], this.options.loose);
2978
+ }
2979
+ toString() {
2980
+ return this.value;
2981
+ }
2982
+ test(version) {
2983
+ debug("Comparator.test", version, this.options.loose);
2984
+ if (this.semver === ANY || version === ANY) return true;
2985
+ if (typeof version === "string") try {
2986
+ version = new SemVer(version, this.options);
2987
+ } catch (er) {
2988
+ return false;
2989
+ }
2990
+ return cmp(version, this.operator, this.semver, this.options);
2991
+ }
2992
+ intersects(comp, options) {
2993
+ if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
2994
+ if (this.operator === "") {
2995
+ if (this.value === "") return true;
2996
+ return new Range(comp.value, options).test(this.value);
2997
+ } else if (comp.operator === "") {
2998
+ if (comp.value === "") return true;
2999
+ return new Range(this.value, options).test(comp.semver);
3000
+ }
3001
+ options = parseOptions(options);
3002
+ if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
3003
+ if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false;
3004
+ if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
3005
+ if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
3006
+ if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
3007
+ if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
3008
+ if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
3009
+ return false;
3010
+ }
3011
+ };
3012
+ const parseOptions = require_parse_options();
3013
+ const { safeRe: re, t } = require_re();
3014
+ const cmp = require_cmp();
3015
+ const debug = require_debug();
3016
+ const SemVer = require_semver$1();
3017
+ const Range = require_range();
3018
+ }));
3019
+ //#endregion
3020
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.js
3021
+ var require_satisfies = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3022
+ const Range = require_range();
3023
+ const satisfies = (version, range, options) => {
3024
+ try {
3025
+ range = new Range(range, options);
3026
+ } catch (er) {
3027
+ return false;
3028
+ }
3029
+ return range.test(version);
3030
+ };
3031
+ module.exports = satisfies;
3032
+ }));
3033
+ //#endregion
3034
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.js
3035
+ var require_to_comparators = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3036
+ const Range = require_range();
3037
+ const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
3038
+ module.exports = toComparators;
3039
+ }));
3040
+ //#endregion
3041
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js
3042
+ var require_max_satisfying = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3043
+ const SemVer = require_semver$1();
3044
+ const Range = require_range();
3045
+ const maxSatisfying = (versions, range, options) => {
3046
+ let max = null;
3047
+ let maxSV = null;
3048
+ let rangeObj = null;
3049
+ try {
3050
+ rangeObj = new Range(range, options);
3051
+ } catch (er) {
3052
+ return null;
3053
+ }
3054
+ versions.forEach((v) => {
3055
+ if (rangeObj.test(v)) {
3056
+ if (!max || maxSV.compare(v) === -1) {
3057
+ max = v;
3058
+ maxSV = new SemVer(max, options);
3059
+ }
3060
+ }
3061
+ });
3062
+ return max;
3063
+ };
3064
+ module.exports = maxSatisfying;
3065
+ }));
3066
+ //#endregion
3067
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js
3068
+ var require_min_satisfying = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3069
+ const SemVer = require_semver$1();
3070
+ const Range = require_range();
3071
+ const minSatisfying = (versions, range, options) => {
3072
+ let min = null;
3073
+ let minSV = null;
3074
+ let rangeObj = null;
3075
+ try {
3076
+ rangeObj = new Range(range, options);
3077
+ } catch (er) {
3078
+ return null;
3079
+ }
3080
+ versions.forEach((v) => {
3081
+ if (rangeObj.test(v)) {
3082
+ if (!min || minSV.compare(v) === 1) {
3083
+ min = v;
3084
+ minSV = new SemVer(min, options);
3085
+ }
3086
+ }
3087
+ });
3088
+ return min;
3089
+ };
3090
+ module.exports = minSatisfying;
3091
+ }));
3092
+ //#endregion
3093
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.js
3094
+ var require_min_version = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3095
+ const SemVer = require_semver$1();
3096
+ const Range = require_range();
3097
+ const gt = require_gt();
3098
+ const minVersion = (range, loose) => {
3099
+ range = new Range(range, loose);
3100
+ let minver = new SemVer("0.0.0");
3101
+ if (range.test(minver)) return minver;
3102
+ minver = new SemVer("0.0.0-0");
3103
+ if (range.test(minver)) return minver;
3104
+ minver = null;
3105
+ for (let i = 0; i < range.set.length; ++i) {
3106
+ const comparators = range.set[i];
3107
+ let setMin = null;
3108
+ comparators.forEach((comparator) => {
3109
+ const compver = new SemVer(comparator.semver.version);
3110
+ switch (comparator.operator) {
3111
+ case ">":
3112
+ if (compver.prerelease.length === 0) compver.patch++;
3113
+ else compver.prerelease.push(0);
3114
+ compver.raw = compver.format();
3115
+ case "":
3116
+ case ">=":
3117
+ if (!setMin || gt(compver, setMin)) setMin = compver;
3118
+ break;
3119
+ case "<":
3120
+ case "<=": break;
3121
+ /* istanbul ignore next */
3122
+ default: throw new Error(`Unexpected operation: ${comparator.operator}`);
3123
+ }
3124
+ });
3125
+ if (setMin && (!minver || gt(minver, setMin))) minver = setMin;
3126
+ }
3127
+ if (minver && range.test(minver)) return minver;
3128
+ return null;
3129
+ };
3130
+ module.exports = minVersion;
3131
+ }));
3132
+ //#endregion
3133
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.js
3134
+ var require_valid = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3135
+ const Range = require_range();
3136
+ const validRange = (range, options) => {
3137
+ try {
3138
+ return new Range(range, options).range || "*";
3139
+ } catch (er) {
3140
+ return null;
3141
+ }
3142
+ };
3143
+ module.exports = validRange;
3144
+ }));
3145
+ //#endregion
3146
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.js
3147
+ var require_outside = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3148
+ const SemVer = require_semver$1();
3149
+ const Comparator = require_comparator();
3150
+ const { ANY } = Comparator;
3151
+ const Range = require_range();
3152
+ const satisfies = require_satisfies();
3153
+ const gt = require_gt();
3154
+ const lt = require_lt();
3155
+ const lte = require_lte();
3156
+ const gte = require_gte();
3157
+ const outside = (version, range, hilo, options) => {
3158
+ version = new SemVer(version, options);
3159
+ range = new Range(range, options);
3160
+ let gtfn, ltefn, ltfn, comp, ecomp;
3161
+ switch (hilo) {
3162
+ case ">":
3163
+ gtfn = gt;
3164
+ ltefn = lte;
3165
+ ltfn = lt;
3166
+ comp = ">";
3167
+ ecomp = ">=";
3168
+ break;
3169
+ case "<":
3170
+ gtfn = lt;
3171
+ ltefn = gte;
3172
+ ltfn = gt;
3173
+ comp = "<";
3174
+ ecomp = "<=";
3175
+ break;
3176
+ default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
3177
+ }
3178
+ if (satisfies(version, range, options)) return false;
3179
+ for (let i = 0; i < range.set.length; ++i) {
3180
+ const comparators = range.set[i];
3181
+ let high = null;
3182
+ let low = null;
3183
+ comparators.forEach((comparator) => {
3184
+ if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0");
3185
+ high = high || comparator;
3186
+ low = low || comparator;
3187
+ if (gtfn(comparator.semver, high.semver, options)) high = comparator;
3188
+ else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
3189
+ });
3190
+ if (high.operator === comp || high.operator === ecomp) return false;
3191
+ if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;
3192
+ else if (low.operator === ecomp && ltfn(version, low.semver)) return false;
3193
+ }
3194
+ return true;
3195
+ };
3196
+ module.exports = outside;
3197
+ }));
3198
+ //#endregion
3199
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.js
3200
+ var require_gtr = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3201
+ const outside = require_outside();
3202
+ const gtr = (version, range, options) => outside(version, range, ">", options);
3203
+ module.exports = gtr;
3204
+ }));
3205
+ //#endregion
3206
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.js
3207
+ var require_ltr = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3208
+ const outside = require_outside();
3209
+ const ltr = (version, range, options) => outside(version, range, "<", options);
3210
+ module.exports = ltr;
3211
+ }));
3212
+ //#endregion
3213
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.js
3214
+ var require_intersects = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3215
+ const Range = require_range();
3216
+ const intersects = (r1, r2, options) => {
3217
+ r1 = new Range(r1, options);
3218
+ r2 = new Range(r2, options);
3219
+ return r1.intersects(r2, options);
3220
+ };
3221
+ module.exports = intersects;
3222
+ }));
3223
+ //#endregion
3224
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.js
3225
+ var require_simplify = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3226
+ const satisfies = require_satisfies();
3227
+ const compare = require_compare();
3228
+ module.exports = (versions, range, options) => {
3229
+ const set = [];
3230
+ let first = null;
3231
+ let prev = null;
3232
+ const v = versions.sort((a, b) => compare(a, b, options));
3233
+ for (const version of v) if (satisfies(version, range, options)) {
3234
+ prev = version;
3235
+ if (!first) first = version;
3236
+ } else {
3237
+ if (prev) set.push([first, prev]);
3238
+ prev = null;
3239
+ first = null;
3240
+ }
3241
+ if (first) set.push([first, null]);
3242
+ const ranges = [];
3243
+ for (const [min, max] of set) if (min === max) ranges.push(min);
3244
+ else if (!max && min === v[0]) ranges.push("*");
3245
+ else if (!max) ranges.push(`>=${min}`);
3246
+ else if (min === v[0]) ranges.push(`<=${max}`);
3247
+ else ranges.push(`${min} - ${max}`);
3248
+ const simplified = ranges.join(" || ");
3249
+ const original = typeof range.raw === "string" ? range.raw : String(range);
3250
+ return simplified.length < original.length ? simplified : range;
3251
+ };
3252
+ }));
3253
+ //#endregion
3254
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.js
3255
+ var require_subset = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3256
+ const Range = require_range();
3257
+ const Comparator = require_comparator();
3258
+ const { ANY } = Comparator;
3259
+ const satisfies = require_satisfies();
3260
+ const compare = require_compare();
3261
+ const subset = (sub, dom, options = {}) => {
3262
+ if (sub === dom) return true;
3263
+ sub = new Range(sub, options);
3264
+ dom = new Range(dom, options);
3265
+ let sawNonNull = false;
3266
+ OUTER: for (const simpleSub of sub.set) {
3267
+ for (const simpleDom of dom.set) {
3268
+ const isSub = simpleSubset(simpleSub, simpleDom, options);
3269
+ sawNonNull = sawNonNull || isSub !== null;
3270
+ if (isSub) continue OUTER;
3271
+ }
3272
+ if (sawNonNull) return false;
3273
+ }
3274
+ return true;
3275
+ };
3276
+ const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
3277
+ const minimumVersion = [new Comparator(">=0.0.0")];
3278
+ const simpleSubset = (sub, dom, options) => {
3279
+ if (sub === dom) return true;
3280
+ if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
3281
+ else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
3282
+ else sub = minimumVersion;
3283
+ if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
3284
+ else dom = minimumVersion;
3285
+ const eqSet = /* @__PURE__ */ new Set();
3286
+ let gt, lt;
3287
+ for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
3288
+ else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options);
3289
+ else eqSet.add(c.semver);
3290
+ if (eqSet.size > 1) return null;
3291
+ let gtltComp;
3292
+ if (gt && lt) {
3293
+ gtltComp = compare(gt.semver, lt.semver, options);
3294
+ if (gtltComp > 0) return null;
3295
+ else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null;
3296
+ }
3297
+ for (const eq of eqSet) {
3298
+ if (gt && !satisfies(eq, String(gt), options)) return null;
3299
+ if (lt && !satisfies(eq, String(lt), options)) return null;
3300
+ for (const c of dom) if (!satisfies(eq, String(c), options)) return false;
3301
+ return true;
3302
+ }
3303
+ let higher, lower;
3304
+ let hasDomLT, hasDomGT;
3305
+ let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
3306
+ let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
3307
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
3308
+ for (const c of dom) {
3309
+ hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
3310
+ hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
3311
+ if (gt) {
3312
+ if (needDomGTPre) {
3313
+ 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;
3314
+ }
3315
+ if (c.operator === ">" || c.operator === ">=") {
3316
+ higher = higherGT(gt, c, options);
3317
+ if (higher === c && higher !== gt) return false;
3318
+ } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) return false;
3319
+ }
3320
+ if (lt) {
3321
+ if (needDomLTPre) {
3322
+ 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;
3323
+ }
3324
+ if (c.operator === "<" || c.operator === "<=") {
3325
+ lower = lowerLT(lt, c, options);
3326
+ if (lower === c && lower !== lt) return false;
3327
+ } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) return false;
3328
+ }
3329
+ if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
3330
+ }
3331
+ if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
3332
+ if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
3333
+ if (needDomGTPre || needDomLTPre) return false;
3334
+ return true;
3335
+ };
3336
+ const higherGT = (a, b, options) => {
3337
+ if (!a) return b;
3338
+ const comp = compare(a.semver, b.semver, options);
3339
+ return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
3340
+ };
3341
+ const lowerLT = (a, b, options) => {
3342
+ if (!a) return b;
3343
+ const comp = compare(a.semver, b.semver, options);
3344
+ return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
3345
+ };
3346
+ module.exports = subset;
3347
+ }));
3348
+ //#endregion
3349
+ //#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.js
3350
+ var require_semver = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3351
+ const internalRe = require_re();
3352
+ const constants = require_constants();
3353
+ const SemVer = require_semver$1();
3354
+ const identifiers = require_identifiers();
3355
+ module.exports = {
3356
+ parse: require_parse(),
3357
+ valid: require_valid$1(),
3358
+ clean: require_clean(),
3359
+ inc: require_inc(),
3360
+ diff: require_diff(),
3361
+ major: require_major(),
3362
+ minor: require_minor(),
3363
+ patch: require_patch(),
3364
+ prerelease: require_prerelease(),
3365
+ compare: require_compare(),
3366
+ rcompare: require_rcompare(),
3367
+ compareLoose: require_compare_loose(),
3368
+ compareBuild: require_compare_build(),
3369
+ sort: require_sort(),
3370
+ rsort: require_rsort(),
3371
+ gt: require_gt(),
3372
+ lt: require_lt(),
3373
+ eq: require_eq(),
3374
+ neq: require_neq(),
3375
+ gte: require_gte(),
3376
+ lte: require_lte(),
3377
+ cmp: require_cmp(),
3378
+ coerce: require_coerce(),
3379
+ Comparator: require_comparator(),
3380
+ Range: require_range(),
3381
+ satisfies: require_satisfies(),
3382
+ toComparators: require_to_comparators(),
3383
+ maxSatisfying: require_max_satisfying(),
3384
+ minSatisfying: require_min_satisfying(),
3385
+ minVersion: require_min_version(),
3386
+ validRange: require_valid(),
3387
+ outside: require_outside(),
3388
+ gtr: require_gtr(),
3389
+ ltr: require_ltr(),
3390
+ intersects: require_intersects(),
3391
+ simplifyRange: require_simplify(),
3392
+ subset: require_subset(),
3393
+ SemVer,
3394
+ re: internalRe.re,
3395
+ src: internalRe.src,
3396
+ tokens: internalRe.t,
3397
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
3398
+ RELEASE_TYPES: constants.RELEASE_TYPES,
3399
+ compareIdentifiers: identifiers.compareIdentifiers,
3400
+ rcompareIdentifiers: identifiers.rcompareIdentifiers
3401
+ };
3402
+ }));
3403
+ //#endregion
3404
+ //#region ../core/dist/index.js
3405
+ var import_picomatch = /* @__PURE__ */ __toESM$1(require_picomatch(), 1);
3406
+ var import_semver = /* @__PURE__ */ __toESM$1(require_semver(), 1);
2065
3407
  var __create = Object.create;
2066
3408
  var __defProp = Object.defineProperty;
2067
3409
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -3126,6 +4468,13 @@ const OXLINT_OUTPUT_MAX_BYTES = 50 * 1024 * 1024;
3126
4468
  const OXLINT_SPAWN_TIMEOUT_MS = 6e4;
3127
4469
  const DEAD_CODE_WORKER_MAX_OLD_SPACE_MB = 8192;
3128
4470
  const RECOMMENDED_PNPM_MINIMUM_RELEASE_AGE_MINUTES = 10080;
4471
+ const REACT_SERVER_DOM_PACKAGES = [
4472
+ "react-server-dom-webpack",
4473
+ "react-server-dom-parcel",
4474
+ "react-server-dom-turbopack"
4475
+ ];
4476
+ const REACT_BLOG_RSC_ADVISORY_URL = "https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components";
4477
+ const VERCEL_NEXTJS_SECURITY_RELEASE_URL = "https://vercel.com/changelog/next-js-may-2026-security-release";
3129
4478
  const DIAGNOSTIC_CATEGORY_BUCKETS = [
3130
4479
  "Security",
3131
4480
  "Bugs",
@@ -3142,6 +4491,13 @@ const COMPILER_CLEANUP_BUCKET = "compiler-cleanup";
3142
4491
  const COMPILER_CLEANUP_RULE_KEYS = new Set(["react-doctor/react-compiler-no-manual-memoization"]);
3143
4492
  const MAX_GLOB_PATTERN_LENGTH_CHARS = 1024;
3144
4493
  const CONFIG_CACHE_TTL_MS = 300 * 1e3;
4494
+ const SOCKET_FREE_PURL_API_BASE = "https://firewall-api.socket.dev/purl";
4495
+ const SOCKET_PACKAGE_PAGE_BASE = "https://socket.dev/npm/package";
4496
+ const SOCKET_FREE_USER_AGENT = "react-doctor-supply-chain";
4497
+ const SUPPLY_CHAIN_PLUGIN = "socket";
4498
+ const SUPPLY_CHAIN_RULE = "low-supply-chain-score";
4499
+ const SUPPLY_CHAIN_CATEGORY = "Security";
4500
+ const SUPPLY_CHAIN_IGNORED_PACKAGES = new Set(["next"]);
3145
4501
  const TSCONFIG_FILENAME = "tsconfig.json";
3146
4502
  const isRelativeExtendsValue = (extendsValue) => extendsValue.startsWith("./") || extendsValue.startsWith("../") || path$1.isAbsolute(extendsValue);
3147
4503
  const ensureJsonExtension = (filePath) => path$1.extname(filePath) === "" ? `${filePath}.json` : filePath;
@@ -5489,6 +6845,168 @@ const checkReactNativeProject = (rootDirectory, project) => {
5489
6845
  if (!isReactNativeProject(project)) return [];
5490
6846
  return [...checkReactNativeMetroBabelPreset(rootDirectory), ...checkReactNativeLibraryDependencies(rootDirectory)];
5491
6847
  };
6848
+ const RULE_KEY = "no-vulnerable-react-server-components";
6849
+ const DEPENDENCY_SECTIONS = [
6850
+ "dependencies",
6851
+ "devDependencies",
6852
+ "peerDependencies",
6853
+ "optionalDependencies"
6854
+ ];
6855
+ const REACT_RSC_ADVISORIES_BY_MINOR = {
6856
+ "19.0": {
6857
+ rceFixedVersion: "19.0.1",
6858
+ latestSafeVersion: "19.0.6"
6859
+ },
6860
+ "19.1": {
6861
+ rceFixedVersion: "19.1.2",
6862
+ latestSafeVersion: "19.1.7"
6863
+ },
6864
+ "19.2": {
6865
+ rceFixedVersion: "19.2.1",
6866
+ latestSafeVersion: "19.2.6"
6867
+ }
6868
+ };
6869
+ const NEXTJS_OLDEST_AFFECTED_MAJOR = 13;
6870
+ const NEXTJS_RCE_FIXED_BY_MINOR = {
6871
+ "15.0": "15.0.5",
6872
+ "15.1": "15.1.9",
6873
+ "15.2": "15.2.6",
6874
+ "15.3": "15.3.6",
6875
+ "15.4": "15.4.8",
6876
+ "15.5": "15.5.7",
6877
+ "16.0": "16.0.7"
6878
+ };
6879
+ const NEXTJS_LATEST_SAFE_BY_MAJOR = {
6880
+ 15: "15.5.18",
6881
+ 16: "16.2.6"
6882
+ };
6883
+ const NEXTJS_SUPPORTED_UPGRADE_TARGETS = "15.5.18 or 16.2.6";
6884
+ const buildAdvisoryDiagnostic = (input) => ({
6885
+ filePath: "package.json",
6886
+ plugin: "react-doctor",
6887
+ rule: RULE_KEY,
6888
+ severity: input.severity,
6889
+ message: input.message,
6890
+ help: input.help,
6891
+ line: 0,
6892
+ column: 0,
6893
+ category: "Security"
6894
+ });
6895
+ const enumerateWorkspaceDirectories = (workspaceRoot) => {
6896
+ const patterns = getWorkspacePatterns(workspaceRoot, readPackageJson(path$1.join(workspaceRoot, "package.json")));
6897
+ const directories = /* @__PURE__ */ new Set();
6898
+ for (const pattern of patterns) for (const directory of resolveWorkspaceDirectories(workspaceRoot, pattern)) directories.add(directory);
6899
+ return [...directories];
6900
+ };
6901
+ const readDeclaredSpec = (packageJson, packageName) => {
6902
+ for (const section of DEPENDENCY_SECTIONS) {
6903
+ const spec = packageJson[section]?.[packageName];
6904
+ if (typeof spec === "string") return spec;
6905
+ }
6906
+ return null;
6907
+ };
6908
+ const resolveVersionInDirectory = (directory, packageName, declaredSpecOverride) => {
6909
+ const manifestPath = path$1.join(directory, "node_modules", packageName, "package.json");
6910
+ if (isFile(manifestPath)) {
6911
+ const installedVersion = import_semver.valid(readPackageJson(manifestPath).version ?? null);
6912
+ if (installedVersion !== null) return installedVersion;
6913
+ }
6914
+ const candidateSpecs = [readDeclaredSpec(readPackageJson(path$1.join(directory, "package.json")), packageName), declaredSpecOverride];
6915
+ for (const spec of candidateSpecs) {
6916
+ const pinnedVersion = spec === null ? null : import_semver.valid(spec);
6917
+ if (pinnedVersion !== null) return pinnedVersion;
6918
+ }
6919
+ return null;
6920
+ };
6921
+ const checkReactServerDomAdvisory = (packageName, version) => {
6922
+ const advisory = REACT_RSC_ADVISORIES_BY_MINOR[`${import_semver.major(version)}.${import_semver.minor(version)}`];
6923
+ if (advisory === void 0) return [];
6924
+ const installedDisplay = `${packageName}@${version}`;
6925
+ const lineDisplay = `${import_semver.major(version)}.${import_semver.minor(version)}`;
6926
+ if (import_semver.lt(version, advisory.rceFixedVersion)) return [buildAdvisoryDiagnostic({
6927
+ severity: "error",
6928
+ message: `${installedDisplay} has the critical React Server Components remote code execution vulnerability (CVE-2025-55182, CVSS 10.0) — an unauthenticated attacker can run arbitrary code on your server by sending a crafted payload to any Server Function endpoint`,
6929
+ help: `Upgrade React's Server Components runtime to ${advisory.latestSafeVersion} — a patch-level bump within ${lineDisplay} with no breaking changes. Run \`npm install ${packageName}@${advisory.latestSafeVersion}\` and pin \`react\`/\`react-dom\` to ${advisory.latestSafeVersion} too. See ${REACT_BLOG_RSC_ADVISORY_URL}`
6930
+ })];
6931
+ if (import_semver.lt(version, advisory.latestSafeVersion)) return [buildAdvisoryDiagnostic({
6932
+ severity: "warning",
6933
+ message: `${installedDisplay} is affected by a high-severity React Server Components denial-of-service vulnerability (CVE-2026-23870) patched in ${advisory.latestSafeVersion}`,
6934
+ help: `Upgrade to ${advisory.latestSafeVersion} — a patch-level bump within ${lineDisplay}. Run \`npm install ${packageName}@${advisory.latestSafeVersion}\` and align \`react\`/\`react-dom\`. See ${VERCEL_NEXTJS_SECURITY_RELEASE_URL}`
6935
+ })];
6936
+ return [];
6937
+ };
6938
+ const checkNextjsAdvisory = (version) => {
6939
+ const major = import_semver.major(version);
6940
+ if (major < NEXTJS_OLDEST_AFFECTED_MAJOR) return [];
6941
+ const installedDisplay = `next@${version}`;
6942
+ const latestSafeVersion = NEXTJS_LATEST_SAFE_BY_MAJOR[major];
6943
+ if (latestSafeVersion === void 0) {
6944
+ if (major >= 15) return [];
6945
+ return [buildAdvisoryDiagnostic({
6946
+ severity: "warning",
6947
+ message: `${installedDisplay} is on an unsupported Next.js release line affected by the React Server Components security advisories — there is no patched ${major}.x release`,
6948
+ help: `Upgrade to a patched Next.js release (${NEXTJS_SUPPORTED_UPGRADE_TARGETS}). Next.js bundles its own React Server Components runtime, so upgrading Next.js is what ships the fix. See ${VERCEL_NEXTJS_SECURITY_RELEASE_URL}`
6949
+ })];
6950
+ }
6951
+ const rceFixedVersion = NEXTJS_RCE_FIXED_BY_MINOR[`${major}.${import_semver.minor(version)}`];
6952
+ if (rceFixedVersion !== void 0 && import_semver.lt(version, rceFixedVersion)) return [buildAdvisoryDiagnostic({
6953
+ severity: "error",
6954
+ message: `${installedDisplay} bundles the React Server Components runtime affected by the critical remote code execution vulnerability (CVE-2025-55182, CVSS 10.0) — an unauthenticated attacker can run arbitrary code on your server by sending a crafted payload to any Server Function or Server Action endpoint`,
6955
+ help: `Upgrade Next.js to ${latestSafeVersion} (or newer). Next.js bundles its own React Server Components runtime, so bumping Next.js — not \`react\` — ships the fix. Run \`npm install next@${latestSafeVersion}\`. See ${VERCEL_NEXTJS_SECURITY_RELEASE_URL}`
6956
+ })];
6957
+ if (import_semver.lt(version, latestSafeVersion)) return [buildAdvisoryDiagnostic({
6958
+ severity: "warning",
6959
+ message: `${installedDisplay} bundles a React Server Components runtime affected by a high-severity denial-of-service vulnerability (CVE-2026-23870) patched in Next.js ${latestSafeVersion}`,
6960
+ help: `Upgrade Next.js to ${latestSafeVersion} (or newer). Next.js bundles its own React Server Components runtime, so bumping Next.js ships the fix. Run \`npm install next@${latestSafeVersion}\`. See ${VERCEL_NEXTJS_SECURITY_RELEASE_URL}`
6961
+ })];
6962
+ return [];
6963
+ };
6964
+ /**
6965
+ * Flags a project running React Server Components on a version with a known
6966
+ * security advisory — primarily the critical unauthenticated RCE
6967
+ * (CVE-2025-55182), plus the later high-severity DoS (CVE-2026-23870).
6968
+ *
6969
+ * Every candidate directory — the scan root and each workspace package — is
6970
+ * probed independently, so heterogeneous monorepo installs are all seen (a
6971
+ * vulnerable `next` in one workspace isn't masked by an inert one elsewhere).
6972
+ * Next.js vendors its own RSC runtime, so an affected `next` install in a
6973
+ * directory is reported by its `next` version (the fix is a Next.js bump) and
6974
+ * suppresses the standalone `react-server-dom-*` check for that directory only;
6975
+ * every other framework or bundler — Vite, Parcel, React Router, Waku,
6976
+ * RedwoodSDK — is reported by its `react-server-dom-*` version. Dispatch keys
6977
+ * on resolved installs rather than the root framework classification, so a
6978
+ * monorepo whose root is Vite but whose workspace runs Next.js is still
6979
+ * covered. Pure client-side React apps (no RSC packages, no Next.js) are not
6980
+ * affected and stay quiet.
6981
+ */
6982
+ const checkReactServerComponentsAdvisory = (scanDirectory, project) => {
6983
+ const workspaceRoot = findMonorepoRoot(scanDirectory) ?? project.rootDirectory;
6984
+ const candidateDirectories = [...new Set([
6985
+ scanDirectory,
6986
+ project.rootDirectory,
6987
+ workspaceRoot,
6988
+ ...enumerateWorkspaceDirectories(workspaceRoot)
6989
+ ])];
6990
+ const diagnostics = [];
6991
+ const seenMessages = /* @__PURE__ */ new Set();
6992
+ const pushUnique = (candidates) => {
6993
+ for (const candidate of candidates) {
6994
+ if (seenMessages.has(candidate.message)) continue;
6995
+ seenMessages.add(candidate.message);
6996
+ diagnostics.push(candidate);
6997
+ }
6998
+ };
6999
+ for (const directory of candidateDirectories) {
7000
+ const nextVersion = resolveVersionInDirectory(directory, "next", directory === scanDirectory ? project.nextjsVersion : null);
7001
+ if (nextVersion !== null) pushUnique(checkNextjsAdvisory(nextVersion));
7002
+ if (nextVersion !== null && import_semver.major(nextVersion) >= NEXTJS_OLDEST_AFFECTED_MAJOR) continue;
7003
+ for (const packageName of REACT_SERVER_DOM_PACKAGES) {
7004
+ const version = resolveVersionInDirectory(directory, packageName, null);
7005
+ if (version !== null) pushUnique(checkReactServerDomAdvisory(packageName, version));
7006
+ }
7007
+ }
7008
+ return diagnostics;
7009
+ };
5492
7010
  const REDUCED_MOTION_GREP_PATTERN = "prefers-reduced-motion|useReducedMotion|MotionConfig|reducedMotion";
5493
7011
  const REDUCED_MOTION_FILE_GLOBS = [
5494
7012
  "*.ts",
@@ -8439,6 +9957,214 @@ var Score = class Score extends Context.Service()("react-doctor/Score") {
8439
9957
  }) }));
8440
9958
  static layerOf = (result) => Layer.succeed(Score, Score.of({ compute: () => Effect.succeed(result) }));
8441
9959
  };
9960
+ const SocketScoreSchema = Schema.Struct({
9961
+ overall: Schema.Number,
9962
+ license: Schema.Number,
9963
+ maintenance: Schema.Number,
9964
+ quality: Schema.Number,
9965
+ supplyChain: Schema.Number,
9966
+ vulnerability: Schema.Number
9967
+ });
9968
+ const SocketArtifactSchema = Schema.Struct({ score: Schema.optional(SocketScoreSchema) });
9969
+ const decodeArtifact = Schema.decodeUnknownOption(SocketArtifactSchema);
9970
+ const SCORE_AXES = [
9971
+ {
9972
+ key: "supplyChain",
9973
+ label: "supply chain"
9974
+ },
9975
+ {
9976
+ key: "vulnerability",
9977
+ label: "vulnerability"
9978
+ },
9979
+ {
9980
+ key: "maintenance",
9981
+ label: "maintenance"
9982
+ },
9983
+ {
9984
+ key: "quality",
9985
+ label: "quality"
9986
+ },
9987
+ {
9988
+ key: "license",
9989
+ label: "license"
9990
+ }
9991
+ ];
9992
+ const clampScore = (value) => {
9993
+ if (!Number.isFinite(value)) return 50;
9994
+ return Math.min(Math.max(value, 0), 100);
9995
+ };
9996
+ const toHundred = (normalizedScore) => Math.round(clampScore(normalizedScore * 100));
9997
+ const resolveOptions = (config) => {
9998
+ const supplyChain = config?.supplyChain ?? {};
9999
+ return {
10000
+ minScore: typeof supplyChain.minScore === "number" ? clampScore(supplyChain.minScore) : 50,
10001
+ severity: supplyChain.severity === "warning" ? "warning" : "error",
10002
+ includeDevDependencies: supplyChain.includeDevDependencies !== false
10003
+ };
10004
+ };
10005
+ const resolveConcreteVersion = (spec) => {
10006
+ const trimmed = spec.trim();
10007
+ if (trimmed.length === 0) return null;
10008
+ if (trimmed.includes(":")) return null;
10009
+ const match = trimmed.match(/\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?/);
10010
+ return match ? match[0] : null;
10011
+ };
10012
+ const locateDependencyKey = (packageJsonText, section, name) => {
10013
+ const needle = `"${name}"`;
10014
+ const sectionHeader = new RegExp(`"${section}"\\s*:\\s*\\{`);
10015
+ const lines = packageJsonText.split(/\r?\n/);
10016
+ let depth = 0;
10017
+ let insideSection = false;
10018
+ for (let lineIndex = 0; lineIndex < lines.length; lineIndex += 1) {
10019
+ const lineText = lines[lineIndex];
10020
+ if (!insideSection) {
10021
+ if (sectionHeader.test(lineText)) {
10022
+ insideSection = true;
10023
+ depth = 1;
10024
+ }
10025
+ continue;
10026
+ }
10027
+ const columnIndex = lineText.indexOf(needle);
10028
+ if (columnIndex >= 0 && /^\s*:/.test(lineText.slice(columnIndex + needle.length))) return {
10029
+ line: lineIndex + 1,
10030
+ column: columnIndex + 1
10031
+ };
10032
+ for (const character of lineText) if (character === "{") depth += 1;
10033
+ else if (character === "}") depth -= 1;
10034
+ if (depth <= 0) return null;
10035
+ }
10036
+ return null;
10037
+ };
10038
+ const collectDependenciesToScore = (packageJson, packageJsonText, includeDevDependencies) => {
10039
+ const sectionByName = /* @__PURE__ */ new Map();
10040
+ for (const name of Object.keys(packageJson.dependencies ?? {})) sectionByName.set(name, "dependencies");
10041
+ if (includeDevDependencies) {
10042
+ for (const name of Object.keys(packageJson.devDependencies ?? {})) if (!sectionByName.has(name)) sectionByName.set(name, "devDependencies");
10043
+ }
10044
+ const dependencies = [];
10045
+ for (const [name, section] of sectionByName) {
10046
+ if (SUPPLY_CHAIN_IGNORED_PACKAGES.has(name)) continue;
10047
+ const spec = (packageJson[section] ?? {})[name] ?? "";
10048
+ const version = resolveConcreteVersion(spec);
10049
+ if (version === null) continue;
10050
+ const location = locateDependencyKey(packageJsonText, section, name);
10051
+ dependencies.push({
10052
+ name,
10053
+ version,
10054
+ spec,
10055
+ line: location?.line ?? 0,
10056
+ column: location?.column ?? 0
10057
+ });
10058
+ }
10059
+ return dependencies;
10060
+ };
10061
+ const readPackageJsonText = (packageJsonPath) => {
10062
+ try {
10063
+ return fs$1.readFileSync(packageJsonPath, "utf-8");
10064
+ } catch {
10065
+ return "";
10066
+ }
10067
+ };
10068
+ const toPurl = (dependency) => `pkg:npm/${dependency.name}@${dependency.version}`;
10069
+ const parseScoreFromBody = (body) => {
10070
+ for (const line of body.split("\n")) {
10071
+ if (line.trim().length === 0) continue;
10072
+ let parsed;
10073
+ try {
10074
+ parsed = JSON.parse(line);
10075
+ } catch {
10076
+ continue;
10077
+ }
10078
+ const artifact = Option.getOrNull(decodeArtifact(parsed));
10079
+ if (artifact?.score) return artifact.score;
10080
+ }
10081
+ return null;
10082
+ };
10083
+ const fetchSocketScore = (dependency) => Effect.tryPromise(async (signal) => {
10084
+ const requestUrl = `${SOCKET_FREE_PURL_API_BASE}/${encodeURIComponent(toPurl(dependency))}`;
10085
+ const response = await fetch(requestUrl, {
10086
+ headers: { "User-Agent": SOCKET_FREE_USER_AGENT },
10087
+ signal
10088
+ });
10089
+ if (!response.ok) return null;
10090
+ return parseScoreFromBody(await response.text());
10091
+ }).pipe(Effect.timeout(FETCH_TIMEOUT_MS), Effect.orElseSucceed(() => null), Effect.tap((score) => {
10092
+ const scoreAttributes = {};
10093
+ if (score !== null) {
10094
+ scoreAttributes["socket.score.overall"] = toHundred(score.overall);
10095
+ for (const axis of SCORE_AXES) scoreAttributes[`socket.score.${axis.key}`] = toHundred(score[axis.key]);
10096
+ }
10097
+ return Effect.annotateCurrentSpan({
10098
+ "socket.scored": score !== null,
10099
+ ...scoreAttributes
10100
+ });
10101
+ }), Effect.withSpan("SupplyChain.fetchScore", { attributes: {
10102
+ "socket.package": dependency.name,
10103
+ "socket.version": dependency.version,
10104
+ "socket.purl": toPurl(dependency)
10105
+ } }));
10106
+ const formatAxisScores = (score) => SCORE_AXES.map((axis) => `${axis.label} ${toHundred(score[axis.key])}`).join(", ");
10107
+ const buildLowScoreDiagnostic = (dependency, score, options) => {
10108
+ const overall = toHundred(score.overall);
10109
+ const packagePageUrl = `${SOCKET_PACKAGE_PAGE_BASE}/${dependency.name}/overview/${dependency.version}`;
10110
+ return {
10111
+ filePath: "package.json",
10112
+ plugin: SUPPLY_CHAIN_PLUGIN,
10113
+ rule: SUPPLY_CHAIN_RULE,
10114
+ severity: options.severity,
10115
+ message: `\`${dependency.name}\` (declared in package.json as "${dependency.spec}", scored at ${dependency.version}) has a Socket supply-chain score of ${overall}/100 (below the minimum of ${options.minScore}). Axis scores — ${formatAxisScores(score)}.`,
10116
+ help: `Update or replace the \`"${dependency.name}": "${dependency.spec}"\` entry in package.json. Review ${dependency.name} on Socket: ${packagePageUrl}. Or raise \`supplyChain.minScore\` if you have vetted and accepted this package.`,
10117
+ url: packagePageUrl,
10118
+ line: dependency.line,
10119
+ column: dependency.column,
10120
+ category: SUPPLY_CHAIN_CATEGORY
10121
+ };
10122
+ };
10123
+ /**
10124
+ * Scores every direct dependency in the project's `package.json` against
10125
+ * Socket.dev's free PURL endpoint (the same one Socket Firewall's free tier
10126
+ * uses — no API key) and returns a diagnostic for each dependency whose
10127
+ * Socket `overall` score is below the configured `minScore`.
10128
+ *
10129
+ * Lookups run with bounded concurrency via `Effect.forEach`. The check is
10130
+ * total/fail-open: each per-package lookup already recovers to `null`
10131
+ * (skip) on timeout or network/parse failure, so a flaky Socket API never
10132
+ * sinks the scan. Diagnostics default to `"error"` severity, so a low score
10133
+ * fails the run at the standard `blocking` gate.
10134
+ */
10135
+ const checkSupplyChain = (input) => Effect.gen(function* () {
10136
+ const options = resolveOptions(input.userConfig);
10137
+ const packageJsonPath = path$1.join(input.rootDirectory, "package.json");
10138
+ const dependencies = collectDependenciesToScore(readPackageJson(packageJsonPath), readPackageJsonText(packageJsonPath), options.includeDevDependencies);
10139
+ if (dependencies.length === 0) return [];
10140
+ const scores = yield* Effect.forEach(dependencies, fetchSocketScore, { concurrency: 8 });
10141
+ const diagnostics = [];
10142
+ for (let index = 0; index < dependencies.length; index += 1) {
10143
+ const score = scores[index];
10144
+ if (!score) continue;
10145
+ if (toHundred(score.overall) >= options.minScore) continue;
10146
+ diagnostics.push(buildLowScoreDiagnostic(dependencies[index], score, options));
10147
+ }
10148
+ return diagnostics;
10149
+ });
10150
+ /**
10151
+ * `SupplyChain` scores the project's direct dependencies against Socket.dev's
10152
+ * free, keyless PURL endpoint — the same lookup Socket Firewall's free tier
10153
+ * (`sfw`) performs — and streams a diagnostic for each dependency whose
10154
+ * Socket score falls below the configured `supplyChain.minScore`.
10155
+ *
10156
+ * Runs by default (one network request per dependency); the orchestrator
10157
+ * provides `layerOf([])` only when the user opts out via
10158
+ * `supplyChain.enabled: false`, and always skips it in `--diff` / `--staged`
10159
+ * mode (dependency health is a whole-project property).
10160
+ * The underlying `checkSupplyChain` Effect is total/fail-open — per-package
10161
+ * timeouts and network failures recover to "skip" — so the stream never
10162
+ * fails, mirroring `DeadCode`'s stream shape so the two compose the same way.
10163
+ */
10164
+ var SupplyChain = class SupplyChain extends Context.Service()("react-doctor/SupplyChain") {
10165
+ static layerNode = Layer.succeed(SupplyChain, SupplyChain.of({ run: (input) => Stream.unwrap(checkSupplyChain(input).pipe(Effect.map((diagnostics) => Stream.fromIterable(diagnostics)), Effect.withSpan("SupplyChain.run"))) }));
10166
+ static layerOf = (diagnostics) => Layer.succeed(SupplyChain, SupplyChain.of({ run: () => Stream.fromIterable(diagnostics) }));
10167
+ };
8442
10168
  const getObjectProperty = (value, propertyName) => {
8443
10169
  if (typeof value !== "object" || value === null) return void 0;
8444
10170
  return Reflect.get(value, propertyName);
@@ -8516,6 +10242,7 @@ const runInspect = (input, hooks = {}) => Effect.gen(function* () {
8516
10242
  const reporterService = yield* Reporter;
8517
10243
  const scoreService = yield* Score;
8518
10244
  const deadCodeService = yield* DeadCode;
10245
+ const supplyChainService = yield* SupplyChain;
8519
10246
  const gitService = yield* Git;
8520
10247
  const progressService = yield* Progress;
8521
10248
  const partialFailuresRef = yield* LintPartialFailures;
@@ -8551,10 +10278,15 @@ const runInspect = (input, hooks = {}) => Effect.gen(function* () {
8551
10278
  const environmentDiagnostics = isDiffMode ? [] : [
8552
10279
  ...checkReducedMotion(scanDirectory),
8553
10280
  ...checkPnpmHardening(scanDirectory),
10281
+ ...checkReactServerComponentsAdvisory(scanDirectory, project),
8554
10282
  ...checkExpoProject(scanDirectory, project),
8555
10283
  ...checkReactNativeProject(scanDirectory, project)
8556
10284
  ];
8557
10285
  const envCollected = yield* Stream.runCollect(applyPerElementPipeline(Stream.fromIterable(environmentDiagnostics)));
10286
+ const supplyChainCollected = !isDiffMode || (input.supplyChainManifestChanged ?? false) ? yield* Stream.runCollect(applyPerElementPipeline(supplyChainService.run({
10287
+ rootDirectory: scanDirectory,
10288
+ userConfig: resolvedConfig.config
10289
+ }))) : [];
8558
10290
  const lintFailure = yield* Ref.make({
8559
10291
  didFail: false,
8560
10292
  reason: null,
@@ -8619,6 +10351,7 @@ const runInspect = (input, hooks = {}) => Effect.gen(function* () {
8619
10351
  yield* reporterService.finalize;
8620
10352
  const finalDiagnostics = [
8621
10353
  ...envCollected,
10354
+ ...supplyChainCollected,
8622
10355
  ...lintCollected,
8623
10356
  ...deadCodeCollected
8624
10357
  ];
@@ -8889,7 +10622,7 @@ const runEditorScan = async (input) => {
8889
10622
  resolvedDirectory: input.directory,
8890
10623
  configSourceDirectory: input.configSourceDirectory ?? null
8891
10624
  }) : Config.layerNode;
8892
- const layers = Layer.mergeAll(Project.layerNode, configLayer, Files.layerNode, Git.layerOf({}), lint ? Linter.layerOxlint : Linter.layerOf([]), LintPartialFailures.layerLive, runDeadCode ? DeadCode.layerNode : DeadCode.layerOf([]), Progress.layerNoop, Reporter.layerNoop, Score.layerOf(null), Layer.succeed(OxlintConcurrency, 1));
10625
+ const layers = Layer.mergeAll(Project.layerNode, configLayer, Files.layerNode, Git.layerOf({}), lint ? Linter.layerOxlint : Linter.layerOf([]), LintPartialFailures.layerLive, runDeadCode ? DeadCode.layerNode : DeadCode.layerOf([]), Progress.layerNoop, Reporter.layerNoop, Score.layerOf(null), SupplyChain.layerOf([]), Layer.succeed(OxlintConcurrency, 1));
8893
10626
  const program = runInspect({
8894
10627
  directory: input.directory,
8895
10628
  includePaths: input.includePaths ?? [],
@@ -11031,5 +12764,5 @@ const startLanguageServer = () => {
11031
12764
  };
11032
12765
  //#endregion
11033
12766
  export { startLanguageServer };
11034
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a515bd97-c428-5447-b931-4f92cc280b30")}catch(e){}}();
11035
- //# debugId=a515bd97-c428-5447-b931-4f92cc280b30
12767
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1f4a770f-164c-5bdb-abb6-8533416f03ca")}catch(e){}}();
12768
+ //# debugId=1f4a770f-164c-5bdb-abb6-8533416f03ca