@tramvai/module-page-render-mode 7.21.0 → 7.26.8
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
|
-
export declare const PageRenderWrapper: ({ children }: PropsWithChildren<{}>) => import("react
|
|
3
|
-
export declare const pageRenderHOC: (WrapperPage: any) => (props: any) => import("react
|
|
2
|
+
export declare const PageRenderWrapper: ({ children }: PropsWithChildren<{}>) => import("react").JSX.Element | null;
|
|
3
|
+
export declare const pageRenderHOC: (WrapperPage: any) => (props: any) => import("react").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=PageRenderWrapper.d.ts.map
|
|
@@ -155,6 +155,11 @@ and copy "dist/static" folder into the Docker image, to ensure the pages cache i
|
|
|
155
155
|
const filePath = path.join(this.directory, pathname, filename);
|
|
156
156
|
const metaFilePath = path.join(this.directory, pathname, metaFilename);
|
|
157
157
|
try {
|
|
158
|
+
const resolvedRoot = path.resolve(this.directory);
|
|
159
|
+
const resolvedFilePath = path.resolve(filePath);
|
|
160
|
+
if (!resolvedFilePath.startsWith(resolvedRoot)) {
|
|
161
|
+
throw new Error(`Invalid filesystem cache pathname: "${filePath}"`);
|
|
162
|
+
}
|
|
158
163
|
await promises.mkdir(path.dirname(filePath), { recursive: true });
|
|
159
164
|
await promises.writeFile(filePath, cacheEntry.body, 'utf-8');
|
|
160
165
|
await promises.writeFile(metaFilePath, JSON.stringify({
|
|
@@ -164,6 +164,11 @@ and copy "dist/static" folder into the Docker image, to ensure the pages cache i
|
|
|
164
164
|
const filePath = path__default["default"].join(this.directory, pathname, filename);
|
|
165
165
|
const metaFilePath = path__default["default"].join(this.directory, pathname, metaFilename);
|
|
166
166
|
try {
|
|
167
|
+
const resolvedRoot = path__default["default"].resolve(this.directory);
|
|
168
|
+
const resolvedFilePath = path__default["default"].resolve(filePath);
|
|
169
|
+
if (!resolvedFilePath.startsWith(resolvedRoot)) {
|
|
170
|
+
throw new Error(`Invalid filesystem cache pathname: "${filePath}"`);
|
|
171
|
+
}
|
|
167
172
|
await node_fs.promises.mkdir(path__default["default"].dirname(filePath), { recursive: true });
|
|
168
173
|
await node_fs.promises.writeFile(filePath, cacheEntry.body, 'utf-8');
|
|
169
174
|
await node_fs.promises.writeFile(metaFilePath, JSON.stringify({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-page-render-mode",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.26.8",
|
|
4
4
|
"description": "Enable different rendering modes for pages",
|
|
5
5
|
"main": "./lib/server.js",
|
|
6
6
|
"module": "./lib/server.es.js",
|
|
@@ -29,20 +29,20 @@
|
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@tinkoff/dippy": "^1.0.0",
|
|
32
|
-
"@tinkoff/router": "0.7.
|
|
32
|
+
"@tinkoff/router": "0.7.106",
|
|
33
33
|
"@tinkoff/utils": "^2.1.2",
|
|
34
|
-
"@tramvai/core": "7.
|
|
35
|
-
"@tramvai/module-client-hints": "7.
|
|
36
|
-
"@tramvai/module-router": "7.
|
|
37
|
-
"@tramvai/papi": "7.
|
|
38
|
-
"@tramvai/react": "7.
|
|
39
|
-
"@tramvai/tokens-common": "7.
|
|
40
|
-
"@tramvai/tokens-core": "7.
|
|
41
|
-
"@tramvai/tokens-metrics": "7.
|
|
42
|
-
"@tramvai/tokens-render": "7.
|
|
43
|
-
"@tramvai/tokens-router": "7.
|
|
44
|
-
"@tramvai/tokens-server": "7.
|
|
45
|
-
"@tramvai/tokens-server-private": "7.
|
|
34
|
+
"@tramvai/core": "7.26.8",
|
|
35
|
+
"@tramvai/module-client-hints": "7.26.8",
|
|
36
|
+
"@tramvai/module-router": "7.26.8",
|
|
37
|
+
"@tramvai/papi": "7.26.8",
|
|
38
|
+
"@tramvai/react": "7.26.8",
|
|
39
|
+
"@tramvai/tokens-common": "7.26.8",
|
|
40
|
+
"@tramvai/tokens-core": "7.26.8",
|
|
41
|
+
"@tramvai/tokens-metrics": "7.26.8",
|
|
42
|
+
"@tramvai/tokens-render": "7.26.8",
|
|
43
|
+
"@tramvai/tokens-router": "7.26.8",
|
|
44
|
+
"@tramvai/tokens-server": "7.26.8",
|
|
45
|
+
"@tramvai/tokens-server-private": "7.26.8",
|
|
46
46
|
"prom-client": "^14.2.0",
|
|
47
47
|
"react": ">=16.14.0",
|
|
48
48
|
"tslib": "^2.4.0"
|