Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
339 commits
Select commit Hold shift + click to select a range
606143c
Decimal decorator validation WIP
frandevaux Aug 26, 2025
566df3c
Merge remote-tracking branch 'origin/main' into feature/numberAndMone…
frandevaux Aug 26, 2025
4959f6c
test config
lucianomasuelli Aug 26, 2025
ab8a01d
Decimal conversion to JSON WIP
frandevaux Aug 26, 2025
552c892
Delete custom validations and add tests to cover possible cases for r…
ElPelado619 Aug 27, 2025
9c72fb4
Split types in different files, add index.ts to have a single import …
ElPelado619 Aug 27, 2025
8fdea82
Update metadata key for Email and HTML decorators from 'field:logical…
ElPelado619 Aug 27, 2025
2b2e561
Merge branch 'feature/textTypes' into feature/dateTimeType
ElPelado619 Aug 27, 2025
c7e8ea0
Update structure of Date Time types
ElPelado619 Aug 27, 2025
3c1ae24
Add new Boolean type
ElPelado619 Aug 27, 2025
67c42af
Add new Choice type
ElPelado619 Aug 27, 2025
5299ebe
Refactor tests for easier readability and addition of new ones
ElPelado619 Aug 27, 2025
2be7a5c
Decimal decorator implementation using financial-number library
frandevaux Aug 27, 2025
c3d28db
Money decorator implementation
frandevaux Aug 27, 2025
41c9e1f
Updated TypeScript settings and Jest configuration.
lucianomasuelli Aug 27, 2025
5e063bb
Reversed some `tsconfig.json` changes to default because the problem …
lucianomasuelli Aug 27, 2025
d481c4e
Integer implementation and test reorganization
frandevaux Aug 27, 2025
2a8dc4c
Add initial version of Relationship type
ElPelado619 Aug 27, 2025
6c9e283
Modify fromJSON() to fill default and calculated values; add tests
ElPelado619 Aug 28, 2025
0c79b90
Add ValidateNested from class-validator and add tests to check comple…
ElPelado619 Aug 28, 2025
c27f93f
distinguish between undefined and null states during serialization an…
ElPelado619 Aug 29, 2025
57fc74f
Merge pull request #16 from slingr-stack/feature/textTypes
ElPelado619 Aug 29, 2025
f996c3f
Merge pull request #21 from slingr-stack/feature/dateTimeType
ElPelado619 Aug 29, 2025
fed37d0
Merge pull request #23 from slingr-stack/feature/boolChoiceTypes
ElPelado619 Aug 29, 2025
0652cb3
Merge branch 'main' into feature/numberAndMoneyTypes
ElPelado619 Aug 29, 2025
8a48fc6
Add exports to index.ts and remove unused code
ElPelado619 Aug 29, 2025
983ba0b
Merge pull request #24 from slingr-stack/feature/numberAndMoneyTypes
ElPelado619 Aug 29, 2025
2eb7126
Merge branch 'main' into feature/relationshipType
ElPelado619 Aug 29, 2025
fffe076
Add basic data source connection and initialization
ElPelado619 Aug 29, 2025
146f526
I added two test to make sure undefined fields and null fields remain…
dgaviola Aug 31, 2025
77a27b9
Merge branch 'main' into test-link
lucianomasuelli Sep 1, 2025
71127c6
Updated index.ts
lucianomasuelli Sep 1, 2025
bfc2229
Merge pull request #22 from slingr-stack/test-link
lucianomasuelli Sep 1, 2025
290834e
set exposeDefaultValue to true and change null values handling
ElPelado619 Sep 1, 2025
551f43d
Merge branch 'feature/relationshipType' of https://github.com/slingr-…
ElPelado619 Sep 1, 2025
8ae48bf
Merge branch 'main' into feature/relationshipType
ElPelado619 Sep 1, 2025
f1f605c
Merge branch 'main' into feature/complexObjects
ElPelado619 Sep 1, 2025
04e2594
Fix import paths in DecimalMoneyModel and NumberIntegerModel for cons…
ElPelado619 Sep 1, 2025
75363a1
Merge branch 'main' into feature/basicDataSource
ElPelado619 Sep 1, 2025
0cd149b
Changed index.ts location and updated package.json
lucianomasuelli Sep 1, 2025
dcfab5c
Initial plan
Copilot Sep 1, 2025
164cd0d
Create comprehensive Copilot instructions for Slingr Framework
Copilot Sep 1, 2025
114be7d
Complete comprehensive Copilot instructions with validation
Copilot Sep 1, 2025
f412c76
Separate decimal and relationship exports with newline
ElPelado619 Sep 1, 2025
2b1c873
Update single line imports
ElPelado619 Sep 1, 2025
2510fcd
Fix import path for SharedTypes and format exports in index.ts
ElPelado619 Sep 1, 2025
2836b9c
Update .github/copilot-instructions.md
sebasmoyano Sep 1, 2025
473d902
Update copilot-instructions.md
sebasmoyano Sep 1, 2025
239f688
Delete src/model/types/SharedTypes.ts
sebasmoyano Sep 1, 2025
d9831b3
Delete src/model/types/index.ts
sebasmoyano Sep 1, 2025
0103720
Merge pull request #36 from slingr-stack/copilot/fix-35
sebasmoyano Sep 1, 2025
9c10e53
Merge pull request #25 from slingr-stack/feature/relationshipType
ElPelado619 Sep 2, 2025
87a0532
Merge branch 'main' into feature/complexObjects
ElPelado619 Sep 2, 2025
8c69fef
Merge pull request #26 from slingr-stack/feature/complexObjects
ElPelado619 Sep 2, 2025
f725bce
Merge branch 'main' into feature/basicDataSource
ElPelado619 Sep 2, 2025
1deff89
Add Model and Fields Config for TypeORM
ElPelado619 Sep 2, 2025
adc187a
Add SQLite Database Operations
ElPelado619 Sep 2, 2025
a8fe157
Refactor ValidationIssue from interface to type
ElPelado619 Sep 2, 2025
486e553
Fix file system import
ElPelado619 Sep 3, 2025
7846f9c
Set nullable to false if field is required
ElPelado619 Sep 3, 2025
3c53439
Add support for HTML arrays
ElPelado619 Sep 3, 2025
40a7527
Add array suppor for text types and enhance project structure
ElPelado619 Sep 3, 2025
f3d8dbe
Implement array field support in TypeORM data source and enhance vali…
ElPelado619 Sep 3, 2025
4244426
Merge pull request #29 from slingr-stack/feature/basicDataSource
ElPelado619 Sep 3, 2025
c0a64ce
Refactor TypeORM data source to split responsibilities and concerns
ElPelado619 Sep 3, 2025
63f5cb2
Add support and tests for PostgreSQL and MySQL
ElPelado619 Sep 3, 2025
77937eb
Merge pull request #38 from slingr-stack/feature/modelFieldConfigDS
ElPelado619 Sep 4, 2025
11a9708
Add methods with same params as TypeORM's Repository
ElPelado619 Sep 4, 2025
6899433
Implement field type configuration system for TypeORM mapping
ElPelado619 Sep 4, 2025
c02195b
Add tests to understand the behavior of array querys
ElPelado619 Sep 4, 2025
0fe3e78
Enhance ArrayFieldManager to improve array field handling and caching
ElPelado619 Sep 4, 2025
787cb54
Enhance ArrayEntityFactory and ArrayFieldManager to support parent-ch…
ElPelado619 Sep 4, 2025
7001e7b
Enhance ArrayFieldManager and TypeORMSqlDataSource to support OneToMa…
ElPelado619 Sep 5, 2025
431ab09
Merge branch 'feature/arrayPersistence' into feature/dbSupport
ElPelado619 Sep 5, 2025
c0391b6
Added Pull Request template
frandevaux Sep 5, 2025
ba54187
Add DateTimeRange support and enhance financial number handling in Ty…
ElPelado619 Sep 5, 2025
ba0f8ab
Add relationship persistence and shortcuts for reference and composition
ElPelado619 Sep 5, 2025
2134076
Update save method and reduce ArrayFieldManager size
ElPelado619 Sep 8, 2025
06e2669
Enhance ArrayFieldManager and TypeORMSqlDataSource to support automat…
ElPelado619 Sep 8, 2025
3216bbb
Update package.json and tsconfig files for improved module resolution…
ElPelado619 Sep 9, 2025
13f914b
Merge branch 'main' into fix/projectSettings
ElPelado619 Sep 9, 2025
0d078c9
Refactor import statements in Task model for consistency
ElPelado619 Sep 9, 2025
6588cd5
Refactor imports in test files and BlogPost model for consistency
ElPelado619 Sep 9, 2025
a0651e6
Update DecimalTypeConfig to dynamically set precision based on max value
ElPelado619 Sep 9, 2025
b99ab7a
Update MoneyTypeConfig to dynamically set precision based on max value
ElPelado619 Sep 9, 2025
75945b7
Enhance FinancialNumberTransformer to log conversion errors and impro…
ElPelado619 Sep 9, 2025
c5b2b4f
Merge branch 'feature/arrayPersistence' into feature/dbSupport
ElPelado619 Sep 9, 2025
2b59c32
Merge branch 'feature/dbSupport' into feature/complexPersistence
ElPelado619 Sep 9, 2025
ba67543
Adds addComposition command
lucianomasuelli Sep 9, 2025
ba5e696
Initial plan
Copilot Sep 9, 2025
c9e8c5c
Implement Field decorator without parameters support
Copilot Sep 9, 2025
67dc59d
Merge pull request #49 from slingr-stack/copilot/fix-47
sebasmoyano Sep 10, 2025
5e88bb3
Merge pull request #39 from slingr-stack/feature/arrayPersistence
ElPelado619 Sep 10, 2025
237471c
Refactor import statements in FieldDecorator tests for consistency
ElPelado619 Sep 10, 2025
1ed40a5
Merge pull request #40 from slingr-stack/feature/dbSupport
ElPelado619 Sep 10, 2025
f283785
Refactor DateTimeRangeFieldManager to make hidden column properties n…
ElPelado619 Sep 10, 2025
17fe741
Merge branch 'feature/complexPersistence' into feature/relationshipPe…
ElPelado619 Sep 10, 2025
3ff99e0
Merge branch 'main' into feature/complexPersistence
ElPelado619 Sep 10, 2025
858da91
Merge branch 'feature/complexPersistence' into feature/relationshipPe…
ElPelado619 Sep 10, 2025
5888734
Implement embedded model support with Embedded decorator and update r…
ElPelado619 Sep 10, 2025
e488bfa
Remove DateTimeRangeTypeConfig and its registration from the DateTime…
ElPelado619 Sep 10, 2025
dfd71c3
Enhance DateTimeRangeKey type to support arrays and add tests for Dat…
ElPelado619 Sep 10, 2025
8429034
Restrict @DateTimeRange decorator to accept only DateTimeRange or Dat…
ElPelado619 Sep 10, 2025
591c988
Remove redundant Expose decorator from Decimal and Money
ElPelado619 Sep 10, 2025
fe760cd
Added utility commands to cache
lucianomasuelli Sep 10, 2025
6882ac3
Updated the support for calling the addComposition command from the e…
lucianomasuelli Sep 10, 2025
aed9dd1
Adjustments in the addComposition command.
lucianomasuelli Sep 10, 2025
ba876a9
Implement DateTimeRange transformer and enhance validation for array …
ElPelado619 Sep 10, 2025
b2840ba
Implement OneToOne relationship for single composition in Relationshi…
ElPelado619 Sep 10, 2025
dfc5a13
Adds the addReference command
lucianomasuelli Sep 10, 2025
7ddb299
Added logic to insert data source import correctly
lucianomasuelli Sep 10, 2025
73bdbe4
Rename (openStart, openEnd) to (from, to)
ElPelado619 Sep 11, 2025
bcc8982
Rename DateTimeRangeType to DateTimeRangeValue across the codebase
ElPelado619 Sep 11, 2025
0623128
Add dateTimeRange convenience function for DateTimeRangeValue creation
ElPelado619 Sep 11, 2025
3656fb7
Added logic to focus on the newly created fields. Improved imports ma…
lucianomasuelli Sep 11, 2025
a2b9255
Add support for multiple embedded entities
ElPelado619 Sep 11, 2025
60e68ad
Update test/model/NestedEmbeddingModels.ts
ElPelado619 Sep 11, 2025
dd9c6a5
Update src/datasources/typeorm/TypeORMSqlDataSource.ts
ElPelado619 Sep 11, 2025
288dd3b
Refactor metadata retrieval in Model decorator for improved clarity a…
ElPelado619 Sep 11, 2025
ef5c468
Update on the cache change listener.
lucianomasuelli Sep 11, 2025
94e57f1
Adds the changeReferenceToComposition command.
lucianomasuelli Sep 11, 2025
9af930a
Adds logic to remove imports when a model is inserted in anothers file.
lucianomasuelli Sep 11, 2025
c3228fe
Removed manual explorer refresh
lucianomasuelli Sep 11, 2025
def73b3
Merge remote-tracking branch 'origin/fixDeleteModel' into relationshi…
lucianomasuelli Sep 12, 2025
34c604b
Initial plan
Copilot Sep 12, 2025
f0d5e96
Refactor core model and number field type metadata keys to use constants
Copilot Sep 12, 2025
0962ce7
Refactor all field type decorators to use metadata constants
Copilot Sep 12, 2025
13af59f
Complete metadata key refactoring for all datasource and utility files
Copilot Sep 12, 2025
ee09fe9
Merge pull request #51 from slingr-stack/copilot/fix-45
jguardiolagarcia Sep 12, 2025
44e839d
Add financial-arithmetic-functions fork as dependency
ElPelado619 Sep 12, 2025
adf06cb
Merge branch 'main' into fix/financialArithmetic
ElPelado619 Sep 12, 2025
2df2316
Merge branch 'main' into feature/complexPersistence
ElPelado619 Sep 12, 2025
97dd9fd
Refactor metadata keys to use constants for design types and improve …
ElPelado619 Sep 12, 2025
1cc84b4
Refactor metadata keys to use constants for improved consistency acro…
ElPelado619 Sep 12, 2025
40cf273
fix quick infor preview for reference and composition
Gaviola Sep 12, 2025
2a5bbcf
Add TODO comment to DateTimeRangeValueConfig for future database support
ElPelado619 Sep 12, 2025
3d608ed
Merge branch 'feature/complexPersistence' into feature/relationshipPe…
ElPelado619 Sep 12, 2025
754db5e
Fix import path for BaseModel in Relationship.ts
ElPelado619 Sep 12, 2025
20dd79d
Refactor metadata keys in TypeORM and relationship handling for impro…
ElPelado619 Sep 12, 2025
084fd9d
Add financial-arithmetic-functions dependency and enable noUncheckedI…
ElPelado619 Sep 12, 2025
961df4a
Merge branch 'feature/relationshipPersistence' into feature/embedding…
ElPelado619 Sep 12, 2025
b1aa44f
Refactor some metadata keys for embedded fields in TypeORM to improve…
ElPelado619 Sep 15, 2025
105c9e0
Merge pull request #42 from slingr-stack/feature/complexPersistence
ElPelado619 Sep 15, 2025
884a1d3
Enhance cascade options in RelationshipFieldManager to include 'remov…
ElPelado619 Sep 15, 2025
10d6f66
Merge pull request #46 from slingr-stack/fix/projectSettings
ElPelado619 Sep 15, 2025
2820c02
Merge pull request #52 from slingr-stack/fix/financialArithmetic
ElPelado619 Sep 15, 2025
79fe647
Refactor remaining metadata keys in TypeORM and test files
ElPelado619 Sep 15, 2025
464418b
Updated to manage correctly the field extraction and choice fields enum.
lucianomasuelli Sep 15, 2025
afe08d1
Refactored the commands registration.
lucianomasuelli Sep 15, 2025
f705b60
Added changeCompositionToReference command.
lucianomasuelli Sep 15, 2025
beba125
Merge branch 'relationshipsManagement' of github.com:slingr-stack/vs-…
lucianomasuelli Sep 15, 2025
24d81fa
Implement managed schema support and automatic synchronization for Ty…
ElPelado619 Sep 15, 2025
d4060a1
Merge remote-tracking branch 'origin/fixDeleteModel' into relationshi…
lucianomasuelli Sep 15, 2025
afc021f
Refactor age field validation in UserV2 model to use decorators inste…
ElPelado619 Sep 15, 2025
1fcbf4c
Enhance configuration validation for TypeORM data source to include e…
ElPelado619 Sep 15, 2025
b56d72a
Refactor financial number handling to use aliases for consistency in …
ElPelado619 Sep 15, 2025
95630b1
Fix: now the changeCompositionToReference command removes the model f…
lucianomasuelli Sep 15, 2025
8281997
Initial plan
Copilot Sep 16, 2025
eb13590
Fix data source initialization to not require parameters
Copilot Sep 16, 2025
667428f
Simplify relationship assertion in SimpleRelationshipTest by removing…
ElPelado619 Sep 16, 2025
b278313
Merge pull request #43 from slingr-stack/feature/relationshipPersistence
ElPelado619 Sep 16, 2025
2eba9a1
Merge branch 'main' into feature/embeddingAndInheritance
ElPelado619 Sep 16, 2025
85749d2
Update default loading behavior for Reference options and enhance rel…
ElPelado619 Sep 16, 2025
bd6d633
Add Department and Employee models with eager loading relationships t…
ElPelado619 Sep 16, 2025
f3166a2
Add parent-centric composition operations tests for Task and TaskNote…
ElPelado619 Sep 16, 2025
066f3c1
Merge branch 'main' into feature/schemaMigrations
ElPelado619 Sep 16, 2025
9998d4b
Merge pull request #54 from slingr-stack/feature/schemaMigrations
ElPelado619 Sep 16, 2025
6334dd8
Merge branch 'main' into feature/decimalMoneyHelpers
ElPelado619 Sep 16, 2025
c0acfdc
Merge pull request #55 from slingr-stack/feature/decimalMoneyHelpers
ElPelado619 Sep 16, 2025
715a061
Merge pull request #60 from slingr-stack/copilot/fix-59
ElPelado619 Sep 16, 2025
32b95c8
Update src/model/types/relationship/Relationship.ts
ElPelado619 Sep 16, 2025
aa43ae9
Update test/types_tests/RelationshipPersistence.test.ts
ElPelado619 Sep 16, 2025
ba4d676
Implement UUID v7 generation for entity IDs and update dependencies
ElPelado619 Sep 16, 2025
a585f22
Fix findOneById test to ensure saved.id is not null
ElPelado619 Sep 16, 2025
161a868
Update src/model/PersistentModel.ts
ElPelado619 Sep 16, 2025
502de3f
Added support for selecting and reordering multiple fields in the exp…
lucianomasuelli Sep 17, 2025
35cb842
Refactor persistence tests to ensure entities are reloaded after savi…
ElPelado619 Sep 17, 2025
5d3530a
Merge pull request #61 from slingr-stack/fix/relationshipPersistence
ElPelado619 Sep 17, 2025
6be60da
Adds extractFields commands (to be adjusted).
lucianomasuelli Sep 17, 2025
71cad30
Update package.json to include 'files' field and add 'prepare' script…
ElPelado619 Sep 17, 2025
1448d4a
Merge pull request #62 from slingr-stack/feature/betterUUID
sebasmoyano Sep 17, 2025
79848cd
Refactor RelationshipPersistence tests to simplify task saving and re…
ElPelado619 Sep 17, 2025
5160d16
Merge pull request #63 from slingr-stack/fix/packagePrepare
sebasmoyano Sep 17, 2025
c9e5773
Update .gitignore, package.json, and TypeScript configuration; refact…
ElPelado619 Sep 17, 2025
831025e
The extractFieldToComposition command is now handled by the RefactorC…
lucianomasuelli Sep 17, 2025
81d4926
Merge pull request #66 from slingr-stack/fix/frameworkBuild
ElPelado619 Sep 18, 2025
e621e68
Merge branch 'master' into relationshipsManagement
lucianomasuelli Sep 19, 2025
7fcc761
Adds interfaces
lucianomasuelli Sep 19, 2025
7de9aa4
Merge branch 'master' into relationshipsManagement
lucianomasuelli Sep 19, 2025
5938c7a
Fixed RefactorController workspaceEdit changes management and updated…
lucianomasuelli Sep 19, 2025
b70559c
Fixed extractFieldsToCompositionTool to add correctly the edits and u…
lucianomasuelli Sep 19, 2025
12545fd
Fixed changeCompositionToReference tool.
lucianomasuelli Sep 20, 2025
7c3210b
Updated changeReferenceToComposition tool to show edits preview
lucianomasuelli Sep 20, 2025
e33eb8a
Adds the ExtractFieldsToParentTool and ExtractFieldsToEmbeddedTool
lucianomasuelli Sep 22, 2025
d05b575
Added `extractFieldsController` to better organization and logic reuse.
lucianomasuelli Sep 22, 2025
35a32bb
Changed `PersistentModel` and `PersistentComponentModel` instances in…
lucianomasuelli Sep 22, 2025
8bcdcd2
Adds primary key when creating new reference or composition model
lucianomasuelli Sep 22, 2025
bc9b042
Fixed double Fileld decorator
lucianomasuelli Sep 22, 2025
a4e2598
Initial plan
Copilot Sep 24, 2025
23bdb91
Convert repository to monorepo structure with framework, CLI, and VS …
Copilot Sep 24, 2025
4a44ff2
remove fields capitalization on the explorer
Gaviola Sep 24, 2025
2dcb8cd
fix model docs
Gaviola Sep 24, 2025
a9580f3
fix command to create model not triggering from a folder or root node…
Gaviola Sep 24, 2025
60b1e7b
remove user confirmation when creating a model with fields
Gaviola Sep 24, 2025
a70df9b
change decorator Field() to not be create wth "{}"
Gaviola Sep 24, 2025
44cbec5
fix typo in HTML decorator
Gaviola Sep 24, 2025
a16407e
added correct types based in the framework
Gaviola Sep 24, 2025
c1a4812
Improved creation of relationship field.
Gaviola Sep 24, 2025
812389b
added datasource relation when creating a new model
Gaviola Sep 24, 2025
c89e9ec
Copy CLI and VS Code extension files from external repositories
Copilot Sep 24, 2025
39de143
Merge pull request #73 from slingr-stack/copilot/fix-a4535c82-75de-4c…
sebasmoyano Sep 24, 2025
b18f17c
Initial plan
Copilot Sep 24, 2025
9573157
Initial plan
Copilot Sep 24, 2025
45484cf
Copy root-level files from vs-code-extension repository
Copilot Sep 24, 2025
6c6a857
Add missing CLI commands and utilities for complete sync
Copilot Sep 24, 2025
08e0b6b
Complete vs-code-extension directory synchronization
Copilot Sep 24, 2025
b0c9779
Add final missing refactor tool files to complete synchronization
Copilot Sep 24, 2025
29adac2
Merge pull request #75 from slingr-stack/copilot/fix-cfde7ef0-dc87-42…
sebasmoyano Sep 24, 2025
47d6a9b
Complete CLI synchronization with core templates and configurations
Copilot Sep 24, 2025
c4591e4
Complete CLI synchronization with SampleModel.test.ts template
Copilot Sep 24, 2025
5d15a09
Merge pull request #74 from slingr-stack/copilot/fix-bd565cb2-e68d-40…
sebasmoyano Sep 24, 2025
809a3dd
Initial plan
Copilot Sep 24, 2025
5ea5952
Initial plan
Copilot Sep 24, 2025
1817b46
Add missing files from standalone vs-code-extension to files/vs-code-…
Copilot Sep 24, 2025
aec15fe
Add missing CLI files from standalone repository
Copilot Sep 24, 2025
f1d65dd
Move VS Code extension files from files/ to vs-code-extension/ directory
Copilot Sep 24, 2025
87653b9
Merge pull request #77 from slingr-stack/copilot/fix-ba660972-8a54-44…
sebasmoyano Sep 24, 2025
03ac1d3
Merge pull request #76 from slingr-stack/copilot/fix-bf1f2966-d4a9-42…
sebasmoyano Sep 24, 2025
c00c092
Added the modelService for code consistency using the new standard mo…
lucianomasuelli Sep 24, 2025
7305afe
Fixed error when calling model commands.
lucianomasuelli Sep 24, 2025
ff9deee
Fixed references duplication in cache
lucianomasuelli Sep 24, 2025
219ea44
Initial plan
Copilot Sep 24, 2025
b75a956
Initial assessment: fix workspace dependencies and analyze repository…
Copilot Sep 24, 2025
4bfcf59
Fix build configurations, linting issues, and improve monorepo structure
Copilot Sep 24, 2025
1ddb1f5
Updated the addFieldsToComposition to include the new persistent mode…
lucianomasuelli Sep 24, 2025
a299d33
Complete comprehensive review: add test infrastructure, documentation…
Copilot Sep 24, 2025
1337476
Updated extractFieldToReference
lucianomasuelli Sep 24, 2025
b954f94
Merge pull request #78 from slingr-stack/copilot/fix-6c738f49-f492-45…
sebasmoyano Sep 24, 2025
ccf7c6b
Updated the rest of the tools
lucianomasuelli Sep 24, 2025
522165b
Adds ownerReference when creating composition models
lucianomasuelli Sep 24, 2025
d9af7ff
The decorators types registry was unifed
Gaviola Sep 25, 2025
a2b9c41
Restructure: Move VS Code extension files to vs-code-extension direct…
lucianomasuelli Sep 25, 2025
0aa4966
Merge branch 'main' into relationshipsManagement
lucianomasuelli Sep 25, 2025
0f91fba
added configs to launch
Gaviola Sep 25, 2025
dd89a98
moved into folder vs-code-extension
Gaviola Sep 25, 2025
96aee7c
Merge remote-tracking branch 'framework/main' into improveModelsHandling
Gaviola Sep 26, 2025
3d8a2d1
merge with main
Gaviola Sep 26, 2025
6bc9521
Merge branch 'feature/launchConfig' of https://github.com/slingr-stac…
Gaviola Sep 26, 2025
2eb4036
Merge branch 'relationshipsManagement' of https://github.com/slingr-s…
Gaviola Sep 26, 2025
776a849
fix errors on field type decorators after merge
Gaviola Sep 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 173 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# Slingr Framework - TypeScript Business Model Framework

