cosmos 4.4.1-java → 4.5.2-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build_v4.yml +33 -0
  3. data/Dockerfile +10 -4
  4. data/Gemfile +1 -1
  5. data/Manifest.txt +26 -2
  6. data/README.md +4 -1
  7. data/Rakefile +33 -27
  8. data/autohotkey/tools/cmd_extractor.ahk +11 -9
  9. data/autohotkey/tools/cmd_sender.ahk +1 -1
  10. data/autohotkey/tools/cmd_sequence.ahk +1 -1
  11. data/autohotkey/tools/data_viewer.ahk +1 -1
  12. data/autohotkey/tools/limits_monitor.ahk +1 -1
  13. data/autohotkey/tools/packet_viewer.ahk +1 -1
  14. data/autohotkey/tools/script_runner.ahk +1 -1
  15. data/autohotkey/tools/test_runner2.ahk +1 -1
  16. data/autohotkey/tools/tlm_grapher.ahk +1 -1
  17. data/autohotkey/tools/tlm_grapher3.ahk +1 -1
  18. data/autohotkey/tools/tlm_viewer.ahk +1 -1
  19. data/autohotkey/tools/tlm_viewer2.ahk +1 -1
  20. data/autohotkey/tools/tlm_viewer5.ahk +1 -1
  21. data/bin/rubysloc +73 -28
  22. data/bin/xtce_converter +1 -1
  23. data/cosmos.gemspec +6 -12
  24. data/data/config/interface_modifiers.yaml +3 -2
  25. data/data/config/system.yaml +81 -24
  26. data/data/crc.txt +435 -435
  27. data/demo/Rakefile +4 -4
  28. data/demo/config/data/crc.txt +250 -250
  29. data/demo/config/system/system.txt +15 -7
  30. data/demo/config/system/system2.txt +15 -7
  31. data/demo/config/system/system_alt_ports.txt +15 -7
  32. data/demo/config/targets/INST/cmd_tlm/inst_cmds.txt +1 -1
  33. data/demo/config/tools/handbook_creator/default_toc.xsl +59 -59
  34. data/ext/cosmos/ext/buffered_file/buffered_file.c +2 -2
  35. data/ext/cosmos/ext/config_parser/config_parser.c +1 -2
  36. data/ext/cosmos/ext/line_graph/line_graph.c +53 -94
  37. data/ext/cosmos/ext/packet/packet.c +0 -6
  38. data/ext/cosmos/ext/platform/platform.c +56 -21
  39. data/ext/cosmos/ext/polynomial_conversion/polynomial_conversion.c +4 -8
  40. data/ext/cosmos/ext/structure/structure.c +12 -0
  41. data/extensions/vscode/.gitignore +4 -0
  42. data/extensions/vscode/.vscode/launch.json +32 -0
  43. data/extensions/vscode/.vscode/settings.json +13 -0
  44. data/extensions/vscode/.vscode/tasks.json +79 -0
  45. data/extensions/vscode/License.txt +879 -0
  46. data/extensions/vscode/README.md +9 -0
  47. data/extensions/vscode/client/License.txt +879 -0
  48. data/extensions/vscode/client/README.md +39 -0
  49. data/extensions/vscode/client/cosmos.configuration.json +23 -0
  50. data/extensions/vscode/client/images/icon.png +0 -0
  51. data/extensions/vscode/client/package-lock.json +414 -0
  52. data/extensions/vscode/client/package.json +105 -0
  53. data/extensions/vscode/client/src/extension.ts +132 -0
  54. data/extensions/vscode/client/src/screen_preview.rb +25 -0
  55. data/extensions/vscode/client/syntaxes/cosmos.tmLanguage.json +219 -0
  56. data/extensions/vscode/client/tsconfig.json +17 -0
  57. data/extensions/vscode/package-lock.json +26 -0
  58. data/extensions/vscode/package.json +35 -0
  59. data/extensions/vscode/server/License.txt +879 -0
  60. data/extensions/vscode/server/package-lock.json +236 -0
  61. data/extensions/vscode/server/package.json +29 -0
  62. data/extensions/vscode/server/src/server.ts +59 -0
  63. data/extensions/vscode/server/tsconfig.json +16 -0
  64. data/install/Rakefile +4 -4
  65. data/install/config/data/crc.txt +145 -145
  66. data/install/config/system/system.txt +15 -7
  67. data/install/config/tools/handbook_creator/default_toc.xsl +59 -59
  68. data/lib/cosmos/config/config_parser.rb +2 -10
  69. data/lib/cosmos/core_ext/class.rb +10 -0
  70. data/lib/cosmos/core_ext/time.rb +5 -3
  71. data/lib/cosmos/dart/examples/dart_decom_client.rb +1 -1
  72. data/lib/cosmos/dart/lib/dart_common.rb +3 -3
  73. data/lib/cosmos/dart/lib/dart_decommutator.rb +4 -4
  74. data/lib/cosmos/dart/processes/dart_decom_server.rb +1 -1
  75. data/lib/cosmos/dart/processes/dart_master.rb +1 -1
  76. data/lib/cosmos/dart/spec/dart/dart_database_cleaner_spec.rb +2 -2
  77. data/lib/cosmos/gui/qt.rb +10 -10
  78. data/lib/cosmos/gui/qt_tool.rb +17 -12
  79. data/lib/cosmos/gui/text/completion_text_edit.rb +2 -0
  80. data/lib/cosmos/gui/widgets/dart_meta_frame.rb +1 -1
  81. data/lib/cosmos/interfaces/dart_status_interface.rb +1 -1
  82. data/lib/cosmos/interfaces/linc_interface.rb +3 -3
  83. data/lib/cosmos/interfaces/protocols/burst_protocol.rb +1 -1
  84. data/lib/cosmos/interfaces/protocols/crc_protocol.rb +1 -1
  85. data/lib/cosmos/interfaces/protocols/template_protocol.rb +3 -3
  86. data/lib/cosmos/interfaces/serial_interface.rb +7 -1
  87. data/lib/cosmos/interfaces/stream_interface.rb +1 -1
  88. data/lib/cosmos/interfaces/tcpip_server_interface.rb +16 -16
  89. data/lib/cosmos/io/io_multiplexer.rb +6 -2
  90. data/lib/cosmos/io/json_drb.rb +3 -11
  91. data/lib/cosmos/io/json_drb_object.rb +7 -2
  92. data/lib/cosmos/io/json_drb_rack.rb +25 -5
  93. data/lib/cosmos/io/json_rpc.rb +1 -1
  94. data/lib/cosmos/io/posix_serial_driver.rb +60 -22
  95. data/lib/cosmos/io/serial_driver.rb +11 -8
  96. data/lib/cosmos/io/win32_serial_driver.rb +8 -1
  97. data/lib/cosmos/packets/packet.rb +8 -8
  98. data/lib/cosmos/packets/packet_config.rb +1 -1
  99. data/lib/cosmos/packets/packet_item_limits.rb +2 -14
  100. data/lib/cosmos/packets/parsers/xtce_converter.rb +10 -10
  101. data/lib/cosmos/packets/parsers/xtce_parser.rb +3 -0
  102. data/lib/cosmos/packets/structure.rb +18 -5
  103. data/lib/cosmos/packets/structure_item.rb +4 -21
  104. data/lib/cosmos/script/api_shared.rb +18 -1
  105. data/lib/cosmos/script/extract.rb +1 -1
  106. data/lib/cosmos/script/script.rb +4 -11
  107. data/lib/cosmos/streams/serial_stream.rb +11 -6
  108. data/lib/cosmos/system/system.rb +47 -13
  109. data/lib/cosmos/tools/cmd_sender/cmd_param_table_item_delegate.rb +15 -0
  110. data/lib/cosmos/tools/cmd_sender/cmd_params.rb +25 -3
  111. data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +7 -0
  112. data/lib/cosmos/tools/cmd_sequence/sequence_item.rb +0 -5
  113. data/lib/cosmos/tools/cmd_tlm_server/api.rb +10 -8
  114. data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +2 -2
  115. data/lib/cosmos/tools/cmd_tlm_server/gui/logging_tab.rb +1 -1
  116. data/lib/cosmos/tools/cmd_tlm_server/interface_thread.rb +29 -26
  117. data/lib/cosmos/tools/cmd_tlm_server/limits_groups_background_task.rb +1 -1
  118. data/lib/cosmos/tools/cmd_tlm_server/router_thread.rb +5 -0
  119. data/lib/cosmos/tools/config_editor/config_editor.rb +1 -1
  120. data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +1 -1
  121. data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +1 -1
  122. data/lib/cosmos/tools/script_runner/script_runner_frame.rb +5 -2
  123. data/lib/cosmos/tools/test_runner/test.rb +1 -1
  124. data/lib/cosmos/tools/test_runner/test_runner.rb +4 -4
  125. data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +3 -3
  126. data/lib/cosmos/tools/tlm_extractor/tlm_extractor_config.rb +1 -4
  127. data/lib/cosmos/tools/tlm_extractor/tlm_extractor_processor.rb +3 -3
  128. data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_dart_thread.rb +1 -1
  129. data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +2 -2
  130. data/lib/cosmos/tools/tlm_viewer/widgets/canvasdot_widget.rb +2 -0
  131. data/lib/cosmos/top_level.rb +1 -1
  132. data/lib/cosmos/utilities/simulated_target.rb +1 -1
  133. data/lib/cosmos/version.rb +5 -5
  134. data/make_gems.sh +1 -1
  135. data/spec/core_ext/class_spec.rb +54 -0
  136. data/spec/core_ext/time_spec.rb +4 -0
  137. data/spec/gui/qt_spec.rb +1 -1
  138. data/spec/gui/utilities/script_module_gui_spec.rb +1 -1
  139. data/spec/interfaces/linc_interface_spec.rb +1 -1
  140. data/spec/interfaces/serial_interface_spec.rb +1 -5
  141. data/spec/io/json_drb_rack_spec.rb +166 -0
  142. data/spec/io/json_rpc_spec.rb +4 -5
  143. data/spec/io/posix_serial_driver_spec.rb +87 -0
  144. data/spec/io/win32_serial_driver_spec.rb +17 -1
  145. data/spec/packet_logs/packet_log_reader_spec.rb +34 -35
  146. data/spec/packets/packet_item_limits_spec.rb +6 -33
  147. data/spec/packets/structure_item_spec.rb +3 -21
  148. data/spec/script/extract_spec.rb +4 -1
  149. data/spec/system/system_spec.rb +109 -1
  150. data/spec/tools/cmd_tlm_server/api_spec.rb +12 -12
  151. data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +2 -2
  152. data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +4 -3
  153. data/spec/tools/cmd_tlm_server/router_thread_spec.rb +2 -3
  154. data/spec/top_level/top_level_spec.rb +2 -2
  155. data/spec/utilities/logger_spec.rb +3 -3
  156. data/test/performance/Rakefile +4 -4
  157. data/test/performance/config/data/crc.txt +67 -48
  158. metadata +53 -9
  159. data/.coveralls.yml +0 -1
  160. data/.travis.yml +0 -16
