opticore-webapp 1.0.18 → 1.0.20

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.
File without changes
File without changes
@@ -1,112 +0,0 @@
1
- import process from 'node:process';
2
- import EventEmitter from "node:events";
3
- import { express, NextFunction } from "opticore-express";
4
- import {
5
- ServerListenEventError,
6
- CEventNameError as eventName,
7
- CEvent as event
8
- } from "opticore-catch-exception-error";
9
-
10
-
11
-
12
- /**
13
- *
14
- */
15
- export function eventProcessHandler(localeLanguage: string): void {
16
- const errorEmitter = new EventEmitter();
17
- const app = express();
18
- const serverListenEvent = new ServerListenEventError(localeLanguage);
19
-
20
- /**
21
- * Listener for error events
22
- */
23
- errorEmitter.on(eventName.error, (error: Error): void => {
24
- serverListenEvent.listenerError(error);
25
- });
26
-
27
- /**
28
- * Catch uncaught exceptions
29
- * Process event listeners
30
- */
31
- process.on(event.beforeExit, (code: number): void => {
32
- setTimeout((): void => {
33
- serverListenEvent.processBeforeExit(code);
34
- }, 100);
35
- });
36
-
37
- /**
38
- *
39
- */
40
- process.on(event.disconnect, (): void => {
41
- serverListenEvent.processDisconnected();
42
- });
43
-
44
- /**
45
- *
46
- */
47
- process.on(event.exit, (code: number): void => {
48
- serverListenEvent.exited(code);
49
- });
50
-
51
- /**
52
- *
53
- */
54
- process.on(event.rejectionHandled, (promise: Promise<any>): void => {
55
- serverListenEvent.promiseRejectionHandled(promise);
56
- });
57
-
58
- /**
59
- *
60
- */
61
- process.on(event.uncaughtException, (error: any): void => {
62
- serverListenEvent.uncaughtException(error);
63
- });
64
-
65
- /**
66
- *
67
- */
68
- process.on(event.uncaughtExceptionMonitor, (error: any): void => {
69
- serverListenEvent.uncaughtExceptionMonitor(error);
70
- });
71
-
72
- /**
73
- *
74
- */
75
- process.on(event.unhandledRejection, (reason: any, promise: Promise<any>): void => {
76
- serverListenEvent.unhandledRejection(reason, promise);
77
- });
78
-
79
- /**
80
- *
81
- */
82
- process.on(event.warning, (warning: any): void => {
83
- serverListenEvent.warning(warning);
84
- });
85
- process.on(event.message, (message: any): void => {
86
- serverListenEvent.message(message);
87
- });
88
-
89
- /**
90
- *
91
- */
92
- process.on(event.multipleResolves, (type: string, promise: Promise<any>, reason: any): void => {
93
- serverListenEvent.multipleResolves(type, promise, reason);
94
- });
95
-
96
- /**
97
- * Handle specific signals
98
- */
99
- process.on(event.sigint, (): void => {
100
- serverListenEvent.processInterrupted();
101
- });
102
- process.on(event.sigterm, (signal: any): void => {
103
- serverListenEvent.sigtermSignalReceived(signal);
104
- });
105
-
106
- /**
107
- * Express error-handling middleware
108
- */
109
- app.use((err: Error, req: Request, res: Response, next: NextFunction): void => {
110
- serverListenEvent.expressErrorHandlingMiddleware(errorEmitter, err, req, res, next);
111
- });
112
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * Give time like: 6-8-2024 4:30:29
3
- */
4
-
5
-
6
- export const dateTimeFormattedUtils: string = `${(new Date().getMonth())}-${(new Date().getDate())}-${(new Date().getFullYear())} ${(new Date().getHours())}:${(new Date().getMinutes())}:${(new Date().getSeconds())}`;
@@ -1,20 +0,0 @@
1
- import colors from "ansi-colors";
2
- import { dateTimeFormattedUtils } from "@webApp/core/helpers/dateTimeFormatted.utils";
3
-
4
- export class LogMessageUtils {
5
- static success(title: string, action: string, contentAction: string): void {
6
- console.log(`${colors.green(`✔`)} ${colors.bgGreen(` ${colors.bold(`${colors.white(`${title}`)}`)} `)} ${dateTimeFormattedUtils} | ${colors.bgGreen(`${colors.white(` Success `)}`)} [ ${action} ] ${contentAction} - [ Status ] ${colors.bgGreen(`${colors.white(` 200 `)}`)}`);
7
- }
8
- static warning(title: string, action: string, contentAction: string): void {
9
- console.warn(`${colors.yellow(`⚠️`)} ${colors.bgYellow(` ${colors.bold(`${colors.white(`${title}`)}`)} `)} ${dateTimeFormattedUtils} | ${colors.bgYellow(`${colors.white(` Warning `)}`)} ${contentAction}`);
10
- }
11
- static info(title: string, action: string, contentAction: string): void {
12
- console.info(`${colors.cyan(`ⓘ`)} ${colors.bgCyan(` ${colors.bold(`${colors.white(`${title}`)}`)} `)} ${dateTimeFormattedUtils} | ${colors.bgCyan(`${colors.white(` Info `)}`)} ${contentAction}`);
13
- }
14
- static error(title: string, errorType: any, stackTrace: any, messageContent: any, httpCodeValue: number): void {
15
- console.error(`${colors.red(`✘`)} ${colors.bgRed(` ${colors.bold(`${colors.white(`${title}`)}`)} `)} | ${dateTimeFormattedUtils} | [ ${colors.red(`${colors.bold(` ${errorType} `)}`)} ] | [ ${colors.bold(`stack trace`)} ] ${colors.red(`${stackTrace}`)} - ${colors.red(`${messageContent}`)} - [ ${colors.red(`${colors.bold(` HttpCode `)}`)} ] ${colors.red(`${colors.bold(` ${httpCodeValue} `)}`)} `);
16
- }
17
- static requestError(title: string, errorName: string, errorMessage: string, errorCode: number): void {
18
- console.error(`[ ${colors.red(`${title}`)} ] ${dateTimeFormattedUtils} | ${colors.bgRed(`${colors.white(` ERROR `)}`)} ${colors.red(`[ ${errorName} ]`)} ${colors.red(`${errorMessage}`)} - [ Status ] ${colors.bgRed(`${colors.white(` ${errorCode} `)}`)}`);
19
- }
20
- }
@@ -1,23 +0,0 @@
1
- import colors from "ansi-colors";
2
- import { Router } from "opticore-express";
3
- import { LogMessageUtils } from "@webApp/core/helpers/logMessage.utils";
4
- import { dateTimeFormattedUtils } from "@webApp/core/helpers/dateTimeFormatted.utils";
5
- import { TranslationLoader } from "opticore-translator";
6
- import { LoggerCore } from "opticore-logger";
7
-
8
-
9
-
10
- export function modulesLoadedUtils(allAppRoutes: Router[], dbConChecker: () => void, localeLanguage: string): void {
11
- LogMessageUtils.success(
12
- `${TranslationLoader.t("kernel", localeLanguage, loggerConfig)}`,
13
- `${TranslationLoader.t("loadKernel", localeLanguage, loggerConfig)}`,
14
- `${TranslationLoader.t("moduleAppLoaded", localeLanguage, loggerConfig)}`
15
- );
16
- console.log(`${colors.whiteBright(` ${TranslationLoader.t("content", localeLanguage, loggerConfig)}`)} ${colors.green(`${TranslationLoader.t("kernel", localeLanguage, loggerConfig)} :`)} ${colors.cyan(`${colors.bold(`${TranslationLoader.t("serverSide", localeLanguage, loggerConfig)}`)}`)} ${TranslationLoader.t("hasBeenLoadedSuccessfully", localeLanguage, loggerConfig)} ${colors.green(`✔`)}`);
17
- allAppRoutes
18
- ? console.log(`${colors.whiteBright(` ${TranslationLoader.t("content", localeLanguage, loggerConfig)}`)} ${colors.green(`${TranslationLoader.t("kernel", localeLanguage, loggerConfig)} :`)} ${colors.cyan(`${colors.bold(`${TranslationLoader.t("routerService", localeLanguage, loggerConfig)}`)} `)} ${colors.green(`✔`)}`)
19
- : console.log(`${colors.red(`✘`)} ${colors.bgRed(` ${colors.bold(`${colors.white(` ${TranslationLoader.t("registerRoutes", localeLanguage, loggerConfig)} `)}`)} `)} | ${dateTimeFormattedUtils} | [ ${colors.red(`${colors.bold(` ${TranslationLoader.t("fail", localeLanguage, loggerConfig)} `)}`)} ] | [ ${colors.bold(` ${TranslationLoader.t("loading", localeLanguage, loggerConfig)} `)} ] - ${colors.red(` ${TranslationLoader.t("routers", localeLanguage, loggerConfig)} `)} - ${TranslationLoader.t("registerLoadingFailed", localeLanguage, loggerConfig)} `);
20
- typeof dbConChecker == "function"
21
- ? console.log(`${colors.whiteBright(` ${TranslationLoader.t("content", localeLanguage, loggerConfig)}`)} ${colors.green(`${TranslationLoader.t("kernel", localeLanguage, loggerConfig)} :`)} ${colors.cyan(`${colors.bold(`${TranslationLoader.t("dbConnChecker", localeLanguage, loggerConfig)}`)}`)} ${TranslationLoader.t("hasBeenLoadedSuccessfully", localeLanguage, loggerConfig)} ${colors.green(`✔`)}`)
22
- : "";
23
- }
@@ -1,145 +0,0 @@
1
- import * as path from "path";
2
- import { createRequire } from "module";
3
- import corsOrigin, { CorsOptions } from "cors";
4
- import { Server as serverWebApp } from "http";
5
- import { IncomingMessage, ServerResponse } from "node:http";
6
-
7
- import {
8
- CEventNameError as eventName,
9
- ServerListenEventError,
10
- CErrorName,
11
- JavaScriptErrors,
12
- InternalErrors,
13
- AssertionErrors,
14
- OpenSSLErrors,
15
- SystemErrors,
16
- StackTraceError,
17
- } from "opticore-catch-exception-error";
18
- import { express } from "opticore-express";
19
- import { getEnvVariable } from "opticore-env-access";
20
- import { requestCallsEvent } from "opticore-requests-called-events";
21
- import { TranslationLoader } from "opticore-translator";
22
- import { LoggerCore } from "opticore-logger";
23
-
24
- import { IRouteDefinition } from "@webApp/domains/interfaces/routeDefinition.interface";
25
- import { eventProcessHandler } from "@webApp/core/handlers/eventProcess.handler";
26
- import { CoreService } from "@webApp/application/service/core.service";
27
- import { dateTimeFormattedUtils as currentDate } from "@webApp/core/helpers/dateTimeFormatted.utils";
28
- import { SServerStartError } from "@webApp/application/service/serverStartError.service";
29
-
30
-
31
- export class WebServerCore {
32
- private serverUtility: CoreService = new CoreService();
33
-
34
- private expressApp = express();
35
-
36
- private readonly localLanguage: string;
37
- private readonly loggerConfig: LoggerCore;
38
- private readonly routerExpressApp: express.Application;
39
- private readonly port: number;
40
- private readonly host: string;
41
-
42
- private serverListenEvent: ServerListenEventError;
43
- private javaScriptErrors: JavaScriptErrors;
44
- private internalErrors: InternalErrors;
45
- private assertionErrors: AssertionErrors;
46
- private openSSLErrors: OpenSSLErrors;
47
- private systemErrors: SystemErrors;
48
-
49
- constructor(app: express.Application, loggerConfig: LoggerCore, localLanguage: string, corsOriginOptions?: Partial<CorsOptions>) {
50
- this.port = Number(getEnvVariable.appPort);
51
- this.host = getEnvVariable.appHost;
52
- this.routerExpressApp = app;
53
- this.loggerConfig = loggerConfig;
54
- this.localLanguage = localLanguage;
55
-
56
- this.expressApp.use(express.json());
57
- this.expressApp.use(express.raw());
58
- this.expressApp.use(express.text());
59
- this.expressApp.use(express.urlencoded({ extended: true }));
60
- this.expressApp.use(corsOrigin(corsOriginOptions));
61
-
62
- this.serverListenEvent = new ServerListenEventError(localLanguage);
63
- this.javaScriptErrors = new JavaScriptErrors(localLanguage);
64
- this.assertionErrors = new AssertionErrors(localLanguage);
65
- this.internalErrors = new InternalErrors(localLanguage);
66
- this.openSSLErrors = new OpenSSLErrors(localLanguage);
67
- this.systemErrors = new SystemErrors(localLanguage);
68
-
69
- this.stackTraceErrorHandling(localLanguage);
70
- this.translationWebAppLoader();
71
- }
72
-
73
-
74
- public onStartServer(routers: { featureRoute: IRouteDefinition[] }[]) {
75
- return this.expressApp.listen(
76
- this.port,
77
- this.host,
78
- (): void => {
79
- try {
80
- if (this.host === "" && this.port === 0) {
81
- this.serverListenEvent.hostPortUndefined(this.port);
82
- } else if (this.host === "") {
83
- this.serverListenEvent.hostUndefined(this.host);
84
- } else if (this.port === 0) {
85
- this.serverListenEvent.portUndefined();
86
- } else {
87
- this.registerRoutes(routers);
88
- }
89
- } catch (err: any) {
90
- SServerStartError(err);
91
- }
92
- }
93
- );
94
- }
95
-
96
- //, kernelModule: KernelModuleType
97
- public onListeningOnServerEvent(serverWeb: serverWebApp, localLanguage: string): void {
98
- serverWeb.on(eventName.error, (err: Error): void => {
99
- this.serverListenEvent.onEventError(err);
100
- }).on(eventName.close, (): void => {
101
- this.serverListenEvent.serverClosing();
102
- }).on(eventName.drop, (): void => {
103
- this.serverListenEvent.dropNewConnection();
104
- }).on(eventName.listening, (): void => {
105
- this.infoWebApp();
106
- //this.serverUtility.coreListenerEventLoaderModuleService(kernelModule);
107
- });
108
- }
109
-
110
- public onRequestOnServerEvent(serverWeb: serverWebApp): void {
111
- serverWeb.on(eventName.request, (req: IncomingMessage, res: ServerResponse): void => {
112
- requestCallsEvent(req, res, this.host, this.port, currentDate);
113
- });
114
- }
115
-
116
- private translationWebAppLoader(): void {
117
- const require: NodeJS.Require = createRequire(import.meta.url);
118
- const packagePath: string = path.dirname(require.resolve("opticore-webapp"));
119
-
120
- const translateMsgJsonFilePath: string = path.join(packagePath, "utils", "translations");
121
- TranslationLoader.loadTranslations(translateMsgJsonFilePath);
122
- }
123
- private registerRoutes(allFeatureRoutes: { featureRoute: IRouteDefinition[] }[]): void {
124
- allFeatureRoutes.map((router: {featureRoute: IRouteDefinition[]} ): void => {
125
- router.featureRoute.map((route: IRouteDefinition): void => {
126
- this.expressApp.use(route.path, route.handler);
127
- });
128
- });
129
- }
130
- private stackTraceErrorHandling(localLanguage: string): void {
131
- eventProcessHandler(localLanguage);
132
- }
133
- private infoWebApp(): void {
134
- this.serverUtility.infoServer(
135
- this.serverUtility.getVersions().nodeVersion,
136
- this.serverUtility.getProjectInfo().startingTime,
137
- getEnvVariable.appHost,
138
- Number(getEnvVariable.appPort),
139
- this.serverUtility.getUsageMemory().rss,
140
- this.serverUtility.getUsageMemory().heapUsed,
141
- this.serverUtility.getUsageMemory().user,
142
- this.serverUtility.getUsageMemory().system
143
- );
144
- }
145
- }
@@ -1,6 +0,0 @@
1
- import { Router } from "opticore-express";
2
-
3
- export interface IRouteDefinition {
4
- path: string;
5
- handler: Router;
6
- }
@@ -1,3 +0,0 @@
1
- import { IRouteDefinition } from "@webApp/domains/interfaces/routeDefinition.interface";
2
-
3
- export type KernelModuleType = [{ featureRoute: IRouteDefinition[] }[], () => void];
package/src/index.ts DELETED
@@ -1,11 +0,0 @@
1
- import { WebServerCore as WebServer } from "@webApp/core/webServer.core";
2
-
3
-
4
- import { type IRouteDefinition } from "@webApp/domains/interfaces/routeDefinition.interface";
5
- import { type KernelModuleType } from "@webApp/domains/types/kernelModule.type";
6
-
7
- export {
8
- IRouteDefinition,
9
- KernelModuleType,
10
- WebServer,
11
- }
@@ -1,78 +0,0 @@
1
- {
2
- "dbConnection": "DataBase connection",
3
- "dbConnectionClosed": "MySQL connection is closed",
4
- "mysqlErrorCon": "MysqlError connection",
5
- "mySQLError": "MysqlError",
6
- "mySqlCloseConnection": "MySql close connection",
7
- "verifyExistingKey": "Verify Existing Key",
8
- "invalidRequest": "Invalid request",
9
- "tokenNotProvided": "No token provided.",
10
- "ExpiresToken": "Expires Token. You're not authorize",
11
- "privateKeyNotExist": "A private key doesn't exist.",
12
- "publicKeyNotExist": "A public key doesn't exist.",
13
- "errorNamePublicKeyNotExist": "No public key",
14
- "errorAuthorPublicKeyNotExist": "PublicKey not existing",
15
- "errorDecryption": "Error decryption with private key",
16
- "rsaKeyNotFound": "RSA key provided is not found.",
17
- "notVerifyingRSAKey": "Not verify RSA Key",
18
- "errorNameNotVerifyingRSAKey": "Error Verify RSA Key",
19
- "errorEncryptionPublicKey": "Error encryption with public key",
20
- "errorEncryptionPrivateKey": "Error encryption with private key",
21
- "errorNameRsaVerifyExistingKey": "Verify existing key",
22
- "signatureRSAKeyFailed": "Signature verification failed.",
23
- "encryptionWithPrivateKeyFailed": "Encryption With PrivateKey",
24
- "encryptionFailed": "Encryption failed",
25
- "decryptionWithPublicKeyFailed": "Decryption With PublicKey",
26
- "decryptionFailed": "Decryption failed",
27
- "verifyRSAKey": "Verify RSA Keys",
28
- "verifyRSAKeyFailed": "Verify RSA Keys Failed",
29
- "notVerifying": "Verification failed",
30
- "signatureRSAKeysError": "Signature RSA Keys Error",
31
- "encryptionWithPublicKey": "Encryption error",
32
- "errorDecryptionWithPrivateKey": "Error Decryption With PrivateKey",
33
- "verifyPublicRSAKey": "Verify Public RSA Key",
34
- "PostgresDBConnectionChecker": "PostgresDB Connection Checker",
35
- "PostgresConnection": "connection",
36
- "MongoDBConnectionChecker": "MongoDB Connection Checker",
37
- "MongoConnection": "connection",
38
- "mongoDBAuthentication": "authentication",
39
- "mongoDBConnection": "MongoDB connection",
40
- "mongoDBAuthenticationFailed": "failed",
41
- "mongoDBUnableParsingUrl": "unable to parse",
42
- "mongoDBConnectionUrl": "url",
43
- "mongoDBServerSelection": "MongoServer selection error",
44
- "mongoDBServer": "MongoServer",
45
- "mongoDBConnectionError": "connection error",
46
- "mongoDBError": "error",
47
- "loadedModules": "Loading core modules",
48
- "kernel": "Kernel",
49
- "loadKernel": "load kernel",
50
- "moduleAppLoaded": "Modules app have been successfully loaded",
51
- "content": "content",
52
- "serverSide": "server side",
53
- "hasBeenLoadedSuccessfully": "has been loaded successfully",
54
- "routerService": "Routers service",
55
- "registerRoutes": "Register routes",
56
- "fail": "fail",
57
- "loading": "loading",
58
- "routers": "routers",
59
- "registerLoadingFailed": "The route register failed to load",
60
- "dbConnChecker": "database checker connection",
61
- "loadedModulesError": "Required core modules are not loaded properly",
62
- "dbConnexionSuccess": "The database connection was successful 🚀",
63
- "mongoConnectionSuccess": "Connection to database is successfully.",
64
- "PostgresConnectionSuccess": "Connection to database is successfully.",
65
- "verifyExistingKeyError": "The provided key is not found",
66
- "webServer": "Web server",
67
- "listening": "listening",
68
- "webHost": "host",
69
- "badHost": "bad host",
70
- "hostNotFound": "not found",
71
- "errorHostUrl": "The host and port are not define, please define them in .env",
72
- "badPort": "bad port",
73
- "errorPort": "The port is not correct. Please define a right port with number port.",
74
- "errorHost": "The host can't be empty or blank. Please define a string host in .env",
75
- "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",
76
- "unknownDB": "Database {database} is unknown. Please try to use Database CLI to create your database, or do it manually in your Database Management System",
77
- "errorDBHost": "A database host ${host} does not allow connection. Please either set the host like this: {localhost} in your .env file"
78
- }
@@ -1,78 +0,0 @@
1
- {
2
- "dbConnection": "DataBase connection",
3
- "dbConnectionClosed": "MySQL connection is closed",
4
- "mysqlErrorCon": "MysqlError connection",
5
- "mySQLError": "MysqlError",
6
- "mySqlCloseConnection": "MySql close connection",
7
- "verifyExistingKey": "Verify Existing Key",
8
- "invalidRequest": "Invalid request",
9
- "tokenNotProvided": "No token provided.",
10
- "ExpiresToken": "Expires Token. You're not authorize",
11
- "privateKeyNotExist": "A private key doesn't exist.",
12
- "publicKeyNotExist": "A public key doesn't exist.",
13
- "errorNamePublicKeyNotExist": "No public key",
14
- "errorAuthorPublicKeyNotExist": "PublicKey not existing",
15
- "errorDecryption": "Error decryption with private key",
16
- "rsaKeyNotFound": "RSA key provided is not found.",
17
- "notVerifyingRSAKey": "Not verify RSA Key",
18
- "errorNameNotVerifyingRSAKey": "Error Verify RSA Key",
19
- "errorEncryptionPublicKey": "Error encryption with public key",
20
- "errorEncryptionPrivateKey": "Error encryption with private key",
21
- "errorNameRsaVerifyExistingKey": "Verify existing key",
22
- "signatureRSAKeyFailed": "Signature verification failed.",
23
- "encryptionWithPrivateKeyFailed": "Encryption With PrivateKey",
24
- "encryptionFailed": "Encryption failed",
25
- "decryptionWithPublicKeyFailed": "Decryption With PublicKey",
26
- "decryptionFailed": "Decryption failed",
27
- "verifyRSAKey": "Verify RSA Keys",
28
- "verifyRSAKeyFailed": "Verify RSA Keys Failed",
29
- "notVerifying": "Verification failed",
30
- "signatureRSAKeysError": "Signature RSA Keys Error",
31
- "encryptionWithPublicKey": "Encryption error",
32
- "errorDecryptionWithPrivateKey": "Error Decryption With PrivateKey",
33
- "verifyPublicRSAKey": "Verify Public RSA Key",
34
- "PostgresDBConnectionChecker": "PostgresDB Connection Checker",
35
- "PostgresConnection": "connection",
36
- "MongoDBConnectionChecker": "MongoDB Connection Checker",
37
- "MongoConnection": "connection",
38
- "mongoDBAuthentication": "authentication",
39
- "mongoDBConnection": "MongoDB connection",
40
- "mongoDBAuthenticationFailed": "failed",
41
- "mongoDBUnableParsingUrl": "unable to parse",
42
- "mongoDBConnectionUrl": "url",
43
- "mongoDBServerSelection": "MongoServer selection error",
44
- "mongoDBServer": "MongoServer",
45
- "mongoDBConnectionError": "connection error",
46
- "mongoDBError": "error",
47
- "loadedModules": "Loading core modules",
48
- "kernel": "Kernel",
49
- "loadKernel": "load kernel",
50
- "moduleAppLoaded": "Modules app have been successfully loaded",
51
- "content": "content",
52
- "serverSide": "server side",
53
- "hasBeenLoadedSuccessfully": "has been loaded successfully",
54
- "routerService": "Routers service",
55
- "registerRoutes": "Register routes",
56
- "fail": "fail",
57
- "loading": "loading",
58
- "routers": "routers",
59
- "registerLoadingFailed": "The route register failed to load",
60
- "dbConnChecker": "database checker connection",
61
- "loadedModulesError": "Required core modules are not loaded properly",
62
- "dbConnexionSuccess": "The database connection was successful 🚀",
63
- "mongoConnectionSuccess": "Connection to database is successfully.",
64
- "PostgresConnectionSuccess": "Connection to database is successfully.",
65
- "verifyExistingKeyError": "The provided key is not found",
66
- "webServer": "Web server",
67
- "listening": "listening",
68
- "webHost": "host",
69
- "badHost": "bad host",
70
- "hostNotFound": "not found",
71
- "errorHostUrl": "The host and port are not define, please define them in .env",
72
- "badPort": "bad port",
73
- "errorPort": "The port is not correct. Please define a right port with number port.",
74
- "errorHost": "The host can't be empty or blank. Please define a string host in .env",
75
- "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",
76
- "unknownDB": "Database {database} is unknown. Please try to use Database CLI to create your database, or do it manually in your Database Management System",
77
- "errorDBHost": "A database host ${host} does not allow connection. Please either set the host like this: {localhost} in your .env file"
78
- }
package/tsup.config.ts DELETED
@@ -1,11 +0,0 @@
1
- import { defineConfig } from "tsup";
2
-
3
- export default defineConfig({
4
- name: "opticore-webapp",
5
- format: ["cjs", "esm"],
6
- entry: ['src/index.ts'] ,
7
- dts: true,
8
- shims: true,
9
- skipNodeModulesBundle: true,
10
- clean: true
11
- });