@nuxt/webpack-builder-nightly 4.4.7-29652037.eb785fd0 → 4.4.7-29673425.78b1e698
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/index.mjs +34 -15
- package/package.json +12 -12
package/dist/index.mjs
CHANGED
|
@@ -421,6 +421,30 @@ function createMFS() {
|
|
|
421
421
|
_fs.readFile = pify(_fs.readFile);
|
|
422
422
|
return _fs;
|
|
423
423
|
}
|
|
424
|
+
const LOOPBACK_HOSTNAMES = new Set([
|
|
425
|
+
"localhost",
|
|
426
|
+
"127.0.0.1",
|
|
427
|
+
"::1"
|
|
428
|
+
]);
|
|
429
|
+
function firstHeader(value) {
|
|
430
|
+
return Array.isArray(value) ? value[0] : value;
|
|
431
|
+
}
|
|
432
|
+
function isLoopbackHost(host) {
|
|
433
|
+
if (!host) return false;
|
|
434
|
+
const hostname = host.replace(/:\d+$/, "").replace(/^\[|\]$/g, "").toLowerCase();
|
|
435
|
+
return LOOPBACK_HOSTNAMES.has(hostname);
|
|
436
|
+
}
|
|
437
|
+
function isSameOriginRequest(req) {
|
|
438
|
+
const site = firstHeader(req.headers["sec-fetch-site"]);
|
|
439
|
+
if (site !== void 0) return site === "same-origin" || site === "none";
|
|
440
|
+
const initiator = firstHeader(req.headers.origin) || firstHeader(req.headers.referer);
|
|
441
|
+
if (!initiator) return isLoopbackHost(firstHeader(req.headers.host));
|
|
442
|
+
try {
|
|
443
|
+
return new URL(initiator).host === firstHeader(req.headers.host);
|
|
444
|
+
} catch {
|
|
445
|
+
return false;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
424
448
|
function toArray(value) {
|
|
425
449
|
return Array.isArray(value) ? value : [value];
|
|
426
450
|
}
|
|
@@ -1414,20 +1438,6 @@ function wdmToH3Handler(devMiddleware) {
|
|
|
1414
1438
|
});
|
|
1415
1439
|
});
|
|
1416
1440
|
}
|
|
1417
|
-
function isSameOriginRequest(req) {
|
|
1418
|
-
const site = firstHeader(req.headers["sec-fetch-site"]);
|
|
1419
|
-
if (site !== void 0) return site === "same-origin" || site === "none";
|
|
1420
|
-
const initiator = firstHeader(req.headers.origin) || firstHeader(req.headers.referer);
|
|
1421
|
-
if (!initiator) return true;
|
|
1422
|
-
try {
|
|
1423
|
-
return new URL(initiator).host === firstHeader(req.headers.host);
|
|
1424
|
-
} catch {
|
|
1425
|
-
return false;
|
|
1426
|
-
}
|
|
1427
|
-
}
|
|
1428
|
-
function firstHeader(value) {
|
|
1429
|
-
return Array.isArray(value) ? value[0] : value;
|
|
1430
|
-
}
|
|
1431
1441
|
async function compile(compiler) {
|
|
1432
1442
|
const nuxt = useNuxt();
|
|
1433
1443
|
await nuxt.callHook(`${builder}:compile`, {
|
|
@@ -1467,8 +1477,17 @@ async function compile(compiler) {
|
|
|
1467
1477
|
}
|
|
1468
1478
|
const stats = await new Promise((resolve, reject) => compiler.run((err, stats) => err ? reject(err) : resolve(stats)));
|
|
1469
1479
|
if (stats.hasErrors()) {
|
|
1480
|
+
const formatted = stats.toString({
|
|
1481
|
+
errors: true,
|
|
1482
|
+
warnings: false,
|
|
1483
|
+
colors: false,
|
|
1484
|
+
errorDetails: true
|
|
1485
|
+
});
|
|
1486
|
+
const compilationErrors = stats.compilation?.errors ?? [];
|
|
1487
|
+
logger.error(formatted || "(no formatted errors emitted; see compilation errors below)");
|
|
1488
|
+
for (const err of compilationErrors) logger.error(err);
|
|
1470
1489
|
const error = /* @__PURE__ */ new Error("Nuxt build error");
|
|
1471
|
-
error.stack =
|
|
1490
|
+
error.stack = formatted || compilationErrors.map((e) => e.stack || e.message || String(e)).join("\n\n") || error.stack;
|
|
1472
1491
|
throw error;
|
|
1473
1492
|
}
|
|
1474
1493
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/webpack-builder-nightly",
|
|
3
|
-
"version": "4.4.7-
|
|
3
|
+
"version": "4.4.7-29673425.78b1e698",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
|
|
28
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.4.7-
|
|
29
|
-
"@vue/compiler-sfc": "3.5.
|
|
28
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.4.7-29673425.78b1e698",
|
|
29
|
+
"@vue/compiler-sfc": "3.5.35",
|
|
30
30
|
"autoprefixer": "^10.5.0",
|
|
31
31
|
"css-loader": "^7.1.4",
|
|
32
32
|
"css-minimizer-webpack-plugin": "^8.0.0",
|
|
@@ -40,46 +40,46 @@
|
|
|
40
40
|
"jiti": "^2.7.0",
|
|
41
41
|
"knitwork": "^1.3.0",
|
|
42
42
|
"magic-string": "^0.30.21",
|
|
43
|
-
"memfs": "^4.57.
|
|
43
|
+
"memfs": "^4.57.3",
|
|
44
44
|
"mini-css-extract-plugin": "^2.10.2",
|
|
45
45
|
"mlly": "^1.8.2",
|
|
46
46
|
"ohash": "^2.0.11",
|
|
47
47
|
"pathe": "^2.0.3",
|
|
48
48
|
"pify": "^6.1.0",
|
|
49
|
-
"postcss": "^8.5.
|
|
49
|
+
"postcss": "^8.5.15",
|
|
50
50
|
"postcss-import": "^16.1.1",
|
|
51
51
|
"postcss-import-resolver": "^2.0.0",
|
|
52
52
|
"postcss-loader": "^8.2.1",
|
|
53
|
-
"postcss-url": "^10.1.
|
|
53
|
+
"postcss-url": "^10.1.4",
|
|
54
54
|
"pug-plain-loader": "^1.1.0",
|
|
55
55
|
"seroval": "^1.5.4",
|
|
56
56
|
"time-fix-plugin": "^2.0.7",
|
|
57
|
-
"tinyglobby": "^0.2.
|
|
57
|
+
"tinyglobby": "^0.2.17",
|
|
58
58
|
"ufo": "^1.6.4",
|
|
59
59
|
"unenv": "^2.0.0-rc.24",
|
|
60
60
|
"unplugin": "^3.0.0",
|
|
61
61
|
"url-loader": "^4.1.1",
|
|
62
62
|
"vue-bundle-renderer": "^2.2.0",
|
|
63
63
|
"vue-loader": "^17.4.2",
|
|
64
|
-
"webpack": "^5.
|
|
64
|
+
"webpack": "^5.107.2",
|
|
65
65
|
"webpack-bundle-analyzer": "^5.3.0",
|
|
66
66
|
"webpack-dev-middleware": "^8.0.3",
|
|
67
67
|
"webpack-hot-middleware": "^2.26.1",
|
|
68
68
|
"webpackbar": "^7.0.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.4.7-
|
|
71
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.4.7-29673425.78b1e698",
|
|
72
72
|
"@rspack/core": "1.7.11",
|
|
73
73
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
74
74
|
"@types/webpack-hot-middleware": "2.25.12",
|
|
75
75
|
"h3": "1.15.11",
|
|
76
76
|
"h3-next": "npm:h3@2.0.1-rc.22",
|
|
77
|
-
"obuild": "0.4.
|
|
77
|
+
"obuild": "0.4.36",
|
|
78
78
|
"rollup": "4.60.4",
|
|
79
|
-
"vue": "3.5.
|
|
79
|
+
"vue": "3.5.35"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
|
-
"nuxt": "npm:nuxt-nightly@4.4.7-
|
|
82
|
+
"nuxt": "npm:nuxt-nightly@4.4.7-29673425.78b1e698",
|
|
83
83
|
"vue": "^3.3.4"
|
|
84
84
|
},
|
|
85
85
|
"engines": {
|