@lcap/nasl-language-server-core 4.1.0-rc.9 → 4.2.0-beta.2

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 (95) hide show
  1. package/out/checker.d.ts.map +1 -1
  2. package/out/checker.js +99 -70
  3. package/out/checker.js.map +1 -1
  4. package/out/index.d.ts +2 -1
  5. package/out/index.d.ts.map +1 -1
  6. package/out/index.js +2 -1
  7. package/out/index.js.map +1 -1
  8. package/out/reference-manager/collect-q-name.d.ts +2 -2
  9. package/out/reference-manager/collect-q-name.d.ts.map +1 -1
  10. package/out/reference-manager/collect-q-name.js +73 -111
  11. package/out/reference-manager/collect-q-name.js.map +1 -1
  12. package/out/reference-manager/concept-registry.d.ts +8 -0
  13. package/out/reference-manager/concept-registry.d.ts.map +1 -0
  14. package/out/reference-manager/concept-registry.js +56 -0
  15. package/out/reference-manager/concept-registry.js.map +1 -0
  16. package/out/reference-manager/get-q-name.d.ts.map +1 -1
  17. package/out/reference-manager/get-q-name.js +4 -0
  18. package/out/reference-manager/get-q-name.js.map +1 -1
  19. package/out/reference-manager/helper.d.ts +1 -1
  20. package/out/reference-manager/helper.d.ts.map +1 -1
  21. package/out/reference-manager/helper.js +4 -0
  22. package/out/reference-manager/helper.js.map +1 -1
  23. package/out/reference-manager/reference-manager.d.ts +11 -1
  24. package/out/reference-manager/reference-manager.d.ts.map +1 -1
  25. package/out/reference-manager/reference-manager.js +71 -15
  26. package/out/reference-manager/reference-manager.js.map +1 -1
  27. package/out/reference-manager/remove-q-name.d.ts +0 -9
  28. package/out/reference-manager/remove-q-name.d.ts.map +1 -1
  29. package/out/reference-manager/remove-q-name.js +62 -116
  30. package/out/reference-manager/remove-q-name.js.map +1 -1
  31. package/out/reference-manager/rename-q-name.d.ts +1 -0
  32. package/out/reference-manager/rename-q-name.d.ts.map +1 -1
  33. package/out/reference-manager/rename-q-name.js +59 -94
  34. package/out/reference-manager/rename-q-name.js.map +1 -1
  35. package/out/reference-manager/symbol-type.d.ts +3 -3
  36. package/out/reference-manager/symbol-type.d.ts.map +1 -1
  37. package/out/reference-manager/symbol-type.js +3 -0
  38. package/out/reference-manager/symbol-type.js.map +1 -1
  39. package/out/symbol/traverse/concepts/index.d.ts +1 -1
  40. package/out/symbol/traverse/concepts/index.d.ts.map +1 -1
  41. package/out/symbol/traverse/concepts/logic/expression/expression.d.ts.map +1 -1
  42. package/out/symbol/traverse/concepts/logic/expression/expression.js +2 -1
  43. package/out/symbol/traverse/concepts/logic/expression/expression.js.map +1 -1
  44. package/out/typer/dispatch-all.d.ts +2 -3
  45. package/out/typer/dispatch-all.d.ts.map +1 -1
  46. package/out/typer/dispatch-all.js +18 -38
  47. package/out/typer/dispatch-all.js.map +1 -1
  48. package/out/typer/dispatch-call.d.ts.map +1 -1
  49. package/out/typer/dispatch-call.js +31 -0
  50. package/out/typer/dispatch-call.js.map +1 -1
  51. package/out/typer/dispatch-def.d.ts +3 -9
  52. package/out/typer/dispatch-def.d.ts.map +1 -1
  53. package/out/typer/dispatch-def.js +18 -52
  54. package/out/typer/dispatch-def.js.map +1 -1
  55. package/out/typer/dispatch-expr.d.ts.map +1 -1
  56. package/out/typer/dispatch-expr.js +31 -7
  57. package/out/typer/dispatch-expr.js.map +1 -1
  58. package/out/typer/dispatch-process.d.ts +2 -2
  59. package/out/typer/dispatch-process.d.ts.map +1 -1
  60. package/out/typer/dispatch-process.js +15 -11
  61. package/out/typer/dispatch-process.js.map +1 -1
  62. package/out/typer/dispatch-stmt.d.ts.map +1 -1
  63. package/out/typer/dispatch-stmt.js.map +1 -1
  64. package/out/typer/dispatch-view.d.ts.map +1 -1
  65. package/out/typer/dispatch-view.js +29 -20
  66. package/out/typer/dispatch-view.js.map +1 -1
  67. package/out/typer/get-origin-logic-files.d.ts +8 -0
  68. package/out/typer/get-origin-logic-files.d.ts.map +1 -0
  69. package/out/typer/get-origin-logic-files.js +30 -0
  70. package/out/typer/get-origin-logic-files.js.map +1 -0
  71. package/out/typer/helper.d.ts.map +1 -1
  72. package/out/typer/helper.js.map +1 -1
  73. package/out/typer/incremental-update.js +2 -1
  74. package/out/typer/incremental-update.js.map +1 -1
  75. package/out/typer/index.d.ts +6 -3
  76. package/out/typer/index.d.ts.map +1 -1
  77. package/out/typer/index.js +3 -1
  78. package/out/typer/index.js.map +1 -1
  79. package/out/typer/subster.d.ts.map +1 -1
  80. package/out/typer/subster.js +16 -9
  81. package/out/typer/subster.js.map +1 -1
  82. package/out/typer/topo-sort.d.ts.map +1 -1
  83. package/out/typer/topo-sort.js +2 -1
  84. package/out/typer/topo-sort.js.map +1 -1
  85. package/out/typer/type-manager.d.ts.map +1 -1
  86. package/out/typer/type-manager.js +4 -1
  87. package/out/typer/type-manager.js.map +1 -1
  88. package/out/typer/typer.d.ts +6 -2
  89. package/out/typer/typer.d.ts.map +1 -1
  90. package/out/typer/typer.js +7 -4
  91. package/out/typer/typer.js.map +1 -1
  92. package/out/typer/unifier.d.ts.map +1 -1
  93. package/out/typer/unifier.js +10 -4
  94. package/out/typer/unifier.js.map +1 -1
  95. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"checker.d.ts","sourceRoot":"","sources":["../src/checker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EAU0F,GAAG,EAMvG,QAAQ,EACT,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACgE,cAAc,EAGpF,MAAM,qBAAqB,CAAC;AAS7B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAK5C,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAOpE,oBAAY,QAAQ;IAClB,IAAI,YAAY;IAChB,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAEnE,KAAK,YAAY,GAAG;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,CAAC,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ACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe;oCA4pIpB,OAAO;sDAPW,gBAAgB,EAAE;;;;sBAhBjD,UAAU,GAAG,SAAS;;;8BA4Df,UAAU;2BAuBb,UAAU;;kBAhqInB,UAAU,WAAW,MAAM,YAAY,YAAY;EAkrIzE;AAGD,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IAEX,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IACrC,mBAAmB,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IACvC,qBAAqB,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;CAC1C;AAMD,eAAO,MAAM,6BAA6B,aAC9B,UAAU,+DAGnB,MAAM,gBAAgB,CAyCxB,CAAC;AAMF,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
package/out/checker.js CHANGED
@@ -31,19 +31,6 @@ const processV2TaskTitleMap = {
31
31
  SubmitTask: '执行任务',
32
32
  CCTask: '抄送任务',
33
33
  };
34
- /**
35
- * 是否属于 控制流节点
36
- * @param node
37
- */
38
- function isControlFlowNode(node) {
39
- return nasl_concepts_1.asserts.isStrictEnd(node) || nasl_concepts_1.asserts.isStrictAbort(node) || nasl_concepts_1.asserts.isStrictBreak(node) || nasl_concepts_1.asserts.isStrictContinue(node);
40
- }
41
- /**
42
- * 是否属于 调用表达式
43
- */
44
- function isCallExpression(node) {
45
- return nasl_concepts_1.asserts.isCallFunction(node) || nasl_concepts_1.asserts.isCallInterface(node) || nasl_concepts_1.asserts.isCallLogic(node) || nasl_concepts_1.asserts.isCallConnector(node) || nasl_concepts_1.asserts.isCallEvent(node);
46
- }
47
34
  const isEnd = (node) => node.concept === 'End';
48
35
  const isAbort = (node) => node.concept === 'Abort';
49
36
  const isBreak = (node) => node.concept === 'Break';
@@ -53,7 +40,6 @@ const isContinue = (node) => node.concept === 'Continue';
53
40
  * @param node
54
41
  */
55
42
  const fastIsControlFlowNode = (node) => isEnd(node) || isAbort(node) || isBreak(node) || isContinue(node);
56
- const isArgument = (node) => node.concept === 'Argument';
57
43
  /**
58
44
  * 是端类型下的参数
59
45
  * @param node
@@ -80,7 +66,8 @@ function getExpressionNodeName(concept) {
80
66
  CallInterface: '接口',
81
67
  CallAuthInterface: '鉴权接口',
82
68
  CallConnector: '连接器',
83
- CallMicroserviceInterface: '',
69
+ CallMicroserviceInterface: '微服务接口',
70
+ CallGatewayInterface: '网关接口',
84
71
  CallEvent: '事件',
85
72
  };
86
73
  return expressionNodeName[concept];
@@ -249,11 +236,6 @@ function resolveMetadataType(typeArg, app) {
249
236
  return metadataTypes?.find(metadataType => metadataType.name === typeArg.typeName)?.typeAnnotation;
250
237
  }
251
238
  }
252
- const cheapNewError = (obj) => {
253
- const err = Object.create(Error.prototype);
254
- Object.assign(err, obj);
255
- return err;
256
- };
257
239
  /**
258
240
  * 创建错误诊断器
259
241
  * @returns
@@ -391,7 +373,6 @@ function createErrorDiagnoser(context) {
391
373
  timeoutConfig.values.forEach((value) => {
392
374
  const __env = value.env;
393
375
  const timeout = Number(value.value);
394
- const label = value.envDisplayLabel;
395
376
  if (timeout * 1000 < retryInterval * retryTimes) {
396
377
  const HTTP_TIMEOUT_ORIGIN_MESSAGE = 'the local timeout is greater than the system timeout';
397
378
  error(node, `${nodeType}“${node.title ?? node.name}”配置的重试间隔时间乘以重试次数大于${__env === 'dev' ? '开发环境' : '生产环境'}接口超时时间,可能导致重试失败`, {
@@ -821,7 +802,7 @@ function createErrorDiagnoser(context) {
821
802
  */
822
803
  function* checkCallExpressionParameters(node, ref) {
823
804
  // Handle both TypeAnnotation and FunctionDefinition formats
824
- const params = ref.params ?? ref.typeArguments;
805
+ const params = ref?.params ?? ref?.typeArguments;
825
806
  const { arguments: args } = node;
826
807
  const paramsLen = params?.length || 0;
827
808
  const argsLen = args?.length || 0;
@@ -960,7 +941,7 @@ function createErrorDiagnoser(context) {
960
941
  * @param ref
961
942
  */
962
943
  function* checkScopeOfUse(node, ref) {
963
- const range = getRange(ref);
944
+ const range = ref && getRange(ref);
964
945
  if (range && !isNodeWithinRange(node, range)) {
965
946
  error(node, range.errMsg);
966
947
  }
@@ -1628,6 +1609,30 @@ function createErrorDiagnoser(context) {
1628
1609
  error(node, message);
1629
1610
  }
1630
1611
  }
1612
+ const relationEntity = node.relationEntity;
1613
+ const relationNamespace = node.relationNamespace;
1614
+ const relationProperty = node.relationProperty;
1615
+ if (relationEntity && relationNamespace && relationProperty) {
1616
+ const releationEntityQName = `${relationNamespace}.${relationEntity}`;
1617
+ const releationEntityPropertyQName = `${releationEntityQName}.properties.${relationProperty}`;
1618
+ const entityEntityDef = env.refMgr.queryQNameDef(releationEntityQName);
1619
+ const entityPropertyDef = env.refMgr.queryQNameDef(releationEntityPropertyQName);
1620
+ if (entityPropertyDef) {
1621
+ const equal = (0, type_predicate_1.isEqualTy)(env, entityPropertyDef.typeAnnotation, node.typeAnnotation);
1622
+ if (equal) {
1623
+ return;
1624
+ }
1625
+ const content = (0, sem_diag_1.mkIncompatibleTyErr)(env, entityPropertyDef.typeAnnotation, node.typeAnnotation);
1626
+ const message = `关联属性${content}`;
1627
+ error(node, message);
1628
+ }
1629
+ else {
1630
+ const message = entityEntityDef
1631
+ ? `找不到 ${relationEntity} 上的 ${relationProperty}`
1632
+ : `找不到实体 ${relationEntity}`;
1633
+ error(node, message);
1634
+ }
1635
+ }
1631
1636
  }
1632
1637
  /**
1633
1638
  * 检查 枚举
@@ -1774,6 +1779,24 @@ function createErrorDiagnoser(context) {
1774
1779
  env.exitScope();
1775
1780
  pConn && env.exitScope();
1776
1781
  }
1782
+ /**
1783
+ * 检查 Mcp工具
1784
+ * @param node
1785
+ */
1786
+ function* checkMcpInterface(node) {
1787
+ env.enterScope(node);
1788
+ if (node.params?.length) {
1789
+ yield* (0, nasl_utils_1.wrapForEachToGenerator)(node.params, function* (node) {
1790
+ yield* checkNode(node);
1791
+ });
1792
+ }
1793
+ if (node.returns?.length) {
1794
+ yield* (0, nasl_utils_1.wrapForEachToGenerator)(node.returns, function* (node) {
1795
+ yield* checkNode(node);
1796
+ });
1797
+ }
1798
+ env.exitScope();
1799
+ }
1777
1800
  /**
1778
1801
  * 检查 鉴权接口
1779
1802
  * @param node
@@ -2500,59 +2523,63 @@ function createErrorDiagnoser(context) {
2500
2523
  error(node.sharedScope, '共享范围为指定应用时,必须指定共享应用');
2501
2524
  }
2502
2525
  // 导出接口
2503
- if (node?.exportInterface) {
2504
- let isSame = true;
2505
- const itf = node.exportInterface;
2506
- const { params: logicParams = [], returns: logicReturns = [] } = node;
2507
- const { params: itfParams = [], returns: itfReturns = [] } = itf;
2508
- // 参数和返回数量不同
2509
- if (logicParams.length !== itfParams.length || logicReturns.length !== itfReturns.length) {
2510
- isSame = false;
2511
- }
2512
- if (isSame && logicParams.length === itfParams.length) {
2513
- const logicParamMap = logicParams?.reduce((acc, param) => {
2514
- acc[param.name] = param.typeAnnotation;
2515
- return acc;
2516
- }, {});
2517
- itfParams.forEach((param) => {
2518
- const logicParam = logicParamMap?.[param.name];
2519
- if (!logicParam) {
2520
- isSame = false;
2521
- return;
2522
- }
2523
- // 枚举会被转为 String
2524
- else if (logicParam.typeKind === 'reference' && logicParam.typeNamespace?.endsWith('enums')) {
2525
- if (param.typeAnnotation.typeName !== 'String') {
2526
+ if (node?.exportInterfaces?.length) {
2527
+ node?.exportInterfaces?.forEach?.((exportInterface) => {
2528
+ let isSame = true;
2529
+ const itf = exportInterface;
2530
+ const { params: logicParams = [], returns: logicReturns = [] } = node;
2531
+ const { params: itfParams = [], returns: itfReturns = [] } = itf;
2532
+ // 参数和返回数量不同
2533
+ if (logicParams.length !== itfParams.length || logicReturns.length !== itfReturns.length) {
2534
+ isSame = false;
2535
+ }
2536
+ if (isSame && logicParams.length === itfParams.length) {
2537
+ const logicParamMap = logicParams?.reduce((acc, param) => {
2538
+ acc[param.name] = param.typeAnnotation;
2539
+ return acc;
2540
+ }, {});
2541
+ itfParams.forEach((param) => {
2542
+ const logicParam = logicParamMap?.[param.name];
2543
+ if (!logicParam) {
2526
2544
  isSame = false;
2527
2545
  return;
2528
2546
  }
2547
+ // 枚举会被转为 String
2548
+ else if (logicParam.typeKind === 'reference' && logicParam.typeNamespace?.endsWith('enums')) {
2549
+ if (param.typeAnnotation.typeName !== 'String') {
2550
+ isSame = false;
2551
+ return;
2552
+ }
2553
+ }
2554
+ else if (!logicParam.isSame(param.typeAnnotation)) {
2555
+ isSame = false;
2556
+ return;
2557
+ }
2558
+ });
2559
+ }
2560
+ if (isSame && logicReturns.length === itfReturns.length && logicReturns.length > 0) {
2561
+ if (logicReturns[0].name !== itfReturns[0].name) {
2562
+ isSame = false;
2529
2563
  }
2530
- else if (!logicParam.isSame(param.typeAnnotation)) {
2564
+ else if (!(0, type_predicate_1.isEqualTy)(env, env.getType(logicReturns[0]), env.getType(itfReturns[0]))) {
2531
2565
  isSame = false;
2532
- return;
2533
2566
  }
2534
- });
2535
- }
2536
- if (isSame && logicReturns.length === itfReturns.length && logicReturns.length > 0) {
2537
- if (logicReturns[0].name !== itfReturns[0].name) {
2538
- isSame = false;
2539
2567
  }
2540
- else if (!(0, type_predicate_1.isEqualTy)(env, env.getType(logicReturns[0]), env.getType(itfReturns[0]))) {
2541
- isSame = false;
2568
+ if (!isSame) {
2569
+ const macthed = exportInterface.concept === 'McpInterface';
2570
+ const key = macthed ? 'exportMcpInterface' : 'exportInterface';
2571
+ error(node, `逻辑已变更,请确认请求类型无误后重新导出${'${event}'}`, {
2572
+ severity: Severity.ERROR,
2573
+ events: [
2574
+ {
2575
+ key,
2576
+ label: '接口配置',
2577
+ params: node,
2578
+ },
2579
+ ],
2580
+ });
2542
2581
  }
2543
- }
2544
- if (!isSame) {
2545
- error(node, `逻辑已变更,请确认请求类型无误后重新导出${'${event}'}`, {
2546
- severity: Severity.ERROR,
2547
- events: [
2548
- {
2549
- key: 'exportInterface',
2550
- label: '接口配置',
2551
- params: node,
2552
- },
2553
- ],
2554
- });
2555
- }
2582
+ });
2556
2583
  }
2557
2584
  }
2558
2585
  const likeComponent = (node.getAncestorRaw('View') || node.getAncestorRaw('BusinessComponent'));
@@ -3851,7 +3878,7 @@ function createErrorDiagnoser(context) {
3851
3878
  return errorType;
3852
3879
  }
3853
3880
  const typeAnnotation = (yield* checkNode(node.expression));
3854
- if (typeAnnotation.typeKind === 'generic') {
3881
+ if (typeAnnotation?.typeKind === 'generic') {
3855
3882
  yield* checkGenericTypeHasExpectedTyArgs(typeAnnotation);
3856
3883
  }
3857
3884
  return typeAnnotation;
@@ -4067,6 +4094,8 @@ function createErrorDiagnoser(context) {
4067
4094
  return yield* checkMsgTriggerEvent(node);
4068
4095
  case 'Interface':
4069
4096
  return yield* checkInterface(node);
4097
+ case 'McpInterface':
4098
+ return yield* checkMcpInterface(node);
4070
4099
  case 'AuthInterface':
4071
4100
  return yield* checkAuthInterface(node);
4072
4101
  case 'InterfaceParam':
@@ -4244,7 +4273,7 @@ function createErrorDiagnoser(context) {
4244
4273
  }
4245
4274
  }
4246
4275
  catch (err) {
4247
- // console.error(err);
4276
+ console.error(err);
4248
4277
  }
4249
4278
  }
4250
4279
  /**