@automattic/vip 2.39.2 → 2.39.4

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.
@@ -89,8 +89,8 @@ services:
89
89
  image: mariadb:<%= mariadb %>
90
90
  command: docker-entrypoint.sh mysqld --sql-mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION --max_allowed_packet=67M
91
91
  <% } else { %>
92
- image: mysql:8
93
- command: docker-entrypoint.sh mysqld --sql-mode=ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION --max_allowed_packet=67M --default-authentication-plugin=mysql_native_password
92
+ image: mysql:8.4
93
+ command: docker-entrypoint.sh mysqld --sql-mode=ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION --max_allowed_packet=67M --mysql-native-password=ON
94
94
  <% } %>
95
95
  ports:
96
96
  - ":3306"
@@ -6,8 +6,8 @@ var _command = _interopRequireDefault(require("../lib/cli/command"));
6
6
  var _tracker = require("../lib/tracker");
7
7
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
8
  const examples = [{
9
- usage: 'vip backup db @mysite.develop',
10
- description: 'Trigger a new backup for your database of the @mysite.develop environment'
9
+ usage: 'vip @example-app.develop backup db\n' + ' Generating a new database backup...\n' + ' ✓ Preparing for backup generation\n' + ' ✓ Generating backup\n' + ' New database backup created',
10
+ description: 'Generate a new database backup of an environment.'
11
11
  }];
