@tramvai/module-common 2.79.7 → 2.82.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.
|
@@ -35,15 +35,20 @@ class ActionPageRunner {
|
|
|
35
35
|
.then(() => this.deps.actionExecution.runInContext(executionContext, action))
|
|
36
36
|
.catch((error) => {
|
|
37
37
|
var _a;
|
|
38
|
+
const isCriticalError = stopRunAtError(error);
|
|
38
39
|
if (!isSilentError(error)) {
|
|
39
40
|
const parameters = isTramvaiAction(action) ? action : action[ACTION_PARAMETERS];
|
|
40
41
|
this.log.error({
|
|
41
42
|
error,
|
|
42
43
|
event: `action-execution-error`,
|
|
43
|
-
message: `${(_a = parameters === null || parameters === void 0 ? void 0 : parameters.name) !== null && _a !== void 0 ? _a : 'unknown'} execution error
|
|
44
|
+
message: `${(_a = parameters === null || parameters === void 0 ? void 0 : parameters.name) !== null && _a !== void 0 ? _a : 'unknown'} execution error, ${isCriticalError
|
|
45
|
+
? `${error.name} error are expected and will stop actions execution and prevent page rendering`
|
|
46
|
+
: `this action will be automatically executed on client - https://tramvai.dev/docs/features/data-fetching/action#synchronizing-between-server-and-client
|
|
47
|
+
If the request in this action takes too long, you can move it to the client using "onlyBrowser" condition.
|
|
48
|
+
Also, the necessary network accesses may not be present.`}`,
|
|
44
49
|
});
|
|
45
50
|
}
|
|
46
|
-
if (
|
|
51
|
+
if (isCriticalError) {
|
|
47
52
|
clearTimeout(timeoutMarker);
|
|
48
53
|
reject(error);
|
|
49
54
|
}
|
|
@@ -39,15 +39,20 @@ class ActionPageRunner {
|
|
|
39
39
|
.then(() => this.deps.actionExecution.runInContext(executionContext, action))
|
|
40
40
|
.catch((error) => {
|
|
41
41
|
var _a;
|
|
42
|
+
const isCriticalError = stopRunAtError(error);
|
|
42
43
|
if (!errors.isSilentError(error)) {
|
|
43
44
|
const parameters = core.isTramvaiAction(action) ? action : action[core.ACTION_PARAMETERS];
|
|
44
45
|
this.log.error({
|
|
45
46
|
error,
|
|
46
47
|
event: `action-execution-error`,
|
|
47
|
-
message: `${(_a = parameters === null || parameters === void 0 ? void 0 : parameters.name) !== null && _a !== void 0 ? _a : 'unknown'} execution error
|
|
48
|
+
message: `${(_a = parameters === null || parameters === void 0 ? void 0 : parameters.name) !== null && _a !== void 0 ? _a : 'unknown'} execution error, ${isCriticalError
|
|
49
|
+
? `${error.name} error are expected and will stop actions execution and prevent page rendering`
|
|
50
|
+
: `this action will be automatically executed on client - https://tramvai.dev/docs/features/data-fetching/action#synchronizing-between-server-and-client
|
|
51
|
+
If the request in this action takes too long, you can move it to the client using "onlyBrowser" condition.
|
|
52
|
+
Also, the necessary network accesses may not be present.`}`,
|
|
48
53
|
});
|
|
49
54
|
}
|
|
50
|
-
if (
|
|
55
|
+
if (isCriticalError) {
|
|
51
56
|
clearTimeout(timeoutMarker);
|
|
52
57
|
reject(error);
|
|
53
58
|
}
|
|
@@ -41,6 +41,14 @@ class BundleManager {
|
|
|
41
41
|
components: Object.keys(components),
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
+
else {
|
|
45
|
+
this.bundles[FS_PAGES_DEFAULT_BUNDLE] = () => Promise.resolve({
|
|
46
|
+
default: createBundle({
|
|
47
|
+
name: FS_PAGES_DEFAULT_BUNDLE,
|
|
48
|
+
components: {},
|
|
49
|
+
}),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
44
52
|
}
|
|
45
53
|
get(name, pageComponent) {
|
|
46
54
|
// use fake bundle with file-system pages
|
|
@@ -41,6 +41,14 @@ class BundleManager {
|
|
|
41
41
|
components: Object.keys(components),
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
+
else {
|
|
45
|
+
this.bundles[FS_PAGES_DEFAULT_BUNDLE] = () => Promise.resolve({
|
|
46
|
+
default: createBundle({
|
|
47
|
+
name: FS_PAGES_DEFAULT_BUNDLE,
|
|
48
|
+
components: {},
|
|
49
|
+
}),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
44
52
|
}
|
|
45
53
|
get(name, pageComponent) {
|
|
46
54
|
// use fake bundle with file-system pages
|
|
@@ -51,6 +51,14 @@ class BundleManager {
|
|
|
51
51
|
components: Object.keys(components),
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
+
else {
|
|
55
|
+
this.bundles[FS_PAGES_DEFAULT_BUNDLE] = () => Promise.resolve({
|
|
56
|
+
default: core.createBundle({
|
|
57
|
+
name: FS_PAGES_DEFAULT_BUNDLE,
|
|
58
|
+
components: {},
|
|
59
|
+
}),
|
|
60
|
+
});
|
|
61
|
+
}
|
|
54
62
|
}
|
|
55
63
|
get(name, pageComponent) {
|
|
56
64
|
// use fake bundle with file-system pages
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-common",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.82.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -32,28 +32,28 @@
|
|
|
32
32
|
"@tinkoff/lru-cache-nano": "^7.8.1",
|
|
33
33
|
"@tinkoff/pubsub": "0.5.7",
|
|
34
34
|
"@tinkoff/url": "0.8.6",
|
|
35
|
-
"@tramvai/experiments": "2.
|
|
36
|
-
"@tramvai/module-cookie": "2.
|
|
37
|
-
"@tramvai/module-environment": "2.
|
|
38
|
-
"@tramvai/module-log": "2.
|
|
39
|
-
"@tramvai/tokens-child-app": "2.
|
|
40
|
-
"@tramvai/tokens-core-private": "2.
|
|
41
|
-
"@tramvai/tokens-common": "2.
|
|
42
|
-
"@tramvai/tokens-render": "2.
|
|
43
|
-
"@tramvai/tokens-server-private": "2.
|
|
44
|
-
"@tramvai/types-actions-state-context": "2.
|
|
35
|
+
"@tramvai/experiments": "2.82.0",
|
|
36
|
+
"@tramvai/module-cookie": "2.82.0",
|
|
37
|
+
"@tramvai/module-environment": "2.82.0",
|
|
38
|
+
"@tramvai/module-log": "2.82.0",
|
|
39
|
+
"@tramvai/tokens-child-app": "2.82.0",
|
|
40
|
+
"@tramvai/tokens-core-private": "2.82.0",
|
|
41
|
+
"@tramvai/tokens-common": "2.82.0",
|
|
42
|
+
"@tramvai/tokens-render": "2.82.0",
|
|
43
|
+
"@tramvai/tokens-server-private": "2.82.0",
|
|
44
|
+
"@tramvai/types-actions-state-context": "2.82.0",
|
|
45
45
|
"hoist-non-react-statics": "^3.3.1",
|
|
46
46
|
"node-abort-controller": "^3.0.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@tinkoff/dippy": "0.8.
|
|
49
|
+
"@tinkoff/dippy": "0.8.15",
|
|
50
50
|
"@tinkoff/utils": "^2.1.2",
|
|
51
|
-
"@tramvai/cli": "2.
|
|
52
|
-
"@tramvai/core": "2.
|
|
53
|
-
"@tramvai/papi": "2.
|
|
54
|
-
"@tramvai/react": "2.
|
|
55
|
-
"@tramvai/state": "2.
|
|
56
|
-
"@tramvai/tokens-server": "2.
|
|
51
|
+
"@tramvai/cli": "2.82.0",
|
|
52
|
+
"@tramvai/core": "2.82.0",
|
|
53
|
+
"@tramvai/papi": "2.82.0",
|
|
54
|
+
"@tramvai/react": "2.82.0",
|
|
55
|
+
"@tramvai/state": "2.82.0",
|
|
56
|
+
"@tramvai/tokens-server": "2.82.0",
|
|
57
57
|
"react": ">=16.14.0",
|
|
58
58
|
"tslib": "^2.4.0"
|
|
59
59
|
},
|