1 | {
|
2 | "name": "express-rate-limit",
|
3 | "version": "7.5.0",
|
4 | "description": "Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.",
|
5 | "author": {
|
6 | "name": "Nathan Friedly",
|
7 | "url": "http://nfriedly.com/"
|
8 | },
|
9 | "license": "MIT",
|
10 | "homepage": "https://github.com/express-rate-limit/express-rate-limit",
|
11 | "repository": {
|
12 | "type": "git",
|
13 | "url": "git+https://github.com/express-rate-limit/express-rate-limit.git"
|
14 | },
|
15 | "funding": "https://github.com/sponsors/express-rate-limit",
|
16 | "keywords": [
|
17 | "express-rate-limit",
|
18 | "express",
|
19 | "rate",
|
20 | "limit",
|
21 | "ratelimit",
|
22 | "rate-limit",
|
23 | "middleware",
|
24 | "ip",
|
25 | "auth",
|
26 | "authorization",
|
27 | "security",
|
28 | "brute",
|
29 | "force",
|
30 | "bruteforce",
|
31 | "brute-force",
|
32 | "attack"
|
33 | ],
|
34 | "type": "module",
|
35 | "exports": {
|
36 | ".": {
|
37 | "import": {
|
38 | "types": "./dist/index.d.mts",
|
39 | "default": "./dist/index.mjs"
|
40 | },
|
41 | "require": {
|
42 | "types": "./dist/index.d.cts",
|
43 | "default": "./dist/index.cjs"
|
44 | }
|
45 | }
|
46 | },
|
47 | "main": "./dist/index.cjs",
|
48 | "module": "./dist/index.mjs",
|
49 | "types": "./dist/index.d.ts",
|
50 | "files": [
|
51 | "dist/",
|
52 | "tsconfig.json"
|
53 | ],
|
54 | "engines": {
|
55 | "node": ">= 16"
|
56 | },
|
57 | "scripts": {
|
58 | "clean": "del-cli dist/ coverage/ *.log *.tmp *.bak *.tgz",
|
59 | "build:cjs": "esbuild --platform=node --bundle --target=es2022 --format=cjs --outfile=dist/index.cjs --footer:js=\"module.exports = rateLimit; module.exports.default = rateLimit; module.exports.rateLimit = rateLimit; module.exports.MemoryStore = MemoryStore;\" source/index.ts",
|
60 | "build:esm": "esbuild --platform=node --bundle --target=es2022 --format=esm --outfile=dist/index.mjs source/index.ts",
|
61 | "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",
|
62 | "compile": "run-s clean build:*",
|
63 | "docs": "cd docs && mintlify dev",
|
64 | "lint:code": "xo",
|
65 | "lint:rest": "prettier --check .",
|
66 | "lint": "run-s lint:*",
|
67 | "format:code": "xo --fix",
|
68 | "format:rest": "prettier --write .",
|
69 | "format": "run-s format:*",
|
70 | "test:lib": "jest",
|
71 | "test:ext": "cd test/external/ && bash run-all-tests",
|
72 | "test": "run-s lint test:lib",
|
73 | "pre-commit": "lint-staged",
|
74 | "prepare": "run-s compile && husky install config/husky"
|
75 | },
|
76 | "peerDependencies": {
|
77 | "express": "^4.11 || 5 || ^5.0.0-beta.1"
|
78 | },
|
79 | "devDependencies": {
|
80 | "@express-rate-limit/prettier": "1.1.1",
|
81 | "@express-rate-limit/tsconfig": "1.0.2",
|
82 | "@jest/globals": "29.7.0",
|
83 | "@types/express": "4.17.20",
|
84 | "@types/jest": "29.5.6",
|
85 | "@types/node": "20.8.7",
|
86 | "@types/supertest": "2.0.15",
|
87 | "del-cli": "5.1.0",
|
88 | "dts-bundle-generator": "8.0.1",
|
89 | "esbuild": "0.19.5",
|
90 | "express": "4.21.1",
|
91 | "husky": "8.0.3",
|
92 | "jest": "29.7.0",
|
93 | "lint-staged": "15.0.2",
|
94 | "mintlify": "4.0.63",
|
95 | "npm-run-all": "4.1.5",
|
96 | "ratelimit-header-parser": "0.1.0",
|
97 | "supertest": "6.3.3",
|
98 | "ts-jest": "29.1.1",
|
99 | "ts-node": "10.9.1",
|
100 | "typescript": "5.2.2",
|
101 | "xo": "0.56.0"
|
102 | },
|
103 | "xo": {
|
104 | "prettier": true,
|
105 | "rules": {
|
106 | "@typescript-eslint/no-empty-function": 0,
|
107 | "@typescript-eslint/no-dynamic-delete": 0,
|
108 | "@typescript-eslint/no-confusing-void-expression": 0,
|
109 | "@typescript-eslint/consistent-indexed-object-style": [
|
110 | "error",
|
111 | "index-signature"
|
112 | ],
|
113 | "n/no-unsupported-features/es-syntax": 0
|
114 | },
|
115 | "overrides": [
|
116 | {
|
117 | "files": "test/library/*.ts",
|
118 | "rules": {
|
119 | "@typescript-eslint/no-unsafe-argument": 0,
|
120 | "@typescript-eslint/no-unsafe-assignment": 0
|
121 | }
|
122 | }
|
123 | ],
|
124 | "ignore": [
|
125 | "test/external"
|
126 | ]
|
127 | },
|
128 | "prettier": "@express-rate-limit/prettier",
|
129 | "lint-staged": {
|
130 | "{source,test}/**/*.ts": "xo --fix",
|
131 | "**/*.{json,yaml,md}": "prettier --write "
|
132 | }
|
133 | }
|