The Slingr Framework is a TypeScript framework for building smart business applications with robust model validation, serialization, and field type decorators. It uses class-validator for validation and class-transformer for JSON serialization.

The goal of the Slingr Framework is to provide developers with the tools to create smart enterprise applications without having to think about infrastructure, and just working on solving the problem. We achieve this by providing the main features enterprise applications need, using the best frameworks and libraries, and filling the gaps to ensure that everything works well out of the box. This is a full-stack framework that covers all the layers, removing the need to cherrypick frameworks and libraries while ensuring that everything works smoothly in harmony.

Additionally, we know that frameworks alone are not enough to provide a great developer experience. Tooling is key to making sure that developing with the Slingr Framework is a joy, and that’s why a big part of our focus will be on creating an application builder and CLI tools.

**ALWAYS reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.**

## Working Effectively

**Bootstrap and validate the repository:**
- `npm install` -- installs dependencies in ~5-30 seconds (varies by system). NEVER CANCEL. Set timeout to 60+ minutes.
- `npm test` -- runs 101 comprehensive tests in ~4 seconds. NEVER CANCEL. Set timeout to 10+ minutes.
- `npm run build` -- **WILL FAIL** due to dependency issue in financial-arithmetic-functions. This is a known limitation. Focus on testing and development workflows instead.
- `npm run watch` -- runs TypeScript compiler in watch mode for development. **WILL FAIL** with same dependency issue.

