@aj-shadow/actorjs-app 0.0.0-aj-beta.221

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 (423) hide show
  1. package/.gitattributes +29 -0
  2. package/.vscode/launch.json +18 -0
  3. package/CHANGELOG.md +79 -0
  4. package/LICENSE.txt +96 -0
  5. package/README.md +86 -0
  6. package/contributors.txt +3 -0
  7. package/main.js +14 -0
  8. package/npm-post-install.js +618 -0
  9. package/npm-shrinkwrap.json +14 -0
  10. package/package.json +16 -0
  11. package/project/actorjs-project.tree +466 -0
  12. package/project/client/actions/action-actor-editor/action-actor-editor-file.js +101 -0
  13. package/project/client/actions/action-actor-editor/action-actor-editor-folder.js +41 -0
  14. package/project/client/actions/action-actor-editor/action-actor-editor-persistent-data.js +23 -0
  15. package/project/client/actions/action-actor-editor/action-actor-editor-project.js +23 -0
  16. package/project/client/actions/action-actor-editor/data-action-actor-editor-file.js +70 -0
  17. package/project/client/actions/action-actor-editor/data-action-actor-editor-folder.js +26 -0
  18. package/project/client/actions/action-actor-editor/data-action-actor-editor-project.js +27 -0
  19. package/project/client/actions/action-actor-editor/realtime-action-actors-editor.js +14 -0
  20. package/project/client/actions/action-addresses/action-addresses.js +180 -0
  21. package/project/client/actions/action-addresses/data-action-addresses.js +174 -0
  22. package/project/client/actions/action-console/action-console.js +11 -0
  23. package/project/client/actions/action-console/data-action-console.js +12 -0
  24. package/project/client/actions/action-content/action-content.js +101 -0
  25. package/project/client/actions/action-content/data-action-content.js +90 -0
  26. package/project/client/actions/action-function-under-test.js +45 -0
  27. package/project/client/actions/action-load/action-load.js +29 -0
  28. package/project/client/actions/action-load/data-action-load.js +4 -0
  29. package/project/client/actions/action-login/action-login.js +95 -0
  30. package/project/client/actions/action-login/data-action-login.js +83 -0
  31. package/project/client/actions/action-plugins/action-plugins.js +17 -0
  32. package/project/client/actions/action-plugins/data-action-plugins.js +20 -0
  33. package/project/client/actions/action-plus-services/action-plus-services.js +17 -0
  34. package/project/client/actions/action-plus-services/data-action-plus-services.js +20 -0
  35. package/project/client/actions/action-repos/action-repos.js +35 -0
  36. package/project/client/actions/action-repos/data-action-repos.js +42 -0
  37. package/project/client/actions/action-stack-editor/action-stack-editor-file.js +84 -0
  38. package/project/client/actions/action-stack-editor/action-stack-editor-folder.js +41 -0
  39. package/project/client/actions/action-stack-editor/action-stack-editor-persistent-data.js +23 -0
  40. package/project/client/actions/action-stack-editor/action-stack-editor-project.js +29 -0
  41. package/project/client/actions/action-stack-editor/data-action-stack-editor-file.js +49 -0
  42. package/project/client/actions/action-stack-editor/data-action-stack-editor-folder.js +26 -0
  43. package/project/client/actions/action-stack-editor/data-action-stack-editor-project.js +34 -0
  44. package/project/client/actions/action-sut-fut-filter.js +23 -0
  45. package/project/client/actions/action-system-under-test/action-system-under-test.js +164 -0
  46. package/project/client/actions/action-system-under-test/data-action-system-under-test.js +70 -0
  47. package/project/client/actions/action-test-case/action-test-case.js +323 -0
  48. package/project/client/actions/action-test-case/data-action-test-case.js +133 -0
  49. package/project/client/actions/action-test-case/realtime-action-test-case.js +69 -0
  50. package/project/client/actions/action-test-cases.js +49 -0
  51. package/project/client/actions/action-test-data/action-test-data.js +77 -0
  52. package/project/client/actions/action-test-data/data-action-test-data.js +62 -0
  53. package/project/client/actions/action-test-suite/action-test-suite.js +122 -0
  54. package/project/client/actions/action-test-suite/data-action-test-suite.js +76 -0
  55. package/project/client/actions/action-test-suite/realtime-action-test-suite.js +20 -0
  56. package/project/client/actions/action-test-suites.js +47 -0
  57. package/project/client/actor-default.js +18 -0
  58. package/project/client/communication/messages/messages-c-to-c/message-new-actor-index.js +15 -0
  59. package/project/client/communication/messages/messages-c-to-c/message-test-case-clear.js +15 -0
  60. package/project/client/communication/messages/messages-c-to-c/message-test-case-not-started.js +15 -0
  61. package/project/client/communication/messages/messages-c-to-c/message-test-suite-clear.js +15 -0
  62. package/project/client/components/footer/footer.jsx +94 -0
  63. package/project/client/components/header/header-status-login.jsx +78 -0
  64. package/project/client/components/header/header-status-staging-environment.jsx +132 -0
  65. package/project/client/components/header/header.jsx +27 -0
  66. package/project/client/components/header/header_icon.jsx +37 -0
  67. package/project/client/components/header/header_status.jsx +33 -0
  68. package/project/client/components/middle/abbreviation/middle-abbreviation-toolbar.jsx +126 -0
  69. package/project/client/components/middle/abbreviation/middle-abbreviation.jsx +27 -0
  70. package/project/client/components/middle/actor-editor/middle-actor-editor-sidebar.jsx +101 -0
  71. package/project/client/components/middle/actor-editor/middle-actor-editor-toolbar.jsx +612 -0
  72. package/project/client/components/middle/actor-editor/middle-actor-editor-view.jsx +157 -0
  73. package/project/client/components/middle/actor-editor/middle-actor-editor.jsx +38 -0
  74. package/project/client/components/middle/addresses/helpers/stage-filter.js +32 -0
  75. package/project/client/components/middle/addresses/middle-addresses-toolbar.jsx +183 -0
  76. package/project/client/components/middle/addresses/middle-addresses-view-client-address.jsx +67 -0
  77. package/project/client/components/middle/addresses/middle-addresses-view-client-interface.jsx +68 -0
  78. package/project/client/components/middle/addresses/middle-addresses-view-dns.jsx +67 -0
  79. package/project/client/components/middle/addresses/middle-addresses-view-dst.jsx +67 -0
  80. package/project/client/components/middle/addresses/middle-addresses-view-network-interface.jsx +67 -0
  81. package/project/client/components/middle/addresses/middle-addresses-view-ports.jsx +67 -0
  82. package/project/client/components/middle/addresses/middle-addresses-view-server-address.jsx +68 -0
  83. package/project/client/components/middle/addresses/middle-addresses-view-server-interface.jsx +68 -0
  84. package/project/client/components/middle/addresses/middle-addresses-view-src.jsx +67 -0
  85. package/project/client/components/middle/addresses/middle-addresses-view-srv.jsx +67 -0
  86. package/project/client/components/middle/addresses/middle-addresses-view-sut-address.jsx +67 -0
  87. package/project/client/components/middle/addresses/middle-addresses-view-sut-interface.jsx +67 -0
  88. package/project/client/components/middle/addresses/middle-addresses-view.jsx +155 -0
  89. package/project/client/components/middle/addresses/middle-addresses.jsx +39 -0
  90. package/project/client/components/middle/content/middle-content-toolbar.jsx +135 -0
  91. package/project/client/components/middle/content/middle-content-view-audio.jsx +60 -0
  92. package/project/client/components/middle/content/middle-content-view-documents.jsx +60 -0
  93. package/project/client/components/middle/content/middle-content-view-image.jsx +60 -0
  94. package/project/client/components/middle/content/middle-content-view-other.jsx +60 -0
  95. package/project/client/components/middle/content/middle-content-view-text.jsx +60 -0
  96. package/project/client/components/middle/content/middle-content-view-video.jsx +60 -0
  97. package/project/client/components/middle/content/middle-content-view.jsx +111 -0
  98. package/project/client/components/middle/content/middle-content.jsx +39 -0
  99. package/project/client/components/middle/middle-not-found.jsx +24 -0
  100. package/project/client/components/middle/middle-sut-fut-filter.jsx +90 -0
  101. package/project/client/components/middle/middle.jsx +90 -0
  102. package/project/client/components/middle/middle_sidebar.jsx +256 -0
  103. package/project/client/components/middle/plugins/middle-plugins.jsx +64 -0
  104. package/project/client/components/middle/plus-services/middle-plus-services.jsx +63 -0
  105. package/project/client/components/middle/repos/middle-repos-toolbar.jsx +137 -0
  106. package/project/client/components/middle/repos/middle-repos-view.jsx +47 -0
  107. package/project/client/components/middle/repos/middle-repos.jsx +36 -0
  108. package/project/client/components/middle/stack-editor/middle-stack-editor-sidebar.jsx +101 -0
  109. package/project/client/components/middle/stack-editor/middle-stack-editor-toolbar.jsx +525 -0
  110. package/project/client/components/middle/stack-editor/middle-stack-editor-view.jsx +156 -0
  111. package/project/client/components/middle/stack-editor/middle-stack-editor.jsx +38 -0
  112. package/project/client/components/middle/staging/helper.js +58 -0
  113. package/project/client/components/middle/staging/middle-staging-modal-interface-create.jsx +244 -0
  114. package/project/client/components/middle/staging/middle-staging-modal-interface-delete.jsx +186 -0
  115. package/project/client/components/middle/staging/middle-staging-toolbar.jsx +267 -0
  116. package/project/client/components/middle/staging/middle-staging-view.jsx +67 -0
  117. package/project/client/components/middle/staging/middle-staging.jsx +40 -0
  118. package/project/client/components/middle/staging/tabs/middle-staging-tab-logical.jsx +27 -0
  119. package/project/client/components/middle/staging/tabs/middle-staging-tab-report.jsx +62 -0
  120. package/project/client/components/middle/staging/tabs/middle-staging-tab-repos.jsx +96 -0
  121. package/project/client/components/middle/staging/tabs/middle-staging-tab-setup.jsx +73 -0
  122. package/project/client/components/middle/start/middle-start-toolbar.jsx +134 -0
  123. package/project/client/components/middle/start/middle-start-view.jsx +335 -0
  124. package/project/client/components/middle/start/middle-start.jsx +36 -0
  125. package/project/client/components/middle/system-under-test/middle-system-under-test-toolbar.jsx +171 -0
  126. package/project/client/components/middle/system-under-test/middle-system-under-test-view-multi.jsx +119 -0
  127. package/project/client/components/middle/system-under-test/middle-system-under-test-view-single.jsx +85 -0
  128. package/project/client/components/middle/system-under-test/middle-system-under-test.jsx +40 -0
  129. package/project/client/components/middle/system-under-test/tabs/middle-system-under-test-tab-instances.jsx +164 -0
  130. package/project/client/components/middle/system-under-test/tabs/middle-system-under-test-tab-nodes.jsx +160 -0
  131. package/project/client/components/middle/system-under-test/tabs/middle-system-under-test-tab-specification.jsx +463 -0
  132. package/project/client/components/middle/test-cases/general-helpers/actors-sorting.js +52 -0
  133. package/project/client/components/middle/test-cases/middle-test-cases-not-found.jsx +51 -0
  134. package/project/client/components/middle/test-cases/middle-test-cases-toolbar.jsx +804 -0
  135. package/project/client/components/middle/test-cases/middle-test-cases-view-columns.jsx +222 -0
  136. package/project/client/components/middle/test-cases/middle-test-cases-view-fut.jsx +105 -0
  137. package/project/client/components/middle/test-cases/middle-test-cases-view-recent.jsx +74 -0
  138. package/project/client/components/middle/test-cases/middle-test-cases-view-sut.jsx +98 -0
  139. package/project/client/components/middle/test-cases/middle-test-cases-view-tc.jsx +108 -0
  140. package/project/client/components/middle/test-cases/middle-test-cases-view-test-case.jsx +104 -0
  141. package/project/client/components/middle/test-cases/middle-test-cases.jsx +59 -0
  142. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-analyze.jsx +289 -0
  143. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-debug.jsx +699 -0
  144. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-definition.jsx +103 -0
  145. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-execution.jsx +321 -0
  146. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-log.jsx +150 -0
  147. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-sequence-diagram.jsx +160 -0
  148. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-specification.jsx +472 -0
  149. package/project/client/components/middle/test-data/middle-test-data-toolbar.jsx +135 -0
  150. package/project/client/components/middle/test-data/middle-test-data-view-environment.jsx +64 -0
  151. package/project/client/components/middle/test-data/middle-test-data-view-general.jsx +61 -0
  152. package/project/client/components/middle/test-data/middle-test-data-view-output.jsx +60 -0
  153. package/project/client/components/middle/test-data/middle-test-data-view-system.jsx +61 -0
  154. package/project/client/components/middle/test-data/middle-test-data-view.jsx +98 -0
  155. package/project/client/components/middle/test-data/middle-test-data.jsx +39 -0
  156. package/project/client/components/middle/test-suites/middle-test-suites-toolbar.jsx +524 -0
  157. package/project/client/components/middle/test-suites/middle-test-suites-view-columns.jsx +222 -0
  158. package/project/client/components/middle/test-suites/middle-test-suites-view-fut.jsx +105 -0
  159. package/project/client/components/middle/test-suites/middle-test-suites-view-recent.jsx +74 -0
  160. package/project/client/components/middle/test-suites/middle-test-suites-view-sut.jsx +96 -0
  161. package/project/client/components/middle/test-suites/middle-test-suites-view-test-suite.jsx +593 -0
  162. package/project/client/components/middle/test-suites/middle-test-suites-view-ts.jsx +109 -0
  163. package/project/client/components/middle/test-suites/middle-test-suites.jsx +55 -0
  164. package/project/client/components/middle/test-suites/tabs/middle-test-suites-tab-definition.jsx +74 -0
  165. package/project/client/components/middle/test-suites/tabs/middle-test-suites-tab-execution.jsx +544 -0
  166. package/project/client/components/middle/test-suites/tabs/middle-test-suites-tab-log.jsx +118 -0
  167. package/project/client/components/middle/test-suites/tabs/middle-test-suites-tab-sequence-diagram.jsx +155 -0
  168. package/project/client/components/middle/user/middle-user-toolbar.jsx +32 -0
  169. package/project/client/components/middle/user/middle-user-view.jsx +32 -0
  170. package/project/client/components/middle/user/middle-user.jsx +39 -0
  171. package/project/client/components/middle/videos/middle-videos-view.jsx +135 -0
  172. package/project/client/components/middle/videos/middle-videos.jsx +32 -0
  173. package/project/client/css/components/component-video.css +15 -0
  174. package/project/client/css/components/modal-dialog-file.css +4 -0
  175. package/project/client/css/footer/footer-info.css +18 -0
  176. package/project/client/css/footer/footer-logo.css +39 -0
  177. package/project/client/css/from-code-editor/sidebar-dark.css +20 -0
  178. package/project/client/css/from-code-editor/sidebar-light.css +18 -0
  179. package/project/client/css/from-code-editor/tab.css +19 -0
  180. package/project/client/css/from-code-editor/tab_dark.css +9 -0
  181. package/project/client/css/from-code-editor/tab_light.css +9 -0
  182. package/project/client/css/from-code-editor/view-dark.css +11 -0
  183. package/project/client/css/from-code-editor/view-light.css +10 -0
  184. package/project/client/css/header/header-status.css +114 -0
  185. package/project/client/css/header/header.css +16 -0
  186. package/project/client/css/log-inner.css +46 -0
  187. package/project/client/css/main.css +4 -0
  188. package/project/client/css/middle/actor-editor.css +30 -0
  189. package/project/client/css/middle/address.css +57 -0
  190. package/project/client/css/middle/content.css +41 -0
  191. package/project/client/css/middle/login.css +118 -0
  192. package/project/client/css/middle/middle-start.css +5 -0
  193. package/project/client/css/middle/middle.css +13 -0
  194. package/project/client/css/middle/middle_sidebar.css +44 -0
  195. package/project/client/css/middle/middle_view.css +41 -0
  196. package/project/client/css/middle/stack-editor.css +30 -0
  197. package/project/client/css/middle/start/middle_start.css +94 -0
  198. package/project/client/css/middle/systems-under-test/systems-under-test-specification.css +48 -0
  199. package/project/client/css/middle/systems-under-test/systems-under-test.css +49 -0
  200. package/project/client/css/middle/test-case-and-test-suite/analyze.css +5 -0
  201. package/project/client/css/middle/test-case-and-test-suite/debug.css +281 -0
  202. package/project/client/css/middle/test-case-and-test-suite/execution.css +7 -0
  203. package/project/client/css/middle/test-case-and-test-suite/log.css +13 -0
  204. package/project/client/css/middle/test-case-and-test-suite/seq-dia.css +13 -0
  205. package/project/client/css/middle/test-cases/test-cases-analyze.css +9 -0
  206. package/project/client/css/middle/test-cases/test-cases-debug.css +61 -0
  207. package/project/client/css/middle/test-cases/test-cases-execution.css +4 -0
  208. package/project/client/css/middle/test-cases/test-cases-specification.css +82 -0
  209. package/project/client/css/middle/test-cases/test-cases.css +189 -0
  210. package/project/client/css/middle/test-data.css +52 -0
  211. package/project/client/css/middle/test-suites.css +525 -0
  212. package/project/client/css/middle/videos/videos.css +37 -0
  213. package/project/client/css/middle_test_cases_screen.css +8 -0
  214. package/project/client/css/middle_toolbar.css +10 -0
  215. package/project/client/css/repos.css +15 -0
  216. package/project/client/css/same_size_as_parent.css +6 -0
  217. package/project/client/css/test.css +116 -0
  218. package/project/client/html/index.html +61 -0
  219. package/project/client/main.jsx +59 -0
  220. package/project/client/stores/abbreviation-store.js +57 -0
  221. package/project/client/stores/actor-editor-store.js +758 -0
  222. package/project/client/stores/addresses-store.js +419 -0
  223. package/project/client/stores/console-store.js +27 -0
  224. package/project/client/stores/content-store.js +237 -0
  225. package/project/client/stores/documentation-store.js +14 -0
  226. package/project/client/stores/education-store.js +14 -0
  227. package/project/client/stores/filter-store.js +30 -0
  228. package/project/client/stores/function-under-test-store.js +58 -0
  229. package/project/client/stores/load-store.js +92 -0
  230. package/project/client/stores/login-store.js +232 -0
  231. package/project/client/stores/plugins-store.js +255 -0
  232. package/project/client/stores/plus-services-store.js +267 -0
  233. package/project/client/stores/repos-store.js +160 -0
  234. package/project/client/stores/stack-editor-store.js +691 -0
  235. package/project/client/stores/system-under-test-store.js +340 -0
  236. package/project/client/stores/test-case-store.js +1118 -0
  237. package/project/client/stores/test-cases-store.js +106 -0
  238. package/project/client/stores/test-data-store.js +181 -0
  239. package/project/client/stores/test-suite-store.js +438 -0
  240. package/project/client/stores/test-suites-store.js +86 -0
  241. package/project/client/stores/workshop-store.js +15 -0
  242. package/project/server/os/os-hardware.js +83 -0
  243. package/project/server/os/os-networks.js +50 -0
  244. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorBuild.js +185 -0
  245. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileDelete.js +21 -0
  246. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileGet.js +18 -0
  247. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileInlineGet.js +60 -0
  248. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileInlineUpdate.js +69 -0
  249. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileNew.js +396 -0
  250. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileRename.js +28 -0
  251. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileUpdate.js +18 -0
  252. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFolderDelete.js +21 -0
  253. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFolderNew.js +19 -0
  254. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFolderUpdate.js +19 -0
  255. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorProjectGet.js +77 -0
  256. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorProjectToggle.js +18 -0
  257. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorProjectUpdate.js +22 -0
  258. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorStacksGet.js +54 -0
  259. package/project/server/plugin-data/addresses/plugin_data_AddressesClientAddressGet.js +19 -0
  260. package/project/server/plugin-data/addresses/plugin_data_AddressesClientAddressUpdate.js +19 -0
  261. package/project/server/plugin-data/addresses/plugin_data_AddressesClientInterfaceGet.js +19 -0
  262. package/project/server/plugin-data/addresses/plugin_data_AddressesClientInterfaceUpdate.js +19 -0
  263. package/project/server/plugin-data/addresses/plugin_data_AddressesDnsGet.js +20 -0
  264. package/project/server/plugin-data/addresses/plugin_data_AddressesDnsUpdate.js +19 -0
  265. package/project/server/plugin-data/addresses/plugin_data_AddressesDstGet.js +19 -0
  266. package/project/server/plugin-data/addresses/plugin_data_AddressesDstUpdate.js +19 -0
  267. package/project/server/plugin-data/addresses/plugin_data_AddressesNetworkInterfaceGet.js +19 -0
  268. package/project/server/plugin-data/addresses/plugin_data_AddressesNetworkInterfaceUpdate.js +19 -0
  269. package/project/server/plugin-data/addresses/plugin_data_AddressesPortsGet.js +19 -0
  270. package/project/server/plugin-data/addresses/plugin_data_AddressesPortsUpdate.js +19 -0
  271. package/project/server/plugin-data/addresses/plugin_data_AddressesServerAddressGet.js +19 -0
  272. package/project/server/plugin-data/addresses/plugin_data_AddressesServerAddressUpdate.js +19 -0
  273. package/project/server/plugin-data/addresses/plugin_data_AddressesServerInterfaceGet.js +19 -0
  274. package/project/server/plugin-data/addresses/plugin_data_AddressesServerInterfaceUpdate.js +19 -0
  275. package/project/server/plugin-data/addresses/plugin_data_AddressesSrcGet.js +38 -0
  276. package/project/server/plugin-data/addresses/plugin_data_AddressesSrcUpdate.js +19 -0
  277. package/project/server/plugin-data/addresses/plugin_data_AddressesSrvGet.js +19 -0
  278. package/project/server/plugin-data/addresses/plugin_data_AddressesSrvUpdate.js +19 -0
  279. package/project/server/plugin-data/addresses/plugin_data_AddressesSutAddressGet.js +19 -0
  280. package/project/server/plugin-data/addresses/plugin_data_AddressesSutAddressUpdate.js +19 -0
  281. package/project/server/plugin-data/addresses/plugin_data_AddressesSutInterfaceGet.js +19 -0
  282. package/project/server/plugin-data/addresses/plugin_data_AddressesSutInterfaceUpdate.js +19 -0
  283. package/project/server/plugin-data/console/plugin_data_ConsoleClear.js +20 -0
  284. package/project/server/plugin-data/content/plugin_data_ContentAudioGet.js +19 -0
  285. package/project/server/plugin-data/content/plugin_data_ContentAudioUpdate.js +19 -0
  286. package/project/server/plugin-data/content/plugin_data_ContentDocumentsGet.js +19 -0
  287. package/project/server/plugin-data/content/plugin_data_ContentDocumentsUpdate.js +19 -0
  288. package/project/server/plugin-data/content/plugin_data_ContentImageGet.js +19 -0
  289. package/project/server/plugin-data/content/plugin_data_ContentImageUpdate.js +19 -0
  290. package/project/server/plugin-data/content/plugin_data_ContentOtherGet.js +19 -0
  291. package/project/server/plugin-data/content/plugin_data_ContentOtherUpdate.js +19 -0
  292. package/project/server/plugin-data/content/plugin_data_ContentTextGet.js +19 -0
  293. package/project/server/plugin-data/content/plugin_data_ContentTextUpdate.js +19 -0
  294. package/project/server/plugin-data/content/plugin_data_ContentVideoGet.js +19 -0
  295. package/project/server/plugin-data/content/plugin_data_ContentVideoUpdate.js +19 -0
  296. package/project/server/plugin-data/function-under-test/plugin_data_FunctionUnderTestAdd.js +60 -0
  297. package/project/server/plugin-data/function-under-test/plugin_data_FunctionUnderTestDelete.js +20 -0
  298. package/project/server/plugin-data/function-under-test/plugin_data_FunctionUnderTestGet.js +92 -0
  299. package/project/server/plugin-data/login/plugin_data_LoginButtonsAdd.js +18 -0
  300. package/project/server/plugin-data/login/plugin_data_LoginButtonsGet.js +18 -0
  301. package/project/server/plugin-data/login/plugin_data_LoginButtonsUpdate.js +18 -0
  302. package/project/server/plugin-data/login/plugin_data_LoginCreateInterfaces.js +73 -0
  303. package/project/server/plugin-data/login/plugin_data_LoginDataGet.js +88 -0
  304. package/project/server/plugin-data/login/plugin_data_LoginDeleteInterfaces.js +38 -0
  305. package/project/server/plugin-data/login/plugin_data_LoginGet.js +22 -0
  306. package/project/server/plugin-data/login/plugin_data_LoginPing.js +72 -0
  307. package/project/server/plugin-data/login/plugin_data_LoginReposGet.js +18 -0
  308. package/project/server/plugin-data/login/plugin_data_LoginUpdate.js +44 -0
  309. package/project/server/plugin-data/login/plugin_data_LoginWsGet.js +39 -0
  310. package/project/server/plugin-data/plugins/plugin_data_PluginsBundleGet.js +34 -0
  311. package/project/server/plugin-data/plugins/plugin_data_PluginsGet.js +26 -0
  312. package/project/server/plugin-data/plus-services/plugin_data_PlusServicesBundleGet.js +34 -0
  313. package/project/server/plugin-data/plus-services/plugin_data_PlusServicesGet.js +78 -0
  314. package/project/server/plugin-data/repos/plugin_data_ReposAnalyzeLocalReposGet.js +142 -0
  315. package/project/server/plugin-data/repos/plugin_data_ReposClone.js +154 -0
  316. package/project/server/plugin-data/repos/plugin_data_ReposGet.js +18 -0
  317. package/project/server/plugin-data/repos/plugin_data_ReposVerifyGit.js +79 -0
  318. package/project/server/plugin-data/repos/repos.js +94 -0
  319. package/project/server/plugin-data/stack-editor/helpers/template.js +351 -0
  320. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorBuild.js +185 -0
  321. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFileDelete.js +21 -0
  322. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFileGet.js +18 -0
  323. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFileNew.js +24 -0
  324. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFileRename.js +27 -0
  325. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFileUpdate.js +18 -0
  326. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFolderDelete.js +21 -0
  327. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFolderNew.js +19 -0
  328. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFolderUpdate.js +19 -0
  329. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorProjectGet.js +77 -0
  330. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorProjectToggle.js +18 -0
  331. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorProjectUpdate.js +22 -0
  332. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorWizard.js +43 -0
  333. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestAdd.js +72 -0
  334. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestDelete.js +20 -0
  335. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestGet.js +138 -0
  336. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestInstancesUpdate.js +21 -0
  337. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestNodesUpdate.js +21 -0
  338. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestRepoAdd.js +46 -0
  339. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestRepoGet.js +57 -0
  340. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestSpecificationUpdate.js +21 -0
  341. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestUpdate.js +24 -0
  342. package/project/server/plugin-data/test-case/debug.js +39 -0
  343. package/project/server/plugin-data/test-case/debugger-api.js +398 -0
  344. package/project/server/plugin-data/test-case/debugger.js +129 -0
  345. package/project/server/plugin-data/test-case/plugin_data_TestCaseActorsFileGet.js +26 -0
  346. package/project/server/plugin-data/test-case/plugin_data_TestCaseAdd.js +74 -0
  347. package/project/server/plugin-data/test-case/plugin_data_TestCaseAnalyze.js +451 -0
  348. package/project/server/plugin-data/test-case/plugin_data_TestCaseButtonsAdd.js +19 -0
  349. package/project/server/plugin-data/test-case/plugin_data_TestCaseButtonsGet.js +19 -0
  350. package/project/server/plugin-data/test-case/plugin_data_TestCaseButtonsUpdate.js +19 -0
  351. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugBreakpointClear.js +56 -0
  352. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugBreakpointClearAll.js +23 -0
  353. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugBreakpointSet.js +118 -0
  354. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugBreakpointUpdate.js +84 -0
  355. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugGet.js +40 -0
  356. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugGetMembers.js +40 -0
  357. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugGetProperty.js +47 -0
  358. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugGetSource.js +29 -0
  359. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugLoad.js +35 -0
  360. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugRun.js +52 -0
  361. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugStart.js +217 -0
  362. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugStop.js +23 -0
  363. package/project/server/plugin-data/test-case/plugin_data_TestCaseDelete.js +20 -0
  364. package/project/server/plugin-data/test-case/plugin_data_TestCaseExecutionStart.js +73 -0
  365. package/project/server/plugin-data/test-case/plugin_data_TestCaseGet.js +118 -0
  366. package/project/server/plugin-data/test-case/plugin_data_TestCaseRecentDelete.js +57 -0
  367. package/project/server/plugin-data/test-case/plugin_data_TestCaseRecentGet.js +20 -0
  368. package/project/server/plugin-data/test-case/plugin_data_TestCaseRecentUpdate.js +62 -0
  369. package/project/server/plugin-data/test-case/plugin_data_TestCaseRename.js +43 -0
  370. package/project/server/plugin-data/test-case/plugin_data_TestCaseSpecificationUpdate.js +21 -0
  371. package/project/server/plugin-data/test-case/plugin_data_TestCaseStacksGet.js +54 -0
  372. package/project/server/plugin-data/test-case/plugin_data_TestCaseUpdate.js +42 -0
  373. package/project/server/plugin-data/test-data/plugin_data_TestDataEnvironmentGet.js +72 -0
  374. package/project/server/plugin-data/test-data/plugin_data_TestDataEnvironmentUpdate.js +19 -0
  375. package/project/server/plugin-data/test-data/plugin_data_TestDataGeneralGet.js +19 -0
  376. package/project/server/plugin-data/test-data/plugin_data_TestDataGeneralUpdate.js +19 -0
  377. package/project/server/plugin-data/test-data/plugin_data_TestDataOutputGet.js +19 -0
  378. package/project/server/plugin-data/test-data/plugin_data_TestDataOutputUpdate.js +19 -0
  379. package/project/server/plugin-data/test-data/plugin_data_TestDataSystemGet.js +19 -0
  380. package/project/server/plugin-data/test-data/plugin_data_TestDataSystemUpdate.js +19 -0
  381. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteAdd.js +51 -0
  382. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteButtonsAdd.js +19 -0
  383. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteButtonsGet.js +18 -0
  384. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteButtonsUpdate.js +18 -0
  385. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteDelete.js +20 -0
  386. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteExecutionStart.js +401 -0
  387. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteGet.js +110 -0
  388. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteRecentDelete.js +54 -0
  389. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteRecentGet.js +18 -0
  390. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteRecentUpdate.js +59 -0
  391. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteUpdate.js +42 -0
  392. package/project/server/plugin-service/platform-fs/plugin_service_Platform-Fs.js +65 -0
  393. package/project/server/plugin-service/platform-fs/verify-or-create-files.js +57 -0
  394. package/repos.json +19 -0
  395. package/server-test-case.js +50 -0
  396. package/settings - Copy (2).json +77 -0
  397. package/settings.json +63 -0
  398. package/workspace/Bundle-AppLayer-client.bld +77 -0
  399. package/workspace/Bundle-AppLayer-cs.bld +37 -0
  400. package/workspace/Client-AppLayer-client-jsx.bld +10 -0
  401. package/workspace/Client-AppLayer-client.bld +10 -0
  402. package/workspace/Client-AppLayer-cs.bld +10 -0
  403. package/workspace/Server-AppLayer-cs.bld +12 -0
  404. package/workspace/Server-AppLayer-server.bld +12 -0
  405. package/workspace/actorjs.wrk +336 -0
  406. package/workspace/clean-all.tsk +11 -0
  407. package/workspace/clean-build.tsk +8 -0
  408. package/workspace/clean-compiled.tsk +9 -0
  409. package/workspace/clean-dist.tsk +7 -0
  410. package/workspace/clean-generated.tsk +7 -0
  411. package/workspace/clean-node.tsk +7 -0
  412. package/workspace/clean-temp.tsk +7 -0
  413. package/workspace/client-css-actorjs-bundle.bld +10 -0
  414. package/workspace/list-debug.tsk +4 -0
  415. package/workspace/list-default.tsk +4 -0
  416. package/workspace/list-redebug.tsk +4 -0
  417. package/workspace/list-release.tsk +4 -0
  418. package/workspace/list-rerelease.tsk +4 -0
  419. package/workspace/list-start.tsk +4 -0
  420. package/workspace/server-html-rc.bld +10 -0
  421. package/workspace/server-image-actorjs-rc.bld +9 -0
  422. package/workspace/simple-help.tsk +5 -0
  423. package/workspace/simple-help.txt +39 -0
