// src/actions/dead/classifyPackageVisibility.ts
function isScopedPackageName(name) {
  return typeof name === "string" && name.startsWith("@");
}
function classifyPackageVisibility(manifest) {
  if (manifest?.private === true) return "private";
  const access = manifest?.publishConfig;
  if (typeof access === "object" && access !== null && !Array.isArray(access)) {
    const publishAccess = access.access;
    if (publishAccess === "restricted") return "restricted";
    if (publishAccess === "public") return "public";
  }
  if (isScopedPackageName(manifest?.name)) return "restricted";
  return "public";
}
export {
  classifyPackageVisibility
};
//# sourceMappingURL=classifyPackageVisibility.mjs.map
