const require_logger = require('../../../config/dist/esm/logger.cjs');
const require_getConfiguration = require('../../../config/dist/esm/configFile/getConfiguration.cjs');
const require_proxy = require('./api/dist/esm/proxy.cjs');
const require_checkAccess = require('./utils/checkAccess.cjs');

//#region ../@intlayer/cli/dist/esm/pushConfig.mjs
const pushConfig = async (options) => {
	const config = require_getConfiguration.getConfiguration(options?.configOptions);
	const appLogger = require_logger.getAppLogger(config, { config: { prefix: "" } });
	if (!await require_checkAccess.checkCMSAuth(config)) return;
	const getDictionariesKeysResult = await require_proxy.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
exports.pushConfig = pushConfig;
//# sourceMappingURL=pushConfig.cjs.map