@zenwave360/lsp-js 0.1.0-next.18.1 → 0.1.0-next.20.1

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.
@@ -1,4 +1,4 @@
1
- /* @zenwave360/lsp-js 0.1.0-next.18.1 */
1
+ /* @zenwave360/lsp-js 0.1.0-next.20.1 */
2
2
  (() => {
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
@@ -102792,6 +102792,12 @@ ${JSON.stringify(message, null, 4)}`);
102792
102792
  };
102793
102793
  })(Math.log, Math.LN2);
102794
102794
  }
102795
+ if (typeof String.prototype.startsWith === "undefined") {
102796
+ Object.defineProperty(String.prototype, "startsWith", { value: function(searchString, position) {
102797
+ position = position || 0;
102798
+ return this.lastIndexOf(searchString, position) === position;
102799
+ } });
102800
+ }
102795
102801
  if (typeof String.prototype.endsWith === "undefined") {
102796
102802
  Object.defineProperty(String.prototype, "endsWith", { value: function(searchString, position) {
102797
102803
  var subjectString = this.toString();
@@ -102803,12 +102809,6 @@ ${JSON.stringify(message, null, 4)}`);
102803
102809
  return lastIndex !== -1 && lastIndex === position;
102804
102810
  } });
102805
102811
  }
102806
- if (typeof String.prototype.startsWith === "undefined") {
102807
- Object.defineProperty(String.prototype, "startsWith", { value: function(searchString, position) {
102808
- position = position || 0;
102809
- return this.lastIndexOf(searchString, position) === position;
102810
- } });
102811
- }
102812
102812
  var imul_0 = Math.imul;
102813
102813
  var isView = ArrayBuffer.isView;
102814
102814
  var clz32 = Math.clz32;
@@ -184424,7 +184424,7 @@ H\fH\u028F HHHIIII\u0239\u0245\u0255\u0264\u028D\0J\x07 \v\r\x07
184424
184424
  }
184425
184425
  flushPendingCall($this, pendingRootCall, steps);
184426
184426
  if (systemName == null || servicePath == null) {
184427
- var element_9 = new ZflSemanticDiagnostic("Action '" + actionName + "' must declare a service.", Severity_ERROR_getInstance(), sourceRefOf($this, flowName, actionName));
184427
+ var element_9 = new ZflSemanticDiagnostic("Action '" + actionName + "' does not declare a service.", Severity_WARNING_getInstance(), sourceRefOf($this, flowName, actionName));
184428
184428
  diagnostics.j(element_9);
184429
184429
  }
184430
184430
  var tmp_5;
@@ -184879,6 +184879,58 @@ H\fH\u028F HHHIIII\u0239\u0245\u0255\u0264\u028D\0J\x07 \v\r\x07
184879
184879
  }
184880
184880
  }
184881
184881
  }
