import {
  generateConfig,
  printConfigOptions,
} from "@digiresilience/metamigo-common";
import { IAppConfig, IAppConvict } from "@digiresilience/metamigo-config";
import { loadConfigRaw } from "@digiresilience/metamigo-config";

export const genConf = async (): Promise<void> => {
  const c = (await loadConfigRaw()) as any;
  const generated = generateConfig(c) as any;
  console.log(generated);
};

export const genSchema = async (): Promise<void> => {
  const c: any = await loadConfigRaw();
  console.log(c.getSchemaString());
};

export const listConfig = async (): Promise<void> => {
  const c = (await loadConfigRaw()) as any;
  printConfigOptions(c);
};
