summaryrefslogtreecommitdiff
path: root/node_modules/asar/lib/index.d.ts
diff options
context:
space:
mode:
authorLinuxWizard42 <computerwizard@linuxmail.org>2022-10-12 22:54:37 +0300
committerLinuxWizard42 <computerwizard@linuxmail.org>2022-10-12 22:54:37 +0300
commit703e03aba33f234712206769f57717ba7d92d23d (patch)
tree0041f04ccb75bd5379c764e9fe42249fffe75fc3 /node_modules/asar/lib/index.d.ts
parentab6e257e6e9d9a483d7e86f220d8b209a2cd7753 (diff)
downloadFlashRunner-703e03aba33f234712206769f57717ba7d92d23d.tar.gz
FlashRunner-703e03aba33f234712206769f57717ba7d92d23d.tar.zst
Added export_allowed file to make repository visible in cgit
Diffstat (limited to 'node_modules/asar/lib/index.d.ts')
-rw-r--r--node_modules/asar/lib/index.d.ts90
1 files changed, 90 insertions, 0 deletions
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<string, DirectoryRecord | FileRecord>;
+};
+
+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<void>;
+export function createPackageWithOptions(
+ src: string,
+ dest: string,
+ options: CreateOptions
+): Promise<void>;
+export function createPackageFromFiles(
+ src: string,
+ dest: string,
+ filenames: string[],
+ metadata?: InputMetadata,
+ options?: CreateOptions
+): Promise<void>;
+
+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;