@candlerip/shared3 0.0.51 → 0.0.53
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/environment/env-file/utils/load-env-file/index.d.ts +8 -2
- package/src/environment/env-file/utils/load-env-file/index.js +11 -10
- package/src/environment/environment-variable/configs/index.d.ts +23 -0
- package/src/environment/environment-variable/configs/index.js +23 -0
- package/src/{project/project-config → environment/environment-variable}/index.d.ts +0 -1
- package/src/{project/project-config → environment/environment-variable}/index.js +0 -1
- package/src/environment/environment-variable-name/configs/index.d.ts +2 -3
- package/src/environment/environment-variable-name/configs/index.js +2 -3
- package/src/environment/environment-variables/configs/index.d.ts +11 -20
- package/src/environment/environment-variables/configs/index.js +32 -20
- package/src/environment/environment-variables/domains/index.d.ts +12 -3
- package/src/environment/environment-variables/index.d.ts +1 -0
- package/src/environment/environment-variables/index.js +1 -0
- package/src/environment/environment-variables/workers/environment-variables-worker/index.js +5 -11
- package/src/environment/environment-variables/workers/environment-variables-worker/types.d.ts +4 -3
- package/src/project/index.d.ts +0 -1
- package/src/project/index.js +0 -1
- package/src/type/index.d.ts +0 -1
- package/src/type/index.js +0 -1
- package/src/environment/env-file/utils/load-env-file/types.d.ts +0 -7
- package/src/environment/env-file/utils/load-env-file/types.js +0 -1
- package/src/environment/environment-variable-name/configs/boolean-environment-variable-names/index.d.ts +0 -1
- package/src/environment/environment-variable-name/configs/boolean-environment-variable-names/index.js +0 -2
- package/src/environment/environment-variable-name/configs/environment-variable-names/index.d.ts +0 -2
- package/src/environment/environment-variable-name/configs/environment-variable-names/index.js +0 -2
- package/src/environment/environment-variable-name/configs/number-environment-variable-names/index.d.ts +0 -1
- package/src/environment/environment-variable-name/configs/number-environment-variable-names/index.js +0 -2
- package/src/project/project-config/configs/index.d.ts +0 -2
- package/src/project/project-config/configs/index.js +0 -2
- package/src/project/project-config/configs/project-config/index.d.ts +0 -35
- package/src/project/project-config/configs/project-config/index.js +0 -54
- package/src/project/project-config/configs/project-config-names/index.d.ts +0 -2
- package/src/project/project-config/configs/project-config-names/index.js +0 -2
- package/src/project/project-config/domains/index.d.ts +0 -2
- package/src/project/project-config/domains/index.js +0 -2
- package/src/project/project-config/domains/project-config/index.d.ts +0 -6
- package/src/project/project-config/domains/project-config/index.js +0 -1
- package/src/project/project-config/domains/project-config-name/index.d.ts +0 -2
- package/src/project/project-config/domains/project-config-name/index.js +0 -1
- package/src/type/type-map/domains/index.d.ts +0 -5
- package/src/type/type-map/domains/index.js +0 -1
- package/src/type/type-map/index.d.ts +0 -1
- package/src/type/type-map/index.js +0 -1
package/package.json
CHANGED
@@ -1,2 +1,8 @@
|
|
1
|
-
import {
|
2
|
-
|
1
|
+
import { CustomError } from '../../../../error/index.js';
|
2
|
+
import { EnvironmentMode } from '../../../environment-mode/index.js';
|
3
|
+
import { EnvironmentVariables } from '../../../environment-variables/index.js';
|
4
|
+
export declare const loadEnvFile: <K extends keyof EnvironmentVariables = never, D = EnvironmentVariables[K]>(environmentMode: EnvironmentMode) => {
|
5
|
+
data: D;
|
6
|
+
} | {
|
7
|
+
customError: CustomError;
|
8
|
+
};
|
@@ -1,26 +1,27 @@
|
|
1
1
|
import * as dotenv from 'dotenv';
|
2
|
-
import { BOOLEAN_ENVIRONMENT_VARIABLE_NAMES, NUMBER_ENVIRONMENT_VARIABLE_NAMES } from '../../../environment-variable-name/index.js';
|
3
2
|
import { customErrorWorker } from '../../../../error/index.js';
|
3
|
+
import { ENVIRONMENT_VARIABLE } from '../../../environment-variable/index.js';
|
4
4
|
export const loadEnvFile = (environmentMode) => {
|
5
5
|
const { composeCustomError } = customErrorWorker({ environmentMode });
|
6
6
|
const fileName = `.env.${environmentMode}`;
|
7
7
|
const envFile = dotenv.config({ path: `./${fileName}` });
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
9
8
|
const { error: err, parsed } = envFile;
|
10
9
|
if (err || !parsed) {
|
11
10
|
return composeCustomError(`Error loading ${fileName}`, { err });
|
12
11
|
}
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
const data = {};
|
13
|
+
Object.keys(parsed).forEach((key) => {
|
14
|
+
if (ENVIRONMENT_VARIABLE[key] === 'boolean') {
|
15
|
+
data[key] = Boolean(parsed[key] === 'true');
|
16
|
+
return;
|
16
17
|
}
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
parsed[it] = Boolean(parsed[it] === 'true');
|
18
|
+
if (ENVIRONMENT_VARIABLE[key] === 'number') {
|
19
|
+
data[key] = parseInt(parsed[key]);
|
20
|
+
return;
|
21
21
|
}
|
22
|
+
data[key] = parsed[key];
|
22
23
|
});
|
23
24
|
return {
|
24
|
-
data:
|
25
|
+
data: data,
|
25
26
|
};
|
26
27
|
};
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export declare const ENVIRONMENT_VARIABLE: {
|
2
|
+
readonly API_GATEWAY_PORT: "number";
|
3
|
+
readonly APP_NAME: "string";
|
4
|
+
readonly AUTHENTICATION_AUDIENCE: "string";
|
5
|
+
readonly AUTHENTICATION_DOMAIN: "string";
|
6
|
+
readonly CACHE_ENABLED: "boolean";
|
7
|
+
readonly CACHE_SERVICE_PORT: "number";
|
8
|
+
readonly DATABASE_URL: "string";
|
9
|
+
readonly DOMAIN_NAME: "string";
|
10
|
+
readonly FRONTEND_PORT: "number";
|
11
|
+
readonly FRONTEND_URL: "string";
|
12
|
+
readonly LOGGER_SERVICE_PORT: "number";
|
13
|
+
readonly NODE_ENV: "EnvironmentMode";
|
14
|
+
readonly RABBITMQ_MANAGEMENT_PORT: "number";
|
15
|
+
readonly RABBITMQ_PORT: "number";
|
16
|
+
readonly RABBITMQ_PWD: "string";
|
17
|
+
readonly RABBITMQ_URL: "string";
|
18
|
+
readonly RABBITMQ_USER: "string";
|
19
|
+
readonly REDIS_PORT: "number";
|
20
|
+
readonly REDIS_PWD: "string";
|
21
|
+
readonly REDIS_URL: "string";
|
22
|
+
readonly S3_IMAGES_BUCKET_NAME: "string";
|
23
|
+
};
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export const ENVIRONMENT_VARIABLE = {
|
2
|
+
API_GATEWAY_PORT: 'number',
|
3
|
+
APP_NAME: 'string',
|
4
|
+
AUTHENTICATION_AUDIENCE: 'string',
|
5
|
+
AUTHENTICATION_DOMAIN: 'string',
|
6
|
+
CACHE_ENABLED: 'boolean',
|
7
|
+
CACHE_SERVICE_PORT: 'number',
|
8
|
+
DATABASE_URL: 'string',
|
9
|
+
DOMAIN_NAME: 'string',
|
10
|
+
FRONTEND_PORT: 'number',
|
11
|
+
FRONTEND_URL: 'string',
|
12
|
+
LOGGER_SERVICE_PORT: 'number',
|
13
|
+
NODE_ENV: 'EnvironmentMode',
|
14
|
+
RABBITMQ_MANAGEMENT_PORT: 'number',
|
15
|
+
RABBITMQ_PORT: 'number',
|
16
|
+
RABBITMQ_PWD: 'string',
|
17
|
+
RABBITMQ_URL: 'string',
|
18
|
+
RABBITMQ_USER: 'string',
|
19
|
+
REDIS_PORT: 'number',
|
20
|
+
REDIS_PWD: 'string',
|
21
|
+
REDIS_URL: 'string',
|
22
|
+
S3_IMAGES_BUCKET_NAME: 'string',
|
23
|
+
};
|
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
export
|
3
|
-
export * from './number-environment-variable-names/index.js';
|
1
|
+
import { ENVIRONMENT_VARIABLE } from '../../environment-variable/configs/index.js';
|
2
|
+
export declare const ENVIRONMENT_VARIABLE_NAMES: Array<keyof typeof ENVIRONMENT_VARIABLE>;
|
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
export
|
3
|
-
export * from './number-environment-variable-names/index.js';
|
1
|
+
import { ENVIRONMENT_VARIABLE } from '../../environment-variable/configs/index.js';
|
2
|
+
export const ENVIRONMENT_VARIABLE_NAMES = Object.keys(ENVIRONMENT_VARIABLE);
|
@@ -1,22 +1,13 @@
|
|
1
1
|
export declare const ENVIRONMENT_VARIABLES: {
|
2
|
-
readonly
|
3
|
-
readonly
|
4
|
-
readonly
|
5
|
-
readonly
|
6
|
-
readonly
|
7
|
-
readonly
|
8
|
-
readonly
|
9
|
-
readonly
|
10
|
-
readonly
|
11
|
-
readonly
|
12
|
-
readonly
|
13
|
-
readonly RABBITMQ_MANAGEMENT_PORT: "number";
|
14
|
-
readonly RABBITMQ_PORT: "number";
|
15
|
-
readonly RABBITMQ_PWD: "string";
|
16
|
-
readonly RABBITMQ_URL: "string";
|
17
|
-
readonly RABBITMQ_USER: "string";
|
18
|
-
readonly REDIS_PORT: "number";
|
19
|
-
readonly REDIS_PWD: "string";
|
20
|
-
readonly REDIS_URL: "string";
|
21
|
-
readonly S3_IMAGES_BUCKET_NAME: "string";
|
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"];
|
22
13
|
};
|
@@ -1,22 +1,34 @@
|
|
1
1
|
export const ENVIRONMENT_VARIABLES = {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
2
|
+
'api-gateway': [
|
3
|
+
'API_GATEWAY_PORT',
|
4
|
+
'AUTHENTICATION_AUDIENCE',
|
5
|
+
'AUTHENTICATION_DOMAIN',
|
6
|
+
'CACHE_ENABLED',
|
7
|
+
'DATABASE_URL',
|
8
|
+
'FRONTEND_URL',
|
9
|
+
'RABBITMQ_URL',
|
10
|
+
'REDIS_PWD',
|
11
|
+
'REDIS_URL',
|
12
|
+
'S3_IMAGES_BUCKET_NAME',
|
13
|
+
],
|
14
|
+
backend: [
|
15
|
+
'API_GATEWAY_PORT',
|
16
|
+
'CACHE_SERVICE_PORT',
|
17
|
+
'FRONTEND_PORT',
|
18
|
+
'LOGGER_SERVICE_PORT',
|
19
|
+
'RABBITMQ_PORT',
|
20
|
+
'RABBITMQ_MANAGEMENT_PORT',
|
21
|
+
'REDIS_PORT',
|
22
|
+
],
|
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'],
|
22
32
|
};
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
34
|
+
const CHECK = ENVIRONMENT_VARIABLES;
|
@@ -1,6 +1,15 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { EnvironmentMode } from '../../environment-mode/index.js';
|
2
|
+
import { ENVIRONMENT_VARIABLE } from '../../environment-variable/configs/index.js';
|
3
3
|
import { ENVIRONMENT_VARIABLES } from '../configs/index.js';
|
4
4
|
export type EnvironmentVariables = {
|
5
|
-
[key in
|
5
|
+
[key in keyof typeof ENVIRONMENT_VARIABLES]: {
|
6
|
+
[key2 in (typeof ENVIRONMENT_VARIABLES)[key][number]]: TypeMap[(typeof ENVIRONMENT_VARIABLE)[key2]];
|
7
|
+
};
|
6
8
|
};
|
9
|
+
interface TypeMap {
|
10
|
+
boolean: boolean;
|
11
|
+
EnvironmentMode: EnvironmentMode;
|
12
|
+
number: number;
|
13
|
+
string: string;
|
14
|
+
}
|
15
|
+
export {};
|
@@ -1,24 +1,18 @@
|
|
1
1
|
import { isDevelopment as isDev, isProduction as isProd } from '../../../environment-mode/index.js';
|
2
2
|
import { loadEnvFile } from '../../../env-file/index.js';
|
3
3
|
export const EnvironmentVariablesWorker = (() => {
|
4
|
-
const
|
4
|
+
const NODE_ENV = process.env.NODE_ENV;
|
5
5
|
let envs;
|
6
6
|
const get = () => envs;
|
7
7
|
const init = () => {
|
8
|
-
const resp = loadEnvFile(
|
8
|
+
const resp = loadEnvFile(NODE_ENV);
|
9
9
|
if ('customError' in resp) {
|
10
10
|
return resp;
|
11
11
|
}
|
12
|
-
|
13
|
-
...resp.data,
|
14
|
-
ENVIRONMENT_MODE,
|
15
|
-
};
|
16
|
-
return {
|
17
|
-
data: envs,
|
18
|
-
};
|
12
|
+
return resp;
|
19
13
|
};
|
20
|
-
const isDevelopment = () => isDev(
|
21
|
-
const isProduction = () => isProd(
|
14
|
+
const isDevelopment = () => isDev(NODE_ENV);
|
15
|
+
const isProduction = () => isProd(NODE_ENV);
|
22
16
|
return {
|
23
17
|
get,
|
24
18
|
init,
|
package/src/environment/environment-variables/workers/environment-variables-worker/types.d.ts
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
import { CustomError } from '../../../../error/index.js';
|
2
|
+
import { EnvironmentVariables } from '../../domains/index.js';
|
2
3
|
export type IEnvironmentVariablesWorker = {
|
3
4
|
get: Get;
|
4
5
|
init: Init;
|
5
6
|
isDevelopment: IsDevelopment;
|
6
7
|
isProduction: IsProduction;
|
7
8
|
};
|
8
|
-
export type Get = <T = never>() => T;
|
9
|
-
export type Init = <T = never>() => {
|
10
|
-
data: T;
|
9
|
+
export type Get = <T extends keyof EnvironmentVariables = never>() => EnvironmentVariables[T];
|
10
|
+
export type Init = <T extends keyof EnvironmentVariables = never>() => {
|
11
|
+
data: EnvironmentVariables[T];
|
11
12
|
} | {
|
12
13
|
customError: CustomError;
|
13
14
|
};
|
package/src/project/index.d.ts
CHANGED
package/src/project/index.js
CHANGED
package/src/type/index.d.ts
CHANGED
package/src/type/index.js
CHANGED
@@ -1,7 +0,0 @@
|
|
1
|
-
import { CustomError } from '../../../../error/index.js';
|
2
|
-
import { EnvironmentMode } from '../../../environment-mode/index.js';
|
3
|
-
export type LoadEnvFile = <T extends Record<string, unknown>>(environmentMode: EnvironmentMode) => {
|
4
|
-
data: T;
|
5
|
-
} | {
|
6
|
-
customError: CustomError;
|
7
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const BOOLEAN_ENVIRONMENT_VARIABLE_NAMES: ("API_GATEWAY_PORT" | "AUTHENTICATION_AUDIENCE" | "AUTHENTICATION_DOMAIN" | "CACHE_ENABLED" | "DATABASE_URL" | "FRONTEND_URL" | "RABBITMQ_URL" | "REDIS_PWD" | "REDIS_URL" | "S3_IMAGES_BUCKET_NAME" | "CACHE_SERVICE_PORT" | "FRONTEND_PORT" | "LOGGER_SERVICE_PORT" | "RABBITMQ_PORT" | "RABBITMQ_MANAGEMENT_PORT" | "REDIS_PORT" | "APP_NAME" | "DOMAIN_NAME" | "RABBITMQ_PWD" | "RABBITMQ_USER")[];
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const NUMBER_ENVIRONMENT_VARIABLE_NAMES: ("API_GATEWAY_PORT" | "AUTHENTICATION_AUDIENCE" | "AUTHENTICATION_DOMAIN" | "CACHE_ENABLED" | "DATABASE_URL" | "FRONTEND_URL" | "RABBITMQ_URL" | "REDIS_PWD" | "REDIS_URL" | "S3_IMAGES_BUCKET_NAME" | "CACHE_SERVICE_PORT" | "FRONTEND_PORT" | "LOGGER_SERVICE_PORT" | "RABBITMQ_PORT" | "RABBITMQ_MANAGEMENT_PORT" | "REDIS_PORT" | "APP_NAME" | "DOMAIN_NAME" | "RABBITMQ_PWD" | "RABBITMQ_USER")[];
|
@@ -1,35 +0,0 @@
|
|
1
|
-
export declare const PROJECT_CONFIG: {
|
2
|
-
readonly 'api-gateway-project-config': {
|
3
|
-
readonly environmentVariableNames: readonly ["API_GATEWAY_PORT", "AUTHENTICATION_AUDIENCE", "AUTHENTICATION_DOMAIN", "CACHE_ENABLED", "DATABASE_URL", "FRONTEND_URL", "RABBITMQ_URL", "REDIS_PWD", "REDIS_URL", "S3_IMAGES_BUCKET_NAME"];
|
4
|
-
};
|
5
|
-
readonly 'backend-project-config': {
|
6
|
-
readonly environmentVariableNames: readonly ["API_GATEWAY_PORT", "CACHE_SERVICE_PORT", "FRONTEND_PORT", "LOGGER_SERVICE_PORT", "RABBITMQ_PORT", "RABBITMQ_MANAGEMENT_PORT", "REDIS_PORT"];
|
7
|
-
};
|
8
|
-
readonly 'backend-init-project-config': {
|
9
|
-
readonly environmentVariableNames: readonly ["APP_NAME", "DOMAIN_NAME", "S3_IMAGES_BUCKET_NAME"];
|
10
|
-
};
|
11
|
-
readonly 'cache-service-project-config': {
|
12
|
-
readonly environmentVariableNames: readonly ["CACHE_ENABLED", "CACHE_SERVICE_PORT", "DATABASE_URL", "RABBITMQ_URL", "REDIS_PWD", "REDIS_URL"];
|
13
|
-
};
|
14
|
-
readonly 'frontend-project-config': {
|
15
|
-
readonly environmentVariableNames: readonly ["DATABASE_URL", "FRONTEND_PORT"];
|
16
|
-
};
|
17
|
-
readonly 'images-project-config': {
|
18
|
-
readonly environmentVariableNames: readonly ["S3_IMAGES_BUCKET_NAME"];
|
19
|
-
};
|
20
|
-
readonly 'images-init-project-config': {
|
21
|
-
readonly environmentVariableNames: readonly ["FRONTEND_URL", "S3_IMAGES_BUCKET_NAME"];
|
22
|
-
};
|
23
|
-
readonly 'logger-service-project-config': {
|
24
|
-
readonly environmentVariableNames: readonly ["DATABASE_URL", "LOGGER_SERVICE_PORT", "RABBITMQ_URL"];
|
25
|
-
};
|
26
|
-
readonly 'nginx-project-config': {
|
27
|
-
readonly environmentVariableNames: readonly ["FRONTEND_PORT"];
|
28
|
-
};
|
29
|
-
readonly 'rabbitmq-project-config': {
|
30
|
-
readonly environmentVariableNames: readonly ["RABBITMQ_PORT", "RABBITMQ_MANAGEMENT_PORT", "RABBITMQ_PWD", "RABBITMQ_USER"];
|
31
|
-
};
|
32
|
-
readonly 'redis-project-config': {
|
33
|
-
readonly environmentVariableNames: readonly ["REDIS_PORT", "REDIS_PWD"];
|
34
|
-
};
|
35
|
-
};
|
@@ -1,54 +0,0 @@
|
|
1
|
-
export const PROJECT_CONFIG = {
|
2
|
-
'api-gateway-project-config': {
|
3
|
-
environmentVariableNames: [
|
4
|
-
'API_GATEWAY_PORT',
|
5
|
-
'AUTHENTICATION_AUDIENCE',
|
6
|
-
'AUTHENTICATION_DOMAIN',
|
7
|
-
'CACHE_ENABLED',
|
8
|
-
'DATABASE_URL',
|
9
|
-
'FRONTEND_URL',
|
10
|
-
'RABBITMQ_URL',
|
11
|
-
'REDIS_PWD',
|
12
|
-
'REDIS_URL',
|
13
|
-
'S3_IMAGES_BUCKET_NAME',
|
14
|
-
],
|
15
|
-
},
|
16
|
-
'backend-project-config': {
|
17
|
-
environmentVariableNames: [
|
18
|
-
'API_GATEWAY_PORT',
|
19
|
-
'CACHE_SERVICE_PORT',
|
20
|
-
'FRONTEND_PORT',
|
21
|
-
'LOGGER_SERVICE_PORT',
|
22
|
-
'RABBITMQ_PORT',
|
23
|
-
'RABBITMQ_MANAGEMENT_PORT',
|
24
|
-
'REDIS_PORT',
|
25
|
-
],
|
26
|
-
},
|
27
|
-
'backend-init-project-config': {
|
28
|
-
environmentVariableNames: ['APP_NAME', 'DOMAIN_NAME', 'S3_IMAGES_BUCKET_NAME'],
|
29
|
-
},
|
30
|
-
'cache-service-project-config': {
|
31
|
-
environmentVariableNames: ['CACHE_ENABLED', 'CACHE_SERVICE_PORT', 'DATABASE_URL', 'RABBITMQ_URL', 'REDIS_PWD', 'REDIS_URL'],
|
32
|
-
},
|
33
|
-
'frontend-project-config': {
|
34
|
-
environmentVariableNames: ['DATABASE_URL', 'FRONTEND_PORT'],
|
35
|
-
},
|
36
|
-
'images-project-config': {
|
37
|
-
environmentVariableNames: ['S3_IMAGES_BUCKET_NAME'],
|
38
|
-
},
|
39
|
-
'images-init-project-config': {
|
40
|
-
environmentVariableNames: ['FRONTEND_URL', 'S3_IMAGES_BUCKET_NAME'],
|
41
|
-
},
|
42
|
-
'logger-service-project-config': {
|
43
|
-
environmentVariableNames: ['DATABASE_URL', 'LOGGER_SERVICE_PORT', 'RABBITMQ_URL'],
|
44
|
-
},
|
45
|
-
'nginx-project-config': {
|
46
|
-
environmentVariableNames: ['FRONTEND_PORT'],
|
47
|
-
},
|
48
|
-
'rabbitmq-project-config': {
|
49
|
-
environmentVariableNames: ['RABBITMQ_PORT', 'RABBITMQ_MANAGEMENT_PORT', 'RABBITMQ_PWD', 'RABBITMQ_USER'],
|
50
|
-
},
|
51
|
-
'redis-project-config': {
|
52
|
-
environmentVariableNames: ['REDIS_PORT', 'REDIS_PWD'],
|
53
|
-
},
|
54
|
-
};
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { EnvironmentVariables } from '../../../../environment/index.js';
|
2
|
-
import { PROJECT_CONFIG } from '../../configs/index.js';
|
3
|
-
import { ProjectConfigName } from '../project-config-name/index.js';
|
4
|
-
export type ProjectConfig = {
|
5
|
-
[key in ProjectConfigName]: Pick<EnvironmentVariables, (typeof PROJECT_CONFIG)[key]['environmentVariableNames'][number]>;
|
6
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './domains/index.js';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './domains/index.js';
|