@jsenv/core 25.4.5 → 25.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/browser_runtime/asset-manifest.json +2 -2
  2. package/dist/browser_runtime/browser_runtime_27a156f1.js +5297 -0
  3. package/dist/browser_runtime/browser_runtime_27a156f1.js.map +1089 -0
  4. package/dist/build_manifest.js +6 -6
  5. package/dist/compile_proxy/asset-manifest.json +1 -1
  6. package/dist/compile_proxy/{compile_proxy_ab528227.html → compile_proxy_f2f16cc6.html} +3 -2
  7. package/dist/event_source_client/asset-manifest.json +2 -2
  8. package/dist/event_source_client/event_source_client_69f48287.js +354 -0
  9. package/dist/event_source_client/{event_source_client_80644aee.js.map → event_source_client_69f48287.js.map} +2 -2
  10. package/dist/redirector/asset-manifest.json +1 -1
  11. package/dist/redirector/{redirector_6df2620a.html → redirector_eef2bb25.html} +3 -2
  12. package/dist/toolbar/asset-manifest.json +5 -5
  13. package/dist/toolbar/assets/{compilation.css_e37c747b.map → compilation.css_7421bd55.map} +3 -3
  14. package/dist/toolbar/assets/settings.css_942b5a9e.map +12 -0
  15. package/dist/toolbar/assets/{toolbar.main.css_269d7ce2.map → toolbar.main.css_b7d8bec1.map} +4 -4
  16. package/dist/toolbar/{toolbar.main_279b3a68.js.map → toolbar.main_2c56a4e0.js.map} +24 -12
  17. package/dist/toolbar/{toolbar_0a91ca3b.html → toolbar_7447de59.html} +100 -65
  18. package/dist/toolbar_injector/asset-manifest.json +2 -2
  19. package/dist/toolbar_injector/toolbar_injector_524c2404.js +974 -0
  20. package/dist/toolbar_injector/{toolbar_injector_34f6ad8e.js.map → toolbar_injector_524c2404.js.map} +3 -3
  21. package/package.json +6 -3
  22. package/readme.md +20 -17
  23. package/src/buildProject.js +12 -20
  24. package/src/executeTestPlan.js +20 -19
  25. package/src/internal/building/buildUsingRollup.js +5 -20
  26. package/src/internal/building/build_logs.js +33 -37
  27. package/src/internal/building/build_stats.js +2 -1
  28. package/src/internal/building/es_to_system.js +34 -0
  29. package/src/internal/building/import_references.js +0 -1
  30. package/src/internal/building/rollup_plugin_jsenv.js +146 -43
  31. package/src/internal/compiling/createCompiledFileService.js +0 -4
  32. package/src/internal/compiling/jsenvCompilerForJavaScript.js +2 -3
  33. package/src/internal/compiling/jsenv_directory/compile_context.js +1 -10
  34. package/src/internal/compiling/jsenv_directory/compile_profile.js +1 -2
  35. package/src/internal/compiling/jsenv_directory/jsenv_directory.js +1 -1
  36. package/src/internal/compiling/startCompileServer.js +0 -14
  37. package/src/internal/dev_server/toolbar/compilation/compilation.css +3 -2
  38. package/src/internal/dev_server/toolbar/compilation/toolbar.compilation.js +19 -19
  39. package/src/internal/dev_server/toolbar/notification/toolbar.notification.js +66 -37
  40. package/src/internal/dev_server/toolbar/settings/settings.css +1 -2
  41. package/src/internal/dev_server/toolbar/toolbar.html +9 -5
  42. package/src/internal/dev_server/toolbar/toolbar.main.js +5 -3
  43. package/src/internal/dev_server/toolbar/util/iframe_to_parent_href.js +10 -0
  44. package/src/internal/executing/coverage/reportToCoverage.js +1 -0
  45. package/src/internal/executing/coverage_utils/v8_coverage_from_directory.js +2 -1
  46. package/src/internal/executing/executePlan.js +450 -60
  47. package/src/internal/runtime/s.js +3 -2
  48. package/src/internal/runtime_support/runtime_support.js +1 -1
  49. package/dist/browser_runtime/browser_runtime_0e3396a1.js +0 -5298
  50. package/dist/browser_runtime/browser_runtime_0e3396a1.js.map +0 -1089
  51. package/dist/event_source_client/event_source_client_80644aee.js +0 -356
  52. package/dist/toolbar/assets/settings.css_61548139.map +0 -12
  53. package/dist/toolbar_injector/toolbar_injector_34f6ad8e.js +0 -976
  54. package/src/internal/executing/executeConcurrently.js +0 -440
