@tramvai/tokens-server 3.21.0 → 3.24.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,21 +1,26 @@
1
- import { createToken } from '@tinkoff/dippy';
1
+ import { createToken, Scope } from '@tinkoff/dippy';
2
2
 
3
3
  /**
4
4
  * @description
5
5
  * Specifies base url for public papi handlers. By default equals to `/[appName]/papi`
6
6
  */
7
- const SERVER_MODULE_PAPI_PUBLIC_URL = createToken('serverModulePapiPublicUrl');
7
+ const SERVER_MODULE_PAPI_PUBLIC_URL = createToken('serverModulePapiPublicUrl', {
8
+ scope: Scope.SINGLETON,
9
+ });
8
10
  /**
9
11
  * @description
10
12
  * Specifies base url for private papi handlers. By default equals `/[appName]/private/papi`
11
13
  */
12
- const SERVER_MODULE_PAPI_PRIVATE_URL = createToken('serverModulePapiPrivateUrl');
14
+ const SERVER_MODULE_PAPI_PRIVATE_URL = createToken('serverModulePapiPrivateUrl', {
15
+ scope: Scope.SINGLETON,
16
+ });
13
17
  /**
14
18
  * @description
15
19
  * Add private papi route
16
20
  */
17
21
  const SERVER_MODULE_PAPI_PRIVATE_ROUTE = createToken('serverModulePapiPrivateRoute', {
18
22
  multi: true,
23
+ scope: Scope.SINGLETON,
19
24
  });
20
25
  /**
21
26
  * @description
@@ -23,6 +28,7 @@ const SERVER_MODULE_PAPI_PRIVATE_ROUTE = createToken('serverModulePapiPrivateRou
23
28
  */
24
29
  const SERVER_MODULE_PAPI_PUBLIC_ROUTE = createToken('serverModulePapiPublicRoute', {
25
30
  multi: true,
31
+ scope: Scope.SINGLETON,
26
32
  });
27
33
  /**
28
34
  * @description
@@ -68,7 +74,10 @@ const DEPENDENCIES_VERSION_FILTER_TOKEN = createToken('dependenciesVersionFilter
68
74
  * List of the utility URLs on server (e.g. healthz and readyz)
69
75
  * Url matching is happens with a library `path-to-regexp`.
70
76
  */
71
- const UTILITY_SERVER_PATHS = createToken('server utility paths', { multi: true });
77
+ const UTILITY_SERVER_PATHS = createToken('server utility paths', {
78
+ multi: true,
79
+ scope: Scope.SINGLETON,
80
+ });
72
81
  /**
73
82
  * @description
74
83
  * Defines port to listen for utility routes
package/lib/index.js CHANGED
@@ -8,18 +8,23 @@ var dippy = require('@tinkoff/dippy');
8
8
  * @description
9
9
  * Specifies base url for public papi handlers. By default equals to `/[appName]/papi`
10
10
  */
11
- const SERVER_MODULE_PAPI_PUBLIC_URL = dippy.createToken('serverModulePapiPublicUrl');
11
+ const SERVER_MODULE_PAPI_PUBLIC_URL = dippy.createToken('serverModulePapiPublicUrl', {
12
+ scope: dippy.Scope.SINGLETON,
13
+ });
12
14
  /**
13
15
  * @description
14
16
  * Specifies base url for private papi handlers. By default equals `/[appName]/private/papi`
15
17
  */
16
- const SERVER_MODULE_PAPI_PRIVATE_URL = dippy.createToken('serverModulePapiPrivateUrl');
18
+ const SERVER_MODULE_PAPI_PRIVATE_URL = dippy.createToken('serverModulePapiPrivateUrl', {
19
+ scope: dippy.Scope.SINGLETON,
20
+ });
17
21
  /**
18
22
  * @description
19
23
  * Add private papi route
20
24
  */
21
25
  const SERVER_MODULE_PAPI_PRIVATE_ROUTE = dippy.createToken('serverModulePapiPrivateRoute', {
22
26
  multi: true,
27
+ scope: dippy.Scope.SINGLETON,
23
28
  });
24
29
  /**
25
30
  * @description
@@ -27,6 +32,7 @@ const SERVER_MODULE_PAPI_PRIVATE_ROUTE = dippy.createToken('serverModulePapiPriv
27
32
  */
28
33
  const SERVER_MODULE_PAPI_PUBLIC_ROUTE = dippy.createToken('serverModulePapiPublicRoute', {
29
34
  multi: true,
35
+ scope: dippy.Scope.SINGLETON,
30
36
  });
31
37
  /**
32
38
  * @description
@@ -72,7 +78,10 @@ const DEPENDENCIES_VERSION_FILTER_TOKEN = dippy.createToken('dependenciesVersion
72
78
  * List of the utility URLs on server (e.g. healthz and readyz)
73
79
  * Url matching is happens with a library `path-to-regexp`.
74
80
  */
75
- const UTILITY_SERVER_PATHS = dippy.createToken('server utility paths', { multi: true });
81
+ const UTILITY_SERVER_PATHS = dippy.createToken('server utility paths', {
82
+ multi: true,
83
+ scope: dippy.Scope.SINGLETON,
84
+ });
76
85
  /**
77
86
  * @description
78
87
  * Defines port to listen for utility routes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-server",
3
- "version": "3.21.0",
3
+ "version": "3.24.0",
4
4
  "description": "Tramvai tokens for @tramvai/module-server",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",
@@ -18,11 +18,11 @@
18
18
  "watch": "tsc -w"
19
19
  },
20
20
  "dependencies": {
21
- "@tramvai/papi": "3.21.0",
21
+ "@tramvai/papi": "3.24.0",
22
22
  "@tramvai/safe-strings": "0.6.2"
23
23
  },
24
24
  "peerDependencies": {
25
- "@tinkoff/dippy": "0.9.1",
25
+ "@tinkoff/dippy": "0.9.2",
26
26
  "tslib": "^2.4.0"
27
27
  },
28
28
  "license": "Apache-2.0"