@smithy/core 3.20.1 → 3.20.3

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.
@@ -862,6 +862,9 @@ class CborShapeSerializer extends protocols.SerdeContext {
862
862
  newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);
863
863
  }
864
864
  }
865
+ else if (ns.isBigDecimalSchema()) {
866
+ return sourceObject;
867
+ }
865
868
  return newObject;
866
869
  }
867
870
  return source;
@@ -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) {
@@ -87,6 +87,9 @@ export class CborShapeSerializer extends SerdeContext {
87
87
  newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);
88
88
  }
89
89
  }
90
+ else if (ns.isBigDecimalSchema()) {
91
+ return sourceObject;
92
+ }
90
93
  return newObject;
91
94
  }
92
95
  return source;
@@ -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?: SerdeFunctions;
7
- setSerdeContext(serdeContext: SerdeFunctions): void;
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?: SerdeFunctions;
7
- setSerdeContext(serdeContext: SerdeFunctions): void;
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.1",
3
+ "version": "3.20.3",
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",