@joystick.js/node-canary 0.0.0-canary.47 → 0.0.0-canary.470

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 (439) hide show
  1. package/.build/getFilesToBuild.js +26 -0
  2. package/.build/getPlatformSafeFilePath.js +6 -0
  3. package/.build/getPlatformSafePath.js +6 -0
  4. package/.build/index.js +88 -0
  5. package/.build/isWindows.js +3 -0
  6. package/dist/action/class.js +1 -82
  7. package/dist/action/index.js +1 -8
  8. package/dist/app/accounts/default_user_output_fields.js +1 -0
  9. package/dist/app/accounts/delete_user.js +1 -0
  10. package/dist/app/accounts/generate_account_session.js +1 -0
  11. package/dist/app/accounts/generate_password_reset_token.js +1 -0
  12. package/dist/app/accounts/get_browser_safe_user.js +1 -0
  13. package/dist/app/accounts/has_login_token_expired.js +1 -0
  14. package/dist/app/accounts/index.js +1 -29
  15. package/dist/app/accounts/login.js +1 -59
  16. package/dist/app/accounts/recover_password.js +1 -0
  17. package/dist/app/accounts/reset_password.js +1 -0
  18. package/dist/app/accounts/roles/add.js +1 -7
  19. package/dist/app/accounts/roles/grant.js +1 -7
  20. package/dist/app/accounts/roles/index.js +1 -17
  21. package/dist/app/accounts/roles/list.js +1 -7
  22. package/dist/app/accounts/roles/remove.js +1 -7
  23. package/dist/app/accounts/roles/revoke.js +1 -7
  24. package/dist/app/accounts/roles/user_has_role.js +1 -0
  25. package/dist/app/accounts/send_email_verification.js +1 -0
  26. package/dist/app/accounts/set_account_cookie.js +1 -0
  27. package/dist/app/accounts/set_password.js +1 -0
  28. package/dist/app/accounts/signup.js +1 -97
  29. package/dist/app/accounts/unset_account_cookie.js +1 -0
  30. package/dist/app/accounts/verify_email.js +1 -0
  31. package/dist/app/api/accounts/authenticated.js +1 -0
  32. package/dist/app/api/accounts/login.js +1 -0
  33. package/dist/app/api/accounts/logout.js +1 -0
  34. package/dist/app/api/accounts/recover_password.js +1 -0
  35. package/dist/app/api/accounts/reset_password.js +1 -0
  36. package/dist/app/api/accounts/signup.js +1 -0
  37. package/dist/app/api/accounts/user.js +1 -0
  38. package/dist/app/api/accounts/verify_email.js +1 -0
  39. package/dist/app/api/format_api_error.js +1 -0
  40. package/dist/app/api/get.js +2 -0
  41. package/dist/app/api/get_api_context.js +1 -0
  42. package/dist/app/api/get_api_for_data_functions.js +1 -0
  43. package/dist/app/api/get_api_url_component.js +1 -0
  44. package/dist/app/api/get_output.js +1 -0
  45. package/dist/app/api/get_value_from_object.js +1 -0
  46. package/dist/app/api/handle_api_error.js +1 -0
  47. package/dist/app/api/input_validators.js +1 -0
  48. package/dist/app/api/is_array_path.js +1 -0
  49. package/dist/app/api/push/health.js +2 -0
  50. package/dist/app/api/register_getters.js +1 -0
  51. package/dist/app/api/register_setters.js +1 -0
  52. package/dist/app/api/sanitize_api_response.js +1 -0
  53. package/dist/app/api/set.js +2 -0
  54. package/dist/app/api/test/accounts/delete.js +1 -0
  55. package/dist/app/api/test/accounts/signup.js +1 -0
  56. package/dist/app/api/test/bootstrap.js +1 -0
  57. package/dist/app/api/test/process.js +1 -0
  58. package/dist/app/api/test/queues.js +1 -0
  59. package/dist/app/api/validate_input.js +1 -0
  60. package/dist/app/api/validate_session.js +1 -0
  61. package/dist/app/api/validate_type.js +1 -0
  62. package/dist/app/browser/hmr_client.js +1 -0
  63. package/dist/app/browser/process_polyfill.js +1 -0
  64. package/dist/app/cron_jobs/register.js +1 -0
  65. package/dist/app/databases/database_type_map.js +1 -0
  66. package/dist/app/databases/get_target_database_connection.js +1 -0
  67. package/dist/app/databases/mongodb/available_query_parameters.js +1 -0
  68. package/dist/app/databases/mongodb/build_connection_string.js +1 -0
  69. package/dist/app/databases/mongodb/build_query_parameters.js +1 -0
  70. package/dist/app/databases/mongodb/connect.js +6 -0
  71. package/dist/app/databases/mongodb/create_indexes.js +1 -0
  72. package/dist/app/databases/postgresql/accounts/create_accounts_metadata_table_columns.js +1 -0
  73. package/dist/app/databases/postgresql/connect.js +30 -0
  74. package/dist/app/databases/postgresql/create_indexes.js +1 -0
  75. package/dist/app/databases/postgresql/create_tables.js +1 -0
  76. package/dist/app/databases/postgresql/handle_cleanup_queues.js +5 -0
  77. package/dist/app/databases/postgresql/handle_cleanup_sessions.js +1 -0
  78. package/dist/app/databases/queries/accounts.js +1 -0
  79. package/dist/app/databases/queries/map.js +1 -0
  80. package/dist/app/databases/queries/mongodb/accounts.js +1 -0
  81. package/dist/app/databases/queries/mongodb/queues.js +1 -0
  82. package/dist/app/databases/queries/mongodb/sessions.js +1 -0
  83. package/dist/app/databases/queries/postgresql/accounts.js +1 -0
  84. package/dist/app/databases/queries/postgresql/queues.js +123 -0
  85. package/dist/app/databases/queries/postgresql/sessions.js +14 -0
  86. package/dist/app/databases/queries/sessions.js +1 -0
  87. package/dist/app/databases/register_database.js +1 -0
  88. package/dist/app/databases/sql.js +1 -0
  89. package/dist/app/email/send.js +1 -0
  90. package/dist/app/email/validate_smtp_settings.js +1 -0
  91. package/dist/app/fixture/index.js +1 -0
  92. package/dist/app/generate_machine_id.js +1 -0
  93. package/dist/app/generate_process_id.js +1 -0
  94. package/dist/app/get_ssl_certificates.js +1 -0
  95. package/dist/app/handle_process_errors.js +1 -0
  96. package/dist/app/index.js +1 -656
  97. package/dist/app/middleware/account.js +1 -0
  98. package/dist/app/middleware/body_parser.js +1 -0
  99. package/dist/app/middleware/build_error.js +1 -0
  100. package/dist/app/middleware/built_in.js +1 -0
  101. package/dist/app/middleware/context.js +1 -0
  102. package/dist/app/middleware/cors.js +1 -22
  103. package/dist/app/middleware/csp.js +1 -48
  104. package/dist/app/middleware/generate_insecure_page.js +65 -0
  105. package/dist/app/middleware/generate_joystick_error_page.js +147 -0
  106. package/dist/app/middleware/hmr_client.js +1 -0
  107. package/dist/app/middleware/insecure.js +1 -11
  108. package/dist/app/middleware/process_browser_polyfill.js +1 -0
  109. package/dist/app/middleware/render/get_url.js +1 -0
  110. package/dist/app/middleware/render/index.js +1 -0
  111. package/dist/app/middleware/request_methods.js +1 -0
  112. package/dist/app/middleware/session.js +1 -24
  113. package/dist/app/push_logs.js +1 -0
  114. package/dist/app/queues/index.js +1 -119
  115. package/dist/app/register_app_options.js +1 -0
  116. package/dist/app/routes/register_route_from_function.js +1 -0
  117. package/dist/app/routes/register_route_from_object.js +1 -0
  118. package/dist/app/routes/supported_http_methods.js +1 -0
  119. package/dist/app/settings/load.js +1 -0
  120. package/dist/app/ssr/index.js +33 -0
  121. package/dist/app/ssr/set_base_attributes_in_html.js +1 -0
  122. package/dist/app/ssr/set_head_tags_in_html.js +1 -0
  123. package/dist/app/start_express.js +1 -0
  124. package/dist/app/start_node_as_cluster.js +1 -0
  125. package/dist/app/uploaders/local_upload_progress_middleware.js +1 -0
  126. package/dist/app/uploaders/register.js +1 -0
  127. package/dist/app/uploaders/run_upload.js +1 -0
  128. package/dist/app/uploaders/validate_options.js +1 -0
  129. package/dist/app/uploaders/validate_uploads.js +1 -0
  130. package/dist/app/websockets/emit_event.js +1 -0
  131. package/dist/app/websockets/index.js +1 -0
  132. package/dist/app/websockets/register.js +1 -0
  133. package/dist/index.js +4 -76
  134. package/dist/lib/camel_pascal_to_snake.js +1 -0
  135. package/dist/lib/constants.js +1 -13
  136. package/dist/lib/dynamic_import.js +1 -0
  137. package/dist/lib/escape_html.js +1 -0
  138. package/dist/lib/escape_key_value_pair.js +1 -0
  139. package/dist/lib/float_to_decimal_place.js +1 -0
  140. package/dist/lib/generate_id.js +1 -0
  141. package/dist/lib/get_browser_safe_request.js +1 -0
  142. package/dist/lib/get_joystick_build_path.js +1 -0
  143. package/dist/lib/get_origin.js +1 -0
  144. package/dist/lib/get_platform_safe_path.js +1 -0
  145. package/dist/lib/get_sanitized_context.js +1 -0
  146. package/dist/lib/get_translations.js +1 -0
  147. package/dist/lib/hash_string.js +1 -0
  148. package/dist/lib/is_valid_json.js +1 -0
  149. package/dist/lib/log.js +13 -49
  150. package/dist/lib/node_path_polyfills.js +1 -0
  151. package/dist/lib/parse_json.js +1 -0
  152. package/dist/lib/path_exists.js +1 -0
  153. package/dist/lib/rainbow_road.js +1 -0
  154. package/dist/lib/serialize_query_parameters.js +1 -0
  155. package/dist/lib/set_cookie.js +1 -0
  156. package/dist/lib/string_to_slug.js +1 -0
  157. package/dist/lib/timestamps.js +1 -0
  158. package/dist/lib/types.js +1 -0
  159. package/dist/lib/unset_cookie.js +1 -0
  160. package/dist/lib/wait.js +1 -0
  161. package/dist/test/track_function_call.js +1 -0
  162. package/increment_version.js +3 -0
  163. package/package.json +27 -44
  164. package/src/action/class.js +137 -0
  165. package/src/action/index.js +8 -0
  166. package/src/app/accounts/default_user_output_fields.js +10 -0
  167. package/src/app/accounts/delete_user.js +18 -0
  168. package/src/app/accounts/generate_account_session.js +11 -0
  169. package/src/app/accounts/generate_password_reset_token.js +16 -0
  170. package/src/app/accounts/get_browser_safe_user.js +29 -0
  171. package/src/app/accounts/has_login_token_expired.js +9 -0
  172. package/src/app/accounts/index.js +38 -0
  173. package/src/app/accounts/login.js +82 -0
  174. package/src/app/accounts/recover_password.js +58 -0
  175. package/src/app/accounts/reset_password.js +69 -0
  176. package/src/app/accounts/roles/add.js +7 -0
  177. package/src/app/accounts/roles/grant.js +7 -0
  178. package/src/app/accounts/roles/index.js +18 -0
  179. package/src/app/accounts/roles/list.js +7 -0
  180. package/src/app/accounts/roles/remove.js +7 -0
  181. package/src/app/accounts/roles/revoke.js +7 -0
  182. package/src/app/accounts/roles/user_has_role.js +7 -0
  183. package/src/app/accounts/send_email_verification.js +48 -0
  184. package/src/app/accounts/set_account_cookie.js +12 -0
  185. package/src/app/accounts/set_password.js +46 -0
  186. package/src/app/accounts/signup.js +158 -0
  187. package/src/app/accounts/unset_account_cookie.js +12 -0
  188. package/src/app/accounts/verify_email.js +32 -0
  189. package/src/app/api/accounts/authenticated.js +17 -0
  190. package/src/app/api/accounts/login.js +36 -0
  191. package/src/app/api/accounts/logout.js +20 -0
  192. package/src/app/api/accounts/recover_password.js +16 -0
  193. package/src/app/api/accounts/reset_password.js +24 -0
  194. package/src/app/api/accounts/signup.js +49 -0
  195. package/src/app/api/accounts/user.js +21 -0
  196. package/src/app/api/accounts/verify_email.js +11 -0
  197. package/src/app/api/format_api_error.js +10 -0
  198. package/src/app/api/get.js +119 -0
  199. package/src/app/api/get_api_context.js +27 -0
  200. package/src/app/api/get_api_for_data_functions.js +37 -0
  201. package/src/app/api/get_api_url_component.js +5 -0
  202. package/src/app/api/get_output.js +116 -0
  203. package/src/app/api/get_value_from_object.js +8 -0
  204. package/src/app/api/handle_api_error.js +28 -0
  205. package/src/app/api/input_validators.js +227 -0
  206. package/src/app/api/is_array_path.js +6 -0
  207. package/src/app/api/push/health.js +17 -0
  208. package/src/app/api/register_getters.js +57 -0
  209. package/src/app/api/register_setters.js +55 -0
  210. package/src/app/api/sanitize_api_response.js +35 -0
  211. package/src/app/api/set.js +119 -0
  212. package/src/app/api/test/accounts/delete.js +8 -0
  213. package/src/app/api/test/accounts/signup.js +50 -0
  214. package/src/app/api/test/bootstrap.js +39 -0
  215. package/src/app/api/test/process.js +7 -0
  216. package/src/app/api/test/queues.js +25 -0
  217. package/src/app/api/validate_input.js +130 -0
  218. package/src/app/api/validate_session.js +20 -0
  219. package/src/app/api/validate_type.js +24 -0
  220. package/src/app/browser/hmr_client.js +196 -0
  221. package/src/app/browser/process_polyfill.js +11 -0
  222. package/src/app/cron_jobs/register.js +29 -0
  223. package/src/app/databases/database_type_map.js +6 -0
  224. package/src/app/databases/get_target_database_connection.js +25 -0
  225. package/{dist/app/databases/mongodb/availableQueryParameters.js → src/app/databases/mongodb/available_query_parameters.js} +3 -4
  226. package/src/app/databases/mongodb/build_connection_string.js +30 -0
  227. package/src/app/databases/mongodb/build_query_parameters.js +17 -0
  228. package/src/app/databases/mongodb/connect.js +42 -0
  229. package/src/app/databases/mongodb/create_indexes.js +35 -0
  230. package/src/app/databases/postgresql/accounts/create_accounts_metadata_table_columns.js +18 -0
  231. package/src/app/databases/postgresql/connect.js +128 -0
  232. package/src/app/databases/postgresql/create_indexes.js +58 -0
  233. package/src/app/databases/postgresql/create_tables.js +70 -0
  234. package/src/app/databases/postgresql/handle_cleanup_queues.js +36 -0
  235. package/src/app/databases/postgresql/handle_cleanup_sessions.js +5 -0
  236. package/src/app/databases/queries/accounts.js +17 -0
  237. package/src/app/databases/queries/map.js +21 -0
  238. package/src/app/databases/queries/mongodb/accounts.js +360 -0
  239. package/src/app/databases/queries/mongodb/queues.js +164 -0
  240. package/src/app/databases/queries/mongodb/sessions.js +22 -0
  241. package/src/app/databases/queries/postgresql/accounts.js +379 -0
  242. package/src/app/databases/queries/postgresql/queues.js +294 -0
  243. package/src/app/databases/queries/postgresql/sessions.js +37 -0
  244. package/src/app/databases/queries/sessions.js +17 -0
  245. package/src/app/databases/register_database.js +30 -0
  246. package/src/app/databases/sql.js +63 -0
  247. package/src/app/email/send.js +108 -0
  248. package/src/app/email/validate_smtp_settings.js +53 -0
  249. package/src/app/fixture/index.js +50 -0
  250. package/src/app/generate_machine_id.js +26 -0
  251. package/src/app/generate_process_id.js +30 -0
  252. package/src/app/get_ssl_certificates.js +23 -0
  253. package/src/app/handle_process_errors.js +101 -0
  254. package/src/app/index.js +253 -0
  255. package/src/app/middleware/account.js +28 -0
  256. package/src/app/middleware/body_parser.js +18 -0
  257. package/src/app/middleware/build_error.js +18 -0
  258. package/src/app/middleware/built_in.js +76 -0
  259. package/src/app/middleware/context.js +34 -0
  260. package/src/app/middleware/cors.js +23 -0
  261. package/src/app/middleware/csp.js +54 -0
  262. package/src/app/middleware/generate_insecure_page.js +71 -0
  263. package/{dist/lib/generateErrorPage.js → src/app/middleware/generate_joystick_error_page.js} +25 -21
  264. package/src/app/middleware/hmr_client.js +12 -0
  265. package/src/app/middleware/insecure.js +22 -0
  266. package/src/app/middleware/process_browser_polyfill.js +12 -0
  267. package/src/app/middleware/render/get_url.js +15 -0
  268. package/src/app/middleware/render/index.js +93 -0
  269. package/src/app/middleware/request_methods.js +21 -0
  270. package/src/app/middleware/session.js +31 -0
  271. package/src/app/push_logs.js +44 -0
  272. package/src/app/queues/index.js +268 -0
  273. package/src/app/register_app_options.js +7 -0
  274. package/src/app/routes/register_route_from_function.js +10 -0
  275. package/src/app/routes/register_route_from_object.js +34 -0
  276. package/src/app/routes/supported_http_methods.js +9 -0
  277. package/src/app/settings/load.js +33 -0
  278. package/src/app/ssr/index.js +133 -0
  279. package/src/app/ssr/set_base_attributes_in_html.js +43 -0
  280. package/src/app/ssr/set_head_tags_in_html.js +104 -0
  281. package/src/app/start_express.js +50 -0
  282. package/src/app/start_node_as_cluster.js +30 -0
  283. package/src/app/uploaders/local_upload_progress_middleware.js +24 -0
  284. package/src/app/uploaders/register.js +169 -0
  285. package/src/app/uploaders/run_upload.js +136 -0
  286. package/src/app/uploaders/validate_options.js +74 -0
  287. package/src/app/uploaders/validate_uploads.js +127 -0
  288. package/src/app/websockets/emit_event.js +14 -0
  289. package/src/app/websockets/index.js +16 -0
  290. package/src/app/websockets/register.js +175 -0
  291. package/src/index.js +81 -0
  292. package/{dist/lib/camelPascalToSnake.js → src/lib/camel_pascal_to_snake.js} +3 -4
  293. package/src/lib/constants.js +21 -0
  294. package/src/lib/dynamic_import.js +8 -0
  295. package/src/lib/escape_html.js +9 -0
  296. package/src/lib/escape_key_value_pair.js +15 -0
  297. package/src/lib/float_to_decimal_place.js +5 -0
  298. package/src/lib/generate_id.js +15 -0
  299. package/src/lib/get_browser_safe_request.js +17 -0
  300. package/src/lib/get_joystick_build_path.js +22 -0
  301. package/src/lib/get_origin.js +7 -0
  302. package/src/lib/get_platform_safe_path.js +8 -0
  303. package/src/lib/get_sanitized_context.js +51 -0
  304. package/src/lib/get_translations.js +109 -0
  305. package/src/lib/hash_string.js +7 -0
  306. package/src/lib/is_valid_json.js +10 -0
  307. package/src/lib/log.js +42 -0
  308. package/src/lib/node_path_polyfills.js +23 -0
  309. package/src/lib/parse_json.js +9 -0
  310. package/src/lib/path_exists.js +12 -0
  311. package/src/lib/rainbow_road.js +7 -0
  312. package/src/lib/serialize_query_parameters.js +7 -0
  313. package/src/lib/set_cookie.js +16 -0
  314. package/src/lib/string_to_slug.js +14 -0
  315. package/src/lib/timestamps.js +48 -0
  316. package/src/lib/types.js +59 -0
  317. package/src/lib/unset_cookie.js +11 -0
  318. package/src/lib/wait.js +9 -0
  319. package/src/test/track_function_call.js +16 -0
  320. package/README.md +0 -8
  321. package/_package.json +0 -63
  322. package/canary.js +0 -12
  323. package/dist/api/get.js +0 -29
  324. package/dist/api/getOrigin.js +0 -6
  325. package/dist/api/index.js +0 -9
  326. package/dist/api/set.js +0 -29
  327. package/dist/app/accounts/defaultUserOutputFields.js +0 -9
  328. package/dist/app/accounts/generateResetToken.js +0 -28
  329. package/dist/app/accounts/generateSession.js +0 -15
  330. package/dist/app/accounts/getBrowserSafeUser.js +0 -24
  331. package/dist/app/accounts/hasLoginTokenExpired.js +0 -17
  332. package/dist/app/accounts/hashString.js +0 -7
  333. package/dist/app/accounts/recoverPassword.js +0 -30
  334. package/dist/app/accounts/resetPassword.js +0 -73
  335. package/dist/app/accounts/roles/userHasRole.js +0 -7
  336. package/dist/app/accounts/runUserQuery.js +0 -15
  337. package/dist/app/accounts/sendEmailVerification.js +0 -65
  338. package/dist/app/accounts/setAuthenticationCookie.js +0 -11
  339. package/dist/app/accounts/setPassword.js +0 -45
  340. package/dist/app/accounts/unsetAuthenticationCookie.js +0 -11
  341. package/dist/app/accounts/verifyEmail.js +0 -46
  342. package/dist/app/databases/getTargetDatabase.js +0 -10
  343. package/dist/app/databases/getTargetDatabaseConnection.js +0 -19
  344. package/dist/app/databases/getTargetDatabaseProvider.js +0 -10
  345. package/dist/app/databases/mongodb/buildConnectionString.js +0 -22
  346. package/dist/app/databases/mongodb/buildQueryParameters.js +0 -14
  347. package/dist/app/databases/mongodb/index.js +0 -40
  348. package/dist/app/databases/mongodb/queries/accounts.js +0 -266
  349. package/dist/app/databases/mongodb/queries/queues.js +0 -111
  350. package/dist/app/databases/postgresql/addColumnToTable.js +0 -6
  351. package/dist/app/databases/postgresql/createAccountsIndexes.js +0 -21
  352. package/dist/app/databases/postgresql/createAccountsTables.js +0 -39
  353. package/dist/app/databases/postgresql/createDatabase.js +0 -0
  354. package/dist/app/databases/postgresql/index.js +0 -55
  355. package/dist/app/databases/postgresql/queries/accounts.js +0 -186
  356. package/dist/app/databases/postgresql/queries/queues.js +0 -211
  357. package/dist/app/databases/queryMap.js +0 -17
  358. package/dist/app/databases/typesMap.js +0 -7
  359. package/dist/app/getAPIContext.js +0 -25
  360. package/dist/app/getAPIURLComponent.js +0 -6
  361. package/dist/app/getBrowserSafeRequest.js +0 -14
  362. package/dist/app/getOutput.js +0 -74
  363. package/dist/app/handleProcessErrors.js +0 -73
  364. package/dist/app/initExpress.js +0 -41
  365. package/dist/app/middleware/bodyParser.js +0 -16
  366. package/dist/app/middleware/hmr/client.js +0 -113
  367. package/dist/app/middleware/index.js +0 -89
  368. package/dist/app/middleware/render.js +0 -213
  369. package/dist/app/middleware/requestMethods.js +0 -19
  370. package/dist/app/registerGetters.js +0 -45
  371. package/dist/app/registerSetters.js +0 -45
  372. package/dist/app/runGetter.js +0 -103
  373. package/dist/app/runSetter.js +0 -103
  374. package/dist/app/runUploader.js +0 -143
  375. package/dist/app/sanitizeAPIResponse.js +0 -27
  376. package/dist/app/utils/process.js +0 -193
  377. package/dist/app/validateSession.js +0 -19
  378. package/dist/app/validateUploaderOptions.js +0 -53
  379. package/dist/app/validateUploads.js +0 -102
  380. package/dist/email/render.js +0 -50
  381. package/dist/email/send.js +0 -55
  382. package/dist/email/templates/base.css +0 -194
  383. package/dist/email/templates/base.html +0 -28
  384. package/dist/email/templates/reset-password.js +0 -13
  385. package/dist/email/validateSMTPSettings.js +0 -27
  386. package/dist/lib/escapeHTML.js +0 -9
  387. package/dist/lib/escapeKeyValuePair.js +0 -13
  388. package/dist/lib/formatAPIError.js +0 -12
  389. package/dist/lib/formatErrorString.js +0 -8
  390. package/dist/lib/generateCookie.js +0 -14
  391. package/dist/lib/generateId.js +0 -13
  392. package/dist/lib/generateMachineId.js +0 -15
  393. package/dist/lib/getBuildPath.js +0 -10
  394. package/dist/lib/getErrorObject.js +0 -9
  395. package/dist/lib/getPlatformSafeFilePath.js +0 -8
  396. package/dist/lib/getPlatformSafePath.js +0 -8
  397. package/dist/lib/getSSLCertificates.js +0 -19
  398. package/dist/lib/isValidHTTPMethod.js +0 -7
  399. package/dist/lib/isValidJSONString.js +0 -11
  400. package/dist/lib/nodeUrlPolyfills.js +0 -14
  401. package/dist/lib/objectToSQLKeysString.js +0 -18
  402. package/dist/lib/objectToSQLValuesString.js +0 -16
  403. package/dist/lib/obscenedb/debounce.js +0 -12
  404. package/dist/lib/obscenedb/index.js +0 -61
  405. package/dist/lib/parseDatabasesFromEnvironment.js +0 -9
  406. package/dist/lib/rainbowRoad.js +0 -7
  407. package/dist/lib/readDirectory.js +0 -24
  408. package/dist/lib/replaceBackslashesWithForwardSlashes.js +0 -8
  409. package/dist/lib/replaceFileProtocol.js +0 -8
  410. package/dist/lib/replaceForwardSlashesWithBackslashes.js +0 -8
  411. package/dist/lib/serializeQueryParameters.js +0 -8
  412. package/dist/lib/serverAvailable.js +0 -0
  413. package/dist/lib/setCookie.js +0 -16
  414. package/dist/lib/supportedHTTPMethods.js +0 -4
  415. package/dist/lib/unsetCookie.js +0 -13
  416. package/dist/push/logs/index.js +0 -55
  417. package/dist/settings/index.js +0 -5
  418. package/dist/settings/load.js +0 -30
  419. package/dist/ssr/compileCSS.js +0 -85
  420. package/dist/ssr/findComponentInTree.js +0 -29
  421. package/dist/ssr/formatCSS.js +0 -6
  422. package/dist/ssr/getCSSFromTree.js +0 -33
  423. package/dist/ssr/index.js +0 -441
  424. package/dist/ssr/replaceWhenTags.js +0 -37
  425. package/dist/ssr/setHeadTagsInHTML.js +0 -84
  426. package/dist/validation/index.js +0 -10
  427. package/dist/validation/index.test.js +0 -463
  428. package/dist/validation/inputWithSchema/index.js +0 -105
  429. package/dist/validation/lib/constants.js +0 -162
  430. package/dist/validation/lib/getValueFromObject.js +0 -12
  431. package/dist/validation/lib/getValueFromObject.test.js +0 -7
  432. package/dist/validation/lib/isArrayPath.js +0 -6
  433. package/dist/validation/lib/throwError.js +0 -6
  434. package/dist/validation/lib/typeValidators.js +0 -38
  435. package/dist/validation/lib/validateType.js +0 -33
  436. package/dist/validation/schema/index.js +0 -44
  437. package/dist/websockets/emitWebsocketEvent.js +0 -12
  438. package/dist/websockets/index.js +0 -12
  439. package/notes +0 -1
