@nr1e/aws 1.0.4 → 1.0.5

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/index.d.mts CHANGED
@@ -9,4 +9,5 @@ export * from './s3.mjs';
9
9
  export * from './secrets-manager.mjs';
10
10
  export * from './ses.mjs';
11
11
  export * from './sqs.mjs';
12
+ export * from './sts.mjs';
12
13
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
package/dist/index.mjs CHANGED
@@ -9,4 +9,5 @@ export * from './s3.mjs';
9
9
  export * from './secrets-manager.mjs';
10
10
  export * from './ses.mjs';
11
11
  export * from './sqs.mjs';
12
+ export * from './sts.mjs';
12
13
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
package/dist/sts.d.mts ADDED
@@ -0,0 +1,4 @@
1
+ import { GetCallerIdentityCommand, GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput, STSClient } from '@aws-sdk/client-sts';
2
+ export { STSClient, GetCallerIdentityCommand, GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput, };
3
+ export declare function getStsClient(region?: string): STSClient;
4
+ //# sourceMappingURL=sts.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sts.d.mts","sourceRoot":"","sources":["../src/sts.mts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAC7B,8BAA8B,EAC9B,SAAS,EACV,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,SAAS,EACT,wBAAwB,EACxB,6BAA6B,EAC7B,8BAA8B,GAC/B,CAAC;AAIF,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,aAQ3C"}
package/dist/sts.mjs ADDED
@@ -0,0 +1,14 @@
1
+ import { GetCallerIdentityCommand, STSClient, } from '@aws-sdk/client-sts';
2
+ import { getAwsRegion } from './region.mjs';
3
+ export { STSClient, GetCallerIdentityCommand, };
4
+ const stsClients = new Map();
5
+ export function getStsClient(region) {
6
+ const regionKey = region || getAwsRegion();
7
+ let client = stsClients.get(regionKey);
8
+ if (!client) {
9
+ client = new STSClient({ region: regionKey });
10
+ stsClients.set(regionKey, client);
11
+ }
12
+ return client;
13
+ }
14
+ //# sourceMappingURL=sts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sts.mjs","sourceRoot":"","sources":["../src/sts.mts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAGxB,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAE1C,OAAO,EACL,SAAS,EACT,wBAAwB,GAGzB,CAAC;AAEF,MAAM,UAAU,GAAG,IAAI,GAAG,EAAqB,CAAC;AAEhD,MAAM,UAAU,YAAY,CAAC,MAAe;IAC1C,MAAM,SAAS,GAAG,MAAM,IAAI,YAAY,EAAE,CAAC;IAC3C,IAAI,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,GAAG,IAAI,SAAS,CAAC,EAAC,MAAM,EAAE,SAAS,EAAC,CAAC,CAAC;QAC5C,UAAU,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nr1e/aws",
3
3
  "description": "Provides common AWS utilities",
4
- "version": "1.0.4",
4
+ "version": "1.0.5",
5
5
  "type": "module",
6
6
  "author": "NR1E, Inc.",
7
7
  "publishConfig": {
@@ -37,6 +37,7 @@
37
37
  "@aws-sdk/client-secrets-manager": "3.958.0",
38
38
  "@aws-sdk/client-ses": "3.958.0",
39
39
  "@aws-sdk/client-sqs": "3.958.0",
40
+ "@aws-sdk/client-sts": "3.958.0",
40
41
  "@aws-sdk/lib-dynamodb": "3.958.0",
41
42
  "@aws-sdk/s3-request-presigner": "3.958.0",
42
43
  "@aws-sdk/util-dynamodb": "3.958.0",