@tramvai/tokens-server 2.56.2 → 2.56.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.d.ts +57 -15
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { Server } from 'http';
|
|
3
|
-
import type { Papi } from '@tramvai/papi';
|
|
4
3
|
declare module '@tramvai/papi' {
|
|
5
4
|
interface Options {
|
|
6
5
|
schema?: {
|
|
@@ -16,27 +15,41 @@ declare module '@tramvai/papi' {
|
|
|
16
15
|
* @description
|
|
17
16
|
* Specifies base url for public papi handlers. By default equals to `/[appName]/papi`
|
|
18
17
|
*/
|
|
19
|
-
export declare const SERVER_MODULE_PAPI_PUBLIC_URL:
|
|
18
|
+
export declare const SERVER_MODULE_PAPI_PUBLIC_URL: string & {
|
|
19
|
+
__type?: "base token" | undefined;
|
|
20
|
+
};
|
|
20
21
|
/**
|
|
21
22
|
* @description
|
|
22
23
|
* Specifies base url for private papi handlers. By default equals `/[appName]/private/papi`
|
|
23
24
|
*/
|
|
24
|
-
export declare const SERVER_MODULE_PAPI_PRIVATE_URL:
|
|
25
|
+
export declare const SERVER_MODULE_PAPI_PRIVATE_URL: string & {
|
|
26
|
+
__type?: "base token" | undefined;
|
|
27
|
+
};
|
|
25
28
|
/**
|
|
26
29
|
* @description
|
|
27
30
|
* Add private papi route
|
|
28
31
|
*/
|
|
29
|
-
export declare const SERVER_MODULE_PAPI_PRIVATE_ROUTE: import("@
|
|
32
|
+
export declare const SERVER_MODULE_PAPI_PRIVATE_ROUTE: import("@tramvai/papi").NormalizedHandler<any, any> & {
|
|
33
|
+
__papi_parameters__: import("@tramvai/papi").NormalizedPapiParameters<any, any>;
|
|
34
|
+
} & {
|
|
35
|
+
__type?: "multi token" | undefined;
|
|
36
|
+
};
|
|
30
37
|
/**
|
|
31
38
|
* @description
|
|
32
39
|
* Add public papi route
|
|
33
40
|
*/
|
|
34
|
-
export declare const SERVER_MODULE_PAPI_PUBLIC_ROUTE: import("@
|
|
41
|
+
export declare const SERVER_MODULE_PAPI_PUBLIC_ROUTE: import("@tramvai/papi").NormalizedHandler<any, any> & {
|
|
42
|
+
__papi_parameters__: import("@tramvai/papi").NormalizedPapiParameters<any, any>;
|
|
43
|
+
} & {
|
|
44
|
+
__type?: "multi token" | undefined;
|
|
45
|
+
};
|
|
35
46
|
/**
|
|
36
47
|
* @description
|
|
37
48
|
* Settings for the static server
|
|
38
49
|
*/
|
|
39
|
-
export declare const SERVER_MODULE_STATICS_OPTIONS:
|
|
50
|
+
export declare const SERVER_MODULE_STATICS_OPTIONS: ServerModuleStaticsOptions & {
|
|
51
|
+
__type?: "base token" | undefined;
|
|
52
|
+
};
|
|
40
53
|
/**
|
|
41
54
|
* @description
|
|
42
55
|
* Instance of nodejs `http.Server`.
|
|
@@ -58,50 +71,79 @@ export declare const SERVER_MODULE_STATICS_OPTIONS: import("@tinkoff/dippy").Bas
|
|
|
58
71
|
},
|
|
59
72
|
```
|
|
60
73
|
*/
|
|
61
|
-
export declare const SERVER_TOKEN:
|
|
74
|
+
export declare const SERVER_TOKEN: Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> & {
|
|
75
|
+
__type?: "base token" | undefined;
|
|
76
|
+
};
|
|
62
77
|
/**
|
|
63
78
|
* @description
|
|
64
79
|
* Add resources for request proxying to the app through `http-proxy-middleware`
|
|
65
80
|
*/
|
|
66
|
-
export declare const PROXY_CONFIG_TOKEN:
|
|
81
|
+
export declare const PROXY_CONFIG_TOKEN: ({
|
|
82
|
+
[key: string]: string | {
|
|
83
|
+
[key: string]: any;
|
|
84
|
+
target: string;
|
|
85
|
+
};
|
|
86
|
+
} & {
|
|
87
|
+
__type?: "multi token" | undefined;
|
|
88
|
+
}) | ({
|
|
89
|
+
[key: string]: any;
|
|
90
|
+
context: string | string[];
|
|
91
|
+
target: string;
|
|
92
|
+
} & {
|
|
93
|
+
__type?: "multi token" | undefined;
|
|
94
|
+
});
|
|
67
95
|
/**
|
|
68
96
|
* @description
|
|
69
97
|
* Override filter function when accessing papi route `/dependenciesVersion`
|
|
70
98
|
*/
|
|
71
|
-
export declare const DEPENDENCIES_VERSION_FILTER_TOKEN:
|
|
99
|
+
export declare const DEPENDENCIES_VERSION_FILTER_TOKEN: DepsFilter & {
|
|
100
|
+
__type?: "base token" | undefined;
|
|
101
|
+
};
|
|
72
102
|
/**
|
|
73
103
|
* @description
|
|
74
104
|
* List of the utility URLs on server (e.g. healthz and readyz)
|
|
75
105
|
* Url matching is happens with a library `path-to-regexp`.
|
|
76
106
|
*/
|
|
77
|
-
export declare const UTILITY_SERVER_PATHS:
|
|
107
|
+
export declare const UTILITY_SERVER_PATHS: string & {
|
|
108
|
+
__type?: "multi token" | undefined;
|
|
109
|
+
};
|
|
78
110
|
/**
|
|
79
111
|
* @description
|
|
80
112
|
* Defines port to listen for utility routes
|
|
81
113
|
*/
|
|
82
|
-
export declare const UTILITY_SERVER_PORT_TOKEN:
|
|
114
|
+
export declare const UTILITY_SERVER_PORT_TOKEN: number & {
|
|
115
|
+
__type?: "base token" | undefined;
|
|
116
|
+
};
|
|
83
117
|
/**
|
|
84
118
|
* @description
|
|
85
119
|
* Custom path for liveness probe
|
|
86
120
|
*/
|
|
87
|
-
export declare const LIVENESS_PATH_TOKEN:
|
|
121
|
+
export declare const LIVENESS_PATH_TOKEN: string & {
|
|
122
|
+
__type?: "base token" | undefined;
|
|
123
|
+
};
|
|
88
124
|
/**
|
|
89
125
|
* @description
|
|
90
126
|
* Custom path for readiness probe
|
|
91
127
|
*/
|
|
92
|
-
export declare const READINESS_PATH_TOKEN:
|
|
128
|
+
export declare const READINESS_PATH_TOKEN: string & {
|
|
129
|
+
__type?: "base token" | undefined;
|
|
130
|
+
};
|
|
93
131
|
/**
|
|
94
132
|
* @description
|
|
95
133
|
* Custom function for k8s readiness, you might want to wait for something before allowing traffic to your app\
|
|
96
134
|
* https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
|
|
97
135
|
*/
|
|
98
|
-
export declare const READINESS_PROBE_TOKEN:
|
|
136
|
+
export declare const READINESS_PROBE_TOKEN: (() => Promise<any>) & {
|
|
137
|
+
__type?: "base token" | undefined;
|
|
138
|
+
};
|
|
99
139
|
/**
|
|
100
140
|
* @description
|
|
101
141
|
* Custom function for k8s liveness, a function accepting a state and returning a promise indicating service health\
|
|
102
142
|
* https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
|
|
103
143
|
*/
|
|
104
|
-
export declare const LIVENESS_PROBE_TOKEN:
|
|
144
|
+
export declare const LIVENESS_PROBE_TOKEN: (() => Promise<any>) & {
|
|
145
|
+
__type?: "base token" | undefined;
|
|
146
|
+
};
|
|
105
147
|
export interface ServerModuleStaticsOptions {
|
|
106
148
|
path: string;
|
|
107
149
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/tokens-server",
|
|
3
|
-
"version": "2.56.
|
|
3
|
+
"version": "2.56.5",
|
|
4
4
|
"description": "Tramvai tokens for @tramvai/module-server",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.es.js",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"build-for-publish": "true"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@tramvai/papi": "2.56.
|
|
22
|
+
"@tramvai/papi": "2.56.5"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@tinkoff/dippy": "0.8.
|
|
25
|
+
"@tinkoff/dippy": "0.8.11",
|
|
26
26
|
"tslib": "^2.4.0"
|
|
27
27
|
},
|
|
28
28
|
"license": "Apache-2.0"
|