@automattic/vip 2.40.0-dev.4 → 3.1.0

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.
Files changed (115) hide show
  1. package/dist/bin/vip-app-deploy.js +1 -1
  2. package/dist/bin/vip-app-list.js +1 -1
  3. package/dist/bin/vip-app.js +1 -1
  4. package/dist/bin/vip-backup-db.js +1 -1
  5. package/dist/bin/vip-backup.js +1 -1
  6. package/dist/bin/vip-cache-purge-url.js +1 -1
  7. package/dist/bin/vip-cache.js +1 -1
  8. package/dist/bin/vip-config-envvar-delete.js +1 -1
  9. package/dist/bin/vip-config-envvar-get-all.js +1 -1
  10. package/dist/bin/vip-config-envvar-get.js +1 -1
  11. package/dist/bin/vip-config-envvar-list.js +1 -1
  12. package/dist/bin/vip-config-envvar-set.js +1 -1
  13. package/dist/bin/vip-config-envvar.js +1 -1
  14. package/dist/bin/vip-config-software-get.js +1 -1
  15. package/dist/bin/vip-config-software-update.js +1 -1
  16. package/dist/bin/vip-config-software.js +1 -1
  17. package/dist/bin/vip-config.js +1 -1
  18. package/dist/bin/vip-db-phpmyadmin.js +1 -1
  19. package/dist/bin/vip-db.js +1 -1
  20. package/dist/bin/vip-dev-env-create.js +17 -18
  21. package/dist/bin/vip-dev-env-destroy.js +10 -7
  22. package/dist/bin/vip-dev-env-exec.js +14 -12
  23. package/dist/bin/vip-dev-env-import-media.js +8 -9
  24. package/dist/bin/vip-dev-env-import-sql.js +17 -12
  25. package/dist/bin/vip-dev-env-import.js +10 -8
  26. package/dist/bin/vip-dev-env-info.js +13 -7
  27. package/dist/bin/vip-dev-env-list.js +8 -5
  28. package/dist/bin/vip-dev-env-logs.js +12 -9
  29. package/dist/bin/vip-dev-env-purge.js +15 -9
  30. package/dist/bin/vip-dev-env-shell.js +15 -13
  31. package/dist/bin/vip-dev-env-start.js +19 -10
  32. package/dist/bin/vip-dev-env-stop.js +8 -5
  33. package/dist/bin/vip-dev-env-sync-sql.js +7 -6
  34. package/dist/bin/vip-dev-env-sync.js +9 -3
  35. package/dist/bin/vip-dev-env-update.js +14 -4
  36. package/dist/bin/vip-dev-env.js +2 -2
  37. package/dist/bin/vip-export-sql.js +1 -1
  38. package/dist/bin/vip-export.js +1 -1
  39. package/dist/bin/vip-import-media-abort.js +1 -1
  40. package/dist/bin/vip-import-media-status.js +1 -1
  41. package/dist/bin/vip-import-media.js +4 -2
  42. package/dist/bin/vip-import-sql-status.js +1 -1
  43. package/dist/bin/vip-import-sql.js +1 -1
  44. package/dist/bin/vip-import-validate-files.js +1 -1
  45. package/dist/bin/vip-import-validate-sql.js +1 -1
  46. package/dist/bin/vip-import.js +1 -1
  47. package/dist/bin/vip-logout.js +1 -1
  48. package/dist/bin/vip-logs.js +1 -1
  49. package/dist/bin/vip-search-replace.js +1 -1
  50. package/dist/bin/vip-slowlogs.js +1 -1
  51. package/dist/bin/vip-sync.js +1 -1
  52. package/dist/bin/vip-validate-preflight.js +1 -1
  53. package/dist/bin/vip-validate.js +1 -1
  54. package/dist/bin/vip-whoami.js +1 -1
  55. package/dist/bin/vip-wp.js +1 -1
  56. package/dist/bin/vip.js +2 -2
  57. package/dist/commands/backup-db.js +1 -1
  58. package/dist/commands/dev-env-import-sql.js +1 -1
  59. package/dist/commands/dev-env-sync-sql.js +1 -1
  60. package/dist/commands/export-sql.js +1 -1
  61. package/dist/commands/phpmyadmin.js +1 -1
  62. package/dist/lib/analytics/clients/pendo.js +1 -1
  63. package/dist/lib/analytics/clients/tracks.js +1 -1
  64. package/dist/lib/analytics/index.js +1 -1
  65. package/dist/lib/api/app.js +1 -1
  66. package/dist/lib/api/cache-purge.js +1 -1
  67. package/dist/lib/api/feature-flags.js +1 -1
  68. package/dist/lib/api/http.js +1 -1
  69. package/dist/lib/api/user.js +1 -1
  70. package/dist/lib/api.js +1 -1
  71. package/dist/lib/app-logs/app-logs.js +1 -1
  72. package/dist/lib/app-slowlogs/app-slowlogs.js +1 -1
  73. package/dist/lib/backup-storage-availability/backup-storage-availability.js +1 -1
  74. package/dist/lib/cli/apiConfig.js +1 -1
  75. package/dist/lib/cli/command.js +1 -1
  76. package/dist/lib/cli/config.js +1 -1
  77. package/dist/lib/cli/exit.js +1 -1
  78. package/dist/lib/cli/format.js +1 -1
  79. package/dist/lib/client-file-uploader.js +1 -1
  80. package/dist/lib/config/software.js +1 -1
  81. package/dist/lib/custom-deploy/custom-deploy.js +1 -1
  82. package/dist/lib/dev-environment/dev-environment-cli.js +3 -2
  83. package/dist/lib/dev-environment/dev-environment-configuration-file.js +1 -1
  84. package/dist/lib/dev-environment/dev-environment-core.js +6 -1
  85. package/dist/lib/dev-environment/dev-environment-lando.js +17 -24
  86. package/dist/lib/env.js +1 -1
  87. package/dist/lib/envvar/api-delete.js +1 -1
  88. package/dist/lib/envvar/api-get-all.js +1 -1
  89. package/dist/lib/envvar/api-get.js +1 -1
  90. package/dist/lib/envvar/api-list.js +1 -1
  91. package/dist/lib/envvar/api-set.js +1 -1
  92. package/dist/lib/envvar/api.js +1 -1
  93. package/dist/lib/envvar/input.js +1 -1
  94. package/dist/lib/envvar/logging.js +1 -1
  95. package/dist/lib/http/proxy-agent.js +1 -1
  96. package/dist/lib/keychain/insecure.js +1 -1
  97. package/dist/lib/keychain/secure.js +1 -1
  98. package/dist/lib/keychain.js +1 -1
  99. package/dist/lib/logout.js +1 -1
  100. package/dist/lib/media-import/status.js +74 -14
  101. package/dist/lib/search-and-replace.js +1 -1
  102. package/dist/lib/site-import/status.js +1 -1
  103. package/dist/lib/token.js +1 -1
  104. package/dist/lib/tracker.js +1 -1
  105. package/dist/lib/utils.js +1 -1
  106. package/dist/lib/validations/custom-deploy.js +1 -1
  107. package/dist/lib/validations/is-multi-site.js +1 -1
  108. package/dist/lib/validations/is-multisite-domain-mapped.js +1 -1
  109. package/dist/lib/validations/line-by-line.js +1 -1
  110. package/dist/lib/validations/site-type.js +1 -1
  111. package/dist/lib/validations/sql.js +1 -1
  112. package/dist/lib/vip-import-validate-files.js +1 -1
  113. package/docs/CHANGELOG.md +15 -0
  114. package/npm-shrinkwrap.json +1498 -1338
  115. package/package.json +7 -7
