opticore-webapp 1.0.88 → 1.0.90
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 +32 -17
- package/dist/index.d.cts +25 -4
- package/dist/index.d.ts +25 -4
- package/dist/index.js +30 -16
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -31,7 +31,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
WebServer: () => WebServerCore,
|
|
34
|
-
envPath: () => envPath
|
|
34
|
+
envPath: () => envPath,
|
|
35
|
+
expressErrorHandler: () => expressErrorHandler
|
|
35
36
|
});
|
|
36
37
|
module.exports = __toCommonJS(index_exports);
|
|
37
38
|
|
|
@@ -40,7 +41,7 @@ var path3 = __toESM(require("path"), 1);
|
|
|
40
41
|
var import_node_process4 = __toESM(require("process"), 1);
|
|
41
42
|
var import_cors = __toESM(require("cors"), 1);
|
|
42
43
|
var import_opticore_catch_exception_error3 = require("opticore-catch-exception-error");
|
|
43
|
-
var
|
|
44
|
+
var import_opticore_express = require("opticore-express");
|
|
44
45
|
var import_opticore_env_access2 = require("opticore-env-access");
|
|
45
46
|
var import_opticore_http_response4 = require("opticore-http-response");
|
|
46
47
|
var import_opticore_translator3 = require("opticore-translator");
|
|
@@ -50,15 +51,9 @@ var import_opticore_watcher = require("opticore-watcher");
|
|
|
50
51
|
// src/core/handlers/eventProcess.handler.ts
|
|
51
52
|
var import_node_process = __toESM(require("process"), 1);
|
|
52
53
|
var import_node_events = __toESM(require("events"), 1);
|
|
53
|
-
var import_opticore_express = require("opticore-express");
|
|
54
54
|
var import_opticore_catch_exception_error = require("opticore-catch-exception-error");
|
|
55
55
|
function eventProcessHandler(localeLanguage) {
|
|
56
|
-
const errorEmitter = new import_node_events.default();
|
|
57
|
-
const app = (0, import_opticore_express.express)();
|
|
58
56
|
const serverListenEvent = new import_opticore_catch_exception_error.ServerListenEventError(localeLanguage);
|
|
59
|
-
errorEmitter.on(import_opticore_catch_exception_error.CEventNameError.error, (error) => {
|
|
60
|
-
serverListenEvent.listenerError(error);
|
|
61
|
-
});
|
|
62
57
|
import_node_process.default.on(import_opticore_catch_exception_error.CEvent.beforeExit, (code) => {
|
|
63
58
|
setTimeout(() => {
|
|
64
59
|
serverListenEvent.processBeforeExit(code);
|
|
@@ -97,9 +92,16 @@ function eventProcessHandler(localeLanguage) {
|
|
|
97
92
|
import_node_process.default.on(import_opticore_catch_exception_error.CEvent.sigterm, (signal) => {
|
|
98
93
|
serverListenEvent.sigtermSignalReceived(signal);
|
|
99
94
|
});
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
}
|
|
96
|
+
function expressErrorHandler(localeLanguage) {
|
|
97
|
+
const errorEmitter = new import_node_events.default();
|
|
98
|
+
const serverListenEvent = new import_opticore_catch_exception_error.ServerListenEventError(localeLanguage);
|
|
99
|
+
errorEmitter.on(import_opticore_catch_exception_error.CEventNameError.error, (error) => {
|
|
100
|
+
serverListenEvent.listenerError(error);
|
|
102
101
|
});
|
|
102
|
+
return (err, req, res, next) => {
|
|
103
|
+
serverListenEvent.expressErrorHandlingMiddleware(errorEmitter, err, req, res, next);
|
|
104
|
+
};
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
// src/application/service/core.service.ts
|
|
@@ -519,7 +521,7 @@ function startHmrSupervisor(options) {
|
|
|
519
521
|
// src/core/webServer.core.ts
|
|
520
522
|
var WebServerCore = class {
|
|
521
523
|
serverUtility;
|
|
522
|
-
expressApp = (0,
|
|
524
|
+
expressApp = (0, import_opticore_express.express)();
|
|
523
525
|
container;
|
|
524
526
|
localLanguage;
|
|
525
527
|
loggerConfig;
|
|
@@ -538,10 +540,10 @@ var WebServerCore = class {
|
|
|
538
540
|
this.localLanguage = paramsConstructor.localLanguage;
|
|
539
541
|
this.environmentPath = paramsConstructor.environmentPath;
|
|
540
542
|
this.container = new import_opticore_dependency_inject2.SContainer(paramsConstructor.localLanguage);
|
|
541
|
-
this.expressApp.use(
|
|
542
|
-
this.expressApp.use(
|
|
543
|
-
this.expressApp.use(
|
|
544
|
-
this.expressApp.use(
|
|
543
|
+
this.expressApp.use(import_opticore_express.express.json());
|
|
544
|
+
this.expressApp.use(import_opticore_express.express.raw());
|
|
545
|
+
this.expressApp.use(import_opticore_express.express.text());
|
|
546
|
+
this.expressApp.use(import_opticore_express.express.urlencoded({ extended: true }));
|
|
545
547
|
this.expressApp.use((0, import_cors.default)(paramsConstructor.corsOriginOptions));
|
|
546
548
|
this.serverListenEvent = new import_opticore_catch_exception_error3.ServerListenEventError(paramsConstructor.localLanguage);
|
|
547
549
|
this.serverUtility = new CoreService(paramsConstructor.localLanguage, paramsConstructor.environmentPath, this.container);
|
|
@@ -615,8 +617,9 @@ var WebServerCore = class {
|
|
|
615
617
|
this.registerDependencies(dependenciesProvider);
|
|
616
618
|
}
|
|
617
619
|
this.container.loadServices();
|
|
618
|
-
this.expressApp.use(
|
|
620
|
+
this.expressApp.use(import_opticore_express.express.static(path3.join(import_node_process4.default.cwd(), "public/template")));
|
|
619
621
|
this.registerRoutes(routers);
|
|
622
|
+
this.expressApp.use(expressErrorHandler(this.localLanguage));
|
|
620
623
|
const resolvedHmr = this.resolveHotReloadConfig();
|
|
621
624
|
if (resolvedHmr !== null) {
|
|
622
625
|
new import_opticore_watcher.HotReloadWatcher(resolvedHmr).attach(server);
|
|
@@ -630,10 +633,18 @@ var WebServerCore = class {
|
|
|
630
633
|
}
|
|
631
634
|
}
|
|
632
635
|
/**
|
|
636
|
+
* No-ops when `serverWeb` is undefined: under the HMR supervisor
|
|
637
|
+
* (see `resolveHotReloadConfig()`/`startHmrSupervisor()`), `onStartServer()`
|
|
638
|
+
* returns early with no server in the parent process — the child process
|
|
639
|
+
* it spawns is the one that actually listens — so callers following the
|
|
640
|
+
* documented `onStartServer()` → `onListeningOnServerEvent(server!)` /
|
|
641
|
+
* `onRequestOnServerEvent(server!)` pattern would otherwise crash in the
|
|
642
|
+
* parent with "Cannot read properties of undefined (reading 'on')".
|
|
633
643
|
*
|
|
634
644
|
* @param serverWeb
|
|
635
645
|
*/
|
|
636
646
|
onListeningOnServerEvent(serverWeb) {
|
|
647
|
+
if (!serverWeb) return;
|
|
637
648
|
this.loadTranslationFiles();
|
|
638
649
|
serverWeb.on(import_opticore_catch_exception_error3.CEventNameError.error, (err) => {
|
|
639
650
|
this.serverListenEvent.onEventError(err);
|
|
@@ -646,10 +657,13 @@ var WebServerCore = class {
|
|
|
646
657
|
});
|
|
647
658
|
}
|
|
648
659
|
/**
|
|
660
|
+
* No-ops when `serverWeb` is undefined — same HMR-supervisor-parent
|
|
661
|
+
* case documented on `onListeningOnServerEvent()`.
|
|
649
662
|
*
|
|
650
663
|
* @param serverWeb
|
|
651
664
|
*/
|
|
652
665
|
onRequestOnServerEvent(serverWeb) {
|
|
666
|
+
if (!serverWeb) return;
|
|
653
667
|
this.loadTranslationFiles();
|
|
654
668
|
serverWeb.on(import_opticore_catch_exception_error3.CEventNameError.request, (req, res) => {
|
|
655
669
|
(0, import_opticore_request_call_event.requestCallsEvent)(
|
|
@@ -760,5 +774,6 @@ var WebServerCore = class {
|
|
|
760
774
|
// Annotate the CommonJS export names for ESM import in node:
|
|
761
775
|
0 && (module.exports = {
|
|
762
776
|
WebServer,
|
|
763
|
-
envPath
|
|
777
|
+
envPath,
|
|
778
|
+
expressErrorHandler
|
|
764
779
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import * as http from 'http';
|
|
|
2
2
|
import { Server } from 'http';
|
|
3
3
|
import { TFeatureRoutes } from 'opticore-router';
|
|
4
4
|
import { TDependency } from 'opticore-dependency-inject';
|
|
5
|
-
import { express } from 'opticore-express';
|
|
5
|
+
import { express, ErrorRequestHandler } from 'opticore-express';
|
|
6
6
|
import { LoggerCore } from 'opticore-logger';
|
|
7
7
|
import { CorsOptions } from 'cors';
|
|
8
8
|
import { HotReloadConfig } from 'opticore-watcher';
|
|
@@ -55,15 +55,24 @@ declare class WebServerCore {
|
|
|
55
55
|
*/
|
|
56
56
|
onStartServer(routers: TFeatureRoutes[], databaseCallback: (env: any) => void, dependenciesProvider?: TDependency[]): Server<typeof http.IncomingMessage, typeof http.ServerResponse> | undefined;
|
|
57
57
|
/**
|
|
58
|
+
* No-ops when `serverWeb` is undefined: under the HMR supervisor
|
|
59
|
+
* (see `resolveHotReloadConfig()`/`startHmrSupervisor()`), `onStartServer()`
|
|
60
|
+
* returns early with no server in the parent process — the child process
|
|
61
|
+
* it spawns is the one that actually listens — so callers following the
|
|
62
|
+
* documented `onStartServer()` → `onListeningOnServerEvent(server!)` /
|
|
63
|
+
* `onRequestOnServerEvent(server!)` pattern would otherwise crash in the
|
|
64
|
+
* parent with "Cannot read properties of undefined (reading 'on')".
|
|
58
65
|
*
|
|
59
66
|
* @param serverWeb
|
|
60
67
|
*/
|
|
61
|
-
onListeningOnServerEvent(serverWeb: Server): void;
|
|
68
|
+
onListeningOnServerEvent(serverWeb: Server | undefined): void;
|
|
62
69
|
/**
|
|
70
|
+
* No-ops when `serverWeb` is undefined — same HMR-supervisor-parent
|
|
71
|
+
* case documented on `onListeningOnServerEvent()`.
|
|
63
72
|
*
|
|
64
73
|
* @param serverWeb
|
|
65
74
|
*/
|
|
66
|
-
onRequestOnServerEvent(serverWeb: Server): void;
|
|
75
|
+
onRequestOnServerEvent(serverWeb: Server | undefined): void;
|
|
67
76
|
/**
|
|
68
77
|
*
|
|
69
78
|
* @private
|
|
@@ -115,6 +124,18 @@ declare class WebServerCore {
|
|
|
115
124
|
|
|
116
125
|
declare const envPath: string;
|
|
117
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Express error-handling middleware. It must be mounted on the application that actually serves requests,
|
|
129
|
+
* AFTER its routes: an error-handling middleware only receives the errors of the middleware registered before it.
|
|
130
|
+
*
|
|
131
|
+
* (It used to be mounted on a throw-away `express()` instance created inside eventProcessHandler, so it never ran
|
|
132
|
+
* and every unhandled error — a malformed JSON body, for instance — fell through to Express's default handler,
|
|
133
|
+
* which prints the stack trace and file paths outside production.)
|
|
134
|
+
*
|
|
135
|
+
* The client gets a fixed message; the error itself is logged.
|
|
136
|
+
*/
|
|
137
|
+
declare function expressErrorHandler(localeLanguage: string): ErrorRequestHandler;
|
|
138
|
+
|
|
118
139
|
type KernelModuleType = [any[], () => void];
|
|
119
140
|
|
|
120
|
-
export { type KernelModuleType, WebServerCore as WebServer, envPath };
|
|
141
|
+
export { type KernelModuleType, WebServerCore as WebServer, envPath, expressErrorHandler };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as http from 'http';
|
|
|
2
2
|
import { Server } from 'http';
|
|
3
3
|
import { TFeatureRoutes } from 'opticore-router';
|
|
4
4
|
import { TDependency } from 'opticore-dependency-inject';
|
|
5
|
-
import { express } from 'opticore-express';
|
|
5
|
+
import { express, ErrorRequestHandler } from 'opticore-express';
|
|
6
6
|
import { LoggerCore } from 'opticore-logger';
|
|
7
7
|
import { CorsOptions } from 'cors';
|
|
8
8
|
import { HotReloadConfig } from 'opticore-watcher';
|
|
@@ -55,15 +55,24 @@ declare class WebServerCore {
|
|
|
55
55
|
*/
|
|
56
56
|
onStartServer(routers: TFeatureRoutes[], databaseCallback: (env: any) => void, dependenciesProvider?: TDependency[]): Server<typeof http.IncomingMessage, typeof http.ServerResponse> | undefined;
|
|
57
57
|
/**
|
|
58
|
+
* No-ops when `serverWeb` is undefined: under the HMR supervisor
|
|
59
|
+
* (see `resolveHotReloadConfig()`/`startHmrSupervisor()`), `onStartServer()`
|
|
60
|
+
* returns early with no server in the parent process — the child process
|
|
61
|
+
* it spawns is the one that actually listens — so callers following the
|
|
62
|
+
* documented `onStartServer()` → `onListeningOnServerEvent(server!)` /
|
|
63
|
+
* `onRequestOnServerEvent(server!)` pattern would otherwise crash in the
|
|
64
|
+
* parent with "Cannot read properties of undefined (reading 'on')".
|
|
58
65
|
*
|
|
59
66
|
* @param serverWeb
|
|
60
67
|
*/
|
|
61
|
-
onListeningOnServerEvent(serverWeb: Server): void;
|
|
68
|
+
onListeningOnServerEvent(serverWeb: Server | undefined): void;
|
|
62
69
|
/**
|
|
70
|
+
* No-ops when `serverWeb` is undefined — same HMR-supervisor-parent
|
|
71
|
+
* case documented on `onListeningOnServerEvent()`.
|
|
63
72
|
*
|
|
64
73
|
* @param serverWeb
|
|
65
74
|
*/
|
|
66
|
-
onRequestOnServerEvent(serverWeb: Server): void;
|
|
75
|
+
onRequestOnServerEvent(serverWeb: Server | undefined): void;
|
|
67
76
|
/**
|
|
68
77
|
*
|
|
69
78
|
* @private
|
|
@@ -115,6 +124,18 @@ declare class WebServerCore {
|
|
|
115
124
|
|
|
116
125
|
declare const envPath: string;
|
|
117
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Express error-handling middleware. It must be mounted on the application that actually serves requests,
|
|
129
|
+
* AFTER its routes: an error-handling middleware only receives the errors of the middleware registered before it.
|
|
130
|
+
*
|
|
131
|
+
* (It used to be mounted on a throw-away `express()` instance created inside eventProcessHandler, so it never ran
|
|
132
|
+
* and every unhandled error — a malformed JSON body, for instance — fell through to Express's default handler,
|
|
133
|
+
* which prints the stack trace and file paths outside production.)
|
|
134
|
+
*
|
|
135
|
+
* The client gets a fixed message; the error itself is logged.
|
|
136
|
+
*/
|
|
137
|
+
declare function expressErrorHandler(localeLanguage: string): ErrorRequestHandler;
|
|
138
|
+
|
|
118
139
|
type KernelModuleType = [any[], () => void];
|
|
119
140
|
|
|
120
|
-
export { type KernelModuleType, WebServerCore as WebServer, envPath };
|
|
141
|
+
export { type KernelModuleType, WebServerCore as WebServer, envPath, expressErrorHandler };
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as path3 from "path";
|
|
|
3
3
|
import process6 from "process";
|
|
4
4
|
import corsOrigin from "cors";
|
|
5
5
|
import { CEventNameError as eventName2, ServerListenEventError as ServerListenEventError2 } from "opticore-catch-exception-error";
|
|
6
|
-
import { express
|
|
6
|
+
import { express } from "opticore-express";
|
|
7
7
|
import { getEnvironmentValue as getEnvironmentValue2 } from "opticore-env-access";
|
|
8
8
|
import { HttpStatusCode as HttpStatusCode3 } from "opticore-http-response";
|
|
9
9
|
import { TranslationLoader as TranslationLoader3 } from "opticore-translator";
|
|
@@ -13,15 +13,9 @@ import { HotReloadWatcher } from "opticore-watcher";
|
|
|
13
13
|
// src/core/handlers/eventProcess.handler.ts
|
|
14
14
|
import process2 from "process";
|
|
15
15
|
import EventEmitter from "events";
|
|
16
|
-
import { express } from "opticore-express";
|
|
17
16
|
import { ServerListenEventError, CEventNameError as eventName, CEvent as event } from "opticore-catch-exception-error";
|
|
18
17
|
function eventProcessHandler(localeLanguage) {
|
|
19
|
-
const errorEmitter = new EventEmitter();
|
|
20
|
-
const app = express();
|
|
21
18
|
const serverListenEvent = new ServerListenEventError(localeLanguage);
|
|
22
|
-
errorEmitter.on(eventName.error, (error) => {
|
|
23
|
-
serverListenEvent.listenerError(error);
|
|
24
|
-
});
|
|
25
19
|
process2.on(event.beforeExit, (code) => {
|
|
26
20
|
setTimeout(() => {
|
|
27
21
|
serverListenEvent.processBeforeExit(code);
|
|
@@ -60,9 +54,16 @@ function eventProcessHandler(localeLanguage) {
|
|
|
60
54
|
process2.on(event.sigterm, (signal) => {
|
|
61
55
|
serverListenEvent.sigtermSignalReceived(signal);
|
|
62
56
|
});
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
}
|
|
58
|
+
function expressErrorHandler(localeLanguage) {
|
|
59
|
+
const errorEmitter = new EventEmitter();
|
|
60
|
+
const serverListenEvent = new ServerListenEventError(localeLanguage);
|
|
61
|
+
errorEmitter.on(eventName.error, (error) => {
|
|
62
|
+
serverListenEvent.listenerError(error);
|
|
65
63
|
});
|
|
64
|
+
return (err, req, res, next) => {
|
|
65
|
+
serverListenEvent.expressErrorHandlingMiddleware(errorEmitter, err, req, res, next);
|
|
66
|
+
};
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
// src/application/service/core.service.ts
|
|
@@ -485,7 +486,7 @@ function startHmrSupervisor(options) {
|
|
|
485
486
|
// src/core/webServer.core.ts
|
|
486
487
|
var WebServerCore = class {
|
|
487
488
|
serverUtility;
|
|
488
|
-
expressApp =
|
|
489
|
+
expressApp = express();
|
|
489
490
|
container;
|
|
490
491
|
localLanguage;
|
|
491
492
|
loggerConfig;
|
|
@@ -504,10 +505,10 @@ var WebServerCore = class {
|
|
|
504
505
|
this.localLanguage = paramsConstructor.localLanguage;
|
|
505
506
|
this.environmentPath = paramsConstructor.environmentPath;
|
|
506
507
|
this.container = new SContainer2(paramsConstructor.localLanguage);
|
|
507
|
-
this.expressApp.use(
|
|
508
|
-
this.expressApp.use(
|
|
509
|
-
this.expressApp.use(
|
|
510
|
-
this.expressApp.use(
|
|
508
|
+
this.expressApp.use(express.json());
|
|
509
|
+
this.expressApp.use(express.raw());
|
|
510
|
+
this.expressApp.use(express.text());
|
|
511
|
+
this.expressApp.use(express.urlencoded({ extended: true }));
|
|
511
512
|
this.expressApp.use(corsOrigin(paramsConstructor.corsOriginOptions));
|
|
512
513
|
this.serverListenEvent = new ServerListenEventError2(paramsConstructor.localLanguage);
|
|
513
514
|
this.serverUtility = new CoreService(paramsConstructor.localLanguage, paramsConstructor.environmentPath, this.container);
|
|
@@ -581,8 +582,9 @@ var WebServerCore = class {
|
|
|
581
582
|
this.registerDependencies(dependenciesProvider);
|
|
582
583
|
}
|
|
583
584
|
this.container.loadServices();
|
|
584
|
-
this.expressApp.use(
|
|
585
|
+
this.expressApp.use(express.static(path3.join(process6.cwd(), "public/template")));
|
|
585
586
|
this.registerRoutes(routers);
|
|
587
|
+
this.expressApp.use(expressErrorHandler(this.localLanguage));
|
|
586
588
|
const resolvedHmr = this.resolveHotReloadConfig();
|
|
587
589
|
if (resolvedHmr !== null) {
|
|
588
590
|
new HotReloadWatcher(resolvedHmr).attach(server);
|
|
@@ -596,10 +598,18 @@ var WebServerCore = class {
|
|
|
596
598
|
}
|
|
597
599
|
}
|
|
598
600
|
/**
|
|
601
|
+
* No-ops when `serverWeb` is undefined: under the HMR supervisor
|
|
602
|
+
* (see `resolveHotReloadConfig()`/`startHmrSupervisor()`), `onStartServer()`
|
|
603
|
+
* returns early with no server in the parent process — the child process
|
|
604
|
+
* it spawns is the one that actually listens — so callers following the
|
|
605
|
+
* documented `onStartServer()` → `onListeningOnServerEvent(server!)` /
|
|
606
|
+
* `onRequestOnServerEvent(server!)` pattern would otherwise crash in the
|
|
607
|
+
* parent with "Cannot read properties of undefined (reading 'on')".
|
|
599
608
|
*
|
|
600
609
|
* @param serverWeb
|
|
601
610
|
*/
|
|
602
611
|
onListeningOnServerEvent(serverWeb) {
|
|
612
|
+
if (!serverWeb) return;
|
|
603
613
|
this.loadTranslationFiles();
|
|
604
614
|
serverWeb.on(eventName2.error, (err) => {
|
|
605
615
|
this.serverListenEvent.onEventError(err);
|
|
@@ -612,10 +622,13 @@ var WebServerCore = class {
|
|
|
612
622
|
});
|
|
613
623
|
}
|
|
614
624
|
/**
|
|
625
|
+
* No-ops when `serverWeb` is undefined — same HMR-supervisor-parent
|
|
626
|
+
* case documented on `onListeningOnServerEvent()`.
|
|
615
627
|
*
|
|
616
628
|
* @param serverWeb
|
|
617
629
|
*/
|
|
618
630
|
onRequestOnServerEvent(serverWeb) {
|
|
631
|
+
if (!serverWeb) return;
|
|
619
632
|
this.loadTranslationFiles();
|
|
620
633
|
serverWeb.on(eventName2.request, (req, res) => {
|
|
621
634
|
requestCallsEvent(
|
|
@@ -725,5 +738,6 @@ var WebServerCore = class {
|
|
|
725
738
|
};
|
|
726
739
|
export {
|
|
727
740
|
WebServerCore as WebServer,
|
|
728
|
-
envPath
|
|
741
|
+
envPath,
|
|
742
|
+
expressErrorHandler
|
|
729
743
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opticore-webapp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.90",
|
|
4
4
|
"description": "wep server",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"test": "
|
|
10
|
+
"test": "node --test test/*.test.mjs",
|
|
11
11
|
"build": "tsup"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|