🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@smithy/core

Package Overview
Dependencies
Maintainers
2
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/core - npm Package Compare versions

Comparing version
3.29.4
to
3.29.5
+11
-1
dist-cjs/submodules/serde/index.js

@@ -1009,2 +1009,3 @@ const { createHmac, createHash, getRandomValues } = require("node:crypto");

this.source.on("error", this.onSourceError);
this.source.on("close", this.onSourceClose);
this.source.pause();

@@ -1049,6 +1050,15 @@ }

};
_read(size) {
onSourceClose = () => {
if (!this.destroyed && !this.source.readableEnded) {
this.destroy(new Error("Connection lost or stream closed before all data was received."));
}
};
_read(_size) {
this.source.resume();
}
_destroy(error, callback) {
this.source?.removeListener("data", this.onSourceData);
this.source?.removeListener("end", this.onSourceEnd);
this.source?.removeListener("error", this.onSourceError);
this.source?.removeListener("close", this.onSourceClose);
this.source?.destroy();

@@ -1055,0 +1065,0 @@ callback(error);

@@ -22,2 +22,3 @@ import { Readable } from "node:stream";

this.source.on("error", this.onSourceError);
this.source.on("close", this.onSourceClose);
this.source.pause();

@@ -62,6 +63,15 @@ }

};
_read(size) {
onSourceClose = () => {
if (!this.destroyed && !this.source.readableEnded) {
this.destroy(new Error("Connection lost or stream closed before all data was received."));
}
};
_read(_size) {
this.source.resume();
}
_destroy(error, callback) {
this.source?.removeListener("data", this.onSourceData);
this.source?.removeListener("end", this.onSourceEnd);
this.source?.removeListener("error", this.onSourceError);
this.source?.removeListener("close", this.onSourceClose);
this.source?.destroy();

@@ -68,0 +78,0 @@ callback(error);

+9
-4

@@ -43,7 +43,7 @@ import { Readable } from "node:stream";

export declare class ChecksumStream extends Readable {
private expectedChecksum;
private checksumSourceLocation;
private readonly expectedChecksum;
private readonly checksumSourceLocation;
private checksum;
private source;
private base64Encoder;
private readonly base64Encoder;
constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }: ChecksumStreamInit<Readable>);

@@ -64,2 +64,7 @@ /**

/**
* If the source stream closes without having ended,
* this is considered an error.
*/
private onSourceClose;
/**
* Resume the source so it flows at the rate this stream is consumed.

@@ -69,3 +74,3 @@ * Do not call this directly.

*/
_read(size: number): void;
_read(_size: number): void;
/**

@@ -72,0 +77,0 @@ * Destroy the upstream source for cleanup so it is not left dangling, then

@@ -43,7 +43,7 @@ import { Readable } from "node:stream";

export declare class ChecksumStream extends Readable {
private expectedChecksum;
private checksumSourceLocation;
private readonly expectedChecksum;
private readonly checksumSourceLocation;
private checksum;
private source;
private base64Encoder;
private readonly base64Encoder;
constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }: ChecksumStreamInit<Readable>);

@@ -64,2 +64,7 @@ /**

/**
* If the source stream closes without having ended,
* this is considered an error.
*/
private onSourceClose;
/**
* Resume the source so it flows at the rate this stream is consumed.

@@ -69,3 +74,3 @@ * Do not call this directly.

*/
_read(size: number): void;
_read(_size: number): void;
/**

@@ -72,0 +77,0 @@ * Destroy the upstream source for cleanup so it is not left dangling, then

{
"name": "@smithy/core",
"version": "3.29.4",
"version": "3.29.5",
"scripts": {

@@ -5,0 +5,0 @@ "benchmark:cbor": "node ./scripts/cbor-perf.mjs",