fix(core): update
This commit is contained in:
@@ -4,28 +4,27 @@ export interface ISmartBucketConfig {
|
||||
provider: 'google';
|
||||
projectId: string;
|
||||
bucketName: string;
|
||||
};
|
||||
}
|
||||
|
||||
export class SmartBucket {
|
||||
config: ISmartBucketConfig;
|
||||
private _googleBucket
|
||||
private _googleBucket;
|
||||
/**
|
||||
* the constructor of SmartBucket
|
||||
*/
|
||||
constructor(configArg: ISmartBucketConfig) {
|
||||
this.config = configArg;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* initializes the Smartbucket
|
||||
*/
|
||||
async init() {
|
||||
if(this.config.provider === 'google') {
|
||||
if (this.config.provider === 'google') {
|
||||
const storage = new plugins.googleCloudStorage.Storage({
|
||||
projectId: this.config.projectId,
|
||||
})
|
||||
storage.createBucket(this.config.bucketName, () => {})
|
||||
projectId: this.config.projectId
|
||||
});
|
||||
storage.createBucket(this.config.bucketName, () => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,9 @@
|
||||
import * as googleCloudStorage from '@google-cloud/storage';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
|
||||
export {
|
||||
googleCloudStorage,
|
||||
smartpromise
|
||||
}
|
||||
export { smartpromise };
|
||||
|
||||
// third party scope
|
||||
import * as googleCloudStorage from '@google-cloud/storage';
|
||||
import * as minio from 'minio';
|
||||
|
||||
export { googleCloudStorage };
|
||||
|
Reference in New Issue
Block a user