@lcap/nasl-language-server-core 4.4.1-rc.7 → 4.4.1-rc.9
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/checker.d.ts.map +1 -1
- package/out/checker.js +14 -3
- package/out/checker.js.map +1 -1
- package/out/reference-manager/def-key-helpers.d.ts.map +1 -1
- package/out/reference-manager/def-key-helpers.js +8 -0
- package/out/reference-manager/def-key-helpers.js.map +1 -1
- package/out/reference-manager/helper.d.ts.map +1 -1
- package/out/reference-manager/helper.js +2 -0
- package/out/reference-manager/helper.js.map +1 -1
- package/out/reference-manager/reference-manager.d.ts.map +1 -1
- package/out/reference-manager/reference-manager.js +27 -10
- package/out/reference-manager/reference-manager.js.map +1 -1
- package/out/typer/collectGlobalDefs.d.ts.map +1 -1
- package/out/typer/collectGlobalDefs.js +18 -0
- package/out/typer/collectGlobalDefs.js.map +1 -1
- package/out/typer/dispatch-call.d.ts.map +1 -1
- package/out/typer/dispatch-call.js +7 -1
- package/out/typer/dispatch-call.js.map +1 -1
- package/out/typer/dispatch-expr.d.ts.map +1 -1
- package/out/typer/dispatch-expr.js +12 -1
- package/out/typer/dispatch-expr.js.map +1 -1
- package/out/typer/dispatch-view.d.ts.map +1 -1
- package/out/typer/dispatch-view.js +8 -1
- package/out/typer/dispatch-view.js.map +1 -1
- package/out/typer/incremental-update.d.ts.map +1 -1
- package/out/typer/incremental-update.js +14 -1
- package/out/typer/incremental-update.js.map +1 -1
- package/out/typer/overload-helper.d.ts.map +1 -1
- package/out/typer/overload-helper.js +0 -3
- package/out/typer/overload-helper.js.map +1 -1
- package/out/typer/sem-diag.js +1 -1
- package/out/typer/sem-diag.js.map +1 -1
- package/out/typer/solver.d.ts.map +1 -1
- package/out/typer/solver.js +19 -29
- package/out/typer/solver.js.map +1 -1
- package/out/typer/subster.d.ts.map +1 -1
- package/out/typer/subster.js +57 -18
- package/out/typer/subster.js.map +1 -1
- package/out/typer/type-manager.d.ts.map +1 -1
- package/out/typer/type-manager.js +5 -1
- package/out/typer/type-manager.js.map +1 -1
- package/out/typer/type-predicate.d.ts.map +1 -1
- package/out/typer/type-predicate.js +22 -16
- package/out/typer/type-predicate.js.map +1 -1
- package/out/typer/typer.d.ts +8 -0
- package/out/typer/typer.d.ts.map +1 -1
- package/out/typer/typer.js +41 -1
- package/out/typer/typer.js.map +1 -1
- package/out/typer/unifier.js +2 -2
- package/out/typer/unifier.js.map +1 -1
- package/out/utils/bind-expression-hack.d.ts +15 -1
- package/out/utils/bind-expression-hack.d.ts.map +1 -1
- package/out/utils/bind-expression-hack.js +125 -3
- package/out/utils/bind-expression-hack.js.map +1 -1
- package/out/utils/parseTsClassType.d.ts.map +1 -1
- package/out/utils/parseTsClassType.js +6 -0
- package/out/utils/parseTsClassType.js.map +1 -1
- package/out/utils/type-operator.d.ts.map +1 -1
- package/out/utils/type-operator.js +1 -1
- package/out/utils/type-operator.js.map +1 -1
- package/package.json +6 -6
package/out/checker.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checker.d.ts","sourceRoot":"","sources":["../src/checker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EAC4C,QAAQ,EAC5B,IAAI,EAQ+E,GAAG,EAMxH,QAAQ,EAGT,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;
|
|
1
|
+
{"version":3,"file":"checker.d.ts","sourceRoot":"","sources":["../src/checker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EAC4C,QAAQ,EAC5B,IAAI,EAQ+E,GAAG,EAMxH,QAAQ,EAGT,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACgE,cAAc,EAGpF,MAAM,qB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sCA24D/B,IAAI,GAAG,QAAQ;2CAmzGxC,UAAU,gBACV,CAAC,YAAY,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,gBAC/C,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,qBACvB,MAAM,EAAE,oBACT,CAAC,YAAY,EAAE,UAAU,KAAK,UAAU,EAAE,KAC3D,kBAAkB,GAAG,IAAI;EAwF7B;AAqED,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
|
@@ -15,6 +15,7 @@ const asserts_1 = require("@lcap/nasl-concepts/asserts");
|
|
|
15
15
|
const helper_1 = require("./typer/helper");
|
|
16
16
|
const semantic_rules_1 = require("./semantic-rules");
|
|
17
17
|
const view_element_field_attrs_1 = require("@lcap/nasl-concepts/view-element-field-attrs");
|
|
18
|
+
const reference_manager_1 = require("./reference-manager/reference-manager");
|
|
18
19
|
const regeExp = new nasl_utils_1.ExpressionLexer();
|
|
19
20
|
regeExp.profile = nasl_utils_1.profiles.js;
|
|
20
21
|
var Severity;
|
|
@@ -271,6 +272,7 @@ function createErrorDiagnoser(context) {
|
|
|
271
272
|
let inPlayground = 0;
|
|
272
273
|
let inAuthLogic = false;
|
|
273
274
|
let inFrontendType = false;
|
|
275
|
+
let currentFrameworkKind = 'vue2';
|
|
274
276
|
let currentFrontendKind = '';
|
|
275
277
|
let dbType = '';
|
|
276
278
|
let curVarCounter = 0;
|
|
@@ -778,7 +780,7 @@ function createErrorDiagnoser(context) {
|
|
|
778
780
|
if (!info)
|
|
779
781
|
return;
|
|
780
782
|
const { ctx, afterItemPath, currentName } = info;
|
|
781
|
-
if (!afterItemPath)
|
|
783
|
+
if (!afterItemPath || currentFrameworkKind !== 'vue3')
|
|
782
784
|
return;
|
|
783
785
|
error(errorNode, `组件列表 ${ctx.node.name || ctx.node.tag} 内部存在对数据源数据 ${currentName}.item.${afterItemPath} 的修改,请切换成表单模式,并且需要将“数据源”属性切换为使用“表单数据”属性`);
|
|
784
786
|
}
|
|
@@ -3566,7 +3568,15 @@ function createErrorDiagnoser(context) {
|
|
|
3566
3568
|
* @param node
|
|
3567
3569
|
*/
|
|
3568
3570
|
function* checkCallConnector(node) {
|
|
3569
|
-
if (ensureNodeKeyExists(node, 'calleeConnectionName')) {
|
|
3571
|
+
if (ensureNodeKeyExists(node, 'calleeConnectionName')) {
|
|
3572
|
+
const connectionQName = `${reference_manager_1.ReferenceManager.connectionNsp}.${node.calleeConnectionName}`;
|
|
3573
|
+
const ref = env.refMgr.gQNameDefs.get(connectionQName);
|
|
3574
|
+
if (!ref) {
|
|
3575
|
+
error(node, `找不到连接 ${node.calleeConnectionName}。`, {
|
|
3576
|
+
tag: 'connectionAbsent',
|
|
3577
|
+
});
|
|
3578
|
+
}
|
|
3579
|
+
}
|
|
3570
3580
|
return env.getType(node);
|
|
3571
3581
|
}
|
|
3572
3582
|
/**
|
|
@@ -4353,7 +4363,7 @@ function createErrorDiagnoser(context) {
|
|
|
4353
4363
|
if (ensureNodeKeyExists(node, 'rights')) {
|
|
4354
4364
|
if (node.rights?.length) {
|
|
4355
4365
|
yield* (0, nasl_utils_1.wrapForEachToGenerator)(node.rights, function* (node) {
|
|
4356
|
-
yield* checkNode(node);
|
|
4366
|
+
yield* checkNode(toRaw(node));
|
|
4357
4367
|
});
|
|
4358
4368
|
}
|
|
4359
4369
|
}
|
|
@@ -5242,6 +5252,7 @@ function createErrorDiagnoser(context) {
|
|
|
5242
5252
|
inAuthLogic = false;
|
|
5243
5253
|
const frontendType = node.getAncestor?.('FrontendType');
|
|
5244
5254
|
inFrontendType = !!frontendType;
|
|
5255
|
+
currentFrameworkKind = frontendType?.frameworkKind || 'vue2';
|
|
5245
5256
|
currentFrontendKind = frontendType?.kind || '';
|
|
5246
5257
|
fileNodes.push(node);
|
|
5247
5258
|
let diagnostics = diagnosticMap.get(node);
|