mirror of
https://github.com/harish2704/npm-offline-registry.git
synced 2026-09-10 06:21:09 +00:00
Not tabs please
This commit is contained in:
@@ -37,12 +37,12 @@ app.get( '/:package', function( req, res, next ){
|
|||||||
return fileExists( cacheFile )
|
return fileExists( cacheFile )
|
||||||
.tap( function( isExists ){
|
.tap( function( isExists ){
|
||||||
if( !isExists ){
|
if( !isExists ){
|
||||||
if ( ENABLE_NPM_FAILOVER ) {
|
if ( ENABLE_NPM_FAILOVER ) {
|
||||||
res._log.cacheHit = '---';
|
res._log.cacheHit = '---';
|
||||||
return fetchAndCacheMetadata( packageName, cacheFile );
|
return fetchAndCacheMetadata( packageName, cacheFile );
|
||||||
} else {
|
} else {
|
||||||
return res.status( 404 ).json( {} );
|
return res.status( 404 ).json( {} );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then( function( ){
|
.then( function( ){
|
||||||
@@ -65,12 +65,12 @@ app.get( '/:package/-/:tarball', function( req, res, next ){
|
|||||||
fileExists( packagePath )
|
fileExists( packagePath )
|
||||||
.tap( function( isExists ){
|
.tap( function( isExists ){
|
||||||
if( !isExists ){
|
if( !isExists ){
|
||||||
if ( ENABLE_NPM_FAILOVER ) {
|
if ( ENABLE_NPM_FAILOVER ) {
|
||||||
res._log.cacheHit = '---';
|
res._log.cacheHit = '---';
|
||||||
return fetchAndCacheTarball( packageName, version, packagePath );
|
return fetchAndCacheTarball( packageName, version, packagePath );
|
||||||
} else {
|
} else {
|
||||||
return res.status( 404 ).json( {} );
|
return res.status( 404 ).json( {} );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then( function(){
|
.then( function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user