12
12
  const appQuery = `
13
13
  id,
@@ -6,6 +6,6 @@ var _tracker = require("../lib/tracker");
6
6
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7
7
  void (0, _command.default)({
8
8
  usage: 'vip backup'
9
- }).command('db', 'Trigger a new backup for your database').example('vip backup db @mysite.develop', 'Trigger a new backup for your database of the @mysite.develop environment').argv(process.argv, async () => {
9
+ }).command('db', 'Generate a new database backup of an environment.').example('vip @example-app.develop backup db\n' + ' Generating a new database backup...\n' + ' ✓ Preparing for backup generation\n' + ' ✓ Generating backup\n' + ' New database backup created', 'Generate a new database backup of an environment.').argv(process.argv, async () => {
10
10
  await (0, _tracker.trackEvent)('vip_backup_command_execute');
11
11
  });
@@ -10,12 +10,13 @@ var _input = require("../lib/envvar/input");
10
10
  var _logging = require("../lib/envvar/logging");
11
11
  var _tracker = require("../lib/tracker");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- const baseUsage = 'vip @mysite.develop config envvar delete';
13
+ const baseUsage = 'vip config envvar delete';
14
+ const exampleUsage = 'vip @example-app.develop config envvar delete';
14
15
 
15
16
  // Command examples
16
17
  const examples = [{
17
- usage: `${baseUsage} MY_VARIABLE`,
18
- description: 'Permanently deletes the environment variable "MY_VARIABLE"'
18
+ usage: `${exampleUsage} MY_VARIABLE`,
19
+ description: 'Delete the environment variable "MY_VARIABLE" from the environment.'
19
20
  }];
20
21
 
21
22
  /**
@@ -10,12 +10,22 @@ var _api = require("../lib/envvar/api");
10
10
  var _logging = require("../lib/envvar/logging");
11
11
  var _tracker = require("../lib/tracker");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- const usage = 'vip @mysite.develop config envvar get-all';
13
+ const exampleUsage = 'vip @example-app.develop config envvar get-all';
14
+ const usage = 'vip config envvar get-all';
14
15
 
15
16
  // Command examples
16
17
  const examples = [{
17
- usage,
18
- description: 'Get the values of all environment variables'
18
+ usage: exampleUsage,
19
+ description: 'Retrieve a list of all environment variables in the default table format.'
20
+ }, {
21
+ usage: `${exampleUsage} --format=csv`,
22
+ description: 'Retrieve a list of all environment variables in CSV format.'
23
+ }, {
24
+ usage: `${exampleUsage} --format=ids`,
25
+ description: 'Retrieve a list of all environment variable names as a space separated list.'
26
+ }, {
27
+ usage: `${exampleUsage} --format=keyValue`,
28
+ description: 'Retrieve a list of all environment variables as a key value list.'
19
29
  }];
20
30
 
21
31
  /**
@@ -9,12 +9,13 @@ var _api = require("../lib/envvar/api");
9
9
  var _logging = require("../lib/envvar/logging");
10
10
  var _tracker = require("../lib/tracker");
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- const baseUsage = 'vip @mysite.develop config envvar get';
12
+ const baseUsage = 'vip config envvar get';
13
+ const exampleUsage = 'vip @example-app.develop config envvar get';
13
14
 
14
15
  // Command examples
15
16
  const examples = [{
16
- usage: `${baseUsage} MY_VARIABLE`,
17
- description: 'Get the value of the environment variable "MY_VARIABLE"'
17
+ usage: `${exampleUsage} MY_VARIABLE`,
18
+ description: 'Retrieve the value of the environment variable "MY_VARIABLE".'
18
19
  }];
19
20
 
20
21
  /**
@@ -10,12 +10,13 @@ var _api = require("../lib/envvar/api");
10
10
  var _logging = require("../lib/envvar/logging");
11
11
  var _tracker = require("../lib/tracker");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- const usage = 'vip @mysite.develop config envvar list';
13
+ const usage = 'vip config envvar list';
14
+ const exampleUsage = 'vip @example-app.develop config envvar list';
14
15
 
15
16
  // Command examples
16
17
  const examples = [{
17
- usage,
18
- description: 'Lists all environment variables (names only)'
18
+ usage: exampleUsage,
19
+ description: 'List the names of all environment variables on an environment.'
19
20
  }];
20
21
 
21
22
  /**
@@ -11,13 +11,17 @@ var _logging = require("../lib/envvar/logging");
11
11
  var _readFile = require("../lib/envvar/read-file");
12
12
  var _tracker = require("../lib/tracker");
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- const baseUsage = 'vip @mysite.develop config envvar set';
14
+ const baseUsage = 'vip config envvar set';
15
+ const exampleUsage = 'vip @example-app.develop config envvar set';
15
16
  const NEW_RELIC_ENVVAR_KEY = 'NEW_RELIC_LICENSE_KEY';
16
17
 
17
18
  // Command examples
18
19
  const examples = [{
19
- usage: `${baseUsage} MY_VARIABLE`,
20
- description: 'Sets the environment variable "MY_VARIABLE" and prompts for its value'
20
+ usage: `${exampleUsage} MY_VARIABLE`,
21
+ description: 'Add or update the environment variable "MY_VARIABLE" and assign its value at the prompt.'
22
+ }, {
23
+ usage: `${exampleUsage} MULTILINE_ENV_VAR --from-file=envvar-value.txt`,
24
+ description: 'Add or update the environment variable "MULTILINE_ENV_VAR" and assign the multiline contents of local file envvar-value.txt as its value.'
21
25
  }];
22
26
  async function setEnvVarCommand(arg, opt) {
23
27
  // Help the user by uppercasing input.
@@ -39,7 +43,7 @@ async function setEnvVarCommand(arg, opt) {
39
43
  }
40
44
  if (NEW_RELIC_ENVVAR_KEY === name) {
41
45
  await (0, _tracker.trackEvent)('envvar_set_newrelic_key', trackingParams);
42
- console.log(_chalk.default.bold.red('Setting the New Relic key is not permitted.'), 'If you want to set your own New Relic key, please contact our support team through the usual channels.');
46
+ console.log(_chalk.default.bold.red('Setting the New Relic key is not permitted.'), 'If you want to set your own New Relic key, please contact WordPress VIP support.');
43
47
  process.exit(1);
44
48
  }
45
49
  let value;
@@ -3,6 +3,27 @@
3
3
 
4
4
  var _command = _interopRequireDefault(require("../lib/cli/command"));
5
5
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
+ const usage = 'vip config envvar';
7
+ const exampleUsage = 'vip @example-app.develop config envvar';
8
+
9
+ // Command examples
10
+ const examples = [{
11
+ usage: `${exampleUsage} delete MY_VARIABLE`,
12
+ description: 'Delete the environment variable "MY_VARIABLE" from the environment.'
13
+ }, {
14
+ usage: `${exampleUsage} get MY_VARIABLE`,
15
+ description: 'Retrieve the value of the environment variable "MY_VARIABLE".'
16
+ }, {
17
+ usage: `${exampleUsage} get-all`,
18
+ description: 'Retrieve a list of all environment variables in the default table format.'
19
+ }, {
20
+ usage: `${exampleUsage} list`,
21
+ description: 'List the names of all environment variables.'
22
+ }, {
23
+ usage: `${exampleUsage} set MY_VARIABLE`,
24
+ description: 'Add or update the environment variable "MY_VARIABLE" and assign its value at the prompt.'
25
+ }];
6
26
  (0, _command.default)({
7
- requiredArgs: 0
8
- }).command('delete', 'Permanently delete an environment variable').command('get', 'Get the value of an environment variable').command('get-all', 'Get the values of all environment variable').command('list', 'List the names of all environment variables').command('set', 'Add or update an environment variable').argv(process.argv);
27
+ requiredArgs: 0,
28
+ usage
29
+ }).command('delete', 'Delete an environment variable.').command('get', 'Retrieve the value of an environment variable.').command('get-all', 'Retrieve the names and values of all environment variables.').command('list', 'List the names of all environment variables.').command('set', 'Add or update an environment variable.').examples(examples).argv(process.argv);
@@ -7,13 +7,26 @@ var _software = require("../lib/config/software");
7
7
  var _tracker = require("../lib/tracker");
8
8
  var _userError = _interopRequireDefault(require("../lib/user-error"));
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ const usage = 'vip config software get <wordpress|php|nodejs|muplugins>';
11
+ const exampleUsage = 'vip @example-app.develop config software get';
12
+ const exampleUsageNode = 'vip @example-node-app.develop config software get';
13
+
10
14
  // Command examples
11
15
  const examples = [{
12
- usage: 'vip @mysite.develop config software get wordpress --include available_versions --format json',
13
- description: 'Read current software settings for WordPress in JSON format including available versions'
16
+ usage: exampleUsage,
17
+ description: 'Retrieve a list of the current versions of all environment software in the default table format.'
18
+ }, {
19
+ usage: `${exampleUsage} --format=csv`,
20
+ description: 'Retrieve a list of the current versions of all environment software in CSV format.'
21
+ }, {
22
+ usage: `${exampleUsage} wordpress --include=available_versions`,
23
+ description: 'Retrieve the current version of WordPress for a WordPress environment and a list of available versions in the default table format.'
24
+ }, {
25
+ usage: `${exampleUsage} php --include=available_versions`,
26
+ description: 'Retrieve the current version of PHP for a WordPress environment and a list of available versions in the default table format.'
14
27
  }, {
15
- usage: 'vip @mysite.develop config software get',
16
- description: 'Read current software settings for all components'
28
+ usage: `${exampleUsageNode} nodejs --include=available_versions --format=json`,
29
+ description: 'Retrieve the current version of Node.js for a Node.js environment and a list of available versions in JSON format.'
17
30
  }];
18
31
  const VALID_INCLUDES = ['available_versions'];
19
32
  (0, _command.default)({
@@ -23,8 +36,8 @@ const VALID_INCLUDES = ['available_versions'];
23
36
  envContext: true,
24
37
  wildcardCommand: true,
25
38
  format: true,
26
- usage: 'vip @mysite.develop config software get <wordpress|php|nodejs|muplugins>'
27
- }).option('include', `Extra information to be included. Valid values: ${VALID_INCLUDES.join(',')}`).examples(examples).argv(process.argv, async (arg, opt) => {
39
+ usage
40
+ }).option('include', `Retrieve additional data of a specific type. Supported values: ${VALID_INCLUDES.join(',')}`).examples(examples).argv(process.argv, async (arg, opt) => {
28
41
  const trackingInfo = {
29
42
  environment_id: opt.env?.id,
30
43
  args: JSON.stringify(arg)
@@ -17,20 +17,30 @@ const UPDATE_SOFTWARE_PROGRESS_STEPS = [{
17
17
  id: 'process',
18
18
  name: 'Process software update'
19
19
  }];
20
+ const usage = 'vip config software update <wordpress|php|nodejs|muplugins> <version>';
21
+ const exampleUsage = 'vip @example-app.develop config software update';
22
+ const exampleUsageNode = 'vip @example-node-app.develop config software update';
23
+ const examples = [{
24
+ usage: `${exampleUsage} wordpress 6.4`,
25
+ description: 'Update the version of WordPress on a WordPress environment to 6.4.x.'
26
+ }, {
27
+ usage: `${exampleUsage} wordpress managed_latest`,
28
+ description: 'Update a WordPress environment to the latest major version of WordPress, and automatically update WordPress to the next major version on a continual basis.'
29
+ }, {
30
+ usage: `${exampleUsage} php 8.3`,
31
+ description: 'Update the version of PHP on a WordPress environment to 8.3.x.'
32
+ }, {
33
+ usage: `${exampleUsageNode} nodejs 18`,
34
+ description: 'Update the version of Node.js on a Node.js environment to 18.x.'
35
+ }];
20
36
  const cmd = (0, _command.default)({
21
37
  appContext: true,
22
38
  appQuery: _software.appQuery,
23
39
  appQueryFragments: _software.appQueryFragments,
24
40
  envContext: true,
25
41
  wildcardCommand: true,
26
- usage: 'vip @mysite.develop config software update <wordpress|php|nodejs|muplugins> <version>'
27
- }).examples([{
28
- usage: 'vip @mysite.develop config software update wordpress 6.0',
29
- description: 'Update WordPress to 6.0.x'
30
- }, {
31
- usage: 'vip @mysite.develop config software update nodejs 16',
32
- description: 'Update Node.js to v16'
33
- }]);
42
+ usage
43
+ }).examples(examples);
34
44
  cmd.option('yes', 'Auto-confirm update');
35
45
  cmd.argv(process.argv, async (arg, opt) => {
36
46
  const {
@@ -3,7 +3,25 @@
3
3
 
4
4
  var _command = _interopRequireDefault(require("../lib/cli/command"));
5
5
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
+ const usage = 'vip config software';
7
+ const exampleUsage = 'vip @example-app.develop config software';
8
+ const exampleUsageNode = 'vip @example-node-app.develop config software';
9
+
10
+ // Command examples
11
+ const examples = [{
12
+ usage: `${exampleUsage} get`,
13
+ description: 'Retrieve a list of the current versions of all environment software in the default table format.'
14
+ }, {
15
+ usage: `${exampleUsage} get wordpress --include=available_versions`,
16
+ description: 'Retrieve the current version of WordPress for a WordPress environment and a list of available versions in the default table format.'
17
+ }, {
18
+ usage: `${exampleUsage} update wordpress 6.4`,
19
+ description: 'Update the version of WordPress on a WordPress environment to 6.4.x.'
20
+ }, {
21
+ usage: `${exampleUsageNode} update nodejs 18`,
22
+ description: 'Update the version of Node.js on a Node.js environment to 18.x.'
23
+ }];
6
24
  (0, _command.default)({
7
25
  requiredArgs: 1,
8
- usage: 'vip @mysite.develop config software <action>'
9
- }).command('get', 'Read current software settings').command('update', 'Update software settings').argv(process.argv);
26
+ usage
27
+ }).command('get', 'Retrieve the current versions of environment software.').command('update', 'Update the version of software running on an environment.').examples(examples).argv(process.argv);
@@ -3,8 +3,20 @@
3
3
 
4
4
  var _command = _interopRequireDefault(require("../lib/cli/command"));
5
5
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
+ const usage = 'vip config';
7
+ const exampleUsage = 'vip @example-app.develop config';
8
+
9
+ // Command examples
10
+ const examples = [{
11
+ usage: `${exampleUsage} envvar list`,
12
+ description: 'List the names of all environment variables on the environment.'
13
+ }, {
14
+ usage: `${exampleUsage} software get`,
15
+ description: 'Retrieve the current versions of all environment software.'
16
+ }];
6
17
  (0, _command.default)({
7
- requiredArgs: 2
8
- }).command('envvar', 'Manage environment variables for an application environment').command('software', 'Software management').argv(process.argv, async () => {
18
+ requiredArgs: 2,
19
+ usage
20
+ }).command('envvar', 'Manage environment variables for an environment.').command('software', 'Manage versions of software for an environment.').examples(examples).argv(process.argv, async () => {
9
21
  process.exit(0);
10
22
  });
@@ -14,8 +14,8 @@ var _command = _interopRequireDefault(require("../lib/cli/command"));
14
14
  var _tracker = require("../lib/tracker");
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  const examples = [{
17
- usage: 'vip db phpmyadmin @mysite.develop',
18
- description: 'Open PhpMyAdmin console for the database of the @mysite.develop environment'
17
+ usage: 'vip @example-app.develop db phpmyadmin',
18
+ description: "Generate access to a read-only phpMyAdmin web interface for the environment's database."
19
19
  }];
20
20
  const appQuery = `
