| 302 | }; |
| 303 | |
| 304 | const list = async (): Promise<void> => { |
| 305 | const scripts = await cfList(`/accounts/${ACCOUNT}/workers/scripts`); |
| 306 | const previews = scripts |
| 307 | .map((script: any) => String(script.id)) |
| 308 | .filter((id) => new RegExp(`^${WORKER_PREFIX}\\d+$`).test(id)) |
| 309 | .map((id) => ({ pr: Number(id.slice(WORKER_PREFIX.length)), name: id })) |
| 310 | .sort((a, b) => a.pr - b.pr); |
| 311 | process.stdout.write(`${JSON.stringify(previews)}\n`); |
| 312 | }; |
| 313 | |
| 314 | // E2e stacks are worker `executor-e2e-<8 hex>` + D1 `…-db` + Access app of the |
| 315 | // same name; the fixed-name workers are this account's persistent e2e infra. |