@joystick.js/cli-canary 0.0.0-canary.165 → 0.0.0-canary.1650

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 (618) hide show
  1. package/.build/getFilesToBuild.js +1 -1
  2. package/.build/index.js +3 -3
  3. package/LICENSE.md +59 -0
  4. package/README.md +45 -4
  5. package/dist/cli.js +1 -76
  6. package/dist/commands/build/definition.js +1 -0
  7. package/dist/commands/build/index.js +1 -0
  8. package/dist/commands/create/build_package_json.js +1 -0
  9. package/dist/commands/create/definition.js +1 -0
  10. package/dist/commands/create/index.js +2 -0
  11. package/dist/commands/create/template/api/index.js +6 -0
  12. package/dist/commands/create/template/email/base.css +9 -0
  13. package/dist/commands/create/template/email/base.html +10 -0
  14. package/dist/commands/create/template/email/reset_password.js +20 -0
  15. package/dist/commands/create/template/i18n/en-US.js +14 -0
  16. package/dist/commands/create/template/index.client.js +1 -0
  17. package/dist/commands/create/template/index.css +34 -0
  18. package/dist/{functions/create/templates → commands/create/template}/index.html +2 -3
  19. package/dist/{functions/create/templates → commands/create/template}/index.server.js +6 -6
  20. package/dist/commands/create/template/public/apple-touch-icon-152x152.png +0 -0
  21. package/dist/commands/create/template/public/favicon.ico +0 -0
  22. package/dist/commands/create/template/public/joystick_logo.webp +0 -0
  23. package/dist/{functions/create/templates → commands/create/template}/public/manifest.json +4 -4
  24. package/dist/commands/create/template/public/splash-screen-1024x1024.png +0 -0
  25. package/{src/functions/create/templates → dist/commands/create/template}/ui/components/button/index.js +14 -6
  26. package/{src/functions/create/templates → dist/commands/create/template}/ui/layouts/app/index.js +2 -2
  27. package/dist/commands/create/template/ui/pages/error/index.js +50 -0
  28. package/dist/commands/create/template/ui/pages/index/index.js +121 -0
  29. package/dist/commands/help/definition.js +1 -0
  30. package/dist/commands/help/index.js +19 -0
  31. package/dist/commands/index.js +1 -0
  32. package/dist/commands/logout/definition.js +1 -0
  33. package/dist/commands/logout/index.js +3 -0
  34. package/dist/commands/push/cdn_mirrors.js +1 -0
  35. package/dist/commands/push/check_if_settings_valid.js +1 -0
  36. package/dist/commands/push/create_version.js +1 -0
  37. package/dist/commands/push/definition.js +1 -0
  38. package/dist/commands/push/get_app_domain.js +1 -0
  39. package/dist/commands/push/get_deployment.js +1 -0
  40. package/dist/commands/push/get_provision_domain.js +1 -0
  41. package/dist/commands/push/get_session_token.js +1 -0
  42. package/dist/commands/push/get_settings_file.js +1 -0
  43. package/dist/commands/push/handle_initial_deployment.js +1 -0
  44. package/dist/commands/push/handle_version_deployment.js +1 -0
  45. package/dist/commands/push/index.js +8 -0
  46. package/dist/commands/push/prompts/confirm_deployment.js +17 -0
  47. package/dist/commands/push/prompts/session_token.js +5 -0
  48. package/dist/commands/push/upload_build_to_cdn.js +1 -0
  49. package/dist/commands/push/validate_deployment.js +1 -0
  50. package/dist/commands/push/validate_push_config.js +1 -0
  51. package/dist/commands/push_v2/cdn_mirrors.js +1 -0
  52. package/dist/commands/push_v2/check_if_settings_valid.js +1 -0
  53. package/dist/commands/push_v2/create_version.js +1 -0
  54. package/dist/commands/push_v2/definition.js +1 -0
  55. package/dist/commands/push_v2/get_app_domain.js +1 -0
  56. package/dist/commands/push_v2/get_deployment.js +1 -0
  57. package/dist/commands/push_v2/get_push_domain.js +1 -0
  58. package/dist/commands/push_v2/get_session_token.js +1 -0
  59. package/dist/commands/push_v2/get_settings_file.js +1 -0
  60. package/dist/commands/push_v2/handle_initial_deployment.js +1 -0
  61. package/dist/commands/push_v2/handle_version_deployment.js +1 -0
  62. package/dist/commands/push_v2/index.js +8 -0
  63. package/dist/commands/push_v2/prompts/confirm_deployment.js +17 -0
  64. package/dist/commands/push_v2/prompts/session_token.js +5 -0
  65. package/dist/commands/push_v2/upload_build_to_cdn.js +1 -0
  66. package/dist/commands/push_v2/validate_deployment.js +1 -0
  67. package/dist/commands/push_v2/validate_push_config.js +1 -0
  68. package/dist/commands/start/definition.js +1 -0
  69. package/dist/commands/start/index.js +1 -0
  70. package/dist/commands/test/definition.js +1 -0
  71. package/dist/commands/test/index.js +1 -0
  72. package/dist/commands/update/definition.js +1 -0
  73. package/dist/commands/update/index.js +1 -0
  74. package/dist/commands/use/definition.js +1 -0
  75. package/dist/commands/use/index.js +1 -0
  76. package/dist/index.js +1 -7
  77. package/dist/lib/build/browser_path_exclusions.js +1 -0
  78. package/dist/lib/build/browser_paths.js +1 -0
  79. package/dist/lib/build/build_files.js +3 -0
  80. package/dist/lib/build/copy_paths.js +1 -0
  81. package/dist/lib/build/get_code_frame.js +1 -0
  82. package/dist/lib/build/get_file_operation.js +1 -0
  83. package/dist/lib/build/get_files_to_build.js +1 -0
  84. package/dist/lib/build/get_path_platform.js +1 -0
  85. package/dist/lib/build/get_platform_safe_path.js +1 -0
  86. package/dist/lib/build/get_tar_ignore_list.js +2 -0
  87. package/dist/lib/build/index.js +3 -0
  88. package/dist/lib/build/master_ignore_list.js +1 -0
  89. package/dist/lib/build/minify_file.js +1 -0
  90. package/dist/lib/build/node_paths.js +1 -0
  91. package/dist/lib/build/on_warn.js +10 -0
  92. package/dist/lib/build/plugins/bootstrap_component.js +33 -0
  93. package/dist/lib/build/plugins/generate_file_dependency_map.js +1 -0
  94. package/dist/lib/build/plugins/index.js +1 -0
  95. package/dist/lib/build/plugins/set_component_id.js +2 -0
  96. package/dist/lib/build/plugins/update_file_map.js +1 -0
  97. package/dist/lib/build/plugins/warn_node_environment.js +3 -0
  98. package/dist/lib/cli_log.js +13 -0
  99. package/dist/lib/color_log.js +1 -0
  100. package/dist/lib/command_exists.js +1 -0
  101. package/dist/lib/constants.js +1 -4
  102. package/dist/lib/debounce.js +1 -0
  103. package/dist/lib/decrypt_buffer.js +1 -0
  104. package/dist/lib/development_server/ava_config.js +1 -0
  105. package/dist/lib/development_server/check_if_port_occupied.js +1 -0
  106. package/dist/lib/development_server/cleanup.js +1 -0
  107. package/dist/lib/development_server/databases/download_database_binary.js +1 -0
  108. package/dist/lib/development_server/databases/mongodb/available_query_parameters.js +1 -0
  109. package/dist/lib/development_server/databases/mongodb/build_connection_string.js +1 -0
  110. package/dist/lib/development_server/databases/mongodb/build_query_parameters.js +1 -0
  111. package/dist/lib/development_server/databases/mongodb/check_connection.js +2 -0
  112. package/dist/lib/development_server/databases/mongodb/connect.js +1 -0
  113. package/dist/lib/development_server/databases/mongodb/index.js +1 -0
  114. package/dist/lib/development_server/databases/mongodb/installers/linux.js +1 -0
  115. package/dist/lib/development_server/databases/mongodb/installers/macos.js +1 -0
  116. package/dist/lib/development_server/databases/mongodb/installers/windows.js +1 -0
  117. package/dist/lib/development_server/databases/postgresql/check_connection.js +2 -0
  118. package/dist/lib/development_server/databases/postgresql/connect.js +1 -0
  119. package/dist/lib/development_server/databases/postgresql/index.js +2 -0
  120. package/dist/lib/development_server/databases/postgresql/installers/linux.js +1 -0
  121. package/dist/lib/development_server/databases/postgresql/installers/macos.js +1 -0
  122. package/dist/lib/development_server/databases/postgresql/installers/windows.js +1 -0
  123. package/dist/lib/development_server/databases/provider_map.js +1 -0
  124. package/dist/lib/development_server/get_database_process_ids.js +1 -0
  125. package/dist/lib/development_server/get_translations.js +1 -0
  126. package/dist/lib/development_server/hmr_server.js +1 -0
  127. package/dist/lib/development_server/index.js +10 -0
  128. package/dist/lib/development_server/kill_process_ids.js +1 -0
  129. package/dist/lib/development_server/run_tests.js +2 -0
  130. package/dist/lib/development_server/start_app_server.js +1 -0
  131. package/dist/lib/development_server/start_databases.js +1 -0
  132. package/dist/lib/development_server/start_hmr_server.js +1 -0
  133. package/dist/lib/development_server/watch_for_changes/browser_path_exclusions.js +1 -0
  134. package/dist/lib/development_server/watch_for_changes/browser_paths.js +1 -0
  135. package/dist/lib/development_server/watch_for_changes/get_after_run_tasks.js +1 -0
  136. package/dist/lib/development_server/watch_for_changes/get_file_codependencies.js +1 -0
  137. package/dist/lib/development_server/watch_for_changes/get_platform_safe_path.js +1 -0
  138. package/dist/lib/development_server/watch_for_changes/index.js +1 -0
  139. package/dist/lib/development_server/watch_for_changes/node_paths.js +1 -0
  140. package/dist/lib/development_server/watch_for_changes/read_file_dependency_map.js +1 -0
  141. package/dist/lib/development_server/watch_for_changes/watch_paths.js +1 -0
  142. package/dist/lib/dynamic_import.js +1 -0
  143. package/dist/lib/encrypt_buffer.js +1 -0
  144. package/dist/lib/generate_id.js +1 -0
  145. package/dist/lib/get_files_in_path.js +1 -0
  146. package/dist/lib/get_platform_safe_path.js +1 -0
  147. package/dist/lib/get_process_id_from_port.js +2 -0
  148. package/dist/lib/is_valid_json_string.js +1 -0
  149. package/dist/lib/kill_port_process.js +1 -0
  150. package/dist/lib/kill_process_id.js +1 -0
  151. package/dist/lib/load_settings.js +1 -0
  152. package/dist/lib/loader.js +2 -82
  153. package/dist/lib/log_bars.js +1 -0
  154. package/dist/lib/node_path_polyfills.js +1 -0
  155. package/dist/lib/parse_args.js +1 -0
  156. package/dist/lib/parse_options.js +1 -0
  157. package/dist/lib/path_exists.js +1 -0
  158. package/dist/lib/rainbow_road.js +1 -0
  159. package/dist/lib/replace_in_files.js +1 -0
  160. package/dist/lib/required_files.js +1 -0
  161. package/dist/lib/serialize_query_parameters.js +1 -0
  162. package/dist/lib/types.js +1 -6
  163. package/dist/lib/unique_array.js +1 -0
  164. package/increment_version.js +3 -0
  165. package/package.json +19 -38
  166. package/src/cli.js +69 -51
  167. package/src/commands/build/definition.js +58 -0
  168. package/src/commands/build/index.js +7 -0
  169. package/src/commands/create/build_package_json.js +20 -0
  170. package/src/commands/create/definition.js +35 -0
  171. package/src/commands/create/index.js +71 -0
  172. package/src/commands/create/template/api/index.js +6 -0
  173. package/src/commands/create/template/email/base.css +9 -0
  174. package/src/commands/create/template/email/base.html +10 -0
  175. package/src/commands/create/template/email/reset_password.js +20 -0
  176. package/src/commands/create/template/i18n/en-US.js +14 -0
  177. package/src/commands/create/template/index.client.js +1 -0
  178. package/src/commands/create/template/index.css +34 -0
  179. package/src/{functions/create/templates → commands/create/template}/index.html +2 -3
  180. package/src/{functions/create/templates → commands/create/template}/index.server.js +6 -6
  181. package/src/commands/create/template/public/apple-touch-icon-152x152.png +0 -0
  182. package/src/commands/create/template/public/favicon.ico +0 -0
  183. package/src/commands/create/template/public/joystick_logo.webp +0 -0
  184. package/src/{functions/create/templates → commands/create/template}/public/manifest.json +4 -4
  185. package/src/commands/create/template/public/splash-screen-1024x1024.png +0 -0
  186. package/{dist/functions/create/templates → src/commands/create/template}/ui/components/button/index.js +14 -6
  187. package/{dist/functions/create/templates → src/commands/create/template}/ui/layouts/app/index.js +2 -2
  188. package/src/commands/create/template/ui/pages/error/index.js +50 -0
  189. package/src/commands/create/template/ui/pages/index/index.js +121 -0
  190. package/src/commands/help/definition.js +12 -0
  191. package/src/commands/help/index.js +48 -0
  192. package/src/commands/index.js +25 -0
  193. package/src/commands/logout/definition.js +10 -0
  194. package/src/commands/logout/index.js +20 -0
  195. package/src/commands/push/cdn_mirrors.js +7 -0
  196. package/src/commands/push/check_if_settings_valid.js +10 -0
  197. package/src/commands/push/create_version.js +20 -0
  198. package/src/commands/push/definition.js +43 -0
  199. package/src/commands/push/get_app_domain.js +11 -0
  200. package/src/commands/push/get_deployment.js +19 -0
  201. package/src/commands/push/get_provision_domain.js +9 -0
  202. package/src/commands/push/get_session_token.js +31 -0
  203. package/src/commands/push/get_settings_file.js +47 -0
  204. package/src/commands/push/handle_initial_deployment.js +24 -0
  205. package/src/commands/push/handle_version_deployment.js +23 -0
  206. package/src/commands/push/index.js +190 -0
  207. package/src/commands/push/prompts/confirm_deployment.js +73 -0
  208. package/src/commands/push/prompts/session_token.js +11 -0
  209. package/src/commands/push/upload_build_to_cdn.js +59 -0
  210. package/src/commands/push/validate_deployment.js +19 -0
  211. package/src/commands/push/validate_push_config.js +18 -0
  212. package/src/commands/push_v2/cdn_mirrors.js +7 -0
  213. package/src/commands/push_v2/check_if_settings_valid.js +10 -0
  214. package/src/commands/push_v2/create_version.js +20 -0
  215. package/src/commands/push_v2/definition.js +58 -0
  216. package/src/commands/push_v2/get_app_domain.js +11 -0
  217. package/src/commands/push_v2/get_deployment.js +19 -0
  218. package/src/commands/push_v2/get_push_domain.js +9 -0
  219. package/src/commands/push_v2/get_session_token.js +31 -0
  220. package/src/commands/push_v2/get_settings_file.js +47 -0
  221. package/src/commands/push_v2/handle_initial_deployment.js +24 -0
  222. package/src/commands/push_v2/handle_version_deployment.js +23 -0
  223. package/src/commands/push_v2/index.js +160 -0
  224. package/src/commands/push_v2/prompts/confirm_deployment.js +73 -0
  225. package/src/commands/push_v2/prompts/session_token.js +11 -0
  226. package/src/commands/push_v2/upload_build_to_cdn.js +59 -0
  227. package/src/commands/push_v2/validate_deployment.js +19 -0
  228. package/src/commands/push_v2/validate_push_config.js +18 -0
  229. package/src/commands/start/definition.js +58 -0
  230. package/src/commands/start/index.js +11 -0
  231. package/src/commands/test/definition.js +28 -0
  232. package/src/commands/test/index.js +12 -0
  233. package/src/commands/update/definition.js +28 -0
  234. package/src/commands/update/index.js +29 -0
  235. package/src/commands/use/definition.js +19 -0
  236. package/src/commands/use/index.js +54 -0
  237. package/src/index.js +0 -0
  238. package/src/lib/build/browser_path_exclusions.js +8 -0
  239. package/src/lib/build/browser_paths.js +11 -0
  240. package/src/lib/build/build_files.js +167 -0
  241. package/src/{functions/start/filesToCopy.js → lib/build/copy_paths.js} +7 -5
  242. package/src/lib/build/get_code_frame.js +11 -0
  243. package/src/lib/build/get_file_operation.js +25 -0
  244. package/src/lib/build/get_files_to_build.js +41 -0
  245. package/src/lib/build/get_path_platform.js +32 -0
  246. package/src/lib/build/get_platform_safe_path.js +6 -0
  247. package/src/lib/build/get_tar_ignore_list.js +41 -0
  248. package/src/lib/build/index.js +137 -0
  249. package/src/lib/build/master_ignore_list.js +14 -0
  250. package/src/lib/build/minify_file.js +22 -0
  251. package/src/lib/build/node_paths.js +19 -0
  252. package/src/lib/build/on_warn.js +70 -0
  253. package/src/lib/build/plugins/bootstrap_component.js +191 -0
  254. package/src/lib/build/plugins/generate_file_dependency_map.js +20 -0
  255. package/src/lib/build/plugins/index.js +26 -0
  256. package/src/lib/build/plugins/set_component_id.js +89 -0
  257. package/src/lib/build/plugins/update_file_map.js +98 -0
  258. package/src/lib/build/plugins/warn_node_environment.js +20 -0
  259. package/src/lib/{CLILog.js → cli_log.js} +12 -8
  260. package/src/lib/color_log.js +7 -0
  261. package/src/lib/command_exists.js +16 -0
  262. package/src/lib/constants.js +11 -1
  263. package/src/lib/debounce.js +9 -0
  264. package/src/lib/decrypt_buffer.js +12 -0
  265. package/src/lib/development_server/ava_config.js +14 -0
  266. package/src/lib/development_server/check_if_port_occupied.js +31 -0
  267. package/src/lib/development_server/cleanup.js +15 -0
  268. package/src/lib/development_server/databases/download_database_binary.js +35 -0
  269. package/src/lib/{dev/databases/mongodb/availableQueryParameters.js → development_server/databases/mongodb/available_query_parameters.js} +3 -1
  270. package/src/lib/development_server/databases/mongodb/build_connection_string.js +36 -0
  271. package/src/lib/development_server/databases/mongodb/build_query_parameters.js +17 -0
  272. package/src/lib/development_server/databases/mongodb/check_connection.js +41 -0
  273. package/src/lib/development_server/databases/mongodb/connect.js +27 -0
  274. package/src/lib/development_server/databases/mongodb/index.js +102 -0
  275. package/src/lib/development_server/databases/mongodb/installers/linux.js +107 -0
  276. package/src/lib/development_server/databases/mongodb/installers/macos.js +109 -0
  277. package/src/lib/development_server/databases/mongodb/installers/windows.js +90 -0
  278. package/src/lib/development_server/databases/postgresql/check_connection.js +56 -0
  279. package/src/lib/development_server/databases/postgresql/connect.js +33 -0
  280. package/src/lib/development_server/databases/postgresql/index.js +157 -0
  281. package/src/lib/development_server/databases/postgresql/installers/linux.js +80 -0
  282. package/src/lib/development_server/databases/postgresql/installers/macos.js +91 -0
  283. package/src/lib/development_server/databases/postgresql/installers/windows.js +83 -0
  284. package/src/lib/development_server/databases/provider_map.js +15 -0
  285. package/src/lib/development_server/get_database_process_ids.js +28 -0
  286. package/src/lib/development_server/get_translations.js +85 -0
  287. package/src/lib/development_server/hmr_server.js +94 -0
  288. package/src/lib/development_server/index.js +436 -0
  289. package/src/lib/development_server/kill_process_ids.js +8 -0
  290. package/src/lib/development_server/run_tests.js +84 -0
  291. package/src/lib/development_server/start_app_server.js +55 -0
  292. package/src/lib/development_server/start_databases.js +108 -0
  293. package/src/lib/development_server/start_hmr_server.js +36 -0
  294. package/src/lib/development_server/watch_for_changes/browser_path_exclusions.js +8 -0
  295. package/src/lib/development_server/watch_for_changes/browser_paths.js +11 -0
  296. package/src/lib/development_server/watch_for_changes/get_after_run_tasks.js +36 -0
  297. package/src/lib/development_server/watch_for_changes/get_file_codependencies.js +53 -0
  298. package/src/lib/development_server/watch_for_changes/get_platform_safe_path.js +6 -0
  299. package/src/lib/development_server/watch_for_changes/index.js +222 -0
  300. package/src/lib/development_server/watch_for_changes/node_paths.js +17 -0
  301. package/src/lib/development_server/watch_for_changes/read_file_dependency_map.js +18 -0
  302. package/src/lib/development_server/watch_for_changes/watch_paths.js +22 -0
  303. package/src/lib/dynamic_import.js +6 -0
  304. package/src/lib/encrypt_buffer.js +10 -0
  305. package/src/lib/generate_id.js +15 -0
  306. package/src/lib/get_files_in_path.js +25 -0
  307. package/src/lib/get_platform_safe_path.js +8 -0
  308. package/src/lib/get_process_id_from_port.js +26 -0
  309. package/src/lib/is_valid_json_string.js +10 -0
  310. package/src/lib/kill_port_process.js +12 -0
  311. package/src/lib/kill_process_id.js +19 -0
  312. package/src/lib/load_settings.js +43 -0
  313. package/src/lib/loader.js +4 -77
  314. package/src/lib/log_bars.js +7 -0
  315. package/src/lib/node_path_polyfills.js +23 -0
  316. package/src/lib/parse_args.js +16 -0
  317. package/src/lib/parse_options.js +16 -0
  318. package/src/lib/path_exists.js +11 -0
  319. package/src/lib/{rainbowRoad.js → rainbow_road.js} +4 -2
  320. package/src/lib/replace_in_files.js +40 -0
  321. package/src/lib/{dev/requiredFiles.js → required_files.js} +3 -1
  322. package/src/lib/serialize_query_parameters.js +7 -0
  323. package/src/lib/types.js +59 -2
  324. package/src/lib/unique_array.js +24 -0
  325. package/HMRNOTES.txt +0 -23
  326. package/_package.json +0 -56
  327. package/canary.js +0 -12
  328. package/dist/functions/build/getTarIgnoreList.js +0 -25
  329. package/dist/functions/build/index.js +0 -54
  330. package/dist/functions/create/buildPackageJSON.js +0 -20
  331. package/dist/functions/create/index.js +0 -193
  332. package/dist/functions/create/templates/api/index.js +0 -4
  333. package/dist/functions/create/templates/i18n/en-US.js +0 -4
  334. package/dist/functions/create/templates/index.client.js +0 -7
  335. package/dist/functions/create/templates/index.css +0 -20
  336. package/dist/functions/create/templates/public/apple-touch-icon-152x152.png +0 -0
  337. package/dist/functions/create/templates/public/favicon.ico +0 -0
  338. package/dist/functions/create/templates/public/splash-screen-1024x1024.png +0 -0
  339. package/dist/functions/create/templates/ui/pages/error/index.js +0 -31
  340. package/dist/functions/create/templates/ui/pages/index/index.js +0 -94
  341. package/dist/functions/index.js +0 -269
  342. package/dist/functions/logout/index.js +0 -20
  343. package/dist/functions/push/checkIfProvisionAvailable.js +0 -19
  344. package/dist/functions/push/deploy/index.js +0 -173
  345. package/dist/functions/push/deploy/initial.js +0 -100
  346. package/dist/functions/push/deploy/version.js +0 -100
  347. package/dist/functions/push/domains.js +0 -23
  348. package/dist/functions/push/getAvailableCDN.js +0 -23
  349. package/dist/functions/push/getDeployment.js +0 -41
  350. package/dist/functions/push/getDeploymentSummary.js +0 -38
  351. package/dist/functions/push/getInstanceSizeRegions.js +0 -37
  352. package/dist/functions/push/getInstanceSizesForRegion.js +0 -34
  353. package/dist/functions/push/getProviderInstanceSizes.js +0 -34
  354. package/dist/functions/push/getProviderRegions.js +0 -36
  355. package/dist/functions/push/getProvidersWithConnectionStatus.js +0 -20
  356. package/dist/functions/push/getSessionToken.js +0 -23
  357. package/dist/functions/push/getUserFromSessionToken.js +0 -37
  358. package/dist/functions/push/index.js +0 -210
  359. package/dist/functions/push/loginToCheatCode.js +0 -33
  360. package/dist/functions/push/pingProvisionAPI.js +0 -31
  361. package/dist/functions/push/prompts.js +0 -332
  362. package/dist/functions/push/providerMap.js +0 -11
  363. package/dist/functions/push/providers.js +0 -9
  364. package/dist/functions/reset/index.js +0 -0
  365. package/dist/functions/reset/reset.js +0 -127
  366. package/dist/functions/start/bootstrapLayoutComponent.js +0 -54
  367. package/dist/functions/start/bootstrapPageComponent.js +0 -51
  368. package/dist/functions/start/buildFile.js +0 -85
  369. package/dist/functions/start/buildFiles.js +0 -76
  370. package/dist/functions/start/buildPlugins.js +0 -183
  371. package/dist/functions/start/checkIfPortAvailable.js +0 -18
  372. package/dist/functions/start/cleanup/index.js +0 -18
  373. package/dist/functions/start/databases/mongodb/availableQueryParameters.js +0 -42
  374. package/dist/functions/start/databases/mongodb/buildConnectionString.js +0 -22
  375. package/dist/functions/start/databases/mongodb/buildQueryParameters.js +0 -14
  376. package/dist/functions/start/databases/mongodb/checkConnection.js +0 -35
  377. package/dist/functions/start/databases/mongodb/connect.js +0 -25
  378. package/dist/functions/start/databases/mongodb/index.js +0 -93
  379. package/dist/functions/start/databases/postgresql/checkConnection.js +0 -41
  380. package/dist/functions/start/databases/postgresql/connect.js +0 -27
  381. package/dist/functions/start/databases/postgresql/index.js +0 -106
  382. package/dist/functions/start/databases/redis.js +0 -0
  383. package/dist/functions/start/databases/startProvider.js +0 -16
  384. package/dist/functions/start/fileDependencyMapper.js +0 -22
  385. package/dist/functions/start/filesToCopy.js +0 -18
  386. package/dist/functions/start/generateId.js +0 -74
  387. package/dist/functions/start/getCodependenciesForFile.js +0 -64
  388. package/dist/functions/start/getFilesToBuild.js +0 -39
  389. package/dist/functions/start/getProcessIdFromPort.js +0 -60
  390. package/dist/functions/start/hmrServer.js +0 -66
  391. package/dist/functions/start/index.js +0 -11
  392. package/dist/functions/start/isWindows.js +0 -5
  393. package/dist/functions/start/minifyFile.js +0 -12
  394. package/dist/functions/start/onWarn.js +0 -63
  395. package/dist/functions/start/readFileDependencyMap.js +0 -16
  396. package/dist/functions/start/removeDeletedDependenciesFromMap.js +0 -18
  397. package/dist/functions/start/setComponentId.js +0 -46
  398. package/dist/functions/start/updateFileMap.js +0 -67
  399. package/dist/functions/test/index.js +0 -12
  400. package/dist/functions/update/index.js +0 -21
  401. package/dist/functions/use/index.js +0 -61
  402. package/dist/lib/CLILog.js +0 -49
  403. package/dist/lib/build/browserPathExclusions.js +0 -8
  404. package/dist/lib/build/browserPaths.js +0 -11
  405. package/dist/lib/build/buildFile.js +0 -84
  406. package/dist/lib/build/buildFiles.js +0 -242
  407. package/dist/lib/build/buildPlugins.js +0 -186
  408. package/dist/lib/build/getCodeFrame.js +0 -9
  409. package/dist/lib/build/minifyFile.js +0 -12
  410. package/dist/lib/build/nodePathExclusions.js +0 -7
  411. package/dist/lib/build/nodePaths.js +0 -12
  412. package/dist/lib/build/onWarn.js +0 -63
  413. package/dist/lib/build/removeDeletedDependenciesFromMap.js +0 -18
  414. package/dist/lib/build/setComponentId.js +0 -46
  415. package/dist/lib/build/updateFileMap.js +0 -67
  416. package/dist/lib/buildResolvePlugin.js +0 -21
  417. package/dist/lib/checkIfValidJSON.js +0 -11
  418. package/dist/lib/colorLog.js +0 -7
  419. package/dist/lib/dev/cleanup.js +0 -18
  420. package/dist/lib/dev/databases/mongodb/availableQueryParameters.js +0 -42
  421. package/dist/lib/dev/databases/mongodb/buildConnectionString.js +0 -22
  422. package/dist/lib/dev/databases/mongodb/buildQueryParameters.js +0 -14
  423. package/dist/lib/dev/databases/mongodb/checkConnection.js +0 -38
  424. package/dist/lib/dev/databases/mongodb/connect.js +0 -25
  425. package/dist/lib/dev/databases/mongodb/index.js +0 -93
  426. package/dist/lib/dev/databases/postgresql/checkConnection.js +0 -41
  427. package/dist/lib/dev/databases/postgresql/connect.js +0 -27
  428. package/dist/lib/dev/databases/postgresql/index.js +0 -106
  429. package/dist/lib/dev/databases/providerMap.js +0 -15
  430. package/dist/lib/dev/getCodependenciesForFile.js +0 -64
  431. package/dist/lib/dev/getFilesToBuild.js +0 -38
  432. package/dist/lib/dev/hmrServer.js +0 -66
  433. package/dist/lib/dev/index.js +0 -560
  434. package/dist/lib/dev/isWindows.js +0 -5
  435. package/dist/lib/dev/loadSettings.js +0 -79
  436. package/dist/lib/dev/readFileDependencyMap.js +0 -16
  437. package/dist/lib/dev/requiredFiles.js +0 -18
  438. package/dist/lib/dev/runBuild.js +0 -30
  439. package/dist/lib/dev/runTests.js +0 -96
  440. package/dist/lib/dev/startApp.js +0 -70
  441. package/dist/lib/dev/startDatabases.js +0 -109
  442. package/dist/lib/dev/startHMR.js +0 -55
  443. package/dist/lib/dev/tests.config.js +0 -6
  444. package/dist/lib/dev/updateFileMap.js +0 -67
  445. package/dist/lib/dev/validateProject.js +0 -0
  446. package/dist/lib/dev/watchlist.js +0 -15
  447. package/dist/lib/filesToCopy.js +0 -18
  448. package/dist/lib/generateId.js +0 -74
  449. package/dist/lib/getArgs.js +0 -14
  450. package/dist/lib/getOptions.js +0 -15
  451. package/dist/lib/getPlatformSafePath.js +0 -7
  452. package/dist/lib/getProcessIdFromPort.js +0 -60
  453. package/dist/lib/getProvider.js +0 -8
  454. package/dist/lib/help.js +0 -56
  455. package/dist/lib/isObject.js +0 -6
  456. package/dist/lib/isValidJSONString.js +0 -11
  457. package/dist/lib/isWindows.js +0 -5
  458. package/dist/lib/killProcesses.js +0 -0
  459. package/dist/lib/loadSettings.js +0 -33
  460. package/dist/lib/masterIgnoreList.js +0 -16
  461. package/dist/lib/nodeEnvironment.js +0 -9
  462. package/dist/lib/nodeEnvironments.js +0 -8
  463. package/dist/lib/parseCookiesFromLogin.js +0 -18
  464. package/dist/lib/rainbowRoad.js +0 -7
  465. package/dist/lib/readDirectorySync.js +0 -14
  466. package/dist/lib/regexes.js +0 -14
  467. package/dist/lib/replaceBackslashesWithForwardSlashes.js +0 -8
  468. package/dist/lib/replaceFileProtocol.js +0 -8
  469. package/dist/lib/serializeQueryParameters.js +0 -8
  470. package/dist/lib/settings.js +0 -4
  471. package/dist/lib/validateDatabasesFromSettings.js +0 -34
  472. package/dist/lib/wait.js +0 -8
  473. package/release.js +0 -40
  474. package/src/functions/build/getTarIgnoreList.js +0 -30
  475. package/src/functions/build/index.js +0 -63
  476. package/src/functions/create/buildPackageJSON.js +0 -18
  477. package/src/functions/create/index.js +0 -209
  478. package/src/functions/create/templates/api/index.js +0 -4
  479. package/src/functions/create/templates/i18n/en-US.js +0 -4
  480. package/src/functions/create/templates/index.client.js +0 -7
  481. package/src/functions/create/templates/index.css +0 -20
  482. package/src/functions/create/templates/public/apple-touch-icon-152x152.png +0 -0
  483. package/src/functions/create/templates/public/favicon.ico +0 -0
  484. package/src/functions/create/templates/public/splash-screen-1024x1024.png +0 -0
  485. package/src/functions/create/templates/ui/pages/error/index.js +0 -31
  486. package/src/functions/create/templates/ui/pages/index/index.js +0 -94
  487. package/src/functions/index.js +0 -269
  488. package/src/functions/logout/index.js +0 -20
  489. package/src/functions/push/checkIfProvisionAvailable.js +0 -20
  490. package/src/functions/push/deploy/index.js +0 -199
  491. package/src/functions/push/deploy/initial.js +0 -108
  492. package/src/functions/push/deploy/version.js +0 -108
  493. package/src/functions/push/domains.js +0 -23
  494. package/src/functions/push/getAvailableCDN.js +0 -27
  495. package/src/functions/push/getDeployment.js +0 -43
  496. package/src/functions/push/getDeploymentSummary.js +0 -39
  497. package/src/functions/push/getInstanceSizeRegions.js +0 -40
  498. package/src/functions/push/getInstanceSizesForRegion.js +0 -35
  499. package/src/functions/push/getProviderInstanceSizes.js +0 -35
  500. package/src/functions/push/getProviderRegions.js +0 -39
  501. package/src/functions/push/getProvidersWithConnectionStatus.js +0 -25
  502. package/src/functions/push/getSessionToken.js +0 -26
  503. package/src/functions/push/getUserFromSessionToken.js +0 -39
  504. package/src/functions/push/index.js +0 -245
  505. package/src/functions/push/loginToCheatCode.js +0 -34
  506. package/src/functions/push/pingProvisionAPI.js +0 -33
  507. package/src/functions/push/prompts.js +0 -276
  508. package/src/functions/push/providerMap.js +0 -8
  509. package/src/functions/push/providers.js +0 -6
  510. package/src/functions/reset/index.js +0 -0
  511. package/src/functions/reset/reset.js +0 -163
  512. package/src/functions/start/bootstrapLayoutComponent.js +0 -57
  513. package/src/functions/start/bootstrapPageComponent.js +0 -54
  514. package/src/functions/start/buildFile.js +0 -97
  515. package/src/functions/start/buildFiles.js +0 -101
  516. package/src/functions/start/buildPlugins.js +0 -215
  517. package/src/functions/start/checkIfPortAvailable.js +0 -21
  518. package/src/functions/start/cleanup/index.js +0 -23
  519. package/src/functions/start/databases/mongodb/availableQueryParameters.js +0 -39
  520. package/src/functions/start/databases/mongodb/buildConnectionString.js +0 -28
  521. package/src/functions/start/databases/mongodb/buildQueryParameters.js +0 -15
  522. package/src/functions/start/databases/mongodb/checkConnection.js +0 -36
  523. package/src/functions/start/databases/mongodb/connect.js +0 -25
  524. package/src/functions/start/databases/mongodb/index.js +0 -108
  525. package/src/functions/start/databases/postgresql/checkConnection.js +0 -43
  526. package/src/functions/start/databases/postgresql/connect.js +0 -27
  527. package/src/functions/start/databases/postgresql/index.js +0 -127
  528. package/src/functions/start/databases/redis.js +0 -0
  529. package/src/functions/start/databases/startProvider.js +0 -15
  530. package/src/functions/start/fileDependencyMapper.js +0 -24
  531. package/src/functions/start/generateId.js +0 -73
  532. package/src/functions/start/getCodependenciesForFile.js +0 -84
  533. package/src/functions/start/getFilesToBuild.js +0 -49
  534. package/src/functions/start/getProcessIdFromPort.js +0 -92
  535. package/src/functions/start/hmrServer.js +0 -78
  536. package/src/functions/start/index.js +0 -9
  537. package/src/functions/start/isWindows.js +0 -3
  538. package/src/functions/start/minifyFile.js +0 -10
  539. package/src/functions/start/onWarn.js +0 -68
  540. package/src/functions/start/readFileDependencyMap.js +0 -19
  541. package/src/functions/start/removeDeletedDependenciesFromMap.js +0 -19
  542. package/src/functions/start/setComponentId.js +0 -58
  543. package/src/functions/start/updateFileMap.js +0 -100
  544. package/src/functions/test/index.js +0 -10
  545. package/src/functions/update/index.js +0 -20
  546. package/src/functions/use/index.js +0 -62
  547. package/src/lib/build/browserPathExclusions.js +0 -6
  548. package/src/lib/build/browserPaths.js +0 -9
  549. package/src/lib/build/buildFile.js +0 -91
  550. package/src/lib/build/buildFiles.js +0 -274
  551. package/src/lib/build/buildPlugins.js +0 -222
  552. package/src/lib/build/getCodeFrame.js +0 -7
  553. package/src/lib/build/minifyFile.js +0 -10
  554. package/src/lib/build/nodePathExclusions.js +0 -5
  555. package/src/lib/build/nodePaths.js +0 -10
  556. package/src/lib/build/onWarn.js +0 -68
  557. package/src/lib/build/removeDeletedDependenciesFromMap.js +0 -19
  558. package/src/lib/build/setComponentId.js +0 -58
  559. package/src/lib/build/updateFileMap.js +0 -100
  560. package/src/lib/buildResolvePlugin.js +0 -32
  561. package/src/lib/checkIfValidJSON.js +0 -8
  562. package/src/lib/colorLog.js +0 -5
  563. package/src/lib/dev/cleanup.js +0 -26
  564. package/src/lib/dev/databases/mongodb/buildConnectionString.js +0 -28
  565. package/src/lib/dev/databases/mongodb/buildQueryParameters.js +0 -15
  566. package/src/lib/dev/databases/mongodb/checkConnection.js +0 -40
  567. package/src/lib/dev/databases/mongodb/connect.js +0 -25
  568. package/src/lib/dev/databases/mongodb/index.js +0 -108
  569. package/src/lib/dev/databases/postgresql/checkConnection.js +0 -43
  570. package/src/lib/dev/databases/postgresql/connect.js +0 -27
  571. package/src/lib/dev/databases/postgresql/index.js +0 -127
  572. package/src/lib/dev/databases/providerMap.js +0 -13
  573. package/src/lib/dev/getCodependenciesForFile.js +0 -84
  574. package/src/lib/dev/getFilesToBuild.js +0 -47
  575. package/src/lib/dev/hmrServer.js +0 -78
  576. package/src/lib/dev/index.js +0 -685
  577. package/src/lib/dev/isWindows.js +0 -3
  578. package/src/lib/dev/loadSettings.js +0 -90
  579. package/src/lib/dev/readFileDependencyMap.js +0 -19
  580. package/src/lib/dev/runBuild.js +0 -33
  581. package/src/lib/dev/runTests.js +0 -122
  582. package/src/lib/dev/startApp.js +0 -79
  583. package/src/lib/dev/startDatabases.js +0 -131
  584. package/src/lib/dev/startHMR.js +0 -62
  585. package/src/lib/dev/tests.config.js +0 -3
  586. package/src/lib/dev/updateFileMap.js +0 -100
  587. package/src/lib/dev/validateProject.js +0 -0
  588. package/src/lib/dev/watchlist.js +0 -13
  589. package/src/lib/filesToCopy.js +0 -15
  590. package/src/lib/generateId.js +0 -73
  591. package/src/lib/getArgs.js +0 -14
  592. package/src/lib/getOptions.js +0 -12
  593. package/src/lib/getProcessIdFromPort.js +0 -92
  594. package/src/lib/getProvider.js +0 -5
  595. package/src/lib/help.js +0 -56
  596. package/src/lib/isObject.js +0 -3
  597. package/src/lib/isValidJSONString.js +0 -8
  598. package/src/lib/killProcesses.js +0 -5
  599. package/src/lib/loadSettings.js +0 -40
  600. package/src/lib/masterIgnoreList.js +0 -13
  601. package/src/lib/nodeEnvironment.js +0 -6
  602. package/src/lib/nodeEnvironments.js +0 -8
  603. package/src/lib/parseCookiesFromLogin.js +0 -21
  604. package/src/lib/readDirectorySync.js +0 -13
  605. package/src/lib/regexes.js +0 -7
  606. package/src/lib/replaceBackslashesWithForwardSlashes.js +0 -8
  607. package/src/lib/replaceFileProtocol.js +0 -8
  608. package/src/lib/serializeQueryParameters.js +0 -5
  609. package/src/lib/settings.js +0 -1
  610. package/src/lib/validateDatabasesFromSettings.js +0 -37
  611. package/src/lib/wait.js +0 -5
  612. package/storage/.verdaccio-db.json +0 -1
  613. /package/{src/lib → .build}/getPlatformSafePath.js +0 -0
  614. /package/{src/lib → .build}/isWindows.js +0 -0
  615. /package/dist/{functions/create/templates → commands/create/template}/public/service-worker.js +0 -0
  616. /package/dist/{functions/create/templates → commands/create/template}/settings.development.json +0 -0
  617. /package/src/{functions/create/templates → commands/create/template}/public/service-worker.js +0 -0
  618. /package/src/{functions/create/templates → commands/create/template}/settings.development.json +0 -0
