@joystick.js/cli-canary 0.0.0-canary.201 → 0.0.0-canary.2011

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 (731) hide show
  1. package/.build/getFilesToBuild.js +1 -1
  2. package/.build/index.js +4 -3
  3. package/LICENSE.md +59 -0
  4. package/README.md +45 -4
  5. package/dist/cli.js +2 -76
  6. package/dist/cli.js.map +7 -0
  7. package/dist/commands/build/definition.js +2 -0
  8. package/dist/commands/build/definition.js.map +7 -0
  9. package/dist/commands/build/index.js +2 -0
  10. package/dist/commands/build/index.js.map +7 -0
  11. package/dist/commands/create/build_package_json.js +2 -0
  12. package/dist/commands/create/build_package_json.js.map +7 -0
  13. package/dist/commands/create/definition.js +2 -0
  14. package/dist/commands/create/definition.js.map +7 -0
  15. package/dist/commands/create/index.js +3 -0
  16. package/dist/commands/create/index.js.map +7 -0
  17. package/dist/commands/create/template/api/index.js +6 -0
  18. package/dist/commands/create/template/email/base.css +9 -0
  19. package/dist/commands/create/template/email/base.html +10 -0
  20. package/dist/commands/create/template/email/reset_password.js +20 -0
  21. package/dist/commands/create/template/i18n/en-US.js +14 -0
  22. package/dist/commands/create/template/index.client.js +1 -0
  23. package/dist/commands/create/template/index.css +34 -0
  24. package/dist/{functions/create/templates → commands/create/template}/index.html +2 -3
  25. package/dist/{functions/create/templates → commands/create/template}/index.server.js +6 -6
  26. package/dist/commands/create/template/public/apple-touch-icon-152x152.png +0 -0
  27. package/dist/commands/create/template/public/favicon.ico +0 -0
  28. package/dist/commands/create/template/public/joystick_logo.webp +0 -0
  29. package/dist/{functions/create/templates → commands/create/template}/public/manifest.json +4 -4
  30. package/dist/commands/create/template/public/splash-screen-1024x1024.png +0 -0
  31. package/{src/functions/create/templates → dist/commands/create/template}/ui/components/button/index.js +14 -6
  32. package/{src/functions/create/templates → dist/commands/create/template}/ui/layouts/app/index.js +2 -2
  33. package/dist/commands/create/template/ui/pages/error/index.js +50 -0
  34. package/dist/commands/create/template/ui/pages/index/index.js +121 -0
  35. package/dist/commands/help/definition.js +2 -0
  36. package/dist/commands/help/definition.js.map +7 -0
  37. package/dist/commands/help/index.js +20 -0
  38. package/dist/commands/help/index.js.map +7 -0
  39. package/dist/commands/index.js +2 -0
  40. package/dist/commands/index.js.map +7 -0
  41. package/dist/commands/logout/definition.js +2 -0
  42. package/dist/commands/logout/definition.js.map +7 -0
  43. package/dist/commands/logout/index.js +4 -0
  44. package/dist/commands/logout/index.js.map +7 -0
  45. package/dist/commands/push/check_if_settings_valid.js +2 -0
  46. package/dist/commands/push/check_if_settings_valid.js.map +7 -0
  47. package/dist/commands/push/definition.js +2 -0
  48. package/dist/commands/push/definition.js.map +7 -0
  49. package/dist/commands/push/get_deployment.js +2 -0
  50. package/dist/commands/push/get_deployment.js.map +7 -0
  51. package/dist/commands/push/get_deployment_token.js +2 -0
  52. package/dist/commands/push/get_deployment_token.js.map +7 -0
  53. package/dist/commands/push/get_push_domain.js +2 -0
  54. package/dist/commands/push/get_push_domain.js.map +7 -0
  55. package/dist/commands/push/get_settings_file.js +2 -0
  56. package/dist/commands/push/get_settings_file.js.map +7 -0
  57. package/dist/commands/push/index.js +6 -0
  58. package/dist/commands/push/index.js.map +7 -0
  59. package/dist/commands/push/upload_build_to_push.js +2 -0
  60. package/dist/commands/push/upload_build_to_push.js.map +7 -0
  61. package/dist/commands/push_old/cdn_mirrors.js +2 -0
  62. package/dist/commands/push_old/cdn_mirrors.js.map +7 -0
  63. package/dist/commands/push_old/check_if_settings_valid.js +2 -0
  64. package/dist/commands/push_old/check_if_settings_valid.js.map +7 -0
  65. package/dist/commands/push_old/create_version.js +2 -0
  66. package/dist/commands/push_old/create_version.js.map +7 -0
  67. package/dist/commands/push_old/definition.js +2 -0
  68. package/dist/commands/push_old/definition.js.map +7 -0
  69. package/dist/commands/push_old/get_app_domain.js +2 -0
  70. package/dist/commands/push_old/get_app_domain.js.map +7 -0
  71. package/dist/commands/push_old/get_deployment.js +2 -0
  72. package/dist/commands/push_old/get_deployment.js.map +7 -0
  73. package/dist/commands/push_old/get_provision_domain.js +2 -0
  74. package/dist/commands/push_old/get_provision_domain.js.map +7 -0
  75. package/dist/commands/push_old/get_session_token.js +2 -0
  76. package/dist/commands/push_old/get_session_token.js.map +7 -0
  77. package/dist/commands/push_old/get_settings_file.js +2 -0
  78. package/dist/commands/push_old/get_settings_file.js.map +7 -0
  79. package/dist/commands/push_old/handle_initial_deployment.js +2 -0
  80. package/dist/commands/push_old/handle_initial_deployment.js.map +7 -0
  81. package/dist/commands/push_old/handle_version_deployment.js +2 -0
  82. package/dist/commands/push_old/handle_version_deployment.js.map +7 -0
  83. package/dist/commands/push_old/index.js +9 -0
  84. package/dist/commands/push_old/index.js.map +7 -0
  85. package/dist/commands/push_old/prompts/confirm_deployment.js +18 -0
  86. package/dist/commands/push_old/prompts/confirm_deployment.js.map +7 -0
  87. package/dist/commands/push_old/prompts/session_token.js +6 -0
  88. package/dist/commands/push_old/prompts/session_token.js.map +7 -0
  89. package/dist/commands/push_old/upload_build_to_cdn.js +2 -0
  90. package/dist/commands/push_old/upload_build_to_cdn.js.map +7 -0
  91. package/dist/commands/push_old/validate_deployment.js +2 -0
  92. package/dist/commands/push_old/validate_deployment.js.map +7 -0
  93. package/dist/commands/push_old/validate_push_config.js +2 -0
  94. package/dist/commands/push_old/validate_push_config.js.map +7 -0
  95. package/dist/commands/start/definition.js +2 -0
  96. package/dist/commands/start/definition.js.map +7 -0
  97. package/dist/commands/start/index.js +2 -0
  98. package/dist/commands/start/index.js.map +7 -0
  99. package/dist/commands/test/definition.js +2 -0
  100. package/dist/commands/test/definition.js.map +7 -0
  101. package/dist/commands/test/index.js +2 -0
  102. package/dist/commands/test/index.js.map +7 -0
  103. package/dist/commands/update/definition.js +2 -0
  104. package/dist/commands/update/definition.js.map +7 -0
  105. package/dist/commands/update/index.js +2 -0
  106. package/dist/commands/update/index.js.map +7 -0
  107. package/dist/commands/use/definition.js +2 -0
  108. package/dist/commands/use/definition.js.map +7 -0
  109. package/dist/commands/use/index.js +2 -0
  110. package/dist/commands/use/index.js.map +7 -0
  111. package/dist/index.js +2 -7
  112. package/dist/index.js.map +7 -0
  113. package/dist/lib/build/browser_path_exclusions.js +2 -0
  114. package/dist/lib/build/browser_path_exclusions.js.map +7 -0
  115. package/dist/lib/build/browser_paths.js +2 -0
  116. package/dist/lib/build/browser_paths.js.map +7 -0
  117. package/dist/lib/build/build_files.js +4 -0
  118. package/dist/lib/build/build_files.js.map +7 -0
  119. package/dist/lib/build/copy_paths.js +2 -0
  120. package/dist/lib/build/copy_paths.js.map +7 -0
  121. package/dist/lib/build/get_code_frame.js +2 -0
  122. package/dist/lib/build/get_code_frame.js.map +7 -0
  123. package/dist/lib/build/get_file_operation.js +2 -0
  124. package/dist/lib/build/get_file_operation.js.map +7 -0
  125. package/dist/lib/build/get_files_to_build.js +2 -0
  126. package/dist/lib/build/get_files_to_build.js.map +7 -0
  127. package/dist/lib/build/get_path_platform.js +2 -0
  128. package/dist/lib/build/get_path_platform.js.map +7 -0
  129. package/dist/lib/build/get_platform_safe_path.js +2 -0
  130. package/dist/lib/build/get_platform_safe_path.js.map +7 -0
  131. package/dist/lib/build/get_tar_ignore_list.js +3 -0
  132. package/dist/lib/build/get_tar_ignore_list.js.map +7 -0
  133. package/dist/lib/build/index.js +4 -0
  134. package/dist/lib/build/index.js.map +7 -0
  135. package/dist/lib/build/master_ignore_list.js +2 -0
  136. package/dist/lib/build/master_ignore_list.js.map +7 -0
  137. package/dist/lib/build/minify_file.js +2 -0
  138. package/dist/lib/build/minify_file.js.map +7 -0
  139. package/dist/lib/build/node_paths.js +2 -0
  140. package/dist/lib/build/node_paths.js.map +7 -0
  141. package/dist/lib/build/on_warn.js +11 -0
  142. package/dist/lib/build/on_warn.js.map +7 -0
  143. package/dist/lib/build/plugins/bootstrap_component.js +34 -0
  144. package/dist/lib/build/plugins/bootstrap_component.js.map +7 -0
  145. package/dist/lib/build/plugins/generate_file_dependency_map.js +2 -0
  146. package/dist/lib/build/plugins/generate_file_dependency_map.js.map +7 -0
  147. package/dist/lib/build/plugins/index.js +2 -0
  148. package/dist/lib/build/plugins/index.js.map +7 -0
  149. package/dist/lib/build/plugins/set_component_id.js +3 -0
  150. package/dist/lib/build/plugins/set_component_id.js.map +7 -0
  151. package/dist/lib/build/plugins/update_file_map.js +2 -0
  152. package/dist/lib/build/plugins/update_file_map.js.map +7 -0
  153. package/dist/lib/build/plugins/warn_node_environment.js +4 -0
  154. package/dist/lib/build/plugins/warn_node_environment.js.map +7 -0
  155. package/dist/lib/cli_log.js +14 -0
  156. package/dist/lib/cli_log.js.map +7 -0
  157. package/dist/lib/color_log.js +2 -0
  158. package/dist/lib/color_log.js.map +7 -0
  159. package/dist/lib/command_exists.js +2 -0
  160. package/dist/lib/command_exists.js.map +7 -0
  161. package/dist/lib/constants.js +2 -4
  162. package/dist/lib/constants.js.map +7 -0
  163. package/dist/lib/debounce.js +2 -0
  164. package/dist/lib/debounce.js.map +7 -0
  165. package/dist/lib/decrypt_buffer.js +2 -0
  166. package/dist/lib/decrypt_buffer.js.map +7 -0
  167. package/dist/lib/development_server/ava_config.js +2 -0
  168. package/dist/lib/development_server/ava_config.js.map +7 -0
  169. package/dist/lib/development_server/check_if_port_occupied.js +2 -0
  170. package/dist/lib/development_server/check_if_port_occupied.js.map +7 -0
  171. package/dist/lib/development_server/cleanup.js +2 -0
  172. package/dist/lib/development_server/cleanup.js.map +7 -0
  173. package/dist/lib/development_server/databases/download_database_binary.js +2 -0
  174. package/dist/lib/development_server/databases/download_database_binary.js.map +7 -0
  175. package/dist/lib/development_server/databases/mongodb/available_query_parameters.js +2 -0
  176. package/dist/lib/development_server/databases/mongodb/available_query_parameters.js.map +7 -0
  177. package/dist/lib/development_server/databases/mongodb/build_connection_string.js +2 -0
  178. package/dist/lib/development_server/databases/mongodb/build_connection_string.js.map +7 -0
  179. package/dist/lib/development_server/databases/mongodb/build_query_parameters.js +2 -0
  180. package/dist/lib/development_server/databases/mongodb/build_query_parameters.js.map +7 -0
  181. package/dist/lib/development_server/databases/mongodb/check_connection.js +3 -0
  182. package/dist/lib/development_server/databases/mongodb/check_connection.js.map +7 -0
  183. package/dist/lib/development_server/databases/mongodb/connect.js +2 -0
  184. package/dist/lib/development_server/databases/mongodb/connect.js.map +7 -0
  185. package/dist/lib/development_server/databases/mongodb/index.js +2 -0
  186. package/dist/lib/development_server/databases/mongodb/index.js.map +7 -0
  187. package/dist/lib/development_server/databases/mongodb/installers/linux.js +2 -0
  188. package/dist/lib/development_server/databases/mongodb/installers/linux.js.map +7 -0
  189. package/dist/lib/development_server/databases/mongodb/installers/macos.js +2 -0
  190. package/dist/lib/development_server/databases/mongodb/installers/macos.js.map +7 -0
  191. package/dist/lib/development_server/databases/mongodb/installers/windows.js +2 -0
  192. package/dist/lib/development_server/databases/mongodb/installers/windows.js.map +7 -0
  193. package/dist/lib/development_server/databases/postgresql/check_connection.js +3 -0
  194. package/dist/lib/development_server/databases/postgresql/check_connection.js.map +7 -0
  195. package/dist/lib/development_server/databases/postgresql/connect.js +2 -0
  196. package/dist/lib/development_server/databases/postgresql/connect.js.map +7 -0
  197. package/dist/lib/development_server/databases/postgresql/index.js +3 -0
  198. package/dist/lib/development_server/databases/postgresql/index.js.map +7 -0
  199. package/dist/lib/development_server/databases/postgresql/installers/linux.js +2 -0
  200. package/dist/lib/development_server/databases/postgresql/installers/linux.js.map +7 -0
  201. package/dist/lib/development_server/databases/postgresql/installers/macos.js +2 -0
  202. package/dist/lib/development_server/databases/postgresql/installers/macos.js.map +7 -0
  203. package/dist/lib/development_server/databases/postgresql/installers/windows.js +2 -0
  204. package/dist/lib/development_server/databases/postgresql/installers/windows.js.map +7 -0
  205. package/dist/lib/development_server/databases/provider_map.js +2 -0
  206. package/dist/lib/development_server/databases/provider_map.js.map +7 -0
  207. package/dist/lib/development_server/get_database_process_ids.js +2 -0
  208. package/dist/lib/development_server/get_database_process_ids.js.map +7 -0
  209. package/dist/lib/development_server/get_translations.js +2 -0
  210. package/dist/lib/development_server/get_translations.js.map +7 -0
  211. package/dist/lib/development_server/hmr_server.js +2 -0
  212. package/dist/lib/development_server/hmr_server.js.map +7 -0
  213. package/dist/lib/development_server/index.js +11 -0
  214. package/dist/lib/development_server/index.js.map +7 -0
  215. package/dist/lib/development_server/kill_process_ids.js +2 -0
  216. package/dist/lib/development_server/kill_process_ids.js.map +7 -0
  217. package/dist/lib/development_server/run_tests.js +3 -0
  218. package/dist/lib/development_server/run_tests.js.map +7 -0
  219. package/dist/lib/development_server/start_app_server.js +2 -0
  220. package/dist/lib/development_server/start_app_server.js.map +7 -0
  221. package/dist/lib/development_server/start_databases.js +2 -0
  222. package/dist/lib/development_server/start_databases.js.map +7 -0
  223. package/dist/lib/development_server/start_hmr_server.js +2 -0
  224. package/dist/lib/development_server/start_hmr_server.js.map +7 -0
  225. package/dist/lib/development_server/watch_for_changes/browser_path_exclusions.js +2 -0
  226. package/dist/lib/development_server/watch_for_changes/browser_path_exclusions.js.map +7 -0
  227. package/dist/lib/development_server/watch_for_changes/browser_paths.js +2 -0
  228. package/dist/lib/development_server/watch_for_changes/browser_paths.js.map +7 -0
  229. package/dist/lib/development_server/watch_for_changes/get_after_run_tasks.js +2 -0
  230. package/dist/lib/development_server/watch_for_changes/get_after_run_tasks.js.map +7 -0
  231. package/dist/lib/development_server/watch_for_changes/get_file_codependencies.js +2 -0
  232. package/dist/lib/development_server/watch_for_changes/get_file_codependencies.js.map +7 -0
  233. package/dist/lib/development_server/watch_for_changes/get_platform_safe_path.js +2 -0
  234. package/dist/lib/development_server/watch_for_changes/get_platform_safe_path.js.map +7 -0
  235. package/dist/lib/development_server/watch_for_changes/index.js +2 -0
  236. package/dist/lib/development_server/watch_for_changes/index.js.map +7 -0
  237. package/dist/lib/development_server/watch_for_changes/node_paths.js +2 -0
  238. package/dist/lib/development_server/watch_for_changes/node_paths.js.map +7 -0
  239. package/dist/lib/development_server/watch_for_changes/read_file_dependency_map.js +2 -0
  240. package/dist/lib/development_server/watch_for_changes/read_file_dependency_map.js.map +7 -0
  241. package/dist/lib/development_server/watch_for_changes/watch_paths.js +2 -0
  242. package/dist/lib/development_server/watch_for_changes/watch_paths.js.map +7 -0
  243. package/dist/lib/dynamic_import.js +2 -0
  244. package/dist/lib/dynamic_import.js.map +7 -0
  245. package/dist/lib/encrypt_buffer.js +2 -0
  246. package/dist/lib/encrypt_buffer.js.map +7 -0
  247. package/dist/lib/generate_id.js +2 -0
  248. package/dist/lib/generate_id.js.map +7 -0
  249. package/dist/lib/get_files_in_path.js +2 -0
  250. package/dist/lib/get_files_in_path.js.map +7 -0
  251. package/dist/lib/get_platform_safe_path.js +2 -0
  252. package/dist/lib/get_platform_safe_path.js.map +7 -0
  253. package/dist/lib/get_process_id_from_port.js +3 -0
  254. package/dist/lib/get_process_id_from_port.js.map +7 -0
  255. package/dist/lib/is_valid_json_string.js +2 -0
  256. package/dist/lib/is_valid_json_string.js.map +7 -0
  257. package/dist/lib/kill_port_process.js +2 -0
  258. package/dist/lib/kill_port_process.js.map +7 -0
  259. package/dist/lib/kill_process_id.js +2 -0
  260. package/dist/lib/kill_process_id.js.map +7 -0
  261. package/dist/lib/load_settings.js +2 -0
  262. package/dist/lib/load_settings.js.map +7 -0
  263. package/dist/lib/loader.js +3 -82
  264. package/dist/lib/loader.js.map +7 -0
  265. package/dist/lib/log_bars.js +2 -0
  266. package/dist/lib/log_bars.js.map +7 -0
  267. package/dist/lib/node_path_polyfills.js +2 -0
  268. package/dist/lib/node_path_polyfills.js.map +7 -0
  269. package/dist/lib/parse_args.js +2 -0
  270. package/dist/lib/parse_args.js.map +7 -0
  271. package/dist/lib/parse_options.js +2 -0
  272. package/dist/lib/parse_options.js.map +7 -0
  273. package/dist/lib/path_exists.js +2 -0
  274. package/dist/lib/path_exists.js.map +7 -0
  275. package/dist/lib/rainbow_road.js +2 -0
  276. package/dist/lib/rainbow_road.js.map +7 -0
  277. package/dist/lib/replace_in_files.js +2 -0
  278. package/dist/lib/replace_in_files.js.map +7 -0
  279. package/dist/lib/required_files.js +2 -0
  280. package/dist/lib/required_files.js.map +7 -0
  281. package/dist/lib/serialize_query_parameters.js +2 -0
  282. package/dist/lib/serialize_query_parameters.js.map +7 -0
  283. package/dist/lib/types.js +2 -6
  284. package/dist/lib/types.js.map +7 -0
  285. package/dist/lib/unique_array.js +2 -0
  286. package/dist/lib/unique_array.js.map +7 -0
  287. package/increment_version.js +3 -0
  288. package/package.json +21 -40
  289. package/src/cli.js +69 -51
  290. package/src/commands/build/definition.js +58 -0
  291. package/src/commands/build/index.js +7 -0
  292. package/src/commands/create/build_package_json.js +20 -0
  293. package/src/commands/create/definition.js +35 -0
  294. package/src/commands/create/index.js +71 -0
  295. package/src/commands/create/template/api/index.js +6 -0
  296. package/src/commands/create/template/email/base.css +9 -0
  297. package/src/commands/create/template/email/base.html +10 -0
  298. package/src/commands/create/template/email/reset_password.js +20 -0
  299. package/src/commands/create/template/i18n/en-US.js +14 -0
  300. package/src/commands/create/template/index.client.js +1 -0
  301. package/src/commands/create/template/index.css +34 -0
  302. package/src/{functions/create/templates → commands/create/template}/index.html +2 -3
  303. package/src/{functions/create/templates → commands/create/template}/index.server.js +6 -6
  304. package/src/commands/create/template/public/apple-touch-icon-152x152.png +0 -0
  305. package/src/commands/create/template/public/favicon.ico +0 -0
  306. package/src/commands/create/template/public/joystick_logo.webp +0 -0
  307. package/src/{functions/create/templates → commands/create/template}/public/manifest.json +4 -4
  308. package/src/commands/create/template/public/splash-screen-1024x1024.png +0 -0
  309. package/{dist/functions/create/templates → src/commands/create/template}/ui/components/button/index.js +14 -6
  310. package/{dist/functions/create/templates → src/commands/create/template}/ui/layouts/app/index.js +2 -2
  311. package/src/commands/create/template/ui/pages/error/index.js +50 -0
  312. package/src/commands/create/template/ui/pages/index/index.js +121 -0
  313. package/src/commands/help/definition.js +12 -0
  314. package/src/commands/help/index.js +48 -0
  315. package/src/commands/index.js +25 -0
  316. package/src/commands/logout/definition.js +10 -0
  317. package/src/commands/logout/index.js +20 -0
  318. package/src/commands/push/check_if_settings_valid.js +10 -0
  319. package/src/commands/push/definition.js +58 -0
  320. package/src/commands/push/get_deployment.js +19 -0
  321. package/src/commands/push/get_deployment_token.js +30 -0
  322. package/src/commands/push/get_push_domain.js +8 -0
  323. package/src/commands/push/get_settings_file.js +47 -0
  324. package/src/commands/push/index.js +102 -0
  325. package/src/commands/push/upload_build_to_push.js +37 -0
  326. package/src/commands/push_old/cdn_mirrors.js +7 -0
  327. package/src/commands/push_old/check_if_settings_valid.js +10 -0
  328. package/src/commands/push_old/create_version.js +20 -0
  329. package/src/commands/push_old/definition.js +43 -0
  330. package/src/commands/push_old/get_app_domain.js +11 -0
  331. package/src/commands/push_old/get_deployment.js +19 -0
  332. package/src/commands/push_old/get_provision_domain.js +9 -0
  333. package/src/commands/push_old/get_session_token.js +31 -0
  334. package/src/commands/push_old/get_settings_file.js +47 -0
  335. package/src/commands/push_old/handle_initial_deployment.js +24 -0
  336. package/src/commands/push_old/handle_version_deployment.js +23 -0
  337. package/src/commands/push_old/index.js +190 -0
  338. package/src/commands/push_old/prompts/confirm_deployment.js +73 -0
  339. package/src/commands/push_old/prompts/session_token.js +11 -0
  340. package/src/commands/push_old/upload_build_to_cdn.js +59 -0
  341. package/src/commands/push_old/validate_deployment.js +19 -0
  342. package/src/commands/push_old/validate_push_config.js +18 -0
  343. package/src/commands/start/definition.js +83 -0
  344. package/src/commands/start/index.js +12 -0
  345. package/src/commands/test/definition.js +28 -0
  346. package/src/commands/test/index.js +12 -0
  347. package/src/commands/update/definition.js +28 -0
  348. package/src/commands/update/index.js +29 -0
  349. package/src/commands/use/definition.js +19 -0
  350. package/src/commands/use/index.js +54 -0
  351. package/src/index.js +0 -0
  352. package/src/lib/build/browser_path_exclusions.js +8 -0
  353. package/src/lib/build/browser_paths.js +11 -0
  354. package/src/lib/build/build_files.js +167 -0
  355. package/src/{functions/start/filesToCopy.js → lib/build/copy_paths.js} +7 -5
  356. package/src/lib/build/get_code_frame.js +11 -0
  357. package/src/lib/build/get_file_operation.js +25 -0
  358. package/src/lib/build/get_files_to_build.js +41 -0
  359. package/src/lib/build/get_path_platform.js +32 -0
  360. package/src/lib/build/get_platform_safe_path.js +6 -0
  361. package/src/lib/build/get_tar_ignore_list.js +41 -0
  362. package/src/lib/build/index.js +137 -0
  363. package/src/lib/build/master_ignore_list.js +14 -0
  364. package/src/lib/build/minify_file.js +22 -0
  365. package/src/lib/build/node_paths.js +20 -0
  366. package/src/lib/build/on_warn.js +70 -0
  367. package/src/lib/build/plugins/bootstrap_component.js +191 -0
  368. package/src/lib/build/plugins/generate_file_dependency_map.js +20 -0
  369. package/src/lib/build/plugins/index.js +26 -0
  370. package/src/lib/build/plugins/set_component_id.js +89 -0
  371. package/src/lib/build/plugins/update_file_map.js +98 -0
  372. package/src/lib/build/plugins/warn_node_environment.js +20 -0
  373. package/src/lib/{CLILog.js → cli_log.js} +12 -8
  374. package/src/lib/color_log.js +7 -0
  375. package/src/lib/command_exists.js +16 -0
  376. package/src/lib/constants.js +11 -1
  377. package/src/lib/debounce.js +9 -0
  378. package/src/lib/decrypt_buffer.js +12 -0
  379. package/src/lib/{dev/tests.config.js → development_server/ava_config.js} +9 -3
  380. package/src/lib/development_server/check_if_port_occupied.js +31 -0
  381. package/src/lib/development_server/cleanup.js +15 -0
  382. package/src/lib/development_server/databases/download_database_binary.js +35 -0
  383. package/src/lib/{dev/databases/mongodb/availableQueryParameters.js → development_server/databases/mongodb/available_query_parameters.js} +3 -1
  384. package/src/lib/development_server/databases/mongodb/build_connection_string.js +36 -0
  385. package/src/lib/development_server/databases/mongodb/build_query_parameters.js +17 -0
  386. package/src/lib/development_server/databases/mongodb/check_connection.js +46 -0
  387. package/src/lib/development_server/databases/mongodb/connect.js +27 -0
  388. package/src/lib/development_server/databases/mongodb/index.js +102 -0
  389. package/src/lib/development_server/databases/mongodb/installers/linux.js +107 -0
  390. package/src/lib/development_server/databases/mongodb/installers/macos.js +109 -0
  391. package/src/lib/development_server/databases/mongodb/installers/windows.js +90 -0
  392. package/src/lib/development_server/databases/postgresql/check_connection.js +56 -0
  393. package/src/lib/development_server/databases/postgresql/connect.js +33 -0
  394. package/src/lib/development_server/databases/postgresql/index.js +157 -0
  395. package/src/lib/development_server/databases/postgresql/installers/linux.js +80 -0
  396. package/src/lib/development_server/databases/postgresql/installers/macos.js +91 -0
  397. package/src/lib/development_server/databases/postgresql/installers/windows.js +83 -0
  398. package/src/lib/development_server/databases/provider_map.js +15 -0
  399. package/src/lib/development_server/get_database_process_ids.js +28 -0
  400. package/src/lib/development_server/get_translations.js +85 -0
  401. package/src/lib/development_server/hmr_server.js +94 -0
  402. package/src/lib/development_server/index.js +438 -0
  403. package/src/lib/development_server/kill_process_ids.js +8 -0
  404. package/src/lib/development_server/run_tests.js +84 -0
  405. package/src/lib/development_server/start_app_server.js +60 -0
  406. package/src/lib/development_server/start_databases.js +98 -0
  407. package/src/lib/development_server/start_hmr_server.js +36 -0
  408. package/src/lib/development_server/watch_for_changes/browser_path_exclusions.js +8 -0
  409. package/src/lib/development_server/watch_for_changes/browser_paths.js +11 -0
  410. package/src/lib/development_server/watch_for_changes/get_after_run_tasks.js +36 -0
  411. package/src/lib/development_server/watch_for_changes/get_file_codependencies.js +53 -0
  412. package/src/lib/development_server/watch_for_changes/get_platform_safe_path.js +6 -0
  413. package/src/lib/development_server/watch_for_changes/index.js +222 -0
  414. package/src/lib/development_server/watch_for_changes/node_paths.js +18 -0
  415. package/src/lib/development_server/watch_for_changes/read_file_dependency_map.js +18 -0
  416. package/src/lib/development_server/watch_for_changes/watch_paths.js +23 -0
  417. package/src/lib/dynamic_import.js +6 -0
  418. package/src/lib/encrypt_buffer.js +10 -0
  419. package/src/lib/generate_id.js +15 -0
  420. package/src/lib/get_files_in_path.js +25 -0
  421. package/src/lib/get_platform_safe_path.js +8 -0
  422. package/src/lib/get_process_id_from_port.js +26 -0
  423. package/src/lib/is_valid_json_string.js +10 -0
  424. package/src/lib/kill_port_process.js +12 -0
  425. package/src/lib/kill_process_id.js +19 -0
  426. package/src/lib/load_settings.js +43 -0
  427. package/src/lib/loader.js +4 -77
  428. package/src/lib/log_bars.js +7 -0
  429. package/src/lib/node_path_polyfills.js +23 -0
  430. package/src/lib/parse_args.js +16 -0
  431. package/src/lib/parse_options.js +16 -0
  432. package/src/lib/path_exists.js +11 -0
  433. package/src/lib/{rainbowRoad.js → rainbow_road.js} +4 -2
  434. package/src/lib/replace_in_files.js +40 -0
  435. package/src/lib/{dev/requiredFiles.js → required_files.js} +3 -1
  436. package/src/lib/serialize_query_parameters.js +7 -0
  437. package/src/lib/types.js +59 -2
  438. package/src/lib/unique_array.js +24 -0
  439. package/HMRNOTES.txt +0 -23
  440. package/_package.json +0 -55
  441. package/canary.js +0 -12
  442. package/dist/functions/build/getTarIgnoreList.js +0 -25
  443. package/dist/functions/build/index.js +0 -54
  444. package/dist/functions/create/buildPackageJSON.js +0 -20
  445. package/dist/functions/create/index.js +0 -193
  446. package/dist/functions/create/templates/api/index.js +0 -4
  447. package/dist/functions/create/templates/i18n/en-US.js +0 -4
  448. package/dist/functions/create/templates/index.client.js +0 -7
  449. package/dist/functions/create/templates/index.css +0 -20
  450. package/dist/functions/create/templates/public/apple-touch-icon-152x152.png +0 -0
  451. package/dist/functions/create/templates/public/favicon.ico +0 -0
  452. package/dist/functions/create/templates/public/splash-screen-1024x1024.png +0 -0
  453. package/dist/functions/create/templates/ui/pages/error/index.js +0 -31
  454. package/dist/functions/create/templates/ui/pages/index/index.js +0 -94
  455. package/dist/functions/index.js +0 -269
  456. package/dist/functions/logout/index.js +0 -20
  457. package/dist/functions/push/checkIfProvisionAvailable.js +0 -19
  458. package/dist/functions/push/deploy/index.js +0 -173
  459. package/dist/functions/push/deploy/initial.js +0 -100
  460. package/dist/functions/push/deploy/version.js +0 -100
  461. package/dist/functions/push/domains.js +0 -23
  462. package/dist/functions/push/getAvailableCDN.js +0 -23
  463. package/dist/functions/push/getDeployment.js +0 -41
  464. package/dist/functions/push/getDeploymentSummary.js +0 -38
  465. package/dist/functions/push/getInstanceSizeRegions.js +0 -37
  466. package/dist/functions/push/getInstanceSizesForRegion.js +0 -34
  467. package/dist/functions/push/getProviderInstanceSizes.js +0 -34
  468. package/dist/functions/push/getProviderRegions.js +0 -36
  469. package/dist/functions/push/getProvidersWithConnectionStatus.js +0 -20
  470. package/dist/functions/push/getSessionToken.js +0 -23
  471. package/dist/functions/push/getUserFromSessionToken.js +0 -37
  472. package/dist/functions/push/index.js +0 -210
  473. package/dist/functions/push/loginToCheatCode.js +0 -33
  474. package/dist/functions/push/pingProvisionAPI.js +0 -31
  475. package/dist/functions/push/prompts.js +0 -332
  476. package/dist/functions/push/providerMap.js +0 -11
  477. package/dist/functions/push/providers.js +0 -9
  478. package/dist/functions/reset/index.js +0 -0
  479. package/dist/functions/reset/reset.js +0 -127
  480. package/dist/functions/start/bootstrapLayoutComponent.js +0 -54
  481. package/dist/functions/start/bootstrapPageComponent.js +0 -51
  482. package/dist/functions/start/buildFile.js +0 -85
  483. package/dist/functions/start/buildFiles.js +0 -76
  484. package/dist/functions/start/buildPlugins.js +0 -183
  485. package/dist/functions/start/checkIfPortAvailable.js +0 -18
  486. package/dist/functions/start/cleanup/index.js +0 -18
  487. package/dist/functions/start/databases/mongodb/availableQueryParameters.js +0 -42
  488. package/dist/functions/start/databases/mongodb/buildConnectionString.js +0 -22
  489. package/dist/functions/start/databases/mongodb/buildQueryParameters.js +0 -14
  490. package/dist/functions/start/databases/mongodb/checkConnection.js +0 -35
  491. package/dist/functions/start/databases/mongodb/connect.js +0 -25
  492. package/dist/functions/start/databases/mongodb/index.js +0 -93
  493. package/dist/functions/start/databases/postgresql/checkConnection.js +0 -41
  494. package/dist/functions/start/databases/postgresql/connect.js +0 -27
  495. package/dist/functions/start/databases/postgresql/index.js +0 -106
  496. package/dist/functions/start/databases/redis.js +0 -0
  497. package/dist/functions/start/databases/startProvider.js +0 -16
  498. package/dist/functions/start/fileDependencyMapper.js +0 -22
  499. package/dist/functions/start/filesToCopy.js +0 -18
  500. package/dist/functions/start/generateId.js +0 -74
  501. package/dist/functions/start/getCodependenciesForFile.js +0 -64
  502. package/dist/functions/start/getFilesToBuild.js +0 -39
  503. package/dist/functions/start/getProcessIdFromPort.js +0 -60
  504. package/dist/functions/start/hmrServer.js +0 -66
  505. package/dist/functions/start/index.js +0 -11
  506. package/dist/functions/start/isWindows.js +0 -5
  507. package/dist/functions/start/minifyFile.js +0 -12
  508. package/dist/functions/start/onWarn.js +0 -63
  509. package/dist/functions/start/readFileDependencyMap.js +0 -16
  510. package/dist/functions/start/removeDeletedDependenciesFromMap.js +0 -18
  511. package/dist/functions/start/setComponentId.js +0 -46
  512. package/dist/functions/start/updateFileMap.js +0 -67
  513. package/dist/functions/test/index.js +0 -12
  514. package/dist/functions/update/index.js +0 -21
  515. package/dist/functions/use/index.js +0 -61
  516. package/dist/lib/CLILog.js +0 -49
  517. package/dist/lib/build/browserPathExclusions.js +0 -8
  518. package/dist/lib/build/browserPaths.js +0 -11
  519. package/dist/lib/build/buildFile.js +0 -84
  520. package/dist/lib/build/buildFiles.js +0 -242
  521. package/dist/lib/build/buildPlugins.js +0 -186
  522. package/dist/lib/build/getCodeFrame.js +0 -9
  523. package/dist/lib/build/minifyFile.js +0 -12
  524. package/dist/lib/build/nodePathExclusions.js +0 -7
  525. package/dist/lib/build/nodePaths.js +0 -12
  526. package/dist/lib/build/onWarn.js +0 -63
  527. package/dist/lib/build/removeDeletedDependenciesFromMap.js +0 -18
  528. package/dist/lib/build/setComponentId.js +0 -46
  529. package/dist/lib/build/updateFileMap.js +0 -67
  530. package/dist/lib/buildResolvePlugin.js +0 -21
  531. package/dist/lib/checkIfValidJSON.js +0 -11
  532. package/dist/lib/colorLog.js +0 -7
  533. package/dist/lib/dev/cleanup.js +0 -18
  534. package/dist/lib/dev/databases/mongodb/availableQueryParameters.js +0 -42
  535. package/dist/lib/dev/databases/mongodb/buildConnectionString.js +0 -22
  536. package/dist/lib/dev/databases/mongodb/buildQueryParameters.js +0 -14
  537. package/dist/lib/dev/databases/mongodb/checkConnection.js +0 -38
  538. package/dist/lib/dev/databases/mongodb/connect.js +0 -25
  539. package/dist/lib/dev/databases/mongodb/index.js +0 -93
  540. package/dist/lib/dev/databases/postgresql/checkConnection.js +0 -41
  541. package/dist/lib/dev/databases/postgresql/connect.js +0 -27
  542. package/dist/lib/dev/databases/postgresql/index.js +0 -106
  543. package/dist/lib/dev/databases/providerMap.js +0 -15
  544. package/dist/lib/dev/getCodependenciesForFile.js +0 -64
  545. package/dist/lib/dev/getFilesToBuild.js +0 -38
  546. package/dist/lib/dev/hmrServer.js +0 -66
  547. package/dist/lib/dev/index.js +0 -557
  548. package/dist/lib/dev/isWindows.js +0 -5
  549. package/dist/lib/dev/loadSettings.js +0 -79
  550. package/dist/lib/dev/readFileDependencyMap.js +0 -16
  551. package/dist/lib/dev/requiredFiles.js +0 -18
  552. package/dist/lib/dev/runBuild.js +0 -30
  553. package/dist/lib/dev/runTests.js +0 -98
  554. package/dist/lib/dev/startApp.js +0 -72
  555. package/dist/lib/dev/startDatabases.js +0 -109
  556. package/dist/lib/dev/startHMR.js +0 -55
  557. package/dist/lib/dev/tests.config.js +0 -11
  558. package/dist/lib/dev/updateFileMap.js +0 -67
  559. package/dist/lib/dev/validateProject.js +0 -0
  560. package/dist/lib/dev/watchlist.js +0 -15
  561. package/dist/lib/filesToCopy.js +0 -18
  562. package/dist/lib/generateId.js +0 -74
  563. package/dist/lib/getArgs.js +0 -14
  564. package/dist/lib/getOptions.js +0 -15
  565. package/dist/lib/getPlatformSafePath.js +0 -7
  566. package/dist/lib/getProcessIdFromPort.js +0 -60
  567. package/dist/lib/getProvider.js +0 -8
  568. package/dist/lib/help.js +0 -56
  569. package/dist/lib/isObject.js +0 -6
  570. package/dist/lib/isValidJSONString.js +0 -11
  571. package/dist/lib/isWindows.js +0 -5
  572. package/dist/lib/killProcesses.js +0 -0
  573. package/dist/lib/loadSettings.js +0 -33
  574. package/dist/lib/masterIgnoreList.js +0 -16
  575. package/dist/lib/nodeEnvironment.js +0 -9
  576. package/dist/lib/nodeEnvironments.js +0 -8
  577. package/dist/lib/parseCookiesFromLogin.js +0 -18
  578. package/dist/lib/rainbowRoad.js +0 -7
  579. package/dist/lib/readDirectorySync.js +0 -14
  580. package/dist/lib/regexes.js +0 -14
  581. package/dist/lib/replaceBackslashesWithForwardSlashes.js +0 -8
  582. package/dist/lib/replaceFileProtocol.js +0 -8
  583. package/dist/lib/serializeQueryParameters.js +0 -8
  584. package/dist/lib/settings.js +0 -4
  585. package/dist/lib/validateDatabasesFromSettings.js +0 -34
  586. package/dist/lib/wait.js +0 -8
  587. package/release.js +0 -40
  588. package/src/functions/build/getTarIgnoreList.js +0 -30
  589. package/src/functions/build/index.js +0 -63
  590. package/src/functions/create/buildPackageJSON.js +0 -18
  591. package/src/functions/create/index.js +0 -209
  592. package/src/functions/create/templates/api/index.js +0 -4
  593. package/src/functions/create/templates/i18n/en-US.js +0 -4
  594. package/src/functions/create/templates/index.client.js +0 -7
  595. package/src/functions/create/templates/index.css +0 -20
  596. package/src/functions/create/templates/public/apple-touch-icon-152x152.png +0 -0
  597. package/src/functions/create/templates/public/favicon.ico +0 -0
  598. package/src/functions/create/templates/public/splash-screen-1024x1024.png +0 -0
  599. package/src/functions/create/templates/ui/pages/error/index.js +0 -31
  600. package/src/functions/create/templates/ui/pages/index/index.js +0 -94
  601. package/src/functions/index.js +0 -269
  602. package/src/functions/logout/index.js +0 -20
  603. package/src/functions/push/checkIfProvisionAvailable.js +0 -20
  604. package/src/functions/push/deploy/index.js +0 -199
  605. package/src/functions/push/deploy/initial.js +0 -108
  606. package/src/functions/push/deploy/version.js +0 -108
  607. package/src/functions/push/domains.js +0 -23
  608. package/src/functions/push/getAvailableCDN.js +0 -27
  609. package/src/functions/push/getDeployment.js +0 -43
  610. package/src/functions/push/getDeploymentSummary.js +0 -39
  611. package/src/functions/push/getInstanceSizeRegions.js +0 -40
  612. package/src/functions/push/getInstanceSizesForRegion.js +0 -35
  613. package/src/functions/push/getProviderInstanceSizes.js +0 -35
  614. package/src/functions/push/getProviderRegions.js +0 -39
  615. package/src/functions/push/getProvidersWithConnectionStatus.js +0 -25
  616. package/src/functions/push/getSessionToken.js +0 -26
  617. package/src/functions/push/getUserFromSessionToken.js +0 -39
  618. package/src/functions/push/index.js +0 -245
  619. package/src/functions/push/loginToCheatCode.js +0 -34
  620. package/src/functions/push/pingProvisionAPI.js +0 -33
  621. package/src/functions/push/prompts.js +0 -276
  622. package/src/functions/push/providerMap.js +0 -8
  623. package/src/functions/push/providers.js +0 -6
  624. package/src/functions/reset/index.js +0 -0
  625. package/src/functions/reset/reset.js +0 -163
  626. package/src/functions/start/bootstrapLayoutComponent.js +0 -57
  627. package/src/functions/start/bootstrapPageComponent.js +0 -54
  628. package/src/functions/start/buildFile.js +0 -97
  629. package/src/functions/start/buildFiles.js +0 -101
  630. package/src/functions/start/buildPlugins.js +0 -215
  631. package/src/functions/start/checkIfPortAvailable.js +0 -21
  632. package/src/functions/start/cleanup/index.js +0 -23
  633. package/src/functions/start/databases/mongodb/availableQueryParameters.js +0 -39
  634. package/src/functions/start/databases/mongodb/buildConnectionString.js +0 -28
  635. package/src/functions/start/databases/mongodb/buildQueryParameters.js +0 -15
  636. package/src/functions/start/databases/mongodb/checkConnection.js +0 -36
  637. package/src/functions/start/databases/mongodb/connect.js +0 -25
  638. package/src/functions/start/databases/mongodb/index.js +0 -108
  639. package/src/functions/start/databases/postgresql/checkConnection.js +0 -43
  640. package/src/functions/start/databases/postgresql/connect.js +0 -27
  641. package/src/functions/start/databases/postgresql/index.js +0 -127
  642. package/src/functions/start/databases/redis.js +0 -0
  643. package/src/functions/start/databases/startProvider.js +0 -15
  644. package/src/functions/start/fileDependencyMapper.js +0 -24
  645. package/src/functions/start/generateId.js +0 -73
  646. package/src/functions/start/getCodependenciesForFile.js +0 -84
  647. package/src/functions/start/getFilesToBuild.js +0 -49
  648. package/src/functions/start/getProcessIdFromPort.js +0 -92
  649. package/src/functions/start/hmrServer.js +0 -78
  650. package/src/functions/start/index.js +0 -9
  651. package/src/functions/start/isWindows.js +0 -3
  652. package/src/functions/start/minifyFile.js +0 -10
  653. package/src/functions/start/onWarn.js +0 -68
  654. package/src/functions/start/readFileDependencyMap.js +0 -19
  655. package/src/functions/start/removeDeletedDependenciesFromMap.js +0 -19
  656. package/src/functions/start/setComponentId.js +0 -58
  657. package/src/functions/start/updateFileMap.js +0 -100
  658. package/src/functions/test/index.js +0 -10
  659. package/src/functions/update/index.js +0 -20
  660. package/src/functions/use/index.js +0 -62
  661. package/src/lib/build/browserPathExclusions.js +0 -6
  662. package/src/lib/build/browserPaths.js +0 -9
  663. package/src/lib/build/buildFile.js +0 -91
  664. package/src/lib/build/buildFiles.js +0 -274
  665. package/src/lib/build/buildPlugins.js +0 -222
  666. package/src/lib/build/getCodeFrame.js +0 -7
  667. package/src/lib/build/minifyFile.js +0 -10
  668. package/src/lib/build/nodePathExclusions.js +0 -5
  669. package/src/lib/build/nodePaths.js +0 -10
  670. package/src/lib/build/onWarn.js +0 -68
  671. package/src/lib/build/removeDeletedDependenciesFromMap.js +0 -19
  672. package/src/lib/build/setComponentId.js +0 -58
  673. package/src/lib/build/updateFileMap.js +0 -100
  674. package/src/lib/buildResolvePlugin.js +0 -32
  675. package/src/lib/checkIfValidJSON.js +0 -8
  676. package/src/lib/colorLog.js +0 -5
  677. package/src/lib/dev/cleanup.js +0 -26
  678. package/src/lib/dev/databases/mongodb/buildConnectionString.js +0 -28
  679. package/src/lib/dev/databases/mongodb/buildQueryParameters.js +0 -15
  680. package/src/lib/dev/databases/mongodb/checkConnection.js +0 -40
  681. package/src/lib/dev/databases/mongodb/connect.js +0 -25
  682. package/src/lib/dev/databases/mongodb/index.js +0 -108
  683. package/src/lib/dev/databases/postgresql/checkConnection.js +0 -43
  684. package/src/lib/dev/databases/postgresql/connect.js +0 -27
  685. package/src/lib/dev/databases/postgresql/index.js +0 -127
  686. package/src/lib/dev/databases/providerMap.js +0 -13
  687. package/src/lib/dev/getCodependenciesForFile.js +0 -84
  688. package/src/lib/dev/getFilesToBuild.js +0 -47
  689. package/src/lib/dev/hmrServer.js +0 -78
  690. package/src/lib/dev/index.js +0 -685
  691. package/src/lib/dev/isWindows.js +0 -3
  692. package/src/lib/dev/loadSettings.js +0 -90
  693. package/src/lib/dev/readFileDependencyMap.js +0 -19
  694. package/src/lib/dev/runBuild.js +0 -33
  695. package/src/lib/dev/runTests.js +0 -123
  696. package/src/lib/dev/startApp.js +0 -81
  697. package/src/lib/dev/startDatabases.js +0 -131
  698. package/src/lib/dev/startHMR.js +0 -62
  699. package/src/lib/dev/updateFileMap.js +0 -100
  700. package/src/lib/dev/validateProject.js +0 -0
  701. package/src/lib/dev/watchlist.js +0 -13
  702. package/src/lib/filesToCopy.js +0 -15
  703. package/src/lib/generateId.js +0 -73
  704. package/src/lib/getArgs.js +0 -14
  705. package/src/lib/getOptions.js +0 -12
  706. package/src/lib/getProcessIdFromPort.js +0 -92
  707. package/src/lib/getProvider.js +0 -5
  708. package/src/lib/help.js +0 -56
  709. package/src/lib/isObject.js +0 -3
  710. package/src/lib/isValidJSONString.js +0 -8
  711. package/src/lib/killProcesses.js +0 -5
  712. package/src/lib/loadSettings.js +0 -40
  713. package/src/lib/masterIgnoreList.js +0 -13
  714. package/src/lib/nodeEnvironment.js +0 -6
  715. package/src/lib/nodeEnvironments.js +0 -8
  716. package/src/lib/parseCookiesFromLogin.js +0 -21
  717. package/src/lib/readDirectorySync.js +0 -13
  718. package/src/lib/regexes.js +0 -7
  719. package/src/lib/replaceBackslashesWithForwardSlashes.js +0 -8
  720. package/src/lib/replaceFileProtocol.js +0 -8
  721. package/src/lib/serializeQueryParameters.js +0 -5
  722. package/src/lib/settings.js +0 -1
  723. package/src/lib/validateDatabasesFromSettings.js +0 -37
  724. package/src/lib/wait.js +0 -5
  725. package/storage/.verdaccio-db.json +0 -1
  726. /package/{src/lib → .build}/getPlatformSafePath.js +0 -0
  727. /package/{src/lib → .build}/isWindows.js +0 -0
  728. /package/dist/{functions/create/templates → commands/create/template}/public/service-worker.js +0 -0
  729. /package/dist/{functions/create/templates → commands/create/template}/settings.development.json +0 -0
  730. /package/src/{functions/create/templates → commands/create/template}/public/service-worker.js +0 -0
  731. /package/src/{functions/create/templates → commands/create/template}/settings.development.json +0 -0
