@alemonjs/kook 2.1.0-alpha.2 → 2.1.0-alpha.3

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/lib/index.js CHANGED
@@ -429,12 +429,12 @@ const main = () => {
429
429
  const mainProcess = () => {
430
430
  ['SIGINT', 'SIGTERM', 'SIGQUIT', 'disconnect'].forEach(sig => {
431
431
  process?.on?.(sig, () => {
432
- logger?.info?.(`[alemonjs][${sig}] 收到信号,正在关闭...`);
432
+ logger?.info?.(`[@alemonjs/kook][${sig}] 收到信号,正在关闭...`);
433
433
  setImmediate(() => process.exit(0));
434
434
  });
435
435
  });
436
436
  process?.on?.('exit', code => {
437
- logger?.info?.(`[alemonjs][exit] 进程退出,code=${code}`);
437
+ logger?.info?.(`[@alemonjs/kook][exit] 进程退出,code=${code}`);
438
438
  });
439
439
  // 监听主进程消息
440
440
  process.on('message', msg => {
@@ -69,7 +69,7 @@ const filterRequest = (request = {}) => {
69
69
  return filtered;
70
70
  };
71
71
  // 处理axios错误
72
- const loggerError = (err) => {
72
+ const loggerError = err => {
73
73
  // 错误时的请求头
74
74
  logger.error('[axios] error', {
75
75
  config: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alemonjs/kook",
3
- "version": "2.1.0-alpha.2",
3
+ "version": "2.1.0-alpha.3",
4
4
  "description": "kook platform connection",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",
@@ -13,7 +13,8 @@
13
13
  "exports": {
14
14
  ".": {
15
15
  "import": "./lib/index.js",
16
- "types": "./lib/index.d.ts"
16
+ "types": "./lib/index.d.ts",
17
+ "require": "./lib/index.js"
17
18
  },
18
19
  "./package": "./package.json",
19
20
  "./desktop": "./lib/desktop.js"