x-block-lib 0.6.45 → 0.6.47
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/index.js +33 -37
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3903,13 +3903,13 @@ r.forBlock.call_func_v1 = function(e) {
|
|
|
3903
3903
|
const c = n(o.space.name + "/" + o.func.name);
|
|
3904
3904
|
let l = "";
|
|
3905
3905
|
o.func.outputs.forEach(({ id: h }) => {
|
|
3906
|
-
l += `${t}var __output_${h}__ =
|
|
3906
|
+
l += `${t}var __output_${h}__ = __result__[${n(h)}];
|
|
3907
3907
|
`;
|
|
3908
3908
|
});
|
|
3909
3909
|
const _ = r.statementToCode(o, "CALLBACK");
|
|
3910
3910
|
return `{
|
|
3911
3911
|
${a}
|
|
3912
|
-
|
|
3912
|
+
${t}var __result__ = __callFuncV1__(${i},${s},__inputs__,__getEnvV1__(),${c});
|
|
3913
3913
|
${l}${_}}
|
|
3914
3914
|
`;
|
|
3915
3915
|
};
|
|
@@ -4095,10 +4095,10 @@ r.forBlock.call_func_internal_v1 = function(e) {
|
|
|
4095
4095
|
const _ = r.statementToCode(o, "CALLBACK");
|
|
4096
4096
|
return `{
|
|
4097
4097
|
${a}
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4098
|
+
${t}var __result__ = __callFuncInternalV1__(${i}, ${s}, __inputs__);
|
|
4099
|
+
${t}if (!__result__.success) {
|
|
4100
|
+
${t}${t}throw 'call func<${c}> failed, reason: ' + __result__.message;
|
|
4101
|
+
${t}}
|
|
4102
4102
|
${l}${_}}
|
|
4103
4103
|
`;
|
|
4104
4104
|
};
|
|
@@ -4329,14 +4329,13 @@ const $f = {
|
|
|
4329
4329
|
};
|
|
4330
4330
|
k.add_data_v1 = $f;
|
|
4331
4331
|
r.forBlock.add_data_v1 = function(e) {
|
|
4332
|
-
const t = r.INDENT, n = r.valueToCode(e, "TABLE", u.ATOMIC) || "null",
|
|
4332
|
+
const t = r.INDENT, n = "typeof(__tx__) !== 'undefined' ? __tx__ : null", o = r.valueToCode(e, "TABLE", u.ATOMIC) || "null", i = r.statementToCode(e, "HANDLE");
|
|
4333
4333
|
return `{
|
|
4334
|
-
${t}var
|
|
4335
|
-
${t}var
|
|
4336
|
-
${t}var
|
|
4337
|
-
${t}var
|
|
4338
|
-
${
|
|
4339
|
-
${o}}
|
|
4334
|
+
${t}var __result__ = __addDataV1__(${n},${o});
|
|
4335
|
+
${t}var __success__ = __result__.success;
|
|
4336
|
+
${t}var __message__ = __result__.message;
|
|
4337
|
+
${t}var __data__ = __result__.data;
|
|
4338
|
+
${i}}
|
|
4340
4339
|
`;
|
|
4341
4340
|
};
|
|
4342
4341
|
function kn() {
|
|
@@ -4642,13 +4641,12 @@ const zf = {
|
|
|
4642
4641
|
};
|
|
4643
4642
|
k.delete_data_v1 = zf;
|
|
4644
4643
|
r.forBlock.delete_data_v1 = function(e) {
|
|
4645
|
-
const t = r.INDENT, n = r.valueToCode(e, "TABLE", u.ATOMIC) || "null",
|
|
4644
|
+
const t = r.INDENT, n = "typeof(__tx__) !== 'undefined' ? __tx__ : null", o = r.valueToCode(e, "TABLE", u.ATOMIC) || "null", i = r.valueToCode(e, "CONDITION", u.ATOMIC) || "null", s = r.statementToCode(e, "HANDLE");
|
|
4646
4645
|
return `{
|
|
4647
|
-
${t}var
|
|
4648
|
-
${t}var
|
|
4649
|
-
${t}var
|
|
4650
|
-
${
|
|
4651
|
-
${i}}
|
|
4646
|
+
${t}var __result__ = __deleteDataV1__(${n},${o},${i});
|
|
4647
|
+
${t}var __success__ = __result__.success;
|
|
4648
|
+
${t}var __message__ = __result__.message;
|
|
4649
|
+
${s}}
|
|
4652
4650
|
`;
|
|
4653
4651
|
};
|
|
4654
4652
|
C([
|
|
@@ -4703,18 +4701,17 @@ const Jf = {
|
|
|
4703
4701
|
};
|
|
4704
4702
|
k.query_data_v1 = Jf;
|
|
4705
4703
|
r.forBlock.query_data_v1 = function(e) {
|
|
4706
|
-
const t = r.INDENT, n = r.valueToCode(e, "TABLE", u.ATOMIC) || "null",
|
|
4707
|
-
let
|
|
4708
|
-
e.getInput("EXTRA") && (
|
|
4709
|
-
const
|
|
4704
|
+
const t = r.INDENT, n = "typeof(__tx__) !== 'undefined' ? __tx__ : null", o = r.valueToCode(e, "TABLE", u.ATOMIC) || "null", i = r.valueToCode(e, "CONDITION", u.ATOMIC) || "null";
|
|
4705
|
+
let s = "null";
|
|
4706
|
+
e.getInput("EXTRA") && (s = r.valueToCode(e, "EXTRA", u.ATOMIC) || "null");
|
|
4707
|
+
const a = r.statementToCode(e, "HANDLE");
|
|
4710
4708
|
return `{
|
|
4711
|
-
${t}var
|
|
4712
|
-
${t}var
|
|
4713
|
-
${t}var
|
|
4714
|
-
${t}var
|
|
4715
|
-
${t}var
|
|
4716
|
-
${
|
|
4717
|
-
${s}}
|
|
4709
|
+
${t}var __result__ = __queryDataV1__(${n},${o},${i},${s});
|
|
4710
|
+
${t}var __success__ = __result__.success;
|
|
4711
|
+
${t}var __message__ = __result__.message;
|
|
4712
|
+
${t}var __mainData__ = __result__.mainData;
|
|
4713
|
+
${t}var __extraData__ = __result__.extraData;
|
|
4714
|
+
${a}}
|
|
4718
4715
|
`;
|
|
4719
4716
|
};
|
|
4720
4717
|
C([
|
|
@@ -5324,14 +5321,13 @@ const im = {
|
|
|
5324
5321
|
};
|
|
5325
5322
|
k.update_data_v1 = im;
|
|
5326
5323
|
r.forBlock.update_data_v1 = function(e) {
|
|
5327
|
-
const t = r.INDENT, n = r.valueToCode(e, "TABLE", u.ATOMIC) || "null",
|
|
5324
|
+
const t = r.INDENT, n = "typeof(__tx__) !== 'undefined' ? __tx__ : null", o = r.valueToCode(e, "TABLE", u.ATOMIC) || "null", i = r.valueToCode(e, "CONDITION", u.ATOMIC) || "null", s = r.statementToCode(e, "HANDLE");
|
|
5328
5325
|
return `{
|
|
5329
|
-
${t}var
|
|
5330
|
-
${t}var
|
|
5331
|
-
${t}var
|
|
5332
|
-
${t}var
|
|
5333
|
-
${
|
|
5334
|
-
${i}}
|
|
5326
|
+
${t}var __result__ = __updateDataV1__(${n},${o},${i});
|
|
5327
|
+
${t}var __success__ = __result__.success;
|
|
5328
|
+
${t}var __message__ = __result__.message;
|
|
5329
|
+
${t}var __data__ = __result__.data;
|
|
5330
|
+
${s}}
|
|
5335
5331
|
`;
|
|
5336
5332
|
};
|
|
5337
5333
|
const sm = G.xml, am = {
|