@candlerip/shared3 0.0.35 → 0.0.36

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.35",
3
+ "version": "0.0.36",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -1,5 +1,5 @@
1
1
  import * as dotenv from 'dotenv';
2
- import { NUMBER_ENVIRONMENT_VARIABLES } from '../../../environment-variables/configs/number-environment-variables/index.js';
2
+ import { NUMBER_ENVIRONMENT_VARIABLE_NAMES } from '../../../environment-variable-name/index.js';
3
3
  export const loadEnvFile = (environmentMode) => {
4
4
  const props = { environmentMode };
5
5
  const fileName = `.env.${environmentMode}`;
@@ -17,7 +17,7 @@ export const loadEnvFile = (environmentMode) => {
17
17
  },
18
18
  };
19
19
  }
20
- NUMBER_ENVIRONMENT_VARIABLES.forEach((it) => {
20
+ NUMBER_ENVIRONMENT_VARIABLE_NAMES.forEach((it) => {
21
21
  if (parsed[it]) {
22
22
  parsed[it] = parseInt(parsed[it]);
23
23
  }
@@ -0,0 +1,2 @@
1
+ import { ENVIRONMENT_VARIABLES } from '../../../environment-variables/configs/index.js';
2
+ export declare const ENVIRONMENT_VARIABLE_NAMES: Array<keyof typeof ENVIRONMENT_VARIABLES>;
@@ -0,0 +1,2 @@
1
+ import { ENVIRONMENT_VARIABLES } from '../../../environment-variables/configs/index.js';
2
+ export const ENVIRONMENT_VARIABLE_NAMES = Object.keys(ENVIRONMENT_VARIABLES);
@@ -0,0 +1,2 @@
1
+ export * from './environment-variable-names/index.js';
2
+ export * from './number-environment-variable-names/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './environment-variable-names/index.js';
2
+ export * from './number-environment-variable-names/index.js';
@@ -0,0 +1 @@
1
+ export declare const NUMBER_ENVIRONMENT_VARIABLE_NAMES: ("APP_NAME" | "CACHE_SERVICE_PORT" | "DATABASE_URL" | "DICTIONARY_SERVICE_PORT" | "DOMAIN_NAME" | "FRONTEND_URL" | "LOGGER_SERVICE_PORT" | "RABBITMQ_MANAGEMENT_PORT" | "RABBITMQ_PORT" | "RABBITMQ_PWD" | "RABBITMQ_URL" | "RABBITMQ_USER" | "REDIS_PORT" | "REDIS_PWD" | "REDIS_URL" | "S3_IMAGES_BUCKET_NAME")[];
@@ -0,0 +1,2 @@
1
+ import { ENVIRONMENT_VARIABLES } from '../../../environment-variables/configs/index.js';
2
+ export const NUMBER_ENVIRONMENT_VARIABLE_NAMES = Object.keys(ENVIRONMENT_VARIABLES).filter((it) => ENVIRONMENT_VARIABLES[it] === 'number');
@@ -1,2 +1,2 @@
1
- import { ENVIRONMENT_VARIABLES } from '../../environment-variables/configs/index.js';
2
- export type EnvironmentVariableName = keyof typeof ENVIRONMENT_VARIABLES;
1
+ import { ENVIRONMENT_VARIABLE_NAMES } from '../configs/index.js';
2
+ export type EnvironmentVariableName = (typeof ENVIRONMENT_VARIABLE_NAMES)[number];
@@ -1 +1,2 @@
1
+ export * from './configs/index.js';
1
2
  export * from './domains/index.js';
@@ -1 +1,2 @@
1
+ export * from './configs/index.js';
1
2
  export * from './domains/index.js';
@@ -1,2 +1,18 @@
1
- export * from './environment-variables/index.js';
2
- export * from './number-environment-variables/index.js';
1
+ export declare const ENVIRONMENT_VARIABLES: {
2
+ readonly APP_NAME: "string";
3
+ readonly CACHE_SERVICE_PORT: "number";
4
+ readonly DATABASE_URL: "string";
5
+ readonly DICTIONARY_SERVICE_PORT: "number";
6
+ readonly DOMAIN_NAME: "string";
7
+ readonly FRONTEND_URL: "string";
8
+ readonly LOGGER_SERVICE_PORT: "number";
9
+ readonly RABBITMQ_MANAGEMENT_PORT: "number";
10
+ readonly RABBITMQ_PORT: "number";
11
+ readonly RABBITMQ_PWD: "string";
12
+ readonly RABBITMQ_URL: "string";
13
+ readonly RABBITMQ_USER: "string";
14
+ readonly REDIS_PORT: "number";
15
+ readonly REDIS_PWD: "string";
16
+ readonly REDIS_URL: "string";
17
+ readonly S3_IMAGES_BUCKET_NAME: "string";
18
+ };
@@ -1,2 +1,18 @@
1
- export * from './environment-variables/index.js';
2
- export * from './number-environment-variables/index.js';
1
+ export const ENVIRONMENT_VARIABLES = {
2
+ APP_NAME: 'string',
3
+ CACHE_SERVICE_PORT: 'number',
4
+ DATABASE_URL: 'string',
5
+ DICTIONARY_SERVICE_PORT: 'number',
6
+ DOMAIN_NAME: 'string',
7
+ FRONTEND_URL: 'string',
8
+ LOGGER_SERVICE_PORT: 'number',
9
+ RABBITMQ_MANAGEMENT_PORT: 'number',
10
+ RABBITMQ_PORT: 'number',
11
+ RABBITMQ_PWD: 'string',
12
+ RABBITMQ_URL: 'string',
13
+ RABBITMQ_USER: 'string',
14
+ REDIS_PORT: 'number',
15
+ REDIS_PWD: 'string',
16
+ REDIS_URL: 'string',
17
+ S3_IMAGES_BUCKET_NAME: 'string',
18
+ };
@@ -1,18 +0,0 @@
1
- export declare const ENVIRONMENT_VARIABLES: {
2
- readonly APP_NAME: "string";
3
- readonly CACHE_SERVICE_PORT: "number";
4
- readonly DATABASE_URL: "string";
5
- readonly DICTIONARY_SERVICE_PORT: "number";
6
- readonly DOMAIN_NAME: "string";
7
- readonly FRONTEND_URL: "string";
8
- readonly LOGGER_SERVICE_PORT: "number";
9
- readonly RABBITMQ_MANAGEMENT_PORT: "number";
10
- readonly RABBITMQ_PORT: "number";
11
- readonly RABBITMQ_PWD: "string";
12
- readonly RABBITMQ_URL: "string";
13
- readonly RABBITMQ_USER: "string";
14
- readonly REDIS_PORT: "number";
15
- readonly REDIS_PWD: "string";
16
- readonly REDIS_URL: "string";
17
- readonly S3_IMAGES_BUCKET_NAME: "string";
18
- };
@@ -1,18 +0,0 @@
1
- export const ENVIRONMENT_VARIABLES = {
2
- APP_NAME: 'string',
3
- CACHE_SERVICE_PORT: 'number',
4
- DATABASE_URL: 'string',
5
- DICTIONARY_SERVICE_PORT: 'number',
6
- DOMAIN_NAME: 'string',
7
- FRONTEND_URL: 'string',
8
- LOGGER_SERVICE_PORT: 'number',
9
- RABBITMQ_MANAGEMENT_PORT: 'number',
10
- RABBITMQ_PORT: 'number',
11
- RABBITMQ_PWD: 'string',
12
- RABBITMQ_URL: 'string',
13
- RABBITMQ_USER: 'string',
14
- REDIS_PORT: 'number',
15
- REDIS_PWD: 'string',
16
- REDIS_URL: 'string',
17
- S3_IMAGES_BUCKET_NAME: 'string',
18
- };
@@ -1 +0,0 @@
1
- export declare const NUMBER_ENVIRONMENT_VARIABLES: ("APP_NAME" | "CACHE_SERVICE_PORT" | "DATABASE_URL" | "DICTIONARY_SERVICE_PORT" | "DOMAIN_NAME" | "FRONTEND_URL" | "LOGGER_SERVICE_PORT" | "RABBITMQ_MANAGEMENT_PORT" | "RABBITMQ_PORT" | "RABBITMQ_PWD" | "RABBITMQ_URL" | "RABBITMQ_USER" | "REDIS_PORT" | "REDIS_PWD" | "REDIS_URL" | "S3_IMAGES_BUCKET_NAME")[];
@@ -1,2 +0,0 @@
1
- import { ENVIRONMENT_VARIABLES } from '../environment-variables/index.js';
2
- export const NUMBER_ENVIRONMENT_VARIABLES = Object.keys(ENVIRONMENT_VARIABLES).filter((it) => ENVIRONMENT_VARIABLES[it] === 'number');