remult 0.26.12-next.2 → 0.26.12-next.3
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/esm/remult-next.js +1 -1
- package/esm/remult-solid-start.js +2 -2
- package/package.json +1 -1
- package/remult-next.d.ts +1 -1
- package/remult-next.js +1 -3
- package/remult-solid-start.d.ts +1 -1
- package/remult-solid-start.js +6 -12
package/esm/remult-next.js
CHANGED
|
@@ -118,6 +118,6 @@ export function remultNextApp(options) {
|
|
|
118
118
|
POST: handler,
|
|
119
119
|
PUT: handler,
|
|
120
120
|
DELETE: handler,
|
|
121
|
-
withRemult: (what
|
|
121
|
+
withRemult: (what) => result.withRemultAsync({}, what),
|
|
122
122
|
};
|
|
123
123
|
}
|
|
@@ -86,8 +86,8 @@ export function remultSolidStart(options) {
|
|
|
86
86
|
return Object.assign(handler, {
|
|
87
87
|
getRemult: (req) => result.getRemult(req),
|
|
88
88
|
openApiDoc: (options) => result.openApiDoc(options),
|
|
89
|
-
async withRemult(what
|
|
90
|
-
return result.withRemultAsync(
|
|
89
|
+
async withRemult(what) {
|
|
90
|
+
return result.withRemultAsync(await getRequestEvent(), what);
|
|
91
91
|
},
|
|
92
92
|
GET: serverHandler,
|
|
93
93
|
PUT: serverHandler,
|
package/package.json
CHANGED
package/remult-next.d.ts
CHANGED
|
@@ -22,5 +22,5 @@ export type RemultNextAppServer = RemultServerCore<Request> & {
|
|
|
22
22
|
PUT: (req: Request) => Promise<Response>;
|
|
23
23
|
POST: (req: Request) => Promise<Response>;
|
|
24
24
|
DELETE: (req: Request) => Promise<Response>;
|
|
25
|
-
withRemult<T>(what: () => Promise<T
|
|
25
|
+
withRemult<T>(what: () => Promise<T>): Promise<T>;
|
|
26
26
|
};
|
package/remult-next.js
CHANGED
|
@@ -174,9 +174,7 @@ function remultNextApp(options) {
|
|
|
174
174
|
POST: handler,
|
|
175
175
|
PUT: handler,
|
|
176
176
|
DELETE: handler,
|
|
177
|
-
withRemult: function (what,
|
|
178
|
-
return result.withRemultAsync(disableInitUserAndRequest ? undefined : {}, what);
|
|
179
|
-
},
|
|
177
|
+
withRemult: function (what) { return result.withRemultAsync({}, what); },
|
|
180
178
|
};
|
|
181
179
|
}
|
|
182
180
|
exports.remultNextApp = remultNextApp;
|
package/remult-solid-start.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { RemultServerCore, RemultServerOptions } from './server/index.js';
|
|
|
3
3
|
export declare function remultSolidStart(options: RemultServerOptions<RequestEvent>): RemultSolidStartServer;
|
|
4
4
|
type RequestHandler = (event: RequestEvent) => Promise<Response>;
|
|
5
5
|
export type RemultSolidStartServer = RemultServerCore<RequestEvent> & {
|
|
6
|
-
withRemult<T>(what: () => Promise<T
|
|
6
|
+
withRemult<T>(what: () => Promise<T>): Promise<T>;
|
|
7
7
|
GET: RequestHandler;
|
|
8
8
|
PUT: RequestHandler;
|
|
9
9
|
POST: RequestHandler;
|
package/remult-solid-start.js
CHANGED
|
@@ -112,21 +112,15 @@ function remultSolidStart(options) {
|
|
|
112
112
|
return Object.assign(handler, {
|
|
113
113
|
getRemult: function (req) { return result.getRemult(req); },
|
|
114
114
|
openApiDoc: function (options) { return result.openApiDoc(options); },
|
|
115
|
-
withRemult: function (what
|
|
115
|
+
withRemult: function (what) {
|
|
116
116
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
117
|
-
var _a, _b
|
|
118
|
-
return tslib_1.__generator(this, function (
|
|
119
|
-
switch (
|
|
117
|
+
var _a, _b;
|
|
118
|
+
return tslib_1.__generator(this, function (_c) {
|
|
119
|
+
switch (_c.label) {
|
|
120
120
|
case 0:
|
|
121
121
|
_b = (_a = result).withRemultAsync;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
return [3 /*break*/, 3];
|
|
125
|
-
case 1: return [4 /*yield*/, (0, web_1.getRequestEvent)()];
|
|
126
|
-
case 2:
|
|
127
|
-
_c = _d.sent();
|
|
128
|
-
_d.label = 3;
|
|
129
|
-
case 3: return [2 /*return*/, _b.apply(_a, [_c, what])];
|
|
122
|
+
return [4 /*yield*/, (0, web_1.getRequestEvent)()];
|
|
123
|
+
case 1: return [2 /*return*/, _b.apply(_a, [_c.sent(), what])];
|
|
130
124
|
}
|
|
131
125
|
});
|
|
132
126
|
});
|