@tramvai/tokens-server-private 2.11.0 → 2.20.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.
package/lib/index.d.ts CHANGED
@@ -30,6 +30,11 @@ export declare const WEB_FASTIFY_APP_BEFORE_INIT_TOKEN: import("@tinkoff/dippy")
30
30
  * It is called after global request handlers but before handlers for page rendering
31
31
  */
32
32
  export declare const WEB_FASTIFY_APP_INIT_TOKEN: import("@tinkoff/dippy").MultiTokenInterface<FASTIFY_APP_INIT_HANDLER>;
33
+ /**
34
+ * @description
35
+ * You can measure application requests duration.
36
+ */
37
+ export declare const WEB_FASTIFY_APP_METRICS_TOKEN: import("@tinkoff/dippy").MultiTokenInterface<FASTIFY_APP_INIT_HANDLER>;
33
38
  /**
34
39
  * @description
35
40
  * You can limit requests of application.
package/lib/index.es.js CHANGED
@@ -27,6 +27,11 @@ const WEB_FASTIFY_APP_BEFORE_INIT_TOKEN = createToken('webApp fastify beforeInit
27
27
  * It is called after global request handlers but before handlers for page rendering
28
28
  */
29
29
  const WEB_FASTIFY_APP_INIT_TOKEN = createToken('webApp fastify init', { multi: true });
30
+ /**
31
+ * @description
32
+ * You can measure application requests duration.
33
+ */
34
+ const WEB_FASTIFY_APP_METRICS_TOKEN = createToken('webApp fastify metrics', { multi: true });
30
35
  /**
31
36
  * @description
32
37
  * You can limit requests of application.
@@ -64,4 +69,4 @@ const UTILITY_SERVER_TOKEN = createToken('server utilityServer');
64
69
  */
65
70
  const UTILITY_WEB_FASTIFY_APP_TOKEN = createToken('webApp utilityServer');
66
71
 
67
- export { SERVER_FACTORY_TOKEN, UTILITY_SERVER_TOKEN, UTILITY_WEB_FASTIFY_APP_TOKEN, WEB_FASTIFY_APP_AFTER_ERROR_TOKEN, WEB_FASTIFY_APP_AFTER_INIT_TOKEN, WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN, WEB_FASTIFY_APP_BEFORE_INIT_TOKEN, WEB_FASTIFY_APP_FACTORY_TOKEN, WEB_FASTIFY_APP_INIT_TOKEN, WEB_FASTIFY_APP_LIMITER_TOKEN, WEB_FASTIFY_APP_PROCESS_ERROR_TOKEN, WEB_FASTIFY_APP_TOKEN };
72
+ export { SERVER_FACTORY_TOKEN, UTILITY_SERVER_TOKEN, UTILITY_WEB_FASTIFY_APP_TOKEN, WEB_FASTIFY_APP_AFTER_ERROR_TOKEN, WEB_FASTIFY_APP_AFTER_INIT_TOKEN, WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN, WEB_FASTIFY_APP_BEFORE_INIT_TOKEN, WEB_FASTIFY_APP_FACTORY_TOKEN, WEB_FASTIFY_APP_INIT_TOKEN, WEB_FASTIFY_APP_LIMITER_TOKEN, WEB_FASTIFY_APP_METRICS_TOKEN, WEB_FASTIFY_APP_PROCESS_ERROR_TOKEN, WEB_FASTIFY_APP_TOKEN };
package/lib/index.js CHANGED
@@ -31,6 +31,11 @@ const WEB_FASTIFY_APP_BEFORE_INIT_TOKEN = dippy.createToken('webApp fastify befo
31
31
  * It is called after global request handlers but before handlers for page rendering
32
32
  */
33
33
  const WEB_FASTIFY_APP_INIT_TOKEN = dippy.createToken('webApp fastify init', { multi: true });
34
+ /**
35
+ * @description
36
+ * You can measure application requests duration.
37
+ */
38
+ const WEB_FASTIFY_APP_METRICS_TOKEN = dippy.createToken('webApp fastify metrics', { multi: true });
34
39
  /**
35
40
  * @description
36
41
  * You can limit requests of application.
@@ -78,5 +83,6 @@ exports.WEB_FASTIFY_APP_BEFORE_INIT_TOKEN = WEB_FASTIFY_APP_BEFORE_INIT_TOKEN;
78
83
  exports.WEB_FASTIFY_APP_FACTORY_TOKEN = WEB_FASTIFY_APP_FACTORY_TOKEN;
79
84
  exports.WEB_FASTIFY_APP_INIT_TOKEN = WEB_FASTIFY_APP_INIT_TOKEN;
80
85
  exports.WEB_FASTIFY_APP_LIMITER_TOKEN = WEB_FASTIFY_APP_LIMITER_TOKEN;
86
+ exports.WEB_FASTIFY_APP_METRICS_TOKEN = WEB_FASTIFY_APP_METRICS_TOKEN;
81
87
  exports.WEB_FASTIFY_APP_PROCESS_ERROR_TOKEN = WEB_FASTIFY_APP_PROCESS_ERROR_TOKEN;
82
88
  exports.WEB_FASTIFY_APP_TOKEN = WEB_FASTIFY_APP_TOKEN;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-server-private",
3
- "version": "2.11.0",
3
+ "version": "2.20.0",
4
4
  "description": "Tramvai private tokens for @tramvai/module-server",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {},
22
22
  "peerDependencies": {
23
- "@tinkoff/dippy": "0.7.45",
23
+ "@tinkoff/dippy": "0.8.2",
24
24
  "fastify": "^3.29.0",
25
25
  "tslib": "^2.0.3"
26
26
  },