@@ -15,23 +15,21 @@ import { Spinner } from '@socketsecurity/registry/lib/spinner'
1515import { kCtorArgs , kRiskyReify } from './index'
1616import { walk } from './walk'
1717import constants from '../../../../constants'
18- import { uxLookup } from '../../../../utils/alert/rules'
1918import {
2019 batchScan ,
21- isAlertFixable ,
22- isAlertFixableCve
23- } from '../../../../utils/alert/scan'
20+ isArtifactAlertCveFixable ,
21+ isArtifactAlertFixable
22+ } from '../../../../utils/alert/artifact'
23+ import { uxLookup } from '../../../../utils/alert/rules'
2424import { ColorOrMarkdown } from '../../../../utils/color-or-markdown'
2525import { debugLog } from '../../../../utils/debug'
2626import { getSocketDevPackageOverviewUrl } from '../../../../utils/socket-url'
2727import { pacotePath } from '../../../npm-paths'
2828import { Edge , SafeEdge } from '../edge'
2929
3030import type { ArboristClass , AuditAdvisory , SafeArborist } from './index'
31- import type {
32- InstallEffect ,
33- SocketScanArtifact
34- } from '../../../../utils/alert/scan'
31+ import type { InstallEffect } from './walk'
32+ import type { SocketArtifact } from '../../../../utils/alert/artifact'
3533import type { SafeNode } from '../node'
3634import type { Writable } from 'node:stream'
3735
@@ -151,7 +149,7 @@ async function getPackagesAlerts(
151149 displayWarning = true
152150 }
153151 if ( ux . block || ux . display ) {
154- const isFixable = isAlertFixable ( alert )
152+ const isFixable = isArtifactAlertFixable ( alert )
155153 if ( ! fixable || isFixable ) {
156154 alerts . push ( {
157155 name,
@@ -171,7 +169,7 @@ async function getPackagesAlerts(
171169 p . existing ?. startsWith ( `${ name } @` )
172170 ) ?. existing
173171 if ( existing ) {
174- const oldArtifact : SocketScanArtifact | undefined =
172+ const oldArtifact : SocketArtifact | undefined =
175173 // eslint-disable-next-line no-await-in-loop
176174 ( await batchScan ( [ existing ] ) . next ( ) ) . value
177175 if ( oldArtifact ?. alerts ?. length ) {
@@ -254,7 +252,7 @@ function getTranslations() {
254252function packageAlertsToReport ( alerts : SocketPackageAlert [ ] ) {
255253 let report : { [ dependency : string ] : AuditAdvisory [ ] } | null = null
256254 for ( const alert of alerts ) {
257- if ( ! isAlertFixableCve ( alert . raw ) ) {
255+ if ( ! isArtifactAlertCveFixable ( alert . raw ) ) {
258256 continue
259257 }
260258 const { name } = alert
0 commit comments