@orion-js/file-manager 3.6.0 → 3.6.2
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/lib/credentials.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export interface Credentials {
|
|
|
5
5
|
bucket: string;
|
|
6
6
|
canUpload: Function;
|
|
7
7
|
basePath: string;
|
|
8
|
+
endpoint?: string;
|
|
9
|
+
s3ForcePathStyle?: boolean;
|
|
8
10
|
}
|
|
9
11
|
export declare const setupFileManager: (options: any) => any;
|
|
10
12
|
export declare const getAWSCredentials: () => Partial<Credentials>;
|
|
@@ -40,11 +40,13 @@ exports.default = (0, resolvers_1.resolver)({
|
|
|
40
40
|
}),
|
|
41
41
|
mutation: true,
|
|
42
42
|
async resolve(params, viewer) {
|
|
43
|
-
const { accessKeyId, secretAccessKey, region, bucket, canUpload, basePath } = (0, credentials_1.getAWSCredentials)();
|
|
43
|
+
const { accessKeyId, secretAccessKey, region, bucket, endpoint, s3ForcePathStyle, canUpload, basePath } = (0, credentials_1.getAWSCredentials)();
|
|
44
44
|
const s3 = new aws_sdk_1.default.S3({
|
|
45
45
|
accessKeyId,
|
|
46
46
|
secretAccessKey,
|
|
47
|
-
region
|
|
47
|
+
region,
|
|
48
|
+
endpoint,
|
|
49
|
+
s3ForcePathStyle
|
|
48
50
|
});
|
|
49
51
|
if (canUpload) {
|
|
50
52
|
if (!(await canUpload(params, viewer)))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-js/file-manager",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.2",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"author": "nicolaslopezj",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@orion-js/helpers": "^3.5.3",
|
|
16
|
-
"@orion-js/models": "^3.
|
|
17
|
-
"@orion-js/mongodb": "^3.6.
|
|
18
|
-
"@orion-js/paginated-mongodb": "^3.6.
|
|
19
|
-
"@orion-js/resolvers": "^3.
|
|
20
|
-
"@orion-js/schema": "^3.
|
|
21
|
-
"aws-sdk": "^2.
|
|
16
|
+
"@orion-js/models": "^3.6.1",
|
|
17
|
+
"@orion-js/mongodb": "^3.6.1",
|
|
18
|
+
"@orion-js/paginated-mongodb": "^3.6.1",
|
|
19
|
+
"@orion-js/resolvers": "^3.6.1",
|
|
20
|
+
"@orion-js/schema": "^3.6.1",
|
|
21
|
+
"aws-sdk": "^2.1367.0",
|
|
22
22
|
"escape-string-regexp": "^4.0.0",
|
|
23
23
|
"lodash": "^4.17.21",
|
|
24
24
|
"luxon": "^2.1.1"
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "2ee319d47d7eb4d0da1c50f83d1259896ee644b4"
|
|
42
42
|
}
|