@valbuild/next 0.35.0 → 0.36.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/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"next",
|
|
9
9
|
"react"
|
|
10
10
|
],
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.36.0",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"typecheck": "tsc --noEmit",
|
|
14
14
|
"test": "jest"
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"exports": true
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@valbuild/core": "~0.
|
|
49
|
-
"@valbuild/react": "~0.
|
|
50
|
-
"@valbuild/server": "~0.
|
|
48
|
+
"@valbuild/core": "~0.36.0",
|
|
49
|
+
"@valbuild/react": "~0.36.0",
|
|
50
|
+
"@valbuild/server": "~0.36.0",
|
|
51
51
|
"client-only": "^0.0.1",
|
|
52
52
|
"server-only": "^0.0.1"
|
|
53
53
|
},
|
|
@@ -81,6 +81,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, isEn
|
|
|
81
81
|
if (fp.result.isOk(res)) {
|
|
82
82
|
var modules = res.value.modules;
|
|
83
83
|
return stega.stegaEncode(selector, {
|
|
84
|
+
disabled: !enabled,
|
|
84
85
|
getModule: function getModule(moduleId) {
|
|
85
86
|
var module = modules[moduleId];
|
|
86
87
|
if (module) {
|
|
@@ -90,11 +91,14 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, isEn
|
|
|
90
91
|
});
|
|
91
92
|
} else {
|
|
92
93
|
console.error("Val: could not fetch modules", res.error);
|
|
94
|
+
throw Error(JSON.stringify(res.error, null, 2));
|
|
93
95
|
}
|
|
94
|
-
return stega.stegaEncode(selector, {});
|
|
95
96
|
})["catch"](function (err) {
|
|
96
|
-
console.error("Val: failed while
|
|
97
|
-
|
|
97
|
+
console.error("Val: failed while fetching modules", err);
|
|
98
|
+
if (process.env.NODE_ENV === "development") {
|
|
99
|
+
throw Error('You are running in "proxy" mode in development and Val could not fetch remote / proxy data. This is likely due to a misconfiguration. Check the console for more details.');
|
|
100
|
+
}
|
|
101
|
+
return stega.stegaEncode(selector, {});
|
|
98
102
|
});
|
|
99
103
|
}
|
|
100
104
|
}
|
|
@@ -81,6 +81,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, isEn
|
|
|
81
81
|
if (fp.result.isOk(res)) {
|
|
82
82
|
var modules = res.value.modules;
|
|
83
83
|
return stega.stegaEncode(selector, {
|
|
84
|
+
disabled: !enabled,
|
|
84
85
|
getModule: function getModule(moduleId) {
|
|
85
86
|
var module = modules[moduleId];
|
|
86
87
|
if (module) {
|
|
@@ -90,11 +91,11 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, isEn
|
|
|
90
91
|
});
|
|
91
92
|
} else {
|
|
92
93
|
console.error("Val: could not fetch modules", res.error);
|
|
94
|
+
throw Error(JSON.stringify(res.error, null, 2));
|
|
93
95
|
}
|
|
94
|
-
return stega.stegaEncode(selector, {});
|
|
95
96
|
})["catch"](function (err) {
|
|
96
|
-
console.error("Val: failed while
|
|
97
|
-
return selector;
|
|
97
|
+
console.error("Val: failed while fetching modules", err);
|
|
98
|
+
return stega.stegaEncode(selector, {});
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
}
|
|
@@ -77,6 +77,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, isEn
|
|
|
77
77
|
if (result.isOk(res)) {
|
|
78
78
|
var modules = res.value.modules;
|
|
79
79
|
return stegaEncode(selector, {
|
|
80
|
+
disabled: !enabled,
|
|
80
81
|
getModule: function getModule(moduleId) {
|
|
81
82
|
var module = modules[moduleId];
|
|
82
83
|
if (module) {
|
|
@@ -86,11 +87,14 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, isEn
|
|
|
86
87
|
});
|
|
87
88
|
} else {
|
|
88
89
|
console.error("Val: could not fetch modules", res.error);
|
|
90
|
+
throw Error(JSON.stringify(res.error, null, 2));
|
|
89
91
|
}
|
|
90
|
-
return stegaEncode(selector, {});
|
|
91
92
|
})["catch"](function (err) {
|
|
92
|
-
console.error("Val: failed while
|
|
93
|
-
|
|
93
|
+
console.error("Val: failed while fetching modules", err);
|
|
94
|
+
if (process.env.NODE_ENV === "development") {
|
|
95
|
+
throw Error('You are running in "proxy" mode in development and Val could not fetch remote / proxy data. This is likely due to a misconfiguration. Check the console for more details.');
|
|
96
|
+
}
|
|
97
|
+
return stegaEncode(selector, {});
|
|
94
98
|
});
|
|
95
99
|
}
|
|
96
100
|
}
|