@zentjs/zentjs 0.0.2
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/LICENSE +28 -0
- package/README.md +1584 -0
- package/package.json +85 -0
- package/src/core/application.mjs +1039 -0
- package/src/core/context.mjs +33 -0
- package/src/errors/error-handler.mjs +88 -0
- package/src/errors/http-error.mjs +86 -0
- package/src/hooks/lifecycle.mjs +175 -0
- package/src/http/request.mjs +166 -0
- package/src/http/response.mjs +151 -0
- package/src/index.mjs +33 -0
- package/src/middleware/pipeline.mjs +77 -0
- package/src/plugins/body-parser.mjs +165 -0
- package/src/plugins/cors.mjs +183 -0
- package/src/plugins/manager.mjs +112 -0
- package/src/plugins/request-metrics.mjs +74 -0
- package/src/router/index.mjs +198 -0
- package/src/router/node.mjs +72 -0
- package/src/router/radix-tree.mjs +313 -0
- package/src/utils/http-status.mjs +31 -0
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zentjs/zentjs",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "Framework web minimalista e performático para Node.js",
|
|
5
|
+
"license": "BSD-3-Clause",
|
|
6
|
+
"author": "Walber Vaz",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./src/index.mjs",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./src/index.mjs"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"src",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE"
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=24"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/walber-vaz/zentjs.git"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/walber-vaz/zentjs/issues"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/walber-vaz/zentjs#readme",
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"zentjs",
|
|
33
|
+
"framework",
|
|
34
|
+
"http",
|
|
35
|
+
"api",
|
|
36
|
+
"nodejs",
|
|
37
|
+
"esm"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "npm run test && npm pack --dry-run",
|
|
41
|
+
"test": "vitest run",
|
|
42
|
+
"test:unit": "vitest run test/unit",
|
|
43
|
+
"test:integration": "vitest run test/integration",
|
|
44
|
+
"test:watch": "vitest watch",
|
|
45
|
+
"test:coverage": "vitest run --coverage",
|
|
46
|
+
"bench": "node bench/run-benchmarks.mjs",
|
|
47
|
+
"bench:save-baseline": "node bench/run-benchmarks.mjs --save-baseline",
|
|
48
|
+
"bench:frameworks": "node bench/frameworks-bench.mjs",
|
|
49
|
+
"prepare": "husky",
|
|
50
|
+
"lint": "eslint . && prettier --check .",
|
|
51
|
+
"lint:fix": "eslint . --fix && prettier --write .",
|
|
52
|
+
"commitlint": "commitlint --from=HEAD~1 --to=HEAD --verbose",
|
|
53
|
+
"prepublishOnly": "npm run build"
|
|
54
|
+
},
|
|
55
|
+
"lint-staged": {
|
|
56
|
+
"*.{js,mjs,cjs}": [
|
|
57
|
+
"eslint --fix",
|
|
58
|
+
"prettier --write"
|
|
59
|
+
],
|
|
60
|
+
"*.{json,md,yml,yaml}": [
|
|
61
|
+
"prettier --write"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@commitlint/cli": "^20.4.2",
|
|
66
|
+
"@commitlint/config-conventional": "^20.4.2",
|
|
67
|
+
"@eslint/js": "10.0.1",
|
|
68
|
+
"@types/node": "^25.3.3",
|
|
69
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
70
|
+
"autocannon": "^8.0.0",
|
|
71
|
+
"eslint": "10.0.2",
|
|
72
|
+
"eslint-config-prettier": "10.1.8",
|
|
73
|
+
"eslint-plugin-prettier": "5.5.5",
|
|
74
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
75
|
+
"express": "^5.2.1",
|
|
76
|
+
"fastify": "^5.7.4",
|
|
77
|
+
"globals": "17.4.0",
|
|
78
|
+
"husky": "^9.1.7",
|
|
79
|
+
"jiti": "^2.6.1",
|
|
80
|
+
"lint-staged": "^16.3.1",
|
|
81
|
+
"prettier": "3.8.1",
|
|
82
|
+
"supertest": "^7.2.2",
|
|
83
|
+
"vitest": "4.0.18"
|
|
84
|
+
}
|
|
85
|
+
}
|