fix(core): update

This commit is contained in:
2023-07-26 16:13:33 +02:00
parent d90e833270
commit fbdb75d673
19 changed files with 1617 additions and 12760 deletions

View File

@ -2,7 +2,7 @@
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartarchive',
version: '3.0.6',
name: '@push.rocks/smartarchive',
version: '3.0.7',
description: 'work with archives'
}

View File

@ -39,7 +39,7 @@ export class SmartArchive {
stream.on('end', () => {
console.log(`extracted ${header.name}`);
next();
})
});
stream.resume();
});
extractPipeStop.on('finish', () => {
@ -48,9 +48,7 @@ export class SmartArchive {
});
// lets run the stream
readableStream
.pipe(plugins.gunzipMaybe())
.pipe(extractPipeStop);
readableStream.pipe(plugins.gunzipMaybe()).pipe(extractPipeStop);
await done.promise;
}
@ -86,7 +84,7 @@ export class SmartArchive {
new plugins.smartfile.Smartfile({
base: null, // no working directory for this one
contentBuffer: fileBuffer,
path: `${header.name}`
path: `${header.name}`,
})
);
next();
@ -97,19 +95,17 @@ export class SmartArchive {
replaySubject.complete();
});
// lets run the stream
readableStream
.pipe(plugins.gunzipMaybe())
.pipe(extractPipeStop);
readableStream.pipe(plugins.gunzipMaybe()).pipe(extractPipeStop);
return {
intake,
replaySubject
replaySubject,
};
}
/**
* extracts to Observable
*/
public async extractArchiveFromUrlToObservable(
public async extractArchiveFromUrlToObservable(
urlArg: string
): Promise<plugins.smartrx.rxjs.ReplaySubject<plugins.smartfile.Smartfile>> {
const response = await plugins.smartrequest.getBinary(urlArg);
@ -118,9 +114,7 @@ export class SmartArchive {
}
// TODO
public async extractArchiveFromUrlToStream() {
}
public async extractArchiveFromUrlToStream() {}
// TODO
public async extractArchiveFromFilePathToStream() {}

View File

@ -1,4 +1,7 @@
import * as plugins from './smartarchive.plugins.js';
export const packageDir = plugins.path.join(plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url), '../');
export const packageDir = plugins.path.join(
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
'../'
);
export const nogitDir = plugins.path.join(packageDir, './.nogit');

View File

@ -4,13 +4,13 @@ import * as path from 'path';
export { path };
// @pushrocks scope
import * as smartfile from '@pushrocks/smartfile';
import * as smartpath from '@pushrocks/smartpath';
import * as smartpromise from '@pushrocks/smartpromise';
import * as smartrequest from '@pushrocks/smartrequest';
import * as smartunique from '@pushrocks/smartunique';
import * as smartstream from '@pushrocks/smartstream';
import * as smartrx from '@pushrocks/smartrx';
import * as smartfile from '@push.rocks/smartfile';
import * as smartpath from '@push.rocks/smartpath';
import * as smartpromise from '@push.rocks/smartpromise';
import * as smartrequest from '@push.rocks/smartrequest';
import * as smartunique from '@push.rocks/smartunique';
import * as smartstream from '@push.rocks/smartstream';
import * as smartrx from '@push.rocks/smartrx';
export { smartfile, smartpath, smartpromise, smartrequest, smartunique, smartstream, smartrx };