From 324e913bd44f92a79225e4cf24fe3708ff105dbf Mon Sep 17 00:00:00 2001 From: Travis Vachon Date: Thu, 2 Mar 2023 11:14:34 +0800 Subject: [PATCH] fix: pass cursor to list in `w3 ls` (#50) fixes #48 I added a test for this, but the issue doesn't happen in our current mock impl. I can spend some more time to make the mock implementation support `--size` and `--cursor` but it's not clear to me that's the right move yet - feels a little like adding extra code just to make a test fail. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f8f28c9..ac61b6a 100644 --- a/index.js +++ b/index.js @@ -59,7 +59,7 @@ export async function list (opts = {}) { let count = 0 let res do { - res = await client.capability.upload.list() + res = await client.capability.upload.list({ cursor: res?.cursor }) count += res.results.length if (res.results.length) { console.log(uploadListResponseToString(res, opts))