adobe / aio-cli-plugin-runtime

Adobe I/O Runtime plugin for the Adobe I/O CLI
https://www.adobe.io
Apache License 2.0
15 stars 31 forks source link

feat: use oclif min / max for activation list limit flag #270

Closed MichaelGoberling closed 1 year ago

MichaelGoberling commented 1 year ago

Was testing activation list --limit=x for a customer issue in the app-builder channel and realized it was not only spitting out an ugly error, but also actually making the network call if you tried using too large or too small of a value.

Before

➜  the-worst-folder git:(main) aio rt activations list --limit=51
 ›   Error: failed to list the activations: the query parameter 'limit' was malformed:
 ›   the value '51' is not in the range of 0 to 50 for activations. (400 Bad Request)
 ›    specify --verbose flag for more information

After

(Pending oclif/core PR here)

➜  the-best-folder git:(main) aio rt activations list --limit=51
    Error: Parsing --limit 
        Expected an integer less than or equal to 50 but received: 51
    See more help with --help
codecov[bot] commented 1 year ago

Codecov Report

Merging #270 (7e91dbe) into master (0afb742) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #270   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           65        65           
  Lines         1730      1730           
  Branches       367       367           
=========================================
  Hits          1730      1730           
Impacted Files Coverage Δ
src/commands/runtime/activation/list.js 100.00% <ø> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

MichaelGoberling commented 1 year ago

@oclif/core PR has been merged.

Going to merge this and make a note to release next Monday.