21
21
  id,
@@ -14,6 +14,6 @@ var _tracker = require("../lib/tracker");
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  void (0, _command.default)({
16
16
  usage: 'vip db'
17
- }).command('phpmyadmin', 'Open PhpMyAdmin console for your application database').example('vip db phpmyadmin @mysite.develop', 'Open PhpMyAdmin console for your database of the @mysite.develop environment').argv(process.argv, async () => {
17
+ }).command('phpmyadmin', 'Generate access to a read-only phpMyAdmin web interface for an environment database.').example('vip @example-app.develop db phpmyadmin', "Generate access to a read-only phpMyAdmin web interface for the environment's database.").argv(process.argv, async () => {
18
18
  await (0, _tracker.trackEvent)('vip_db_command_execute');
19
19
  });
@@ -8,7 +8,7 @@ void (0, _command.default)({
8
8
  usage: 'vip logout'
9
9
  }).examples([{
10
10
  usage: 'vip logout',
11
- description: 'Logs out current user.'
11
+ description: 'Log out the current authenticated VIP-CLI user.'
12
12
  }]).argv(process.argv, async () => {
13
13
  await (0, _logout.default)();
14
14
  console.log('You are successfully logged out.');
@@ -19,7 +19,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
19
19
  const LIMIT_MIN = 1;
20
20
  const LIMIT_MAX = 5000;
21
21
  const ALLOWED_TYPES = ['app', 'batch'];
22
- const ALLOWED_FORMATS = ['csv', 'json', 'text'];
22
+ const ALLOWED_FORMATS = ['csv', 'json', 'table'];
23
23
  const DEFAULT_POLLING_DELAY_IN_SECONDS = 30;
24
24
  const MIN_POLLING_DELAY_IN_SECONDS = 5;
25
25
  const MAX_POLLING_DELAY_IN_SECONDS = 300;
@@ -138,7 +138,7 @@ function printLogs(logs, format) {
138
138
  };
139
139
  });
