@aws-sdk/core 3.975.2 → 3.976.0
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/dist-cjs/submodules/httpAuthSchemes/index.js +1 -1
- package/dist-cjs/submodules/protocols/index.js +8 -8
- package/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js +1 -1
- package/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +1 -1
- package/dist-es/submodules/protocols/json/JsonShapeSerializer.js +1 -1
- package/dist-es/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.js +182 -0
- package/dist-es/submodules/protocols/json/experimental/ByteJsonShapeSerializer.js +473 -0
- package/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +2 -2
- package/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +4 -4
- package/dist-types/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.d.ts +29 -0
- package/dist-types/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +59 -0
- package/dist-types/ts3.4/index.d.ts +1 -5
- package/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +2 -4
- package/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConstants.d.ts +1 -3
- package/dist-types/ts3.4/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +2 -4
- package/dist-types/ts3.4/submodules/client/index.browser.d.ts +3 -12
- package/dist-types/ts3.4/submodules/client/index.d.ts +4 -16
- package/dist-types/ts3.4/submodules/client/index.native.d.ts +3 -12
- package/dist-types/ts3.4/submodules/client/longPollMiddleware.d.ts +2 -4
- package/dist-types/ts3.4/submodules/client/middleware-host-header/hostHeaderMiddleware.d.ts +5 -9
- package/dist-types/ts3.4/submodules/client/middleware-logger/loggerMiddleware.d.ts +3 -6
- package/dist-types/ts3.4/submodules/client/middleware-recursion-detection/configuration.d.ts +1 -2
- package/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.browser.d.ts +1 -3
- package/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.d.ts +1 -3
- package/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.browser.d.ts +1 -4
- package/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.d.ts +1 -4
- package/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.native.d.ts +1 -4
- package/dist-types/ts3.4/submodules/client/middleware-user-agent/check-features.d.ts +2 -6
- package/dist-types/ts3.4/submodules/client/middleware-user-agent/configurations.d.ts +1 -1
- package/dist-types/ts3.4/submodules/client/middleware-user-agent/user-agent-middleware.d.ts +4 -7
- package/dist-types/ts3.4/submodules/client/region-config-resolver/extensions.d.ts +2 -2
- package/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.d.ts +1 -1
- package/dist-types/ts3.4/submodules/client/setCredentialFeature.d.ts +3 -8
- package/dist-types/ts3.4/submodules/client/setFeature.d.ts +1 -1
- package/dist-types/ts3.4/submodules/client/setTokenFeature.d.ts +1 -1
- package/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/isVirtualHostableS3Bucket.d.ts +1 -1
- package/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partition.d.ts +1 -1
- package/dist-types/ts3.4/submodules/client/util-endpoints/resolveDefaultAwsRegionalEndpointsConfig.d.ts +3 -9
- package/dist-types/ts3.4/submodules/client/util-endpoints/types/RuleSetObject.d.ts +1 -5
- package/dist-types/ts3.4/submodules/client/util-user-agent-browser/createUserAgentStringParsingProvider.d.ts +1 -3
- package/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.d.ts +2 -6
- package/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +2 -6
- package/dist-types/ts3.4/submodules/client/util-user-agent-node/defaultUserAgent.d.ts +2 -6
- package/dist-types/ts3.4/submodules/client/util-user-agent-node/nodeAppIdConfigOptions.d.ts +1 -3
- package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +2 -5
- package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +4 -6
- package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.d.ts +1 -3
- package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/index.d.ts +2 -8
- package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +3 -8
- package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +8 -17
- package/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +1 -1
- package/dist-types/ts3.4/submodules/httpAuthSchemes/utils/isClockSkewed.d.ts +1 -4
- package/dist-types/ts3.4/submodules/protocols/ProtocolLib.d.ts +6 -19
- package/dist-types/ts3.4/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.d.ts +2 -2
- package/dist-types/ts3.4/submodules/protocols/common.d.ts +1 -1
- package/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -5
- package/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -2
- package/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +3 -3
- package/dist-types/ts3.4/submodules/protocols/json/JsonCodec.d.ts +1 -4
- package/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +1 -5
- package/dist-types/ts3.4/submodules/protocols/json/awsExpectUnion.d.ts +1 -3
- package/dist-types/ts3.4/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.d.ts +14 -0
- package/dist-types/ts3.4/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +30 -0
- package/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +1 -1
- package/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +4 -13
- package/dist-types/ts3.4/submodules/protocols/query/AwsQueryProtocol.d.ts +4 -7
- package/dist-types/ts3.4/submodules/protocols/query/QueryShapeSerializer.d.ts +1 -1
- package/dist-types/ts3.4/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +3 -3
- package/dist-types/ts3.4/submodules/protocols/xml/parseXmlBody.d.ts +3 -12
- package/dist-types/ts3.4/submodules/util/util-format-url/format-url.d.ts +1 -1
- package/package.json +65 -64
- package/dist-es/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.js +0 -135
- package/dist-types/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.d.ts +0 -27
- package/dist-types/ts3.4/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.d.ts +0 -17
|
@@ -24,8 +24,4 @@ export { XmlCodec } from "./xml/XmlCodec";
|
|
|
24
24
|
export { XmlSettings } from "./xml/XmlCodec";
|
|
25
25
|
export { XmlShapeDeserializer } from "./xml/XmlShapeDeserializer";
|
|
26
26
|
export { XmlShapeSerializer } from "./xml/XmlShapeSerializer";
|
|
27
|
-
export {
|
|
28
|
-
parseXmlBody,
|
|
29
|
-
parseXmlErrorBody,
|
|
30
|
-
loadRestXmlErrorCode,
|
|
31
|
-
} from "./xml/parseXmlBody";
|
|
27
|
+
export { parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode } from "./xml/parseXmlBody";
|
|
@@ -35,7 +35,7 @@ export declare abstract class AwsJsonRpcProtocol extends RpcProtocol {
|
|
|
35
35
|
serializeRequest<Input extends object>(
|
|
36
36
|
operationSchema: OperationSchema,
|
|
37
37
|
input: Input,
|
|
38
|
-
context: HandlerExecutionContext & SerdeFunctions & EndpointBearer
|
|
38
|
+
context: HandlerExecutionContext & SerdeFunctions & EndpointBearer,
|
|
39
39
|
): Promise<HttpRequest>;
|
|
40
40
|
getPayloadCodec(): JsonCodec;
|
|
41
41
|
protected abstract getJsonRpcVersion(): "1.1" | "1.0";
|
|
@@ -44,6 +44,6 @@ export declare abstract class AwsJsonRpcProtocol extends RpcProtocol {
|
|
|
44
44
|
context: HandlerExecutionContext & SerdeFunctions,
|
|
45
45
|
response: HttpResponse,
|
|
46
46
|
dataObject: any,
|
|
47
|
-
metadata: ResponseMetadata
|
|
47
|
+
metadata: ResponseMetadata,
|
|
48
48
|
): Promise<never>;
|
|
49
49
|
}
|
|
@@ -31,19 +31,19 @@ export declare class AwsRestJsonProtocol extends HttpBindingProtocol {
|
|
|
31
31
|
serializeRequest<Input extends object>(
|
|
32
32
|
operationSchema: OperationSchema,
|
|
33
33
|
input: Input,
|
|
34
|
-
context: HandlerExecutionContext & SerdeFunctions & EndpointBearer
|
|
34
|
+
context: HandlerExecutionContext & SerdeFunctions & EndpointBearer,
|
|
35
35
|
): Promise<HttpRequest>;
|
|
36
36
|
deserializeResponse<Output extends MetadataBearer>(
|
|
37
37
|
operationSchema: OperationSchema,
|
|
38
38
|
context: HandlerExecutionContext & SerdeFunctions,
|
|
39
|
-
response: HttpResponse
|
|
39
|
+
response: HttpResponse,
|
|
40
40
|
): Promise<Output>;
|
|
41
41
|
protected handleError(
|
|
42
42
|
operationSchema: OperationSchema,
|
|
43
43
|
context: HandlerExecutionContext & SerdeFunctions,
|
|
44
44
|
response: HttpResponse,
|
|
45
45
|
dataObject: any,
|
|
46
|
-
metadata: ResponseMetadata
|
|
46
|
+
metadata: ResponseMetadata,
|
|
47
47
|
): Promise<never>;
|
|
48
48
|
protected getDefaultContentType(): string;
|
|
49
49
|
}
|
|
@@ -5,10 +5,7 @@ import { JsonShapeSerializer } from "./JsonShapeSerializer";
|
|
|
5
5
|
export type JsonSettings = CodecSettings & {
|
|
6
6
|
jsonName: boolean;
|
|
7
7
|
};
|
|
8
|
-
export declare class JsonCodec
|
|
9
|
-
extends SerdeContextConfig
|
|
10
|
-
implements Codec<string, string>
|
|
11
|
-
{
|
|
8
|
+
export declare class JsonCodec extends SerdeContextConfig implements Codec<string, string> {
|
|
12
9
|
readonly settings: JsonSettings;
|
|
13
10
|
constructor(settings: JsonSettings);
|
|
14
11
|
createSerializer(): JsonShapeSerializer;
|
|
@@ -14,9 +14,5 @@ export declare class JsonShapeSerializer
|
|
|
14
14
|
write(schema: Schema, value: unknown): void;
|
|
15
15
|
flush(): string;
|
|
16
16
|
writeDiscriminatedDocument(schema: Schema, value: unknown): void;
|
|
17
|
-
protected _write(
|
|
18
|
-
schema: Schema,
|
|
19
|
-
value: unknown,
|
|
20
|
-
container?: NormalizedSchema
|
|
21
|
-
): any;
|
|
17
|
+
protected _write(schema: Schema, value: unknown, container?: NormalizedSchema): any;
|
|
22
18
|
}
|
package/dist-types/ts3.4/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DocumentType, Schema, ShapeDeserializer } from "@smithy/types";
|
|
2
|
+
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
3
|
+
import { JsonSettings } from "../JsonCodec";
|
|
4
|
+
export declare class BufferJsonShapeDeserializer
|
|
5
|
+
extends SerdeContextConfig
|
|
6
|
+
implements ShapeDeserializer<string>
|
|
7
|
+
{
|
|
8
|
+
readonly settings: JsonSettings;
|
|
9
|
+
constructor(settings: JsonSettings);
|
|
10
|
+
read(schema: Schema, data: string | Uint8Array | unknown): Promise<any>;
|
|
11
|
+
readObject(schema: Schema, data: DocumentType): any;
|
|
12
|
+
protected _read(schema: Schema, value: unknown): any;
|
|
13
|
+
private _readStruct;
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Schema, ShapeSerializer } from "@smithy/types";
|
|
2
|
+
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
3
|
+
import { JsonSettings } from "../JsonCodec";
|
|
4
|
+
export declare class ByteJsonShapeSerializer
|
|
5
|
+
extends SerdeContextConfig
|
|
6
|
+
implements ShapeSerializer<Uint8Array>
|
|
7
|
+
{
|
|
8
|
+
readonly settings: JsonSettings;
|
|
9
|
+
private json;
|
|
10
|
+
private i;
|
|
11
|
+
private rootSchema;
|
|
12
|
+
private readonly sizeHistory;
|
|
13
|
+
private sizeHistoryIndex;
|
|
14
|
+
constructor(settings: JsonSettings);
|
|
15
|
+
write(schema: Schema, value: unknown): void;
|
|
16
|
+
writeDiscriminatedDocument(schema: Schema, value: unknown): void;
|
|
17
|
+
flush(): Uint8Array;
|
|
18
|
+
private ensure;
|
|
19
|
+
private writeAscii;
|
|
20
|
+
private writeAsciiQuoted;
|
|
21
|
+
private writeJsonString;
|
|
22
|
+
private writeUnicodeEscape;
|
|
23
|
+
private static readonly B64;
|
|
24
|
+
private writeBase64;
|
|
25
|
+
private writeValue;
|
|
26
|
+
private writeStruct;
|
|
27
|
+
private writeList;
|
|
28
|
+
private writeMap;
|
|
29
|
+
private writeTimestamp;
|
|
30
|
+
}
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { HttpResponse, SerdeFunctions } from "@smithy/types";
|
|
2
|
-
export declare const parseJsonBody: (
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
) => any;
|
|
6
|
-
export declare const parseJsonErrorBody: (
|
|
7
|
-
errorBody: any,
|
|
8
|
-
context: SerdeFunctions
|
|
9
|
-
) => Promise<any>;
|
|
10
|
-
export declare const loadRestJsonErrorCode: (
|
|
11
|
-
output: HttpResponse,
|
|
12
|
-
data: any
|
|
13
|
-
) => string | undefined;
|
|
2
|
+
export declare const parseJsonBody: (streamBody: any, context: SerdeFunctions) => any;
|
|
3
|
+
export declare const parseJsonErrorBody: (errorBody: any, context: SerdeFunctions) => Promise<any>;
|
|
4
|
+
export declare const loadRestJsonErrorCode: (output: HttpResponse, data: any) => string | undefined;
|
|
14
5
|
export declare const loadJsonRpcErrorCode: (
|
|
15
6
|
output: HttpResponse,
|
|
16
7
|
data: any,
|
|
17
|
-
queryCompat?: boolean
|
|
8
|
+
queryCompat?: boolean,
|
|
18
9
|
) => string | undefined;
|
|
@@ -35,12 +35,12 @@ export declare class AwsQueryProtocol extends RpcProtocol {
|
|
|
35
35
|
serializeRequest<Input extends object>(
|
|
36
36
|
operationSchema: OperationSchema,
|
|
37
37
|
input: Input,
|
|
38
|
-
context: HandlerExecutionContext & SerdeFunctions & EndpointBearer
|
|
38
|
+
context: HandlerExecutionContext & SerdeFunctions & EndpointBearer,
|
|
39
39
|
): Promise<HttpRequest>;
|
|
40
40
|
deserializeResponse<Output extends MetadataBearer>(
|
|
41
41
|
operationSchema: OperationSchema,
|
|
42
42
|
context: HandlerExecutionContext & SerdeFunctions,
|
|
43
|
-
response: IHttpResponse
|
|
43
|
+
response: IHttpResponse,
|
|
44
44
|
): Promise<Output>;
|
|
45
45
|
protected useNestedResult(): boolean;
|
|
46
46
|
protected handleError(
|
|
@@ -48,12 +48,9 @@ export declare class AwsQueryProtocol extends RpcProtocol {
|
|
|
48
48
|
context: HandlerExecutionContext & SerdeFunctions,
|
|
49
49
|
response: IHttpResponse,
|
|
50
50
|
dataObject: any,
|
|
51
|
-
metadata: ResponseMetadata
|
|
51
|
+
metadata: ResponseMetadata,
|
|
52
52
|
): Promise<never>;
|
|
53
|
-
protected loadQueryErrorCode(
|
|
54
|
-
output: IHttpResponse,
|
|
55
|
-
data: any
|
|
56
|
-
): string | undefined;
|
|
53
|
+
protected loadQueryErrorCode(output: IHttpResponse, data: any): string | undefined;
|
|
57
54
|
protected loadQueryError(data: any): any | undefined;
|
|
58
55
|
protected loadQueryErrorMessage(data: any): string;
|
|
59
56
|
protected getDefaultContentType(): string;
|
|
@@ -28,19 +28,19 @@ export declare class AwsRestXmlProtocol extends HttpBindingProtocol {
|
|
|
28
28
|
serializeRequest<Input extends object>(
|
|
29
29
|
operationSchema: OperationSchema,
|
|
30
30
|
input: Input,
|
|
31
|
-
context: HandlerExecutionContext & SerdeFunctions & EndpointBearer
|
|
31
|
+
context: HandlerExecutionContext & SerdeFunctions & EndpointBearer,
|
|
32
32
|
): Promise<IHttpRequest>;
|
|
33
33
|
deserializeResponse<Output extends MetadataBearer>(
|
|
34
34
|
operationSchema: OperationSchema,
|
|
35
35
|
context: HandlerExecutionContext & SerdeFunctions,
|
|
36
|
-
response: IHttpResponse
|
|
36
|
+
response: IHttpResponse,
|
|
37
37
|
): Promise<Output>;
|
|
38
38
|
protected handleError(
|
|
39
39
|
operationSchema: OperationSchema,
|
|
40
40
|
context: HandlerExecutionContext & SerdeFunctions,
|
|
41
41
|
response: IHttpResponse,
|
|
42
42
|
dataObject: any,
|
|
43
|
-
metadata: ResponseMetadata
|
|
43
|
+
metadata: ResponseMetadata,
|
|
44
44
|
): Promise<never>;
|
|
45
45
|
protected getDefaultContentType(): string;
|
|
46
46
|
private hasUnstructuredPayloadBinding;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { HttpResponse, SerdeContext } from "@smithy/types";
|
|
2
|
-
export declare const parseXmlBody: (
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
) => any;
|
|
6
|
-
export declare const parseXmlErrorBody: (
|
|
7
|
-
errorBody: any,
|
|
8
|
-
context: SerdeContext
|
|
9
|
-
) => Promise<any>;
|
|
10
|
-
export declare const loadRestXmlErrorCode: (
|
|
11
|
-
output: HttpResponse,
|
|
12
|
-
data: any
|
|
13
|
-
) => string | undefined;
|
|
2
|
+
export declare const parseXmlBody: (streamBody: any, context: SerdeContext) => any;
|
|
3
|
+
export declare const parseXmlErrorBody: (errorBody: any, context: SerdeContext) => Promise<any>;
|
|
4
|
+
export declare const loadRestXmlErrorCode: (output: HttpResponse, data: any) => string | undefined;
|
package/package.json
CHANGED
|
@@ -1,27 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.976.0",
|
|
4
4
|
"description": "Core functions & classes shared by multiple AWS SDK clients.",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"build:types": "premove dist-types && premove dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json",
|
|
11
|
-
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
12
|
-
"clean": "premove dist-cjs dist-es dist-types",
|
|
13
|
-
"extract:docs": "api-extractor run --local",
|
|
14
|
-
"lint": "node ../../scripts/validation/submodules-linter.js",
|
|
15
|
-
"prebuild": "yarn lint",
|
|
16
|
-
"test": "yarn g:vitest run",
|
|
17
|
-
"test:watch": "yarn g:vitest watch",
|
|
18
|
-
"test:integration": "yarn g:vitest run -c vitest.config.integ.mts && yarn test:temp:retry",
|
|
19
|
-
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts",
|
|
20
|
-
"test:temp:retry": "SMITHY_NEW_RETRIES_2026=true node ./integ/retry.integ.spec && AWS_NEW_RETRIES_2026=true node ./integ/retry.integ.spec && node ./integ/retry.integ.spec"
|
|
5
|
+
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/core",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "AWS SDK for JavaScript Team",
|
|
9
|
+
"url": "https://aws.amazon.com/sdk-for-javascript/"
|
|
21
10
|
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/aws/aws-sdk-js-v3.git",
|
|
14
|
+
"directory": "packages-internal/core"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"./account-id-endpoint.d.ts",
|
|
18
|
+
"./account-id-endpoint.js",
|
|
19
|
+
"./client.d.ts",
|
|
20
|
+
"./client.js",
|
|
21
|
+
"./httpAuthSchemes.d.ts",
|
|
22
|
+
"./httpAuthSchemes.js",
|
|
23
|
+
"./protocols.d.ts",
|
|
24
|
+
"./protocols.js",
|
|
25
|
+
"./util.d.ts",
|
|
26
|
+
"./util.js",
|
|
27
|
+
"dist-*/**"
|
|
28
|
+
],
|
|
29
|
+
"sideEffects": [
|
|
30
|
+
"./dist-es/submodules/client/util-endpoints/aws.js",
|
|
31
|
+
"./dist-cjs/submodules/client/util-endpoints/aws.js"
|
|
32
|
+
],
|
|
22
33
|
"main": "./dist-cjs/index.js",
|
|
23
34
|
"module": "./dist-es/index.js",
|
|
35
|
+
"browser": {
|
|
36
|
+
"./dist-es/submodules/client/index.js": "./dist-es/submodules/client/index.browser.js"
|
|
37
|
+
},
|
|
24
38
|
"types": "./dist-types/index.d.ts",
|
|
39
|
+
"typesVersions": {
|
|
40
|
+
"<4.5": {
|
|
41
|
+
"dist-types/*": [
|
|
42
|
+
"dist-types/ts3.4/*"
|
|
43
|
+
],
|
|
44
|
+
"*": [
|
|
45
|
+
"dist-types/ts3.4/submodules/*/index.d.ts"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"react-native": {
|
|
50
|
+
"./dist-es/submodules/client/index.js": "./dist-es/submodules/client/index.native.js"
|
|
51
|
+
},
|
|
25
52
|
"exports": {
|
|
26
53
|
".": {
|
|
27
54
|
"types": "./dist-types/index.d.ts",
|
|
@@ -74,40 +101,30 @@
|
|
|
74
101
|
"require": "./dist-cjs/submodules/util/index.js"
|
|
75
102
|
}
|
|
76
103
|
},
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"./
|
|
94
|
-
"dist-*/**"
|
|
95
|
-
],
|
|
96
|
-
"sideEffects": [
|
|
97
|
-
"./dist-es/submodules/client/util-endpoints/aws.js",
|
|
98
|
-
"./dist-cjs/submodules/client/util-endpoints/aws.js"
|
|
99
|
-
],
|
|
100
|
-
"author": {
|
|
101
|
-
"name": "AWS SDK for JavaScript Team",
|
|
102
|
-
"url": "https://aws.amazon.com/sdk-for-javascript/"
|
|
104
|
+
"scripts": {
|
|
105
|
+
"benchmark:json": "npx tsx scripts/benchmark-json-serializer.ts",
|
|
106
|
+
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
107
|
+
"build:cjs": "node ../../scripts/compilation/inline && premove ./dist-cjs/api-extractor-type-index.js",
|
|
108
|
+
"build:es": "premove dist-es && tsc -p tsconfig.es.json && premove ./dist-es/api-extractor-type-index.js",
|
|
109
|
+
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
|
110
|
+
"build:types": "premove dist-types && premove dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json",
|
|
111
|
+
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
112
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
113
|
+
"extract:docs": "api-extractor run --local",
|
|
114
|
+
"lint": "node ../../scripts/validation/submodules-linter.js",
|
|
115
|
+
"prebuild": "yarn lint",
|
|
116
|
+
"test": "yarn g:vitest run",
|
|
117
|
+
"test:watch": "yarn g:vitest watch",
|
|
118
|
+
"test:integration": "yarn g:vitest run -c vitest.config.integ.mts && yarn test:temp:retry",
|
|
119
|
+
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts",
|
|
120
|
+
"test:temp:retry": "SMITHY_NEW_RETRIES_2026=true node ./integ/retry.integ.spec && AWS_NEW_RETRIES_2026=true node ./integ/retry.integ.spec && node ./integ/retry.integ.spec"
|
|
103
121
|
},
|
|
104
|
-
"license": "Apache-2.0",
|
|
105
122
|
"dependencies": {
|
|
106
|
-
"@aws-sdk/types": "^3.974.
|
|
107
|
-
"@aws-sdk/xml-builder": "^3.972.
|
|
123
|
+
"@aws-sdk/types": "^3.974.2",
|
|
124
|
+
"@aws-sdk/xml-builder": "^3.972.36",
|
|
108
125
|
"@aws/lambda-invoke-store": "^0.3.0",
|
|
109
|
-
"@smithy/core": "^3.29.
|
|
110
|
-
"@smithy/signature-v4": "^5.6.
|
|
126
|
+
"@smithy/core": "^3.29.4",
|
|
127
|
+
"@smithy/signature-v4": "^5.6.5",
|
|
111
128
|
"@smithy/types": "^4.16.1",
|
|
112
129
|
"bowser": "^2.11.0",
|
|
113
130
|
"tslib": "^2.6.2"
|
|
@@ -121,21 +138,5 @@
|
|
|
121
138
|
},
|
|
122
139
|
"engines": {
|
|
123
140
|
"node": ">=20.0.0"
|
|
124
|
-
},
|
|
125
|
-
"typesVersions": {
|
|
126
|
-
"<4.5": {
|
|
127
|
-
"dist-types/*": [
|
|
128
|
-
"dist-types/ts3.4/*"
|
|
129
|
-
],
|
|
130
|
-
"*": [
|
|
131
|
-
"dist-types/ts3.4/submodules/*/index.d.ts"
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/core",
|
|
136
|
-
"repository": {
|
|
137
|
-
"type": "git",
|
|
138
|
-
"url": "https://github.com/aws/aws-sdk-js-v3.git",
|
|
139
|
-
"directory": "packages-internal/core"
|
|
140
141
|
}
|
|
141
142
|
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { determineTimestampFormat } from "@smithy/core/protocols";
|
|
2
|
-
import { NormalizedSchema } from "@smithy/core/schema";
|
|
3
|
-
import { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue, toBase64 } from "@smithy/core/serde";
|
|
4
|
-
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
5
|
-
export class SinglePassJsonShapeSerializer extends SerdeContextConfig {
|
|
6
|
-
settings;
|
|
7
|
-
buffer;
|
|
8
|
-
rootSchema;
|
|
9
|
-
constructor(settings) {
|
|
10
|
-
super();
|
|
11
|
-
this.settings = settings;
|
|
12
|
-
}
|
|
13
|
-
write(schema, value) {
|
|
14
|
-
this.rootSchema = NormalizedSchema.of(schema);
|
|
15
|
-
this.buffer = this.writeObject(this.rootSchema, value);
|
|
16
|
-
}
|
|
17
|
-
writeDiscriminatedDocument(schema, value) {
|
|
18
|
-
this.write(schema, value);
|
|
19
|
-
if (typeof this.buffer === "object") {
|
|
20
|
-
this.buffer.__type = NormalizedSchema.of(schema).getName(true);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
flush() {
|
|
24
|
-
this.rootSchema = undefined;
|
|
25
|
-
return this.buffer;
|
|
26
|
-
}
|
|
27
|
-
writeObject(schema, value) {
|
|
28
|
-
if (value == undefined) {
|
|
29
|
-
return "";
|
|
30
|
-
}
|
|
31
|
-
let b = "";
|
|
32
|
-
const ns = NormalizedSchema.of(schema);
|
|
33
|
-
const sparse = !!ns.getMergedTraits().sparse;
|
|
34
|
-
if (Array.isArray(value) && (ns.isDocumentSchema() || ns.isListSchema())) {
|
|
35
|
-
b += "[";
|
|
36
|
-
for (let i = 0; i < value.length; ++i) {
|
|
37
|
-
const item = value[i];
|
|
38
|
-
if (item != null || sparse) {
|
|
39
|
-
b += this.writeValue(ns.getValueSchema(), item);
|
|
40
|
-
b += ",";
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
else if (ns.isStructSchema()) {
|
|
45
|
-
b += "{";
|
|
46
|
-
let didWriteMember = false;
|
|
47
|
-
for (const [name, member] of ns.structIterator()) {
|
|
48
|
-
const item = value[name];
|
|
49
|
-
const targetKey = this.settings.jsonName ? member.getMergedTraits().jsonName ?? name : name;
|
|
50
|
-
const serializableValue = this.writeValue(member, item);
|
|
51
|
-
if (item != null || member.isIdempotencyToken()) {
|
|
52
|
-
didWriteMember = true;
|
|
53
|
-
b += `"${targetKey}":${serializableValue}`;
|
|
54
|
-
b += ",";
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
if (!didWriteMember && ns.isUnionSchema()) {
|
|
58
|
-
const { $unknown } = value;
|
|
59
|
-
if (Array.isArray($unknown)) {
|
|
60
|
-
const [k, v] = $unknown;
|
|
61
|
-
b += `"${k}":${this.writeValue(15, v)}`;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
else if (ns.isMapSchema() || ns.isDocumentSchema()) {
|
|
66
|
-
b += "{";
|
|
67
|
-
for (const k in value) {
|
|
68
|
-
const v = value[k];
|
|
69
|
-
if (v != null || sparse) {
|
|
70
|
-
b += `"${k}":${this.writeValue(ns, v)}`;
|
|
71
|
-
b += ",";
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (b[b.length - 1] === ",") {
|
|
76
|
-
b = b.slice(0, -1);
|
|
77
|
-
}
|
|
78
|
-
if (b[0] === "[") {
|
|
79
|
-
b += "]";
|
|
80
|
-
}
|
|
81
|
-
if (b[0] === "{") {
|
|
82
|
-
b += "}";
|
|
83
|
-
}
|
|
84
|
-
return b;
|
|
85
|
-
}
|
|
86
|
-
writeValue(schema, value) {
|
|
87
|
-
const isObject = value !== null && typeof value === "object";
|
|
88
|
-
const ns = NormalizedSchema.of(schema);
|
|
89
|
-
const quote = (_) => `"${_}"`;
|
|
90
|
-
if ((ns.isBlobSchema() && (value instanceof Uint8Array || typeof value === "string")) ||
|
|
91
|
-
(ns.isDocumentSchema() && value instanceof Uint8Array)) {
|
|
92
|
-
return quote((this.serdeContext?.base64Encoder ?? toBase64)(value));
|
|
93
|
-
}
|
|
94
|
-
if ((ns.isTimestampSchema() || ns.isDocumentSchema()) && value instanceof Date) {
|
|
95
|
-
const format = determineTimestampFormat(ns, this.settings);
|
|
96
|
-
switch (format) {
|
|
97
|
-
case 5:
|
|
98
|
-
return quote(value.toISOString().replace(".000Z", "Z"));
|
|
99
|
-
case 6:
|
|
100
|
-
return quote(dateToUtcString(value));
|
|
101
|
-
case 7:
|
|
102
|
-
return String(value.getTime() / 1000);
|
|
103
|
-
default:
|
|
104
|
-
console.warn("Missing timestamp format, using epoch seconds", value);
|
|
105
|
-
return String(value.getTime() / 1000);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
if (ns.isNumericSchema() && typeof value === "number") {
|
|
109
|
-
if (Math.abs(value) === Infinity || isNaN(value)) {
|
|
110
|
-
return quote(String(value));
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
if (ns.isStringSchema()) {
|
|
114
|
-
if (typeof value === "undefined" && ns.isIdempotencyToken()) {
|
|
115
|
-
return quote(generateIdempotencyToken());
|
|
116
|
-
}
|
|
117
|
-
if (typeof value === "string") {
|
|
118
|
-
const mediaType = ns.getMergedTraits().mediaType;
|
|
119
|
-
if (mediaType) {
|
|
120
|
-
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
121
|
-
if (isJson) {
|
|
122
|
-
return quote(LazyJsonString.from(value).toString());
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
if (value instanceof NumericValue) {
|
|
128
|
-
return value.string;
|
|
129
|
-
}
|
|
130
|
-
if (isObject) {
|
|
131
|
-
return this.writeObject(ns, value);
|
|
132
|
-
}
|
|
133
|
-
return typeof value === "string" ? quote(value) : String(value);
|
|
134
|
-
}
|
|
135
|
-
}
|
package/dist-types/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Schema, ShapeSerializer } from "@smithy/types";
|
|
2
|
-
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
3
|
-
import type { JsonSettings } from "../JsonCodec";
|
|
4
|
-
/**
|
|
5
|
-
* This implementation uses single-pass JSON serialization with JS code instead of
|
|
6
|
-
* JSON.stringify.
|
|
7
|
-
*
|
|
8
|
-
* It isn't significantly faster than dual-pass ending with native JSON.stringify
|
|
9
|
-
* that I would want to use it. It seems to be barely faster in some mid-range object
|
|
10
|
-
* sizes but slower on the high end.
|
|
11
|
-
*
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
export declare class SinglePassJsonShapeSerializer extends SerdeContextConfig implements ShapeSerializer<string> {
|
|
15
|
-
readonly settings: JsonSettings;
|
|
16
|
-
private buffer;
|
|
17
|
-
private rootSchema;
|
|
18
|
-
constructor(settings: JsonSettings);
|
|
19
|
-
write(schema: Schema, value: unknown): void;
|
|
20
|
-
/**
|
|
21
|
-
* @internal
|
|
22
|
-
*/
|
|
23
|
-
writeDiscriminatedDocument(schema: Schema, value: unknown): void;
|
|
24
|
-
flush(): string;
|
|
25
|
-
private writeObject;
|
|
26
|
-
private writeValue;
|
|
27
|
-
}
|
package/dist-types/ts3.4/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Schema, ShapeSerializer } from "@smithy/types";
|
|
2
|
-
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
3
|
-
import { JsonSettings } from "../JsonCodec";
|
|
4
|
-
export declare class SinglePassJsonShapeSerializer
|
|
5
|
-
extends SerdeContextConfig
|
|
6
|
-
implements ShapeSerializer<string>
|
|
7
|
-
{
|
|
8
|
-
readonly settings: JsonSettings;
|
|
9
|
-
private buffer;
|
|
10
|
-
private rootSchema;
|
|
11
|
-
constructor(settings: JsonSettings);
|
|
12
|
-
write(schema: Schema, value: unknown): void;
|
|
13
|
-
writeDiscriminatedDocument(schema: Schema, value: unknown): void;
|
|
14
|
-
flush(): string;
|
|
15
|
-
private writeObject;
|
|
16
|
-
private writeValue;
|
|
17
|
-
}
|