Public
HTTP (deprecated)
Readme

Kysely type generator for @std/sqlite

Usage

  • Fork to your account.
  • Update allowedTables to expose any tables you'd like to import the schema of.
    This will make their schemas public!
  • Add import type { DB } from "https://yourusername-kyselyVtTypes.web.val.run/?tables=tables,you,need" to your program. See that QueryParams` type at the top? Add those to your URL to set more options.

Demo

See @easrng/kyselyVtDemo.

Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
2
pomdtr avatar

Quick thought, you could protect your types behind a password.

You just need to implement bearer token authentication in the vals, and use the private module mechanism: https://www.val.town/settings/private-modules

easrng avatar

That was what I did initially but the editor doesn't respect the private module settings.

easrng-kyselyvttypes.web.val.run
April 1, 2024