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

Function get

packages/core/sdk/src/connections.test.ts:76–93  ·  view source on GitHub ↗
(target, prop)

Source from the content-addressed store, hash-verified

74 const wrap = (inner: FumaDb): FumaDb =>
75 new Proxy(inner, {
76 get(target, prop) {
77 if (prop === "withContext") {
78 return (context: unknown) =>
79 wrap((target.withContext as (c: unknown) => FumaDb)(context));
80 }
81 if (prop === "transaction") {
82 return async (run: Parameters<FumaDb["transaction"]>[0]) => {
83 hooks.enter();
84 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: test instrument must unwind on both outcomes
85 try {
86 return await target.transaction(run);
87 } finally {
88 hooks.exit();
89 }
90 };
91 }
92 return Reflect.get(target, prop);
93 },
94 });
95 return wrap(db);
96};

Callers

nothing calls this directly

Calls 7

interceptHealthWritesFunction · 0.85
resolveMethod · 0.80
callMethod · 0.80
wrapFunction · 0.70
runFunction · 0.70
transactionMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected