UNPKG

3.68 kBJSONView Raw
1{
2 "name": "express-rate-limit",
3 "version": "6.0.3",
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/nfriedly/express-rate-limit",
11 "repository": "https://github.com/nfriedly/express-rate-limit",
12 "keywords": [
13 "express-rate-limit",
14 "express",
15 "rate",
16 "limit",
17 "ratelimit",
18 "rate-limit",
19 "middleware",
20 "ip",
21 "auth",
22 "authorization",
23 "security",
24 "brute",
25 "force",
26 "bruteforce",
27 "brute-force",
28 "attack"
29 ],
30 "type": "module",
31 "types": "./dist/index.d.ts",
32 "exports": {
33 ".": {
34 "import": "./dist/index.mjs",
35 "require": "./dist/index.cjs"
36 }
37 },
38 "files": [
39 "dist/",
40 "tsconfig.json",
41 "package.json",
42 "readme.md",
43 "license.md",
44 "changelog.md"
45 ],
46 "engines": {
47 "node": ">= 14.5.0"
48 },
49 "scripts": {
50 "clean": "del-cli dist/ coverage/ *.log *.tmp *.bak *.tgz",
51 "build:cjs": "esbuild --bundle --format=cjs --outfile=dist/index.cjs --footer:js=\"module.exports = rateLimit;\" source/index.ts",
52 "build:esm": "esbuild --bundle --format=esm --outfile=dist/index.mjs source/index.ts",
53 "build:types": "dts-bundle-generator --out-file=dist/index.d.ts source/index.ts",
54 "compile": "run-s clean build:*",
55 "lint:code": "xo --ignore test/external/",
56 "lint:rest": "prettier --ignore-path .gitignore --ignore-unknown --check .",
57 "lint": "run-s lint:*",
58 "autofix:code": "xo --ignore test/external/ --fix",
59 "autofix:rest": "prettier --ignore-path .gitignore --ignore-unknown --write .",
60 "autofix": "run-s autofix:*",
61 "test:lib": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
62 "test:ext": "cd test/external/ && bash run-all-tests",
63 "test": "npm pack && run-s lint test:*",
64 "pre-commit": "lint-staged",
65 "prepare": "run-s compile && husky install config/husky"
66 },
67 "peerDependencies": {
68 "express": "^4"
69 },
70 "devDependencies": {
71 "@jest/globals": "^27.4.2",
72 "@types/express": "^4.17.13",
73 "@types/jest": "^27.0.3",
74 "@types/node": "^16.11.17",
75 "@types/supertest": "^2.0.11",
76 "cross-env": "^7.0.3",
77 "del-cli": "^4.0.1",
78 "dts-bundle-generator": "^6.2.0",
79 "esbuild": "^0.14.8",
80 "express": "^4.17.1",
81 "husky": "^7.0.4",
82 "jest": "^27.4.3",
83 "lint-staged": "^12.1.2",
84 "npm-run-all": "^4.1.5",
85 "supertest": "^6.1.6",
86 "ts-jest": "^27.1.1",
87 "ts-node": "^10.4.0",
88 "typescript": "^4.5.2",
89 "xo": "^0.47.0"
90 },
91 "xo": {
92 "prettier": true,
93 "rules": {
94 "@typescript-eslint/no-empty-function": 0,
95 "@typescript-eslint/no-dynamic-delete": 0,
96 "@typescript-eslint/no-confusing-void-expression": 0,
97 "@typescript-eslint/consistent-indexed-object-style": [
98 "error",
99 "index-signature"
100 ],
101 "import/no-named-as-default-member": 0,
102 "import/no-cycle": 0
103 }
104 },
105 "prettier": {
106 "semi": false,
107 "useTabs": true,
108 "singleQuote": true,
109 "bracketSpacing": true,
110 "trailingComma": "all",
111 "proseWrap": "always"
112 },
113 "jest": {
114 "preset": "ts-jest/presets/default-esm",
115 "globals": {
116 "ts-jest": {
117 "useESM": true
118 }
119 },
120 "verbose": true,
121 "collectCoverage": true,
122 "collectCoverageFrom": [
123 "source/**/*.ts"
124 ],
125 "testTimeout": 30000,
126 "testMatch": [
127 "**/test/library/**/*-test.[jt]s?(x)"
128 ],
129 "moduleFileExtensions": [
130 "js",
131 "jsx",
132 "json",
133 "ts",
134 "tsx"
135 ],
136 "moduleNameMapper": {
137 "^(\\.{1,2}/.*)\\.js$": "$1"
138 }
139 },
140 "lint-staged": {
141 "{source,test}/**/*.ts": "xo --ignore test/external/ --fix",
142 "**/*.{json,yaml,md}": "prettier --ignore-path .gitignore --ignore-unknown --write "
143 }
144}