@dsh-plus/notify-email 0.1.17 → 0.1.18
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/lib/index.js +8 -4
- package/package.json +3 -3
- package/src/service.ts +5 -5
package/lib/index.js
CHANGED
|
@@ -431,13 +431,17 @@ function installTurnEndWatcher(ctx, service, resolveConfig) {
|
|
|
431
431
|
* - 投递:首个非空 EmailNotice 经 Mailer 发送;单个触发器抛错不影响其余。
|
|
432
432
|
* @module @dsh-plus/notify-email
|
|
433
433
|
*/
|
|
434
|
-
/** credentials seam
|
|
434
|
+
/** credentials seam 最小面:inject 硬声明保证时序(credentials-local init 为异步,
|
|
435
|
+
* 构造期探测 get() 可能早于其激活而拿到 undefined,导致密码解析静默降级)。 */
|
|
435
436
|
function credentialsOf(ctx) {
|
|
436
|
-
|
|
437
|
-
return found !== null && typeof found === "object" ? found : void 0;
|
|
437
|
+
return ctx.credentials;
|
|
438
438
|
}
|
|
439
439
|
var NotifyEmailService = class extends Service {
|
|
440
|
-
static [Context.inject] = [
|
|
440
|
+
static [Context.inject] = [
|
|
441
|
+
"agents",
|
|
442
|
+
"tools",
|
|
443
|
+
"credentials"
|
|
444
|
+
];
|
|
441
445
|
triggers = [];
|
|
442
446
|
mailer;
|
|
443
447
|
current;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-plus/notify-email",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "dsh-plus service+ui plugin: 任务结束/等待决策/出错时向指定邮箱发送邮件通知",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
34
|
+
"@dsh-plus/shared": "0.1.12",
|
|
35
|
+
"nodemailer": "9.0.6"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@deepseek-ai/cordis": "^4.0.2",
|
package/src/service.ts
CHANGED
|
@@ -24,14 +24,14 @@ declare module '@deepseek-ai/cordis' {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/** credentials seam
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return
|
|
27
|
+
/** credentials seam 最小面:inject 硬声明保证时序(credentials-local init 为异步,
|
|
28
|
+
* 构造期探测 get() 可能早于其激活而拿到 undefined,导致密码解析静默降级)。 */
|
|
29
|
+
function credentialsOf(ctx: Context): CredentialsSeamLike {
|
|
30
|
+
return (ctx as unknown as { credentials: CredentialsSeamLike }).credentials
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export class NotifyEmailService extends Service {
|
|
34
|
-
static [Context.inject] = ['agents', 'tools']
|
|
34
|
+
static [Context.inject] = ['agents', 'tools', 'credentials']
|
|
35
35
|
|
|
36
36
|
private readonly triggers: NotifyTrigger[] = []
|
|
37
37
|
private readonly mailer: Mailer
|