@candlerip/shared3 0.0.52 → 0.0.53

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.52",
3
+ "version": "0.0.53",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  import { CustomError } from '../../../../error/index.js';
2
2
  import { EnvironmentMode } from '../../../environment-mode/index.js';
3
3
  import { EnvironmentVariables } from '../../../environment-variables/index.js';
4
- export declare const loadEnvFile: <T extends keyof EnvironmentVariables = never, D = EnvironmentVariables[T]>(environmentMode: EnvironmentMode) => {
4
+ export declare const loadEnvFile: <K extends keyof EnvironmentVariables = never, D = EnvironmentVariables[K]>(environmentMode: EnvironmentMode) => {
5
5
  data: D;
6
6
  } | {
7
7
  customError: CustomError;
@@ -12,10 +12,12 @@ export const loadEnvFile = (environmentMode) => {
12
12
  const data = {};
13
13
  Object.keys(parsed).forEach((key) => {
14
14
  if (ENVIRONMENT_VARIABLE[key] === 'boolean') {
15
- return (data[key] = Boolean(parsed[key] === 'true'));
15
+ data[key] = Boolean(parsed[key] === 'true');
16
+ return;
16
17
  }
17
18
  if (ENVIRONMENT_VARIABLE[key] === 'number') {
18
- return (data[key] = parseInt(parsed[key]));
19
+ data[key] = parseInt(parsed[key]);
20
+ return;
19
21
  }
20
22
  data[key] = parsed[key];
21
23
  });
@@ -1,2 +1,3 @@
1
+ export * from './configs/index.js';
1
2
  export * from './domains/index.js';
2
3
  export * from './workers/index.js';
@@ -1,2 +1,3 @@
1
+ export * from './configs/index.js';
1
2
  export * from './domains/index.js';
2
3
  export * from './workers/index.js';