**CRITICAL BUILD LIMITATION**: The build command fails due to a TypeScript error in the financial-arithmetic-functions dependency. This does NOT affect testing or development workflows. All 101 tests pass successfully.

## Validation and Testing Workflows

**Always run the complete test suite when making changes:**
- `npm test` -- runs all 101 tests in ~4 seconds. NEVER CANCEL. Set timeout to 10+ minutes.
- ALWAYS test your changes by running the relevant test file: `npm test -- test/YourFile.test.ts`
- MANUALLY VALIDATE any new model definitions by creating test instances and calling `validate()` method

**Manual validation steps for model changes:**
1. Create a test instance of your model
2. Set both valid and invalid field values
3. Call `await model.validate()` and verify error handling
4. Test JSON serialization with `model.toJSON()` and `Model.fromJSON(json)`
5. Verify field availability and conditional logic work correctly

## Key Projects and Structure

**Core Framework Components:**
- `src/model/BaseModel.ts` -- Abstract base class for all models with validation and JSON conversion
- `src/model/Field.ts` -- @Field decorator for validation, documentation, and JSON control
- `src/model/Model.ts` -- @Model decorator for class metadata
- `src/model/types/` -- Type decorators (@Text, @Email, @DateTime, @Money, etc.)
- `src/validators/` -- Custom validation constraint implementations

