@voidzero-dev/vite-plus-core 0.0.0-0bfcc90f.20260209-0731

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.
Files changed (114) hide show
  1. package/LICENSE +41 -0
  2. package/dist/pluginutils/filter/composable-filters.d.ts +90 -0
  3. package/dist/pluginutils/filter/composable-filters.js +256 -0
  4. package/dist/pluginutils/filter/filter-vite-plugins.d.ts +28 -0
  5. package/dist/pluginutils/filter/filter-vite-plugins.js +75 -0
  6. package/dist/pluginutils/filter/index.d.ts +3 -0
  7. package/dist/pluginutils/filter/index.js +3 -0
  8. package/dist/pluginutils/filter/simple-filters.d.ts +71 -0
  9. package/dist/pluginutils/filter/simple-filters.js +70 -0
  10. package/dist/pluginutils/index.d.ts +1 -0
  11. package/dist/pluginutils/index.js +1 -0
  12. package/dist/pluginutils/utils.d.ts +2 -0
  13. package/dist/pluginutils/utils.js +17 -0
  14. package/dist/rolldown/cli-setup.d.mts +1 -0
  15. package/dist/rolldown/cli-setup.mjs +17 -0
  16. package/dist/rolldown/cli.d.mts +1 -0
  17. package/dist/rolldown/cli.mjs +608 -0
  18. package/dist/rolldown/config.d.mts +7 -0
  19. package/dist/rolldown/config.mjs +10 -0
  20. package/dist/rolldown/experimental-index.d.mts +194 -0
  21. package/dist/rolldown/experimental-index.mjs +291 -0
  22. package/dist/rolldown/experimental-runtime-types.d.ts +98 -0
  23. package/dist/rolldown/filter-index.d.mts +197 -0
  24. package/dist/rolldown/filter-index.mjs +369 -0
  25. package/dist/rolldown/get-log-filter.d.mts +7 -0
  26. package/dist/rolldown/get-log-filter.mjs +47 -0
  27. package/dist/rolldown/index.d.mts +4 -0
  28. package/dist/rolldown/index.mjs +57 -0
  29. package/dist/rolldown/parallel-plugin-worker.d.mts +1 -0
  30. package/dist/rolldown/parallel-plugin-worker.mjs +32 -0
  31. package/dist/rolldown/parallel-plugin.d.mts +14 -0
  32. package/dist/rolldown/parallel-plugin.mjs +7 -0
  33. package/dist/rolldown/parse-ast-index.d.mts +8 -0
  34. package/dist/rolldown/parse-ast-index.mjs +47 -0
  35. package/dist/rolldown/plugins-index.d.mts +30 -0
  36. package/dist/rolldown/plugins-index.mjs +40 -0
  37. package/dist/rolldown/shared/binding-D-XMzSaG.d.mts +1665 -0
  38. package/dist/rolldown/shared/binding-DuOSzYPt.mjs +587 -0
  39. package/dist/rolldown/shared/bindingify-input-options-Bu6nUTgS.mjs +2257 -0
  40. package/dist/rolldown/shared/constructors-DZVRHTli.mjs +61 -0
  41. package/dist/rolldown/shared/constructors-KD7LvxpN.d.mts +28 -0
  42. package/dist/rolldown/shared/define-config-BVG4QvnP.mjs +7 -0
  43. package/dist/rolldown/shared/define-config-U4pj0ZDn.d.mts +3616 -0
  44. package/dist/rolldown/shared/load-config-O1K_tT_z.mjs +114 -0
  45. package/dist/rolldown/shared/logging-CE90D8JR.d.mts +50 -0
  46. package/dist/rolldown/shared/logs-NH298mHo.mjs +183 -0
  47. package/dist/rolldown/shared/misc-CCZIsXVO.mjs +22 -0
  48. package/dist/rolldown/shared/normalize-string-or-regex-DeZqg15i.mjs +61 -0
  49. package/dist/rolldown/shared/parse-DLraxqjd.mjs +56 -0
  50. package/dist/rolldown/shared/prompt-DeISmFRp.mjs +847 -0
  51. package/dist/rolldown/shared/rolldown-O0UKbTKf.mjs +42 -0
  52. package/dist/rolldown/shared/rolldown-build-BIs7C4B_.mjs +3354 -0
  53. package/dist/rolldown/shared/watch-DQXGaDjx.mjs +379 -0
  54. package/dist/tsdown/build-l5WhXg4M-BBPqZr0m.js +4933 -0
  55. package/dist/tsdown/chunk-CdeBBKNj.js +44 -0
  56. package/dist/tsdown/debug-Cb_Nqpo4-BueIRvg1.js +18 -0
  57. package/dist/tsdown/detect-CCATtVj7-B86m8IqW.js +165 -0
  58. package/dist/tsdown/dist-BUOkzr_P.js +201 -0
  59. package/dist/tsdown/dist-BVMGwPdF.js +32363 -0
  60. package/dist/tsdown/dist-dc0X0G6b.js +742 -0
  61. package/dist/tsdown/filename-7rlgePeo.js +31 -0
  62. package/dist/tsdown/index-node-BjDys8jy--sqPE5mM.js +251 -0
  63. package/dist/tsdown/index-types.d.ts +2163 -0
  64. package/dist/tsdown/index.js +14 -0
  65. package/dist/tsdown/main-d9yZSQqW.js +926 -0
  66. package/dist/tsdown/node-Cb5OsnKg.js +271 -0
  67. package/dist/tsdown/npm_cjs_chunk_chunk.cjs +11 -0
  68. package/dist/tsdown/npm_cjs_chunk_range.cjs +484 -0
  69. package/dist/tsdown/npm_cjs_chunk_semver.cjs +362 -0
  70. package/dist/tsdown/npm_entry_picomatch.cjs +1676 -0
  71. package/dist/tsdown/npm_entry_semver_functions_coerce.cjs +52 -0
  72. package/dist/tsdown/npm_entry_semver_functions_satisfies.cjs +23 -0
  73. package/dist/tsdown/npm_entry_semver_ranges_min-version.cjs +48 -0
  74. package/dist/tsdown/npm_entry_tree-kill.cjs +103 -0
  75. package/dist/tsdown/resolver-j7HY1N36-CIu_7LX6.js +20 -0
  76. package/dist/tsdown/run.js +537 -0
  77. package/dist/tsdown/tsc-context-BNYuT3cE.js +25 -0
  78. package/dist/tsdown/tsc-reo6aLWc.js +423 -0
  79. package/dist/vite/client/client.mjs +1140 -0
  80. package/dist/vite/client/env.mjs +19 -0
  81. package/dist/vite/client.d.ts +279 -0
  82. package/dist/vite/misc/false.d.ts +2 -0
  83. package/dist/vite/misc/false.js +1 -0
  84. package/dist/vite/misc/true.d.ts +2 -0
  85. package/dist/vite/misc/true.js +1 -0
  86. package/dist/vite/node/chunks/build2.js +5538 -0
  87. package/dist/vite/node/chunks/chunk.js +45 -0
  88. package/dist/vite/node/chunks/dist.js +6758 -0
  89. package/dist/vite/node/chunks/dist2.js +6651 -0
  90. package/dist/vite/node/chunks/fetchableEnvironments.js +41395 -0
  91. package/dist/vite/node/chunks/lib.js +377 -0
  92. package/dist/vite/node/chunks/logger.js +332 -0
  93. package/dist/vite/node/chunks/moduleRunnerTransport.d.ts +96 -0
  94. package/dist/vite/node/chunks/postcss-import.js +479 -0
  95. package/dist/vite/node/cli.js +699 -0
  96. package/dist/vite/node/index.d.ts +3807 -0
  97. package/dist/vite/node/index.js +15 -0
  98. package/dist/vite/node/internal.d.ts +2 -0
  99. package/dist/vite/node/internal.js +3 -0
  100. package/dist/vite/node/module-runner.d.ts +311 -0
  101. package/dist/vite/node/module-runner.js +1159 -0
  102. package/dist/vite/types/customEvent.d.ts +52 -0
  103. package/dist/vite/types/hmrPayload.d.ts +80 -0
  104. package/dist/vite/types/hot.d.ts +39 -0
  105. package/dist/vite/types/import-meta.d.ts +5 -0
  106. package/dist/vite/types/importGlob.d.ts +89 -0
  107. package/dist/vite/types/importMeta.d.ts +30 -0
  108. package/dist/vite/types/internal/cssPreprocessorOptions.d.ts +44 -0
  109. package/dist/vite/types/internal/esbuildOptions.d.ts +28 -0
  110. package/dist/vite/types/internal/lightningcssOptions.d.ts +18 -0
  111. package/dist/vite/types/internal/rollupTypeCompat.d.ts +24 -0
  112. package/dist/vite/types/internal/terserOptions.d.ts +11 -0
  113. package/dist/vite/types/metadata.d.ts +47 -0
  114. package/package.json +204 -0
