147 lines
3.8 KiB
JSON
Executable File
147 lines
3.8 KiB
JSON
Executable File
{
|
|
"name": "express-rate-limit",
|
|
"version": "6.7.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": "https://github.com/express-rate-limit/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": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.mjs",
|
|
"require": "./dist/index.cjs"
|
|
}
|
|
},
|
|
"main": "./dist/index.cjs",
|
|
"module": "./dist/index.mjs",
|
|
"types": "./dist/index.d.ts",
|
|
"files": [
|
|
"dist/",
|
|
"tsconfig.json",
|
|
"package.json",
|
|
"readme.md",
|
|
"license.md",
|
|
"changelog.md"
|
|
],
|
|
"engines": {
|
|
"node": ">= 12.9.0"
|
|
},
|
|
"scripts": {
|
|
"clean": "del-cli dist/ coverage/ *.log *.tmp *.bak *.tgz",
|
|
"build:cjs": "esbuild --bundle --target=es2019 --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",
|
|
"build:esm": "esbuild --bundle --target=es2019 --format=esm --outfile=dist/index.mjs source/index.ts",
|
|
"build:types": "dts-bundle-generator --out-file=dist/index.d.ts source/index.ts",
|
|
"compile": "run-s clean build:*",
|
|
"lint:code": "xo --ignore test/external/",
|
|
"lint:rest": "prettier --ignore-path .gitignore --ignore-unknown --check .",
|
|
"lint": "run-s lint:*",
|
|
"autofix:code": "xo --ignore test/external/ --fix",
|
|
"autofix:rest": "prettier --ignore-path .gitignore --ignore-unknown --write .",
|
|
"autofix": "run-s autofix:*",
|
|
"test:lib": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
|
|
"test:ext": "cd test/external/ && bash run-all-tests",
|
|
"test": "run-s lint test:*",
|
|
"pre-commit": "lint-staged",
|
|
"prepare": "run-s compile && husky install config/husky"
|
|
},
|
|
"peerDependencies": {
|
|
"express": "^4 || ^5"
|
|
},
|
|
"devDependencies": {
|
|
"@jest/globals": "29.3.1",
|
|
"@types/express": "4.17.14",
|
|
"@types/jest": "29.2.3",
|
|
"@types/node": "18.11.9",
|
|
"@types/supertest": "2.0.12",
|
|
"cross-env": "7.0.3",
|
|
"del-cli": "5.0.0",
|
|
"dts-bundle-generator": "7.0.0",
|
|
"esbuild": "0.15.14",
|
|
"express": "4.18.2",
|
|
"husky": "8.0.2",
|
|
"jest": "29.3.1",
|
|
"lint-staged": "13.0.3",
|
|
"npm-run-all": "4.1.5",
|
|
"supertest": "6.3.1",
|
|
"ts-jest": "29.0.3",
|
|
"ts-node": "10.9.1",
|
|
"typescript": "4.8.4",
|
|
"xo": "0.49.0"
|
|
},
|
|
"xo": {
|
|
"prettier": true,
|
|
"rules": {
|
|
"@typescript-eslint/no-empty-function": 0,
|
|
"@typescript-eslint/no-dynamic-delete": 0,
|
|
"@typescript-eslint/no-confusing-void-expression": 0,
|
|
"@typescript-eslint/consistent-indexed-object-style": [
|
|
"error",
|
|
"index-signature"
|
|
],
|
|
"n/no-unsupported-features/es-syntax": 0
|
|
}
|
|
},
|
|
"prettier": {
|
|
"semi": false,
|
|
"useTabs": true,
|
|
"singleQuote": true,
|
|
"bracketSpacing": true,
|
|
"trailingComma": "all",
|
|
"proseWrap": "always"
|
|
},
|
|
"jest": {
|
|
"preset": "ts-jest/presets/default-esm",
|
|
"globals": {
|
|
"ts-jest": {
|
|
"useESM": true
|
|
}
|
|
},
|
|
"verbose": true,
|
|
"collectCoverage": true,
|
|
"collectCoverageFrom": [
|
|
"source/**/*.ts"
|
|
],
|
|
"testTimeout": 30000,
|
|
"testMatch": [
|
|
"**/test/library/**/*-test.[jt]s?(x)"
|
|
],
|
|
"moduleFileExtensions": [
|
|
"js",
|
|
"jsx",
|
|
"json",
|
|
"ts",
|
|
"tsx"
|
|
],
|
|
"moduleNameMapper": {
|
|
"^(\\.{1,2}/.*)\\.js$": "$1"
|
|
}
|
|
},
|
|
"lint-staged": {
|
|
"{source,test}/**/*.ts": "xo --ignore test/external/ --fix",
|
|
"**/*.{json,yaml,md}": "prettier --ignore-path .gitignore --ignore-unknown --write "
|
|
}
|
|
}
|