@jsenv/core 41.5.35 → 41.5.38
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/build/build.js +27 -2
- package/dist/client/client_monitoring/clients_page.html +1459 -0
- package/dist/client/https_trust/https_trust.html +362 -0
- package/dist/{page_picker.js → client/page_switcher/page_switcher.js} +222 -1
- package/dist/start_dev_server/start_dev_server.js +155 -8
- package/package.json +2 -2
- package/src/dev/dev_server_plugins/client/https_trust.html +352 -0
- package/src/dev/dev_server_plugins/dev_server_plugin_https_trust.js +93 -0
- package/src/dev/start_dev_server.js +35 -1
- package/src/kitchen/errors.js +26 -1
- package/dist/html/clients_page.html +0 -651
- package/dist/js/page_switcher.js +0 -224
- /package/dist/{html → client/client_monitoring}/client_monitor_page.html +0 -0
- /package/dist/{js → client/client_monitoring}/client_reporter.js +0 -0
- /package/dist/{js → client/dependency_status}/dependency_status.js +0 -0
package/dist/build/build.js
CHANGED
|
@@ -438,7 +438,7 @@ ${reason}`,
|
|
|
438
438
|
return createFailedToFetchUrlContentError({
|
|
439
439
|
code: "NOT_FOUND",
|
|
440
440
|
reason: "no entry on filesystem",
|
|
441
|
-
...
|
|
441
|
+
...detailsFromHtmlUrlNotFound(urlInfo.firstReference),
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
444
|
}
|
|
@@ -698,6 +698,31 @@ const detailsFromInjectionsOnOwner = (reference) => {
|
|
|
698
698
|
};
|
|
699
699
|
};
|
|
700
700
|
|
|
701
|
+
// An url of an html attribute leading to no file may be meant for a server rather
|
|
702
|
+
// than for jsenv: a route of a backend, which "jsenv-ignore" leaves alone. Only the
|
|
703
|
+
// build is concerned: in dev the browser requests the url whatever jsenv does with it.
|
|
704
|
+
const detailsFromHtmlUrlNotFound = (reference) => {
|
|
705
|
+
const detailsFromInjections = detailsFromInjectionsOnOwner(reference);
|
|
706
|
+
if (detailsFromInjections.suggestion) {
|
|
707
|
+
return detailsFromInjections;
|
|
708
|
+
}
|
|
709
|
+
if (!reference) {
|
|
710
|
+
return {};
|
|
711
|
+
}
|
|
712
|
+
const ownerUrlInfo = reference.ownerUrlInfo;
|
|
713
|
+
if (ownerUrlInfo.type !== "html" || !ownerUrlInfo.context.build) {
|
|
714
|
+
return {};
|
|
715
|
+
}
|
|
716
|
+
const { node, attributeName } = reference.astInfo || {};
|
|
717
|
+
if (!node || !attributeName) {
|
|
718
|
+
return {};
|
|
719
|
+
}
|
|
720
|
+
return {
|
|
721
|
+
suggestion: `when "${reference.specifier}" is answered by a server rather than a file, add "jsenv-ignore" so the build leaves that url alone:
|
|
722
|
+
<${node.nodeName} jsenv-ignore ${attributeName}="${reference.specifier}" />`,
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
|
|
701
726
|
const detailsFromPluginController = (jsenvPluginsController) => {
|
|
702
727
|
const currentPlugin = jsenvPluginsController.getCurrentPlugin();
|
|
703
728
|
if (!currentPlugin) {
|
|
@@ -9821,7 +9846,7 @@ const STATIC_IMPORT_SUBTYPES = ["import_static", "export_named", "export_all"];
|
|
|
9821
9846
|
*/
|
|
9822
9847
|
|
|
9823
9848
|
|
|
9824
|
-
const clientFileUrl = import.meta.resolve("../
|
|
9849
|
+
const clientFileUrl = import.meta.resolve("../client/dependency_status/dependency_status.js");
|
|
9825
9850
|
|
|
9826
9851
|
const jsenvPluginDependencyStatus = ({
|
|
9827
9852
|
dependencyProblemEventEmitter,
|