Compare commits

...

2 Commits

Author SHA1 Message Date
9adcdee0a0 3.0.18 2024-06-17 20:00:58 +02:00
786f8d4365 fix(core): update 2024-06-17 20:00:57 +02:00
4 changed files with 8 additions and 7 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@push.rocks/smartbucket",
"version": "3.0.17",
"version": "3.0.18",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@push.rocks/smartbucket",
"version": "3.0.17",
"version": "3.0.18",
"license": "UNLICENSED",
"dependencies": {
"@push.rocks/smartpath": "^5.0.18",

View File

@ -1,6 +1,6 @@
{
"name": "@push.rocks/smartbucket",
"version": "3.0.17",
"version": "3.0.18",
"description": "A TypeScript library offering simple and cloud-agnostic object storage with advanced features like bucket creation, file and directory management, and data streaming.",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartbucket',
version: '3.0.17',
version: '3.0.18',
description: 'A TypeScript library offering simple and cloud-agnostic object storage with advanced features like bucket creation, file and directory management, and data streaming.'
}

View File

@ -14,11 +14,12 @@ export class SmartBucket {
/**
* the constructor of SmartBucket
*/
constructor(configArg: IS3Descriptor) {
constructor(configArg: plugins.tsclass.storage.IS3Descriptor) {
this.config = configArg;
const protocol = configArg.useSsl === false ? 'http' : 'https';
const endpoint = `${protocol}://${configArg.endpoint}`;
const port = configArg.port ? `:${configArg.port}` : '';
const endpoint = `${protocol}://${configArg.endpoint}${port}`;
this.s3Client = new plugins.s3.S3Client({
endpoint,
@ -43,4 +44,4 @@ export class SmartBucket {
public async getBucketByName(bucketName: string) {
return Bucket.getBucketByName(this, bucketName);
}
}
}