@zhin.js/adapter-email 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,28 @@
1
1
  # @zhin.js/adapter-email
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
+ - zhin.js@5.0.2
23
+ - @zhin.js/adapter@1.1.2
24
+ - @zhin.js/core@1.4.2
25
+
3
26
  ## 4.0.1
4
27
 
5
28
  ### Patch Changes
@@ -0,0 +1,25 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ /**
3
+ * Convention entry: discover `adapters/email.ts` → defineAdapter.
4
+ */
5
+ import { defineAdapter } from '@zhin.js/adapter';
6
+ import { messageGatewayToken } from '@zhin.js/core/runtime';
7
+ import { EmailEndpoint } from "../lib/endpoint.js";
8
+ import { resolveEmailConfig, } from "../lib/protocol.js";
9
+ export { EmailEndpoint } from "../lib/endpoint.js";
10
+ export default defineAdapter({
11
+ capabilities: ['inbound', 'outbound'],
12
+ // image/file 段映射为邮件附件:canonical MediaRef kind=url/path 均可作
13
+ // nodemailer attachment.path(URL 由 nodemailer 拉流);邮件无交互面,交互段降级纯文本。
14
+ segments: {
15
+ outboundMedia: ['url', 'path'],
16
+ interactive: 'text',
17
+ },
18
+ create(context) {
19
+ return new EmailEndpoint({
20
+ id: context.id,
21
+ gateway: context.use(messageGatewayToken),
22
+ config: resolveEmailConfig(context.config),
23
+ });
24
+ },
25
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-email",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "type": "module",
5
5
  "description": "Zhin.js Email adapter for Plugin Runtime (SMTP/IMAP)",
6
6
  "main": "./lib/index.js",
@@ -9,16 +9,16 @@
9
9
  "imap": "^0.8.19",
10
10
  "mailparser": "^3.9.14",
11
11
  "nodemailer": "^9.0.3",
12
- "@zhin.js/adapter": "1.1.1",
13
- "@zhin.js/core": "1.4.1",
12
+ "@zhin.js/adapter": "1.1.2",
13
+ "@zhin.js/core": "1.4.3",
14
14
  "@zhin.js/logger": "1.0.75",
15
15
  "@zhin.js/plugin-runtime": "1.1.1"
16
16
  },
17
17
  "peerDependencies": {
18
- "@zhin.js/adapter": "1.1.1",
19
- "@zhin.js/core": "1.4.1",
18
+ "@zhin.js/adapter": "1.1.2",
19
+ "@zhin.js/core": "1.4.3",
20
20
  "@zhin.js/plugin-runtime": "1.1.1",
21
- "zhin.js": "5.0.1"
21
+ "zhin.js": "5.0.3"
22
22
  },
23
23
  "peerDependenciesMeta": {
24
24
  "zhin.js": {
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "files": [
58
58
  "adapters",
59
- "plugin.ts",
59
+ "plugin.js",
60
60
  "schema.json",
61
61
  "src",
62
62
  "lib",
@@ -81,7 +81,7 @@
81
81
  "zhin": {
82
82
  "protocol": 1,
83
83
  "type": "plugin",
84
- "entry": "./plugin.ts",
84
+ "entry": "./plugin.js",
85
85
  "engine": "^1.0.0",
86
86
  "runtime": "trusted",
87
87
  "features": [
package/plugin.js ADDED
@@ -0,0 +1,8 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { definePlugin } from '@zhin.js/plugin-runtime';
3
+ export default definePlugin({
4
+ name: 'email',
5
+ metadata: {
6
+ displayName: 'Email Adapter',
7
+ },
8
+ });
package/plugin.ts DELETED
@@ -1,8 +0,0 @@
1
- import { definePlugin } from '@zhin.js/plugin-runtime';
2
-
3
- export default definePlugin({
4
- name: 'email',
5
- metadata: {
6
- displayName: 'Email Adapter',
7
- },
8
- });