@solidxai/core 0.1.11-beta.12 → 0.1.11-beta.14
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/.claude/settings.local.json +16 -0
- package/CLAUDE.md +26 -0
- package/dist/controllers/media.controller.js +0 -2
- package/dist/controllers/media.controller.js.map +1 -1
- package/dist/helpers/environment.helper.d.ts +0 -1
- package/dist/helpers/environment.helper.d.ts.map +1 -1
- package/dist/helpers/environment.helper.js +0 -4
- package/dist/helpers/environment.helper.js.map +1 -1
- package/dist/helpers/model-metadata-helper.service.d.ts +1 -2
- package/dist/helpers/model-metadata-helper.service.d.ts.map +1 -1
- package/dist/helpers/model-metadata-helper.service.js +2 -6
- package/dist/helpers/model-metadata-helper.service.js.map +1 -1
- package/dist/helpers/solid-registry.d.ts +1 -2
- package/dist/helpers/solid-registry.d.ts.map +1 -1
- package/dist/helpers/solid-registry.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/repository/scheduled-job.repository.d.ts +2 -2
- package/dist/repository/scheduled-job.repository.d.ts.map +1 -1
- package/dist/repository/scheduled-job.repository.js +3 -6
- package/dist/repository/scheduled-job.repository.js.map +1 -1
- package/dist/repository/security-rule.repository.d.ts +2 -2
- package/dist/repository/security-rule.repository.d.ts.map +1 -1
- package/dist/repository/security-rule.repository.js +3 -6
- package/dist/repository/security-rule.repository.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +62 -33
- package/dist/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.d.ts.map +1 -1
- package/dist/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.js +5 -7
- package/dist/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.js.map +1 -1
- package/dist/services/crud-helper.service.d.ts.map +1 -1
- package/dist/services/crud-helper.service.js +7 -0
- package/dist/services/crud-helper.service.js.map +1 -1
- package/dist/services/model-metadata.service.d.ts.map +1 -1
- package/dist/services/model-metadata.service.js +0 -16
- package/dist/services/model-metadata.service.js.map +1 -1
- package/dist/services/module-metadata.service.d.ts.map +1 -1
- package/dist/services/module-metadata.service.js +0 -28
- package/dist/services/module-metadata.service.js.map +1 -1
- package/dist/subscribers/audit.subscriber.d.ts.map +1 -1
- package/dist/subscribers/audit.subscriber.js +2 -8
- package/dist/subscribers/audit.subscriber.js.map +1 -1
- package/dist/subscribers/computed-entity-field.subscriber.d.ts +0 -8
- package/dist/subscribers/computed-entity-field.subscriber.d.ts.map +1 -1
- package/dist/subscribers/computed-entity-field.subscriber.js +3 -36
- package/dist/subscribers/computed-entity-field.subscriber.js.map +1 -1
- package/dist/subscribers/created-by-updated-by.subscriber.d.ts.map +1 -1
- package/dist/subscribers/created-by-updated-by.subscriber.js.map +1 -1
- package/dist/subscribers/field-metadata.subscriber.d.ts.map +1 -1
- package/dist/subscribers/field-metadata.subscriber.js.map +1 -1
- package/dist/subscribers/scheduled-job.subscriber.d.ts.map +1 -1
- package/dist/subscribers/scheduled-job.subscriber.js +2 -3
- package/dist/subscribers/scheduled-job.subscriber.js.map +1 -1
- package/dist/subscribers/security-rule.subscriber.d.ts.map +1 -1
- package/dist/subscribers/security-rule.subscriber.js +3 -5
- package/dist/subscribers/security-rule.subscriber.js.map +1 -1
- package/package.json +1 -1
- package/src/controllers/media.controller.ts +1 -1
- package/src/helpers/environment.helper.ts +0 -11
- package/src/helpers/model-metadata-helper.service.ts +2 -7
- package/src/helpers/solid-registry.ts +1 -7
- package/src/index.ts +0 -1
- package/src/repository/scheduled-job.repository.ts +4 -10
- package/src/repository/security-rule.repository.ts +4 -10
- package/src/seeders/seed-data/solid-core-metadata.json +62 -33
- package/src/services/1.js +6 -0
- package/src/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.ts +5 -11
- package/src/services/crud-helper.service.ts +7 -0
- package/src/services/model-metadata.service.ts +0 -22
- package/src/services/module-metadata.service.ts +0 -36
- package/src/subscribers/audit.subscriber.ts +2 -11
- package/src/subscribers/computed-entity-field.subscriber.ts +6 -63
- package/src/subscribers/created-by-updated-by.subscriber.ts +0 -3
- package/src/subscribers/field-metadata.subscriber.ts +0 -3
- package/src/subscribers/scheduled-job.subscriber.ts +2 -3
- package/src/subscribers/security-rule.subscriber.ts +3 -8
- package/dist/helpers/nodemon-heartbeat.d.ts +0 -5
- package/dist/helpers/nodemon-heartbeat.d.ts.map +0 -1
- package/dist/helpers/nodemon-heartbeat.js +0 -67
- package/dist/helpers/nodemon-heartbeat.js.map +0 -1
- package/dist-tests/api/authenticate.spec.js +0 -119
- package/dist-tests/api/authenticate.spec.js.map +0 -1
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js +0 -97
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js.map +0 -1
- package/dist-tests/api/ping.spec.js +0 -21
- package/dist-tests/api/ping.spec.js.map +0 -1
- package/dist-tests/helpers/auth.js +0 -41
- package/dist-tests/helpers/auth.js.map +0 -1
- package/dist-tests/helpers/env.js +0 -11
- package/dist-tests/helpers/env.js.map +0 -1
- package/docs/agent-hub-grooming.md +0 -301
- package/docs/dashboards/AGENTIC_DASHBOARD_IMPLEMENTATION_PLAN.md +0 -438
- package/docs/dashboards/dashboard-curl-smoke-tests.txt +0 -146
- package/docs/dashboards/delete-legacy-dashboard-metadata.sql +0 -172
- package/docs/datasource-introspection-ddl-analysis.md +0 -326
- package/docs/datasource-introspection-implementation-plan.md +0 -306
- package/docs/grouping-enhancements.md +0 -89
- package/docs/java-spring/README.md +0 -3
- package/docs/java-spring/solid-core-module-deep-dive-report.md +0 -1317
- package/docs/module-package-import-handoff.md +0 -691
- package/docs/seed-changes.md +0 -65
- package/docs/test-data-workflow.md +0 -200
- package/docs/type-declaration-import-issue.md +0 -24
- package/src/helpers/nodemon-heartbeat.ts +0 -59
|
@@ -6116,7 +6116,8 @@
|
|
|
6116
6116
|
"sequenceNumber": 1,
|
|
6117
6117
|
"actionUserKey": "moduleMetadata-list-action",
|
|
6118
6118
|
"moduleUserKey": "solid-core",
|
|
6119
|
-
"parentMenuItemUserKey": "appBuilder-menu-item"
|
|
6119
|
+
"parentMenuItemUserKey": "appBuilder-menu-item",
|
|
6120
|
+
"iconName": "view_module"
|
|
6120
6121
|
},
|
|
6121
6122
|
{
|
|
6122
6123
|
"displayName": "Model",
|
|
@@ -6124,7 +6125,8 @@
|
|
|
6124
6125
|
"sequenceNumber": 2,
|
|
6125
6126
|
"actionUserKey": "modelMetadata-list-action",
|
|
6126
6127
|
"moduleUserKey": "solid-core",
|
|
6127
|
-
"parentMenuItemUserKey": "appBuilder-menu-item"
|
|
6128
|
+
"parentMenuItemUserKey": "appBuilder-menu-item",
|
|
6129
|
+
"iconName": "table_rows"
|
|
6128
6130
|
},
|
|
6129
6131
|
{
|
|
6130
6132
|
"displayName": "Field",
|
|
@@ -6132,7 +6134,8 @@
|
|
|
6132
6134
|
"sequenceNumber": 3,
|
|
6133
6135
|
"actionUserKey": "fieldMetadata-list-action",
|
|
6134
6136
|
"moduleUserKey": "solid-core",
|
|
6135
|
-
"parentMenuItemUserKey": "appBuilder-menu-item"
|
|
6137
|
+
"parentMenuItemUserKey": "appBuilder-menu-item",
|
|
6138
|
+
"iconName": "label"
|
|
6136
6139
|
},
|
|
6137
6140
|
{
|
|
6138
6141
|
"displayName": "Datasources",
|
|
@@ -6140,7 +6143,8 @@
|
|
|
6140
6143
|
"sequenceNumber": 4,
|
|
6141
6144
|
"actionUserKey": "datasource-management-action",
|
|
6142
6145
|
"moduleUserKey": "solid-core",
|
|
6143
|
-
"parentMenuItemUserKey": "appBuilder-menu-item"
|
|
6146
|
+
"parentMenuItemUserKey": "appBuilder-menu-item",
|
|
6147
|
+
"iconName": "storage"
|
|
6144
6148
|
},
|
|
6145
6149
|
{
|
|
6146
6150
|
"displayName": "Menu Item",
|
|
@@ -6148,7 +6152,8 @@
|
|
|
6148
6152
|
"sequenceNumber": 1,
|
|
6149
6153
|
"actionUserKey": "menuItemMetadata-list-action",
|
|
6150
6154
|
"moduleUserKey": "solid-core",
|
|
6151
|
-
"parentMenuItemUserKey": "layoutBuilder-menu-item"
|
|
6155
|
+
"parentMenuItemUserKey": "layoutBuilder-menu-item",
|
|
6156
|
+
"iconName": "menu"
|
|
6152
6157
|
},
|
|
6153
6158
|
{
|
|
6154
6159
|
"displayName": "View",
|
|
@@ -6156,7 +6161,8 @@
|
|
|
6156
6161
|
"sequenceNumber": 2,
|
|
6157
6162
|
"actionUserKey": "viewMetadata-list-action",
|
|
6158
6163
|
"moduleUserKey": "solid-core",
|
|
6159
|
-
"parentMenuItemUserKey": "layoutBuilder-menu-item"
|
|
6164
|
+
"parentMenuItemUserKey": "layoutBuilder-menu-item",
|
|
6165
|
+
"iconName": "pageview"
|
|
6160
6166
|
},
|
|
6161
6167
|
{
|
|
6162
6168
|
"displayName": "Action",
|
|
@@ -6164,7 +6170,8 @@
|
|
|
6164
6170
|
"sequenceNumber": 3,
|
|
6165
6171
|
"actionUserKey": "actionMetadata-list-action",
|
|
6166
6172
|
"moduleUserKey": "solid-core",
|
|
6167
|
-
"parentMenuItemUserKey": "layoutBuilder-menu-item"
|
|
6173
|
+
"parentMenuItemUserKey": "layoutBuilder-menu-item",
|
|
6174
|
+
"iconName": "bolt"
|
|
6168
6175
|
},
|
|
6169
6176
|
{
|
|
6170
6177
|
"displayName": "User View",
|
|
@@ -6172,7 +6179,8 @@
|
|
|
6172
6179
|
"sequenceNumber": 5,
|
|
6173
6180
|
"actionUserKey": "userViewMetadata-list-action",
|
|
6174
6181
|
"moduleUserKey": "solid-core",
|
|
6175
|
-
"parentMenuItemUserKey": "layoutBuilder-menu-item"
|
|
6182
|
+
"parentMenuItemUserKey": "layoutBuilder-menu-item",
|
|
6183
|
+
"iconName": "person"
|
|
6176
6184
|
},
|
|
6177
6185
|
{
|
|
6178
6186
|
"displayName": "Media Management",
|
|
@@ -6189,7 +6197,8 @@
|
|
|
6189
6197
|
"sequenceNumber": 1,
|
|
6190
6198
|
"actionUserKey": "media-list-action",
|
|
6191
6199
|
"moduleUserKey": "solid-core",
|
|
6192
|
-
"parentMenuItemUserKey": "mediaManagement-menu-item"
|
|
6200
|
+
"parentMenuItemUserKey": "mediaManagement-menu-item",
|
|
6201
|
+
"iconName": "perm_media"
|
|
6193
6202
|
},
|
|
6194
6203
|
{
|
|
6195
6204
|
"displayName": "Media Storage Provider",
|
|
@@ -6197,7 +6206,8 @@
|
|
|
6197
6206
|
"sequenceNumber": 2,
|
|
6198
6207
|
"actionUserKey": "mediaStorageProviderMetadata-list-action",
|
|
6199
6208
|
"moduleUserKey": "solid-core",
|
|
6200
|
-
"parentMenuItemUserKey": "mediaManagement-menu-item"
|
|
6209
|
+
"parentMenuItemUserKey": "mediaManagement-menu-item",
|
|
6210
|
+
"iconName": "cloud"
|
|
6201
6211
|
},
|
|
6202
6212
|
{
|
|
6203
6213
|
"displayName": "IAM",
|
|
@@ -6206,7 +6216,7 @@
|
|
|
6206
6216
|
"actionUserKey": "",
|
|
6207
6217
|
"moduleUserKey": "solid-core",
|
|
6208
6218
|
"parentMenuItemUserKey": "",
|
|
6209
|
-
"iconName": "
|
|
6219
|
+
"iconName": "manage_accounts"
|
|
6210
6220
|
},
|
|
6211
6221
|
{
|
|
6212
6222
|
"displayName": "User",
|
|
@@ -6214,7 +6224,8 @@
|
|
|
6214
6224
|
"sequenceNumber": 1,
|
|
6215
6225
|
"actionUserKey": "user-list-action",
|
|
6216
6226
|
"moduleUserKey": "solid-core",
|
|
6217
|
-
"parentMenuItemUserKey": "iam-menu-item"
|
|
6227
|
+
"parentMenuItemUserKey": "iam-menu-item",
|
|
6228
|
+
"iconName": "person"
|
|
6218
6229
|
},
|
|
6219
6230
|
{
|
|
6220
6231
|
"displayName": "Role",
|
|
@@ -6222,7 +6233,8 @@
|
|
|
6222
6233
|
"sequenceNumber": 2,
|
|
6223
6234
|
"actionUserKey": "roleMetadata-list-action",
|
|
6224
6235
|
"moduleUserKey": "solid-core",
|
|
6225
|
-
"parentMenuItemUserKey": "iam-menu-item"
|
|
6236
|
+
"parentMenuItemUserKey": "iam-menu-item",
|
|
6237
|
+
"iconName": "admin_panel_settings"
|
|
6226
6238
|
},
|
|
6227
6239
|
{
|
|
6228
6240
|
"displayName": "Permission",
|
|
@@ -6230,7 +6242,8 @@
|
|
|
6230
6242
|
"sequenceNumber": 3,
|
|
6231
6243
|
"actionUserKey": "permissionMetadata-list-action",
|
|
6232
6244
|
"moduleUserKey": "solid-core",
|
|
6233
|
-
"parentMenuItemUserKey": "iam-menu-item"
|
|
6245
|
+
"parentMenuItemUserKey": "iam-menu-item",
|
|
6246
|
+
"iconName": "key"
|
|
6234
6247
|
},
|
|
6235
6248
|
{
|
|
6236
6249
|
"displayName": "Security rules",
|
|
@@ -6238,7 +6251,8 @@
|
|
|
6238
6251
|
"sequenceNumber": 4,
|
|
6239
6252
|
"actionUserKey": "securityRule-list-action",
|
|
6240
6253
|
"moduleUserKey": "solid-core",
|
|
6241
|
-
"parentMenuItemUserKey": "iam-menu-item"
|
|
6254
|
+
"parentMenuItemUserKey": "iam-menu-item",
|
|
6255
|
+
"iconName": "gavel"
|
|
6242
6256
|
},
|
|
6243
6257
|
{
|
|
6244
6258
|
"displayName": "User Activity History",
|
|
@@ -6246,7 +6260,8 @@
|
|
|
6246
6260
|
"sequenceNumber": 5,
|
|
6247
6261
|
"actionUserKey": "userActivityHistory-list-action",
|
|
6248
6262
|
"moduleUserKey": "solid-core",
|
|
6249
|
-
"parentMenuItemUserKey": "iam-menu-item"
|
|
6263
|
+
"parentMenuItemUserKey": "iam-menu-item",
|
|
6264
|
+
"iconName": "history"
|
|
6250
6265
|
},
|
|
6251
6266
|
{
|
|
6252
6267
|
"displayName": "Queues",
|
|
@@ -6263,7 +6278,8 @@
|
|
|
6263
6278
|
"sequenceNumber": 1,
|
|
6264
6279
|
"actionUserKey": "solid-core-queue-health-dashboard-action",
|
|
6265
6280
|
"moduleUserKey": "solid-core",
|
|
6266
|
-
"parentMenuItemUserKey": "queues-menu-item"
|
|
6281
|
+
"parentMenuItemUserKey": "queues-menu-item",
|
|
6282
|
+
"iconName": "analytics"
|
|
6267
6283
|
},
|
|
6268
6284
|
{
|
|
6269
6285
|
"displayName": "Queues",
|
|
@@ -6271,7 +6287,8 @@
|
|
|
6271
6287
|
"sequenceNumber": 2,
|
|
6272
6288
|
"actionUserKey": "mqMessageQueue-list-action",
|
|
6273
6289
|
"moduleUserKey": "solid-core",
|
|
6274
|
-
"parentMenuItemUserKey": "queues-menu-item"
|
|
6290
|
+
"parentMenuItemUserKey": "queues-menu-item",
|
|
6291
|
+
"iconName": "dns"
|
|
6275
6292
|
},
|
|
6276
6293
|
{
|
|
6277
6294
|
"displayName": "Messages",
|
|
@@ -6279,7 +6296,8 @@
|
|
|
6279
6296
|
"sequenceNumber": 3,
|
|
6280
6297
|
"actionUserKey": "mqMessage-list-action",
|
|
6281
6298
|
"moduleUserKey": "solid-core",
|
|
6282
|
-
"parentMenuItemUserKey": "queues-menu-item"
|
|
6299
|
+
"parentMenuItemUserKey": "queues-menu-item",
|
|
6300
|
+
"iconName": "message"
|
|
6283
6301
|
},
|
|
6284
6302
|
{
|
|
6285
6303
|
"displayName": "Notification",
|
|
@@ -6288,7 +6306,7 @@
|
|
|
6288
6306
|
"actionUserKey": "",
|
|
6289
6307
|
"moduleUserKey": "solid-core",
|
|
6290
6308
|
"parentMenuItemUserKey": "",
|
|
6291
|
-
"iconName": "
|
|
6309
|
+
"iconName": "notification_add"
|
|
6292
6310
|
},
|
|
6293
6311
|
{
|
|
6294
6312
|
"displayName": "Email",
|
|
@@ -6296,7 +6314,8 @@
|
|
|
6296
6314
|
"sequenceNumber": 1,
|
|
6297
6315
|
"actionUserKey": "emailTemplate-list-action",
|
|
6298
6316
|
"moduleUserKey": "solid-core",
|
|
6299
|
-
"parentMenuItemUserKey": "notification-menu-item"
|
|
6317
|
+
"parentMenuItemUserKey": "notification-menu-item",
|
|
6318
|
+
"iconName": "email"
|
|
6300
6319
|
},
|
|
6301
6320
|
{
|
|
6302
6321
|
"displayName": "SMS",
|
|
@@ -6304,7 +6323,8 @@
|
|
|
6304
6323
|
"sequenceNumber": 2,
|
|
6305
6324
|
"actionUserKey": "smsTemplate-list-action",
|
|
6306
6325
|
"moduleUserKey": "solid-core",
|
|
6307
|
-
"parentMenuItemUserKey": "notification-menu-item"
|
|
6326
|
+
"parentMenuItemUserKey": "notification-menu-item",
|
|
6327
|
+
"iconName": "sms"
|
|
6308
6328
|
},
|
|
6309
6329
|
{
|
|
6310
6330
|
"displayName": "Other",
|
|
@@ -6313,7 +6333,7 @@
|
|
|
6313
6333
|
"actionUserKey": "",
|
|
6314
6334
|
"moduleUserKey": "solid-core",
|
|
6315
6335
|
"parentMenuItemUserKey": "",
|
|
6316
|
-
"iconName": "
|
|
6336
|
+
"iconName": "more_horiz"
|
|
6317
6337
|
},
|
|
6318
6338
|
{
|
|
6319
6339
|
"displayName": "List of Values",
|
|
@@ -6321,7 +6341,8 @@
|
|
|
6321
6341
|
"sequenceNumber": 1,
|
|
6322
6342
|
"actionUserKey": "listOfValues-list-action",
|
|
6323
6343
|
"moduleUserKey": "solid-core",
|
|
6324
|
-
"parentMenuItemUserKey": "other-menu-item"
|
|
6344
|
+
"parentMenuItemUserKey": "other-menu-item",
|
|
6345
|
+
"iconName": "list"
|
|
6325
6346
|
},
|
|
6326
6347
|
{
|
|
6327
6348
|
"displayName": "Scheduled Jobs",
|
|
@@ -6329,7 +6350,8 @@
|
|
|
6329
6350
|
"sequenceNumber": 2,
|
|
6330
6351
|
"actionUserKey": "scheduledJob-list-action",
|
|
6331
6352
|
"moduleUserKey": "solid-core",
|
|
6332
|
-
"parentMenuItemUserKey": "other-menu-item"
|
|
6353
|
+
"parentMenuItemUserKey": "other-menu-item",
|
|
6354
|
+
"iconName": "event_repeat"
|
|
6333
6355
|
},
|
|
6334
6356
|
{
|
|
6335
6357
|
"displayName": "Saved Filters",
|
|
@@ -6337,7 +6359,8 @@
|
|
|
6337
6359
|
"sequenceNumber": 4,
|
|
6338
6360
|
"actionUserKey": "savedFilters-list-action",
|
|
6339
6361
|
"moduleUserKey": "solid-core",
|
|
6340
|
-
"parentMenuItemUserKey": "other-menu-item"
|
|
6362
|
+
"parentMenuItemUserKey": "other-menu-item",
|
|
6363
|
+
"iconName": "filter_list_alt"
|
|
6341
6364
|
},
|
|
6342
6365
|
{
|
|
6343
6366
|
"displayName": "Chatter Message",
|
|
@@ -6345,7 +6368,8 @@
|
|
|
6345
6368
|
"sequenceNumber": 5,
|
|
6346
6369
|
"actionUserKey": "chatterMessage-list-action",
|
|
6347
6370
|
"moduleUserKey": "solid-core",
|
|
6348
|
-
"parentMenuItemUserKey": "other-menu-item"
|
|
6371
|
+
"parentMenuItemUserKey": "other-menu-item",
|
|
6372
|
+
"iconName": "forum"
|
|
6349
6373
|
},
|
|
6350
6374
|
{
|
|
6351
6375
|
"displayName": "Locale",
|
|
@@ -6353,7 +6377,8 @@
|
|
|
6353
6377
|
"sequenceNumber": 7,
|
|
6354
6378
|
"actionUserKey": "locale-list-action",
|
|
6355
6379
|
"moduleUserKey": "solid-core",
|
|
6356
|
-
"parentMenuItemUserKey": "other-menu-item"
|
|
6380
|
+
"parentMenuItemUserKey": "other-menu-item",
|
|
6381
|
+
"iconName": "language"
|
|
6357
6382
|
},
|
|
6358
6383
|
{
|
|
6359
6384
|
"displayName": "Import Transactions",
|
|
@@ -6361,7 +6386,8 @@
|
|
|
6361
6386
|
"sequenceNumber": 8,
|
|
6362
6387
|
"actionUserKey": "importTransaction-list-action",
|
|
6363
6388
|
"moduleUserKey": "solid-core",
|
|
6364
|
-
"parentMenuItemUserKey": "other-menu-item"
|
|
6389
|
+
"parentMenuItemUserKey": "other-menu-item",
|
|
6390
|
+
"iconName": "upload_file"
|
|
6365
6391
|
},
|
|
6366
6392
|
{
|
|
6367
6393
|
"displayName": "Settings",
|
|
@@ -6378,7 +6404,8 @@
|
|
|
6378
6404
|
"sequenceNumber": 1,
|
|
6379
6405
|
"actionUserKey": "modelSequence-list-action",
|
|
6380
6406
|
"moduleUserKey": "solid-core",
|
|
6381
|
-
"parentMenuItemUserKey": "other-menu-item"
|
|
6407
|
+
"parentMenuItemUserKey": "other-menu-item",
|
|
6408
|
+
"iconName": "format_list_numbered"
|
|
6382
6409
|
},
|
|
6383
6410
|
{
|
|
6384
6411
|
"displayName": "Dashboard User Layout",
|
|
@@ -6387,7 +6414,7 @@
|
|
|
6387
6414
|
"actionUserKey": "dashboardUserLayout-list-action",
|
|
6388
6415
|
"moduleUserKey": "solid-core",
|
|
6389
6416
|
"parentMenuItemUserKey": "",
|
|
6390
|
-
"iconName": ""
|
|
6417
|
+
"iconName": "dashboard_customize"
|
|
6391
6418
|
},
|
|
6392
6419
|
{
|
|
6393
6420
|
"displayName": "Agent",
|
|
@@ -6404,7 +6431,8 @@
|
|
|
6404
6431
|
"sequenceNumber": 1,
|
|
6405
6432
|
"actionUserKey": "agentSession-list-action",
|
|
6406
6433
|
"moduleUserKey": "solid-core",
|
|
6407
|
-
"parentMenuItemUserKey": "agent-menu-item"
|
|
6434
|
+
"parentMenuItemUserKey": "agent-menu-item",
|
|
6435
|
+
"iconName": "chat"
|
|
6408
6436
|
},
|
|
6409
6437
|
{
|
|
6410
6438
|
"displayName": "MCP Audit Log",
|
|
@@ -6412,7 +6440,8 @@
|
|
|
6412
6440
|
"sequenceNumber": 3,
|
|
6413
6441
|
"actionUserKey": "mcpAuditLog-list-action",
|
|
6414
6442
|
"moduleUserKey": "solid-core",
|
|
6415
|
-
"parentMenuItemUserKey": "agent-menu-item"
|
|
6443
|
+
"parentMenuItemUserKey": "agent-menu-item",
|
|
6444
|
+
"iconName": "fact_check"
|
|
6416
6445
|
}
|
|
6417
6446
|
],
|
|
6418
6447
|
"views": [
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
1. Do i need to create a storeStreams method for aws service too?
|
|
2
|
+
- Handle later
|
|
3
|
+
2. queues handling -> if queues is enabled by default, i.e triggerExport(exportTransactionEntity.id).
|
|
4
|
+
- startExport should either return the data or return the transaction id
|
|
5
|
+
3. How to handle scenarios wherein, nested related exist.(do i need to only get the userkey)
|
|
6
|
+
- show the userKey
|
package/src/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Injectable } from '@nestjs/common';
|
|
|
2
2
|
import { InjectEntityManager } from '@nestjs/typeorm';
|
|
3
3
|
import { ComputedFieldProvider } from 'src/decorators/computed-field-provider.decorator';
|
|
4
4
|
import { CommonEntity } from 'src/entities/common.entity';
|
|
5
|
-
import { isEmbeddedDb } from 'src/helpers/environment.helper';
|
|
6
5
|
import { ComputedFieldMetadata } from 'src/helpers/solid-registry';
|
|
7
6
|
import { IEntityPreComputeFieldProvider } from 'src/interfaces';
|
|
8
7
|
import { EntityManager } from 'typeorm';
|
|
@@ -46,12 +45,7 @@ export class AlphaNumExternalIdComputationProvider<T extends CommonEntity> imple
|
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
// so the uniqueness check runs on the active connection. On regular Postgres, use the
|
|
51
|
-
// injected EntityManager (original behaviour).
|
|
52
|
-
const manager = isEmbeddedDb() ? (eventContext?.manager ?? this.entityManager) : this.entityManager;
|
|
53
|
-
|
|
54
|
-
const uniqueCode = await this.generateUniqueExternalId(manager, resolvedPrefix, codeLength, computedFieldMetadata.fieldName, entityName);
|
|
48
|
+
const uniqueCode = await this.generateUniqueExternalId(resolvedPrefix, codeLength, computedFieldMetadata.fieldName, entityName);
|
|
55
49
|
const finalExternalId = resolvedPrefix ? `${resolvedPrefix}-${uniqueCode}` : uniqueCode;
|
|
56
50
|
|
|
57
51
|
triggerEntity[computedFieldMetadata.fieldName] = finalExternalId;
|
|
@@ -66,8 +60,8 @@ export class AlphaNumExternalIdComputationProvider<T extends CommonEntity> imple
|
|
|
66
60
|
return result;
|
|
67
61
|
}
|
|
68
62
|
|
|
69
|
-
private async isExternalIdUnique(
|
|
70
|
-
const count = await
|
|
63
|
+
private async isExternalIdUnique(externalId: string, fieldName: string, entityName: string): Promise<boolean> {
|
|
64
|
+
const count = await this.entityManager.count(entityName as any,
|
|
71
65
|
{
|
|
72
66
|
where: { [fieldName]: externalId },
|
|
73
67
|
}
|
|
@@ -75,7 +69,7 @@ export class AlphaNumExternalIdComputationProvider<T extends CommonEntity> imple
|
|
|
75
69
|
return count === 0;
|
|
76
70
|
}
|
|
77
71
|
|
|
78
|
-
private async generateUniqueExternalId(
|
|
72
|
+
private async generateUniqueExternalId(resolvedPrefix: string, codeLength: number, fieldName: string, entityName: string): Promise<string> {
|
|
79
73
|
const maxAttempts = 10;
|
|
80
74
|
|
|
81
75
|
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
@@ -84,7 +78,7 @@ export class AlphaNumExternalIdComputationProvider<T extends CommonEntity> imple
|
|
|
84
78
|
|
|
85
79
|
const fullId = resolvedPrefix ? `${resolvedPrefix}-${newId}` : newId;
|
|
86
80
|
|
|
87
|
-
const isUnique = await this.isExternalIdUnique(
|
|
81
|
+
const isUnique = await this.isExternalIdUnique(fullId, fieldName, entityName);
|
|
88
82
|
|
|
89
83
|
if (isUnique) {
|
|
90
84
|
return newId;
|
|
@@ -293,9 +293,13 @@ export class CrudHelperService {
|
|
|
293
293
|
const orderOptions = this.orderOptions(normalizedSort);
|
|
294
294
|
if (orderOptions) {
|
|
295
295
|
const orderOptionKeys = Object.keys(orderOptions) as Array<keyof typeof orderOptions>;
|
|
296
|
+
let hasExplicitIdSort = false;
|
|
296
297
|
orderOptionKeys.forEach((key) => {
|
|
297
298
|
const value = orderOptions[key] as 'ASC' | 'DESC';
|
|
298
299
|
const field = String(key);
|
|
300
|
+
if (field === 'id') {
|
|
301
|
+
hasExplicitIdSort = true;
|
|
302
|
+
}
|
|
299
303
|
if (field.includes('.')) {
|
|
300
304
|
const { alias, property, created } = this.ensureRelationPathJoined(qb, entityAlias, field.split('.'));
|
|
301
305
|
const orderColumn = `${alias}.${property}`;
|
|
@@ -305,6 +309,9 @@ export class CrudHelperService {
|
|
|
305
309
|
qb.addOrderBy(`${entityAlias}.${field}`, value);
|
|
306
310
|
}
|
|
307
311
|
});
|
|
312
|
+
if (!hasExplicitIdSort) {
|
|
313
|
+
qb.addOrderBy(`${entityAlias}.id`, 'DESC');
|
|
314
|
+
}
|
|
308
315
|
}
|
|
309
316
|
}
|
|
310
317
|
|
|
@@ -28,8 +28,6 @@ import { PermissionMetadata } from '../entities/permission-metadata.entity';
|
|
|
28
28
|
import { RoleMetadata } from '../entities/role-metadata.entity';
|
|
29
29
|
import { ViewMetadata } from '../entities/view-metadata.entity';
|
|
30
30
|
import { CommandService } from '../helpers/command.service';
|
|
31
|
-
import { isEmbeddedDb } from '../helpers/environment.helper';
|
|
32
|
-
import { startNodemonHeartbeat } from '../helpers/nodemon-heartbeat';
|
|
33
31
|
import {
|
|
34
32
|
REFRESH_MODEL_COMMAND,
|
|
35
33
|
REMOVE_FIELDS_COMMAND,
|
|
@@ -1032,26 +1030,6 @@ export class ModelMetadataService {
|
|
|
1032
1030
|
@DisallowInProduction()
|
|
1033
1031
|
async generateCodeViaCtl(modelId: number): Promise<string> {
|
|
1034
1032
|
const model = await this.findOne(modelId);
|
|
1035
|
-
const isEmbedded = isEmbeddedDb();
|
|
1036
|
-
|
|
1037
|
-
// When using an embedded PGlite database, the single-connection limit means
|
|
1038
|
-
// a spawned `solid refresh-model` subprocess cannot get its own DB connection
|
|
1039
|
-
// while the API server is already holding it. Fall back to in-process code
|
|
1040
|
-
// generation (which reuses the existing connection).
|
|
1041
|
-
if (isEmbedded) {
|
|
1042
|
-
this.logger.log('Embedded database detected — generating API code in-process');
|
|
1043
|
-
// Prevent nodemon from restarting the server while schematics write files.
|
|
1044
|
-
const heartbeat = startNodemonHeartbeat(path.join(process.cwd(), 'src'));
|
|
1045
|
-
try {
|
|
1046
|
-
return await this.handleGenerateCode({
|
|
1047
|
-
modelUserKey: model.singularName,
|
|
1048
|
-
dryRun: false,
|
|
1049
|
-
});
|
|
1050
|
-
} finally {
|
|
1051
|
-
heartbeat.stop();
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
1033
|
return this.commandService.executeCommandWithArgs({
|
|
1056
1034
|
command: 'npx',
|
|
1057
1035
|
args: ['@solidxai/solidctl@latest', 'generate', 'model', `--name=${model.singularName}`],
|
|
@@ -26,8 +26,6 @@ import {
|
|
|
26
26
|
} from '../helpers/schematic.service';
|
|
27
27
|
import { CommandService } from '../helpers/command.service';
|
|
28
28
|
import { SolidRegistry } from '../helpers/solid-registry';
|
|
29
|
-
import { isEmbeddedDb } from '../helpers/environment.helper';
|
|
30
|
-
import { startNodemonHeartbeat } from '../helpers/nodemon-heartbeat';
|
|
31
29
|
import { CodeGenerationOptions, ModuleMetadataConfiguration } from '../interfaces';
|
|
32
30
|
import { CrudHelperService } from './crud-helper.service';
|
|
33
31
|
import { ModelMetadataService } from './model-metadata.service';
|
|
@@ -536,40 +534,6 @@ export class ModuleMetadataService {
|
|
|
536
534
|
@DisallowInProduction()
|
|
537
535
|
async generateCodeViaCtl(moduleId: number): Promise<string> {
|
|
538
536
|
const module = await this.findOne(moduleId);
|
|
539
|
-
const isEmbedded = isEmbeddedDb();
|
|
540
|
-
|
|
541
|
-
// When using an embedded PGlite database, the single-connection limit means
|
|
542
|
-
// a spawned `solid refresh-module` subprocess cannot get its own DB connection
|
|
543
|
-
// while the API server is already holding it. Fall back to in-process code
|
|
544
|
-
// generation (which reuses the existing connection) and only spawn solidctl
|
|
545
|
-
// for the UI module scaffold (which does not need a database connection).
|
|
546
|
-
if (isEmbedded) {
|
|
547
|
-
this.logger.log('Embedded database detected — generating API code in-process');
|
|
548
|
-
// Prevent nodemon from restarting the server while schematics write files.
|
|
549
|
-
// The heartbeat touches a watched file every 1.5 s (nodemon delay is 2 s),
|
|
550
|
-
// keeping the delay from expiring during DB queries between schematic runs.
|
|
551
|
-
const heartbeat = startNodemonHeartbeat(path.join(process.cwd(), 'src'));
|
|
552
|
-
try {
|
|
553
|
-
const apiOutput = await this.generateCode({
|
|
554
|
-
moduleUserKey: module.name,
|
|
555
|
-
dryRun: false,
|
|
556
|
-
});
|
|
557
|
-
let uiOutput = '';
|
|
558
|
-
try {
|
|
559
|
-
uiOutput = await this.commandService.executeCommandWithArgs({
|
|
560
|
-
command: 'npx',
|
|
561
|
-
args: ['@solidxai/solidctl@latest', 'generate', 'ui-module', `--name=${module.name}`],
|
|
562
|
-
cwd: path.join(process.cwd(), '..'),
|
|
563
|
-
});
|
|
564
|
-
} catch (error) {
|
|
565
|
-
this.logger.warn('UI module scaffold failed (solidctl may be outdated); API code was generated successfully.');
|
|
566
|
-
}
|
|
567
|
-
return `${apiOutput}\n${uiOutput}`;
|
|
568
|
-
} finally {
|
|
569
|
-
heartbeat.stop();
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
|
|
573
537
|
return this.commandService.executeCommandWithArgs({
|
|
574
538
|
command: 'npx',
|
|
575
539
|
args: ['@solidxai/solidctl@latest', 'generate', 'module', `--name=${module.name}`],
|
|
@@ -4,7 +4,6 @@ import { lowerFirst } from 'src/helpers/string.helper';
|
|
|
4
4
|
import { SolidRegistry } from 'src/helpers/solid-registry';
|
|
5
5
|
import { DataSource, EntityMetadata, EntitySubscriberInterface, InsertEvent, RemoveEvent, UpdateEvent } from 'typeorm';
|
|
6
6
|
import { AuditQueuePayload } from 'src/interfaces';
|
|
7
|
-
import { isEmbeddedDb } from 'src/helpers/environment.helper';
|
|
8
7
|
import { RequestContextService } from 'src/services/request-context.service';
|
|
9
8
|
import { PublisherFactory } from 'src/services/queues/publisher-factory.service';
|
|
10
9
|
const AUDIT_BEFORE_SNAPSHOT = '__auditBeforeSnapshot';
|
|
@@ -89,10 +88,7 @@ export class AuditSubscriber implements EntitySubscriberInterface {
|
|
|
89
88
|
*/
|
|
90
89
|
private async prepareManyToManyAuditUpdateSnapshot(event: UpdateEvent<any>, entityId: number | null, updatedColumnNames: string[]): Promise<{ before: any; after: any } | null> {
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
// on the active connection. On regular Postgres, use the default DataSource.
|
|
94
|
-
const mgr = isEmbeddedDb() ? event.manager : this.dataSource;
|
|
95
|
-
const auditRelationFields = (await this.modelMetadataHelperService.loadFieldHierarchy(lowerFirst(event.metadata.name), isEmbeddedDb() ? event.manager : undefined)).filter(field =>
|
|
91
|
+
const auditRelationFields = (await this.modelMetadataHelperService.loadFieldHierarchy(lowerFirst(event.metadata.name))).filter(field =>
|
|
96
92
|
field.enableAuditTracking &&
|
|
97
93
|
field.type === 'relation' &&
|
|
98
94
|
field.relationType !== 'one-to-many'
|
|
@@ -110,7 +106,7 @@ export class AuditSubscriber implements EntitySubscriberInterface {
|
|
|
110
106
|
|
|
111
107
|
const relationBefore = event.entity?.[AUDIT_BEFORE_SNAPSHOT] ?? null;
|
|
112
108
|
|
|
113
|
-
const relationAfter = await
|
|
109
|
+
const relationAfter = await this.dataSource.getRepository(event.metadata.target as any).findOne({
|
|
114
110
|
where: { id: entityId } as any,
|
|
115
111
|
relations: relations as any,
|
|
116
112
|
});
|
|
@@ -155,11 +151,6 @@ export class AuditSubscriber implements EntitySubscriberInterface {
|
|
|
155
151
|
|
|
156
152
|
if (batch.length === 0) return;
|
|
157
153
|
|
|
158
|
-
if (isEmbeddedDb()) {
|
|
159
|
-
setImmediate(() => void this.publishAuditBatch(batch));
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
154
|
await this.publishAuditBatch(batch);
|
|
164
155
|
}
|
|
165
156
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { camelCase } from 'lodash';
|
|
2
2
|
import { forwardRef, Inject, Injectable, InternalServerErrorException, Logger, Scope } from "@nestjs/common";
|
|
3
3
|
import { ComputedFieldTriggerOperation } from "src/dtos/create-field-metadata.dto";
|
|
4
|
-
import { isEmbeddedDb } from "src/helpers/environment.helper";
|
|
5
4
|
import { ComputedFieldMetadata, SolidRegistry, TypeOrmEventContext } from "src/helpers/solid-registry";
|
|
6
5
|
import { IEntityPreComputeFieldProvider } from "src/interfaces";
|
|
7
6
|
import { PublisherFactory } from "src/services/queues/publisher-factory.service";
|
|
@@ -17,13 +16,6 @@ export class ComputedEntityFieldSubscriber implements EntitySubscriberInterface
|
|
|
17
16
|
private readonly logger = new Logger(this.constructor.name);
|
|
18
17
|
private dataSource: DataSource;
|
|
19
18
|
|
|
20
|
-
// Per-transaction buffer for post-event evaluation jobs. Entries are
|
|
21
|
-
// flushed in afterTransactionCommit so the publish (which uses the
|
|
22
|
-
// default DataSource) never races the in-flight transaction's connection.
|
|
23
|
-
// On PGlite (pool size 1), the flush is deferred via setImmediate to
|
|
24
|
-
// ensure the transaction's connection has been released first.
|
|
25
|
-
private perTxn = new WeakMap<any, { computedField: ComputedFieldMetadata<any>; databaseEntity: any }[]>();
|
|
26
|
-
|
|
27
19
|
constructor(
|
|
28
20
|
private readonly solidRegistry: SolidRegistry,
|
|
29
21
|
@Inject(forwardRef(() => PublisherFactory))
|
|
@@ -68,18 +60,8 @@ export class ComputedEntityFieldSubscriber implements EntitySubscriberInterface
|
|
|
68
60
|
|
|
69
61
|
//FIXME: Need to add support for beforeRemove, beforeSoftRemove, afterSoftRemove, beforeRecover, afterRecover
|
|
70
62
|
|
|
71
|
-
// --------- post-event dispatch (pglite vs non-pglite) ----------
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* On embedded PGlite (pool size 1): buffer payloads on the queryRunner and
|
|
75
|
-
* flush in afterTransactionCommit (deferred via setImmediate) so the publish
|
|
76
|
-
* never tries to get a second connection while the transaction is active.
|
|
77
|
-
*
|
|
78
|
-
* On regular Postgres: fire-and-forget publish immediately (original behaviour),
|
|
79
|
-
* since the pool has spare connections.
|
|
80
|
-
*/
|
|
81
63
|
private handlePostEventJobs(
|
|
82
|
-
|
|
64
|
+
_event: InsertEvent<any> | UpdateEvent<any> | RemoveEvent<any>,
|
|
83
65
|
entity: any,
|
|
84
66
|
currentOperation: ComputedFieldTriggerOperation,
|
|
85
67
|
modelName: string,
|
|
@@ -94,44 +76,11 @@ export class ComputedEntityFieldSubscriber implements EntitySubscriberInterface
|
|
|
94
76
|
);
|
|
95
77
|
if (computedFieldsTobeEvaluated.length === 0) return;
|
|
96
78
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
computedField: this.attachContext(computedField, eventContext),
|
|
103
|
-
databaseEntity: entity,
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
this.perTxn.set(qr, arr);
|
|
107
|
-
} else {
|
|
108
|
-
for (const computedField of computedFieldsTobeEvaluated) {
|
|
109
|
-
this.enqueueComputedFieldEvaluationJob(
|
|
110
|
-
this.attachContext(computedField, eventContext),
|
|
111
|
-
entity,
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// --------- transaction lifecycle (pglite only) ----------
|
|
118
|
-
async afterTransactionCommit(event: { queryRunner: any }) {
|
|
119
|
-
const batch = this.perTxn.get(event.queryRunner) ?? [];
|
|
120
|
-
this.perTxn.delete(event.queryRunner);
|
|
121
|
-
if (batch.length === 0) return;
|
|
122
|
-
|
|
123
|
-
// Deferred via setImmediate so the transaction's connection is released
|
|
124
|
-
// back to the (size-1) pool before the publish tries to acquire it.
|
|
125
|
-
setImmediate(() => void this.flushBatch(batch));
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
afterTransactionRollback(event: { queryRunner: any }) {
|
|
129
|
-
this.perTxn.delete(event.queryRunner);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
private async flushBatch(batch: { computedField: ComputedFieldMetadata<any>; databaseEntity: any }[]) {
|
|
133
|
-
for (const { computedField, databaseEntity } of batch) {
|
|
134
|
-
this.enqueueComputedFieldEvaluationJob(computedField, databaseEntity);
|
|
79
|
+
for (const computedField of computedFieldsTobeEvaluated) {
|
|
80
|
+
this.enqueueComputedFieldEvaluationJob(
|
|
81
|
+
this.attachContext(computedField, eventContext),
|
|
82
|
+
entity,
|
|
83
|
+
);
|
|
135
84
|
}
|
|
136
85
|
}
|
|
137
86
|
|
|
@@ -199,10 +148,8 @@ export class ComputedEntityFieldSubscriber implements EntitySubscriberInterface
|
|
|
199
148
|
}
|
|
200
149
|
|
|
201
150
|
private enqueueComputedFieldEvaluationJob(computedField: ComputedFieldMetadata<any>, databaseEntity: any) {
|
|
202
|
-
const { manager: _manager, ...serializableEventContext } = computedField.eventContext ?? {};
|
|
203
151
|
const payload = {
|
|
204
152
|
...computedField,
|
|
205
|
-
eventContext: serializableEventContext,
|
|
206
153
|
databaseEntity,
|
|
207
154
|
};
|
|
208
155
|
this.publisherFactory.publish({ payload }, 'ComputedFieldEvaluationPublisher');
|
|
@@ -224,10 +171,6 @@ export class ComputedEntityFieldSubscriber implements EntitySubscriberInterface
|
|
|
224
171
|
const base: TypeOrmEventContext = {
|
|
225
172
|
metadataName: event.metadata?.name,
|
|
226
173
|
eventType: eventType,
|
|
227
|
-
// Only pass the transaction's EntityManager for embedded DB (PGlite),
|
|
228
|
-
// where a second pooled connection mid-transaction would deadlock.
|
|
229
|
-
// On regular Postgres, providers use their injected EntityManager.
|
|
230
|
-
...(isEmbeddedDb() ? { manager: event.manager } : {}),
|
|
231
174
|
};
|
|
232
175
|
if ("entityId" in event && event.entityId) {
|
|
233
176
|
base.entityId = event.entityId;
|
|
@@ -38,9 +38,6 @@ export class CreatedByUpdatedBySubscriber implements EntitySubscriberInterface {
|
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
// NOTE: If re-enabling loadUser below, query via `event.queryRunner.manager`, NOT
|
|
42
|
-
// `this.defaultDataSource.getRepository(...)`. A second connection opened mid-transaction
|
|
43
|
-
// deadlocks single-threaded engines (PGlite).
|
|
44
41
|
// const loadedUser = await this.loadUser(activeUserOrUndefined as unknown as ActiveUserData);
|
|
45
42
|
// if (isInsert) {
|
|
46
43
|
// event.entity.createdBy = loadedUser?.id;
|
|
@@ -21,9 +21,6 @@ export class FieldMetadataSubscriber implements EntitySubscriberInterface<FieldM
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
async afterUpdate(event: UpdateEvent<FieldMetadata>): Promise<void> {
|
|
24
|
-
// NOTE: If re-enabling the block below, use `event.queryRunner.manager` (the active
|
|
25
|
-
// transaction's connection), NOT `this.dataSource.getRepository(...)`. A second
|
|
26
|
-
// connection opened here mid-transaction deadlocks single-threaded engines (PGlite).
|
|
27
24
|
// If a field of type relation.many-to-one is marked for removal, and this field had an inverse relation created
|
|
28
25
|
// It means there is a field of type relation.one-to-many in the co-model, which needs to be removed
|
|
29
26
|
// if (event.entity && event.entity.isMarkedForRemoval && event.entity.type === 'relation' && event.entity.relationType === 'many-to-one' && event.entity.relationCreateInverse === true) {
|