RobinBlomberg / kysely-codegen

Generate Kysely type definitions from your database.
MIT License
747 stars 67 forks source link

Add marker comments when generating code #114

Closed seanf closed 1 week ago

seanf commented 10 months ago

It would be good if kysely-codegen could add a marker comment at the top of the file when generating code. For instance:

// This file was generated automatically by kysely-codegen.
// Please do not edit it by hand.

Upvote & Fund

Fund with Polar

clemmy commented 9 months ago

This would be nice as a part of the library.

My hack for this currently is:

kysely-codegen --out-file src/db/types.d.ts && printf \"// This is an auto-generated file. Do not edit it directly.\n// See 'Generating DB schema types for Kysely' in README.\n\n$(cat src/db/types.d.ts)\" > src/db/types.d.ts
RobinBlomberg commented 1 week ago

Should be released in kysely-codegen@0.16.0! 🚀