remult 0.26.2 → 0.26.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-hono.js
CHANGED
|
@@ -29,8 +29,6 @@ export function remultHono(options) {
|
|
|
29
29
|
});
|
|
30
30
|
let honoRouter = {
|
|
31
31
|
route(path) {
|
|
32
|
-
if (path.endsWith('*'))
|
|
33
|
-
path = path.substring(0, path.length - 1) + '.*';
|
|
34
32
|
let r = {
|
|
35
33
|
get(handler) {
|
|
36
34
|
app.get(path, honoHandler(handler));
|
|
@@ -68,7 +66,7 @@ export function remultHono(options) {
|
|
|
68
66
|
if (sse)
|
|
69
67
|
sse.close();
|
|
70
68
|
else
|
|
71
|
-
res(c.
|
|
69
|
+
res(c.body(null));
|
|
72
70
|
},
|
|
73
71
|
send: (data) => {
|
|
74
72
|
res(c.html(data));
|
|
@@ -197,7 +197,7 @@ export class RemultServerImplementation {
|
|
|
197
197
|
doWork: undefined,
|
|
198
198
|
}, r);
|
|
199
199
|
if (this.options.admin !== undefined && this.options.admin !== false) {
|
|
200
|
-
|
|
200
|
+
const admin = this.process(async (remult, req, res, orig, origResponse) => {
|
|
201
201
|
if (remult.isAllowed(this.options.admin))
|
|
202
202
|
origResponse.send(remultAdminHtml({
|
|
203
203
|
remult: remult,
|
|
@@ -206,7 +206,10 @@ export class RemultServerImplementation {
|
|
|
206
206
|
}));
|
|
207
207
|
else
|
|
208
208
|
res.notFound();
|
|
209
|
-
})
|
|
209
|
+
});
|
|
210
|
+
r.route(this.options.rootPath + '/admin/:id').get(admin);
|
|
211
|
+
r.route(this.options.rootPath + '/admin/').get(admin);
|
|
212
|
+
r.route(this.options.rootPath + '/admin').get(admin);
|
|
210
213
|
}
|
|
211
214
|
if (this.options.subscriptionServer instanceof SseSubscriptionServer) {
|
|
212
215
|
const streamPath = this.options.rootPath + '/' + streamUrl;
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
export {};
|
|
2
2
|
//y1 - https://discord.com/channels/975754286384418847/1230386433093533698/1230386433093533698
|
|
3
3
|
//y1 - fix async hooks - was it fixed?
|
|
4
|
-
//p1 -
|
|
5
|
-
//p1 -
|
|
4
|
+
//p1 - consider upsert (where,set)
|
|
5
|
+
//p1 - consider id to also support keyof (id:['company','index'])
|
|
6
|
+
//p1 - wait a second to close stream
|
|
7
|
+
//p1 - reconsider update many, maybe the second parameter should be in a set option - break existing
|
|
6
8
|
//p1 - add documentation for bun sqlite
|
|
7
|
-
//p1 - fix dark background to also work on groups
|
|
8
9
|
//p1 - describe entity
|
|
9
10
|
//p1 - prepare the createEntity discussion
|
|
10
|
-
//p1 - fix async hooks
|
|
11
11
|
//p1 - write active record article
|
|
12
12
|
//p1 - maybe add decorator comment in the readme as well (I heard you've lost me in decorators) - and improve the describeClass function
|
|
13
13
|
//p1 - return error on connection error
|
|
14
|
-
//p1 - reconsider update many, maybe the second parameter should be in a set option - break existing
|
|
15
|
-
//p1 - consider upsert (where,set)
|
|
16
|
-
//p1 - consider id to also support keyof (id:['company','index'])
|
|
17
14
|
//p1 - consider including the admin in the tutorial - and maybe even in the demo when we setup the api
|
|
18
|
-
//
|
|
15
|
+
//p2 -fix remult admin not to load the html into memory until used
|
|
19
16
|
//y2 - JY suggestion of having generate as part of the ensure schema - not sure
|
|
20
17
|
//y2 - currently for string fields we default for 255 in knex (which is their default) why not just use text (varchar max) - and only use exact length when one is provided?
|
|
21
18
|
//p2 - create foreign key constraints in user code - https://codesandbox.io/p/devbox/fk-validator-tdshcs
|
|
22
|
-
//p1 - admin url1 - pocketbase use /_ for the admin //{allowed?:Allowed,url?:string} also checkout the admin* as it should probably be something else
|
|
19
|
+
//p1 - admin url1 - pocketbase use /_ for the admin //{allowed?:Allowed,url?:string} also checkout the admin* as it should probably be something else and didn't work in hono
|
|
23
20
|
//p1 - article auth.js with express - played with it, requires type="module" and a few more configurations - https://github.com/noam-honig/express-auth
|
|
24
21
|
//y2 - fix validators cache
|
|
25
22
|
//y2 - should we validate relations
|
package/package.json
CHANGED
package/remult-hono.js
CHANGED
|
@@ -36,8 +36,6 @@ function remultHono(options) {
|
|
|
36
36
|
});
|
|
37
37
|
var honoRouter = {
|
|
38
38
|
route: function (path) {
|
|
39
|
-
if (path.endsWith('*'))
|
|
40
|
-
path = path.substring(0, path.length - 1) + '.*';
|
|
41
39
|
var r = {
|
|
42
40
|
get: function (handler) {
|
|
43
41
|
app.get(path, honoHandler(handler));
|
|
@@ -75,7 +73,7 @@ function remultHono(options) {
|
|
|
75
73
|
if (sse_1)
|
|
76
74
|
sse_1.close();
|
|
77
75
|
else
|
|
78
|
-
res(c.
|
|
76
|
+
res(c.body(null));
|
|
79
77
|
},
|
|
80
78
|
send: function (data) {
|
|
81
79
|
res(c.html(data));
|
package/server/expressBridge.js
CHANGED
|
@@ -331,7 +331,7 @@ var RemultServerImplementation = /** @class */ (function () {
|
|
|
331
331
|
doWork: undefined,
|
|
332
332
|
}, r);
|
|
333
333
|
if (this.options.admin !== undefined && this.options.admin !== false) {
|
|
334
|
-
|
|
334
|
+
var admin = this.process(function (remult, req, res, orig, origResponse) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
335
335
|
return tslib_1.__generator(this, function (_a) {
|
|
336
336
|
if (remult.isAllowed(this.options.admin))
|
|
337
337
|
origResponse.send((0, remult_admin_js_1.default)({
|
|
@@ -343,7 +343,10 @@ var RemultServerImplementation = /** @class */ (function () {
|
|
|
343
343
|
res.notFound();
|
|
344
344
|
return [2 /*return*/];
|
|
345
345
|
});
|
|
346
|
-
}); })
|
|
346
|
+
}); });
|
|
347
|
+
r.route(this.options.rootPath + '/admin/:id').get(admin);
|
|
348
|
+
r.route(this.options.rootPath + '/admin/').get(admin);
|
|
349
|
+
r.route(this.options.rootPath + '/admin').get(admin);
|
|
347
350
|
}
|
|
348
351
|
if (this.options.subscriptionServer instanceof SseSubscriptionServer_js_1.SseSubscriptionServer) {
|
|
349
352
|
var streamPath = this.options.rootPath + '/' + SubscriptionChannel_js_1.streamUrl;
|
package/src/remult3/remult3.js
CHANGED
|
@@ -2,25 +2,22 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//y1 - https://discord.com/channels/975754286384418847/1230386433093533698/1230386433093533698
|
|
4
4
|
//y1 - fix async hooks - was it fixed?
|
|
5
|
-
//p1 -
|
|
6
|
-
//p1 -
|
|
5
|
+
//p1 - consider upsert (where,set)
|
|
6
|
+
//p1 - consider id to also support keyof (id:['company','index'])
|
|
7
|
+
//p1 - wait a second to close stream
|
|
8
|
+
//p1 - reconsider update many, maybe the second parameter should be in a set option - break existing
|
|
7
9
|
//p1 - add documentation for bun sqlite
|
|
8
|
-
//p1 - fix dark background to also work on groups
|
|
9
10
|
//p1 - describe entity
|
|
10
11
|
//p1 - prepare the createEntity discussion
|
|
11
|
-
//p1 - fix async hooks
|
|
12
12
|
//p1 - write active record article
|
|
13
13
|
//p1 - maybe add decorator comment in the readme as well (I heard you've lost me in decorators) - and improve the describeClass function
|
|
14
14
|
//p1 - return error on connection error
|
|
15
|
-
//p1 - reconsider update many, maybe the second parameter should be in a set option - break existing
|
|
16
|
-
//p1 - consider upsert (where,set)
|
|
17
|
-
//p1 - consider id to also support keyof (id:['company','index'])
|
|
18
15
|
//p1 - consider including the admin in the tutorial - and maybe even in the demo when we setup the api
|
|
19
|
-
//
|
|
16
|
+
//p2 -fix remult admin not to load the html into memory until used
|
|
20
17
|
//y2 - JY suggestion of having generate as part of the ensure schema - not sure
|
|
21
18
|
//y2 - currently for string fields we default for 255 in knex (which is their default) why not just use text (varchar max) - and only use exact length when one is provided?
|
|
22
19
|
//p2 - create foreign key constraints in user code - https://codesandbox.io/p/devbox/fk-validator-tdshcs
|
|
23
|
-
//p1 - admin url1 - pocketbase use /_ for the admin //{allowed?:Allowed,url?:string} also checkout the admin* as it should probably be something else
|
|
20
|
+
//p1 - admin url1 - pocketbase use /_ for the admin //{allowed?:Allowed,url?:string} also checkout the admin* as it should probably be something else and didn't work in hono
|
|
24
21
|
//p1 - article auth.js with express - played with it, requires type="module" and a few more configurations - https://github.com/noam-honig/express-auth
|
|
25
22
|
//y2 - fix validators cache
|
|
26
23
|
//y2 - should we validate relations
|