quidproquo-actionprocessor-awslambda 0.0.44 → 0.0.45
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/lib/getActionProcessor/core/config/getConfigGetSecretActionProcessor.js +2 -1
- package/lib/getActionProcessor/core/file/getFileDeleteActionProcessor.js +2 -1
- package/lib/getActionProcessor/core/file/getFileExistsActionProcessor.d.ts +1 -1
- package/lib/getActionProcessor/core/file/getFileExistsActionProcessor.js +3 -2
- package/lib/getActionProcessor/core/file/getFileListDirectoryActionProcessor.d.ts +1 -1
- package/lib/getActionProcessor/core/file/getFileListDirectoryActionProcessor.js +3 -2
- package/lib/getActionProcessor/core/file/getFileReadTextContentsActionProcessor.d.ts +1 -1
- package/lib/getActionProcessor/core/file/getFileReadTextContentsActionProcessor.js +3 -2
- package/lib/getActionProcessor/core/file/getFileWriteTextContentsActionProcessor.d.ts +1 -1
- package/lib/getActionProcessor/core/file/getFileWriteTextContentsActionProcessor.js +3 -2
- package/lib/logic/s3/deleteFiles.d.ts +1 -1
- package/lib/logic/s3/deleteFiles.js +4 -6
- package/lib/logic/s3/listFiles.d.ts +1 -1
- package/lib/logic/s3/listFiles.js +4 -6
- package/lib/logic/s3/objectExists.d.ts +1 -1
- package/lib/logic/s3/objectExists.js +4 -6
- package/lib/logic/s3/readTextFile.d.ts +1 -1
- package/lib/logic/s3/readTextFile.js +3 -6
- package/lib/logic/s3/writeTextFile.d.ts +1 -1
- package/lib/logic/s3/writeTextFile.js +3 -6
- package/lib/logic/secretsManager/getSecret.d.ts +1 -1
- package/lib/logic/secretsManager/getSecret.js +4 -2
- package/package.json +1 -1
- package/lib/logic/s3/s3Client.d.ts +0 -3
- package/lib/logic/s3/s3Client.js +0 -5
|
@@ -10,12 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const quidproquo_webserver_1 = require("quidproquo-webserver");
|
|
13
14
|
const qpqAwsLambdaRuntimeConfigUtils_1 = require("../../../runtimeConfig/qpqAwsLambdaRuntimeConfigUtils");
|
|
14
15
|
const getSecret_1 = require("../../../logic/secretsManager/getSecret");
|
|
15
16
|
const getProcessConfigActionType = (runtimeConfig) => {
|
|
16
17
|
return ({ secretName }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
18
|
const awsSecretKey = (0, qpqAwsLambdaRuntimeConfigUtils_1.resolveSecretKey)(secretName, runtimeConfig);
|
|
18
|
-
const secretValue = yield (0, getSecret_1.getSecret)(awsSecretKey);
|
|
19
|
+
const secretValue = yield (0, getSecret_1.getSecret)(awsSecretKey, quidproquo_webserver_1.qpqWebServerUtils.getDeployRegion(runtimeConfig.qpqConfig));
|
|
19
20
|
return (0, quidproquo_core_1.actionResult)(secretValue);
|
|
20
21
|
});
|
|
21
22
|
};
|
|
@@ -9,13 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const quidproquo_webserver_1 = require("quidproquo-webserver");
|
|
12
13
|
const qpqAwsLambdaRuntimeConfigUtils_1 = require("../../../runtimeConfig/qpqAwsLambdaRuntimeConfigUtils");
|
|
13
14
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
15
|
const s3Utils_1 = require("../../../logic/s3/s3Utils");
|
|
15
16
|
const getProcessFileDelete = (runtimeConfig) => {
|
|
16
17
|
return ({ drive, filepaths }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
18
|
const s3BucketName = (0, qpqAwsLambdaRuntimeConfigUtils_1.resolveResourceName)(drive, runtimeConfig);
|
|
18
|
-
const errored = yield (0, s3Utils_1.deleteFiles)(s3BucketName, filepaths);
|
|
19
|
+
const errored = yield (0, s3Utils_1.deleteFiles)(s3BucketName, filepaths, quidproquo_webserver_1.qpqWebServerUtils.getDeployRegion(runtimeConfig.qpqConfig));
|
|
19
20
|
// errored deletes are a graceful success ~ Retry
|
|
20
21
|
// if (errored.length > 0) {
|
|
21
22
|
// return actionResultError(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { QPQAWSLambdaConfig } from '../../../runtimeConfig/QPQAWSLambdaConfig';
|
|
2
1
|
import { FileExistsActionProcessor } from 'quidproquo-core';
|
|
2
|
+
import { QPQAWSLambdaConfig } from '../../../runtimeConfig/QPQAWSLambdaConfig';
|
|
3
3
|
declare const _default: (runtimeConfig: QPQAWSLambdaConfig) => {
|
|
4
4
|
"@quidproquo-core/File/Exists": FileExistsActionProcessor;
|
|
5
5
|
};
|
|
@@ -9,13 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const qpqAwsLambdaRuntimeConfigUtils_1 = require("../../../runtimeConfig/qpqAwsLambdaRuntimeConfigUtils");
|
|
13
12
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const quidproquo_webserver_1 = require("quidproquo-webserver");
|
|
14
|
+
const qpqAwsLambdaRuntimeConfigUtils_1 = require("../../../runtimeConfig/qpqAwsLambdaRuntimeConfigUtils");
|
|
14
15
|
const s3Utils_1 = require("../../../logic/s3/s3Utils");
|
|
15
16
|
const getProcessFileExists = (runtimeConfig) => {
|
|
16
17
|
return ({ drive, filepath }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
18
|
const s3BucketName = (0, qpqAwsLambdaRuntimeConfigUtils_1.resolveResourceName)(drive, runtimeConfig);
|
|
18
|
-
return (0, quidproquo_core_1.actionResult)(yield (0, s3Utils_1.objectExists)(s3BucketName, filepath));
|
|
19
|
+
return (0, quidproquo_core_1.actionResult)(yield (0, s3Utils_1.objectExists)(s3BucketName, filepath, quidproquo_webserver_1.qpqWebServerUtils.getDeployRegion(runtimeConfig.qpqConfig)));
|
|
19
20
|
});
|
|
20
21
|
};
|
|
21
22
|
exports.default = (runtimeConfig) => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { QPQAWSLambdaConfig } from '../../../runtimeConfig/QPQAWSLambdaConfig';
|
|
2
1
|
import { FileListDirectoryActionProcessor } from 'quidproquo-core';
|
|
2
|
+
import { QPQAWSLambdaConfig } from '../../../runtimeConfig/QPQAWSLambdaConfig';
|
|
3
3
|
declare const _default: (runtimeConfig: QPQAWSLambdaConfig) => {
|
|
4
4
|
"@quidproquo-core/File/ListDirectory": FileListDirectoryActionProcessor;
|
|
5
5
|
};
|
|
@@ -9,13 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const qpqAwsLambdaRuntimeConfigUtils_1 = require("../../../runtimeConfig/qpqAwsLambdaRuntimeConfigUtils");
|
|
13
12
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const quidproquo_webserver_1 = require("quidproquo-webserver");
|
|
14
|
+
const qpqAwsLambdaRuntimeConfigUtils_1 = require("../../../runtimeConfig/qpqAwsLambdaRuntimeConfigUtils");
|
|
14
15
|
const s3Utils_1 = require("../../../logic/s3/s3Utils");
|
|
15
16
|
const getProcessFileListDirectory = (runtimeConfig) => {
|
|
16
17
|
return ({ drive, folderPath, maxFiles, pageToken }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
18
|
const s3BucketName = (0, qpqAwsLambdaRuntimeConfigUtils_1.resolveResourceName)(drive, runtimeConfig);
|
|
18
|
-
const s3FileList = yield (0, s3Utils_1.listFiles)(s3BucketName, folderPath, maxFiles, pageToken);
|
|
19
|
+
const s3FileList = yield (0, s3Utils_1.listFiles)(s3BucketName, quidproquo_webserver_1.qpqWebServerUtils.getDeployRegion(runtimeConfig.qpqConfig), folderPath, maxFiles, pageToken);
|
|
19
20
|
// Add the drive onto the list
|
|
20
21
|
const fileInfos = s3FileList.fileInfos.map((s3fi) => (Object.assign(Object.assign({}, s3fi), { drive: drive })));
|
|
21
22
|
return (0, quidproquo_core_1.actionResult)({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { QPQAWSLambdaConfig } from '../../../runtimeConfig/QPQAWSLambdaConfig';
|
|
2
1
|
import { FileReadTextContentsActionProcessor } from 'quidproquo-core';
|
|
2
|
+
import { QPQAWSLambdaConfig } from '../../../runtimeConfig/QPQAWSLambdaConfig';
|
|
3
3
|
declare const _default: (runtimeConfig: QPQAWSLambdaConfig) => {
|
|
4
4
|
"@quidproquo-core/File/ReadTextContents": FileReadTextContentsActionProcessor;
|
|
5
5
|
};
|
|
@@ -9,13 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const qpqAwsLambdaRuntimeConfigUtils_1 = require("../../../runtimeConfig/qpqAwsLambdaRuntimeConfigUtils");
|
|
13
12
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const quidproquo_webserver_1 = require("quidproquo-webserver");
|
|
14
|
+
const qpqAwsLambdaRuntimeConfigUtils_1 = require("../../../runtimeConfig/qpqAwsLambdaRuntimeConfigUtils");
|
|
14
15
|
const s3Utils_1 = require("../../../logic/s3/s3Utils");
|
|
15
16
|
const getProcessFileReadTextContents = (runtimeConfig) => {
|
|
16
17
|
return ({ drive, filepath }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
18
|
const s3BucketName = (0, qpqAwsLambdaRuntimeConfigUtils_1.resolveResourceName)(drive, runtimeConfig);
|
|
18
|
-
return (0, quidproquo_core_1.actionResult)(yield (0, s3Utils_1.readTextFile)(s3BucketName, filepath));
|
|
19
|
+
return (0, quidproquo_core_1.actionResult)(yield (0, s3Utils_1.readTextFile)(s3BucketName, filepath, quidproquo_webserver_1.qpqWebServerUtils.getDeployRegion(runtimeConfig.qpqConfig)));
|
|
19
20
|
});
|
|
20
21
|
};
|
|
21
22
|
exports.default = (runtimeConfig) => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { QPQAWSLambdaConfig } from '../../../runtimeConfig/QPQAWSLambdaConfig';
|
|
2
1
|
import { FileWriteTextContentsActionProcessor } from 'quidproquo-core';
|
|
2
|
+
import { QPQAWSLambdaConfig } from '../../../runtimeConfig/QPQAWSLambdaConfig';
|
|
3
3
|
declare const _default: (runtimeConfig: QPQAWSLambdaConfig) => {
|
|
4
4
|
"@quidproquo-core/File/WriteTextContents": FileWriteTextContentsActionProcessor;
|
|
5
5
|
};
|
|
@@ -9,13 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const qpqAwsLambdaRuntimeConfigUtils_1 = require("../../../runtimeConfig/qpqAwsLambdaRuntimeConfigUtils");
|
|
13
12
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const quidproquo_webserver_1 = require("quidproquo-webserver");
|
|
14
|
+
const qpqAwsLambdaRuntimeConfigUtils_1 = require("../../../runtimeConfig/qpqAwsLambdaRuntimeConfigUtils");
|
|
14
15
|
const s3Utils_1 = require("../../../logic/s3/s3Utils");
|
|
15
16
|
const getProcessFileWriteTextContents = (runtimeConfig) => {
|
|
16
17
|
return ({ drive, filepath, data }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
18
|
const s3BucketName = (0, qpqAwsLambdaRuntimeConfigUtils_1.resolveResourceName)(drive, runtimeConfig);
|
|
18
|
-
yield (0, s3Utils_1.writeTextFile)(s3BucketName, filepath, data);
|
|
19
|
+
yield (0, s3Utils_1.writeTextFile)(s3BucketName, filepath, data, quidproquo_webserver_1.qpqWebServerUtils.getDeployRegion(runtimeConfig.qpqConfig));
|
|
19
20
|
return (0, quidproquo_core_1.actionResult)(void 0);
|
|
20
21
|
});
|
|
21
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const deleteFiles: (drive: string, filepaths: string[]) => Promise<string[]>;
|
|
1
|
+
export declare const deleteFiles: (drive: string, filepaths: string[], region: string) => Promise<string[]>;
|
|
@@ -8,14 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.deleteFiles = void 0;
|
|
16
13
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
17
|
-
const
|
|
18
|
-
const deleteFiles = (drive, filepaths) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
+
const client_s3_2 = require("@aws-sdk/client-s3");
|
|
15
|
+
const deleteFiles = (drive, filepaths, region) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const s3Client = new client_s3_1.S3Client({ region });
|
|
19
17
|
const bucketParams = {
|
|
20
18
|
Bucket: drive,
|
|
21
19
|
Delete: {
|
|
@@ -23,7 +21,7 @@ const deleteFiles = (drive, filepaths) => __awaiter(void 0, void 0, void 0, func
|
|
|
23
21
|
Objects: filepaths.map((fp) => ({ Key: fp })),
|
|
24
22
|
},
|
|
25
23
|
};
|
|
26
|
-
const response = yield
|
|
24
|
+
const response = yield s3Client.send(new client_s3_2.DeleteObjectsCommand(bucketParams));
|
|
27
25
|
return (response.Errors || []).map((e) => e.Key || '');
|
|
28
26
|
});
|
|
29
27
|
exports.deleteFiles = deleteFiles;
|
|
@@ -7,4 +7,4 @@ export interface S3FileList {
|
|
|
7
7
|
fileInfos: S3FileInfo[];
|
|
8
8
|
pageToken?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const listFiles: (drive: string, folder?: string, maxKeys?: number, pageToken?: string) => Promise<S3FileList>;
|
|
10
|
+
export declare const listFiles: (drive: string, region: string, folder?: string, maxKeys?: number, pageToken?: string) => Promise<S3FileList>;
|
|
@@ -8,15 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.listFiles = void 0;
|
|
16
13
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
14
|
+
const client_s3_2 = require("@aws-sdk/client-s3");
|
|
17
15
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
18
|
-
const
|
|
19
|
-
const listFiles = (drive, folder = '', maxKeys = 1000, pageToken) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const listFiles = (drive, region, folder = '', maxKeys = 1000, pageToken) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
17
|
const validatedPrefix = `${folder}${folder.endsWith(quidproquo_core_1.filePathDelimiter) || !folder ? '' : quidproquo_core_1.filePathDelimiter}`;
|
|
21
18
|
const bucketParams = {
|
|
22
19
|
Bucket: drive,
|
|
@@ -27,7 +24,8 @@ const listFiles = (drive, folder = '', maxKeys = 1000, pageToken) => __awaiter(v
|
|
|
27
24
|
};
|
|
28
25
|
// Declare truncated as a flag that the while loop is based on.
|
|
29
26
|
let files = [];
|
|
30
|
-
const
|
|
27
|
+
const s3Client = new client_s3_1.S3Client({ region });
|
|
28
|
+
const response = yield s3Client.send(new client_s3_2.ListObjectsV2Command(bucketParams));
|
|
31
29
|
if (response.CommonPrefixes && !bucketParams.ContinuationToken) {
|
|
32
30
|
files = [
|
|
33
31
|
...files,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const objectExists: (bucketName: string, key: string) => Promise<boolean>;
|
|
1
|
+
export declare const objectExists: (bucketName: string, key: string, region: string) => Promise<boolean>;
|
|
@@ -8,16 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.objectExists = void 0;
|
|
16
13
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
17
|
-
const
|
|
18
|
-
const objectExists = (bucketName, key) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
+
const client_s3_2 = require("@aws-sdk/client-s3");
|
|
15
|
+
const objectExists = (bucketName, key, region) => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
16
|
try {
|
|
20
|
-
const
|
|
17
|
+
const s3Client = new client_s3_1.S3Client({ region });
|
|
18
|
+
yield s3Client.send(new client_s3_2.HeadObjectCommand({
|
|
21
19
|
Key: key,
|
|
22
20
|
Bucket: bucketName,
|
|
23
21
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const readTextFile: (bucketName: string, key: string) => Promise<string>;
|
|
1
|
+
export declare const readTextFile: (bucketName: string, key: string, region: string) => Promise<string>;
|
|
@@ -8,16 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.readTextFile = void 0;
|
|
16
13
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
17
|
-
const
|
|
18
|
-
const readTextFile = (bucketName, key) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
+
const readTextFile = (bucketName, key, region) => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
15
|
var _a;
|
|
20
|
-
const
|
|
16
|
+
const s3Client = new client_s3_1.S3Client({ region });
|
|
17
|
+
const response = yield s3Client.send(new client_s3_1.GetObjectCommand({
|
|
21
18
|
Key: key,
|
|
22
19
|
Bucket: bucketName,
|
|
23
20
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const writeTextFile: (bucketName: string, key: string, data: string) => Promise<void>;
|
|
1
|
+
export declare const writeTextFile: (bucketName: string, key: string, data: string, region: string) => Promise<void>;
|
|
@@ -8,15 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.writeTextFile = void 0;
|
|
16
13
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
yield
|
|
14
|
+
const writeTextFile = (bucketName, key, data, region) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
const s3Client = new client_s3_1.S3Client({ region });
|
|
16
|
+
yield s3Client.send(new client_s3_1.PutObjectCommand({
|
|
20
17
|
Key: key,
|
|
21
18
|
Bucket: bucketName,
|
|
22
19
|
Body: Buffer.from(data),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getSecret: (secretName: string) => Promise<string>;
|
|
1
|
+
export declare const getSecret: (secretName: string, region: string) => Promise<string>;
|
|
@@ -11,8 +11,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.getSecret = void 0;
|
|
13
13
|
const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
14
|
+
const getSecret = (secretName, region) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
const smClient = new client_secrets_manager_1.SecretsManagerClient({
|
|
16
|
+
region,
|
|
17
|
+
});
|
|
16
18
|
const response = yield smClient.send(new client_secrets_manager_1.GetSecretValueCommand({
|
|
17
19
|
SecretId: secretName,
|
|
18
20
|
}));
|
package/package.json
CHANGED
package/lib/logic/s3/s3Client.js
DELETED