@tramvai/tokens-server 1.66.1 → 1.70.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
@@ -138,6 +138,18 @@ export declare const DEPENDENCIES_VERSION_FILTER_TOKEN: DepsFilter;
138
138
  * Url matching is happens with a library `path-to-regexp`.
139
139
  */
140
140
  export declare const SPECIAL_SERVER_PATHS: string;
141
+ /**
142
+ * @description
143
+ * Custom function for k8s readiness, you might want to wait for something before allowing traffic to your app\
144
+ * https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
145
+ */
146
+ export declare const READINESS_PROBE_TOKEN: () => Promise<any>;
147
+ /**
148
+ * @description
149
+ * Custom function for k8s liveness, a function accepting a state and returning a promise indicating service health\
150
+ * https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
151
+ */
152
+ export declare const LIVENESS_PROBE_TOKEN: () => Promise<any>;
141
153
  export interface ServerModuleStaticsOptions {
142
154
  path: string;
143
155
  }
package/lib/index.es.js CHANGED
@@ -146,5 +146,17 @@ const DEPENDENCIES_VERSION_FILTER_TOKEN = createToken('dependenciesVersionFilter
146
146
  * Url matching is happens with a library `path-to-regexp`.
147
147
  */
148
148
  const SPECIAL_SERVER_PATHS = createToken('specialServerPaths', { multi: true });
149
+ /**
150
+ * @description
151
+ * Custom function for k8s readiness, you might want to wait for something before allowing traffic to your app\
152
+ * https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
153
+ */
154
+ const READINESS_PROBE_TOKEN = createToken('readiness-probe-fn');
155
+ /**
156
+ * @description
157
+ * Custom function for k8s liveness, a function accepting a state and returning a promise indicating service health\
158
+ * https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
159
+ */
160
+ const LIVENESS_PROBE_TOKEN = createToken('liveness-probe-fn');
149
161
 
150
- export { DEPENDENCIES_VERSION_FILTER_TOKEN, PROXY_CONFIG_TOKEN, SERVER_MODULE_PAPI_PRIVATE_ROUTE, SERVER_MODULE_PAPI_PRIVATE_URL, SERVER_MODULE_PAPI_PUBLIC_ROUTE, SERVER_MODULE_PAPI_PUBLIC_URL, SERVER_MODULE_STATICS_OPTIONS, SERVER_TOKEN, SPECIAL_SERVER_PATHS, WEB_APP_AFTER_INIT_TOKEN, WEB_APP_BEFORE_INIT_TOKEN, WEB_APP_INIT_TOKEN, WEB_APP_TOKEN };
162
+ export { DEPENDENCIES_VERSION_FILTER_TOKEN, LIVENESS_PROBE_TOKEN, PROXY_CONFIG_TOKEN, READINESS_PROBE_TOKEN, SERVER_MODULE_PAPI_PRIVATE_ROUTE, SERVER_MODULE_PAPI_PRIVATE_URL, SERVER_MODULE_PAPI_PUBLIC_ROUTE, SERVER_MODULE_PAPI_PUBLIC_URL, SERVER_MODULE_STATICS_OPTIONS, SERVER_TOKEN, SPECIAL_SERVER_PATHS, WEB_APP_AFTER_INIT_TOKEN, WEB_APP_BEFORE_INIT_TOKEN, WEB_APP_INIT_TOKEN, WEB_APP_TOKEN };
package/lib/index.js CHANGED
@@ -150,9 +150,23 @@ const DEPENDENCIES_VERSION_FILTER_TOKEN = dippy.createToken('dependenciesVersion
150
150
  * Url matching is happens with a library `path-to-regexp`.
151
151
  */
152
152
  const SPECIAL_SERVER_PATHS = dippy.createToken('specialServerPaths', { multi: true });
153
+ /**
154
+ * @description
155
+ * Custom function for k8s readiness, you might want to wait for something before allowing traffic to your app\
156
+ * https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
157
+ */
158
+ const READINESS_PROBE_TOKEN = dippy.createToken('readiness-probe-fn');
159
+ /**
160
+ * @description
161
+ * Custom function for k8s liveness, a function accepting a state and returning a promise indicating service health\
162
+ * https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
163
+ */
164
+ const LIVENESS_PROBE_TOKEN = dippy.createToken('liveness-probe-fn');
153
165
 
154
166
  exports.DEPENDENCIES_VERSION_FILTER_TOKEN = DEPENDENCIES_VERSION_FILTER_TOKEN;
167
+ exports.LIVENESS_PROBE_TOKEN = LIVENESS_PROBE_TOKEN;
155
168
  exports.PROXY_CONFIG_TOKEN = PROXY_CONFIG_TOKEN;
169
+ exports.READINESS_PROBE_TOKEN = READINESS_PROBE_TOKEN;
156
170
  exports.SERVER_MODULE_PAPI_PRIVATE_ROUTE = SERVER_MODULE_PAPI_PRIVATE_ROUTE;
157
171
  exports.SERVER_MODULE_PAPI_PRIVATE_URL = SERVER_MODULE_PAPI_PRIVATE_URL;
158
172
  exports.SERVER_MODULE_PAPI_PUBLIC_ROUTE = SERVER_MODULE_PAPI_PUBLIC_ROUTE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-server",
3
- "version": "1.66.1",
3
+ "version": "1.70.0",
4
4
  "description": "Tramvai tokens for @tramvai/module-server",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",
@@ -19,7 +19,7 @@
19
19
  "build-for-publish": "true"
20
20
  },
21
21
  "dependencies": {
22
- "@tramvai/papi": "1.66.1"
22
+ "@tramvai/papi": "1.70.0"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@tinkoff/dippy": "0.7.38",