@automattic/vip 2.40.0-dev.0 → 2.40.0-dev.2

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.
@@ -18,12 +18,19 @@ const examples = [{
18
18
  description: 'Return information about a local dev environment named "my_site"'
19
19
  }];
20
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) => {
21
- const slug = await (0, _devEnvironmentCli.getEnvironmentName)(opt);
21
+ let trackingInfo;
22
+ let slug;
22
23
  const lando = await (0, _devEnvironmentLando.bootstrapLando)();
24
+ if (opt.all) {
25
+ trackingInfo = {
26
+ all: true
27
+ };
28
+ slug = '';
29
+ } else {
30
+ slug = await (0, _devEnvironmentCli.getEnvironmentName)(opt);
31
+ trackingInfo = (0, _devEnvironmentCli.getEnvTrackingInfo)(slug);
32
+ }
23
33
  await (0, _devEnvironmentCli.validateDependencies)(lando, slug);
24
- const trackingInfo = opt.all ? {
25
- all: true
26
- } : (0, _devEnvironmentCli.getEnvTrackingInfo)(slug);
27
34
  await (0, _tracker.trackEvent)('dev_env_info_command_execute', trackingInfo);
28
35
  debug('Args: ', arg, 'Options: ', opt);
29
36
  try {
@@ -433,7 +433,8 @@ function promptForBoolean(message, initial) {
433
433
  if (isStdinTTY) {
434
434
  const confirm = new _enquirer.Confirm({
435
435
  message,
436
- initial: initial.toString()
436
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-assignment
437
+ initial: initial // TS definition is wrong, so we need to bypass it to show the correct hint.
437
438
  });
438
439
  return confirm.run();
439
440
  }
@@ -223,7 +223,7 @@ ${maybeExitPrompt}
223
223
  const errorsFile = `media-import-${app.name ?? ''}-${Date.now()}${exportFileErrorsToJson ? '.json' : '.txt'}`;
224
224
  try {
225
225
  await (0, _promises.writeFile)(errorsFile, formattedData);
226
- progressTracker.suffix += `${_chalk.default.yellow(`⚠️ All errors have been exported to ${_chalk.default.bold((0, _nodePath.resolve)(errorsFile))}`)}`;
226
+ progressTracker.suffix += `${_chalk.default.yellow(`⚠️ All errors have been exported to ${_chalk.default.bold((0, _nodePath.resolve)(errorsFile))}\n`)}`;
227
227
  } catch (writeFileErr) {
228
228
  progressTracker.suffix += `${_chalk.default.red(`Could not export errors to file\n${writeFileErr.message}`)}`;
229
229
  }
@@ -242,16 +242,18 @@ Downloading errors details from ${fileErrorsUrl}...
242
242
  }
243
243
  }
244
244
  async function promptFailureDetailsDownload(fileErrorsUrl) {
245
- progressTracker.suffix += `${_chalk.default.yellow(`⚠️ Error details can be found on ${_chalk.default.bold(fileErrorsUrl)}\n${_chalk.default.italic.yellow('(This link will be valid for the next 15 minutes. The report is retained for 7 days from the completion of the import.)')}. `)}\n`;
246
- progressTracker.print({
247
- clearAfter: true
248
- });
249
245
  const failureDetails = await (0, _enquirer.prompt)({
250
246
  type: 'confirm',
251
247
  name: 'download',
252
- message: 'Download file import errors report now?'
248
+ message: 'Download file import errors report now? (Report will be downloadable for up to 7 days from the completion of the import)'
253
249
  });
254
250
  if (!failureDetails.download) {
251
+ progressTracker.suffix += `${_chalk.default.yellow(`⚠️ Click on the following link to download the file import errors report`)}`;
252
+ progressTracker.suffix += `\n${_chalk.default.italic.yellow('(The link will be valid for the next 15 minutes & the report will be downloadable for up to 7 days from the completion of the import)')} `;
253
+ progressTracker.suffix += `\n\n${_chalk.default.bold.yellow(fileErrorsUrl)}\n`;
254
+ progressTracker.print({
255
+ clearAfter: true
256
+ });
255
257
  return;
256
258
  }
257
259
  const failureDetailsErrors = await fetchFailureDetails(fileErrorsUrl);
@@ -284,9 +286,10 @@ Downloading errors details from ${fileErrorsUrl}...
284
286
  // Errors were observed and are present in the dto
285
287
  // Fall back to exporting errors to local file
286
288
  await printFailureDetails(fileErrors, results);
287
- } else {
289
+ } else if ('ABORTED' !== overallStatus) {
288
290
  // Errors are not present in the dto
289
291
  // And file error details report link is not available
292
+ // do not print this message if the import was aborted
290
293
  printFileErrorsReportLinkExpiredError(results);
291
294
  }
292
295
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@automattic/vip",
3
- "version": "2.40.0-dev.0",
3
+ "version": "2.40.0-dev.2",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@automattic/vip",
9
- "version": "2.40.0-dev.0",
9
+ "version": "2.40.0-dev.2",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/vip",
3
- "version": "2.40.0-dev.0",
3
+ "version": "2.40.0-dev.2",
4
4
  "description": "The VIP Javascript library & CLI",
5
5
  "main": "index.js",
6
6
  "bin": {