@eclipse-glsp/server 1.1.0-RC08 → 1.1.0-RC09

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 (101) hide show
  1. package/package.json +4 -4
  2. package/lib/common/actions/action-dispatcher.spec.d.ts +0 -2
  3. package/lib/common/actions/action-dispatcher.spec.d.ts.map +0 -1
  4. package/lib/common/actions/action-dispatcher.spec.js +0 -264
  5. package/lib/common/actions/action-dispatcher.spec.js.map +0 -1
  6. package/lib/common/actions/action-handler-registry.spec.d.ts +0 -2
  7. package/lib/common/actions/action-handler-registry.spec.d.ts.map +0 -1
  8. package/lib/common/actions/action-handler-registry.spec.js +0 -50
  9. package/lib/common/actions/action-handler-registry.spec.js.map +0 -1
  10. package/lib/common/actions/global-action-provider.spec.d.ts +0 -2
  11. package/lib/common/actions/global-action-provider.spec.d.ts.map +0 -1
  12. package/lib/common/actions/global-action-provider.spec.js +0 -70
  13. package/lib/common/actions/global-action-provider.spec.js.map +0 -1
  14. package/lib/common/command/command-stack.spec.d.ts +0 -2
  15. package/lib/common/command/command-stack.spec.d.ts.map +0 -1
  16. package/lib/common/command/command-stack.spec.js +0 -207
  17. package/lib/common/command/command-stack.spec.js.map +0 -1
  18. package/lib/common/command/command.spec.d.ts +0 -2
  19. package/lib/common/command/command.spec.d.ts.map +0 -1
  20. package/lib/common/command/command.spec.js +0 -86
  21. package/lib/common/command/command.spec.js.map +0 -1
  22. package/lib/common/command/recording-command.spec.d.ts +0 -17
  23. package/lib/common/command/recording-command.spec.d.ts.map +0 -1
  24. package/lib/common/command/recording-command.spec.js +0 -62
  25. package/lib/common/command/recording-command.spec.js.map +0 -1
  26. package/lib/common/di/binding-target.spec.d.ts +0 -2
  27. package/lib/common/di/binding-target.spec.d.ts.map +0 -1
  28. package/lib/common/di/binding-target.spec.js +0 -121
  29. package/lib/common/di/binding-target.spec.js.map +0 -1
  30. package/lib/common/di/multi-bindings.spec.d.ts +0 -2
  31. package/lib/common/di/multi-bindings.spec.d.ts.map +0 -1
  32. package/lib/common/di/multi-bindings.spec.js +0 -137
  33. package/lib/common/di/multi-bindings.spec.js.map +0 -1
  34. package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts +0 -2
  35. package/lib/common/diagram/request-type-hints-action-handler.spec.d.ts.map +0 -1
  36. package/lib/common/diagram/request-type-hints-action-handler.spec.js +0 -57
  37. package/lib/common/diagram/request-type-hints-action-handler.spec.js.map +0 -1
  38. package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts +0 -2
  39. package/lib/common/features/contextactions/context-actions-provider-registry.spec.d.ts.map +0 -1
  40. package/lib/common/features/contextactions/context-actions-provider-registry.spec.js +0 -34
  41. package/lib/common/features/contextactions/context-actions-provider-registry.spec.js.map +0 -1
  42. package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts +0 -2
  43. package/lib/common/features/contextactions/request-context-actions-handler.spec.d.ts.map +0 -1
  44. package/lib/common/features/contextactions/request-context-actions-handler.spec.js +0 -63
  45. package/lib/common/features/contextactions/request-context-actions-handler.spec.js.map +0 -1
  46. package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts +0 -2
  47. package/lib/common/features/contextactions/tool-palette-item-provider.spec.d.ts.map +0 -1
  48. package/lib/common/features/contextactions/tool-palette-item-provider.spec.js +0 -48
  49. package/lib/common/features/contextactions/tool-palette-item-provider.spec.js.map +0 -1
  50. package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts +0 -2
  51. package/lib/common/features/directediting/context-edit-validator-registry.spec.d.ts.map +0 -1
  52. package/lib/common/features/directediting/context-edit-validator-registry.spec.js +0 -44
  53. package/lib/common/features/directediting/context-edit-validator-registry.spec.js.map +0 -1
  54. package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts +0 -2
  55. package/lib/common/features/directediting/request-edit-validation-handler.spec.d.ts.map +0 -1
  56. package/lib/common/features/directediting/request-edit-validation-handler.spec.js +0 -97
  57. package/lib/common/features/directediting/request-edit-validation-handler.spec.js.map +0 -1
  58. package/lib/common/features/model/gmodel-serializer.spec.d.ts +0 -2
  59. package/lib/common/features/model/gmodel-serializer.spec.d.ts.map +0 -1
  60. package/lib/common/features/model/gmodel-serializer.spec.js +0 -124
  61. package/lib/common/features/model/gmodel-serializer.spec.js.map +0 -1
  62. package/lib/common/operations/operation-handler-registry.spec.d.ts +0 -2
  63. package/lib/common/operations/operation-handler-registry.spec.d.ts.map +0 -1
  64. package/lib/common/operations/operation-handler-registry.spec.js +0 -50
  65. package/lib/common/operations/operation-handler-registry.spec.js.map +0 -1
  66. package/lib/common/protocol/glsp-server.spec.d.ts +0 -2
  67. package/lib/common/protocol/glsp-server.spec.d.ts.map +0 -1
  68. package/lib/common/protocol/glsp-server.spec.js +0 -132
  69. package/lib/common/protocol/glsp-server.spec.js.map +0 -1
  70. package/lib/common/session/client-session-factory.spec.d.ts +0 -2
  71. package/lib/common/session/client-session-factory.spec.d.ts.map +0 -1
  72. package/lib/common/session/client-session-factory.spec.js +0 -56
  73. package/lib/common/session/client-session-factory.spec.js.map +0 -1
  74. package/lib/common/session/client-session-manager.spec.d.ts +0 -2
  75. package/lib/common/session/client-session-manager.spec.d.ts.map +0 -1
  76. package/lib/common/session/client-session-manager.spec.js +0 -74
  77. package/lib/common/session/client-session-manager.spec.js.map +0 -1
  78. package/lib/common/test/mock-util.d.ts +0 -120
  79. package/lib/common/test/mock-util.d.ts.map +0 -1
  80. package/lib/common/test/mock-util.js +0 -216
  81. package/lib/common/test/mock-util.js.map +0 -1
  82. package/lib/common/utils/promise-queue.spec.d.ts +0 -2
  83. package/lib/common/utils/promise-queue.spec.d.ts.map +0 -1
  84. package/lib/common/utils/promise-queue.spec.js +0 -117
  85. package/lib/common/utils/promise-queue.spec.js.map +0 -1
  86. package/lib/common/utils/registry.spec.d.ts +0 -2
  87. package/lib/common/utils/registry.spec.d.ts.map +0 -1
  88. package/lib/common/utils/registry.spec.js +0 -199
  89. package/lib/common/utils/registry.spec.js.map +0 -1
  90. package/lib/node/launch/cli-parser.spec.d.ts +0 -2
  91. package/lib/node/launch/cli-parser.spec.d.ts.map +0 -1
  92. package/lib/node/launch/cli-parser.spec.js +0 -56
  93. package/lib/node/launch/cli-parser.spec.js.map +0 -1
  94. package/lib/node/launch/socket-cli-parser.spec.d.ts +0 -2
  95. package/lib/node/launch/socket-cli-parser.spec.d.ts.map +0 -1
  96. package/lib/node/launch/socket-cli-parser.spec.js +0 -66
  97. package/lib/node/launch/socket-cli-parser.spec.js.map +0 -1
  98. package/lib/node/launch/socket-server-launcher.spec.d.ts +0 -17
  99. package/lib/node/launch/socket-server-launcher.spec.d.ts.map +0 -1
  100. package/lib/node/launch/socket-server-launcher.spec.js +0 -75
  101. package/lib/node/launch/socket-server-launcher.spec.js.map +0 -1
