opticore-catch-exception-error 1.0.10 → 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, "../../../../", "dist", "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, "../../../../", "dist", "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
 
@@ -1,82 +1,21 @@
1
1
  {
2
- "erBadDbError": "ER_BAD_DB_ERROR",
3
- "erAccessDeniedError": "ER_ACCESS_DENIED_ERROR",
4
- "erNotSupportedAuthMode": "ER_NOT_SUPPORTED_AUTH_MODE",
5
- "eAiAgain": "EAI_AGAIN",
6
- "dbConnection": "Database connection",
7
- "dbConnectionClosed": "MySQL connection is closed",
8
- "mysqlErrorCon": "MysqlError connection",
9
- "mySQLError": "MysqlError",
10
- "mySqlCloseConnection": "MySql close connection",
11
- "dbConnexionSuccess": "The database connection was successful 🚀",
12
- "mongoConnectionSuccess": "Connection to database is successfully.",
13
- "connSuccess": "success connection",
14
- "mongoDBConnectionChecker": "MongoDB Connection Checker",
15
- "mongoConnection": "connection",
16
- "mongoDBAuthentication": "authentication",
17
- "mongoDBConnection": "MongoDB connection",
18
- "mongoDBAuthenticationFailed": "failed",
19
- "mongoDBUnableParsingUrl": "unable to parse",
20
- "mongoDBConnectionUrl": "url",
21
- "mongoDBServerSelection": "MongoServer selection error",
22
- "mongoDBServer": "MongoServer",
23
- "mongoDBConnectionError": "connection error",
24
- "mongoDBError": "error",
25
- "mongoDBAuthenticationError": "Authentication failed, be sure the credentials is correct.",
26
- "postgresDBConnectionChecker": "PostgresDB Connection Checker",
27
- "postgresConnection": "connection",
28
- "postgresConnectionSuccess": "Connection to database is successfully.",
29
- "postgresSuccessConn": "Postgres client Connection",
30
- "postgresClosingConnSuccess": "Postgres client is close connection.",
31
- "postgresEndClientRejection": "Postgres client end rejected",
32
- "postgresClientError": "Postgres client error",
33
- "postgresEndRejection": "End rejected",
34
- "postgresConnError": "Postgres connection error",
35
- "postgresException": "Exception",
36
- "rsaKeyNotFound": "RSA key provided is not found.",
37
- "encryptionWithPrivateKeyFailed": "Encryption With PrivateKey",
38
- "encryptionFailed": "Encryption failed",
39
- "verifyExistingKey": "Verify Existing Key",
40
- "signatureRSAKeyFailed": "Signature verification failed.",
41
- "signatureRSAKeysError": "Signature RSA Keys Error",
42
- "errorDecryption": "Error decryption with private key",
43
- "errorNameNotVerifyingRSAKey": "Error Verify RSA Key",
44
- "decryptionWithPublicKeyFailed": "Decryption With PublicKey",
45
- "decryptionFailed": "Decryption failed",
46
- "verifyRSAKey": "Verify RSA Keys",
47
- "verifyRSAKeyFailed": "Verify RSA Keys Failed",
48
- "notVerifying": "Verification failed",
49
- "mongoServerError": "MongoServerSelectionError: getaddrinfo EAI_AGAIN ({dbHost} is not allow to database connection)",
50
- "dbUrlParsingError": "Unable to parse {dbHost}:{dbPort} with URL",
51
- "errorDBHost": "A database host {host} does not allow connection. Please either set the host like this: {localhost} in your .env file",
52
- "unknownDB": "Database {database} is unknown. Please try to use Database CLI to create your database, or do it manually in your Database Management System",
53
- "accessDeniedToDBCon": "Access denied for user {user}. Database credentials in .env file are User: {user} and Password: {password}. '{user}''{password}'@'localhost'. Try to set user and password in .env file",
54
- "badFormat": "Unsupported YAML line format",
55
- "parsingFailed": "YAML Parsing failed",
56
- "unsupportedFormat": "Unsupported YAML format",
57
- "readingError": "Error reading YAML file",
58
- "invalidRequest": "Invalid request",
59
- "moduleNotLoaded": "The following module paths are not loaded: {notLoadedPaths}",
60
- "serverRouteNotExist": "This route : http://{host}:{port} do not exist.",
61
- "webServer": "Web server",
2
+ "errorHostUrl": "The host and port are not define, please define them in .env",
62
3
  "listening": "listening",
4
+ "webServer": "Web server",
63
5
  "webHost": "host",
64
- "badHost": "bad host",
65
6
  "hostNotFound": "not found",
66
- "errorHostUrl": "The host and port are not define, please define them in .env",
67
- "badPort": "bad port",
7
+ "badHost": "bad host {badHost}",
8
+ "badPort": "bad port {badPort}",
68
9
  "errorPort": "The port is not correct. Please define a right port with number port.",
69
10
  "errorHost": "The host can't be empty or blank. Please define a string host in .env",
70
11
  "serverStart": "Server start",
71
- "serverStartError": "Server start error",
12
+ "serverStartError": "Server start with error {err}",
72
13
  "processExitCode": "Process will exit with code: {code}",
73
14
  "beforeExit": "BeforeExit",
74
- "processBeforeExit": "process before exit",
75
15
  "childProcessDiscon": "Child process disconnected",
76
16
  "processDiscon": "process disconnected",
77
- "disconnected": "Disconnected",
78
- "completed": "completed",
79
- "finishingProcessWell": "The process finished as expected and everything is ok",
17
+ "completed": "completed with code {code}",
18
+ "finishingProcessWell": "The process is finishing well with code {code}",
80
19
  "serverStopped": "[OK] The server shutting down",
81
20
  "somethingWentWrong": "Something went wrong",
82
21
  "genErrors": "General Errors",
@@ -88,8 +27,8 @@
88
27
  "cmdNotFoundInSystemPath": "The command was not found in the system's PATH or is misspelled",
89
28
  "argInvalid": "Invalid argument",
90
29
  "scriptEndedManuallyByCtrlC": "Indicates that the script was manually terminated by the user using the Control-C (SIGINT) signal",
91
- "processEndedBySIGKILL": "Indicates that the process was terminated by a SIGKILL signal, possibly due to an out-of-memory situation",
92
30
  "scriptEnded": "Script terminated",
31
+ "processEndedBySIGKILL": "Indicates that the process was terminated by a SIGKILL signal, possibly due to an out-of-memory situation",
93
32
  "accessProcessIllegally": "Indicates that the process accessed an illegal memory address (segfault)",
94
33
  "defaultSegment": "Segmentation fault",
95
34
  "processReceivedSigtermSignal": "Indicates that the process received a SIGTERM signal to terminate",
@@ -98,33 +37,22 @@
98
37
  "outRange": "out of range",
99
38
  "errorOccurring": "Error is occurring",
100
39
  "errors": "errors",
40
+ "warning": "Warning {warning}",
101
41
  "promiseRejectionHandled": "Promise rejection is handled at : {promise}",
102
- "rejectionPromise": "rejection promise",
42
+ "rejectionPromise": "rejection promise {promise}",
103
43
  "uncaughtExceptionHandled": "uncaught exception handled",
104
44
  "unhandledRejectionAtPromise": "Unhandled Rejection at: Promise {promise} -- reason {reason}",
105
- "unhandledRejection": "Unhandled rejection",
45
+ "unhandledRejection": "Unhandled rejection at: Promise {promise} -- reason {reason}",
106
46
  "processGotMsg": "process got message {message}",
107
- "msgException": "message exception",
47
+ "msgException": "message exception {}",
108
48
  "promiseReason": "{promise} -- {reason}",
109
49
  "multipleResolvesDetected": "Multiple resolves detected : {type}",
110
- "serverWebStopped": "The Web server has been stopped !",
111
50
  "okSuccess": "[ OK ] Success",
112
- "processPIDReceivedSignal": "Process ${process.pid} received a SIGTERM signal : {signal}",
113
- "serverClosed": "Server is closed",
51
+ "processPIDReceivedSignal": "Process ${process.pid} received a SIGTERM signal : {signal} {promise} -- {reason}",
114
52
  "allProcessStopped": "All processes are stopped",
115
- "serverDroppedCon": "The server dropped new connections",
116
- "serverMaxCon": "Server maxConnection",
117
- "internalServerError": "Internal Server Error",
118
- "resStatusNotFunc": "res.status is not a function",
119
- "respndNotFunc": "response not Function",
120
- "expressErrorHandlingMiddleware": "Express error-handling middleware",
121
- "expressError": "Express error",
122
- "serverRunning": "The server is running in",
123
- "okServerListening": "[OK] Web server listening",
124
- "webServerUseNodeVersion": "The Web server is using Node.js version",
125
- "startupTime": "Startup time:",
126
- "totalMemory": "Resident Set Size - total memory allocated for the process execution :",
127
- "memoryUsedDuringExecution": "Actual memory used during the execution :",
128
- "memoryUsedByUser": "Memory usage by user :",
129
- "memoryUsedBySystem": "Memory usage by system :"
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}"
130
58
  }
