2.0.4 • Published 2 months ago

@aneuhold/core-ts-db-lib v2.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Personal Core Database Library

JSR NPM

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 yarn 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 yarn such as yarn up.

  1. Add the required JSR configuration to a .yarnrc.yml file if not there already:
    npmScopes:
      jsr:
        npmRegistryServer: 'https://npm.jsr.io'
  2. Add the package with yarn 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 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
2.0.3

2 months ago

2.0.2

2 months ago

2.0.4

2 months ago

2.0.1

2 months ago

2.0.0

2 months ago

1.0.121

2 months ago

1.0.120

2 months ago

1.0.119

2 months ago

1.0.112

3 months ago

1.0.118

2 months ago

1.0.117

3 months ago

1.0.114

3 months ago

1.0.113

3 months ago

1.0.116

3 months ago

1.0.115

3 months ago

1.0.107

3 months ago

1.0.106

3 months ago

1.0.109

3 months ago

1.0.108

3 months ago

1.0.105

3 months ago

1.0.110

3 months ago

1.0.111

3 months ago

1.0.66

7 months ago

1.0.69

7 months ago

1.0.68

7 months ago

1.0.67

7 months ago

1.0.73

7 months ago

1.0.72

7 months ago

1.0.71

7 months ago

1.0.70

7 months ago

1.0.77

7 months ago

1.0.76

7 months ago

1.0.75

7 months ago

1.0.74

7 months ago

1.0.79

7 months ago

1.0.78

7 months ago

1.0.101

5 months ago

1.0.100

5 months ago

1.0.103

4 months ago

1.0.102

5 months ago

1.0.104

4 months ago

1.0.80

6 months ago

1.0.84

6 months ago

1.0.83

6 months ago

1.0.82

6 months ago

1.0.81

6 months ago

1.0.88

6 months ago

1.0.87

6 months ago

1.0.86

6 months ago

1.0.85

6 months ago

1.0.89

6 months ago

1.0.91

6 months ago

1.0.90

6 months ago

1.0.95

5 months ago

1.0.94

5 months ago

1.0.93

6 months ago

1.0.92

6 months ago

1.0.99

5 months ago

1.0.98

5 months ago

1.0.97

5 months ago

1.0.96

5 months ago

1.0.62

7 months ago

1.0.61

7 months ago

1.0.65

7 months ago

1.0.64

7 months ago

1.0.63

7 months ago

1.0.60

8 months ago

1.0.59

8 months ago

1.0.58

9 months ago

1.0.57

9 months ago

1.0.56

9 months ago

1.0.48

10 months ago

1.0.49

10 months ago

1.0.51

10 months ago

1.0.50

10 months ago

1.0.55

10 months ago

1.0.54

10 months ago

1.0.53

10 months ago

1.0.52

10 months ago

1.0.47

10 months ago

1.0.46

11 months ago

1.0.45

11 months ago

1.0.44

11 months ago

1.0.43

11 months ago

1.0.39

11 months ago

1.0.38

11 months ago

1.0.40

11 months ago

1.0.42

11 months ago

1.0.41

11 months ago

1.0.37

11 months ago

1.0.36

11 months ago

1.0.35

11 months ago

1.0.34

11 months ago

1.0.33

11 months ago

1.0.32

11 months ago

1.0.29

11 months ago

1.0.31

11 months ago

1.0.30

11 months ago

1.0.26

12 months ago

1.0.25

12 months ago

1.0.24

12 months ago

1.0.28

12 months ago

1.0.27

12 months ago

1.0.23

12 months ago

1.0.22

12 months ago

1.0.21

12 months ago

1.0.19

12 months ago

1.0.20

12 months ago

1.0.18

12 months ago

1.0.17

12 months ago

1.0.16

12 months ago

1.0.15

12 months ago

1.0.14

12 months ago

1.0.11

12 months ago

1.0.13

12 months ago

1.0.12

12 months ago

1.0.10

12 months ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago