@tramvai/module-render 2.0.7 → 2.3.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/client/index.d.ts +5 -4
- package/lib/resourcesInliner/tokens.d.ts +2 -2
- package/lib/server.es.js +1 -1
- package/lib/server.js +1 -1
- package/lib/test/unit/resources.d.ts +1 -1
- package/package.json +16 -16
package/lib/client/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { EXTEND_RENDER, RENDERER_CALLBACK, USE_REACT_STRICT_MODE } from '@tramvai/tokens-render';
|
|
2
2
|
import type { PAGE_SERVICE_TOKEN } from '@tramvai/tokens-router';
|
|
3
|
+
import type { ExtractDependencyType } from '@tinkoff/dippy';
|
|
3
4
|
export declare function rendering({ pageService, logger, consumerContext, customRender, extendRender, di, useStrictMode, rendererCallback, }: {
|
|
4
|
-
pageService: typeof PAGE_SERVICE_TOKEN
|
|
5
|
+
pageService: ExtractDependencyType<typeof PAGE_SERVICE_TOKEN>;
|
|
5
6
|
logger: any;
|
|
6
7
|
consumerContext: any;
|
|
7
|
-
extendRender?: typeof EXTEND_RENDER
|
|
8
|
+
extendRender?: ExtractDependencyType<typeof EXTEND_RENDER>;
|
|
8
9
|
customRender?: any;
|
|
9
10
|
di: any;
|
|
10
|
-
useStrictMode: typeof USE_REACT_STRICT_MODE
|
|
11
|
-
rendererCallback?: typeof RENDERER_CALLBACK
|
|
11
|
+
useStrictMode: ExtractDependencyType<typeof USE_REACT_STRICT_MODE>;
|
|
12
|
+
rendererCallback?: ExtractDependencyType<typeof RENDERER_CALLBACK>;
|
|
12
13
|
}): Promise<void>;
|
|
@@ -5,7 +5,7 @@ import type { ResourcesInlinerType } from './resourcesInliner';
|
|
|
5
5
|
* Инлайнер ресурсов - используется на сервере для регистрации файлов, которые должны быть вставлены
|
|
6
6
|
* в итоговую html-страницу в виде ссылки на файл или заинлайнеными полностью
|
|
7
7
|
*/
|
|
8
|
-
export declare const RESOURCE_INLINER: ResourcesInlinerType
|
|
8
|
+
export declare const RESOURCE_INLINER: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<ResourcesInlinerType>;
|
|
9
9
|
export declare type ResourcesRegistryCache = {
|
|
10
10
|
filesCache: Cache;
|
|
11
11
|
sizeCache: Cache;
|
|
@@ -16,4 +16,4 @@ export declare type ResourcesRegistryCache = {
|
|
|
16
16
|
* @description
|
|
17
17
|
* Кэш загруженных ресурсов.
|
|
18
18
|
*/
|
|
19
|
-
export declare const RESOURCES_REGISTRY_CACHE: ResourcesRegistryCache
|
|
19
|
+
export declare const RESOURCES_REGISTRY_CACHE: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<ResourcesRegistryCache>;
|
package/lib/server.es.js
CHANGED
|
@@ -900,7 +900,7 @@ RenderModule = RenderModule_1 = __decorate([
|
|
|
900
900
|
provide({
|
|
901
901
|
provide: WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN,
|
|
902
902
|
multi: true,
|
|
903
|
-
useFactory: ({ RootErrorBoundary, logger
|
|
903
|
+
useFactory: ({ RootErrorBoundary, logger }) => {
|
|
904
904
|
const log = logger('module-render:error-handler');
|
|
905
905
|
return (error, request, reply) => {
|
|
906
906
|
if (!RootErrorBoundary) {
|
package/lib/server.js
CHANGED
|
@@ -936,7 +936,7 @@ exports.RenderModule = RenderModule_1 = tslib.__decorate([
|
|
|
936
936
|
core.provide({
|
|
937
937
|
provide: tokensServerPrivate.WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN,
|
|
938
938
|
multi: true,
|
|
939
|
-
useFactory: ({ RootErrorBoundary, logger
|
|
939
|
+
useFactory: ({ RootErrorBoundary, logger }) => {
|
|
940
940
|
const log = logger('module-render:error-handler');
|
|
941
941
|
return (error, request, reply) => {
|
|
942
942
|
if (!RootErrorBoundary) {
|
|
@@ -8,6 +8,6 @@ export declare const testPageResources: (options: Options) => {
|
|
|
8
8
|
application: string;
|
|
9
9
|
};
|
|
10
10
|
di: import("@tinkoff/dippy").Container;
|
|
11
|
-
runLine: (line: import("@tramvai/core").Command) => Promise<any[]>;
|
|
11
|
+
runLine: (line: import("@tinkoff/dippy/lib/createToken/createToken").MultiTokenInterface<import("@tramvai/core").Command>) => Promise<any[]>;
|
|
12
12
|
};
|
|
13
13
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-render",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"browser": "lib/browser.js",
|
|
6
6
|
"main": "lib/server.js",
|
|
@@ -24,28 +24,28 @@
|
|
|
24
24
|
"@tinkoff/htmlpagebuilder": "0.4.24",
|
|
25
25
|
"@tinkoff/layout-factory": "0.2.31",
|
|
26
26
|
"@tinkoff/url": "0.7.39",
|
|
27
|
-
"@tinkoff/user-agent": "0.4.
|
|
28
|
-
"@tramvai/module-client-hints": "2.0
|
|
29
|
-
"@tramvai/module-router": "2.0
|
|
30
|
-
"@tramvai/react": "2.0
|
|
27
|
+
"@tinkoff/user-agent": "0.4.14",
|
|
28
|
+
"@tramvai/module-client-hints": "2.3.0",
|
|
29
|
+
"@tramvai/module-router": "2.3.0",
|
|
30
|
+
"@tramvai/react": "2.3.0",
|
|
31
31
|
"@tramvai/safe-strings": "0.4.5",
|
|
32
|
-
"@tramvai/tokens-render": "2.0
|
|
33
|
-
"@tramvai/experiments": "2.0
|
|
32
|
+
"@tramvai/tokens-render": "2.3.0",
|
|
33
|
+
"@tramvai/experiments": "2.3.0",
|
|
34
34
|
"@types/loadable__server": "^5.12.6",
|
|
35
35
|
"node-fetch": "^2.6.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@tinkoff/dippy": "0.7.
|
|
38
|
+
"@tinkoff/dippy": "0.7.43",
|
|
39
39
|
"@tinkoff/utils": "^2.1.2",
|
|
40
40
|
"@tinkoff/react-hooks": "0.0.27",
|
|
41
|
-
"@tramvai/cli": "2.0
|
|
42
|
-
"@tramvai/core": "2.0
|
|
43
|
-
"@tramvai/module-common": "2.0
|
|
44
|
-
"@tramvai/state": "2.0
|
|
45
|
-
"@tramvai/test-helpers": "2.0
|
|
46
|
-
"@tramvai/tokens-common": "2.0
|
|
47
|
-
"@tramvai/tokens-router": "2.0
|
|
48
|
-
"@tramvai/tokens-server-private": "2.0
|
|
41
|
+
"@tramvai/cli": "2.3.0",
|
|
42
|
+
"@tramvai/core": "2.3.0",
|
|
43
|
+
"@tramvai/module-common": "2.3.0",
|
|
44
|
+
"@tramvai/state": "2.3.0",
|
|
45
|
+
"@tramvai/test-helpers": "2.3.0",
|
|
46
|
+
"@tramvai/tokens-common": "2.3.0",
|
|
47
|
+
"@tramvai/tokens-router": "2.3.0",
|
|
48
|
+
"@tramvai/tokens-server-private": "2.3.0",
|
|
49
49
|
"express": "^4.17.1",
|
|
50
50
|
"prop-types": "^15.6.2",
|
|
51
51
|
"react": ">=16.14.0",
|