opticore-env-access 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -52,22 +52,22 @@ var envPathConfig = (envDirPath) => {
52
52
  const envPath = import_path.default.resolve(__dirname, envDirPath);
53
53
  try {
54
54
  if (!fs.existsSync(envPath)) {
55
- logger.error(
56
- `The .env file does not exist at the location : ${envPath}`,
57
- ".env file not found",
58
- "FileNotFound",
59
- "",
60
- import_opticore_http_response.HttpStatusCode.NOT_FOUND
61
- );
55
+ logger.error({
56
+ message: `The .env file does not exist at the location : ${envPath}`,
57
+ title: ".env file not found",
58
+ errorType: "FileNotFound",
59
+ stackTrace: void 0,
60
+ httpCodeValue: import_opticore_http_response.HttpStatusCode.NOT_FOUND
61
+ });
62
62
  }
63
63
  } catch (err) {
64
- logger.error(
65
- err.message,
66
- ".env file not found",
67
- err.name,
68
- err.stack,
69
- import_opticore_http_response.HttpStatusCode.NOT_FOUND
70
- );
64
+ logger.error({
65
+ message: err.message,
66
+ title: ".env file not found",
67
+ errorType: err.name,
68
+ stackTrace: err.stack,
69
+ httpCodeValue: import_opticore_http_response.HttpStatusCode.NOT_FOUND
70
+ });
71
71
  }
72
72
  return import_dotenv.default.config({ path: envPath });
73
73
  };
@@ -75,7 +75,7 @@ var envPathConfig = (envDirPath) => {
75
75
  // src/domains/environnement/access.env.ts
76
76
  var getEnvironnementValue = (envDir) => {
77
77
  const envPath = envPathConfig(envDir);
78
- const getEnvVariable = {
78
+ return {
79
79
  apiVersion: String(envPath.parsed?.API_VERSION),
80
80
  appHost: String(envPath.parsed?.APP_HOST),
81
81
  appPort: String(envPath.parsed?.APP_PORT),
@@ -104,7 +104,6 @@ var getEnvironnementValue = (envDir) => {
104
104
  prodEnv: String(envPath.parsed?.ENV_PROD),
105
105
  usernameField: String(envPath.parsed?.USERNAME_FIELD)
106
106
  };
107
- return getEnvVariable;
108
107
  };
109
108
  // Annotate the CommonJS export names for ESM import in node:
110
109
  0 && (module.exports = {
package/dist/index.js CHANGED
@@ -12,22 +12,22 @@ var envPathConfig = (envDirPath) => {
12
12
  const envPath = path.resolve(__dirname2, envDirPath);
13
13
  try {
14
14
  if (!fs.existsSync(envPath)) {
15
- logger.error(
16
- `The .env file does not exist at the location : ${envPath}`,
17
- ".env file not found",
18
- "FileNotFound",
19
- "",
20
- HttpStatusCode.NOT_FOUND
21
- );
15
+ logger.error({
16
+ message: `The .env file does not exist at the location : ${envPath}`,
17
+ title: ".env file not found",
18
+ errorType: "FileNotFound",
19
+ stackTrace: void 0,
20
+ httpCodeValue: HttpStatusCode.NOT_FOUND
21
+ });
22
22
  }
23
23
  } catch (err) {
24
- logger.error(
25
- err.message,
26
- ".env file not found",
27
- err.name,
28
- err.stack,
29
- HttpStatusCode.NOT_FOUND
30
- );
24
+ logger.error({
25
+ message: err.message,
26
+ title: ".env file not found",
27
+ errorType: err.name,
28
+ stackTrace: err.stack,
29
+ httpCodeValue: HttpStatusCode.NOT_FOUND
30
+ });
31
31
  }
32
32
  return dotenv.config({ path: envPath });
33
33
  };
@@ -35,7 +35,7 @@ var envPathConfig = (envDirPath) => {
35
35
  // src/domains/environnement/access.env.ts
36
36
  var getEnvironnementValue = (envDir) => {
37
37
  const envPath = envPathConfig(envDir);
38
- const getEnvVariable = {
38
+ return {
39
39
  apiVersion: String(envPath.parsed?.API_VERSION),
40
40
  appHost: String(envPath.parsed?.APP_HOST),
41
41
  appPort: String(envPath.parsed?.APP_PORT),
@@ -64,7 +64,6 @@ var getEnvironnementValue = (envDir) => {
64
64
  prodEnv: String(envPath.parsed?.ENV_PROD),
65
65
  usernameField: String(envPath.parsed?.USERNAME_FIELD)
66
66
  };
67
- return getEnvVariable;
68
67
  };
69
68
  export {
70
69
  getEnvironnementValue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opticore-env-access",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "opticore environnement access",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "homepage": "https://github.com/guyzoum77/opticore-requests-called-events#readme",
26
26
  "dependencies": {
27
- "dotenv": "^16.4.7",
28
- "opticore-logger": "^1.0.14",
27
+ "dotenv": "^16.5.0",
28
+ "opticore-logger": "^1.0.17",
29
29
  "opticore-http-response": "^1.0.3"
30
30
  },
31
31
  "devDependencies": {