({ args })
| 46 | }, |
| 47 | // fallow-ignore-next-line complexity |
| 48 | async run({ args }) { |
| 49 | const limit = parseIntFlag(args.limit, { flag: "--limit", min: 1, max: 100 }); |
| 50 | |
| 51 | const client = await createCloudClient(); |
| 52 | |
| 53 | try { |
| 54 | if (args.all) { |
| 55 | const renders = await fetchAll(client, limit); |
| 56 | emit(renders, args.json, null, false); |
| 57 | } else { |
| 58 | const page = await client.listRenders({ limit, token: args.token }); |
| 59 | emit(page.data ?? [], args.json, page.next_token ?? null, Boolean(page.has_more)); |
| 60 | } |
| 61 | } catch (err) { |
| 62 | reportApiError("Could not list cloud renders", err); |
| 63 | } |
| 64 | }, |
| 65 | }); |
| 66 | |
| 67 | // fallow-ignore-next-line complexity |
nothing calls this directly
no test coverage detected