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

Function get

packages/core/sdk/src/test-config.ts:83–97  ·  view source on GitHub ↗
(target, prop)

Source from the content-addressed store, hash-verified

81 { internal: context === undefined ? internal : { ...internal, context } },
82 {
83 get(target, prop) {
84 if (prop === "internal") return target.internal;
85 if (prop === "withContext") {
86 return (nextContext: ExecutorOwnerPolicyContext) => makeDb(nextContext);
87 }
88 if (!queryMethods.has(prop)) return undefined;
89
90 return async (...args: unknown[]) => {
91 const actual = await start();
92 const actualDb =
93 context === undefined ? actual.db : withQueryContext(actual.db, context);
94 const method = Reflect.get(actualDb, prop) as (...innerArgs: unknown[]) => unknown;
95 return method.apply(actualDb, args);
96 };
97 },
98 },
99 ) as FumaDb;
100

Callers

nothing calls this directly

Calls 4

withQueryContextFunction · 0.90
makeDbFunction · 0.70
startFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected