@lcap/nasl-language-server-core 3.14.0-beta.5 → 3.14.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 (149) hide show
  1. package/out/checker.d.ts +2 -2
  2. package/out/checker.d.ts.map +1 -1
  3. package/out/checker.js +80 -20
  4. package/out/checker.js.map +1 -1
  5. package/out/index.js +17 -7
  6. package/out/index.js.map +1 -1
  7. package/out/module/graph.d.ts.map +1 -1
  8. package/out/reference-manager/builtin-q-name.js +3 -4
  9. package/out/reference-manager/builtin-q-name.js.map +1 -1
  10. package/out/reference-manager/collect-q-name.d.ts +3 -3
  11. package/out/reference-manager/collect-q-name.d.ts.map +1 -1
  12. package/out/reference-manager/collect-q-name.js +8 -8
  13. package/out/reference-manager/collect-q-name.js.map +1 -1
  14. package/out/reference-manager/reference-manager.d.ts +11 -5
  15. package/out/reference-manager/reference-manager.d.ts.map +1 -1
  16. package/out/reference-manager/reference-manager.js +109 -12
  17. package/out/reference-manager/reference-manager.js.map +1 -1
  18. package/out/reference-manager/remove-q-name.d.ts +3 -3
  19. package/out/reference-manager/remove-q-name.d.ts.map +1 -1
  20. package/out/reference-manager/remove-q-name.js +7 -7
  21. package/out/reference-manager/remove-q-name.js.map +1 -1
  22. package/out/reference-manager/rename-q-name.d.ts +3 -3
  23. package/out/reference-manager/rename-q-name.d.ts.map +1 -1
  24. package/out/reference-manager/rename-q-name.js +9 -9
  25. package/out/reference-manager/rename-q-name.js.map +1 -1
  26. package/out/symbol/graph.d.ts +1 -1
  27. package/out/symbol/namespace.d.ts.map +1 -1
  28. package/out/symbol/symbol.d.ts.map +1 -1
  29. package/out/symbol/traverse/concepts/frontend/frontend.d.ts.map +1 -1
  30. package/out/symbol/traverse/concepts/frontend/frontend.js +0 -1
  31. package/out/symbol/traverse/concepts/frontend/frontend.js.map +1 -1
  32. package/out/symbol/traverse/concepts/frontend/view.js +2 -2
  33. package/out/symbol/traverse/concepts/frontend/view.js.map +1 -1
  34. package/out/symbol/traverse/concepts/index.d.ts +2 -1
  35. package/out/symbol/traverse/concepts/index.d.ts.map +1 -1
  36. package/out/symbol/traverse/concepts/utils.js +4 -4
  37. package/out/symbol/traverse/concepts/utils.js.map +1 -1
  38. package/out/symbol/traverse/traverse.js +1 -2
  39. package/out/symbol/traverse/traverse.js.map +1 -1
  40. package/out/symbol/utils.js +1 -2
  41. package/out/symbol/utils.js.map +1 -1
  42. package/out/typer/collectGlobalDefs.js +21 -11
  43. package/out/typer/collectGlobalDefs.js.map +1 -1
  44. package/out/typer/component-def-manager/component-def-manager.d.ts +17 -4
  45. package/out/typer/component-def-manager/component-def-manager.d.ts.map +1 -1
  46. package/out/typer/component-def-manager/component-def-manager.js +32 -11
  47. package/out/typer/component-def-manager/component-def-manager.js.map +1 -1
  48. package/out/typer/component-def-manager/utils.js +3 -4
  49. package/out/typer/component-def-manager/utils.js.map +1 -1
  50. package/out/typer/dispatch-all.d.ts +1 -1
  51. package/out/typer/dispatch-all.d.ts.map +1 -1
  52. package/out/typer/dispatch-all.js +12 -8
  53. package/out/typer/dispatch-all.js.map +1 -1
  54. package/out/typer/dispatch-def.d.ts +3 -1
  55. package/out/typer/dispatch-def.d.ts.map +1 -1
  56. package/out/typer/dispatch-def.js +85 -32
  57. package/out/typer/dispatch-def.js.map +1 -1
  58. package/out/typer/dispatch-expr.d.ts.map +1 -1
  59. package/out/typer/dispatch-expr.js +199 -144
  60. package/out/typer/dispatch-expr.js.map +1 -1
  61. package/out/typer/dispatch-process.d.ts.map +1 -1
  62. package/out/typer/dispatch-process.js +12 -2
  63. package/out/typer/dispatch-process.js.map +1 -1
  64. package/out/typer/dispatch-stmt.d.ts.map +1 -1
  65. package/out/typer/dispatch-stmt.js +10 -10
  66. package/out/typer/dispatch-stmt.js.map +1 -1
  67. package/out/typer/dispatch-view.d.ts.map +1 -1
  68. package/out/typer/dispatch-view.js +146 -93
  69. package/out/typer/dispatch-view.js.map +1 -1
  70. package/out/typer/fix-use-before-assign.d.ts.map +1 -1
  71. package/out/typer/helper.d.ts +1 -0
  72. package/out/typer/helper.d.ts.map +1 -1
  73. package/out/typer/helper.js +25 -25
  74. package/out/typer/helper.js.map +1 -1
  75. package/out/typer/incremental-update.d.ts +1 -1
  76. package/out/typer/incremental-update.d.ts.map +1 -1
  77. package/out/typer/incremental-update.js +21 -30
  78. package/out/typer/incremental-update.js.map +1 -1
  79. package/out/typer/index.d.ts +5 -3
  80. package/out/typer/index.d.ts.map +1 -1
  81. package/out/typer/index.js +16 -14
  82. package/out/typer/index.js.map +1 -1
  83. package/out/typer/query-manager/query-manager.d.ts +28 -0
  84. package/out/typer/query-manager/query-manager.d.ts.map +1 -0
  85. package/out/typer/query-manager/query-manager.js +63 -0
  86. package/out/typer/query-manager/query-manager.js.map +1 -0
  87. package/out/typer/query-manager/query-tokens.d.ts +4 -0
  88. package/out/typer/query-manager/query-tokens.d.ts.map +1 -0
  89. package/out/typer/query-manager/query-tokens.js +8 -0
  90. package/out/typer/query-manager/query-tokens.js.map +1 -0
  91. package/out/typer/query-manager/type-level-evaluation-of.d.ts +13 -0
  92. package/out/typer/query-manager/type-level-evaluation-of.d.ts.map +1 -0
  93. package/out/typer/query-manager/type-level-evaluation-of.js +4 -0
  94. package/out/typer/query-manager/type-level-evaluation-of.js.map +1 -0
  95. package/out/typer/sem-diag.d.ts.map +1 -1
  96. package/out/typer/sem-diag.js +2 -2
  97. package/out/typer/sem-diag.js.map +1 -1
  98. package/out/typer/solver.d.ts.map +1 -1
  99. package/out/typer/solver.js +26 -26
  100. package/out/typer/solver.js.map +1 -1
  101. package/out/typer/subster.d.ts +1 -1
  102. package/out/typer/subster.d.ts.map +1 -1
  103. package/out/typer/subster.js +23 -15
  104. package/out/typer/subster.js.map +1 -1
  105. package/out/typer/topo-sort.d.ts.map +1 -1
  106. package/out/typer/topo-sort.js +6 -7
  107. package/out/typer/topo-sort.js.map +1 -1
  108. package/out/typer/type-hint-manager/type-hint-manager.d.ts +3 -0
  109. package/out/typer/type-hint-manager/type-hint-manager.d.ts.map +1 -1
  110. package/out/typer/type-hint-manager/type-hint-manager.js +8 -0
  111. package/out/typer/type-hint-manager/type-hint-manager.js.map +1 -1
  112. package/out/typer/type-predicate.d.ts +39 -0
  113. package/out/typer/type-predicate.d.ts.map +1 -0
  114. package/out/typer/type-predicate.js +331 -0
  115. package/out/typer/type-predicate.js.map +1 -0
  116. package/out/typer/typeManager.d.ts +1 -34
  117. package/out/typer/typeManager.d.ts.map +1 -1
  118. package/out/typer/typeManager.js +23 -332
  119. package/out/typer/typeManager.js.map +1 -1
  120. package/out/typer/typer.d.ts +20 -8
  121. package/out/typer/typer.d.ts.map +1 -1
  122. package/out/typer/typer.js +98 -18
  123. package/out/typer/typer.js.map +1 -1
  124. package/out/typer/unifier.d.ts +5 -5
  125. package/out/typer/unifier.d.ts.map +1 -1
  126. package/out/typer/unifier.js +23 -26
  127. package/out/typer/unifier.js.map +1 -1
  128. package/out/utils/array.js +1 -2
  129. package/out/utils/array.js.map +1 -1
  130. package/out/utils/assertion.js +1 -2
  131. package/out/utils/assertion.js.map +1 -1
  132. package/out/utils/bind-expression-hack.js +18 -9
  133. package/out/utils/bind-expression-hack.js.map +1 -1
  134. package/out/utils/error-boundary.d.ts.map +1 -1
  135. package/out/utils/error-boundary.js +8 -5
  136. package/out/utils/error-boundary.js.map +1 -1
  137. package/out/utils/nasl-type-manipulation.js +2 -3
  138. package/out/utils/nasl-type-manipulation.js.map +1 -1
  139. package/out/utils/parseTsClassType.d.ts +9 -10
  140. package/out/utils/parseTsClassType.d.ts.map +1 -1
  141. package/out/utils/parseTsClassType.js +19 -9
  142. package/out/utils/parseTsClassType.js.map +1 -1
  143. package/out/utils/types.js +1 -2
  144. package/out/utils/types.js.map +1 -1
  145. package/out/utils/vue-hack.js +1 -2
  146. package/out/utils/vue-hack.js.map +1 -1
  147. package/out/utils/vue.js +1 -2
  148. package/out/utils/vue.js.map +1 -1
  149. package/package.json +6 -6
