@apex-actions/cli 0.80.0 → 0.81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -351,9 +351,25 @@ export class HttpControlPlane {
351
351
  const q = new URLSearchParams({ sha });
352
352
  return await this.#json('GET', `/api/v1/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/coexistence/diff?${q.toString()}`);
353
353
  }
354
+ /**
355
+ * Every live runner. The list is paged since control-plane ADR-0081, so this follows `page.nextCursor` to the end —
356
+ * `apex runner list` means all of them, and the fleet alone can hold more than one page. A control plane from before
357
+ * the grammar answers everything and no `page`, which ends the loop at once.
358
+ */
354
359
  async listRunners() {
355
- const body = await this.#json('GET', '/api/v1/runners');
356
- return body.runners;
360
+ const all = [];
361
+ let cursor;
362
+ for (let pages = 0; pages < 100; pages++) {
363
+ const query = new URLSearchParams({ limit: '200' });
364
+ if (cursor !== undefined)
365
+ query.set('cursor', cursor);
366
+ const body = await this.#json('GET', `/api/v1/runners?${query.toString()}`);
367
+ all.push(...body.runners);
368
+ cursor = body.page?.nextCursor;
369
+ if (cursor === undefined)
370
+ break;
371
+ }
372
+ return all;
357
373
  }
358
374
  async mintRegistrationToken(options) {
359
375
  return await this.#json('POST', '/api/v1/runners/registration-tokens', { uses: options.uses ?? 1 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apex-actions/cli",
3
- "version": "0.80.0",
3
+ "version": "0.81.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "//files": "Without this npm ships src, test and the CI config alongside the binary a user installs.",
6
6
  "files": [