fix build
This commit is contained in:
parent
69cf63c80a
commit
a71fdf805d
2
dist_ts/index.d.ts
vendored
2
dist_ts/index.d.ts
vendored
@ -1 +1 @@
|
||||
export * from './smartarchive.classes.smartarchive';
|
||||
export * from './smartarchive.classes.smartarchive.js';
|
||||
|
@ -1,7 +1,2 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("./smartarchive.classes.smartarchive"));
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHlEQUFvRCJ9
|
||||
export * from './smartarchive.classes.smartarchive.js';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHdDQUF3QyxDQUFDIn0=
|
21
dist_ts/smartarchive.classes.smartarchive.d.ts
vendored
21
dist_ts/smartarchive.classes.smartarchive.d.ts
vendored
@ -1,5 +1,24 @@
|
||||
/// <reference types="node" resolution-mode="require"/>
|
||||
import * as plugins from './smartarchive.plugins.js';
|
||||
export declare class SmartArchive {
|
||||
archiveDirectory: string;
|
||||
constructor();
|
||||
extractArchiveFromFilePath(filePathArg: string, targetDir: string): void;
|
||||
/**
|
||||
* extracts an archive from a given url
|
||||
*/
|
||||
extractArchiveFromUrlToFs(urlArg: string, targetDir: string): Promise<void>;
|
||||
/**
|
||||
* extracts an archive from a given filePath on disk
|
||||
* @param filePathArg
|
||||
* @param targetDir
|
||||
*/
|
||||
extractArchiveFromFilePathToFs(filePathArg: string, targetDir: string): Promise<void>;
|
||||
/**
|
||||
* extracts to Observable
|
||||
*/
|
||||
extractArchiveFromBufferToObservable(bufferArg: Buffer): Promise<plugins.smartrx.rxjs.ReplaySubject<plugins.smartfile.Smartfile>>;
|
||||
/**
|
||||
* extracts to Observable
|
||||
*/
|
||||
extractArchiveFromUrlToObservable(urlArg: string): Promise<plugins.smartrx.rxjs.ReplaySubject<plugins.smartfile.Smartfile>>;
|
||||
}
|
||||
|
@ -1,21 +1,84 @@
|
||||
"use strict";
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const plugins = __importStar(require("./smartarchive.plugins"));
|
||||
class SmartArchive {
|
||||
import * as plugins from './smartarchive.plugins.js';
|
||||
import * as paths from './smartarchive.paths.js';
|
||||
import 'tar';
|
||||
export class SmartArchive {
|
||||
constructor() { }
|
||||
extractArchiveFromFilePath(filePathArg, targetDir) {
|
||||
/**
|
||||
* extracts an archive from a given url
|
||||
*/
|
||||
async extractArchiveFromUrlToFs(urlArg, targetDir) {
|
||||
const parsedPath = plugins.path.parse(urlArg);
|
||||
const uniqueFileName = plugins.smartunique.uni() + parsedPath.ext;
|
||||
plugins.smartfile.fs.ensureDir(paths.nogitDir); // TODO: totally remove caching needs
|
||||
const downloadPath = plugins.path.join(paths.nogitDir, uniqueFileName);
|
||||
const downloadedArchive = (await plugins.smartrequest.getBinary(urlArg)).body;
|
||||
await plugins.smartfile.memory.toFs(downloadedArchive, downloadPath);
|
||||
await this.extractArchiveFromFilePathToFs(downloadPath, targetDir);
|
||||
await plugins.smartfile.fs.remove(downloadPath);
|
||||
}
|
||||
/**
|
||||
* extracts an archive from a given filePath on disk
|
||||
* @param filePathArg
|
||||
* @param targetDir
|
||||
*/
|
||||
async extractArchiveFromFilePathToFs(filePathArg, targetDir) {
|
||||
const parsedPath = plugins.path.parse(filePathArg);
|
||||
switch (parsedPath.ext) {
|
||||
case '.tgz':
|
||||
console.log(`detected a .tgz archive`);
|
||||
await plugins.tar.extract({
|
||||
file: filePathArg,
|
||||
cwd: targetDir,
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
;
|
||||
/**
|
||||
* extracts to Observable
|
||||
*/
|
||||
async extractArchiveFromBufferToObservable(bufferArg) {
|
||||
const intake = new plugins.streamfunction.Intake();
|
||||
const replaySubject = new plugins.smartrx.rxjs.ReplaySubject();
|
||||
const readableStream = intake.getReadableStream();
|
||||
const extractPipeStop = plugins.tarStream.extract();
|
||||
extractPipeStop.on('entry', (header, stream, next) => {
|
||||
let fileBuffer;
|
||||
stream.on('data', (chunkArg) => {
|
||||
if (!fileBuffer) {
|
||||
fileBuffer = chunkArg;
|
||||
}
|
||||
exports.SmartArchive = SmartArchive;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhcmNoaXZlLmNsYXNzZXMuc21hcnRhcmNoaXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRhcmNoaXZlLmNsYXNzZXMuc21hcnRhcmNoaXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBLGdFQUFrRDtBQUVsRCxNQUFhLFlBQVk7SUFFdkIsZ0JBQWUsQ0FBQztJQUVULDBCQUEwQixDQUFDLFdBQW1CLEVBQUUsU0FBaUI7UUFDdEUsTUFBTSxVQUFVLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsV0FBVyxDQUFDLENBQUM7UUFDbkQsUUFBUSxVQUFVLENBQUMsR0FBRyxFQUFFO1NBRXZCO0lBQ0gsQ0FBQztJQUFBLENBQUM7Q0FDSDtBQVZELG9DQVVDIn0=
|
||||
else {
|
||||
fileBuffer = Buffer.concat([fileBuffer, chunkArg]);
|
||||
}
|
||||
});
|
||||
stream.on('end', () => {
|
||||
replaySubject.next(new plugins.smartfile.Smartfile({
|
||||
base: null,
|
||||
contentBuffer: fileBuffer,
|
||||
path: `./${header.name}`
|
||||
}));
|
||||
next();
|
||||
});
|
||||
stream.resume();
|
||||
});
|
||||
extractPipeStop.on('finish', () => {
|
||||
replaySubject.complete();
|
||||
});
|
||||
// lets run the stream
|
||||
readableStream
|
||||
.pipe(plugins.gunzipMaybe())
|
||||
.pipe(extractPipeStop);
|
||||
intake.pushData(bufferArg);
|
||||
intake.signalEnd();
|
||||
return replaySubject;
|
||||
}
|
||||
/**
|
||||
* extracts to Observable
|
||||
*/
|
||||
async extractArchiveFromUrlToObservable(urlArg) {
|
||||
const response = await plugins.smartrequest.getBinary(urlArg);
|
||||
const replaySubject = this.extractArchiveFromBufferToObservable(response.body);
|
||||
return replaySubject;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhcmNoaXZlLmNsYXNzZXMuc21hcnRhcmNoaXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRhcmNoaXZlLmNsYXNzZXMuc21hcnRhcmNoaXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sMkJBQTJCLENBQUM7QUFDckQsT0FBTyxLQUFLLEtBQUssTUFBTSx5QkFBeUIsQ0FBQztBQUNqRCxPQUF3QixLQUFLLENBQUM7QUFFOUIsTUFBTSxPQUFPLFlBQVk7SUFFdkIsZ0JBQWUsQ0FBQztJQUVoQjs7T0FFRztJQUNJLEtBQUssQ0FBQyx5QkFBeUIsQ0FBQyxNQUFjLEVBQUUsU0FBaUI7UUFDdEUsTUFBTSxV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LGFBQWEsQ0FBQztJQUN2QixDQUFDO0NBQ0YifQ==
|
@ -1,13 +1,4 @@
|
||||
"use strict";
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const plugins = __importStar(require("./smartarchive.plugins"));
|
||||
exports.packageDir = plugins.path.join(__dirname, '../');
|
||||
exports.nogitDir = plugins.path.join(__dirname, './.nogit');
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhcmNoaXZlLnBhdGhzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRhcmNoaXZlLnBhdGhzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBLGdFQUFrRDtBQUVyQyxRQUFBLFVBQVUsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFDakQsUUFBQSxRQUFRLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFFLFVBQVUsQ0FBQyxDQUFDIn0=
|
||||
import * as plugins from './smartarchive.plugins.js';
|
||||
export const packageDir = plugins.path.join(plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url), '../');
|
||||
export const nogitDir = plugins.path.join(packageDir, './.nogit');
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhcmNoaXZlLnBhdGhzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRhcmNoaXZlLnBhdGhzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sMkJBQTJCLENBQUM7QUFFckQsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLHdCQUF3QixDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFDcEgsTUFBTSxDQUFDLE1BQU0sUUFBUSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFVBQVUsRUFBRSxVQUFVLENBQUMsQ0FBQyJ9
|
12
dist_ts/smartarchive.plugins.d.ts
vendored
12
dist_ts/smartarchive.plugins.d.ts
vendored
@ -1,7 +1,13 @@
|
||||
import path from 'path';
|
||||
import * as path from 'path';
|
||||
export { path };
|
||||
import * as smartfile from '@pushrocks/smartfile';
|
||||
import * as smartpath from '@pushrocks/smartpath';
|
||||
export { smartfile, smartpath };
|
||||
import * as smartrequest from '@pushrocks/smartrequest';
|
||||
import * as smartunique from '@pushrocks/smartunique';
|
||||
import * as streamfunction from '@pushrocks/streamfunction';
|
||||
import * as smartrx from '@pushrocks/smartrx';
|
||||
export { smartfile, smartpath, smartrequest, smartunique, streamfunction, smartrx };
|
||||
import gunzipMaybe from 'gunzip-maybe';
|
||||
import tar from 'tar';
|
||||
export { tar };
|
||||
import tarStream from 'tar-stream';
|
||||
export { gunzipMaybe, tar, tarStream };
|
||||
|
@ -1,24 +1,18 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
// node native scope
|
||||
const path_1 = __importDefault(require("path"));
|
||||
exports.path = path_1.default;
|
||||
import * as path from 'path';
|
||||
export { path };
|
||||
// @pushrocks scope
|
||||
const smartfile = __importStar(require("@pushrocks/smartfile"));
|
||||
exports.smartfile = smartfile;
|
||||
const smartpath = __importStar(require("@pushrocks/smartpath"));
|
||||
exports.smartpath = smartpath;
|
||||
import * as smartfile from '@pushrocks/smartfile';
|
||||
import * as smartpath from '@pushrocks/smartpath';
|
||||
import * as smartrequest from '@pushrocks/smartrequest';
|
||||
import * as smartunique from '@pushrocks/smartunique';
|
||||
import * as streamfunction from '@pushrocks/streamfunction';
|
||||
import * as smartrx from '@pushrocks/smartrx';
|
||||
export { smartfile, smartpath, smartrequest, smartunique, streamfunction, smartrx };
|
||||
// third party scope
|
||||
const tar_1 = __importDefault(require("tar"));
|
||||
exports.tar = tar_1.default;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhcmNoaXZlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGFyY2hpdmUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSxvQkFBb0I7QUFDcEIsZ0RBQXdCO0FBRWYsZUFGRixjQUFJLENBRUU7QUFFYixtQkFBbUI7QUFDbkIsZ0VBQWtEO0FBR3pDLDhCQUFTO0FBRmxCLGdFQUFrRDtBQUU5Qiw4QkFBUztBQUU3QixvQkFBb0I7QUFDcEIsOENBQXNCO0FBRWIsY0FGRixhQUFHLENBRUUifQ==
|
||||
import gunzipMaybe from 'gunzip-maybe';
|
||||
// @ts-ignore
|
||||
import tar from 'tar';
|
||||
import tarStream from 'tar-stream';
|
||||
export { gunzipMaybe, tar, tarStream };
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhcmNoaXZlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGFyY2hpdmUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxvQkFBb0I7QUFDcEIsT0FBTyxLQUFLLElBQUksTUFBTSxNQUFNLENBQUM7QUFFN0IsT0FBTyxFQUFFLElBQUksRUFBRSxDQUFDO0FBRWhCLG1CQUFtQjtBQUNuQixPQUFPLEtBQUssU0FBUyxNQUFNLHNCQUFzQixDQUFDO0FBQ2xELE9BQU8sS0FBSyxTQUFTLE1BQU0sc0JBQXNCLENBQUM7QUFDbEQsT0FBTyxLQUFLLFlBQVksTUFBTSx5QkFBeUIsQ0FBQztBQUN4RCxPQUFPLEtBQUssV0FBVyxNQUFNLHdCQUF3QixDQUFDO0FBQ3RELE9BQU8sS0FBSyxjQUFjLE1BQU0sMkJBQTJCLENBQUM7QUFDNUQsT0FBTyxLQUFLLE9BQU8sTUFBTSxvQkFBb0IsQ0FBQztBQUU5QyxPQUFPLEVBQUUsU0FBUyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsV0FBVyxFQUFFLGNBQWMsRUFBRSxPQUFPLEVBQUUsQ0FBQztBQUVwRixvQkFBb0I7QUFDcEIsT0FBTyxXQUFXLE1BQU0sY0FBYyxDQUFDO0FBRXZDLGFBQWE7QUFDYixPQUFPLEdBQUcsTUFBTSxLQUFLLENBQUM7QUFDdEIsT0FBTyxTQUFTLE1BQU0sWUFBWSxDQUFDO0FBRW5DLE9BQU8sRUFBRSxXQUFXLEVBQUUsR0FBRyxFQUFFLFNBQVMsRUFBRSxDQUFDIn0=
|
37
package-lock.json
generated
37
package-lock.json
generated
@ -16,7 +16,6 @@
|
||||
"@pushrocks/smartunique": "^3.0.3",
|
||||
"@pushrocks/streamfunction": "^4.0.1",
|
||||
"@types/gunzip-maybe": "^1.4.0",
|
||||
"@types/tar": "^6.1.1",
|
||||
"@types/tar-stream": "^2.2.2",
|
||||
"gunzip-maybe": "^1.4.2",
|
||||
"tar": "^6.1.11",
|
||||
@ -4637,15 +4636,6 @@
|
||||
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/minipass": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fminipass/-/minipass-2.2.0.tgz",
|
||||
"integrity": "sha512-wuzZksN4w4kyfoOv/dlpov4NOunwutLA/q7uc00xU02ZyUY+aoM5PWIXEKBMnm0NHd4a+N71BMjq+x7+2Af1fg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "17.0.23",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-17.0.23.tgz",
|
||||
@ -4714,16 +4704,6 @@
|
||||
"integrity": "sha1-gJPuBBam4r8qpjOBCRFLP7/6Dps=",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/tar": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2ftar/-/tar-6.1.1.tgz",
|
||||
"integrity": "sha512-8mto3YZfVpqB1CHMaYz1TUYIQfZFbh/QbEq5Hsn6D0ilCfqRVCdalmc89B7vi3jhl9UYIk+dWDABShNfOkv5HA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/minipass": "*",
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/tar-stream": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2ftar-stream/-/tar-stream-2.2.2.tgz",
|
||||
@ -14436,14 +14416,6 @@
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fminimatch/-/minimatch-3.0.5.tgz",
|
||||
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ=="
|
||||
},
|
||||
"@types/minipass": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fminipass/-/minipass-2.2.0.tgz",
|
||||
"integrity": "sha512-wuzZksN4w4kyfoOv/dlpov4NOunwutLA/q7uc00xU02ZyUY+aoM5PWIXEKBMnm0NHd4a+N71BMjq+x7+2Af1fg==",
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "17.0.23",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-17.0.23.tgz",
|
||||
@ -14503,15 +14475,6 @@
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fshortid/-/shortid-0.0.29.tgz",
|
||||
"integrity": "sha1-gJPuBBam4r8qpjOBCRFLP7/6Dps="
|
||||
},
|
||||
"@types/tar": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2ftar/-/tar-6.1.1.tgz",
|
||||
"integrity": "sha512-8mto3YZfVpqB1CHMaYz1TUYIQfZFbh/QbEq5Hsn6D0ilCfqRVCdalmc89B7vi3jhl9UYIk+dWDABShNfOkv5HA==",
|
||||
"requires": {
|
||||
"@types/minipass": "*",
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/tar-stream": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2ftar-stream/-/tar-stream-2.2.2.tgz",
|
||||
|
@ -7,7 +7,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "(tstest test/ --web)",
|
||||
"build": "tsbuild --web"
|
||||
"build": "tsbuild --web --allowimplicitany"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -27,7 +27,6 @@
|
||||
"@pushrocks/smartunique": "^3.0.3",
|
||||
"@pushrocks/streamfunction": "^4.0.1",
|
||||
"@types/gunzip-maybe": "^1.4.0",
|
||||
"@types/tar": "^6.1.1",
|
||||
"@types/tar-stream": "^2.2.2",
|
||||
"gunzip-maybe": "^1.4.2",
|
||||
"tar": "^6.1.11",
|
||||
|
@ -60,8 +60,9 @@ export class SmartArchive {
|
||||
stream.on('end', () => {
|
||||
replaySubject.next(
|
||||
new plugins.smartfile.Smartfile({
|
||||
base: null, // no working directory for this one
|
||||
contentBuffer: fileBuffer,
|
||||
path: header.name,
|
||||
path: `./${header.name}`
|
||||
})
|
||||
);
|
||||
next();
|
||||
|
@ -15,6 +15,8 @@ export { smartfile, smartpath, smartrequest, smartunique, streamfunction, smartr
|
||||
|
||||
// third party scope
|
||||
import gunzipMaybe from 'gunzip-maybe';
|
||||
|
||||
// @ts-ignore
|
||||
import tar from 'tar';
|
||||
import tarStream from 'tar-stream';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user