Skip to content

JS hooks for PocketBase to help you with schema generation for pocketbase-ts

License

Notifications You must be signed in to change notification settings

satohshi/pocketbase-ts-schema-generator

Repository files navigation

pocketbase-ts-schema-generator

JS hook for PocketBase to help you with schema generation for pocketbase-ts.

Usage

  1. Download pb_hooks.zip from releases and extract it to the directory where you have the PocketBase executable.
  2. Update config.json if necessary.
  3. Run pocketbase serve, and the hooks will automatically generate/update the schema file on bootstrap, and every time you make changes to the collections.

The generated schema will have field options in docstrings, so you will get additional info like required, min, and max when you hover over properties in your IDE.

Configuration Options

Key Description Default
output Where to save the generated schema file. ./schema.ts
includeDocstring Whether to include field options in docstrings. true

About

JS hooks for PocketBase to help you with schema generation for pocketbase-ts

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published