@zhin.js/adapter-email 5.0.9 → 5.0.10
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 +10 -0
- package/README.md +1 -1
- package/adapters/email.js +1 -1
- package/adapters/email.ts +1 -1
- package/lib/endpoint.d.ts +2 -2
- package/package.json +9 -10
- package/plugin.js +1 -1
- package/src/endpoint.ts +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ pnpm add @zhin.js/adapter-email
|
|
|
20
20
|
|
|
21
21
|
- `@zhin.js/adapter` — 约定式 `adapters/email.ts`(`defineAdapter`)
|
|
22
22
|
- `@zhin.js/core` — `messageGatewayToken` 入站/出站
|
|
23
|
-
-
|
|
23
|
+
- `zhin.js` — `plugin.ts`(`definePlugin`)
|
|
24
24
|
- 配置经插件 `schema.json` 落到 `plugins.<instanceKey>`(`smtp` / `imap`)
|
|
25
25
|
|
|
26
26
|
入站:`gateway.receive({ conversation, message, content: text, sender, metadata })`(`conversation` 为 kind=private、id=发件人地址的 ConversationRef)
|
package/adapters/email.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Convention entry: discover `adapters/email.ts` → defineAdapter.
|
|
4
4
|
*/
|
|
5
|
-
import { defineAdapter } from '
|
|
5
|
+
import { defineAdapter } from 'zhin.js/adapter';
|
|
6
6
|
import { messageGatewayToken } from '@zhin.js/core/runtime';
|
|
7
7
|
import { EmailEndpoint } from "../lib/endpoint.js";
|
|
8
8
|
import { resolveEmailConfig, } from "../lib/protocol.js";
|
package/adapters/email.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Convention entry: discover `adapters/email.ts` → defineAdapter.
|
|
3
3
|
*/
|
|
4
|
-
import { defineAdapter } from '
|
|
4
|
+
import { defineAdapter } from 'zhin.js/adapter';
|
|
5
5
|
import { messageGatewayToken } from '@zhin.js/core/runtime';
|
|
6
6
|
import { EmailEndpoint } from '../src/endpoint.js';
|
|
7
7
|
import {
|
package/lib/endpoint.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { EndpointInstance, EndpointSendRequest } from '
|
|
1
|
+
import type { EndpointInstance, EndpointSendRequest } from 'zhin.js/adapter';
|
|
2
2
|
import type { MessageGateway } from '@zhin.js/core/runtime';
|
|
3
|
-
import type { CapabilityId } from '
|
|
3
|
+
import type { CapabilityId } from 'zhin.js';
|
|
4
4
|
import { type EmailMessage, type ResolvedEmailConfig } from './protocol.js';
|
|
5
5
|
import { type EmailImapTransport, type EmailSmtpTransport } from './transport.js';
|
|
6
6
|
export interface EmailEndpointOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/adapter-email",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Zhin.js Email adapter for Plugin Runtime (SMTP/IMAP)",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -9,17 +9,15 @@
|
|
|
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.5.
|
|
12
|
+
"@zhin.js/adapter": "1.1.10",
|
|
13
|
+
"@zhin.js/core": "1.5.10",
|
|
14
14
|
"@zhin.js/im-contract": "1.0.3",
|
|
15
|
-
"@zhin.js/logger": "1.0.76"
|
|
16
|
-
"@zhin.js/plugin-runtime": "1.1.6"
|
|
15
|
+
"@zhin.js/logger": "1.0.76"
|
|
17
16
|
},
|
|
18
17
|
"peerDependencies": {
|
|
19
|
-
"@zhin.js/adapter": "1.1.
|
|
20
|
-
"@zhin.js/core": "1.5.
|
|
21
|
-
"
|
|
22
|
-
"zhin.js": "6.0.9"
|
|
18
|
+
"@zhin.js/adapter": "1.1.10",
|
|
19
|
+
"@zhin.js/core": "1.5.10",
|
|
20
|
+
"zhin.js": "6.0.10"
|
|
23
21
|
},
|
|
24
22
|
"peerDependenciesMeta": {
|
|
25
23
|
"zhin.js": {
|
|
@@ -32,7 +30,8 @@
|
|
|
32
30
|
"@types/node": "^26.1.2",
|
|
33
31
|
"@types/nodemailer": "^8.0.1",
|
|
34
32
|
"typescript": "^6.0.3",
|
|
35
|
-
"vitest": "^4.1.10"
|
|
33
|
+
"vitest": "^4.1.10",
|
|
34
|
+
"zhin.js": "6.0.10"
|
|
36
35
|
},
|
|
37
36
|
"keywords": [
|
|
38
37
|
"zhin",
|
package/plugin.js
CHANGED
package/src/endpoint.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
5
5
|
import * as path from 'node:path';
|
|
6
6
|
import { simpleParser } from 'mailparser';
|
|
7
|
-
import type { EndpointInstance, EndpointSendRequest } from '
|
|
7
|
+
import type { EndpointInstance, EndpointSendRequest } from 'zhin.js/adapter';
|
|
8
8
|
import type { MessageGateway } from '@zhin.js/core/runtime';
|
|
9
9
|
import { formatCompact, getAdapterLogger } from '@zhin.js/logger';
|
|
10
|
-
import type { CapabilityId } from '
|
|
10
|
+
import type { CapabilityId } from 'zhin.js';
|
|
11
11
|
import {
|
|
12
12
|
emailInboundConversation,
|
|
13
13
|
formatInboundContent,
|