@@ -0,0 +1,691 @@
1
+
2
+ 'use strict';
3
+
4
+ import { DataActionStackEditorProjectGet, DataActionStackEditorProjectUpdate, DataActionStackEditorProjectToggle, DataActionStackEditorWizard } from '../actions/action-stack-editor/data-action-stack-editor-project';
5
+ import { DataActionStackEditorFileGet, DataActionStackEditorFileNew, DataActionStackEditorFileRename, DataActionStackEditorFileUpdate, DataActionStackEditorFileDelete, DataActionstackEditorBuild } from '../actions/action-stack-editor/data-action-stack-editor-file';
6
+ import { DataActionStackEditorFolderNew, DataActionStackEditorFolderUpdate, DataActionStackEditorFolderDelete } from '../actions/action-stack-editor/data-action-stack-editor-folder';
7
+ import { ActionStackEditorFileClose } from '../actions/action-stack-editor/action-stack-editor-file';
8
+ import { ActionModalDialogResult } from 'z-abs-complayer-modaldialog-client/client/actions/action-modal-dialog';
9
+ import StoreBaseRealtime from 'z-abs-corelayer-client/client/store/store-base-realtime';
10
+ import Project from 'z-abs-corelayer-cs/clientServer/project';
11
+
12
+
13
+ class StackEditorStore extends StoreBaseRealtime {
14
+ static FOLDER = 'folder';
15
+ static FILE = 'file';
16
+ static FILE_INVALID = 'invalid_file';
17
+
18
+ constructor() {
19
+ super({
20
+ projectGlobal: new Project(),
21
+ projectLocal: new Project(),
22
+ files: new Map(),
23
+ current: {
24
+ file: null,
25
+ folder: null,
26
+ type: '',
27
+ query: null
28
+ },
29
+ build: {
30
+ result: false,
31
+ success: false,
32
+ errors: []
33
+ },
34
+ persistentData: {
35
+ darkMode: false,
36
+ emptyLine: true
37
+ },
38
+ });
39
+ }
40
+
41
+ onActionStackEditorPersistentDataUpdate(action) {
42
+ const persistentData = this.deepCopy(this.state.persistentData);
43
+ const parent = action.parentName ? persistentData[action.parentName] : persistentData;
44
+ parent[action.name] = action.value;
45
+ this.updateState({persistentData: {$set: parent}});
46
+ }
47
+
48
+ onActionStackEditorFileGet(action) {
49
+ const file = this.state.files.get(action.key);
50
+ if(undefined === file) {
51
+ this.sendDataAction(new DataActionStackEditorFileGet(`${action.path}/${action.title}`, action.projectId, action.key, action.title, action.path, action.type));
52
+ }
53
+ else {
54
+ this.updateState(this._exec(action.projectId, (project) => {
55
+ project.select(action.key, true);
56
+ }));
57
+ this.updateState({current: {file: {$set: file}}});
58
+ this.updateState({current: {type: {$set: StackEditorStore.FILE}}});
59
+ this.updateState({build: {result: {$set: false}}});
60
+ action.history(this._generateQuery(action.path, action.title), {replace: true});
61
+ }
62
+ }
63
+
64
+ onActionStackEditorFileSet(action) {
65
+ if(undefined !== action.url) {
66
+ if(undefined !== action.query) {
67
+ this.updateState({current: {query: {$set: this._createQuery(action.url, action.query)}}});
68
+ }
69
+ const node = this._getNode(action.url);
70
+ if(undefined !== node) {
71
+ if(!node.node.folder) {
72
+ const file = this.state.files.get(node.node.key);
73
+ if(undefined === file) {
74
+ this.sendDataAction(new DataActionStackEditorFileGet(action.url, node.projectId, node.node.key, node.node.title, node.node.data.path, node.node.data.type));
75
+ }
76
+ else {
77
+ this.updateState({current: {file: {$set: file}}});
78
+ this.updateState({current: {type: {$set: StackEditorStore.FILE}}});
79
+ }
80
+ }
81
+ else {
82
+ let folder = this._createFolder(node.projectId, node.node);
83
+ this.updateState({current: {folder: {$set: folder}}});
84
+ this.updateState({current: {type: {$set: StackEditorStore.FOLDER}}});
85
+ }
86
+ }
87
+ else {
88
+ this.sendDataAction(new DataActionStackEditorProjectGet(action.url, action.query));
89
+ }
90
+ }
91
+ else {
92
+ this.sendDataAction(new DataActionStackEditorProjectGet());
93
+ this.updateState({current: {file: {$set: null}}});
94
+ this.updateState({current: {folder: {$set: null}}});
95
+ this.updateState({current: {type: {$set: ''}}});
96
+ this.updateState({files: (files) => {
97
+ if(0 !== files.size) {
98
+ files.clear();
99
+ }
100
+ }});
101
+ }
102
+ }
103
+
104
+ onActionStackEditorFileNew(action) {
105
+ this.sendDataAction(new DataActionStackEditorFileNew(action));
106
+ }
107
+
108
+ onActionStackEditorFileAdd(action) {
109
+ this.updateState(this._exec(action.projectId, (project) => {
110
+ const node = project.addFile(action.title, action.path, action.type);
111
+ project.sortParent(node);
112
+ this.sendDataAction(new DataActionStackEditorFileGet(`${node.data.path}/${node.title}`, action.projectId, node.key, node.title, node.data.path, node.data.type));
113
+ }));
114
+ }
115
+
116
+ onActionStackEditorFileRename(action) {
117
+ this.sendDataAction(new DataActionStackEditorFileRename(`${action.path}/${action.title}`, `${action.path}/${action.newTitle}`, action));
118
+ }
119
+
120
+ onActionStackEditorFileUpdate(action) {
121
+ const file = this.state.files.get(action.key);
122
+ this.sendDataAction(new DataActionStackEditorFileUpdate(action.key, file.title, file.path, file.content));
123
+ }
124
+
125
+ onActionStackEditorFileUpdateAll(action) {
126
+ action.keys.forEach((key) => {
127
+ const file = this.state.files.get(key);
128
+ this.sendDataAction(new DataActionStackEditorFileUpdate(key, file.title, file.path, file.content));
129
+ });
130
+ }
131
+
132
+ onActionStackEditorFileEdit(action) {
133
+ const file = this.state.files.get(action.key);
134
+ this.updateState({current: {file: { content: {$set: action.content}}}});
135
+ this.updateState({current: {file: { codeChanged: {$set: action.content !== file.contentOriginal}}}});
136
+ this.updateState({files: (files) => {
137
+ files.set(action.key, this.state.current.file);
138
+ }});
139
+ this.updateState({build: {result: {$set: false}}});
140
+ }
141
+
142
+ onActionStackEditorFileClose(action) {
143
+ const file = this.state.files.get(action.key);
144
+ const nextFile = this._getNextFile(file);
145
+ this.updateState({files: (files) => {
146
+ files.delete(action.key);
147
+ }});
148
+ if(undefined !== nextFile) {
149
+ this.updateState({current: {file: {$set: nextFile}}});
150
+ this.updateState({current: {type: {$set: StackEditorStore.FILE}}});
151
+ action.history(this._generateQuery(nextFile.path, nextFile.title), {replace: true});
152
+ }
153
+ else {
154
+ this.updateState({current: {file: {$set: null}}});
155
+ this.updateState({current: {folder: {$set: null}}});
156
+ this.updateState({current: {type: {$set: ''}}});
157
+ action.history('.', {replace: true});
158
+ }
159
+ }
160
+
161
+ onActionStackEditorFileRemove(action) {
162
+ const file = this.state.files.get(action.key) || this.state.current.file;
163
+ const nextFile = this._getNextFile(file);
164
+ this.updateState({files: (files) => {
165
+ files.delete(action.key);
166
+ }});
167
+ this.updateState(this._exec(action.projectId, (project) => {
168
+ project.removeNode(file.path, file.key);
169
+ }));
170
+ if(undefined !== nextFile) {
171
+ this.updateState({current: {file: {$set: nextFile}}});
172
+ this.updateState({current: {type: {$set: StackEditorStore.FILE}}});
173
+ action.history(this._generateQuery(nextFile.path, nextFile.title), {replace: true});
174
+ }
175
+ else {
176
+ const node = this._getNode(file.path);
177
+ const folder = this._createFolder(node.projectId, node.node);
178
+ this.updateState({current: {file: {$set: null}}});
179
+ this.updateState({current: {folder: {$set: folder}}});
180
+ this.updateState({current: {type: {$set: StackEditorStore.FOLDER}}});
181
+ action.history(this._generateQuery(folder.data.path, folder.title), {replace: true});
182
+ }
183
+ }
184
+
185
+ onActionStackEditorFileDelete(action) {
186
+ const file = this.state.files.get(action.key);
187
+ this.sendDataAction(new DataActionStackEditorFileDelete(`${file.path}/${file.title}`, action));
188
+ }
189
+
190
+ onActionStackEditorFolderGet(action) {
191
+ const node = this.getProject(action.projectId).findNode(`${action.data.path}/${action.title}` );
192
+ const folder = this._createFolder(action.projectId, node);
193
+ this.updateState(this._exec(action.projectId, (project) => {
194
+ project.select(action.key, true);
195
+ }));
196
+ this.updateState({current: {folder: {$set: folder}}});
197
+ this.updateState({current: {type: {$set: StackEditorStore.FOLDER}}});
198
+ this.updateState({build: {result: {$set: false}}});
199
+ action.history(this._generateQuery(folder.data.path, folder.title), {replace: true});
200
+ }
201
+
202
+ onActionStackEditorFolderNew(action) {
203
+ this.sendDataAction(new DataActionStackEditorFolderNew(action));
204
+ }
205
+
206
+ onActionStackEditorFolderAdd(action) {
207
+ let node;
208
+ this.updateState(this._exec(action.projectId, (project) => {
209
+ node = project.addFolder(action.title, action.data);
210
+ project.sortParent(node);
211
+ }));
212
+ const folder = this._createFolder(action.projectId, node);
213
+ this.updateState({current: {folder: {$set: folder}}});
214
+ this.updateState({current: {type: {$set: StackEditorStore.FOLDER}}});
215
+ action.history(this._generateQuery(folder.data.path, folder.title), {replace: true});
216
+ }
217
+
218
+ onActionStackEditorFolderUpdate(action) {
219
+ this.sendDataAction(new DataActionStackEditorFolderUpdate(`${action.data.path}/${action.title}`, `${action.data.path}/${action.newTitle}`, action));
220
+ }
221
+
222
+ onActionStackEditorFolderRemove(action) {
223
+ const node = this._getNode(`${action.data.path}/${action.title}`);
224
+ const children = this.getProject(node.projectId).getAllFileChildren(node.node);
225
+
226
+ children.forEach((child) => {
227
+ const file = this.state.files.get(child.key);
228
+ if(undefined !== file) {
229
+ this.onActionStackEditorFileClose(new ActionStackEditorFileClose(child.key));
230
+ }
231
+ });
232
+
233
+ const nodeParent = this._getNode(node.node.data.path);
234
+ const folder = this._createFolder(nodeParent.projectId, nodeParent.node);
235
+
236
+ this.updateState(this._exec(action.projectId, (project) => {
237
+ project.removeNode(action.data.path, action.key);
238
+ }));
239
+
240
+ this.updateState({current: {folder: {$set: folder}}});
241
+ this.updateState({current: {type: {$set: StackEditorStore.FOLDER}}});
242
+ action.history(this._generateQuery(folder.data.path, folder.title), {replace: true});
243
+ }
244
+
245
+ onActionStackEditorFolderDelete(action) {
246
+ this.sendDataAction(new DataActionStackEditorFolderDelete(action));
247
+ }
248
+
249
+ onActionStackEditorFileMove(action) {
250
+ let found = false;
251
+ let foundFromKey = false;
252
+ let foundToKey = false;
253
+ let newMap = new Map();
254
+ let fromFile = null;
255
+ this.state.files.forEach((file, key) => {
256
+ if(!found) {
257
+ if(action.fromKey === key) {
258
+ foundFromKey = true;
259
+ found = true;
260
+ }
261
+ else if(action.toKey === key) {
262
+ fromFile = this.state.files.get(action.fromKey);
263
+ newMap.set(action.fromKey, fromFile);
264
+ newMap.set(action.toKey, file);
265
+ foundToKey = true;
266
+ found = true;
267
+ }
268
+ else {
269
+ newMap.set(key, file);
270
+ }
271
+ }
272
+ else {
273
+ if(foundFromKey) {
274
+ if(action.toKey === key) {
275
+ newMap.set(action.toKey, file);
276
+ fromFile = this.state.files.get(action.fromKey);
277
+ newMap.set(action.fromKey, fromFile);
278
+ }
279
+ else if(action.fromKey !== key) {
280
+ newMap.set(key, file);
281
+ }
282
+ }
283
+ else if(foundToKey) {
284
+ if(action.fromKey !== key) {
285
+ newMap.set(key, file);
286
+ }
287
+ }
288
+ }
289
+ });
290
+ this.updateState({files: {$set: newMap}});
291
+ this.updateState({current: {file: {$set: fromFile}}});
292
+ this.updateState({current: {type: {$set: StackEditorStore.FILE}}});
293
+ action.history(`/${fromFile.path}/${fromFile.title}`, {replace: true});
294
+ }
295
+
296
+ onActionStackEditorProjectGet(action) {
297
+ this.sendDataAction(new DataActionStackEditorProjectGet());
298
+ }
299
+
300
+ onActionStackEditorProjectUpdate(action) {
301
+ if(!this.state.projectGlobal.isSaved()) {
302
+ this.sendDataAction(new DataActionStackEditorProjectUpdate(this.state.projectGlobal.projectId, this.state.projectGlobal.getRootName(), this.state.projectGlobal.source));
303
+ }
304
+ if(!this.state.projectLocal.isSaved()) {
305
+ this.sendDataAction(new DataActionStackEditorProjectUpdate(this.state.projectLocal.projectId, this.state.projectLocal.getRootName(), this.state.projectLocal.source));
306
+ }
307
+ }
308
+
309
+ onActionStackEditorProjectToggle(action) {
310
+ this.updateState(this._exec(action.projectId, (project) => {
311
+ project.toggle(action.key, action.expanded);
312
+ }));
313
+ const project = this.getProject(action.projectId);
314
+ this.sendDataAction(new DataActionStackEditorProjectToggle(action, project.source, project.getRootName()));
315
+ }
316
+
317
+ onActionStackEditorWizard(action) {
318
+ this.sendDataAction(new DataActionStackEditorWizard(action));
319
+ }
320
+
321
+ onActionStackEditorBuild(action) {
322
+ this.sendDataAction(new DataActionstackEditorBuild(this.state.current.file.content, this.state.current.file.path, this.state.current.file.title, action));
323
+ }
324
+
325
+ onDataActionStackEditorFileGet(action) {
326
+ const response = action.getResponse();
327
+ if(response.isSuccess()) {
328
+ if(this.state.current.file?.key !== action.key) {
329
+ const file = {
330
+ projectId: action.projectId,
331
+ key: action.key,
332
+ title: action.title,
333
+ path: action.path,
334
+ type: action.type,
335
+ content: response.data,
336
+ contentOriginal: response.data,
337
+ codeChanged: false,
338
+ codeBuilt: false
339
+ };
340
+ this.updateState(this._exec(action.projectId, (project) => {
341
+ project.select(action.key, true);
342
+ }));
343
+ this.updateState({files: (files) => { files.set(action.key, file); }});
344
+ this.updateState({current: {file: {$set: file}}});
345
+ this.updateState({current: {type: {$set: StackEditorStore.FILE}}});
346
+ this.updateState({build: {result: {$set: false}}});
347
+ this.updateState(this._exec(action.projectId, (project) => {
348
+ const node = project.findNode(`${action.path}/${action.title}`);
349
+ node.data.valid = true;
350
+ }));
351
+ action.history(this._generateQuery(action.path, action.title), {replace: true});
352
+ }
353
+ }
354
+ else {
355
+ this.updateState(this._exec(action.projectId, (project) => {
356
+ const node = project.findNode(`${action.path}/${action.title}`);
357
+ node.data.valid = false;
358
+ }));
359
+ const file = {
360
+ projectId: action.projectId,
361
+ key: action.key,
362
+ title: action.title,
363
+ path: action.path,
364
+ type: action.type,
365
+ codeChanged: false,
366
+ codeBuilt: false
367
+ };
368
+ this.updateState(this._exec(action.projectId, (project) => {
369
+ project.select(action.key, true);
370
+ }));
371
+ this.updateState({current: {file: {$set: file}}});
372
+ this.updateState({current: {type: {$set: StackEditorStore.FILE_INVALID}}});
373
+ this.updateState({build: {result: {$set: false}}});
374
+ action.history(this._generateQuery(action.path, action.title), {replace: true});
375
+ }
376
+ }
377
+
378
+ onDataActionStackEditorFileNew(action) {
379
+ const response = action.getResponse();
380
+ if(response.isSuccess()) {
381
+ this.updateState(this._exec(action.projectId, (project) => {
382
+ const node = project.addFile(response.data, action.path, action.type);
383
+ project.sortParent(node);
384
+ this.sendDataAction(new DataActionStackEditorFileGet(`${node.data.path}/${node.title}`, action.projectId, node.key, node.title, node.data.path, node.data.type));
385
+ }));
386
+ }
387
+ }
388
+
389
+ onDataActionStackEditorFileRename(action) {
390
+ const response = action.getResponse();
391
+ if(response.isSuccess()) {
392
+ let node = this._getNode(`${action.path}/${action.title}`);
393
+ this.updateState(this._exec(node.projectId, (project) => {
394
+ project.renameFile(node.node, action.newTitle);
395
+ }));
396
+ let file = this.state.files.get(node.node.key);
397
+ let updatedFile = this.shallowCopy(file);
398
+ updatedFile.title = action.newTitle;
399
+ this.updateState({files: (files) => {
400
+ file = files.set(node.node.key, updatedFile);
401
+ }});
402
+ this.updateState({current: {file: {$set: updatedFile}}});
403
+ action.history(this._generateQuery(updatedFile.path, updatedFile.title), {replace: true});
404
+ }
405
+ }
406
+
407
+ onDataActionStackEditorFileUpdate(action) {
408
+ const response = action.getResponse();
409
+ if(response.isSuccess()) {
410
+ let file = this.state.files.get(action.key);
411
+ if(undefined !== file) {
412
+ let updatedFile = this.shallowCopy(file);
413
+ updatedFile.codeChanged = false;
414
+ updatedFile.contentOriginal = action.content;
415
+ this.updateState({files: (files) => {
416
+ files.set(action.key, updatedFile);
417
+ }});
418
+ if(this.state.current.file.key === action.key) {
419
+ this.updateState({current: {file: {$set: updatedFile}}});
420
+ }
421
+ }
422
+ }
423
+ }
424
+
425
+ onDataActionStackEditorFileDelete(action) {
426
+ const response = action.getResponse();
427
+ if(response.isSuccess()) {
428
+ this.onActionStackEditorFileRemove(action);
429
+ }
430
+ }
431
+
432
+ onDataActionStackEditorFolderNew(action) {
433
+ const response = action.getResponse();
434
+ if(response.isSuccess()) {
435
+ let node;
436
+ this.updateState(this._exec(action.projectId, (project) => {
437
+ node = project.addFolder(action.title, action.data);
438
+ project.sortParent(node);
439
+ }));
440
+ let folder = this._createFolder(action.projectId, node);
441
+ this.updateState({current: {folder: {$set: folder}}});
442
+ this.updateState({current: {type: {$set: StackEditorStore.FOLDER}}});
443
+ action.history(this._generateQuery(folder.data.path, folder.title), {replace: true});
444
+ }
445
+ }
446
+
447
+ onDataActionStackEditorFolderUpdate(action) {
448
+ const response = action.getResponse();
449
+ if(response.isSuccess()) {
450
+ let node = this._getNode(`${action.data.path}/${action.title}`);
451
+ let children = this.getProject(node.projectId).getAllFileChildren(node.node);
452
+ this.updateState(this._exec(node.projectId, (project) => {
453
+ project.renamePathRecursive(node.node, action.newTitle);
454
+ }));
455
+ node = this._getNode(`${action.data.path}/${action.newTitle}`);
456
+ let folder = this._createFolder(node.projectId, node.node);
457
+ this.updateState({current: {folder: {$set: folder}}});
458
+ this.updateState({current: {type: {$set: StackEditorStore.FOLDER}}});
459
+
460
+ children.forEach((child) => {
461
+ let file;
462
+ this.updateState({files: (files) => {
463
+ file = files.get(child.key);
464
+ if(undefined !== file) {
465
+ file = this.shallowCopy(file);
466
+ file.path = child.data.path;
467
+ files.set(child.key, file);
468
+ }
469
+ }});
470
+ if(this.state.current.file && this.state.current.file.key === child.key) {
471
+ this.updateState({current: {file: {$set: file}}});
472
+ }
473
+ });
474
+ action.history(this._generateQuery(folder.data.path, folder.title), {replace: true});
475
+ }
476
+ }
477
+
478
+ onDataActionStackEditorFolderDelete(action) {
479
+ const response = action.getResponse();
480
+ if(response.isSuccess()) {
481
+ this.onActionStackEditorFolderRemove(action);
482
+ }
483
+ }
484
+
485
+ onDataActionStackEditorProjectGet(action) {
486
+ const response = action.getResponse();
487
+ if(response.isSuccess()) {
488
+ this.updateState({projectLocal: (project) => { project.set(response.data[0]); }});
489
+ this.updateState({projectGlobal: (project) => { project.set(response.data[1]); }});
490
+ }
491
+ if(action.url) {
492
+ const node = this._getNode(action.url);
493
+ if(node) {
494
+ if(!node.node.folder) {
495
+ this.sendDataAction(new DataActionStackEditorFileGet(action.url, node.projectId, node.node.key, node.node.title, node.node.data.path, node.node.data.type));
496
+ }
497
+ else {
498
+ const folder = this._createFolder(node.projectId, node.node);
499
+ this.updateState({current: {folder: {$set: folder}}});
500
+ this.updateState({current: {type: {$set: StackEditorStore.FOLDER}}});
501
+ }
502
+ }
503
+ }
504
+ }
505
+
506
+ onDataActionStackEditorProjectUpdate(action) {
507
+ const response = action.getResponse();
508
+ if(response.isSuccess()) {
509
+ this.updateState(this._exec(action.projectId, (project) => {
510
+ project.setSaved();
511
+ }));
512
+ }
513
+ }
514
+
515
+ onDataActionStackEditorWizard(action) {
516
+ const response = action.getResponse();
517
+ if(response.isSuccess()) {
518
+ let node;
519
+ this.updateState(this._exec(action.projectId, (project) => {
520
+ node = project.addFolder(action.name, {
521
+ path: action.path,
522
+ types: ['js'],
523
+ type: 'folder'
524
+ });
525
+ }));
526
+ const folder = this._createFolder(action.projectId, node);
527
+ this.updateState({current: {folder: {$set: folder}}});
528
+ this.updateState({current: {type: {$set: StackEditorStore.FOLDER}}});
529
+
530
+ response.data.forEach((file, index) => {
531
+ this.updateState(this._exec(action.projectId, (project) => {
532
+ const nodeFile = project.addFile(file, `${action.path}/${action.name}`, action.types[index]);
533
+ //this.sendDataAction(new DataActionStackEditorFileGet(`${nodeFile.data.path}/${nodeFile.title}`, action.projectId, nodeFile.key, nodeFile.title, nodeFile.data.path, nodeFile.data.type));
534
+ }));
535
+ });
536
+
537
+ action.history(this._generateQuery(folder.data.path, folder.title), {replace: true});
538
+ }
539
+ }
540
+
541
+ onDataActionStackEditorProjectToggle(action) {
542
+ const response = action.getResponse();
543
+ if(response.isSuccess()) {
544
+ }
545
+ }
546
+
547
+ onDataActionStackEditorBuild(action) {
548
+ const response = action.getResponse();
549
+ if(response.isSuccess()) {
550
+ this.updateState({build: {errors: {$set: []}}});
551
+ const resultChecker = response.data[0];
552
+ /*if('success' === resultChecker.check) {
553
+ this.updateState({build: {checker: {$set: null}}});
554
+ }
555
+ else {
556
+ this.updateState({build: {checker: {$set: resultChecker.err}}});
557
+ }*/
558
+ let success = true;
559
+ const resultBundle = response.data[1];
560
+ if('failure' === resultBundle.check) {
561
+ success = false;
562
+ this.updateState({build: {errors: (errors) => {
563
+ errors.push(resultBundle.err);
564
+ }}});
565
+ }
566
+ const resultJsHints = response.data[2];
567
+ if('failure' === resultJsHints.check) {
568
+ success = false;
569
+ this.updateState({build: {errors: (errors) => {
570
+ resultJsHints.errors.forEach((resultJsHint) => {
571
+ errors.push(resultJsHint);
572
+ });
573
+ }}});
574
+ }
575
+ this.updateState({build: {result: {$set: true}}});
576
+ this.updateState({build: {success: {$set: success}}});
577
+ }
578
+ }
579
+
580
+ getProject(projectId) {
581
+ if(projectId === this.state.projectGlobal.projectId) {
582
+ return this.state.projectGlobal;
583
+ }
584
+ else if(projectId === this.state.projectLocal.projectId) {
585
+ return this.state.projectLocal;
586
+ }
587
+ }
588
+
589
+ _getNextFile(file) {
590
+ let next;
591
+ let mapIter = this.state.files.values();
592
+ let iter = mapIter.next();
593
+ while(!iter.done) {
594
+ if(iter.value.key === file.key) {
595
+ if(undefined !== next) {
596
+ return next;
597
+ }
598
+ else {
599
+ return mapIter.next().value;
600
+ }
601
+ }
602
+ next = iter.value;
603
+ iter = mapIter.next();
604
+ }
605
+ }
606
+
607
+ _getNode(file) {
608
+ let node = this.state.projectGlobal.findNode(file);
609
+ if(undefined !== node) {
610
+ return {
611
+ projectId: this.state.projectGlobal.projectId,
612
+ node: node
613
+ };
614
+ }
615
+ node = this.state.projectLocal.findNode(file);
616
+ if(undefined !== node) {
617
+ return {
618
+ projectId: this.state.projectLocal.projectId,
619
+ node: node
620
+ };
621
+ }
622
+ }
623
+
624
+ _createFolder(projectId, node) {
625
+ return {
626
+ projectId: projectId,
627
+ key: node.key,
628
+ title: node.title,
629
+ data: node.data
630
+ };
631
+ }
632
+
633
+ _exec(projectId, exec) {
634
+ if(projectId === this.state.projectGlobal.projectId) {
635
+ return {projectGlobal: exec};
636
+ }
637
+ else if(projectId === this.state.projectLocal.projectId) {
638
+ return {projectLocal: exec};
639
+ }
640
+ }
641
+
642
+ _createQuery(url, search) {
643
+ const query = {};
644
+ if(search && search.length > 1) {
645
+ const searchs = search.substring(1).split('&');
646
+ if(searchs && searchs.length >= 1) {
647
+ searchs.forEach((searchPart) => {
648
+ const queryParam = searchPart.split('=');
649
+ if(2 === queryParam.length) {
650
+ query[queryParam[0]] = queryParam[1];
651
+ }
652
+ });
653
+ }
654
+ }
655
+ if(undefined !== query && undefined !== query.line) {
656
+ return {
657
+ url: url,
658
+ line: Number.parseInt(query.line),
659
+ type: query.type ? Number.parseInt(query.type) : 0
660
+ }
661
+ }
662
+ }
663
+
664
+ _generateQuery(path, title) {
665
+ const url = `${path}/${title}`
666
+ const query = this.state.current.query;
667
+ if(query && query.url && query.url === url) {
668
+ let queries = [];
669
+ let resultQuery = '';
670
+ if(query.line) {
671
+ queries.push(`line=${query.line}`);
672
+ }
673
+ if(query.type) {
674
+ queries.push(`type=${query.type}`);
675
+ }
676
+ if(0 !== queries.length) {
677
+ resultQuery = `?${queries[0]}`;
678
+ }
679
+ for(let i = 1; i < queries.length; ++i) {
680
+ resultQuery += `&${queries[i]}`;
681
+ }
682
+ return `${url.substring(1)}${resultQuery}`;
683
+ }
684
+ else {
685
+ return url.substring(1);
686
+ }
687
+ }
688
+ }
689
+
690
+
691
+ module.exports = StackEditorStore.export(StackEditorStore);