ag-common 0.0.468 → 0.0.470

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.
@@ -7,17 +7,15 @@ export declare const sts: STSClient;
7
7
  */
8
8
  export declare function assumeRole({ assumeRoleArn, region, }: {
9
9
  assumeRoleArn: string;
10
- /** assume this role arn. remember to use the credentials returned in subsequent calls */
10
+ /** assume this role arn. */
11
11
  region: string;
12
12
  }): Promise<{
13
13
  error: string;
14
- data?: undefined;
15
14
  } | {
16
15
  data: {
17
- accessKeyId: string | undefined;
18
- secretAccessKey: string | undefined;
19
- sessionToken: string | undefined;
20
- expiration: Date | undefined;
16
+ accessKeyId: string;
17
+ secretAccessKey: string;
18
+ sessionToken: string;
19
+ expiration: Date;
21
20
  };
22
- error?: undefined;
23
21
  }>;
@@ -33,6 +33,12 @@ function assumeRole({ assumeRoleArn, region, }) {
33
33
  if (!data.Credentials) {
34
34
  return { error: 'aws assume role error' };
35
35
  }
36
+ if (!data.Credentials.AccessKeyId ||
37
+ !data.Credentials.SecretAccessKey ||
38
+ !data.Credentials.SessionToken ||
39
+ !data.Credentials.Expiration) {
40
+ return { error: 'missing cred values error' };
41
+ }
36
42
  return {
37
43
  data: {
38
44
  accessKeyId: data.Credentials.AccessKeyId,
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.468",
2
+ "version": "0.0.470",
3
3
  "name": "ag-common",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
@@ -42,25 +42,25 @@
42
42
  "@emotion/react": "11.11.1",
43
43
  "@emotion/styled": "11.11.0",
44
44
  "@smithy/types": "^2.0.2",
45
- "@storybook/addon-actions": "7.1.1",
46
- "@storybook/addon-docs": "7.1.1",
47
- "@storybook/addon-essentials": "7.1.1",
48
- "@storybook/addon-interactions": "7.1.1",
49
- "@storybook/addon-links": "7.1.1",
50
- "@storybook/addons": "7.1.1",
51
- "@storybook/react": "7.1.1",
52
- "@storybook/react-webpack5": "7.1.1",
53
- "@storybook/theming": "7.1.1",
45
+ "@storybook/addon-actions": "7.2.1",
46
+ "@storybook/addon-docs": "7.2.1",
47
+ "@storybook/addon-essentials": "7.2.1",
48
+ "@storybook/addon-interactions": "7.2.1",
49
+ "@storybook/addon-links": "7.2.1",
50
+ "@storybook/addons": "7.2.1",
51
+ "@storybook/react": "7.2.1",
52
+ "@storybook/react-webpack5": "7.2.1",
53
+ "@storybook/theming": "7.2.1",
54
54
  "@types/jest": "^29.5.3",
55
55
  "@types/jsonwebtoken": "9.0.2",
56
- "@types/node": "20.4.5",
57
- "@types/react": "18.2.17",
56
+ "@types/node": "20.4.6",
57
+ "@types/react": "18.2.18",
58
58
  "@types/react-dom": "18.2.7",
59
59
  "cross-env": "7.0.3",
60
- "eslint-config-e7npm": "0.0.14",
60
+ "eslint-config-e7npm": "0.0.15",
61
61
  "jest": "^29.6.2",
62
62
  "rimraf": "5.0.1",
63
- "storybook": "7.1.1",
63
+ "storybook": "7.2.1",
64
64
  "ts-jest": "^29.1.1"
65
65
  },
66
66
  "files": [