adobe / adobe/aio-cli-plugin-runtime
make JSON output compatible with jq (for action:get among others)
- Lingua principale
- JavaScript
- Stelle
- 21
- Fork
- 33
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**Is your feature request related to a problem? Please describe.**
When you `action:get`, you get the action's name printed before the JSON API response.
```
> ./bin/run runtime:action:get foo
foo
{ ... }
```
This makes the output incompatible with `jq` to project some subset of the values of interest. Since `aio` here diverges from `wsk`'s output of "ok: got action foo", perhaps do it better by dropping the action name that's currently prefixing the JSON response.
**Describe the solution you'd like**
```
> ./bin/run runtime:action:get foo
{
"annotations": [
{
"key": "exec",
"value": "nodejs:10"
}
],
"exec": {
"kind": "nodejs:10",
"binary": false
},
"limits": {
"concurrency": 1,
"logs": 10,
"memory": 256,
"timeout": 60000
},
"name": "foo",
"namespace": "guest",
"parameters": [],
"publish": false,
"version": "0.0.1"
}
```
**Describe alternatives you've considered**
Wrap the cli with another bash script.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Riproduci `./bin/run runtime:action:get foo` e ispeziona l’entry point `action:get` che produce l’output. Il lavoro è completato quando il comando emette solo JSON valido, senza il prefisso del nome dell’azione, in modo che la sua risposta possa essere passata direttamente a `jq`.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100