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

Function vaultObjectsFor

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

Source from the content-addressed store, hash-verified

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

Calls 1

readVaultObjectFunction · 0.85

Tested by

no test coverage detected