@atlantjs/backend 7.2.0 → 7.2.2
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/backend/application/envs/env-vars.d.ts +2 -0
- package/backend/application/envs/env-vars.js +13 -1
- package/email-delivery/providers/email-delivery-amazon-ses.provider.js +2 -1
- package/email-delivery/providers/email-delivery-resend.provider.js +2 -1
- package/package.json +4 -4
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -6,3 +6,5 @@ export declare const CORS_ALLOWED_ORIGINS: string;
|
|
|
6
6
|
export declare const ENVIRONMENT: EnvironmentPoint;
|
|
7
7
|
export declare const EMAIL_DELIVERY_SERVICE_PROVIDER: EmailDeliveryProviderPoint;
|
|
8
8
|
export declare const EMAIL_DELIVERY_FALLBACK_PROVIDER: EmailDeliveryProviderPoint;
|
|
9
|
+
export declare const RESEND_API_KEY: string;
|
|
10
|
+
export declare const AWS_REGION: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EMAIL_DELIVERY_FALLBACK_PROVIDER = exports.EMAIL_DELIVERY_SERVICE_PROVIDER = exports.ENVIRONMENT = exports.CORS_ALLOWED_ORIGINS = exports.LOAD_MODULES = exports.APP_PORT = void 0;
|
|
3
|
+
exports.AWS_REGION = exports.RESEND_API_KEY = exports.EMAIL_DELIVERY_FALLBACK_PROVIDER = exports.EMAIL_DELIVERY_SERVICE_PROVIDER = exports.ENVIRONMENT = exports.CORS_ALLOWED_ORIGINS = exports.LOAD_MODULES = exports.APP_PORT = void 0;
|
|
4
4
|
const arch_1 = require("@atlantjs/arch");
|
|
5
5
|
const parchment_1 = require("@atlantjs/parchment");
|
|
6
6
|
const email_delivery_provider_point_1 = require("../../../email-delivery/points/email-delivery-provider.point");
|
|
@@ -55,3 +55,15 @@ exports.EMAIL_DELIVERY_FALLBACK_PROVIDER = parchment_1.Parchment.verse({
|
|
|
55
55
|
],
|
|
56
56
|
description: "The current environment in which the application is running",
|
|
57
57
|
});
|
|
58
|
+
exports.RESEND_API_KEY = parchment_1.Parchment.verse({
|
|
59
|
+
name: "RESEND_API_KEY",
|
|
60
|
+
type: "text",
|
|
61
|
+
isRequired: true,
|
|
62
|
+
description: "API key used to authenticate requests to the Resend email delivery service",
|
|
63
|
+
});
|
|
64
|
+
exports.AWS_REGION = parchment_1.Parchment.verse({
|
|
65
|
+
name: "AWS_REGION",
|
|
66
|
+
type: "text",
|
|
67
|
+
isRequired: true,
|
|
68
|
+
description: "Specifies the AWS region to be used by the application",
|
|
69
|
+
});
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SESProvider = void 0;
|
|
4
4
|
const client_ses_1 = require("@aws-sdk/client-ses");
|
|
5
|
+
const env_vars_1 = require("../../backend/application/envs/env-vars");
|
|
5
6
|
const ses = new client_ses_1.SESClient({
|
|
6
|
-
region:
|
|
7
|
+
region: env_vars_1.AWS_REGION,
|
|
7
8
|
});
|
|
8
9
|
class SESProvider {
|
|
9
10
|
async send({ to, subject, html, from }) {
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ResendProvider = void 0;
|
|
4
4
|
const resend_1 = require("resend");
|
|
5
|
-
const
|
|
5
|
+
const env_vars_1 = require("../../backend/application/envs/env-vars");
|
|
6
|
+
const resend = new resend_1.Resend(env_vars_1.RESEND_API_KEY);
|
|
6
7
|
class ResendProvider {
|
|
7
8
|
async send({ to, subject, html, from }) {
|
|
8
9
|
await resend.emails.send({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlantjs/backend",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"publishConfig": {
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"test:unit:cov": "yarn test:unit --coverage --runInBand"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlantjs/arch": "
|
|
32
|
-
"@atlantjs/database": "1.0.
|
|
33
|
-
"@atlantjs/parchment": "1.0.
|
|
31
|
+
"@atlantjs/arch": "15.0.0",
|
|
32
|
+
"@atlantjs/database": "1.0.31",
|
|
33
|
+
"@atlantjs/parchment": "1.0.23",
|
|
34
34
|
"@aws-sdk/client-ses": "3.1009.0",
|
|
35
35
|
"body-parser": "1.20.2",
|
|
36
36
|
"class-transformer": "0.5.1",
|