@smithy/eventstream-codec 4.0.5 → 4.1.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/index.js +5 -7
- package/dist-types/EventStreamCodec.d.ts +2 -2
- package/dist-types/HeaderMarshaller.d.ts +1 -1
- package/dist-types/Int64.d.ts +1 -1
- package/dist-types/Message.d.ts +1 -1
- package/dist-types/MessageDecoderStream.d.ts +1 -1
- package/dist-types/MessageEncoderStream.d.ts +1 -1
- package/dist-types/SmithyMessageDecoderStream.d.ts +1 -1
- package/dist-types/SmithyMessageEncoderStream.d.ts +1 -1
- package/dist-types/TestVectors.fixture.d.ts +1 -1
- package/dist-types/vectorTypes.fixture.d.ts +1 -1
- package/package.json +5 -4
package/dist-cjs/index.js
CHANGED
|
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
EventStreamCodec: () => EventStreamCodec,
|
|
24
24
|
HeaderMarshaller: () => HeaderMarshaller,
|
|
25
25
|
Int64: () => Int64,
|
|
@@ -28,7 +28,7 @@ __export(src_exports, {
|
|
|
28
28
|
SmithyMessageDecoderStream: () => SmithyMessageDecoderStream,
|
|
29
29
|
SmithyMessageEncoderStream: () => SmithyMessageEncoderStream
|
|
30
30
|
});
|
|
31
|
-
module.exports = __toCommonJS(
|
|
31
|
+
module.exports = __toCommonJS(index_exports);
|
|
32
32
|
|
|
33
33
|
// src/EventStreamCodec.ts
|
|
34
34
|
var import_crc322 = require("@aws-crypto/crc32");
|
|
@@ -82,8 +82,7 @@ function negate(bytes) {
|
|
|
82
82
|
}
|
|
83
83
|
for (let i = 7; i > -1; i--) {
|
|
84
84
|
bytes[i]++;
|
|
85
|
-
if (bytes[i] !== 0)
|
|
86
|
-
break;
|
|
85
|
+
if (bytes[i] !== 0) break;
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
88
|
__name(negate, "negate");
|
|
@@ -436,8 +435,7 @@ var SmithyMessageDecoderStream = class {
|
|
|
436
435
|
async *asyncIterator() {
|
|
437
436
|
for await (const message of this.options.messageStream) {
|
|
438
437
|
const deserialized = await this.options.deserializer(message);
|
|
439
|
-
if (deserialized === void 0)
|
|
440
|
-
continue;
|
|
438
|
+
if (deserialized === void 0) continue;
|
|
441
439
|
yield deserialized;
|
|
442
440
|
}
|
|
443
441
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AvailableMessage, AvailableMessages, Message, MessageDecoder, MessageEncoder, MessageHeaders } from "@smithy/types";
|
|
2
|
-
import { Decoder, Encoder } from "@smithy/types";
|
|
1
|
+
import type { AvailableMessage, AvailableMessages, Message, MessageDecoder, MessageEncoder, MessageHeaders } from "@smithy/types";
|
|
2
|
+
import type { Decoder, Encoder } from "@smithy/types";
|
|
3
3
|
/**
|
|
4
4
|
* A Codec that can convert binary-packed event stream messages into
|
|
5
5
|
* JavaScript objects and back again into their binary format.
|
package/dist-types/Int64.d.ts
CHANGED
package/dist-types/Message.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TestVectors } from "./vectorTypes.fixture";
|
|
1
|
+
import type { TestVectors } from "./vectorTypes.fixture";
|
|
2
2
|
export declare const vectors: TestVectors;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/eventstream-codec",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline eventstream-codec",
|
|
@@ -22,14 +22,15 @@
|
|
|
22
22
|
"url": "https://aws.amazon.com/javascript/"
|
|
23
23
|
},
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
|
+
"sideEffects": false,
|
|
25
26
|
"dependencies": {
|
|
26
27
|
"@aws-crypto/crc32": "5.2.0",
|
|
27
|
-
"@smithy/types": "^4.
|
|
28
|
-
"@smithy/util-hex-encoding": "^4.
|
|
28
|
+
"@smithy/types": "^4.4.0",
|
|
29
|
+
"@smithy/util-hex-encoding": "^4.1.0",
|
|
29
30
|
"tslib": "^2.6.2"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
|
-
"@smithy/util-utf8": "^4.
|
|
33
|
+
"@smithy/util-utf8": "^4.1.0",
|
|
33
34
|
"@types/node": "^18.11.9",
|
|
34
35
|
"concurrently": "7.0.0",
|
|
35
36
|
"downlevel-dts": "0.10.1",
|