fulmine.js 5.19.2 → 5.19.3
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/package.json +2 -1
- package/src/adopt.js +20 -26
- package/src/application.js +46 -45
- package/src/cli.js +28 -34
- package/src/cluster.js +16 -25
- package/src/compression.js +39 -51
- package/src/declarative.js +586 -538
- package/src/hot-settings.js +80 -0
- package/src/index.js +11 -17
- package/src/lazy-readable.js +129 -0
- package/src/lazy-writable.js +97 -0
- package/src/middlewares.js +61 -77
- package/src/nest.js +19 -34
- package/src/node-shim.js +11 -13
- package/src/optimizer.js +598 -0
- package/src/parse-query.js +3 -3
- package/src/request-utils.js +306 -0
- package/src/request.js +101 -513
- package/src/response-utils.js +88 -0
- package/src/response.js +100 -443
- package/src/route.js +4 -5
- package/src/router-utils.js +950 -0
- package/src/router.js +126 -2148
- package/src/server-shape.js +26 -41
- package/src/server-timing.js +16 -29
- package/src/socket.js +208 -0
- package/src/testing.js +39 -42
- package/src/usage.js +16 -21
- package/src/utils.js +49 -59
- package/src/verify.js +18 -28
- package/src/view.js +5 -7
- package/src/walk.js +580 -0
- package/src/websocket.js +19 -20
- package/src/work.js +21 -27
package/src/route.js
CHANGED
|
@@ -25,9 +25,8 @@ const SYNC_LIMIT = 100;
|
|
|
25
25
|
/**
|
|
26
26
|
* The handlers registered for one path, and the walk over them.
|
|
27
27
|
*
|
|
28
|
-
* Express exports this, and code that builds a route by hand
|
|
29
|
-
*
|
|
30
|
-
* caller having decided the route is the right one; all it knows is which verb a handler answers.
|
|
28
|
+
* Express exports this, and code that builds a route by hand uses it: `new Route(path)`, a handler
|
|
29
|
+
* per verb, then `dispatch(req, res, done)`. It does no matching, only which verb a handler answers.
|
|
31
30
|
*/
|
|
32
31
|
class Route {
|
|
33
32
|
/**
|
|
@@ -69,8 +68,8 @@ class Route {
|
|
|
69
68
|
/**
|
|
70
69
|
* Runs the handlers this request's verb reaches, one after another through next().
|
|
71
70
|
*
|
|
72
|
-
* @param {any} req
|
|
73
|
-
* @param {any} res
|
|
71
|
+
* @param {any} req a Request, or whatever a caller that built this Route by hand is serving
|
|
72
|
+
* @param {any} res the matching response
|
|
74
73
|
* @param {(err?: any) => void} done called when the route is finished with the request, with
|
|
75
74
|
* whatever error it ended on
|
|
76
75
|
*/
|