adobe / adobe/aio-cli-plugin-runtime
make JSON output compatible with jq (for action:get among others)
- Lenguaje dominante
- JavaScript
- Estrellas
- 21
- Forks
- 33
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
**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.
Guía de contribución
Línea de trabajo
Reproduce `./bin/run runtime:action:get foo` e inspecciona el punto de entrada `action:get` que produce la salida. Está hecho cuando el comando emite únicamente JSON válido, sin el prefijo del nombre de la acción, de modo que su respuesta se pueda canalizar directamente a `jq`.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- cli
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100