@sockethub/schemas 3.0.0-alpha.24 → 3.0.0-alpha.25
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.js +1 -35
- package/dist/activity-stream-helper.js.map +2 -2
- package/dist/context.js +1 -35
- package/dist/context.js.map +2 -2
- package/dist/examples-config.js +25 -16
- package/dist/examples-config.js.map +3 -3
- package/dist/index.d.ts +3 -2
- package/dist/index.js +188 -128
- package/dist/index.js.map +6 -4
- package/dist/maps/context-map.json +2 -2
- package/dist/object-types.js +1 -37
- package/dist/object-types.js.map +2 -2
- package/dist/schemas/examples-config.d.ts +17 -0
- package/dist/schemas/json/activity-stream.json +1 -1
- package/dist/schemas/json/examples-config.json +17 -1
- package/dist/schemas/json/platform.json +1 -1
- package/dist/schemas/json/service-descriptor.json +41 -0
- package/dist/schemas/json/sockethub-config.json +1 -1
- package/dist/schemas/platform/irc/v1/messages.schema.json +24 -0
- package/dist/schemas/service-descriptor.d.ts +47 -0
- package/dist/service-descriptor.d.ts +4 -0
- package/dist/service-descriptor.js +6266 -0
- package/dist/service-descriptor.js.map +77 -0
- package/package.json +12 -3
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
18
18
|
return cached;
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
22
|
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
23
|
for (let key of __getOwnPropNames(mod))
|
|
24
24
|
if (!__hasOwnProp.call(to, key))
|
|
@@ -201,9 +201,9 @@ var require_scope = __commonJS(function(exports) {
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
var UsedValueState;
|
|
204
|
-
(function(
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
(function(UsedValueState) {
|
|
205
|
+
UsedValueState[UsedValueState["Started"] = 0] = "Started";
|
|
206
|
+
UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
|
|
207
207
|
})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
|
|
208
208
|
exports.varKinds = {
|
|
209
209
|
const: new code_1.Name("const"),
|
|
@@ -1185,9 +1185,9 @@ var require_util = __commonJS(function(exports) {
|
|
|
1185
1185
|
}
|
|
1186
1186
|
exports.useFunc = useFunc;
|
|
1187
1187
|
var Type;
|
|
1188
|
-
(function(
|
|
1189
|
-
|
|
1190
|
-
|
|
1188
|
+
(function(Type) {
|
|
1189
|
+
Type[Type["Num"] = 0] = "Num";
|
|
1190
|
+
Type[Type["Str"] = 1] = "Str";
|
|
1191
1191
|
})(Type || (exports.Type = Type = {}));
|
|
1192
1192
|
function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
|
|
1193
1193
|
if (dataProp instanceof codegen_1.Name) {
|
|
@@ -1457,9 +1457,9 @@ var require_dataType = __commonJS(function(exports) {
|
|
|
1457
1457
|
var codegen_1 = require_codegen();
|
|
1458
1458
|
var util_1 = require_util();
|
|
1459
1459
|
var DataType;
|
|
1460
|
-
(function(
|
|
1461
|
-
|
|
1462
|
-
|
|
1460
|
+
(function(DataType) {
|
|
1461
|
+
DataType[DataType["Correct"] = 0] = "Correct";
|
|
1462
|
+
DataType[DataType["Wrong"] = 1] = "Wrong";
|
|
1463
1463
|
})(DataType || (exports.DataType = DataType = {}));
|
|
1464
1464
|
function getSchemaTypes(schema) {
|
|
1465
1465
|
const types = getJSONTypes(schema.type);
|
|
@@ -1855,8 +1855,8 @@ var require_keyword = __commonJS(function(exports) {
|
|
|
1855
1855
|
gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
1856
1856
|
}
|
|
1857
1857
|
function reportErrs(errors) {
|
|
1858
|
-
var
|
|
1859
|
-
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);
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
1862
|
exports.funcKeywordCode = funcKeywordCode;
|
|
@@ -5890,9 +5890,9 @@ var require_types = __commonJS(function(exports) {
|
|
|
5890
5890
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5891
5891
|
exports.DiscrError = undefined;
|
|
5892
5892
|
var DiscrError;
|
|
5893
|
-
(function(
|
|
5894
|
-
|
|
5895
|
-
|
|
5893
|
+
(function(DiscrError) {
|
|
5894
|
+
DiscrError["Tag"] = "tag";
|
|
5895
|
+
DiscrError["Mapping"] = "mapping";
|
|
5896
5896
|
})(DiscrError || (exports.DiscrError = DiscrError = {}));
|
|
5897
5897
|
});
|
|
5898
5898
|
|
|
@@ -6529,9 +6529,9 @@ var require_scope2 = __commonJS(function(exports) {
|
|
|
6529
6529
|
}
|
|
6530
6530
|
}
|
|
6531
6531
|
var UsedValueState;
|
|
6532
|
-
(function(
|
|
6533
|
-
|
|
6534
|
-
|
|
6532
|
+
(function(UsedValueState) {
|
|
6533
|
+
UsedValueState[UsedValueState["Started"] = 0] = "Started";
|
|
6534
|
+
UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
|
|
6535
6535
|
})(UsedValueState = exports.UsedValueState || (exports.UsedValueState = {}));
|
|
6536
6536
|
exports.varKinds = {
|
|
6537
6537
|
const: new code_1.Name("const"),
|
|
@@ -7513,9 +7513,9 @@ var require_util2 = __commonJS(function(exports) {
|
|
|
7513
7513
|
}
|
|
7514
7514
|
exports.useFunc = useFunc;
|
|
7515
7515
|
var Type;
|
|
7516
|
-
(function(
|
|
7517
|
-
|
|
7518
|
-
|
|
7516
|
+
(function(Type) {
|
|
7517
|
+
Type[Type["Num"] = 0] = "Num";
|
|
7518
|
+
Type[Type["Str"] = 1] = "Str";
|
|
7519
7519
|
})(Type = exports.Type || (exports.Type = {}));
|
|
7520
7520
|
function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
|
|
7521
7521
|
if (dataProp instanceof codegen_1.Name) {
|
|
@@ -7785,9 +7785,9 @@ var require_dataType2 = __commonJS(function(exports) {
|
|
|
7785
7785
|
var codegen_1 = require_codegen2();
|
|
7786
7786
|
var util_1 = require_util2();
|
|
7787
7787
|
var DataType;
|
|
7788
|
-
(function(
|
|
7789
|
-
|
|
7790
|
-
|
|
7788
|
+
(function(DataType) {
|
|
7789
|
+
DataType[DataType["Correct"] = 0] = "Correct";
|
|
7790
|
+
DataType[DataType["Wrong"] = 1] = "Wrong";
|
|
7791
7791
|
})(DataType = exports.DataType || (exports.DataType = {}));
|
|
7792
7792
|
function getSchemaTypes(schema) {
|
|
7793
7793
|
const types = getJSONTypes(schema.type);
|
|
@@ -8183,8 +8183,8 @@ var require_keyword2 = __commonJS(function(exports) {
|
|
|
8183
8183
|
gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
8184
8184
|
}
|
|
8185
8185
|
function reportErrs(errors) {
|
|
8186
|
-
var
|
|
8187
|
-
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);
|
|
8188
8188
|
}
|
|
8189
8189
|
}
|
|
8190
8190
|
exports.funcKeywordCode = funcKeywordCode;
|
|
@@ -8420,15 +8420,15 @@ var require_resolve2 = __commonJS(function(exports) {
|
|
|
8420
8420
|
if (parentJsonPtr === undefined)
|
|
8421
8421
|
return;
|
|
8422
8422
|
const fullPath = pathPrefix + jsonPtr;
|
|
8423
|
-
let
|
|
8423
|
+
let baseId = baseIds[parentJsonPtr];
|
|
8424
8424
|
if (typeof sch[schemaId] == "string")
|
|
8425
|
-
|
|
8425
|
+
baseId = addRef.call(this, sch[schemaId]);
|
|
8426
8426
|
addAnchor.call(this, sch.$anchor);
|
|
8427
8427
|
addAnchor.call(this, sch.$dynamicAnchor);
|
|
8428
|
-
baseIds[jsonPtr] =
|
|
8428
|
+
baseIds[jsonPtr] = baseId;
|
|
8429
8429
|
function addRef(ref) {
|
|
8430
8430
|
const _resolve = this.opts.uriResolver.resolve;
|
|
8431
|
-
ref = normalizeId(
|
|
8431
|
+
ref = normalizeId(baseId ? _resolve(baseId, ref) : ref);
|
|
8432
8432
|
if (schemaRefs.has(ref))
|
|
8433
8433
|
throw ambiguos(ref);
|
|
8434
8434
|
schemaRefs.add(ref);
|
|
@@ -9281,22 +9281,22 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9281
9281
|
}
|
|
9282
9282
|
return obj;
|
|
9283
9283
|
}
|
|
9284
|
-
function buildExps(
|
|
9285
|
-
var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$
|
|
9284
|
+
function buildExps(isIRI) {
|
|
9285
|
+
var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
|
|
9286
9286
|
return {
|
|
9287
9287
|
NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
|
|
9288
|
-
NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED
|
|
9289
|
-
NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED
|
|
9290
|
-
NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED
|
|
9291
|
-
NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED
|
|
9292
|
-
NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED
|
|
9293
|
-
NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED
|
|
9294
|
-
ESCAPE: new RegExp(merge("[^]", UNRESERVED
|
|
9295
|
-
UNRESERVED: new RegExp(UNRESERVED
|
|
9296
|
-
OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED
|
|
9297
|
-
PCT_ENCODED: new RegExp(PCT_ENCODED
|
|
9288
|
+
NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
9289
|
+
NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
9290
|
+
NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
9291
|
+
NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
9292
|
+
NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
|
|
9293
|
+
NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
|
|
9294
|
+
ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
9295
|
+
UNRESERVED: new RegExp(UNRESERVED$$, "g"),
|
|
9296
|
+
OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
|
|
9297
|
+
PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
|
|
9298
9298
|
IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
|
|
9299
|
-
IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$
|
|
9299
|
+
IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$")
|
|
9300
9300
|
};
|
|
9301
9301
|
}
|
|
9302
9302
|
var URI_PROTOCOL = buildExps(false);
|
|
@@ -9409,10 +9409,10 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9409
9409
|
}
|
|
9410
9410
|
return output;
|
|
9411
9411
|
}
|
|
9412
|
-
var ucs2encode = function
|
|
9412
|
+
var ucs2encode = function ucs2encode(array) {
|
|
9413
9413
|
return String.fromCodePoint.apply(String, toConsumableArray(array));
|
|
9414
9414
|
};
|
|
9415
|
-
var basicToDigit = function
|
|
9415
|
+
var basicToDigit = function basicToDigit(codePoint) {
|
|
9416
9416
|
if (codePoint - 48 < 10) {
|
|
9417
9417
|
return codePoint - 22;
|
|
9418
9418
|
}
|
|
@@ -9424,10 +9424,10 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9424
9424
|
}
|
|
9425
9425
|
return base;
|
|
9426
9426
|
};
|
|
9427
|
-
var digitToBasic = function
|
|
9427
|
+
var digitToBasic = function digitToBasic(digit, flag) {
|
|
9428
9428
|
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
|
9429
9429
|
};
|
|
9430
|
-
var adapt = function
|
|
9430
|
+
var adapt = function adapt(delta, numPoints, firstTime) {
|
|
9431
9431
|
var k = 0;
|
|
9432
9432
|
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
|
9433
9433
|
delta += floor(delta / numPoints);
|
|
@@ -9436,7 +9436,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9436
9436
|
}
|
|
9437
9437
|
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
9438
9438
|
};
|
|
9439
|
-
var decode = function
|
|
9439
|
+
var decode = function decode(input) {
|
|
9440
9440
|
var output = [];
|
|
9441
9441
|
var inputLength = input.length;
|
|
9442
9442
|
var i = 0;
|
|
@@ -9484,7 +9484,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9484
9484
|
}
|
|
9485
9485
|
return String.fromCodePoint.apply(String, output);
|
|
9486
9486
|
};
|
|
9487
|
-
var encode = function
|
|
9487
|
+
var encode = function encode(input) {
|
|
9488
9488
|
var output = [];
|
|
9489
9489
|
input = ucs2decode(input);
|
|
9490
9490
|
var inputLength = input.length;
|
|
@@ -9598,12 +9598,12 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9598
9598
|
}
|
|
9599
9599
|
return output.join("");
|
|
9600
9600
|
};
|
|
9601
|
-
var toUnicode = function
|
|
9601
|
+
var toUnicode = function toUnicode(input) {
|
|
9602
9602
|
return mapDomain(input, function(string) {
|
|
9603
9603
|
return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
|
|
9604
9604
|
});
|
|
9605
9605
|
};
|
|
9606
|
-
var toASCII = function
|
|
9606
|
+
var toASCII = function toASCII(input) {
|
|
9607
9607
|
return mapDomain(input, function(string) {
|
|
9608
9608
|
return regexNonASCII.test(string) ? "xn--" + encode(string) : string;
|
|
9609
9609
|
});
|
|
@@ -9667,22 +9667,22 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9667
9667
|
return newStr;
|
|
9668
9668
|
}
|
|
9669
9669
|
function _normalizeComponentEncoding(components, protocol) {
|
|
9670
|
-
function
|
|
9670
|
+
function decodeUnreserved(str) {
|
|
9671
9671
|
var decStr = pctDecChars(str);
|
|
9672
9672
|
return !decStr.match(protocol.UNRESERVED) ? str : decStr;
|
|
9673
9673
|
}
|
|
9674
9674
|
if (components.scheme)
|
|
9675
|
-
components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED,
|
|
9675
|
+
components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
|
|
9676
9676
|
if (components.userinfo !== undefined)
|
|
9677
|
-
components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED,
|
|
9677
|
+
components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
9678
9678
|
if (components.host !== undefined)
|
|
9679
|
-
components.host = String(components.host).replace(protocol.PCT_ENCODED,
|
|
9679
|
+
components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
9680
9680
|
if (components.path !== undefined)
|
|
9681
|
-
components.path = String(components.path).replace(protocol.PCT_ENCODED,
|
|
9681
|
+
components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
9682
9682
|
if (components.query !== undefined)
|
|
9683
|
-
components.query = String(components.query).replace(protocol.PCT_ENCODED,
|
|
9683
|
+
components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
9684
9684
|
if (components.fragment !== undefined)
|
|
9685
|
-
components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED,
|
|
9685
|
+
components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
9686
9686
|
return components;
|
|
9687
9687
|
}
|
|
9688
9688
|
function _stripLeadingZeros(str) {
|
|
@@ -9911,12 +9911,12 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9911
9911
|
}
|
|
9912
9912
|
return uriTokens.join("");
|
|
9913
9913
|
}
|
|
9914
|
-
function resolveComponents(
|
|
9914
|
+
function resolveComponents(base, relative) {
|
|
9915
9915
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9916
9916
|
var skipNormalization = arguments[3];
|
|
9917
9917
|
var target = {};
|
|
9918
9918
|
if (!skipNormalization) {
|
|
9919
|
-
|
|
9919
|
+
base = parse(serialize(base, options), options);
|
|
9920
9920
|
relative = parse(serialize(relative, options), options);
|
|
9921
9921
|
}
|
|
9922
9922
|
options = options || {};
|
|
@@ -9936,32 +9936,32 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
9936
9936
|
target.query = relative.query;
|
|
9937
9937
|
} else {
|
|
9938
9938
|
if (!relative.path) {
|
|
9939
|
-
target.path =
|
|
9939
|
+
target.path = base.path;
|
|
9940
9940
|
if (relative.query !== undefined) {
|
|
9941
9941
|
target.query = relative.query;
|
|
9942
9942
|
} else {
|
|
9943
|
-
target.query =
|
|
9943
|
+
target.query = base.query;
|
|
9944
9944
|
}
|
|
9945
9945
|
} else {
|
|
9946
9946
|
if (relative.path.charAt(0) === "/") {
|
|
9947
9947
|
target.path = removeDotSegments(relative.path);
|
|
9948
9948
|
} else {
|
|
9949
|
-
if ((
|
|
9949
|
+
if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
|
|
9950
9950
|
target.path = "/" + relative.path;
|
|
9951
|
-
} else if (!
|
|
9951
|
+
} else if (!base.path) {
|
|
9952
9952
|
target.path = relative.path;
|
|
9953
9953
|
} else {
|
|
9954
|
-
target.path =
|
|
9954
|
+
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
|
9955
9955
|
}
|
|
9956
9956
|
target.path = removeDotSegments(target.path);
|
|
9957
9957
|
}
|
|
9958
9958
|
target.query = relative.query;
|
|
9959
9959
|
}
|
|
9960
|
-
target.userinfo =
|
|
9961
|
-
target.host =
|
|
9962
|
-
target.port =
|
|
9960
|
+
target.userinfo = base.userinfo;
|
|
9961
|
+
target.host = base.host;
|
|
9962
|
+
target.port = base.port;
|
|
9963
9963
|
}
|
|
9964
|
-
target.scheme =
|
|
9964
|
+
target.scheme = base.scheme;
|
|
9965
9965
|
}
|
|
9966
9966
|
target.fragment = relative.fragment;
|
|
9967
9967
|
return target;
|
|
@@ -10000,13 +10000,13 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
10000
10000
|
var handler = {
|
|
10001
10001
|
scheme: "http",
|
|
10002
10002
|
domainHost: true,
|
|
10003
|
-
parse: function
|
|
10003
|
+
parse: function parse(components, options) {
|
|
10004
10004
|
if (!components.host) {
|
|
10005
10005
|
components.error = components.error || "HTTP URIs must have a host.";
|
|
10006
10006
|
}
|
|
10007
10007
|
return components;
|
|
10008
10008
|
},
|
|
10009
|
-
serialize: function
|
|
10009
|
+
serialize: function serialize(components, options) {
|
|
10010
10010
|
var secure = String(components.scheme).toLowerCase() === "https";
|
|
10011
10011
|
if (components.port === (secure ? 443 : 80) || components.port === "") {
|
|
10012
10012
|
components.port = undefined;
|
|
@@ -10029,7 +10029,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
10029
10029
|
var handler$2 = {
|
|
10030
10030
|
scheme: "ws",
|
|
10031
10031
|
domainHost: true,
|
|
10032
|
-
parse: function
|
|
10032
|
+
parse: function parse(components, options) {
|
|
10033
10033
|
var wsComponents = components;
|
|
10034
10034
|
wsComponents.secure = isSecure(wsComponents);
|
|
10035
10035
|
wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
|
|
@@ -10037,7 +10037,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
10037
10037
|
wsComponents.query = undefined;
|
|
10038
10038
|
return wsComponents;
|
|
10039
10039
|
},
|
|
10040
|
-
serialize: function
|
|
10040
|
+
serialize: function serialize(wsComponents, options) {
|
|
10041
10041
|
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
|
|
10042
10042
|
wsComponents.port = undefined;
|
|
10043
10043
|
}
|
|
@@ -10205,7 +10205,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
10205
10205
|
var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
|
|
10206
10206
|
var handler$6 = {
|
|
10207
10207
|
scheme: "urn:uuid",
|
|
10208
|
-
parse: function
|
|
10208
|
+
parse: function parse(urnComponents, options) {
|
|
10209
10209
|
var uuidComponents = urnComponents;
|
|
10210
10210
|
uuidComponents.uuid = uuidComponents.nss;
|
|
10211
10211
|
uuidComponents.nss = undefined;
|
|
@@ -10214,7 +10214,7 @@ var require_uri_all = __commonJS(function(exports, module) {
|
|
|
10214
10214
|
}
|
|
10215
10215
|
return uuidComponents;
|
|
10216
10216
|
},
|
|
10217
|
-
serialize: function
|
|
10217
|
+
serialize: function serialize(uuidComponents, options) {
|
|
10218
10218
|
var urnComponents = uuidComponents;
|
|
10219
10219
|
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
|
10220
10220
|
return urnComponents;
|
|
@@ -10358,7 +10358,7 @@ var require_core3 = __commonJS(function(exports) {
|
|
|
10358
10358
|
};
|
|
10359
10359
|
}
|
|
10360
10360
|
|
|
10361
|
-
class
|
|
10361
|
+
class Ajv {
|
|
10362
10362
|
constructor(opts = {}) {
|
|
10363
10363
|
this.schemas = {};
|
|
10364
10364
|
this.refs = {};
|
|
@@ -10715,9 +10715,9 @@ var require_core3 = __commonJS(function(exports) {
|
|
|
10715
10715
|
}
|
|
10716
10716
|
}
|
|
10717
10717
|
}
|
|
10718
|
-
exports.default =
|
|
10719
|
-
|
|
10720
|
-
|
|
10718
|
+
exports.default = Ajv;
|
|
10719
|
+
Ajv.ValidationError = validation_error_1.default;
|
|
10720
|
+
Ajv.MissingRefError = ref_error_1.default;
|
|
10721
10721
|
function checkOptions(checkOpts, options, msg, log = "error") {
|
|
10722
10722
|
for (const key in checkOpts) {
|
|
10723
10723
|
const opt = key;
|
|
@@ -12408,9 +12408,9 @@ var require_types2 = __commonJS(function(exports) {
|
|
|
12408
12408
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12409
12409
|
exports.DiscrError = undefined;
|
|
12410
12410
|
var DiscrError;
|
|
12411
|
-
(function(
|
|
12412
|
-
|
|
12413
|
-
|
|
12411
|
+
(function(DiscrError) {
|
|
12412
|
+
DiscrError["Tag"] = "tag";
|
|
12413
|
+
DiscrError["Mapping"] = "mapping";
|
|
12414
12414
|
})(DiscrError = exports.DiscrError || (exports.DiscrError = {}));
|
|
12415
12415
|
});
|
|
12416
12416
|
|
|
@@ -12678,7 +12678,7 @@ var require_ajv2 = __commonJS(function(exports, module) {
|
|
|
12678
12678
|
var META_SUPPORT_DATA = ["/properties"];
|
|
12679
12679
|
var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
|
|
12680
12680
|
|
|
12681
|
-
class
|
|
12681
|
+
class Ajv extends core_1.default {
|
|
12682
12682
|
_addVocabularies() {
|
|
12683
12683
|
super._addVocabularies();
|
|
12684
12684
|
draft7_1.default.forEach((v) => this.addVocabulary(v));
|
|
@@ -12697,9 +12697,9 @@ var require_ajv2 = __commonJS(function(exports, module) {
|
|
|
12697
12697
|
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined);
|
|
12698
12698
|
}
|
|
12699
12699
|
}
|
|
12700
|
-
module.exports = exports =
|
|
12700
|
+
module.exports = exports = Ajv;
|
|
12701
12701
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12702
|
-
exports.default =
|
|
12702
|
+
exports.default = Ajv;
|
|
12703
12703
|
var validate_1 = require_validate2();
|
|
12704
12704
|
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
|
|
12705
12705
|
return validate_1.KeywordCxt;
|
|
@@ -12795,9 +12795,9 @@ var require_limit = __commonJS(function(exports) {
|
|
|
12795
12795
|
},
|
|
12796
12796
|
dependencies: ["format"]
|
|
12797
12797
|
};
|
|
12798
|
-
var formatLimitPlugin = (
|
|
12799
|
-
|
|
12800
|
-
return
|
|
12798
|
+
var formatLimitPlugin = (ajv) => {
|
|
12799
|
+
ajv.addKeyword(exports.formatLimitDefinition);
|
|
12800
|
+
return ajv;
|
|
12801
12801
|
};
|
|
12802
12802
|
exports.default = formatLimitPlugin;
|
|
12803
12803
|
});
|
|
@@ -12810,17 +12810,17 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
12810
12810
|
var codegen_1 = require_codegen2();
|
|
12811
12811
|
var fullName = new codegen_1.Name("fullFormats");
|
|
12812
12812
|
var fastName = new codegen_1.Name("fastFormats");
|
|
12813
|
-
var formatsPlugin = (
|
|
12813
|
+
var formatsPlugin = (ajv, opts = { keywords: true }) => {
|
|
12814
12814
|
if (Array.isArray(opts)) {
|
|
12815
|
-
addFormats(
|
|
12816
|
-
return
|
|
12815
|
+
addFormats(ajv, opts, formats_1.fullFormats, fullName);
|
|
12816
|
+
return ajv;
|
|
12817
12817
|
}
|
|
12818
12818
|
const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];
|
|
12819
12819
|
const list = opts.formats || formats_1.formatNames;
|
|
12820
|
-
addFormats(
|
|
12820
|
+
addFormats(ajv, list, formats, exportName);
|
|
12821
12821
|
if (opts.keywords)
|
|
12822
|
-
limit_1.default(
|
|
12823
|
-
return
|
|
12822
|
+
limit_1.default(ajv);
|
|
12823
|
+
return ajv;
|
|
12824
12824
|
};
|
|
12825
12825
|
formatsPlugin.get = (name, mode = "full") => {
|
|
12826
12826
|
const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
|
|
@@ -12829,12 +12829,12 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
12829
12829
|
throw new Error(`Unknown format "${name}"`);
|
|
12830
12830
|
return f;
|
|
12831
12831
|
};
|
|
12832
|
-
function addFormats(
|
|
12832
|
+
function addFormats(ajv, list, fs, exportName) {
|
|
12833
12833
|
var _a;
|
|
12834
12834
|
var _b;
|
|
12835
|
-
(_a = (_b =
|
|
12835
|
+
(_a = (_b = ajv.opts.code).formats) !== null && _a !== undefined || (_b.formats = codegen_1._`require("ajv-formats/dist/formats").${exportName}`);
|
|
12836
12836
|
for (const f of list)
|
|
12837
|
-
|
|
12837
|
+
ajv.addFormat(f, fs[f]);
|
|
12838
12838
|
}
|
|
12839
12839
|
module.exports = exports = formatsPlugin;
|
|
12840
12840
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -13552,13 +13552,13 @@ var require_extend = __commonJS(function(exports, module) {
|
|
|
13552
13552
|
var toStr = Object.prototype.toString;
|
|
13553
13553
|
var defineProperty = Object.defineProperty;
|
|
13554
13554
|
var gOPD = Object.getOwnPropertyDescriptor;
|
|
13555
|
-
var isArray = function
|
|
13555
|
+
var isArray = function isArray(arr) {
|
|
13556
13556
|
if (typeof Array.isArray === "function") {
|
|
13557
13557
|
return Array.isArray(arr);
|
|
13558
13558
|
}
|
|
13559
13559
|
return toStr.call(arr) === "[object Array]";
|
|
13560
13560
|
};
|
|
13561
|
-
var isPlainObject = function
|
|
13561
|
+
var isPlainObject = function isPlainObject(obj) {
|
|
13562
13562
|
if (!obj || toStr.call(obj) !== "[object Object]") {
|
|
13563
13563
|
return false;
|
|
13564
13564
|
}
|
|
@@ -13571,7 +13571,7 @@ var require_extend = __commonJS(function(exports, module) {
|
|
|
13571
13571
|
for (key in obj) {}
|
|
13572
13572
|
return typeof key === "undefined" || hasOwn.call(obj, key);
|
|
13573
13573
|
};
|
|
13574
|
-
var setProperty = function
|
|
13574
|
+
var setProperty = function setProperty(target, options) {
|
|
13575
13575
|
if (defineProperty && options.name === "__proto__") {
|
|
13576
13576
|
defineProperty(target, options.name, {
|
|
13577
13577
|
enumerable: true,
|
|
@@ -13583,7 +13583,7 @@ var require_extend = __commonJS(function(exports, module) {
|
|
|
13583
13583
|
target[options.name] = options.newValue;
|
|
13584
13584
|
}
|
|
13585
13585
|
};
|
|
13586
|
-
var getProperty = function
|
|
13586
|
+
var getProperty = function getProperty(obj, name) {
|
|
13587
13587
|
if (name === "__proto__") {
|
|
13588
13588
|
if (!hasOwn.call(obj, name)) {
|
|
13589
13589
|
return;
|
|
@@ -15745,7 +15745,7 @@ var require_formats2 = __commonJS(function(exports, module) {
|
|
|
15745
15745
|
// ../../node_modules/ajv-formats-draft2019/index.js
|
|
15746
15746
|
var require_ajv_formats_draft2019 = __commonJS(function(exports, module) {
|
|
15747
15747
|
var formats = require_formats2();
|
|
15748
|
-
module.exports = (
|
|
15748
|
+
module.exports = (ajv, options = {}) => {
|
|
15749
15749
|
const allFormats = Object.keys(formats);
|
|
15750
15750
|
let formatsToInstall = allFormats;
|
|
15751
15751
|
if (options.formats) {
|
|
@@ -15754,9 +15754,9 @@ var require_ajv_formats_draft2019 = __commonJS(function(exports, module) {
|
|
|
15754
15754
|
formatsToInstall = options.formats;
|
|
15755
15755
|
}
|
|
15756
15756
|
allFormats.filter((format) => formatsToInstall.includes(format)).forEach((key) => {
|
|
15757
|
-
|
|
15757
|
+
ajv.addFormat(key, formats[key]);
|
|
15758
15758
|
});
|
|
15759
|
-
return
|
|
15759
|
+
return ajv;
|
|
15760
15760
|
};
|
|
15761
15761
|
});
|
|
15762
15762
|
|
|
@@ -15862,6 +15862,15 @@ var ExamplesConfigSchema = {
|
|
|
15862
15862
|
platforms: {
|
|
15863
15863
|
type: "array",
|
|
15864
15864
|
items: { type: "string" }
|
|
15865
|
+
},
|
|
15866
|
+
httpActions: {
|
|
15867
|
+
type: "object",
|
|
15868
|
+
required: ["enabled", "path"],
|
|
15869
|
+
additionalProperties: false,
|
|
15870
|
+
properties: {
|
|
15871
|
+
enabled: { type: "boolean" },
|
|
15872
|
+
path: { type: "string" }
|
|
15873
|
+
}
|
|
15865
15874
|
}
|
|
15866
15875
|
}
|
|
15867
15876
|
};
|
|
@@ -16164,7 +16173,7 @@ var PlatformSchema = {
|
|
|
16164
16173
|
var package_default = {
|
|
16165
16174
|
name: "@sockethub/schemas",
|
|
16166
16175
|
description: "JSON schema files for validating Sockethub Activity Streams",
|
|
16167
|
-
version: "3.0.0-alpha.
|
|
16176
|
+
version: "3.0.0-alpha.25",
|
|
16168
16177
|
type: "module",
|
|
16169
16178
|
private: false,
|
|
16170
16179
|
author: "Nick Jennings <nick@silverbucket.net>",
|
|
@@ -16195,11 +16204,20 @@ var package_default = {
|
|
|
16195
16204
|
import: "./dist/examples-config.js",
|
|
16196
16205
|
default: "./dist/examples-config.js"
|
|
16197
16206
|
},
|
|
16207
|
+
"./service-descriptor": {
|
|
16208
|
+
types: "./dist/service-descriptor.d.ts",
|
|
16209
|
+
bun: "./src/service-descriptor.ts",
|
|
16210
|
+
import: "./dist/service-descriptor.js",
|
|
16211
|
+
default: "./dist/service-descriptor.js"
|
|
16212
|
+
},
|
|
16198
16213
|
"./schemas/json/sockethub-config.json": {
|
|
16199
16214
|
default: "./dist/schemas/json/sockethub-config.json"
|
|
16200
16215
|
},
|
|
16201
16216
|
"./schemas/json/examples-config.json": {
|
|
16202
16217
|
default: "./dist/schemas/json/examples-config.json"
|
|
16218
|
+
},
|
|
16219
|
+
"./schemas/json/service-descriptor.json": {
|
|
16220
|
+
default: "./dist/schemas/json/service-descriptor.json"
|
|
16203
16221
|
}
|
|
16204
16222
|
},
|
|
16205
16223
|
files: [
|
|
@@ -16225,7 +16243,7 @@ var package_default = {
|
|
|
16225
16243
|
"@types/bun": "latest"
|
|
16226
16244
|
},
|
|
16227
16245
|
scripts: {
|
|
16228
|
-
build: "bun ./scripts/export-json-schema.ts && bun ./scripts/export-canonical-assets.ts && bun build src/index.ts src/object-types.ts --outdir dist --target node --format esm --sourcemap=external && bun build src/context.ts src/activity-stream-helper.ts src/examples-config.ts --outdir dist --target browser --format esm --sourcemap=external",
|
|
16246
|
+
build: "bun ./scripts/export-json-schema.ts && bun ./scripts/export-canonical-assets.ts && bun build src/index.ts src/object-types.ts --outdir dist --target node --format esm --sourcemap=external && bun build src/context.ts src/activity-stream-helper.ts src/examples-config.ts src/service-descriptor.ts --outdir dist --target browser --format esm --sourcemap=external",
|
|
16229
16247
|
clean: "rm -rf dist",
|
|
16230
16248
|
"clean:deps": "rm -rf node_modules"
|
|
16231
16249
|
},
|
|
@@ -16234,7 +16252,7 @@ var package_default = {
|
|
|
16234
16252
|
"ajv-formats": "^2.1.1",
|
|
16235
16253
|
"ajv-formats-draft2019": "^1.6.1"
|
|
16236
16254
|
},
|
|
16237
|
-
gitHead: "
|
|
16255
|
+
gitHead: "45acaca6570f8e8429d996ec1d3b95979e8c54a9",
|
|
16238
16256
|
types: "./dist/index.d.ts"
|
|
16239
16257
|
};
|
|
16240
16258
|
|
|
@@ -16627,8 +16645,48 @@ var SockethubConfigSchema = {
|
|
|
16627
16645
|
};
|
|
16628
16646
|
var SockethubConfigSchemaId = versionedSchemaId(SockethubConfigSchema.$id, package_default.version);
|
|
16629
16647
|
|
|
16630
|
-
// src/
|
|
16648
|
+
// src/service-descriptor.ts
|
|
16631
16649
|
var import_ajv2 = __toESM(require_ajv(), 1);
|
|
16650
|
+
|
|
16651
|
+
// src/schemas/service-descriptor.ts
|
|
16652
|
+
var apiVersion = {
|
|
16653
|
+
type: "integer",
|
|
16654
|
+
minimum: 0
|
|
16655
|
+
};
|
|
16656
|
+
var ServiceDescriptorSchema = {
|
|
16657
|
+
$id: "https://sockethub.org/schemas/v/service-descriptor.json",
|
|
16658
|
+
description: "Sockethub HTTP actions service descriptor",
|
|
16659
|
+
type: "object",
|
|
16660
|
+
required: ["name", "apiVersion", "platforms"],
|
|
16661
|
+
additionalProperties: true,
|
|
16662
|
+
properties: {
|
|
16663
|
+
name: { const: "sockethub" },
|
|
16664
|
+
apiVersion,
|
|
16665
|
+
platforms: {
|
|
16666
|
+
type: "array",
|
|
16667
|
+
items: {
|
|
16668
|
+
type: "object",
|
|
16669
|
+
required: ["id", "apiVersion"],
|
|
16670
|
+
additionalProperties: true,
|
|
16671
|
+
properties: {
|
|
16672
|
+
id: { type: "string", minLength: 1 },
|
|
16673
|
+
apiVersion
|
|
16674
|
+
}
|
|
16675
|
+
}
|
|
16676
|
+
}
|
|
16677
|
+
}
|
|
16678
|
+
};
|
|
16679
|
+
|
|
16680
|
+
// src/service-descriptor.ts
|
|
16681
|
+
var ajv2 = new import_ajv2.default({ strictTypes: false, allErrors: true });
|
|
16682
|
+
var validator2;
|
|
16683
|
+
function validateServiceDescriptor(descriptor) {
|
|
16684
|
+
validator2 ??= ajv2.compile(ServiceDescriptorSchema);
|
|
16685
|
+
return validator2(descriptor);
|
|
16686
|
+
}
|
|
16687
|
+
|
|
16688
|
+
// src/validator.ts
|
|
16689
|
+
var import_ajv3 = __toESM(require_ajv(), 1);
|
|
16632
16690
|
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
16633
16691
|
var import_ajv_formats_draft2019 = __toESM(require_ajv_formats_draft2019(), 1);
|
|
16634
16692
|
|
|
@@ -16733,26 +16791,26 @@ function composeFinalError(error, options) {
|
|
|
16733
16791
|
}
|
|
16734
16792
|
|
|
16735
16793
|
// src/validator.ts
|
|
16736
|
-
var
|
|
16737
|
-
import_ajv_formats.default(
|
|
16738
|
-
import_ajv_formats_draft2019.default(
|
|
16794
|
+
var ajv3 = new import_ajv3.default({ strictTypes: false, allErrors: true });
|
|
16795
|
+
import_ajv_formats.default(ajv3);
|
|
16796
|
+
import_ajv_formats_draft2019.default(ajv3);
|
|
16739
16797
|
var schemaURL = "https://sockethub.org/schemas/v0";
|
|
16740
16798
|
var schemas = {};
|
|
16741
16799
|
var validationErrorOptions = {};
|
|
16742
16800
|
var systemContextsRegistered = false;
|
|
16743
16801
|
schemas[`${schemaURL}/activity-stream`] = ActivityStreamSchema;
|
|
16744
16802
|
for (const uri in schemas) {
|
|
16745
|
-
|
|
16803
|
+
ajv3.addSchema(schemas[uri], uri);
|
|
16746
16804
|
}
|
|
16747
16805
|
function registerSystemContext(platformId, contextUrl) {
|
|
16748
16806
|
registerPlatformContext(platformId, contextUrl, `${schemaURL}/context/${platformId}/messages`, `${schemaURL}/context/${platformId}/credentials`);
|
|
16749
16807
|
const messageSchemaRef = `${schemaURL}/context/${platformId}/messages`;
|
|
16750
|
-
if (!
|
|
16751
|
-
|
|
16808
|
+
if (!ajv3.getSchema(messageSchemaRef)) {
|
|
16809
|
+
ajv3.addSchema({}, messageSchemaRef);
|
|
16752
16810
|
}
|
|
16753
16811
|
const credentialsSchemaRef = `${schemaURL}/context/${platformId}/credentials`;
|
|
16754
|
-
if (!
|
|
16755
|
-
|
|
16812
|
+
if (!ajv3.getSchema(credentialsSchemaRef)) {
|
|
16813
|
+
ajv3.addSchema({}, credentialsSchemaRef);
|
|
16756
16814
|
}
|
|
16757
16815
|
}
|
|
16758
16816
|
function registerSystemPlatformContexts() {
|
|
@@ -16765,13 +16823,13 @@ function registerSystemPlatformContexts() {
|
|
|
16765
16823
|
}
|
|
16766
16824
|
registerSystemPlatformContexts();
|
|
16767
16825
|
function handleValidation(schemaRef, msg) {
|
|
16768
|
-
const
|
|
16769
|
-
if (!
|
|
16826
|
+
const validator = ajv3.getSchema(schemaRef);
|
|
16827
|
+
if (!validator) {
|
|
16770
16828
|
return `schema ${schemaRef} not found`;
|
|
16771
16829
|
}
|
|
16772
|
-
const result =
|
|
16830
|
+
const result = validator(msg);
|
|
16773
16831
|
if (!result) {
|
|
16774
|
-
let errorMessage = getErrorMessage(msg,
|
|
16832
|
+
let errorMessage = getErrorMessage(msg, validator.errors, validationErrorOptions);
|
|
16775
16833
|
if (Array.isArray(msg["@context"])) {
|
|
16776
16834
|
const platformContextUrl = resolvePlatformContextUrl(msg);
|
|
16777
16835
|
if (platformContextUrl) {
|
|
@@ -16791,12 +16849,12 @@ function setValidationErrorOptions(options) {
|
|
|
16791
16849
|
var sockethubConfigValidator;
|
|
16792
16850
|
function validateSockethubConfig(config) {
|
|
16793
16851
|
if (!sockethubConfigValidator) {
|
|
16794
|
-
sockethubConfigValidator =
|
|
16852
|
+
sockethubConfigValidator = ajv3.compile(SockethubConfigSchema);
|
|
16795
16853
|
}
|
|
16796
16854
|
if (sockethubConfigValidator(config)) {
|
|
16797
16855
|
return "";
|
|
16798
16856
|
}
|
|
16799
|
-
return
|
|
16857
|
+
return ajv3.errorsText(sockethubConfigValidator.errors, {
|
|
16800
16858
|
dataVar: "config"
|
|
16801
16859
|
});
|
|
16802
16860
|
}
|
|
@@ -16825,7 +16883,7 @@ function validateActivityStreamResponse(msg) {
|
|
|
16825
16883
|
return "";
|
|
16826
16884
|
}
|
|
16827
16885
|
const responsesSchemaId = `${schemaURL}/context/${platformId}/responses`;
|
|
16828
|
-
if (!
|
|
16886
|
+
if (!ajv3.getSchema(responsesSchemaId)) {
|
|
16829
16887
|
return "";
|
|
16830
16888
|
}
|
|
16831
16889
|
return handleValidation(responsesSchemaId, msg);
|
|
@@ -16852,7 +16910,7 @@ function validateCredentials(msg) {
|
|
|
16852
16910
|
return handleValidation(credentialsSchemaId, msg);
|
|
16853
16911
|
}
|
|
16854
16912
|
function validatePlatformSchema(schema) {
|
|
16855
|
-
const validate =
|
|
16913
|
+
const validate = ajv3.compile(PlatformSchema);
|
|
16856
16914
|
const err = validate(schema);
|
|
16857
16915
|
if (!err) {
|
|
16858
16916
|
const validationError = validate.errors[0];
|
|
@@ -16903,12 +16961,12 @@ function validatePlatformSchema(schema) {
|
|
|
16903
16961
|
}
|
|
16904
16962
|
function addPlatformSchema(schema, platform_type) {
|
|
16905
16963
|
const schemaRef = `${schemaURL}/context/${platform_type}`;
|
|
16906
|
-
if (!
|
|
16907
|
-
|
|
16964
|
+
if (!ajv3.getSchema(schemaRef)) {
|
|
16965
|
+
ajv3.addSchema(schema, schemaRef);
|
|
16908
16966
|
}
|
|
16909
16967
|
}
|
|
16910
16968
|
function getPlatformSchema(platform_type) {
|
|
16911
|
-
return
|
|
16969
|
+
return ajv3.getSchema(`${schemaURL}/context/${platform_type}`);
|
|
16912
16970
|
}
|
|
16913
16971
|
function addPlatformContext(platformId, platformContextUrl) {
|
|
16914
16972
|
registerPlatformContext(platformId, platformContextUrl, `${schemaURL}/context/${platformId}/messages`, `${schemaURL}/context/${platformId}/credentials`);
|
|
@@ -16966,6 +17024,7 @@ export {
|
|
|
16966
17024
|
PLATFORM_CONTEXT_PREFIX,
|
|
16967
17025
|
PlatformSchema,
|
|
16968
17026
|
SOCKETHUB_BASE_CONTEXT_URL,
|
|
17027
|
+
ServiceDescriptorSchema,
|
|
16969
17028
|
SockethubConfigSchema,
|
|
16970
17029
|
SockethubConfigSchemaId,
|
|
16971
17030
|
addPlatformContext,
|
|
@@ -16982,7 +17041,8 @@ export {
|
|
|
16982
17041
|
validateCredentials,
|
|
16983
17042
|
validateExamplesConfig,
|
|
16984
17043
|
validatePlatformSchema,
|
|
17044
|
+
validateServiceDescriptor,
|
|
16985
17045
|
validateSockethubConfig
|
|
16986
17046
|
};
|
|
16987
17047
|
|
|
16988
|
-
//# debugId=
|
|
17048
|
+
//# debugId=98E7CBC7E2E9F4CE64756E2164756E21
|