@solidxai/core 0.1.18-beta.1 → 0.1.19-beta.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,685 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.19-beta.0] - 2026-09-28
4
+
5
+ ### Added
6
+
7
+ - add UserViewMetadataController.Create action to metadata cause normal user cannot see the layout switch option on ui
8
+ - add verbose option to seed command for detailed logging
9
+ - add login extension providers for external login checks (#175)
10
+ - enable export functionality in user activity history
11
+ - OAuth auto-provisioning asks the extension user provider for roles too
12
+ - route OAuth auto-provisioning through the extension user provider
13
+ - make dangerous-extension denylist configurable, add svg support
14
+ - add whatsapp provider decorator export
15
+ - add fullName field to OTPSignUpDto and update authentication service to use it
16
+ - create OTP registrations through the extension user provider
17
+ - let seed metadata declare which users are extension users
18
+ - replace signup key-sniffing with an explicit SignupIntent
19
+ - add ModuleIconAssetService to manage module icon installation
20
+ - remove delete button visibility for user activity history
21
+ - implement default value application for required fields in import transactions
22
+ - add default values for required fields in import transactions
23
+ - enhance media type mapping to support multiple categories per extension in MediaFieldCrudManager
24
+ - update media file type definitions to expose only necessary fields for better clarity
25
+ - enhance media type handling by consolidating media file types and updating related services
26
+ - add SecretResolutionController and related DTO for reading secrets safely
27
+ - expose media type mappings and improve field label handling in MediaFieldCrudManager
28
+ - add resolve and resolveMany methods for secret management
29
+ - add normalization utilities for text fields and integrate them into LongTextFieldCrudManager and ShortTextFieldCrudManager
30
+ - implement eager installation of Chromium for Playwright UI tests
31
+ - add security header options for iframe embedding and customize frame-ancestors
32
+ - implement transaction handling for unpublishing records and restore previous version
33
+ - add createdAt field to PostChatterMessageDto and set default in service
34
+ - implement transaction handling for unpublishing records and restore previous version
35
+ - add progress reporting functionality to test runner and reporters
36
+ - add viewWidget attribute for fileSize in metadata
37
+ - add configurable UI timeouts for testing steps and update documentation
38
+ - enhance internationalisation by adding applyCreateDefaults method for localeName on create DTOs
39
+ - implement promoteRecoveredDraftPublishVersion method and integrate with CRUDService for soft-deleted records
40
+ - add default locale name for internationalised entries in test data seeding
41
+ - implement draft/publish versioning support and refactor related services
42
+ - add DraftPublishHelperService for managing draft and publish workflows
43
+ - add workflow field data provider support and related interfaces
44
+ - add asynchronous execution for workflows and enhance execution status retrieval
45
+ - implement WorkflowSecret management with CRUD operations and integrate into workflow execution
46
+ - enhance workflow definition management and add Python runtime node
47
+ - add SolidX integration nodes for login, email, and SMS
48
+ - add support for versioning and publishing in CRUD operations, including new fields in entities and filters
49
+ - enhance http.request node with query parameters and body modes
50
+ - refactor node structure and add sequential and switch nodes
51
+ - update workflow execution and definition handling
52
+ - implement workflow execution services and nodes
53
+ - implement API key generation for system admin users in ModuleMetadataSeederService
54
+ - enhance ModuleMetadataSeederService to generate and store API keys for system admin users
55
+ - add fieldConfig property to DatasourceIntrospectionMappingColumnDto and enhance field sanitization in DatasourceIntrospectionService
56
+ - enhance migration process with build and seed commands
57
+ - enhance datasource introspection with primary key detection and migration support
58
+ - enhance role creation with module linkage and resolve module metadata
59
+ - enhance action, role, and view metadata services with change detection and JSON normalization
60
+ - add introspection services for MSSQL, MySQL, and PostgreSQL
61
+ - add new dashboard controller actions to permissions
62
+ - simplify queue health permissions by consolidating patterns
63
+ - implement explicit widget permissions and unauthorized response handling
64
+ - enhance widget permission checks and add unauthorized response handling
65
+ - add Queue SLA heatmap provider and update metadata
66
+ - update queue health menu item and reorder messages
67
+ - add various dashboard providers and runtime services
68
+ - implement WhatsApp Cloud API integration
69
+ - add gupshup whatsapp provider
70
+ - add deleteByMediaRecord method to MediaStorageProvider implementations
71
+ - add updateCustomNoteMessage action to ChatterMessageController
72
+ - add secure custom-note edit API with attachment add/remove support
73
+ - implemented social media oath for facebook and microsoft
74
+ - add partialUpdate endpoint to menu-item-metadata controller and update metadata seeder relation field name
75
+ - implemented social media oath for facebook and microsoft
76
+ - add Message Tree Action and corresponding view for mqMessage
77
+ - implement processing timeout for RabbitMQ subscriber
78
+ - Add a composite index to `ChatterMessage` on `coModelName` and `coModelEntityId`, and an index to `chatterMessage` in `ChatterMessageDetails`.
79
+ - Migrate date/time transformers to UtcDateTimeTransformer.
80
+ - simplify S3 URL resolution DTO, and remove unused S3 resolution logic.
81
+
82
+ ### Fixed
83
+
84
+ - throw error for missing seeder service in seed command refactor: improve logging behavior in CLI bootstrap process
85
+ - enhance validation error messages for selection fields
86
+ - OTP registration now grants the Internal User baseline role
87
+ - enforce allowPublicRegistration on OTP registration
88
+ - update copy-resources script to include new menu icon and correct resource path
89
+ - update copy-resources script to target the correct directory for media files
90
+ - update build script to include resource copying and add copyfiles dependency
91
+ - remove postinstall script for menu icon installation
92
+ - add postinstall script to ensure menu icon is copied to the correct directory
93
+ - ensure file operations for menu icon are awaited in create and update methods
94
+ - update menuIconUrl to point to the correct image path
95
+ - prevent caching of negative lookups in cache helper and permission metadata service
96
+ - use replaceAll for activeUserId in security rule config
97
+ - remove migration command and related services
98
+ - pass model service to convertImportedRecordToDto and apply defaults in the correct order
99
+ - remove delete permission from metadata configuration
100
+ - remove delete permission from global settings
101
+ - make currentValue optional in CreateModelSequenceDto and update seeding logic to exclude it
102
+ - change matched column type from bit to default nullable boolean
103
+ - improve error message for media deletion restriction
104
+ - use transactions entitymanager for all subscribers only for embedded db projects
105
+ - update consuming project name resolution to use parent directory
106
+ - update solidx directory path to include consuming project name
107
+ - correct package name in model generation command and update error handling in module metadata retrieval
108
+ - username
109
+ - remove type specification for encrypted column in Setting entity, to work in mssql also
110
+ - handle null or empty security rule configuration strings in repository
111
+
112
+ ### Changed
113
+
114
+ - de-duplicate the "ask the extension user provider for roles" lookup
115
+ - rename upsertUserWithRegistrationVerificationTokens to resolveUserForOtpRegistration
116
+ - optimize many-to-many relation loading for audit tracking
117
+ - streamline relation display value resolution and load related model metadata
118
+ - replace inline ShowSoftDeleted enum with imported enum from show-soft-deleted.enum.ts
119
+ - remove ModuleIconAssetService from core module
120
+ - rename applyEntityDefaults to applyImportDefaults for clarity
121
+ - update media type handling in CreateFieldMetadataDto and FieldMetadataService
122
+ - remove onDelete cascade option from ManyToOne relationships in entity definitions
123
+ - unify datetime column types across entities using helper function
124
+ - remove explicit timestamp type for nullable date columns across entities
125
+ - update CommonEntity properties to be optional and adjust types in WorkflowTriggerExecution
126
+ - rename create-draft-publish-helper.service to draft-publish-helper.service and update imports
127
+ - inject InternationalisationHelperService in ModuleTestDataService and CrudHelperService
128
+ - separate generic delete from draft-publish and i18n cleanup in CRUDService
129
+ - remove unused boolean type and related system column definitions from DatasourceIntrospectionService
130
+ - update CrudHelperService to initialize DraftPublishHelperService directly in the class refactor: remove publishedAt sorting logic from getLayout method in ViewMetadataService
131
+ - simplify published version filtering in CRUDService
132
+ - remove handleSeedLocales method to streamline locale seeding process
133
+ - remove legacy dashboard files and add new dashboarding architecture guide
134
+ - remove unused dashboard question and variable providers, SQL expression resolver, and related subscribers
135
+ - remove redundant null check in resolveSecurityRuleConfig
136
+ - update body column type to longText using getColumnType helper in SmsTemplate entity
137
+ - update legacy entity fields to be nullable and support null types
138
+ - replace DTO introspection with explicit isUpdate flag in MediaFieldCrudManager
139
+ - make password scheme and failed login attempt columns non-nullable in UserEntity.
140
+ - make passwordScheme, passwordSchemeVersion, and failedLoginAttempts fields nullable in the User entity.
141
+
142
+ ### Documentation
143
+
144
+ - update expired discord link
145
+
146
+ ### Other
147
+
148
+ - fix for breaking seed
149
+ - add captureRawBody, needed to verify webhook signatures (#177)
150
+ - add captureRawBody, needed to verify webhook signatures
151
+ - data provider return column as object (#176)
152
+ - deprecate POST /user and POST /user/bulk
153
+ - changes to ensure provider roles is used to resolve roles first for password/password less registration paths if an external user provider exists
154
+ - changes to ensure full name is also populated alongwith username
155
+ - cross-tyep uniqueness fix
156
+ - instant logout for access token changes
157
+ - vocabulary docs added
158
+ - removed the secrets read endpoint, since it is not required now
159
+ - renamed variables for better naming
160
+ - changes to ensure path segement parsing is consisten for $res and $data fragements in the ops vocabulary e.g currently $res was not supporting brackets but only . while grabbing data from and object
161
+ - ensure missing secrets show up in the report output so the error is presented alongside the scenario step for clarity
162
+ - `${secret:...}` in the test vocabulary
163
+ - Refactor Chromium installation process and remove eager install script
164
+ - changes
165
+ - ## Phase 6 — Global Multer upload size limit
166
+ - ## Phase 5 — Dangerous-extension checks on menu-icon & settings uploads
167
+ - ## Phase 4 — Route chatter attachments through `MediaFieldCrudManager`
168
+ - ## Phase 3 — Close the `mediaMultiple` size/category gap, and align `validateAllowedExtensions`'s placement
169
+ - ## Phase 2 — Make `mediaTypes` category resolution extension-authoritative
170
+ - Per-field extension allowlist (`mediaAllowedExtensions`)
171
+ - mpin scheme version changes
172
+ - mpin related changes
173
+ - Add safe percent-decoding for uploaded file names to prevent bypassing extension checks
174
+ - Revert "Revert "Deliverable A now stands as: cache TTL (with the store swap that make…""
175
+ - Revert "Deliverable A now stands as: cache TTL (with the store swap that make…"
176
+ - fixes around handling concurrent logins properly using per deviceKey buckets.
177
+ - Deliverable A now stands as: cache TTL (with the store swap that makes it actually work), the me() null guard it necessitates, the logout verify/idempotency fix, previousValidUntil replacing the timer, and the dead validate() removed.
178
+ - fixed the request body limit to keep it as 10mb instead of 25mb by default
179
+ - changes around files name sanitization and normalization
180
+ - changes to handle variations in extension while uploading dangerous extension files
181
+ - change request body max to 25mb
182
+ - Comment out countGroupedRecords method implementation for refactoring
183
+ - show theme toggle
184
+ - rename theme registry
185
+ - remove some unusable code
186
+ - some changes
187
+ - solidx theme settings
188
+ - chagesn to testing readme
189
+ - changes to make ui.expectUrl to wait using the navigation timeout
190
+ - type fixes
191
+ - fixes around playwright context
192
+ - Scenario snap shot changes
193
+ - test run payload changes
194
+ - Testhub test run queue changes
195
+ - Screen shoot changes
196
+ - Test Life Cycle Changes.
197
+ - Testing Hub Changes
198
+ - chagesn to testing readme
199
+ - changes to support passing an explicit createdAt while posting a chatter message
200
+ - Enhance countGroupedRecords and passed internationalisation and draft publish workflow parameters in executeGroupPipeline
201
+ - rename theme registry
202
+ - changes to make ui.expectUrl to wait using the navigation timeout
203
+ - type fixes
204
+ - fixes around playwright context
205
+ - Scenario snap shot changes
206
+ - test run payload changes
207
+ - Testhub test run queue changes
208
+ - Screen shoot changes
209
+ - Test Life Cycle Changes.
210
+ - Testing Hub Changes
211
+ - remove add permisson from permisson-list-view
212
+ - removed indexes on username and mobile since it is a conditional index and it breaks for mssql since multiple nulls are not allowed on unique columns
213
+ - readme changes
214
+ - removed hardcoded type against a boolean type
215
+ - changes to the default testing setting timeout to pick from env as well
216
+ - remove duplicate code
217
+ - refactoring around chatter media security fix
218
+ - add media extension support for post chatter
219
+ - Add media upload action and validation in MediaService
220
+ - add media extension support for post chatter
221
+ - changes to ensure only id and field are returned while populating the user in chatter
222
+ - Update defaultValue types in solid-core-metadata.json to strings
223
+ - 1. changes to ensure user populated for chatter and createdBy/updatedBy has only id and fullName populate 2. Added Exclude at property level on user to exclude sensitive fields by default without having to add an exclude at the class level
224
+ - Add getMentionableUsers permission
225
+ - Add endpoint to retrieve mentionable users with search and limit options
226
+ - Add error handling nodes and enhance workflow node definitions
227
+ - Add skipHooks option to seed command and related services
228
+ - Remove type specification for matched column in WorkflowTriggerExecution entity
229
+ - Enhance workflow node definitions and runtime context handling
230
+ - remvoing redundent code
231
+ - Remove onDelete cascade option from ManyToOne relationships in SavedFilters entity
232
+ - changes
233
+ - changes
234
+ - sql injection vulnerability closed in filter queries
235
+ - Remove LocalPath
236
+ - revert changes
237
+ - revert changes
238
+ - revert changes
239
+ - re revert
240
+ - revert changes
241
+ - private-file-cleanup
242
+ - add downlaodurl
243
+ - changes to allow overriding the is allowed api keys flag thru extension user
244
+ - Revert "user enumeration"
245
+ - remove validation from username and mobile
246
+ - user create validation bugs
247
+ - add normalize for otp based also
248
+ - Disable metadata pruning by default in seed command configuration
249
+ - Update seed command to enable metadata pruning by default
250
+ - handle-case-sensitive-for-email
251
+ - Add delete permissions for ImportTransactionController in solid-core metadata
252
+ - Add permissions for import/export functionality in solid-core metadata
253
+ - Refactor role assignment for admin users to handle capability roles individually
254
+ - discard changes
255
+ - add support for static file
256
+ - Add capability roles for admin users in module metadata seeder
257
+ - Enhance module metadata seeder with event emission for start and finish; add options interface for seeding configuration
258
+ - attachment
259
+ - Add new roles and permissions for import/export functionality; refactor role permission handling
260
+ - make isPublic default true
261
+ - changes to show the image inline
262
+ - cleanup againts media's
263
+ - inline role crate false
264
+ - Implement chatter mention notification system with email templates and queue handling
265
+ - Add messageBodyMentions field to chatter message DTOs and entity
266
+ - fix-audit-bug
267
+ - changes to include signed url token for private media
268
+ - Revert "Revert "rename function name""
269
+ - Revert "Revert "add private media support""
270
+ - Add media file type constants and enhance security for media uploads
271
+ - remove some unusable code
272
+ - some changes
273
+ - handle technical error messages due to missing resource in static resources folder
274
+ - Revert "add private media support"
275
+ - Revert "rename function name"
276
+ - rename function name
277
+ - add private media support
278
+ - some fixes
279
+ - solidx session invalid changes
280
+ - add validation on get chatter message
281
+ - updatedAt value is updating now
282
+ - fix to allow linking a userKey belonging to the parent model while seeding a child model
283
+ - add security against chatter
284
+ - chatter message endpoint made public
285
+ - removed embedded db support
286
+ - Add default sorting by ID if not explicitly specified in order options
287
+ - solidx theme settings
288
+ - add icons across all the models in solid core
289
+ - media upload added behind auth
290
+ - Refactor module path resolution to use kebab-case and extract migration file writing logic into a separate method
291
+ - Implement cleanup for TypeORM datasource entities and enhance file handling in SolidTsMorphService
292
+ - class serializer interceptor added for impact of Exclude and Expose
293
+ - Enhance datasource introspection with primary key validation and user key resolution
294
+ - Concurrent Login Feature
295
+ - user enumeration
296
+ - add helper text key on settings object .........
297
+ - changes to handle case insenstive filter operations if the values are other than string by casting
298
+ - menus item fix
299
+ - changes to ensure entity manager does not get serialized as part of the message for the computed field queue
300
+ - added nodemon heartbeat to allow in-process db query execution for code generation for embedded db
301
+ - display name changed
302
+ - name changed
303
+ - added settings for configure the row click on solid list view
304
+ - Revert "Fix for this issue > stop applying lower for numeric fields."
305
+ - fixed legacy entity files names
306
+ - view metadata type field - selection static and roles required false from menu-item
307
+ - Fix for this issue > stop applying lower for numeric fields.
308
+ - refactor and add migration command
309
+ - Handling for audit subscriber to defer audit publish when in embedded db mode
310
+ - Fixed the one genuine mid-transaction second-connection case and hardened the latent spots (for embedded db)
311
+ - changes to take in option for seeding with modules in current seed method
312
+ - Fix validation logic to parse string field values as integers before applying validations
313
+ - remove computed field from instruction add one remove field command fix many-to-many on chatter log
314
+ - ad changes
315
+ - Add locale seeding functionality and enhance locale management
316
+ - subscribers now use the event’s own transaction connection instead of a second pooled one (helpful for embedded db)
317
+ - changes to avoid extra module checks before dynamically loading it
318
+ - defaulted to modulemetadataseederservice if no seeder provided
319
+ - Add Date field in Instructions Response
320
+ - ai interaction cleanup changes
321
+ - enabling create,edit,import,export on permission and lov modules
322
+ - added module to rolemetadata list view
323
+ - roles group by module changes
324
+ - Refactor dashboard providers to utilize new bucket expression and normalization functions
325
+ - Implement Datasource Management functionality with controller, service, and DTO
326
+ - added index to fields newly added as sortable and searchable
327
+ - Add archiver package to dependencies
328
+ - removed unnecessary seed file
329
+ - Add TypeORM migration helper functions and export in index
330
+ - fixes
331
+ - reverted accidental removal of the layout builder root menu
332
+ - pending cleanup of solid core menu items
333
+ - Refactor metadata: remove standalone menu items and add scheduled jobs and saved filters tree views
334
+ - Remove ChatterMessageDetails and ImportTransactionErrorLog menu items; add Chatter Messages tree view and action. Other menu sub menus cleanup done
335
+ - Add model sequence and list of values tree views to metadata, other cleanup changes
336
+ - changes for IAM
337
+ - Add clearPackageRuntime functionality and corresponding metadata action
338
+ - Add archiver dependency and implement module package export functionality
339
+ - Refactor menu cleanup logic in ModelMetadataService and ModuleMetadataService; improve error handling for file deletion and update build commands in ModulePackageService to use solidctl.
340
+ - Update solid-core-metadata.json to disable create, edit, and delete actions, and set searchable attributes to false for specific fields for media storage provider
341
+ - Add media tree view and action & media view cleanup, enhance file storage provider with file size tracking, implemented storeStreams for s3
342
+ - Remove cleanup procedures for module metadata across all SQL dialects and implement menu and action cleanup in the service layer.
343
+ - Remove unused database bootstrap service and related SQL cleanup procedures
344
+ - cleanup
345
+ - Add view and action metadata tree views with updated permissions and searchable fields
346
+ - Add view and action metadata tree views with updated permissions and searchable fields
347
+ - menu item model cleanup
348
+ - Add resumable import handling and transaction management in module package service
349
+ - Add method to retrieve Solid UI module path and enhance cleanup logging
350
+ - Enhance module metadata seeder: add validation for module name, streamline array handling for scheduled jobs, saved filters, list of values, security rules, sms templates, email templates, menus, actions, views, users, roles, media storage providers, model sequences, and models metadata.
351
+ - Implement module package management: add controller, service, and DTOs for import, export, and build operations.
352
+ - many to one left join issue fixed
353
+ - Refactor field metadata actions and views: update action types, enhance searchability, and adjust permissions for create, edit, and delete operations.
354
+ - Refactor CRUD and model metadata services to enhance group filtering and pagination; streamline response handling and improve query structure. configuration changes to support tree view in model metadata
355
+ - Update solid-core metadata: remove import/export options, rename fields, and add sortable attribute
356
+ - Enhance solid-core metadata structure for module mdtadata by removing import/export options and adding sortable attributes for fields
357
+ - Implement module metadata explorer with CRUD operations and search functionality
358
+ - Refactor module metadata paths to use a consistent directory structure and improve file resolution logic
359
+ - Bug fixs
360
+ - added frontend base url as well to the default settings
361
+ - minor cleanup
362
+ - changes to cleanup legacy table related fields
363
+ - changes for new dashboards functionality
364
+ - always print server startup line regardless of log level
365
+ - Add field quality checks and fixes checklist for backend validation
366
+ - typeo issue
367
+ - Agent table clean up
368
+ - Add manual interaction step for Playwright and update README
369
+ - provision made to unlink data rather than having to teardown everything
370
+ - provision made to unlink data rather than having to teardown everything
371
+ - changes to colour the server startup line
372
+ - Agent table clean up
373
+ - changes to avoid too many initialization logs. controlled thru the verboseBootstrap option to the boostrap helper
374
+ - removed id command options and retained the singular name option only for consistency purposes
375
+ - changes to route genertion commands thru solidctl. The refresh-module & refresh-model commands are what are eventually called and end up calling the services only, keeping calling consistent and ensuring everything is route thru solidctl generate
376
+ - got rid of fieldNamesForRefresh and fieldIdsForRefresh dead chain since it is not used now, due to fields being read in the code builder from the metadata json directly
377
+ - MCP table solid changes
378
+ - playwrite added as dependency instead
379
+ - changes to the test runner
380
+ - chatter message user resolution chagnes
381
+ - bug fix in chatter message user resolution after we moved to queues.
382
+ - moved back to beta3
383
+ - failed login attempts field added to the json and update dto and exposed in entity
384
+ - removed un-necessary index on newvalue display
385
+ - ts changes error: any
386
+ - auto addition of menus happens at the bottom now. list view layout changes for security access rules + enabled delete made welcome email & sms SystemAdminEditable
387
+ - changed model metadata service default form layout to be single column
388
+ - added typing to catch blocks + authentication service bug fixes for private registration flow
389
+ - added typing to catch blocks + authentication service bug fixes for private registration flow
390
+ - normalised @ApiTags
391
+ - enum for passwordless modes
392
+ - bug fix in how alternative actions are rendered
393
+ - queue related bug fixes
394
+ - changes to add a websocket adaptor to the bootstrap server routine
395
+ - license changes
396
+ - type fixes
397
+ - removed min and max from long text mapping
398
+ - bug fix for shortext field mapping
399
+ - changes to post the testing results to a webhook api with a test payload
400
+ - added import multer this fixes un-necessary ts errors in vscode
401
+ - ts errors fixed
402
+ - bug fix in rabbitmq subscriber optimisation in all subscribers to default to role both if not specified
403
+ - formatting changes
404
+ - facebook oauth
405
+ - Status required false
406
+ - updated gitignore
407
+ - dleete un-necessary docs
408
+ - deleted un-necessary files
409
+ - changes related to more grooming
410
+ - api added in cors
411
+ - refactor Oauth strategy
412
+ - Revert "Ft social media login"
413
+ - bug fix
414
+ - bug fix
415
+ - add new api me endpoint and role based settings
416
+ - setting changes for new ui architecture
417
+ - changes for new settings structure
418
+ - chatter task subtype and related changes
419
+ - bug fix
420
+ - fixes
421
+ - changes to get rid of angular schematics for helping with string case transformation for consistency purpose i.e (lodash is being used on frontend too) and avoid edge cases
422
+ - changes to handle import logs as well, thru configured winston log level
423
+ - change isMultiSelect to true in solid-core-metadata.json
424
+ - change isMultiSelect to false and set visibility for cronExpression, dayOfWeek, and dayOfMonth fields to false
425
+ - tightened up queue subscriber interface + fixed core subscribers that were not returning anything. all subscribers must either return a promise or if not async then the actual value
426
+ - removed authTheme setting, auth pages dark - light is now controlled by the same local storage as the rest of the app shell
427
+ - bug fix: passwordless registration should create a user with active false
428
+ - apikeys attribute was not exposed
429
+ - refactor Oauth strategy
430
+ - changes to avoid sending out encrypted setting in api responses. also removed menu item and action entries for ai settings. (temporary fix, since setting ui to be revamped soon)
431
+ - bug fix
432
+ - null check on role
433
+ - made provision to seed custom permissions
434
+ - handled seed scenario too
435
+ - upload File and expectHidden changes
436
+ - extension user cleanup and checks added
437
+ - fixed types for cleanup
438
+ - added tsc-alias as well to ensure clean imports in dist as an extra cleanup measure
439
+ - fixes bare shell imports with relative imports
440
+ - dynamic import fix
441
+ - removed unnecessary file
442
+ - fixes for 1. throw exception if extension user and no provider configured 2. fixed roles method in the extensionUserProvider interface to make it mandatory
443
+ - removed base abstract class
444
+ - added interface too
445
+ - changes
446
+ - changes to test data seeding & fixed the type for authenticationService.signup method
447
+ - changes to user dto to include the api keys toggle
448
+ - add default role to the user only if there are no roles resolved against a user
449
+ - changes to replace current extension user custom user creation logic with the use of dynamic extension user provider. cleans up creation of an extension user
450
+ - Only forward --debug when explicitly enabled.
451
+ - toolOutput field changes to json
452
+ - adding user api key entity to export
453
+ - minor optimisation to how dynamic modules are loaded
454
+ - Add Discord badge to top of README
455
+ - Fix broken BSL license link and add Discord link to README
456
+ - Add BSL 1.1 license and update package.json license field
457
+ - Seed user and roles in testing data
458
+ - removed readme.txt
459
+ - moved type and interfaces in interfaces.ts and refactored accordingly
460
+ - changed to md
461
+ - added readme
462
+ - Ai setting model change
463
+ - changes to allow encrypting setting keys
464
+ - form view clean up
465
+ - Agent table list view changes
466
+ - synchronize false
467
+ - changes to resolve the selection dynamic provider by name and token both
468
+ - changes to bypass swagger urls from csp policy
469
+ - changes to create a seperate endpoint for admin users to generate api key + custom repository created for userApiKey
470
+ - changes to fix issue around isAllowedToGenerateApiKeys not getting saved during user creation
471
+ - changes to implement the sso code and sso exchange use cases
472
+ - removed orm types / exported api key entity
473
+ - added provision to control if api key creation is allowed for the user
474
+ - api key changes for backend
475
+ - changes to bootstrap helper to read from standard env variables and avoid redundantly passing swagger options
476
+ - fix to call addRoles only if role names are present
477
+ - Revert "revert: refactor: update legacy entity fields to be nullable and support null types"
478
+ - refactor: update legacy entity fields to be nullable and support null types
479
+ - Json structure change
480
+ - Agent table metadata clean up changes
481
+ - longtext
482
+ - longtext changes
483
+ - Agent tables clean up
484
+ - fixes to seed many-to-many relation for tests
485
+ - changes to seed media in testing data
486
+ - Chatter modelUserkey and excel many to one issue
487
+ - keeping the default selectionValueType as string since this is a good default
488
+ - bug fixes around how media is done
489
+ - bug fixes
490
+ - try catch inside logEvent
491
+ - media has card based metadata
492
+ - Refresh token activity
493
+ - changes to implement the sso code and sso exchange use cases
494
+ - cleanup
495
+ - enabled kanban view on mq message
496
+ - Agent table changes
497
+ - changes to disallow deleting a model or module in production
498
+ - changelog version bumped
499
+ - changelog added
500
+ - changes to control the logging using env variables & set appropriate defaults basis environment
501
+ - chnages for logging
502
+ - Chatter queue fixs
503
+ - one more "beta" for ozzy
504
+ - additional loggging in cors helper
505
+ - changes
506
+ - Redis Queue component and rabbitMQ folder changes
507
+ - changes to track old and new fields as part of the delete entity operation
508
+ - optimizations done for audit subcriber
509
+ - changes to optimize audit subscriber code to use background jobs entirely instead of partially
510
+ - changes to push all work/processing to the chatter queue subscriber to better manage workloads & db pooling utilization
511
+ - formatting changes
512
+ - performance optimisations 1. created by updated by subscriber is not querying users again and again 2. rabbit pub / sub can now optinally switch off db persistence
513
+ - qs depth config increased
514
+ - changes to move the shouldTrackAudit check into registry to avoid unnecessary checks during runtime
515
+ - cached model metadata queries
516
+ - changse
517
+ - disabled extra loggign
518
+ - chagnes
519
+ - reduced concurrency in computed fields
520
+ - additional loggign
521
+ - added indexes to mobile & email since those are frequently queries upon
522
+ - changes to optimize the permission service methods used in the hotspot load paths within auth and access token guards
523
+ - Redis background job changes
524
+ - Chatter Rationalizing
525
+ - changes
526
+ - changes
527
+ - changes to merge the entityId sequence computed provider into the existing sequence number provider
528
+ - changes to export bootstrap helpers for server & cli nest applications
529
+ - changes to toggle the validation for selection dynamic provider. Also changes to export a bootstrap helper function
530
+ - registered the EntityIdSequenceNumComputedFieldProvider computation provider as a nest provider
531
+ - Added EntityIdSequenceNumComputedFieldProvider as an alternative simpler provider which uses the modelSequence configuration and relies on the id persisted during creation for an entity
532
+ - added index on message id in mq message table
533
+ - changes around sequence num computed field being a post computation provider error logging in rabbit mq
534
+ - changes to save model sequence id as part of post compute instead of pre compute
535
+ - changse
536
+ - Revert "High concurrency fix for alpha num and sequence num computed fields"
537
+ - High concurrency fix for alpha num and sequence num computed fields
538
+ - bug fix in cron evalutaion
539
+ - tighter logging around roles
540
+ - scheduler now supports env based specific jobs starting and others not
541
+ - reverting back to text (i.e since it is good enough for mysql too) i.e 64kb for these fields
542
+ - revert cross db changes for view-metadata-entity
543
+ - fixes
544
+ - changes to handle cross-db compatibility
545
+ - added type as simple-json
546
+ - Remove isValidateForUpdate hack that relied on checking dto.id !== undefined
547
+ - Revert "Merge branch 'media-update' into 'main'"
548
+ - Mysql related changes
549
+ - ts-morph and media storage fix
550
+ - dashboard layout menu item added
551
+ - dashboard changes
552
+ - scheduler bug fix
553
+ - made provision to execute scheduled jobs manually
554
+ - changes
555
+ - cleanup
556
+ - logging related changes and made user activity history tree view
557
+ - changes to return the wall clock time as utc for chatter as well to keep it...
558
+ - changes around dashboard question refactoring
559
+ - default tree view and action added on code generation
560
+ - Date time format changes in audit
561
+ - user activity history on otp login
562
+ - changes
563
+ - changelog added
564
+ - reverted legacy and common entity to use local date time transformer only
565
+ - added changelog
566
+ - made playwright dependency lazy
567
+ - ai interaction table user is nullable now
568
+ - rabbitmq subscriber does a prefetch now allowing for more concurrency
569
+ - formatting changes
570
+ - Version info changes
571
+ - dummy otp can now be enabled on a per user basis
572
+ - jwt token optimisation
573
+ - optimised the authentication flow in microservice adapter to cache access token
574
+ - deleted file containing secrets
575
+ - changes
576
+ - optimisation around how dummy otp is managed
577
+ - isSeeded added
578
+ - bug fix for fetch layouts
579
+ - view modes added in layout
580
+ - One to many crud manager fixes
581
+ - one-to-many-crud-manager-fixes
582
+ - Many to many crud field manager fixes
583
+ - patch endpoint added in role controller
584
+ - many-to-many field fixes
585
+ - modelSequenceFormViewChangeHandler added on field change
586
+ - changes to convert the passwordlessRegistrationValidateWhat from array to string
587
+ - changes to format group values consistently
588
+ - fixes for normalizing group values
589
+ - Revert "changes to return groupValue in the group meta response as well. groupValue is..."
590
+ - changes to return groupValue in the group meta response as well. groupValue is...
591
+ - changes to return groupValue in the group meta response as well. groupValue is...
592
+ - filter_field_granularity_supported_added_for_date_fields
593
+ - password registration/login cleanup + max failed login attempts checks added
594
+ - removed unsafe inline from CSP
595
+ - removed incorrect comment
596
+ - changes
597
+ - Revert "replaced playwright with lazy dependency"
598
+ - replaced playwright with lazy dependency
599
+ - count and average
600
+ - fixes to solid core metadata configuration
601
+ - make `s3Key` and `isPrivate` properties mandatory in `ResolveS3UrlDto`.
602
+ - solid seed now prints proper exception stack trace
603
+ - added playwright dependencies as peer dependencies
604
+ - changed playwright import to make it lazy
605
+ - issue fixes
606
+ - formatting changes
607
+ - formatting changes
608
+ - changes for test setup
609
+ - package changes
610
+ - Changes to generate an SA user with the default password for simpler experience during setup
611
+ - more changes to support form data based uploads
612
+ - changes
613
+ - changes around testing workflow
614
+ - unified testing utitlities
615
+ - added comments to the slug code
616
+ - refactored queue namespacign
617
+ - queue namespacing related chanes
618
+ - removed todo
619
+ - queue name related changes
620
+ - cag
621
+ - changrs
622
+ - queues names are now namespaced by service naem
623
+ - enabled logs
624
+ - debug logs
625
+ - testing docs updated
626
+ - changes
627
+ - cleanup
628
+ - removed old testing related fiels
629
+ - testing infra now supports data based interpolation
630
+ - testing changes: now we support fully custom test specs
631
+ - changes for test automation
632
+ - changes to tsconfig for playwright tests
633
+ - exporting typeorm db helper
634
+ - removed the files section
635
+ - changes for playwright testing
636
+ - changes to disable service controller seed method
637
+ - formatting changes
638
+ - oom issue
639
+ - logger added for chatter
640
+ - changed arg to kebab case instead of came case in schematic service
641
+ - default menu icons added
642
+ - rabbitmq subscriber: add retries, DLX queues, reconnects, and docs
643
+ - removed un-necessary log
644
+ - fix for handling non existence of fieldNamesForRemoval arg
645
+ - foirmatting canges
646
+ - Archived/solidstarters main
647
+ - version changes
648
+ - changed org : @solidstarters -> @solidxai
649
+ - removed publish script, since it is replaced with solidctl release
650
+ - chanes
651
+ - Revert "@solidstarters namespace changed to @solidx"
652
+ - @solidstarters namespace changed to @solidx
653
+ - file service interface changes
654
+ - CR in s3 file service, url options now supports isPrivateBucket allowing one to generate signed and un-signed URLs using the getUrl method
655
+ - changes to the publish script to support: 1.reverse merging main to dev to ensure latest package version is synced with dev post publish. 2. added guardrail to allow publishing from main branch only 3. added dry run option and force option i.e (in case we want to publish from another branch, but is hidden) 4. script now pushes the git version tags as well
656
+ - changes to pass minimal parameters to the schematics project and pick the rest from the metadata configuration json file (avoid long shell commands)
657
+ - test data workflow
658
+ - test-data command
659
+ - seed command updated
660
+ - changes
661
+ - changes
662
+ - seed command changes to support pruning, test-data-setup and test-data-teardown.
663
+ - seeding now supports seedData allowing us to seed fixtures for testing.
664
+ - precomputations now skip computation if value is already provided
665
+ - added utility for findOneByUserKey
666
+ - pruning related chagnes
667
+ - changes
668
+ - more changes related to pruning metadata
669
+ - pruen logs added
670
+ - module metadata seeder now does prune also
671
+ - reformatting to improve readability
672
+ - changes
673
+ - file type not allowed. Allowed: image, document, pdf. Received mimetype: application/pdf (mapped to file)
674
+ - bug fixes
675
+ - changes to cleanup the implementation by having the write method of file service return the url post write
676
+ - changes to support using the region specified in a media storage provider, instead only the default while creating an s3 client
677
+ - fixes for using the default-aws-s3 bucket for storing the settings media if default file service is s3
678
+ - changes to settings media storage logic i.e copy multer path to file service implementation write
679
+ - file service abstraction cleanup
680
+ - chagnes
681
+ - Dashboard Question Responsive
682
+
3
683
  ## [0.1.18-beta.1] - 2026-09-21
4
684
 
5
685
  ### Added
@@ -5,6 +5,7 @@ interface SeedCommandOptions {
5
5
  modulesToSeed?: string;
6
6
  prune?: boolean;
7
7
  skipHooks?: boolean;
8
+ verbose?: boolean;
8
9
  }
9
10
  export declare class SeedCommand extends CommandRunner {
10
11
  private readonly solidRegistry;
@@ -15,6 +16,7 @@ export declare class SeedCommand extends CommandRunner {
15
16
  parseString(val: string): string;
16
17
  parsePrune(): boolean;
17
18
  parseSkipHooks(): boolean;
19
+ parseVerbose(): boolean;
18
20
  }
19
21
  export {};
20
22
  //# sourceMappingURL=seed.command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"seed.command.d.ts","sourceRoot":"","sources":["../../src/commands/seed.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,UAAU,kBAAkB;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,qBACa,WAAY,SAAQ,aAAa;IAGhC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAF1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgC;gBAE1B,aAAa,EAAE,aAAa;IAInD,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAyD7E,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAKvC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAKhC,UAAU,IAAI,OAAO;IAKrB,cAAc,IAAI,OAAO;CAG1B"}
1
+ {"version":3,"file":"seed.command.d.ts","sourceRoot":"","sources":["../../src/commands/seed.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,UAAU,kBAAkB;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qBACa,WAAY,SAAQ,aAAa;IAGhC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAF1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgC;gBAE1B,aAAa,EAAE,aAAa;IAInD,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAwD7E,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAKvC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAKhC,UAAU,IAAI,OAAO;IAKrB,cAAc,IAAI,OAAO;IAKzB,YAAY,IAAI,OAAO;CAGxB"}
@@ -63,8 +63,7 @@ let SeedCommand = SeedCommand_1 = class SeedCommand extends nest_commander_1.Com
63
63
  .map((seeder) => seeder.instance)
64
64
  .pop();
65
65
  if (!seeder) {
66
- this.logger.error(`Seeder service ${options.seeder} not found. Does your service have a seed() method?`);
67
- return;
66
+ throw new Error(`Seeder service ${options.seeder} not found. Does your service have a seed() method?`);
68
67
  }
69
68
  this.logger.log(`Running the seed() method for seeder: ${seeder.constructor.name}`);
70
69
  await seeder.seed(parsedConf);
@@ -81,6 +80,9 @@ let SeedCommand = SeedCommand_1 = class SeedCommand extends nest_commander_1.Com
81
80
  parseSkipHooks() {
82
81
  return true;
83
82
  }
83
+ parseVerbose() {
84
+ return true;
85
+ }
84
86
  };
85
87
  exports.SeedCommand = SeedCommand;
86
88
  __decorate([
@@ -107,6 +109,12 @@ __decorate([
107
109
  __metadata("design:paramtypes", []),
108
110
  __metadata("design:returntype", Boolean)
109
111
  ], SeedCommand.prototype, "parseSkipHooks", null);
112
+ __decorate([
113
+ (0, nest_commander_1.Option)({ flags: '-v, --verbose', description: 'Show detailed Nest/Winston logs during seeding.' }),
114
+ __metadata("design:type", Function),
115
+ __metadata("design:paramtypes", []),
116
+ __metadata("design:returntype", Boolean)
117
+ ], SeedCommand.prototype, "parseVerbose", null);
110
118
  exports.SeedCommand = SeedCommand = SeedCommand_1 = __decorate([
111
119
  (0, nest_commander_1.Command)({ name: 'seed', description: 'Install seed data for a given module' }),
112
120
  __metadata("design:paramtypes", [solid_registry_1.SolidRegistry])
@@ -1 +1 @@
1
- {"version":3,"file":"seed.command.js","sourceRoot":"","sources":["../../src/commands/seed.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAwC;AACxC,mDAAgE;AAChE,8DAA2D;AAWpD,IAAM,WAAW,mBAAjB,MAAM,WAAY,SAAQ,8BAAa;IAG5C,YAA6B,aAA4B;QACvD,KAAK,EAAE,CAAC;QADmB,kBAAa,GAAb,aAAa,CAAe;QAFxC,WAAM,GAAG,IAAI,eAAM,CAAC,aAAW,CAAC,IAAI,CAAC,CAAC;IAIvD,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,WAAqB,EAAE,OAA4B;QAC3D,IAAI,UAAU,GAAuC,IAAI,CAAC;QAC1D,IAAI,OAAO,EAAE,aAAa,EAAE,CAAC;YAC3B,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa;iBACxC,KAAK,CAAC,GAAG,CAAC;iBACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;iBACpB,MAAM,CAAC,OAAO,CAAC,CAAC;YACnB,UAAU,GAAG;gBACX,aAAa;gBACb,aAAa,EAAE,KAAK;gBACpB,kBAAkB,EAAE,IAAI;gBACxB,SAAS,EAAE,KAAK;aACjB,CAAC;YACF,IAAI,CAAC,MAAM,C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MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAChC,CAAC;IAOD,kBAAkB,CAAC,GAAW;QAC5B,OAAO,GAAG,CAAC;IACb,CAAC;IAGD,WAAW,CAAC,GAAW;QACrB,OAAO,GAAG,CAAC;IACb,CAAC;IAGD,UAAU;QACR,OAAO,IAAI,CAAC;IACd,CAAC;IAGD,cAAc;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AAlFY,kCAAW;AAgEtB;IADC,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,sCAAsC,EAAE,WAAW,EAAE,+CAA+C,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;;;qDAGxI;AAGD;IADC,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,4BAA4B,EAAE,WAAW,EAAE,oBAAoB,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,6BAA6B,EAAE,CAAC;;;;8CAG/I;AAGD;IADC,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;;;;6CAGhF;AAGD;IADC,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,8DAA8D,EAAE,CAAC;;;;iDAG9G;sBAjFU,WAAW;IADvB,IAAA,wBAAO,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;qCAIjC,8BAAa;GAH9C,WAAW,CAkFvB","sourcesContent":["import { Logger } from '@nestjs/common';\nimport { Command, CommandRunner, Option } from 'nest-commander';\nimport { SolidRegistry } from 'src/helpers/solid-registry';\nimport { ModuleMetadataSeederOptions } from 'src/interfaces';\n\ninterface SeedCommandOptions {\n seeder?: string;\n modulesToSeed?: string;\n prune?: boolean;\n skipHooks?: boolean;\n}\n\n@Command({ name: 'seed', description: 'Install seed data for a given module' })\nexport class SeedCommand extends CommandRunner {\n private readonly logger = new Logger(SeedCommand.name);\n\n constructor(private readonly solidRegistry: SolidRegistry) {\n super();\n }\n\n async run(passedParam: string[], options?: SeedCommandOptions): Promise<void> {\n let parsedConf: ModuleMetadataSeederOptions | null = null;\n if (options?.modulesToSeed) {\n const modulesToSeed = options.modulesToSeed\n .split(',')\n .map((m) => m.trim())\n .filter(Boolean);\n parsedConf = {\n modulesToSeed,\n pruneMetadata: false,\n seedGlobalMetadata: true,\n skipHooks: false,\n };\n this.logger.log(`Modules to seed: ${modulesToSeed.join(', ')}`);\n } else {\n this.logger.log('No --modules-to-seed flag provided. Running with default seeder behavior.');\n }\n\n if (options?.prune) {\n parsedConf = parsedConf ?? {\n modulesToSeed: null,\n pruneMetadata: false,\n seedGlobalMetadata: true,\n skipHooks: false,\n };\n parsedConf.pruneMetadata = true;\n }\n\n if (options?.skipHooks) {\n parsedConf = parsedConf ?? {\n modulesToSeed: null,\n pruneMetadata: false,\n seedGlobalMetadata: true,\n skipHooks: false,\n };\n parsedConf.skipHooks = true;\n this.logger.log('Skipping pre-seed and post-seed hooks.');\n }\n\n const seeder = this.solidRegistry\n .getSeeders()\n .filter((seeder) => seeder.name === options.seeder)\n .map((seeder) => seeder.instance)\n .pop();\n if (!seeder) {\n this.logger.error(`Seeder service ${options.seeder} not found. Does your service have a seed() method?`);\n return;\n }\n this.logger.log(`Running the seed() method for seeder: ${seeder.constructor.name}`);\n await seeder.seed(parsedConf);\n }\n\n /**\n * This parameter will be useful, to support seeders with the same name in different modules\n * Currently the seeder service won't support seeder with same classname within a module\n **/\n @Option({ flags: '-m, --modules-to-seed [module names]', description: 'Comma-separated list of module names to seed.', required: false })\n parseModulesToSeed(val: string): string {\n return val;\n }\n\n @Option({ flags: '-s, --seeder [seeder name]', description: 'The seeder to run.', required: true, defaultValue: 'ModuleMetadataSeederService' })\n parseString(val: string): string {\n return val;\n }\n\n @Option({ flags: '--prune', description: 'Prune metadata not present in JSON.' })\n parsePrune(): boolean {\n return true;\n }\n\n @Option({ flags: '--skip-hooks', description: 'Skip emitting pre-seed and post-seed lifecycle hooks/events.' })\n parseSkipHooks(): boolean {\n return true;\n }\n}\n"]}
1
+ {"version":3,"file":"seed.command.js","sourceRoot":"","sources":["../../src/commands/seed.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAwC;AACxC,mDAAgE;AAChE,8DAA2D;AAYpD,IAAM,WAAW,mBAAjB,MAAM,WAAY,SAAQ,8BAAa;IAG5C,YAA6B,aAA4B;QACvD,KAAK,EAAE,CAAC;QADmB,kBAAa,GAAb,aAAa,CAAe;QAFxC,WAAM,GAAG,IAAI,eAAM,CAAC,aAAW,CAAC,IAAI,CAAC,CAAC;IAIvD,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,WAAqB,EAAE,OAA4B;QAC3D,IAAI,UAAU,GAAuC,IAAI,CAAC;QAC1D,IAAI,OAAO,EAAE,aAAa,EAAE,CAAC;YAC3B,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa;iBACxC,KAAK,CAAC,GAAG,CAAC;iBACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;iBACpB,MAAM,CAAC,OAAO,CAAC,CAAC;YACnB,UAAU,GAAG;gBACX,aAAa;gBACb,aAAa,EAAE,KAAK;gBACpB,kBAAkB,EAAE,IAAI;gBACxB,SAAS,EAAE,KAAK;aACjB,CAAC;YACF,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAClE,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,2EAA2E,CAAC,CAAC;QAC/F,CAAC;QAED,IAAI,OAAO,EAAE,KAAK,EAAE,CAAC;YACnB,UAAU,GAAG,UAAU,IAAI;gBACzB,aAAa,EAAE,IAAI;gBACnB,aAAa,EAAE,KAAK;gBACpB,kBAAkB,EAAE,IAAI;gBACxB,SAAS,EAAE,KAA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AAE,KAAK,EAAE,sCAAsC,EAAE,WAAW,EAAE,+CAA+C,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;;;qDAGxI;AAGD;IADC,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,4BAA4B,EAAE,WAAW,EAAE,oBAAoB,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,6BAA6B,EAAE,CAAC;;;;8CAG/I;AAGD;IADC,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;;;;6CAGhF;AAGD;IADC,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,8DAA8D,EAAE,CAAC;;;;iDAG9G;AAGD;IADC,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,iDAAiD,EAAE,CAAC;;;;+CAGlG;sBArFU,WAAW;IADvB,IAAA,wBAAO,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;qCAIjC,8BAAa;GAH9C,WAAW,CAsFvB","sourcesContent":["import { Logger } from '@nestjs/common';\nimport { Command, CommandRunner, Option } from 'nest-commander';\nimport { SolidRegistry } from 'src/helpers/solid-registry';\nimport { ModuleMetadataSeederOptions } from 'src/interfaces';\n\ninterface SeedCommandOptions {\n seeder?: string;\n modulesToSeed?: string;\n prune?: boolean;\n skipHooks?: boolean;\n verbose?: boolean;\n}\n\n@Command({ name: 'seed', description: 'Install seed data for a given module' })\nexport class SeedCommand extends CommandRunner {\n private readonly logger = new Logger(SeedCommand.name);\n\n constructor(private readonly solidRegistry: SolidRegistry) {\n super();\n }\n\n async run(passedParam: string[], options?: SeedCommandOptions): Promise<void> {\n let parsedConf: ModuleMetadataSeederOptions | null = null;\n if (options?.modulesToSeed) {\n const modulesToSeed = options.modulesToSeed\n .split(',')\n .map((m) => m.trim())\n .filter(Boolean);\n parsedConf = {\n modulesToSeed,\n pruneMetadata: false,\n seedGlobalMetadata: true,\n skipHooks: false,\n };\n this.logger.log(`Modules to seed: ${modulesToSeed.join(', ')}`);\n } else {\n this.logger.log('No --modules-to-seed flag provided. Running with default seeder behavior.');\n }\n\n if (options?.prune) {\n parsedConf = parsedConf ?? {\n modulesToSeed: null,\n pruneMetadata: false,\n seedGlobalMetadata: true,\n skipHooks: false,\n };\n parsedConf.pruneMetadata = true;\n }\n\n if (options?.skipHooks) {\n parsedConf = parsedConf ?? {\n modulesToSeed: null,\n pruneMetadata: false,\n seedGlobalMetadata: true,\n skipHooks: false,\n };\n parsedConf.skipHooks = true;\n this.logger.log('Skipping pre-seed and post-seed hooks.');\n }\n\n const seeder = this.solidRegistry\n .getSeeders()\n .filter((seeder) => seeder.name === options.seeder)\n .map((seeder) => seeder.instance)\n .pop();\n if (!seeder) {\n throw new Error(`Seeder service ${options.seeder} not found. Does your service have a seed() method?`);\n }\n this.logger.log(`Running the seed() method for seeder: ${seeder.constructor.name}`);\n await seeder.seed(parsedConf);\n }\n\n /**\n * This parameter will be useful, to support seeders with the same name in different modules\n * Currently the seeder service won't support seeder with same classname within a module\n **/\n @Option({ flags: '-m, --modules-to-seed [module names]', description: 'Comma-separated list of module names to seed.', required: false })\n parseModulesToSeed(val: string): string {\n return val;\n }\n\n @Option({ flags: '-s, --seeder [seeder name]', description: 'The seeder to run.', required: true, defaultValue: 'ModuleMetadataSeederService' })\n parseString(val: string): string {\n return val;\n }\n\n @Option({ flags: '--prune', description: 'Prune metadata not present in JSON.' })\n parsePrune(): boolean {\n return true;\n }\n\n @Option({ flags: '--skip-hooks', description: 'Skip emitting pre-seed and post-seed lifecycle hooks/events.' })\n parseSkipHooks(): boolean {\n return true;\n }\n\n @Option({ flags: '-v, --verbose', description: 'Show detailed Nest/Winston logs during seeding.' })\n parseVerbose(): boolean {\n return true;\n }\n}\n"]}
@@ -12,6 +12,7 @@ export interface SolidBootstrapOptions {
12
12
  security?: SolidSecurityOptions;
13
13
  verboseBootstrap?: boolean;
14
14
  bodyLimit?: string;
15
+ captureRawBody?: boolean;
15
16
  }
16
17
  export declare function bootstrapSolidApp(appModuleFactory: () => Promise<any>, options?: SolidBootstrapOptions): Promise<NestExpressApplication>;
17
18
  export declare function bootstrapSolidCli(appModuleFactory: () => Promise<any>): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.helper.d.ts","sourceRoot":"","sources":["../../src/helpers/bootstrap.helper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAalE,OAAO,EAGL,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAyB3B,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IAEpC,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,EAAE,mBAAmB,GAAG,KAAK,CAAC;IAEtC,0BAA0B,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAE9D,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAEhC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAU3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAeD,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,EACpC,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,sBAAsB,CAAC,CAgJjC;AAgBD,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,GACnC,OAAO,CAAC,IAAI,CAAC,CAwCf"}
1
+ {"version":3,"file":"bootstrap.helper.d.ts","sourceRoot":"","sources":["../../src/helpers/bootstrap.helper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAalE,OAAO,EAGL,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAyB3B,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IAEpC,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,EAAE,mBAAmB,GAAG,KAAK,CAAC;IAEtC,0BAA0B,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAE9D,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAEhC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAU3B,SAAS,CAAC,EAAE,MAAM,CAAC;IAYnB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAeD,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,EACpC,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,sBAAsB,CAAC,CAuJjC;AAgBD,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,GACnC,OAAO,CAAC,IAAI,CAAC,CA4Cf"}
@@ -36,11 +36,12 @@ function registerGlobalProcessHandlers() {
36
36
  }
37
37
  async function bootstrapSolidApp(appModuleFactory, options = {}) {
38
38
  registerGlobalProcessHandlers();
39
- const { globalPrefix = 'api', swagger = {}, permissionsPolicyOverrides = {}, security = {}, verboseBootstrap = false, bodyLimit = '10mb', } = options;
39
+ const { globalPrefix = 'api', swagger = {}, permissionsPolicyOverrides = {}, security = {}, verboseBootstrap = false, bodyLimit = '10mb', captureRawBody = false, } = options;
40
40
  const startTime = Date.now();
41
41
  const appModule = await appModuleFactory();
42
42
  const app = await core_1.NestFactory.create(appModule, {
43
43
  bodyParser: false,
44
+ rawBody: captureRawBody,
44
45
  logger: nest_winston_1.WinstonModule.createLogger({ ...(0, winston_logger_1.createWinstonLoggerConfig)(), level: verboseBootstrap ? 'debug' : 'error' }),
45
46
  });
46
47
  const apiEnabled = (0, environment_helper_1.parseBooleanEnv)('API_ENABLED', true);
@@ -140,12 +141,12 @@ async function bootstrapSolidCli(appModuleFactory) {
140
141
  if (idx !== -1)
141
142
  process.argv.splice(idx, 1);
142
143
  }
143
- const appModule = await appModuleFactory();
144
- process.env.SOLID_CLI_RUNNING = 'true';
145
- const app = await nest_commander_1.CommandFactory.createWithoutRunning(appModule, {
146
- logger: showLogs ? ['debug', 'error', 'fatal', 'log', 'verbose', 'warn'] : false,
147
- });
148
144
  try {
145
+ const appModule = await appModuleFactory();
146
+ process.env.SOLID_CLI_RUNNING = 'true';
147
+ const app = await nest_commander_1.CommandFactory.createWithoutRunning(appModule, {
148
+ logger: showLogs ? ['debug', 'error', 'fatal', 'log', 'verbose', 'warn'] : ['error', 'fatal'],
149
+ });
149
150
  await nest_commander_1.CommandFactory.runApplication(app);
150
151
  }
151
152
  catch (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.helper.js","sourceRoot":"","sources":["../../src/helpers/bootstrap.helper.ts"],"names":[],"mappings":";;;;;AAuFA,8CAmJC;AAgBD,8CA0CC;AApSD,2CAA4E;AAC5E,uCAAsD;AAEtD,qDAAgD;AAChD,6CAAiE;AAEjE,oDAA4B;AAC5B,4CAAoB;AACpB,2BAAgC;AAChC,+BAA+B;AAC/B,+CAA2E;AAC3E,mDAAgD;AAChD,sDAA8D;AAC9D,yFAAoF;AACpF,+CAAwD;AACxD,uDAK2B;AAC3B,6DAAuD;AAIvD,SAAS,6BAA6B;IACpC,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;QACnD,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;I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MAAM,GAAG,GAAG,MAAM,+BAAc,CAAC,oBAAoB,CAAC,SAAS,EAAE;QAC/D,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK;KACjF,CAAC,CAAC;IAEH,IAAI,CAAC;QACH,MAAM,+BAAc,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,CAAC,CAAC,CAAC;QACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC","sourcesContent":["import { ClassSerializerInterceptor, ValidationPipe } from '@nestjs/common';\nimport { NestFactory, Reflector } from '@nestjs/core';\nimport { NestExpressApplication } from '@nestjs/platform-express';\nimport { WsAdapter } from '@nestjs/platform-ws';\nimport { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';\nimport { NextFunction, Request, Response } from 'express';\nimport helmet from 'helmet';\nimport qs from 'qs';\nimport { existsSync } from 'fs';\nimport { resolve } from 'path';\nimport { WINSTON_MODULE_NEST_PROVIDER, WinstonModule } from 'nest-winston';\nimport { CommandFactory } from 'nest-commander';\nimport { createWinstonLoggerConfig } from '../winston.logger';\nimport { WrapResponseInterceptor } from '../interceptors/wrap-response.interceptor';\nimport { buildDefaultCorsOptions } from './cors.helper';\nimport {\n buildDefaultSecurityHeaderOptions,\n buildPermissionsPolicyHeader,\n PermissionsPolicyConfig,\n SolidSecurityOptions,\n} from './security.helper';\nimport { parseBooleanEnv } from './environment.helper';\n\n// ---- Shared process handlers ----\n\nfunction registerGlobalProcessHandlers() {\n process.on('unhandledRejection', (reason, promise) => {\n console.error('Unhandled Rejection at:', promise, 'reason:', reason);\n });\n\n process.on('uncaughtException', (err) => {\n console.error('Uncaught Exception thrown:', err);\n });\n\n // Suppress pg deprecation warning caused by TypeORM's internal query scheduling\n process.on('warning', (warning) => {\n if (warning.name === 'DeprecationWarning' && (warning.message.includes('client.query()') || warning.message.includes('punycode'))) {\n return;\n }\n console.warn(warning);\n });\n}\n\n// ---- HTTP server bootstrap ----\n\nexport interface SolidSwaggerOptions {\n title?: string;\n description?: string;\n version?: string;\n}\n\nexport interface SolidBootstrapOptions {\n /** Global API prefix. Defaults to 'api'. Set to '' to disable. */\n globalPrefix?: string;\n /** Swagger configuration. Set to false to disable Swagger entirely. */\n swagger?: SolidSwaggerOptions | false;\n /** Permissions-Policy header overrides (merged with defaults). */\n permissionsPolicyOverrides?: Partial<PermissionsPolicyConfig>;\n /** Security header overrides, including iframe frame-ancestor allowlists. */\n security?: SolidSecurityOptions;\n /** Show full NestJS init logs during bootstrap (route mapping, module deps, pollers). Defaults to false. */\n verboseBootstrap?: boolean;\n /**\n * Max request body size for JSON and urlencoded payloads, as a `bytes`-compatible\n * string (e.g. '10mb', '512kb'). Defaults to '10mb'.\n *\n * Does NOT apply to multipart/form-data uploads: body-parser matches on Content-Type,\n * so multipart requests skip these parsers entirely and are handled by Multer. Raise\n * this only for large structured JSON (e.g. /bulk arrays), bearing in mind the parsed\n * object graph can retain several times the raw byte size.\n */\n bodyLimit?: string;\n}\n\n/**\n * Bootstraps a SolidX NestJS HTTP application with sensible defaults:\n * security headers, CORS, Winston logger, ValidationPipe,\n * WrapResponseInterceptor, qs deep query parsing, Swagger, and the\n * pg BIGINT type parser.\n *\n * @example\n * // main.ts\n * bootstrapSolidApp(() => AppModule.forRoot(), {\n * swagger: { title: 'My API', description: 'My API description' },\n * security: { frameAncestors: [\"'self'\", 'https://portal.example.com'] },\n * });\n */\nexport async function bootstrapSolidApp(\n appModuleFactory: () => Promise<any>,\n options: SolidBootstrapOptions = {},\n): Promise<NestExpressApplication> {\n registerGlobalProcessHandlers();\n\n const {\n globalPrefix = 'api',\n swagger = {},\n permissionsPolicyOverrides = {},\n security = {},\n verboseBootstrap = false,\n bodyLimit = '10mb',\n } = options;\n\n const startTime = Date.now();\n const appModule = await appModuleFactory();\n const app = await NestFactory.create<NestExpressApplication>(appModule, {\n // Nest's default parsers are registered during init() with a 100kb limit, ahead of\n // any module middleware. Disable them so the parsers below own the limit outright.\n bodyParser: false,\n logger: WinstonModule.createLogger({ ...createWinstonLoggerConfig(), level: verboseBootstrap ? 'debug' : 'error' }),\n });\n\n const apiEnabled = parseBooleanEnv('API_ENABLED', true);\n\n if (!apiEnabled) {\n await app.init();\n app\n .get(WINSTON_MODULE_NEST_PROVIDER)\n .log('API server disabled via API_ENABLED=false. Skipping HTTP listen.', 'Bootstrap');\n return app;\n }\n\n // Health check at root path\n const server = app.getHttpAdapter().getInstance();\n server.get('/', (_req, res) => res.status(200).send('SOLID OK'));\n\n // Security headers\n app.use(helmet(buildDefaultSecurityHeaderOptions(security)));\n\n // Nest's Swagger UI HTML injects inline styles; keep CSP strict elsewhere.\n const isSwaggerPath = (path: string) =>\n path === '/docs' ||\n path === '/docs/' ||\n path.startsWith('/docs/') ||\n path === '/docs-json' ||\n path === '/docs-yaml';\n\n app.use((req: Request, res: Response, next: NextFunction) => {\n if (isSwaggerPath(req.path)) {\n res.removeHeader('Content-Security-Policy');\n }\n next();\n });\n\n // Permissions-Policy header\n app.use((_req: Request, res: Response, next: NextFunction) => {\n res.setHeader('Permissions-Policy', buildPermissionsPolicyHeader(permissionsPolicyOverrides));\n next();\n });\n\n const port = process.env.PORT || 3000;\n\n if (globalPrefix) {\n app.setGlobalPrefix(globalPrefix);\n }\n\n // qs-based deep query parsing (dot notation, nested objects, arrays)\n app.use((req: Request, _res: Response, next: NextFunction) => {\n if (req.query) {\n req.query = qs.parse(req.url.split('?')[1], {\n allowDots: true,\n depth: 20,\n arrayLimit: 100,\n });\n }\n next();\n });\n\n // Body parsers — replaces Nest's default 100kb parsers (disabled via bodyParser: false).\n // Registered here so the middleware order Nest applied by default is preserved:\n // helmet -> CSP -> Permissions-Policy -> qs -> body parsers -> routes.\n app.useBodyParser('json', { limit: bodyLimit });\n app.useBodyParser('urlencoded', { limit: bodyLimit, extended: true });\n\n // Global ValidationPipe\n app.useGlobalPipes(\n new ValidationPipe({\n transform: true,\n transformOptions: { enableImplicitConversion: true },\n }),\n );\n\n // Swagger\n if (swagger !== false) {\n const { title = process.env.SOLID_APP_NAME, description = process.env.SOLID_APP_DESCRIPTION, version = '1.0' } = swagger;\n const swaggerConfig = new DocumentBuilder()\n .setTitle(title)\n .setDescription(description)\n .setVersion(version)\n .setExternalDoc('Postman Collection', '/docs-json')\n .addBearerAuth(\n {\n description: 'Please enter token in following format: Bearer <JWT>',\n name: 'Authorization',\n bearerFormat: 'Bearer',\n scheme: 'Bearer',\n type: 'http',\n in: 'Header',\n },\n 'jwt',\n )\n .build();\n const document = SwaggerModule.createDocument(app, swaggerConfig);\n SwaggerModule.setup('/docs', app, document);\n }\n\n // Global interceptor\n app.useGlobalInterceptors(\n new ClassSerializerInterceptor(app.get(Reflector), {\n enableImplicitConversion: true, // optional but handy\n // groups: ['client'], // if you use groups\n }),\n new WrapResponseInterceptor()\n );\n\n // CORS\n app.enableCors(buildDefaultCorsOptions());\n\n // Fix pg returning BIGINT columns as strings\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const types = require('pg').types;\n types.setTypeParser(types.builtins.INT8, (val: string) => parseInt(val));\n\n app.useWebSocketAdapter(new WsAdapter(app));\n\n await app.listen(port);\n\n // Wire up Winston as the runtime logger only AFTER listen — this suppresses all\n // framework init noise (route mapping, module deps, onModuleInit) during boot.\n app.useLogger(app.get(WINSTON_MODULE_NEST_PROVIDER));\n\n const elapsed = ((Date.now() - startTime) / 1000).toFixed(2);\n process.stdout.write(`\\x1b[32mServer started on port ${port} in ${elapsed}s\\x1b[0m\\n`);\n\n return app;\n}\n\n// ---- CLI bootstrap ----\n\n/**\n * Bootstraps a SolidX NestJS CLI application using nest-commander.\n * Handles verbose flag stripping, project root validation, and clean process exit.\n *\n * @example\n * // main-cli.ts\n * #!/usr/bin/env node\n * import { bootstrapSolidCli } from '@solidxai/core';\n * import { AppModule } from './app.module';\n *\n * bootstrapSolidCli(() => AppModule.forRoot());\n */\nexport async function bootstrapSolidCli(\n appModuleFactory: () => Promise<any>,\n): Promise<void> {\n registerGlobalProcessHandlers();\n\n process.on('exit', (code) => {\n if (code !== 0) {\n console.error(`Exiting with error status code: ${code}`);\n }\n });\n\n // Validate that cwd is a valid Solid API project\n const packageJsonPath = resolve(process.cwd(), 'package.json');\n if (!existsSync(packageJsonPath)) {\n console.error('Does not seem to be a valid solid-api project.');\n console.error('Exit reason: missing package.json in the current directory.');\n process.exit(1);\n }\n\n // Strip --verbose / -v before nest-commander processes argv\n const showLogs = process.argv.includes('--verbose') || process.argv.includes('-v');\n for (const flag of ['--verbose', '-v']) {\n const idx = process.argv.indexOf(flag);\n if (idx !== -1) process.argv.splice(idx, 1);\n }\n\n const appModule = await appModuleFactory();\n process.env.SOLID_CLI_RUNNING = 'true';\n\n // @ts-ignore\n const app = await CommandFactory.createWithoutRunning(appModule, {\n logger: showLogs ? ['debug', 'error', 'fatal', 'log', 'verbose', 'warn'] : false,\n });\n\n try {\n await CommandFactory.runApplication(app);\n } catch (e) {\n console.error('CLI exited abruptly due to an error:', e);\n process.exit(1);\n }\n\n process.exit(0);\n}\n"]}
1
+ {"version":3,"file":"bootstrap.helper.js","sourceRoot":"","sources":["../../src/helpers/bootstrap.helper.ts"],"names":[],"mappings":";;;;;AAmGA,8CA0JC;AAgBD,8CA8CC;AA3TD,2CAA4E;AAC5E,uCAAsD;AAEtD,qDAAgD;AAChD,6CAAiE;AAEjE,oDAA4B;AAC5B,4CAAoB;AACpB,2BAAgC;AAChC,+BAA+B;AAC/B,+CAA2E;AAC3E,mDAAgD;AAChD,sDAA8D;AAC9D,yFAAoF;AACpF,+CAAwD;AACxD,uDAK2B;AAC3B,6DAAuD;AAIvD,SAAS,6BAA6B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,KAAK,CAAC,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,MAAM,gBAAgB,EAAE,CAAC;QAC3C,OAAO,CAAC,GAAG,CAAC,iBAAiB,GAAG,MAAM,CAAC;QAGvC,MAAM,GAAG,GAAG,MAAM,+BAAc,CAAC,oBAAoB,CAAC,SAAS,EAAE;YAK/D,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC;SAC9F,CAAC,CAAC;QAEH,MAAM,+BAAc,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,CAAC,CAAC,CAAC;QACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC","sourcesContent":["import { ClassSerializerInterceptor, ValidationPipe } from '@nestjs/common';\nimport { NestFactory, Reflector } from '@nestjs/core';\nimport { NestExpressApplication } from '@nestjs/platform-express';\nimport { WsAdapter } from '@nestjs/platform-ws';\nimport { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';\nimport { NextFunction, Request, Response } from 'express';\nimport helmet from 'helmet';\nimport qs from 'qs';\nimport { existsSync } from 'fs';\nimport { resolve } from 'path';\nimport { WINSTON_MODULE_NEST_PROVIDER, WinstonModule } from 'nest-winston';\nimport { CommandFactory } from 'nest-commander';\nimport { createWinstonLoggerConfig } from '../winston.logger';\nimport { WrapResponseInterceptor } from '../interceptors/wrap-response.interceptor';\nimport { buildDefaultCorsOptions } from './cors.helper';\nimport {\n buildDefaultSecurityHeaderOptions,\n buildPermissionsPolicyHeader,\n PermissionsPolicyConfig,\n SolidSecurityOptions,\n} from './security.helper';\nimport { parseBooleanEnv } from './environment.helper';\n\n// ---- Shared process handlers ----\n\nfunction registerGlobalProcessHandlers() {\n process.on('unhandledRejection', (reason, promise) => {\n console.error('Unhandled Rejection at:', promise, 'reason:', reason);\n });\n\n process.on('uncaughtException', (err) => {\n console.error('Uncaught Exception thrown:', err);\n });\n\n // Suppress pg deprecation warning caused by TypeORM's internal query scheduling\n process.on('warning', (warning) => {\n if (warning.name === 'DeprecationWarning' && (warning.message.includes('client.query()') || warning.message.includes('punycode'))) {\n return;\n }\n console.warn(warning);\n });\n}\n\n// ---- HTTP server bootstrap ----\n\nexport interface SolidSwaggerOptions {\n title?: string;\n description?: string;\n version?: string;\n}\n\nexport interface SolidBootstrapOptions {\n /** Global API prefix. Defaults to 'api'. Set to '' to disable. */\n globalPrefix?: string;\n /** Swagger configuration. Set to false to disable Swagger entirely. */\n swagger?: SolidSwaggerOptions | false;\n /** Permissions-Policy header overrides (merged with defaults). */\n permissionsPolicyOverrides?: Partial<PermissionsPolicyConfig>;\n /** Security header overrides, including iframe frame-ancestor allowlists. */\n security?: SolidSecurityOptions;\n /** Show full NestJS init logs during bootstrap (route mapping, module deps, pollers). Defaults to false. */\n verboseBootstrap?: boolean;\n /**\n * Max request body size for JSON and urlencoded payloads, as a `bytes`-compatible\n * string (e.g. '10mb', '512kb'). Defaults to '10mb'.\n *\n * Does NOT apply to multipart/form-data uploads: body-parser matches on Content-Type,\n * so multipart requests skip these parsers entirely and are handled by Multer. Raise\n * this only for large structured JSON (e.g. /bulk arrays), bearing in mind the parsed\n * object graph can retain several times the raw byte size.\n */\n bodyLimit?: string;\n /**\n * When true, the original request bytes are captured onto `request.rawBody` (a `Buffer`)\n * alongside the normal parsed `request.body`, for JSON and urlencoded requests. Needed to verify\n * a webhook's HMAC signature (GitHub, GitLab, Stripe, ...): the signature is computed over the\n * exact bytes the sender transmitted, and `JSON.stringify(request.body)` is not guaranteed to\n * reproduce them byte-for-byte (key order, numeric formatting, unicode escaping can all differ).\n *\n * Defaults to false — capturing every request body a second time has a real memory cost at scale,\n * and only a route that actually verifies a signature needs it. Opt in per application, not per\n * route: NestJS wires this at `NestFactory.create()` time, before any route exists to opt out.\n */\n captureRawBody?: boolean;\n}\n\n/**\n * Bootstraps a SolidX NestJS HTTP application with sensible defaults:\n * security headers, CORS, Winston logger, ValidationPipe,\n * WrapResponseInterceptor, qs deep query parsing, Swagger, and the\n * pg BIGINT type parser.\n *\n * @example\n * // main.ts\n * bootstrapSolidApp(() => AppModule.forRoot(), {\n * swagger: { title: 'My API', description: 'My API description' },\n * security: { frameAncestors: [\"'self'\", 'https://portal.example.com'] },\n * });\n */\nexport async function bootstrapSolidApp(\n appModuleFactory: () => Promise<any>,\n options: SolidBootstrapOptions = {},\n): Promise<NestExpressApplication> {\n registerGlobalProcessHandlers();\n\n const {\n globalPrefix = 'api',\n swagger = {},\n permissionsPolicyOverrides = {},\n security = {},\n verboseBootstrap = false,\n bodyLimit = '10mb',\n captureRawBody = false,\n } = options;\n\n const startTime = Date.now();\n const appModule = await appModuleFactory();\n const app = await NestFactory.create<NestExpressApplication>(appModule, {\n // Nest's default parsers are registered during init() with a 100kb limit, ahead of\n // any module middleware. Disable them so the parsers below own the limit outright.\n bodyParser: false,\n // Raw-body capture is threaded through by NestApplication.useBodyParser() from THIS option —\n // not from any argument passed to the useBodyParser() calls below. It must be requested here,\n // at creation time, or request.rawBody is never populated no matter how useBodyParser is called\n // later (verified against the installed @nestjs/core: NestApplication#useBodyParser reads\n // `this.appOptions.rawBody` itself and ignores any rawBody-shaped argument a caller supplies).\n rawBody: captureRawBody,\n logger: WinstonModule.createLogger({ ...createWinstonLoggerConfig(), level: verboseBootstrap ? 'debug' : 'error' }),\n });\n\n const apiEnabled = parseBooleanEnv('API_ENABLED', true);\n\n if (!apiEnabled) {\n await app.init();\n app\n .get(WINSTON_MODULE_NEST_PROVIDER)\n .log('API server disabled via API_ENABLED=false. Skipping HTTP listen.', 'Bootstrap');\n return app;\n }\n\n // Health check at root path\n const server = app.getHttpAdapter().getInstance();\n server.get('/', (_req, res) => res.status(200).send('SOLID OK'));\n\n // Security headers\n app.use(helmet(buildDefaultSecurityHeaderOptions(security)));\n\n // Nest's Swagger UI HTML injects inline styles; keep CSP strict elsewhere.\n const isSwaggerPath = (path: string) =>\n path === '/docs' ||\n path === '/docs/' ||\n path.startsWith('/docs/') ||\n path === '/docs-json' ||\n path === '/docs-yaml';\n\n app.use((req: Request, res: Response, next: NextFunction) => {\n if (isSwaggerPath(req.path)) {\n res.removeHeader('Content-Security-Policy');\n }\n next();\n });\n\n // Permissions-Policy header\n app.use((_req: Request, res: Response, next: NextFunction) => {\n res.setHeader('Permissions-Policy', buildPermissionsPolicyHeader(permissionsPolicyOverrides));\n next();\n });\n\n const port = process.env.PORT || 3000;\n\n if (globalPrefix) {\n app.setGlobalPrefix(globalPrefix);\n }\n\n // qs-based deep query parsing (dot notation, nested objects, arrays)\n app.use((req: Request, _res: Response, next: NextFunction) => {\n if (req.query) {\n req.query = qs.parse(req.url.split('?')[1], {\n allowDots: true,\n depth: 20,\n arrayLimit: 100,\n });\n }\n next();\n });\n\n // Body parsers — replaces Nest's default 100kb parsers (disabled via bodyParser: false).\n // Registered here so the middleware order Nest applied by default is preserved:\n // helmet -> CSP -> Permissions-Policy -> qs -> body parsers -> routes.\n app.useBodyParser('json', { limit: bodyLimit });\n app.useBodyParser('urlencoded', { limit: bodyLimit, extended: true });\n\n // Global ValidationPipe\n app.useGlobalPipes(\n new ValidationPipe({\n transform: true,\n transformOptions: { enableImplicitConversion: true },\n }),\n );\n\n // Swagger\n if (swagger !== false) {\n const { title = process.env.SOLID_APP_NAME, description = process.env.SOLID_APP_DESCRIPTION, version = '1.0' } = swagger;\n const swaggerConfig = new DocumentBuilder()\n .setTitle(title)\n .setDescription(description)\n .setVersion(version)\n .setExternalDoc('Postman Collection', '/docs-json')\n .addBearerAuth(\n {\n description: 'Please enter token in following format: Bearer <JWT>',\n name: 'Authorization',\n bearerFormat: 'Bearer',\n scheme: 'Bearer',\n type: 'http',\n in: 'Header',\n },\n 'jwt',\n )\n .build();\n const document = SwaggerModule.createDocument(app, swaggerConfig);\n SwaggerModule.setup('/docs', app, document);\n }\n\n // Global interceptor\n app.useGlobalInterceptors(\n new ClassSerializerInterceptor(app.get(Reflector), {\n enableImplicitConversion: true, // optional but handy\n // groups: ['client'], // if you use groups\n }),\n new WrapResponseInterceptor()\n );\n\n // CORS\n app.enableCors(buildDefaultCorsOptions());\n\n // Fix pg returning BIGINT columns as strings\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const types = require('pg').types;\n types.setTypeParser(types.builtins.INT8, (val: string) => parseInt(val));\n\n app.useWebSocketAdapter(new WsAdapter(app));\n\n await app.listen(port);\n\n // Wire up Winston as the runtime logger only AFTER listen — this suppresses all\n // framework init noise (route mapping, module deps, onModuleInit) during boot.\n app.useLogger(app.get(WINSTON_MODULE_NEST_PROVIDER));\n\n const elapsed = ((Date.now() - startTime) / 1000).toFixed(2);\n process.stdout.write(`\\x1b[32mServer started on port ${port} in ${elapsed}s\\x1b[0m\\n`);\n\n return app;\n}\n\n// ---- CLI bootstrap ----\n\n/**\n * Bootstraps a SolidX NestJS CLI application using nest-commander.\n * Handles verbose flag stripping, project root validation, and clean process exit.\n *\n * @example\n * // main-cli.ts\n * #!/usr/bin/env node\n * import { bootstrapSolidCli } from '@solidxai/core';\n * import { AppModule } from './app.module';\n *\n * bootstrapSolidCli(() => AppModule.forRoot());\n */\nexport async function bootstrapSolidCli(\n appModuleFactory: () => Promise<any>,\n): Promise<void> {\n registerGlobalProcessHandlers();\n\n process.on('exit', (code) => {\n if (code !== 0) {\n console.error(`Exiting with error status code: ${code}`);\n }\n });\n\n // Validate that cwd is a valid Solid API project\n const packageJsonPath = resolve(process.cwd(), 'package.json');\n if (!existsSync(packageJsonPath)) {\n console.error('Does not seem to be a valid solid-api project.');\n console.error('Exit reason: missing package.json in the current directory.');\n process.exit(1);\n }\n\n // Strip --verbose / -v before nest-commander processes argv\n const showLogs = process.argv.includes('--verbose') || process.argv.includes('-v');\n for (const flag of ['--verbose', '-v']) {\n const idx = process.argv.indexOf(flag);\n if (idx !== -1) process.argv.splice(idx, 1);\n }\n\n try {\n const appModule = await appModuleFactory();\n process.env.SOLID_CLI_RUNNING = 'true';\n\n // @ts-ignore\n const app = await CommandFactory.createWithoutRunning(appModule, {\n // Keep normal CLI runs quiet, but never hide errors. Seeders and other CLI\n // commands often catch domain/database errors and report them through the\n // Nest logger; disabling the logger entirely would leave the wrapper with\n // only the generic non-zero exit status.\n logger: showLogs ? ['debug', 'error', 'fatal', 'log', 'verbose', 'warn'] : ['error', 'fatal'],\n });\n\n await CommandFactory.runApplication(app);\n } catch (e) {\n console.error('CLI exited abruptly due to an error:', e);\n process.exit(1);\n }\n\n process.exit(0);\n}\n"]}
@@ -8000,6 +8000,7 @@
8000
8000
  "ViewMetadataController.findOne",
8001
8001
  "ActionMetadataController.findMany",
8002
8002
  "ActionMetadataController.findOne",
8003
+ "UserViewMetadataController.create",
8003
8004
  "UserViewMetadataController.upsert",
8004
8005
  "UserViewMetadataController.findMany",
8005
8006
  "UserViewMetadataController.findOne",
@@ -1,10 +1,30 @@
1
1
  import { MqMessageRepository } from "../../repository/mq-message.repository";
2
2
  import { IDashboardWidgetDataProvider, IDashboardWidgetDataProviderContext, IDashboardWidgetDataResponseEnvelope } from "../../interfaces";
3
+ type RecentFailureRecord = {
4
+ id: any;
5
+ messageId: any;
6
+ queueName: any;
7
+ stage: any;
8
+ retryCount: any;
9
+ elapsedMillis: any;
10
+ startedAt: any;
11
+ finishedAt: any;
12
+ error: any;
13
+ createdAt: any;
14
+ };
15
+ type TableColumn = {
16
+ field: keyof RecentFailureRecord;
17
+ header: string;
18
+ };
3
19
  export declare class MqDashboardRecentFailuresProvider implements IDashboardWidgetDataProvider {
4
20
  private readonly mqMessageRepository;
5
21
  constructor(mqMessageRepository: MqMessageRepository);
6
22
  name(): string;
7
23
  help(): string;
8
- getData(widgetDefinition: Record<string, any>, ctxt: IDashboardWidgetDataProviderContext): Promise<IDashboardWidgetDataResponseEnvelope<any>>;
24
+ getData(widgetDefinition: Record<string, any>, ctxt: IDashboardWidgetDataProviderContext): Promise<IDashboardWidgetDataResponseEnvelope<{
25
+ columns: TableColumn[];
26
+ records: RecentFailureRecord[];
27
+ }>>;
9
28
  }
29
+ export {};
10
30
  //# sourceMappingURL=mq-dashboard-recent-failures-provider.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mq-dashboard-recent-failures-provider.service.d.ts","sourceRoot":"","sources":["../../../src/services/dashboard-providers/mq-dashboard-recent-failures-provider.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,mCAAmC,EAAE,oCAAoC,EAAE,MAAM,gBAAgB,CAAC;AAGzI,qBAEa,iCAAkC,YAAW,4BAA4B;IAE9E,OAAO,CAAC,QAAQ,CAAC,mBAAmB;gBAAnB,mBAAmB,EAAE,mBAAmB;IAG7D,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAIR,OAAO,CACT,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACrC,IAAI,EAAE,mCAAmC,GAC1C,OAAO,CAAC,oCAAoC,CAAC,GAAG,CAAC,CAAC;CAgExD"}
1
+ {"version":3,"file":"mq-dashboard-recent-failures-provider.service.d.ts","sourceRoot":"","sources":["../../../src/services/dashboard-providers/mq-dashboard-recent-failures-provider.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,mCAAmC,EAAE,oCAAoC,EAAE,MAAM,gBAAgB,CAAC;AAGzI,KAAK,mBAAmB,GAAG;IACvB,EAAE,EAAE,GAAG,CAAC;IACR,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,GAAG,CAAC;IAChB,aAAa,EAAE,GAAG,CAAC;IACnB,SAAS,EAAE,GAAG,CAAC;IACf,UAAU,EAAE,GAAG,CAAC;IAChB,KAAK,EAAE,GAAG,CAAC;IACX,SAAS,EAAE,GAAG,CAAC;CAClB,CAAC;AAEF,KAAK,WAAW,GAAG;IACf,KAAK,EAAE,MAAM,mBAAmB,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,qBAEa,iCAAkC,YAAW,4BAA4B;IAE9E,OAAO,CAAC,QAAQ,CAAC,mBAAmB;gBAAnB,mBAAmB,EAAE,mBAAmB;IAG7D,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAIR,OAAO,CACT,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACrC,IAAI,EAAE,mCAAmC,GAC1C,OAAO,CAAC,oCAAoC,CAAC;QAAE,OAAO,EAAE,WAAW,EAAE,CAAC;QAAC,OAAO,EAAE,mBAAmB,EAAE,CAAA;KAAE,CAAC,CAAC;CAgE/G"}
@@ -47,16 +47,16 @@ let MqDashboardRecentFailuresProvider = class MqDashboardRecentFailuresProvider
47
47
  .take(limit)
48
48
  .getRawMany();
49
49
  const columns = [
50
- "id",
51
- "messageId",
52
- "queueName",
53
- "stage",
54
- "retryCount",
55
- "elapsedMillis",
56
- "startedAt",
57
- "finishedAt",
58
- "error",
59
- "createdAt",
50
+ { field: "id", header: "ID" },
51
+ { field: "messageId", header: "Message ID" },
52
+ { field: "queueName", header: "Queue Name" },
53
+ { field: "stage", header: "Stage" },
54
+ { field: "retryCount", header: "Retry Count" },
55
+ { field: "elapsedMillis", header: "Elapsed Millis" },
56
+ { field: "startedAt", header: "Started At" },
57
+ { field: "finishedAt", header: "Finished At" },
58
+ { field: "error", header: "Error" },
59
+ { field: "createdAt", header: "Created At" },
60
60
  ];
61
61
  const records = rows.map((row) => ({
62
62
  id: row.id ?? null,
@@ -1 +1 @@
1
- {"version":3,"file":"mq-dashboard-recent-failures-provider.service.js","sourceRoot":"","sources":["../../../src/services/dashboard-providers/mq-dashboard-recent-failures-provider.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,wHAAsG;AACtG,kFAA2E;AAE3E,+EAAuG;AAIhG,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IAC1C,YACqB,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IACzD,CAAC;IAEL,IAAI;QACA,OAAO,mCAAmC,CAAC;IAC/C,CAAC;IAED,IAAI;QACA,OAAO,4FAA4F,CAAC;IACxG,CAAC;IAED,KAAK,CAAC,OAAO,CACT,gBAAqC,EACrC,IAAyC;QAEzC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACrF,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,cAAc,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAEzF,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,mCAAmC,CAAC,WAAW,CAAC,CAAC;QAC3F,IAAA,qDAAuB,EAAC,EAAE,EAAE,IAAI,CAAC,SAAS,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;QAChG,EAAE,CAAC,QAAQ,CAAC,gCAAgC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEzE,MAAM,IAAI,GAAG,MAAM,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O;YACH,IAAI,EAAE;gBACF,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE;gBACzB,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACrC,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,UAAU,EAAE,CAAC;aAChB;YACD,IAAI,EAAE;gBACF,OAAO;gBACP,OAAO;aACV;SACJ,CAAC;IACN,CAAC;CACJ,CAAA;AAhFY,8EAAiC;4CAAjC,iCAAiC;IAF7C,IAAA,sEAA2B,GAAE;IAC7B,IAAA,mBAAU,GAAE;qCAGiC,2CAAmB;GAFpD,iCAAiC,CAgF7C;AAED,SAAS,cAAc,CAAC,KAAU,EAAE,SAAiB;IACjD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,IAAI,SAAS,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,SAAS;QAAE,OAAO,KAAK,CAAC;IAC9D,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;AAC7C,CAAC","sourcesContent":["import { Injectable } from \"@nestjs/common\";\nimport { DashboardWidgetDataProvider } from \"src/decorators/dashboard-widget-data-provider.decorator\";\nimport { MqMessageRepository } from \"src/repository/mq-message.repository\";\nimport { IDashboardWidgetDataProvider, IDashboardWidgetDataProviderContext, IDashboardWidgetDataResponseEnvelope } from \"src/interfaces\";\nimport { applyMqDashboardFilters } from \"src/services/dashboard-providers/mq-dashboard-provider-utils\";\n\n@DashboardWidgetDataProvider()\n@Injectable()\nexport class MqDashboardRecentFailuresProvider implements IDashboardWidgetDataProvider {\n constructor(\n private readonly mqMessageRepository: MqMessageRepository,\n ) { }\n\n name(): string {\n return \"MqDashboardRecentFailuresProvider\";\n }\n\n help(): string {\n return \"Returns recent failed mq messages in a tabular payload after applying dashboard variables.\";\n }\n\n async getData(\n widgetDefinition: Record<string, any>,\n ctxt: IDashboardWidgetDataProviderContext,\n ): Promise<IDashboardWidgetDataResponseEnvelope<any>> {\n const limit = Math.min(Math.max(Number(ctxt?.providerContext?.limit ?? 25), 1), 200);\n const errorMaxLength = Math.max(Number(ctxt?.providerContext?.errorMaxLength ?? 160), 0);\n\n const qb = await this.mqMessageRepository.createSecurityRuleAwareQueryBuilder(\"mqMessage\");\n applyMqDashboardFilters(qb, ctxt.variables ?? {}, { ignoreStage: true, ensureQueueJoin: true });\n qb.andWhere(\"mqMessage.stage = :failedStage\", { failedStage: \"failed\" });\n\n const rows = await qb\n .select([\n \"mqMessage.id AS id\",\n \"mqMessage.messageId AS messageId\",\n \"mqMessageQueue.name AS queueName\",\n \"mqMessage.stage AS stage\",\n \"mqMessage.retryCount AS retryCount\",\n \"mqMessage.elapsedMillis AS elapsedMillis\",\n \"mqMessage.startedAt AS startedAt\",\n \"mqMessage.finishedAt AS finishedAt\",\n \"mqMessage.error AS error\",\n \"mqMessage.createdAt AS createdAt\",\n ])\n .orderBy(\"mqMessage.createdAt\", \"DESC\")\n .take(limit)\n .getRawMany<Record<string, any>>();\n\n const columns = [\n \"id\",\n \"messageId\",\n \"queueName\",\n \"stage\",\n \"retryCount\",\n \"elapsedMillis\",\n \"startedAt\",\n \"finishedAt\",\n \"error\",\n \"createdAt\",\n ];\n\n const records = rows.map((row) => ({\n id: row.id ?? null,\n messageId: row.messageId ?? row.messageid ?? null,\n queueName: row.queueName ?? row.queuename ?? null,\n stage: row.stage ?? null,\n retryCount: row.retryCount ?? row.retrycount ?? null,\n elapsedMillis: row.elapsedMillis ?? row.elapsedmillis ?? null,\n startedAt: row.startedAt ?? row.startedat ?? null,\n finishedAt: row.finishedAt ?? row.finishedat ?? null,\n error: truncateString(row.error ?? null, errorMaxLength),\n createdAt: row.createdAt ?? row.createdat ?? null,\n }));\n\n return {\n meta: {\n providerName: this.name(),\n generatedAt: new Date().toISOString(),\n widgetName: ctxt.widgetName,\n durationMs: 0,\n },\n data: {\n columns,\n records,\n },\n };\n }\n}\n\nfunction truncateString(value: any, maxLength: number): any {\n if (!value || typeof value !== 'string') return value;\n if (maxLength <= 0 || value.length <= maxLength) return value;\n return `${value.slice(0, maxLength)}...`;\n}\n"]}
1
+ {"version":3,"file":"mq-dashboard-recent-failures-provider.service.js","sourceRoot":"","sources":["../../../src/services/dashboard-providers/mq-dashboard-recent-failures-provider.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,wHAAsG;AACtG,kFAA2E;AAE3E,+EAAuG;AAsBhG,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IAC1C,YACqB,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IACzD,CAAC;IAEL,IAAI;QACA,OAAO,mCAAmC,CAAC;IAC/C,CAAC;IAED,IAAI;QACA,OAAO,4FAA4F,CAAC;IACxG,CAAC;IAED,KAAK,CAAC,OAAO,CACT,gBAAqC,EACrC,IAAyC;QAEzC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACrF,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,cAAc,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAEzF,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,mCAAmC,CAAC,WAAW,CAAC,CAAC;QAC3F,IAAA,qDAAuB,EAAC,EAAE,EAAE,IAAI,CAAC,SAAS,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;QAChG,EAAE,CAAC,QAAQ,CAAC,gCAAgC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEzE,MAAM,IAAI,GAA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@nestjs/common\";\nimport { DashboardWidgetDataProvider } from \"src/decorators/dashboard-widget-data-provider.decorator\";\nimport { MqMessageRepository } from \"src/repository/mq-message.repository\";\nimport { IDashboardWidgetDataProvider, IDashboardWidgetDataProviderContext, IDashboardWidgetDataResponseEnvelope } from \"src/interfaces\";\nimport { applyMqDashboardFilters } from \"src/services/dashboard-providers/mq-dashboard-provider-utils\";\n\ntype RecentFailureRecord = {\n id: any;\n messageId: any;\n queueName: any;\n stage: any;\n retryCount: any;\n elapsedMillis: any;\n startedAt: any;\n finishedAt: any;\n error: any;\n createdAt: any;\n};\n\ntype TableColumn = {\n field: keyof RecentFailureRecord;\n header: string;\n};\n\n@DashboardWidgetDataProvider()\n@Injectable()\nexport class MqDashboardRecentFailuresProvider implements IDashboardWidgetDataProvider {\n constructor(\n private readonly mqMessageRepository: MqMessageRepository,\n ) { }\n\n name(): string {\n return \"MqDashboardRecentFailuresProvider\";\n }\n\n help(): string {\n return \"Returns recent failed mq messages in a tabular payload after applying dashboard variables.\";\n }\n\n async getData(\n widgetDefinition: Record<string, any>,\n ctxt: IDashboardWidgetDataProviderContext,\n ): Promise<IDashboardWidgetDataResponseEnvelope<{ columns: TableColumn[]; records: RecentFailureRecord[] }>> {\n const limit = Math.min(Math.max(Number(ctxt?.providerContext?.limit ?? 25), 1), 200);\n const errorMaxLength = Math.max(Number(ctxt?.providerContext?.errorMaxLength ?? 160), 0);\n\n const qb = await this.mqMessageRepository.createSecurityRuleAwareQueryBuilder(\"mqMessage\");\n applyMqDashboardFilters(qb, ctxt.variables ?? {}, { ignoreStage: true, ensureQueueJoin: true });\n qb.andWhere(\"mqMessage.stage = :failedStage\", { failedStage: \"failed\" });\n\n const rows = await qb\n .select([\n \"mqMessage.id AS id\",\n \"mqMessage.messageId AS messageId\",\n \"mqMessageQueue.name AS queueName\",\n \"mqMessage.stage AS stage\",\n \"mqMessage.retryCount AS retryCount\",\n \"mqMessage.elapsedMillis AS elapsedMillis\",\n \"mqMessage.startedAt AS startedAt\",\n \"mqMessage.finishedAt AS finishedAt\",\n \"mqMessage.error AS error\",\n \"mqMessage.createdAt AS createdAt\",\n ])\n .orderBy(\"mqMessage.createdAt\", \"DESC\")\n .take(limit)\n .getRawMany<Record<string, any>>();\n\n const columns: TableColumn[] = [\n { field: \"id\", header: \"ID\" },\n { field: \"messageId\", header: \"Message ID\" },\n { field: \"queueName\", header: \"Queue Name\" },\n { field: \"stage\", header: \"Stage\" },\n { field: \"retryCount\", header: \"Retry Count\" },\n { field: \"elapsedMillis\", header: \"Elapsed Millis\" },\n { field: \"startedAt\", header: \"Started At\" },\n { field: \"finishedAt\", header: \"Finished At\" },\n { field: \"error\", header: \"Error\" },\n { field: \"createdAt\", header: \"Created At\" },\n ];\n\n const records: RecentFailureRecord[] = rows.map((row) => ({\n id: row.id ?? null,\n messageId: row.messageId ?? row.messageid ?? null,\n queueName: row.queueName ?? row.queuename ?? null,\n stage: row.stage ?? null,\n retryCount: row.retryCount ?? row.retrycount ?? null,\n elapsedMillis: row.elapsedMillis ?? row.elapsedmillis ?? null,\n startedAt: row.startedAt ?? row.startedat ?? null,\n finishedAt: row.finishedAt ?? row.finishedat ?? null,\n error: truncateString(row.error ?? null, errorMaxLength),\n createdAt: row.createdAt ?? row.createdat ?? null,\n }));\n\n return {\n meta: {\n providerName: this.name(),\n generatedAt: new Date().toISOString(),\n widgetName: ctxt.widgetName,\n durationMs: 0,\n },\n data: {\n columns,\n records,\n },\n };\n }\n}\n\nfunction truncateString(value: any, maxLength: number): any {\n if (!value || typeof value !== 'string') return value;\n if (maxLength <= 0 || value.length <= maxLength) return value;\n return `${value.slice(0, maxLength)}...`;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidxai/core",
3
- "version": "0.1.18-beta.1",
3
+ "version": "0.1.19-beta.0",
4
4
  "description": "This module is a NestJS module containing all the required core providers required by a Solid application",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,6 +8,7 @@ interface SeedCommandOptions {
8
8
  modulesToSeed?: string;
9
9
  prune?: boolean;
10
10
  skipHooks?: boolean;
11
+ verbose?: boolean;
11
12
  }
12
13
 
13
14
  @Command({ name: 'seed', description: 'Install seed data for a given module' })
@@ -63,8 +64,7 @@ export class SeedCommand extends CommandRunner {
63
64
  .map((seeder) => seeder.instance)
64
65
  .pop();
65
66
  if (!seeder) {
66
- this.logger.error(`Seeder service ${options.seeder} not found. Does your service have a seed() method?`);
67
- return;
67
+ throw new Error(`Seeder service ${options.seeder} not found. Does your service have a seed() method?`);
68
68
  }
69
69
  this.logger.log(`Running the seed() method for seeder: ${seeder.constructor.name}`);
70
70
  await seeder.seed(parsedConf);
@@ -93,4 +93,9 @@ export class SeedCommand extends CommandRunner {
93
93
  parseSkipHooks(): boolean {
94
94
  return true;
95
95
  }
96
+
97
+ @Option({ flags: '-v, --verbose', description: 'Show detailed Nest/Winston logs during seeding.' })
98
+ parseVerbose(): boolean {
99
+ return true;
100
+ }
96
101
  }
@@ -70,6 +70,18 @@ export interface SolidBootstrapOptions {
70
70
  * object graph can retain several times the raw byte size.
71
71
  */
72
72
  bodyLimit?: string;
73
+ /**
74
+ * When true, the original request bytes are captured onto `request.rawBody` (a `Buffer`)
75
+ * alongside the normal parsed `request.body`, for JSON and urlencoded requests. Needed to verify
76
+ * a webhook's HMAC signature (GitHub, GitLab, Stripe, ...): the signature is computed over the
77
+ * exact bytes the sender transmitted, and `JSON.stringify(request.body)` is not guaranteed to
78
+ * reproduce them byte-for-byte (key order, numeric formatting, unicode escaping can all differ).
79
+ *
80
+ * Defaults to false — capturing every request body a second time has a real memory cost at scale,
81
+ * and only a route that actually verifies a signature needs it. Opt in per application, not per
82
+ * route: NestJS wires this at `NestFactory.create()` time, before any route exists to opt out.
83
+ */
84
+ captureRawBody?: boolean;
73
85
  }
74
86
 
75
87
  /**
@@ -98,6 +110,7 @@ export async function bootstrapSolidApp(
98
110
  security = {},
99
111
  verboseBootstrap = false,
100
112
  bodyLimit = '10mb',
113
+ captureRawBody = false,
101
114
  } = options;
102
115
 
103
116
  const startTime = Date.now();
@@ -106,6 +119,12 @@ export async function bootstrapSolidApp(
106
119
  // Nest's default parsers are registered during init() with a 100kb limit, ahead of
107
120
  // any module middleware. Disable them so the parsers below own the limit outright.
108
121
  bodyParser: false,
122
+ // Raw-body capture is threaded through by NestApplication.useBodyParser() from THIS option —
123
+ // not from any argument passed to the useBodyParser() calls below. It must be requested here,
124
+ // at creation time, or request.rawBody is never populated no matter how useBodyParser is called
125
+ // later (verified against the installed @nestjs/core: NestApplication#useBodyParser reads
126
+ // `this.appOptions.rawBody` itself and ignores any rawBody-shaped argument a caller supplies).
127
+ rawBody: captureRawBody,
109
128
  logger: WinstonModule.createLogger({ ...createWinstonLoggerConfig(), level: verboseBootstrap ? 'debug' : 'error' }),
110
129
  });
111
130
 
@@ -274,15 +293,19 @@ export async function bootstrapSolidCli(
274
293
  if (idx !== -1) process.argv.splice(idx, 1);
275
294
  }
276
295
 
277
- const appModule = await appModuleFactory();
278
- process.env.SOLID_CLI_RUNNING = 'true';
279
-
280
- // @ts-ignore
281
- const app = await CommandFactory.createWithoutRunning(appModule, {
282
- logger: showLogs ? ['debug', 'error', 'fatal', 'log', 'verbose', 'warn'] : false,
283
- });
284
-
285
296
  try {
297
+ const appModule = await appModuleFactory();
298
+ process.env.SOLID_CLI_RUNNING = 'true';
299
+
300
+ // @ts-ignore
301
+ const app = await CommandFactory.createWithoutRunning(appModule, {
302
+ // Keep normal CLI runs quiet, but never hide errors. Seeders and other CLI
303
+ // commands often catch domain/database errors and report them through the
304
+ // Nest logger; disabling the logger entirely would leave the wrapper with
305
+ // only the generic non-zero exit status.
306
+ logger: showLogs ? ['debug', 'error', 'fatal', 'log', 'verbose', 'warn'] : ['error', 'fatal'],
307
+ });
308
+
286
309
  await CommandFactory.runApplication(app);
287
310
  } catch (e) {
288
311
  console.error('CLI exited abruptly due to an error:', e);
@@ -8000,6 +8000,7 @@
8000
8000
  "ViewMetadataController.findOne",
8001
8001
  "ActionMetadataController.findMany",
8002
8002
  "ActionMetadataController.findOne",
8003
+ "UserViewMetadataController.create",
8003
8004
  "UserViewMetadataController.upsert",
8004
8005
  "UserViewMetadataController.findMany",
8005
8006
  "UserViewMetadataController.findOne",
@@ -4,6 +4,24 @@ import { MqMessageRepository } from "src/repository/mq-message.repository";
4
4
  import { IDashboardWidgetDataProvider, IDashboardWidgetDataProviderContext, IDashboardWidgetDataResponseEnvelope } from "src/interfaces";
5
5
  import { applyMqDashboardFilters } from "src/services/dashboard-providers/mq-dashboard-provider-utils";
6
6
 
7
+ type RecentFailureRecord = {
8
+ id: any;
9
+ messageId: any;
10
+ queueName: any;
11
+ stage: any;
12
+ retryCount: any;
13
+ elapsedMillis: any;
14
+ startedAt: any;
15
+ finishedAt: any;
16
+ error: any;
17
+ createdAt: any;
18
+ };
19
+
20
+ type TableColumn = {
21
+ field: keyof RecentFailureRecord;
22
+ header: string;
23
+ };
24
+
7
25
  @DashboardWidgetDataProvider()
8
26
  @Injectable()
9
27
  export class MqDashboardRecentFailuresProvider implements IDashboardWidgetDataProvider {
@@ -22,7 +40,7 @@ export class MqDashboardRecentFailuresProvider implements IDashboardWidgetDataPr
22
40
  async getData(
23
41
  widgetDefinition: Record<string, any>,
24
42
  ctxt: IDashboardWidgetDataProviderContext,
25
- ): Promise<IDashboardWidgetDataResponseEnvelope<any>> {
43
+ ): Promise<IDashboardWidgetDataResponseEnvelope<{ columns: TableColumn[]; records: RecentFailureRecord[] }>> {
26
44
  const limit = Math.min(Math.max(Number(ctxt?.providerContext?.limit ?? 25), 1), 200);
27
45
  const errorMaxLength = Math.max(Number(ctxt?.providerContext?.errorMaxLength ?? 160), 0);
28
46
 
@@ -47,20 +65,20 @@ export class MqDashboardRecentFailuresProvider implements IDashboardWidgetDataPr
47
65
  .take(limit)
48
66
  .getRawMany<Record<string, any>>();
49
67
 
50
- const columns = [
51
- "id",
52
- "messageId",
53
- "queueName",
54
- "stage",
55
- "retryCount",
56
- "elapsedMillis",
57
- "startedAt",
58
- "finishedAt",
59
- "error",
60
- "createdAt",
68
+ const columns: TableColumn[] = [
69
+ { field: "id", header: "ID" },
70
+ { field: "messageId", header: "Message ID" },
71
+ { field: "queueName", header: "Queue Name" },
72
+ { field: "stage", header: "Stage" },
73
+ { field: "retryCount", header: "Retry Count" },
74
+ { field: "elapsedMillis", header: "Elapsed Millis" },
75
+ { field: "startedAt", header: "Started At" },
76
+ { field: "finishedAt", header: "Finished At" },
77
+ { field: "error", header: "Error" },
78
+ { field: "createdAt", header: "Created At" },
61
79
  ];
62
80
 
63
- const records = rows.map((row) => ({
81
+ const records: RecentFailureRecord[] = rows.map((row) => ({
64
82
  id: row.id ?? null,
65
83
  messageId: row.messageId ?? row.messageid ?? null,
66
84
  queueName: row.queueName ?? row.queuename ?? null,