*edit: PR
Is your feature request related to a problem? Please describe.
When trying to maintain the dependencies of a script it would be useful to provide a script id and get the deployments and versions in order to update the libraries to the latest version. Currently you have to have the script defined in your current project or be able to pull the script. Having the option to receive the output as JSON would allow using the response to update the packages to the latest version using scripting.
Describe the solution you'd like
Optional scriptId argument which uses the provided scriptId instead of the the .clasp.json scriptId key. Also add the option to get the response in JSON using the --json flag.
clasp list-versions [scriptId]
clasp list-deployments [scriptId]
clasp list-versions --json [scriptId]
clasp list-deployments --json [scriptId]
Describe alternatives you've considered
Using bash to iterate over the new lines and split the output in order to get the last entry and it's version.
Additional context
This would make collaborating with users consuming the scripts as libraries easier as they could use the clasp cli to see the latest versions.