Skip to content

Commit

Permalink
DEV: bump version and regen
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael O'Brien committed Sep 5, 2023
1 parent 2e520ed commit 21ca7d1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
14 changes: 8 additions & 6 deletions dist/cjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,14 @@ class CustomMetrics {
if (options.client) {
this.client = options.client;
}
else if (options.creds) {
let credentials = options.creds;
let params = {
credentials,
region: credentials.region || options.region,
};
else {
let params = {};
if (options.creds) {
params.credentials = options.creds;
}
if (options.region) {
params.region = params.credentials.region || options.region;
}
this.client = new client_dynamodb_1.DynamoDBClient(params);
}
if (!options.table && !options.tableName) {
Expand Down
14 changes: 8 additions & 6 deletions dist/mjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ export class CustomMetrics {
if (options.client) {
this.client = options.client;
}
else if (options.creds) {
let credentials = options.creds;
let params = {
credentials,
region: credentials.region || options.region,
};
else {
let params = {};
if (options.creds) {
params.credentials = options.creds;
}
if (options.region) {
params.region = params.credentials.region || options.region;
}
this.client = new DynamoDBClient(params);
}
if (!options.table && !options.tableName) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "custom-metrics",
"version": "0.7.6",
"version": "0.8.0",
"description": "Custom metrics for AWS",
"main": "dist/cjs/index.js",
"module": "dist/mjs/index.js",
Expand Down

0 comments on commit 21ca7d1

Please sign in to comment.