@goldstack/template-email-send 0.3.101 → 0.3.102
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sesConnect.d.ts","sourceRoot":"","sources":["../../src/sesConnect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sesConnect.d.ts","sourceRoot":"","sources":["../../src/sesConnect.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,qBAAqB,CAAC;AAUtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAMxC,eAAO,MAAM,YAAY,QAAO,SAK/B,CAAC;AAEF,eAAO,MAAM,OAAO,oBACD,GAAG,iBACL,GAAG,0CAEjB,QAAQ,GAAG,CAyCb,CAAC;AAEF,eAAO,MAAM,aAAa,oBACP,GAAG,iBACL,GAAG,0CAEjB,QAAQ,MAAM,CAuBhB,CAAC"}
|
package/dist/src/sesConnect.js
CHANGED
|
@@ -4,11 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getFromDomain = exports.connect = exports.getMockedSES = void 0;
|
|
7
|
-
const infra_aws_1 = require("@goldstack/infra-aws");
|
|
8
7
|
const ses_1 = __importDefault(require("aws-sdk/clients/ses"));
|
|
8
|
+
const core_1 = require("aws-sdk/lib/core");
|
|
9
9
|
const assert_1 = __importDefault(require("assert"));
|
|
10
10
|
const utils_package_config_1 = require("@goldstack/utils-package-config");
|
|
11
11
|
const mockedSES_1 = require("./mockedSES");
|
|
12
|
+
const utils_esbuild_1 = require("@goldstack/utils-esbuild");
|
|
12
13
|
let mockedSES;
|
|
13
14
|
const getMockedSES = () => {
|
|
14
15
|
if (!mockedSES) {
|
|
@@ -33,7 +34,16 @@ const connect = async (goldstackConfig, packageSchema, deploymentName) => {
|
|
|
33
34
|
return mockedSES;
|
|
34
35
|
}
|
|
35
36
|
const deployment = packageConfig.getDeployment(deploymentName);
|
|
36
|
-
|
|
37
|
+
let awsUser;
|
|
38
|
+
if (process.env.AWS_ACCESS_KEY_ID) {
|
|
39
|
+
awsUser = new core_1.EnvironmentCredentials('AWS');
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
// load this in lazy to enable omitting the dependency when bundling lambdas
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
44
|
+
const infraAWSLib = require((0, utils_esbuild_1.excludeInBundle)('@goldstack/infra-aws'));
|
|
45
|
+
awsUser = await infraAWSLib.getAWSUser(deployment.awsUser);
|
|
46
|
+
}
|
|
37
47
|
const ses = new ses_1.default({
|
|
38
48
|
apiVersion: '2010-12-01',
|
|
39
49
|
credentials: awsUser,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sesConnect.js","sourceRoot":"","sources":["../../src/sesConnect.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"sesConnect.js","sourceRoot":"","sources":["../../src/sesConnect.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAsC;AACtC,2CAAuE;AAKvE,oDAA4B;AAE5B,0EAAgE;AAEhE,2CAAwC;AAExC,4DAA2D;AAE3D,IAAI,SAAgC,CAAC;AAE9B,MAAM,YAAY,GAAG,GAAc,EAAE;IAC1C,IAAI,CAAC,SAAS,EAAE;QACd,SAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;KAC7B;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AALW,QAAA,YAAY,gBAKvB;AAEK,MAAM,OAAO,GAAG,KAAK,EAC1B,eAAoB,EACpB,aAAkB,EAClB,cAAuB,EACT,EAAE;IAChB,MAAM,aAAa,GAAG,IAAI,oCAAa,CAGrC;QACA,aAAa,EAAE,eAAe;QAC9B,aAAa;KACd,CAAC,CAAC;IACH,IAAI,CAAC,cAAc,EAAE;QACnB,IAAA,g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,CAC7J,CAAC;QACF,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;KACnD;IAED,IAAI,cAAc,KAAK,OAAO,EAAE;QAC9B,OAAO,YAAY,CAAC;KACrB;IAED,MAAM,UAAU,GAAG,aAAa,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IAE/D,OAAO,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC;AACzC,CAAC,CAAC;AA3BW,QAAA,aAAa,iBA2BxB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goldstack/template-email-send",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.102",
|
|
4
4
|
"description": "Utilities for packages that implement email sending using AWS SES",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"goldstack",
|
|
@@ -50,9 +50,10 @@
|
|
|
50
50
|
"@goldstack/utils-cli": "0.2.13",
|
|
51
51
|
"@goldstack/utils-config": "0.3.33",
|
|
52
52
|
"@goldstack/utils-docker": "0.3.38",
|
|
53
|
+
"@goldstack/utils-esbuild": "0.4.1",
|
|
53
54
|
"@goldstack/utils-log": "0.2.14",
|
|
54
55
|
"@goldstack/utils-package": "0.3.38",
|
|
55
|
-
"@goldstack/utils-package-config": "0.3.
|
|
56
|
+
"@goldstack/utils-package-config": "0.3.39",
|
|
56
57
|
"@goldstack/utils-sh": "0.4.31",
|
|
57
58
|
"@goldstack/utils-template": "0.3.35",
|
|
58
59
|
"@goldstack/utils-terraform": "0.3.68",
|