@zhin.js/adapter-weixin-ilink 4.0.1 → 4.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @zhin.js/adapter-weixin-ilink
2
2
 
3
+ ## 4.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [45b3256]
8
+ - @zhin.js/core@1.4.3
9
+ - zhin.js@5.0.3
10
+
11
+ ## 4.0.2
12
+
13
+ ### Patch Changes
14
+
15
+ - d5cd4aa: Publish Plugin Runtime entry points and convention modules as JavaScript so
16
+ installed npm plugins load on Node without TypeScript stripping. Workspace
17
+ development continues to prefer TypeScript sources for local HMR.
18
+
19
+ Remove the unconsumed legacy game hub APIs from game-kit; game navigation and
20
+ records now use ordinary convention commands owned by the game hub plugin.
21
+
22
+ - Updated dependencies [d5cd4aa]
23
+ - @zhin.js/command@1.0.4
24
+ - zhin.js@5.0.2
25
+ - @zhin.js/adapter@1.1.2
26
+ - @zhin.js/core@1.4.2
27
+
3
28
  ## 4.0.1
4
29
 
5
30
  ### Patch Changes
@@ -0,0 +1,31 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ /**
3
+ * Convention entry: discover `adapters/weixin-ilink.ts` → defineAdapter.
4
+ */
5
+ import { defineAdapter } from '@zhin.js/adapter';
6
+ import { messageGatewayToken } from '@zhin.js/core/runtime';
7
+ import { WeixinIlinkEndpoint } from "../lib/endpoint.js";
8
+ import { resolveWeixinIlinkConfig, } from "../lib/protocol.js";
9
+ import { weixinIlinkRuntimeStateToken } from "../lib/weixin-ilink-runtime-state.js";
10
+ export { WeixinIlinkEndpoint } from "../lib/endpoint.js";
11
+ export default defineAdapter({
12
+ capabilities: ['inbound', 'outbound'],
13
+ // base64 / 远程 URL 落盘后走 CDN 上传(sendWeixinMediaFile);微信无卡片交互面,交互段降级纯文本。
14
+ segments: {
15
+ outboundMedia: ['base64', 'url', 'upload'],
16
+ interactive: 'text',
17
+ },
18
+ create(context) {
19
+ const config = resolveWeixinIlinkConfig(context.config);
20
+ // 注册到插件运行时状态(weixin-ilink endpoint list 的"运行中"数据源)
21
+ context.use(weixinIlinkRuntimeStateToken).endpoints.set(config.name, {
22
+ name: config.name,
23
+ mode: config.connection,
24
+ });
25
+ return new WeixinIlinkEndpoint({
26
+ id: context.id,
27
+ gateway: context.use(messageGatewayToken),
28
+ config,
29
+ });
30
+ },
31
+ });
@@ -0,0 +1,3 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { weixinIlinkEndpointCommands } from "../../../lib/weixin-ilink-endpoint-commands.js";
3
+ export default weixinIlinkEndpointCommands.add;
@@ -0,0 +1,3 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { weixinIlinkEndpointCommands } from "../../lib/weixin-ilink-endpoint-commands.js";
3
+ export default weixinIlinkEndpointCommands.list;
@@ -0,0 +1,3 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { weixinIlinkEndpointCommands } from "../../../lib/weixin-ilink-endpoint-commands.js";
3
+ export default weixinIlinkEndpointCommands.remove;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-weixin-ilink",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "type": "module",
5
5
  "description": "Zhin.js Weixin iLink (ClawBot) adapter for Plugin Runtime (long-poll)",
6
6
  "main": "./lib/index.js",
@@ -29,7 +29,7 @@
29
29
  "files": [
30
30
  "adapters",
31
31
  "commands",
32
- "plugin.ts",
32
+ "plugin.js",
33
33
  "schema.json",
34
34
  "src",
35
35
  "lib",
@@ -48,17 +48,17 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@zhin.js/adapter": "1.1.1",
52
- "@zhin.js/command": "1.0.3",
53
- "@zhin.js/core": "1.4.1",
51
+ "@zhin.js/adapter": "1.1.2",
52
+ "@zhin.js/command": "1.0.4",
53
+ "@zhin.js/core": "1.4.3",
54
54
  "@zhin.js/logger": "1.0.75",
55
55
  "@zhin.js/plugin-runtime": "1.1.1"
56
56
  },
57
57
  "peerDependencies": {
58
- "@zhin.js/adapter": "1.1.1",
59
- "@zhin.js/core": "1.4.1",
58
+ "@zhin.js/adapter": "1.1.2",
59
+ "@zhin.js/core": "1.4.3",
60
60
  "@zhin.js/plugin-runtime": "1.1.1",
61
- "zhin.js": "5.0.1"
61
+ "zhin.js": "5.0.3"
62
62
  },
63
63
  "peerDependenciesMeta": {
64
64
  "zhin.js": {
@@ -77,7 +77,7 @@
77
77
  "zhin": {
78
78
  "protocol": 1,
79
79
  "type": "plugin",
80
- "entry": "./plugin.ts",
80
+ "entry": "./plugin.js",
81
81
  "engine": "^1.0.0",
82
82
  "runtime": "trusted",
83
83
  "features": [
package/plugin.js ADDED
@@ -0,0 +1,14 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { createEndpointRuntimeState } from '@zhin.js/adapter';
3
+ import { definePlugin } from '@zhin.js/plugin-runtime';
4
+ import { weixinIlinkRuntimeStateToken } from "./lib/weixin-ilink-runtime-state.js";
5
+ export default definePlugin({
6
+ name: 'weixin-ilink',
7
+ metadata: {
8
+ displayName: 'Weixin iLink Adapter',
9
+ },
10
+ setup(context) {
11
+ // 运行中 endpoint 注册表(weixin-ilink endpoint list 的"运行中"数据源)
12
+ context.resources.provide(weixinIlinkRuntimeStateToken, createEndpointRuntimeState());
13
+ },
14
+ });
package/plugin.ts DELETED
@@ -1,14 +0,0 @@
1
- import { createEndpointRuntimeState } from '@zhin.js/adapter';
2
- import { definePlugin } from '@zhin.js/plugin-runtime';
3
- import { weixinIlinkRuntimeStateToken } from './src/weixin-ilink-runtime-state.js';
4
-
5
- export default definePlugin({
6
- name: 'weixin-ilink',
7
- metadata: {
8
- displayName: 'Weixin iLink Adapter',
9
- },
10
- setup(context) {
11
- // 运行中 endpoint 注册表(weixin-ilink endpoint list 的"运行中"数据源)
12
- context.resources.provide(weixinIlinkRuntimeStateToken, createEndpointRuntimeState());
13
- },
14
- });