@wordpress-flow/cli 1.0.24 → 1.0.25
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/block-build-worker.js +15 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -2022,15 +2022,27 @@ async function runWebpackBuild(entryPoint, outputDir, webpackConfigPath) {
|
|
|
2022
2022
|
return new Promise((resolve2, reject) => {
|
|
2023
2023
|
webpack(config, (err, stats) => {
|
|
2024
2024
|
if (err) {
|
|
2025
|
-
reject(err
|
|
2025
|
+
reject(new Error(`Webpack error: ${err.message}
|
|
2026
|
+
Stack: ${err.stack}`));
|
|
2026
2027
|
return;
|
|
2027
2028
|
}
|
|
2028
2029
|
if (stats?.hasErrors()) {
|
|
2029
2030
|
const info = stats.toJson();
|
|
2030
|
-
|
|
2031
|
-
|
|
2031
|
+
const errorMessages = info.errors?.map((e) => {
|
|
2032
|
+
if (typeof e === "string")
|
|
2033
|
+
return e;
|
|
2034
|
+
return e.message || JSON.stringify(e);
|
|
2035
|
+
}).join(`
|
|
2036
|
+
`) || "Unknown webpack error";
|
|
2037
|
+
reject(new Error(`Webpack build errors:
|
|
2038
|
+
${errorMessages}`));
|
|
2032
2039
|
return;
|
|
2033
2040
|
}
|
|
2041
|
+
if (stats?.hasWarnings()) {
|
|
2042
|
+
const info = stats.toJson();
|
|
2043
|
+
console.warn(`Webpack warnings for ${outputDir}:`, info.warnings?.map((w) => w.message || w).join(`
|
|
2044
|
+
`));
|
|
2045
|
+
}
|
|
2034
2046
|
resolve2();
|
|
2035
2047
|
});
|
|
2036
2048
|
});
|
package/dist/index.js
CHANGED
|
@@ -115779,7 +115779,7 @@ class BuildTemplatesCommand {
|
|
|
115779
115779
|
// package.json
|
|
115780
115780
|
var package_default = {
|
|
115781
115781
|
name: "@wordpress-flow/cli",
|
|
115782
|
-
version: "1.0.
|
|
115782
|
+
version: "1.0.25",
|
|
115783
115783
|
type: "module",
|
|
115784
115784
|
description: "TypeScript-based WordPress block creation system",
|
|
115785
115785
|
main: "dist/index.js",
|