@constructive-io/s3-streamer 2.18.0 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/s3.js +7 -18
- package/package.json +3 -3
- package/s3.d.ts +1 -1
- package/s3.js +7 -18
package/esm/s3.js
CHANGED
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createS3Client } from '@constructive-io/s3-utils';
|
|
2
2
|
export default function getS3(opts) {
|
|
3
|
-
|
|
3
|
+
return createS3Client({
|
|
4
|
+
provider: opts.provider || 'minio',
|
|
4
5
|
region: opts.awsRegion,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
secretAccessKey: opts.awsSecretKey,
|
|
10
|
-
},
|
|
11
|
-
}
|
|
12
|
-
: {}),
|
|
13
|
-
...(opts.endpoint
|
|
14
|
-
? {
|
|
15
|
-
endpoint: opts.endpoint,
|
|
16
|
-
forcePathStyle: true,
|
|
17
|
-
}
|
|
18
|
-
: {}),
|
|
19
|
-
};
|
|
20
|
-
return new S3Client(awsConfig);
|
|
6
|
+
accessKeyId: opts.awsAccessKey,
|
|
7
|
+
secretAccessKey: opts.awsSecretKey,
|
|
8
|
+
...(opts.endpoint ? { endpoint: opts.endpoint } : {}),
|
|
9
|
+
});
|
|
21
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/s3-streamer",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "stream files to s3",
|
|
6
6
|
"main": "index.js",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"test:watch": "jest --watch"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@constructive-io/s3-utils": "^2.11.0",
|
|
33
32
|
"@pgpmjs/env": "^2.18.0",
|
|
34
33
|
"glob": "^13.0.6",
|
|
35
34
|
"makage": "^0.3.0"
|
|
@@ -38,6 +37,7 @@
|
|
|
38
37
|
"@aws-sdk/client-s3": "^3.1009.0",
|
|
39
38
|
"@aws-sdk/lib-storage": "^3.1009.0",
|
|
40
39
|
"@constructive-io/content-type-stream": "^2.12.0",
|
|
40
|
+
"@constructive-io/s3-utils": "^2.12.0",
|
|
41
41
|
"@pgpmjs/types": "^2.22.0"
|
|
42
42
|
},
|
|
43
43
|
"keywords": [
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"minio",
|
|
49
49
|
"constructive"
|
|
50
50
|
],
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "434a578648cb04d3ed25e79a75c654f71573292f"
|
|
52
52
|
}
|
package/s3.d.ts
CHANGED
package/s3.js
CHANGED
|
@@ -1,24 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = getS3;
|
|
4
|
-
const
|
|
4
|
+
const s3_utils_1 = require("@constructive-io/s3-utils");
|
|
5
5
|
function getS3(opts) {
|
|
6
|
-
|
|
6
|
+
return (0, s3_utils_1.createS3Client)({
|
|
7
|
+
provider: opts.provider || 'minio',
|
|
7
8
|
region: opts.awsRegion,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
secretAccessKey: opts.awsSecretKey,
|
|
13
|
-
},
|
|
14
|
-
}
|
|
15
|
-
: {}),
|
|
16
|
-
...(opts.endpoint
|
|
17
|
-
? {
|
|
18
|
-
endpoint: opts.endpoint,
|
|
19
|
-
forcePathStyle: true,
|
|
20
|
-
}
|
|
21
|
-
: {}),
|
|
22
|
-
};
|
|
23
|
-
return new client_s3_1.S3Client(awsConfig);
|
|
9
|
+
accessKeyId: opts.awsAccessKey,
|
|
10
|
+
secretAccessKey: opts.awsSecretKey,
|
|
11
|
+
...(opts.endpoint ? { endpoint: opts.endpoint } : {}),
|
|
12
|
+
});
|
|
24
13
|
}
|