@solidxai/core 0.1.13-beta.21 → 0.1.13-beta.22

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,596 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.13-beta.22] - 2026-08-17
4
+
5
+ ### Added
6
+
7
+ - add normalization utilities for text fields and integrate them into LongTextFieldCrudManager and ShortTextFieldCrudManager
8
+ - add security header options for iframe embedding and customize frame-ancestors
9
+ - add createdAt field to PostChatterMessageDto and set default in service
10
+ - implement transaction handling for unpublishing records and restore previous version
11
+ - add progress reporting functionality to test runner and reporters
12
+ - add viewWidget attribute for fileSize in metadata
13
+ - add configurable UI timeouts for testing steps and update documentation
14
+ - enhance internationalisation by adding applyCreateDefaults method for localeName on create DTOs
15
+ - implement promoteRecoveredDraftPublishVersion method and integrate with CRUDService for soft-deleted records
16
+ - add default locale name for internationalised entries in test data seeding
17
+ - implement draft/publish versioning support and refactor related services
18
+ - add DraftPublishHelperService for managing draft and publish workflows
19
+ - add workflow field data provider support and related interfaces
20
+ - add asynchronous execution for workflows and enhance execution status retrieval
21
+ - implement WorkflowSecret management with CRUD operations and integrate into workflow execution
22
+ - enhance workflow definition management and add Python runtime node
23
+ - add SolidX integration nodes for login, email, and SMS
24
+ - add support for versioning and publishing in CRUD operations, including new fields in entities and filters
25
+ - enhance http.request node with query parameters and body modes
26
+ - refactor node structure and add sequential and switch nodes
27
+ - update workflow execution and definition handling
28
+ - implement workflow execution services and nodes
29
+ - implement API key generation for system admin users in ModuleMetadataSeederService
30
+ - enhance ModuleMetadataSeederService to generate and store API keys for system admin users
31
+ - add fieldConfig property to DatasourceIntrospectionMappingColumnDto and enhance field sanitization in DatasourceIntrospectionService
32
+ - enhance migration process with build and seed commands
33
+ - enhance datasource introspection with primary key detection and migration support
34
+ - enhance role creation with module linkage and resolve module metadata
35
+ - enhance action, role, and view metadata services with change detection and JSON normalization
36
+ - add introspection services for MSSQL, MySQL, and PostgreSQL
37
+ - add new dashboard controller actions to permissions
38
+ - simplify queue health permissions by consolidating patterns
39
+ - implement explicit widget permissions and unauthorized response handling
40
+ - enhance widget permission checks and add unauthorized response handling
41
+ - add Queue SLA heatmap provider and update metadata
42
+ - update queue health menu item and reorder messages
43
+ - add various dashboard providers and runtime services
44
+ - implement WhatsApp Cloud API integration
45
+ - add gupshup whatsapp provider
46
+ - add deleteByMediaRecord method to MediaStorageProvider implementations
47
+ - add updateCustomNoteMessage action to ChatterMessageController
48
+ - add secure custom-note edit API with attachment add/remove support
49
+ - implemented social media oath for facebook and microsoft
50
+ - add partialUpdate endpoint to menu-item-metadata controller and update metadata seeder relation field name
51
+ - implemented social media oath for facebook and microsoft
52
+ - add Message Tree Action and corresponding view for mqMessage
53
+ - implement processing timeout for RabbitMQ subscriber
54
+ - Add a composite index to `ChatterMessage` on `coModelName` and `coModelEntityId`, and an index to `chatterMessage` in `ChatterMessageDetails`.
55
+ - Migrate date/time transformers to UtcDateTimeTransformer.
56
+ - simplify S3 URL resolution DTO, and remove unused S3 resolution logic.
57
+
58
+ ### Fixed
59
+
60
+ - make currentValue optional in CreateModelSequenceDto and update seeding logic to exclude it
61
+ - change matched column type from bit to default nullable boolean
62
+ - improve error message for media deletion restriction
63
+ - use transactions entitymanager for all subscribers only for embedded db projects
64
+ - update consuming project name resolution to use parent directory
65
+ - update solidx directory path to include consuming project name
66
+ - correct package name in model generation command and update error handling in module metadata retrieval
67
+ - username
68
+ - remove type specification for encrypted column in Setting entity, to work in mssql also
69
+ - handle null or empty security rule configuration strings in repository
70
+
71
+ ### Changed
72
+
73
+ - update media type handling in CreateFieldMetadataDto and FieldMetadataService
74
+ - remove onDelete cascade option from ManyToOne relationships in entity definitions
75
+ - unify datetime column types across entities using helper function
76
+ - remove explicit timestamp type for nullable date columns across entities
77
+ - update CommonEntity properties to be optional and adjust types in WorkflowTriggerExecution
78
+ - rename create-draft-publish-helper.service to draft-publish-helper.service and update imports
79
+ - inject InternationalisationHelperService in ModuleTestDataService and CrudHelperService
80
+ - separate generic delete from draft-publish and i18n cleanup in CRUDService
81
+ - remove unused boolean type and related system column definitions from DatasourceIntrospectionService
82
+ - update CrudHelperService to initialize DraftPublishHelperService directly in the class refactor: remove publishedAt sorting logic from getLayout method in ViewMetadataService
83
+ - simplify published version filtering in CRUDService
84
+ - remove handleSeedLocales method to streamline locale seeding process
85
+ - remove legacy dashboard files and add new dashboarding architecture guide
86
+ - remove unused dashboard question and variable providers, SQL expression resolver, and related subscribers
87
+ - remove redundant null check in resolveSecurityRuleConfig
88
+ - update body column type to longText using getColumnType helper in SmsTemplate entity
89
+ - update legacy entity fields to be nullable and support null types
90
+ - replace DTO introspection with explicit isUpdate flag in MediaFieldCrudManager
91
+ - make password scheme and failed login attempt columns non-nullable in UserEntity.
92
+ - make passwordScheme, passwordSchemeVersion, and failedLoginAttempts fields nullable in the User entity.
93
+
94
+ ### Documentation
95
+
96
+ - update expired discord link
97
+
98
+ ### Other
99
+
100
+ - ## Phase 6 — Global Multer upload size limit
101
+ - ## Phase 5 — Dangerous-extension checks on menu-icon & settings uploads
102
+ - ## Phase 4 — Route chatter attachments through `MediaFieldCrudManager`
103
+ - ## Phase 3 — Close the `mediaMultiple` size/category gap, and align `validateAllowedExtensions`'s placement
104
+ - ## Phase 2 — Make `mediaTypes` category resolution extension-authoritative
105
+ - Per-field extension allowlist (`mediaAllowedExtensions`)
106
+ - mpin scheme version changes
107
+ - mpin related changes
108
+ - Add safe percent-decoding for uploaded file names to prevent bypassing extension checks
109
+ - Revert "Revert "Deliverable A now stands as: cache TTL (with the store swap that make…""
110
+ - Revert "Deliverable A now stands as: cache TTL (with the store swap that make…"
111
+ - fixes around handling concurrent logins properly using per deviceKey buckets.
112
+ - 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.
113
+ - fixed the request body limit to keep it as 10mb instead of 25mb by default
114
+ - changes around files name sanitization and normalization
115
+ - changes to handle variations in extension while uploading dangerous extension files
116
+ - change request body max to 25mb
117
+ - Comment out countGroupedRecords method implementation for refactoring
118
+ - show theme toggle
119
+ - changes to support passing an explicit createdAt while posting a chatter message
120
+ - Enhance countGroupedRecords and passed internationalisation and draft publish workflow parameters in executeGroupPipeline
121
+ - rename theme registry
122
+ - remove add permisson from permisson-list-view
123
+ - 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
124
+ - readme changes
125
+ - removed hardcoded type against a boolean type
126
+ - changes to the default testing setting timeout to pick from env as well
127
+ - remove duplicate code
128
+ - refactoring around chatter media security fix
129
+ - add media extension support for post chatter
130
+ - Add media upload action and validation in MediaService
131
+ - add media extension support for post chatter
132
+ - changes to ensure only id and field are returned while populating the user in chatter
133
+ - Update defaultValue types in solid-core-metadata.json to strings
134
+ - 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
135
+ - Add getMentionableUsers permission
136
+ - Add endpoint to retrieve mentionable users with search and limit options
137
+ - Add error handling nodes and enhance workflow node definitions
138
+ - Add skipHooks option to seed command and related services
139
+ - Remove type specification for matched column in WorkflowTriggerExecution entity
140
+ - Enhance workflow node definitions and runtime context handling
141
+ - remvoing redundent code
142
+ - Remove onDelete cascade option from ManyToOne relationships in SavedFilters entity
143
+ - changes
144
+ - changes
145
+ - sql injection vulnerability closed in filter queries
146
+ - Remove LocalPath
147
+ - revert changes
148
+ - revert changes
149
+ - revert changes
150
+ - re revert
151
+ - revert changes
152
+ - private-file-cleanup
153
+ - add downlaodurl
154
+ - changes to allow overriding the is allowed api keys flag thru extension user
155
+ - Revert "user enumeration"
156
+ - remove validation from username and mobile
157
+ - user create validation bugs
158
+ - add normalize for otp based also
159
+ - Disable metadata pruning by default in seed command configuration
160
+ - Update seed command to enable metadata pruning by default
161
+ - handle-case-sensitive-for-email
162
+ - Add delete permissions for ImportTransactionController in solid-core metadata
163
+ - Add permissions for import/export functionality in solid-core metadata
164
+ - Refactor role assignment for admin users to handle capability roles individually
165
+ - discard changes
166
+ - add support for static file
167
+ - Add capability roles for admin users in module metadata seeder
168
+ - Enhance module metadata seeder with event emission for start and finish; add options interface for seeding configuration
169
+ - attachment
170
+ - Add new roles and permissions for import/export functionality; refactor role permission handling
171
+ - make isPublic default true
172
+ - changes to show the image inline
173
+ - cleanup againts media's
174
+ - inline role crate false
175
+ - Implement chatter mention notification system with email templates and queue handling
176
+ - Add messageBodyMentions field to chatter message DTOs and entity
177
+ - fix-audit-bug
178
+ - changes to include signed url token for private media
179
+ - Revert "Revert "rename function name""
180
+ - Revert "Revert "add private media support""
181
+ - Add media file type constants and enhance security for media uploads
182
+ - remove some unusable code
183
+ - some changes
184
+ - handle technical error messages due to missing resource in static resources folder
185
+ - Revert "add private media support"
186
+ - Revert "rename function name"
187
+ - rename function name
188
+ - add private media support
189
+ - some fixes
190
+ - solidx session invalid changes
191
+ - add validation on get chatter message
192
+ - updatedAt value is updating now
193
+ - fix to allow linking a userKey belonging to the parent model while seeding a child model
194
+ - add security against chatter
195
+ - chatter message endpoint made public
196
+ - removed embedded db support
197
+ - Add default sorting by ID if not explicitly specified in order options
198
+ - solidx theme settings
199
+ - add icons across all the models in solid core
200
+ - media upload added behind auth
201
+ - Refactor module path resolution to use kebab-case and extract migration file writing logic into a separate method
202
+ - Implement cleanup for TypeORM datasource entities and enhance file handling in SolidTsMorphService
203
+ - class serializer interceptor added for impact of Exclude and Expose
204
+ - Enhance datasource introspection with primary key validation and user key resolution
205
+ - Concurrent Login Feature
206
+ - user enumeration
207
+ - add helper text key on settings object .........
208
+ - changes to handle case insenstive filter operations if the values are other than string by casting
209
+ - menus item fix
210
+ - changes to ensure entity manager does not get serialized as part of the message for the computed field queue
211
+ - added nodemon heartbeat to allow in-process db query execution for code generation for embedded db
212
+ - display name changed
213
+ - name changed
214
+ - added settings for configure the row click on solid list view
215
+ - Revert "Fix for this issue > stop applying lower for numeric fields."
216
+ - fixed legacy entity files names
217
+ - view metadata type field - selection static and roles required false from menu-item
218
+ - Fix for this issue > stop applying lower for numeric fields.
219
+ - refactor and add migration command
220
+ - Handling for audit subscriber to defer audit publish when in embedded db mode
221
+ - Fixed the one genuine mid-transaction second-connection case and hardened the latent spots (for embedded db)
222
+ - changes to take in option for seeding with modules in current seed method
223
+ - Fix validation logic to parse string field values as integers before applying validations
224
+ - remove computed field from instruction add one remove field command fix many-to-many on chatter log
225
+ - ad changes
226
+ - Add locale seeding functionality and enhance locale management
227
+ - subscribers now use the event’s own transaction connection instead of a second pooled one (helpful for embedded db)
228
+ - changes to avoid extra module checks before dynamically loading it
229
+ - defaulted to modulemetadataseederservice if no seeder provided
230
+ - Add Date field in Instructions Response
231
+ - ai interaction cleanup changes
232
+ - enabling create,edit,import,export on permission and lov modules
233
+ - added module to rolemetadata list view
234
+ - roles group by module changes
235
+ - Refactor dashboard providers to utilize new bucket expression and normalization functions
236
+ - Implement Datasource Management functionality with controller, service, and DTO
237
+ - added index to fields newly added as sortable and searchable
238
+ - Add archiver package to dependencies
239
+ - removed unnecessary seed file
240
+ - Add TypeORM migration helper functions and export in index
241
+ - fixes
242
+ - reverted accidental removal of the layout builder root menu
243
+ - pending cleanup of solid core menu items
244
+ - Refactor metadata: remove standalone menu items and add scheduled jobs and saved filters tree views
245
+ - Remove ChatterMessageDetails and ImportTransactionErrorLog menu items; add Chatter Messages tree view and action. Other menu sub menus cleanup done
246
+ - Add model sequence and list of values tree views to metadata, other cleanup changes
247
+ - changes for IAM
248
+ - Add clearPackageRuntime functionality and corresponding metadata action
249
+ - Add archiver dependency and implement module package export functionality
250
+ - Refactor menu cleanup logic in ModelMetadataService and ModuleMetadataService; improve error handling for file deletion and update build commands in ModulePackageService to use solidctl.
251
+ - 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
252
+ - Add media tree view and action & media view cleanup, enhance file storage provider with file size tracking, implemented storeStreams for s3
253
+ - Remove cleanup procedures for module metadata across all SQL dialects and implement menu and action cleanup in the service layer.
254
+ - Remove unused database bootstrap service and related SQL cleanup procedures
255
+ - cleanup
256
+ - Add view and action metadata tree views with updated permissions and searchable fields
257
+ - Add view and action metadata tree views with updated permissions and searchable fields
258
+ - menu item model cleanup
259
+ - Add resumable import handling and transaction management in module package service
260
+ - Add method to retrieve Solid UI module path and enhance cleanup logging
261
+ - 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.
262
+ - Implement module package management: add controller, service, and DTOs for import, export, and build operations.
263
+ - many to one left join issue fixed
264
+ - Refactor field metadata actions and views: update action types, enhance searchability, and adjust permissions for create, edit, and delete operations.
265
+ - 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
266
+ - Update solid-core metadata: remove import/export options, rename fields, and add sortable attribute
267
+ - Enhance solid-core metadata structure for module mdtadata by removing import/export options and adding sortable attributes for fields
268
+ - Implement module metadata explorer with CRUD operations and search functionality
269
+ - Refactor module metadata paths to use a consistent directory structure and improve file resolution logic
270
+ - Bug fixs
271
+ - added frontend base url as well to the default settings
272
+ - minor cleanup
273
+ - changes to cleanup legacy table related fields
274
+ - changes for new dashboards functionality
275
+ - always print server startup line regardless of log level
276
+ - Add field quality checks and fixes checklist for backend validation
277
+ - typeo issue
278
+ - Agent table clean up
279
+ - Add manual interaction step for Playwright and update README
280
+ - provision made to unlink data rather than having to teardown everything
281
+ - provision made to unlink data rather than having to teardown everything
282
+ - changes to colour the server startup line
283
+ - Agent table clean up
284
+ - changes to avoid too many initialization logs. controlled thru the verboseBootstrap option to the boostrap helper
285
+ - removed id command options and retained the singular name option only for consistency purposes
286
+ - 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
287
+ - 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
288
+ - MCP table solid changes
289
+ - playwrite added as dependency instead
290
+ - changes to the test runner
291
+ - chatter message user resolution chagnes
292
+ - bug fix in chatter message user resolution after we moved to queues.
293
+ - moved back to beta3
294
+ - failed login attempts field added to the json and update dto and exposed in entity
295
+ - removed un-necessary index on newvalue display
296
+ - ts changes error: any
297
+ - auto addition of menus happens at the bottom now. list view layout changes for security access rules + enabled delete made welcome email & sms SystemAdminEditable
298
+ - changed model metadata service default form layout to be single column
299
+ - added typing to catch blocks + authentication service bug fixes for private registration flow
300
+ - added typing to catch blocks + authentication service bug fixes for private registration flow
301
+ - normalised @ApiTags
302
+ - enum for passwordless modes
303
+ - bug fix in how alternative actions are rendered
304
+ - queue related bug fixes
305
+ - changes to add a websocket adaptor to the bootstrap server routine
306
+ - license changes
307
+ - type fixes
308
+ - removed min and max from long text mapping
309
+ - bug fix for shortext field mapping
310
+ - changes to post the testing results to a webhook api with a test payload
311
+ - added import multer this fixes un-necessary ts errors in vscode
312
+ - ts errors fixed
313
+ - bug fix in rabbitmq subscriber optimisation in all subscribers to default to role both if not specified
314
+ - formatting changes
315
+ - facebook oauth
316
+ - Status required false
317
+ - updated gitignore
318
+ - dleete un-necessary docs
319
+ - deleted un-necessary files
320
+ - changes related to more grooming
321
+ - api added in cors
322
+ - refactor Oauth strategy
323
+ - Revert "Ft social media login"
324
+ - bug fix
325
+ - bug fix
326
+ - add new api me endpoint and role based settings
327
+ - setting changes for new ui architecture
328
+ - changes for new settings structure
329
+ - chatter task subtype and related changes
330
+ - bug fix
331
+ - fixes
332
+ - 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
333
+ - changes to handle import logs as well, thru configured winston log level
334
+ - change isMultiSelect to true in solid-core-metadata.json
335
+ - change isMultiSelect to false and set visibility for cronExpression, dayOfWeek, and dayOfMonth fields to false
336
+ - 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
337
+ - removed authTheme setting, auth pages dark - light is now controlled by the same local storage as the rest of the app shell
338
+ - bug fix: passwordless registration should create a user with active false
339
+ - apikeys attribute was not exposed
340
+ - refactor Oauth strategy
341
+ - 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)
342
+ - bug fix
343
+ - null check on role
344
+ - made provision to seed custom permissions
345
+ - handled seed scenario too
346
+ - upload File and expectHidden changes
347
+ - extension user cleanup and checks added
348
+ - fixed types for cleanup
349
+ - added tsc-alias as well to ensure clean imports in dist as an extra cleanup measure
350
+ - fixes bare shell imports with relative imports
351
+ - dynamic import fix
352
+ - removed unnecessary file
353
+ - fixes for 1. throw exception if extension user and no provider configured 2. fixed roles method in the extensionUserProvider interface to make it mandatory
354
+ - removed base abstract class
355
+ - added interface too
356
+ - changes
357
+ - changes to test data seeding & fixed the type for authenticationService.signup method
358
+ - changes to user dto to include the api keys toggle
359
+ - add default role to the user only if there are no roles resolved against a user
360
+ - 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
361
+ - Only forward --debug when explicitly enabled.
362
+ - toolOutput field changes to json
363
+ - adding user api key entity to export
364
+ - minor optimisation to how dynamic modules are loaded
365
+ - Add Discord badge to top of README
366
+ - Fix broken BSL license link and add Discord link to README
367
+ - Add BSL 1.1 license and update package.json license field
368
+ - Seed user and roles in testing data
369
+ - removed readme.txt
370
+ - moved type and interfaces in interfaces.ts and refactored accordingly
371
+ - changed to md
372
+ - added readme
373
+ - Ai setting model change
374
+ - changes to allow encrypting setting keys
375
+ - form view clean up
376
+ - Agent table list view changes
377
+ - synchronize false
378
+ - changes to resolve the selection dynamic provider by name and token both
379
+ - changes to bypass swagger urls from csp policy
380
+ - changes to create a seperate endpoint for admin users to generate api key + custom repository created for userApiKey
381
+ - changes to fix issue around isAllowedToGenerateApiKeys not getting saved during user creation
382
+ - changes to implement the sso code and sso exchange use cases
383
+ - removed orm types / exported api key entity
384
+ - added provision to control if api key creation is allowed for the user
385
+ - api key changes for backend
386
+ - changes to bootstrap helper to read from standard env variables and avoid redundantly passing swagger options
387
+ - fix to call addRoles only if role names are present
388
+ - Revert "revert: refactor: update legacy entity fields to be nullable and support null types"
389
+ - refactor: update legacy entity fields to be nullable and support null types
390
+ - Json structure change
391
+ - Agent table metadata clean up changes
392
+ - longtext
393
+ - longtext changes
394
+ - Agent tables clean up
395
+ - fixes to seed many-to-many relation for tests
396
+ - changes to seed media in testing data
397
+ - Chatter modelUserkey and excel many to one issue
398
+ - keeping the default selectionValueType as string since this is a good default
399
+ - bug fixes around how media is done
400
+ - bug fixes
401
+ - try catch inside logEvent
402
+ - media has card based metadata
403
+ - Refresh token activity
404
+ - changes to implement the sso code and sso exchange use cases
405
+ - cleanup
406
+ - enabled kanban view on mq message
407
+ - Agent table changes
408
+ - changes to disallow deleting a model or module in production
409
+ - changelog version bumped
410
+ - changelog added
411
+ - changes to control the logging using env variables & set appropriate defaults basis environment
412
+ - chnages for logging
413
+ - Chatter queue fixs
414
+ - one more "beta" for ozzy
415
+ - additional loggging in cors helper
416
+ - changes
417
+ - Redis Queue component and rabbitMQ folder changes
418
+ - changes to track old and new fields as part of the delete entity operation
419
+ - optimizations done for audit subcriber
420
+ - changes to optimize audit subscriber code to use background jobs entirely instead of partially
421
+ - changes to push all work/processing to the chatter queue subscriber to better manage workloads & db pooling utilization
422
+ - formatting changes
423
+ - 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
424
+ - qs depth config increased
425
+ - changes to move the shouldTrackAudit check into registry to avoid unnecessary checks during runtime
426
+ - cached model metadata queries
427
+ - changse
428
+ - disabled extra loggign
429
+ - chagnes
430
+ - reduced concurrency in computed fields
431
+ - additional loggign
432
+ - added indexes to mobile & email since those are frequently queries upon
433
+ - changes to optimize the permission service methods used in the hotspot load paths within auth and access token guards
434
+ - Redis background job changes
435
+ - Chatter Rationalizing
436
+ - changes
437
+ - changes
438
+ - changes to merge the entityId sequence computed provider into the existing sequence number provider
439
+ - changes to export bootstrap helpers for server & cli nest applications
440
+ - changes to toggle the validation for selection dynamic provider. Also changes to export a bootstrap helper function
441
+ - registered the EntityIdSequenceNumComputedFieldProvider computation provider as a nest provider
442
+ - Added EntityIdSequenceNumComputedFieldProvider as an alternative simpler provider which uses the modelSequence configuration and relies on the id persisted during creation for an entity
443
+ - added index on message id in mq message table
444
+ - changes around sequence num computed field being a post computation provider error logging in rabbit mq
445
+ - changes to save model sequence id as part of post compute instead of pre compute
446
+ - changse
447
+ - Revert "High concurrency fix for alpha num and sequence num computed fields"
448
+ - High concurrency fix for alpha num and sequence num computed fields
449
+ - bug fix in cron evalutaion
450
+ - tighter logging around roles
451
+ - scheduler now supports env based specific jobs starting and others not
452
+ - reverting back to text (i.e since it is good enough for mysql too) i.e 64kb for these fields
453
+ - revert cross db changes for view-metadata-entity
454
+ - fixes
455
+ - changes to handle cross-db compatibility
456
+ - added type as simple-json
457
+ - Remove isValidateForUpdate hack that relied on checking dto.id !== undefined
458
+ - Revert "Merge branch 'media-update' into 'main'"
459
+ - Mysql related changes
460
+ - ts-morph and media storage fix
461
+ - dashboard layout menu item added
462
+ - dashboard changes
463
+ - scheduler bug fix
464
+ - made provision to execute scheduled jobs manually
465
+ - changes
466
+ - cleanup
467
+ - logging related changes and made user activity history tree view
468
+ - changes to return the wall clock time as utc for chatter as well to keep it...
469
+ - changes around dashboard question refactoring
470
+ - default tree view and action added on code generation
471
+ - Date time format changes in audit
472
+ - user activity history on otp login
473
+ - changes
474
+ - changelog added
475
+ - reverted legacy and common entity to use local date time transformer only
476
+ - added changelog
477
+ - made playwright dependency lazy
478
+ - ai interaction table user is nullable now
479
+ - rabbitmq subscriber does a prefetch now allowing for more concurrency
480
+ - formatting changes
481
+ - Version info changes
482
+ - dummy otp can now be enabled on a per user basis
483
+ - jwt token optimisation
484
+ - optimised the authentication flow in microservice adapter to cache access token
485
+ - deleted file containing secrets
486
+ - changes
487
+ - optimisation around how dummy otp is managed
488
+ - isSeeded added
489
+ - bug fix for fetch layouts
490
+ - view modes added in layout
491
+ - One to many crud manager fixes
492
+ - one-to-many-crud-manager-fixes
493
+ - Many to many crud field manager fixes
494
+ - patch endpoint added in role controller
495
+ - many-to-many field fixes
496
+ - modelSequenceFormViewChangeHandler added on field change
497
+ - changes to convert the passwordlessRegistrationValidateWhat from array to string
498
+ - changes to format group values consistently
499
+ - fixes for normalizing group values
500
+ - Revert "changes to return groupValue in the group meta response as well. groupValue is..."
501
+ - changes to return groupValue in the group meta response as well. groupValue is...
502
+ - changes to return groupValue in the group meta response as well. groupValue is...
503
+ - filter_field_granularity_supported_added_for_date_fields
504
+ - password registration/login cleanup + max failed login attempts checks added
505
+ - removed unsafe inline from CSP
506
+ - removed incorrect comment
507
+ - changes
508
+ - Revert "replaced playwright with lazy dependency"
509
+ - replaced playwright with lazy dependency
510
+ - count and average
511
+ - fixes to solid core metadata configuration
512
+ - make `s3Key` and `isPrivate` properties mandatory in `ResolveS3UrlDto`.
513
+ - solid seed now prints proper exception stack trace
514
+ - added playwright dependencies as peer dependencies
515
+ - changed playwright import to make it lazy
516
+ - issue fixes
517
+ - formatting changes
518
+ - formatting changes
519
+ - changes for test setup
520
+ - package changes
521
+ - Changes to generate an SA user with the default password for simpler experience during setup
522
+ - more changes to support form data based uploads
523
+ - changes
524
+ - changes around testing workflow
525
+ - unified testing utitlities
526
+ - added comments to the slug code
527
+ - refactored queue namespacign
528
+ - queue namespacing related chanes
529
+ - removed todo
530
+ - queue name related changes
531
+ - cag
532
+ - changrs
533
+ - queues names are now namespaced by service naem
534
+ - enabled logs
535
+ - debug logs
536
+ - testing docs updated
537
+ - changes
538
+ - cleanup
539
+ - removed old testing related fiels
540
+ - testing infra now supports data based interpolation
541
+ - testing changes: now we support fully custom test specs
542
+ - changes for test automation
543
+ - changes to tsconfig for playwright tests
544
+ - exporting typeorm db helper
545
+ - removed the files section
546
+ - changes for playwright testing
547
+ - changes to disable service controller seed method
548
+ - formatting changes
549
+ - oom issue
550
+ - logger added for chatter
551
+ - changed arg to kebab case instead of came case in schematic service
552
+ - default menu icons added
553
+ - rabbitmq subscriber: add retries, DLX queues, reconnects, and docs
554
+ - removed un-necessary log
555
+ - fix for handling non existence of fieldNamesForRemoval arg
556
+ - foirmatting canges
557
+ - Archived/solidstarters main
558
+ - version changes
559
+ - changed org : @solidstarters -> @solidxai
560
+ - removed publish script, since it is replaced with solidctl release
561
+ - chanes
562
+ - Revert "@solidstarters namespace changed to @solidx"
563
+ - @solidstarters namespace changed to @solidx
564
+ - file service interface changes
565
+ - CR in s3 file service, url options now supports isPrivateBucket allowing one to generate signed and un-signed URLs using the getUrl method
566
+ - 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
567
+ - changes to pass minimal parameters to the schematics project and pick the rest from the metadata configuration json file (avoid long shell commands)
568
+ - test data workflow
569
+ - test-data command
570
+ - seed command updated
571
+ - changes
572
+ - changes
573
+ - seed command changes to support pruning, test-data-setup and test-data-teardown.
574
+ - seeding now supports seedData allowing us to seed fixtures for testing.
575
+ - precomputations now skip computation if value is already provided
576
+ - added utility for findOneByUserKey
577
+ - pruning related chagnes
578
+ - changes
579
+ - more changes related to pruning metadata
580
+ - pruen logs added
581
+ - module metadata seeder now does prune also
582
+ - reformatting to improve readability
583
+ - changes
584
+ - file type not allowed. Allowed: image, document, pdf. Received mimetype: application/pdf (mapped to file)
585
+ - bug fixes
586
+ - changes to cleanup the implementation by having the write method of file service return the url post write
587
+ - changes to support using the region specified in a media storage provider, instead only the default while creating an s3 client
588
+ - fixes for using the default-aws-s3 bucket for storing the settings media if default file service is s3
589
+ - changes to settings media storage logic i.e copy multer path to file service implementation write
590
+ - file service abstraction cleanup
591
+ - chagnes
592
+ - Dashboard Question Responsive
593
+
3
594
  ## [0.1.13-beta.21] - 2026-08-14
