@automattic/vip 2.7.0-dev2 → 2.7.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.
package/README.md CHANGED
@@ -27,6 +27,13 @@ By default, we record information about the usage of this tool using an in-house
27
27
 
28
28
  ## Changelog
29
29
 
30
+ ### 2.7.0 (07 December 2021)
31
+ - #941 [dev-env] Bump lando CLI dependency
32
+ - #938 Hide roll back message after SQL Import failure for launched sites
33
+ - #936 Sets jest maxWorkers to 4
34
+
35
+ https://github.com/Automattic/vip/releases/tag/v2.7.0
36
+
30
37
  ### 2.6.0 (23 November 2021)
31
38
  - #921 [dev-env] Introuces update to change existing environment
32
39
  - #928 [dev-env] Switch lando to use our fork
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "tracksUserType": "vip:user_id",
3
3
  "tracksAnonUserType": "anon",
4
- "tracksEventPrefix": "vip_cli_dev_",
5
- "environment": "development"
4
+ "tracksEventPrefix": "vip_cli_",
5
+ "environment": "production"
6
6
  }
File without changes
File without changes
File without changes
@@ -48,6 +48,7 @@ const IMPORT_SQL_PROGRESS_QUERY = (0, _graphqlTag.default)`
48
48
  environments(id: $envId) {
49
49
  id
50
50
  isK8sResident
51
+ launched
51
52
  jobs(types: "sql_import") {
52
53
  id
53
54
  type
@@ -106,7 +107,8 @@ async function getStatus(api, appId, envId) {
106
107
  const [environment] = environments;
107
108
  const {
108
109
  importStatus,
109
- jobs
110
+ jobs,
111
+ launched
110
112
  } = environment;
111
113
 
112
114
  if (!environment.isK8sResident && !(jobs !== null && jobs !== void 0 && jobs.length)) {
@@ -116,15 +118,16 @@ async function getStatus(api, appId, envId) {
116
118
  const [importJob] = jobs;
117
119
  return {
118
120
  importStatus,
119
- importJob
121
+ importJob,
122
+ launched
120
123
  };
121
124
  }
122
125
 
123
- function getErrorMessage(importFailed) {
126
+ function getErrorMessage(importFailed, launched = false) {
124
127
  debug({
125
128
  importFailed
126
129
  });
127
- const rollbackMessage = `Your site is ${_chalk.default.blue('automatically being rolled back')} to the last backup prior to your import job.
130
+ const rollbackMessage = launched ? '' : `Your site is ${_chalk.default.blue('automatically being rolled back')} to the last backup prior to your import job.
128
131
  `;
129
132
  let message = importFailed.error;
130
133
 
@@ -262,7 +265,8 @@ ${maybeExitPrompt}
262
265
  }
263
266
 
264
267
  const {
265
- importStatus
268
+ importStatus,
269
+ launched
266
270
  } = status;
267
271
  let {
268
272
  importJob
@@ -352,7 +356,8 @@ ${maybeExitPrompt}
352
356
 
353
357
  if (!jobSteps.length) {
354
358
  return reject({
355
- error: 'Could not enumerate the import job steps'
359
+ error: 'Could not enumerate the import job steps',
360
+ launched
356
361
  });
357
362
  }
358
363
 
@@ -375,7 +380,8 @@ ${maybeExitPrompt}
375
380
  commandOutput: failedImportStep.output,
376
381
  error: 'Import step failed',
377
382
  stepName: failedImportStep.name,
378
- errorText: failedImportStep.error
383
+ errorText: failedImportStep.error,
384
+ launched
379
385
  });
380
386
  }
381
387
 
@@ -385,7 +391,8 @@ ${maybeExitPrompt}
385
391
  if (jobStatus === 'error') {
386
392
  return reject({
387
393
  error: 'Import job failed',
388
- steps: jobSteps
394
+ steps: jobSteps,
395
+ launched
389
396
  });
390
397
  }
391
398
 
@@ -425,7 +432,7 @@ ${maybeExitPrompt}
425
432
  progressTracker.print({
426
433
  clearAfter: true
427
434
  });
428
- exit.withError(getErrorMessage(importFailed));
435
+ exit.withError(getErrorMessage(importFailed, importFailed.launched));
429
436
  }
430
437
  }
431
438
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/vip",
3
- "version": "2.7.0-dev2",
3
+ "version": "2.7.0",
4
4
  "description": "The VIP Javascript library & CLI",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -117,7 +117,7 @@
117
117
  "ini": "2.0.0",
118
118
  "json2csv": "5.0.6",
119
119
  "jwt-decode": "2.2.0",
120
- "lando": "git+https://github.com/Automattic/lando-cli.git#v3.5.1-patch2021_11_22",
120
+ "lando": "git+https://github.com/Automattic/lando-cli.git#v3.5.1-patch2021_12_06",
121
121
  "node-fetch": "^2.6.1",
122
122
  "opn": "5.5.0",
123
123
  "rollbar": "2.22.0",
Binary file