**Test Structure:**
- `test/` -- Contains comprehensive test suites for each field type
- `test/model/` -- Test model definitions (Person, App, Project, etc.)
- Each test file covers validation, required fields, and JSON conversion scenarios

**Entry Point:**
- `index.ts` -- Main export file exposing all framework components

## Important Field Type Decorators

**Always import types from the main module:**
```typescript
import { BaseModel, Field, Model, Text, Email, DateTime, Money } from './index';
// OR, for individual types, import from the main entry point:
import { Text, Email } from './index';
```

**Common field patterns (reference existing test models):**
- `@Text({ minLength: 2, maxLength: 50, regex: /^[a-zA-Z]+$/ })` -- Text with validation
- `@Email()` -- Email validation
- `@DateTime({ min: new Date('2020-01-01') })` -- Date with constraints
- `@Money({ currency: 'USD', decimals: 2 })` -- Money with currency
- `@Choice({ values: ['option1', 'option2'] })` -- Enum-style choices

## Development Commands

**For development work:**
- `npm test -- --watch` -- run tests in watch mode
- `npm test -- --testNamePattern="your pattern"` -- run specific tests
- `npm test -- test/Text.test.ts` -- run single test file

**DO NOT attempt to use npm run build or npm run watch** -- they will fail due to the known dependency issue. Focus on test-driven development instead.

