1 | {"version":3,"file":"assert-valid-package-name.esm.js","sources":["../../src/utils/assert-valid-package-name.ts"],"sourcesContent":["import validatePackageName from 'validate-npm-package-name';\nimport { InvalidPackageNameError } from './errors';\nimport { log } from './log';\n\nexport function assertValidPackageName({ name }: { name: string }): void {\n const { validForOldPackages, validForNewPackages } =\n validatePackageName(name);\n const valid = validForOldPackages || validForNewPackages;\n if (!valid) {\n log('assertValidPackageName: invalid package name: %O', { name });\n throw new InvalidPackageNameError(`invalid package name: '${name}'`);\n }\n}\n"],"names":["assertValidPackageName","name","validForOldPackages","validForNewPackages","validatePackageName","valid","log","InvalidPackageNameError"],"mappings":";;;;SAIgBA,uBAAuB;AAAEC,EAAAA;AAAF;AACnC,QAAM;AAAEC,IAAAA,mBAAF;AAAuBC,IAAAA;AAAvB,MACFC,mBAAmB,CAACH,IAAD,CADvB;AAEA,QAAMI,KAAK,GAAGH,mBAAmB,IAAIC,mBAArC;;AACA,MAAI,CAACE,KAAL,EAAY;AACRC,IAAAA,GAAG,CAAC,kDAAD,EAAqD;AAAEL,MAAAA;AAAF,KAArD,CAAH;AACA,UAAM,IAAIM,uBAAJ,2BAAsDN,OAAtD,CAAN;AACH;AACJ;;;;"} |