@@ -96,8 +96,9 @@
96
96
  }
97
97
  .browser_support_text[data-warning],
98
98
  .files_compilation_text[data-warning] {
99
- background: orange;
100
- color: black;
99
+ color: #cb5909;
100
+ margin-bottom: 5px;
101
+ display: block;
101
102
  }
102
103
  button:focus,
103
104
  a:focus,
@@ -283,8 +284,7 @@ Because for some element we set the focus outline on a div which would not match
283
284
  position: relative;
284
285
  }
285
286
  #settings-button[data-warning] svg {
286
- fill: orange;
287
- stroke: darkorange;
287
+ fill: #cb5909;
288
288
  }
289
289
  #settings-button[data-warning] svg:hover {
290
290
  fill: darkorange !important;
@@ -790,7 +790,7 @@ html[data-toolbar-visible] #toolbar-trigger {
790
790
  color: inherit;
791
791
  }
792
792
 
793
- /*# sourceMappingURL=assets/toolbar.main.css_269d7ce2.map */</style>
793
+ /*# sourceMappingURL=assets/toolbar.main.css_b7d8bec1.map */</style>
794
794
  <script id="jsenv_inject_systemjs">/*
795
795
  * SJS 6.11.0
796
796
  * Minimal SystemJS Build
@@ -1018,7 +1018,7 @@ html[data-toolbar-visible] #toolbar-trigger {
1018
1018
  var loader = this;
1019
1019
  return Promise.resolve(loader.prepareImport())
1020
1020
  .then(function() {
1021
- return loader.resolve(id, parentUrl);
1021
+ return loader.resolve(String(id), parentUrl);
1022
1022
  })
1023
1023
  .then(function (id) {
1024
1024
  var load = getOrCreateLoad(loader, id);
@@ -1606,12 +1606,13 @@ html[data-toolbar-visible] #toolbar-trigger {
1606
1606
  System.register = function(deps, declare) {
1607
1607
  System.register = register;
1608
1608
  System.registerRegistry[self.location.href] = [deps, declare];
1609
- System.import(self.location.href).then(() => {
1609
+ return System.import(self.location.href).then((result) => {
1610
1610
  self.removeEventListener('message', messageCallback)
1611
1611
  messageEvents.forEach((messageEvent) => {
1612
1612
  self.dispatchEvent(messageEvent)
1613
1613
  })
1614
1614
  messageEvents = null
1615
+ return result
1615
1616
  })
1616
1617
  }
1617
1618
  }
@@ -1821,7 +1822,7 @@ html[data-toolbar-visible] #toolbar-trigger {
1821
1822
  <div class="category-subtitle">
1822
1823
  Send system notification when execution fails or is fixed.
1823
1824
  <div class="notification-text">
1824
- <a data-when="notif_permission:no" class="request_notification_permission" href="javascript:void(0);">Enable notification</a>
1825
+ <a data-when="notif_granted:no" class="request_notification_permission" href="javascript:void(0);">Enable notification</a>
1825
1826
  </div>
1826
1827
  </div>
1827
1828
  </div>
@@ -1929,8 +1930,11 @@ html[data-toolbar-visible] #toolbar-trigger {
1929
1930
  </div>
1930
1931
  <button id="settings-button" class="toolbar-icon-wrapper">
1931
1932
  <div data-when="has_warning:yes">
1932
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 511.999 511.999" width="24px" height="24px" class="iconToolbar">
1933
- <path d="M506.43 421.536 291.573 49.394c-15.814-27.391-55.327-27.401-71.147 0L5.568 421.536c-15.814 27.391 3.934 61.616 35.574 61.616h429.714c31.629.001 51.394-34.214 35.574-61.616zm-231.609-36.502c0 10.394-8.427 18.821-18.821 18.821s-18.821-8.427-18.821-18.821v-11.239c0-10.394 8.427-18.821 18.821-18.821s18.821 8.427 18.821 18.821v11.239zm0-73.332c0 10.394-8.427 18.821-18.821 18.821s-18.821-8.427-18.821-18.821v-107.89c0-10.394 8.427-18.821 18.821-18.821s18.821 8.427 18.821 18.821v107.89z"></path>
1933
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45.818 45.818" width="20px" height="20px" class="iconToolbar" style="transform: rotate(180deg)">
1934
+ <path d="M22.909,0C10.258,0,0,10.257,0,22.908c0,12.652,10.258,22.91,22.909,22.91s22.909-10.258,22.909-22.91
1935
+ C45.818,10.257,35.561,0,22.909,0z M26.411,35.417c0,1.921-1.573,3.478-3.492,3.478c-1.92,0-3.492-1.557-3.492-3.478V20.201
1936
+ c0-1.92,1.572-3.477,3.492-3.477c1.919,0,3.492,1.556,3.492,3.477V35.417z M22.909,13.851c-2.119,0-3.837-1.718-3.837-3.836
1937
+ c0-2.12,1.718-3.836,3.837-3.836c2.118,0,3.837,1.716,3.837,3.836C26.746,12.133,25.027,13.851,22.909,13.851z"></path>
1934
1938
  </svg>
1935
1939
  </div>
1936
1940
  <div data-when="has_warning:no">
@@ -2426,6 +2430,19 @@ html[data-toolbar-visible] #toolbar-trigger {
2426
2430
  document.documentElement.setAttribute("data-last-interaction", "keyboard");
2427
2431
  });
2428
2432
 
2433
+ var setLinkHrefForParentWindow = function setLinkHrefForParentWindow(a, href) {
2434
+ a.href = href;
2435
+
2436
+ a.onclick = function (e) {
2437
+ if (e.ctrlKey || e.metaKey) {
2438
+ return;
2439
+ }
2440
+
2441
+ e.preventDefault();
2442
+ window.parent.location.href = href;
2443
+ };
2444
+ };
2445
+
2429
2446
  var createPreference = function createPreference(name) {
2430
2447
  return {
2431
2448
  has: function has() {
@@ -2671,56 +2688,88 @@ html[data-toolbar-visible] #toolbar-trigger {
2671
2688
  var arrayOfOpenedNotifications = [];
2672
2689
 
2673
2690
  var renderToolbarNotification = function renderToolbarNotification() {
2674
- var notifCheckbox = document.querySelector("#toggle-notifs");
2675
-
2676
2691
  if (!notificationAvailable) {
2677
- var notifSetting = document.querySelector(".settings-notification");
2678
- notifSetting.setAttribute("data-disabled", "true");
2679
- notifSetting.setAttribute("title", "Notification not available in the browser");
2680
- notifCheckbox.disabled = true;
2692
+ applyNotificationNotAvailableEffects();
2681
2693
  return;
2682
2694
  }
2683
2695
 
2684
- var updatePermission = function updatePermission() {
2685
- if (Notification.permission === "denied") {
2686
- var _notifSetting = document.querySelector(".settings-notification");
2696
+ updatePermission();
2697
+ };
2687
2698
 
2688
- _notifSetting.setAttribute("data-disabled", "true");
2699
+ var updatePermission = function updatePermission() {
2700
+ var notifPermission = Notification.permission;
2689
2701
 
2690
- _notifSetting.setAttribute("title", "Notification denied");
2702
+ if (notifPermission === "default") {
2703
+ applyNotificationDefaultEffects();
2704
+ return;
2705
+ }
2691
2706
 
2692
- notifCheckbox.disabled = true;
2693
- return;
2694
- }
2707
+ if (notifPermission === "denied") {
2708
+ applyNotificationDeniedEffects();
2709
+ return;
2710
+ }
2695
2711
 
2696
- notifCheckbox.checked = getNotificationPreference();
2712
+ if (notifPermission === "granted") {
2713
+ applyNotificationGrantedEffects();
2714
+ return;
2715
+ }
2716
+ };
2697
2717
 
2698
- notifCheckbox.onchange = function () {
2699
- setNotificationPreference(notifCheckbox.checked);
2718
+ var notifCheckbox = document.querySelector("#toggle-notifs");
2700
2719
 
2701
- if (!notifCheckbox.checked) {
2702
- // slice because arrayOfOpenedNotifications can be mutated while looping
2703
- arrayOfOpenedNotifications.slice().forEach(function (notification) {
2704
- notification.close();
2705
- });
2706
- }
2707
- };
2720
+ var applyNotificationNotAvailableEffects = function applyNotificationNotAvailableEffects() {
2721
+ var notifSetting = document.querySelector(".settings-notification");
2722
+ notifSetting.setAttribute("data-disabled", "true");
2723
+ notifSetting.setAttribute("title", "Notification not available in the browser");
2724
+ notifCheckbox.disabled = true;
2725
+ };
2708
2726
 
2709
- var notifPermission = Notification.permission;
2710
- enableVariant(document.querySelector(".notification-text"), {
2711
- notif_permission: notifPermission === "granted" ? "yes" : "no"
2712
- });
2727
+ var applyNotificationDefaultEffects = function applyNotificationDefaultEffects() {
2728
+ applyNotificationNOTGrantedEffects();
2729
+ var notifSetting = document.querySelector(".settings-notification");
2730
+ notifSetting.removeAttribute("data-disabled");
2731
+ notifSetting.removeAttribute("title");
2732
+ };
2713
2733
 
2714
- if (notifPermission === "default") {
2715
- document.querySelector("a.request_notification_permission").onclick = function () {
2716
- requestPermission().then(function () {
2717
- updatePermission();
2718
- });
2719
- };
2734
+ var applyNotificationDeniedEffects = function applyNotificationDeniedEffects() {
2735
+ applyNotificationNOTGrantedEffects();
2736
+ var notifSetting = document.querySelector(".settings-notification");
2737
+ notifSetting.setAttribute("data-disabled", "true");
2738
+ notifSetting.setAttribute("title", "Notification denied");
2739
+ };
2740
+
2741
+ var applyNotificationGrantedEffects = function applyNotificationGrantedEffects() {
2742
+ enableVariant(document.querySelector(".notification-text"), {
2743
+ notif_granted: "yes"
2744
+ });
2745
+ notifCheckbox.disabled = false;
2746
+ notifCheckbox.checked = getNotificationPreference();
2747
+
2748
+ notifCheckbox.onchange = function () {
2749
+ setNotificationPreference(notifCheckbox.checked);
2750
+
2751
+ if (!notifCheckbox.checked) {
2752
+ // slice because arrayOfOpenedNotifications can be mutated while looping
2753
+ arrayOfOpenedNotifications.slice().forEach(function (notification) {
2754
+ notification.close();
2755
+ });
2720
2756
  }
2721
2757
  };
2758
+ };
2722
2759
 
2723
- updatePermission();
2760
+ var applyNotificationNOTGrantedEffects = function applyNotificationNOTGrantedEffects() {
2761
+ enableVariant(document.querySelector(".notification-text"), {
2762
+ notif_granted: "no"
2763
+ });
2764
+ notifCheckbox.disabled = true;
2765
+ notifCheckbox.checked = false;
2766
+
2767
+ document.querySelector("a.request_notification_permission").onclick = function () {
2768
+ requestPermission().then(function () {
2769
+ setNotificationPreference(true);
2770
+ updatePermission();
2771
+ });
2772
+ };
2724
2773
  };
2725
2774
 
2726
2775
  var notifyExecutionResult = function notifyExecutionResult(executedFileRelativeUrl, execution, previousExecution) {
@@ -4426,21 +4475,10 @@ html[data-toolbar-visible] #toolbar-trigger {
4426
4475
  document.querySelector(".files_compilation_text").innerHTML = "Files shown are compiled for ".concat(runtimeReport.name, "@").concat(runtimeReport.version);
4427
4476
  }
4428
4477
 
4429
- filesCompilationRootNode.querySelector("a.link_to_source_files").onclick = function () {
4430
- window.parent.location.href = "/".concat(compileGroup.fileRelativeUrl);
4431
- };
4432
-
4433
- filesCompilationRootNode.querySelector("a.link_to_compiled_files").onclick = function () {
4434
- window.parent.location.href = "/".concat(jsenvDirectoryRelativeUrl).concat(expectedCompiledId, "/").concat(compileGroup.fileRelativeUrl);
4435
- };
4436
-
4437
- filesCompilationRootNode.querySelector("a.link_to_compilation_forced_files").onclick = function () {
4438
- window.parent.location.href = "/".concat(jsenvDirectoryRelativeUrl, "force/").concat(compileGroup.fileRelativeUrl);
4439
- };
4440
-
4441
- filesCompilationRootNode.querySelector("a.link_to_appropriate_files").onclick = function () {
4442
- window.parent.location.href = "/".concat(jsenvDirectoryRelativeUrl).concat(expectedCompiledId, "/").concat(compileGroup.fileRelativeUrl);
4443
- };
4478
+ setLinkHrefForParentWindow(filesCompilationRootNode.querySelector("a.link_to_source_files"), "/".concat(compileGroup.fileRelativeUrl));
4479
+ setLinkHrefForParentWindow(filesCompilationRootNode.querySelector("a.link_to_compiled_files"), "/".concat(jsenvDirectoryRelativeUrl).concat(expectedCompiledId, "/").concat(compileGroup.fileRelativeUrl));
4480
+ setLinkHrefForParentWindow(filesCompilationRootNode.querySelector("a.link_to_compilation_forced_files"), "/".concat(jsenvDirectoryRelativeUrl, "force/").concat(compileGroup.fileRelativeUrl));
4481
+ setLinkHrefForParentWindow(filesCompilationRootNode.querySelector("a.link_to_appropriate_files"), "/".concat(jsenvDirectoryRelativeUrl).concat(expectedCompiledId, "/").concat(compileGroup.fileRelativeUrl));
4444
4482
 
4445
4483
  if (hasWarning) {
4446
4484
  enableWarningStyle();
@@ -4739,10 +4777,7 @@ html[data-toolbar-visible] #toolbar-trigger {
4739
4777
  });
4740
4778
  }
4741
4779
 
4742
- document.querySelector(".toolbar-icon-wrapper").onclick = function () {
4743
- window.parent.location.href = "/";
4744
- };
4745
-
4780
+ setLinkHrefForParentWindow(document.querySelector(".toolbar-icon-wrapper"), "/");
4746
4781
  renderToolbarNotification();
4747
4782
  makeToolbarResponsive();
4748
4783
  renderToolbarSettings();
@@ -4935,7 +4970,7 @@ html[data-toolbar-visible] #toolbar-trigger {
4935
4970
  };
4936
4971
  });
4937
4972
 
4938
- //# sourceMappingURL=toolbar.main_279b3a68.js.map</script>
4973
+ //# sourceMappingURL=toolbar.main_2c56a4e0.js.map</script>
4939
4974
 
4940
4975
 
4941
4976
  </body></html>
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "assets/jsenv-logo.svg": "assets/jsenv-logo_188b9ca6.svg",
3
- "toolbar_injector.js": "toolbar_injector_34f6ad8e.js",
4
- "toolbar_injector.js.map": "toolbar_injector_34f6ad8e.js.map"
3
+ "toolbar_injector.js": "toolbar_injector_524c2404.js",
4
+ "toolbar_injector.js.map": "toolbar_injector_524c2404.js.map"
5
5
  }