fix(mirror): now refusing to mirror for private code
This commit is contained in:
parent
28541a838d
commit
cff79bc3b4
@ -28,8 +28,11 @@ export let mirror = async () => {
|
|||||||
const githubToken = process.env.NPMCI_GIT_GITHUBTOKEN;
|
const githubToken = process.env.NPMCI_GIT_GITHUBTOKEN;
|
||||||
const githubUser = process.env.NPMCI_GIT_GITHUBGROUP || repo.user;
|
const githubUser = process.env.NPMCI_GIT_GITHUBGROUP || repo.user;
|
||||||
const githubRepo = process.env.NPMCI_GIT_GITHUB || repo.repo;
|
const githubRepo = process.env.NPMCI_GIT_GITHUB || repo.repo;
|
||||||
if(configObject.projectInfo.npm.packageJson.private === true) {
|
if(
|
||||||
logger.log('warn', `refusing to mirror due to private property`);
|
configObject.projectInfo.npm.packageJson.private === true ||
|
||||||
|
configObject.npmAccessLevel === 'private'
|
||||||
|
) {
|
||||||
|
logger.log('warn', `refusing to mirror due to private property use a private mirror location instead`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (githubToken) {
|
if (githubToken) {
|
||||||
|
Loading…
Reference in New Issue
Block a user