@514labs/moose-lib 0.6.249-ci-4-g96fc24b3 → 0.6.249-ci-2-ga3ce4290

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.
@@ -2487,7 +2487,19 @@ var WebApp = class {
2487
2487
  return app.callback();
2488
2488
  }
2489
2489
  if (typeof app.routing === "function") {
2490
- return (req, res) => {
2490
+ let isReady = false;
2491
+ let readyPromise = null;
2492
+ if (typeof app.ready === "function") {
2493
+ readyPromise = app.ready().then(() => {
2494
+ isReady = true;
2495
+ });
2496
+ } else {
2497
+ isReady = true;
2498
+ }
2499
+ return async (req, res) => {
2500
+ if (!isReady && readyPromise) {
2501
+ await readyPromise;
2502
+ }
2491
2503
  app.routing(req, res);
2492
2504
  };
2493
2505
  }