JSPM

  • Created
  • Published
  • Downloads 547
  • Score
    100M100P100Q104231F
  • License MIT

A core database library used for personal projects

Package Exports

  • @aneuhold/core-ts-db-lib
  • @aneuhold/core-ts-db-lib/lib/documents/common/ApiKey
  • @aneuhold/core-ts-db-lib/lib/documents/common/ApiKey.js
  • @aneuhold/core-ts-db-lib/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@aneuhold/core-ts-db-lib) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Personal Core Database Library

npm

This is used to export types used in various places for database interactions in personal projects.

Document structure

Project-specific documents can be held in a single collection. So those should inherit from the BaseDocumentWithType class.

When different document types are held under a specific collection, they should get their own folder.

Guidelines

  • Note that documents cannot have really special types or classes with functions. For example Set cannot be used.

Updating an existing document

If a property is being moved or a new required property is added, then take the following steps

  1. Update the document
  2. Update the validator
  3. Push the changes to NPM
  4. Go to be-ts-db-lib and update the versions there with yarn upgrade:core
  5. Update the migration service in that repo and double check it looks okay
  6. Run the migration with yarn migrate:dry then yarn migrate
  7. Run validation to ensure everything is alright with yarn validate:dry then yarn validate if needed
  8. Run tests
  9. Update tests if needed then re-validate
  10. Push a new version of the be-ts-db-lib to NPM
  11. Pull the new versions into digital-ocean-functions and deploy
  12. Pull the new versions into core-ts-api-lib and push to NPM
  13. Pull the new versions into any relevant frontends and deploy
  14. Test out the frontends to make sure it works okay and double check MongoDB directly