Skip to content

Commit

Permalink
Draft: Fix cli shorthand conflict (#104)
Browse files Browse the repository at this point in the history
* refactor(cli): remove -e short flag from env and email

This will make the cli ux better and prevent flag conflicts.

* build(dist): run build command
  • Loading branch information
skowrons authored Nov 27, 2024
1 parent 8744267 commit f10506d
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -24,11 +24,11 @@ Options:
-d, --db <char> path to the pocketbase SQLite database
-j, --json <char> path to JSON schema exported from pocketbase admin UI
-u, --url <char> URL to your hosted pocketbase instance. When using this options you must also provide email and password options.
-e, --email <char> email for an admin pocketbase user. Use this with the --url option
--email <char> email for an admin pocketbase user. Use this with the --url option
-p, --password <char> password for an admin pocketbase user. Use this with the --url option
-o, --out <char> path to save the typescript output file (default: "pocketbase-types.ts")
--no-sdk remove the pocketbase package dependency. A typed version of the SDK will not be generated.
-e, --env [path] flag to use environment variables for configuration. Add PB_TYPEGEN_URL, PB_TYPEGEN_EMAIL, PB_TYPEGEN_PASSWORD to your .env file. Optionally provide a path to your .env file
--env [path] flag to use environment variables for configuration. Add PB_TYPEGEN_URL, PB_TYPEGEN_EMAIL, PB_TYPEGEN_PASSWORD to your .env file. Optionally provide a path to your .env file
-h, --help display help for command
```

4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -338,7 +338,7 @@ program.name("Pocketbase Typegen").version(version).description(
"-u, --url <char>",
"URL to your hosted pocketbase instance. When using this options you must also provide email and password options."
).option(
"-e, --email <char>",
"--email <char>",
"email for an admin pocketbase user. Use this with the --url option"
).option(
"-p, --password <char>",
@@ -351,7 +351,7 @@ program.name("Pocketbase Typegen").version(version).description(
"--no-sdk",
"remove the pocketbase package dependency. A typed version of the SDK will not be generated."
).option(
"-e, --env [path]",
"--env [path]",
"flag to use environment variables for configuration. Add PB_TYPEGEN_URL, PB_TYPEGEN_EMAIL, PB_TYPEGEN_PASSWORD to your .env file. Optionally provide a path to your .env file"
);
program.parse(process.argv);
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ program
"URL to your hosted pocketbase instance. When using this options you must also provide email and password options."
)
.option(
"-e, --email <char>",
"--email <char>",
"email for an admin pocketbase user. Use this with the --url option"
)
.option(
@@ -38,7 +38,7 @@ program
"remove the pocketbase package dependency. A typed version of the SDK will not be generated."
)
.option(
"-e, --env [path]",
"--env [path]",
"flag to use environment variables for configuration. Add PB_TYPEGEN_URL, PB_TYPEGEN_EMAIL, PB_TYPEGEN_PASSWORD to your .env file. Optionally provide a path to your .env file"
)

0 comments on commit f10506d

Please sign in to comment.