@@ -1,685 +0,0 @@
1
- /* eslint-disable consistent-return */
2
-
3
- import fs from 'fs';
4
- import path, { dirname } from "path";
5
- import { fileURLToPath } from "url";
6
- import child_process from "child_process";
7
- import chokidar from "chokidar";
8
- import CLILog from "../CLILog.js";
9
- import loadSettings from "./loadSettings.js";
10
- import Loader from "../loader.js";
11
- import startDatabases from "./startDatabases.js";
12
- import runTests from "./runTests.js";
13
- import startHMR from "./startHMR.js";
14
- import startApp from "./startApp.js";
15
- import requiredFiles from "./requiredFiles.js";
16
- import watchlist from "./watchlist.js";
17
- import getFilesToBuild from "./getFilesToBuild.js";
18
- import buildFiles from "../build/buildFiles.js";
19
- import filesToCopy from "../filesToCopy.js";
20
- import { SETTINGS_FILE_NAME_REGEX } from "../regexes.js";
21
- import getCodependenciesForFile from "./getCodependenciesForFile.js";
22
- import removeDeletedDependenciesFromMap from "../build/removeDeletedDependenciesFromMap.js";
23
- import chalk from "chalk";
24
-
25
- const processIds = [];
26
-
27
- const getDatabaseProcessIds = () => {
28
- try {
29
- const databaseProcessIds = [];
30
- const databases = Object.entries(process._databases || {});
31
-
32
- for (let i = 0; i < databases?.length; i += 1) {
33
- const [_provider, providerConnection] = databases[i];
34
-
35
- if (providerConnection?.pid) {
36
- databaseProcessIds.push(providerConnection.pid);
37
- }
38
-
39
- if (!providerConnection?.pid) {
40
- const providerConnections = Object.entries(providerConnection);
41
-
42
- for (let pc = 0; pc < providerConnections?.length; pc += 1) {
43
- const [_connectionName, connection] = providerConnections[pc];
44
-
45
- if (connection?.pid) {
46
- databaseProcessIds.push(connection.pid);
47
- }
48
- }
49
- }
50
- }
51
-
52
- return databaseProcessIds;
53
- } catch (exception) {
54
- throw new Error(`[dev.getDatabaseProcessIds] ${exception.message}`);
55
- }
56
- };
57
-
58
- const handleSignalEvents = (processIds = [], nodeMajorVersion = 0, __dirname = '') => {
59
- try {
60
- const execArgv = ["--no-warnings"];
61
-
62
- if (nodeMajorVersion < 19) {
63
- execArgv.push("--experimental-specifier-resolution=node");
64
- }
65
-
66
- const cleanupProcess = child_process.fork(
67
- path.resolve(`${__dirname}/cleanup.js`),
68
- [],
69
- {
70
- // NOTE: Run in detached mode so when parent process dies, the child still runs
71
- // and cleanup completes.
72
- detached: true,
73
- execArgv,
74
- // NOTE: Pipe stdin, stdout, and stderr. IPC establishes a message channel so we
75
- // communicate with the child_process.
76
- silent: true,
77
- }
78
- );
79
-
80
- process.cleanupProcess = cleanupProcess;
81
-
82
- process.on("SIGINT", async () => {
83
- const databaseProcessIds = getDatabaseProcessIds();
84
- cleanupProcess.send(JSON.stringify(({ processIds: [...processIds, ...databaseProcessIds] })));
85
- process.exit();
86
- });
87
-
88
- process.on("SIGTERM", async () => {
89
- const databaseProcessIds = getDatabaseProcessIds();
90
- cleanupProcess.send(JSON.stringify(({ processIds: [...processIds, ...databaseProcessIds] })));
91
- process.exit();
92
- });
93
- } catch (exception) {
94
- throw new Error(`[dev.handleSignalEvents] ${exception.message}`);
95
- }
96
- };
97
-
98
- const handleHMRProcessMessages = (options = {}) => {
99
- try {
100
- process.hmrProcess.on("message", (message) => {
101
- const processMessages = [
102
- "SERVER_CLOSED",
103
- "HAS_HMR_CONNECTIONS",
104
- "HAS_NO_HMR_CONNECTIONS",
105
- "HMR_UPDATE_COMPLETED",
106
- ];
107
-
108
- if (!processMessages.includes(message?.type)) {
109
- process.loader.stable(message);
110
- }
111
-
112
- if (message?.type === "HAS_HMR_CONNECTIONS") {
113
- process.hmrProcess.hasConnections = true;
114
- }
115
-
116
- if (message?.type === "HAS_NO_HMR_CONNECTIONS") {
117
- process.hmrProcess.hasConnections = false;
118
- }
119
-
120
- if (message?.type === "HMR_UPDATE_COMPLETED") {
121
- // NOTE: Do a setTimeout to ensure that server is still available while the HMR update completes.
122
- // Necessary because some updates are instant, but others might mount a UI that needs a server
123
- // available (e.g., runs API requests).
124
- setTimeout(() => {
125
- handleRestartApplicationProcess({
126
- ...options,
127
- sessionsBeforeHMRUpdate: message?.sessions,
128
- });
129
- }, 500);
130
- }
131
- });
132
- } catch (exception) {
133
- throw new Error(`[dev.handleHMRProcessMessages] ${exception.message}`);
134
- }
135
- };
136
-
137
- const handleHMRProcessSTDIO = () => {
138
- try {
139
- if (process.hmrProcess) {
140
- process.hmrProcess.on("error", (error) => {
141
- CLILog(error.toString(), {
142
- level: "danger",
143
- docs: "https://github.com/cheatcode/joystick",
144
- });
145
- });
146
-
147
- process.hmrProcess.stdout.on("data", (data) => {
148
- console.log(data.toString());
149
- });
150
-
151
- process.hmrProcess.stderr.on("data", (data) => {
152
- process.loader.stop();
153
- CLILog(data.toString(), {
154
- level: "danger",
155
- docs: "https://github.com/cheatcode/joystick",
156
- });
157
- });
158
- }
159
- } catch (exception) {
160
- throw new Error(`[dev.handleHMRProcessSTDIO] ${exception.message}`);
161
- }
162
- };
163
-
164
- const handleServerProcessMessages = () => {
165
- try {
166
- process.serverProcess.on("message", (message) => {
167
- const processMessages = ["SERVER_CLOSED"];
168
-
169
- if (!processMessages.includes(message)) {
170
- process.loader.stable(message);
171
- }
172
- });
173
- } catch (exception) {
174
- throw new Error(`[dev.handleServerProcessMessages] ${exception.message}`);
175
- }
176
- };
177
-
178
- const handleServerProcessSTDIO = (options = {}) => {
179
- try {
180
- if (process.serverProcess) {
181
- process.serverProcess.on("error", (error) => {
182
- console.log(error);
183
- });
184
-
185
- process.serverProcess.stdout.on("data", (data) => {
186
- const message = data.toString();
187
-
188
- if (message && message.includes("App running at:") && !options?.watch) {
189
- process.loader.stable(message);
190
- } else {
191
- if (message && !message.includes("BUILD_ERROR")) {
192
- console.log(message);
193
- }
194
- }
195
- });
196
-
197
- process.serverProcess.stderr.on("data", (data) => {
198
- process.loader.stop();
199
-
200
- CLILog(data.toString(), {
201
- level: "danger",
202
- docs: "https://cheatcode.co/docs/joystick",
203
- });
204
- });
205
- }
206
- } catch (exception) {
207
- throw new Error(`[dev.handleServerProcessSTDIO] ${exception.message}`);
208
- }
209
- };
210
-
211
- const handleAddOrChangeFile = async (context = {}, path = '', options = {}) => {
212
- try {
213
- if (context.isAddingOrChangingFile) {
214
- const codependencies = await getCodependenciesForFile(path);
215
- const fileResults = await buildFiles({
216
- files: [path, ...(codependencies?.existing || [])],
217
- environment: process.env.NODE_ENV,
218
- });
219
-
220
- const fileResultsHaveErrors = fileResults
221
- .filter((result) => !!result)
222
- .map(({ success }) => success)
223
- .includes(false);
224
-
225
- removeDeletedDependenciesFromMap(codependencies.deleted);
226
-
227
- if (process.serverProcess && fileResultsHaveErrors) {
228
- // NOTE: If there's a build error while the app is running, relay it to
229
- // the app's server process to display an error page in the browser.
230
- process.serverProcess.send(
231
- JSON.stringify({
232
- error: "BUILD_ERROR",
233
- paths: fileResults
234
- .filter(({ success }) => !success)
235
- .map(({ path: pathWithError, error }) => ({
236
- path: pathWithError,
237
- error,
238
- })),
239
- })
240
- );
241
-
242
- return;
243
- }
244
-
245
- if (!fileResultsHaveErrors) {
246
- process.initialBuildComplete = true;
247
-
248
- if (context.isUIUpdate) {
249
- handleNotifyHMRClients(context.isHTMLUpdate);
250
- } else {
251
- handleRestartApplicationProcess(options);
252
- }
253
- }
254
- }
255
- } catch (exception) {
256
- throw new Error(`[dev.handleAddOrChangeFile] ${exception.message}`);
257
- }
258
- };
259
-
260
- const handleAddDirectory = (context = {}, path = '', options = {}) => {
261
- try {
262
- if (context.isAddDirectory) {
263
- fs.mkdirSync(`./.joystick/build/${path}`);
264
-
265
- if (context.isUIUpdate) {
266
- handleNotifyHMRClients(context.isHTMLUpdate);
267
- } else {
268
- handleRestartApplicationProcess(options);
269
- }
270
- }
271
- } catch (exception) {
272
- throw new Error(`[dev.handleAddDirectory] ${exception.message}`);
273
- }
274
- };
275
-
276
- const handleCopyFile = (context = {}, path = '', options = {}) => {
277
- try {
278
- if (context.isFileToCopy && !context.isDirectory) {
279
- fs.writeFileSync(`./.joystick/build/${path}`, fs.readFileSync(path));
280
-
281
- if (context.isUIUpdate) {
282
- handleNotifyHMRClients(context.isHTMLUpdate);
283
- } else {
284
- handleRestartApplicationProcess(options);
285
- }
286
- }
287
- } catch (exception) {
288
- throw new Error(`[dev.handleCopyFile] ${exception.message}`);
289
- }
290
- };
291
-
292
- const handleCopyDirectory = (context = {}, path = '', options = {}) => {
293
- try {
294
- if (context.isFileToCopy && context.isDirectory && !context.isExistingDirectoryInBuild) {
295
- fs.mkdirSync(`./.joystick/build/${path}`);
296
-
297
- if (context.isUIUpdate) {
298
- handleNotifyHMRClients(context.isHTMLUpdate);
299
- } else {
300
- handleRestartApplicationProcess(options);
301
- }
302
- }
303
- } catch (exception) {
304
- throw new Error(`[dev.handleCopyDirectory] ${exception.message}`);
305
- }
306
- };
307
-
308
- const handleRestartApplicationProcess = async (options = {}) => {
309
- try {
310
- if (process.serverProcess && process.serverProcess.pid) {
311
- process.serverProcess.kill();
312
-
313
- await handleStartAppServer(options);
314
-
315
- return Promise.resolve();
316
- }
317
-
318
- // NOTE: Original process was never initialized due to an error.
319
- await handleStartAppServer(options);
320
-
321
- if (!process.hmrProcess) {
322
- startHMR();
323
- }
324
- } catch (exception) {
325
- throw new Error(`[dev.handleRestartApplicationProcess] ${exception.message}`);
326
- }
327
- };
328
-
329
- const handleStartAppServer = async (options = {}) => {
330
- try {
331
- const serverProcess = await startApp({
332
- watch: options?.watch,
333
- nodeMajorVersion: options?.nodeMajorVersion,
334
- port: options?.port,
335
- sessionsBeforeHMRUpdate: options?.sessionsBeforeHMRUpdate,
336
- });
337
-
338
- if (serverProcess) {
339
- processIds.push(serverProcess.pid);
340
- process.serverProcess = serverProcess;
341
- handleServerProcessSTDIO(options);
342
- handleServerProcessMessages(options);
343
- }
344
- } catch (exception) {
345
- console.warn(exception);
346
- throw new Error(`[dev.handleStartAppServer] ${exception.message}`);
347
- }
348
- };
349
-
350
- const handleNotifyHMRClients = async (indexHTMLChanged = false) => {
351
- try {
352
- if (process.hmrProcess) {
353
- const settings = await loadSettings({ environment: process.env.NODE_ENV });
354
- process.hmrProcess.send(
355
- JSON.stringify({
356
- type: "RESTART_SERVER",
357
- settings: settings.parsed,
358
- indexHTMLChanged,
359
- })
360
- );
361
- }
362
- } catch (exception) {
363
- console.warn(exception);
364
- throw new Error(`[dev.handleNotifyHMRClients] ${exception.message}`);
365
- }
366
- };
367
-
368
- const getWatchChangeContext = (event = '', path = '') => {
369
- try {
370
- const isHTMLUpdate = path === "index.html";
371
- const isUIPath = path?.includes("ui/") || path === 'index.css' || isHTMLUpdate;
372
- const isUIUpdate = (process.hmrProcess && process.hmrProcess.hasConnections && isUIPath) || false;
373
- const isSettingsUpdate = path?.match(SETTINGS_FILE_NAME_REGEX)?.length > 0;
374
- const isDirectory = fs.statSync(path).isDirectory();
375
- const isFile = fs.statSync(path).isFile();
376
- const isExistingDirectoryInSource = isDirectory && fs.existsSync(path);
377
- const isExistingDirectoryInBuild = !!fs.existsSync(`./.joystick/build/${path}`);
378
- const isAddDirectory = event === 'addDir' && isExistingDirectoryInSource && !isExistingDirectoryInBuild;
379
- const isFileToCopy = !!filesToCopy.find((fileToCopy) => fileToCopy.path === path);
380
- const isExistingFileInSource = isFile && fs.existsSync(path);
381
- const isAddingOrChangingFile = ["add", "change"].includes(event) && isExistingFileInSource;
382
-
383
- return {
384
- isHTMLUpdate,
385
- isUIPath,
386
- isUIUpdate,
387
- isSettingsUpdate,
388
- isDirectory,
389
- isFile,
390
- isExistingDirectoryInSource,
391
- isExistingDirectoryInBuild,
392
- isAddDirectory,
393
- isFileToCopy,
394
- isExistingFileInSource,
395
- isAddingOrChangingFile,
396
- };
397
- } catch (exception) {
398
- throw new Error(`[dev.getWatchChangeContext] ${exception.message}`);
399
- }
400
- };
401
-
402
- const startFileWatcher = (options = {}) => {
403
- try {
404
- const watcher = chokidar.watch(
405
- watchlist.map(({ path }) => path),
406
- { ignoreInitial: true }
407
- );
408
-
409
- watcher.on('all', async (event, path) => {
410
- // NOTE: Do this here in case a required file/folder goes missing inbetween builds.
411
- checkForRequiredFiles();
412
-
413
- if (!options?.watch) {
414
- process.loader.text("Rebuilding app...");
415
- }
416
-
417
- const watchChangeContext = getWatchChangeContext(event, path);
418
- //
419
- // console.log({
420
- // watchChangeContext,
421
- // });
422
- //
423
- handleCopyDirectory(watchChangeContext, path, options);
424
- handleCopyFile(watchChangeContext, path, options);
425
- handleAddDirectory(watchChangeContext, path, options);
426
- await handleAddOrChangeFile(watchChangeContext, path, options);
427
-
428
- if (watchChangeContext?.isSettingsUpdate) {
429
- await loadSettings({
430
- environment: options.environment,
431
- process: options.process,
432
- });
433
- }
434
- });
435
- } catch (exception) {
436
- throw new Error(`[dev.startFileWatcher] ${exception.message}`);
437
- }
438
- };
439
-
440
- const runInitialBuild = async (buildSettings = {}) => {
441
- try {
442
- process.loader.text('Building app...');
443
-
444
- const filesToBuild = getFilesToBuild(buildSettings?.excludedPaths, "start");
445
- const fileResults = await buildFiles({
446
- files: filesToBuild,
447
- environment: process.env.NODE_ENV
448
- });
449
-
450
- const hasErrors = [...fileResults]
451
- .filter((result) => !!result)
452
- .map(({ success }) => success)
453
- .includes(false);
454
-
455
- // NOTE: If the initial build fails, exit the startup process.
456
- if (hasErrors) {
457
- console.log(chalk.redBright('Failed to start app. Correct the errors above and run joystick start again.\n'));
458
- process.exit(1);
459
- }
460
- } catch (exception) {
461
- console.warn(exception);
462
- throw new Error(`[dev.runInitialBuild] ${exception.message}`);
463
- }
464
- };
465
-
466
- const initProcess = (options = {}) => {
467
- try {
468
- process.title = options?.environment === 'test' ? "joystick_test" : 'joystick';
469
- process.loader = new Loader({
470
- defaultMessage: options?.environment === 'test' ? "Initializing test environment..." : "Starting app...",
471
- });
472
-
473
- process.env.LOGS_PATH = options?.logs || null;
474
- process.env.NODE_ENV = options?.environment || "development";
475
- process.env.PORT = options?.port ? parseInt(options?.port, 10) : 2600;
476
- process.env.IS_DEBUG_MODE = options?.debug;
477
-
478
- } catch (exception) {
479
- throw new Error(`[dev.initProcess] ${exception.message}`);
480
- }
481
- };
482
-
483
- const checkForRequiredFiles = () => {
484
- try {
485
- const missingFiles = [];
486
-
487
- for (let i = 0; i < requiredFiles?.length; i += 1) {
488
- const requiredFile = requiredFiles[i];
489
- const exists = fs.existsSync(`${process.cwd()}/${requiredFile.path}`);
490
- const stats = exists && fs.statSync(`${process.cwd()}/${requiredFile.path}`);
491
-
492
- if (requiredFile && requiredFile.type === "file" && (!exists || (exists && !stats.isFile()))) {
493
- missingFiles.push({ type: 'file', path: requiredFile.path });
494
- }
495
-
496
- if (requiredFile && requiredFile.type === "directory" && (!exists || (exists && !stats.isDirectory()))) {
497
- missingFiles.push({ type: 'directory', path: requiredFile.path });
498
- }
499
- }
500
-
501
- if (missingFiles?.length > 0) {
502
- const files = missingFiles?.filter((path) => path.type === 'file');
503
- const directories = missingFiles?.filter((path) => path.type === 'directory');
504
-
505
- let error = `The following paths are missing and required in a Joystick project:\n\n`;
506
-
507
- if (files?.length > 0) {
508
- error += ` > Required Files:\n\n`;
509
-
510
- for (let i = 0; i < files?.length; i += 1) {
511
- const file = files[i];
512
- error += ` /${file.path}\n`;
513
- }
514
- }
515
-
516
- if (directories?.length > 0) {
517
- error += ` > Required Directories:\n\n`;
518
-
519
- for (let i = 0; i < directories?.length; i += 1) {
520
- const file = directories[i];
521
- error += ` /${file.path}\n`;
522
- }
523
- }
524
-
525
- CLILog(error, {
526
- level: "danger",
527
- docs: "https://cheatcode.co/docs/joystick/structure",
528
- });
529
-
530
- process.exit(0);
531
- }
532
- } catch (exception) {
533
- throw new Error(`[dev.checkForRequiredFiles] ${exception.message}`);
534
- }
535
- };
536
-
537
- const warnInvalidJoystickEnvironment = () => {
538
- try {
539
- const hasJoystickFolder = fs.existsSync(`${process.cwd()}/.joystick`);
540
- const hasTestsFolder = fs.existsSync(`${process.cwd()}/tests`);
541
-
542
- if (process.env.NODE_ENV === 'test' && (!hasJoystickFolder || !hasTestsFolder)) {
543
- CLILog(
544
- "joystick test must be run in a directory with a .joystick folder and tests folder.",
545
- {
546
- level: "danger",
547
- docs: "https://cheatcode.co/docs/joystick/cli/test",
548
- }
549
- );
550
-
551
- process.exit(0);
552
- }
553
-
554
- if (process.env.NODE_ENV !== 'test' && !hasJoystickFolder) {
555
- CLILog(
556
- "joystick start must be run in a directory with a .joystick folder.",
557
- {
558
- level: "danger",
559
- docs: "https://cheatcode.co/docs/joystick/cli/start",
560
- }
561
- );
562
-
563
- process.exit(0);
564
- }
565
- } catch (exception) {
566
- throw new Error(`[dev.warnInvalidJoystickEnvironment] ${exception.message}`);
567
- }
568
- };
569
-
570
- const validateOptions = (options) => {
571
- try {
572
- if (!options) throw new Error('options object is required.');
573
- if (!options.environment) throw new Error('options.environment is required.');
574
- } catch (exception) {
575
- throw new Error(`[dev.validateOptions] ${exception.message}`);
576
- }
577
- };
578
-
579
- const dev = async (options, { resolve, reject }) => {
580
- try {
581
- validateOptions(options);
582
- initProcess(options);
583
-
584
- const nodeMajorVersion = parseInt(
585
- process?.version?.split(".")[0]?.replace("v", ""),
586
- 10
587
- );
588
-
589
- const __filename = fileURLToPath(import.meta.url);
590
- const __dirname = dirname(__filename);
591
-
592
- warnInvalidJoystickEnvironment();
593
- checkForRequiredFiles();
594
-
595
- const settings = await loadSettings({
596
- environment: options.environment,
597
- });
598
-
599
- await startDatabases({
600
- environment: options.environment,
601
- port: options.port,
602
- settings: settings.parsed
603
- });
604
-
605
- await runInitialBuild(settings?.parsed?.config?.build);
606
- await startFileWatcher({
607
- ...options,
608
- nodeMajorVersion,
609
- });
610
-
611
- await handleStartAppServer({
612
- ...options,
613
- nodeMajorVersion,
614
- });
615
-
616
- if (options?.environment !== 'test') {
617
- const hmrProcess = await startHMR({
618
- nodeMajorVersion,
619
- __dirname,
620
- });
621
-
622
- processIds.push(hmrProcess.pid);
623
- process.hmrProcess = hmrProcess;
624
-
625
- handleHMRProcessSTDIO();
626
- handleHMRProcessMessages({
627
- ...options,
628
- nodeMajorVersion,
629
- });
630
- }
631
-
632
-
633
- handleSignalEvents(
634
- processIds,
635
- nodeMajorVersion,
636
- __dirname
637
- );
638
-
639
- if (options?.environment === 'test') {
640
- process.loader.stop();
641
- const databaseProcessIds = getDatabaseProcessIds();
642
-
643
- await runTests({
644
- watch: options?.watch,
645
- __dirname,
646
- processIds: [
647
- ...processIds,
648
- ...databaseProcessIds,
649
- ],
650
- cleanupProcess: process.cleanupProcess,
651
- });
652
-
653
- if (!options?.watch) {
654
- // NOTE: Kick out of the process after tests run if we're not in watch mode.
655
- process.exit(0);
656
- }
657
- }
658
-
659
- /*
660
- TODO:
661
-
662
- - [x] Make sure we're in a Joystick project.
663
- - [x] If environment === 'test', check that both a .joystick fo lder exists AND a /tests folder
664
- exists. If no /tests, log out docs on how to scaffold your tests.
665
- - [x] Load settings.<environment>.json.
666
- - [x] Start databases relative to options.environment (development|test) from settings.<environment>.json.
667
- - [x] Run the initial build
668
- - [x] Start the file watcher
669
- - [x] Start the app as normal from the build directory.
670
- - [ ] If environment === 'test', run the tests.
671
- - [ ] If environment === 'test', after tests, run process.exit(0).
672
- */
673
-
674
- resolve();
675
- } catch (exception) {
676
- console.warn(exception);
677
- reject(`[dev] ${exception.message}`);
678
- }
679
- };
680
-
681
- export default (options) =>
682
- new Promise((resolve, reject) => {
683
- dev(options, { resolve, reject });
684
- });
685
-
@@ -1,3 +0,0 @@
1
- import os from "os";
2
-
3
- export default os.platform() === "win32";