(workos: EmulatorClient, slug: string)
| 169 | /** Every vault object this connection owns. The object name embeds the logical |
| 170 | * item id, so the connection's own objects are the ones carrying its slug. */ |
| 171 | const vaultObjectsFor = (workos: EmulatorClient, slug: string): Effect.Effect<VaultObject[]> => |
| 172 | Effect.promise(async () => { |
| 173 | const snapshot = await workos.state(); |
| 174 | const items = snapshot.collections["workos.vault_objects"]?.items ?? []; |
| 175 | return items |
| 176 | .map((item) => readVaultObject({ ...item })) |
| 177 | .filter((object): object is VaultObject => object !== null && object.name.includes(slug)); |
| 178 | }); |
| 179 | |
| 180 | /** Arm a fault on the shared emulator and take it back down with the scope, by |
| 181 | * id — a blanket `faults.clear()` would also disarm a neighbouring scenario's. */ |
no test coverage detected