@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
package/dist/dmv2/index.mjs
CHANGED
|
@@ -2386,16 +2386,9 @@ var WebApp = class {
|
|
|
2386
2386
|
if (typeof app.callback === "function") {
|
|
2387
2387
|
return app.callback();
|
|
2388
2388
|
}
|
|
2389
|
-
if (
|
|
2390
|
-
return
|
|
2391
|
-
|
|
2392
|
-
if (fastifyApp.routing && typeof fastifyApp.routing.handle === "function") {
|
|
2393
|
-
fastifyApp.routing.handle(req, res);
|
|
2394
|
-
} else {
|
|
2395
|
-
throw new Error(
|
|
2396
|
-
"Fastify app detected but not properly initialized. Ensure .ready() is called before passing to WebApp."
|
|
2397
|
-
);
|
|
2398
|
-
}
|
|
2389
|
+
if (typeof app.routing === "function") {
|
|
2390
|
+
return (req, res) => {
|
|
2391
|
+
app.routing(req, res);
|
|
2399
2392
|
};
|
|
2400
2393
|
}
|
|
2401
2394
|
throw new Error(
|
|
@@ -2403,11 +2396,12 @@ var WebApp = class {
|
|
|
2403
2396
|
- A function (raw Node.js handler)
|
|
2404
2397
|
- An object with .handle() method (Express, Connect)
|
|
2405
2398
|
- An object with .callback() method (Koa)
|
|
2406
|
-
- An object with .routing
|
|
2399
|
+
- An object with .routing function (Fastify)
|
|
2407
2400
|
|
|
2408
2401
|
Examples:
|
|
2409
2402
|
Express: new WebApp("name", expressApp)
|
|
2410
2403
|
Koa: new WebApp("name", koaApp)
|
|
2404
|
+
Fastify: new WebApp("name", fastifyApp)
|
|
2411
2405
|
Raw: new WebApp("name", (req, res) => { ... })
|
|
2412
2406
|
`
|
|
2413
2407
|
);
|