@@ -0,0 +1,236 @@
1
+ {
2
+ "name": "language-server-cosmos",
3
+ "version": "1.1.0",
4
+ "lockfileVersion": 1,
5
+ "requires": true,
6
+ "dependencies": {
7
+ "async": {
8
+ "version": "1.0.0",
9
+ "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz",
10
+ "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k="
11
+ },
12
+ "colors": {
13
+ "version": "1.0.3",
14
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
15
+ "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs="
16
+ },
17
+ "cross-spawn": {
18
+ "version": "5.1.0",
19
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
20
+ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
21
+ "requires": {
22
+ "lru-cache": "^4.0.1",
23
+ "shebang-command": "^1.2.0",
24
+ "which": "^1.2.9"
25
+ }
26
+ },
27
+ "cycle": {
28
+ "version": "1.0.3",
29
+ "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz",
30
+ "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI="
31
+ },
32
+ "execa": {
33
+ "version": "0.6.3",
34
+ "resolved": "https://registry.npmjs.org/execa/-/execa-0.6.3.tgz",
35
+ "integrity": "sha1-V7aaWU8IF1nGnlNw8NF7nLEWWP4=",
36
+ "requires": {
37
+ "cross-spawn": "^5.0.1",
38
+ "get-stream": "^3.0.0",
39
+ "is-stream": "^1.1.0",
40
+ "npm-run-path": "^2.0.0",
41
+ "p-finally": "^1.0.0",
42
+ "signal-exit": "^3.0.0",
43
+ "strip-eof": "^1.0.0"
44
+ }
45
+ },
46
+ "eyes": {
47
+ "version": "0.1.8",
48
+ "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz",
49
+ "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A="
50
+ },
51
+ "find": {
52
+ "version": "0.2.9",
53
+ "resolved": "https://registry.npmjs.org/find/-/find-0.2.9.tgz",
54
+ "integrity": "sha1-S3Px/55WrZG3bnFkB/5f/mVUu4w=",
55
+ "requires": {
56
+ "traverse-chain": "~0.1.0"
57
+ }
58
+ },
59
+ "fs": {
60
+ "version": "0.0.1-security",
61
+ "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
62
+ "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ="
63
+ },
64
+ "get-stream": {
65
+ "version": "3.0.0",
66
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
67
+ "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
68
+ },
69
+ "inherits": {
70
+ "version": "2.0.3",
71
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
72
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
73
+ },
74
+ "is-stream": {
75
+ "version": "1.1.0",
76
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
77
+ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
78
+ },
79
+ "isexe": {
80
+ "version": "2.0.0",
81
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
82
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
83
+ },
84
+ "isstream": {
85
+ "version": "0.1.2",
86
+ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
87
+ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
88
+ },
89
+ "lru-cache": {
90
+ "version": "4.1.3",
91
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz",
92
+ "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==",
93
+ "requires": {
94
+ "pseudomap": "^1.0.2",
95
+ "yallist": "^2.1.2"
96
+ }
97
+ },
98
+ "npm-run-path": {
99
+ "version": "2.0.2",
100
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
101
+ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
102
+ "requires": {
103
+ "path-key": "^2.0.0"
104
+ }
105
+ },
106
+ "p-finally": {
107
+ "version": "1.0.0",
108
+ "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
109
+ "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
110
+ },
111
+ "path": {
112
+ "version": "0.12.7",
113
+ "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
114
+ "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
115
+ "requires": {
116
+ "process": "^0.11.1",
117
+ "util": "^0.10.3"
118
+ }
119
+ },
120
+ "path-key": {
121
+ "version": "2.0.1",
122
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
123
+ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
124
+ },
125
+ "process": {
126
+ "version": "0.11.10",
127
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
128
+ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
129
+ },
130
+ "pseudomap": {
131
+ "version": "1.0.2",
132
+ "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
133
+ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
134
+ },
135
+ "shebang-command": {
136
+ "version": "1.2.0",
137
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
138
+ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
139
+ "requires": {
140
+ "shebang-regex": "^1.0.0"
141
+ }
142
+ },
143
+ "shebang-regex": {
144
+ "version": "1.0.0",
145
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
146
+ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
147
+ },
148
+ "signal-exit": {
149
+ "version": "3.0.2",
150
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
151
+ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
152
+ },
153
+ "stack-trace": {
154
+ "version": "0.0.10",
155
+ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
156
+ "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA="
157
+ },
158
+ "strip-eof": {
159
+ "version": "1.0.0",
160
+ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
161
+ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
162
+ },
163
+ "traverse-chain": {
164
+ "version": "0.1.0",
165
+ "resolved": "https://registry.npmjs.org/traverse-chain/-/traverse-chain-0.1.0.tgz",
166
+ "integrity": "sha1-YdvC1Ttp/2CRoSoWj9fUMxB+QPE="
167
+ },
168
+ "util": {
169
+ "version": "0.10.4",
170
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
171
+ "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
172
+ "requires": {
173
+ "inherits": "2.0.3"
174
+ }
175
+ },
176
+ "vscode-jsonrpc": {
177
+ "version": "3.5.0",
178
+ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.5.0.tgz",
179
+ "integrity": "sha1-hyOdnhZrLXNSJFuKgTWXgEwdY6o="
180
+ },
181
+ "vscode-languageserver": {
182
+ "version": "3.5.1",
183
+ "resolved": "http://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-3.5.1.tgz",
184
+ "integrity": "sha512-RYUKn0DgHTFcS8kS4VaNCjNMaQXYqiXdN9bKrFjXzu5RPKfjIYcoh47oVWwZj4L3R/DPB0Se7HPaDatvYY2XgQ==",
185
+ "requires": {
186
+ "vscode-languageserver-protocol": "3.5.1",
187
+ "vscode-uri": "^1.0.1"
188
+ }
189
+ },
190
+ "vscode-languageserver-protocol": {
191
+ "version": "3.5.1",
192
+ "resolved": "http://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.5.1.tgz",
193
+ "integrity": "sha512-1fPDIwsAv1difCV+8daOrJEGunClNJWqnUHq/ncWrjhitKWXgGmRCjlwZ3gDUTt54yRcvXz1PXJDaRNvNH6pYA==",
194
+ "requires": {
195
+ "vscode-jsonrpc": "3.5.0",
196
+ "vscode-languageserver-types": "3.5.0"
197
+ }
198
+ },
199
+ "vscode-languageserver-types": {
200
+ "version": "3.5.0",
201
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.5.0.tgz",
202
+ "integrity": "sha1-5I15li8LjgLelV4/UkkI4rGcA3Q="
203
+ },
204
+ "vscode-uri": {
205
+ "version": "1.0.6",
206
+ "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.6.tgz",
207
+ "integrity": "sha512-sLI2L0uGov3wKVb9EB+vIQBl9tVP90nqRvxSoJ35vI3NjxE8jfsE5DSOhWgSunHSZmKS4OCi2jrtfxK7uyp2ww=="
208
+ },
209
+ "which": {
210
+ "version": "1.3.1",
211
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
212
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
213
+ "requires": {
214
+ "isexe": "^2.0.0"
215
+ }
216
+ },
217
+ "winston": {
218
+ "version": "2.4.4",
219
+ "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.4.tgz",
220
+ "integrity": "sha512-NBo2Pepn4hK4V01UfcWcDlmiVTs7VTB1h7bgnB0rgP146bYhMxX0ypCz3lBOfNxCO4Zuek7yeT+y/zM1OfMw4Q==",
221
+ "requires": {
222
+ "async": "~1.0.0",
223
+ "colors": "1.0.x",
224
+ "cycle": "1.0.x",
225
+ "eyes": "0.1.x",
226
+ "isstream": "0.1.x",
227
+ "stack-trace": "0.0.x"
228
+ }
229
+ },
230
+ "yallist": {
231
+ "version": "2.1.2",
232
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
233
+ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
234
+ }
235
+ }
236
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "language-server-cosmos",
3
+ "description": "Implementation of a language server for cosmos.",
4
+ "version": "0.0.8",
5
+ "author": "Ball Aerospace",
6
+ "license": "BALL GPL",
7
+ "engines": {
8
+ "node": "*"
9
+ },
10
+ "homepage": "https://cosmosrb.com/",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/BallAerospace/COSMOS"
14
+ },
15
+ "dependencies": {
16
+ "@types/node": "^14.0.14",
17
+ "execa": "^0.6.3",
18
+ "find": "^0.2.7",
19
+ "fs": "0.0.1-security",
20
+ "path": "^0.12.7",
21
+ "vscode-languageserver": "^3.5.1",
22
+ "winston": "^2.4.3"
23
+ },
24
+ "scripts": {
25
+ "installServer": "installServerIntoExtension ../client ./package.json ./tsconfig.json",
26
+ "compile": "installServerIntoExtension ../client ./package.json ./tsconfig.json && tsc -p .",
27
+ "watch": "installServerIntoExtension ../client ./package.json ./tsconfig.json && tsc -w -p ."
28
+ }
29
+ }
@@ -0,0 +1,59 @@
1
+ 'use strict';
2
+
3
+ import {
4
+ IPCMessageReader,
5
+ IPCMessageWriter,
6
+ createConnection,
7
+ IConnection,
8
+ TextDocuments,
9
+ InitializeResult,
10
+ TextDocumentPositionParams,
11
+ CompletionItem,
12
+ Definition,
13
+ } from 'vscode-languageserver';
14
+
15
+ var logger = require('winston');
16
+
17
+ // Create a connection for the server. The connection uses
18
+ // stdin / stdout for message passing
19
+ let connection: IConnection = createConnection(process.stdin, process.stdout);
20
+
21
+ // Create a simple text document manager. The text document manager
22
+ // supports full document sync only
23
+ let documents: TextDocuments = new TextDocuments();
24
+ // Make the text document manager listen on the connection
25
+ // for open, change and close text document events
26
+ documents.listen(connection);
27
+
28
+ // After the server has started the client sends an initilize request. The server receives
29
+ // in the passed params the rootPath of the workspace plus the client capabilites.
30
+ let workspaceRoot: string;
31
+ connection.onInitialize((params): InitializeResult => {
32
+ workspaceRoot = params.rootPath;
33
+ console.log('COSMOS Server Extension!');
34
+ return {
35
+ capabilities: {
36
+ // Tell the client that the server works in FULL text document sync mode
37
+ textDocumentSync: documents.syncKind,
38
+ completionProvider: {
39
+ resolveProvider: true
40
+ },
41
+ definitionProvider: true,
42
+ executeCommandProvider: {
43
+ commands: [
44
+ ]
45
+ }
46
+ }
47
+ }
48
+ });
49
+
50
+ // The content of a text document has changed. This event is emitted
51
+ // when the text document first opened or when its content has changed.
52
+ documents.onDidChangeContent((change) => {
53
+ //TODO: add symbol parsing here
54
+ console.log('COSMOS document changed!');
55
+ logger.debug(`onDidChangeContent: ${JSON.stringify(change)}`);
56
+ });
57
+
58
+ // Listen on the connection
59
+ connection.listen();
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "noImplicitAny": false,
4
+ "noImplicitReturns": true,
5
+ "noUnusedLocals": false,
6
+ "noUnusedParameters": false,
7
+ "outDir": "../client/server",
8
+ "lib": ["dom", "es2015"]
9
+ },
10
+ "include": [
11
+ "src/*"
12
+ ],
13
+ "exclude": [
14
+ "node_modules"
15
+ ]
16
+ }
data/install/Rakefile CHANGED
@@ -39,14 +39,14 @@ def create_crc_file(official)
39
39
  crc = Cosmos::Crc32.new(Cosmos::Crc32::DEFAULT_POLY, Cosmos::Crc32::DEFAULT_SEED, true, false)
