@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.
Files changed (121) hide show
  1. package/out/automate/engine/utils.js +1 -1
  2. package/out/automate/engine/utils.js.map +1 -1
  3. package/out/breakpoint/generator/BreakpointNode.js +30 -1
  4. package/out/breakpoint/generator/BreakpointNode.js.map +1 -1
  5. package/out/breakpoint/shared/utils.js +1 -1
  6. package/out/breakpoint/shared/utils.js.map +1 -1
  7. package/out/common/BaseNode.js +1 -1
  8. package/out/common/BaseNode.js.map +1 -1
  9. package/out/common/Command.js +1 -1
  10. package/out/common/Command.js.map +1 -1
  11. package/out/concepts/BatchAssignment__.js +3 -3
  12. package/out/concepts/BatchAssignment__.js.map +1 -1
  13. package/out/concepts/BindEvent__.js +3 -3
  14. package/out/concepts/BindEvent__.js.map +1 -1
  15. package/out/concepts/CallConnector__.d.ts +42 -0
  16. package/out/concepts/CallConnector__.js +198 -0
  17. package/out/concepts/CallConnector__.js.map +1 -0
  18. package/out/concepts/CallInterface__.js +2 -4
  19. package/out/concepts/CallInterface__.js.map +1 -1
  20. package/out/concepts/CallLogic__.js +1 -1
  21. package/out/concepts/CallLogic__.js.map +1 -1
  22. package/out/concepts/CallQueryComponent__.js +2 -2
  23. package/out/concepts/CallQueryComponent__.js.map +1 -1
  24. package/out/concepts/ConnectorTrigger__.d.ts +78 -0
  25. package/out/concepts/ConnectorTrigger__.js +155 -0
  26. package/out/concepts/ConnectorTrigger__.js.map +1 -0
  27. package/out/concepts/Connector__.d.ts +464 -0
  28. package/out/concepts/Connector__.js +698 -0
  29. package/out/concepts/Connector__.js.map +1 -0
  30. package/out/concepts/DataSource__.js +1 -1
  31. package/out/concepts/DataSource__.js.map +1 -1
  32. package/out/concepts/EntityProperty__.js +1 -1
  33. package/out/concepts/EntityProperty__.js.map +1 -1
  34. package/out/concepts/MemberExpression__.js +1 -1
  35. package/out/concepts/MemberExpression__.js.map +1 -1
  36. package/out/concepts/MsgTriggerEvent__.d.ts +137 -0
  37. package/out/concepts/MsgTriggerEvent__.js +228 -0
  38. package/out/concepts/MsgTriggerEvent__.js.map +1 -0
  39. package/out/concepts/MsgTriggerLauncher__.d.ts +118 -0
  40. package/out/concepts/MsgTriggerLauncher__.js +204 -0
  41. package/out/concepts/MsgTriggerLauncher__.js.map +1 -0
  42. package/out/concepts/SelectMembers__.js +1 -1
  43. package/out/concepts/SelectMembers__.js.map +1 -1
  44. package/out/concepts/StringLiteral__.js +5 -1
  45. package/out/concepts/StringLiteral__.js.map +1 -1
  46. package/out/concepts/TriggerEvent__.d.ts +120 -0
  47. package/out/concepts/TriggerEvent__.js +222 -0
  48. package/out/concepts/TriggerEvent__.js.map +1 -0
  49. package/out/concepts/TriggerLauncher__.d.ts +88 -0
  50. package/out/concepts/TriggerLauncher__.js +235 -0
  51. package/out/concepts/TriggerLauncher__.js.map +1 -0
  52. package/out/concepts/TypeAnnotation__.js +1 -1
  53. package/out/concepts/TypeAnnotation__.js.map +1 -1
  54. package/out/concepts/ViewElement__.js +1 -1
  55. package/out/concepts/ViewElement__.js.map +1 -1
  56. package/out/concepts/types__.d.ts +124 -0
  57. package/out/concepts/types__.js +3 -0
  58. package/out/concepts/types__.js.map +1 -0
  59. package/out/sentry/index.d.ts +8 -4
  60. package/out/sentry/index.js +84 -54
  61. package/out/sentry/index.js.map +1 -1
  62. package/out/server/entity2LogicNamespace.js +1 -1
  63. package/out/server/entity2LogicNamespace.js.map +1 -1
  64. package/out/server/extendBaseNode.js +9 -1
  65. package/out/server/extendBaseNode.js.map +1 -1
  66. package/out/server/formatTsUtils.js +2 -2
  67. package/out/server/formatTsUtils.js.map +1 -1
  68. package/out/server/getConnector.d.ts +11 -0
  69. package/out/server/getConnector.js +42 -0
  70. package/out/server/getConnector.js.map +1 -0
  71. package/out/server/getInterfaces.js +1 -1
  72. package/out/server/getInterfaces.js.map +1 -1
  73. package/out/server/getLogics.js +2 -2
  74. package/out/server/getLogics.js.map +1 -1
  75. package/out/server/getMemberIdentifier.js +2 -2
  76. package/out/server/getMemberIdentifier.js.map +1 -1
  77. package/out/server/getScope.js +3 -3
  78. package/out/server/getScope.js.map +1 -1
  79. package/out/server/naslServer.d.ts +2 -2
  80. package/out/server/naslServer.js +19 -7
  81. package/out/server/naslServer.js.map +1 -1
  82. package/out/server/translator.js +3 -3
  83. package/out/server/translator.js.map +1 -1
  84. package/out/service/storage/init.js +1 -1
  85. package/out/service/storage/init.js.map +1 -1
  86. package/out/utils/string.js +1 -1
  87. package/out/utils/string.js.map +1 -1
  88. package/package.json +1 -1
  89. package/src/automate/engine/utils.js +1 -1
  90. package/src/breakpoint/generator/BreakpointNode.ts +40 -1
  91. package/src/breakpoint/shared/utils.ts +1 -1
  92. package/src/common/BaseNode.ts +1 -1
  93. package/src/common/Command.ts +1 -1
  94. package/src/common/dist/Command.js +39 -0
  95. package/src/concepts/BatchAssignment__.ts +3 -3
  96. package/src/concepts/BindEvent__.ts +3 -3
  97. package/src/concepts/CallInterface__.ts +2 -3
  98. package/src/concepts/CallLogic__.ts +1 -1
  99. package/src/concepts/CallQueryComponent__.ts +2 -2
  100. package/src/concepts/DataSource__.ts +2 -2
  101. package/src/concepts/EntityProperty__.ts +1 -7
  102. package/src/concepts/MemberExpression__.ts +1 -1
  103. package/src/concepts/SelectMembers__.ts +1 -1
  104. package/src/concepts/StringLiteral__.ts +5 -1
  105. package/src/concepts/TypeAnnotation__.ts +17 -17
  106. package/src/concepts/ViewElement__.ts +1 -1
  107. package/src/concepts/dist/Entity__.js +729 -0
  108. package/src/concepts/dist/StringLiteral__.js +158 -0
  109. package/src/sentry/index.ts +99 -57
  110. package/src/server/dist/naslServer.js +52 -1
  111. package/src/server/entity2LogicNamespace.ts +1 -1
  112. package/src/server/extendBaseNode.ts +10 -1
  113. package/src/server/formatTsUtils.ts +2 -2
  114. package/src/server/getInterfaces.ts +1 -1
  115. package/src/server/getLogics.ts +2 -2
  116. package/src/server/getMemberIdentifier.ts +2 -2
  117. package/src/server/getScope.ts +3 -3
  118. package/src/server/naslServer.ts +12 -7
  119. package/src/server/translator.ts +3 -3
  120. package/src/service/storage/init.ts +1 -1
  121. 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.map((arg) => arg.typeTitle || arg.name || 'T').join(', ')}>`;
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.allNodesAPI[element.tag];
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}=""`;