@@ -15,23 +15,21 @@ import { Spinner } from '@socketsecurity/registry/lib/spinner'
15
15
import { kCtorArgs , kRiskyReify } from './index'
16
16
import { walk } from './walk'
17
17
import constants from '../../../../constants'
18
- import { uxLookup } from '../../../../utils/alert/rules'
19
18
import {
20
19
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'
24
24
import { ColorOrMarkdown } from '../../../../utils/color-or-markdown'
25
25
import { debugLog } from '../../../../utils/debug'
26
26
import { getSocketDevPackageOverviewUrl } from '../../../../utils/socket-url'
27
27
import { pacotePath } from '../../../npm-paths'
28
28
import { Edge , SafeEdge } from '../edge'
29
29
30
30
import 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'
35
33
import type { SafeNode } from '../node'
36
34
import type { Writable } from 'node:stream'
37
35
@@ -151,7 +149,7 @@ async function getPackagesAlerts(
151
149
displayWarning = true
152
150
}
153
151
if ( ux . block || ux . display ) {
154
- const isFixable = isAlertFixable ( alert )
152
+ const isFixable = isArtifactAlertFixable ( alert )
155
153
if ( ! fixable || isFixable ) {
156
154
alerts . push ( {
157
155
name,
@@ -171,7 +169,7 @@ async function getPackagesAlerts(
171
169
p . existing ?. startsWith ( `${ name } @` )
172
170
) ?. existing
173
171
if ( existing ) {
174
- const oldArtifact : SocketScanArtifact | undefined =
172
+ const oldArtifact : SocketArtifact | undefined =
175
173
// eslint-disable-next-line no-await-in-loop
176
174
( await batchScan ( [ existing ] ) . next ( ) ) . value
177
175
if ( oldArtifact ?. alerts ?. length ) {
@@ -254,7 +252,7 @@ function getTranslations() {
254
252
function packageAlertsToReport ( alerts : SocketPackageAlert [ ] ) {
255
253
let report : { [ dependency : string ] : AuditAdvisory [ ] } | null = null
256
254
for ( const alert of alerts ) {
257
- if ( ! isAlertFixableCve ( alert . raw ) ) {
255
+ if ( ! isArtifactAlertCveFixable ( alert . raw ) ) {
258
256
continue
259
257
}
260
258
const { name } = alert
0 commit comments