@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 CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from "./types";
2
- export * as RpdServer from "./server";
3
2
  export * from "./server";
4
3
  export * from "./core/request";
5
4
  export * from "./core/routeContext";
package/dist/index.js CHANGED
@@ -2931,7 +2931,7 @@ class RapidRequest {
2931
2931
  }
2932
2932
  }
2933
2933
 
2934
- class RpdServer {
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 default class RpdServer implements IRpdServer {
11
+ export declare class RapidServer implements IRpdServer {
12
12
  #private;
13
13
  queryBuilder: IQueryBuilder;
14
14
  config: RapidServerConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruiapp/rapid-core",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "keywords": [],
package/src/index.ts CHANGED
@@ -2,7 +2,6 @@ import { fixBigIntJSONSerialize } from "./polyfill";
2
2
  fixBigIntJSONSerialize();
3
3
 
4
4
  export * from "./types";
5
- export * as RpdServer from "./server";
6
5
  export * from "./server";
7
6
 
8
7
  export * from "./core/request";
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: RpdApplicationConfig;
31
+ applicationConfig?: RpdApplicationConfig;
32
32
  }
33
33
 
34
- export default class RpdServer implements IRpdServer {
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();