@lcap/nasl 0.3.12-beta.1 → 0.3.12
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/out/service/logic/checktypeSocket.d.ts +5 -0
- package/out/service/logic/checktypeSocket.js +55 -0
- package/out/service/logic/checktypeSocket.js.map +1 -0
- package/out/service/logic/index.d.ts +3 -0
- package/out/service/logic/index.js +4 -1
- package/out/service/logic/index.js.map +1 -1
- package/out/types/app/App.d.ts +3 -1
- package/out/types/app/App.js +17 -0
- package/out/types/app/App.js.map +1 -1
- package/out/types/app/Service.d.ts +1 -0
- package/out/types/app/Service.js +36 -3
- package/out/types/app/Service.js.map +1 -1
- package/out/types/data/Entity.d.ts +5 -0
- package/out/types/data/Entity.js +13 -0
- package/out/types/data/Entity.js.map +1 -1
- package/out/types/data/Enum.d.ts +4 -0
- package/out/types/data/Enum.js +7 -0
- package/out/types/data/Enum.js.map +1 -1
- package/out/types/data/Module.d.ts +34 -0
- package/out/types/data/Module.js +53 -0
- package/out/types/data/Module.js.map +1 -0
- package/out/types/data/Structure.d.ts +4 -0
- package/out/types/data/Structure.js +7 -0
- package/out/types/data/Structure.js.map +1 -1
- package/out/types/data/genBlock/index.d.ts +0 -2
- package/out/types/data/genBlock/index.js +0 -2
- package/out/types/data/genBlock/index.js.map +1 -1
- package/out/types/index.d.ts +2 -0
- package/out/types/index.js +5 -2
- package/out/types/index.js.map +1 -1
- package/out/types/logic/Logic.d.ts +4 -0
- package/out/types/logic/Logic.js +7 -0
- package/out/types/logic/Logic.js.map +1 -1
- package/out/types/logic/LogicItem.js +17 -10
- package/out/types/logic/LogicItem.js.map +1 -1
- package/out/types/logic/Param.js +1 -1
- package/out/types/logic/Param.js.map +1 -1
- package/out/types/logic/translator.js +8 -1
- package/out/types/logic/translator.js.map +1 -1
- package/out/types/process/ProcessParam.js +1 -1
- package/out/types/process/ProcessParam.js.map +1 -1
- package/package.json +2 -1
- package/src/service/logic/checktypeSocket.js +49 -0
- package/src/service/logic/index.js +3 -0
- package/src/service/modules/api.js +20 -0
- package/src/service/modules/index.js +6 -0
- package/src/types/app/App.ts +17 -2
- package/src/types/app/Service.ts +39 -4
- package/src/types/data/Entity.ts +17 -6
- package/src/types/data/Enum.ts +5 -0
- package/src/types/data/Module.ts +51 -0
- package/src/types/data/Structure.ts +5 -0
- package/src/types/data/dataTypes.ts +24 -4
- package/src/types/data/genBlock/index.ts +0 -2
- package/src/types/index.ts +2 -0
- package/src/types/logic/Logic.ts +5 -0
- package/src/types/logic/LogicItem.ts +20 -13
- package/src/types/logic/Param.ts +1 -1
- package/src/types/logic/translator.js +8 -1
- package/src/types/process/ProcessParam.ts +1 -1
- package/src/types/data/genBlock/genCurdBlock.ts +0 -654
- package/src/types/data/genBlock/genCurdEditTableBlock.ts +0 -581
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { immutable, excludedInJSON, action } from '../decorators';
|
|
2
2
|
import { config, typeCheck, utils, Vertex, LEVEL_ENUM, Logic, Schema, ActionOptions, ACTION_MODE } from '..';
|
|
3
|
-
import { logicService } from '../../service/logic';
|
|
3
|
+
import { logicService, checkTypeClient } from '../../service/logic';
|
|
4
4
|
import { traverse } from '../utils';
|
|
5
5
|
import { vertexsMap } from '../cacheData';
|
|
6
6
|
import { getSchemaOfExpressionNode } from './tools';
|
|
@@ -1051,20 +1051,27 @@ export class LogicItem extends Vertex {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
|
|
1053
1053
|
private async _checkType(node: LogicItem) {
|
|
1054
|
-
|
|
1055
|
-
|
|
1054
|
+
if (checkTypeClient.connect) {
|
|
1055
|
+
checkTypeClient.client.emit('checktype', {
|
|
1056
|
+
id: node.id,
|
|
1057
|
+
type: 'logicItem',
|
|
1056
1058
|
logicId: this.logic && this.logic.id,
|
|
1057
|
-
|
|
1058
|
-
},
|
|
1059
|
-
});
|
|
1060
|
-
if (res) {
|
|
1061
|
-
res.logicId = this.logic && this.logic.id;
|
|
1062
|
-
typeCheck.pushAll([res]);
|
|
1063
|
-
|
|
1064
|
-
LogicItem.assignTypeCheckResult(node, res);
|
|
1059
|
+
});
|
|
1065
1060
|
}
|
|
1066
|
-
|
|
1067
|
-
|
|
1061
|
+
// const res = await logicService.checkType({
|
|
1062
|
+
// query: {
|
|
1063
|
+
// logicId: this.logic && this.logic.id,
|
|
1064
|
+
// loItemId: node.id,
|
|
1065
|
+
// },
|
|
1066
|
+
// });
|
|
1067
|
+
// if (res) {
|
|
1068
|
+
// res.logicId = this.logic && this.logic.id;
|
|
1069
|
+
// typeCheck.pushAll([res]);
|
|
1070
|
+
|
|
1071
|
+
// LogicItem.assignTypeCheckResult(node, res);
|
|
1072
|
+
// }
|
|
1073
|
+
|
|
1074
|
+
// return res;
|
|
1068
1075
|
}
|
|
1069
1076
|
|
|
1070
1077
|
static assignTypeCheckResult(logicItem: LogicItem | LogicItem[], typeCheckResult: any) {
|
package/src/types/logic/Param.ts
CHANGED
|
@@ -604,7 +604,14 @@ export default function (source) {
|
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
if (node.type === 'BuiltInFunction') {
|
|
607
|
-
|
|
607
|
+
let params = (node.builtInFuncParams || []).map((param) => generateNode(param.builtInFuncParamValue));
|
|
608
|
+
if (node.calleeCode === 'Split') {
|
|
609
|
+
// Bug-34789: 参考 url 转义规则对 ' 转义
|
|
610
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
|
|
611
|
+
params = params.map((param) => (param.replace(/'(.*)'/, (match, p1) => `'${p1.replace(/'/g, '%27')}'`)));
|
|
612
|
+
if (params.find((param) => param.includes('%27')))
|
|
613
|
+
return `this.$utils['${node.calleeCode}'](${params.join(',')}).map((item) => item.replace(/%27/g, "'"))`;
|
|
614
|
+
}
|
|
608
615
|
return `this.$utils['${node.calleeCode}'](${params.join(',')})`;
|
|
609
616
|
}
|
|
610
617
|
|
|
@@ -68,7 +68,7 @@ export class ProcessParam extends Param {
|
|
|
68
68
|
config.defaultApp?.emit('saved');
|
|
69
69
|
|
|
70
70
|
// 更新所有调用此Logic的LogicItem
|
|
71
|
-
|
|
71
|
+
await this.process.launchProcessInterface.logic.callLogicUpdate();
|
|
72
72
|
return this;
|
|
73
73
|
}
|
|
74
74
|
/**
|