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

Validate Command for Piral Instance #69

Closed
FlorianRappl opened this issue Sep 2, 2019 · 3 comments
Closed

Validate Command for Piral Instance #69

FlorianRappl opened this issue Sep 2, 2019 · 3 comments
Assignees
Labels
cli Concerns the piral-cli application. enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@FlorianRappl
Copy link
Contributor

Description

Right now the Piral instance is checked in a shallow way to obey to the requirements / spec, e.g., if an app key is present (and valid) in the package.json.

This should go a bit further and the validation should also be exposed in form of a Piral CLI command, such as piral validate.

Background

If the information, e.g., in files is invalid it should be pointed out before scaffolding / running pilet debug or similar is tried. It should complain as soon as possible.

Discussion

What should be verified? Initial guess:

  • package.json content w.r.t. Piral, such as the app field, pilets section etc.
  • All related files, e.g., if the files in pilets.files are valid paths and in case of app have a valid content
  • Potentially some consistency checks (which ones?)
@FlorianRappl FlorianRappl added enhancement New feature or request help wanted Extra attention is needed cli Concerns the piral-cli application. labels Sep 2, 2019
@FlorianRappl FlorianRappl added this to the 0.8.0 milestone Sep 2, 2019
@SantoJambit
Copy link
Contributor

  • If a pilets.files directory entry contains subdirectories, issue a warning that it will be shallowly copied?
  • If a pilet.files entry contains a .gitignore file (or other file that is not published to npm), issue an error?
  • If a pilet.files entry exists, that is not specified in files or maybe specified in .npmignore (i.e. doesn't get published), issue an error?
  • Ensure that exported/external dependencies are listed in "dependencies", i.e. not in "devDependencies".
  • Maybe a simple schema validation for the pilets part of package.json?

@FlorianRappl
Copy link
Contributor Author

If a pilets.files directory entry contains subdirectories, issue a warning that it will be shallowly copied?

But that would be rather hostile, right? I mean its the default behavior to leave this out / make a shallow copy (which may be totally desirable). We can make an info output (leaving out "x" files from the subdirectories of) to hint in that direction.

Yep, rest sounds very good - thanks a lot for the fruitful input @SantoJambit !

FlorianRappl added a commit that referenced this issue Sep 10, 2019
@FlorianRappl FlorianRappl self-assigned this Sep 11, 2019
FlorianRappl added a commit that referenced this issue Sep 11, 2019
@FlorianRappl
Copy link
Contributor Author

Landed in develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Concerns the piral-cli application. enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants