adobe / adobe/aio-cli-plugin-runtime
make JSON output compatible with jq (for action:get among others)
- 主要言語
- JavaScript
- スター
- 21
- フォーク
- 33
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
**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.
コントリビューションガイド
調査の方向性
`./bin/run runtime:action:get foo` を再現し、出力を生成する `action:get` エントリーポイントを調査します。コマンドがアクション名のプレフィックスなしで有効な JSON のみを出力し、そのレスポンスを直接 `jq` にパイプできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- cli
- issue の種類
- 機能追加
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100