graphile-upload-plugin 0.5.34 → 0.6.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.
@@ -5,13 +5,14 @@ export class Uploader {
5
5
  streamerInstance;
6
6
  constructor(opts) {
7
7
  this.opts = opts;
8
- const { bucketName, awsRegion, awsSecretKey, awsAccessKey, minioEndpoint } = this.opts;
8
+ const { bucketName, awsRegion, awsSecretKey, awsAccessKey, minioEndpoint, provider } = this.opts;
9
9
  this.streamerInstance = new streamer({
10
10
  defaultBucket: bucketName,
11
11
  awsRegion,
12
12
  awsSecretKey,
13
13
  awsAccessKey,
14
14
  minioEndpoint,
15
+ provider,
15
16
  });
16
17
  }
17
18
  async resolveUpload(upload, _args, _context, info) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphile-upload-plugin",
3
- "version": "0.5.34",
3
+ "version": "0.6.0",
4
4
  "description": "Graphile upload plugin for PostGraphile",
5
5
  "author": "Constructive <developers@constructive.io>",
6
6
  "homepage": "https://github.com/constructive-io/constructive",
@@ -40,20 +40,21 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@aws-sdk/client-s3": "^3.958.0",
43
- "@constructive-io/graphql-env": "^2.8.11",
44
- "@constructive-io/s3-utils": "^2.3.8",
43
+ "@constructive-io/graphql-env": "^2.8.12",
44
+ "@constructive-io/s3-utils": "^2.4.0",
45
45
  "@types/pg": "^8.16.0",
46
- "graphile-test": "^2.11.34",
46
+ "graphile-test": "^2.11.36",
47
47
  "graphql-tag": "^2.12.6",
48
48
  "makage": "^0.1.9",
49
- "pgsql-test": "^2.20.4",
49
+ "pgsql-test": "^2.20.6",
50
50
  "ts-jest": "^29.4.6"
51
51
  },
52
52
  "dependencies": {
53
- "@constructive-io/s3-streamer": "^2.8.13",
53
+ "@constructive-io/s3-streamer": "^2.9.0",
54
54
  "@constructive-io/upload-names": "^2.3.5",
55
+ "@pgpmjs/types": "^2.13.0",
55
56
  "graphile-build": "^4.14.1",
56
57
  "graphql": "15.10.1"
57
58
  },
58
- "gitHead": "324881a46912b7d15a76f864aada03ce926f9176"
59
+ "gitHead": "f04912cac2edf6435c6add5a6ec65a11d6b79df2"
59
60
  }
@@ -1,9 +1,11 @@
1
+ import type { BucketProvider } from '@pgpmjs/types';
1
2
  export interface UploaderOptions {
2
3
  bucketName: string;
3
4
  awsRegion: string;
4
5
  awsSecretKey: string;
5
6
  awsAccessKey: string;
6
7
  minioEndpoint?: string;
8
+ provider?: BucketProvider;
7
9
  }
8
10
  export declare class Uploader {
9
11
  private opts;
@@ -11,13 +11,14 @@ class Uploader {
11
11
  streamerInstance;
12
12
  constructor(opts) {
13
13
  this.opts = opts;
14
- const { bucketName, awsRegion, awsSecretKey, awsAccessKey, minioEndpoint } = this.opts;
14
+ const { bucketName, awsRegion, awsSecretKey, awsAccessKey, minioEndpoint, provider } = this.opts;
15
15
  this.streamerInstance = new s3_streamer_1.default({
16
16
  defaultBucket: bucketName,
17
17
  awsRegion,
18
18
  awsSecretKey,
19
19
  awsAccessKey,
20
20
  minioEndpoint,
21
+ provider,
21
22
  });
22
23
  }
23
24
  async resolveUpload(upload, _args, _context, info) {