vip-cli icon indicating copy to clipboard operation
vip-cli copied to clipboard

Add/media import improvements

Open ariskataoka opened this issue 2 months ago • 2 comments

Description

This PR uses the failure details URL for the import media command.

Pull request checklist

New release checklist

Changelog Description

Media import: Add option to download failure details logs from URL returned in the media import request response body.

Steps to Test

Obs.: This test requires a locall VIP API public up and running.

  1. Check out PR.
  2. Run npm run build

Scenario 1:

  1. Import media files by running VIP_PROXY="" API_HOST={ LOCAL_VIP_API_PUBLIC_URL } node ./dist/bin/vip-import-media.js @{ TEST_SITE_ID }.{ ENV_SITE } { MEDIA_TO_BE_IMPORTED_URL }

The output should contain a message about the errors and a prompt as:

⚠️  Error details can be found on ${ ERROR_DETAILS_URL_RETURNED_BY_VIP_PUBLIC_API }
Download error details now? (y/N) › 
  1. Answer y
  2. The output should contain information about the download and the local file as a result:
⚠️  All errors have been exported to { LOCAL_PATH }

Scenario 2:

Repeat step 1

  1. Answer n
  2. The prompt should exit

ariskataoka avatar May 09 '24 05:05 ariskataoka