@ruiapp/rapid-core 0.0.1 → 0.0.2
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.d.ts +0 -1
- package/dist/index.js +2 -7
- package/dist/server.d.ts +1 -1
- package/package.json +1 -1
- package/src/index.ts +0 -1
- package/src/server.ts +4 -4
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2931,7 +2931,7 @@ class RapidRequest {
|
|
|
2931
2931
|
}
|
|
2932
2932
|
}
|
|
2933
2933
|
|
|
2934
|
-
class
|
|
2934
|
+
class RapidServer {
|
|
2935
2935
|
#eventManager;
|
|
2936
2936
|
#middlewares;
|
|
2937
2937
|
#bootstrapApplicationConfig;
|
|
@@ -3048,11 +3048,6 @@ class RpdServer {
|
|
|
3048
3048
|
}
|
|
3049
3049
|
}
|
|
3050
3050
|
|
|
3051
|
-
var server = /*#__PURE__*/Object.freeze({
|
|
3052
|
-
__proto__: null,
|
|
3053
|
-
'default': RpdServer
|
|
3054
|
-
});
|
|
3055
|
-
|
|
3056
3051
|
var bootstrapApplicationConfig = {
|
|
3057
3052
|
code: "default",
|
|
3058
3053
|
name: "default",
|
|
@@ -3585,6 +3580,6 @@ fixBigIntJSONSerialize();
|
|
|
3585
3580
|
|
|
3586
3581
|
exports.GlobalRequest = GlobalRequest;
|
|
3587
3582
|
exports.RapidRequest = RapidRequest;
|
|
3583
|
+
exports.RapidServer = RapidServer;
|
|
3588
3584
|
exports.RouteContext = RouteContext;
|
|
3589
|
-
exports.RpdServer = server;
|
|
3590
3585
|
exports.bootstrapApplicationConfig = bootstrapApplicationConfig$1;
|
package/dist/server.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface InitServerOptions {
|
|
|
8
8
|
serverConfig: RapidServerConfig;
|
|
9
9
|
applicationConfig: RpdApplicationConfig;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export declare class RapidServer implements IRpdServer {
|
|
12
12
|
#private;
|
|
13
13
|
queryBuilder: IQueryBuilder;
|
|
14
14
|
config: RapidServerConfig;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/server.ts
CHANGED
|
@@ -22,16 +22,16 @@ import { IRpdServer } from "./core/server";
|
|
|
22
22
|
import { buildRoutes } from "./core/routesBuilder";
|
|
23
23
|
import { Next, RouteContext } from "./core/routeContext";
|
|
24
24
|
import { RapidRequest } from "./core/request";
|
|
25
|
-
|
|
25
|
+
import bootstrapApplicationConfig from "./bootstrapApplicationConfig";
|
|
26
26
|
|
|
27
27
|
export interface InitServerOptions {
|
|
28
28
|
databaseAccessor: IDatabaseAccessor;
|
|
29
29
|
databaseConfig: IDatabaseConfig;
|
|
30
30
|
serverConfig: RapidServerConfig;
|
|
31
|
-
applicationConfig
|
|
31
|
+
applicationConfig?: RpdApplicationConfig;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export
|
|
34
|
+
export class RapidServer implements IRpdServer {
|
|
35
35
|
#eventManager: EventManager;
|
|
36
36
|
#middlewares: any[];
|
|
37
37
|
#bootstrapApplicationConfig: RpdApplicationConfig;
|
|
@@ -46,7 +46,7 @@ export default class RpdServer implements IRpdServer {
|
|
|
46
46
|
constructor(options: InitServerOptions) {
|
|
47
47
|
this.#eventManager = new EventManager();
|
|
48
48
|
this.#middlewares = [];
|
|
49
|
-
this.#bootstrapApplicationConfig = options.applicationConfig;
|
|
49
|
+
this.#bootstrapApplicationConfig = options.applicationConfig || bootstrapApplicationConfig;
|
|
50
50
|
|
|
51
51
|
this.#applicationConfig = {} as RpdApplicationConfig;
|
|
52
52
|
this.#httpHandlersMapByCode = new Map();
|