140
140
  let output = '';
141
- if (format && 'text' === format) {
141
+ if (format && 'table' === format) {
142
142
  const rows = [];
143
143
  for (const {
144
144
  timestamp,
@@ -188,7 +188,7 @@ const appQuery = exports.appQuery = `
188
188
  appQuery,
189
189
  envContext: true,
190
190
  module: 'logs'
191
- }).option('type', 'The type of logs to be returned: "app" or "batch"', 'app').option('limit', 'The maximum number of log lines', 500).option('follow', 'Keep fetching new logs as they are generated').option('format', 'Output the log lines in CSV or JSON format', 'text').examples([{
191
+ }).option('type', 'The type of logs to be returned: "app" or "batch"', 'app').option('limit', 'The maximum number of log lines', 500).option('follow', 'Keep fetching new logs as they are generated').option('format', 'Output the log lines in CSV or JSON format', 'table').examples([{
192
192
  usage: 'vip @mysite.production logs',
193
193
  description: 'Get the most recent app logs'
194
194
  }, {
@@ -18,7 +18,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
  const LIMIT_MIN = 1;
20
20
  const LIMIT_MAX = 500;
21
- const ALLOWED_FORMATS = ['csv', 'json', 'text'];
21
+ const ALLOWED_FORMATS = ['csv', 'json', 'table'];
22
22
  const DEFAULT_POLLING_DELAY_IN_SECONDS = 30;
23
23
  const MIN_POLLING_DELAY_IN_SECONDS = 5;
24
24
  const MAX_POLLING_DELAY_IN_SECONDS = 300;
@@ -166,9 +166,9 @@ void (0, _command.default)({
166
166
  appContext: true,
167
167
  appQuery,
168
168
  envContext: true,
169
- format: true,
169
+ format: false,
170
170
  module: 'slowlogs'
171
- }).option('limit', 'The maximum number of log lines', 500).option('format', 'Output the log lines in CSV or JSON format', 'text').examples([{
171
+ }).option('limit', 'The maximum number of log lines', 500).option('format', 'Output the log lines in CSV or JSON format', 'table').examples([{
172
172
  description: 'Get the most recent app slowlogs',
173
173
  usage: 'vip @mysite.production slowlogs'
174
174
  }, {
@@ -10,6 +10,7 @@ var _tracker = require("../lib/tracker");
10
10
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
11
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ const baseUsage = 'vip whoami';
13
14
  async function whoamiCommand() {
14
15
  const trackingParams = {
15
16
  command: 'vip whoami'
@@ -34,8 +35,8 @@ async function whoamiCommand() {
34
35
  console.log(output.join('\n'));
35
36
  }
36
37
  void (0, _command.default)({
37
- usage: 'vip whoami'
38
+ usage: baseUsage
38
39
  }).examples([{
39
- usage: 'vip whoami',
40
- description: 'Display details about the currently logged-in user.'
40
+ usage: baseUsage + '\n' + ' - Howdy user@example.com!\n' + ' - Your user ID is 1234\n',
41
+ description: 'Retrieve details about the current authenticated VIP-CLI user.'
41
42
  }]).argv(process.argv, whoamiCommand);
package/dist/bin/vip.js CHANGED
@@ -22,7 +22,7 @@ const tokenURL = 'https://dashboard.wpvip.com/me/cli/token';
22
22
  const customDeployToken = process.env.WPVIP_DEPLOY_TOKEN;
23
23
  const runCmd = async function () {
24
24
  const cmd = (0, _command.default)();
25
- cmd.command('logout', 'Logout from your current session').command('app', 'List and modify your VIP applications').command('backup', 'Generate a backup for VIP applications').command('cache', 'Manage page cache for your VIP applications').command('config', 'Set configuration for your VIP applications').command('dev-env', 'Use local dev-environment').command('export', 'Export a copy of data associated with an environment.').command('import', 'Import media or SQL files into your VIP applications').command('logs', 'Get logs from your VIP applications').command('search-replace', 'Perform search and replace tasks on files').command('slowlogs', 'Get slowlogs from your VIP applications').command('db', 'Run operations on your VIP application database').command('sync', 'Sync production to a development environment').command('whoami', 'Display details about the currently logged-in user').command('validate', 'Validate your VIP application and environment').command('wp', 'Run WP CLI commands against an environment');
25
+ cmd.command('logout', 'Log out the current authenticated VIP-CLI user.').command('app', 'List and modify your VIP applications').command('backup', 'Generate a backup of an environment.').command('cache', 'Manage page cache for your VIP applications').command('config', 'Manage environment configurations.').command('dev-env', 'Use local dev-environment').command('export', 'Export a copy of data associated with an environment.').command('import', 'Import media or SQL files into your VIP applications').command('logs', 'Get logs from your VIP applications').command('search-replace', 'Perform search and replace tasks on files').command('slowlogs', 'Get slowlogs from your VIP applications').command('db', "Access an environment's database.").command('sync', 'Sync production to a development environment').command('whoami', 'Retrieve details about the current authenticated VIP-CLI user.').command('validate', 'Validate your VIP application and environment').command('wp', 'Run WP CLI commands against an environment');
26
26
  cmd.argv(process.argv);
27
27
  };
28
28
 
@@ -54,7 +54,12 @@ function ids(data) {
54
54
  function csv(data) {
55
55
  const fields = Object.keys(data[0]);
56
56
  const parser = new _plainjs.Parser({
57
- fields: formatFields(fields)
57
+ formatters: {
58
+ header: value => {
59
+ return `"${value.split(/(?=[A-Z])/).join(' ').toLowerCase()}"`;
60
+ }
61
+ },
62
+ fields
58
63
  });
59
64
  return parser.parse(data);
60
65
  }
@@ -32,4 +32,4 @@ const DEV_ENVIRONMENT_PHP_VERSIONS = exports.DEV_ENVIRONMENT_PHP_VERSIONS = {
32
32
  label: '8.3'
33
33
  }
34
34
  };
35
- const DEV_ENVIRONMENT_VERSION = exports.DEV_ENVIRONMENT_VERSION = '2.0.2';
35
+ const DEV_ENVIRONMENT_VERSION = exports.DEV_ENVIRONMENT_VERSION = '2.0.3';
package/docs/CHANGELOG.md CHANGED
@@ -1,11 +1,22 @@
1
1
  ## Changelog
2
2
 
3
+ ### 2.39.3
4
+
5
+ * Update/docs pt vip config
6
+ * Updates to descriptions and examples for vip db
7
+ * Updates to descriptions and examples for vip backup
8
+ * Fix duplicate format option on slowlogs command
9
+ * Fix issue with missing CSV output values
10
+ * chore(deps): update `tar` to fix CVE-2024-28863
11
+
12
+ **Full Changelog**: https://github.com/Automattic/vip-cli/compare/2.39.2...2.39.3
13
+
3
14
  ### 2.39.2
4
15
 
5
16
  * build(deps-dev): bump typescript from 5.4.4 to 5.4.5
6
17
  * build(deps): bump ejs from 3.1.9 to 3.1.10
7
18
  * fix: remove unused `cancelCommand`
8
- * fix(dev-env): argument parsing for `vip dev-env sync sql`9
19
+ * fix(dev-env): argument parsing for `vip dev-env sync sql`
9
20
  * fix: underscore is allowed in environment name
10
21
  * chore: remove unused files
11
22
  * fix: superfluous trailing arguments
@@ -86,7 +86,7 @@ const parseOutput = output => {
86
86
  }
87
87
  if ( currentSection === SECTION_EXAMPLES ) {
88
88
  let description = '';
89
- while ( ! lines[ lineIx ].trim().startsWith( '$' ) ) {
89
+ while ( lines[ lineIx ] && ! lines[ lineIx ].trim().startsWith( '$' ) ) {
90
90
  const descriptionLine = lines[ lineIx ].trim();
91
91
  if ( description ) {
92
92
  description += '\n';
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@automattic/vip",
3
- "version": "2.39.2",
3
+ "version": "2.39.4",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@automattic/vip",
9
- "version": "2.39.2",
9
+ "version": "2.39.4",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
@@ -12338,9 +12338,9 @@
12338
12338
  }
12339
12339
  },
12340
12340
  "node_modules/tar": {
12341
- "version": "6.2.0",
12342
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz",
12343
- "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==",
12341
+ "version": "6.2.1",
12342
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",
12343
+ "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",
12344
12344
  "dependencies": {
12345
12345
  "chownr": "^2.0.0",
12346
12346
  "fs-minipass": "^2.0.0",
@@ -22433,9 +22433,9 @@
22433
22433
  "dev": true
22434
22434
  },
22435
22435
  "tar": {
22436
- "version": "6.2.0",
22437
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz",
22438
- "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==",
22436
+ "version": "6.2.1",
22437
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",
22438
+ "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",
22439
22439
  "requires": {
22440
22440
  "chownr": "^2.0.0",
22441
22441
  "fs-minipass": "^2.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/vip",
3
- "version": "2.39.2",
3
+ "version": "2.39.4",
4
4
  "description": "The VIP Javascript library & CLI",
5
5
  "main": "index.js",
6
6
  "bin": {