opticore-webapp-core 1.0.17 → 1.0.18

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
@@ -733,6 +733,7 @@ var translateWebAppCoreLanguageLoader = (environnementPath, localLang) => {
733
733
  };
734
734
 
735
735
  // src/utils/parsing/parsingYaml.utils.ts
736
+ var import_path2 = __toESM(require("path"), 1);
736
737
  var YamlParsing = class {
737
738
  logger;
738
739
  localeLanguage;
@@ -741,6 +742,9 @@ var YamlParsing = class {
741
742
  this.localeLanguage = localeLanguage;
742
743
  this.logger = new import_opticore_logger3.LoggerCore(loggerConfig(environnementPath));
743
744
  }
745
+ absolutPath() {
746
+ return import_path2.default.join(process.cwd(), "src", "utils", "translations");
747
+ }
744
748
  async readFile(filePath) {
745
749
  try {
746
750
  const yamlContent = await (0, import_promises.readFile)(filePath, "utf-8");
@@ -1055,7 +1059,7 @@ var MPostgresCheckerDatabase = (localLanguage, environnementPath, keepAlive, str
1055
1059
  var import_node_process = __toESM(require("process"), 1);
1056
1060
  var import_chalk = __toESM(require("chalk"), 1);
1057
1061
  var import_ansi_colors = __toESM(require("ansi-colors"), 1);
1058
- var import_path2 = __toESM(require("path"), 1);
1062
+ var import_path3 = __toESM(require("path"), 1);
1059
1063
  var import_fs = __toESM(require("fs"), 1);
1060
1064
  var import_opticore_translator10 = require("opticore-translator");
1061
1065
  var Utility = class {
@@ -1122,7 +1126,7 @@ var Utility = class {
1122
1126
  const endTime = import_node_process.default.hrtime(startTime);
1123
1127
  const executionTime = (endTime[0] * 1e9 + endTime[1]) / 1e6;
1124
1128
  return {
1125
- "projectPath": import_path2.default.join(import_node_process.default.cwd()),
1129
+ "projectPath": import_path3.default.join(import_node_process.default.cwd()),
1126
1130
  "startingTime": `${executionTime.toFixed(5)} ms`
1127
1131
  };
1128
1132
  }
@@ -1132,7 +1136,7 @@ var Utility = class {
1132
1136
  * @private
1133
1137
  */
1134
1138
  getEnvFileLoading(filePath) {
1135
- const fullPath = import_path2.default.resolve(import_node_process.default.cwd(), filePath);
1139
+ const fullPath = import_path3.default.resolve(import_node_process.default.cwd(), filePath);
1136
1140
  if (import_fs.default.existsSync(fullPath)) {
1137
1141
  const env = import_fs.default.readFileSync(fullPath, "utf-8");
1138
1142
  const lines = env.split("\n");
@@ -1186,7 +1190,7 @@ var Utility = class {
1186
1190
  };
1187
1191
 
1188
1192
  // src/core/events/pathModuleVerifier.event.ts
1189
- var import_path3 = require("path");
1193
+ var import_path4 = require("path");
1190
1194
  var import_opticore_http_response9 = require("opticore-http-response");
1191
1195
  var import_opticore_translator11 = require("opticore-translator");
1192
1196
  var PathModuleVerifier = class {
@@ -1226,7 +1230,7 @@ var PathModuleVerifier = class {
1226
1230
  */
1227
1231
  isModulePathLoaded(modulePath) {
1228
1232
  try {
1229
- const resolvedPath = (0, import_path3.resolve)(modulePath);
1233
+ const resolvedPath = (0, import_path4.resolve)(modulePath);
1230
1234
  return require.cache[resolvedPath] !== void 0;
1231
1235
  } catch {
1232
1236
  return false;
@@ -1235,7 +1239,7 @@ var PathModuleVerifier = class {
1235
1239
  };
1236
1240
 
1237
1241
  // src/core/config/loaders/localLanguage.loader.ts
1238
- var import_path4 = __toESM(require("path"), 1);
1242
+ var import_path5 = __toESM(require("path"), 1);
1239
1243
  var import_opticore_translator12 = require("opticore-translator");
1240
1244
  var import_opticore_http_response10 = require("opticore-http-response");
1241
1245
  var LocalLanguageLoader = class {
@@ -1247,7 +1251,7 @@ var LocalLanguageLoader = class {
1247
1251
  }
1248
1252
  load() {
1249
1253
  try {
1250
- const translateMsgJsonFilePath = this.absolutPath();
1254
+ const translateMsgJsonFilePath = import_path5.default.join(process.cwd(), "src", "utils", "translations");
1251
1255
  import_opticore_translator12.TranslationLoader.loadTranslations(translateMsgJsonFilePath);
1252
1256
  } catch (err) {
1253
1257
  SLoggerFileConfiguration(this.environnementPath).error(
@@ -1260,9 +1264,6 @@ var LocalLanguageLoader = class {
1260
1264
  );
1261
1265
  }
1262
1266
  }
1263
- absolutPath() {
1264
- return import_path4.default.join(process.cwd(), "src", "utils", "translations");
1265
- }
1266
1267
  };
1267
1268
  // Annotate the CommonJS export names for ESM import in node:
1268
1269
  0 && (module.exports = {
package/dist/index.d.cts CHANGED
@@ -183,6 +183,7 @@ declare class YamlParsing {
183
183
  private readonly logger;
184
184
  private readonly localeLanguage;
185
185
  constructor(localeLanguage: string, environnementPath: any);
186
+ absolutPath(): string;
186
187
  readFile(filePath: string): Promise<void>;
187
188
  /**
188
189
  *
@@ -390,7 +391,6 @@ declare class LocalLanguageLoader {
390
391
  private readonly environnementPath;
391
392
  constructor(localeLanguage: string, environnementPath: any);
392
393
  load(): void;
393
- absolutPath(): string;
394
394
  }
395
395
 
396
396
  interface IBodyParserOptions {
package/dist/index.d.ts CHANGED
@@ -183,6 +183,7 @@ declare class YamlParsing {
183
183
  private readonly logger;
184
184
  private readonly localeLanguage;
185
185
  constructor(localeLanguage: string, environnementPath: any);
186
+ absolutPath(): string;
186
187
  readFile(filePath: string): Promise<void>;
187
188
  /**
188
189
  *
@@ -390,7 +391,6 @@ declare class LocalLanguageLoader {
390
391
  private readonly environnementPath;
391
392
  constructor(localeLanguage: string, environnementPath: any);
392
393
  load(): void;
393
- absolutPath(): string;
394
394
  }
395
395
 
396
396
  interface IBodyParserOptions {
package/dist/index.js CHANGED
@@ -681,6 +681,7 @@ var translateWebAppCoreLanguageLoader = (environnementPath, localLang) => {
681
681
  };
682
682
 
683
683
  // src/utils/parsing/parsingYaml.utils.ts
684
+ import path2 from "path";
684
685
  var YamlParsing = class {
685
686
  logger;
686
687
  localeLanguage;
@@ -689,6 +690,9 @@ var YamlParsing = class {
689
690
  this.localeLanguage = localeLanguage;
690
691
  this.logger = new LoggerCore3(loggerConfig(environnementPath));
691
692
  }
693
+ absolutPath() {
694
+ return path2.join(process.cwd(), "src", "utils", "translations");
695
+ }
692
696
  async readFile(filePath) {
693
697
  try {
694
698
  const yamlContent = await readFile(filePath, "utf-8");
@@ -1003,7 +1007,7 @@ var MPostgresCheckerDatabase = (localLanguage, environnementPath, keepAlive, str
1003
1007
  import process2 from "node:process";
1004
1008
  import chalk from "chalk";
1005
1009
  import colors from "ansi-colors";
1006
- import path2 from "path";
1010
+ import path3 from "path";
1007
1011
  import fs from "fs";
1008
1012
  import { TranslationLoader as TranslationLoader10 } from "opticore-translator";
1009
1013
  var Utility = class {
@@ -1070,7 +1074,7 @@ var Utility = class {
1070
1074
  const endTime = process2.hrtime(startTime);
1071
1075
  const executionTime = (endTime[0] * 1e9 + endTime[1]) / 1e6;
1072
1076
  return {
1073
- "projectPath": path2.join(process2.cwd()),
1077
+ "projectPath": path3.join(process2.cwd()),
1074
1078
  "startingTime": `${executionTime.toFixed(5)} ms`
1075
1079
  };
1076
1080
  }
@@ -1080,7 +1084,7 @@ var Utility = class {
1080
1084
  * @private
1081
1085
  */
1082
1086
  getEnvFileLoading(filePath) {
1083
- const fullPath = path2.resolve(process2.cwd(), filePath);
1087
+ const fullPath = path3.resolve(process2.cwd(), filePath);
1084
1088
  if (fs.existsSync(fullPath)) {
1085
1089
  const env = fs.readFileSync(fullPath, "utf-8");
1086
1090
  const lines = env.split("\n");
@@ -1183,7 +1187,7 @@ var PathModuleVerifier = class {
1183
1187
  };
1184
1188
 
1185
1189
  // src/core/config/loaders/localLanguage.loader.ts
1186
- import path3 from "path";
1190
+ import path4 from "path";
1187
1191
  import { TranslationLoader as TranslationLoader12 } from "opticore-translator";
1188
1192
  import { HttpStatusCode as HttpStatusCode4 } from "opticore-http-response";
1189
1193
  var LocalLanguageLoader = class {
@@ -1195,7 +1199,7 @@ var LocalLanguageLoader = class {
1195
1199
  }
1196
1200
  load() {
1197
1201
  try {
1198
- const translateMsgJsonFilePath = this.absolutPath();
1202
+ const translateMsgJsonFilePath = path4.join(process.cwd(), "src", "utils", "translations");
1199
1203
  TranslationLoader12.loadTranslations(translateMsgJsonFilePath);
1200
1204
  } catch (err) {
1201
1205
  SLoggerFileConfiguration(this.environnementPath).error(
@@ -1208,9 +1212,6 @@ var LocalLanguageLoader = class {
1208
1212
  );
1209
1213
  }
1210
1214
  }
1211
- absolutPath() {
1212
- return path3.join(process.cwd(), "src", "utils", "translations");
1213
- }
1214
1215
  };
1215
1216
  export {
1216
1217
  CLogLevel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opticore-webapp-core",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "opticore Web Application core module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",