@jsenv/core 41.5.37 → 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/start_dev_server/start_dev_server.js +29 -4
- package/package.json +1 -1
- package/src/kitchen/errors.js +26 -1
- /package/dist/{js → client/client_monitoring}/client_reporter.js +0 -0
- /package/dist/{js → client/dependency_status}/dependency_status.js +0 -0
- /package/dist/{js → client/page_switcher}/page_switcher.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,
|
|
@@ -982,7 +982,7 @@ const runtimeFromRequest = (request) => {
|
|
|
982
982
|
};
|
|
983
983
|
|
|
984
984
|
const clientReporterFileUrl = new URL(
|
|
985
|
-
"../
|
|
985
|
+
"../client/client_monitoring/client_reporter.js",
|
|
986
986
|
import.meta.url,
|
|
987
987
|
).href;
|
|
988
988
|
const clientsPageFileUrl = new URL(
|
|
@@ -1549,7 +1549,7 @@ const jsenvPluginClientMonitoring = () => {
|
|
|
1549
1549
|
*/
|
|
1550
1550
|
|
|
1551
1551
|
|
|
1552
|
-
const clientFileUrl$1 = new URL("../
|
|
1552
|
+
const clientFileUrl$1 = new URL("../client/page_switcher/page_switcher.js", import.meta.url)
|
|
1553
1553
|
.href;
|
|
1554
1554
|
|
|
1555
1555
|
const jsenvPluginPageSwitcher = () => {
|
|
@@ -5136,7 +5136,7 @@ ${reason}`,
|
|
|
5136
5136
|
return createFailedToFetchUrlContentError({
|
|
5137
5137
|
code: "NOT_FOUND",
|
|
5138
5138
|
reason: "no entry on filesystem",
|
|
5139
|
-
...
|
|
5139
|
+
...detailsFromHtmlUrlNotFound(urlInfo.firstReference),
|
|
5140
5140
|
});
|
|
5141
5141
|
}
|
|
5142
5142
|
}
|
|
@@ -5396,6 +5396,31 @@ const detailsFromInjectionsOnOwner = (reference) => {
|
|
|
5396
5396
|
};
|
|
5397
5397
|
};
|
|
5398
5398
|
|
|
5399
|
+
// An url of an html attribute leading to no file may be meant for a server rather
|
|
5400
|
+
// than for jsenv: a route of a backend, which "jsenv-ignore" leaves alone. Only the
|
|
5401
|
+
// build is concerned: in dev the browser requests the url whatever jsenv does with it.
|
|
5402
|
+
const detailsFromHtmlUrlNotFound = (reference) => {
|
|
5403
|
+
const detailsFromInjections = detailsFromInjectionsOnOwner(reference);
|
|
5404
|
+
if (detailsFromInjections.suggestion) {
|
|
5405
|
+
return detailsFromInjections;
|
|
5406
|
+
}
|
|
5407
|
+
if (!reference) {
|
|
5408
|
+
return {};
|
|
5409
|
+
}
|
|
5410
|
+
const ownerUrlInfo = reference.ownerUrlInfo;
|
|
5411
|
+
if (ownerUrlInfo.type !== "html" || !ownerUrlInfo.context.build) {
|
|
5412
|
+
return {};
|
|
5413
|
+
}
|
|
5414
|
+
const { node, attributeName } = reference.astInfo || {};
|
|
5415
|
+
if (!node || !attributeName) {
|
|
5416
|
+
return {};
|
|
5417
|
+
}
|
|
5418
|
+
return {
|
|
5419
|
+
suggestion: `when "${reference.specifier}" is answered by a server rather than a file, add "jsenv-ignore" so the build leaves that url alone:
|
|
5420
|
+
<${node.nodeName} jsenv-ignore ${attributeName}="${reference.specifier}" />`,
|
|
5421
|
+
};
|
|
5422
|
+
};
|
|
5423
|
+
|
|
5399
5424
|
const detailsFromPluginController = (jsenvPluginsController) => {
|
|
5400
5425
|
const currentPlugin = jsenvPluginsController.getCurrentPlugin();
|
|
5401
5426
|
if (!currentPlugin) {
|
|
@@ -7721,7 +7746,7 @@ const STATIC_IMPORT_SUBTYPES = ["import_static", "export_named", "export_all"];
|
|
|
7721
7746
|
*/
|
|
7722
7747
|
|
|
7723
7748
|
|
|
7724
|
-
const clientFileUrl = import.meta.resolve("../
|
|
7749
|
+
const clientFileUrl = import.meta.resolve("../client/dependency_status/dependency_status.js");
|
|
7725
7750
|
|
|
7726
7751
|
const jsenvPluginDependencyStatus = ({
|
|
7727
7752
|
dependencyProblemEventEmitter,
|
package/package.json
CHANGED
package/src/kitchen/errors.js
CHANGED
|
@@ -140,7 +140,7 @@ ${reason}`,
|
|
|
140
140
|
return createFailedToFetchUrlContentError({
|
|
141
141
|
code: "NOT_FOUND",
|
|
142
142
|
reason: "no entry on filesystem",
|
|
143
|
-
...
|
|
143
|
+
...detailsFromHtmlUrlNotFound(urlInfo.firstReference),
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
}
|
|
@@ -400,6 +400,31 @@ const detailsFromInjectionsOnOwner = (reference) => {
|
|
|
400
400
|
};
|
|
401
401
|
};
|
|
402
402
|
|
|
403
|
+
// An url of an html attribute leading to no file may be meant for a server rather
|
|
404
|
+
// than for jsenv: a route of a backend, which "jsenv-ignore" leaves alone. Only the
|
|
405
|
+
// build is concerned: in dev the browser requests the url whatever jsenv does with it.
|
|
406
|
+
const detailsFromHtmlUrlNotFound = (reference) => {
|
|
407
|
+
const detailsFromInjections = detailsFromInjectionsOnOwner(reference);
|
|
408
|
+
if (detailsFromInjections.suggestion) {
|
|
409
|
+
return detailsFromInjections;
|
|
410
|
+
}
|
|
411
|
+
if (!reference) {
|
|
412
|
+
return {};
|
|
413
|
+
}
|
|
414
|
+
const ownerUrlInfo = reference.ownerUrlInfo;
|
|
415
|
+
if (ownerUrlInfo.type !== "html" || !ownerUrlInfo.context.build) {
|
|
416
|
+
return {};
|
|
417
|
+
}
|
|
418
|
+
const { node, attributeName } = reference.astInfo || {};
|
|
419
|
+
if (!node || !attributeName) {
|
|
420
|
+
return {};
|
|
421
|
+
}
|
|
422
|
+
return {
|
|
423
|
+
suggestion: `when "${reference.specifier}" is answered by a server rather than a file, add "jsenv-ignore" so the build leaves that url alone:
|
|
424
|
+
<${node.nodeName} jsenv-ignore ${attributeName}="${reference.specifier}" />`,
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
|
|
403
428
|
const detailsFromPluginController = (jsenvPluginsController) => {
|
|
404
429
|
const currentPlugin = jsenvPluginsController.getCurrentPlugin();
|
|
405
430
|
if (!currentPlugin) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|