Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
75 lines (75 loc) · 2.28 KB
/
Copy pathpackage.json
File metadata and controls
75 lines (75 loc) · 2.28 KB
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
{
"name": "rate-engine",
"version": "4.0.1",
"private": false,
"description": "RateEngine is a client-agnostic, multi-stage rate limiting policy engine for TypeScript, powered by `@upstash/ratelimit`. It helps you define Redis-backed rate limit buckets, enforce ordered policy pipelines, choose fail-open or fail-closed behavior, and return standard HTTP rate-limit responses with minimal route-handler boilerplate.",
"keywords": [
"ratelimit",
"rate-limiter",
"rate-limiting",
"throttling",
"upstash",
"upstash-ratelimit",
"redis",
"typescript",
"nodejs",
"serverless",
"edge",
"sliding-window",
"token-bucket",
"fail-open",
"fail-closed",
"tiered-pipelines",
"api-protection",
"api-security",
"ddos-protection"
],
"homepage": "https://github.com/cpauldev/rate-engine#readme",
"bugs": {
"url": "https://github.com/cpauldev/rate-engine/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/cpauldev/rate-engine.git"
},
"license": "MIT",
"author": "Christian Paul (https://github.com/cpauldev)",
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist",
"README.md",
"CHANGELOG.md",
"LICENSE"
],
"scripts": {
"build": "npm run clean && tsc",
"clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
"prepack": "npm run build && npm run test:smoke",
"test": "bun test src/__tests__",
"test:smoke": "node --input-type=module -e \"const mod = await import('./dist/index.js'); for (const key of ['RateEngine','getRateLimitHeaders','toRateLimitResponse','toOAuthSlowDownResponse']) { if (typeof mod[key] !== 'function') throw new Error('Missing export: ' + key); }\"",
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json"
},
"dependencies": {
"@upstash/ratelimit": "2.0.8"
},
"devDependencies": {
"@types/node": "^26.6.5",
"@typescript/native": "npm:typescript@^7.0.2",
"bun-types": "^1.3.14",
"typescript": "~6.0.3"
},
"peerDependencies": {
"@upstash/redis": "^1.34.3"
},
"publishConfig": {
"access": "public"
}
}