import { findWorkspaceRootSync } from "./findWorkspaceRoot.js";

/**
 * Get the package type of the current `pwd`.
 */
function getPwdPackageType() {
    return (
        process
            .cwd()
            // eslint-disable-next-line n/no-sync
            .substring(findWorkspaceRootSync().length + 1)
            .split("/")[0]
    );
}

export { getPwdPackageType };
