adobe / adobe/aio-cli-plugin-runtime

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

オープン
#66 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement help wanted
主要言語
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。