184882
+ function validateUnreachableActions($this, flowName, commands, policies2) {
184883
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(policies2, 10));
184884
+ var _iterator__ex2g4s = policies2.l();
184885
+ while (_iterator__ex2g4s.m()) {
184886
+ var item = _iterator__ex2g4s.n();
184887
+ var tmp$ret$0 = item.x5v_1;
184888
+ destination.j(tmp$ret$0);
184889
+ }
184890
+ var reachable = toMutableSet(destination);
184891
+ var _iterator__ex2g4s_0 = commands.l();
184892
+ while (_iterator__ex2g4s_0.m()) {
184893
+ var element = _iterator__ex2g4s_0.n();
184894
+ var tmp0 = element.m5w_1;
184895
+ var destination_0 = ArrayList_init_$Create$();
184896
+ var _iterator__ex2g4s_1 = tmp0.l();
184897
+ while (_iterator__ex2g4s_1.m()) {
184898
+ var element_0 = _iterator__ex2g4s_1.n();
184899
+ var list = element_0.z5w_1;
184900
+ addAll(destination_0, list);
184901
+ }
184902
+ var tmp0_0 = plus_0(element.l5w_1, destination_0);
184903
+ var destination_1 = ArrayList_init_$Create$();
184904
+ var _iterator__ex2g4s_2 = tmp0_0.l();
184905
+ while (_iterator__ex2g4s_2.m()) {
184906
+ var element_1 = _iterator__ex2g4s_2.n();
184907
+ if (element_1 instanceof ZflCallStep) {
184908
+ destination_1.j(element_1);
184909
+ }
184910
+ }
184911
+ var _iterator__ex2g4s_3 = destination_1.l();
184912
+ while (_iterator__ex2g4s_3.m()) {
184913
+ var element_2 = _iterator__ex2g4s_3.n();
184914
+ validateUnreachableActions$collect(reachable, element_2);
184915
+ }
184916
+ }
184917
+ var destination_2 = ArrayList_init_$Create$();
184918
+ var _iterator__ex2g4s_4 = commands.l();
184919
+ while (_iterator__ex2g4s_4.m()) {
184920
+ var element_3 = _iterator__ex2g4s_4.n();
184921
+ if (!reachable.r(element_3.d5w_1)) {
184922
+ destination_2.j(element_3);
184923
+ }
184924
+ }
184925
+ var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_2, 10));
184926
+ var _iterator__ex2g4s_5 = destination_2.l();
184927
+ while (_iterator__ex2g4s_5.m()) {
184928
+ var item_0 = _iterator__ex2g4s_5.n();
184929
+ var tmp$ret$15 = new ZflSemanticDiagnostic("Action '" + item_0.d5w_1 + "' is never triggered nor called.", Severity_WARNING_getInstance(), sourceRefOf($this, flowName, item_0.d5w_1));
184930
+ destination_3.j(tmp$ret$15);
184931
+ }
184932
+ return destination_3;
184933
+ }
184882
184934
  function validateWhenTriggers($this, flowName, startNames, whens, declaredEvents) {
184883
184935
  var validTriggers = plus_2(startNames, declaredEvents);
184884
184936
  var diagnostics = ArrayList_init_$Create$();
@@ -184906,7 +184958,7 @@ H\fH\u028F HHHIIII\u0239\u0245\u0255\u0264\u028D\0J\x07 \v\r\x07
184906
184958
  function validateEndOutcomes($this, flowName, endOutcomes2, declaredEndOutcomes) {
184907
184959
  var diagnostics = ArrayList_init_$Create$();
184908
184960
  if (!endOutcomes2.y1("completed")) {
184909
- var element = new ZflSemanticDiagnostic("Flow '" + flowName + "' must define a 'completed' endOutcome.", Severity_ERROR_getInstance(), sourceRefOf($this, flowName, "end"));
184961
+ var element = new ZflSemanticDiagnostic("Flow '" + flowName + "' must define a 'completed' endOutcome.", Severity_WARNING_getInstance(), sourceRefOf($this, flowName, "end"));
184910
184962
  diagnostics.j(element);
184911
184963
  }
184912
184964
  var _iterator__ex2g4s = endOutcomes2.w().l();
@@ -185382,6 +185434,26 @@ H\fH\u028F HHHIIII\u0239\u0245\u0255\u0264\u028D\0J\x07 \v\r\x07
185382
185434
  }
185383
185435
  return toSet_0(plus_0(tmp, destination_1));
185384
185436
  }
185437
+ function validateUnreachableActions$collect(reachable, call2) {
185438
+ var element = call2.d5x_1;
185439
+ reachable.j(element);
185440
+ var _iterator__ex2g4s = call2.f5x_1.l();
185441
+ while (_iterator__ex2g4s.m()) {
185442
+ var element_0 = _iterator__ex2g4s.n();
185443
+ var tmp0_safe_receiver = element_0.n5x_1;
185444
+ if (tmp0_safe_receiver == null)
185445
+ null;
185446
+ else {
185447
+ reachable.j(tmp0_safe_receiver);
185448
+ }
185449
+ var tmp1_safe_receiver = element_0.o5x_1;
185450
+ if (tmp1_safe_receiver == null)
185451
+ null;
185452
+ else {
185453
+ validateUnreachableActions$collect(reachable, tmp1_safe_receiver);
185454
+ }
185455
+ }
185456
+ }
185385
185457
  function ZflSemanticAnalyzer() {
185386
185458
  }
