remult 0.26.22 → 0.26.23

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.
@@ -64,7 +64,7 @@ export function buildEntityInfo(options) {
64
64
  }
65
65
  fields.push({
66
66
  key: x.key,
67
- readOnly: x.dbReadOnly || !x.apiUpdateAllowed(),
67
+ readOnly: x.dbReadOnly || !x.apiUpdateAllowed() || x.isServerExpression,
68
68
  values: getValueList(x),
69
69
  valFieldKey,
70
70
  caption: x.caption,
@@ -1,33 +1,34 @@
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
4
9
  //p1 - fix query docs to also explain how it can be used for infinite scroll and pagination.
5
10
  //y1 - 'test expression columns without aliases'
6
- //p1 - see if I can fix the no alias problem in selects
7
- //p1 - add luid - it's cool for order by.
8
- //p1 - replace uuid with crypto.randomUUID and allow custom fallback
9
- //p1 - add nanoid
10
- //p1 - add id and use luid by default, but allow changes with Fields.id.defaultIdProvider
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
11
16
  //p1 - explain the benefits of changing the default provider for testing in docs.
12
17
  //p1 - fix sqlite to support alter table when adding a column with ensure schema = on
13
18
  //p1 - fix app custom filters example for multiple filters.
14
19
  //p1 - add not!!!!
15
20
  //p1 - add LifecycleEvent to documentation
16
- //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
17
21
  //p1 - Fix hagai and starter project to latest ts
18
- //y1 - talk about the $ sign in my filter rules - no other orm uses that (part of sql work, with $ etc)
19
- //y1 TODO - discuss next auth withRemult paradox - the gift that keeps on giving - it's doing something crazy there!!
20
22
  //p1 - fix chaining of saving and saved in multiple entity options args
21
23
  //p1 - review starter and examples and separate remult * auth from the routes
22
- /*p1 - https://github.com/remult/remult/discussions/438
23
- - https://github.com/remult/remult/blob/query-argumets/projects/tests/dbs/test-sql-database.spec.ts#L100-L128
24
- */
25
24
  //p1 - min, max, avg, sum
25
+ //p1 - consider upsert (where,set)
26
26
  //y1 - live query with count #436
27
27
  //y1 TODO - In the esm version of our tutorial - the imports are automatically .ts and not .js in react and not in vue
28
28
  //y1 TODO - consider id to also support keyof (id:['company','index']) - had problem with | (keyof Partial<entityType>)[] & `entity`
29
- //y1 TODO - readonly key: keyof MembersOnly<entityType> & string
30
- //y1 - talk about insert / update / delete with relations
29
+ //y1 TODO - readonly key: keyof MembersOnly<entityType> & string
30
+ //y1 TODO - fix remult admin not to load the html into memory until used
31
+ //y2 - talk about insert / update / delete with relations
31
32
  /*
32
33
  repo(Order).insert({},{
33
34
  relations:{
@@ -35,22 +36,19 @@ repo(Order).insert({},{
35
36
  }
36
37
  })
37
38
  */
38
- //y1 - repo batch - for multiple operations:
39
+ //y2 - repo batch - for multiple operations:
39
40
  /*
40
41
  const result = await repo.batch(x=>({
41
42
  data:x.find(),
42
43
  count:x.count()
43
44
  }))
44
45
  */
45
- //p1 - consider upsert (where,set)
46
46
  //y1 - wait a second to close stream -see pr
47
47
  //p1 - Consider enforcing serial operations on JSON database to prevent data loss
48
- //y2 - soft-delete-discussion https://discord.com/channels/975754286384418847/1230386433093533698/1230386433093533698
49
48
  //p1 - prepare the createEntity discussion
50
49
  //p1 - return error on connection error
51
50
  //p1 - article on displayValue including it's definition for entities that is used in relations
52
51
  //p1 - article auth.js with express - played with it, requires type="module" and a few more configurations - https://github.com/noam-honig/express-auth
53
- //p2 - fix remult admin not to load the html into memory until used
54
52
  //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?
55
53
  //p2 - create foreign key constraints in user code - https://codesandbox.io/p/devbox/fk-validator-tdshcs
56
54
  //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
@@ -74,10 +72,8 @@ const result = await repo.batch(x=>({
74
72
  - delete restrict (implicit, or user selected - and if so, how) (delete & update of id)
75
73
 
76
74
  */
77
- //y1 - consider sql expression gets a dbnames of it's own (that already has the "tableName" defined correctly) maybe also the filter translator
78
75
  //y1 - tried to upgrade vitest, nuxt tests are failing with loading uuid - sounds familiar?
79
76
  //y1 - talk about the parameter issue with backend methods
80
- //y1 - main vs master
81
77
  //y2 - livequery for findfirst (@JY)
82
78
  /*y2 -
83
79
  //y2 - allow api update only for new rows
@@ -103,8 +99,8 @@ const result = await repo.batch(x=>({
103
99
  //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
104
100
  //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
105
101
  //y2 - from the crm-demo(https://crm-demo.up.railway.app/deals), after editing a deal: - _updateEntityBasedOnApi
106
- //y2 - Backend methods are transactions, it's not intuitive and maybe should be optional / opt in
107
- //y2 - how to run a transaction as a user
102
+ //y1 - Backend methods are transactions, it's not intuitive and maybe should be optional / opt in (https://github.com/remult/remult/issues/466)
103
+ //y1 - how to run a transaction as a user
108
104
  //y2 - message for relation that is missing
109
105
  //y2 - consider multi tenancies
110
106
  //p2 - and validators to reference
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remult",
3
- "version": "0.26.22",
3
+ "version": "0.26.23",
4
4
  "description": "A CRUD framework for full-stack TypeScript",
5
5
  "homepage": "https://remult.dev",
6
6
  "repository": {