@@ -12,8 +12,8 @@ import {
1212import { confirm } from '@socketsecurity/registry/lib/prompts'
1313import { Spinner } from '@socketsecurity/registry/lib/spinner'
1414
15- import { kCtorArgs , kRiskyReify } from './index'
1615import { getPackagesToQueryFromDiff } from './diff'
16+ import { kCtorArgs , kRiskyReify } from './index'
1717import constants from '../../../../constants'
1818import {
1919 batchScan ,
@@ -27,8 +27,8 @@ import { getSocketDevPackageOverviewUrl } from '../../../../utils/socket-url'
2727import { pacotePath } from '../../../npm-paths'
2828import { Edge , SafeEdge } from '../edge'
2929
30+ import type { PackageDetail } from './diff'
3031import type { ArboristClass , AuditAdvisory , SafeArborist } from './index'
31- import type { InstallEffect } from './walk'
3232import type { SocketArtifact } from '../../../../utils/alert/artifact'
3333import type { SafeNode } from '../node'
3434import type { Writable } from 'node:stream'
@@ -107,10 +107,10 @@ type GetPackageAlertsOptions = {
107107
108108async function getPackagesAlerts (
109109 safeArb : SafeArborist ,
110- pkgs : InstallEffect [ ] ,
110+ details : PackageDetail [ ] ,
111111 options ?: GetPackageAlertsOptions
112112) : Promise < SocketPackageAlert [ ] > {
113- let { length : remaining } = pkgs
113+ let { length : remaining } = details
114114 const packageAlerts : SocketPackageAlert [ ] = [ ]
115115 if ( ! remaining ) {
116116 return packageAlerts
@@ -125,7 +125,7 @@ async function getPackagesAlerts(
125125 : ( ) => ''
126126 spinner ?. start ( getText ( ) )
127127 try {
128- for await ( const artifact of batchScan ( pkgs . map ( p => p . pkgid ) ) ) {
128+ for await ( const artifact of batchScan ( details . map ( d => d . pkgid ) ) ) {
129129 if ( ! artifact . name || ! artifact . version || ! artifact . alerts ?. length ) {
130130 continue
131131 }
@@ -371,10 +371,7 @@ export async function reify(
371371 ...args : Parameters < InstanceType < ArboristClass > [ 'reify' ] >
372372) : Promise < SafeNode > {
373373 const needInfoOn = getPackagesToQueryFromDiff ( this . diff )
374- if (
375- ! needInfoOn . length ||
376- needInfoOn . findIndex ( c => c . repository_url === NPM_REGISTRY_URL ) === - 1
377- ) {
374+ if ( ! needInfoOn . length ) {
378375 // Nothing to check, hmmm already installed or all private?
379376 return await this [ kRiskyReify ] ( ...args )
380377 }
0 commit comments