@@ -26,7 +26,7 @@ export default () => {
26
26
  const filteredFiles = files.filter((path) => {
27
27
  return (
28
28
  !fs.lstatSync(path).isDirectory() &&
29
- !["node_modules", "src/lib/rollup.config.js", ".DS_Store"].some(
29
+ !["node_modules", ".DS_Store"].some(
30
30
  (excludedPath) => {
31
31
  return path.includes(excludedPath);
32
32
  }
package/.build/index.js CHANGED
@@ -3,7 +3,7 @@ import path from "path";
3
3
  import esbuild from "esbuild";
4
4
  import child_process from 'child_process';
5
5
  import getFilesToBuild from "./getFilesToBuild.js";
6
- import getPlatformSafePath from "../src/lib/getPlatformSafePath.js";
6
+ import getPlatformSafePath from "./getPlatformSafePath.js";
7
7
 
8
8
  const buildFile = (fileToBuild) => {
9
9
  const [_, file] = fileToBuild.split(getPlatformSafePath("src/"));
@@ -14,7 +14,7 @@ const buildFile = (fileToBuild) => {
14
14
  outfile: `./dist/${file}`,
15
15
  platform: "node",
16
16
  format: "esm",
17
- minify: false,
17
+ minify: true,
18
18
  plugins: [],
19
19
  })
20
20
  .catch((error) => {
@@ -44,7 +44,7 @@ const files = filesToBuild.map((path) => {
44
44
  let target = "esm";
45
45
 
46
46
  const copyPaths = [
47
- getPlatformSafePath("create/templates")
47
+ getPlatformSafePath("commands/create/template"),
48
48
  ];
49
49
 
50
50
  const isCopyPath = copyPaths.some((copyPath) => {
package/LICENSE.md ADDED
@@ -0,0 +1,59 @@
1
+ ## SAUCR License
2
+ ### Source Available Under Commercial Restriction
3
+ Version 1, March 3rd, 2024
4
+
5
+ ## Copyright Notice
6
+
7
+ Copyright © 2024 CheatCode Software LLC
8
+
9
+ ## Definitions
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction, and distribution of the source code as defined in this document.
12
+
13
+ "Author" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Work" shall mean the work of authorship, whether in the form of source code, documentation, assets, or other materials, made available under the License, as indicated by a Copyright Notice that is included in or attached to the work.
18
+
19
+ "Derivative Works" shall mean any work, whether in the form of source code, documentation, assets, or other materials that are based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship.
20
+
21
+ ## Scope
22
+
23
+ This license covers any and all source code, documentation, assets, or other materials included in the source code ("software", "the software", "project", "the work", "work", "the code", "code", "source", "source code", "repo", "repository", or "git repo") accompanying this license created by the author ("author", "creator", "developer", "developers", "copyright holder", "copyright holders").
24
+
25
+ This license does not cover any source code, documentation, assets, or other materials included in the source code that were not created by the author. Any source code that falls under this description is subject to its own license(s) and requirements.
26
+
27
+ ## Copyright & Attribution
28
+
29
+ The full text of this license including the above Copyright Notice shall be included in all derivative works of the source code.
30
+
31
+ The author retains full copyright, intellectual property rights, and patent rights to any and all source code, documentation, assets, or other materials included in the source code created by the author and is licensing usage of the source code, documentation, assets, or other materials included in the source code to you for the express purpose of creating any derivative work that falls within the limits imposed by the "Derivative Works Permitted" and the "Derivative Works Not Permitted" under "Agreement."
32
+
33
+ ## Agreement
34
+
35
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this source code, to use the source code in or as a part of any derivative work permitted under "Derivative Works Permitted." Copying, modifying, publishing, distributing, sub-licensing, and/or sale of the source code is permitted for any work that falls within the limits imposed by the "Derivative Works Permitted" and the "Derivative Works Not Permitted." Any usage not expressed or implied under "Derivative Works Permitted" is prohibited without written permission from the author in addition to the "Derivative Works Not Permitted."
36
+
37
+ ## Derivative Works Permitted
38
+
39
+ Under this license, the following derivative works using the source code are permitted:
40
+
41
+ Any software ("software", "app", "application", "tool", "intranet", "dashboard", "interface", "back end", "front end"), Software as a Service (SaaS) or Platform as a Service (PaaS) product or service offered either commercially or non-commercially that does not conflict with the limits of the "Derivative Works Not Permitted" stated below.
42
+
43
+ ## Derivative Works Not Permitted
44
+
45
+ Under this license, the following derivative works using the source code are not permitted:
46
+
47
+ An alternative or competing software framework ("framework", "library", "package", "packages", "fork", "forks") that originates as a fork (modified copy of the source code) or copy (either a verbatim, unmodified copy or a reproduction or re-implementation inspired by the source code) either for commercial or non-commercial purposes using either the current name or brand of the source code, Joystick, or a different name, brand, or entity.
48
+
49
+ A Platform as a Service (PaaS) made available commercially or non-commercially that offers the source code itself as a service (e.g., offering a hosted version of the framework as a service).
50
+
51
+ Use of the source code as the training data for any Artificial Intelligence (AI) model.
52
+
53
+ ## Requesting Permission for Derivative Works
54
+
55
+ Permission for derivative works not listed under "Derivative Works Permitted" can be requested from the author via email at business@cheatcode.co.
56
+
57
+ ## Limitation of Liability
58
+
59
+ THE SOURCE CODE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOURCE CODE OR THE USE OR OTHER DEALINGS IN THE SOURCE CODE.
package/README.md CHANGED
@@ -1,7 +1,48 @@
1
- <img src="https://cheatcode-assets.s3.amazonaws.com/cheatcode-logo-sm.svg" alt="CheatCode">
1
+ ## Joystick
2
2
 
3
- ## @joystick.js/cli (Beta)
3
+ A full-stack JavaScript framework for building apps and websites.
4
4
 
5
- CLI for the Joystick JavaScript framework.
5
+ [Official Website](https://cheatcode.co/joystick) | [Documentation](https://docs.cheatcode.co/joystick)
6
6
 
7
- [Read the Documentation](https://github.com/cheatcode/joystick)
7
+ ### What is Joystick?
8
+
9
+ Joystick is a full-stack JavaScript framework consisting of four packages:
10
+
11
+ - `@joystick.js/ui` - A front-end framework for building UI components with HTML, CSS, and JavaScript.
12
+ - `@joystick.js/node` - A batteries-included back-end framework based on Node.js, running an HTTP server based on Express.
13
+ - `@joystick.js/test` - A testing library used for writing and instrumenting tests for your Joystick app on the front-end and back-end.
14
+ - `@joystick.js/cli` - A command-line tool for creating Joystick apps, running their development server, and deploying them via CheatCode's [Push](https://cheatcode.co/push) service.
15
+
16
+ Together, these four packages make up Joystick. When you build an app, the first two packages—`@joystick.js/ui` and `@joystick.js/node`—power the app itself, `@joystick.js/cli` helps you create, run, and deploy the app, and `@joystick.js/test` helps you write tests for the app.
17
+
18
+ ### What is Joystick conceptually?
19
+
20
+ It's best and easiest to think of Joystick as the "Ruby on Rails" or "Django" of JavaScript. It's designed to give you everything you need in one, easy-to-use system without the need to stitch together a bunch of tools or packages. It was made for full-stack JavaScript developers who want to maximize productivity without sacrificing quality.
21
+
22
+ If you'd like to learn more about the motivation to build Joystick, read about [the philosophy behind the framework](https://docs.cheatcode.co/joystick/philosophy).
23
+
24
+ ### Platform Support
25
+
26
+ Joystick supports MacOS, Linux, and Windows and requires Node.js v20 or later.
27
+
28
+ ### Installation
29
+
30
+ To start working with Joystick, install the `@joystick.js/cli` package on to your computer:
31
+
32
+ ```bash
33
+ npm i @joystick.js/cli@latest
34
+ ```
35
+
36
+ Once installed, to create an app, run:
37
+
38
+ ```bash
39
+ joystick create <app_name>
40
+ ```
41
+
42
+ ### Documentation
43
+
44
+ Joystick's documentation can be found [here](https://docs.cheatcode.co/joystick).
45
+
46
+ ### License
47
+
48
+ Joystick is [SAUCR](https://saucr.org) licensed.
package/dist/cli.js CHANGED
@@ -1,76 +1 @@
1
- import chalk from "chalk";
2
- import help from "./lib/help.js";
3
- import functions from "./functions/index.js";
4
- import getArgs from "./lib/getArgs.js";
5
- import getOptions from "./lib/getOptions.js";
6
- const functionNames = Object.keys(functions);
7
- const functionsCalled = process.argv.filter((arg) => functionNames.includes(arg));
8
- const showHelp = process.argv.some((arg) => ["-h", "--help"].includes(arg));
9
- if (showHelp || functionsCalled.length === 0) {
10
- help();
11
- process.exit(0);
12
- }
13
- if (functionsCalled.length > 1) {
14
- console.log(chalk.red("Only one function can be called at a time."));
15
- process.exit(0);
16
- }
17
- if (functionsCalled.includes("build")) {
18
- const args = getArgs(functions.build.args);
19
- const options = getOptions(functions.build.options);
20
- if (functions.build.function && typeof functions.build.function === "function") {
21
- functions.build.function(args, options);
22
- }
23
- }
24
- if (functionsCalled.includes("create")) {
25
- const args = getArgs(functions.create.args);
26
- const options = getOptions(functions.create.options);
27
- if (!args.name) {
28
- console.log(chalk.red("Must pass a <name> for your app to joystick create. Run joystick --help for examples."));
29
- process.exit(0);
30
- }
31
- if (functions.create.function && typeof functions.create.function === "function") {
32
- functions.create.function(args, options);
33
- }
34
- }
35
- if (functionsCalled.includes("logout")) {
36
- const args = getArgs(functions.logout.args);
37
- const options = getOptions(functions.logout.options);
38
- if (functions.logout.function && typeof functions.logout.function === "function") {
39
- functions.logout.function(args, options);
40
- }
41
- }
42
- if (functionsCalled.includes("push")) {
43
- const args = getArgs(functions.push.args);
44
- const options = getOptions(functions.push.options);
45
- if (functions.push.function && typeof functions.push.function === "function") {
46
- functions.push.function(args, options);
47
- }
48
- }
49
- if (functionsCalled.includes("start")) {
50
- const args = getArgs(functions.start.args);
51
- const options = getOptions(functions.start.options);
52
- if (functions.start.function && typeof functions.start.function === "function") {
53
- functions.start.function(args, options);
54
- }
55
- }
56
- if (functionsCalled.includes("test")) {
57
- const args = getArgs(functions.test.args);
58
- const options = getOptions(functions.test.options);
59
- if (functions.test.function && typeof functions.test.function === "function") {
60
- functions.test.function(args, options);
61
- }
62
- }
63
- if (functionsCalled.includes("update")) {
64
- const args = getArgs(functions.update.args);
65
- const options = getOptions(functions.update.options);
66
- if (functions.update.function && typeof functions.update.function === "function") {
67
- functions.update.function(args, options);
68
- }
69
- }
70
- if (functionsCalled.includes("use")) {
71
- const args = getArgs(functions.use.args);
72
- const options = getOptions(functions.use.options);
73
- if (functions.use.function && typeof functions.use.function === "function") {
74
- functions.use.function(args, options);
75
- }
76
- }
1
+ import e from"chalk";import o from"./commands/index.js";import c from"./lib/parse_args.js";import a from"./lib/parse_options.js";const i=Object.keys(o),n=process.argv.filter(s=>i.includes(s)),m=process.argv.some(s=>["-h","--help"].includes(s));if((m||n.length===0)&&(o.help.command(),process.exit(0)),n.length>1&&(console.log(e.red("Only one command can be called at a time.")),process.exit(0)),n.includes("build")){const s=c(o.build.args),t=a(o.build.options);o.build.command&&o.build.command(s,t)}if(n.includes("create")){const s=c(o.create.args),t=a(o.create.options);s.name||(console.log(e.red("Must pass a <name> for your app to joystick create. Run joystick --help for examples.")),process.exit(0)),o.create.command&&o.create.command(s,t)}if(n.includes("help")){const s=c(o.help.args),t=a(o.help.options);o.help.command&&o.help.command(s,t)}if(n.includes("logout")){const s=c(o.logout.args),t=a(o.logout.options);o.logout.command&&o.logout.command(s,t)}if(n.includes("push")){const s=c(o.push.args),t=a(o.push.options);o.push.command&&o.push.command(s,t)}if(n.includes("push_v2")){const s=c(o.push_v2.args),t=a(o.push_v2.options);o.push_v2.command&&o.push_v2.command(s,t)}if(n.includes("start")){const s=c(o.start.args),t=a(o.start.options);o.start.command&&o.start.command(s,t)}if(n.includes("test")){const s=c(o.test.args),t=a(o.test.options);o.test.command&&o.test.command(s,t)}if(n.includes("update")){const s=c(o.update.args),t=a(o.update.options);o.update.command&&o.update.command(s,t)}if(n.includes("use")){const s=c(o.use.args),t=a(o.use.options);o.use.command&&o.use.command(s,t)}
@@ -0,0 +1 @@
1
+ import t from"./index.js";const[u,o,...e]=process.argv,n={description:"Build an existing Joystick app.",args:{},options:{environment:{flags:{"-e":{set:!!e.includes("-e"),value:!!e.includes("-e")&&e[e.indexOf("-e")+1],parent:"build"},"--environment":{set:!!e.includes("--environment"),value:!!e.includes("--environment")&&e[e.indexOf("--environment")+1],parent:"build"}},description:"The NODE_ENV you want to use for your build (default: production)."},outputPath:{flags:{"-o":{set:!!e.includes("-o"),value:!!e.includes("-o")&&e[e.indexOf("-o")+1],parent:"build"},"--outputPath":{set:!!e.includes("--outputPath"),value:!!e.includes("--outputPath")&&e[e.indexOf("--outputPath")+1],parent:"build"}},description:"The path you want to build the output to."},type:{flags:{"-t":{set:!!e.includes("-t"),value:!!e.includes("-t")&&e[e.indexOf("-t")+1],parent:"build"},"--type":{set:!!e.includes("--type"),value:!!e.includes("--type")&&e[e.indexOf("--type")+1],parent:"build"}},description:"The type of build you want to generate (tar or folder)."}},command:t};var d=n;export{d as default};
@@ -0,0 +1 @@
1
+ import p from"../../lib/build/index.js";const r=(t={},o={})=>{p(o)};var d=r;export{d as default};
@@ -0,0 +1 @@
1
+ const s=(t="")=>JSON.stringify({type:"module",name:t,version:"0.0.1",description:"",main:"index.js",scripts:{start:"joystick start",test:"joystick test"},keywords:[],author:"",license:"ISC"},null,2);var n=s;export{n as default};
@@ -0,0 +1 @@
1
+ import r from"./index.js";const[n,s,...e]=process.argv,a={description:"Create a new Joystick app.",args:{name:{set:!!e.includes("create")&&!!e[e.indexOf("create")+1],parent:"create",value:!!e.includes("create")&&e[e.indexOf("create")+1],description:"The name of the app to create."}},options:{release:{flags:{"-r":{set:!!e.includes("-r"),value:!!e.includes("-r")&&e[e.indexOf("-r")+1],parent:"create"},"--release":{set:!!e.includes("--release"),value:!!e.includes("--release")&&e[e.indexOf("--release")+1],parent:"create"}},description:"The release of Joystick to use (production or canary)."}},command:r};var c=a;export{c as default};
@@ -0,0 +1,2 @@
1
+ import c from"fs";import i from"chalk";import s from"child_process";import o from"util";import n from"./build_package_json.js";import l from"../../lib/cli_log.js";import m from"../../lib/loader.js";import u from"../../lib/node_path_polyfills.js";import t from"../../lib/replace_in_files.js";const{cp:p,writeFile:d,mkdir:a}=c.promises,y=o.promisify(s.exec),$=(e="")=>d(`./${e}/package.json`,n(e)),j=async(e={},r={})=>{process.loader=new m,process.loader.print("Creating app..."),r?.release&&!["production","canary"].includes(r.release)&&(l("Must pass either production or canary for --release.",{level:"danger",docs:"https://docs.cheatcode.co/joystick/cli/create"}),process.exit(0)),await p(`${u?.__package}/commands/create/template`,`./${e.name}`,{recursive:!0}),await $(e.name),await a(`./${e?.name}/.joystick`,{recursive:!0}),await a(`./${e?.name}/fixtures`,{recursive:!0}),await a(`./${e?.name}/indexes`,{recursive:!0}),await a(`./${e?.name}/lib`,{recursive:!0}),await a(`./${e?.name}/private`,{recursive:!0}),await a(`./${e?.name}/queues`,{recursive:!0}),await a(`./${e?.name}/routes`,{recursive:!0}),await a(`./${e?.name}/uploaders`,{recursive:!0}),await a(`./${e?.name}/tests`,{recursive:!0}),await a(`./${e?.name}/websockets`,{recursive:!0}),r?.release==="canary"&&(await t(`${process.cwd()}/${e?.name}`,{match:[/\.js$/],exclude:[/node_modules/],replace_regex:/(@joystick.js\/node)(?!-)/g,replace_with:"@joystick.js/node-canary"}),await t(`${process.cwd()}/${e?.name}`,{match:[/\.js$/],exclude:[/node_modules/],replace_regex:/(@joystick.js\/ui)(?!-)/g,replace_with:"@joystick.js/ui-canary"})),setTimeout(async()=>{process.loader.print("Installing dependencies..."),await y(`cd ./${e?.name} && npm install --save @joystick.js/ui${r?.release==="canary"?"-canary":""}@latest @joystick.js/node${r?.release==="canary"?"-canary":""}@latest @joystick.js/test${r?.release==="canary"?"-canary":""}@latest`),console.log(`${i.green("Project created! To get started, run:")}
2
+ cd ${e?.name} && joystick${r?.release==="canary"?"-canary":""} start`)},1e3)};var q=j;export{q as default};
@@ -0,0 +1,6 @@
1
+ const api = {
2
+ getters: {},
3
+ setters: {},
4
+ };
5
+
6
+ export default api;
@@ -0,0 +1,9 @@
1
+ body {
2
+ margin: 0;
3
+ padding: 30px;
4
+ font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
5
+ background: #fff;
6
+ color: #222;
7
+ font-size: 15px;
8
+ line-height: 23px;
9
+ }
@@ -0,0 +1,10 @@
1
+ <html>
2
+ <head>
3
+ <title>${subject}</title>
4
+ ${css}
5
+ </head>
6
+ <body>
7
+ <span class="preheader">${preheader}</span>
8
+ <div id="email"></div>
9
+ </body>
10
+ </html>
@@ -0,0 +1,20 @@
1
+ import ui from '@joystick.js/ui';
2
+
3
+ const ResetPassword = ui.component({
4
+ css: {
5
+ min: {
6
+ width: {
7
+ 0: `
8
+ `,
9
+ },
10
+ },
11
+ },
12
+ render: ({ props }) => {
13
+ return `
14
+ <div>
15
+ </div>
16
+ `;
17
+ },
18
+ });
19
+
20
+ export default ResetPassword;
@@ -0,0 +1,14 @@
1
+ const en_US = {
2
+ 'ui/pages/index/index.js': {
3
+ buttons: {
4
+ get_started: 'Get Started',
5
+ view_on_github: '<span>{{stars}}</span> View on Github',
6
+ }
7
+ },
8
+ 'ui/pages/error/index.js': {
9
+ page_not_found: 'Page Not Found',
10
+ double_check_url: 'Double-check the URL and try again.'
11
+ },
12
+ };
13
+
14
+ export default en_US;
@@ -0,0 +1 @@
1
+ // Add analytics, metrics, etc. here.
@@ -0,0 +1,34 @@
1
+ :root {
2
+ --brand: #ffcc00;
3
+ }
4
+
5
+ *,
6
+ *:before,
7
+ *:after {
8
+ margin: 0;
9
+ padding: 0;
10
+ position: relative;
11
+ box-sizing: border-box;
12
+ min-width: 0;
13
+ }
14
+
15
+ body {
16
+ min-height: 100dvh;
17
+ font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
18
+ font-size: 16px;
19
+ line-height: 1.5em;
20
+ background: #000;
21
+ }
22
+
23
+ h1,
24
+ h2,
25
+ h3,
26
+ h4,
27
+ h5,
28
+ h6 {
29
+ text-wrap: balance;
30
+ }
31
+
32
+ p {
33
+ text-wrap: pretty;
34
+ }
@@ -2,8 +2,8 @@
2
2
  <html class="no-js" lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <title>Joystick</title>
6
- <meta name="description" content="An awesome JavaScript app that's under development.">
5
+ <title>App</title>
6
+ <meta name="description" content="A new Joystick app.">
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1">
8
8
  <meta name="theme-color" content="#FFCC00">
9
9
  <link rel="apple-touch-icon" href="/apple-touch-icon-152x152.png">
@@ -13,7 +13,6 @@
13
13
  </head>
14
14
  <body>
15
15
  <div id="app"></div>
16
- ${scripts}
17
16
  <script>
18
17
  if ("serviceWorker" in navigator) {
19
18
  navigator.serviceWorker.register("/service-worker.js");
@@ -1,19 +1,19 @@
1
- import node from "@joystick.js/node";
2
- import api from "./api";
1
+ import joystick from "@joystick.js/node";
2
+ import api from "./api/index.js";
3
3
 
4
- node.app({
4
+ joystick.app({
5
5
  api,
6
6
  routes: {
7
- "/": (req, res) => {
7
+ "/": (req = {}, res = {}) => {
8
8
  res.render("ui/pages/index/index.js", {
9
9
  layout: "ui/layouts/app/index.js",
10
10
  });
11
11
  },
12
- "*": (req, res) => {
12
+ "*": (req = {}, res = {}) => {
13
13
  res.render("ui/pages/error/index.js", {
14
14
  layout: "ui/layouts/app/index.js",
15
15
  props: {
16
- statusCode: 404,
16
+ status_code: 404,
17
17
  },
18
18
  });
19
19
  },
@@ -3,12 +3,12 @@
3
3
  "short_name": "app",
4
4
  "start_url": ".",
5
5
  "display": "standalone",
6
- "background_color": "#fff",
7
- "theme_color": "#ffcc00",
8
- "description": "An awesome JavaScript app that's under development.",
6
+ "background_color": "#000000",
7
+ "theme_color": "#000000",
8
+ "description": "A new Joystick app.",
9
9
  "icons": [{
10
10
  "src": "favicon.ico",
11
- "sizes": "64x64",
11
+ "sizes": "32x32",
12
12
  "type": "image/x-icon"
13
13
  }, {
14
14
  "purpose": "any",
@@ -1,23 +1,29 @@
1
- import ui from "@joystick.js/ui";
1
+ import joystick from "@joystick.js/ui";
2
2
 
3
- const Button = ui.component({
3
+ const Button = joystick.component({
4
4
  css: `
5
5
  .button {
6
6
  display: inline-block;
7
7
  background: #eee;
8
- padding: 15px 20px;
8
+ padding: 12px 20px;
9
+ font-size: 15px;
10
+ font-weight: 400;
9
11
  border-radius: 3px;
10
12
  text-decoration: none;
11
13
  color: #333;
14
+ white-space: nowrap;
12
15
  }
13
16
 
14
17
  .button.brand {
15
18
  background: var(--brand);
19
+ border: 2px solid var(--brand);
16
20
  color: #333;
21
+ font-size: 15px;
22
+ font-weight: 500;
17
23
  }
18
24
 
19
25
  .button.github {
20
- background: #333;
26
+ background: #111;
21
27
  color: #fff;
22
28
  padding: 0px 20px 0px 0px;
23
29
  }
@@ -25,10 +31,12 @@ const Button = ui.component({
25
31
  .button.github span {
26
32
  display: inline-block;
27
33
  margin-right: 20px;
28
- font-weight: 500;
34
+ font-weight: 600;
29
35
  background: #000;
30
- padding: 15px 20px;
36
+ padding: 12px 18px;
31
37
  border-radius: 3px 0px 0px 3px;
38
+ color: #fff;
39
+ border: 2px solid #111;
32
40
  }
33
41
  `,
34
42
  render: ({ props, when }) => {
@@ -1,6 +1,6 @@
1
- import ui from "@joystick.js/ui";
1
+ import joystick from "@joystick.js/ui";
2
2
 
3
- const App = ui.component({
3
+ const App = joystick.component({
4
4
  render: ({ props, component }) => {
5
5
  return `
6
6
  <div>
@@ -0,0 +1,50 @@
1
+ import joystick from "@joystick.js/ui";
2
+
3
+ const Error = joystick.component({
4
+ css: `
5
+ .error {
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ height: 100vh;
10
+ }
11
+
12
+ .error > header {
13
+ text-align: center;
14
+ margin: 50px 0;
15
+ }
16
+
17
+ h1 {
18
+ color: #444;
19
+ font-size: 64px;
20
+ font-weight: 400;
21
+ letter-spacing: 0.03em;
22
+ }
23
+
24
+ h4 {
25
+ color: #fff;
26
+ font-size: 20px;
27
+ font-weight: bold;
28
+ margin-top: 40px;
29
+ }
30
+
31
+ p {
32
+ font-size: 16px;
33
+ color: #888;
34
+ margin-top: 10px;
35
+ }
36
+ `,
37
+ render: ({ i18n, props }) => {
38
+ return `
39
+ <div class="error">
40
+ <header>
41
+ <h1>${props.status_code}</h1>
42
+ <h4>${i18n('page_not_found')}</h4>
43
+ <p>${i18n('double_check_url')}</p>
44
+ </header>
45
+ </div>
46
+ `;
47
+ },
48
+ });
49
+
50
+ export default Error;