@jsenv/core 26.0.1 → 27.0.0-alpha.2
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/main.js +17 -24
- package/package.json +35 -71
- package/readme.md +30 -37
- package/src/build/build.js +737 -0
- package/src/build/build_urls_generator.js +64 -0
- package/src/build/inject_version_mappings.js +62 -0
- package/src/build/plugins/bundle_js_module/jsenv_plugin_bundle_js_module.js +225 -0
- package/src/build/plugins/minify_html/jsenv_plugin_minify_html.js +30 -0
- package/src/build/plugins/minify_js/jsenv_plugin_minify_js.js +47 -0
- package/src/dev/plugins/autoreload/babel_plugin_metadata_import_meta_hot.js +98 -0
- package/src/dev/plugins/autoreload/client/autoreload_preference.js +11 -0
- package/src/dev/plugins/autoreload/client/event_source_client.js +186 -0
- package/src/{internal/dev_server/event_source_client → dev/plugins/autoreload/client}/event_source_connection.js +21 -25
- package/src/dev/plugins/autoreload/client/import_meta_hot.js +80 -0
- package/src/dev/plugins/autoreload/client/reload.js +101 -0
- package/src/dev/plugins/autoreload/client/url_helpers.js +20 -0
- package/src/dev/plugins/autoreload/html_hot_dependencies.js +156 -0
- package/src/dev/plugins/autoreload/jsenv_plugin_autoreload.js +374 -0
- package/src/dev/plugins/autoreload/sse_service.js +149 -0
- package/src/dev/plugins/explorer/client/explorer.html +607 -0
- package/src/{internal → dev/plugins/explorer/client}/jsenv.png +0 -0
- package/src/dev/plugins/explorer/jsenv_plugin_explorer.js +74 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/animation/toolbar_animation.js +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/eventsource/eventsource.css +2 -2
- package/src/dev/plugins/toolbar/client/eventsource/toolbar_eventsource.js +57 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/execution/execution.css +0 -0
- package/src/dev/plugins/toolbar/client/execution/toolbar_execution.js +88 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/focus/focus.css +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/focus/toolbar_focus.js +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/jsenv_logo.svg +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/notification/toolbar_notification.js +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/responsive/overflow_menu.css +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/responsive/toolbar_responsive.js +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/settings/settings.css +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/settings/toolbar_settings.js +1 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/theme/jsenv_theme.css +1 -15
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/theme/light_theme.css +0 -17
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/theme/toolbar_theme.js +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/toolbar.html +40 -199
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/toolbar_injector.js +8 -28
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/toolbar_main.css +0 -24
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/toolbar_main.js +10 -56
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/tooltip/tooltip.css +1 -1
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/tooltip/tooltip.js +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/util/animation.js +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/util/dom.js +0 -0
- package/src/{internal/browser_utils → dev/plugins/toolbar/client/util}/fetch_using_xhr.js +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/util/fetching.js +2 -4
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/util/iframe_to_parent_href.js +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/util/jsenv_logger.js +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/util/preferences.js +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/util/responsive.js +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/util/util.js +0 -0
- package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/variant/variant.js +0 -0
- package/src/dev/plugins/toolbar/jsenv_plugin_toolbar.js +62 -0
- package/src/dev/start_dev_server.js +105 -0
- package/src/execute/execute.js +132 -0
- package/src/execute/run.js +208 -0
- package/src/execute/runtimes/browsers/chromium.js +8 -0
- package/src/execute/runtimes/browsers/firefox.js +7 -0
- package/src/execute/runtimes/browsers/from_playwright.js +464 -0
- package/src/{browser_runtimes.js → execute/runtimes/browsers/webkit.js} +4 -18
- package/src/{internal/node_launcher/child_process_options.js → execute/runtimes/node/child_exec_options.js} +25 -36
- package/src/{internal/node_launcher/node_controllable_file.mjs → execute/runtimes/node/controllable_file.mjs} +1 -18
- package/src/{internal/node_launcher/node_controllable_process.js → execute/runtimes/node/controlled_process.js} +128 -150
- package/src/execute/runtimes/node/exec_options.js +44 -0
- package/src/{internal/node_launcher → execute/runtimes/node}/kill_process_tree.js +3 -1
- package/src/execute/runtimes/node/node_process.js +92 -0
- package/src/execute/runtimes/node/node_worker_thread.js +28 -0
- package/src/omega/core_plugins/babel/babel_helper/babel_helper_directory.js +29 -0
- package/src/{internal/compile_server/js → omega/core_plugins/babel/babel_helper}/babel_plugin_babel_helpers_as_jsenv_imports.js +15 -19
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/.eslintrc.cjs +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/AsyncGenerator/AsyncGenerator.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/AwaitValue/AwaitValue.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/applyDecoratorDescriptor/applyDecoratorDescriptor.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/arrayLikeToArray/arrayLikeToArray.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/arrayWithHoles/arrayWithHoles.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/arrayWithoutHoles/arrayWithoutHoles.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/assertThisInitialized/assertThisInitialized.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/asyncGeneratorDelegate/asyncGeneratorDelegate.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/asyncIterator/asyncIterator.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/asyncToGenerator/asyncToGenerator.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/awaitAsyncGenerator/awaitAsyncGenerator.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classApplyDescriptorGet/classApplyDescriptorGet.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classApplyDescriptorSet/classApplyDescriptorSet.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classCallCheck/classCallCheck.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classExtractFieldDescriptor/classExtractFieldDescriptor.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classNameTDZError/classNameTDZError.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classPrivateFieldDestructureSet/classPrivateFieldDestructureSet.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classPrivateFieldGet/classPrivateFieldGet.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classPrivateFieldLooseBase/classPrivateFieldLooseBase.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classPrivateFieldLooseKey/classPrivateFieldLooseKey.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classPrivateFieldSet/classPrivateFieldSet.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classPrivateMethodGet/classPrivateMethodGet.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classPrivateMethodSet/classPrivateMethodSet.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classStaticPrivateFieldSpecGet/classStaticPrivateFieldSpecGet.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classStaticPrivateFieldSpecSet/classStaticPrivateFieldSpecSet.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classStaticPrivateMethodGet/classStaticPrivateMethodGet.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/classStaticPrivateMethodSet/classStaticPrivateMethodSet.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/construct/construct.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/createClass/createClass.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/createForOfIteratorHelper/createForOfIteratorHelper.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/createForOfIteratorHelperLoose/createForOfIteratorHelperLoose.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/createRawReactElement/createRawReactElement.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/createSuper/createSuper.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/decorate/decorate.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/defaults/defaults.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/defineEnumerableProperties/defineEnumerableProperties.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/defineProperty/defineProperty.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/extends/extends.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/get/get.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/getPrototypeOf/getPrototypeOf.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/inherits/inherits.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/inheritsLoose/inheritsLoose.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/initializerDefineProperty/initializerDefineProperty.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/initializerWarningHelper/initializerWarningHelper.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/instanceof/instanceof.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/interopRequireDefault/interopRequireDefault.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/interopRequireWildcard/interopRequireWildcard.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/isNativeFunction/isNativeFunction.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/isNativeReflectConstruct/isNativeReflectConstruct.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/iterableToArray/iterableToArray.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/iterableToArrayLimit/iterableToArrayLimit.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/iterableToArrayLimitLoose/iterableToArrayLimitLoose.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/jsx/jsx.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/maybeArrayLike/maybeArrayLike.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/newArrowCheck/newArrowCheck.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/nonIterableRest/nonIterableRest.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/nonIterableSpread/nonIterableSpread.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/objectDestructuringEmpty/objectDestructuringEmpty.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/objectSpread/objectSpread.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/objectSpread2/objectSpread2.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/objectWithoutProperties/objectWithoutProperties.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/possibleConstructorReturn/possibleConstructorReturn.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/readOnlyError/readOnlyError.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/readme.md +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/set/set.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/setPrototypeOf/setPrototypeOf.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/skipFirstGeneratorNext/skipFirstGeneratorNext.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/slicedToArray/slicedToArray.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/slicedToArrayLoose/slicedToArrayLoose.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/superPropBase/superPropBase.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/taggedTemplateLiteral/taggedTemplateLiteral.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/taggedTemplateLiteralLoose/taggedTemplateLiteralLoose.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/tdz/tdz.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/temporalRef/temporalRef.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/temporalUndefined/temporalUndefined.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/toArray/toArray.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/toConsumableArray/toConsumableArray.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/toPrimitive/toPrimitive.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/toPropertyKey/toPropertyKey.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/typeof/typeof.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/unsupportedIterableToArray/unsupportedIterableToArray.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/wrapAsyncGenerator/wrapAsyncGenerator.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/wrapNativeSuper/wrapNativeSuper.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/wrapRegExp/wrapRegExp.js +0 -0
- package/{helpers/babel → src/omega/core_plugins/babel/babel_helper/client}/writeOnlyError/writeOnlyError.js +0 -0
- package/src/omega/core_plugins/babel/global_this/babel_plugin_global_this_as_jsenv_import.js +35 -0
- package/{helpers/global-this/global-this.js → src/omega/core_plugins/babel/global_this/client/global_this.js} +0 -0
- package/src/omega/core_plugins/babel/helpers/babel_plugin_structure.js +187 -0
- package/src/{internal/features → omega/core_plugins/babel/helpers}/babel_plugins_compatibility.js +1 -24
- package/src/omega/core_plugins/babel/jsenv_plugin_babel.js +97 -0
- package/src/omega/core_plugins/babel/new_stylesheet/babel_plugin_new_stylesheet_as_jsenv_import.js +117 -0
- package/src/omega/core_plugins/babel/new_stylesheet/client/.eslintrc.cjs +24 -0
- package/{helpers/new_stylesheet → src/omega/core_plugins/babel/new_stylesheet/client}/new_stylesheet.js +0 -0
- package/src/omega/core_plugins/babel/regenerator_runtime/babel_plugin_regenerator_runtime_as_jsenv_import.js +34 -0
- package/{helpers/regenerator-runtime/regenerator-runtime.js → src/omega/core_plugins/babel/regenerator_runtime/client/regenerator_runtime.js} +0 -0
- package/src/omega/core_plugins/commonjs_globals/jsenv_plugin_commonjs_globals.js +169 -0
- package/src/omega/core_plugins/file_urls/jsenv_plugin_file_urls.js +67 -0
- package/src/omega/core_plugins/filesystem_magic/jsenv_plugin_filesystem_magic.js +58 -0
- package/src/{internal/browser_client → omega/core_plugins/html_supervisor/client}/error_in_document.js +10 -16
- package/src/{internal/browser_client → omega/core_plugins/html_supervisor/client}/error_in_notification.js +0 -0
- package/src/omega/core_plugins/html_supervisor/client/html_supervisor_installer.js +168 -0
- package/src/omega/core_plugins/html_supervisor/client/html_supervisor_setup.js +77 -0
- package/src/{internal/browser_client → omega/core_plugins/html_supervisor/client}/perf_browser.js +0 -0
- package/src/{internal/runtime_client → omega/core_plugins/html_supervisor/client}/uneval_exception.js +0 -0
- package/src/omega/core_plugins/html_supervisor/jsenv_plugin_html_supervisor.js +233 -0
- package/src/omega/core_plugins/import_assertions/helpers/babel_plugin_metadata_import_assertions.js +98 -0
- package/src/{internal/building/import_assertions → omega/core_plugins/import_assertions/helpers}/json_module.js +3 -2
- package/src/omega/core_plugins/import_assertions/helpers/text_module.js +6 -0
- package/src/omega/core_plugins/import_assertions/jsenv_plugin_import_assertions.js +211 -0
- package/src/omega/core_plugins/import_meta_scenarios/jsenv_plugin_import_meta_scenarios.js +80 -0
- package/src/omega/core_plugins/importmap/jsenv_plugin_importmap.js +212 -0
- package/src/omega/core_plugins/inline/client/inline_content.js +6 -0
- package/src/omega/core_plugins/inline/jsenv_plugin_data_urls.js +70 -0
- package/src/omega/core_plugins/inline/jsenv_plugin_inline.js +13 -0
- package/src/omega/core_plugins/inline/jsenv_plugin_inline_query_param.js +42 -0
- package/src/omega/core_plugins/inline/jsenv_plugin_js_and_css_inside_html.js +142 -0
- package/src/omega/core_plugins/inline/jsenv_plugin_new_inline_content.js +210 -0
- package/src/omega/core_plugins/leading_slash/jsenv_plugin_leading_slash.js +12 -0
- package/src/omega/core_plugins/node_esm_resolution/jsenv_plugin_node_esm_resolution.js +77 -0
- package/src/omega/core_plugins/url_resolution/jsenv_plugin_url_resolution.js +28 -0
- package/src/omega/core_plugins/url_version/jsenv_plugin_url_version.js +50 -0
- package/src/omega/core_plugins.js +39 -0
- package/src/omega/errors.js +168 -0
- package/src/omega/file_url_converter.js +63 -0
- package/src/omega/kitchen.js +777 -0
- package/src/omega/omega_server.js +129 -0
- package/src/omega/plugin_controller.js +240 -0
- package/src/omega/runtime_support/default_runtime_support.js +13 -0
- package/src/omega/runtime_support/features_compatibility.js +91 -0
- package/src/omega/runtime_support/runtime_support.js +20 -0
- package/src/omega/server/file_service.js +155 -0
- package/src/omega/server/user_agent.js +22 -0
- package/src/omega/url_graph/url_graph_load.js +68 -0
- package/src/omega/url_graph/url_graph_report.js +151 -0
- package/src/omega/url_graph/url_graph_sort.js +29 -0
- package/src/omega/url_graph/url_info_transformations.js +161 -0
- package/src/omega/url_graph.js +132 -0
- package/src/omega/url_mentions/css_url_mentions.js +63 -0
- package/src/omega/url_mentions/html_url_mentions.js +185 -0
- package/src/omega/url_mentions/js_module_url_mentions.js +91 -0
- package/src/omega/url_mentions/parse_url_mentions.js +37 -0
- package/src/omega/url_mentions/worker_classic_url_mentions.js +37 -0
- package/src/{internal/executing → test}/execute_plan.js +154 -211
- package/src/{execute_test_plan.js → test/execute_test_plan.js} +26 -81
- package/src/{internal/executing → test}/execution_colors.js +0 -0
- package/src/{internal/executing → test}/execution_steps.js +2 -8
- package/src/{internal/executing → test}/gc.js +0 -0
- package/src/test/logs_file_execution.js +223 -0
- package/dist/browser_client/asset-manifest.json +0 -4
- package/dist/browser_client/browser_client_fb33eaa4.js +0 -5320
- package/dist/browser_client/browser_client_fb33eaa4.js.map +0 -1089
- package/dist/build_manifest.js +0 -12
- package/dist/compile_proxy/asset-manifest.json +0 -4
- package/dist/compile_proxy/compile_proxy.html__inline__20_651d1e7b.js.map +0 -343
- package/dist/compile_proxy/compile_proxy_62f952c4.html +0 -2245
- package/dist/event_source_client/asset-manifest.json +0 -4
- package/dist/event_source_client/event_source_client_69f48287.js +0 -354
- package/dist/event_source_client/event_source_client_69f48287.js.map +0 -128
- package/dist/redirector/asset-manifest.json +0 -4
- package/dist/redirector/redirector.html__inline__12_171e07b4.js.map +0 -349
- package/dist/redirector/redirector_8117ec92.html +0 -2290
- package/dist/toolbar/asset-manifest.json +0 -13
- package/dist/toolbar/assets/compilation.css_7421bd55.map +0 -12
- package/dist/toolbar/assets/eventsource.css_c0c71e7b.map +0 -12
- package/dist/toolbar/assets/execution.css_f3377c10.map +0 -12
- package/dist/toolbar/assets/focus.css_896f3e45.map +0 -12
- package/dist/toolbar/assets/light_theme.css_5bff0336.map +0 -12
- package/dist/toolbar/assets/overflow_menu.css_9a0fc3d8.map +0 -12
- package/dist/toolbar/assets/settings.css_942b5a9e.map +0 -12
- package/dist/toolbar/assets/toolbar_main.css_b1c67dd7.map +0 -28
- package/dist/toolbar/assets/tooltip.css_a94a8bdd.map +0 -12
- package/dist/toolbar/toolbar_b0c9100c.html +0 -4976
- package/dist/toolbar/toolbar_main_f54c1bb0.js.map +0 -776
- package/dist/toolbar_injector/asset-manifest.json +0 -5
- package/dist/toolbar_injector/assets/jsenv_logo_192011c2.svg +0 -95
- package/dist/toolbar_injector/toolbar_injector_65b501eb.js +0 -976
- package/dist/toolbar_injector/toolbar_injector_65b501eb.js.map +0 -294
- package/helpers/import-meta/import-meta-url-commonjs.js +0 -9
- package/helpers/import-meta/import-meta-url-global.js +0 -54
- package/src/build_project.js +0 -336
- package/src/commonjs_to_js_module.js +0 -180
- package/src/dev_server.js +0 -302
- package/src/execute.js +0 -184
- package/src/import_using_child_process.js +0 -68
- package/src/internal/browser_client/browser_client.js +0 -220
- package/src/internal/browser_client/browser_client_factory.js +0 -144
- package/src/internal/browser_client/browser_error_stack_remap.js +0 -43
- package/src/internal/browser_client/browser_system.js +0 -216
- package/src/internal/browser_client/module_namespace_transfer.js +0 -90
- package/src/internal/browser_detection/browser_detection.js +0 -65
- package/src/internal/browser_detection/detect_android.js +0 -13
- package/src/internal/browser_detection/detect_chrome.js +0 -28
- package/src/internal/browser_detection/detect_edge.js +0 -13
- package/src/internal/browser_detection/detect_electron.js +0 -1
- package/src/internal/browser_detection/detect_firefox.js +0 -17
- package/src/internal/browser_detection/detect_internet_explorer.js +0 -14
- package/src/internal/browser_detection/detect_ios.js +0 -19
- package/src/internal/browser_detection/detect_opera.js +0 -27
- package/src/internal/browser_detection/detect_safari.js +0 -13
- package/src/internal/browser_detection/user_agent_data.js +0 -25
- package/src/internal/browser_detection/util.js +0 -13
- package/src/internal/browser_launcher/browser_runtime_profile.js +0 -81
- package/src/internal/browser_launcher/execute_html_file.js +0 -355
- package/src/internal/browser_launcher/from_playwright.js +0 -320
- package/src/internal/browser_launcher/page_errors_and_logs.js +0 -77
- package/src/internal/browser_utils/fetch_and_eval.js +0 -27
- package/src/internal/browser_utils/fetch_and_eval_using_script.js +0 -47
- package/src/internal/browser_utils/fetch_browser.js +0 -34
- package/src/internal/browser_utils/fetch_json.js +0 -7
- package/src/internal/building/build_logs.js +0 -134
- package/src/internal/building/build_stats.js +0 -100
- package/src/internal/building/build_url_generator.js +0 -153
- package/src/internal/building/build_using_rollup.js +0 -359
- package/src/internal/building/css/apply_post_css.js +0 -55
- package/src/internal/building/css/jsenv_parse_css.js +0 -260
- package/src/internal/building/css/move_css_urls.js +0 -44
- package/src/internal/building/css/parse_css_urls.js +0 -38
- package/src/internal/building/css/postcss_plugin_url_visitor.js +0 -245
- package/src/internal/building/css/replace_css_urls.js +0 -68
- package/src/internal/building/global_format/es_to_system.js +0 -34
- package/src/internal/building/html/html_node_mutations.js +0 -29
- package/src/internal/building/html/html_scan.js +0 -70
- package/src/internal/building/html/jsenv_parse_html.js +0 -813
- package/src/internal/building/html/minify_html.js +0 -7
- package/src/internal/building/import_assertions/css_module.js +0 -43
- package/src/internal/building/import_references.js +0 -80
- package/src/internal/building/importmap/jsenv_parse_importmap.js +0 -28
- package/src/internal/building/js/babel_plugin_inline_worker_imports.js +0 -96
- package/src/internal/building/js/jsenv_parse_js.js +0 -122
- package/src/internal/building/js/minify_js.js +0 -33
- package/src/internal/building/js/transform_worker.js +0 -55
- package/src/internal/building/json/jsenv_parse_json.js +0 -11
- package/src/internal/building/parse_ressource.js +0 -207
- package/src/internal/building/ressource_builder.js +0 -1098
- package/src/internal/building/ressource_builder_util.js +0 -194
- package/src/internal/building/rollup_plugin_jsenv.js +0 -1965
- package/src/internal/building/sort_pathnames.js +0 -10
- package/src/internal/building/sourcemap/sourcemap_loader.js +0 -70
- package/src/internal/building/svg/jsenv_parse_svg.js +0 -112
- package/src/internal/building/url_fetcher.js +0 -85
- package/src/internal/building/url_loader.js +0 -127
- package/src/internal/building/url_trace.js +0 -229
- package/src/internal/building/url_versioning/resolve_import_url_helper.js +0 -12
- package/src/internal/building/url_versioning/url_versioning.js +0 -65
- package/src/internal/building/webmanifest/jsenv_parse_webmanifest.js +0 -48
- package/src/internal/compile_server/commonjs/rollup_plugin_commonjs_named_exports.js +0 -187
- package/src/internal/compile_server/compile_file.js +0 -273
- package/src/internal/compile_server/compile_server.js +0 -519
- package/src/internal/compile_server/compiled_file_service.js +0 -264
- package/src/internal/compile_server/html/html_ast.js +0 -534
- package/src/internal/compile_server/html/html_source_file_service.js +0 -453
- package/src/internal/compile_server/html/jsenv_compile_html.js +0 -674
- package/src/internal/compile_server/importmap/jsenv_compile_importmap.js +0 -28
- package/src/internal/compile_server/js/ansi_to_html.js +0 -9
- package/src/internal/compile_server/js/babelHelper.js +0 -145
- package/src/internal/compile_server/js/babel_parse_error.js +0 -9
- package/src/internal/compile_server/js/babel_plugin_global_this_as_jsenv_import.js +0 -34
- package/src/internal/compile_server/js/babel_plugin_import_assertions.js +0 -121
- package/src/internal/compile_server/js/babel_plugin_import_metadata.js +0 -18
- package/src/internal/compile_server/js/babel_plugin_import_visitor.js +0 -84
- package/src/internal/compile_server/js/babel_plugin_new_stylesheet_as_jsenv_import.js +0 -113
- package/src/internal/compile_server/js/babel_plugin_proxy_external_imports.js +0 -31
- package/src/internal/compile_server/js/babel_plugin_regenerator_runtime_as_jsenv_import.js +0 -48
- package/src/internal/compile_server/js/babel_plugin_replace_expressions.js +0 -101
- package/src/internal/compile_server/js/babel_plugin_systemjs_prepend.js +0 -23
- package/src/internal/compile_server/js/babel_plugin_transform_import_meta.js +0 -134
- package/src/internal/compile_server/js/babel_plugins.js +0 -37
- package/src/internal/compile_server/js/generateBabelHelper.js +0 -36
- package/src/internal/compile_server/js/js_transformer.js +0 -195
- package/src/internal/compile_server/js/jsenv_compile_js.js +0 -62
- package/src/internal/compile_server/js/load_babel_plugin_map_from_file.js +0 -49
- package/src/internal/compile_server/jsenv_directory/comparison_utils.js +0 -27
- package/src/internal/compile_server/jsenv_directory/compilation_result.js +0 -243
- package/src/internal/compile_server/jsenv_directory/compilation_result_from_build.js +0 -184
- package/src/internal/compile_server/jsenv_directory/compile_asset.js +0 -24
- package/src/internal/compile_server/jsenv_directory/compile_context.js +0 -60
- package/src/internal/compile_server/jsenv_directory/compile_profile.js +0 -217
- package/src/internal/compile_server/jsenv_directory/file_lock_registry.js +0 -24
- package/src/internal/compile_server/jsenv_directory/file_lock_registry.test.js +0 -47
- package/src/internal/compile_server/jsenv_directory/fs_optimized_for_cache.js +0 -57
- package/src/internal/compile_server/jsenv_directory/jsenv_directory.js +0 -183
- package/src/internal/compile_server/jsenv_directory/reuse_or_create_compiled_file.js +0 -269
- package/src/internal/compile_server/jsenv_directory/update_compile_cache.js +0 -131
- package/src/internal/compile_server/jsenv_directory/validate_compile_cache.js +0 -264
- package/src/internal/compile_server/sse_service/sse_service.js +0 -369
- package/src/internal/coverage/babel_plugin_instrument.js +0 -90
- package/src/internal/coverage/coverage_reporter_html_directory.js +0 -37
- package/src/internal/coverage/coverage_reporter_json_file.js +0 -22
- package/src/internal/coverage/coverage_reporter_text_log.js +0 -20
- package/src/internal/coverage/empty_coverage_factory.js +0 -70
- package/src/internal/coverage/file_by_file_coverage.js +0 -28
- package/src/internal/coverage/istanbul_coverage_composition.js +0 -28
- package/src/internal/coverage/istanbul_coverage_map_from_coverage.js +0 -16
- package/src/internal/coverage/list_files_not_covered.js +0 -20
- package/src/internal/coverage/missing_coverage.js +0 -46
- package/src/internal/coverage/report_to_coverage.js +0 -198
- package/src/internal/coverage/v8_and_istanbul.js +0 -38
- package/src/internal/coverage/v8_coverage_composition.js +0 -23
- package/src/internal/coverage/v8_coverage_from_directory.js +0 -86
- package/src/internal/coverage/v8_coverage_to_istanbul.js +0 -100
- package/src/internal/data_url.js +0 -54
- package/src/internal/dev_server/event_source_client/event_source_client.js +0 -63
- package/src/internal/dev_server/event_source_client/file_changes.js +0 -82
- package/src/internal/dev_server/event_source_client/livereload_preference.js +0 -13
- package/src/internal/dev_server/exploring/exploring.css +0 -237
- package/src/internal/dev_server/exploring/exploring.html +0 -79
- package/src/internal/dev_server/exploring/exploring.js +0 -243
- package/src/internal/dev_server/exploring/fetch_exploring_json.js +0 -19
- package/src/internal/dev_server/toolbar/compilation/compilation.css +0 -23
- package/src/internal/dev_server/toolbar/compilation/toolbar_compilation.js +0 -202
- package/src/internal/dev_server/toolbar/eventsource/toolbar_eventsource.js +0 -83
- package/src/internal/dev_server/toolbar/execution/toolbar_execution.js +0 -91
- package/src/internal/error_stack_remap/install_error_stack_remapping.js +0 -142
- package/src/internal/error_stack_remap/remap_call_site.js +0 -315
- package/src/internal/error_stack_remap/remap_stack.js +0 -218
- package/src/internal/error_stack_remap/stringify_stack.js +0 -9
- package/src/internal/executing/launch_and_execute.js +0 -458
- package/src/internal/executing/logs_file_execution.js +0 -160
- package/src/internal/executing/logs_plan_summary.js +0 -144
- package/src/internal/features/browser_feature_detection/browser_feature_detect_dynamic_import.js +0 -20
- package/src/internal/features/browser_feature_detection/browser_feature_detect_import_assertions_css.js +0 -23
- package/src/internal/features/browser_feature_detection/browser_feature_detect_import_assertions_json.js +0 -25
- package/src/internal/features/browser_feature_detection/browser_feature_detect_importmap.js +0 -37
- package/src/internal/features/browser_feature_detection/browser_feature_detect_new_stylesheet.js +0 -9
- package/src/internal/features/browser_feature_detection/browser_feature_detect_top_level_await.js +0 -14
- package/src/internal/features/browser_feature_detection/browser_feature_detection.js +0 -89
- package/src/internal/features/browser_feature_detection/compile_proxy.html +0 -27
- package/src/internal/features/browser_feature_detection/execute_with_script_module.js +0 -24
- package/src/internal/features/features_compat_from_runtime.js +0 -38
- package/src/internal/features/features_compat_from_runtime_support.js +0 -31
- package/src/internal/features/features_compatibility.js +0 -37
- package/src/internal/features/node_feature_detection/feature_detect_dynamic_import.mjs +0 -5
- package/src/internal/features/node_feature_detection/feature_detect_top_level_await.mjs +0 -1
- package/src/internal/features/node_feature_detection/node_feature_detect_dynamic_import.js +0 -5
- package/src/internal/features/node_feature_detection/node_feature_detect_top_level_await.js +0 -16
- package/src/internal/features/node_feature_detection/node_feature_detection.js +0 -66
- package/src/internal/fetching.js +0 -28
- package/src/internal/import_resolution/default_extension.js +0 -40
- package/src/internal/import_resolution/import_resolver_importmap.js +0 -64
- package/src/internal/import_resolution/import_resolver_node.js +0 -254
- package/src/internal/import_resolution/importmap_default.js +0 -37
- package/src/internal/jsenv_builds.js +0 -19
- package/src/internal/jsenv_params_assertions.js +0 -12
- package/src/internal/jsenv_remote_directory.js +0 -156
- package/src/internal/logs/byte.js +0 -10
- package/src/internal/logs/byte_as_file_size.js +0 -9
- package/src/internal/logs/ms_as_duration.js +0 -12
- package/src/internal/memoize.js +0 -24
- package/src/internal/node_launcher/eval_source.js +0 -6
- package/src/internal/node_launcher/fetch_source.js +0 -8
- package/src/internal/node_launcher/node_error_stack_remap.js +0 -22
- package/src/internal/node_launcher/node_execution_dynamic_import.js +0 -75
- package/src/internal/node_launcher/node_execution_performance.js +0 -67
- package/src/internal/node_launcher/node_execution_systemjs.js +0 -125
- package/src/internal/node_launcher/node_runtime_report.js +0 -77
- package/src/internal/node_launcher/node_system.js +0 -192
- package/src/internal/node_launcher/perf_node.js +0 -13
- package/src/internal/node_launcher/process_options.js +0 -46
- package/src/internal/node_launcher/value_install.js +0 -14
- package/src/internal/origin_directory_converter.js +0 -62
- package/src/internal/promise_race.js +0 -19
- package/src/internal/redirector/redirector.html +0 -40
- package/src/internal/regexp_escape.js +0 -34
- package/src/internal/require.js +0 -3
- package/src/internal/response_validation.js +0 -130
- package/src/internal/runtime_client/module_registration.js +0 -207
- package/src/internal/runtime_client/s.js +0 -864
- package/src/internal/runtime_client/s.js.md +0 -1
- package/src/internal/runtime_support/jsenv_runtime_support.js +0 -15
- package/src/internal/runtime_support/runtime_support.js +0 -70
- package/src/internal/semantic_versioning/compare_versions.js +0 -28
- package/src/internal/semantic_versioning/highest_version.js +0 -11
- package/src/internal/semantic_versioning/is_above.js +0 -5
- package/src/internal/semantic_versioning/is_below.js +0 -5
- package/src/internal/semantic_versioning/is_equal.js +0 -3
- package/src/internal/semantic_versioning/lowest_version.js +0 -11
- package/src/internal/semantic_versioning/version_from_value.js +0 -42
- package/src/internal/sourcemap_utils.js +0 -112
- package/src/internal/template_string_escape.js +0 -20
- package/src/internal/url_conversion.js +0 -313
- package/src/internal/url_utils.js +0 -33
- package/src/internal/url_utils.test.js +0 -39
- package/src/internal/windows_file_path_utils.js +0 -16
- package/src/jsenv_file_urls.js +0 -35
- package/src/jsenv_service_worker_finalizer.js +0 -55
- package/src/json_to_js_module.js +0 -13
- package/src/node_runtime.js +0 -227
- package/src/require_using_child_process.js +0 -67
- package/src/text_to_js_module.js +0 -13
|
@@ -0,0 +1,607 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>Exploring</title>
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<meta charset="utf-8" />
|
|
7
|
+
<link rel="icon" href="FAVICON_HREF" />
|
|
8
|
+
<style>
|
|
9
|
+
button:focus,
|
|
10
|
+
a:focus,
|
|
11
|
+
input:focus,
|
|
12
|
+
*[data-contains-hidden-input] input:focus + * {
|
|
13
|
+
outline-style: none;
|
|
14
|
+
outline-offset: -2px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
*[data-contains-hidden-input] input:focus + * {
|
|
18
|
+
outline-width: 4px;
|
|
19
|
+
outline-offset: -2px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
html[data-last-interaction="keyboard"] button:focus,
|
|
23
|
+
html[data-last-interaction="keyboard"] a:focus,
|
|
24
|
+
html[data-last-interaction="keyboard"] input:focus,
|
|
25
|
+
html[data-last-interaction="keyboard"]
|
|
26
|
+
*[data-contains-hidden-input]
|
|
27
|
+
input:focus
|
|
28
|
+
+ * {
|
|
29
|
+
outline-style: auto;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
html[data-last-interaction="keyboard"]
|
|
33
|
+
*[data-contains-hidden-input]
|
|
34
|
+
input:focus
|
|
35
|
+
+ * {
|
|
36
|
+
outline-color: rgb(0, 150, 255);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
Don't try to replace @-moz-document url-prefix() this by
|
|
41
|
+
-moz-outline or -moz-outline-color
|
|
42
|
+
Because firefox would take into account outline instead of -moz-outline
|
|
43
|
+
:moz-focus-ring
|
|
44
|
+
Because for some element we set the focus outline on a div which would not match :focusring
|
|
45
|
+
*/
|
|
46
|
+
@-moz-document url-prefix() {
|
|
47
|
+
html[data-last-interaction="keyboard"] button:focus,
|
|
48
|
+
html[data-last-interaction="keyboard"] a:focus,
|
|
49
|
+
html[data-last-interaction="keyboard"] input:focus,
|
|
50
|
+
html[data-last-interaction="keyboard"]
|
|
51
|
+
*[data-input-customized]
|
|
52
|
+
input:focus
|
|
53
|
+
+ * {
|
|
54
|
+
outline-width: 2px;
|
|
55
|
+
outline-offset: 0;
|
|
56
|
+
outline-style: solid;
|
|
57
|
+
/*
|
|
58
|
+
force a blue color for firefox otherwise
|
|
59
|
+
it uses outline-color: inherit
|
|
60
|
+
making it unpredictible and sometimes hard to see
|
|
61
|
+
*/
|
|
62
|
+
outline-color: rgb(0, 150, 255);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
::-moz-focus-inner {
|
|
66
|
+
border: 0;
|
|
67
|
+
}
|
|
68
|
+
</style>
|
|
69
|
+
<style>
|
|
70
|
+
/* reset stuff */
|
|
71
|
+
* {
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
[data-force-hide] {
|
|
76
|
+
display: none !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
html,
|
|
80
|
+
body {
|
|
81
|
+
margin: 0;
|
|
82
|
+
padding: 0;
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
flex: 1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
html {
|
|
89
|
+
font-family: arial, sans;
|
|
90
|
+
height: 100%;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
main {
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
flex: 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
main > * {
|
|
100
|
+
min-width: 100%;
|
|
101
|
+
flex: 1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
hr {
|
|
105
|
+
color: black;
|
|
106
|
+
background-color: black;
|
|
107
|
+
border-color: black;
|
|
108
|
+
margin: 15px 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
article[data-page="file-list"] {
|
|
112
|
+
background-color: #204143;
|
|
113
|
+
color: #97a0a0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
nav,
|
|
117
|
+
#explorables-message {
|
|
118
|
+
background: #1f262c;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
#explorables nav {
|
|
122
|
+
/* overflow hidden to ensure it wraps li which have margins
|
|
123
|
+
otherwise the background color is not the one from <nav> */
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
#explorables-message {
|
|
128
|
+
overflow: auto; /* propagate background to margins cause by h4 inside */
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
article h2 {
|
|
132
|
+
margin: 0;
|
|
133
|
+
display: flex;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
article h2 svg {
|
|
137
|
+
margin-right: 15px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
#main_html_file {
|
|
141
|
+
padding: 25px;
|
|
142
|
+
padding-bottom: 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
#main_file_link {
|
|
146
|
+
color: #e7f2f3;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
h2 {
|
|
150
|
+
margin: 20px 0;
|
|
151
|
+
color: #24b1b0;
|
|
152
|
+
display: inline-block;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
h4 {
|
|
156
|
+
font-weight: normal;
|
|
157
|
+
font-size: 15px;
|
|
158
|
+
color: #97a0a0;
|
|
159
|
+
padding: 0 25px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
#explorables {
|
|
163
|
+
word-break: break-word;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
#explorables-header {
|
|
167
|
+
/* padding-bottom: 10px; */
|
|
168
|
+
width: 100%;
|
|
169
|
+
position: sticky;
|
|
170
|
+
top: 0;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
#explorables_header_and_menu {
|
|
174
|
+
padding-left: 25px;
|
|
175
|
+
padding-right: 25px;
|
|
176
|
+
padding-top: 25px;
|
|
177
|
+
background-color: #204143;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
#explorables_header_bottom_spacing {
|
|
181
|
+
height: 20px;
|
|
182
|
+
background: #1f262c;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
#directory_relative_url {
|
|
186
|
+
color: orange;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
#explorables ul {
|
|
190
|
+
padding: 0px 25px 25px 25px;
|
|
191
|
+
margin: 0;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
#explorables li {
|
|
195
|
+
list-style-type: none;
|
|
196
|
+
margin: 10px 0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
#explorables li:first-child {
|
|
200
|
+
margin-top: 0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
#explorables li .execution-link {
|
|
204
|
+
width: 100%;
|
|
205
|
+
word-break: break-all;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.execution-link {
|
|
209
|
+
background: #204143;
|
|
210
|
+
padding: 6px 12px;
|
|
211
|
+
font-size: 14px;
|
|
212
|
+
display: inline-block;
|
|
213
|
+
color: #e7f2f3;
|
|
214
|
+
font-family: monospace;
|
|
215
|
+
text-decoration: unset;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* icons */
|
|
219
|
+
#main_file_icon {
|
|
220
|
+
fill: #24b1b0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
#fileIconSvgConfig {
|
|
224
|
+
width: 25px;
|
|
225
|
+
height: 25px;
|
|
226
|
+
stroke: none;
|
|
227
|
+
fill: #24b1b0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
#explorables fieldset {
|
|
231
|
+
border: none;
|
|
232
|
+
padding: 0;
|
|
233
|
+
margin: 0;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
#explorables fieldset label {
|
|
237
|
+
display: inline-block;
|
|
238
|
+
padding: 0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
#explorables fieldset input {
|
|
242
|
+
opacity: 0;
|
|
243
|
+
position: absolute;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
#explorables fieldset label input + * {
|
|
247
|
+
display: block;
|
|
248
|
+
padding: 0.7em 1em;
|
|
249
|
+
background-color: #204143;
|
|
250
|
+
border-radius: 0.1em;
|
|
251
|
+
min-width: 8em;
|
|
252
|
+
text-align: center;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
#explorables fieldset input:checked + * {
|
|
256
|
+
color: orange;
|
|
257
|
+
background: #1f262c;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* scrolable menu */
|
|
261
|
+
.menu-wrapper {
|
|
262
|
+
position: relative;
|
|
263
|
+
max-width: 100%;
|
|
264
|
+
overflow-x: hidden;
|
|
265
|
+
overflow-y: hidden;
|
|
266
|
+
transition: 300ms;
|
|
267
|
+
margin-top: 25px;
|
|
268
|
+
}
|
|
269
|
+
.menu {
|
|
270
|
+
box-sizing: border-box;
|
|
271
|
+
white-space: nowrap;
|
|
272
|
+
overflow-x: auto;
|
|
273
|
+
overflow-y: hidden;
|
|
274
|
+
-webkit-overflow-scrolling: touch;
|
|
275
|
+
}
|
|
276
|
+
.menu .item {
|
|
277
|
+
display: inline-block;
|
|
278
|
+
height: 100%;
|
|
279
|
+
padding: 1em;
|
|
280
|
+
box-sizing: border-box;
|
|
281
|
+
}
|
|
282
|
+
.paddle {
|
|
283
|
+
position: absolute;
|
|
284
|
+
height: 36px;
|
|
285
|
+
bottom: 0;
|
|
286
|
+
border: none;
|
|
287
|
+
background: #24b1b0;
|
|
288
|
+
color: #1f262c;
|
|
289
|
+
}
|
|
290
|
+
.left-paddle {
|
|
291
|
+
left: 0;
|
|
292
|
+
}
|
|
293
|
+
.right-paddle {
|
|
294
|
+
right: 0;
|
|
295
|
+
}
|
|
296
|
+
.hidden {
|
|
297
|
+
display: none;
|
|
298
|
+
}
|
|
299
|
+
</style>
|
|
300
|
+
</head>
|
|
301
|
+
|
|
302
|
+
<body>
|
|
303
|
+
<main></main>
|
|
304
|
+
<div style="display: none">
|
|
305
|
+
<article data-page="file-list">
|
|
306
|
+
<!--
|
|
307
|
+
<section id="main_html_file">
|
|
308
|
+
<h2>
|
|
309
|
+
<svg id="main_file_icon" viewBox="0 0 16 16" width="25px" height="25px">
|
|
310
|
+
<path
|
|
311
|
+
d="M15.45,7L14,5.551V2c0-0.55-0.45-1-1-1h-1c-0.55,0-1,0.45-1,1v0.553L9,0.555C8.727,0.297,8.477,0,8,0S7.273,0.297,7,0.555 L0.55,7C0.238,7.325,0,7.562,0,8c0,0.563,0.432,1,1,1h1v6c0,0.55,0.45,1,1,1h3v-5c0-0.55,0.45-1,1-1h2c0.55,0,1,0.45,1,1v5h3 c0.55,0,1-0.45,1-1V9h1c0.568,0,1-0.437,1-1C16,7.562,15.762,7.325,15.45,7z"
|
|
312
|
+
/>
|
|
313
|
+
</svg>
|
|
314
|
+
<span
|
|
315
|
+
>Main html file:
|
|
316
|
+
<a id="main_file_link" href="javascript:void(0)">${mainFileRelativeUrl}</a></span
|
|
317
|
+
>
|
|
318
|
+
</h2>
|
|
319
|
+
<div>
|
|
320
|
+
<iframe id="main_file_iframe" src="about:blank"></iframe>
|
|
321
|
+
</div>
|
|
322
|
+
</section>
|
|
323
|
+
<hr />
|
|
324
|
+
!-->
|
|
325
|
+
<section id="explorables">
|
|
326
|
+
<div id="explorables-header">
|
|
327
|
+
<div id="explorables_header_and_menu">
|
|
328
|
+
<h2 style="white-space: nowrap">
|
|
329
|
+
<svg
|
|
330
|
+
id="fileIconSvgConfig"
|
|
331
|
+
viewBox="0 0 24 24"
|
|
332
|
+
width="32"
|
|
333
|
+
height="32"
|
|
334
|
+
>
|
|
335
|
+
<path d="M0 0h24v24H0V0z" fill="none" />
|
|
336
|
+
<path
|
|
337
|
+
d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"
|
|
338
|
+
/>
|
|
339
|
+
</svg>
|
|
340
|
+
<span
|
|
341
|
+
>File(s) to explore in
|
|
342
|
+
<span id="directory_relative_url" title="${directoryUrl}"
|
|
343
|
+
>${directoryName}</span
|
|
344
|
+
></span
|
|
345
|
+
>
|
|
346
|
+
</h2>
|
|
347
|
+
<div class="menu-wrapper">
|
|
348
|
+
<fieldset id="filter-group-set" class="menu"></fieldset>
|
|
349
|
+
</div>
|
|
350
|
+
<div class="paddles">
|
|
351
|
+
<button class="left-paddle paddle hidden"><</button>
|
|
352
|
+
<button class="right-paddle paddle">></button>
|
|
353
|
+
</div>
|
|
354
|
+
</div>
|
|
355
|
+
<div id="explorables_header_bottom_spacing"></div>
|
|
356
|
+
</div>
|
|
357
|
+
<div>
|
|
358
|
+
<div id="explorables-message">
|
|
359
|
+
<h4 style="margin-top: 0">${message}</h4>
|
|
360
|
+
</div>
|
|
361
|
+
<nav>
|
|
362
|
+
<ul></ul>
|
|
363
|
+
</nav>
|
|
364
|
+
</div>
|
|
365
|
+
</section>
|
|
366
|
+
</article>
|
|
367
|
+
</div>
|
|
368
|
+
<script>
|
|
369
|
+
// eslint-disable-next-line no-undef
|
|
370
|
+
const { rootDirectoryUrl, groups, files } = SERVER_PARAMS
|
|
371
|
+
|
|
372
|
+
const groupPreference = {
|
|
373
|
+
has: () => localStorage.hasOwnProperty("explorer_active_group"),
|
|
374
|
+
get: () =>
|
|
375
|
+
localStorage.hasOwnProperty("explorer_active_group")
|
|
376
|
+
? JSON.parse(localStorage.getItem("explorer_active_group"))
|
|
377
|
+
: undefined,
|
|
378
|
+
set: (value) =>
|
|
379
|
+
localStorage.setItem("explorer_active_group", JSON.stringify(value)),
|
|
380
|
+
}
|
|
381
|
+
const directoryNameFromUrl = (directoryUrl) => {
|
|
382
|
+
const slashLastIndex = directoryUrl.lastIndexOf(
|
|
383
|
+
"/",
|
|
384
|
+
// ignore last slash
|
|
385
|
+
directoryUrl.length - 2,
|
|
386
|
+
)
|
|
387
|
+
if (slashLastIndex === -1) return ""
|
|
388
|
+
return directoryUrl.slice(slashLastIndex + 1)
|
|
389
|
+
}
|
|
390
|
+
const urlToVisitFromRelativeUrl = (relativeUrl) => {
|
|
391
|
+
return `${window.origin}/${relativeUrl}`
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
const fileListElement = document
|
|
395
|
+
.querySelector(`[data-page="file-list"]`)
|
|
396
|
+
.cloneNode(true)
|
|
397
|
+
const directoryName = directoryNameFromUrl(rootDirectoryUrl)
|
|
398
|
+
const span = fileListElement.querySelector("#directory_relative_url")
|
|
399
|
+
span.title = rootDirectoryUrl
|
|
400
|
+
span.textContent = directoryName
|
|
401
|
+
|
|
402
|
+
const h4 = fileListElement.querySelector("h4")
|
|
403
|
+
const ul = fileListElement.querySelector("ul")
|
|
404
|
+
ul.innerHTML = files
|
|
405
|
+
.map(
|
|
406
|
+
(file) =>
|
|
407
|
+
`<li>
|
|
408
|
+
<a
|
|
409
|
+
class="execution-link"
|
|
410
|
+
data-relative-url=${file.relativeUrl}
|
|
411
|
+
href=${urlToVisitFromRelativeUrl(file.relativeUrl)}
|
|
412
|
+
>
|
|
413
|
+
${file.relativeUrl}
|
|
414
|
+
</a>
|
|
415
|
+
</li>`,
|
|
416
|
+
)
|
|
417
|
+
.join("")
|
|
418
|
+
|
|
419
|
+
const groupFieldset = fileListElement.querySelector("#filter-group-set")
|
|
420
|
+
const groupNames = Object.keys(groups)
|
|
421
|
+
groupFieldset.innerHTML = groupNames
|
|
422
|
+
.map(
|
|
423
|
+
(key) => `<label data-contains-hidden-input class="item">
|
|
424
|
+
<input type="radio" name="filter-group" value="${key}"/>
|
|
425
|
+
<span>${key}</span>
|
|
426
|
+
</label>`,
|
|
427
|
+
)
|
|
428
|
+
.join("")
|
|
429
|
+
|
|
430
|
+
const groupFromLocalStorage = groupPreference.get()
|
|
431
|
+
const currentGroup =
|
|
432
|
+
groupFromLocalStorage && groupNames.includes(groupFromLocalStorage)
|
|
433
|
+
? groupFromLocalStorage
|
|
434
|
+
: groupNames[0]
|
|
435
|
+
Array.from(groupFieldset.querySelectorAll("input")).forEach(
|
|
436
|
+
(inputRadio) => {
|
|
437
|
+
inputRadio.checked = inputRadio.value === currentGroup
|
|
438
|
+
inputRadio.onchange = () => {
|
|
439
|
+
if (inputRadio.checked) {
|
|
440
|
+
groupPreference.set(inputRadio.value)
|
|
441
|
+
enableGroup(inputRadio.value)
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
)
|
|
446
|
+
|
|
447
|
+
const enableGroup = (groupName) => {
|
|
448
|
+
const arrayOfElementToShow = []
|
|
449
|
+
const arrayOfElementToHide = []
|
|
450
|
+
files.forEach((file) => {
|
|
451
|
+
const fileLink = fileListElement.querySelector(
|
|
452
|
+
`a[data-relative-url="${file.relativeUrl}"]`,
|
|
453
|
+
)
|
|
454
|
+
const fileLi = fileLink.parentNode
|
|
455
|
+
if (file.meta[groupName]) {
|
|
456
|
+
arrayOfElementToShow.push(fileLi)
|
|
457
|
+
} else {
|
|
458
|
+
arrayOfElementToHide.push(fileLi)
|
|
459
|
+
}
|
|
460
|
+
})
|
|
461
|
+
arrayOfElementToShow.forEach((element) => {
|
|
462
|
+
element.removeAttribute("data-force-hide")
|
|
463
|
+
})
|
|
464
|
+
arrayOfElementToHide.forEach((element) => {
|
|
465
|
+
element.setAttribute("data-force-hide", "")
|
|
466
|
+
})
|
|
467
|
+
|
|
468
|
+
h4.innerHTML =
|
|
469
|
+
arrayOfElementToShow.length === 0
|
|
470
|
+
? `No file found.
|
|
471
|
+
Config for this section: <pre>${JSON.stringify(
|
|
472
|
+
groups[groupName],
|
|
473
|
+
null,
|
|
474
|
+
" ",
|
|
475
|
+
)}</pre>`
|
|
476
|
+
: `${arrayOfElementToShow.length} files found. Click on the one you want to execute`
|
|
477
|
+
}
|
|
478
|
+
enableGroup(currentGroup)
|
|
479
|
+
|
|
480
|
+
document.querySelector("main").appendChild(fileListElement)
|
|
481
|
+
</script>
|
|
482
|
+
<script>
|
|
483
|
+
// make menu scrollable
|
|
484
|
+
const getMenuWrapperSize = () => {
|
|
485
|
+
return document.querySelector(".menu-wrapper").getBoundingClientRect()
|
|
486
|
+
.width
|
|
487
|
+
}
|
|
488
|
+
const getMenuSize = () => {
|
|
489
|
+
return document.querySelector(".menu").getBoundingClientRect().width
|
|
490
|
+
}
|
|
491
|
+
const getMenuPosition = () => {
|
|
492
|
+
return document.querySelector(".menu-wrapper").scrollLeft
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
let menuWrapperSize = getMenuWrapperSize()
|
|
496
|
+
let menuSize = getMenuSize()
|
|
497
|
+
const menuVisibleSize = menuWrapperSize
|
|
498
|
+
let menuInvisibleSize = menuSize - menuVisibleSize
|
|
499
|
+
const scrollDuration = 300
|
|
500
|
+
const leftPaddle = document.querySelector(".left-paddle")
|
|
501
|
+
const rightPaddle = document.querySelector(".right-paddle")
|
|
502
|
+
|
|
503
|
+
const handleMenuScroll = () => {
|
|
504
|
+
menuInvisibleSize = menuSize - menuWrapperSize
|
|
505
|
+
const menuPosition = getMenuPosition()
|
|
506
|
+
const menuEndOffset = menuInvisibleSize
|
|
507
|
+
// show & hide the paddles, depending on scroll position
|
|
508
|
+
if (menuPosition <= 0 && menuEndOffset <= 0) {
|
|
509
|
+
// hide both paddles if the window is large enough to display all tabs
|
|
510
|
+
leftPaddle.classList.add("hidden")
|
|
511
|
+
rightPaddle.classList.add("hidden")
|
|
512
|
+
} else if (menuPosition <= 0) {
|
|
513
|
+
leftPaddle.classList.add("hidden")
|
|
514
|
+
rightPaddle.classList.remove("hidden")
|
|
515
|
+
} else if (menuPosition < Math.floor(menuEndOffset)) {
|
|
516
|
+
// show both paddles in the middle
|
|
517
|
+
leftPaddle.classList.remove("hidden")
|
|
518
|
+
rightPaddle.classList.remove("hidden")
|
|
519
|
+
} else if (menuPosition >= Math.floor(menuEndOffset)) {
|
|
520
|
+
leftPaddle.classList.remove("hidden")
|
|
521
|
+
rightPaddle.classList.add("hidden")
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
handleMenuScroll()
|
|
525
|
+
|
|
526
|
+
window.onresize = () => {
|
|
527
|
+
menuWrapperSize = getMenuWrapperSize()
|
|
528
|
+
menuSize = getMenuSize()
|
|
529
|
+
handleMenuScroll()
|
|
530
|
+
}
|
|
531
|
+
// finally, what happens when we are actually scrolling the menu
|
|
532
|
+
document.querySelector(".menu-wrapper").onscroll = () => {
|
|
533
|
+
handleMenuScroll()
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
const startJavaScriptAnimation = ({
|
|
537
|
+
duration = 300,
|
|
538
|
+
timingFunction = (t) => t,
|
|
539
|
+
onProgress = () => {},
|
|
540
|
+
onCancel = () => {},
|
|
541
|
+
onComplete = () => {},
|
|
542
|
+
}) => {
|
|
543
|
+
duration = parseInt(duration, 10)
|
|
544
|
+
const startMs = performance.now()
|
|
545
|
+
let currentRequestAnimationFrameId
|
|
546
|
+
let done = false
|
|
547
|
+
let rawProgress = 0
|
|
548
|
+
let progress = 0
|
|
549
|
+
const handler = () => {
|
|
550
|
+
currentRequestAnimationFrameId = null
|
|
551
|
+
const nowMs = performance.now()
|
|
552
|
+
rawProgress = Math.min((nowMs - startMs) / duration, 1)
|
|
553
|
+
progress = timingFunction(rawProgress)
|
|
554
|
+
done = rawProgress === 1
|
|
555
|
+
onProgress({
|
|
556
|
+
done,
|
|
557
|
+
rawProgress,
|
|
558
|
+
progress,
|
|
559
|
+
})
|
|
560
|
+
if (done) {
|
|
561
|
+
onComplete()
|
|
562
|
+
} else {
|
|
563
|
+
currentRequestAnimationFrameId =
|
|
564
|
+
window.requestAnimationFrame(handler)
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
handler()
|
|
568
|
+
const stop = () => {
|
|
569
|
+
if (currentRequestAnimationFrameId) {
|
|
570
|
+
window.cancelAnimationFrame(currentRequestAnimationFrameId)
|
|
571
|
+
currentRequestAnimationFrameId = null
|
|
572
|
+
}
|
|
573
|
+
if (!done) {
|
|
574
|
+
done = true
|
|
575
|
+
onCancel({
|
|
576
|
+
rawProgress,
|
|
577
|
+
progress,
|
|
578
|
+
})
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
return stop
|
|
582
|
+
}
|
|
583
|
+
rightPaddle.onclick = () => {
|
|
584
|
+
const scrollStart = document.querySelector(".menu-wrapper").scrollLeft
|
|
585
|
+
const scrollEnd = scrollStart + menuWrapperSize
|
|
586
|
+
startJavaScriptAnimation({
|
|
587
|
+
duration: scrollDuration,
|
|
588
|
+
onProgress: ({ progress }) => {
|
|
589
|
+
document.querySelector(".menu-wrapper").scrollLeft =
|
|
590
|
+
scrollStart + (scrollEnd - scrollStart) * progress
|
|
591
|
+
},
|
|
592
|
+
})
|
|
593
|
+
}
|
|
594
|
+
leftPaddle.onclick = () => {
|
|
595
|
+
const scrollStart = document.querySelector(".menu-wrapper").scrollLeft
|
|
596
|
+
const scrollEnd = scrollStart - menuWrapperSize
|
|
597
|
+
startJavaScriptAnimation({
|
|
598
|
+
duration: scrollDuration,
|
|
599
|
+
onProgress: ({ progress }) => {
|
|
600
|
+
document.querySelector(".menu-wrapper").scrollLeft =
|
|
601
|
+
scrollStart + (scrollEnd - scrollStart) * progress
|
|
602
|
+
},
|
|
603
|
+
})
|
|
604
|
+
}
|
|
605
|
+
</script>
|
|
606
|
+
</body>
|
|
607
|
+
</html>
|
|
File without changes
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs"
|
|
2
|
+
import { urlToContentType } from "@jsenv/server"
|
|
3
|
+
import { collectFiles, normalizeStructuredMetaMap } from "@jsenv/filesystem"
|
|
4
|
+
|
|
5
|
+
import { DataUrl } from "@jsenv/utils/urls/data_url.js"
|
|
6
|
+
|
|
7
|
+
export const jsenvPluginExplorer = ({ groups }) => {
|
|
8
|
+
const htmlClientFileUrl = new URL("./client/explorer.html", import.meta.url)
|
|
9
|
+
const faviconClientFileUrl = new URL("./client/jsenv.png", import.meta.url)
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
name: "jsenv:explorer",
|
|
13
|
+
appliesDuring: {
|
|
14
|
+
dev: true,
|
|
15
|
+
},
|
|
16
|
+
serve: async (request, { rootDirectoryUrl }) => {
|
|
17
|
+
if (request.ressource !== "/") {
|
|
18
|
+
return null
|
|
19
|
+
}
|
|
20
|
+
const structuredMetaMapRelativeForExplorable = {}
|
|
21
|
+
Object.keys(groups).forEach((groupName) => {
|
|
22
|
+
const groupConfig = groups[groupName]
|
|
23
|
+
structuredMetaMapRelativeForExplorable[groupName] = {
|
|
24
|
+
"**/.jsenv/": false, // avoid visting .jsenv directory in jsenv itself
|
|
25
|
+
...groupConfig,
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
const structuredMetaMapForExplorable = normalizeStructuredMetaMap(
|
|
29
|
+
structuredMetaMapRelativeForExplorable,
|
|
30
|
+
rootDirectoryUrl,
|
|
31
|
+
)
|
|
32
|
+
const matchingFileResultArray = await collectFiles({
|
|
33
|
+
directoryUrl: rootDirectoryUrl,
|
|
34
|
+
structuredMetaMap: structuredMetaMapForExplorable,
|
|
35
|
+
predicate: (meta) =>
|
|
36
|
+
Object.keys(meta).some((group) => Boolean(meta[group])),
|
|
37
|
+
})
|
|
38
|
+
const files = matchingFileResultArray.map(({ relativeUrl, meta }) => ({
|
|
39
|
+
relativeUrl,
|
|
40
|
+
meta,
|
|
41
|
+
}))
|
|
42
|
+
let html = String(readFileSync(new URL(htmlClientFileUrl)))
|
|
43
|
+
html = html.replace(
|
|
44
|
+
"FAVICON_HREF",
|
|
45
|
+
DataUrl.stringify({
|
|
46
|
+
contentType: urlToContentType(faviconClientFileUrl),
|
|
47
|
+
base64Flag: true,
|
|
48
|
+
data: readFileSync(new URL(faviconClientFileUrl)).toString("base64"),
|
|
49
|
+
}),
|
|
50
|
+
)
|
|
51
|
+
html = html.replace(
|
|
52
|
+
"SERVER_PARAMS",
|
|
53
|
+
JSON.stringify(
|
|
54
|
+
{
|
|
55
|
+
rootDirectoryUrl,
|
|
56
|
+
groups,
|
|
57
|
+
files,
|
|
58
|
+
},
|
|
59
|
+
null,
|
|
60
|
+
" ",
|
|
61
|
+
),
|
|
62
|
+
)
|
|
63
|
+
return {
|
|
64
|
+
status: 200,
|
|
65
|
+
headers: {
|
|
66
|
+
"cache-control": "no-store",
|
|
67
|
+
"content-type": "text/html",
|
|
68
|
+
"content-length": Buffer.byteLength(html),
|
|
69
|
+
},
|
|
70
|
+
body: html,
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
}
|
|
File without changes
|
package/src/{internal/dev_server/toolbar → dev/plugins/toolbar/client}/eventsource/eventsource.css
RENAMED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
height: 40px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
#eventsource-indicator .event-source-
|
|
10
|
+
#eventsource-indicator .event-source-autoreload {
|
|
11
11
|
position: absolute;
|
|
12
12
|
width: 32px;
|
|
13
13
|
height: 32px;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
top: 0;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.event-source-
|
|
19
|
+
.event-source-autoreload[data-variant="enabled"] {
|
|
20
20
|
color: green;
|
|
21
21
|
}
|
|
22
22
|
|