0.2.16 • Published 11 months ago
@altipla/directus-drizzle v0.2.16
directus-drizzle
Generate Drizzle schema & seed function from a Directus instance.
Install
npm i -D @altipla/directus-drizzle
Usage
Add a new download command in your
package.json
file to pull changes:{ "scripts": { "db:pull": "directus-drizzle" } }
Write a secret static token obtained from your user in Directus in your local
.env
variables:DIRECTUS_TOKEN=XYZ_TOKEN
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_*'], }, })
Finally run the command every time you want to regenerate the schema file:
npm run db:pull
0.2.16
11 months ago
0.2.14
12 months ago
0.2.13
12 months ago
0.2.12
12 months ago
0.2.11
12 months ago
0.2.10
2 years ago
0.2.9
2 years ago
0.2.1
2 years ago
0.2.0
2 years ago
0.2.7
2 years ago
0.2.6
2 years ago
0.2.3
2 years ago
0.2.2
2 years ago
0.2.5
2 years ago
0.2.4
2 years ago
0.1.5
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago