@lowdefy/actions-core 4.0.0-alpha.7 → 4.0.0-alpha.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.
- package/dist/actions/Throw.js +5 -3
- package/package.json +5 -5
package/dist/actions/Throw.js
CHANGED
|
@@ -23,8 +23,11 @@ let ThrowActionError = class ThrowActionError extends Error {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
function Throw({ methods: { getBlockId , getPageId } , params }) {
|
|
26
|
-
if (
|
|
27
|
-
|
|
26
|
+
if (!type.isObject(params)) {
|
|
27
|
+
throw new Error(`Throw action params should be an object. Received "${JSON.stringify(params)}".`);
|
|
28
|
+
}
|
|
29
|
+
if (!type.isNone(params.throw) && !type.isBoolean(params.throw)) {
|
|
30
|
+
throw new Error(`Throw action "throw" param should be an boolean. Received "${JSON.stringify(params.throw)}".`);
|
|
28
31
|
}
|
|
29
32
|
if (params.throw === true) {
|
|
30
33
|
throw new ThrowActionError(params.message, {
|
|
@@ -33,7 +36,6 @@ function Throw({ methods: { getBlockId , getPageId } , params }) {
|
|
|
33
36
|
pageId: getPageId()
|
|
34
37
|
});
|
|
35
38
|
}
|
|
36
|
-
throw new Error(`Invalid Throw, check action params. Received "${JSON.stringify(params)}".`);
|
|
37
39
|
}
|
|
38
40
|
export default Throw;
|
|
39
41
|
export { Throw, ThrowActionError };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/actions-core",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.8",
|
|
4
4
|
"licence": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"test": "jest --coverage"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@lowdefy/helpers": "4.0.0-alpha.
|
|
49
|
+
"@lowdefy/helpers": "4.0.0-alpha.8"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@lowdefy/engine": "4.0.0-alpha.
|
|
53
|
-
"@lowdefy/operators": "4.0.0-alpha.
|
|
52
|
+
"@lowdefy/engine": "4.0.0-alpha.8",
|
|
53
|
+
"@lowdefy/operators": "4.0.0-alpha.8",
|
|
54
54
|
"@swc/cli": "0.1.55",
|
|
55
55
|
"@swc/core": "1.2.135",
|
|
56
56
|
"@swc/jest": "0.2.17",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "9d56b83cf45e868afe3a1eeba750fe826eb74c8c"
|
|
63
63
|
}
|