import { getIntlayerAPIProxy } from "./api/dist/esm/proxy.mjs";
import { checkCMSAuth } from "./utils/checkAccess.mjs";
import { getAppLogger, getConfiguration } from "@intlayer/config";

//#region ../@intlayer/cli/dist/esm/pushConfig.mjs
const pushConfig = async (options) => {
	const config = getConfiguration(options?.configOptions);
	const appLogger = getAppLogger(config, { config: { prefix: "" } });
	if (!await checkCMSAuth(config)) return;
	const getDictionariesKeysResult = await getIntlayerAPIProxy(void 0, config).project.pushProjectConfiguration(config);
	if (!getDictionariesKeysResult.data) throw new Error("Error pushing project configuration");
	appLogger("Project configuration pushed successfully");
	appLogger(JSON.stringify(getDictionariesKeysResult.data, null, 2));
};

//#endregion
export { pushConfig };
//# sourceMappingURL=pushConfig.mjs.map