@514labs/moose-lib 0.6.244-ci-6-gbb6c4d8d → 0.6.244-ci-1-g1f019cce

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.
@@ -2481,16 +2481,9 @@ var WebApp = class {
2481
2481
  if (typeof app.callback === "function") {
2482
2482
  return app.callback();
2483
2483
  }
2484
- if (app.routing && typeof app.routing === "object") {
2485
- return async (req, res) => {
2486
- const fastifyApp = app;
2487
- if (fastifyApp.routing && typeof fastifyApp.routing.handle === "function") {
2488
- fastifyApp.routing.handle(req, res);
2489
- } else {
2490
- throw new Error(
2491
- "Fastify app detected but not properly initialized. Ensure .ready() is called before passing to WebApp."
2492
- );
2493
- }
2484
+ if (typeof app.routing === "function") {
2485
+ return (req, res) => {
2486
+ app.routing(req, res);
2494
2487
  };
2495
2488
  }
2496
2489
  throw new Error(
@@ -2498,11 +2491,12 @@ var WebApp = class {
2498
2491
  - A function (raw Node.js handler)
2499
2492
  - An object with .handle() method (Express, Connect)
2500
2493
  - An object with .callback() method (Koa)
2501
- - An object with .routing property (Fastify after .ready())
2494
+ - An object with .routing function (Fastify)
2502
2495
 
2503
2496
  Examples:
2504
2497
  Express: new WebApp("name", expressApp)
2505
2498
  Koa: new WebApp("name", koaApp)
2499
+ Fastify: new WebApp("name", fastifyApp)
2506
2500
  Raw: new WebApp("name", (req, res) => { ... })
2507
2501
  `
2508
2502
  );