185387
185459
  protoOf(ZflSemanticAnalyzer).z5k = function(model) {
@@ -185683,6 +185755,8 @@ H\fH\u028F HHHIIII\u0239\u0245\u0255\u0264\u028D\0J\x07 \v\r\x07
185683
185755
  addAll(diagnostics, elements);
185684
185756
  var elements_0 = validateCalls(this, flowName, toList_1(commandByName.c2()));
185685
185757
  addAll(diagnostics, elements_0);
185758
+ var elements_1 = validateUnreachableActions(this, flowName, toList_1(commandByName.c2()), policies2);
185759
+ addAll(diagnostics, elements_1);
185686
185760
  var endOutcomes2 = getStringListMap(this, flowModel, "end.endOutcomes");
185687
185761
  var tmp0_elvis_lhs_7 = getStringOrNull(this, flowModel, "end.javadoc");
185688
185762
  var end = new ZflEnd(tmp0_elvis_lhs_7 == null ? getStringOrNull(this, getMap(this, flowModel, "end"), "javadoc") : tmp0_elvis_lhs_7, endOutcomes2, sourceRefOf(this, flowName, "end"));
@@ -185695,8 +185769,8 @@ H\fH\u028F HHHIIII\u0239\u0245\u0255\u0264\u028D\0J\x07 \v\r\x07
185695
185769
  var list = element_14.k5w_1;
185696
185770
  addAll(destination_3, list);
185697
185771
  }
185698
- var elements_1 = validateEndOutcomes(this, flowName, endOutcomes2, plus_2(tmp_18, destination_3));
185699
- addAll(diagnostics, elements_1);
185772
+ var elements_2 = validateEndOutcomes(this, flowName, endOutcomes2, plus_2(tmp_18, destination_3));
185773
+ addAll(diagnostics, elements_2);
185700
185774
  var tmp1_description = getString(this, flowModel, "javadoc");
185701
185775
  var tmp2_options = getStringMap(this, flowModel, "options");
185702
185776
  var tmp3_commands = toList_1(commandByName.c2());
@@ -208435,7 +208509,7 @@ H\fH\u028F HHHIIII\u0239\u0245\u0255\u0264\u028D\0J\x07 \v\r\x07
208435
208509
  tmp = null;
208436
208510
  }
208437
208511
  var factory = tmp;
208438
- new ZenwaveJsLanguageServer(defaultCoreLanguageServer(), connection, "0.1.0-next.18.1", factory).v8k();
208512
+ new ZenwaveJsLanguageServer(defaultCoreLanguageServer(), connection, "0.1.0-next.20.1", factory).v8k();
208439
208513
  }
208440
208514
  function defaultCoreLanguageServer() {
208441
208515
  return new ZenwaveLanguageServer(listOf_0([new ArchitectureManifestLanguageModule(), new ZdlLanguageModule(), Companion_instance_86.d8h(), new AsyncApiLanguageModule(), new OpenApiLanguageModule(), new AvroLanguageModule(), new ZflLanguageModule()]), new InMemoryDocumentSessionStore(), new InMemoryCrossReferenceIndex());
@@ -209205,7 +209279,7 @@ H\fH\u028F HHHIIII\u0239\u0245\u0255\u0264\u028D\0J\x07 \v\r\x07
209205
209279
  };
209206
209280
  }
