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

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
@@ -1,84 +0,0 @@
1
- import htmlParser from "node-html-parser";
2
- var setHeadTagsInHTML_default = (htmlString = "", head = null, req = {}) => {
3
- const html = htmlParser.parse(htmlString);
4
- const headTag = html.querySelector("head");
5
- if (req?.context?.session) {
6
- const metaTagWrapper = htmlParser.parse(`<meta />`);
7
- const tag = metaTagWrapper.querySelector("meta");
8
- tag.setAttribute("name", "csrf");
9
- tag.setAttribute("content", req?.context?.session?.csrf);
10
- headTag.appendChild(tag);
11
- }
12
- if (!head) {
13
- return html.toString();
14
- }
15
- if (head.title) {
16
- const existingTitle = headTag.querySelector("title");
17
- if (existingTitle) {
18
- const newTitle = htmlParser.parse(`<title>${head.title}</title>`);
19
- headTag.exchangeChild(existingTitle, newTitle);
20
- }
21
- if (!existingTitle) {
22
- headTag.insertAdjacentHTML("afterbegin", `<title>${head.title}</title>`);
23
- }
24
- }
25
- if (head.tags && head.tags.meta && Array.isArray(head.tags.meta) && head.tags.meta.length > 0) {
26
- let currentMetaTag = head.tags.meta.length;
27
- while (currentMetaTag--) {
28
- const metaTag = head.tags.meta[currentMetaTag];
29
- const existingTag = headTag.querySelector(`meta[name="${metaTag.name}"]`);
30
- const newTag = htmlParser.parse(`<meta />`);
31
- const metaTagEntries = Object.entries(metaTag);
32
- let currentMetaTagEntry = metaTagEntries.length;
33
- while (currentMetaTagEntry--) {
34
- const [attributeName, attributeValue] = metaTagEntries[currentMetaTagEntry];
35
- newTag.querySelector("meta").setAttribute(attributeName, attributeValue);
36
- }
37
- if (existingTag) {
38
- headTag.exchangeChild(existingTag, newTag);
39
- }
40
- if (!existingTag) {
41
- headTag.appendChild(newTag);
42
- }
43
- }
44
- }
45
- if (head.tags && head.tags.link && Array.isArray(head.tags.link) && head.tags.link.length > 0) {
46
- let currentLinkTag = head.tags.link.length;
47
- while (currentLinkTag--) {
48
- const linkTag = head.tags.link[currentLinkTag];
49
- const newTag = htmlParser.parse(`<link />`);
50
- let linkTagEntries = Object.entries(linkTag);
51
- let currentLinkTagEntry = linkTagEntries.length;
52
- while (currentLinkTagEntry--) {
53
- const [attributeName, attributeValue] = linkTagEntries[currentLinkTagEntry];
54
- newTag.querySelector("link").setAttribute(attributeName, attributeValue);
55
- }
56
- headTag.appendChild(newTag);
57
- }
58
- }
59
- if (head.tags && head.tags.script && Array.isArray(head.tags.script) && head.tags.script.length > 0) {
60
- let currentScriptTag = head.tags.script.length;
61
- while (currentScriptTag--) {
62
- const scriptTag = head.tags.script[currentScriptTag];
63
- const newTag = htmlParser.parse(`<script><\/script>`);
64
- let scriptTagEntries = Object.entries(scriptTag);
65
- let currentScriptTagEntry = scriptTagEntries.length;
66
- while (currentScriptTagEntry--) {
67
- const [attributeName, attributeValue] = scriptTagEntries[currentScriptTagEntry];
68
- newTag.querySelector("script").setAttribute(attributeName, attributeValue);
69
- }
70
- headTag.appendChild(newTag);
71
- }
72
- }
73
- if (head.jsonld) {
74
- const newTag = htmlParser.parse(`<script><\/script>`);
75
- const tag = newTag.querySelector("script");
76
- tag.setAttribute("type", "application/ld+json");
77
- tag.set_content(JSON.stringify(head.jsonld, null, 2));
78
- headTag.appendChild(newTag);
79
- }
80
- return html.toString();
81
- };
82
- export {
83
- setHeadTagsInHTML_default as default
84
- };
@@ -1,10 +0,0 @@
1
- import schema from "./schema/index.js";
2
- import inputWithSchema from "./inputWithSchema/index.js";
3
- const validate = {
4
- schema,
5
- inputWithSchema
6
- };
7
- var validation_default = validate;
8
- export {
9
- validation_default as default
10
- };
@@ -1,463 +0,0 @@
1
- import validate from "./index";
2
- import { handleGetInputValue, getArrayPathKey, addToValidationQueue } from "./inputWithSchema";
3
- describe("validate/schema/index.js", () => {
4
- test("throws error if schema argument is not passed", () => {
5
- expect(() => {
6
- validate.schema();
7
- }).toThrow("[joystick.validation] Must pass schema object.");
8
- });
9
- test("throws error if schema argument is invalid type", () => {
10
- expect(() => {
11
- validate.schema(1);
12
- }).toThrow("[joystick.validation] Must pass schema as an object.");
13
- });
14
- test("throws error if schema object contains properties with values that are not objects", () => {
15
- expect(() => {
16
- validate.schema({
17
- _id: {
18
- type: "string"
19
- },
20
- userId: false,
21
- title: {
22
- type: "string"
23
- }
24
- });
25
- }).toThrow(`Must pass an object containing rules to validate by for userId field.`);
26
- });
27
- test("throws error if schema field rule names are unsupported", () => {
28
- expect(() => {
29
- validate.schema({
30
- _id: {
31
- type: "string",
32
- allowedValues: "",
33
- element: "",
34
- fields: "",
35
- max: "",
36
- min: "",
37
- optional: "",
38
- required: "",
39
- hotDog: ""
40
- },
41
- userId: {},
42
- title: {
43
- type: "string"
44
- }
45
- });
46
- }).toThrow(`Invalid rule name hotDog in rule for _id field.`);
47
- });
48
- test("throws error if schema field rule.type value is unsupported", () => {
49
- expect(() => {
50
- validate.schema({
51
- _id: {
52
- type: "apples"
53
- }
54
- });
55
- }).toThrow(`Invalid value for schema field "_id" type rule. apples is not supported. Use one of the following: any, array, boolean, float, integer, number, object, or string.`);
56
- });
57
- });
58
- describe("validate/inputWithSchema/index.js", () => {
59
- test("does not throw if process.env.NODE_ENV equals test", () => {
60
- expect(async () => {
61
- process.env.NODE_ENV = "test";
62
- const result = await validate.inputWithSchema({}, {});
63
- }).not.toThrow();
64
- });
65
- test("does not throw if process.env.NODE_ENV does not equal test", () => {
66
- expect(async () => {
67
- process.env.NODE_ENV = "production";
68
- const result = await validate.inputWithSchema({}, {});
69
- }).not.toThrow();
70
- });
71
- test("throws error if input argument is not passed", () => {
72
- expect(async () => {
73
- const result = await validate.inputWithSchema();
74
- }).rejects.toThrow("[joystick.validation] Must pass input.");
75
- });
76
- test("addToValidationQueue throws error if queue argument is not an array", () => {
77
- expect(() => {
78
- addToValidationQueue(3);
79
- }).toThrow("queue must be an array");
80
- });
81
- test("handleGetInputValue throws error if path argument is not a string", () => {
82
- expect(() => {
83
- handleGetInputValue(null, 3, false);
84
- }).toThrow("path must be passed as a string");
85
- });
86
- test("getArrayPathKey returns a string with the name of they key", () => {
87
- const arrayPathKey = getArrayPathKey("this.is.the.thing");
88
- expect(arrayPathKey).toEqual("thing");
89
- });
90
- test("getArrayPathKey returns a string if arrayPath is undefined", () => {
91
- const arrayPathKey = getArrayPathKey();
92
- expect(arrayPathKey).toEqual("");
93
- });
94
- test("getArrayPathKey throws error if arrayPath argument is not a string", () => {
95
- expect(() => {
96
- getArrayPathKey(5);
97
- }).toThrow("arrayPath must be a type of string");
98
- });
99
- test("returns expected errors when rules.allowedValues validator fails", async () => {
100
- const errors = await validate.inputWithSchema({
101
- name: "apples"
102
- }, {
103
- name: {
104
- type: "string",
105
- allowedValues: ["buy", "more", "bitcoin"]
106
- }
107
- });
108
- expect(errors).toEqual([
109
- "Field name only allows the following values: buy, more, bitcoin."
110
- ]);
111
- });
112
- test("returns expected errors when nested rules.allowedValues validator fails", async () => {
113
- const errors = await validate.inputWithSchema({
114
- name: "apples",
115
- dog: [
116
- {
117
- breed: "Corgi"
118
- },
119
- {
120
- breed: "German Shepherd",
121
- coats: [{ type: "rough" }]
122
- },
123
- {
124
- breed: "English Bulldog"
125
- }
126
- ]
127
- }, {
128
- name: {
129
- type: "string",
130
- allowedValues: ["buy", "more", "bitcoin"]
131
- },
132
- dog: {
133
- type: "array",
134
- element: {
135
- breed: {
136
- type: "string",
137
- allowedValues: ["Corgi", "German Shepherd", "Golden Retriever"]
138
- },
139
- coats: {
140
- type: "array",
141
- element: {
142
- style: {
143
- type: "string",
144
- allowedValues: ["silky", "dry", "smooth"]
145
- }
146
- }
147
- }
148
- }
149
- }
150
- });
151
- expect(errors).toEqual([
152
- "Field name only allows the following values: buy, more, bitcoin.",
153
- "Field dog.1.coats.0.style only allows the following values: silky, dry, smooth.",
154
- "Field dog.2.breed only allows the following values: Corgi, German Shepherd, Golden Retriever."
155
- ]);
156
- });
157
- test("returns expected errors when rules.element (string) validator fails", async () => {
158
- const errors = await validate.inputWithSchema({
159
- birds: [1, 2, 3]
160
- }, {
161
- birds: {
162
- type: "array",
163
- element: "string"
164
- }
165
- });
166
- expect(errors).toEqual([
167
- "Field birds.0 must be of type string.",
168
- "Field birds.1 must be of type string.",
169
- "Field birds.2 must be of type string."
170
- ]);
171
- });
172
- test("returns expected errors when nested rules.element (string) validator fails", async () => {
173
- const errors = await validate.inputWithSchema({
174
- birds: [
175
- {
176
- name: "Parrot",
177
- attributes: {
178
- colors: ["blue", "green", "red"]
179
- }
180
- },
181
- {
182
- name: "Snake",
183
- attributes: {
184
- colors: ["purple", "orange", "teal"]
185
- }
186
- }
187
- ]
188
- }, {
189
- birds: {
190
- type: "array",
191
- element: {
192
- name: {
193
- type: "string"
194
- },
195
- attributes: {
196
- type: "object",
197
- fields: {
198
- colors: {
199
- type: "array",
200
- element: "integer"
201
- }
202
- }
203
- }
204
- }
205
- }
206
- });
207
- expect(errors).toEqual([
208
- "Field birds.0.attributes.colors.0 must be of type integer.",
209
- "Field birds.0.attributes.colors.1 must be of type integer.",
210
- "Field birds.0.attributes.colors.2 must be of type integer.",
211
- "Field birds.1.attributes.colors.0 must be of type integer.",
212
- "Field birds.1.attributes.colors.1 must be of type integer.",
213
- "Field birds.1.attributes.colors.2 must be of type integer."
214
- ]);
215
- });
216
- test("returns expected errors when rules.fields validator is passed value other than object", async () => {
217
- const errors = await validate.inputWithSchema({
218
- user: {
219
- name: 789.456
220
- }
221
- }, {
222
- user: {
223
- type: "object",
224
- fields: "no bueno"
225
- }
226
- });
227
- expect(errors).toEqual(["Field user schema rule and input value for element must be of type object."]);
228
- });
229
- test("returns expected errors when rules.fields validator fails", async () => {
230
- const errors = await validate.inputWithSchema({
231
- user: {
232
- name: 789.456
233
- }
234
- }, {
235
- user: {
236
- type: "object",
237
- fields: {
238
- name: {
239
- type: "string"
240
- }
241
- }
242
- }
243
- });
244
- expect(errors).toEqual(["Field user.name must be of type string."]);
245
- });
246
- test("returns expected errors when rules.max validator fails", async () => {
247
- const errors = await validate.inputWithSchema({
248
- price: 39.99
249
- }, {
250
- price: {
251
- type: "float",
252
- max: 29.99
253
- }
254
- });
255
- expect(errors).toEqual([
256
- "Field price must be less than or equal to 29.99."
257
- ]);
258
- });
259
- test("returns no errors when rules.max validator returns valid true", async () => {
260
- const errors = await validate.inputWithSchema({
261
- price: 39.99
262
- }, {
263
- price: {
264
- type: "float",
265
- max: 39.99
266
- }
267
- });
268
- expect(errors).toEqual([]);
269
- });
270
- test("returns expected errors when rules.min validator fails", async () => {
271
- const errors = await validate.inputWithSchema({
272
- price: 19.99
273
- }, {
274
- price: {
275
- type: "float",
276
- min: 29.99
277
- }
278
- });
279
- expect(errors).toEqual([
280
- "Field price must be greater than or equal to 29.99."
281
- ]);
282
- });
283
- test("returns expected errors when rules.optional (false) fails", async () => {
284
- const errors = await validate.inputWithSchema({
285
- price: 29.99
286
- }, {
287
- price: {
288
- type: "float",
289
- min: 29.99
290
- },
291
- description: {
292
- type: "string",
293
- optional: false
294
- }
295
- });
296
- expect(errors).toEqual(["Field description is required."]);
297
- });
298
- test("returns no errors when rules.optional (true)", async () => {
299
- const errors = await validate.inputWithSchema({
300
- price: 29.99
301
- }, {
302
- price: {
303
- type: "float",
304
- min: 29.99
305
- },
306
- description: {
307
- type: "string",
308
- optional: true
309
- }
310
- });
311
- expect(errors).toEqual([]);
312
- });
313
- test("returns expected errors when rules.regex fails", async () => {
314
- const errors = await validate.inputWithSchema({
315
- arrayPath: "thing.is.not.in.array"
316
- }, {
317
- arrayPath: {
318
- type: "string",
319
- regex: new RegExp(/\.[0-9]+\.?/g)
320
- }
321
- });
322
- expect(errors).toEqual([
323
- "Field arrayPath must conform to regex: /\\.[0-9]+\\.?/g."
324
- ]);
325
- });
326
- test("returns no errors when rules.regex returns valid true", async () => {
327
- const errors = await validate.inputWithSchema({
328
- arrayPath: ".0."
329
- }, {
330
- arrayPath: {
331
- type: "string",
332
- regex: new RegExp(/\.[0-9]+\.?/g)
333
- }
334
- });
335
- expect(errors).toEqual([]);
336
- });
337
- test("returns expected errors when rules.required (true) fails", async () => {
338
- const errors = await validate.inputWithSchema({
339
- price: 29.99
340
- }, {
341
- price: {
342
- type: "float",
343
- min: 29.99
344
- },
345
- description: {
346
- type: "string",
347
- required: true
348
- }
349
- });
350
- expect(errors).toEqual(["Field description is required."]);
351
- });
352
- test("returns no errors when rules.required (false)", async () => {
353
- const errors = await validate.inputWithSchema({
354
- price: 29.99
355
- }, {
356
- price: {
357
- type: "float",
358
- min: 29.99
359
- },
360
- description: {
361
- type: "string",
362
- required: false
363
- }
364
- });
365
- expect(errors).toEqual([]);
366
- });
367
- test("returns expected errors when rules.type (array) fails", async () => {
368
- const errors = await validate.inputWithSchema({
369
- name: "array"
370
- }, {
371
- name: {
372
- type: "array"
373
- }
374
- });
375
- expect(errors).toEqual(["Field name must be of type array."]);
376
- });
377
- test("returns expected errors when rules.type (boolean) fails", async () => {
378
- const errors = await validate.inputWithSchema({
379
- name: 123
380
- }, {
381
- name: {
382
- type: "boolean"
383
- }
384
- });
385
- expect(errors).toEqual(["Field name must be of type boolean."]);
386
- });
387
- test("returns expected errors when rules.type (float) fails", async () => {
388
- const errors = await validate.inputWithSchema({
389
- name: 123
390
- }, {
391
- name: {
392
- type: "float"
393
- }
394
- });
395
- expect(errors).toEqual(["Field name must be of type float."]);
396
- });
397
- test("returns expected errors when rules.type (integer) fails", async () => {
398
- const errors = await validate.inputWithSchema({
399
- name: 123.123
400
- }, {
401
- name: {
402
- type: "integer"
403
- }
404
- });
405
- expect(errors).toEqual(["Field name must be of type integer."]);
406
- });
407
- test("returns expected errors when rules.type (number) fails", async () => {
408
- const errors = await validate.inputWithSchema({
409
- name: "123.123"
410
- }, {
411
- name: {
412
- type: "number"
413
- }
414
- });
415
- expect(errors).toEqual(["Field name must be of type number."]);
416
- });
417
- test("returns expected errors when rules.type (object) fails", async () => {
418
- const errors = await validate.inputWithSchema({
419
- name: []
420
- }, {
421
- name: {
422
- type: "object"
423
- }
424
- });
425
- expect(errors).toEqual(["Field name must be of type object."]);
426
- });
427
- test("returns expected errors when rules.type (string) fails", async () => {
428
- const errors = await validate.inputWithSchema({
429
- name: 123
430
- }, {
431
- name: {
432
- type: "string"
433
- }
434
- });
435
- expect(errors).toEqual(["Field name must be of type string."]);
436
- });
437
- test("returns no errors when rules.type (any) is passed", async () => {
438
- const errors = await validate.inputWithSchema({
439
- name: 123
440
- }, {
441
- name: {
442
- type: "any"
443
- }
444
- });
445
- expect(errors).toEqual([]);
446
- });
447
- test("returns array of errors after validation", async () => {
448
- const errors = await validate.inputWithSchema({
449
- name: 12345
450
- }, {
451
- name: {
452
- type: "string"
453
- }
454
- });
455
- expect(errors).toEqual(["Field name must be of type string."]);
456
- });
457
- test("throws error if file at path for dynamic require of inputWithSchema does not exist", () => {
458
- });
459
- test("throws error if file dynamically required for inputWithSchema returns an object without a default property", () => {
460
- });
461
- test("returns valid true if inputWithSchema cannot be dynamically required", () => {
462
- });
463
- });
@@ -1,105 +0,0 @@
1
- import throwError from "../lib/throwError";
2
- import validateSchema from "../schema/index";
3
- import { isObject, isString } from "../lib/typeValidators";
4
- import isArrayPath from "../lib/isArrayPath";
5
- import getValueFromObject from "../lib/getValueFromObject";
6
- import constants from "../lib/constants";
7
- const handleGetInputValue = (input = null, path = "", rulesOnlySchema = false) => {
8
- if (path && !isString(path)) {
9
- throw new Error("path must be passed as a string");
10
- }
11
- if (rulesOnlySchema || !rulesOnlySchema && !isObject(input)) {
12
- return input;
13
- }
14
- if (path.includes(".$.")) {
15
- const [arrayPath] = path.split(".$.");
16
- return getValueFromObject(input, arrayPath);
17
- }
18
- return getValueFromObject(input, path);
19
- };
20
- const getArrayPathKey = (arrayPath = "") => {
21
- if (!arrayPath) {
22
- return "";
23
- }
24
- if (arrayPath && !isString(arrayPath)) {
25
- throw new Error("arrayPath must be a type of string");
26
- }
27
- const arrayPathParts = arrayPath.split(".");
28
- return arrayPathParts.pop();
29
- };
30
- const addValidationTask = ({ queue, rules, input, path, rulesOnlySchema }) => {
31
- if (rules && rules.type === "object") {
32
- queue = addToValidationQueue(queue, rules.properties, input, path);
33
- }
34
- if (rules && rules.type === "array" && isObject(rules.element)) {
35
- queue = addToValidationQueue(queue, rules.element, input, `${path}.$`);
36
- }
37
- const pathToValue = isArrayPath(path) ? getArrayPathKey(path) : path;
38
- return {
39
- path,
40
- rules,
41
- inputValue: handleGetInputValue(input, pathToValue, rulesOnlySchema)
42
- };
43
- };
44
- const addToValidationQueue = (queue = [], schema = {}, input = {}, parentPath = "") => {
45
- if (queue && !Array.isArray(queue)) {
46
- throw new Error("queue must be an array");
47
- }
48
- const rulesOnlySchema = !!(schema.type && constants.types.includes(schema.type));
49
- if (!rulesOnlySchema) {
50
- Object.entries(schema).forEach(([field, rules]) => {
51
- const path = `${parentPath ? `${parentPath}.${field}` : field}`;
52
- const validationTask = addValidationTask({
53
- queue,
54
- rules,
55
- input,
56
- path,
57
- rulesOnlySchema
58
- });
59
- queue = [...queue, validationTask];
60
- });
61
- }
62
- if (rulesOnlySchema) {
63
- const path = parentPath;
64
- const validationTask = addValidationTask({
65
- queue,
66
- rules: schema,
67
- input,
68
- path,
69
- rulesOnlySchema
70
- });
71
- queue = [...queue, validationTask];
72
- }
73
- return queue;
74
- };
75
- const validateInputWithSchema = async (input = null, schema = null, parentPath = "") => {
76
- const errors = [];
77
- if (!input) {
78
- errors.push("Input is required.");
79
- }
80
- if (schema && Object.keys(schema) && !schema.type) {
81
- validateSchema(schema);
82
- }
83
- const queue = addToValidationQueue([], schema, input, parentPath);
84
- await Promise.all(queue.flatMap((validationTask) => {
85
- return Object.entries(validationTask.rules).flatMap(async ([ruleName, ruleValue]) => {
86
- const validator = constants.rules[ruleName];
87
- if (validator && !validationTask.path.includes(".$.")) {
88
- const result = await validator(ruleValue, validationTask.inputValue, validationTask.path);
89
- if (result && !result.valid) {
90
- return result.errors.forEach((error) => {
91
- return errors.push(error);
92
- });
93
- }
94
- }
95
- });
96
- }));
97
- return errors;
98
- };
99
- var inputWithSchema_default = validateInputWithSchema;
100
- export {
101
- addToValidationQueue,
102
- inputWithSchema_default as default,
103
- getArrayPathKey,
104
- handleGetInputValue
105
- };