@apilift/cli 1.0.3 → 1.4.15-dev.1790797344.aad12a281cb238b0425f2b884da139566822de99
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/apilift.js
CHANGED
|
@@ -21854,13 +21854,13 @@ var require_boolSchema = __commonJS({
|
|
|
21854
21854
|
}
|
|
21855
21855
|
}
|
|
21856
21856
|
exports.topBoolOrEmptySchema = topBoolOrEmptySchema;
|
|
21857
|
-
function boolOrEmptySchema(it,
|
|
21857
|
+
function boolOrEmptySchema(it, valid2) {
|
|
21858
21858
|
const { gen, schema } = it;
|
|
21859
21859
|
if (schema === false) {
|
|
21860
|
-
gen.var(
|
|
21860
|
+
gen.var(valid2, false);
|
|
21861
21861
|
falseSchemaError(it);
|
|
21862
21862
|
} else {
|
|
21863
|
-
gen.var(
|
|
21863
|
+
gen.var(valid2, true);
|
|
21864
21864
|
}
|
|
21865
21865
|
}
|
|
21866
21866
|
exports.boolOrEmptySchema = boolOrEmptySchema;
|
|
@@ -22241,15 +22241,15 @@ var require_code2 = __commonJS({
|
|
|
22241
22241
|
exports.usePattern = usePattern;
|
|
22242
22242
|
function validateArray(cxt) {
|
|
22243
22243
|
const { gen, data: data2, keyword, it } = cxt;
|
|
22244
|
-
const
|
|
22244
|
+
const valid2 = gen.name("valid");
|
|
22245
22245
|
if (it.allErrors) {
|
|
22246
22246
|
const validArr = gen.let("valid", true);
|
|
22247
22247
|
validateItems(() => gen.assign(validArr, false));
|
|
22248
22248
|
return validArr;
|
|
22249
22249
|
}
|
|
22250
|
-
gen.var(
|
|
22250
|
+
gen.var(valid2, true);
|
|
22251
22251
|
validateItems(() => gen.break());
|
|
22252
|
-
return
|
|
22252
|
+
return valid2;
|
|
22253
22253
|
function validateItems(notValid) {
|
|
22254
22254
|
const len = gen.const("len", (0, codegen_1._)`${data2}.length`);
|
|
22255
22255
|
gen.forRange("i", 0, len, (i) => {
|
|
@@ -22257,8 +22257,8 @@ var require_code2 = __commonJS({
|
|
|
22257
22257
|
keyword,
|
|
22258
22258
|
dataProp: i,
|
|
22259
22259
|
dataPropType: util_1.Type.Num
|
|
22260
|
-
},
|
|
22261
|
-
gen.if((0, codegen_1.not)(
|
|
22260
|
+
}, valid2);
|
|
22261
|
+
gen.if((0, codegen_1.not)(valid2), notValid);
|
|
22262
22262
|
});
|
|
22263
22263
|
}
|
|
22264
22264
|
}
|
|
@@ -22270,7 +22270,7 @@ var require_code2 = __commonJS({
|
|
|
22270
22270
|
const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch));
|
|
22271
22271
|
if (alwaysValid && !it.opts.unevaluated)
|
|
22272
22272
|
return;
|
|
22273
|
-
const
|
|
22273
|
+
const valid2 = gen.let("valid", false);
|
|
22274
22274
|
const schValid = gen.name("_valid");
|
|
22275
22275
|
gen.block(() => schema.forEach((_sch, i) => {
|
|
22276
22276
|
const schCxt = cxt.subschema({
|
|
@@ -22278,12 +22278,12 @@ var require_code2 = __commonJS({
|
|
|
22278
22278
|
schemaProp: i,
|
|
22279
22279
|
compositeRule: true
|
|
22280
22280
|
}, schValid);
|
|
22281
|
-
gen.assign(
|
|
22281
|
+
gen.assign(valid2, (0, codegen_1._)`${valid2} || ${schValid}`);
|
|
22282
22282
|
const merged = cxt.mergeValidEvaluated(schCxt, schValid);
|
|
22283
22283
|
if (!merged)
|
|
22284
|
-
gen.if((0, codegen_1.not)(
|
|
22284
|
+
gen.if((0, codegen_1.not)(valid2));
|
|
22285
22285
|
}));
|
|
22286
|
-
cxt.result(
|
|
22286
|
+
cxt.result(valid2, () => cxt.reset(), () => cxt.error(true));
|
|
22287
22287
|
}
|
|
22288
22288
|
exports.validateUnion = validateUnion;
|
|
22289
22289
|
}
|
|
@@ -22305,15 +22305,15 @@ var require_keyword = __commonJS({
|
|
|
22305
22305
|
const schemaRef = useKeyword(gen, keyword, macroSchema);
|
|
22306
22306
|
if (it.opts.validateSchema !== false)
|
|
22307
22307
|
it.self.validateSchema(macroSchema, true);
|
|
22308
|
-
const
|
|
22308
|
+
const valid2 = gen.name("valid");
|
|
22309
22309
|
cxt.subschema({
|
|
22310
22310
|
schema: macroSchema,
|
|
22311
22311
|
schemaPath: codegen_1.nil,
|
|
22312
22312
|
errSchemaPath: `${it.errSchemaPath}/${keyword}`,
|
|
22313
22313
|
topSchemaRef: schemaRef,
|
|
22314
22314
|
compositeRule: true
|
|
22315
|
-
},
|
|
22316
|
-
cxt.pass(
|
|
22315
|
+
}, valid2);
|
|
22316
|
+
cxt.pass(valid2, () => cxt.error(true));
|
|
22317
22317
|
}
|
|
22318
22318
|
exports.macroKeywordCode = macroKeywordCode;
|
|
22319
22319
|
function funcKeywordCode(cxt, def) {
|
|
@@ -22322,9 +22322,9 @@ var require_keyword = __commonJS({
|
|
|
22322
22322
|
checkAsyncKeyword(it, def);
|
|
22323
22323
|
const validate2 = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
|
|
22324
22324
|
const validateRef = useKeyword(gen, keyword, validate2);
|
|
22325
|
-
const
|
|
22326
|
-
cxt.block$data(
|
|
22327
|
-
cxt.ok((_a3 = def.valid) !== null && _a3 !== void 0 ? _a3 :
|
|
22325
|
+
const valid2 = gen.let("valid");
|
|
22326
|
+
cxt.block$data(valid2, validateKeyword);
|
|
22327
|
+
cxt.ok((_a3 = def.valid) !== null && _a3 !== void 0 ? _a3 : valid2);
|
|
22328
22328
|
function validateKeyword() {
|
|
22329
22329
|
if (def.errors === false) {
|
|
22330
22330
|
assignValid();
|
|
@@ -22340,7 +22340,7 @@ var require_keyword = __commonJS({
|
|
|
22340
22340
|
}
|
|
22341
22341
|
function validateAsync3() {
|
|
22342
22342
|
const ruleErrs = gen.let("ruleErrs", null);
|
|
22343
|
-
gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(
|
|
22343
|
+
gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid2, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e)));
|
|
22344
22344
|
return ruleErrs;
|
|
22345
22345
|
}
|
|
22346
22346
|
function validateSync() {
|
|
@@ -22352,11 +22352,11 @@ var require_keyword = __commonJS({
|
|
|
22352
22352
|
function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) {
|
|
22353
22353
|
const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;
|
|
22354
22354
|
const passSchema = !("compile" in def && !$data || def.schema === false);
|
|
22355
|
-
gen.assign(
|
|
22355
|
+
gen.assign(valid2, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
22356
22356
|
}
|
|
22357
22357
|
function reportErrs(errors) {
|
|
22358
22358
|
var _a4;
|
|
22359
|
-
gen.if((0, codegen_1.not)((_a4 = def.valid) !== null && _a4 !== void 0 ? _a4 :
|
|
22359
|
+
gen.if((0, codegen_1.not)((_a4 = def.valid) !== null && _a4 !== void 0 ? _a4 : valid2), errors);
|
|
22360
22360
|
}
|
|
22361
22361
|
}
|
|
22362
22362
|
exports.funcKeywordCode = funcKeywordCode;
|
|
@@ -22393,8 +22393,8 @@ var require_keyword = __commonJS({
|
|
|
22393
22393
|
throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`);
|
|
22394
22394
|
}
|
|
22395
22395
|
if (def.validateSchema) {
|
|
22396
|
-
const
|
|
22397
|
-
if (!
|
|
22396
|
+
const valid2 = def.validateSchema(schema[keyword]);
|
|
22397
|
+
if (!valid2) {
|
|
22398
22398
|
const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + self.errorsText(def.validateSchema.errors);
|
|
22399
22399
|
if (opts.validateSchema === "log")
|
|
22400
22400
|
self.logger.error(msg);
|
|
@@ -22854,15 +22854,15 @@ var require_validate = __commonJS({
|
|
|
22854
22854
|
const schId = typeof schema == "object" && schema[opts.schemaId];
|
|
22855
22855
|
return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil;
|
|
22856
22856
|
}
|
|
22857
|
-
function subschemaCode(it,
|
|
22857
|
+
function subschemaCode(it, valid2) {
|
|
22858
22858
|
if (isSchemaObj(it)) {
|
|
22859
22859
|
checkKeywords(it);
|
|
22860
22860
|
if (schemaCxtHasRules(it)) {
|
|
22861
|
-
subSchemaObjCode(it,
|
|
22861
|
+
subSchemaObjCode(it, valid2);
|
|
22862
22862
|
return;
|
|
22863
22863
|
}
|
|
22864
22864
|
}
|
|
22865
|
-
(0, boolSchema_1.boolOrEmptySchema)(it,
|
|
22865
|
+
(0, boolSchema_1.boolOrEmptySchema)(it, valid2);
|
|
22866
22866
|
}
|
|
22867
22867
|
function schemaCxtHasRules({ schema, self }) {
|
|
22868
22868
|
if (typeof schema == "boolean")
|
|
@@ -22875,7 +22875,7 @@ var require_validate = __commonJS({
|
|
|
22875
22875
|
function isSchemaObj(it) {
|
|
22876
22876
|
return typeof it.schema != "boolean";
|
|
22877
22877
|
}
|
|
22878
|
-
function subSchemaObjCode(it,
|
|
22878
|
+
function subSchemaObjCode(it, valid2) {
|
|
22879
22879
|
const { schema, gen, opts } = it;
|
|
22880
22880
|
if (opts.$comment && schema.$comment)
|
|
22881
22881
|
commentKeyword(it);
|
|
@@ -22883,7 +22883,7 @@ var require_validate = __commonJS({
|
|
|
22883
22883
|
checkAsyncSchema(it);
|
|
22884
22884
|
const errsCount = gen.const("_errs", names_1.default.errors);
|
|
22885
22885
|
typeAndKeywords(it, errsCount);
|
|
22886
|
-
gen.var(
|
|
22886
|
+
gen.var(valid2, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
|
|
22887
22887
|
}
|
|
22888
22888
|
function checkKeywords(it) {
|
|
22889
22889
|
(0, util_1.checkUnknownRules)(it);
|
|
@@ -23150,24 +23150,24 @@ var require_validate = __commonJS({
|
|
|
23150
23150
|
else
|
|
23151
23151
|
this.params = obj;
|
|
23152
23152
|
}
|
|
23153
|
-
block$data(
|
|
23153
|
+
block$data(valid2, codeBlock, $dataValid = codegen_1.nil) {
|
|
23154
23154
|
this.gen.block(() => {
|
|
23155
|
-
this.check$data(
|
|
23155
|
+
this.check$data(valid2, $dataValid);
|
|
23156
23156
|
codeBlock();
|
|
23157
23157
|
});
|
|
23158
23158
|
}
|
|
23159
|
-
check$data(
|
|
23159
|
+
check$data(valid2 = codegen_1.nil, $dataValid = codegen_1.nil) {
|
|
23160
23160
|
if (!this.$data)
|
|
23161
23161
|
return;
|
|
23162
23162
|
const { gen, schemaCode, schemaType, def } = this;
|
|
23163
23163
|
gen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid));
|
|
23164
|
-
if (
|
|
23165
|
-
gen.assign(
|
|
23164
|
+
if (valid2 !== codegen_1.nil)
|
|
23165
|
+
gen.assign(valid2, true);
|
|
23166
23166
|
if (schemaType.length || def.validateSchema) {
|
|
23167
23167
|
gen.elseIf(this.invalid$data());
|
|
23168
23168
|
this.$dataError();
|
|
23169
|
-
if (
|
|
23170
|
-
gen.assign(
|
|
23169
|
+
if (valid2 !== codegen_1.nil)
|
|
23170
|
+
gen.assign(valid2, false);
|
|
23171
23171
|
}
|
|
23172
23172
|
gen.else();
|
|
23173
23173
|
}
|
|
@@ -23191,12 +23191,12 @@ var require_validate = __commonJS({
|
|
|
23191
23191
|
return codegen_1.nil;
|
|
23192
23192
|
}
|
|
23193
23193
|
}
|
|
23194
|
-
subschema(appl,
|
|
23194
|
+
subschema(appl, valid2) {
|
|
23195
23195
|
const subschema = (0, subschema_1.getSubschema)(this.it, appl);
|
|
23196
23196
|
(0, subschema_1.extendSubschemaData)(subschema, this.it, appl);
|
|
23197
23197
|
(0, subschema_1.extendSubschemaMode)(subschema, appl);
|
|
23198
23198
|
const nextContext = { ...this.it, ...subschema, items: void 0, props: void 0 };
|
|
23199
|
-
subschemaCode(nextContext,
|
|
23199
|
+
subschemaCode(nextContext, valid2);
|
|
23200
23200
|
return nextContext;
|
|
23201
23201
|
}
|
|
23202
23202
|
mergeEvaluated(schemaCxt, toName) {
|
|
@@ -23210,10 +23210,10 @@ var require_validate = __commonJS({
|
|
|
23210
23210
|
it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);
|
|
23211
23211
|
}
|
|
23212
23212
|
}
|
|
23213
|
-
mergeValidEvaluated(schemaCxt,
|
|
23213
|
+
mergeValidEvaluated(schemaCxt, valid2) {
|
|
23214
23214
|
const { it, gen } = this;
|
|
23215
23215
|
if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {
|
|
23216
|
-
gen.if(
|
|
23216
|
+
gen.if(valid2, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));
|
|
23217
23217
|
return true;
|
|
23218
23218
|
}
|
|
23219
23219
|
}
|
|
@@ -24563,10 +24563,10 @@ var require_core = __commonJS({
|
|
|
24563
24563
|
} else {
|
|
24564
24564
|
v = this.compile(schemaKeyRef);
|
|
24565
24565
|
}
|
|
24566
|
-
const
|
|
24566
|
+
const valid2 = v(data2);
|
|
24567
24567
|
if (!("$async" in v))
|
|
24568
24568
|
this.errors = v.errors;
|
|
24569
|
-
return
|
|
24569
|
+
return valid2;
|
|
24570
24570
|
}
|
|
24571
24571
|
compile(schema, _meta) {
|
|
24572
24572
|
const sch = this._addSchema(schema, _meta);
|
|
@@ -24663,15 +24663,15 @@ var require_core = __commonJS({
|
|
|
24663
24663
|
this.errors = null;
|
|
24664
24664
|
return true;
|
|
24665
24665
|
}
|
|
24666
|
-
const
|
|
24667
|
-
if (!
|
|
24666
|
+
const valid2 = this.validate($schema, schema);
|
|
24667
|
+
if (!valid2 && throwOrLogError) {
|
|
24668
24668
|
const message2 = "schema is invalid: " + this.errorsText();
|
|
24669
24669
|
if (this.opts.validateSchema === "log")
|
|
24670
24670
|
this.logger.error(message2);
|
|
24671
24671
|
else
|
|
24672
24672
|
throw new Error(message2);
|
|
24673
24673
|
}
|
|
24674
|
-
return
|
|
24674
|
+
return valid2;
|
|
24675
24675
|
}
|
|
24676
24676
|
// Get compiled schema by `key` or `ref`.
|
|
24677
24677
|
// (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
|
|
@@ -25064,16 +25064,16 @@ var require_ref = __commonJS({
|
|
|
25064
25064
|
}
|
|
25065
25065
|
function inlineRefSchema(sch) {
|
|
25066
25066
|
const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });
|
|
25067
|
-
const
|
|
25067
|
+
const valid2 = gen.name("valid");
|
|
25068
25068
|
const schCxt = cxt.subschema({
|
|
25069
25069
|
schema: sch,
|
|
25070
25070
|
dataTypes: [],
|
|
25071
25071
|
schemaPath: codegen_1.nil,
|
|
25072
25072
|
topSchemaRef: schName,
|
|
25073
25073
|
errSchemaPath: $ref
|
|
25074
|
-
},
|
|
25074
|
+
}, valid2);
|
|
25075
25075
|
cxt.mergeEvaluated(schCxt);
|
|
25076
|
-
cxt.ok(
|
|
25076
|
+
cxt.ok(valid2);
|
|
25077
25077
|
}
|
|
25078
25078
|
}
|
|
25079
25079
|
};
|
|
@@ -25093,19 +25093,19 @@ var require_ref = __commonJS({
|
|
|
25093
25093
|
function callAsyncRef() {
|
|
25094
25094
|
if (!env.$async)
|
|
25095
25095
|
throw new Error("async schema referenced by sync schema");
|
|
25096
|
-
const
|
|
25096
|
+
const valid2 = gen.let("valid");
|
|
25097
25097
|
gen.try(() => {
|
|
25098
25098
|
gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);
|
|
25099
25099
|
addEvaluatedFrom(v);
|
|
25100
25100
|
if (!allErrors)
|
|
25101
|
-
gen.assign(
|
|
25101
|
+
gen.assign(valid2, true);
|
|
25102
25102
|
}, (e) => {
|
|
25103
25103
|
gen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));
|
|
25104
25104
|
addErrorsFrom(e);
|
|
25105
25105
|
if (!allErrors)
|
|
25106
|
-
gen.assign(
|
|
25106
|
+
gen.assign(valid2, false);
|
|
25107
25107
|
});
|
|
25108
|
-
cxt.ok(
|
|
25108
|
+
cxt.ok(valid2);
|
|
25109
25109
|
}
|
|
25110
25110
|
function callSyncRef() {
|
|
25111
25111
|
cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));
|
|
@@ -25310,9 +25310,9 @@ var require_pattern = __commonJS({
|
|
|
25310
25310
|
if ($data) {
|
|
25311
25311
|
const { regExp } = it.opts.code;
|
|
25312
25312
|
const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
|
|
25313
|
-
const
|
|
25314
|
-
gen.try(() => gen.assign(
|
|
25315
|
-
cxt.fail$data((0, codegen_1._)`!${
|
|
25313
|
+
const valid2 = gen.let("valid");
|
|
25314
|
+
gen.try(() => gen.assign(valid2, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data2})`), () => gen.assign(valid2, false));
|
|
25315
|
+
cxt.fail$data((0, codegen_1._)`!${valid2}`);
|
|
25316
25316
|
} else {
|
|
25317
25317
|
const regExp = (0, code_1.usePattern)(cxt, schema);
|
|
25318
25318
|
cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data2})`);
|
|
@@ -25403,9 +25403,9 @@ var require_required = __commonJS({
|
|
|
25403
25403
|
function exitOnErrorMode() {
|
|
25404
25404
|
const missing = gen.let("missing");
|
|
25405
25405
|
if (useLoop || $data) {
|
|
25406
|
-
const
|
|
25407
|
-
cxt.block$data(
|
|
25408
|
-
cxt.ok(
|
|
25406
|
+
const valid2 = gen.let("valid", true);
|
|
25407
|
+
cxt.block$data(valid2, () => loopUntilMissing(missing, valid2));
|
|
25408
|
+
cxt.ok(valid2);
|
|
25409
25409
|
} else {
|
|
25410
25410
|
gen.if((0, code_1.checkMissingProp)(cxt, schema, missing));
|
|
25411
25411
|
(0, code_1.reportMissingProp)(cxt, missing);
|
|
@@ -25418,11 +25418,11 @@ var require_required = __commonJS({
|
|
|
25418
25418
|
gen.if((0, code_1.noPropertyInData)(gen, data2, prop, opts.ownProperties), () => cxt.error());
|
|
25419
25419
|
});
|
|
25420
25420
|
}
|
|
25421
|
-
function loopUntilMissing(missing,
|
|
25421
|
+
function loopUntilMissing(missing, valid2) {
|
|
25422
25422
|
cxt.setParams({ missingProperty: missing });
|
|
25423
25423
|
gen.forOf(missing, schemaCode, () => {
|
|
25424
|
-
gen.assign(
|
|
25425
|
-
gen.if((0, codegen_1.not)(
|
|
25424
|
+
gen.assign(valid2, (0, code_1.propertyInData)(gen, data2, missing, opts.ownProperties));
|
|
25425
|
+
gen.if((0, codegen_1.not)(valid2), () => {
|
|
25426
25426
|
cxt.error();
|
|
25427
25427
|
gen.break();
|
|
25428
25428
|
});
|
|
@@ -25497,15 +25497,15 @@ var require_uniqueItems = __commonJS({
|
|
|
25497
25497
|
const { gen, data: data2, $data, schema, parentSchema, schemaCode, it } = cxt;
|
|
25498
25498
|
if (!$data && !schema)
|
|
25499
25499
|
return;
|
|
25500
|
-
const
|
|
25500
|
+
const valid2 = gen.let("valid");
|
|
25501
25501
|
const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];
|
|
25502
|
-
cxt.block$data(
|
|
25503
|
-
cxt.ok(
|
|
25502
|
+
cxt.block$data(valid2, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`);
|
|
25503
|
+
cxt.ok(valid2);
|
|
25504
25504
|
function validateUniqueItems() {
|
|
25505
25505
|
const i = gen.let("i", (0, codegen_1._)`${data2}.length`);
|
|
25506
25506
|
const j = gen.let("j");
|
|
25507
25507
|
cxt.setParams({ i, j });
|
|
25508
|
-
gen.assign(
|
|
25508
|
+
gen.assign(valid2, true);
|
|
25509
25509
|
gen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));
|
|
25510
25510
|
}
|
|
25511
25511
|
function canOptimize() {
|
|
@@ -25523,7 +25523,7 @@ var require_uniqueItems = __commonJS({
|
|
|
25523
25523
|
gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => {
|
|
25524
25524
|
gen.assign(j, (0, codegen_1._)`${indices}[${item}]`);
|
|
25525
25525
|
cxt.error();
|
|
25526
|
-
gen.assign(
|
|
25526
|
+
gen.assign(valid2, false).break();
|
|
25527
25527
|
}).code((0, codegen_1._)`${indices}[${item}] = ${i}`);
|
|
25528
25528
|
});
|
|
25529
25529
|
}
|
|
@@ -25532,7 +25532,7 @@ var require_uniqueItems = __commonJS({
|
|
|
25532
25532
|
const outer = gen.name("outer");
|
|
25533
25533
|
gen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._)`${eql}(${data2}[${i}], ${data2}[${j}])`, () => {
|
|
25534
25534
|
cxt.error();
|
|
25535
|
-
gen.assign(
|
|
25535
|
+
gen.assign(valid2, false).break(outer);
|
|
25536
25536
|
})));
|
|
25537
25537
|
}
|
|
25538
25538
|
}
|
|
@@ -25594,20 +25594,20 @@ var require_enum = __commonJS({
|
|
|
25594
25594
|
const useLoop = schema.length >= it.opts.loopEnum;
|
|
25595
25595
|
let eql;
|
|
25596
25596
|
const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default);
|
|
25597
|
-
let
|
|
25597
|
+
let valid2;
|
|
25598
25598
|
if (useLoop || $data) {
|
|
25599
|
-
|
|
25600
|
-
cxt.block$data(
|
|
25599
|
+
valid2 = gen.let("valid");
|
|
25600
|
+
cxt.block$data(valid2, loopEnum);
|
|
25601
25601
|
} else {
|
|
25602
25602
|
if (!Array.isArray(schema))
|
|
25603
25603
|
throw new Error("ajv implementation error");
|
|
25604
25604
|
const vSchema = gen.const("vSchema", schemaCode);
|
|
25605
|
-
|
|
25605
|
+
valid2 = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));
|
|
25606
25606
|
}
|
|
25607
|
-
cxt.pass(
|
|
25607
|
+
cxt.pass(valid2);
|
|
25608
25608
|
function loopEnum() {
|
|
25609
|
-
gen.assign(
|
|
25610
|
-
gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data2}, ${v})`, () => gen.assign(
|
|
25609
|
+
gen.assign(valid2, false);
|
|
25610
|
+
gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data2}, ${v})`, () => gen.assign(valid2, true).break()));
|
|
25611
25611
|
}
|
|
25612
25612
|
function equalCode(vSchema, i) {
|
|
25613
25613
|
const sch = schema[i];
|
|
@@ -25693,15 +25693,15 @@ var require_additionalItems = __commonJS({
|
|
|
25693
25693
|
cxt.setParams({ len: items.length });
|
|
25694
25694
|
cxt.pass((0, codegen_1._)`${len} <= ${items.length}`);
|
|
25695
25695
|
} else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
25696
|
-
const
|
|
25697
|
-
gen.if((0, codegen_1.not)(
|
|
25698
|
-
cxt.ok(
|
|
25696
|
+
const valid2 = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`);
|
|
25697
|
+
gen.if((0, codegen_1.not)(valid2), () => validateItems(valid2));
|
|
25698
|
+
cxt.ok(valid2);
|
|
25699
25699
|
}
|
|
25700
|
-
function validateItems(
|
|
25700
|
+
function validateItems(valid2) {
|
|
25701
25701
|
gen.forRange("i", items.length, len, (i) => {
|
|
25702
|
-
cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num },
|
|
25702
|
+
cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid2);
|
|
25703
25703
|
if (!it.allErrors)
|
|
25704
|
-
gen.if((0, codegen_1.not)(
|
|
25704
|
+
gen.if((0, codegen_1.not)(valid2), () => gen.break());
|
|
25705
25705
|
});
|
|
25706
25706
|
}
|
|
25707
25707
|
}
|
|
@@ -25740,7 +25740,7 @@ var require_items = __commonJS({
|
|
|
25740
25740
|
if (it.opts.unevaluated && schArr.length && it.items !== true) {
|
|
25741
25741
|
it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);
|
|
25742
25742
|
}
|
|
25743
|
-
const
|
|
25743
|
+
const valid2 = gen.name("valid");
|
|
25744
25744
|
const len = gen.const("len", (0, codegen_1._)`${data2}.length`);
|
|
25745
25745
|
schArr.forEach((sch, i) => {
|
|
25746
25746
|
if ((0, util_1.alwaysValidSchema)(it, sch))
|
|
@@ -25749,8 +25749,8 @@ var require_items = __commonJS({
|
|
|
25749
25749
|
keyword,
|
|
25750
25750
|
schemaProp: i,
|
|
25751
25751
|
dataProp: i
|
|
25752
|
-
},
|
|
25753
|
-
cxt.ok(
|
|
25752
|
+
}, valid2));
|
|
25753
|
+
cxt.ok(valid2);
|
|
25754
25754
|
});
|
|
25755
25755
|
function checkStrictTuple(sch) {
|
|
25756
25756
|
const { opts, errSchemaPath } = it;
|
|
@@ -25867,18 +25867,18 @@ var require_contains = __commonJS({
|
|
|
25867
25867
|
return;
|
|
25868
25868
|
}
|
|
25869
25869
|
it.items = true;
|
|
25870
|
-
const
|
|
25870
|
+
const valid2 = gen.name("valid");
|
|
25871
25871
|
if (max === void 0 && min === 1) {
|
|
25872
|
-
validateItems(
|
|
25872
|
+
validateItems(valid2, () => gen.if(valid2, () => gen.break()));
|
|
25873
25873
|
} else if (min === 0) {
|
|
25874
|
-
gen.let(
|
|
25874
|
+
gen.let(valid2, true);
|
|
25875
25875
|
if (max !== void 0)
|
|
25876
25876
|
gen.if((0, codegen_1._)`${data2}.length > 0`, validateItemsWithCount);
|
|
25877
25877
|
} else {
|
|
25878
|
-
gen.let(
|
|
25878
|
+
gen.let(valid2, false);
|
|
25879
25879
|
validateItemsWithCount();
|
|
25880
25880
|
}
|
|
25881
|
-
cxt.result(
|
|
25881
|
+
cxt.result(valid2, () => cxt.reset());
|
|
25882
25882
|
function validateItemsWithCount() {
|
|
25883
25883
|
const schValid = gen.name("_valid");
|
|
25884
25884
|
const count = gen.let("count", 0);
|
|
@@ -25898,13 +25898,13 @@ var require_contains = __commonJS({
|
|
|
25898
25898
|
function checkLimits(count) {
|
|
25899
25899
|
gen.code((0, codegen_1._)`${count}++`);
|
|
25900
25900
|
if (max === void 0) {
|
|
25901
|
-
gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(
|
|
25901
|
+
gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid2, true).break());
|
|
25902
25902
|
} else {
|
|
25903
|
-
gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(
|
|
25903
|
+
gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid2, false).break());
|
|
25904
25904
|
if (min === 1)
|
|
25905
|
-
gen.assign(
|
|
25905
|
+
gen.assign(valid2, true);
|
|
25906
25906
|
else
|
|
25907
|
-
gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(
|
|
25907
|
+
gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid2, true));
|
|
25908
25908
|
}
|
|
25909
25909
|
}
|
|
25910
25910
|
}
|
|
@@ -25986,20 +25986,20 @@ var require_dependencies = __commonJS({
|
|
|
25986
25986
|
exports.validatePropertyDeps = validatePropertyDeps;
|
|
25987
25987
|
function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
|
|
25988
25988
|
const { gen, data: data2, keyword, it } = cxt;
|
|
25989
|
-
const
|
|
25989
|
+
const valid2 = gen.name("valid");
|
|
25990
25990
|
for (const prop in schemaDeps) {
|
|
25991
25991
|
if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop]))
|
|
25992
25992
|
continue;
|
|
25993
25993
|
gen.if(
|
|
25994
25994
|
(0, code_1.propertyInData)(gen, data2, prop, it.opts.ownProperties),
|
|
25995
25995
|
() => {
|
|
25996
|
-
const schCxt = cxt.subschema({ keyword, schemaProp: prop },
|
|
25997
|
-
cxt.mergeValidEvaluated(schCxt,
|
|
25996
|
+
const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid2);
|
|
25997
|
+
cxt.mergeValidEvaluated(schCxt, valid2);
|
|
25998
25998
|
},
|
|
25999
|
-
() => gen.var(
|
|
25999
|
+
() => gen.var(valid2, true)
|
|
26000
26000
|
// TODO var
|
|
26001
26001
|
);
|
|
26002
|
-
cxt.ok(
|
|
26002
|
+
cxt.ok(valid2);
|
|
26003
26003
|
}
|
|
26004
26004
|
}
|
|
26005
26005
|
exports.validateSchemaDeps = validateSchemaDeps;
|
|
@@ -26027,7 +26027,7 @@ var require_propertyNames = __commonJS({
|
|
|
26027
26027
|
const { gen, schema, data: data2, it } = cxt;
|
|
26028
26028
|
if ((0, util_1.alwaysValidSchema)(it, schema))
|
|
26029
26029
|
return;
|
|
26030
|
-
const
|
|
26030
|
+
const valid2 = gen.name("valid");
|
|
26031
26031
|
gen.forIn("key", data2, (key) => {
|
|
26032
26032
|
cxt.setParams({ propertyName: key });
|
|
26033
26033
|
cxt.subschema({
|
|
@@ -26036,14 +26036,14 @@ var require_propertyNames = __commonJS({
|
|
|
26036
26036
|
dataTypes: ["string"],
|
|
26037
26037
|
propertyName: key,
|
|
26038
26038
|
compositeRule: true
|
|
26039
|
-
},
|
|
26040
|
-
gen.if((0, codegen_1.not)(
|
|
26039
|
+
}, valid2);
|
|
26040
|
+
gen.if((0, codegen_1.not)(valid2), () => {
|
|
26041
26041
|
cxt.error(true);
|
|
26042
26042
|
if (!it.allErrors)
|
|
26043
26043
|
gen.break();
|
|
26044
26044
|
});
|
|
26045
26045
|
});
|
|
26046
|
-
cxt.ok(
|
|
26046
|
+
cxt.ok(valid2);
|
|
26047
26047
|
}
|
|
26048
26048
|
};
|
|
26049
26049
|
exports.default = def;
|
|
@@ -26121,21 +26121,21 @@ var require_additionalProperties = __commonJS({
|
|
|
26121
26121
|
return;
|
|
26122
26122
|
}
|
|
26123
26123
|
if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
26124
|
-
const
|
|
26124
|
+
const valid2 = gen.name("valid");
|
|
26125
26125
|
if (opts.removeAdditional === "failing") {
|
|
26126
|
-
applyAdditionalSchema(key,
|
|
26127
|
-
gen.if((0, codegen_1.not)(
|
|
26126
|
+
applyAdditionalSchema(key, valid2, false);
|
|
26127
|
+
gen.if((0, codegen_1.not)(valid2), () => {
|
|
26128
26128
|
cxt.reset();
|
|
26129
26129
|
deleteAdditional(key);
|
|
26130
26130
|
});
|
|
26131
26131
|
} else {
|
|
26132
|
-
applyAdditionalSchema(key,
|
|
26132
|
+
applyAdditionalSchema(key, valid2);
|
|
26133
26133
|
if (!allErrors)
|
|
26134
|
-
gen.if((0, codegen_1.not)(
|
|
26134
|
+
gen.if((0, codegen_1.not)(valid2), () => gen.break());
|
|
26135
26135
|
}
|
|
26136
26136
|
}
|
|
26137
26137
|
}
|
|
26138
|
-
function applyAdditionalSchema(key,
|
|
26138
|
+
function applyAdditionalSchema(key, valid2, errors) {
|
|
26139
26139
|
const subschema = {
|
|
26140
26140
|
keyword: "additionalProperties",
|
|
26141
26141
|
dataProp: key,
|
|
@@ -26148,7 +26148,7 @@ var require_additionalProperties = __commonJS({
|
|
|
26148
26148
|
allErrors: false
|
|
26149
26149
|
});
|
|
26150
26150
|
}
|
|
26151
|
-
cxt.subschema(subschema,
|
|
26151
|
+
cxt.subschema(subschema, valid2);
|
|
26152
26152
|
}
|
|
26153
26153
|
}
|
|
26154
26154
|
};
|
|
@@ -26184,7 +26184,7 @@ var require_properties = __commonJS({
|
|
|
26184
26184
|
const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));
|
|
26185
26185
|
if (properties.length === 0)
|
|
26186
26186
|
return;
|
|
26187
|
-
const
|
|
26187
|
+
const valid2 = gen.name("valid");
|
|
26188
26188
|
for (const prop of properties) {
|
|
26189
26189
|
if (hasDefault(prop)) {
|
|
26190
26190
|
applyPropertySchema(prop);
|
|
@@ -26192,11 +26192,11 @@ var require_properties = __commonJS({
|
|
|
26192
26192
|
gen.if((0, code_1.propertyInData)(gen, data2, prop, it.opts.ownProperties));
|
|
26193
26193
|
applyPropertySchema(prop);
|
|
26194
26194
|
if (!it.allErrors)
|
|
26195
|
-
gen.else().var(
|
|
26195
|
+
gen.else().var(valid2, true);
|
|
26196
26196
|
gen.endIf();
|
|
26197
26197
|
}
|
|
26198
26198
|
cxt.it.definedProperties.add(prop);
|
|
26199
|
-
cxt.ok(
|
|
26199
|
+
cxt.ok(valid2);
|
|
26200
26200
|
}
|
|
26201
26201
|
function hasDefault(prop) {
|
|
26202
26202
|
return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== void 0;
|
|
@@ -26206,7 +26206,7 @@ var require_properties = __commonJS({
|
|
|
26206
26206
|
keyword: "properties",
|
|
26207
26207
|
schemaProp: prop,
|
|
26208
26208
|
dataProp: prop
|
|
26209
|
-
},
|
|
26209
|
+
}, valid2);
|
|
26210
26210
|
}
|
|
26211
26211
|
}
|
|
26212
26212
|
};
|
|
@@ -26236,7 +26236,7 @@ var require_patternProperties = __commonJS({
|
|
|
26236
26236
|
return;
|
|
26237
26237
|
}
|
|
26238
26238
|
const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;
|
|
26239
|
-
const
|
|
26239
|
+
const valid2 = gen.name("valid");
|
|
26240
26240
|
if (it.props !== true && !(it.props instanceof codegen_1.Name)) {
|
|
26241
26241
|
it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);
|
|
26242
26242
|
}
|
|
@@ -26249,9 +26249,9 @@ var require_patternProperties = __commonJS({
|
|
|
26249
26249
|
if (it.allErrors) {
|
|
26250
26250
|
validateProperties(pat);
|
|
26251
26251
|
} else {
|
|
26252
|
-
gen.var(
|
|
26252
|
+
gen.var(valid2, true);
|
|
26253
26253
|
validateProperties(pat);
|
|
26254
|
-
gen.if(
|
|
26254
|
+
gen.if(valid2);
|
|
26255
26255
|
}
|
|
26256
26256
|
}
|
|
26257
26257
|
}
|
|
@@ -26272,12 +26272,12 @@ var require_patternProperties = __commonJS({
|
|
|
26272
26272
|
schemaProp: pat,
|
|
26273
26273
|
dataProp: key,
|
|
26274
26274
|
dataPropType: util_2.Type.Str
|
|
26275
|
-
},
|
|
26275
|
+
}, valid2);
|
|
26276
26276
|
}
|
|
26277
26277
|
if (it.opts.unevaluated && props !== true) {
|
|
26278
26278
|
gen.assign((0, codegen_1._)`${props}[${key}]`, true);
|
|
26279
26279
|
} else if (!alwaysValid && !it.allErrors) {
|
|
26280
|
-
gen.if((0, codegen_1.not)(
|
|
26280
|
+
gen.if((0, codegen_1.not)(valid2), () => gen.break());
|
|
26281
26281
|
}
|
|
26282
26282
|
});
|
|
26283
26283
|
});
|
|
@@ -26304,14 +26304,14 @@ var require_not = __commonJS({
|
|
|
26304
26304
|
cxt.fail();
|
|
26305
26305
|
return;
|
|
26306
26306
|
}
|
|
26307
|
-
const
|
|
26307
|
+
const valid2 = gen.name("valid");
|
|
26308
26308
|
cxt.subschema({
|
|
26309
26309
|
keyword: "not",
|
|
26310
26310
|
compositeRule: true,
|
|
26311
26311
|
createErrors: false,
|
|
26312
26312
|
allErrors: false
|
|
26313
|
-
},
|
|
26314
|
-
cxt.failResult(
|
|
26313
|
+
}, valid2);
|
|
26314
|
+
cxt.failResult(valid2, () => cxt.reset(), () => cxt.error());
|
|
26315
26315
|
},
|
|
26316
26316
|
error: { message: "must NOT be valid" }
|
|
26317
26317
|
};
|
|
@@ -26359,12 +26359,12 @@ var require_oneOf = __commonJS({
|
|
|
26359
26359
|
if (it.opts.discriminator && parentSchema.discriminator)
|
|
26360
26360
|
return;
|
|
26361
26361
|
const schArr = schema;
|
|
26362
|
-
const
|
|
26362
|
+
const valid2 = gen.let("valid", false);
|
|
26363
26363
|
const passing = gen.let("passing", null);
|
|
26364
26364
|
const schValid = gen.name("_valid");
|
|
26365
26365
|
cxt.setParams({ passing });
|
|
26366
26366
|
gen.block(validateOneOf);
|
|
26367
|
-
cxt.result(
|
|
26367
|
+
cxt.result(valid2, () => cxt.reset(), () => cxt.error(true));
|
|
26368
26368
|
function validateOneOf() {
|
|
26369
26369
|
schArr.forEach((sch, i) => {
|
|
26370
26370
|
let schCxt;
|
|
@@ -26378,10 +26378,10 @@ var require_oneOf = __commonJS({
|
|
|
26378
26378
|
}, schValid);
|
|
26379
26379
|
}
|
|
26380
26380
|
if (i > 0) {
|
|
26381
|
-
gen.if((0, codegen_1._)`${schValid} && ${
|
|
26381
|
+
gen.if((0, codegen_1._)`${schValid} && ${valid2}`).assign(valid2, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else();
|
|
26382
26382
|
}
|
|
26383
26383
|
gen.if(schValid, () => {
|
|
26384
|
-
gen.assign(
|
|
26384
|
+
gen.assign(valid2, true);
|
|
26385
26385
|
gen.assign(passing, i);
|
|
26386
26386
|
if (schCxt)
|
|
26387
26387
|
cxt.mergeEvaluated(schCxt, codegen_1.Name);
|
|
@@ -26407,12 +26407,12 @@ var require_allOf = __commonJS({
|
|
|
26407
26407
|
const { gen, schema, it } = cxt;
|
|
26408
26408
|
if (!Array.isArray(schema))
|
|
26409
26409
|
throw new Error("ajv implementation error");
|
|
26410
|
-
const
|
|
26410
|
+
const valid2 = gen.name("valid");
|
|
26411
26411
|
schema.forEach((sch, i) => {
|
|
26412
26412
|
if ((0, util_1.alwaysValidSchema)(it, sch))
|
|
26413
26413
|
return;
|
|
26414
|
-
const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i },
|
|
26415
|
-
cxt.ok(
|
|
26414
|
+
const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid2);
|
|
26415
|
+
cxt.ok(valid2);
|
|
26416
26416
|
cxt.mergeEvaluated(schCxt);
|
|
26417
26417
|
});
|
|
26418
26418
|
}
|
|
@@ -26446,7 +26446,7 @@ var require_if = __commonJS({
|
|
|
26446
26446
|
const hasElse = hasSchema(it, "else");
|
|
26447
26447
|
if (!hasThen && !hasElse)
|
|
26448
26448
|
return;
|
|
26449
|
-
const
|
|
26449
|
+
const valid2 = gen.let("valid", true);
|
|
26450
26450
|
const schValid = gen.name("_valid");
|
|
26451
26451
|
validateIf();
|
|
26452
26452
|
cxt.reset();
|
|
@@ -26459,7 +26459,7 @@ var require_if = __commonJS({
|
|
|
26459
26459
|
} else {
|
|
26460
26460
|
gen.if((0, codegen_1.not)(schValid), validateClause("else"));
|
|
26461
26461
|
}
|
|
26462
|
-
cxt.pass(
|
|
26462
|
+
cxt.pass(valid2, () => cxt.error(true));
|
|
26463
26463
|
function validateIf() {
|
|
26464
26464
|
const schCxt = cxt.subschema({
|
|
26465
26465
|
keyword: "if",
|
|
@@ -26472,8 +26472,8 @@ var require_if = __commonJS({
|
|
|
26472
26472
|
function validateClause(keyword, ifClause) {
|
|
26473
26473
|
return () => {
|
|
26474
26474
|
const schCxt = cxt.subschema({ keyword }, schValid);
|
|
26475
|
-
gen.assign(
|
|
26476
|
-
cxt.mergeValidEvaluated(schCxt,
|
|
26475
|
+
gen.assign(valid2, schValid);
|
|
26476
|
+
cxt.mergeValidEvaluated(schCxt, valid2);
|
|
26477
26477
|
if (ifClause)
|
|
26478
26478
|
gen.assign(ifClause, (0, codegen_1._)`${keyword}`);
|
|
26479
26479
|
else
|
|
@@ -26613,22 +26613,22 @@ var require_dynamicRef = __commonJS({
|
|
|
26613
26613
|
if (it.allErrors) {
|
|
26614
26614
|
_dynamicRef();
|
|
26615
26615
|
} else {
|
|
26616
|
-
const
|
|
26617
|
-
_dynamicRef(
|
|
26618
|
-
cxt.ok(
|
|
26616
|
+
const valid2 = gen.let("valid", false);
|
|
26617
|
+
_dynamicRef(valid2);
|
|
26618
|
+
cxt.ok(valid2);
|
|
26619
26619
|
}
|
|
26620
|
-
function _dynamicRef(
|
|
26620
|
+
function _dynamicRef(valid2) {
|
|
26621
26621
|
if (it.schemaEnv.root.dynamicAnchors[anchor2]) {
|
|
26622
26622
|
const v = gen.let("_v", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor2)}`);
|
|
26623
|
-
gen.if(v, _callRef(v,
|
|
26623
|
+
gen.if(v, _callRef(v, valid2), _callRef(it.validateName, valid2));
|
|
26624
26624
|
} else {
|
|
26625
|
-
_callRef(it.validateName,
|
|
26625
|
+
_callRef(it.validateName, valid2)();
|
|
26626
26626
|
}
|
|
26627
26627
|
}
|
|
26628
|
-
function _callRef(validate2,
|
|
26629
|
-
return
|
|
26628
|
+
function _callRef(validate2, valid2) {
|
|
26629
|
+
return valid2 ? () => gen.block(() => {
|
|
26630
26630
|
(0, ref_1.callRef)(cxt, validate2);
|
|
26631
|
-
gen.let(
|
|
26631
|
+
gen.let(valid2, true);
|
|
26632
26632
|
}) : () => (0, ref_1.callRef)(cxt, validate2);
|
|
26633
26633
|
}
|
|
26634
26634
|
}
|
|
@@ -26792,14 +26792,14 @@ var require_unevaluatedProperties = __commonJS({
|
|
|
26792
26792
|
return;
|
|
26793
26793
|
}
|
|
26794
26794
|
if (!(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
26795
|
-
const
|
|
26795
|
+
const valid2 = gen.name("valid");
|
|
26796
26796
|
cxt.subschema({
|
|
26797
26797
|
keyword: "unevaluatedProperties",
|
|
26798
26798
|
dataProp: key,
|
|
26799
26799
|
dataPropType: util_1.Type.Str
|
|
26800
|
-
},
|
|
26800
|
+
}, valid2);
|
|
26801
26801
|
if (!allErrors)
|
|
26802
|
-
gen.if((0, codegen_1.not)(
|
|
26802
|
+
gen.if((0, codegen_1.not)(valid2), () => gen.break());
|
|
26803
26803
|
}
|
|
26804
26804
|
}
|
|
26805
26805
|
function unevaluatedDynamic(evaluatedProps, key) {
|
|
@@ -26845,16 +26845,16 @@ var require_unevaluatedItems = __commonJS({
|
|
|
26845
26845
|
cxt.setParams({ len: items });
|
|
26846
26846
|
cxt.fail((0, codegen_1._)`${len} > ${items}`);
|
|
26847
26847
|
} else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
26848
|
-
const
|
|
26849
|
-
gen.if((0, codegen_1.not)(
|
|
26850
|
-
cxt.ok(
|
|
26848
|
+
const valid2 = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`);
|
|
26849
|
+
gen.if((0, codegen_1.not)(valid2), () => validateItems(valid2, items));
|
|
26850
|
+
cxt.ok(valid2);
|
|
26851
26851
|
}
|
|
26852
26852
|
it.items = true;
|
|
26853
|
-
function validateItems(
|
|
26853
|
+
function validateItems(valid2, from) {
|
|
26854
26854
|
gen.forRange("i", from, len, (i) => {
|
|
26855
|
-
cxt.subschema({ keyword: "unevaluatedItems", dataProp: i, dataPropType: util_1.Type.Num },
|
|
26855
|
+
cxt.subschema({ keyword: "unevaluatedItems", dataProp: i, dataPropType: util_1.Type.Num }, valid2);
|
|
26856
26856
|
if (!it.allErrors)
|
|
26857
|
-
gen.if((0, codegen_1.not)(
|
|
26857
|
+
gen.if((0, codegen_1.not)(valid2), () => gen.break());
|
|
26858
26858
|
});
|
|
26859
26859
|
}
|
|
26860
26860
|
}
|
|
@@ -27073,16 +27073,16 @@ var require_discriminator = __commonJS({
|
|
|
27073
27073
|
throw new Error("discriminator: mapping is not supported");
|
|
27074
27074
|
if (!oneOf)
|
|
27075
27075
|
throw new Error("discriminator: requires oneOf keyword");
|
|
27076
|
-
const
|
|
27076
|
+
const valid2 = gen.let("valid", false);
|
|
27077
27077
|
const tag = gen.const("tag", (0, codegen_1._)`${data2}${(0, codegen_1.getProperty)(tagName)}`);
|
|
27078
27078
|
gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));
|
|
27079
|
-
cxt.ok(
|
|
27079
|
+
cxt.ok(valid2);
|
|
27080
27080
|
function validateMapping() {
|
|
27081
27081
|
const mapping = getMapping();
|
|
27082
27082
|
gen.if(false);
|
|
27083
27083
|
for (const tagValue in mapping) {
|
|
27084
27084
|
gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`);
|
|
27085
|
-
gen.assign(
|
|
27085
|
+
gen.assign(valid2, applyTagSchema(mapping[tagValue]));
|
|
27086
27086
|
}
|
|
27087
27087
|
gen.else();
|
|
27088
27088
|
cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });
|
|
@@ -32009,8 +32009,8 @@ function propertyLines(schema, context, app2, sessionLabel) {
|
|
|
32009
32009
|
const source = typeof property["x-source"] === "object" && property["x-source"] ? property["x-source"] : null;
|
|
32010
32010
|
const flag = `--${name.replaceAll("_", "-")}`;
|
|
32011
32011
|
const constraints = [typeof property.minimum === "number" ? `Minimum: ${property.minimum}.` : "", typeof property.maximum === "number" ? `Maximum: ${property.maximum}.` : "", Object.hasOwn(property, "default") ? `Default: ${JSON.stringify(property.default)}.` : ""].filter(Boolean).join(" ");
|
|
32012
|
-
const
|
|
32013
|
-
const saved = !Object.hasOwn(context, name) ? "\n No automatic value is set." :
|
|
32012
|
+
const compatible3 = Object.hasOwn(context, name) && savedContextCompatible(context[name], property);
|
|
32013
|
+
const saved = !Object.hasOwn(context, name) ? "\n No automatic value is set." : compatible3 ? `
|
|
32014
32014
|
Saved context value: ${quote(context[name])} (${app2} context in this agent's session).
|
|
32015
32015
|
Omit this flag to use ${quote(context[name])}, or pass ${flag} <different-value>
|
|
32016
32016
|
to override it for this call only. The saved value stays ${quote(context[name])}.` : `
|
|
@@ -32026,7 +32026,7 @@ function propertyLines(schema, context, app2, sessionLabel) {
|
|
|
32026
32026
|
const line = ` ${flag} <${type}>
|
|
32027
32027
|
${description2}${constraints ? ` ${constraints}` : ""}${saved}${obtain}`;
|
|
32028
32028
|
sections[required2.has(name) ? "required" : "optional"].push(line);
|
|
32029
|
-
if (required2.has(name) && !
|
|
32029
|
+
if (required2.has(name) && !compatible3) sections.requiredNames.push(name);
|
|
32030
32030
|
}
|
|
32031
32031
|
return sections;
|
|
32032
32032
|
}
|
|
@@ -34000,17 +34000,17 @@ ${issueLines(parsed.issues)}
|
|
|
34000
34000
|
if (!draft.appId || !envelope.dependencies?.transport || !["read", "create", "update", "delete"].includes(String(effect2)) || !envelope.verification?.inputs || !definition2.description) return fail5(`Capture needs a published app, selected connection, declared action meaning/effect and explicit verification.inputs. Edit: ${draft.filePath}
|
|
34001
34001
|
`);
|
|
34002
34002
|
if (definition2.inputs) {
|
|
34003
|
-
let
|
|
34003
|
+
let valid2;
|
|
34004
34004
|
let detail = "";
|
|
34005
34005
|
try {
|
|
34006
34006
|
const validate2 = ajv4.compile(definition2.inputs);
|
|
34007
|
-
|
|
34007
|
+
valid2 = Boolean(validate2(envelope.verification.inputs));
|
|
34008
34008
|
detail = (validate2.errors ?? []).map((error62) => ` ${error62.instancePath || "/verification/inputs"}: ${error62.message}`).join("\n");
|
|
34009
34009
|
} catch {
|
|
34010
34010
|
return fail5(`The declared action input schema is invalid. Fix ${draft.filePath} before recording.
|
|
34011
34011
|
`);
|
|
34012
34012
|
}
|
|
34013
|
-
if (!
|
|
34013
|
+
if (!valid2) return fail5(`verification.inputs do not match the declared action input schema. Fix ${draft.filePath} before recording.
|
|
34014
34014
|
${detail}
|
|
34015
34015
|
`);
|
|
34016
34016
|
}
|
|
@@ -34976,6 +34976,2040 @@ var init_main2 = __esm({
|
|
|
34976
34976
|
}
|
|
34977
34977
|
});
|
|
34978
34978
|
|
|
34979
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js
|
|
34980
|
+
var require_constants = __commonJS({
|
|
34981
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js"(exports, module) {
|
|
34982
|
+
"use strict";
|
|
34983
|
+
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
34984
|
+
var MAX_LENGTH = 256;
|
|
34985
|
+
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
34986
|
+
9007199254740991;
|
|
34987
|
+
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
34988
|
+
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
34989
|
+
var RELEASE_TYPES = [
|
|
34990
|
+
"major",
|
|
34991
|
+
"premajor",
|
|
34992
|
+
"minor",
|
|
34993
|
+
"preminor",
|
|
34994
|
+
"patch",
|
|
34995
|
+
"prepatch",
|
|
34996
|
+
"prerelease"
|
|
34997
|
+
];
|
|
34998
|
+
module.exports = {
|
|
34999
|
+
MAX_LENGTH,
|
|
35000
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
35001
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
35002
|
+
MAX_SAFE_INTEGER,
|
|
35003
|
+
RELEASE_TYPES,
|
|
35004
|
+
SEMVER_SPEC_VERSION,
|
|
35005
|
+
FLAG_INCLUDE_PRERELEASE: 1,
|
|
35006
|
+
FLAG_LOOSE: 2
|
|
35007
|
+
};
|
|
35008
|
+
}
|
|
35009
|
+
});
|
|
35010
|
+
|
|
35011
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js
|
|
35012
|
+
var require_debug = __commonJS({
|
|
35013
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js"(exports, module) {
|
|
35014
|
+
"use strict";
|
|
35015
|
+
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
35016
|
+
};
|
|
35017
|
+
module.exports = debug;
|
|
35018
|
+
}
|
|
35019
|
+
});
|
|
35020
|
+
|
|
35021
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js
|
|
35022
|
+
var require_re = __commonJS({
|
|
35023
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js"(exports, module) {
|
|
35024
|
+
"use strict";
|
|
35025
|
+
var {
|
|
35026
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
35027
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
35028
|
+
MAX_LENGTH
|
|
35029
|
+
} = require_constants();
|
|
35030
|
+
var debug = require_debug();
|
|
35031
|
+
exports = module.exports = {};
|
|
35032
|
+
var re = exports.re = [];
|
|
35033
|
+
var safeRe = exports.safeRe = [];
|
|
35034
|
+
var src = exports.src = [];
|
|
35035
|
+
var safeSrc = exports.safeSrc = [];
|
|
35036
|
+
var t = exports.t = {};
|
|
35037
|
+
var R = 0;
|
|
35038
|
+
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
35039
|
+
var safeRegexReplacements = [
|
|
35040
|
+
["\\s", 1],
|
|
35041
|
+
["\\d", MAX_LENGTH],
|
|
35042
|
+
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
35043
|
+
];
|
|
35044
|
+
var makeSafeRegex = (value) => {
|
|
35045
|
+
for (const [token, max] of safeRegexReplacements) {
|
|
35046
|
+
value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
35047
|
+
}
|
|
35048
|
+
return value;
|
|
35049
|
+
};
|
|
35050
|
+
var createToken = (name, value, isGlobal) => {
|
|
35051
|
+
const safe = makeSafeRegex(value);
|
|
35052
|
+
const index = R++;
|
|
35053
|
+
debug(name, index, value);
|
|
35054
|
+
t[name] = index;
|
|
35055
|
+
src[index] = value;
|
|
35056
|
+
safeSrc[index] = safe;
|
|
35057
|
+
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
35058
|
+
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
35059
|
+
};
|
|
35060
|
+
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
35061
|
+
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
35062
|
+
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
35063
|
+
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
35064
|
+
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
35065
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
|
|
35066
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
35067
|
+
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
35068
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
35069
|
+
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
35070
|
+
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
35071
|
+
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
35072
|
+
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
35073
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
35074
|
+
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
35075
|
+
createToken("GTLT", "((?:<|>)?=?)");
|
|
35076
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
35077
|
+
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
35078
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
35079
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
35080
|
+
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
35081
|
+
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
35082
|
+
createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
35083
|
+
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
35084
|
+
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
35085
|
+
createToken("COERCERTL", src[t.COERCE], true);
|
|
35086
|
+
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
35087
|
+
createToken("LONETILDE", "(?:~>?)");
|
|
35088
|
+
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
35089
|
+
exports.tildeTrimReplace = "$1~";
|
|
35090
|
+
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
35091
|
+
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
35092
|
+
createToken("LONECARET", "(?:\\^)");
|
|
35093
|
+
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
35094
|
+
exports.caretTrimReplace = "$1^";
|
|
35095
|
+
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
35096
|
+
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
35097
|
+
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
35098
|
+
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
35099
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
35100
|
+
exports.comparatorTrimReplace = "$1$2$3";
|
|
35101
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
35102
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
35103
|
+
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
35104
|
+
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
35105
|
+
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
35106
|
+
}
|
|
35107
|
+
});
|
|
35108
|
+
|
|
35109
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js
|
|
35110
|
+
var require_parse_options = __commonJS({
|
|
35111
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js"(exports, module) {
|
|
35112
|
+
"use strict";
|
|
35113
|
+
var looseOption = Object.freeze({ loose: true });
|
|
35114
|
+
var emptyOpts = Object.freeze({});
|
|
35115
|
+
var parseOptions = (options2) => {
|
|
35116
|
+
if (!options2) {
|
|
35117
|
+
return emptyOpts;
|
|
35118
|
+
}
|
|
35119
|
+
if (typeof options2 !== "object") {
|
|
35120
|
+
return looseOption;
|
|
35121
|
+
}
|
|
35122
|
+
return options2;
|
|
35123
|
+
};
|
|
35124
|
+
module.exports = parseOptions;
|
|
35125
|
+
}
|
|
35126
|
+
});
|
|
35127
|
+
|
|
35128
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js
|
|
35129
|
+
var require_identifiers = __commonJS({
|
|
35130
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js"(exports, module) {
|
|
35131
|
+
"use strict";
|
|
35132
|
+
var numeric = /^[0-9]+$/;
|
|
35133
|
+
var compareIdentifiers = (a, b) => {
|
|
35134
|
+
if (typeof a === "number" && typeof b === "number") {
|
|
35135
|
+
return a === b ? 0 : a < b ? -1 : 1;
|
|
35136
|
+
}
|
|
35137
|
+
const anum = numeric.test(a);
|
|
35138
|
+
const bnum = numeric.test(b);
|
|
35139
|
+
if (anum && bnum) {
|
|
35140
|
+
a = +a;
|
|
35141
|
+
b = +b;
|
|
35142
|
+
}
|
|
35143
|
+
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
35144
|
+
};
|
|
35145
|
+
var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
35146
|
+
module.exports = {
|
|
35147
|
+
compareIdentifiers,
|
|
35148
|
+
rcompareIdentifiers
|
|
35149
|
+
};
|
|
35150
|
+
}
|
|
35151
|
+
});
|
|
35152
|
+
|
|
35153
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js
|
|
35154
|
+
var require_semver = __commonJS({
|
|
35155
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js"(exports, module) {
|
|
35156
|
+
"use strict";
|
|
35157
|
+
var debug = require_debug();
|
|
35158
|
+
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
35159
|
+
var { safeRe: re, t } = require_re();
|
|
35160
|
+
var parseOptions = require_parse_options();
|
|
35161
|
+
var { compareIdentifiers } = require_identifiers();
|
|
35162
|
+
var isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
35163
|
+
const identifiers = identifier.split(".");
|
|
35164
|
+
if (identifiers.length > prerelease.length) {
|
|
35165
|
+
return false;
|
|
35166
|
+
}
|
|
35167
|
+
for (let i = 0; i < identifiers.length; i++) {
|
|
35168
|
+
if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
|
|
35169
|
+
return false;
|
|
35170
|
+
}
|
|
35171
|
+
}
|
|
35172
|
+
return true;
|
|
35173
|
+
};
|
|
35174
|
+
var SemVer = class _SemVer {
|
|
35175
|
+
constructor(version2, options2) {
|
|
35176
|
+
options2 = parseOptions(options2);
|
|
35177
|
+
if (version2 instanceof _SemVer) {
|
|
35178
|
+
if (version2.loose === !!options2.loose && version2.includePrerelease === !!options2.includePrerelease) {
|
|
35179
|
+
return version2;
|
|
35180
|
+
} else {
|
|
35181
|
+
version2 = version2.version;
|
|
35182
|
+
}
|
|
35183
|
+
} else if (typeof version2 !== "string") {
|
|
35184
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`);
|
|
35185
|
+
}
|
|
35186
|
+
if (version2.length > MAX_LENGTH) {
|
|
35187
|
+
throw new TypeError(
|
|
35188
|
+
`version is longer than ${MAX_LENGTH} characters`
|
|
35189
|
+
);
|
|
35190
|
+
}
|
|
35191
|
+
debug("SemVer", version2, options2);
|
|
35192
|
+
this.options = options2;
|
|
35193
|
+
this.loose = !!options2.loose;
|
|
35194
|
+
this.includePrerelease = !!options2.includePrerelease;
|
|
35195
|
+
const m = version2.trim().match(options2.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
35196
|
+
if (!m) {
|
|
35197
|
+
throw new TypeError(`Invalid Version: ${version2}`);
|
|
35198
|
+
}
|
|
35199
|
+
this.raw = version2;
|
|
35200
|
+
this.major = +m[1];
|
|
35201
|
+
this.minor = +m[2];
|
|
35202
|
+
this.patch = +m[3];
|
|
35203
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
35204
|
+
throw new TypeError("Invalid major version");
|
|
35205
|
+
}
|
|
35206
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
35207
|
+
throw new TypeError("Invalid minor version");
|
|
35208
|
+
}
|
|
35209
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
35210
|
+
throw new TypeError("Invalid patch version");
|
|
35211
|
+
}
|
|
35212
|
+
if (!m[4]) {
|
|
35213
|
+
this.prerelease = [];
|
|
35214
|
+
} else {
|
|
35215
|
+
this.prerelease = m[4].split(".").map((id2) => {
|
|
35216
|
+
if (/^[0-9]+$/.test(id2)) {
|
|
35217
|
+
const num = +id2;
|
|
35218
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
35219
|
+
return num;
|
|
35220
|
+
}
|
|
35221
|
+
}
|
|
35222
|
+
return id2;
|
|
35223
|
+
});
|
|
35224
|
+
}
|
|
35225
|
+
this.build = m[5] ? m[5].split(".") : [];
|
|
35226
|
+
this.format();
|
|
35227
|
+
}
|
|
35228
|
+
format() {
|
|
35229
|
+
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
35230
|
+
if (this.prerelease.length) {
|
|
35231
|
+
this.version += `-${this.prerelease.join(".")}`;
|
|
35232
|
+
}
|
|
35233
|
+
return this.version;
|
|
35234
|
+
}
|
|
35235
|
+
toString() {
|
|
35236
|
+
return this.version;
|
|
35237
|
+
}
|
|
35238
|
+
compare(other) {
|
|
35239
|
+
debug("SemVer.compare", this.version, this.options, other);
|
|
35240
|
+
if (!(other instanceof _SemVer)) {
|
|
35241
|
+
if (typeof other === "string" && other === this.version) {
|
|
35242
|
+
return 0;
|
|
35243
|
+
}
|
|
35244
|
+
other = new _SemVer(other, this.options);
|
|
35245
|
+
}
|
|
35246
|
+
if (other.version === this.version) {
|
|
35247
|
+
return 0;
|
|
35248
|
+
}
|
|
35249
|
+
return this.compareMain(other) || this.comparePre(other);
|
|
35250
|
+
}
|
|
35251
|
+
compareMain(other) {
|
|
35252
|
+
if (!(other instanceof _SemVer)) {
|
|
35253
|
+
other = new _SemVer(other, this.options);
|
|
35254
|
+
}
|
|
35255
|
+
if (this.major < other.major) {
|
|
35256
|
+
return -1;
|
|
35257
|
+
}
|
|
35258
|
+
if (this.major > other.major) {
|
|
35259
|
+
return 1;
|
|
35260
|
+
}
|
|
35261
|
+
if (this.minor < other.minor) {
|
|
35262
|
+
return -1;
|
|
35263
|
+
}
|
|
35264
|
+
if (this.minor > other.minor) {
|
|
35265
|
+
return 1;
|
|
35266
|
+
}
|
|
35267
|
+
if (this.patch < other.patch) {
|
|
35268
|
+
return -1;
|
|
35269
|
+
}
|
|
35270
|
+
if (this.patch > other.patch) {
|
|
35271
|
+
return 1;
|
|
35272
|
+
}
|
|
35273
|
+
return 0;
|
|
35274
|
+
}
|
|
35275
|
+
comparePre(other) {
|
|
35276
|
+
if (!(other instanceof _SemVer)) {
|
|
35277
|
+
other = new _SemVer(other, this.options);
|
|
35278
|
+
}
|
|
35279
|
+
if (this.prerelease.length && !other.prerelease.length) {
|
|
35280
|
+
return -1;
|
|
35281
|
+
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
35282
|
+
return 1;
|
|
35283
|
+
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
35284
|
+
return 0;
|
|
35285
|
+
}
|
|
35286
|
+
let i = 0;
|
|
35287
|
+
do {
|
|
35288
|
+
const a = this.prerelease[i];
|
|
35289
|
+
const b = other.prerelease[i];
|
|
35290
|
+
debug("prerelease compare", i, a, b);
|
|
35291
|
+
if (a === void 0 && b === void 0) {
|
|
35292
|
+
return 0;
|
|
35293
|
+
} else if (b === void 0) {
|
|
35294
|
+
return 1;
|
|
35295
|
+
} else if (a === void 0) {
|
|
35296
|
+
return -1;
|
|
35297
|
+
} else if (a === b) {
|
|
35298
|
+
continue;
|
|
35299
|
+
} else {
|
|
35300
|
+
return compareIdentifiers(a, b);
|
|
35301
|
+
}
|
|
35302
|
+
} while (++i);
|
|
35303
|
+
}
|
|
35304
|
+
compareBuild(other) {
|
|
35305
|
+
if (!(other instanceof _SemVer)) {
|
|
35306
|
+
other = new _SemVer(other, this.options);
|
|
35307
|
+
}
|
|
35308
|
+
let i = 0;
|
|
35309
|
+
do {
|
|
35310
|
+
const a = this.build[i];
|
|
35311
|
+
const b = other.build[i];
|
|
35312
|
+
debug("build compare", i, a, b);
|
|
35313
|
+
if (a === void 0 && b === void 0) {
|
|
35314
|
+
return 0;
|
|
35315
|
+
} else if (b === void 0) {
|
|
35316
|
+
return 1;
|
|
35317
|
+
} else if (a === void 0) {
|
|
35318
|
+
return -1;
|
|
35319
|
+
} else if (a === b) {
|
|
35320
|
+
continue;
|
|
35321
|
+
} else {
|
|
35322
|
+
return compareIdentifiers(a, b);
|
|
35323
|
+
}
|
|
35324
|
+
} while (++i);
|
|
35325
|
+
}
|
|
35326
|
+
// preminor will bump the version up to the next minor release, and immediately
|
|
35327
|
+
// down to pre-release. premajor and prepatch work the same way.
|
|
35328
|
+
inc(release, identifier, identifierBase) {
|
|
35329
|
+
if (release.startsWith("pre")) {
|
|
35330
|
+
if (!identifier && identifierBase === false) {
|
|
35331
|
+
throw new Error("invalid increment argument: identifier is empty");
|
|
35332
|
+
}
|
|
35333
|
+
if (identifier) {
|
|
35334
|
+
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
35335
|
+
if (!match || match[1] !== identifier) {
|
|
35336
|
+
throw new Error(`invalid identifier: ${identifier}`);
|
|
35337
|
+
}
|
|
35338
|
+
}
|
|
35339
|
+
}
|
|
35340
|
+
switch (release) {
|
|
35341
|
+
case "premajor":
|
|
35342
|
+
this.prerelease.length = 0;
|
|
35343
|
+
this.patch = 0;
|
|
35344
|
+
this.minor = 0;
|
|
35345
|
+
this.major++;
|
|
35346
|
+
this.inc("pre", identifier, identifierBase);
|
|
35347
|
+
break;
|
|
35348
|
+
case "preminor":
|
|
35349
|
+
this.prerelease.length = 0;
|
|
35350
|
+
this.patch = 0;
|
|
35351
|
+
this.minor++;
|
|
35352
|
+
this.inc("pre", identifier, identifierBase);
|
|
35353
|
+
break;
|
|
35354
|
+
case "prepatch":
|
|
35355
|
+
this.prerelease.length = 0;
|
|
35356
|
+
this.inc("patch", identifier, identifierBase);
|
|
35357
|
+
this.inc("pre", identifier, identifierBase);
|
|
35358
|
+
break;
|
|
35359
|
+
// If the input is a non-prerelease version, this acts the same as
|
|
35360
|
+
// prepatch.
|
|
35361
|
+
case "prerelease":
|
|
35362
|
+
if (this.prerelease.length === 0) {
|
|
35363
|
+
this.inc("patch", identifier, identifierBase);
|
|
35364
|
+
}
|
|
35365
|
+
this.inc("pre", identifier, identifierBase);
|
|
35366
|
+
break;
|
|
35367
|
+
case "release":
|
|
35368
|
+
if (this.prerelease.length === 0) {
|
|
35369
|
+
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
35370
|
+
}
|
|
35371
|
+
this.prerelease.length = 0;
|
|
35372
|
+
break;
|
|
35373
|
+
case "major":
|
|
35374
|
+
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
35375
|
+
this.major++;
|
|
35376
|
+
}
|
|
35377
|
+
this.minor = 0;
|
|
35378
|
+
this.patch = 0;
|
|
35379
|
+
this.prerelease = [];
|
|
35380
|
+
break;
|
|
35381
|
+
case "minor":
|
|
35382
|
+
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
35383
|
+
this.minor++;
|
|
35384
|
+
}
|
|
35385
|
+
this.patch = 0;
|
|
35386
|
+
this.prerelease = [];
|
|
35387
|
+
break;
|
|
35388
|
+
case "patch":
|
|
35389
|
+
if (this.prerelease.length === 0) {
|
|
35390
|
+
this.patch++;
|
|
35391
|
+
}
|
|
35392
|
+
this.prerelease = [];
|
|
35393
|
+
break;
|
|
35394
|
+
// This probably shouldn't be used publicly.
|
|
35395
|
+
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
35396
|
+
case "pre": {
|
|
35397
|
+
const base2 = Number(identifierBase) ? 1 : 0;
|
|
35398
|
+
if (this.prerelease.length === 0) {
|
|
35399
|
+
this.prerelease = [base2];
|
|
35400
|
+
} else {
|
|
35401
|
+
let i = this.prerelease.length;
|
|
35402
|
+
while (--i >= 0) {
|
|
35403
|
+
if (typeof this.prerelease[i] === "number") {
|
|
35404
|
+
this.prerelease[i]++;
|
|
35405
|
+
i = -2;
|
|
35406
|
+
}
|
|
35407
|
+
}
|
|
35408
|
+
if (i === -1) {
|
|
35409
|
+
if (identifier === this.prerelease.join(".") && identifierBase === false) {
|
|
35410
|
+
throw new Error("invalid increment argument: identifier already exists");
|
|
35411
|
+
}
|
|
35412
|
+
this.prerelease.push(base2);
|
|
35413
|
+
}
|
|
35414
|
+
}
|
|
35415
|
+
if (identifier) {
|
|
35416
|
+
let prerelease = [identifier, base2];
|
|
35417
|
+
if (identifierBase === false) {
|
|
35418
|
+
prerelease = [identifier];
|
|
35419
|
+
}
|
|
35420
|
+
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
35421
|
+
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
35422
|
+
if (isNaN(prereleaseBase)) {
|
|
35423
|
+
this.prerelease = prerelease;
|
|
35424
|
+
}
|
|
35425
|
+
} else {
|
|
35426
|
+
this.prerelease = prerelease;
|
|
35427
|
+
}
|
|
35428
|
+
}
|
|
35429
|
+
break;
|
|
35430
|
+
}
|
|
35431
|
+
default:
|
|
35432
|
+
throw new Error(`invalid increment argument: ${release}`);
|
|
35433
|
+
}
|
|
35434
|
+
this.raw = this.format();
|
|
35435
|
+
if (this.build.length) {
|
|
35436
|
+
this.raw += `+${this.build.join(".")}`;
|
|
35437
|
+
}
|
|
35438
|
+
return this;
|
|
35439
|
+
}
|
|
35440
|
+
};
|
|
35441
|
+
module.exports = SemVer;
|
|
35442
|
+
}
|
|
35443
|
+
});
|
|
35444
|
+
|
|
35445
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js
|
|
35446
|
+
var require_parse = __commonJS({
|
|
35447
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js"(exports, module) {
|
|
35448
|
+
"use strict";
|
|
35449
|
+
var SemVer = require_semver();
|
|
35450
|
+
var parse5 = (version2, options2, throwErrors = false) => {
|
|
35451
|
+
if (version2 instanceof SemVer) {
|
|
35452
|
+
return version2;
|
|
35453
|
+
}
|
|
35454
|
+
try {
|
|
35455
|
+
return new SemVer(version2, options2);
|
|
35456
|
+
} catch (er) {
|
|
35457
|
+
if (!throwErrors) {
|
|
35458
|
+
return null;
|
|
35459
|
+
}
|
|
35460
|
+
throw er;
|
|
35461
|
+
}
|
|
35462
|
+
};
|
|
35463
|
+
module.exports = parse5;
|
|
35464
|
+
}
|
|
35465
|
+
});
|
|
35466
|
+
|
|
35467
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js
|
|
35468
|
+
var require_valid = __commonJS({
|
|
35469
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js"(exports, module) {
|
|
35470
|
+
"use strict";
|
|
35471
|
+
var parse5 = require_parse();
|
|
35472
|
+
var valid2 = (version2, options2) => {
|
|
35473
|
+
const v = parse5(version2, options2);
|
|
35474
|
+
return v ? v.version : null;
|
|
35475
|
+
};
|
|
35476
|
+
module.exports = valid2;
|
|
35477
|
+
}
|
|
35478
|
+
});
|
|
35479
|
+
|
|
35480
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js
|
|
35481
|
+
var require_clean = __commonJS({
|
|
35482
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js"(exports, module) {
|
|
35483
|
+
"use strict";
|
|
35484
|
+
var parse5 = require_parse();
|
|
35485
|
+
var clean = (version2, options2) => {
|
|
35486
|
+
const s = parse5(version2.trim().replace(/^[=v]+/, ""), options2);
|
|
35487
|
+
return s ? s.version : null;
|
|
35488
|
+
};
|
|
35489
|
+
module.exports = clean;
|
|
35490
|
+
}
|
|
35491
|
+
});
|
|
35492
|
+
|
|
35493
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js
|
|
35494
|
+
var require_inc = __commonJS({
|
|
35495
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js"(exports, module) {
|
|
35496
|
+
"use strict";
|
|
35497
|
+
var SemVer = require_semver();
|
|
35498
|
+
var inc = (version2, release, options2, identifier, identifierBase) => {
|
|
35499
|
+
if (typeof options2 === "string") {
|
|
35500
|
+
identifierBase = identifier;
|
|
35501
|
+
identifier = options2;
|
|
35502
|
+
options2 = void 0;
|
|
35503
|
+
}
|
|
35504
|
+
try {
|
|
35505
|
+
return new SemVer(
|
|
35506
|
+
version2 instanceof SemVer ? version2.version : version2,
|
|
35507
|
+
options2
|
|
35508
|
+
).inc(release, identifier, identifierBase).version;
|
|
35509
|
+
} catch (er) {
|
|
35510
|
+
return null;
|
|
35511
|
+
}
|
|
35512
|
+
};
|
|
35513
|
+
module.exports = inc;
|
|
35514
|
+
}
|
|
35515
|
+
});
|
|
35516
|
+
|
|
35517
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js
|
|
35518
|
+
var require_diff = __commonJS({
|
|
35519
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js"(exports, module) {
|
|
35520
|
+
"use strict";
|
|
35521
|
+
var parse5 = require_parse();
|
|
35522
|
+
var diff = (version1, version2) => {
|
|
35523
|
+
const v1 = parse5(version1, null, true);
|
|
35524
|
+
const v2 = parse5(version2, null, true);
|
|
35525
|
+
const comparison = v1.compare(v2);
|
|
35526
|
+
if (comparison === 0) {
|
|
35527
|
+
return null;
|
|
35528
|
+
}
|
|
35529
|
+
const v1Higher = comparison > 0;
|
|
35530
|
+
const highVersion = v1Higher ? v1 : v2;
|
|
35531
|
+
const lowVersion = v1Higher ? v2 : v1;
|
|
35532
|
+
const highHasPre = !!highVersion.prerelease.length;
|
|
35533
|
+
const lowHasPre = !!lowVersion.prerelease.length;
|
|
35534
|
+
if (lowHasPre && !highHasPre) {
|
|
35535
|
+
if (!lowVersion.patch && !lowVersion.minor) {
|
|
35536
|
+
return "major";
|
|
35537
|
+
}
|
|
35538
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
35539
|
+
if (lowVersion.minor && !lowVersion.patch) {
|
|
35540
|
+
return "minor";
|
|
35541
|
+
}
|
|
35542
|
+
return "patch";
|
|
35543
|
+
}
|
|
35544
|
+
}
|
|
35545
|
+
const prefix = highHasPre ? "pre" : "";
|
|
35546
|
+
if (v1.major !== v2.major) {
|
|
35547
|
+
return prefix + "major";
|
|
35548
|
+
}
|
|
35549
|
+
if (v1.minor !== v2.minor) {
|
|
35550
|
+
return prefix + "minor";
|
|
35551
|
+
}
|
|
35552
|
+
if (v1.patch !== v2.patch) {
|
|
35553
|
+
return prefix + "patch";
|
|
35554
|
+
}
|
|
35555
|
+
return "prerelease";
|
|
35556
|
+
};
|
|
35557
|
+
module.exports = diff;
|
|
35558
|
+
}
|
|
35559
|
+
});
|
|
35560
|
+
|
|
35561
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js
|
|
35562
|
+
var require_major = __commonJS({
|
|
35563
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js"(exports, module) {
|
|
35564
|
+
"use strict";
|
|
35565
|
+
var SemVer = require_semver();
|
|
35566
|
+
var major = (a, loose) => new SemVer(a, loose).major;
|
|
35567
|
+
module.exports = major;
|
|
35568
|
+
}
|
|
35569
|
+
});
|
|
35570
|
+
|
|
35571
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js
|
|
35572
|
+
var require_minor = __commonJS({
|
|
35573
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js"(exports, module) {
|
|
35574
|
+
"use strict";
|
|
35575
|
+
var SemVer = require_semver();
|
|
35576
|
+
var minor = (a, loose) => new SemVer(a, loose).minor;
|
|
35577
|
+
module.exports = minor;
|
|
35578
|
+
}
|
|
35579
|
+
});
|
|
35580
|
+
|
|
35581
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js
|
|
35582
|
+
var require_patch = __commonJS({
|
|
35583
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js"(exports, module) {
|
|
35584
|
+
"use strict";
|
|
35585
|
+
var SemVer = require_semver();
|
|
35586
|
+
var patch = (a, loose) => new SemVer(a, loose).patch;
|
|
35587
|
+
module.exports = patch;
|
|
35588
|
+
}
|
|
35589
|
+
});
|
|
35590
|
+
|
|
35591
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js
|
|
35592
|
+
var require_prerelease = __commonJS({
|
|
35593
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js"(exports, module) {
|
|
35594
|
+
"use strict";
|
|
35595
|
+
var parse5 = require_parse();
|
|
35596
|
+
var prerelease = (version2, options2) => {
|
|
35597
|
+
const parsed = parse5(version2, options2);
|
|
35598
|
+
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
35599
|
+
};
|
|
35600
|
+
module.exports = prerelease;
|
|
35601
|
+
}
|
|
35602
|
+
});
|
|
35603
|
+
|
|
35604
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js
|
|
35605
|
+
var require_compare = __commonJS({
|
|
35606
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js"(exports, module) {
|
|
35607
|
+
"use strict";
|
|
35608
|
+
var SemVer = require_semver();
|
|
35609
|
+
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
35610
|
+
module.exports = compare;
|
|
35611
|
+
}
|
|
35612
|
+
});
|
|
35613
|
+
|
|
35614
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js
|
|
35615
|
+
var require_rcompare = __commonJS({
|
|
35616
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js"(exports, module) {
|
|
35617
|
+
"use strict";
|
|
35618
|
+
var compare = require_compare();
|
|
35619
|
+
var rcompare = (a, b, loose) => compare(b, a, loose);
|
|
35620
|
+
module.exports = rcompare;
|
|
35621
|
+
}
|
|
35622
|
+
});
|
|
35623
|
+
|
|
35624
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js
|
|
35625
|
+
var require_compare_loose = __commonJS({
|
|
35626
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js"(exports, module) {
|
|
35627
|
+
"use strict";
|
|
35628
|
+
var compare = require_compare();
|
|
35629
|
+
var compareLoose = (a, b) => compare(a, b, true);
|
|
35630
|
+
module.exports = compareLoose;
|
|
35631
|
+
}
|
|
35632
|
+
});
|
|
35633
|
+
|
|
35634
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js
|
|
35635
|
+
var require_compare_build = __commonJS({
|
|
35636
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js"(exports, module) {
|
|
35637
|
+
"use strict";
|
|
35638
|
+
var SemVer = require_semver();
|
|
35639
|
+
var compareBuild = (a, b, loose) => {
|
|
35640
|
+
const versionA = new SemVer(a, loose);
|
|
35641
|
+
const versionB = new SemVer(b, loose);
|
|
35642
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
35643
|
+
};
|
|
35644
|
+
module.exports = compareBuild;
|
|
35645
|
+
}
|
|
35646
|
+
});
|
|
35647
|
+
|
|
35648
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js
|
|
35649
|
+
var require_sort = __commonJS({
|
|
35650
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js"(exports, module) {
|
|
35651
|
+
"use strict";
|
|
35652
|
+
var compareBuild = require_compare_build();
|
|
35653
|
+
var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
35654
|
+
module.exports = sort;
|
|
35655
|
+
}
|
|
35656
|
+
});
|
|
35657
|
+
|
|
35658
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js
|
|
35659
|
+
var require_rsort = __commonJS({
|
|
35660
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js"(exports, module) {
|
|
35661
|
+
"use strict";
|
|
35662
|
+
var compareBuild = require_compare_build();
|
|
35663
|
+
var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
35664
|
+
module.exports = rsort;
|
|
35665
|
+
}
|
|
35666
|
+
});
|
|
35667
|
+
|
|
35668
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js
|
|
35669
|
+
var require_gt = __commonJS({
|
|
35670
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js"(exports, module) {
|
|
35671
|
+
"use strict";
|
|
35672
|
+
var compare = require_compare();
|
|
35673
|
+
var gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
35674
|
+
module.exports = gt;
|
|
35675
|
+
}
|
|
35676
|
+
});
|
|
35677
|
+
|
|
35678
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js
|
|
35679
|
+
var require_lt = __commonJS({
|
|
35680
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js"(exports, module) {
|
|
35681
|
+
"use strict";
|
|
35682
|
+
var compare = require_compare();
|
|
35683
|
+
var lt2 = (a, b, loose) => compare(a, b, loose) < 0;
|
|
35684
|
+
module.exports = lt2;
|
|
35685
|
+
}
|
|
35686
|
+
});
|
|
35687
|
+
|
|
35688
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js
|
|
35689
|
+
var require_eq = __commonJS({
|
|
35690
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js"(exports, module) {
|
|
35691
|
+
"use strict";
|
|
35692
|
+
var compare = require_compare();
|
|
35693
|
+
var eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
35694
|
+
module.exports = eq;
|
|
35695
|
+
}
|
|
35696
|
+
});
|
|
35697
|
+
|
|
35698
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js
|
|
35699
|
+
var require_neq = __commonJS({
|
|
35700
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js"(exports, module) {
|
|
35701
|
+
"use strict";
|
|
35702
|
+
var compare = require_compare();
|
|
35703
|
+
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
35704
|
+
module.exports = neq;
|
|
35705
|
+
}
|
|
35706
|
+
});
|
|
35707
|
+
|
|
35708
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js
|
|
35709
|
+
var require_gte = __commonJS({
|
|
35710
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js"(exports, module) {
|
|
35711
|
+
"use strict";
|
|
35712
|
+
var compare = require_compare();
|
|
35713
|
+
var gte2 = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
35714
|
+
module.exports = gte2;
|
|
35715
|
+
}
|
|
35716
|
+
});
|
|
35717
|
+
|
|
35718
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js
|
|
35719
|
+
var require_lte = __commonJS({
|
|
35720
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js"(exports, module) {
|
|
35721
|
+
"use strict";
|
|
35722
|
+
var compare = require_compare();
|
|
35723
|
+
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
35724
|
+
module.exports = lte;
|
|
35725
|
+
}
|
|
35726
|
+
});
|
|
35727
|
+
|
|
35728
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js
|
|
35729
|
+
var require_cmp = __commonJS({
|
|
35730
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js"(exports, module) {
|
|
35731
|
+
"use strict";
|
|
35732
|
+
var eq = require_eq();
|
|
35733
|
+
var neq = require_neq();
|
|
35734
|
+
var gt = require_gt();
|
|
35735
|
+
var gte2 = require_gte();
|
|
35736
|
+
var lt2 = require_lt();
|
|
35737
|
+
var lte = require_lte();
|
|
35738
|
+
var cmp = (a, op, b, loose) => {
|
|
35739
|
+
switch (op) {
|
|
35740
|
+
case "===":
|
|
35741
|
+
if (typeof a === "object") {
|
|
35742
|
+
a = a.version;
|
|
35743
|
+
}
|
|
35744
|
+
if (typeof b === "object") {
|
|
35745
|
+
b = b.version;
|
|
35746
|
+
}
|
|
35747
|
+
return a === b;
|
|
35748
|
+
case "!==":
|
|
35749
|
+
if (typeof a === "object") {
|
|
35750
|
+
a = a.version;
|
|
35751
|
+
}
|
|
35752
|
+
if (typeof b === "object") {
|
|
35753
|
+
b = b.version;
|
|
35754
|
+
}
|
|
35755
|
+
return a !== b;
|
|
35756
|
+
case "":
|
|
35757
|
+
case "=":
|
|
35758
|
+
case "==":
|
|
35759
|
+
return eq(a, b, loose);
|
|
35760
|
+
case "!=":
|
|
35761
|
+
return neq(a, b, loose);
|
|
35762
|
+
case ">":
|
|
35763
|
+
return gt(a, b, loose);
|
|
35764
|
+
case ">=":
|
|
35765
|
+
return gte2(a, b, loose);
|
|
35766
|
+
case "<":
|
|
35767
|
+
return lt2(a, b, loose);
|
|
35768
|
+
case "<=":
|
|
35769
|
+
return lte(a, b, loose);
|
|
35770
|
+
default:
|
|
35771
|
+
throw new TypeError(`Invalid operator: ${op}`);
|
|
35772
|
+
}
|
|
35773
|
+
};
|
|
35774
|
+
module.exports = cmp;
|
|
35775
|
+
}
|
|
35776
|
+
});
|
|
35777
|
+
|
|
35778
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js
|
|
35779
|
+
var require_coerce = __commonJS({
|
|
35780
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js"(exports, module) {
|
|
35781
|
+
"use strict";
|
|
35782
|
+
var SemVer = require_semver();
|
|
35783
|
+
var parse5 = require_parse();
|
|
35784
|
+
var { safeRe: re, t } = require_re();
|
|
35785
|
+
var coerce = (version2, options2) => {
|
|
35786
|
+
if (version2 instanceof SemVer) {
|
|
35787
|
+
return version2;
|
|
35788
|
+
}
|
|
35789
|
+
if (typeof version2 === "number") {
|
|
35790
|
+
version2 = String(version2);
|
|
35791
|
+
}
|
|
35792
|
+
if (typeof version2 !== "string") {
|
|
35793
|
+
return null;
|
|
35794
|
+
}
|
|
35795
|
+
options2 = options2 || {};
|
|
35796
|
+
let match = null;
|
|
35797
|
+
if (!options2.rtl) {
|
|
35798
|
+
match = version2.match(options2.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
35799
|
+
} else {
|
|
35800
|
+
const coerceRtlRegex = options2.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
35801
|
+
let next;
|
|
35802
|
+
while ((next = coerceRtlRegex.exec(version2)) && (!match || match.index + match[0].length !== version2.length)) {
|
|
35803
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
|
35804
|
+
match = next;
|
|
35805
|
+
}
|
|
35806
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
35807
|
+
}
|
|
35808
|
+
coerceRtlRegex.lastIndex = -1;
|
|
35809
|
+
}
|
|
35810
|
+
if (match === null) {
|
|
35811
|
+
return null;
|
|
35812
|
+
}
|
|
35813
|
+
const major = match[2];
|
|
35814
|
+
const minor = match[3] || "0";
|
|
35815
|
+
const patch = match[4] || "0";
|
|
35816
|
+
const prerelease = options2.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
35817
|
+
const build = options2.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
35818
|
+
return parse5(`${major}.${minor}.${patch}${prerelease}${build}`, options2);
|
|
35819
|
+
};
|
|
35820
|
+
module.exports = coerce;
|
|
35821
|
+
}
|
|
35822
|
+
});
|
|
35823
|
+
|
|
35824
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js
|
|
35825
|
+
var require_truncate = __commonJS({
|
|
35826
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js"(exports, module) {
|
|
35827
|
+
"use strict";
|
|
35828
|
+
var parse5 = require_parse();
|
|
35829
|
+
var constants = require_constants();
|
|
35830
|
+
var SemVer = require_semver();
|
|
35831
|
+
var truncate = (version2, truncation, options2) => {
|
|
35832
|
+
if (!constants.RELEASE_TYPES.includes(truncation)) {
|
|
35833
|
+
return null;
|
|
35834
|
+
}
|
|
35835
|
+
const clonedVersion = cloneInputVersion(version2, options2);
|
|
35836
|
+
return clonedVersion && doTruncation(clonedVersion, truncation);
|
|
35837
|
+
};
|
|
35838
|
+
var cloneInputVersion = (version2, options2) => {
|
|
35839
|
+
const versionStringToParse = version2 instanceof SemVer ? version2.version : version2;
|
|
35840
|
+
return parse5(versionStringToParse, options2);
|
|
35841
|
+
};
|
|
35842
|
+
var doTruncation = (version2, truncation) => {
|
|
35843
|
+
if (isPrerelease(truncation)) {
|
|
35844
|
+
return version2.version;
|
|
35845
|
+
}
|
|
35846
|
+
version2.prerelease = [];
|
|
35847
|
+
switch (truncation) {
|
|
35848
|
+
case "major":
|
|
35849
|
+
version2.minor = 0;
|
|
35850
|
+
version2.patch = 0;
|
|
35851
|
+
break;
|
|
35852
|
+
case "minor":
|
|
35853
|
+
version2.patch = 0;
|
|
35854
|
+
break;
|
|
35855
|
+
}
|
|
35856
|
+
return version2.format();
|
|
35857
|
+
};
|
|
35858
|
+
var isPrerelease = (type) => {
|
|
35859
|
+
return type.startsWith("pre");
|
|
35860
|
+
};
|
|
35861
|
+
module.exports = truncate;
|
|
35862
|
+
}
|
|
35863
|
+
});
|
|
35864
|
+
|
|
35865
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js
|
|
35866
|
+
var require_lrucache = __commonJS({
|
|
35867
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js"(exports, module) {
|
|
35868
|
+
"use strict";
|
|
35869
|
+
var LRUCache = class {
|
|
35870
|
+
constructor() {
|
|
35871
|
+
this.max = 1e3;
|
|
35872
|
+
this.map = /* @__PURE__ */ new Map();
|
|
35873
|
+
}
|
|
35874
|
+
get(key) {
|
|
35875
|
+
const value = this.map.get(key);
|
|
35876
|
+
if (value === void 0) {
|
|
35877
|
+
return void 0;
|
|
35878
|
+
} else {
|
|
35879
|
+
this.map.delete(key);
|
|
35880
|
+
this.map.set(key, value);
|
|
35881
|
+
return value;
|
|
35882
|
+
}
|
|
35883
|
+
}
|
|
35884
|
+
delete(key) {
|
|
35885
|
+
return this.map.delete(key);
|
|
35886
|
+
}
|
|
35887
|
+
set(key, value) {
|
|
35888
|
+
const deleted = this.delete(key);
|
|
35889
|
+
if (!deleted && value !== void 0) {
|
|
35890
|
+
if (this.map.size >= this.max) {
|
|
35891
|
+
const firstKey = this.map.keys().next().value;
|
|
35892
|
+
this.delete(firstKey);
|
|
35893
|
+
}
|
|
35894
|
+
this.map.set(key, value);
|
|
35895
|
+
}
|
|
35896
|
+
return this;
|
|
35897
|
+
}
|
|
35898
|
+
};
|
|
35899
|
+
module.exports = LRUCache;
|
|
35900
|
+
}
|
|
35901
|
+
});
|
|
35902
|
+
|
|
35903
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js
|
|
35904
|
+
var require_range = __commonJS({
|
|
35905
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js"(exports, module) {
|
|
35906
|
+
"use strict";
|
|
35907
|
+
var SPACE_CHARACTERS = /\s+/g;
|
|
35908
|
+
var Range = class _Range {
|
|
35909
|
+
constructor(range, options2) {
|
|
35910
|
+
options2 = parseOptions(options2);
|
|
35911
|
+
if (range instanceof _Range) {
|
|
35912
|
+
if (range.loose === !!options2.loose && range.includePrerelease === !!options2.includePrerelease) {
|
|
35913
|
+
return range;
|
|
35914
|
+
} else {
|
|
35915
|
+
return new _Range(range.raw, options2);
|
|
35916
|
+
}
|
|
35917
|
+
}
|
|
35918
|
+
if (range instanceof Comparator) {
|
|
35919
|
+
this.raw = range.value;
|
|
35920
|
+
this.set = [[range]];
|
|
35921
|
+
this.formatted = void 0;
|
|
35922
|
+
return this;
|
|
35923
|
+
}
|
|
35924
|
+
this.options = options2;
|
|
35925
|
+
this.loose = !!options2.loose;
|
|
35926
|
+
this.includePrerelease = !!options2.includePrerelease;
|
|
35927
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
35928
|
+
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
35929
|
+
if (!this.set.length) {
|
|
35930
|
+
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
35931
|
+
}
|
|
35932
|
+
if (this.set.length > 1) {
|
|
35933
|
+
const first = this.set[0];
|
|
35934
|
+
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
35935
|
+
if (this.set.length === 0) {
|
|
35936
|
+
this.set = [first];
|
|
35937
|
+
} else if (this.set.length > 1) {
|
|
35938
|
+
for (const c of this.set) {
|
|
35939
|
+
if (c.length === 1 && isAny(c[0])) {
|
|
35940
|
+
this.set = [c];
|
|
35941
|
+
break;
|
|
35942
|
+
}
|
|
35943
|
+
}
|
|
35944
|
+
}
|
|
35945
|
+
}
|
|
35946
|
+
this.formatted = void 0;
|
|
35947
|
+
}
|
|
35948
|
+
get range() {
|
|
35949
|
+
if (this.formatted === void 0) {
|
|
35950
|
+
this.formatted = "";
|
|
35951
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
35952
|
+
if (i > 0) {
|
|
35953
|
+
this.formatted += "||";
|
|
35954
|
+
}
|
|
35955
|
+
const comps = this.set[i];
|
|
35956
|
+
for (let k = 0; k < comps.length; k++) {
|
|
35957
|
+
if (k > 0) {
|
|
35958
|
+
this.formatted += " ";
|
|
35959
|
+
}
|
|
35960
|
+
this.formatted += comps[k].toString().trim();
|
|
35961
|
+
}
|
|
35962
|
+
}
|
|
35963
|
+
}
|
|
35964
|
+
return this.formatted;
|
|
35965
|
+
}
|
|
35966
|
+
format() {
|
|
35967
|
+
return this.range;
|
|
35968
|
+
}
|
|
35969
|
+
toString() {
|
|
35970
|
+
return this.range;
|
|
35971
|
+
}
|
|
35972
|
+
parseRange(range) {
|
|
35973
|
+
range = range.replace(BUILDSTRIPRE, "");
|
|
35974
|
+
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
35975
|
+
const memoKey = memoOpts + ":" + range;
|
|
35976
|
+
const cached2 = cache.get(memoKey);
|
|
35977
|
+
if (cached2) {
|
|
35978
|
+
return cached2;
|
|
35979
|
+
}
|
|
35980
|
+
const loose = this.options.loose;
|
|
35981
|
+
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
35982
|
+
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
35983
|
+
debug("hyphen replace", range);
|
|
35984
|
+
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
35985
|
+
debug("comparator trim", range);
|
|
35986
|
+
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
35987
|
+
debug("tilde trim", range);
|
|
35988
|
+
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
35989
|
+
debug("caret trim", range);
|
|
35990
|
+
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
35991
|
+
if (loose) {
|
|
35992
|
+
rangeList = rangeList.filter((comp) => {
|
|
35993
|
+
debug("loose invalid filter", comp, this.options);
|
|
35994
|
+
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
35995
|
+
});
|
|
35996
|
+
}
|
|
35997
|
+
debug("range list", rangeList);
|
|
35998
|
+
const rangeMap = /* @__PURE__ */ new Map();
|
|
35999
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
36000
|
+
for (const comp of comparators) {
|
|
36001
|
+
if (isNullSet(comp)) {
|
|
36002
|
+
return [comp];
|
|
36003
|
+
}
|
|
36004
|
+
rangeMap.set(comp.value, comp);
|
|
36005
|
+
}
|
|
36006
|
+
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
36007
|
+
rangeMap.delete("");
|
|
36008
|
+
}
|
|
36009
|
+
const result3 = [...rangeMap.values()];
|
|
36010
|
+
cache.set(memoKey, result3);
|
|
36011
|
+
return result3;
|
|
36012
|
+
}
|
|
36013
|
+
intersects(range, options2) {
|
|
36014
|
+
if (!(range instanceof _Range)) {
|
|
36015
|
+
throw new TypeError("a Range is required");
|
|
36016
|
+
}
|
|
36017
|
+
return this.set.some((thisComparators) => {
|
|
36018
|
+
return isSatisfiable(thisComparators, options2) && range.set.some((rangeComparators) => {
|
|
36019
|
+
return isSatisfiable(rangeComparators, options2) && thisComparators.every((thisComparator) => {
|
|
36020
|
+
return rangeComparators.every((rangeComparator) => {
|
|
36021
|
+
return thisComparator.intersects(rangeComparator, options2);
|
|
36022
|
+
});
|
|
36023
|
+
});
|
|
36024
|
+
});
|
|
36025
|
+
});
|
|
36026
|
+
}
|
|
36027
|
+
// if ANY of the sets match ALL of its comparators, then pass
|
|
36028
|
+
test(version2) {
|
|
36029
|
+
if (!version2) {
|
|
36030
|
+
return false;
|
|
36031
|
+
}
|
|
36032
|
+
if (typeof version2 === "string") {
|
|
36033
|
+
try {
|
|
36034
|
+
version2 = new SemVer(version2, this.options);
|
|
36035
|
+
} catch (er) {
|
|
36036
|
+
return false;
|
|
36037
|
+
}
|
|
36038
|
+
}
|
|
36039
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
36040
|
+
if (testSet(this.set[i], version2, this.options)) {
|
|
36041
|
+
return true;
|
|
36042
|
+
}
|
|
36043
|
+
}
|
|
36044
|
+
return false;
|
|
36045
|
+
}
|
|
36046
|
+
};
|
|
36047
|
+
module.exports = Range;
|
|
36048
|
+
var LRU = require_lrucache();
|
|
36049
|
+
var cache = new LRU();
|
|
36050
|
+
var parseOptions = require_parse_options();
|
|
36051
|
+
var Comparator = require_comparator();
|
|
36052
|
+
var debug = require_debug();
|
|
36053
|
+
var SemVer = require_semver();
|
|
36054
|
+
var {
|
|
36055
|
+
safeRe: re,
|
|
36056
|
+
src,
|
|
36057
|
+
t,
|
|
36058
|
+
comparatorTrimReplace,
|
|
36059
|
+
tildeTrimReplace,
|
|
36060
|
+
caretTrimReplace
|
|
36061
|
+
} = require_re();
|
|
36062
|
+
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
36063
|
+
var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
|
|
36064
|
+
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
36065
|
+
var isAny = (c) => c.value === "";
|
|
36066
|
+
var isSatisfiable = (comparators, options2) => {
|
|
36067
|
+
let result3 = true;
|
|
36068
|
+
const remainingComparators = comparators.slice();
|
|
36069
|
+
let testComparator = remainingComparators.pop();
|
|
36070
|
+
while (result3 && remainingComparators.length) {
|
|
36071
|
+
result3 = remainingComparators.every((otherComparator) => {
|
|
36072
|
+
return testComparator.intersects(otherComparator, options2);
|
|
36073
|
+
});
|
|
36074
|
+
testComparator = remainingComparators.pop();
|
|
36075
|
+
}
|
|
36076
|
+
return result3;
|
|
36077
|
+
};
|
|
36078
|
+
var parseComparator = (comp, options2) => {
|
|
36079
|
+
comp = comp.replace(re[t.BUILD], "");
|
|
36080
|
+
debug("comp", comp, options2);
|
|
36081
|
+
comp = replaceCarets(comp, options2);
|
|
36082
|
+
debug("caret", comp);
|
|
36083
|
+
comp = replaceTildes(comp, options2);
|
|
36084
|
+
debug("tildes", comp);
|
|
36085
|
+
comp = replaceXRanges(comp, options2);
|
|
36086
|
+
debug("xrange", comp);
|
|
36087
|
+
comp = replaceStars(comp, options2);
|
|
36088
|
+
debug("stars", comp);
|
|
36089
|
+
return comp;
|
|
36090
|
+
};
|
|
36091
|
+
var isX = (id2) => !id2 || id2.toLowerCase() === "x" || id2 === "*";
|
|
36092
|
+
var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
|
|
36093
|
+
var replaceTildes = (comp, options2) => {
|
|
36094
|
+
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options2)).join(" ");
|
|
36095
|
+
};
|
|
36096
|
+
var replaceTilde = (comp, options2) => {
|
|
36097
|
+
const r = options2.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
36098
|
+
const z2 = options2.includePrerelease ? "-0" : "";
|
|
36099
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
36100
|
+
debug("tilde", comp, _, M, m, p, pr);
|
|
36101
|
+
let ret;
|
|
36102
|
+
if (isX(M)) {
|
|
36103
|
+
ret = "";
|
|
36104
|
+
} else if (isX(m)) {
|
|
36105
|
+
ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`;
|
|
36106
|
+
} else if (isX(p)) {
|
|
36107
|
+
ret = `>=${M}.${m}.0${z2} <${M}.${+m + 1}.0-0`;
|
|
36108
|
+
} else if (pr) {
|
|
36109
|
+
debug("replaceTilde pr", pr);
|
|
36110
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
36111
|
+
} else {
|
|
36112
|
+
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
36113
|
+
}
|
|
36114
|
+
debug("tilde return", ret);
|
|
36115
|
+
return ret;
|
|
36116
|
+
});
|
|
36117
|
+
};
|
|
36118
|
+
var replaceCarets = (comp, options2) => {
|
|
36119
|
+
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options2)).join(" ");
|
|
36120
|
+
};
|
|
36121
|
+
var replaceCaret = (comp, options2) => {
|
|
36122
|
+
debug("caret", comp, options2);
|
|
36123
|
+
const r = options2.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
36124
|
+
const z2 = options2.includePrerelease ? "-0" : "";
|
|
36125
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
36126
|
+
debug("caret", comp, _, M, m, p, pr);
|
|
36127
|
+
let ret;
|
|
36128
|
+
if (isX(M)) {
|
|
36129
|
+
ret = "";
|
|
36130
|
+
} else if (isX(m)) {
|
|
36131
|
+
ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`;
|
|
36132
|
+
} else if (isX(p)) {
|
|
36133
|
+
if (M === "0") {
|
|
36134
|
+
ret = `>=${M}.${m}.0${z2} <${M}.${+m + 1}.0-0`;
|
|
36135
|
+
} else {
|
|
36136
|
+
ret = `>=${M}.${m}.0${z2} <${+M + 1}.0.0-0`;
|
|
36137
|
+
}
|
|
36138
|
+
} else if (pr) {
|
|
36139
|
+
debug("replaceCaret pr", pr);
|
|
36140
|
+
if (M === "0") {
|
|
36141
|
+
if (m === "0") {
|
|
36142
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
36143
|
+
} else {
|
|
36144
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
36145
|
+
}
|
|
36146
|
+
} else {
|
|
36147
|
+
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
36148
|
+
}
|
|
36149
|
+
} else {
|
|
36150
|
+
debug("no pr");
|
|
36151
|
+
if (M === "0") {
|
|
36152
|
+
if (m === "0") {
|
|
36153
|
+
ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
|
|
36154
|
+
} else {
|
|
36155
|
+
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
36156
|
+
}
|
|
36157
|
+
} else {
|
|
36158
|
+
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
36159
|
+
}
|
|
36160
|
+
}
|
|
36161
|
+
debug("caret return", ret);
|
|
36162
|
+
return ret;
|
|
36163
|
+
});
|
|
36164
|
+
};
|
|
36165
|
+
var replaceXRanges = (comp, options2) => {
|
|
36166
|
+
debug("replaceXRanges", comp, options2);
|
|
36167
|
+
return comp.split(/\s+/).map((c) => replaceXRange(c, options2)).join(" ");
|
|
36168
|
+
};
|
|
36169
|
+
var replaceXRange = (comp, options2) => {
|
|
36170
|
+
comp = comp.trim();
|
|
36171
|
+
const r = options2.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
36172
|
+
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
36173
|
+
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
36174
|
+
if (invalidXRangeOrder(M, m, p)) {
|
|
36175
|
+
return comp;
|
|
36176
|
+
}
|
|
36177
|
+
const xM = isX(M);
|
|
36178
|
+
const xm = xM || isX(m);
|
|
36179
|
+
const xp = xm || isX(p);
|
|
36180
|
+
const anyX = xp;
|
|
36181
|
+
if (gtlt === "=" && anyX) {
|
|
36182
|
+
gtlt = "";
|
|
36183
|
+
}
|
|
36184
|
+
pr = options2.includePrerelease ? "-0" : "";
|
|
36185
|
+
if (xM) {
|
|
36186
|
+
if (gtlt === ">" || gtlt === "<") {
|
|
36187
|
+
ret = "<0.0.0-0";
|
|
36188
|
+
} else {
|
|
36189
|
+
ret = "*";
|
|
36190
|
+
}
|
|
36191
|
+
} else if (gtlt && anyX) {
|
|
36192
|
+
if (xm) {
|
|
36193
|
+
m = 0;
|
|
36194
|
+
}
|
|
36195
|
+
p = 0;
|
|
36196
|
+
if (gtlt === ">") {
|
|
36197
|
+
gtlt = ">=";
|
|
36198
|
+
if (xm) {
|
|
36199
|
+
M = +M + 1;
|
|
36200
|
+
m = 0;
|
|
36201
|
+
p = 0;
|
|
36202
|
+
} else {
|
|
36203
|
+
m = +m + 1;
|
|
36204
|
+
p = 0;
|
|
36205
|
+
}
|
|
36206
|
+
} else if (gtlt === "<=") {
|
|
36207
|
+
gtlt = "<";
|
|
36208
|
+
if (xm) {
|
|
36209
|
+
M = +M + 1;
|
|
36210
|
+
} else {
|
|
36211
|
+
m = +m + 1;
|
|
36212
|
+
}
|
|
36213
|
+
}
|
|
36214
|
+
if (gtlt === "<") {
|
|
36215
|
+
pr = "-0";
|
|
36216
|
+
}
|
|
36217
|
+
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
36218
|
+
} else if (xm) {
|
|
36219
|
+
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
36220
|
+
} else if (xp) {
|
|
36221
|
+
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
36222
|
+
}
|
|
36223
|
+
debug("xRange return", ret);
|
|
36224
|
+
return ret;
|
|
36225
|
+
});
|
|
36226
|
+
};
|
|
36227
|
+
var replaceStars = (comp, options2) => {
|
|
36228
|
+
debug("replaceStars", comp, options2);
|
|
36229
|
+
return comp.trim().replace(re[t.STAR], "");
|
|
36230
|
+
};
|
|
36231
|
+
var replaceGTE0 = (comp, options2) => {
|
|
36232
|
+
debug("replaceGTE0", comp, options2);
|
|
36233
|
+
return comp.trim().replace(re[options2.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
36234
|
+
};
|
|
36235
|
+
var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
36236
|
+
if (isX(fM)) {
|
|
36237
|
+
from = "";
|
|
36238
|
+
} else if (isX(fm)) {
|
|
36239
|
+
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
36240
|
+
} else if (isX(fp)) {
|
|
36241
|
+
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
36242
|
+
} else if (fpr) {
|
|
36243
|
+
from = `>=${from}`;
|
|
36244
|
+
} else {
|
|
36245
|
+
from = `>=${from}${incPr ? "-0" : ""}`;
|
|
36246
|
+
}
|
|
36247
|
+
if (isX(tM)) {
|
|
36248
|
+
to = "";
|
|
36249
|
+
} else if (isX(tm)) {
|
|
36250
|
+
to = `<${+tM + 1}.0.0-0`;
|
|
36251
|
+
} else if (isX(tp)) {
|
|
36252
|
+
to = `<${tM}.${+tm + 1}.0-0`;
|
|
36253
|
+
} else if (tpr) {
|
|
36254
|
+
to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
36255
|
+
} else if (incPr) {
|
|
36256
|
+
to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
36257
|
+
} else {
|
|
36258
|
+
to = `<=${to}`;
|
|
36259
|
+
}
|
|
36260
|
+
return `${from} ${to}`.trim();
|
|
36261
|
+
};
|
|
36262
|
+
var testSet = (set2, version2, options2) => {
|
|
36263
|
+
for (let i = 0; i < set2.length; i++) {
|
|
36264
|
+
if (!set2[i].test(version2)) {
|
|
36265
|
+
return false;
|
|
36266
|
+
}
|
|
36267
|
+
}
|
|
36268
|
+
if (version2.prerelease.length && !options2.includePrerelease) {
|
|
36269
|
+
for (let i = 0; i < set2.length; i++) {
|
|
36270
|
+
debug(set2[i].semver);
|
|
36271
|
+
if (set2[i].semver === Comparator.ANY) {
|
|
36272
|
+
continue;
|
|
36273
|
+
}
|
|
36274
|
+
if (set2[i].semver.prerelease.length > 0) {
|
|
36275
|
+
const allowed = set2[i].semver;
|
|
36276
|
+
if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) {
|
|
36277
|
+
return true;
|
|
36278
|
+
}
|
|
36279
|
+
}
|
|
36280
|
+
}
|
|
36281
|
+
return false;
|
|
36282
|
+
}
|
|
36283
|
+
return true;
|
|
36284
|
+
};
|
|
36285
|
+
}
|
|
36286
|
+
});
|
|
36287
|
+
|
|
36288
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js
|
|
36289
|
+
var require_comparator = __commonJS({
|
|
36290
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js"(exports, module) {
|
|
36291
|
+
"use strict";
|
|
36292
|
+
var ANY = Symbol("SemVer ANY");
|
|
36293
|
+
var Comparator = class _Comparator {
|
|
36294
|
+
static get ANY() {
|
|
36295
|
+
return ANY;
|
|
36296
|
+
}
|
|
36297
|
+
constructor(comp, options2) {
|
|
36298
|
+
options2 = parseOptions(options2);
|
|
36299
|
+
if (comp instanceof _Comparator) {
|
|
36300
|
+
if (comp.loose === !!options2.loose) {
|
|
36301
|
+
return comp;
|
|
36302
|
+
} else {
|
|
36303
|
+
comp = comp.value;
|
|
36304
|
+
}
|
|
36305
|
+
}
|
|
36306
|
+
comp = comp.trim().split(/\s+/).join(" ");
|
|
36307
|
+
debug("comparator", comp, options2);
|
|
36308
|
+
this.options = options2;
|
|
36309
|
+
this.loose = !!options2.loose;
|
|
36310
|
+
this.parse(comp);
|
|
36311
|
+
if (this.semver === ANY) {
|
|
36312
|
+
this.value = "";
|
|
36313
|
+
} else {
|
|
36314
|
+
this.value = this.operator + this.semver.version;
|
|
36315
|
+
}
|
|
36316
|
+
debug("comp", this);
|
|
36317
|
+
}
|
|
36318
|
+
parse(comp) {
|
|
36319
|
+
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
36320
|
+
const m = comp.match(r);
|
|
36321
|
+
if (!m) {
|
|
36322
|
+
throw new TypeError(`Invalid comparator: ${comp}`);
|
|
36323
|
+
}
|
|
36324
|
+
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
36325
|
+
if (this.operator === "=") {
|
|
36326
|
+
this.operator = "";
|
|
36327
|
+
}
|
|
36328
|
+
if (!m[2]) {
|
|
36329
|
+
this.semver = ANY;
|
|
36330
|
+
} else {
|
|
36331
|
+
this.semver = new SemVer(m[2], this.options.loose);
|
|
36332
|
+
}
|
|
36333
|
+
}
|
|
36334
|
+
toString() {
|
|
36335
|
+
return this.value;
|
|
36336
|
+
}
|
|
36337
|
+
test(version2) {
|
|
36338
|
+
debug("Comparator.test", version2, this.options.loose);
|
|
36339
|
+
if (this.semver === ANY || version2 === ANY) {
|
|
36340
|
+
return true;
|
|
36341
|
+
}
|
|
36342
|
+
if (typeof version2 === "string") {
|
|
36343
|
+
try {
|
|
36344
|
+
version2 = new SemVer(version2, this.options);
|
|
36345
|
+
} catch (er) {
|
|
36346
|
+
return false;
|
|
36347
|
+
}
|
|
36348
|
+
}
|
|
36349
|
+
return cmp(version2, this.operator, this.semver, this.options);
|
|
36350
|
+
}
|
|
36351
|
+
intersects(comp, options2) {
|
|
36352
|
+
if (!(comp instanceof _Comparator)) {
|
|
36353
|
+
throw new TypeError("a Comparator is required");
|
|
36354
|
+
}
|
|
36355
|
+
if (this.operator === "") {
|
|
36356
|
+
if (this.value === "") {
|
|
36357
|
+
return true;
|
|
36358
|
+
}
|
|
36359
|
+
return new Range(comp.value, options2).test(this.value);
|
|
36360
|
+
} else if (comp.operator === "") {
|
|
36361
|
+
if (comp.value === "") {
|
|
36362
|
+
return true;
|
|
36363
|
+
}
|
|
36364
|
+
return new Range(this.value, options2).test(comp.semver);
|
|
36365
|
+
}
|
|
36366
|
+
options2 = parseOptions(options2);
|
|
36367
|
+
if (options2.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
|
|
36368
|
+
return false;
|
|
36369
|
+
}
|
|
36370
|
+
if (!options2.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
|
|
36371
|
+
return false;
|
|
36372
|
+
}
|
|
36373
|
+
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
|
|
36374
|
+
return true;
|
|
36375
|
+
}
|
|
36376
|
+
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
|
|
36377
|
+
return true;
|
|
36378
|
+
}
|
|
36379
|
+
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
|
|
36380
|
+
return true;
|
|
36381
|
+
}
|
|
36382
|
+
if (cmp(this.semver, "<", comp.semver, options2) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
|
|
36383
|
+
return true;
|
|
36384
|
+
}
|
|
36385
|
+
if (cmp(this.semver, ">", comp.semver, options2) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
|
|
36386
|
+
return true;
|
|
36387
|
+
}
|
|
36388
|
+
return false;
|
|
36389
|
+
}
|
|
36390
|
+
};
|
|
36391
|
+
module.exports = Comparator;
|
|
36392
|
+
var parseOptions = require_parse_options();
|
|
36393
|
+
var { safeRe: re, t } = require_re();
|
|
36394
|
+
var cmp = require_cmp();
|
|
36395
|
+
var debug = require_debug();
|
|
36396
|
+
var SemVer = require_semver();
|
|
36397
|
+
var Range = require_range();
|
|
36398
|
+
}
|
|
36399
|
+
});
|
|
36400
|
+
|
|
36401
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js
|
|
36402
|
+
var require_satisfies = __commonJS({
|
|
36403
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js"(exports, module) {
|
|
36404
|
+
"use strict";
|
|
36405
|
+
var Range = require_range();
|
|
36406
|
+
var satisfies = (version2, range, options2) => {
|
|
36407
|
+
try {
|
|
36408
|
+
range = new Range(range, options2);
|
|
36409
|
+
} catch (er) {
|
|
36410
|
+
return false;
|
|
36411
|
+
}
|
|
36412
|
+
return range.test(version2);
|
|
36413
|
+
};
|
|
36414
|
+
module.exports = satisfies;
|
|
36415
|
+
}
|
|
36416
|
+
});
|
|
36417
|
+
|
|
36418
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js
|
|
36419
|
+
var require_to_comparators = __commonJS({
|
|
36420
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js"(exports, module) {
|
|
36421
|
+
"use strict";
|
|
36422
|
+
var Range = require_range();
|
|
36423
|
+
var toComparators = (range, options2) => new Range(range, options2).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
36424
|
+
module.exports = toComparators;
|
|
36425
|
+
}
|
|
36426
|
+
});
|
|
36427
|
+
|
|
36428
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js
|
|
36429
|
+
var require_max_satisfying = __commonJS({
|
|
36430
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
|
|
36431
|
+
"use strict";
|
|
36432
|
+
var SemVer = require_semver();
|
|
36433
|
+
var Range = require_range();
|
|
36434
|
+
var maxSatisfying = (versions, range, options2) => {
|
|
36435
|
+
let max = null;
|
|
36436
|
+
let maxSV = null;
|
|
36437
|
+
let rangeObj = null;
|
|
36438
|
+
try {
|
|
36439
|
+
rangeObj = new Range(range, options2);
|
|
36440
|
+
} catch (er) {
|
|
36441
|
+
return null;
|
|
36442
|
+
}
|
|
36443
|
+
versions.forEach((v) => {
|
|
36444
|
+
if (rangeObj.test(v)) {
|
|
36445
|
+
if (!max || maxSV.compare(v) === -1) {
|
|
36446
|
+
max = v;
|
|
36447
|
+
maxSV = new SemVer(max, options2);
|
|
36448
|
+
}
|
|
36449
|
+
}
|
|
36450
|
+
});
|
|
36451
|
+
return max;
|
|
36452
|
+
};
|
|
36453
|
+
module.exports = maxSatisfying;
|
|
36454
|
+
}
|
|
36455
|
+
});
|
|
36456
|
+
|
|
36457
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js
|
|
36458
|
+
var require_min_satisfying = __commonJS({
|
|
36459
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
|
|
36460
|
+
"use strict";
|
|
36461
|
+
var SemVer = require_semver();
|
|
36462
|
+
var Range = require_range();
|
|
36463
|
+
var minSatisfying = (versions, range, options2) => {
|
|
36464
|
+
let min = null;
|
|
36465
|
+
let minSV = null;
|
|
36466
|
+
let rangeObj = null;
|
|
36467
|
+
try {
|
|
36468
|
+
rangeObj = new Range(range, options2);
|
|
36469
|
+
} catch (er) {
|
|
36470
|
+
return null;
|
|
36471
|
+
}
|
|
36472
|
+
versions.forEach((v) => {
|
|
36473
|
+
if (rangeObj.test(v)) {
|
|
36474
|
+
if (!min || minSV.compare(v) === 1) {
|
|
36475
|
+
min = v;
|
|
36476
|
+
minSV = new SemVer(min, options2);
|
|
36477
|
+
}
|
|
36478
|
+
}
|
|
36479
|
+
});
|
|
36480
|
+
return min;
|
|
36481
|
+
};
|
|
36482
|
+
module.exports = minSatisfying;
|
|
36483
|
+
}
|
|
36484
|
+
});
|
|
36485
|
+
|
|
36486
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js
|
|
36487
|
+
var require_min_version = __commonJS({
|
|
36488
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js"(exports, module) {
|
|
36489
|
+
"use strict";
|
|
36490
|
+
var SemVer = require_semver();
|
|
36491
|
+
var Range = require_range();
|
|
36492
|
+
var gt = require_gt();
|
|
36493
|
+
var minVersion = (range, loose) => {
|
|
36494
|
+
range = new Range(range, loose);
|
|
36495
|
+
let minver = new SemVer("0.0.0");
|
|
36496
|
+
if (range.test(minver)) {
|
|
36497
|
+
return minver;
|
|
36498
|
+
}
|
|
36499
|
+
minver = new SemVer("0.0.0-0");
|
|
36500
|
+
if (range.test(minver)) {
|
|
36501
|
+
return minver;
|
|
36502
|
+
}
|
|
36503
|
+
minver = null;
|
|
36504
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
36505
|
+
const comparators = range.set[i];
|
|
36506
|
+
let setMin = null;
|
|
36507
|
+
comparators.forEach((comparator) => {
|
|
36508
|
+
const compver = new SemVer(comparator.semver.version);
|
|
36509
|
+
switch (comparator.operator) {
|
|
36510
|
+
case ">":
|
|
36511
|
+
if (compver.prerelease.length === 0) {
|
|
36512
|
+
compver.patch++;
|
|
36513
|
+
} else {
|
|
36514
|
+
compver.prerelease.push(0);
|
|
36515
|
+
}
|
|
36516
|
+
compver.raw = compver.format();
|
|
36517
|
+
/* fallthrough */
|
|
36518
|
+
case "":
|
|
36519
|
+
case ">=":
|
|
36520
|
+
if (!setMin || gt(compver, setMin)) {
|
|
36521
|
+
setMin = compver;
|
|
36522
|
+
}
|
|
36523
|
+
break;
|
|
36524
|
+
case "<":
|
|
36525
|
+
case "<=":
|
|
36526
|
+
break;
|
|
36527
|
+
/* istanbul ignore next */
|
|
36528
|
+
default:
|
|
36529
|
+
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
36530
|
+
}
|
|
36531
|
+
});
|
|
36532
|
+
if (setMin && (!minver || gt(minver, setMin))) {
|
|
36533
|
+
minver = setMin;
|
|
36534
|
+
}
|
|
36535
|
+
}
|
|
36536
|
+
if (minver && range.test(minver)) {
|
|
36537
|
+
return minver;
|
|
36538
|
+
}
|
|
36539
|
+
return null;
|
|
36540
|
+
};
|
|
36541
|
+
module.exports = minVersion;
|
|
36542
|
+
}
|
|
36543
|
+
});
|
|
36544
|
+
|
|
36545
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js
|
|
36546
|
+
var require_valid2 = __commonJS({
|
|
36547
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js"(exports, module) {
|
|
36548
|
+
"use strict";
|
|
36549
|
+
var Range = require_range();
|
|
36550
|
+
var validRange = (range, options2) => {
|
|
36551
|
+
try {
|
|
36552
|
+
return new Range(range, options2).range || "*";
|
|
36553
|
+
} catch (er) {
|
|
36554
|
+
return null;
|
|
36555
|
+
}
|
|
36556
|
+
};
|
|
36557
|
+
module.exports = validRange;
|
|
36558
|
+
}
|
|
36559
|
+
});
|
|
36560
|
+
|
|
36561
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js
|
|
36562
|
+
var require_outside = __commonJS({
|
|
36563
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js"(exports, module) {
|
|
36564
|
+
"use strict";
|
|
36565
|
+
var SemVer = require_semver();
|
|
36566
|
+
var Comparator = require_comparator();
|
|
36567
|
+
var { ANY } = Comparator;
|
|
36568
|
+
var Range = require_range();
|
|
36569
|
+
var satisfies = require_satisfies();
|
|
36570
|
+
var gt = require_gt();
|
|
36571
|
+
var lt2 = require_lt();
|
|
36572
|
+
var lte = require_lte();
|
|
36573
|
+
var gte2 = require_gte();
|
|
36574
|
+
var outside = (version2, range, hilo, options2) => {
|
|
36575
|
+
version2 = new SemVer(version2, options2);
|
|
36576
|
+
range = new Range(range, options2);
|
|
36577
|
+
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
36578
|
+
switch (hilo) {
|
|
36579
|
+
case ">":
|
|
36580
|
+
gtfn = gt;
|
|
36581
|
+
ltefn = lte;
|
|
36582
|
+
ltfn = lt2;
|
|
36583
|
+
comp = ">";
|
|
36584
|
+
ecomp = ">=";
|
|
36585
|
+
break;
|
|
36586
|
+
case "<":
|
|
36587
|
+
gtfn = lt2;
|
|
36588
|
+
ltefn = gte2;
|
|
36589
|
+
ltfn = gt;
|
|
36590
|
+
comp = "<";
|
|
36591
|
+
ecomp = "<=";
|
|
36592
|
+
break;
|
|
36593
|
+
default:
|
|
36594
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
36595
|
+
}
|
|
36596
|
+
if (satisfies(version2, range, options2)) {
|
|
36597
|
+
return false;
|
|
36598
|
+
}
|
|
36599
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
36600
|
+
const comparators = range.set[i];
|
|
36601
|
+
let high = null;
|
|
36602
|
+
let low = null;
|
|
36603
|
+
comparators.forEach((comparator) => {
|
|
36604
|
+
if (comparator.semver === ANY) {
|
|
36605
|
+
comparator = new Comparator(">=0.0.0");
|
|
36606
|
+
}
|
|
36607
|
+
high = high || comparator;
|
|
36608
|
+
low = low || comparator;
|
|
36609
|
+
if (gtfn(comparator.semver, high.semver, options2)) {
|
|
36610
|
+
high = comparator;
|
|
36611
|
+
} else if (ltfn(comparator.semver, low.semver, options2)) {
|
|
36612
|
+
low = comparator;
|
|
36613
|
+
}
|
|
36614
|
+
});
|
|
36615
|
+
if (high.operator === comp || high.operator === ecomp) {
|
|
36616
|
+
return false;
|
|
36617
|
+
}
|
|
36618
|
+
if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) {
|
|
36619
|
+
return false;
|
|
36620
|
+
} else if (low.operator === ecomp && ltfn(version2, low.semver)) {
|
|
36621
|
+
return false;
|
|
36622
|
+
}
|
|
36623
|
+
}
|
|
36624
|
+
return true;
|
|
36625
|
+
};
|
|
36626
|
+
module.exports = outside;
|
|
36627
|
+
}
|
|
36628
|
+
});
|
|
36629
|
+
|
|
36630
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js
|
|
36631
|
+
var require_gtr = __commonJS({
|
|
36632
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js"(exports, module) {
|
|
36633
|
+
"use strict";
|
|
36634
|
+
var outside = require_outside();
|
|
36635
|
+
var gtr = (version2, range, options2) => outside(version2, range, ">", options2);
|
|
36636
|
+
module.exports = gtr;
|
|
36637
|
+
}
|
|
36638
|
+
});
|
|
36639
|
+
|
|
36640
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js
|
|
36641
|
+
var require_ltr = __commonJS({
|
|
36642
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js"(exports, module) {
|
|
36643
|
+
"use strict";
|
|
36644
|
+
var outside = require_outside();
|
|
36645
|
+
var ltr = (version2, range, options2) => outside(version2, range, "<", options2);
|
|
36646
|
+
module.exports = ltr;
|
|
36647
|
+
}
|
|
36648
|
+
});
|
|
36649
|
+
|
|
36650
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js
|
|
36651
|
+
var require_intersects = __commonJS({
|
|
36652
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js"(exports, module) {
|
|
36653
|
+
"use strict";
|
|
36654
|
+
var Range = require_range();
|
|
36655
|
+
var intersects = (r1, r2, options2) => {
|
|
36656
|
+
r1 = new Range(r1, options2);
|
|
36657
|
+
r2 = new Range(r2, options2);
|
|
36658
|
+
return r1.intersects(r2, options2);
|
|
36659
|
+
};
|
|
36660
|
+
module.exports = intersects;
|
|
36661
|
+
}
|
|
36662
|
+
});
|
|
36663
|
+
|
|
36664
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js
|
|
36665
|
+
var require_simplify = __commonJS({
|
|
36666
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js"(exports, module) {
|
|
36667
|
+
"use strict";
|
|
36668
|
+
var satisfies = require_satisfies();
|
|
36669
|
+
var compare = require_compare();
|
|
36670
|
+
module.exports = (versions, range, options2) => {
|
|
36671
|
+
const set2 = [];
|
|
36672
|
+
let first = null;
|
|
36673
|
+
let prev = null;
|
|
36674
|
+
const v = versions.sort((a, b) => compare(a, b, options2));
|
|
36675
|
+
for (const version2 of v) {
|
|
36676
|
+
const included = satisfies(version2, range, options2);
|
|
36677
|
+
if (included) {
|
|
36678
|
+
prev = version2;
|
|
36679
|
+
if (!first) {
|
|
36680
|
+
first = version2;
|
|
36681
|
+
}
|
|
36682
|
+
} else {
|
|
36683
|
+
if (prev) {
|
|
36684
|
+
set2.push([first, prev]);
|
|
36685
|
+
}
|
|
36686
|
+
prev = null;
|
|
36687
|
+
first = null;
|
|
36688
|
+
}
|
|
36689
|
+
}
|
|
36690
|
+
if (first) {
|
|
36691
|
+
set2.push([first, null]);
|
|
36692
|
+
}
|
|
36693
|
+
const ranges = [];
|
|
36694
|
+
for (const [min, max] of set2) {
|
|
36695
|
+
if (min === max) {
|
|
36696
|
+
ranges.push(min);
|
|
36697
|
+
} else if (!max && min === v[0]) {
|
|
36698
|
+
ranges.push("*");
|
|
36699
|
+
} else if (!max) {
|
|
36700
|
+
ranges.push(`>=${min}`);
|
|
36701
|
+
} else if (min === v[0]) {
|
|
36702
|
+
ranges.push(`<=${max}`);
|
|
36703
|
+
} else {
|
|
36704
|
+
ranges.push(`${min} - ${max}`);
|
|
36705
|
+
}
|
|
36706
|
+
}
|
|
36707
|
+
const simplified = ranges.join(" || ");
|
|
36708
|
+
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
36709
|
+
return simplified.length < original.length ? simplified : range;
|
|
36710
|
+
};
|
|
36711
|
+
}
|
|
36712
|
+
});
|
|
36713
|
+
|
|
36714
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js
|
|
36715
|
+
var require_subset = __commonJS({
|
|
36716
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js"(exports, module) {
|
|
36717
|
+
"use strict";
|
|
36718
|
+
var Range = require_range();
|
|
36719
|
+
var Comparator = require_comparator();
|
|
36720
|
+
var { ANY } = Comparator;
|
|
36721
|
+
var satisfies = require_satisfies();
|
|
36722
|
+
var compare = require_compare();
|
|
36723
|
+
var subset = (sub, dom, options2 = {}) => {
|
|
36724
|
+
if (sub === dom) {
|
|
36725
|
+
return true;
|
|
36726
|
+
}
|
|
36727
|
+
sub = new Range(sub, options2);
|
|
36728
|
+
dom = new Range(dom, options2);
|
|
36729
|
+
let sawNonNull = false;
|
|
36730
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
36731
|
+
for (const simpleDom of dom.set) {
|
|
36732
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options2);
|
|
36733
|
+
sawNonNull = sawNonNull || isSub !== null;
|
|
36734
|
+
if (isSub) {
|
|
36735
|
+
continue OUTER;
|
|
36736
|
+
}
|
|
36737
|
+
}
|
|
36738
|
+
if (sawNonNull) {
|
|
36739
|
+
return false;
|
|
36740
|
+
}
|
|
36741
|
+
}
|
|
36742
|
+
return true;
|
|
36743
|
+
};
|
|
36744
|
+
var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
36745
|
+
var minimumVersion = [new Comparator(">=0.0.0")];
|
|
36746
|
+
var simpleSubset = (sub, dom, options2) => {
|
|
36747
|
+
if (sub === dom) {
|
|
36748
|
+
return true;
|
|
36749
|
+
}
|
|
36750
|
+
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
36751
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
36752
|
+
return true;
|
|
36753
|
+
} else if (options2.includePrerelease) {
|
|
36754
|
+
sub = minimumVersionWithPreRelease;
|
|
36755
|
+
} else {
|
|
36756
|
+
sub = minimumVersion;
|
|
36757
|
+
}
|
|
36758
|
+
}
|
|
36759
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
36760
|
+
if (options2.includePrerelease) {
|
|
36761
|
+
return true;
|
|
36762
|
+
} else {
|
|
36763
|
+
dom = minimumVersion;
|
|
36764
|
+
}
|
|
36765
|
+
}
|
|
36766
|
+
const eqSet = /* @__PURE__ */ new Set();
|
|
36767
|
+
let gt, lt2;
|
|
36768
|
+
for (const c of sub) {
|
|
36769
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
36770
|
+
gt = higherGT(gt, c, options2);
|
|
36771
|
+
} else if (c.operator === "<" || c.operator === "<=") {
|
|
36772
|
+
lt2 = lowerLT(lt2, c, options2);
|
|
36773
|
+
} else {
|
|
36774
|
+
eqSet.add(c.semver);
|
|
36775
|
+
}
|
|
36776
|
+
}
|
|
36777
|
+
if (eqSet.size > 1) {
|
|
36778
|
+
return null;
|
|
36779
|
+
}
|
|
36780
|
+
let gtltComp;
|
|
36781
|
+
if (gt && lt2) {
|
|
36782
|
+
gtltComp = compare(gt.semver, lt2.semver, options2);
|
|
36783
|
+
if (gtltComp > 0) {
|
|
36784
|
+
return null;
|
|
36785
|
+
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt2.operator !== "<=")) {
|
|
36786
|
+
return null;
|
|
36787
|
+
}
|
|
36788
|
+
}
|
|
36789
|
+
for (const eq of eqSet) {
|
|
36790
|
+
if (gt && !satisfies(eq, String(gt), options2)) {
|
|
36791
|
+
return null;
|
|
36792
|
+
}
|
|
36793
|
+
if (lt2 && !satisfies(eq, String(lt2), options2)) {
|
|
36794
|
+
return null;
|
|
36795
|
+
}
|
|
36796
|
+
for (const c of dom) {
|
|
36797
|
+
if (!satisfies(eq, String(c), options2)) {
|
|
36798
|
+
return false;
|
|
36799
|
+
}
|
|
36800
|
+
}
|
|
36801
|
+
return true;
|
|
36802
|
+
}
|
|
36803
|
+
let higher, lower;
|
|
36804
|
+
let hasDomLT, hasDomGT;
|
|
36805
|
+
let needDomLTPre = lt2 && !options2.includePrerelease && lt2.semver.prerelease.length ? lt2.semver : false;
|
|
36806
|
+
let needDomGTPre = gt && !options2.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
36807
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt2.operator === "<" && needDomLTPre.prerelease[0] === 0) {
|
|
36808
|
+
needDomLTPre = false;
|
|
36809
|
+
}
|
|
36810
|
+
for (const c of dom) {
|
|
36811
|
+
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
36812
|
+
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
36813
|
+
if (gt) {
|
|
36814
|
+
if (needDomGTPre) {
|
|
36815
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
|
|
36816
|
+
needDomGTPre = false;
|
|
36817
|
+
}
|
|
36818
|
+
}
|
|
36819
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
36820
|
+
higher = higherGT(gt, c, options2);
|
|
36821
|
+
if (higher === c && higher !== gt) {
|
|
36822
|
+
return false;
|
|
36823
|
+
}
|
|
36824
|
+
} else if (gt.operator === ">=" && !c.test(gt.semver)) {
|
|
36825
|
+
return false;
|
|
36826
|
+
}
|
|
36827
|
+
}
|
|
36828
|
+
if (lt2) {
|
|
36829
|
+
if (needDomLTPre) {
|
|
36830
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
|
|
36831
|
+
needDomLTPre = false;
|
|
36832
|
+
}
|
|
36833
|
+
}
|
|
36834
|
+
if (c.operator === "<" || c.operator === "<=") {
|
|
36835
|
+
lower = lowerLT(lt2, c, options2);
|
|
36836
|
+
if (lower === c && lower !== lt2) {
|
|
36837
|
+
return false;
|
|
36838
|
+
}
|
|
36839
|
+
} else if (lt2.operator === "<=" && !c.test(lt2.semver)) {
|
|
36840
|
+
return false;
|
|
36841
|
+
}
|
|
36842
|
+
}
|
|
36843
|
+
if (!c.operator && (lt2 || gt) && gtltComp !== 0) {
|
|
36844
|
+
return false;
|
|
36845
|
+
}
|
|
36846
|
+
}
|
|
36847
|
+
if (gt && hasDomLT && !lt2 && gtltComp !== 0) {
|
|
36848
|
+
return false;
|
|
36849
|
+
}
|
|
36850
|
+
if (lt2 && hasDomGT && !gt && gtltComp !== 0) {
|
|
36851
|
+
return false;
|
|
36852
|
+
}
|
|
36853
|
+
if (needDomGTPre || needDomLTPre) {
|
|
36854
|
+
return false;
|
|
36855
|
+
}
|
|
36856
|
+
return true;
|
|
36857
|
+
};
|
|
36858
|
+
var higherGT = (a, b, options2) => {
|
|
36859
|
+
if (!a) {
|
|
36860
|
+
return b;
|
|
36861
|
+
}
|
|
36862
|
+
const comp = compare(a.semver, b.semver, options2);
|
|
36863
|
+
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
36864
|
+
};
|
|
36865
|
+
var lowerLT = (a, b, options2) => {
|
|
36866
|
+
if (!a) {
|
|
36867
|
+
return b;
|
|
36868
|
+
}
|
|
36869
|
+
const comp = compare(a.semver, b.semver, options2);
|
|
36870
|
+
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
36871
|
+
};
|
|
36872
|
+
module.exports = subset;
|
|
36873
|
+
}
|
|
36874
|
+
});
|
|
36875
|
+
|
|
36876
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js
|
|
36877
|
+
var require_semver2 = __commonJS({
|
|
36878
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js"(exports, module) {
|
|
36879
|
+
"use strict";
|
|
36880
|
+
var internalRe = require_re();
|
|
36881
|
+
var constants = require_constants();
|
|
36882
|
+
var SemVer = require_semver();
|
|
36883
|
+
var identifiers = require_identifiers();
|
|
36884
|
+
var parse5 = require_parse();
|
|
36885
|
+
var valid2 = require_valid();
|
|
36886
|
+
var clean = require_clean();
|
|
36887
|
+
var inc = require_inc();
|
|
36888
|
+
var diff = require_diff();
|
|
36889
|
+
var major = require_major();
|
|
36890
|
+
var minor = require_minor();
|
|
36891
|
+
var patch = require_patch();
|
|
36892
|
+
var prerelease = require_prerelease();
|
|
36893
|
+
var compare = require_compare();
|
|
36894
|
+
var rcompare = require_rcompare();
|
|
36895
|
+
var compareLoose = require_compare_loose();
|
|
36896
|
+
var compareBuild = require_compare_build();
|
|
36897
|
+
var sort = require_sort();
|
|
36898
|
+
var rsort = require_rsort();
|
|
36899
|
+
var gt = require_gt();
|
|
36900
|
+
var lt2 = require_lt();
|
|
36901
|
+
var eq = require_eq();
|
|
36902
|
+
var neq = require_neq();
|
|
36903
|
+
var gte2 = require_gte();
|
|
36904
|
+
var lte = require_lte();
|
|
36905
|
+
var cmp = require_cmp();
|
|
36906
|
+
var coerce = require_coerce();
|
|
36907
|
+
var truncate = require_truncate();
|
|
36908
|
+
var Comparator = require_comparator();
|
|
36909
|
+
var Range = require_range();
|
|
36910
|
+
var satisfies = require_satisfies();
|
|
36911
|
+
var toComparators = require_to_comparators();
|
|
36912
|
+
var maxSatisfying = require_max_satisfying();
|
|
36913
|
+
var minSatisfying = require_min_satisfying();
|
|
36914
|
+
var minVersion = require_min_version();
|
|
36915
|
+
var validRange = require_valid2();
|
|
36916
|
+
var outside = require_outside();
|
|
36917
|
+
var gtr = require_gtr();
|
|
36918
|
+
var ltr = require_ltr();
|
|
36919
|
+
var intersects = require_intersects();
|
|
36920
|
+
var simplifyRange = require_simplify();
|
|
36921
|
+
var subset = require_subset();
|
|
36922
|
+
module.exports = {
|
|
36923
|
+
parse: parse5,
|
|
36924
|
+
valid: valid2,
|
|
36925
|
+
clean,
|
|
36926
|
+
inc,
|
|
36927
|
+
diff,
|
|
36928
|
+
major,
|
|
36929
|
+
minor,
|
|
36930
|
+
patch,
|
|
36931
|
+
prerelease,
|
|
36932
|
+
compare,
|
|
36933
|
+
rcompare,
|
|
36934
|
+
compareLoose,
|
|
36935
|
+
compareBuild,
|
|
36936
|
+
sort,
|
|
36937
|
+
rsort,
|
|
36938
|
+
gt,
|
|
36939
|
+
lt: lt2,
|
|
36940
|
+
eq,
|
|
36941
|
+
neq,
|
|
36942
|
+
gte: gte2,
|
|
36943
|
+
lte,
|
|
36944
|
+
cmp,
|
|
36945
|
+
coerce,
|
|
36946
|
+
truncate,
|
|
36947
|
+
Comparator,
|
|
36948
|
+
Range,
|
|
36949
|
+
satisfies,
|
|
36950
|
+
toComparators,
|
|
36951
|
+
maxSatisfying,
|
|
36952
|
+
minSatisfying,
|
|
36953
|
+
minVersion,
|
|
36954
|
+
validRange,
|
|
36955
|
+
outside,
|
|
36956
|
+
gtr,
|
|
36957
|
+
ltr,
|
|
36958
|
+
intersects,
|
|
36959
|
+
simplifyRange,
|
|
36960
|
+
subset,
|
|
36961
|
+
SemVer,
|
|
36962
|
+
re: internalRe.re,
|
|
36963
|
+
src: internalRe.src,
|
|
36964
|
+
tokens: internalRe.t,
|
|
36965
|
+
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
36966
|
+
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
36967
|
+
compareIdentifiers: identifiers.compareIdentifiers,
|
|
36968
|
+
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
36969
|
+
};
|
|
36970
|
+
}
|
|
36971
|
+
});
|
|
36972
|
+
|
|
36973
|
+
// ../../packages/core/dist/compat/index.js
|
|
36974
|
+
function compatible2(observed, minimum) {
|
|
36975
|
+
return (0, import_semver.valid)(observed) !== null && (0, import_semver.valid)(minimum) !== null && (0, import_semver.gte)(observed, minimum);
|
|
36976
|
+
}
|
|
36977
|
+
var import_semver, componentSchema, semverSchema, compatibilityTableSchema, componentReleaseSchema, releaseStateSchema;
|
|
36978
|
+
var init_compat2 = __esm({
|
|
36979
|
+
"../../packages/core/dist/compat/index.js"() {
|
|
36980
|
+
"use strict";
|
|
36981
|
+
import_semver = __toESM(require_semver2(), 1);
|
|
36982
|
+
init_zod();
|
|
36983
|
+
init_json();
|
|
36984
|
+
componentSchema = external_exports.enum(["cli", "extension", "web"]);
|
|
36985
|
+
semverSchema = external_exports.string().refine((value) => (0, import_semver.valid)(value) === value, "Expected an exact semantic version");
|
|
36986
|
+
compatibilityTableSchema = external_exports.object({
|
|
36987
|
+
components: external_exports.object({
|
|
36988
|
+
cli: external_exports.object({ minimum: external_exports.object({ web: semverSchema, extension: semverSchema }).strict() }).strict(),
|
|
36989
|
+
extension: external_exports.object({ minimum: external_exports.object({ cli: semverSchema }).strict() }).strict(),
|
|
36990
|
+
web: external_exports.object({ minimum: external_exports.object({ cli: semverSchema }).strict() }).strict()
|
|
36991
|
+
}).strict(),
|
|
36992
|
+
staged: external_exports.object({
|
|
36993
|
+
cli: external_exports.object({ extension: semverSchema.optional() }).strict().optional(),
|
|
36994
|
+
web: external_exports.object({ extension: semverSchema.optional() }).strict().optional()
|
|
36995
|
+
}).strict()
|
|
36996
|
+
}).strict();
|
|
36997
|
+
componentReleaseSchema = external_exports.object({
|
|
36998
|
+
version: semverSchema,
|
|
36999
|
+
sourceSha: external_exports.string().regex(/^[0-9a-f]{40,64}$/),
|
|
37000
|
+
minimum: external_exports.partialRecord(componentSchema, semverSchema)
|
|
37001
|
+
}).strict();
|
|
37002
|
+
releaseStateSchema = external_exports.object({
|
|
37003
|
+
release: semverSchema,
|
|
37004
|
+
components: external_exports.object({
|
|
37005
|
+
cli: componentReleaseSchema,
|
|
37006
|
+
extension: componentReleaseSchema.extend({ storeVersion: semverSchema.optional() }),
|
|
37007
|
+
web: componentReleaseSchema
|
|
37008
|
+
}).strict()
|
|
37009
|
+
}).strict();
|
|
37010
|
+
}
|
|
37011
|
+
});
|
|
37012
|
+
|
|
34979
37013
|
// src/native-host/registration.ts
|
|
34980
37014
|
import { createHash as createHash6 } from "node:crypto";
|
|
34981
37015
|
import { homedir as homedir3, platform as platform2 } from "node:os";
|
|
@@ -35056,13 +37090,6 @@ import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
|
35056
37090
|
import { dirname as dirname8, join as join14, resolve as resolve5, sep } from "node:path";
|
|
35057
37091
|
import { mkdirSync as mkdirSync9, realpathSync, writeFileSync as writeFileSync9 } from "node:fs";
|
|
35058
37092
|
import { DatabaseSync as DatabaseSync5 } from "node:sqlite";
|
|
35059
|
-
function newer(a, b) {
|
|
35060
|
-
const left = a.split(".").map(Number), right = b.split(".").map(Number);
|
|
35061
|
-
for (let i = 0; i < 3; i++) {
|
|
35062
|
-
if ((left[i] || 0) !== (right[i] || 0)) return (left[i] || 0) > (right[i] || 0);
|
|
35063
|
-
}
|
|
35064
|
-
return false;
|
|
35065
|
-
}
|
|
35066
37093
|
function globalPackage(script, prefix) {
|
|
35067
37094
|
const canonical = (path2) => {
|
|
35068
37095
|
try {
|
|
@@ -35119,8 +37146,9 @@ async function updateCli(options2) {
|
|
|
35119
37146
|
} catch {
|
|
35120
37147
|
return message("", 5, "update-check-failed \u2014 Apilift could not read the current release. Retry apilift update when the registry is available.\n");
|
|
35121
37148
|
}
|
|
35122
|
-
if (!
|
|
35123
|
-
if (
|
|
37149
|
+
if (!semverSchema.safeParse(latest).success) return message("", 5, "update-check-failed \u2014 The registry returned an invalid CLI version. No installation changes were made.\n");
|
|
37150
|
+
if (!semverSchema.safeParse(current).success) return message("", 5, "update-check-failed \u2014 The installed CLI version is invalid. No installation changes were made.\n");
|
|
37151
|
+
if (compatible2(current, latest)) return message("The installed CLI and its required local components are up to date.\nNo installation changes were made. Continue the app work you were working on.\n");
|
|
35124
37152
|
if (!options2.manual && (options2.env.APILIFT_AUTO_UPDATE === "0" || options2.env.CI || options2.env.APILIFT_DEV_PLUGIN_ROOT || options2.env.npm_execpath?.includes("npx"))) return message("", 5, `client-upgrade-required \u2014 Install Apilift ${latest} through the supported package installation, then retry.
|
|
35125
37153
|
`);
|
|
35126
37154
|
const prefix = await runner("npm", ["prefix", "-g"], 1e4);
|
|
@@ -35167,6 +37195,7 @@ var init_update = __esm({
|
|
|
35167
37195
|
"src/update.ts"() {
|
|
35168
37196
|
"use strict";
|
|
35169
37197
|
init_main2();
|
|
37198
|
+
init_compat2();
|
|
35170
37199
|
init_api3();
|
|
35171
37200
|
init_version();
|
|
35172
37201
|
init_registration();
|