Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unpack-stream

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unpack-stream - npm Package Compare versions

Comparing version 1.2.0 to 2.0.0-beta.1

19

dist/index.d.ts

@@ -11,9 +11,18 @@ /// <reference types="node" />

export declare type Index = {
[filename: string]: {
type: 'file';
size: number;
integrity: string;
mtime: string;
headers: {
[filename: string]: {
type: 'file';
size: number;
mtime: string;
};
};
integrityPromise: Promise<{
[filename: string]: {
type: 'file';
size: number;
integrity: string;
mtime: string;
};
}>;
};
export declare function local(stream: NodeJS.ReadableStream, dest: string): Promise<{}>;

@@ -47,2 +47,3 @@ "use strict";

const index = {};
const headers = {};
const integrityPromises = [];

@@ -55,2 +56,3 @@ return new Promise((resolve, reject) => {

mapStream(fileStream, header) {
headers[header.name] = header;
integrityPromises.push(ssri.fromStream(fileStream)

@@ -69,5 +71,7 @@ .then((sri) => {

.on('finish', () => {
Promise.all(integrityPromises)
.then(() => resolve(index))
.catch(reject);
resolve({
headers,
integrityPromise: Promise.all(integrityPromises)
.then(() => index)
});
});

@@ -74,0 +78,0 @@ });

{
"name": "unpack-stream",
"version": "1.2.0",
"version": "2.0.0-beta.1",
"description": "Unpack a tarball stream",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc