@nestjs/throttler 4.2.1 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +244 -166
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/throttler-module-options.interface.d.ts +12 -4
- package/dist/throttler-storage.interface.d.ts +0 -2
- package/dist/throttler-storage.interface.js.map +1 -1
- package/dist/throttler.decorator.d.ts +8 -2
- package/dist/throttler.decorator.js +14 -12
- package/dist/throttler.decorator.js.map +1 -1
- package/dist/throttler.guard.d.ts +12 -5
- package/dist/throttler.guard.interface.d.ts +7 -0
- package/dist/throttler.guard.interface.js +3 -0
- package/dist/throttler.guard.interface.js.map +1 -0
- package/dist/throttler.guard.js +77 -30
- package/dist/throttler.guard.js.map +1 -1
- package/dist/throttler.module.js +3 -2
- package/dist/throttler.module.js.map +1 -1
- package/dist/throttler.providers.d.ts +2 -1
- package/dist/throttler.providers.js +3 -1
- package/dist/throttler.providers.js.map +1 -1
- package/dist/throttler.service.js +3 -2
- package/dist/throttler.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utilities.d.ts +5 -0
- package/dist/utilities.js +14 -0
- package/dist/utilities.js.map +1 -0
- package/package.json +39 -38
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const seconds: (howMany: number) => number;
|
|
2
|
+
export declare const minutes: (howMany: number) => number;
|
|
3
|
+
export declare const hours: (howMany: number) => number;
|
|
4
|
+
export declare const days: (howMany: number) => number;
|
|
5
|
+
export declare const weeks: (howMany: number) => number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.weeks = exports.days = exports.hours = exports.minutes = exports.seconds = void 0;
|
|
4
|
+
const seconds = (howMany) => howMany * 1000;
|
|
5
|
+
exports.seconds = seconds;
|
|
6
|
+
const minutes = (howMany) => 60 * howMany * (0, exports.seconds)(1);
|
|
7
|
+
exports.minutes = minutes;
|
|
8
|
+
const hours = (howMany) => 60 * howMany * (0, exports.minutes)(1);
|
|
9
|
+
exports.hours = hours;
|
|
10
|
+
const days = (howMany) => 24 * howMany * (0, exports.hours)(1);
|
|
11
|
+
exports.days = days;
|
|
12
|
+
const weeks = (howMany) => 7 * howMany * (0, exports.days)(1);
|
|
13
|
+
exports.weeks = weeks;
|
|
14
|
+
//# sourceMappingURL=utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../src/utilities.ts"],"names":[],"mappings":";;;AAAO,MAAM,OAAO,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,GAAG,IAAI,CAAC;AAA9C,QAAA,OAAO,WAAuC;AACpD,MAAM,OAAO,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,EAAE,GAAG,OAAO,GAAG,IAAA,eAAO,EAAC,CAAC,CAAC,CAAC;AAAzD,QAAA,OAAO,WAAkD;AAC/D,MAAM,KAAK,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,EAAE,GAAG,OAAO,GAAG,IAAA,eAAO,EAAC,CAAC,CAAC,CAAC;AAAvD,QAAA,KAAK,SAAkD;AAC7D,MAAM,IAAI,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,EAAE,GAAG,OAAO,GAAG,IAAA,aAAK,EAAC,CAAC,CAAC,CAAC;AAApD,QAAA,IAAI,QAAgD;AAC1D,MAAM,KAAK,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,CAAC,GAAG,OAAO,GAAG,IAAA,YAAI,EAAC,CAAC,CAAC,CAAC;AAAnD,QAAA,KAAK,SAA8C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/throttler",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "A Rate-Limiting module for NestJS to work on Express, Fastify, Websockets, Socket.IO, and GraphQL, all rolled up into a simple package.",
|
|
5
5
|
"author": "Jay McDoniel <me@jaymcdoniel.dev>",
|
|
6
6
|
"contributors": [],
|
|
@@ -28,55 +28,56 @@
|
|
|
28
28
|
"md5": "^2.2.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
+
"@apollo/server": "4.9.4",
|
|
31
32
|
"@changesets/cli": "2.26.2",
|
|
32
|
-
"@commitlint/cli": "
|
|
33
|
-
"@commitlint/config-angular": "
|
|
34
|
-
"@nestjs/cli": "10.
|
|
35
|
-
"@nestjs/common": "10.
|
|
36
|
-
"@nestjs/core": "10.
|
|
37
|
-
"@nestjs/graphql": "12.0.
|
|
38
|
-
"@nestjs/platform-express": "10.
|
|
39
|
-
"@nestjs/platform-fastify": "10.
|
|
40
|
-
"@nestjs/platform-socket.io": "10.
|
|
41
|
-
"@nestjs/platform-ws": "10.
|
|
42
|
-
"@nestjs/schematics": "10.0.
|
|
43
|
-
"@nestjs/testing": "10.
|
|
44
|
-
"@nestjs/websockets": "10.
|
|
33
|
+
"@commitlint/cli": "18.0.0",
|
|
34
|
+
"@commitlint/config-angular": "18.0.0",
|
|
35
|
+
"@nestjs/cli": "10.2.0",
|
|
36
|
+
"@nestjs/common": "10.2.7",
|
|
37
|
+
"@nestjs/core": "10.2.7",
|
|
38
|
+
"@nestjs/graphql": "12.0.9",
|
|
39
|
+
"@nestjs/platform-express": "10.2.7",
|
|
40
|
+
"@nestjs/platform-fastify": "10.2.7",
|
|
41
|
+
"@nestjs/platform-socket.io": "10.2.7",
|
|
42
|
+
"@nestjs/platform-ws": "10.2.7",
|
|
43
|
+
"@nestjs/schematics": "10.0.2",
|
|
44
|
+
"@nestjs/testing": "10.2.7",
|
|
45
|
+
"@nestjs/websockets": "10.2.7",
|
|
45
46
|
"@semantic-release/git": "10.0.1",
|
|
46
|
-
"@types/express": "4.17.
|
|
47
|
-
"@types/express-serve-static-core": "4.17.
|
|
48
|
-
"@types/jest": "29.5.
|
|
49
|
-
"@types/md5": "2.3.
|
|
50
|
-
"@types/node": "18.
|
|
51
|
-
"@types/supertest": "2.0.
|
|
52
|
-
"@typescript-eslint/eslint-plugin": "
|
|
53
|
-
"@typescript-eslint/parser": "
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"conventional-changelog-cli": "3.0.0",
|
|
47
|
+
"@types/express": "4.17.20",
|
|
48
|
+
"@types/express-serve-static-core": "4.17.39",
|
|
49
|
+
"@types/jest": "29.5.6",
|
|
50
|
+
"@types/md5": "2.3.4",
|
|
51
|
+
"@types/node": "18.18.6",
|
|
52
|
+
"@types/supertest": "2.0.15",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "6.9.0",
|
|
54
|
+
"@typescript-eslint/parser": "6.9.0",
|
|
55
|
+
"apollo-server-fastify": "3.12.1",
|
|
56
|
+
"conventional-changelog-cli": "4.1.0",
|
|
57
57
|
"cz-conventional-changelog": "3.3.0",
|
|
58
|
-
"eslint": "8.
|
|
59
|
-
"eslint-config-prettier": "
|
|
60
|
-
"eslint-plugin-import": "2.
|
|
61
|
-
"graphql": "16.
|
|
58
|
+
"eslint": "8.52.0",
|
|
59
|
+
"eslint-config-prettier": "9.0.0",
|
|
60
|
+
"eslint-plugin-import": "2.29.0",
|
|
61
|
+
"graphql": "16.8.1",
|
|
62
62
|
"graphql-tools": "9.0.0",
|
|
63
63
|
"husky": "8.0.3",
|
|
64
|
-
"jest": "29.
|
|
65
|
-
"lint-staged": "
|
|
66
|
-
"nodemon": "
|
|
64
|
+
"jest": "29.7.0",
|
|
65
|
+
"lint-staged": "15.0.2",
|
|
66
|
+
"nodemon": "3.0.1",
|
|
67
|
+
"pactum": "^3.4.1",
|
|
67
68
|
"pinst": "3.0.0",
|
|
68
|
-
"prettier": "3.0.
|
|
69
|
+
"prettier": "3.0.3",
|
|
69
70
|
"reflect-metadata": "0.1.13",
|
|
70
|
-
"rimraf": "5.0.
|
|
71
|
+
"rimraf": "5.0.5",
|
|
71
72
|
"rxjs": "7.8.1",
|
|
72
|
-
"socket.io": "4.7.
|
|
73
|
+
"socket.io": "4.7.2",
|
|
73
74
|
"supertest": "6.3.3",
|
|
74
75
|
"ts-jest": "29.1.1",
|
|
75
|
-
"ts-loader": "9.
|
|
76
|
+
"ts-loader": "9.5.0",
|
|
76
77
|
"ts-node": "10.9.1",
|
|
77
78
|
"tsconfig-paths": "4.2.0",
|
|
78
|
-
"typescript": "5.
|
|
79
|
-
"ws": "8.
|
|
79
|
+
"typescript": "5.2.2",
|
|
80
|
+
"ws": "8.14.2"
|
|
80
81
|
},
|
|
81
82
|
"peerDependencies": {
|
|
82
83
|
"@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0",
|