Add request lifecycle hooks to support extensibility
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 12/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- express, javascript, node.js
- 领域
- backend
调研方向
This is a design proposal, not a located change: it asks for enter/exit hooks around the app, router and route stages the request passes through, plus possibly middleware auto-wrapping. Start by reading how the router dispatches through its layers and where a request leaves one layer for another, then write up the hook points and their ordering/error semantics as a proposal for maintainers to agree on before any code. Done here means an accepted design (likely an RFC or discussion) rather than a patch, so it is not a starting point for a first contribution.
由索引模型根据 Issue 内容生成。
描述
There are a number of features that I would like express to support. Things that I personally feel would improve ergonomics and ease of use. However, many of them involve a decision about a choice in direction and behavior that I suspect express would decline to make on behalf of users as a whole. For instance: I would like to support automatic output serialization based on content type and registered serializers.
I am willing to implement things like this for my own use, but I find myself stymied by the lack of hooks into the express routing process. While I can store a stack of scopes with registered serializers on the request, I have no way to guarantee the stack unwinds if the processing jumps to another route or router.
A robust system of hooks would not only support my own personal extensions, but enable an ecosystem of behavioral plugins.
The top lifecycle hooks that would help me personally are enter/exit hooks for app/router/route. Though there are probably other useful points that I am simply not thinking of at the moment.
I would also find the ability to auto-wrap middleware useful, but I don't know if that is too much to ask for at the moment.
- 主要语言
- JavaScript
- 星标
- 69.7k
- 派生
- 25.7k
- 平均合并
- 2 天 9 小时
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
expressjs/express 的其他 Issue
-
Outdated res.send() syntax in lib/response.js documentation example可能重新可做 关联的 PR 已关闭且未合并。 未关闭docs
难度 1/5 1 小时以内 新手友好度 95/100
expressjs/express#7588 · 1 条评论 ·
维护者通常 1 天内回复
-
4.x deps module:body-parser
难度 1/5 1 小时以内 新手友好度 75/100
expressjs/express#7564 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Update to mocha 12.x可能已有人在做 @ganeshghutukade-04 于 32 天前认领。 未关闭deps
难度 2/5 1-3 小时 新手友好度 67/100
expressjs/express#7547 · 6 条评论 ·
维护者通常 1 天内回复
-
req.subdomains splits an IPv6 host that contains dots可能已有人在做 @johnnyhuirilef 于 36 天前认领。 未关闭4.x 5.x bug
难度 2/5 1-3 小时 新手友好度 72/100
expressjs/express#7532 · 2 条评论 ·
维护者通常 1 天内回复
-
Readme: project name 'express.js' is not capitalized可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 1/5 1 小时以内 新手友好度 95/100
维护者通常 1 天内回复
查看 expressjs/express 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 2 天内回复
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10可能已有人在做 @goranai 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
NL-BioImaging/OMERO.biomero#92 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 74/100
nicobailon/pi-web-access#710 ·
维护者通常 1 天内回复