209207
209281
  function ZenwaveJsLanguageServer(server, connection, serverVersion, createResponseError) {
209208
- serverVersion = serverVersion === VOID ? "0.1.0-next.18.1" : serverVersion;
209282
+ serverVersion = serverVersion === VOID ? "0.1.0-next.20.1" : serverVersion;
209209
209283
  createResponseError = createResponseError === VOID ? null : createResponseError;
209210
209284
  this.n8k_1 = server;
209211
209285
  this.o8k_1 = connection;
@@ -1,4 +1,4 @@
1
- /* @zenwave360/lsp-js 0.1.0-next.18.1 */
1
+ /* @zenwave360/lsp-js 0.1.0-next.20.1 */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -103437,6 +103437,12 @@ if (typeof Math.clz32 === "undefined") {
103437
103437
  };
103438
103438
  })(Math.log, Math.LN2);
103439
103439
  }
103440
+ if (typeof String.prototype.startsWith === "undefined") {
103441
+ Object.defineProperty(String.prototype, "startsWith", { value: function(searchString, position) {
103442
+ position = position || 0;
103443
+ return this.lastIndexOf(searchString, position) === position;
103444
+ } });
103445
+ }
103440
103446
  if (typeof String.prototype.endsWith === "undefined") {
103441
103447
  Object.defineProperty(String.prototype, "endsWith", { value: function(searchString, position) {
103442
103448
  var subjectString = this.toString();
@@ -103448,12 +103454,6 @@ if (typeof String.prototype.endsWith === "undefined") {
103448
103454
  return lastIndex !== -1 && lastIndex === position;
103449
103455
  } });
103450
103456
  }
103451
- if (typeof String.prototype.startsWith === "undefined") {
103452
- Object.defineProperty(String.prototype, "startsWith", { value: function(searchString, position) {
103453
- position = position || 0;
103454
- return this.lastIndexOf(searchString, position) === position;
103455
- } });
103456
- }
103457
103457
  var imul_0 = Math.imul;
103458
103458
  var isView = ArrayBuffer.isView;
103459
103459
  var clz32 = Math.clz32;
@@ -185069,7 +185069,7 @@ function toCommand($this, flowName, actionModel, diagnostics, includeOccurrences
185069
185069
  }
185070
185070
  flushPendingCall($this, pendingRootCall, steps);
185071
185071
  if (systemName == null || servicePath == null) {
185072
- var element_9 = new ZflSemanticDiagnostic("Action '" + actionName + "' must declare a service.", Severity_ERROR_getInstance(), sourceRefOf($this, flowName, actionName));
185072
+ var element_9 = new ZflSemanticDiagnostic("Action '" + actionName + "' does not declare a service.", Severity_WARNING_getInstance(), sourceRefOf($this, flowName, actionName));
185073
185073
  diagnostics.j(element_9);
185074
185074
  }
185075
185075
  var tmp_5;
@@ -185524,6 +185524,58 @@ function validateCall($this, command2, call2, commands, commandNames, flowName,
185524
185524
  }
185525
185525
  }
185526
185526
  }