@@ -1,199 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /********************************************************************************
4
- * Copyright (c) 2022-2023 STMicroelectronics and others.
5
- *
6
- * This program and the accompanying materials are made available under the
7
- * terms of the Eclipse Public License v. 2.0 which is available at
8
- * http://www.eclipse.org/legal/epl-2.0.
9
- *
10
- * This Source Code may also be made available under the following Secondary
11
- * Licenses when the conditions for such availability set forth in the Eclipse
12
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
13
- * with the GNU Classpath Exception which is available at
14
- * https://www.gnu.org/software/classpath/license.html.
15
- *
16
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17
- ********************************************************************************/
18
- const registry_1 = require("./registry");
19
- const chai_1 = require("chai");
20
- describe('Test Registry', () => {
21
- let registry;
22
- beforeEach(() => {
23
- registry = new registry_1.Registry();
24
- });
25
- it('register - with new key-value pair', () => {
26
- const key = 'key';
27
- const value = 'value';
28
- (0, chai_1.expect)(registry.register(key, value)).true;
29
- (0, chai_1.expect)(registry.get(key), value);
30
- });
31
- it('register - with key-value pair with a already registered key', () => {
32
- // Setup
33
- const key = 'key';
34
- const value = 'value';
35
- (0, chai_1.expect)(registry.register(key, value)).true;
36
- // Test execution
37
- (0, chai_1.expect)(registry.register(key, 'newValue')).false;
38
- (0, chai_1.expect)(registry.get(key), value);
39
- });
40
- it('deregister - with registered key', () => {
41
- // Setup
42
- const key = 'key';
43
- const value = 'value';
44
- (0, chai_1.expect)(registry.register(key, value)).true;
45
- // Test execution
46
- (0, chai_1.expect)(registry.deregister(key)).true;
47
- (0, chai_1.expect)(registry.get(key), undefined);
48
- });
49
- it('deregister - with unregistered key', () => {
50
- (0, chai_1.expect)(registry.deregister('unregisteredKey')).false;
51
- });
52
- it('haskey - with registered key', () => {
53
- // Setup
54
- const key = 'key';
55
- const value = 'value';
56
- (0, chai_1.expect)(registry.register(key, value)).true;
57
- // Test execution
58
- (0, chai_1.expect)(registry.hasKey(key)).true;
59
- });
60
- it('haskey - with unregistered key', () => {
61
- (0, chai_1.expect)(registry.deregister('unregisteredKey')).false;
62
- });
63
- it('get - with registered key', () => {
64
- // Setup
65
- const key = 'key';
66
- const value = 'value';
67
- (0, chai_1.expect)(registry.register(key, value)).true;
68
- // Test execution
69
- (0, chai_1.expect)(registry.get(key), value);
70
- });
71
- it('get - with unregistered key', () => {
72
- (0, chai_1.expect)(registry.get('unregisteredKey'), undefined);
73
- });
74
- it('getAll - should return three values', () => {
75
- // Setup
76
- const e1 = { key: 'key1', value: 'value1' };
77
- const e2 = { key: 'key2', value: 'value2' };
78
- const e3 = { key: 'key3', value: 'value3' };
79
- registry.register(e1.key, e1.value);
80
- registry.register(e2.key, e2.value);
81
- registry.register(e3.key, e3.value);
82
- // Test execution
83
- const result = registry.getAll();
84
- (0, chai_1.expect)(result).to.have.length(3);
85
- (0, chai_1.expect)(result.includes(e1.value)).true;
86
- (0, chai_1.expect)(result.includes(e2.value)).true;
87
- (0, chai_1.expect)(result.includes(e3.value)).true;
88
- });
89
- it('keys - should return three keys', () => {
90
- // Setup
91
- const e1 = { key: 'key1', value: 'value1' };
92
- const e2 = { key: 'key2', value: 'value2' };
93
- const e3 = { key: 'key3', value: 'value3' };
94
- registry.register(e1.key, e1.value);
95
- registry.register(e2.key, e2.value);
96
- registry.register(e3.key, e3.value);
97
- // Test execution
98
- const result = registry.keys();
99
- (0, chai_1.expect)(result).to.have.length(3);
100
- (0, chai_1.expect)(result.includes(e1.key)).true;
101
- (0, chai_1.expect)(result.includes(e2.key)).true;
102
- (0, chai_1.expect)(result.includes(e3.key)).true;
103
- });
104
- });
105
- describe('Test MapMultiRegistry', () => {
106
- let multiRegistry;
107
- beforeEach(() => {
108
- multiRegistry = new registry_1.MultiRegistry();
109
- });
110
- it('register - with new key-value pair', () => {
111
- // Setup
112
- const e1 = { key: 'key', value: 'value' };
113
- const e2 = { key: e1.key, value: 'value2' };
114
- multiRegistry.register(e1.key, e1.value);
115
- multiRegistry.register(e2.key, e2.value);
116
- const resultValue = multiRegistry.get(e1.key);
117
- (0, chai_1.expect)(resultValue).to.not.be.undefined;
118
- (0, chai_1.expect)(resultValue.length).to.be.equal(2);
119
- (0, chai_1.expect)(resultValue.includes(e1.value)).true;
120
- (0, chai_1.expect)(resultValue.includes(e2.value)).true;
121
- });
122
- it('deregister - with registered key', () => {
123
- // Setup
124
- const key = 'key';
125
- const existingValue = ['value', 'value2'];
126
- multiRegistry.register(key, existingValue[0]);
127
- multiRegistry.register(key, existingValue[1]);
128
- // Test execution
129
- (0, chai_1.expect)(multiRegistry.deregister(key, existingValue[1])).true;
130
- const result = multiRegistry.get(key);
131
- (0, chai_1.expect)(result.length).to.be.equal(1);
132
- (0, chai_1.expect)(result[0], existingValue[0]);
133
- });
134
- it('deregister - with unregistered key', () => {
135
- (0, chai_1.expect)(multiRegistry.deregister('unregisteredKey', 'someValue')).false;
136
- });
137
- it('deregisterAll - with registered key', () => {
138
- // Setup
139
- const key = 'key';
140
- const existingValue = ['value', 'value2'];
141
- multiRegistry.register(key, existingValue[0]);
142
- multiRegistry.register(key, existingValue[1]);
143
- (0, chai_1.expect)(multiRegistry.deregisterAll(key)).true;
144
- (0, chai_1.expect)(multiRegistry.get(key)).to.have.length(0);
145
- });
146
- it('deregisterAll - with unregistered key', () => {
147
- (0, chai_1.expect)(multiRegistry.deregisterAll('unregisteredKey')).false;
148
- });
149
- it('haskey - with registered key', () => {
150
- // Setup
151
- const key = 'key';
152
- const existingValue = 'value';
153
- multiRegistry.register(key, existingValue);
154
- // Test execution
155
- (0, chai_1.expect)(multiRegistry.hasKey(key)).true;
156
- });
157
- it('haskey - with unregistered key', () => {
158
- (0, chai_1.expect)(multiRegistry.hasKey('unregisteredKey')).false;
159
- });
160
- it('get - with registered key', () => {
161
- // Setup
162
- const key = 'key';
163
- const existingValue = 'value';
164
- multiRegistry.register(key, existingValue);
165
- // Test execution
166
- (0, chai_1.expect)(multiRegistry.get(key).length).to.be.equal(1);
167
- (0, chai_1.expect)(multiRegistry.get(key).includes(existingValue)).true;
168
- });
169
- it('get - with unregistered key', () => {
170
- (0, chai_1.expect)(multiRegistry.get('unregisteredKey')).to.have.length(0);
171
- });
172
- it('getAll', () => {
173
- // Setup
174
- const e1 = { key: 'key1', value: ['value1', 'value2'] };
175
- const e2 = { key: 'key2', value: ['value3'] };
176
- multiRegistry.register(e1.key, e1.value[0]);
177
- multiRegistry.register(e1.key, e1.value[1]);
178
- multiRegistry.register(e2.key, e2.value[0]);
179
- // Test execution
180
- const result = multiRegistry.getAll();
181
- (0, chai_1.expect)(result).to.have.length(3);
182
- (0, chai_1.expect)(e1.value.every(v => result.includes(v))).true;
183
- (0, chai_1.expect)(e2.value.every(v => result.includes(v))).true;
184
- });
185
- it('keys', () => {
186
- // Setup
187
- const e1 = { key: 'key1', value: ['value1', 'value2'] };
188
- const e2 = { key: 'key2', value: ['value3'] };
189
- multiRegistry.register(e1.key, e1.value[0]);
190
- multiRegistry.register(e1.key, e1.value[1]);
191
- multiRegistry.register(e2.key, e2.value[0]);
192
- // Test execution
193
- const result = multiRegistry.keys();
194
- (0, chai_1.expect)(result.length).to.be.equal(2);
195
- (0, chai_1.expect)(result.includes(e1.key)).true;
196
- (0, chai_1.expect)(result.includes(e2.key)).true;
197
- });
198
- });
199
- //# sourceMappingURL=registry.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.spec.js","sourceRoot":"","sources":["../../../src/common/utils/registry.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAqD;AACrD,+BAA8B;AAE9B,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC3B,IAAI,QAAkC,CAAC;IAEvC,UAAU,CAAC,GAAG,EAAE;QACZ,QAAQ,GAAG,IAAI,mBAAQ,EAAE,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC1C,MAAM,GAAG,GAAG,KAAK,CAAC;QAClB,MAAM,KAAK,GAAG,OAAO,CAAC;QACtB,IAAA,aAAM,EAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3C,IAAA,aAAM,EAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACrE,QAAQ;QACR,MAAM,GAAG,GAAG,KAAK,CAAC;QAClB,MAAM,KAAK,GAAG,OAAO,CAAC;QACtB,IAAA,aAAM,EAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3C,iBAAiB;QACjB,IAAA,aAAM,EAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;QACjD,IAAA,aAAM,EAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,GAAG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CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;QACZ,QAAQ;QACR,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;QACxD,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9C,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,iBAAiB;QACjB,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC;QACpC,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACrC,IAAA,aAAM,EAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QACrC,IAAA,aAAM,EAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IACzC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cli-parser.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli-parser.spec.d.ts","sourceRoot":"","sources":["../../../src/node/launch/cli-parser.spec.ts"],"names":[],"mappings":""}
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /********************************************************************************
4
- * Copyright (c) 2022-2023 STMicroelectronics and others.
5
- *
6
- * This program and the accompanying materials are made available under the
7
- * terms of the Eclipse Public License v. 2.0 which is available at
8
- * http://www.eclipse.org/legal/epl-2.0.
9
- *
10
- * This Source Code may also be made available under the following Secondary
11
- * Licenses when the conditions for such availability set forth in the Eclipse
12
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
13
- * with the GNU Classpath Exception which is available at
14
- * https://www.gnu.org/software/classpath/license.html.
15
- *
16
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17
- ********************************************************************************/
18
- const chai_1 = require("chai");
19
- const path = require("path");
20
- const logger_1 = require("../../common/utils/logger");
21
- const cli_parser_1 = require("./cli-parser");
22
- describe('test createCliParser', () => {
23
- const parser = (0, cli_parser_1.createCliParser)();
24
- parser.command.exitOverride();
25
- const argv = ['/usr/bin/node', 'test'];
26
- it('parse - no args', () => {
27
- const options = parser.parse(argv);
28
- (0, chai_1.expect)(options).to.deep.equal(cli_parser_1.defaultLaunchOptions);
29
- });
30
- it('parse - invalid log dir', () => {
31
- (0, chai_1.expect)(() => parser.parse([...argv, '--logDir', 'invalid.Path'])).to.throw();
32
- });
33
- it('parse - valid log dir', () => {
34
- const logDir = path.resolve('../customLog');
35
- const result = parser.parse([...argv, '--logDir', '../customLog/']);
36
- (0, chai_1.expect)(result.logDir, logDir);
37
- });
38
- it('parse - invalid logLevel', () => {
39
- (0, chai_1.expect)(() => parser.parse([...argv, '--logLevel', 'someRandomLevel'])).to.throw();
40
- });
41
- it('parse - valid logLevel', () => {
42
- const result = parser.parse([...argv, '--logLevel', 'error']);
43
- (0, chai_1.expect)(result.logLevel).to.be.equal(logger_1.LogLevel.error);
44
- });
45
- it('parse- no args with custom default options', () => {
46
- const options = {
47
- logDir: '.myLogDir',
48
- logLevel: logger_1.LogLevel.debug,
49
- consoleLog: false,
50
- fileLog: true
51
- };
52
- const result = (0, cli_parser_1.createCliParser)(options).parse(argv);
53
- (0, chai_1.expect)(result).to.deep.equal(options);
54
- });
55
- });
56
- //# sourceMappingURL=cli-parser.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli-parser.spec.js","sourceRoot":"","sources":["../../../src/node/launch/cli-parser.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+BAA8B;AAC9B,6BAA6B;AAC7B,sDAAqD;AACrD,6CAAqE;AAErE,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IAClC,MAAM,MAAM,GAAG,IAAA,4BAAe,GAAE,CAAC;IAEjC,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;IAC9B,MAAM,IAAI,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAEvC,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;QACvB,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACnC,IAAA,aAAM,EAAC,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,iCAAoB,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;QAC/B,IAAA,aAAM,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACjF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAC5C,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC;QACpE,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAChC,IAAA,aAAM,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,EAAE,YAAY,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACtF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;QAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC;QAC9D,IAAA,aAAM,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QAClD,MAAM,OAAO,GAAG;YACZ,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,iBAAQ,CAAC,KAAK;YACxB,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,IAAI;SAChB,CAAC;QACF,MAAM,MAAM,GAAG,IAAA,4BAAe,EAAC,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpD,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=socket-cli-parser.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"socket-cli-parser.spec.d.ts","sourceRoot":"","sources":["../../../src/node/launch/socket-cli-parser.spec.ts"],"names":[],"mappings":""}
@@ -1,66 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /********************************************************************************
4
- * Copyright (c) 2022-2023 STMicroelectronics and others.
5
- *
6
- * This program and the accompanying materials are made available under the
7
- * terms of the Eclipse Public License v. 2.0 which is available at
8
- * http://www.eclipse.org/legal/epl-2.0.
9
- *
10
- * This Source Code may also be made available under the following Secondary
11
- * Licenses when the conditions for such availability set forth in the Eclipse
12
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
13
- * with the GNU Classpath Exception which is available at
14
- * https://www.gnu.org/software/classpath/license.html.
15
- *
16
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17
- ********************************************************************************/
18
- const chai_1 = require("chai");
19
- const logger_1 = require("../../common/utils/logger");
20
- const socket_cli_parser_1 = require("./socket-cli-parser");
21
- describe('test createCliParser', () => {
22
- const parser = (0, socket_cli_parser_1.createSocketCliParser)();
23
- parser.command.exitOverride();
24
- const argv = ['/usr/bin/node', 'test'];
25
- it('parse - no args', () => {
26
- const options = parser.parse(argv);
27
- (0, chai_1.expect)(options).to.deep.equal(socket_cli_parser_1.defaultSocketLaunchOptions);
28
- });
29
- it('parse - invalid port (below lower range)', () => {
30
- (0, chai_1.expect)(() => parser.parse([...argv, '--port', '-1'])).to.throw();
31
- });
32
- it('parse - invalid port (below upper range)', () => {
33
- (0, chai_1.expect)(() => parser.parse([...argv, '--port', '65536'])).to.throw();
34
- });
35
- it('parse - valid port', () => {
36
- const port = 3000;
37
- const result = parser.parse([...argv, '--port', '3000']);
38
- (0, chai_1.expect)(result.port).to.equal(port);
39
- });
40
- it('parse - --no-consoleLog', () => {
41
- const result = parser.parse([...argv, '--no-consoleLog']);
42
- (0, chai_1.expect)(result.consoleLog).false;
43
- });
44
- it('parse - --fileLog', () => {
45
- const result = parser.parse([...argv, '--fileLog']);
46
- (0, chai_1.expect)(result.fileLog).true;
47
- });
48
- it('parse - custom host name', () => {
49
- const host = 'docker.internal';
50
- const result = parser.parse([...argv, '--host', host]);
51
- (0, chai_1.expect)(result.host, host);
52
- });
53
- it('parse- no args with custom default options', () => {
54
- const options = {
55
- logDir: '.myLogDir',
56
- logLevel: logger_1.LogLevel.debug,
57
- consoleLog: true,
58
- fileLog: true,
59
- host: 'myHost',
60
- port: 3000
61
- };
62
- const result = (0, socket_cli_parser_1.createSocketCliParser)(options).parse(argv);
63
- (0, chai_1.expect)(result).to.deep.equal(options);
64
- });
65
- });
66
- //# sourceMappingURL=socket-cli-parser.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"socket-cli-parser.spec.js","sourceRoot":"","sources":["../../../src/node/launch/socket-cli-parser.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,+BAA8B;AAC9B,sDAAqD;AACrD,2DAA6G;AAE7G,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IAClC,MAAM,MAAM,GAAG,IAAA,yCAAqB,GAAE,CAAC;IAEvC,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;IAC9B,MAAM,IAAI,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAEvC,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;QACvB,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACnC,IAAA,aAAM,EAAC,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,8CAA0B,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAChD,IAAA,aAAM,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACrE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAChD,IAAA,aAAM,EAAC,G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EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QAClD,MAAM,OAAO,GAAwB;YACjC,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,iBAAQ,CAAC,KAAK;YACxB,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,IAAI;SACb,CAAC;QACF,MAAM,MAAM,GAAG,IAAA,yCAAqB,EAAC,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,17 +0,0 @@
1
- /********************************************************************************
2
- * Copyright (c) 2022-2023 STMicroelectronics and others.
3
- *
4
- * This program and the accompanying materials are made available under the
5
- * terms of the Eclipse Public License v. 2.0 which is available at
6
- * http://www.eclipse.org/legal/epl-2.0.
7
- *
8
- * This Source Code may also be made available under the following Secondary
9
- * Licenses when the conditions for such availability set forth in the Eclipse
10
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- * with the GNU Classpath Exception which is available at
12
- * https://www.gnu.org/software/classpath/license.html.
13
- *
14
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
- ********************************************************************************/
16
- export {};
17
- //# sourceMappingURL=socket-server-launcher.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"socket-server-launcher.spec.d.ts","sourceRoot":"","sources":["../../../src/node/launch/socket-server-launcher.spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF"}
@@ -1,75 +0,0 @@
1
- "use strict";
2
- /********************************************************************************
3
- * Copyright (c) 2022-2023 STMicroelectronics and others.
4
- *
5
- * This program and the accompanying materials are made available under the
6
- * terms of the Eclipse Public License v. 2.0 which is available at
7
- * http://www.eclipse.org/legal/epl-2.0.
8
- *
9
- * This Source Code may also be made available under the following Secondary
10
- * Licenses when the conditions for such availability set forth in the Eclipse
11
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- * with the GNU Classpath Exception which is available at
13
- * https://www.gnu.org/software/classpath/license.html.
14
- *
15
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
- ********************************************************************************/
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const protocol_1 = require("@eclipse-glsp/protocol");
19
- const chai_1 = require("chai");
20
- const inversify_1 = require("inversify");
21
- const net = require("net");
22
- const sinon = require("sinon");
23
- const glsp_server_1 = require("../../common/protocol/glsp-server");
24
- const app_module_1 = require("../di/app-module");
25
- const socket_cli_parser_1 = require("./socket-cli-parser");
26
- const socket_server_launcher_1 = require("./socket-server-launcher");
27
- const severPort = 5008;
28
- describe('test SocketServerLauncher', () => {
29
- it('starts and stops', async () => {
30
- const appContainer = new inversify_1.Container();
31
- const serverStub = sinon.createStubInstance(glsp_server_1.DefaultGLSPServer);
32
- appContainer.load((0, app_module_1.createAppModule)(socket_cli_parser_1.defaultSocketLaunchOptions));
33
- appContainer.bind(protocol_1.GLSPServer).toConstantValue(serverStub);
34
- const launcher = appContainer.resolve(socket_server_launcher_1.SocketServerLauncher);
35
- launcher.start({ port: severPort });
36
- const sockStart = new net.Socket();
37
- sockStart.setTimeout(100);
38
- const startPromise = new Promise(res => {
39
- sockStart
40
- .on('connect', () => {
41
- (0, chai_1.expect)(true);
42
- sockStart.destroy();
43
- res(true);
44
- })
45
- .on('error', e => {
46
- chai_1.expect.fail('Server is not reachable: ' + e.message);
47
- })
48
- .on('timeout', () => {
49
- chai_1.expect.fail('Connection time outed.');
50
- })
51
- .connect(severPort);
52
- });
53
- await startPromise;
54
- launcher.shutdown();
55
- const sockStop = new net.Socket();
56
- sockStop.setTimeout(100);
57
- const stopPromise = new Promise(res => {
58
- sockStop
59
- .on('connect', () => {
60
- chai_1.expect.fail('Server still reachable.');
61
- })
62
- .on('error', () => {
63
- (0, chai_1.expect)(true);
64
- sockStop.destroy();
65
- res(true);
66
- })
67
- .on('timeout', () => {
68
- chai_1.expect.fail('Connection time outed.');
69
- })
70
- .connect(severPort);
71
- });
72
- await stopPromise;
73
- });
74
- });
75
- //# sourceMappingURL=socket-server-launcher.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"socket-server-launcher.spec.js","sourceRoot":"","sources":["../../../src/node/launch/socket-server-launcher.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;AAElF,qDAAoD;AACpD,+BAA8B;AAC9B,yCAAsC;AACtC,2BAA2B;AAC3B,+BAA+B;AAC/B,mEAAsE;AACtE,iDAAmD;AACnD,2DAAiE;AACjE,qEAAgE;AAChE,MAAM,SAAS,GAAG,IAAI,CAAC;AACvB,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,kBAAkB,EAAE,KAAK,IAAI,EAAE;QAC9B,MAAM,YAAY,GAAG,IAAI,qBAAS,EAAE,CAAC;QACrC,MAAM,UAAU,GAAG,KAAK,CAAC,kBAAkB,CAAC,+BAAiB,CAAC,CAAC;QAC/D,YAAY,CAAC,IAAI,CAAC,IAAA,4BAAe,EAAC,8CAA0B,CAAC,CAAC,CAAC;QAE/D,YAAY,CAAC,IAAI,CAAC,qBAAU,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAC1D,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,6CAAoB,CAAC,CAAC;QAC5D,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;QACpC,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QACnC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAC1B,MAAM,YAAY,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;YACnC,SAAS;iBAC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