@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candlerip/shared3",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -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: string;
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 getEnvs = () => envs;
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
- getEnvs,
17
+ get,
18
18
  init,
19
19
  };
20
20
  })();
@@ -1,9 +1,9 @@
1
1
  import { CustomError } from '../../../../error/index.js';
2
2
  export type IEnvironmentVariablesWorker = {
3
- getEnvs: GetEnvs;
3
+ get: Get;
4
4
  init: Init;
5
5
  };
6
- export type GetEnvs = <T = never>() => T;
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,2 @@
1
+ import { EnvironmentVariables } from '../../../../environment/index.js';
2
+ export type RabbitmqProjectConfig = Pick<EnvironmentVariables, 'RABBITMQ_PORT' | 'RABBITMQ_MANAGEMENT_PORT'>;
@@ -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"];
@@ -6,5 +6,6 @@ export const PROJECT_CONFIG_NAMES = [
6
6
  'images-project-config',
7
7
  'images-init-project-config',
8
8
  'logger-service-project-config',
9
+ 'rabbitmq-project-config',
9
10
  'redis-project-config',
10
11
  ];
@@ -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"];
@@ -7,6 +7,7 @@ export const PROJECT_NAMES = [
7
7
  'images',
8
8
  'images-init',
9
9
  'logger-service',
10
+ 'rabbitmq',
10
11
  'redis',
11
12
  'shared',
12
13
  'shared-aws',