0.5.0 • Published 1 year ago

@altipla/directus-drizzle v0.5.0

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
1 year ago

directus-drizzle

Generate Drizzle schema & seed function from a Directus instance.

Install

npm i -D @altipla/directus-drizzle

Usage

  1. Add a new download command in your package.json file to pull changes:

    {
      "scripts": {
        "db:pull": "directus-drizzle"
      }
    }
  2. Write a secret static token obtained from your user in Directus in your local .env variables:

    DIRECTUS_TOKEN=XYZ_TOKEN
  3. Configure the rest of settings like the remote URL in the config file. By default it's located in drizzle/directus.config.ts:

    import { defineConfig } from '@altipla/directus-drizzle'
    
    export default defineConfig({
      instance: 'https://www.foo.com',
      seed: {
        collections: ['prefix_*'],
      },
    })
  4. Finally run the command every time you want to regenerate the schema file:

    npm run db:pull
0.2.18

2 years ago

0.2.17

2 years ago

0.3.0

2 years ago

0.5.0

1 year ago

0.4.1

1 year ago

0.4.0

2 years ago

0.2.16

2 years ago

0.2.14

2 years ago

0.2.13

2 years ago

0.2.12

2 years ago

0.2.11

2 years ago

0.2.10

2 years ago

0.2.9

2 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago