function $32ea97b83cf5d752$export$f09e6d5146bb6da1(fs, packageManager, modules, filePath, projectRoot, options) {
    modules = modules.map((request)=>({
            name: $kXqrB.default(request.name),
            range: request.range
        })
    ); // Wrap PromiseQueue and track modules that are currently installing.
    // If a request comes in for a module that is currently installing, don't bother
    // enqueuing it.
    let modulesToInstall = modules.filter((m)=>!$32ea97b83cf5d752$var$modulesInstalling.has($32ea97b83cf5d752$var$getModuleRequestKey(m))
    );
    if (modulesToInstall.length) {
        for (let m1 of modulesToInstall)$32ea97b83cf5d752$var$modulesInstalling.add($32ea97b83cf5d752$var$getModuleRequestKey(m1));
        $32ea97b83cf5d752$var$queue.add(()=>$32ea97b83cf5d752$var$install(fs, packageManager, modulesToInstall, filePath, projectRoot, options).then(()=>{
                for (let m of modulesToInstall)$32ea97b83cf5d752$var$modulesInstalling.delete($32ea97b83cf5d752$var$getModuleRequestKey(m));
            })
        ).then(()=>{
        }, ()=>{
        });
    }
    return $32ea97b83cf5d752$var$queue.run();
}
// Exported so that it may be invoked from the worker api below.
Exported so that it may be invoked from the worker api below.
Exported so that it may be invoked from the worker api below .
function $32ea97b83cf5d752$export$f09e6d5146bb6da1(fs, packageManager, modules, filePath, projectRoot, options) {
    modules = modules.map((request)=>({
            name: $kXqrB.default(request.name),
            range: request.range
        })
    ); 
    let modulesToInstall = modules.filter((m)=>!$32ea97b83cf5d752$var$modulesInstalling.has($32ea97b83cf5d752$var$getModuleRequestKey(m))
    );
    if (modulesToInstall.length) {
        for (let m1 of modulesToInstall)$32ea97b83cf5d752$var$modulesInstalling.add($32ea97b83cf5d752$var$getModuleRequestKey(m1));
        $32ea97b83cf5d752$var$queue.add(()=>$32ea97b83cf5d752$var$install(fs, packageManager, modulesToInstall, filePath, projectRoot, options).then(()=>{
                for (let m of modulesToInstall)$32ea97b83cf5d752$var$modulesInstalling.delete($32ea97b83cf5d752$var$getModuleRequestKey(m));
            })
        ).then(()=>{
        }, ()=>{
        });
    }
    return $32ea97b83cf5d752$var$queue.run();
}
function $32ea97b83cf5d752$export$f09e6d5146bb6da1 ( fs , packageManager , modules , filePath , projectRoot , options ) { modules = modules . map ( ( request ) => ( { name : $kXqrB . default ( request . name ) , range : request . range } ) ) ; let modulesToInstall = modules . filter ( ( m ) => ! $32ea97b83cf5d752$var$modulesInstalling . has ( $32ea97b83cf5d752$var$getModuleRequestKey ( m ) ) ) ; if ( modulesToInstall . length ) { for ( let m1 of modulesToInstall ) $32ea97b83cf5d752$var$modulesInstalling . add ( $32ea97b83cf5d752$var$getModuleRequestKey ( m1 ) ) ; $32ea97b83cf5d752$var$queue . add ( ( ) => $32ea97b83cf5d752$var$install ( fs , packageManager , modulesToInstall , filePath , projectRoot , options ) . then ( ( ) => { for ( let m of modulesToInstall ) $32ea97b83cf5d752$var$modulesInstalling . delete ( $32ea97b83cf5d752$var$getModuleRequestKey ( m ) ) ; } ) ) . then ( ( ) => { } , ( ) => { } ) ; } return $32ea97b83cf5d752$var$queue . run ( ) ; }
Exported so that it may be invoked from the worker api below.
Exported so that it may be invoked from the worker api below .
// Wrap PromiseQueue and track modules that are currently installing. // If a request comes in for a module that is currently installing, don't bother // enqueuing it.