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

Function getAppPlane

apps/cloud/src/server.ts:255–273  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

253let appGraphEntered = false;
254
255const getAppPlane = (): Promise<AppPlane> => {
256 if (appPlanePromise === undefined) {
257 appPlanePromise = import("./app").then(
258 ({ cloudApiHandler }) => {
259 const plane = cloudApiHandler();
260 appGraphEntered = true;
261 return plane;
262 },
263 (cause: unknown) => {
264 // Do not memoize a failure: the next request re-imports, as the
265 // un-memoized version did, instead of failing every request after.
266 appPlanePromise = undefined;
267 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: re-raise the import failure to the awaiting request
268 throw cause;
269 },
270 );
271 }
272 return appPlanePromise;
273};
274
275// ---------------------------------------------------------------------------
276// Pre-warming the app plane.

Callers 2

prewarmAppPlaneFunction · 0.85
server.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected