opticore-webapp 1.0.12 → 1.0.14
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
|
@@ -35,6 +35,8 @@ __export(index_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
36
|
|
|
37
37
|
// src/core/webServer.core.ts
|
|
38
|
+
var path2 = __toESM(require("path"), 1);
|
|
39
|
+
var import_node_process3 = __toESM(require("process"), 1);
|
|
38
40
|
var import_cors = __toESM(require("cors"), 1);
|
|
39
41
|
var import_opticore_catch_exception_error3 = require("opticore-catch-exception-error");
|
|
40
42
|
var import_opticore_express2 = require("opticore-express");
|
|
@@ -298,8 +300,6 @@ var CoreService = class {
|
|
|
298
300
|
|
|
299
301
|
// src/core/webServer.core.ts
|
|
300
302
|
var import_opticore_translator3 = require("opticore-translator");
|
|
301
|
-
var path2 = __toESM(require("path"), 1);
|
|
302
|
-
var import_node_process3 = __toESM(require("process"), 1);
|
|
303
303
|
var WebServerCore = class {
|
|
304
304
|
constructor(app, corsOriginOptions) {
|
|
305
305
|
this.serverUtility = new CoreService();
|
|
@@ -354,7 +354,7 @@ var WebServerCore = class {
|
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
356
|
translationWebAppLoader() {
|
|
357
|
-
import_opticore_translator3.TranslationLoader.loadTranslations(path2.join(import_node_process3.default.cwd(), "src", "
|
|
357
|
+
import_opticore_translator3.TranslationLoader.loadTranslations(path2.join(import_node_process3.default.cwd(), "src", "shared", "translations"), import_opticore_env_access.getEnvVariable.defaultLocal);
|
|
358
358
|
}
|
|
359
359
|
registerRoutes(allFeatureRoutes) {
|
|
360
360
|
allFeatureRoutes.map((router) => {
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
// src/core/webServer.core.ts
|
|
2
|
+
import * as path2 from "path";
|
|
3
|
+
import process3 from "node:process";
|
|
2
4
|
import corsOrigin from "cors";
|
|
3
5
|
import {
|
|
4
6
|
CEventNameError as eventName2,
|
|
@@ -270,8 +272,6 @@ var CoreService = class {
|
|
|
270
272
|
|
|
271
273
|
// src/core/webServer.core.ts
|
|
272
274
|
import { TranslationLoader as TranslationLoader3 } from "opticore-translator";
|
|
273
|
-
import * as path2 from "path";
|
|
274
|
-
import process3 from "node:process";
|
|
275
275
|
var WebServerCore = class {
|
|
276
276
|
constructor(app, corsOriginOptions) {
|
|
277
277
|
this.serverUtility = new CoreService();
|
|
@@ -326,7 +326,7 @@ var WebServerCore = class {
|
|
|
326
326
|
});
|
|
327
327
|
}
|
|
328
328
|
translationWebAppLoader() {
|
|
329
|
-
TranslationLoader3.loadTranslations(path2.join(process3.cwd(), "src", "
|
|
329
|
+
TranslationLoader3.loadTranslations(path2.join(process3.cwd(), "src", "shared", "translations"), getEnvVariable.defaultLocal);
|
|
330
330
|
}
|
|
331
331
|
registerRoutes(allFeatureRoutes) {
|
|
332
332
|
allFeatureRoutes.map((router) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opticore-webapp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "wep server",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"cors": "^2.8.5",
|
|
30
30
|
"dotenv": "^16.4.7",
|
|
31
31
|
"gradient-string": "^2.0.2",
|
|
32
|
-
"opticore-catch-exception-error": "^1.0.
|
|
32
|
+
"opticore-catch-exception-error": "^1.0.8",
|
|
33
33
|
"opticore-env-access": "^1.0.2",
|
|
34
34
|
"opticore-express": "^1.0.3",
|
|
35
35
|
"opticore-http-response": "^1.0.3",
|
|
36
36
|
"opticore-logger": "^1.0.13",
|
|
37
37
|
"opticore-requests-called-events": "^1.0.0",
|
|
38
38
|
"opticore-router": "^1.0.10",
|
|
39
|
-
"opticore-translator": "^1.0.
|
|
39
|
+
"opticore-translator": "^1.0.3",
|
|
40
40
|
"opticore-validator": "^1.0.3",
|
|
41
41
|
"tslib": "^2.8.1",
|
|
42
42
|
"typescript": "^5.4.5"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import colors from "ansi-colors";
|
|
2
|
-
import {dateTimeFormattedUtils} from "@webApp/core/helpers/dateTimeFormatted.utils";
|
|
2
|
+
import { dateTimeFormattedUtils } from "@webApp/core/helpers/dateTimeFormatted.utils";
|
|
3
3
|
|
|
4
4
|
export class LogMessageUtils {
|
|
5
5
|
static success(title: string, action: string, contentAction: string): void {
|
|
@@ -2,7 +2,7 @@ import colors from "ansi-colors";
|
|
|
2
2
|
import { Router } from "opticore-express";
|
|
3
3
|
import { LogMessageUtils } from "@webApp/core/helpers/logMessage.utils";
|
|
4
4
|
import { dateTimeFormattedUtils } from "@webApp/core/helpers/dateTimeFormatted.utils";
|
|
5
|
-
import {CLocal, TranslationLoader} from "opticore-translator";
|
|
5
|
+
import { CLocal, TranslationLoader } from "opticore-translator";
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
+
import * as path from "path";
|
|
2
|
+
import process from "node:process";
|
|
3
|
+
import corsOrigin, { CorsOptions } from "cors";
|
|
1
4
|
import { Server as serverWebApp } from "http";
|
|
2
5
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
3
|
-
|
|
6
|
+
|
|
4
7
|
import {
|
|
5
8
|
CEventNameError as eventName,
|
|
6
9
|
StackTraceError,
|
|
7
10
|
ServerListenEventError as eventErrorOnListeningServer
|
|
8
11
|
} from "opticore-catch-exception-error";
|
|
9
|
-
import { Application, express
|
|
12
|
+
import { Application, express } from "opticore-express";
|
|
10
13
|
import { getEnvVariable } from "opticore-env-access";
|
|
11
14
|
import { requestCallsEvent } from "opticore-requests-called-events";
|
|
12
15
|
import { HttpStatusCode } from "opticore-http-response";
|
|
13
16
|
|
|
14
17
|
import { IRouteDefinition } from "@webApp/domains/interfaces/routeDefinition.interface";
|
|
15
|
-
import { KernelModuleType } from "@webApp/domains/types/kernelModule.type";
|
|
16
18
|
import { eventProcessHandler } from "@webApp/core/handlers/eventProcess.handler";
|
|
17
19
|
import { CoreService } from "@webApp/application/service/core.service";
|
|
18
20
|
import { dateTimeFormattedUtils as currentDate } from "@webApp/core/helpers/dateTimeFormatted.utils";
|
|
19
|
-
import {TranslationLoader} from "opticore-translator";
|
|
20
|
-
|
|
21
|
-
import process from "node:process";
|
|
21
|
+
import { TranslationLoader } from "opticore-translator";
|
|
22
|
+
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
export class WebServerCore {
|
|
@@ -86,7 +87,7 @@ export class WebServerCore {
|
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
private translationWebAppLoader(): void {
|
|
89
|
-
TranslationLoader.loadTranslations(path.join(process.cwd(), 'src', '
|
|
90
|
+
TranslationLoader.loadTranslations(path.join(process.cwd(), 'src', 'shared', 'translations'), getEnvVariable.defaultLocal);
|
|
90
91
|
}
|
|
91
92
|
private registerRoutes(allFeatureRoutes: { featureRoute: IRouteDefinition[] }[]): void {
|
|
92
93
|
allFeatureRoutes.map((router: {featureRoute: IRouteDefinition[]} ): void => {
|