woodenfish-bot 2.3.7 → 2.3.9
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 +60 -91
- package/lib/index.js +60 -91
- package/package.json +11 -11
package/es/index.js
CHANGED
|
@@ -3,10 +3,8 @@ import fs from 'fs';
|
|
|
3
3
|
import https from 'https';
|
|
4
4
|
import WebSocket, { EventEmitter } from 'ws';
|
|
5
5
|
|
|
6
|
-
function _classCallCheck(
|
|
7
|
-
if (!(
|
|
8
|
-
throw new TypeError("Cannot call a class as a function");
|
|
9
|
-
}
|
|
6
|
+
function _classCallCheck(a, n) {
|
|
7
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
10
8
|
}
|
|
11
9
|
|
|
12
10
|
function _typeof$1(o) {
|
|
@@ -23,11 +21,11 @@ function toPrimitive(t, r) {
|
|
|
23
21
|
if ("object" != _typeof$1(t) || !t) return t;
|
|
24
22
|
var e = t[Symbol.toPrimitive];
|
|
25
23
|
if (void 0 !== e) {
|
|
26
|
-
var i = e.call(t, r );
|
|
24
|
+
var i = e.call(t, r || "default");
|
|
27
25
|
if ("object" != _typeof$1(i)) return i;
|
|
28
26
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
29
27
|
}
|
|
30
|
-
return (String )(t);
|
|
28
|
+
return ("string" === r ? String : Number)(t);
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
function toPropertyKey(t) {
|
|
@@ -35,37 +33,25 @@ function toPropertyKey(t) {
|
|
|
35
33
|
return "symbol" == _typeof$1(i) ? i : i + "";
|
|
36
34
|
}
|
|
37
35
|
|
|
38
|
-
function _defineProperties(
|
|
39
|
-
for (var
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
descriptor.configurable = true;
|
|
43
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
44
|
-
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
|
36
|
+
function _defineProperties(e, r) {
|
|
37
|
+
for (var t = 0; t < r.length; t++) {
|
|
38
|
+
var o = r[t];
|
|
39
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
45
40
|
}
|
|
46
41
|
}
|
|
47
|
-
function _createClass(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
writable: false
|
|
52
|
-
});
|
|
53
|
-
return Constructor;
|
|
42
|
+
function _createClass(e, r, t) {
|
|
43
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
44
|
+
writable: !1
|
|
45
|
+
}), e;
|
|
54
46
|
}
|
|
55
47
|
|
|
56
|
-
function _defineProperty(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
writable: true
|
|
64
|
-
});
|
|
65
|
-
} else {
|
|
66
|
-
obj[key] = value;
|
|
67
|
-
}
|
|
68
|
-
return obj;
|
|
48
|
+
function _defineProperty(e, r, t) {
|
|
49
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
50
|
+
value: t,
|
|
51
|
+
enumerable: !0,
|
|
52
|
+
configurable: !0,
|
|
53
|
+
writable: !0
|
|
54
|
+
}) : e[r] = t, e;
|
|
69
55
|
}
|
|
70
56
|
|
|
71
57
|
var versionMapping = Object.create(null);
|
|
@@ -353,33 +339,28 @@ var Guild = /*#__PURE__*/function () {
|
|
|
353
339
|
}]);
|
|
354
340
|
}();
|
|
355
341
|
|
|
356
|
-
function asyncGeneratorStep(
|
|
342
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
357
343
|
try {
|
|
358
|
-
var
|
|
359
|
-
|
|
360
|
-
} catch (
|
|
361
|
-
|
|
362
|
-
return;
|
|
363
|
-
}
|
|
364
|
-
if (info.done) {
|
|
365
|
-
resolve(value);
|
|
366
|
-
} else {
|
|
367
|
-
Promise.resolve(value).then(_next, _throw);
|
|
344
|
+
var i = n[a](c),
|
|
345
|
+
u = i.value;
|
|
346
|
+
} catch (n) {
|
|
347
|
+
return void e(n);
|
|
368
348
|
}
|
|
349
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
369
350
|
}
|
|
370
|
-
function _asyncToGenerator(
|
|
351
|
+
function _asyncToGenerator(n) {
|
|
371
352
|
return function () {
|
|
372
|
-
var
|
|
373
|
-
|
|
374
|
-
return new Promise(function (
|
|
375
|
-
var
|
|
376
|
-
function _next(
|
|
377
|
-
asyncGeneratorStep(
|
|
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);
|
|
378
359
|
}
|
|
379
|
-
function _throw(
|
|
380
|
-
asyncGeneratorStep(
|
|
360
|
+
function _throw(n) {
|
|
361
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
381
362
|
}
|
|
382
|
-
_next(
|
|
363
|
+
_next(void 0);
|
|
383
364
|
});
|
|
384
365
|
};
|
|
385
366
|
}
|
|
@@ -735,7 +716,7 @@ try {
|
|
|
735
716
|
|
|
736
717
|
var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
|
|
737
718
|
|
|
738
|
-
var version = "2.3.
|
|
719
|
+
var version = "2.3.9";
|
|
739
720
|
|
|
740
721
|
var loglevel = {exports: {}};
|
|
741
722
|
|
|
@@ -2434,52 +2415,40 @@ function v1Setup() {
|
|
|
2434
2415
|
register(apiVersion, OpenAPI);
|
|
2435
2416
|
}
|
|
2436
2417
|
|
|
2437
|
-
function _assertThisInitialized(
|
|
2438
|
-
if (
|
|
2439
|
-
|
|
2440
|
-
}
|
|
2441
|
-
return self;
|
|
2418
|
+
function _assertThisInitialized(e) {
|
|
2419
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2420
|
+
return e;
|
|
2442
2421
|
}
|
|
2443
2422
|
|
|
2444
|
-
function _possibleConstructorReturn(
|
|
2445
|
-
if (
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
2449
|
-
}
|
|
2450
|
-
return _assertThisInitialized(self);
|
|
2423
|
+
function _possibleConstructorReturn(t, e) {
|
|
2424
|
+
if (e && ("object" == _typeof$1(e) || "function" == typeof e)) return e;
|
|
2425
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2426
|
+
return _assertThisInitialized(t);
|
|
2451
2427
|
}
|
|
2452
2428
|
|
|
2453
|
-
function _getPrototypeOf(
|
|
2454
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function
|
|
2455
|
-
return
|
|
2456
|
-
};
|
|
2457
|
-
return _getPrototypeOf(o);
|
|
2429
|
+
function _getPrototypeOf(t) {
|
|
2430
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
2431
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2432
|
+
}, _getPrototypeOf(t);
|
|
2458
2433
|
}
|
|
2459
2434
|
|
|
2460
|
-
function _setPrototypeOf(
|
|
2461
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
};
|
|
2465
|
-
return _setPrototypeOf(o, p);
|
|
2435
|
+
function _setPrototypeOf(t, e) {
|
|
2436
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
2437
|
+
return t.__proto__ = e, t;
|
|
2438
|
+
}, _setPrototypeOf(t, e);
|
|
2466
2439
|
}
|
|
2467
2440
|
|
|
2468
|
-
function _inherits(
|
|
2469
|
-
if (typeof
|
|
2470
|
-
|
|
2471
|
-
}
|
|
2472
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
2441
|
+
function _inherits(t, e) {
|
|
2442
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
2443
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
2473
2444
|
constructor: {
|
|
2474
|
-
value:
|
|
2475
|
-
writable:
|
|
2476
|
-
configurable:
|
|
2445
|
+
value: t,
|
|
2446
|
+
writable: !0,
|
|
2447
|
+
configurable: !0
|
|
2477
2448
|
}
|
|
2478
|
-
})
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
});
|
|
2482
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
2449
|
+
}), Object.defineProperty(t, "prototype", {
|
|
2450
|
+
writable: !1
|
|
2451
|
+
}), e && _setPrototypeOf(t, e);
|
|
2483
2452
|
}
|
|
2484
2453
|
|
|
2485
2454
|
// websocket建立成功回包
|
package/lib/index.js
CHANGED
|
@@ -5,10 +5,8 @@ var fs = require('fs');
|
|
|
5
5
|
var https = require('https');
|
|
6
6
|
var WebSocket = require('ws');
|
|
7
7
|
|
|
8
|
-
function _classCallCheck(
|
|
9
|
-
if (!(
|
|
10
|
-
throw new TypeError("Cannot call a class as a function");
|
|
11
|
-
}
|
|
8
|
+
function _classCallCheck(a, n) {
|
|
9
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
12
10
|
}
|
|
13
11
|
|
|
14
12
|
function _typeof$1(o) {
|
|
@@ -25,11 +23,11 @@ function toPrimitive(t, r) {
|
|
|
25
23
|
if ("object" != _typeof$1(t) || !t) return t;
|
|
26
24
|
var e = t[Symbol.toPrimitive];
|
|
27
25
|
if (void 0 !== e) {
|
|
28
|
-
var i = e.call(t, r );
|
|
26
|
+
var i = e.call(t, r || "default");
|
|
29
27
|
if ("object" != _typeof$1(i)) return i;
|
|
30
28
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
31
29
|
}
|
|
32
|
-
return (String )(t);
|
|
30
|
+
return ("string" === r ? String : Number)(t);
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
function toPropertyKey(t) {
|
|
@@ -37,37 +35,25 @@ function toPropertyKey(t) {
|
|
|
37
35
|
return "symbol" == _typeof$1(i) ? i : i + "";
|
|
38
36
|
}
|
|
39
37
|
|
|
40
|
-
function _defineProperties(
|
|
41
|
-
for (var
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
descriptor.configurable = true;
|
|
45
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
46
|
-
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
|
38
|
+
function _defineProperties(e, r) {
|
|
39
|
+
for (var t = 0; t < r.length; t++) {
|
|
40
|
+
var o = r[t];
|
|
41
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
47
42
|
}
|
|
48
43
|
}
|
|
49
|
-
function _createClass(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
writable: false
|
|
54
|
-
});
|
|
55
|
-
return Constructor;
|
|
44
|
+
function _createClass(e, r, t) {
|
|
45
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
46
|
+
writable: !1
|
|
47
|
+
}), e;
|
|
56
48
|
}
|
|
57
49
|
|
|
58
|
-
function _defineProperty(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
writable: true
|
|
66
|
-
});
|
|
67
|
-
} else {
|
|
68
|
-
obj[key] = value;
|
|
69
|
-
}
|
|
70
|
-
return obj;
|
|
50
|
+
function _defineProperty(e, r, t) {
|
|
51
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
52
|
+
value: t,
|
|
53
|
+
enumerable: !0,
|
|
54
|
+
configurable: !0,
|
|
55
|
+
writable: !0
|
|
56
|
+
}) : e[r] = t, e;
|
|
71
57
|
}
|
|
72
58
|
|
|
73
59
|
var versionMapping = Object.create(null);
|
|
@@ -355,33 +341,28 @@ var Guild = /*#__PURE__*/function () {
|
|
|
355
341
|
}]);
|
|
356
342
|
}();
|
|
357
343
|
|
|
358
|
-
function asyncGeneratorStep(
|
|
344
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
359
345
|
try {
|
|
360
|
-
var
|
|
361
|
-
|
|
362
|
-
} catch (
|
|
363
|
-
|
|
364
|
-
return;
|
|
365
|
-
}
|
|
366
|
-
if (info.done) {
|
|
367
|
-
resolve(value);
|
|
368
|
-
} else {
|
|
369
|
-
Promise.resolve(value).then(_next, _throw);
|
|
346
|
+
var i = n[a](c),
|
|
347
|
+
u = i.value;
|
|
348
|
+
} catch (n) {
|
|
349
|
+
return void e(n);
|
|
370
350
|
}
|
|
351
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
371
352
|
}
|
|
372
|
-
function _asyncToGenerator(
|
|
353
|
+
function _asyncToGenerator(n) {
|
|
373
354
|
return function () {
|
|
374
|
-
var
|
|
375
|
-
|
|
376
|
-
return new Promise(function (
|
|
377
|
-
var
|
|
378
|
-
function _next(
|
|
379
|
-
asyncGeneratorStep(
|
|
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);
|
|
380
361
|
}
|
|
381
|
-
function _throw(
|
|
382
|
-
asyncGeneratorStep(
|
|
362
|
+
function _throw(n) {
|
|
363
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
383
364
|
}
|
|
384
|
-
_next(
|
|
365
|
+
_next(void 0);
|
|
385
366
|
});
|
|
386
367
|
};
|
|
387
368
|
}
|
|
@@ -737,7 +718,7 @@ try {
|
|
|
737
718
|
|
|
738
719
|
var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
|
|
739
720
|
|
|
740
|
-
var version = "2.3.
|
|
721
|
+
var version = "2.3.9";
|
|
741
722
|
|
|
742
723
|
var loglevel = {exports: {}};
|
|
743
724
|
|
|
@@ -2436,52 +2417,40 @@ function v1Setup() {
|
|
|
2436
2417
|
register(apiVersion, OpenAPI);
|
|
2437
2418
|
}
|
|
2438
2419
|
|
|
2439
|
-
function _assertThisInitialized(
|
|
2440
|
-
if (
|
|
2441
|
-
|
|
2442
|
-
}
|
|
2443
|
-
return self;
|
|
2420
|
+
function _assertThisInitialized(e) {
|
|
2421
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2422
|
+
return e;
|
|
2444
2423
|
}
|
|
2445
2424
|
|
|
2446
|
-
function _possibleConstructorReturn(
|
|
2447
|
-
if (
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
2451
|
-
}
|
|
2452
|
-
return _assertThisInitialized(self);
|
|
2425
|
+
function _possibleConstructorReturn(t, e) {
|
|
2426
|
+
if (e && ("object" == _typeof$1(e) || "function" == typeof e)) return e;
|
|
2427
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2428
|
+
return _assertThisInitialized(t);
|
|
2453
2429
|
}
|
|
2454
2430
|
|
|
2455
|
-
function _getPrototypeOf(
|
|
2456
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function
|
|
2457
|
-
return
|
|
2458
|
-
};
|
|
2459
|
-
return _getPrototypeOf(o);
|
|
2431
|
+
function _getPrototypeOf(t) {
|
|
2432
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
2433
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2434
|
+
}, _getPrototypeOf(t);
|
|
2460
2435
|
}
|
|
2461
2436
|
|
|
2462
|
-
function _setPrototypeOf(
|
|
2463
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
};
|
|
2467
|
-
return _setPrototypeOf(o, p);
|
|
2437
|
+
function _setPrototypeOf(t, e) {
|
|
2438
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
2439
|
+
return t.__proto__ = e, t;
|
|
2440
|
+
}, _setPrototypeOf(t, e);
|
|
2468
2441
|
}
|
|
2469
2442
|
|
|
2470
|
-
function _inherits(
|
|
2471
|
-
if (typeof
|
|
2472
|
-
|
|
2473
|
-
}
|
|
2474
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
2443
|
+
function _inherits(t, e) {
|
|
2444
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
2445
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
2475
2446
|
constructor: {
|
|
2476
|
-
value:
|
|
2477
|
-
writable:
|
|
2478
|
-
configurable:
|
|
2447
|
+
value: t,
|
|
2448
|
+
writable: !0,
|
|
2449
|
+
configurable: !0
|
|
2479
2450
|
}
|
|
2480
|
-
})
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
});
|
|
2484
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
2451
|
+
}), Object.defineProperty(t, "prototype", {
|
|
2452
|
+
writable: !1
|
|
2453
|
+
}), e && _setPrototypeOf(t, e);
|
|
2485
2454
|
}
|
|
2486
2455
|
|
|
2487
2456
|
// websocket建立成功回包
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "woodenfish-bot",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.9",
|
|
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.24.
|
|
34
|
-
"@babel/generator": "^7.24.
|
|
35
|
-
"@babel/parser": "^7.24.
|
|
36
|
-
"@babel/plugin-transform-class-properties": "^7.24.
|
|
37
|
-
"@babel/plugin-transform-runtime": "^7.24.
|
|
38
|
-
"@babel/preset-env": "^7.24.
|
|
39
|
-
"@babel/preset-typescript": "^7.24.
|
|
40
|
-
"@babel/traverse": "^7.24.
|
|
41
|
-
"@babel/types": "^7.24.
|
|
33
|
+
"@babel/core": "^7.24.6",
|
|
34
|
+
"@babel/generator": "^7.24.6",
|
|
35
|
+
"@babel/parser": "^7.24.6",
|
|
36
|
+
"@babel/plugin-transform-class-properties": "^7.24.6",
|
|
37
|
+
"@babel/plugin-transform-runtime": "^7.24.6",
|
|
38
|
+
"@babel/preset-env": "^7.24.6",
|
|
39
|
+
"@babel/preset-typescript": "^7.24.6",
|
|
40
|
+
"@babel/traverse": "^7.24.6",
|
|
41
|
+
"@babel/types": "^7.24.6",
|
|
42
42
|
"@commitlint/cli": "^18.6.1",
|
|
43
43
|
"@commitlint/config-conventional": "^18.6.2",
|
|
44
44
|
"@rollup/plugin-babel": "^6.0.4",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"handlebars": "^4.7.8",
|
|
65
65
|
"inquirer": "^9.2.22",
|
|
66
66
|
"jest": "^29.7.0",
|
|
67
|
-
"lint-staged": "^15.2.
|
|
67
|
+
"lint-staged": "^15.2.5",
|
|
68
68
|
"lodash.clonedeep": "^4.5.0",
|
|
69
69
|
"prettier": "^3.2.5",
|
|
70
70
|
"readline-sync": "^1.4.10",
|