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

Function movedSourceOf

apps/cloud/src/auth/v2-moved.test.ts:101–111  ·  view source on GitHub ↗
(metadata: Record<string, unknown> | "unavailable")

Source from the content-addressed store, hash-verified

99
100/** A metadata read answering `metadata`, or failing; records each read. */
101const movedSourceOf = (metadata: Record<string, unknown> | "unavailable") => {
102 const reads: string[] = [];
103 const source: V2MovedSource = {
104 organizationMetadata: (organizationId) =>
105 Effect.suspend(() => {
106 reads.push(organizationId);
107 return metadata === "unavailable" ? Effect.fail("unavailable") : Effect.succeed(metadata);
108 }),
109 };
110 return { source, reads };
111};
112
113/** An import source that admits the user, recording whether it was asked. */
114const importSourceOf = (eligible: boolean) => {

Callers 1

v2-moved.test.tsFile · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected