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