@sockethub/platform-carddav 1.0.0-alpha.5 → 1.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +452 -443
- package/dist/index.js.map +5 -4
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
18
18
|
return cached;
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
22
|
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
23
|
for (let key of __getOwnPropNames(mod))
|
|
24
24
|
if (!__hasOwnProp.call(to, key))
|
|
@@ -201,9 +201,9 @@ var require_scope = __commonJS(function(exports) {
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
var UsedValueState;
|
|
204
|
-
(function(
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
(function(UsedValueState) {
|
|
205
|
+
UsedValueState[UsedValueState["Started"] = 0] = "Started";
|
|
206
|
+
UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
|
|
207
207
|
})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
|
|
208
208
|
exports.varKinds = {
|
|
209
209
|
const: new code_1.Name("const"),
|
|
@@ -1185,9 +1185,9 @@ var require_util7 = __commonJS(function(exports) {
|
|
|
1185
1185
|
}
|
|
1186
1186
|
exports.useFunc = useFunc;
|
|
1187
1187
|
var Type;
|
|
1188
|
-
(function(
|
|
1189
|
-
|
|
1190
|
-
|
|
1188
|
+
(function(Type) {
|
|
1189
|
+
Type[Type["Num"] = 0] = "Num";
|
|
1190
|
+
Type[Type["Str"] = 1] = "Str";
|
|
1191
1191
|
})(Type || (exports.Type = Type = {}));
|
|
1192
1192
|
function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
|
|
1193
1193
|
if (dataProp instanceof codegen_1.Name) {
|
|
@@ -1457,9 +1457,9 @@ var require_dataType = __commonJS(function(exports) {
|
|
|
1457
1457
|
var codegen_1 = require_codegen();
|
|
1458
1458
|
var util_1 = require_util7();
|
|
1459
1459
|
var DataType;
|
|
1460
|
-
(function(
|
|
1461
|
-
|
|
1462
|
-
|
|
1460
|
+
(function(DataType) {
|
|
1461
|
+
DataType[DataType["Correct"] = 0] = "Correct";
|
|
1462
|
+
DataType[DataType["Wrong"] = 1] = "Wrong";
|
|
1463
1463
|
})(DataType || (exports.DataType = DataType = {}));
|
|
1464
1464
|
function getSchemaTypes(schema) {
|
|
1465
1465
|
const types = getJSONTypes(schema.type);
|
|
@@ -1820,8 +1820,8 @@ var require_keyword = __commonJS(function(exports) {
|
|
|
1820
1820
|
var _a;
|
|
1821
1821
|
const { gen, keyword, schema, parentSchema, $data, it } = cxt;
|
|
1822
1822
|
checkAsyncKeyword(it, def);
|
|
1823
|
-
const
|
|
1824
|
-
const validateRef = useKeyword(gen, keyword,
|
|
1823
|
+
const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
|
|
1824
|
+
const validateRef = useKeyword(gen, keyword, validate);
|
|
1825
1825
|
const valid = gen.let("valid");
|
|
1826
1826
|
cxt.block$data(valid, validateKeyword);
|
|
1827
1827
|
cxt.ok((_a = def.valid) !== null && _a !== undefined ? _a : valid);
|
|
@@ -1854,9 +1854,9 @@ var require_keyword = __commonJS(function(exports) {
|
|
|
1854
1854
|
const passSchema = !(("compile" in def) && !$data || def.schema === false);
|
|
1855
1855
|
gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
1856
1856
|
}
|
|
1857
|
-
function reportErrs(
|
|
1858
|
-
var
|
|
1859
|
-
gen.if((0, codegen_1.not)((
|
|
1857
|
+
function reportErrs(errors) {
|
|
1858
|
+
var _a;
|
|
1859
|
+
gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== undefined ? _a : valid), errors);
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
1862
|
exports.funcKeywordCode = funcKeywordCode;
|
|
@@ -2774,9 +2774,9 @@ var require_validation_error = __commonJS(function(exports) {
|
|
|
2774
2774
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2775
2775
|
|
|
2776
2776
|
class ValidationError extends Error {
|
|
2777
|
-
constructor(
|
|
2777
|
+
constructor(errors) {
|
|
2778
2778
|
super("validation failed");
|
|
2779
|
-
this.errors =
|
|
2779
|
+
this.errors = errors;
|
|
2780
2780
|
this.ajv = this.validation = true;
|
|
2781
2781
|
}
|
|
2782
2782
|
}
|
|
@@ -2880,28 +2880,28 @@ var require_compile = __commonJS(function(exports) {
|
|
|
2880
2880
|
if (this.opts.code.process)
|
|
2881
2881
|
sourceCode = this.opts.code.process(sourceCode, sch);
|
|
2882
2882
|
const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);
|
|
2883
|
-
const
|
|
2884
|
-
this.scope.value(validateName, { ref:
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2883
|
+
const validate = makeValidate(this, this.scope.get());
|
|
2884
|
+
this.scope.value(validateName, { ref: validate });
|
|
2885
|
+
validate.errors = null;
|
|
2886
|
+
validate.schema = sch.schema;
|
|
2887
|
+
validate.schemaEnv = sch;
|
|
2888
2888
|
if (sch.$async)
|
|
2889
|
-
|
|
2889
|
+
validate.$async = true;
|
|
2890
2890
|
if (this.opts.code.source === true) {
|
|
2891
|
-
|
|
2891
|
+
validate.source = { validateName, validateCode, scopeValues: gen._values };
|
|
2892
2892
|
}
|
|
2893
2893
|
if (this.opts.unevaluated) {
|
|
2894
2894
|
const { props, items } = schemaCxt;
|
|
2895
|
-
|
|
2895
|
+
validate.evaluated = {
|
|
2896
2896
|
props: props instanceof codegen_1.Name ? undefined : props,
|
|
2897
2897
|
items: items instanceof codegen_1.Name ? undefined : items,
|
|
2898
2898
|
dynamicProps: props instanceof codegen_1.Name,
|
|
2899
2899
|
dynamicItems: items instanceof codegen_1.Name
|
|
2900
2900
|
};
|
|
2901
|
-
if (
|
|
2902
|
-
|
|
2901
|
+
if (validate.source)
|
|
2902
|
+
validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);
|
|
2903
2903
|
}
|
|
2904
|
-
sch.validate =
|
|
2904
|
+
sch.validate = validate;
|
|
2905
2905
|
return sch;
|
|
2906
2906
|
} catch (e) {
|
|
2907
2907
|
delete sch.validate;
|
|
@@ -3626,7 +3626,7 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
3626
3626
|
query: undefined,
|
|
3627
3627
|
fragment: undefined
|
|
3628
3628
|
};
|
|
3629
|
-
let
|
|
3629
|
+
let isIP = false;
|
|
3630
3630
|
if (options.reference === "suffix") {
|
|
3631
3631
|
if (options.scheme) {
|
|
3632
3632
|
uri = options.scheme + ":" + uri;
|
|
@@ -3651,9 +3651,9 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
3651
3651
|
if (ipv4result === false) {
|
|
3652
3652
|
const ipv6result = normalizeIPv6(parsed.host);
|
|
3653
3653
|
parsed.host = ipv6result.host.toLowerCase();
|
|
3654
|
-
|
|
3654
|
+
isIP = ipv6result.isIPV6;
|
|
3655
3655
|
} else {
|
|
3656
|
-
|
|
3656
|
+
isIP = true;
|
|
3657
3657
|
}
|
|
3658
3658
|
}
|
|
3659
3659
|
if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined && parsed.query === undefined && !parsed.path) {
|
|
@@ -3670,7 +3670,7 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
3670
3670
|
}
|
|
3671
3671
|
const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
|
|
3672
3672
|
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
3673
|
-
if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) &&
|
|
3673
|
+
if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
3674
3674
|
try {
|
|
3675
3675
|
parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
|
|
3676
3676
|
} catch (e) {
|
|
@@ -4099,10 +4099,10 @@ var require_core = __commonJS(function(exports) {
|
|
|
4099
4099
|
this.formats[name] = format;
|
|
4100
4100
|
return this;
|
|
4101
4101
|
}
|
|
4102
|
-
errorsText(
|
|
4103
|
-
if (!
|
|
4102
|
+
errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
|
|
4103
|
+
if (!errors || errors.length === 0)
|
|
4104
4104
|
return "No errors";
|
|
4105
|
-
return
|
|
4105
|
+
return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
|
|
4106
4106
|
}
|
|
4107
4107
|
$dataMetaSchema(metaSchema, keywordsJsonPointers) {
|
|
4108
4108
|
const rules = this.RULES.all;
|
|
@@ -5360,13 +5360,13 @@ var require_additionalProperties = __commonJS(function(exports) {
|
|
|
5360
5360
|
}
|
|
5361
5361
|
}
|
|
5362
5362
|
}
|
|
5363
|
-
function applyAdditionalSchema(key, valid,
|
|
5363
|
+
function applyAdditionalSchema(key, valid, errors) {
|
|
5364
5364
|
const subschema = {
|
|
5365
5365
|
keyword: "additionalProperties",
|
|
5366
5366
|
dataProp: key,
|
|
5367
5367
|
dataPropType: util_1.Type.Str
|
|
5368
5368
|
};
|
|
5369
|
-
if (
|
|
5369
|
+
if (errors === false) {
|
|
5370
5370
|
Object.assign(subschema, {
|
|
5371
5371
|
compositeRule: true,
|
|
5372
5372
|
createErrors: false,
|
|
@@ -5890,9 +5890,9 @@ var require_types = __commonJS(function(exports) {
|
|
|
5890
5890
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5891
5891
|
exports.DiscrError = undefined;
|
|
5892
5892
|
var DiscrError;
|
|
5893
|
-
(function(
|
|
5894
|
-
|
|
5895
|
-
|
|
5893
|
+
(function(DiscrError) {
|
|
5894
|
+
DiscrError["Tag"] = "tag";
|
|
5895
|
+
DiscrError["Mapping"] = "mapping";
|
|
5896
5896
|
})(DiscrError || (exports.DiscrError = DiscrError = {}));
|
|
5897
5897
|
});
|
|
5898
5898
|
|
|
@@ -6225,8 +6225,8 @@ var require_ajv = __commonJS(function(exports, module) {
|
|
|
6225
6225
|
var require_formats = __commonJS(function(exports) {
|
|
6226
6226
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6227
6227
|
exports.formatNames = exports.fastFormats = exports.fullFormats = undefined;
|
|
6228
|
-
function fmtDef(
|
|
6229
|
-
return { validate
|
|
6228
|
+
function fmtDef(validate, compare) {
|
|
6229
|
+
return { validate, compare };
|
|
6230
6230
|
}
|
|
6231
6231
|
exports.fullFormats = {
|
|
6232
6232
|
date: fmtDef(date, compareDate),
|
|
@@ -6529,9 +6529,9 @@ var require_scope2 = __commonJS(function(exports) {
|
|
|
6529
6529
|
}
|
|
6530
6530
|
}
|
|
6531
6531
|
var UsedValueState;
|
|
6532
|
-
(function(
|
|
6533
|
-
|
|
6534
|
-
|
|
6532
|
+
(function(UsedValueState) {
|
|
6533
|
+
UsedValueState[UsedValueState["Started"] = 0] = "Started";
|
|
6534
|
+
UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
|
|
6535
6535
|
})(UsedValueState = exports.UsedValueState || (exports.UsedValueState = {}));
|
|
6536
6536
|
exports.varKinds = {
|
|
6537
6537
|
const: new code_1.Name("const"),
|
|
@@ -7373,7 +7373,7 @@ var require_codegen2 = __commonJS(function(exports) {
|
|
|
7373
7373
|
});
|
|
7374
7374
|
|
|
7375
7375
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/util.js
|
|
7376
|
-
var
|
|
7376
|
+
var require_util8 = __commonJS(function(exports) {
|
|
7377
7377
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7378
7378
|
exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = undefined;
|
|
7379
7379
|
var codegen_1 = require_codegen2();
|
|
@@ -7513,9 +7513,9 @@ var require_util9 = __commonJS(function(exports) {
|
|
|
7513
7513
|
}
|
|
7514
7514
|
exports.useFunc = useFunc;
|
|
7515
7515
|
var Type;
|
|
7516
|
-
(function(
|
|
7517
|
-
|
|
7518
|
-
|
|
7516
|
+
(function(Type) {
|
|
7517
|
+
Type[Type["Num"] = 0] = "Num";
|
|
7518
|
+
Type[Type["Str"] = 1] = "Str";
|
|
7519
7519
|
})(Type = exports.Type || (exports.Type = {}));
|
|
7520
7520
|
function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
|
|
7521
7521
|
if (dataProp instanceof codegen_1.Name) {
|
|
@@ -7566,7 +7566,7 @@ var require_errors3 = __commonJS(function(exports) {
|
|
|
7566
7566
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7567
7567
|
exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = undefined;
|
|
7568
7568
|
var codegen_1 = require_codegen2();
|
|
7569
|
-
var util_1 =
|
|
7569
|
+
var util_1 = require_util8();
|
|
7570
7570
|
var names_1 = require_names2();
|
|
7571
7571
|
exports.keywordError = {
|
|
7572
7572
|
message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation`
|
|
@@ -7783,11 +7783,11 @@ var require_dataType2 = __commonJS(function(exports) {
|
|
|
7783
7783
|
var applicability_1 = require_applicability2();
|
|
7784
7784
|
var errors_1 = require_errors3();
|
|
7785
7785
|
var codegen_1 = require_codegen2();
|
|
7786
|
-
var util_1 =
|
|
7786
|
+
var util_1 = require_util8();
|
|
7787
7787
|
var DataType;
|
|
7788
|
-
(function(
|
|
7789
|
-
|
|
7790
|
-
|
|
7788
|
+
(function(DataType) {
|
|
7789
|
+
DataType[DataType["Correct"] = 0] = "Correct";
|
|
7790
|
+
DataType[DataType["Wrong"] = 1] = "Wrong";
|
|
7791
7791
|
})(DataType = exports.DataType || (exports.DataType = {}));
|
|
7792
7792
|
function getSchemaTypes(schema) {
|
|
7793
7793
|
const types = getJSONTypes(schema.type);
|
|
@@ -7961,7 +7961,7 @@ var require_defaults2 = __commonJS(function(exports) {
|
|
|
7961
7961
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7962
7962
|
exports.assignDefaults = undefined;
|
|
7963
7963
|
var codegen_1 = require_codegen2();
|
|
7964
|
-
var util_1 =
|
|
7964
|
+
var util_1 = require_util8();
|
|
7965
7965
|
function assignDefaults(it, ty) {
|
|
7966
7966
|
const { properties, items } = it.schema;
|
|
7967
7967
|
if (ty === "object" && properties) {
|
|
@@ -7995,9 +7995,9 @@ var require_code4 = __commonJS(function(exports) {
|
|
|
7995
7995
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7996
7996
|
exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = undefined;
|
|
7997
7997
|
var codegen_1 = require_codegen2();
|
|
7998
|
-
var util_1 =
|
|
7998
|
+
var util_1 = require_util8();
|
|
7999
7999
|
var names_1 = require_names2();
|
|
8000
|
-
var util_2 =
|
|
8000
|
+
var util_2 = require_util8();
|
|
8001
8001
|
function checkReportMissingProp(cxt, prop) {
|
|
8002
8002
|
const { gen, data, it } = cxt;
|
|
8003
8003
|
gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {
|
|
@@ -8148,8 +8148,8 @@ var require_keyword2 = __commonJS(function(exports) {
|
|
|
8148
8148
|
var _a;
|
|
8149
8149
|
const { gen, keyword, schema, parentSchema, $data, it } = cxt;
|
|
8150
8150
|
checkAsyncKeyword(it, def);
|
|
8151
|
-
const
|
|
8152
|
-
const validateRef = useKeyword(gen, keyword,
|
|
8151
|
+
const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
|
|
8152
|
+
const validateRef = useKeyword(gen, keyword, validate);
|
|
8153
8153
|
const valid = gen.let("valid");
|
|
8154
8154
|
cxt.block$data(valid, validateKeyword);
|
|
8155
8155
|
cxt.ok((_a = def.valid) !== null && _a !== undefined ? _a : valid);
|
|
@@ -8182,9 +8182,9 @@ var require_keyword2 = __commonJS(function(exports) {
|
|
|
8182
8182
|
const passSchema = !(("compile" in def) && !$data || def.schema === false);
|
|
8183
8183
|
gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
8184
8184
|
}
|
|
8185
|
-
function reportErrs(
|
|
8186
|
-
var
|
|
8187
|
-
gen.if((0, codegen_1.not)((
|
|
8185
|
+
function reportErrs(errors) {
|
|
8186
|
+
var _a;
|
|
8187
|
+
gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== undefined ? _a : valid), errors);
|
|
8188
8188
|
}
|
|
8189
8189
|
}
|
|
8190
8190
|
exports.funcKeywordCode = funcKeywordCode;
|
|
@@ -8239,7 +8239,7 @@ var require_subschema2 = __commonJS(function(exports) {
|
|
|
8239
8239
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8240
8240
|
exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = undefined;
|
|
8241
8241
|
var codegen_1 = require_codegen2();
|
|
8242
|
-
var util_1 =
|
|
8242
|
+
var util_1 = require_util8();
|
|
8243
8243
|
function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
|
|
8244
8244
|
if (keyword !== undefined && schema !== undefined) {
|
|
8245
8245
|
throw new Error('both "keyword" and "schema" passed, only one allowed');
|
|
@@ -8318,7 +8318,7 @@ var require_subschema2 = __commonJS(function(exports) {
|
|
|
8318
8318
|
var require_resolve2 = __commonJS(function(exports) {
|
|
8319
8319
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8320
8320
|
exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = undefined;
|
|
8321
|
-
var util_1 =
|
|
8321
|
+
var util_1 = require_util8();
|
|
8322
8322
|
var equal = require_fast_deep_equal();
|
|
8323
8323
|
var traverse = require_json_schema_traverse();
|
|
8324
8324
|
var SIMPLE_INLINED = new Set([
|
|
@@ -8420,15 +8420,15 @@ var require_resolve2 = __commonJS(function(exports) {
|
|
|
8420
8420
|
if (parentJsonPtr === undefined)
|
|
8421
8421
|
return;
|
|
8422
8422
|
const fullPath = pathPrefix + jsonPtr;
|
|
8423
|
-
let
|
|
8423
|
+
let baseId = baseIds[parentJsonPtr];
|
|
8424
8424
|
if (typeof sch[schemaId] == "string")
|
|
8425
|
-
|
|
8425
|
+
baseId = addRef.call(this, sch[schemaId]);
|
|
8426
8426
|
addAnchor.call(this, sch.$anchor);
|
|
8427
8427
|
addAnchor.call(this, sch.$dynamicAnchor);
|
|
8428
|
-
baseIds[jsonPtr] =
|
|
8428
|
+
baseIds[jsonPtr] = baseId;
|
|
8429
8429
|
function addRef(ref) {
|
|
8430
8430
|
const _resolve = this.opts.uriResolver.resolve;
|
|
8431
|
-
ref = normalizeId(
|
|
8431
|
+
ref = normalizeId(baseId ? _resolve(baseId, ref) : ref);
|
|
8432
8432
|
if (schemaRefs.has(ref))
|
|
8433
8433
|
throw ambiguos(ref);
|
|
8434
8434
|
schemaRefs.add(ref);
|
|
@@ -8481,7 +8481,7 @@ var require_validate2 = __commonJS(function(exports) {
|
|
|
8481
8481
|
var codegen_1 = require_codegen2();
|
|
8482
8482
|
var names_1 = require_names2();
|
|
8483
8483
|
var resolve_1 = require_resolve2();
|
|
8484
|
-
var util_1 =
|
|
8484
|
+
var util_1 = require_util8();
|
|
8485
8485
|
var errors_1 = require_errors3();
|
|
8486
8486
|
function validateFunctionCode(it) {
|
|
8487
8487
|
if (isSchemaObj(it)) {
|
|
@@ -8977,9 +8977,9 @@ var require_validation_error2 = __commonJS(function(exports) {
|
|
|
8977
8977
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8978
8978
|
|
|
8979
8979
|
class ValidationError extends Error {
|
|
8980
|
-
constructor(
|
|
8980
|
+
constructor(errors) {
|
|
8981
8981
|
super("validation failed");
|
|
8982
|
-
this.errors =
|
|
8982
|
+
this.errors = errors;
|
|
8983
8983
|
this.ajv = this.validation = true;
|
|
8984
8984
|
}
|
|
8985
8985
|
}
|
|
@@ -9009,7 +9009,7 @@ var require_compile2 = __commonJS(function(exports) {
|
|
|
9009
9009
|
var validation_error_1 = require_validation_error2();
|
|
9010
9010
|
var names_1 = require_names2();
|
|
9011
9011
|
var resolve_1 = require_resolve2();
|
|
9012
|
-
var util_1 =
|
|
9012
|
+
var util_1 = require_util8();
|
|
9013
9013
|
var validate_1 = require_validate2();
|
|
9014
9014
|
|
|
9015
9015
|
class SchemaEnv {
|
|
@@ -9083,28 +9083,28 @@ var require_compile2 = __commonJS(function(exports) {
|
|
|
9083
9083
|
if (this.opts.code.process)
|
|
9084
9084
|
sourceCode = this.opts.code.process(sourceCode, sch);
|
|
9085
9085
|
const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);
|
|
9086
|
-
const
|
|
9087
|
-
this.scope.value(validateName, { ref:
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9086
|
+
const validate = makeValidate(this, this.scope.get());
|
|
9087
|
+
this.scope.value(validateName, { ref: validate });
|
|
9088
|
+
validate.errors = null;
|
|
9089
|
+
validate.schema = sch.schema;
|
|
9090
|
+
validate.schemaEnv = sch;
|
|
9091
9091
|
if (sch.$async)
|
|
9092
|
-
|
|
9092
|
+
validate.$async = true;
|
|
9093
9093
|
if (this.opts.code.source === true) {
|
|
9094
|
-
|
|
9094
|
+
validate.source = { validateName, validateCode, scopeValues: gen._values };
|
|
9095
9095
|
}
|
|
9096
9096
|
if (this.opts.unevaluated) {
|
|
9097
9097
|
const { props, items } = schemaCxt;
|
|
9098
|
-
|
|
9098
|
+
validate.evaluated = {
|
|
9099
9099
|
props: props instanceof codegen_1.Name ? undefined : props,
|
|
9100
9100
|
items: items instanceof codegen_1.Name ? undefined : items,
|
|
9101
9101
|
dynamicProps: props instanceof codegen_1.Name,
|
|
9102
9102
|
dynamicItems: items instanceof codegen_1.Name
|
|
9103
9103
|
};
|
|
9104
|
-
if (
|
|
9105
|
-
|
|
9104
|
+
if (validate.source)
|
|
9105
|
+
validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);
|
|
9106
9106
|
}
|
|
9107
|
-
sch.validate =
|
|
9107
|
+
sch.validate = validate;
|
|
9108
9108
|
return sch;
|
|
9109
9109
|
} catch (e) {
|
|
9110
9110
|
delete sch.validate;
|
|
@@ -9281,22 +9281,22 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9281
9281
|
}
|
|
9282
9282
|
return obj;
|
|
9283
9283
|
}
|
|
9284
|
-
function buildExps(
|
|
9285
|
-
var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$
|
|
9284
|
+
function buildExps(isIRI) {
|
|
9285
|
+
var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
|
|
9286
9286
|
return {
|
|
9287
9287
|
NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
|
|
9288
|
-
NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED
|
|
9289
|
-
NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED
|
|
9290
|
-
NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED
|
|
9291
|
-
NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED
|
|
9292
|
-
NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED
|
|
9293
|
-
NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED
|
|
9294
|
-
ESCAPE: new RegExp(merge("[^]", UNRESERVED
|
|
9295
|
-
UNRESERVED: new RegExp(UNRESERVED
|
|
9296
|
-
OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED
|
|
9297
|
-
PCT_ENCODED: new RegExp(PCT_ENCODED
|
|
9288
|
+
NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
9289
|
+
NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
9290
|
+
NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
9291
|
+
NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
9292
|
+
NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
|
|
9293
|
+
NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
|
|
9294
|
+
ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
9295
|
+
UNRESERVED: new RegExp(UNRESERVED$$, "g"),
|
|
9296
|
+
OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
|
|
9297
|
+
PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
|
|
9298
9298
|
IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
|
|
9299
|
-
IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$
|
|
9299
|
+
IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$")
|
|
9300
9300
|
};
|
|
9301
9301
|
}
|
|
9302
9302
|
var URI_PROTOCOL = buildExps(false);
|
|
@@ -9358,7 +9358,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9358
9358
|
var regexPunycode = /^xn--/;
|
|
9359
9359
|
var regexNonASCII = /[^\0-\x7E]/;
|
|
9360
9360
|
var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
|
|
9361
|
-
var
|
|
9361
|
+
var errors = {
|
|
9362
9362
|
overflow: "Overflow: input needs wider integers to process",
|
|
9363
9363
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
9364
9364
|
"invalid-input": "Invalid input"
|
|
@@ -9367,7 +9367,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9367
9367
|
var floor = Math.floor;
|
|
9368
9368
|
var stringFromCharCode = String.fromCharCode;
|
|
9369
9369
|
function error$1(type) {
|
|
9370
|
-
throw new RangeError(
|
|
9370
|
+
throw new RangeError(errors[type]);
|
|
9371
9371
|
}
|
|
9372
9372
|
function map(array, fn) {
|
|
9373
9373
|
var result = [];
|
|
@@ -9409,10 +9409,10 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9409
9409
|
}
|
|
9410
9410
|
return output;
|
|
9411
9411
|
}
|
|
9412
|
-
var ucs2encode = function
|
|
9412
|
+
var ucs2encode = function ucs2encode(array) {
|
|
9413
9413
|
return String.fromCodePoint.apply(String, toConsumableArray(array));
|
|
9414
9414
|
};
|
|
9415
|
-
var basicToDigit = function
|
|
9415
|
+
var basicToDigit = function basicToDigit(codePoint) {
|
|
9416
9416
|
if (codePoint - 48 < 10) {
|
|
9417
9417
|
return codePoint - 22;
|
|
9418
9418
|
}
|
|
@@ -9424,10 +9424,10 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9424
9424
|
}
|
|
9425
9425
|
return base;
|
|
9426
9426
|
};
|
|
9427
|
-
var digitToBasic = function
|
|
9427
|
+
var digitToBasic = function digitToBasic(digit, flag) {
|
|
9428
9428
|
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
|
9429
9429
|
};
|
|
9430
|
-
var adapt = function
|
|
9430
|
+
var adapt = function adapt(delta, numPoints, firstTime) {
|
|
9431
9431
|
var k = 0;
|
|
9432
9432
|
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
|
9433
9433
|
delta += floor(delta / numPoints);
|
|
@@ -9436,7 +9436,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9436
9436
|
}
|
|
9437
9437
|
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
9438
9438
|
};
|
|
9439
|
-
var decode = function
|
|
9439
|
+
var decode = function decode(input) {
|
|
9440
9440
|
var output = [];
|
|
9441
9441
|
var inputLength = input.length;
|
|
9442
9442
|
var i = 0;
|
|
@@ -9484,7 +9484,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9484
9484
|
}
|
|
9485
9485
|
return String.fromCodePoint.apply(String, output);
|
|
9486
9486
|
};
|
|
9487
|
-
var encode = function
|
|
9487
|
+
var encode = function encode(input) {
|
|
9488
9488
|
var output = [];
|
|
9489
9489
|
input = ucs2decode(input);
|
|
9490
9490
|
var inputLength = input.length;
|
|
@@ -9598,12 +9598,12 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9598
9598
|
}
|
|
9599
9599
|
return output.join("");
|
|
9600
9600
|
};
|
|
9601
|
-
var toUnicode = function
|
|
9601
|
+
var toUnicode = function toUnicode(input) {
|
|
9602
9602
|
return mapDomain(input, function(string) {
|
|
9603
9603
|
return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
|
|
9604
9604
|
});
|
|
9605
9605
|
};
|
|
9606
|
-
var toASCII = function
|
|
9606
|
+
var toASCII = function toASCII(input) {
|
|
9607
9607
|
return mapDomain(input, function(string) {
|
|
9608
9608
|
return regexNonASCII.test(string) ? "xn--" + encode(string) : string;
|
|
9609
9609
|
});
|
|
@@ -9667,22 +9667,22 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9667
9667
|
return newStr;
|
|
9668
9668
|
}
|
|
9669
9669
|
function _normalizeComponentEncoding(components, protocol) {
|
|
9670
|
-
function
|
|
9670
|
+
function decodeUnreserved(str) {
|
|
9671
9671
|
var decStr = pctDecChars(str);
|
|
9672
9672
|
return !decStr.match(protocol.UNRESERVED) ? str : decStr;
|
|
9673
9673
|
}
|
|
9674
9674
|
if (components.scheme)
|
|
9675
|
-
components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED,
|
|
9675
|
+
components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
|
|
9676
9676
|
if (components.userinfo !== undefined)
|
|
9677
|
-
components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED,
|
|
9677
|
+
components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
9678
9678
|
if (components.host !== undefined)
|
|
9679
|
-
components.host = String(components.host).replace(protocol.PCT_ENCODED,
|
|
9679
|
+
components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
9680
9680
|
if (components.path !== undefined)
|
|
9681
|
-
components.path = String(components.path).replace(protocol.PCT_ENCODED,
|
|
9681
|
+
components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
9682
9682
|
if (components.query !== undefined)
|
|
9683
|
-
components.query = String(components.query).replace(protocol.PCT_ENCODED,
|
|
9683
|
+
components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
9684
9684
|
if (components.fragment !== undefined)
|
|
9685
|
-
components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED,
|
|
9685
|
+
components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
9686
9686
|
return components;
|
|
9687
9687
|
}
|
|
9688
9688
|
function _stripLeadingZeros(str) {
|
|
@@ -9911,12 +9911,12 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9911
9911
|
}
|
|
9912
9912
|
return uriTokens.join("");
|
|
9913
9913
|
}
|
|
9914
|
-
function resolveComponents(
|
|
9914
|
+
function resolveComponents(base, relative) {
|
|
9915
9915
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9916
9916
|
var skipNormalization = arguments[3];
|
|
9917
9917
|
var target = {};
|
|
9918
9918
|
if (!skipNormalization) {
|
|
9919
|
-
|
|
9919
|
+
base = parse(serialize(base, options), options);
|
|
9920
9920
|
relative = parse(serialize(relative, options), options);
|
|
9921
9921
|
}
|
|
9922
9922
|
options = options || {};
|
|
@@ -9936,32 +9936,32 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9936
9936
|
target.query = relative.query;
|
|
9937
9937
|
} else {
|
|
9938
9938
|
if (!relative.path) {
|
|
9939
|
-
target.path =
|
|
9939
|
+
target.path = base.path;
|
|
9940
9940
|
if (relative.query !== undefined) {
|
|
9941
9941
|
target.query = relative.query;
|
|
9942
9942
|
} else {
|
|
9943
|
-
target.query =
|
|
9943
|
+
target.query = base.query;
|
|
9944
9944
|
}
|
|
9945
9945
|
} else {
|
|
9946
9946
|
if (relative.path.charAt(0) === "/") {
|
|
9947
9947
|
target.path = removeDotSegments(relative.path);
|
|
9948
9948
|
} else {
|
|
9949
|
-
if ((
|
|
9949
|
+
if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
|
|
9950
9950
|
target.path = "/" + relative.path;
|
|
9951
|
-
} else if (!
|
|
9951
|
+
} else if (!base.path) {
|
|
9952
9952
|
target.path = relative.path;
|
|
9953
9953
|
} else {
|
|
9954
|
-
target.path =
|
|
9954
|
+
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
|
9955
9955
|
}
|
|
9956
9956
|
target.path = removeDotSegments(target.path);
|
|
9957
9957
|
}
|
|
9958
9958
|
target.query = relative.query;
|
|
9959
9959
|
}
|
|
9960
|
-
target.userinfo =
|
|
9961
|
-
target.host =
|
|
9962
|
-
target.port =
|
|
9960
|
+
target.userinfo = base.userinfo;
|
|
9961
|
+
target.host = base.host;
|
|
9962
|
+
target.port = base.port;
|
|
9963
9963
|
}
|
|
9964
|
-
target.scheme =
|
|
9964
|
+
target.scheme = base.scheme;
|
|
9965
9965
|
}
|
|
9966
9966
|
target.fragment = relative.fragment;
|
|
9967
9967
|
return target;
|
|
@@ -10000,13 +10000,13 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
10000
10000
|
var handler = {
|
|
10001
10001
|
scheme: "http",
|
|
10002
10002
|
domainHost: true,
|
|
10003
|
-
parse: function
|
|
10003
|
+
parse: function parse(components, options) {
|
|
10004
10004
|
if (!components.host) {
|
|
10005
10005
|
components.error = components.error || "HTTP URIs must have a host.";
|
|
10006
10006
|
}
|
|
10007
10007
|
return components;
|
|
10008
10008
|
},
|
|
10009
|
-
serialize: function
|
|
10009
|
+
serialize: function serialize(components, options) {
|
|
10010
10010
|
var secure = String(components.scheme).toLowerCase() === "https";
|
|
10011
10011
|
if (components.port === (secure ? 443 : 80) || components.port === "") {
|
|
10012
10012
|
components.port = undefined;
|
|
@@ -10029,7 +10029,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
10029
10029
|
var handler$2 = {
|
|
10030
10030
|
scheme: "ws",
|
|
10031
10031
|
domainHost: true,
|
|
10032
|
-
parse: function
|
|
10032
|
+
parse: function parse(components, options) {
|
|
10033
10033
|
var wsComponents = components;
|
|
10034
10034
|
wsComponents.secure = isSecure(wsComponents);
|
|
10035
10035
|
wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
|
|
@@ -10037,7 +10037,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
10037
10037
|
wsComponents.query = undefined;
|
|
10038
10038
|
return wsComponents;
|
|
10039
10039
|
},
|
|
10040
|
-
serialize: function
|
|
10040
|
+
serialize: function serialize(wsComponents, options) {
|
|
10041
10041
|
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
|
|
10042
10042
|
wsComponents.port = undefined;
|
|
10043
10043
|
}
|
|
@@ -10205,7 +10205,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
10205
10205
|
var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
|
|
10206
10206
|
var handler$6 = {
|
|
10207
10207
|
scheme: "urn:uuid",
|
|
10208
|
-
parse: function
|
|
10208
|
+
parse: function parse(urnComponents, options) {
|
|
10209
10209
|
var uuidComponents = urnComponents;
|
|
10210
10210
|
uuidComponents.uuid = uuidComponents.nss;
|
|
10211
10211
|
uuidComponents.nss = undefined;
|
|
@@ -10214,7 +10214,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
10214
10214
|
}
|
|
10215
10215
|
return uuidComponents;
|
|
10216
10216
|
},
|
|
10217
|
-
serialize: function
|
|
10217
|
+
serialize: function serialize(uuidComponents, options) {
|
|
10218
10218
|
var urnComponents = uuidComponents;
|
|
10219
10219
|
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
|
10220
10220
|
return urnComponents;
|
|
@@ -10285,7 +10285,7 @@ var require_core3 = __commonJS(function(exports) {
|
|
|
10285
10285
|
var codegen_2 = require_codegen2();
|
|
10286
10286
|
var resolve_1 = require_resolve2();
|
|
10287
10287
|
var dataType_1 = require_dataType2();
|
|
10288
|
-
var util_1 =
|
|
10288
|
+
var util_1 = require_util8();
|
|
10289
10289
|
var $dataRefSchema = require_data2();
|
|
10290
10290
|
var uri_1 = require_uri2();
|
|
10291
10291
|
var defaultRegExp = (str, flags) => new RegExp(str, flags);
|
|
@@ -10358,7 +10358,7 @@ var require_core3 = __commonJS(function(exports) {
|
|
|
10358
10358
|
};
|
|
10359
10359
|
}
|
|
10360
10360
|
|
|
10361
|
-
class
|
|
10361
|
+
class Ajv {
|
|
10362
10362
|
constructor(opts = {}) {
|
|
10363
10363
|
this.schemas = {};
|
|
10364
10364
|
this.refs = {};
|
|
@@ -10626,10 +10626,10 @@ var require_core3 = __commonJS(function(exports) {
|
|
|
10626
10626
|
this.formats[name] = format;
|
|
10627
10627
|
return this;
|
|
10628
10628
|
}
|
|
10629
|
-
errorsText(
|
|
10630
|
-
if (!
|
|
10629
|
+
errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
|
|
10630
|
+
if (!errors || errors.length === 0)
|
|
10631
10631
|
return "No errors";
|
|
10632
|
-
return
|
|
10632
|
+
return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
|
|
10633
10633
|
}
|
|
10634
10634
|
$dataMetaSchema(metaSchema, keywordsJsonPointers) {
|
|
10635
10635
|
const rules = this.RULES.all;
|
|
@@ -10715,9 +10715,9 @@ var require_core3 = __commonJS(function(exports) {
|
|
|
10715
10715
|
}
|
|
10716
10716
|
}
|
|
10717
10717
|
}
|
|
10718
|
-
exports.default =
|
|
10719
|
-
|
|
10720
|
-
|
|
10718
|
+
exports.default = Ajv;
|
|
10719
|
+
Ajv.ValidationError = validation_error_1.default;
|
|
10720
|
+
Ajv.MissingRefError = ref_error_1.default;
|
|
10721
10721
|
function checkOptions(checkOpts, options, msg, log = "error") {
|
|
10722
10722
|
for (const key in checkOpts) {
|
|
10723
10723
|
const opt = key;
|
|
@@ -10865,7 +10865,7 @@ var require_ref2 = __commonJS(function(exports) {
|
|
|
10865
10865
|
var codegen_1 = require_codegen2();
|
|
10866
10866
|
var names_1 = require_names2();
|
|
10867
10867
|
var compile_1 = require_compile2();
|
|
10868
|
-
var util_1 =
|
|
10868
|
+
var util_1 = require_util8();
|
|
10869
10869
|
var def = {
|
|
10870
10870
|
keyword: "$ref",
|
|
10871
10871
|
schemaType: "string",
|
|
@@ -11074,7 +11074,7 @@ var require_ucs2length2 = __commonJS(function(exports) {
|
|
|
11074
11074
|
var require_limitLength2 = __commonJS(function(exports) {
|
|
11075
11075
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11076
11076
|
var codegen_1 = require_codegen2();
|
|
11077
|
-
var util_1 =
|
|
11077
|
+
var util_1 = require_util8();
|
|
11078
11078
|
var ucs2length_1 = require_ucs2length2();
|
|
11079
11079
|
var error = {
|
|
11080
11080
|
message({ keyword, schemaCode }) {
|
|
@@ -11155,7 +11155,7 @@ var require_required2 = __commonJS(function(exports) {
|
|
|
11155
11155
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11156
11156
|
var code_1 = require_code4();
|
|
11157
11157
|
var codegen_1 = require_codegen2();
|
|
11158
|
-
var util_1 =
|
|
11158
|
+
var util_1 = require_util8();
|
|
11159
11159
|
var error = {
|
|
11160
11160
|
message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,
|
|
11161
11161
|
params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`
|
|
@@ -11268,7 +11268,7 @@ var require_uniqueItems2 = __commonJS(function(exports) {
|
|
|
11268
11268
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11269
11269
|
var dataType_1 = require_dataType2();
|
|
11270
11270
|
var codegen_1 = require_codegen2();
|
|
11271
|
-
var util_1 =
|
|
11271
|
+
var util_1 = require_util8();
|
|
11272
11272
|
var equal_1 = require_equal2();
|
|
11273
11273
|
var error = {
|
|
11274
11274
|
message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
|
|
@@ -11331,7 +11331,7 @@ var require_uniqueItems2 = __commonJS(function(exports) {
|
|
|
11331
11331
|
var require_const2 = __commonJS(function(exports) {
|
|
11332
11332
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11333
11333
|
var codegen_1 = require_codegen2();
|
|
11334
|
-
var util_1 =
|
|
11334
|
+
var util_1 = require_util8();
|
|
11335
11335
|
var equal_1 = require_equal2();
|
|
11336
11336
|
var error = {
|
|
11337
11337
|
message: "must be equal to constant",
|
|
@@ -11357,7 +11357,7 @@ var require_const2 = __commonJS(function(exports) {
|
|
|
11357
11357
|
var require_enum2 = __commonJS(function(exports) {
|
|
11358
11358
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11359
11359
|
var codegen_1 = require_codegen2();
|
|
11360
|
-
var util_1 =
|
|
11360
|
+
var util_1 = require_util8();
|
|
11361
11361
|
var equal_1 = require_equal2();
|
|
11362
11362
|
var error = {
|
|
11363
11363
|
message: "must be equal to one of the allowed values",
|
|
@@ -11434,7 +11434,7 @@ var require_additionalItems2 = __commonJS(function(exports) {
|
|
|
11434
11434
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11435
11435
|
exports.validateAdditionalItems = undefined;
|
|
11436
11436
|
var codegen_1 = require_codegen2();
|
|
11437
|
-
var util_1 =
|
|
11437
|
+
var util_1 = require_util8();
|
|
11438
11438
|
var error = {
|
|
11439
11439
|
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
11440
11440
|
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
|
|
@@ -11484,7 +11484,7 @@ var require_items2 = __commonJS(function(exports) {
|
|
|
11484
11484
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11485
11485
|
exports.validateTuple = undefined;
|
|
11486
11486
|
var codegen_1 = require_codegen2();
|
|
11487
|
-
var util_1 =
|
|
11487
|
+
var util_1 = require_util8();
|
|
11488
11488
|
var code_1 = require_code4();
|
|
11489
11489
|
var def = {
|
|
11490
11490
|
keyword: "items",
|
|
@@ -11551,7 +11551,7 @@ var require_prefixItems2 = __commonJS(function(exports) {
|
|
|
11551
11551
|
var require_items20202 = __commonJS(function(exports) {
|
|
11552
11552
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11553
11553
|
var codegen_1 = require_codegen2();
|
|
11554
|
-
var util_1 =
|
|
11554
|
+
var util_1 = require_util8();
|
|
11555
11555
|
var code_1 = require_code4();
|
|
11556
11556
|
var additionalItems_1 = require_additionalItems2();
|
|
11557
11557
|
var error = {
|
|
@@ -11583,7 +11583,7 @@ var require_items20202 = __commonJS(function(exports) {
|
|
|
11583
11583
|
var require_contains2 = __commonJS(function(exports) {
|
|
11584
11584
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11585
11585
|
var codegen_1 = require_codegen2();
|
|
11586
|
-
var util_1 =
|
|
11586
|
+
var util_1 = require_util8();
|
|
11587
11587
|
var error = {
|
|
11588
11588
|
message: ({ params: { min, max } }) => max === undefined ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,
|
|
11589
11589
|
params: ({ params: { min, max } }) => max === undefined ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`
|
|
@@ -11675,7 +11675,7 @@ var require_dependencies2 = __commonJS(function(exports) {
|
|
|
11675
11675
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11676
11676
|
exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = undefined;
|
|
11677
11677
|
var codegen_1 = require_codegen2();
|
|
11678
|
-
var util_1 =
|
|
11678
|
+
var util_1 = require_util8();
|
|
11679
11679
|
var code_1 = require_code4();
|
|
11680
11680
|
exports.error = {
|
|
11681
11681
|
message: ({ params: { property, depsCount, deps } }) => {
|
|
@@ -11759,7 +11759,7 @@ var require_dependencies2 = __commonJS(function(exports) {
|
|
|
11759
11759
|
var require_propertyNames2 = __commonJS(function(exports) {
|
|
11760
11760
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11761
11761
|
var codegen_1 = require_codegen2();
|
|
11762
|
-
var util_1 =
|
|
11762
|
+
var util_1 = require_util8();
|
|
11763
11763
|
var error = {
|
|
11764
11764
|
message: "property name must be valid",
|
|
11765
11765
|
params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`
|
|
@@ -11801,7 +11801,7 @@ var require_additionalProperties2 = __commonJS(function(exports) {
|
|
|
11801
11801
|
var code_1 = require_code4();
|
|
11802
11802
|
var codegen_1 = require_codegen2();
|
|
11803
11803
|
var names_1 = require_names2();
|
|
11804
|
-
var util_1 =
|
|
11804
|
+
var util_1 = require_util8();
|
|
11805
11805
|
var error = {
|
|
11806
11806
|
message: "must NOT have additional properties",
|
|
11807
11807
|
params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`
|
|
@@ -11878,13 +11878,13 @@ var require_additionalProperties2 = __commonJS(function(exports) {
|
|
|
11878
11878
|
}
|
|
11879
11879
|
}
|
|
11880
11880
|
}
|
|
11881
|
-
function applyAdditionalSchema(key, valid,
|
|
11881
|
+
function applyAdditionalSchema(key, valid, errors) {
|
|
11882
11882
|
const subschema = {
|
|
11883
11883
|
keyword: "additionalProperties",
|
|
11884
11884
|
dataProp: key,
|
|
11885
11885
|
dataPropType: util_1.Type.Str
|
|
11886
11886
|
};
|
|
11887
|
-
if (
|
|
11887
|
+
if (errors === false) {
|
|
11888
11888
|
Object.assign(subschema, {
|
|
11889
11889
|
compositeRule: true,
|
|
11890
11890
|
createErrors: false,
|
|
@@ -11903,7 +11903,7 @@ var require_properties2 = __commonJS(function(exports) {
|
|
|
11903
11903
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11904
11904
|
var validate_1 = require_validate2();
|
|
11905
11905
|
var code_1 = require_code4();
|
|
11906
|
-
var util_1 =
|
|
11906
|
+
var util_1 = require_util8();
|
|
11907
11907
|
var additionalProperties_1 = require_additionalProperties2();
|
|
11908
11908
|
var def = {
|
|
11909
11909
|
keyword: "properties",
|
|
@@ -11958,8 +11958,8 @@ var require_patternProperties2 = __commonJS(function(exports) {
|
|
|
11958
11958
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11959
11959
|
var code_1 = require_code4();
|
|
11960
11960
|
var codegen_1 = require_codegen2();
|
|
11961
|
-
var util_1 =
|
|
11962
|
-
var util_2 =
|
|
11961
|
+
var util_1 = require_util8();
|
|
11962
|
+
var util_2 = require_util8();
|
|
11963
11963
|
var def = {
|
|
11964
11964
|
keyword: "patternProperties",
|
|
11965
11965
|
type: "object",
|
|
@@ -12027,7 +12027,7 @@ var require_patternProperties2 = __commonJS(function(exports) {
|
|
|
12027
12027
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/not.js
|
|
12028
12028
|
var require_not2 = __commonJS(function(exports) {
|
|
12029
12029
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12030
|
-
var util_1 =
|
|
12030
|
+
var util_1 = require_util8();
|
|
12031
12031
|
var def = {
|
|
12032
12032
|
keyword: "not",
|
|
12033
12033
|
schemaType: ["object", "boolean"],
|
|
@@ -12070,7 +12070,7 @@ var require_anyOf2 = __commonJS(function(exports) {
|
|
|
12070
12070
|
var require_oneOf2 = __commonJS(function(exports) {
|
|
12071
12071
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12072
12072
|
var codegen_1 = require_codegen2();
|
|
12073
|
-
var util_1 =
|
|
12073
|
+
var util_1 = require_util8();
|
|
12074
12074
|
var error = {
|
|
12075
12075
|
message: "must match exactly one schema in oneOf",
|
|
12076
12076
|
params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`
|
|
@@ -12124,7 +12124,7 @@ var require_oneOf2 = __commonJS(function(exports) {
|
|
|
12124
12124
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/allOf.js
|
|
12125
12125
|
var require_allOf2 = __commonJS(function(exports) {
|
|
12126
12126
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12127
|
-
var util_1 =
|
|
12127
|
+
var util_1 = require_util8();
|
|
12128
12128
|
var def = {
|
|
12129
12129
|
keyword: "allOf",
|
|
12130
12130
|
schemaType: "array",
|
|
@@ -12149,7 +12149,7 @@ var require_allOf2 = __commonJS(function(exports) {
|
|
|
12149
12149
|
var require_if2 = __commonJS(function(exports) {
|
|
12150
12150
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12151
12151
|
var codegen_1 = require_codegen2();
|
|
12152
|
-
var util_1 =
|
|
12152
|
+
var util_1 = require_util8();
|
|
12153
12153
|
var error = {
|
|
12154
12154
|
message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`,
|
|
12155
12155
|
params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`
|
|
@@ -12214,7 +12214,7 @@ var require_if2 = __commonJS(function(exports) {
|
|
|
12214
12214
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/thenElse.js
|
|
12215
12215
|
var require_thenElse2 = __commonJS(function(exports) {
|
|
12216
12216
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12217
|
-
var util_1 =
|
|
12217
|
+
var util_1 = require_util8();
|
|
12218
12218
|
var def = {
|
|
12219
12219
|
keyword: ["then", "else"],
|
|
12220
12220
|
schemaType: ["object", "boolean"],
|
|
@@ -12408,9 +12408,9 @@ var require_types2 = __commonJS(function(exports) {
|
|
|
12408
12408
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12409
12409
|
exports.DiscrError = undefined;
|
|
12410
12410
|
var DiscrError;
|
|
12411
|
-
(function(
|
|
12412
|
-
|
|
12413
|
-
|
|
12411
|
+
(function(DiscrError) {
|
|
12412
|
+
DiscrError["Tag"] = "tag";
|
|
12413
|
+
DiscrError["Mapping"] = "mapping";
|
|
12414
12414
|
})(DiscrError = exports.DiscrError || (exports.DiscrError = {}));
|
|
12415
12415
|
});
|
|
12416
12416
|
|
|
@@ -12420,7 +12420,7 @@ var require_discriminator2 = __commonJS(function(exports) {
|
|
|
12420
12420
|
var codegen_1 = require_codegen2();
|
|
12421
12421
|
var types_1 = require_types2();
|
|
12422
12422
|
var compile_1 = require_compile2();
|
|
12423
|
-
var util_1 =
|
|
12423
|
+
var util_1 = require_util8();
|
|
12424
12424
|
var error = {
|
|
12425
12425
|
message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
|
|
12426
12426
|
params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`
|
|
@@ -12678,7 +12678,7 @@ var require_ajv2 = __commonJS(function(exports, module) {
|
|
|
12678
12678
|
var META_SUPPORT_DATA = ["/properties"];
|
|
12679
12679
|
var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
|
|
12680
12680
|
|
|
12681
|
-
class
|
|
12681
|
+
class Ajv extends core_1.default {
|
|
12682
12682
|
_addVocabularies() {
|
|
12683
12683
|
super._addVocabularies();
|
|
12684
12684
|
draft7_1.default.forEach((v) => this.addVocabulary(v));
|
|
@@ -12697,9 +12697,9 @@ var require_ajv2 = __commonJS(function(exports, module) {
|
|
|
12697
12697
|
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined);
|
|
12698
12698
|
}
|
|
12699
12699
|
}
|
|
12700
|
-
module.exports = exports =
|
|
12700
|
+
module.exports = exports = Ajv;
|
|
12701
12701
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12702
|
-
exports.default =
|
|
12702
|
+
exports.default = Ajv;
|
|
12703
12703
|
var validate_1 = require_validate2();
|
|
12704
12704
|
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
|
|
12705
12705
|
return validate_1.KeywordCxt;
|
|
@@ -12795,9 +12795,9 @@ var require_limit = __commonJS(function(exports) {
|
|
|
12795
12795
|
},
|
|
12796
12796
|
dependencies: ["format"]
|
|
12797
12797
|
};
|
|
12798
|
-
var formatLimitPlugin = (
|
|
12799
|
-
|
|
12800
|
-
return
|
|
12798
|
+
var formatLimitPlugin = (ajv) => {
|
|
12799
|
+
ajv.addKeyword(exports.formatLimitDefinition);
|
|
12800
|
+
return ajv;
|
|
12801
12801
|
};
|
|
12802
12802
|
exports.default = formatLimitPlugin;
|
|
12803
12803
|
});
|
|
@@ -12810,17 +12810,17 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
12810
12810
|
var codegen_1 = require_codegen2();
|
|
12811
12811
|
var fullName = new codegen_1.Name("fullFormats");
|
|
12812
12812
|
var fastName = new codegen_1.Name("fastFormats");
|
|
12813
|
-
var formatsPlugin = (
|
|
12813
|
+
var formatsPlugin = (ajv, opts = { keywords: true }) => {
|
|
12814
12814
|
if (Array.isArray(opts)) {
|
|
12815
|
-
addFormats(
|
|
12816
|
-
return
|
|
12815
|
+
addFormats(ajv, opts, formats_1.fullFormats, fullName);
|
|
12816
|
+
return ajv;
|
|
12817
12817
|
}
|
|
12818
12818
|
const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];
|
|
12819
12819
|
const list = opts.formats || formats_1.formatNames;
|
|
12820
|
-
addFormats(
|
|
12820
|
+
addFormats(ajv, list, formats, exportName);
|
|
12821
12821
|
if (opts.keywords)
|
|
12822
|
-
limit_1.default(
|
|
12823
|
-
return
|
|
12822
|
+
limit_1.default(ajv);
|
|
12823
|
+
return ajv;
|
|
12824
12824
|
};
|
|
12825
12825
|
formatsPlugin.get = (name, mode = "full") => {
|
|
12826
12826
|
const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
|
|
@@ -12829,12 +12829,12 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
12829
12829
|
throw new Error(`Unknown format "${name}"`);
|
|
12830
12830
|
return f;
|
|
12831
12831
|
};
|
|
12832
|
-
function addFormats(
|
|
12832
|
+
function addFormats(ajv, list, fs, exportName) {
|
|
12833
12833
|
var _a;
|
|
12834
12834
|
var _b;
|
|
12835
|
-
(_a = (_b =
|
|
12835
|
+
(_a = (_b = ajv.opts.code).formats) !== null && _a !== undefined || (_b.formats = codegen_1._`require("ajv-formats/dist/formats").${exportName}`);
|
|
12836
12836
|
for (const f of list)
|
|
12837
|
-
|
|
12837
|
+
ajv.addFormat(f, fs[f]);
|
|
12838
12838
|
}
|
|
12839
12839
|
module.exports = exports = formatsPlugin;
|
|
12840
12840
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -13552,13 +13552,13 @@ var require_extend = __commonJS(function(exports, module) {
|
|
|
13552
13552
|
var toStr = Object.prototype.toString;
|
|
13553
13553
|
var defineProperty = Object.defineProperty;
|
|
13554
13554
|
var gOPD = Object.getOwnPropertyDescriptor;
|
|
13555
|
-
var isArray = function
|
|
13555
|
+
var isArray = function isArray(arr) {
|
|
13556
13556
|
if (typeof Array.isArray === "function") {
|
|
13557
13557
|
return Array.isArray(arr);
|
|
13558
13558
|
}
|
|
13559
13559
|
return toStr.call(arr) === "[object Array]";
|
|
13560
13560
|
};
|
|
13561
|
-
var isPlainObject = function
|
|
13561
|
+
var isPlainObject = function isPlainObject(obj) {
|
|
13562
13562
|
if (!obj || toStr.call(obj) !== "[object Object]") {
|
|
13563
13563
|
return false;
|
|
13564
13564
|
}
|
|
@@ -13571,7 +13571,7 @@ var require_extend = __commonJS(function(exports, module) {
|
|
|
13571
13571
|
for (key in obj) {}
|
|
13572
13572
|
return typeof key === "undefined" || hasOwn.call(obj, key);
|
|
13573
13573
|
};
|
|
13574
|
-
var setProperty = function
|
|
13574
|
+
var setProperty = function setProperty(target, options) {
|
|
13575
13575
|
if (defineProperty && options.name === "__proto__") {
|
|
13576
13576
|
defineProperty(target, options.name, {
|
|
13577
13577
|
enumerable: true,
|
|
@@ -13583,7 +13583,7 @@ var require_extend = __commonJS(function(exports, module) {
|
|
|
13583
13583
|
target[options.name] = options.newValue;
|
|
13584
13584
|
}
|
|
13585
13585
|
};
|
|
13586
|
-
var getProperty = function
|
|
13586
|
+
var getProperty = function getProperty(obj, name) {
|
|
13587
13587
|
if (name === "__proto__") {
|
|
13588
13588
|
if (!hasOwn.call(obj, name)) {
|
|
13589
13589
|
return;
|
|
@@ -15657,7 +15657,7 @@ var require_iri = __commonJS(function(exports, module) {
|
|
|
15657
15657
|
var { parse } = require_uri_all();
|
|
15658
15658
|
var { addressParser } = require_lib();
|
|
15659
15659
|
var schemes = require_schemes2();
|
|
15660
|
-
function
|
|
15660
|
+
function validate(address) {
|
|
15661
15661
|
try {
|
|
15662
15662
|
addressParser(address);
|
|
15663
15663
|
return true;
|
|
@@ -15667,7 +15667,7 @@ var require_iri = __commonJS(function(exports, module) {
|
|
|
15667
15667
|
}
|
|
15668
15668
|
module.exports = (value) => {
|
|
15669
15669
|
const iri = parse(value);
|
|
15670
|
-
if (iri.scheme === "mailto" && iri.to.every(
|
|
15670
|
+
if (iri.scheme === "mailto" && iri.to.every(validate)) {
|
|
15671
15671
|
return true;
|
|
15672
15672
|
}
|
|
15673
15673
|
if (iri.reference === "absolute" && schemes.allByName[iri.scheme]) {
|
|
@@ -15710,7 +15710,7 @@ var require_iri_reference = __commonJS(function(exports, module) {
|
|
|
15710
15710
|
var { parse } = require_uri_all();
|
|
15711
15711
|
var { addressParser } = require_lib();
|
|
15712
15712
|
var schemes = require_schemes2();
|
|
15713
|
-
function
|
|
15713
|
+
function validate(address) {
|
|
15714
15714
|
try {
|
|
15715
15715
|
addressParser(address);
|
|
15716
15716
|
return true;
|
|
@@ -15720,7 +15720,7 @@ var require_iri_reference = __commonJS(function(exports, module) {
|
|
|
15720
15720
|
}
|
|
15721
15721
|
module.exports = (value) => {
|
|
15722
15722
|
const iri = parse(value);
|
|
15723
|
-
if (iri.scheme === "mailto" && iri.to.every(
|
|
15723
|
+
if (iri.scheme === "mailto" && iri.to.every(validate)) {
|
|
15724
15724
|
return true;
|
|
15725
15725
|
}
|
|
15726
15726
|
if (iri.reference === "absolute" && iri.path !== undefined && schemes.allByName[iri.scheme]) {
|
|
@@ -15745,7 +15745,7 @@ var require_formats2 = __commonJS(function(exports, module) {
|
|
|
15745
15745
|
// ../../node_modules/ajv-formats-draft2019/index.js
|
|
15746
15746
|
var require_ajv_formats_draft2019 = __commonJS(function(exports, module) {
|
|
15747
15747
|
var formats = require_formats2();
|
|
15748
|
-
module.exports = (
|
|
15748
|
+
module.exports = (ajv, options = {}) => {
|
|
15749
15749
|
const allFormats = Object.keys(formats);
|
|
15750
15750
|
let formatsToInstall = allFormats;
|
|
15751
15751
|
if (options.formats) {
|
|
@@ -15754,9 +15754,9 @@ var require_ajv_formats_draft2019 = __commonJS(function(exports, module) {
|
|
|
15754
15754
|
formatsToInstall = options.formats;
|
|
15755
15755
|
}
|
|
15756
15756
|
allFormats.filter((format) => formatsToInstall.includes(format)).forEach((key) => {
|
|
15757
|
-
|
|
15757
|
+
ajv.addFormat(key, formats[key]);
|
|
15758
15758
|
});
|
|
15759
|
-
return
|
|
15759
|
+
return ajv;
|
|
15760
15760
|
};
|
|
15761
15761
|
});
|
|
15762
15762
|
|
|
@@ -16722,9 +16722,9 @@ var require_util = __commonJS2(function(exports, module) {
|
|
|
16722
16722
|
}
|
|
16723
16723
|
function getHostname(host) {
|
|
16724
16724
|
if (host[0] === "[") {
|
|
16725
|
-
const
|
|
16726
|
-
assert(
|
|
16727
|
-
return host.substring(1,
|
|
16725
|
+
const idx = host.indexOf("]");
|
|
16726
|
+
assert(idx !== -1);
|
|
16727
|
+
return host.substring(1, idx);
|
|
16728
16728
|
}
|
|
16729
16729
|
const idx = host.indexOf(":");
|
|
16730
16730
|
if (idx === -1)
|
|
@@ -16767,22 +16767,22 @@ var require_util = __commonJS2(function(exports, module) {
|
|
|
16767
16767
|
function isDestroyed(body) {
|
|
16768
16768
|
return body && !!(body.destroyed || body[kDestroyed] || stream.isDestroyed?.(body));
|
|
16769
16769
|
}
|
|
16770
|
-
function destroy(
|
|
16771
|
-
if (
|
|
16770
|
+
function destroy(stream, err) {
|
|
16771
|
+
if (stream == null || !isStream(stream) || isDestroyed(stream)) {
|
|
16772
16772
|
return;
|
|
16773
16773
|
}
|
|
16774
|
-
if (typeof
|
|
16775
|
-
if (Object.getPrototypeOf(
|
|
16776
|
-
|
|
16774
|
+
if (typeof stream.destroy === "function") {
|
|
16775
|
+
if (Object.getPrototypeOf(stream).constructor === IncomingMessage) {
|
|
16776
|
+
stream.socket = null;
|
|
16777
16777
|
}
|
|
16778
|
-
|
|
16778
|
+
stream.destroy(err);
|
|
16779
16779
|
} else if (err) {
|
|
16780
16780
|
queueMicrotask(() => {
|
|
16781
|
-
|
|
16781
|
+
stream.emit("error", err);
|
|
16782
16782
|
});
|
|
16783
16783
|
}
|
|
16784
|
-
if (
|
|
16785
|
-
|
|
16784
|
+
if (stream.destroyed !== true) {
|
|
16785
|
+
stream[kDestroyed] = true;
|
|
16786
16786
|
}
|
|
16787
16787
|
}
|
|
16788
16788
|
var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/;
|
|
@@ -17253,8 +17253,8 @@ var require_util = __commonJS2(function(exports, module) {
|
|
|
17253
17253
|
try {
|
|
17254
17254
|
request.onError(err);
|
|
17255
17255
|
assert(request.aborted);
|
|
17256
|
-
} catch (
|
|
17257
|
-
client.emit("error",
|
|
17256
|
+
} catch (err) {
|
|
17257
|
+
client.emit("error", err);
|
|
17258
17258
|
}
|
|
17259
17259
|
}
|
|
17260
17260
|
var setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => {
|
|
@@ -18134,8 +18134,8 @@ var require_dispatcher_base = __commonJS2(function(exports, module) {
|
|
|
18134
18134
|
}
|
|
18135
18135
|
if (callback === undefined) {
|
|
18136
18136
|
return new Promise((resolve, reject) => {
|
|
18137
|
-
this.destroy(err, (
|
|
18138
|
-
return
|
|
18137
|
+
this.destroy(err, (err, data) => {
|
|
18138
|
+
return err ? reject(err) : resolve(data);
|
|
18139
18139
|
});
|
|
18140
18140
|
});
|
|
18141
18141
|
}
|
|
@@ -18232,7 +18232,7 @@ var require_connect = __commonJS2(function(exports, module) {
|
|
|
18232
18232
|
const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions);
|
|
18233
18233
|
timeout = timeout == null ? 1e4 : timeout;
|
|
18234
18234
|
allowH2 = allowH2 != null ? allowH2 : false;
|
|
18235
|
-
return function
|
|
18235
|
+
return function connect2({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) {
|
|
18236
18236
|
let socket;
|
|
18237
18237
|
if (protocol === "https:") {
|
|
18238
18238
|
if (!tls) {
|
|
@@ -18254,8 +18254,8 @@ var require_connect = __commonJS2(function(exports, module) {
|
|
|
18254
18254
|
port,
|
|
18255
18255
|
host: hostname
|
|
18256
18256
|
});
|
|
18257
|
-
socket.on("session", function(
|
|
18258
|
-
sessionCache.set(sessionKey,
|
|
18257
|
+
socket.on("session", function(session) {
|
|
18258
|
+
sessionCache.set(sessionKey, session);
|
|
18259
18259
|
});
|
|
18260
18260
|
} else {
|
|
18261
18261
|
assert(!httpSocket, "httpSocket can only be sent on TLS update");
|
|
@@ -19772,8 +19772,8 @@ var require_webidl = __commonJS2(function(exports, module) {
|
|
|
19772
19772
|
}
|
|
19773
19773
|
const result = {};
|
|
19774
19774
|
if (!types.isProxy(O)) {
|
|
19775
|
-
const
|
|
19776
|
-
for (const key of
|
|
19775
|
+
const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)];
|
|
19776
|
+
for (const key of keys) {
|
|
19777
19777
|
const keyName = webidl.util.Stringify(key);
|
|
19778
19778
|
const typedKey = keyConverter(key, prefix, `Key ${keyName} in ${argument}`);
|
|
19779
19779
|
const typedValue = valueConverter(O[key], prefix, `${argument}[${keyName}]`);
|
|
@@ -20880,12 +20880,12 @@ var require_formdata = __commonJS2(function(exports, module) {
|
|
|
20880
20880
|
value = webidl.converters.USVString(value);
|
|
20881
20881
|
}
|
|
20882
20882
|
const entry = makeEntry(name, value, filename);
|
|
20883
|
-
const idx = this.#state.findIndex((
|
|
20883
|
+
const idx = this.#state.findIndex((entry) => entry.name === name);
|
|
20884
20884
|
if (idx !== -1) {
|
|
20885
20885
|
this.#state = [
|
|
20886
20886
|
...this.#state.slice(0, idx),
|
|
20887
20887
|
entry,
|
|
20888
|
-
...this.#state.slice(idx + 1).filter((
|
|
20888
|
+
...this.#state.slice(idx + 1).filter((entry) => entry.name !== name)
|
|
20889
20889
|
];
|
|
20890
20890
|
} else {
|
|
20891
20891
|
this.#state.push(entry);
|
|
@@ -21288,20 +21288,20 @@ Content-Disposition: form-data`;
|
|
|
21288
21288
|
let hasUnknownSizeValue = false;
|
|
21289
21289
|
for (const [name, value] of object) {
|
|
21290
21290
|
if (typeof value === "string") {
|
|
21291
|
-
const
|
|
21291
|
+
const chunk = textEncoder.encode(prefix + `; name="${formdataEscape(normalizeLinefeeds(name))}"` + `\r
|
|
21292
21292
|
\r
|
|
21293
21293
|
${normalizeLinefeeds(value)}\r
|
|
21294
21294
|
`);
|
|
21295
|
-
blobParts.push(
|
|
21296
|
-
length +=
|
|
21295
|
+
blobParts.push(chunk);
|
|
21296
|
+
length += chunk.byteLength;
|
|
21297
21297
|
} else {
|
|
21298
|
-
const
|
|
21298
|
+
const chunk = textEncoder.encode(`${prefix}; name="${formdataEscape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${formdataEscape(value.name)}"` : "") + `\r
|
|
21299
21299
|
` + `Content-Type: ${value.type || "application/octet-stream"}\r
|
|
21300
21300
|
\r
|
|
21301
21301
|
`);
|
|
21302
|
-
blobParts.push(
|
|
21302
|
+
blobParts.push(chunk, value, rn);
|
|
21303
21303
|
if (typeof value.size === "number") {
|
|
21304
|
-
length +=
|
|
21304
|
+
length += chunk.byteLength + value.size + rn.byteLength;
|
|
21305
21305
|
} else {
|
|
21306
21306
|
hasUnknownSizeValue = true;
|
|
21307
21307
|
}
|
|
@@ -21430,8 +21430,8 @@ ${normalizeLinefeeds(value)}\r
|
|
|
21430
21430
|
case "application/x-www-form-urlencoded": {
|
|
21431
21431
|
const entries = new URLSearchParams(value.toString());
|
|
21432
21432
|
const fd = new FormData;
|
|
21433
|
-
for (const [name,
|
|
21434
|
-
fd.append(name,
|
|
21433
|
+
for (const [name, value] of entries) {
|
|
21434
|
+
fd.append(name, value);
|
|
21435
21435
|
}
|
|
21436
21436
|
return fd;
|
|
21437
21437
|
}
|
|
@@ -22162,8 +22162,8 @@ var require_client_h1 = __commonJS2(function(exports, module) {
|
|
|
22162
22162
|
if (body && typeof body.read === "function") {
|
|
22163
22163
|
body.read(0);
|
|
22164
22164
|
}
|
|
22165
|
-
const
|
|
22166
|
-
contentLength =
|
|
22165
|
+
const bodyLength2 = util.bodyLength(body);
|
|
22166
|
+
contentLength = bodyLength2 ?? contentLength;
|
|
22167
22167
|
if (contentLength === null) {
|
|
22168
22168
|
contentLength = request.contentLength;
|
|
22169
22169
|
}
|
|
@@ -22246,7 +22246,7 @@ upgrade: ${upgrade}\r
|
|
|
22246
22246
|
if (channels.sendHeaders.hasSubscribers) {
|
|
22247
22247
|
channels.sendHeaders.publish({ request, headers: header, socket });
|
|
22248
22248
|
}
|
|
22249
|
-
if (!body ||
|
|
22249
|
+
if (!body || bodyLength2 === 0) {
|
|
22250
22250
|
writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload);
|
|
22251
22251
|
} else if (util.isBuffer(body)) {
|
|
22252
22252
|
writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload);
|
|
@@ -22869,8 +22869,8 @@ var require_client_h2 = __commonJS2(function(exports, module) {
|
|
|
22869
22869
|
}
|
|
22870
22870
|
stream = session.request(headers, { endStream: false, signal });
|
|
22871
22871
|
stream[kHTTP2Stream] = true;
|
|
22872
|
-
stream.once("response", (
|
|
22873
|
-
const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } =
|
|
22872
|
+
stream.once("response", (headers, _flags) => {
|
|
22873
|
+
const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers;
|
|
22874
22874
|
request.onUpgrade(statusCode, parseH2Headers(realHeaders), stream);
|
|
22875
22875
|
++session[kOpenStreams];
|
|
22876
22876
|
client[kQueue][client[kRunningIdx]++] = null;
|
|
@@ -22890,8 +22890,8 @@ var require_client_h2 = __commonJS2(function(exports, module) {
|
|
|
22890
22890
|
}
|
|
22891
22891
|
stream = session.request(headers, { endStream: false, signal });
|
|
22892
22892
|
stream[kHTTP2Stream] = true;
|
|
22893
|
-
stream.on("response", (
|
|
22894
|
-
const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } =
|
|
22893
|
+
stream.on("response", (headers) => {
|
|
22894
|
+
const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers;
|
|
22895
22895
|
request.onUpgrade(statusCode, parseH2Headers(realHeaders), stream);
|
|
22896
22896
|
++session[kOpenStreams];
|
|
22897
22897
|
client[kQueue][client[kRunningIdx]++] = null;
|
|
@@ -22960,8 +22960,8 @@ var require_client_h2 = __commonJS2(function(exports, module) {
|
|
|
22960
22960
|
}
|
|
22961
22961
|
++session[kOpenStreams];
|
|
22962
22962
|
stream.setTimeout(requestTimeout);
|
|
22963
|
-
stream.once("response", (
|
|
22964
|
-
const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } =
|
|
22963
|
+
stream.once("response", (headers) => {
|
|
22964
|
+
const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers;
|
|
22965
22965
|
request.onResponseStarted();
|
|
22966
22966
|
if (request.aborted) {
|
|
22967
22967
|
stream.removeAllListeners("data");
|
|
@@ -23240,7 +23240,7 @@ var require_client = __commonJS2(function(exports, module) {
|
|
|
23240
23240
|
tls,
|
|
23241
23241
|
strictContentLength,
|
|
23242
23242
|
maxCachedSessions,
|
|
23243
|
-
connect
|
|
23243
|
+
connect,
|
|
23244
23244
|
maxRequestsPerClient,
|
|
23245
23245
|
localAddress,
|
|
23246
23246
|
maxResponseSize,
|
|
@@ -23295,7 +23295,7 @@ var require_client = __commonJS2(function(exports, module) {
|
|
|
23295
23295
|
if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) {
|
|
23296
23296
|
throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero");
|
|
23297
23297
|
}
|
|
23298
|
-
if (
|
|
23298
|
+
if (connect != null && typeof connect !== "function" && typeof connect !== "object") {
|
|
23299
23299
|
throw new InvalidArgumentError("connect must be a function or an object");
|
|
23300
23300
|
}
|
|
23301
23301
|
if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) {
|
|
@@ -23326,8 +23326,8 @@ var require_client = __commonJS2(function(exports, module) {
|
|
|
23326
23326
|
throw new InvalidArgumentError("connectionWindowSize must be a positive integer, greater than 0");
|
|
23327
23327
|
}
|
|
23328
23328
|
super();
|
|
23329
|
-
if (typeof
|
|
23330
|
-
|
|
23329
|
+
if (typeof connect !== "function") {
|
|
23330
|
+
connect = buildConnector({
|
|
23331
23331
|
...tls,
|
|
23332
23332
|
maxCachedSessions,
|
|
23333
23333
|
allowH2,
|
|
@@ -23335,11 +23335,11 @@ var require_client = __commonJS2(function(exports, module) {
|
|
|
23335
23335
|
socketPath,
|
|
23336
23336
|
timeout: connectTimeout,
|
|
23337
23337
|
...typeof autoSelectFamily === "boolean" ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined,
|
|
23338
|
-
...
|
|
23338
|
+
...connect
|
|
23339
23339
|
});
|
|
23340
23340
|
}
|
|
23341
23341
|
this[kUrl] = util.parseOrigin(url);
|
|
23342
|
-
this[kConnector] =
|
|
23342
|
+
this[kConnector] = connect;
|
|
23343
23343
|
this[kPipelining] = pipelining != null ? pipelining : 1;
|
|
23344
23344
|
this[kMaxHeadersSize] = maxHeaderSize;
|
|
23345
23345
|
this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4000 : keepAliveTimeout;
|
|
@@ -23502,9 +23502,9 @@ var require_client = __commonJS2(function(exports, module) {
|
|
|
23502
23502
|
assert(socket);
|
|
23503
23503
|
try {
|
|
23504
23504
|
client[kHTTPContext] = socket.alpnProtocol === "h2" ? connectH2(client, socket) : connectH1(client, socket);
|
|
23505
|
-
} catch (
|
|
23505
|
+
} catch (err) {
|
|
23506
23506
|
socket.destroy().on("error", noop);
|
|
23507
|
-
handleConnectError(client,
|
|
23507
|
+
handleConnectError(client, err, { host, hostname, protocol, port });
|
|
23508
23508
|
client[kResume]();
|
|
23509
23509
|
return;
|
|
23510
23510
|
}
|
|
@@ -23927,14 +23927,14 @@ var require_pool = __commonJS2(function(exports, module) {
|
|
|
23927
23927
|
this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl };
|
|
23928
23928
|
this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : undefined;
|
|
23929
23929
|
this[kFactory] = factory;
|
|
23930
|
-
this.on("connect", (
|
|
23930
|
+
this.on("connect", (origin, targets) => {
|
|
23931
23931
|
if (clientTtl != null && clientTtl > 0) {
|
|
23932
23932
|
for (const target of targets) {
|
|
23933
23933
|
Object.assign(target, { ttl: Date.now() });
|
|
23934
23934
|
}
|
|
23935
23935
|
}
|
|
23936
23936
|
});
|
|
23937
|
-
this.on("connectionError", (
|
|
23937
|
+
this.on("connectionError", (origin, targets, error) => {
|
|
23938
23938
|
for (const target of targets) {
|
|
23939
23939
|
const idx = this[kClients].indexOf(target);
|
|
23940
23940
|
if (idx !== -1) {
|
|
@@ -24021,7 +24021,7 @@ var require_balanced_pool = __commonJS2(function(exports, module) {
|
|
|
24021
24021
|
}
|
|
24022
24022
|
addUpstream(upstream) {
|
|
24023
24023
|
const upstreamOrigin = parseOrigin(upstream).origin;
|
|
24024
|
-
if (this[kClients].find((
|
|
24024
|
+
if (this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true)) {
|
|
24025
24025
|
return this;
|
|
24026
24026
|
}
|
|
24027
24027
|
const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions]));
|
|
@@ -24055,7 +24055,7 @@ var require_balanced_pool = __commonJS2(function(exports, module) {
|
|
|
24055
24055
|
}
|
|
24056
24056
|
removeUpstream(upstream) {
|
|
24057
24057
|
const upstreamOrigin = parseOrigin(upstream).origin;
|
|
24058
|
-
const pool = this[kClients].find((
|
|
24058
|
+
const pool = this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true);
|
|
24059
24059
|
if (pool) {
|
|
24060
24060
|
this[kRemoveClient](pool);
|
|
24061
24061
|
}
|
|
@@ -24072,7 +24072,7 @@ var require_balanced_pool = __commonJS2(function(exports, module) {
|
|
|
24072
24072
|
if (this[kClients].length === 0) {
|
|
24073
24073
|
throw new BalancedPoolMissingUpstreamError;
|
|
24074
24074
|
}
|
|
24075
|
-
const dispatcher = this[kClients].find((
|
|
24075
|
+
const dispatcher = this[kClients].find((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true);
|
|
24076
24076
|
if (!dispatcher) {
|
|
24077
24077
|
return;
|
|
24078
24078
|
}
|
|
@@ -24171,14 +24171,14 @@ var require_round_robin_pool = __commonJS2(function(exports, module) {
|
|
|
24171
24171
|
this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : undefined;
|
|
24172
24172
|
this[kFactory] = factory;
|
|
24173
24173
|
this[kIndex] = -1;
|
|
24174
|
-
this.on("connect", (
|
|
24174
|
+
this.on("connect", (origin, targets) => {
|
|
24175
24175
|
if (clientTtl != null && clientTtl > 0) {
|
|
24176
24176
|
for (const target of targets) {
|
|
24177
24177
|
Object.assign(target, { ttl: Date.now() });
|
|
24178
24178
|
}
|
|
24179
24179
|
}
|
|
24180
24180
|
});
|
|
24181
|
-
this.on("connectionError", (
|
|
24181
|
+
this.on("connectionError", (origin, targets, error) => {
|
|
24182
24182
|
for (const target of targets) {
|
|
24183
24183
|
const idx = this[kClients].indexOf(target);
|
|
24184
24184
|
if (idx !== -1) {
|
|
@@ -24289,21 +24289,21 @@ var require_agent = __commonJS2(function(exports, module) {
|
|
|
24289
24289
|
let dispatcher = result && result.dispatcher;
|
|
24290
24290
|
if (!dispatcher) {
|
|
24291
24291
|
const closeClientIfUnused = (connected) => {
|
|
24292
|
-
const
|
|
24293
|
-
if (
|
|
24292
|
+
const result = this[kClients].get(key);
|
|
24293
|
+
if (result) {
|
|
24294
24294
|
if (connected)
|
|
24295
|
-
|
|
24296
|
-
if (
|
|
24295
|
+
result.count -= 1;
|
|
24296
|
+
if (result.count <= 0) {
|
|
24297
24297
|
this[kClients].delete(key);
|
|
24298
|
-
|
|
24298
|
+
result.dispatcher.close();
|
|
24299
24299
|
}
|
|
24300
24300
|
this[kOrigins].delete(key);
|
|
24301
24301
|
}
|
|
24302
24302
|
};
|
|
24303
24303
|
dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", (origin, targets) => {
|
|
24304
|
-
const
|
|
24305
|
-
if (
|
|
24306
|
-
|
|
24304
|
+
const result = this[kClients].get(key);
|
|
24305
|
+
if (result) {
|
|
24306
|
+
result.count += 1;
|
|
24307
24307
|
}
|
|
24308
24308
|
this[kOnConnect](origin, targets);
|
|
24309
24309
|
}).on("disconnect", (origin, targets, err) => {
|
|
@@ -24453,36 +24453,36 @@ var require_proxy_agent = __commonJS2(function(exports, module) {
|
|
|
24453
24453
|
const connect = buildConnector({ ...opts.proxyTls });
|
|
24454
24454
|
this[kConnectEndpoint] = buildConnector({ ...opts.requestTls });
|
|
24455
24455
|
const agentFactory = opts.factory || defaultAgentFactory;
|
|
24456
|
-
const factory = (
|
|
24457
|
-
const { protocol
|
|
24458
|
-
if (!this[kTunnelProxy] &&
|
|
24456
|
+
const factory = (origin, options) => {
|
|
24457
|
+
const { protocol } = new URL(origin);
|
|
24458
|
+
if (!this[kTunnelProxy] && protocol === "http:" && this[kProxy].protocol === "http:") {
|
|
24459
24459
|
return new Http1ProxyWrapper(this[kProxy].uri, {
|
|
24460
24460
|
headers: this[kProxyHeaders],
|
|
24461
24461
|
connect,
|
|
24462
24462
|
factory: agentFactory
|
|
24463
24463
|
});
|
|
24464
24464
|
}
|
|
24465
|
-
return agentFactory(
|
|
24465
|
+
return agentFactory(origin, options);
|
|
24466
24466
|
};
|
|
24467
24467
|
this[kClient] = clientFactory(url, { connect });
|
|
24468
24468
|
this[kAgent] = new Agent({
|
|
24469
24469
|
...opts,
|
|
24470
24470
|
factory,
|
|
24471
|
-
connect: async (
|
|
24472
|
-
let requestedPath =
|
|
24473
|
-
if (!
|
|
24474
|
-
requestedPath += `:${defaultProtocolPort(
|
|
24471
|
+
connect: async (opts, callback) => {
|
|
24472
|
+
let requestedPath = opts.host;
|
|
24473
|
+
if (!opts.port) {
|
|
24474
|
+
requestedPath += `:${defaultProtocolPort(opts.protocol)}`;
|
|
24475
24475
|
}
|
|
24476
24476
|
try {
|
|
24477
24477
|
const connectParams = {
|
|
24478
24478
|
origin,
|
|
24479
24479
|
port,
|
|
24480
24480
|
path: requestedPath,
|
|
24481
|
-
signal:
|
|
24481
|
+
signal: opts.signal,
|
|
24482
24482
|
headers: {
|
|
24483
24483
|
...this[kProxyHeaders],
|
|
24484
|
-
host:
|
|
24485
|
-
...
|
|
24484
|
+
host: opts.host,
|
|
24485
|
+
...opts.connections == null || opts.connections > 0 ? { "proxy-connection": "keep-alive" } : {}
|
|
24486
24486
|
},
|
|
24487
24487
|
servername: this[kProxyTls]?.servername || proxyHostname
|
|
24488
24488
|
};
|
|
@@ -24498,7 +24498,7 @@ var require_proxy_agent = __commonJS2(function(exports, module) {
|
|
|
24498
24498
|
connectParams
|
|
24499
24499
|
});
|
|
24500
24500
|
}
|
|
24501
|
-
if (
|
|
24501
|
+
if (opts.protocol !== "https:") {
|
|
24502
24502
|
callback(null, socket);
|
|
24503
24503
|
return;
|
|
24504
24504
|
}
|
|
@@ -24506,9 +24506,9 @@ var require_proxy_agent = __commonJS2(function(exports, module) {
|
|
|
24506
24506
|
if (this[kRequestTls]) {
|
|
24507
24507
|
servername = this[kRequestTls].servername;
|
|
24508
24508
|
} else {
|
|
24509
|
-
servername =
|
|
24509
|
+
servername = opts.servername;
|
|
24510
24510
|
}
|
|
24511
|
-
this[kConnectEndpoint]({ ...
|
|
24511
|
+
this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback);
|
|
24512
24512
|
} catch (err) {
|
|
24513
24513
|
if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") {
|
|
24514
24514
|
callback(new SecureProxyConnectionError(err));
|
|
@@ -25231,31 +25231,31 @@ var require_readable = __commonJS2(function(exports, module) {
|
|
|
25231
25231
|
}
|
|
25232
25232
|
});
|
|
25233
25233
|
}
|
|
25234
|
-
function consumeStart(
|
|
25235
|
-
if (
|
|
25234
|
+
function consumeStart(consume) {
|
|
25235
|
+
if (consume.body === null) {
|
|
25236
25236
|
return;
|
|
25237
25237
|
}
|
|
25238
|
-
const { _readableState: state } =
|
|
25238
|
+
const { _readableState: state } = consume.stream;
|
|
25239
25239
|
if (state.bufferIndex) {
|
|
25240
25240
|
const start = state.bufferIndex;
|
|
25241
25241
|
const end = state.buffer.length;
|
|
25242
25242
|
for (let n = start;n < end; n++) {
|
|
25243
|
-
consumePush(
|
|
25243
|
+
consumePush(consume, state.buffer[n]);
|
|
25244
25244
|
}
|
|
25245
25245
|
} else {
|
|
25246
25246
|
for (const chunk of state.buffer) {
|
|
25247
|
-
consumePush(
|
|
25247
|
+
consumePush(consume, chunk);
|
|
25248
25248
|
}
|
|
25249
25249
|
}
|
|
25250
25250
|
if (state.endEmitted) {
|
|
25251
25251
|
consumeEnd(this[kConsume], this._readableState.encoding);
|
|
25252
25252
|
} else {
|
|
25253
|
-
|
|
25253
|
+
consume.stream.on("end", function() {
|
|
25254
25254
|
consumeEnd(this[kConsume], this._readableState.encoding);
|
|
25255
25255
|
});
|
|
25256
25256
|
}
|
|
25257
|
-
|
|
25258
|
-
while (
|
|
25257
|
+
consume.stream.resume();
|
|
25258
|
+
while (consume.stream.read() != null) {}
|
|
25259
25259
|
}
|
|
25260
25260
|
function chunksDecode(chunks, length, encoding) {
|
|
25261
25261
|
if (chunks.length === 0 || length === 0) {
|
|
@@ -25286,8 +25286,8 @@ var require_readable = __commonJS2(function(exports, module) {
|
|
|
25286
25286
|
}
|
|
25287
25287
|
return buffer;
|
|
25288
25288
|
}
|
|
25289
|
-
function consumeEnd(
|
|
25290
|
-
const { type, body, resolve, stream, length } =
|
|
25289
|
+
function consumeEnd(consume, encoding) {
|
|
25290
|
+
const { type, body, resolve, stream, length } = consume;
|
|
25291
25291
|
try {
|
|
25292
25292
|
if (type === "text") {
|
|
25293
25293
|
resolve(chunksDecode(body, length, encoding));
|
|
@@ -25300,30 +25300,30 @@ var require_readable = __commonJS2(function(exports, module) {
|
|
|
25300
25300
|
} else if (type === "bytes") {
|
|
25301
25301
|
resolve(chunksConcat(body, length));
|
|
25302
25302
|
}
|
|
25303
|
-
consumeFinish(
|
|
25303
|
+
consumeFinish(consume);
|
|
25304
25304
|
} catch (err) {
|
|
25305
25305
|
stream.destroy(err);
|
|
25306
25306
|
}
|
|
25307
25307
|
}
|
|
25308
|
-
function consumePush(
|
|
25309
|
-
|
|
25310
|
-
|
|
25308
|
+
function consumePush(consume, chunk) {
|
|
25309
|
+
consume.length += chunk.length;
|
|
25310
|
+
consume.body.push(chunk);
|
|
25311
25311
|
}
|
|
25312
|
-
function consumeFinish(
|
|
25313
|
-
if (
|
|
25312
|
+
function consumeFinish(consume, err) {
|
|
25313
|
+
if (consume.body === null) {
|
|
25314
25314
|
return;
|
|
25315
25315
|
}
|
|
25316
25316
|
if (err) {
|
|
25317
|
-
|
|
25317
|
+
consume.reject(err);
|
|
25318
25318
|
} else {
|
|
25319
|
-
|
|
25319
|
+
consume.resolve();
|
|
25320
25320
|
}
|
|
25321
|
-
|
|
25322
|
-
|
|
25323
|
-
|
|
25324
|
-
|
|
25325
|
-
|
|
25326
|
-
|
|
25321
|
+
consume.type = null;
|
|
25322
|
+
consume.stream = null;
|
|
25323
|
+
consume.resolve = null;
|
|
25324
|
+
consume.reject = null;
|
|
25325
|
+
consume.length = 0;
|
|
25326
|
+
consume.body = null;
|
|
25327
25327
|
}
|
|
25328
25328
|
module.exports = {
|
|
25329
25329
|
Readable: BodyReadable,
|
|
@@ -25636,13 +25636,13 @@ var require_api_stream = __commonJS2(function(exports, module) {
|
|
|
25636
25636
|
throw new InvalidReturnValueError("expected Writable");
|
|
25637
25637
|
}
|
|
25638
25638
|
finished(res, { readable: false }, (err) => {
|
|
25639
|
-
const { callback, res
|
|
25639
|
+
const { callback, res, opaque, trailers, abort } = this;
|
|
25640
25640
|
this.res = null;
|
|
25641
|
-
if (err || !
|
|
25642
|
-
util.destroy(
|
|
25641
|
+
if (err || !res?.readable) {
|
|
25642
|
+
util.destroy(res, err);
|
|
25643
25643
|
}
|
|
25644
25644
|
this.callback = null;
|
|
25645
|
-
this.runInAsyncScope(callback, null, err || null, { opaque
|
|
25645
|
+
this.runInAsyncScope(callback, null, err || null, { opaque, trailers });
|
|
25646
25646
|
if (err) {
|
|
25647
25647
|
abort();
|
|
25648
25648
|
}
|
|
@@ -25860,9 +25860,9 @@ var require_api_pipeline = __commonJS2(function(exports, module) {
|
|
|
25860
25860
|
throw new InvalidReturnValueError("expected Readable");
|
|
25861
25861
|
}
|
|
25862
25862
|
body.on("data", (chunk) => {
|
|
25863
|
-
const { ret, body
|
|
25864
|
-
if (!ret.push(chunk) &&
|
|
25865
|
-
|
|
25863
|
+
const { ret, body } = this;
|
|
25864
|
+
if (!ret.push(chunk) && body.pause) {
|
|
25865
|
+
body.pause();
|
|
25866
25866
|
}
|
|
25867
25867
|
}).on("error", (err) => {
|
|
25868
25868
|
const { ret } = this;
|
|
@@ -26196,20 +26196,20 @@ var require_mock_utils = __commonJS2(function(exports, module) {
|
|
|
26196
26196
|
}
|
|
26197
26197
|
return Object.fromEntries(entries);
|
|
26198
26198
|
}
|
|
26199
|
-
function matchHeaders(
|
|
26200
|
-
if (typeof
|
|
26199
|
+
function matchHeaders(mockDispatch, headers) {
|
|
26200
|
+
if (typeof mockDispatch.headers === "function") {
|
|
26201
26201
|
if (Array.isArray(headers)) {
|
|
26202
26202
|
headers = buildHeadersFromArray(headers);
|
|
26203
26203
|
}
|
|
26204
|
-
return
|
|
26204
|
+
return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {});
|
|
26205
26205
|
}
|
|
26206
|
-
if (typeof
|
|
26206
|
+
if (typeof mockDispatch.headers === "undefined") {
|
|
26207
26207
|
return true;
|
|
26208
26208
|
}
|
|
26209
|
-
if (typeof headers !== "object" || typeof
|
|
26209
|
+
if (typeof headers !== "object" || typeof mockDispatch.headers !== "object") {
|
|
26210
26210
|
return false;
|
|
26211
26211
|
}
|
|
26212
|
-
for (const [matchHeaderName, matchHeaderValue] of Object.entries(
|
|
26212
|
+
for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) {
|
|
26213
26213
|
const headerValue = getHeaderByName(headers, matchHeaderName);
|
|
26214
26214
|
if (!matchValue(matchHeaderValue, headerValue)) {
|
|
26215
26215
|
return false;
|
|
@@ -26253,11 +26253,11 @@ var require_mock_utils = __commonJS2(function(exports, module) {
|
|
|
26253
26253
|
qp.sort();
|
|
26254
26254
|
return [...pathSegments, qp.toString()].join("?");
|
|
26255
26255
|
}
|
|
26256
|
-
function matchKey(
|
|
26257
|
-
const pathMatch = matchValue(
|
|
26258
|
-
const methodMatch = matchValue(
|
|
26259
|
-
const bodyMatch = typeof
|
|
26260
|
-
const headersMatch = matchHeaders(
|
|
26256
|
+
function matchKey(mockDispatch, { path, method, body, headers }) {
|
|
26257
|
+
const pathMatch = matchValue(mockDispatch.path, path);
|
|
26258
|
+
const methodMatch = matchValue(mockDispatch.method, method);
|
|
26259
|
+
const bodyMatch = typeof mockDispatch.body !== "undefined" ? matchValue(mockDispatch.body, body) : true;
|
|
26260
|
+
const headersMatch = matchHeaders(mockDispatch, headers);
|
|
26261
26261
|
return pathMatch && methodMatch && bodyMatch && headersMatch;
|
|
26262
26262
|
}
|
|
26263
26263
|
function getResponseData(data) {
|
|
@@ -26293,7 +26293,7 @@ var require_mock_utils = __commonJS2(function(exports, module) {
|
|
|
26293
26293
|
if (matchedMockDispatches.length === 0) {
|
|
26294
26294
|
throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`);
|
|
26295
26295
|
}
|
|
26296
|
-
matchedMockDispatches = matchedMockDispatches.filter((
|
|
26296
|
+
matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers));
|
|
26297
26297
|
if (matchedMockDispatches.length === 0) {
|
|
26298
26298
|
const headers = typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers;
|
|
26299
26299
|
throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`);
|
|
@@ -26366,15 +26366,15 @@ var require_mock_utils = __commonJS2(function(exports, module) {
|
|
|
26366
26366
|
}
|
|
26367
26367
|
function mockDispatch(opts, handler) {
|
|
26368
26368
|
const key = buildKey(opts);
|
|
26369
|
-
const
|
|
26370
|
-
|
|
26371
|
-
if (
|
|
26372
|
-
|
|
26373
|
-
}
|
|
26374
|
-
const { data: { statusCode, data, headers, trailers, error }, delay, persist } =
|
|
26375
|
-
const { timesInvoked, times } =
|
|
26376
|
-
|
|
26377
|
-
|
|
26369
|
+
const mockDispatch = getMockDispatch(this[kDispatches], key);
|
|
26370
|
+
mockDispatch.timesInvoked++;
|
|
26371
|
+
if (mockDispatch.data.callback) {
|
|
26372
|
+
mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) };
|
|
26373
|
+
}
|
|
26374
|
+
const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch;
|
|
26375
|
+
const { timesInvoked, times } = mockDispatch;
|
|
26376
|
+
mockDispatch.consumed = !persist && timesInvoked >= times;
|
|
26377
|
+
mockDispatch.pending = timesInvoked < times;
|
|
26378
26378
|
if (error !== null) {
|
|
26379
26379
|
deleteMockDispatch(this[kDispatches], key);
|
|
26380
26380
|
handler.onError(error);
|
|
@@ -26573,14 +26573,14 @@ var require_mock_interceptor = __commonJS2(function(exports, module) {
|
|
|
26573
26573
|
if (typeof resolvedData !== "object" || resolvedData === null) {
|
|
26574
26574
|
throw new InvalidArgumentError("reply options callback must return an object");
|
|
26575
26575
|
}
|
|
26576
|
-
const
|
|
26577
|
-
this.validateReplyParameters(
|
|
26576
|
+
const replyParameters = { data: "", responseOptions: {}, ...resolvedData };
|
|
26577
|
+
this.validateReplyParameters(replyParameters);
|
|
26578
26578
|
return {
|
|
26579
|
-
...this.createMockScopeDispatchData(
|
|
26579
|
+
...this.createMockScopeDispatchData(replyParameters)
|
|
26580
26580
|
};
|
|
26581
26581
|
};
|
|
26582
|
-
const
|
|
26583
|
-
return new MockScope(
|
|
26582
|
+
const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] });
|
|
26583
|
+
return new MockScope(newMockDispatch);
|
|
26584
26584
|
}
|
|
26585
26585
|
const replyParameters = {
|
|
26586
26586
|
statusCode: replyOptionsCallbackOrStatusCode,
|
|
@@ -27098,11 +27098,11 @@ var require_mock_agent = __commonJS2(function(exports, module) {
|
|
|
27098
27098
|
this[kMockAgentSet](origin, dispatcher);
|
|
27099
27099
|
return dispatcher;
|
|
27100
27100
|
}
|
|
27101
|
-
for (const [keyMatcher,
|
|
27102
|
-
if (
|
|
27101
|
+
for (const [keyMatcher, result] of Array.from(this[kClients])) {
|
|
27102
|
+
if (result && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) {
|
|
27103
27103
|
const dispatcher = this[kFactory](origin);
|
|
27104
27104
|
this[kMockAgentSet](origin, dispatcher);
|
|
27105
|
-
dispatcher[kDispatches] =
|
|
27105
|
+
dispatcher[kDispatches] = result.dispatcher[kDispatches];
|
|
27106
27106
|
return dispatcher;
|
|
27107
27107
|
}
|
|
27108
27108
|
}
|
|
@@ -28124,7 +28124,7 @@ var require_dump = __commonJS2(function(exports, module) {
|
|
|
28124
28124
|
module.exports = createDumpInterceptor;
|
|
28125
28125
|
});
|
|
28126
28126
|
var require_dns = __commonJS2(function(exports, module) {
|
|
28127
|
-
var { isIP
|
|
28127
|
+
var { isIP } = __require2("node:net");
|
|
28128
28128
|
var { lookup } = __require2("node:dns");
|
|
28129
28129
|
var DecoratorHandler = require_decorator_handler();
|
|
28130
28130
|
var { InvalidArgumentError, InformationalError } = require_errors();
|
|
@@ -28431,7 +28431,7 @@ var require_dns = __commonJS2(function(exports, module) {
|
|
|
28431
28431
|
return (dispatch) => {
|
|
28432
28432
|
return function dnsInterceptor(origDispatchOpts, handler) {
|
|
28433
28433
|
const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin);
|
|
28434
|
-
if (
|
|
28434
|
+
if (isIP(origin.hostname) !== 0) {
|
|
28435
28435
|
return dispatch(origDispatchOpts, handler);
|
|
28436
28436
|
}
|
|
28437
28437
|
instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => {
|
|
@@ -29616,13 +29616,13 @@ var require_memory_cache_store = __commonJS2(function(exports, module) {
|
|
|
29616
29616
|
});
|
|
29617
29617
|
store.#hasEmittedMaxSizeEvent = true;
|
|
29618
29618
|
}
|
|
29619
|
-
for (const [
|
|
29620
|
-
for (const
|
|
29621
|
-
store.#size -=
|
|
29619
|
+
for (const [key, entries] of store.#entries) {
|
|
29620
|
+
for (const entry of entries.splice(0, entries.length / 2)) {
|
|
29621
|
+
store.#size -= entry.size;
|
|
29622
29622
|
store.#count -= 1;
|
|
29623
29623
|
}
|
|
29624
|
-
if (
|
|
29625
|
-
store.#entries.delete(
|
|
29624
|
+
if (entries.length === 0) {
|
|
29625
|
+
store.#entries.delete(key);
|
|
29626
29626
|
}
|
|
29627
29627
|
}
|
|
29628
29628
|
if (store.#size < store.#maxSize && store.#count < store.#maxCount) {
|
|
@@ -29809,7 +29809,7 @@ var require_cache2 = __commonJS2(function(exports, module) {
|
|
|
29809
29809
|
}
|
|
29810
29810
|
return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler));
|
|
29811
29811
|
}
|
|
29812
|
-
function sendCachedValue(handler, opts, result, age, context,
|
|
29812
|
+
function sendCachedValue(handler, opts, result, age, context, isStale) {
|
|
29813
29813
|
const stream = util.isStream(result.body) ? result.body : Readable.from(result.body ?? []);
|
|
29814
29814
|
assert(!stream.destroyed, "stream should not be destroyed");
|
|
29815
29815
|
assert(!stream.readableDidRead, "stream should not be readableDidRead");
|
|
@@ -29851,7 +29851,7 @@ var require_cache2 = __commonJS2(function(exports, module) {
|
|
|
29851
29851
|
return;
|
|
29852
29852
|
}
|
|
29853
29853
|
const headers = { ...result.headers, age: String(age) };
|
|
29854
|
-
if (
|
|
29854
|
+
if (isStale) {
|
|
29855
29855
|
headers.warning = '110 - "response is stale"';
|
|
29856
29856
|
}
|
|
29857
29857
|
handler.onResponseStart?.(controller, result.statusCode, headers, result.statusMessage);
|
|
@@ -29884,22 +29884,22 @@ var require_cache2 = __commonJS2(function(exports, module) {
|
|
|
29884
29884
|
if (!revalidate && withinStaleWhileRevalidateWindow(result)) {
|
|
29885
29885
|
sendCachedValue(handler, opts, result, age, null, true);
|
|
29886
29886
|
queueMicrotask(() => {
|
|
29887
|
-
let
|
|
29887
|
+
let headers = {
|
|
29888
29888
|
...opts.headers,
|
|
29889
29889
|
"if-modified-since": new Date(result.cachedAt).toUTCString()
|
|
29890
29890
|
};
|
|
29891
29891
|
if (result.etag) {
|
|
29892
|
-
|
|
29892
|
+
headers["if-none-match"] = result.etag;
|
|
29893
29893
|
}
|
|
29894
29894
|
if (result.vary) {
|
|
29895
|
-
|
|
29896
|
-
...
|
|
29895
|
+
headers = {
|
|
29896
|
+
...headers,
|
|
29897
29897
|
...result.vary
|
|
29898
29898
|
};
|
|
29899
29899
|
}
|
|
29900
29900
|
dispatch({
|
|
29901
29901
|
...opts,
|
|
29902
|
-
headers
|
|
29902
|
+
headers
|
|
29903
29903
|
}, new CacheHandler(globalOpts, cacheKey, {
|
|
29904
29904
|
onRequestStart() {},
|
|
29905
29905
|
onRequestUpgrade() {},
|
|
@@ -29973,12 +29973,12 @@ var require_cache2 = __commonJS2(function(exports, module) {
|
|
|
29973
29973
|
};
|
|
29974
29974
|
const safeMethodsToNotCache = util.safeHTTPMethods.filter((method) => methods.includes(method) === false);
|
|
29975
29975
|
return (dispatch) => {
|
|
29976
|
-
return (
|
|
29977
|
-
if (!
|
|
29978
|
-
return dispatch(
|
|
29976
|
+
return (opts, handler) => {
|
|
29977
|
+
if (!opts.origin || safeMethodsToNotCache.includes(opts.method)) {
|
|
29978
|
+
return dispatch(opts, handler);
|
|
29979
29979
|
}
|
|
29980
29980
|
if (origins !== undefined) {
|
|
29981
|
-
const requestOrigin =
|
|
29981
|
+
const requestOrigin = opts.origin.toString().toLowerCase();
|
|
29982
29982
|
let isAllowed = false;
|
|
29983
29983
|
for (let i = 0;i < origins.length; i++) {
|
|
29984
29984
|
const allowed = origins[i];
|
|
@@ -29993,23 +29993,23 @@ var require_cache2 = __commonJS2(function(exports, module) {
|
|
|
29993
29993
|
}
|
|
29994
29994
|
}
|
|
29995
29995
|
if (!isAllowed) {
|
|
29996
|
-
return dispatch(
|
|
29996
|
+
return dispatch(opts, handler);
|
|
29997
29997
|
}
|
|
29998
29998
|
}
|
|
29999
|
-
|
|
30000
|
-
...
|
|
30001
|
-
headers: normalizeHeaders(
|
|
29999
|
+
opts = {
|
|
30000
|
+
...opts,
|
|
30001
|
+
headers: normalizeHeaders(opts)
|
|
30002
30002
|
};
|
|
30003
|
-
const reqCacheControl =
|
|
30003
|
+
const reqCacheControl = opts.headers?.["cache-control"] ? parseCacheControlHeader(opts.headers["cache-control"]) : undefined;
|
|
30004
30004
|
if (reqCacheControl?.["no-store"]) {
|
|
30005
|
-
return dispatch(
|
|
30005
|
+
return dispatch(opts, handler);
|
|
30006
30006
|
}
|
|
30007
|
-
const cacheKey = makeCacheKey(
|
|
30007
|
+
const cacheKey = makeCacheKey(opts);
|
|
30008
30008
|
const result = store.get(cacheKey);
|
|
30009
30009
|
if (result && typeof result.then === "function") {
|
|
30010
|
-
return result.then((
|
|
30010
|
+
return result.then((result) => handleResult(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl, result));
|
|
30011
30011
|
} else {
|
|
30012
|
-
return handleResult(dispatch, globalOpts, cacheKey, handler,
|
|
30012
|
+
return handleResult(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl, result);
|
|
30013
30013
|
}
|
|
30014
30014
|
};
|
|
30015
30015
|
};
|
|
@@ -30307,22 +30307,22 @@ var require_deduplicate = __commonJS2(function(exports, module) {
|
|
|
30307
30307
|
const safeMethodsToNotDeduplicate = util.safeHTTPMethods.filter((method) => methods.includes(method) === false);
|
|
30308
30308
|
const pendingRequests = new Map;
|
|
30309
30309
|
return (dispatch) => {
|
|
30310
|
-
return (
|
|
30311
|
-
if (!
|
|
30312
|
-
return dispatch(
|
|
30310
|
+
return (opts, handler) => {
|
|
30311
|
+
if (!opts.origin || safeMethodsToNotDeduplicate.includes(opts.method)) {
|
|
30312
|
+
return dispatch(opts, handler);
|
|
30313
30313
|
}
|
|
30314
|
-
|
|
30315
|
-
...
|
|
30316
|
-
headers: normalizeHeaders(
|
|
30314
|
+
opts = {
|
|
30315
|
+
...opts,
|
|
30316
|
+
headers: normalizeHeaders(opts)
|
|
30317
30317
|
};
|
|
30318
30318
|
if (skipHeaderNamesSet.size > 0) {
|
|
30319
|
-
for (const headerName of Object.keys(
|
|
30319
|
+
for (const headerName of Object.keys(opts.headers)) {
|
|
30320
30320
|
if (skipHeaderNamesSet.has(headerName.toLowerCase())) {
|
|
30321
|
-
return dispatch(
|
|
30321
|
+
return dispatch(opts, handler);
|
|
30322
30322
|
}
|
|
30323
30323
|
}
|
|
30324
30324
|
}
|
|
30325
|
-
const cacheKey = makeCacheKey(
|
|
30325
|
+
const cacheKey = makeCacheKey(opts);
|
|
30326
30326
|
const dedupeKey = makeDeduplicationKey(cacheKey, excludeHeaderNamesSet);
|
|
30327
30327
|
const pendingHandler = pendingRequests.get(dedupeKey);
|
|
30328
30328
|
if (pendingHandler) {
|
|
@@ -30339,7 +30339,7 @@ var require_deduplicate = __commonJS2(function(exports, module) {
|
|
|
30339
30339
|
if (pendingRequestsChannel.hasSubscribers) {
|
|
30340
30340
|
pendingRequestsChannel.publish({ size: pendingRequests.size, key: dedupeKey, type: "added" });
|
|
30341
30341
|
}
|
|
30342
|
-
return dispatch(
|
|
30342
|
+
return dispatch(opts, deduplicationHandler);
|
|
30343
30343
|
};
|
|
30344
30344
|
};
|
|
30345
30345
|
};
|
|
@@ -32112,11 +32112,11 @@ var require_subresource_integrity = __commonJS2(function(exports, module) {
|
|
|
32112
32112
|
if (algorithmAndValue[1]) {
|
|
32113
32113
|
base64Value = algorithmAndValue[1];
|
|
32114
32114
|
}
|
|
32115
|
-
const
|
|
32115
|
+
const metadata = {
|
|
32116
32116
|
alg: algorithm,
|
|
32117
32117
|
val: base64Value
|
|
32118
32118
|
};
|
|
32119
|
-
result.push(
|
|
32119
|
+
result.push(metadata);
|
|
32120
32120
|
}
|
|
32121
32121
|
return result;
|
|
32122
32122
|
}
|
|
@@ -33506,8 +33506,8 @@ var require_cache3 = __commonJS2(function(exports, module) {
|
|
|
33506
33506
|
}
|
|
33507
33507
|
queueMicrotask(() => {
|
|
33508
33508
|
const requestList = [];
|
|
33509
|
-
for (const
|
|
33510
|
-
const requestObject = fromInnerRequest(
|
|
33509
|
+
for (const request of requests) {
|
|
33510
|
+
const requestObject = fromInnerRequest(request, undefined, new AbortController().signal, "immutable");
|
|
33511
33511
|
requestList.push(requestObject);
|
|
33512
33512
|
}
|
|
33513
33513
|
promise.resolve(Object.freeze(requestList));
|
|
@@ -33754,8 +33754,8 @@ var require_cachestorage = __commonJS2(function(exports, module) {
|
|
|
33754
33754
|
webidl.argumentLengthCheck(arguments, 1, prefix);
|
|
33755
33755
|
cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName");
|
|
33756
33756
|
if (this.#caches.has(cacheName)) {
|
|
33757
|
-
const
|
|
33758
|
-
return new Cache(kConstruct,
|
|
33757
|
+
const cache = this.#caches.get(cacheName);
|
|
33758
|
+
return new Cache(kConstruct, cache);
|
|
33759
33759
|
}
|
|
33760
33760
|
const cache = [];
|
|
33761
33761
|
this.#caches.set(cacheName, cache);
|
|
@@ -34653,11 +34653,11 @@ var require_frame = __commonJS2(function(exports, module) {
|
|
|
34653
34653
|
var BUFFER_SIZE = 8 * 1024;
|
|
34654
34654
|
var buffer = null;
|
|
34655
34655
|
var bufIdx = BUFFER_SIZE;
|
|
34656
|
-
var randomFillSync = runtimeFeatures.has("crypto") ? __require2("node:crypto").randomFillSync : function
|
|
34657
|
-
for (let i = 0;i <
|
|
34658
|
-
|
|
34656
|
+
var randomFillSync = runtimeFeatures.has("crypto") ? __require2("node:crypto").randomFillSync : function randomFillSync(buffer, _offset, _size) {
|
|
34657
|
+
for (let i = 0;i < buffer.length; ++i) {
|
|
34658
|
+
buffer[i] = Math.random() * 255 | 0;
|
|
34659
34659
|
}
|
|
34660
|
-
return
|
|
34660
|
+
return buffer;
|
|
34661
34661
|
};
|
|
34662
34662
|
function generateMask() {
|
|
34663
34663
|
if (bufIdx === BUFFER_SIZE) {
|
|
@@ -34684,33 +34684,33 @@ var require_frame = __commonJS2(function(exports, module) {
|
|
|
34684
34684
|
offset += 2;
|
|
34685
34685
|
payloadLength = 126;
|
|
34686
34686
|
}
|
|
34687
|
-
const
|
|
34688
|
-
|
|
34689
|
-
|
|
34690
|
-
|
|
34687
|
+
const buffer = Buffer.allocUnsafe(bodyLength + offset);
|
|
34688
|
+
buffer[0] = buffer[1] = 0;
|
|
34689
|
+
buffer[0] |= 128;
|
|
34690
|
+
buffer[0] = (buffer[0] & 240) + opcode;
|
|
34691
34691
|
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */
|
|
34692
|
-
|
|
34693
|
-
|
|
34694
|
-
|
|
34695
|
-
|
|
34696
|
-
|
|
34692
|
+
buffer[offset - 4] = maskKey[0];
|
|
34693
|
+
buffer[offset - 3] = maskKey[1];
|
|
34694
|
+
buffer[offset - 2] = maskKey[2];
|
|
34695
|
+
buffer[offset - 1] = maskKey[3];
|
|
34696
|
+
buffer[1] = payloadLength;
|
|
34697
34697
|
if (payloadLength === 126) {
|
|
34698
|
-
|
|
34698
|
+
buffer.writeUInt16BE(bodyLength, 2);
|
|
34699
34699
|
} else if (payloadLength === 127) {
|
|
34700
|
-
|
|
34701
|
-
|
|
34700
|
+
buffer[2] = buffer[3] = 0;
|
|
34701
|
+
buffer.writeUIntBE(bodyLength, 4, 6);
|
|
34702
34702
|
}
|
|
34703
|
-
|
|
34703
|
+
buffer[1] |= 128;
|
|
34704
34704
|
for (let i = 0;i < bodyLength; ++i) {
|
|
34705
|
-
|
|
34705
|
+
buffer[offset + i] = frameData[i] ^ maskKey[i & 3];
|
|
34706
34706
|
}
|
|
34707
|
-
return
|
|
34707
|
+
return buffer;
|
|
34708
34708
|
}
|
|
34709
|
-
static createFastTextFrame(
|
|
34709
|
+
static createFastTextFrame(buffer) {
|
|
34710
34710
|
const maskKey = generateMask();
|
|
34711
|
-
const bodyLength =
|
|
34711
|
+
const bodyLength = buffer.length;
|
|
34712
34712
|
for (let i = 0;i < bodyLength; ++i) {
|
|
34713
|
-
|
|
34713
|
+
buffer[i] ^= maskKey[i & 3];
|
|
34714
34714
|
}
|
|
34715
34715
|
let payloadLength = bodyLength;
|
|
34716
34716
|
let offset = 6;
|
|
@@ -34734,7 +34734,7 @@ var require_frame = __commonJS2(function(exports, module) {
|
|
|
34734
34734
|
head[2] = head[3] = 0;
|
|
34735
34735
|
head.writeUIntBE(bodyLength, 4, 6);
|
|
34736
34736
|
}
|
|
34737
|
-
return [head,
|
|
34737
|
+
return [head, buffer];
|
|
34738
34738
|
}
|
|
34739
34739
|
}
|
|
34740
34740
|
module.exports = {
|
|
@@ -35200,12 +35200,12 @@ var require_receiver = __commonJS2(function(exports, module) {
|
|
|
35200
35200
|
return false;
|
|
35201
35201
|
}
|
|
35202
35202
|
if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
|
|
35203
|
-
let
|
|
35203
|
+
let body = emptyBuffer;
|
|
35204
35204
|
if (this.#info.closeInfo.code) {
|
|
35205
|
-
|
|
35206
|
-
|
|
35205
|
+
body = Buffer.allocUnsafe(2);
|
|
35206
|
+
body.writeUInt16BE(this.#info.closeInfo.code, 0);
|
|
35207
35207
|
}
|
|
35208
|
-
const closeFrame = new WebsocketFrameSend(
|
|
35208
|
+
const closeFrame = new WebsocketFrameSend(body);
|
|
35209
35209
|
this.#handler.socket.write(closeFrame.createFrame(opcodes.CLOSE));
|
|
35210
35210
|
this.#handler.closeState.add(sentCloseFrameState.SENT);
|
|
35211
35211
|
}
|
|
@@ -35256,12 +35256,12 @@ var require_sender = __commonJS2(function(exports, module) {
|
|
|
35256
35256
|
this.#socket.write(createFrame(item, hint), cb);
|
|
35257
35257
|
}
|
|
35258
35258
|
} else {
|
|
35259
|
-
const
|
|
35259
|
+
const node = {
|
|
35260
35260
|
promise: null,
|
|
35261
35261
|
callback: cb,
|
|
35262
35262
|
frame: createFrame(item, hint)
|
|
35263
35263
|
};
|
|
35264
|
-
this.#queue.push(
|
|
35264
|
+
this.#queue.push(node);
|
|
35265
35265
|
}
|
|
35266
35266
|
return;
|
|
35267
35267
|
}
|
|
@@ -36617,10 +36617,6 @@ var $cacheStores = {
|
|
|
36617
36617
|
var SqliteCacheStore = require_sqlite_cache_store();
|
|
36618
36618
|
$cacheStores.SqliteCacheStore = SqliteCacheStore;
|
|
36619
36619
|
var $buildConnector = buildConnector;
|
|
36620
|
-
var $util = {
|
|
36621
|
-
parseHeaders: util.parseHeaders,
|
|
36622
|
-
headerNameToString: util.headerNameToString
|
|
36623
|
-
};
|
|
36624
36620
|
function makeDispatcher(fn) {
|
|
36625
36621
|
return (url, opts, handler) => {
|
|
36626
36622
|
if (typeof opts === "function") {
|
|
@@ -37838,11 +37834,11 @@ class DocTypeReader {
|
|
|
37838
37834
|
i += 2;
|
|
37839
37835
|
else if (xmlData[i] === "(") {
|
|
37840
37836
|
i++;
|
|
37841
|
-
const
|
|
37837
|
+
const startIndex = i;
|
|
37842
37838
|
while (i < xmlData.length && xmlData[i] !== ")") {
|
|
37843
37839
|
i++;
|
|
37844
37840
|
}
|
|
37845
|
-
contentModel = xmlData.substring(
|
|
37841
|
+
contentModel = xmlData.substring(startIndex, i);
|
|
37846
37842
|
if (xmlData[i] !== ")") {
|
|
37847
37843
|
throw new Error("Unterminated content model");
|
|
37848
37844
|
}
|
|
@@ -37884,11 +37880,11 @@ class DocTypeReader {
|
|
|
37884
37880
|
i++;
|
|
37885
37881
|
let allowedNotations = [];
|
|
37886
37882
|
while (i < xmlData.length && xmlData[i] !== ")") {
|
|
37887
|
-
const
|
|
37883
|
+
const startIndex = i;
|
|
37888
37884
|
while (i < xmlData.length && xmlData[i] !== "|" && xmlData[i] !== ")") {
|
|
37889
37885
|
i++;
|
|
37890
37886
|
}
|
|
37891
|
-
let notation = xmlData.substring(
|
|
37887
|
+
let notation = xmlData.substring(startIndex, i);
|
|
37892
37888
|
notation = notation.trim();
|
|
37893
37889
|
if (!validateEntityName2(notation, { xmlVersion: this.xmlVersion })) {
|
|
37894
37890
|
throw new Error(`Invalid notation name: "${notation}"`);
|
|
@@ -37905,11 +37901,11 @@ class DocTypeReader {
|
|
|
37905
37901
|
i++;
|
|
37906
37902
|
attributeType += " (" + allowedNotations.join("|") + ")";
|
|
37907
37903
|
} else {
|
|
37908
|
-
const
|
|
37904
|
+
const startIndex = i;
|
|
37909
37905
|
while (i < xmlData.length && !/\s/.test(xmlData[i])) {
|
|
37910
37906
|
i++;
|
|
37911
37907
|
}
|
|
37912
|
-
attributeType += xmlData.substring(
|
|
37908
|
+
attributeType += xmlData.substring(startIndex, i);
|
|
37913
37909
|
const validTypes = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
|
37914
37910
|
if (!this.suppressValidationErr && !validTypes.includes(attributeType.toUpperCase())) {
|
|
37915
37911
|
throw new Error(`Invalid attribute type: "${attributeType}"`);
|
|
@@ -38094,9 +38090,9 @@ function anynum(str) {
|
|
|
38094
38090
|
const low = str.charCodeAt(i + 1);
|
|
38095
38091
|
if (low >= 56320 && low <= 57343) {
|
|
38096
38092
|
const cp = 65536 + (cc - 55296 << 10) + (low - 56320);
|
|
38097
|
-
const
|
|
38098
|
-
if (
|
|
38099
|
-
chars.push(String.fromCharCode(
|
|
38093
|
+
const d = HIGH_MAP.get(cp);
|
|
38094
|
+
if (d !== undefined) {
|
|
38095
|
+
chars.push(String.fromCharCode(d + 48));
|
|
38100
38096
|
i++;
|
|
38101
38097
|
continue;
|
|
38102
38098
|
}
|
|
@@ -38423,12 +38419,12 @@ class ExpressionSet {
|
|
|
38423
38419
|
return this;
|
|
38424
38420
|
this._patterns.add(expression.pattern);
|
|
38425
38421
|
if (expression.hasDeepWildcard()) {
|
|
38426
|
-
const
|
|
38427
|
-
if (
|
|
38428
|
-
const
|
|
38429
|
-
if (!this._deepByTerminalTag.has(
|
|
38430
|
-
this._deepByTerminalTag.set(
|
|
38431
|
-
this._deepByTerminalTag.get(
|
|
38422
|
+
const lastSeg = expression.segments[expression.segments.length - 1];
|
|
38423
|
+
if (lastSeg && lastSeg.type !== "deep-wildcard" && lastSeg.tag !== "*") {
|
|
38424
|
+
const tag = lastSeg.tag;
|
|
38425
|
+
if (!this._deepByTerminalTag.has(tag))
|
|
38426
|
+
this._deepByTerminalTag.set(tag, []);
|
|
38427
|
+
this._deepByTerminalTag.get(tag).push(expression);
|
|
38432
38428
|
} else {
|
|
38433
38429
|
this._deepWildcards.push(expression);
|
|
38434
38430
|
}
|
|
@@ -39836,11 +39832,11 @@ var parseXml = function(xmlData) {
|
|
|
39836
39832
|
} else if (options.unpairedTagsSet.has(tagName)) {
|
|
39837
39833
|
i = result.closeIndex;
|
|
39838
39834
|
} else {
|
|
39839
|
-
const
|
|
39840
|
-
if (!
|
|
39835
|
+
const result = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);
|
|
39836
|
+
if (!result)
|
|
39841
39837
|
throw new Error(`Unexpected end of ${rawTagName}`);
|
|
39842
|
-
i =
|
|
39843
|
-
tagContent =
|
|
39838
|
+
i = result.i;
|
|
39839
|
+
tagContent = result.tagContent;
|
|
39844
39840
|
}
|
|
39845
39841
|
const childNode = new XmlNode(tagName);
|
|
39846
39842
|
if (prefixedAttrs) {
|
|
@@ -40802,7 +40798,7 @@ var ActivityStreamSchema = {
|
|
|
40802
40798
|
var package_default = {
|
|
40803
40799
|
name: "@sockethub/schemas",
|
|
40804
40800
|
description: "JSON schema files for validating Sockethub Activity Streams",
|
|
40805
|
-
version: "3.0.0-alpha.
|
|
40801
|
+
version: "3.0.0-alpha.25",
|
|
40806
40802
|
type: "module",
|
|
40807
40803
|
private: false,
|
|
40808
40804
|
author: "Nick Jennings <nick@silverbucket.net>",
|
|
@@ -40833,11 +40829,20 @@ var package_default = {
|
|
|
40833
40829
|
import: "./dist/examples-config.js",
|
|
40834
40830
|
default: "./dist/examples-config.js"
|
|
40835
40831
|
},
|
|
40832
|
+
"./service-descriptor": {
|
|
40833
|
+
types: "./dist/service-descriptor.d.ts",
|
|
40834
|
+
bun: "./src/service-descriptor.ts",
|
|
40835
|
+
import: "./dist/service-descriptor.js",
|
|
40836
|
+
default: "./dist/service-descriptor.js"
|
|
40837
|
+
},
|
|
40836
40838
|
"./schemas/json/sockethub-config.json": {
|
|
40837
40839
|
default: "./dist/schemas/json/sockethub-config.json"
|
|
40838
40840
|
},
|
|
40839
40841
|
"./schemas/json/examples-config.json": {
|
|
40840
40842
|
default: "./dist/schemas/json/examples-config.json"
|
|
40843
|
+
},
|
|
40844
|
+
"./schemas/json/service-descriptor.json": {
|
|
40845
|
+
default: "./dist/schemas/json/service-descriptor.json"
|
|
40841
40846
|
}
|
|
40842
40847
|
},
|
|
40843
40848
|
files: [
|
|
@@ -40863,7 +40868,7 @@ var package_default = {
|
|
|
40863
40868
|
"@types/bun": "latest"
|
|
40864
40869
|
},
|
|
40865
40870
|
scripts: {
|
|
40866
|
-
build: "bun ./scripts/export-json-schema.ts && bun ./scripts/export-canonical-assets.ts && bun build src/index.ts src/object-types.ts --outdir dist --target node --format esm --sourcemap=external && bun build src/context.ts src/activity-stream-helper.ts src/examples-config.ts --outdir dist --target browser --format esm --sourcemap=external",
|
|
40871
|
+
build: "bun ./scripts/export-json-schema.ts && bun ./scripts/export-canonical-assets.ts && bun build src/index.ts src/object-types.ts --outdir dist --target node --format esm --sourcemap=external && bun build src/context.ts src/activity-stream-helper.ts src/examples-config.ts src/service-descriptor.ts --outdir dist --target browser --format esm --sourcemap=external",
|
|
40867
40872
|
clean: "rm -rf dist",
|
|
40868
40873
|
"clean:deps": "rm -rf node_modules"
|
|
40869
40874
|
},
|
|
@@ -40872,7 +40877,7 @@ var package_default = {
|
|
|
40872
40877
|
"ajv-formats": "^2.1.1",
|
|
40873
40878
|
"ajv-formats-draft2019": "^1.6.1"
|
|
40874
40879
|
},
|
|
40875
|
-
gitHead: "
|
|
40880
|
+
gitHead: "45acaca6570f8e8429d996ec1d3b95979e8c54a9",
|
|
40876
40881
|
types: "./dist/index.d.ts"
|
|
40877
40882
|
};
|
|
40878
40883
|
|
|
@@ -41265,29 +41270,33 @@ var SockethubConfigSchema = {
|
|
|
41265
41270
|
};
|
|
41266
41271
|
var SockethubConfigSchemaId = versionedSchemaId(SockethubConfigSchema.$id, package_default.version);
|
|
41267
41272
|
|
|
41268
|
-
// ../schemas/src/
|
|
41273
|
+
// ../schemas/src/service-descriptor.ts
|
|
41269
41274
|
var import_ajv2 = __toESM(require_ajv(), 1);
|
|
41275
|
+
var ajv2 = new import_ajv2.default({ strictTypes: false, allErrors: true });
|
|
41276
|
+
|
|
41277
|
+
// ../schemas/src/validator.ts
|
|
41278
|
+
var import_ajv3 = __toESM(require_ajv(), 1);
|
|
41270
41279
|
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
41271
41280
|
var import_ajv_formats_draft2019 = __toESM(require_ajv_formats_draft2019(), 1);
|
|
41272
|
-
var
|
|
41273
|
-
import_ajv_formats.default(
|
|
41274
|
-
import_ajv_formats_draft2019.default(
|
|
41281
|
+
var ajv3 = new import_ajv3.default({ strictTypes: false, allErrors: true });
|
|
41282
|
+
import_ajv_formats.default(ajv3);
|
|
41283
|
+
import_ajv_formats_draft2019.default(ajv3);
|
|
41275
41284
|
var schemaURL = "https://sockethub.org/schemas/v0";
|
|
41276
41285
|
var schemas = {};
|
|
41277
41286
|
var systemContextsRegistered = false;
|
|
41278
41287
|
schemas[`${schemaURL}/activity-stream`] = ActivityStreamSchema;
|
|
41279
41288
|
for (const uri in schemas) {
|
|
41280
|
-
|
|
41289
|
+
ajv3.addSchema(schemas[uri], uri);
|
|
41281
41290
|
}
|
|
41282
41291
|
function registerSystemContext(platformId, contextUrl) {
|
|
41283
41292
|
registerPlatformContext(platformId, contextUrl, `${schemaURL}/context/${platformId}/messages`, `${schemaURL}/context/${platformId}/credentials`);
|
|
41284
41293
|
const messageSchemaRef = `${schemaURL}/context/${platformId}/messages`;
|
|
41285
|
-
if (!
|
|
41286
|
-
|
|
41294
|
+
if (!ajv3.getSchema(messageSchemaRef)) {
|
|
41295
|
+
ajv3.addSchema({}, messageSchemaRef);
|
|
41287
41296
|
}
|
|
41288
41297
|
const credentialsSchemaRef = `${schemaURL}/context/${platformId}/credentials`;
|
|
41289
|
-
if (!
|
|
41290
|
-
|
|
41298
|
+
if (!ajv3.getSchema(credentialsSchemaRef)) {
|
|
41299
|
+
ajv3.addSchema({}, credentialsSchemaRef);
|
|
41291
41300
|
}
|
|
41292
41301
|
}
|
|
41293
41302
|
function registerSystemPlatformContexts() {
|
|
@@ -41390,11 +41399,11 @@ function contentLine(line) {
|
|
|
41390
41399
|
return { name, parameters, value };
|
|
41391
41400
|
}
|
|
41392
41401
|
function typedValue(value, parameters) {
|
|
41393
|
-
const
|
|
41402
|
+
const types = parameters.get("TYPE")?.filter((type) => type !== "pref");
|
|
41394
41403
|
const preference = parameters.get("PREF")?.[0];
|
|
41395
41404
|
return {
|
|
41396
41405
|
value: unescapeText(value.replace(/^mailto:/i, "")),
|
|
41397
|
-
...
|
|
41406
|
+
...types?.length ? { types } : {},
|
|
41398
41407
|
...preference === "1" || parameters.get("TYPE")?.includes("pref") ? { preferred: true } : {}
|
|
41399
41408
|
};
|
|
41400
41409
|
}
|
|
@@ -41838,7 +41847,7 @@ class CardDavClient extends DavClient {
|
|
|
41838
41847
|
var package_default2 = {
|
|
41839
41848
|
name: "@sockethub/platform-carddav",
|
|
41840
41849
|
description: "A Sockethub platform for CardDAV address books and contacts",
|
|
41841
|
-
version: "1.0.0-alpha.
|
|
41850
|
+
version: "1.0.0-alpha.6",
|
|
41842
41851
|
type: "module",
|
|
41843
41852
|
private: false,
|
|
41844
41853
|
license: "LGPL-3.0+",
|
|
@@ -41867,21 +41876,21 @@ var package_default2 = {
|
|
|
41867
41876
|
test: "bun test src/"
|
|
41868
41877
|
},
|
|
41869
41878
|
dependencies: {
|
|
41870
|
-
"@sockethub/dav": "^1.0.0-alpha.
|
|
41871
|
-
"@sockethub/schemas": "^3.0.0-alpha.
|
|
41879
|
+
"@sockethub/dav": "^1.0.0-alpha.6",
|
|
41880
|
+
"@sockethub/schemas": "^3.0.0-alpha.25"
|
|
41872
41881
|
},
|
|
41873
41882
|
devDependencies: {
|
|
41874
41883
|
"@types/bun": "latest"
|
|
41875
41884
|
},
|
|
41876
41885
|
peerDependencies: {
|
|
41877
|
-
"@sockethub/server": "^5.0.0-alpha.
|
|
41886
|
+
"@sockethub/server": "^5.0.0-alpha.25"
|
|
41878
41887
|
},
|
|
41879
41888
|
peerDependenciesMeta: {
|
|
41880
41889
|
"@sockethub/server": {
|
|
41881
41890
|
optional: true
|
|
41882
41891
|
}
|
|
41883
41892
|
},
|
|
41884
|
-
gitHead: "
|
|
41893
|
+
gitHead: "45acaca6570f8e8429d996ec1d3b95979e8c54a9"
|
|
41885
41894
|
};
|
|
41886
41895
|
|
|
41887
41896
|
// src/schema.ts
|
|
@@ -42290,4 +42299,4 @@ export {
|
|
|
42290
42299
|
parseVCard
|
|
42291
42300
|
};
|
|
42292
42301
|
|
|
42293
|
-
//# debugId=
|
|
42302
|
+
//# debugId=0DEC043AF4A6A48F64756E2164756E21
|