woodenfish-bot 3.8.5 → 3.8.7
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/es/index.js +11 -479
- package/lib/index.js +11 -479
- package/package.json +15 -14
package/es/index.js
CHANGED
|
@@ -1,59 +1,17 @@
|
|
|
1
|
+
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
2
|
+
import _createClass from '@babel/runtime/helpers/createClass';
|
|
3
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
1
4
|
import resty from 'resty-client';
|
|
5
|
+
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
6
|
+
import _typeof from '@babel/runtime/helpers/typeof';
|
|
7
|
+
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
2
8
|
import fs from 'fs';
|
|
3
9
|
import https from 'https';
|
|
10
|
+
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
|
|
11
|
+
import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
|
|
12
|
+
import _inherits from '@babel/runtime/helpers/inherits';
|
|
4
13
|
import WebSocket, { EventEmitter } from 'ws';
|
|
5
14
|
|
|
6
|
-
function _classCallCheck(a, n) {
|
|
7
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function _typeof$1(o) {
|
|
11
|
-
"@babel/helpers - typeof";
|
|
12
|
-
|
|
13
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
14
|
-
return typeof o;
|
|
15
|
-
} : function (o) {
|
|
16
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
17
|
-
}, _typeof$1(o);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function toPrimitive(t, r) {
|
|
21
|
-
if ("object" != _typeof$1(t) || !t) return t;
|
|
22
|
-
var e = t[Symbol.toPrimitive];
|
|
23
|
-
if (void 0 !== e) {
|
|
24
|
-
var i = e.call(t, r);
|
|
25
|
-
if ("object" != _typeof$1(i)) return i;
|
|
26
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
27
|
-
}
|
|
28
|
-
return (String )(t);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function toPropertyKey(t) {
|
|
32
|
-
var i = toPrimitive(t, "string");
|
|
33
|
-
return "symbol" == _typeof$1(i) ? i : i + "";
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function _defineProperties(e, r) {
|
|
37
|
-
for (var t = 0; t < r.length; t++) {
|
|
38
|
-
var o = r[t];
|
|
39
|
-
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function _createClass(e, r, t) {
|
|
43
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
44
|
-
writable: false
|
|
45
|
-
}), e;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function _defineProperty(e, r, t) {
|
|
49
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
50
|
-
value: t,
|
|
51
|
-
enumerable: true,
|
|
52
|
-
configurable: true,
|
|
53
|
-
writable: true
|
|
54
|
-
}) : e[r] = t, e;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
15
|
var versionMapping = Object.create(null);
|
|
58
16
|
function register(version, api) {
|
|
59
17
|
versionMapping[version] = api;
|
|
@@ -339,402 +297,12 @@ var Guild = /*#__PURE__*/function () {
|
|
|
339
297
|
}]);
|
|
340
298
|
}();
|
|
341
299
|
|
|
342
|
-
|
|
343
|
-
try {
|
|
344
|
-
var i = n[a](c),
|
|
345
|
-
u = i.value;
|
|
346
|
-
} catch (n) {
|
|
347
|
-
return void e(n);
|
|
348
|
-
}
|
|
349
|
-
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
350
|
-
}
|
|
351
|
-
function _asyncToGenerator(n) {
|
|
352
|
-
return function () {
|
|
353
|
-
var t = this,
|
|
354
|
-
e = arguments;
|
|
355
|
-
return new Promise(function (r, o) {
|
|
356
|
-
var a = n.apply(t, e);
|
|
357
|
-
function _next(n) {
|
|
358
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
359
|
-
}
|
|
360
|
-
function _throw(n) {
|
|
361
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
362
|
-
}
|
|
363
|
-
_next(void 0);
|
|
364
|
-
});
|
|
365
|
-
};
|
|
366
|
-
}
|
|
300
|
+
var version = "3.8.7";
|
|
367
301
|
|
|
368
302
|
function getDefaultExportFromCjs (x) {
|
|
369
303
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
370
304
|
}
|
|
371
305
|
|
|
372
|
-
var regeneratorRuntime$1 = {exports: {}};
|
|
373
|
-
|
|
374
|
-
var _typeof = {exports: {}};
|
|
375
|
-
|
|
376
|
-
var hasRequired_typeof;
|
|
377
|
-
|
|
378
|
-
function require_typeof () {
|
|
379
|
-
if (hasRequired_typeof) return _typeof.exports;
|
|
380
|
-
hasRequired_typeof = 1;
|
|
381
|
-
(function (module) {
|
|
382
|
-
function _typeof(o) {
|
|
383
|
-
"@babel/helpers - typeof";
|
|
384
|
-
|
|
385
|
-
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
386
|
-
return typeof o;
|
|
387
|
-
} : function (o) {
|
|
388
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
389
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
|
|
390
|
-
}
|
|
391
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
392
|
-
} (_typeof));
|
|
393
|
-
return _typeof.exports;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
var hasRequiredRegeneratorRuntime;
|
|
397
|
-
|
|
398
|
-
function requireRegeneratorRuntime () {
|
|
399
|
-
if (hasRequiredRegeneratorRuntime) return regeneratorRuntime$1.exports;
|
|
400
|
-
hasRequiredRegeneratorRuntime = 1;
|
|
401
|
-
(function (module) {
|
|
402
|
-
var _typeof = require_typeof()["default"];
|
|
403
|
-
function _regeneratorRuntime() {
|
|
404
|
-
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
405
|
-
return e;
|
|
406
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
407
|
-
var t,
|
|
408
|
-
e = {},
|
|
409
|
-
r = Object.prototype,
|
|
410
|
-
n = r.hasOwnProperty,
|
|
411
|
-
o = Object.defineProperty || function (t, e, r) {
|
|
412
|
-
t[e] = r.value;
|
|
413
|
-
},
|
|
414
|
-
i = "function" == typeof Symbol ? Symbol : {},
|
|
415
|
-
a = i.iterator || "@@iterator",
|
|
416
|
-
c = i.asyncIterator || "@@asyncIterator",
|
|
417
|
-
u = i.toStringTag || "@@toStringTag";
|
|
418
|
-
function define(t, e, r) {
|
|
419
|
-
return Object.defineProperty(t, e, {
|
|
420
|
-
value: r,
|
|
421
|
-
enumerable: true,
|
|
422
|
-
configurable: true,
|
|
423
|
-
writable: true
|
|
424
|
-
}), t[e];
|
|
425
|
-
}
|
|
426
|
-
try {
|
|
427
|
-
define({}, "");
|
|
428
|
-
} catch (t) {
|
|
429
|
-
define = function define(t, e, r) {
|
|
430
|
-
return t[e] = r;
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
function wrap(t, e, r, n) {
|
|
434
|
-
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
435
|
-
a = Object.create(i.prototype),
|
|
436
|
-
c = new Context(n || []);
|
|
437
|
-
return o(a, "_invoke", {
|
|
438
|
-
value: makeInvokeMethod(t, r, c)
|
|
439
|
-
}), a;
|
|
440
|
-
}
|
|
441
|
-
function tryCatch(t, e, r) {
|
|
442
|
-
try {
|
|
443
|
-
return {
|
|
444
|
-
type: "normal",
|
|
445
|
-
arg: t.call(e, r)
|
|
446
|
-
};
|
|
447
|
-
} catch (t) {
|
|
448
|
-
return {
|
|
449
|
-
type: "throw",
|
|
450
|
-
arg: t
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
e.wrap = wrap;
|
|
455
|
-
var h = "suspendedStart",
|
|
456
|
-
l = "suspendedYield",
|
|
457
|
-
f = "executing",
|
|
458
|
-
s = "completed",
|
|
459
|
-
y = {};
|
|
460
|
-
function Generator() {}
|
|
461
|
-
function GeneratorFunction() {}
|
|
462
|
-
function GeneratorFunctionPrototype() {}
|
|
463
|
-
var p = {};
|
|
464
|
-
define(p, a, function () {
|
|
465
|
-
return this;
|
|
466
|
-
});
|
|
467
|
-
var d = Object.getPrototypeOf,
|
|
468
|
-
v = d && d(d(values([])));
|
|
469
|
-
v && v !== r && n.call(v, a) && (p = v);
|
|
470
|
-
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
471
|
-
function defineIteratorMethods(t) {
|
|
472
|
-
["next", "throw", "return"].forEach(function (e) {
|
|
473
|
-
define(t, e, function (t) {
|
|
474
|
-
return this._invoke(e, t);
|
|
475
|
-
});
|
|
476
|
-
});
|
|
477
|
-
}
|
|
478
|
-
function AsyncIterator(t, e) {
|
|
479
|
-
function invoke(r, o, i, a) {
|
|
480
|
-
var c = tryCatch(t[r], t, o);
|
|
481
|
-
if ("throw" !== c.type) {
|
|
482
|
-
var u = c.arg,
|
|
483
|
-
h = u.value;
|
|
484
|
-
return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
485
|
-
invoke("next", t, i, a);
|
|
486
|
-
}, function (t) {
|
|
487
|
-
invoke("throw", t, i, a);
|
|
488
|
-
}) : e.resolve(h).then(function (t) {
|
|
489
|
-
u.value = t, i(u);
|
|
490
|
-
}, function (t) {
|
|
491
|
-
return invoke("throw", t, i, a);
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
a(c.arg);
|
|
495
|
-
}
|
|
496
|
-
var r;
|
|
497
|
-
o(this, "_invoke", {
|
|
498
|
-
value: function value(t, n) {
|
|
499
|
-
function callInvokeWithMethodAndArg() {
|
|
500
|
-
return new e(function (e, r) {
|
|
501
|
-
invoke(t, n, e, r);
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
505
|
-
}
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
function makeInvokeMethod(e, r, n) {
|
|
509
|
-
var o = h;
|
|
510
|
-
return function (i, a) {
|
|
511
|
-
if (o === f) throw Error("Generator is already running");
|
|
512
|
-
if (o === s) {
|
|
513
|
-
if ("throw" === i) throw a;
|
|
514
|
-
return {
|
|
515
|
-
value: t,
|
|
516
|
-
done: true
|
|
517
|
-
};
|
|
518
|
-
}
|
|
519
|
-
for (n.method = i, n.arg = a;;) {
|
|
520
|
-
var c = n.delegate;
|
|
521
|
-
if (c) {
|
|
522
|
-
var u = maybeInvokeDelegate(c, n);
|
|
523
|
-
if (u) {
|
|
524
|
-
if (u === y) continue;
|
|
525
|
-
return u;
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
529
|
-
if (o === h) throw o = s, n.arg;
|
|
530
|
-
n.dispatchException(n.arg);
|
|
531
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
532
|
-
o = f;
|
|
533
|
-
var p = tryCatch(e, r, n);
|
|
534
|
-
if ("normal" === p.type) {
|
|
535
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
536
|
-
return {
|
|
537
|
-
value: p.arg,
|
|
538
|
-
done: n.done
|
|
539
|
-
};
|
|
540
|
-
}
|
|
541
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
542
|
-
}
|
|
543
|
-
};
|
|
544
|
-
}
|
|
545
|
-
function maybeInvokeDelegate(e, r) {
|
|
546
|
-
var n = r.method,
|
|
547
|
-
o = e.iterator[n];
|
|
548
|
-
if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
549
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
550
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
551
|
-
var a = i.arg;
|
|
552
|
-
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
553
|
-
}
|
|
554
|
-
function pushTryEntry(t) {
|
|
555
|
-
var e = {
|
|
556
|
-
tryLoc: t[0]
|
|
557
|
-
};
|
|
558
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
559
|
-
}
|
|
560
|
-
function resetTryEntry(t) {
|
|
561
|
-
var e = t.completion || {};
|
|
562
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
563
|
-
}
|
|
564
|
-
function Context(t) {
|
|
565
|
-
this.tryEntries = [{
|
|
566
|
-
tryLoc: "root"
|
|
567
|
-
}], t.forEach(pushTryEntry, this), this.reset(true);
|
|
568
|
-
}
|
|
569
|
-
function values(e) {
|
|
570
|
-
if (e || "" === e) {
|
|
571
|
-
var r = e[a];
|
|
572
|
-
if (r) return r.call(e);
|
|
573
|
-
if ("function" == typeof e.next) return e;
|
|
574
|
-
if (!isNaN(e.length)) {
|
|
575
|
-
var o = -1,
|
|
576
|
-
i = function next() {
|
|
577
|
-
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = false, next;
|
|
578
|
-
return next.value = t, next.done = true, next;
|
|
579
|
-
};
|
|
580
|
-
return i.next = i;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
throw new TypeError(_typeof(e) + " is not iterable");
|
|
584
|
-
}
|
|
585
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
586
|
-
value: GeneratorFunctionPrototype,
|
|
587
|
-
configurable: true
|
|
588
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
589
|
-
value: GeneratorFunction,
|
|
590
|
-
configurable: true
|
|
591
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
592
|
-
var e = "function" == typeof t && t.constructor;
|
|
593
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
594
|
-
}, e.mark = function (t) {
|
|
595
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
596
|
-
}, e.awrap = function (t) {
|
|
597
|
-
return {
|
|
598
|
-
__await: t
|
|
599
|
-
};
|
|
600
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
601
|
-
return this;
|
|
602
|
-
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
603
|
-
void 0 === i && (i = Promise);
|
|
604
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
605
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
606
|
-
return t.done ? t.value : a.next();
|
|
607
|
-
});
|
|
608
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
609
|
-
return this;
|
|
610
|
-
}), define(g, "toString", function () {
|
|
611
|
-
return "[object Generator]";
|
|
612
|
-
}), e.keys = function (t) {
|
|
613
|
-
var e = Object(t),
|
|
614
|
-
r = [];
|
|
615
|
-
for (var n in e) r.push(n);
|
|
616
|
-
return r.reverse(), function next() {
|
|
617
|
-
for (; r.length;) {
|
|
618
|
-
var t = r.pop();
|
|
619
|
-
if (t in e) return next.value = t, next.done = false, next;
|
|
620
|
-
}
|
|
621
|
-
return next.done = true, next;
|
|
622
|
-
};
|
|
623
|
-
}, e.values = values, Context.prototype = {
|
|
624
|
-
constructor: Context,
|
|
625
|
-
reset: function reset(e) {
|
|
626
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
627
|
-
},
|
|
628
|
-
stop: function stop() {
|
|
629
|
-
this.done = true;
|
|
630
|
-
var t = this.tryEntries[0].completion;
|
|
631
|
-
if ("throw" === t.type) throw t.arg;
|
|
632
|
-
return this.rval;
|
|
633
|
-
},
|
|
634
|
-
dispatchException: function dispatchException(e) {
|
|
635
|
-
if (this.done) throw e;
|
|
636
|
-
var r = this;
|
|
637
|
-
function handle(n, o) {
|
|
638
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
639
|
-
}
|
|
640
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
641
|
-
var i = this.tryEntries[o],
|
|
642
|
-
a = i.completion;
|
|
643
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
644
|
-
if (i.tryLoc <= this.prev) {
|
|
645
|
-
var c = n.call(i, "catchLoc"),
|
|
646
|
-
u = n.call(i, "finallyLoc");
|
|
647
|
-
if (c && u) {
|
|
648
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
649
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
650
|
-
} else if (c) {
|
|
651
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
652
|
-
} else {
|
|
653
|
-
if (!u) throw Error("try statement without catch or finally");
|
|
654
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
},
|
|
659
|
-
abrupt: function abrupt(t, e) {
|
|
660
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
661
|
-
var o = this.tryEntries[r];
|
|
662
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
663
|
-
var i = o;
|
|
664
|
-
break;
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
668
|
-
var a = i ? i.completion : {};
|
|
669
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
670
|
-
},
|
|
671
|
-
complete: function complete(t, e) {
|
|
672
|
-
if ("throw" === t.type) throw t.arg;
|
|
673
|
-
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
674
|
-
},
|
|
675
|
-
finish: function finish(t) {
|
|
676
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
677
|
-
var r = this.tryEntries[e];
|
|
678
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
679
|
-
}
|
|
680
|
-
},
|
|
681
|
-
"catch": function _catch(t) {
|
|
682
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
683
|
-
var r = this.tryEntries[e];
|
|
684
|
-
if (r.tryLoc === t) {
|
|
685
|
-
var n = r.completion;
|
|
686
|
-
if ("throw" === n.type) {
|
|
687
|
-
var o = n.arg;
|
|
688
|
-
resetTryEntry(r);
|
|
689
|
-
}
|
|
690
|
-
return o;
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
throw Error("illegal catch attempt");
|
|
694
|
-
},
|
|
695
|
-
delegateYield: function delegateYield(e, r, n) {
|
|
696
|
-
return this.delegate = {
|
|
697
|
-
iterator: values(e),
|
|
698
|
-
resultName: r,
|
|
699
|
-
nextLoc: n
|
|
700
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
701
|
-
}
|
|
702
|
-
}, e;
|
|
703
|
-
}
|
|
704
|
-
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
705
|
-
} (regeneratorRuntime$1));
|
|
706
|
-
return regeneratorRuntime$1.exports;
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
var regenerator;
|
|
710
|
-
var hasRequiredRegenerator;
|
|
711
|
-
|
|
712
|
-
function requireRegenerator () {
|
|
713
|
-
if (hasRequiredRegenerator) return regenerator;
|
|
714
|
-
hasRequiredRegenerator = 1;
|
|
715
|
-
// TODO(Babel 8): Remove this file.
|
|
716
|
-
|
|
717
|
-
var runtime = requireRegeneratorRuntime()();
|
|
718
|
-
regenerator = runtime;
|
|
719
|
-
|
|
720
|
-
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
721
|
-
try {
|
|
722
|
-
regeneratorRuntime = runtime;
|
|
723
|
-
} catch (accidentalStrictMode) {
|
|
724
|
-
if (typeof globalThis === "object") {
|
|
725
|
-
globalThis.regeneratorRuntime = runtime;
|
|
726
|
-
} else {
|
|
727
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
return regenerator;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
var regeneratorExports = requireRegenerator();
|
|
734
|
-
var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regeneratorExports);
|
|
735
|
-
|
|
736
|
-
var version = "3.8.5";
|
|
737
|
-
|
|
738
306
|
var loglevel$1 = {exports: {}};
|
|
739
307
|
|
|
740
308
|
/*
|
|
@@ -1112,7 +680,7 @@ var BotLogger = log;
|
|
|
1112
680
|
// 转为对象
|
|
1113
681
|
var toObject = function toObject(data) {
|
|
1114
682
|
if (Buffer.isBuffer(data)) return JSON.parse(data.toString());
|
|
1115
|
-
if (_typeof
|
|
683
|
+
if (_typeof(data) === 'object') return data;
|
|
1116
684
|
if (typeof data === 'string') return JSON.parse(data);
|
|
1117
685
|
// return String(data);
|
|
1118
686
|
};
|
|
@@ -2444,42 +2012,6 @@ function v1Setup() {
|
|
|
2444
2012
|
register(apiVersion, OpenAPI);
|
|
2445
2013
|
}
|
|
2446
2014
|
|
|
2447
|
-
function _assertThisInitialized(e) {
|
|
2448
|
-
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2449
|
-
return e;
|
|
2450
|
-
}
|
|
2451
|
-
|
|
2452
|
-
function _possibleConstructorReturn(t, e) {
|
|
2453
|
-
if (e && ("object" == _typeof$1(e) || "function" == typeof e)) return e;
|
|
2454
|
-
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2455
|
-
return _assertThisInitialized(t);
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
function _getPrototypeOf(t) {
|
|
2459
|
-
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
2460
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2461
|
-
}, _getPrototypeOf(t);
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
function _setPrototypeOf(t, e) {
|
|
2465
|
-
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
2466
|
-
return t.__proto__ = e, t;
|
|
2467
|
-
}, _setPrototypeOf(t, e);
|
|
2468
|
-
}
|
|
2469
|
-
|
|
2470
|
-
function _inherits(t, e) {
|
|
2471
|
-
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
2472
|
-
t.prototype = Object.create(e && e.prototype, {
|
|
2473
|
-
constructor: {
|
|
2474
|
-
value: t,
|
|
2475
|
-
writable: true,
|
|
2476
|
-
configurable: true
|
|
2477
|
-
}
|
|
2478
|
-
}), Object.defineProperty(t, "prototype", {
|
|
2479
|
-
writable: false
|
|
2480
|
-
}), e && _setPrototypeOf(t, e);
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
2015
|
// websocket建立成功回包
|
|
2484
2016
|
|
|
2485
2017
|
// 发送心跳入参
|
package/lib/index.js
CHANGED
|
@@ -1,61 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
|
|
4
|
+
var _createClass = require('@babel/runtime/helpers/createClass');
|
|
5
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
3
6
|
var resty = require('resty-client');
|
|
7
|
+
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
8
|
+
var _typeof = require('@babel/runtime/helpers/typeof');
|
|
9
|
+
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
4
10
|
var fs = require('fs');
|
|
5
11
|
var https = require('https');
|
|
12
|
+
var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstructorReturn');
|
|
13
|
+
var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf');
|
|
14
|
+
var _inherits = require('@babel/runtime/helpers/inherits');
|
|
6
15
|
var WebSocket = require('ws');
|
|
7
16
|
|
|
8
|
-
function _classCallCheck(a, n) {
|
|
9
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function _typeof$1(o) {
|
|
13
|
-
"@babel/helpers - typeof";
|
|
14
|
-
|
|
15
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
16
|
-
return typeof o;
|
|
17
|
-
} : function (o) {
|
|
18
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
19
|
-
}, _typeof$1(o);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function toPrimitive(t, r) {
|
|
23
|
-
if ("object" != _typeof$1(t) || !t) return t;
|
|
24
|
-
var e = t[Symbol.toPrimitive];
|
|
25
|
-
if (void 0 !== e) {
|
|
26
|
-
var i = e.call(t, r);
|
|
27
|
-
if ("object" != _typeof$1(i)) return i;
|
|
28
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
29
|
-
}
|
|
30
|
-
return (String )(t);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function toPropertyKey(t) {
|
|
34
|
-
var i = toPrimitive(t, "string");
|
|
35
|
-
return "symbol" == _typeof$1(i) ? i : i + "";
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function _defineProperties(e, r) {
|
|
39
|
-
for (var t = 0; t < r.length; t++) {
|
|
40
|
-
var o = r[t];
|
|
41
|
-
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function _createClass(e, r, t) {
|
|
45
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
46
|
-
writable: false
|
|
47
|
-
}), e;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function _defineProperty(e, r, t) {
|
|
51
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
52
|
-
value: t,
|
|
53
|
-
enumerable: true,
|
|
54
|
-
configurable: true,
|
|
55
|
-
writable: true
|
|
56
|
-
}) : e[r] = t, e;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
17
|
var versionMapping = Object.create(null);
|
|
60
18
|
function register(version, api) {
|
|
61
19
|
versionMapping[version] = api;
|
|
@@ -341,402 +299,12 @@ var Guild = /*#__PURE__*/function () {
|
|
|
341
299
|
}]);
|
|
342
300
|
}();
|
|
343
301
|
|
|
344
|
-
|
|
345
|
-
try {
|
|
346
|
-
var i = n[a](c),
|
|
347
|
-
u = i.value;
|
|
348
|
-
} catch (n) {
|
|
349
|
-
return void e(n);
|
|
350
|
-
}
|
|
351
|
-
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
352
|
-
}
|
|
353
|
-
function _asyncToGenerator(n) {
|
|
354
|
-
return function () {
|
|
355
|
-
var t = this,
|
|
356
|
-
e = arguments;
|
|
357
|
-
return new Promise(function (r, o) {
|
|
358
|
-
var a = n.apply(t, e);
|
|
359
|
-
function _next(n) {
|
|
360
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
361
|
-
}
|
|
362
|
-
function _throw(n) {
|
|
363
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
364
|
-
}
|
|
365
|
-
_next(void 0);
|
|
366
|
-
});
|
|
367
|
-
};
|
|
368
|
-
}
|
|
302
|
+
var version = "3.8.7";
|
|
369
303
|
|
|
370
304
|
function getDefaultExportFromCjs (x) {
|
|
371
305
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
372
306
|
}
|
|
373
307
|
|
|
374
|
-
var regeneratorRuntime$1 = {exports: {}};
|
|
375
|
-
|
|
376
|
-
var _typeof = {exports: {}};
|
|
377
|
-
|
|
378
|
-
var hasRequired_typeof;
|
|
379
|
-
|
|
380
|
-
function require_typeof () {
|
|
381
|
-
if (hasRequired_typeof) return _typeof.exports;
|
|
382
|
-
hasRequired_typeof = 1;
|
|
383
|
-
(function (module) {
|
|
384
|
-
function _typeof(o) {
|
|
385
|
-
"@babel/helpers - typeof";
|
|
386
|
-
|
|
387
|
-
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
388
|
-
return typeof o;
|
|
389
|
-
} : function (o) {
|
|
390
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
391
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
|
|
392
|
-
}
|
|
393
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
394
|
-
} (_typeof));
|
|
395
|
-
return _typeof.exports;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
var hasRequiredRegeneratorRuntime;
|
|
399
|
-
|
|
400
|
-
function requireRegeneratorRuntime () {
|
|
401
|
-
if (hasRequiredRegeneratorRuntime) return regeneratorRuntime$1.exports;
|
|
402
|
-
hasRequiredRegeneratorRuntime = 1;
|
|
403
|
-
(function (module) {
|
|
404
|
-
var _typeof = require_typeof()["default"];
|
|
405
|
-
function _regeneratorRuntime() {
|
|
406
|
-
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
407
|
-
return e;
|
|
408
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
409
|
-
var t,
|
|
410
|
-
e = {},
|
|
411
|
-
r = Object.prototype,
|
|
412
|
-
n = r.hasOwnProperty,
|
|
413
|
-
o = Object.defineProperty || function (t, e, r) {
|
|
414
|
-
t[e] = r.value;
|
|
415
|
-
},
|
|
416
|
-
i = "function" == typeof Symbol ? Symbol : {},
|
|
417
|
-
a = i.iterator || "@@iterator",
|
|
418
|
-
c = i.asyncIterator || "@@asyncIterator",
|
|
419
|
-
u = i.toStringTag || "@@toStringTag";
|
|
420
|
-
function define(t, e, r) {
|
|
421
|
-
return Object.defineProperty(t, e, {
|
|
422
|
-
value: r,
|
|
423
|
-
enumerable: true,
|
|
424
|
-
configurable: true,
|
|
425
|
-
writable: true
|
|
426
|
-
}), t[e];
|
|
427
|
-
}
|
|
428
|
-
try {
|
|
429
|
-
define({}, "");
|
|
430
|
-
} catch (t) {
|
|
431
|
-
define = function define(t, e, r) {
|
|
432
|
-
return t[e] = r;
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
function wrap(t, e, r, n) {
|
|
436
|
-
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
437
|
-
a = Object.create(i.prototype),
|
|
438
|
-
c = new Context(n || []);
|
|
439
|
-
return o(a, "_invoke", {
|
|
440
|
-
value: makeInvokeMethod(t, r, c)
|
|
441
|
-
}), a;
|
|
442
|
-
}
|
|
443
|
-
function tryCatch(t, e, r) {
|
|
444
|
-
try {
|
|
445
|
-
return {
|
|
446
|
-
type: "normal",
|
|
447
|
-
arg: t.call(e, r)
|
|
448
|
-
};
|
|
449
|
-
} catch (t) {
|
|
450
|
-
return {
|
|
451
|
-
type: "throw",
|
|
452
|
-
arg: t
|
|
453
|
-
};
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
e.wrap = wrap;
|
|
457
|
-
var h = "suspendedStart",
|
|
458
|
-
l = "suspendedYield",
|
|
459
|
-
f = "executing",
|
|
460
|
-
s = "completed",
|
|
461
|
-
y = {};
|
|
462
|
-
function Generator() {}
|
|
463
|
-
function GeneratorFunction() {}
|
|
464
|
-
function GeneratorFunctionPrototype() {}
|
|
465
|
-
var p = {};
|
|
466
|
-
define(p, a, function () {
|
|
467
|
-
return this;
|
|
468
|
-
});
|
|
469
|
-
var d = Object.getPrototypeOf,
|
|
470
|
-
v = d && d(d(values([])));
|
|
471
|
-
v && v !== r && n.call(v, a) && (p = v);
|
|
472
|
-
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
473
|
-
function defineIteratorMethods(t) {
|
|
474
|
-
["next", "throw", "return"].forEach(function (e) {
|
|
475
|
-
define(t, e, function (t) {
|
|
476
|
-
return this._invoke(e, t);
|
|
477
|
-
});
|
|
478
|
-
});
|
|
479
|
-
}
|
|
480
|
-
function AsyncIterator(t, e) {
|
|
481
|
-
function invoke(r, o, i, a) {
|
|
482
|
-
var c = tryCatch(t[r], t, o);
|
|
483
|
-
if ("throw" !== c.type) {
|
|
484
|
-
var u = c.arg,
|
|
485
|
-
h = u.value;
|
|
486
|
-
return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
487
|
-
invoke("next", t, i, a);
|
|
488
|
-
}, function (t) {
|
|
489
|
-
invoke("throw", t, i, a);
|
|
490
|
-
}) : e.resolve(h).then(function (t) {
|
|
491
|
-
u.value = t, i(u);
|
|
492
|
-
}, function (t) {
|
|
493
|
-
return invoke("throw", t, i, a);
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
a(c.arg);
|
|
497
|
-
}
|
|
498
|
-
var r;
|
|
499
|
-
o(this, "_invoke", {
|
|
500
|
-
value: function value(t, n) {
|
|
501
|
-
function callInvokeWithMethodAndArg() {
|
|
502
|
-
return new e(function (e, r) {
|
|
503
|
-
invoke(t, n, e, r);
|
|
504
|
-
});
|
|
505
|
-
}
|
|
506
|
-
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
507
|
-
}
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
function makeInvokeMethod(e, r, n) {
|
|
511
|
-
var o = h;
|
|
512
|
-
return function (i, a) {
|
|
513
|
-
if (o === f) throw Error("Generator is already running");
|
|
514
|
-
if (o === s) {
|
|
515
|
-
if ("throw" === i) throw a;
|
|
516
|
-
return {
|
|
517
|
-
value: t,
|
|
518
|
-
done: true
|
|
519
|
-
};
|
|
520
|
-
}
|
|
521
|
-
for (n.method = i, n.arg = a;;) {
|
|
522
|
-
var c = n.delegate;
|
|
523
|
-
if (c) {
|
|
524
|
-
var u = maybeInvokeDelegate(c, n);
|
|
525
|
-
if (u) {
|
|
526
|
-
if (u === y) continue;
|
|
527
|
-
return u;
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
531
|
-
if (o === h) throw o = s, n.arg;
|
|
532
|
-
n.dispatchException(n.arg);
|
|
533
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
534
|
-
o = f;
|
|
535
|
-
var p = tryCatch(e, r, n);
|
|
536
|
-
if ("normal" === p.type) {
|
|
537
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
538
|
-
return {
|
|
539
|
-
value: p.arg,
|
|
540
|
-
done: n.done
|
|
541
|
-
};
|
|
542
|
-
}
|
|
543
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
544
|
-
}
|
|
545
|
-
};
|
|
546
|
-
}
|
|
547
|
-
function maybeInvokeDelegate(e, r) {
|
|
548
|
-
var n = r.method,
|
|
549
|
-
o = e.iterator[n];
|
|
550
|
-
if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
551
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
552
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
553
|
-
var a = i.arg;
|
|
554
|
-
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
555
|
-
}
|
|
556
|
-
function pushTryEntry(t) {
|
|
557
|
-
var e = {
|
|
558
|
-
tryLoc: t[0]
|
|
559
|
-
};
|
|
560
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
561
|
-
}
|
|
562
|
-
function resetTryEntry(t) {
|
|
563
|
-
var e = t.completion || {};
|
|
564
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
565
|
-
}
|
|
566
|
-
function Context(t) {
|
|
567
|
-
this.tryEntries = [{
|
|
568
|
-
tryLoc: "root"
|
|
569
|
-
}], t.forEach(pushTryEntry, this), this.reset(true);
|
|
570
|
-
}
|
|
571
|
-
function values(e) {
|
|
572
|
-
if (e || "" === e) {
|
|
573
|
-
var r = e[a];
|
|
574
|
-
if (r) return r.call(e);
|
|
575
|
-
if ("function" == typeof e.next) return e;
|
|
576
|
-
if (!isNaN(e.length)) {
|
|
577
|
-
var o = -1,
|
|
578
|
-
i = function next() {
|
|
579
|
-
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = false, next;
|
|
580
|
-
return next.value = t, next.done = true, next;
|
|
581
|
-
};
|
|
582
|
-
return i.next = i;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
throw new TypeError(_typeof(e) + " is not iterable");
|
|
586
|
-
}
|
|
587
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
588
|
-
value: GeneratorFunctionPrototype,
|
|
589
|
-
configurable: true
|
|
590
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
591
|
-
value: GeneratorFunction,
|
|
592
|
-
configurable: true
|
|
593
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
594
|
-
var e = "function" == typeof t && t.constructor;
|
|
595
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
596
|
-
}, e.mark = function (t) {
|
|
597
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
598
|
-
}, e.awrap = function (t) {
|
|
599
|
-
return {
|
|
600
|
-
__await: t
|
|
601
|
-
};
|
|
602
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
603
|
-
return this;
|
|
604
|
-
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
605
|
-
void 0 === i && (i = Promise);
|
|
606
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
607
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
608
|
-
return t.done ? t.value : a.next();
|
|
609
|
-
});
|
|
610
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
611
|
-
return this;
|
|
612
|
-
}), define(g, "toString", function () {
|
|
613
|
-
return "[object Generator]";
|
|
614
|
-
}), e.keys = function (t) {
|
|
615
|
-
var e = Object(t),
|
|
616
|
-
r = [];
|
|
617
|
-
for (var n in e) r.push(n);
|
|
618
|
-
return r.reverse(), function next() {
|
|
619
|
-
for (; r.length;) {
|
|
620
|
-
var t = r.pop();
|
|
621
|
-
if (t in e) return next.value = t, next.done = false, next;
|
|
622
|
-
}
|
|
623
|
-
return next.done = true, next;
|
|
624
|
-
};
|
|
625
|
-
}, e.values = values, Context.prototype = {
|
|
626
|
-
constructor: Context,
|
|
627
|
-
reset: function reset(e) {
|
|
628
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
629
|
-
},
|
|
630
|
-
stop: function stop() {
|
|
631
|
-
this.done = true;
|
|
632
|
-
var t = this.tryEntries[0].completion;
|
|
633
|
-
if ("throw" === t.type) throw t.arg;
|
|
634
|
-
return this.rval;
|
|
635
|
-
},
|
|
636
|
-
dispatchException: function dispatchException(e) {
|
|
637
|
-
if (this.done) throw e;
|
|
638
|
-
var r = this;
|
|
639
|
-
function handle(n, o) {
|
|
640
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
641
|
-
}
|
|
642
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
643
|
-
var i = this.tryEntries[o],
|
|
644
|
-
a = i.completion;
|
|
645
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
646
|
-
if (i.tryLoc <= this.prev) {
|
|
647
|
-
var c = n.call(i, "catchLoc"),
|
|
648
|
-
u = n.call(i, "finallyLoc");
|
|
649
|
-
if (c && u) {
|
|
650
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
651
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
652
|
-
} else if (c) {
|
|
653
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
654
|
-
} else {
|
|
655
|
-
if (!u) throw Error("try statement without catch or finally");
|
|
656
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
},
|
|
661
|
-
abrupt: function abrupt(t, e) {
|
|
662
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
663
|
-
var o = this.tryEntries[r];
|
|
664
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
665
|
-
var i = o;
|
|
666
|
-
break;
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
670
|
-
var a = i ? i.completion : {};
|
|
671
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
672
|
-
},
|
|
673
|
-
complete: function complete(t, e) {
|
|
674
|
-
if ("throw" === t.type) throw t.arg;
|
|
675
|
-
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
676
|
-
},
|
|
677
|
-
finish: function finish(t) {
|
|
678
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
679
|
-
var r = this.tryEntries[e];
|
|
680
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
681
|
-
}
|
|
682
|
-
},
|
|
683
|
-
"catch": function _catch(t) {
|
|
684
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
685
|
-
var r = this.tryEntries[e];
|
|
686
|
-
if (r.tryLoc === t) {
|
|
687
|
-
var n = r.completion;
|
|
688
|
-
if ("throw" === n.type) {
|
|
689
|
-
var o = n.arg;
|
|
690
|
-
resetTryEntry(r);
|
|
691
|
-
}
|
|
692
|
-
return o;
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
throw Error("illegal catch attempt");
|
|
696
|
-
},
|
|
697
|
-
delegateYield: function delegateYield(e, r, n) {
|
|
698
|
-
return this.delegate = {
|
|
699
|
-
iterator: values(e),
|
|
700
|
-
resultName: r,
|
|
701
|
-
nextLoc: n
|
|
702
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
703
|
-
}
|
|
704
|
-
}, e;
|
|
705
|
-
}
|
|
706
|
-
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
707
|
-
} (regeneratorRuntime$1));
|
|
708
|
-
return regeneratorRuntime$1.exports;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
var regenerator;
|
|
712
|
-
var hasRequiredRegenerator;
|
|
713
|
-
|
|
714
|
-
function requireRegenerator () {
|
|
715
|
-
if (hasRequiredRegenerator) return regenerator;
|
|
716
|
-
hasRequiredRegenerator = 1;
|
|
717
|
-
// TODO(Babel 8): Remove this file.
|
|
718
|
-
|
|
719
|
-
var runtime = requireRegeneratorRuntime()();
|
|
720
|
-
regenerator = runtime;
|
|
721
|
-
|
|
722
|
-
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
723
|
-
try {
|
|
724
|
-
regeneratorRuntime = runtime;
|
|
725
|
-
} catch (accidentalStrictMode) {
|
|
726
|
-
if (typeof globalThis === "object") {
|
|
727
|
-
globalThis.regeneratorRuntime = runtime;
|
|
728
|
-
} else {
|
|
729
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
return regenerator;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
var regeneratorExports = requireRegenerator();
|
|
736
|
-
var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regeneratorExports);
|
|
737
|
-
|
|
738
|
-
var version = "3.8.5";
|
|
739
|
-
|
|
740
308
|
var loglevel$1 = {exports: {}};
|
|
741
309
|
|
|
742
310
|
/*
|
|
@@ -1114,7 +682,7 @@ var BotLogger = log;
|
|
|
1114
682
|
// 转为对象
|
|
1115
683
|
var toObject = function toObject(data) {
|
|
1116
684
|
if (Buffer.isBuffer(data)) return JSON.parse(data.toString());
|
|
1117
|
-
if (_typeof
|
|
685
|
+
if (_typeof(data) === 'object') return data;
|
|
1118
686
|
if (typeof data === 'string') return JSON.parse(data);
|
|
1119
687
|
// return String(data);
|
|
1120
688
|
};
|
|
@@ -2446,42 +2014,6 @@ function v1Setup() {
|
|
|
2446
2014
|
register(apiVersion, OpenAPI);
|
|
2447
2015
|
}
|
|
2448
2016
|
|
|
2449
|
-
function _assertThisInitialized(e) {
|
|
2450
|
-
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2451
|
-
return e;
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
function _possibleConstructorReturn(t, e) {
|
|
2455
|
-
if (e && ("object" == _typeof$1(e) || "function" == typeof e)) return e;
|
|
2456
|
-
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2457
|
-
return _assertThisInitialized(t);
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
function _getPrototypeOf(t) {
|
|
2461
|
-
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
2462
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2463
|
-
}, _getPrototypeOf(t);
|
|
2464
|
-
}
|
|
2465
|
-
|
|
2466
|
-
function _setPrototypeOf(t, e) {
|
|
2467
|
-
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
2468
|
-
return t.__proto__ = e, t;
|
|
2469
|
-
}, _setPrototypeOf(t, e);
|
|
2470
|
-
}
|
|
2471
|
-
|
|
2472
|
-
function _inherits(t, e) {
|
|
2473
|
-
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
2474
|
-
t.prototype = Object.create(e && e.prototype, {
|
|
2475
|
-
constructor: {
|
|
2476
|
-
value: t,
|
|
2477
|
-
writable: true,
|
|
2478
|
-
configurable: true
|
|
2479
|
-
}
|
|
2480
|
-
}), Object.defineProperty(t, "prototype", {
|
|
2481
|
-
writable: false
|
|
2482
|
-
}), e && _setPrototypeOf(t, e);
|
|
2483
|
-
}
|
|
2484
|
-
|
|
2485
2017
|
// websocket建立成功回包
|
|
2486
2018
|
|
|
2487
2019
|
// 发送心跳入参
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "woodenfish-bot",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.7",
|
|
4
4
|
"description": "woodenfish-bot",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"linkdev": "node scripts/dev.js"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@babel/core": "^7.
|
|
34
|
-
"@babel/generator": "^7.27.
|
|
35
|
-
"@babel/parser": "^7.27.
|
|
36
|
-
"@babel/plugin-transform-class-properties": "^7.
|
|
37
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
38
|
-
"@babel/preset-env": "^7.
|
|
39
|
-
"@babel/preset-typescript": "^7.27.
|
|
40
|
-
"@babel/traverse": "^7.27.
|
|
41
|
-
"@babel/types": "^7.27.
|
|
33
|
+
"@babel/core": "^7.27.1",
|
|
34
|
+
"@babel/generator": "^7.27.1",
|
|
35
|
+
"@babel/parser": "^7.27.1",
|
|
36
|
+
"@babel/plugin-transform-class-properties": "^7.27.1",
|
|
37
|
+
"@babel/plugin-transform-runtime": "^7.27.1",
|
|
38
|
+
"@babel/preset-env": "^7.27.1",
|
|
39
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
40
|
+
"@babel/traverse": "^7.27.1",
|
|
41
|
+
"@babel/types": "^7.27.1",
|
|
42
42
|
"@commitlint/cli": "^19.8.0",
|
|
43
43
|
"@commitlint/config-conventional": "^19.8.0",
|
|
44
44
|
"@rollup/plugin-babel": "^6.0.4",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"@rollup/plugin-replace": "^6.0.2",
|
|
49
49
|
"@types/jest": "^29.5.14",
|
|
50
50
|
"@types/lodash.assignin": "^4.2.9",
|
|
51
|
-
"@types/node": "^22.15.
|
|
51
|
+
"@types/node": "^22.15.3",
|
|
52
52
|
"@types/ws": "^8.18.1",
|
|
53
|
-
"@typescript-eslint/eslint-plugin": "^8.31.
|
|
54
|
-
"@typescript-eslint/parser": "^8.31.
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^8.31.1",
|
|
54
|
+
"@typescript-eslint/parser": "^8.31.1",
|
|
55
55
|
"chalk": "^5.4.1",
|
|
56
56
|
"commitizen": "^4.3.1",
|
|
57
57
|
"cross-env": "^7.0.3",
|
|
@@ -69,13 +69,14 @@
|
|
|
69
69
|
"prettier": "^3.5.3",
|
|
70
70
|
"readline-sync": "^1.4.10",
|
|
71
71
|
"rimraf": "^6.0.1",
|
|
72
|
-
"rollup": "^4.40.
|
|
72
|
+
"rollup": "^4.40.1",
|
|
73
73
|
"rollup-plugin-dts": "^6.2.1",
|
|
74
74
|
"rollup-plugin-typescript-paths": "^1.5.0",
|
|
75
75
|
"standard-version": "^9.5.0",
|
|
76
76
|
"typescript": "^5.8.3"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
+
"@babel/runtime": "^7.27.1",
|
|
79
80
|
"loglevel": "^1.9.2",
|
|
80
81
|
"minimist": "^1.2.8",
|
|
81
82
|
"resty-client": "^0.0.5",
|