Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file parameter type #121

Open
jasonkuhrt opened this issue Jan 24, 2023 · 0 comments
Open

file parameter type #121

jasonkuhrt opened this issue Jan 24, 2023 · 0 comments
Labels
@molt/command type/feat New feature or request

Comments

@jasonkuhrt
Copy link
Owner

Perceived Problem

  • passing file paths has no support
  • cli author may need to: check it exists, check it is right type (e.g. not a dir), read it, parse it, returning errors all along the way.

Ideas / Proposed Solution(s)

  • new spec method like z.file().exists() and z.dir().exists() and z.fileOrDir().exists() etc.
  • Allow cli author to have the file read automatically
  • Allow cli author to have the file contents parsed automatically for popular file types (JSON, TOML, ...)
  • Nice automatic error messages
@jasonkuhrt jasonkuhrt added the type/feat New feature or request label Jan 24, 2023
@jasonkuhrt jasonkuhrt pinned this issue Jan 24, 2023
@jasonkuhrt jasonkuhrt changed the title file type file parameter type Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@molt/command type/feat New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant