fixed archiver right now
This commit is contained in:
@ -1,11 +1,11 @@
|
|||||||
import {archiver, Zip} from "archiver";
|
import * as archiver from "archiver";
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
|
|
||||||
export class Packer {
|
export class Packer {
|
||||||
protected archive: Zip;
|
protected archive: any;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.archive = archiver.create("fgf", {});
|
this.archive = archiver.create("zip", {});
|
||||||
}
|
}
|
||||||
|
|
||||||
pack(output: fs.WriteStream): void {
|
pack(output: fs.WriteStream): void {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/// <reference path="../typings/mocha/mocha.d.ts" />
|
/// <reference path="../typings/mocha/mocha.d.ts" />
|
||||||
/// <reference path="../typings/chai/chai.d.ts" />
|
/// <reference path="../typings/chai/chai.d.ts" />
|
||||||
|
/// <reference path="../typings/archiver/archiver.d.ts" />
|
||||||
|
|
||||||
import {LocalPacker} from "../export/packer/local";
|
import {LocalPacker} from "../export/packer/local";
|
||||||
import {assert} from "chai";
|
import {assert} from "chai";
|
||||||
|
|
||||||
|
11
ts/typings/archiver/archiver.d.ts
vendored
11
ts/typings/archiver/archiver.d.ts
vendored
@ -22,20 +22,21 @@ declare module "archiver" {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Zip extends STREAM.Transform {
|
interface Archiver extends STREAM.Transform {
|
||||||
pipe(writeStream: FS.WriteStream): void;
|
pipe(writeStream: FS.WriteStream): void;
|
||||||
append(readStream: FS.ReadStream, name: nameInterface): void;
|
append(readStream: FS.ReadStream, name: nameInterface): void;
|
||||||
finalize(): void;
|
finalize(): void;
|
||||||
bulk(mappings: any): void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Options {
|
interface Options {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function archiver(format: string, options?: Options): Zip;
|
function archiver(format: string, options?: Options): Archiver;
|
||||||
|
|
||||||
export namespace archiver {
|
namespace archiver {
|
||||||
function create(format: string, options?: Options): Zip;
|
function create(format: string, options?: Options): Archiver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export = archiver;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user