@cdk8s/awscdk-resolver 0.0.600 → 0.0.602
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 +3 -3
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/auth/httpAuthSchemeProvider.js +9 -15
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/endpoint/bdd.js +2 -5
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/endpoint/endpointResolver.js +7 -11
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +449 -469
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/models/CloudFormationServiceException.js +4 -8
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/models/errors.js +59 -91
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.browser.js +22 -26
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.js +30 -34
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.native.js +4 -7
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.shared.js +20 -24
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/schemas/schemas_0.js +814 -533
- package/node_modules/@aws-sdk/client-cloudformation/package.json +8 -8
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +45 -50
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +2 -4
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.browser.js +21 -22
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +51 -51
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.native.js +21 -22
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +19 -21
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +107 -109
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -4
- package/node_modules/@aws-sdk/core/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +4 -6
- package/node_modules/@aws-sdk/credential-provider-env/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +3 -7
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +12 -16
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +16 -21
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +14 -18
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +1 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js +2 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +2 -7
- package/node_modules/@aws-sdk/credential-provider-http/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +47 -41
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js +8 -4
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +14 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +31 -33
- package/node_modules/@aws-sdk/credential-provider-login/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +16 -18
- package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +11 -13
- package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +22 -24
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js +3 -0
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +10 -14
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +2 -6
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +3 -27
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +82 -84
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +158 -119
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +80 -82
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +80 -82
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +99 -101
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js +4 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js +70 -35
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +3 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +12 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +9 -8
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +4 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +5 -5
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +26 -28
- package/node_modules/@aws-sdk/token-providers/package.json +7 -7
- package/node_modules/@aws-sdk/types/dist-cjs/index.js +7 -8
- package/node_modules/@aws-sdk/types/package.json +4 -4
- package/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js +0 -2
- package/node_modules/@aws-sdk/util-locate-window/package.json +4 -4
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +2 -4
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +4 -7
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +2 -5
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +7 -10
- package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
- package/node_modules/@smithy/core/dist-cjs/index.js +13 -15
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +29 -31
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +2 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +7 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +3 -5
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +22 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +10 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +38 -39
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +10 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +14 -17
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +20 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +9 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +11 -13
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +59 -60
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +23 -24
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +25 -26
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +5 -7
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +23 -25
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +2 -4
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/package.json +7 -6
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +23 -24
- package/node_modules/@smithy/credential-provider-imds/package.json +6 -6
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +6 -8
- package/node_modules/@smithy/fetch-http-handler/package.json +7 -7
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -13
- package/node_modules/@smithy/node-http-handler/package.json +7 -7
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +27 -29
- package/node_modules/@smithy/signature-v4/package.json +6 -6
- package/node_modules/@smithy/types/dist-cjs/index.js +23 -18
- package/node_modules/@smithy/types/package.json +4 -4
- package/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js +0 -8
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-cloudformation",
|
|
3
3
|
"description": "AWS SDK for JavaScript Cloudformation Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1069.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline",
|
|
8
|
-
"build:es": "tsc -p tsconfig.es.json",
|
|
8
|
+
"build:es": "premove dist-es && tsc -p tsconfig.es.json",
|
|
9
9
|
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
|
10
|
-
"build:types": "tsc -p tsconfig.types.json",
|
|
10
|
+
"build:types": "premove dist-types && tsc -p tsconfig.types.json",
|
|
11
11
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
12
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
12
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
13
13
|
"extract:docs": "api-extractor run --local",
|
|
14
|
-
"generate:client": "node ../../scripts/generate-clients/single-service
|
|
14
|
+
"generate:client": "node ../../scripts/generate-clients/single-service",
|
|
15
15
|
"test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts",
|
|
16
16
|
"test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts",
|
|
17
17
|
"test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
25
25
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
26
|
-
"@aws-sdk/core": "^3.974.
|
|
27
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
28
|
-
"@aws-sdk/types": "^3.973.
|
|
26
|
+
"@aws-sdk/core": "^3.974.21",
|
|
27
|
+
"@aws-sdk/credential-provider-node": "^3.972.56",
|
|
28
|
+
"@aws-sdk/types": "^3.973.13",
|
|
29
29
|
"@smithy/core": "^3.24.6",
|
|
30
30
|
"@smithy/fetch-http-handler": "^5.4.6",
|
|
31
31
|
"@smithy/node-http-handler": "^4.7.6",
|
|
@@ -1,50 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
29
|
-
exports.
|
|
30
|
-
exports.
|
|
31
|
-
exports.
|
|
32
|
-
exports.
|
|
33
|
-
exports.
|
|
34
|
-
exports.
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
46
|
-
exports.loadRestXmlErrorCode = protocols.loadRestXmlErrorCode;
|
|
47
|
-
exports.parseJsonBody = protocols.parseJsonBody;
|
|
48
|
-
exports.parseJsonErrorBody = protocols.parseJsonErrorBody;
|
|
49
|
-
exports.parseXmlBody = protocols.parseXmlBody;
|
|
50
|
-
exports.parseXmlErrorBody = protocols.parseXmlErrorBody;
|
|
1
|
+
const { emitWarningIfUnsupportedVersion, getLongPollPlugin, setCredentialFeature, setFeature, setTokenFeature, state } = require("@aws-sdk/core/client");
|
|
2
|
+
exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
|
|
3
|
+
exports.getLongPollPlugin = getLongPollPlugin;
|
|
4
|
+
exports.setCredentialFeature = setCredentialFeature;
|
|
5
|
+
exports.setFeature = setFeature;
|
|
6
|
+
exports.setTokenFeature = setTokenFeature;
|
|
7
|
+
exports.state = state;
|
|
8
|
+
const { AwsSdkSigV4Signer: AWSSDKSigV4Signer, AwsSdkSigV4ASigner, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, NODE_SIGV4A_CONFIG_OPTIONS, getBearerTokenEnvKey, resolveAwsSdkSigV4Config: resolveAWSSDKSigV4Config, resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config, validateSigningProperties } = require("@aws-sdk/core/httpAuthSchemes");
|
|
9
|
+
exports.AWSSDKSigV4Signer = AWSSDKSigV4Signer;
|
|
10
|
+
exports.AwsSdkSigV4ASigner = AwsSdkSigV4ASigner;
|
|
11
|
+
exports.AwsSdkSigV4Signer = AwsSdkSigV4Signer;
|
|
12
|
+
exports.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = NODE_AUTH_SCHEME_PREFERENCE_OPTIONS;
|
|
13
|
+
exports.NODE_SIGV4A_CONFIG_OPTIONS = NODE_SIGV4A_CONFIG_OPTIONS;
|
|
14
|
+
exports.getBearerTokenEnvKey = getBearerTokenEnvKey;
|
|
15
|
+
exports.resolveAWSSDKSigV4Config = resolveAWSSDKSigV4Config;
|
|
16
|
+
exports.resolveAwsSdkSigV4AConfig = resolveAwsSdkSigV4AConfig;
|
|
17
|
+
exports.resolveAwsSdkSigV4Config = resolveAwsSdkSigV4Config;
|
|
18
|
+
exports.validateSigningProperties = validateSigningProperties;
|
|
19
|
+
const { AwsEc2QueryProtocol, AwsJson1_0Protocol, AwsJson1_1Protocol, AwsJsonRpcProtocol, AwsQueryProtocol, AwsRestJsonProtocol, AwsRestXmlProtocol, AwsSmithyRpcV2CborProtocol, JsonCodec, JsonShapeDeserializer, JsonShapeSerializer, QueryShapeSerializer, XmlCodec, XmlShapeDeserializer, XmlShapeSerializer, _toBool, _toNum, _toStr, awsExpectUnion, loadJsonRpcErrorCode, loadRestJsonErrorCode, loadRestXmlErrorCode, parseJsonBody, parseJsonErrorBody, parseXmlBody, parseXmlErrorBody } = require("@aws-sdk/core/protocols");
|
|
20
|
+
exports.AwsEc2QueryProtocol = AwsEc2QueryProtocol;
|
|
21
|
+
exports.AwsJson1_0Protocol = AwsJson1_0Protocol;
|
|
22
|
+
exports.AwsJson1_1Protocol = AwsJson1_1Protocol;
|
|
23
|
+
exports.AwsJsonRpcProtocol = AwsJsonRpcProtocol;
|
|
24
|
+
exports.AwsQueryProtocol = AwsQueryProtocol;
|
|
25
|
+
exports.AwsRestJsonProtocol = AwsRestJsonProtocol;
|
|
26
|
+
exports.AwsRestXmlProtocol = AwsRestXmlProtocol;
|
|
27
|
+
exports.AwsSmithyRpcV2CborProtocol = AwsSmithyRpcV2CborProtocol;
|
|
28
|
+
exports.JsonCodec = JsonCodec;
|
|
29
|
+
exports.JsonShapeDeserializer = JsonShapeDeserializer;
|
|
30
|
+
exports.JsonShapeSerializer = JsonShapeSerializer;
|
|
31
|
+
exports.QueryShapeSerializer = QueryShapeSerializer;
|
|
32
|
+
exports.XmlCodec = XmlCodec;
|
|
33
|
+
exports.XmlShapeDeserializer = XmlShapeDeserializer;
|
|
34
|
+
exports.XmlShapeSerializer = XmlShapeSerializer;
|
|
35
|
+
exports._toBool = _toBool;
|
|
36
|
+
exports._toNum = _toNum;
|
|
37
|
+
exports._toStr = _toStr;
|
|
38
|
+
exports.awsExpectUnion = awsExpectUnion;
|
|
39
|
+
exports.loadJsonRpcErrorCode = loadJsonRpcErrorCode;
|
|
40
|
+
exports.loadRestJsonErrorCode = loadRestJsonErrorCode;
|
|
41
|
+
exports.loadRestXmlErrorCode = loadRestXmlErrorCode;
|
|
42
|
+
exports.parseJsonBody = parseJsonBody;
|
|
43
|
+
exports.parseJsonErrorBody = parseJsonErrorBody;
|
|
44
|
+
exports.parseXmlBody = parseXmlBody;
|
|
45
|
+
exports.parseXmlErrorBody = parseXmlErrorBody;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var client = require('@smithy/core/client');
|
|
1
|
+
const { normalizeProvider } = require("@smithy/core/client");
|
|
4
2
|
|
|
5
3
|
const DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = "preferred";
|
|
6
4
|
const ACCOUNT_ID_ENDPOINT_MODE_VALUES = ["disabled", "preferred", "required"];
|
|
@@ -10,7 +8,7 @@ function validateAccountIdEndpointMode(value) {
|
|
|
10
8
|
|
|
11
9
|
const resolveAccountIdEndpointModeConfig = (input) => {
|
|
12
10
|
const { accountIdEndpointMode } = input;
|
|
13
|
-
const accountIdEndpointModeProvider =
|
|
11
|
+
const accountIdEndpointModeProvider = normalizeProvider(accountIdEndpointMode ?? DEFAULT_ACCOUNT_ID_ENDPOINT_MODE);
|
|
14
12
|
return Object.assign(input, {
|
|
15
13
|
accountIdEndpointMode: async () => {
|
|
16
14
|
const accIdMode = await accountIdEndpointModeProvider();
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
const { Retry, RETRY_MODES } = require("@smithy/core/retry");
|
|
2
|
+
const { HttpRequest, parseUrl } = require("@smithy/core/protocols");
|
|
3
|
+
const { normalizeProvider } = require("@smithy/core");
|
|
4
|
+
const { isValidHostLabel, isIpAddress, customEndpointFunctions } = require("@smithy/core/endpoints");
|
|
5
|
+
const { EndpointError, resolveEndpoint } = require("@smithy/core/endpoints");
|
|
6
|
+
exports.EndpointError = EndpointError;
|
|
7
|
+
exports.isIpAddress = isIpAddress;
|
|
8
|
+
exports.resolveEndpoint = resolveEndpoint;
|
|
9
|
+
const { resolveRegionConfig } = require("@smithy/core/config");
|
|
10
|
+
exports.resolveRegionConfig = resolveRegionConfig;
|
|
8
11
|
|
|
9
12
|
const longPollMiddleware = () => (next, context) => async (args) => {
|
|
10
13
|
context.__retryLongPoll = true;
|
|
@@ -30,7 +33,7 @@ function setCredentialFeature(credentials, feature, value) {
|
|
|
30
33
|
return credentials;
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
|
|
36
|
+
Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true";
|
|
34
37
|
function setFeature(context, feature, value) {
|
|
35
38
|
if (!context.__aws_sdk_context) {
|
|
36
39
|
context.__aws_sdk_context = {
|
|
@@ -55,7 +58,7 @@ function resolveHostHeaderConfig(input) {
|
|
|
55
58
|
return input;
|
|
56
59
|
}
|
|
57
60
|
const hostHeaderMiddleware = (options) => (next) => async (args) => {
|
|
58
|
-
if (!
|
|
61
|
+
if (!HttpRequest.isInstance(args.request))
|
|
59
62
|
return next(args);
|
|
60
63
|
const { request } = args;
|
|
61
64
|
const { handlerProtocol = "" } = options.requestHandler.metadata || {};
|
|
@@ -149,7 +152,7 @@ function isValidUserAgentAppId(appId) {
|
|
|
149
152
|
return typeof appId === "string" && appId.length <= 50;
|
|
150
153
|
}
|
|
151
154
|
function resolveUserAgentConfig(input) {
|
|
152
|
-
const normalizedAppIdProvider =
|
|
155
|
+
const normalizedAppIdProvider = normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID);
|
|
153
156
|
const { customUserAgent } = input;
|
|
154
157
|
return Object.assign(input, {
|
|
155
158
|
customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
|
|
@@ -222,10 +225,10 @@ async function checkFeatures(context, config, args) {
|
|
|
222
225
|
const retryStrategy = await config.retryStrategy();
|
|
223
226
|
if (typeof retryStrategy.mode === "string") {
|
|
224
227
|
switch (retryStrategy.mode) {
|
|
225
|
-
case
|
|
228
|
+
case RETRY_MODES.ADAPTIVE:
|
|
226
229
|
setFeature(context, "RETRY_MODE_ADAPTIVE", "F");
|
|
227
230
|
break;
|
|
228
|
-
case
|
|
231
|
+
case RETRY_MODES.STANDARD:
|
|
229
232
|
setFeature(context, "RETRY_MODE_STANDARD", "E");
|
|
230
233
|
break;
|
|
231
234
|
}
|
|
@@ -289,7 +292,7 @@ function encodeFeatures(features) {
|
|
|
289
292
|
|
|
290
293
|
const userAgentMiddleware = (options) => (next, context) => async (args) => {
|
|
291
294
|
const { request } = args;
|
|
292
|
-
if (!
|
|
295
|
+
if (!HttpRequest.isInstance(request)) {
|
|
293
296
|
return next(args);
|
|
294
297
|
}
|
|
295
298
|
const { headers } = request;
|
|
@@ -366,7 +369,7 @@ const getUserAgentPlugin = (config) => ({
|
|
|
366
369
|
});
|
|
367
370
|
|
|
368
371
|
const createUserAgentStringParsingProvider = ({ serviceId, clientVersion }) => async (config) => {
|
|
369
|
-
const module =
|
|
372
|
+
const module = require('bowser');
|
|
370
373
|
const parse = module.parse ?? module.default.parse ?? (() => "");
|
|
371
374
|
const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent ? parse(window.navigator.userAgent) : undefined;
|
|
372
375
|
const sections = [
|
|
@@ -448,7 +451,7 @@ const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
|
|
|
448
451
|
}
|
|
449
452
|
return true;
|
|
450
453
|
}
|
|
451
|
-
if (!
|
|
454
|
+
if (!isValidHostLabel(value)) {
|
|
452
455
|
return false;
|
|
453
456
|
}
|
|
454
457
|
if (value.length < 3 || value.length > 63) {
|
|
@@ -457,7 +460,7 @@ const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
|
|
|
457
460
|
if (value !== value.toLowerCase()) {
|
|
458
461
|
return false;
|
|
459
462
|
}
|
|
460
|
-
if (
|
|
463
|
+
if (isIpAddress(value)) {
|
|
461
464
|
return false;
|
|
462
465
|
}
|
|
463
466
|
return true;
|
|
@@ -487,7 +490,7 @@ const awsEndpointFunctions = {
|
|
|
487
490
|
parseArn: parseArn,
|
|
488
491
|
partition: partition,
|
|
489
492
|
};
|
|
490
|
-
|
|
493
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
491
494
|
|
|
492
495
|
const resolveDefaultAwsRegionalEndpointsConfig = (input) => {
|
|
493
496
|
if (typeof input.endpointProvider !== "function") {
|
|
@@ -508,7 +511,7 @@ const resolveDefaultAwsRegionalEndpointsConfig = (input) => {
|
|
|
508
511
|
}
|
|
509
512
|
return input;
|
|
510
513
|
};
|
|
511
|
-
const toEndpointV1 = (endpoint) =>
|
|
514
|
+
const toEndpointV1 = (endpoint) => parseUrl(endpoint.url);
|
|
512
515
|
|
|
513
516
|
function stsRegionDefaultResolver() {
|
|
514
517
|
return async () => "us-east-1";
|
|
@@ -543,10 +546,6 @@ const NODE_REGION_CONFIG_OPTIONS = no;
|
|
|
543
546
|
const NODE_REGION_CONFIG_FILE_OPTIONS = no;
|
|
544
547
|
const stsRegionWarning = no;
|
|
545
548
|
|
|
546
|
-
exports.EndpointError = endpoints.EndpointError;
|
|
547
|
-
exports.isIpAddress = endpoints.isIpAddress;
|
|
548
|
-
exports.resolveEndpoint = endpoints.resolveEndpoint;
|
|
549
|
-
exports.resolveRegionConfig = config.resolveRegionConfig;
|
|
550
549
|
exports.DEFAULT_UA_APP_ID = DEFAULT_UA_APP_ID;
|
|
551
550
|
exports.NODE_APP_ID_CONFIG_OPTIONS = NODE_APP_ID_CONFIG_OPTIONS;
|
|
552
551
|
exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
const { Retry, RETRY_MODES } = require("@smithy/core/retry");
|
|
2
|
+
const { HttpRequest, parseUrl } = require("@smithy/core/protocols");
|
|
3
|
+
const { InvokeStore } = require("@aws/lambda-invoke-store");
|
|
4
|
+
const { normalizeProvider } = require("@smithy/core");
|
|
5
|
+
const { platform, release } = require("node:os");
|
|
6
|
+
const { versions, env } = require("node:process");
|
|
7
|
+
const { booleanSelector, SelectorType, loadConfig, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS } = require("@smithy/core/config");
|
|
8
|
+
const { REGION_ENV_NAME, REGION_INI_NAME, resolveRegionConfig } = require("@smithy/core/config");
|
|
9
|
+
exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS;
|
|
10
|
+
exports.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS;
|
|
11
|
+
exports.REGION_ENV_NAME = REGION_ENV_NAME;
|
|
12
|
+
exports.REGION_INI_NAME = REGION_INI_NAME;
|
|
13
|
+
exports.resolveRegionConfig = resolveRegionConfig;
|
|
14
|
+
const { readFile } = require("node:fs/promises");
|
|
15
|
+
const { normalize, sep, join } = require("node:path");
|
|
16
|
+
const { isValidHostLabel, isIpAddress, customEndpointFunctions } = require("@smithy/core/endpoints");
|
|
17
|
+
const { EndpointError, resolveEndpoint } = require("@smithy/core/endpoints");
|
|
18
|
+
exports.EndpointError = EndpointError;
|
|
19
|
+
exports.isIpAddress = isIpAddress;
|
|
20
|
+
exports.resolveEndpoint = resolveEndpoint;
|
|
13
21
|
|
|
14
22
|
const state = {
|
|
15
23
|
warningEmitted: false,
|
|
@@ -60,7 +68,7 @@ function setCredentialFeature(credentials, feature, value) {
|
|
|
60
68
|
return credentials;
|
|
61
69
|
}
|
|
62
70
|
|
|
63
|
-
|
|
71
|
+
Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true";
|
|
64
72
|
function setFeature(context, feature, value) {
|
|
65
73
|
if (!context.__aws_sdk_context) {
|
|
66
74
|
context.__aws_sdk_context = {
|
|
@@ -85,7 +93,7 @@ function resolveHostHeaderConfig(input) {
|
|
|
85
93
|
return input;
|
|
86
94
|
}
|
|
87
95
|
const hostHeaderMiddleware = (options) => (next) => async (args) => {
|
|
88
|
-
if (!
|
|
96
|
+
if (!HttpRequest.isInstance(args.request))
|
|
89
97
|
return next(args);
|
|
90
98
|
const { request } = args;
|
|
91
99
|
const { handlerProtocol = "" } = options.requestHandler.metadata || {};
|
|
@@ -170,7 +178,7 @@ const ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
|
|
|
170
178
|
const ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
|
|
171
179
|
const recursionDetectionMiddleware = () => (next) => async (args) => {
|
|
172
180
|
const { request } = args;
|
|
173
|
-
if (!
|
|
181
|
+
if (!HttpRequest.isInstance(request)) {
|
|
174
182
|
return next(args);
|
|
175
183
|
}
|
|
176
184
|
const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ??
|
|
@@ -180,7 +188,7 @@ const recursionDetectionMiddleware = () => (next) => async (args) => {
|
|
|
180
188
|
}
|
|
181
189
|
const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
|
|
182
190
|
const traceIdFromEnv = process.env[ENV_TRACE_ID];
|
|
183
|
-
const invokeStore = await
|
|
191
|
+
const invokeStore = await InvokeStore.getInstanceAsync();
|
|
184
192
|
const traceIdFromInvokeStore = invokeStore?.getXRayTraceId();
|
|
185
193
|
const traceId = traceIdFromInvokeStore ?? traceIdFromEnv;
|
|
186
194
|
const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
|
|
@@ -207,7 +215,7 @@ function isValidUserAgentAppId(appId) {
|
|
|
207
215
|
return typeof appId === "string" && appId.length <= 50;
|
|
208
216
|
}
|
|
209
217
|
function resolveUserAgentConfig(input) {
|
|
210
|
-
const normalizedAppIdProvider =
|
|
218
|
+
const normalizedAppIdProvider = normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID);
|
|
211
219
|
const { customUserAgent } = input;
|
|
212
220
|
return Object.assign(input, {
|
|
213
221
|
customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
|
|
@@ -280,10 +288,10 @@ async function checkFeatures(context, config, args) {
|
|
|
280
288
|
const retryStrategy = await config.retryStrategy();
|
|
281
289
|
if (typeof retryStrategy.mode === "string") {
|
|
282
290
|
switch (retryStrategy.mode) {
|
|
283
|
-
case
|
|
291
|
+
case RETRY_MODES.ADAPTIVE:
|
|
284
292
|
setFeature(context, "RETRY_MODE_ADAPTIVE", "F");
|
|
285
293
|
break;
|
|
286
|
-
case
|
|
294
|
+
case RETRY_MODES.STANDARD:
|
|
287
295
|
setFeature(context, "RETRY_MODE_STANDARD", "E");
|
|
288
296
|
break;
|
|
289
297
|
}
|
|
@@ -347,7 +355,7 @@ function encodeFeatures(features) {
|
|
|
347
355
|
|
|
348
356
|
const userAgentMiddleware = (options) => (next, context) => async (args) => {
|
|
349
357
|
const { request } = args;
|
|
350
|
-
if (!
|
|
358
|
+
if (!HttpRequest.isInstance(request)) {
|
|
351
359
|
return next(args);
|
|
352
360
|
}
|
|
353
361
|
const { headers } = request;
|
|
@@ -426,11 +434,11 @@ const getUserAgentPlugin = (config) => ({
|
|
|
426
434
|
const getRuntimeUserAgentPair = () => {
|
|
427
435
|
const runtimesToCheck = ["deno", "bun", "llrt"];
|
|
428
436
|
for (const runtime of runtimesToCheck) {
|
|
429
|
-
if (
|
|
430
|
-
return [`md/${runtime}`,
|
|
437
|
+
if (versions[runtime]) {
|
|
438
|
+
return [`md/${runtime}`, versions[runtime]];
|
|
431
439
|
}
|
|
432
440
|
}
|
|
433
|
-
return ["md/nodejs",
|
|
441
|
+
return ["md/nodejs", versions.node];
|
|
434
442
|
};
|
|
435
443
|
|
|
436
444
|
const getNodeModulesParentDirs = (dirname) => {
|
|
@@ -438,10 +446,10 @@ const getNodeModulesParentDirs = (dirname) => {
|
|
|
438
446
|
if (!dirname) {
|
|
439
447
|
return [cwd];
|
|
440
448
|
}
|
|
441
|
-
const normalizedPath =
|
|
442
|
-
const parts = normalizedPath.split(
|
|
449
|
+
const normalizedPath = normalize(dirname);
|
|
450
|
+
const parts = normalizedPath.split(sep);
|
|
443
451
|
const nodeModulesIndex = parts.indexOf("node_modules");
|
|
444
|
-
const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(
|
|
452
|
+
const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(sep) : normalizedPath;
|
|
445
453
|
if (cwd === parentDir) {
|
|
446
454
|
return [cwd];
|
|
447
455
|
}
|
|
@@ -473,7 +481,7 @@ const getSanitizedDevTypeScriptVersion = (version = "") => {
|
|
|
473
481
|
};
|
|
474
482
|
|
|
475
483
|
let tscVersion;
|
|
476
|
-
const TS_PACKAGE_JSON =
|
|
484
|
+
const TS_PACKAGE_JSON = join("node_modules", "typescript", "package.json");
|
|
477
485
|
const getTypeScriptUserAgentPair = async () => {
|
|
478
486
|
if (tscVersion === null) {
|
|
479
487
|
return undefined;
|
|
@@ -484,7 +492,7 @@ const getTypeScriptUserAgentPair = async () => {
|
|
|
484
492
|
let isTypeScriptDetectionDisabled = false;
|
|
485
493
|
try {
|
|
486
494
|
isTypeScriptDetectionDisabled =
|
|
487
|
-
|
|
495
|
+
booleanSelector(process.env, "AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED", SelectorType.ENV) || false;
|
|
488
496
|
}
|
|
489
497
|
catch { }
|
|
490
498
|
if (isTypeScriptDetectionDisabled) {
|
|
@@ -496,8 +504,8 @@ const getTypeScriptUserAgentPair = async () => {
|
|
|
496
504
|
let versionFromApp;
|
|
497
505
|
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
|
498
506
|
try {
|
|
499
|
-
const appPackageJsonPath =
|
|
500
|
-
const packageJson = await
|
|
507
|
+
const appPackageJsonPath = join(nodeModulesParentDir, "package.json");
|
|
508
|
+
const packageJson = await readFile(appPackageJsonPath, "utf-8");
|
|
501
509
|
const { dependencies, devDependencies } = JSON.parse(packageJson);
|
|
502
510
|
const version = devDependencies?.typescript ?? dependencies?.typescript;
|
|
503
511
|
if (typeof version !== "string") {
|
|
@@ -516,8 +524,8 @@ const getTypeScriptUserAgentPair = async () => {
|
|
|
516
524
|
let versionFromNodeModules;
|
|
517
525
|
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
|
518
526
|
try {
|
|
519
|
-
const tsPackageJsonPath =
|
|
520
|
-
const packageJson = await
|
|
527
|
+
const tsPackageJsonPath = join(nodeModulesParentDir, TS_PACKAGE_JSON);
|
|
528
|
+
const packageJson = await readFile(tsPackageJsonPath, "utf-8");
|
|
521
529
|
const { version } = JSON.parse(packageJson);
|
|
522
530
|
const sanitizedVersion = getSanitizedTypeScriptVersion(version);
|
|
523
531
|
if (typeof sanitizedVersion !== "string") {
|
|
@@ -559,7 +567,7 @@ const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => {
|
|
|
559
567
|
const sections = [
|
|
560
568
|
["aws-sdk-js", clientVersion],
|
|
561
569
|
["ua", "2.1"],
|
|
562
|
-
[`os/${
|
|
570
|
+
[`os/${platform()}`, release()],
|
|
563
571
|
["lang/js"],
|
|
564
572
|
runtimeUserAgentPair,
|
|
565
573
|
];
|
|
@@ -574,8 +582,8 @@ const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => {
|
|
|
574
582
|
if (serviceId) {
|
|
575
583
|
sections.push([`api/${serviceId}`, clientVersion]);
|
|
576
584
|
}
|
|
577
|
-
if (
|
|
578
|
-
sections.push([`exec-env/${
|
|
585
|
+
if (env.AWS_EXECUTION_ENV) {
|
|
586
|
+
sections.push([`exec-env/${env.AWS_EXECUTION_ENV}`]);
|
|
579
587
|
}
|
|
580
588
|
const appId = await config?.userAgentAppId?.();
|
|
581
589
|
const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
|
|
@@ -594,7 +602,7 @@ const NODE_APP_ID_CONFIG_OPTIONS = {
|
|
|
594
602
|
};
|
|
595
603
|
|
|
596
604
|
const createUserAgentStringParsingProvider = ({ serviceId, clientVersion }) => async (config) => {
|
|
597
|
-
const module =
|
|
605
|
+
const module = require('bowser');
|
|
598
606
|
const parse = module.parse ?? module.default.parse ?? (() => "");
|
|
599
607
|
const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent ? parse(window.navigator.userAgent) : undefined;
|
|
600
608
|
const sections = [
|
|
@@ -650,7 +658,7 @@ const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
|
|
|
650
658
|
}
|
|
651
659
|
return true;
|
|
652
660
|
}
|
|
653
|
-
if (!
|
|
661
|
+
if (!isValidHostLabel(value)) {
|
|
654
662
|
return false;
|
|
655
663
|
}
|
|
656
664
|
if (value.length < 3 || value.length > 63) {
|
|
@@ -659,7 +667,7 @@ const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
|
|
|
659
667
|
if (value !== value.toLowerCase()) {
|
|
660
668
|
return false;
|
|
661
669
|
}
|
|
662
|
-
if (
|
|
670
|
+
if (isIpAddress(value)) {
|
|
663
671
|
return false;
|
|
664
672
|
}
|
|
665
673
|
return true;
|
|
@@ -689,7 +697,7 @@ const awsEndpointFunctions = {
|
|
|
689
697
|
parseArn: parseArn,
|
|
690
698
|
partition: partition,
|
|
691
699
|
};
|
|
692
|
-
|
|
700
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
693
701
|
|
|
694
702
|
const resolveDefaultAwsRegionalEndpointsConfig = (input) => {
|
|
695
703
|
if (typeof input.endpointProvider !== "function") {
|
|
@@ -710,18 +718,18 @@ const resolveDefaultAwsRegionalEndpointsConfig = (input) => {
|
|
|
710
718
|
}
|
|
711
719
|
return input;
|
|
712
720
|
};
|
|
713
|
-
const toEndpointV1 = (endpoint) =>
|
|
721
|
+
const toEndpointV1 = (endpoint) => parseUrl(endpoint.url);
|
|
714
722
|
|
|
715
723
|
function stsRegionDefaultResolver(loaderConfig = {}) {
|
|
716
|
-
return
|
|
717
|
-
...
|
|
724
|
+
return loadConfig({
|
|
725
|
+
...NODE_REGION_CONFIG_OPTIONS,
|
|
718
726
|
async default() {
|
|
719
727
|
if (!warning.silence) {
|
|
720
728
|
console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");
|
|
721
729
|
}
|
|
722
730
|
return "us-east-1";
|
|
723
731
|
},
|
|
724
|
-
}, { ...
|
|
732
|
+
}, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig });
|
|
725
733
|
}
|
|
726
734
|
const warning = {
|
|
727
735
|
silence: false,
|
|
@@ -743,14 +751,6 @@ const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration)
|
|
|
743
751
|
};
|
|
744
752
|
};
|
|
745
753
|
|
|
746
|
-
exports.NODE_REGION_CONFIG_FILE_OPTIONS = config.NODE_REGION_CONFIG_FILE_OPTIONS;
|
|
747
|
-
exports.NODE_REGION_CONFIG_OPTIONS = config.NODE_REGION_CONFIG_OPTIONS;
|
|
748
|
-
exports.REGION_ENV_NAME = config.REGION_ENV_NAME;
|
|
749
|
-
exports.REGION_INI_NAME = config.REGION_INI_NAME;
|
|
750
|
-
exports.resolveRegionConfig = config.resolveRegionConfig;
|
|
751
|
-
exports.EndpointError = endpoints.EndpointError;
|
|
752
|
-
exports.isIpAddress = endpoints.isIpAddress;
|
|
753
|
-
exports.resolveEndpoint = endpoints.resolveEndpoint;
|
|
754
754
|
exports.DEFAULT_UA_APP_ID = DEFAULT_UA_APP_ID;
|
|
755
755
|
exports.NODE_APP_ID_CONFIG_OPTIONS = NODE_APP_ID_CONFIG_OPTIONS;
|
|
756
756
|
exports.UA_APP_ID_ENV_NAME = UA_APP_ID_ENV_NAME;
|