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

Function validationsOf

e2e/cloud/api-key-validation-cache.test.ts:143–153  ·  view source on GitHub ↗
(
  entries: ReadonlyArray<LedgerEntry>,
  keyValue: string,
)

Source from the content-addressed store, hash-verified

141
142/** The ledger entries in which WorkOS was asked to validate THIS key value. */
143const validationsOf = (
144 entries: ReadonlyArray<LedgerEntry>,
145 keyValue: string,
146): ReadonlyArray<LedgerEntry> =>
147 entries.filter(
148 (entry) =>
149 entry.path === VALIDATIONS_PATH &&
150 typeof entry.request.body === "object" &&
151 entry.request.body !== null &&
152 (entry.request.body as { readonly value?: unknown }).value === keyValue,
153 );
154
155/** The shared fixtures both scenarios start from: two freshly minted keys
156 * (revoked on exit) and the WorkOS emulator the target validates against. */

Callers 1

readValidationsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected