cosmos 4.4.0 → 4.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +5 -5
  2. data/.dockerignore +2 -0
  3. data/.gitignore +1 -0
  4. data/.travis.yml +6 -6
  5. data/Dockerfile +70 -0
  6. data/Manifest.txt +37 -2
  7. data/README.md +9 -0
  8. data/Rakefile +55 -5
  9. data/appveyor.yml +18 -8
  10. data/autohotkey/config/tools/cmd_sequence/cmd_sequence.txt +2 -0
  11. data/autohotkey/lib/cmd_sequence_exporter.rb +52 -0
  12. data/autohotkey/procedures/collect.rb +2 -2
  13. data/autohotkey/procedures/collect_util.rb +1 -1
  14. data/autohotkey/procedures/script_test.rb +1 -1
  15. data/autohotkey/tools/CmdSenderAHK2 +18 -0
  16. data/autohotkey/tools/cmd_extractor.ahk +11 -9
  17. data/autohotkey/tools/cmd_sender.ahk +35 -7
  18. data/autohotkey/tools/cmd_sender2.ahk +4 -0
  19. data/autohotkey/tools/cmd_sequence.ahk +22 -9
  20. data/autohotkey/tools/config_editor.ahk +4 -4
  21. data/autohotkey/tools/data_viewer.ahk +1 -1
  22. data/autohotkey/tools/limits_monitor.ahk +1 -1
  23. data/autohotkey/tools/packet_viewer.ahk +1 -1
  24. data/autohotkey/tools/script_runner.ahk +1 -1
  25. data/autohotkey/tools/test_runner2.ahk +1 -1
  26. data/autohotkey/tools/tlm_grapher.ahk +1 -1
  27. data/autohotkey/tools/tlm_grapher3.ahk +1 -1
  28. data/autohotkey/tools/tlm_viewer.ahk +1 -1
  29. data/autohotkey/tools/tlm_viewer2.ahk +1 -1
  30. data/autohotkey/tools/tlm_viewer5.ahk +1 -1
  31. data/bin/cstol_converter +1 -1
  32. data/bin/rubysloc +73 -28
  33. data/bin/xtce_converter +1 -1
  34. data/cosmos.gemspec +2 -2
  35. data/data/config/command_modifiers.yaml +16 -1
  36. data/data/config/interface_modifiers.yaml +3 -2
  37. data/data/config/param_item_modifiers.yaml +5 -0
  38. data/data/config/system.yaml +110 -23
  39. data/data/config/telemetry_modifiers.yaml +16 -1
  40. data/data/crc.txt +416 -411
  41. data/demo/Rakefile +4 -4
  42. data/demo/config/dart/Gemfile +1 -6
  43. data/demo/config/data/crc.txt +233 -232
  44. data/demo/config/system/system.txt +17 -6
  45. data/demo/config/system/system2.txt +17 -6
  46. data/demo/config/system/system_alt_ports.txt +17 -6
  47. data/demo/config/targets/INST/cmd_tlm/inst_cmds.txt +4 -4
  48. data/demo/config/targets/INST/cmd_tlm/inst_tlm.txt +4 -0
  49. data/demo/config/targets/INST/cmd_tlm/inst_tlm_override.txt +12 -0
  50. data/demo/config/targets/INST/lib/sim_inst.rb +2 -2
  51. data/demo/config/targets/INST/target.txt +1 -0
  52. data/demo/config/tools/handbook_creator/default_toc.xsl +59 -59
  53. data/demo/procedures/cosmos_api_test.rb +8 -8
  54. data/ext/cosmos/ext/buffered_file/buffered_file.c +2 -2
  55. data/ext/cosmos/ext/config_parser/config_parser.c +1 -2
  56. data/ext/cosmos/ext/line_graph/line_graph.c +53 -94
  57. data/ext/cosmos/ext/platform/platform.c +56 -21
  58. data/ext/cosmos/ext/polynomial_conversion/polynomial_conversion.c +4 -8
  59. data/ext/cosmos/ext/structure/structure.c +12 -0
  60. data/extensions/vscode/.gitignore +4 -0
  61. data/extensions/vscode/.vscode/launch.json +32 -0
  62. data/extensions/vscode/.vscode/settings.json +13 -0
  63. data/extensions/vscode/.vscode/tasks.json +79 -0
  64. data/extensions/vscode/License.txt +879 -0
  65. data/extensions/vscode/README.md +9 -0
  66. data/extensions/vscode/client/License.txt +879 -0
  67. data/extensions/vscode/client/README.md +39 -0
  68. data/extensions/vscode/client/cosmos.configuration.json +23 -0
  69. data/extensions/vscode/client/images/icon.png +0 -0
  70. data/extensions/vscode/client/package-lock.json +414 -0
  71. data/extensions/vscode/client/package.json +105 -0
  72. data/extensions/vscode/client/src/extension.ts +132 -0
  73. data/extensions/vscode/client/src/screen_preview.rb +25 -0
  74. data/extensions/vscode/client/syntaxes/cosmos.tmLanguage.json +219 -0
  75. data/extensions/vscode/client/tsconfig.json +17 -0
  76. data/extensions/vscode/package-lock.json +26 -0
  77. data/extensions/vscode/package.json +35 -0
  78. data/extensions/vscode/server/License.txt +879 -0
  79. data/extensions/vscode/server/package-lock.json +236 -0
  80. data/extensions/vscode/server/package.json +29 -0
  81. data/extensions/vscode/server/src/server.ts +59 -0
  82. data/extensions/vscode/server/tsconfig.json +16 -0
  83. data/install/Rakefile +4 -4
  84. data/install/config/dart/Gemfile +2 -7
  85. data/install/config/data/crc.txt +137 -137
  86. data/install/config/system/system.txt +17 -6
  87. data/install/config/tools/handbook_creator/default_toc.xsl +59 -59
  88. data/lib/cosmos/config/config_parser.rb +2 -10
  89. data/lib/cosmos/core_ext/class.rb +10 -0
  90. data/lib/cosmos/core_ext/time.rb +5 -3
  91. data/lib/cosmos/dart/config/boot.rb +1 -1
  92. data/lib/cosmos/dart/config/database.yml +2 -0
  93. data/lib/cosmos/dart/examples/dart_decom_client.rb +1 -1
  94. data/lib/cosmos/dart/lib/dart_common.rb +12 -5
  95. data/lib/cosmos/dart/lib/dart_constants.rb +15 -0
  96. data/lib/cosmos/dart/lib/dart_decom_query.rb +5 -6
  97. data/lib/cosmos/dart/lib/dart_decommutator.rb +64 -54
  98. data/lib/cosmos/dart/lib/dart_master_query.rb +71 -0
  99. data/lib/cosmos/dart/lib/dart_reducer_worker_thread.rb +165 -134
  100. data/lib/cosmos/dart/processes/dart.rb +4 -2
  101. data/lib/cosmos/dart/processes/dart_decom_server.rb +3 -3
  102. data/lib/cosmos/dart/processes/dart_ingester.rb +38 -1
  103. data/lib/cosmos/dart/processes/dart_master.rb +44 -0
  104. data/lib/cosmos/dart/processes/dart_util.rb +115 -0
  105. data/lib/cosmos/dart/spec/dart/dart_database_cleaner_spec.rb +2 -2
  106. data/lib/cosmos/gui/qt.rb +10 -10
  107. data/lib/cosmos/gui/qt_tool.rb +17 -12
  108. data/lib/cosmos/gui/text/completion_text_edit.rb +2 -0
  109. data/lib/cosmos/gui/widgets/dart_meta_frame.rb +22 -3
  110. data/lib/cosmos/interfaces/dart_status_interface.rb +1 -1
  111. data/lib/cosmos/interfaces/linc_interface.rb +3 -3
  112. data/lib/cosmos/interfaces/protocols/burst_protocol.rb +1 -1
  113. data/lib/cosmos/interfaces/protocols/crc_protocol.rb +1 -1
  114. data/lib/cosmos/interfaces/protocols/length_protocol.rb +5 -0
  115. data/lib/cosmos/interfaces/protocols/template_protocol.rb +3 -3
  116. data/lib/cosmos/interfaces/serial_interface.rb +7 -1
  117. data/lib/cosmos/interfaces/stream_interface.rb +1 -1
  118. data/lib/cosmos/interfaces/tcpip_server_interface.rb +16 -16
  119. data/lib/cosmos/io/io_multiplexer.rb +6 -2
  120. data/lib/cosmos/io/json_drb.rb +5 -5
  121. data/lib/cosmos/io/json_drb_object.rb +7 -2
  122. data/lib/cosmos/io/json_drb_rack.rb +25 -5
  123. data/lib/cosmos/io/json_rpc.rb +1 -1
  124. data/lib/cosmos/io/posix_serial_driver.rb +60 -22
  125. data/lib/cosmos/io/serial_driver.rb +11 -8
  126. data/lib/cosmos/io/win32_serial_driver.rb +31 -3
  127. data/lib/cosmos/packet_logs/packet_log_reader.rb +2 -2
  128. data/lib/cosmos/packets/packet.rb +9 -9
  129. data/lib/cosmos/packets/packet_config.rb +27 -9
  130. data/lib/cosmos/packets/parsers/xtce_converter.rb +10 -10
  131. data/lib/cosmos/packets/parsers/xtce_parser.rb +3 -0
  132. data/lib/cosmos/packets/structure.rb +35 -5
  133. data/lib/cosmos/packets/structure_item.rb +5 -1
  134. data/lib/cosmos/packets/telemetry.rb +7 -1
  135. data/lib/cosmos/script/api_shared.rb +18 -1
  136. data/lib/cosmos/script/extract.rb +1 -1
  137. data/lib/cosmos/script/script.rb +4 -11
  138. data/lib/cosmos/streams/serial_stream.rb +11 -6
  139. data/lib/cosmos/system/system.rb +155 -57
  140. data/lib/cosmos/tools/cmd_sender/cmd_param_table_item_delegate.rb +15 -0
  141. data/lib/cosmos/tools/cmd_sender/cmd_params.rb +382 -0
  142. data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +29 -318
  143. data/lib/cosmos/tools/cmd_sequence/cmd_sequence.rb +14 -17
  144. data/lib/cosmos/tools/cmd_sequence/sequence_item.rb +38 -331
  145. data/lib/cosmos/tools/cmd_sequence/sequence_list.rb +16 -11
  146. data/lib/cosmos/tools/cmd_tlm_server/api.rb +10 -8
  147. data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +2 -2
  148. data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +1 -0
  149. data/lib/cosmos/tools/cmd_tlm_server/gui/logging_tab.rb +1 -1
  150. data/lib/cosmos/tools/cmd_tlm_server/interface_thread.rb +29 -26
  151. data/lib/cosmos/tools/cmd_tlm_server/limits_groups_background_task.rb +1 -1
  152. data/lib/cosmos/tools/cmd_tlm_server/router_thread.rb +5 -0
  153. data/lib/cosmos/tools/config_editor/config_editor.rb +34 -3
  154. data/lib/cosmos/tools/config_editor/config_editor_frame.rb +8 -9
  155. data/lib/cosmos/tools/config_editor/system_config_dialog.rb +158 -0
  156. data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +1 -1
  157. data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +1 -1
  158. data/lib/cosmos/tools/script_runner/script_runner_frame.rb +7 -4
  159. data/lib/cosmos/tools/test_runner/test.rb +6 -3
  160. data/lib/cosmos/tools/test_runner/test_runner.rb +6 -6
  161. data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +3 -3
  162. data/lib/cosmos/tools/tlm_extractor/tlm_extractor_config.rb +1 -4
  163. data/lib/cosmos/tools/tlm_extractor/tlm_extractor_processor.rb +20 -16
  164. data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_dart_thread.rb +21 -17
  165. data/lib/cosmos/tools/tlm_grapher/tlm_grapher.rb +18 -11
  166. data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +17 -6
  167. data/lib/cosmos/tools/tlm_viewer/widgets/canvasdot_widget.rb +2 -0
  168. data/lib/cosmos/top_level.rb +1 -1
  169. data/lib/cosmos/utilities/ruby_lex_utils.rb +34 -30
  170. data/lib/cosmos/utilities/simulated_target.rb +1 -1
  171. data/lib/cosmos/version.rb +5 -5
  172. data/lib/cosmos/win32/excel.rb +23 -17
  173. data/run_gui_tests.bat +1 -0
  174. data/spec/core_ext/class_spec.rb +54 -0
  175. data/spec/core_ext/socket_spec.rb +1 -1
  176. data/spec/core_ext/time_spec.rb +4 -0
  177. data/spec/install/yaml_docs_spec.rb +26 -6
  178. data/spec/interfaces/linc_interface_spec.rb +1 -1
  179. data/spec/interfaces/protocols/length_protocol_spec.rb +39 -0
  180. data/spec/interfaces/serial_interface_spec.rb +1 -5
  181. data/spec/io/json_drb_rack_spec.rb +166 -0
  182. data/spec/io/json_drb_spec.rb +14 -0
  183. data/spec/io/json_rpc_spec.rb +4 -5
  184. data/spec/io/posix_serial_driver_spec.rb +81 -0
  185. data/spec/io/win32_serial_driver_spec.rb +33 -3
  186. data/spec/packet_logs/packet_log_reader_spec.rb +36 -37
  187. data/spec/packets/structure_spec.rb +52 -2
  188. data/spec/packets/telemetry_spec.rb +29 -1
  189. data/spec/script/extract_spec.rb +4 -1
  190. data/spec/system/system_spec.rb +111 -3
  191. data/spec/tools/cmd_tlm_server/api_spec.rb +12 -12
  192. data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +2 -2
  193. data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +4 -3
  194. data/spec/tools/cmd_tlm_server/router_thread_spec.rb +2 -3
  195. data/spec/utilities/logger_spec.rb +3 -3
  196. data/spec/utilities/message_log_spec.rb +6 -3
  197. data/tasks/gemfile_stats.rake +22 -13
  198. data/test/performance/Rakefile +4 -4
  199. data/test/performance/config/data/crc.txt +67 -48
  200. metadata +52 -11
  201. data/demo/outputs/dart/logs/README.txt +0 -1
  202. data/lib/cosmos/dart/Gemfile +0 -69
