🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@fluojs/email

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluojs/email - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+1
-0
dist/service.d.ts

@@ -80,2 +80,3 @@ import type { OnApplicationShutdown, OnModuleInit } from '@fluojs/runtime';

private ensureTransport;
private clearResolvedTransport;
private ensureReadyForDelivery;

@@ -82,0 +83,0 @@ private getLifecycleState;

+1
-1

@@ -1,1 +0,1 @@

{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAM3E,OAAO,KAAK,EACV,KAAK,EAGL,YAAY,EACZ,gCAAgC,EAChC,oBAAoB,EAEpB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EAKf,4BAA4B,EAC7B,MAAM,YAAY,CAAC;AAqEpB;;;;;;;GAOG;AACH,qBACa,YAAa,YAAW,KAAK,EAAE,YAAY,EAAE,qBAAqB;IAMjE,OAAO,CAAC,QAAQ,CAAC,OAAO;IALpC,OAAO,CAAC,cAAc,CAAyC;IAC/D,OAAO,CAAC,gBAAgB,CAA4B;IACpD,OAAO,CAAC,iBAAiB,CAA6B;IACtD,OAAO,CAAC,gBAAgB,CAAsC;gBAEjC,OAAO,EAAE,4BAA4B;IAE5D,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;IAiBtC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;YAgBrB,cAAc;IAiC5B;;;;OAIG;IACH,4BAA4B;IAY5B;;;;;;;;;;;;;;;;;OAiBG;IACG,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC;IA6B3F;;;;;;;;;;;;OA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AC;IA6B3F;;;;;;;;;;;;OAYG;IACG,QAAQ,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,EAAE,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA6BpH;;;;;;;;;;;;;;;;;OAiBG;IACG,gBAAgB,CACpB,YAAY,EAAE,gCAAgC,EAC9C,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC;YA+Bb,eAAe;IAiB7B,OAAO,CAAC,sBAAsB;YAKhB,sBAAsB;IAwBpC,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,6BAA6B;IAMrC,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,gBAAgB;YAuBV,kBAAkB;CAkBjC"}

@@ -51,2 +51,5 @@ let _initClass;

}
function createCleanupFailureCause(originalError, cleanupError) {
return new AggregateError([originalError, cleanupError], 'Email transport verification failed and the owned transport failed to close.');
}
function isShutdownLifecycleState(state) {

@@ -138,3 +141,14 @@ return state === 'stopping' || state === 'stopped';

this.lifecycleState = 'failed';
throw createLifecycleError('Email transport failed to initialize.', error);
let cause = error;
const transport = this.resolvedTransport;
if (transport && this.options.transport.ownsResources && transport.close) {
try {
await transport.close();
} catch (cleanupError) {
cause = createCleanupFailureCause(error, cleanupError);
} finally {
this.clearResolvedTransport();
}
}
throw createLifecycleError('Email transport failed to initialize.', cause);
}

