opticore-catch-exception-error 1.0.2 → 1.0.4
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 +17 -2
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +15 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -44,7 +44,8 @@ __export(index_exports, {
|
|
|
44
44
|
StackTraceSyntaxError: () => StackTraceSyntaxError,
|
|
45
45
|
StackTraceSystemError: () => StackTraceSystemError,
|
|
46
46
|
StackTraceTypeError: () => StackTraceTypeError,
|
|
47
|
-
StackTraceURIError: () => StackTraceURIError
|
|
47
|
+
StackTraceURIError: () => StackTraceURIError,
|
|
48
|
+
translateCatchExceptionErrorLanguageLoader: () => translateCatchExceptionErrorLanguageLoader
|
|
48
49
|
});
|
|
49
50
|
module.exports = __toCommonJS(index_exports);
|
|
50
51
|
|
|
@@ -708,6 +709,19 @@ var ServerListenEventError = class {
|
|
|
708
709
|
}
|
|
709
710
|
};
|
|
710
711
|
ServerListenEventError.logger = new import_opticore_logger.LoggerCore();
|
|
712
|
+
|
|
713
|
+
// src/core/config/loaders/translateLanguage.loader.ts
|
|
714
|
+
var import_path = __toESM(require("path"), 1);
|
|
715
|
+
var import_opticore_translator2 = require("opticore-translator");
|
|
716
|
+
var import_opticore_env_access = require("opticore-env-access");
|
|
717
|
+
var translateCatchExceptionErrorLanguageLoader = () => {
|
|
718
|
+
import_opticore_translator2.TranslationLoader.loadTranslations(import_path.default.join("src", "utils", "translations"), import_opticore_env_access.getEnvVariable.defaultLocal);
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
// src/index.ts
|
|
722
|
+
(() => {
|
|
723
|
+
translateCatchExceptionErrorLanguageLoader();
|
|
724
|
+
})();
|
|
711
725
|
// Annotate the CommonJS export names for ESM import in node:
|
|
712
726
|
0 && (module.exports = {
|
|
713
727
|
CErrorName,
|
|
@@ -724,5 +738,6 @@ ServerListenEventError.logger = new import_opticore_logger.LoggerCore();
|
|
|
724
738
|
StackTraceSyntaxError,
|
|
725
739
|
StackTraceSystemError,
|
|
726
740
|
StackTraceTypeError,
|
|
727
|
-
StackTraceURIError
|
|
741
|
+
StackTraceURIError,
|
|
742
|
+
translateCatchExceptionErrorLanguageLoader
|
|
728
743
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -233,4 +233,6 @@ declare class ServerListenEventError {
|
|
|
233
233
|
private static traceError;
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
|
|
236
|
+
declare const translateCatchExceptionErrorLanguageLoader: () => void;
|
|
237
|
+
|
|
238
|
+
export { CErrorName, CEvent, CEventNameError, ServerListenEventError, StackTraceAssertionError, StackTraceError, StackTraceEvalError, StackTraceGeneralError, StackTraceOpenSSLError, StackTraceRangeError, StackTraceReferenceError, StackTraceSyntaxError, StackTraceSystemError, StackTraceTypeError, StackTraceURIError, translateCatchExceptionErrorLanguageLoader };
|
package/dist/index.d.ts
CHANGED
|
@@ -233,4 +233,6 @@ declare class ServerListenEventError {
|
|
|
233
233
|
private static traceError;
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
|
|
236
|
+
declare const translateCatchExceptionErrorLanguageLoader: () => void;
|
|
237
|
+
|
|
238
|
+
export { CErrorName, CEvent, CEventNameError, ServerListenEventError, StackTraceAssertionError, StackTraceError, StackTraceEvalError, StackTraceGeneralError, StackTraceOpenSSLError, StackTraceRangeError, StackTraceReferenceError, StackTraceSyntaxError, StackTraceSystemError, StackTraceTypeError, StackTraceURIError, translateCatchExceptionErrorLanguageLoader };
|
package/dist/index.js
CHANGED
|
@@ -658,6 +658,19 @@ var ServerListenEventError = class {
|
|
|
658
658
|
}
|
|
659
659
|
};
|
|
660
660
|
ServerListenEventError.logger = new LoggerCore();
|
|
661
|
+
|
|
662
|
+
// src/core/config/loaders/translateLanguage.loader.ts
|
|
663
|
+
import path from "path";
|
|
664
|
+
import { TranslationLoader as TranslationLoader2 } from "opticore-translator";
|
|
665
|
+
import { getEnvVariable } from "opticore-env-access";
|
|
666
|
+
var translateCatchExceptionErrorLanguageLoader = () => {
|
|
667
|
+
TranslationLoader2.loadTranslations(path.join("src", "utils", "translations"), getEnvVariable.defaultLocal);
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
// src/index.ts
|
|
671
|
+
(() => {
|
|
672
|
+
translateCatchExceptionErrorLanguageLoader();
|
|
673
|
+
})();
|
|
661
674
|
export {
|
|
662
675
|
CErrorName,
|
|
663
676
|
CEvent,
|
|
@@ -673,5 +686,6 @@ export {
|
|
|
673
686
|
StackTraceSyntaxError,
|
|
674
687
|
StackTraceSystemError,
|
|
675
688
|
StackTraceTypeError,
|
|
676
|
-
StackTraceURIError
|
|
689
|
+
StackTraceURIError,
|
|
690
|
+
translateCatchExceptionErrorLanguageLoader
|
|
677
691
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opticore-catch-exception-error",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "opticore catch exception error",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"homepage": "https://github.com/guyzoum77/opticore-catch-exception-error#readme",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"chalk": "^5.4.1",
|
|
29
|
-
"node": "^22.13.5",
|
|
30
29
|
"opticore-express": "^1.0.1",
|
|
31
30
|
"opticore-http-response": "^1.0.3",
|
|
32
|
-
"opticore-translator": "^1.0.1"
|
|
31
|
+
"opticore-translator": "^1.0.1",
|
|
32
|
+
"tsx": "^4.19.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "^22.13.5",
|