opticore-catch-exception-error 1.0.9 → 1.0.11

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
@@ -212,13 +212,13 @@ var import_opticore_env_access2 = require("opticore-env-access");
212
212
 
213
213
  // src/core/config/loaders/translateLanguage.loader.ts
214
214
  var import_path = __toESM(require("path"), 1);
215
+ var import_module = require("module");
215
216
  var import_opticore_translator = require("opticore-translator");
216
217
  var import_opticore_env_access = require("opticore-env-access");
217
- var import_url = require("url");
218
218
  var translateCatchExceptionErrorLanguageLoader = () => {
219
- const __filename2 = (0, import_url.fileURLToPath)(importMetaUrl);
220
- const __dirname = import_path.default.dirname(__filename2);
221
- const translateMsgJsonFilePath = import_path.default.join(__dirname, "../../../", "utils", "translations");
219
+ const require2 = (0, import_module.createRequire)(importMetaUrl);
220
+ const packagePath = import_path.default.dirname(require2.resolve("opticore-catch-exception-error"));
221
+ const translateMsgJsonFilePath = import_path.default.join(packagePath, "utils", "translations");
222
222
  import_opticore_translator.TranslationLoader.loadTranslations(translateMsgJsonFilePath, import_opticore_env_access.getEnvVariable.defaultLocal);
223
223
  };
224
224
 
package/dist/index.js CHANGED
@@ -158,13 +158,13 @@ import { getEnvVariable as getEnvVariable2 } from "opticore-env-access";
158
158
 
159
159
  // src/core/config/loaders/translateLanguage.loader.ts
160
160
  import path from "path";
161
+ import { createRequire } from "module";
161
162
  import { TranslationLoader } from "opticore-translator";
162
163
  import { getEnvVariable } from "opticore-env-access";
163
- import { fileURLToPath } from "url";
164
164
  var translateCatchExceptionErrorLanguageLoader = () => {
165
- const __filename2 = fileURLToPath(import.meta.url);
166
- const __dirname2 = path.dirname(__filename2);
167
- const translateMsgJsonFilePath = path.join(__dirname2, "../../../", "utils", "translations");
165
+ const require2 = createRequire(import.meta.url);
166
+ const packagePath = path.dirname(require2.resolve("opticore-catch-exception-error"));
167
+ const translateMsgJsonFilePath = path.join(packagePath, "utils", "translations");
168
168
  TranslationLoader.loadTranslations(translateMsgJsonFilePath, getEnvVariable.defaultLocal);
169
169
  };
170
170
 
