@smithy/eventstream-codec 3.1.10 → 4.0.1
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 +28 -21
- package/package.json +8 -5
package/dist-cjs/index.js
CHANGED
|
@@ -38,13 +38,16 @@ var import_crc322 = require("@aws-crypto/crc32");
|
|
|
38
38
|
|
|
39
39
|
// src/Int64.ts
|
|
40
40
|
var import_util_hex_encoding = require("@smithy/util-hex-encoding");
|
|
41
|
-
var
|
|
41
|
+
var Int64 = class _Int64 {
|
|
42
42
|
constructor(bytes) {
|
|
43
43
|
this.bytes = bytes;
|
|
44
44
|
if (bytes.byteLength !== 8) {
|
|
45
45
|
throw new Error("Int64 buffers must be exactly 8 bytes");
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
+
static {
|
|
49
|
+
__name(this, "Int64");
|
|
50
|
+
}
|
|
48
51
|
static fromNumber(number) {
|
|
49
52
|
if (number > 9223372036854776e3 || number < -9223372036854776e3) {
|
|
50
53
|
throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
|
|
@@ -73,8 +76,6 @@ var _Int64 = class _Int64 {
|
|
|
73
76
|
return String(this.valueOf());
|
|
74
77
|
}
|
|
75
78
|
};
|
|
76
|
-
__name(_Int64, "Int64");
|
|
77
|
-
var Int64 = _Int64;
|
|
78
79
|
function negate(bytes) {
|
|
79
80
|
for (let i = 0; i < 8; i++) {
|
|
80
81
|
bytes[i] ^= 255;
|
|
@@ -88,11 +89,14 @@ function negate(bytes) {
|
|
|
88
89
|
__name(negate, "negate");
|
|
89
90
|
|
|
90
91
|
// src/HeaderMarshaller.ts
|
|
91
|
-
var
|
|
92
|
+
var HeaderMarshaller = class {
|
|
92
93
|
constructor(toUtf8, fromUtf8) {
|
|
93
94
|
this.toUtf8 = toUtf8;
|
|
94
95
|
this.fromUtf8 = fromUtf8;
|
|
95
96
|
}
|
|
97
|
+
static {
|
|
98
|
+
__name(this, "HeaderMarshaller");
|
|
99
|
+
}
|
|
96
100
|
format(headers) {
|
|
97
101
|
const chunks = [];
|
|
98
102
|
for (const headerName of Object.keys(headers)) {
|
|
@@ -247,8 +251,6 @@ var _HeaderMarshaller = class _HeaderMarshaller {
|
|
|
247
251
|
return out;
|
|
248
252
|
}
|
|
249
253
|
};
|
|
250
|
-
__name(_HeaderMarshaller, "HeaderMarshaller");
|
|
251
|
-
var HeaderMarshaller = _HeaderMarshaller;
|
|
252
254
|
var BOOLEAN_TAG = "boolean";
|
|
253
255
|
var BYTE_TAG = "byte";
|
|
254
256
|
var SHORT_TAG = "short";
|
|
@@ -304,7 +306,10 @@ function splitMessage({ byteLength, byteOffset, buffer }) {
|
|
|
304
306
|
__name(splitMessage, "splitMessage");
|
|
305
307
|
|
|
306
308
|
// src/EventStreamCodec.ts
|
|
307
|
-
var
|
|
309
|
+
var EventStreamCodec = class {
|
|
310
|
+
static {
|
|
311
|
+
__name(this, "EventStreamCodec");
|
|
312
|
+
}
|
|
308
313
|
constructor(toUtf8, fromUtf8) {
|
|
309
314
|
this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);
|
|
310
315
|
this.messageBuffer = [];
|
|
@@ -375,14 +380,15 @@ var _EventStreamCodec = class _EventStreamCodec {
|
|
|
375
380
|
return this.headerMarshaller.format(rawHeaders);
|
|
376
381
|
}
|
|
377
382
|
};
|
|
378
|
-
__name(_EventStreamCodec, "EventStreamCodec");
|
|
379
|
-
var EventStreamCodec = _EventStreamCodec;
|
|
380
383
|
|
|
381
384
|
// src/MessageDecoderStream.ts
|
|
382
|
-
var
|
|
385
|
+
var MessageDecoderStream = class {
|
|
383
386
|
constructor(options) {
|
|
384
387
|
this.options = options;
|
|
385
388
|
}
|
|
389
|
+
static {
|
|
390
|
+
__name(this, "MessageDecoderStream");
|
|
391
|
+
}
|
|
386
392
|
[Symbol.asyncIterator]() {
|
|
387
393
|
return this.asyncIterator();
|
|
388
394
|
}
|
|
@@ -393,14 +399,15 @@ var _MessageDecoderStream = class _MessageDecoderStream {
|
|
|
393
399
|
}
|
|
394
400
|
}
|
|
395
401
|
};
|
|
396
|
-
__name(_MessageDecoderStream, "MessageDecoderStream");
|
|
397
|
-
var MessageDecoderStream = _MessageDecoderStream;
|
|
398
402
|
|
|
399
403
|
// src/MessageEncoderStream.ts
|
|
400
|
-
var
|
|
404
|
+
var MessageEncoderStream = class {
|
|
401
405
|
constructor(options) {
|
|
402
406
|
this.options = options;
|
|
403
407
|
}
|
|
408
|
+
static {
|
|
409
|
+
__name(this, "MessageEncoderStream");
|
|
410
|
+
}
|
|
404
411
|
[Symbol.asyncIterator]() {
|
|
405
412
|
return this.asyncIterator();
|
|
406
413
|
}
|
|
@@ -414,14 +421,15 @@ var _MessageEncoderStream = class _MessageEncoderStream {
|
|
|
414
421
|
}
|
|
415
422
|
}
|
|
416
423
|
};
|
|
417
|
-
__name(_MessageEncoderStream, "MessageEncoderStream");
|
|
418
|
-
var MessageEncoderStream = _MessageEncoderStream;
|
|
419
424
|
|
|
420
425
|
// src/SmithyMessageDecoderStream.ts
|
|
421
|
-
var
|
|
426
|
+
var SmithyMessageDecoderStream = class {
|
|
422
427
|
constructor(options) {
|
|
423
428
|
this.options = options;
|
|
424
429
|
}
|
|
430
|
+
static {
|
|
431
|
+
__name(this, "SmithyMessageDecoderStream");
|
|
432
|
+
}
|
|
425
433
|
[Symbol.asyncIterator]() {
|
|
426
434
|
return this.asyncIterator();
|
|
427
435
|
}
|
|
@@ -434,14 +442,15 @@ var _SmithyMessageDecoderStream = class _SmithyMessageDecoderStream {
|
|
|
434
442
|
}
|
|
435
443
|
}
|
|
436
444
|
};
|
|
437
|
-
__name(_SmithyMessageDecoderStream, "SmithyMessageDecoderStream");
|
|
438
|
-
var SmithyMessageDecoderStream = _SmithyMessageDecoderStream;
|
|
439
445
|
|
|
440
446
|
// src/SmithyMessageEncoderStream.ts
|
|
441
|
-
var
|
|
447
|
+
var SmithyMessageEncoderStream = class {
|
|
442
448
|
constructor(options) {
|
|
443
449
|
this.options = options;
|
|
444
450
|
}
|
|
451
|
+
static {
|
|
452
|
+
__name(this, "SmithyMessageEncoderStream");
|
|
453
|
+
}
|
|
445
454
|
[Symbol.asyncIterator]() {
|
|
446
455
|
return this.asyncIterator();
|
|
447
456
|
}
|
|
@@ -452,8 +461,6 @@ var _SmithyMessageEncoderStream = class _SmithyMessageEncoderStream {
|
|
|
452
461
|
}
|
|
453
462
|
}
|
|
454
463
|
};
|
|
455
|
-
__name(_SmithyMessageEncoderStream, "SmithyMessageEncoderStream");
|
|
456
|
-
var SmithyMessageEncoderStream = _SmithyMessageEncoderStream;
|
|
457
464
|
// Annotate the CommonJS export names for ESM import in node:
|
|
458
465
|
|
|
459
466
|
0 && (module.exports = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/eventstream-codec",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
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",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@aws-crypto/crc32": "5.2.0",
|
|
27
|
-
"@smithy/types": "^
|
|
28
|
-
"@smithy/util-hex-encoding": "^
|
|
27
|
+
"@smithy/types": "^4.1.0",
|
|
28
|
+
"@smithy/util-hex-encoding": "^4.0.0",
|
|
29
29
|
"tslib": "^2.6.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@smithy/util-utf8": "^
|
|
33
|
-
"@types/node": "^
|
|
32
|
+
"@smithy/util-utf8": "^4.0.0",
|
|
33
|
+
"@types/node": "^18.11.9",
|
|
34
34
|
"concurrently": "7.0.0",
|
|
35
35
|
"downlevel-dts": "0.10.1",
|
|
36
36
|
"rimraf": "3.0.2",
|
|
@@ -57,5 +57,8 @@
|
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"directory": ".release/package"
|
|
60
|
+
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=18.0.0"
|
|
60
63
|
}
|
|
61
64
|
}
|