@candlerip/shared3 0.0.27 → 0.0.29
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/environment-variables/domains/index.d.ts +5 -3
- package/src/environment/environment-variables/workers/environment-variables-worker/index.js +4 -4
- package/src/environment/environment-variables/workers/environment-variables-worker/types.d.ts +3 -3
- package/src/project/project-config/domains/index.d.ts +2 -0
- package/src/project/project-config/domains/index.js +2 -0
- package/src/project/project-config/domains/logger-service-project-config/index.d.ts +1 -1
- package/src/project/project-config/domains/project-config-map/index.d.ts +2 -0
- package/src/project/project-config/domains/rabbitmq-project-config/index.d.ts +2 -0
- package/src/project/project-config/domains/rabbitmq-project-config/index.js +1 -0
- package/src/project/project-config-name/configs/index.d.ts +1 -1
- package/src/project/project-config-name/configs/index.js +1 -0
- package/src/project/project-name/configs/index.d.ts +1 -1
- package/src/project/project-name/configs/index.js +1 -0
package/package.json
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
export interface EnvironmentVariables {
|
2
2
|
APP_NAME: string;
|
3
|
-
REDIS_PORT: number;
|
4
|
-
REDIS_PWD: string;
|
5
3
|
CACHE_SERVICE_PORT: number;
|
6
4
|
DATABASE_URL: string;
|
7
5
|
DICTIONARY_SERVICE_PORT: number;
|
8
6
|
DOMAIN_NAME: string;
|
9
7
|
FRONTEND_URL: string;
|
10
|
-
LOGGER_SERVICE_PORT:
|
8
|
+
LOGGER_SERVICE_PORT: number;
|
9
|
+
RABBITMQ_PORT: number;
|
10
|
+
RABBITMQ_MANAGEMENT_PORT: number;
|
11
|
+
REDIS_PORT: number;
|
12
|
+
REDIS_PWD: string;
|
11
13
|
REDIS_URL: string;
|
12
14
|
S3_IMAGES_BUCKET_NAME: string;
|
13
15
|
}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { loadEnvFile } from '../../../env-file/index.js';
|
2
2
|
export const EnvironmentVariablesWorker = (() => {
|
3
3
|
let envs;
|
4
|
-
const
|
5
|
-
const init = () => {
|
4
|
+
const get = () => envs;
|
5
|
+
const init = (integers) => {
|
6
6
|
const ENVIRONMENT_MODE = process.env.ENVIRONMENT_MODE;
|
7
|
-
const resp = loadEnvFile(ENVIRONMENT_MODE);
|
7
|
+
const resp = loadEnvFile(ENVIRONMENT_MODE, { integers });
|
8
8
|
if ('customError' in resp) {
|
9
9
|
return resp;
|
10
10
|
}
|
@@ -14,7 +14,7 @@ export const EnvironmentVariablesWorker = (() => {
|
|
14
14
|
};
|
15
15
|
};
|
16
16
|
return {
|
17
|
-
|
17
|
+
get,
|
18
18
|
init,
|
19
19
|
};
|
20
20
|
})();
|
package/src/environment/environment-variables/workers/environment-variables-worker/types.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { CustomError } from '../../../../error/index.js';
|
2
2
|
export type IEnvironmentVariablesWorker = {
|
3
|
-
|
3
|
+
get: Get;
|
4
4
|
init: Init;
|
5
5
|
};
|
6
|
-
export type
|
7
|
-
export type Init = () => undefined | {
|
6
|
+
export type Get = <T = never>() => T;
|
7
|
+
export type Init = (integers?: string[]) => undefined | {
|
8
8
|
customError: CustomError;
|
9
9
|
};
|
@@ -2,5 +2,7 @@ export * from './backend-project-config/index.js';
|
|
2
2
|
export * from './backend-init-project-config/index.js';
|
3
3
|
export * from './cache-service-project-config/index.js';
|
4
4
|
export * from './dictionary-service-poject-config/index.js';
|
5
|
+
export * from './logger-service-project-config/index.js';
|
5
6
|
export * from './project-config-map/index.js';
|
7
|
+
export * from './rabbitmq-project-config/index.js';
|
6
8
|
export * from './redis-project-config/index.js';
|
@@ -2,5 +2,7 @@ export * from './backend-project-config/index.js';
|
|
2
2
|
export * from './backend-init-project-config/index.js';
|
3
3
|
export * from './cache-service-project-config/index.js';
|
4
4
|
export * from './dictionary-service-poject-config/index.js';
|
5
|
+
export * from './logger-service-project-config/index.js';
|
5
6
|
export * from './project-config-map/index.js';
|
7
|
+
export * from './rabbitmq-project-config/index.js';
|
6
8
|
export * from './redis-project-config/index.js';
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { EnvironmentVariables } from '../../../../environment/index.js';
|
2
|
-
export type LoggerServiceProjectConfig = Pick<EnvironmentVariables, 'DATABASE_URL'>;
|
2
|
+
export type LoggerServiceProjectConfig = Pick<EnvironmentVariables, 'DATABASE_URL' | 'LOGGER_SERVICE_PORT'>;
|
@@ -5,6 +5,7 @@ import { DictionaryServiceProjectConfig } from '../dictionary-service-poject-con
|
|
5
5
|
import { ImagesInitProjectConfig } from '../images-init-project-config/index.js';
|
6
6
|
import { ImagesProjectConfig } from '../images-project-config/index.js';
|
7
7
|
import { LoggerServiceProjectConfig } from '../logger-service-project-config/index.js';
|
8
|
+
import { RabbitmqProjectConfig } from '../rabbitmq-project-config/index.js';
|
8
9
|
import { RedisProjectConfig } from '../redis-project-config/index.js';
|
9
10
|
export type ProjectConfigMap = {
|
10
11
|
'backend-project-config': BackendProjectConfig;
|
@@ -14,5 +15,6 @@ export type ProjectConfigMap = {
|
|
14
15
|
'images-project-config': ImagesProjectConfig;
|
15
16
|
'images-init-project-config': ImagesInitProjectConfig;
|
16
17
|
'logger-service-project-config': LoggerServiceProjectConfig;
|
18
|
+
'rabbitmq-project-config': RabbitmqProjectConfig;
|
17
19
|
'redis-project-config': RedisProjectConfig;
|
18
20
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1 +1 @@
|
|
1
|
-
export declare const PROJECT_CONFIG_NAMES: readonly ["backend-init-project-config", "backend-project-config", "cache-service-project-config", "dictionary-service-project-config", "images-project-config", "images-init-project-config", "logger-service-project-config", "redis-project-config"];
|
1
|
+
export declare const PROJECT_CONFIG_NAMES: readonly ["backend-init-project-config", "backend-project-config", "cache-service-project-config", "dictionary-service-project-config", "images-project-config", "images-init-project-config", "logger-service-project-config", "rabbitmq-project-config", "redis-project-config"];
|
@@ -1 +1 @@
|
|
1
|
-
export declare const PROJECT_NAMES: readonly ["backend-init", "backend", "cache-service", "dictionary-service", "config", "images", "images-init", "logger-service", "redis", "shared", "shared-aws", "shared-backend"];
|
1
|
+
export declare const PROJECT_NAMES: readonly ["backend-init", "backend", "cache-service", "dictionary-service", "config", "images", "images-init", "logger-service", "rabbitmq", "redis", "shared", "shared-aws", "shared-backend"];
|