@pnp/cli-microsoft365
Version:
Manage Microsoft 365 and SharePoint Framework projects on any platform
32 lines • 1.11 kB
JavaScript
import { cli } from '../../../cli/cli.js';
import entraAppGetCommand from '../../entra/commands/app/app-get.js';
import AppCommand from '../../base/AppCommand.js';
import commands from '../commands.js';
class AppGetCommand extends AppCommand {
get name() {
return commands.GET;
}
get description() {
return 'Retrieves information about the current Microsoft Entra app';
}
async commandAction(logger, args) {
const options = {
appId: this.appId,
output: 'json',
debug: args.options.debug,
verbose: args.options.verbose
};
try {
const appGetOutput = await cli.executeCommandWithOutput(entraAppGetCommand, { options: { ...options, _: [] } });
if (this.verbose) {
await logger.logToStderr(appGetOutput.stderr);
}
await logger.log(JSON.parse(appGetOutput.stdout));
}
catch (err) {
this.handleRejectedODataJsonPromise(err);
}
}
}
export default new AppGetCommand();
//# sourceMappingURL=app-get.js.map