@jsenv/core 29.1.1 → 29.1.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/main.js
CHANGED
|
@@ -19837,8 +19837,19 @@ const jsenvPluginUrlResolution = ({
|
|
|
19837
19837
|
return new URL(reference.specifier.slice(1), context.rootDirectoryUrl).href;
|
|
19838
19838
|
}
|
|
19839
19839
|
|
|
19840
|
-
|
|
19841
|
-
|
|
19840
|
+
if (reference.type === "sourcemap_comment") {
|
|
19841
|
+
return resolveUrlUsingWebResolution(reference);
|
|
19842
|
+
}
|
|
19843
|
+
|
|
19844
|
+
let urlType;
|
|
19845
|
+
|
|
19846
|
+
if (reference.expectedType) {
|
|
19847
|
+
urlType = reference.expectedType;
|
|
19848
|
+
} else {
|
|
19849
|
+
const parentUrlInfo = context.urlGraph.getUrlInfo(reference.parentUrl);
|
|
19850
|
+
urlType = parentUrlInfo ? parentUrlInfo.type : "entry_point";
|
|
19851
|
+
}
|
|
19852
|
+
|
|
19842
19853
|
const resolver = resolvers[urlType] || resolvers["*"];
|
|
19843
19854
|
return resolver(reference, context);
|
|
19844
19855
|
},
|
|
@@ -25698,6 +25709,7 @@ const startDevServer = async ({
|
|
|
25698
25709
|
signal = new AbortController().signal,
|
|
25699
25710
|
handleSIGINT = true,
|
|
25700
25711
|
logLevel = "info",
|
|
25712
|
+
serverLogLevel = "warn",
|
|
25701
25713
|
protocol = "http",
|
|
25702
25714
|
// it's better to use http1 by default because it allows to get statusText in devtools
|
|
25703
25715
|
// which gives valuable information when there is errors
|
|
@@ -25841,7 +25853,7 @@ const startDevServer = async ({
|
|
|
25841
25853
|
stopOnSIGINT: handleSIGINT,
|
|
25842
25854
|
stopOnInternalError: false,
|
|
25843
25855
|
keepProcessAlive,
|
|
25844
|
-
logLevel,
|
|
25856
|
+
logLevel: serverLogLevel,
|
|
25845
25857
|
startLog: false,
|
|
25846
25858
|
protocol,
|
|
25847
25859
|
http2,
|
package/package.json
CHANGED
|
@@ -23,6 +23,7 @@ export const startDevServer = async ({
|
|
|
23
23
|
signal = new AbortController().signal,
|
|
24
24
|
handleSIGINT = true,
|
|
25
25
|
logLevel = "info",
|
|
26
|
+
serverLogLevel = "warn",
|
|
26
27
|
protocol = "http",
|
|
27
28
|
// it's better to use http1 by default because it allows to get statusText in devtools
|
|
28
29
|
// which gives valuable information when there is errors
|
|
@@ -153,7 +154,7 @@ export const startDevServer = async ({
|
|
|
153
154
|
stopOnSIGINT: handleSIGINT,
|
|
154
155
|
stopOnInternalError: false,
|
|
155
156
|
keepProcessAlive,
|
|
156
|
-
logLevel,
|
|
157
|
+
logLevel: serverLogLevel,
|
|
157
158
|
startLog: false,
|
|
158
159
|
|
|
159
160
|
protocol,
|
|
@@ -98,8 +98,16 @@ export const jsenvPluginUrlResolution = ({
|
|
|
98
98
|
return new URL(reference.specifier.slice(1), context.rootDirectoryUrl)
|
|
99
99
|
.href
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
if (reference.type === "sourcemap_comment") {
|
|
102
|
+
return resolveUrlUsingWebResolution(reference, context)
|
|
103
|
+
}
|
|
104
|
+
let urlType
|
|
105
|
+
if (reference.expectedType) {
|
|
106
|
+
urlType = reference.expectedType
|
|
107
|
+
} else {
|
|
108
|
+
const parentUrlInfo = context.urlGraph.getUrlInfo(reference.parentUrl)
|
|
109
|
+
urlType = parentUrlInfo ? parentUrlInfo.type : "entry_point"
|
|
110
|
+
}
|
|
103
111
|
const resolver = resolvers[urlType] || resolvers["*"]
|
|
104
112
|
return resolver(reference, context)
|
|
105
113
|
},
|