opticore-webapp-core 1.0.1 → 1.0.3

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
@@ -49,10 +49,14 @@ __export(index_exports, {
49
49
  dateTimeFormatted: () => dateTimeFormatted,
50
50
  loggerConfig: () => loggerConfig,
51
51
  optionalArgumentConnectionUtil: () => optionalArgumentConnectionUtil,
52
- translateWebAppLanguageLoader: () => translateWebAppLanguageLoader
52
+ translateWebAppCoreLanguageLoader: () => translateWebAppCoreLanguageLoader
53
53
  });
54
54
  module.exports = __toCommonJS(index_exports);
55
55
 
56
+ // node_modules/tsup/assets/cjs_shims.js
57
+ var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
58
+ var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
59
+
56
60
  // src/application/services/asymmetricCryptionDataWithPrivateRSAKey.service.ts
57
61
  var import_crypto3 = __toESM(require("crypto"), 1);
58
62
  var import_opticore_http_response = require("opticore-http-response");
@@ -214,6 +218,7 @@ var loggerConfig = {
214
218
 
215
219
  // src/application/services/asymmetricCryptionDataWithPrivateRSAKey.service.ts
216
220
  var SAsymmetricCryptionDataWithPrivateRSAKey = class {
221
+ static log = new import_opticore_logger.LoggerCore(loggerConfig);
217
222
  /**
218
223
  *
219
224
  * @param rsaKey
@@ -366,7 +371,6 @@ var SAsymmetricCryptionDataWithPrivateRSAKey = class {
366
371
  return new import_opticore_catch_exception_error.StackTraceError(props, name, status7, true);
367
372
  }
368
373
  };
369
- SAsymmetricCryptionDataWithPrivateRSAKey.log = new import_opticore_logger.LoggerCore(loggerConfig);
370
374
 
371
375
  // src/application/services/asymmetricCryptionDataWithPublicRSAKey.service.ts
372
376
  var import_crypto4 = __toESM(require("crypto"), 1);
@@ -375,6 +379,7 @@ var import_opticore_translator2 = require("opticore-translator");
375
379
  var import_opticore_http_response2 = require("opticore-http-response");
376
380
  var import_opticore_catch_exception_error2 = require("opticore-catch-exception-error");
377
381
  var SAsymmetricCryptionDataWithPublicRSAKey = class {
382
+ static log = new import_opticore_logger2.LoggerCore(loggerConfig);
378
383
  /**
379
384
  *
380
385
  * @param rsaKey
@@ -516,7 +521,6 @@ var SAsymmetricCryptionDataWithPublicRSAKey = class {
516
521
  return new import_opticore_catch_exception_error2.StackTraceError(props, name, status7, true);
517
522
  }
518
523
  };
519
- SAsymmetricCryptionDataWithPublicRSAKey.log = new import_opticore_logger2.LoggerCore(loggerConfig);
520
524
 
521
525
  // src/application/services/checkerMongoDatabaseConnection.service.ts
522
526
  var import_mongodb = require("mongodb");
@@ -681,6 +685,7 @@ var import_opticore_http_response5 = require("opticore-http-response");
681
685
  var import_opticore_logger6 = require("opticore-logger");
682
686
  var import_opticore_translator6 = require("opticore-translator");
683
687
  var YamlParsing = class {
688
+ static logger = new import_opticore_logger6.LoggerCore(loggerConfig);
684
689
  static async readFile(filePath) {
685
690
  try {
686
691
  const yamlContent = await (0, import_promises.readFile)(filePath, "utf-8");
@@ -713,10 +718,10 @@ var YamlParsing = class {
713
718
  const [, indent, key, value] = keyValueMatch;
714
719
  if (indent.length > 0 && currentKey) {
715
720
  result[currentKey] = result[currentKey] || {};
716
- result[currentKey][key] = (value == null ? void 0 : value.trim()) || null;
721
+ result[currentKey][key] = value?.trim() || null;
717
722
  } else {
718
723
  currentKey = key;
719
- result[key] = (value == null ? void 0 : value.trim()) || null;
724
+ result[key] = value?.trim() || null;
720
725
  }
721
726
  } else {
722
727
  this.logger.error(
@@ -731,13 +736,13 @@ var YamlParsing = class {
731
736
  return result;
732
737
  }
733
738
  };
734
- YamlParsing.logger = new import_opticore_logger6.LoggerCore(loggerConfig);
735
739
 
736
740
  // src/utils/dateTimeFormatted.utils.ts
737
741
  var dateTimeFormatted = `${(/* @__PURE__ */ new Date()).getMonth()}-${(/* @__PURE__ */ new Date()).getDate()}-${(/* @__PURE__ */ new Date()).getFullYear()} ${(/* @__PURE__ */ new Date()).getHours()}:${(/* @__PURE__ */ new Date()).getMinutes()}:${(/* @__PURE__ */ new Date()).getSeconds()}`;
738
742
 
739
743
  // src/utils/environment.utils.ts
740
744
  var Environment = class {
745
+ config;
741
746
  constructor(config) {
742
747
  this.config = config;
743
748
  }
@@ -759,6 +764,7 @@ var import_opticore_logger7 = require("opticore-logger");
759
764
  var import_opticore_catch_exception_error3 = require("opticore-catch-exception-error");
760
765
  var import_opticore_translator7 = require("opticore-translator");
761
766
  var DbConnexionConfigError = class {
767
+ static logger = new import_opticore_logger7.LoggerCore(loggerConfig);
762
768
  /**
763
769
  *
764
770
  * @param e
@@ -845,15 +851,12 @@ var DbConnexionConfigError = class {
845
851
  return new import_opticore_catch_exception_error3.StackTraceError(props, name, status7, true);
846
852
  }
847
853
  };
848
- DbConnexionConfigError.logger = new import_opticore_logger7.LoggerCore(loggerConfig);
849
854
 
850
855
  // src/core/config/database/connexion.config.database.ts
851
856
  var import_opticore_catch_exception_error4 = require("opticore-catch-exception-error");
852
857
  var DatabaseConnectionConfig = class {
853
- constructor() {
854
- this.env = new Environment(import_opticore_env_access3.getEnvVariable);
855
- this.logger = new import_opticore_logger8.LoggerCore(loggerConfig);
856
- }
858
+ env = new Environment(import_opticore_env_access3.getEnvVariable);
859
+ logger = new import_opticore_logger8.LoggerCore(loggerConfig);
857
860
  /**
858
861
  * MySQL database connection with an optional arguments
859
862
  * Establish the connection between app and Database Management System.
@@ -1106,6 +1109,7 @@ var import_opticore_logger9 = require("opticore-logger");
1106
1109
  var import_opticore_http_response8 = require("opticore-http-response");
1107
1110
  var import_opticore_translator10 = require("opticore-translator");
1108
1111
  var PathModuleVerifier = class {
1112
+ static log = new import_opticore_logger9.LoggerCore(loggerConfig);
1109
1113
  /**
1110
1114
  * Verifies if modules at specific paths are loaded.
1111
1115
  * If any module is not loaded, it throws an error.
@@ -1138,19 +1142,22 @@ var PathModuleVerifier = class {
1138
1142
  try {
1139
1143
  const resolvedPath = (0, import_path2.resolve)(modulePath);
1140
1144
  return require.cache[resolvedPath] !== void 0;
1141
- } catch (e) {
1145
+ } catch {
1142
1146
  return false;
1143
1147
  }
1144
1148
  }
1145
1149
  };
1146
- PathModuleVerifier.log = new import_opticore_logger9.LoggerCore(loggerConfig);
1147
1150
 
1148
1151
  // src/core/config/loaders/translateLanguage.loader.ts
1149
1152
  var import_path3 = __toESM(require("path"), 1);
1150
1153
  var import_opticore_translator11 = require("opticore-translator");
1151
1154
  var import_opticore_env_access4 = require("opticore-env-access");
1152
- var translateWebAppLanguageLoader = () => {
1153
- import_opticore_translator11.TranslationLoader.loadTranslations(import_path3.default.join(process.cwd(), "src", "utils", "translations"), import_opticore_env_access4.getEnvVariable.defaultLocal);
1155
+ var import_url = require("url");
1156
+ var translateWebAppCoreLanguageLoader = () => {
1157
+ const __filename2 = (0, import_url.fileURLToPath)(importMetaUrl);
1158
+ const __dirname = import_path3.default.dirname(__filename2);
1159
+ const translateMsgJsonFilePath = import_path3.default.join(__dirname, "../../../", "utils", "translations");
1160
+ import_opticore_translator11.TranslationLoader.loadTranslations(translateMsgJsonFilePath, import_opticore_env_access4.getEnvVariable.defaultLocal);
1154
1161
  };
1155
1162
  // Annotate the CommonJS export names for ESM import in node:
1156
1163
  0 && (module.exports = {
@@ -1173,5 +1180,5 @@ var translateWebAppLanguageLoader = () => {
1173
1180
  dateTimeFormatted,
1174
1181
  loggerConfig,
1175
1182
  optionalArgumentConnectionUtil,
1176
- translateWebAppLanguageLoader
1183
+ translateWebAppCoreLanguageLoader
1177
1184
  });
package/dist/index.d.cts CHANGED
@@ -363,7 +363,7 @@ declare class PathModuleVerifier {
363
363
  private static isModulePathLoaded;
364
364
  }
365
365
 
366
- declare const translateWebAppLanguageLoader: () => void;
366
+ declare const translateWebAppCoreLanguageLoader: () => void;
367
367
 
368
368
  interface IBodyParserOptions {
369
369
  type: string;
@@ -435,4 +435,4 @@ declare function TTextBodyParser(options: IBodyParserOptions): void;
435
435
  */
436
436
  declare function TUrlencodedBodyParser(options: IBodyParserOptions): void;
437
437
 
438
- export { CLogLevel, CSignRSAKeyComponent, Environment, type IBodyParserOptions, type IResponseBodyEndFromResponseEvent, type IResponseBodyWriteFromResponseEvent, type IWrappingBodyResponse, MMongoCheckerDatabase, MMySqlCheckerDatabase, MPostgresCheckerDatabase, PathModuleVerifier, RSAKeyDecryption, RSAKeyEncryption, SAsymmetricCryptionDataWithPrivateRSAKey, SAsymmetricCryptionDataWithPublicRSAKey, SCheckerMongoDatabaseConnection, SCheckerMySqlDatabaseConnection, SCheckerPostgresDatabaseConnection, TJSONBodyParser, type TLogLevel, type TOriginalWriteEncoding, type TParseFunction, TRawBodyParser, TTextBodyParser, TUrlencodedBodyParser, Utility, YamlParsing, dateTimeFormatted, loggerConfig, optionalArgumentConnectionUtil, translateWebAppLanguageLoader };
438
+ export { CLogLevel, CSignRSAKeyComponent, Environment, type IBodyParserOptions, type IResponseBodyEndFromResponseEvent, type IResponseBodyWriteFromResponseEvent, type IWrappingBodyResponse, MMongoCheckerDatabase, MMySqlCheckerDatabase, MPostgresCheckerDatabase, PathModuleVerifier, RSAKeyDecryption, RSAKeyEncryption, SAsymmetricCryptionDataWithPrivateRSAKey, SAsymmetricCryptionDataWithPublicRSAKey, SCheckerMongoDatabaseConnection, SCheckerMySqlDatabaseConnection, SCheckerPostgresDatabaseConnection, TJSONBodyParser, type TLogLevel, type TOriginalWriteEncoding, type TParseFunction, TRawBodyParser, TTextBodyParser, TUrlencodedBodyParser, Utility, YamlParsing, dateTimeFormatted, loggerConfig, optionalArgumentConnectionUtil, translateWebAppCoreLanguageLoader };
package/dist/index.d.ts CHANGED
@@ -363,7 +363,7 @@ declare class PathModuleVerifier {
363
363
  private static isModulePathLoaded;
364
364
  }
365
365
 
366
- declare const translateWebAppLanguageLoader: () => void;
366
+ declare const translateWebAppCoreLanguageLoader: () => void;
367
367
 
368
368
  interface IBodyParserOptions {
369
369
  type: string;
@@ -435,4 +435,4 @@ declare function TTextBodyParser(options: IBodyParserOptions): void;
435
435
  */
436
436
  declare function TUrlencodedBodyParser(options: IBodyParserOptions): void;
437
437
 
438
- export { CLogLevel, CSignRSAKeyComponent, Environment, type IBodyParserOptions, type IResponseBodyEndFromResponseEvent, type IResponseBodyWriteFromResponseEvent, type IWrappingBodyResponse, MMongoCheckerDatabase, MMySqlCheckerDatabase, MPostgresCheckerDatabase, PathModuleVerifier, RSAKeyDecryption, RSAKeyEncryption, SAsymmetricCryptionDataWithPrivateRSAKey, SAsymmetricCryptionDataWithPublicRSAKey, SCheckerMongoDatabaseConnection, SCheckerMySqlDatabaseConnection, SCheckerPostgresDatabaseConnection, TJSONBodyParser, type TLogLevel, type TOriginalWriteEncoding, type TParseFunction, TRawBodyParser, TTextBodyParser, TUrlencodedBodyParser, Utility, YamlParsing, dateTimeFormatted, loggerConfig, optionalArgumentConnectionUtil, translateWebAppLanguageLoader };
438
+ export { CLogLevel, CSignRSAKeyComponent, Environment, type IBodyParserOptions, type IResponseBodyEndFromResponseEvent, type IResponseBodyWriteFromResponseEvent, type IWrappingBodyResponse, MMongoCheckerDatabase, MMySqlCheckerDatabase, MPostgresCheckerDatabase, PathModuleVerifier, RSAKeyDecryption, RSAKeyEncryption, SAsymmetricCryptionDataWithPrivateRSAKey, SAsymmetricCryptionDataWithPublicRSAKey, SCheckerMongoDatabaseConnection, SCheckerMySqlDatabaseConnection, SCheckerPostgresDatabaseConnection, TJSONBodyParser, type TLogLevel, type TOriginalWriteEncoding, type TParseFunction, TRawBodyParser, TTextBodyParser, TUrlencodedBodyParser, Utility, YamlParsing, dateTimeFormatted, loggerConfig, optionalArgumentConnectionUtil, translateWebAppCoreLanguageLoader };
package/dist/index.js CHANGED
@@ -166,6 +166,7 @@ var loggerConfig = {
166
166
 
167
167
  // src/application/services/asymmetricCryptionDataWithPrivateRSAKey.service.ts
168
168
  var SAsymmetricCryptionDataWithPrivateRSAKey = class {
169
+ static log = new LoggerCore(loggerConfig);
169
170
  /**
170
171
  *
171
172
  * @param rsaKey
@@ -318,7 +319,6 @@ var SAsymmetricCryptionDataWithPrivateRSAKey = class {
318
319
  return new ErrorHandler(props, name, status7, true);
319
320
  }
320
321
  };
321
- SAsymmetricCryptionDataWithPrivateRSAKey.log = new LoggerCore(loggerConfig);
322
322
 
323
323
  // src/application/services/asymmetricCryptionDataWithPublicRSAKey.service.ts
324
324
  import crypto4 from "crypto";
@@ -327,6 +327,7 @@ import { CLocal as CLocal2, TranslationLoader as TranslationLoader2 } from "opti
327
327
  import { HttpStatusCode as status2 } from "opticore-http-response";
328
328
  import { StackTraceError } from "opticore-catch-exception-error";
329
329
  var SAsymmetricCryptionDataWithPublicRSAKey = class {
330
+ static log = new LoggerCore2(loggerConfig);
330
331
  /**
331
332
  *
332
333
  * @param rsaKey
@@ -468,7 +469,6 @@ var SAsymmetricCryptionDataWithPublicRSAKey = class {
468
469
  return new StackTraceError(props, name, status7, true);
469
470
  }
470
471
  };
471
- SAsymmetricCryptionDataWithPublicRSAKey.log = new LoggerCore2(loggerConfig);
472
472
 
473
473
  // src/application/services/checkerMongoDatabaseConnection.service.ts
474
474
  import { MongoClient } from "mongodb";
@@ -633,6 +633,7 @@ import { HttpStatusCode } from "opticore-http-response";
633
633
  import { LoggerCore as LoggerCore6 } from "opticore-logger";
634
634
  import { CLocal as CLocal6, TranslationLoader as TranslationLoader6 } from "opticore-translator";
635
635
  var YamlParsing = class {
636
+ static logger = new LoggerCore6(loggerConfig);
636
637
  static async readFile(filePath) {
637
638
  try {
638
639
  const yamlContent = await readFile(filePath, "utf-8");
@@ -665,10 +666,10 @@ var YamlParsing = class {
665
666
  const [, indent, key, value] = keyValueMatch;
666
667
  if (indent.length > 0 && currentKey) {
667
668
  result[currentKey] = result[currentKey] || {};
668
- result[currentKey][key] = (value == null ? void 0 : value.trim()) || null;
669
+ result[currentKey][key] = value?.trim() || null;
669
670
  } else {
670
671
  currentKey = key;
671
- result[key] = (value == null ? void 0 : value.trim()) || null;
672
+ result[key] = value?.trim() || null;
672
673
  }
673
674
  } else {
674
675
  this.logger.error(
@@ -683,13 +684,13 @@ var YamlParsing = class {
683
684
  return result;
684
685
  }
685
686
  };
686
- YamlParsing.logger = new LoggerCore6(loggerConfig);
687
687
 
688
688
  // src/utils/dateTimeFormatted.utils.ts
689
689
  var dateTimeFormatted = `${(/* @__PURE__ */ new Date()).getMonth()}-${(/* @__PURE__ */ new Date()).getDate()}-${(/* @__PURE__ */ new Date()).getFullYear()} ${(/* @__PURE__ */ new Date()).getHours()}:${(/* @__PURE__ */ new Date()).getMinutes()}:${(/* @__PURE__ */ new Date()).getSeconds()}`;
690
690
 
691
691
  // src/utils/environment.utils.ts
692
692
  var Environment = class {
693
+ config;
693
694
  constructor(config) {
694
695
  this.config = config;
695
696
  }
@@ -711,6 +712,7 @@ import { LoggerCore as LoggerCore7 } from "opticore-logger";
711
712
  import { StackTraceError as StackTraceError2 } from "opticore-catch-exception-error";
712
713
  import { CLocal as CLocal7, TranslationLoader as TranslationLoader7 } from "opticore-translator";
713
714
  var DbConnexionConfigError = class {
715
+ static logger = new LoggerCore7(loggerConfig);
714
716
  /**
715
717
  *
716
718
  * @param e
@@ -797,15 +799,12 @@ var DbConnexionConfigError = class {
797
799
  return new StackTraceError2(props, name, status7, true);
798
800
  }
799
801
  };
800
- DbConnexionConfigError.logger = new LoggerCore7(loggerConfig);
801
802
 
802
803
  // src/core/config/database/connexion.config.database.ts
803
804
  import { StackTraceError as ErrorHandler2 } from "opticore-catch-exception-error";
804
805
  var DatabaseConnectionConfig = class {
805
- constructor() {
806
- this.env = new Environment(getEnvVariable3);
807
- this.logger = new LoggerCore8(loggerConfig);
808
- }
806
+ env = new Environment(getEnvVariable3);
807
+ logger = new LoggerCore8(loggerConfig);
809
808
  /**
810
809
  * MySQL database connection with an optional arguments
811
810
  * Establish the connection between app and Database Management System.
@@ -923,7 +922,7 @@ var MPostgresCheckerDatabase = (optionalArgumentConnection) => {
923
922
  };
924
923
 
925
924
  // src/utils/utility.utils.ts
926
- import process2 from "node:process";
925
+ import process from "node:process";
927
926
  import chalk from "chalk";
928
927
  import colors from "ansi-colors";
929
928
  import path from "path";
@@ -943,7 +942,7 @@ var Utility = class {
943
942
  * Returns an Object containing a node version, openssl, and v0
944
943
  */
945
944
  getVersions() {
946
- const processVers = process2.versions;
945
+ const processVers = process.versions;
947
946
  const data = {
948
947
  "node version": processVers.node,
949
948
  "openssl": processVers.openssl,
@@ -963,14 +962,14 @@ var Utility = class {
963
962
  * and Memory usage system
964
963
  */
965
964
  getUsageMemory() {
966
- const memoryData = process2.memoryUsage();
965
+ const memoryData = process.memoryUsage();
967
966
  const data = {
968
967
  "Resident Set Size - total memory allocated for the process execution": this.formatMemoryUsage(memoryData.rss),
969
968
  "Total size of the allocated heap": this.formatMemoryUsage(memoryData.heapTotal),
970
969
  "Actual memory used during the execution": this.formatMemoryUsage(memoryData.heapUsed),
971
970
  "V8 external memory": this.formatMemoryUsage(memoryData.external),
972
- "Memory usage user": this.formatMemoryUsage(process2.cpuUsage().user),
973
- "Memory usage system": this.formatMemoryUsage(process2.cpuUsage().system)
971
+ "Memory usage user": this.formatMemoryUsage(process.cpuUsage().user),
972
+ "Memory usage system": this.formatMemoryUsage(process.cpuUsage().system)
974
973
  };
975
974
  return {
976
975
  "rss": data["Resident Set Size - total memory allocated for the process execution"],
@@ -985,11 +984,11 @@ var Utility = class {
985
984
  * Return an Object containing a project path and running server time
986
985
  */
987
986
  getProjectInfo() {
988
- const startTime = process2.hrtime();
989
- const endTime = process2.hrtime(startTime);
987
+ const startTime = process.hrtime();
988
+ const endTime = process.hrtime(startTime);
990
989
  const executionTime = (endTime[0] * 1e9 + endTime[1]) / 1e6;
991
990
  return {
992
- "projectPath": path.join(process2.cwd()),
991
+ "projectPath": path.join(process.cwd()),
993
992
  "startingTime": `${executionTime.toFixed(5)} ms`
994
993
  };
995
994
  }
@@ -999,7 +998,7 @@ var Utility = class {
999
998
  * @private
1000
999
  */
1001
1000
  getEnvFileLoading(filePath) {
1002
- const fullPath = path.resolve(process2.cwd(), filePath);
1001
+ const fullPath = path.resolve(process.cwd(), filePath);
1003
1002
  if (fs.existsSync(fullPath)) {
1004
1003
  const env = fs.readFileSync(fullPath, "utf-8");
1005
1004
  const lines = env.split("\n");
@@ -1007,7 +1006,7 @@ var Utility = class {
1007
1006
  const match = line.match(/^([^#=]+)=([^#]+)$/);
1008
1007
  if (match) {
1009
1008
  const key = match[1].trim();
1010
- process2.env[key] = match[2].trim();
1009
+ process.env[key] = match[2].trim();
1011
1010
  }
1012
1011
  });
1013
1012
  }
@@ -1019,7 +1018,7 @@ var Utility = class {
1019
1018
  */
1020
1019
  getServerRunningMode(development, production) {
1021
1020
  this.getEnvFileLoading(".env");
1022
- const isDevelopment = process2.env.NODE_ENV === "development";
1021
+ const isDevelopment = process.env.NODE_ENV === "development";
1023
1022
  if (isDevelopment) {
1024
1023
  return `${TranslationLoader9.t("serverRunning", CLocal9)} ${colors.bgBlue(`${colors.bold(`${development}`)}`)} mode`;
1025
1024
  } else {
@@ -1058,6 +1057,7 @@ import { LoggerCore as LoggerCore9 } from "opticore-logger";
1058
1057
  import { HttpStatusCode as HttpStatusCode2 } from "opticore-http-response";
1059
1058
  import { CLocal as CLocal10, TranslationLoader as TranslationLoader10 } from "opticore-translator";
1060
1059
  var PathModuleVerifier = class {
1060
+ static log = new LoggerCore9(loggerConfig);
1061
1061
  /**
1062
1062
  * Verifies if modules at specific paths are loaded.
1063
1063
  * If any module is not loaded, it throws an error.
@@ -1090,19 +1090,22 @@ var PathModuleVerifier = class {
1090
1090
  try {
1091
1091
  const resolvedPath = resolve(modulePath);
1092
1092
  return __require.cache[resolvedPath] !== void 0;
1093
- } catch (e) {
1093
+ } catch {
1094
1094
  return false;
1095
1095
  }
1096
1096
  }
1097
1097
  };
1098
- PathModuleVerifier.log = new LoggerCore9(loggerConfig);
1099
1098
 
1100
1099
  // src/core/config/loaders/translateLanguage.loader.ts
1101
1100
  import path2 from "path";
1102
1101
  import { TranslationLoader as TranslationLoader11 } from "opticore-translator";
1103
1102
  import { getEnvVariable as getEnvVariable4 } from "opticore-env-access";
1104
- var translateWebAppLanguageLoader = () => {
1105
- TranslationLoader11.loadTranslations(path2.join(process.cwd(), "src", "utils", "translations"), getEnvVariable4.defaultLocal);
1103
+ import { fileURLToPath } from "url";
1104
+ var translateWebAppCoreLanguageLoader = () => {
1105
+ const __filename2 = fileURLToPath(import.meta.url);
1106
+ const __dirname2 = path2.dirname(__filename2);
1107
+ const translateMsgJsonFilePath = path2.join(__dirname2, "../../../", "utils", "translations");
1108
+ TranslationLoader11.loadTranslations(translateMsgJsonFilePath, getEnvVariable4.defaultLocal);
1106
1109
  };
1107
1110
  export {
1108
1111
  CLogLevel,
@@ -1124,5 +1127,5 @@ export {
1124
1127
  dateTimeFormatted,
1125
1128
  loggerConfig,
1126
1129
  optionalArgumentConnectionUtil,
1127
- translateWebAppLanguageLoader
1130
+ translateWebAppCoreLanguageLoader
1128
1131
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opticore-webapp-core",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "opticore Web Application core module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -30,16 +30,15 @@
30
30
  "dotenv": "^16.4.7",
31
31
  "mongodb": "^6.6.1",
32
32
  "mysql": "^2.18.1",
33
- "opticore-catch-exception-error": "^1.0.0",
33
+ "opticore-catch-exception-error": "^1.0.9",
34
34
  "opticore-env-access": "^1.0.2",
35
- "opticore-express": "^1.0.0",
35
+ "opticore-express": "^1.0.3",
36
36
  "opticore-http-response": "^1.0.3",
37
- "opticore-logger": "^1.0.11",
38
- "opticore-translator": "^1.0.1",
37
+ "opticore-logger": "^1.0.13",
38
+ "opticore-translator": "^1.0.3",
39
39
  "pg": "^8.11.5"
40
40
  },
41
41
  "devDependencies": {
42
- "@types/express": "^5.0.0",
43
42
  "@types/mysql": "^2.15.26",
44
43
  "@types/node": "^22.13.5",
45
44
  "@types/pg": "^8.11.11",
package/tsconfig.json CHANGED
@@ -4,9 +4,9 @@
4
4
  "noImplicitAny": true,
5
5
  "esModuleInterop": true,
6
6
  "strictNullChecks": true,
7
- "module": "commonjs",
7
+ "module": "ES2022",
8
8
  "pretty": true,
9
- "target": "es2017",
9
+ "target": "es2022",
10
10
  "moduleResolution": "node",
11
11
  "declaration": true,
12
12
  "isolatedModules": true,