@jsenv/core 22.5.1 → 23.0.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 +203 -49
- package/dist/jsenv_browser_system.js.map +39 -8
- package/dist/jsenv_compile_proxy.js +186 -108
- package/dist/jsenv_compile_proxy.js.map +48 -42
- package/dist/jsenv_exploring_redirector.js +148 -71
- package/dist/jsenv_exploring_redirector.js.map +26 -20
- package/dist/jsenv_toolbar.js +215 -104
- package/dist/jsenv_toolbar.js.map +39 -26
- package/helpers/new_stylesheet/new_stylesheet.js +411 -0
- package/{LICENSE → license} +0 -0
- package/main.js +7 -7
- package/package.json +23 -19
- package/readme.md +5 -4
- package/src/execute.js +23 -10
- package/src/executeTestPlan.js +0 -4
- package/src/importUsingChildProcess.js +36 -32
- package/src/internal/{babel-plugin-replace-expressions.js → babel_plugin_replace_expressions.js} +0 -0
- package/src/internal/{babel-plugin-transform-import-meta.js → babel_plugin_transform_import_meta.js} +0 -0
- package/src/internal/browser-launcher/executeHtmlFile.js +6 -8
- package/src/internal/browser-launcher/jsenv-browser-system.js +3 -0
- package/src/internal/building/asset_url_versioning.js +5 -9
- package/src/internal/building/buildServiceWorker.js +6 -13
- package/src/internal/building/buildUsingRollup.js +34 -0
- package/src/internal/building/build_logs.js +11 -0
- package/src/internal/building/build_stats.js +7 -1
- package/src/internal/building/createJsenvRollupPlugin.js +380 -297
- package/src/internal/building/css/parseCssRessource.js +67 -71
- package/src/internal/building/css/parseCssUrls.js +2 -2
- package/src/internal/building/css/{postcss-urlhash-plugin.js → postcss_plugin_url_visitor.js} +43 -21
- package/src/internal/building/css/replaceCssUrls.js +17 -14
- package/src/internal/building/css_module.js +47 -0
- package/src/internal/building/html/parseHtmlRessource.js +44 -43
- package/src/internal/building/import_references.js +81 -0
- package/src/internal/building/importmap/parseImportmapRessource.js +5 -2
- package/src/internal/building/js/minifyJs.js +30 -3
- package/src/internal/building/js/parseJsRessource.js +70 -77
- package/src/internal/building/json/parseJsonRessource.js +3 -2
- package/src/internal/building/parseRessource.js +11 -8
- package/src/internal/building/parsing.utils.js +4 -15
- package/src/internal/building/ressource_builder.js +142 -114
- package/src/internal/building/ressource_builder_util.js +31 -18
- package/src/internal/building/{fetchSourcemap.js → sourcemap_loader.js} +29 -27
- package/src/internal/building/svg/parseSvgRessource.js +7 -3
- package/src/internal/building/url-versioning.js +2 -1
- package/src/internal/building/url_fetcher.js +79 -0
- package/src/internal/building/url_loader.js +267 -0
- package/src/internal/building/webmanifest/parseWebmanifestRessource.js +9 -4
- package/src/internal/compiling/{js-compilation-service/ensureGlobalThisImportBabelPlugin.js → babel_plugin_global_this_as_jsenv_import.js} +4 -2
- package/src/internal/compiling/babel_plugin_import_assertions.js +100 -0
- package/src/internal/compiling/babel_plugin_new_stylesheet_as_jsenv_import.js +109 -0
- package/src/internal/compiling/babel_plugin_transform_import_specifier.js +86 -0
- package/src/internal/compiling/babel_plugins.js +2 -0
- package/src/internal/compiling/createCompiledFileService.js +6 -8
- package/src/internal/compiling/html_source_file_service.js +2 -2
- package/src/internal/compiling/js-compilation-service/{transformBabelHelperToImportBabelPlugin.js → babel_plugin_babel_helpers_as_jsenv_imports.js} +1 -1
- package/src/internal/compiling/js-compilation-service/{ensureRegeneratorRuntimeImportBabelPlugin.js → babel_plugin_regenerator_runtime_as_jsenv_import.js} +1 -1
- package/src/internal/compiling/js-compilation-service/jsenvTransform.js +7 -16
- package/src/internal/compiling/js-compilation-service/transformJs.js +0 -2
- package/src/internal/compiling/rollup_plugin_commonjs_named_exports.js +2 -2
- package/src/internal/compiling/startCompileServer.js +11 -4
- package/src/internal/escapeTemplateStringSpecialCharacters.js +20 -0
- package/src/internal/executing/coverage/{babel-plugin-instrument.js → babel_plugin_instrument.js} +17 -6
- package/src/internal/executing/coverage/relativeUrlToEmptyCoverage.js +1 -1
- package/src/internal/executing/executeConcurrently.js +2 -2
- package/src/internal/executing/executePlan.js +16 -2
- package/src/internal/executing/generateFileExecutionSteps.js +2 -1
- package/src/internal/executing/launchAndExecute.js +43 -69
- package/src/internal/exploring/exploring.css +2 -1
- package/src/internal/exploring/exploring.redirector.js +0 -1
- package/src/internal/generateGroupMap/generateGroupMap.js +14 -10
- package/src/internal/generateGroupMap/jsenvBabelPluginCompatMap.js +30 -0
- package/src/internal/generateGroupMap/jsenvPluginCompatMap.js +0 -6
- package/src/internal/generateGroupMap/one_runtime_compat.js +9 -38
- package/src/internal/generateGroupMap/runtime_compat.js +9 -24
- package/src/internal/generateGroupMap/runtime_compat_composition.js +2 -12
- package/src/internal/generateGroupMap/runtime_support.js +53 -0
- package/src/internal/jsenvInternalFiles.js +0 -1
- package/src/internal/node-launcher/createControllableNodeProcess.js +2 -3
- package/src/internal/response_validation.js +143 -0
- package/src/internal/runtime/createBrowserRuntime/createBrowserRuntime.js +8 -3
- package/src/internal/runtime/createBrowserRuntime/createBrowserSystem.js +117 -0
- package/src/internal/runtime/createBrowserRuntime/displayErrorInDocument.js +1 -1
- package/src/internal/runtime/createBrowserRuntime/scanBrowserRuntimeFeatures.js +124 -68
- package/src/internal/runtime/createNodeRuntime/createNodeRuntime.js +8 -86
- package/src/internal/runtime/createNodeRuntime/scanNodeRuntimeFeatures.js +115 -0
- package/src/internal/runtime/module-registration.js +1 -2
- package/src/internal/runtime/resolveGroup.js +2 -3
- package/src/internal/toolbar/compilation/toolbar.compilation.js +15 -17
- package/src/internal/toolbar/eventsource/toolbar.eventsource.js +35 -8
- package/src/internal/toolbar/toolbar.main.js +7 -4
- package/src/internal/url_utils.js +20 -0
- package/src/launchBrowser.js +47 -34
- package/src/launchNode.js +6 -3
- package/src/requireUsingChildProcess.js +36 -32
- package/src/startExploring.js +23 -11
- package/src/internal/building/transformImportMetaUrlReferences.js +0 -71
- package/src/internal/runtime/resolveBrowserGroup.js +0 -5
- package/src/internal/runtime/resolveNodeGroup.js +0 -5
- package/src/internal/validateResponseStatusIsOk.js +0 -91
|
@@ -2090,7 +2090,7 @@
|
|
|
2090
2090
|
return then ? value.then(then) : value;
|
|
2091
2091
|
}
|
|
2092
2092
|
|
|
2093
|
-
function _invoke$
|
|
2093
|
+
function _invoke$6(body, then) {
|
|
2094
2094
|
var result = body();
|
|
2095
2095
|
|
|
2096
2096
|
if (result && result.then) {
|
|
@@ -2132,7 +2132,7 @@
|
|
|
2132
2132
|
}
|
|
2133
2133
|
|
|
2134
2134
|
var contentType = response.headers["content-type"] || "";
|
|
2135
|
-
return _invoke$
|
|
2135
|
+
return _invoke$6(function () {
|
|
2136
2136
|
if (response.status === 500 && contentType === "application/json") {
|
|
2137
2137
|
return _await$a(response.json(), function (bodyAsJson) {
|
|
2138
2138
|
if (bodyAsJson.message && bodyAsJson.filename && "columnNumber" in bodyAsJson) {
|
|
@@ -2163,8 +2163,7 @@
|
|
|
2163
2163
|
compileServerOrigin: compileServerOrigin,
|
|
2164
2164
|
compileDirectoryRelativeUrl: compileDirectoryRelativeUrl
|
|
2165
2165
|
})), {}, {
|
|
2166
|
-
|
|
2167
|
-
"suggestion 2": "Use customCompilers to convert non-js to js"
|
|
2166
|
+
suggestion: "Use import.meta.url or import assertions as documented in https://github.com/jsenv/jsenv-core/blob/master/docs/building/readme.md#How-to-reference-assets"
|
|
2168
2167
|
}))) : null;
|
|
2169
2168
|
});
|
|
2170
2169
|
});
|
|
@@ -3099,6 +3098,16 @@
|
|
|
3099
3098
|
return result;
|
|
3100
3099
|
}
|
|
3101
3100
|
|
|
3101
|
+
function _invoke$5(body, then) {
|
|
3102
|
+
var result = body();
|
|
3103
|
+
|
|
3104
|
+
if (result && result.then) {
|
|
3105
|
+
return result.then(then);
|
|
3106
|
+
}
|
|
3107
|
+
|
|
3108
|
+
return then(result);
|
|
3109
|
+
}
|
|
3110
|
+
|
|
3102
3111
|
function _async$8(f) {
|
|
3103
3112
|
return function () {
|
|
3104
3113
|
for (var args = [], i = 0; i < arguments.length; i++) {
|
|
@@ -3137,20 +3146,54 @@
|
|
|
3137
3146
|
browserSystem.resolve = _resolve;
|
|
3138
3147
|
var instantiate = browserSystem.instantiate;
|
|
3139
3148
|
browserSystem.instantiate = _async$8(function (url, importerUrl) {
|
|
3149
|
+
var _exit = false;
|
|
3150
|
+
|
|
3140
3151
|
var _this = this;
|
|
3141
3152
|
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3153
|
+
var _extractImportTypeFro = extractImportTypeFromUrl(url),
|
|
3154
|
+
importType = _extractImportTypeFro.importType,
|
|
3155
|
+
urlWithoutImportType = _extractImportTypeFro.urlWithoutImportType;
|
|
3156
|
+
|
|
3157
|
+
return _invoke$5(function () {
|
|
3158
|
+
if (importType === "json") {
|
|
3159
|
+
return _await$8(instantiateAsJsonModule(urlWithoutImportType, {
|
|
3160
|
+
loader: _this,
|
|
3161
|
+
fetchSource: fetchSource
|
|
3162
|
+
}), function (jsonModule) {
|
|
3163
|
+
_exit = true;
|
|
3164
|
+
return jsonModule;
|
|
3165
|
+
});
|
|
3166
|
+
}
|
|
3167
|
+
}, function (_result) {
|
|
3168
|
+
var _exit2 = false;
|
|
3169
|
+
if (_exit) return _result;
|
|
3170
|
+
return _invoke$5(function () {
|
|
3171
|
+
if (importType === "css") {
|
|
3172
|
+
return _await$8(instantiateAsCssModule(urlWithoutImportType, {
|
|
3173
|
+
importerUrl: importerUrl,
|
|
3174
|
+
compileDirectoryRelativeUrl: compileDirectoryRelativeUrl,
|
|
3175
|
+
loader: _this,
|
|
3176
|
+
fetchSource: fetchSource
|
|
3177
|
+
}), function (cssModule) {
|
|
3178
|
+
_exit2 = true;
|
|
3179
|
+
return cssModule;
|
|
3180
|
+
});
|
|
3181
|
+
}
|
|
3182
|
+
}, function (_result2) {
|
|
3183
|
+
return _exit2 ? _result2 : _catch$4(function () {
|
|
3184
|
+
return _await$8(instantiate.call(_this, url, importerUrl));
|
|
3185
|
+
}, function (e) {
|
|
3186
|
+
return _await$8(createDetailedInstantiateError({
|
|
3187
|
+
instantiateError: e,
|
|
3188
|
+
url: url,
|
|
3189
|
+
importerUrl: importerUrl,
|
|
3190
|
+
compileServerOrigin: compileServerOrigin,
|
|
3191
|
+
compileDirectoryRelativeUrl: compileDirectoryRelativeUrl,
|
|
3192
|
+
fetchSource: fetchSource
|
|
3193
|
+
}), function (jsenvError) {
|
|
3194
|
+
throw jsenvError;
|
|
3195
|
+
});
|
|
3196
|
+
});
|
|
3154
3197
|
});
|
|
3155
3198
|
});
|
|
3156
3199
|
});
|
|
@@ -3167,27 +3210,130 @@
|
|
|
3167
3210
|
return browserSystem;
|
|
3168
3211
|
};
|
|
3169
3212
|
|
|
3170
|
-
var
|
|
3171
|
-
var
|
|
3172
|
-
var
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3213
|
+
var extractImportTypeFromUrl = function extractImportTypeFromUrl(url) {
|
|
3214
|
+
var urlObject = new URL(url);
|
|
3215
|
+
var search = urlObject.search;
|
|
3216
|
+
var searchParams = new URLSearchParams(search);
|
|
3217
|
+
var importType = searchParams.get("import_type");
|
|
3218
|
+
|
|
3219
|
+
if (!importType) {
|
|
3220
|
+
return {};
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3223
|
+
searchParams.delete("import_type");
|
|
3224
|
+
urlObject.search = String(searchParams);
|
|
3225
|
+
return {
|
|
3226
|
+
importType: importType,
|
|
3227
|
+
urlWithoutImportType: urlObject.href
|
|
3228
|
+
};
|
|
3229
|
+
};
|
|
3230
|
+
|
|
3231
|
+
var instantiateAsJsonModule = _async$8(function (url, _ref2) {
|
|
3232
|
+
var loader = _ref2.loader,
|
|
3177
3233
|
fetchSource = _ref2.fetchSource;
|
|
3234
|
+
return _await$8(fetchSource(url, {
|
|
3235
|
+
contentTypeExpected: "application/json"
|
|
3236
|
+
}), function (response) {
|
|
3237
|
+
return _await$8(response.json(), function (json) {
|
|
3238
|
+
window.System.register([], function (_export) {
|
|
3239
|
+
return {
|
|
3240
|
+
execute: function execute() {
|
|
3241
|
+
_export("default", json);
|
|
3242
|
+
}
|
|
3243
|
+
};
|
|
3244
|
+
});
|
|
3245
|
+
return loader.getRegister(url);
|
|
3246
|
+
});
|
|
3247
|
+
});
|
|
3248
|
+
});
|
|
3249
|
+
|
|
3250
|
+
var instantiateAsCssModule = _async$8(function (url, _ref3) {
|
|
3251
|
+
var importerUrl = _ref3.importerUrl,
|
|
3252
|
+
compileDirectoryRelativeUrl = _ref3.compileDirectoryRelativeUrl,
|
|
3253
|
+
loader = _ref3.loader,
|
|
3254
|
+
fetchSource = _ref3.fetchSource;
|
|
3255
|
+
return _await$8(fetchSource(url, {
|
|
3256
|
+
contentTypeExpected: "text/css"
|
|
3257
|
+
}), function (response) {
|
|
3258
|
+
return _await$8(response.text(), function (cssText) {
|
|
3259
|
+
var cssTextWithBaseUrl = cssWithBaseUrl({
|
|
3260
|
+
cssText: cssText,
|
|
3261
|
+
cssUrl: url,
|
|
3262
|
+
baseUrl: importerUrl
|
|
3263
|
+
});
|
|
3264
|
+
window.System.register([], function (_export) {
|
|
3265
|
+
return {
|
|
3266
|
+
execute: function execute() {
|
|
3267
|
+
var sheet = new CSSStyleSheet();
|
|
3268
|
+
sheet.replaceSync(cssTextWithBaseUrl);
|
|
3269
|
+
|
|
3270
|
+
_export("default", sheet);
|
|
3271
|
+
}
|
|
3272
|
+
};
|
|
3273
|
+
}); // There is a logic inside "toolbar.eventsource.js" which is reloading
|
|
3274
|
+
// all link rel="stylesheet" when file ending with ".css" are modified
|
|
3275
|
+
// But here it would not work because we have to replace the css in
|
|
3276
|
+
// the adopted stylsheet + all module importing this css module
|
|
3277
|
+
// should be reinstantiated
|
|
3278
|
+
// -> store a livereload callback forcing whole page reload
|
|
3279
|
+
|
|
3280
|
+
var compileDirectoryServerUrl = "".concat(window.location.origin, "/").concat(compileDirectoryRelativeUrl);
|
|
3281
|
+
var originalFileRelativeUrl = response.url.slice(compileDirectoryServerUrl.length);
|
|
3282
|
+
|
|
3283
|
+
window.__jsenv__.livereloadingCallbacks[originalFileRelativeUrl] = function (_ref4) {
|
|
3284
|
+
var reloadPage = _ref4.reloadPage;
|
|
3285
|
+
reloadPage();
|
|
3286
|
+
};
|
|
3287
|
+
|
|
3288
|
+
return loader.getRegister(url);
|
|
3289
|
+
});
|
|
3290
|
+
});
|
|
3291
|
+
}); // CSSStyleSheet accepts a "baseUrl" parameter
|
|
3292
|
+
// as documented in https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/CSSStyleSheet#parameters
|
|
3293
|
+
// Unfortunately the polyfill do not seems to implement it
|
|
3294
|
+
// So we reuse "systemjs" strategy from https://github.com/systemjs/systemjs/blob/98609dbeef01ec62447e4b21449ce47e55f818bd/src/extras/module-types.js#L37
|
|
3295
|
+
|
|
3296
|
+
|
|
3297
|
+
var cssWithBaseUrl = function cssWithBaseUrl(_ref5) {
|
|
3298
|
+
var cssUrl = _ref5.cssUrl,
|
|
3299
|
+
cssText = _ref5.cssText,
|
|
3300
|
+
baseUrl = _ref5.baseUrl;
|
|
3301
|
+
var cssDirectoryUrl = new URL("./", cssUrl).href;
|
|
3302
|
+
var baseDirectoryUrl = new URL("./", baseUrl).href;
|
|
3303
|
+
|
|
3304
|
+
if (cssDirectoryUrl === baseDirectoryUrl) {
|
|
3305
|
+
return cssText;
|
|
3306
|
+
}
|
|
3307
|
+
|
|
3308
|
+
var cssTextRelocated = cssText.replace(/url\(\s*(?:(["'])((?:\\.|[^\n\\"'])+)\1|((?:\\.|[^\s,"'()\\])+))\s*\)/g, function (match, quotes, relUrl1, relUrl2) {
|
|
3309
|
+
var absoluteUrl = new URL(relUrl1 || relUrl2, cssUrl).href;
|
|
3310
|
+
return "url(".concat(quotes).concat(absoluteUrl).concat(quotes, ")");
|
|
3311
|
+
});
|
|
3312
|
+
return cssTextRelocated;
|
|
3313
|
+
};
|
|
3314
|
+
|
|
3315
|
+
var createDetailedInstantiateError = _async$8(function (_ref6) {
|
|
3316
|
+
var _exit3 = false;
|
|
3317
|
+
var instantiateError = _ref6.instantiateError,
|
|
3318
|
+
url = _ref6.url,
|
|
3319
|
+
importerUrl = _ref6.importerUrl,
|
|
3320
|
+
compileServerOrigin = _ref6.compileServerOrigin,
|
|
3321
|
+
compileDirectoryRelativeUrl = _ref6.compileDirectoryRelativeUrl,
|
|
3322
|
+
fetchSource = _ref6.fetchSource;
|
|
3178
3323
|
var response;
|
|
3179
3324
|
return _continue$2(_catch$4(function () {
|
|
3180
3325
|
return _await$8(fetchSource(url, {
|
|
3181
|
-
importerUrl: importerUrl
|
|
3326
|
+
importerUrl: importerUrl,
|
|
3327
|
+
contentTypeExpected: "application/javascript"
|
|
3182
3328
|
}), function (_fetchSource) {
|
|
3183
3329
|
response = _fetchSource;
|
|
3184
3330
|
});
|
|
3185
3331
|
}, function (e) {
|
|
3186
3332
|
e.code = "NETWORK_FAILURE";
|
|
3187
|
-
|
|
3333
|
+
_exit3 = true;
|
|
3188
3334
|
return e;
|
|
3189
|
-
}), function (
|
|
3190
|
-
return
|
|
3335
|
+
}), function (_result3) {
|
|
3336
|
+
return _exit3 ? _result3 : _await$8(getJavaScriptModuleResponseError(response, {
|
|
3191
3337
|
url: url,
|
|
3192
3338
|
importerUrl: importerUrl,
|
|
3193
3339
|
compileServerOrigin: compileServerOrigin,
|
|
@@ -3212,7 +3358,7 @@
|
|
|
3212
3358
|
message = errorToHTML(error);
|
|
3213
3359
|
}
|
|
3214
3360
|
|
|
3215
|
-
var css = "\n .jsenv-console {\n background: rgba(0, 0, 0, 0.95);\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n z-index: 1000;\n
|
|
3361
|
+
var css = "\n .jsenv-console {\n background: rgba(0, 0, 0, 0.95);\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n z-index: 1000;\n box-sizing: border-box;\n padding: 1em;\n }\n\n .jsenv-console h1 {\n color: red;\n display: flex;\n align-items: center;\n }\n\n #button-close-jsenv-console {\n margin-left: 10px;\n }\n\n .jsenv-console pre {\n overflow: auto;\n max-width: 70em;\n /* avoid scrollbar to hide the text behind it */\n padding: 20px;\n }\n\n .jsenv-console pre[data-theme=\"dark\"] {\n background: #111;\n border: 1px solid #333;\n color: #eee;\n }\n\n .jsenv-console pre[data-theme=\"light\"] {\n background: #1E1E1E;\n border: 1px solid white;\n color: #EEEEEE;\n }\n\n .jsenv-console pre a {\n color: inherit;\n }\n ";
|
|
3216
3362
|
var html = "\n <style type=\"text/css\">".concat(css, "></style>\n <div class=\"jsenv-console\">\n <h1>").concat(title, " <button id=\"button-close-jsenv-console\">X</button></h1>\n <pre data-theme=\"").concat(theme, "\">").concat(message, "</pre>\n </div>\n ");
|
|
3217
3363
|
var removeJsenvConsole = appendHMTLInside(html, document.body);
|
|
3218
3364
|
|
|
@@ -3562,22 +3708,26 @@
|
|
|
3562
3708
|
outDirectoryRelativeUrl = _ref.outDirectoryRelativeUrl,
|
|
3563
3709
|
compileId = _ref.compileId;
|
|
3564
3710
|
|
|
3565
|
-
var fetchSource = function fetchSource(url) {
|
|
3711
|
+
var fetchSource = function fetchSource(url, _ref2) {
|
|
3712
|
+
var contentTypeExpected = _ref2.contentTypeExpected;
|
|
3566
3713
|
return fetchUrl(url, {
|
|
3567
|
-
credentials: "same-origin"
|
|
3714
|
+
credentials: "same-origin",
|
|
3715
|
+
contentTypeExpected: contentTypeExpected
|
|
3568
3716
|
});
|
|
3569
3717
|
};
|
|
3570
3718
|
|
|
3571
3719
|
var fetchJson = _async$6(function (url) {
|
|
3572
|
-
return _await$6(fetchSource(url
|
|
3720
|
+
return _await$6(fetchSource(url, {
|
|
3721
|
+
contentTypeExpected: "application/json"
|
|
3722
|
+
}), function (response) {
|
|
3573
3723
|
return _await$6(response.json());
|
|
3574
3724
|
});
|
|
3575
3725
|
});
|
|
3576
3726
|
|
|
3577
3727
|
var outDirectoryUrl = "".concat(compileServerOrigin, "/").concat(outDirectoryRelativeUrl);
|
|
3578
3728
|
var envUrl = String(new URL("env.json", outDirectoryUrl));
|
|
3579
|
-
return _await$6(fetchJson(envUrl), function (
|
|
3580
|
-
var importDefaultExtension =
|
|
3729
|
+
return _await$6(fetchJson(envUrl), function (_ref3) {
|
|
3730
|
+
var importDefaultExtension = _ref3.importDefaultExtension;
|
|
3581
3731
|
var compileDirectoryRelativeUrl = "".concat(outDirectoryRelativeUrl).concat(compileId, "/"); // if there is an importmap in the document we use it instead of fetching.
|
|
3582
3732
|
// systemjs style with systemjs-importmap
|
|
3583
3733
|
|
|
@@ -3590,7 +3740,9 @@
|
|
|
3590
3740
|
return _invoke$4(function () {
|
|
3591
3741
|
if (importmapScript.src) {
|
|
3592
3742
|
importMapUrl = importmapScript.src;
|
|
3593
|
-
return _await$6(fetchSource(importMapUrl
|
|
3743
|
+
return _await$6(fetchSource(importMapUrl, {
|
|
3744
|
+
contentTypeExpected: "application/importmap+json"
|
|
3745
|
+
}), function (importmapFileResponse) {
|
|
3594
3746
|
var _temp = importmapFileResponse.status === 404;
|
|
3595
3747
|
|
|
3596
3748
|
return _await$6(_temp ? {} : importmapFileResponse.json(), function (_importmapFileRespons) {
|
|
@@ -3626,22 +3778,22 @@
|
|
|
3626
3778
|
});
|
|
3627
3779
|
|
|
3628
3780
|
var executeFile = _async$6(function (specifier) {
|
|
3629
|
-
var
|
|
3630
|
-
|
|
3631
|
-
transferableNamespace =
|
|
3632
|
-
|
|
3633
|
-
errorExposureInConsole =
|
|
3634
|
-
|
|
3635
|
-
errorExposureInNotification =
|
|
3636
|
-
|
|
3637
|
-
errorExposureInDocument =
|
|
3638
|
-
|
|
3639
|
-
executionExposureOnWindow =
|
|
3640
|
-
|
|
3641
|
-
errorTransform =
|
|
3781
|
+
var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
3782
|
+
_ref4$transferableNam = _ref4.transferableNamespace,
|
|
3783
|
+
transferableNamespace = _ref4$transferableNam === void 0 ? false : _ref4$transferableNam,
|
|
3784
|
+
_ref4$errorExposureIn = _ref4.errorExposureInConsole,
|
|
3785
|
+
errorExposureInConsole = _ref4$errorExposureIn === void 0 ? true : _ref4$errorExposureIn,
|
|
3786
|
+
_ref4$errorExposureIn2 = _ref4.errorExposureInNotification,
|
|
3787
|
+
errorExposureInNotification = _ref4$errorExposureIn2 === void 0 ? false : _ref4$errorExposureIn2,
|
|
3788
|
+
_ref4$errorExposureIn3 = _ref4.errorExposureInDocument,
|
|
3789
|
+
errorExposureInDocument = _ref4$errorExposureIn3 === void 0 ? true : _ref4$errorExposureIn3,
|
|
3790
|
+
_ref4$executionExposu = _ref4.executionExposureOnWindow,
|
|
3791
|
+
executionExposureOnWindow = _ref4$executionExposu === void 0 ? false : _ref4$executionExposu,
|
|
3792
|
+
_ref4$errorTransform = _ref4.errorTransform,
|
|
3793
|
+
errorTransform = _ref4$errorTransform === void 0 ? function (error) {
|
|
3642
3794
|
return error;
|
|
3643
|
-
} :
|
|
3644
|
-
measurePerformance =
|
|
3795
|
+
} : _ref4$errorTransform,
|
|
3796
|
+
measurePerformance = _ref4.measurePerformance;
|
|
3645
3797
|
|
|
3646
3798
|
return _await$6(memoizedCreateBrowserSystem({
|
|
3647
3799
|
compileServerOrigin: compileServerOrigin,
|
|
@@ -5017,7 +5169,9 @@
|
|
|
5017
5169
|
});
|
|
5018
5170
|
});
|
|
5019
5171
|
}));
|
|
5172
|
+
var livereloadingCallbacks = {};
|
|
5020
5173
|
window.__jsenv__ = {
|
|
5174
|
+
livereloadingCallbacks: livereloadingCallbacks,
|
|
5021
5175
|
executionResultPromise: executionResultPromise,
|
|
5022
5176
|
executeFileUsingDynamicImport: executeFileUsingDynamicImport,
|
|
5023
5177
|
executeFileUsingSystemJs: executeFileUsingSystemJs
|