@ruiapp/rapid-core 0.8.0 → 0.8.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.js CHANGED
@@ -965,6 +965,7 @@ async function buildRoutes(server, applicationConfig) {
965
965
  url: request.url.toString(),
966
966
  input,
967
967
  });
968
+ routerContext.response.status = 200;
968
969
  let handlerContext = {
969
970
  logger,
970
971
  routerContext,
@@ -1050,7 +1051,7 @@ class RapidResponse {
1050
1051
  getResponse() {
1051
1052
  if (!this.#response) {
1052
1053
  this.#response = new Response(this.body, {
1053
- status: this.status || (this.body ? 200 : 404),
1054
+ status: this.status || 200,
1054
1055
  headers: this.headers,
1055
1056
  });
1056
1057
  }
@@ -8577,7 +8578,7 @@ class CronJobPlugin {
8577
8578
  validateLicense(server);
8578
8579
  let handlerContext = {
8579
8580
  logger,
8580
- routerContext: null,
8581
+ routerContext: RouteContext.newSystemOperationContext(server),
8581
8582
  next: null,
8582
8583
  server,
8583
8584
  applicationConfig: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruiapp/rapid-core",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -70,7 +70,7 @@ export class RapidResponse {
70
70
  getResponse() {
71
71
  if (!this.#response) {
72
72
  this.#response = new Response(this.body, {
73
- status: this.status || (this.body ? 200 : 404),
73
+ status: this.status || 200,
74
74
  headers: this.headers,
75
75
  });
76
76
  }
@@ -54,6 +54,8 @@ export async function buildRoutes(server: IRpdServer, applicationConfig: RpdAppl
54
54
  input,
55
55
  });
56
56
 
57
+ routerContext.response.status = 200;
58
+
57
59
  let handlerContext: ActionHandlerContext = {
58
60
  logger,
59
61
  routerContext,
@@ -13,6 +13,7 @@ import {
13
13
  import { ActionHandlerContext } from "~/core/actionHandler";
14
14
  import { find } from "lodash";
15
15
  import { validateLicense } from "~/helpers/licenseHelper";
16
+ import { RouteContext } from "~/core/routeContext";
16
17
 
17
18
  class CronJobPlugin implements RapidPlugin {
18
19
  #server: IRpdServer;
@@ -95,7 +96,7 @@ class CronJobPlugin implements RapidPlugin {
95
96
 
96
97
  let handlerContext: ActionHandlerContext = {
97
98
  logger,
98
- routerContext: null,
99
+ routerContext: RouteContext.newSystemOperationContext(server),
99
100
  next: null,
100
101
  server,
101
102
  applicationConfig: null,