MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / vaultObjectsFor

Function vaultObjectsFor

e2e/cloud/credential-write-durability.test.ts:171–178  ·  view source on GitHub ↗
(workos: EmulatorClient, slug: string)

Source from the content-addressed store, hash-verified

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. */
171const 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. */

Calls 1

readVaultObjectFunction · 0.85

Tested by

no test coverage detected