| 458 | }; |
| 459 | |
| 460 | const ledger = async (targetName: string, service = "workos") => { |
| 461 | const state = readState(targetName); |
| 462 | const url = state?.urls?.[service]; |
| 463 | if (!url) throw new Error(`no ${service} emulator url recorded for ${targetName}`); |
| 464 | const { connectEmulator } = await import("@executor-js/emulate"); |
| 465 | const client = await connectEmulator({ baseUrl: url }); |
| 466 | const entries = await client.ledger.list(); |
| 467 | console.log(JSON.stringify(entries, null, 2)); |
| 468 | }; |
| 469 | |
| 470 | // --- lifecycle commands ---------------------------------------------------- |
| 471 | |