@h3ravel/config 1.4.1 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +9 -2800
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -193
- package/dist/index.d.ts +2 -193
- package/dist/index.js +6 -2821
- package/dist/index.js.map +1 -1
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -1,2824 +1,9 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import { dd, dump, safeDot, setNested } from "@h3ravel/support";
|
|
1
|
+
import { Registerer, ServiceProvider } from "@h3ravel/core";
|
|
2
|
+
import { safeDot, setNested } from "@h3ravel/support";
|
|
4
3
|
import path from "node:path";
|
|
5
|
-
import "node:os";
|
|
6
|
-
import "node:net";
|
|
7
|
-
import { debuglog } from "node:util";
|
|
8
4
|
import { readdir } from "node:fs/promises";
|
|
9
|
-
import "
|
|
10
|
-
import "dotenv";
|
|
11
|
-
import "edge.js";
|
|
5
|
+
import { EnvParser } from "@h3ravel/shared";
|
|
12
6
|
|
|
13
|
-
//#region rolldown:runtime
|
|
14
|
-
var __create = Object.create;
|
|
15
|
-
var __defProp = Object.defineProperty;
|
|
16
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
17
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
18
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
19
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
20
|
-
var __commonJS = (cb, mod) => function() {
|
|
21
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
22
|
-
};
|
|
23
|
-
var __copyProps = (to, from, except, desc) => {
|
|
24
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
25
|
-
key = keys[i];
|
|
26
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
27
|
-
get: ((k) => from[k]).bind(null, key),
|
|
28
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
return to;
|
|
32
|
-
};
|
|
33
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
34
|
-
value: mod,
|
|
35
|
-
enumerable: true
|
|
36
|
-
}) : target, mod));
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region ../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js
|
|
40
|
-
var require_Reflect = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js": (() => {
|
|
41
|
-
/*! *****************************************************************************
|
|
42
|
-
Copyright (C) Microsoft. All rights reserved.
|
|
43
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
44
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
45
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
46
|
-
|
|
47
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
48
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
49
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
50
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
51
|
-
|
|
52
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
53
|
-
and limitations under the License.
|
|
54
|
-
***************************************************************************** */
|
|
55
|
-
var Reflect$1;
|
|
56
|
-
(function(Reflect$2) {
|
|
57
|
-
(function(factory) {
|
|
58
|
-
var root = typeof globalThis === "object" ? globalThis : typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : sloppyModeThis();
|
|
59
|
-
var exporter = makeExporter(Reflect$2);
|
|
60
|
-
if (typeof root.Reflect !== "undefined") exporter = makeExporter(root.Reflect, exporter);
|
|
61
|
-
factory(exporter, root);
|
|
62
|
-
if (typeof root.Reflect === "undefined") root.Reflect = Reflect$2;
|
|
63
|
-
function makeExporter(target, previous) {
|
|
64
|
-
return function(key, value) {
|
|
65
|
-
Object.defineProperty(target, key, {
|
|
66
|
-
configurable: true,
|
|
67
|
-
writable: true,
|
|
68
|
-
value
|
|
69
|
-
});
|
|
70
|
-
if (previous) previous(key, value);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function functionThis() {
|
|
74
|
-
try {
|
|
75
|
-
return Function("return this;")();
|
|
76
|
-
} catch (_) {}
|
|
77
|
-
}
|
|
78
|
-
function indirectEvalThis() {
|
|
79
|
-
try {
|
|
80
|
-
return (0, eval)("(function() { return this; })()");
|
|
81
|
-
} catch (_) {}
|
|
82
|
-
}
|
|
83
|
-
function sloppyModeThis() {
|
|
84
|
-
return functionThis() || indirectEvalThis();
|
|
85
|
-
}
|
|
86
|
-
})(function(exporter, root) {
|
|
87
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
88
|
-
var supportsSymbol = typeof Symbol === "function";
|
|
89
|
-
var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
|
|
90
|
-
var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
|
|
91
|
-
var supportsCreate = typeof Object.create === "function";
|
|
92
|
-
var supportsProto = { __proto__: [] } instanceof Array;
|
|
93
|
-
var downLevel = !supportsCreate && !supportsProto;
|
|
94
|
-
var HashMap = {
|
|
95
|
-
create: supportsCreate ? function() {
|
|
96
|
-
return MakeDictionary(Object.create(null));
|
|
97
|
-
} : supportsProto ? function() {
|
|
98
|
-
return MakeDictionary({ __proto__: null });
|
|
99
|
-
} : function() {
|
|
100
|
-
return MakeDictionary({});
|
|
101
|
-
},
|
|
102
|
-
has: downLevel ? function(map, key) {
|
|
103
|
-
return hasOwn.call(map, key);
|
|
104
|
-
} : function(map, key) {
|
|
105
|
-
return key in map;
|
|
106
|
-
},
|
|
107
|
-
get: downLevel ? function(map, key) {
|
|
108
|
-
return hasOwn.call(map, key) ? map[key] : void 0;
|
|
109
|
-
} : function(map, key) {
|
|
110
|
-
return map[key];
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
var functionPrototype = Object.getPrototypeOf(Function);
|
|
114
|
-
var _Map = typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill();
|
|
115
|
-
var _Set = typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill();
|
|
116
|
-
var _WeakMap = typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill();
|
|
117
|
-
var registrySymbol = supportsSymbol ? Symbol.for("@reflect-metadata:registry") : void 0;
|
|
118
|
-
var metadataRegistry = GetOrCreateMetadataRegistry();
|
|
119
|
-
var metadataProvider = CreateMetadataProvider(metadataRegistry);
|
|
120
|
-
/**
|
|
121
|
-
* Applies a set of decorators to a property of a target object.
|
|
122
|
-
* @param decorators An array of decorators.
|
|
123
|
-
* @param target The target object.
|
|
124
|
-
* @param propertyKey (Optional) The property key to decorate.
|
|
125
|
-
* @param attributes (Optional) The property descriptor for the target key.
|
|
126
|
-
* @remarks Decorators are applied in reverse order.
|
|
127
|
-
* @example
|
|
128
|
-
*
|
|
129
|
-
* class Example {
|
|
130
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
131
|
-
* // static staticProperty;
|
|
132
|
-
* // property;
|
|
133
|
-
*
|
|
134
|
-
* constructor(p) { }
|
|
135
|
-
* static staticMethod(p) { }
|
|
136
|
-
* method(p) { }
|
|
137
|
-
* }
|
|
138
|
-
*
|
|
139
|
-
* // constructor
|
|
140
|
-
* Example = Reflect.decorate(decoratorsArray, Example);
|
|
141
|
-
*
|
|
142
|
-
* // property (on constructor)
|
|
143
|
-
* Reflect.decorate(decoratorsArray, Example, "staticProperty");
|
|
144
|
-
*
|
|
145
|
-
* // property (on prototype)
|
|
146
|
-
* Reflect.decorate(decoratorsArray, Example.prototype, "property");
|
|
147
|
-
*
|
|
148
|
-
* // method (on constructor)
|
|
149
|
-
* Object.defineProperty(Example, "staticMethod",
|
|
150
|
-
* Reflect.decorate(decoratorsArray, Example, "staticMethod",
|
|
151
|
-
* Object.getOwnPropertyDescriptor(Example, "staticMethod")));
|
|
152
|
-
*
|
|
153
|
-
* // method (on prototype)
|
|
154
|
-
* Object.defineProperty(Example.prototype, "method",
|
|
155
|
-
* Reflect.decorate(decoratorsArray, Example.prototype, "method",
|
|
156
|
-
* Object.getOwnPropertyDescriptor(Example.prototype, "method")));
|
|
157
|
-
*
|
|
158
|
-
*/
|
|
159
|
-
function decorate(decorators, target, propertyKey, attributes) {
|
|
160
|
-
if (!IsUndefined(propertyKey)) {
|
|
161
|
-
if (!IsArray(decorators)) throw new TypeError();
|
|
162
|
-
if (!IsObject(target)) throw new TypeError();
|
|
163
|
-
if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes)) throw new TypeError();
|
|
164
|
-
if (IsNull(attributes)) attributes = void 0;
|
|
165
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
166
|
-
return DecorateProperty(decorators, target, propertyKey, attributes);
|
|
167
|
-
} else {
|
|
168
|
-
if (!IsArray(decorators)) throw new TypeError();
|
|
169
|
-
if (!IsConstructor(target)) throw new TypeError();
|
|
170
|
-
return DecorateConstructor(decorators, target);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
exporter("decorate", decorate);
|
|
174
|
-
/**
|
|
175
|
-
* A default metadata decorator factory that can be used on a class, class member, or parameter.
|
|
176
|
-
* @param metadataKey The key for the metadata entry.
|
|
177
|
-
* @param metadataValue The value for the metadata entry.
|
|
178
|
-
* @returns A decorator function.
|
|
179
|
-
* @remarks
|
|
180
|
-
* If `metadataKey` is already defined for the target and target key, the
|
|
181
|
-
* metadataValue for that key will be overwritten.
|
|
182
|
-
* @example
|
|
183
|
-
*
|
|
184
|
-
* // constructor
|
|
185
|
-
* @Reflect.metadata(key, value)
|
|
186
|
-
* class Example {
|
|
187
|
-
* }
|
|
188
|
-
*
|
|
189
|
-
* // property (on constructor, TypeScript only)
|
|
190
|
-
* class Example {
|
|
191
|
-
* @Reflect.metadata(key, value)
|
|
192
|
-
* static staticProperty;
|
|
193
|
-
* }
|
|
194
|
-
*
|
|
195
|
-
* // property (on prototype, TypeScript only)
|
|
196
|
-
* class Example {
|
|
197
|
-
* @Reflect.metadata(key, value)
|
|
198
|
-
* property;
|
|
199
|
-
* }
|
|
200
|
-
*
|
|
201
|
-
* // method (on constructor)
|
|
202
|
-
* class Example {
|
|
203
|
-
* @Reflect.metadata(key, value)
|
|
204
|
-
* static staticMethod() { }
|
|
205
|
-
* }
|
|
206
|
-
*
|
|
207
|
-
* // method (on prototype)
|
|
208
|
-
* class Example {
|
|
209
|
-
* @Reflect.metadata(key, value)
|
|
210
|
-
* method() { }
|
|
211
|
-
* }
|
|
212
|
-
*
|
|
213
|
-
*/
|
|
214
|
-
function metadata(metadataKey, metadataValue) {
|
|
215
|
-
function decorator(target, propertyKey) {
|
|
216
|
-
if (!IsObject(target)) throw new TypeError();
|
|
217
|
-
if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey)) throw new TypeError();
|
|
218
|
-
OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
219
|
-
}
|
|
220
|
-
return decorator;
|
|
221
|
-
}
|
|
222
|
-
exporter("metadata", metadata);
|
|
223
|
-
/**
|
|
224
|
-
* Define a unique metadata entry on the target.
|
|
225
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
226
|
-
* @param metadataValue A value that contains attached metadata.
|
|
227
|
-
* @param target The target object on which to define metadata.
|
|
228
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
229
|
-
* @example
|
|
230
|
-
*
|
|
231
|
-
* class Example {
|
|
232
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
233
|
-
* // static staticProperty;
|
|
234
|
-
* // property;
|
|
235
|
-
*
|
|
236
|
-
* constructor(p) { }
|
|
237
|
-
* static staticMethod(p) { }
|
|
238
|
-
* method(p) { }
|
|
239
|
-
* }
|
|
240
|
-
*
|
|
241
|
-
* // constructor
|
|
242
|
-
* Reflect.defineMetadata("custom:annotation", options, Example);
|
|
243
|
-
*
|
|
244
|
-
* // property (on constructor)
|
|
245
|
-
* Reflect.defineMetadata("custom:annotation", options, Example, "staticProperty");
|
|
246
|
-
*
|
|
247
|
-
* // property (on prototype)
|
|
248
|
-
* Reflect.defineMetadata("custom:annotation", options, Example.prototype, "property");
|
|
249
|
-
*
|
|
250
|
-
* // method (on constructor)
|
|
251
|
-
* Reflect.defineMetadata("custom:annotation", options, Example, "staticMethod");
|
|
252
|
-
*
|
|
253
|
-
* // method (on prototype)
|
|
254
|
-
* Reflect.defineMetadata("custom:annotation", options, Example.prototype, "method");
|
|
255
|
-
*
|
|
256
|
-
* // decorator factory as metadata-producing annotation.
|
|
257
|
-
* function MyAnnotation(options): Decorator {
|
|
258
|
-
* return (target, key?) => Reflect.defineMetadata("custom:annotation", options, target, key);
|
|
259
|
-
* }
|
|
260
|
-
*
|
|
261
|
-
*/
|
|
262
|
-
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
263
|
-
if (!IsObject(target)) throw new TypeError();
|
|
264
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
265
|
-
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
266
|
-
}
|
|
267
|
-
exporter("defineMetadata", defineMetadata);
|
|
268
|
-
/**
|
|
269
|
-
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
|
|
270
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
271
|
-
* @param target The target object on which the metadata is defined.
|
|
272
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
273
|
-
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
|
|
274
|
-
* @example
|
|
275
|
-
*
|
|
276
|
-
* class Example {
|
|
277
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
278
|
-
* // static staticProperty;
|
|
279
|
-
* // property;
|
|
280
|
-
*
|
|
281
|
-
* constructor(p) { }
|
|
282
|
-
* static staticMethod(p) { }
|
|
283
|
-
* method(p) { }
|
|
284
|
-
* }
|
|
285
|
-
*
|
|
286
|
-
* // constructor
|
|
287
|
-
* result = Reflect.hasMetadata("custom:annotation", Example);
|
|
288
|
-
*
|
|
289
|
-
* // property (on constructor)
|
|
290
|
-
* result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty");
|
|
291
|
-
*
|
|
292
|
-
* // property (on prototype)
|
|
293
|
-
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property");
|
|
294
|
-
*
|
|
295
|
-
* // method (on constructor)
|
|
296
|
-
* result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod");
|
|
297
|
-
*
|
|
298
|
-
* // method (on prototype)
|
|
299
|
-
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method");
|
|
300
|
-
*
|
|
301
|
-
*/
|
|
302
|
-
function hasMetadata(metadataKey, target, propertyKey) {
|
|
303
|
-
if (!IsObject(target)) throw new TypeError();
|
|
304
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
305
|
-
return OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
306
|
-
}
|
|
307
|
-
exporter("hasMetadata", hasMetadata);
|
|
308
|
-
/**
|
|
309
|
-
* Gets a value indicating whether the target object has the provided metadata key defined.
|
|
310
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
311
|
-
* @param target The target object on which the metadata is defined.
|
|
312
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
313
|
-
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
|
|
314
|
-
* @example
|
|
315
|
-
*
|
|
316
|
-
* class Example {
|
|
317
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
318
|
-
* // static staticProperty;
|
|
319
|
-
* // property;
|
|
320
|
-
*
|
|
321
|
-
* constructor(p) { }
|
|
322
|
-
* static staticMethod(p) { }
|
|
323
|
-
* method(p) { }
|
|
324
|
-
* }
|
|
325
|
-
*
|
|
326
|
-
* // constructor
|
|
327
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example);
|
|
328
|
-
*
|
|
329
|
-
* // property (on constructor)
|
|
330
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty");
|
|
331
|
-
*
|
|
332
|
-
* // property (on prototype)
|
|
333
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property");
|
|
334
|
-
*
|
|
335
|
-
* // method (on constructor)
|
|
336
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod");
|
|
337
|
-
*
|
|
338
|
-
* // method (on prototype)
|
|
339
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method");
|
|
340
|
-
*
|
|
341
|
-
*/
|
|
342
|
-
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
343
|
-
if (!IsObject(target)) throw new TypeError();
|
|
344
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
345
|
-
return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
346
|
-
}
|
|
347
|
-
exporter("hasOwnMetadata", hasOwnMetadata);
|
|
348
|
-
/**
|
|
349
|
-
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
|
|
350
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
351
|
-
* @param target The target object on which the metadata is defined.
|
|
352
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
353
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
354
|
-
* @example
|
|
355
|
-
*
|
|
356
|
-
* class Example {
|
|
357
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
358
|
-
* // static staticProperty;
|
|
359
|
-
* // property;
|
|
360
|
-
*
|
|
361
|
-
* constructor(p) { }
|
|
362
|
-
* static staticMethod(p) { }
|
|
363
|
-
* method(p) { }
|
|
364
|
-
* }
|
|
365
|
-
*
|
|
366
|
-
* // constructor
|
|
367
|
-
* result = Reflect.getMetadata("custom:annotation", Example);
|
|
368
|
-
*
|
|
369
|
-
* // property (on constructor)
|
|
370
|
-
* result = Reflect.getMetadata("custom:annotation", Example, "staticProperty");
|
|
371
|
-
*
|
|
372
|
-
* // property (on prototype)
|
|
373
|
-
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "property");
|
|
374
|
-
*
|
|
375
|
-
* // method (on constructor)
|
|
376
|
-
* result = Reflect.getMetadata("custom:annotation", Example, "staticMethod");
|
|
377
|
-
*
|
|
378
|
-
* // method (on prototype)
|
|
379
|
-
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "method");
|
|
380
|
-
*
|
|
381
|
-
*/
|
|
382
|
-
function getMetadata(metadataKey, target, propertyKey) {
|
|
383
|
-
if (!IsObject(target)) throw new TypeError();
|
|
384
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
385
|
-
return OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
386
|
-
}
|
|
387
|
-
exporter("getMetadata", getMetadata);
|
|
388
|
-
/**
|
|
389
|
-
* Gets the metadata value for the provided metadata key on the target object.
|
|
390
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
391
|
-
* @param target The target object on which the metadata is defined.
|
|
392
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
393
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
394
|
-
* @example
|
|
395
|
-
*
|
|
396
|
-
* class Example {
|
|
397
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
398
|
-
* // static staticProperty;
|
|
399
|
-
* // property;
|
|
400
|
-
*
|
|
401
|
-
* constructor(p) { }
|
|
402
|
-
* static staticMethod(p) { }
|
|
403
|
-
* method(p) { }
|
|
404
|
-
* }
|
|
405
|
-
*
|
|
406
|
-
* // constructor
|
|
407
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example);
|
|
408
|
-
*
|
|
409
|
-
* // property (on constructor)
|
|
410
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty");
|
|
411
|
-
*
|
|
412
|
-
* // property (on prototype)
|
|
413
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property");
|
|
414
|
-
*
|
|
415
|
-
* // method (on constructor)
|
|
416
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod");
|
|
417
|
-
*
|
|
418
|
-
* // method (on prototype)
|
|
419
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method");
|
|
420
|
-
*
|
|
421
|
-
*/
|
|
422
|
-
function getOwnMetadata(metadataKey, target, propertyKey) {
|
|
423
|
-
if (!IsObject(target)) throw new TypeError();
|
|
424
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
425
|
-
return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
|
|
426
|
-
}
|
|
427
|
-
exporter("getOwnMetadata", getOwnMetadata);
|
|
428
|
-
/**
|
|
429
|
-
* Gets the metadata keys defined on the target object or its prototype chain.
|
|
430
|
-
* @param target The target object on which the metadata is defined.
|
|
431
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
432
|
-
* @returns An array of unique metadata keys.
|
|
433
|
-
* @example
|
|
434
|
-
*
|
|
435
|
-
* class Example {
|
|
436
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
437
|
-
* // static staticProperty;
|
|
438
|
-
* // property;
|
|
439
|
-
*
|
|
440
|
-
* constructor(p) { }
|
|
441
|
-
* static staticMethod(p) { }
|
|
442
|
-
* method(p) { }
|
|
443
|
-
* }
|
|
444
|
-
*
|
|
445
|
-
* // constructor
|
|
446
|
-
* result = Reflect.getMetadataKeys(Example);
|
|
447
|
-
*
|
|
448
|
-
* // property (on constructor)
|
|
449
|
-
* result = Reflect.getMetadataKeys(Example, "staticProperty");
|
|
450
|
-
*
|
|
451
|
-
* // property (on prototype)
|
|
452
|
-
* result = Reflect.getMetadataKeys(Example.prototype, "property");
|
|
453
|
-
*
|
|
454
|
-
* // method (on constructor)
|
|
455
|
-
* result = Reflect.getMetadataKeys(Example, "staticMethod");
|
|
456
|
-
*
|
|
457
|
-
* // method (on prototype)
|
|
458
|
-
* result = Reflect.getMetadataKeys(Example.prototype, "method");
|
|
459
|
-
*
|
|
460
|
-
*/
|
|
461
|
-
function getMetadataKeys(target, propertyKey) {
|
|
462
|
-
if (!IsObject(target)) throw new TypeError();
|
|
463
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
464
|
-
return OrdinaryMetadataKeys(target, propertyKey);
|
|
465
|
-
}
|
|
466
|
-
exporter("getMetadataKeys", getMetadataKeys);
|
|
467
|
-
/**
|
|
468
|
-
* Gets the unique metadata keys defined on the target object.
|
|
469
|
-
* @param target The target object on which the metadata is defined.
|
|
470
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
471
|
-
* @returns An array of unique metadata keys.
|
|
472
|
-
* @example
|
|
473
|
-
*
|
|
474
|
-
* class Example {
|
|
475
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
476
|
-
* // static staticProperty;
|
|
477
|
-
* // property;
|
|
478
|
-
*
|
|
479
|
-
* constructor(p) { }
|
|
480
|
-
* static staticMethod(p) { }
|
|
481
|
-
* method(p) { }
|
|
482
|
-
* }
|
|
483
|
-
*
|
|
484
|
-
* // constructor
|
|
485
|
-
* result = Reflect.getOwnMetadataKeys(Example);
|
|
486
|
-
*
|
|
487
|
-
* // property (on constructor)
|
|
488
|
-
* result = Reflect.getOwnMetadataKeys(Example, "staticProperty");
|
|
489
|
-
*
|
|
490
|
-
* // property (on prototype)
|
|
491
|
-
* result = Reflect.getOwnMetadataKeys(Example.prototype, "property");
|
|
492
|
-
*
|
|
493
|
-
* // method (on constructor)
|
|
494
|
-
* result = Reflect.getOwnMetadataKeys(Example, "staticMethod");
|
|
495
|
-
*
|
|
496
|
-
* // method (on prototype)
|
|
497
|
-
* result = Reflect.getOwnMetadataKeys(Example.prototype, "method");
|
|
498
|
-
*
|
|
499
|
-
*/
|
|
500
|
-
function getOwnMetadataKeys(target, propertyKey) {
|
|
501
|
-
if (!IsObject(target)) throw new TypeError();
|
|
502
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
503
|
-
return OrdinaryOwnMetadataKeys(target, propertyKey);
|
|
504
|
-
}
|
|
505
|
-
exporter("getOwnMetadataKeys", getOwnMetadataKeys);
|
|
506
|
-
/**
|
|
507
|
-
* Deletes the metadata entry from the target object with the provided key.
|
|
508
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
509
|
-
* @param target The target object on which the metadata is defined.
|
|
510
|
-
* @param propertyKey (Optional) The property key for the target.
|
|
511
|
-
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
|
|
512
|
-
* @example
|
|
513
|
-
*
|
|
514
|
-
* class Example {
|
|
515
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
516
|
-
* // static staticProperty;
|
|
517
|
-
* // property;
|
|
518
|
-
*
|
|
519
|
-
* constructor(p) { }
|
|
520
|
-
* static staticMethod(p) { }
|
|
521
|
-
* method(p) { }
|
|
522
|
-
* }
|
|
523
|
-
*
|
|
524
|
-
* // constructor
|
|
525
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example);
|
|
526
|
-
*
|
|
527
|
-
* // property (on constructor)
|
|
528
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty");
|
|
529
|
-
*
|
|
530
|
-
* // property (on prototype)
|
|
531
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property");
|
|
532
|
-
*
|
|
533
|
-
* // method (on constructor)
|
|
534
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod");
|
|
535
|
-
*
|
|
536
|
-
* // method (on prototype)
|
|
537
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method");
|
|
538
|
-
*
|
|
539
|
-
*/
|
|
540
|
-
function deleteMetadata(metadataKey, target, propertyKey) {
|
|
541
|
-
if (!IsObject(target)) throw new TypeError();
|
|
542
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
543
|
-
if (!IsObject(target)) throw new TypeError();
|
|
544
|
-
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
545
|
-
var provider = GetMetadataProvider(target, propertyKey, false);
|
|
546
|
-
if (IsUndefined(provider)) return false;
|
|
547
|
-
return provider.OrdinaryDeleteMetadata(metadataKey, target, propertyKey);
|
|
548
|
-
}
|
|
549
|
-
exporter("deleteMetadata", deleteMetadata);
|
|
550
|
-
function DecorateConstructor(decorators, target) {
|
|
551
|
-
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
552
|
-
var decorator = decorators[i];
|
|
553
|
-
var decorated = decorator(target);
|
|
554
|
-
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
555
|
-
if (!IsConstructor(decorated)) throw new TypeError();
|
|
556
|
-
target = decorated;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
return target;
|
|
560
|
-
}
|
|
561
|
-
function DecorateProperty(decorators, target, propertyKey, descriptor) {
|
|
562
|
-
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
563
|
-
var decorator = decorators[i];
|
|
564
|
-
var decorated = decorator(target, propertyKey, descriptor);
|
|
565
|
-
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
566
|
-
if (!IsObject(decorated)) throw new TypeError();
|
|
567
|
-
descriptor = decorated;
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
return descriptor;
|
|
571
|
-
}
|
|
572
|
-
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
573
|
-
if (OrdinaryHasOwnMetadata(MetadataKey, O, P)) return true;
|
|
574
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
575
|
-
if (!IsNull(parent)) return OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
576
|
-
return false;
|
|
577
|
-
}
|
|
578
|
-
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
579
|
-
var provider = GetMetadataProvider(O, P, false);
|
|
580
|
-
if (IsUndefined(provider)) return false;
|
|
581
|
-
return ToBoolean(provider.OrdinaryHasOwnMetadata(MetadataKey, O, P));
|
|
582
|
-
}
|
|
583
|
-
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
584
|
-
if (OrdinaryHasOwnMetadata(MetadataKey, O, P)) return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
585
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
586
|
-
if (!IsNull(parent)) return OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
587
|
-
}
|
|
588
|
-
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
589
|
-
var provider = GetMetadataProvider(O, P, false);
|
|
590
|
-
if (IsUndefined(provider)) return;
|
|
591
|
-
return provider.OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
592
|
-
}
|
|
593
|
-
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
594
|
-
GetMetadataProvider(O, P, true).OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P);
|
|
595
|
-
}
|
|
596
|
-
function OrdinaryMetadataKeys(O, P) {
|
|
597
|
-
var ownKeys = OrdinaryOwnMetadataKeys(O, P);
|
|
598
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
599
|
-
if (parent === null) return ownKeys;
|
|
600
|
-
var parentKeys = OrdinaryMetadataKeys(parent, P);
|
|
601
|
-
if (parentKeys.length <= 0) return ownKeys;
|
|
602
|
-
if (ownKeys.length <= 0) return parentKeys;
|
|
603
|
-
var set = new _Set();
|
|
604
|
-
var keys = [];
|
|
605
|
-
for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {
|
|
606
|
-
var key = ownKeys_1[_i];
|
|
607
|
-
var hasKey = set.has(key);
|
|
608
|
-
if (!hasKey) {
|
|
609
|
-
set.add(key);
|
|
610
|
-
keys.push(key);
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) {
|
|
614
|
-
var key = parentKeys_1[_a];
|
|
615
|
-
var hasKey = set.has(key);
|
|
616
|
-
if (!hasKey) {
|
|
617
|
-
set.add(key);
|
|
618
|
-
keys.push(key);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
return keys;
|
|
622
|
-
}
|
|
623
|
-
function OrdinaryOwnMetadataKeys(O, P) {
|
|
624
|
-
var provider = GetMetadataProvider(O, P, false);
|
|
625
|
-
if (!provider) return [];
|
|
626
|
-
return provider.OrdinaryOwnMetadataKeys(O, P);
|
|
627
|
-
}
|
|
628
|
-
function Type(x) {
|
|
629
|
-
if (x === null) return 1;
|
|
630
|
-
switch (typeof x) {
|
|
631
|
-
case "undefined": return 0;
|
|
632
|
-
case "boolean": return 2;
|
|
633
|
-
case "string": return 3;
|
|
634
|
-
case "symbol": return 4;
|
|
635
|
-
case "number": return 5;
|
|
636
|
-
case "object": return x === null ? 1 : 6;
|
|
637
|
-
default: return 6;
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
function IsUndefined(x) {
|
|
641
|
-
return x === void 0;
|
|
642
|
-
}
|
|
643
|
-
function IsNull(x) {
|
|
644
|
-
return x === null;
|
|
645
|
-
}
|
|
646
|
-
function IsSymbol(x) {
|
|
647
|
-
return typeof x === "symbol";
|
|
648
|
-
}
|
|
649
|
-
function IsObject(x) {
|
|
650
|
-
return typeof x === "object" ? x !== null : typeof x === "function";
|
|
651
|
-
}
|
|
652
|
-
function ToPrimitive(input, PreferredType) {
|
|
653
|
-
switch (Type(input)) {
|
|
654
|
-
case 0: return input;
|
|
655
|
-
case 1: return input;
|
|
656
|
-
case 2: return input;
|
|
657
|
-
case 3: return input;
|
|
658
|
-
case 4: return input;
|
|
659
|
-
case 5: return input;
|
|
660
|
-
}
|
|
661
|
-
var hint = PreferredType === 3 ? "string" : PreferredType === 5 ? "number" : "default";
|
|
662
|
-
var exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
663
|
-
if (exoticToPrim !== void 0) {
|
|
664
|
-
var result = exoticToPrim.call(input, hint);
|
|
665
|
-
if (IsObject(result)) throw new TypeError();
|
|
666
|
-
return result;
|
|
667
|
-
}
|
|
668
|
-
return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
|
|
669
|
-
}
|
|
670
|
-
function OrdinaryToPrimitive(O, hint) {
|
|
671
|
-
if (hint === "string") {
|
|
672
|
-
var toString_1 = O.toString;
|
|
673
|
-
if (IsCallable(toString_1)) {
|
|
674
|
-
var result = toString_1.call(O);
|
|
675
|
-
if (!IsObject(result)) return result;
|
|
676
|
-
}
|
|
677
|
-
var valueOf = O.valueOf;
|
|
678
|
-
if (IsCallable(valueOf)) {
|
|
679
|
-
var result = valueOf.call(O);
|
|
680
|
-
if (!IsObject(result)) return result;
|
|
681
|
-
}
|
|
682
|
-
} else {
|
|
683
|
-
var valueOf = O.valueOf;
|
|
684
|
-
if (IsCallable(valueOf)) {
|
|
685
|
-
var result = valueOf.call(O);
|
|
686
|
-
if (!IsObject(result)) return result;
|
|
687
|
-
}
|
|
688
|
-
var toString_2 = O.toString;
|
|
689
|
-
if (IsCallable(toString_2)) {
|
|
690
|
-
var result = toString_2.call(O);
|
|
691
|
-
if (!IsObject(result)) return result;
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
throw new TypeError();
|
|
695
|
-
}
|
|
696
|
-
function ToBoolean(argument) {
|
|
697
|
-
return !!argument;
|
|
698
|
-
}
|
|
699
|
-
function ToString(argument) {
|
|
700
|
-
return "" + argument;
|
|
701
|
-
}
|
|
702
|
-
function ToPropertyKey(argument) {
|
|
703
|
-
var key = ToPrimitive(argument, 3);
|
|
704
|
-
if (IsSymbol(key)) return key;
|
|
705
|
-
return ToString(key);
|
|
706
|
-
}
|
|
707
|
-
function IsArray(argument) {
|
|
708
|
-
return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]";
|
|
709
|
-
}
|
|
710
|
-
function IsCallable(argument) {
|
|
711
|
-
return typeof argument === "function";
|
|
712
|
-
}
|
|
713
|
-
function IsConstructor(argument) {
|
|
714
|
-
return typeof argument === "function";
|
|
715
|
-
}
|
|
716
|
-
function IsPropertyKey(argument) {
|
|
717
|
-
switch (Type(argument)) {
|
|
718
|
-
case 3: return true;
|
|
719
|
-
case 4: return true;
|
|
720
|
-
default: return false;
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
function SameValueZero(x, y) {
|
|
724
|
-
return x === y || x !== x && y !== y;
|
|
725
|
-
}
|
|
726
|
-
function GetMethod(V, P) {
|
|
727
|
-
var func = V[P];
|
|
728
|
-
if (func === void 0 || func === null) return void 0;
|
|
729
|
-
if (!IsCallable(func)) throw new TypeError();
|
|
730
|
-
return func;
|
|
731
|
-
}
|
|
732
|
-
function GetIterator(obj) {
|
|
733
|
-
var method = GetMethod(obj, iteratorSymbol);
|
|
734
|
-
if (!IsCallable(method)) throw new TypeError();
|
|
735
|
-
var iterator = method.call(obj);
|
|
736
|
-
if (!IsObject(iterator)) throw new TypeError();
|
|
737
|
-
return iterator;
|
|
738
|
-
}
|
|
739
|
-
function IteratorValue(iterResult) {
|
|
740
|
-
return iterResult.value;
|
|
741
|
-
}
|
|
742
|
-
function IteratorStep(iterator) {
|
|
743
|
-
var result = iterator.next();
|
|
744
|
-
return result.done ? false : result;
|
|
745
|
-
}
|
|
746
|
-
function IteratorClose(iterator) {
|
|
747
|
-
var f = iterator["return"];
|
|
748
|
-
if (f) f.call(iterator);
|
|
749
|
-
}
|
|
750
|
-
function OrdinaryGetPrototypeOf(O) {
|
|
751
|
-
var proto = Object.getPrototypeOf(O);
|
|
752
|
-
if (typeof O !== "function" || O === functionPrototype) return proto;
|
|
753
|
-
if (proto !== functionPrototype) return proto;
|
|
754
|
-
var prototype = O.prototype;
|
|
755
|
-
var prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
756
|
-
if (prototypeProto == null || prototypeProto === Object.prototype) return proto;
|
|
757
|
-
var constructor = prototypeProto.constructor;
|
|
758
|
-
if (typeof constructor !== "function") return proto;
|
|
759
|
-
if (constructor === O) return proto;
|
|
760
|
-
return constructor;
|
|
761
|
-
}
|
|
762
|
-
/**
|
|
763
|
-
* Creates a registry used to allow multiple `reflect-metadata` providers.
|
|
764
|
-
*/
|
|
765
|
-
function CreateMetadataRegistry() {
|
|
766
|
-
var fallback;
|
|
767
|
-
if (!IsUndefined(registrySymbol) && typeof root.Reflect !== "undefined" && !(registrySymbol in root.Reflect) && typeof root.Reflect.defineMetadata === "function") fallback = CreateFallbackProvider(root.Reflect);
|
|
768
|
-
var first;
|
|
769
|
-
var second;
|
|
770
|
-
var rest;
|
|
771
|
-
var targetProviderMap = new _WeakMap();
|
|
772
|
-
var registry = {
|
|
773
|
-
registerProvider,
|
|
774
|
-
getProvider,
|
|
775
|
-
setProvider
|
|
776
|
-
};
|
|
777
|
-
return registry;
|
|
778
|
-
function registerProvider(provider) {
|
|
779
|
-
if (!Object.isExtensible(registry)) throw new Error("Cannot add provider to a frozen registry.");
|
|
780
|
-
switch (true) {
|
|
781
|
-
case fallback === provider: break;
|
|
782
|
-
case IsUndefined(first):
|
|
783
|
-
first = provider;
|
|
784
|
-
break;
|
|
785
|
-
case first === provider: break;
|
|
786
|
-
case IsUndefined(second):
|
|
787
|
-
second = provider;
|
|
788
|
-
break;
|
|
789
|
-
case second === provider: break;
|
|
790
|
-
default:
|
|
791
|
-
if (rest === void 0) rest = new _Set();
|
|
792
|
-
rest.add(provider);
|
|
793
|
-
break;
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
function getProviderNoCache(O, P) {
|
|
797
|
-
if (!IsUndefined(first)) {
|
|
798
|
-
if (first.isProviderFor(O, P)) return first;
|
|
799
|
-
if (!IsUndefined(second)) {
|
|
800
|
-
if (second.isProviderFor(O, P)) return first;
|
|
801
|
-
if (!IsUndefined(rest)) {
|
|
802
|
-
var iterator = GetIterator(rest);
|
|
803
|
-
while (true) {
|
|
804
|
-
var next = IteratorStep(iterator);
|
|
805
|
-
if (!next) return;
|
|
806
|
-
var provider = IteratorValue(next);
|
|
807
|
-
if (provider.isProviderFor(O, P)) {
|
|
808
|
-
IteratorClose(iterator);
|
|
809
|
-
return provider;
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
if (!IsUndefined(fallback) && fallback.isProviderFor(O, P)) return fallback;
|
|
816
|
-
}
|
|
817
|
-
function getProvider(O, P) {
|
|
818
|
-
var providerMap = targetProviderMap.get(O);
|
|
819
|
-
var provider;
|
|
820
|
-
if (!IsUndefined(providerMap)) provider = providerMap.get(P);
|
|
821
|
-
if (!IsUndefined(provider)) return provider;
|
|
822
|
-
provider = getProviderNoCache(O, P);
|
|
823
|
-
if (!IsUndefined(provider)) {
|
|
824
|
-
if (IsUndefined(providerMap)) {
|
|
825
|
-
providerMap = new _Map();
|
|
826
|
-
targetProviderMap.set(O, providerMap);
|
|
827
|
-
}
|
|
828
|
-
providerMap.set(P, provider);
|
|
829
|
-
}
|
|
830
|
-
return provider;
|
|
831
|
-
}
|
|
832
|
-
function hasProvider(provider) {
|
|
833
|
-
if (IsUndefined(provider)) throw new TypeError();
|
|
834
|
-
return first === provider || second === provider || !IsUndefined(rest) && rest.has(provider);
|
|
835
|
-
}
|
|
836
|
-
function setProvider(O, P, provider) {
|
|
837
|
-
if (!hasProvider(provider)) throw new Error("Metadata provider not registered.");
|
|
838
|
-
var existingProvider = getProvider(O, P);
|
|
839
|
-
if (existingProvider !== provider) {
|
|
840
|
-
if (!IsUndefined(existingProvider)) return false;
|
|
841
|
-
var providerMap = targetProviderMap.get(O);
|
|
842
|
-
if (IsUndefined(providerMap)) {
|
|
843
|
-
providerMap = new _Map();
|
|
844
|
-
targetProviderMap.set(O, providerMap);
|
|
845
|
-
}
|
|
846
|
-
providerMap.set(P, provider);
|
|
847
|
-
}
|
|
848
|
-
return true;
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
/**
|
|
852
|
-
* Gets or creates the shared registry of metadata providers.
|
|
853
|
-
*/
|
|
854
|
-
function GetOrCreateMetadataRegistry() {
|
|
855
|
-
var metadataRegistry$1;
|
|
856
|
-
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) metadataRegistry$1 = root.Reflect[registrySymbol];
|
|
857
|
-
if (IsUndefined(metadataRegistry$1)) metadataRegistry$1 = CreateMetadataRegistry();
|
|
858
|
-
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) Object.defineProperty(root.Reflect, registrySymbol, {
|
|
859
|
-
enumerable: false,
|
|
860
|
-
configurable: false,
|
|
861
|
-
writable: false,
|
|
862
|
-
value: metadataRegistry$1
|
|
863
|
-
});
|
|
864
|
-
return metadataRegistry$1;
|
|
865
|
-
}
|
|
866
|
-
function CreateMetadataProvider(registry) {
|
|
867
|
-
var metadata$1 = new _WeakMap();
|
|
868
|
-
var provider = {
|
|
869
|
-
isProviderFor: function(O, P) {
|
|
870
|
-
var targetMetadata = metadata$1.get(O);
|
|
871
|
-
if (IsUndefined(targetMetadata)) return false;
|
|
872
|
-
return targetMetadata.has(P);
|
|
873
|
-
},
|
|
874
|
-
OrdinaryDefineOwnMetadata: OrdinaryDefineOwnMetadata$1,
|
|
875
|
-
OrdinaryHasOwnMetadata: OrdinaryHasOwnMetadata$1,
|
|
876
|
-
OrdinaryGetOwnMetadata: OrdinaryGetOwnMetadata$1,
|
|
877
|
-
OrdinaryOwnMetadataKeys: OrdinaryOwnMetadataKeys$1,
|
|
878
|
-
OrdinaryDeleteMetadata
|
|
879
|
-
};
|
|
880
|
-
metadataRegistry.registerProvider(provider);
|
|
881
|
-
return provider;
|
|
882
|
-
function GetOrCreateMetadataMap(O, P, Create) {
|
|
883
|
-
var targetMetadata = metadata$1.get(O);
|
|
884
|
-
var createdTargetMetadata = false;
|
|
885
|
-
if (IsUndefined(targetMetadata)) {
|
|
886
|
-
if (!Create) return void 0;
|
|
887
|
-
targetMetadata = new _Map();
|
|
888
|
-
metadata$1.set(O, targetMetadata);
|
|
889
|
-
createdTargetMetadata = true;
|
|
890
|
-
}
|
|
891
|
-
var metadataMap = targetMetadata.get(P);
|
|
892
|
-
if (IsUndefined(metadataMap)) {
|
|
893
|
-
if (!Create) return void 0;
|
|
894
|
-
metadataMap = new _Map();
|
|
895
|
-
targetMetadata.set(P, metadataMap);
|
|
896
|
-
if (!registry.setProvider(O, P, provider)) {
|
|
897
|
-
targetMetadata.delete(P);
|
|
898
|
-
if (createdTargetMetadata) metadata$1.delete(O);
|
|
899
|
-
throw new Error("Wrong provider for target.");
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
return metadataMap;
|
|
903
|
-
}
|
|
904
|
-
function OrdinaryHasOwnMetadata$1(MetadataKey, O, P) {
|
|
905
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
906
|
-
if (IsUndefined(metadataMap)) return false;
|
|
907
|
-
return ToBoolean(metadataMap.has(MetadataKey));
|
|
908
|
-
}
|
|
909
|
-
function OrdinaryGetOwnMetadata$1(MetadataKey, O, P) {
|
|
910
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
911
|
-
if (IsUndefined(metadataMap)) return void 0;
|
|
912
|
-
return metadataMap.get(MetadataKey);
|
|
913
|
-
}
|
|
914
|
-
function OrdinaryDefineOwnMetadata$1(MetadataKey, MetadataValue, O, P) {
|
|
915
|
-
GetOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
|
|
916
|
-
}
|
|
917
|
-
function OrdinaryOwnMetadataKeys$1(O, P) {
|
|
918
|
-
var keys = [];
|
|
919
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
920
|
-
if (IsUndefined(metadataMap)) return keys;
|
|
921
|
-
var keysObj = metadataMap.keys();
|
|
922
|
-
var iterator = GetIterator(keysObj);
|
|
923
|
-
var k = 0;
|
|
924
|
-
while (true) {
|
|
925
|
-
var next = IteratorStep(iterator);
|
|
926
|
-
if (!next) {
|
|
927
|
-
keys.length = k;
|
|
928
|
-
return keys;
|
|
929
|
-
}
|
|
930
|
-
var nextValue = IteratorValue(next);
|
|
931
|
-
try {
|
|
932
|
-
keys[k] = nextValue;
|
|
933
|
-
} catch (e) {
|
|
934
|
-
try {
|
|
935
|
-
IteratorClose(iterator);
|
|
936
|
-
} finally {
|
|
937
|
-
throw e;
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
k++;
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
function OrdinaryDeleteMetadata(MetadataKey, O, P) {
|
|
944
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
945
|
-
if (IsUndefined(metadataMap)) return false;
|
|
946
|
-
if (!metadataMap.delete(MetadataKey)) return false;
|
|
947
|
-
if (metadataMap.size === 0) {
|
|
948
|
-
var targetMetadata = metadata$1.get(O);
|
|
949
|
-
if (!IsUndefined(targetMetadata)) {
|
|
950
|
-
targetMetadata.delete(P);
|
|
951
|
-
if (targetMetadata.size === 0) metadata$1.delete(targetMetadata);
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
return true;
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
function CreateFallbackProvider(reflect) {
|
|
958
|
-
var defineMetadata$1 = reflect.defineMetadata, hasOwnMetadata$1 = reflect.hasOwnMetadata, getOwnMetadata$1 = reflect.getOwnMetadata, getOwnMetadataKeys$1 = reflect.getOwnMetadataKeys, deleteMetadata$1 = reflect.deleteMetadata;
|
|
959
|
-
var metadataOwner = new _WeakMap();
|
|
960
|
-
return {
|
|
961
|
-
isProviderFor: function(O, P) {
|
|
962
|
-
var metadataPropertySet = metadataOwner.get(O);
|
|
963
|
-
if (!IsUndefined(metadataPropertySet) && metadataPropertySet.has(P)) return true;
|
|
964
|
-
if (getOwnMetadataKeys$1(O, P).length) {
|
|
965
|
-
if (IsUndefined(metadataPropertySet)) {
|
|
966
|
-
metadataPropertySet = new _Set();
|
|
967
|
-
metadataOwner.set(O, metadataPropertySet);
|
|
968
|
-
}
|
|
969
|
-
metadataPropertySet.add(P);
|
|
970
|
-
return true;
|
|
971
|
-
}
|
|
972
|
-
return false;
|
|
973
|
-
},
|
|
974
|
-
OrdinaryDefineOwnMetadata: defineMetadata$1,
|
|
975
|
-
OrdinaryHasOwnMetadata: hasOwnMetadata$1,
|
|
976
|
-
OrdinaryGetOwnMetadata: getOwnMetadata$1,
|
|
977
|
-
OrdinaryOwnMetadataKeys: getOwnMetadataKeys$1,
|
|
978
|
-
OrdinaryDeleteMetadata: deleteMetadata$1
|
|
979
|
-
};
|
|
980
|
-
}
|
|
981
|
-
/**
|
|
982
|
-
* Gets the metadata provider for an object. If the object has no metadata provider and this is for a create operation,
|
|
983
|
-
* then this module's metadata provider is assigned to the object.
|
|
984
|
-
*/
|
|
985
|
-
function GetMetadataProvider(O, P, Create) {
|
|
986
|
-
var registeredProvider = metadataRegistry.getProvider(O, P);
|
|
987
|
-
if (!IsUndefined(registeredProvider)) return registeredProvider;
|
|
988
|
-
if (Create) {
|
|
989
|
-
if (metadataRegistry.setProvider(O, P, metadataProvider)) return metadataProvider;
|
|
990
|
-
throw new Error("Illegal state.");
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
function CreateMapPolyfill() {
|
|
994
|
-
var cacheSentinel = {};
|
|
995
|
-
var arraySentinel = [];
|
|
996
|
-
var MapIterator = function() {
|
|
997
|
-
function MapIterator$1(keys, values, selector) {
|
|
998
|
-
this._index = 0;
|
|
999
|
-
this._keys = keys;
|
|
1000
|
-
this._values = values;
|
|
1001
|
-
this._selector = selector;
|
|
1002
|
-
}
|
|
1003
|
-
MapIterator$1.prototype["@@iterator"] = function() {
|
|
1004
|
-
return this;
|
|
1005
|
-
};
|
|
1006
|
-
MapIterator$1.prototype[iteratorSymbol] = function() {
|
|
1007
|
-
return this;
|
|
1008
|
-
};
|
|
1009
|
-
MapIterator$1.prototype.next = function() {
|
|
1010
|
-
var index = this._index;
|
|
1011
|
-
if (index >= 0 && index < this._keys.length) {
|
|
1012
|
-
var result = this._selector(this._keys[index], this._values[index]);
|
|
1013
|
-
if (index + 1 >= this._keys.length) {
|
|
1014
|
-
this._index = -1;
|
|
1015
|
-
this._keys = arraySentinel;
|
|
1016
|
-
this._values = arraySentinel;
|
|
1017
|
-
} else this._index++;
|
|
1018
|
-
return {
|
|
1019
|
-
value: result,
|
|
1020
|
-
done: false
|
|
1021
|
-
};
|
|
1022
|
-
}
|
|
1023
|
-
return {
|
|
1024
|
-
value: void 0,
|
|
1025
|
-
done: true
|
|
1026
|
-
};
|
|
1027
|
-
};
|
|
1028
|
-
MapIterator$1.prototype.throw = function(error) {
|
|
1029
|
-
if (this._index >= 0) {
|
|
1030
|
-
this._index = -1;
|
|
1031
|
-
this._keys = arraySentinel;
|
|
1032
|
-
this._values = arraySentinel;
|
|
1033
|
-
}
|
|
1034
|
-
throw error;
|
|
1035
|
-
};
|
|
1036
|
-
MapIterator$1.prototype.return = function(value) {
|
|
1037
|
-
if (this._index >= 0) {
|
|
1038
|
-
this._index = -1;
|
|
1039
|
-
this._keys = arraySentinel;
|
|
1040
|
-
this._values = arraySentinel;
|
|
1041
|
-
}
|
|
1042
|
-
return {
|
|
1043
|
-
value,
|
|
1044
|
-
done: true
|
|
1045
|
-
};
|
|
1046
|
-
};
|
|
1047
|
-
return MapIterator$1;
|
|
1048
|
-
}();
|
|
1049
|
-
return function() {
|
|
1050
|
-
function Map$1() {
|
|
1051
|
-
this._keys = [];
|
|
1052
|
-
this._values = [];
|
|
1053
|
-
this._cacheKey = cacheSentinel;
|
|
1054
|
-
this._cacheIndex = -2;
|
|
1055
|
-
}
|
|
1056
|
-
Object.defineProperty(Map$1.prototype, "size", {
|
|
1057
|
-
get: function() {
|
|
1058
|
-
return this._keys.length;
|
|
1059
|
-
},
|
|
1060
|
-
enumerable: true,
|
|
1061
|
-
configurable: true
|
|
1062
|
-
});
|
|
1063
|
-
Map$1.prototype.has = function(key) {
|
|
1064
|
-
return this._find(key, false) >= 0;
|
|
1065
|
-
};
|
|
1066
|
-
Map$1.prototype.get = function(key) {
|
|
1067
|
-
var index = this._find(key, false);
|
|
1068
|
-
return index >= 0 ? this._values[index] : void 0;
|
|
1069
|
-
};
|
|
1070
|
-
Map$1.prototype.set = function(key, value) {
|
|
1071
|
-
var index = this._find(key, true);
|
|
1072
|
-
this._values[index] = value;
|
|
1073
|
-
return this;
|
|
1074
|
-
};
|
|
1075
|
-
Map$1.prototype.delete = function(key) {
|
|
1076
|
-
var index = this._find(key, false);
|
|
1077
|
-
if (index >= 0) {
|
|
1078
|
-
var size = this._keys.length;
|
|
1079
|
-
for (var i = index + 1; i < size; i++) {
|
|
1080
|
-
this._keys[i - 1] = this._keys[i];
|
|
1081
|
-
this._values[i - 1] = this._values[i];
|
|
1082
|
-
}
|
|
1083
|
-
this._keys.length--;
|
|
1084
|
-
this._values.length--;
|
|
1085
|
-
if (SameValueZero(key, this._cacheKey)) {
|
|
1086
|
-
this._cacheKey = cacheSentinel;
|
|
1087
|
-
this._cacheIndex = -2;
|
|
1088
|
-
}
|
|
1089
|
-
return true;
|
|
1090
|
-
}
|
|
1091
|
-
return false;
|
|
1092
|
-
};
|
|
1093
|
-
Map$1.prototype.clear = function() {
|
|
1094
|
-
this._keys.length = 0;
|
|
1095
|
-
this._values.length = 0;
|
|
1096
|
-
this._cacheKey = cacheSentinel;
|
|
1097
|
-
this._cacheIndex = -2;
|
|
1098
|
-
};
|
|
1099
|
-
Map$1.prototype.keys = function() {
|
|
1100
|
-
return new MapIterator(this._keys, this._values, getKey);
|
|
1101
|
-
};
|
|
1102
|
-
Map$1.prototype.values = function() {
|
|
1103
|
-
return new MapIterator(this._keys, this._values, getValue);
|
|
1104
|
-
};
|
|
1105
|
-
Map$1.prototype.entries = function() {
|
|
1106
|
-
return new MapIterator(this._keys, this._values, getEntry);
|
|
1107
|
-
};
|
|
1108
|
-
Map$1.prototype["@@iterator"] = function() {
|
|
1109
|
-
return this.entries();
|
|
1110
|
-
};
|
|
1111
|
-
Map$1.prototype[iteratorSymbol] = function() {
|
|
1112
|
-
return this.entries();
|
|
1113
|
-
};
|
|
1114
|
-
Map$1.prototype._find = function(key, insert) {
|
|
1115
|
-
if (!SameValueZero(this._cacheKey, key)) {
|
|
1116
|
-
this._cacheIndex = -1;
|
|
1117
|
-
for (var i = 0; i < this._keys.length; i++) if (SameValueZero(this._keys[i], key)) {
|
|
1118
|
-
this._cacheIndex = i;
|
|
1119
|
-
break;
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
if (this._cacheIndex < 0 && insert) {
|
|
1123
|
-
this._cacheIndex = this._keys.length;
|
|
1124
|
-
this._keys.push(key);
|
|
1125
|
-
this._values.push(void 0);
|
|
1126
|
-
}
|
|
1127
|
-
return this._cacheIndex;
|
|
1128
|
-
};
|
|
1129
|
-
return Map$1;
|
|
1130
|
-
}();
|
|
1131
|
-
function getKey(key, _) {
|
|
1132
|
-
return key;
|
|
1133
|
-
}
|
|
1134
|
-
function getValue(_, value) {
|
|
1135
|
-
return value;
|
|
1136
|
-
}
|
|
1137
|
-
function getEntry(key, value) {
|
|
1138
|
-
return [key, value];
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
function CreateSetPolyfill() {
|
|
1142
|
-
return function() {
|
|
1143
|
-
function Set$1() {
|
|
1144
|
-
this._map = new _Map();
|
|
1145
|
-
}
|
|
1146
|
-
Object.defineProperty(Set$1.prototype, "size", {
|
|
1147
|
-
get: function() {
|
|
1148
|
-
return this._map.size;
|
|
1149
|
-
},
|
|
1150
|
-
enumerable: true,
|
|
1151
|
-
configurable: true
|
|
1152
|
-
});
|
|
1153
|
-
Set$1.prototype.has = function(value) {
|
|
1154
|
-
return this._map.has(value);
|
|
1155
|
-
};
|
|
1156
|
-
Set$1.prototype.add = function(value) {
|
|
1157
|
-
return this._map.set(value, value), this;
|
|
1158
|
-
};
|
|
1159
|
-
Set$1.prototype.delete = function(value) {
|
|
1160
|
-
return this._map.delete(value);
|
|
1161
|
-
};
|
|
1162
|
-
Set$1.prototype.clear = function() {
|
|
1163
|
-
this._map.clear();
|
|
1164
|
-
};
|
|
1165
|
-
Set$1.prototype.keys = function() {
|
|
1166
|
-
return this._map.keys();
|
|
1167
|
-
};
|
|
1168
|
-
Set$1.prototype.values = function() {
|
|
1169
|
-
return this._map.keys();
|
|
1170
|
-
};
|
|
1171
|
-
Set$1.prototype.entries = function() {
|
|
1172
|
-
return this._map.entries();
|
|
1173
|
-
};
|
|
1174
|
-
Set$1.prototype["@@iterator"] = function() {
|
|
1175
|
-
return this.keys();
|
|
1176
|
-
};
|
|
1177
|
-
Set$1.prototype[iteratorSymbol] = function() {
|
|
1178
|
-
return this.keys();
|
|
1179
|
-
};
|
|
1180
|
-
return Set$1;
|
|
1181
|
-
}();
|
|
1182
|
-
}
|
|
1183
|
-
function CreateWeakMapPolyfill() {
|
|
1184
|
-
var UUID_SIZE = 16;
|
|
1185
|
-
var keys = HashMap.create();
|
|
1186
|
-
var rootKey = CreateUniqueKey();
|
|
1187
|
-
return function() {
|
|
1188
|
-
function WeakMap$1() {
|
|
1189
|
-
this._key = CreateUniqueKey();
|
|
1190
|
-
}
|
|
1191
|
-
WeakMap$1.prototype.has = function(target) {
|
|
1192
|
-
var table = GetOrCreateWeakMapTable(target, false);
|
|
1193
|
-
return table !== void 0 ? HashMap.has(table, this._key) : false;
|
|
1194
|
-
};
|
|
1195
|
-
WeakMap$1.prototype.get = function(target) {
|
|
1196
|
-
var table = GetOrCreateWeakMapTable(target, false);
|
|
1197
|
-
return table !== void 0 ? HashMap.get(table, this._key) : void 0;
|
|
1198
|
-
};
|
|
1199
|
-
WeakMap$1.prototype.set = function(target, value) {
|
|
1200
|
-
var table = GetOrCreateWeakMapTable(target, true);
|
|
1201
|
-
table[this._key] = value;
|
|
1202
|
-
return this;
|
|
1203
|
-
};
|
|
1204
|
-
WeakMap$1.prototype.delete = function(target) {
|
|
1205
|
-
var table = GetOrCreateWeakMapTable(target, false);
|
|
1206
|
-
return table !== void 0 ? delete table[this._key] : false;
|
|
1207
|
-
};
|
|
1208
|
-
WeakMap$1.prototype.clear = function() {
|
|
1209
|
-
this._key = CreateUniqueKey();
|
|
1210
|
-
};
|
|
1211
|
-
return WeakMap$1;
|
|
1212
|
-
}();
|
|
1213
|
-
function CreateUniqueKey() {
|
|
1214
|
-
var key;
|
|
1215
|
-
do
|
|
1216
|
-
key = "@@WeakMap@@" + CreateUUID();
|
|
1217
|
-
while (HashMap.has(keys, key));
|
|
1218
|
-
keys[key] = true;
|
|
1219
|
-
return key;
|
|
1220
|
-
}
|
|
1221
|
-
function GetOrCreateWeakMapTable(target, create) {
|
|
1222
|
-
if (!hasOwn.call(target, rootKey)) {
|
|
1223
|
-
if (!create) return void 0;
|
|
1224
|
-
Object.defineProperty(target, rootKey, { value: HashMap.create() });
|
|
1225
|
-
}
|
|
1226
|
-
return target[rootKey];
|
|
1227
|
-
}
|
|
1228
|
-
function FillRandomBytes(buffer, size) {
|
|
1229
|
-
for (var i = 0; i < size; ++i) buffer[i] = Math.random() * 255 | 0;
|
|
1230
|
-
return buffer;
|
|
1231
|
-
}
|
|
1232
|
-
function GenRandomBytes(size) {
|
|
1233
|
-
if (typeof Uint8Array === "function") {
|
|
1234
|
-
var array = new Uint8Array(size);
|
|
1235
|
-
if (typeof crypto !== "undefined") crypto.getRandomValues(array);
|
|
1236
|
-
else if (typeof msCrypto !== "undefined") msCrypto.getRandomValues(array);
|
|
1237
|
-
else FillRandomBytes(array, size);
|
|
1238
|
-
return array;
|
|
1239
|
-
}
|
|
1240
|
-
return FillRandomBytes(new Array(size), size);
|
|
1241
|
-
}
|
|
1242
|
-
function CreateUUID() {
|
|
1243
|
-
var data = GenRandomBytes(UUID_SIZE);
|
|
1244
|
-
data[6] = data[6] & 79 | 64;
|
|
1245
|
-
data[8] = data[8] & 191 | 128;
|
|
1246
|
-
var result = "";
|
|
1247
|
-
for (var offset = 0; offset < UUID_SIZE; ++offset) {
|
|
1248
|
-
var byte = data[offset];
|
|
1249
|
-
if (offset === 4 || offset === 6 || offset === 8) result += "-";
|
|
1250
|
-
if (byte < 16) result += "0";
|
|
1251
|
-
result += byte.toString(16).toLowerCase();
|
|
1252
|
-
}
|
|
1253
|
-
return result;
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
function MakeDictionary(obj) {
|
|
1257
|
-
obj.__ = void 0;
|
|
1258
|
-
delete obj.__;
|
|
1259
|
-
return obj;
|
|
1260
|
-
}
|
|
1261
|
-
});
|
|
1262
|
-
})(Reflect$1 || (Reflect$1 = {}));
|
|
1263
|
-
}) });
|
|
1264
|
-
|
|
1265
|
-
//#endregion
|
|
1266
|
-
//#region ../../node_modules/.pnpm/address@2.0.3/node_modules/address/dist/esm/address.js
|
|
1267
|
-
var import_Reflect = /* @__PURE__ */ __toESM(require_Reflect(), 1);
|
|
1268
|
-
|
|
1269
|
-
//#endregion
|
|
1270
|
-
//#region ../../node_modules/.pnpm/detect-port@2.1.0/node_modules/detect-port/dist/esm/detect-port.js
|
|
1271
|
-
const debug$6 = debuglog("detect-port");
|
|
1272
|
-
|
|
1273
|
-
//#endregion
|
|
1274
|
-
//#region ../../node_modules/.pnpm/detect-port@2.1.0/node_modules/detect-port/dist/esm/wait-port.js
|
|
1275
|
-
const debug$5 = debuglog("detect-port:wait-port");
|
|
1276
|
-
|
|
1277
|
-
//#endregion
|
|
1278
|
-
//#region ../../node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js
|
|
1279
|
-
var require_main = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js": ((exports, module) => {
|
|
1280
|
-
function _resolveEscapeSequences(value) {
|
|
1281
|
-
return value.replace(/\\\$/g, "$");
|
|
1282
|
-
}
|
|
1283
|
-
function expandValue(value, processEnv, runningParsed) {
|
|
1284
|
-
const env$1 = {
|
|
1285
|
-
...runningParsed,
|
|
1286
|
-
...processEnv
|
|
1287
|
-
};
|
|
1288
|
-
const regex = /(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g;
|
|
1289
|
-
let result = value;
|
|
1290
|
-
let match;
|
|
1291
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1292
|
-
while ((match = regex.exec(result)) !== null) {
|
|
1293
|
-
seen.add(result);
|
|
1294
|
-
const [template, bracedExpression, unbracedExpression] = match;
|
|
1295
|
-
const expression = bracedExpression || unbracedExpression;
|
|
1296
|
-
const opMatch = expression.match(/(:\+|\+|:-|-)/);
|
|
1297
|
-
const splitter = opMatch ? opMatch[0] : null;
|
|
1298
|
-
const r = expression.split(splitter);
|
|
1299
|
-
let defaultValue;
|
|
1300
|
-
let value$1;
|
|
1301
|
-
const key = r.shift();
|
|
1302
|
-
if ([":+", "+"].includes(splitter)) {
|
|
1303
|
-
defaultValue = env$1[key] ? r.join(splitter) : "";
|
|
1304
|
-
value$1 = null;
|
|
1305
|
-
} else {
|
|
1306
|
-
defaultValue = r.join(splitter);
|
|
1307
|
-
value$1 = env$1[key];
|
|
1308
|
-
}
|
|
1309
|
-
if (value$1) if (seen.has(value$1)) result = result.replace(template, defaultValue);
|
|
1310
|
-
else result = result.replace(template, value$1);
|
|
1311
|
-
else result = result.replace(template, defaultValue);
|
|
1312
|
-
if (result === runningParsed[key]) break;
|
|
1313
|
-
regex.lastIndex = 0;
|
|
1314
|
-
}
|
|
1315
|
-
return result;
|
|
1316
|
-
}
|
|
1317
|
-
function expand(options) {
|
|
1318
|
-
const runningParsed = {};
|
|
1319
|
-
let processEnv = process.env;
|
|
1320
|
-
if (options && options.processEnv != null) processEnv = options.processEnv;
|
|
1321
|
-
for (const key in options.parsed) {
|
|
1322
|
-
let value = options.parsed[key];
|
|
1323
|
-
if (processEnv[key] && processEnv[key] !== value) value = processEnv[key];
|
|
1324
|
-
else value = expandValue(value, processEnv, runningParsed);
|
|
1325
|
-
options.parsed[key] = _resolveEscapeSequences(value);
|
|
1326
|
-
runningParsed[key] = _resolveEscapeSequences(value);
|
|
1327
|
-
}
|
|
1328
|
-
for (const processKey in options.parsed) processEnv[processKey] = options.parsed[processKey];
|
|
1329
|
-
return options;
|
|
1330
|
-
}
|
|
1331
|
-
module.exports.expand = expand;
|
|
1332
|
-
}) });
|
|
1333
|
-
|
|
1334
|
-
//#endregion
|
|
1335
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
|
|
1336
|
-
var require_constants = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js": ((exports, module) => {
|
|
1337
|
-
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
1338
|
-
const MAX_LENGTH$2 = 256;
|
|
1339
|
-
const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
1340
|
-
const MAX_SAFE_COMPONENT_LENGTH$1 = 16;
|
|
1341
|
-
const MAX_SAFE_BUILD_LENGTH$1 = MAX_LENGTH$2 - 6;
|
|
1342
|
-
const RELEASE_TYPES = [
|
|
1343
|
-
"major",
|
|
1344
|
-
"premajor",
|
|
1345
|
-
"minor",
|
|
1346
|
-
"preminor",
|
|
1347
|
-
"patch",
|
|
1348
|
-
"prepatch",
|
|
1349
|
-
"prerelease"
|
|
1350
|
-
];
|
|
1351
|
-
module.exports = {
|
|
1352
|
-
MAX_LENGTH: MAX_LENGTH$2,
|
|
1353
|
-
MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH$1,
|
|
1354
|
-
MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH$1,
|
|
1355
|
-
MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,
|
|
1356
|
-
RELEASE_TYPES,
|
|
1357
|
-
SEMVER_SPEC_VERSION,
|
|
1358
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
1359
|
-
FLAG_LOOSE: 2
|
|
1360
|
-
};
|
|
1361
|
-
}) });
|
|
1362
|
-
|
|
1363
|
-
//#endregion
|
|
1364
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js
|
|
1365
|
-
var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js": ((exports, module) => {
|
|
1366
|
-
const debug$4 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
1367
|
-
module.exports = debug$4;
|
|
1368
|
-
}) });
|
|
1369
|
-
|
|
1370
|
-
//#endregion
|
|
1371
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js
|
|
1372
|
-
var require_re = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js": ((exports, module) => {
|
|
1373
|
-
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH: MAX_LENGTH$1 } = require_constants();
|
|
1374
|
-
const debug$3 = require_debug();
|
|
1375
|
-
exports = module.exports = {};
|
|
1376
|
-
const re$4 = exports.re = [];
|
|
1377
|
-
const safeRe = exports.safeRe = [];
|
|
1378
|
-
const src = exports.src = [];
|
|
1379
|
-
const safeSrc = exports.safeSrc = [];
|
|
1380
|
-
const t$4 = exports.t = {};
|
|
1381
|
-
let R = 0;
|
|
1382
|
-
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
1383
|
-
const safeRegexReplacements = [
|
|
1384
|
-
["\\s", 1],
|
|
1385
|
-
["\\d", MAX_LENGTH$1],
|
|
1386
|
-
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
1387
|
-
];
|
|
1388
|
-
const makeSafeRegex = (value) => {
|
|
1389
|
-
for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
1390
|
-
return value;
|
|
1391
|
-
};
|
|
1392
|
-
const createToken = (name, value, isGlobal) => {
|
|
1393
|
-
const safe = makeSafeRegex(value);
|
|
1394
|
-
const index = R++;
|
|
1395
|
-
debug$3(name, index, value);
|
|
1396
|
-
t$4[name] = index;
|
|
1397
|
-
src[index] = value;
|
|
1398
|
-
safeSrc[index] = safe;
|
|
1399
|
-
re$4[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
1400
|
-
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
1401
|
-
};
|
|
1402
|
-
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
1403
|
-
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
1404
|
-
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
1405
|
-
createToken("MAINVERSION", `(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})`);
|
|
1406
|
-
createToken("MAINVERSIONLOOSE", `(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})`);
|
|
1407
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIER]})`);
|
|
1408
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIERLOOSE]})`);
|
|
1409
|
-
createToken("PRERELEASE", `(?:-(${src[t$4.PRERELEASEIDENTIFIER]}(?:\\.${src[t$4.PRERELEASEIDENTIFIER]})*))`);
|
|
1410
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t$4.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t$4.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
1411
|
-
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
1412
|
-
createToken("BUILD", `(?:\\+(${src[t$4.BUILDIDENTIFIER]}(?:\\.${src[t$4.BUILDIDENTIFIER]})*))`);
|
|
1413
|
-
createToken("FULLPLAIN", `v?${src[t$4.MAINVERSION]}${src[t$4.PRERELEASE]}?${src[t$4.BUILD]}?`);
|
|
1414
|
-
createToken("FULL", `^${src[t$4.FULLPLAIN]}$`);
|
|
1415
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t$4.MAINVERSIONLOOSE]}${src[t$4.PRERELEASELOOSE]}?${src[t$4.BUILD]}?`);
|
|
1416
|
-
createToken("LOOSE", `^${src[t$4.LOOSEPLAIN]}$`);
|
|
1417
|
-
createToken("GTLT", "((?:<|>)?=?)");
|
|
1418
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t$4.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
1419
|
-
createToken("XRANGEIDENTIFIER", `${src[t$4.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
1420
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:${src[t$4.PRERELEASE]})?${src[t$4.BUILD]}?)?)?`);
|
|
1421
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:${src[t$4.PRERELEASELOOSE]})?${src[t$4.BUILD]}?)?)?`);
|
|
1422
|
-
createToken("XRANGE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAIN]}$`);
|
|
1423
|
-
createToken("XRANGELOOSE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAINLOOSE]}$`);
|
|
1424
|
-
createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
1425
|
-
createToken("COERCE", `${src[t$4.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
1426
|
-
createToken("COERCEFULL", src[t$4.COERCEPLAIN] + `(?:${src[t$4.PRERELEASE]})?(?:${src[t$4.BUILD]})?(?:$|[^\\d])`);
|
|
1427
|
-
createToken("COERCERTL", src[t$4.COERCE], true);
|
|
1428
|
-
createToken("COERCERTLFULL", src[t$4.COERCEFULL], true);
|
|
1429
|
-
createToken("LONETILDE", "(?:~>?)");
|
|
1430
|
-
createToken("TILDETRIM", `(\\s*)${src[t$4.LONETILDE]}\\s+`, true);
|
|
1431
|
-
exports.tildeTrimReplace = "$1~";
|
|
1432
|
-
createToken("TILDE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAIN]}$`);
|
|
1433
|
-
createToken("TILDELOOSE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAINLOOSE]}$`);
|
|
1434
|
-
createToken("LONECARET", "(?:\\^)");
|
|
1435
|
-
createToken("CARETTRIM", `(\\s*)${src[t$4.LONECARET]}\\s+`, true);
|
|
1436
|
-
exports.caretTrimReplace = "$1^";
|
|
1437
|
-
createToken("CARET", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAIN]}$`);
|
|
1438
|
-
createToken("CARETLOOSE", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAINLOOSE]}$`);
|
|
1439
|
-
createToken("COMPARATORLOOSE", `^${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]})$|^$`);
|
|
1440
|
-
createToken("COMPARATOR", `^${src[t$4.GTLT]}\\s*(${src[t$4.FULLPLAIN]})$|^$`);
|
|
1441
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]}|${src[t$4.XRANGEPLAIN]})`, true);
|
|
1442
|
-
exports.comparatorTrimReplace = "$1$2$3";
|
|
1443
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t$4.XRANGEPLAIN]})\\s+-\\s+(${src[t$4.XRANGEPLAIN]})\\s*$`);
|
|
1444
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t$4.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t$4.XRANGEPLAINLOOSE]})\\s*$`);
|
|
1445
|
-
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
1446
|
-
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
1447
|
-
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
1448
|
-
}) });
|
|
1449
|
-
|
|
1450
|
-
//#endregion
|
|
1451
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js
|
|
1452
|
-
var require_parse_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js": ((exports, module) => {
|
|
1453
|
-
const looseOption = Object.freeze({ loose: true });
|
|
1454
|
-
const emptyOpts = Object.freeze({});
|
|
1455
|
-
const parseOptions$3 = (options) => {
|
|
1456
|
-
if (!options) return emptyOpts;
|
|
1457
|
-
if (typeof options !== "object") return looseOption;
|
|
1458
|
-
return options;
|
|
1459
|
-
};
|
|
1460
|
-
module.exports = parseOptions$3;
|
|
1461
|
-
}) });
|
|
1462
|
-
|
|
1463
|
-
//#endregion
|
|
1464
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js
|
|
1465
|
-
var require_identifiers = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js": ((exports, module) => {
|
|
1466
|
-
const numeric = /^[0-9]+$/;
|
|
1467
|
-
const compareIdentifiers$1 = (a, b) => {
|
|
1468
|
-
const anum = numeric.test(a);
|
|
1469
|
-
const bnum = numeric.test(b);
|
|
1470
|
-
if (anum && bnum) {
|
|
1471
|
-
a = +a;
|
|
1472
|
-
b = +b;
|
|
1473
|
-
}
|
|
1474
|
-
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
1475
|
-
};
|
|
1476
|
-
const rcompareIdentifiers = (a, b) => compareIdentifiers$1(b, a);
|
|
1477
|
-
module.exports = {
|
|
1478
|
-
compareIdentifiers: compareIdentifiers$1,
|
|
1479
|
-
rcompareIdentifiers
|
|
1480
|
-
};
|
|
1481
|
-
}) });
|
|
1482
|
-
|
|
1483
|
-
//#endregion
|
|
1484
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js
|
|
1485
|
-
var require_semver$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js": ((exports, module) => {
|
|
1486
|
-
const debug$2 = require_debug();
|
|
1487
|
-
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
1488
|
-
const { safeRe: re$3, t: t$3 } = require_re();
|
|
1489
|
-
const parseOptions$2 = require_parse_options();
|
|
1490
|
-
const { compareIdentifiers } = require_identifiers();
|
|
1491
|
-
var SemVer$15 = class SemVer$15 {
|
|
1492
|
-
constructor(version, options) {
|
|
1493
|
-
options = parseOptions$2(options);
|
|
1494
|
-
if (version instanceof SemVer$15) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
1495
|
-
else version = version.version;
|
|
1496
|
-
else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
1497
|
-
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
1498
|
-
debug$2("SemVer", version, options);
|
|
1499
|
-
this.options = options;
|
|
1500
|
-
this.loose = !!options.loose;
|
|
1501
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
1502
|
-
const m = version.trim().match(options.loose ? re$3[t$3.LOOSE] : re$3[t$3.FULL]);
|
|
1503
|
-
if (!m) throw new TypeError(`Invalid Version: ${version}`);
|
|
1504
|
-
this.raw = version;
|
|
1505
|
-
this.major = +m[1];
|
|
1506
|
-
this.minor = +m[2];
|
|
1507
|
-
this.patch = +m[3];
|
|
1508
|
-
if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
|
|
1509
|
-
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
|
|
1510
|
-
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
|
|
1511
|
-
if (!m[4]) this.prerelease = [];
|
|
1512
|
-
else this.prerelease = m[4].split(".").map((id) => {
|
|
1513
|
-
if (/^[0-9]+$/.test(id)) {
|
|
1514
|
-
const num = +id;
|
|
1515
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
|
|
1516
|
-
}
|
|
1517
|
-
return id;
|
|
1518
|
-
});
|
|
1519
|
-
this.build = m[5] ? m[5].split(".") : [];
|
|
1520
|
-
this.format();
|
|
1521
|
-
}
|
|
1522
|
-
format() {
|
|
1523
|
-
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
1524
|
-
if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`;
|
|
1525
|
-
return this.version;
|
|
1526
|
-
}
|
|
1527
|
-
toString() {
|
|
1528
|
-
return this.version;
|
|
1529
|
-
}
|
|
1530
|
-
compare(other) {
|
|
1531
|
-
debug$2("SemVer.compare", this.version, this.options, other);
|
|
1532
|
-
if (!(other instanceof SemVer$15)) {
|
|
1533
|
-
if (typeof other === "string" && other === this.version) return 0;
|
|
1534
|
-
other = new SemVer$15(other, this.options);
|
|
1535
|
-
}
|
|
1536
|
-
if (other.version === this.version) return 0;
|
|
1537
|
-
return this.compareMain(other) || this.comparePre(other);
|
|
1538
|
-
}
|
|
1539
|
-
compareMain(other) {
|
|
1540
|
-
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
1541
|
-
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
1542
|
-
}
|
|
1543
|
-
comparePre(other) {
|
|
1544
|
-
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
1545
|
-
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
1546
|
-
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
1547
|
-
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
1548
|
-
let i = 0;
|
|
1549
|
-
do {
|
|
1550
|
-
const a = this.prerelease[i];
|
|
1551
|
-
const b = other.prerelease[i];
|
|
1552
|
-
debug$2("prerelease compare", i, a, b);
|
|
1553
|
-
if (a === void 0 && b === void 0) return 0;
|
|
1554
|
-
else if (b === void 0) return 1;
|
|
1555
|
-
else if (a === void 0) return -1;
|
|
1556
|
-
else if (a === b) continue;
|
|
1557
|
-
else return compareIdentifiers(a, b);
|
|
1558
|
-
} while (++i);
|
|
1559
|
-
}
|
|
1560
|
-
compareBuild(other) {
|
|
1561
|
-
if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
|
|
1562
|
-
let i = 0;
|
|
1563
|
-
do {
|
|
1564
|
-
const a = this.build[i];
|
|
1565
|
-
const b = other.build[i];
|
|
1566
|
-
debug$2("build compare", i, a, b);
|
|
1567
|
-
if (a === void 0 && b === void 0) return 0;
|
|
1568
|
-
else if (b === void 0) return 1;
|
|
1569
|
-
else if (a === void 0) return -1;
|
|
1570
|
-
else if (a === b) continue;
|
|
1571
|
-
else return compareIdentifiers(a, b);
|
|
1572
|
-
} while (++i);
|
|
1573
|
-
}
|
|
1574
|
-
inc(release, identifier, identifierBase) {
|
|
1575
|
-
if (release.startsWith("pre")) {
|
|
1576
|
-
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
1577
|
-
if (identifier) {
|
|
1578
|
-
const match = `-${identifier}`.match(this.options.loose ? re$3[t$3.PRERELEASELOOSE] : re$3[t$3.PRERELEASE]);
|
|
1579
|
-
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
switch (release) {
|
|
1583
|
-
case "premajor":
|
|
1584
|
-
this.prerelease.length = 0;
|
|
1585
|
-
this.patch = 0;
|
|
1586
|
-
this.minor = 0;
|
|
1587
|
-
this.major++;
|
|
1588
|
-
this.inc("pre", identifier, identifierBase);
|
|
1589
|
-
break;
|
|
1590
|
-
case "preminor":
|
|
1591
|
-
this.prerelease.length = 0;
|
|
1592
|
-
this.patch = 0;
|
|
1593
|
-
this.minor++;
|
|
1594
|
-
this.inc("pre", identifier, identifierBase);
|
|
1595
|
-
break;
|
|
1596
|
-
case "prepatch":
|
|
1597
|
-
this.prerelease.length = 0;
|
|
1598
|
-
this.inc("patch", identifier, identifierBase);
|
|
1599
|
-
this.inc("pre", identifier, identifierBase);
|
|
1600
|
-
break;
|
|
1601
|
-
case "prerelease":
|
|
1602
|
-
if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase);
|
|
1603
|
-
this.inc("pre", identifier, identifierBase);
|
|
1604
|
-
break;
|
|
1605
|
-
case "release":
|
|
1606
|
-
if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);
|
|
1607
|
-
this.prerelease.length = 0;
|
|
1608
|
-
break;
|
|
1609
|
-
case "major":
|
|
1610
|
-
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
|
|
1611
|
-
this.minor = 0;
|
|
1612
|
-
this.patch = 0;
|
|
1613
|
-
this.prerelease = [];
|
|
1614
|
-
break;
|
|
1615
|
-
case "minor":
|
|
1616
|
-
if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
|
|
1617
|
-
this.patch = 0;
|
|
1618
|
-
this.prerelease = [];
|
|
1619
|
-
break;
|
|
1620
|
-
case "patch":
|
|
1621
|
-
if (this.prerelease.length === 0) this.patch++;
|
|
1622
|
-
this.prerelease = [];
|
|
1623
|
-
break;
|
|
1624
|
-
case "pre": {
|
|
1625
|
-
const base = Number(identifierBase) ? 1 : 0;
|
|
1626
|
-
if (this.prerelease.length === 0) this.prerelease = [base];
|
|
1627
|
-
else {
|
|
1628
|
-
let i = this.prerelease.length;
|
|
1629
|
-
while (--i >= 0) if (typeof this.prerelease[i] === "number") {
|
|
1630
|
-
this.prerelease[i]++;
|
|
1631
|
-
i = -2;
|
|
1632
|
-
}
|
|
1633
|
-
if (i === -1) {
|
|
1634
|
-
if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists");
|
|
1635
|
-
this.prerelease.push(base);
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
if (identifier) {
|
|
1639
|
-
let prerelease$2 = [identifier, base];
|
|
1640
|
-
if (identifierBase === false) prerelease$2 = [identifier];
|
|
1641
|
-
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
1642
|
-
if (isNaN(this.prerelease[1])) this.prerelease = prerelease$2;
|
|
1643
|
-
} else this.prerelease = prerelease$2;
|
|
1644
|
-
}
|
|
1645
|
-
break;
|
|
1646
|
-
}
|
|
1647
|
-
default: throw new Error(`invalid increment argument: ${release}`);
|
|
1648
|
-
}
|
|
1649
|
-
this.raw = this.format();
|
|
1650
|
-
if (this.build.length) this.raw += `+${this.build.join(".")}`;
|
|
1651
|
-
return this;
|
|
1652
|
-
}
|
|
1653
|
-
};
|
|
1654
|
-
module.exports = SemVer$15;
|
|
1655
|
-
}) });
|
|
1656
|
-
|
|
1657
|
-
//#endregion
|
|
1658
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js
|
|
1659
|
-
var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js": ((exports, module) => {
|
|
1660
|
-
const SemVer$14 = require_semver$1();
|
|
1661
|
-
const parse$6 = (version, options, throwErrors = false) => {
|
|
1662
|
-
if (version instanceof SemVer$14) return version;
|
|
1663
|
-
try {
|
|
1664
|
-
return new SemVer$14(version, options);
|
|
1665
|
-
} catch (er) {
|
|
1666
|
-
if (!throwErrors) return null;
|
|
1667
|
-
throw er;
|
|
1668
|
-
}
|
|
1669
|
-
};
|
|
1670
|
-
module.exports = parse$6;
|
|
1671
|
-
}) });
|
|
1672
|
-
|
|
1673
|
-
//#endregion
|
|
1674
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js
|
|
1675
|
-
var require_valid$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js": ((exports, module) => {
|
|
1676
|
-
const parse$5 = require_parse();
|
|
1677
|
-
const valid$1 = (version, options) => {
|
|
1678
|
-
const v = parse$5(version, options);
|
|
1679
|
-
return v ? v.version : null;
|
|
1680
|
-
};
|
|
1681
|
-
module.exports = valid$1;
|
|
1682
|
-
}) });
|
|
1683
|
-
|
|
1684
|
-
//#endregion
|
|
1685
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js
|
|
1686
|
-
var require_clean = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js": ((exports, module) => {
|
|
1687
|
-
const parse$4 = require_parse();
|
|
1688
|
-
const clean$1 = (version, options) => {
|
|
1689
|
-
const s = parse$4(version.trim().replace(/^[=v]+/, ""), options);
|
|
1690
|
-
return s ? s.version : null;
|
|
1691
|
-
};
|
|
1692
|
-
module.exports = clean$1;
|
|
1693
|
-
}) });
|
|
1694
|
-
|
|
1695
|
-
//#endregion
|
|
1696
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js
|
|
1697
|
-
var require_inc = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js": ((exports, module) => {
|
|
1698
|
-
const SemVer$13 = require_semver$1();
|
|
1699
|
-
const inc$1 = (version, release, options, identifier, identifierBase) => {
|
|
1700
|
-
if (typeof options === "string") {
|
|
1701
|
-
identifierBase = identifier;
|
|
1702
|
-
identifier = options;
|
|
1703
|
-
options = void 0;
|
|
1704
|
-
}
|
|
1705
|
-
try {
|
|
1706
|
-
return new SemVer$13(version instanceof SemVer$13 ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
1707
|
-
} catch (er) {
|
|
1708
|
-
return null;
|
|
1709
|
-
}
|
|
1710
|
-
};
|
|
1711
|
-
module.exports = inc$1;
|
|
1712
|
-
}) });
|
|
1713
|
-
|
|
1714
|
-
//#endregion
|
|
1715
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js
|
|
1716
|
-
var require_diff = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js": ((exports, module) => {
|
|
1717
|
-
const parse$3 = require_parse();
|
|
1718
|
-
const diff$1 = (version1, version2) => {
|
|
1719
|
-
const v1 = parse$3(version1, null, true);
|
|
1720
|
-
const v2 = parse$3(version2, null, true);
|
|
1721
|
-
const comparison = v1.compare(v2);
|
|
1722
|
-
if (comparison === 0) return null;
|
|
1723
|
-
const v1Higher = comparison > 0;
|
|
1724
|
-
const highVersion = v1Higher ? v1 : v2;
|
|
1725
|
-
const lowVersion = v1Higher ? v2 : v1;
|
|
1726
|
-
const highHasPre = !!highVersion.prerelease.length;
|
|
1727
|
-
if (!!lowVersion.prerelease.length && !highHasPre) {
|
|
1728
|
-
if (!lowVersion.patch && !lowVersion.minor) return "major";
|
|
1729
|
-
if (lowVersion.compareMain(highVersion) === 0) {
|
|
1730
|
-
if (lowVersion.minor && !lowVersion.patch) return "minor";
|
|
1731
|
-
return "patch";
|
|
1732
|
-
}
|
|
1733
|
-
}
|
|
1734
|
-
const prefix = highHasPre ? "pre" : "";
|
|
1735
|
-
if (v1.major !== v2.major) return prefix + "major";
|
|
1736
|
-
if (v1.minor !== v2.minor) return prefix + "minor";
|
|
1737
|
-
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
1738
|
-
return "prerelease";
|
|
1739
|
-
};
|
|
1740
|
-
module.exports = diff$1;
|
|
1741
|
-
}) });
|
|
1742
|
-
|
|
1743
|
-
//#endregion
|
|
1744
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js
|
|
1745
|
-
var require_major = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js": ((exports, module) => {
|
|
1746
|
-
const SemVer$12 = require_semver$1();
|
|
1747
|
-
const major$1 = (a, loose) => new SemVer$12(a, loose).major;
|
|
1748
|
-
module.exports = major$1;
|
|
1749
|
-
}) });
|
|
1750
|
-
|
|
1751
|
-
//#endregion
|
|
1752
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js
|
|
1753
|
-
var require_minor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js": ((exports, module) => {
|
|
1754
|
-
const SemVer$11 = require_semver$1();
|
|
1755
|
-
const minor$1 = (a, loose) => new SemVer$11(a, loose).minor;
|
|
1756
|
-
module.exports = minor$1;
|
|
1757
|
-
}) });
|
|
1758
|
-
|
|
1759
|
-
//#endregion
|
|
1760
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js
|
|
1761
|
-
var require_patch = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js": ((exports, module) => {
|
|
1762
|
-
const SemVer$10 = require_semver$1();
|
|
1763
|
-
const patch$1 = (a, loose) => new SemVer$10(a, loose).patch;
|
|
1764
|
-
module.exports = patch$1;
|
|
1765
|
-
}) });
|
|
1766
|
-
|
|
1767
|
-
//#endregion
|
|
1768
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js
|
|
1769
|
-
var require_prerelease = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js": ((exports, module) => {
|
|
1770
|
-
const parse$2 = require_parse();
|
|
1771
|
-
const prerelease$1 = (version, options) => {
|
|
1772
|
-
const parsed = parse$2(version, options);
|
|
1773
|
-
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
1774
|
-
};
|
|
1775
|
-
module.exports = prerelease$1;
|
|
1776
|
-
}) });
|
|
1777
|
-
|
|
1778
|
-
//#endregion
|
|
1779
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js
|
|
1780
|
-
var require_compare = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js": ((exports, module) => {
|
|
1781
|
-
const SemVer$9 = require_semver$1();
|
|
1782
|
-
const compare$11 = (a, b, loose) => new SemVer$9(a, loose).compare(new SemVer$9(b, loose));
|
|
1783
|
-
module.exports = compare$11;
|
|
1784
|
-
}) });
|
|
1785
|
-
|
|
1786
|
-
//#endregion
|
|
1787
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js
|
|
1788
|
-
var require_rcompare = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js": ((exports, module) => {
|
|
1789
|
-
const compare$10 = require_compare();
|
|
1790
|
-
const rcompare$1 = (a, b, loose) => compare$10(b, a, loose);
|
|
1791
|
-
module.exports = rcompare$1;
|
|
1792
|
-
}) });
|
|
1793
|
-
|
|
1794
|
-
//#endregion
|
|
1795
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js
|
|
1796
|
-
var require_compare_loose = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js": ((exports, module) => {
|
|
1797
|
-
const compare$9 = require_compare();
|
|
1798
|
-
const compareLoose$1 = (a, b) => compare$9(a, b, true);
|
|
1799
|
-
module.exports = compareLoose$1;
|
|
1800
|
-
}) });
|
|
1801
|
-
|
|
1802
|
-
//#endregion
|
|
1803
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js
|
|
1804
|
-
var require_compare_build = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js": ((exports, module) => {
|
|
1805
|
-
const SemVer$8 = require_semver$1();
|
|
1806
|
-
const compareBuild$3 = (a, b, loose) => {
|
|
1807
|
-
const versionA = new SemVer$8(a, loose);
|
|
1808
|
-
const versionB = new SemVer$8(b, loose);
|
|
1809
|
-
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
1810
|
-
};
|
|
1811
|
-
module.exports = compareBuild$3;
|
|
1812
|
-
}) });
|
|
1813
|
-
|
|
1814
|
-
//#endregion
|
|
1815
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js
|
|
1816
|
-
var require_sort = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js": ((exports, module) => {
|
|
1817
|
-
const compareBuild$2 = require_compare_build();
|
|
1818
|
-
const sort$1 = (list, loose) => list.sort((a, b) => compareBuild$2(a, b, loose));
|
|
1819
|
-
module.exports = sort$1;
|
|
1820
|
-
}) });
|
|
1821
|
-
|
|
1822
|
-
//#endregion
|
|
1823
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js
|
|
1824
|
-
var require_rsort = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js": ((exports, module) => {
|
|
1825
|
-
const compareBuild$1 = require_compare_build();
|
|
1826
|
-
const rsort$1 = (list, loose) => list.sort((a, b) => compareBuild$1(b, a, loose));
|
|
1827
|
-
module.exports = rsort$1;
|
|
1828
|
-
}) });
|
|
1829
|
-
|
|
1830
|
-
//#endregion
|
|
1831
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js
|
|
1832
|
-
var require_gt = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js": ((exports, module) => {
|
|
1833
|
-
const compare$8 = require_compare();
|
|
1834
|
-
const gt$4 = (a, b, loose) => compare$8(a, b, loose) > 0;
|
|
1835
|
-
module.exports = gt$4;
|
|
1836
|
-
}) });
|
|
1837
|
-
|
|
1838
|
-
//#endregion
|
|
1839
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js
|
|
1840
|
-
var require_lt = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js": ((exports, module) => {
|
|
1841
|
-
const compare$7 = require_compare();
|
|
1842
|
-
const lt$3 = (a, b, loose) => compare$7(a, b, loose) < 0;
|
|
1843
|
-
module.exports = lt$3;
|
|
1844
|
-
}) });
|
|
1845
|
-
|
|
1846
|
-
//#endregion
|
|
1847
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js
|
|
1848
|
-
var require_eq = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js": ((exports, module) => {
|
|
1849
|
-
const compare$6 = require_compare();
|
|
1850
|
-
const eq$2 = (a, b, loose) => compare$6(a, b, loose) === 0;
|
|
1851
|
-
module.exports = eq$2;
|
|
1852
|
-
}) });
|
|
1853
|
-
|
|
1854
|
-
//#endregion
|
|
1855
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js
|
|
1856
|
-
var require_neq = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js": ((exports, module) => {
|
|
1857
|
-
const compare$5 = require_compare();
|
|
1858
|
-
const neq$2 = (a, b, loose) => compare$5(a, b, loose) !== 0;
|
|
1859
|
-
module.exports = neq$2;
|
|
1860
|
-
}) });
|
|
1861
|
-
|
|
1862
|
-
//#endregion
|
|
1863
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js
|
|
1864
|
-
var require_gte = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js": ((exports, module) => {
|
|
1865
|
-
const compare$4 = require_compare();
|
|
1866
|
-
const gte$3 = (a, b, loose) => compare$4(a, b, loose) >= 0;
|
|
1867
|
-
module.exports = gte$3;
|
|
1868
|
-
}) });
|
|
1869
|
-
|
|
1870
|
-
//#endregion
|
|
1871
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js
|
|
1872
|
-
var require_lte = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js": ((exports, module) => {
|
|
1873
|
-
const compare$3 = require_compare();
|
|
1874
|
-
const lte$3 = (a, b, loose) => compare$3(a, b, loose) <= 0;
|
|
1875
|
-
module.exports = lte$3;
|
|
1876
|
-
}) });
|
|
1877
|
-
|
|
1878
|
-
//#endregion
|
|
1879
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js
|
|
1880
|
-
var require_cmp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js": ((exports, module) => {
|
|
1881
|
-
const eq$1 = require_eq();
|
|
1882
|
-
const neq$1 = require_neq();
|
|
1883
|
-
const gt$3 = require_gt();
|
|
1884
|
-
const gte$2 = require_gte();
|
|
1885
|
-
const lt$2 = require_lt();
|
|
1886
|
-
const lte$2 = require_lte();
|
|
1887
|
-
const cmp$2 = (a, op, b, loose) => {
|
|
1888
|
-
switch (op) {
|
|
1889
|
-
case "===":
|
|
1890
|
-
if (typeof a === "object") a = a.version;
|
|
1891
|
-
if (typeof b === "object") b = b.version;
|
|
1892
|
-
return a === b;
|
|
1893
|
-
case "!==":
|
|
1894
|
-
if (typeof a === "object") a = a.version;
|
|
1895
|
-
if (typeof b === "object") b = b.version;
|
|
1896
|
-
return a !== b;
|
|
1897
|
-
case "":
|
|
1898
|
-
case "=":
|
|
1899
|
-
case "==": return eq$1(a, b, loose);
|
|
1900
|
-
case "!=": return neq$1(a, b, loose);
|
|
1901
|
-
case ">": return gt$3(a, b, loose);
|
|
1902
|
-
case ">=": return gte$2(a, b, loose);
|
|
1903
|
-
case "<": return lt$2(a, b, loose);
|
|
1904
|
-
case "<=": return lte$2(a, b, loose);
|
|
1905
|
-
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
1906
|
-
}
|
|
1907
|
-
};
|
|
1908
|
-
module.exports = cmp$2;
|
|
1909
|
-
}) });
|
|
1910
|
-
|
|
1911
|
-
//#endregion
|
|
1912
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js
|
|
1913
|
-
var require_coerce = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js": ((exports, module) => {
|
|
1914
|
-
const SemVer$7 = require_semver$1();
|
|
1915
|
-
const parse$1 = require_parse();
|
|
1916
|
-
const { safeRe: re$2, t: t$2 } = require_re();
|
|
1917
|
-
const coerce$1 = (version, options) => {
|
|
1918
|
-
if (version instanceof SemVer$7) return version;
|
|
1919
|
-
if (typeof version === "number") version = String(version);
|
|
1920
|
-
if (typeof version !== "string") return null;
|
|
1921
|
-
options = options || {};
|
|
1922
|
-
let match = null;
|
|
1923
|
-
if (!options.rtl) match = version.match(options.includePrerelease ? re$2[t$2.COERCEFULL] : re$2[t$2.COERCE]);
|
|
1924
|
-
else {
|
|
1925
|
-
const coerceRtlRegex = options.includePrerelease ? re$2[t$2.COERCERTLFULL] : re$2[t$2.COERCERTL];
|
|
1926
|
-
let next;
|
|
1927
|
-
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
1928
|
-
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
1929
|
-
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
1930
|
-
}
|
|
1931
|
-
coerceRtlRegex.lastIndex = -1;
|
|
1932
|
-
}
|
|
1933
|
-
if (match === null) return null;
|
|
1934
|
-
const major$2 = match[2];
|
|
1935
|
-
const minor$2 = match[3] || "0";
|
|
1936
|
-
const patch$2 = match[4] || "0";
|
|
1937
|
-
const prerelease$2 = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
1938
|
-
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
1939
|
-
return parse$1(`${major$2}.${minor$2}.${patch$2}${prerelease$2}${build}`, options);
|
|
1940
|
-
};
|
|
1941
|
-
module.exports = coerce$1;
|
|
1942
|
-
}) });
|
|
1943
|
-
|
|
1944
|
-
//#endregion
|
|
1945
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js
|
|
1946
|
-
var require_lrucache = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js": ((exports, module) => {
|
|
1947
|
-
var LRUCache = class {
|
|
1948
|
-
constructor() {
|
|
1949
|
-
this.max = 1e3;
|
|
1950
|
-
this.map = /* @__PURE__ */ new Map();
|
|
1951
|
-
}
|
|
1952
|
-
get(key) {
|
|
1953
|
-
const value = this.map.get(key);
|
|
1954
|
-
if (value === void 0) return;
|
|
1955
|
-
else {
|
|
1956
|
-
this.map.delete(key);
|
|
1957
|
-
this.map.set(key, value);
|
|
1958
|
-
return value;
|
|
1959
|
-
}
|
|
1960
|
-
}
|
|
1961
|
-
delete(key) {
|
|
1962
|
-
return this.map.delete(key);
|
|
1963
|
-
}
|
|
1964
|
-
set(key, value) {
|
|
1965
|
-
if (!this.delete(key) && value !== void 0) {
|
|
1966
|
-
if (this.map.size >= this.max) {
|
|
1967
|
-
const firstKey = this.map.keys().next().value;
|
|
1968
|
-
this.delete(firstKey);
|
|
1969
|
-
}
|
|
1970
|
-
this.map.set(key, value);
|
|
1971
|
-
}
|
|
1972
|
-
return this;
|
|
1973
|
-
}
|
|
1974
|
-
};
|
|
1975
|
-
module.exports = LRUCache;
|
|
1976
|
-
}) });
|
|
1977
|
-
|
|
1978
|
-
//#endregion
|
|
1979
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js
|
|
1980
|
-
var require_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js": ((exports, module) => {
|
|
1981
|
-
const SPACE_CHARACTERS = /\s+/g;
|
|
1982
|
-
var Range$11 = class Range$11 {
|
|
1983
|
-
constructor(range, options) {
|
|
1984
|
-
options = parseOptions$1(options);
|
|
1985
|
-
if (range instanceof Range$11) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
|
|
1986
|
-
else return new Range$11(range.raw, options);
|
|
1987
|
-
if (range instanceof Comparator$4) {
|
|
1988
|
-
this.raw = range.value;
|
|
1989
|
-
this.set = [[range]];
|
|
1990
|
-
this.formatted = void 0;
|
|
1991
|
-
return this;
|
|
1992
|
-
}
|
|
1993
|
-
this.options = options;
|
|
1994
|
-
this.loose = !!options.loose;
|
|
1995
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
1996
|
-
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
1997
|
-
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
1998
|
-
if (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
1999
|
-
if (this.set.length > 1) {
|
|
2000
|
-
const first = this.set[0];
|
|
2001
|
-
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
2002
|
-
if (this.set.length === 0) this.set = [first];
|
|
2003
|
-
else if (this.set.length > 1) {
|
|
2004
|
-
for (const c of this.set) if (c.length === 1 && isAny(c[0])) {
|
|
2005
|
-
this.set = [c];
|
|
2006
|
-
break;
|
|
2007
|
-
}
|
|
2008
|
-
}
|
|
2009
|
-
}
|
|
2010
|
-
this.formatted = void 0;
|
|
2011
|
-
}
|
|
2012
|
-
get range() {
|
|
2013
|
-
if (this.formatted === void 0) {
|
|
2014
|
-
this.formatted = "";
|
|
2015
|
-
for (let i = 0; i < this.set.length; i++) {
|
|
2016
|
-
if (i > 0) this.formatted += "||";
|
|
2017
|
-
const comps = this.set[i];
|
|
2018
|
-
for (let k = 0; k < comps.length; k++) {
|
|
2019
|
-
if (k > 0) this.formatted += " ";
|
|
2020
|
-
this.formatted += comps[k].toString().trim();
|
|
2021
|
-
}
|
|
2022
|
-
}
|
|
2023
|
-
}
|
|
2024
|
-
return this.formatted;
|
|
2025
|
-
}
|
|
2026
|
-
format() {
|
|
2027
|
-
return this.range;
|
|
2028
|
-
}
|
|
2029
|
-
toString() {
|
|
2030
|
-
return this.range;
|
|
2031
|
-
}
|
|
2032
|
-
parseRange(range) {
|
|
2033
|
-
const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range;
|
|
2034
|
-
const cached = cache.get(memoKey);
|
|
2035
|
-
if (cached) return cached;
|
|
2036
|
-
const loose = this.options.loose;
|
|
2037
|
-
const hr = loose ? re$1[t$1.HYPHENRANGELOOSE] : re$1[t$1.HYPHENRANGE];
|
|
2038
|
-
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
2039
|
-
debug$1("hyphen replace", range);
|
|
2040
|
-
range = range.replace(re$1[t$1.COMPARATORTRIM], comparatorTrimReplace);
|
|
2041
|
-
debug$1("comparator trim", range);
|
|
2042
|
-
range = range.replace(re$1[t$1.TILDETRIM], tildeTrimReplace);
|
|
2043
|
-
debug$1("tilde trim", range);
|
|
2044
|
-
range = range.replace(re$1[t$1.CARETTRIM], caretTrimReplace);
|
|
2045
|
-
debug$1("caret trim", range);
|
|
2046
|
-
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
2047
|
-
if (loose) rangeList = rangeList.filter((comp) => {
|
|
2048
|
-
debug$1("loose invalid filter", comp, this.options);
|
|
2049
|
-
return !!comp.match(re$1[t$1.COMPARATORLOOSE]);
|
|
2050
|
-
});
|
|
2051
|
-
debug$1("range list", rangeList);
|
|
2052
|
-
const rangeMap = /* @__PURE__ */ new Map();
|
|
2053
|
-
const comparators = rangeList.map((comp) => new Comparator$4(comp, this.options));
|
|
2054
|
-
for (const comp of comparators) {
|
|
2055
|
-
if (isNullSet(comp)) return [comp];
|
|
2056
|
-
rangeMap.set(comp.value, comp);
|
|
2057
|
-
}
|
|
2058
|
-
if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete("");
|
|
2059
|
-
const result = [...rangeMap.values()];
|
|
2060
|
-
cache.set(memoKey, result);
|
|
2061
|
-
return result;
|
|
2062
|
-
}
|
|
2063
|
-
intersects(range, options) {
|
|
2064
|
-
if (!(range instanceof Range$11)) throw new TypeError("a Range is required");
|
|
2065
|
-
return this.set.some((thisComparators) => {
|
|
2066
|
-
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
2067
|
-
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
2068
|
-
return rangeComparators.every((rangeComparator) => {
|
|
2069
|
-
return thisComparator.intersects(rangeComparator, options);
|
|
2070
|
-
});
|
|
2071
|
-
});
|
|
2072
|
-
});
|
|
2073
|
-
});
|
|
2074
|
-
}
|
|
2075
|
-
test(version) {
|
|
2076
|
-
if (!version) return false;
|
|
2077
|
-
if (typeof version === "string") try {
|
|
2078
|
-
version = new SemVer$6(version, this.options);
|
|
2079
|
-
} catch (er) {
|
|
2080
|
-
return false;
|
|
2081
|
-
}
|
|
2082
|
-
for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true;
|
|
2083
|
-
return false;
|
|
2084
|
-
}
|
|
2085
|
-
};
|
|
2086
|
-
module.exports = Range$11;
|
|
2087
|
-
const cache = new (require_lrucache())();
|
|
2088
|
-
const parseOptions$1 = require_parse_options();
|
|
2089
|
-
const Comparator$4 = require_comparator();
|
|
2090
|
-
const debug$1 = require_debug();
|
|
2091
|
-
const SemVer$6 = require_semver$1();
|
|
2092
|
-
const { safeRe: re$1, t: t$1, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
2093
|
-
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
2094
|
-
const isNullSet = (c) => c.value === "<0.0.0-0";
|
|
2095
|
-
const isAny = (c) => c.value === "";
|
|
2096
|
-
const isSatisfiable = (comparators, options) => {
|
|
2097
|
-
let result = true;
|
|
2098
|
-
const remainingComparators = comparators.slice();
|
|
2099
|
-
let testComparator = remainingComparators.pop();
|
|
2100
|
-
while (result && remainingComparators.length) {
|
|
2101
|
-
result = remainingComparators.every((otherComparator) => {
|
|
2102
|
-
return testComparator.intersects(otherComparator, options);
|
|
2103
|
-
});
|
|
2104
|
-
testComparator = remainingComparators.pop();
|
|
2105
|
-
}
|
|
2106
|
-
return result;
|
|
2107
|
-
};
|
|
2108
|
-
const parseComparator = (comp, options) => {
|
|
2109
|
-
debug$1("comp", comp, options);
|
|
2110
|
-
comp = replaceCarets(comp, options);
|
|
2111
|
-
debug$1("caret", comp);
|
|
2112
|
-
comp = replaceTildes(comp, options);
|
|
2113
|
-
debug$1("tildes", comp);
|
|
2114
|
-
comp = replaceXRanges(comp, options);
|
|
2115
|
-
debug$1("xrange", comp);
|
|
2116
|
-
comp = replaceStars(comp, options);
|
|
2117
|
-
debug$1("stars", comp);
|
|
2118
|
-
return comp;
|
|
2119
|
-
};
|
|
2120
|
-
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
2121
|
-
const replaceTildes = (comp, options) => {
|
|
2122
|
-
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
2123
|
-
};
|
|
2124
|
-
const replaceTilde = (comp, options) => {
|
|
2125
|
-
const r = options.loose ? re$1[t$1.TILDELOOSE] : re$1[t$1.TILDE];
|
|
2126
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
2127
|
-
debug$1("tilde", comp, _, M, m, p, pr);
|
|
2128
|
-
let ret;
|
|
2129
|
-
if (isX(M)) ret = "";
|
|
2130
|
-
else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
2131
|
-
else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
2132
|
-
else if (pr) {
|
|
2133
|
-
debug$1("replaceTilde pr", pr);
|
|
2134
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
2135
|
-
} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
2136
|
-
debug$1("tilde return", ret);
|
|
2137
|
-
return ret;
|
|
2138
|
-
});
|
|
2139
|
-
};
|
|
2140
|
-
const replaceCarets = (comp, options) => {
|
|
2141
|
-
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
2142
|
-
};
|
|
2143
|
-
const replaceCaret = (comp, options) => {
|
|
2144
|
-
debug$1("caret", comp, options);
|
|
2145
|
-
const r = options.loose ? re$1[t$1.CARETLOOSE] : re$1[t$1.CARET];
|
|
2146
|
-
const z = options.includePrerelease ? "-0" : "";
|
|
2147
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
2148
|
-
debug$1("caret", comp, _, M, m, p, pr);
|
|
2149
|
-
let ret;
|
|
2150
|
-
if (isX(M)) ret = "";
|
|
2151
|
-
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
2152
|
-
else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
2153
|
-
else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
2154
|
-
else if (pr) {
|
|
2155
|
-
debug$1("replaceCaret pr", pr);
|
|
2156
|
-
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
2157
|
-
else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
2158
|
-
else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
2159
|
-
} else {
|
|
2160
|
-
debug$1("no pr");
|
|
2161
|
-
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
2162
|
-
else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
2163
|
-
else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
2164
|
-
}
|
|
2165
|
-
debug$1("caret return", ret);
|
|
2166
|
-
return ret;
|
|
2167
|
-
});
|
|
2168
|
-
};
|
|
2169
|
-
const replaceXRanges = (comp, options) => {
|
|
2170
|
-
debug$1("replaceXRanges", comp, options);
|
|
2171
|
-
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
2172
|
-
};
|
|
2173
|
-
const replaceXRange = (comp, options) => {
|
|
2174
|
-
comp = comp.trim();
|
|
2175
|
-
const r = options.loose ? re$1[t$1.XRANGELOOSE] : re$1[t$1.XRANGE];
|
|
2176
|
-
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
2177
|
-
debug$1("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
2178
|
-
const xM = isX(M);
|
|
2179
|
-
const xm = xM || isX(m);
|
|
2180
|
-
const xp = xm || isX(p);
|
|
2181
|
-
const anyX = xp;
|
|
2182
|
-
if (gtlt === "=" && anyX) gtlt = "";
|
|
2183
|
-
pr = options.includePrerelease ? "-0" : "";
|
|
2184
|
-
if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
|
|
2185
|
-
else ret = "*";
|
|
2186
|
-
else if (gtlt && anyX) {
|
|
2187
|
-
if (xm) m = 0;
|
|
2188
|
-
p = 0;
|
|
2189
|
-
if (gtlt === ">") {
|
|
2190
|
-
gtlt = ">=";
|
|
2191
|
-
if (xm) {
|
|
2192
|
-
M = +M + 1;
|
|
2193
|
-
m = 0;
|
|
2194
|
-
p = 0;
|
|
2195
|
-
} else {
|
|
2196
|
-
m = +m + 1;
|
|
2197
|
-
p = 0;
|
|
2198
|
-
}
|
|
2199
|
-
} else if (gtlt === "<=") {
|
|
2200
|
-
gtlt = "<";
|
|
2201
|
-
if (xm) M = +M + 1;
|
|
2202
|
-
else m = +m + 1;
|
|
2203
|
-
}
|
|
2204
|
-
if (gtlt === "<") pr = "-0";
|
|
2205
|
-
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
2206
|
-
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
2207
|
-
else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
2208
|
-
debug$1("xRange return", ret);
|
|
2209
|
-
return ret;
|
|
2210
|
-
});
|
|
2211
|
-
};
|
|
2212
|
-
const replaceStars = (comp, options) => {
|
|
2213
|
-
debug$1("replaceStars", comp, options);
|
|
2214
|
-
return comp.trim().replace(re$1[t$1.STAR], "");
|
|
2215
|
-
};
|
|
2216
|
-
const replaceGTE0 = (comp, options) => {
|
|
2217
|
-
debug$1("replaceGTE0", comp, options);
|
|
2218
|
-
return comp.trim().replace(re$1[options.includePrerelease ? t$1.GTE0PRE : t$1.GTE0], "");
|
|
2219
|
-
};
|
|
2220
|
-
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
2221
|
-
if (isX(fM)) from = "";
|
|
2222
|
-
else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
2223
|
-
else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
2224
|
-
else if (fpr) from = `>=${from}`;
|
|
2225
|
-
else from = `>=${from}${incPr ? "-0" : ""}`;
|
|
2226
|
-
if (isX(tM)) to = "";
|
|
2227
|
-
else if (isX(tm)) to = `<${+tM + 1}.0.0-0`;
|
|
2228
|
-
else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;
|
|
2229
|
-
else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
2230
|
-
else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
2231
|
-
else to = `<=${to}`;
|
|
2232
|
-
return `${from} ${to}`.trim();
|
|
2233
|
-
};
|
|
2234
|
-
const testSet = (set, version, options) => {
|
|
2235
|
-
for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
|
|
2236
|
-
if (version.prerelease.length && !options.includePrerelease) {
|
|
2237
|
-
for (let i = 0; i < set.length; i++) {
|
|
2238
|
-
debug$1(set[i].semver);
|
|
2239
|
-
if (set[i].semver === Comparator$4.ANY) continue;
|
|
2240
|
-
if (set[i].semver.prerelease.length > 0) {
|
|
2241
|
-
const allowed = set[i].semver;
|
|
2242
|
-
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
|
|
2243
|
-
}
|
|
2244
|
-
}
|
|
2245
|
-
return false;
|
|
2246
|
-
}
|
|
2247
|
-
return true;
|
|
2248
|
-
};
|
|
2249
|
-
}) });
|
|
2250
|
-
|
|
2251
|
-
//#endregion
|
|
2252
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js
|
|
2253
|
-
var require_comparator = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js": ((exports, module) => {
|
|
2254
|
-
const ANY$2 = Symbol("SemVer ANY");
|
|
2255
|
-
var Comparator$3 = class Comparator$3 {
|
|
2256
|
-
static get ANY() {
|
|
2257
|
-
return ANY$2;
|
|
2258
|
-
}
|
|
2259
|
-
constructor(comp, options) {
|
|
2260
|
-
options = parseOptions(options);
|
|
2261
|
-
if (comp instanceof Comparator$3) if (comp.loose === !!options.loose) return comp;
|
|
2262
|
-
else comp = comp.value;
|
|
2263
|
-
comp = comp.trim().split(/\s+/).join(" ");
|
|
2264
|
-
debug("comparator", comp, options);
|
|
2265
|
-
this.options = options;
|
|
2266
|
-
this.loose = !!options.loose;
|
|
2267
|
-
this.parse(comp);
|
|
2268
|
-
if (this.semver === ANY$2) this.value = "";
|
|
2269
|
-
else this.value = this.operator + this.semver.version;
|
|
2270
|
-
debug("comp", this);
|
|
2271
|
-
}
|
|
2272
|
-
parse(comp) {
|
|
2273
|
-
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
2274
|
-
const m = comp.match(r);
|
|
2275
|
-
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
2276
|
-
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
2277
|
-
if (this.operator === "=") this.operator = "";
|
|
2278
|
-
if (!m[2]) this.semver = ANY$2;
|
|
2279
|
-
else this.semver = new SemVer$5(m[2], this.options.loose);
|
|
2280
|
-
}
|
|
2281
|
-
toString() {
|
|
2282
|
-
return this.value;
|
|
2283
|
-
}
|
|
2284
|
-
test(version) {
|
|
2285
|
-
debug("Comparator.test", version, this.options.loose);
|
|
2286
|
-
if (this.semver === ANY$2 || version === ANY$2) return true;
|
|
2287
|
-
if (typeof version === "string") try {
|
|
2288
|
-
version = new SemVer$5(version, this.options);
|
|
2289
|
-
} catch (er) {
|
|
2290
|
-
return false;
|
|
2291
|
-
}
|
|
2292
|
-
return cmp$1(version, this.operator, this.semver, this.options);
|
|
2293
|
-
}
|
|
2294
|
-
intersects(comp, options) {
|
|
2295
|
-
if (!(comp instanceof Comparator$3)) throw new TypeError("a Comparator is required");
|
|
2296
|
-
if (this.operator === "") {
|
|
2297
|
-
if (this.value === "") return true;
|
|
2298
|
-
return new Range$10(comp.value, options).test(this.value);
|
|
2299
|
-
} else if (comp.operator === "") {
|
|
2300
|
-
if (comp.value === "") return true;
|
|
2301
|
-
return new Range$10(this.value, options).test(comp.semver);
|
|
2302
|
-
}
|
|
2303
|
-
options = parseOptions(options);
|
|
2304
|
-
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
2305
|
-
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false;
|
|
2306
|
-
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
2307
|
-
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
2308
|
-
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
2309
|
-
if (cmp$1(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
2310
|
-
if (cmp$1(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
2311
|
-
return false;
|
|
2312
|
-
}
|
|
2313
|
-
};
|
|
2314
|
-
module.exports = Comparator$3;
|
|
2315
|
-
const parseOptions = require_parse_options();
|
|
2316
|
-
const { safeRe: re, t } = require_re();
|
|
2317
|
-
const cmp$1 = require_cmp();
|
|
2318
|
-
const debug = require_debug();
|
|
2319
|
-
const SemVer$5 = require_semver$1();
|
|
2320
|
-
const Range$10 = require_range();
|
|
2321
|
-
}) });
|
|
2322
|
-
|
|
2323
|
-
//#endregion
|
|
2324
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js
|
|
2325
|
-
var require_satisfies = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js": ((exports, module) => {
|
|
2326
|
-
const Range$9 = require_range();
|
|
2327
|
-
const satisfies$4 = (version, range, options) => {
|
|
2328
|
-
try {
|
|
2329
|
-
range = new Range$9(range, options);
|
|
2330
|
-
} catch (er) {
|
|
2331
|
-
return false;
|
|
2332
|
-
}
|
|
2333
|
-
return range.test(version);
|
|
2334
|
-
};
|
|
2335
|
-
module.exports = satisfies$4;
|
|
2336
|
-
}) });
|
|
2337
|
-
|
|
2338
|
-
//#endregion
|
|
2339
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js
|
|
2340
|
-
var require_to_comparators = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js": ((exports, module) => {
|
|
2341
|
-
const Range$8 = require_range();
|
|
2342
|
-
const toComparators$1 = (range, options) => new Range$8(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
2343
|
-
module.exports = toComparators$1;
|
|
2344
|
-
}) });
|
|
2345
|
-
|
|
2346
|
-
//#endregion
|
|
2347
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js
|
|
2348
|
-
var require_max_satisfying = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js": ((exports, module) => {
|
|
2349
|
-
const SemVer$4 = require_semver$1();
|
|
2350
|
-
const Range$7 = require_range();
|
|
2351
|
-
const maxSatisfying$1 = (versions, range, options) => {
|
|
2352
|
-
let max = null;
|
|
2353
|
-
let maxSV = null;
|
|
2354
|
-
let rangeObj = null;
|
|
2355
|
-
try {
|
|
2356
|
-
rangeObj = new Range$7(range, options);
|
|
2357
|
-
} catch (er) {
|
|
2358
|
-
return null;
|
|
2359
|
-
}
|
|
2360
|
-
versions.forEach((v) => {
|
|
2361
|
-
if (rangeObj.test(v)) {
|
|
2362
|
-
if (!max || maxSV.compare(v) === -1) {
|
|
2363
|
-
max = v;
|
|
2364
|
-
maxSV = new SemVer$4(max, options);
|
|
2365
|
-
}
|
|
2366
|
-
}
|
|
2367
|
-
});
|
|
2368
|
-
return max;
|
|
2369
|
-
};
|
|
2370
|
-
module.exports = maxSatisfying$1;
|
|
2371
|
-
}) });
|
|
2372
|
-
|
|
2373
|
-
//#endregion
|
|
2374
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js
|
|
2375
|
-
var require_min_satisfying = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js": ((exports, module) => {
|
|
2376
|
-
const SemVer$3 = require_semver$1();
|
|
2377
|
-
const Range$6 = require_range();
|
|
2378
|
-
const minSatisfying$1 = (versions, range, options) => {
|
|
2379
|
-
let min = null;
|
|
2380
|
-
let minSV = null;
|
|
2381
|
-
let rangeObj = null;
|
|
2382
|
-
try {
|
|
2383
|
-
rangeObj = new Range$6(range, options);
|
|
2384
|
-
} catch (er) {
|
|
2385
|
-
return null;
|
|
2386
|
-
}
|
|
2387
|
-
versions.forEach((v) => {
|
|
2388
|
-
if (rangeObj.test(v)) {
|
|
2389
|
-
if (!min || minSV.compare(v) === 1) {
|
|
2390
|
-
min = v;
|
|
2391
|
-
minSV = new SemVer$3(min, options);
|
|
2392
|
-
}
|
|
2393
|
-
}
|
|
2394
|
-
});
|
|
2395
|
-
return min;
|
|
2396
|
-
};
|
|
2397
|
-
module.exports = minSatisfying$1;
|
|
2398
|
-
}) });
|
|
2399
|
-
|
|
2400
|
-
//#endregion
|
|
2401
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js
|
|
2402
|
-
var require_min_version = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js": ((exports, module) => {
|
|
2403
|
-
const SemVer$2 = require_semver$1();
|
|
2404
|
-
const Range$5 = require_range();
|
|
2405
|
-
const gt$2 = require_gt();
|
|
2406
|
-
const minVersion$1 = (range, loose) => {
|
|
2407
|
-
range = new Range$5(range, loose);
|
|
2408
|
-
let minver = new SemVer$2("0.0.0");
|
|
2409
|
-
if (range.test(minver)) return minver;
|
|
2410
|
-
minver = new SemVer$2("0.0.0-0");
|
|
2411
|
-
if (range.test(minver)) return minver;
|
|
2412
|
-
minver = null;
|
|
2413
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
2414
|
-
const comparators = range.set[i];
|
|
2415
|
-
let setMin = null;
|
|
2416
|
-
comparators.forEach((comparator) => {
|
|
2417
|
-
const compver = new SemVer$2(comparator.semver.version);
|
|
2418
|
-
switch (comparator.operator) {
|
|
2419
|
-
case ">":
|
|
2420
|
-
if (compver.prerelease.length === 0) compver.patch++;
|
|
2421
|
-
else compver.prerelease.push(0);
|
|
2422
|
-
compver.raw = compver.format();
|
|
2423
|
-
case "":
|
|
2424
|
-
case ">=":
|
|
2425
|
-
if (!setMin || gt$2(compver, setMin)) setMin = compver;
|
|
2426
|
-
break;
|
|
2427
|
-
case "<":
|
|
2428
|
-
case "<=": break;
|
|
2429
|
-
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
2430
|
-
}
|
|
2431
|
-
});
|
|
2432
|
-
if (setMin && (!minver || gt$2(minver, setMin))) minver = setMin;
|
|
2433
|
-
}
|
|
2434
|
-
if (minver && range.test(minver)) return minver;
|
|
2435
|
-
return null;
|
|
2436
|
-
};
|
|
2437
|
-
module.exports = minVersion$1;
|
|
2438
|
-
}) });
|
|
2439
|
-
|
|
2440
|
-
//#endregion
|
|
2441
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js
|
|
2442
|
-
var require_valid = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js": ((exports, module) => {
|
|
2443
|
-
const Range$4 = require_range();
|
|
2444
|
-
const validRange$1 = (range, options) => {
|
|
2445
|
-
try {
|
|
2446
|
-
return new Range$4(range, options).range || "*";
|
|
2447
|
-
} catch (er) {
|
|
2448
|
-
return null;
|
|
2449
|
-
}
|
|
2450
|
-
};
|
|
2451
|
-
module.exports = validRange$1;
|
|
2452
|
-
}) });
|
|
2453
|
-
|
|
2454
|
-
//#endregion
|
|
2455
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js
|
|
2456
|
-
var require_outside = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js": ((exports, module) => {
|
|
2457
|
-
const SemVer$1 = require_semver$1();
|
|
2458
|
-
const Comparator$2 = require_comparator();
|
|
2459
|
-
const { ANY: ANY$1 } = Comparator$2;
|
|
2460
|
-
const Range$3 = require_range();
|
|
2461
|
-
const satisfies$3 = require_satisfies();
|
|
2462
|
-
const gt$1 = require_gt();
|
|
2463
|
-
const lt$1 = require_lt();
|
|
2464
|
-
const lte$1 = require_lte();
|
|
2465
|
-
const gte$1 = require_gte();
|
|
2466
|
-
const outside$3 = (version, range, hilo, options) => {
|
|
2467
|
-
version = new SemVer$1(version, options);
|
|
2468
|
-
range = new Range$3(range, options);
|
|
2469
|
-
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
2470
|
-
switch (hilo) {
|
|
2471
|
-
case ">":
|
|
2472
|
-
gtfn = gt$1;
|
|
2473
|
-
ltefn = lte$1;
|
|
2474
|
-
ltfn = lt$1;
|
|
2475
|
-
comp = ">";
|
|
2476
|
-
ecomp = ">=";
|
|
2477
|
-
break;
|
|
2478
|
-
case "<":
|
|
2479
|
-
gtfn = lt$1;
|
|
2480
|
-
ltefn = gte$1;
|
|
2481
|
-
ltfn = gt$1;
|
|
2482
|
-
comp = "<";
|
|
2483
|
-
ecomp = "<=";
|
|
2484
|
-
break;
|
|
2485
|
-
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
2486
|
-
}
|
|
2487
|
-
if (satisfies$3(version, range, options)) return false;
|
|
2488
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
2489
|
-
const comparators = range.set[i];
|
|
2490
|
-
let high = null;
|
|
2491
|
-
let low = null;
|
|
2492
|
-
comparators.forEach((comparator) => {
|
|
2493
|
-
if (comparator.semver === ANY$1) comparator = new Comparator$2(">=0.0.0");
|
|
2494
|
-
high = high || comparator;
|
|
2495
|
-
low = low || comparator;
|
|
2496
|
-
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
2497
|
-
else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
|
|
2498
|
-
});
|
|
2499
|
-
if (high.operator === comp || high.operator === ecomp) return false;
|
|
2500
|
-
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;
|
|
2501
|
-
else if (low.operator === ecomp && ltfn(version, low.semver)) return false;
|
|
2502
|
-
}
|
|
2503
|
-
return true;
|
|
2504
|
-
};
|
|
2505
|
-
module.exports = outside$3;
|
|
2506
|
-
}) });
|
|
2507
|
-
|
|
2508
|
-
//#endregion
|
|
2509
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js
|
|
2510
|
-
var require_gtr = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js": ((exports, module) => {
|
|
2511
|
-
const outside$2 = require_outside();
|
|
2512
|
-
const gtr$1 = (version, range, options) => outside$2(version, range, ">", options);
|
|
2513
|
-
module.exports = gtr$1;
|
|
2514
|
-
}) });
|
|
2515
|
-
|
|
2516
|
-
//#endregion
|
|
2517
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js
|
|
2518
|
-
var require_ltr = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js": ((exports, module) => {
|
|
2519
|
-
const outside$1 = require_outside();
|
|
2520
|
-
const ltr$1 = (version, range, options) => outside$1(version, range, "<", options);
|
|
2521
|
-
module.exports = ltr$1;
|
|
2522
|
-
}) });
|
|
2523
|
-
|
|
2524
|
-
//#endregion
|
|
2525
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js
|
|
2526
|
-
var require_intersects = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js": ((exports, module) => {
|
|
2527
|
-
const Range$2 = require_range();
|
|
2528
|
-
const intersects$1 = (r1, r2, options) => {
|
|
2529
|
-
r1 = new Range$2(r1, options);
|
|
2530
|
-
r2 = new Range$2(r2, options);
|
|
2531
|
-
return r1.intersects(r2, options);
|
|
2532
|
-
};
|
|
2533
|
-
module.exports = intersects$1;
|
|
2534
|
-
}) });
|
|
2535
|
-
|
|
2536
|
-
//#endregion
|
|
2537
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js
|
|
2538
|
-
var require_simplify = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js": ((exports, module) => {
|
|
2539
|
-
const satisfies$2 = require_satisfies();
|
|
2540
|
-
const compare$2 = require_compare();
|
|
2541
|
-
module.exports = (versions, range, options) => {
|
|
2542
|
-
const set = [];
|
|
2543
|
-
let first = null;
|
|
2544
|
-
let prev = null;
|
|
2545
|
-
const v = versions.sort((a, b) => compare$2(a, b, options));
|
|
2546
|
-
for (const version of v) if (satisfies$2(version, range, options)) {
|
|
2547
|
-
prev = version;
|
|
2548
|
-
if (!first) first = version;
|
|
2549
|
-
} else {
|
|
2550
|
-
if (prev) set.push([first, prev]);
|
|
2551
|
-
prev = null;
|
|
2552
|
-
first = null;
|
|
2553
|
-
}
|
|
2554
|
-
if (first) set.push([first, null]);
|
|
2555
|
-
const ranges = [];
|
|
2556
|
-
for (const [min, max] of set) if (min === max) ranges.push(min);
|
|
2557
|
-
else if (!max && min === v[0]) ranges.push("*");
|
|
2558
|
-
else if (!max) ranges.push(`>=${min}`);
|
|
2559
|
-
else if (min === v[0]) ranges.push(`<=${max}`);
|
|
2560
|
-
else ranges.push(`${min} - ${max}`);
|
|
2561
|
-
const simplified = ranges.join(" || ");
|
|
2562
|
-
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
2563
|
-
return simplified.length < original.length ? simplified : range;
|
|
2564
|
-
};
|
|
2565
|
-
}) });
|
|
2566
|
-
|
|
2567
|
-
//#endregion
|
|
2568
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js
|
|
2569
|
-
var require_subset = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js": ((exports, module) => {
|
|
2570
|
-
const Range$1 = require_range();
|
|
2571
|
-
const Comparator$1 = require_comparator();
|
|
2572
|
-
const { ANY } = Comparator$1;
|
|
2573
|
-
const satisfies$1 = require_satisfies();
|
|
2574
|
-
const compare$1 = require_compare();
|
|
2575
|
-
const subset$1 = (sub, dom, options = {}) => {
|
|
2576
|
-
if (sub === dom) return true;
|
|
2577
|
-
sub = new Range$1(sub, options);
|
|
2578
|
-
dom = new Range$1(dom, options);
|
|
2579
|
-
let sawNonNull = false;
|
|
2580
|
-
OUTER: for (const simpleSub of sub.set) {
|
|
2581
|
-
for (const simpleDom of dom.set) {
|
|
2582
|
-
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
2583
|
-
sawNonNull = sawNonNull || isSub !== null;
|
|
2584
|
-
if (isSub) continue OUTER;
|
|
2585
|
-
}
|
|
2586
|
-
if (sawNonNull) return false;
|
|
2587
|
-
}
|
|
2588
|
-
return true;
|
|
2589
|
-
};
|
|
2590
|
-
const minimumVersionWithPreRelease = [new Comparator$1(">=0.0.0-0")];
|
|
2591
|
-
const minimumVersion = [new Comparator$1(">=0.0.0")];
|
|
2592
|
-
const simpleSubset = (sub, dom, options) => {
|
|
2593
|
-
if (sub === dom) return true;
|
|
2594
|
-
if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
|
|
2595
|
-
else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
|
|
2596
|
-
else sub = minimumVersion;
|
|
2597
|
-
if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
|
|
2598
|
-
else dom = minimumVersion;
|
|
2599
|
-
const eqSet = /* @__PURE__ */ new Set();
|
|
2600
|
-
let gt$5, lt$4;
|
|
2601
|
-
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt$5 = higherGT(gt$5, c, options);
|
|
2602
|
-
else if (c.operator === "<" || c.operator === "<=") lt$4 = lowerLT(lt$4, c, options);
|
|
2603
|
-
else eqSet.add(c.semver);
|
|
2604
|
-
if (eqSet.size > 1) return null;
|
|
2605
|
-
let gtltComp;
|
|
2606
|
-
if (gt$5 && lt$4) {
|
|
2607
|
-
gtltComp = compare$1(gt$5.semver, lt$4.semver, options);
|
|
2608
|
-
if (gtltComp > 0) return null;
|
|
2609
|
-
else if (gtltComp === 0 && (gt$5.operator !== ">=" || lt$4.operator !== "<=")) return null;
|
|
2610
|
-
}
|
|
2611
|
-
for (const eq$3 of eqSet) {
|
|
2612
|
-
if (gt$5 && !satisfies$1(eq$3, String(gt$5), options)) return null;
|
|
2613
|
-
if (lt$4 && !satisfies$1(eq$3, String(lt$4), options)) return null;
|
|
2614
|
-
for (const c of dom) if (!satisfies$1(eq$3, String(c), options)) return false;
|
|
2615
|
-
return true;
|
|
2616
|
-
}
|
|
2617
|
-
let higher, lower;
|
|
2618
|
-
let hasDomLT, hasDomGT;
|
|
2619
|
-
let needDomLTPre = lt$4 && !options.includePrerelease && lt$4.semver.prerelease.length ? lt$4.semver : false;
|
|
2620
|
-
let needDomGTPre = gt$5 && !options.includePrerelease && gt$5.semver.prerelease.length ? gt$5.semver : false;
|
|
2621
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt$4.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
2622
|
-
for (const c of dom) {
|
|
2623
|
-
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
2624
|
-
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
2625
|
-
if (gt$5) {
|
|
2626
|
-
if (needDomGTPre) {
|
|
2627
|
-
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;
|
|
2628
|
-
}
|
|
2629
|
-
if (c.operator === ">" || c.operator === ">=") {
|
|
2630
|
-
higher = higherGT(gt$5, c, options);
|
|
2631
|
-
if (higher === c && higher !== gt$5) return false;
|
|
2632
|
-
} else if (gt$5.operator === ">=" && !satisfies$1(gt$5.semver, String(c), options)) return false;
|
|
2633
|
-
}
|
|
2634
|
-
if (lt$4) {
|
|
2635
|
-
if (needDomLTPre) {
|
|
2636
|
-
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;
|
|
2637
|
-
}
|
|
2638
|
-
if (c.operator === "<" || c.operator === "<=") {
|
|
2639
|
-
lower = lowerLT(lt$4, c, options);
|
|
2640
|
-
if (lower === c && lower !== lt$4) return false;
|
|
2641
|
-
} else if (lt$4.operator === "<=" && !satisfies$1(lt$4.semver, String(c), options)) return false;
|
|
2642
|
-
}
|
|
2643
|
-
if (!c.operator && (lt$4 || gt$5) && gtltComp !== 0) return false;
|
|
2644
|
-
}
|
|
2645
|
-
if (gt$5 && hasDomLT && !lt$4 && gtltComp !== 0) return false;
|
|
2646
|
-
if (lt$4 && hasDomGT && !gt$5 && gtltComp !== 0) return false;
|
|
2647
|
-
if (needDomGTPre || needDomLTPre) return false;
|
|
2648
|
-
return true;
|
|
2649
|
-
};
|
|
2650
|
-
const higherGT = (a, b, options) => {
|
|
2651
|
-
if (!a) return b;
|
|
2652
|
-
const comp = compare$1(a.semver, b.semver, options);
|
|
2653
|
-
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
2654
|
-
};
|
|
2655
|
-
const lowerLT = (a, b, options) => {
|
|
2656
|
-
if (!a) return b;
|
|
2657
|
-
const comp = compare$1(a.semver, b.semver, options);
|
|
2658
|
-
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
2659
|
-
};
|
|
2660
|
-
module.exports = subset$1;
|
|
2661
|
-
}) });
|
|
2662
|
-
|
|
2663
|
-
//#endregion
|
|
2664
|
-
//#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js
|
|
2665
|
-
var require_semver = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js": ((exports, module) => {
|
|
2666
|
-
const internalRe = require_re();
|
|
2667
|
-
const constants = require_constants();
|
|
2668
|
-
const SemVer = require_semver$1();
|
|
2669
|
-
const identifiers = require_identifiers();
|
|
2670
|
-
const parse = require_parse();
|
|
2671
|
-
const valid = require_valid$1();
|
|
2672
|
-
const clean = require_clean();
|
|
2673
|
-
const inc = require_inc();
|
|
2674
|
-
const diff = require_diff();
|
|
2675
|
-
const major = require_major();
|
|
2676
|
-
const minor = require_minor();
|
|
2677
|
-
const patch = require_patch();
|
|
2678
|
-
const prerelease = require_prerelease();
|
|
2679
|
-
const compare = require_compare();
|
|
2680
|
-
const rcompare = require_rcompare();
|
|
2681
|
-
const compareLoose = require_compare_loose();
|
|
2682
|
-
const compareBuild = require_compare_build();
|
|
2683
|
-
const sort = require_sort();
|
|
2684
|
-
const rsort = require_rsort();
|
|
2685
|
-
const gt = require_gt();
|
|
2686
|
-
const lt = require_lt();
|
|
2687
|
-
const eq = require_eq();
|
|
2688
|
-
const neq = require_neq();
|
|
2689
|
-
const gte = require_gte();
|
|
2690
|
-
const lte = require_lte();
|
|
2691
|
-
const cmp = require_cmp();
|
|
2692
|
-
const coerce = require_coerce();
|
|
2693
|
-
const Comparator = require_comparator();
|
|
2694
|
-
const Range = require_range();
|
|
2695
|
-
const satisfies = require_satisfies();
|
|
2696
|
-
const toComparators = require_to_comparators();
|
|
2697
|
-
const maxSatisfying = require_max_satisfying();
|
|
2698
|
-
const minSatisfying = require_min_satisfying();
|
|
2699
|
-
const minVersion = require_min_version();
|
|
2700
|
-
const validRange = require_valid();
|
|
2701
|
-
const outside = require_outside();
|
|
2702
|
-
const gtr = require_gtr();
|
|
2703
|
-
const ltr = require_ltr();
|
|
2704
|
-
const intersects = require_intersects();
|
|
2705
|
-
const simplifyRange = require_simplify();
|
|
2706
|
-
const subset = require_subset();
|
|
2707
|
-
module.exports = {
|
|
2708
|
-
parse,
|
|
2709
|
-
valid,
|
|
2710
|
-
clean,
|
|
2711
|
-
inc,
|
|
2712
|
-
diff,
|
|
2713
|
-
major,
|
|
2714
|
-
minor,
|
|
2715
|
-
patch,
|
|
2716
|
-
prerelease,
|
|
2717
|
-
compare,
|
|
2718
|
-
rcompare,
|
|
2719
|
-
compareLoose,
|
|
2720
|
-
compareBuild,
|
|
2721
|
-
sort,
|
|
2722
|
-
rsort,
|
|
2723
|
-
gt,
|
|
2724
|
-
lt,
|
|
2725
|
-
eq,
|
|
2726
|
-
neq,
|
|
2727
|
-
gte,
|
|
2728
|
-
lte,
|
|
2729
|
-
cmp,
|
|
2730
|
-
coerce,
|
|
2731
|
-
Comparator,
|
|
2732
|
-
Range,
|
|
2733
|
-
satisfies,
|
|
2734
|
-
toComparators,
|
|
2735
|
-
maxSatisfying,
|
|
2736
|
-
minSatisfying,
|
|
2737
|
-
minVersion,
|
|
2738
|
-
validRange,
|
|
2739
|
-
outside,
|
|
2740
|
-
gtr,
|
|
2741
|
-
ltr,
|
|
2742
|
-
intersects,
|
|
2743
|
-
simplifyRange,
|
|
2744
|
-
subset,
|
|
2745
|
-
SemVer,
|
|
2746
|
-
re: internalRe.re,
|
|
2747
|
-
src: internalRe.src,
|
|
2748
|
-
tokens: internalRe.t,
|
|
2749
|
-
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
2750
|
-
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
2751
|
-
compareIdentifiers: identifiers.compareIdentifiers,
|
|
2752
|
-
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
2753
|
-
};
|
|
2754
|
-
}) });
|
|
2755
|
-
|
|
2756
|
-
//#endregion
|
|
2757
|
-
//#region ../core/dist/index.js
|
|
2758
|
-
var import_main = /* @__PURE__ */ __toESM(require_main(), 1);
|
|
2759
|
-
var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
|
|
2760
|
-
var Registerer = class Registerer$1 {
|
|
2761
|
-
constructor(app) {
|
|
2762
|
-
this.app = app;
|
|
2763
|
-
}
|
|
2764
|
-
static register(app) {
|
|
2765
|
-
new Registerer$1(app).bootRegister();
|
|
2766
|
-
}
|
|
2767
|
-
bootRegister() {
|
|
2768
|
-
globalThis.dd = dd;
|
|
2769
|
-
globalThis.dump = dump;
|
|
2770
|
-
globalThis.app_path = (path$1) => this.appPath(path$1);
|
|
2771
|
-
globalThis.base_path = (path$1) => this.basePath(path$1);
|
|
2772
|
-
globalThis.public_path = (path$1) => this.publicPath(path$1);
|
|
2773
|
-
globalThis.storage_path = (path$1) => this.storagePath(path$1);
|
|
2774
|
-
globalThis.database_path = (path$1) => this.databasePath(path$1);
|
|
2775
|
-
}
|
|
2776
|
-
appPath(path$1) {
|
|
2777
|
-
return this.app.getPath("base", path.join(`/${process.env.DIST_DIR ?? "src"}/`.replace(/([^:]\/)\/+/g, "$1"), "app", path$1 ?? ""));
|
|
2778
|
-
}
|
|
2779
|
-
basePath(path$1) {
|
|
2780
|
-
return this.app.getPath("base", path$1);
|
|
2781
|
-
}
|
|
2782
|
-
publicPath(path$1) {
|
|
2783
|
-
return this.app.getPath("public", path$1);
|
|
2784
|
-
}
|
|
2785
|
-
storagePath(path$1) {
|
|
2786
|
-
return this.app.getPath("base", path.join("storage", path$1 ?? ""));
|
|
2787
|
-
}
|
|
2788
|
-
databasePath(path$1) {
|
|
2789
|
-
return this.app.getPath("database", path$1);
|
|
2790
|
-
}
|
|
2791
|
-
};
|
|
2792
|
-
var ServiceProvider = class {
|
|
2793
|
-
/**
|
|
2794
|
-
* Sort order
|
|
2795
|
-
*/
|
|
2796
|
-
static order;
|
|
2797
|
-
/**
|
|
2798
|
-
* Sort priority
|
|
2799
|
-
*/
|
|
2800
|
-
static priority = 0;
|
|
2801
|
-
/**
|
|
2802
|
-
* Indicate that this service provider only runs in console
|
|
2803
|
-
*/
|
|
2804
|
-
static console = false;
|
|
2805
|
-
/**
|
|
2806
|
-
* List of registered console commands
|
|
2807
|
-
*/
|
|
2808
|
-
registeredCommands;
|
|
2809
|
-
app;
|
|
2810
|
-
constructor(app) {
|
|
2811
|
-
this.app = app;
|
|
2812
|
-
}
|
|
2813
|
-
/**
|
|
2814
|
-
* An array of console commands to register.
|
|
2815
|
-
*/
|
|
2816
|
-
commands(commands) {
|
|
2817
|
-
this.registeredCommands = commands;
|
|
2818
|
-
}
|
|
2819
|
-
};
|
|
2820
|
-
|
|
2821
|
-
//#endregion
|
|
2822
7
|
//#region src/ConfigRepository.ts
|
|
2823
8
|
var ConfigRepository = class {
|
|
2824
9
|
loaded = false;
|
|
@@ -2886,9 +71,9 @@ var ConfigServiceProvider = class extends ServiceProvider {
|
|
|
2886
71
|
* Create singleton to load env
|
|
2887
72
|
*/
|
|
2888
73
|
this.app.singleton("env", () => {
|
|
2889
|
-
const env
|
|
2890
|
-
globalThis.env = env
|
|
2891
|
-
return env
|
|
74
|
+
const env = new EnvLoader(this.app).get;
|
|
75
|
+
globalThis.env = env;
|
|
76
|
+
return env;
|
|
2892
77
|
});
|
|
2893
78
|
/**
|
|
2894
79
|
* Initialize the configuration through the repository
|