@moldea.ai/cli 5.0.2 → 6.0.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.
@@ -0,0 +1,1790 @@
1
+ #!/usr/bin/env node
2
+ import process$1 from "node:process";
3
+ import { execFile, spawn } from "node:child_process";
4
+ import { TextDecoder as TextDecoder$1 } from "node:util";
5
+ //#region \0rolldown/runtime.js
6
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
7
+ //#endregion
8
+ //#region src/git-process/constants.ts
9
+ var GIT_PROCESS_GLOBAL_ARGUMENTS = [
10
+ "--no-pager",
11
+ "-c",
12
+ "color.ui=false",
13
+ "-c",
14
+ "core.fsmonitor=false",
15
+ "-c",
16
+ "submodule.recurse=false"
17
+ ];
18
+ var MAX_GIT_PROCESS_DIAGNOSTIC_BYTES = 4096;
19
+ var GIT_PROCESS_REMOVED_ENVIRONMENT_NAMES = [
20
+ "GIT_DIR",
21
+ "GIT_WORK_TREE",
22
+ "GIT_INDEX_FILE",
23
+ "GIT_OBJECT_DIRECTORY",
24
+ "GIT_ALTERNATE_OBJECT_DIRECTORIES",
25
+ "GIT_COMMON_DIR",
26
+ "GIT_CEILING_DIRECTORIES",
27
+ "GIT_DISCOVERY_ACROSS_FILESYSTEM",
28
+ "GIT_NAMESPACE",
29
+ "GIT_SHALLOW_FILE",
30
+ "GIT_ATTR_SOURCE",
31
+ "GIT_CONFIG",
32
+ "GIT_CONFIG_SYSTEM",
33
+ "GIT_CONFIG_GLOBAL",
34
+ "GIT_CONFIG_NOSYSTEM",
35
+ "GIT_CONFIG_PARAMETERS",
36
+ "GIT_CONFIG_COUNT",
37
+ "GIT_EXEC_PATH",
38
+ "GIT_LITERAL_PATHSPECS",
39
+ "GIT_GLOB_PATHSPECS",
40
+ "GIT_NOGLOB_PATHSPECS",
41
+ "GIT_ICASE_PATHSPECS"
42
+ ];
43
+ var GIT_PROCESS_REMOVED_ENVIRONMENT_PREFIXES = [
44
+ "GIT_CONFIG_KEY_",
45
+ "GIT_CONFIG_VALUE_",
46
+ "GIT_TRACE"
47
+ ];
48
+ var GIT_PROCESS_ENVIRONMENT_OVERRIDES = Object.freeze({
49
+ LC_ALL: "C",
50
+ LANG: "C",
51
+ LANGUAGE: "C",
52
+ GIT_OPTIONAL_LOCKS: "0",
53
+ GIT_PAGER: "",
54
+ PAGER: "",
55
+ GIT_TERMINAL_PROMPT: "0",
56
+ NO_COLOR: "1"
57
+ });
58
+ //#endregion
59
+ //#region src/git-process/environment.ts
60
+ var REMOVED_ENVIRONMENT_NAMES = new Set(GIT_PROCESS_REMOVED_ENVIRONMENT_NAMES.map((name) => name.toUpperCase()));
61
+ /**
62
+ * Determines whether an inherited environment variable can alter Git behavior.
63
+ * @param name The environment variable name.
64
+ * @returns Whether the variable must be removed.
65
+ */
66
+ var isRemovedEnvironmentVariable = (name) => {
67
+ const normalizedName = name.toUpperCase();
68
+ return REMOVED_ENVIRONMENT_NAMES.has(normalizedName) || GIT_PROCESS_REMOVED_ENVIRONMENT_PREFIXES.some((prefix) => normalizedName.startsWith(prefix));
69
+ };
70
+ /**
71
+ * Creates the immutable, deterministic environment used by Git subprocesses.
72
+ * @param environment The host environment to sanitize.
73
+ * @returns A frozen environment that preserves unrelated variables.
74
+ */
75
+ var createGitProcessEnvironment = (environment) => {
76
+ const sanitizedEnvironment = {};
77
+ for (const [name, environmentValue] of Object.entries(environment)) if (environmentValue !== void 0 && !isRemovedEnvironmentVariable(name) && !(name.toUpperCase() in GIT_PROCESS_ENVIRONMENT_OVERRIDES)) sanitizedEnvironment[name] = environmentValue;
78
+ return Object.freeze({
79
+ ...sanitizedEnvironment,
80
+ ...GIT_PROCESS_ENVIRONMENT_OVERRIDES
81
+ });
82
+ };
83
+ //#endregion
84
+ //#region src/git-process/utilities.ts
85
+ /**
86
+ * Classifies a subprocess error without retaining provider diagnostics.
87
+ * @param error The Node.js subprocess error, or null for a nonzero exit.
88
+ * @param stderr The bounded process diagnostic used only for classification.
89
+ * @returns The normalized failure reason.
90
+ */
91
+ var classifyGitProcessError = (error, stderr) => {
92
+ const errorCode = error instanceof Error && "code" in error && typeof error.code === "string" ? error.code.toUpperCase() : "";
93
+ if (errorCode === "ENOENT") return "not-found";
94
+ if (errorCode === "EACCES" || errorCode === "EPERM") return "access-denied";
95
+ if (errorCode === "ERR_CHILD_PROCESS_STDIO_MAXBUFFER") return "output-limit-exceeded";
96
+ const diagnostic = new TextDecoder().decode(stderr);
97
+ if (diagnostic.startsWith("fatal: not a git repository")) return "repository-not-found";
98
+ if (diagnostic.startsWith("fatal: detected dubious ownership in repository at ") || diagnostic.startsWith("fatal: ") && /: Permission denied(?:\r?\n)?$/u.test(diagnostic)) return "access-denied";
99
+ return "command-failed";
100
+ };
101
+ //#endregion
102
+ //#region src/git-process/executor.ts
103
+ /**
104
+ * Executes Git directly with trusted arguments, a sanitized environment, and bounded output.
105
+ * @param options The trusted arguments, environment, output limit, and optional signal.
106
+ * @returns A promise that resolves to normalized process output or failure.
107
+ */
108
+ var executeGitProcess = async (options) => new Promise((resolve) => {
109
+ if (options.signal?.aborted) {
110
+ resolve(Object.freeze({
111
+ kind: "failed",
112
+ reason: "aborted"
113
+ }));
114
+ return;
115
+ }
116
+ execFile("git", [...GIT_PROCESS_GLOBAL_ARGUMENTS, ...options.arguments], {
117
+ encoding: "buffer",
118
+ env: createGitProcessEnvironment(options.environment ?? process$1.env),
119
+ maxBuffer: options.maxBufferBytes,
120
+ shell: false,
121
+ ...options.signal === void 0 ? {} : { signal: options.signal },
122
+ windowsHide: true
123
+ }, (error, stdout, stderr) => {
124
+ if (options.signal?.aborted) {
125
+ resolve(Object.freeze({
126
+ kind: "failed",
127
+ reason: "aborted"
128
+ }));
129
+ return;
130
+ }
131
+ if (error) {
132
+ resolve(Object.freeze({
133
+ kind: "failed",
134
+ reason: classifyGitProcessError(error, stderr)
135
+ }));
136
+ return;
137
+ }
138
+ resolve(Object.freeze({
139
+ kind: "completed",
140
+ stdout: Uint8Array.from(stdout),
141
+ stderr: Uint8Array.from(stderr)
142
+ }));
143
+ });
144
+ });
145
+ //#endregion
146
+ //#region src/git-process/streaming-executor.ts
147
+ /** Concatenates the bounded stderr chunks retained for classification. */
148
+ var concatenateChunks = (chunks, byteLength) => Uint8Array.from(Buffer.concat(chunks, byteLength));
149
+ /**
150
+ * Executes Git directly while consuming bounded stdout incrementally.
151
+ * @param options The trusted arguments, optional stdin and signal, consumer, environment, and limits.
152
+ * @returns A promise that resolves to a normalized streamed process result.
153
+ */
154
+ var executeGitStreamingProcess = async (options) => new Promise((resolve, reject) => {
155
+ if (options.signal?.aborted) {
156
+ resolve(Object.freeze({
157
+ kind: "failed",
158
+ reason: "aborted"
159
+ }));
160
+ return;
161
+ }
162
+ const stdin = options.stdin === void 0 ? null : Uint8Array.from(options.stdin);
163
+ const stderrChunks = [];
164
+ let failureReason = null;
165
+ let isSettled = false;
166
+ let stderrBytes = 0;
167
+ let stdoutBytes = 0;
168
+ const childProcess = spawn("git", [...GIT_PROCESS_GLOBAL_ARGUMENTS, ...options.arguments], {
169
+ env: createGitProcessEnvironment(options.environment ?? process$1.env),
170
+ shell: false,
171
+ ...options.signal === void 0 ? {} : { signal: options.signal },
172
+ stdio: [
173
+ stdin === null ? "ignore" : "pipe",
174
+ "pipe",
175
+ "pipe"
176
+ ],
177
+ windowsHide: true
178
+ });
179
+ const { stderr, stdout } = childProcess;
180
+ if (stderr === null || stdout === null) {
181
+ childProcess.on("error", () => void 0);
182
+ childProcess.kill();
183
+ resolve(Object.freeze({
184
+ kind: "failed",
185
+ reason: "command-failed"
186
+ }));
187
+ return;
188
+ }
189
+ stdout.on("data", (chunk) => {
190
+ if (failureReason !== null || isSettled) return;
191
+ if (stdoutBytes + chunk.byteLength > options.maxStdoutBytes) {
192
+ failureReason = "stdout-limit-exceeded";
193
+ childProcess.kill();
194
+ return;
195
+ }
196
+ stdoutBytes += chunk.byteLength;
197
+ try {
198
+ options.consumeStdout(Uint8Array.from(chunk));
199
+ } catch (error) {
200
+ isSettled = true;
201
+ childProcess.kill();
202
+ reject(error instanceof Error ? error : new Error("The Git stdout consumer failed.", { cause: error }));
203
+ }
204
+ });
205
+ stderr.on("data", (chunk) => {
206
+ if (failureReason !== null || isSettled) return;
207
+ if (stderrBytes + chunk.byteLength > options.maxStderrBytes) {
208
+ failureReason = "stderr-limit-exceeded";
209
+ childProcess.kill();
210
+ return;
211
+ }
212
+ stderrBytes += chunk.byteLength;
213
+ stderrChunks.push(chunk);
214
+ });
215
+ childProcess.on("error", (error) => {
216
+ if (failureReason !== null || isSettled) return;
217
+ isSettled = true;
218
+ resolve(Object.freeze({
219
+ kind: "failed",
220
+ reason: options.signal?.aborted ? "aborted" : classifyGitProcessError(error, concatenateChunks(stderrChunks, stderrBytes))
221
+ }));
222
+ });
223
+ childProcess.on("close", (exitCode) => {
224
+ if (isSettled) return;
225
+ isSettled = true;
226
+ if (failureReason !== null) {
227
+ resolve(Object.freeze({
228
+ kind: "failed",
229
+ reason: failureReason
230
+ }));
231
+ return;
232
+ }
233
+ if (options.signal?.aborted) {
234
+ resolve(Object.freeze({
235
+ kind: "failed",
236
+ reason: "aborted"
237
+ }));
238
+ return;
239
+ }
240
+ const stderr = concatenateChunks(stderrChunks, stderrBytes);
241
+ if (exitCode !== 0) {
242
+ resolve(Object.freeze({
243
+ kind: "failed",
244
+ reason: classifyGitProcessError(null, stderr)
245
+ }));
246
+ return;
247
+ }
248
+ resolve(Object.freeze({
249
+ kind: "completed",
250
+ stderr,
251
+ stdoutBytes
252
+ }));
253
+ });
254
+ if (stdin !== null) {
255
+ if (childProcess.stdin === null) {
256
+ failureReason = "command-failed";
257
+ childProcess.kill();
258
+ return;
259
+ }
260
+ childProcess.stdin.on("error", () => {
261
+ if (failureReason !== null || isSettled) return;
262
+ failureReason = "command-failed";
263
+ childProcess.kill();
264
+ });
265
+ try {
266
+ childProcess.stdin.end(stdin);
267
+ } catch {
268
+ failureReason = "command-failed";
269
+ childProcess.kill();
270
+ }
271
+ }
272
+ });
273
+ //#endregion
274
+ //#region src/git-version/constants.ts
275
+ var MINIMUM_GIT_VERSION_COMPONENTS = Object.freeze({
276
+ major: 2,
277
+ minor: 30,
278
+ patch: 0
279
+ });
280
+ var MINIMUM_GIT_VERSION = `${MINIMUM_GIT_VERSION_COMPONENTS.major}.${MINIMUM_GIT_VERSION_COMPONENTS.minor}.${MINIMUM_GIT_VERSION_COMPONENTS.patch}`;
281
+ var MAX_GIT_VERSION_OUTPUT_BYTES = 4096;
282
+ //#endregion
283
+ //#region src/git-version/parser.ts
284
+ var GIT_VERSION_PATTERN = /^git version (0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:[.-][0-9A-Za-z]+)*(?: \([0-9A-Za-z](?:[0-9A-Za-z ._+/-]*[0-9A-Za-z])?\))?$/;
285
+ var UTF8_DECODER = new TextDecoder$1("utf-8", {
286
+ fatal: true,
287
+ ignoreBOM: true
288
+ });
289
+ /**
290
+ * Decodes one terminated Git version line as strict UTF-8.
291
+ * @param output The bounded stdout bytes from `git --version`.
292
+ * @returns The line without its terminator, or null when invalid.
293
+ */
294
+ var decodeGitVersionLine = (output) => {
295
+ let decodedOutput;
296
+ try {
297
+ decodedOutput = UTF8_DECODER.decode(output);
298
+ } catch {
299
+ return null;
300
+ }
301
+ if (decodedOutput.startsWith("")) return null;
302
+ if (decodedOutput.endsWith("\r\n")) return decodedOutput.slice(0, -2);
303
+ if (decodedOutput.endsWith("\n")) return decodedOutput.slice(0, -1);
304
+ return null;
305
+ };
306
+ /**
307
+ * Parses a strict `git --version` response without accepting arbitrary prose.
308
+ * @param output The bounded stdout bytes from Git.
309
+ * @returns The frozen numeric version, or null when the output is invalid.
310
+ */
311
+ var parseGitVersionOutput = (output) => {
312
+ const versionLine = decodeGitVersionLine(output);
313
+ if (versionLine === null || versionLine.includes("\r") || versionLine.includes("\n")) return null;
314
+ const match = GIT_VERSION_PATTERN.exec(versionLine);
315
+ if (match === null) return null;
316
+ const majorText = match[1];
317
+ const minorText = match[2];
318
+ const patchText = match[3];
319
+ if (majorText === void 0 || minorText === void 0 || patchText === void 0) return null;
320
+ const major = Number(majorText);
321
+ const minor = Number(minorText);
322
+ const patch = Number(patchText);
323
+ if (![
324
+ major,
325
+ minor,
326
+ patch
327
+ ].every(Number.isSafeInteger)) return null;
328
+ return Object.freeze({
329
+ major,
330
+ minor,
331
+ patch
332
+ });
333
+ };
334
+ //#endregion
335
+ //#region src/git-version/preflight.ts
336
+ /**
337
+ * Maps process failures to stable safe CLI errors.
338
+ * @param reason The normalized subprocess failure reason.
339
+ * @returns The public Git error code.
340
+ */
341
+ var mapGitProcessFailure = (reason) => {
342
+ switch (reason) {
343
+ case "aborted": return "GIT_OPERATION_ABORTED";
344
+ case "not-found": return "GIT_NOT_FOUND";
345
+ case "repository-not-found": return "GIT_COMMAND_FAILED";
346
+ case "access-denied": return "GIT_ACCESS_DENIED";
347
+ case "output-limit-exceeded": return "GIT_VERSION_INVALID";
348
+ case "command-failed": return "GIT_COMMAND_FAILED";
349
+ }
350
+ };
351
+ /**
352
+ * Determines whether a parsed Git version meets the supported minimum.
353
+ * @param version The parsed Git version.
354
+ * @returns Whether the numeric version is supported.
355
+ */
356
+ var isGitVersionSupported = (version) => {
357
+ if (version.major !== MINIMUM_GIT_VERSION_COMPONENTS.major) return version.major > MINIMUM_GIT_VERSION_COMPONENTS.major;
358
+ if (version.minor !== MINIMUM_GIT_VERSION_COMPONENTS.minor) return version.minor > MINIMUM_GIT_VERSION_COMPONENTS.minor;
359
+ return version.patch >= MINIMUM_GIT_VERSION_COMPONENTS.patch;
360
+ };
361
+ /**
362
+ * Creates a Git prerequisite check around an injectable process boundary.
363
+ * @param processExecutor The normalized Git subprocess executor.
364
+ * @returns A preflight that validates the installed Git version.
365
+ */
366
+ var createGitVersionPreflight = (processExecutor = executeGitProcess) => async (signal) => {
367
+ const processResult = await processExecutor({
368
+ arguments: ["--version"],
369
+ maxBufferBytes: MAX_GIT_VERSION_OUTPUT_BYTES,
370
+ ...signal === void 0 ? {} : { signal }
371
+ });
372
+ if (processResult.kind === "failed") return Object.freeze({
373
+ errorCode: mapGitProcessFailure(processResult.reason),
374
+ kind: "failed"
375
+ });
376
+ if (processResult.stderr.byteLength > 0) return Object.freeze({
377
+ errorCode: "GIT_VERSION_INVALID",
378
+ kind: "failed"
379
+ });
380
+ const version = parseGitVersionOutput(processResult.stdout);
381
+ if (version === null) return Object.freeze({
382
+ errorCode: "GIT_VERSION_INVALID",
383
+ kind: "failed"
384
+ });
385
+ if (!isGitVersionSupported(version)) return Object.freeze({
386
+ errorCode: "GIT_VERSION_UNSUPPORTED",
387
+ kind: "failed"
388
+ });
389
+ return Object.freeze({
390
+ kind: "supported",
391
+ version
392
+ });
393
+ };
394
+ //#endregion
395
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js
396
+ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
397
+ module.exports = {
398
+ MAX_LENGTH: 256,
399
+ MAX_SAFE_COMPONENT_LENGTH: 16,
400
+ MAX_SAFE_BUILD_LENGTH: 250,
401
+ MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER ||
402
+ /* istanbul ignore next */ 9007199254740991,
403
+ RELEASE_TYPES: [
404
+ "major",
405
+ "premajor",
406
+ "minor",
407
+ "preminor",
408
+ "patch",
409
+ "prepatch",
410
+ "prerelease"
411
+ ],
412
+ SEMVER_SPEC_VERSION: "2.0.0",
413
+ FLAG_INCLUDE_PRERELEASE: 1,
414
+ FLAG_LOOSE: 2
415
+ };
416
+ }));
417
+ //#endregion
418
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js
419
+ var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
420
+ module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
421
+ }));
422
+ //#endregion
423
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js
424
+ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
425
+ var { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
426
+ var debug = require_debug();
427
+ exports = module.exports = {};
428
+ var re = exports.re = [];
429
+ var safeRe = exports.safeRe = [];
430
+ var src = exports.src = [];
431
+ var safeSrc = exports.safeSrc = [];
432
+ var t = exports.t = {};
433
+ var R = 0;
434
+ var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
435
+ var safeRegexReplacements = [
436
+ ["\\s", 1],
437
+ ["\\d", MAX_LENGTH],
438
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
439
+ ];
440
+ var makeSafeRegex = (value) => {
441
+ for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
442
+ return value;
443
+ };
444
+ var createToken = (name, value, isGlobal) => {
445
+ const safe = makeSafeRegex(value);
446
+ const index = R++;
447
+ debug(name, index, value);
448
+ t[name] = index;
449
+ src[index] = value;
450
+ safeSrc[index] = safe;
451
+ re[index] = new RegExp(value, isGlobal ? "g" : void 0);
452
+ safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
453
+ };
454
+ createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
455
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
456
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
457
+ createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
458
+ createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
459
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
460
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
461
+ createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
462
+ createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
463
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
464
+ createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
465
+ createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
466
+ createToken("FULL", `^${src[t.FULLPLAIN]}$`);
467
+ createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
468
+ createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
469
+ createToken("GTLT", "((?:<|>)?=?)");
470
+ createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
471
+ createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
472
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
473
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
474
+ createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
475
+ createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
476
+ createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
477
+ createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
478
+ createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
479
+ createToken("COERCERTL", src[t.COERCE], true);
480
+ createToken("COERCERTLFULL", src[t.COERCEFULL], true);
481
+ createToken("LONETILDE", "(?:~>?)");
482
+ createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
483
+ exports.tildeTrimReplace = "$1~";
484
+ createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
485
+ createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
486
+ createToken("LONECARET", "(?:\\^)");
487
+ createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
488
+ exports.caretTrimReplace = "$1^";
489
+ createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
490
+ createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
491
+ createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
492
+ createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
493
+ createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
494
+ exports.comparatorTrimReplace = "$1$2$3";
495
+ createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
496
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
497
+ createToken("STAR", "(<|>)?=?\\s*\\*");
498
+ createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
499
+ createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
500
+ }));
501
+ //#endregion
502
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js
503
+ var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
504
+ var looseOption = Object.freeze({ loose: true });
505
+ var emptyOpts = Object.freeze({});
506
+ var parseOptions = (options) => {
507
+ if (!options) return emptyOpts;
508
+ if (typeof options !== "object") return looseOption;
509
+ return options;
510
+ };
511
+ module.exports = parseOptions;
512
+ }));
513
+ //#endregion
514
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js
515
+ var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
516
+ var numeric = /^[0-9]+$/;
517
+ var compareIdentifiers = (a, b) => {
518
+ if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
519
+ const anum = numeric.test(a);
520
+ const bnum = numeric.test(b);
521
+ if (anum && bnum) {
522
+ a = +a;
523
+ b = +b;
524
+ }
525
+ return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
526
+ };
527
+ var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
528
+ module.exports = {
529
+ compareIdentifiers,
530
+ rcompareIdentifiers
531
+ };
532
+ }));
533
+ //#endregion
534
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js
535
+ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
536
+ var debug = require_debug();
537
+ var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
538
+ var { safeRe: re, t } = require_re();
539
+ var parseOptions = require_parse_options();
540
+ var { compareIdentifiers } = require_identifiers();
541
+ var isPrereleaseIdentifier = (prerelease, identifier) => {
542
+ const identifiers = identifier.split(".");
543
+ if (identifiers.length > prerelease.length) return false;
544
+ for (let i = 0; i < identifiers.length; i++) if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) return false;
545
+ return true;
546
+ };
547
+ module.exports = class SemVer {
548
+ constructor(version, options) {
549
+ options = parseOptions(options);
550
+ if (version instanceof SemVer) {
551
+ if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
552
+ else version = version.version;
553
+ } else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
554
+ if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
555
+ debug("SemVer", version, options);
556
+ this.options = options;
557
+ this.loose = !!options.loose;
558
+ this.includePrerelease = !!options.includePrerelease;
559
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
560
+ if (!m) throw new TypeError(`Invalid Version: ${version}`);
561
+ this.raw = version;
562
+ this.major = +m[1];
563
+ this.minor = +m[2];
564
+ this.patch = +m[3];
565
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
566
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
567
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
568
+ if (!m[4]) this.prerelease = [];
569
+ else this.prerelease = m[4].split(".").map((id) => {
570
+ if (/^[0-9]+$/.test(id)) {
571
+ const num = +id;
572
+ if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
573
+ }
574
+ return id;
575
+ });
576
+ this.build = m[5] ? m[5].split(".") : [];
577
+ this.format();
578
+ }
579
+ format() {
580
+ this.version = `${this.major}.${this.minor}.${this.patch}`;
581
+ if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`;
582
+ return this.version;
583
+ }
584
+ toString() {
585
+ return this.version;
586
+ }
587
+ compare(other) {
588
+ debug("SemVer.compare", this.version, this.options, other);
589
+ if (!(other instanceof SemVer)) {
590
+ if (typeof other === "string" && other === this.version) return 0;
591
+ other = new SemVer(other, this.options);
592
+ }
593
+ if (other.version === this.version) return 0;
594
+ return this.compareMain(other) || this.comparePre(other);
595
+ }
596
+ compareMain(other) {
597
+ if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
598
+ if (this.major < other.major) return -1;
599
+ if (this.major > other.major) return 1;
600
+ if (this.minor < other.minor) return -1;
601
+ if (this.minor > other.minor) return 1;
602
+ if (this.patch < other.patch) return -1;
603
+ if (this.patch > other.patch) return 1;
604
+ return 0;
605
+ }
606
+ comparePre(other) {
607
+ if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
608
+ if (this.prerelease.length && !other.prerelease.length) return -1;
609
+ else if (!this.prerelease.length && other.prerelease.length) return 1;
610
+ else if (!this.prerelease.length && !other.prerelease.length) return 0;
611
+ let i = 0;
612
+ do {
613
+ const a = this.prerelease[i];
614
+ const b = other.prerelease[i];
615
+ debug("prerelease compare", i, a, b);
616
+ if (a === void 0 && b === void 0) return 0;
617
+ else if (b === void 0) return 1;
618
+ else if (a === void 0) return -1;
619
+ else if (a === b) continue;
620
+ else return compareIdentifiers(a, b);
621
+ } while (++i);
622
+ }
623
+ compareBuild(other) {
624
+ if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
625
+ let i = 0;
626
+ do {
627
+ const a = this.build[i];
628
+ const b = other.build[i];
629
+ debug("build compare", i, a, b);
630
+ if (a === void 0 && b === void 0) return 0;
631
+ else if (b === void 0) return 1;
632
+ else if (a === void 0) return -1;
633
+ else if (a === b) continue;
634
+ else return compareIdentifiers(a, b);
635
+ } while (++i);
636
+ }
637
+ inc(release, identifier, identifierBase) {
638
+ if (release.startsWith("pre")) {
639
+ if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
640
+ if (identifier) {
641
+ const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
642
+ if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
643
+ }
644
+ }
645
+ switch (release) {
646
+ case "premajor":
647
+ this.prerelease.length = 0;
648
+ this.patch = 0;
649
+ this.minor = 0;
650
+ this.major++;
651
+ this.inc("pre", identifier, identifierBase);
652
+ break;
653
+ case "preminor":
654
+ this.prerelease.length = 0;
655
+ this.patch = 0;
656
+ this.minor++;
657
+ this.inc("pre", identifier, identifierBase);
658
+ break;
659
+ case "prepatch":
660
+ this.prerelease.length = 0;
661
+ this.inc("patch", identifier, identifierBase);
662
+ this.inc("pre", identifier, identifierBase);
663
+ break;
664
+ case "prerelease":
665
+ if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase);
666
+ this.inc("pre", identifier, identifierBase);
667
+ break;
668
+ case "release":
669
+ if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);
670
+ this.prerelease.length = 0;
671
+ break;
672
+ case "major":
673
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
674
+ this.minor = 0;
675
+ this.patch = 0;
676
+ this.prerelease = [];
677
+ break;
678
+ case "minor":
679
+ if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
680
+ this.patch = 0;
681
+ this.prerelease = [];
682
+ break;
683
+ case "patch":
684
+ if (this.prerelease.length === 0) this.patch++;
685
+ this.prerelease = [];
686
+ break;
687
+ case "pre": {
688
+ const base = Number(identifierBase) ? 1 : 0;
689
+ if (this.prerelease.length === 0) this.prerelease = [base];
690
+ else {
691
+ let i = this.prerelease.length;
692
+ while (--i >= 0) if (typeof this.prerelease[i] === "number") {
693
+ this.prerelease[i]++;
694
+ i = -2;
695
+ }
696
+ if (i === -1) {
697
+ if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists");
698
+ this.prerelease.push(base);
699
+ }
700
+ }
701
+ if (identifier) {
702
+ let prerelease = [identifier, base];
703
+ if (identifierBase === false) prerelease = [identifier];
704
+ if (isPrereleaseIdentifier(this.prerelease, identifier)) {
705
+ const prereleaseBase = this.prerelease[identifier.split(".").length];
706
+ if (isNaN(prereleaseBase)) this.prerelease = prerelease;
707
+ } else this.prerelease = prerelease;
708
+ }
709
+ break;
710
+ }
711
+ default: throw new Error(`invalid increment argument: ${release}`);
712
+ }
713
+ this.raw = this.format();
714
+ if (this.build.length) this.raw += `+${this.build.join(".")}`;
715
+ return this;
716
+ }
717
+ };
718
+ }));
719
+ //#endregion
720
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js
721
+ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
722
+ var SemVer = require_semver$1();
723
+ var parse = (version, options, throwErrors = false) => {
724
+ if (version instanceof SemVer) return version;
725
+ try {
726
+ return new SemVer(version, options);
727
+ } catch (er) {
728
+ if (!throwErrors) return null;
729
+ throw er;
730
+ }
731
+ };
732
+ module.exports = parse;
733
+ }));
734
+ //#endregion
735
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js
736
+ var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
737
+ var parse = require_parse();
738
+ var valid = (version, options) => {
739
+ const v = parse(version, options);
740
+ return v ? v.version : null;
741
+ };
742
+ module.exports = valid;
743
+ }));
744
+ //#endregion
745
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js
746
+ var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
747
+ var parse = require_parse();
748
+ var clean = (version, options) => {
749
+ const s = parse(version.trim().replace(/^[=v]+/, ""), options);
750
+ return s ? s.version : null;
751
+ };
752
+ module.exports = clean;
753
+ }));
754
+ //#endregion
755
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js
756
+ var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
757
+ var SemVer = require_semver$1();
758
+ var inc = (version, release, options, identifier, identifierBase) => {
759
+ if (typeof options === "string") {
760
+ identifierBase = identifier;
761
+ identifier = options;
762
+ options = void 0;
763
+ }
764
+ try {
765
+ return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
766
+ } catch (er) {
767
+ return null;
768
+ }
769
+ };
770
+ module.exports = inc;
771
+ }));
772
+ //#endregion
773
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js
774
+ var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
775
+ var parse = require_parse();
776
+ var diff = (version1, version2) => {
777
+ const v1 = parse(version1, null, true);
778
+ const v2 = parse(version2, null, true);
779
+ const comparison = v1.compare(v2);
780
+ if (comparison === 0) return null;
781
+ const v1Higher = comparison > 0;
782
+ const highVersion = v1Higher ? v1 : v2;
783
+ const lowVersion = v1Higher ? v2 : v1;
784
+ const highHasPre = !!highVersion.prerelease.length;
785
+ if (!!lowVersion.prerelease.length && !highHasPre) {
786
+ if (!lowVersion.patch && !lowVersion.minor) return "major";
787
+ if (lowVersion.compareMain(highVersion) === 0) {
788
+ if (lowVersion.minor && !lowVersion.patch) return "minor";
789
+ return "patch";
790
+ }
791
+ }
792
+ const prefix = highHasPre ? "pre" : "";
793
+ if (v1.major !== v2.major) return prefix + "major";
794
+ if (v1.minor !== v2.minor) return prefix + "minor";
795
+ if (v1.patch !== v2.patch) return prefix + "patch";
796
+ return "prerelease";
797
+ };
798
+ module.exports = diff;
799
+ }));
800
+ //#endregion
801
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js
802
+ var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
803
+ var SemVer = require_semver$1();
804
+ var major = (a, loose) => new SemVer(a, loose).major;
805
+ module.exports = major;
806
+ }));
807
+ //#endregion
808
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js
809
+ var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
810
+ var SemVer = require_semver$1();
811
+ var minor = (a, loose) => new SemVer(a, loose).minor;
812
+ module.exports = minor;
813
+ }));
814
+ //#endregion
815
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js
816
+ var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
817
+ var SemVer = require_semver$1();
818
+ var patch = (a, loose) => new SemVer(a, loose).patch;
819
+ module.exports = patch;
820
+ }));
821
+ //#endregion
822
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js
823
+ var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
824
+ var parse = require_parse();
825
+ var prerelease = (version, options) => {
826
+ const parsed = parse(version, options);
827
+ return parsed && parsed.prerelease.length ? parsed.prerelease : null;
828
+ };
829
+ module.exports = prerelease;
830
+ }));
831
+ //#endregion
832
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js
833
+ var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
834
+ var SemVer = require_semver$1();
835
+ var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
836
+ module.exports = compare;
837
+ }));
838
+ //#endregion
839
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js
840
+ var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
841
+ var compare = require_compare();
842
+ var rcompare = (a, b, loose) => compare(b, a, loose);
843
+ module.exports = rcompare;
844
+ }));
845
+ //#endregion
846
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js
847
+ var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
848
+ var compare = require_compare();
849
+ var compareLoose = (a, b) => compare(a, b, true);
850
+ module.exports = compareLoose;
851
+ }));
852
+ //#endregion
853
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js
854
+ var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
855
+ var SemVer = require_semver$1();
856
+ var compareBuild = (a, b, loose) => {
857
+ const versionA = new SemVer(a, loose);
858
+ const versionB = new SemVer(b, loose);
859
+ return versionA.compare(versionB) || versionA.compareBuild(versionB);
860
+ };
861
+ module.exports = compareBuild;
862
+ }));
863
+ //#endregion
864
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js
865
+ var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
866
+ var compareBuild = require_compare_build();
867
+ var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
868
+ module.exports = sort;
869
+ }));
870
+ //#endregion
871
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js
872
+ var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
873
+ var compareBuild = require_compare_build();
874
+ var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
875
+ module.exports = rsort;
876
+ }));
877
+ //#endregion
878
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js
879
+ var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
880
+ var compare = require_compare();
881
+ var gt = (a, b, loose) => compare(a, b, loose) > 0;
882
+ module.exports = gt;
883
+ }));
884
+ //#endregion
885
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js
886
+ var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
887
+ var compare = require_compare();
888
+ var lt = (a, b, loose) => compare(a, b, loose) < 0;
889
+ module.exports = lt;
890
+ }));
891
+ //#endregion
892
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js
893
+ var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
894
+ var compare = require_compare();
895
+ var eq = (a, b, loose) => compare(a, b, loose) === 0;
896
+ module.exports = eq;
897
+ }));
898
+ //#endregion
899
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js
900
+ var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
901
+ var compare = require_compare();
902
+ var neq = (a, b, loose) => compare(a, b, loose) !== 0;
903
+ module.exports = neq;
904
+ }));
905
+ //#endregion
906
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js
907
+ var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
908
+ var compare = require_compare();
909
+ var gte = (a, b, loose) => compare(a, b, loose) >= 0;
910
+ module.exports = gte;
911
+ }));
912
+ //#endregion
913
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js
914
+ var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
915
+ var compare = require_compare();
916
+ var lte = (a, b, loose) => compare(a, b, loose) <= 0;
917
+ module.exports = lte;
918
+ }));
919
+ //#endregion
920
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js
921
+ var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
922
+ var eq = require_eq();
923
+ var neq = require_neq();
924
+ var gt = require_gt();
925
+ var gte = require_gte();
926
+ var lt = require_lt();
927
+ var lte = require_lte();
928
+ var cmp = (a, op, b, loose) => {
929
+ switch (op) {
930
+ case "===":
931
+ if (typeof a === "object") a = a.version;
932
+ if (typeof b === "object") b = b.version;
933
+ return a === b;
934
+ case "!==":
935
+ if (typeof a === "object") a = a.version;
936
+ if (typeof b === "object") b = b.version;
937
+ return a !== b;
938
+ case "":
939
+ case "=":
940
+ case "==": return eq(a, b, loose);
941
+ case "!=": return neq(a, b, loose);
942
+ case ">": return gt(a, b, loose);
943
+ case ">=": return gte(a, b, loose);
944
+ case "<": return lt(a, b, loose);
945
+ case "<=": return lte(a, b, loose);
946
+ default: throw new TypeError(`Invalid operator: ${op}`);
947
+ }
948
+ };
949
+ module.exports = cmp;
950
+ }));
951
+ //#endregion
952
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js
953
+ var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
954
+ var SemVer = require_semver$1();
955
+ var parse = require_parse();
956
+ var { safeRe: re, t } = require_re();
957
+ var coerce = (version, options) => {
958
+ if (version instanceof SemVer) return version;
959
+ if (typeof version === "number") version = String(version);
960
+ if (typeof version !== "string") return null;
961
+ options = options || {};
962
+ let match = null;
963
+ if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
964
+ else {
965
+ const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
966
+ let next;
967
+ while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
968
+ if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
969
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
970
+ }
971
+ coerceRtlRegex.lastIndex = -1;
972
+ }
973
+ if (match === null) return null;
974
+ const major = match[2];
975
+ return parse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
976
+ };
977
+ module.exports = coerce;
978
+ }));
979
+ //#endregion
980
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js
981
+ var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
982
+ var parse = require_parse();
983
+ var constants = require_constants();
984
+ var SemVer = require_semver$1();
985
+ var truncate = (version, truncation, options) => {
986
+ if (!constants.RELEASE_TYPES.includes(truncation)) return null;
987
+ const clonedVersion = cloneInputVersion(version, options);
988
+ return clonedVersion && doTruncation(clonedVersion, truncation);
989
+ };
990
+ var cloneInputVersion = (version, options) => {
991
+ return parse(version instanceof SemVer ? version.version : version, options);
992
+ };
993
+ var doTruncation = (version, truncation) => {
994
+ if (isPrerelease(truncation)) return version.version;
995
+ version.prerelease = [];
996
+ switch (truncation) {
997
+ case "major":
998
+ version.minor = 0;
999
+ version.patch = 0;
1000
+ break;
1001
+ case "minor": version.patch = 0;
1002
+ }
1003
+ return version.format();
1004
+ };
1005
+ var isPrerelease = (type) => {
1006
+ return type.startsWith("pre");
1007
+ };
1008
+ module.exports = truncate;
1009
+ }));
1010
+ //#endregion
1011
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js
1012
+ var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1013
+ var LRUCache = class {
1014
+ constructor() {
1015
+ this.max = 1e3;
1016
+ this.map = /* @__PURE__ */ new Map();
1017
+ }
1018
+ get(key) {
1019
+ const value = this.map.get(key);
1020
+ if (value === void 0) return;
1021
+ else {
1022
+ this.map.delete(key);
1023
+ this.map.set(key, value);
1024
+ return value;
1025
+ }
1026
+ }
1027
+ delete(key) {
1028
+ return this.map.delete(key);
1029
+ }
1030
+ set(key, value) {
1031
+ if (!this.delete(key) && value !== void 0) {
1032
+ if (this.map.size >= this.max) {
1033
+ const firstKey = this.map.keys().next().value;
1034
+ this.delete(firstKey);
1035
+ }
1036
+ this.map.set(key, value);
1037
+ }
1038
+ return this;
1039
+ }
1040
+ };
1041
+ module.exports = LRUCache;
1042
+ }));
1043
+ //#endregion
1044
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js
1045
+ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1046
+ var SPACE_CHARACTERS = /\s+/g;
1047
+ module.exports = class Range {
1048
+ constructor(range, options) {
1049
+ options = parseOptions(options);
1050
+ if (range instanceof Range) {
1051
+ if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
1052
+ else return new Range(range.raw, options);
1053
+ }
1054
+ if (range instanceof Comparator) {
1055
+ this.raw = range.value;
1056
+ this.set = [[range]];
1057
+ this.formatted = void 0;
1058
+ return this;
1059
+ }
1060
+ this.options = options;
1061
+ this.loose = !!options.loose;
1062
+ this.includePrerelease = !!options.includePrerelease;
1063
+ this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
1064
+ this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
1065
+ if (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
1066
+ if (this.set.length > 1) {
1067
+ const first = this.set[0];
1068
+ this.set = this.set.filter((c) => !isNullSet(c[0]));
1069
+ if (this.set.length === 0) this.set = [first];
1070
+ else if (this.set.length > 1) {
1071
+ for (const c of this.set) if (c.length === 1 && isAny(c[0])) {
1072
+ this.set = [c];
1073
+ break;
1074
+ }
1075
+ }
1076
+ }
1077
+ this.formatted = void 0;
1078
+ }
1079
+ get range() {
1080
+ if (this.formatted === void 0) {
1081
+ this.formatted = "";
1082
+ for (let i = 0; i < this.set.length; i++) {
1083
+ if (i > 0) this.formatted += "||";
1084
+ const comps = this.set[i];
1085
+ for (let k = 0; k < comps.length; k++) {
1086
+ if (k > 0) this.formatted += " ";
1087
+ this.formatted += comps[k].toString().trim();
1088
+ }
1089
+ }
1090
+ }
1091
+ return this.formatted;
1092
+ }
1093
+ format() {
1094
+ return this.range;
1095
+ }
1096
+ toString() {
1097
+ return this.range;
1098
+ }
1099
+ parseRange(range) {
1100
+ range = range.replace(BUILDSTRIPRE, "");
1101
+ const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range;
1102
+ const cached = cache.get(memoKey);
1103
+ if (cached) return cached;
1104
+ const loose = this.options.loose;
1105
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
1106
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
1107
+ debug("hyphen replace", range);
1108
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
1109
+ debug("comparator trim", range);
1110
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
1111
+ debug("tilde trim", range);
1112
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace);
1113
+ debug("caret trim", range);
1114
+ let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
1115
+ if (loose) rangeList = rangeList.filter((comp) => {
1116
+ debug("loose invalid filter", comp, this.options);
1117
+ return !!comp.match(re[t.COMPARATORLOOSE]);
1118
+ });
1119
+ debug("range list", rangeList);
1120
+ const rangeMap = /* @__PURE__ */ new Map();
1121
+ const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
1122
+ for (const comp of comparators) {
1123
+ if (isNullSet(comp)) return [comp];
1124
+ rangeMap.set(comp.value, comp);
1125
+ }
1126
+ if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete("");
1127
+ const result = [...rangeMap.values()];
1128
+ cache.set(memoKey, result);
1129
+ return result;
1130
+ }
1131
+ intersects(range, options) {
1132
+ if (!(range instanceof Range)) throw new TypeError("a Range is required");
1133
+ return this.set.some((thisComparators) => {
1134
+ return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
1135
+ return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
1136
+ return rangeComparators.every((rangeComparator) => {
1137
+ return thisComparator.intersects(rangeComparator, options);
1138
+ });
1139
+ });
1140
+ });
1141
+ });
1142
+ }
1143
+ test(version) {
1144
+ if (!version) return false;
1145
+ if (typeof version === "string") try {
1146
+ version = new SemVer(version, this.options);
1147
+ } catch (er) {
1148
+ return false;
1149
+ }
1150
+ for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true;
1151
+ return false;
1152
+ }
1153
+ };
1154
+ var cache = new (require_lrucache())();
1155
+ var parseOptions = require_parse_options();
1156
+ var Comparator = require_comparator();
1157
+ var debug = require_debug();
1158
+ var SemVer = require_semver$1();
1159
+ var { safeRe: re, src, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
1160
+ var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
1161
+ var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
1162
+ var isNullSet = (c) => c.value === "<0.0.0-0";
1163
+ var isAny = (c) => c.value === "";
1164
+ var isSatisfiable = (comparators, options) => {
1165
+ let result = true;
1166
+ const remainingComparators = comparators.slice();
1167
+ let testComparator = remainingComparators.pop();
1168
+ while (result && remainingComparators.length) {
1169
+ result = remainingComparators.every((otherComparator) => {
1170
+ return testComparator.intersects(otherComparator, options);
1171
+ });
1172
+ testComparator = remainingComparators.pop();
1173
+ }
1174
+ return result;
1175
+ };
1176
+ var parseComparator = (comp, options) => {
1177
+ comp = comp.replace(re[t.BUILD], "");
1178
+ debug("comp", comp, options);
1179
+ comp = replaceCarets(comp, options);
1180
+ debug("caret", comp);
1181
+ comp = replaceTildes(comp, options);
1182
+ debug("tildes", comp);
1183
+ comp = replaceXRanges(comp, options);
1184
+ debug("xrange", comp);
1185
+ comp = replaceStars(comp, options);
1186
+ debug("stars", comp);
1187
+ return comp;
1188
+ };
1189
+ var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
1190
+ var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
1191
+ var replaceTildes = (comp, options) => {
1192
+ return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
1193
+ };
1194
+ var replaceTilde = (comp, options) => {
1195
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
1196
+ const z = options.includePrerelease ? "-0" : "";
1197
+ return comp.replace(r, (_, M, m, p, pr) => {
1198
+ debug("tilde", comp, _, M, m, p, pr);
1199
+ let ret;
1200
+ if (isX(M)) ret = "";
1201
+ else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
1202
+ else if (isX(p)) ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
1203
+ else if (pr) {
1204
+ debug("replaceTilde pr", pr);
1205
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
1206
+ } else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
1207
+ debug("tilde return", ret);
1208
+ return ret;
1209
+ });
1210
+ };
1211
+ var replaceCarets = (comp, options) => {
1212
+ return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
1213
+ };
1214
+ var replaceCaret = (comp, options) => {
1215
+ debug("caret", comp, options);
1216
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
1217
+ const z = options.includePrerelease ? "-0" : "";
1218
+ return comp.replace(r, (_, M, m, p, pr) => {
1219
+ debug("caret", comp, _, M, m, p, pr);
1220
+ let ret;
1221
+ if (isX(M)) ret = "";
1222
+ else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
1223
+ else if (isX(p)) {
1224
+ if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
1225
+ else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
1226
+ } else if (pr) {
1227
+ debug("replaceCaret pr", pr);
1228
+ if (M === "0") {
1229
+ if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
1230
+ else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
1231
+ } else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
1232
+ } else {
1233
+ debug("no pr");
1234
+ if (M === "0") {
1235
+ if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
1236
+ else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
1237
+ } else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
1238
+ }
1239
+ debug("caret return", ret);
1240
+ return ret;
1241
+ });
1242
+ };
1243
+ var replaceXRanges = (comp, options) => {
1244
+ debug("replaceXRanges", comp, options);
1245
+ return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
1246
+ };
1247
+ var replaceXRange = (comp, options) => {
1248
+ comp = comp.trim();
1249
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
1250
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
1251
+ debug("xRange", comp, ret, gtlt, M, m, p, pr);
1252
+ if (invalidXRangeOrder(M, m, p)) return comp;
1253
+ const xM = isX(M);
1254
+ const xm = xM || isX(m);
1255
+ const xp = xm || isX(p);
1256
+ const anyX = xp;
1257
+ if (gtlt === "=" && anyX) gtlt = "";
1258
+ pr = options.includePrerelease ? "-0" : "";
1259
+ if (xM) {
1260
+ if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
1261
+ else ret = "*";
1262
+ } else if (gtlt && anyX) {
1263
+ if (xm) m = 0;
1264
+ p = 0;
1265
+ if (gtlt === ">") {
1266
+ gtlt = ">=";
1267
+ if (xm) {
1268
+ M = +M + 1;
1269
+ m = 0;
1270
+ p = 0;
1271
+ } else {
1272
+ m = +m + 1;
1273
+ p = 0;
1274
+ }
1275
+ } else if (gtlt === "<=") {
1276
+ gtlt = "<";
1277
+ if (xm) M = +M + 1;
1278
+ else m = +m + 1;
1279
+ }
1280
+ if (gtlt === "<") pr = "-0";
1281
+ ret = `${gtlt + M}.${m}.${p}${pr}`;
1282
+ } else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
1283
+ else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
1284
+ debug("xRange return", ret);
1285
+ return ret;
1286
+ });
1287
+ };
1288
+ var replaceStars = (comp, options) => {
1289
+ debug("replaceStars", comp, options);
1290
+ return comp.trim().replace(re[t.STAR], "");
1291
+ };
1292
+ var replaceGTE0 = (comp, options) => {
1293
+ debug("replaceGTE0", comp, options);
1294
+ return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
1295
+ };
1296
+ var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
1297
+ if (isX(fM)) from = "";
1298
+ else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
1299
+ else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
1300
+ else if (fpr) from = `>=${from}`;
1301
+ else from = `>=${from}${incPr ? "-0" : ""}`;
1302
+ if (isX(tM)) to = "";
1303
+ else if (isX(tm)) to = `<${+tM + 1}.0.0-0`;
1304
+ else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;
1305
+ else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;
1306
+ else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;
1307
+ else to = `<=${to}`;
1308
+ return `${from} ${to}`.trim();
1309
+ };
1310
+ var testSet = (set, version, options) => {
1311
+ for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
1312
+ if (version.prerelease.length && !options.includePrerelease) {
1313
+ for (let i = 0; i < set.length; i++) {
1314
+ debug(set[i].semver);
1315
+ if (set[i].semver === Comparator.ANY) continue;
1316
+ if (set[i].semver.prerelease.length > 0) {
1317
+ const allowed = set[i].semver;
1318
+ if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
1319
+ }
1320
+ }
1321
+ return false;
1322
+ }
1323
+ return true;
1324
+ };
1325
+ }));
1326
+ //#endregion
1327
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js
1328
+ var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1329
+ var ANY = Symbol("SemVer ANY");
1330
+ module.exports = class Comparator {
1331
+ static get ANY() {
1332
+ return ANY;
1333
+ }
1334
+ constructor(comp, options) {
1335
+ options = parseOptions(options);
1336
+ if (comp instanceof Comparator) {
1337
+ if (comp.loose === !!options.loose) return comp;
1338
+ else comp = comp.value;
1339
+ }
1340
+ comp = comp.trim().split(/\s+/).join(" ");
1341
+ debug("comparator", comp, options);
1342
+ this.options = options;
1343
+ this.loose = !!options.loose;
1344
+ this.parse(comp);
1345
+ if (this.semver === ANY) this.value = "";
1346
+ else this.value = this.operator + this.semver.version;
1347
+ debug("comp", this);
1348
+ }
1349
+ parse(comp) {
1350
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
1351
+ const m = comp.match(r);
1352
+ if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
1353
+ this.operator = m[1] !== void 0 ? m[1] : "";
1354
+ if (this.operator === "=") this.operator = "";
1355
+ if (!m[2]) this.semver = ANY;
1356
+ else this.semver = new SemVer(m[2], this.options.loose);
1357
+ }
1358
+ toString() {
1359
+ return this.value;
1360
+ }
1361
+ test(version) {
1362
+ debug("Comparator.test", version, this.options.loose);
1363
+ if (this.semver === ANY || version === ANY) return true;
1364
+ if (typeof version === "string") try {
1365
+ version = new SemVer(version, this.options);
1366
+ } catch (er) {
1367
+ return false;
1368
+ }
1369
+ return cmp(version, this.operator, this.semver, this.options);
1370
+ }
1371
+ intersects(comp, options) {
1372
+ if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
1373
+ if (this.operator === "") {
1374
+ if (this.value === "") return true;
1375
+ return new Range(comp.value, options).test(this.value);
1376
+ } else if (comp.operator === "") {
1377
+ if (comp.value === "") return true;
1378
+ return new Range(this.value, options).test(comp.semver);
1379
+ }
1380
+ options = parseOptions(options);
1381
+ if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
1382
+ if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false;
1383
+ if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
1384
+ if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
1385
+ if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
1386
+ if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
1387
+ if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
1388
+ return false;
1389
+ }
1390
+ };
1391
+ var parseOptions = require_parse_options();
1392
+ var { safeRe: re, t } = require_re();
1393
+ var cmp = require_cmp();
1394
+ var debug = require_debug();
1395
+ var SemVer = require_semver$1();
1396
+ var Range = require_range();
1397
+ }));
1398
+ //#endregion
1399
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js
1400
+ var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1401
+ var Range = require_range();
1402
+ var satisfies = (version, range, options) => {
1403
+ try {
1404
+ range = new Range(range, options);
1405
+ } catch (er) {
1406
+ return false;
1407
+ }
1408
+ return range.test(version);
1409
+ };
1410
+ module.exports = satisfies;
1411
+ }));
1412
+ //#endregion
1413
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js
1414
+ var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1415
+ var Range = require_range();
1416
+ var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
1417
+ module.exports = toComparators;
1418
+ }));
1419
+ //#endregion
1420
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js
1421
+ var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1422
+ var SemVer = require_semver$1();
1423
+ var Range = require_range();
1424
+ var maxSatisfying = (versions, range, options) => {
1425
+ let max = null;
1426
+ let maxSV = null;
1427
+ let rangeObj = null;
1428
+ try {
1429
+ rangeObj = new Range(range, options);
1430
+ } catch (er) {
1431
+ return null;
1432
+ }
1433
+ versions.forEach((v) => {
1434
+ if (rangeObj.test(v)) {
1435
+ if (!max || maxSV.compare(v) === -1) {
1436
+ max = v;
1437
+ maxSV = new SemVer(max, options);
1438
+ }
1439
+ }
1440
+ });
1441
+ return max;
1442
+ };
1443
+ module.exports = maxSatisfying;
1444
+ }));
1445
+ //#endregion
1446
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js
1447
+ var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1448
+ var SemVer = require_semver$1();
1449
+ var Range = require_range();
1450
+ var minSatisfying = (versions, range, options) => {
1451
+ let min = null;
1452
+ let minSV = null;
1453
+ let rangeObj = null;
1454
+ try {
1455
+ rangeObj = new Range(range, options);
1456
+ } catch (er) {
1457
+ return null;
1458
+ }
1459
+ versions.forEach((v) => {
1460
+ if (rangeObj.test(v)) {
1461
+ if (!min || minSV.compare(v) === 1) {
1462
+ min = v;
1463
+ minSV = new SemVer(min, options);
1464
+ }
1465
+ }
1466
+ });
1467
+ return min;
1468
+ };
1469
+ module.exports = minSatisfying;
1470
+ }));
1471
+ //#endregion
1472
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js
1473
+ var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1474
+ var SemVer = require_semver$1();
1475
+ var Range = require_range();
1476
+ var gt = require_gt();
1477
+ var minVersion = (range, loose) => {
1478
+ range = new Range(range, loose);
1479
+ let minver = new SemVer("0.0.0");
1480
+ if (range.test(minver)) return minver;
1481
+ minver = new SemVer("0.0.0-0");
1482
+ if (range.test(minver)) return minver;
1483
+ minver = null;
1484
+ for (let i = 0; i < range.set.length; ++i) {
1485
+ const comparators = range.set[i];
1486
+ let setMin = null;
1487
+ comparators.forEach((comparator) => {
1488
+ const compver = new SemVer(comparator.semver.version);
1489
+ switch (comparator.operator) {
1490
+ case ">":
1491
+ if (compver.prerelease.length === 0) compver.patch++;
1492
+ else compver.prerelease.push(0);
1493
+ compver.raw = compver.format();
1494
+ case "":
1495
+ case ">=":
1496
+ if (!setMin || gt(compver, setMin)) setMin = compver;
1497
+ break;
1498
+ case "<":
1499
+ case "<=": break;
1500
+ /* istanbul ignore next */
1501
+ default: throw new Error(`Unexpected operation: ${comparator.operator}`);
1502
+ }
1503
+ });
1504
+ if (setMin && (!minver || gt(minver, setMin))) minver = setMin;
1505
+ }
1506
+ if (minver && range.test(minver)) return minver;
1507
+ return null;
1508
+ };
1509
+ module.exports = minVersion;
1510
+ }));
1511
+ //#endregion
1512
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js
1513
+ var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1514
+ var Range = require_range();
1515
+ var validRange = (range, options) => {
1516
+ try {
1517
+ return new Range(range, options).range || "*";
1518
+ } catch (er) {
1519
+ return null;
1520
+ }
1521
+ };
1522
+ module.exports = validRange;
1523
+ }));
1524
+ //#endregion
1525
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js
1526
+ var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1527
+ var SemVer = require_semver$1();
1528
+ var Comparator = require_comparator();
1529
+ var { ANY } = Comparator;
1530
+ var Range = require_range();
1531
+ var satisfies = require_satisfies();
1532
+ var gt = require_gt();
1533
+ var lt = require_lt();
1534
+ var lte = require_lte();
1535
+ var gte = require_gte();
1536
+ var outside = (version, range, hilo, options) => {
1537
+ version = new SemVer(version, options);
1538
+ range = new Range(range, options);
1539
+ let gtfn, ltefn, ltfn, comp, ecomp;
1540
+ switch (hilo) {
1541
+ case ">":
1542
+ gtfn = gt;
1543
+ ltefn = lte;
1544
+ ltfn = lt;
1545
+ comp = ">";
1546
+ ecomp = ">=";
1547
+ break;
1548
+ case "<":
1549
+ gtfn = lt;
1550
+ ltefn = gte;
1551
+ ltfn = gt;
1552
+ comp = "<";
1553
+ ecomp = "<=";
1554
+ break;
1555
+ default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
1556
+ }
1557
+ if (satisfies(version, range, options)) return false;
1558
+ for (let i = 0; i < range.set.length; ++i) {
1559
+ const comparators = range.set[i];
1560
+ let high = null;
1561
+ let low = null;
1562
+ comparators.forEach((comparator) => {
1563
+ if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0");
1564
+ high = high || comparator;
1565
+ low = low || comparator;
1566
+ if (gtfn(comparator.semver, high.semver, options)) high = comparator;
1567
+ else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
1568
+ });
1569
+ if (high.operator === comp || high.operator === ecomp) return false;
1570
+ if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;
1571
+ else if (low.operator === ecomp && ltfn(version, low.semver)) return false;
1572
+ }
1573
+ return true;
1574
+ };
1575
+ module.exports = outside;
1576
+ }));
1577
+ //#endregion
1578
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js
1579
+ var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1580
+ var outside = require_outside();
1581
+ var gtr = (version, range, options) => outside(version, range, ">", options);
1582
+ module.exports = gtr;
1583
+ }));
1584
+ //#endregion
1585
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js
1586
+ var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1587
+ var outside = require_outside();
1588
+ var ltr = (version, range, options) => outside(version, range, "<", options);
1589
+ module.exports = ltr;
1590
+ }));
1591
+ //#endregion
1592
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js
1593
+ var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1594
+ var Range = require_range();
1595
+ var intersects = (r1, r2, options) => {
1596
+ r1 = new Range(r1, options);
1597
+ r2 = new Range(r2, options);
1598
+ return r1.intersects(r2, options);
1599
+ };
1600
+ module.exports = intersects;
1601
+ }));
1602
+ //#endregion
1603
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js
1604
+ var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1605
+ var satisfies = require_satisfies();
1606
+ var compare = require_compare();
1607
+ module.exports = (versions, range, options) => {
1608
+ const set = [];
1609
+ let first = null;
1610
+ let prev = null;
1611
+ const v = versions.sort((a, b) => compare(a, b, options));
1612
+ for (const version of v) if (satisfies(version, range, options)) {
1613
+ prev = version;
1614
+ if (!first) first = version;
1615
+ } else {
1616
+ if (prev) set.push([first, prev]);
1617
+ prev = null;
1618
+ first = null;
1619
+ }
1620
+ if (first) set.push([first, null]);
1621
+ const ranges = [];
1622
+ for (const [min, max] of set) if (min === max) ranges.push(min);
1623
+ else if (!max && min === v[0]) ranges.push("*");
1624
+ else if (!max) ranges.push(`>=${min}`);
1625
+ else if (min === v[0]) ranges.push(`<=${max}`);
1626
+ else ranges.push(`${min} - ${max}`);
1627
+ const simplified = ranges.join(" || ");
1628
+ const original = typeof range.raw === "string" ? range.raw : String(range);
1629
+ return simplified.length < original.length ? simplified : range;
1630
+ };
1631
+ }));
1632
+ //#endregion
1633
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js
1634
+ var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1635
+ var Range = require_range();
1636
+ var Comparator = require_comparator();
1637
+ var { ANY } = Comparator;
1638
+ var satisfies = require_satisfies();
1639
+ var compare = require_compare();
1640
+ var subset = (sub, dom, options = {}) => {
1641
+ if (sub === dom) return true;
1642
+ sub = new Range(sub, options);
1643
+ dom = new Range(dom, options);
1644
+ let sawNonNull = false;
1645
+ OUTER: for (const simpleSub of sub.set) {
1646
+ for (const simpleDom of dom.set) {
1647
+ const isSub = simpleSubset(simpleSub, simpleDom, options);
1648
+ sawNonNull = sawNonNull || isSub !== null;
1649
+ if (isSub) continue OUTER;
1650
+ }
1651
+ if (sawNonNull) return false;
1652
+ }
1653
+ return true;
1654
+ };
1655
+ var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
1656
+ var minimumVersion = [new Comparator(">=0.0.0")];
1657
+ var simpleSubset = (sub, dom, options) => {
1658
+ if (sub === dom) return true;
1659
+ if (sub.length === 1 && sub[0].semver === ANY) {
1660
+ if (dom.length === 1 && dom[0].semver === ANY) return true;
1661
+ else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
1662
+ else sub = minimumVersion;
1663
+ }
1664
+ if (dom.length === 1 && dom[0].semver === ANY) {
1665
+ if (options.includePrerelease) return true;
1666
+ else dom = minimumVersion;
1667
+ }
1668
+ const eqSet = /* @__PURE__ */ new Set();
1669
+ let gt, lt;
1670
+ for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
1671
+ else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options);
1672
+ else eqSet.add(c.semver);
1673
+ if (eqSet.size > 1) return null;
1674
+ let gtltComp;
1675
+ if (gt && lt) {
1676
+ gtltComp = compare(gt.semver, lt.semver, options);
1677
+ if (gtltComp > 0) return null;
1678
+ else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null;
1679
+ }
1680
+ for (const eq of eqSet) {
1681
+ if (gt && !satisfies(eq, String(gt), options)) return null;
1682
+ if (lt && !satisfies(eq, String(lt), options)) return null;
1683
+ for (const c of dom) if (!satisfies(eq, String(c), options)) return false;
1684
+ return true;
1685
+ }
1686
+ let higher, lower;
1687
+ let hasDomLT, hasDomGT;
1688
+ let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
1689
+ let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
1690
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
1691
+ for (const c of dom) {
1692
+ hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
1693
+ hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
1694
+ if (gt) {
1695
+ if (needDomGTPre) {
1696
+ 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;
1697
+ }
1698
+ if (c.operator === ">" || c.operator === ">=") {
1699
+ higher = higherGT(gt, c, options);
1700
+ if (higher === c && higher !== gt) return false;
1701
+ } else if (gt.operator === ">=" && !c.test(gt.semver)) return false;
1702
+ }
1703
+ if (lt) {
1704
+ if (needDomLTPre) {
1705
+ 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;
1706
+ }
1707
+ if (c.operator === "<" || c.operator === "<=") {
1708
+ lower = lowerLT(lt, c, options);
1709
+ if (lower === c && lower !== lt) return false;
1710
+ } else if (lt.operator === "<=" && !c.test(lt.semver)) return false;
1711
+ }
1712
+ if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
1713
+ }
1714
+ if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
1715
+ if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
1716
+ if (needDomGTPre || needDomLTPre) return false;
1717
+ return true;
1718
+ };
1719
+ var higherGT = (a, b, options) => {
1720
+ if (!a) return b;
1721
+ const comp = compare(a.semver, b.semver, options);
1722
+ return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
1723
+ };
1724
+ var lowerLT = (a, b, options) => {
1725
+ if (!a) return b;
1726
+ const comp = compare(a.semver, b.semver, options);
1727
+ return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
1728
+ };
1729
+ module.exports = subset;
1730
+ }));
1731
+ //#endregion
1732
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js
1733
+ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1734
+ var internalRe = require_re();
1735
+ var constants = require_constants();
1736
+ var SemVer = require_semver$1();
1737
+ var identifiers = require_identifiers();
1738
+ module.exports = {
1739
+ parse: require_parse(),
1740
+ valid: require_valid$1(),
1741
+ clean: require_clean(),
1742
+ inc: require_inc(),
1743
+ diff: require_diff(),
1744
+ major: require_major(),
1745
+ minor: require_minor(),
1746
+ patch: require_patch(),
1747
+ prerelease: require_prerelease(),
1748
+ compare: require_compare(),
1749
+ rcompare: require_rcompare(),
1750
+ compareLoose: require_compare_loose(),
1751
+ compareBuild: require_compare_build(),
1752
+ sort: require_sort(),
1753
+ rsort: require_rsort(),
1754
+ gt: require_gt(),
1755
+ lt: require_lt(),
1756
+ eq: require_eq(),
1757
+ neq: require_neq(),
1758
+ gte: require_gte(),
1759
+ lte: require_lte(),
1760
+ cmp: require_cmp(),
1761
+ coerce: require_coerce(),
1762
+ truncate: require_truncate(),
1763
+ Comparator: require_comparator(),
1764
+ Range: require_range(),
1765
+ satisfies: require_satisfies(),
1766
+ toComparators: require_to_comparators(),
1767
+ maxSatisfying: require_max_satisfying(),
1768
+ minSatisfying: require_min_satisfying(),
1769
+ minVersion: require_min_version(),
1770
+ validRange: require_valid(),
1771
+ outside: require_outside(),
1772
+ gtr: require_gtr(),
1773
+ ltr: require_ltr(),
1774
+ intersects: require_intersects(),
1775
+ simplifyRange: require_simplify(),
1776
+ subset: require_subset(),
1777
+ SemVer,
1778
+ re: internalRe.re,
1779
+ src: internalRe.src,
1780
+ tokens: internalRe.t,
1781
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
1782
+ RELEASE_TYPES: constants.RELEASE_TYPES,
1783
+ compareIdentifiers: identifiers.compareIdentifiers,
1784
+ rcompareIdentifiers: identifiers.rcompareIdentifiers
1785
+ };
1786
+ }));
1787
+ //#endregion
1788
+ export { executeGitProcess as a, executeGitStreamingProcess as i, createGitVersionPreflight as n, MAX_GIT_PROCESS_DIAGNOSTIC_BYTES as o, MINIMUM_GIT_VERSION as r, require_semver as t };
1789
+
1790
+ //# sourceMappingURL=semver-BzaJzKRS.js.map