remult 0.24.0-exp.5 → 0.24.0
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-nuxt.js +6 -4
- package/esm/src/remult3/remult3.js +1 -1
- package/package.json +1 -1
- package/remult-nuxt.d.ts +1 -1
- package/remult-nuxt.js +4 -2
- package/src/remult3/remult3.js +1 -1
package/esm/remult-nuxt.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { readBody } from 'h3';
|
|
2
|
-
import { createRemultServer
|
|
1
|
+
import { readBody, setResponseStatus } from 'h3';
|
|
2
|
+
import { createRemultServer } from './server/index.js';
|
|
3
3
|
export function remultNuxt(options) {
|
|
4
4
|
const result = createRemultServer(options, {
|
|
5
5
|
buildGenericRequestInfo: (event) => {
|
|
@@ -36,14 +36,16 @@ export function remultNuxt(options) {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
if (r) {
|
|
39
|
+
if (r.statusCode !== 200)
|
|
40
|
+
setResponseStatus(event, r.statusCode);
|
|
39
41
|
return r.data;
|
|
40
42
|
}
|
|
41
43
|
};
|
|
42
44
|
return Object.assign(handler, {
|
|
43
45
|
getRemult: (req) => result.getRemult(req),
|
|
44
46
|
openApiDoc: (options) => result.openApiDoc(options),
|
|
45
|
-
withRemult(
|
|
46
|
-
return result.withRemultAsync(
|
|
47
|
+
withRemult(request, what) {
|
|
48
|
+
return result.withRemultAsync(request, what);
|
|
47
49
|
},
|
|
48
50
|
});
|
|
49
51
|
}
|
|
@@ -13,7 +13,7 @@ export {};
|
|
|
13
13
|
//p1 - V - dbname to metadata consider making dbname in the field metadata options - non optional, so it'll be clear that it always have value - something like require the specific key - or move it to the metadata field
|
|
14
14
|
//p1 - V - getEntityRefClone What I would like is to make a copy of the item (without getting it from the server again)
|
|
15
15
|
//p1 - V find one i had a question about find first's different syntax from find that confused a user
|
|
16
|
-
|
|
16
|
+
//p1 - https://dexie.org/
|
|
17
17
|
rename V - withremultpromise to that withRemultAsync
|
|
18
18
|
expose live query storage in remult
|
|
19
19
|
|
package/package.json
CHANGED
package/remult-nuxt.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { H3Event } from 'h3';
|
|
2
|
-
import { RemultServerCore, RemultServerOptions, RemultServer } from './server/index.js';
|
|
2
|
+
import type { RemultServerCore, RemultServerOptions, RemultServer } from './server/index.js';
|
|
3
3
|
export declare function remultNuxt(options: RemultServerOptions<H3Event>): RemultNuxtServer;
|
|
4
4
|
export type RemultNuxtServer = RemultServerCore<H3Event> & ((event: H3Event) => Promise<any>) & {
|
|
5
5
|
withRemult: RemultServer<H3Event>['withRemultAsync'];
|
package/remult-nuxt.js
CHANGED
|
@@ -57,6 +57,8 @@ function remultNuxt(options) {
|
|
|
57
57
|
_a.label = 3;
|
|
58
58
|
case 3:
|
|
59
59
|
if (r) {
|
|
60
|
+
if (r.statusCode !== 200)
|
|
61
|
+
(0, h3_1.setResponseStatus)(event, r.statusCode);
|
|
60
62
|
return [2 /*return*/, r.data];
|
|
61
63
|
}
|
|
62
64
|
return [2 /*return*/];
|
|
@@ -66,8 +68,8 @@ function remultNuxt(options) {
|
|
|
66
68
|
return Object.assign(handler, {
|
|
67
69
|
getRemult: function (req) { return result.getRemult(req); },
|
|
68
70
|
openApiDoc: function (options) { return result.openApiDoc(options); },
|
|
69
|
-
withRemult: function (
|
|
70
|
-
return result.withRemultAsync(
|
|
71
|
+
withRemult: function (request, what) {
|
|
72
|
+
return result.withRemultAsync(request, what);
|
|
71
73
|
},
|
|
72
74
|
});
|
|
73
75
|
}
|
package/src/remult3/remult3.js
CHANGED
|
@@ -14,7 +14,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
14
|
//p1 - V - dbname to metadata consider making dbname in the field metadata options - non optional, so it'll be clear that it always have value - something like require the specific key - or move it to the metadata field
|
|
15
15
|
//p1 - V - getEntityRefClone What I would like is to make a copy of the item (without getting it from the server again)
|
|
16
16
|
//p1 - V find one i had a question about find first's different syntax from find that confused a user
|
|
17
|
-
|
|
17
|
+
//p1 - https://dexie.org/
|
|
18
18
|
rename V - withremultpromise to that withRemultAsync
|
|
19
19
|
expose live query storage in remult
|
|
20
20
|
|