adobe / adobe/aio-cli-plugin-runtime
make JSON output compatible with jq (for action:get among others)
- Vorherrschende Sprache
- JavaScript
- Sterne
- 21
- Forks
- 33
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
**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.
Beitragsleitfaden
Rechercherichtung
Reproduziere `./bin/run runtime:action:get foo` und untersuche den `action:get`-Einstiegspunkt, der die Ausgabe erzeugt. Erledigt ist die Aufgabe, wenn der Befehl nur gültiges JSON ohne das Präfix des Aktionsnamens ausgibt, sodass seine Antwort direkt an `jq` weitergeleitet werden kann.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- cli
- Issue-Typ
- Feature
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100