@upyo/lettermint 0.5.0-dev.184 → 0.5.0-dev.188
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/dist/index.cjs +5 -2
- package/dist/index.js +5 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -405,7 +405,7 @@ var LettermintTransport = class {
|
|
|
405
405
|
const response = await this.httpClient.sendMessage(emailData, options?.signal, idempotencyKey);
|
|
406
406
|
return responseToReceipt(response);
|
|
407
407
|
} catch (error) {
|
|
408
|
-
if (
|
|
408
|
+
if (isCallerAbort(error, options?.signal)) throw error;
|
|
409
409
|
return createLettermintFailure(error instanceof Error ? error.message : String(error), error);
|
|
410
410
|
}
|
|
411
411
|
}
|
|
@@ -464,7 +464,7 @@ var LettermintTransport = class {
|
|
|
464
464
|
yield responseToReceipt(result);
|
|
465
465
|
}
|
|
466
466
|
} catch (error) {
|
|
467
|
-
if (
|
|
467
|
+
if (isCallerAbort(error, options?.signal)) throw error;
|
|
468
468
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
469
469
|
for (const receipt of receipts) {
|
|
470
470
|
if (receipt !== void 0) {
|
|
@@ -546,6 +546,9 @@ function isSuccessfulStatus(status) {
|
|
|
546
546
|
function isAbortError(error) {
|
|
547
547
|
return error instanceof Error && error.name === "AbortError";
|
|
548
548
|
}
|
|
549
|
+
function isCallerAbort(error, signal) {
|
|
550
|
+
return signal?.aborted === true && (isAbortError(error) || error === signal.reason);
|
|
551
|
+
}
|
|
549
552
|
|
|
550
553
|
//#endregion
|
|
551
554
|
exports.LettermintApiError = LettermintApiError;
|
package/dist/index.js
CHANGED
|
@@ -382,7 +382,7 @@ var LettermintTransport = class {
|
|
|
382
382
|
const response = await this.httpClient.sendMessage(emailData, options?.signal, idempotencyKey);
|
|
383
383
|
return responseToReceipt(response);
|
|
384
384
|
} catch (error) {
|
|
385
|
-
if (
|
|
385
|
+
if (isCallerAbort(error, options?.signal)) throw error;
|
|
386
386
|
return createLettermintFailure(error instanceof Error ? error.message : String(error), error);
|
|
387
387
|
}
|
|
388
388
|
}
|
|
@@ -441,7 +441,7 @@ var LettermintTransport = class {
|
|
|
441
441
|
yield responseToReceipt(result);
|
|
442
442
|
}
|
|
443
443
|
} catch (error) {
|
|
444
|
-
if (
|
|
444
|
+
if (isCallerAbort(error, options?.signal)) throw error;
|
|
445
445
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
446
446
|
for (const receipt of receipts) {
|
|
447
447
|
if (receipt !== void 0) {
|
|
@@ -523,6 +523,9 @@ function isSuccessfulStatus(status) {
|
|
|
523
523
|
function isAbortError(error) {
|
|
524
524
|
return error instanceof Error && error.name === "AbortError";
|
|
525
525
|
}
|
|
526
|
+
function isCallerAbort(error, signal) {
|
|
527
|
+
return signal?.aborted === true && (isAbortError(error) || error === signal.reason);
|
|
528
|
+
}
|
|
526
529
|
|
|
527
530
|
//#endregion
|
|
528
531
|
export { LettermintApiError, LettermintTimeoutError, LettermintTransport, createLettermintConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upyo/lettermint",
|
|
3
|
-
"version": "0.5.0-dev.
|
|
3
|
+
"version": "0.5.0-dev.188",
|
|
4
4
|
"description": "Lettermint transport for Upyo email library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@upyo/core": "0.5.0-dev.
|
|
56
|
+
"@upyo/core": "0.5.0-dev.188+e2358766"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"tsdown": "^0.12.7",
|