File tree Expand file tree Collapse file tree 3 files changed +8
-17
lines changed
Expand file tree Collapse file tree 3 files changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ async function execGradleWithSpinner(
113113 logger . info (
114114 '(It will show no output, you can use --verbose to see its output)' ,
115115 )
116- spinner . start ( `Running gradlew` )
116+ spinner . start ( `Running gradlew... ` )
117117
118118 const output = await spawn ( bin , commandArgs , {
119119 // We can pipe the output through to have the user see the result
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { logger } from '@socketsecurity/registry/lib/logger'
55import { extractPurlsFromPnpmLockfile } from './pnpm.mts'
66import { getPublicToken , setupSdk } from './sdk.mts'
77import { addArtifactToAlertsMap } from './socket-package-alert.mts'
8- import constants from '../constants.mts'
98
109import type { CompactSocketArtifact } from './alert/artifact.mts'
1110import type {
@@ -121,8 +120,7 @@ export async function getAlertsMapFromPurls(
121120 `Socket API server error (${ statusCode } ): ${ statusMessage } ` ,
122121 )
123122 } else {
124- const { spinner } = constants
125- spinner . stop ( )
123+ spinner ?. stop ( )
126124 debugFn ( 'Received a result=false:' , batchResult )
127125 logger . fail (
128126 `Received a ${ batchResult . status } response from Socket API which we consider a permanent failure:` ,
@@ -132,9 +130,8 @@ export async function getAlertsMapFromPurls(
132130 break
133131 }
134132 remaining -= 1
135- if ( spinner && remaining > 0 ) {
136- spinner . start ( )
137- spinner . setText ( getText ( ) )
133+ if ( remaining > 0 ) {
134+ spinner ?. start ( getText ( ) )
138135 }
139136 }
140137
Original file line number Diff line number Diff line change @@ -199,31 +199,25 @@ export async function queryApiSafeText(
199199 }
200200 }
201201
202- if ( fetchSpinnerDesc ) {
203- // Lazily access constants.spinner.
204- const { spinner } = constants
202+ // Lazily access constants.spinner.
203+ const { spinner } = constants
205204
205+ if ( fetchSpinnerDesc ) {
206206 spinner . start ( `Requesting ${ fetchSpinnerDesc } from API...` )
207207 }
208208
209209 let result
210210 try {
211211 result = await queryApi ( path , apiToken )
212212 if ( fetchSpinnerDesc ) {
213- // Lazily access constants.spinner.
214- const { spinner } = constants
215-
216213 spinner . successAndStop (
217214 `Received API response (after requesting ${ fetchSpinnerDesc } ).` ,
218215 )
219216 }
220217 } catch ( e ) {
221218 if ( fetchSpinnerDesc ) {
222- // Lazily access constants.spinner.
223- const { spinner } = constants
224-
225219 spinner . failAndStop (
226- `An error was thrown while requesting ${ fetchSpinnerDesc } ` ,
220+ `An error was thrown while requesting ${ fetchSpinnerDesc } . ` ,
227221 )
228222 }
229223
You can’t perform that action at this time.
0 commit comments