@sap/cli-core
Version:
Command-Line Interface (CLI) Core Module
20 lines (19 loc) • 672 B
JavaScript
/* eslint-disable import/first */
import * as dotenv from "dotenv";
import { configureLoggers } from "./configureLoggers.js";
dotenv.config({
quiet: true, // default is false, but we want to avoid logging to the stdout
});
configureLoggers();
import { set } from "./config/index.js";
import { CONFIG_PASSCODE_FUNCTION } from "./constants.js";
import { configure as configureLogger, } from "./logger/index.js";
export { getCommands } from "./dwc/dwc.js";
export const configure = (logger, passcodeFunction) => {
if (logger) {
configureLogger(logger);
}
if (passcodeFunction) {
set({ [CONFIG_PASSCODE_FUNCTION]: passcodeFunction });
}
};