@sockethub/platform-irc 4.0.0-alpha.23 → 4.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/README.md +7 -7
- package/dist/index.d.ts +12 -6
- package/dist/index.js +209 -171
- package/dist/index.js.map +8 -8
- package/dist/schema.d.ts +21 -0
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
18
18
|
return cached;
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
22
|
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
23
|
for (let key of __getOwnPropNames(mod))
|
|
24
24
|
if (!__hasOwnProp.call(to, key))
|
|
@@ -201,9 +201,9 @@ var require_scope = __commonJS(function(exports) {
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
var UsedValueState;
|
|
204
|
-
(function(
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
(function(UsedValueState) {
|
|
205
|
+
UsedValueState[UsedValueState["Started"] = 0] = "Started";
|
|
206
|
+
UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
|
|
207
207
|
})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
|
|
208
208
|
exports.varKinds = {
|
|
209
209
|
const: new code_1.Name("const"),
|
|
@@ -1185,9 +1185,9 @@ var require_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
|
|
|
@@ -16265,13 +16265,6 @@ var require_irc_socket = __commonJS(function(exports, module) {
|
|
|
16265
16265
|
module.exports = IrcSocket;
|
|
16266
16266
|
});
|
|
16267
16267
|
|
|
16268
|
-
// src/octal-hack.js
|
|
16269
|
-
var require_octal_hack = __commonJS(function(exports, module) {
|
|
16270
|
-
module.exports = (content) => {
|
|
16271
|
-
return "\x01ACTION " + content + "\x01";
|
|
16272
|
-
};
|
|
16273
|
-
});
|
|
16274
|
-
|
|
16275
16268
|
// src/index.ts
|
|
16276
16269
|
import net from "node:net";
|
|
16277
16270
|
import tls from "node:tls";
|
|
@@ -16325,7 +16318,7 @@ class ASEmitter {
|
|
|
16325
16318
|
},
|
|
16326
16319
|
target: {
|
|
16327
16320
|
type: "room",
|
|
16328
|
-
id: `${this.server}
|
|
16321
|
+
id: `${channel}@${this.server}`,
|
|
16329
16322
|
name: channel
|
|
16330
16323
|
},
|
|
16331
16324
|
object: {
|
|
@@ -16344,7 +16337,7 @@ class ASEmitter {
|
|
|
16344
16337
|
},
|
|
16345
16338
|
target: {
|
|
16346
16339
|
type: "room",
|
|
16347
|
-
id: `${this.server}
|
|
16340
|
+
id: `${channel}@${this.server}`
|
|
16348
16341
|
},
|
|
16349
16342
|
error: content
|
|
16350
16343
|
});
|
|
@@ -16400,7 +16393,7 @@ class ASEmitter {
|
|
|
16400
16393
|
},
|
|
16401
16394
|
target: {
|
|
16402
16395
|
type: "room",
|
|
16403
|
-
id: `${this.server}
|
|
16396
|
+
id: `${channel}@${this.server}`,
|
|
16404
16397
|
name: channel
|
|
16405
16398
|
},
|
|
16406
16399
|
object: {
|
|
@@ -16420,7 +16413,7 @@ class ASEmitter {
|
|
|
16420
16413
|
},
|
|
16421
16414
|
target: {
|
|
16422
16415
|
type: "room",
|
|
16423
|
-
id: `${this.server}
|
|
16416
|
+
id: `${channel}@${this.server}`,
|
|
16424
16417
|
name: channel
|
|
16425
16418
|
}
|
|
16426
16419
|
});
|
|
@@ -16455,7 +16448,7 @@ class ASEmitter {
|
|
|
16455
16448
|
},
|
|
16456
16449
|
target: {
|
|
16457
16450
|
type: "room",
|
|
16458
|
-
id: `${this.server}
|
|
16451
|
+
id: `${channel}@${this.server}`,
|
|
16459
16452
|
name: channel
|
|
16460
16453
|
},
|
|
16461
16454
|
object: {
|
|
@@ -16467,9 +16460,10 @@ class ASEmitter {
|
|
|
16467
16460
|
privMsg(nick, target, content) {
|
|
16468
16461
|
let type;
|
|
16469
16462
|
let message;
|
|
16470
|
-
|
|
16463
|
+
const action = /^[+-]?\u0001ACTION ([\s\S]*?)\u0001?$/.exec(content);
|
|
16464
|
+
if (action) {
|
|
16471
16465
|
type = "me";
|
|
16472
|
-
message =
|
|
16466
|
+
message = action[1];
|
|
16473
16467
|
} else {
|
|
16474
16468
|
type = "message";
|
|
16475
16469
|
message = content;
|
|
@@ -16484,7 +16478,7 @@ class ASEmitter {
|
|
|
16484
16478
|
},
|
|
16485
16479
|
target: {
|
|
16486
16480
|
type: target.startsWith("#") ? "room" : "person",
|
|
16487
|
-
id: `${this.server}
|
|
16481
|
+
id: `${target}@${this.server}`,
|
|
16488
16482
|
name: target
|
|
16489
16483
|
},
|
|
16490
16484
|
object: {
|
|
@@ -16516,7 +16510,7 @@ class ASEmitter {
|
|
|
16516
16510
|
},
|
|
16517
16511
|
object: {
|
|
16518
16512
|
type: "room",
|
|
16519
|
-
id: `${this.server}
|
|
16513
|
+
id: `${channel}@${this.server}`,
|
|
16520
16514
|
name: channel
|
|
16521
16515
|
}
|
|
16522
16516
|
}
|
|
@@ -16732,7 +16726,7 @@ class IrcToActivityStreams {
|
|
|
16732
16726
|
actor: undefined,
|
|
16733
16727
|
target: {
|
|
16734
16728
|
type: "room",
|
|
16735
|
-
id: `${this.server}
|
|
16729
|
+
id: `${channel}@${this.server}`,
|
|
16736
16730
|
name: channel
|
|
16737
16731
|
},
|
|
16738
16732
|
object: {
|
|
@@ -17035,7 +17029,7 @@ var ActivityStreamSchema = {
|
|
|
17035
17029
|
var package_default = {
|
|
17036
17030
|
name: "@sockethub/schemas",
|
|
17037
17031
|
description: "JSON schema files for validating Sockethub Activity Streams",
|
|
17038
|
-
version: "3.0.0-alpha.
|
|
17032
|
+
version: "3.0.0-alpha.25",
|
|
17039
17033
|
type: "module",
|
|
17040
17034
|
private: false,
|
|
17041
17035
|
author: "Nick Jennings <nick@silverbucket.net>",
|
|
@@ -17066,11 +17060,20 @@ var package_default = {
|
|
|
17066
17060
|
import: "./dist/examples-config.js",
|
|
17067
17061
|
default: "./dist/examples-config.js"
|
|
17068
17062
|
},
|
|
17063
|
+
"./service-descriptor": {
|
|
17064
|
+
types: "./dist/service-descriptor.d.ts",
|
|
17065
|
+
bun: "./src/service-descriptor.ts",
|
|
17066
|
+
import: "./dist/service-descriptor.js",
|
|
17067
|
+
default: "./dist/service-descriptor.js"
|
|
17068
|
+
},
|
|
17069
17069
|
"./schemas/json/sockethub-config.json": {
|
|
17070
17070
|
default: "./dist/schemas/json/sockethub-config.json"
|
|
17071
17071
|
},
|
|
17072
17072
|
"./schemas/json/examples-config.json": {
|
|
17073
17073
|
default: "./dist/schemas/json/examples-config.json"
|
|
17074
|
+
},
|
|
17075
|
+
"./schemas/json/service-descriptor.json": {
|
|
17076
|
+
default: "./dist/schemas/json/service-descriptor.json"
|
|
17074
17077
|
}
|
|
17075
17078
|
},
|
|
17076
17079
|
files: [
|
|
@@ -17096,7 +17099,7 @@ var package_default = {
|
|
|
17096
17099
|
"@types/bun": "latest"
|
|
17097
17100
|
},
|
|
17098
17101
|
scripts: {
|
|
17099
|
-
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",
|
|
17102
|
+
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",
|
|
17100
17103
|
clean: "rm -rf dist",
|
|
17101
17104
|
"clean:deps": "rm -rf node_modules"
|
|
17102
17105
|
},
|
|
@@ -17105,7 +17108,7 @@ var package_default = {
|
|
|
17105
17108
|
"ajv-formats": "^2.1.1",
|
|
17106
17109
|
"ajv-formats-draft2019": "^1.6.1"
|
|
17107
17110
|
},
|
|
17108
|
-
gitHead: "
|
|
17111
|
+
gitHead: "45acaca6570f8e8429d996ec1d3b95979e8c54a9",
|
|
17109
17112
|
types: "./dist/index.d.ts"
|
|
17110
17113
|
};
|
|
17111
17114
|
|
|
@@ -17498,29 +17501,33 @@ var SockethubConfigSchema = {
|
|
|
17498
17501
|
};
|
|
17499
17502
|
var SockethubConfigSchemaId = versionedSchemaId(SockethubConfigSchema.$id, package_default.version);
|
|
17500
17503
|
|
|
17501
|
-
// ../schemas/src/
|
|
17504
|
+
// ../schemas/src/service-descriptor.ts
|
|
17502
17505
|
var import_ajv2 = __toESM(require_ajv(), 1);
|
|
17506
|
+
var ajv2 = new import_ajv2.default({ strictTypes: false, allErrors: true });
|
|
17507
|
+
|
|
17508
|
+
// ../schemas/src/validator.ts
|
|
17509
|
+
var import_ajv3 = __toESM(require_ajv(), 1);
|
|
17503
17510
|
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
17504
17511
|
var import_ajv_formats_draft2019 = __toESM(require_ajv_formats_draft2019(), 1);
|
|
17505
|
-
var
|
|
17506
|
-
import_ajv_formats.default(
|
|
17507
|
-
import_ajv_formats_draft2019.default(
|
|
17512
|
+
var ajv3 = new import_ajv3.default({ strictTypes: false, allErrors: true });
|
|
17513
|
+
import_ajv_formats.default(ajv3);
|
|
17514
|
+
import_ajv_formats_draft2019.default(ajv3);
|
|
17508
17515
|
var schemaURL = "https://sockethub.org/schemas/v0";
|
|
17509
17516
|
var schemas = {};
|
|
17510
17517
|
var systemContextsRegistered = false;
|
|
17511
17518
|
schemas[`${schemaURL}/activity-stream`] = ActivityStreamSchema;
|
|
17512
17519
|
for (const uri in schemas) {
|
|
17513
|
-
|
|
17520
|
+
ajv3.addSchema(schemas[uri], uri);
|
|
17514
17521
|
}
|
|
17515
17522
|
function registerSystemContext(platformId, contextUrl) {
|
|
17516
17523
|
registerPlatformContext(platformId, contextUrl, `${schemaURL}/context/${platformId}/messages`, `${schemaURL}/context/${platformId}/credentials`);
|
|
17517
17524
|
const messageSchemaRef = `${schemaURL}/context/${platformId}/messages`;
|
|
17518
|
-
if (!
|
|
17519
|
-
|
|
17525
|
+
if (!ajv3.getSchema(messageSchemaRef)) {
|
|
17526
|
+
ajv3.addSchema({}, messageSchemaRef);
|
|
17520
17527
|
}
|
|
17521
17528
|
const credentialsSchemaRef = `${schemaURL}/context/${platformId}/credentials`;
|
|
17522
|
-
if (!
|
|
17523
|
-
|
|
17529
|
+
if (!ajv3.getSchema(credentialsSchemaRef)) {
|
|
17530
|
+
ajv3.addSchema({}, credentialsSchemaRef);
|
|
17524
17531
|
}
|
|
17525
17532
|
}
|
|
17526
17533
|
function registerSystemPlatformContexts() {
|
|
@@ -17538,7 +17545,7 @@ var import_irc_socket_sasl = __toESM(require_irc_socket(), 1);
|
|
|
17538
17545
|
var package_default2 = {
|
|
17539
17546
|
name: "@sockethub/platform-irc",
|
|
17540
17547
|
description: "A sockethub platform module implementing IRC functionality",
|
|
17541
|
-
version: "4.0.0-alpha.
|
|
17548
|
+
version: "4.0.0-alpha.25",
|
|
17542
17549
|
private: false,
|
|
17543
17550
|
author: "Nick Jennings <nick@silverbucket.net>",
|
|
17544
17551
|
license: "LGPL-3.0+",
|
|
@@ -17582,23 +17589,23 @@ var package_default2 = {
|
|
|
17582
17589
|
doc: "typedoc --options typedoc.json"
|
|
17583
17590
|
},
|
|
17584
17591
|
dependencies: {
|
|
17585
|
-
"@sockethub/irc2as": "^4.0.0-alpha.
|
|
17592
|
+
"@sockethub/irc2as": "^4.0.0-alpha.25",
|
|
17586
17593
|
"irc-socket-sasl": "^4.1.2"
|
|
17587
17594
|
},
|
|
17588
17595
|
devDependencies: {
|
|
17589
|
-
"@sockethub/schemas": "^3.0.0-alpha.
|
|
17596
|
+
"@sockethub/schemas": "^3.0.0-alpha.25",
|
|
17590
17597
|
"@types/bun": "latest",
|
|
17591
17598
|
typedoc: "^0.28.14"
|
|
17592
17599
|
},
|
|
17593
17600
|
peerDependencies: {
|
|
17594
|
-
"@sockethub/server": "^5.0.0-alpha.
|
|
17601
|
+
"@sockethub/server": "^5.0.0-alpha.25"
|
|
17595
17602
|
},
|
|
17596
17603
|
peerDependenciesMeta: {
|
|
17597
17604
|
"@sockethub/server": {
|
|
17598
17605
|
optional: true
|
|
17599
17606
|
}
|
|
17600
17607
|
},
|
|
17601
|
-
gitHead: "
|
|
17608
|
+
gitHead: "45acaca6570f8e8429d996ec1d3b95979e8c54a9",
|
|
17602
17609
|
types: "./dist/index.d.ts"
|
|
17603
17610
|
};
|
|
17604
17611
|
|
|
@@ -17632,6 +17639,19 @@ var PlatformIrcSchema = {
|
|
|
17632
17639
|
{ $ref: "#/definitions/objectTypes/address" },
|
|
17633
17640
|
{ $ref: "#/definitions/objectTypes/attendance" }
|
|
17634
17641
|
]
|
|
17642
|
+
},
|
|
17643
|
+
target: {
|
|
17644
|
+
type: "object",
|
|
17645
|
+
if: {
|
|
17646
|
+
required: ["type"],
|
|
17647
|
+
properties: { type: { const: "room" } }
|
|
17648
|
+
},
|
|
17649
|
+
then: {
|
|
17650
|
+
required: ["id"],
|
|
17651
|
+
properties: {
|
|
17652
|
+
id: { type: "string", pattern: "^#[^\\s]+@[^\\s@]+$" }
|
|
17653
|
+
}
|
|
17654
|
+
}
|
|
17635
17655
|
}
|
|
17636
17656
|
},
|
|
17637
17657
|
definitions: {
|
|
@@ -17732,7 +17752,7 @@ var PlatformIrcSchema = {
|
|
|
17732
17752
|
required: ["id", "type"],
|
|
17733
17753
|
additionalProperties: false,
|
|
17734
17754
|
properties: {
|
|
17735
|
-
id: { type: "string" },
|
|
17755
|
+
id: { type: "string", pattern: "^#[^\\s]+@[^\\s@]+$" },
|
|
17736
17756
|
type: { enum: ["room"] },
|
|
17737
17757
|
name: { type: "string" }
|
|
17738
17758
|
}
|
|
@@ -17962,6 +17982,7 @@ class IRC {
|
|
|
17962
17982
|
this.log.debug(`join() called for ${job.actor.id}`);
|
|
17963
17983
|
const lineBreakError = ircLineBreakError([
|
|
17964
17984
|
job.actor.name,
|
|
17985
|
+
job.target.id,
|
|
17965
17986
|
job.target.name
|
|
17966
17987
|
]);
|
|
17967
17988
|
if (lineBreakError)
|
|
@@ -17970,30 +17991,41 @@ class IRC {
|
|
|
17970
17991
|
if (err) {
|
|
17971
17992
|
return done(err);
|
|
17972
17993
|
}
|
|
17973
|
-
|
|
17974
|
-
|
|
17994
|
+
const channel = this.resolveIrcTarget(job.target);
|
|
17995
|
+
if (!channel) {
|
|
17996
|
+
return done("IRC room targets must be server-qualified as '#channel@server'");
|
|
17997
|
+
}
|
|
17998
|
+
if (this.channels.has(channel)) {
|
|
17999
|
+
this.log.debug(`channel ${channel} already joined`);
|
|
17975
18000
|
return done();
|
|
17976
18001
|
}
|
|
17977
18002
|
this.jobQueue.push(() => {
|
|
17978
|
-
this.hasJoined(
|
|
18003
|
+
this.hasJoined(channel);
|
|
17979
18004
|
done();
|
|
17980
18005
|
});
|
|
17981
|
-
this.log.debug(`sending join ${
|
|
17982
|
-
client.raw(["JOIN",
|
|
18006
|
+
this.log.debug(`sending join ${channel}`);
|
|
18007
|
+
client.raw(["JOIN", channel]);
|
|
17983
18008
|
client.raw(`PING ${job.actor.name}`);
|
|
17984
18009
|
});
|
|
17985
18010
|
}
|
|
17986
18011
|
leave(job, done) {
|
|
17987
18012
|
this.log.debug(`leave() called for ${job.actor.name}`);
|
|
17988
|
-
const lineBreakError = ircLineBreakError([
|
|
18013
|
+
const lineBreakError = ircLineBreakError([
|
|
18014
|
+
job.target.id,
|
|
18015
|
+
job.target.name
|
|
18016
|
+
]);
|
|
17989
18017
|
if (lineBreakError)
|
|
17990
18018
|
return done(lineBreakError);
|
|
17991
18019
|
this.getClient(job.actor.id, false, (err, client) => {
|
|
17992
18020
|
if (err) {
|
|
17993
18021
|
return done(err);
|
|
17994
18022
|
}
|
|
17995
|
-
this.
|
|
17996
|
-
|
|
18023
|
+
const channel = this.resolveIrcTarget(job.target);
|
|
18024
|
+
if (!channel) {
|
|
18025
|
+
return done("IRC room targets must be server-qualified as '#channel@server'");
|
|
18026
|
+
}
|
|
18027
|
+
this.hasLeft(channel);
|
|
18028
|
+
client.raw(["PART", channel]);
|
|
17997
18029
|
done();
|
|
17998
18030
|
});
|
|
17999
18031
|
}
|
|
@@ -18001,6 +18033,7 @@ class IRC {
|
|
|
18001
18033
|
this.log.debug(`send() called for ${job.actor.id} target: ${job.target.id}`);
|
|
18002
18034
|
const lineBreakError = ircLineBreakError([
|
|
18003
18035
|
job.actor.name,
|
|
18036
|
+
job.target.id,
|
|
18004
18037
|
job.target.name,
|
|
18005
18038
|
job.object?.content
|
|
18006
18039
|
]);
|
|
@@ -18013,6 +18046,10 @@ class IRC {
|
|
|
18013
18046
|
if (typeof job.object.content !== "string") {
|
|
18014
18047
|
return done("cannot send message with no object.content");
|
|
18015
18048
|
}
|
|
18049
|
+
const recipient = this.resolveIrcTarget(job.target);
|
|
18050
|
+
if (!recipient) {
|
|
18051
|
+
return done("IRC room targets must be server-qualified as '#channel@server'");
|
|
18052
|
+
}
|
|
18016
18053
|
const match = /(\/\w+)\s*([\s\S]*)/.exec(job.object.content);
|
|
18017
18054
|
if (match) {
|
|
18018
18055
|
const cmd = match[1].substring(1).toUpperCase();
|
|
@@ -18028,15 +18065,13 @@ class IRC {
|
|
|
18028
18065
|
job.object.content = job.object.content.trim();
|
|
18029
18066
|
}
|
|
18030
18067
|
if (job.object.type === "me") {
|
|
18031
|
-
|
|
18032
|
-
const message = buildCommand(job.object.content);
|
|
18033
|
-
client.raw("PRIVMSG " + job.target.name + " :" + message);
|
|
18068
|
+
client.raw(`PRIVMSG ${recipient} :\x01ACTION ${job.object.content}\x01`);
|
|
18034
18069
|
return done();
|
|
18035
18070
|
}
|
|
18036
18071
|
if (job.object.type === "notice") {
|
|
18037
|
-
client.raw(`NOTICE ${
|
|
18038
|
-
} else if (this.isJoined(
|
|
18039
|
-
client.raw(`PRIVMSG ${
|
|
18072
|
+
client.raw(`NOTICE ${recipient} :${job.object.content}`);
|
|
18073
|
+
} else if (this.isJoined(recipient)) {
|
|
18074
|
+
client.raw(`PRIVMSG ${recipient} :${job.object.content}`);
|
|
18040
18075
|
} else {
|
|
18041
18076
|
return done("cannot send message to a channel of which you've not first joined.");
|
|
18042
18077
|
}
|
|
@@ -18048,6 +18083,7 @@ class IRC {
|
|
|
18048
18083
|
this.log.debug(`update() called for ${job.actor.id}`);
|
|
18049
18084
|
const lineBreakError = ircLineBreakError([
|
|
18050
18085
|
job.actor.name,
|
|
18086
|
+
job.target.id,
|
|
18051
18087
|
job.target.name,
|
|
18052
18088
|
job.object?.content
|
|
18053
18089
|
]);
|
|
@@ -18060,10 +18096,10 @@ class IRC {
|
|
|
18060
18096
|
if (job.object.type === "address") {
|
|
18061
18097
|
this.log.debug(`changing nick from ${job.actor.name} to ${job.target.name}`);
|
|
18062
18098
|
this.handledActors.add(job.target.id);
|
|
18063
|
-
this.jobQueue.push(async (
|
|
18064
|
-
if (
|
|
18099
|
+
this.jobQueue.push(async (err) => {
|
|
18100
|
+
if (err) {
|
|
18065
18101
|
this.handledActors.delete(job.target.id);
|
|
18066
|
-
return done(
|
|
18102
|
+
return done(err);
|
|
18067
18103
|
}
|
|
18068
18104
|
credentials.object.nick = job.target.name;
|
|
18069
18105
|
credentials.actor.id = `${job.target.name}@${credentials.object.server}`;
|
|
@@ -18073,9 +18109,13 @@ class IRC {
|
|
|
18073
18109
|
});
|
|
18074
18110
|
client.raw(["NICK", job.target.name]);
|
|
18075
18111
|
} else if (job.object.type === "topic") {
|
|
18076
|
-
this.
|
|
18112
|
+
const channel = this.resolveIrcTarget(job.target);
|
|
18113
|
+
if (!channel) {
|
|
18114
|
+
return done("IRC room targets must be server-qualified as '#channel@server'");
|
|
18115
|
+
}
|
|
18116
|
+
this.log.debug(`changing topic in channel ${channel}`);
|
|
18077
18117
|
this.jobQueue.push(done);
|
|
18078
|
-
client.raw(["topic",
|
|
18118
|
+
client.raw(["topic", channel, job.object.content]);
|
|
18079
18119
|
} else {
|
|
18080
18120
|
return done(`unknown update action: ${job.object.type}`);
|
|
18081
18121
|
}
|
|
@@ -18095,9 +18135,9 @@ class IRC {
|
|
|
18095
18135
|
return done(err);
|
|
18096
18136
|
}
|
|
18097
18137
|
if (job.object.type === "attendance") {
|
|
18098
|
-
const channel = this.
|
|
18138
|
+
const channel = this.resolveIrcTarget(job.target);
|
|
18099
18139
|
if (!channel) {
|
|
18100
|
-
return done("
|
|
18140
|
+
return done("IRC room targets must be server-qualified as '#channel@server'");
|
|
18101
18141
|
}
|
|
18102
18142
|
this.log.debug(`query() - sending NAMES for ${channel}`);
|
|
18103
18143
|
client.raw(["NAMES", channel]);
|
|
@@ -18123,18 +18163,16 @@ class IRC {
|
|
|
18123
18163
|
this.client = undefined;
|
|
18124
18164
|
return done();
|
|
18125
18165
|
}
|
|
18126
|
-
|
|
18127
|
-
|
|
18128
|
-
|
|
18129
|
-
|
|
18130
|
-
|
|
18131
|
-
|
|
18132
|
-
const candidate = slash >= 0 ? target.id.slice(slash + 1) : target.id;
|
|
18133
|
-
if (candidate.startsWith("#")) {
|
|
18134
|
-
return candidate;
|
|
18166
|
+
resolveIrcTarget(target) {
|
|
18167
|
+
const id = target?.id ?? "";
|
|
18168
|
+
const at = id.lastIndexOf("@");
|
|
18169
|
+
if (target?.type === "room") {
|
|
18170
|
+
if (at <= 0 || !id.startsWith("#") || at === id.length - 1) {
|
|
18171
|
+
return null;
|
|
18135
18172
|
}
|
|
18173
|
+
return id.slice(0, at);
|
|
18136
18174
|
}
|
|
18137
|
-
return;
|
|
18175
|
+
return at !== -1 ? id.slice(0, at) : id;
|
|
18138
18176
|
}
|
|
18139
18177
|
isJoined(channel) {
|
|
18140
18178
|
if (channel.indexOf("#") === 0) {
|
|
@@ -18307,4 +18345,4 @@ export {
|
|
|
18307
18345
|
flattenConnectOptions
|
|
18308
18346
|
};
|
|
18309
18347
|
|
|
18310
|
-
//# debugId=
|
|
18348
|
+
//# debugId=131B00CDCF51F1E564756E2164756E21
|