@joystick.js/cli-canary 0.0.0-canary.21 → 0.0.0-canary.2100
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.
- package/.build/getFilesToBuild.js +1 -1
- package/.build/index.js +4 -3
- package/LICENSE.md +59 -0
- package/README.md +45 -4
- package/dist/cli.js +2 -69
- package/dist/cli.js.map +7 -0
- package/dist/commands/build/definition.js +2 -0
- package/dist/commands/build/definition.js.map +7 -0
- package/dist/commands/build/index.js +2 -0
- package/dist/commands/build/index.js.map +7 -0
- package/dist/commands/create/build_package_json.js +2 -0
- package/dist/commands/create/build_package_json.js.map +7 -0
- package/dist/commands/create/definition.js +2 -0
- package/dist/commands/create/definition.js.map +7 -0
- package/dist/commands/create/index.js +3 -0
- package/dist/commands/create/index.js.map +7 -0
- package/dist/commands/create/template/api/index.js +6 -0
- package/dist/commands/create/template/email/base.css +9 -0
- package/dist/commands/create/template/email/base.html +10 -0
- package/dist/commands/create/template/email/reset_password.js +20 -0
- package/dist/commands/create/template/i18n/en-US.js +14 -0
- package/dist/commands/create/template/index.client.js +1 -0
- package/dist/commands/create/template/index.css +34 -0
- package/dist/{functions/create/templates → commands/create/template}/index.html +2 -3
- package/dist/{functions/create/templates → commands/create/template}/index.server.js +6 -6
- package/dist/commands/create/template/public/apple-touch-icon-152x152.png +0 -0
- package/dist/commands/create/template/public/favicon.ico +0 -0
- package/dist/commands/create/template/public/joystick_logo.webp +0 -0
- package/dist/{functions/create/templates → commands/create/template}/public/manifest.json +4 -4
- package/dist/commands/create/template/public/splash-screen-1024x1024.png +0 -0
- package/{src/functions/create/templates → dist/commands/create/template}/ui/components/button/index.js +14 -6
- package/{src/functions/create/templates → dist/commands/create/template}/ui/layouts/app/index.js +2 -2
- package/dist/commands/create/template/ui/pages/error/index.js +50 -0
- package/dist/commands/create/template/ui/pages/index/index.js +121 -0
- package/dist/commands/help/definition.js +2 -0
- package/dist/commands/help/definition.js.map +7 -0
- package/dist/commands/help/index.js +20 -0
- package/dist/commands/help/index.js.map +7 -0
- package/dist/commands/index.js +2 -0
- package/dist/commands/index.js.map +7 -0
- package/dist/commands/logout/definition.js +2 -0
- package/dist/commands/logout/definition.js.map +7 -0
- package/dist/commands/logout/index.js +4 -0
- package/dist/commands/logout/index.js.map +7 -0
- package/dist/commands/push/check_if_settings_valid.js +2 -0
- package/dist/commands/push/check_if_settings_valid.js.map +7 -0
- package/dist/commands/push/definition.js +2 -0
- package/dist/commands/push/definition.js.map +7 -0
- package/dist/commands/push/get_deployment.js +2 -0
- package/dist/commands/push/get_deployment.js.map +7 -0
- package/dist/commands/push/get_deployment_token.js +2 -0
- package/dist/commands/push/get_deployment_token.js.map +7 -0
- package/dist/commands/push/get_push_domain.js +2 -0
- package/dist/commands/push/get_push_domain.js.map +7 -0
- package/dist/commands/push/get_settings_file.js +2 -0
- package/dist/commands/push/get_settings_file.js.map +7 -0
- package/dist/commands/push/index.js +6 -0
- package/dist/commands/push/index.js.map +7 -0
- package/dist/commands/push/upload_build_to_push.js +2 -0
- package/dist/commands/push/upload_build_to_push.js.map +7 -0
- package/dist/commands/push_old/cdn_mirrors.js +2 -0
- package/dist/commands/push_old/cdn_mirrors.js.map +7 -0
- package/dist/commands/push_old/check_if_settings_valid.js +2 -0
- package/dist/commands/push_old/check_if_settings_valid.js.map +7 -0
- package/dist/commands/push_old/create_version.js +2 -0
- package/dist/commands/push_old/create_version.js.map +7 -0
- package/dist/commands/push_old/definition.js +2 -0
- package/dist/commands/push_old/definition.js.map +7 -0
- package/dist/commands/push_old/get_app_domain.js +2 -0
- package/dist/commands/push_old/get_app_domain.js.map +7 -0
- package/dist/commands/push_old/get_deployment.js +2 -0
- package/dist/commands/push_old/get_deployment.js.map +7 -0
- package/dist/commands/push_old/get_provision_domain.js +2 -0
- package/dist/commands/push_old/get_provision_domain.js.map +7 -0
- package/dist/commands/push_old/get_session_token.js +2 -0
- package/dist/commands/push_old/get_session_token.js.map +7 -0
- package/dist/commands/push_old/get_settings_file.js +2 -0
- package/dist/commands/push_old/get_settings_file.js.map +7 -0
- package/dist/commands/push_old/handle_initial_deployment.js +2 -0
- package/dist/commands/push_old/handle_initial_deployment.js.map +7 -0
- package/dist/commands/push_old/handle_version_deployment.js +2 -0
- package/dist/commands/push_old/handle_version_deployment.js.map +7 -0
- package/dist/commands/push_old/index.js +9 -0
- package/dist/commands/push_old/index.js.map +7 -0
- package/dist/commands/push_old/prompts/confirm_deployment.js +18 -0
- package/dist/commands/push_old/prompts/confirm_deployment.js.map +7 -0
- package/dist/commands/push_old/prompts/session_token.js +6 -0
- package/dist/commands/push_old/prompts/session_token.js.map +7 -0
- package/dist/commands/push_old/upload_build_to_cdn.js +2 -0
- package/dist/commands/push_old/upload_build_to_cdn.js.map +7 -0
- package/dist/commands/push_old/validate_deployment.js +2 -0
- package/dist/commands/push_old/validate_deployment.js.map +7 -0
- package/dist/commands/push_old/validate_push_config.js +2 -0
- package/dist/commands/push_old/validate_push_config.js.map +7 -0
- package/dist/commands/start/definition.js +2 -0
- package/dist/commands/start/definition.js.map +7 -0
- package/dist/commands/start/index.js +2 -0
- package/dist/commands/start/index.js.map +7 -0
- package/dist/commands/test/definition.js +2 -0
- package/dist/commands/test/definition.js.map +7 -0
- package/dist/commands/test/index.js +2 -0
- package/dist/commands/test/index.js.map +7 -0
- package/dist/commands/update/definition.js +2 -0
- package/dist/commands/update/definition.js.map +7 -0
- package/dist/commands/update/index.js +2 -0
- package/dist/commands/update/index.js.map +7 -0
- package/dist/commands/use/definition.js +2 -0
- package/dist/commands/use/definition.js.map +7 -0
- package/dist/commands/use/index.js +2 -0
- package/dist/commands/use/index.js.map +7 -0
- package/dist/index.js +2 -7
- package/dist/index.js.map +7 -0
- package/dist/lib/build/browser_path_exclusions.js +2 -0
- package/dist/lib/build/browser_path_exclusions.js.map +7 -0
- package/dist/lib/build/browser_paths.js +2 -0
- package/dist/lib/build/browser_paths.js.map +7 -0
- package/dist/lib/build/build_files.js +4 -0
- package/dist/lib/build/build_files.js.map +7 -0
- package/dist/lib/build/copy_paths.js +2 -0
- package/dist/lib/build/copy_paths.js.map +7 -0
- package/dist/lib/build/get_code_frame.js +2 -0
- package/dist/lib/build/get_code_frame.js.map +7 -0
- package/dist/lib/build/get_file_operation.js +2 -0
- package/dist/lib/build/get_file_operation.js.map +7 -0
- package/dist/lib/build/get_files_to_build.js +2 -0
- package/dist/lib/build/get_files_to_build.js.map +7 -0
- package/dist/lib/build/get_path_platform.js +2 -0
- package/dist/lib/build/get_path_platform.js.map +7 -0
- package/dist/lib/build/get_platform_safe_path.js +2 -0
- package/dist/lib/build/get_platform_safe_path.js.map +7 -0
- package/dist/lib/build/get_tar_ignore_list.js +3 -0
- package/dist/lib/build/get_tar_ignore_list.js.map +7 -0
- package/dist/lib/build/index.js +4 -0
- package/dist/lib/build/index.js.map +7 -0
- package/dist/lib/build/master_ignore_list.js +2 -0
- package/dist/lib/build/master_ignore_list.js.map +7 -0
- package/dist/lib/build/minify_file.js +2 -0
- package/dist/lib/build/minify_file.js.map +7 -0
- package/dist/lib/build/node_paths.js +2 -0
- package/dist/lib/build/node_paths.js.map +7 -0
- package/dist/lib/build/on_warn.js +11 -0
- package/dist/lib/build/on_warn.js.map +7 -0
- package/dist/lib/build/plugins/bootstrap_component.js +34 -0
- package/dist/lib/build/plugins/bootstrap_component.js.map +7 -0
- package/dist/lib/build/plugins/generate_file_dependency_map.js +2 -0
- package/dist/lib/build/plugins/generate_file_dependency_map.js.map +7 -0
- package/dist/lib/build/plugins/index.js +2 -0
- package/dist/lib/build/plugins/index.js.map +7 -0
- package/dist/lib/build/plugins/set_component_id.js +3 -0
- package/dist/lib/build/plugins/set_component_id.js.map +7 -0
- package/dist/lib/build/plugins/update_file_map.js +2 -0
- package/dist/lib/build/plugins/update_file_map.js.map +7 -0
- package/dist/lib/build/plugins/warn_node_environment.js +4 -0
- package/dist/lib/build/plugins/warn_node_environment.js.map +7 -0
- package/dist/lib/cli_log.js +14 -0
- package/dist/lib/cli_log.js.map +7 -0
- package/dist/lib/color_log.js +2 -0
- package/dist/lib/color_log.js.map +7 -0
- package/dist/lib/command_exists.js +2 -0
- package/dist/lib/command_exists.js.map +7 -0
- package/dist/lib/constants.js +2 -4
- package/dist/lib/constants.js.map +7 -0
- package/dist/lib/debounce.js +2 -0
- package/dist/lib/debounce.js.map +7 -0
- package/dist/lib/decrypt_buffer.js +2 -0
- package/dist/lib/decrypt_buffer.js.map +7 -0
- package/dist/lib/development_server/ava_config.js +2 -0
- package/dist/lib/development_server/ava_config.js.map +7 -0
- package/dist/lib/development_server/check_if_port_occupied.js +2 -0
- package/dist/lib/development_server/check_if_port_occupied.js.map +7 -0
- package/dist/lib/development_server/cleanup.js +2 -0
- package/dist/lib/development_server/cleanup.js.map +7 -0
- package/dist/lib/development_server/databases/download_database_binary.js +2 -0
- package/dist/lib/development_server/databases/download_database_binary.js.map +7 -0
- package/dist/lib/development_server/databases/installer.js +4 -0
- package/dist/lib/development_server/databases/installer.js.map +7 -0
- package/dist/lib/development_server/databases/mongodb/available_query_parameters.js +2 -0
- package/dist/lib/development_server/databases/mongodb/available_query_parameters.js.map +7 -0
- package/dist/lib/development_server/databases/mongodb/build_connection_string.js +2 -0
- package/dist/lib/development_server/databases/mongodb/build_connection_string.js.map +7 -0
- package/dist/lib/development_server/databases/mongodb/build_query_parameters.js +2 -0
- package/dist/lib/development_server/databases/mongodb/build_query_parameters.js.map +7 -0
- package/dist/lib/development_server/databases/mongodb/check_connection.js +3 -0
- package/dist/lib/development_server/databases/mongodb/check_connection.js.map +7 -0
- package/dist/lib/development_server/databases/mongodb/connect.js +2 -0
- package/dist/lib/development_server/databases/mongodb/connect.js.map +7 -0
- package/dist/lib/development_server/databases/mongodb/index.js +2 -0
- package/dist/lib/development_server/databases/mongodb/index.js.map +7 -0
- package/dist/lib/development_server/databases/postgresql/check_connection.js +3 -0
- package/dist/lib/development_server/databases/postgresql/check_connection.js.map +7 -0
- package/dist/lib/development_server/databases/postgresql/connect.js +2 -0
- package/dist/lib/development_server/databases/postgresql/connect.js.map +7 -0
- package/dist/lib/development_server/databases/postgresql/index.js +3 -0
- package/dist/lib/development_server/databases/postgresql/index.js.map +7 -0
- package/dist/lib/development_server/databases/provider_map.js +2 -0
- package/dist/lib/development_server/databases/provider_map.js.map +7 -0
- package/dist/lib/development_server/databases/redis/check_connection.js +3 -0
- package/dist/lib/development_server/databases/redis/check_connection.js.map +7 -0
- package/dist/lib/development_server/databases/redis/connect.js +2 -0
- package/dist/lib/development_server/databases/redis/connect.js.map +7 -0
- package/dist/lib/development_server/databases/redis/index.js +2 -0
- package/dist/lib/development_server/databases/redis/index.js.map +7 -0
- package/dist/lib/development_server/get_database_process_ids.js +2 -0
- package/dist/lib/development_server/get_database_process_ids.js.map +7 -0
- package/dist/lib/development_server/get_translations.js +2 -0
- package/dist/lib/development_server/get_translations.js.map +7 -0
- package/dist/lib/development_server/hmr_server.js +2 -0
- package/dist/lib/development_server/hmr_server.js.map +7 -0
- package/dist/lib/development_server/index.js +11 -0
- package/dist/lib/development_server/index.js.map +7 -0
- package/dist/lib/development_server/kill_process_ids.js +2 -0
- package/dist/lib/development_server/kill_process_ids.js.map +7 -0
- package/dist/lib/development_server/run_tests.js +3 -0
- package/dist/lib/development_server/run_tests.js.map +7 -0
- package/dist/lib/development_server/start_app_server.js +2 -0
- package/dist/lib/development_server/start_app_server.js.map +7 -0
- package/dist/lib/development_server/start_databases.js +2 -0
- package/dist/lib/development_server/start_databases.js.map +7 -0
- package/dist/lib/development_server/start_hmr_server.js +2 -0
- package/dist/lib/development_server/start_hmr_server.js.map +7 -0
- package/dist/lib/development_server/watch_for_changes/browser_path_exclusions.js +2 -0
- package/dist/lib/development_server/watch_for_changes/browser_path_exclusions.js.map +7 -0
- package/dist/lib/development_server/watch_for_changes/browser_paths.js +2 -0
- package/dist/lib/development_server/watch_for_changes/browser_paths.js.map +7 -0
- package/dist/lib/development_server/watch_for_changes/get_after_run_tasks.js +2 -0
- package/dist/lib/development_server/watch_for_changes/get_after_run_tasks.js.map +7 -0
- package/dist/lib/development_server/watch_for_changes/get_file_codependencies.js +2 -0
- package/dist/lib/development_server/watch_for_changes/get_file_codependencies.js.map +7 -0
- package/dist/lib/development_server/watch_for_changes/get_platform_safe_path.js +2 -0
- package/dist/lib/development_server/watch_for_changes/get_platform_safe_path.js.map +7 -0
- package/dist/lib/development_server/watch_for_changes/index.js +2 -0
- package/dist/lib/development_server/watch_for_changes/index.js.map +7 -0
- package/dist/lib/development_server/watch_for_changes/node_paths.js +2 -0
- package/dist/lib/development_server/watch_for_changes/node_paths.js.map +7 -0
- package/dist/lib/development_server/watch_for_changes/read_file_dependency_map.js +2 -0
- package/dist/lib/development_server/watch_for_changes/read_file_dependency_map.js.map +7 -0
- package/dist/lib/development_server/watch_for_changes/watch_paths.js +2 -0
- package/dist/lib/development_server/watch_for_changes/watch_paths.js.map +7 -0
- package/dist/lib/dynamic_import.js +2 -0
- package/dist/lib/dynamic_import.js.map +7 -0
- package/dist/lib/encrypt_buffer.js +2 -0
- package/dist/lib/encrypt_buffer.js.map +7 -0
- package/dist/lib/generate_id.js +2 -0
- package/dist/lib/generate_id.js.map +7 -0
- package/dist/lib/get_architecture.js +2 -0
- package/dist/lib/get_architecture.js.map +7 -0
- package/dist/lib/get_files_in_path.js +2 -0
- package/dist/lib/get_files_in_path.js.map +7 -0
- package/dist/lib/get_platform_safe_path.js +2 -0
- package/dist/lib/get_platform_safe_path.js.map +7 -0
- package/dist/lib/get_process_id_from_port.js +3 -0
- package/dist/lib/get_process_id_from_port.js.map +7 -0
- package/dist/lib/is_valid_json_string.js +2 -0
- package/dist/lib/is_valid_json_string.js.map +7 -0
- package/dist/lib/kill_port_process.js +2 -0
- package/dist/lib/kill_port_process.js.map +7 -0
- package/dist/lib/kill_process_id.js +2 -0
- package/dist/lib/kill_process_id.js.map +7 -0
- package/dist/lib/load_settings.js +2 -0
- package/dist/lib/load_settings.js.map +7 -0
- package/dist/lib/loader.js +3 -82
- package/dist/lib/loader.js.map +7 -0
- package/dist/lib/log_bars.js +2 -0
- package/dist/lib/log_bars.js.map +7 -0
- package/dist/lib/node_path_polyfills.js +2 -0
- package/dist/lib/node_path_polyfills.js.map +7 -0
- package/dist/lib/parse_args.js +2 -0
- package/dist/lib/parse_args.js.map +7 -0
- package/dist/lib/parse_options.js +2 -0
- package/dist/lib/parse_options.js.map +7 -0
- package/dist/lib/path_exists.js +2 -0
- package/dist/lib/path_exists.js.map +7 -0
- package/dist/lib/rainbow_road.js +2 -0
- package/dist/lib/rainbow_road.js.map +7 -0
- package/dist/lib/replace_in_files.js +2 -0
- package/dist/lib/replace_in_files.js.map +7 -0
- package/dist/lib/required_files.js +2 -0
- package/dist/lib/required_files.js.map +7 -0
- package/dist/lib/serialize_query_parameters.js +2 -0
- package/dist/lib/serialize_query_parameters.js.map +7 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +7 -0
- package/dist/lib/unique_array.js +2 -0
- package/dist/lib/unique_array.js.map +7 -0
- package/increment_version.js +3 -0
- package/package.json +22 -39
- package/src/cli.js +73 -46
- package/src/commands/build/definition.js +58 -0
- package/src/commands/build/index.js +7 -0
- package/src/commands/create/build_package_json.js +20 -0
- package/src/commands/create/definition.js +35 -0
- package/src/commands/create/index.js +71 -0
- package/src/commands/create/template/api/index.js +6 -0
- package/src/commands/create/template/email/base.css +9 -0
- package/src/commands/create/template/email/base.html +10 -0
- package/src/commands/create/template/email/reset_password.js +20 -0
- package/src/commands/create/template/i18n/en-US.js +14 -0
- package/src/commands/create/template/index.client.js +1 -0
- package/src/commands/create/template/index.css +34 -0
- package/src/{functions/create/templates → commands/create/template}/index.html +2 -3
- package/src/{functions/create/templates → commands/create/template}/index.server.js +6 -6
- package/src/commands/create/template/public/apple-touch-icon-152x152.png +0 -0
- package/src/commands/create/template/public/favicon.ico +0 -0
- package/src/commands/create/template/public/joystick_logo.webp +0 -0
- package/src/{functions/create/templates → commands/create/template}/public/manifest.json +4 -4
- package/src/commands/create/template/public/splash-screen-1024x1024.png +0 -0
- package/{dist/functions/create/templates → src/commands/create/template}/ui/components/button/index.js +14 -6
- package/{dist/functions/create/templates → src/commands/create/template}/ui/layouts/app/index.js +2 -2
- package/src/commands/create/template/ui/pages/error/index.js +50 -0
- package/src/commands/create/template/ui/pages/index/index.js +121 -0
- package/src/commands/help/definition.js +12 -0
- package/src/commands/help/index.js +48 -0
- package/src/commands/index.js +25 -0
- package/src/commands/logout/definition.js +10 -0
- package/src/commands/logout/index.js +20 -0
- package/src/commands/push/check_if_settings_valid.js +10 -0
- package/src/commands/push/definition.js +58 -0
- package/src/commands/push/get_deployment.js +19 -0
- package/src/commands/push/get_deployment_token.js +30 -0
- package/src/commands/push/get_push_domain.js +8 -0
- package/src/commands/push/get_settings_file.js +47 -0
- package/src/commands/push/index.js +102 -0
- package/src/commands/push/upload_build_to_push.js +37 -0
- package/src/commands/push_old/cdn_mirrors.js +7 -0
- package/src/commands/push_old/check_if_settings_valid.js +10 -0
- package/src/commands/push_old/create_version.js +20 -0
- package/src/commands/push_old/definition.js +43 -0
- package/src/commands/push_old/get_app_domain.js +11 -0
- package/src/commands/push_old/get_deployment.js +19 -0
- package/src/commands/push_old/get_provision_domain.js +9 -0
- package/src/commands/push_old/get_session_token.js +31 -0
- package/src/commands/push_old/get_settings_file.js +47 -0
- package/src/commands/push_old/handle_initial_deployment.js +24 -0
- package/src/commands/push_old/handle_version_deployment.js +23 -0
- package/src/commands/push_old/index.js +190 -0
- package/src/commands/push_old/prompts/confirm_deployment.js +73 -0
- package/src/commands/push_old/prompts/session_token.js +11 -0
- package/src/commands/push_old/upload_build_to_cdn.js +59 -0
- package/src/commands/push_old/validate_deployment.js +19 -0
- package/src/commands/push_old/validate_push_config.js +18 -0
- package/src/commands/start/definition.js +83 -0
- package/src/commands/start/index.js +12 -0
- package/src/commands/test/definition.js +28 -0
- package/src/commands/test/index.js +12 -0
- package/src/commands/update/definition.js +28 -0
- package/src/commands/update/index.js +29 -0
- package/src/commands/use/definition.js +19 -0
- package/src/commands/use/index.js +54 -0
- package/src/index.js +0 -0
- package/src/lib/build/browser_path_exclusions.js +8 -0
- package/src/lib/build/browser_paths.js +11 -0
- package/src/lib/build/build_files.js +167 -0
- package/src/{functions/start/filesToCopy.js → lib/build/copy_paths.js} +7 -5
- package/src/lib/build/get_code_frame.js +11 -0
- package/src/lib/build/get_file_operation.js +25 -0
- package/src/lib/build/get_files_to_build.js +41 -0
- package/src/lib/build/get_path_platform.js +32 -0
- package/src/lib/build/get_platform_safe_path.js +6 -0
- package/src/lib/build/get_tar_ignore_list.js +41 -0
- package/src/lib/build/index.js +137 -0
- package/src/lib/build/master_ignore_list.js +14 -0
- package/src/lib/build/minify_file.js +22 -0
- package/src/lib/build/node_paths.js +20 -0
- package/src/lib/build/on_warn.js +70 -0
- package/src/lib/build/plugins/bootstrap_component.js +191 -0
- package/src/lib/build/plugins/generate_file_dependency_map.js +20 -0
- package/src/lib/build/plugins/index.js +26 -0
- package/src/lib/build/plugins/set_component_id.js +89 -0
- package/src/lib/build/plugins/update_file_map.js +98 -0
- package/src/lib/build/plugins/warn_node_environment.js +20 -0
- package/src/lib/{CLILog.js → cli_log.js} +12 -8
- package/src/lib/color_log.js +7 -0
- package/src/lib/command_exists.js +16 -0
- package/src/lib/constants.js +11 -1
- package/src/lib/debounce.js +9 -0
- package/src/lib/decrypt_buffer.js +12 -0
- package/src/lib/development_server/ava_config.js +14 -0
- package/src/lib/development_server/check_if_port_occupied.js +31 -0
- package/src/lib/development_server/cleanup.js +15 -0
- package/src/lib/development_server/databases/download_database_binary.js +11 -0
- package/src/lib/development_server/databases/installer.js +205 -0
- package/src/lib/{dev/databases/mongodb/availableQueryParameters.js → development_server/databases/mongodb/available_query_parameters.js} +3 -1
- package/src/lib/development_server/databases/mongodb/build_connection_string.js +36 -0
- package/src/lib/development_server/databases/mongodb/build_query_parameters.js +17 -0
- package/src/lib/development_server/databases/mongodb/check_connection.js +46 -0
- package/src/lib/development_server/databases/mongodb/connect.js +27 -0
- package/src/lib/development_server/databases/mongodb/index.js +105 -0
- package/src/lib/development_server/databases/postgresql/check_connection.js +56 -0
- package/src/lib/development_server/databases/postgresql/connect.js +33 -0
- package/src/lib/development_server/databases/postgresql/index.js +156 -0
- package/src/lib/development_server/databases/provider_map.js +20 -0
- package/src/lib/development_server/databases/redis/check_connection.js +55 -0
- package/src/lib/development_server/databases/redis/connect.js +27 -0
- package/src/lib/development_server/databases/redis/index.js +138 -0
- package/src/lib/development_server/get_database_process_ids.js +28 -0
- package/src/lib/development_server/get_translations.js +85 -0
- package/src/lib/development_server/hmr_server.js +94 -0
- package/src/lib/development_server/index.js +438 -0
- package/src/lib/development_server/kill_process_ids.js +8 -0
- package/src/lib/development_server/run_tests.js +84 -0
- package/src/lib/development_server/start_app_server.js +60 -0
- package/src/lib/development_server/start_databases.js +108 -0
- package/src/lib/development_server/start_hmr_server.js +36 -0
- package/src/lib/development_server/watch_for_changes/browser_path_exclusions.js +8 -0
- package/src/lib/development_server/watch_for_changes/browser_paths.js +11 -0
- package/src/lib/development_server/watch_for_changes/get_after_run_tasks.js +36 -0
- package/src/lib/development_server/watch_for_changes/get_file_codependencies.js +53 -0
- package/src/lib/development_server/watch_for_changes/get_platform_safe_path.js +6 -0
- package/src/lib/development_server/watch_for_changes/index.js +222 -0
- package/src/lib/development_server/watch_for_changes/node_paths.js +18 -0
- package/src/lib/development_server/watch_for_changes/read_file_dependency_map.js +18 -0
- package/src/lib/development_server/watch_for_changes/watch_paths.js +23 -0
- package/src/lib/dynamic_import.js +6 -0
- package/src/lib/encrypt_buffer.js +10 -0
- package/src/lib/generate_id.js +15 -0
- package/src/lib/get_architecture.js +43 -0
- package/src/lib/get_files_in_path.js +25 -0
- package/src/lib/get_platform_safe_path.js +8 -0
- package/src/lib/get_process_id_from_port.js +26 -0
- package/src/lib/is_valid_json_string.js +10 -0
- package/src/lib/kill_port_process.js +12 -0
- package/src/lib/kill_process_id.js +19 -0
- package/src/lib/load_settings.js +43 -0
- package/src/lib/loader.js +4 -77
- package/src/lib/log_bars.js +7 -0
- package/src/lib/node_path_polyfills.js +23 -0
- package/src/lib/parse_args.js +16 -0
- package/src/lib/parse_options.js +16 -0
- package/src/lib/path_exists.js +11 -0
- package/src/lib/{rainbowRoad.js → rainbow_road.js} +4 -2
- package/src/lib/replace_in_files.js +40 -0
- package/src/lib/{dev/requiredFiles.js → required_files.js} +3 -1
- package/src/lib/serialize_query_parameters.js +7 -0
- package/src/lib/types.js +60 -0
- package/src/lib/unique_array.js +24 -0
- package/HMRNOTES.txt +0 -23
- package/_package.json +0 -55
- package/canary.js +0 -12
- package/dist/functions/build/getTarIgnoreList.js +0 -25
- package/dist/functions/build/index.js +0 -54
- package/dist/functions/create/buildPackageJSON.js +0 -20
- package/dist/functions/create/index.js +0 -193
- package/dist/functions/create/templates/api/index.js +0 -4
- package/dist/functions/create/templates/i18n/en-US.js +0 -4
- package/dist/functions/create/templates/index.client.js +0 -7
- package/dist/functions/create/templates/index.css +0 -20
- package/dist/functions/create/templates/public/apple-touch-icon-152x152.png +0 -0
- package/dist/functions/create/templates/public/favicon.ico +0 -0
- package/dist/functions/create/templates/public/splash-screen-1024x1024.png +0 -0
- package/dist/functions/create/templates/ui/pages/error/index.js +0 -31
- package/dist/functions/create/templates/ui/pages/index/index.js +0 -94
- package/dist/functions/index.js +0 -243
- package/dist/functions/logout/index.js +0 -20
- package/dist/functions/push/checkIfProvisionAvailable.js +0 -19
- package/dist/functions/push/deploy/index.js +0 -173
- package/dist/functions/push/deploy/initial.js +0 -100
- package/dist/functions/push/deploy/version.js +0 -100
- package/dist/functions/push/domains.js +0 -23
- package/dist/functions/push/getAvailableCDN.js +0 -23
- package/dist/functions/push/getDeployment.js +0 -41
- package/dist/functions/push/getDeploymentSummary.js +0 -38
- package/dist/functions/push/getInstanceSizeRegions.js +0 -37
- package/dist/functions/push/getInstanceSizesForRegion.js +0 -34
- package/dist/functions/push/getProviderInstanceSizes.js +0 -34
- package/dist/functions/push/getProviderRegions.js +0 -36
- package/dist/functions/push/getProvidersWithConnectionStatus.js +0 -20
- package/dist/functions/push/getSessionToken.js +0 -23
- package/dist/functions/push/getUserFromSessionToken.js +0 -37
- package/dist/functions/push/index.js +0 -210
- package/dist/functions/push/loginToCheatCode.js +0 -33
- package/dist/functions/push/pingProvisionAPI.js +0 -31
- package/dist/functions/push/prompts.js +0 -332
- package/dist/functions/push/providerMap.js +0 -11
- package/dist/functions/push/providers.js +0 -9
- package/dist/functions/reset/index.js +0 -0
- package/dist/functions/reset/reset.js +0 -127
- package/dist/functions/start/bootstrapLayoutComponent.js +0 -54
- package/dist/functions/start/bootstrapPageComponent.js +0 -51
- package/dist/functions/start/buildFile.js +0 -85
- package/dist/functions/start/buildFiles.js +0 -76
- package/dist/functions/start/buildPlugins.js +0 -183
- package/dist/functions/start/checkIfPortAvailable.js +0 -18
- package/dist/functions/start/cleanup/index.js +0 -18
- package/dist/functions/start/databases/mongodb/availableQueryParameters.js +0 -42
- package/dist/functions/start/databases/mongodb/buildConnectionString.js +0 -22
- package/dist/functions/start/databases/mongodb/buildQueryParameters.js +0 -14
- package/dist/functions/start/databases/mongodb/checkConnection.js +0 -35
- package/dist/functions/start/databases/mongodb/connect.js +0 -25
- package/dist/functions/start/databases/mongodb/index.js +0 -93
- package/dist/functions/start/databases/postgresql/checkConnection.js +0 -41
- package/dist/functions/start/databases/postgresql/connect.js +0 -27
- package/dist/functions/start/databases/postgresql/index.js +0 -106
- package/dist/functions/start/databases/redis.js +0 -0
- package/dist/functions/start/databases/startProvider.js +0 -16
- package/dist/functions/start/fileDependencyMapper.js +0 -22
- package/dist/functions/start/filesToCopy.js +0 -18
- package/dist/functions/start/generateId.js +0 -74
- package/dist/functions/start/getCodependenciesForFile.js +0 -64
- package/dist/functions/start/getFilesToBuild.js +0 -39
- package/dist/functions/start/getProcessIdFromPort.js +0 -60
- package/dist/functions/start/hmrServer.js +0 -66
- package/dist/functions/start/index.js +0 -10
- package/dist/functions/start/isWindows.js +0 -5
- package/dist/functions/start/minifyFile.js +0 -12
- package/dist/functions/start/onWarn.js +0 -63
- package/dist/functions/start/readFileDependencyMap.js +0 -16
- package/dist/functions/start/removeDeletedDependenciesFromMap.js +0 -18
- package/dist/functions/start/setComponentId.js +0 -46
- package/dist/functions/start/updateFileMap.js +0 -67
- package/dist/functions/test/index.js +0 -30
- package/dist/functions/update/index.js +0 -21
- package/dist/functions/use/index.js +0 -61
- package/dist/lib/CLILog.js +0 -49
- package/dist/lib/build/browserPathExclusions.js +0 -7
- package/dist/lib/build/browserPaths.js +0 -11
- package/dist/lib/build/buildFile.js +0 -84
- package/dist/lib/build/buildFiles.js +0 -183
- package/dist/lib/build/buildPlugins.js +0 -183
- package/dist/lib/build/getCodeFrame.js +0 -10
- package/dist/lib/build/minifyFile.js +0 -12
- package/dist/lib/build/nodePathExclusions.js +0 -7
- package/dist/lib/build/nodePaths.js +0 -11
- package/dist/lib/build/onWarn.js +0 -63
- package/dist/lib/build/removeDeletedDependenciesFromMap.js +0 -18
- package/dist/lib/build/setComponentId.js +0 -46
- package/dist/lib/build/updateFileMap.js +0 -67
- package/dist/lib/buildResolvePlugin.js +0 -21
- package/dist/lib/checkIfValidJSON.js +0 -11
- package/dist/lib/colorLog.js +0 -7
- package/dist/lib/dev/cleanup.js +0 -30
- package/dist/lib/dev/databases/mongodb/availableQueryParameters.js +0 -42
- package/dist/lib/dev/databases/mongodb/buildConnectionString.js +0 -22
- package/dist/lib/dev/databases/mongodb/buildQueryParameters.js +0 -14
- package/dist/lib/dev/databases/mongodb/checkConnection.js +0 -38
- package/dist/lib/dev/databases/mongodb/connect.js +0 -25
- package/dist/lib/dev/databases/mongodb/index.js +0 -93
- package/dist/lib/dev/databases/postgresql/checkConnection.js +0 -41
- package/dist/lib/dev/databases/postgresql/connect.js +0 -27
- package/dist/lib/dev/databases/postgresql/index.js +0 -106
- package/dist/lib/dev/databases/providerMap.js +0 -15
- package/dist/lib/dev/getCodependenciesForFile.js +0 -64
- package/dist/lib/dev/getFilesToBuild.js +0 -38
- package/dist/lib/dev/index.js +0 -382
- package/dist/lib/dev/isWindows.js +0 -5
- package/dist/lib/dev/loadSettings.js +0 -81
- package/dist/lib/dev/readFileDependencyMap.js +0 -16
- package/dist/lib/dev/requiredFiles.js +0 -18
- package/dist/lib/dev/runBuild.js +0 -30
- package/dist/lib/dev/runTests.js +0 -30
- package/dist/lib/dev/startApp.js +0 -30
- package/dist/lib/dev/startDatabases.js +0 -102
- package/dist/lib/dev/startHMR.js +0 -30
- package/dist/lib/dev/updateFileMap.js +0 -67
- package/dist/lib/dev/validateProject.js +0 -0
- package/dist/lib/dev/watchlist.js +0 -15
- package/dist/lib/filesToCopy.js +0 -18
- package/dist/lib/generateId.js +0 -74
- package/dist/lib/getArgs.js +0 -14
- package/dist/lib/getOptions.js +0 -15
- package/dist/lib/getPlatformSafePath.js +0 -7
- package/dist/lib/getProcessIdFromPort.js +0 -60
- package/dist/lib/getProvider.js +0 -8
- package/dist/lib/help.js +0 -56
- package/dist/lib/isObject.js +0 -6
- package/dist/lib/isValidJSONString.js +0 -11
- package/dist/lib/isWindows.js +0 -5
- package/dist/lib/killProcesses.js +0 -0
- package/dist/lib/loadSettings.js +0 -33
- package/dist/lib/masterIgnoreList.js +0 -16
- package/dist/lib/nodeEnvironment.js +0 -9
- package/dist/lib/nodeEnvironments.js +0 -8
- package/dist/lib/parseCookiesFromLogin.js +0 -18
- package/dist/lib/rainbowRoad.js +0 -7
- package/dist/lib/readDirectorySync.js +0 -14
- package/dist/lib/regexes.js +0 -14
- package/dist/lib/replaceBackslashesWithForwardSlashes.js +0 -8
- package/dist/lib/replaceFileProtocol.js +0 -8
- package/dist/lib/serializeQueryParameters.js +0 -8
- package/dist/lib/settings.js +0 -4
- package/dist/lib/validateDatabasesFromSettings.js +0 -34
- package/dist/lib/wait.js +0 -8
- package/release.js +0 -40
- package/src/functions/build/getTarIgnoreList.js +0 -30
- package/src/functions/build/index.js +0 -63
- package/src/functions/create/buildPackageJSON.js +0 -18
- package/src/functions/create/index.js +0 -209
- package/src/functions/create/templates/api/index.js +0 -4
- package/src/functions/create/templates/i18n/en-US.js +0 -4
- package/src/functions/create/templates/index.client.js +0 -7
- package/src/functions/create/templates/index.css +0 -20
- package/src/functions/create/templates/public/apple-touch-icon-152x152.png +0 -0
- package/src/functions/create/templates/public/favicon.ico +0 -0
- package/src/functions/create/templates/public/splash-screen-1024x1024.png +0 -0
- package/src/functions/create/templates/ui/pages/error/index.js +0 -31
- package/src/functions/create/templates/ui/pages/index/index.js +0 -94
- package/src/functions/index.js +0 -243
- package/src/functions/logout/index.js +0 -20
- package/src/functions/push/checkIfProvisionAvailable.js +0 -20
- package/src/functions/push/deploy/index.js +0 -199
- package/src/functions/push/deploy/initial.js +0 -108
- package/src/functions/push/deploy/version.js +0 -108
- package/src/functions/push/domains.js +0 -23
- package/src/functions/push/getAvailableCDN.js +0 -27
- package/src/functions/push/getDeployment.js +0 -43
- package/src/functions/push/getDeploymentSummary.js +0 -39
- package/src/functions/push/getInstanceSizeRegions.js +0 -40
- package/src/functions/push/getInstanceSizesForRegion.js +0 -35
- package/src/functions/push/getProviderInstanceSizes.js +0 -35
- package/src/functions/push/getProviderRegions.js +0 -39
- package/src/functions/push/getProvidersWithConnectionStatus.js +0 -25
- package/src/functions/push/getSessionToken.js +0 -26
- package/src/functions/push/getUserFromSessionToken.js +0 -39
- package/src/functions/push/index.js +0 -245
- package/src/functions/push/loginToCheatCode.js +0 -34
- package/src/functions/push/pingProvisionAPI.js +0 -33
- package/src/functions/push/prompts.js +0 -276
- package/src/functions/push/providerMap.js +0 -8
- package/src/functions/push/providers.js +0 -6
- package/src/functions/reset/index.js +0 -0
- package/src/functions/reset/reset.js +0 -163
- package/src/functions/start/bootstrapLayoutComponent.js +0 -57
- package/src/functions/start/bootstrapPageComponent.js +0 -54
- package/src/functions/start/buildFile.js +0 -97
- package/src/functions/start/buildFiles.js +0 -101
- package/src/functions/start/buildPlugins.js +0 -215
- package/src/functions/start/checkIfPortAvailable.js +0 -21
- package/src/functions/start/cleanup/index.js +0 -23
- package/src/functions/start/databases/mongodb/availableQueryParameters.js +0 -39
- package/src/functions/start/databases/mongodb/buildConnectionString.js +0 -28
- package/src/functions/start/databases/mongodb/buildQueryParameters.js +0 -15
- package/src/functions/start/databases/mongodb/checkConnection.js +0 -36
- package/src/functions/start/databases/mongodb/connect.js +0 -25
- package/src/functions/start/databases/mongodb/index.js +0 -108
- package/src/functions/start/databases/postgresql/checkConnection.js +0 -43
- package/src/functions/start/databases/postgresql/connect.js +0 -27
- package/src/functions/start/databases/postgresql/index.js +0 -127
- package/src/functions/start/databases/redis.js +0 -0
- package/src/functions/start/databases/startProvider.js +0 -15
- package/src/functions/start/fileDependencyMapper.js +0 -24
- package/src/functions/start/generateId.js +0 -73
- package/src/functions/start/getCodependenciesForFile.js +0 -84
- package/src/functions/start/getFilesToBuild.js +0 -49
- package/src/functions/start/getProcessIdFromPort.js +0 -92
- package/src/functions/start/hmrServer.js +0 -78
- package/src/functions/start/index.js +0 -698
- package/src/functions/start/isWindows.js +0 -3
- package/src/functions/start/minifyFile.js +0 -10
- package/src/functions/start/onWarn.js +0 -68
- package/src/functions/start/readFileDependencyMap.js +0 -19
- package/src/functions/start/removeDeletedDependenciesFromMap.js +0 -19
- package/src/functions/start/setComponentId.js +0 -58
- package/src/functions/start/updateFileMap.js +0 -100
- package/src/functions/test/index.js +0 -34
- package/src/functions/update/index.js +0 -20
- package/src/functions/use/index.js +0 -62
- package/src/lib/build/browserPathExclusions.js +0 -5
- package/src/lib/build/browserPaths.js +0 -9
- package/src/lib/build/buildFile.js +0 -91
- package/src/lib/build/buildFiles.js +0 -205
- package/src/lib/build/buildPlugins.js +0 -215
- package/src/lib/build/getCodeFrame.js +0 -8
- package/src/lib/build/minifyFile.js +0 -10
- package/src/lib/build/nodePathExclusions.js +0 -5
- package/src/lib/build/nodePaths.js +0 -9
- package/src/lib/build/onWarn.js +0 -68
- package/src/lib/build/removeDeletedDependenciesFromMap.js +0 -19
- package/src/lib/build/setComponentId.js +0 -58
- package/src/lib/build/updateFileMap.js +0 -100
- package/src/lib/buildResolvePlugin.js +0 -32
- package/src/lib/checkIfValidJSON.js +0 -8
- package/src/lib/colorLog.js +0 -5
- package/src/lib/dev/cleanup.js +0 -34
- package/src/lib/dev/databases/mongodb/buildConnectionString.js +0 -28
- package/src/lib/dev/databases/mongodb/buildQueryParameters.js +0 -15
- package/src/lib/dev/databases/mongodb/checkConnection.js +0 -40
- package/src/lib/dev/databases/mongodb/connect.js +0 -25
- package/src/lib/dev/databases/mongodb/index.js +0 -108
- package/src/lib/dev/databases/postgresql/checkConnection.js +0 -43
- package/src/lib/dev/databases/postgresql/connect.js +0 -27
- package/src/lib/dev/databases/postgresql/index.js +0 -127
- package/src/lib/dev/databases/providerMap.js +0 -13
- package/src/lib/dev/getCodependenciesForFile.js +0 -84
- package/src/lib/dev/getFilesToBuild.js +0 -47
- package/src/lib/dev/index.js +0 -479
- package/src/lib/dev/isWindows.js +0 -3
- package/src/lib/dev/loadSettings.js +0 -92
- package/src/lib/dev/readFileDependencyMap.js +0 -19
- package/src/lib/dev/runBuild.js +0 -33
- package/src/lib/dev/runTests.js +0 -33
- package/src/lib/dev/startApp.js +0 -33
- package/src/lib/dev/startDatabases.js +0 -125
- package/src/lib/dev/startHMR.js +0 -33
- package/src/lib/dev/updateFileMap.js +0 -100
- package/src/lib/dev/validateProject.js +0 -0
- package/src/lib/dev/watchlist.js +0 -13
- package/src/lib/filesToCopy.js +0 -15
- package/src/lib/generateId.js +0 -73
- package/src/lib/getArgs.js +0 -14
- package/src/lib/getOptions.js +0 -12
- package/src/lib/getProcessIdFromPort.js +0 -92
- package/src/lib/getProvider.js +0 -5
- package/src/lib/help.js +0 -56
- package/src/lib/isObject.js +0 -3
- package/src/lib/isValidJSONString.js +0 -8
- package/src/lib/killProcesses.js +0 -5
- package/src/lib/loadSettings.js +0 -40
- package/src/lib/masterIgnoreList.js +0 -13
- package/src/lib/nodeEnvironment.js +0 -6
- package/src/lib/nodeEnvironments.js +0 -8
- package/src/lib/parseCookiesFromLogin.js +0 -21
- package/src/lib/readDirectorySync.js +0 -13
- package/src/lib/regexes.js +0 -7
- package/src/lib/replaceBackslashesWithForwardSlashes.js +0 -8
- package/src/lib/replaceFileProtocol.js +0 -8
- package/src/lib/serializeQueryParameters.js +0 -5
- package/src/lib/settings.js +0 -1
- package/src/lib/validateDatabasesFromSettings.js +0 -37
- package/src/lib/wait.js +0 -5
- package/storage/.verdaccio-db.json +0 -1
- /package/{src/lib → .build}/getPlatformSafePath.js +0 -0
- /package/{src/lib → .build}/isWindows.js +0 -0
- /package/dist/{functions/create/templates → commands/create/template}/public/service-worker.js +0 -0
- /package/dist/{functions/create/templates → commands/create/template}/settings.development.json +0 -0
- /package/src/{functions/create/templates → commands/create/template}/public/service-worker.js +0 -0
- /package/src/{functions/create/templates → commands/create/template}/settings.development.json +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import _ from"ascii-table";import e from"chalk";const s=(r,[l="",o=[]])=>{r.addRow(`${e.magenta(l)}
|
|
2
|
+
`);for(let t=0;t<o?.length;t+=1){const n=o[t];r.addRow(`${e.yellow(n?.provider)} (${e.green(n?.region)})`,`${e.white(n?.size)} $${e.green(n?.pricePerMonth)}/mo. x${e.blue(n?.quantity)} ${e.white("=")} $${e.green(n?.quantity*n?.pricePerMonth)}/mo.${t+1===o?.length?`
|
|
3
|
+
`:""}`)}},d=(r=[])=>Object.values(r)?.flatMap(o=>o)?.reduce((o=0,t={})=>(o+=t?.pricePerMonth*t?.quantity,o),0),h=(r={})=>{const l=d(r?.load_balancer),o=d(r?.app),t=l+o,n=new _;n.removeBorder(),n.addRow(`${e.blue("Load Balancer")}
|
|
4
|
+
`);const i=Object.entries(r?.load_balancer),c=Object.entries(r?.app);for(let a=0;a<i?.length;a+=1)s(n,i[a]);n.addRow(`
|
|
5
|
+
${e.blue("App")}
|
|
6
|
+
`);for(let a=0;a<c?.length;a+=1)s(n,c[a]);n.addRow(e.white(`
|
|
7
|
+
---
|
|
8
|
+
`)),n.addRow(e.green("Monthly Cost"),e.white(`$${e.green(t)}/mo.`)),n.addRow(e.green("Annual Cost"),e.white(`$${e.green(t*12)}/yr.`));const p=t>100;return[{name:"confirm_deployment",type:"confirm",prefix:"",message:`
|
|
9
|
+
${e.greenBright(">")} Start deployment and provision these instances?`,suffix:`
|
|
10
|
+
|
|
11
|
+
${n.toString()}
|
|
12
|
+
${p?`
|
|
13
|
+
|
|
14
|
+
${e.yellowBright(`!!! >>> These costs are ${e.magenta("high")}. Be absolutely ${e.magenta("CERTAIN")} you want to run this deployment. <<< !!!`)}
|
|
15
|
+
|
|
16
|
+
`:`
|
|
17
|
+
`}`}]};var g=h;export{g as default};
|
|
18
|
+
//# sourceMappingURL=confirm_deployment.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/commands/push_old/prompts/confirm_deployment.js"],
|
|
4
|
+
"sourcesContent": ["import AsciiTable from 'ascii-table';\nimport chalk from 'chalk';\n\nconst render_instance_row = (table, [continent_name = '', continent_instances = []]) => {\n\ttable.addRow(`${chalk.magenta(continent_name)}\\n`);\n\n\tfor (let i = 0; i < continent_instances?.length; i += 1) {\n\t\tconst instance = continent_instances[i];\n\t\ttable.addRow(\n\t\t\t`${chalk.yellow(instance?.provider)} (${chalk.green(instance?.region)})`,\n\t\t\t`${chalk.white(instance?.size)} $${chalk.green(instance?.pricePerMonth)}/mo. x${chalk.blue(instance?.quantity)} ${chalk.white('=')} $${chalk.green((instance?.quantity * instance?.pricePerMonth))}/mo.${i + 1 === continent_instances?.length ? '\\n' : ''}`,\n\t\t);\n\t}\n};\n\nconst get_total_monthly_cost_for_instances = (instances = []) => {\n\tconst instances_by_continent = Object.values(instances)?.flatMap((instances_for_continent) => instances_for_continent);\n\treturn instances_by_continent?.reduce((total = 0, instance = {}) => {\n\t\ttotal += instance?.pricePerMonth * instance?.quantity;\n\t\treturn total;\n\t}, 0);\n};\n\nconst confirm_deployment = (instances = {}) => {\n\tconst load_balancer_total_per_month = get_total_monthly_cost_for_instances(instances?.load_balancer);\n\tconst app_total_per_month = get_total_monthly_cost_for_instances(instances?.app);\n\tconst total_monthly_cost = load_balancer_total_per_month + app_total_per_month;\n\n\tconst table = new AsciiTable();\n\n\ttable.removeBorder();\n\ttable.addRow(`${chalk.blue('Load Balancer')}\\n`);\n\n\tconst load_balancer_continents = Object.entries(instances?.load_balancer);\n\tconst app_continents = Object.entries(instances?.app);\n\n\tfor (let i = 0; i < load_balancer_continents?.length; i += 1) {\n\t\trender_instance_row(table, load_balancer_continents[i]);\n\t}\n\n\ttable.addRow(`\\n ${chalk.blue('App')}\\n`);\n\n\tfor (let i = 0; i < app_continents?.length; i += 1) {\n\t\trender_instance_row(table, app_continents[i]);\n\t}\n\t\n\ttable.addRow(chalk.white('\\n ---\\n'));\n\t\n\ttable.addRow(\n\t\tchalk.green('Monthly Cost'),\n\t\tchalk.white(`$${chalk.green(total_monthly_cost)}/mo.`)\n\t);\n\n\ttable.addRow(\n\t\tchalk.green('Annual Cost'),\n\t\tchalk.white(`$${chalk.green(total_monthly_cost * 12)}/yr.`)\n\t);\n\n\tconst is_abnormal = total_monthly_cost > 100;\n\n\treturn [{\n\t name: 'confirm_deployment',\n\t type: 'confirm',\n\t prefix: '',\n\t message: `\\n ${chalk.greenBright('>')} Start deployment and provision these instances?`,\n\t suffix: `\n\t \\n${table.toString()}\n\t ${is_abnormal ? `\\n\\n ${chalk.yellowBright(`!!! >>> These costs are ${chalk.magenta('high')}. Be absolutely ${chalk.magenta('CERTAIN')} you want to run this deployment. <<< !!!`)}\n\t \\n ` : '\\n'}`,\n\t}];\n};\n\nexport default confirm_deployment;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAgB,cACvB,OAAOC,MAAW,QAElB,MAAMC,EAAsB,CAACC,EAAO,CAACC,EAAiB,GAAIC,EAAsB,CAAC,CAAC,IAAM,CACvFF,EAAM,OAAO,GAAGF,EAAM,QAAQG,CAAc,CAAC;AAAA,CAAI,EAEjD,QAASE,EAAI,EAAGA,EAAID,GAAqB,OAAQC,GAAK,EAAG,CACxD,MAAMC,EAAWF,EAAoBC,CAAC,EACtCH,EAAM,OACL,GAAGF,EAAM,OAAOM,GAAU,QAAQ,CAAC,KAAKN,EAAM,MAAMM,GAAU,MAAM,CAAC,IACrE,GAAGN,EAAM,MAAMM,GAAU,IAAI,CAAC,MAAMN,EAAM,MAAMM,GAAU,aAAa,CAAC,UAAUN,EAAM,KAAKM,GAAU,QAAQ,CAAC,KAAKN,EAAM,MAAM,GAAG,CAAC,MAAMA,EAAM,MAAOM,GAAU,SAAWA,GAAU,aAAc,CAAC,OAAOD,EAAI,IAAMD,GAAqB,OAAS;AAAA,EAAO,EAAE,EAC/P,CACD,CACD,EAEMG,EAAuC,CAACC,EAAY,CAAC,IAC3B,OAAO,OAAOA,CAAS,GAAG,QAASC,GAA4BA,CAAuB,GACtF,OAAO,CAACC,EAAQ,EAAGJ,EAAW,CAAC,KAC7DI,GAASJ,GAAU,cAAgBA,GAAU,SACtCI,GACL,CAAC,EAGCC,EAAqB,CAACH,EAAY,CAAC,IAAM,CAC9C,MAAMI,EAAgCL,EAAqCC,GAAW,aAAa,EAC7FK,EAAsBN,EAAqCC,GAAW,GAAG,EACzEM,EAAqBF,EAAgCC,EAErDX,EAAQ,IAAIH,EAElBG,EAAM,aAAa,EACnBA,EAAM,OAAO,GAAGF,EAAM,KAAK,eAAe,CAAC;AAAA,CAAI,EAE/C,MAAMe,EAA2B,OAAO,QAAQP,GAAW,aAAa,EAClEQ,EAAiB,OAAO,QAAQR,GAAW,GAAG,EAEpD,QAASH,EAAI,EAAGA,EAAIU,GAA0B,OAAQV,GAAK,EAC1DJ,EAAoBC,EAAOa,EAAyBV,CAAC,CAAC,EAGvDH,EAAM,OAAO;AAAA,IAAOF,EAAM,KAAK,KAAK,CAAC;AAAA,CAAI,EAEzC,QAASK,EAAI,EAAGA,EAAIW,GAAgB,OAAQX,GAAK,EAChDJ,EAAoBC,EAAOc,EAAeX,CAAC,CAAC,EAG7CH,EAAM,OAAOF,EAAM,MAAM;AAAA;AAAA,CAAW,CAAC,EAErCE,EAAM,OACLF,EAAM,MAAM,cAAc,EAC1BA,EAAM,MAAM,IAAIA,EAAM,MAAMc,CAAkB,CAAC,MAAM,CACtD,EAEAZ,EAAM,OACLF,EAAM,MAAM,aAAa,EACzBA,EAAM,MAAM,IAAIA,EAAM,MAAMc,EAAqB,EAAE,CAAC,MAAM,CAC3D,EAEA,MAAMG,EAAcH,EAAqB,IAEzC,MAAO,CAAC,CACN,KAAM,qBACN,KAAM,UACN,OAAQ,GACR,QAAS;AAAA,GAAMd,EAAM,YAAY,GAAG,CAAC,mDACrC,OAAQ;AAAA;AAAA,EACJE,EAAM,SAAS,CAAC;AAAA,KAClBe,EAAc;AAAA;AAAA,IAASjB,EAAM,aAAa,2BAA2BA,EAAM,QAAQ,MAAM,CAAC,mBAAmBA,EAAM,QAAQ,SAAS,CAAC,2CAA2C,CAAC;AAAA;AAAA,GAC5K;AAAA,CAAI,EACb,CAAC,CACF,EAEA,IAAOkB,EAAQP",
|
|
6
|
+
"names": ["AsciiTable", "chalk", "render_instance_row", "table", "continent_name", "continent_instances", "i", "instance", "get_total_monthly_cost_for_instances", "instances", "instances_for_continent", "total", "confirm_deployment", "load_balancer_total_per_month", "app_total_per_month", "total_monthly_cost", "load_balancer_continents", "app_continents", "is_abnormal", "confirm_deployment_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import e from"chalk";const o=()=>[{name:"session_token",type:"text",prefix:"",message:`
|
|
2
|
+
${e.yellowBright(">")} To login to Push, paste your session token below:
|
|
3
|
+
`,suffix:` ${e.yellowBright("Find your session token here:")} https://push.cheatcode.co/account/profile
|
|
4
|
+
|
|
5
|
+
`}];var t=o;export{t as default};
|
|
6
|
+
//# sourceMappingURL=session_token.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/commands/push_old/prompts/session_token.js"],
|
|
4
|
+
"sourcesContent": ["import chalk from 'chalk';\n\nconst session_token = () => [{\n name: 'session_token',\n type: 'text',\n prefix: '',\n message: `\\n${chalk.yellowBright('>')} To login to Push, paste your session token below:\\n`,\n suffix: ` ${chalk.yellowBright('Find your session token here:')} https://push.cheatcode.co/account/profile\\n\\n`,\n}];\n\nexport default session_token;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAW,QAElB,MAAMC,EAAgB,IAAM,CAAC,CAC3B,KAAM,gBACN,KAAM,OACN,OAAQ,GACR,QAAS;AAAA,EAAKD,EAAM,aAAa,GAAG,CAAC;AAAA,EACrC,OAAQ,KAAKA,EAAM,aAAa,+BAA+B,CAAC;AAAA;AAAA,CAClE,CAAC,EAED,IAAOE,EAAQD",
|
|
6
|
+
"names": ["chalk", "session_token", "session_token_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import n from"node-fetch";import i from"form-data";import d from"fs";import m from"lodash";import c from"./cdn_mirrors.js";const{readFile:l}=d.promises,p=async()=>{const a=(await Promise.allSettled(c?.map(async t=>{const o=new AbortController;setTimeout(()=>o.abort(),2e3);const e=await n(`${t}/api/ping`,{signal:o.signal}).catch(r=>({status:503}));return{mirror:t,status:e.status}})))?.map(t=>t.value);return m.orderBy(a,["status","mirror"])[0]},u=async(a="",t={},o="")=>{const e=await p(),r=new i;return r.append("version_tar",await l(".build/build.encrypted.tar.gz"),`${a}.tar.gz`),r.append("build_timestamp",a),r.append("domain",t?.domain),r.append("deployment_id",t?._id),n(`${e?.mirror}/api/versions`,{method:"POST",headers:{...r.getHeaders(),"x-push-session-token":o},body:r}).then(async s=>(await s.json())?.data).catch(s=>{console.warn(s)})};var y=u;export{y as default};
|
|
2
|
+
//# sourceMappingURL=upload_build_to_cdn.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/commands/push_old/upload_build_to_cdn.js"],
|
|
4
|
+
"sourcesContent": ["import fetch from \"node-fetch\";\nimport FormData from \"form-data\";\nimport fs from \"fs\";\nimport _ from 'lodash';\nimport cdn_mirrors from './cdn_mirrors.js';\n\nconst { readFile } = fs.promises;\n\nconst get_first_available_mirror = async () => {\n const results = (await Promise.allSettled(cdn_mirrors?.map(async (mirror) => {\n const controller = new AbortController();\n setTimeout(() => controller.abort(), 2000);\n \n const result = await fetch(`${mirror}/api/ping`, { signal: controller.signal }).catch((error) => {\n return { status: 503 };\n });\n\n return {\n mirror,\n status: result.status,\n };\n })))?.map((result) => {\n return result.value;\n });\n\n return _.orderBy(results, ['status', 'mirror'])[0];\n};\n\nconst upload_build_to_cdn = async (build_timestamp = '', deployment = {}, session_token = '') => {\n const first_available_mirror = await get_first_available_mirror();\n const form_data = new FormData();\n\n form_data.append(\n \"version_tar\",\n await readFile(`.build/build.encrypted.tar.gz`),\n `${build_timestamp}.tar.gz`\n );\n\n form_data.append(\"build_timestamp\", build_timestamp);\n form_data.append(\"domain\", deployment?.domain);\n form_data.append(\"deployment_id\", deployment?._id);\n\n return fetch(`${first_available_mirror?.mirror}/api/versions`, {\n method: \"POST\",\n headers: {\n ...form_data.getHeaders(),\n \"x-push-session-token\": session_token,\n },\n body: form_data,\n }).then(async (response) => {\n const data = await response.json();\n return data?.data;\n }).catch((error) => {\n console.warn(error);\n });\n};\n\nexport default upload_build_to_cdn;\n\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAW,aAClB,OAAOC,MAAc,YACrB,OAAOC,MAAQ,KACf,OAAOC,MAAO,SACd,OAAOC,MAAiB,mBAExB,KAAM,CAAE,SAAAC,CAAS,EAAIH,EAAG,SAElBI,EAA6B,SAAY,CAC7C,MAAMC,GAAW,MAAM,QAAQ,WAAWH,GAAa,IAAI,MAAOI,GAAW,CAC3E,MAAMC,EAAa,IAAI,gBACvB,WAAW,IAAMA,EAAW,MAAM,EAAG,GAAI,EAEzC,MAAMC,EAAS,MAAMV,EAAM,GAAGQ,CAAM,YAAa,CAAE,OAAQC,EAAW,MAAO,CAAC,EAAE,MAAOE,IAC9E,CAAE,OAAQ,GAAI,EACtB,EAED,MAAO,CACL,OAAAH,EACA,OAAQE,EAAO,MACjB,CACF,CAAC,CAAC,IAAI,IAAKA,GACFA,EAAO,KACf,EAED,OAAOP,EAAE,QAAQI,EAAS,CAAC,SAAU,QAAQ,CAAC,EAAE,CAAC,CACnD,EAEMK,EAAsB,MAAOC,EAAkB,GAAIC,EAAa,CAAC,EAAGC,EAAgB,KAAO,CAC/F,MAAMC,EAAyB,MAAMV,EAA2B,EAC1DW,EAAY,IAAIhB,EAEtB,OAAAgB,EAAU,OACR,cACA,MAAMZ,EAAS,+BAA+B,EAC9C,GAAGQ,CAAe,SACpB,EAEAI,EAAU,OAAO,kBAAmBJ,CAAe,EACnDI,EAAU,OAAO,SAAUH,GAAY,MAAM,EAC7CG,EAAU,OAAO,gBAAiBH,GAAY,GAAG,EAE1Cd,EAAM,GAAGgB,GAAwB,MAAM,gBAAiB,CAC9D,OAAQ,OACR,QAAS,CACP,GAAGC,EAAU,WAAW,EACxB,uBAAwBF,CAC1B,EACA,KAAME,CACP,CAAC,EAAE,KAAK,MAAOC,IACD,MAAMA,EAAS,KAAK,IACpB,IACb,EAAE,MAAOP,GAAU,CAClB,QAAQ,KAAKA,CAAK,CACpB,CAAC,CACH,EAEA,IAAOQ,EAAQP",
|
|
6
|
+
"names": ["fetch", "FormData", "fs", "_", "cdn_mirrors", "readFile", "get_first_available_mirror", "results", "mirror", "controller", "result", "error", "upload_build_to_cdn", "build_timestamp", "deployment", "session_token", "first_available_mirror", "form_data", "response", "upload_build_to_cdn_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import n from"node-fetch";const t=(a={})=>n(`${a?.push_provision_domain}/api/deployments/${a?.push_config?.domain}/validate`,{method:"POST",headers:{"Content-Type":"application/json","x-push-session-token":a?.session_token},body:JSON.stringify(a?.push_config)})?.then(async e=>(await e.json())?.data).catch(e=>{console.warn(e)});var i=t;export{i as default};
|
|
2
|
+
//# sourceMappingURL=validate_deployment.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/commands/push_old/validate_deployment.js"],
|
|
4
|
+
"sourcesContent": ["import fetch from 'node-fetch';\n\nconst validate_deployment = (options = {}) => {\n\treturn fetch(`${options?.push_provision_domain}/api/deployments/${options?.push_config?.domain}/validate`, {\n\t\tmethod: 'POST',\n\t\theaders: {\n\t\t\t'Content-Type': 'application/json',\n\t\t\t'x-push-session-token': options?.session_token,\n\t\t},\n\t\tbody: JSON.stringify(options?.push_config),\n\t})?.then(async (response) => {\n\t\tconst data = await response.json();\n\t\treturn data?.data;\n\t}).catch((error) => {\n\t\tconsole.warn(error);\n\t});\n};\n\nexport default validate_deployment;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAW,aAElB,MAAMC,EAAsB,CAACC,EAAU,CAAC,IAChCF,EAAM,GAAGE,GAAS,qBAAqB,oBAAoBA,GAAS,aAAa,MAAM,YAAa,CAC1G,OAAQ,OACR,QAAS,CACR,eAAgB,mBAChB,uBAAwBA,GAAS,aAClC,EACA,KAAM,KAAK,UAAUA,GAAS,WAAW,CAC1C,CAAC,GAAG,KAAK,MAAOC,IACF,MAAMA,EAAS,KAAK,IACpB,IACb,EAAE,MAAOC,GAAU,CACnB,QAAQ,KAAKA,CAAK,CACnB,CAAC,EAGF,IAAOC,EAAQJ",
|
|
6
|
+
"names": ["fetch", "validate_deployment", "options", "response", "error", "validate_deployment_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import n from"node-fetch";const o=(t={})=>n(`${t?.push_provision_domain}/api/validate/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t?.push_config)})?.then(async a=>(await a.json())?.data).catch(a=>{console.warn(a)});var c=o;export{c as default};
|
|
2
|
+
//# sourceMappingURL=validate_push_config.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/commands/push_old/validate_push_config.js"],
|
|
4
|
+
"sourcesContent": ["import fetch from 'node-fetch';\n\nconst validate_push_config = (options = {}) => {\n\treturn fetch(`${options?.push_provision_domain}/api/validate/config`, {\n\t\tmethod: 'POST',\n\t\theaders: {\n\t\t\t'Content-Type': 'application/json',\n\t\t},\n\t\tbody: JSON.stringify(options?.push_config),\n\t})?.then(async (response) => {\n\t\tconst data = await response.json();\n\t\treturn data?.data;\n\t}).catch((error) => {\n\t\tconsole.warn(error);\n\t});\n};\n\nexport default validate_push_config;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAW,aAElB,MAAMC,EAAuB,CAACC,EAAU,CAAC,IACjCF,EAAM,GAAGE,GAAS,qBAAqB,uBAAwB,CACrE,OAAQ,OACR,QAAS,CACR,eAAgB,kBACjB,EACA,KAAM,KAAK,UAAUA,GAAS,WAAW,CAC1C,CAAC,GAAG,KAAK,MAAOC,IACF,MAAMA,EAAS,KAAK,IACpB,IACb,EAAE,MAAOC,GAAU,CACnB,QAAQ,KAAKA,CAAK,CACnB,CAAC,EAGF,IAAOC,EAAQJ",
|
|
6
|
+
"names": ["fetch", "validate_push_config", "options", "response", "error", "validate_push_config_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import i from"./index.js";const[p,a,...e]=process.argv,t=!!e.includes("-i")&&e[e.indexOf("-i")+1]||!!e.includes("--imports")&&e[e.indexOf("--imports")+1],n=t?t.split(",").map(s=>s.trim()):[],r={description:"Start an existing Joystick app.",args:{},options:{environment:{flags:{"-e":{set:!!e.includes("-e"),value:!!e.includes("-e")&&e[e.indexOf("-e")+1],parent:"start"},"--environment":{set:!!e.includes("--environment"),value:!!e.includes("--environment")&&e[e.indexOf("--environment")+1],parent:"start"}},description:"Environment to set for process.env.NODE_ENV."},port:{flags:{"-p":{set:!!e.includes("-p"),value:!!e.includes("-p")&&parseInt(e[e.indexOf("-p")+1],10),parent:"start"},"--port":{set:!!e.includes("--port"),value:!!e.includes("--port")&&parseInt(e[e.indexOf("--port")+1],10),parent:"start"}},description:"Port number to run the app on."},debug:{flags:{"-d":{set:!!e.includes("-d"),value:!!e.includes("-d"),parent:"start"},"--debug":{set:!!e.includes("--debug"),value:!!e.includes("--debug"),parent:"start"}},description:"Run the Joystick app's Node.js process in debug mode with --inspect."},imports:{flags:{"-i":{set:t!==void 0,value:n,parent:"start"},"--imports":{set:t!==void 0,value:n,parent:"start"}},description:"Run the specified imports before starting your Joystick app's Node.js process (e.g., for APM usage)."}},command:i};var d=r;export{d as default};
|
|
2
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/commands/start/definition.js"],
|
|
4
|
+
"sourcesContent": ["import start from './index.js';\n\nconst [_node, _bin, ...raw_args] = process.argv;\n\n// NOTE: Capture imports here so we can process them before passing\n// them to the start function.\nconst raw_imports =\n !!raw_args.includes('-i') && raw_args[raw_args.indexOf('-i') + 1] ||\n !!raw_args.includes('--imports') && raw_args[raw_args.indexOf('--imports') + 1];\n\nconst imports_value = raw_imports\n ? raw_imports.split(',').map((path) => path.trim())\n : [];\n\nconst definition = {\n description: 'Start an existing Joystick app.',\n args: {},\n options: {\n environment: {\n flags: {\n '-e': {\n set: !!raw_args.includes('-e'),\n value: !!raw_args.includes('-e') && raw_args[raw_args.indexOf('-e') + 1],\n parent: 'start'\n },\n '--environment': {\n set: !!raw_args.includes('--environment'),\n value: !!raw_args.includes('--environment') && raw_args[raw_args.indexOf('--environment') + 1],\n parent: 'start'\n },\n },\n description: 'Environment to set for process.env.NODE_ENV.',\n },\n port: {\n flags: {\n '-p': {\n set: !!raw_args.includes('-p'),\n value: !!raw_args.includes('-p') && parseInt(raw_args[raw_args.indexOf('-p') + 1], 10),\n parent: 'start'\n },\n '--port': {\n set: !!raw_args.includes('--port'),\n value: !!raw_args.includes('--port') && parseInt(raw_args[raw_args.indexOf('--port') + 1], 10),\n parent: 'start'\n },\n },\n description: 'Port number to run the app on.',\n },\n debug: {\n flags: {\n '-d': {\n set: !!raw_args.includes('-d'),\n value: !!raw_args.includes('-d'),\n parent: 'start'\n },\n '--debug': {\n set: !!raw_args.includes('--debug'),\n value: !!raw_args.includes('--debug'),\n parent: 'start'\n },\n },\n description: 'Run the Joystick app\\'s Node.js process in debug mode with --inspect.',\n },\n imports: {\n flags: {\n '-i': {\n set: raw_imports !== undefined,\n value: imports_value,\n parent: 'start'\n },\n '--imports': {\n set: raw_imports !== undefined,\n value: imports_value,\n parent: 'start'\n },\n },\n description: 'Run the specified imports before starting your Joystick app\\'s Node.js process (e.g., for APM usage).',\n }\n },\n command: start,\n}\n\nexport default definition;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAW,aAElB,KAAM,CAACC,EAAOC,EAAM,GAAGC,CAAQ,EAAI,QAAQ,KAIrCC,EACJ,CAAC,CAACD,EAAS,SAAS,IAAI,GAAKA,EAASA,EAAS,QAAQ,IAAI,EAAI,CAAC,GAChE,CAAC,CAACA,EAAS,SAAS,WAAW,GAAKA,EAASA,EAAS,QAAQ,WAAW,EAAI,CAAC,EAE1EE,EAAgBD,EAClBA,EAAY,MAAM,GAAG,EAAE,IAAKE,GAASA,EAAK,KAAK,CAAC,EAChD,CAAC,EAECC,EAAa,CACjB,YAAa,kCACb,KAAM,CAAC,EACP,QAAS,CACP,YAAa,CACX,MAAO,CACL,KAAM,CACJ,IAAK,CAAC,CAACJ,EAAS,SAAS,IAAI,EAC7B,MAAO,CAAC,CAACA,EAAS,SAAS,IAAI,GAAKA,EAASA,EAAS,QAAQ,IAAI,EAAI,CAAC,EACvE,OAAQ,OACV,EACA,gBAAiB,CACf,IAAK,CAAC,CAACA,EAAS,SAAS,eAAe,EACxC,MAAO,CAAC,CAACA,EAAS,SAAS,eAAe,GAAKA,EAASA,EAAS,QAAQ,eAAe,EAAI,CAAC,EAC7F,OAAQ,OACV,CACF,EACA,YAAa,8CACf,EACA,KAAM,CACJ,MAAO,CACL,KAAM,CACJ,IAAK,CAAC,CAACA,EAAS,SAAS,IAAI,EAC7B,MAAO,CAAC,CAACA,EAAS,SAAS,IAAI,GAAK,SAASA,EAASA,EAAS,QAAQ,IAAI,EAAI,CAAC,EAAG,EAAE,EACrF,OAAQ,OACV,EACA,SAAU,CACR,IAAK,CAAC,CAACA,EAAS,SAAS,QAAQ,EACjC,MAAO,CAAC,CAACA,EAAS,SAAS,QAAQ,GAAK,SAASA,EAASA,EAAS,QAAQ,QAAQ,EAAI,CAAC,EAAG,EAAE,EAC7F,OAAQ,OACV,CACF,EACA,YAAa,gCACf,EACA,MAAO,CACL,MAAO,CACL,KAAM,CACJ,IAAK,CAAC,CAACA,EAAS,SAAS,IAAI,EAC7B,MAAO,CAAC,CAACA,EAAS,SAAS,IAAI,EAC/B,OAAQ,OACV,EACA,UAAW,CACT,IAAK,CAAC,CAACA,EAAS,SAAS,SAAS,EAClC,MAAO,CAAC,CAACA,EAAS,SAAS,SAAS,EACpC,OAAQ,OACV,CACF,EACA,YAAa,sEACf,EACA,QAAS,CACP,MAAO,CACL,KAAM,CACJ,IAAKC,IAAgB,OACrB,MAAOC,EACP,OAAQ,OACV,EACA,YAAa,CACX,IAAKD,IAAgB,OACrB,MAAOC,EACP,OAAQ,OACV,CACF,EACA,YAAa,sGACf,CACF,EACA,QAASL,CACX,EAEA,IAAOQ,EAAQD",
|
|
6
|
+
"names": ["start", "_node", "_bin", "raw_args", "raw_imports", "imports_value", "path", "definition", "definition_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/commands/start/index.js"],
|
|
4
|
+
"sourcesContent": ["import development_server from \"../../lib/development_server/index.js\";\n\nconst start = async (args = {}, options = {}) => {\n await development_server({\n environment: options?.environment || 'development',\n port: options?.port || 2600,\n debug: !!options?.debug,\n imports: options?.imports || [],\n });\n};\n\nexport default start;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAwB,wCAE/B,MAAMC,EAAQ,MAAOC,EAAO,CAAC,EAAGC,EAAU,CAAC,IAAM,CAC/C,MAAMH,EAAmB,CACvB,YAAaG,GAAS,aAAe,cACrC,KAAMA,GAAS,MAAQ,KACvB,MAAO,CAAC,CAACA,GAAS,MAClB,QAASA,GAAS,SAAW,CAAC,CAChC,CAAC,CACH,EAEA,IAAOC,EAAQH",
|
|
6
|
+
"names": ["development_server", "start", "args", "options", "index_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import s from"./index.js";const[a,i,...t]=process.argv,e={description:"Start an existing Joystick app and run its tests.",args:{},options:{watch:{flags:{"-w":{set:!!t.includes("-w"),value:!!t.includes("-w"),parent:"test"},"--watch":{set:!!t.includes("--watch"),value:!!t.includes("--watch"),parent:"test"}},description:"Run joystick test in watch mode."}},command:s};var c=e;export{c as default};
|
|
2
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/commands/test/definition.js"],
|
|
4
|
+
"sourcesContent": ["import test from './index.js';\n\nconst [_node, _bin, ...raw_args] = process.argv;\n\nconst definition = {\n description: 'Start an existing Joystick app and run its tests.',\n args: {},\n options: {\n watch: {\n flags: {\n '-w': {\n set: !!raw_args.includes('-w'),\n value: !!raw_args.includes('-w'),\n parent: 'test'\n },\n '--watch': {\n set: !!raw_args.includes('--watch'),\n value: !!raw_args.includes('--watch'),\n parent: 'test'\n },\n },\n description: 'Run joystick test in watch mode.',\n },\n },\n command: test,\n};\n\nexport default definition;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAU,aAEjB,KAAM,CAACC,EAAOC,EAAM,GAAGC,CAAQ,EAAI,QAAQ,KAErCC,EAAa,CACjB,YAAa,oDACb,KAAM,CAAC,EACP,QAAS,CACP,MAAO,CACL,MAAO,CACL,KAAM,CACJ,IAAK,CAAC,CAACD,EAAS,SAAS,IAAI,EAC7B,MAAO,CAAC,CAACA,EAAS,SAAS,IAAI,EAC/B,OAAQ,MACV,EACA,UAAW,CACT,IAAK,CAAC,CAACA,EAAS,SAAS,SAAS,EAClC,MAAO,CAAC,CAACA,EAAS,SAAS,SAAS,EACpC,OAAQ,MACV,CACF,EACA,YAAa,kCACf,CACF,EACA,QAASH,CACX,EAEA,IAAOK,EAAQD",
|
|
6
|
+
"names": ["test", "_node", "_bin", "raw_args", "definition", "definition_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/commands/test/index.js"],
|
|
4
|
+
"sourcesContent": ["import development_server from \"../../lib/development_server/index.js\";\n\nconst test = async (args = {}, options = {}) => {\n await development_server({\n environment: 'test',\n process,\n port: 1977,\n watch: options?.watch,\n });\n};\n\nexport default test;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAwB,wCAE/B,MAAMC,EAAO,MAAOC,EAAO,CAAC,EAAGC,EAAU,CAAC,IAAM,CAC9C,MAAMH,EAAmB,CACvB,YAAa,OACb,QACA,KAAM,KACN,MAAOG,GAAS,KAClB,CAAC,CACH,EAEA,IAAOC,EAAQH",
|
|
6
|
+
"names": ["development_server", "test", "args", "options", "index_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import r from"./index.js";const[t,o,...e]=process.argv,a={description:"Update all Joystick packages to their latest version.",args:{},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 update (production or canary)."}},command:r};var i=a;export{i as default};
|
|
2
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/commands/update/definition.js"],
|
|
4
|
+
"sourcesContent": ["import update from './index.js';\n\nconst [_node, _bin, ...raw_args] = process.argv;\n\nconst definition = {\n description: 'Update all Joystick packages to their latest version.',\n args: {},\n options: {\n release: {\n flags: {\n '-r': {\n set: !!raw_args.includes('-r'),\n value: !!raw_args.includes('-r') && raw_args[raw_args.indexOf('-r') + 1],\n parent: 'create',\n },\n '--release': {\n set: !!raw_args.includes('--release'),\n value: !!raw_args.includes('--release') && raw_args[raw_args.indexOf('--release') + 1],\n parent: 'create',\n },\n },\n description: 'The release of Joystick to update (production or canary).',\n },\n },\n command: update,\n};\n\nexport default definition;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAY,aAEnB,KAAM,CAACC,EAAOC,EAAM,GAAGC,CAAQ,EAAI,QAAQ,KAErCC,EAAa,CACjB,YAAa,wDACb,KAAM,CAAC,EACP,QAAS,CACP,QAAS,CACP,MAAO,CACL,KAAM,CACJ,IAAK,CAAC,CAACD,EAAS,SAAS,IAAI,EAC7B,MAAO,CAAC,CAACA,EAAS,SAAS,IAAI,GAAKA,EAASA,EAAS,QAAQ,IAAI,EAAI,CAAC,EACvE,OAAQ,QACV,EACA,YAAa,CACX,IAAK,CAAC,CAACA,EAAS,SAAS,WAAW,EACpC,MAAO,CAAC,CAACA,EAAS,SAAS,WAAW,GAAKA,EAASA,EAAS,QAAQ,WAAW,EAAI,CAAC,EACrF,OAAQ,QACV,CACF,EACA,YAAa,2DACf,CACF,EACA,QAASH,CACX,EAEA,IAAOK,EAAQD",
|
|
6
|
+
"names": ["update", "_node", "_bin", "raw_args", "definition", "definition_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"chalk";import e from"child_process";import s from"util";import c from"../../lib/color_log.js";import t from"../../lib/loader.js";const r=s.promisify(e.exec),i=async(n={},a={})=>{process.loader=new t,process.loader.print("Updating Joystick dependencies..."),process.loader.print(`Updating @joystick.js/node${a?.relase==="canary"?"-canary":""}...`),await r(`npm i @joystick.js/node${a?.relase==="canary"?"-canary":""}@latest`),process.loader.print(`Updating @joystick.js/test${a?.relase==="canary"?"-canary":""}...`),await r(`npm i @joystick.js/test${a?.relase==="canary"?"-canary":""}@latest`),process.loader.print(`Updating @joystick.js/ui${a?.relase==="canary"?"-canary":""}...`),await r(`npm i @joystick.js/ui${a?.relase==="canary"?"-canary":""}@latest`),process.loader.print(`Updating @joystick.js/cli${a?.relase==="canary"?"-canary":""}...`),await r(`npm i -g @joystick.js/cli${a?.relase==="canary"?"-canary":""}@latest`),c("\u2714 Joystick updated!","green"),process.exit(0)};var m=i;export{m as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/commands/update/index.js"],
|
|
4
|
+
"sourcesContent": ["import chalk from 'chalk';\nimport child_process from \"child_process\";\nimport util from 'util';\nimport color_log from \"../../lib/color_log.js\";\nimport Loader from \"../../lib/loader.js\";\n\nconst exec = util.promisify(child_process.exec);\n\nconst update = async (args = {}, options = {}) => {\n\tprocess.loader = new Loader();\n process.loader.print('Updating Joystick dependencies...');\n\n process.loader.print(`Updating @joystick.js/node${options?.relase === 'canary' ? '-canary' : ''}...`);\n await exec(`npm i @joystick.js/node${options?.relase === 'canary' ? '-canary' : ''}@latest`);\n\n process.loader.print(`Updating @joystick.js/test${options?.relase === 'canary' ? '-canary' : ''}...`);\n await exec(`npm i @joystick.js/test${options?.relase === 'canary' ? '-canary' : ''}@latest`);\n\n process.loader.print(`Updating @joystick.js/ui${options?.relase === 'canary' ? '-canary' : ''}...`);\n await exec(`npm i @joystick.js/ui${options?.relase === 'canary' ? '-canary' : ''}@latest`);\n\t\n\tprocess.loader.print(`Updating @joystick.js/cli${options?.relase === 'canary' ? '-canary' : ''}...`);\n\tawait exec(`npm i -g @joystick.js/cli${options?.relase === 'canary' ? '-canary' : ''}@latest`);\n\n color_log('\u2714 Joystick updated!', 'green');\n process.exit(0);\n};\n\nexport default update;\n"],
|
|
5
|
+
"mappings": "AAAA,MAAkB,QAClB,OAAOA,MAAmB,gBAC1B,OAAOC,MAAU,OACjB,OAAOC,MAAe,yBACtB,OAAOC,MAAY,sBAEnB,MAAMC,EAAOH,EAAK,UAAUD,EAAc,IAAI,EAExCK,EAAS,MAAOC,EAAO,CAAC,EAAGC,EAAU,CAAC,IAAM,CACjD,QAAQ,OAAS,IAAIJ,EACpB,QAAQ,OAAO,MAAM,mCAAmC,EAExD,QAAQ,OAAO,MAAM,6BAA6BI,GAAS,SAAW,SAAW,UAAY,EAAE,KAAK,EACpG,MAAMH,EAAK,0BAA0BG,GAAS,SAAW,SAAW,UAAY,EAAE,SAAS,EAE3F,QAAQ,OAAO,MAAM,6BAA6BA,GAAS,SAAW,SAAW,UAAY,EAAE,KAAK,EACpG,MAAMH,EAAK,0BAA0BG,GAAS,SAAW,SAAW,UAAY,EAAE,SAAS,EAE3F,QAAQ,OAAO,MAAM,2BAA2BA,GAAS,SAAW,SAAW,UAAY,EAAE,KAAK,EAClG,MAAMH,EAAK,wBAAwBG,GAAS,SAAW,SAAW,UAAY,EAAE,SAAS,EAE1F,QAAQ,OAAO,MAAM,4BAA4BA,GAAS,SAAW,SAAW,UAAY,EAAE,KAAK,EACnG,MAAMH,EAAK,4BAA4BG,GAAS,SAAW,SAAW,UAAY,EAAE,SAAS,EAE5FL,EAAU,2BAAuB,OAAO,EACxC,QAAQ,KAAK,CAAC,CAChB,EAEA,IAAOM,EAAQH",
|
|
6
|
+
"names": ["child_process", "util", "color_log", "Loader", "exec", "update", "args", "options", "index_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import s from"./index.js";const[r,n,...e]=process.argv,o={description:"Decides which release of Joystick to use (production or canary).",args:{release:{set:!!e.includes("use")&&!!e[e.indexOf("use")+1],parent:"use",value:!!e.includes("use")&&e[e.indexOf("use")+1],description:"The release of Joystick to use (production or canary)."}},options:{},command:s};var t=o;export{t as default};
|
|
2
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/commands/use/definition.js"],
|
|
4
|
+
"sourcesContent": ["import use from './index.js';\n\nconst [_node, _bin, ...raw_args] = process.argv;\n\nconst definition = {\n description: 'Decides which release of Joystick to use (production or canary).',\n args: {\n release: {\n set: !!raw_args.includes('use') && !!raw_args[raw_args.indexOf('use') + 1],\n parent: 'use',\n value: !!raw_args.includes('use') && raw_args[raw_args.indexOf('use') + 1],\n description: 'The release of Joystick to use (production or canary).',\n },\n },\n options: {},\n command: use\n};\n\nexport default definition;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAS,aAEhB,KAAM,CAACC,EAAOC,EAAM,GAAGC,CAAQ,EAAI,QAAQ,KAErCC,EAAa,CACjB,YAAa,mEACb,KAAM,CACJ,QAAS,CACP,IAAK,CAAC,CAACD,EAAS,SAAS,KAAK,GAAK,CAAC,CAACA,EAASA,EAAS,QAAQ,KAAK,EAAI,CAAC,EACzE,OAAQ,MACR,MAAO,CAAC,CAACA,EAAS,SAAS,KAAK,GAAKA,EAASA,EAAS,QAAQ,KAAK,EAAI,CAAC,EACzE,YAAa,wDACf,CACF,EACA,QAAS,CAAC,EACV,QAASH,CACX,EAEA,IAAOK,EAAQD",
|
|
6
|
+
"names": ["use", "_node", "_bin", "raw_args", "definition", "definition_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import c from"child_process";import o from"util";import n from"../../lib/loader.js";import e from"../../lib/replace_in_files.js";const s=o.promisify(c.exec),t=async(a={},r={})=>{const i=new n;a?.release==="canary"&&(await e(process.cwd(),{match:[/\.js$/],exclude:[/node_modules/],replace_regex:/(@joystick\.js\/node)(?!-)/g,replace_with:"@joystick.js/node-canary"}),await e(process.cwd(),{match:[/\.js$/],exclude:[/node_modules/],replace_regex:/(@joystick\.js\/ui)(?!-)/g,replace_with:"@joystick.js/ui-canary"}),i.print("Swapping production packages for canary versions..."),await s("npm uninstall @joystick.js/node && npm i @joystick.js/node-canary"),await s("npm uninstall @joystick.js/ui && npm i @joystick.js/ui-canary")),a?.release==="production"&&(await e(process.cwd(),{match:[/\.js$/],exclude:[/node_modules/],replace_regex:/(@joystick\.js\/node-canary)/g,replace_with:"@joystick.js/node"}),await e(process.cwd(),{match:[/\.js$/],exclude:[/node_modules/],replace_regex:/(@joystick.js\/ui-canary)/g,replace_with:"@joystick.js/ui"}),i.print("Swapping canary packages for production versions..."),await s("npm uninstall @joystick.js/node-canary && npm i @joystick.js/node"),await s("npm uninstall @joystick.js/ui-canary && npm i @joystick.js/ui"))};var y=t;export{y as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/commands/use/index.js"],
|
|
4
|
+
"sourcesContent": ["import child_process from \"child_process\";\nimport util from 'util';\nimport Loader from '../../lib/loader.js';\nimport replace_in_files from '../../lib/replace_in_files.js';\n\nconst exec = util.promisify(child_process.exec);\n\nconst use = async (args = {}, options = {}) => {\n const loader = new Loader();\n\n if (args?.release === 'canary') {\n await replace_in_files(process.cwd(), {\n match: [/\\.js$/],\n exclude: [/node_modules/],\n replace_regex: /(@joystick\\.js\\/node)(?!-)/g,\n replace_with: '@joystick.js/node-canary',\n });\n\n await replace_in_files(process.cwd(), {\n match: [/\\.js$/],\n exclude: [/node_modules/],\n replace_regex: /(@joystick\\.js\\/ui)(?!-)/g,\n replace_with: '@joystick.js/ui-canary',\n });\n \n loader.print('Swapping production packages for canary versions...');\n \n await exec('npm uninstall @joystick.js/node && npm i @joystick.js/node-canary');\n await exec('npm uninstall @joystick.js/ui && npm i @joystick.js/ui-canary');\n }\n \n if (args?.release === 'production') {\n await replace_in_files(process.cwd(), {\n match: [/\\.js$/],\n exclude: [/node_modules/],\n replace_regex: /(@joystick\\.js\\/node-canary)/g,\n replace_with: '@joystick.js/node',\n });\n\n await replace_in_files(process.cwd(), {\n match: [/\\.js$/],\n exclude: [/node_modules/],\n replace_regex: /(@joystick.js\\/ui-canary)/g,\n replace_with: '@joystick.js/ui',\n });\n \n loader.print('Swapping canary packages for production versions...');\n \n await exec('npm uninstall @joystick.js/node-canary && npm i @joystick.js/node');\n await exec('npm uninstall @joystick.js/ui-canary && npm i @joystick.js/ui');\n }\n};\n\nexport default use;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAmB,gBAC1B,OAAOC,MAAU,OACjB,OAAOC,MAAY,sBACnB,OAAOC,MAAsB,gCAE7B,MAAMC,EAAOH,EAAK,UAAUD,EAAc,IAAI,EAExCK,EAAM,MAAOC,EAAO,CAAC,EAAGC,EAAU,CAAC,IAAM,CAC7C,MAAMC,EAAS,IAAIN,EAEfI,GAAM,UAAY,WACpB,MAAMH,EAAiB,QAAQ,IAAI,EAAG,CACpC,MAAO,CAAC,OAAO,EACf,QAAS,CAAC,cAAc,EACxB,cAAe,8BACf,aAAc,0BAChB,CAAC,EAED,MAAMA,EAAiB,QAAQ,IAAI,EAAG,CACpC,MAAO,CAAC,OAAO,EACf,QAAS,CAAC,cAAc,EACxB,cAAe,4BACf,aAAc,wBAChB,CAAC,EAEDK,EAAO,MAAM,qDAAqD,EAElE,MAAMJ,EAAK,mEAAmE,EAC9E,MAAMA,EAAK,+DAA+D,GAGxEE,GAAM,UAAY,eACpB,MAAMH,EAAiB,QAAQ,IAAI,EAAG,CACpC,MAAO,CAAC,OAAO,EACf,QAAS,CAAC,cAAc,EACxB,cAAe,gCACf,aAAc,mBAChB,CAAC,EAED,MAAMA,EAAiB,QAAQ,IAAI,EAAG,CACpC,MAAO,CAAC,OAAO,EACf,QAAS,CAAC,cAAc,EACxB,cAAe,6BACf,aAAc,iBAChB,CAAC,EAEDK,EAAO,MAAM,qDAAqD,EAElE,MAAMJ,EAAK,mEAAmE,EAC9E,MAAMA,EAAK,+DAA+D,EAE9E,EAEA,IAAOK,EAAQJ",
|
|
6
|
+
"names": ["child_process", "util", "Loader", "replace_in_files", "exec", "use", "args", "options", "loader", "index_default"]
|
|
7
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { dirname } from "path";
|
|
5
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = dirname(__filename);
|
|
7
|
-
const args = process.argv.slice(2, process.argv.length);
|
|
8
|
-
spawn("node", ["--no-warnings", `${__dirname}/cli.js`, ...args], { stdio: "inherit" });
|
|
2
|
+
import{spawn as r}from"child_process";import{fileURLToPath as o}from"url";import{dirname as n}from"path";const i=o(import.meta.url),e=n(i),s=process.argv.slice(2,process.argv.length);r("node",["--no-warnings",`${e}/cli.js`,...s],{stdio:"inherit"});
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.js"],
|
|
4
|
+
"sourcesContent": ["#!/usr/bin/env node\n\nimport { spawn } from 'child_process';\nimport { fileURLToPath } from 'url';\nimport { dirname } from 'path';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n// NOTE: Capture args passed to command line to forward to spawned script.\nconst args = process.argv.slice(2, process.argv.length);\n\nspawn('node', ['--no-warnings', `${__dirname}/cli.js`, ...args], { stdio: 'inherit' });"],
|
|
5
|
+
"mappings": ";AAEA,OAAS,SAAAA,MAAa,gBACtB,OAAS,iBAAAC,MAAqB,MAC9B,OAAS,WAAAC,MAAe,OAExB,MAAMC,EAAaF,EAAc,YAAY,GAAG,EAC1CG,EAAYF,EAAQC,CAAU,EAG9BE,EAAO,QAAQ,KAAK,MAAM,EAAG,QAAQ,KAAK,MAAM,EAEtDL,EAAM,OAAQ,CAAC,gBAAiB,GAAGI,CAAS,UAAW,GAAGC,CAAI,EAAG,CAAE,MAAO,SAAU,CAAC",
|
|
6
|
+
"names": ["spawn", "fileURLToPath", "dirname", "__filename", "__dirname", "args"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/browser_path_exclusions.js"],
|
|
4
|
+
"sourcesContent": ["import get_platform_safe_path from \"./get_platform_safe_path.js\";\n\nconst browser_path_exclusions = [\n get_platform_safe_path(\"lib/node\"),\n get_platform_safe_path(\"tests/\"),\n];\n\nexport default browser_path_exclusions;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAA4B,8BAEnC,MAAMC,EAA0B,CAC9BD,EAAuB,UAAU,EACjCA,EAAuB,QAAQ,CACjC,EAEA,IAAOE,EAAQD",
|
|
6
|
+
"names": ["get_platform_safe_path", "browser_path_exclusions", "browser_path_exclusions_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/browser_paths.js"],
|
|
4
|
+
"sourcesContent": ["import get_platform_safe_path from \"../get_platform_safe_path.js\";\n\nconst browser_paths = [\n get_platform_safe_path(\"email/\"),\n get_platform_safe_path(\"lib/\"),\n get_platform_safe_path(\"lib/browser\"),\n get_platform_safe_path(\"ui/\"),\n \"index.client.js\",\n];\n\nexport default browser_paths;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAA4B,+BAEnC,MAAMC,EAAgB,CACpBD,EAAuB,QAAQ,EAC/BA,EAAuB,MAAM,EAC7BA,EAAuB,aAAa,EACpCA,EAAuB,KAAK,EAC5B,iBACF,EAEA,IAAOE,EAAQD",
|
|
6
|
+
"names": ["get_platform_safe_path", "browser_paths", "browser_paths_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import u from"esbuild";import d from"esbuild-plugin-svg";import s from"./plugins/index.js";import f from"./get_code_frame.js";import p from"../build/minify_file.js";import h from"./on_warn.js";import b from"../path_exists.js";const w=async(r={},e="")=>{const t=r?.errors&&r?.errors[0],o=await b(e)?await f(e,{line:t?.location?.line,column:t?.location?.column}):null;return await h({file:e,stack:r?.stack,line:t?.location?.line,column:t?.location?.column,snippet:o,lineWithError:t?.location?.lineText?.trim(),message:t?.text}),o},v=(r={})=>{const e=r?.message?.split(":");return e[2]&&e[2]?.includes("No loader")?e[3]&&e[3]?.replace(`
|
|
2
|
+
`,"")||"":e[1]&&e[1]?.replace(`
|
|
3
|
+
`,"")||""},c=async(r={})=>{const e=v(r),t=await w(r,e);return{success:!1,path:e,error:{stack:r?.stack,snippet:t}}},g=(r=[],e={})=>u.build({allowOverwrite:!0,platform:"node",format:"esm",bundle:!1,sourcemap:!0,entryPoints:r?.map(t=>t.path),entryNames:"[dir]/[name]",outdir:e?.output_path||"./.joystick/build",outbase:"./",define:{"process.env.NODE_ENV":`'${e?.environment||"development"}'`},logLevel:"silent",plugins:[s.warn_node_environment,s.generate_file_dependency_map]}).catch(t=>{console.warn("NODE",t)}),y=(r=[],e={})=>u.build({allowOverwrite:!0,target:"es2020",platform:"browser",format:"esm",bundle:!0,sourcemap:!0,entryPoints:r?.map(t=>t.path),entryNames:"[dir]/[name]",outbase:"./",outdir:e?.output_path||"./.joystick/build",define:{"process.env.NODE_ENV":`'${e?.environment||"development"}'`},logLevel:"silent",loader:{".svg":"text"},plugins:[s.warn_node_environment,s.generate_file_dependency_map,s.bootstrap_component,d()]}).catch(t=>{console.warn("BROWSER",t)}),N=async r=>{const e=[".DS_Store"],t=r?.files?.filter(n=>!e?.some(i=>n?.path?.includes(i)))?.filter(n=>n?.platform==="node"),o=r?.files?.filter(n=>!e?.some(i=>n?.path?.includes(i)))?.filter(n=>n?.platform==="browser");let l=[],a=[];t?.length>0&&(l=[await g(t,r).then(()=>({success:!0})).catch(n=>c(n))]),o?.length>0&&(a=[await y(o,r).then(()=>({success:!0})).catch(n=>c(n))]);const m=l?.some(n=>!n?.success),_=a?.some(n=>!n?.success);return m||_?Promise.reject([...l,...a]):(r?.environment&&r?.environment!=="development"&&await Promise.all([...o,...t].map(n=>p(`${r?.output_path||"./.joystick/build"}/${n.path}`))),[...l,...a])};var x=N;export{x as default};
|
|
4
|
+
//# sourceMappingURL=build_files.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/build_files.js"],
|
|
4
|
+
"sourcesContent": ["import esbuild from \"esbuild\";\nimport svg from \"esbuild-plugin-svg\";\nimport build_plugins from \"./plugins/index.js\";\nimport get_code_frame from \"./get_code_frame.js\";\nimport minify_file from \"../build/minify_file.js\";\nimport on_warn from \"./on_warn.js\";\nimport path_exists from '../path_exists.js';\n\nconst handle_build_exception = async (exception = {}, file = '') => {\n const error = exception?.errors && exception?.errors[0];\n const snippet = await path_exists(file) ? await get_code_frame(file, {\n line: error?.location?.line,\n column: error?.location?.column,\n }) : null;\n\n await on_warn({\n file,\n stack: exception?.stack,\n line: error?.location?.line,\n column: error?.location?.column,\n snippet,\n lineWithError: error?.location?.lineText?.trim(),\n message: error?.text,\n });\n\n return snippet;\n};\n\nconst handle_parse_file_path_from_exception = (exception = {}) => {\n const raw_error_message = exception?.message?.split(':');\n\n // NOTE: If the build error pertains to a file that esbuild CANNOT build, the\n // structure of the error is slightly different, placing the file(s) w/ errors\n // after the string \"files:\" (which lands at index 3 in the split array).\n if (raw_error_message[2] && raw_error_message[2]?.includes('No loader')) {\n return raw_error_message[3] && raw_error_message[3]?.replace('\\n', '') || '';\n }\n\n // NOTE: IF the build error is just a syntax error, the offending file will be\n // palced at index 1.\n return raw_error_message[1] && raw_error_message[1]?.replace('\\n', '') || '';\n};\n\nconst handle_build_failure = async (exception = {}) => {\n const file = handle_parse_file_path_from_exception(exception);\n const snippet = await handle_build_exception(exception, file);\n \n return {\n success: false,\n path: file,\n error: {\n stack: exception?.stack,\n snippet,\n },\n };\n};\n\nconst handle_build_for_node = (node_paths = [], options = {}) => {\n return esbuild.build({\n allowOverwrite: true,\n platform: \"node\",\n format: \"esm\",\n bundle: false,\n sourcemap: true,\n entryPoints: node_paths?.map((file) => file.path),\n entryNames: '[dir]/[name]',\n outdir: options?.output_path || \"./.joystick/build\",\n outbase: './',\n define: {\n \"process.env.NODE_ENV\": `'${options?.environment || 'development'}'`,\n },\n logLevel: \"silent\",\n plugins: [\n build_plugins.warn_node_environment,\n build_plugins.generate_file_dependency_map\n ],\n }).catch((error) => {\n console.warn('NODE', error);\n });\n};\n\nconst handle_build_for_browser = (browser_paths = [], options = {}) => {\n return esbuild.build({\n allowOverwrite: true,\n target: \"es2020\",\n platform: \"browser\",\n format: \"esm\",\n bundle: true,\n sourcemap: true,\n entryPoints: browser_paths?.map((file) => file.path),\n entryNames: '[dir]/[name]',\n outbase: './',\n outdir: options?.output_path || \"./.joystick/build\",\n define: {\n \"process.env.NODE_ENV\": `'${options?.environment || 'development'}'`,\n },\n logLevel: 'silent',\n loader: {\n '.svg': 'text',\n },\n plugins: [\n build_plugins.warn_node_environment,\n build_plugins.generate_file_dependency_map,\n build_plugins.bootstrap_component,\n svg(),\n ]\n }).catch((error) => {\n console.warn('BROWSER', error);\n });\n};\n\nconst build_files = async (options) => {\n const dirty_files = ['.DS_Store'];\n \n const node_files = options?.files?.filter((file) => {\n return !dirty_files?.some((dirty_file) => {\n return file?.path?.includes(dirty_file);\n });\n })?.filter((file) => file?.platform === 'node');\n\n const browser_files = options?.files?.filter((file) => {\n return !dirty_files?.some((dirty_file) => {\n return file?.path?.includes(dirty_file);\n });\n })?.filter((file) => file?.platform === 'browser');\n \n let node_file_results = [];\n let browser_file_results = [];\n\n if (node_files?.length > 0) {\n node_file_results = [await handle_build_for_node(node_files, options)\n .then(() => {\n return { success: true };\n }).catch((exception) => handle_build_failure(exception))];\n }\n\n if (browser_files?.length > 0) {\n browser_file_results = [await handle_build_for_browser(browser_files, options)\n .then(() => {\n return { success: true };\n }).catch((exception) => handle_build_failure(exception))];\n }\n\n const node_files_have_errors = node_file_results?.some((node_file_result) => !node_file_result?.success);\n const browser_files_have_errors = browser_file_results?.some((browser_file_result) => !browser_file_result?.success);\n\n if (node_files_have_errors || browser_files_have_errors) {\n return Promise.reject([\n ...node_file_results,\n ...browser_file_results,\n ]);\n }\n \n if (options?.environment && options?.environment !== 'development') {\n await Promise.all([...browser_files, ...node_files].map((file) => {\n return minify_file(`${options?.output_path || \"./.joystick/build\"}/${file.path}`);\n })); \n }\n \n return [\n ...node_file_results,\n ...browser_file_results,\n ];\n};\n\nexport default build_files;\n\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["esbuild", "svg", "build_plugins", "get_code_frame", "minify_file", "on_warn", "path_exists", "handle_build_exception", "exception", "file", "error", "snippet", "handle_parse_file_path_from_exception", "raw_error_message", "handle_build_failure", "handle_build_for_node", "node_paths", "options", "handle_build_for_browser", "browser_paths", "build_files", "dirty_files", "node_files", "dirty_file", "browser_files", "node_file_results", "browser_file_results", "node_files_have_errors", "node_file_result", "browser_files_have_errors", "browser_file_result", "build_files_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=[{path:"css",regex:new RegExp(process.platform==="win32"?/^css\\/:/^css\//)},{path:"i18n",regex:new RegExp(process.platform==="win32"?/^i18n\\/:/^i18n\//)},{path:"public",regex:new RegExp(process.platform==="win32"?/^public\\/:/^public\//)},{path:"private",regex:new RegExp(process.platform==="win32"?/^private\\/:/^private\//)},{path:"index.html",regex:new RegExp(/^index.html/)},{path:"index.css",regex:new RegExp(/^index.css/)},{path:"package.json",regex:new RegExp(/^package.json/)},{path:"package-lock.json",regex:new RegExp(/^package-lock.json/)},{path:"settings.development.json",regex:new RegExp(/^settings.development.json/)},{path:"settings.staging.json",regex:new RegExp(/^settings.staging.json/)},{path:"settings.test.json",regex:new RegExp(/^settings.test.json/)},{path:"settings.production.json",regex:new RegExp(/^settings.production.json/)},{path:".html",regex:new RegExp(/^([0-9a-zA-Z-._])+.html/)}];var t=e;export{t as default};
|
|
2
|
+
//# sourceMappingURL=copy_paths.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/copy_paths.js"],
|
|
4
|
+
"sourcesContent": ["const copy_paths = [\n { path: \"css\", regex: new RegExp(process.platform === 'win32' ? /^css\\\\/ : /^css\\//) },\n { path: \"i18n\", regex: new RegExp(process.platform === 'win32' ? /^i18n\\\\/ : /^i18n\\//) },\n { path: \"public\", regex: new RegExp(process.platform === 'win32' ? /^public\\\\/ : /^public\\//) },\n { path: \"private\", regex: new RegExp(process.platform === 'win32' ? /^private\\\\/ : /^private\\//) },\n { path: \"index.html\", regex: new RegExp(/^index.html/) },\n { path: \"index.css\", regex: new RegExp(/^index.css/) },\n { path: \"package.json\", regex: new RegExp(/^package.json/) },\n { path: \"package-lock.json\", regex: new RegExp(/^package-lock.json/) },\n { path: \"settings.development.json\", regex: new RegExp(/^settings.development.json/) },\n { path: \"settings.staging.json\", regex: new RegExp(/^settings.staging.json/) },\n { path: \"settings.test.json\", regex: new RegExp(/^settings.test.json/) },\n { path: \"settings.production.json\", regex: new RegExp(/^settings.production.json/) },\n { path: \".html\", regex: new RegExp(/^([0-9a-zA-Z-._])+.html/) },\n];\n\nexport default copy_paths;\n"],
|
|
5
|
+
"mappings": "AAAA,MAAMA,EAAa,CACjB,CAAE,KAAM,MAAO,MAAO,IAAI,OAAO,QAAQ,WAAa,QAAU,SAAW,QAAQ,CAAE,EACrF,CAAE,KAAM,OAAQ,MAAO,IAAI,OAAO,QAAQ,WAAa,QAAU,UAAY,SAAS,CAAE,EACxF,CAAE,KAAM,SAAU,MAAO,IAAI,OAAO,QAAQ,WAAa,QAAU,YAAc,WAAW,CAAE,EAC9F,CAAE,KAAM,UAAW,MAAO,IAAI,OAAO,QAAQ,WAAa,QAAU,aAAe,YAAY,CAAE,EACjG,CAAE,KAAM,aAAc,MAAO,IAAI,OAAO,aAAa,CAAE,EACvD,CAAE,KAAM,YAAa,MAAO,IAAI,OAAO,YAAY,CAAE,EACrD,CAAE,KAAM,eAAgB,MAAO,IAAI,OAAO,eAAe,CAAE,EAC3D,CAAE,KAAM,oBAAqB,MAAO,IAAI,OAAO,oBAAoB,CAAE,EACrE,CAAE,KAAM,4BAA6B,MAAO,IAAI,OAAO,4BAA4B,CAAE,EACrF,CAAE,KAAM,wBAAyB,MAAO,IAAI,OAAO,wBAAwB,CAAE,EAC7E,CAAE,KAAM,qBAAsB,MAAO,IAAI,OAAO,qBAAqB,CAAE,EACvE,CAAE,KAAM,2BAA4B,MAAO,IAAI,OAAO,2BAA2B,CAAE,EACnF,CAAE,KAAM,QAAS,MAAO,IAAI,OAAO,yBAAyB,CAAE,CAChE,EAEA,IAAOC,EAAQD",
|
|
6
|
+
"names": ["copy_paths", "copy_paths_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/get_code_frame.js"],
|
|
4
|
+
"sourcesContent": ["import fs from 'fs';\nimport { codeFrameColumns } from \"@babel/code-frame\";\n\nconst { readFile } = fs.promises;\n\nconst get_code_frame = async (path = \"\", location = {}) => {\n const file = await readFile(path, \"utf-8\");\n return codeFrameColumns(file, { start: location });\n};\n\nexport default get_code_frame;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAQ,KACf,OAAS,oBAAAC,MAAwB,oBAEjC,KAAM,CAAE,SAAAC,CAAS,EAAIF,EAAG,SAElBG,EAAiB,MAAOC,EAAO,GAAIC,EAAW,CAAC,IAAM,CACzD,MAAMC,EAAO,MAAMJ,EAASE,EAAM,OAAO,EACzC,OAAOH,EAAiBK,EAAM,CAAE,MAAOD,CAAS,CAAC,CACnD,EAEA,IAAOE,EAAQJ",
|
|
6
|
+
"names": ["fs", "codeFrameColumns", "readFile", "get_code_frame", "path", "location", "file", "get_code_frame_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/get_file_operation.js"],
|
|
4
|
+
"sourcesContent": ["import copy_paths from \"./copy_paths.js\";\n\nconst check_if_is_copy_path = (path = '') => {\n return copy_paths.some((file_to_copy) => {\n return file_to_copy.regex.test(path);\n });\n};\n\nconst check_if_is_javascript = (file_extension = '') => {\n\treturn file_extension === 'js';\n};\n\nconst get_file_operation = (path = '') => {\n\tconst file_extension = path?.split('.')?.pop();\n\tconst is_javascript = check_if_is_javascript(file_extension);\n\tconst is_copy_path = check_if_is_copy_path(path);\n\n\tif (!is_javascript || (is_javascript && is_copy_path)) {\n\t\treturn 'copy_file';\n\t}\n\n\treturn 'build_file';\n};\n\nexport default get_file_operation;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAgB,kBAEvB,MAAMC,EAAwB,CAACC,EAAO,KAC7BF,EAAW,KAAMG,GACfA,EAAa,MAAM,KAAKD,CAAI,CACpC,EAGGE,EAAyB,CAACC,EAAiB,KACzCA,IAAmB,KAGrBC,EAAqB,CAACJ,EAAO,KAAO,CACzC,MAAMG,EAAiBH,GAAM,MAAM,GAAG,GAAG,IAAI,EACvCK,EAAgBH,EAAuBC,CAAc,EACrDG,EAAeP,EAAsBC,CAAI,EAE/C,MAAI,CAACK,GAAkBA,GAAiBC,EAChC,YAGD,YACR,EAEA,IAAOC,EAAQH",
|
|
6
|
+
"names": ["copy_paths", "check_if_is_copy_path", "path", "file_to_copy", "check_if_is_javascript", "file_extension", "get_file_operation", "is_javascript", "is_copy_path", "get_file_operation_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import s from"fs";import l from"../get_files_in_path.js";import c from"./master_ignore_list.js";const{stat:p}=s.promises,u=async(i=[],o=[])=>{const n=await l("./",[]),_=c;return n.filter(e=>!o.some(t=>e.includes(t))).filter(e=>!i.some(t=>e.includes(t))).filter(e=>!_.some(t=>e.includes(t))).filter(e=>!s.lstatSync(e).isDirectory())};var x=u;export{x as default};
|
|
2
|
+
//# sourceMappingURL=get_files_to_build.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/get_files_to_build.js"],
|
|
4
|
+
"sourcesContent": ["import fs from \"fs\";\nimport get_files_in_path from \"../get_files_in_path.js\";\nimport master_ignore_list from \"./master_ignore_list.js\";\n\nconst { stat } = fs.promises;\n\nconst get_files_to_build = async (excluded_paths = [], custom_copy_paths = []) => {\n const files = await get_files_in_path(\"./\", []);\n\n const master_ignore_list_filtered_for_context = master_ignore_list;\n\n const filtered_files = files\n .filter((path) => {\n const is_custom_copy_path = custom_copy_paths.some((custom_copy_path) => {\n return path.includes(custom_copy_path);\n });\n\n return !is_custom_copy_path;\n })\n .filter((path) => {\n const is_excluded = excluded_paths.some((excluded_path) => {\n return path.includes(excluded_path);\n });\n\n return !is_excluded;\n })\n .filter((path) => {\n const is_excluded = master_ignore_list_filtered_for_context.some((excluded_path) => {\n return path.includes(excluded_path);\n });\n\n return !is_excluded;\n })\n .filter((path) => {\n return !fs.lstatSync(path).isDirectory();\n });\n\n return filtered_files;\n};\n\nexport default get_files_to_build;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAQ,KACf,OAAOC,MAAuB,0BAC9B,OAAOC,MAAwB,0BAE/B,KAAM,CAAE,KAAAC,CAAK,EAAIH,EAAG,SAEdI,EAAqB,MAAOC,EAAiB,CAAC,EAAGC,EAAoB,CAAC,IAAM,CAChF,MAAMC,EAAQ,MAAMN,EAAkB,KAAM,CAAC,CAAC,EAExCO,EAA0CN,EA4BhD,OA1BuBK,EACpB,OAAQE,GAKA,CAJqBH,EAAkB,KAAMI,GAC3CD,EAAK,SAASC,CAAgB,CACtC,CAGF,EACA,OAAQD,GAKA,CAJaJ,EAAe,KAAMM,GAChCF,EAAK,SAASE,CAAa,CACnC,CAGF,EACA,OAAQF,GAKA,CAJaD,EAAwC,KAAMG,GACzDF,EAAK,SAASE,CAAa,CACnC,CAGF,EACA,OAAQF,GACA,CAACT,EAAG,UAAUS,CAAI,EAAE,YAAY,CACxC,CAGL,EAEA,IAAOG,EAAQR",
|
|
6
|
+
"names": ["fs", "get_files_in_path", "master_ignore_list", "stat", "get_files_to_build", "excluded_paths", "custom_copy_paths", "files", "master_ignore_list_filtered_for_context", "path", "custom_copy_path", "excluded_path", "get_files_to_build_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t from"./browser_path_exclusions.js";import s from"./browser_paths.js";import n from"./node_paths.js";const _=(r="")=>n.some(e=>r.includes(e)),c=(r="")=>s.some(e=>r.includes(e))&&!t.some(e=>r.includes(e)),i=(r="")=>{const e=c(r),o=_(r);if(e)return"browser";if(o)return"node"};var f=i;export{f as default};
|
|
2
|
+
//# sourceMappingURL=get_path_platform.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/get_path_platform.js"],
|
|
4
|
+
"sourcesContent": ["import browser_path_exclusions from \"./browser_path_exclusions.js\";\nimport browser_paths from \"./browser_paths.js\";\nimport node_paths from \"./node_paths.js\";\n\nconst check_if_node_path = (path = '') => {\n\treturn node_paths.some((node_path) => {\n return path.includes(node_path);\n });\n};\n\nconst check_if_browser_path = (path = '') => {\n return browser_paths.some((browser_path) => {\n return path.includes(browser_path);\n }) && !browser_path_exclusions.some((browser_path_exclusion) => {\n return path.includes(browser_path_exclusion);\n });\n};\n\nconst get_path_platform = (path = '') => {\n\tconst is_browser_path = check_if_browser_path(path);\n\tconst is_node_path = check_if_node_path(path);\n\n\tif (is_browser_path) {\n\t\treturn 'browser';\n\t}\n\n\tif (is_node_path) {\n\t\treturn 'node';\n\t}\n};\n\nexport default get_path_platform;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAA6B,+BACpC,OAAOC,MAAmB,qBAC1B,OAAOC,MAAgB,kBAEvB,MAAMC,EAAqB,CAACC,EAAO,KAC3BF,EAAW,KAAMG,GACdD,EAAK,SAASC,CAAS,CAC/B,EAGGC,EAAwB,CAACF,EAAO,KAC7BH,EAAc,KAAMM,GAClBH,EAAK,SAASG,CAAY,CAClC,GAAK,CAACP,EAAwB,KAAMQ,GAC5BJ,EAAK,SAASI,CAAsB,CAC5C,EAGGC,EAAoB,CAACL,EAAO,KAAO,CACxC,MAAMM,EAAkBJ,EAAsBF,CAAI,EAC5CO,EAAeR,EAAmBC,CAAI,EAE5C,GAAIM,EACH,MAAO,UAGR,GAAIC,EACH,MAAO,MAET,EAEA,IAAOC,EAAQH",
|
|
6
|
+
"names": ["browser_path_exclusions", "browser_paths", "node_paths", "check_if_node_path", "path", "node_path", "check_if_browser_path", "browser_path", "browser_path_exclusion", "get_path_platform", "is_browser_path", "is_node_path", "get_path_platform_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/get_platform_safe_path.js"],
|
|
4
|
+
"sourcesContent": ["const get_platform_safe_path = (path = '') => {\n // NOTE: This is why serial killers exist.\n return process.platform === 'win32' ? path.replace('/', '\\\\') : path;\n};\n\nexport default get_platform_safe_path;\n"],
|
|
5
|
+
"mappings": "AAAA,MAAMA,EAAyB,CAACC,EAAO,KAE9B,QAAQ,WAAa,QAAUA,EAAK,QAAQ,IAAK,IAAI,EAAIA,EAGlE,IAAOC,EAAQF",
|
|
6
|
+
"names": ["get_platform_safe_path", "path", "get_platform_safe_path_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import r from"fs";import o from"./master_ignore_list.js";const s=(e=[])=>`{${[...((r.existsSync(".gitignore")?r.readFileSync(".gitignore","utf-8"):"")?.split(`
|
|
2
|
+
`)?.filter(t=>!t?.includes("#")&&t?.trim()!=="")||[])?.map(t=>`^${t}`),...(e||[])?.map(t=>`^${t}`),...(o||[])?.map(t=>`^${t}`),"*.tar","*.tar.gz","*.tar.xz"].filter((t,i,n)=>n.indexOf(t)===i)?.map(t=>`"${t}"`).join(",")}}`;var c=s;export{c as default};
|
|
3
|
+
//# sourceMappingURL=get_tar_ignore_list.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/get_tar_ignore_list.js"],
|
|
4
|
+
"sourcesContent": ["import fs from \"fs\";\nimport master_ignore_list from \"./master_ignore_list.js\";\n\nconst get_tar_ignore_list = (excluded_paths = []) => {\n const git_ignore = fs.existsSync(\".gitignore\")\n ? fs.readFileSync(\".gitignore\", \"utf-8\")\n : \"\";\n \n const git_ignore_files = git_ignore?.split(\"\\n\")?.filter((file) => {\n return !file?.includes(\"#\") && file?.trim() !== \"\";\n });\n\n // NOTE: The ^ character is an anchor to tell tar to only match the pattern\n // to the root path. Without this, it will match all nested paths that resemble\n // the pattern you give it. For example, ./versions will match the api/versions\n // directory too.\n const files_to_ignore = [\n ...(git_ignore_files || [])?.map((ignore) => {\n return `^${ignore}`;\n }),\n ...(excluded_paths || [])?.map((ignore) => {\n return `^${ignore}`;\n }),\n ...(master_ignore_list || [])?.map((ignore) => {\n return `^${ignore}`;\n }),\n \"*.tar\",\n \"*.tar.gz\",\n \"*.tar.xz\",\n ]?.filter((item, itemIndex, array) => {\n return array.indexOf(item) === itemIndex;\n });\n\n const exclude_list = `{${files_to_ignore\n ?.map((file_to_ignore) => `\"${file_to_ignore}\"`)\n .join(\",\")}}`;\n\n return exclude_list;\n};\n\nexport default get_tar_ignore_list;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAQ,KACf,OAAOC,MAAwB,0BAE/B,MAAMC,EAAsB,CAACC,EAAiB,CAAC,IA8BxB,IAjBG,CACtB,KAbiBH,EAAG,WAAW,YAAY,EACzCA,EAAG,aAAa,aAAc,OAAO,EACrC,KAEiC,MAAM;AAAA,CAAI,GAAG,OAAQI,GACjD,CAACA,GAAM,SAAS,GAAG,GAAKA,GAAM,KAAK,IAAM,EACjD,GAOyB,CAAC,IAAI,IAAKC,GACzB,IAAIA,CAAM,EAClB,EACD,IAAIF,GAAkB,CAAC,IAAI,IAAKE,GACvB,IAAIA,CAAM,EAClB,EACD,IAAIJ,GAAsB,CAAC,IAAI,IAAKI,GAC3B,IAAIA,CAAM,EAClB,EACD,QACA,WACA,UACF,EAAG,OAAO,CAACC,EAAMC,EAAWC,IACnBA,EAAM,QAAQF,CAAI,IAAMC,CAChC,GAGG,IAAKE,GAAmB,IAAIA,CAAc,GAAG,EAC9C,KAAK,GAAG,CAAC,IAKd,IAAOC,EAAQR",
|
|
6
|
+
"names": ["fs", "master_ignore_list", "get_tar_ignore_list", "excluded_paths", "file", "ignore", "item", "itemIndex", "array", "file_to_ignore", "get_tar_ignore_list_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import b from"chalk";import g from"child_process";import l from"fs";import{dirname as y}from"path";import w from"util";import $ from"./build_files.js";import x from"./get_files_to_build.js";import z from"./get_file_operation.js";import v from"./get_path_platform.js";import F from"./get_tar_ignore_list.js";import k from"../load_settings.js";import S from"../loader.js";import f from"../path_exists.js";import j from"../../lib/encrypt_buffer.js";const{mkdir:B,copyFile:P,readFile:A,writeFile:D,readdir:L}=l.promises,p=w.promisify(g.exec),q=async(i=[])=>{const r=[];for(let o=0;o<i?.length;o+=1){const e=i[o];if(l.existsSync(e))if(l.lstatSync(e).isDirectory()){const _=await L(e,{recursive:!0});r.push(...(_||[])?.map(s=>`${e}/${s}`))}else r.push(e)}return r},C=(i=[])=>i?.map(r=>({path:r,operation:z(r),platform:v(r)})),E=async(i={})=>{const r=new S,o=i?.type||"tar",e=i?.environment||"production";r.print(`Building app to ${o} for ${e}...`);const c=await k(e),_=c?.config?.build?.excluded_paths||c?.config?.build?.excludedPaths,s=await q(c?.config?.build?.copy_paths),m=await x(_,s),a=o==="tar"?".build/.tar":".build",u=C(m);await f(".build")&&await p("rm -rf .build");const d=[...u?.filter(t=>t?.operation==="copy_file"),...(s||[])?.map(t=>({path:t}))],h=u?.filter(t=>t?.operation==="build_file");for(let t=0;t<d?.length;t+=1){const n=d[t];l.lstatSync(n?.path).isFile()&&(await B(y(`${a}/${n?.path}`),{recursive:!0}),await P(n?.path,`${a}/${n?.path}`))}if(await $({files:h,environment:e,output_path:a}).catch(t=>{console.warn(t)}),o==="tar"){const t=F(c?.config?.build?.excludedPaths);await p(`cd ${a} && tar --exclude=${t} -czf ../build.tar.gz .`),await p(`rm -rf ${a}`)}if(o==="tar"&&i?.encrypt_build){const t=a?.replace("/.tar","/build.tar.gz"),n=j(await A(t),i?.encryption_key);await D(".build/build.encrypted.tar.gz",n)}i?.silence_confirmation||console.log(b.greenBright(`
|
|
2
|
+
\u2714 App built as ${o} to ${o==="tar"?a?.replace("/.tar","/build.tar.gz"):a}!
|
|
3
|
+
`)),await f(".build/component_id_cache.json")&&await p("rm -rf .build/component_id_cache.json")};var Y=E;export{Y as default};
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/index.js"],
|
|
4
|
+
"sourcesContent": ["import chalk from \"chalk\";\nimport child_process from \"child_process\";\nimport fs from 'fs';\nimport { dirname } from 'path';\nimport util from 'util';\nimport build_files from \"./build_files.js\";\nimport get_files_to_build from \"./get_files_to_build.js\";\nimport get_file_operation from \"./get_file_operation.js\";\nimport get_path_platform from \"./get_path_platform.js\";\nimport get_tar_ignore_list from \"./get_tar_ignore_list.js\";\nimport load_settings from \"../load_settings.js\";\nimport Loader from \"../loader.js\";\nimport path_exists from \"../path_exists.js\";\nimport encrypt_buffer from '../../lib/encrypt_buffer.js';\n\nconst { mkdir, copyFile, readFile, writeFile, readdir } = fs.promises;\nconst exec = util.promisify(child_process.exec);\n\nconst get_custom_copy_paths = async (copy_paths_from_settings = []) => {\n const custom_copy_paths = [];\n\n for (let i = 0; i < copy_paths_from_settings?.length; i += 1) {\n const custom_copy_path = copy_paths_from_settings[i];\n\n if (fs.existsSync(custom_copy_path)) {\n const stat = fs.lstatSync(custom_copy_path);\n\n if (stat.isDirectory()) {\n const paths = await readdir(custom_copy_path, { recursive: true });\n custom_copy_paths.push(\n ...(paths || [])?.map((path) => {\n return `${custom_copy_path}/${path}`;\n })\n );\n } else {\n custom_copy_paths.push(custom_copy_path);\n }\n }\n }\n\n return custom_copy_paths;\n};\n\nconst get_files_to_build_with_operation_and_platform = (files = []) => {\n return files?.map((file) => {\n return {\n path: file,\n operation: get_file_operation(file),\n platform: get_path_platform(file),\n }\n });\n};\n\nconst build = async (options = {}) => {\n const loader = new Loader();\n\n const build_type = options?.type || 'tar';\n const environment = options?.environment || \"production\";\n\n loader.print(`Building app to ${build_type} for ${environment}...`);\n\n const settings = await load_settings(environment);\n const excluded_paths = settings?.config?.build?.excluded_paths || settings?.config?.build?.excludedPaths;\n const custom_copy_paths = await get_custom_copy_paths(settings?.config?.build?.copy_paths);\n\n const files_for_build = await get_files_to_build(excluded_paths, custom_copy_paths);\n const output_path = build_type === 'tar' ? '.build/.tar' : '.build';\n const files_to_build_with_operation_and_platform = get_files_to_build_with_operation_and_platform(files_for_build);\n\n if (await path_exists('.build')) {\n await exec(`rm -rf .build`);\n }\n\n const files_to_copy = [\n ...files_to_build_with_operation_and_platform?.filter((file) => {\n return file?.operation === 'copy_file';\n }),\n ...(custom_copy_paths || [])?.map((custom_copy_path) => {\n return { path: custom_copy_path };\n }),\n ];\n\n const files_to_build = files_to_build_with_operation_and_platform?.filter((file) => {\n return file?.operation === 'build_file';\n });\n\n for (let i = 0; i < files_to_copy?.length; i += 1) {\n const file_to_copy = files_to_copy[i];\n const stat = fs.lstatSync(file_to_copy?.path);\n\n if (stat.isFile()) {\n await mkdir(dirname(`${output_path}/${file_to_copy?.path}`), { recursive: true });\n await copyFile(file_to_copy?.path, `${output_path}/${file_to_copy?.path}`);\n }\n }\n\n await build_files({\n files: files_to_build,\n environment,\n output_path,\n }).catch((error) => {\n console.warn(error);\n });\n\n if (build_type === \"tar\") {\n const ignore_list = get_tar_ignore_list(settings?.config?.build?.excludedPaths);\n\n await exec(\n `cd ${output_path} && tar --exclude=${ignore_list} -czf ../build.tar.gz .`\n );\n\n await exec(`rm -rf ${output_path}`);\n }\n\n if (build_type === \"tar\" && options?.encrypt_build) {\n const build_path = output_path?.replace('/.tar', '/build.tar.gz');\n\n const encrypted_build = encrypt_buffer(\n await readFile(build_path),\n options?.encryption_key,\n );\n\n await writeFile(`.build/build.encrypted.tar.gz`, encrypted_build);\n }\n\n if (!options?.silence_confirmation) {\n console.log(\n chalk.greenBright(`\\n\u2714 App built as ${build_type} to ${build_type === 'tar' ? output_path?.replace('/.tar', '/build.tar.gz') : output_path}!\\n`)\n );\n }\n\n if (await path_exists('.build/component_id_cache.json')) {\n await exec(`rm -rf .build/component_id_cache.json`);\n }\n};\n\nexport default build;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["chalk", "child_process", "fs", "dirname", "util", "build_files", "get_files_to_build", "get_file_operation", "get_path_platform", "get_tar_ignore_list", "load_settings", "Loader", "path_exists", "encrypt_buffer", "mkdir", "copyFile", "readFile", "writeFile", "readdir", "exec", "get_custom_copy_paths", "copy_paths_from_settings", "custom_copy_paths", "i", "custom_copy_path", "paths", "path", "get_files_to_build_with_operation_and_platform", "files", "file", "build", "options", "loader", "build_type", "environment", "settings", "excluded_paths", "files_for_build", "output_path", "files_to_build_with_operation_and_platform", "files_to_copy", "files_to_build", "file_to_copy", "error", "ignore_list", "build_path", "encrypted_build", "index_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/master_ignore_list.js"],
|
|
4
|
+
"sourcesContent": ["const master_ignore_list = [\n '.build',\n '.DS_Store',\n '.git',\n '.joystick/build',\n '.joystick/data',\n '.push',\n 'node_modules',\n 'settings.development.json',\n 'settings.staging.json',\n 'settings.production.json',\n];\n\nexport default master_ignore_list;\n"],
|
|
5
|
+
"mappings": "AAAA,MAAMA,EAAqB,CACzB,SACA,YACA,OACA,kBACA,iBACA,QACA,eACA,4BACA,wBACA,0BACF,EAEA,IAAOC,EAAQD",
|
|
6
|
+
"names": ["master_ignore_list", "master_ignore_list_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import f from"fs";import r from"esbuild";import a from"../path_exists.js";const{readFile:s,writeFile:m}=f.promises,n=async(i="")=>{if(await a(i)){const o=await s(i,"utf-8"),t=await r.transform(o,{minify:!0}).catch(e=>{console.warn(e)});t?.code&&await m(i,t.code)}};var w=n;export{w as default};
|
|
2
|
+
//# sourceMappingURL=minify_file.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/minify_file.js"],
|
|
4
|
+
"sourcesContent": ["import fs from \"fs\";\nimport esbuild from \"esbuild\";\nimport path_exists from \"../path_exists.js\";\n\nconst { readFile, writeFile } = fs.promises;\n\nconst minify_file = async (path = \"\") => {\n if (await path_exists(path)) {\n const file = await readFile(path, \"utf-8\");\n const minified = await esbuild.transform(file, {\n minify: true,\n }).catch((error) => {\n console.warn(error);\n });\n\n if (minified?.code) {\n await writeFile(path, minified.code);\n }\n }\n};\n\nexport default minify_file;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAQ,KACf,OAAOC,MAAa,UACpB,OAAOC,MAAiB,oBAExB,KAAM,CAAE,SAAAC,EAAU,UAAAC,CAAU,EAAIJ,EAAG,SAE7BK,EAAc,MAAOC,EAAO,KAAO,CACvC,GAAI,MAAMJ,EAAYI,CAAI,EAAG,CAC3B,MAAMC,EAAO,MAAMJ,EAASG,EAAM,OAAO,EACnCE,EAAW,MAAMP,EAAQ,UAAUM,EAAM,CAC7C,OAAQ,EACV,CAAC,EAAE,MAAOE,GAAU,CAClB,QAAQ,KAAKA,CAAK,CACpB,CAAC,EAEGD,GAAU,MACZ,MAAMJ,EAAUE,EAAME,EAAS,IAAI,CAEvC,CACF,EAEA,IAAOE,EAAQL",
|
|
6
|
+
"names": ["fs", "esbuild", "path_exists", "readFile", "writeFile", "minify_file", "path", "file", "minified", "error", "minify_file_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"./get_platform_safe_path.js";const s=[e("api/"),e("caches/"),e("cronJobs/"),e("cron_jobs/"),e("fixtures/"),e("indexes/"),e("lib/node"),e("queues/"),e("routes/"),e("tests/"),e("uploaders/"),e("websockets/"),e("workers/"),"index.server.js"];var r=s;export{r as default};
|
|
2
|
+
//# sourceMappingURL=node_paths.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/build/node_paths.js"],
|
|
4
|
+
"sourcesContent": ["import get_platform_safe_path from \"./get_platform_safe_path.js\";\n\nconst node_paths = [\n get_platform_safe_path(\"api/\"),\n get_platform_safe_path(\"caches/\"),\n get_platform_safe_path(\"cronJobs/\"),\n get_platform_safe_path(\"cron_jobs/\"),\n get_platform_safe_path(\"fixtures/\"),\n get_platform_safe_path(\"indexes/\"),\n get_platform_safe_path(\"lib/node\"),\n get_platform_safe_path(\"queues/\"),\n get_platform_safe_path(\"routes/\"),\n get_platform_safe_path(\"tests/\"),\n get_platform_safe_path(\"uploaders/\"),\n get_platform_safe_path(\"websockets/\"),\n get_platform_safe_path(\"workers/\"),\n \"index.server.js\",\n];\n\nexport default node_paths;\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAA4B,8BAEnC,MAAMC,EAAa,CACjBD,EAAuB,MAAM,EAC7BA,EAAuB,SAAS,EAChCA,EAAuB,WAAW,EAClCA,EAAuB,YAAY,EACnCA,EAAuB,WAAW,EAClCA,EAAuB,UAAU,EACjCA,EAAuB,UAAU,EACjCA,EAAuB,SAAS,EAChCA,EAAuB,SAAS,EAChCA,EAAuB,QAAQ,EAC/BA,EAAuB,YAAY,EACnCA,EAAuB,aAAa,EACpCA,EAAuB,UAAU,EACjC,iBACF,EAEA,IAAOE,EAAQD",
|
|
6
|
+
"names": ["get_platform_safe_path", "node_paths", "node_paths_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import l from"chalk";import s from"../constants.js";import c from"./get_code_frame.js";import t from"../rainbow_road.js";const n=(o="")=>o.replace(s.OBJECT_REGEX,""),i=(o={})=>{const e=o?.snippet?.split(`
|
|
2
|
+
`);console.log(`
|
|
3
|
+
`),console.log(`${t()}
|
|
4
|
+
`),o.file&&console.log(l.yellowBright(`Build Error in ${o?.file}:
|
|
5
|
+
`)),e&&e.length>0&&e.forEach(r=>r.includes(`> ${o.line} |`)?console.log(` ${l.red(r)}`):console.log(` ${l.gray(r)}`)),o?.stack&&(console.log(l.magentaBright(`
|
|
6
|
+
Stack Trace:
|
|
7
|
+
`)),console.log(l.yellow(` ${n(o?.stack)}
|
|
8
|
+
`))),process.loader.error("Build error. Fix the error above to continue building your app."),console.log(`
|
|
9
|
+
`),console.log(`${t()}
|
|
10
|
+
`)},a=async(o={},e="")=>e&&e==="BUILD_ERROR"?{file:o?.file,snippet:o?.snippet?await c(o.file,{line:o?.line,column:o?.column}):"",stack:o?.stack,line:o?.line,character:o?.column,message:o?.message}:null,f=async o=>{const e=await a(o,"BUILD_ERROR");return e&&i(e),e};var d=f;export{d as default};
|
|
11
|
+
//# sourceMappingURL=on_warn.js.map
|