@@ -0,0 +1,15 @@
1
+ import escape_html from "./escape_html.js";
2
+
3
+ const escape_key_value_pair = (target = {}) => {
4
+ const parameters = Object.entries(target || {});
5
+
6
+ for (let i = 0; i < parameters?.length; i += 1) {
7
+ const [key, value] = parameters[i];
8
+ delete target[key];
9
+ target[escape_html(key)] = escape_html(value);
10
+ }
11
+
12
+ return target;
13
+ };
14
+
15
+ export default escape_key_value_pair;
@@ -0,0 +1,5 @@
1
+ const float_to_decimal_place = (float = 0, decimal_place = 2) => {
2
+ return parseFloat(float.toFixed(decimal_place), 10);
3
+ };
4
+
5
+ export default float_to_decimal_place;
@@ -0,0 +1,15 @@
1
+ const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890'.split('');
2
+
3
+ const generate_id = (length = 16) => {
4
+ let id = '';
5
+ let i = 0;
6
+
7
+ while (i < length) {
8
+ id += characters[Math.floor(Math.random() * (characters.length - 1))];
9
+ i += 1;
10
+ }
11
+
12
+ return id;
13
+ };
14
+
15
+ export default generate_id;
@@ -0,0 +1,17 @@
1
+ import escape_key_value_pair from "./escape_key_value_pair.js";
2
+ import get_browser_safe_user from '../app/accounts/get_browser_safe_user.js';
3
+
4
+ const get_browser_safe_request = (req = {}) => {
5
+ const browser_safe_request = {};
6
+
7
+ browser_safe_request.headers = req.headers;
8
+ browser_safe_request.params = escape_key_value_pair(req.params);
9
+ browser_safe_request.query = escape_key_value_pair(req.query);
10
+ browser_safe_request.context = {
11
+ user: get_browser_safe_user(req.context.user),
12
+ };
13
+
14
+ return browser_safe_request;
15
+ };
16
+
17
+ export default get_browser_safe_request;
@@ -0,0 +1,22 @@
1
+ import fs from 'fs';
2
+
3
+ const get_build_path_for_environment = () => {
4
+ // NOTE: The fs.existsSync() check here is determining if we're running the app in a non-development
5
+ // environment locally on our computer. If we do something like joystick start -e production locally,
6
+ // we'll still have a .joystick/build folder (whereas in an actual production build, we do not). This
7
+ // ensures that we don't break the render when looking for the built copy of a page/layout. Without this,
8
+ // we accidentally pull back the root directory and attempt to render an unbuilt copy of the page/layout.
9
+ if (['development', 'test'].includes(process.env.NODE_ENV) || fs.existsSync('.joystick/build')) {
10
+ return '.joystick/build/';
11
+ }
12
+
13
+ return '';
14
+ };
15
+
16
+ const get_joystick_build_path = () => {
17
+ const build_path_for_environment = get_build_path_for_environment();
18
+
19
+ return `${process.cwd().replace(build_path_for_environment, '')}/${build_path_for_environment}`;
20
+ };
21
+
22
+ export default get_joystick_build_path;
@@ -0,0 +1,7 @@
1
+ const get_origin = () => {
2
+ return process.env.NODE_ENV === "development"
3
+ ? `http://localhost:${process.env.PORT}`
4
+ : process.env.ROOT_URL;
5
+ };
6
+
7
+ export default get_origin;
@@ -0,0 +1,8 @@
1
+ import os from 'os';
2
+
3
+ const get_platform_safe_path = (path = '') => {
4
+ // NOTE: This is why serial killers exist.
5
+ return os.platform() === "win32" ? path.replace(/\//g, '\\') : path;
6
+ };
7
+
8
+ export default get_platform_safe_path;
@@ -0,0 +1,51 @@
1
+ const get_sanitized_context = (context = {}) => {
2
+ const sanitized_context = { ...context };
3
+
4
+ if (sanitized_context?.req) {
5
+ delete sanitized_context.req;
6
+
7
+ sanitized_context.req = {
8
+ method: context?.req?.method,
9
+ headers: context?.req?.headers,
10
+ url: context?.req?.url,
11
+ };
12
+ }
13
+
14
+ if (sanitized_context?.res) {
15
+ delete sanitized_context.res;
16
+
17
+ sanitized_context.res = {
18
+ method: context?.res?.method,
19
+ headers: context?.res?.headers,
20
+ url: context?.res?.url,
21
+ };
22
+ }
23
+
24
+ if (sanitized_context.mongodb) {
25
+ delete sanitized_context.mongodb;
26
+ }
27
+
28
+ if (sanitized_context.postgresql) {
29
+ delete sanitized_context.postgresql;
30
+ }
31
+
32
+ if (sanitized_context.redis) {
33
+ delete sanitized_context.redis;
34
+ }
35
+
36
+ if (sanitized_context._users) {
37
+ delete sanitized_context._users;
38
+ }
39
+
40
+ if (sanitized_context._queues) {
41
+ delete sanitized_context._queues;
42
+ }
43
+
44
+ if (sanitized_context._sessions) {
45
+ delete sanitized_context._sessions;
46
+ }
47
+
48
+ return sanitized_context;
49
+ };
50
+
51
+ export default get_sanitized_context;
@@ -0,0 +1,109 @@
1
+ import fs from 'fs';
2
+ import dynamic_import from './dynamic_import.js';
3
+ import get_platform_safe_path from './get_platform_safe_path.js';
4
+ import load_settings from "../app/settings/load.js";
5
+ import path_exists from './path_exists.js';
6
+ import types from './types.js';
7
+
8
+ const settings = load_settings();
9
+
10
+ const get_translations_file = async (language_file_path = '', joystick_build_path = '', render_component_path = '') => {
11
+ const language_file = await dynamic_import(
12
+ `${joystick_build_path}/i18n/${language_file_path}?v=${new Date().getTime()}`
13
+ );
14
+
15
+ const is_valid_language_file = language_file && types.is_object(language_file);
16
+
17
+ if (is_valid_language_file) {
18
+ const translations_for_page = language_file[render_component_path];
19
+ return translations_for_page ? translations_for_page : language_file;
20
+ }
21
+
22
+ return {};
23
+ };
24
+
25
+ const get_language_preference_regexes = (user_language = '', browser_languages = [], email_template_name = '') => {
26
+ let language_preferences = [];
27
+
28
+ if (user_language) {
29
+ language_preferences.push(user_language);
30
+ }
31
+
32
+ const filtered_browser_languages = browser_languages?.filter((language) => {
33
+ return !language?.includes('*');
34
+ });
35
+
36
+ language_preferences.push(...filtered_browser_languages);
37
+
38
+ if (settings?.config?.i18n?.defaultLanguage || settings?.config?.i18n?.default_language) {
39
+ language_preferences.push(
40
+ settings?.config?.i18n?.defaultLanguage ||
41
+ settings?.config?.i18n?.default_language
42
+ );
43
+ }
44
+
45
+ return language_preferences?.flatMap((language) => {
46
+ const variants = [language];
47
+
48
+ if (language?.length === 2) {
49
+ variants.push(`${language.substring(0, 2)}-`);
50
+ }
51
+
52
+ if (language?.length > 2) {
53
+ variants.push(`${language?.split('-')[0]}`);
54
+ variants.push(`${language?.split('-')[0]}-`);
55
+ }
56
+
57
+ return variants;
58
+ })?.map((language_string) => {
59
+ const last_character = language_string[language_string.length - 1];
60
+
61
+ if (last_character === '-') {
62
+ return new RegExp(email_template_name ? `^${email_template_name}_${language_string}[A-Z]+.js` : `^${language_string}[A-Z]+.js`, 'g');
63
+ }
64
+
65
+ return new RegExp(email_template_name ? `^${email_template_name}_${language_string}.js` : `^${language_string}.js`, 'g');
66
+ });
67
+ };
68
+
69
+ const parse_browser_languages = (languages = '') => {
70
+ const raw_languages = languages.split(',');
71
+ return raw_languages?.map((raw_language) => raw_language.split(';')[0]);
72
+ };
73
+
74
+ const get_translations = async (get_translations_options = {}) => {
75
+ const language_files_path = get_translations_options?.is_email ?
76
+ `${get_translations_options?.joystick_build_path}i18n/email` :
77
+ `${get_translations_options?.joystick_build_path}i18n`;
78
+
79
+ const language_files = (await path_exists(language_files_path) && fs.readdirSync(language_files_path)) || [];
80
+ const browser_languages = get_translations_options?.is_email ? [] : parse_browser_languages(get_translations_options?.req?.headers['accept-language']);
81
+ const language_preferences = get_language_preference_regexes(
82
+ get_translations_options?.req?.context?.user?.language,
83
+ browser_languages,
84
+ get_translations_options?.email_template_name
85
+ );
86
+
87
+ let matching_file = null;
88
+
89
+ for (let i = 0; i < language_preferences.length; i += 1) {
90
+ const language_regex = language_preferences[i];
91
+ const match = language_files.find((language_file) => !!language_file.match(language_regex));
92
+
93
+ if (match) {
94
+ matching_file = match;
95
+ break;
96
+ }
97
+ }
98
+
99
+ const translations_file = matching_file ? await get_translations_file(
100
+ matching_file,
101
+ get_translations_options?.joystick_build_path,
102
+ get_translations_options?.render_component_path
103
+ ) : null;
104
+
105
+
106
+ return translations_file || {};
107
+ };
108
+
109
+ export default get_translations;
@@ -0,0 +1,7 @@
1
+ import bcrypt from "bcrypt";
2
+
3
+ const hash_string = (string = '') => {
4
+ return bcrypt.hashSync(string, 10);
5
+ };
6
+
7
+ export default hash_string;
@@ -0,0 +1,10 @@
1
+ const is_valid_json = (string = '') => {
2
+ try {
3
+ JSON.parse(string);
4
+ return true;
5
+ } catch {
6
+ return false;
7
+ }
8
+ };
9
+
10
+ export default is_valid_json;
package/src/lib/log.js ADDED
@@ -0,0 +1,42 @@
1
+ import chalk from 'chalk';
2
+ import rainbow_road from './rainbow_road.js';
3
+
4
+ const log = (message = '', options = {}) => {
5
+ const colors = {
6
+ info: 'blue',
7
+ success: 'green',
8
+ warning: 'yellowBright',
9
+ danger: 'red',
10
+ };
11
+
12
+ const titles = {
13
+ info: '❱ Info',
14
+ success: '❱ Ok',
15
+ warning: '❱ Warning',
16
+ danger: '❱ Error',
17
+ };
18
+
19
+ const color = options.level ? colors[options.level] : 'gray';
20
+ const title = options.level ? titles[options.level] : 'Log';
21
+ const docs = options.docs || 'https://github.com/cheatcode/joystick';
22
+
23
+ console.log(`\n${rainbow_road()}\n`);
24
+ console.log(`${chalk[color](`${title}:`)}\n`)
25
+ console.log(`${chalk.white(message)}\n`);
26
+ console.log(`${chalk.grey('---')}\n`);
27
+ console.log(`${chalk.white('Relevant Documentation:')}`)
28
+ console.log(`\n${chalk.blue(docs)}\n`);
29
+ console.log(`${chalk.white('Stuck? Ask a Question:')}\n`)
30
+ console.log(`${chalk.blue('http://discord.cheatcode.co')}\n`);
31
+
32
+ if (options.tools && Array.isArray(options.tools)) {
33
+ console.log(`${chalk.white('Helpful Tools:')}\n`);
34
+ options.tools.forEach((tool) => {
35
+ console.log(`${chalk.blue(`${tool.title} — ${tool.url}`)}\n`);
36
+ });
37
+ }
38
+
39
+ console.log(`${rainbow_road()}\n`);
40
+ };
41
+
42
+ export default log;
@@ -0,0 +1,23 @@
1
+ import os from 'os';
2
+ import { dirname } from "path";
3
+ import { fileURLToPath as file_url_to_path } from "url";
4
+
5
+ const current_file_path = file_url_to_path(import.meta.url);
6
+ const __package = dirname(current_file_path);
7
+ const is_windows = os.platform() === 'win32';
8
+
9
+ const node_path_polyfills = {
10
+ __package: __package?.replace(
11
+ is_windows ? '\\lib' : '/lib',
12
+ ''
13
+ ),
14
+ __filename: (url = '') => {
15
+ return file_url_to_path(url);
16
+ },
17
+ __dirname: (url = '') => {
18
+ const currentFilePath = file_url_to_path(url);
19
+ return dirname(currentFilePath);
20
+ },
21
+ };
22
+
23
+ export default node_path_polyfills;
@@ -0,0 +1,9 @@
1
+ const parse_json = (string = '') => {
2
+ try {
3
+ return JSON.parse(string);
4
+ } catch {
5
+ return {};
6
+ }
7
+ };
8
+
9
+ export default parse_json;
@@ -0,0 +1,12 @@
1
+ import fs from 'fs';
2
+ import get_platform_safe_path from './get_platform_safe_path.js';
3
+
4
+ const path_exists = (path = '') => {
5
+ return new Promise((resolve) => {
6
+ fs.access(get_platform_safe_path(path), fs.constants.F_OK, error => {
7
+ resolve(!error);
8
+ });
9
+ });
10
+ };
11
+
12
+ export default path_exists;
@@ -0,0 +1,7 @@
1
+ import chalk from 'chalk';
2
+
3
+ const rainbow_road = () => {
4
+ return `${chalk.red('=')}${chalk.green('=')}${chalk.blue('=')}${chalk.red('=')}${chalk.green('=')}${chalk.blue('=')}`;
5
+ };
6
+
7
+ export default rainbow_road;
@@ -0,0 +1,7 @@
1
+ const serialize_query_parameters = (query_parameters = {}) => {
2
+ return Object.entries(query_parameters || {}).map(([key, value]) => {
3
+ return `${key}=${value}`;
4
+ })?.join('&');
5
+ };
6
+
7
+ export default serialize_query_parameters;
@@ -0,0 +1,16 @@
1
+ const set_cookie = (res = {}, cookie_name = '', cookie_value = '', expires_at = null) => {
2
+ if (!res || !cookie_name) return null;
3
+
4
+ const cookie_options = {
5
+ secure: process.env.NODE_ENV !== "development",
6
+ httpOnly: true,
7
+ };
8
+
9
+ if (expires_at) {
10
+ cookie_options.expires = new Date(expires_at);
11
+ }
12
+
13
+ res.cookie(cookie_name, cookie_value, cookie_options);
14
+ };
15
+
16
+ export default set_cookie;
@@ -0,0 +1,14 @@
1
+ const string_to_slug = (string = '') => {
2
+ let slug = string.toLowerCase().trim();
3
+ // Remove accents from charaters.
4
+ slug = slug.normalize('NFD').replace(/[\u0300-\u036f]/g, '')
5
+ // Replace invalid chars with spaces.
6
+ slug = slug.replace(/[^a-z0-9\s-_]/g, ' ').trim();
7
+ // Replace multiple spaces, hyphens, or underscores with a single hyphen/underscore.
8
+ slug = slug.replace(/[\s-]+/g, '-');
9
+ slug = slug.replace(/[\s_]+/g, '_');
10
+
11
+ return slug;
12
+ };
13
+
14
+ export default string_to_slug;
@@ -0,0 +1,48 @@
1
+ const timestamps = {
2
+ get_current_time: (options = {}) => {
3
+ const timestamp = new Date().toISOString();
4
+ return options?.mongodb_ttl ? new Date(timestamp) : timestamp;
5
+ },
6
+ get_future_time: (unit = '', quantity = 0, options = {}) => {
7
+ const date = options?.start_from ? new Date(options?.start_from) : new Date();
8
+
9
+ switch (unit) {
10
+ case 'seconds':
11
+ date.setSeconds(date.getSeconds() + quantity);
12
+ return options?.mongodb_ttl ? new Date(date.toISOString()) : date.toISOString();
13
+ case 'minutes':
14
+ date.setMinutes(date.getMinutes() + quantity);
15
+ return options?.mongodb_ttl ? new Date(date.toISOString()) : date.toISOString();
16
+ case 'hours':
17
+ date.setHours(date.getHours() + quantity);
18
+ return options?.mongodb_ttl ? new Date(date.toISOString()) : date.toISOString();
19
+ case 'days':
20
+ date.setHours(date.getHours() + (quantity * 24));
21
+ return options?.mongodb_ttl ? new Date(date.toISOString()) : date.toISOString();
22
+ default:
23
+ return options?.mongodb_ttl ? new Date(date.toISOString()) : date.toISOString();
24
+ }
25
+ },
26
+ get_past_time: (unit = '', quantity = 0, options = {}) => {
27
+ const date = options?.start_from ? new Date(options?.start_from) : new Date();
28
+
29
+ switch (unit) {
30
+ case 'seconds':
31
+ date.setSeconds(date.getSeconds() - quantity);
32
+ return options?.mongodb_ttl ? new Date(date.toISOString()) : date.toISOString();
33
+ case 'minutes':
34
+ date.setMinutes(date.getMinutes() - quantity);
35
+ return options?.mongodb_ttl ? new Date(date.toISOString()) : date.toISOString();
36
+ case 'hours':
37
+ date.setHours(date.getHours() - quantity);
38
+ return options?.mongodb_ttl ? new Date(date.toISOString()) : date.toISOString();
39
+ case 'days':
40
+ date.setHours(date.getHours() - (quantity * 24));
41
+ return options?.mongodb_ttl ? new Date(date.toISOString()) : date.toISOString();
42
+ default:
43
+ return options?.mongodb_ttl ? new Date(new Date().toISOString()) : new Date().toISOString();
44
+ }
45
+ },
46
+ };
47
+
48
+ export default timestamps;
@@ -0,0 +1,59 @@
1
+ const is_any = (value) => {
2
+ return !!value;
3
+ };
4
+
5
+ const is_array = (value) => {
6
+ return !!Array.isArray(value);
7
+ };
8
+
9
+ const is_boolean = (value) => {
10
+ return (value === true || value === false);
11
+ };
12
+
13
+ const is_float = (value) => {
14
+ return Number(value) === value && value % 1 !== 0;
15
+ };
16
+
17
+ const is_function = (value) => {
18
+ return typeof value === 'function';
19
+ };
20
+
21
+ const is_integer = (value) => {
22
+ return Number(value) === value && value % 1 === 0;
23
+ };
24
+
25
+ const is_null = (value) => {
26
+ return value === null;
27
+ };
28
+
29
+ const is_number = (value) => {
30
+ return Number(value) === value;
31
+ };
32
+
33
+ const is_object = (value) => {
34
+ return !!(value && typeof value === "object" && !Array.isArray(value));
35
+ };
36
+
37
+ const is_string = (value) => {
38
+ return typeof value === "string";
39
+ };
40
+
41
+ const is_undefined = (value) => {
42
+ return typeof value === 'undefined';
43
+ };
44
+
45
+ const types = {
46
+ is_any,
47
+ is_array,
48
+ is_boolean,
49
+ is_float,
50
+ is_function,
51
+ is_integer,
52
+ is_null,
53
+ is_number,
54
+ is_object,
55
+ is_string,
56
+ is_undefined,
57
+ };
58
+
59
+ export default types;
@@ -0,0 +1,11 @@
1
+ const unset_cookie = (cookie_name = '', res = {}) => {
2
+ if (!cookie_name || !res) return null;
3
+
4
+ res.cookie(cookie_name, null, {
5
+ secure: process.env.NODE_ENV !== "development",
6
+ httpOnly: true,
7
+ expires: new Date(),
8
+ });
9
+ };
10
+
11
+ export default unset_cookie;
@@ -0,0 +1,9 @@
1
+ const wait = (seconds = 0) => {
2
+ return new Promise((resolve) => {
3
+ setTimeout(() => {
4
+ resolve();
5
+ }, seconds * 1000);
6
+ });
7
+ };
8
+
9
+ export default wait;
@@ -0,0 +1,16 @@
1
+ const track_function_call = (path = '', args = []) => {
2
+ if (process.env.NODE_ENV === 'test') {
3
+ process.test = {
4
+ ...(process.test || {}),
5
+ function_calls: {
6
+ ...(process?.test?.function_calls || {}),
7
+ [path]: [
8
+ ...((process?.test?.function_calls && process?.test?.function_calls[path]) || []),
9
+ { called_at: new Date().toISOString(), args },
10
+ ]
11
+ }
12
+ };
13
+ }
14
+ };
15
+
16
+ export default track_function_call;
package/README.md DELETED
@@ -1,8 +0,0 @@
1
- <br />
2
- <img style="width: 200px;" src="https://cheatcode-assets.s3.amazonaws.com/logo-transparent.png" alt="CheatCode">
3
-
4
- ## @joystick.js/node (Beta)
5
-
6
- A Node.js framework for building web apps.
7
-
8
- [Read the Documentation](https://github.com/cheatcode/joystick)
package/_package.json DELETED
@@ -1,63 +0,0 @@
1
- {
2
- "name": "@joystick.js/node",
3
- "version": "1.0.0-beta.166",
4
- "developmentVersion": "1.0.0-beta.1419",
5
- "type": "module",
6
- "description": "A Node.js framework for building web apps.",
7
- "main": "./dist/index.js",
8
- "scripts": {
9
- "build": "node .build/index.js",
10
- "canary:release": "export NODE_ENV=development && npm run build && node canary.js",
11
- "production:release": "export NODE_ENV=production && npm run build && node release.js",
12
- "win:development:release": "SET NODE_ENV=development&& npm run build && node release.js",
13
- "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
14
- "test:watch": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watch --detectOpenHandles"
15
- },
16
- "keywords": [],
17
- "author": "",
18
- "license": "SAUCR",
19
- "dependencies": {
20
- "@tuskdb/node": "^0.11.0",
21
- "aws-sdk": "^2.1046.0",
22
- "bcrypt": "^5.0.1",
23
- "chalk": "^4.1.2",
24
- "compression": "^1.7.4",
25
- "cookie-parser": "^1.4.5",
26
- "cors": "^2.8.5",
27
- "crypto-extra": "^1.0.1",
28
- "css": "^3.0.0",
29
- "dayjs": "^1.10.7",
30
- "express": "^4.17.1",
31
- "html-to-text": "^8.0.0",
32
- "juice": "^8.0.0",
33
- "linkedom": "^0.14.12",
34
- "mongo-uri-tool": "^1.0.1",
35
- "mongodb": "^4.1.3",
36
- "multer": "^1.4.4",
37
- "node-cron": "^3.0.2",
38
- "node-fetch": "^3.0.0",
39
- "node-html-parser": "^5.1.0",
40
- "nodemailer": "^6.7.0",
41
- "pg": "^8.7.3",
42
- "process": "^0.11.10",
43
- "query-string": "^7.0.1",
44
- "sanitize-html": "^2.7.3",
45
- "serve-favicon": "^2.5.0",
46
- "ws": "^8.4.0"
47
- },
48
- "devDependencies": {
49
- "@babel/core": "^7.16.0",
50
- "@babel/preset-env": "^7.16.0",
51
- "@jest/globals": "^27.3.1",
52
- "@joystick.js/ui": "^1.0.0-beta.29",
53
- "babel-jest": "^27.3.1",
54
- "esbuild": "^0.13.9",
55
- "jest": "^27.3.1",
56
- "jest-cli": "^27.3.1",
57
- "jest-express": "^1.12.0",
58
- "jest-mock-req-res": "^1.0.2",
59
- "kill-port-process": "^3.0.1",
60
- "node-port-check": "^2.0.1",
61
- "ps-node": "^0.1.6"
62
- }
63
- }
package/canary.js DELETED
@@ -1,12 +0,0 @@
1
- import fs from 'fs';
2
- import child_process from 'child_process';
3
-
4
- fs.renameSync('package.json', '_package.json');
5
- fs.renameSync('canary.json', 'package.json');
6
-
7
- child_process.execSync('npm version prerelease --preid=canary');
8
-
9
- child_process.execSync('npm publish --access=public');
10
-
11
- fs.renameSync('package.json', 'canary.json');
12
- fs.renameSync('_package.json', 'package.json');