@tramvai/tokens-server 4.18.3 → 4.18.5
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 +14 -5
- package/lib/index.js +14 -5
- package/package.json +3 -3
package/lib/index.es.js
CHANGED
|
@@ -63,6 +63,7 @@ const SERVER_TOKEN = createToken('server');
|
|
|
63
63
|
*/
|
|
64
64
|
const PROXY_CONFIG_TOKEN = createToken('proxyConfigToken', {
|
|
65
65
|
multi: true,
|
|
66
|
+
scope: Scope.SINGLETON,
|
|
66
67
|
});
|
|
67
68
|
/**
|
|
68
69
|
* @description
|
|
@@ -82,29 +83,37 @@ const UTILITY_SERVER_PATHS = createToken('server utility paths', {
|
|
|
82
83
|
* @description
|
|
83
84
|
* Defines port to listen for utility routes
|
|
84
85
|
*/
|
|
85
|
-
const UTILITY_SERVER_PORT_TOKEN = createToken('server utility server port'
|
|
86
|
+
const UTILITY_SERVER_PORT_TOKEN = createToken('server utility server port', {
|
|
87
|
+
scope: Scope.SINGLETON,
|
|
88
|
+
});
|
|
86
89
|
/**
|
|
87
90
|
* @description
|
|
88
91
|
* Custom path for liveness probe
|
|
89
92
|
*/
|
|
90
|
-
const LIVENESS_PATH_TOKEN = createToken('liveness path');
|
|
93
|
+
const LIVENESS_PATH_TOKEN = createToken('liveness path', { scope: Scope.SINGLETON });
|
|
91
94
|
/**
|
|
92
95
|
* @description
|
|
93
96
|
* Custom path for readiness probe
|
|
94
97
|
*/
|
|
95
|
-
const READINESS_PATH_TOKEN = createToken('readiness path'
|
|
98
|
+
const READINESS_PATH_TOKEN = createToken('readiness path', {
|
|
99
|
+
scope: Scope.SINGLETON,
|
|
100
|
+
});
|
|
96
101
|
/**
|
|
97
102
|
* @description
|
|
98
103
|
* Custom function for k8s readiness, you might want to wait for something before allowing traffic to your app\
|
|
99
104
|
* https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
|
|
100
105
|
*/
|
|
101
|
-
const READINESS_PROBE_TOKEN = createToken('readiness-probe-fn'
|
|
106
|
+
const READINESS_PROBE_TOKEN = createToken('readiness-probe-fn', {
|
|
107
|
+
scope: Scope.SINGLETON,
|
|
108
|
+
});
|
|
102
109
|
/**
|
|
103
110
|
* @description
|
|
104
111
|
* Custom function for k8s liveness, a function accepting a state and returning a promise indicating service health\
|
|
105
112
|
* https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
|
|
106
113
|
*/
|
|
107
|
-
const LIVENESS_PROBE_TOKEN = createToken('liveness-probe-fn'
|
|
114
|
+
const LIVENESS_PROBE_TOKEN = createToken('liveness-probe-fn', {
|
|
115
|
+
scope: Scope.SINGLETON,
|
|
116
|
+
});
|
|
108
117
|
/**
|
|
109
118
|
* @description
|
|
110
119
|
* Enable Early Hints. By default return `true` when `EARLY_HINTS_ENABLED` env variable has a `"true"` value
|
package/lib/index.js
CHANGED
|
@@ -67,6 +67,7 @@ const SERVER_TOKEN = dippy.createToken('server');
|
|
|
67
67
|
*/
|
|
68
68
|
const PROXY_CONFIG_TOKEN = dippy.createToken('proxyConfigToken', {
|
|
69
69
|
multi: true,
|
|
70
|
+
scope: dippy.Scope.SINGLETON,
|
|
70
71
|
});
|
|
71
72
|
/**
|
|
72
73
|
* @description
|
|
@@ -86,29 +87,37 @@ const UTILITY_SERVER_PATHS = dippy.createToken('server utility paths', {
|
|
|
86
87
|
* @description
|
|
87
88
|
* Defines port to listen for utility routes
|
|
88
89
|
*/
|
|
89
|
-
const UTILITY_SERVER_PORT_TOKEN = dippy.createToken('server utility server port'
|
|
90
|
+
const UTILITY_SERVER_PORT_TOKEN = dippy.createToken('server utility server port', {
|
|
91
|
+
scope: dippy.Scope.SINGLETON,
|
|
92
|
+
});
|
|
90
93
|
/**
|
|
91
94
|
* @description
|
|
92
95
|
* Custom path for liveness probe
|
|
93
96
|
*/
|
|
94
|
-
const LIVENESS_PATH_TOKEN = dippy.createToken('liveness path');
|
|
97
|
+
const LIVENESS_PATH_TOKEN = dippy.createToken('liveness path', { scope: dippy.Scope.SINGLETON });
|
|
95
98
|
/**
|
|
96
99
|
* @description
|
|
97
100
|
* Custom path for readiness probe
|
|
98
101
|
*/
|
|
99
|
-
const READINESS_PATH_TOKEN = dippy.createToken('readiness path'
|
|
102
|
+
const READINESS_PATH_TOKEN = dippy.createToken('readiness path', {
|
|
103
|
+
scope: dippy.Scope.SINGLETON,
|
|
104
|
+
});
|
|
100
105
|
/**
|
|
101
106
|
* @description
|
|
102
107
|
* Custom function for k8s readiness, you might want to wait for something before allowing traffic to your app\
|
|
103
108
|
* https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
|
|
104
109
|
*/
|
|
105
|
-
const READINESS_PROBE_TOKEN = dippy.createToken('readiness-probe-fn'
|
|
110
|
+
const READINESS_PROBE_TOKEN = dippy.createToken('readiness-probe-fn', {
|
|
111
|
+
scope: dippy.Scope.SINGLETON,
|
|
112
|
+
});
|
|
106
113
|
/**
|
|
107
114
|
* @description
|
|
108
115
|
* Custom function for k8s liveness, a function accepting a state and returning a promise indicating service health\
|
|
109
116
|
* https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
|
|
110
117
|
*/
|
|
111
|
-
const LIVENESS_PROBE_TOKEN = dippy.createToken('liveness-probe-fn'
|
|
118
|
+
const LIVENESS_PROBE_TOKEN = dippy.createToken('liveness-probe-fn', {
|
|
119
|
+
scope: dippy.Scope.SINGLETON,
|
|
120
|
+
});
|
|
112
121
|
/**
|
|
113
122
|
* @description
|
|
114
123
|
* Enable Early Hints. By default return `true` when `EARLY_HINTS_ENABLED` env variable has a `"true"` value
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/tokens-server",
|
|
3
|
-
"version": "4.18.
|
|
3
|
+
"version": "4.18.5",
|
|
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": "4.18.
|
|
21
|
+
"@tramvai/papi": "4.18.5",
|
|
22
22
|
"@tramvai/safe-strings": "0.7.1"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@tinkoff/dippy": "0.10.
|
|
25
|
+
"@tinkoff/dippy": "0.10.6",
|
|
26
26
|
"tslib": "^2.4.0"
|
|
27
27
|
},
|
|
28
28
|
"license": "Apache-2.0"
|