mirror of
https://github.com/github/codeql-action.git
synced 2025-12-26 09:10:07 +08:00
Raise file limit in debug artifacts by using zip64
This commit is contained in:
15
node_modules/@types/adm-zip/README.md
generated
vendored
15
node_modules/@types/adm-zip/README.md
generated
vendored
@@ -1,15 +0,0 @@
|
||||
# Installation
|
||||
> `npm install --save @types/adm-zip`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for adm-zip (https://github.com/cthackers/adm-zip).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/adm-zip.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Thu, 28 Nov 2024 16:02:52 GMT
|
||||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [John Vilk](https://github.com/jvilk), [Abner Oliveira](https://github.com/abner), [BendingBender](https://github.com/BendingBender), and [Lei Nelissen](https://github.com/LeiNelissen).
|
||||
368
node_modules/@types/adm-zip/index.d.ts
generated
vendored
368
node_modules/@types/adm-zip/index.d.ts
generated
vendored
@@ -1,368 +0,0 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import * as FS from "fs";
|
||||
import { Constants } from "./util";
|
||||
|
||||
declare class AdmZip {
|
||||
/**
|
||||
* @param fileNameOrRawData If provided, reads an existing archive. Otherwise creates a new, empty archive.
|
||||
* @param options Options when initializing the ZIP file
|
||||
*/
|
||||
constructor(fileNameOrRawData?: string | Buffer, options?: Partial<AdmZip.InitOptions>);
|
||||
/**
|
||||
* Extracts the given entry from the archive and returns the content as a Buffer object
|
||||
* @param entry ZipEntry object or String with the full path of the entry
|
||||
* @param pass Password used for decrypting the file
|
||||
* @return Buffer or Null in case of error
|
||||
*/
|
||||
readFile(entry: string | AdmZip.IZipEntry, pass?: string | Buffer): Buffer | null;
|
||||
/**
|
||||
* Asynchronous `readFile`.
|
||||
* @param entry The full path of the entry or a `IZipEntry` object.
|
||||
* @param callback Called with a `Buffer` or `null` in case of error.
|
||||
*/
|
||||
readFileAsync(entry: string | AdmZip.IZipEntry, callback: (data: Buffer | null, err: string) => void): void;
|
||||
/**
|
||||
* Extracts the given entry from the archive and returns the content as
|
||||
* plain text in the given encoding.
|
||||
* @param entry The full path of the entry or a `IZipEntry` object.
|
||||
* @param encoding If no encoding is specified `"utf8"` is used.
|
||||
*/
|
||||
readAsText(fileName: string | AdmZip.IZipEntry, encoding?: string): string;
|
||||
/**
|
||||
* Asynchronous `readAsText`.
|
||||
* @param entry The full path of the entry or a `IZipEntry` object.
|
||||
* @param callback Called with the resulting string.
|
||||
* @param encoding If no encoding is specified `"utf8"` is used.
|
||||
*/
|
||||
readAsTextAsync(
|
||||
fileName: string | AdmZip.IZipEntry,
|
||||
callback: (data: string, err: string) => void,
|
||||
encoding?: string,
|
||||
): void;
|
||||
/**
|
||||
* Remove the entry from the file or the entry and all its nested directories
|
||||
* and files if the given entry is a directory.
|
||||
* @param entry The full path of the entry or a `IZipEntry` object.
|
||||
*/
|
||||
deleteFile(entry: string | AdmZip.IZipEntry): void;
|
||||
/**
|
||||
* Adds a comment to the zip. The zip must be rewritten after
|
||||
* adding the comment.
|
||||
* @param comment Content of the comment.
|
||||
*/
|
||||
addZipComment(comment: string): void;
|
||||
/**
|
||||
* @return The zip comment.
|
||||
*/
|
||||
getZipComment(): string;
|
||||
/**
|
||||
* Adds a comment to a specified file or `IZipEntry`. The zip must be rewritten after
|
||||
* adding the comment.
|
||||
* The comment cannot exceed 65535 characters in length.
|
||||
* @param entry The full path of the entry or a `IZipEntry` object.
|
||||
* @param comment The comment to add to the entry.
|
||||
*/
|
||||
addZipEntryComment(entry: string | AdmZip.IZipEntry, comment: string): void;
|
||||
/**
|
||||
* Returns the comment of the specified entry.
|
||||
* @param entry The full path of the entry or a `IZipEntry` object.
|
||||
* @return The comment of the specified entry.
|
||||
*/
|
||||
getZipEntryComment(entry: string | AdmZip.IZipEntry): string;
|
||||
/**
|
||||
* Updates the content of an existing entry inside the archive. The zip
|
||||
* must be rewritten after updating the content.
|
||||
* @param entry The full path of the entry or a `IZipEntry` object.
|
||||
* @param content The entry's new contents.
|
||||
*/
|
||||
updateFile(entry: string | AdmZip.IZipEntry, content: Buffer): void;
|
||||
/**
|
||||
* Adds a file from the disk to the archive.
|
||||
* @param localPath Path to a file on disk.
|
||||
* @param zipPath Path to a directory in the archive. Defaults to the empty
|
||||
* string.
|
||||
* @param zipName Name for the file.
|
||||
* @param comment Comment to be attached to the file
|
||||
*/
|
||||
addLocalFile(localPath: string, zipPath?: string, zipName?: string, comment?: string): void;
|
||||
/**
|
||||
* Adds a local directory and all its nested files and directories to the
|
||||
* archive.
|
||||
* @param localPath Path to a folder on disk.
|
||||
* @param zipPath Path to a folder in the archive. Default: `""`.
|
||||
* @param filter RegExp or Function if files match will be included.
|
||||
*/
|
||||
addLocalFolder(localPath: string, zipPath?: string, filter?: RegExp | ((filename: string) => boolean)): void;
|
||||
/**
|
||||
* Asynchronous addLocalFile
|
||||
* @param localPath
|
||||
* @param callback
|
||||
* @param zipPath optional path inside zip
|
||||
* @param filter optional RegExp or Function if files match will
|
||||
* be included.
|
||||
*/
|
||||
addLocalFolderAsync(
|
||||
localPath: string,
|
||||
callback: (success?: boolean, err?: string) => void,
|
||||
zipPath?: string,
|
||||
filter?: RegExp | ((filename: string) => boolean),
|
||||
): void;
|
||||
/**
|
||||
* @param localPath - path where files will be extracted
|
||||
* @param props - optional properties
|
||||
* @param props.zipPath - optional path inside zip
|
||||
* @param props.filter - RegExp or Function if files match will be included.
|
||||
*/
|
||||
addLocalFolderPromise(
|
||||
localPath: string,
|
||||
props: { zipPath?: string; filter?: RegExp | ((filename: string) => boolean) },
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Allows you to create a entry (file or directory) in the zip file.
|
||||
* If you want to create a directory the `entryName` must end in `"/"` and a `null`
|
||||
* buffer should be provided.
|
||||
* @param entryName Entry path.
|
||||
* @param content Content to add to the entry; must be a 0-length buffer
|
||||
* for a directory.
|
||||
* @param comment Comment to add to the entry.
|
||||
* @param attr Attribute to add to the entry.
|
||||
* @return The entry corresponding to one which was just added.
|
||||
*/
|
||||
addFile(entryName: string, content: Buffer, comment?: string, attr?: number): AdmZip.IZipEntry;
|
||||
/**
|
||||
* Returns an array of `IZipEntry` objects representing the files and folders
|
||||
* inside the archive.
|
||||
*/
|
||||
getEntries(): AdmZip.IZipEntry[];
|
||||
/**
|
||||
* Returns a `IZipEntry` object representing the file or folder specified by `name`.
|
||||
* @param name Name of the file or folder to retrieve.
|
||||
* @return The entry corresponding to the `name`.
|
||||
*/
|
||||
getEntry(name: string): AdmZip.IZipEntry | null;
|
||||
/**
|
||||
* Returns the number of entries in the ZIP
|
||||
* @return The amount of entries in the ZIP
|
||||
*/
|
||||
getEntryCount(): number;
|
||||
/**
|
||||
* Loop through each entry in the ZIP
|
||||
* @param callback The callback that receives each individual entry
|
||||
*/
|
||||
forEach(callback: (entry: AdmZip.IZipEntry) => void): void;
|
||||
/**
|
||||
* Extracts the given entry to the given `targetPath`.
|
||||
* If the entry is a directory inside the archive, the entire directory and
|
||||
* its subdirectories will be extracted.
|
||||
* @param entry The full path of the entry or a `IZipEntry` object.
|
||||
* @param targetPath Target folder where to write the file.
|
||||
* @param maintainEntryPath If maintainEntryPath is `true` and the entry is
|
||||
* inside a folder, the entry folder will be created in `targetPath` as
|
||||
* well. Default: `true`.
|
||||
* @param overwrite If the file already exists at the target path, the file
|
||||
* will be overwriten if this is `true`. Default: `false`.
|
||||
* @param keepOriginalPermission The file will be set as the permission from
|
||||
* the entry if this is true. Default: `false`.
|
||||
* @param outFileName String If set will override the filename of the
|
||||
* extracted file (Only works if the entry is a file)
|
||||
* @return Boolean
|
||||
*/
|
||||
extractEntryTo(
|
||||
entryPath: string | AdmZip.IZipEntry,
|
||||
targetPath: string,
|
||||
maintainEntryPath?: boolean,
|
||||
overwrite?: boolean,
|
||||
keepOriginalPermission?: boolean,
|
||||
outFileName?: string,
|
||||
): boolean;
|
||||
/**
|
||||
* Test the archive
|
||||
* @param password The password for the archive
|
||||
*/
|
||||
test(password?: string | Buffer): boolean;
|
||||
/**
|
||||
* Extracts the entire archive to the given location.
|
||||
* @param targetPath Target location.
|
||||
* @param overwrite If the file already exists at the target path, the file
|
||||
* will be overwriten if this is `true`. Default: `false`.
|
||||
* @param keepOriginalPermission The file will be set as the permission from
|
||||
* the entry if this is true. Default: `false`.
|
||||
* @param password The password for the archive
|
||||
*/
|
||||
extractAllTo(
|
||||
targetPath: string,
|
||||
overwrite?: boolean,
|
||||
keepOriginalPermission?: boolean,
|
||||
password?: string | Buffer,
|
||||
): void;
|
||||
/**
|
||||
* Extracts the entire archive to the given location.
|
||||
* @param targetPath Target location.
|
||||
* @param overwrite If the file already exists at the target path, the file
|
||||
* will be overwriten if this is `true`. Default: `false`.
|
||||
* @param keepOriginalPermission The file will be set as the permission from
|
||||
* the entry if this is true. Default: `false`.
|
||||
* @param callback The callback function will be called after extraction.
|
||||
*/
|
||||
extractAllToAsync(
|
||||
targetPath: string,
|
||||
overwrite?: boolean,
|
||||
keepOriginalPermission?: boolean,
|
||||
callback?: (error?: Error) => void,
|
||||
): void;
|
||||
/**
|
||||
* Writes the newly created zip file to disk at the specified location or
|
||||
* if a zip was opened and no `targetFileName` is provided, it will
|
||||
* overwrite the opened zip.
|
||||
*/
|
||||
writeZip(targetFileName?: string, callback?: (error: Error | null) => void): void;
|
||||
/**
|
||||
* Writes the newly created zip file to disk at the specified location or
|
||||
* if a zip was opened and no `targetFileName` is provided, it will
|
||||
* overwrite the opened zip.
|
||||
*/
|
||||
writeZipPromise(targetFileName?: string, props?: { overwrite?: boolean; perm?: number }): Promise<boolean>;
|
||||
/**
|
||||
* Returns the content of the entire zip file.
|
||||
*/
|
||||
toBuffer(): Buffer;
|
||||
/**
|
||||
* Asynchronously returns the content of the entire zip file.
|
||||
* @param onSuccess called with the content of the zip file, once it has been generated.
|
||||
* @param onFail unused.
|
||||
* @param onItemStart called before an entry is compressed.
|
||||
* @param onItemEnd called after an entry is compressed.
|
||||
*/
|
||||
toBuffer(
|
||||
onSuccess: (buffer: Buffer) => void,
|
||||
onFail?: (...args: any[]) => void,
|
||||
onItemStart?: (name: string) => void,
|
||||
onItemEnd?: (name: string) => void,
|
||||
): void;
|
||||
/**
|
||||
* Asynchronously convert the promise to a Buffer
|
||||
*/
|
||||
toBufferPromise(): Promise<Buffer>;
|
||||
}
|
||||
|
||||
declare namespace AdmZip {
|
||||
/**
|
||||
* The `IZipEntry` is more than a structure representing the entry inside the
|
||||
* zip file. Beside the normal attributes and headers a entry can have, the
|
||||
* class contains a reference to the part of the file where the compressed
|
||||
* data resides and decompresses it when requested. It also compresses the
|
||||
* data and creates the headers required to write in the zip file.
|
||||
*/
|
||||
// disable warning about the I-prefix in interface name to prevent breaking stuff for users without a major bump
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
interface IZipEntry {
|
||||
/**
|
||||
* Represents the full name and path of the file
|
||||
*/
|
||||
entryName: string;
|
||||
readonly rawEntryName: Buffer;
|
||||
/**
|
||||
* Extra data associated with this entry.
|
||||
*/
|
||||
extra: Buffer;
|
||||
/**
|
||||
* Entry comment.
|
||||
*/
|
||||
comment: string;
|
||||
readonly name: string;
|
||||
/**
|
||||
* Read-Only property that indicates the type of the entry.
|
||||
*/
|
||||
readonly isDirectory: boolean;
|
||||
/**
|
||||
* Get the header associated with this ZipEntry.
|
||||
*/
|
||||
readonly header: EntryHeader;
|
||||
attr: number;
|
||||
/**
|
||||
* Retrieve the compressed data for this entry. Note that this may trigger
|
||||
* compression if any properties were modified.
|
||||
*/
|
||||
getCompressedData(): Buffer;
|
||||
/**
|
||||
* Asynchronously retrieve the compressed data for this entry. Note that
|
||||
* this may trigger compression if any properties were modified.
|
||||
*/
|
||||
getCompressedDataAsync(callback: (data: Buffer) => void): void;
|
||||
/**
|
||||
* Set the (uncompressed) data to be associated with this entry.
|
||||
*/
|
||||
setData(value: string | Buffer): void;
|
||||
/**
|
||||
* Get the decompressed data associated with this entry.
|
||||
*/
|
||||
getData(): Buffer;
|
||||
/**
|
||||
* Asynchronously get the decompressed data associated with this entry.
|
||||
*/
|
||||
getDataAsync(callback: (data: Buffer, err: string) => void): void;
|
||||
/**
|
||||
* Returns the CEN Entry Header to be written to the output zip file, plus
|
||||
* the extra data and the entry comment.
|
||||
*/
|
||||
packHeader(): Buffer;
|
||||
/**
|
||||
* Returns a nicely formatted string with the most important properties of
|
||||
* the ZipEntry.
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
interface EntryHeader {
|
||||
made: number;
|
||||
version: number;
|
||||
flags: number;
|
||||
method: number;
|
||||
time: Date;
|
||||
crc: number;
|
||||
compressedSize: number;
|
||||
size: number;
|
||||
fileNameLength: number;
|
||||
extraLength: number;
|
||||
commentLength: number;
|
||||
diskNumStart: number;
|
||||
inAttr: number;
|
||||
attr: number;
|
||||
offset: number;
|
||||
readonly encripted: boolean;
|
||||
readonly entryHeaderSize: number;
|
||||
readonly realDataOffset: number;
|
||||
readonly dataHeader: DataHeader;
|
||||
loadDataHeaderFromBinary(data: Buffer): void;
|
||||
loadFromBinary(data: Buffer): void;
|
||||
dataHeaderToBinary(): Buffer;
|
||||
entryHeaderToBinary(): Buffer;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
interface DataHeader {
|
||||
version: number;
|
||||
flags: number;
|
||||
method: number;
|
||||
time: number;
|
||||
crc: number;
|
||||
compressedSize: number;
|
||||
size: number;
|
||||
fnameLen: number;
|
||||
extraLen: number;
|
||||
}
|
||||
|
||||
interface InitOptions {
|
||||
/* If true it disables files sorting */
|
||||
noSort: boolean;
|
||||
/* Read entries during load (initial loading may be slower) */
|
||||
readEntries: boolean;
|
||||
/* Read method */
|
||||
method: (typeof Constants)[keyof typeof Constants] | number;
|
||||
/* file system */
|
||||
fs: null | typeof FS;
|
||||
}
|
||||
}
|
||||
|
||||
export = AdmZip;
|
||||
43
node_modules/@types/adm-zip/package.json
generated
vendored
43
node_modules/@types/adm-zip/package.json
generated
vendored
@@ -1,43 +0,0 @@
|
||||
{
|
||||
"name": "@types/adm-zip",
|
||||
"version": "0.5.7",
|
||||
"description": "TypeScript definitions for adm-zip",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/adm-zip",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "John Vilk",
|
||||
"githubUsername": "jvilk",
|
||||
"url": "https://github.com/jvilk"
|
||||
},
|
||||
{
|
||||
"name": "Abner Oliveira",
|
||||
"githubUsername": "abner",
|
||||
"url": "https://github.com/abner"
|
||||
},
|
||||
{
|
||||
"name": "BendingBender",
|
||||
"githubUsername": "BendingBender",
|
||||
"url": "https://github.com/BendingBender"
|
||||
},
|
||||
{
|
||||
"name": "Lei Nelissen",
|
||||
"githubUsername": "LeiNelissen",
|
||||
"url": "https://github.com/LeiNelissen"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/adm-zip"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "2b7ccefc1df4e05662e7d47904e27f4af394ff59c9d5f8b3ea47f579e5146bba",
|
||||
"typeScriptVersion": "5.0"
|
||||
}
|
||||
178
node_modules/@types/adm-zip/util.d.ts
generated
vendored
178
node_modules/@types/adm-zip/util.d.ts
generated
vendored
@@ -1,178 +0,0 @@
|
||||
export const Constants: {
|
||||
/* The local file header */
|
||||
LOCHDR: 30; // LOC header size
|
||||
LOCSIG: 0x04034b50; // "PK\003\004"
|
||||
LOCVER: 4; // version needed to extract
|
||||
LOCFLG: 6; // general purpose bit flag
|
||||
LOCHOW: 8; // compression method
|
||||
LOCTIM: 10; // modification time (2 bytes time, 2 bytes date)
|
||||
LOCCRC: 14; // uncompressed file crc-32 value
|
||||
LOCSIZ: 18; // compressed size
|
||||
LOCLEN: 22; // uncompressed size
|
||||
LOCNAM: 26; // filename length
|
||||
LOCEXT: 28; // extra field length
|
||||
|
||||
/* The Data descriptor */
|
||||
EXTSIG: 0x08074b50; // "PK\007\008"
|
||||
EXTHDR: 16; // EXT header size
|
||||
EXTCRC: 4; // uncompressed file crc-32 value
|
||||
EXTSIZ: 8; // compressed size
|
||||
EXTLEN: 12; // uncompressed size
|
||||
|
||||
/* The central directory file header */
|
||||
CENHDR: 46; // CEN header size
|
||||
CENSIG: 0x02014b50; // "PK\001\002"
|
||||
CENVEM: 4; // version made by
|
||||
CENVER: 6; // version needed to extract
|
||||
CENFLG: 8; // encrypt, decrypt flags
|
||||
CENHOW: 10; // compression method
|
||||
CENTIM: 12; // modification time (2 bytes time, 2 bytes date)
|
||||
CENCRC: 16; // uncompressed file crc-32 value
|
||||
CENSIZ: 20; // compressed size
|
||||
CENLEN: 24; // uncompressed size
|
||||
CENNAM: 28; // filename length
|
||||
CENEXT: 30; // extra field length
|
||||
CENCOM: 32; // file comment length
|
||||
CENDSK: 34; // volume number start
|
||||
CENATT: 36; // internal file attributes
|
||||
CENATX: 38; // external file attributes (host system dependent)
|
||||
CENOFF: 42; // LOC header offset
|
||||
|
||||
/* The entries in the end of central directory */
|
||||
ENDHDR: 22; // END header size
|
||||
ENDSIG: 0x06054b50; // "PK\005\006"
|
||||
ENDSUB: 8; // number of entries on this disk
|
||||
ENDTOT: 10; // total number of entries
|
||||
ENDSIZ: 12; // central directory size in bytes
|
||||
ENDOFF: 16; // offset of first CEN header
|
||||
ENDCOM: 20; // zip file comment length
|
||||
|
||||
END64HDR: 20; // zip64 END header size
|
||||
END64SIG: 0x07064b50; // zip64 Locator signature, "PK\006\007"
|
||||
END64START: 4; // number of the disk with the start of the zip64
|
||||
END64OFF: 8; // relative offset of the zip64 end of central directory
|
||||
END64NUMDISKS: 16; // total number of disks
|
||||
|
||||
ZIP64SIG: 0x06064b50; // zip64 signature, "PK\006\006"
|
||||
ZIP64HDR: 56; // zip64 record minimum size
|
||||
ZIP64LEAD: 12; // leading bytes at the start of the record, not counted by the value stored in ZIP64SIZE
|
||||
ZIP64SIZE: 4; // zip64 size of the central directory record
|
||||
ZIP64VEM: 12; // zip64 version made by
|
||||
ZIP64VER: 14; // zip64 version needed to extract
|
||||
ZIP64DSK: 16; // zip64 number of this disk
|
||||
ZIP64DSKDIR: 20; // number of the disk with the start of the record directory
|
||||
ZIP64SUB: 24; // number of entries on this disk
|
||||
ZIP64TOT: 32; // total number of entries
|
||||
ZIP64SIZB: 40; // zip64 central directory size in bytes
|
||||
ZIP64OFF: 48; // offset of start of central directory with respect to the starting disk number
|
||||
ZIP64EXTRA: 56; // extensible data sector
|
||||
|
||||
/* Compression methods */
|
||||
STORED: 0; // no compression
|
||||
SHRUNK: 1; // shrunk
|
||||
REDUCED1: 2; // reduced with compression factor 1
|
||||
REDUCED2: 3; // reduced with compression factor 2
|
||||
REDUCED3: 4; // reduced with compression factor 3
|
||||
REDUCED4: 5; // reduced with compression factor 4
|
||||
IMPLODED: 6; // imploded
|
||||
// 7 reserved for Tokenizing compression algorithm
|
||||
DEFLATED: 8; // deflated
|
||||
ENHANCED_DEFLATED: 9; // enhanced deflated
|
||||
PKWARE: 10; // PKWare DCL imploded
|
||||
// 11 reserved by PKWARE
|
||||
BZIP2: 12; // compressed using BZIP2
|
||||
// 13 reserved by PKWARE
|
||||
LZMA: 14; // LZMA
|
||||
// 15-17 reserved by PKWARE
|
||||
IBM_TERSE: 18; // compressed using IBM TERSE
|
||||
IBM_LZ77: 19; // IBM LZ77 z
|
||||
AES_ENCRYPT: 99; // WinZIP AES encryption method
|
||||
|
||||
/* General purpose bit flag */
|
||||
// values can obtained with expression 2**bitnr
|
||||
FLG_ENC: 1; // Bit 0: encrypted file
|
||||
FLG_COMP1: 2; // Bit 1, compression option
|
||||
FLG_COMP2: 4; // Bit 2, compression option
|
||||
FLG_DESC: 8; // Bit 3, data descriptor
|
||||
FLG_ENH: 16; // Bit 4, enhanced deflating
|
||||
FLG_PATCH: 32; // Bit 5, indicates that the file is compressed patched data.
|
||||
FLG_STR: 64; // Bit 6, strong encryption (patented)
|
||||
// Bits 7-10: Currently unused.
|
||||
FLG_EFS: 2048; // Bit 11: Language encoding flag (EFS)
|
||||
// Bit 12: Reserved by PKWARE for enhanced compression.
|
||||
// Bit 13: encrypted the Central Directory (patented).
|
||||
// Bits 14-15: Reserved by PKWARE.
|
||||
FLG_MSK: 4096; // mask header values
|
||||
|
||||
/* Load type */
|
||||
FILE: 2;
|
||||
BUFFER: 1;
|
||||
NONE: 0;
|
||||
|
||||
/* 4.5 Extensible data fields */
|
||||
EF_ID: 0;
|
||||
EF_SIZE: 2;
|
||||
|
||||
/* Header IDs */
|
||||
ID_ZIP64: 0x0001;
|
||||
ID_AVINFO: 0x0007;
|
||||
ID_PFS: 0x0008;
|
||||
ID_OS2: 0x0009;
|
||||
ID_NTFS: 0x000a;
|
||||
ID_OPENVMS: 0x000c;
|
||||
ID_UNIX: 0x000d;
|
||||
ID_FORK: 0x000e;
|
||||
ID_PATCH: 0x000f;
|
||||
ID_X509_PKCS7: 0x0014;
|
||||
ID_X509_CERTID_F: 0x0015;
|
||||
ID_X509_CERTID_C: 0x0016;
|
||||
ID_STRONGENC: 0x0017;
|
||||
ID_RECORD_MGT: 0x0018;
|
||||
ID_X509_PKCS7_RL: 0x0019;
|
||||
ID_IBM1: 0x0065;
|
||||
ID_IBM2: 0x0066;
|
||||
ID_POSZIP: 0x4690;
|
||||
|
||||
EF_ZIP64_OR_32: 0xffffffff;
|
||||
EF_ZIP64_OR_16: 0xffff;
|
||||
EF_ZIP64_SUNCOMP: 0;
|
||||
EF_ZIP64_SCOMP: 8;
|
||||
EF_ZIP64_RHO: 16;
|
||||
EF_ZIP64_DSN: 24;
|
||||
};
|
||||
|
||||
export const Errors: {
|
||||
/* Header error messages */
|
||||
INVALID_LOC: "Invalid LOC header (bad signature)";
|
||||
INVALID_CEN: "Invalid CEN header (bad signature)";
|
||||
INVALID_END: "Invalid END header (bad signature)";
|
||||
|
||||
/* ZipEntry error messages */
|
||||
NO_DATA: "Nothing to decompress";
|
||||
BAD_CRC: "CRC32 checksum failed";
|
||||
FILE_IN_THE_WAY: "There is a file in the way: %s";
|
||||
UNKNOWN_METHOD: "Invalid/unsupported compression method";
|
||||
|
||||
/* Inflater error messages */
|
||||
AVAIL_DATA: "inflate::Available inflate data did not terminate";
|
||||
INVALID_DISTANCE: "inflate::Invalid literal/length or distance code in fixed or dynamic block";
|
||||
TO_MANY_CODES: "inflate::Dynamic block code description: too many length or distance codes";
|
||||
INVALID_REPEAT_LEN: "inflate::Dynamic block code description: repeat more than specified lengths";
|
||||
INVALID_REPEAT_FIRST: "inflate::Dynamic block code description: repeat lengths with no first length";
|
||||
INCOMPLETE_CODES: "inflate::Dynamic block code description: code lengths codes incomplete";
|
||||
INVALID_DYN_DISTANCE: "inflate::Dynamic block code description: invalid distance code lengths";
|
||||
INVALID_CODES_LEN: "inflate::Dynamic block code description: invalid literal/length code lengths";
|
||||
INVALID_STORE_BLOCK: "inflate::Stored block length did not match one's complement";
|
||||
INVALID_BLOCK_TYPE: "inflate::Invalid block type (type == 3)";
|
||||
|
||||
/* ADM-ZIP error messages */
|
||||
CANT_EXTRACT_FILE: "Could not extract the file";
|
||||
CANT_OVERRIDE: "Target file already exists";
|
||||
NO_ZIP: "No zip file was loaded";
|
||||
NO_ENTRY: "Entry doesn't exist";
|
||||
DIRECTORY_CONTENT_ERROR: "A directory cannot have content";
|
||||
FILE_NOT_FOUND: "File not found: %s";
|
||||
NOT_IMPLEMENTED: "Not implemented";
|
||||
INVALID_FILENAME: "Invalid filename";
|
||||
INVALID_FORMAT: "Invalid or unsupported zip format. No END header found";
|
||||
};
|
||||
0
node_modules/@types/adm-zip/LICENSE → node_modules/@types/archiver/LICENSE
generated
vendored
0
node_modules/@types/adm-zip/LICENSE → node_modules/@types/archiver/LICENSE
generated
vendored
16
node_modules/@types/archiver/README.md
generated
vendored
Normal file
16
node_modules/@types/archiver/README.md
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# Installation
|
||||
> `npm install --save @types/archiver`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for archiver (https://github.com/archiverjs/node-archiver).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/archiver.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Wed, 23 Oct 2024 03:36:41 GMT
|
||||
* Dependencies: [@types/readdir-glob](https://npmjs.com/package/@types/readdir-glob)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [ Esri
|
||||
// Dolan Miu](https://github.com/dolanmiu), [Crevil](https://github.com/crevil), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
|
||||
137
node_modules/@types/archiver/index.d.ts
generated
vendored
Normal file
137
node_modules/@types/archiver/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,137 @@
|
||||
import * as fs from "fs";
|
||||
import * as ReaddirGlob from "readdir-glob";
|
||||
import * as stream from "stream";
|
||||
import { ZlibOptions } from "zlib";
|
||||
|
||||
type Partial<T> = {
|
||||
[P in keyof T]?: T[P];
|
||||
};
|
||||
|
||||
// This library adds `cwd` to the options
|
||||
type GlobOptions = ReaddirGlob.Options & { cwd?: string };
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -- support for ConstructorFn function and classes
|
||||
type ConstructorFn<T> = Function | (new(...params: any[]) => T);
|
||||
|
||||
declare function archiver(format: archiver.Format, options?: archiver.ArchiverOptions): archiver.Archiver;
|
||||
|
||||
declare namespace archiver {
|
||||
type Format = "zip" | "tar";
|
||||
|
||||
function create(format: string, options?: ArchiverOptions): Archiver;
|
||||
|
||||
/** Check if the format is already registered. */
|
||||
function isRegisteredFormat(format: string): boolean;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
||||
function registerFormat(format: string, module: Function): void;
|
||||
|
||||
interface EntryData {
|
||||
/** Sets the entry name including internal path */
|
||||
name: string;
|
||||
/** Sets the entry date */
|
||||
date?: Date | string | undefined;
|
||||
/** Sets the entry permissions */
|
||||
mode?: number | undefined;
|
||||
/**
|
||||
* Sets a path prefix for the entry name.
|
||||
* Useful when working with methods like `directory` or `glob`
|
||||
*/
|
||||
prefix?: string | undefined;
|
||||
/**
|
||||
* Sets the fs stat data for this entry allowing
|
||||
* for reduction of fs stat calls when stat data is already known
|
||||
*/
|
||||
stats?: fs.Stats | undefined;
|
||||
}
|
||||
|
||||
interface ZipEntryData extends EntryData {
|
||||
/** Sets the compression method to STORE */
|
||||
store?: boolean | undefined;
|
||||
}
|
||||
|
||||
type TarEntryData = EntryData;
|
||||
|
||||
interface ProgressData {
|
||||
entries: {
|
||||
total: number;
|
||||
processed: number;
|
||||
};
|
||||
fs: {
|
||||
totalBytes: number;
|
||||
processedBytes: number;
|
||||
};
|
||||
}
|
||||
|
||||
/** A function that lets you either opt out of including an entry (by returning false), or modify the contents of an entry as it is added (by returning an EntryData) */
|
||||
type EntryDataFunction = (entry: EntryData) => false | EntryData;
|
||||
|
||||
class ArchiverError extends Error {
|
||||
code: string; // Since archiver format support is modular, we cannot enumerate all possible error codes, as the modules can throw arbitrary ones.
|
||||
data: any;
|
||||
path?: any;
|
||||
|
||||
constructor(code: string, data: any);
|
||||
}
|
||||
|
||||
interface Archiver extends stream.Transform {
|
||||
abort(): this;
|
||||
append(source: stream.Readable | Buffer | string, data?: EntryData | ZipEntryData | TarEntryData): this;
|
||||
|
||||
/** if false is passed for destpath, the path of a chunk of data in the archive is set to the root */
|
||||
directory(dirpath: string, destpath: false | string, data?: Partial<EntryData> | EntryDataFunction): this;
|
||||
file(filename: string, data: EntryData): this;
|
||||
glob(pattern: string, options?: GlobOptions, data?: Partial<EntryData>): this;
|
||||
finalize(): Promise<void>;
|
||||
|
||||
setFormat(format: string): this;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
||||
setModule(module: Function): this;
|
||||
|
||||
pointer(): number;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
||||
use(plugin: Function): this;
|
||||
|
||||
symlink(filepath: string, target: string, mode?: number): this;
|
||||
|
||||
on(event: "error" | "warning", listener: (error: ArchiverError) => void): this;
|
||||
on(event: "data", listener: (data: Buffer) => void): this;
|
||||
on(event: "progress", listener: (progress: ProgressData) => void): this;
|
||||
on(event: "close" | "drain" | "finish", listener: () => void): this;
|
||||
on(event: "pipe" | "unpipe", listener: (src: stream.Readable) => void): this;
|
||||
on(event: "entry", listener: (entry: EntryData) => void): this;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
}
|
||||
|
||||
type ArchiverOptions = CoreOptions & TransformOptions & ZipOptions & TarOptions;
|
||||
|
||||
interface CoreOptions {
|
||||
statConcurrency?: number | undefined;
|
||||
}
|
||||
|
||||
interface TransformOptions {
|
||||
allowHalfOpen?: boolean | undefined;
|
||||
readableObjectMode?: boolean | undefined;
|
||||
writeableObjectMode?: boolean | undefined;
|
||||
decodeStrings?: boolean | undefined;
|
||||
encoding?: string | undefined;
|
||||
highWaterMark?: number | undefined;
|
||||
objectmode?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface ZipOptions {
|
||||
comment?: string | undefined;
|
||||
forceLocalTime?: boolean | undefined;
|
||||
forceZip64?: boolean | undefined;
|
||||
/** @default false */
|
||||
namePrependSlash?: boolean | undefined;
|
||||
store?: boolean | undefined;
|
||||
zlib?: ZlibOptions | undefined;
|
||||
}
|
||||
|
||||
interface TarOptions {
|
||||
gzip?: boolean | undefined;
|
||||
gzipOptions?: ZlibOptions | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export = archiver;
|
||||
38
node_modules/@types/archiver/package.json
generated
vendored
Normal file
38
node_modules/@types/archiver/package.json
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "@types/archiver",
|
||||
"version": "6.0.3",
|
||||
"description": "TypeScript definitions for archiver",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/archiver",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": " Esri\n// Dolan Miu",
|
||||
"githubUsername": "dolanmiu",
|
||||
"url": "https://github.com/dolanmiu"
|
||||
},
|
||||
{
|
||||
"name": "Crevil",
|
||||
"githubUsername": "crevil",
|
||||
"url": "https://github.com/crevil"
|
||||
},
|
||||
{
|
||||
"name": "Piotr Błażejewicz",
|
||||
"githubUsername": "peterblazejewicz",
|
||||
"url": "https://github.com/peterblazejewicz"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/archiver"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/readdir-glob": "*"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "5ab2f0d52b813039b334365186e5714b86698972ff1c43ce35e5f9ed27227a14",
|
||||
"typeScriptVersion": "4.8"
|
||||
}
|
||||
21
node_modules/@types/readdir-glob/LICENSE
generated
vendored
Normal file
21
node_modules/@types/readdir-glob/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
node_modules/@types/readdir-glob/README.md
generated
vendored
Normal file
15
node_modules/@types/readdir-glob/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/readdir-glob`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for readdir-glob (https://github.com/Yqnn/node-readdir-glob).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/readdir-glob.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 20 Nov 2023 23:36:24 GMT
|
||||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Dolan Miu](https://github.com/dolanmiu).
|
||||
124
node_modules/@types/readdir-glob/index.d.ts
generated
vendored
Normal file
124
node_modules/@types/readdir-glob/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import { EventEmitter } from "events";
|
||||
import * as fs from "fs";
|
||||
|
||||
declare function readdirGlob(root: string, options: readdirGlob.Options): readdirGlob.ReaddirGlob;
|
||||
|
||||
declare namespace readdirGlob {
|
||||
interface Options {
|
||||
/**
|
||||
* Glob pattern or Array of Glob patterns to match the found files with. A file has to match at least one of the provided patterns to be returned.
|
||||
*/
|
||||
pattern?: string | string[];
|
||||
/**
|
||||
* Allow pattern to match filenames starting with a period, even if the pattern does not explicitly have a period in that spot.
|
||||
*/
|
||||
dot?: boolean;
|
||||
/**
|
||||
* Disable `**` matching against multiple folder names.
|
||||
*/
|
||||
noglobstar?: boolean;
|
||||
/**
|
||||
* Perform a basename-only match if the pattern does not contain any slash characters. That is, `*.js` would be treated as equivalent to `**\/*.js`, matching all js files in all directories.
|
||||
*/
|
||||
matchBase?: boolean;
|
||||
/**
|
||||
* Perform a case-insensitive match. Note: on case-insensitive file systems, non-magic patterns will match by default, since `stat` and `readdir` will not raise errors.
|
||||
*/
|
||||
nocase?: boolean;
|
||||
/**
|
||||
* Glob pattern or Array of Glob patterns to exclude matches. If a file or a folder matches at least one of the provided patterns, it's not returned.
|
||||
* It doesn't prevent files from folder content to be returned. Note: ignore patterns are always in dot:true mode.
|
||||
*/
|
||||
ignore?: string | string[];
|
||||
/**
|
||||
* Glob pattern or Array of Glob patterns to exclude folders.
|
||||
* If a folder matches one of the provided patterns, it's not returned, and it's not explored: this prevents any of its children to be returned.
|
||||
* Note: skip patterns are always in dot:true mode.
|
||||
*/
|
||||
skip?: string | string[];
|
||||
/**
|
||||
* Follow symlinked directories. Note that requires to stat _all_ results, and so reduces performance.
|
||||
*/
|
||||
follow?: boolean;
|
||||
/**
|
||||
* Set to true to stat _all_ results. This reduces performance.
|
||||
*/
|
||||
stat?: boolean;
|
||||
/**
|
||||
* Do not match directories, only files.
|
||||
*/
|
||||
nodir?: boolean;
|
||||
/**
|
||||
* Add a `/` character to directory matches.
|
||||
*/
|
||||
mark?: boolean;
|
||||
/**
|
||||
* When an unusual error is encountered when attempting to read a directory, a warning will be printed to stderr. Set the `silent` option to true to suppress these warnings.
|
||||
*/
|
||||
silent?: boolean;
|
||||
/**
|
||||
* Absolute paths will be returned instead of relative paths.
|
||||
*/
|
||||
absolute?: boolean;
|
||||
}
|
||||
|
||||
interface Match {
|
||||
/**
|
||||
* relative path of the matched file
|
||||
*/
|
||||
relative: string;
|
||||
/**
|
||||
* absolute path of the matched file
|
||||
*/
|
||||
absolute: string;
|
||||
/**
|
||||
* stat of the matched file (only if stat:true option is used)
|
||||
*/
|
||||
stat?: fs.Stats;
|
||||
}
|
||||
|
||||
class ReaddirGlob extends EventEmitter {
|
||||
constructor(cwd: string, cb: (error: Error | null, matches?: readonly Match[]) => void);
|
||||
constructor(cwd: string, options: Options, cb: (error: Error | null, matches?: readonly Match[]) => void);
|
||||
/**
|
||||
* Every time a match is found, this is emitted with the specific thing that matched.
|
||||
*/
|
||||
on(event: "match", callback: (match: Match) => void): this;
|
||||
/**
|
||||
* When the matching is finished, this is emitted with all the matches found.
|
||||
*/
|
||||
on(event: "error", callback: (error: Error) => void): this;
|
||||
/**
|
||||
* Emitted when an unexpected error is encountered.
|
||||
*/
|
||||
on(event: "end", callback: (matches: readonly Match[]) => void): this;
|
||||
/**
|
||||
* Temporarily stop the search
|
||||
*/
|
||||
pause(): void;
|
||||
/**
|
||||
* Resume the search
|
||||
*/
|
||||
resume(): void;
|
||||
/**
|
||||
* Stop the search forever
|
||||
*/
|
||||
abort(): void;
|
||||
/**
|
||||
* The options object passed in.
|
||||
*/
|
||||
options: Options;
|
||||
/**
|
||||
* Boolean which is set to true when calling `pause()`.
|
||||
*/
|
||||
paused: boolean;
|
||||
/**
|
||||
* Boolean which is set to true when calling `abort()`. There is no way at this time to continue a glob search after aborting.
|
||||
*/
|
||||
aborted: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export = readdirGlob;
|
||||
27
node_modules/@types/readdir-glob/package.json
generated
vendored
Normal file
27
node_modules/@types/readdir-glob/package.json
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "@types/readdir-glob",
|
||||
"version": "1.1.5",
|
||||
"description": "TypeScript definitions for readdir-glob",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/readdir-glob",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Dolan Miu",
|
||||
"githubUsername": "dolanmiu",
|
||||
"url": "https://github.com/dolanmiu"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/readdir-glob"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "7bdc6e6f815f6791c4762b917d4437d2172faa334bd34f1ce9eb5307ecc565f1",
|
||||
"typeScriptVersion": "4.5"
|
||||
}
|
||||
Reference in New Issue
Block a user