adobe / adobe/aio-cli-plugin-runtime

make JSON output compatible with jq (for action:get among others)

Open
#66 2 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
JavaScript
Stars
21
Forks
33
PR merge metrics
No merged PRs in 30d

Description

**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.

Contributor guide

Open the contributing guide

Research direction

Reproduce `./bin/run runtime:action:get foo` and inspect the `action:get` entry point that produces the output. Done means the command emits only valid JSON, without the action name prefix, so its response can be piped directly to `jq`.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.