fix(core): update
This commit is contained in:
parent
0430a35873
commit
f3e2a8a4f2
8945
package-lock.json
generated
8945
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
17
package.json
17
package.json
@ -9,22 +9,21 @@
|
||||
"license": "UNLICENSED",
|
||||
"scripts": {
|
||||
"test": "(tstest test/)",
|
||||
"build": "(tsbuild --web)"
|
||||
"build": "(tsbuild --web --allowimplicitany)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.61",
|
||||
"@gitzone/tstest": "^1.0.70",
|
||||
"@pushrocks/tapbundle": "^5.0.3",
|
||||
"@pushrocks/qenv": "^4.0.10"
|
||||
"@gitzone/tsbuild": "^2.1.63",
|
||||
"@gitzone/tstest": "^1.0.71",
|
||||
"@pushrocks/qenv": "^4.0.10",
|
||||
"@pushrocks/tapbundle": "^5.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smartpath": "^5.0.5",
|
||||
"@pushrocks/smartpromise": "^3.1.7",
|
||||
"@pushrocks/smartrx": "^2.0.25",
|
||||
"@pushrocks/smartstream": "^2.0.1",
|
||||
"@pushrocks/streamfunction": "^3.0.4",
|
||||
"@types/minio": "^7.0.12",
|
||||
"minio": "^7.0.26"
|
||||
"@pushrocks/smartstream": "^2.0.2",
|
||||
"@types/minio": "^7.0.13",
|
||||
"minio": "^7.0.28"
|
||||
},
|
||||
"private": false,
|
||||
"files": [
|
||||
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartbucket',
|
||||
version: '2.0.2',
|
||||
description: 'simple cloud independent object storage'
|
||||
}
|
@ -50,7 +50,7 @@ export class Bucket {
|
||||
* store file
|
||||
*/
|
||||
public async fastStore(pathArg: string, fileContent: string | Buffer): Promise<void> {
|
||||
const streamIntake = new plugins.streamfunction.Intake();
|
||||
const streamIntake = new plugins.smartstream.StreamIntake();
|
||||
const putPromise = this.smartbucketRef.minioClient
|
||||
.putObject(this.name, pathArg, streamIntake.getReadable())
|
||||
.catch((e) => console.log(e));
|
||||
@ -91,7 +91,7 @@ export class Bucket {
|
||||
.getObject(this.name, pathArg)
|
||||
.catch((e) => console.log(e));
|
||||
const replaySubject = new plugins.smartrx.rxjs.ReplaySubject<Buffer>();
|
||||
const duplexStream = plugins.streamfunction.createDuplexStream<Buffer, Buffer>(
|
||||
const duplexStream = plugins.smartstream.createDuplexStream<Buffer, Buffer>(
|
||||
async (chunk) => {
|
||||
replaySubject.next(chunk);
|
||||
return chunk;
|
||||
@ -106,7 +106,7 @@ export class Bucket {
|
||||
return null;
|
||||
}
|
||||
|
||||
const smartstream = new plugins.smartstream.Smartstream([
|
||||
const smartstream = new plugins.smartstream.StreamWrapper([
|
||||
fileStream,
|
||||
duplexStream,
|
||||
plugins.smartstream.cleanPipe(),
|
||||
|
@ -70,7 +70,7 @@ export class Directory {
|
||||
false
|
||||
);
|
||||
const fileArray: File[] = [];
|
||||
const duplexStream = plugins.streamfunction.createDuplexStream<plugins.minio.BucketItem, void>(
|
||||
const duplexStream = plugins.smartstream.createDuplexStream<plugins.minio.BucketItem, void>(
|
||||
async (bucketItem) => {
|
||||
if (bucketItem.prefix) {
|
||||
return;
|
||||
@ -107,7 +107,7 @@ export class Directory {
|
||||
false
|
||||
);
|
||||
const directoryArray: Directory[] = [];
|
||||
const duplexStream = plugins.streamfunction.createDuplexStream<plugins.minio.BucketItem, void>(
|
||||
const duplexStream = plugins.smartstream.createDuplexStream<plugins.minio.BucketItem, void>(
|
||||
async (bucketItem) => {
|
||||
if (bucketItem.name) {
|
||||
return;
|
||||
|
@ -23,7 +23,7 @@ export class File {
|
||||
fileContent: Buffer
|
||||
) {
|
||||
const filePath = plugins.path.join(directoryRef.getBasePath(), fileName);
|
||||
const streamIntake = new plugins.streamfunction.Intake();
|
||||
const streamIntake = new plugins.smartstream.StreamIntake();
|
||||
const putPromise = directoryRef.bucketRef.smartbucketRef.minioClient
|
||||
.putObject(this.name, filePath, streamIntake.getReadable())
|
||||
.catch((e) => console.log(e));
|
||||
@ -54,8 +54,8 @@ export class File {
|
||||
const fileStream = await this.parentDirectoryRef.bucketRef.smartbucketRef.minioClient
|
||||
.getObject(this.parentDirectoryRef.bucketRef.name, this.path)
|
||||
.catch((e) => console.log(e));
|
||||
let completeFile = new Buffer('');
|
||||
const duplexStream = plugins.streamfunction.createDuplexStream<Buffer, Buffer>(
|
||||
let completeFile = Buffer.from('');
|
||||
const duplexStream = plugins.smartstream.createDuplexStream<Buffer, Buffer>(
|
||||
async (chunk) => {
|
||||
completeFile = Buffer.concat([chunk]);
|
||||
return chunk;
|
||||
|
@ -6,10 +6,9 @@ export { path };
|
||||
import * as smartpath from '@pushrocks/smartpath';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import * as smartrx from '@pushrocks/smartrx';
|
||||
import * as streamfunction from '@pushrocks/streamfunction';
|
||||
import * as smartstream from '@pushrocks/smartstream';
|
||||
|
||||
export { smartpath, smartpromise, smartrx, streamfunction, smartstream };
|
||||
export { smartpath, smartpromise, smartrx, smartstream };
|
||||
|
||||
// third party scope
|
||||
import * as minio from 'minio';
|
||||
|
Loading…
Reference in New Issue
Block a user