提交 c2e8b28a 编写于 作者: S Sandeep Somavarapu

#83421 Remove yazl and yauzl typings

上级 e5719685
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'yauzl' {
import { EventEmitter } from 'events';
import { Readable } from 'stream';
export class Entry {
fileName: string;
extraFields: { id: number; data: Buffer; }[];
comment: string;
versionMadeBy: number;
versionNeededToExtract: number;
generalPurposeBitFlag: number;
compressionMethod: number;
lastModFileTime: number;
lastModFileDate: number;
crc32: number;
compressedSize: number;
uncompressedSize: number;
fileNameLength: number;
extraFieldLength: number;
fileCommentLength: number;
internalFileAttributes: number;
externalFileAttributes: number;
relativeOffsetOfLocalHeader: number;
getLastModDate(): Date;
}
export class ZipFile extends EventEmitter {
readEntry(): void;
openReadStream(entry: Entry, callback: (err?: Error, stream?: Readable) => void): void;
close(): void;
isOpen: boolean;
entryCount: number;
comment: string;
}
export interface IOptions {
autoClose?: boolean;
lazyEntries?: boolean;
}
export function open(path: string, callback: (err?: Error, zipfile?: ZipFile) => void): void;
export function open(path: string, options: IOptions | undefined, callback: (err?: Error, zipfile?: ZipFile) => void): void;
}
\ No newline at end of file
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'yazl' {
import * as stream from 'stream';
class ZipFile {
outputStream: stream.Stream;
addBuffer(buffer: Buffer, path: string): void;
addFile(localPath: string, path: string): void;
end(): void;
}
}
\ No newline at end of file
......@@ -163,7 +163,7 @@ function extractZip(zipfile: ZipFile, targetPath: string, options: IOptions, tok
function openZip(zipFile: string, lazy: boolean = false): Promise<ZipFile> {
return new Promise((resolve, reject) => {
_openZip(zipFile, lazy ? { lazyEntries: true } : undefined, (error?: Error, zipfile?: ZipFile) => {
_openZip(zipFile, lazy ? { lazyEntries: true } : undefined!, (error?: Error, zipfile?: ZipFile) => {
if (error) {
reject(toExtractError(error));
} else {
......
......@@ -195,6 +195,20 @@
resolved "https://registry.yarnpkg.com/@types/winreg/-/winreg-1.2.30.tgz#91d6710e536d345b9c9b017c574cf6a8da64c518"
integrity sha1-kdZxDlNtNFucmwF8V0z2qNpkxRg=
"@types/yauzl@^2.9.1":
version "2.9.1"
resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.1.tgz#d10f69f9f522eef3cf98e30afb684a1e1ec923af"
integrity sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA==
dependencies:
"@types/node" "*"
"@types/yazl@^2.4.2":
version "2.4.2"
resolved "https://registry.yarnpkg.com/@types/yazl/-/yazl-2.4.2.tgz#d5f8a4752261badbf1a36e8b49e042dc18ec84bc"
integrity sha512-T+9JH8O2guEjXNxqmybzQ92mJUh2oCwDDMSSimZSe1P+pceZiFROZLYmcbqkzV5EUwz6VwcKXCO2S2yUpra6XQ==
dependencies:
"@types/node" "*"
"@webassemblyjs/ast@1.5.13":
version "1.5.13"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.5.13.tgz#81155a570bd5803a30ec31436bc2c9c0ede38f25"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册