@types/archiver

  • Version 8.0.0
  • Published
  • 6.45 kB
  • 2 dependencies
  • MIT license

Install

npm i @types/archiver
yarn add @types/archiver
pnpm add @types/archiver

Overview

TypeScript definitions for archiver

Index

Classes

class Archiver

class Archiver extends stream.Transform {}

    constructor

    constructor(options?: CoreOptions & TransformOptions);

      method abort

      abort: () => this;

        method append

        append: (
        source: stream.Readable | Buffer | string,
        data?: EntryData | ZipEntryData | TarEntryData
        ) => this;

          method directory

          directory: (
          dirpath: string,
          destpath: false | string,
          data?: Partial<EntryData> | EntryDataFunction
          ) => this;

            method file

            file: (filename: string, data?: EntryData) => this;
            • Parameter data

              entry data (optional)

            method finalize

            finalize: () => Promise<void>;

              method glob

              glob: (
              pattern: string,
              options?: GlobOptions,
              data?: Partial<EntryData>
              ) => this;

                method on

                on: {
                (event: 'error' | 'warning', listener: (error: ArchiverError) => void): this;
                (event: 'data', listener: (data: Buffer) => void): this;
                (event: 'progress', listener: (progress: ProgressData) => void): this;
                (event: 'close' | 'drain' | 'finish', listener: () => void): this;
                (event: 'pipe' | 'unpipe', listener: (src: stream.Readable) => void): this;
                (event: 'entry', listener: (entry: EntryData) => void): this;
                (event: string, listener: (...args: any[]) => void): this;
                };

                  method pointer

                  pointer: () => number;
                    symlink: (filepath: string, target: string, mode?: number) => this;

                      class JsonArchive

                      class JsonArchive extends Archiver {}

                        constructor

                        constructor(options?: CoreOptions & TransformOptions);

                          class TarArchive

                          class TarArchive extends Archiver {}

                            constructor

                            constructor(options?: CoreOptions & TransformOptions & TarOptions);

                              class ZipArchive

                              class ZipArchive extends Archiver {}

                                constructor

                                constructor(options?: CoreOptions & TransformOptions & ZipOptions);

                                  Interfaces

                                  interface ArchiverError

                                  interface ArchiverError extends Error {}

                                    property code

                                    code: string;

                                      property data

                                      data?: any;

                                        interface CoreOptions

                                        interface CoreOptions {}

                                          property statConcurrency

                                          statConcurrency?: number;

                                            interface EntryData

                                            interface EntryData {}

                                              property date

                                              date?: Date | string;

                                                property mode

                                                mode?: number;

                                                  property name

                                                  name: string;

                                                    property prefix

                                                    prefix?: string;

                                                      property stats

                                                      stats?: fs.Stats;

                                                        property type

                                                        type?: 'directory' | 'file' | 'symlink';

                                                          interface ProgressData

                                                          interface ProgressData {}

                                                            property entries

                                                            entries: {
                                                            total: number;
                                                            processed: number;
                                                            };

                                                              property fs

                                                              fs: {
                                                              totalBytes: number;
                                                              processedBytes: number;
                                                              };

                                                                interface TarOptions

                                                                interface TarOptions {}

                                                                  property gzip

                                                                  gzip?: boolean;

                                                                    property gzipOptions

                                                                    gzipOptions?: ZlibOptions;

                                                                      interface TransformOptions

                                                                      interface TransformOptions {}

                                                                        property allowHalfOpen

                                                                        allowHalfOpen?: boolean;

                                                                          property decodeStrings

                                                                          decodeStrings?: boolean;

                                                                            property encoding

                                                                            encoding?: BufferEncoding;

                                                                              property highWaterMark

                                                                              highWaterMark?: number;

                                                                                property objectMode

                                                                                objectMode?: boolean;

                                                                                  property readableObjectMode

                                                                                  readableObjectMode?: boolean;

                                                                                    property writableObjectMode

                                                                                    writableObjectMode?: boolean;

                                                                                      interface ZipEntryData

                                                                                      interface ZipEntryData extends EntryData {}

                                                                                        property comment

                                                                                        comment?: string;

                                                                                          property namePrependSlash

                                                                                          namePrependSlash?: boolean;

                                                                                            property store

                                                                                            store?: boolean;

                                                                                              interface ZipOptions

                                                                                              interface ZipOptions {}

                                                                                                property comment

                                                                                                comment?: string;

                                                                                                  property forceLocalTime

                                                                                                  forceLocalTime?: boolean;

                                                                                                    property forceZip64

                                                                                                    forceZip64?: boolean;

                                                                                                      property level

                                                                                                      level?: number;

                                                                                                        property namePrependSlash

                                                                                                        namePrependSlash?: boolean;

                                                                                                          property store

                                                                                                          store?: boolean;

                                                                                                            property zlib

                                                                                                            zlib?: ZlibOptions;

                                                                                                              Type Aliases

                                                                                                              type ArchiverOptions

                                                                                                              type ArchiverOptions = CoreOptions & TransformOptions & ZipOptions & TarOptions;

                                                                                                                type EntryDataFunction

                                                                                                                type EntryDataFunction = (entry: EntryData) => false | EntryData;

                                                                                                                  type GlobOptions

                                                                                                                  type GlobOptions = ReaddirGlob.Options & { cwd?: string };

                                                                                                                    type TarEntryData

                                                                                                                    type TarEntryData = EntryData;

                                                                                                                      Package Files (1)

                                                                                                                      Dependencies (2)

                                                                                                                      Dev Dependencies (0)

                                                                                                                      No dev dependencies.

                                                                                                                      Peer Dependencies (0)

                                                                                                                      No peer dependencies.

                                                                                                                      Badge

                                                                                                                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/archiver.

                                                                                                                      • Markdown
                                                                                                                        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/archiver)
                                                                                                                      • HTML
                                                                                                                        <a href="https://www.jsdocs.io/package/@types/archiver"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>