4
595
 
5
596
  ### Added
@@ -1 +1 @@
1
- {"version":3,"file":"LongTextFieldCrudManager.d.ts","sourceRoot":"","sources":["../../../src/helpers/field-crud-managers/LongTextFieldCrudManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEnE,MAAM,WAAW,oBAAoB;IACjC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IACxC,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,wBAAyB,YAAW,gBAAgB;IAC7D,OAAO,CAAC,OAAO,CAAuB;gBAE1B,OAAO,EAAE,oBAAoB;IAIzC,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,eAAe,EAAE;IAKrC,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,sBAAsB;IAO9B,kBAAkB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG;IAKjC,OAAO,CAAC,uBAAuB;IAG/B,OAAO,CAAC,sBAAsB;IAG9B,OAAO,CAAC,yBAAyB;CAGpC"}
1
+ {"version":3,"file":"LongTextFieldCrudManager.d.ts","sourceRoot":"","sources":["../../../src/helpers/field-crud-managers/LongTextFieldCrudManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGnE,MAAM,WAAW,oBAAoB;IACjC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IACxC,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,wBAAyB,YAAW,gBAAgB;IAC7D,OAAO,CAAC,OAAO,CAAuB;gBAE1B,OAAO,EAAE,oBAAoB;IAIzC,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,eAAe,EAAE;IAKrC,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,sBAAsB;IAO9B,kBAAkB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG;IAKjC,OAAO,CAAC,uBAAuB;IAG/B,OAAO,CAAC,sBAAsB;IAG9B,OAAO,CAAC,yBAAyB;CAGpC"}
@@ -2,12 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LongTextFieldCrudManager = void 0;
4
4
  const class_validator_1 = require("class-validator");
5
+ const textFieldCrudManagerUtils_1 = require("./textFieldCrudManagerUtils");
5
6
  class LongTextFieldCrudManager {
6
7
  constructor(options) {
7
8
  this.options = options;
8
9
  }
9
10
  validate(dto) {
10
- const fieldValue = dto[this.options.fieldName];
11
+ const fieldValue = (0, textFieldCrudManagerUtils_1.normalizeTextFieldValue)(dto[this.options.fieldName]);
11
12
  return this.applyValidations(fieldValue);
12
13
  }
13
14
  applyValidations(fieldValue) {
@@ -25,7 +26,7 @@ class LongTextFieldCrudManager {
25
26
  return errors;
26
27
  }
27
28
  transformForCreate(dto) {
28
- return dto;
29
+ return (0, textFieldCrudManagerUtils_1.normalizeTextFieldInDto)(dto, this.options.fieldName);
29
30
  }
30
31
  isApplyStringValidation() {
31
32
  return true;
@@ -1 +1 @@
1
- {"version":3,"file":"LongTextFieldCrudManager.js","sourceRoot":"","sources":["../../../src/helpers/field-crud-managers/LongTextFieldCrudManager.ts"],"names":[],"mappings":";;;AAAA,qDAAyE;AASzE,MAAa,wBAAwB;IAGjC,YAAY,OAA6B;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,QAAQ,CAAC,GAAQ;QACb,MAAM,UAAU,GAAQ,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAEO,gBAAgB,CAAC,UAA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,CAAC;IACO,sBAAsB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;IACxI,CAAC;IACO,yBAAyB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;IACjC,CAAC;CACJ;AA1CD,4DA0CC","sourcesContent":["import { isEmpty, isNotEmpty, isString, matches } from \"class-validator\";\nimport { FieldCrudManager, ValidationError } from \"src/interfaces\";\n\nexport interface LongTextFieldOptions {\n regexPattern: string | undefined | null;\n required: boolean | undefined | null;\n fieldName: string;\n}\n\nexport class LongTextFieldCrudManager implements FieldCrudManager {\n private options: LongTextFieldOptions;\n\n constructor(options: LongTextFieldOptions) {\n this.options = options;\n }\n\n validate(dto: any): ValidationError[] {\n const fieldValue: any = dto[this.options.fieldName];\n return this.applyValidations(fieldValue);\n }\n\n private applyValidations(fieldValue: any): ValidationError[] {\n const errors: ValidationError[] = [];\n this.isApplyRequiredValidation() && isEmpty(fieldValue) ? errors.push({ field: this.options.fieldName, error: `Field: ${this.options.fieldName} is required` }): \"no errors\";\n if (isNotEmpty(fieldValue)) {\n errors.push(...this.applyFormatValidations(fieldValue));\n }\n return errors;\n }\n\n private applyFormatValidations(fieldValue: any): ValidationError[] {\n const errors: ValidationError[] = [];\n this.isApplyStringValidation() && !isString(fieldValue) ? errors.push({ field: this.options.fieldName, error: 'Field is not a string' }) : \"no errors\";\n this.isApplyRegexValidation() && !matches(fieldValue, new RegExp(this.options.regexPattern)) ? errors.push({ field: this.options.fieldName, error: 'Field regex pattern is invalid' }) : \"no errors\";\n return errors;\n }\n\n transformForCreate(dto: any): any {\n return dto;\n }\n\n // Validation to be applied\n private isApplyStringValidation(): boolean {\n return true;\n }\n private isApplyRegexValidation(): boolean {\n return this.options.regexPattern !== null && this.options.regexPattern !== undefined && this.options.regexPattern.trim().length > 0;\n }\n private isApplyRequiredValidation(): boolean {\n return this.options.required;\n }\n}\n"]}
1
+ {"version":3,"file":"LongTextFieldCrudManager.js","sourceRoot":"","sources":["../../../src/helpers/field-crud-managers/LongTextFieldCrudManager.ts"],"names":[],"mappings":";;;AAAA,qDAAyE;AAEzE,2EAA+F;AAQ/F,MAAa,wBAAwB;IAGjC,YAAY,OAA6B;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,QAAQ,CAAC,GAAQ;QACb,MAAM,UAAU,GAAQ,IAAA,mDAAuB,EAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;QAC7E,OAAO,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAEO,gBAAgB,CAAC,UAAe;QACpC,MAAM,MAAM,GAAsB,EAAE,CAAC;QACrC,IAAI,CAAC,yBAAyB,EAAE,IAAI,IAAA,yBAAO,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,IAAI,CAAC,OAAO,CAAC,SAAS,cAAc,EAAE,CAAC,CAAA,CAAC,CAAC,WAAW,CAAC;QAC7K,IAAI,IAAA,4BAAU,EAAC,UAAU,CAAC,EAAE,CAAC;YACzB,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAEO,sBAAsB,CAAC,UAAe;QAC1C,MAAM,MAAM,GAAsB,EAAE,CAAC;QACrC,IAAI,CAAC,uBAAuB,EAAE,IAAI,CAAC,IAAA,0BAAQ,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;QACvJ,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,IAAA,yBAAO,EAAC,UAAU,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,gCAAgC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;QACrM,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,kBAAkB,CAAC,GAAQ;QACvB,OAAO,IAAA,mDAAuB,EAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChE,CAAC;IAGO,uBAAuB;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IACO,sBAAsB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;IACxI,CAAC;IACO,yBAAyB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;IACjC,CAAC;CACJ;AA1CD,4DA0CC","sourcesContent":["import { isEmpty, isNotEmpty, isString, matches } from \"class-validator\";\nimport { FieldCrudManager, ValidationError } from \"src/interfaces\";\nimport { normalizeTextFieldInDto, normalizeTextFieldValue } from \"./textFieldCrudManagerUtils\";\n\nexport interface LongTextFieldOptions {\n regexPattern: string | undefined | null;\n required: boolean | undefined | null;\n fieldName: string;\n}\n\nexport class LongTextFieldCrudManager implements FieldCrudManager {\n private options: LongTextFieldOptions;\n\n constructor(options: LongTextFieldOptions) {\n this.options = options;\n }\n\n validate(dto: any): ValidationError[] {\n const fieldValue: any = normalizeTextFieldValue(dto[this.options.fieldName]);\n return this.applyValidations(fieldValue);\n }\n\n private applyValidations(fieldValue: any): ValidationError[] {\n const errors: ValidationError[] = [];\n this.isApplyRequiredValidation() && isEmpty(fieldValue) ? errors.push({ field: this.options.fieldName, error: `Field: ${this.options.fieldName} is required` }): \"no errors\";\n if (isNotEmpty(fieldValue)) {\n errors.push(...this.applyFormatValidations(fieldValue));\n }\n return errors;\n }\n\n private applyFormatValidations(fieldValue: any): ValidationError[] {\n const errors: ValidationError[] = [];\n this.isApplyStringValidation() && !isString(fieldValue) ? errors.push({ field: this.options.fieldName, error: 'Field is not a string' }) : \"no errors\";\n this.isApplyRegexValidation() && !matches(fieldValue, new RegExp(this.options.regexPattern)) ? errors.push({ field: this.options.fieldName, error: 'Field regex pattern is invalid' }) : \"no errors\";\n return errors;\n }\n\n transformForCreate(dto: any): any {\n return normalizeTextFieldInDto(dto, this.options.fieldName);\n }\n\n // Validation to be applied\n private isApplyStringValidation(): boolean {\n return true;\n }\n private isApplyRegexValidation(): boolean {\n return this.options.regexPattern !== null && this.options.regexPattern !== undefined && this.options.regexPattern.trim().length > 0;\n }\n private isApplyRequiredValidation(): boolean {\n return this.options.required;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ShortTextFieldCrudManager.d.ts","sourceRoot":"","sources":["../../../src/helpers/field-crud-managers/ShortTextFieldCrudManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEnE,MAAM,WAAW,qBAAqB;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAClC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IACxC,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa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CAAC,sBAAsB;IAG9B,OAAO,CAAC,yBAAyB;CAGpC"}
@@ -2,12 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ShortTextFieldCrudManager = void 0;
4
4
  const class_validator_1 = require("class-validator");
5
+ const textFieldCrudManagerUtils_1 = require("./textFieldCrudManagerUtils");
5
6
  class ShortTextFieldCrudManager {
6
7
  constructor(options) {
7
8
  this.options = options;
8
9
  }
9
10
  validate(dto, _files) {
10
- const fieldValue = dto[this.options.fieldName];
11
+ const fieldValue = (0, textFieldCrudManagerUtils_1.normalizeTextFieldValue)(dto[this.options.fieldName]);
11
12
  return this.applyValidations(fieldValue);
12
13
  }
13
14
  applyValidations(fieldValue) {
@@ -26,7 +27,7 @@ class ShortTextFieldCrudManager {
26
27
  return errors;
27
28
  }
28
29
  transformForCreate(dto) {
29
- return dto;
30
+ return (0, textFieldCrudManagerUtils_1.normalizeTextFieldInDto)(dto, this.options.fieldName);
30
31
  }
31
32
  isApplyStringValidation() {
32
33
  return true;
@@ -1 +1 @@
1
- {"version":3,"file":"ShortTextFieldCrudManager.js","sourceRoot":"","sources":["../../../src/helpers/field-crud-managers/ShortTextFieldCrudManager.ts"],"names":[],"mappings":";;;AAAA,qDAAiF;AAUjF,MAAa,yBAAyB;IAGlC,YAAY,OAA8B;QACtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,QAAQ,CAAC,GAAQ,EAAG,MAAiC;QACjD,MAAM,UAAU,GAAQ,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAGO,gBAAgB,CAAC,UAAe;QACpC,MAAM,MAAM,GAAsB,EAAE,CAAC;QACrC,IAAI,CAAC,yBAAyB,EAAE,IAAI,IAAA,yBAAO,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,C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,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,kBAAkB,CAAC,GAAQ;QACvB,OAAO,GAAG,CAAC;IACf,CAAC;IAGO,uBAAuB;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IACO,uBAAuB;QAC3B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACrC,CAAC;IACO,sBAAsB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;IACxI,CAAC;IACO,yBAAyB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;IACjC,CAAC;CACJ;AA/CD,8DA+CC","sourcesContent":["import { isEmpty, isNotEmpty, isString, length, matches } from \"class-validator\";\nimport { FieldCrudManager, ValidationError } from \"src/interfaces\";\n\nexport interface ShortTextFieldOptions {\n length: number | undefined | null;\n regexPattern: string | undefined | null;\n required: boolean | undefined | null;\n fieldName: string;\n}\n\nexport class ShortTextFieldCrudManager implements FieldCrudManager {\n private options: ShortTextFieldOptions;\n\n constructor(options: ShortTextFieldOptions) {\n this.options = options;\n }\n\n validate(dto: any, _files:Array<Express.Multer.File>): ValidationError[] {\n const fieldValue: any = dto[this.options.fieldName];\n return this.applyValidations(fieldValue);\n }\n\n\n private applyValidations(fieldValue: any): ValidationError[] {\n const errors: ValidationError[] = [];\n this.isApplyRequiredValidation() && isEmpty(fieldValue) ? errors.push({ field: this.options.fieldName, error: `Field: ${this.options.fieldName} is required` }): \"no errors\";\n if (isNotEmpty(fieldValue)) {\n errors.push(...this.applyFormatValidations(fieldValue));\n }\n return errors;\n }\n\n private applyFormatValidations(fieldValue: any): ValidationError[] {\n const errors: ValidationError[] = [];\n this.isApplyStringValidation() && !isString(fieldValue) ? errors.push({ field: this.options.fieldName, error: 'Field is not a string' }) : \"no errors\";\n this.isApplyLengthValidation() && !length(fieldValue, 1, this.options.length) ? errors.push({ field: this.options.fieldName, error: 'Field length is invalid' }) : \"no errors\"; //FIXME min length to be handled\n this.isApplyRegexValidation() && !matches(fieldValue, new RegExp(this.options.regexPattern)) ? errors.push({ field: this.options.fieldName, error: 'Field regex pattern is invalid' }) : \"no errors\";\n return errors;\n }\n\n transformForCreate(dto: any): any {\n return dto;\n }\n\n // Validation to be applied\n private isApplyStringValidation(): boolean {\n return true;\n }\n private isApplyLengthValidation(): boolean {\n return (this.options.length > 0);\n }\n private isApplyRegexValidation(): boolean {\n return this.options.regexPattern !== null && this.options.regexPattern !== undefined && this.options.regexPattern.trim().length > 0;\n }\n private isApplyRequiredValidation(): boolean {\n return this.options.required;\n }\n}"]}
1
+ {"version":3,"file":"ShortTextFieldCrudManager.js","sourceRoot":"","sources":["../../../src/helpers/field-crud-managers/ShortTextFieldCrudManager.ts"],"names":[],"mappings":";;;AAAA,qDAAiF;AAEjF,2EAA+F;AAS/F,MAAa,yBAAyB;IAGlC,YAAY,OAA8B;QACtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,QAAQ,CAAC,GAAQ,EAAG,MAAiC;QACjD,MAAM,UAAU,GAAQ,IAAA,mDAAuB,EAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;QAC7E,OAAO,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAGO,gBAAgB,CAAC,UAAe;QACpC,MAAM,MAAM,GAAsB,EAAE,CAAC;QACrC,IAAI,CAAC,yBAAyB,EAAE,IAAI,IAAA,yBAAO,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,IAAI,CAAC,OAAO,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,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChE,CAAC;IAGO,uBAAuB;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IACO,uBAAuB;QAC3B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACrC,CAAC;IACO,sBAAsB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;IACxI,CAAC;IACO,yBAAyB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;IACjC,CAAC;CACJ;AA/CD,8DA+CC","sourcesContent":["import { isEmpty, isNotEmpty, isString, length, matches } from \"class-validator\";\nimport { FieldCrudManager, ValidationError } from \"src/interfaces\";\nimport { normalizeTextFieldInDto, normalizeTextFieldValue } from \"./textFieldCrudManagerUtils\";\n\nexport interface ShortTextFieldOptions {\n length: number | undefined | null;\n regexPattern: string | undefined | null;\n required: boolean | undefined | null;\n fieldName: string;\n}\n\nexport class ShortTextFieldCrudManager implements FieldCrudManager {\n private options: ShortTextFieldOptions;\n\n constructor(options: ShortTextFieldOptions) {\n this.options = options;\n }\n\n validate(dto: any, _files:Array<Express.Multer.File>): ValidationError[] {\n const fieldValue: any = normalizeTextFieldValue(dto[this.options.fieldName]);\n return this.applyValidations(fieldValue);\n }\n\n\n private applyValidations(fieldValue: any): ValidationError[] {\n const errors: ValidationError[] = [];\n this.isApplyRequiredValidation() && isEmpty(fieldValue) ? errors.push({ field: this.options.fieldName, error: `Field: ${this.options.fieldName} is required` }): \"no errors\";\n if (isNotEmpty(fieldValue)) {\n errors.push(...this.applyFormatValidations(fieldValue));\n }\n return errors;\n }\n\n private applyFormatValidations(fieldValue: any): ValidationError[] {\n const errors: ValidationError[] = [];\n this.isApplyStringValidation() && !isString(fieldValue) ? errors.push({ field: this.options.fieldName, error: 'Field is not a string' }) : \"no errors\";\n this.isApplyLengthValidation() && !length(fieldValue, 1, this.options.length) ? errors.push({ field: this.options.fieldName, error: 'Field length is invalid' }) : \"no errors\"; //FIXME min length to be handled\n this.isApplyRegexValidation() && !matches(fieldValue, new RegExp(this.options.regexPattern)) ? errors.push({ field: this.options.fieldName, error: 'Field regex pattern is invalid' }) : \"no errors\";\n return errors;\n }\n\n transformForCreate(dto: any): any {\n return normalizeTextFieldInDto(dto, this.options.fieldName);\n }\n\n // Validation to be applied\n private isApplyStringValidation(): boolean {\n return true;\n }\n private isApplyLengthValidation(): boolean {\n return (this.options.length > 0);\n }\n private isApplyRegexValidation(): boolean {\n return this.options.regexPattern !== null && this.options.regexPattern !== undefined && this.options.regexPattern.trim().length > 0;\n }\n private isApplyRequiredValidation(): boolean {\n return this.options.required;\n }\n}"]}
@@ -0,0 +1,3 @@
1
+ export declare const normalizeTextFieldValue: (fieldValue: any) => any;
2
+ export declare const normalizeTextFieldInDto: (dto: any, fieldName?: string | null) => any;
3
+ //# sourceMappingURL=textFieldCrudManagerUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textFieldCrudManagerUtils.d.ts","sourceRoot":"","sources":["../../../src/helpers/field-crud-managers/textFieldCrudManagerUtils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,GAAI,YAAY,GAAG,KAAG,GAEzD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,KAAK,GAAG,EAAE,YAAY,MAAM,GAAG,IAAI,KAAG,GAO7E,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeTextFieldInDto = exports.normalizeTextFieldValue = void 0;
4
+ const class_validator_1 = require("class-validator");
5
+ const normalizeTextFieldValue = (fieldValue) => {
6
+ return (0, class_validator_1.isString)(fieldValue) ? fieldValue.trim() : fieldValue;
7
+ };
8
+ exports.normalizeTextFieldValue = normalizeTextFieldValue;
9
+ const normalizeTextFieldInDto = (dto, fieldName) => {
10
+ if (!fieldName || !Object.prototype.hasOwnProperty.call(dto, fieldName)) {
11
+ return dto;
12
+ }
13
+ dto[fieldName] = (0, exports.normalizeTextFieldValue)(dto[fieldName]);
14
+ return dto;
15
+ };
16
+ exports.normalizeTextFieldInDto = normalizeTextFieldInDto;
17
+ //# sourceMappingURL=textFieldCrudManagerUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textFieldCrudManagerUtils.js","sourceRoot":"","sources":["../../../src/helpers/field-crud-managers/textFieldCrudManagerUtils.ts"],"names":[],"mappings":";;;AAAA,qDAA2C;AAEpC,MAAM,uBAAuB,GAAG,CAAC,UAAe,EAAO,EAAE;IAC5D,OAAO,IAAA,0BAAQ,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;AACjE,CAAC,CAAC;AAFW,QAAA,uBAAuB,2BAElC;AAEK,MAAM,uBAAuB,GAAG,CAAC,GAAQ,EAAE,SAAyB,EAAO,EAAE;IAChF,IAAI,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,CAAC;QACtE,OAAO,GAAG,CAAC;IACf,CAAC;IAED,GAAG,CAAC,SAAS,CAAC,GAAG,IAAA,+BAAuB,EAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;IACzD,OAAO,GAAG,CAAC;AACf,CAAC,CAAC;AAPW,QAAA,uBAAuB,2BAOlC","sourcesContent":["import { isString } from \"class-validator\";\n\nexport const normalizeTextFieldValue = (fieldValue: any): any => {\n return isString(fieldValue) ? fieldValue.trim() : fieldValue;\n};\n\nexport const normalizeTextFieldInDto = (dto: any, fieldName?: string | null): any => {\n if (!fieldName || !Object.prototype.hasOwnProperty.call(dto, fieldName)) {\n return dto;\n }\n\n dto[fieldName] = normalizeTextFieldValue(dto[fieldName]);\n return dto;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidxai/core",
3
- "version": "0.1.13-beta.21",
3
+ "version": "0.1.13-beta.22",
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",
@@ -1,5 +1,6 @@
1
1
  import { isEmpty, isNotEmpty, isString, matches } from "class-validator";
2
2
  import { FieldCrudManager, ValidationError } from "src/interfaces";
3
+ import { normalizeTextFieldInDto, normalizeTextFieldValue } from "./textFieldCrudManagerUtils";
3
4
 
4
5
  export interface LongTextFieldOptions {
5
6
  regexPattern: string | undefined | null;
@@ -15,7 +16,7 @@ export class LongTextFieldCrudManager implements FieldCrudManager {
15
16
  }
16
17
 
17
18
  validate(dto: any): ValidationError[] {
18
- const fieldValue: any = dto[this.options.fieldName];
19
+ const fieldValue: any = normalizeTextFieldValue(dto[this.options.fieldName]);
19
20
  return this.applyValidations(fieldValue);
20
21
  }
21
22
 
@@ -36,7 +37,7 @@ export class LongTextFieldCrudManager implements FieldCrudManager {
36
37
  }
37
38
 
38
39
  transformForCreate(dto: any): any {
39
- return dto;
40
+ return normalizeTextFieldInDto(dto, this.options.fieldName);
40
41
  }
41
42
 
42
43
  // Validation to be applied
@@ -1,5 +1,6 @@
1
1
  import { isEmpty, isNotEmpty, isString, length, matches } from "class-validator";
2
2
  import { FieldCrudManager, ValidationError } from "src/interfaces";
3
+ import { normalizeTextFieldInDto, normalizeTextFieldValue } from "./textFieldCrudManagerUtils";
3
4
 
4
5
  export interface ShortTextFieldOptions {
5
6
  length: number | undefined | null;
@@ -16,7 +17,7 @@ export class ShortTextFieldCrudManager implements FieldCrudManager {
16
17
  }
17
18
 
18
19
  validate(dto: any, _files:Array<Express.Multer.File>): ValidationError[] {
19
- const fieldValue: any = dto[this.options.fieldName];
20
+ const fieldValue: any = normalizeTextFieldValue(dto[this.options.fieldName]);
20
21
  return this.applyValidations(fieldValue);
21
22
  }
22
23
 
@@ -39,7 +40,7 @@ export class ShortTextFieldCrudManager implements FieldCrudManager {
39
40
  }
40
41
 
41
42
  transformForCreate(dto: any): any {
42
- return dto;
43
+ return normalizeTextFieldInDto(dto, this.options.fieldName);
43
44
  }
44
45
 
45
46
  // Validation to be applied
@@ -0,0 +1,14 @@
1
+ import { isString } from "class-validator";
2
+
3
+ export const normalizeTextFieldValue = (fieldValue: any): any => {
4
+ return isString(fieldValue) ? fieldValue.trim() : fieldValue;
5
+ };
6
+
7
+ export const normalizeTextFieldInDto = (dto: any, fieldName?: string | null): any => {
8
+ if (!fieldName || !Object.prototype.hasOwnProperty.call(dto, fieldName)) {
9
+ return dto;
10
+ }
11
+
12
+ dto[fieldName] = normalizeTextFieldValue(dto[fieldName]);
13
+ return dto;
14
+ };