()
| 253 | let appGraphEntered = false; |
| 254 | |
| 255 | const 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. |
no outgoing calls
no test coverage detected