@sockethub/schemas 3.0.0-alpha.9 → 3.0.0-beta.1
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/activity-stream-helper.d.ts +5 -0
- package/dist/activity-stream-helper.js +36 -0
- package/dist/activity-stream-helper.js.map +10 -0
- package/dist/context.d.ts +56 -0
- package/dist/context.js +80 -0
- package/dist/context.js.map +10 -0
- package/dist/contexts/platform/caldav/v1.jsonld +8 -0
- package/dist/contexts/platform/carddav/v1.jsonld +8 -0
- package/dist/contexts/platform/dummy/v1.jsonld +8 -0
- package/dist/contexts/platform/error/v1.jsonld +8 -0
- package/dist/contexts/platform/feeds/v1.jsonld +8 -0
- package/dist/contexts/platform/irc/v1.jsonld +8 -0
- package/dist/contexts/platform/metadata/v1.jsonld +8 -0
- package/dist/contexts/platform/sockethub%3Ainternal/v1.jsonld +8 -0
- package/dist/contexts/platform/xmpp/v1.jsonld +8 -0
- package/dist/contexts/v1.jsonld +7 -0
- package/dist/helpers/codegen.d.ts +23 -0
- package/dist/helpers/error-parser.d.ts +13 -0
- package/dist/helpers/objects.d.ts +157 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1375 -1147
- package/dist/index.js.map +16 -17
- package/dist/maps/context-map.json +41 -0
- package/dist/object-types.d.ts +2 -0
- package/dist/object-types.js +299 -0
- package/dist/object-types.js.map +12 -0
- package/dist/schema-id.d.ts +11 -0
- package/dist/schemas/activity-stream.d.ts +196 -0
- package/{src/schemas/json/activity-object.json → dist/schemas/json/activity-stream.json} +99 -158
- package/dist/schemas/json/platform.json +52 -0
- package/dist/schemas/json/service-descriptor.json +58 -0
- package/dist/schemas/json/sockethub-config.json +515 -0
- package/dist/schemas/platform/caldav/v1/credentials.schema.json +71 -0
- package/dist/schemas/platform/caldav/v1/messages.schema.json +769 -0
- package/dist/schemas/platform/carddav/v1/credentials.schema.json +67 -0
- package/dist/schemas/platform/carddav/v1/messages.schema.json +375 -0
- package/dist/schemas/platform/dummy/v1/credentials.schema.json +1 -0
- package/dist/schemas/platform/dummy/v1/messages.schema.json +22 -0
- package/dist/schemas/platform/error/v1/credentials.schema.json +1 -0
- package/dist/schemas/platform/error/v1/messages.schema.json +1 -0
- package/dist/schemas/platform/feeds/v1/credentials.schema.json +1 -0
- package/dist/schemas/platform/feeds/v1/messages.schema.json +27 -0
- package/dist/schemas/platform/irc/v1/credentials.schema.json +118 -0
- package/dist/schemas/platform/irc/v1/messages.schema.json +149 -0
- package/dist/schemas/platform/metadata/v1/credentials.schema.json +1 -0
- package/dist/schemas/platform/metadata/v1/messages.schema.json +14 -0
- package/dist/schemas/platform/sockethub%3Ainternal/v1/credentials.schema.json +1 -0
- package/dist/schemas/platform/sockethub%3Ainternal/v1/messages.schema.json +1 -0
- package/dist/schemas/platform/xmpp/v1/credentials.schema.json +45 -0
- package/dist/schemas/platform/xmpp/v1/messages.schema.json +129 -0
- package/dist/schemas/platform.d.ts +62 -0
- package/dist/schemas/service-descriptor.d.ts +84 -0
- package/dist/schemas/sockethub-config.d.ts +481 -0
- package/dist/service-descriptor.d.ts +9 -0
- package/dist/service-descriptor.js +6355 -0
- package/dist/service-descriptor.js.map +78 -0
- package/{src/types.ts → dist/types.d.ts} +52 -53
- package/dist/validator.d.ts +50 -0
- package/package.json +32 -11
- package/src/helpers/error-parser.ts +0 -113
- package/src/helpers/objects.ts +0 -227
- package/src/index.test.data.credentials.ts +0 -71
- package/src/index.test.data.objects.ts +0 -241
- package/src/index.test.data.platform.ts +0 -45
- package/src/index.test.data.streams.ts +0 -498
- package/src/index.test.ts +0 -99
- package/src/index.ts +0 -27
- package/src/schemas/activity-object.ts +0 -19
- package/src/schemas/activity-stream.ts +0 -54
- package/src/schemas/json/activity-stream.json +0 -469
- package/src/schemas/json/platform.json +0 -28
- package/src/schemas/json/sockethub-config.json +0 -144
- package/src/schemas/platform.ts +0 -47
- package/src/schemas/sockethub-config.ts +0 -140
- package/src/validator.ts +0 -94
package/dist/index.js
CHANGED
|
@@ -4,22 +4,38 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
7
12
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
8
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
|
+
for (let key of __getOwnPropNames(mod))
|
|
24
|
+
if (!__hasOwnProp.call(to, key))
|
|
25
|
+
__defProp(to, key, {
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
27
|
+
enumerable: true
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
if (canCache)
|
|
31
|
+
cache.set(mod, to);
|
|
16
32
|
return to;
|
|
17
33
|
};
|
|
18
34
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
19
35
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
20
36
|
|
|
21
37
|
// ../../node_modules/ajv/dist/compile/codegen/code.js
|
|
22
|
-
var require_code = __commonJS((exports)
|
|
38
|
+
var require_code = __commonJS(function(exports) {
|
|
23
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
40
|
exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = undefined;
|
|
25
41
|
|
|
@@ -173,7 +189,7 @@ var require_code = __commonJS((exports) => {
|
|
|
173
189
|
});
|
|
174
190
|
|
|
175
191
|
// ../../node_modules/ajv/dist/compile/codegen/scope.js
|
|
176
|
-
var require_scope = __commonJS((exports)
|
|
192
|
+
var require_scope = __commonJS(function(exports) {
|
|
177
193
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
178
194
|
exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = undefined;
|
|
179
195
|
var code_1 = require_code();
|
|
@@ -185,9 +201,9 @@ var require_scope = __commonJS((exports) => {
|
|
|
185
201
|
}
|
|
186
202
|
}
|
|
187
203
|
var UsedValueState;
|
|
188
|
-
(function(
|
|
189
|
-
|
|
190
|
-
|
|
204
|
+
(function(UsedValueState) {
|
|
205
|
+
UsedValueState[UsedValueState["Started"] = 0] = "Started";
|
|
206
|
+
UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
|
|
191
207
|
})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
|
|
192
208
|
exports.varKinds = {
|
|
193
209
|
const: new code_1.Name("const"),
|
|
@@ -319,7 +335,7 @@ var require_scope = __commonJS((exports) => {
|
|
|
319
335
|
});
|
|
320
336
|
|
|
321
337
|
// ../../node_modules/ajv/dist/compile/codegen/index.js
|
|
322
|
-
var require_codegen = __commonJS((exports)
|
|
338
|
+
var require_codegen = __commonJS(function(exports) {
|
|
323
339
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
324
340
|
exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = undefined;
|
|
325
341
|
var code_1 = require_code();
|
|
@@ -1029,7 +1045,7 @@ var require_codegen = __commonJS((exports) => {
|
|
|
1029
1045
|
});
|
|
1030
1046
|
|
|
1031
1047
|
// ../../node_modules/ajv/dist/compile/util.js
|
|
1032
|
-
var require_util = __commonJS((exports)
|
|
1048
|
+
var require_util = __commonJS(function(exports) {
|
|
1033
1049
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1034
1050
|
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;
|
|
1035
1051
|
var codegen_1 = require_codegen();
|
|
@@ -1169,9 +1185,9 @@ var require_util = __commonJS((exports) => {
|
|
|
1169
1185
|
}
|
|
1170
1186
|
exports.useFunc = useFunc;
|
|
1171
1187
|
var Type;
|
|
1172
|
-
(function(
|
|
1173
|
-
|
|
1174
|
-
|
|
1188
|
+
(function(Type) {
|
|
1189
|
+
Type[Type["Num"] = 0] = "Num";
|
|
1190
|
+
Type[Type["Str"] = 1] = "Str";
|
|
1175
1191
|
})(Type || (exports.Type = Type = {}));
|
|
1176
1192
|
function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
|
|
1177
1193
|
if (dataProp instanceof codegen_1.Name) {
|
|
@@ -1193,7 +1209,7 @@ var require_util = __commonJS((exports) => {
|
|
|
1193
1209
|
});
|
|
1194
1210
|
|
|
1195
1211
|
// ../../node_modules/ajv/dist/compile/names.js
|
|
1196
|
-
var require_names = __commonJS((exports)
|
|
1212
|
+
var require_names = __commonJS(function(exports) {
|
|
1197
1213
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1198
1214
|
var codegen_1 = require_codegen();
|
|
1199
1215
|
var names = {
|
|
@@ -1218,7 +1234,7 @@ var require_names = __commonJS((exports) => {
|
|
|
1218
1234
|
});
|
|
1219
1235
|
|
|
1220
1236
|
// ../../node_modules/ajv/dist/compile/errors.js
|
|
1221
|
-
var require_errors = __commonJS((exports)
|
|
1237
|
+
var require_errors = __commonJS(function(exports) {
|
|
1222
1238
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1223
1239
|
exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = undefined;
|
|
1224
1240
|
var codegen_1 = require_codegen();
|
|
@@ -1336,7 +1352,7 @@ var require_errors = __commonJS((exports) => {
|
|
|
1336
1352
|
});
|
|
1337
1353
|
|
|
1338
1354
|
// ../../node_modules/ajv/dist/compile/validate/boolSchema.js
|
|
1339
|
-
var require_boolSchema = __commonJS((exports)
|
|
1355
|
+
var require_boolSchema = __commonJS(function(exports) {
|
|
1340
1356
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1341
1357
|
exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = undefined;
|
|
1342
1358
|
var errors_1 = require_errors();
|
|
@@ -1384,7 +1400,7 @@ var require_boolSchema = __commonJS((exports) => {
|
|
|
1384
1400
|
});
|
|
1385
1401
|
|
|
1386
1402
|
// ../../node_modules/ajv/dist/compile/rules.js
|
|
1387
|
-
var require_rules = __commonJS((exports)
|
|
1403
|
+
var require_rules = __commonJS(function(exports) {
|
|
1388
1404
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1389
1405
|
exports.getRules = exports.isJSONType = undefined;
|
|
1390
1406
|
var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"];
|
|
@@ -1412,7 +1428,7 @@ var require_rules = __commonJS((exports) => {
|
|
|
1412
1428
|
});
|
|
1413
1429
|
|
|
1414
1430
|
// ../../node_modules/ajv/dist/compile/validate/applicability.js
|
|
1415
|
-
var require_applicability = __commonJS((exports)
|
|
1431
|
+
var require_applicability = __commonJS(function(exports) {
|
|
1416
1432
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1417
1433
|
exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = undefined;
|
|
1418
1434
|
function schemaHasRulesForType({ schema, self }, type) {
|
|
@@ -1432,7 +1448,7 @@ var require_applicability = __commonJS((exports) => {
|
|
|
1432
1448
|
});
|
|
1433
1449
|
|
|
1434
1450
|
// ../../node_modules/ajv/dist/compile/validate/dataType.js
|
|
1435
|
-
var require_dataType = __commonJS((exports)
|
|
1451
|
+
var require_dataType = __commonJS(function(exports) {
|
|
1436
1452
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1437
1453
|
exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = undefined;
|
|
1438
1454
|
var rules_1 = require_rules();
|
|
@@ -1441,9 +1457,9 @@ var require_dataType = __commonJS((exports) => {
|
|
|
1441
1457
|
var codegen_1 = require_codegen();
|
|
1442
1458
|
var util_1 = require_util();
|
|
1443
1459
|
var DataType;
|
|
1444
|
-
(function(
|
|
1445
|
-
|
|
1446
|
-
|
|
1460
|
+
(function(DataType) {
|
|
1461
|
+
DataType[DataType["Correct"] = 0] = "Correct";
|
|
1462
|
+
DataType[DataType["Wrong"] = 1] = "Wrong";
|
|
1447
1463
|
})(DataType || (exports.DataType = DataType = {}));
|
|
1448
1464
|
function getSchemaTypes(schema) {
|
|
1449
1465
|
const types = getJSONTypes(schema.type);
|
|
@@ -1613,7 +1629,7 @@ var require_dataType = __commonJS((exports) => {
|
|
|
1613
1629
|
});
|
|
1614
1630
|
|
|
1615
1631
|
// ../../node_modules/ajv/dist/compile/validate/defaults.js
|
|
1616
|
-
var require_defaults = __commonJS((exports)
|
|
1632
|
+
var require_defaults = __commonJS(function(exports) {
|
|
1617
1633
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1618
1634
|
exports.assignDefaults = undefined;
|
|
1619
1635
|
var codegen_1 = require_codegen();
|
|
@@ -1647,7 +1663,7 @@ var require_defaults = __commonJS((exports) => {
|
|
|
1647
1663
|
});
|
|
1648
1664
|
|
|
1649
1665
|
// ../../node_modules/ajv/dist/vocabularies/code.js
|
|
1650
|
-
var require_code2 = __commonJS((exports)
|
|
1666
|
+
var require_code2 = __commonJS(function(exports) {
|
|
1651
1667
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1652
1668
|
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;
|
|
1653
1669
|
var codegen_1 = require_codegen();
|
|
@@ -1776,7 +1792,7 @@ var require_code2 = __commonJS((exports) => {
|
|
|
1776
1792
|
});
|
|
1777
1793
|
|
|
1778
1794
|
// ../../node_modules/ajv/dist/compile/validate/keyword.js
|
|
1779
|
-
var require_keyword = __commonJS((exports)
|
|
1795
|
+
var require_keyword = __commonJS(function(exports) {
|
|
1780
1796
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1781
1797
|
exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = undefined;
|
|
1782
1798
|
var codegen_1 = require_codegen();
|
|
@@ -1839,8 +1855,8 @@ var require_keyword = __commonJS((exports) => {
|
|
|
1839
1855
|
gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
1840
1856
|
}
|
|
1841
1857
|
function reportErrs(errors) {
|
|
1842
|
-
var
|
|
1843
|
-
gen.if((0, codegen_1.not)((
|
|
1858
|
+
var _a;
|
|
1859
|
+
gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== undefined ? _a : valid), errors);
|
|
1844
1860
|
}
|
|
1845
1861
|
}
|
|
1846
1862
|
exports.funcKeywordCode = funcKeywordCode;
|
|
@@ -1891,7 +1907,7 @@ var require_keyword = __commonJS((exports) => {
|
|
|
1891
1907
|
});
|
|
1892
1908
|
|
|
1893
1909
|
// ../../node_modules/ajv/dist/compile/validate/subschema.js
|
|
1894
|
-
var require_subschema = __commonJS((exports)
|
|
1910
|
+
var require_subschema = __commonJS(function(exports) {
|
|
1895
1911
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1896
1912
|
exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = undefined;
|
|
1897
1913
|
var codegen_1 = require_codegen();
|
|
@@ -1971,7 +1987,7 @@ var require_subschema = __commonJS((exports) => {
|
|
|
1971
1987
|
});
|
|
1972
1988
|
|
|
1973
1989
|
// ../../node_modules/fast-deep-equal/index.js
|
|
1974
|
-
var require_fast_deep_equal = __commonJS((exports, module)
|
|
1990
|
+
var require_fast_deep_equal = __commonJS(function(exports, module) {
|
|
1975
1991
|
module.exports = function equal(a, b) {
|
|
1976
1992
|
if (a === b)
|
|
1977
1993
|
return true;
|
|
@@ -2013,7 +2029,7 @@ var require_fast_deep_equal = __commonJS((exports, module) => {
|
|
|
2013
2029
|
});
|
|
2014
2030
|
|
|
2015
2031
|
// ../../node_modules/json-schema-traverse/index.js
|
|
2016
|
-
var require_json_schema_traverse = __commonJS((exports, module)
|
|
2032
|
+
var require_json_schema_traverse = __commonJS(function(exports, module) {
|
|
2017
2033
|
var traverse = module.exports = function(schema, opts, cb) {
|
|
2018
2034
|
if (typeof opts == "function") {
|
|
2019
2035
|
cb = opts;
|
|
@@ -2096,7 +2112,7 @@ var require_json_schema_traverse = __commonJS((exports, module) => {
|
|
|
2096
2112
|
});
|
|
2097
2113
|
|
|
2098
2114
|
// ../../node_modules/ajv/dist/compile/resolve.js
|
|
2099
|
-
var require_resolve = __commonJS((exports)
|
|
2115
|
+
var require_resolve = __commonJS(function(exports) {
|
|
2100
2116
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2101
2117
|
exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = undefined;
|
|
2102
2118
|
var util_1 = require_util();
|
|
@@ -2249,7 +2265,7 @@ var require_resolve = __commonJS((exports) => {
|
|
|
2249
2265
|
});
|
|
2250
2266
|
|
|
2251
2267
|
// ../../node_modules/ajv/dist/compile/validate/index.js
|
|
2252
|
-
var require_validate = __commonJS((exports)
|
|
2268
|
+
var require_validate = __commonJS(function(exports) {
|
|
2253
2269
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2254
2270
|
exports.getData = exports.KeywordCxt = exports.validateFunctionCode = undefined;
|
|
2255
2271
|
var boolSchema_1 = require_boolSchema();
|
|
@@ -2754,7 +2770,7 @@ var require_validate = __commonJS((exports) => {
|
|
|
2754
2770
|
});
|
|
2755
2771
|
|
|
2756
2772
|
// ../../node_modules/ajv/dist/runtime/validation_error.js
|
|
2757
|
-
var require_validation_error = __commonJS((exports)
|
|
2773
|
+
var require_validation_error = __commonJS(function(exports) {
|
|
2758
2774
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2759
2775
|
|
|
2760
2776
|
class ValidationError extends Error {
|
|
@@ -2768,7 +2784,7 @@ var require_validation_error = __commonJS((exports) => {
|
|
|
2768
2784
|
});
|
|
2769
2785
|
|
|
2770
2786
|
// ../../node_modules/ajv/dist/compile/ref_error.js
|
|
2771
|
-
var require_ref_error = __commonJS((exports)
|
|
2787
|
+
var require_ref_error = __commonJS(function(exports) {
|
|
2772
2788
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2773
2789
|
var resolve_1 = require_resolve();
|
|
2774
2790
|
|
|
@@ -2783,7 +2799,7 @@ var require_ref_error = __commonJS((exports) => {
|
|
|
2783
2799
|
});
|
|
2784
2800
|
|
|
2785
2801
|
// ../../node_modules/ajv/dist/compile/index.js
|
|
2786
|
-
var require_compile = __commonJS((exports)
|
|
2802
|
+
var require_compile = __commonJS(function(exports) {
|
|
2787
2803
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2788
2804
|
exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = undefined;
|
|
2789
2805
|
var codegen_1 = require_codegen();
|
|
@@ -3004,7 +3020,7 @@ var require_compile = __commonJS((exports) => {
|
|
|
3004
3020
|
});
|
|
3005
3021
|
|
|
3006
3022
|
// ../../node_modules/ajv/dist/refs/data.json
|
|
3007
|
-
var require_data = __commonJS((exports, module)
|
|
3023
|
+
var require_data = __commonJS(function(exports, module) {
|
|
3008
3024
|
module.exports = {
|
|
3009
3025
|
$id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
|
|
3010
3026
|
description: "Meta-schema for $data reference (JSON AnySchema extension proposal)",
|
|
@@ -3021,7 +3037,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
3021
3037
|
});
|
|
3022
3038
|
|
|
3023
3039
|
// ../../node_modules/fast-uri/lib/utils.js
|
|
3024
|
-
var require_utils = __commonJS((exports, module)
|
|
3040
|
+
var require_utils = __commonJS(function(exports, module) {
|
|
3025
3041
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
3026
3042
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
3027
3043
|
function stringArrayToHexStripped(input) {
|
|
@@ -3276,7 +3292,7 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
3276
3292
|
});
|
|
3277
3293
|
|
|
3278
3294
|
// ../../node_modules/fast-uri/lib/schemes.js
|
|
3279
|
-
var require_schemes = __commonJS((exports, module)
|
|
3295
|
+
var require_schemes = __commonJS(function(exports, module) {
|
|
3280
3296
|
var { isUUID } = require_utils();
|
|
3281
3297
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
3282
3298
|
var supportedSchemeNames = [
|
|
@@ -3450,7 +3466,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
3450
3466
|
});
|
|
3451
3467
|
|
|
3452
3468
|
// ../../node_modules/fast-uri/index.js
|
|
3453
|
-
var require_fast_uri = __commonJS((exports, module)
|
|
3469
|
+
var require_fast_uri = __commonJS(function(exports, module) {
|
|
3454
3470
|
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
|
|
3455
3471
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
3456
3472
|
function normalize(uri, options) {
|
|
@@ -3701,7 +3717,7 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
3701
3717
|
});
|
|
3702
3718
|
|
|
3703
3719
|
// ../../node_modules/ajv/dist/runtime/uri.js
|
|
3704
|
-
var require_uri = __commonJS((exports)
|
|
3720
|
+
var require_uri = __commonJS(function(exports) {
|
|
3705
3721
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3706
3722
|
var uri = require_fast_uri();
|
|
3707
3723
|
uri.code = 'require("ajv/dist/runtime/uri").default';
|
|
@@ -3709,7 +3725,7 @@ var require_uri = __commonJS((exports) => {
|
|
|
3709
3725
|
});
|
|
3710
3726
|
|
|
3711
3727
|
// ../../node_modules/ajv/dist/core.js
|
|
3712
|
-
var require_core = __commonJS((exports)
|
|
3728
|
+
var require_core = __commonJS(function(exports) {
|
|
3713
3729
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3714
3730
|
exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = undefined;
|
|
3715
3731
|
var validate_1 = require_validate();
|
|
@@ -4302,7 +4318,7 @@ var require_core = __commonJS((exports) => {
|
|
|
4302
4318
|
});
|
|
4303
4319
|
|
|
4304
4320
|
// ../../node_modules/ajv/dist/vocabularies/core/id.js
|
|
4305
|
-
var require_id = __commonJS((exports)
|
|
4321
|
+
var require_id = __commonJS(function(exports) {
|
|
4306
4322
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4307
4323
|
var def = {
|
|
4308
4324
|
keyword: "id",
|
|
@@ -4314,7 +4330,7 @@ var require_id = __commonJS((exports) => {
|
|
|
4314
4330
|
});
|
|
4315
4331
|
|
|
4316
4332
|
// ../../node_modules/ajv/dist/vocabularies/core/ref.js
|
|
4317
|
-
var require_ref = __commonJS((exports)
|
|
4333
|
+
var require_ref = __commonJS(function(exports) {
|
|
4318
4334
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4319
4335
|
exports.callRef = exports.getValidate = undefined;
|
|
4320
4336
|
var ref_error_1 = require_ref_error();
|
|
@@ -4433,7 +4449,7 @@ var require_ref = __commonJS((exports) => {
|
|
|
4433
4449
|
});
|
|
4434
4450
|
|
|
4435
4451
|
// ../../node_modules/ajv/dist/vocabularies/core/index.js
|
|
4436
|
-
var require_core2 = __commonJS((exports)
|
|
4452
|
+
var require_core2 = __commonJS(function(exports) {
|
|
4437
4453
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4438
4454
|
var id_1 = require_id();
|
|
4439
4455
|
var ref_1 = require_ref();
|
|
@@ -4451,7 +4467,7 @@ var require_core2 = __commonJS((exports) => {
|
|
|
4451
4467
|
});
|
|
4452
4468
|
|
|
4453
4469
|
// ../../node_modules/ajv/dist/vocabularies/validation/limitNumber.js
|
|
4454
|
-
var require_limitNumber = __commonJS((exports)
|
|
4470
|
+
var require_limitNumber = __commonJS(function(exports) {
|
|
4455
4471
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4456
4472
|
var codegen_1 = require_codegen();
|
|
4457
4473
|
var ops = codegen_1.operators;
|
|
@@ -4480,7 +4496,7 @@ var require_limitNumber = __commonJS((exports) => {
|
|
|
4480
4496
|
});
|
|
4481
4497
|
|
|
4482
4498
|
// ../../node_modules/ajv/dist/vocabularies/validation/multipleOf.js
|
|
4483
|
-
var require_multipleOf = __commonJS((exports)
|
|
4499
|
+
var require_multipleOf = __commonJS(function(exports) {
|
|
4484
4500
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4485
4501
|
var codegen_1 = require_codegen();
|
|
4486
4502
|
var error = {
|
|
@@ -4505,7 +4521,7 @@ var require_multipleOf = __commonJS((exports) => {
|
|
|
4505
4521
|
});
|
|
4506
4522
|
|
|
4507
4523
|
// ../../node_modules/ajv/dist/runtime/ucs2length.js
|
|
4508
|
-
var require_ucs2length = __commonJS((exports)
|
|
4524
|
+
var require_ucs2length = __commonJS(function(exports) {
|
|
4509
4525
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4510
4526
|
function ucs2length(str) {
|
|
4511
4527
|
const len = str.length;
|
|
@@ -4528,7 +4544,7 @@ var require_ucs2length = __commonJS((exports) => {
|
|
|
4528
4544
|
});
|
|
4529
4545
|
|
|
4530
4546
|
// ../../node_modules/ajv/dist/vocabularies/validation/limitLength.js
|
|
4531
|
-
var require_limitLength = __commonJS((exports)
|
|
4547
|
+
var require_limitLength = __commonJS(function(exports) {
|
|
4532
4548
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4533
4549
|
var codegen_1 = require_codegen();
|
|
4534
4550
|
var util_1 = require_util();
|
|
@@ -4557,9 +4573,10 @@ var require_limitLength = __commonJS((exports) => {
|
|
|
4557
4573
|
});
|
|
4558
4574
|
|
|
4559
4575
|
// ../../node_modules/ajv/dist/vocabularies/validation/pattern.js
|
|
4560
|
-
var require_pattern = __commonJS((exports)
|
|
4576
|
+
var require_pattern = __commonJS(function(exports) {
|
|
4561
4577
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4562
4578
|
var code_1 = require_code2();
|
|
4579
|
+
var util_1 = require_util();
|
|
4563
4580
|
var codegen_1 = require_codegen();
|
|
4564
4581
|
var error = {
|
|
4565
4582
|
message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
|
|
@@ -4572,17 +4589,25 @@ var require_pattern = __commonJS((exports) => {
|
|
|
4572
4589
|
$data: true,
|
|
4573
4590
|
error,
|
|
4574
4591
|
code(cxt) {
|
|
4575
|
-
const { data, $data, schema, schemaCode, it } = cxt;
|
|
4592
|
+
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
4576
4593
|
const u = it.opts.unicodeRegExp ? "u" : "";
|
|
4577
|
-
|
|
4578
|
-
|
|
4594
|
+
if ($data) {
|
|
4595
|
+
const { regExp } = it.opts.code;
|
|
4596
|
+
const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
|
|
4597
|
+
const valid = gen.let("valid");
|
|
4598
|
+
gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
|
|
4599
|
+
cxt.fail$data((0, codegen_1._)`!${valid}`);
|
|
4600
|
+
} else {
|
|
4601
|
+
const regExp = (0, code_1.usePattern)(cxt, schema);
|
|
4602
|
+
cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
|
|
4603
|
+
}
|
|
4579
4604
|
}
|
|
4580
4605
|
};
|
|
4581
4606
|
exports.default = def;
|
|
4582
4607
|
});
|
|
4583
4608
|
|
|
4584
4609
|
// ../../node_modules/ajv/dist/vocabularies/validation/limitProperties.js
|
|
4585
|
-
var require_limitProperties = __commonJS((exports)
|
|
4610
|
+
var require_limitProperties = __commonJS(function(exports) {
|
|
4586
4611
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4587
4612
|
var codegen_1 = require_codegen();
|
|
4588
4613
|
var error = {
|
|
@@ -4608,7 +4633,7 @@ var require_limitProperties = __commonJS((exports) => {
|
|
|
4608
4633
|
});
|
|
4609
4634
|
|
|
4610
4635
|
// ../../node_modules/ajv/dist/vocabularies/validation/required.js
|
|
4611
|
-
var require_required = __commonJS((exports)
|
|
4636
|
+
var require_required = __commonJS(function(exports) {
|
|
4612
4637
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4613
4638
|
var code_1 = require_code2();
|
|
4614
4639
|
var codegen_1 = require_codegen();
|
|
@@ -4687,7 +4712,7 @@ var require_required = __commonJS((exports) => {
|
|
|
4687
4712
|
});
|
|
4688
4713
|
|
|
4689
4714
|
// ../../node_modules/ajv/dist/vocabularies/validation/limitItems.js
|
|
4690
|
-
var require_limitItems = __commonJS((exports)
|
|
4715
|
+
var require_limitItems = __commonJS(function(exports) {
|
|
4691
4716
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4692
4717
|
var codegen_1 = require_codegen();
|
|
4693
4718
|
var error = {
|
|
@@ -4713,7 +4738,7 @@ var require_limitItems = __commonJS((exports) => {
|
|
|
4713
4738
|
});
|
|
4714
4739
|
|
|
4715
4740
|
// ../../node_modules/ajv/dist/runtime/equal.js
|
|
4716
|
-
var require_equal = __commonJS((exports)
|
|
4741
|
+
var require_equal = __commonJS(function(exports) {
|
|
4717
4742
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4718
4743
|
var equal = require_fast_deep_equal();
|
|
4719
4744
|
equal.code = 'require("ajv/dist/runtime/equal").default';
|
|
@@ -4721,7 +4746,7 @@ var require_equal = __commonJS((exports) => {
|
|
|
4721
4746
|
});
|
|
4722
4747
|
|
|
4723
4748
|
// ../../node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
|
|
4724
|
-
var require_uniqueItems = __commonJS((exports)
|
|
4749
|
+
var require_uniqueItems = __commonJS(function(exports) {
|
|
4725
4750
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4726
4751
|
var dataType_1 = require_dataType();
|
|
4727
4752
|
var codegen_1 = require_codegen();
|
|
@@ -4785,7 +4810,7 @@ var require_uniqueItems = __commonJS((exports) => {
|
|
|
4785
4810
|
});
|
|
4786
4811
|
|
|
4787
4812
|
// ../../node_modules/ajv/dist/vocabularies/validation/const.js
|
|
4788
|
-
var require_const = __commonJS((exports)
|
|
4813
|
+
var require_const = __commonJS(function(exports) {
|
|
4789
4814
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4790
4815
|
var codegen_1 = require_codegen();
|
|
4791
4816
|
var util_1 = require_util();
|
|
@@ -4811,7 +4836,7 @@ var require_const = __commonJS((exports) => {
|
|
|
4811
4836
|
});
|
|
4812
4837
|
|
|
4813
4838
|
// ../../node_modules/ajv/dist/vocabularies/validation/enum.js
|
|
4814
|
-
var require_enum = __commonJS((exports)
|
|
4839
|
+
var require_enum = __commonJS(function(exports) {
|
|
4815
4840
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4816
4841
|
var codegen_1 = require_codegen();
|
|
4817
4842
|
var util_1 = require_util();
|
|
@@ -4857,7 +4882,7 @@ var require_enum = __commonJS((exports) => {
|
|
|
4857
4882
|
});
|
|
4858
4883
|
|
|
4859
4884
|
// ../../node_modules/ajv/dist/vocabularies/validation/index.js
|
|
4860
|
-
var require_validation = __commonJS((exports)
|
|
4885
|
+
var require_validation = __commonJS(function(exports) {
|
|
4861
4886
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4862
4887
|
var limitNumber_1 = require_limitNumber();
|
|
4863
4888
|
var multipleOf_1 = require_multipleOf();
|
|
@@ -4887,7 +4912,7 @@ var require_validation = __commonJS((exports) => {
|
|
|
4887
4912
|
});
|
|
4888
4913
|
|
|
4889
4914
|
// ../../node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
|
|
4890
|
-
var require_additionalItems = __commonJS((exports)
|
|
4915
|
+
var require_additionalItems = __commonJS(function(exports) {
|
|
4891
4916
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4892
4917
|
exports.validateAdditionalItems = undefined;
|
|
4893
4918
|
var codegen_1 = require_codegen();
|
|
@@ -4937,7 +4962,7 @@ var require_additionalItems = __commonJS((exports) => {
|
|
|
4937
4962
|
});
|
|
4938
4963
|
|
|
4939
4964
|
// ../../node_modules/ajv/dist/vocabularies/applicator/items.js
|
|
4940
|
-
var require_items = __commonJS((exports)
|
|
4965
|
+
var require_items = __commonJS(function(exports) {
|
|
4941
4966
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4942
4967
|
exports.validateTuple = undefined;
|
|
4943
4968
|
var codegen_1 = require_codegen();
|
|
@@ -4991,7 +5016,7 @@ var require_items = __commonJS((exports) => {
|
|
|
4991
5016
|
});
|
|
4992
5017
|
|
|
4993
5018
|
// ../../node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
|
|
4994
|
-
var require_prefixItems = __commonJS((exports)
|
|
5019
|
+
var require_prefixItems = __commonJS(function(exports) {
|
|
4995
5020
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4996
5021
|
var items_1 = require_items();
|
|
4997
5022
|
var def = {
|
|
@@ -5005,7 +5030,7 @@ var require_prefixItems = __commonJS((exports) => {
|
|
|
5005
5030
|
});
|
|
5006
5031
|
|
|
5007
5032
|
// ../../node_modules/ajv/dist/vocabularies/applicator/items2020.js
|
|
5008
|
-
var require_items2020 = __commonJS((exports)
|
|
5033
|
+
var require_items2020 = __commonJS(function(exports) {
|
|
5009
5034
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5010
5035
|
var codegen_1 = require_codegen();
|
|
5011
5036
|
var util_1 = require_util();
|
|
@@ -5037,7 +5062,7 @@ var require_items2020 = __commonJS((exports) => {
|
|
|
5037
5062
|
});
|
|
5038
5063
|
|
|
5039
5064
|
// ../../node_modules/ajv/dist/vocabularies/applicator/contains.js
|
|
5040
|
-
var require_contains = __commonJS((exports)
|
|
5065
|
+
var require_contains = __commonJS(function(exports) {
|
|
5041
5066
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5042
5067
|
var codegen_1 = require_codegen();
|
|
5043
5068
|
var util_1 = require_util();
|
|
@@ -5128,7 +5153,7 @@ var require_contains = __commonJS((exports) => {
|
|
|
5128
5153
|
});
|
|
5129
5154
|
|
|
5130
5155
|
// ../../node_modules/ajv/dist/vocabularies/applicator/dependencies.js
|
|
5131
|
-
var require_dependencies = __commonJS((exports)
|
|
5156
|
+
var require_dependencies = __commonJS(function(exports) {
|
|
5132
5157
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5133
5158
|
exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = undefined;
|
|
5134
5159
|
var codegen_1 = require_codegen();
|
|
@@ -5213,7 +5238,7 @@ var require_dependencies = __commonJS((exports) => {
|
|
|
5213
5238
|
});
|
|
5214
5239
|
|
|
5215
5240
|
// ../../node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
|
|
5216
|
-
var require_propertyNames = __commonJS((exports)
|
|
5241
|
+
var require_propertyNames = __commonJS(function(exports) {
|
|
5217
5242
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5218
5243
|
var codegen_1 = require_codegen();
|
|
5219
5244
|
var util_1 = require_util();
|
|
@@ -5253,7 +5278,7 @@ var require_propertyNames = __commonJS((exports) => {
|
|
|
5253
5278
|
});
|
|
5254
5279
|
|
|
5255
5280
|
// ../../node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
|
|
5256
|
-
var require_additionalProperties = __commonJS((exports)
|
|
5281
|
+
var require_additionalProperties = __commonJS(function(exports) {
|
|
5257
5282
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5258
5283
|
var code_1 = require_code2();
|
|
5259
5284
|
var codegen_1 = require_codegen();
|
|
@@ -5356,7 +5381,7 @@ var require_additionalProperties = __commonJS((exports) => {
|
|
|
5356
5381
|
});
|
|
5357
5382
|
|
|
5358
5383
|
// ../../node_modules/ajv/dist/vocabularies/applicator/properties.js
|
|
5359
|
-
var require_properties = __commonJS((exports)
|
|
5384
|
+
var require_properties = __commonJS(function(exports) {
|
|
5360
5385
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5361
5386
|
var validate_1 = require_validate();
|
|
5362
5387
|
var code_1 = require_code2();
|
|
@@ -5411,7 +5436,7 @@ var require_properties = __commonJS((exports) => {
|
|
|
5411
5436
|
});
|
|
5412
5437
|
|
|
5413
5438
|
// ../../node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
|
|
5414
|
-
var require_patternProperties = __commonJS((exports)
|
|
5439
|
+
var require_patternProperties = __commonJS(function(exports) {
|
|
5415
5440
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5416
5441
|
var code_1 = require_code2();
|
|
5417
5442
|
var codegen_1 = require_codegen();
|
|
@@ -5482,7 +5507,7 @@ var require_patternProperties = __commonJS((exports) => {
|
|
|
5482
5507
|
});
|
|
5483
5508
|
|
|
5484
5509
|
// ../../node_modules/ajv/dist/vocabularies/applicator/not.js
|
|
5485
|
-
var require_not = __commonJS((exports)
|
|
5510
|
+
var require_not = __commonJS(function(exports) {
|
|
5486
5511
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5487
5512
|
var util_1 = require_util();
|
|
5488
5513
|
var def = {
|
|
@@ -5510,7 +5535,7 @@ var require_not = __commonJS((exports) => {
|
|
|
5510
5535
|
});
|
|
5511
5536
|
|
|
5512
5537
|
// ../../node_modules/ajv/dist/vocabularies/applicator/anyOf.js
|
|
5513
|
-
var require_anyOf = __commonJS((exports)
|
|
5538
|
+
var require_anyOf = __commonJS(function(exports) {
|
|
5514
5539
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5515
5540
|
var code_1 = require_code2();
|
|
5516
5541
|
var def = {
|
|
@@ -5524,7 +5549,7 @@ var require_anyOf = __commonJS((exports) => {
|
|
|
5524
5549
|
});
|
|
5525
5550
|
|
|
5526
5551
|
// ../../node_modules/ajv/dist/vocabularies/applicator/oneOf.js
|
|
5527
|
-
var require_oneOf = __commonJS((exports)
|
|
5552
|
+
var require_oneOf = __commonJS(function(exports) {
|
|
5528
5553
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5529
5554
|
var codegen_1 = require_codegen();
|
|
5530
5555
|
var util_1 = require_util();
|
|
@@ -5579,7 +5604,7 @@ var require_oneOf = __commonJS((exports) => {
|
|
|
5579
5604
|
});
|
|
5580
5605
|
|
|
5581
5606
|
// ../../node_modules/ajv/dist/vocabularies/applicator/allOf.js
|
|
5582
|
-
var require_allOf = __commonJS((exports)
|
|
5607
|
+
var require_allOf = __commonJS(function(exports) {
|
|
5583
5608
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5584
5609
|
var util_1 = require_util();
|
|
5585
5610
|
var def = {
|
|
@@ -5603,7 +5628,7 @@ var require_allOf = __commonJS((exports) => {
|
|
|
5603
5628
|
});
|
|
5604
5629
|
|
|
5605
5630
|
// ../../node_modules/ajv/dist/vocabularies/applicator/if.js
|
|
5606
|
-
var require_if = __commonJS((exports)
|
|
5631
|
+
var require_if = __commonJS(function(exports) {
|
|
5607
5632
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5608
5633
|
var codegen_1 = require_codegen();
|
|
5609
5634
|
var util_1 = require_util();
|
|
@@ -5669,7 +5694,7 @@ var require_if = __commonJS((exports) => {
|
|
|
5669
5694
|
});
|
|
5670
5695
|
|
|
5671
5696
|
// ../../node_modules/ajv/dist/vocabularies/applicator/thenElse.js
|
|
5672
|
-
var require_thenElse = __commonJS((exports)
|
|
5697
|
+
var require_thenElse = __commonJS(function(exports) {
|
|
5673
5698
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5674
5699
|
var util_1 = require_util();
|
|
5675
5700
|
var def = {
|
|
@@ -5684,7 +5709,7 @@ var require_thenElse = __commonJS((exports) => {
|
|
|
5684
5709
|
});
|
|
5685
5710
|
|
|
5686
5711
|
// ../../node_modules/ajv/dist/vocabularies/applicator/index.js
|
|
5687
|
-
var require_applicator = __commonJS((exports)
|
|
5712
|
+
var require_applicator = __commonJS(function(exports) {
|
|
5688
5713
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5689
5714
|
var additionalItems_1 = require_additionalItems();
|
|
5690
5715
|
var prefixItems_1 = require_prefixItems();
|
|
@@ -5727,7 +5752,7 @@ var require_applicator = __commonJS((exports) => {
|
|
|
5727
5752
|
});
|
|
5728
5753
|
|
|
5729
5754
|
// ../../node_modules/ajv/dist/vocabularies/format/format.js
|
|
5730
|
-
var require_format = __commonJS((exports)
|
|
5755
|
+
var require_format = __commonJS(function(exports) {
|
|
5731
5756
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5732
5757
|
var codegen_1 = require_codegen();
|
|
5733
5758
|
var error = {
|
|
@@ -5814,7 +5839,7 @@ var require_format = __commonJS((exports) => {
|
|
|
5814
5839
|
});
|
|
5815
5840
|
|
|
5816
5841
|
// ../../node_modules/ajv/dist/vocabularies/format/index.js
|
|
5817
|
-
var require_format2 = __commonJS((exports)
|
|
5842
|
+
var require_format2 = __commonJS(function(exports) {
|
|
5818
5843
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5819
5844
|
var format_1 = require_format();
|
|
5820
5845
|
var format = [format_1.default];
|
|
@@ -5822,7 +5847,7 @@ var require_format2 = __commonJS((exports) => {
|
|
|
5822
5847
|
});
|
|
5823
5848
|
|
|
5824
5849
|
// ../../node_modules/ajv/dist/vocabularies/metadata.js
|
|
5825
|
-
var require_metadata = __commonJS((exports)
|
|
5850
|
+
var require_metadata = __commonJS(function(exports) {
|
|
5826
5851
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5827
5852
|
exports.contentVocabulary = exports.metadataVocabulary = undefined;
|
|
5828
5853
|
exports.metadataVocabulary = [
|
|
@@ -5842,7 +5867,7 @@ var require_metadata = __commonJS((exports) => {
|
|
|
5842
5867
|
});
|
|
5843
5868
|
|
|
5844
5869
|
// ../../node_modules/ajv/dist/vocabularies/draft7.js
|
|
5845
|
-
var require_draft7 = __commonJS((exports)
|
|
5870
|
+
var require_draft7 = __commonJS(function(exports) {
|
|
5846
5871
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5847
5872
|
var core_1 = require_core2();
|
|
5848
5873
|
var validation_1 = require_validation();
|
|
@@ -5861,18 +5886,18 @@ var require_draft7 = __commonJS((exports) => {
|
|
|
5861
5886
|
});
|
|
5862
5887
|
|
|
5863
5888
|
// ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
5864
|
-
var require_types = __commonJS((exports)
|
|
5889
|
+
var require_types = __commonJS(function(exports) {
|
|
5865
5890
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5866
5891
|
exports.DiscrError = undefined;
|
|
5867
5892
|
var DiscrError;
|
|
5868
|
-
(function(
|
|
5869
|
-
|
|
5870
|
-
|
|
5893
|
+
(function(DiscrError) {
|
|
5894
|
+
DiscrError["Tag"] = "tag";
|
|
5895
|
+
DiscrError["Mapping"] = "mapping";
|
|
5871
5896
|
})(DiscrError || (exports.DiscrError = DiscrError = {}));
|
|
5872
5897
|
});
|
|
5873
5898
|
|
|
5874
5899
|
// ../../node_modules/ajv/dist/vocabularies/discriminator/index.js
|
|
5875
|
-
var require_discriminator = __commonJS((exports)
|
|
5900
|
+
var require_discriminator = __commonJS(function(exports) {
|
|
5876
5901
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5877
5902
|
var codegen_1 = require_codegen();
|
|
5878
5903
|
var types_1 = require_types();
|
|
@@ -5974,7 +5999,7 @@ var require_discriminator = __commonJS((exports) => {
|
|
|
5974
5999
|
});
|
|
5975
6000
|
|
|
5976
6001
|
// ../../node_modules/ajv/dist/refs/json-schema-draft-07.json
|
|
5977
|
-
var require_json_schema_draft_07 = __commonJS((exports, module)
|
|
6002
|
+
var require_json_schema_draft_07 = __commonJS(function(exports, module) {
|
|
5978
6003
|
module.exports = {
|
|
5979
6004
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
5980
6005
|
$id: "http://json-schema.org/draft-07/schema#",
|
|
@@ -6129,7 +6154,7 @@ var require_json_schema_draft_07 = __commonJS((exports, module) => {
|
|
|
6129
6154
|
});
|
|
6130
6155
|
|
|
6131
6156
|
// ../../node_modules/ajv/dist/ajv.js
|
|
6132
|
-
var require_ajv = __commonJS((exports, module)
|
|
6157
|
+
var require_ajv = __commonJS(function(exports, module) {
|
|
6133
6158
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6134
6159
|
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = undefined;
|
|
6135
6160
|
var core_1 = require_core();
|
|
@@ -6197,7 +6222,7 @@ var require_ajv = __commonJS((exports, module) => {
|
|
|
6197
6222
|
});
|
|
6198
6223
|
|
|
6199
6224
|
// ../../node_modules/ajv-formats/dist/formats.js
|
|
6200
|
-
var require_formats = __commonJS((exports)
|
|
6225
|
+
var require_formats = __commonJS(function(exports) {
|
|
6201
6226
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6202
6227
|
exports.formatNames = exports.fastFormats = exports.fullFormats = undefined;
|
|
6203
6228
|
function fmtDef(validate, compare) {
|
|
@@ -6338,7 +6363,7 @@ var require_formats = __commonJS((exports) => {
|
|
|
6338
6363
|
});
|
|
6339
6364
|
|
|
6340
6365
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js
|
|
6341
|
-
var require_code3 = __commonJS((exports)
|
|
6366
|
+
var require_code3 = __commonJS(function(exports) {
|
|
6342
6367
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6343
6368
|
exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = undefined;
|
|
6344
6369
|
|
|
@@ -6492,7 +6517,7 @@ var require_code3 = __commonJS((exports) => {
|
|
|
6492
6517
|
});
|
|
6493
6518
|
|
|
6494
6519
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/scope.js
|
|
6495
|
-
var require_scope2 = __commonJS((exports)
|
|
6520
|
+
var require_scope2 = __commonJS(function(exports) {
|
|
6496
6521
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6497
6522
|
exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = undefined;
|
|
6498
6523
|
var code_1 = require_code3();
|
|
@@ -6504,9 +6529,9 @@ var require_scope2 = __commonJS((exports) => {
|
|
|
6504
6529
|
}
|
|
6505
6530
|
}
|
|
6506
6531
|
var UsedValueState;
|
|
6507
|
-
(function(
|
|
6508
|
-
|
|
6509
|
-
|
|
6532
|
+
(function(UsedValueState) {
|
|
6533
|
+
UsedValueState[UsedValueState["Started"] = 0] = "Started";
|
|
6534
|
+
UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
|
|
6510
6535
|
})(UsedValueState = exports.UsedValueState || (exports.UsedValueState = {}));
|
|
6511
6536
|
exports.varKinds = {
|
|
6512
6537
|
const: new code_1.Name("const"),
|
|
@@ -6638,7 +6663,7 @@ var require_scope2 = __commonJS((exports) => {
|
|
|
6638
6663
|
});
|
|
6639
6664
|
|
|
6640
6665
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/index.js
|
|
6641
|
-
var require_codegen2 = __commonJS((exports)
|
|
6666
|
+
var require_codegen2 = __commonJS(function(exports) {
|
|
6642
6667
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6643
6668
|
exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = undefined;
|
|
6644
6669
|
var code_1 = require_code3();
|
|
@@ -7348,7 +7373,7 @@ var require_codegen2 = __commonJS((exports) => {
|
|
|
7348
7373
|
});
|
|
7349
7374
|
|
|
7350
7375
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/util.js
|
|
7351
|
-
var require_util2 = __commonJS((exports)
|
|
7376
|
+
var require_util2 = __commonJS(function(exports) {
|
|
7352
7377
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7353
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;
|
|
7354
7379
|
var codegen_1 = require_codegen2();
|
|
@@ -7488,9 +7513,9 @@ var require_util2 = __commonJS((exports) => {
|
|
|
7488
7513
|
}
|
|
7489
7514
|
exports.useFunc = useFunc;
|
|
7490
7515
|
var Type;
|
|
7491
|
-
(function(
|
|
7492
|
-
|
|
7493
|
-
|
|
7516
|
+
(function(Type) {
|
|
7517
|
+
Type[Type["Num"] = 0] = "Num";
|
|
7518
|
+
Type[Type["Str"] = 1] = "Str";
|
|
7494
7519
|
})(Type = exports.Type || (exports.Type = {}));
|
|
7495
7520
|
function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
|
|
7496
7521
|
if (dataProp instanceof codegen_1.Name) {
|
|
@@ -7512,7 +7537,7 @@ var require_util2 = __commonJS((exports) => {
|
|
|
7512
7537
|
});
|
|
7513
7538
|
|
|
7514
7539
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/names.js
|
|
7515
|
-
var require_names2 = __commonJS((exports)
|
|
7540
|
+
var require_names2 = __commonJS(function(exports) {
|
|
7516
7541
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7517
7542
|
var codegen_1 = require_codegen2();
|
|
7518
7543
|
var names = {
|
|
@@ -7537,7 +7562,7 @@ var require_names2 = __commonJS((exports) => {
|
|
|
7537
7562
|
});
|
|
7538
7563
|
|
|
7539
7564
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/errors.js
|
|
7540
|
-
var require_errors2 = __commonJS((exports)
|
|
7565
|
+
var require_errors2 = __commonJS(function(exports) {
|
|
7541
7566
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7542
7567
|
exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = undefined;
|
|
7543
7568
|
var codegen_1 = require_codegen2();
|
|
@@ -7655,7 +7680,7 @@ var require_errors2 = __commonJS((exports) => {
|
|
|
7655
7680
|
});
|
|
7656
7681
|
|
|
7657
7682
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/boolSchema.js
|
|
7658
|
-
var require_boolSchema2 = __commonJS((exports)
|
|
7683
|
+
var require_boolSchema2 = __commonJS(function(exports) {
|
|
7659
7684
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7660
7685
|
exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = undefined;
|
|
7661
7686
|
var errors_1 = require_errors2();
|
|
@@ -7703,7 +7728,7 @@ var require_boolSchema2 = __commonJS((exports) => {
|
|
|
7703
7728
|
});
|
|
7704
7729
|
|
|
7705
7730
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/rules.js
|
|
7706
|
-
var require_rules2 = __commonJS((exports)
|
|
7731
|
+
var require_rules2 = __commonJS(function(exports) {
|
|
7707
7732
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7708
7733
|
exports.getRules = exports.isJSONType = undefined;
|
|
7709
7734
|
var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"];
|
|
@@ -7731,7 +7756,7 @@ var require_rules2 = __commonJS((exports) => {
|
|
|
7731
7756
|
});
|
|
7732
7757
|
|
|
7733
7758
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/applicability.js
|
|
7734
|
-
var require_applicability2 = __commonJS((exports)
|
|
7759
|
+
var require_applicability2 = __commonJS(function(exports) {
|
|
7735
7760
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7736
7761
|
exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = undefined;
|
|
7737
7762
|
function schemaHasRulesForType({ schema, self }, type) {
|
|
@@ -7751,7 +7776,7 @@ var require_applicability2 = __commonJS((exports) => {
|
|
|
7751
7776
|
});
|
|
7752
7777
|
|
|
7753
7778
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/dataType.js
|
|
7754
|
-
var require_dataType2 = __commonJS((exports)
|
|
7779
|
+
var require_dataType2 = __commonJS(function(exports) {
|
|
7755
7780
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7756
7781
|
exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = undefined;
|
|
7757
7782
|
var rules_1 = require_rules2();
|
|
@@ -7760,9 +7785,9 @@ var require_dataType2 = __commonJS((exports) => {
|
|
|
7760
7785
|
var codegen_1 = require_codegen2();
|
|
7761
7786
|
var util_1 = require_util2();
|
|
7762
7787
|
var DataType;
|
|
7763
|
-
(function(
|
|
7764
|
-
|
|
7765
|
-
|
|
7788
|
+
(function(DataType) {
|
|
7789
|
+
DataType[DataType["Correct"] = 0] = "Correct";
|
|
7790
|
+
DataType[DataType["Wrong"] = 1] = "Wrong";
|
|
7766
7791
|
})(DataType = exports.DataType || (exports.DataType = {}));
|
|
7767
7792
|
function getSchemaTypes(schema) {
|
|
7768
7793
|
const types = getJSONTypes(schema.type);
|
|
@@ -7932,7 +7957,7 @@ var require_dataType2 = __commonJS((exports) => {
|
|
|
7932
7957
|
});
|
|
7933
7958
|
|
|
7934
7959
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/defaults.js
|
|
7935
|
-
var require_defaults2 = __commonJS((exports)
|
|
7960
|
+
var require_defaults2 = __commonJS(function(exports) {
|
|
7936
7961
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7937
7962
|
exports.assignDefaults = undefined;
|
|
7938
7963
|
var codegen_1 = require_codegen2();
|
|
@@ -7966,7 +7991,7 @@ var require_defaults2 = __commonJS((exports) => {
|
|
|
7966
7991
|
});
|
|
7967
7992
|
|
|
7968
7993
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/code.js
|
|
7969
|
-
var require_code4 = __commonJS((exports)
|
|
7994
|
+
var require_code4 = __commonJS(function(exports) {
|
|
7970
7995
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7971
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;
|
|
7972
7997
|
var codegen_1 = require_codegen2();
|
|
@@ -8095,7 +8120,7 @@ var require_code4 = __commonJS((exports) => {
|
|
|
8095
8120
|
});
|
|
8096
8121
|
|
|
8097
8122
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/keyword.js
|
|
8098
|
-
var require_keyword2 = __commonJS((exports)
|
|
8123
|
+
var require_keyword2 = __commonJS(function(exports) {
|
|
8099
8124
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8100
8125
|
exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = undefined;
|
|
8101
8126
|
var codegen_1 = require_codegen2();
|
|
@@ -8158,8 +8183,8 @@ var require_keyword2 = __commonJS((exports) => {
|
|
|
8158
8183
|
gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
8159
8184
|
}
|
|
8160
8185
|
function reportErrs(errors) {
|
|
8161
|
-
var
|
|
8162
|
-
gen.if((0, codegen_1.not)((
|
|
8186
|
+
var _a;
|
|
8187
|
+
gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== undefined ? _a : valid), errors);
|
|
8163
8188
|
}
|
|
8164
8189
|
}
|
|
8165
8190
|
exports.funcKeywordCode = funcKeywordCode;
|
|
@@ -8210,7 +8235,7 @@ var require_keyword2 = __commonJS((exports) => {
|
|
|
8210
8235
|
});
|
|
8211
8236
|
|
|
8212
8237
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/subschema.js
|
|
8213
|
-
var require_subschema2 = __commonJS((exports)
|
|
8238
|
+
var require_subschema2 = __commonJS(function(exports) {
|
|
8214
8239
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8215
8240
|
exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = undefined;
|
|
8216
8241
|
var codegen_1 = require_codegen2();
|
|
@@ -8290,7 +8315,7 @@ var require_subschema2 = __commonJS((exports) => {
|
|
|
8290
8315
|
});
|
|
8291
8316
|
|
|
8292
8317
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js
|
|
8293
|
-
var require_resolve2 = __commonJS((exports)
|
|
8318
|
+
var require_resolve2 = __commonJS(function(exports) {
|
|
8294
8319
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8295
8320
|
exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = undefined;
|
|
8296
8321
|
var util_1 = require_util2();
|
|
@@ -8395,15 +8420,15 @@ var require_resolve2 = __commonJS((exports) => {
|
|
|
8395
8420
|
if (parentJsonPtr === undefined)
|
|
8396
8421
|
return;
|
|
8397
8422
|
const fullPath = pathPrefix + jsonPtr;
|
|
8398
|
-
let
|
|
8423
|
+
let baseId = baseIds[parentJsonPtr];
|
|
8399
8424
|
if (typeof sch[schemaId] == "string")
|
|
8400
|
-
|
|
8425
|
+
baseId = addRef.call(this, sch[schemaId]);
|
|
8401
8426
|
addAnchor.call(this, sch.$anchor);
|
|
8402
8427
|
addAnchor.call(this, sch.$dynamicAnchor);
|
|
8403
|
-
baseIds[jsonPtr] =
|
|
8428
|
+
baseIds[jsonPtr] = baseId;
|
|
8404
8429
|
function addRef(ref) {
|
|
8405
8430
|
const _resolve = this.opts.uriResolver.resolve;
|
|
8406
|
-
ref = normalizeId(
|
|
8431
|
+
ref = normalizeId(baseId ? _resolve(baseId, ref) : ref);
|
|
8407
8432
|
if (schemaRefs.has(ref))
|
|
8408
8433
|
throw ambiguos(ref);
|
|
8409
8434
|
schemaRefs.add(ref);
|
|
@@ -8443,7 +8468,7 @@ var require_resolve2 = __commonJS((exports) => {
|
|
|
8443
8468
|
});
|
|
8444
8469
|
|
|
8445
8470
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/index.js
|
|
8446
|
-
var require_validate2 = __commonJS((exports)
|
|
8471
|
+
var require_validate2 = __commonJS(function(exports) {
|
|
8447
8472
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8448
8473
|
exports.getData = exports.KeywordCxt = exports.validateFunctionCode = undefined;
|
|
8449
8474
|
var boolSchema_1 = require_boolSchema2();
|
|
@@ -8948,7 +8973,7 @@ var require_validate2 = __commonJS((exports) => {
|
|
|
8948
8973
|
});
|
|
8949
8974
|
|
|
8950
8975
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/runtime/validation_error.js
|
|
8951
|
-
var require_validation_error2 = __commonJS((exports)
|
|
8976
|
+
var require_validation_error2 = __commonJS(function(exports) {
|
|
8952
8977
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8953
8978
|
|
|
8954
8979
|
class ValidationError extends Error {
|
|
@@ -8962,7 +8987,7 @@ var require_validation_error2 = __commonJS((exports) => {
|
|
|
8962
8987
|
});
|
|
8963
8988
|
|
|
8964
8989
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.js
|
|
8965
|
-
var require_ref_error2 = __commonJS((exports)
|
|
8990
|
+
var require_ref_error2 = __commonJS(function(exports) {
|
|
8966
8991
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8967
8992
|
var resolve_1 = require_resolve2();
|
|
8968
8993
|
|
|
@@ -8977,7 +9002,7 @@ var require_ref_error2 = __commonJS((exports) => {
|
|
|
8977
9002
|
});
|
|
8978
9003
|
|
|
8979
9004
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js
|
|
8980
|
-
var require_compile2 = __commonJS((exports)
|
|
9005
|
+
var require_compile2 = __commonJS(function(exports) {
|
|
8981
9006
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8982
9007
|
exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = undefined;
|
|
8983
9008
|
var codegen_1 = require_codegen2();
|
|
@@ -9198,7 +9223,7 @@ var require_compile2 = __commonJS((exports) => {
|
|
|
9198
9223
|
});
|
|
9199
9224
|
|
|
9200
9225
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/refs/data.json
|
|
9201
|
-
var require_data2 = __commonJS((exports, module)
|
|
9226
|
+
var require_data2 = __commonJS(function(exports, module) {
|
|
9202
9227
|
module.exports = {
|
|
9203
9228
|
$id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
|
|
9204
9229
|
description: "Meta-schema for $data reference (JSON AnySchema extension proposal)",
|
|
@@ -9215,7 +9240,7 @@ var require_data2 = __commonJS((exports, module) => {
|
|
|
9215
9240
|
});
|
|
9216
9241
|
|
|
9217
9242
|
// ../../node_modules/uri-js/dist/es5/uri.all.js
|
|
9218
|
-
var require_uri_all = __commonJS((exports, module)
|
|
9243
|
+
var require_uri_all = __commonJS(function(exports, module) {
|
|
9219
9244
|
(function(global, factory) {
|
|
9220
9245
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global.URI = global.URI || {});
|
|
9221
9246
|
})(exports, function(exports2) {
|
|
@@ -9256,22 +9281,22 @@ var require_uri_all = __commonJS((exports, module) => {
|
|
|
9256
9281
|
}
|
|
9257
9282
|
return obj;
|
|
9258
9283
|
}
|
|
9259
|
-
function buildExps(
|
|
9260
|
-
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$ + ")") + "?$";
|
|
9261
9286
|
return {
|
|
9262
9287
|
NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
|
|
9263
|
-
NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED
|
|
9264
|
-
NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED
|
|
9265
|
-
NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED
|
|
9266
|
-
NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED
|
|
9267
|
-
NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED
|
|
9268
|
-
NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED
|
|
9269
|
-
ESCAPE: new RegExp(merge("[^]", UNRESERVED
|
|
9270
|
-
UNRESERVED: new RegExp(UNRESERVED
|
|
9271
|
-
OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED
|
|
9272
|
-
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"),
|
|
9273
9298
|
IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
|
|
9274
|
-
IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$
|
|
9299
|
+
IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$")
|
|
9275
9300
|
};
|
|
9276
9301
|
}
|
|
9277
9302
|
var URI_PROTOCOL = buildExps(false);
|
|
@@ -9642,22 +9667,22 @@ var require_uri_all = __commonJS((exports, module) => {
|
|
|
9642
9667
|
return newStr;
|
|
9643
9668
|
}
|
|
9644
9669
|
function _normalizeComponentEncoding(components, protocol) {
|
|
9645
|
-
function
|
|
9670
|
+
function decodeUnreserved(str) {
|
|
9646
9671
|
var decStr = pctDecChars(str);
|
|
9647
9672
|
return !decStr.match(protocol.UNRESERVED) ? str : decStr;
|
|
9648
9673
|
}
|
|
9649
9674
|
if (components.scheme)
|
|
9650
|
-
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, "");
|
|
9651
9676
|
if (components.userinfo !== undefined)
|
|
9652
|
-
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);
|
|
9653
9678
|
if (components.host !== undefined)
|
|
9654
|
-
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);
|
|
9655
9680
|
if (components.path !== undefined)
|
|
9656
|
-
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);
|
|
9657
9682
|
if (components.query !== undefined)
|
|
9658
|
-
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);
|
|
9659
9684
|
if (components.fragment !== undefined)
|
|
9660
|
-
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);
|
|
9661
9686
|
return components;
|
|
9662
9687
|
}
|
|
9663
9688
|
function _stripLeadingZeros(str) {
|
|
@@ -9886,12 +9911,12 @@ var require_uri_all = __commonJS((exports, module) => {
|
|
|
9886
9911
|
}
|
|
9887
9912
|
return uriTokens.join("");
|
|
9888
9913
|
}
|
|
9889
|
-
function resolveComponents(
|
|
9914
|
+
function resolveComponents(base, relative) {
|
|
9890
9915
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9891
9916
|
var skipNormalization = arguments[3];
|
|
9892
9917
|
var target = {};
|
|
9893
9918
|
if (!skipNormalization) {
|
|
9894
|
-
|
|
9919
|
+
base = parse(serialize(base, options), options);
|
|
9895
9920
|
relative = parse(serialize(relative, options), options);
|
|
9896
9921
|
}
|
|
9897
9922
|
options = options || {};
|
|
@@ -9911,32 +9936,32 @@ var require_uri_all = __commonJS((exports, module) => {
|
|
|
9911
9936
|
target.query = relative.query;
|
|
9912
9937
|
} else {
|
|
9913
9938
|
if (!relative.path) {
|
|
9914
|
-
target.path =
|
|
9939
|
+
target.path = base.path;
|
|
9915
9940
|
if (relative.query !== undefined) {
|
|
9916
9941
|
target.query = relative.query;
|
|
9917
9942
|
} else {
|
|
9918
|
-
target.query =
|
|
9943
|
+
target.query = base.query;
|
|
9919
9944
|
}
|
|
9920
9945
|
} else {
|
|
9921
9946
|
if (relative.path.charAt(0) === "/") {
|
|
9922
9947
|
target.path = removeDotSegments(relative.path);
|
|
9923
9948
|
} else {
|
|
9924
|
-
if ((
|
|
9949
|
+
if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
|
|
9925
9950
|
target.path = "/" + relative.path;
|
|
9926
|
-
} else if (!
|
|
9951
|
+
} else if (!base.path) {
|
|
9927
9952
|
target.path = relative.path;
|
|
9928
9953
|
} else {
|
|
9929
|
-
target.path =
|
|
9954
|
+
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
|
9930
9955
|
}
|
|
9931
9956
|
target.path = removeDotSegments(target.path);
|
|
9932
9957
|
}
|
|
9933
9958
|
target.query = relative.query;
|
|
9934
9959
|
}
|
|
9935
|
-
target.userinfo =
|
|
9936
|
-
target.host =
|
|
9937
|
-
target.port =
|
|
9960
|
+
target.userinfo = base.userinfo;
|
|
9961
|
+
target.host = base.host;
|
|
9962
|
+
target.port = base.port;
|
|
9938
9963
|
}
|
|
9939
|
-
target.scheme =
|
|
9964
|
+
target.scheme = base.scheme;
|
|
9940
9965
|
}
|
|
9941
9966
|
target.fragment = relative.fragment;
|
|
9942
9967
|
return target;
|
|
@@ -10219,7 +10244,7 @@ var require_uri_all = __commonJS((exports, module) => {
|
|
|
10219
10244
|
});
|
|
10220
10245
|
|
|
10221
10246
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js
|
|
10222
|
-
var require_uri2 = __commonJS((exports)
|
|
10247
|
+
var require_uri2 = __commonJS(function(exports) {
|
|
10223
10248
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10224
10249
|
var uri = require_uri_all();
|
|
10225
10250
|
uri.code = 'require("ajv/dist/runtime/uri").default';
|
|
@@ -10227,7 +10252,7 @@ var require_uri2 = __commonJS((exports) => {
|
|
|
10227
10252
|
});
|
|
10228
10253
|
|
|
10229
10254
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/core.js
|
|
10230
|
-
var require_core3 = __commonJS((exports)
|
|
10255
|
+
var require_core3 = __commonJS(function(exports) {
|
|
10231
10256
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10232
10257
|
exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = undefined;
|
|
10233
10258
|
var validate_1 = require_validate2();
|
|
@@ -10820,7 +10845,7 @@ var require_core3 = __commonJS((exports) => {
|
|
|
10820
10845
|
});
|
|
10821
10846
|
|
|
10822
10847
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/id.js
|
|
10823
|
-
var require_id2 = __commonJS((exports)
|
|
10848
|
+
var require_id2 = __commonJS(function(exports) {
|
|
10824
10849
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10825
10850
|
var def = {
|
|
10826
10851
|
keyword: "id",
|
|
@@ -10832,7 +10857,7 @@ var require_id2 = __commonJS((exports) => {
|
|
|
10832
10857
|
});
|
|
10833
10858
|
|
|
10834
10859
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/ref.js
|
|
10835
|
-
var require_ref2 = __commonJS((exports)
|
|
10860
|
+
var require_ref2 = __commonJS(function(exports) {
|
|
10836
10861
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10837
10862
|
exports.callRef = exports.getValidate = undefined;
|
|
10838
10863
|
var ref_error_1 = require_ref_error2();
|
|
@@ -10951,7 +10976,7 @@ var require_ref2 = __commonJS((exports) => {
|
|
|
10951
10976
|
});
|
|
10952
10977
|
|
|
10953
10978
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/index.js
|
|
10954
|
-
var require_core4 = __commonJS((exports)
|
|
10979
|
+
var require_core4 = __commonJS(function(exports) {
|
|
10955
10980
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10956
10981
|
var id_1 = require_id2();
|
|
10957
10982
|
var ref_1 = require_ref2();
|
|
@@ -10969,7 +10994,7 @@ var require_core4 = __commonJS((exports) => {
|
|
|
10969
10994
|
});
|
|
10970
10995
|
|
|
10971
10996
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
|
|
10972
|
-
var require_limitNumber2 = __commonJS((exports)
|
|
10997
|
+
var require_limitNumber2 = __commonJS(function(exports) {
|
|
10973
10998
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10974
10999
|
var codegen_1 = require_codegen2();
|
|
10975
11000
|
var ops = codegen_1.operators;
|
|
@@ -10998,7 +11023,7 @@ var require_limitNumber2 = __commonJS((exports) => {
|
|
|
10998
11023
|
});
|
|
10999
11024
|
|
|
11000
11025
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
|
|
11001
|
-
var require_multipleOf2 = __commonJS((exports)
|
|
11026
|
+
var require_multipleOf2 = __commonJS(function(exports) {
|
|
11002
11027
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11003
11028
|
var codegen_1 = require_codegen2();
|
|
11004
11029
|
var error = {
|
|
@@ -11023,7 +11048,7 @@ var require_multipleOf2 = __commonJS((exports) => {
|
|
|
11023
11048
|
});
|
|
11024
11049
|
|
|
11025
11050
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/runtime/ucs2length.js
|
|
11026
|
-
var require_ucs2length2 = __commonJS((exports)
|
|
11051
|
+
var require_ucs2length2 = __commonJS(function(exports) {
|
|
11027
11052
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11028
11053
|
function ucs2length(str) {
|
|
11029
11054
|
const len = str.length;
|
|
@@ -11046,7 +11071,7 @@ var require_ucs2length2 = __commonJS((exports) => {
|
|
|
11046
11071
|
});
|
|
11047
11072
|
|
|
11048
11073
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitLength.js
|
|
11049
|
-
var require_limitLength2 = __commonJS((exports)
|
|
11074
|
+
var require_limitLength2 = __commonJS(function(exports) {
|
|
11050
11075
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11051
11076
|
var codegen_1 = require_codegen2();
|
|
11052
11077
|
var util_1 = require_util2();
|
|
@@ -11075,7 +11100,7 @@ var require_limitLength2 = __commonJS((exports) => {
|
|
|
11075
11100
|
});
|
|
11076
11101
|
|
|
11077
11102
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/pattern.js
|
|
11078
|
-
var require_pattern2 = __commonJS((exports)
|
|
11103
|
+
var require_pattern2 = __commonJS(function(exports) {
|
|
11079
11104
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11080
11105
|
var code_1 = require_code4();
|
|
11081
11106
|
var codegen_1 = require_codegen2();
|
|
@@ -11100,7 +11125,7 @@ var require_pattern2 = __commonJS((exports) => {
|
|
|
11100
11125
|
});
|
|
11101
11126
|
|
|
11102
11127
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
|
|
11103
|
-
var require_limitProperties2 = __commonJS((exports)
|
|
11128
|
+
var require_limitProperties2 = __commonJS(function(exports) {
|
|
11104
11129
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11105
11130
|
var codegen_1 = require_codegen2();
|
|
11106
11131
|
var error = {
|
|
@@ -11126,7 +11151,7 @@ var require_limitProperties2 = __commonJS((exports) => {
|
|
|
11126
11151
|
});
|
|
11127
11152
|
|
|
11128
11153
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/required.js
|
|
11129
|
-
var require_required2 = __commonJS((exports)
|
|
11154
|
+
var require_required2 = __commonJS(function(exports) {
|
|
11130
11155
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11131
11156
|
var code_1 = require_code4();
|
|
11132
11157
|
var codegen_1 = require_codegen2();
|
|
@@ -11205,7 +11230,7 @@ var require_required2 = __commonJS((exports) => {
|
|
|
11205
11230
|
});
|
|
11206
11231
|
|
|
11207
11232
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitItems.js
|
|
11208
|
-
var require_limitItems2 = __commonJS((exports)
|
|
11233
|
+
var require_limitItems2 = __commonJS(function(exports) {
|
|
11209
11234
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11210
11235
|
var codegen_1 = require_codegen2();
|
|
11211
11236
|
var error = {
|
|
@@ -11231,7 +11256,7 @@ var require_limitItems2 = __commonJS((exports) => {
|
|
|
11231
11256
|
});
|
|
11232
11257
|
|
|
11233
11258
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/runtime/equal.js
|
|
11234
|
-
var require_equal2 = __commonJS((exports)
|
|
11259
|
+
var require_equal2 = __commonJS(function(exports) {
|
|
11235
11260
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11236
11261
|
var equal = require_fast_deep_equal();
|
|
11237
11262
|
equal.code = 'require("ajv/dist/runtime/equal").default';
|
|
@@ -11239,7 +11264,7 @@ var require_equal2 = __commonJS((exports) => {
|
|
|
11239
11264
|
});
|
|
11240
11265
|
|
|
11241
11266
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
|
|
11242
|
-
var require_uniqueItems2 = __commonJS((exports)
|
|
11267
|
+
var require_uniqueItems2 = __commonJS(function(exports) {
|
|
11243
11268
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11244
11269
|
var dataType_1 = require_dataType2();
|
|
11245
11270
|
var codegen_1 = require_codegen2();
|
|
@@ -11303,7 +11328,7 @@ var require_uniqueItems2 = __commonJS((exports) => {
|
|
|
11303
11328
|
});
|
|
11304
11329
|
|
|
11305
11330
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/const.js
|
|
11306
|
-
var require_const2 = __commonJS((exports)
|
|
11331
|
+
var require_const2 = __commonJS(function(exports) {
|
|
11307
11332
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11308
11333
|
var codegen_1 = require_codegen2();
|
|
11309
11334
|
var util_1 = require_util2();
|
|
@@ -11329,7 +11354,7 @@ var require_const2 = __commonJS((exports) => {
|
|
|
11329
11354
|
});
|
|
11330
11355
|
|
|
11331
11356
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.js
|
|
11332
|
-
var require_enum2 = __commonJS((exports)
|
|
11357
|
+
var require_enum2 = __commonJS(function(exports) {
|
|
11333
11358
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11334
11359
|
var codegen_1 = require_codegen2();
|
|
11335
11360
|
var util_1 = require_util2();
|
|
@@ -11375,7 +11400,7 @@ var require_enum2 = __commonJS((exports) => {
|
|
|
11375
11400
|
});
|
|
11376
11401
|
|
|
11377
11402
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/index.js
|
|
11378
|
-
var require_validation2 = __commonJS((exports)
|
|
11403
|
+
var require_validation2 = __commonJS(function(exports) {
|
|
11379
11404
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11380
11405
|
var limitNumber_1 = require_limitNumber2();
|
|
11381
11406
|
var multipleOf_1 = require_multipleOf2();
|
|
@@ -11405,7 +11430,7 @@ var require_validation2 = __commonJS((exports) => {
|
|
|
11405
11430
|
});
|
|
11406
11431
|
|
|
11407
11432
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
|
|
11408
|
-
var require_additionalItems2 = __commonJS((exports)
|
|
11433
|
+
var require_additionalItems2 = __commonJS(function(exports) {
|
|
11409
11434
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11410
11435
|
exports.validateAdditionalItems = undefined;
|
|
11411
11436
|
var codegen_1 = require_codegen2();
|
|
@@ -11455,7 +11480,7 @@ var require_additionalItems2 = __commonJS((exports) => {
|
|
|
11455
11480
|
});
|
|
11456
11481
|
|
|
11457
11482
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/items.js
|
|
11458
|
-
var require_items2 = __commonJS((exports)
|
|
11483
|
+
var require_items2 = __commonJS(function(exports) {
|
|
11459
11484
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11460
11485
|
exports.validateTuple = undefined;
|
|
11461
11486
|
var codegen_1 = require_codegen2();
|
|
@@ -11509,7 +11534,7 @@ var require_items2 = __commonJS((exports) => {
|
|
|
11509
11534
|
});
|
|
11510
11535
|
|
|
11511
11536
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
|
|
11512
|
-
var require_prefixItems2 = __commonJS((exports)
|
|
11537
|
+
var require_prefixItems2 = __commonJS(function(exports) {
|
|
11513
11538
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11514
11539
|
var items_1 = require_items2();
|
|
11515
11540
|
var def = {
|
|
@@ -11523,7 +11548,7 @@ var require_prefixItems2 = __commonJS((exports) => {
|
|
|
11523
11548
|
});
|
|
11524
11549
|
|
|
11525
11550
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/items2020.js
|
|
11526
|
-
var require_items20202 = __commonJS((exports)
|
|
11551
|
+
var require_items20202 = __commonJS(function(exports) {
|
|
11527
11552
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11528
11553
|
var codegen_1 = require_codegen2();
|
|
11529
11554
|
var util_1 = require_util2();
|
|
@@ -11555,7 +11580,7 @@ var require_items20202 = __commonJS((exports) => {
|
|
|
11555
11580
|
});
|
|
11556
11581
|
|
|
11557
11582
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/contains.js
|
|
11558
|
-
var require_contains2 = __commonJS((exports)
|
|
11583
|
+
var require_contains2 = __commonJS(function(exports) {
|
|
11559
11584
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11560
11585
|
var codegen_1 = require_codegen2();
|
|
11561
11586
|
var util_1 = require_util2();
|
|
@@ -11646,7 +11671,7 @@ var require_contains2 = __commonJS((exports) => {
|
|
|
11646
11671
|
});
|
|
11647
11672
|
|
|
11648
11673
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/dependencies.js
|
|
11649
|
-
var require_dependencies2 = __commonJS((exports)
|
|
11674
|
+
var require_dependencies2 = __commonJS(function(exports) {
|
|
11650
11675
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11651
11676
|
exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = undefined;
|
|
11652
11677
|
var codegen_1 = require_codegen2();
|
|
@@ -11731,7 +11756,7 @@ var require_dependencies2 = __commonJS((exports) => {
|
|
|
11731
11756
|
});
|
|
11732
11757
|
|
|
11733
11758
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
|
|
11734
|
-
var require_propertyNames2 = __commonJS((exports)
|
|
11759
|
+
var require_propertyNames2 = __commonJS(function(exports) {
|
|
11735
11760
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11736
11761
|
var codegen_1 = require_codegen2();
|
|
11737
11762
|
var util_1 = require_util2();
|
|
@@ -11771,7 +11796,7 @@ var require_propertyNames2 = __commonJS((exports) => {
|
|
|
11771
11796
|
});
|
|
11772
11797
|
|
|
11773
11798
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
|
|
11774
|
-
var require_additionalProperties2 = __commonJS((exports)
|
|
11799
|
+
var require_additionalProperties2 = __commonJS(function(exports) {
|
|
11775
11800
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11776
11801
|
var code_1 = require_code4();
|
|
11777
11802
|
var codegen_1 = require_codegen2();
|
|
@@ -11874,7 +11899,7 @@ var require_additionalProperties2 = __commonJS((exports) => {
|
|
|
11874
11899
|
});
|
|
11875
11900
|
|
|
11876
11901
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/properties.js
|
|
11877
|
-
var require_properties2 = __commonJS((exports)
|
|
11902
|
+
var require_properties2 = __commonJS(function(exports) {
|
|
11878
11903
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11879
11904
|
var validate_1 = require_validate2();
|
|
11880
11905
|
var code_1 = require_code4();
|
|
@@ -11929,7 +11954,7 @@ var require_properties2 = __commonJS((exports) => {
|
|
|
11929
11954
|
});
|
|
11930
11955
|
|
|
11931
11956
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
|
|
11932
|
-
var require_patternProperties2 = __commonJS((exports)
|
|
11957
|
+
var require_patternProperties2 = __commonJS(function(exports) {
|
|
11933
11958
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11934
11959
|
var code_1 = require_code4();
|
|
11935
11960
|
var codegen_1 = require_codegen2();
|
|
@@ -12000,7 +12025,7 @@ var require_patternProperties2 = __commonJS((exports) => {
|
|
|
12000
12025
|
});
|
|
12001
12026
|
|
|
12002
12027
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/not.js
|
|
12003
|
-
var require_not2 = __commonJS((exports)
|
|
12028
|
+
var require_not2 = __commonJS(function(exports) {
|
|
12004
12029
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12005
12030
|
var util_1 = require_util2();
|
|
12006
12031
|
var def = {
|
|
@@ -12028,7 +12053,7 @@ var require_not2 = __commonJS((exports) => {
|
|
|
12028
12053
|
});
|
|
12029
12054
|
|
|
12030
12055
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
|
|
12031
|
-
var require_anyOf2 = __commonJS((exports)
|
|
12056
|
+
var require_anyOf2 = __commonJS(function(exports) {
|
|
12032
12057
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12033
12058
|
var code_1 = require_code4();
|
|
12034
12059
|
var def = {
|
|
@@ -12042,7 +12067,7 @@ var require_anyOf2 = __commonJS((exports) => {
|
|
|
12042
12067
|
});
|
|
12043
12068
|
|
|
12044
12069
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/oneOf.js
|
|
12045
|
-
var require_oneOf2 = __commonJS((exports)
|
|
12070
|
+
var require_oneOf2 = __commonJS(function(exports) {
|
|
12046
12071
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12047
12072
|
var codegen_1 = require_codegen2();
|
|
12048
12073
|
var util_1 = require_util2();
|
|
@@ -12097,7 +12122,7 @@ var require_oneOf2 = __commonJS((exports) => {
|
|
|
12097
12122
|
});
|
|
12098
12123
|
|
|
12099
12124
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/allOf.js
|
|
12100
|
-
var require_allOf2 = __commonJS((exports)
|
|
12125
|
+
var require_allOf2 = __commonJS(function(exports) {
|
|
12101
12126
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12102
12127
|
var util_1 = require_util2();
|
|
12103
12128
|
var def = {
|
|
@@ -12121,7 +12146,7 @@ var require_allOf2 = __commonJS((exports) => {
|
|
|
12121
12146
|
});
|
|
12122
12147
|
|
|
12123
12148
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/if.js
|
|
12124
|
-
var require_if2 = __commonJS((exports)
|
|
12149
|
+
var require_if2 = __commonJS(function(exports) {
|
|
12125
12150
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12126
12151
|
var codegen_1 = require_codegen2();
|
|
12127
12152
|
var util_1 = require_util2();
|
|
@@ -12187,7 +12212,7 @@ var require_if2 = __commonJS((exports) => {
|
|
|
12187
12212
|
});
|
|
12188
12213
|
|
|
12189
12214
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/thenElse.js
|
|
12190
|
-
var require_thenElse2 = __commonJS((exports)
|
|
12215
|
+
var require_thenElse2 = __commonJS(function(exports) {
|
|
12191
12216
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12192
12217
|
var util_1 = require_util2();
|
|
12193
12218
|
var def = {
|
|
@@ -12202,7 +12227,7 @@ var require_thenElse2 = __commonJS((exports) => {
|
|
|
12202
12227
|
});
|
|
12203
12228
|
|
|
12204
12229
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/index.js
|
|
12205
|
-
var require_applicator2 = __commonJS((exports)
|
|
12230
|
+
var require_applicator2 = __commonJS(function(exports) {
|
|
12206
12231
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12207
12232
|
var additionalItems_1 = require_additionalItems2();
|
|
12208
12233
|
var prefixItems_1 = require_prefixItems2();
|
|
@@ -12245,7 +12270,7 @@ var require_applicator2 = __commonJS((exports) => {
|
|
|
12245
12270
|
});
|
|
12246
12271
|
|
|
12247
12272
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/format.js
|
|
12248
|
-
var require_format3 = __commonJS((exports)
|
|
12273
|
+
var require_format3 = __commonJS(function(exports) {
|
|
12249
12274
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12250
12275
|
var codegen_1 = require_codegen2();
|
|
12251
12276
|
var error = {
|
|
@@ -12332,7 +12357,7 @@ var require_format3 = __commonJS((exports) => {
|
|
|
12332
12357
|
});
|
|
12333
12358
|
|
|
12334
12359
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/index.js
|
|
12335
|
-
var require_format4 = __commonJS((exports)
|
|
12360
|
+
var require_format4 = __commonJS(function(exports) {
|
|
12336
12361
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12337
12362
|
var format_1 = require_format3();
|
|
12338
12363
|
var format = [format_1.default];
|
|
@@ -12340,7 +12365,7 @@ var require_format4 = __commonJS((exports) => {
|
|
|
12340
12365
|
});
|
|
12341
12366
|
|
|
12342
12367
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/metadata.js
|
|
12343
|
-
var require_metadata2 = __commonJS((exports)
|
|
12368
|
+
var require_metadata2 = __commonJS(function(exports) {
|
|
12344
12369
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12345
12370
|
exports.contentVocabulary = exports.metadataVocabulary = undefined;
|
|
12346
12371
|
exports.metadataVocabulary = [
|
|
@@ -12360,7 +12385,7 @@ var require_metadata2 = __commonJS((exports) => {
|
|
|
12360
12385
|
});
|
|
12361
12386
|
|
|
12362
12387
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/draft7.js
|
|
12363
|
-
var require_draft72 = __commonJS((exports)
|
|
12388
|
+
var require_draft72 = __commonJS(function(exports) {
|
|
12364
12389
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12365
12390
|
var core_1 = require_core4();
|
|
12366
12391
|
var validation_1 = require_validation2();
|
|
@@ -12379,18 +12404,18 @@ var require_draft72 = __commonJS((exports) => {
|
|
|
12379
12404
|
});
|
|
12380
12405
|
|
|
12381
12406
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
12382
|
-
var require_types2 = __commonJS((exports)
|
|
12407
|
+
var require_types2 = __commonJS(function(exports) {
|
|
12383
12408
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12384
12409
|
exports.DiscrError = undefined;
|
|
12385
12410
|
var DiscrError;
|
|
12386
|
-
(function(
|
|
12387
|
-
|
|
12388
|
-
|
|
12411
|
+
(function(DiscrError) {
|
|
12412
|
+
DiscrError["Tag"] = "tag";
|
|
12413
|
+
DiscrError["Mapping"] = "mapping";
|
|
12389
12414
|
})(DiscrError = exports.DiscrError || (exports.DiscrError = {}));
|
|
12390
12415
|
});
|
|
12391
12416
|
|
|
12392
12417
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js
|
|
12393
|
-
var require_discriminator2 = __commonJS((exports)
|
|
12418
|
+
var require_discriminator2 = __commonJS(function(exports) {
|
|
12394
12419
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12395
12420
|
var codegen_1 = require_codegen2();
|
|
12396
12421
|
var types_1 = require_types2();
|
|
@@ -12488,7 +12513,7 @@ var require_discriminator2 = __commonJS((exports) => {
|
|
|
12488
12513
|
});
|
|
12489
12514
|
|
|
12490
12515
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/refs/json-schema-draft-07.json
|
|
12491
|
-
var require_json_schema_draft_072 = __commonJS((exports, module)
|
|
12516
|
+
var require_json_schema_draft_072 = __commonJS(function(exports, module) {
|
|
12492
12517
|
module.exports = {
|
|
12493
12518
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
12494
12519
|
$id: "http://json-schema.org/draft-07/schema#",
|
|
@@ -12643,7 +12668,7 @@ var require_json_schema_draft_072 = __commonJS((exports, module) => {
|
|
|
12643
12668
|
});
|
|
12644
12669
|
|
|
12645
12670
|
// ../../node_modules/ajv-formats/node_modules/ajv/dist/ajv.js
|
|
12646
|
-
var require_ajv2 = __commonJS((exports, module)
|
|
12671
|
+
var require_ajv2 = __commonJS(function(exports, module) {
|
|
12647
12672
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12648
12673
|
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = undefined;
|
|
12649
12674
|
var core_1 = require_core3();
|
|
@@ -12709,7 +12734,7 @@ var require_ajv2 = __commonJS((exports, module) => {
|
|
|
12709
12734
|
});
|
|
12710
12735
|
|
|
12711
12736
|
// ../../node_modules/ajv-formats/dist/limit.js
|
|
12712
|
-
var require_limit = __commonJS((exports)
|
|
12737
|
+
var require_limit = __commonJS(function(exports) {
|
|
12713
12738
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12714
12739
|
exports.formatLimitDefinition = undefined;
|
|
12715
12740
|
var ajv_1 = require_ajv2();
|
|
@@ -12778,7 +12803,7 @@ var require_limit = __commonJS((exports) => {
|
|
|
12778
12803
|
});
|
|
12779
12804
|
|
|
12780
12805
|
// ../../node_modules/ajv-formats/dist/index.js
|
|
12781
|
-
var require_dist = __commonJS((exports, module)
|
|
12806
|
+
var require_dist = __commonJS(function(exports, module) {
|
|
12782
12807
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12783
12808
|
var formats_1 = require_formats();
|
|
12784
12809
|
var limit_1 = require_limit();
|
|
@@ -12817,7 +12842,7 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
12817
12842
|
});
|
|
12818
12843
|
|
|
12819
12844
|
// ../../node_modules/nearley/lib/nearley.js
|
|
12820
|
-
var require_nearley = __commonJS((exports, module)
|
|
12845
|
+
var require_nearley = __commonJS(function(exports, module) {
|
|
12821
12846
|
(function(root, factory) {
|
|
12822
12847
|
if (typeof module === "object" && module.exports) {
|
|
12823
12848
|
module.exports = factory();
|
|
@@ -13255,7 +13280,7 @@ var require_nearley = __commonJS((exports, module) => {
|
|
|
13255
13280
|
});
|
|
13256
13281
|
|
|
13257
13282
|
// ../../node_modules/smtp-address-parser/dist/lib/grammar.js
|
|
13258
|
-
var require_grammar = __commonJS((exports)
|
|
13283
|
+
var require_grammar = __commonJS(function(exports) {
|
|
13259
13284
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13260
13285
|
function id(d) {
|
|
13261
13286
|
return d[0];
|
|
@@ -13440,7 +13465,7 @@ var require_grammar = __commonJS((exports) => {
|
|
|
13440
13465
|
});
|
|
13441
13466
|
|
|
13442
13467
|
// ../../node_modules/smtp-address-parser/dist/lib/index.js
|
|
13443
|
-
var require_lib = __commonJS((exports)
|
|
13468
|
+
var require_lib = __commonJS(function(exports) {
|
|
13444
13469
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
13445
13470
|
return mod && mod.__esModule ? mod : { default: mod };
|
|
13446
13471
|
};
|
|
@@ -13522,7 +13547,7 @@ var require_lib = __commonJS((exports) => {
|
|
|
13522
13547
|
});
|
|
13523
13548
|
|
|
13524
13549
|
// ../../node_modules/extend/index.js
|
|
13525
|
-
var require_extend = __commonJS((exports, module)
|
|
13550
|
+
var require_extend = __commonJS(function(exports, module) {
|
|
13526
13551
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
13527
13552
|
var toStr = Object.prototype.toString;
|
|
13528
13553
|
var defineProperty = Object.defineProperty;
|
|
@@ -13609,7 +13634,7 @@ var require_extend = __commonJS((exports, module) => {
|
|
|
13609
13634
|
});
|
|
13610
13635
|
|
|
13611
13636
|
// ../../node_modules/schemes/lib/iana-permanent.json
|
|
13612
|
-
var require_iana_permanent = __commonJS((exports, module)
|
|
13637
|
+
var require_iana_permanent = __commonJS(function(exports, module) {
|
|
13613
13638
|
module.exports = [
|
|
13614
13639
|
{
|
|
13615
13640
|
scheme: "aaa",
|
|
@@ -14527,7 +14552,7 @@ var require_iana_permanent = __commonJS((exports, module) => {
|
|
|
14527
14552
|
});
|
|
14528
14553
|
|
|
14529
14554
|
// ../../node_modules/schemes/lib/iana-provisional.json
|
|
14530
|
-
var require_iana_provisional = __commonJS((exports, module)
|
|
14555
|
+
var require_iana_provisional = __commonJS(function(exports, module) {
|
|
14531
14556
|
module.exports = [
|
|
14532
14557
|
{
|
|
14533
14558
|
scheme: "acr",
|
|
@@ -15453,7 +15478,7 @@ var require_iana_provisional = __commonJS((exports, module) => {
|
|
|
15453
15478
|
});
|
|
15454
15479
|
|
|
15455
15480
|
// ../../node_modules/schemes/lib/iana-historical.json
|
|
15456
|
-
var require_iana_historical = __commonJS((exports, module)
|
|
15481
|
+
var require_iana_historical = __commonJS(function(exports, module) {
|
|
15457
15482
|
module.exports = [
|
|
15458
15483
|
{
|
|
15459
15484
|
scheme: "fax",
|
|
@@ -15577,7 +15602,7 @@ var require_iana_historical = __commonJS((exports, module) => {
|
|
|
15577
15602
|
});
|
|
15578
15603
|
|
|
15579
15604
|
// ../../node_modules/schemes/lib/unofficial.json
|
|
15580
|
-
var require_unofficial = __commonJS((exports, module)
|
|
15605
|
+
var require_unofficial = __commonJS(function(exports, module) {
|
|
15581
15606
|
module.exports = [
|
|
15582
15607
|
{
|
|
15583
15608
|
scheme: "android-app"
|
|
@@ -15605,7 +15630,7 @@ var require_unofficial = __commonJS((exports, module) => {
|
|
|
15605
15630
|
});
|
|
15606
15631
|
|
|
15607
15632
|
// ../../node_modules/schemes/index.js
|
|
15608
|
-
var require_schemes2 = __commonJS((exports, module)
|
|
15633
|
+
var require_schemes2 = __commonJS(function(exports, module) {
|
|
15609
15634
|
var extend = require_extend();
|
|
15610
15635
|
var data = {
|
|
15611
15636
|
permanent: require_iana_permanent(),
|
|
@@ -15628,7 +15653,7 @@ var require_schemes2 = __commonJS((exports, module) => {
|
|
|
15628
15653
|
});
|
|
15629
15654
|
|
|
15630
15655
|
// ../../node_modules/ajv-formats-draft2019/formats/iri.js
|
|
15631
|
-
var require_iri = __commonJS((exports, module)
|
|
15656
|
+
var require_iri = __commonJS(function(exports, module) {
|
|
15632
15657
|
var { parse } = require_uri_all();
|
|
15633
15658
|
var { addressParser } = require_lib();
|
|
15634
15659
|
var schemes = require_schemes2();
|
|
@@ -15653,12 +15678,12 @@ var require_iri = __commonJS((exports, module) => {
|
|
|
15653
15678
|
});
|
|
15654
15679
|
|
|
15655
15680
|
// ../../node_modules/ajv-formats-draft2019/formats/duration.js
|
|
15656
|
-
var require_duration = __commonJS((exports, module)
|
|
15681
|
+
var require_duration = __commonJS(function(exports, module) {
|
|
15657
15682
|
module.exports = /^P(?!$)(\d+(?:\.\d+)?Y)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?W)?(\d+(?:\.\d+)?D)?(T(?=\d)(\d+(?:\.\d+)?H)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?S)?)?$/;
|
|
15658
15683
|
});
|
|
15659
15684
|
|
|
15660
15685
|
// ../../node_modules/ajv-formats-draft2019/formats/idn-email.js
|
|
15661
|
-
var require_idn_email = __commonJS((exports, module)
|
|
15686
|
+
var require_idn_email = __commonJS(function(exports, module) {
|
|
15662
15687
|
var { parse } = require_lib();
|
|
15663
15688
|
module.exports = (value) => {
|
|
15664
15689
|
try {
|
|
@@ -15671,7 +15696,7 @@ var require_idn_email = __commonJS((exports, module) => {
|
|
|
15671
15696
|
});
|
|
15672
15697
|
|
|
15673
15698
|
// ../../node_modules/ajv-formats-draft2019/formats/idn-hostname.js
|
|
15674
|
-
var require_idn_hostname = __commonJS((exports, module)
|
|
15699
|
+
var require_idn_hostname = __commonJS(function(exports, module) {
|
|
15675
15700
|
var { toASCII } = __require("punycode");
|
|
15676
15701
|
var hostnameRegex = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;
|
|
15677
15702
|
module.exports = (value) => {
|
|
@@ -15681,7 +15706,7 @@ var require_idn_hostname = __commonJS((exports, module) => {
|
|
|
15681
15706
|
});
|
|
15682
15707
|
|
|
15683
15708
|
// ../../node_modules/ajv-formats-draft2019/formats/iri-reference.js
|
|
15684
|
-
var require_iri_reference = __commonJS((exports, module)
|
|
15709
|
+
var require_iri_reference = __commonJS(function(exports, module) {
|
|
15685
15710
|
var { parse } = require_uri_all();
|
|
15686
15711
|
var { addressParser } = require_lib();
|
|
15687
15712
|
var schemes = require_schemes2();
|
|
@@ -15709,7 +15734,7 @@ var require_iri_reference = __commonJS((exports, module) => {
|
|
|
15709
15734
|
});
|
|
15710
15735
|
|
|
15711
15736
|
// ../../node_modules/ajv-formats-draft2019/formats/index.js
|
|
15712
|
-
var require_formats2 = __commonJS((exports, module)
|
|
15737
|
+
var require_formats2 = __commonJS(function(exports, module) {
|
|
15713
15738
|
exports.iri = require_iri();
|
|
15714
15739
|
exports.duration = require_duration();
|
|
15715
15740
|
exports["idn-email"] = require_idn_email();
|
|
@@ -15718,7 +15743,7 @@ var require_formats2 = __commonJS((exports, module) => {
|
|
|
15718
15743
|
});
|
|
15719
15744
|
|
|
15720
15745
|
// ../../node_modules/ajv-formats-draft2019/index.js
|
|
15721
|
-
var require_ajv_formats_draft2019 = __commonJS((exports, module)
|
|
15746
|
+
var require_ajv_formats_draft2019 = __commonJS(function(exports, module) {
|
|
15722
15747
|
var formats = require_formats2();
|
|
15723
15748
|
module.exports = (ajv, options = {}) => {
|
|
15724
15749
|
const allFormats = Object.keys(formats);
|
|
@@ -15735,765 +15760,70 @@ var require_ajv_formats_draft2019 = __commonJS((exports, module) => {
|
|
|
15735
15760
|
};
|
|
15736
15761
|
});
|
|
15737
15762
|
|
|
15738
|
-
//
|
|
15739
|
-
var
|
|
15740
|
-
|
|
15741
|
-
|
|
15742
|
-
|
|
15743
|
-
|
|
15744
|
-
|
|
15745
|
-
|
|
15746
|
-
|
|
15747
|
-
|
|
15748
|
-
|
|
15749
|
-
|
|
15750
|
-
|
|
15751
|
-
|
|
15752
|
-
|
|
15753
|
-
|
|
15754
|
-
|
|
15755
|
-
|
|
15756
|
-
function parse(str) {
|
|
15757
|
-
str = String(str);
|
|
15758
|
-
if (str.length > 100) {
|
|
15759
|
-
return;
|
|
15760
|
-
}
|
|
15761
|
-
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
|
|
15762
|
-
if (!match) {
|
|
15763
|
-
return;
|
|
15764
|
-
}
|
|
15765
|
-
var n = parseFloat(match[1]);
|
|
15766
|
-
var type = (match[2] || "ms").toLowerCase();
|
|
15767
|
-
switch (type) {
|
|
15768
|
-
case "years":
|
|
15769
|
-
case "year":
|
|
15770
|
-
case "yrs":
|
|
15771
|
-
case "yr":
|
|
15772
|
-
case "y":
|
|
15773
|
-
return n * y;
|
|
15774
|
-
case "weeks":
|
|
15775
|
-
case "week":
|
|
15776
|
-
case "w":
|
|
15777
|
-
return n * w;
|
|
15778
|
-
case "days":
|
|
15779
|
-
case "day":
|
|
15780
|
-
case "d":
|
|
15781
|
-
return n * d;
|
|
15782
|
-
case "hours":
|
|
15783
|
-
case "hour":
|
|
15784
|
-
case "hrs":
|
|
15785
|
-
case "hr":
|
|
15786
|
-
case "h":
|
|
15787
|
-
return n * h;
|
|
15788
|
-
case "minutes":
|
|
15789
|
-
case "minute":
|
|
15790
|
-
case "mins":
|
|
15791
|
-
case "min":
|
|
15792
|
-
case "m":
|
|
15793
|
-
return n * m;
|
|
15794
|
-
case "seconds":
|
|
15795
|
-
case "second":
|
|
15796
|
-
case "secs":
|
|
15797
|
-
case "sec":
|
|
15798
|
-
case "s":
|
|
15799
|
-
return n * s;
|
|
15800
|
-
case "milliseconds":
|
|
15801
|
-
case "millisecond":
|
|
15802
|
-
case "msecs":
|
|
15803
|
-
case "msec":
|
|
15804
|
-
case "ms":
|
|
15805
|
-
return n;
|
|
15806
|
-
default:
|
|
15807
|
-
return;
|
|
15808
|
-
}
|
|
15809
|
-
}
|
|
15810
|
-
function fmtShort(ms) {
|
|
15811
|
-
var msAbs = Math.abs(ms);
|
|
15812
|
-
if (msAbs >= d) {
|
|
15813
|
-
return Math.round(ms / d) + "d";
|
|
15814
|
-
}
|
|
15815
|
-
if (msAbs >= h) {
|
|
15816
|
-
return Math.round(ms / h) + "h";
|
|
15817
|
-
}
|
|
15818
|
-
if (msAbs >= m) {
|
|
15819
|
-
return Math.round(ms / m) + "m";
|
|
15820
|
-
}
|
|
15821
|
-
if (msAbs >= s) {
|
|
15822
|
-
return Math.round(ms / s) + "s";
|
|
15823
|
-
}
|
|
15824
|
-
return ms + "ms";
|
|
15825
|
-
}
|
|
15826
|
-
function fmtLong(ms) {
|
|
15827
|
-
var msAbs = Math.abs(ms);
|
|
15828
|
-
if (msAbs >= d) {
|
|
15829
|
-
return plural(ms, msAbs, d, "day");
|
|
15830
|
-
}
|
|
15831
|
-
if (msAbs >= h) {
|
|
15832
|
-
return plural(ms, msAbs, h, "hour");
|
|
15833
|
-
}
|
|
15834
|
-
if (msAbs >= m) {
|
|
15835
|
-
return plural(ms, msAbs, m, "minute");
|
|
15836
|
-
}
|
|
15837
|
-
if (msAbs >= s) {
|
|
15838
|
-
return plural(ms, msAbs, s, "second");
|
|
15839
|
-
}
|
|
15840
|
-
return ms + " ms";
|
|
15841
|
-
}
|
|
15842
|
-
function plural(ms, msAbs, n, name) {
|
|
15843
|
-
var isPlural = msAbs >= n * 1.5;
|
|
15844
|
-
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
15845
|
-
}
|
|
15846
|
-
});
|
|
15847
|
-
|
|
15848
|
-
// ../../node_modules/debug/src/common.js
|
|
15849
|
-
var require_common = __commonJS((exports, module) => {
|
|
15850
|
-
function setup(env) {
|
|
15851
|
-
createDebug.debug = createDebug;
|
|
15852
|
-
createDebug.default = createDebug;
|
|
15853
|
-
createDebug.coerce = coerce;
|
|
15854
|
-
createDebug.disable = disable;
|
|
15855
|
-
createDebug.enable = enable;
|
|
15856
|
-
createDebug.enabled = enabled;
|
|
15857
|
-
createDebug.humanize = require_ms();
|
|
15858
|
-
createDebug.destroy = destroy;
|
|
15859
|
-
Object.keys(env).forEach((key) => {
|
|
15860
|
-
createDebug[key] = env[key];
|
|
15861
|
-
});
|
|
15862
|
-
createDebug.names = [];
|
|
15863
|
-
createDebug.skips = [];
|
|
15864
|
-
createDebug.formatters = {};
|
|
15865
|
-
function selectColor(namespace) {
|
|
15866
|
-
let hash = 0;
|
|
15867
|
-
for (let i = 0;i < namespace.length; i++) {
|
|
15868
|
-
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
15869
|
-
hash |= 0;
|
|
15870
|
-
}
|
|
15871
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
15872
|
-
}
|
|
15873
|
-
createDebug.selectColor = selectColor;
|
|
15874
|
-
function createDebug(namespace) {
|
|
15875
|
-
let prevTime;
|
|
15876
|
-
let enableOverride = null;
|
|
15877
|
-
let namespacesCache;
|
|
15878
|
-
let enabledCache;
|
|
15879
|
-
function debug(...args) {
|
|
15880
|
-
if (!debug.enabled) {
|
|
15881
|
-
return;
|
|
15882
|
-
}
|
|
15883
|
-
const self = debug;
|
|
15884
|
-
const curr = Number(new Date);
|
|
15885
|
-
const ms = curr - (prevTime || curr);
|
|
15886
|
-
self.diff = ms;
|
|
15887
|
-
self.prev = prevTime;
|
|
15888
|
-
self.curr = curr;
|
|
15889
|
-
prevTime = curr;
|
|
15890
|
-
args[0] = createDebug.coerce(args[0]);
|
|
15891
|
-
if (typeof args[0] !== "string") {
|
|
15892
|
-
args.unshift("%O");
|
|
15893
|
-
}
|
|
15894
|
-
let index = 0;
|
|
15895
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
15896
|
-
if (match === "%%") {
|
|
15897
|
-
return "%";
|
|
15898
|
-
}
|
|
15899
|
-
index++;
|
|
15900
|
-
const formatter = createDebug.formatters[format];
|
|
15901
|
-
if (typeof formatter === "function") {
|
|
15902
|
-
const val = args[index];
|
|
15903
|
-
match = formatter.call(self, val);
|
|
15904
|
-
args.splice(index, 1);
|
|
15905
|
-
index--;
|
|
15906
|
-
}
|
|
15907
|
-
return match;
|
|
15908
|
-
});
|
|
15909
|
-
createDebug.formatArgs.call(self, args);
|
|
15910
|
-
const logFn = self.log || createDebug.log;
|
|
15911
|
-
logFn.apply(self, args);
|
|
15912
|
-
}
|
|
15913
|
-
debug.namespace = namespace;
|
|
15914
|
-
debug.useColors = createDebug.useColors();
|
|
15915
|
-
debug.color = createDebug.selectColor(namespace);
|
|
15916
|
-
debug.extend = extend;
|
|
15917
|
-
debug.destroy = createDebug.destroy;
|
|
15918
|
-
Object.defineProperty(debug, "enabled", {
|
|
15919
|
-
enumerable: true,
|
|
15920
|
-
configurable: false,
|
|
15921
|
-
get: () => {
|
|
15922
|
-
if (enableOverride !== null) {
|
|
15923
|
-
return enableOverride;
|
|
15924
|
-
}
|
|
15925
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
15926
|
-
namespacesCache = createDebug.namespaces;
|
|
15927
|
-
enabledCache = createDebug.enabled(namespace);
|
|
15928
|
-
}
|
|
15929
|
-
return enabledCache;
|
|
15930
|
-
},
|
|
15931
|
-
set: (v) => {
|
|
15932
|
-
enableOverride = v;
|
|
15933
|
-
}
|
|
15934
|
-
});
|
|
15935
|
-
if (typeof createDebug.init === "function") {
|
|
15936
|
-
createDebug.init(debug);
|
|
15937
|
-
}
|
|
15938
|
-
return debug;
|
|
15939
|
-
}
|
|
15940
|
-
function extend(namespace, delimiter) {
|
|
15941
|
-
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
15942
|
-
newDebug.log = this.log;
|
|
15943
|
-
return newDebug;
|
|
15944
|
-
}
|
|
15945
|
-
function enable(namespaces) {
|
|
15946
|
-
createDebug.save(namespaces);
|
|
15947
|
-
createDebug.namespaces = namespaces;
|
|
15948
|
-
createDebug.names = [];
|
|
15949
|
-
createDebug.skips = [];
|
|
15950
|
-
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
15951
|
-
for (const ns of split) {
|
|
15952
|
-
if (ns[0] === "-") {
|
|
15953
|
-
createDebug.skips.push(ns.slice(1));
|
|
15954
|
-
} else {
|
|
15955
|
-
createDebug.names.push(ns);
|
|
15956
|
-
}
|
|
15957
|
-
}
|
|
15958
|
-
}
|
|
15959
|
-
function matchesTemplate(search, template) {
|
|
15960
|
-
let searchIndex = 0;
|
|
15961
|
-
let templateIndex = 0;
|
|
15962
|
-
let starIndex = -1;
|
|
15963
|
-
let matchIndex = 0;
|
|
15964
|
-
while (searchIndex < search.length) {
|
|
15965
|
-
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
15966
|
-
if (template[templateIndex] === "*") {
|
|
15967
|
-
starIndex = templateIndex;
|
|
15968
|
-
matchIndex = searchIndex;
|
|
15969
|
-
templateIndex++;
|
|
15970
|
-
} else {
|
|
15971
|
-
searchIndex++;
|
|
15972
|
-
templateIndex++;
|
|
15973
|
-
}
|
|
15974
|
-
} else if (starIndex !== -1) {
|
|
15975
|
-
templateIndex = starIndex + 1;
|
|
15976
|
-
matchIndex++;
|
|
15977
|
-
searchIndex = matchIndex;
|
|
15978
|
-
} else {
|
|
15979
|
-
return false;
|
|
15980
|
-
}
|
|
15981
|
-
}
|
|
15982
|
-
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
15983
|
-
templateIndex++;
|
|
15984
|
-
}
|
|
15985
|
-
return templateIndex === template.length;
|
|
15986
|
-
}
|
|
15987
|
-
function disable() {
|
|
15988
|
-
const namespaces = [
|
|
15989
|
-
...createDebug.names,
|
|
15990
|
-
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
15991
|
-
].join(",");
|
|
15992
|
-
createDebug.enable("");
|
|
15993
|
-
return namespaces;
|
|
15994
|
-
}
|
|
15995
|
-
function enabled(name) {
|
|
15996
|
-
for (const skip of createDebug.skips) {
|
|
15997
|
-
if (matchesTemplate(name, skip)) {
|
|
15998
|
-
return false;
|
|
15999
|
-
}
|
|
16000
|
-
}
|
|
16001
|
-
for (const ns of createDebug.names) {
|
|
16002
|
-
if (matchesTemplate(name, ns)) {
|
|
16003
|
-
return true;
|
|
16004
|
-
}
|
|
16005
|
-
}
|
|
16006
|
-
return false;
|
|
16007
|
-
}
|
|
16008
|
-
function coerce(val) {
|
|
16009
|
-
if (val instanceof Error) {
|
|
16010
|
-
return val.stack || val.message;
|
|
16011
|
-
}
|
|
16012
|
-
return val;
|
|
16013
|
-
}
|
|
16014
|
-
function destroy() {
|
|
16015
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
16016
|
-
}
|
|
16017
|
-
createDebug.enable(createDebug.load());
|
|
16018
|
-
return createDebug;
|
|
16019
|
-
}
|
|
16020
|
-
module.exports = setup;
|
|
16021
|
-
});
|
|
16022
|
-
|
|
16023
|
-
// ../../node_modules/debug/src/browser.js
|
|
16024
|
-
var require_browser = __commonJS((exports, module) => {
|
|
16025
|
-
exports.formatArgs = formatArgs;
|
|
16026
|
-
exports.save = save;
|
|
16027
|
-
exports.load = load;
|
|
16028
|
-
exports.useColors = useColors;
|
|
16029
|
-
exports.storage = localstorage();
|
|
16030
|
-
exports.destroy = (() => {
|
|
16031
|
-
let warned = false;
|
|
16032
|
-
return () => {
|
|
16033
|
-
if (!warned) {
|
|
16034
|
-
warned = true;
|
|
16035
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
16036
|
-
}
|
|
16037
|
-
};
|
|
16038
|
-
})();
|
|
16039
|
-
exports.colors = [
|
|
16040
|
-
"#0000CC",
|
|
16041
|
-
"#0000FF",
|
|
16042
|
-
"#0033CC",
|
|
16043
|
-
"#0033FF",
|
|
16044
|
-
"#0066CC",
|
|
16045
|
-
"#0066FF",
|
|
16046
|
-
"#0099CC",
|
|
16047
|
-
"#0099FF",
|
|
16048
|
-
"#00CC00",
|
|
16049
|
-
"#00CC33",
|
|
16050
|
-
"#00CC66",
|
|
16051
|
-
"#00CC99",
|
|
16052
|
-
"#00CCCC",
|
|
16053
|
-
"#00CCFF",
|
|
16054
|
-
"#3300CC",
|
|
16055
|
-
"#3300FF",
|
|
16056
|
-
"#3333CC",
|
|
16057
|
-
"#3333FF",
|
|
16058
|
-
"#3366CC",
|
|
16059
|
-
"#3366FF",
|
|
16060
|
-
"#3399CC",
|
|
16061
|
-
"#3399FF",
|
|
16062
|
-
"#33CC00",
|
|
16063
|
-
"#33CC33",
|
|
16064
|
-
"#33CC66",
|
|
16065
|
-
"#33CC99",
|
|
16066
|
-
"#33CCCC",
|
|
16067
|
-
"#33CCFF",
|
|
16068
|
-
"#6600CC",
|
|
16069
|
-
"#6600FF",
|
|
16070
|
-
"#6633CC",
|
|
16071
|
-
"#6633FF",
|
|
16072
|
-
"#66CC00",
|
|
16073
|
-
"#66CC33",
|
|
16074
|
-
"#9900CC",
|
|
16075
|
-
"#9900FF",
|
|
16076
|
-
"#9933CC",
|
|
16077
|
-
"#9933FF",
|
|
16078
|
-
"#99CC00",
|
|
16079
|
-
"#99CC33",
|
|
16080
|
-
"#CC0000",
|
|
16081
|
-
"#CC0033",
|
|
16082
|
-
"#CC0066",
|
|
16083
|
-
"#CC0099",
|
|
16084
|
-
"#CC00CC",
|
|
16085
|
-
"#CC00FF",
|
|
16086
|
-
"#CC3300",
|
|
16087
|
-
"#CC3333",
|
|
16088
|
-
"#CC3366",
|
|
16089
|
-
"#CC3399",
|
|
16090
|
-
"#CC33CC",
|
|
16091
|
-
"#CC33FF",
|
|
16092
|
-
"#CC6600",
|
|
16093
|
-
"#CC6633",
|
|
16094
|
-
"#CC9900",
|
|
16095
|
-
"#CC9933",
|
|
16096
|
-
"#CCCC00",
|
|
16097
|
-
"#CCCC33",
|
|
16098
|
-
"#FF0000",
|
|
16099
|
-
"#FF0033",
|
|
16100
|
-
"#FF0066",
|
|
16101
|
-
"#FF0099",
|
|
16102
|
-
"#FF00CC",
|
|
16103
|
-
"#FF00FF",
|
|
16104
|
-
"#FF3300",
|
|
16105
|
-
"#FF3333",
|
|
16106
|
-
"#FF3366",
|
|
16107
|
-
"#FF3399",
|
|
16108
|
-
"#FF33CC",
|
|
16109
|
-
"#FF33FF",
|
|
16110
|
-
"#FF6600",
|
|
16111
|
-
"#FF6633",
|
|
16112
|
-
"#FF9900",
|
|
16113
|
-
"#FF9933",
|
|
16114
|
-
"#FFCC00",
|
|
16115
|
-
"#FFCC33"
|
|
16116
|
-
];
|
|
16117
|
-
function useColors() {
|
|
16118
|
-
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
16119
|
-
return true;
|
|
16120
|
-
}
|
|
16121
|
-
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
16122
|
-
return false;
|
|
16123
|
-
}
|
|
16124
|
-
let m;
|
|
16125
|
-
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
16126
|
-
}
|
|
16127
|
-
function formatArgs(args) {
|
|
16128
|
-
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
16129
|
-
if (!this.useColors) {
|
|
16130
|
-
return;
|
|
16131
|
-
}
|
|
16132
|
-
const c = "color: " + this.color;
|
|
16133
|
-
args.splice(1, 0, c, "color: inherit");
|
|
16134
|
-
let index = 0;
|
|
16135
|
-
let lastC = 0;
|
|
16136
|
-
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
16137
|
-
if (match === "%%") {
|
|
16138
|
-
return;
|
|
16139
|
-
}
|
|
16140
|
-
index++;
|
|
16141
|
-
if (match === "%c") {
|
|
16142
|
-
lastC = index;
|
|
16143
|
-
}
|
|
16144
|
-
});
|
|
16145
|
-
args.splice(lastC, 0, c);
|
|
16146
|
-
}
|
|
16147
|
-
exports.log = console.debug || console.log || (() => {});
|
|
16148
|
-
function save(namespaces) {
|
|
16149
|
-
try {
|
|
16150
|
-
if (namespaces) {
|
|
16151
|
-
exports.storage.setItem("debug", namespaces);
|
|
16152
|
-
} else {
|
|
16153
|
-
exports.storage.removeItem("debug");
|
|
16154
|
-
}
|
|
16155
|
-
} catch (error) {}
|
|
16156
|
-
}
|
|
16157
|
-
function load() {
|
|
16158
|
-
let r;
|
|
16159
|
-
try {
|
|
16160
|
-
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
16161
|
-
} catch (error) {}
|
|
16162
|
-
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
16163
|
-
r = process.env.DEBUG;
|
|
16164
|
-
}
|
|
16165
|
-
return r;
|
|
16166
|
-
}
|
|
16167
|
-
function localstorage() {
|
|
16168
|
-
try {
|
|
16169
|
-
return localStorage;
|
|
16170
|
-
} catch (error) {}
|
|
16171
|
-
}
|
|
16172
|
-
module.exports = require_common()(exports);
|
|
16173
|
-
var { formatters } = module.exports;
|
|
16174
|
-
formatters.j = function(v) {
|
|
16175
|
-
try {
|
|
16176
|
-
return JSON.stringify(v);
|
|
16177
|
-
} catch (error) {
|
|
16178
|
-
return "[UnexpectedJSONParseError]: " + error.message;
|
|
16179
|
-
}
|
|
16180
|
-
};
|
|
16181
|
-
});
|
|
16182
|
-
|
|
16183
|
-
// ../../node_modules/has-flag/index.js
|
|
16184
|
-
var require_has_flag = __commonJS((exports, module) => {
|
|
16185
|
-
module.exports = (flag, argv = process.argv) => {
|
|
16186
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
16187
|
-
const position = argv.indexOf(prefix + flag);
|
|
16188
|
-
const terminatorPosition = argv.indexOf("--");
|
|
16189
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
16190
|
-
};
|
|
16191
|
-
});
|
|
16192
|
-
|
|
16193
|
-
// ../../node_modules/supports-color/index.js
|
|
16194
|
-
var require_supports_color = __commonJS((exports, module) => {
|
|
16195
|
-
var os = __require("os");
|
|
16196
|
-
var tty = __require("tty");
|
|
16197
|
-
var hasFlag = require_has_flag();
|
|
16198
|
-
var { env } = process;
|
|
16199
|
-
var flagForceColor;
|
|
16200
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
16201
|
-
flagForceColor = 0;
|
|
16202
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
16203
|
-
flagForceColor = 1;
|
|
16204
|
-
}
|
|
16205
|
-
function envForceColor() {
|
|
16206
|
-
if ("FORCE_COLOR" in env) {
|
|
16207
|
-
if (env.FORCE_COLOR === "true") {
|
|
16208
|
-
return 1;
|
|
16209
|
-
}
|
|
16210
|
-
if (env.FORCE_COLOR === "false") {
|
|
16211
|
-
return 0;
|
|
16212
|
-
}
|
|
16213
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
16214
|
-
}
|
|
16215
|
-
}
|
|
16216
|
-
function translateLevel(level) {
|
|
16217
|
-
if (level === 0) {
|
|
16218
|
-
return false;
|
|
16219
|
-
}
|
|
16220
|
-
return {
|
|
16221
|
-
level,
|
|
16222
|
-
hasBasic: true,
|
|
16223
|
-
has256: level >= 2,
|
|
16224
|
-
has16m: level >= 3
|
|
16225
|
-
};
|
|
15763
|
+
// src/context.ts
|
|
15764
|
+
var AS2_BASE_CONTEXT_URL = "https://www.w3.org/ns/activitystreams";
|
|
15765
|
+
var SOCKETHUB_BASE_CONTEXT_URL = "https://sockethub.org/ns/context/v1.jsonld";
|
|
15766
|
+
var PLATFORM_CONTEXT_PREFIX = "https://sockethub.org/ns/context/platform/";
|
|
15767
|
+
var ERROR_PLATFORM_ID = "error";
|
|
15768
|
+
var ERROR_PLATFORM_CONTEXT_URL = "https://sockethub.org/ns/context/platform/error/v1.jsonld";
|
|
15769
|
+
var INTERNAL_PLATFORM_ID = "sockethub:internal";
|
|
15770
|
+
var INTERNAL_PLATFORM_CONTEXT_URL = "https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld";
|
|
15771
|
+
var platformContextToPlatformId = new Map;
|
|
15772
|
+
var platformContextToSchemaId = new Map;
|
|
15773
|
+
var platformContextToCredentialsSchemaId = new Map;
|
|
15774
|
+
function buildCanonicalContext(platform) {
|
|
15775
|
+
const platformUrl = platform.startsWith("https://") ? platform : `${PLATFORM_CONTEXT_PREFIX}${platform}/v1.jsonld`;
|
|
15776
|
+
return [AS2_BASE_CONTEXT_URL, SOCKETHUB_BASE_CONTEXT_URL, platformUrl];
|
|
15777
|
+
}
|
|
15778
|
+
function platformIdFromContext(context) {
|
|
15779
|
+
if (!Array.isArray(context)) {
|
|
15780
|
+
return;
|
|
16226
15781
|
}
|
|
16227
|
-
|
|
16228
|
-
|
|
16229
|
-
|
|
16230
|
-
|
|
16231
|
-
|
|
16232
|
-
|
|
16233
|
-
if (forceColor === 0) {
|
|
16234
|
-
return 0;
|
|
16235
|
-
}
|
|
16236
|
-
if (sniffFlags) {
|
|
16237
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
16238
|
-
return 3;
|
|
16239
|
-
}
|
|
16240
|
-
if (hasFlag("color=256")) {
|
|
16241
|
-
return 2;
|
|
16242
|
-
}
|
|
16243
|
-
}
|
|
16244
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
16245
|
-
return 0;
|
|
16246
|
-
}
|
|
16247
|
-
const min = forceColor || 0;
|
|
16248
|
-
if (env.TERM === "dumb") {
|
|
16249
|
-
return min;
|
|
16250
|
-
}
|
|
16251
|
-
if (process.platform === "win32") {
|
|
16252
|
-
const osRelease = os.release().split(".");
|
|
16253
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
16254
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
16255
|
-
}
|
|
16256
|
-
return 1;
|
|
16257
|
-
}
|
|
16258
|
-
if ("CI" in env) {
|
|
16259
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
16260
|
-
return 1;
|
|
16261
|
-
}
|
|
16262
|
-
return min;
|
|
16263
|
-
}
|
|
16264
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
16265
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
16266
|
-
}
|
|
16267
|
-
if (env.COLORTERM === "truecolor") {
|
|
16268
|
-
return 3;
|
|
16269
|
-
}
|
|
16270
|
-
if ("TERM_PROGRAM" in env) {
|
|
16271
|
-
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
16272
|
-
switch (env.TERM_PROGRAM) {
|
|
16273
|
-
case "iTerm.app":
|
|
16274
|
-
return version >= 3 ? 3 : 2;
|
|
16275
|
-
case "Apple_Terminal":
|
|
16276
|
-
return 2;
|
|
15782
|
+
for (const entry of context) {
|
|
15783
|
+
if (typeof entry === "string" && entry.startsWith(PLATFORM_CONTEXT_PREFIX)) {
|
|
15784
|
+
const rest = entry.slice(PLATFORM_CONTEXT_PREFIX.length);
|
|
15785
|
+
const slashIdx = rest.indexOf("/");
|
|
15786
|
+
if (slashIdx > 0) {
|
|
15787
|
+
return rest.slice(0, slashIdx);
|
|
16277
15788
|
}
|
|
16278
15789
|
}
|
|
16279
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
16280
|
-
return 2;
|
|
16281
|
-
}
|
|
16282
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
16283
|
-
return 1;
|
|
16284
|
-
}
|
|
16285
|
-
if ("COLORTERM" in env) {
|
|
16286
|
-
return 1;
|
|
16287
|
-
}
|
|
16288
|
-
return min;
|
|
16289
|
-
}
|
|
16290
|
-
function getSupportLevel(stream, options = {}) {
|
|
16291
|
-
const level = supportsColor(stream, {
|
|
16292
|
-
streamIsTTY: stream && stream.isTTY,
|
|
16293
|
-
...options
|
|
16294
|
-
});
|
|
16295
|
-
return translateLevel(level);
|
|
16296
|
-
}
|
|
16297
|
-
module.exports = {
|
|
16298
|
-
supportsColor: getSupportLevel,
|
|
16299
|
-
stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
|
|
16300
|
-
stderr: getSupportLevel({ isTTY: tty.isatty(2) })
|
|
16301
|
-
};
|
|
16302
|
-
});
|
|
16303
|
-
|
|
16304
|
-
// ../../node_modules/debug/src/node.js
|
|
16305
|
-
var require_node = __commonJS((exports, module) => {
|
|
16306
|
-
var tty = __require("tty");
|
|
16307
|
-
var util = __require("util");
|
|
16308
|
-
exports.init = init;
|
|
16309
|
-
exports.log = log;
|
|
16310
|
-
exports.formatArgs = formatArgs;
|
|
16311
|
-
exports.save = save;
|
|
16312
|
-
exports.load = load;
|
|
16313
|
-
exports.useColors = useColors;
|
|
16314
|
-
exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
16315
|
-
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
16316
|
-
try {
|
|
16317
|
-
const supportsColor = require_supports_color();
|
|
16318
|
-
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
16319
|
-
exports.colors = [
|
|
16320
|
-
20,
|
|
16321
|
-
21,
|
|
16322
|
-
26,
|
|
16323
|
-
27,
|
|
16324
|
-
32,
|
|
16325
|
-
33,
|
|
16326
|
-
38,
|
|
16327
|
-
39,
|
|
16328
|
-
40,
|
|
16329
|
-
41,
|
|
16330
|
-
42,
|
|
16331
|
-
43,
|
|
16332
|
-
44,
|
|
16333
|
-
45,
|
|
16334
|
-
56,
|
|
16335
|
-
57,
|
|
16336
|
-
62,
|
|
16337
|
-
63,
|
|
16338
|
-
68,
|
|
16339
|
-
69,
|
|
16340
|
-
74,
|
|
16341
|
-
75,
|
|
16342
|
-
76,
|
|
16343
|
-
77,
|
|
16344
|
-
78,
|
|
16345
|
-
79,
|
|
16346
|
-
80,
|
|
16347
|
-
81,
|
|
16348
|
-
92,
|
|
16349
|
-
93,
|
|
16350
|
-
98,
|
|
16351
|
-
99,
|
|
16352
|
-
112,
|
|
16353
|
-
113,
|
|
16354
|
-
128,
|
|
16355
|
-
129,
|
|
16356
|
-
134,
|
|
16357
|
-
135,
|
|
16358
|
-
148,
|
|
16359
|
-
149,
|
|
16360
|
-
160,
|
|
16361
|
-
161,
|
|
16362
|
-
162,
|
|
16363
|
-
163,
|
|
16364
|
-
164,
|
|
16365
|
-
165,
|
|
16366
|
-
166,
|
|
16367
|
-
167,
|
|
16368
|
-
168,
|
|
16369
|
-
169,
|
|
16370
|
-
170,
|
|
16371
|
-
171,
|
|
16372
|
-
172,
|
|
16373
|
-
173,
|
|
16374
|
-
178,
|
|
16375
|
-
179,
|
|
16376
|
-
184,
|
|
16377
|
-
185,
|
|
16378
|
-
196,
|
|
16379
|
-
197,
|
|
16380
|
-
198,
|
|
16381
|
-
199,
|
|
16382
|
-
200,
|
|
16383
|
-
201,
|
|
16384
|
-
202,
|
|
16385
|
-
203,
|
|
16386
|
-
204,
|
|
16387
|
-
205,
|
|
16388
|
-
206,
|
|
16389
|
-
207,
|
|
16390
|
-
208,
|
|
16391
|
-
209,
|
|
16392
|
-
214,
|
|
16393
|
-
215,
|
|
16394
|
-
220,
|
|
16395
|
-
221
|
|
16396
|
-
];
|
|
16397
|
-
}
|
|
16398
|
-
} catch (error) {}
|
|
16399
|
-
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
16400
|
-
return /^debug_/i.test(key);
|
|
16401
|
-
}).reduce((obj, key) => {
|
|
16402
|
-
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
|
|
16403
|
-
return k.toUpperCase();
|
|
16404
|
-
});
|
|
16405
|
-
let val = process.env[key];
|
|
16406
|
-
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
16407
|
-
val = true;
|
|
16408
|
-
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
16409
|
-
val = false;
|
|
16410
|
-
} else if (val === "null") {
|
|
16411
|
-
val = null;
|
|
16412
|
-
} else {
|
|
16413
|
-
val = Number(val);
|
|
16414
|
-
}
|
|
16415
|
-
obj[prop] = val;
|
|
16416
|
-
return obj;
|
|
16417
|
-
}, {});
|
|
16418
|
-
function useColors() {
|
|
16419
|
-
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
16420
|
-
}
|
|
16421
|
-
function formatArgs(args) {
|
|
16422
|
-
const { namespace: name, useColors: useColors2 } = this;
|
|
16423
|
-
if (useColors2) {
|
|
16424
|
-
const c = this.color;
|
|
16425
|
-
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
16426
|
-
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
16427
|
-
args[0] = prefix + args[0].split(`
|
|
16428
|
-
`).join(`
|
|
16429
|
-
` + prefix);
|
|
16430
|
-
args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
|
|
16431
|
-
} else {
|
|
16432
|
-
args[0] = getDate() + name + " " + args[0];
|
|
16433
|
-
}
|
|
16434
|
-
}
|
|
16435
|
-
function getDate() {
|
|
16436
|
-
if (exports.inspectOpts.hideDate) {
|
|
16437
|
-
return "";
|
|
16438
|
-
}
|
|
16439
|
-
return new Date().toISOString() + " ";
|
|
16440
|
-
}
|
|
16441
|
-
function log(...args) {
|
|
16442
|
-
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + `
|
|
16443
|
-
`);
|
|
16444
|
-
}
|
|
16445
|
-
function save(namespaces) {
|
|
16446
|
-
if (namespaces) {
|
|
16447
|
-
process.env.DEBUG = namespaces;
|
|
16448
|
-
} else {
|
|
16449
|
-
delete process.env.DEBUG;
|
|
16450
|
-
}
|
|
16451
15790
|
}
|
|
16452
|
-
|
|
16453
|
-
|
|
16454
|
-
|
|
16455
|
-
|
|
16456
|
-
|
|
16457
|
-
const keys = Object.keys(exports.inspectOpts);
|
|
16458
|
-
for (let i = 0;i < keys.length; i++) {
|
|
16459
|
-
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
16460
|
-
}
|
|
15791
|
+
return;
|
|
15792
|
+
}
|
|
15793
|
+
function normalizeContextArray(value) {
|
|
15794
|
+
if (!Array.isArray(value)) {
|
|
15795
|
+
return [];
|
|
16461
15796
|
}
|
|
16462
|
-
|
|
16463
|
-
|
|
16464
|
-
|
|
16465
|
-
|
|
16466
|
-
|
|
16467
|
-
|
|
16468
|
-
|
|
16469
|
-
|
|
16470
|
-
|
|
16471
|
-
|
|
16472
|
-
|
|
16473
|
-
|
|
16474
|
-
|
|
16475
|
-
|
|
16476
|
-
|
|
16477
|
-
if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
|
|
16478
|
-
module.exports = require_browser();
|
|
16479
|
-
} else {
|
|
16480
|
-
module.exports = require_node();
|
|
15797
|
+
return value.filter((entry) => typeof entry === "string");
|
|
15798
|
+
}
|
|
15799
|
+
function getContextArray(msg) {
|
|
15800
|
+
return normalizeContextArray(msg["@context"]);
|
|
15801
|
+
}
|
|
15802
|
+
function registerPlatformContext(platformId, platformContextUrl, schemaId, credentialsSchemaId) {
|
|
15803
|
+
platformContextToPlatformId.set(platformContextUrl, platformId);
|
|
15804
|
+
platformContextToSchemaId.set(platformContextUrl, schemaId);
|
|
15805
|
+
platformContextToCredentialsSchemaId.set(platformContextUrl, credentialsSchemaId);
|
|
15806
|
+
}
|
|
15807
|
+
function resolvePlatformContextUrl(msg) {
|
|
15808
|
+
const contexts = getContextArray(msg);
|
|
15809
|
+
const matches = contexts.filter((contextUrl) => platformContextToPlatformId.has(contextUrl));
|
|
15810
|
+
if (matches.length !== 1) {
|
|
15811
|
+
return null;
|
|
16481
15812
|
}
|
|
16482
|
-
|
|
15813
|
+
return matches[0];
|
|
15814
|
+
}
|
|
15815
|
+
function getPlatformIdByContextUrl(platformContextUrl) {
|
|
15816
|
+
return platformContextToPlatformId.get(platformContextUrl);
|
|
15817
|
+
}
|
|
15818
|
+
function getSchemaIdByContextUrl(platformContextUrl) {
|
|
15819
|
+
return platformContextToSchemaId.get(platformContextUrl);
|
|
15820
|
+
}
|
|
15821
|
+
function getCredentialsSchemaIdByContextUrl(platformContextUrl) {
|
|
15822
|
+
return platformContextToCredentialsSchemaId.get(platformContextUrl);
|
|
15823
|
+
}
|
|
16483
15824
|
|
|
16484
15825
|
// src/helpers/objects.ts
|
|
16485
|
-
var validObjectRefs = [];
|
|
16486
|
-
var validObjectDefs = {};
|
|
16487
15826
|
var ObjectTypesSchema = {
|
|
16488
|
-
credentials: {
|
|
16489
|
-
required: ["type"],
|
|
16490
|
-
additionalProperties: true,
|
|
16491
|
-
properties: {
|
|
16492
|
-
type: {
|
|
16493
|
-
enum: ["credentials"]
|
|
16494
|
-
}
|
|
16495
|
-
}
|
|
16496
|
-
},
|
|
16497
15827
|
feed: {
|
|
16498
15828
|
required: ["id", "type"],
|
|
16499
15829
|
additionalProperties: true,
|
|
@@ -16519,37 +15849,22 @@ var ObjectTypesSchema = {
|
|
|
16519
15849
|
}
|
|
16520
15850
|
}
|
|
16521
15851
|
},
|
|
16522
|
-
|
|
16523
|
-
required: ["
|
|
15852
|
+
person: {
|
|
15853
|
+
required: ["id", "type"],
|
|
16524
15854
|
additionalProperties: true,
|
|
16525
15855
|
properties: {
|
|
16526
|
-
type: {
|
|
16527
|
-
enum: ["message"]
|
|
16528
|
-
},
|
|
16529
15856
|
id: {
|
|
16530
15857
|
type: "string"
|
|
16531
15858
|
},
|
|
16532
|
-
name: {
|
|
16533
|
-
type: "string"
|
|
16534
|
-
},
|
|
16535
|
-
content: {
|
|
16536
|
-
type: "string"
|
|
16537
|
-
}
|
|
16538
|
-
}
|
|
16539
|
-
},
|
|
16540
|
-
me: {
|
|
16541
|
-
required: ["type", "content"],
|
|
16542
|
-
additionalProperties: true,
|
|
16543
|
-
properties: {
|
|
16544
15859
|
type: {
|
|
16545
|
-
enum: ["
|
|
15860
|
+
enum: ["person"]
|
|
16546
15861
|
},
|
|
16547
|
-
|
|
15862
|
+
name: {
|
|
16548
15863
|
type: "string"
|
|
16549
15864
|
}
|
|
16550
15865
|
}
|
|
16551
15866
|
},
|
|
16552
|
-
|
|
15867
|
+
room: {
|
|
16553
15868
|
required: ["id", "type"],
|
|
16554
15869
|
additionalProperties: true,
|
|
16555
15870
|
properties: {
|
|
@@ -16557,14 +15872,14 @@ var ObjectTypesSchema = {
|
|
|
16557
15872
|
type: "string"
|
|
16558
15873
|
},
|
|
16559
15874
|
type: {
|
|
16560
|
-
enum: ["
|
|
15875
|
+
enum: ["room"]
|
|
16561
15876
|
},
|
|
16562
15877
|
name: {
|
|
16563
15878
|
type: "string"
|
|
16564
15879
|
}
|
|
16565
15880
|
}
|
|
16566
15881
|
},
|
|
16567
|
-
|
|
15882
|
+
service: {
|
|
16568
15883
|
required: ["id", "type"],
|
|
16569
15884
|
additionalProperties: true,
|
|
16570
15885
|
properties: {
|
|
@@ -16572,14 +15887,14 @@ var ObjectTypesSchema = {
|
|
|
16572
15887
|
type: "string"
|
|
16573
15888
|
},
|
|
16574
15889
|
type: {
|
|
16575
|
-
enum: ["
|
|
15890
|
+
enum: ["service"]
|
|
16576
15891
|
},
|
|
16577
15892
|
name: {
|
|
16578
15893
|
type: "string"
|
|
16579
15894
|
}
|
|
16580
15895
|
}
|
|
16581
15896
|
},
|
|
16582
|
-
|
|
15897
|
+
platform: {
|
|
16583
15898
|
required: ["id", "type"],
|
|
16584
15899
|
additionalProperties: true,
|
|
16585
15900
|
properties: {
|
|
@@ -16587,7 +15902,7 @@ var ObjectTypesSchema = {
|
|
|
16587
15902
|
type: "string"
|
|
16588
15903
|
},
|
|
16589
15904
|
type: {
|
|
16590
|
-
enum: ["
|
|
15905
|
+
enum: ["platform"]
|
|
16591
15906
|
},
|
|
16592
15907
|
name: {
|
|
16593
15908
|
type: "string"
|
|
@@ -16610,116 +15925,99 @@ var ObjectTypesSchema = {
|
|
|
16610
15925
|
}
|
|
16611
15926
|
}
|
|
16612
15927
|
},
|
|
16613
|
-
|
|
15928
|
+
address: {
|
|
16614
15929
|
required: ["type"],
|
|
16615
15930
|
additionalProperties: false,
|
|
16616
15931
|
properties: {
|
|
16617
15932
|
type: {
|
|
16618
|
-
enum: ["
|
|
16619
|
-
},
|
|
16620
|
-
members: {
|
|
16621
|
-
type: "array",
|
|
16622
|
-
items: {
|
|
16623
|
-
type: "string"
|
|
16624
|
-
}
|
|
15933
|
+
enum: ["address"]
|
|
16625
15934
|
}
|
|
16626
15935
|
}
|
|
16627
15936
|
},
|
|
16628
|
-
|
|
16629
|
-
required: ["type"],
|
|
16630
|
-
additionalProperties:
|
|
15937
|
+
calendar: {
|
|
15938
|
+
required: ["id", "type"],
|
|
15939
|
+
additionalProperties: true,
|
|
16631
15940
|
properties: {
|
|
16632
|
-
|
|
16633
|
-
|
|
16634
|
-
|
|
16635
|
-
presence: {
|
|
16636
|
-
enum: ["away", "chat", "dnd", "xa", "offline", "online"]
|
|
16637
|
-
},
|
|
16638
|
-
role: {
|
|
16639
|
-
enum: ["owner", "member", "participant", "admin"]
|
|
15941
|
+
id: {
|
|
15942
|
+
type: "string",
|
|
15943
|
+
format: "iri"
|
|
16640
15944
|
},
|
|
16641
|
-
content: {
|
|
16642
|
-
type: "string"
|
|
16643
|
-
}
|
|
16644
|
-
}
|
|
16645
|
-
},
|
|
16646
|
-
relationship: {
|
|
16647
|
-
required: ["type", "relationship"],
|
|
16648
|
-
additionalProperties: false,
|
|
16649
|
-
properties: {
|
|
16650
15945
|
type: {
|
|
16651
|
-
enum: ["
|
|
15946
|
+
enum: ["calendar"]
|
|
16652
15947
|
},
|
|
16653
|
-
|
|
16654
|
-
|
|
16655
|
-
},
|
|
16656
|
-
subject: {
|
|
16657
|
-
type: "object",
|
|
16658
|
-
oneOf: [{ $ref: "#/definitions/type/presence" }]
|
|
15948
|
+
name: {
|
|
15949
|
+
type: "string"
|
|
16659
15950
|
},
|
|
16660
|
-
|
|
16661
|
-
type: "
|
|
16662
|
-
|
|
15951
|
+
components: {
|
|
15952
|
+
type: "array",
|
|
15953
|
+
items: {
|
|
15954
|
+
enum: ["event", "task"]
|
|
15955
|
+
}
|
|
16663
15956
|
}
|
|
16664
15957
|
}
|
|
16665
15958
|
},
|
|
16666
|
-
|
|
16667
|
-
required: ["type"],
|
|
15959
|
+
addressBook: {
|
|
15960
|
+
required: ["id", "type"],
|
|
16668
15961
|
additionalProperties: false,
|
|
16669
15962
|
properties: {
|
|
16670
|
-
|
|
16671
|
-
|
|
15963
|
+
id: {
|
|
15964
|
+
type: "string",
|
|
15965
|
+
format: "iri"
|
|
16672
15966
|
},
|
|
16673
|
-
content: {
|
|
16674
|
-
type: "string"
|
|
16675
|
-
}
|
|
16676
|
-
}
|
|
16677
|
-
},
|
|
16678
|
-
address: {
|
|
16679
|
-
required: ["type"],
|
|
16680
|
-
additionalProperties: false,
|
|
16681
|
-
properties: {
|
|
16682
15967
|
type: {
|
|
16683
|
-
enum: ["
|
|
15968
|
+
enum: ["addressBook"]
|
|
16684
15969
|
}
|
|
16685
15970
|
}
|
|
16686
15971
|
}
|
|
16687
15972
|
};
|
|
15973
|
+
var InternalObjectTypesList = ["platform", "heartbeat"];
|
|
16688
15974
|
var ObjectTypesList = Object.keys(ObjectTypesSchema);
|
|
16689
|
-
|
|
16690
|
-
|
|
16691
|
-
|
|
16692
|
-
|
|
16693
|
-
|
|
16694
|
-
|
|
16695
|
-
|
|
15975
|
+
var ActorTypesList = [
|
|
15976
|
+
"person",
|
|
15977
|
+
"room",
|
|
15978
|
+
"service",
|
|
15979
|
+
"feed",
|
|
15980
|
+
"website",
|
|
15981
|
+
"platform"
|
|
15982
|
+
];
|
|
15983
|
+
var TargetTypesList = [
|
|
15984
|
+
"person",
|
|
15985
|
+
"room",
|
|
15986
|
+
"service",
|
|
15987
|
+
"feed",
|
|
15988
|
+
"website",
|
|
15989
|
+
"platform",
|
|
15990
|
+
"address",
|
|
15991
|
+
"calendar",
|
|
15992
|
+
"addressBook"
|
|
15993
|
+
];
|
|
15994
|
+
var validActorRefs = ActorTypesList.map((type) => ({
|
|
15995
|
+
$ref: `#/definitions/type/${type}`
|
|
15996
|
+
}));
|
|
15997
|
+
var validTargetRefs = TargetTypesList.map((type) => ({
|
|
15998
|
+
$ref: `#/definitions/type/${type}`
|
|
15999
|
+
}));
|
|
16696
16000
|
|
|
16697
|
-
// src/schemas/activity-
|
|
16698
|
-
var
|
|
16699
|
-
|
|
16700
|
-
|
|
16701
|
-
|
|
16702
|
-
|
|
16703
|
-
|
|
16704
|
-
object: {
|
|
16705
|
-
type: "object",
|
|
16706
|
-
oneOf: validObjectRefs
|
|
16707
|
-
}
|
|
16001
|
+
// src/schemas/activity-stream.ts
|
|
16002
|
+
var contextSchema = {
|
|
16003
|
+
type: "array",
|
|
16004
|
+
minItems: 3,
|
|
16005
|
+
maxItems: 3,
|
|
16006
|
+
items: {
|
|
16007
|
+
type: "string"
|
|
16708
16008
|
},
|
|
16709
|
-
|
|
16710
|
-
|
|
16711
|
-
|
|
16712
|
-
|
|
16713
|
-
|
|
16714
|
-
|
|
16715
|
-
|
|
16716
|
-
|
|
16717
|
-
|
|
16718
|
-
|
|
16719
|
-
|
|
16720
|
-
|
|
16721
|
-
var contextSchema = {
|
|
16722
|
-
type: "string"
|
|
16009
|
+
allOf: [
|
|
16010
|
+
{
|
|
16011
|
+
contains: {
|
|
16012
|
+
const: AS2_BASE_CONTEXT_URL
|
|
16013
|
+
}
|
|
16014
|
+
},
|
|
16015
|
+
{
|
|
16016
|
+
contains: {
|
|
16017
|
+
const: SOCKETHUB_BASE_CONTEXT_URL
|
|
16018
|
+
}
|
|
16019
|
+
}
|
|
16020
|
+
]
|
|
16723
16021
|
};
|
|
16724
16022
|
var typeSchema = {
|
|
16725
16023
|
type: "string"
|
|
@@ -16728,13 +16026,14 @@ var ActivityStreamSchema = {
|
|
|
16728
16026
|
$id: "https://sockethub.org/schemas/v/activity-stream.json",
|
|
16729
16027
|
description: "Schema for Sockethub Activity Streams",
|
|
16730
16028
|
type: "object",
|
|
16731
|
-
required: ["context", "type", "actor"],
|
|
16029
|
+
required: ["@context", "type", "actor"],
|
|
16030
|
+
additionalProperties: false,
|
|
16732
16031
|
properties: {
|
|
16032
|
+
"@context": contextSchema,
|
|
16733
16033
|
id: {
|
|
16734
16034
|
type: "string"
|
|
16735
16035
|
},
|
|
16736
16036
|
type: typeSchema,
|
|
16737
|
-
context: contextSchema,
|
|
16738
16037
|
actor: {
|
|
16739
16038
|
type: "object",
|
|
16740
16039
|
oneOf: validActorRefs
|
|
@@ -16744,8 +16043,7 @@ var ActivityStreamSchema = {
|
|
|
16744
16043
|
oneOf: validTargetRefs
|
|
16745
16044
|
},
|
|
16746
16045
|
object: {
|
|
16747
|
-
type: "object"
|
|
16748
|
-
oneOf: validObjectRefs2
|
|
16046
|
+
type: "object"
|
|
16749
16047
|
},
|
|
16750
16048
|
published: {
|
|
16751
16049
|
type: "string",
|
|
@@ -16761,9 +16059,33 @@ var ActivityStreamSchema = {
|
|
|
16761
16059
|
var PlatformSchema = {
|
|
16762
16060
|
$id: "https://sockethub.org/schemas/v/platform.json",
|
|
16763
16061
|
type: "object",
|
|
16764
|
-
required: [
|
|
16062
|
+
required: [
|
|
16063
|
+
"name",
|
|
16064
|
+
"version",
|
|
16065
|
+
"messages",
|
|
16066
|
+
"contextUrl",
|
|
16067
|
+
"contextVersion",
|
|
16068
|
+
"schemaVersion"
|
|
16069
|
+
],
|
|
16765
16070
|
additionalProperties: false,
|
|
16766
16071
|
properties: {
|
|
16072
|
+
contextUrl: {
|
|
16073
|
+
title: "contextUrl",
|
|
16074
|
+
type: "string",
|
|
16075
|
+
format: "uri"
|
|
16076
|
+
},
|
|
16077
|
+
contextVersion: {
|
|
16078
|
+
title: "contextVersion",
|
|
16079
|
+
type: "string"
|
|
16080
|
+
},
|
|
16081
|
+
schemaVersion: {
|
|
16082
|
+
title: "schemaVersion",
|
|
16083
|
+
type: "string"
|
|
16084
|
+
},
|
|
16085
|
+
messageConstraints: {
|
|
16086
|
+
title: "messageConstraints",
|
|
16087
|
+
type: "object"
|
|
16088
|
+
},
|
|
16767
16089
|
credentials: {
|
|
16768
16090
|
title: "credentials",
|
|
16769
16091
|
type: "object"
|
|
@@ -16772,6 +16094,10 @@ var PlatformSchema = {
|
|
|
16772
16094
|
title: "messages",
|
|
16773
16095
|
type: "object"
|
|
16774
16096
|
},
|
|
16097
|
+
responses: {
|
|
16098
|
+
title: "responses",
|
|
16099
|
+
type: "object"
|
|
16100
|
+
},
|
|
16775
16101
|
name: {
|
|
16776
16102
|
title: "name",
|
|
16777
16103
|
type: "string"
|
|
@@ -16782,12 +16108,663 @@ var PlatformSchema = {
|
|
|
16782
16108
|
}
|
|
16783
16109
|
}
|
|
16784
16110
|
};
|
|
16111
|
+
// package.json
|
|
16112
|
+
var package_default = {
|
|
16113
|
+
name: "@sockethub/schemas",
|
|
16114
|
+
description: "JSON schema files for validating Sockethub Activity Streams",
|
|
16115
|
+
version: "3.0.0-beta.1",
|
|
16116
|
+
type: "module",
|
|
16117
|
+
private: false,
|
|
16118
|
+
author: "Nick Jennings <nick@silverbucket.net>",
|
|
16119
|
+
license: "MIT",
|
|
16120
|
+
publishConfig: {
|
|
16121
|
+
access: "public"
|
|
16122
|
+
},
|
|
16123
|
+
main: "dist/index.js",
|
|
16124
|
+
exports: {
|
|
16125
|
+
".": {
|
|
16126
|
+
types: "./dist/index.d.ts",
|
|
16127
|
+
import: "./dist/index.js",
|
|
16128
|
+
default: "./dist/index.js"
|
|
16129
|
+
},
|
|
16130
|
+
"./context": {
|
|
16131
|
+
types: "./dist/context.d.ts",
|
|
16132
|
+
import: "./dist/context.js",
|
|
16133
|
+
default: "./dist/context.js"
|
|
16134
|
+
},
|
|
16135
|
+
"./object-types": {
|
|
16136
|
+
types: "./dist/object-types.d.ts",
|
|
16137
|
+
import: "./dist/object-types.js",
|
|
16138
|
+
default: "./dist/object-types.js"
|
|
16139
|
+
},
|
|
16140
|
+
"./service-descriptor": {
|
|
16141
|
+
types: "./dist/service-descriptor.d.ts",
|
|
16142
|
+
bun: "./src/service-descriptor.ts",
|
|
16143
|
+
import: "./dist/service-descriptor.js",
|
|
16144
|
+
default: "./dist/service-descriptor.js"
|
|
16145
|
+
},
|
|
16146
|
+
"./schemas/json/sockethub-config.json": {
|
|
16147
|
+
default: "./dist/schemas/json/sockethub-config.json"
|
|
16148
|
+
},
|
|
16149
|
+
"./schemas/json/service-descriptor.json": {
|
|
16150
|
+
default: "./dist/schemas/json/service-descriptor.json"
|
|
16151
|
+
}
|
|
16152
|
+
},
|
|
16153
|
+
files: [
|
|
16154
|
+
"dist/"
|
|
16155
|
+
],
|
|
16156
|
+
engines: {
|
|
16157
|
+
node: ">=20"
|
|
16158
|
+
},
|
|
16159
|
+
keywords: [
|
|
16160
|
+
"sockethub",
|
|
16161
|
+
"sockethub schema",
|
|
16162
|
+
"activity streams",
|
|
16163
|
+
"activity objects",
|
|
16164
|
+
"sockethub platforms"
|
|
16165
|
+
],
|
|
16166
|
+
repository: {
|
|
16167
|
+
type: "git",
|
|
16168
|
+
url: "git+https://github.com/sockethub/sockethub.git",
|
|
16169
|
+
directory: "packages/schemas"
|
|
16170
|
+
},
|
|
16171
|
+
homepage: "https://github.com/sockethub/sockethub/tree/master/packages/schemas",
|
|
16172
|
+
devDependencies: {
|
|
16173
|
+
"@types/bun": "latest"
|
|
16174
|
+
},
|
|
16175
|
+
scripts: {
|
|
16176
|
+
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/service-descriptor.ts --outdir dist --target browser --format esm --sourcemap=external",
|
|
16177
|
+
clean: "rm -rf dist",
|
|
16178
|
+
"clean:deps": "rm -rf node_modules"
|
|
16179
|
+
},
|
|
16180
|
+
dependencies: {
|
|
16181
|
+
ajv: "^8.17.1",
|
|
16182
|
+
"ajv-formats": "^2.1.1",
|
|
16183
|
+
"ajv-formats-draft2019": "^1.6.1"
|
|
16184
|
+
},
|
|
16185
|
+
gitHead: "06c9062f1cb5f0c0599fd979e6e91da79f08eda0",
|
|
16186
|
+
types: "./dist/index.d.ts"
|
|
16187
|
+
};
|
|
16785
16188
|
|
|
16786
|
-
// src/
|
|
16189
|
+
// src/schema-id.ts
|
|
16190
|
+
function versionedSchemaId(id, version) {
|
|
16191
|
+
return id.replace("/v/", `/${version}/`);
|
|
16192
|
+
}
|
|
16193
|
+
|
|
16194
|
+
// src/schemas/sockethub-config.ts
|
|
16195
|
+
var SockethubConfigSchema = {
|
|
16196
|
+
$id: "https://sockethub.org/schemas/v/sockethub-config.json",
|
|
16197
|
+
description: "Sockethub Config Schema",
|
|
16198
|
+
type: "object",
|
|
16199
|
+
required: ["platforms"],
|
|
16200
|
+
additionalProperties: false,
|
|
16201
|
+
properties: {
|
|
16202
|
+
$schema: {
|
|
16203
|
+
type: "string"
|
|
16204
|
+
},
|
|
16205
|
+
examples: {
|
|
16206
|
+
type: "boolean",
|
|
16207
|
+
default: true,
|
|
16208
|
+
description: "Enable the examples pages served at [host]:[port]/examples"
|
|
16209
|
+
},
|
|
16210
|
+
about: {
|
|
16211
|
+
type: "object",
|
|
16212
|
+
additionalProperties: false,
|
|
16213
|
+
description: "Details about this deployment shown on the root info page",
|
|
16214
|
+
properties: {
|
|
16215
|
+
name: {
|
|
16216
|
+
type: "string",
|
|
16217
|
+
default: "",
|
|
16218
|
+
description: "Display name of this Sockethub instance"
|
|
16219
|
+
},
|
|
16220
|
+
description: {
|
|
16221
|
+
type: "string",
|
|
16222
|
+
default: "",
|
|
16223
|
+
description: "Short description of who this instance is for"
|
|
16224
|
+
},
|
|
16225
|
+
contact: {
|
|
16226
|
+
type: "string",
|
|
16227
|
+
default: "",
|
|
16228
|
+
description: "Operator contact (email address or URL)"
|
|
16229
|
+
},
|
|
16230
|
+
links: {
|
|
16231
|
+
type: "array",
|
|
16232
|
+
default: [],
|
|
16233
|
+
description: "Extra links (privacy policy, terms, website) shown " + "on the info page",
|
|
16234
|
+
items: {
|
|
16235
|
+
type: "object",
|
|
16236
|
+
additionalProperties: false,
|
|
16237
|
+
required: ["label", "url"],
|
|
16238
|
+
properties: {
|
|
16239
|
+
label: { type: "string", minLength: 1 },
|
|
16240
|
+
url: {
|
|
16241
|
+
type: "string",
|
|
16242
|
+
pattern: "^https?://"
|
|
16243
|
+
}
|
|
16244
|
+
}
|
|
16245
|
+
}
|
|
16246
|
+
},
|
|
16247
|
+
showVersion: {
|
|
16248
|
+
type: "boolean",
|
|
16249
|
+
default: false,
|
|
16250
|
+
description: "Show the exact server version on the info page " + "(off by default to limit fingerprinting)"
|
|
16251
|
+
},
|
|
16252
|
+
showUptime: {
|
|
16253
|
+
type: "boolean",
|
|
16254
|
+
default: false,
|
|
16255
|
+
description: "Show the process uptime on the info page (off by " + "default: it reveals when the server last restarted)"
|
|
16256
|
+
}
|
|
16257
|
+
}
|
|
16258
|
+
},
|
|
16259
|
+
logging: {
|
|
16260
|
+
type: "object",
|
|
16261
|
+
additionalProperties: false,
|
|
16262
|
+
properties: {
|
|
16263
|
+
level: {
|
|
16264
|
+
type: "string",
|
|
16265
|
+
enum: ["error", "warn", "info", "debug"],
|
|
16266
|
+
default: "info"
|
|
16267
|
+
},
|
|
16268
|
+
fileLevel: {
|
|
16269
|
+
type: "string",
|
|
16270
|
+
enum: ["error", "warn", "info", "debug"],
|
|
16271
|
+
default: "debug"
|
|
16272
|
+
},
|
|
16273
|
+
file: {
|
|
16274
|
+
type: "string",
|
|
16275
|
+
default: "sockethub.log"
|
|
16276
|
+
}
|
|
16277
|
+
}
|
|
16278
|
+
},
|
|
16279
|
+
platforms: {
|
|
16280
|
+
type: "array",
|
|
16281
|
+
items: {
|
|
16282
|
+
type: "string"
|
|
16283
|
+
},
|
|
16284
|
+
description: "Platform packages to load",
|
|
16285
|
+
default: [
|
|
16286
|
+
"@sockethub/platform-carddav",
|
|
16287
|
+
"@sockethub/platform-caldav",
|
|
16288
|
+
"@sockethub/platform-dummy",
|
|
16289
|
+
"@sockethub/platform-feeds",
|
|
16290
|
+
"@sockethub/platform-irc",
|
|
16291
|
+
"@sockethub/platform-metadata",
|
|
16292
|
+
"@sockethub/platform-xmpp"
|
|
16293
|
+
]
|
|
16294
|
+
},
|
|
16295
|
+
packageConfig: {
|
|
16296
|
+
type: "object",
|
|
16297
|
+
default: {},
|
|
16298
|
+
description: "Per-platform config keyed by package name, validated against " + "each platform's config schema and forwarded to its child process",
|
|
16299
|
+
properties: {
|
|
16300
|
+
"@sockethub/platform-carddav": {
|
|
16301
|
+
type: "object",
|
|
16302
|
+
additionalProperties: false,
|
|
16303
|
+
properties: {
|
|
16304
|
+
connectTimeoutMs: { type: "integer", minimum: 1 },
|
|
16305
|
+
allowPrivateAddresses: { type: "boolean" },
|
|
16306
|
+
allowInsecureHttp: { type: "boolean" },
|
|
16307
|
+
concurrency: { type: "integer", minimum: 1 }
|
|
16308
|
+
}
|
|
16309
|
+
},
|
|
16310
|
+
"@sockethub/platform-caldav": {
|
|
16311
|
+
type: "object",
|
|
16312
|
+
additionalProperties: false,
|
|
16313
|
+
properties: {
|
|
16314
|
+
connectTimeoutMs: { type: "integer", minimum: 1 },
|
|
16315
|
+
allowPrivateAddresses: { type: "boolean" },
|
|
16316
|
+
allowInsecureHttp: { type: "boolean" },
|
|
16317
|
+
concurrency: { type: "integer", minimum: 1 }
|
|
16318
|
+
}
|
|
16319
|
+
},
|
|
16320
|
+
"@sockethub/platform-dummy": {
|
|
16321
|
+
type: "object",
|
|
16322
|
+
additionalProperties: false,
|
|
16323
|
+
properties: {
|
|
16324
|
+
greeting: { type: "string", default: "Hello" }
|
|
16325
|
+
}
|
|
16326
|
+
},
|
|
16327
|
+
"@sockethub/platform-feeds": {
|
|
16328
|
+
type: "object",
|
|
16329
|
+
additionalProperties: false,
|
|
16330
|
+
properties: {
|
|
16331
|
+
connectTimeoutMs: { type: "number" },
|
|
16332
|
+
allowPrivateAddresses: { type: "boolean" },
|
|
16333
|
+
concurrency: { type: "integer", minimum: 1 }
|
|
16334
|
+
}
|
|
16335
|
+
},
|
|
16336
|
+
"@sockethub/platform-irc": {
|
|
16337
|
+
type: "object",
|
|
16338
|
+
additionalProperties: false,
|
|
16339
|
+
properties: {
|
|
16340
|
+
connectTimeoutMs: { type: "number" }
|
|
16341
|
+
}
|
|
16342
|
+
},
|
|
16343
|
+
"@sockethub/platform-xmpp": {
|
|
16344
|
+
type: "object",
|
|
16345
|
+
additionalProperties: false,
|
|
16346
|
+
properties: {
|
|
16347
|
+
connectTimeoutMs: { type: "number" },
|
|
16348
|
+
allowPrivateAddresses: { type: "boolean" }
|
|
16349
|
+
}
|
|
16350
|
+
},
|
|
16351
|
+
"@sockethub/platform-metadata": {
|
|
16352
|
+
type: "object",
|
|
16353
|
+
additionalProperties: false,
|
|
16354
|
+
properties: {
|
|
16355
|
+
allowPrivateAddresses: { type: "boolean" },
|
|
16356
|
+
concurrency: { type: "integer", minimum: 1 }
|
|
16357
|
+
}
|
|
16358
|
+
}
|
|
16359
|
+
}
|
|
16360
|
+
},
|
|
16361
|
+
credentials: {
|
|
16362
|
+
type: "object",
|
|
16363
|
+
additionalProperties: false,
|
|
16364
|
+
properties: {
|
|
16365
|
+
ttlMs: {
|
|
16366
|
+
type: "number",
|
|
16367
|
+
minimum: 0,
|
|
16368
|
+
default: 604800000,
|
|
16369
|
+
description: "Sliding TTL in milliseconds for per-session encrypted " + "credential keys in Redis, refreshed on every save and " + "read. A backstop against keys orphaned by crashes; " + "sessions normally delete their key on disconnect. " + "Size generously — idle sessions do not refresh it. " + "0 disables expiry."
|
|
16370
|
+
}
|
|
16371
|
+
}
|
|
16372
|
+
},
|
|
16373
|
+
credentialCheck: {
|
|
16374
|
+
type: "object",
|
|
16375
|
+
additionalProperties: false,
|
|
16376
|
+
properties: {
|
|
16377
|
+
reconnectIpSource: {
|
|
16378
|
+
type: "string",
|
|
16379
|
+
enum: ["socket", "proxy"],
|
|
16380
|
+
default: "socket"
|
|
16381
|
+
},
|
|
16382
|
+
proxyHeader: {
|
|
16383
|
+
type: "string",
|
|
16384
|
+
default: "x-forwarded-for"
|
|
16385
|
+
}
|
|
16386
|
+
}
|
|
16387
|
+
},
|
|
16388
|
+
public: {
|
|
16389
|
+
type: "object",
|
|
16390
|
+
additionalProperties: false,
|
|
16391
|
+
properties: {
|
|
16392
|
+
protocol: {
|
|
16393
|
+
type: "string",
|
|
16394
|
+
default: "http"
|
|
16395
|
+
},
|
|
16396
|
+
host: {
|
|
16397
|
+
type: "string",
|
|
16398
|
+
default: "localhost"
|
|
16399
|
+
},
|
|
16400
|
+
port: {
|
|
16401
|
+
type: "number",
|
|
16402
|
+
default: 10550
|
|
16403
|
+
},
|
|
16404
|
+
path: {
|
|
16405
|
+
type: "string",
|
|
16406
|
+
default: "/"
|
|
16407
|
+
}
|
|
16408
|
+
}
|
|
16409
|
+
},
|
|
16410
|
+
rateLimiter: {
|
|
16411
|
+
type: "object",
|
|
16412
|
+
additionalProperties: false,
|
|
16413
|
+
properties: {
|
|
16414
|
+
windowMs: {
|
|
16415
|
+
type: "number",
|
|
16416
|
+
default: 1000
|
|
16417
|
+
},
|
|
16418
|
+
maxRequests: {
|
|
16419
|
+
type: "number",
|
|
16420
|
+
default: 100
|
|
16421
|
+
},
|
|
16422
|
+
blockDurationMs: {
|
|
16423
|
+
type: "number",
|
|
16424
|
+
default: 5000
|
|
16425
|
+
},
|
|
16426
|
+
maxConnectionsPerIp: {
|
|
16427
|
+
type: "number",
|
|
16428
|
+
minimum: 0,
|
|
16429
|
+
default: 20,
|
|
16430
|
+
description: "Maximum concurrent socket connections per client IP. " + "The per-event rate limiter is keyed by socket id, so " + "without a connection cap a client can bypass it by " + "opening more sockets. 0 disables the cap."
|
|
16431
|
+
}
|
|
16432
|
+
}
|
|
16433
|
+
},
|
|
16434
|
+
limits: {
|
|
16435
|
+
type: "object",
|
|
16436
|
+
additionalProperties: false,
|
|
16437
|
+
properties: {
|
|
16438
|
+
maxInstancesPerSession: {
|
|
16439
|
+
type: "integer",
|
|
16440
|
+
minimum: 0,
|
|
16441
|
+
default: 10,
|
|
16442
|
+
description: "Maximum persistent instances per socket session. 0 disables the cap."
|
|
16443
|
+
},
|
|
16444
|
+
maxInstancesPerIp: {
|
|
16445
|
+
type: "integer",
|
|
16446
|
+
minimum: 0,
|
|
16447
|
+
default: 20,
|
|
16448
|
+
description: "Maximum persistent instances per client IP, including HTTP actions. 0 disables the cap."
|
|
16449
|
+
},
|
|
16450
|
+
maxPlatformInstances: {
|
|
16451
|
+
type: "number",
|
|
16452
|
+
minimum: 0,
|
|
16453
|
+
default: 100,
|
|
16454
|
+
description: "Upper bound on concurrently running persistent platform instances " + "(child processes). Each persistent-platform actor forks " + "its own process, so an unbounded count is a resource " + "exhaustion risk on public instances. 0 disables the cap."
|
|
16455
|
+
}
|
|
16456
|
+
}
|
|
16457
|
+
},
|
|
16458
|
+
redis: {
|
|
16459
|
+
type: "object",
|
|
16460
|
+
additionalProperties: false,
|
|
16461
|
+
properties: {
|
|
16462
|
+
url: {
|
|
16463
|
+
type: "string",
|
|
16464
|
+
default: "redis://127.0.0.1:6379"
|
|
16465
|
+
},
|
|
16466
|
+
connectTimeout: {
|
|
16467
|
+
type: "number",
|
|
16468
|
+
default: 1e4,
|
|
16469
|
+
description: "Connection timeout in milliseconds"
|
|
16470
|
+
},
|
|
16471
|
+
disconnectTimeout: {
|
|
16472
|
+
type: "number",
|
|
16473
|
+
default: 5000,
|
|
16474
|
+
description: "Disconnect timeout in milliseconds"
|
|
16475
|
+
},
|
|
16476
|
+
maxRetriesPerRequest: {
|
|
16477
|
+
type: ["number", "null"],
|
|
16478
|
+
default: null,
|
|
16479
|
+
description: "Maximum number of retries per request (null for BullMQ default)"
|
|
16480
|
+
}
|
|
16481
|
+
}
|
|
16482
|
+
},
|
|
16483
|
+
sentry: {
|
|
16484
|
+
type: "object",
|
|
16485
|
+
additionalProperties: false,
|
|
16486
|
+
properties: {
|
|
16487
|
+
dsn: {
|
|
16488
|
+
type: "string",
|
|
16489
|
+
default: ""
|
|
16490
|
+
},
|
|
16491
|
+
environment: {
|
|
16492
|
+
type: "string",
|
|
16493
|
+
default: "production"
|
|
16494
|
+
},
|
|
16495
|
+
release: {
|
|
16496
|
+
type: "string",
|
|
16497
|
+
default: ""
|
|
16498
|
+
},
|
|
16499
|
+
enableLogs: {
|
|
16500
|
+
type: "boolean",
|
|
16501
|
+
default: false
|
|
16502
|
+
},
|
|
16503
|
+
logLevels: {
|
|
16504
|
+
type: "array",
|
|
16505
|
+
items: {
|
|
16506
|
+
type: "string",
|
|
16507
|
+
enum: ["debug", "info", "warn", "error"]
|
|
16508
|
+
},
|
|
16509
|
+
default: ["warn", "error"]
|
|
16510
|
+
},
|
|
16511
|
+
enableMetrics: {
|
|
16512
|
+
type: "boolean",
|
|
16513
|
+
default: true
|
|
16514
|
+
},
|
|
16515
|
+
tracesSampleRate: {
|
|
16516
|
+
type: "number",
|
|
16517
|
+
minimum: 0,
|
|
16518
|
+
maximum: 1,
|
|
16519
|
+
default: 0.1
|
|
16520
|
+
},
|
|
16521
|
+
profileSessionSampleRate: {
|
|
16522
|
+
type: "number",
|
|
16523
|
+
minimum: 0,
|
|
16524
|
+
maximum: 1,
|
|
16525
|
+
default: 0
|
|
16526
|
+
},
|
|
16527
|
+
sendDefaultPii: {
|
|
16528
|
+
type: "boolean",
|
|
16529
|
+
default: false
|
|
16530
|
+
}
|
|
16531
|
+
}
|
|
16532
|
+
},
|
|
16533
|
+
sockethub: {
|
|
16534
|
+
type: "object",
|
|
16535
|
+
additionalProperties: false,
|
|
16536
|
+
properties: {
|
|
16537
|
+
port: {
|
|
16538
|
+
type: "number",
|
|
16539
|
+
default: 10550
|
|
16540
|
+
},
|
|
16541
|
+
host: {
|
|
16542
|
+
type: "string",
|
|
16543
|
+
default: "localhost"
|
|
16544
|
+
},
|
|
16545
|
+
path: {
|
|
16546
|
+
type: "string",
|
|
16547
|
+
default: "/sockethub"
|
|
16548
|
+
},
|
|
16549
|
+
maxPayloadBytes: {
|
|
16550
|
+
type: "integer",
|
|
16551
|
+
minimum: 1,
|
|
16552
|
+
default: 262144,
|
|
16553
|
+
description: "Maximum size in bytes of a single Socket.IO message."
|
|
16554
|
+
},
|
|
16555
|
+
trustProxy: {
|
|
16556
|
+
type: ["boolean", "number", "string"],
|
|
16557
|
+
default: false,
|
|
16558
|
+
description: "Express 'trust proxy' setting, deciding whether " + "'x-forwarded-for' is believed when determining a " + "client's IP for HTTP rate limiting. false trusts no " + "proxy; a number trusts that many hops; a string " + "takes an address, subnet or preset ('loopback'). " + "Only enable behind a reverse proxy that overwrites " + "the header. When left false while " + "credentialCheck.reconnectIpSource is 'proxy' and " + "credentialCheck.proxyHeader is 'x-forwarded-for', " + "one hop is trusted so both paths agree; a custom " + "proxyHeader requires setting this explicitly."
|
|
16559
|
+
},
|
|
16560
|
+
cors: {
|
|
16561
|
+
type: "object",
|
|
16562
|
+
additionalProperties: false,
|
|
16563
|
+
properties: {
|
|
16564
|
+
origin: {
|
|
16565
|
+
type: "string",
|
|
16566
|
+
default: "*",
|
|
16567
|
+
description: "Allowed CORS origin(s) for socket.io connections " + "and the HTTP actions endpoint. '*' allows any " + "website to connect visitors' browsers to this " + "instance; public deployments should set an " + "explicit origin or comma-separated list of " + "origins."
|
|
16568
|
+
}
|
|
16569
|
+
}
|
|
16570
|
+
}
|
|
16571
|
+
}
|
|
16572
|
+
},
|
|
16573
|
+
httpActions: {
|
|
16574
|
+
type: "object",
|
|
16575
|
+
additionalProperties: false,
|
|
16576
|
+
properties: {
|
|
16577
|
+
enabled: {
|
|
16578
|
+
type: "boolean",
|
|
16579
|
+
default: false,
|
|
16580
|
+
description: "Enable the HTTP actions endpoint"
|
|
16581
|
+
},
|
|
16582
|
+
path: {
|
|
16583
|
+
type: "string",
|
|
16584
|
+
default: "/sockethub-http"
|
|
16585
|
+
},
|
|
16586
|
+
requireRequestId: {
|
|
16587
|
+
type: "boolean",
|
|
16588
|
+
default: true
|
|
16589
|
+
},
|
|
16590
|
+
maxMessagesPerRequest: {
|
|
16591
|
+
type: "number",
|
|
16592
|
+
minimum: 1,
|
|
16593
|
+
default: 20
|
|
16594
|
+
},
|
|
16595
|
+
maxPayloadBytes: {
|
|
16596
|
+
type: "number",
|
|
16597
|
+
minimum: 1,
|
|
16598
|
+
default: 262144
|
|
16599
|
+
},
|
|
16600
|
+
idempotencyTtlMs: {
|
|
16601
|
+
type: "number",
|
|
16602
|
+
minimum: 0,
|
|
16603
|
+
default: 300000
|
|
16604
|
+
},
|
|
16605
|
+
requestTimeoutMs: {
|
|
16606
|
+
type: "number",
|
|
16607
|
+
minimum: 0,
|
|
16608
|
+
default: 30000
|
|
16609
|
+
},
|
|
16610
|
+
idleTimeoutMs: {
|
|
16611
|
+
type: "number",
|
|
16612
|
+
minimum: 0,
|
|
16613
|
+
default: 15000
|
|
16614
|
+
}
|
|
16615
|
+
}
|
|
16616
|
+
},
|
|
16617
|
+
platformHeartbeat: {
|
|
16618
|
+
type: "object",
|
|
16619
|
+
additionalProperties: false,
|
|
16620
|
+
properties: {
|
|
16621
|
+
intervalMs: {
|
|
16622
|
+
type: "number",
|
|
16623
|
+
default: 5000
|
|
16624
|
+
},
|
|
16625
|
+
timeoutMs: {
|
|
16626
|
+
type: "number",
|
|
16627
|
+
default: 15000
|
|
16628
|
+
}
|
|
16629
|
+
}
|
|
16630
|
+
}
|
|
16631
|
+
}
|
|
16632
|
+
};
|
|
16633
|
+
var SockethubConfigSchemaId = versionedSchemaId(SockethubConfigSchema.$id, package_default.version);
|
|
16634
|
+
|
|
16635
|
+
// src/service-descriptor.ts
|
|
16787
16636
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
16637
|
+
|
|
16638
|
+
// src/helpers/codegen.ts
|
|
16639
|
+
var available;
|
|
16640
|
+
var warned = false;
|
|
16641
|
+
function isCodegenAvailable() {
|
|
16642
|
+
if (available === undefined) {
|
|
16643
|
+
try {
|
|
16644
|
+
new Function("return true");
|
|
16645
|
+
available = true;
|
|
16646
|
+
} catch {
|
|
16647
|
+
available = false;
|
|
16648
|
+
}
|
|
16649
|
+
}
|
|
16650
|
+
return available;
|
|
16651
|
+
}
|
|
16652
|
+
function warnCodegenUnavailable() {
|
|
16653
|
+
if (warned) {
|
|
16654
|
+
return;
|
|
16655
|
+
}
|
|
16656
|
+
warned = true;
|
|
16657
|
+
console.warn("[@sockethub/schemas] Schema validation is disabled: this environment's Content Security Policy blocks `new Function`, which Ajv needs to compile schemas. The Sockethub server still validates every message.");
|
|
16658
|
+
}
|
|
16659
|
+
|
|
16660
|
+
// src/schemas/service-descriptor.ts
|
|
16661
|
+
var apiVersion = {
|
|
16662
|
+
type: "integer",
|
|
16663
|
+
minimum: 0
|
|
16664
|
+
};
|
|
16665
|
+
var nonEmptyString = { type: "string", minLength: 1 };
|
|
16666
|
+
var absolutePath = {
|
|
16667
|
+
type: "string",
|
|
16668
|
+
pattern: "^/(?![/\\\\])[^\\s\\\\]*$"
|
|
16669
|
+
};
|
|
16670
|
+
var ServiceDescriptorSchema = {
|
|
16671
|
+
$id: "https://sockethub.org/schemas/v/service-descriptor.json",
|
|
16672
|
+
description: "Sockethub service descriptor",
|
|
16673
|
+
type: "object",
|
|
16674
|
+
required: ["name", "apiVersion", "platforms"],
|
|
16675
|
+
additionalProperties: true,
|
|
16676
|
+
properties: {
|
|
16677
|
+
name: { const: "sockethub" },
|
|
16678
|
+
apiVersion,
|
|
16679
|
+
endpoints: {
|
|
16680
|
+
type: "object",
|
|
16681
|
+
required: ["socketIO"],
|
|
16682
|
+
additionalProperties: true,
|
|
16683
|
+
properties: {
|
|
16684
|
+
socketIO: absolutePath,
|
|
16685
|
+
httpActions: absolutePath
|
|
16686
|
+
}
|
|
16687
|
+
},
|
|
16688
|
+
platforms: {
|
|
16689
|
+
type: "array",
|
|
16690
|
+
items: {
|
|
16691
|
+
type: "object",
|
|
16692
|
+
required: ["id", "apiVersion"],
|
|
16693
|
+
additionalProperties: true,
|
|
16694
|
+
properties: {
|
|
16695
|
+
id: nonEmptyString,
|
|
16696
|
+
apiVersion
|
|
16697
|
+
}
|
|
16698
|
+
}
|
|
16699
|
+
}
|
|
16700
|
+
}
|
|
16701
|
+
};
|
|
16702
|
+
|
|
16703
|
+
// src/service-descriptor.ts
|
|
16704
|
+
var ajv;
|
|
16705
|
+
var validator;
|
|
16706
|
+
function validateServiceDescriptor(descriptor) {
|
|
16707
|
+
if (!isCodegenAvailable()) {
|
|
16708
|
+
warnCodegenUnavailable();
|
|
16709
|
+
return isServiceDescriptorShape(descriptor);
|
|
16710
|
+
}
|
|
16711
|
+
if (!ajv) {
|
|
16712
|
+
ajv = new import_ajv.default({ strictTypes: false, allErrors: true });
|
|
16713
|
+
}
|
|
16714
|
+
validator ??= ajv.compile(ServiceDescriptorSchema);
|
|
16715
|
+
return validator(descriptor);
|
|
16716
|
+
}
|
|
16717
|
+
function isServiceDescriptorShape(descriptor) {
|
|
16718
|
+
if (!descriptor || typeof descriptor !== "object") {
|
|
16719
|
+
return false;
|
|
16720
|
+
}
|
|
16721
|
+
const value = descriptor;
|
|
16722
|
+
if (value.name !== "sockethub") {
|
|
16723
|
+
return false;
|
|
16724
|
+
}
|
|
16725
|
+
if (!isApiVersion(value.apiVersion)) {
|
|
16726
|
+
return false;
|
|
16727
|
+
}
|
|
16728
|
+
if (!Array.isArray(value.platforms)) {
|
|
16729
|
+
return false;
|
|
16730
|
+
}
|
|
16731
|
+
for (const platform of value.platforms) {
|
|
16732
|
+
if (!platform || typeof platform !== "object") {
|
|
16733
|
+
return false;
|
|
16734
|
+
}
|
|
16735
|
+
const entry = platform;
|
|
16736
|
+
if (typeof entry.id !== "string" || entry.id.length === 0) {
|
|
16737
|
+
return false;
|
|
16738
|
+
}
|
|
16739
|
+
if (!isApiVersion(entry.apiVersion)) {
|
|
16740
|
+
return false;
|
|
16741
|
+
}
|
|
16742
|
+
}
|
|
16743
|
+
if (value.endpoints !== undefined) {
|
|
16744
|
+
if (!value.endpoints || typeof value.endpoints !== "object") {
|
|
16745
|
+
return false;
|
|
16746
|
+
}
|
|
16747
|
+
const endpoints = value.endpoints;
|
|
16748
|
+
if (!isAbsolutePath(endpoints.socketIO)) {
|
|
16749
|
+
return false;
|
|
16750
|
+
}
|
|
16751
|
+
if (endpoints.httpActions !== undefined && !isAbsolutePath(endpoints.httpActions)) {
|
|
16752
|
+
return false;
|
|
16753
|
+
}
|
|
16754
|
+
}
|
|
16755
|
+
return true;
|
|
16756
|
+
}
|
|
16757
|
+
function isApiVersion(value) {
|
|
16758
|
+
return typeof value === "number" && Number.isInteger(value) && value >= 0;
|
|
16759
|
+
}
|
|
16760
|
+
function isAbsolutePath(value) {
|
|
16761
|
+
return typeof value === "string" && /^\/(?![/\\])[^\s\\]*$/.test(value);
|
|
16762
|
+
}
|
|
16763
|
+
|
|
16764
|
+
// src/validator.ts
|
|
16765
|
+
var import_ajv2 = __toESM(require_ajv(), 1);
|
|
16788
16766
|
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
16789
16767
|
var import_ajv_formats_draft2019 = __toESM(require_ajv_formats_draft2019(), 1);
|
|
16790
|
-
var import_debug = __toESM(require_src(), 1);
|
|
16791
16768
|
|
|
16792
16769
|
// src/helpers/error-parser.ts
|
|
16793
16770
|
function parseMsg(error) {
|
|
@@ -16799,12 +16776,20 @@ function parseMsg(error) {
|
|
|
16799
16776
|
}
|
|
16800
16777
|
return err;
|
|
16801
16778
|
}
|
|
16802
|
-
|
|
16803
|
-
|
|
16804
|
-
types
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16779
|
+
var MAX_TYPE_LIST_DEPTH = 64;
|
|
16780
|
+
function getTypeList(msg, depth = 0) {
|
|
16781
|
+
const types = [];
|
|
16782
|
+
if (depth > MAX_TYPE_LIST_DEPTH) {
|
|
16783
|
+
return types;
|
|
16784
|
+
}
|
|
16785
|
+
if (msg?.type) {
|
|
16786
|
+
types.push(msg.type);
|
|
16787
|
+
}
|
|
16788
|
+
const record = msg;
|
|
16789
|
+
for (const prop in record) {
|
|
16790
|
+
const value = record[prop];
|
|
16791
|
+
if (value && typeof value === "object" && "type" in value) {
|
|
16792
|
+
types.push(...getTypeList(value, depth + 1));
|
|
16808
16793
|
}
|
|
16809
16794
|
}
|
|
16810
16795
|
return types;
|
|
@@ -16823,23 +16808,32 @@ function getPartsCount(error, types) {
|
|
|
16823
16808
|
if (!errType) {
|
|
16824
16809
|
return -1;
|
|
16825
16810
|
}
|
|
16826
|
-
|
|
16811
|
+
const typeList = types[errType];
|
|
16812
|
+
if (!typeList) {
|
|
16827
16813
|
return -1;
|
|
16828
16814
|
}
|
|
16829
|
-
if (!
|
|
16815
|
+
if (!schemaType || !typeList.includes(schemaType)) {
|
|
16830
16816
|
return -1;
|
|
16831
16817
|
}
|
|
16832
16818
|
const parts = error.instancePath.split("/");
|
|
16833
16819
|
return parts.length;
|
|
16834
16820
|
}
|
|
16835
16821
|
function getTypes(msg) {
|
|
16822
|
+
if (!Array.isArray(msg["@context"])) {
|
|
16823
|
+
return {
|
|
16824
|
+
actor: [],
|
|
16825
|
+
target: [],
|
|
16826
|
+
object: getTypeList(msg)
|
|
16827
|
+
};
|
|
16828
|
+
}
|
|
16829
|
+
const stream = msg;
|
|
16836
16830
|
return {
|
|
16837
|
-
actor: getTypeList(
|
|
16838
|
-
target: getTypeList(
|
|
16839
|
-
object:
|
|
16831
|
+
actor: getTypeList(stream.actor),
|
|
16832
|
+
target: getTypeList(stream.target),
|
|
16833
|
+
object: stream.object ? getTypeList(stream.object) : []
|
|
16840
16834
|
};
|
|
16841
16835
|
}
|
|
16842
|
-
function getErrorMessage(msg, errors) {
|
|
16836
|
+
function getErrorMessage(msg, errors, options) {
|
|
16843
16837
|
const types = getTypes(msg);
|
|
16844
16838
|
let deepest_entry = 0;
|
|
16845
16839
|
let highest_depth = -1;
|
|
@@ -16850,12 +16844,23 @@ function getErrorMessage(msg, errors) {
|
|
|
16850
16844
|
deepest_entry = i;
|
|
16851
16845
|
}
|
|
16852
16846
|
}
|
|
16853
|
-
return highest_depth >= 0 ? parseMsg(errors[deepest_entry]) : composeFinalError(errors[errors.length - 1]);
|
|
16847
|
+
return highest_depth >= 0 ? parseMsg(errors[deepest_entry]) : composeFinalError(errors[errors.length - 1], options);
|
|
16848
|
+
}
|
|
16849
|
+
function filterTypeList(types, options) {
|
|
16850
|
+
if (!options?.excludeTypes || options.excludeTypes.length === 0) {
|
|
16851
|
+
return types;
|
|
16852
|
+
}
|
|
16853
|
+
const exclude = new Set(options.excludeTypes);
|
|
16854
|
+
return types.filter((type) => !exclude.has(type));
|
|
16854
16855
|
}
|
|
16855
|
-
function composeFinalError(error) {
|
|
16856
|
+
function composeFinalError(error, options) {
|
|
16856
16857
|
let msg;
|
|
16857
16858
|
if (error.keyword === "oneOf") {
|
|
16858
|
-
|
|
16859
|
+
const instanceRoot = error.instancePath.split("/")[1];
|
|
16860
|
+
const pathScopedTypes = instanceRoot === "actor" ? ActorTypesList : instanceRoot === "target" ? TargetTypesList : ObjectTypesList;
|
|
16861
|
+
const filteredTypes = filterTypeList(pathScopedTypes, options);
|
|
16862
|
+
const typesList = filteredTypes.length > 0 ? filteredTypes : pathScopedTypes;
|
|
16863
|
+
msg = `${error.instancePath}: ${error.message}: ` + `${typesList.join(", ")}`;
|
|
16859
16864
|
} else {
|
|
16860
16865
|
msg = `${error.instancePath ? error.instancePath : "activity stream"}: ${error.message}`;
|
|
16861
16866
|
}
|
|
@@ -16866,77 +16871,300 @@ function composeFinalError(error) {
|
|
|
16866
16871
|
}
|
|
16867
16872
|
|
|
16868
16873
|
// src/validator.ts
|
|
16869
|
-
var ajv = new import_ajv.default({ strictTypes: false, allErrors: true });
|
|
16870
|
-
import_ajv_formats.default(ajv);
|
|
16871
|
-
import_ajv_formats_draft2019.default(ajv);
|
|
16872
|
-
var log = import_debug.default("sockethub:schemas:validator");
|
|
16873
16874
|
var schemaURL = "https://sockethub.org/schemas/v0";
|
|
16874
16875
|
var schemas = {};
|
|
16876
|
+
var validationErrorOptions = {};
|
|
16877
|
+
var systemContextsRegistered = false;
|
|
16875
16878
|
schemas[`${schemaURL}/activity-stream`] = ActivityStreamSchema;
|
|
16876
|
-
|
|
16877
|
-
|
|
16878
|
-
|
|
16879
|
-
|
|
16879
|
+
var ajv2;
|
|
16880
|
+
function getAjv() {
|
|
16881
|
+
if (!isCodegenAvailable()) {
|
|
16882
|
+
warnCodegenUnavailable();
|
|
16883
|
+
return;
|
|
16884
|
+
}
|
|
16885
|
+
if (!ajv2) {
|
|
16886
|
+
const instance = new import_ajv2.default({ strictTypes: false, allErrors: true });
|
|
16887
|
+
import_ajv_formats.default(instance);
|
|
16888
|
+
import_ajv_formats_draft2019.default(instance);
|
|
16889
|
+
for (const uri in schemas) {
|
|
16890
|
+
instance.addSchema(schemas[uri], uri);
|
|
16891
|
+
}
|
|
16892
|
+
ajv2 = instance;
|
|
16893
|
+
}
|
|
16894
|
+
return ajv2;
|
|
16880
16895
|
}
|
|
16881
|
-
function
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
if (
|
|
16885
|
-
|
|
16886
|
-
}
|
|
16887
|
-
|
|
16896
|
+
function registerSystemContext(platformId, contextUrl) {
|
|
16897
|
+
registerPlatformContext(platformId, contextUrl, `${schemaURL}/context/${platformId}/messages`, `${schemaURL}/context/${platformId}/credentials`);
|
|
16898
|
+
const instance = getAjv();
|
|
16899
|
+
if (!instance) {
|
|
16900
|
+
return;
|
|
16901
|
+
}
|
|
16902
|
+
const messageSchemaRef = `${schemaURL}/context/${platformId}/messages`;
|
|
16903
|
+
if (!instance.getSchema(messageSchemaRef)) {
|
|
16904
|
+
instance.addSchema({}, messageSchemaRef);
|
|
16905
|
+
}
|
|
16906
|
+
const credentialsSchemaRef = `${schemaURL}/context/${platformId}/credentials`;
|
|
16907
|
+
if (!instance.getSchema(credentialsSchemaRef)) {
|
|
16908
|
+
instance.addSchema({}, credentialsSchemaRef);
|
|
16909
|
+
}
|
|
16910
|
+
}
|
|
16911
|
+
function registerSystemPlatformContexts() {
|
|
16912
|
+
if (systemContextsRegistered) {
|
|
16913
|
+
return;
|
|
16914
|
+
}
|
|
16915
|
+
registerSystemContext(ERROR_PLATFORM_ID, ERROR_PLATFORM_CONTEXT_URL);
|
|
16916
|
+
registerSystemContext(INTERNAL_PLATFORM_ID, INTERNAL_PLATFORM_CONTEXT_URL);
|
|
16917
|
+
systemContextsRegistered = true;
|
|
16918
|
+
}
|
|
16919
|
+
registerSystemPlatformContexts();
|
|
16920
|
+
function handleValidation(schemaRef, msg) {
|
|
16921
|
+
const instance = getAjv();
|
|
16922
|
+
if (!instance) {
|
|
16923
|
+
return "";
|
|
16924
|
+
}
|
|
16925
|
+
const validator = instance.getSchema(schemaRef);
|
|
16926
|
+
if (!validator) {
|
|
16927
|
+
return `schema ${schemaRef} not found`;
|
|
16888
16928
|
}
|
|
16929
|
+
const result = validator(msg);
|
|
16889
16930
|
if (!result) {
|
|
16890
|
-
let errorMessage = getErrorMessage(msg, validator.errors);
|
|
16891
|
-
if (msg
|
|
16892
|
-
|
|
16931
|
+
let errorMessage = getErrorMessage(msg, validator.errors, validationErrorOptions);
|
|
16932
|
+
if (Array.isArray(msg["@context"])) {
|
|
16933
|
+
const platformContextUrl = resolvePlatformContextUrl(msg);
|
|
16934
|
+
if (platformContextUrl) {
|
|
16935
|
+
const platformId = getPlatformIdByContextUrl(platformContextUrl);
|
|
16936
|
+
if (platformId) {
|
|
16937
|
+
errorMessage = `[${platformId}] ${errorMessage}`;
|
|
16938
|
+
}
|
|
16939
|
+
}
|
|
16893
16940
|
}
|
|
16894
16941
|
return errorMessage;
|
|
16895
16942
|
}
|
|
16896
16943
|
return "";
|
|
16897
16944
|
}
|
|
16898
|
-
function
|
|
16899
|
-
|
|
16945
|
+
function setValidationErrorOptions(options) {
|
|
16946
|
+
validationErrorOptions = { ...validationErrorOptions, ...options };
|
|
16947
|
+
}
|
|
16948
|
+
var sockethubConfigValidator;
|
|
16949
|
+
function validateSockethubConfig(config) {
|
|
16950
|
+
const instance = getAjv();
|
|
16951
|
+
if (!instance) {
|
|
16952
|
+
return "";
|
|
16953
|
+
}
|
|
16954
|
+
if (!sockethubConfigValidator) {
|
|
16955
|
+
sockethubConfigValidator = instance.compile(SockethubConfigSchema);
|
|
16956
|
+
}
|
|
16957
|
+
if (sockethubConfigValidator(config)) {
|
|
16958
|
+
return "";
|
|
16959
|
+
}
|
|
16960
|
+
return instance.errorsText(sockethubConfigValidator.errors, {
|
|
16961
|
+
dataVar: "config"
|
|
16962
|
+
});
|
|
16900
16963
|
}
|
|
16901
16964
|
function validateActivityStream(msg) {
|
|
16902
|
-
|
|
16965
|
+
if (!isCodegenAvailable()) {
|
|
16966
|
+
warnCodegenUnavailable();
|
|
16967
|
+
return "";
|
|
16968
|
+
}
|
|
16969
|
+
const streamValidationError = handleValidation(`${schemaURL}/activity-stream`, msg);
|
|
16970
|
+
if (streamValidationError) {
|
|
16971
|
+
return streamValidationError;
|
|
16972
|
+
}
|
|
16973
|
+
const platformContextUrl = resolvePlatformContextUrl(msg);
|
|
16974
|
+
if (!platformContextUrl) {
|
|
16975
|
+
return "activity streams must have exactly one registered platform context URL in @context";
|
|
16976
|
+
}
|
|
16977
|
+
const schemaId = getSchemaIdByContextUrl(platformContextUrl);
|
|
16978
|
+
if (!schemaId) {
|
|
16979
|
+
return `platform context URL ${platformContextUrl} does not have a registered message schema`;
|
|
16980
|
+
}
|
|
16981
|
+
return handleValidation(schemaId, msg);
|
|
16982
|
+
}
|
|
16983
|
+
function validateActivityStreamResponse(msg) {
|
|
16984
|
+
if (!isCodegenAvailable()) {
|
|
16985
|
+
warnCodegenUnavailable();
|
|
16986
|
+
return "";
|
|
16987
|
+
}
|
|
16988
|
+
const platformContextUrl = resolvePlatformContextUrl(msg);
|
|
16989
|
+
if (!platformContextUrl) {
|
|
16990
|
+
return "";
|
|
16991
|
+
}
|
|
16992
|
+
const platformId = getPlatformIdByContextUrl(platformContextUrl);
|
|
16993
|
+
if (!platformId) {
|
|
16994
|
+
return "";
|
|
16995
|
+
}
|
|
16996
|
+
const responsesSchemaId = `${schemaURL}/context/${platformId}/responses`;
|
|
16997
|
+
const instance = getAjv();
|
|
16998
|
+
if (!instance || !instance.getSchema(responsesSchemaId)) {
|
|
16999
|
+
return "";
|
|
17000
|
+
}
|
|
17001
|
+
return handleValidation(responsesSchemaId, msg);
|
|
16903
17002
|
}
|
|
16904
17003
|
function validateCredentials(msg) {
|
|
16905
|
-
if (!
|
|
16906
|
-
|
|
17004
|
+
if (!isCodegenAvailable()) {
|
|
17005
|
+
warnCodegenUnavailable();
|
|
17006
|
+
return "";
|
|
17007
|
+
}
|
|
17008
|
+
if (!Array.isArray(msg["@context"])) {
|
|
17009
|
+
return "credential activity streams must have an @context set";
|
|
16907
17010
|
}
|
|
16908
17011
|
if (msg.type !== "credentials") {
|
|
16909
17012
|
return "credential activity streams must have credentials set as type";
|
|
16910
17013
|
}
|
|
16911
|
-
|
|
16912
|
-
|
|
17014
|
+
const streamValidationError = handleValidation(`${schemaURL}/activity-stream`, msg);
|
|
17015
|
+
if (streamValidationError) {
|
|
17016
|
+
return streamValidationError;
|
|
17017
|
+
}
|
|
17018
|
+
const platformContextUrl = resolvePlatformContextUrl(msg);
|
|
17019
|
+
if (!platformContextUrl) {
|
|
17020
|
+
return "credential activity streams must have exactly one registered platform context URL in @context";
|
|
17021
|
+
}
|
|
17022
|
+
const credentialsSchemaId = getCredentialsSchemaIdByContextUrl(platformContextUrl);
|
|
17023
|
+
if (!credentialsSchemaId) {
|
|
17024
|
+
return `platform context URL ${platformContextUrl} does not have a registered credentials schema`;
|
|
17025
|
+
}
|
|
17026
|
+
return handleValidation(credentialsSchemaId, msg);
|
|
16913
17027
|
}
|
|
16914
17028
|
function validatePlatformSchema(schema) {
|
|
16915
|
-
const
|
|
16916
|
-
|
|
16917
|
-
|
|
16918
|
-
|
|
17029
|
+
const instance = getAjv();
|
|
17030
|
+
if (instance) {
|
|
17031
|
+
const validate = instance.compile(PlatformSchema);
|
|
17032
|
+
const err = validate(schema);
|
|
17033
|
+
if (!err) {
|
|
17034
|
+
const validationError = validate.errors?.[0];
|
|
17035
|
+
let message = `${validationError?.instancePath ?? ""} ${validationError?.message ?? "is invalid"}`;
|
|
17036
|
+
if (validationError?.keyword === "additionalProperties") {
|
|
17037
|
+
message += `: ${validationError.params.additionalProperty}`;
|
|
17038
|
+
}
|
|
17039
|
+
return `platform schema failed to validate: ${message}`;
|
|
17040
|
+
}
|
|
17041
|
+
}
|
|
17042
|
+
const platform = schema;
|
|
17043
|
+
const messages = platform.messages;
|
|
17044
|
+
const properties = messages?.properties;
|
|
17045
|
+
const declaredTypes = (root) => {
|
|
17046
|
+
const result = new Set;
|
|
17047
|
+
const visit = (value) => {
|
|
17048
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
17049
|
+
return;
|
|
17050
|
+
const node = value;
|
|
17051
|
+
if (typeof node.const === "string")
|
|
17052
|
+
result.add(node.const);
|
|
17053
|
+
if (Array.isArray(node.enum)) {
|
|
17054
|
+
for (const item of node.enum) {
|
|
17055
|
+
if (typeof item === "string")
|
|
17056
|
+
result.add(item);
|
|
17057
|
+
}
|
|
17058
|
+
}
|
|
17059
|
+
const nodeProperties = node.properties;
|
|
17060
|
+
visit(nodeProperties?.type);
|
|
17061
|
+
for (const keyword of ["allOf", "anyOf", "oneOf"]) {
|
|
17062
|
+
const branches = node[keyword];
|
|
17063
|
+
if (Array.isArray(branches))
|
|
17064
|
+
branches.forEach(visit);
|
|
17065
|
+
}
|
|
17066
|
+
};
|
|
17067
|
+
visit(root);
|
|
17068
|
+
return result;
|
|
17069
|
+
};
|
|
17070
|
+
for (const [property, allowed] of [
|
|
17071
|
+
["actor", ActorTypesList],
|
|
17072
|
+
["target", TargetTypesList]
|
|
17073
|
+
]) {
|
|
17074
|
+
const unsupported = [...declaredTypes(properties?.[property])].filter((type) => !allowed.includes(type));
|
|
17075
|
+
if (unsupported.length > 0) {
|
|
17076
|
+
return `platform schema ${property} types are not registered in the shared ActivityStreams envelope: ${unsupported.join(", ")}`;
|
|
17077
|
+
}
|
|
16919
17078
|
}
|
|
16920
17079
|
return "";
|
|
16921
17080
|
}
|
|
16922
17081
|
function addPlatformSchema(schema, platform_type) {
|
|
16923
|
-
|
|
16924
|
-
|
|
17082
|
+
const instance = getAjv();
|
|
17083
|
+
if (!instance) {
|
|
17084
|
+
return;
|
|
17085
|
+
}
|
|
17086
|
+
const schemaRef = `${schemaURL}/context/${platform_type}`;
|
|
17087
|
+
if (!instance.getSchema(schemaRef)) {
|
|
17088
|
+
instance.addSchema(schema, schemaRef);
|
|
17089
|
+
}
|
|
16925
17090
|
}
|
|
16926
17091
|
function getPlatformSchema(platform_type) {
|
|
16927
|
-
return
|
|
17092
|
+
return getAjv()?.getSchema(`${schemaURL}/context/${platform_type}`);
|
|
17093
|
+
}
|
|
17094
|
+
function addPlatformContext(platformId, platformContextUrl) {
|
|
17095
|
+
registerPlatformContext(platformId, platformContextUrl, `${schemaURL}/context/${platformId}/messages`, `${schemaURL}/context/${platformId}/credentials`);
|
|
17096
|
+
}
|
|
17097
|
+
function resolvePlatformId(msg) {
|
|
17098
|
+
const platformContextUrl = resolvePlatformContextUrl(msg);
|
|
17099
|
+
if (!platformContextUrl) {
|
|
17100
|
+
return null;
|
|
17101
|
+
}
|
|
17102
|
+
return getPlatformIdByContextUrl(platformContextUrl) ?? null;
|
|
17103
|
+
}
|
|
17104
|
+
|
|
17105
|
+
// src/activity-stream-helper.ts
|
|
17106
|
+
var stringRefKeys = {
|
|
17107
|
+
actor: "id",
|
|
17108
|
+
target: "id",
|
|
17109
|
+
object: "content"
|
|
17110
|
+
};
|
|
17111
|
+
function normalizeStringRef(value, primaryKey) {
|
|
17112
|
+
if (typeof value === "string") {
|
|
17113
|
+
return { [primaryKey]: value };
|
|
17114
|
+
}
|
|
17115
|
+
if (Array.isArray(value)) {
|
|
17116
|
+
return value.map((entry) => {
|
|
17117
|
+
if (typeof entry === "string") {
|
|
17118
|
+
return { id: entry };
|
|
17119
|
+
}
|
|
17120
|
+
return entry;
|
|
17121
|
+
});
|
|
17122
|
+
}
|
|
17123
|
+
return value;
|
|
17124
|
+
}
|
|
17125
|
+
function normalizeActivityStream(meta) {
|
|
17126
|
+
const stream = {
|
|
17127
|
+
...meta
|
|
17128
|
+
};
|
|
17129
|
+
for (const key of Object.keys(stringRefKeys)) {
|
|
17130
|
+
if (key in stream) {
|
|
17131
|
+
stream[key] = normalizeStringRef(stream[key], stringRefKeys[key]);
|
|
17132
|
+
}
|
|
17133
|
+
}
|
|
17134
|
+
return stream;
|
|
16928
17135
|
}
|
|
16929
17136
|
export {
|
|
16930
|
-
|
|
16931
|
-
validateCredentials,
|
|
16932
|
-
validateActivityStream,
|
|
16933
|
-
validateActivityObject,
|
|
16934
|
-
getPlatformSchema,
|
|
16935
|
-
addPlatformSchema,
|
|
16936
|
-
PlatformSchema,
|
|
16937
|
-
ObjectTypesList,
|
|
17137
|
+
AS2_BASE_CONTEXT_URL,
|
|
16938
17138
|
ActivityStreamSchema,
|
|
16939
|
-
|
|
17139
|
+
ERROR_PLATFORM_CONTEXT_URL,
|
|
17140
|
+
ERROR_PLATFORM_ID,
|
|
17141
|
+
INTERNAL_PLATFORM_CONTEXT_URL,
|
|
17142
|
+
INTERNAL_PLATFORM_ID,
|
|
17143
|
+
InternalObjectTypesList,
|
|
17144
|
+
ObjectTypesList,
|
|
17145
|
+
ObjectTypesSchema,
|
|
17146
|
+
PLATFORM_CONTEXT_PREFIX,
|
|
17147
|
+
PlatformSchema,
|
|
17148
|
+
SOCKETHUB_BASE_CONTEXT_URL,
|
|
17149
|
+
ServiceDescriptorSchema,
|
|
17150
|
+
SockethubConfigSchema,
|
|
17151
|
+
SockethubConfigSchemaId,
|
|
17152
|
+
addPlatformContext,
|
|
17153
|
+
addPlatformSchema,
|
|
17154
|
+
buildCanonicalContext,
|
|
17155
|
+
getPlatformSchema,
|
|
17156
|
+
isCodegenAvailable,
|
|
17157
|
+
normalizeActivityStream,
|
|
17158
|
+
platformIdFromContext,
|
|
17159
|
+
registerSystemPlatformContexts,
|
|
17160
|
+
resolvePlatformId,
|
|
17161
|
+
setValidationErrorOptions,
|
|
17162
|
+
validateActivityStream,
|
|
17163
|
+
validateActivityStreamResponse,
|
|
17164
|
+
validateCredentials,
|
|
17165
|
+
validatePlatformSchema,
|
|
17166
|
+
validateServiceDescriptor,
|
|
17167
|
+
validateSockethubConfig
|
|
16940
17168
|
};
|
|
16941
17169
|
|
|
16942
|
-
//# debugId=
|
|
17170
|
+
//# debugId=835ED6EDFB33FD9B64756E2164756E21
|