latency-lab 1.0.0 → 1.1.1

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 (49) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +58 -0
  3. package/dist/core.cjs +15 -0
  4. package/dist/core.cjs.map +1 -1
  5. package/dist/core.d.cts +4 -2
  6. package/dist/core.d.ts +4 -2
  7. package/dist/core.js +15 -1
  8. package/dist/core.js.map +1 -1
  9. package/dist/express.cjs +25 -14
  10. package/dist/express.cjs.map +1 -1
  11. package/dist/express.d.cts +1 -40
  12. package/dist/express.d.ts +1 -40
  13. package/dist/express.js +25 -14
  14. package/dist/express.js.map +1 -1
  15. package/dist/fastify.cjs +179 -0
  16. package/dist/fastify.cjs.map +1 -0
  17. package/dist/fastify.d.cts +29 -0
  18. package/dist/fastify.d.ts +29 -0
  19. package/dist/fastify.js +177 -0
  20. package/dist/fastify.js.map +1 -0
  21. package/dist/hono.cjs +189 -0
  22. package/dist/hono.cjs.map +1 -0
  23. package/dist/hono.d.cts +27 -0
  24. package/dist/hono.d.ts +27 -0
  25. package/dist/hono.js +187 -0
  26. package/dist/hono.js.map +1 -0
  27. package/dist/index.cjs +132 -31
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +4 -2
  30. package/dist/index.d.ts +4 -2
  31. package/dist/index.js +130 -32
  32. package/dist/index.js.map +1 -1
  33. package/dist/next.cjs +30 -16
  34. package/dist/next.cjs.map +1 -1
  35. package/dist/next.d.cts +3 -54
  36. package/dist/next.d.ts +3 -54
  37. package/dist/next.js +30 -16
  38. package/dist/next.js.map +1 -1
  39. package/dist/presets.cjs +28 -1
  40. package/dist/presets.cjs.map +1 -1
  41. package/dist/presets.d.cts +3 -0
  42. package/dist/presets.d.ts +3 -0
  43. package/dist/presets.js +28 -1
  44. package/dist/presets.js.map +1 -1
  45. package/dist/types.cjs.map +1 -1
  46. package/dist/types.d.cts +13 -1
  47. package/dist/types.d.ts +13 -1
  48. package/dist/types.js.map +1 -1
  49. package/package.json +53 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "latency-lab",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "Inject realistic network chaos into backend applications during local development and testing",
5
5
  "keywords": [
6
6
  "network",
@@ -18,7 +18,7 @@
18
18
  "license": "MIT",
19
19
  "repository": {
20
20
  "type": "git",
21
- "url": "https://github.com/MaheshTrapasiya/latency-lab.git"
21
+ "url": "git+https://github.com/MaheshTrapasiya/latency-lab.git"
22
22
  },
23
23
  "bugs": {
24
24
  "url": "https://github.com/MaheshTrapasiya/latency-lab/issues"
@@ -70,6 +70,26 @@
70
70
  "default": "./dist/next.cjs"
71
71
  }
72
72
  },
73
+ "./fastify": {
74
+ "import": {
75
+ "types": "./dist/fastify.d.ts",
76
+ "default": "./dist/fastify.js"
77
+ },
78
+ "require": {
79
+ "types": "./dist/fastify.d.cts",
80
+ "default": "./dist/fastify.cjs"
81
+ }
82
+ },
83
+ "./hono": {
84
+ "import": {
85
+ "types": "./dist/hono.d.ts",
86
+ "default": "./dist/hono.js"
87
+ },
88
+ "require": {
89
+ "types": "./dist/hono.d.cts",
90
+ "default": "./dist/hono.cjs"
91
+ }
92
+ },
73
93
  "./presets": {
74
94
  "import": {
75
95
  "types": "./dist/presets.d.ts",
@@ -79,11 +99,23 @@
79
99
  "types": "./dist/presets.d.cts",
80
100
  "default": "./dist/presets.cjs"
81
101
  }
82
- }
102
+ },
103
+ "./types": {
104
+ "import": {
105
+ "types": "./dist/types.d.ts",
106
+ "default": "./dist/types.js"
107
+ },
108
+ "require": {
109
+ "types": "./dist/types.d.cts",
110
+ "default": "./dist/types.cjs"
111
+ }
112
+ },
113
+ "./package.json": "./package.json"
83
114
  },
84
115
  "files": [
85
116
  "dist",
86
117
  "README.md",
118
+ "CHANGELOG.md",
87
119
  "LICENSE"
88
120
  ],
89
121
  "scripts": {
@@ -93,11 +125,16 @@
93
125
  "lint": "eslint src test",
94
126
  "lint:fix": "eslint src test --fix",
95
127
  "test": "vitest run",
128
+ "test:package": "npm run build && node test/package-smoke.mjs",
96
129
  "test:watch": "vitest",
97
130
  "test:coverage": "vitest run --coverage",
98
131
  "typecheck": "tsc --noEmit",
99
- "prepublishOnly": "npm run build:check && npm run lint && npm run test && npm run build",
100
- "clean": "rm -rf dist"
132
+ "version:release": "node scripts/bump-version.mjs",
133
+ "version:patch": "node scripts/bump-version.mjs patch",
134
+ "version:minor": "node scripts/bump-version.mjs minor",
135
+ "prepublishOnly": "npm run version:release && npm run build:check && npm run lint && npm run test && npm run test:package",
136
+ "prepack": "npm run build",
137
+ "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\""
101
138
  },
102
139
  "devDependencies": {
103
140
  "@types/node": "^25.9.3",
@@ -105,18 +142,28 @@
105
142
  "@typescript-eslint/parser": "^8.0.0",
106
143
  "@vitest/coverage-v8": "^2.1.9",
107
144
  "eslint": "^9.0.0",
145
+ "fastify": "^5.8.5",
146
+ "hono": "^4.12.26",
108
147
  "tsup": "^8.5.1",
109
148
  "typescript": "^5.9.3",
110
149
  "vitest": "^2.1.9"
111
150
  },
112
151
  "peerDependencies": {
113
152
  "express": "^4.0.0 || ^5.0.0",
153
+ "fastify": "^4.0.0 || ^5.0.0",
154
+ "hono": "^4.0.0",
114
155
  "next": "^14.0.0 || ^15.0.0"
115
156
  },
116
157
  "peerDependenciesMeta": {
117
158
  "express": {
118
159
  "optional": true
119
160
  },
161
+ "fastify": {
162
+ "optional": true
163
+ },
164
+ "hono": {
165
+ "optional": true
166
+ },
120
167
  "next": {
121
168
  "optional": true
122
169
  }
@@ -124,4 +171,4 @@
124
171
  "engines": {
125
172
  "node": ">=18.0.0"
126
173
  }
127
- }
174
+ }