This commit is contained in:
amitm02
2018-07-23 10:31:48 +03:00
parent 4a320d3031
commit d979ef3b40
194 changed files with 84007 additions and 3 deletions

4
build/src/export/formatter.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
import { BaseXmlComponent, IXmlableObject } from "file/xml-components";
export declare class Formatter {
format(input: BaseXmlComponent): IXmlableObject;
}

5
build/src/export/index.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
export * from "./packer/local";
export * from "./packer/express";
export * from "./packer/packer";
export * from "./packer/stream";
export * from "./packer/buffer";

View File

@ -0,0 +1,9 @@
/// <reference types="node" />
import { Writable } from "stream";
export declare class BufferStream extends Writable {
private data;
constructor();
_write(chunk: any, encoding: string, next: (err?: Error) => void): void;
end(cb?: Function): void;
readonly Buffer: Buffer;
}

7
build/src/export/packer/buffer.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
/// <reference types="node" />
import { File } from "../../file";
export declare class BufferPacker {
private readonly packer;
constructor(file: File);
pack(): Promise<Buffer>;
}

12
build/src/export/packer/compiler.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
/// <reference types="node" />
import * as archiver from "archiver";
import * as express from "express";
import { Writable } from "stream";
import { File } from "file";
export declare class Compiler {
private file;
protected archive: archiver.Archiver;
private formatter;
constructor(file: File);
compile(output: Writable | express.Response): Promise<void>;
}

9
build/src/export/packer/express.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
import * as express from "express";
import { File } from "file";
import { IPacker } from "./packer";
export declare class ExpressPacker implements IPacker {
private readonly res;
private readonly packer;
constructor(file: File, res: express.Response);
pack(name: string): Promise<void>;
}

10
build/src/export/packer/local.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
import { File } from "../../file";
import { IPacker } from "./packer";
export declare class LocalPacker implements IPacker {
private stream;
private readonly pdfConverter;
private readonly packer;
constructor(file: File);
pack(filePath: string): Promise<void>;
packPdf(filePath: string): Promise<void>;
}

4
build/src/export/packer/packer.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
export interface IPacker {
pack(path: string): void;
}
export declare const WORKAROUND = "";

View File

@ -0,0 +1,7 @@
import * as request from "request-promise";
export interface IConvertOutput {
data: string;
}
export declare class PdfConvertWrapper {
convert(filePath: string): request.RequestPromise;
}

9
build/src/export/packer/stream.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
/// <reference types="node" />
import { Readable } from "stream";
import { File } from "../../file";
import { IPacker } from "./packer";
export declare class StreamPacker implements IPacker {
private readonly compiler;
constructor(file: File);
pack(): Readable;
}