@caweb/cli 1.5.3 → 1.5.5

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.
@@ -21,6 +21,8 @@ import {
21
21
  } from '../../lib/index.js';
22
22
 
23
23
  import {
24
+ bullet,
25
+ info,
24
26
  promptGetInstanceInfo,
25
27
  promptSaveInstanceInfo,
26
28
  promptForSync,
@@ -135,7 +137,7 @@ export default async function sync({
135
137
  const {workDirectoryPath} = await loadConfig(path.resolve('.'));
136
138
 
137
139
  // read caweb configuration file.
138
- let serviceConfig = fs.existsSync(configFile) ? JSON.parse( fs.readFileSync(configFile) ) : {};
140
+ let serviceConfig = fs.existsSync(configFile) ? JSON.parse( fs.readFileSync(configFile) ) : { "sync": {} };
139
141
 
140
142
  process.env.WP_CLI_CONFIG_PATH = path.join(workDirectoryPath, 'config.yml');
141
143
 
@@ -146,20 +148,21 @@ export default async function sync({
146
148
  // if no target was specified or no target saved.
147
149
  if( ! target ){
148
150
  spinner.stop()
151
+ console.log( info, 'A target instance, this is the site containing the latest changes.')
149
152
 
150
- target = await getInstanceInfo(serviceConfig, 'target')
153
+ target = await getInstanceInfo(serviceConfig, 'target')
151
154
 
152
- // if still no target then exit
153
- if( ! target ){
154
- process.exit(1)
155
- }
155
+ // if still no target then exit
156
+ if( ! target ){
157
+ process.exit(1)
158
+ }
156
159
  }
157
160
 
158
161
 
159
162
  // if no dest was specified or no dest saved.
160
163
  if( ! dest ){
161
164
  spinner.stop()
162
-
165
+ console.log( info, 'A destination instance, this is the site where the latest changes should go.')
163
166
  dest = await getInstanceInfo(serviceConfig, 'destination');
164
167
 
165
168
 
@@ -9,8 +9,8 @@ import chalk from 'chalk';
9
9
  // .catch(() => {process.exit(1);})
10
10
  import { confirm, input, password } from '@inquirer/prompts';
11
11
 
12
-
13
- const boldWhite = chalk.bold.white;
12
+ const bullet = chalk.yellow('-');
13
+ const info = chalk.cyan('i');
14
14
 
15
15
  /**
16
16
  * Prompt for instance information
@@ -49,8 +49,6 @@ async function promptSaveInstanceInfo(){
49
49
  }
50
50
 
51
51
  async function promptForSync(tax){
52
- let bullet = chalk.yellow('-');
53
- let info = chalk.cyan('i');
54
52
  console.log(`Sync WordPress Instances\n${chalk.green('#'.repeat(25))}\n`);
55
53
 
56
54
  console.log(chalk.red('Requirements:'));
@@ -100,6 +98,8 @@ async function promptForId(title){
100
98
  }
101
99
 
102
100
  export {
101
+ bullet,
102
+ info,
103
103
  promptGetInstanceInfo,
104
104
  promptSaveInstanceInfo,
105
105
  promptForSync,
package/lib/cli.js CHANGED
@@ -306,8 +306,8 @@ export default function cli() {
306
306
  // Update a Design System Block Command.
307
307
  program.command('sync')
308
308
  .description('Sync changes from one WordPress instance to another.')
309
- .argument('[target]', 'Target Site URL.')
310
- .argument('[dest]', 'Destination Site URL.')
309
+ .argument('[target]', 'Target Site URL, this is the site containing the latest changes.')
310
+ .argument('[dest]', 'Destination Site URL, this is the site where the latest changes should go.')
311
311
  .addOption(new Option(
312
312
  '--interactive',
313
313
  'Runs the sync process with prompts'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caweb/cli",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "description": "CAWebPublishing Command Line Interface.",
5
5
  "exports": "./lib/env.js",
6
6
  "type": "module",
@@ -38,7 +38,7 @@
38
38
  "access": "public"
39
39
  },
40
40
  "config": {
41
- "WP_VER": "6.5.5",
41
+ "WP_VER": "6.6",
42
42
  "PHP_VER": "8.1",
43
43
  "DEFAULTS": {
44
44
  "FS_METHOD": "direct",
@@ -56,12 +56,12 @@
56
56
  }
57
57
  },
58
58
  "dependencies": {
59
- "@caweb/webpack": "^1.0.3",
60
- "@inquirer/prompts": "^5.2.0",
59
+ "@caweb/webpack": "^1.0.4",
60
+ "@inquirer/prompts": "^5.3.2",
61
61
  "@wordpress/create-block": "^4.46.0",
62
62
  "@wordpress/env": "^10.3.0",
63
63
  "axios": "^1.7.2",
64
- "axios-retry": "^4.4.1",
64
+ "axios-retry": "^4.4.2",
65
65
  "chalk": "^5.3.0",
66
66
  "commander": "^12.1.0",
67
67
  "cross-spawn": "^7.0.3",