@jsenv/core 24.5.7 → 24.6.3
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/browser_runtime/browser_runtime-c7288751.js +58 -41
- package/dist/browser_runtime/browser_runtime-c7288751.js.map +3 -1
- package/dist/build_manifest.js +4 -4
- package/dist/compile_proxy/asset-manifest.json +1 -1
- package/dist/compile_proxy/{compile_proxy-501d6fa3.html → compile_proxy-28148b58.html} +26 -21
- package/dist/compile_proxy/{compile_proxy.html__inline__20-cbaf7522.js.map → compile_proxy.html__inline__20-4887fb1d.js.map} +3 -3
- package/dist/event_source_client/event_source_client-9f14c8b9.js +11 -5
- package/dist/event_source_client/event_source_client-9f14c8b9.js.map +1 -1
- package/dist/redirector/asset-manifest.json +1 -1
- package/dist/redirector/{redirector-d614cffb.html → redirector-3c05dbb2.html} +26 -21
- package/dist/redirector/{redirector.html__inline__15-2953c307.js.map → redirector.html__inline__15-19e529b9.js.map} +3 -3
- package/dist/toolbar/asset-manifest.json +1 -1
- package/dist/toolbar/{toolbar-c23caf7b.html → toolbar-bab473ea.html} +61 -36
- package/dist/toolbar/{toolbar.main-bdbf37d1.js.map → toolbar.main-eb8acf83.js.map} +3 -3
- package/dist/toolbar_injector/asset-manifest.json +1 -1
- package/dist/toolbar_injector/{toolbar_injector-52ec0940.js → toolbar_injector-5e32f96a.js} +11 -10
- package/dist/toolbar_injector/{toolbar_injector-52ec0940.js.map → toolbar_injector-5e32f96a.js.map} +4 -3
- package/package.json +33 -32
- package/readme.md +13 -15
- package/src/buildProject.js +1 -2
- package/src/executeTestPlan.js +12 -6
- package/src/internal/browser_detection/user_agent_data.js +1 -1
- package/src/internal/browser_launcher/executeHtmlFile.js +2 -1
- package/src/internal/browser_launcher/from_playwright.js +4 -0
- package/src/internal/building/buildUsingRollup.js +15 -9
- package/src/internal/building/rollup_plugin_jsenv.js +65 -53
- package/src/internal/compiling/js-compilation-service/jsenvTransform.js +3 -0
- package/src/internal/compiling/js-compilation-service/transformJs.js +6 -1
- package/src/internal/executing/createSummaryLog.js +30 -4
- package/src/internal/executing/executeConcurrently.js +22 -8
- package/src/internal/executing/executePlan.js +12 -6
- package/src/internal/executing/executionLogs.js +14 -4
- package/src/internal/executing/gc.js +9 -0
- package/src/internal/logs/byte.js +10 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function () {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var _defineProperty =
|
|
4
|
+
var _defineProperty = function (obj, key, value) {
|
|
5
5
|
// Shortcircuit the slow defineProperty path when possible.
|
|
6
6
|
// We are trying to avoid issues where setters defined on the
|
|
7
7
|
// prototype cause side effects under the fast path of simple
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
return obj;
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
23
|
|
|
24
24
|
function ownKeys(object, enumerableOnly) {
|
|
25
25
|
var keys = Object.keys(object);
|
|
@@ -58,8 +58,9 @@
|
|
|
58
58
|
|
|
59
59
|
return target;
|
|
60
60
|
}
|
|
61
|
-
|
|
62
61
|
/* eslint-disable no-eq-null, eqeqeq */
|
|
62
|
+
|
|
63
|
+
|
|
63
64
|
function arrayLikeToArray(arr, len) {
|
|
64
65
|
if (len == null || len > arr.length) len = arr.length;
|
|
65
66
|
var arr2 = new Array(len);
|
|
@@ -71,15 +72,16 @@
|
|
|
71
72
|
return arr2;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
var arrayWithoutHoles =
|
|
75
|
+
var arrayWithoutHoles = function (arr) {
|
|
75
76
|
if (Array.isArray(arr)) return arrayLikeToArray(arr);
|
|
76
|
-
}
|
|
77
|
+
};
|
|
77
78
|
|
|
78
79
|
function _iterableToArray(iter) {
|
|
79
80
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
80
81
|
}
|
|
81
|
-
|
|
82
82
|
/* eslint-disable consistent-return */
|
|
83
|
+
|
|
84
|
+
|
|
83
85
|
function unsupportedIterableToArray(o, minLen) {
|
|
84
86
|
if (!o) return;
|
|
85
87
|
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
|
@@ -89,13 +91,13 @@
|
|
|
89
91
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
var nonIterableSpread =
|
|
94
|
+
var nonIterableSpread = function () {
|
|
93
95
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
94
|
-
}
|
|
96
|
+
};
|
|
95
97
|
|
|
96
|
-
var _toConsumableArray =
|
|
98
|
+
var _toConsumableArray = function (arr) {
|
|
97
99
|
return arrayWithoutHoles(arr) || _iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
|
|
98
|
-
}
|
|
100
|
+
};
|
|
99
101
|
|
|
100
102
|
var createDetailedMessage = function createDetailedMessage(message) {
|
|
101
103
|
var details = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -127,8 +129,9 @@
|
|
|
127
129
|
};
|
|
128
130
|
|
|
129
131
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? nativeTypeOf : customTypeOf;
|
|
130
|
-
|
|
131
132
|
/* eslint-env browser, node */
|
|
133
|
+
|
|
134
|
+
|
|
132
135
|
var parseDataUrl = function parseDataUrl(dataUrl) {
|
|
133
136
|
var afterDataProtocol = dataUrl.slice("data:".length);
|
|
134
137
|
var commaIndex = afterDataProtocol.indexOf(",");
|
|
@@ -151,11 +154,13 @@
|
|
|
151
154
|
data: afterComma
|
|
152
155
|
};
|
|
153
156
|
};
|
|
157
|
+
|
|
154
158
|
var dataUrlToRawData = function dataUrlToRawData(_ref2) {
|
|
155
159
|
var base64Flag = _ref2.base64Flag,
|
|
156
160
|
data = _ref2.data;
|
|
157
161
|
return base64Flag ? base64ToString(data) : data;
|
|
158
162
|
};
|
|
163
|
+
|
|
159
164
|
(typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" ? window.atob : function (data) {
|
|
160
165
|
return Buffer.from(data).toString("base64");
|
|
161
166
|
};
|
|
@@ -170,6 +175,7 @@
|
|
|
170
175
|
});
|
|
171
176
|
return sourceMappingUrl;
|
|
172
177
|
};
|
|
178
|
+
|
|
173
179
|
var javascriptSourceMappingUrlCommentRegexp = /\/\/ ?# ?sourceMappingURL=([^\s'"]+)/g;
|
|
174
180
|
|
|
175
181
|
var replaceSourceMappingUrl = function replaceSourceMappingUrl(source, regexp, callback) {
|
|
@@ -200,9 +206,11 @@
|
|
|
200
206
|
if (secondChar !== ":") return false;
|
|
201
207
|
return true;
|
|
202
208
|
};
|
|
209
|
+
|
|
203
210
|
var windowsFilePathToUrl = function windowsFilePathToUrl(windowsFilePath) {
|
|
204
211
|
return "file:///".concat(replaceBackSlashesWithSlashes(windowsFilePath));
|
|
205
212
|
};
|
|
213
|
+
|
|
206
214
|
var replaceBackSlashesWithSlashes = function replaceBackSlashesWithSlashes(string) {
|
|
207
215
|
return string.replace(/\\/g, "/");
|
|
208
216
|
};
|
|
@@ -299,8 +307,8 @@
|
|
|
299
307
|
}
|
|
300
308
|
}, function (_result) {
|
|
301
309
|
var _exit2 = false;
|
|
302
|
-
if (_exit) return _result;
|
|
303
|
-
|
|
310
|
+
if (_exit) return _result; // Code called using eval() needs special handling
|
|
311
|
+
|
|
304
312
|
return _invoke$6(function () {
|
|
305
313
|
if (callSite.isEval()) {
|
|
306
314
|
var origin = callSite.getEvalOrigin();
|
|
@@ -452,8 +460,8 @@
|
|
|
452
460
|
var _exit3 = false;
|
|
453
461
|
var resolveFile = _ref3.resolveFile,
|
|
454
462
|
urlToSourcemapConsumer = _ref3.urlToSourcemapConsumer,
|
|
455
|
-
onFailure = _ref3.onFailure;
|
|
456
|
-
|
|
463
|
+
onFailure = _ref3.onFailure; // Most eval() calls are in this format
|
|
464
|
+
|
|
457
465
|
var topLevelEvalMatch = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin);
|
|
458
466
|
return _invoke$6(function () {
|
|
459
467
|
if (topLevelEvalMatch) {
|
|
@@ -474,8 +482,8 @@
|
|
|
474
482
|
}
|
|
475
483
|
}, function (_result4) {
|
|
476
484
|
var _exit4 = false;
|
|
477
|
-
if (_exit3) return _result4;
|
|
478
|
-
|
|
485
|
+
if (_exit3) return _result4; // Parse nested eval() calls using recursion
|
|
486
|
+
|
|
479
487
|
var nestedEvalMatch = /^eval at ([^(]+) \((.+)\)$/.exec(origin);
|
|
480
488
|
return _invoke$6(function () {
|
|
481
489
|
if (nestedEvalMatch) {
|
|
@@ -1087,9 +1095,9 @@
|
|
|
1087
1095
|
});
|
|
1088
1096
|
}),
|
|
1089
1097
|
resolveFile: function resolveFile(specifier) {
|
|
1090
|
-
var importer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.href;
|
|
1091
|
-
// browsers having Error.captureStrackTrace got window.URL
|
|
1098
|
+
var importer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.href; // browsers having Error.captureStrackTrace got window.URL
|
|
1092
1099
|
// and this executes only when Error.captureStackTrace exists
|
|
1100
|
+
|
|
1093
1101
|
return String(new URL(specifier, importer));
|
|
1094
1102
|
}
|
|
1095
1103
|
}, options));
|
|
@@ -1103,7 +1111,7 @@
|
|
|
1103
1111
|
return headers;
|
|
1104
1112
|
};
|
|
1105
1113
|
|
|
1106
|
-
var objectWithoutPropertiesLoose =
|
|
1114
|
+
var objectWithoutPropertiesLoose = function (source, excluded) {
|
|
1107
1115
|
if (source === null) return {};
|
|
1108
1116
|
var target = {};
|
|
1109
1117
|
var sourceKeys = Object.keys(source);
|
|
@@ -1117,9 +1125,9 @@
|
|
|
1117
1125
|
}
|
|
1118
1126
|
|
|
1119
1127
|
return target;
|
|
1120
|
-
}
|
|
1128
|
+
};
|
|
1121
1129
|
|
|
1122
|
-
var _objectWithoutProperties =
|
|
1130
|
+
var _objectWithoutProperties = function (source, excluded) {
|
|
1123
1131
|
if (source === null) return {};
|
|
1124
1132
|
var target = objectWithoutPropertiesLoose(source, excluded);
|
|
1125
1133
|
var key;
|
|
@@ -1137,9 +1145,10 @@
|
|
|
1137
1145
|
}
|
|
1138
1146
|
|
|
1139
1147
|
return target;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1148
|
+
};
|
|
1142
1149
|
/* eslint-env browser */
|
|
1150
|
+
|
|
1151
|
+
|
|
1143
1152
|
function _await$7(value, then, direct) {
|
|
1144
1153
|
if (direct) {
|
|
1145
1154
|
return then ? then(value) : value;
|
|
@@ -1693,9 +1702,9 @@
|
|
|
1693
1702
|
|
|
1694
1703
|
var appendSourceURL = function appendSourceURL(code, sourceURL) {
|
|
1695
1704
|
return "".concat(code, "\n", "//#", " sourceURL=").concat(sourceURL);
|
|
1696
|
-
};
|
|
1705
|
+
}; // https://developer.mozilla.org/en-US/docs/Glossary/Primitive
|
|
1706
|
+
|
|
1697
1707
|
|
|
1698
|
-
// https://developer.mozilla.org/en-US/docs/Glossary/Primitive
|
|
1699
1708
|
var isComposite = function isComposite(value) {
|
|
1700
1709
|
if (value === null) {
|
|
1701
1710
|
return false;
|
|
@@ -1716,9 +1725,11 @@
|
|
|
1716
1725
|
|
|
1717
1726
|
var compositeWellKnownMap = new WeakMap();
|
|
1718
1727
|
var primitiveWellKnownMap = new Map();
|
|
1728
|
+
|
|
1719
1729
|
var getCompositeGlobalPath = function getCompositeGlobalPath(value) {
|
|
1720
1730
|
return compositeWellKnownMap.get(value);
|
|
1721
1731
|
};
|
|
1732
|
+
|
|
1722
1733
|
var getPrimitiveGlobalPath = function getPrimitiveGlobalPath(value) {
|
|
1723
1734
|
return primitiveWellKnownMap.get(value);
|
|
1724
1735
|
};
|
|
@@ -2192,11 +2203,11 @@
|
|
|
2192
2203
|
var createUnknownPrototypeMessage = function createUnknownPrototypeMessage(_ref10) {
|
|
2193
2204
|
var prototypeValue = _ref10.prototypeValue;
|
|
2194
2205
|
return "prototype must be global, like Object.prototype, or somewhere in the value.\nprototype constructor name: ".concat(prototypeValue.constructor.name);
|
|
2195
|
-
};
|
|
2196
|
-
|
|
2197
|
-
// be carefull because this function is mutating recipe objects inside the recipeArray.
|
|
2206
|
+
}; // be carefull because this function is mutating recipe objects inside the recipeArray.
|
|
2198
2207
|
// this is not an issue because each recipe object is not accessible from the outside
|
|
2199
2208
|
// when used internally by uneval
|
|
2209
|
+
|
|
2210
|
+
|
|
2200
2211
|
var sortRecipe = function sortRecipe(recipeArray) {
|
|
2201
2212
|
var findInRecipePrototypeChain = function findInRecipePrototypeChain(recipe, callback) {
|
|
2202
2213
|
var currentRecipe = recipe; // eslint-disable-next-line no-constant-condition
|
|
@@ -2268,10 +2279,10 @@
|
|
|
2268
2279
|
return 1;
|
|
2269
2280
|
});
|
|
2270
2281
|
return recipeArrayOrdered;
|
|
2271
|
-
};
|
|
2272
|
-
|
|
2273
|
-
// https://github.com/joliss/js-string-escape/blob/master/index.js
|
|
2282
|
+
}; // https://github.com/joliss/js-string-escape/blob/master/index.js
|
|
2274
2283
|
// http://javascript.crockford.com/remedial.html
|
|
2284
|
+
|
|
2285
|
+
|
|
2275
2286
|
var escapeString = function escapeString(value) {
|
|
2276
2287
|
var string = String(value);
|
|
2277
2288
|
var i = 0;
|
|
@@ -2524,8 +2535,9 @@
|
|
|
2524
2535
|
|
|
2525
2536
|
return fnWithMemoization;
|
|
2526
2537
|
};
|
|
2527
|
-
|
|
2528
2538
|
/* eslint-env browser */
|
|
2539
|
+
|
|
2540
|
+
|
|
2529
2541
|
var displayErrorInDocument = function displayErrorInDocument(error) {
|
|
2530
2542
|
var title = "An error occured";
|
|
2531
2543
|
var theme;
|
|
@@ -2697,8 +2709,9 @@
|
|
|
2697
2709
|
}
|
|
2698
2710
|
};
|
|
2699
2711
|
};
|
|
2700
|
-
|
|
2701
2712
|
/* eslint-env browser */
|
|
2713
|
+
|
|
2714
|
+
|
|
2702
2715
|
var _window$1 = window,
|
|
2703
2716
|
Notification = _window$1.Notification;
|
|
2704
2717
|
|
|
@@ -2800,9 +2813,9 @@
|
|
|
2800
2813
|
}
|
|
2801
2814
|
|
|
2802
2815
|
return pathname.slice(0, slashLastIndex + 1);
|
|
2803
|
-
};
|
|
2816
|
+
}; // could be useful: https://url.spec.whatwg.org/#url-miscellaneous
|
|
2817
|
+
|
|
2804
2818
|
|
|
2805
|
-
// could be useful: https://url.spec.whatwg.org/#url-miscellaneous
|
|
2806
2819
|
var resolveUrl = function resolveUrl(specifier, baseUrl) {
|
|
2807
2820
|
if (baseUrl) {
|
|
2808
2821
|
if (typeof baseUrl !== "string") {
|
|
@@ -2929,6 +2942,7 @@
|
|
|
2929
2942
|
});
|
|
2930
2943
|
return mappingsSorted;
|
|
2931
2944
|
};
|
|
2945
|
+
|
|
2932
2946
|
var sortScopes = function sortScopes(scopes) {
|
|
2933
2947
|
var scopesSorted = {};
|
|
2934
2948
|
Object.keys(scopes).sort(compareLengthOrLocaleCompare).forEach(function (scopeSpecifier) {
|
|
@@ -3295,6 +3309,7 @@
|
|
|
3295
3309
|
}
|
|
3296
3310
|
};
|
|
3297
3311
|
}
|
|
3312
|
+
|
|
3298
3313
|
var getJavaScriptModuleResponseError = _async$4(function (response, _ref) {
|
|
3299
3314
|
var _exit = false;
|
|
3300
3315
|
var url = _ref.url,
|
|
@@ -3349,6 +3364,7 @@
|
|
|
3349
3364
|
}))) : null;
|
|
3350
3365
|
});
|
|
3351
3366
|
});
|
|
3367
|
+
|
|
3352
3368
|
var getModuleDetails = function getModuleDetails(_ref2) {
|
|
3353
3369
|
var url = _ref2.url,
|
|
3354
3370
|
importerUrl = _ref2.importerUrl,
|
|
@@ -3371,6 +3387,7 @@
|
|
|
3371
3387
|
} : {}), {}, _defineProperty({}, "file url", url), importerUrl ? _defineProperty({}, "imported by", importerRelativeUrl || importerUrl) : {});
|
|
3372
3388
|
return details;
|
|
3373
3389
|
};
|
|
3390
|
+
|
|
3374
3391
|
var tryToFindProjectRelativeUrl = function tryToFindProjectRelativeUrl(url, _ref5) {
|
|
3375
3392
|
var compileServerOrigin = _ref5.compileServerOrigin,
|
|
3376
3393
|
compileDirectoryRelativeUrl = _ref5.compileDirectoryRelativeUrl;
|
|
@@ -3400,6 +3417,7 @@
|
|
|
3400
3417
|
// ? (text) => window.btoa(window.unescape(window.encodeURIComponent(text)))
|
|
3401
3418
|
// : (text) => Buffer.from(text, "utf8").toString("base64")
|
|
3402
3419
|
|
|
3420
|
+
|
|
3403
3421
|
var applyDefaultExtension = function applyDefaultExtension(specifier, importer) {
|
|
3404
3422
|
if (!importer) {
|
|
3405
3423
|
return specifier;
|
|
@@ -3518,8 +3536,9 @@
|
|
|
3518
3536
|
}));
|
|
3519
3537
|
return new Error(detailedMessage);
|
|
3520
3538
|
};
|
|
3521
|
-
|
|
3522
3539
|
/* eslint-env browser */
|
|
3540
|
+
|
|
3541
|
+
|
|
3523
3542
|
var _window = window,
|
|
3524
3543
|
performance$1 = _window.performance;
|
|
3525
3544
|
|
|
@@ -3566,11 +3585,11 @@
|
|
|
3566
3585
|
}) : _async$3(function (fn) {
|
|
3567
3586
|
return fn();
|
|
3568
3587
|
});
|
|
3569
|
-
|
|
3570
3588
|
/*
|
|
3571
3589
|
* SJS 6.11.0
|
|
3572
3590
|
* Minimal SystemJS Build
|
|
3573
3591
|
*/
|
|
3592
|
+
|
|
3574
3593
|
(function () {
|
|
3575
3594
|
function errMsg(errCode, msg) {
|
|
3576
3595
|
return (msg || "") + " (SystemJS https://git.io/JvFET#" + errCode + ")";
|
|
@@ -4295,9 +4314,9 @@
|
|
|
4295
4314
|
return result;
|
|
4296
4315
|
};
|
|
4297
4316
|
})();
|
|
4298
|
-
|
|
4299
4317
|
/* eslint-env browser */
|
|
4300
4318
|
|
|
4319
|
+
|
|
4301
4320
|
function _await$2(value, then, direct) {
|
|
4302
4321
|
if (direct) {
|
|
4303
4322
|
return then ? then(value) : value;
|
|
@@ -4666,7 +4685,6 @@
|
|
|
4666
4685
|
|
|
4667
4686
|
var supportedTypes = ["Boolean", "Number", "String", "Date", "RegExp", "Blob", "FileList", "ImageData", "ImageBitmap", "ArrayBuffer"];
|
|
4668
4687
|
var maybeTypes = ["Array", "Object", "Map", "Set"];
|
|
4669
|
-
|
|
4670
4688
|
/* eslint-env browser */
|
|
4671
4689
|
|
|
4672
4690
|
function _await$1(value, then, direct) {
|
|
@@ -5172,7 +5190,6 @@
|
|
|
5172
5190
|
executeFileUsingDynamicImport: executeFileUsingDynamicImport,
|
|
5173
5191
|
executeFileUsingSystemJs: executeFileUsingSystemJs
|
|
5174
5192
|
};
|
|
5175
|
-
|
|
5176
5193
|
})();
|
|
5177
5194
|
|
|
5178
5195
|
//# sourceMappingURL=browser_runtime-c7288751.js.map
|