"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const child_process_1 = require("child_process");
function checkLocalPackageVersion(packageName) {
    (0, child_process_1.exec)(`npm list ${packageName} --depth=0`, (error, stdout, stderr) => {
        if (error) {
            console.error(`Error: ${error.message}`);
            return;
        }
        if (stderr) {
            console.error(`Error: ${stderr}`);
            return;
        }
        // Extract the version information from the stdout
        const versionMatch = stdout.match(new RegExp(`${packageName}@(.*)`, "i"));
        if (versionMatch && versionMatch.length > 1) {
            const localVersion = versionMatch[1].trim();
            console.log(`Local version of ${packageName}: ${localVersion}`);
        }
        else {
            console.log(`Package ${packageName} not found or version information not available.`);
        }
    });
}
// Replace 'package-name' with the name of the package you want to check
const packageName = "exsp-gen";
checkLocalPackageVersion(packageName);
