@lcap/nasl 3.0.0-beta.5 → 3.0.0-beta.7
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/automate/engine/utils.js +1 -1
- package/out/automate/engine/utils.js.map +1 -1
- package/out/breakpoint/generator/BreakpointNode.js +30 -1
- package/out/breakpoint/generator/BreakpointNode.js.map +1 -1
- package/out/breakpoint/shared/utils.js +1 -1
- package/out/breakpoint/shared/utils.js.map +1 -1
- package/out/common/BaseNode.js +1 -1
- package/out/common/BaseNode.js.map +1 -1
- package/out/common/Command.js +1 -1
- package/out/common/Command.js.map +1 -1
- package/out/concepts/BatchAssignment__.js +3 -3
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BindEvent__.js +3 -3
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/CallConnector__.d.ts +42 -0
- package/out/concepts/CallConnector__.js +198 -0
- package/out/concepts/CallConnector__.js.map +1 -0
- package/out/concepts/CallInterface__.js +2 -4
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.js +1 -1
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.js +2 -2
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/ConnectorTrigger__.d.ts +78 -0
- package/out/concepts/ConnectorTrigger__.js +155 -0
- package/out/concepts/ConnectorTrigger__.js.map +1 -0
- package/out/concepts/Connector__.d.ts +464 -0
- package/out/concepts/Connector__.js +698 -0
- package/out/concepts/Connector__.js.map +1 -0
- package/out/concepts/DataSource__.js +1 -1
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/EntityProperty__.js +1 -1
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +1 -1
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/MsgTriggerEvent__.d.ts +137 -0
- package/out/concepts/MsgTriggerEvent__.js +228 -0
- package/out/concepts/MsgTriggerEvent__.js.map +1 -0
- package/out/concepts/MsgTriggerLauncher__.d.ts +118 -0
- package/out/concepts/MsgTriggerLauncher__.js +204 -0
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -0
- package/out/concepts/SelectMembers__.js +1 -1
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/StringLiteral__.js +5 -1
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/TriggerEvent__.d.ts +120 -0
- package/out/concepts/TriggerEvent__.js +222 -0
- package/out/concepts/TriggerEvent__.js.map +1 -0
- package/out/concepts/TriggerLauncher__.d.ts +88 -0
- package/out/concepts/TriggerLauncher__.js +235 -0
- package/out/concepts/TriggerLauncher__.js.map +1 -0
- package/out/concepts/TypeAnnotation__.js +1 -1
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/ViewElement__.js +1 -1
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/types__.d.ts +124 -0
- package/out/concepts/types__.js +3 -0
- package/out/concepts/types__.js.map +1 -0
- package/out/sentry/index.d.ts +8 -4
- package/out/sentry/index.js +84 -54
- package/out/sentry/index.js.map +1 -1
- package/out/server/entity2LogicNamespace.js +1 -1
- package/out/server/entity2LogicNamespace.js.map +1 -1
- package/out/server/extendBaseNode.js +9 -1
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/formatTsUtils.js +2 -2
- package/out/server/formatTsUtils.js.map +1 -1
- package/out/server/getConnector.d.ts +11 -0
- package/out/server/getConnector.js +42 -0
- package/out/server/getConnector.js.map +1 -0
- package/out/server/getInterfaces.js +1 -1
- package/out/server/getInterfaces.js.map +1 -1
- package/out/server/getLogics.js +2 -2
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.js +2 -2
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/getScope.js +3 -3
- package/out/server/getScope.js.map +1 -1
- package/out/server/naslServer.d.ts +2 -2
- package/out/server/naslServer.js +19 -7
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +3 -3
- package/out/server/translator.js.map +1 -1
- package/out/service/storage/init.js +1 -1
- package/out/service/storage/init.js.map +1 -1
- package/out/utils/string.js +1 -1
- package/out/utils/string.js.map +1 -1
- package/package.json +1 -1
- package/src/automate/engine/utils.js +1 -1
- package/src/breakpoint/generator/BreakpointNode.ts +40 -1
- package/src/breakpoint/shared/utils.ts +1 -1
- package/src/common/BaseNode.ts +1 -1
- package/src/common/Command.ts +1 -1
- package/src/common/dist/Command.js +39 -0
- package/src/concepts/BatchAssignment__.ts +3 -3
- package/src/concepts/BindEvent__.ts +3 -3
- package/src/concepts/CallInterface__.ts +2 -3
- package/src/concepts/CallLogic__.ts +1 -1
- package/src/concepts/CallQueryComponent__.ts +2 -2
- package/src/concepts/DataSource__.ts +2 -2
- package/src/concepts/EntityProperty__.ts +1 -7
- package/src/concepts/MemberExpression__.ts +1 -1
- package/src/concepts/SelectMembers__.ts +1 -1
- package/src/concepts/StringLiteral__.ts +5 -1
- package/src/concepts/TypeAnnotation__.ts +17 -17
- package/src/concepts/ViewElement__.ts +1 -1
- package/src/concepts/dist/Entity__.js +729 -0
- package/src/concepts/dist/StringLiteral__.js +158 -0
- package/src/sentry/index.ts +99 -57
- package/src/server/dist/naslServer.js +52 -1
- package/src/server/entity2LogicNamespace.ts +1 -1
- package/src/server/extendBaseNode.ts +10 -1
- package/src/server/formatTsUtils.ts +2 -2
- package/src/server/getInterfaces.ts +1 -1
- package/src/server/getLogics.ts +2 -2
- package/src/server/getMemberIdentifier.ts +2 -2
- package/src/server/getScope.ts +3 -3
- package/src/server/naslServer.ts +12 -7
- package/src/server/translator.ts +3 -3
- package/src/service/storage/init.ts +1 -1
- package/src/utils/string.ts +1 -1
|
@@ -158,7 +158,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
158
158
|
@property()
|
|
159
159
|
ruleMap: Object = undefined;
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
164
|
* @param source 需要合并的部分参数
|
|
@@ -199,9 +199,9 @@ export class TypeAnnotation extends BaseNode {
|
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
|
|
203
202
|
|
|
204
|
-
|
|
203
|
+
|
|
204
|
+
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
207
|
* 插入类型标注
|
|
@@ -235,7 +235,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
235
235
|
return typeAnnotation;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
241
|
* 插入类型标注
|
|
@@ -259,7 +259,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
259
259
|
return node;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
|
|
262
|
+
|
|
263
263
|
|
|
264
264
|
/**
|
|
265
265
|
* 添加类型标注
|
|
@@ -280,7 +280,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
280
280
|
return this._insertTypeAnnotationInTypeArgumentsAt(options as any, index);
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
|
|
283
|
+
|
|
284
284
|
|
|
285
285
|
/**
|
|
286
286
|
* 添加类型标注
|
|
@@ -305,7 +305,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
305
305
|
return node;
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
|
|
308
|
+
|
|
309
309
|
|
|
310
310
|
/**
|
|
311
311
|
* 插入类型标注
|
|
@@ -339,7 +339,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
339
339
|
return typeAnnotation;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
-
|
|
342
|
+
|
|
343
343
|
|
|
344
344
|
/**
|
|
345
345
|
* 插入类型标注
|
|
@@ -363,7 +363,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
363
363
|
return node;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
|
|
366
|
+
|
|
367
367
|
|
|
368
368
|
/**
|
|
369
369
|
* 添加类型标注
|
|
@@ -384,7 +384,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
384
384
|
return this._insertTypeAnnotationInReturnTypeAt(options as any, index);
|
|
385
385
|
}
|
|
386
386
|
|
|
387
|
-
|
|
387
|
+
|
|
388
388
|
|
|
389
389
|
/**
|
|
390
390
|
* 添加类型标注
|
|
@@ -412,7 +412,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
412
412
|
|
|
413
413
|
|
|
414
414
|
|
|
415
|
-
|
|
415
|
+
|
|
416
416
|
|
|
417
417
|
/**
|
|
418
418
|
* 插入数据结构属性
|
|
@@ -446,7 +446,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
446
446
|
return structureProperty;
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
|
|
449
|
+
|
|
450
450
|
|
|
451
451
|
/**
|
|
452
452
|
* 插入数据结构属性
|
|
@@ -470,7 +470,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
470
470
|
return node;
|
|
471
471
|
}
|
|
472
472
|
|
|
473
|
-
|
|
473
|
+
|
|
474
474
|
|
|
475
475
|
/**
|
|
476
476
|
* 添加数据结构属性
|
|
@@ -491,7 +491,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
491
491
|
return this._insertStructurePropertyAt(options as any, index);
|
|
492
492
|
}
|
|
493
493
|
|
|
494
|
-
|
|
494
|
+
|
|
495
495
|
|
|
496
496
|
/**
|
|
497
497
|
* 添加数据结构属性
|
|
@@ -517,7 +517,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
517
517
|
}
|
|
518
518
|
|
|
519
519
|
|
|
520
|
-
|
|
520
|
+
|
|
521
521
|
|
|
522
522
|
/**
|
|
523
523
|
* 删除类型标注
|
|
@@ -530,7 +530,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
530
530
|
return typeAnnotation.delete();
|
|
531
531
|
}
|
|
532
532
|
|
|
533
|
-
|
|
533
|
+
|
|
534
534
|
|
|
535
535
|
/**
|
|
536
536
|
* 删除类型标注
|
|
@@ -724,7 +724,7 @@ export class TypeAnnotation extends BaseNode {
|
|
|
724
724
|
} else if (this.typeKind === 'reference') {
|
|
725
725
|
return this.typeName;
|
|
726
726
|
} else if (this.typeKind === 'generic') {
|
|
727
|
-
return `${this.typeName}<${this.typeArguments
|
|
727
|
+
return `${this.typeName}<${this.typeArguments?.map((arg) => arg.typeTitle || arg.name || 'T').join(', ')}>`;
|
|
728
728
|
} else if (this.typeKind === 'anonymousStructure') {
|
|
729
729
|
return `{ ${this.properties?.map(({ name, typeAnnotation }) =>
|
|
730
730
|
(`${name}: ${typeAnnotation ? typeAnnotation.typeTitle : '未知'}`)).join(', ')} }`;
|
|
@@ -1975,7 +1975,7 @@ export class ViewElement extends BaseNode {
|
|
|
1975
1975
|
nodePathAttr: true,
|
|
1976
1976
|
attrFormat: (attr: BindAttribute | BindEvent | BindDirective, element?: ViewElement, defaultResult?: string) => {
|
|
1977
1977
|
if (attr.concept === 'BindAttribute' && !['href', 'destination', 'externalDestination', 'download'].includes(attr.name)) {
|
|
1978
|
-
const api = config
|
|
1978
|
+
const api = config?.allNodesAPI?.[element.tag];
|
|
1979
1979
|
const apiOfAttr = api && api.attrs && api.attrs.find((_attr) => _attr.name === attr.name);
|
|
1980
1980
|
if (['u-form-item', 'u-validator', 'van-field'].includes(element.tag) && attr.name === 'rules') {
|
|
1981
1981
|
return `${attr.name}=""`;
|