@@ -0,0 +1,58 @@
1
+ {
2
+ "errorHostUrl": "The host and port are not define, please define them in .env",
3
+ "listening": "listening",
4
+ "webServer": "Web server",
5
+ "webHost": "host",
6
+ "hostNotFound": "not found",
7
+ "badHost": "bad host {badHost}",
8
+ "badPort": "bad port {badPort}",
9
+ "errorPort": "The port is not correct. Please define a right port with number port.",
10
+ "errorHost": "The host can't be empty or blank. Please define a string host in .env",
11
+ "serverStart": "Server start",
12
+ "serverStartError": "Server start with error {err}",
13
+ "processExitCode": "Process will exit with code: {code}",
14
+ "beforeExit": "BeforeExit",
15
+ "childProcessDiscon": "Child process disconnected",
16
+ "processDiscon": "process disconnected",
17
+ "completed": "completed with code {code}",
18
+ "finishingProcessWell": "The process is finishing well with code {code}",
19
+ "serverStopped": "[OK] The server shutting down",
20
+ "somethingWentWrong": "Something went wrong",
21
+ "genErrors": "General Errors",
22
+ "exited": "Exited",
23
+ "incorrectCmd": "Incorrect using of shell commands",
24
+ "misuseShell": "Misuse of shell builtins",
25
+ "cmdNotExecutable": "The command is found but is not executable (e.g., trying to execute a directory)",
26
+ "cmdNotFound": "Command not found",
27
+ "cmdNotFoundInSystemPath": "The command was not found in the system's PATH or is misspelled",
28
+ "argInvalid": "Invalid argument",
29
+ "scriptEndedManuallyByCtrlC": "Indicates that the script was manually terminated by the user using the Control-C (SIGINT) signal",
30
+ "scriptEnded": "Script terminated",
31
+ "processEndedBySIGKILL": "Indicates that the process was terminated by a SIGKILL signal, possibly due to an out-of-memory situation",
32
+ "accessProcessIllegally": "Indicates that the process accessed an illegal memory address (segfault)",
33
+ "defaultSegment": "Segmentation fault",
34
+ "processReceivedSigtermSignal": "Indicates that the process received a SIGTERM signal to terminate",
35
+ "processReceived": "process received a SIGTERM",
36
+ "exitCode": "An exit code that is outside the allowable range (0-255 for Unix-like systems)",
37
+ "outRange": "out of range",
38
+ "errorOccurring": "Error is occurring",
39
+ "errors": "errors",
40
+ "warning": "Warning {warning}",
41
+ "promiseRejectionHandled": "Promise rejection is handled at : {promise}",
42
+ "rejectionPromise": "rejection promise {promise}",
43
+ "uncaughtExceptionHandled": "uncaught exception handled",
44
+ "unhandledRejectionAtPromise": "Unhandled Rejection at: Promise {promise} -- reason {reason}",
45
+ "unhandledRejection": "Unhandled rejection at: Promise {promise} -- reason {reason}",
46
+ "processGotMsg": "process got message {message}",
47
+ "msgException": "message exception {}",
48
+ "promiseReason": "{promise} -- {reason}",
49
+ "multipleResolvesDetected": "Multiple resolves detected : {type}",
50
+ "okSuccess": "[ OK ] Success",
51
+ "processPIDReceivedSignal": "Process ${process.pid} received a SIGTERM signal : {signal} {promise} -- {reason}",
52
+ "allProcessStopped": "All processes are stopped",
53
+ "internalServerError": "Internal Server Error : {err}",
54
+ "resStatusNotFunc": "res.status is not a function {err}",
55
+ "respndNotFunc": "response not Function {err}",
56
+ "expressErrorHandlingMiddleware": "Express error-handling middleware {err}",
57
+ "expressError": "Express error {err}"
58
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "errorHostUrl": "The host and port are not define, please define them in .env",
3
+ "listening": "listening",
4
+ "webServer": "Web server",
5
+ "webHost": "host",
6
+ "badHost": "bad host",
7
+ "hostNotFound": "not found",
8
+ "badPort": "bad port",
9
+ "errorPort": "The port is not correct. Please define a right port with number port.",
10
+ "errorHost": "The host can't be empty or blank. Please define a string host in .env",
11
+ "serverStart": "Server start",
12
+ "serverStartError": "Server start error",
13
+ "processExitCode": "Process will exit with code: {code}",
14
+ "beforeExit": "BeforeExit",
15
+ "childProcessDiscon": "Child process disconnected",
16
+ "processDiscon": "process disconnected",
17
+ "completed": "completed",
18
+ "finishingProcessWell": "The process is finishing well with code {code}",
19
+ "serverStopped": "[OK] The server shutting down",
20
+ "somethingWentWrong": "Something went wrong",
21
+ "genErrors": "General Errors",
22
+ "exited": "Exited",
23
+ "incorrectCmd": "Incorrect using of shell commands",
24
+ "misuseShell": "Misuse of shell builtins",
25
+ "cmdNotExecutable": "The command is found but is not executable (e.g., trying to execute a directory)",
26
+ "cmdNotFound": "Command not found",
27
+ "cmdNotFoundInSystemPath": "The command was not found in the system's PATH or is misspelled",
28
+ "argInvalid": "Invalid argument",
29
+ "scriptEndedManuallyByCtrlC": "Indicates that the script was manually terminated by the user using the Control-C (SIGINT) signal",
30
+ "scriptEnded": "Script terminated",
31
+ "processEndedBySIGKILL": "Indicates that the process was terminated by a SIGKILL signal, possibly due to an out-of-memory situation",
32
+ "accessProcessIllegally": "Indicates that the process accessed an illegal memory address (segfault)",
33
+ "defaultSegment": "Segmentation fault",
34
+ "processReceivedSigtermSignal": "Indicates that the process received a SIGTERM signal to terminate",
35
+ "processReceived": "process received a SIGTERM",
36
+ "exitCode": "An exit code that is outside the allowable range (0-255 for Unix-like systems)",
37
+ "outRange": "out of range",
38
+ "errorOccurring": "Error is occurring",
39
+ "errors": "errors",
40
+ "warning": "Warning",
41
+ "promiseRejectionHandled": "Promise rejection is handled at : {promise}",
42
+ "rejectionPromise": "rejection promise",
43
+ "uncaughtExceptionHandled": "uncaught exception handled",
44
+ "unhandledRejectionAtPromise": "Unhandled Rejection at: Promise {promise} -- reason {reason}",
45
+ "unhandledRejection": "Unhandled rejection",
46
+ "processGotMsg": "process got message {message}",
47
+ "msgException": "message exception",
48
+ "promiseReason": "{promise} -- {reason}",
49
+ "multipleResolvesDetected": "Multiple resolves detected : {type}",
50
+ "okSuccess": "[ OK ] Success",
51
+ "processPIDReceivedSignal": "Process ${process.pid} received a SIGTERM signal : {signal}",
52
+ "allProcessStopped": "All processes are stopped",
53
+ "internalServerError": "Internal Server Error : {err}",
54
+ "resStatusNotFunc": "res.status is not a function {err}",
55
+ "respndNotFunc": "response not Function {err}",
56
+ "expressErrorHandlingMiddleware": "Express error-handling middleware {err}",
57
+ "expressError": "Express error {err}"
58
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opticore-catch-exception-error",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "opticore catch exception error",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",