opticore-catch-exception-error 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
@@ -560,7 +560,7 @@ var ServerListenEventError = class {
560
560
  static unhandledRejection(reason, promise) {
561
561
  this.stackTrace = this.traceError(
562
562
  import_opticore_translator.TranslationLoader.t("unhandledRejectionAtPromise", import_opticore_translator.CLocal, { promise, reason }),
563
- import_opticore_translator.TranslationLoader.t("unhandledRejection", import_opticore_translator.CLocal),
563
+ import_opticore_translator.TranslationLoader.t("unhandledRejection", import_opticore_translator.CLocal, { promise, reason }),
564
564
  import_opticore_http_response11.HttpStatusCode.SERVICE_UNAVAILABLE
565
565
  );
566
566
  this.logger.error(
package/dist/index.js CHANGED
@@ -509,7 +509,7 @@ var ServerListenEventError = class {
509
509
  static unhandledRejection(reason, promise) {
510
510
  this.stackTrace = this.traceError(
511
511
  TranslationLoader.t("unhandledRejectionAtPromise", CLocal, { promise, reason }),
512
- TranslationLoader.t("unhandledRejection", CLocal),
512
+ TranslationLoader.t("unhandledRejection", CLocal, { promise, reason }),
513
513
  status11.SERVICE_UNAVAILABLE
514
514
  );
515
515
  this.logger.error(
@@ -0,0 +1,5 @@
1
+ import {CLocal, TranslationLoader} from "opticore-translator";
2
+ import path from "path";
3
+
4
+ TranslationLoader.loadTranslations(path.join(process.cwd(), 'src','utils', 'translations'));
5
+ console.log(TranslationLoader.t("rejectionPromise", 'en', { promise: "wd digital" }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opticore-catch-exception-error",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "opticore catch exception error",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -28,7 +28,7 @@
28
28
  "chalk": "^5.4.1",
29
29
  "opticore-express": "^1.0.3",
30
30
  "opticore-http-response": "^1.0.3",
31
- "opticore-translator": "^1.0.2",
31
+ "opticore-translator": "^1.0.3",
32
32
  "tsx": "^4.19.3"
33
33
  },
34
34
  "devDependencies": {