@candlerip/shared3 0.0.55 → 0.0.58
Sign up to get free protection for your applications and to get access to all the features.
- package/_devops/docker/docker-publish.sh +1 -1
- package/package.json +1 -1
- package/src/environment/environment-variables/configs/index.d.ts +11 -11
- package/src/environment/environment-variables/configs/index.js +11 -9
- package/src/environment/environment-variables/index.d.ts +1 -1
- package/src/environment/environment-variables/index.js +1 -1
- package/src/environment/environment-variables/singletons/environment-variables-singleton/index.d.ts +2 -0
- package/src/environment/environment-variables/{workers/environment-variables-worker → singletons/environment-variables-singleton}/index.js +2 -1
- package/src/environment/environment-variables/{workers/environment-variables-worker → singletons/environment-variables-singleton}/types.d.ts +1 -1
- package/src/environment/environment-variables/singletons/index.d.ts +1 -0
- package/src/environment/environment-variables/singletons/index.js +1 -0
- package/src/ssr/server-side-props/domains/contact-page-server-side-props/index.d.ts +2 -0
- package/src/environment/environment-variables/workers/environment-variables-worker/index.d.ts +0 -2
- package/src/environment/environment-variables/workers/index.d.ts +0 -1
- package/src/environment/environment-variables/workers/index.js +0 -1
- /package/src/environment/environment-variables/{workers/environment-variables-worker → singletons/environment-variables-singleton}/types.js +0 -0
package/package.json
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
export declare const ENVIRONMENT_VARIABLES: {
|
2
|
-
readonly 'api-gateway': readonly ["API_GATEWAY_PORT", "AUTHENTICATION_AUDIENCE", "AUTHENTICATION_DOMAIN", "CACHE_ENABLED", "DATABASE_URL", "FRONTEND_URL", "RABBITMQ_URL", "REDIS_PWD", "REDIS_URL", "S3_IMAGES_BUCKET_NAME"];
|
3
|
-
readonly backend: readonly ["API_GATEWAY_PORT", "CACHE_SERVICE_PORT", "FRONTEND_PORT", "LOGGER_SERVICE_PORT", "RABBITMQ_PORT", "RABBITMQ_MANAGEMENT_PORT", "REDIS_PORT"];
|
4
|
-
readonly 'backend-init': readonly ["APP_NAME", "DOMAIN_NAME", "S3_IMAGES_BUCKET_NAME"];
|
5
|
-
readonly 'cache-service': readonly ["CACHE_ENABLED", "CACHE_SERVICE_PORT", "DATABASE_URL", "RABBITMQ_URL", "REDIS_PWD", "REDIS_URL"];
|
6
|
-
readonly frontend: readonly ["DATABASE_URL", "FRONTEND_PORT"];
|
7
|
-
readonly images: readonly ["S3_IMAGES_BUCKET_NAME"];
|
8
|
-
readonly 'images-init': readonly ["FRONTEND_URL", "S3_IMAGES_BUCKET_NAME"];
|
9
|
-
readonly 'logger-service': readonly ["DATABASE_URL", "LOGGER_SERVICE_PORT", "RABBITMQ_URL"];
|
10
|
-
readonly nginx: readonly ["FRONTEND_PORT"];
|
11
|
-
readonly rabbitmq: readonly ["RABBITMQ_PORT", "RABBITMQ_MANAGEMENT_PORT", "RABBITMQ_PWD", "RABBITMQ_USER"];
|
12
|
-
readonly redis: readonly ["REDIS_PORT", "REDIS_PWD"];
|
2
|
+
readonly 'api-gateway': readonly ["API_GATEWAY_PORT", "AUTHENTICATION_AUDIENCE", "AUTHENTICATION_DOMAIN", "CACHE_ENABLED", "DATABASE_URL", "FRONTEND_URL", "NODE_ENV", "RABBITMQ_URL", "REDIS_PWD", "REDIS_URL", "S3_IMAGES_BUCKET_NAME"];
|
3
|
+
readonly backend: readonly ["API_GATEWAY_PORT", "CACHE_SERVICE_PORT", "FRONTEND_PORT", "LOGGER_SERVICE_PORT", "NODE_ENV", "RABBITMQ_PORT", "RABBITMQ_MANAGEMENT_PORT", "REDIS_PORT"];
|
4
|
+
readonly 'backend-init': readonly ["APP_NAME", "DOMAIN_NAME", "NODE_ENV", "S3_IMAGES_BUCKET_NAME"];
|
5
|
+
readonly 'cache-service': readonly ["CACHE_ENABLED", "CACHE_SERVICE_PORT", "DATABASE_URL", "NODE_ENV", "RABBITMQ_URL", "REDIS_PWD", "REDIS_URL"];
|
6
|
+
readonly frontend: readonly ["DATABASE_URL", "FRONTEND_PORT", "NODE_ENV"];
|
7
|
+
readonly images: readonly ["NODE_ENV", "S3_IMAGES_BUCKET_NAME"];
|
8
|
+
readonly 'images-init': readonly ["FRONTEND_URL", "NODE_ENV", "S3_IMAGES_BUCKET_NAME"];
|
9
|
+
readonly 'logger-service': readonly ["DATABASE_URL", "LOGGER_SERVICE_PORT", "NODE_ENV", "RABBITMQ_URL"];
|
10
|
+
readonly nginx: readonly ["FRONTEND_PORT", "NODE_ENV"];
|
11
|
+
readonly rabbitmq: readonly ["RABBITMQ_PORT", "RABBITMQ_MANAGEMENT_PORT", "NODE_ENV", "RABBITMQ_PWD", "RABBITMQ_USER"];
|
12
|
+
readonly redis: readonly ["NODE_ENV", "REDIS_PORT", "REDIS_PWD"];
|
13
13
|
};
|
@@ -6,6 +6,7 @@ export const ENVIRONMENT_VARIABLES = {
|
|
6
6
|
'CACHE_ENABLED',
|
7
7
|
'DATABASE_URL',
|
8
8
|
'FRONTEND_URL',
|
9
|
+
'NODE_ENV',
|
9
10
|
'RABBITMQ_URL',
|
10
11
|
'REDIS_PWD',
|
11
12
|
'REDIS_URL',
|
@@ -16,19 +17,20 @@ export const ENVIRONMENT_VARIABLES = {
|
|
16
17
|
'CACHE_SERVICE_PORT',
|
17
18
|
'FRONTEND_PORT',
|
18
19
|
'LOGGER_SERVICE_PORT',
|
20
|
+
'NODE_ENV',
|
19
21
|
'RABBITMQ_PORT',
|
20
22
|
'RABBITMQ_MANAGEMENT_PORT',
|
21
23
|
'REDIS_PORT',
|
22
24
|
],
|
23
|
-
'backend-init': ['APP_NAME', 'DOMAIN_NAME', 'S3_IMAGES_BUCKET_NAME'],
|
24
|
-
'cache-service': ['CACHE_ENABLED', 'CACHE_SERVICE_PORT', 'DATABASE_URL', 'RABBITMQ_URL', 'REDIS_PWD', 'REDIS_URL'],
|
25
|
-
frontend: ['DATABASE_URL', 'FRONTEND_PORT'],
|
26
|
-
images: ['S3_IMAGES_BUCKET_NAME'],
|
27
|
-
'images-init': ['FRONTEND_URL', 'S3_IMAGES_BUCKET_NAME'],
|
28
|
-
'logger-service': ['DATABASE_URL', 'LOGGER_SERVICE_PORT', 'RABBITMQ_URL'],
|
29
|
-
nginx: ['FRONTEND_PORT'],
|
30
|
-
rabbitmq: ['RABBITMQ_PORT', 'RABBITMQ_MANAGEMENT_PORT', 'RABBITMQ_PWD', 'RABBITMQ_USER'],
|
31
|
-
redis: ['REDIS_PORT', 'REDIS_PWD'],
|
25
|
+
'backend-init': ['APP_NAME', 'DOMAIN_NAME', 'NODE_ENV', 'S3_IMAGES_BUCKET_NAME'],
|
26
|
+
'cache-service': ['CACHE_ENABLED', 'CACHE_SERVICE_PORT', 'DATABASE_URL', 'NODE_ENV', 'RABBITMQ_URL', 'REDIS_PWD', 'REDIS_URL'],
|
27
|
+
frontend: ['DATABASE_URL', 'FRONTEND_PORT', 'NODE_ENV'],
|
28
|
+
images: ['NODE_ENV', 'S3_IMAGES_BUCKET_NAME'],
|
29
|
+
'images-init': ['FRONTEND_URL', 'NODE_ENV', 'S3_IMAGES_BUCKET_NAME'],
|
30
|
+
'logger-service': ['DATABASE_URL', 'LOGGER_SERVICE_PORT', 'NODE_ENV', 'RABBITMQ_URL'],
|
31
|
+
nginx: ['FRONTEND_PORT', 'NODE_ENV'],
|
32
|
+
rabbitmq: ['RABBITMQ_PORT', 'RABBITMQ_MANAGEMENT_PORT', 'NODE_ENV', 'RABBITMQ_PWD', 'RABBITMQ_USER'],
|
33
|
+
redis: ['NODE_ENV', 'REDIS_PORT', 'REDIS_PWD'],
|
32
34
|
};
|
33
35
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
34
36
|
const CHECK = ENVIRONMENT_VARIABLES;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { isDevelopment as isDev, isProduction as isProd } from '../../../environment-mode/index.js';
|
2
2
|
import { loadEnvFile } from '../../../env-file/index.js';
|
3
|
-
export const
|
3
|
+
export const EnvironmentVariablesSingleton = (() => {
|
4
4
|
const NODE_ENV = process.env.NODE_ENV;
|
5
5
|
let envs;
|
6
6
|
const get = () => envs;
|
@@ -9,6 +9,7 @@ export const EnvironmentVariablesWorker = (() => {
|
|
9
9
|
if ('customError' in resp) {
|
10
10
|
return resp;
|
11
11
|
}
|
12
|
+
envs = resp.data;
|
12
13
|
return resp;
|
13
14
|
};
|
14
15
|
const isDevelopment = () => isDev(NODE_ENV);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CustomError } from '../../../../error/index.js';
|
2
2
|
import { EnvironmentVariables } from '../../domains/index.js';
|
3
|
-
export type
|
3
|
+
export type IEnvironmentVariablesSingleton = {
|
4
4
|
get: Get;
|
5
5
|
init: Init;
|
6
6
|
isDevelopment: IsDevelopment;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './environment-variables-singleton/index.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './environment-variables-singleton/index.js';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './environment-variables-worker/index.js';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './environment-variables-worker/index.js';
|