/**
 * Bundled from validate-npm-package-name
 * This is a zero-dependency bundle created by esbuild.
 */
var o=Object.defineProperty;var t=(r,e)=>o(r,"name",{value:e,configurable:!0});module.exports=t(function(e){let a=[],s=[];if(!e)return a.push("name cannot be empty"),{validForNewPackages:!1,validForOldPackages:!1,errors:a,warnings:s};if(e.length>214)return a.push("name too long"),{validForNewPackages:!1,validForOldPackages:!1,errors:a,warnings:s};if(e[0]==="."||e[0]==="_")return a.push("name cannot start with . or _"),{validForNewPackages:!1,validForOldPackages:!1,errors:a,warnings:s};if(!/^[a-z0-9._-]+$/.test(e.split("/").pop()))return a.push("name can only contain lowercase letters, numbers, dots, dashes, underscores"),{validForNewPackages:!1,validForOldPackages:!1,errors:a,warnings:s};if(e[0]==="@"){if(!e.includes("/"))return a.push("scoped package must have a slash"),{validForNewPackages:!1,validForOldPackages:!1,errors:a,warnings:s};let l=e.split("/");if(l.length!==2||!l[0]||!l[1])return a.push("invalid scoped package name"),{validForNewPackages:!1,validForOldPackages:!1,errors:a,warnings:s}}return{validForNewPackages:a.length===0,validForOldPackages:a.length===0,errors:a,warnings:s}},"validate");module.exports.default=module.exports;
