@sap/cli-core
Version:
Command-Line Interface (CLI) Core Module
20 lines (19 loc) • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.create = void 0;
const or_1 = require("../../or");
const next_1 = require("../../next");
const fail_1 = require("../../fail");
const checkOptionsExistence_1 = require("../../checkOptionsExistence");
const input_1 = require("./input");
const function_1 = require("./function");
const setPasscode_1 = require("./setPasscode");
const constants_1 = require("../../../../constants");
const core_1 = require("../../../../config/core");
const create = () => {
if ((0, core_1.getAuthenticationMethods)().includes(constants_1.AuthenticationMethod.passcode)) {
return (0, next_1.create)("commands.handler.authentication.passcode", (0, checkOptionsExistence_1.create)(constants_1.OPTION_CLIENT_ID), (0, checkOptionsExistence_1.create)(constants_1.OPTION_ACCESS_TOKEN), (0, checkOptionsExistence_1.create)(constants_1.OPTION_SECRETS_FILE), (0, or_1.create)("commands.handler.authentication.passcode$value", (0, function_1.create)(), (0, input_1.create)()), (0, setPasscode_1.create)());
}
return (0, fail_1.create)();
};
exports.create = create;