From d27db5f49fe9828edbc5a0323534aca5881f499a Mon Sep 17 00:00:00 2001 From: Mohammad Jangda Date: Mon, 9 Dec 2024 00:31:31 -0500 Subject: [PATCH] Fix `vip app` Restore support for format for the command, otherwise we never end up outputting anything. Also removes the redundant `header` handling which would include extrenuous data in the output. --- src/bin/vip-app.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/bin/vip-app.js b/src/bin/vip-app.js index 8c4efc97d..65d5e7e49 100755 --- a/src/bin/vip-app.js +++ b/src/bin/vip-app.js @@ -6,7 +6,7 @@ import app from '../lib/api/app'; import command, { getEnvIdentifier } from '../lib/cli/command'; import { trackEvent } from '../lib/tracker'; -command( { requiredArgs: 1 } ) +command( { requiredArgs: 1, format: true } ) .example( 'vip app list', 'Retrieve a list of applications that can be accessed by the current authenticated VIP-CLI user.' @@ -59,12 +59,6 @@ command( { requiredArgs: 1 } ) // Clone the read-only response object so we can modify it const clonedResponse = Object.assign( {}, res ); - const header = [ - { key: 'id', value: res.id }, - { key: 'name', value: res.name }, - { key: 'repo', value: res.repo }, - ]; - clonedResponse.environments = clonedResponse.environments.map( env => { const clonedEnv = Object.assign( {}, env ); @@ -87,5 +81,5 @@ command( { requiredArgs: 1 } ) return clonedEnv; } ); - return { header, data: clonedResponse.environments }; + return clonedResponse.environments; } );