package/out/checker.d.ts CHANGED
@@ -37,10 +37,10 @@ export declare function createErrorDiagnoser(context: DiagnoseContext): {
37
37
  setLatestVersionsOfSharedApp: (sharedAppVersions: SharedAppVersion[]) => void;
38
38
  diagnosticApp: () => Generator<TypeAnnotation | {
39
39
  typeKind: string;
40
- } | undefined, void, unknown>;
40
+ } | undefined, void, any>;
41
41
  checkNode: (node: SyntaxNode | undefined) => Generator<TypeAnnotation | {
42
42
  typeKind: string;
43
- } | undefined, any, unknown>;
43
+ } | undefined, any, any>;
44
44
  clearDiagnostics: (node: SyntaxNode) => void;
45
45
  getDiagnostics: (node: SyntaxNode) => NodeDiagnosticsMap | FileDiagnosticsMap | undefined;
46
46
  error: (node: SyntaxNode, message: string, context?: ErrorContext) => void;
@@ -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;AAC7B,OAAO,EACgE,cAAc,EAEpF,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAgC,MAAM,EAAE,MAAM,SAAS,CAAC;AAE/D,oBAAY,QAAQ;IAClB,IAAI,YAAY;IAChB,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,UAAU;IAEzB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,YAAY,GAAG;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAMF,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AAEpE,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC;AAMrE,KAAK,gBAAgB,GAAG;IACtB,IAAI,E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,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;AAED,eAAO,MAAM,6BAA6B,GAAI,UAAU,UAAU,EAAE,aAAa,kBAAkB,KAAG,KAAK,CAAC,gBAAgB,CAmC3H,CAAA"}
package/out/checker.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transformDiagnosticsToRecords = exports.createErrorDiagnoser = exports.Severity = void 0;
3
+ exports.transformDiagnosticsToRecords = exports.Severity = void 0;
4
+ exports.createErrorDiagnoser = createErrorDiagnoser;
4
5
  const decimal_js_1 = require("decimal.js");