@@ -1,49 +1,58 @@
1
1
  {
2
- "erBadDbError": "ER_BAD_DB_ERROR",
3
- "erAccessDeniedError": "ER_ACCESS_DENIED_ERROR",
4
- "erNotSupportedAuthMode": "ER_NOT_SUPPORTED_AUTH_MODE",
5
- "eAiAgain": "EAI_AGAIN",
6
- "dbConnection": "DataBase connection",
7
- "dbConnectionClosed": "MySQL connection is closed",
8
- "mysqlErrorCon": "MysqlError connection",
9
- "mySQLError": "MysqlError",
10
- "mySqlCloseConnection": "MySql close connection",
11
- "mongoConnectionSuccess": "Connection to database is successfully.",
12
- "mongoDBConnectionChecker": "MongoDB Connection Checker",
13
- "mongoConnection": "connection",
14
- "mongoDBAuthentication": "authentication",
15
- "mongoDBConnection": "MongoDB connection",
16
- "mongoDBAuthenticationFailed": "failed",
17
- "mongoDBUnableParsingUrl": "unable to parse",
18
- "mongoDBConnectionUrl": "url",
19
- "mongoDBServerSelection": "MongoServer selection error",
20
- "mongoDBServer": "MongoServer",
21
- "mongoDBConnectionError": "connection error",
22
- "mongoDBError": "error",
23
- "mongoDBAuthenticationError": "Authentication failed, be sure the credentials is correct.",
24
- "postgresDBConnectionChecker": "PostgresDB Connection Checker",
25
- "postgresConnection": "connection",
26
- "postgresConnectionSuccess": "Connection to database is successfully.",
27
- "postgresSuccessConn": "Postgres client Connection",
28
- "postgresClosingConnSuccess": "Postgres client is close connection.",
29
- "postgresEndClientRejection": "Postgres client end rejected",
30
- "postgresClientError": "Postgres client error",
31
- "postgresEndRejection": "End rejected",
32
- "postgresConnError": "Postgres connection error",
33
- "postgresException": "Exception",
34
- "rsaKeyNotFound": "RSA key provided is not found.",
35
- "encryptionWithPrivateKeyFailed": "Encryption With PrivateKey",
36
- "encryptionFailed": "Encryption failed",
37
- "verifyExistingKey": "Verify Existing Key",
38
- "signatureRSAKeyFailed": "Signature verification failed.",
39
- "signatureRSAKeysError": "Signature RSA Keys Error",
40
- "errorDecryption": "Error decryption with private key",
41
- "errorNameNotVerifyingRSAKey": "Error Verify RSA Key",
42
- "decryptionWithPublicKeyFailed": "Decryption With PublicKey",
43
- "decryptionFailed": "Decryption failed",
44
- "verifyRSAKey": "Verify RSA Keys",
45
- "verifyRSAKeyFailed": "Verify RSA Keys Failed",
46
- "notVerifying": "Verification failed",
47
- "mongoServerError": "MongoServerSelectionError: getaddrinfo EAI_AGAIN ({dbHost} is not allow to database connection)",
48
- "dbUrlParsingError": "Unable to parse ${dbHost}:${dbPort} with URL"
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}"
49
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opticore-catch-exception-error",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "opticore catch exception error",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",