remult 0.27.2-next.0 → 0.27.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.
@@ -303,6 +303,7 @@ export class RemultServerImplementation {
303
303
  else
304
304
  await this.runWithRemult(async (remult) => {
305
305
  if (req) {
306
+ ;
306
307
  remult.context.request = req;
307
308
  remultStatic.asyncContext.setInInitRequest(true);
308
309
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remult",
3
- "version": "0.27.2-next.0",
3
+ "version": "0.27.2",
4
4
  "description": "A CRUD framework for full-stack TypeScript",
5
5
  "homepage": "https://remult.dev",
6
6
  "repository": {
@@ -590,6 +590,7 @@ var RemultServerImplementation = /** @class */ (function () {
590
590
  switch (_a.label) {
591
591
  case 0:
592
592
  if (!req) return [3 /*break*/, 8];
593
+ ;
593
594
  remult.context.request = req;
594
595
  remult_static_js_1.remultStatic.asyncContext.setInInitRequest(true);
595
596
  _a.label = 1;
package/src/context.d.ts CHANGED
@@ -85,22 +85,17 @@ export declare class Remult {
85
85
  export type GetArguments<T> = T extends (...args: infer FirstArgument) => any ? FirstArgument : never;
86
86
  /**
87
87
  * This type represents the context object available through `remult.context`
88
- * It can be used to store custom information that will be available throughout the request lifecycle.
88
+ * If its used within the request lifecycle it's `request` member will be set automatically.
89
+ * To type it correctly, you can extend it with your own properties.
89
90
  * @example
90
- * remult.context.myCustomData = 'hello'
91
- */
91
+ * import type express from 'express'
92
+ * declare module 'remult' {
93
+ * export interface RemultContext {
94
+ * request?: express.Request
95
+ * }
96
+ * }
97
+ * */
92
98
  export interface RemultContext {
93
- /** When running on the backend as part of a request, will have the request object.
94
- * You can type it to your specific type
95
- * @example
96
- * import type express from 'express'
97
- * declare module 'remult' {
98
- * export interface RemultContext {
99
- * request?: express.Request
100
- * }
101
- * }
102
- * */
103
- request?: unknown;
104
99
  }
105
100
  /**
106
101
  * Interface for configuring the API client used by Remult to perform HTTP calls to the backend.