RobinBlomberg / kysely-codegen

Generate Kysely type definitions from your database.
MIT License
773 stars 69 forks source link

fix flags in readme #142

Closed jrhizor closed 6 months ago

jrhizor commented 6 months ago

On version 0.14.1 I was getting:

❯ pnpm kysely-codegen --include="public.*"
✗ Invalid flag: "include"

Here's the help output:

❯ pnpm kysely-codegen --help

kysely-codegen [options]

  --camel-case         Use the Kysely CamelCasePlugin.
  --dialect            Set the SQL dialect. (values: [postgres, mysql, sqlite, mssql, libsql, bun-sqlite])
  --env-file           Specify the path to an environment file to use.
  --exclude-pattern    Exclude tables matching the specified glob pattern. (examples: users, *.table, secrets.*, *._*)
  --help, -h           Print this message.
  --include-pattern    Only include tables matching the specified glob pattern. (examples: users, *.table, secrets.*, *._*)
  --log-level          Set the terminal log level. (values: [debug, info, warn, error, silent], default: warn)
  --no-domains         Skip generating types for PostgreSQL domains. (default: false)
  --out-file           Set the file build path. (default: /Users/jrhzor/code/bluewhale/interlinked/node_modules/kysely-codegen/dist/db.d.ts)
  --print              Print the generated output to the terminal.
  --runtime-enums      Generate runtime enums instead of string unions.
  --type-only-imports  Generate TypeScript 3.8+ `import type` syntax (default: true).
  --url                Set the database connection string URL. This may point to an environment variable. (default: env(DATABASE_URL))
  --schema             Set the default schema of the database connection.
  --verify             Verify that the generated types are up-to-date. (default: false)

So I updated the readme to use include-pattern instead of include and exclude-pattern instead of exclude.

RobinBlomberg commented 6 months ago

Oh nice! Thanks!