woodenfish-bot 2.3.6 → 2.3.8

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.
Files changed (3) hide show
  1. package/es/index.js +60 -91
  2. package/lib/index.js +60 -91
  3. 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(instance, Constructor) {
7
- if (!(instance instanceof Constructor)) {
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(target, props) {
39
- for (var i = 0; i < props.length; i++) {
40
- var descriptor = props[i];
41
- descriptor.enumerable = descriptor.enumerable || false;
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(Constructor, protoProps, staticProps) {
48
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
49
- if (staticProps) _defineProperties(Constructor, staticProps);
50
- Object.defineProperty(Constructor, "prototype", {
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(obj, key, value) {
57
- key = toPropertyKey(key);
58
- if (key in obj) {
59
- Object.defineProperty(obj, key, {
60
- value: value,
61
- enumerable: true,
62
- configurable: true,
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(gen, resolve, reject, _next, _throw, key, arg) {
342
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
357
343
  try {
358
- var info = gen[key](arg);
359
- var value = info.value;
360
- } catch (error) {
361
- reject(error);
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(fn) {
351
+ function _asyncToGenerator(n) {
371
352
  return function () {
372
- var self = this,
373
- args = arguments;
374
- return new Promise(function (resolve, reject) {
375
- var gen = fn.apply(self, args);
376
- function _next(value) {
377
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
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(err) {
380
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
360
+ function _throw(n) {
361
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
381
362
  }
382
- _next(undefined);
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.6";
719
+ var version = "2.3.8";
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(self) {
2438
- if (self === void 0) {
2439
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
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(self, call) {
2445
- if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
2446
- return call;
2447
- } else if (call !== void 0) {
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(o) {
2454
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
2455
- return o.__proto__ || Object.getPrototypeOf(o);
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(o, p) {
2461
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
2462
- o.__proto__ = p;
2463
- return o;
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(subClass, superClass) {
2469
- if (typeof superClass !== "function" && superClass !== null) {
2470
- throw new TypeError("Super expression must either be null or a function");
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: subClass,
2475
- writable: true,
2476
- configurable: true
2445
+ value: t,
2446
+ writable: !0,
2447
+ configurable: !0
2477
2448
  }
2478
- });
2479
- Object.defineProperty(subClass, "prototype", {
2480
- writable: false
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(instance, Constructor) {
9
- if (!(instance instanceof Constructor)) {
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(target, props) {
41
- for (var i = 0; i < props.length; i++) {
42
- var descriptor = props[i];
43
- descriptor.enumerable = descriptor.enumerable || false;
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(Constructor, protoProps, staticProps) {
50
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
51
- if (staticProps) _defineProperties(Constructor, staticProps);
52
- Object.defineProperty(Constructor, "prototype", {
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(obj, key, value) {
59
- key = toPropertyKey(key);
60
- if (key in obj) {
61
- Object.defineProperty(obj, key, {
62
- value: value,
63
- enumerable: true,
64
- configurable: true,
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(gen, resolve, reject, _next, _throw, key, arg) {
344
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
359
345
  try {
360
- var info = gen[key](arg);
361
- var value = info.value;
362
- } catch (error) {
363
- reject(error);
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(fn) {
353
+ function _asyncToGenerator(n) {
373
354
  return function () {
374
- var self = this,
375
- args = arguments;
376
- return new Promise(function (resolve, reject) {
377
- var gen = fn.apply(self, args);
378
- function _next(value) {
379
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
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(err) {
382
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
362
+ function _throw(n) {
363
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
383
364
  }
384
- _next(undefined);
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.6";
721
+ var version = "2.3.8";
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(self) {
2440
- if (self === void 0) {
2441
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
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(self, call) {
2447
- if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
2448
- return call;
2449
- } else if (call !== void 0) {
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(o) {
2456
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
2457
- return o.__proto__ || Object.getPrototypeOf(o);
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(o, p) {
2463
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
2464
- o.__proto__ = p;
2465
- return o;
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(subClass, superClass) {
2471
- if (typeof superClass !== "function" && superClass !== null) {
2472
- throw new TypeError("Super expression must either be null or a function");
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: subClass,
2477
- writable: true,
2478
- configurable: true
2447
+ value: t,
2448
+ writable: !0,
2449
+ configurable: !0
2479
2450
  }
2480
- });
2481
- Object.defineProperty(subClass, "prototype", {
2482
- writable: false
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.6",
3
+ "version": "2.3.8",
4
4
  "description": "woodenfish-bot",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,19 +30,19 @@
30
30
  "linkdev": "node scripts/dev.js"
31
31
  },
32
32
  "devDependencies": {
33
- "@babel/core": "^7.24.5",
34
- "@babel/generator": "^7.24.5",
35
- "@babel/parser": "^7.24.5",
36
- "@babel/plugin-transform-class-properties": "^7.24.1",
37
- "@babel/plugin-transform-runtime": "^7.24.3",
38
- "@babel/preset-env": "^7.24.5",
39
- "@babel/preset-typescript": "^7.24.1",
40
- "@babel/traverse": "^7.24.5",
41
- "@babel/types": "^7.24.5",
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",
45
- "@rollup/plugin-commonjs": "^25.0.7",
45
+ "@rollup/plugin-commonjs": "^25.0.8",
46
46
  "@rollup/plugin-json": "^6.1.0",
47
47
  "@rollup/plugin-node-resolve": "^15.2.3",
48
48
  "@rollup/plugin-replace": "^5.0.5",