@philiprehberger/middleware-ts 0.1.2 → 0.1.4
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/README.md +29 -3
- package/package.json +45 -9
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/philiprehberger/middleware-ts/actions/workflows/ci.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/@philiprehberger/middleware-ts)
|
|
5
|
-
[](https://github.com/philiprehberger/middleware-ts/commits/main)
|
|
6
6
|
|
|
7
|
-
Framework-agnostic middleware composition engine
|
|
7
|
+
Framework-agnostic middleware composition engine
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -49,6 +49,32 @@ const authBranch = branch(
|
|
|
49
49
|
| `branch(condition, trueMw, falseMw?)` | Conditional middleware |
|
|
50
50
|
| `withErrorHandler(mw, handler)` | Wrap with error catching |
|
|
51
51
|
|
|
52
|
+
## Development
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm install
|
|
56
|
+
npm run build
|
|
57
|
+
npm test
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Support
|
|
61
|
+
|
|
62
|
+
If you find this project useful:
|
|
63
|
+
|
|
64
|
+
⭐ [Star the repo](https://github.com/philiprehberger/middleware-ts)
|
|
65
|
+
|
|
66
|
+
🐛 [Report issues](https://github.com/philiprehberger/middleware-ts/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
|
|
67
|
+
|
|
68
|
+
💡 [Suggest features](https://github.com/philiprehberger/middleware-ts/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)
|
|
69
|
+
|
|
70
|
+
❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)
|
|
71
|
+
|
|
72
|
+
🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)
|
|
73
|
+
|
|
74
|
+
💻 [GitHub Profile](https://github.com/philiprehberger)
|
|
75
|
+
|
|
76
|
+
🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)
|
|
77
|
+
|
|
52
78
|
## License
|
|
53
79
|
|
|
54
|
-
MIT
|
|
80
|
+
[MIT](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,21 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@philiprehberger/middleware-ts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Framework-agnostic middleware composition engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./dist/index.d.cts",
|
|
17
|
+
"default": "./dist/index.cjs"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsup",
|
|
26
|
+
"dev": "tsup --watch",
|
|
27
|
+
"typecheck": "tsc --noEmit",
|
|
28
|
+
"prepublishOnly": "npm run build",
|
|
29
|
+
"test": "node --test"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"tsup": "^8.0.0",
|
|
33
|
+
"typescript": "^5.0.0"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"middleware",
|
|
37
|
+
"compose",
|
|
38
|
+
"pipeline",
|
|
39
|
+
"chain",
|
|
40
|
+
"handler",
|
|
41
|
+
"context"
|
|
42
|
+
],
|
|
14
43
|
"license": "MIT",
|
|
15
|
-
"repository": {
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "git+https://github.com/philiprehberger/ts-middleware.git"
|
|
47
|
+
},
|
|
16
48
|
"homepage": "https://github.com/philiprehberger/ts-middleware#readme",
|
|
17
|
-
"bugs": {
|
|
49
|
+
"bugs": {
|
|
50
|
+
"url": "https://github.com/philiprehberger/ts-middleware/issues"
|
|
51
|
+
},
|
|
18
52
|
"author": "Philip Rehberger",
|
|
19
|
-
"engines": {
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=18.0.0"
|
|
55
|
+
},
|
|
20
56
|
"sideEffects": false
|
|
21
57
|
}
|