@cdk8s/awscdk-resolver 0.0.723 → 0.0.724
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/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +3 -3
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +51 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.js +51 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +25 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +36 -0
- 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/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/node_modules/@smithy/core/dist-cjs/index.js +4 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +32 -16
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +26 -13
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +16 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +10 -5
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +18 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +18 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +42 -24
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +20 -10
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +24 -12
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +13 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +7 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +13 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +6 -3
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-es/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +12 -6
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js +10 -5
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.browser.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +2 -1
- package/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +19 -7
- package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +2 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +11 -6
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +6 -0
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +23 -11
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -2
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +4 -2
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +5 -1
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +6 -3
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +2 -1
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/package.json +5 -5
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols → serde}/writeKey.js +0 -0
- /package/node_modules/@smithy/core/dist-types/submodules/{protocols → serde}/writeKey.d.ts +0 -0
- /package/node_modules/@smithy/core/dist-types/ts3.4/submodules/{protocols → serde}/writeKey.d.ts +0 -0
package/.jsii
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"url": "https://aws.amazon.com"
|
|
8
8
|
},
|
|
9
9
|
"bundled": {
|
|
10
|
-
"@aws-sdk/client-cloudformation": "^3.
|
|
10
|
+
"@aws-sdk/client-cloudformation": "^3.1160.0"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"aws-cdk-lib": "^2.195.0",
|
|
@@ -4083,6 +4083,6 @@
|
|
|
4083
4083
|
"symbolId": "src/resolve:AwsCdkResolver"
|
|
4084
4084
|
}
|
|
4085
4085
|
},
|
|
4086
|
-
"version": "0.0.
|
|
4087
|
-
"fingerprint": "
|
|
4086
|
+
"version": "0.0.724",
|
|
4087
|
+
"fingerprint": "TpbgK0iGIhAphdMOYJ/RTIq8Dn4IxP1DjWIB6z8NOzc="
|
|
4088
4088
|
}
|
package/lib/resolve.js
CHANGED
|
@@ -39,7 +39,7 @@ const child_process_1 = require("child_process");
|
|
|
39
39
|
const path = __importStar(require("path"));
|
|
40
40
|
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
41
41
|
class AwsCdkResolver {
|
|
42
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@cdk8s/awscdk-resolver.AwsCdkResolver", version: "0.0.
|
|
42
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@cdk8s/awscdk-resolver.AwsCdkResolver", version: "0.0.724" };
|
|
43
43
|
resolve(context) {
|
|
44
44
|
if (!aws_cdk_lib_1.Token.isUnresolved(context.value)) {
|
|
45
45
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-cloudformation",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1160.0",
|
|
4
4
|
"description": "AWS SDK for JavaScript Cloudformation Client for Node.js, Browser and React Native",
|
|
5
5
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cloudformation",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"test:index": "tsc -p tsconfig.test.json && node ./test/index-objects.spec.mjs"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@aws-sdk/core": "^3.
|
|
52
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
51
|
+
"@aws-sdk/core": "^3.979.0",
|
|
52
|
+
"@aws-sdk/credential-provider-node": "^3.972.91",
|
|
53
53
|
"@aws-sdk/types": "^3.975.0",
|
|
54
54
|
"@smithy/core": "^3.37.0",
|
|
55
55
|
"@smithy/fetch-http-handler": "^5.8.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { SmithyRpcV2CborProtocol, loadSmithyRpcV2CborErrorCode } = require("@smithy/core/cbor");
|
|
2
2
|
const { TypeRegistry, NormalizedSchema, deref } = require("@smithy/core/schema");
|
|
3
3
|
const { decorateServiceException, getValueFromTextNode } = require("@smithy/core/client");
|
|
4
|
-
const { RpcProtocol, JsonCodec2, loadJsonRpcErrorCode, HttpBindingProtocol, HttpInterceptingShapeSerializer, HttpInterceptingShapeDeserializer, loadRestJsonErrorCode, FromStringShapeDeserializer, determineTimestampFormat, extendedEncodeURIComponent, collectBody } = require("@smithy/core/protocols");
|
|
4
|
+
const { RpcProtocol, JsonCodec2, loadJsonRpcErrorCode, HttpBindingProtocol, HttpInterceptingShapeSerializer, HttpInterceptingShapeDeserializer, loadRestJsonErrorCode, SmithyRpcV2JsonProtocol, loadSmithyRpcV2JsonErrorCode, FromStringShapeDeserializer, determineTimestampFormat, extendedEncodeURIComponent, collectBody } = require("@smithy/core/protocols");
|
|
5
5
|
const { JsonCodec, JsonShapeDeserializer, JsonShapeDeserializer2, JsonShapeSerializer, JsonShapeSerializer2, parseJsonBody, parseJsonErrorBody } = require("@smithy/core/protocols");
|
|
6
6
|
exports.JsonCodec = JsonCodec;
|
|
7
7
|
exports.JsonCodec2 = JsonCodec2;
|
|
@@ -401,6 +401,55 @@ class AwsRestJsonProtocol extends HttpBindingProtocol {
|
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
|
|
404
|
+
class AwsSmithyRpcV2JsonProtocol extends SmithyRpcV2JsonProtocol {
|
|
405
|
+
awsQueryCompatible;
|
|
406
|
+
mixin;
|
|
407
|
+
constructor({ defaultNamespace, errorTypeRegistries, awsQueryCompatible, }) {
|
|
408
|
+
super({ defaultNamespace, errorTypeRegistries });
|
|
409
|
+
this.awsQueryCompatible = !!awsQueryCompatible;
|
|
410
|
+
this.mixin = new ProtocolLib(this.awsQueryCompatible);
|
|
411
|
+
}
|
|
412
|
+
async serializeRequest(operationSchema, input, context) {
|
|
413
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
414
|
+
if (this.awsQueryCompatible) {
|
|
415
|
+
request.headers["x-amzn-query-mode"] = "true";
|
|
416
|
+
}
|
|
417
|
+
return request;
|
|
418
|
+
}
|
|
419
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
420
|
+
if (this.awsQueryCompatible) {
|
|
421
|
+
this.mixin.setQueryCompatError(dataObject, response);
|
|
422
|
+
}
|
|
423
|
+
const errorName = (() => {
|
|
424
|
+
const compatHeader = response.headers["x-amzn-query-error"];
|
|
425
|
+
if (compatHeader && this.awsQueryCompatible) {
|
|
426
|
+
return compatHeader.split(";")[0];
|
|
427
|
+
}
|
|
428
|
+
return loadSmithyRpcV2JsonErrorCode(response, dataObject) ?? "Unknown";
|
|
429
|
+
})();
|
|
430
|
+
this.mixin.compose(this.compositeErrorRegistry, errorName, this.options.defaultNamespace);
|
|
431
|
+
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);
|
|
432
|
+
const ns = NormalizedSchema.of(errorSchema);
|
|
433
|
+
const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
434
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
435
|
+
const exception = new ErrorCtor({});
|
|
436
|
+
const output = {};
|
|
437
|
+
const errorDeserializer = this.getPayloadCodec().createDeserializer();
|
|
438
|
+
for (const [name, member] of ns.structIterator()) {
|
|
439
|
+
if (dataObject[name] != null) {
|
|
440
|
+
output[name] = errorDeserializer.readObject(member, dataObject[name]);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
if (this.awsQueryCompatible) {
|
|
444
|
+
this.mixin.queryCompatOutput(dataObject, output);
|
|
445
|
+
}
|
|
446
|
+
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
|
447
|
+
$fault: ns.getMergedTraits().error,
|
|
448
|
+
message,
|
|
449
|
+
}, output), dataObject);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
404
453
|
class SerdeContextConfig {
|
|
405
454
|
serdeContext;
|
|
406
455
|
setSerdeContext(serdeContext) {
|
|
@@ -1441,6 +1490,7 @@ exports.AwsQueryProtocol = AwsQueryProtocol;
|
|
|
1441
1490
|
exports.AwsRestJsonProtocol = AwsRestJsonProtocol;
|
|
1442
1491
|
exports.AwsRestXmlProtocol = AwsRestXmlProtocol;
|
|
1443
1492
|
exports.AwsSmithyRpcV2CborProtocol = AwsSmithyRpcV2CborProtocol;
|
|
1493
|
+
exports.AwsSmithyRpcV2JsonProtocol = AwsSmithyRpcV2JsonProtocol;
|
|
1444
1494
|
exports.QueryShapeSerializer = QueryShapeSerializer;
|
|
1445
1495
|
exports.XmlCodec = XmlCodec;
|
|
1446
1496
|
exports.XmlShapeDeserializer = XmlShapeDeserializer;
|
|
@@ -3,6 +3,7 @@ export { AwsJson1_0Protocol } from "./json/AwsJson1_0Protocol";
|
|
|
3
3
|
export { AwsJson1_1Protocol } from "./json/AwsJson1_1Protocol";
|
|
4
4
|
export { AwsJsonRpcProtocol } from "./json/AwsJsonRpcProtocol";
|
|
5
5
|
export { AwsRestJsonProtocol } from "./json/AwsRestJsonProtocol";
|
|
6
|
+
export { AwsSmithyRpcV2JsonProtocol } from "./json/AwsSmithyRpcV2JsonProtocol";
|
|
6
7
|
export { JsonCodec, JsonCodec2, JsonShapeDeserializer, JsonShapeDeserializer2, JsonShapeSerializer, JsonShapeSerializer2, loadJsonRpcErrorCode, loadRestJsonErrorCode, parseJsonBody, parseJsonErrorBody, } from "@smithy/core/protocols";
|
|
7
8
|
export { AwsEc2QueryProtocol } from "./query/AwsEc2QueryProtocol";
|
|
8
9
|
export { AwsQueryProtocol } from "./query/AwsQueryProtocol";
|
package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { loadSmithyRpcV2JsonErrorCode, SmithyRpcV2JsonProtocol } from "@smithy/core/protocols";
|
|
2
|
+
import { NormalizedSchema } from "@smithy/core/schema";
|
|
3
|
+
import { ProtocolLib } from "../ProtocolLib";
|
|
4
|
+
export class AwsSmithyRpcV2JsonProtocol extends SmithyRpcV2JsonProtocol {
|
|
5
|
+
awsQueryCompatible;
|
|
6
|
+
mixin;
|
|
7
|
+
constructor({ defaultNamespace, errorTypeRegistries, awsQueryCompatible, }) {
|
|
8
|
+
super({ defaultNamespace, errorTypeRegistries });
|
|
9
|
+
this.awsQueryCompatible = !!awsQueryCompatible;
|
|
10
|
+
this.mixin = new ProtocolLib(this.awsQueryCompatible);
|
|
11
|
+
}
|
|
12
|
+
async serializeRequest(operationSchema, input, context) {
|
|
13
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
14
|
+
if (this.awsQueryCompatible) {
|
|
15
|
+
request.headers["x-amzn-query-mode"] = "true";
|
|
16
|
+
}
|
|
17
|
+
return request;
|
|
18
|
+
}
|
|
19
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
20
|
+
if (this.awsQueryCompatible) {
|
|
21
|
+
this.mixin.setQueryCompatError(dataObject, response);
|
|
22
|
+
}
|
|
23
|
+
const errorName = (() => {
|
|
24
|
+
const compatHeader = response.headers["x-amzn-query-error"];
|
|
25
|
+
if (compatHeader && this.awsQueryCompatible) {
|
|
26
|
+
return compatHeader.split(";")[0];
|
|
27
|
+
}
|
|
28
|
+
return loadSmithyRpcV2JsonErrorCode(response, dataObject) ?? "Unknown";
|
|
29
|
+
})();
|
|
30
|
+
this.mixin.compose(this.compositeErrorRegistry, errorName, this.options.defaultNamespace);
|
|
31
|
+
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);
|
|
32
|
+
const ns = NormalizedSchema.of(errorSchema);
|
|
33
|
+
const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
34
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
35
|
+
const exception = new ErrorCtor({});
|
|
36
|
+
const output = {};
|
|
37
|
+
const errorDeserializer = this.getPayloadCodec().createDeserializer();
|
|
38
|
+
for (const [name, member] of ns.structIterator()) {
|
|
39
|
+
if (dataObject[name] != null) {
|
|
40
|
+
output[name] = errorDeserializer.readObject(member, dataObject[name]);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (this.awsQueryCompatible) {
|
|
44
|
+
this.mixin.queryCompatOutput(dataObject, output);
|
|
45
|
+
}
|
|
46
|
+
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
|
47
|
+
$fault: ns.getMergedTraits().error,
|
|
48
|
+
message,
|
|
49
|
+
}, output), dataObject);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -3,6 +3,7 @@ export { AwsJson1_0Protocol } from "./json/AwsJson1_0Protocol";
|
|
|
3
3
|
export { AwsJson1_1Protocol } from "./json/AwsJson1_1Protocol";
|
|
4
4
|
export { AwsJsonRpcProtocol } from "./json/AwsJsonRpcProtocol";
|
|
5
5
|
export { AwsRestJsonProtocol } from "./json/AwsRestJsonProtocol";
|
|
6
|
+
export { AwsSmithyRpcV2JsonProtocol } from "./json/AwsSmithyRpcV2JsonProtocol";
|
|
6
7
|
export { JsonCodec, JsonCodec2, JsonShapeDeserializer, JsonShapeDeserializer2, JsonShapeSerializer, JsonShapeSerializer2, loadJsonRpcErrorCode, loadRestJsonErrorCode, parseJsonBody, parseJsonErrorBody, } from "@smithy/core/protocols";
|
|
7
8
|
export type { JsonSettings } from "@smithy/core/protocols";
|
|
8
9
|
export { AwsEc2QueryProtocol } from "./query/AwsEc2QueryProtocol";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SmithyRpcV2JsonProtocol } from "@smithy/core/protocols";
|
|
2
|
+
import type { TypeRegistry } from "@smithy/core/schema";
|
|
3
|
+
import type { EndpointBearer, HandlerExecutionContext, HttpRequest, HttpResponse, OperationSchema, ResponseMetadata, SerdeFunctions } from "@smithy/types";
|
|
4
|
+
/**
|
|
5
|
+
* Extends the Smithy implementation to add AwsQueryCompatibility support.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare class AwsSmithyRpcV2JsonProtocol extends SmithyRpcV2JsonProtocol {
|
|
10
|
+
private readonly awsQueryCompatible;
|
|
11
|
+
private readonly mixin;
|
|
12
|
+
constructor({ defaultNamespace, errorTypeRegistries, awsQueryCompatible, }: {
|
|
13
|
+
defaultNamespace: string;
|
|
14
|
+
errorTypeRegistries?: TypeRegistry[];
|
|
15
|
+
awsQueryCompatible?: boolean;
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* @override
|
|
19
|
+
*/
|
|
20
|
+
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<HttpRequest>;
|
|
21
|
+
/**
|
|
22
|
+
* @override
|
|
23
|
+
*/
|
|
24
|
+
protected handleError(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: HttpResponse, dataObject: any, metadata: ResponseMetadata): Promise<never>;
|
|
25
|
+
}
|
|
@@ -3,6 +3,7 @@ export { AwsJson1_0Protocol } from "./json/AwsJson1_0Protocol";
|
|
|
3
3
|
export { AwsJson1_1Protocol } from "./json/AwsJson1_1Protocol";
|
|
4
4
|
export { AwsJsonRpcProtocol } from "./json/AwsJsonRpcProtocol";
|
|
5
5
|
export { AwsRestJsonProtocol } from "./json/AwsRestJsonProtocol";
|
|
6
|
+
export { AwsSmithyRpcV2JsonProtocol } from "./json/AwsSmithyRpcV2JsonProtocol";
|
|
6
7
|
export {
|
|
7
8
|
JsonCodec,
|
|
8
9
|
JsonCodec2,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SmithyRpcV2JsonProtocol } from "@smithy/core/protocols";
|
|
2
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
3
|
+
import {
|
|
4
|
+
EndpointBearer,
|
|
5
|
+
HandlerExecutionContext,
|
|
6
|
+
HttpRequest,
|
|
7
|
+
HttpResponse,
|
|
8
|
+
OperationSchema,
|
|
9
|
+
ResponseMetadata,
|
|
10
|
+
SerdeFunctions,
|
|
11
|
+
} from "@smithy/types";
|
|
12
|
+
export declare class AwsSmithyRpcV2JsonProtocol extends SmithyRpcV2JsonProtocol {
|
|
13
|
+
private readonly awsQueryCompatible;
|
|
14
|
+
private readonly mixin;
|
|
15
|
+
constructor({
|
|
16
|
+
defaultNamespace,
|
|
17
|
+
errorTypeRegistries,
|
|
18
|
+
awsQueryCompatible,
|
|
19
|
+
}: {
|
|
20
|
+
defaultNamespace: string;
|
|
21
|
+
errorTypeRegistries?: TypeRegistry[];
|
|
22
|
+
awsQueryCompatible?: boolean;
|
|
23
|
+
});
|
|
24
|
+
serializeRequest<Input extends object>(
|
|
25
|
+
operationSchema: OperationSchema,
|
|
26
|
+
input: Input,
|
|
27
|
+
context: HandlerExecutionContext & SerdeFunctions & EndpointBearer,
|
|
28
|
+
): Promise<HttpRequest>;
|
|
29
|
+
protected handleError(
|
|
30
|
+
operationSchema: OperationSchema,
|
|
31
|
+
context: HandlerExecutionContext & SerdeFunctions,
|
|
32
|
+
response: HttpResponse,
|
|
33
|
+
dataObject: any,
|
|
34
|
+
metadata: ResponseMetadata,
|
|
35
|
+
): Promise<never>;
|
|
36
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.979.0",
|
|
4
4
|
"description": "Core functions & classes shared by multiple AWS SDK clients.",
|
|
5
5
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/core",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-env",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.79",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from known environment variables",
|
|
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.
|
|
46
|
+
"@aws-sdk/core": "^3.979.0",
|
|
47
47
|
"@aws-sdk/types": "^3.975.0",
|
|
48
48
|
"@smithy/core": "^3.37.0",
|
|
49
49
|
"@smithy/types": "^4.19.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-http",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.81",
|
|
4
4
|
"description": "AWS credential provider for containers and HTTP sources",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@aws-sdk/core": "^3.
|
|
56
|
+
"@aws-sdk/core": "^3.979.0",
|
|
57
57
|
"@aws-sdk/types": "^3.975.0",
|
|
58
58
|
"@smithy/core": "^3.37.0",
|
|
59
59
|
"@smithy/fetch-http-handler": "^5.8.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-ini",
|
|
3
|
-
"version": "3.973.
|
|
3
|
+
"version": "3.973.24",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@aws-sdk/core": "^3.
|
|
49
|
-
"@aws-sdk/credential-provider-env": "^3.972.
|
|
50
|
-
"@aws-sdk/credential-provider-http": "^3.972.
|
|
51
|
-
"@aws-sdk/credential-provider-login": "^3.972.
|
|
52
|
-
"@aws-sdk/credential-provider-process": "^3.972.
|
|
53
|
-
"@aws-sdk/credential-provider-sso": "^3.973.
|
|
54
|
-
"@aws-sdk/credential-provider-web-identity": "^3.972.
|
|
55
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
48
|
+
"@aws-sdk/core": "^3.979.0",
|
|
49
|
+
"@aws-sdk/credential-provider-env": "^3.972.79",
|
|
50
|
+
"@aws-sdk/credential-provider-http": "^3.972.81",
|
|
51
|
+
"@aws-sdk/credential-provider-login": "^3.972.86",
|
|
52
|
+
"@aws-sdk/credential-provider-process": "^3.972.79",
|
|
53
|
+
"@aws-sdk/credential-provider-sso": "^3.973.23",
|
|
54
|
+
"@aws-sdk/credential-provider-web-identity": "^3.972.85",
|
|
55
|
+
"@aws-sdk/nested-clients": "^3.997.53",
|
|
56
56
|
"@aws-sdk/types": "^3.975.0",
|
|
57
57
|
"@smithy/core": "^3.37.0",
|
|
58
58
|
"@smithy/credential-provider-imds": "^4.5.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-login",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.86",
|
|
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.
|
|
49
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
48
|
+
"@aws-sdk/core": "^3.979.0",
|
|
49
|
+
"@aws-sdk/nested-clients": "^3.997.53",
|
|
50
50
|
"@aws-sdk/types": "^3.975.0",
|
|
51
51
|
"@smithy/core": "^3.37.0",
|
|
52
52
|
"@smithy/types": "^4.19.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-node",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.91",
|
|
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.79",
|
|
49
|
+
"@aws-sdk/credential-provider-http": "^3.972.81",
|
|
50
|
+
"@aws-sdk/credential-provider-ini": "^3.973.24",
|
|
51
|
+
"@aws-sdk/credential-provider-process": "^3.972.79",
|
|
52
|
+
"@aws-sdk/credential-provider-sso": "^3.973.23",
|
|
53
|
+
"@aws-sdk/credential-provider-web-identity": "^3.972.85",
|
|
54
54
|
"@aws-sdk/types": "^3.975.0",
|
|
55
55
|
"@smithy/core": "^3.37.0",
|
|
56
56
|
"@smithy/credential-provider-imds": "^4.5.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-process",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.79",
|
|
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.
|
|
46
|
+
"@aws-sdk/core": "^3.979.0",
|
|
47
47
|
"@aws-sdk/types": "^3.975.0",
|
|
48
48
|
"@smithy/core": "^3.37.0",
|
|
49
49
|
"@smithy/types": "^4.19.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-sso",
|
|
3
|
-
"version": "3.973.
|
|
3
|
+
"version": "3.973.23",
|
|
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.
|
|
49
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
50
|
-
"@aws-sdk/token-providers": "3.
|
|
48
|
+
"@aws-sdk/core": "^3.979.0",
|
|
49
|
+
"@aws-sdk/nested-clients": "^3.997.53",
|
|
50
|
+
"@aws-sdk/token-providers": "3.1160.0",
|
|
51
51
|
"@aws-sdk/types": "^3.975.0",
|
|
52
52
|
"@smithy/core": "^3.37.0",
|
|
53
53
|
"@smithy/types": "^4.19.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-web-identity",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.85",
|
|
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.
|
|
54
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
53
|
+
"@aws-sdk/core": "^3.979.0",
|
|
54
|
+
"@aws-sdk/nested-clients": "^3.997.53",
|
|
55
55
|
"@aws-sdk/types": "^3.975.0",
|
|
56
56
|
"@smithy/core": "^3.37.0",
|
|
57
57
|
"@smithy/types": "^4.19.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/nested-clients",
|
|
3
|
-
"version": "3.997.
|
|
3
|
+
"version": "3.997.53",
|
|
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.
|
|
103
|
+
"@aws-sdk/core": "^3.979.0",
|
|
104
104
|
"@aws-sdk/signature-v4-multi-region": "^3.996.50",
|
|
105
105
|
"@aws-sdk/types": "^3.975.0",
|
|
106
106
|
"@smithy/core": "^3.37.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/token-providers",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1160.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.
|
|
52
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
51
|
+
"@aws-sdk/core": "^3.979.0",
|
|
52
|
+
"@aws-sdk/nested-clients": "^3.997.53",
|
|
53
53
|
"@aws-sdk/types": "^3.975.0",
|
|
54
54
|
"@smithy/core": "^3.37.0",
|
|
55
55
|
"@smithy/types": "^4.19.0",
|
|
@@ -139,8 +139,9 @@ const getHttpSigningPlugin = (config) => ({
|
|
|
139
139
|
});
|
|
140
140
|
|
|
141
141
|
const normalizeProvider = (input) => {
|
|
142
|
-
if (typeof input === "function")
|
|
142
|
+
if (typeof input === "function") {
|
|
143
143
|
return input;
|
|
144
|
+
}
|
|
144
145
|
const promisified = Promise.resolve(input);
|
|
145
146
|
return () => promisified;
|
|
146
147
|
};
|
|
@@ -203,8 +204,9 @@ class DefaultIdentityProviderConfig {
|
|
|
203
204
|
authSchemes = new Map();
|
|
204
205
|
constructor(config) {
|
|
205
206
|
for (const key in config) {
|
|
206
|
-
if (!hasOwn(config, key))
|
|
207
|
+
if (!hasOwn(config, key)) {
|
|
207
208
|
continue;
|
|
209
|
+
}
|
|
208
210
|
const value = config[key];
|
|
209
211
|
if (value !== undefined) {
|
|
210
212
|
this.authSchemes.set(key, value);
|