@nestjs/throttler 4.2.0 → 5.0.0

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.
@@ -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": "4.2.0",
3
+ "version": "5.0.0",
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,54 +28,55 @@
28
28
  "md5": "^2.2.1"
29
29
  },
30
30
  "devDependencies": {
31
+ "@apollo/server": "4.9.3",
31
32
  "@changesets/cli": "2.26.2",
32
- "@commitlint/cli": "17.6.6",
33
- "@commitlint/config-angular": "17.6.6",
34
- "@nestjs/cli": "10.1.7",
35
- "@nestjs/common": "10.0.5",
36
- "@nestjs/core": "10.0.5",
37
- "@nestjs/graphql": "12.0.7",
38
- "@nestjs/platform-express": "10.0.5",
39
- "@nestjs/platform-fastify": "10.0.5",
40
- "@nestjs/platform-socket.io": "10.0.5",
41
- "@nestjs/platform-ws": "10.0.5",
42
- "@nestjs/schematics": "10.0.1",
43
- "@nestjs/testing": "10.0.5",
44
- "@nestjs/websockets": "10.0.5",
33
+ "@commitlint/cli": "17.7.1",
34
+ "@commitlint/config-angular": "17.7.0",
35
+ "@nestjs/cli": "10.1.17",
36
+ "@nestjs/common": "10.2.4",
37
+ "@nestjs/core": "10.2.4",
38
+ "@nestjs/graphql": "12.0.8",
39
+ "@nestjs/platform-express": "10.2.4",
40
+ "@nestjs/platform-fastify": "10.2.4",
41
+ "@nestjs/platform-socket.io": "10.2.4",
42
+ "@nestjs/platform-ws": "10.2.4",
43
+ "@nestjs/schematics": "10.0.2",
44
+ "@nestjs/testing": "10.2.4",
45
+ "@nestjs/websockets": "10.2.4",
45
46
  "@semantic-release/git": "10.0.1",
46
47
  "@types/express": "4.17.17",
47
- "@types/express-serve-static-core": "4.17.35",
48
- "@types/jest": "29.5.2",
48
+ "@types/express-serve-static-core": "4.17.36",
49
+ "@types/jest": "29.5.4",
49
50
  "@types/md5": "2.3.2",
50
- "@types/node": "18.16.19",
51
+ "@types/node": "18.17.14",
51
52
  "@types/supertest": "2.0.12",
52
- "@typescript-eslint/eslint-plugin": "5.61.0",
53
- "@typescript-eslint/parser": "5.61.0",
54
- "@apollo/server": "4.7.5",
55
- "apollo-server-fastify": "3.12.0",
56
- "conventional-changelog-cli": "3.0.0",
53
+ "@typescript-eslint/eslint-plugin": "6.6.0",
54
+ "@typescript-eslint/parser": "6.6.0",
55
+ "apollo-server-fastify": "3.12.1",
56
+ "conventional-changelog-cli": "4.0.0",
57
57
  "cz-conventional-changelog": "3.3.0",
58
- "eslint": "8.44.0",
59
- "eslint-config-prettier": "8.8.0",
60
- "eslint-plugin-import": "2.27.5",
61
- "graphql": "16.7.1",
58
+ "eslint": "8.48.0",
59
+ "eslint-config-prettier": "9.0.0",
60
+ "eslint-plugin-import": "2.28.1",
61
+ "graphql": "16.8.0",
62
62
  "graphql-tools": "9.0.0",
63
63
  "husky": "8.0.3",
64
- "jest": "29.6.1",
65
- "lint-staged": "13.2.3",
66
- "nodemon": "2.0.22",
64
+ "jest": "29.6.4",
65
+ "lint-staged": "14.0.1",
66
+ "nodemon": "3.0.1",
67
+ "pactum": "^3.4.1",
67
68
  "pinst": "3.0.0",
68
- "prettier": "3.0.0",
69
+ "prettier": "3.0.3",
69
70
  "reflect-metadata": "0.1.13",
70
71
  "rimraf": "5.0.1",
71
72
  "rxjs": "7.8.1",
72
- "socket.io": "4.7.1",
73
+ "socket.io": "4.7.2",
73
74
  "supertest": "6.3.3",
74
75
  "ts-jest": "29.1.1",
75
76
  "ts-loader": "9.4.4",
76
77
  "ts-node": "10.9.1",
77
78
  "tsconfig-paths": "4.2.0",
78
- "typescript": "5.1.6",
79
+ "typescript": "5.2.2",
79
80
  "ws": "8.13.0"
80
81
  },
81
82
  "peerDependencies": {