@514labs/moose-lib 0.6.252 → 0.6.253

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.
@@ -2491,8 +2491,15 @@ var WebApp = class {
2491
2491
  return app.callback();
2492
2492
  }
2493
2493
  if (typeof app.routing === "function") {
2494
- return (req, res) => {
2495
- app.routing(req, res);
2494
+ const routing = app.routing;
2495
+ const appWithReady = app;
2496
+ let readyPromise = null;
2497
+ return async (req, res) => {
2498
+ if (readyPromise === null) {
2499
+ readyPromise = typeof appWithReady.ready === "function" ? appWithReady.ready() : Promise.resolve();
2500
+ }
2501
+ await readyPromise;
2502
+ routing(req, res);
2496
2503
  };
2497
2504
  }
2498
2505
  throw new Error(