woodenfish-bot 4.1.5 → 4.1.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.
Files changed (3) hide show
  1. package/es/index.js +10 -10
  2. package/lib/index.js +10 -10
  3. package/package.json +10 -10
package/es/index.js CHANGED
@@ -297,7 +297,7 @@ var Guild = /*#__PURE__*/function () {
297
297
  }]);
298
298
  }();
299
299
 
300
- var version = "4.1.5";
300
+ var version = "4.1.7";
301
301
 
302
302
  function getDefaultExportFromCjs (x) {
303
303
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -759,11 +759,11 @@ function getAccessToken(access_token_file, url, data, appID) {
759
759
  var addAuthorization = /*#__PURE__*/function () {
760
760
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(header, appID, token, clientSecret, apiVersion) {
761
761
  var now_time, url, data, access_token_file, default_token_json, access_token, expires_in, access_token_json;
762
- return _regeneratorRuntime.wrap(function _callee$(_context) {
762
+ return _regeneratorRuntime.wrap(function (_context) {
763
763
  while (1) switch (_context.prev = _context.next) {
764
764
  case 0:
765
765
  if (!(apiVersion == 'v2')) {
766
- _context.next = 17;
766
+ _context.next = 3;
767
767
  break;
768
768
  }
769
769
  now_time = getTimeStampNumber();
@@ -799,22 +799,22 @@ var addAuthorization = /*#__PURE__*/function () {
799
799
  }
800
800
  // 判断access_token是否存在,不存在或者已经过期就重新获取
801
801
  if (!(access_token === '' || now_time > expires_in - 50)) {
802
- _context.next = 14;
802
+ _context.next = 2;
803
803
  break;
804
804
  }
805
805
  console.log('access_token', access_token, 'expire_time', expires_in);
806
- _context.next = 13;
806
+ _context.next = 1;
807
807
  return getAccessToken(access_token_file, url, data, appID);
808
- case 13:
808
+ case 1:
809
809
  access_token = _context.sent;
810
- case 14:
810
+ case 2:
811
811
  // 更新header['Authorization']
812
812
  header['Authorization'] = "QQBot ".concat(access_token);
813
- _context.next = 18;
813
+ _context.next = 4;
814
814
  break;
815
- case 17:
815
+ case 3:
816
816
  header['Authorization'] = "Bot ".concat(appID, ".").concat(token);
817
- case 18:
817
+ case 4:
818
818
  case "end":
819
819
  return _context.stop();
820
820
  }
package/lib/index.js CHANGED
@@ -299,7 +299,7 @@ var Guild = /*#__PURE__*/function () {
299
299
  }]);
300
300
  }();
301
301
 
302
- var version = "4.1.5";
302
+ var version = "4.1.7";
303
303
 
304
304
  function getDefaultExportFromCjs (x) {
305
305
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -761,11 +761,11 @@ function getAccessToken(access_token_file, url, data, appID) {
761
761
  var addAuthorization = /*#__PURE__*/function () {
762
762
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(header, appID, token, clientSecret, apiVersion) {
763
763
  var now_time, url, data, access_token_file, default_token_json, access_token, expires_in, access_token_json;
764
- return _regeneratorRuntime.wrap(function _callee$(_context) {
764
+ return _regeneratorRuntime.wrap(function (_context) {
765
765
  while (1) switch (_context.prev = _context.next) {
766
766
  case 0:
767
767
  if (!(apiVersion == 'v2')) {
768
- _context.next = 17;
768
+ _context.next = 3;
769
769
  break;
770
770
  }
771
771
  now_time = getTimeStampNumber();
@@ -801,22 +801,22 @@ var addAuthorization = /*#__PURE__*/function () {
801
801
  }
802
802
  // 判断access_token是否存在,不存在或者已经过期就重新获取
803
803
  if (!(access_token === '' || now_time > expires_in - 50)) {
804
- _context.next = 14;
804
+ _context.next = 2;
805
805
  break;
806
806
  }
807
807
  console.log('access_token', access_token, 'expire_time', expires_in);
808
- _context.next = 13;
808
+ _context.next = 1;
809
809
  return getAccessToken(access_token_file, url, data, appID);
810
- case 13:
810
+ case 1:
811
811
  access_token = _context.sent;
812
- case 14:
812
+ case 2:
813
813
  // 更新header['Authorization']
814
814
  header['Authorization'] = "QQBot ".concat(access_token);
815
- _context.next = 18;
815
+ _context.next = 4;
816
816
  break;
817
- case 17:
817
+ case 3:
818
818
  header['Authorization'] = "Bot ".concat(appID, ".").concat(token);
819
- case 18:
819
+ case 4:
820
820
  case "end":
821
821
  return _context.stop();
822
822
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "woodenfish-bot",
3
- "version": "4.1.5",
3
+ "version": "4.1.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.27.7",
34
- "@babel/generator": "^7.27.5",
35
- "@babel/parser": "^7.27.7",
33
+ "@babel/core": "^7.28.0",
34
+ "@babel/generator": "^7.28.0",
35
+ "@babel/parser": "^7.28.0",
36
36
  "@babel/plugin-transform-class-properties": "^7.27.1",
37
- "@babel/plugin-transform-runtime": "^7.27.4",
38
- "@babel/preset-env": "^7.27.2",
37
+ "@babel/plugin-transform-runtime": "^7.28.0",
38
+ "@babel/preset-env": "^7.28.0",
39
39
  "@babel/preset-typescript": "^7.27.1",
40
- "@babel/traverse": "^7.27.7",
41
- "@babel/types": "^7.27.7",
40
+ "@babel/traverse": "^7.28.0",
41
+ "@babel/types": "^7.28.0",
42
42
  "@commitlint/cli": "^19.8.1",
43
43
  "@commitlint/config-conventional": "^19.8.1",
44
44
  "@rollup/plugin-babel": "^6.0.4",
@@ -56,13 +56,13 @@
56
56
  "commitizen": "^4.3.1",
57
57
  "cross-env": "^7.0.3",
58
58
  "cz-conventional-changelog": "^3.3.0",
59
- "eslint": "^9.30.0",
59
+ "eslint": "^9.30.1",
60
60
  "eslint-config-alloy": "^5.1.2",
61
61
  "eslint-config-prettier": "^10.1.5",
62
62
  "eslint-plugin-jest": "^28.14.0",
63
63
  "eslint-plugin-prettier": "^5.5.1",
64
64
  "handlebars": "^4.7.8",
65
- "inquirer": "^12.6.3",
65
+ "inquirer": "^12.7.0",
66
66
  "jest": "^30.0.3",
67
67
  "lint-staged": "^16.1.2",
68
68
  "lodash.clonedeep": "^4.5.0",