@tramvai/tokens-server-private 3.19.1 → 3.23.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.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createToken } from '@tinkoff/dippy';
1
+ import { createToken, Scope } from '@tinkoff/dippy';
2
2
 
3
3
  /**
4
4
  * @description
@@ -41,18 +41,18 @@ const WEB_FASTIFY_APP_TOKEN = createToken('webApp fastify');
41
41
  * @description
42
42
  * Subscription to before web-app initialization. It is called before any standard handlers.
43
43
  */
44
- const WEB_FASTIFY_APP_BEFORE_INIT_TOKEN = createToken('webApp fastify beforeInit', { multi: true });
44
+ const WEB_FASTIFY_APP_BEFORE_INIT_TOKEN = createToken('webApp fastify beforeInit', { multi: true, scope: Scope.SINGLETON });
45
45
  /**
46
46
  * @description
47
47
  * Subscription to web-app initialization.
48
48
  * It is called after global request handlers but before handlers for page rendering
49
49
  */
50
- const WEB_FASTIFY_APP_INIT_TOKEN = createToken('webApp fastify init', { multi: true });
50
+ const WEB_FASTIFY_APP_INIT_TOKEN = createToken('webApp fastify init', { multi: true, scope: Scope.SINGLETON });
51
51
  /**
52
52
  * @description
53
53
  * You can measure application requests duration.
54
54
  */
55
- const WEB_FASTIFY_APP_METRICS_TOKEN = createToken('webApp fastify metrics', { multi: true });
55
+ const WEB_FASTIFY_APP_METRICS_TOKEN = createToken('webApp fastify metrics', { multi: true, scope: Scope.SINGLETON });
56
56
  /**
57
57
  * @description
58
58
  * You can limit requests of application.
package/lib/index.js CHANGED
@@ -45,18 +45,18 @@ const WEB_FASTIFY_APP_TOKEN = dippy.createToken('webApp fastify');
45
45
  * @description
46
46
  * Subscription to before web-app initialization. It is called before any standard handlers.
47
47
  */
48
- const WEB_FASTIFY_APP_BEFORE_INIT_TOKEN = dippy.createToken('webApp fastify beforeInit', { multi: true });
48
+ const WEB_FASTIFY_APP_BEFORE_INIT_TOKEN = dippy.createToken('webApp fastify beforeInit', { multi: true, scope: dippy.Scope.SINGLETON });
49
49
  /**
50
50
  * @description
51
51
  * Subscription to web-app initialization.
52
52
  * It is called after global request handlers but before handlers for page rendering
53
53
  */
54
- const WEB_FASTIFY_APP_INIT_TOKEN = dippy.createToken('webApp fastify init', { multi: true });
54
+ const WEB_FASTIFY_APP_INIT_TOKEN = dippy.createToken('webApp fastify init', { multi: true, scope: dippy.Scope.SINGLETON });
55
55
  /**
56
56
  * @description
57
57
  * You can measure application requests duration.
58
58
  */
59
- const WEB_FASTIFY_APP_METRICS_TOKEN = dippy.createToken('webApp fastify metrics', { multi: true });
59
+ const WEB_FASTIFY_APP_METRICS_TOKEN = dippy.createToken('webApp fastify metrics', { multi: true, scope: dippy.Scope.SINGLETON });
60
60
  /**
61
61
  * @description
62
62
  * You can limit requests of application.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-server-private",
3
- "version": "3.19.1",
3
+ "version": "3.23.0",
4
4
  "description": "Tramvai private tokens for @tramvai/module-server",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",
@@ -18,10 +18,10 @@
18
18
  "watch": "tsc -w"
19
19
  },
20
20
  "dependencies": {
21
- "@tramvai/papi": "3.19.1"
21
+ "@tramvai/papi": "3.23.0"
22
22
  },
23
23
  "peerDependencies": {
24
- "@tinkoff/dippy": "0.9.1",
24
+ "@tinkoff/dippy": "0.9.2",
25
25
  "fastify": "^4.6.0",
26
26
  "tslib": "^2.4.0"
27
27
  },