fix(core): update
This commit is contained in:
		
							
								
								
									
										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'; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user