File size: 3,171 Bytes
f107c64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
	"name": "express-rate-limit",
	"version": "8.1.0",
	"description": "Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.",
	"author": {
		"name": "Nathan Friedly",
		"url": "http://nfriedly.com/"
	},
	"license": "MIT",
	"homepage": "https://github.com/express-rate-limit/express-rate-limit",
	"repository": {
		"type": "git",
		"url": "git+https://github.com/express-rate-limit/express-rate-limit.git"
	},
	"funding": "https://github.com/sponsors/express-rate-limit",
	"keywords": [
		"express-rate-limit",
		"express",
		"rate",
		"limit",
		"ratelimit",
		"rate-limit",
		"middleware",
		"ip",
		"auth",
		"authorization",
		"security",
		"brute",
		"force",
		"bruteforce",
		"brute-force",
		"attack"
	],
	"type": "module",
	"exports": {
		".": {
			"import": {
				"types": "./dist/index.d.mts",
				"default": "./dist/index.mjs"
			},
			"require": {
				"types": "./dist/index.d.cts",
				"default": "./dist/index.cjs"
			}
		}
	},
	"main": "./dist/index.cjs",
	"module": "./dist/index.mjs",
	"types": "./dist/index.d.ts",
	"files": [
		"dist/",
		"tsconfig.json"
	],
	"engines": {
		"node": ">= 16"
	},
	"scripts": {
		"clean": "del-cli dist/ coverage/ *.log *.tmp *.bak *.tgz",
		"build:cjs": "esbuild --packages=external --platform=node --bundle --target=es2022 --format=cjs --outfile=dist/index.cjs --footer:js=\"module.exports = Object.assign(rateLimit, module.exports);\" source/index.ts",
		"build:esm": "esbuild --packages=external --platform=node --bundle --target=es2022 --format=esm --outfile=dist/index.mjs source/index.ts",
		"build:types": "dts-bundle-generator --out-file=dist/index.d.ts source/index.ts && cp dist/index.d.ts dist/index.d.cts && cp dist/index.d.ts dist/index.d.mts",
		"compile": "run-s clean build:*",
		"docs": "cd docs && mintlify dev",
		"lint:code": "biome check",
		"lint:docs": "prettier --check docs/ *.md",
		"lint": "run-s lint:*",
		"format:code": "biome check --write",
		"format:docs": "prettier --write docs/ *.md",
		"format": "run-s format:*",
		"test:lib": "jest",
		"test:ext": "cd test/external/ && bash run-all-tests",
		"test": "run-s lint test:lib",
		"pre-commit": "lint-staged",
		"prepare": "run-s compile && husky"
	},
	"peerDependencies": {
		"express": ">= 4.11"
	},
	"devDependencies": {
		"@biomejs/biome": "2.2.2",
		"@express-rate-limit/prettier": "1.1.1",
		"@express-rate-limit/tsconfig": "1.0.2",
		"@jest/globals": "30.1.2",
		"@types/express": "5.0.3",
		"@types/jest": "30.0.0",
		"@types/node": "24.3.0",
		"@types/supertest": "6.0.3",
		"del-cli": "6.0.0",
		"dts-bundle-generator": "8.1.2",
		"esbuild": "0.25.9",
		"express": "5.1.0",
		"husky": "9.1.7",
		"jest": "30.1.2",
		"lint-staged": "16.1.6",
		"mintlify": "4.2.94",
		"npm-run-all": "4.1.5",
		"prettier": "3.6.2",
		"ratelimit-header-parser": "0.1.0",
		"supertest": "7.1.4",
		"ts-jest": "29.4.1",
		"ts-node": "10.9.2",
		"typescript": "5.9.2"
	},
	"prettier": "@express-rate-limit/prettier",
	"lint-staged": {
		"*.{js,ts,json}": "biome check --write",
		"*.{md,yaml}": "prettier --write"
	},
	"dependencies": {
		"ip-address": "10.0.1"
	}
}