@tramvai/tokens-common 2.29.0 → 2.32.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 +1 -21
- package/lib/index.js +0 -24
- package/lib/requestManager.d.ts +1 -20
- package/lib/responseManager.d.ts +0 -10
- package/package.json +4 -7
package/lib/index.es.js
CHANGED
|
@@ -134,18 +134,6 @@ const LOGGER_TOKEN = createToken('logger');
|
|
|
134
134
|
*/
|
|
135
135
|
const LOGGER_INIT_HOOK = createToken('loggerHook');
|
|
136
136
|
|
|
137
|
-
/**
|
|
138
|
-
* @deprecated use FASTIFY_REQUEST
|
|
139
|
-
* @description
|
|
140
|
-
* Direct reference to request object
|
|
141
|
-
*/
|
|
142
|
-
const REQUEST = createToken('request');
|
|
143
|
-
/**
|
|
144
|
-
* @description
|
|
145
|
-
* Direct reference to request object
|
|
146
|
-
*/
|
|
147
|
-
// TODO: move to tokens-server-private
|
|
148
|
-
const FASTIFY_REQUEST = createToken('fastify request');
|
|
149
137
|
/**
|
|
150
138
|
* @description
|
|
151
139
|
* Instance for managing client requests (request headers, query-parameters, cookies etc).
|
|
@@ -153,14 +141,6 @@ const FASTIFY_REQUEST = createToken('fastify request');
|
|
|
153
141
|
*/
|
|
154
142
|
const REQUEST_MANAGER_TOKEN = createToken('requestManager');
|
|
155
143
|
|
|
156
|
-
/**
|
|
157
|
-
* @deprecated Use FASTIFY_RESPONSE
|
|
158
|
-
* @description
|
|
159
|
-
* Direct reference to Response instance
|
|
160
|
-
*/
|
|
161
|
-
const RESPONSE = createToken('response');
|
|
162
|
-
// TODO: move to tokens-server-private
|
|
163
|
-
const FASTIFY_RESPONSE = createToken('fastify response');
|
|
164
144
|
/**
|
|
165
145
|
* @description
|
|
166
146
|
* Instance for managing client response (response headers, cookies, response body).
|
|
@@ -179,4 +159,4 @@ const EXECUTION_CONTEXT_MANAGER_TOKEN = createToken('common ExecutionContextMana
|
|
|
179
159
|
const ROOT_EXECUTION_CONTEXT_TOKEN = createToken('common rootExecutionContext');
|
|
180
160
|
const COMMAND_LINE_EXECUTION_CONTEXT_TOKEN = createToken('common commandLineExecutionContext');
|
|
181
161
|
|
|
182
|
-
export { ACTION_CONDITIONALS, ACTION_EXECUTION_TOKEN, ACTION_PAGE_RUNNER_TOKEN, ACTION_REGISTRY_TOKEN, ADDITIONAL_BUNDLE_TOKEN, BUNDLE_MANAGER_TOKEN, CLEAR_CACHE_TOKEN, COMBINE_REDUCERS, COMMAND_LINE_EXECUTION_CONTEXT_TOKEN, COMPONENT_REGISTRY_TOKEN, CONTEXT_TOKEN, CREATE_CACHE_TOKEN, DISPATCHER_CONTEXT_TOKEN, DISPATCHER_TOKEN, ENV_MANAGER_TOKEN, ENV_USED_TOKEN, EXECUTION_CONTEXT_MANAGER_TOKEN,
|
|
162
|
+
export { ACTION_CONDITIONALS, ACTION_EXECUTION_TOKEN, ACTION_PAGE_RUNNER_TOKEN, ACTION_REGISTRY_TOKEN, ADDITIONAL_BUNDLE_TOKEN, BUNDLE_MANAGER_TOKEN, CLEAR_CACHE_TOKEN, COMBINE_REDUCERS, COMMAND_LINE_EXECUTION_CONTEXT_TOKEN, COMPONENT_REGISTRY_TOKEN, CONTEXT_TOKEN, CREATE_CACHE_TOKEN, DISPATCHER_CONTEXT_TOKEN, DISPATCHER_TOKEN, ENV_MANAGER_TOKEN, ENV_USED_TOKEN, EXECUTION_CONTEXT_MANAGER_TOKEN, HOOK_TOKEN, INITIAL_APP_STATE_TOKEN, LOGGER_INIT_HOOK, LOGGER_TOKEN, PUBSUB_FACTORY_TOKEN, PUBSUB_TOKEN, REGISTER_CLEAR_CACHE_TOKEN, REQUEST_MANAGER_TOKEN, RESPONSE_MANAGER_TOKEN, ROOT_EXECUTION_CONTEXT_TOKEN, ROOT_PUBSUB_TOKEN, STORE_MIDDLEWARE, STORE_TOKEN };
|
package/lib/index.js
CHANGED
|
@@ -138,18 +138,6 @@ const LOGGER_TOKEN = dippy.createToken('logger');
|
|
|
138
138
|
*/
|
|
139
139
|
const LOGGER_INIT_HOOK = dippy.createToken('loggerHook');
|
|
140
140
|
|
|
141
|
-
/**
|
|
142
|
-
* @deprecated use FASTIFY_REQUEST
|
|
143
|
-
* @description
|
|
144
|
-
* Direct reference to request object
|
|
145
|
-
*/
|
|
146
|
-
const REQUEST = dippy.createToken('request');
|
|
147
|
-
/**
|
|
148
|
-
* @description
|
|
149
|
-
* Direct reference to request object
|
|
150
|
-
*/
|
|
151
|
-
// TODO: move to tokens-server-private
|
|
152
|
-
const FASTIFY_REQUEST = dippy.createToken('fastify request');
|
|
153
141
|
/**
|
|
154
142
|
* @description
|
|
155
143
|
* Instance for managing client requests (request headers, query-parameters, cookies etc).
|
|
@@ -157,14 +145,6 @@ const FASTIFY_REQUEST = dippy.createToken('fastify request');
|
|
|
157
145
|
*/
|
|
158
146
|
const REQUEST_MANAGER_TOKEN = dippy.createToken('requestManager');
|
|
159
147
|
|
|
160
|
-
/**
|
|
161
|
-
* @deprecated Use FASTIFY_RESPONSE
|
|
162
|
-
* @description
|
|
163
|
-
* Direct reference to Response instance
|
|
164
|
-
*/
|
|
165
|
-
const RESPONSE = dippy.createToken('response');
|
|
166
|
-
// TODO: move to tokens-server-private
|
|
167
|
-
const FASTIFY_RESPONSE = dippy.createToken('fastify response');
|
|
168
148
|
/**
|
|
169
149
|
* @description
|
|
170
150
|
* Instance for managing client response (response headers, cookies, response body).
|
|
@@ -200,8 +180,6 @@ exports.DISPATCHER_TOKEN = DISPATCHER_TOKEN;
|
|
|
200
180
|
exports.ENV_MANAGER_TOKEN = ENV_MANAGER_TOKEN;
|
|
201
181
|
exports.ENV_USED_TOKEN = ENV_USED_TOKEN;
|
|
202
182
|
exports.EXECUTION_CONTEXT_MANAGER_TOKEN = EXECUTION_CONTEXT_MANAGER_TOKEN;
|
|
203
|
-
exports.FASTIFY_REQUEST = FASTIFY_REQUEST;
|
|
204
|
-
exports.FASTIFY_RESPONSE = FASTIFY_RESPONSE;
|
|
205
183
|
exports.HOOK_TOKEN = HOOK_TOKEN;
|
|
206
184
|
exports.INITIAL_APP_STATE_TOKEN = INITIAL_APP_STATE_TOKEN;
|
|
207
185
|
exports.LOGGER_INIT_HOOK = LOGGER_INIT_HOOK;
|
|
@@ -209,9 +187,7 @@ exports.LOGGER_TOKEN = LOGGER_TOKEN;
|
|
|
209
187
|
exports.PUBSUB_FACTORY_TOKEN = PUBSUB_FACTORY_TOKEN;
|
|
210
188
|
exports.PUBSUB_TOKEN = PUBSUB_TOKEN;
|
|
211
189
|
exports.REGISTER_CLEAR_CACHE_TOKEN = REGISTER_CLEAR_CACHE_TOKEN;
|
|
212
|
-
exports.REQUEST = REQUEST;
|
|
213
190
|
exports.REQUEST_MANAGER_TOKEN = REQUEST_MANAGER_TOKEN;
|
|
214
|
-
exports.RESPONSE = RESPONSE;
|
|
215
191
|
exports.RESPONSE_MANAGER_TOKEN = RESPONSE_MANAGER_TOKEN;
|
|
216
192
|
exports.ROOT_EXECUTION_CONTEXT_TOKEN = ROOT_EXECUTION_CONTEXT_TOKEN;
|
|
217
193
|
exports.ROOT_PUBSUB_TOKEN = ROOT_PUBSUB_TOKEN;
|
package/lib/requestManager.d.ts
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
import type { Url } from '@tinkoff/url';
|
|
2
|
-
import type { Request } from 'express';
|
|
3
|
-
import type { FastifyRequest as OriginalFastifyRequest } from 'fastify';
|
|
4
|
-
declare type RequestExt = Request;
|
|
5
|
-
declare type FastifyRequest = OriginalFastifyRequest & {
|
|
6
|
-
cookies: Record<string, string>;
|
|
7
|
-
query: Record<string, string>;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated use FASTIFY_REQUEST
|
|
11
|
-
* @description
|
|
12
|
-
* Direct reference to request object
|
|
13
|
-
*/
|
|
14
|
-
export declare const REQUEST: import("@tinkoff/dippy").BaseTokenInterface<RequestExt>;
|
|
15
|
-
/**
|
|
16
|
-
* @description
|
|
17
|
-
* Direct reference to request object
|
|
18
|
-
*/
|
|
19
|
-
export declare const FASTIFY_REQUEST: import("@tinkoff/dippy").BaseTokenInterface<FastifyRequest>;
|
|
20
2
|
/**
|
|
21
3
|
* @description
|
|
22
4
|
* Instance for managing client requests (request headers, query-parameters, cookies etc).
|
|
@@ -30,9 +12,8 @@ export interface RequestManager {
|
|
|
30
12
|
getMethod(): string;
|
|
31
13
|
getCookie(key: string): string;
|
|
32
14
|
getCookies(): Record<string, string>;
|
|
33
|
-
getHeader(key: string): string | string[];
|
|
15
|
+
getHeader(key: string): string | string[] | undefined;
|
|
34
16
|
getHeaders(): Record<string, string | string[]>;
|
|
35
17
|
getClientIp(): string;
|
|
36
18
|
getHost(): string;
|
|
37
19
|
}
|
|
38
|
-
export {};
|
package/lib/responseManager.d.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { Response } from 'express';
|
|
3
|
-
import type { FastifyReply } from 'fastify';
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Use FASTIFY_RESPONSE
|
|
6
|
-
* @description
|
|
7
|
-
* Direct reference to Response instance
|
|
8
|
-
*/
|
|
9
|
-
export declare const RESPONSE: import("@tinkoff/dippy").BaseTokenInterface<Response<any, Record<string, any>>>;
|
|
10
|
-
export declare const FASTIFY_RESPONSE: import("@tinkoff/dippy").BaseTokenInterface<FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify/types/route").RouteGenericInterface, unknown>>;
|
|
11
1
|
/**
|
|
12
2
|
* @description
|
|
13
3
|
* Instance for managing client response (response headers, cookies, response body).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/tokens-common",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.32.0",
|
|
4
4
|
"description": "Tramvai tokens for @tramvai/module-common",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.es.js",
|
|
@@ -21,16 +21,13 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@tinkoff/lru-cache-nano": "^7.8.1",
|
|
23
23
|
"@tinkoff/url": "0.8.3",
|
|
24
|
-
"@tramvai/react": "2.
|
|
25
|
-
"@tramvai/tokens-core": "2.
|
|
26
|
-
"@types/express": "^4.17.9"
|
|
24
|
+
"@tramvai/react": "2.32.0",
|
|
25
|
+
"@tramvai/tokens-core": "2.32.0"
|
|
27
26
|
},
|
|
28
27
|
"peerDependencies": {
|
|
29
28
|
"@tinkoff/dippy": "0.8.6",
|
|
30
29
|
"@tinkoff/logger": "0.10.53",
|
|
31
|
-
"@tramvai/types-actions-state-context": "2.
|
|
32
|
-
"express": "^4.17.1",
|
|
33
|
-
"fastify": "^3.29.0",
|
|
30
|
+
"@tramvai/types-actions-state-context": "2.32.0",
|
|
34
31
|
"react": ">=16.8",
|
|
35
32
|
"tslib": "^2.4.0"
|
|
36
33
|
},
|