@tramvai/module-request-limiter 1.84.0 → 1.84.2
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/lib/browser.d.ts +1 -0
- package/lib/browser.js +6 -1
- package/lib/server.es.js +1 -1
- package/lib/server.js +1 -1
- package/package.json +3 -3
package/lib/browser.d.ts
CHANGED
package/lib/browser.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import { Module } from '@tramvai/core';
|
|
3
|
+
import { createToken } from '@tinkoff/dippy';
|
|
4
|
+
|
|
5
|
+
const REQUESTS_LIMITER_TOKEN = createToken('requestsLimiterToken');
|
|
6
|
+
const REQUESTS_LIMITER_ACTIVATE_TOKEN = createToken('requestsLimiterActivateToken');
|
|
7
|
+
const REQUESTS_LIMITER_OPTIONS_TOKEN = createToken('requestsLimiterOptionsToken');
|
|
3
8
|
|
|
4
9
|
let RequestLimiterModule = class RequestLimiterModule {
|
|
5
10
|
};
|
|
@@ -9,4 +14,4 @@ RequestLimiterModule = __decorate([
|
|
|
9
14
|
})
|
|
10
15
|
], RequestLimiterModule);
|
|
11
16
|
|
|
12
|
-
export { RequestLimiterModule };
|
|
17
|
+
export { REQUESTS_LIMITER_ACTIVATE_TOKEN, REQUESTS_LIMITER_OPTIONS_TOKEN, REQUESTS_LIMITER_TOKEN, RequestLimiterModule };
|
package/lib/server.es.js
CHANGED
|
@@ -149,7 +149,7 @@ RequestLimiterModule = __decorate([
|
|
|
149
149
|
if (featureEnable !== true) {
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
return new RequestLimiter(options);
|
|
152
|
+
return new RequestLimiter(options !== null && options !== void 0 ? options : {});
|
|
153
153
|
},
|
|
154
154
|
deps: {
|
|
155
155
|
options: { token: REQUESTS_LIMITER_OPTIONS_TOKEN, optional: true },
|
package/lib/server.js
CHANGED
|
@@ -157,7 +157,7 @@ exports.RequestLimiterModule = tslib.__decorate([
|
|
|
157
157
|
if (featureEnable !== true) {
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
-
return new RequestLimiter(options);
|
|
160
|
+
return new RequestLimiter(options !== null && options !== void 0 ? options : {});
|
|
161
161
|
},
|
|
162
162
|
deps: {
|
|
163
163
|
options: { token: REQUESTS_LIMITER_OPTIONS_TOKEN, optional: true },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-request-limiter",
|
|
3
|
-
"version": "1.84.
|
|
3
|
+
"version": "1.84.2",
|
|
4
4
|
"description": "Enable different rendering modes for pages",
|
|
5
5
|
"main": "lib/server.js",
|
|
6
6
|
"module": "lib/server.es.js",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@tinkoff/dippy": "0.7.39",
|
|
35
|
-
"@tramvai/core": "1.84.
|
|
36
|
-
"@tramvai/tokens-server": "1.84.
|
|
35
|
+
"@tramvai/core": "1.84.2",
|
|
36
|
+
"@tramvai/tokens-server": "1.84.2",
|
|
37
37
|
"express": "^4.17.1",
|
|
38
38
|
"tslib": "^2.0.3"
|
|
39
39
|
}
|