@zhin.js/adapter-lark 1.1.6 → 1.1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @zhin.js/adapter-lark
2
2
 
3
+ ## 1.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - 2dfe5fa: ScheduleEngine 的 pause/resume 现在同样作用于 every/at 任务(暂停期间不触发、恢复后按原周期继续、不补发);飞书长连接重复 connect() 时清理旧的健康检查定时器。
8
+ - Updated dependencies [9891e66]
9
+ - Updated dependencies [bf52b40]
10
+ - Updated dependencies [bf52b40]
11
+ - Updated dependencies [bf52b40]
12
+ - Updated dependencies [386150d]
13
+ - Updated dependencies [9891e66]
14
+ - Updated dependencies [9891e66]
15
+ - Updated dependencies [4778587]
16
+ - Updated dependencies [40537e3]
17
+ - Updated dependencies [681abf3]
18
+ - Updated dependencies [9891e66]
19
+ - Updated dependencies [9891e66]
20
+ - @zhin.js/adapter@1.1.18
21
+ - @zhin.js/core@1.1.43
22
+ - @zhin.js/host-http@1.1.5
23
+ - @zhin.js/feature-kit@1.1.4
24
+ - @zhin.js/agent-feature@1.1.5
25
+ - @zhin.js/skill@1.1.5
26
+ - @zhin.js/tool@1.1.5
27
+
28
+ ## 1.1.7
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [5ab6307]
33
+ - @zhin.js/core@1.1.42
34
+
3
35
  ## 1.1.6
4
36
 
5
37
  ### Patch Changes
@@ -59,6 +59,9 @@ export const createLarkLongConnection = ({ config, receive, cardAction, disconne
59
59
  client.close({ force: true });
60
60
  return;
61
61
  }
62
+ // 重复 connect() 时先清理旧的健康检查定时器,避免泄漏。
63
+ if (healthTimer)
64
+ clearInterval(healthTimer);
62
65
  healthTimer = setInterval(() => {
63
66
  if (!cancelled && ready && client.getConnectionStatus().state !== 'connected') {
64
67
  ready = false;
@@ -78,8 +81,10 @@ export const createLarkLongConnection = ({ config, receive, cardAction, disconne
78
81
  },
79
82
  close() {
80
83
  cancelled = true;
81
- if (healthTimer)
84
+ if (healthTimer) {
82
85
  clearInterval(healthTimer);
86
+ healthTimer = undefined;
87
+ }
83
88
  settleError(new Error('Lark long connection stopped'));
84
89
  client.close({ force: true });
85
90
  agent?.destroy();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-lark",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "Zhin.js Lark/Feishu adapter (HTTP webhook and WebSocket long connection)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -36,24 +36,24 @@
36
36
  "dependencies": {
37
37
  "undici": "6.28.0",
38
38
  "@larksuiteoapi/node-sdk": "^1.67.0",
39
- "@zhin.js/adapter": "1.1.17",
40
- "@zhin.js/agent-feature": "1.1.4",
41
- "@zhin.js/core": "1.1.41",
42
- "@zhin.js/feature-kit": "1.1.3",
43
- "@zhin.js/host-http": "1.1.4",
39
+ "@zhin.js/adapter": "1.1.18",
40
+ "@zhin.js/agent-feature": "1.1.5",
41
+ "@zhin.js/core": "1.1.43",
42
+ "@zhin.js/feature-kit": "1.1.4",
43
+ "@zhin.js/host-http": "1.1.5",
44
44
  "@zhin.js/im-contract": "1.1.3",
45
45
  "@zhin.js/logger": "1.1.1",
46
- "@zhin.js/skill": "1.1.4",
47
- "@zhin.js/tool": "1.1.4"
46
+ "@zhin.js/skill": "1.1.5",
47
+ "@zhin.js/tool": "1.1.5"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "zod": "^4.0.0",
51
- "@zhin.js/adapter": "^1.1.17",
52
- "@zhin.js/command": "^1.1.5",
53
- "@zhin.js/core": "^1.1.41",
54
- "@zhin.js/host-http": "^1.1.4",
55
- "@zhin.js/permission": "^1.1.4",
56
- "zhin.js": "^1.1.6"
51
+ "@zhin.js/adapter": "^1.1.18",
52
+ "@zhin.js/command": "^1.1.6",
53
+ "@zhin.js/core": "^1.1.43",
54
+ "@zhin.js/host-http": "^1.1.5",
55
+ "@zhin.js/permission": "^1.1.5",
56
+ "zhin.js": "^1.1.8"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "@zhin.js/command": {
@@ -71,7 +71,7 @@
71
71
  "typescript": "^6.0.3",
72
72
  "vitest": "^4.1.10",
73
73
  "zod": "^4.4.3",
74
- "zhin.js": "1.1.6"
74
+ "zhin.js": "1.1.8"
75
75
  },
76
76
  "files": [
77
77
  "adapters",
@@ -63,6 +63,8 @@ export const createLarkLongConnection: LarkLongConnectionFactory = ({ config, re
63
63
  await client.start({ eventDispatcher: dispatcher });
64
64
  await connected;
65
65
  if (cancelled) { client.close({ force: true }); return; }
66
+ // 重复 connect() 时先清理旧的健康检查定时器,避免泄漏。
67
+ if (healthTimer) clearInterval(healthTimer);
66
68
  healthTimer = setInterval(() => {
67
69
  if (!cancelled && ready && client.getConnectionStatus().state !== 'connected') {
68
70
  ready = false;
@@ -78,7 +80,7 @@ export const createLarkLongConnection: LarkLongConnectionFactory = ({ config, re
78
80
  },
79
81
  close() {
80
82
  cancelled = true;
81
- if (healthTimer) clearInterval(healthTimer);
83
+ if (healthTimer) { clearInterval(healthTimer); healthTimer = undefined; }
82
84
  settleError(new Error('Lark long connection stopped'));
83
85
  client.close({ force: true });
84
86
  agent?.destroy();