@jsenv/core 34.1.1 → 34.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/jsenv.js
CHANGED
|
@@ -7215,7 +7215,9 @@ const formatters = {
|
|
|
7215
7215
|
}
|
|
7216
7216
|
};
|
|
7217
7217
|
|
|
7218
|
-
const createUrlGraph = (
|
|
7218
|
+
const createUrlGraph = ({
|
|
7219
|
+
name = "anonymous"
|
|
7220
|
+
} = {}) => {
|
|
7219
7221
|
const createUrlInfoCallbackRef = {
|
|
7220
7222
|
current: () => {}
|
|
7221
7223
|
};
|
|
@@ -7419,6 +7421,7 @@ const createUrlGraph = () => {
|
|
|
7419
7421
|
iterate(urlInfo);
|
|
7420
7422
|
};
|
|
7421
7423
|
return {
|
|
7424
|
+
name,
|
|
7422
7425
|
createUrlInfoCallbackRef,
|
|
7423
7426
|
prunedUrlInfosCallbackRef,
|
|
7424
7427
|
urlInfoMap,
|
|
@@ -20457,6 +20460,12 @@ const jsenvPluginAutoreloadServer = ({
|
|
|
20457
20460
|
});
|
|
20458
20461
|
};
|
|
20459
20462
|
const propagateUpdate = firstUrlInfo => {
|
|
20463
|
+
if (!urlGraph.getUrlInfo(firstUrlInfo.url)) {
|
|
20464
|
+
return {
|
|
20465
|
+
declined: true,
|
|
20466
|
+
reason: `url not in the url graph`
|
|
20467
|
+
};
|
|
20468
|
+
}
|
|
20460
20469
|
const iterate = (urlInfo, seen) => {
|
|
20461
20470
|
if (urlInfo.data.hotAcceptSelf) {
|
|
20462
20471
|
return {
|
|
@@ -22770,7 +22779,9 @@ const createFileService = ({
|
|
|
22770
22779
|
const watchAssociations = URL_META.resolveAssociations({
|
|
22771
22780
|
watch: stopWatchingSourceFiles.watchPatterns
|
|
22772
22781
|
}, sourceDirectoryUrl);
|
|
22773
|
-
const urlGraph = createUrlGraph(
|
|
22782
|
+
const urlGraph = createUrlGraph({
|
|
22783
|
+
name: runtimeId
|
|
22784
|
+
});
|
|
22774
22785
|
clientFileChangeCallbackList.push(({
|
|
22775
22786
|
url
|
|
22776
22787
|
}) => {
|
|
@@ -23468,7 +23479,9 @@ const assertAndNormalizeWebServer = async webServer => {
|
|
|
23468
23479
|
}
|
|
23469
23480
|
const {
|
|
23470
23481
|
headers
|
|
23471
|
-
} = await basicFetch(webServer.origin
|
|
23482
|
+
} = await basicFetch(webServer.origin, {
|
|
23483
|
+
rejectUnauthorized: false
|
|
23484
|
+
});
|
|
23472
23485
|
if (headers["x-server-name"] === "jsenv_dev_server") {
|
|
23473
23486
|
webServer.isJsenvDevServer = true;
|
|
23474
23487
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "34.1.
|
|
3
|
+
"version": "34.1.3",
|
|
4
4
|
"description": "Tool to develop, test and build js projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -43,14 +43,13 @@
|
|
|
43
43
|
"eslint": "npx eslint . --ext=.js,.mjs,.cjs,.html",
|
|
44
44
|
"dev": "node --conditions=development ./scripts/dev/dev.mjs",
|
|
45
45
|
"test": "node --conditions=development ./scripts/test/test.mjs",
|
|
46
|
+
"test:dev_errors_snapshots": "node --conditions=development ./tests/dev_server/errors/generate_snapshot_files.mjs",
|
|
47
|
+
"test:workspace": "npm run test --workspaces --if-present -- --workspace",
|
|
46
48
|
"build": "node --conditions=development ./scripts/build/build.mjs",
|
|
47
|
-
"
|
|
49
|
+
"build:file_size": "node ./scripts/build/build_file_size.mjs --log",
|
|
48
50
|
"workspace:versions": "node ./scripts/publish/workspace_versions.mjs",
|
|
49
51
|
"workspace:publish": "node ./scripts/publish/workspace_publish.mjs",
|
|
50
52
|
"performances": "node --expose-gc ./scripts/performance/generate_performance_report.mjs --log --once",
|
|
51
|
-
"file-size": "node ./scripts/file_size/file_size.mjs --log",
|
|
52
|
-
"start_file_server": "node ./scripts/dev/start_file_server.mjs",
|
|
53
|
-
"generate-dev-errors-snapshot-files": "node --conditions=development ./tests/dev_server/errors/generate_snapshot_files.mjs",
|
|
54
53
|
"prettier": "prettier --write .",
|
|
55
54
|
"playwright:install": "npx playwright install-deps && npx playwright install",
|
|
56
55
|
"certificate:install": "node ./scripts/dev/install_certificate_authority.mjs",
|
package/src/dev/file_service.js
CHANGED
|
@@ -72,7 +72,9 @@ export const createFileService = ({
|
|
|
72
72
|
{ watch: stopWatchingSourceFiles.watchPatterns },
|
|
73
73
|
sourceDirectoryUrl,
|
|
74
74
|
)
|
|
75
|
-
const urlGraph = createUrlGraph(
|
|
75
|
+
const urlGraph = createUrlGraph({
|
|
76
|
+
name: runtimeId,
|
|
77
|
+
})
|
|
76
78
|
clientFileChangeCallbackList.push(({ url }) => {
|
|
77
79
|
const onUrlInfo = (urlInfo) => {
|
|
78
80
|
urlGraph.considerModified(urlInfo)
|
|
@@ -44,7 +44,9 @@ export const assertAndNormalizeWebServer = async (webServer) => {
|
|
|
44
44
|
)
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
const { headers } = await basicFetch(webServer.origin
|
|
47
|
+
const { headers } = await basicFetch(webServer.origin, {
|
|
48
|
+
rejectUnauthorized: false,
|
|
49
|
+
})
|
|
48
50
|
if (headers["x-server-name"] === "jsenv_dev_server") {
|
|
49
51
|
webServer.isJsenvDevServer = true
|
|
50
52
|
const { json } = await basicFetch(`${webServer.origin}/__params__.json`, {
|
package/src/kitchen/url_graph.js
CHANGED
|
@@ -2,7 +2,7 @@ import { urlToRelativeUrl } from "@jsenv/urls"
|
|
|
2
2
|
|
|
3
3
|
import { urlSpecifierEncoding } from "./url_specifier_encoding.js"
|
|
4
4
|
|
|
5
|
-
export const createUrlGraph = () => {
|
|
5
|
+
export const createUrlGraph = ({ name = "anonymous" } = {}) => {
|
|
6
6
|
const createUrlInfoCallbackRef = { current: () => {} }
|
|
7
7
|
const prunedUrlInfosCallbackRef = { current: () => {} }
|
|
8
8
|
|
|
@@ -208,6 +208,7 @@ export const createUrlGraph = () => {
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
return {
|
|
211
|
+
name,
|
|
211
212
|
createUrlInfoCallbackRef,
|
|
212
213
|
prunedUrlInfosCallbackRef,
|
|
213
214
|
|
|
@@ -40,6 +40,12 @@ export const jsenvPluginAutoreloadServer = ({
|
|
|
40
40
|
})
|
|
41
41
|
}
|
|
42
42
|
const propagateUpdate = (firstUrlInfo) => {
|
|
43
|
+
if (!urlGraph.getUrlInfo(firstUrlInfo.url)) {
|
|
44
|
+
return {
|
|
45
|
+
declined: true,
|
|
46
|
+
reason: `url not in the url graph`,
|
|
47
|
+
}
|
|
48
|
+
}
|
|
43
49
|
const iterate = (urlInfo, seen) => {
|
|
44
50
|
if (urlInfo.data.hotAcceptSelf) {
|
|
45
51
|
return {
|