@dbx-tools/email 0.3.32 → 0.3.34
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/package.json +3 -3
- package/src/transport.ts +1 -15
package/package.json
CHANGED
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"juice": "^12.1.1",
|
|
20
20
|
"marked": "^18.0.5",
|
|
21
21
|
"nodemailer": "^7.0.13",
|
|
22
|
-
"@dbx-tools/shared-core": "0.3.
|
|
23
|
-
"@dbx-tools/shared-email": "0.3.
|
|
22
|
+
"@dbx-tools/shared-core": "0.3.34",
|
|
23
|
+
"@dbx-tools/shared-email": "0.3.34"
|
|
24
24
|
},
|
|
25
25
|
"main": "index.ts",
|
|
26
26
|
"license": "UNLICENSED",
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
|
-
"version": "0.3.
|
|
30
|
+
"version": "0.3.34",
|
|
31
31
|
"types": "index.ts",
|
|
32
32
|
"type": "module",
|
|
33
33
|
"exports": {
|
package/src/transport.ts
CHANGED
|
@@ -65,20 +65,6 @@ export interface EmailRuntime {
|
|
|
65
65
|
execute: EmailExecutor;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
/**
|
|
69
|
-
* Combine two optional cancellation sources into one signal. Returns the
|
|
70
|
-
* single signal when only one is present so the common path allocates
|
|
71
|
-
* nothing.
|
|
72
|
-
*/
|
|
73
|
-
function mergeSignals(a?: AbortSignal, b?: AbortSignal): AbortSignal | undefined {
|
|
74
|
-
if (!a) return b;
|
|
75
|
-
if (!b) return a;
|
|
76
|
-
const controller = new AbortController();
|
|
77
|
-
async.tieAbortSignal(controller, a);
|
|
78
|
-
async.tieAbortSignal(controller, b);
|
|
79
|
-
return controller.signal;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
68
|
/**
|
|
83
69
|
* Executor used until (or unless) the plugin installs its own: run the send
|
|
84
70
|
* directly, mapping a throw onto the same {@link ExecutionResult} shape so
|
|
@@ -172,7 +158,7 @@ export async function executeWrite<T>(
|
|
|
172
158
|
): Promise<T> {
|
|
173
159
|
const { execute } = getEmailRuntime();
|
|
174
160
|
const result = await execute(
|
|
175
|
-
(executeSignal) => fn(
|
|
161
|
+
(executeSignal) => fn(async.combineAbortSignals(executeSignal, signal)),
|
|
176
162
|
settings,
|
|
177
163
|
);
|
|
178
164
|
if (result.ok) return result.data;
|