@514labs/moose-lib 0.6.249-ci-4-g96fc24b3 → 0.6.249-ci-1-g07f4c473

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.
@@ -2392,7 +2392,19 @@ var WebApp = class {
2392
2392
  return app.callback();
2393
2393
  }
2394
2394
  if (typeof app.routing === "function") {
2395
- return (req, res) => {
2395
+ let isReady = false;
2396
+ let readyPromise = null;
2397
+ if (typeof app.ready === "function") {
2398
+ readyPromise = app.ready().then(() => {
2399
+ isReady = true;
2400
+ });
2401
+ } else {
2402
+ isReady = true;
2403
+ }
2404
+ return async (req, res) => {
2405
+ if (!isReady && readyPromise) {
2406
+ await readyPromise;
2407
+ }
2396
2408
  app.routing(req, res);
2397
2409
  };
2398
2410
  }