@514labs/moose-lib 0.6.244 → 0.6.246-ci-2-g0109f4ec
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.
- package/dist/{browserCompatible-mRmtV1to.d.ts → browserCompatible-2eoeppzc.d.ts} +1 -1
- package/dist/{browserCompatible-bG7qUssc.d.mts → browserCompatible-CwNwv0e0.d.mts} +1 -1
- package/dist/browserCompatible.d.mts +2 -2
- package/dist/browserCompatible.d.ts +2 -2
- package/dist/browserCompatible.js +5 -11
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +5 -11
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/dmv2/index.d.mts +1 -1
- package/dist/dmv2/index.d.ts +1 -1
- package/dist/dmv2/index.js +5 -11
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +5 -11
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/{index-DtHRzX8Z.d.mts → index-bZEbqrMe.d.mts} +1 -1
- package/dist/{index-DtHRzX8Z.d.ts → index-bZEbqrMe.d.ts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2481,16 +2481,9 @@ var WebApp = class {
|
|
|
2481
2481
|
if (typeof app.callback === "function") {
|
|
2482
2482
|
return app.callback();
|
|
2483
2483
|
}
|
|
2484
|
-
if (
|
|
2485
|
-
return
|
|
2486
|
-
|
|
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
|
|
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
|
);
|