@@ -22,7 +22,7 @@ var _customDeploy = require("../lib/custom-deploy/custom-deploy");
22
22
  var _tracker = require("../lib/tracker");
23
23
  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); }
24
24
  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; }
25
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
26
26
  /**
27
27
  * Internal dependencies
28
28
  */
@@ -5,7 +5,7 @@ var _graphqlTag = _interopRequireDefault(require("graphql-tag"));
5
5
  var _api = _interopRequireDefault(require("../lib/api"));
6
6
  var _command = _interopRequireDefault(require("../lib/cli/command"));
7
7
  var _tracker = require("../lib/tracker");
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  (0, _command.default)({
10
10
  format: true
11
11
  }).argv(process.argv, async () => {
@@ -7,7 +7,7 @@ var _command = _interopRequireWildcard(require("../lib/cli/command"));
7
7
  var _tracker = require("../lib/tracker");
8
8
  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); }
9
9
  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; }
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  (0, _command.default)({
12
12
  requiredArgs: 1,
13
13
  format: true
@@ -4,7 +4,7 @@
4
4
  var _backupDb = require("../commands/backup-db");
5
5
  var _command = _interopRequireDefault(require("../lib/cli/command"));
6
6
  var _tracker = require("../lib/tracker");
7
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
8
8
  const examples = [{
9
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
10
  description: 'Generate a new database backup of an environment.'
@@ -3,7 +3,7 @@
3
3
 
4
4
  var _command = _interopRequireDefault(require("../lib/cli/command"));
5
5
  var _tracker = require("../lib/tracker");
6
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
7
7
  void (0, _command.default)({
8
8
  usage: 'vip backup'
9
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,7 +10,7 @@ var _readFile = require("../lib/read-file");
10
10
  var _tracker = require("../lib/tracker");
11
11
  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); }
12
12
  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; }
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
14
  const examples = [{
15
15
  usage: 'vip cache purge-url <URL>',
16
16
  description: 'Purge a URL from page cache'
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var _command = _interopRequireDefault(require("../lib/cli/command"));
5
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
6
6
  (0, _command.default)({
7
7
  requiredArgs: 1
8
8
  }).command('purge-url', 'Purge page cache').argv(process.argv);
@@ -9,7 +9,7 @@ var _api = require("../lib/envvar/api");
9
9
  var _input = require("../lib/envvar/input");
10
10
  var _logging = require("../lib/envvar/logging");
11
11
  var _tracker = require("../lib/tracker");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  const baseUsage = 'vip config envvar delete';
14
14
  const exampleUsage = 'vip @example-app.develop config envvar delete';
15
15
 
@@ -9,7 +9,7 @@ var _format = require("../lib/cli/format");
9
9
  var _api = require("../lib/envvar/api");
10
10
  var _logging = require("../lib/envvar/logging");
11
11
  var _tracker = require("../lib/tracker");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  const exampleUsage = 'vip @example-app.develop config envvar get-all';
14
14
  const usage = 'vip config envvar get-all';
15
15
 
@@ -8,7 +8,7 @@ var _command = _interopRequireDefault(require("../lib/cli/command"));
8
8
  var _api = require("../lib/envvar/api");
9
9
  var _logging = require("../lib/envvar/logging");
10
10
  var _tracker = require("../lib/tracker");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  const baseUsage = 'vip config envvar get';
13
13
  const exampleUsage = 'vip @example-app.develop config envvar get';
14
14
 
@@ -9,7 +9,7 @@ var _format = require("../lib/cli/format");
9
9
  var _api = require("../lib/envvar/api");
10
10
  var _logging = require("../lib/envvar/logging");
11
11
  var _tracker = require("../lib/tracker");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  const usage = 'vip config envvar list';
14
14
  const exampleUsage = 'vip @example-app.develop config envvar list';
15
15
 
@@ -10,7 +10,7 @@ var _input = require("../lib/envvar/input");
10
10
  var _logging = require("../lib/envvar/logging");
11
11
  var _readFile = require("../lib/envvar/read-file");
12
12
  var _tracker = require("../lib/tracker");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
14
  const baseUsage = 'vip config envvar set';
15
15
  const exampleUsage = 'vip @example-app.develop config envvar set';
16
16
  const NEW_RELIC_ENVVAR_KEY = 'NEW_RELIC_LICENSE_KEY';
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var _command = _interopRequireDefault(require("../lib/cli/command"));
5
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
6
6
  const usage = 'vip config envvar';
7
7
  const exampleUsage = 'vip @example-app.develop config envvar';
8
8
 
@@ -6,7 +6,7 @@ var _format = require("../lib/cli/format");
6
6
  var _software = require("../lib/config/software");
7
7
  var _tracker = require("../lib/tracker");
8
8
  var _userError = _interopRequireDefault(require("../lib/user-error"));
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  const usage = 'vip config software get <wordpress|php|nodejs|muplugins>';
11
11
  const exampleUsage = 'vip @example-app.develop config software get';
12
12
  const exampleUsageNode = 'vip @example-node-app.develop config software get';
@@ -8,7 +8,7 @@ var _progress = require("../lib/cli/progress");
8
8
  var _software = require("../lib/config/software");
9
9
  var _tracker = require("../lib/tracker");
10
10
  var _userError = _interopRequireDefault(require("../lib/user-error"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  const debug = (0, _debug.default)('@automattic/vip:bin:config-software');
13
13
  const UPDATE_SOFTWARE_PROGRESS_STEPS = [{
14
14
  id: 'trigger',
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var _command = _interopRequireDefault(require("../lib/cli/command"));
5
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
6
6
  const usage = 'vip config software';
7
7
  const exampleUsage = 'vip @example-app.develop config software';
8
8
  const exampleUsageNode = 'vip @example-node-app.develop config software';
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var _command = _interopRequireDefault(require("../lib/cli/command"));
5
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
6
6
  const usage = 'vip config';
7
7
  const exampleUsage = 'vip @example-app.develop config';
8
8
 
@@ -12,7 +12,7 @@
12
12
  var _phpmyadmin = require("../commands/phpmyadmin");
13
13
  var _command = _interopRequireDefault(require("../lib/cli/command"));
14
14
  var _tracker = require("../lib/tracker");
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
16
  const examples = [{
17
17
  usage: 'vip @example-app.develop db phpmyadmin',
18
18
  description: "Generate access to a read-only phpMyAdmin web interface for the environment's database."
@@ -11,7 +11,7 @@
11
11
 
12
12
  var _command = _interopRequireDefault(require("../lib/cli/command"));
13
13
  var _tracker = require("../lib/tracker");
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
15
  void (0, _command.default)({
16
16
  usage: 'vip db'
17
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 () => {
@@ -5,7 +5,6 @@ var _chalk = _interopRequireDefault(require("chalk"));
5
5
  var _debug = _interopRequireDefault(require("debug"));
6
6
  var _command = _interopRequireDefault(require("../lib/cli/command"));
7
7
  var exit = _interopRequireWildcard(require("../lib/cli/exit"));
8
- var _devEnvironment = require("../lib/constants/dev-environment");
9
8
  var _devEnvironmentCli = require("../lib/dev-environment/dev-environment-cli");
10
9
  var _devEnvironmentConfigurationFile = require("../lib/dev-environment/dev-environment-configuration-file");
11
10
  var _devEnvironmentCore = require("../lib/dev-environment/dev-environment-core");
@@ -13,28 +12,28 @@ var _devEnvironmentLando = require("../lib/dev-environment/dev-environment-lando
13
12
  var _tracker = require("../lib/tracker");
14
13
  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); }
15
14
  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; }
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
16
  const debug = (0, _debug.default)('@automattic/vip:bin:dev-environment');
17
+ const exampleUsage = 'vip dev-env create';
18
+ const usage = 'vip dev-env create';
19
+
20
+ // Command examples
18
21
  const examples = [{
19
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} create`,
20
- description: 'Creates a local dev environment'
21
- }, {
22
- usage: `vip @123.production ${_devEnvironment.DEV_ENVIRONMENT_SUBCOMMAND} create`,
23
- description: 'Creates a local dev environment for production site for id 123'
24
- }, {
25
- usage: `vip ${_devEnvironment.DEV_ENVIRONMENT_SUBCOMMAND} create --slug=my_site`,
26
- description: 'Creates a local dev environment aliased as "my_site"'
22
+ usage: exampleUsage,
23
+ description: 'Create a new VIP Local Development Environment.\n' + ' * The environment will be named "vip-local" by default if a custom name is not assigned with "--slug" .'
27
24
  }, {
28
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} create --slug=test`,
29
- description: 'Assigning unique slugs to environments allows multiple environments to be created.'
25
+ usage: `${exampleUsage} --slug=example-site`,
26
+ description: 'Create a new local environment with the unique name "example-site".\n' + ' * Unique names allow multiple local environments to exist simultaneously.'
30
27
  }, {
31
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} create --multisite --wordpress="5.8" --app-code="~/git/my_code"`,
32
- description: 'Creates a local multisite dev environment using WP 5.8 and application code is expected to be in "~/git/my_code"'
28
+ usage: `${exampleUsage} --slug=example-site --multisite=y --php=8.2 --wordpress=6.4`,
29
+ description: 'Create a new local environment configured as a multisite running PHP 8.2 and WordPress version 6.4.\n' + ' * Options that are set in the `create` command will be skipped in the setup wizard.'
33
30
  }, {
34
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} create --multisite=subdirectory --wordpress="5.8" --app-code="~/git/my_code"`,
35
- description: 'Creates a local multisite dev environment with a subdirectory URL structure using WP 5.8 and application code is expected to be in "~/git/my_code"'
31
+ usage: `vip @example-app.production dev-env create --slug=example-site --app-code=/Users/example/Desktop/example-repo`,
32
+ description: 'Create a new local environment with settings based on the production environment of the "example-app" application and load the locally git-cloned application repository "example-repo".'
36
33
  }];
37
- const cmd = (0, _command.default)().option('slug', 'Custom name of the dev environment', undefined, _devEnvironmentCli.processSlug).option('title', 'Title for the WordPress site').option('multisite', 'Enable multisite install', undefined, _devEnvironmentCli.processStringOrBooleanOption);
34
+ const cmd = (0, _command.default)({
35
+ usage
36
+ }).option('slug', 'A unique name for a local environment. Default is "vip-local".', undefined, _devEnvironmentCli.processSlug).option('title', 'A descriptive value for the WordPress Site Title. Default is "VIP Dev").').option('multisite', 'Create environment as a multisite. Accepts "y" for a subdomain multisite, "subdirectory" (recommended) for a subdirectory multisite, or "false". Default is "y".', undefined, _devEnvironmentCli.processStringOrBooleanOption);
38
37
  (0, _devEnvironmentCli.addDevEnvConfigurationOptions)(cmd);
39
38
  cmd.examples(examples);
40
39
  cmd.argv(process.argv, async (arg, opt) => {
@@ -93,7 +92,7 @@ cmd.argv(process.argv, async (arg, opt) => {
93
92
  extended: false,
94
93
  suppressWarnings: true
95
94
  });
96
- const message = '\n' + _chalk.default.green('✓') + ` environment created.\n\nTo start it please run:\n\n${startCommand}\n`;
95
+ const message = '\n' + _chalk.default.green('✓') + ` environment created.\n\nTo start the environment run:\n\n${startCommand}\n`;
97
96
  console.log(message);
98
97
  await (0, _tracker.trackEvent)('dev_env_create_command_success', trackingInfo);
99
98
  } catch (error) {
@@ -4,21 +4,24 @@
4
4
  var _chalk = _interopRequireDefault(require("chalk"));
5
5
  var _debug = _interopRequireDefault(require("debug"));
6
6
  var _command = _interopRequireDefault(require("../lib/cli/command"));
7
- var _devEnvironment = require("../lib/constants/dev-environment");
8
7
  var _devEnvironmentCli = require("../lib/dev-environment/dev-environment-cli");
9
8
  var _devEnvironmentCore = require("../lib/dev-environment/dev-environment-core");
10
9
  var _devEnvironmentLando = require("../lib/dev-environment/dev-environment-lando");
11
10
  var _tracker = require("../lib/tracker");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
12
  const debug = (0, _debug.default)('@automattic/vip:bin:dev-environment');
13
+ const exampleUsage = 'vip dev-env destroy';
14
+ const usage = 'vip dev-env destroy';
14
15
  const examples = [{
15
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} destroy`,
16
- description: 'Destroys the default local dev environment'
16
+ usage: `${exampleUsage} --slug=example-site`,
17
+ description: 'Completely remove a local environment named "example-site" by removing all Docker containers, volumes, and configuration files.'
17
18
  }, {
18
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} destroy --slug=foo`,
19
- description: 'Destroys a local dev environment named foo'
19
+ usage: `${exampleUsage} --soft --slug=example-site`,
20
+ description: 'Remove the Docker containers and volumes of a local environment named "example-site" but preserve the configuration files.\n' + ' * The preserved configuration files allow the local environment to be restarted with new Docker containers and volumes.'
20
21
  }];
21
- (0, _command.default)().option('slug', 'Custom name of the dev environment', undefined, _devEnvironmentCli.processSlug).option('soft', 'Keep config files needed to start an environment intact').examples(examples).argv(process.argv, async (arg, opt) => {
22
+ (0, _command.default)({
23
+ usage
24
+ }).option('slug', 'A unique name for a local environment. Default is "vip-local".', undefined, _devEnvironmentCli.processSlug).option('soft', 'Preserve an environment’s configuration files; allows an environment to be regenerated with the start command.').examples(examples).argv(process.argv, async (arg, opt) => {
22
25
  const slug = await (0, _devEnvironmentCli.getEnvironmentName)(opt);
23
26
  const lando = await (0, _devEnvironmentLando.bootstrapLando)();
24
27
  await (0, _devEnvironmentCli.validateDependencies)(lando, slug);
@@ -2,26 +2,28 @@
2
2
  "use strict";
3
3
 
4
4
  var _command = _interopRequireDefault(require("../lib/cli/command"));
5
- var _devEnvironment = require("../lib/constants/dev-environment");
6
5
  var _devEnvironmentCli = require("../lib/dev-environment/dev-environment-cli");
7
6
  var _devEnvironmentCore = require("../lib/dev-environment/dev-environment-core");
8
7
  var _devEnvironmentLando = require("../lib/dev-environment/dev-environment-lando");
9
8
  var _tracker = require("../lib/tracker");
10
9
  var _userError = _interopRequireDefault(require("../lib/user-error"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ const exampleUsage = 'vip dev-env exec';
12
+ const usage = 'vip dev-env exec';
12
13
  const examples = [{
13
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} exec -- wp post list`,
14
- description: 'Use dev-environment to run `wp post list`'
14
+ usage: `${exampleUsage} --slug=example-site -- wp post list`,
15
+ description: 'Run a WP-CLI command against a local environment named "example-site".\n' + ' * A double dash ("--") must separate the arguments of "vip" from those of the "wp" command.'
15
16
  }, {
16
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} exec --slug my_site -- wp post list --posts_per_page=500`,
17
- description: 'Use dev-environment "my-site" to run `wp post list --posts_per_page=500`'
17
+ usage: `${exampleUsage} --slug=example-site -- wp user list --url=example.example-site.vipdev.lndo.site`,
18
+ description: 'Target the WP-CLI command against the network site "example.example-site.vipdev.lndo.site" of a local multisite environment.'
18
19
  }, {
19
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} exec --slug my_site -- wp shell`,
20
- description: 'Use dev-environment "my_site" to run interactive wp shell'
20
+ usage: `${exampleUsage} --slug=example-site -- wp shell`,
21
+ description: 'Run the WP-CLI command "wp shell" against a local environment to open an interactive PHP console.'
21
22
  }];
22
23
  (0, _command.default)({
23
- wildcardCommand: true
24
- }).option('slug', 'Custom name of the dev environment', undefined, _devEnvironmentCli.processSlug).option('force', 'Disable validations before task execution', undefined, _devEnvironmentCli.processBooleanOption).option('quiet', 'Suppress output', undefined, _devEnvironmentCli.processBooleanOption).examples(examples).argv(process.argv, async (unmatchedArgs, opt) => {
24
+ wildcardCommand: true,
25
+ usage
26
+ }).option('slug', 'A unique name for a local environment. Default is "vip-local".', undefined, _devEnvironmentCli.processSlug).option('force', 'Skip validation for a local environment to be in a running state.', undefined, _devEnvironmentCli.processBooleanOption).option('quiet', 'Suppress informational messages.', undefined, _devEnvironmentCli.processBooleanOption).examples(examples).argv(process.argv, async (unmatchedArgs, opt) => {
25
27
  const slug = await (0, _devEnvironmentCli.getEnvironmentName)(opt);
26
28
  const lando = await (0, _devEnvironmentLando.bootstrapLando)();
27
29
  await (0, _devEnvironmentCli.validateDependencies)(lando, slug);
@@ -32,7 +34,7 @@ const examples = [{
32
34
  const argSplitterIx = process.argv.findIndex(argument => '--' === argument);
33
35
  const argSplitterFound = argSplitterIx > -1;
34
36
  if (unmatchedArgs.length > 0 && !argSplitterFound) {
35
- throw new Error('Please provide "--" argument to separate arguments for "vip" and command to be executed (see "--help" for examples)');
37
+ throw new Error('A double dash ("--") must separate the arguments of "vip" from those of the "wp" command. Run "vip dev-env exec --help" for examples.');
36
38
  }
37
39
 
38
40
  /** @type {string[]} */
@@ -43,7 +45,7 @@ const examples = [{
43
45
  if (!opt.force) {
44
46
  const isUp = await (0, _devEnvironmentLando.isEnvUp)(lando, (0, _devEnvironmentCore.getEnvironmentPath)(slug));
45
47
  if (!isUp) {
46
- throw new _userError.default('Environment needs to be started before running a command');
48
+ throw new _userError.default('A WP-CLI command can only be executed on a running local environment.');
47
49
  }
48
50
  }
49
51
  try {
@@ -2,21 +2,20 @@
2
2
  "use strict";
3
3
 
4
4
  var _command = _interopRequireDefault(require("../lib/cli/command"));
5
- var _devEnvironment = require("../lib/constants/dev-environment");
6
5
  var _devEnvironmentCli = require("../lib/dev-environment/dev-environment-cli");
7
6
  var _devEnvironmentCore = require("../lib/dev-environment/dev-environment-core");
8
7
  var _tracker = require("../lib/tracker");
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const exampleUsage = 'vip dev-env import media';
10
+ const usage = 'vip dev-env import media';
10
11
  const examples = [{
11
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} import media path/to/wp-content/uploads`,
12
- description: 'Import contents of the given WP uploads folder file into the media library of the default dev environment'
13
- }, {
14
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} import media path/to/wp-content/uploads --slug=mysite`,
15
- description: 'Import contents of the given WP uploads folder file into the media library of a dev environment named `mysite`'
12
+ usage: `${exampleUsage} /Users/example/Desktop/uploads --slug="example-site"`,
13
+ description: 'Import the contents of the "uploads" directory from a path on the user\'s local machine to the "/wp-content/uploads" directory of the local environment named "example-site".'
16
14
  }];
17
15
  (0, _command.default)({
18
- requiredArgs: 1
19
- }).examples(examples).option('slug', 'Custom name of the dev environment', undefined, _devEnvironmentCli.processSlug).argv(process.argv, async (unmatchedArgs, opt) => {
16
+ requiredArgs: 1,
17
+ usage
18
+ }).examples(examples).option('slug', 'A unique name for a local environment. Default is "vip-local".', undefined, _devEnvironmentCli.processSlug).argv(process.argv, async (unmatchedArgs, opt) => {
20
19
  const [filePath] = unmatchedArgs;
21
20
  const slug = await (0, _devEnvironmentCli.getEnvironmentName)(opt);
22
21
  const trackingInfo = (0, _devEnvironmentCli.getEnvTrackingInfo)(slug);
@@ -3,26 +3,31 @@
3
3
 
4
4
  var _devEnvImportSql = require("../commands/dev-env-import-sql");
5
5
  var _command = _interopRequireDefault(require("../lib/cli/command"));
6
- var _devEnvironment = require("../lib/constants/dev-environment");
7
6
  var _devEnvironmentCli = require("../lib/dev-environment/dev-environment-cli");
8
7
  var _tracker = require("../lib/tracker");
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const exampleUsage = 'vip dev-env import sql';
10
+ const usage = 'vip dev-env import sql';
10
11
  const examples = [{
11
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} import sql some-wp-db-file.sql`,
12
- description: 'Import the contents of a WordPress database from an SQL file'
12
+ usage: `${exampleUsage} /Users/example/Downloads/file.sql --slug="example-site"`,
13
+ description: 'Import the SQL file named "file.sql" from a path on the user\'s local machine to a running local environment named "example-site".'
13
14
  }, {
14
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} import sql wordpress.sql --slug=my_site`,
15
- description: 'Import the contents of a WordPress database from an SQL file into `my_site`'
15
+ usage: `${exampleUsage} /Users/example/Downloads/file.sql --search-replace="example-site.com,example-site.vipdev.lndo.site" --slug="example-site"`,
16
+ description: 'Search for the string "example-site.com" in the SQL file and replace it with "example-site.vipdev.lndo.site" during the import.'
16
17
  }, {
17
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} import sql wordpress.sql --search-replace="testsite.com,test-site.go-vip.net"`,
18
- description: 'Import the contents of a WordPress database from an SQL file and replace the occurrences of `testsite.com` with `test-site.go-vip.net`'
18
+ usage: `${exampleUsage} /Users/example/Downloads/file.sql --search-replace="example-site.com,example-site.vipdev.lndo.site" --skip-reindex --slug="example-site"`,
19
+ description: 'Import the SQL file to a local environment with Elasticsearch enabled, and do not reindex after the import is completed.'
19
20
  }, {
20
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} import sql wordpress.sql --search-replace="testsite.com,test-site.go-vip.net" --in-place`,
21
- description: 'Import the contents of a WordPress database from an SQL file and replace the occurrences of `testsite.com` with `test-site.go-vip.net` in place (modifies the original SQL file)'
21
+ usage: `${exampleUsage} /Users/example/Downloads/file.sql --search-replace="example-site.com,example-site.vipdev.lndo.site" --in-place`,
22
+ description: 'Perform the search and replace operation on the local SQL file ("file.sql"), save the changes, and import the updated file to the local environment.'
23
+ }, {
24
+ usage: `${exampleUsage} /Users/example/Downloads/file.sql --search-replace="example-site.com/site-three,site-three.example-site.vipdev.lndo.site" --search-replace="example-site.com,example-site.vipdev.lndo.site" --slug="example-site"`,
25
+ description: 'Search and replace 2 pairs of strings during the import of the SQL file to a local multisite environment.'
22
26
  }];
23
27
  (0, _command.default)({
24
- requiredArgs: 1
25
- }).option('slug', 'Custom name of the dev environment', undefined, _devEnvironmentCli.processSlug).option(['r', 'search-replace'], 'Perform Search and Replace on the specified SQL file').option('in-place', 'Search and Replace explicitly on the given input file').option('skip-validate', 'Do not perform file validation').option(['k', 'skip-reindex'], 'Do not reindex data in Elasticsearch after import').option('quiet', 'Suppress prompts and informational messages').examples(examples).argv(process.argv, async (unmatchedArgs, opt) => {
28
+ requiredArgs: 1,
29
+ usage
30
+ }).option('slug', 'A unique name for a local environment. Default is "vip-local".', undefined, _devEnvironmentCli.processSlug).option(['r', 'search-replace'], 'Search for a string in the SQL file and replace it with a new string.').option('in-place', 'Perform a search and replace operation on the local SQL file and save the results.').option('skip-validate', 'Skip file validation.').option(['k', 'skip-reindex'], 'Skip Elasticsearch reindex after import.').option('quiet', 'Skip confirmation and suppress informational messages.').examples(examples).argv(process.argv, async (unmatchedArgs, opt) => {
26
31
  const [fileName] = unmatchedArgs;
27
32
  const slug = await (0, _devEnvironmentCli.getEnvironmentName)(opt);
28
33
  const cmd = new _devEnvImportSql.DevEnvImportSQLCommand(fileName, opt, slug);
@@ -2,15 +2,17 @@
2
2
  "use strict";
3
3
 
4
4
  var _command = _interopRequireDefault(require("../lib/cli/command"));
5
- var _devEnvironment = require("../lib/constants/dev-environment");
6
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
6
+ const exampleUsage = 'vip dev-env import';
7
+ const usage = 'vip dev-env import';
7
8
  const examples = [{
8
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} import sql file.sql`,
9
- description: 'Import the given SQL file to your site'
9
+ usage: `${exampleUsage} sql /Users/example/Downloads/file.sql`,
10
+ description: 'Import the SQL file named "file.sql" from a path on the user\'s local machine to a running local environment.'
10
11
  }, {
11
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} import media path/to/wp-content/uploads`,
12
- description: 'Import contents of the given WP uploads folder file into the media library of the default dev environment'
12
+ usage: `${exampleUsage} media /Users/example/Desktop/uploads`,
13
+ description: 'Import the contents of the "uploads" directory from a path on the user\'s local machine to the "/wp-content/uploads" directory of a running local environment.'
13
14
  }];
14
15
  (0, _command.default)({
15
- requiredArgs: 1
16
- }).examples(examples).command('sql', 'Import SQL to your dev-env database from a file').command('media', 'Import media files to the dev environment of your application from a compressed web archive. ' + 'This command will copy the contents of a folder to the `uploads` folder of the target dev environment.').argv(process.argv);
16
+ requiredArgs: 1,
17
+ usage
18
+ }).examples(examples).command('sql', 'Import a SQL file to a running local environment.').command('media', 'Import media files to a running local environment.').argv(process.argv);
@@ -3,21 +3,27 @@
3
3
 
4
4
  var _debug = _interopRequireDefault(require("debug"));
5
5
  var _command = _interopRequireDefault(require("../lib/cli/command"));
6
- var _devEnvironment = require("../lib/constants/dev-environment");
7
6
  var _devEnvironmentCli = require("../lib/dev-environment/dev-environment-cli");
8
7
  var _devEnvironmentCore = require("../lib/dev-environment/dev-environment-core");
9
8
  var _devEnvironmentLando = require("../lib/dev-environment/dev-environment-lando");
10
9
  var _tracker = require("../lib/tracker");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
11
  const debug = (0, _debug.default)('@automattic/vip:bin:dev-environment');
12
+ const exampleUsage = 'vip dev-env info';
13
+ const usage = 'vip dev-env info';
13
14
  const examples = [{
14
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} info --all`,
15
- description: 'Return information about all local dev environments'
15
+ usage: `${exampleUsage} --slug=example-site`,
16
+ description: 'Retrieve basic information about the local environment named "example-site".'
16
17
  }, {
17
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} info --slug=my_site`,
18
- description: 'Return information about a local dev environment named "my_site"'
18
+ usage: `${exampleUsage} --slug=example-site --extended`,
19
+ description: 'Retrieve a larger amount of information about the local environment named "example-site".'
20
+ }, {
21
+ usage: `${exampleUsage} --all`,
22
+ description: 'Retrieve basic information about all local environments.'
19
23
  }];
20
- (0, _command.default)().option('slug', 'Custom name of the dev environment', undefined, _devEnvironmentCli.processSlug).option('all', 'Show Info for all local dev environments').option('extended', 'Show extended information about the dev environment').examples(examples).argv(process.argv, async (arg, opt) => {
24
+ (0, _command.default)({
25
+ usage
26
+ }).option('slug', 'A unique name for a local environment. Default is "vip-local".', undefined, _devEnvironmentCli.processSlug).option('all', 'Retrieve information about all local environments.').option('extended', 'Retrieve a larger amount of information.').examples(examples).argv(process.argv, async (arg, opt) => {
21
27
  let trackingInfo;
22
28
  let slug;
23
29
  const lando = await (0, _devEnvironmentLando.bootstrapLando)();
@@ -2,17 +2,20 @@
2
2
  "use strict";
3
3
 
4
4
  var _command = _interopRequireDefault(require("../lib/cli/command"));
5
- var _devEnvironment = require("../lib/constants/dev-environment");
6
5
  var _devEnvironmentCli = require("../lib/dev-environment/dev-environment-cli");
7
6
  var _devEnvironmentCore = require("../lib/dev-environment/dev-environment-core");
8
7
  var _devEnvironmentLando = require("../lib/dev-environment/dev-environment-lando");
9
8
  var _tracker = require("../lib/tracker");
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const exampleUsage = 'vip dev-env list';
11
+ const usage = 'vip dev-env list';
11
12
  const examples = [{
12
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} list`,
13
- description: 'Return information about all local dev environments'
13
+ usage: `${exampleUsage}`,
14
+ description: 'Retrieve basic information about all local environments.'
14
15
  }];
15
- (0, _command.default)().examples(examples).argv(process.argv, async () => {
16
+ (0, _command.default)({
17
+ usage
18
+ }).examples(examples).argv(process.argv, async () => {
16
19
  const lando = await (0, _devEnvironmentLando.bootstrapLando)();
17
20
  lando.events.constructor.prototype.setMaxListeners(1024);
18
21
  await (0, _devEnvironmentCli.validateDependencies)(lando, '');
@@ -3,24 +3,27 @@
3
3
 
4
4
  var _debug = _interopRequireDefault(require("debug"));
5
5
  var _command = _interopRequireDefault(require("../lib/cli/command"));
6
- var _devEnvironment = require("../lib/constants/dev-environment");
7
6
  var _devEnvironmentCli = require("../lib/dev-environment/dev-environment-cli");
8
7
  var _devEnvironmentCore = require("../lib/dev-environment/dev-environment-core");
9
8
  var _devEnvironmentLando = require("../lib/dev-environment/dev-environment-lando");
10
9
  var _tracker = require("../lib/tracker");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
11
  const debug = (0, _debug.default)('@automattic/vip:bin:dev-environment');
12
+ const exampleUsage = 'vip dev-env logs';
13
+ const usage = 'vip dev-env logs';
13
14
  const examples = [{
14
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} logs --slug=my_site`,
15
- description: 'Return all logs from a local dev environment named "my_site"'
15
+ usage: `${exampleUsage} --slug=example-site`,
16
+ description: 'Retrieve logs for all running services of the local environment named "example-site".'
16
17
  }, {
17
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} logs --slug=my_site --service=elasticsearch`,
18
- description: 'Return logs from the "elasticsearch" service from a local dev environment named "my_site"'
18
+ usage: `${exampleUsage} --service=elasticsearch --slug=example-site`,
19
+ description: 'Retrieve logs only for the "elasticsearch" service of the local environment named "example-site".'
19
20
  }, {
20
- usage: `${_devEnvironment.DEV_ENVIRONMENT_FULL_COMMAND} logs --slug=my_site --service=elasticsearch -f`,
21
- description: 'Follow logs from the "elasticsearch" service from a local dev environment named "my_site"'
21
+ usage: `${exampleUsage} --service=database --follow --slug=example-site`,
22
+ description: 'Retrieve and continually output logs for the "database" service of the local environment named "example-site".'
22
23
  }];
23
- (0, _command.default)().option('slug', 'Custom name of the dev environment', undefined, _devEnvironmentCli.processSlug).option(['f', 'follow'], 'Follow logs for a specific service in local dev environment').option('service', 'Show logs for a specific service in local dev environment. Defaults to all if none passed in.').examples(examples).argv(process.argv, async (arg, opt) => {
24
+ (0, _command.default)({
25
+ usage
26
+ }).option('slug', 'A unique name for a local environment. Default is "vip-local".', undefined, _devEnvironmentCli.processSlug).option(['f', 'follow'], 'Continually output logs as they are generated.').option('service', 'Restrict to a single service.').examples(examples).argv(process.argv, async (arg, opt) => {
24
27
  const slug = await (0, _devEnvironmentCli.getEnvironmentName)(opt);
25
28
  const lando = await (0, _devEnvironmentLando.bootstrapLando)();
26
29
  await (0, _devEnvironmentCli.validateDependencies)(lando, slug);