@jsenv/core 23.1.1 → 23.2.0
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/dist/jsenv_browser_system.js +18 -82
- package/dist/jsenv_browser_system.js.map +11 -20
- package/dist/jsenv_compile_proxy.js +18 -82
- package/dist/jsenv_compile_proxy.js.map +11 -21
- package/dist/jsenv_exploring_index.js +127 -274
- package/dist/jsenv_exploring_index.js.map +76 -90
- package/dist/jsenv_exploring_redirector.js +21 -89
- package/dist/jsenv_exploring_redirector.js.map +13 -25
- package/dist/jsenv_toolbar.js +85 -149
- package/dist/jsenv_toolbar.js.map +51 -62
- package/dist/jsenv_toolbar_injector.js +185 -231
- package/dist/jsenv_toolbar_injector.js.map +30 -42
- package/{LICENSE → license} +0 -0
- package/package.json +7 -10
- package/src/abort/abortable.js +172 -0
- package/src/abort/callback_list.js +64 -0
- package/src/abort/callback_race.js +34 -0
- package/src/abort/cleaner.js +22 -0
- package/src/abort/main.js +32 -0
- package/src/abort/process_teardown_events.js +59 -0
- package/src/buildProject.js +132 -123
- package/src/execute.js +108 -107
- package/src/executeTestPlan.js +101 -121
- package/src/importUsingChildProcess.js +2 -1
- package/src/internal/browser-launcher/executeHtmlFile.js +22 -10
- package/src/internal/browser-utils/fetch-browser.js +4 -29
- package/src/internal/browser-utils/fetchUsingXHR.js +5 -7
- package/src/internal/building/buildUsingRollup.js +60 -24
- package/src/internal/building/createJsenvRollupPlugin.js +13 -31
- package/src/internal/building/ressource_builder.js +3 -6
- package/src/internal/building/sourcemap_loader.js +4 -5
- package/src/internal/building/url_fetcher.js +2 -5
- package/src/internal/building/url_loader.js +3 -6
- package/src/internal/compiling/compileFile.js +1 -2
- package/src/internal/compiling/createCompiledFileService.js +10 -10
- package/src/internal/compiling/jsenvCompilerForHtml.js +21 -7
- package/src/internal/compiling/jsenvCompilerForJavaScript.js +2 -0
- package/src/internal/compiling/startCompileServer.js +82 -134
- package/src/internal/executing/coverage/relativeUrlToEmptyCoverage.js +19 -30
- package/src/internal/executing/coverage/reportToCoverage.js +44 -24
- package/src/internal/executing/coverage/v8CoverageFromNodeV8Directory.js +2 -15
- package/src/internal/executing/createSummaryLog.js +47 -34
- package/src/internal/executing/executeConcurrently.js +89 -47
- package/src/internal/executing/executePlan.js +33 -7
- package/src/internal/executing/executionLogs.js +25 -28
- package/src/internal/executing/execution_colors.js +15 -0
- package/src/internal/executing/generateExecutionSteps.js +3 -2
- package/src/internal/executing/launchAndExecute.js +213 -257
- package/src/internal/exploring/fetchExploringJson.js +3 -4
- package/src/internal/fetchUrl.js +6 -2
- package/src/internal/logs/log_style.js +16 -28
- package/src/internal/logs/msAsDuration.js +1 -1
- package/src/internal/node-launcher/createChildProcessOptions.js +4 -5
- package/src/internal/node-launcher/createControllableNodeProcess.js +117 -229
- package/src/internal/node-launcher/kill_process_tree.js +76 -0
- package/src/internal/node-launcher/nodeControllableFile.mjs +16 -10
- package/src/internal/{promise_track_race.js → promise_race.js} +2 -2
- package/src/internal/toolbar/execution/toolbar.execution.js +4 -0
- package/src/internal/toolbar/toolbar.html +157 -61
- package/src/internal/toolbar/toolbar.injector.js +8 -0
- package/src/internal/toolbar/util/animation.js +3 -7
- package/src/internal/toolbar/util/fetching.js +1 -30
- package/src/jsenvServiceWorkerFinalizer.js +1 -2
- package/src/launchBrowser.js +127 -127
- package/src/launchNode.js +32 -17
- package/src/playwright_browser_versions.js +3 -3
- package/src/requireUsingChildProcess.js +2 -1
- package/src/signal/signal.js +65 -0
- package/src/startExploring.js +71 -71
- package/src/internal/executeJsenvAsyncFunction.js +0 -34
- package/src/internal/toolbar/animation/toolbar-movie-icon.svg +0 -15
- package/src/internal/toolbar/compilation/flask.svg +0 -7
- package/src/internal/toolbar/compilation/info.svg +0 -9
- package/src/internal/toolbar/compilation/loupe.svg +0 -11
- package/src/internal/toolbar/compilation/toolbar_compilation.svg +0 -11
- package/src/internal/toolbar/eventsource/toolbar-power-icon.svg +0 -10
- package/src/internal/toolbar/eventsource/toolbar-power-off-icon.svg +0 -10
- package/src/internal/toolbar/responsive/toolbar-dots-icon.svg +0 -10
- package/src/internal/toolbar/settings/toolbar-settings-icon.svg +0 -9
- package/src/internal/toolbar/theme/toolbar-palette-icon.svg +0 -10
- package/src/internal/toolbar/toolbar-cross-icon.svg +0 -10
- package/src/internal/toolbar/toolbar-loading-icon.svg +0 -102
- package/src/internal/toolbar/toolbar-notif-icon.svg +0 -9
- package/src/internal/trackRessources.js +0 -23
|
@@ -1310,29 +1310,6 @@
|
|
|
1310
1310
|
return target;
|
|
1311
1311
|
});
|
|
1312
1312
|
|
|
1313
|
-
var createCancellationToken = function createCancellationToken() {
|
|
1314
|
-
var register = function register(callback) {
|
|
1315
|
-
if (typeof callback !== "function") {
|
|
1316
|
-
throw new Error("callback must be a function, got ".concat(callback));
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
return {
|
|
1320
|
-
callback: callback,
|
|
1321
|
-
unregister: function unregister() {}
|
|
1322
|
-
};
|
|
1323
|
-
};
|
|
1324
|
-
|
|
1325
|
-
var throwIfRequested = function throwIfRequested() {
|
|
1326
|
-
return undefined;
|
|
1327
|
-
};
|
|
1328
|
-
|
|
1329
|
-
return {
|
|
1330
|
-
register: register,
|
|
1331
|
-
cancellationRequested: false,
|
|
1332
|
-
throwIfRequested: throwIfRequested
|
|
1333
|
-
};
|
|
1334
|
-
};
|
|
1335
|
-
|
|
1336
1313
|
var createDetailedMessage = function createDetailedMessage(message) {
|
|
1337
1314
|
var details = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1338
1315
|
var string = "".concat(message);
|
|
@@ -1343,9 +1320,6 @@
|
|
|
1343
1320
|
return string;
|
|
1344
1321
|
};
|
|
1345
1322
|
|
|
1346
|
-
// fallback to this polyfill (or even use an existing polyfill would be better)
|
|
1347
|
-
// https://github.com/github/fetch/blob/master/fetch.js
|
|
1348
|
-
|
|
1349
1323
|
function _await$c(value, then, direct) {
|
|
1350
1324
|
if (direct) {
|
|
1351
1325
|
return then ? then(value) : value;
|
|
@@ -1387,8 +1361,7 @@
|
|
|
1387
1361
|
|
|
1388
1362
|
var fetchUsingXHR = _async$c(function (url) {
|
|
1389
1363
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
1390
|
-
|
|
1391
|
-
cancellationToken = _ref$cancellationToke === void 0 ? createCancellationToken() : _ref$cancellationToke,
|
|
1364
|
+
signal = _ref.signal,
|
|
1392
1365
|
_ref$method = _ref.method,
|
|
1393
1366
|
method = _ref$method === void 0 ? "GET" : _ref$method,
|
|
1394
1367
|
_ref$credentials = _ref.credentials,
|
|
@@ -1437,9 +1410,11 @@
|
|
|
1437
1410
|
bodyPromise.resolve();
|
|
1438
1411
|
};
|
|
1439
1412
|
|
|
1440
|
-
|
|
1413
|
+
signal.addEventListener("abort", function () {
|
|
1441
1414
|
xhr.abort();
|
|
1442
|
-
|
|
1415
|
+
var abortError = new Error("aborted");
|
|
1416
|
+
abortError.name = "AbortError";
|
|
1417
|
+
failure(abortError);
|
|
1443
1418
|
});
|
|
1444
1419
|
|
|
1445
1420
|
xhr.onreadystatechange = function () {
|
|
@@ -1779,7 +1754,7 @@
|
|
|
1779
1754
|
return view.buffer;
|
|
1780
1755
|
};
|
|
1781
1756
|
|
|
1782
|
-
var _excluded = ["
|
|
1757
|
+
var _excluded = ["mode"];
|
|
1783
1758
|
|
|
1784
1759
|
function _await$b(value, then, direct) {
|
|
1785
1760
|
if (direct) {
|
|
@@ -1794,36 +1769,15 @@
|
|
|
1794
1769
|
}
|
|
1795
1770
|
|
|
1796
1771
|
var fetchNative = _async$b(function (url) {
|
|
1797
|
-
|
|
1798
1772
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1799
1773
|
|
|
1800
|
-
var _ref$
|
|
1801
|
-
cancellationToken = _ref$cancellationToke === void 0 ? createCancellationToken() : _ref$cancellationToke,
|
|
1802
|
-
_ref$mode = _ref.mode,
|
|
1774
|
+
var _ref$mode = _ref.mode,
|
|
1803
1775
|
mode = _ref$mode === void 0 ? "cors" : _ref$mode,
|
|
1804
1776
|
options = _objectWithoutProperties(_ref, _excluded);
|
|
1805
1777
|
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
cancelError = reason;
|
|
1810
|
-
abortController.abort(reason);
|
|
1811
|
-
});
|
|
1812
|
-
var response;
|
|
1813
|
-
return _continue$3(_catch$5(function () {
|
|
1814
|
-
return _await$b(window.fetch(url, _objectSpread2({
|
|
1815
|
-
signal: abortController.signal,
|
|
1816
|
-
mode: mode
|
|
1817
|
-
}, options)), function (_window$fetch) {
|
|
1818
|
-
response = _window$fetch;
|
|
1819
|
-
});
|
|
1820
|
-
}, function (e) {
|
|
1821
|
-
if (cancelError && e.name === "AbortError") {
|
|
1822
|
-
throw cancelError;
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
throw e;
|
|
1826
|
-
}), function (_result) {
|
|
1778
|
+
return _await$b(window.fetch(url, _objectSpread2({
|
|
1779
|
+
mode: mode
|
|
1780
|
+
}, options)), function (response) {
|
|
1827
1781
|
return {
|
|
1828
1782
|
url: response.url,
|
|
1829
1783
|
status: response.status,
|
|
@@ -1848,32 +1802,6 @@
|
|
|
1848
1802
|
});
|
|
1849
1803
|
});
|
|
1850
1804
|
|
|
1851
|
-
function _catch$5(body, recover) {
|
|
1852
|
-
try {
|
|
1853
|
-
var result = body();
|
|
1854
|
-
} catch (e) {
|
|
1855
|
-
return recover(e);
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
if (result && result.then) {
|
|
1859
|
-
return result.then(void 0, recover);
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
return result;
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
var responseToHeaders$1 = function responseToHeaders(response) {
|
|
1866
|
-
var headers = {};
|
|
1867
|
-
response.headers.forEach(function (value, name) {
|
|
1868
|
-
headers[name] = value;
|
|
1869
|
-
});
|
|
1870
|
-
return headers;
|
|
1871
|
-
};
|
|
1872
|
-
|
|
1873
|
-
function _continue$3(value, then) {
|
|
1874
|
-
return value && value.then ? value.then(then) : then(value);
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
1805
|
function _async$b(f) {
|
|
1878
1806
|
return function () {
|
|
1879
1807
|
for (var args = [], i = 0; i < arguments.length; i++) {
|
|
@@ -1888,6 +1816,14 @@
|
|
|
1888
1816
|
};
|
|
1889
1817
|
}
|
|
1890
1818
|
|
|
1819
|
+
var responseToHeaders$1 = function responseToHeaders(response) {
|
|
1820
|
+
var headers = {};
|
|
1821
|
+
response.headers.forEach(function (value, name) {
|
|
1822
|
+
headers[name] = value;
|
|
1823
|
+
});
|
|
1824
|
+
return headers;
|
|
1825
|
+
};
|
|
1826
|
+
|
|
1891
1827
|
var fetchUrl = typeof window.fetch === "function" && typeof window.AbortController === "function" ? fetchNative : fetchUsingXHR;
|
|
1892
1828
|
|
|
1893
1829
|
var pathnameToExtension$1 = function pathnameToExtension(pathname) {
|