## Validation Scenarios

**ALWAYS test these scenarios when creating new models:**

1. **Basic Validation Test:**
```typescript
const model = new YourModel();
model.requiredField = 'valid value';
const errors = await model.validate();
expect(errors).toHaveLength(0);
```

2. **Invalid Field Test:**
```typescript
const model = new YourModel();
model.requiredField = ''; // or invalid value
const errors = await model.validate();
expect(errors.length).toBeGreaterThan(0);
```

3. **JSON Round-trip Test:**
```typescript
const model = new YourModel();
model.field = 'value';
const json = model.toJSON();
const restored = YourModel.fromJSON(json);
expect(restored.field).toBe('value');
```

4. **Conditional Field Test (if using conditional required/available):**
```typescript
const model = new YourModel();
model.age = 17; // Test conditional logic
model.parentEmail = 'parent@example.com';
const errors = await model.validate();
expect(errors).toHaveLength(0);
```

## Common Tasks

**Repository Structure (ls -a):**
```
.git/
.gitignore
.vscode/
LICENSE.txt
README.md
dist/ (created after build attempts)
index.ts (main export file)
jest.config.ts (Jest configuration)
node_modules/ (dependencies)
package-lock.json (dependency lock)
package.json (project config)
src/ (source code)
model/ (core model classes)
types/ (field type decorators)
BaseModel.ts (base class)
Field.ts (@Field decorator)
Model.ts (@Model decorator)
validators/ (custom validators)
test/ (test suites)
model/ (test model definitions)
tsconfig.json (TypeScript config)
tsconfig.build.json (Build-specific TypeScript config)
```