5
6
  const nasl_concepts_1 = require("@lcap/nasl-concepts");
6
7
  const service_1 = require("@lcap/nasl-concepts/service");
@@ -740,7 +741,7 @@ function createErrorDiagnoser(context) {
740
741
  */
741
742
  function* checkVariableType(node) {
742
743
  const type = env.getType(node);
743
- if (isUninstantiatedType(type)) {
744
+ if (isUnresolvedType(type)) {
744
745
  const logic = node.getAncestor('SubLogic') || node.getAncestor('Logic');
745
746
  let used = false;
746
747
  logic.traverseStrictChildren((item) => {
@@ -806,10 +807,11 @@ function createErrorDiagnoser(context) {
806
807
  }
807
808
  /**
808
809
  * 未推导出的类型
810
+ * 这个可能有问题,因为可能是 type 的嵌套结构没有推导出类型,看使用场景了
809
811
  * @param type
810
812
  * @returns
811
813
  */
812
- function isUninstantiatedType(type) {
814
+ function isUnresolvedType(type) {
813
815
  return !type || type?.typeKind === 'typeParam' || type?.typeName === 'Null' || type?.typeName === 'void';
814
816
  }
815
817
  /**
@@ -819,9 +821,14 @@ function createErrorDiagnoser(context) {
819
821
  */
820
822
  function* checkNonNullExpression(node) {
821
823
  const type = yield* checkNode(node);
822
- if (isUninstantiatedType(type)) {
824
+ if (isUnresolvedType(type)) {
823
825
  const scope = node?.constructor?.nodeTitle;
824
- error(node, `${scope}:所选择的内容未定义。`);
826
+ if (node.concept === 'Identifier') {
827
+ error(node, `${scope}:${node.name} 未定义。`);
828
+ }
829
+ else {
830
+ error(node, `${scope}:所选择的内容未定义。`);
831
+ }
825
832
  return errorType;
826
833
  }
827
834
  return type;
@@ -1152,7 +1159,8 @@ function createErrorDiagnoser(context) {
1152
1159
  */
1153
1160
  function* checkVariable(node) {
1154
1161
  yield* checkNode(node.defaultValue);
1155
- yield* checkVariableType(node);
1162
+ // 前面加了报错,省点时间,报错不用那么精确
1163
+ // yield* checkVariableType(node);
1156
1164
  }
1157
1165
  /**
1158
1166
  * 检查 前端全局变量
@@ -1494,7 +1502,9 @@ function createErrorDiagnoser(context) {
1494
1502
  const value = numeric.value;
1495
1503
  const decimalPlaces = value?.split('.')[1]?.length || 0;
1496
1504
  if (decimalPlaces > +scale) {
1497
- error(node, `实体字段${node.name}默认值的小数位数不能大于设置的小数位数${scale},否则将会按照小数位数自动截断`);
1505
+ error(node, `实体字段${node.name}默认值的小数位数不能大于设置的小数位数${scale},否则将会按照小数位数自动截断`, {
1506
+ severity: Severity.WARN,
1507
+ });
1498
1508
  }
1499
1509
  }
1500
1510
  break;
@@ -1671,7 +1681,8 @@ function createErrorDiagnoser(context) {
1671
1681
  */
1672
1682
  function* checkReturn(node) {
1673
1683
  yield* checkNode(node.defaultValue);
1674
- yield* checkVariableType(node);
1684
+ // 前面加了报错,省点时间,报错不用那么精确
1685
+ // yield* checkVariableType(node);
1675
1686
  }
1676
1687
  /**
1677
1688
  * 检查 接口
@@ -2306,6 +2317,8 @@ function createErrorDiagnoser(context) {
2306
2317
  yield* checkNode(node);
2307
2318
  });
2308
2319
  }
2320
+ // 无人审批策略
2321
+ yield* checkNode(node.unmannedApprovalStrategy);
2309
2322
  if (node.fieldPermissions?.length) {
2310
2323
  yield* (0, nasl_utils_1.wrapForEachToGenerator)(node.fieldPermissions, function* (node) {
2311
2324
  yield* checkNode(node);
@@ -2324,6 +2337,40 @@ function createErrorDiagnoser(context) {
2324
2337
  }
2325
2338
  unbindVariables();
2326
2339
  }
2340
+ /**
2341
+ * 检查 无人时,自动转派审批策略
2342
+ * @param node
2343
+ */
2344
+ function* checkReassignUnmannedV2(node) {
2345
+ return yield* checkNode(node.assignees);
2346
+ }
2347
+ /**
2348
+ * 检查 用户经办人
2349
+ * @param node
2350
+ */
2351
+ function* checkUserAssignees(node) {
2352
+ if (!node.users?.length) {
2353
+ error(node, '转派人员为空');
2354
+ }
2355
+ }
2356
+ /**
2357
+ * 检查 角色经办人
2358
+ * @param node
2359
+ */
2360
+ function* checkRoleAssignees(node) {
2361
+ if (!node.roles?.length) {
2362
+ error(node, '转派角色为空');
2363
+ }
2364
+ }
2365
+ /**
2366
+ * 检查 部门经办人
2367
+ * @param node
2368
+ */
2369
+ function* checkDepartmentAssignees(node) {
2370
+ if (!node.departments?.length) {
2371
+ error(node, '转派部门为空');
2372
+ }
2373
+ }
2327
2374
  /**
2328
2375
  * 检查 字段权限控制详情
2329
2376
  * @param node
@@ -2716,7 +2763,7 @@ function createErrorDiagnoser(context) {
2716
2763
  node.parentKey !== 'consequent' &&
2717
2764
  node.parentNode?.parentNode?.concept !== 'CallInterface' &&
2718
2765
  node.parentNode.concept !== 'Block' &&
2719
- isUninstantiatedType(type)) {
2766
+ isUnresolvedType(type)) {
2720
2767
  let showErr = false;
2721
2768
  if (node.parentNode?.parentNode?.concept === 'CallLogic') {
2722
2769
  // calllogic 中别的类型会强校验,但是内置函数,不会强制校验,下面这几个其实是走的内置函数的实现,所以需要手动增加一下校验
@@ -3135,19 +3182,25 @@ function createErrorDiagnoser(context) {
3135
3182
  ? getPropertyOfType(node.parentNode.typeAnnotation, node.name)
3136
3183
  : env.resolveRef(node);
3137
3184
  if (!ref) {
3138
- if (node.name === 'it') {
3185
+ if (node.namespace === 'backend') {
3186
+ /**
3187
+ * 参考类型检查器的 {@link tpIdentifier}方法
3188
+ */
3189
+ return typer_1.naslLongTy;
3190
+ }
3191
+ else if (node.name === 'it') {
3139
3192
  return env.getType(node);
3140
3193
  }
3141
3194
  else {
3142
3195
  const { name } = node;
3143
3196
  // 之前有一些脏数据,先兼容
3144
- if (['true', 'false'].includes(name)) {
3145
- return new nasl_concepts_1.TypeAnnotation({
3146
- typeKind: 'primitive',
3147
- typeName: 'Boolean',
3148
- typeNamespace: 'nasl.core',
3149
- });
3150
- }
3197
+ // if (['true', 'false'].includes(name)) {
3198
+ // return new TypeAnnotation({
3199
+ // typeKind: 'primitive',
3200
+ // typeName: 'Boolean',
3201
+ // typeNamespace: 'nasl.core',
3202
+ // });
3203
+ // }
3151
3204
  if (
3152
3205
  // name 是 A.B.C
3153
3206
  name?.split('.')?.length > 1
@@ -3317,7 +3370,7 @@ function createErrorDiagnoser(context) {
3317
3370
  const prop = getPropertyOfType(type, propertyName);
3318
3371
  if (prop) {
3319
3372
  const propertyType = yield* checkNode(property);
3320
- if (isUninstantiatedType(propertyType)) {
3373
+ if (isUnresolvedType(propertyType)) {
3321
3374
  error(node, `${property.name}推导不出类型!请连线或手动设置`);
3322
3375
  }
3323
3376
  else if (type.typeKind === 'anonymousStructure') {
@@ -3778,7 +3831,7 @@ function createErrorDiagnoser(context) {
3778
3831
  if (ensureNodeKeyExists(node, 'typeName') && node.typeKind === 'reference') {
3779
3832
  const ref = env.resolveRef(node);
3780
3833
  if (!ref) {
3781
- error(node, `找不到类型${node.typeName}`);
3834
+ error(node, `找不到类型 ${node.typeName}`);
3782
3835
  }
3783
3836
  }
3784
3837
  }
@@ -3922,6 +3975,14 @@ function createErrorDiagnoser(context) {
3922
3975
  return yield* checkProcessDefinitionV2(node);
3923
3976
  case 'ProcessElementV2':
3924
3977
  return yield* checkProcessElementV2(node);
3978
+ case 'ReassignUnmannedV2':
3979
+ return yield* checkReassignUnmannedV2(node);
3980
+ case 'UserAssignees':
3981
+ return yield* checkUserAssignees(node);
3982
+ case 'RoleAssignees':
3983
+ return yield* checkRoleAssignees(node);
3984
+ case 'DepartmentAssignees':
3985
+ return yield* checkDepartmentAssignees(node);
3925
3986
  case 'FieldPermissionV2':
3926
3987
  return yield* checkFieldPermissionV2(node);
3927
3988
  case 'MsgTriggerLauncher':
@@ -4144,7 +4205,6 @@ function createErrorDiagnoser(context) {
4144
4205
  error,
4145
4206
  };
4146
4207
  }
4147
- exports.createErrorDiagnoser = createErrorDiagnoser;
4148
4208
  const transformDiagnosticsToRecords = (fileNode, diagnostics) => {
4149
4209
  const records = [];
4150
4210
  let filePath;