UNPKG

@sap/cds-dk

Version:

Command line client and development toolkit for the SAP Cloud Application Programming Model

62 lines (40 loc) 1.87 kB
module.exports = Object.assign(logout, { options: ['--url', '--subdomain'], shortcuts: ['-l', '-s'], flags: ['--delete-settings', '--clear-invalid'], get help() { return ` # SYNOPSIS *cds logout* [ <extension-project-directory> ] Removes authentication data saved locally by *cds login* for use with *cds pull* and *cds push*. In default mode, deletes only data for a specific app URL and subdomain, optionally including relevant project settings. <app-url> and <tenant-subdomain> will be determined from project settings unless given by options. Project settings will be loaded by reference to the given folder. If omitted, the project setting are loaded from a subdirectory named as the subdomain or the current working directory. To access keyring storage, the 'keytar' Node.js module must be installed. If this is not the case, existing keyring entries will not be detected and cannot be removed by this command. # OPTIONS *-l* | *--url* <app-url> The <app-url> to logout from. By default, it's determined from project settings. *-s* | *--subdomain* <subdomain> The subdomain to logout from. By default, it's determined from project settings. *--delete-settings* Additionally removes the settings for the given extension project. *--clear-invalid* Enter special mode to clear all tokens and settings for any project folders which no longer exist in the file system. Additionally, removes expired tokens. Ignores any other command-line arguments. `; }}) async function logout ([projectFolder], options = {}) { Object.assign(options, { projectFolder }) await require('../lib/mtx/auth_manager').logout(options) } /* eslint no-console: off */