@@ -0,0 +1,484 @@
1
+ const require_chunk = require('./npm_cjs_chunk_chunk.cjs');
2
+ const require_semver$1 = require('./npm_cjs_chunk_semver.cjs');
3
+
4
+ //#region ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js
5
+ var require_lrucache = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
6
+ var LRUCache = class {
7
+ constructor() {
8
+ this.max = 1e3;
9
+ this.map = /* @__PURE__ */ new Map();
10
+ }
11
+ get(key) {
12
+ const value = this.map.get(key);
13
+ if (value === void 0) return;
14
+ else {
15
+ this.map.delete(key);
16
+ this.map.set(key, value);
17
+ return value;
18
+ }
19
+ }
20
+ delete(key) {
21
+ return this.map.delete(key);
22
+ }
23
+ set(key, value) {
24
+ if (!this.delete(key) && value !== void 0) {
25
+ if (this.map.size >= this.max) {
26
+ const firstKey = this.map.keys().next().value;
27
+ this.delete(firstKey);
28
+ }
29
+ this.map.set(key, value);
30
+ }
31
+ return this;
32
+ }
33
+ };
34
+ module.exports = LRUCache;
35
+ }));
36
+
37
+ //#endregion
38
+ //#region ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js
39
+ var require_compare = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
40
+ const SemVer = require_semver$1.require_semver();
41
+ const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
42
+ module.exports = compare;
43
+ }));
44
+
45
+ //#endregion
46
+ //#region ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js
47
+ var require_eq = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
48
+ const compare = require_compare();
49
+ const eq = (a, b, loose) => compare(a, b, loose) === 0;
50
+ module.exports = eq;
51
+ }));
52
+
53
+ //#endregion
54
+ //#region ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js
55
+ var require_neq = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
56
+ const compare = require_compare();
57
+ const neq = (a, b, loose) => compare(a, b, loose) !== 0;
58
+ module.exports = neq;
59
+ }));
60
+
61
+ //#endregion
62
+ //#region ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js
63
+ var require_gt = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
64
+ const compare = require_compare();
65
+ const gt = (a, b, loose) => compare(a, b, loose) > 0;
66
+ module.exports = gt;
67
+ }));
68
+
69
+ //#endregion
70
+ //#region ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js
71
+ var require_gte = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
72
+ const compare = require_compare();
73
+ const gte = (a, b, loose) => compare(a, b, loose) >= 0;
74
+ module.exports = gte;
75
+ }));
76
+
77
+ //#endregion
78
+ //#region ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js
79
+ var require_lt = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
80
+ const compare = require_compare();
81
+ const lt = (a, b, loose) => compare(a, b, loose) < 0;
82
+ module.exports = lt;
83
+ }));
84
+
85
+ //#endregion
86
+ //#region ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js
87
+ var require_lte = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
88
+ const compare = require_compare();
89
+ const lte = (a, b, loose) => compare(a, b, loose) <= 0;
90
+ module.exports = lte;
91
+ }));
92
+
93
+ //#endregion
94
+ //#region ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js
95
+ var require_cmp = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
96
+ const eq = require_eq();
97
+ const neq = require_neq();
98
+ const gt = require_gt();
99
+ const gte = require_gte();
100
+ const lt = require_lt();
101
+ const lte = require_lte();
102
+ const cmp = (a, op, b, loose) => {
103
+ switch (op) {
104
+ case "===":
105
+ if (typeof a === "object") a = a.version;
106
+ if (typeof b === "object") b = b.version;
107
+ return a === b;
108
+ case "!==":
109
+ if (typeof a === "object") a = a.version;
110
+ if (typeof b === "object") b = b.version;
111
+ return a !== b;
112
+ case "":
113
+ case "=":
114
+ case "==": return eq(a, b, loose);
115
+ case "!=": return neq(a, b, loose);
116
+ case ">": return gt(a, b, loose);
117
+ case ">=": return gte(a, b, loose);
118
+ case "<": return lt(a, b, loose);
119
+ case "<=": return lte(a, b, loose);
120
+ default: throw new TypeError(`Invalid operator: ${op}`);
121
+ }
122
+ };
123
+ module.exports = cmp;
124
+ }));
125
+
126
+ //#endregion
127
+ //#region ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js
128
+ var require_comparator = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
129
+ const ANY = Symbol("SemVer ANY");
130
+ var Comparator = class Comparator {
131
+ static get ANY() {
132
+ return ANY;
133
+ }
134
+ constructor(comp, options) {
135
+ options = parseOptions(options);
136
+ if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp;
137
+ else comp = comp.value;
138
+ comp = comp.trim().split(/\s+/).join(" ");
139
+ debug("comparator", comp, options);
140
+ this.options = options;
141
+ this.loose = !!options.loose;
142
+ this.parse(comp);
143
+ if (this.semver === ANY) this.value = "";
144
+ else this.value = this.operator + this.semver.version;
145
+ debug("comp", this);
146
+ }
147
+ parse(comp) {
148
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
149
+ const m = comp.match(r);
150
+ if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
151
+ this.operator = m[1] !== void 0 ? m[1] : "";
152
+ if (this.operator === "=") this.operator = "";
153
+ if (!m[2]) this.semver = ANY;
154
+ else this.semver = new SemVer(m[2], this.options.loose);
155
+ }
156
+ toString() {
157
+ return this.value;
158
+ }
159
+ test(version) {
160
+ debug("Comparator.test", version, this.options.loose);
161
+ if (this.semver === ANY || version === ANY) return true;
162
+ if (typeof version === "string") try {
163
+ version = new SemVer(version, this.options);
164
+ } catch (er) {
165
+ return false;
166
+ }
167
+ return cmp(version, this.operator, this.semver, this.options);
168
+ }
169
+ intersects(comp, options) {
170
+ if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
171
+ if (this.operator === "") {
172
+ if (this.value === "") return true;
173
+ return new Range(comp.value, options).test(this.value);
174
+ } else if (comp.operator === "") {
175
+ if (comp.value === "") return true;
176
+ return new Range(this.value, options).test(comp.semver);
177
+ }
178
+ options = parseOptions(options);
179
+ if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
180
+ if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false;
181
+ if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
182
+ if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
183
+ if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
184
+ if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
185
+ if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
186
+ return false;
187
+ }
188
+ };
189
+ module.exports = Comparator;
190
+ const parseOptions = require_semver$1.require_parse_options();
191
+ const { safeRe: re, t } = require_semver$1.require_re();
192
+ const cmp = require_cmp();
193
+ const debug = require_semver$1.require_debug();
194
+ const SemVer = require_semver$1.require_semver();
195
+ const Range = require_range();
196
+ }));
197
+
198
+ //#endregion
199
+ //#region ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js
200
+ var require_range = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
201
+ const SPACE_CHARACTERS = /\s+/g;
202
+ var Range = class Range {
203
+ constructor(range, options) {
204
+ options = parseOptions(options);
205
+ if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
206
+ else return new Range(range.raw, options);
207
+ if (range instanceof Comparator) {
208
+ this.raw = range.value;
209
+ this.set = [[range]];
210
+ this.formatted = void 0;
211
+ return this;
212
+ }
213
+ this.options = options;
214
+ this.loose = !!options.loose;
215
+ this.includePrerelease = !!options.includePrerelease;
216
+ this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
217
+ this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
218
+ if (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
219
+ if (this.set.length > 1) {
220
+ const first = this.set[0];
221
+ this.set = this.set.filter((c) => !isNullSet(c[0]));
222
+ if (this.set.length === 0) this.set = [first];
223
+ else if (this.set.length > 1) {
224
+ for (const c of this.set) if (c.length === 1 && isAny(c[0])) {
225
+ this.set = [c];
226
+ break;
227
+ }
228
+ }
229
+ }
230
+ this.formatted = void 0;
231
+ }
232
+ get range() {
233
+ if (this.formatted === void 0) {
234
+ this.formatted = "";
235
+ for (let i = 0; i < this.set.length; i++) {
236
+ if (i > 0) this.formatted += "||";
237
+ const comps = this.set[i];
238
+ for (let k = 0; k < comps.length; k++) {
239
+ if (k > 0) this.formatted += " ";
240
+ this.formatted += comps[k].toString().trim();
241
+ }
242
+ }
243
+ }
244
+ return this.formatted;
245
+ }
246
+ format() {
247
+ return this.range;
248
+ }
249
+ toString() {
250
+ return this.range;
251
+ }
252
+ parseRange(range) {
253
+ const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range;
254
+ const cached = cache.get(memoKey);
255
+ if (cached) return cached;
256
+ const loose = this.options.loose;
257
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
258
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
259
+ debug("hyphen replace", range);
260
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
261
+ debug("comparator trim", range);
262
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
263
+ debug("tilde trim", range);
264
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace);
265
+ debug("caret trim", range);
266
+ let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
267
+ if (loose) rangeList = rangeList.filter((comp) => {
268
+ debug("loose invalid filter", comp, this.options);
269
+ return !!comp.match(re[t.COMPARATORLOOSE]);
270
+ });
271
+ debug("range list", rangeList);
272
+ const rangeMap = /* @__PURE__ */ new Map();
273
+ const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
274
+ for (const comp of comparators) {
275
+ if (isNullSet(comp)) return [comp];
276
+ rangeMap.set(comp.value, comp);
277
+ }
278
+ if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete("");
279
+ const result = [...rangeMap.values()];
280
+ cache.set(memoKey, result);
281
+ return result;
282
+ }
283
+ intersects(range, options) {
284
+ if (!(range instanceof Range)) throw new TypeError("a Range is required");
285
+ return this.set.some((thisComparators) => {
286
+ return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
287
+ return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
288
+ return rangeComparators.every((rangeComparator) => {
289
+ return thisComparator.intersects(rangeComparator, options);
290
+ });
291
+ });
292
+ });
293
+ });
294
+ }
295
+ test(version) {
296
+ if (!version) return false;
297
+ if (typeof version === "string") try {
298
+ version = new SemVer(version, this.options);
299
+ } catch (er) {
300
+ return false;
301
+ }
302
+ for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true;
303
+ return false;
304
+ }
305
+ };
306
+ module.exports = Range;
307
+ const cache = new (require_lrucache())();
308
+ const parseOptions = require_semver$1.require_parse_options();
309
+ const Comparator = require_comparator();
310
+ const debug = require_semver$1.require_debug();
311
+ const SemVer = require_semver$1.require_semver();
312
+ const { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_semver$1.require_re();
313
+ const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_semver$1.require_constants();
314
+ const isNullSet = (c) => c.value === "<0.0.0-0";
315
+ const isAny = (c) => c.value === "";
316
+ const isSatisfiable = (comparators, options) => {
317
+ let result = true;
318
+ const remainingComparators = comparators.slice();
319
+ let testComparator = remainingComparators.pop();
320
+ while (result && remainingComparators.length) {
321
+ result = remainingComparators.every((otherComparator) => {
322
+ return testComparator.intersects(otherComparator, options);
323
+ });
324
+ testComparator = remainingComparators.pop();
325
+ }
326
+ return result;
327
+ };
328
+ const parseComparator = (comp, options) => {
329
+ comp = comp.replace(re[t.BUILD], "");
330
+ debug("comp", comp, options);
331
+ comp = replaceCarets(comp, options);
332
+ debug("caret", comp);
333
+ comp = replaceTildes(comp, options);
334
+ debug("tildes", comp);
335
+ comp = replaceXRanges(comp, options);
336
+ debug("xrange", comp);
337
+ comp = replaceStars(comp, options);
338
+ debug("stars", comp);
339
+ return comp;
340
+ };
341
+ const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
342
+ const replaceTildes = (comp, options) => {
343
+ return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
344
+ };
345
+ const replaceTilde = (comp, options) => {
346
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
347
+ return comp.replace(r, (_, M, m, p, pr) => {
348
+ debug("tilde", comp, _, M, m, p, pr);
349
+ let ret;
350
+ if (isX(M)) ret = "";
351
+ else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
352
+ else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
353
+ else if (pr) {
354
+ debug("replaceTilde pr", pr);
355
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
356
+ } else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
357
+ debug("tilde return", ret);
358
+ return ret;
359
+ });
360
+ };
361
+ const replaceCarets = (comp, options) => {
362
+ return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
363
+ };
364
+ const replaceCaret = (comp, options) => {
365
+ debug("caret", comp, options);
366
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
367
+ const z = options.includePrerelease ? "-0" : "";
368
+ return comp.replace(r, (_, M, m, p, pr) => {
369
+ debug("caret", comp, _, M, m, p, pr);
370
+ let ret;
371
+ if (isX(M)) ret = "";
372
+ else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
373
+ else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
374
+ else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
375
+ else if (pr) {
376
+ debug("replaceCaret pr", pr);
377
+ if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
378
+ else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
379
+ else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
380
+ } else {
381
+ debug("no pr");
382
+ if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
383
+ else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
384
+ else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
385
+ }
386
+ debug("caret return", ret);
387
+ return ret;
388
+ });
389
+ };
390
+ const replaceXRanges = (comp, options) => {
391
+ debug("replaceXRanges", comp, options);
392
+ return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
393
+ };
394
+ const replaceXRange = (comp, options) => {
395
+ comp = comp.trim();
396
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
397
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
398
+ debug("xRange", comp, ret, gtlt, M, m, p, pr);
399
+ const xM = isX(M);
400
+ const xm = xM || isX(m);
401
+ const xp = xm || isX(p);
402
+ const anyX = xp;
403
+ if (gtlt === "=" && anyX) gtlt = "";
404
+ pr = options.includePrerelease ? "-0" : "";
405
+ if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
406
+ else ret = "*";
407
+ else if (gtlt && anyX) {
408
+ if (xm) m = 0;
409
+ p = 0;
410
+ if (gtlt === ">") {
411
+ gtlt = ">=";
412
+ if (xm) {
413
+ M = +M + 1;
414
+ m = 0;
415
+ p = 0;
416
+ } else {
417
+ m = +m + 1;
418
+ p = 0;
419
+ }
420
+ } else if (gtlt === "<=") {
421
+ gtlt = "<";
422
+ if (xm) M = +M + 1;
423
+ else m = +m + 1;
424
+ }
425
+ if (gtlt === "<") pr = "-0";
426
+ ret = `${gtlt + M}.${m}.${p}${pr}`;
427
+ } else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
428
+ else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
429
+ debug("xRange return", ret);
430
+ return ret;
431
+ });
432
+ };
433
+ const replaceStars = (comp, options) => {
434
+ debug("replaceStars", comp, options);
435
+ return comp.trim().replace(re[t.STAR], "");
436
+ };
437
+ const replaceGTE0 = (comp, options) => {
438
+ debug("replaceGTE0", comp, options);
439
+ return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
440
+ };
441
+ const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
442
+ if (isX(fM)) from = "";
443
+ else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
444
+ else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
445
+ else if (fpr) from = `>=${from}`;
446
+ else from = `>=${from}${incPr ? "-0" : ""}`;
447
+ if (isX(tM)) to = "";
448
+ else if (isX(tm)) to = `<${+tM + 1}.0.0-0`;
449
+ else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;
450
+ else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;
451
+ else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;
452
+ else to = `<=${to}`;
453
+ return `${from} ${to}`.trim();
454
+ };
455
+ const testSet = (set, version, options) => {
456
+ for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
457
+ if (version.prerelease.length && !options.includePrerelease) {
458
+ for (let i = 0; i < set.length; i++) {
459
+ debug(set[i].semver);
460
+ if (set[i].semver === Comparator.ANY) continue;
461
+ if (set[i].semver.prerelease.length > 0) {
462
+ const allowed = set[i].semver;
463
+ if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
464
+ }
465
+ }
466
+ return false;
467
+ }
468
+ return true;
469
+ };
470
+ }));
471
+
472
+ //#endregion
473
+ Object.defineProperty(exports, 'require_gt', {
474
+ enumerable: true,
475
+ get: function () {
476
+ return require_gt;
477
+ }
478
+ });
479
+ Object.defineProperty(exports, 'require_range', {
480
+ enumerable: true,
481
+ get: function () {
482
+ return require_range;
483
+ }
484
+ });