From 703e03aba33f234712206769f57717ba7d92d23d Mon Sep 17 00:00:00 2001 From: LinuxWizard42 Date: Wed, 12 Oct 2022 22:54:37 +0300 Subject: Added export_allowed file to make repository visible in cgit --- node_modules/asar/lib/index.d.ts | 90 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 node_modules/asar/lib/index.d.ts (limited to 'node_modules/asar/lib/index.d.ts') diff --git a/node_modules/asar/lib/index.d.ts b/node_modules/asar/lib/index.d.ts new file mode 100644 index 0000000..b3790ec --- /dev/null +++ b/node_modules/asar/lib/index.d.ts @@ -0,0 +1,90 @@ +import { IOptions as GlobOptions } from 'glob'; +import { Stats } from 'fs'; + +export type CreateOptions = { + dot?: boolean; + globOptions?: GlobOptions; + ordering?: string; + pattern?: string; + transform?: (filePath: string) => NodeJS.ReadWriteStream | void; + unpack?: string; + unpackDir?: string; +}; + +export type ListOptions = { + isPack: boolean; +}; + +export type EntryMetadata = { + unpacked: boolean; +}; + +export type DirectoryMetadata = EntryMetadata & { + files: { [property: string]: EntryMetadata }; +}; + +export type FileMetadata = EntryMetadata & { + executable?: true; + offset?: number; + size?: number; +}; + +export type LinkMetadata = { + link: string; +}; + +export type Metadata = DirectoryMetadata | FileMetadata | LinkMetadata; + +export type InputMetadataType = 'directory' | 'file' | 'link'; + +export type InputMetadata = { + [property: string]: { + type: InputMetadataType; + stat: Stats; + } +}; + +export type DirectoryRecord = { + files: Record; +}; + +export type FileRecord = { + offset: string; + size: number; + executable?: boolean; + integrity: { + hash: string; + algorithm: 'SHA256'; + blocks: string[]; + blockSize: number; + }; +} + +export type ArchiveHeader = { + // The JSON parsed header string + header: DirectoryRecord; + headerString: string; + headerSize: number; +} + +export function createPackage(src: string, dest: string): Promise; +export function createPackageWithOptions( + src: string, + dest: string, + options: CreateOptions +): Promise; +export function createPackageFromFiles( + src: string, + dest: string, + filenames: string[], + metadata?: InputMetadata, + options?: CreateOptions +): Promise; + +export function statFile(archive: string, filename: string, followLinks?: boolean): Metadata; +export function getRawHeader(archive: string): ArchiveHeader; +export function listPackage(archive: string, options?: ListOptions): string[]; +export function extractFile(archive: string, filename: string): Buffer; +export function extractAll(archive: string, dest: string): void; +export function uncache(archive: string): boolean; +export function uncacheAll(): void; -- cgit v1.2.3-86-g962b