@@ -23,31 +23,64 @@ VALUE cSegFault = Qnil;
23
23
  #include <signal.h>
24
24
  #include <unistd.h>
25
25
  #include <time.h>
26
+ #include <string.h>
27
+ #include <sys/stat.h>
26
28
 
27
29
  static void catch_sigsegv(int sig_num) {
30
+ const int FILENAME_LEN = 256;
28
31
  char *cosmos_log_dir = NULL;
29
32
  time_t rawtime;
30
- struct tm *timeinfo;
31
- char filename[256];
33
+ struct tm timeinfo;
34
+ struct tm *timeinfo_ptr;
35
+ struct stat stats;
36
+ char filename[FILENAME_LEN];
32
37
  FILE* file = NULL;
33
38
 
34
39
  signal(SIGSEGV, SIG_DFL);
35
40
  signal(SIGILL, SIG_DFL);
36
41
 
37
42
  cosmos_log_dir = getenv("COSMOS_LOGS_DIR");
38
- if (cosmos_log_dir == NULL) {
39
- cosmos_log_dir = (char*) ".";
43
+ // If the COSMOS_LOGS_DIR env var isn't set or if it's too big set to "."
44
+ // NOTE: The filename buffer will be written to by snprintf which appends
45
+ // a null terminator so we have 1 less byte available minus the length
46
+ // of the fixed filename structure
47
+ if ((cosmos_log_dir == NULL) || (strlen(cosmos_log_dir) > (FILENAME_LEN - 1 - strlen("/YYYY_MM_DD_HH_MM_SS_segfault.txt"))))
48
+ {
49
+ cosmos_log_dir = (char*)".";
40
50
  }
51
+ // Validate that we can write to this directory
52
+ if (stat(cosmos_log_dir, &stats) == 0)
53
+ {
54
+ if (!((stats.st_mode & W_OK)&& S_ISDIR(stats.st_mode)))
55
+ {
56
+ cosmos_log_dir = (char *)".";
57
+ }
58
+ }
59
+ else
60
+ {
61
+ cosmos_log_dir = (char *)".";
62
+ }
63
+
41
64
  time(&rawtime);
42
- timeinfo = localtime(&rawtime);
43
- sprintf(filename, "%s/%04u_%02u_%02u_%02u_%02u_%02u_segfault.txt",
44
- cosmos_log_dir,
45
- 1900 + timeinfo->tm_year,
46
- 1 + timeinfo->tm_mon,
47
- timeinfo->tm_mday,
48
- timeinfo->tm_hour,
49
- timeinfo->tm_min,
50
- timeinfo->tm_sec);
65
+ timeinfo_ptr = localtime_r(&rawtime, &timeinfo);
66
+ if (timeinfo_ptr == NULL)
67
+ {
68
+ // If localtime returns NULL we set our own and set to 1919 to make it interesting
69
+ strptime("1919-01-01 00:00:00", "%Y-%m-%d %H:%M:%S", &timeinfo);
70
+ }
71
+ snprintf(filename, FILENAME_LEN, "%s/%04u_%02u_%02u_%02u_%02u_%02u_segfault.txt",
72
+ cosmos_log_dir,
73
+ 1900 + timeinfo.tm_year,
74
+ 1 + timeinfo.tm_mon,
75
+ timeinfo.tm_mday,
76
+ timeinfo.tm_hour,
77
+ timeinfo.tm_min,
78
+ timeinfo.tm_sec);
79
+
80
+ // Fortify warns about Path Manipulation here. We explictly allow this to let
81
+ // segfault files be written to a directory of their choosing.
82
+ // The input is validated above for length and to ensure it is a writable directory.
83
+ // If the checks fail the directory is set to the current directory without additional info.
51
84
  file = freopen(filename, "a", stderr);
52
85
  /* Using file removes a warning */
53
86
  if (file) {
@@ -58,11 +91,12 @@ VALUE cSegFault = Qnil;
58
91
  }
59
92
  #endif
60
93
 
61
- static VALUE segfault(VALUE self) {
62
- char *a = 0;
63
- *a = 50;
64
- return Qnil;
65
- }
94
+ /* NOTE: Uncomment and rebuilt for testing the handler */
95
+ // static VALUE segfault(VALUE self) {
96
+ // char *a = 0;
97
+ // *a = 50;
98
+ // return Qnil;
99
+ // }
66
100
 
67
101
  /*
68
102
  * Initialize methods for Platform specific C code
@@ -95,7 +129,8 @@ void Init_platform (void) {
95
129
  signal(SIGILL, catch_sigsegv);
96
130
  #endif
97
131
 
98
- mCosmos = rb_define_module("Cosmos");
99
- cSegFault = rb_define_class_under(mCosmos, "SegFault", rb_cObject);
100
- rb_define_singleton_method(cSegFault, "segfault", segfault, 0);
132
+ /* NOTE: Uncomment and rebuilt for testing the handler */
133
+ // mCosmos = rb_define_module("Cosmos");
134
+ // cSegFault = rb_define_class_under(mCosmos, "SegFault", rb_cObject);
135
+ // rb_define_singleton_method(cSegFault, "segfault", segfault, 0);
101
136
  }
@@ -30,20 +30,16 @@ static ID id_method_to_f = 0;
30
30
  */
31
31
  static VALUE polynomial_conversion_call(VALUE self, VALUE value, VALUE myself, VALUE buffer)
32
32
  {
33
- volatile VALUE coeffs = Qnil;
34
- long coeffs_length = 0;
35
33
  int index = 0;
36
- double double_value = 0.0;
37
- double coeff = 0.0;
38
34
  double converted = 0.0;
39
35
  double raised_to_power = 1.0;
40
36
 
41
- coeffs = rb_ivar_get(self, id_ivar_coeffs);
42
- coeffs_length = RARRAY_LEN(coeffs);
43
- double_value = RFLOAT_VALUE(rb_funcall(value, id_method_to_f, 0));
37
+ volatile VALUE coeffs = rb_ivar_get(self, id_ivar_coeffs);
38
+ long coeffs_length = RARRAY_LEN(coeffs);
39
+ double double_value = RFLOAT_VALUE(rb_funcall(value, id_method_to_f, 0));
44
40
 
45
41
  /* Handle C0 */
46
- coeff = RFLOAT_VALUE(rb_ary_entry(coeffs, 0));
42
+ double coeff = RFLOAT_VALUE(rb_ary_entry(coeffs, 0));
47
43
  converted += coeff;
48
44
 
49
45
  /* Handle Coefficients raised to a power */
@@ -493,6 +493,9 @@ static VALUE binary_accessor_read(VALUE self, VALUE param_bit_offset, VALUE para
493
493
  if (BYTE_ALIGNED(bit_offset)) {
494
494
  string_length = upper_bound - lower_bound + 1;
495
495
  string = malloc(string_length + 1);
496
+ if (string == NULL) {
497
+ rb_raise(rb_eNoMemError, "malloc of %d returned NULL", string_length + 1);
498
+ }
496
499
  memcpy(string, buffer + lower_bound, string_length);
497
500
  string[string_length] = 0;
498
501
  if (param_data_type == symbol_STRING) {
@@ -538,6 +541,9 @@ static VALUE binary_accessor_read(VALUE self, VALUE param_bit_offset, VALUE para
538
541
  string_length = ((bit_size - 1)/ 8) + 1;
539
542
  array_length = string_length + 4; /* Required number of bytes plus slack */
540
543
  unsigned_char_array = (unsigned char*) malloc(array_length);
544
+ if (unsigned_char_array == NULL) {
545
+ rb_raise(rb_eNoMemError, "malloc of %d returned NULL", array_length);
546
+ }
541
547
  read_bitfield(lower_bound, upper_bound, bit_offset, bit_size, given_bit_offset, given_bit_size, param_endianness, buffer, (int)buffer_length, unsigned_char_array);
542
548
 
543
549
  num_words = ((string_length - 1) / 4) + 1;
@@ -629,6 +635,9 @@ static VALUE binary_accessor_read(VALUE self, VALUE param_bit_offset, VALUE para
629
635
  string_length = ((bit_size - 1)/ 8) + 1;
630
636
  array_length = string_length + 4; /* Required number of bytes plus slack */
631
637
  unsigned_char_array = (unsigned char*) malloc(array_length);
638
+ if (unsigned_char_array == NULL) {
639
+ rb_raise(rb_eNoMemError, "malloc of %d returned NULL", array_length);
640
+ }
632
641
  read_bitfield(lower_bound, upper_bound, bit_offset, bit_size, given_bit_offset, given_bit_size, param_endianness, buffer, (int)buffer_length, unsigned_char_array);
633
642
 
634
643
  num_words = ((string_length - 1) / 4) + 1;
@@ -1001,6 +1010,9 @@ static VALUE binary_accessor_write(VALUE self, VALUE value, VALUE param_bit_offs
1001
1010
  string_length = ((bit_size - 1)/ 8) + 1;
1002
1011
  array_length = string_length + 4; /* Required number of bytes plus slack */
1003
1012
  unsigned_char_array = (unsigned char*) malloc(array_length);
1013
+ if (unsigned_char_array == NULL) {
1014
+ rb_raise(rb_eNoMemError, "malloc of %d returned NULL", array_length);
1015
+ }
1004
1016
 
1005
1017
  num_words = ((string_length - 1) / 4) + 1;
1006
1018
  num_bytes = num_words * 4;
@@ -0,0 +1,4 @@
1
+ out
2
+ node_modules
3
+ client/server
4
+ *.vsix
@@ -0,0 +1,32 @@
1
+ {
2
+ "version": "0.0.2",
3
+ // List of configurations. Add new configurations or edit existing ones.
4
+ "configurations": [
5
+ {
6
+ "name": "Launch Client",
7
+ "type": "extensionHost",
8
+ "request": "launch",
9
+ "runtimeExecutable": "${execPath}",
10
+ "args": [
11
+ "--extensionDevelopmentPath=${workspaceRoot}/client"
12
+ ],
13
+ "stopOnEntry": false,
14
+ "sourceMaps": true,
15
+ "outFiles": [
16
+ "${workspaceRoot}/client/out/**/*.js"
17
+ ],
18
+ "preLaunchTask": "watch:client"
19
+ },
20
+ {
21
+ "name": "Attach to Server",
22
+ "type": "node",
23
+ "request": "attach",
24
+ "port": 6009,
25
+ "sourceMaps": true,
26
+ "outFiles": [
27
+ "${workspaceRoot}/client/server/**/*.js"
28
+ ],
29
+ "preLaunchTask": "watch:server"
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ // PowerShell
3
+ "terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
4
+ "files.exclude": {
5
+ "out": false // set this to true to hide the "out" folder with the compiled JS files
6
+ },
7
+ "search.exclude": {
8
+ "out": true // set this to false to include "out" folder in search results
9
+ },
10
+ "typescript.tsdk": "./node_modules/typescript/lib",
11
+ "typescript.tsc.autoDetect": "off",
12
+ "npm.enableScriptExplorer": true
13
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "tasks": [
4
+ {
5
+ "label": "compile",
6
+ "dependsOn": [
7
+ "compile:client",
8
+ "compile:server"
9
+ ],
10
+ "problemMatcher": []
11
+ },
12
+ {
13
+ "label": "compile:client",
14
+ "type": "npm",
15
+ "script": "compile:client",
16
+ "group": "build",
17
+ "presentation": {
18
+ "panel": "dedicated",
19
+ "reveal": "never"
20
+ },
21
+ "problemMatcher": [
22
+ "$tsc"
23
+ ]
24
+ },
25
+ {
26
+ "label": "compile:server",
27
+ "type": "npm",
28
+ "script": "compile:server",
29
+ "group": "build",
30
+ "presentation": {
31
+ "panel": "dedicated",
32
+ "reveal": "never"
33
+ },
34
+ "problemMatcher": [
35
+ "$tsc"
36
+ ]
37
+ },
38
+ {
39
+ "label": "watch",
40
+ "dependsOn": [
41
+ "watch:client",
42
+ "watch:server"
43
+ ],
44
+ "group": {
45
+ "kind": "build",
46
+ "isDefault": true
47
+ },
48
+ "problemMatcher": []
49
+ },
50
+ {
51
+ "label": "watch:client",
52
+ "type": "npm",
53
+ "script": "watch:client",
54
+ "isBackground": true,
55
+ "group": "build",
56
+ "presentation": {
57
+ "panel": "dedicated",
58
+ "reveal": "never"
59
+ },
60
+ "problemMatcher": [
61
+ "$tsc-watch"
62
+ ]
63
+ },
64
+ {
65
+ "label": "watch:server",
66
+ "type": "npm",
67
+ "script": "watch:server",
68
+ "isBackground": true,
69
+ "group": "build",
70
+ "presentation": {
71
+ "panel": "dedicated",
72
+ "reveal": "never"
73
+ },
74
+ "problemMatcher": [
75
+ "$tsc-watch"
76
+ ]
77
+ }
78
+ ]
79
+ }