@lcap/nasl 0.3.12-beta → 0.3.12-beta.3
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 +5 -2
- package/out/types/app/App.js +19 -1
- 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/genCurdEditMultipleKeyBlock.d.ts +7 -0
- package/out/types/data/genBlock/genCurdEditMultipleKeyBlock.js +470 -0
- package/out/types/data/genBlock/genCurdEditMultipleKeyBlock.js.map +1 -0
- package/out/types/data/genBlock/genCurdMultipleKeyBlock.d.ts +9 -0
- package/out/types/data/genBlock/genCurdMultipleKeyBlock.js +662 -0
- package/out/types/data/genBlock/genCurdMultipleKeyBlock.js.map +1 -0
- package/out/types/data/genBlock/index.d.ts +2 -2
- package/out/types/data/genBlock/index.js +2 -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/page/View.d.ts +1 -1
- package/out/types/page/View.js +8 -1
- package/out/types/page/View.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 +19 -3
- 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/genBlock/{genCurdEditTableBlock.ts → genCurdEditMultipleKeyBlock.ts} +38 -151
- package/src/types/data/genBlock/{genCurdBlock.ts → genCurdMultipleKeyBlock.ts} +81 -70
- package/src/types/data/genBlock/index.ts +2 -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/page/View.ts +8 -1
- package/src/types/process/ProcessParam.ts +1 -1
|
@@ -10,11 +10,11 @@ export * from './genGetBlock';
|
|
|
10
10
|
export * from './genCreateBlock';
|
|
11
11
|
export * from './genUpdateBlock';
|
|
12
12
|
export * from './genSelectBlock';
|
|
13
|
-
export * from './genCurdBlock';
|
|
14
13
|
export * from './genListViewBlock';
|
|
15
14
|
export * from './genGridViewBlock';
|
|
16
15
|
export * from './genEditTableBlock';
|
|
17
|
-
export * from './
|
|
16
|
+
export * from './genCurdMultipleKeyBlock';
|
|
17
|
+
export * from './genCurdEditMultipleKeyBlock';
|
|
18
18
|
|
|
19
19
|
// eslint-disable-next-line prefer-const
|
|
20
20
|
export let dragSource: Entity | EntityProperty = null;
|
package/src/types/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { Service, WebService, MicroService, SERVICE_TYPE } from './app/Service';
|
|
|
9
9
|
|
|
10
10
|
export { DataNode } from './data/DataNode';
|
|
11
11
|
export { GlobalLogicNode } from './data/GlobalLogicNode';
|
|
12
|
+
export { Module } from './data/Module';
|
|
12
13
|
export { Entity, systemProperty } from './data/Entity';
|
|
13
14
|
export { EntityProperty } from './data/EntityProperty';
|
|
14
15
|
export { EntityIndex } from './data/EntityIndex';
|
|
@@ -84,6 +85,7 @@ export enum LEVEL_ENUM {
|
|
|
84
85
|
dataNode = 'dataNode',
|
|
85
86
|
gloablLogicNode = 'gloablLogicNode',
|
|
86
87
|
category = 'category',
|
|
88
|
+
module = 'module',
|
|
87
89
|
entity = 'entity',
|
|
88
90
|
structure = 'structure',
|
|
89
91
|
enum = 'enum',
|
package/src/types/logic/Logic.ts
CHANGED
|
@@ -144,6 +144,11 @@ export class Logic extends Vertex {
|
|
|
144
144
|
*/
|
|
145
145
|
@immutable()
|
|
146
146
|
public readonly moreChildrenFields: Array<string> = ['params', 'returns', 'variables'];
|
|
147
|
+
/**
|
|
148
|
+
* 归属的模块
|
|
149
|
+
*/
|
|
150
|
+
@immutable()
|
|
151
|
+
public readonly moduleName: string = undefined;
|
|
147
152
|
/**
|
|
148
153
|
* @param source 需要合并的部分参数
|
|
149
154
|
*/
|
|
@@ -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
|
|
package/src/types/page/View.ts
CHANGED
|
@@ -180,7 +180,11 @@ export class View extends Block {
|
|
|
180
180
|
* 在 loadDetail 的情况下使用
|
|
181
181
|
* @returns
|
|
182
182
|
*/
|
|
183
|
-
load() {
|
|
183
|
+
load(enableCache = true) {
|
|
184
|
+
const isGONGHANG = utils.getGlobalEnv() === 'gonghang';
|
|
185
|
+
if (isGONGHANG) {
|
|
186
|
+
enableCache = false;
|
|
187
|
+
}
|
|
184
188
|
// 如果有正在进行的 Promise,则直接返回它
|
|
185
189
|
if (this.contentPromise)
|
|
186
190
|
return this.contentPromise;
|
|
@@ -191,6 +195,9 @@ export class View extends Block {
|
|
|
191
195
|
path: {
|
|
192
196
|
id: this.id,
|
|
193
197
|
},
|
|
198
|
+
query: {
|
|
199
|
+
enableCache,
|
|
200
|
+
},
|
|
194
201
|
});
|
|
195
202
|
|
|
196
203
|
const $def = result.$def;
|
|
@@ -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
|
/**
|