remult 0.26.23-next.2 → 0.27.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.
@@ -61,7 +61,7 @@ export function buildEntityInfo(options) {
61
61
  }
62
62
  fields.push({
63
63
  key: x.key,
64
- readOnly: x.dbReadOnly || !x.apiUpdateAllowed(),
64
+ readOnly: x.dbReadOnly || !x.apiUpdateAllowed() || x.isServerExpression,
65
65
  values: getValueList(x),
66
66
  valFieldKey,
67
67
  caption: x.caption,
@@ -1,6 +1,18 @@
1
1
  export const flags = {
2
2
  error500RetryCount: 4,
3
3
  };
4
+ /*y1 - https://github.com/remult/remult/discussions/438
5
+ - https://github.com/remult/remult/blob/query-argumets/projects/tests/dbs/test-sql-database.spec.ts#L100-L128
6
+ */
7
+ //y1 - consider sql expression gets a dbnames of it's own (that already has the "tableName" defined correctly) maybe also the filter translator
8
+ //y2 - soft-delete-discussion https://discord.com/channels/975754286384418847/1230386433093533698/1230386433093533698
9
+ //p1 - fix query docs to also explain how it can be used for infinite scroll and pagination.
10
+ //y1 - 'test expression columns without aliases'
11
+ //y1 - live query update waits for last
12
+ //p1 - add luid - it's cool for order by. - NO
13
+ //p1 - replace uuid with crypto.randomUUID and allow custom fallback NO
14
+ //p1 - add nanoid - NO
15
+ //p1 - add id and use luid by default, but allow changes with Fields.id.defaultIdProvider NO but defaultProvider yes
4
16
  /*p1
5
17
  * field, fieldType ,ValueListFieldType, - return optional parameter for decorators
6
18
  * options to remultExpress tc... should be mandatory
@@ -21,21 +33,17 @@ export const flags = {
21
33
  //p1 - fix app custom filters example for multiple filters.
22
34
  //p1 - add not!!!!
23
35
  //p1 - add LifecycleEvent to documentation
24
- //y1 - Talk about the case where we had one to many, without a field - just a filter - for example, event,event participants, users - and a field that shows all users that are not participants
25
36
  //p1 - Fix hagai and starter project to latest ts
26
- //y1 - talk about the $ sign in my filter rules - no other orm uses that (part of sql work, with $ etc)
27
- //y1 TODO - discuss next auth withRemult paradox - the gift that keeps on giving - it's doing something crazy there!!
28
37
  //p1 - fix chaining of saving and saved in multiple entity options args
29
38
  //p1 - review starter and examples and separate remult * auth from the routes
30
- /*p1 - https://github.com/remult/remult/discussions/438
31
- - https://github.com/remult/remult/blob/query-argumets/projects/tests/dbs/test-sql-database.spec.ts#L100-L128
32
- */
33
39
  //p1 - min, max, avg, sum
40
+ //p1 - consider upsert (where,set)
34
41
  //y1 - live query with count #436
35
42
  //y1 TODO - In the esm version of our tutorial - the imports are automatically .ts and not .js in react and not in vue
36
43
  //y1 TODO - consider id to also support keyof (id:['company','index']) - had problem with | (keyof Partial<entityType>)[] & `entity`
37
- //y1 TODO - readonly key: keyof MembersOnly<entityType> & string
38
- //y1 - talk about insert / update / delete with relations
44
+ //y1 TODO - readonly key: keyof MembersOnly<entityType> & string
45
+ //y1 TODO - fix remult admin not to load the html into memory until used
46
+ //y2 - talk about insert / update / delete with relations
39
47
  /*
40
48
  repo(Order).insert({},{
41
49
  relations:{
@@ -43,23 +51,19 @@ repo(Order).insert({},{
43
51
  }
44
52
  })
45
53
  */
46
- //y1 - repo batch - for multiple operations:
54
+ //y2 - repo batch - for multiple operations:
47
55
  /*
48
56
  const result = await repo.batch(x=>({
49
57
  data:x.find(),
50
58
  count:x.count()
51
59
  }))
52
60
  */
53
- //p1 - consider upsert (where,set)
54
61
  //y1 - wait a second to close stream -see pr
55
62
  //p1 - Consider enforcing serial operations on JSON database to prevent data loss
56
- //y2 - soft-delete-discussion https://discord.com/channels/975754286384418847/1230386433093533698/1230386433093533698
57
63
  //p1 - prepare the createEntity discussion
58
64
  //p1 - return error on connection error
59
65
  //p1 - article on displayValue including it's definition for entities that is used in relations
60
66
  //p1 - article auth.js with express - played with it, requires type="module" and a few more configurations - https://github.com/noam-honig/express-auth
61
- //p2 - fix remult admin not to load the html into memory until used
62
- //p2 - add update to entityRef and EntityBase
63
67
  //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?
64
68
  //p2 - create foreign key constraints in user code - https://codesandbox.io/p/devbox/fk-validator-tdshcs
65
69
  //p2 - 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
@@ -83,10 +87,8 @@ const result = await repo.batch(x=>({
83
87
  - delete restrict (implicit, or user selected - and if so, how) (delete & update of id)
84
88
 
85
89
  */
86
- //y1 - consider sql expression gets a dbnames of it's own (that already has the "tableName" defined correctly) maybe also the filter translator
87
90
  //y1 - tried to upgrade vitest, nuxt tests are failing with loading uuid - sounds familiar?
88
91
  //y1 - talk about the parameter issue with backend methods
89
- //y1 - main vs master
90
92
  //y2 - livequery for findfirst (@JY)
91
93
  /*y2 -
92
94
  //y2 - allow api update only for new rows
@@ -112,8 +114,8 @@ const result = await repo.batch(x=>({
112
114
  //y2 - Should we create a separate implementation of command - one that the user uses, and another that the database implements (with only the bear necesities) - for example, to provide a second paramter called field for toDb conversions
113
115
  //y2 - should we simply inherit from SqlDataProvider - and send the required parameter in the call to the base class - I think that new SqlDatabase(new PostgresDataProvider()) is a bilt combersome
114
116
  //y2 - from the crm-demo(https://crm-demo.up.railway.app/deals), after editing a deal: - _updateEntityBasedOnApi
115
- //y2 - Backend methods are transactions, it's not intuitive and maybe should be optional / opt in
116
- //y2 - how to run a transaction as a user
117
+ //y1 - Backend methods are transactions, it's not intuitive and maybe should be optional / opt in (https://github.com/remult/remult/issues/466)
118
+ //y1 - how to run a transaction as a user
117
119
  //y2 - message for relation that is missing
118
120
  //y2 - consider multi tenancies
119
121
  //p2 - and validators to reference
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remult",
3
- "version": "0.26.23-next.2",
3
+ "version": "0.27.0",
4
4
  "description": "A CRUD framework for full-stack TypeScript",
5
5
  "homepage": "https://remult.dev",
6
6
  "repository": {