graphile-settings 6.21.8 → 6.21.9
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/upload-resolver.d.ts +4 -3
- package/esm/upload-resolver.js +11 -10
- package/package.json +20 -20
- package/upload-resolver.d.ts +4 -3
- package/upload-resolver.js +11 -10
package/esm/upload-resolver.d.ts
CHANGED
|
@@ -20,9 +20,10 @@
|
|
|
20
20
|
* ENV VARS (S3 connection only):
|
|
21
21
|
* BUCKET_PROVIDER - 'minio' | 's3' (default: 'minio')
|
|
22
22
|
* AWS_REGION - AWS region (default: 'us-east-1')
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* Defaults come from `pgpmDefaults.cdn` (dev-only values; set these in production).
|
|
24
|
+
* AWS_ACCESS_KEY - access key
|
|
25
|
+
* AWS_SECRET_KEY - secret key
|
|
26
|
+
* CDN_ENDPOINT - S3-compatible endpoint
|
|
26
27
|
*/
|
|
27
28
|
import type { UploadFieldDefinition } from 'graphile-upload-plugin';
|
|
28
29
|
/**
|
package/esm/upload-resolver.js
CHANGED
|
@@ -20,9 +20,10 @@
|
|
|
20
20
|
* ENV VARS (S3 connection only):
|
|
21
21
|
* BUCKET_PROVIDER - 'minio' | 's3' (default: 'minio')
|
|
22
22
|
* AWS_REGION - AWS region (default: 'us-east-1')
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* Defaults come from `pgpmDefaults.cdn` (dev-only values; set these in production).
|
|
24
|
+
* AWS_ACCESS_KEY - access key
|
|
25
|
+
* AWS_SECRET_KEY - secret key
|
|
26
|
+
* CDN_ENDPOINT - S3-compatible endpoint
|
|
26
27
|
*/
|
|
27
28
|
import { getEnvOptions } from '@constructive-io/graphql-env';
|
|
28
29
|
import Streamer from '@constructive-io/s3-streamer';
|
|
@@ -45,18 +46,18 @@ let streamer = null;
|
|
|
45
46
|
function getStreamer() {
|
|
46
47
|
if (streamer)
|
|
47
48
|
return streamer;
|
|
48
|
-
const { cdn
|
|
49
|
+
const { cdn } = getEnvOptions();
|
|
49
50
|
if (process.env.NODE_ENV === 'production' && (!cdn.awsAccessKey || !cdn.awsSecretKey)) {
|
|
50
|
-
log.warn('[upload-resolver] WARNING:
|
|
51
|
+
log.warn('[upload-resolver] WARNING: CDN credentials not configured in production.');
|
|
51
52
|
}
|
|
52
|
-
const provider = cdn.provider
|
|
53
|
+
const provider = cdn.provider;
|
|
53
54
|
log.info(`[upload-resolver] Initializing: provider=${provider}`);
|
|
54
55
|
streamer = new Streamer({
|
|
55
56
|
provider,
|
|
56
|
-
awsRegion: cdn.awsRegion
|
|
57
|
-
awsAccessKey: cdn.awsAccessKey
|
|
58
|
-
awsSecretKey: cdn.awsSecretKey
|
|
59
|
-
endpoint: cdn.endpoint
|
|
57
|
+
awsRegion: cdn.awsRegion,
|
|
58
|
+
awsAccessKey: cdn.awsAccessKey,
|
|
59
|
+
awsSecretKey: cdn.awsSecretKey,
|
|
60
|
+
endpoint: cdn.endpoint,
|
|
60
61
|
});
|
|
61
62
|
return streamer;
|
|
62
63
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphile-settings",
|
|
3
|
-
"version": "6.21.
|
|
3
|
+
"version": "6.21.9",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "graphile settings",
|
|
6
6
|
"main": "index.js",
|
|
@@ -30,38 +30,38 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@aws-sdk/client-s3": "^3.1052.0",
|
|
33
|
-
"@constructive-io/bucket-provisioner": "^0.28.
|
|
34
|
-
"@constructive-io/graphql-env": "^3.32.
|
|
35
|
-
"@constructive-io/graphql-types": "^3.31.
|
|
36
|
-
"@constructive-io/s3-streamer": "^2.42.
|
|
37
|
-
"@constructive-io/s3-utils": "^2.33.
|
|
33
|
+
"@constructive-io/bucket-provisioner": "^0.28.1",
|
|
34
|
+
"@constructive-io/graphql-env": "^3.32.2",
|
|
35
|
+
"@constructive-io/graphql-types": "^3.31.2",
|
|
36
|
+
"@constructive-io/s3-streamer": "^2.42.6",
|
|
37
|
+
"@constructive-io/s3-utils": "^2.33.1",
|
|
38
38
|
"@constructive-io/upload-names": "^2.30.1",
|
|
39
39
|
"@dataplan/json": "1.0.1",
|
|
40
40
|
"@dataplan/pg": "1.1.1",
|
|
41
41
|
"@graphile-contrib/pg-many-to-many": "2.0.0-rc.2",
|
|
42
42
|
"@pgpmjs/logger": "^2.25.1",
|
|
43
|
-
"@pgpmjs/types": "^2.53.
|
|
43
|
+
"@pgpmjs/types": "^2.53.4",
|
|
44
44
|
"@pgsql/quotes": "^18.2.4",
|
|
45
45
|
"cors": "^2.8.6",
|
|
46
46
|
"express": "^5.2.1",
|
|
47
47
|
"grafast": "1.1.2",
|
|
48
48
|
"grafserv": "1.0.1",
|
|
49
|
-
"graphile-bucket-provisioner-plugin": "1.15.
|
|
49
|
+
"graphile-bucket-provisioner-plugin": "1.15.3",
|
|
50
50
|
"graphile-build": "5.1.1",
|
|
51
51
|
"graphile-build-pg": "5.1.3",
|
|
52
|
-
"graphile-bulk-mutations": "^1.14.
|
|
52
|
+
"graphile-bulk-mutations": "^1.14.7",
|
|
53
53
|
"graphile-config": "1.1.0",
|
|
54
|
-
"graphile-connection-filter": "^2.14.
|
|
55
|
-
"graphile-history": "^1.6.
|
|
56
|
-
"graphile-i18n": "^2.15.
|
|
57
|
-
"graphile-llm": "^1.15.
|
|
58
|
-
"graphile-ltree": "^2.14.
|
|
54
|
+
"graphile-connection-filter": "^2.14.7",
|
|
55
|
+
"graphile-history": "^1.6.7",
|
|
56
|
+
"graphile-i18n": "^2.15.2",
|
|
57
|
+
"graphile-llm": "^1.15.9",
|
|
58
|
+
"graphile-ltree": "^2.14.7",
|
|
59
59
|
"graphile-meta": "^1.9.2",
|
|
60
|
-
"graphile-pg-aggregates": "^2.14.
|
|
61
|
-
"graphile-postgis": "^3.15.
|
|
62
|
-
"graphile-presigned-url-plugin": "^1.19.
|
|
60
|
+
"graphile-pg-aggregates": "^2.14.7",
|
|
61
|
+
"graphile-postgis": "^3.15.7",
|
|
62
|
+
"graphile-presigned-url-plugin": "^1.19.1",
|
|
63
63
|
"graphile-realtime-subscriptions": "^1.11.1",
|
|
64
|
-
"graphile-search": "^2.14.
|
|
64
|
+
"graphile-search": "^2.14.7",
|
|
65
65
|
"graphile-upload-plugin": "^2.26.1",
|
|
66
66
|
"graphile-utils": "5.0.3",
|
|
67
67
|
"graphql": "16.13.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@types/express": "^5.0.6",
|
|
81
81
|
"@types/pg": "^8.20.4",
|
|
82
82
|
"@types/request-ip": "^0.0.41",
|
|
83
|
-
"graphile-test": "^5.14.
|
|
83
|
+
"graphile-test": "^5.14.7",
|
|
84
84
|
"makage": "^0.8.0",
|
|
85
85
|
"nodemon": "^3.1.14",
|
|
86
86
|
"ts-node": "^10.9.2"
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"constructive",
|
|
93
93
|
"graphql"
|
|
94
94
|
],
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "9bba983b38395277e0400294aaa380e586b049d4"
|
|
96
96
|
}
|
package/upload-resolver.d.ts
CHANGED
|
@@ -20,9 +20,10 @@
|
|
|
20
20
|
* ENV VARS (S3 connection only):
|
|
21
21
|
* BUCKET_PROVIDER - 'minio' | 's3' (default: 'minio')
|
|
22
22
|
* AWS_REGION - AWS region (default: 'us-east-1')
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* Defaults come from `pgpmDefaults.cdn` (dev-only values; set these in production).
|
|
24
|
+
* AWS_ACCESS_KEY - access key
|
|
25
|
+
* AWS_SECRET_KEY - secret key
|
|
26
|
+
* CDN_ENDPOINT - S3-compatible endpoint
|
|
26
27
|
*/
|
|
27
28
|
import type { UploadFieldDefinition } from 'graphile-upload-plugin';
|
|
28
29
|
/**
|
package/upload-resolver.js
CHANGED
|
@@ -21,9 +21,10 @@
|
|
|
21
21
|
* ENV VARS (S3 connection only):
|
|
22
22
|
* BUCKET_PROVIDER - 'minio' | 's3' (default: 'minio')
|
|
23
23
|
* AWS_REGION - AWS region (default: 'us-east-1')
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* Defaults come from `pgpmDefaults.cdn` (dev-only values; set these in production).
|
|
25
|
+
* AWS_ACCESS_KEY - access key
|
|
26
|
+
* AWS_SECRET_KEY - secret key
|
|
27
|
+
* CDN_ENDPOINT - S3-compatible endpoint
|
|
27
28
|
*/
|
|
28
29
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
30
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -51,18 +52,18 @@ let streamer = null;
|
|
|
51
52
|
function getStreamer() {
|
|
52
53
|
if (streamer)
|
|
53
54
|
return streamer;
|
|
54
|
-
const { cdn
|
|
55
|
+
const { cdn } = (0, graphql_env_1.getEnvOptions)();
|
|
55
56
|
if (process.env.NODE_ENV === 'production' && (!cdn.awsAccessKey || !cdn.awsSecretKey)) {
|
|
56
|
-
log.warn('[upload-resolver] WARNING:
|
|
57
|
+
log.warn('[upload-resolver] WARNING: CDN credentials not configured in production.');
|
|
57
58
|
}
|
|
58
|
-
const provider = cdn.provider
|
|
59
|
+
const provider = cdn.provider;
|
|
59
60
|
log.info(`[upload-resolver] Initializing: provider=${provider}`);
|
|
60
61
|
streamer = new s3_streamer_1.default({
|
|
61
62
|
provider,
|
|
62
|
-
awsRegion: cdn.awsRegion
|
|
63
|
-
awsAccessKey: cdn.awsAccessKey
|
|
64
|
-
awsSecretKey: cdn.awsSecretKey
|
|
65
|
-
endpoint: cdn.endpoint
|
|
63
|
+
awsRegion: cdn.awsRegion,
|
|
64
|
+
awsAccessKey: cdn.awsAccessKey,
|
|
65
|
+
awsSecretKey: cdn.awsSecretKey,
|
|
66
|
+
endpoint: cdn.endpoint,
|
|
66
67
|
});
|
|
67
68
|
return streamer;
|
|
68
69
|
}
|