40
40
  File.open("config/data/crc.txt",'w') do |file|
41
41
  file.puts "USER_MODIFIED" unless official
42
- Dir[File.join('lib','**','*')].each do |filename|
42
+ Dir[File.join('lib','**','*')].sort.each do |filename|
43
43
  next if File.directory?(filename)
44
44
  next if ignore.include?(filename)
45
45
  file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
46
46
  file.puts "\"#{filename}\" #{sprintf("0x%08X", crc.calc(file_data))}"
47
47
  count += 1
48
48
  end
49
- Dir[File.join('config','**','*')].each do |filename|
49
+ Dir[File.join('config','**','*')].sort.each do |filename|
50
50
  next if File.directory?(filename)
51
51
  next if ignore.include?(filename)
52
52
  next if File.basename(filename) == 'crc.txt'
@@ -54,14 +54,14 @@ def create_crc_file(official)
54
54
  file.puts "\"#{filename}\" #{sprintf("0x%08X", crc.calc(file_data))}"
55
55
  count += 1
56
56
  end
57
- Dir[File.join('tools','**','*')].each do |filename|
57
+ Dir[File.join('tools','**','*')].sort.each do |filename|
58
58
  next if File.directory?(filename)
59
59
  next if ignore.include?(filename)
60
60
  file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")
61
61
  file.puts "\"#{filename}\" #{sprintf("0x%08X", crc.calc(file_data))}"
62
62
  count += 1
63
63
  end
64
- Dir[File.join('procedures','**','*')].each do |filename|
64
+ Dir[File.join('procedures','**','*')].sort.each do |filename|
65
65
  next if File.directory?(filename)
66
66
  next if ignore.include?(filename)
67
67
  file_data = File.open(filename, 'rb').read.gsub("\x0D\x0A", "\x0A")