@zip.js/zip.js
Advanced tools
Comparing version 2.3.17 to 2.3.18
@@ -9,3 +9,3 @@ declare module "@zip.js/zip.js" { | ||
export interface ConfigurationOptions { | ||
interface ConfigurationOptions { | ||
useWebWorkers?: boolean; | ||
@@ -67,3 +67,3 @@ maxWorkers?: number; | ||
export interface HttpOptions extends HttpRangeOptions { | ||
interface HttpOptions extends HttpRangeOptions { | ||
useRangeHeader?: boolean; | ||
@@ -73,3 +73,3 @@ preventHeadRequest?: boolean; | ||
export interface HttpRangeOptions { | ||
interface HttpRangeOptions { | ||
forceRangeRequests?: boolean; | ||
@@ -104,8 +104,12 @@ useXHR?: boolean; | ||
export class ZipReader { | ||
constructor(reader: Reader, options?: ZipReaderOptions | GetEntriesOptions); | ||
getEntries(options?: OnprogressEntryOption | GetEntriesOptions): Promise<Entry[]>; | ||
constructor(reader: Reader, options?: ZipReaderConstructorOptions); | ||
getEntries(options?: ZipReaderGetEntriesOptions): Promise<Entry[]>; | ||
close(): Promise<any>; | ||
} | ||
export interface ZipReaderOptions { | ||
type ZipReaderConstructorOptions = ZipReaderOptions & GetEntriesOptions; | ||
type ZipReaderGetEntriesOptions = EntryOnprogressOption & GetEntriesOptions; | ||
interface ZipReaderOptions { | ||
checkSignature?: boolean; | ||
@@ -117,3 +121,3 @@ password?: string; | ||
export interface GetEntriesOptions { | ||
interface GetEntriesOptions { | ||
filenameEncoding?: string; | ||
@@ -150,13 +154,19 @@ commentEncoding?: string; | ||
externalFileAttribute: number; | ||
getData?(writer: Writer, options?: OnprogressEntryDataOption | ZipReaderOptions): Promise<any>; | ||
getData?(writer: Writer, options?: EntryGetDataOptions): Promise<any>; | ||
} | ||
type EntryGetDataOptions = EntryDataOnprogressOption & ZipReaderOptions; | ||
export class ZipWriter { | ||
readonly hasCorruptedEntries?: boolean; | ||
constructor(writer: Writer, options?: ZipWriterOptions); | ||
public add(name: string, reader: Reader, options?: OnprogressEntryDataOption | AddDataOptions | ZipWriterOptions): Promise<Entry>; | ||
public close(comment?: Uint8Array, options?: OnprogressEntryOption | CloseOptions): Promise<any>; | ||
constructor(writer: Writer, options?: ZipWriterConstructorOptions); | ||
public add(name: string, reader: Reader, options?: ZipWriterAddDataOptions): Promise<Entry>; | ||
public close(comment?: Uint8Array, options?: ZipWriterCloseOptions): Promise<any>; | ||
} | ||
export interface ZipWriterOptions { | ||
type ZipWriterAddDataOptions = EntryDataOnprogressOption & AddDataOptions & ZipWriterConstructorOptions; | ||
type ZipWriterCloseOptions = EntryOnprogressOption & CloseOptions; | ||
interface ZipWriterConstructorOptions { | ||
zip64?: boolean; | ||
@@ -183,3 +193,3 @@ level?: number; | ||
export interface AddDataOptions { | ||
interface AddDataOptions { | ||
directory?: boolean; | ||
@@ -190,11 +200,11 @@ comment?: string; | ||
export interface CloseOptions { | ||
interface CloseOptions { | ||
zip64?: boolean; | ||
} | ||
export interface OnprogressEntryDataOption { | ||
interface EntryDataOnprogressOption { | ||
onprogress?: (progress: number, total: number) => void; | ||
} | ||
export interface OnprogressEntryOption { | ||
interface EntryOnprogressOption { | ||
onprogress?: (progress: number, total: number, entry: Entry) => void; | ||
@@ -218,7 +228,7 @@ } | ||
writer: Writer; | ||
getText(encoding?: string, options?: OnprogressEntryDataOption | ZipReaderOptions): Promise<string>; | ||
getBlob(mimeType?: string, options?: OnprogressEntryDataOption | ZipReaderOptions): Promise<Blob>; | ||
getData64URI(mimeType?: string, options?: OnprogressEntryDataOption | ZipReaderOptions): Promise<string>; | ||
getUint8Array(options?: OnprogressEntryDataOption | ZipReaderOptions): Promise<Uint8Array>; | ||
getData(writer: Writer, options?: OnprogressEntryDataOption | ZipReaderOptions): Promise<any>; | ||
getText(encoding?: string, options?: EntryGetDataOptions): Promise<string>; | ||
getBlob(mimeType?: string, options?: EntryGetDataOptions): Promise<Blob>; | ||
getData64URI(mimeType?: string, options?: EntryGetDataOptions): Promise<string>; | ||
getUint8Array(options?: EntryGetDataOptions): Promise<Uint8Array>; | ||
getData(writer: Writer, options?: EntryGetDataOptions): Promise<any>; | ||
replaceBlob(blob: Blob): void; | ||
@@ -243,10 +253,15 @@ replaceText(text: String): void; | ||
addFileSystemEntry(fileSystemEntry: FileSystemEntry): Promise<ZipEntry>; | ||
importBlob(blob: Blob, options?: ZipReaderOptions | GetEntriesOptions): Promise<void>; | ||
importData64URI(dataURI: string, options?: ZipReaderOptions | GetEntriesOptions): Promise<void>; | ||
importUint8Array(array: Uint8Array, options?: ZipReaderOptions | GetEntriesOptions): Promise<void>; | ||
importHttpContent(url: string, options?: ZipReaderOptions | GetEntriesOptions | HttpOptions): Promise<void>; | ||
exportBlob(options?: ZipWriterOptions | ExportOptions): Promise<Blob>; | ||
exportData64URI(options?: ZipWriterOptions | ExportOptions): Promise<string>; | ||
exportUint8Array(options?: ZipWriterOptions | ExportOptions): Promise<Uint8Array>; | ||
importBlob(blob: Blob, options?: ZipReaderConstructorOptions): Promise<void>; | ||
importData64URI(dataURI: string, options?: ZipReaderConstructorOptions): Promise<void>; | ||
importUint8Array(array: Uint8Array, options?: ZipReaderConstructorOptions): Promise<void>; | ||
importHttpContent(url: string, options?: ZipDirectoryEntryImportHttpOptions): Promise<void>; | ||
exportBlob(options?: ZipDirectoryEntryExportOptions): Promise<Blob>; | ||
exportData64URI(options?: ZipDirectoryEntryExportOptions): Promise<string>; | ||
exportUint8Array(options?: ZipDirectoryEntryExportOptions): Promise<Uint8Array>; | ||
} | ||
type ZipDirectoryEntryImportHttpOptions = ZipReaderConstructorOptions & HttpOptions; | ||
type ZipDirectoryEntryExportOptions = EntryDataOnprogressOption & ExportOptions & ZipWriterConstructorOptions; | ||
export interface FS extends ZipDirectoryEntry { | ||
@@ -253,0 +268,0 @@ root: ZipDirectoryEntry; |
@@ -6,3 +6,3 @@ { | ||
"license": "BSD-3-Clause", | ||
"version": "2.3.17", | ||
"version": "2.3.18", | ||
"type": "module", | ||
@@ -9,0 +9,0 @@ "keywords": [ |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
2416824
38367
30