tspace-spear 1.0.0 → 1.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.
Files changed (43) hide show
  1. package/License +1 -1
  2. package/README.md +364 -47
  3. package/build/lib/core/decorators/context.js +11 -10
  4. package/build/lib/core/decorators/context.js.map +1 -0
  5. package/build/lib/core/decorators/controller.js +1 -0
  6. package/build/lib/core/decorators/controller.js.map +1 -0
  7. package/build/lib/core/decorators/headers.js +1 -0
  8. package/build/lib/core/decorators/headers.js.map +1 -0
  9. package/build/lib/core/decorators/index.d.ts +1 -0
  10. package/build/lib/core/decorators/index.js +2 -0
  11. package/build/lib/core/decorators/index.js.map +1 -0
  12. package/build/lib/core/decorators/methods.js +1 -0
  13. package/build/lib/core/decorators/methods.js.map +1 -0
  14. package/build/lib/core/decorators/middleware.d.ts +1 -1
  15. package/build/lib/core/decorators/middleware.js +1 -0
  16. package/build/lib/core/decorators/middleware.js.map +1 -0
  17. package/build/lib/core/decorators/statusCode.js +1 -0
  18. package/build/lib/core/decorators/statusCode.js.map +1 -0
  19. package/build/lib/core/decorators/swagger.d.ts +2 -0
  20. package/build/lib/core/decorators/swagger.js +15 -0
  21. package/build/lib/core/decorators/swagger.js.map +1 -0
  22. package/build/lib/core/server/index.d.ts +90 -44
  23. package/build/lib/core/server/index.js +314 -286
  24. package/build/lib/core/server/index.js.map +1 -0
  25. package/build/lib/core/server/parser-factory.d.ts +26 -0
  26. package/build/lib/core/server/parser-factory.js +428 -0
  27. package/build/lib/core/server/parser-factory.js.map +1 -0
  28. package/build/lib/core/server/q.bak.d.ts +0 -0
  29. package/build/lib/core/server/q.bak.js +965 -0
  30. package/build/lib/core/server/q.bak.js.map +1 -0
  31. package/build/lib/core/server/router.d.ts +63 -2
  32. package/build/lib/core/server/router.js +63 -1
  33. package/build/lib/core/server/router.js.map +1 -0
  34. package/build/lib/{types → core/types}/index.d.ts +85 -9
  35. package/build/lib/{types → core/types}/index.js +1 -0
  36. package/build/lib/core/types/index.js.map +1 -0
  37. package/build/lib/index.d.ts +4 -13
  38. package/build/lib/index.js +7 -23
  39. package/build/lib/index.js.map +1 -0
  40. package/build/tests/benchmark.test.d.ts +1 -0
  41. package/build/tests/benchmark.test.js +135 -0
  42. package/build/tests/benchmark.test.js.map +1 -0
  43. package/package.json +30 -19
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tspace-spear",
3
- "version": "1.0.0",
4
- "description": "Build a REST API with high speed using a native HTTP server for Node.js.",
3
+ "version": "1.0.2",
4
+ "description": "tspace-spear is a lightweight API framework for Node.js that is fast and highly focused on providing the best developer experience. It utilizes the native HTTP server",
5
5
  "main": "./build/lib/index.js",
6
6
  "types": "./build/lib/index.d.ts",
7
7
  "files": [
@@ -13,15 +13,10 @@
13
13
  },
14
14
  "keywords": [
15
15
  "tspace",
16
- "spear",
17
- "fast",
18
- "http",
19
- "node",
20
- "rest api",
21
- "decorators",
22
- "middlewares",
23
- "controllers",
24
- "routers"
16
+ "tspace-spear",
17
+ "web",
18
+ "framework",
19
+ "web framework"
25
20
  ],
26
21
  "author": "Thanathip (https://github.com/thanathip41)",
27
22
  "license": "MIT",
@@ -31,17 +26,33 @@
31
26
  "homepage": "https://github.com/thanathip41",
32
27
  "scripts": {
33
28
  "build": "tsc",
34
- "prepare": "npm run build"
29
+ "prepare": "npm run build",
30
+ "test": "ts-node src/tests/benchmark.test.ts",
31
+ "test:build": "node build/tests/benchmark.test.js",
32
+ "test:load": "autocannon -c 100 -d 40 -p 10 localhost:3000"
33
+ },
34
+ "dependencies": {
35
+ "find-my-way": "8.2.0",
36
+ "formidable": "3.5.1",
37
+ "mime-types": "2.1.35",
38
+ "on-finished": "2.4.1",
39
+ "reflect-metadata": "0.1.14",
40
+ "swagger-ui-dist": "5.17.10"
35
41
  },
36
42
  "devDependencies": {
43
+ "@types/autocannon": "^7.12.5",
44
+ "@types/express": "^4.17.21",
37
45
  "@types/formidable": "^3.4.5",
46
+ "@types/mime-types": "^2.1.4",
38
47
  "@types/node": "^16.4.0",
39
- "@types/on-finished": "^2.3.4"
40
- },
41
- "dependencies": {
42
- "find-my-way": "^8.1.0",
43
- "formidable": "^3.5.1",
44
- "on-finished": "^2.4.1",
45
- "reflect-metadata": "^0.1.14"
48
+ "@types/on-finished": "^2.3.4",
49
+ "@types/swagger-ui-dist": "^3.30.4",
50
+ "@types/yargs": "^17.0.32",
51
+ "autocannon": "^7.15.0",
52
+ "express": "^4.19.2",
53
+ "fastify": "^4.28.1",
54
+ "ts-node": "^10.9.2",
55
+ "typescript": "^5.4.5",
56
+ "yargs": "^17.7.2"
46
57
  }
47
58
  }