agile-learning-institute / mentorHub-mongodb

Mongo Database for Institute system
2 stars 3 forks source link

Refactor from mongosh to typescript #98

Closed FlatBallFlyer closed 8 months ago

FlatBallFlyer commented 8 months ago

SchemaManager

Refactor the existing mongosh scripts into typescript configuration-as-code product called SchemaManager.

Implement schema pre-processors.

The sm-preprocessor should have commands smType and smEnums and can be used as in:

someSchema.yaml

properties:
    lastSaved: 
        "description": "Breadcrumb of who last updated this document"
        "smType":"breadcrumb"
    userName:
        "description": "User name"
        "smType":"word"
    status:
        "description": "Status"
        "smEnums":"myStatus"

Create preprocessor for smEnums

Create smTypes processor

Create default smTypes