@wordpress-flow/cli 1.0.15 → 1.0.21
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 +3 -27
- package/dist/index.js +1405 -2758
- package/package.json +8 -4
|
@@ -1859,35 +1859,10 @@ async function buildBlock() {
|
|
|
1859
1859
|
};
|
|
1860
1860
|
} catch (error) {
|
|
1861
1861
|
cleanupTempFiles(tempDir);
|
|
1862
|
-
const errorDetails = [
|
|
1863
|
-
`Error: ${error.message || String(error)}`
|
|
1864
|
-
];
|
|
1865
|
-
if (error.stack) {
|
|
1866
|
-
errorDetails.push(`Stack: ${error.stack}`);
|
|
1867
|
-
}
|
|
1868
|
-
if (error.code) {
|
|
1869
|
-
errorDetails.push(`Code: ${error.code}`);
|
|
1870
|
-
}
|
|
1871
|
-
if (error.syscall) {
|
|
1872
|
-
errorDetails.push(`Syscall: ${error.syscall}`);
|
|
1873
|
-
}
|
|
1874
|
-
if (error.path) {
|
|
1875
|
-
errorDetails.push(`Path: ${error.path}`);
|
|
1876
|
-
}
|
|
1877
|
-
if (error.spawnargs) {
|
|
1878
|
-
errorDetails.push(`Spawn args: ${JSON.stringify(error.spawnargs)}`);
|
|
1879
|
-
}
|
|
1880
|
-
if (error.stderr) {
|
|
1881
|
-
errorDetails.push(`Stderr: ${error.stderr.toString()}`);
|
|
1882
|
-
}
|
|
1883
|
-
if (error.stdout) {
|
|
1884
|
-
errorDetails.push(`Stdout: ${error.stdout.toString()}`);
|
|
1885
|
-
}
|
|
1886
1862
|
return {
|
|
1887
1863
|
success: false,
|
|
1888
1864
|
blockName: block.name,
|
|
1889
|
-
error:
|
|
1890
|
-
`)
|
|
1865
|
+
error: error.message || String(error)
|
|
1891
1866
|
};
|
|
1892
1867
|
}
|
|
1893
1868
|
}
|
|
@@ -2028,7 +2003,8 @@ function parseBlockJsonFromSource(block) {
|
|
|
2028
2003
|
}
|
|
2029
2004
|
async function runWebpackBuild(entryPoint, outputDir, webpackConfigPath) {
|
|
2030
2005
|
const webpackBinary = findWebpackBinary();
|
|
2031
|
-
const
|
|
2006
|
+
const envString = `--env entry="${entryPoint}" --env output="${outputDir}"`;
|
|
2007
|
+
const command = `${webpackBinary} --config "${webpackConfigPath}" ${envString} --mode production`;
|
|
2032
2008
|
execSync(command, {
|
|
2033
2009
|
cwd: path.dirname(webpackConfigPath),
|
|
2034
2010
|
encoding: "utf8",
|