"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = update;
const devkit_1 = require("@nx/devkit");
async function update(tree) {
    devkit_1.logger.info('🔄 Removing kaltura-tools preinstall script...');
    try {
        (0, devkit_1.updateJson)(tree, 'package.json', (json) => {
            if (!json.scripts) {
                json.scripts = {};
            }
            delete json.scripts.preinstall;
            return json;
        });
        devkit_1.logger.info('✅ Successfully removed kaltura-tools preinstall script');
    }
    catch (error) {
        devkit_1.logger.error(`❌ Failed to remove preinstall script: ${error?.message || 'Unknown error'}`);
        throw error;
    }
}
