@514labs/moose-lib 0.6.252-ci-1-gbfa86763 → 0.6.253-ci-1-g6bc67d54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2396,8 +2396,15 @@ var WebApp = class {
2396
2396
  return app.callback();
2397
2397
  }
2398
2398
  if (typeof app.routing === "function") {
2399
- return (req, res) => {
2400
- app.routing(req, res);
2399
+ const routing = app.routing;
2400
+ const appWithReady = app;
2401
+ let readyPromise = null;
2402
+ return async (req, res) => {
2403
+ if (readyPromise === null) {
2404
+ readyPromise = typeof appWithReady.ready === "function" ? appWithReady.ready() : Promise.resolve();
2405
+ }
2406
+ await readyPromise;
2407
+ routing(req, res);
2401
2408
  };
2402
2409
  }
2403
2410
  throw new Error(