"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('🔄 updating os and cpu in package.json...');
    try {
        (0, devkit_1.updateJson)(tree, 'package.json', (json) => {
            json.os = [
                "darwin",
                "linux",
                "win32"
            ];
            json.cpu = [
                "x64",
                "arm64"
            ];
            return json;
        });
        devkit_1.logger.info('✅ Successfully added os and cpu to package.json');
    }
    catch (error) {
        devkit_1.logger.error(`❌ Failed to add os and cpu to package.json: ${error?.message || 'Unknown error'}`);
        throw error;
    }
}
