@cdk8s/awscdk-resolver 0.0.134 → 0.0.136
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 +4 -4
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +9 -15
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/CloudFormationClient.js +9 -15
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormationClient.d.ts +2 -4
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.browser.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/CloudFormationClient.d.ts +6 -8
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
- package/node_modules/@aws-sdk/client-cloudformation/package.json +18 -18
- package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +9 -15
- package/node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js +9 -15
- package/node_modules/@aws-sdk/client-sso/dist-types/SSOClient.d.ts +2 -4
- package/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSOClient.d.ts +6 -8
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sso/package.json +15 -15
- package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js +9 -15
- package/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js +9 -15
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts +2 -4
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts +6 -8
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sso-oidc/package.json +17 -17
- package/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js +9 -15
- package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +17 -4
- package/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js +9 -15
- package/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js +17 -4
- package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +2 -4
- package/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts +6 -8
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
- package/node_modules/@aws-sdk/client-sts/package.json +17 -17
- package/node_modules/@aws-sdk/core/account-id-endpoint.js +6 -0
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +97 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.js +15 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/AccountIdEndpointModeConstants.js +5 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.js +24 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/index.js +3 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +30 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConstants.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +14 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/index.d.ts +3 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +15 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConstants.d.ts +6 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/index.d.ts +3 -0
- package/node_modules/@aws-sdk/core/package.json +18 -8
- package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +6 -1
- package/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js +3 -0
- package/node_modules/@aws-sdk/credential-provider-env/dist-types/fromEnv.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-env/dist-types/ts3.4/fromEnv.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-env/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-http/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +3 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js +4 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveStaticCredentials.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveStaticCredentials.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +30 -6
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js +29 -9
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +9 -3
- package/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js +6 -1
- package/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-process/dist-types/ProcessCredentials.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-process/dist-types/getValidatedProcessCredentials.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/ProcessCredentials.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/getValidatedProcessCredentials.d.ts +3 -2
- package/node_modules/@aws-sdk/credential-provider-process/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +11 -2
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js +9 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/index.js +4 -2
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +2 -1
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +2 -1
- package/node_modules/@smithy/core/package.json +5 -5
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +2 -1
- package/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js +1 -0
- package/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/ImdsCredentials.d.ts +1 -0
- package/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/ImdsCredentials.d.ts +1 -0
- package/node_modules/@smithy/credential-provider-imds/package.json +1 -1
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +2 -1
- package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +1 -1
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/middleware-content-length/package.json +3 -3
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +7 -0
- package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js +7 -0
- package/node_modules/@smithy/middleware-endpoint/package.json +1 -1
- package/node_modules/@smithy/middleware-retry/package.json +4 -4
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/protocol-http/package.json +1 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +4 -16
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +2 -2
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +2 -2
- package/node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/moveHeadersToQuery.d.ts +3 -3
- package/node_modules/@smithy/signature-v4/dist-types/prepareRequest.d.ts +2 -2
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/SignatureV4.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/moveHeadersToQuery.d.ts +3 -3
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/prepareRequest.d.ts +2 -2
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/@smithy/smithy-client/dist-cjs/index.js +1 -0
- package/node_modules/@smithy/smithy-client/dist-es/command.js +1 -0
- package/node_modules/@smithy/smithy-client/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
- package/node_modules/@smithy/util-defaults-mode-node/package.json +3 -3
- package/node_modules/@smithy/util-stream/dist-types/stream-type-check.d.ts +9 -1
- package/node_modules/@smithy/util-stream/dist-types/ts3.4/stream-type-check.d.ts +9 -1
- package/node_modules/@smithy/util-stream/package.json +4 -4
- package/node_modules/fast-xml-parser/CHANGELOG.md +349 -309
- package/node_modules/fast-xml-parser/README.md +83 -51
- package/node_modules/fast-xml-parser/package.json +8 -5
- package/node_modules/fast-xml-parser/src/fxp.d.ts +365 -71
- package/node_modules/fast-xml-parser/src/v5/CharsSymbol.js +16 -0
- package/node_modules/fast-xml-parser/src/v5/EntitiesParser.js +107 -0
- package/node_modules/fast-xml-parser/src/v5/OptionsBuilder.js +64 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/BaseOutputBuilder.js +71 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsArrBuilder.js +103 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsMinArrBuilder.js +102 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsObjBuilder.js +156 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/ParserOptionsBuilder.js +99 -0
- package/node_modules/fast-xml-parser/src/v5/Report.js +0 -0
- package/node_modules/fast-xml-parser/src/v5/TagPath.js +81 -0
- package/node_modules/fast-xml-parser/src/v5/TagPathMatcher.js +15 -0
- package/node_modules/fast-xml-parser/src/v5/XMLParser.js +85 -0
- package/node_modules/fast-xml-parser/src/v5/Xml2JsParser.js +237 -0
- package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +212 -0
- package/node_modules/fast-xml-parser/src/v5/XmlSpecialTagsReader.js +118 -0
- package/node_modules/fast-xml-parser/src/v5/inputSource/BufferSource.js +118 -0
- package/node_modules/fast-xml-parser/src/v5/inputSource/StringSource.js +123 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/EntitiesParser.js +107 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParser.js +23 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParserExt.js +20 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/currency.js +40 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/join.js +14 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/number.js +16 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/trim.js +8 -0
- package/node_modules/fast-xml-parser/src/validator.js +2 -0
- package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +31 -9
- package/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +4 -0
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +25 -12
- package/package.json +9 -9
- package/node_modules/@smithy/signature-v4/dist-cjs/cloneRequest.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-es/cloneRequest.js +0 -12
- package/node_modules/@smithy/signature-v4/dist-types/cloneRequest.d.ts +0 -6
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/cloneRequest.d.ts +0 -6
@@ -0,0 +1,24 @@
|
|
1
|
+
import { DEFAULT_ACCOUNT_ID_ENDPOINT_MODE, validateAccountIdEndpointMode, } from "./AccountIdEndpointModeConstants";
|
2
|
+
const err = "Invalid AccountIdEndpointMode value";
|
3
|
+
const _throw = (message) => {
|
4
|
+
throw new Error(message);
|
5
|
+
};
|
6
|
+
export const ENV_ACCOUNT_ID_ENDPOINT_MODE = "AWS_ACCOUNT_ID_ENDPOINT_MODE";
|
7
|
+
export const CONFIG_ACCOUNT_ID_ENDPOINT_MODE = "account_id_endpoint_mode";
|
8
|
+
export const NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS = {
|
9
|
+
environmentVariableSelector: (env) => {
|
10
|
+
const value = env[ENV_ACCOUNT_ID_ENDPOINT_MODE];
|
11
|
+
if (value && !validateAccountIdEndpointMode(value)) {
|
12
|
+
_throw(err);
|
13
|
+
}
|
14
|
+
return value;
|
15
|
+
},
|
16
|
+
configFileSelector: (profile) => {
|
17
|
+
const value = profile[CONFIG_ACCOUNT_ID_ENDPOINT_MODE];
|
18
|
+
if (value && !validateAccountIdEndpointMode(value)) {
|
19
|
+
_throw(err);
|
20
|
+
}
|
21
|
+
return value;
|
22
|
+
},
|
23
|
+
default: DEFAULT_ACCOUNT_ID_ENDPOINT_MODE,
|
24
|
+
};
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { Provider } from "@smithy/types";
|
2
|
+
import { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
|
3
|
+
/**
|
4
|
+
* @public
|
5
|
+
*/
|
6
|
+
export interface AccountIdEndpointModeInputConfig {
|
7
|
+
/**
|
8
|
+
* The account ID endpoint mode to use.
|
9
|
+
*/
|
10
|
+
accountIdEndpointMode?: AccountIdEndpointMode | Provider<AccountIdEndpointMode>;
|
11
|
+
}
|
12
|
+
/**
|
13
|
+
* @internal
|
14
|
+
*/
|
15
|
+
interface PreviouslyResolved {
|
16
|
+
}
|
17
|
+
/**
|
18
|
+
* @internal
|
19
|
+
*/
|
20
|
+
export interface AccountIdEndpointModeResolvedConfig {
|
21
|
+
/**
|
22
|
+
* Resolved value for input config {config.accountIdEndpointMode}
|
23
|
+
*/
|
24
|
+
accountIdEndpointMode: Provider<AccountIdEndpointMode>;
|
25
|
+
}
|
26
|
+
/**
|
27
|
+
* @internal
|
28
|
+
*/
|
29
|
+
export declare const resolveAccountIdEndpointModeConfig: <T>(input: T & AccountIdEndpointModeInputConfig & PreviouslyResolved) => T & AccountIdEndpointModeResolvedConfig;
|
30
|
+
export {};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export type AccountIdEndpointMode = "disabled" | "preferred" | "required";
|
2
|
+
export declare const DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = "preferred";
|
3
|
+
export declare const ACCOUNT_ID_ENDPOINT_MODE_VALUES: AccountIdEndpointMode[];
|
4
|
+
/**
|
5
|
+
* @internal
|
6
|
+
*/
|
7
|
+
export declare function validateAccountIdEndpointMode(value: any): value is AccountIdEndpointMode;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { LoadedConfigSelectors } from "@smithy/node-config-provider";
|
2
|
+
import { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
|
3
|
+
/**
|
4
|
+
* @internal
|
5
|
+
*/
|
6
|
+
export declare const ENV_ACCOUNT_ID_ENDPOINT_MODE = "AWS_ACCOUNT_ID_ENDPOINT_MODE";
|
7
|
+
/**
|
8
|
+
* @internal
|
9
|
+
*/
|
10
|
+
export declare const CONFIG_ACCOUNT_ID_ENDPOINT_MODE = "account_id_endpoint_mode";
|
11
|
+
/**
|
12
|
+
* @internal
|
13
|
+
*/
|
14
|
+
export declare const NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS: LoadedConfigSelectors<AccountIdEndpointMode>;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Provider } from "@smithy/types";
|
2
|
+
import { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
|
3
|
+
export interface AccountIdEndpointModeInputConfig {
|
4
|
+
accountIdEndpointMode?:
|
5
|
+
| AccountIdEndpointMode
|
6
|
+
| Provider<AccountIdEndpointMode>;
|
7
|
+
}
|
8
|
+
interface PreviouslyResolved {}
|
9
|
+
export interface AccountIdEndpointModeResolvedConfig {
|
10
|
+
accountIdEndpointMode: Provider<AccountIdEndpointMode>;
|
11
|
+
}
|
12
|
+
export declare const resolveAccountIdEndpointModeConfig: <T>(
|
13
|
+
input: T & AccountIdEndpointModeInputConfig & PreviouslyResolved
|
14
|
+
) => T & AccountIdEndpointModeResolvedConfig;
|
15
|
+
export {};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export type AccountIdEndpointMode = "disabled" | "preferred" | "required";
|
2
|
+
export declare const DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = "preferred";
|
3
|
+
export declare const ACCOUNT_ID_ENDPOINT_MODE_VALUES: AccountIdEndpointMode[];
|
4
|
+
export declare function validateAccountIdEndpointMode(
|
5
|
+
value: any
|
6
|
+
): value is AccountIdEndpointMode;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { LoadedConfigSelectors } from "@smithy/node-config-provider";
|
2
|
+
import { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
|
3
|
+
export declare const ENV_ACCOUNT_ID_ENDPOINT_MODE =
|
4
|
+
"AWS_ACCOUNT_ID_ENDPOINT_MODE";
|
5
|
+
export declare const CONFIG_ACCOUNT_ID_ENDPOINT_MODE =
|
6
|
+
"account_id_endpoint_mode";
|
7
|
+
export declare const NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS: LoadedConfigSelectors<AccountIdEndpointMode>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-sdk/core",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.622.0",
|
4
4
|
"description": "Core functions & classes shared by multiple AWS SDK clients",
|
5
5
|
"scripts": {
|
6
6
|
"build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
@@ -46,6 +46,13 @@
|
|
46
46
|
"require": "./dist-cjs/submodules/httpAuthSchemes/index.js",
|
47
47
|
"types": "./dist-types/submodules/httpAuthSchemes/index.d.ts"
|
48
48
|
},
|
49
|
+
"./account-id-endpoint": {
|
50
|
+
"module": "./dist-es/submodules/account-id-endpoint/index.js",
|
51
|
+
"node": "./dist-cjs/submodules/account-id-endpoint/index.js",
|
52
|
+
"import": "./dist-es/submodules/account-id-endpoint/index.js",
|
53
|
+
"require": "./dist-cjs/submodules/account-id-endpoint/index.js",
|
54
|
+
"types": "./dist-types/submodules/account-id-endpoint/index.d.ts"
|
55
|
+
},
|
49
56
|
"./protocols": {
|
50
57
|
"module": "./dist-es/submodules/protocols/index.js",
|
51
58
|
"node": "./dist-cjs/submodules/protocols/index.js",
|
@@ -58,7 +65,8 @@
|
|
58
65
|
"dist-*/**",
|
59
66
|
"./client.js",
|
60
67
|
"./httpAuthSchemes.js",
|
61
|
-
"./protocols.js"
|
68
|
+
"./protocols.js",
|
69
|
+
"./account-id-endpoint.js"
|
62
70
|
],
|
63
71
|
"sideEffects": false,
|
64
72
|
"author": {
|
@@ -67,12 +75,14 @@
|
|
67
75
|
},
|
68
76
|
"license": "Apache-2.0",
|
69
77
|
"dependencies": {
|
70
|
-
"@smithy/core": "^2.2
|
71
|
-
"@smithy/
|
72
|
-
"@smithy/
|
73
|
-
"@smithy/
|
78
|
+
"@smithy/core": "^2.3.2",
|
79
|
+
"@smithy/node-config-provider": "^3.1.4",
|
80
|
+
"@smithy/protocol-http": "^4.1.0",
|
81
|
+
"@smithy/signature-v4": "^4.1.0",
|
82
|
+
"@smithy/smithy-client": "^3.1.12",
|
74
83
|
"@smithy/types": "^3.3.0",
|
75
|
-
"
|
84
|
+
"@smithy/util-middleware": "^3.0.3",
|
85
|
+
"fast-xml-parser": "4.4.1",
|
76
86
|
"tslib": "^2.6.2"
|
77
87
|
},
|
78
88
|
"devDependencies": {
|
@@ -92,7 +102,7 @@
|
|
92
102
|
]
|
93
103
|
}
|
94
104
|
},
|
95
|
-
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/
|
105
|
+
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/core",
|
96
106
|
"repository": {
|
97
107
|
"type": "git",
|
98
108
|
"url": "https://github.com/aws/aws-sdk-js-v3.git",
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
21
21
|
// src/index.ts
|
22
22
|
var src_exports = {};
|
23
23
|
__export(src_exports, {
|
24
|
+
ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID,
|
24
25
|
ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE,
|
25
26
|
ENV_EXPIRATION: () => ENV_EXPIRATION,
|
26
27
|
ENV_KEY: () => ENV_KEY,
|
@@ -37,6 +38,7 @@ var ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
|
|
37
38
|
var ENV_SESSION = "AWS_SESSION_TOKEN";
|
38
39
|
var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
|
39
40
|
var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
|
41
|
+
var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID";
|
40
42
|
var fromEnv = /* @__PURE__ */ __name((init) => async () => {
|
41
43
|
var _a;
|
42
44
|
(_a = init == null ? void 0 : init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-env - fromEnv");
|
@@ -45,13 +47,15 @@ var fromEnv = /* @__PURE__ */ __name((init) => async () => {
|
|
45
47
|
const sessionToken = process.env[ENV_SESSION];
|
46
48
|
const expiry = process.env[ENV_EXPIRATION];
|
47
49
|
const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];
|
50
|
+
const accountId = process.env[ENV_ACCOUNT_ID];
|
48
51
|
if (accessKeyId && secretAccessKey) {
|
49
52
|
return {
|
50
53
|
accessKeyId,
|
51
54
|
secretAccessKey,
|
52
55
|
...sessionToken && { sessionToken },
|
53
56
|
...expiry && { expiration: new Date(expiry) },
|
54
|
-
...credentialScope && { credentialScope }
|
57
|
+
...credentialScope && { credentialScope },
|
58
|
+
...accountId && { accountId }
|
55
59
|
};
|
56
60
|
}
|
57
61
|
throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init == null ? void 0 : init.logger });
|
@@ -64,6 +68,7 @@ var fromEnv = /* @__PURE__ */ __name((init) => async () => {
|
|
64
68
|
ENV_SESSION,
|
65
69
|
ENV_EXPIRATION,
|
66
70
|
ENV_CREDENTIAL_SCOPE,
|
71
|
+
ENV_ACCOUNT_ID,
|
67
72
|
fromEnv
|
68
73
|
});
|
69
74
|
|
@@ -4,6 +4,7 @@ export const ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
|
|
4
4
|
export const ENV_SESSION = "AWS_SESSION_TOKEN";
|
5
5
|
export const ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
|
6
6
|
export const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
|
7
|
+
export const ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID";
|
7
8
|
export const fromEnv = (init) => async () => {
|
8
9
|
init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");
|
9
10
|
const accessKeyId = process.env[ENV_KEY];
|
@@ -11,6 +12,7 @@ export const fromEnv = (init) => async () => {
|
|
11
12
|
const sessionToken = process.env[ENV_SESSION];
|
12
13
|
const expiry = process.env[ENV_EXPIRATION];
|
13
14
|
const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];
|
15
|
+
const accountId = process.env[ENV_ACCOUNT_ID];
|
14
16
|
if (accessKeyId && secretAccessKey) {
|
15
17
|
return {
|
16
18
|
accessKeyId,
|
@@ -18,6 +20,7 @@ export const fromEnv = (init) => async () => {
|
|
18
20
|
...(sessionToken && { sessionToken }),
|
19
21
|
...(expiry && { expiration: new Date(expiry) }),
|
20
22
|
...(credentialScope && { credentialScope }),
|
23
|
+
...(accountId && { accountId }),
|
21
24
|
};
|
22
25
|
}
|
23
26
|
throw new CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger });
|
@@ -22,6 +22,10 @@ export declare const ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
|
|
22
22
|
* @internal
|
23
23
|
*/
|
24
24
|
export declare const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
|
25
|
+
/**
|
26
|
+
* @internal
|
27
|
+
*/
|
28
|
+
export declare const ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID";
|
25
29
|
/**
|
26
30
|
* @internal
|
27
31
|
*
|
@@ -6,6 +6,7 @@ export declare const ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
|
|
6
6
|
export declare const ENV_SESSION = "AWS_SESSION_TOKEN";
|
7
7
|
export declare const ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
|
8
8
|
export declare const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
|
9
|
+
export declare const ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID";
|
9
10
|
export declare const fromEnv: (
|
10
11
|
init?: FromEnvInit
|
11
12
|
) => AwsCredentialIdentityProvider;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-sdk/credential-provider-http",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.622.0",
|
4
4
|
"description": "AWS credential provider for containers and HTTP sources",
|
5
5
|
"main": "./dist-cjs/index.js",
|
6
6
|
"module": "./dist-es/index.js",
|
@@ -27,13 +27,13 @@
|
|
27
27
|
"license": "Apache-2.0",
|
28
28
|
"dependencies": {
|
29
29
|
"@aws-sdk/types": "3.609.0",
|
30
|
-
"@smithy/fetch-http-handler": "^3.2.
|
31
|
-
"@smithy/node-http-handler": "^3.1.
|
30
|
+
"@smithy/fetch-http-handler": "^3.2.4",
|
31
|
+
"@smithy/node-http-handler": "^3.1.4",
|
32
32
|
"@smithy/property-provider": "^3.1.3",
|
33
|
-
"@smithy/protocol-http": "^4.0
|
34
|
-
"@smithy/smithy-client": "^3.1.
|
33
|
+
"@smithy/protocol-http": "^4.1.0",
|
34
|
+
"@smithy/smithy-client": "^3.1.12",
|
35
35
|
"@smithy/types": "^3.3.0",
|
36
|
-
"@smithy/util-stream": "^3.
|
36
|
+
"@smithy/util-stream": "^3.1.3",
|
37
37
|
"tslib": "^2.6.2"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
@@ -180,7 +180,7 @@ var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {})
|
|
180
180
|
var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
|
181
181
|
|
182
182
|
// src/resolveStaticCredentials.ts
|
183
|
-
var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1, "isStaticCredsProfile");
|
183
|
+
var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, "isStaticCredsProfile");
|
184
184
|
var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => {
|
185
185
|
var _a;
|
186
186
|
(_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
|
@@ -188,7 +188,8 @@ var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => {
|
|
188
188
|
accessKeyId: profile.aws_access_key_id,
|
189
189
|
secretAccessKey: profile.aws_secret_access_key,
|
190
190
|
sessionToken: profile.aws_session_token,
|
191
|
-
credentialScope: profile.aws_credential_scope
|
191
|
+
...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },
|
192
|
+
...profile.aws_account_id && { accountId: profile.aws_account_id }
|
192
193
|
});
|
193
194
|
}, "resolveStaticCredentials");
|
194
195
|
|
@@ -2,13 +2,15 @@ export const isStaticCredsProfile = (arg) => Boolean(arg) &&
|
|
2
2
|
typeof arg === "object" &&
|
3
3
|
typeof arg.aws_access_key_id === "string" &&
|
4
4
|
typeof arg.aws_secret_access_key === "string" &&
|
5
|
-
["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1
|
5
|
+
["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 &&
|
6
|
+
["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1;
|
6
7
|
export const resolveStaticCredentials = (profile, options) => {
|
7
8
|
options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
|
8
9
|
return Promise.resolve({
|
9
10
|
accessKeyId: profile.aws_access_key_id,
|
10
11
|
secretAccessKey: profile.aws_secret_access_key,
|
11
12
|
sessionToken: profile.aws_session_token,
|
12
|
-
credentialScope: profile.aws_credential_scope,
|
13
|
+
...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),
|
14
|
+
...(profile.aws_account_id && { accountId: profile.aws_account_id }),
|
13
15
|
});
|
14
16
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-sdk/credential-provider-ini",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.622.0",
|
4
4
|
"description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config",
|
5
5
|
"main": "./dist-cjs/index.js",
|
6
6
|
"module": "./dist-es/index.js",
|
@@ -24,13 +24,13 @@
|
|
24
24
|
},
|
25
25
|
"license": "Apache-2.0",
|
26
26
|
"dependencies": {
|
27
|
-
"@aws-sdk/credential-provider-env": "3.
|
28
|
-
"@aws-sdk/credential-provider-http": "3.
|
29
|
-
"@aws-sdk/credential-provider-process": "3.
|
30
|
-
"@aws-sdk/credential-provider-sso": "3.
|
31
|
-
"@aws-sdk/credential-provider-web-identity": "3.
|
27
|
+
"@aws-sdk/credential-provider-env": "3.620.1",
|
28
|
+
"@aws-sdk/credential-provider-http": "3.622.0",
|
29
|
+
"@aws-sdk/credential-provider-process": "3.620.1",
|
30
|
+
"@aws-sdk/credential-provider-sso": "3.622.0",
|
31
|
+
"@aws-sdk/credential-provider-web-identity": "3.621.0",
|
32
32
|
"@aws-sdk/types": "3.609.0",
|
33
|
-
"@smithy/credential-provider-imds": "^3.
|
33
|
+
"@smithy/credential-provider-imds": "^3.2.0",
|
34
34
|
"@smithy/property-provider": "^3.1.3",
|
35
35
|
"@smithy/shared-ini-file-loader": "^3.1.4",
|
36
36
|
"@smithy/types": "^3.3.0",
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"typescript": "~4.9.5"
|
46
46
|
},
|
47
47
|
"peerDependencies": {
|
48
|
-
"@aws-sdk/client-sts": "^3.
|
48
|
+
"@aws-sdk/client-sts": "^3.622.0"
|
49
49
|
},
|
50
50
|
"types": "./dist-types/index.d.ts",
|
51
51
|
"engines": {
|
@@ -63,15 +63,39 @@ var remoteProvider = /* @__PURE__ */ __name(async (init) => {
|
|
63
63
|
}, "remoteProvider");
|
64
64
|
|
65
65
|
// src/defaultProvider.ts
|
66
|
+
var multipleCredentialSourceWarningEmitted = false;
|
66
67
|
var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)(
|
67
68
|
(0, import_property_provider.chain)(
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
69
|
+
async () => {
|
70
|
+
var _a, _b, _c, _d;
|
71
|
+
const profile = init.profile ?? process.env[import_shared_ini_file_loader.ENV_PROFILE];
|
72
|
+
if (profile) {
|
73
|
+
const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_env.ENV_SECRET];
|
74
|
+
if (envStaticCredentialsAreSet) {
|
75
|
+
if (!multipleCredentialSourceWarningEmitted) {
|
76
|
+
const warnFn = ((_a = init.logger) == null ? void 0 : _a.warn) && ((_c = (_b = init.logger) == null ? void 0 : _b.constructor) == null ? void 0 : _c.name) !== "NoOpLogger" ? init.logger.warn : console.warn;
|
77
|
+
warnFn(
|
78
|
+
`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
|
79
|
+
Multiple credential sources detected:
|
80
|
+
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
81
|
+
This SDK will proceed with the AWS_PROFILE value.
|
82
|
+
|
83
|
+
However, a future version may change this behavior to prefer the ENV static credentials.
|
84
|
+
Please ensure that your environment only sets either the AWS_PROFILE or the
|
85
|
+
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
86
|
+
`
|
87
|
+
);
|
88
|
+
multipleCredentialSourceWarningEmitted = true;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
throw new import_property_provider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
|
92
|
+
logger: init.logger,
|
93
|
+
tryNextLink: true
|
94
|
+
});
|
73
95
|
}
|
74
|
-
|
96
|
+
(_d = init.logger) == null ? void 0 : _d.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
|
97
|
+
return (0, import_credential_provider_env.fromEnv)(init)();
|
98
|
+
},
|
75
99
|
async () => {
|
76
100
|
var _a;
|
77
101
|
(_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
|
@@ -1,15 +1,35 @@
|
|
1
|
-
import { fromEnv } from "@aws-sdk/credential-provider-env";
|
1
|
+
import { ENV_KEY, ENV_SECRET, fromEnv } from "@aws-sdk/credential-provider-env";
|
2
2
|
import { chain, CredentialsProviderError, memoize } from "@smithy/property-provider";
|
3
3
|
import { ENV_PROFILE } from "@smithy/shared-ini-file-loader";
|
4
4
|
import { remoteProvider } from "./remoteProvider";
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
let multipleCredentialSourceWarningEmitted = false;
|
6
|
+
export const defaultProvider = (init = {}) => memoize(chain(async () => {
|
7
|
+
const profile = init.profile ?? process.env[ENV_PROFILE];
|
8
|
+
if (profile) {
|
9
|
+
const envStaticCredentialsAreSet = process.env[ENV_KEY] && process.env[ENV_SECRET];
|
10
|
+
if (envStaticCredentialsAreSet) {
|
11
|
+
if (!multipleCredentialSourceWarningEmitted) {
|
12
|
+
const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn : console.warn;
|
13
|
+
warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
|
14
|
+
Multiple credential sources detected:
|
15
|
+
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
16
|
+
This SDK will proceed with the AWS_PROFILE value.
|
17
|
+
|
18
|
+
However, a future version may change this behavior to prefer the ENV static credentials.
|
19
|
+
Please ensure that your environment only sets either the AWS_PROFILE or the
|
20
|
+
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
21
|
+
`);
|
22
|
+
multipleCredentialSourceWarningEmitted = true;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
throw new CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
|
26
|
+
logger: init.logger,
|
27
|
+
tryNextLink: true,
|
28
|
+
});
|
29
|
+
}
|
30
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
|
31
|
+
return fromEnv(init)();
|
32
|
+
}, async () => {
|
13
33
|
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
|
14
34
|
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
|
15
35
|
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-sdk/credential-provider-node",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.622.0",
|
4
4
|
"description": "AWS credential provider that sources credentials from a Node.JS environment. ",
|
5
5
|
"engines": {
|
6
6
|
"node": ">=16.0.0"
|
@@ -28,14 +28,14 @@
|
|
28
28
|
},
|
29
29
|
"license": "Apache-2.0",
|
30
30
|
"dependencies": {
|
31
|
-
"@aws-sdk/credential-provider-env": "3.
|
32
|
-
"@aws-sdk/credential-provider-http": "3.
|
33
|
-
"@aws-sdk/credential-provider-ini": "3.
|
34
|
-
"@aws-sdk/credential-provider-process": "3.
|
35
|
-
"@aws-sdk/credential-provider-sso": "3.
|
36
|
-
"@aws-sdk/credential-provider-web-identity": "3.
|
31
|
+
"@aws-sdk/credential-provider-env": "3.620.1",
|
32
|
+
"@aws-sdk/credential-provider-http": "3.622.0",
|
33
|
+
"@aws-sdk/credential-provider-ini": "3.622.0",
|
34
|
+
"@aws-sdk/credential-provider-process": "3.620.1",
|
35
|
+
"@aws-sdk/credential-provider-sso": "3.622.0",
|
36
|
+
"@aws-sdk/credential-provider-web-identity": "3.621.0",
|
37
37
|
"@aws-sdk/types": "3.609.0",
|
38
|
-
"@smithy/credential-provider-imds": "^3.
|
38
|
+
"@smithy/credential-provider-imds": "^3.2.0",
|
39
39
|
"@smithy/property-provider": "^3.1.3",
|
40
40
|
"@smithy/shared-ini-file-loader": "^3.1.4",
|
41
41
|
"@smithy/types": "^3.3.0",
|
@@ -34,7 +34,8 @@ var import_child_process = require("child_process");
|
|
34
34
|
var import_util = require("util");
|
35
35
|
|
36
36
|
// src/getValidatedProcessCredentials.ts
|
37
|
-
var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data) => {
|
37
|
+
var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data, profiles) => {
|
38
|
+
var _a;
|
38
39
|
if (data.Version !== 1) {
|
39
40
|
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
|
40
41
|
}
|
@@ -48,12 +49,17 @@ var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data)
|
|
48
49
|
throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
|
49
50
|
}
|
50
51
|
}
|
52
|
+
let accountId = data.AccountId;
|
53
|
+
if (!accountId && ((_a = profiles == null ? void 0 : profiles[profileName]) == null ? void 0 : _a.aws_account_id)) {
|
54
|
+
accountId = profiles[profileName].aws_account_id;
|
55
|
+
}
|
51
56
|
return {
|
52
57
|
accessKeyId: data.AccessKeyId,
|
53
58
|
secretAccessKey: data.SecretAccessKey,
|
54
59
|
...data.SessionToken && { sessionToken: data.SessionToken },
|
55
60
|
...data.Expiration && { expiration: new Date(data.Expiration) },
|
56
|
-
...data.CredentialScope && { credentialScope: data.CredentialScope }
|
61
|
+
...data.CredentialScope && { credentialScope: data.CredentialScope },
|
62
|
+
...accountId && { accountId }
|
57
63
|
};
|
58
64
|
}, "getValidatedProcessCredentials");
|
59
65
|
|
@@ -72,7 +78,7 @@ var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profi
|
|
72
78
|
} catch {
|
73
79
|
throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
|
74
80
|
}
|
75
|
-
return getValidatedProcessCredentials(profileName, data);
|
81
|
+
return getValidatedProcessCredentials(profileName, data, profiles);
|
76
82
|
} catch (error) {
|
77
83
|
throw new import_property_provider.CredentialsProviderError(error.message, { logger });
|
78
84
|
}
|
package/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export const getValidatedProcessCredentials = (profileName, data) => {
|
1
|
+
export const getValidatedProcessCredentials = (profileName, data, profiles) => {
|
2
2
|
if (data.Version !== 1) {
|
3
3
|
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
|
4
4
|
}
|
@@ -12,11 +12,16 @@ export const getValidatedProcessCredentials = (profileName, data) => {
|
|
12
12
|
throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
|
13
13
|
}
|
14
14
|
}
|
15
|
+
let accountId = data.AccountId;
|
16
|
+
if (!accountId && profiles?.[profileName]?.aws_account_id) {
|
17
|
+
accountId = profiles[profileName].aws_account_id;
|
18
|
+
}
|
15
19
|
return {
|
16
20
|
accessKeyId: data.AccessKeyId,
|
17
21
|
secretAccessKey: data.SecretAccessKey,
|
18
22
|
...(data.SessionToken && { sessionToken: data.SessionToken }),
|
19
23
|
...(data.Expiration && { expiration: new Date(data.Expiration) }),
|
20
24
|
...(data.CredentialScope && { credentialScope: data.CredentialScope }),
|
25
|
+
...(accountId && { accountId }),
|
21
26
|
};
|
22
27
|
};
|
package/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js
CHANGED
@@ -17,7 +17,7 @@ export const resolveProcessCredentials = async (profileName, profiles, logger) =
|
|
17
17
|
catch {
|
18
18
|
throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
|
19
19
|
}
|
20
|
-
return getValidatedProcessCredentials(profileName, data);
|
20
|
+
return getValidatedProcessCredentials(profileName, data, profiles);
|
21
21
|
}
|
22
22
|
catch (error) {
|
23
23
|
throw new CredentialsProviderError(error.message, { logger });
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { AwsCredentialIdentity } from "@smithy/types";
|
1
|
+
import { AwsCredentialIdentity, ParsedIniData } from "@smithy/types";
|
2
2
|
import { ProcessCredentials } from "./ProcessCredentials";
|
3
3
|
/**
|
4
4
|
* @internal
|
5
5
|
*/
|
6
|
-
export declare const getValidatedProcessCredentials: (profileName: string, data: ProcessCredentials) => AwsCredentialIdentity;
|
6
|
+
export declare const getValidatedProcessCredentials: (profileName: string, data: ProcessCredentials, profiles: ParsedIniData) => AwsCredentialIdentity;
|