185527
+ function validateUnreachableActions($this, flowName, commands, policies2) {
185528
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(policies2, 10));
185529
+ var _iterator__ex2g4s = policies2.l();
185530
+ while (_iterator__ex2g4s.m()) {
185531
+ var item = _iterator__ex2g4s.n();
185532
+ var tmp$ret$0 = item.x5v_1;
185533
+ destination.j(tmp$ret$0);
185534
+ }
185535
+ var reachable = toMutableSet(destination);
185536
+ var _iterator__ex2g4s_0 = commands.l();
185537
+ while (_iterator__ex2g4s_0.m()) {
185538
+ var element = _iterator__ex2g4s_0.n();
185539
+ var tmp0 = element.m5w_1;
185540
+ var destination_0 = ArrayList_init_$Create$();
185541
+ var _iterator__ex2g4s_1 = tmp0.l();
185542
+ while (_iterator__ex2g4s_1.m()) {
185543
+ var element_0 = _iterator__ex2g4s_1.n();
185544
+ var list = element_0.z5w_1;
185545
+ addAll(destination_0, list);
185546
+ }
185547
+ var tmp0_0 = plus_0(element.l5w_1, destination_0);
185548
+ var destination_1 = ArrayList_init_$Create$();
185549
+ var _iterator__ex2g4s_2 = tmp0_0.l();
185550
+ while (_iterator__ex2g4s_2.m()) {
185551
+ var element_1 = _iterator__ex2g4s_2.n();
185552
+ if (element_1 instanceof ZflCallStep) {
185553
+ destination_1.j(element_1);
185554
+ }
185555
+ }
185556
+ var _iterator__ex2g4s_3 = destination_1.l();
185557
+ while (_iterator__ex2g4s_3.m()) {
185558
+ var element_2 = _iterator__ex2g4s_3.n();
185559
+ validateUnreachableActions$collect(reachable, element_2);
185560
+ }
185561
+ }
185562
+ var destination_2 = ArrayList_init_$Create$();
185563
+ var _iterator__ex2g4s_4 = commands.l();
185564
+ while (_iterator__ex2g4s_4.m()) {
185565
+ var element_3 = _iterator__ex2g4s_4.n();
185566
+ if (!reachable.r(element_3.d5w_1)) {
185567
+ destination_2.j(element_3);
185568
+ }
185569
+ }
185570
+ var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_2, 10));
185571
+ var _iterator__ex2g4s_5 = destination_2.l();
185572
+ while (_iterator__ex2g4s_5.m()) {
185573
+ var item_0 = _iterator__ex2g4s_5.n();
185574
+ var tmp$ret$15 = new ZflSemanticDiagnostic("Action '" + item_0.d5w_1 + "' is never triggered nor called.", Severity_WARNING_getInstance(), sourceRefOf($this, flowName, item_0.d5w_1));
185575
+ destination_3.j(tmp$ret$15);
185576
+ }
185577
+ return destination_3;
185578
+ }
185527
185579
  function validateWhenTriggers($this, flowName, startNames, whens, declaredEvents) {
185528
185580
  var validTriggers = plus_2(startNames, declaredEvents);
185529
185581
  var diagnostics = ArrayList_init_$Create$();
@@ -185551,7 +185603,7 @@ function validateWhenTriggers($this, flowName, startNames, whens, declaredEvents
185551
185603
  function validateEndOutcomes($this, flowName, endOutcomes2, declaredEndOutcomes) {
185552
185604
  var diagnostics = ArrayList_init_$Create$();
185553
185605
  if (!endOutcomes2.y1("completed")) {
185554
- var element = new ZflSemanticDiagnostic("Flow '" + flowName + "' must define a 'completed' endOutcome.", Severity_ERROR_getInstance(), sourceRefOf($this, flowName, "end"));
185606
+ var element = new ZflSemanticDiagnostic("Flow '" + flowName + "' must define a 'completed' endOutcome.", Severity_WARNING_getInstance(), sourceRefOf($this, flowName, "end"));
185555
185607
  diagnostics.j(element);
185556
185608
  }
185557
185609
  var _iterator__ex2g4s = endOutcomes2.w().l();
@@ -186027,6 +186079,26 @@ function publishedEvents($this, _this__u8e3s4) {
186027
186079
  }
186028
186080
  return toSet_0(plus_0(tmp, destination_1));
186029
186081
  }
186082
+ function validateUnreachableActions$collect(reachable, call2) {
186083
+ var element = call2.d5x_1;
186084
+ reachable.j(element);
186085
+ var _iterator__ex2g4s = call2.f5x_1.l();
186086
+ while (_iterator__ex2g4s.m()) {
186087
+ var element_0 = _iterator__ex2g4s.n();
186088
+ var tmp0_safe_receiver = element_0.n5x_1;
186089
+ if (tmp0_safe_receiver == null)
186090
+ null;
186091
+ else {
186092
+ reachable.j(tmp0_safe_receiver);
186093
+ }
186094
+ var tmp1_safe_receiver = element_0.o5x_1;
186095
+ if (tmp1_safe_receiver == null)
186096
+ null;
186097
+ else {
186098
+ validateUnreachableActions$collect(reachable, tmp1_safe_receiver);
186099
+ }
186100
+ }
186101
+ }
186030
186102
  function ZflSemanticAnalyzer() {
186031
186103
  }
186032
186104
  protoOf(ZflSemanticAnalyzer).z5k = function(model) {
@@ -186328,6 +186400,8 @@ protoOf(ZflSemanticAnalyzer).z5k = function(model) {
186328
186400
  addAll(diagnostics, elements);
186329
186401
  var elements_0 = validateCalls(this, flowName, toList_1(commandByName.c2()));
186330
186402
  addAll(diagnostics, elements_0);
186403
+ var elements_1 = validateUnreachableActions(this, flowName, toList_1(commandByName.c2()), policies2);
186404
+ addAll(diagnostics, elements_1);
186331
186405
  var endOutcomes2 = getStringListMap(this, flowModel, "end.endOutcomes");
186332
186406
  var tmp0_elvis_lhs_7 = getStringOrNull(this, flowModel, "end.javadoc");
186333
186407
  var end = new ZflEnd(tmp0_elvis_lhs_7 == null ? getStringOrNull(this, getMap(this, flowModel, "end"), "javadoc") : tmp0_elvis_lhs_7, endOutcomes2, sourceRefOf(this, flowName, "end"));
@@ -186340,8 +186414,8 @@ protoOf(ZflSemanticAnalyzer).z5k = function(model) {
186340
186414
  var list = element_14.k5w_1;
186341
186415
  addAll(destination_3, list);
186342
186416
  }
186343
- var elements_1 = validateEndOutcomes(this, flowName, endOutcomes2, plus_2(tmp_18, destination_3));
186344
- addAll(diagnostics, elements_1);
186417
+ var elements_2 = validateEndOutcomes(this, flowName, endOutcomes2, plus_2(tmp_18, destination_3));
186418
+ addAll(diagnostics, elements_2);
186345
186419
  var tmp1_description = getString(this, flowModel, "javadoc");
186346
186420
  var tmp2_options = getStringMap(this, flowModel, "options");
186347
186421
  var tmp3_commands = toList_1(commandByName.c2());
@@ -209080,7 +209154,7 @@ function startZenwaveLanguageServer(connection2, createResponseError) {
209080
209154
  tmp = null;
209081
209155
  }
209082
209156
  var factory = tmp;
209083
- new ZenwaveJsLanguageServer(defaultCoreLanguageServer(), connection2, "0.1.0-next.18.1", factory).v8k();
209157
+ new ZenwaveJsLanguageServer(defaultCoreLanguageServer(), connection2, "0.1.0-next.20.1", factory).v8k();
209084
209158
  }
209085
209159
  function defaultCoreLanguageServer() {
209086
209160
  return new ZenwaveLanguageServer(listOf_0([new ArchitectureManifestLanguageModule(), new ZdlLanguageModule(), Companion_instance_86.d8h(), new AsyncApiLanguageModule(), new OpenApiLanguageModule(), new AvroLanguageModule(), new ZflLanguageModule()]), new InMemoryDocumentSessionStore(), new InMemoryCrossReferenceIndex());
@@ -209850,7 +209924,7 @@ function ZenwaveJsLanguageServer$listen$lambda_10(this$0) {
209850
209924
  };
209851
209925
  }
209852
209926
  function ZenwaveJsLanguageServer(server, connection2, serverVersion, createResponseError) {
209853
- serverVersion = serverVersion === VOID ? "0.1.0-next.18.1" : serverVersion;
209927
+ serverVersion = serverVersion === VOID ? "0.1.0-next.20.1" : serverVersion;
209854
209928
  createResponseError = createResponseError === VOID ? null : createResponseError;
209855
209929
  this.n8k_1 = server;
209856
209930
  this.o8k_1 = connection2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenwave360/lsp-js",
3
- "version": "0.1.0-next.18.1",
3
+ "version": "0.1.0-next.20.1",
4
4
  "description": "ZenWave language server (ZDL, ZFL, architecture manifest, AsyncAPI, OpenAPI, Avro) for Node and Web Workers",
5
5
  "keywords": [
6
6
  "zenwave",