@zhin.js/adapter-lark 1.1.7 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,52 @@
1
1
  # @zhin.js/adapter-lark
2
2
 
3
+ ## 1.1.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 75e26a6: Raise the supported Node.js range to `>=22.19.0` (was `^20.19.0 || >=22.12.0`). `@zhin.js/ai` depends on undici 8, whose `engines` require Node >=22.19.0; on Node 20 it crashes at import (`webidl.util.markAsUncloneable is not a function`). CI already tests only Node 22 / 24 / 26. `zhin doctor`, `zhin new`, `zhin migrate` and `create-zhin-app` now check for and write the same range.
8
+ - fdc2148: Unblock external plugin authors.
9
+
10
+ - Published manifests no longer expose the source-only `development` export condition (it pointed at `./src/*.ts`, which is not in the tarball, so Vitest 4 and other tools that enable `development` failed to import Zhin packages). Each package now carries `publishConfig.exports` without that condition; `pnpm publish` swaps it in when packing, and the monorepo keeps source-level development.
11
+ - `zhin new` no longer crashes without arguments (uses inquirer `select` instead of the removed `list` prompt; same fix for `zhin onboard` and `zhin pub`). The generated package.json uses `^x.y.z` ranges derived from installed versions instead of `latest`, declares capability packages as optional peers (plus devDependencies for local tests) instead of dependencies, sets `zhin.entry` to `./plugin.js` and builds sibling JavaScript on `prepack`, fixes the adapter template test, and adds `--package-name`. `--skip-install` now also skips the project-root install.
12
+
13
+ - Updated dependencies [75e26a6]
14
+ - Updated dependencies [fdc2148]
15
+ - @zhin.js/adapter@1.1.19
16
+ - @zhin.js/agent-feature@1.1.6
17
+ - @zhin.js/core@1.1.44
18
+ - @zhin.js/feature-kit@1.1.5
19
+ - @zhin.js/host-http@1.1.6
20
+ - @zhin.js/im-contract@1.1.4
21
+ - @zhin.js/skill@1.1.6
22
+ - @zhin.js/tool@1.1.6
23
+ - @zhin.js/logger@1.1.2
24
+
25
+ ## 1.1.8
26
+
27
+ ### Patch Changes
28
+
29
+ - 2dfe5fa: ScheduleEngine 的 pause/resume 现在同样作用于 every/at 任务(暂停期间不触发、恢复后按原周期继续、不补发);飞书长连接重复 connect() 时清理旧的健康检查定时器。
30
+ - Updated dependencies [9891e66]
31
+ - Updated dependencies [bf52b40]
32
+ - Updated dependencies [bf52b40]
33
+ - Updated dependencies [bf52b40]
34
+ - Updated dependencies [386150d]
35
+ - Updated dependencies [9891e66]
36
+ - Updated dependencies [9891e66]
37
+ - Updated dependencies [4778587]
38
+ - Updated dependencies [40537e3]
39
+ - Updated dependencies [681abf3]
40
+ - Updated dependencies [9891e66]
41
+ - Updated dependencies [9891e66]
42
+ - @zhin.js/adapter@1.1.18
43
+ - @zhin.js/core@1.1.43
44
+ - @zhin.js/host-http@1.1.5
45
+ - @zhin.js/feature-kit@1.1.4
46
+ - @zhin.js/agent-feature@1.1.5
47
+ - @zhin.js/skill@1.1.5
48
+ - @zhin.js/tool@1.1.5
49
+
3
50
  ## 1.1.7
4
51
 
5
52
  ### 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.7",
3
+ "version": "1.1.9",
4
4
  "description": "Zhin.js Lark/Feishu adapter (HTTP webhook and WebSocket long connection)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -8,7 +8,6 @@
8
8
  "exports": {
9
9
  ".": {
10
10
  "types": "./lib/index.d.ts",
11
- "development": "./src/index.ts",
12
11
  "import": "./lib/index.js"
13
12
  }
14
13
  },
@@ -36,24 +35,24 @@
36
35
  "dependencies": {
37
36
  "undici": "6.28.0",
38
37
  "@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.42",
42
- "@zhin.js/feature-kit": "1.1.3",
43
- "@zhin.js/host-http": "1.1.4",
44
- "@zhin.js/im-contract": "1.1.3",
45
- "@zhin.js/logger": "1.1.1",
46
- "@zhin.js/skill": "1.1.4",
47
- "@zhin.js/tool": "1.1.4"
38
+ "@zhin.js/adapter": "1.1.19",
39
+ "@zhin.js/agent-feature": "1.1.6",
40
+ "@zhin.js/core": "1.1.44",
41
+ "@zhin.js/feature-kit": "1.1.5",
42
+ "@zhin.js/host-http": "1.1.6",
43
+ "@zhin.js/im-contract": "1.1.4",
44
+ "@zhin.js/logger": "1.1.2",
45
+ "@zhin.js/skill": "1.1.6",
46
+ "@zhin.js/tool": "1.1.6"
48
47
  },
49
48
  "peerDependencies": {
50
49
  "zod": "^4.0.0",
51
- "@zhin.js/adapter": "^1.1.17",
52
- "@zhin.js/command": "^1.1.5",
53
- "@zhin.js/core": "^1.1.42",
54
- "@zhin.js/host-http": "^1.1.4",
55
- "@zhin.js/permission": "^1.1.4",
56
- "zhin.js": "^1.1.7"
50
+ "@zhin.js/adapter": "^1.1.19",
51
+ "@zhin.js/command": "^1.1.7",
52
+ "@zhin.js/core": "^1.1.44",
53
+ "@zhin.js/host-http": "^1.1.6",
54
+ "@zhin.js/permission": "^1.1.6",
55
+ "zhin.js": "^1.1.9"
57
56
  },
58
57
  "peerDependenciesMeta": {
59
58
  "@zhin.js/command": {
@@ -71,7 +70,7 @@
71
70
  "typescript": "^6.0.3",
72
71
  "vitest": "^4.1.10",
73
72
  "zod": "^4.4.3",
74
- "zhin.js": "1.1.7"
73
+ "zhin.js": "1.1.9"
75
74
  },
76
75
  "files": [
77
76
  "adapters",
@@ -91,7 +90,7 @@
91
90
  "registry": "https://registry.npmjs.org"
92
91
  },
93
92
  "engines": {
94
- "node": "^20.19.0 || >=22.12.0"
93
+ "node": ">=22.19.0"
95
94
  },
96
95
  "zhin": {
97
96
  "protocol": 1,
@@ -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();