@cdklabs/cdk-construct-connect-datalake 0.0.21 → 0.0.22
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/.jsii +10 -9
- package/.jsii.tabl.json +1 -1
- package/lib/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +3 -3
- package/node_modules/@aws-sdk/client-connect/README.md +7 -0
- package/node_modules/@aws-sdk/client-connect/dist-cjs/index.js +26 -1
- package/node_modules/@aws-sdk/client-connect/dist-es/Connect.js +2 -0
- package/node_modules/@aws-sdk/client-connect/dist-es/commands/UpdateContactTaskTemplateCommand.js +4 -0
- package/node_modules/@aws-sdk/client-connect/dist-es/commands/index.js +1 -0
- package/node_modules/@aws-sdk/client-connect/dist-es/models/enums.js +1 -0
- package/node_modules/@aws-sdk/client-connect/dist-es/schemas/schemas_0.js +16 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/Connect.d.ts +7 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ConnectClient.d.ts +3 -2
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/DeleteContactDataCommand.d.ts +9 -7
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/SearchContactFlowsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/SearchDataTablesCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/StartAttachedFileUploadCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/UpdateContactTaskTemplateCommand.d.ts +131 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/models/enums.d.ts +1 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/models/errors.d.ts +3 -3
- package/node_modules/@aws-sdk/client-connect/dist-types/models/models_0.d.ts +4 -4
- package/node_modules/@aws-sdk/client-connect/dist-types/models/models_1.d.ts +19 -10
- package/node_modules/@aws-sdk/client-connect/dist-types/models/models_3.d.ts +27 -71
- package/node_modules/@aws-sdk/client-connect/dist-types/models/models_4.d.ts +71 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/schemas/schemas_0.d.ts +3 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/Connect.d.ts +17 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/ConnectClient.d.ts +6 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/SearchContactFlowsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/SearchDataTablesCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/UpdateContactTaskTemplateCommand.d.ts +42 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/enums.d.ts +1 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_3.d.ts +6 -15
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_4.d.ts +18 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/schemas/schemas_0.d.ts +3 -0
- package/node_modules/@aws-sdk/client-connect/package.json +3 -3
- package/node_modules/@aws-sdk/client-glue/README.md +14 -0
- package/node_modules/@aws-sdk/client-glue/dist-cjs/index.js +72 -1
- package/node_modules/@aws-sdk/client-glue/dist-es/Glue.js +4 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/commands/GetDataCatalogExportConfigurationCommand.js +4 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/commands/PutDataCatalogExportConfigurationCommand.js +4 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/commands/index.js +2 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/models/enums.js +11 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/schemas/schemas_0.js +41 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/Glue.d.ts +15 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/GlueClient.d.ts +4 -2
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetDataCatalogExportConfigurationCommand.d.ts +89 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/PutDataCatalogExportConfigurationCommand.d.ts +95 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/RunStatementCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/index.d.ts +2 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/models/enums.d.ts +27 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/models/models_2.d.ts +92 -130
- package/node_modules/@aws-sdk/client-glue/dist-types/models/models_3.d.ts +131 -2
- package/node_modules/@aws-sdk/client-glue/dist-types/schemas/schemas_0.d.ts +7 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/Glue.d.ts +35 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/GlueClient.d.ts +12 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/GetDataCatalogExportConfigurationCommand.d.ts +42 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/PutDataCatalogExportConfigurationCommand.d.ts +42 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/RunStatementCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/enums.d.ts +13 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/models_2.d.ts +24 -57
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/models_3.d.ts +57 -2
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/schemas/schemas_0.d.ts +7 -0
- package/node_modules/@aws-sdk/client-glue/package.json +3 -3
- package/node_modules/@aws-sdk/client-lakeformation/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-lakeformation/package.json +3 -3
- package/node_modules/@aws-sdk/client-ram/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ram/package.json +3 -3
- package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-sts/package.json +3 -3
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1063 -945
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +3 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +5 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +42 -12
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +93 -9
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +4 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +5 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +2 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +2 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +3 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +4 -1
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +35 -28
- package/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js +35 -28
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/LoginCredentialsFetcher.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/ts3.4/LoginCredentialsFetcher.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/package.json +8 -8
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/LICENSE +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/README.md +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/bin/js-yaml.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/dist/js-yaml.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/dist/js-yaml.min.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/index.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/common.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/dumper.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/exception.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/loader.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/mark.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/core.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/default_full.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/default_safe.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/failsafe.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/json.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/binary.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/bool.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/float.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/int.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/js/function.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/js/regexp.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/js/undefined.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/map.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/merge.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/null.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/omap.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/pairs.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/seq.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/set.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/str.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/timestamp.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type.js +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/LICENSE +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/README.md +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/index.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action/append/constant.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action/append.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action/count.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action/help.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action/store/constant.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action/store/false.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action/store/true.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action/store.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action/subparsers.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action/version.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action_container.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/argparse.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/argument/error.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/argument/exclusive.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/argument/group.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/argument_parser.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/const.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/help/added_formatters.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/help/formatter.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/namespace.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/utils.js +0 -0
- /package/node_modules/{argparse → js-yaml/node_modules/argparse}/package.json +0 -0
- /package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/package.json +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CredentialsProviderError
|
|
1
|
+
import { CredentialsProviderError } from "@smithy/core/config";
|
|
2
2
|
import { HttpRequest } from "@smithy/core/protocols";
|
|
3
3
|
import { createHash, createPrivateKey, createPublicKey, sign } from "node:crypto";
|
|
4
4
|
import { promises as fs } from "node:fs";
|
|
@@ -26,13 +26,7 @@ export class LoginCredentialsFetcher {
|
|
|
26
26
|
if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) {
|
|
27
27
|
return this.refresh(token);
|
|
28
28
|
}
|
|
29
|
-
return
|
|
30
|
-
accessKeyId: accessToken.accessKeyId,
|
|
31
|
-
secretAccessKey: accessToken.secretAccessKey,
|
|
32
|
-
sessionToken: accessToken.sessionToken,
|
|
33
|
-
accountId: accessToken.accountId,
|
|
34
|
-
expiration: new Date(accessToken.expiresAt),
|
|
35
|
-
};
|
|
29
|
+
return this.toCredentials(token.accessToken);
|
|
36
30
|
}
|
|
37
31
|
get logger() {
|
|
38
32
|
return this.init?.logger;
|
|
@@ -40,7 +34,25 @@ export class LoginCredentialsFetcher {
|
|
|
40
34
|
get loginSession() {
|
|
41
35
|
return this.profileData.login_session;
|
|
42
36
|
}
|
|
37
|
+
toCredentials(token) {
|
|
38
|
+
return {
|
|
39
|
+
accessKeyId: token.accessKeyId,
|
|
40
|
+
secretAccessKey: token.secretAccessKey,
|
|
41
|
+
sessionToken: token.sessionToken,
|
|
42
|
+
accountId: token.accountId,
|
|
43
|
+
expiration: new Date(token.expiresAt),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
43
46
|
async refresh(token) {
|
|
47
|
+
const diskToken = await this.loadToken().catch(() => token);
|
|
48
|
+
const now = Date.now();
|
|
49
|
+
const diskExpiry = new Date(diskToken.accessToken.expiresAt).getTime();
|
|
50
|
+
const tokenExpiry = new Date(token.accessToken.expiresAt).getTime();
|
|
51
|
+
const freshToken = diskExpiry <= now && tokenExpiry > now ? token : diskToken;
|
|
52
|
+
const freshExpiry = new Date(freshToken.accessToken.expiresAt).getTime();
|
|
53
|
+
if (freshExpiry - Date.now() > LoginCredentialsFetcher.REFRESH_THRESHOLD) {
|
|
54
|
+
return this.toCredentials(freshToken.accessToken);
|
|
55
|
+
}
|
|
44
56
|
const { SigninClient, CreateOAuth2TokenCommand } = await import("@aws-sdk/nested-clients/signin");
|
|
45
57
|
const { logger, userAgentAppId } = this.callerClientConfig ?? {};
|
|
46
58
|
const isH2 = (requestHandler) => {
|
|
@@ -64,8 +76,8 @@ export class LoginCredentialsFetcher {
|
|
|
64
76
|
this.createDPoPInterceptor(client.middlewareStack);
|
|
65
77
|
const commandInput = {
|
|
66
78
|
tokenInput: {
|
|
67
|
-
clientId:
|
|
68
|
-
refreshToken:
|
|
79
|
+
clientId: freshToken.clientId,
|
|
80
|
+
refreshToken: freshToken.refreshToken,
|
|
69
81
|
grantType: "refresh_token",
|
|
70
82
|
},
|
|
71
83
|
};
|
|
@@ -82,9 +94,9 @@ export class LoginCredentialsFetcher {
|
|
|
82
94
|
const expiresInMs = (expiresIn ?? 900) * 1000;
|
|
83
95
|
const expiration = new Date(Date.now() + expiresInMs);
|
|
84
96
|
const updatedToken = {
|
|
85
|
-
...
|
|
97
|
+
...freshToken,
|
|
86
98
|
accessToken: {
|
|
87
|
-
...
|
|
99
|
+
...freshToken.accessToken,
|
|
88
100
|
accessKeyId,
|
|
89
101
|
secretAccessKey,
|
|
90
102
|
sessionToken,
|
|
@@ -93,14 +105,7 @@ export class LoginCredentialsFetcher {
|
|
|
93
105
|
refreshToken,
|
|
94
106
|
};
|
|
95
107
|
await this.saveToken(updatedToken);
|
|
96
|
-
|
|
97
|
-
return {
|
|
98
|
-
accessKeyId: newAccessToken.accessKeyId,
|
|
99
|
-
secretAccessKey: newAccessToken.secretAccessKey,
|
|
100
|
-
sessionToken: newAccessToken.sessionToken,
|
|
101
|
-
accountId: newAccessToken.accountId,
|
|
102
|
-
expiration,
|
|
103
|
-
};
|
|
108
|
+
return this.toCredentials(updatedToken.accessToken);
|
|
104
109
|
}
|
|
105
110
|
catch (error) {
|
|
106
111
|
if (error.name === "AccessDeniedException") {
|
|
@@ -121,7 +126,15 @@ export class LoginCredentialsFetcher {
|
|
|
121
126
|
default:
|
|
122
127
|
message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \`aws login\``;
|
|
123
128
|
}
|
|
124
|
-
throw new CredentialsProviderError(message, {
|
|
129
|
+
throw new CredentialsProviderError(message, {
|
|
130
|
+
logger: this.logger,
|
|
131
|
+
tryNextLink: false,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
const tokenExpiry = new Date(freshToken.accessToken.expiresAt).getTime();
|
|
135
|
+
if (tokenExpiry > Date.now()) {
|
|
136
|
+
this.logger?.warn?.(`Failed to refresh token: ${String(error)}. Using existing token until expiry.`);
|
|
137
|
+
return this.toCredentials(freshToken.accessToken);
|
|
125
138
|
}
|
|
126
139
|
throw new CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });
|
|
127
140
|
}
|
|
@@ -129,13 +142,7 @@ export class LoginCredentialsFetcher {
|
|
|
129
142
|
async loadToken() {
|
|
130
143
|
const tokenFilePath = this.getTokenFilePath();
|
|
131
144
|
try {
|
|
132
|
-
|
|
133
|
-
try {
|
|
134
|
-
tokenData = await readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });
|
|
135
|
-
}
|
|
136
|
-
catch {
|
|
137
|
-
tokenData = await fs.readFile(tokenFilePath, "utf8");
|
|
138
|
-
}
|
|
145
|
+
const tokenData = await fs.readFile(tokenFilePath, "utf8");
|
|
139
146
|
const token = JSON.parse(tokenData);
|
|
140
147
|
const missingFields = ["accessToken", "clientId", "refreshToken", "dpopKey"].filter((k) => !token[k]);
|
|
141
148
|
if (!token.accessToken?.accountId) {
|
|
@@ -14,6 +14,7 @@ export declare class LoginCredentialsFetcher {
|
|
|
14
14
|
loadCredentials(): Promise<AwsCredentialIdentity>;
|
|
15
15
|
private readonly logger: any;
|
|
16
16
|
private readonly loginSession: any;
|
|
17
|
+
private toCredentials;
|
|
17
18
|
private refresh;
|
|
18
19
|
private loadToken;
|
|
19
20
|
private saveToken;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-login",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.74",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from aws login cached tokens",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"test:watch": "yarn g:vitest watch"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@aws-sdk/core": "^3.977.
|
|
49
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
48
|
+
"@aws-sdk/core": "^3.977.6",
|
|
49
|
+
"@aws-sdk/nested-clients": "^3.997.41",
|
|
50
50
|
"@aws-sdk/types": "^3.974.2",
|
|
51
51
|
"@smithy/core": "^3.31.1",
|
|
52
52
|
"@smithy/types": "^4.16.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-node",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.78",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from a Node.JS environment. ",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@aws-sdk/credential-provider-env": "^3.972.
|
|
49
|
-
"@aws-sdk/credential-provider-http": "^3.972.
|
|
50
|
-
"@aws-sdk/credential-provider-ini": "^3.973.
|
|
51
|
-
"@aws-sdk/credential-provider-process": "^3.972.
|
|
52
|
-
"@aws-sdk/credential-provider-sso": "^3.973.
|
|
53
|
-
"@aws-sdk/credential-provider-web-identity": "^3.972.
|
|
48
|
+
"@aws-sdk/credential-provider-env": "^3.972.67",
|
|
49
|
+
"@aws-sdk/credential-provider-http": "^3.972.69",
|
|
50
|
+
"@aws-sdk/credential-provider-ini": "^3.973.12",
|
|
51
|
+
"@aws-sdk/credential-provider-process": "^3.972.67",
|
|
52
|
+
"@aws-sdk/credential-provider-sso": "^3.973.11",
|
|
53
|
+
"@aws-sdk/credential-provider-web-identity": "^3.972.73",
|
|
54
54
|
"@aws-sdk/types": "^3.974.2",
|
|
55
55
|
"@smithy/core": "^3.31.1",
|
|
56
56
|
"@smithy/credential-provider-imds": "^4.4.16",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-process",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.67",
|
|
4
4
|
"description": "AWS credential provider that sources credential_process from ~/.aws/credentials and ~/.aws/config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"test:watch": "yarn g:vitest watch"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@aws-sdk/core": "^3.977.
|
|
46
|
+
"@aws-sdk/core": "^3.977.6",
|
|
47
47
|
"@aws-sdk/types": "^3.974.2",
|
|
48
48
|
"@smithy/core": "^3.31.1",
|
|
49
49
|
"@smithy/types": "^4.16.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-sso",
|
|
3
|
-
"version": "3.973.
|
|
3
|
+
"version": "3.973.11",
|
|
4
4
|
"description": "AWS credential provider that exchanges a resolved SSO login token file for temporary AWS credentials",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@aws-sdk/core": "^3.977.
|
|
49
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
50
|
-
"@aws-sdk/token-providers": "3.
|
|
48
|
+
"@aws-sdk/core": "^3.977.6",
|
|
49
|
+
"@aws-sdk/nested-clients": "^3.997.41",
|
|
50
|
+
"@aws-sdk/token-providers": "3.1103.0",
|
|
51
51
|
"@aws-sdk/types": "^3.974.2",
|
|
52
52
|
"@smithy/core": "^3.31.1",
|
|
53
53
|
"@smithy/types": "^4.16.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-web-identity",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.73",
|
|
4
4
|
"description": "AWS credential provider that calls STS assumeRole for temporary AWS credentials",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"test:watch": "yarn g:vitest watch"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@aws-sdk/core": "^3.977.
|
|
54
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
53
|
+
"@aws-sdk/core": "^3.977.6",
|
|
54
|
+
"@aws-sdk/nested-clients": "^3.997.41",
|
|
55
55
|
"@aws-sdk/types": "^3.974.2",
|
|
56
56
|
"@smithy/core": "^3.31.1",
|
|
57
57
|
"@smithy/types": "^4.16.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/nested-clients",
|
|
3
|
-
"version": "3.997.
|
|
3
|
+
"version": "3.997.41",
|
|
4
4
|
"description": "Nested clients for AWS SDK packages.",
|
|
5
5
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"test:watch": "yarn g:vitest watch"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@aws-sdk/core": "^3.977.
|
|
103
|
+
"@aws-sdk/core": "^3.977.6",
|
|
104
104
|
"@aws-sdk/signature-v4-multi-region": "^3.996.43",
|
|
105
105
|
"@aws-sdk/types": "^3.974.2",
|
|
106
106
|
"@smithy/core": "^3.31.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/token-providers",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1103.0",
|
|
4
4
|
"description": "A collection of token providers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@aws-sdk/core": "^3.977.
|
|
52
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
51
|
+
"@aws-sdk/core": "^3.977.6",
|
|
52
|
+
"@aws-sdk/nested-clients": "^3.997.41",
|
|
53
53
|
"@aws-sdk/types": "^3.974.2",
|
|
54
54
|
"@smithy/core": "^3.31.1",
|
|
55
55
|
"@smithy/types": "^4.16.1",
|
package/package.json
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"jsii-diff": "^1.139.0",
|
|
66
66
|
"jsii-docgen": "^10.5.0",
|
|
67
67
|
"jsii-pacmak": "^1.139.0",
|
|
68
|
-
"jsii-rosetta": "^5.9.
|
|
68
|
+
"jsii-rosetta": "^5.9.60",
|
|
69
69
|
"prettier": "^3.9.6",
|
|
70
70
|
"projen": "^0.99.17",
|
|
71
71
|
"ts-jest": "^29.4.12",
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
"constructs": "^10.5.1"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@aws-sdk/client-cloudformation": "^3.
|
|
81
|
-
"@aws-sdk/client-connect": "^3.
|
|
82
|
-
"@aws-sdk/client-glue": "^3.
|
|
83
|
-
"@aws-sdk/client-lakeformation": "^3.
|
|
84
|
-
"@aws-sdk/client-ram": "^3.
|
|
85
|
-
"@aws-sdk/client-sts": "^3.
|
|
80
|
+
"@aws-sdk/client-cloudformation": "^3.1106.0",
|
|
81
|
+
"@aws-sdk/client-connect": "^3.1106.0",
|
|
82
|
+
"@aws-sdk/client-glue": "^3.1106.0",
|
|
83
|
+
"@aws-sdk/client-lakeformation": "^3.1106.0",
|
|
84
|
+
"@aws-sdk/client-ram": "^3.1106.0",
|
|
85
|
+
"@aws-sdk/client-sts": "^3.1106.0",
|
|
86
86
|
"@aws-sdk/types": "^3.974.2",
|
|
87
87
|
"@types/aws-lambda": "^8.10.162",
|
|
88
88
|
"aws-lambda": "^1.0.7"
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"publishConfig": {
|
|
113
113
|
"access": "public"
|
|
114
114
|
},
|
|
115
|
-
"version": "0.0.
|
|
115
|
+
"version": "0.0.22",
|
|
116
116
|
"jest": {
|
|
117
117
|
"coverageProvider": "v8",
|
|
118
118
|
"moduleNameMapper": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/core.js
RENAMED
|
File without changes
|
/package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/default_full.js
RENAMED
|
File without changes
|
/package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/default_safe.js
RENAMED
|
File without changes
|
/package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/failsafe.js
RENAMED
|
File without changes
|
/package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/schema/json.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/binary.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/js/function.js
RENAMED
|
File without changes
|
/package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/js/regexp.js
RENAMED
|
File without changes
|
/package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/js/undefined.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{aws-lambda/node_modules/js-yaml → js-yaml}/lib/js-yaml/type/timestamp.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action/append/constant.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/action/store/constant.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/help/added_formatters.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|