Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

List commands return inconsistent JSON shapes (`r2 buckets list` and `images list` wrap the array)

オープン
#346 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
json, typescript
領域
cli

調査の方向性

Start with the CLI entry points for r2 buckets list and images list, then compare them with list commands such as cf kv namespaces list that emit bare arrays. Check each command's pagination handling and tests before choosing whether pagination metadata belongs on stderr or in a common wrapper. Done means every listed command emits the documented, consistent JSON shape and the relevant CLI output tests cover arrays, objects, and pagination.

索引モデルが issue の本文から書いたものです。

説明

Summary of the issue

Most list commands print a bare JSON array, but a few print the API's wrapper object, so you can't reuse one jq filter across products:

Command stdout
cf kv namespaces list, cf d1 list, cf zones list, cf workers list, cf queues list, cf workflows list, cf vectorize list, cf hyperdrive list, cf ai-gateway gateways list, cf secrets-store stores list, cf accounts list, cf tunnels list, … [ … ]
cf r2 buckets list { "buckets": [ … ] }
cf images list { "continuation_token": …, "images": [ … ] }

For example, cf <product> list | jq '.[].name' works for KV, D1, Queues, etc., but fails for R2 (Cannot index object with number).

Expected behaviour

List commands print a consistent shape. Either always a bare array, with pagination cursors handled by the CLI or reported on stderr, or always the same documented wrapper.

Version of cf used

1.0.0-beta.16

System information and package versions
cf 1.0.0-beta.16 (also checked in the beta.18 package source)
macOS 27.0 arm64, Node 26.8.2, npm 11.19.1
Reproduction (optional)
cf kv namespaces list | jq 'type'   # "array"
cf r2 buckets list    | jq 'type'   # "object"
cf images list        | jq 'type'   # "object"
Relevant error logs (optional)

Related: #105 (other output inconsistencies for scripts and agents), #20 (list pagination).

主要言語
TypeScript
スター
853
フォーク
42
平均マージ
16時間 43分
マージ済み PR(30日)
160

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cloudflare/cf のほかの issue

cloudflare/cf の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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