@aneuhold/core-ts-db-lib v2.0.73
Personal Core Database Library
This is used to export types used in various places for database interactions in personal projects.
📦 Installation
To add to a repo, follow the instructions below for your environment:
For Node using NPM
Run pnpm add @aneuhold/core-ts-db-lib
For Node using JSR
The below instructions still allow for things like Renovate to work, and normal commands with pnpm such as pnpm up.
- Add the required JSR configuration to a
.npmrcfile if not there already:@jsr:registry=https://npm.jsr.io - Add the package with
pnpm add @jsr/aneuhold__core-ts-db-lib
For Deno
Run deno add jsr:@aneuhold/core-ts-db-lib
🟢 Usage
Pull in one of the services and use it like so:
import { DocumentService } from '@aneuhold/core-ts-db-lib';
// If using Node with JSR
// import { DocumentService } from '@jsr/aneuhold__core-ts-db-lib';
export default function deepCopy() {
DocumentService.deepCopy({ someProperty: 'someString' });
}See full documentation on usage at JSR!
🛠️ Development
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
Setcannot be used.
Updating an existing document
If a property is being moved or a new required property is added, then take the following steps
- Update the document
- Update the validator
- Push the changes to NPM
- Go to
be-ts-db-liband update the versions there withpnpm upgrade:core - Update the migration service in that repo and double check it looks okay
- Run the migration with
pnpm migrate:drythenpnpm migrate - Run validation to ensure everything is alright with
pnpm validate:drythenpnpm validateif needed - Run tests
- Update tests if needed then re-validate
- Push a new version of the
be-ts-db-libto NPM - Pull the new versions into
digital-ocean-functionsand deploy - Pull the new versions into
core-ts-api-liband push to NPM - Pull the new versions into any relevant frontends and deploy
- Test out the frontends to make sure it works okay and double check MongoDB directly
6 months ago
6 months ago
7 months ago
5 months ago
6 months ago
6 months ago
6 months ago
10 months ago
10 months ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago