@dmptool/utils 1.0.36 → 1.0.37
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/dynamo.d.ts +1 -0
- package/dist/dynamo.js +5 -2
- package/dist/ssm.d.ts +1 -1
- package/dist/ssm.js +1 -1
- package/package.json +1 -1
package/dist/dynamo.d.ts
CHANGED
package/dist/dynamo.js
CHANGED
|
@@ -46,8 +46,11 @@ class DMPToolDynamoError extends Error {
|
|
|
46
46
|
}
|
|
47
47
|
// Initialize AWS SDK clients (outside the handler function)
|
|
48
48
|
const getDynamoDBClient = (dynamoConfigParams) => {
|
|
49
|
-
const { region, maxAttempts } = dynamoConfigParams;
|
|
50
|
-
|
|
49
|
+
const { region, maxAttempts, endpoint } = dynamoConfigParams;
|
|
50
|
+
// If an endpoint was specified, we are running in a local environment
|
|
51
|
+
return endpoint === undefined
|
|
52
|
+
? new client_dynamodb_1.DynamoDBClient({ region, maxAttempts })
|
|
53
|
+
: new client_dynamodb_1.DynamoDBClient({ region, maxAttempts, endpoint });
|
|
51
54
|
};
|
|
52
55
|
/**
|
|
53
56
|
* Lightweight query just to check if the DMP exists.
|
package/dist/ssm.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ export interface SsmConnectionParams {
|
|
|
16
16
|
* @returns The value of the variable, or undefined if the variable could not be found.
|
|
17
17
|
* @throws
|
|
18
18
|
*/
|
|
19
|
-
export declare const getSSMParameter: (connectionParams: SsmConnectionParams, key: string, env?: EnvironmentEnum
|
|
19
|
+
export declare const getSSMParameter: (connectionParams: SsmConnectionParams, key: string, env?: EnvironmentEnum) => Promise<string | undefined>;
|
package/dist/ssm.js
CHANGED
|
@@ -13,7 +13,7 @@ const client_ssm_1 = require("@aws-sdk/client-ssm");
|
|
|
13
13
|
* @returns The value of the variable, or undefined if the variable could not be found.
|
|
14
14
|
* @throws
|
|
15
15
|
*/
|
|
16
|
-
const getSSMParameter = async (connectionParams, key, env = general_1.EnvironmentEnum.DEV
|
|
16
|
+
const getSSMParameter = async (connectionParams, key, env = general_1.EnvironmentEnum.DEV) => {
|
|
17
17
|
var _a;
|
|
18
18
|
if (connectionParams.logger && key && key.trim() !== '') {
|
|
19
19
|
// Create an SSM client (use the endpoint if we are not using TLS - local dev)
|
package/package.json
CHANGED