@smithy/core 3.20.0 → 3.20.2
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/cbor/index.js +3 -0
- package/dist-cjs/submodules/protocols/index.js +3 -0
- package/dist-es/submodules/cbor/CborCodec.js +4 -0
- package/dist-es/submodules/protocols/HttpProtocol.js +3 -0
- package/dist-types/submodules/protocols/SerdeContext.d.ts +10 -2
- package/dist-types/ts3.4/submodules/protocols/SerdeContext.d.ts +10 -2
- package/package.json +2 -2
|
@@ -80,6 +80,9 @@ class HttpProtocol extends SerdeContext {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
setHostPrefix(request, operationSchema, input) {
|
|
83
|
+
if (this.serdeContext?.disableHostPrefix) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
83
86
|
const inputNs = schema.NormalizedSchema.of(operationSchema.input);
|
|
84
87
|
const opTraits = schema.translateTraits(operationSchema.traits ?? {});
|
|
85
88
|
if (opTraits.endpoint) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SerdeContext } from "@smithy/core/protocols";
|
|
2
2
|
import { NormalizedSchema } from "@smithy/core/schema";
|
|
3
3
|
import { _parseEpochTimestamp, generateIdempotencyToken } from "@smithy/core/serde";
|
|
4
|
+
import { NumericValue } from "@smithy/core/serde";
|
|
4
5
|
import { fromBase64 } from "@smithy/util-base64";
|
|
5
6
|
import { cbor } from "./cbor";
|
|
6
7
|
import { dateToTag } from "./parseCborBody";
|
|
@@ -182,6 +183,9 @@ export class CborShapeDeserializer extends SerdeContext {
|
|
|
182
183
|
newObject.$unknown = [k, value[k]];
|
|
183
184
|
}
|
|
184
185
|
}
|
|
186
|
+
else if (value instanceof NumericValue) {
|
|
187
|
+
return value;
|
|
188
|
+
}
|
|
185
189
|
return newObject;
|
|
186
190
|
}
|
|
187
191
|
else {
|
|
@@ -50,6 +50,9 @@ export class HttpProtocol extends SerdeContext {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
setHostPrefix(request, operationSchema, input) {
|
|
53
|
+
if (this.serdeContext?.disableHostPrefix) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
53
56
|
const inputNs = NormalizedSchema.of(operationSchema.input);
|
|
54
57
|
const opTraits = translateTraits(operationSchema.traits ?? {});
|
|
55
58
|
if (opTraits.endpoint) {
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import type { ConfigurableSerdeContext, SerdeFunctions } from "@smithy/types";
|
|
2
|
+
/**
|
|
3
|
+
* This in practice should be the client config object.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
type SerdeContextType = SerdeFunctions & {
|
|
7
|
+
disableHostPrefix?: boolean;
|
|
8
|
+
};
|
|
2
9
|
/**
|
|
3
10
|
* @internal
|
|
4
11
|
*/
|
|
5
12
|
export declare abstract class SerdeContext implements ConfigurableSerdeContext {
|
|
6
|
-
protected serdeContext?:
|
|
7
|
-
setSerdeContext(serdeContext:
|
|
13
|
+
protected serdeContext?: SerdeContextType;
|
|
14
|
+
setSerdeContext(serdeContext: SerdeContextType): void;
|
|
8
15
|
}
|
|
16
|
+
export {};
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { ConfigurableSerdeContext, SerdeFunctions } from "@smithy/types";
|
|
2
|
+
/**
|
|
3
|
+
* This in practice should be the client config object.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
type SerdeContextType = SerdeFunctions & {
|
|
7
|
+
disableHostPrefix?: boolean;
|
|
8
|
+
};
|
|
2
9
|
/**
|
|
3
10
|
* @internal
|
|
4
11
|
*/
|
|
5
12
|
export declare abstract class SerdeContext implements ConfigurableSerdeContext {
|
|
6
|
-
protected serdeContext?:
|
|
7
|
-
setSerdeContext(serdeContext:
|
|
13
|
+
protected serdeContext?: SerdeContextType;
|
|
14
|
+
setSerdeContext(serdeContext: SerdeContextType): void;
|
|
8
15
|
}
|
|
16
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/core",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.2",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline core",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"concurrently": "7.0.0",
|
|
126
126
|
"downlevel-dts": "0.10.1",
|
|
127
127
|
"json-bigint": "^1.0.0",
|
|
128
|
-
"rimraf": "
|
|
128
|
+
"rimraf": "5.0.10",
|
|
129
129
|
"typedoc": "0.23.23"
|
|
130
130
|
},
|
|
131
131
|
"typedoc": {
|