@caweb/cli 1.15.1 → 1.15.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.
@@ -29,40 +29,42 @@ export default async function webpack({
29
29
  externals
30
30
  } ) {
31
31
  const webpackCommand = 'build' === process.argv[2] ? 'build' : 'serve' ;
32
-
32
+
33
33
  // we use our default config from the @caweb/webpack
34
34
  const defaultConfigPath = path.resolve('node_modules', '@caweb', 'webpack', 'webpack.config.js' );
35
-
35
+
36
+ // prepend our default config to the arguments.
37
+ // users can overwrite any values by creating a webconfig of their own.
38
+ let webPackArgs = [
39
+ '--config',
40
+ defaultConfigPath,
41
+ ...process.argv.splice(3),
42
+ ];
43
+
36
44
  // Since we use @wordpress/scripts webpack config we can leverage
37
45
  // the environment variables as well.
38
46
  process.env.WP_COPY_PHP_FILES_TO_DIST = true;
39
47
  process.env.WP_NO_EXTERNALS = externals;
40
48
 
41
- // add our default config as an extension.
42
- // users can overwrite any values by creating a webconfig of their own.
43
- let webPackArgs = [
44
- '--config',
45
- defaultConfigPath
46
- ].filter(e => e);
47
-
48
49
  // CommonJS
49
50
  if( fs.existsSync( path.resolve( 'webpack.config.cjs' ) ) ){
50
51
  webPackArgs.push(
51
52
  '--config',
52
- path.resolve('webpack.config.cjs' ),
53
- '--merge'
53
+ path.resolve('webpack.config.cjs' )
54
54
  )
55
55
 
56
56
  // ESM
57
57
  }else if( fs.existsSync(path.resolve('webpack.config.js' )) ){
58
58
  webPackArgs.push(
59
59
  '--config',
60
- path.resolve('webpack.config.js' ),
61
- '--merge'
60
+ path.resolve('webpack.config.js' )
62
61
  )
63
62
 
64
63
  }
65
64
 
65
+ // add the --merge flag to allow merging configs.
66
+ webPackArgs.push( '--merge' );
67
+
66
68
  // run the webpackCommand command.
67
69
  await runCmd(
68
70
  'webpack',
@@ -72,7 +74,6 @@ export default async function webpack({
72
74
  ],
73
75
  {
74
76
  stdio: 'inherit',
75
- argv0: process.argv.join(' ')
76
77
  }
77
78
  );
78
79
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caweb/cli",
3
- "version": "1.15.1",
3
+ "version": "1.15.3",
4
4
  "description": "CAWebPublishing Command Line Interface.",
5
5
  "exports": "./lib/env.js",
6
6
  "type": "module",
@@ -63,10 +63,10 @@
63
63
  }
64
64
  },
65
65
  "dependencies": {
66
- "@caweb/webpack": "^1.5.10",
67
- "@inquirer/prompts": "^8.0.2",
68
- "@wordpress/create-block": "^4.79.0",
69
- "@wordpress/env": "^10.36.0",
66
+ "@caweb/webpack": "^1.5.11",
67
+ "@inquirer/prompts": "^8.1.0",
68
+ "@wordpress/create-block": "^4.80.0",
69
+ "@wordpress/env": "^10.37.0",
70
70
  "axios": "^1.13.2",
71
71
  "axios-retry": "^4.5.0",
72
72
  "chalk": "^5.6.2",
@@ -75,11 +75,11 @@
75
75
  "crypto": "^1.0.1",
76
76
  "deepmerge": "^4.3.1",
77
77
  "docker-compose": "^1.3.0",
78
- "fs-extra": "^11.3.2",
78
+ "fs-extra": "^11.3.3",
79
79
  "html-to-json-parser": "^2.0.1",
80
80
  "inquirer-select-pro": "^1.0.0-alpha.9",
81
- "jsdom": "^27.2.0",
82
- "node-html-parser": "^7.0.1",
81
+ "jsdom": "^27.4.0",
82
+ "node-html-parser": "^7.0.2",
83
83
  "ora": "^9.0.0",
84
84
  "resolve-bin": "^1.0.1",
85
85
  "rimraf": "^6.1.2",