UNPKG

@pnp/cli-microsoft365

Version:

Manage Microsoft 365 and SharePoint Framework projects on any platform

27 lines 951 B
import { z } from 'zod'; import { cli } from "../../../../cli/cli.js"; import { globalOptionsZod } from "../../../../Command.js"; import { settingsNames } from "../../../../settingsNames.js"; import AnonymousCommand from "../../../base/AnonymousCommand.js"; import commands from "../../commands.js"; const settingNameValues = Object.getOwnPropertyNames(settingsNames); export const options = z.strictObject({ ...globalOptionsZod.shape, key: z.enum(settingNameValues).alias('k') }); class CliConfigGetCommand extends AnonymousCommand { get name() { return commands.CONFIG_GET; } get description() { return 'Gets value of a CLI for Microsoft 365 configuration option'; } get schema() { return options; } async commandAction(logger, args) { await logger.log(cli.getConfig().get(args.options.key)); } } export default new CliConfigGetCommand(); //# sourceMappingURL=config-get.js.map