You need to sign in or sign up before continuing.

@smithy/core 3.3.0 → 3.3.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.
@@ -702,7 +702,10 @@ var buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body)
702
702
  port,
703
703
  method: "POST",
704
704
  path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
705
- headers
705
+ headers: {
706
+ // intentional copy.
707
+ ...headers
708
+ }
706
709
  };
707
710
  if (resolvedHostname !== void 0) {
708
711
  contents.hostname = resolvedHostname;
@@ -67,7 +67,9 @@ export const buildHttpRpcRequest = async (context, headers, path, resolvedHostna
67
67
  port,
68
68
  method: "POST",
69
69
  path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
70
- headers,
70
+ headers: {
71
+ ...headers,
72
+ },
71
73
  };
72
74
  if (resolvedHostname !== undefined) {
73
75
  contents.hostname = resolvedHostname;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  export type CborItemType = undefined | boolean | number | bigint | [CborUnstructuredByteStringType, Uint64] | string | CborTagType;
4
2
  export type CborTagType = {
5
3
  tag: Uint64 | number;
@@ -39,7 +37,7 @@ export declare const extendedFloat16 = 25;
39
37
  export declare const extendedFloat32 = 26;
40
38
  export declare const extendedFloat64 = 27;
41
39
  export declare const minorIndefinite = 31;
42
- export declare function alloc(size: number): Uint8Array | Buffer;
40
+ export declare function alloc(size: number): Uint8Array<ArrayBuffer> | Buffer<ArrayBuffer>;
43
41
  /**
44
42
  * @public
45
43
  *
@@ -10,7 +10,7 @@
10
10
  */
11
11
  export declare const cbor: {
12
12
  deserialize(payload: Uint8Array): any;
13
- serialize(input: any): Uint8Array;
13
+ serialize(input: any): Uint8Array<ArrayBufferLike>;
14
14
  /**
15
15
  * @public
16
16
  * @param size - byte length to allocate.
@@ -1,6 +1,6 @@
1
1
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
2
  import { HeaderBag as __HeaderBag, HttpResponse, SerdeContext as __SerdeContext, SerdeContext } from "@smithy/types";
3
- import { tag, tagSymbol } from "./cbor-types";
3
+ import { tagSymbol } from "./cbor-types";
4
4
  /**
5
5
  * @internal
6
6
  */
@@ -5,6 +5,6 @@ import { Uint8ArrayBlobAdapter } from "@smithy/util-stream";
5
5
  *
6
6
  * Collect low-level response body stream to Uint8Array.
7
7
  */
8
- export declare const collectBody: (streamBody: any, context: {
8
+ export declare const collectBody: (streamBody: any | undefined, context: {
9
9
  streamCollector: SerdeContext["streamCollector"];
10
10
  }) => Promise<Uint8ArrayBlobAdapter>;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  export type CborItemType = undefined | boolean | number | bigint | [
3
2
  CborUnstructuredByteStringType,
4
3
  Uint64
@@ -41,7 +40,7 @@ export declare const extendedFloat16 = 25;
41
40
  export declare const extendedFloat32 = 26;
42
41
  export declare const extendedFloat64 = 27;
43
42
  export declare const minorIndefinite = 31;
44
- export declare function alloc(size: number): Uint8Array | Buffer;
43
+ export declare function alloc(size: number): Uint8Array<ArrayBuffer> | Buffer<ArrayBuffer>;
45
44
  /**
46
45
  * @public
47
46
  *
@@ -10,7 +10,7 @@
10
10
  */
11
11
  export declare const cbor: {
12
12
  deserialize(payload: Uint8Array): any;
13
- serialize(input: any): Uint8Array;
13
+ serialize(input: any): Uint8Array<ArrayBufferLike>;
14
14
  /**
15
15
  * @public
16
16
  * @param size - byte length to allocate.
@@ -1,6 +1,6 @@
1
1
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
2
  import { HeaderBag as __HeaderBag, HttpResponse, SerdeContext as __SerdeContext, SerdeContext } from "@smithy/types";
3
- import { tag, tagSymbol } from "./cbor-types";
3
+ import { tagSymbol } from "./cbor-types";
4
4
  /**
5
5
  * @internal
6
6
  */
@@ -5,6 +5,6 @@ import { Uint8ArrayBlobAdapter } from "@smithy/util-stream";
5
5
  *
6
6
  * Collect low-level response body stream to Uint8Array.
7
7
  */
8
- export declare const collectBody: (streamBody: any, context: {
8
+ export declare const collectBody: (streamBody: any | undefined, context: {
9
9
  streamCollector: SerdeContext["streamCollector"];
10
10
  }) => Promise<Uint8ArrayBlobAdapter>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.3.0",
3
+ "version": "3.3.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",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "license": "Apache-2.0",
63
63
  "dependencies": {
64
- "@smithy/middleware-serde": "^4.0.3",
64
+ "@smithy/middleware-serde": "^4.0.4",
65
65
  "@smithy/protocol-http": "^5.1.0",
66
66
  "@smithy/types": "^4.2.0",
67
67
  "@smithy/util-body-length-browser": "^4.0.0",