@@ -300,2 +314,6 @@ }

}
clearResolvedTransport() {
this.resolvedTransport = undefined;
this.transportPromise = undefined;
}
async ensureReadyForDelivery() {

@@ -302,0 +320,0 @@ this.assertCanDeliver();

@@ -13,3 +13,3 @@ {

],
"version": "1.0.0",
"version": "1.0.1",
"private": false,

@@ -56,6 +56,6 @@ "license": "MIT",

"dependencies": {
"@fluojs/core": "^1.0.0",
"@fluojs/di": "^1.0.0",
"@fluojs/notifications": "^1.0.0",
"@fluojs/runtime": "^1.0.0"
"@fluojs/core": "^1.0.3",
"@fluojs/di": "^1.0.3",
"@fluojs/notifications": "^1.0.1",
"@fluojs/runtime": "^1.1.1"
},

@@ -62,0 +62,0 @@ "peerDependencies": {

@@ -304,6 +304,17 @@ # @fluojs/email

- `Email`: `address`와 선택적 display `name`을 포함하는 정규화된 이메일 주소 값입니다.
- `EmailAddress` / `EmailAddressLike`: `EmailService`가 정규화하기 전에 허용하는 구조화 또는 축약 recipient 값입니다.
- `EmailModuleOptions` / `EmailAsyncModuleOptions`: sender 기본값, renderer, lifecycle 검증, transport factory wiring을 포함하는 동기/비동기 모듈 등록 계약입니다.
- `EmailMessage`
- `EmailNotificationDispatchRequest` / `EmailNotificationPayload`: `EmailChannel`이 소비하는 notification channel payload 계약입니다.
- `EmailSendOptions` / `EmailSendManyOptions`: abort signal과 batch failure 수집 같은 per-send 제어 옵션입니다.
- `EmailSendResult` / `EmailSendBatchResult` / `EmailSendFailure`: accepted, pending, rejected, failed message를 보존하는 직접/배치 전달 결과 계약입니다.
- `EmailTransportReceipt`: `EmailSendResult`에 보존되는 transport-level provider receipt입니다.
- `EmailTransport`
- `EmailTransportContext`
- `EmailTransportFactory`
- `EmailTemplateRenderInput`
- `EmailTemplateRenderer`
- `EmailTemplateRenderResult`
- `NormalizedEmailAddressList` / `NormalizedEmailMessage`: typed integration과 테스트를 위해 노출되는 내부 정규화 message shape입니다.

@@ -317,2 +328,5 @@ ### 통합 서브패스

- `createEmailPlatformStatusSnapshot(...)`
- `EmailLifecycleState`
- `EmailPlatformStatusSnapshot`
- `EmailStatusAdapterInput`
- `EmailConfigurationError`

@@ -319,0 +333,0 @@ - `EmailLifecycleError`: lifecycle로 차단된 전달, transport 초기화 또는 검증, 소유 리소스 shutdown 실패에서 발생합니다. 애플리케이션 teardown과 전송이 경합할 수 있다면 이 에러를 catch하세요.

@@ -304,6 +304,17 @@ # @fluojs/email

- `Email`: Normalized email address value with an `address` and optional display `name`.
- `EmailAddress` / `EmailAddressLike`: Structured or shorthand recipient values accepted by `EmailService` before normalization.
- `EmailModuleOptions` / `EmailAsyncModuleOptions`: Synchronous and async module registration contracts, including sender defaults, renderer, lifecycle verification, and transport factory wiring.
- `EmailMessage`
- `EmailNotificationDispatchRequest` / `EmailNotificationPayload`: Notification channel payload contracts consumed by `EmailChannel`.
- `EmailSendOptions` / `EmailSendManyOptions`: Per-send controls such as abort signals and batch failure collection.
- `EmailSendResult` / `EmailSendBatchResult` / `EmailSendFailure`: Direct and batch delivery result contracts that preserve accepted, pending, rejected, and failed messages.
- `EmailTransportReceipt`: Transport-level provider receipt preserved by `EmailSendResult`.
- `EmailTransport`
- `EmailTransportContext`
- `EmailTransportFactory`
- `EmailTemplateRenderInput`
- `EmailTemplateRenderer`
- `EmailTemplateRenderResult`
- `NormalizedEmailAddressList` / `NormalizedEmailMessage`: Internal-normalized message shapes exposed for typed integrations and tests.

@@ -317,2 +328,5 @@ ### Integration subpaths

- `createEmailPlatformStatusSnapshot(...)`
- `EmailLifecycleState`
- `EmailPlatformStatusSnapshot`
- `EmailStatusAdapterInput`
- `EmailConfigurationError`

@@ -319,0 +333,0 @@ - `EmailLifecycleError`: thrown by lifecycle-gated delivery, transport initialization or verification, and owned-resource shutdown failures. Catch this error when sends can race with application teardown.