@wordpress-flow/cli 1.0.8 → 1.0.9

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.
@@ -1859,10 +1859,35 @@ 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
+ }
1862
1886
  return {
1863
1887
  success: false,
1864
1888
  blockName: block.name,
1865
- error: error.message || String(error)
1889
+ error: errorDetails.join(`
1890
+ `)
1866
1891
  };
1867
1892
  }
1868
1893
  }
@@ -2008,7 +2033,7 @@ async function runWebpackBuild(entryPoint, outputDir, webpackConfigPath) {
2008
2033
  execSync(command, {
2009
2034
  cwd: path.dirname(webpackConfigPath),
2010
2035
  stdio: "pipe",
2011
- shell: process.platform === "win32" ? "cmd.exe" : "/bin/sh"
2036
+ env: { ...process.env }
2012
2037
  });
2013
2038
  }
2014
2039
  function findWebpackBinary() {
package/dist/index.js CHANGED
@@ -114915,7 +114915,10 @@ class AbortableWorkerPool {
114915
114915
  scriptsPath: this.scriptsPath,
114916
114916
  tempDir
114917
114917
  };
114918
- const worker = new Worker(this.workerPath, { workerData });
114918
+ const worker = new Worker(this.workerPath, {
114919
+ workerData,
114920
+ env: process.env
114921
+ });
114919
114922
  const startTime = Date.now();
114920
114923
  const activeWorker = {
114921
114924
  worker,
@@ -115881,7 +115884,7 @@ add_action('enqueue_block_assets', 'wordpress_flow_enqueue_block_scripts');
115881
115884
  // package.json
115882
115885
  var package_default = {
115883
115886
  name: "@wordpress-flow/cli",
115884
- version: "1.0.8",
115887
+ version: "1.0.9",
115885
115888
  type: "module",
115886
115889
  description: "TypeScript-based WordPress block creation system",
115887
115890
  main: "dist/index.js",
@@ -116440,9 +116443,10 @@ class WebpackRunner {
116440
116443
  logger.debug(`Running webpack from directory: ${workingDir}`);
116441
116444
  const output2 = execSync(command, {
116442
116445
  cwd: workingDir,
116446
+ encoding: "utf8",
116443
116447
  stdio: "pipe",
116444
- shell: process.platform === "win32" ? "cmd.exe" : "/bin/sh"
116445
- }).toString();
116448
+ env: { ...process.env }
116449
+ });
116446
116450
  logger.debug("Webpack build completed successfully");
116447
116451
  logger.debug(`Output: ${output2}`);
116448
116452
  } catch (error) {
@@ -116909,10 +116913,26 @@ class WorkerPool {
116909
116913
  resolve7(results);
116910
116914
  }
116911
116915
  }).catch((error) => {
116916
+ const errorDetails = [
116917
+ `Error: ${error.message || String(error)}`
116918
+ ];
116919
+ if (error.stack) {
116920
+ errorDetails.push(`Stack: ${error.stack}`);
116921
+ }
116922
+ if (error.code) {
116923
+ errorDetails.push(`Code: ${error.code}`);
116924
+ }
116925
+ if (error.syscall) {
116926
+ errorDetails.push(`Syscall: ${error.syscall}`);
116927
+ }
116928
+ if (error.path) {
116929
+ errorDetails.push(`Path: ${error.path}`);
116930
+ }
116912
116931
  const result2 = {
116913
116932
  success: false,
116914
116933
  blockName: block.name,
116915
- error: error.message || String(error)
116934
+ error: errorDetails.join(`
116935
+ `)
116916
116936
  };
116917
116937
  results.push(result2);
116918
116938
  completed++;
@@ -116943,7 +116963,10 @@ class WorkerPool {
116943
116963
  scriptsPath: this.scriptsPath,
116944
116964
  tempDir
116945
116965
  };
116946
- const worker = new Worker2(this.workerPath, { workerData });
116966
+ const worker = new Worker2(this.workerPath, {
116967
+ workerData,
116968
+ env: process.env
116969
+ });
116947
116970
  const timeout = setTimeout(() => {
116948
116971
  worker.terminate();
116949
116972
  reject(new Error(`Worker timeout for block: ${block.name}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress-flow/cli",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "type": "module",
5
5
  "description": "TypeScript-based WordPress block creation system",
6
6
  "main": "dist/index.js",