**Key package.json scripts:**
```json
{
"test": "jest --verbose",
"watch": "tsc --project tsconfig.build.json --watch",
"build": "tsc --project tsconfig.build.json"
}
```

**Dependencies:**
- class-validator -- validation decorators and engine
- class-transformer -- JSON serialization/deserialization
- financial-number -- money/decimal calculations
- jest + ts-jest -- testing framework
- typescript -- TypeScript compiler

## Expert Tips

**Always check these when working with the framework:**
- Review existing test models in `test/model/` for patterns before creating new models
- Check field type options in `src/model/types/` for available validation parameters
- Use the `summarizeErrors()` helper from tests to examine validation failures
- Remember that `@Field({ available: false })` excludes fields from JSON operations
- Test conditional `required` and `available` functions thoroughly

**For complex validation scenarios:**
- Use custom validation functions in `@Field({ validation: (value, obj) => [...] })`
- Leverage `calculation: 'manual'` for computed fields that need caching
- Check `BaseModel.calculate()` method for manual calculation triggers

**NEVER attempt to fix the build error in financial-arithmetic-functions** -- it's a dependency issue outside this project's scope. Focus on the comprehensive test suite and development workflows that work perfectly.
32 changes: 32 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
### Pull Request Title Format
> **Format:** `[TYPE][ISSUE #issue] Description`
> - **TYPE:** FEAT/FIX/DOCS/REFACTOR
> - **issue:** Issue number (e.g., #123)
> - **Description:** Brief, clear title of the change
>
> Example: `[FEAT][ISSUE #45] Add PostgreSQL support`



# Title of the Change

**Closes:**
- #issue_number

**Depends on:** _(Remove if not applicable)_
- #dependency_issue_number

## Dependencies _(Remove if not applicable)_

This implementation relies on the following core dependencies:
- **dependency-name** (^version) - Brief explanation of why it's needed
- **another-dependency** (^version) - Brief explanation of why it's needed

## What?

Brief description of what this PR implements or fixes.

## How?

Detailed technical explanation of the implementation approach, including key architectural decisions and any important implementation details that reviewers should be aware of.

40 changes: 37 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
out
dist
node_modules
# IDE and editor files
.idea/
.vscode/settings.json

# Dependencies
node_modules/
framework/node_modules/
cli/node_modules/
vs-code-extension/node_modules/

# Build artifacts
dist/
out/
*.tsbuildinfo
coverage/

# Temporary files
*.log
*.tmp
prompts/
cli_backup/

# Database files (for local testing)
*.db
*.sqlite
*.sqlite3

# OS generated files
.DS_Store
Thumbs.db

# Environment variables
.env
.env.local
.env.*.local

# VS Code extension files
.vscode-test/
*.vsix
Loading