@zhin.js/adapter-line 3.0.1 → 3.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,32 @@
1
1
  # @zhin.js/adapter-line
2
2
 
3
+ ## 3.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [f346346]
8
+ - @zhin.js/agent@1.0.8
9
+ - @zhin.js/core@1.4.2
10
+ - zhin.js@5.0.2
11
+
12
+ ## 3.0.2
13
+
14
+ ### Patch Changes
15
+
16
+ - d5cd4aa: Publish Plugin Runtime entry points and convention modules as JavaScript so
17
+ installed npm plugins load on Node without TypeScript stripping. Workspace
18
+ development continues to prefer TypeScript sources for local HMR.
19
+
20
+ Remove the unconsumed legacy game hub APIs from game-kit; game navigation and
21
+ records now use ordinary convention commands owned by the game hub plugin.
22
+
23
+ - Updated dependencies [d5cd4aa]
24
+ - @zhin.js/command@1.0.4
25
+ - zhin.js@5.0.2
26
+ - @zhin.js/adapter@1.1.2
27
+ - @zhin.js/core@1.4.2
28
+ - @zhin.js/agent@1.0.7
29
+
3
30
  ## 3.0.1
4
31
 
5
32
  ### Patch Changes
@@ -0,0 +1,33 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ /**
3
+ * Convention entry: discover `adapters/line.ts` → defineAdapter.
4
+ */
5
+ import { defineAdapter } from '@zhin.js/adapter';
6
+ import { messageGatewayToken } from '@zhin.js/core/runtime';
7
+ import { httpHostToken } from '@zhin.js/host-http';
8
+ import { LineEndpoint } from "../lib/endpoint.js";
9
+ import { resolveLineConfig, } from "../lib/protocol.js";
10
+ import { lineRuntimeStateToken } from "../lib/line-runtime-state.js";
11
+ export { LineEndpoint } from "../lib/endpoint.js";
12
+ export default defineAdapter({
13
+ capabilities: ['inbound', 'outbound'],
14
+ // LINE Messaging API 媒体消息仅消费远程 URL;无按钮交互面,交互段降级纯文本。
15
+ segments: {
16
+ outboundMedia: ['url'],
17
+ interactive: 'text',
18
+ },
19
+ create(context) {
20
+ const config = resolveLineConfig(context.config);
21
+ // 注册到插件运行时状态(line endpoint list 的"运行中"数据源)
22
+ context.use(lineRuntimeStateToken).endpoints.set(config.name, {
23
+ name: config.name,
24
+ mode: 'webhook',
25
+ });
26
+ return new LineEndpoint({
27
+ id: context.id,
28
+ gateway: context.use(messageGatewayToken),
29
+ http: context.use(httpHostToken),
30
+ config,
31
+ });
32
+ },
33
+ });
@@ -0,0 +1,3 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { lineEndpointCommands } from "../../../lib/line-endpoint-commands.js";
3
+ export default lineEndpointCommands.add;
@@ -0,0 +1,3 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { lineEndpointCommands } from "../../lib/line-endpoint-commands.js";
3
+ export default lineEndpointCommands.list;
@@ -0,0 +1,3 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { lineEndpointCommands } from "../../../lib/line-endpoint-commands.js";
3
+ export default lineEndpointCommands.remove;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-line",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "Zhin.js LINE Messaging API adapter for Plugin Runtime (HTTP webhook)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -32,21 +32,21 @@
32
32
  "directory": "plugins/adapters/line"
33
33
  },
34
34
  "dependencies": {
35
- "@zhin.js/adapter": "1.1.1",
36
- "@zhin.js/command": "1.0.3",
37
- "@zhin.js/core": "1.4.1",
35
+ "@zhin.js/adapter": "1.1.2",
36
+ "@zhin.js/command": "1.0.4",
37
+ "@zhin.js/core": "1.4.2",
38
38
  "@zhin.js/host-http": "1.0.3",
39
39
  "@zhin.js/logger": "1.0.75",
40
40
  "@zhin.js/plugin-runtime": "1.1.1"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "zod": "^4.0.0",
44
- "@zhin.js/adapter": "1.1.1",
45
- "@zhin.js/agent": "1.0.6",
46
- "@zhin.js/core": "1.4.1",
44
+ "@zhin.js/adapter": "1.1.2",
45
+ "@zhin.js/agent": "1.0.8",
46
+ "@zhin.js/core": "1.4.2",
47
47
  "@zhin.js/host-http": "1.0.3",
48
48
  "@zhin.js/plugin-runtime": "1.1.1",
49
- "zhin.js": "5.0.1"
49
+ "zhin.js": "5.0.2"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "zhin.js": {
@@ -64,12 +64,12 @@
64
64
  "typescript": "^6.0.3",
65
65
  "vitest": "^4.1.10",
66
66
  "zod": "^4.4.3",
67
- "@zhin.js/agent": "1.0.6"
67
+ "@zhin.js/agent": "1.0.8"
68
68
  },
69
69
  "files": [
70
70
  "adapters",
71
71
  "commands",
72
- "plugin.ts",
72
+ "plugin.js",
73
73
  "schema.json",
74
74
  "src",
75
75
  "lib",
@@ -87,7 +87,7 @@
87
87
  "zhin": {
88
88
  "protocol": 1,
89
89
  "type": "plugin",
90
- "entry": "./plugin.ts",
90
+ "entry": "./plugin.js",
91
91
  "engine": "^1.0.0",
92
92
  "runtime": "trusted",
93
93
  "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 { lineRuntimeStateToken } from "./lib/line-runtime-state.js";
5
+ export default definePlugin({
6
+ name: 'line',
7
+ metadata: {
8
+ displayName: 'LINE Messaging API Adapter',
9
+ },
10
+ setup(context) {
11
+ // 运行中 endpoint 注册表(line endpoint list 的"运行中"数据源)
12
+ context.resources.provide(lineRuntimeStateToken, 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 { lineRuntimeStateToken } from './src/line-runtime-state.js';
4
-
5
- export default definePlugin({
6
- name: 'line',
7
- metadata: {
8
- displayName: 'LINE Messaging API Adapter',
9
- },
10
- setup(context) {
11
- // 运行中 endpoint 注册表(line endpoint list 的"运行中"数据源)
12
- context.resources.provide(lineRuntimeStateToken, createEndpointRuntimeState());
13
- },
14
- });