@zhin.js/adapter-email 4.0.1 → 4.0.2
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 +15 -0
- package/adapters/email.js +25 -0
- package/package.json +8 -8
- package/plugin.js +8 -0
- package/plugin.ts +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @zhin.js/adapter-email
|
|
2
2
|
|
|
3
|
+
## 4.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d5cd4aa: Publish Plugin Runtime entry points and convention modules as JavaScript so
|
|
8
|
+
installed npm plugins load on Node without TypeScript stripping. Workspace
|
|
9
|
+
development continues to prefer TypeScript sources for local HMR.
|
|
10
|
+
|
|
11
|
+
Remove the unconsumed legacy game hub APIs from game-kit; game navigation and
|
|
12
|
+
records now use ordinary convention commands owned by the game hub plugin.
|
|
13
|
+
|
|
14
|
+
- zhin.js@5.0.2
|
|
15
|
+
- @zhin.js/adapter@1.1.2
|
|
16
|
+
- @zhin.js/core@1.4.2
|
|
17
|
+
|
|
3
18
|
## 4.0.1
|
|
4
19
|
|
|
5
20
|
### 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.
|
|
3
|
+
"version": "4.0.2",
|
|
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.
|
|
13
|
-
"@zhin.js/core": "1.4.
|
|
12
|
+
"@zhin.js/adapter": "1.1.2",
|
|
13
|
+
"@zhin.js/core": "1.4.2",
|
|
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.
|
|
19
|
-
"@zhin.js/core": "1.4.
|
|
18
|
+
"@zhin.js/adapter": "1.1.2",
|
|
19
|
+
"@zhin.js/core": "1.4.2",
|
|
20
20
|
"@zhin.js/plugin-runtime": "1.1.1",
|
|
21
|
-
"zhin.js": "5.0.
|
|
21
|
+
"zhin.js": "5.0.2"
|
|
22
22
|
},
|
|
23
23
|
"peerDependenciesMeta": {
|
|
24
24
|
"zhin.js": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"files": [
|
|
58
58
|
"adapters",
|
|
59
|
-
"plugin.
|
|
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.
|
|
84
|
+
"entry": "./plugin.js",
|
|
85
85
|
"engine": "^1.0.0",
|
|
86
86
|
"runtime": "trusted",
|
|
87
87
|
"features": [
|
package/plugin.js
ADDED