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