File tree Expand file tree Collapse file tree 7 files changed +12
-12
lines changed Expand file tree Collapse file tree 7 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { messageWithCauses, stackWithCauses } from 'pony-cause'
8
8
import updateNotifier from 'tiny-updater'
9
9
10
10
import * as cliCommands from './commands'
11
- import { logSymbols } from './utils/chalk -markdown'
11
+ import { logSymbols } from './utils/color-or -markdown'
12
12
import { AuthError , InputError } from './utils/errors'
13
13
import { meowWithSubcommands } from './utils/meow-with-subcommands'
14
14
Original file line number Diff line number Diff line change 7
7
handleApiCall ,
8
8
handleUnsuccessfulApiResponse
9
9
} from '../utils/api-helpers'
10
- import { ChalkOrMarkdown } from '../utils/chalk -markdown'
10
+ import { ColorOrMarkdown } from '../utils/color-or -markdown'
11
11
import { InputError } from '../utils/errors'
12
12
import { formatSeverityCount , getSeverityCount } from '../utils/format-issues'
13
13
import { printFlagList } from '../utils/formatting'
@@ -210,7 +210,7 @@ function formatPackageDataOutput(
210
210
spinner . succeed ( 'Package has no issues' )
211
211
}
212
212
213
- const format = new ChalkOrMarkdown ( ! ! outputMarkdown )
213
+ const format = new ColorOrMarkdown ( ! ! outputMarkdown )
214
214
const url = `https://socket.dev/npm/package/${ pkgName } /overview/${ pkgVersion } `
215
215
if ( pkgVersion === 'latest' ) {
216
216
console . log (
@@ -272,7 +272,7 @@ function formatPackageIssuesDetails(
272
272
{ }
273
273
)
274
274
275
- const format = new ChalkOrMarkdown ( ! ! outputMarkdown )
275
+ const format = new ColorOrMarkdown ( ! ! outputMarkdown )
276
276
for ( const issue of Object . keys ( uniqueIssues ) ) {
277
277
const issueWithLink = format . hyperlink (
278
278
`${ uniqueIssues [ issue ] ?. label } ` ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import {
13
13
handleApiCall ,
14
14
handleUnsuccessfulApiResponse
15
15
} from '../../utils/api-helpers'
16
- import { ChalkOrMarkdown , logSymbols } from '../../utils/chalk -markdown'
16
+ import { ColorOrMarkdown , logSymbols } from '../../utils/color-or -markdown'
17
17
import { InputError } from '../../utils/errors'
18
18
import { printFlagList } from '../../utils/formatting'
19
19
import { createDebugLogger } from '../../utils/misc'
@@ -290,7 +290,7 @@ function formatReportCreationOutput(
290
290
return
291
291
}
292
292
293
- const format = new ChalkOrMarkdown ( ! ! outputMarkdown )
293
+ const format = new ColorOrMarkdown ( ! ! outputMarkdown )
294
294
295
295
console . log (
296
296
'\nNew report: ' +
Original file line number Diff line number Diff line change 8
8
handleApiCall ,
9
9
handleUnsuccessfulApiResponse
10
10
} from '../../utils/api-helpers'
11
- import { ChalkOrMarkdown } from '../../utils/chalk -markdown'
11
+ import { ColorOrMarkdown } from '../../utils/color-or -markdown'
12
12
import { InputError } from '../../utils/errors'
13
13
import {
14
14
formatSeverityCount ,
@@ -187,7 +187,7 @@ export function formatReportDataOutput(
187
187
if ( outputJson ) {
188
188
console . log ( JSON . stringify ( data , undefined , 2 ) )
189
189
} else {
190
- const format = new ChalkOrMarkdown ( ! ! outputMarkdown )
190
+ const format = new ColorOrMarkdown ( ! ! outputMarkdown )
191
191
console . log (
192
192
'\nDetailed info on socket.dev: ' +
193
193
format . hyperlink ( reportId , data . url , { fallbackToUrl : true } )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import { isObject } from '@socketsecurity/registry/lib/objects'
17
17
18
18
import { createTTYServer } from './tty-server'
19
19
import { API_V0_URL , ENV } from '../constants'
20
- import { ChalkOrMarkdown } from '../utils/chalk -markdown'
20
+ import { ColorOrMarkdown } from '../utils/color-or -markdown'
21
21
import { createIssueUXLookup } from '../utils/issue-rules'
22
22
import { isErrnoException } from '../utils/misc'
23
23
import { findRoot } from '../utils/path-resolve'
@@ -266,7 +266,7 @@ const OverrideSet: OverrideSetClass = require(arboristOverrideSetClassPatch)
266
266
const kCtorArgs = Symbol ( 'ctorArgs' )
267
267
const kRiskyReify = Symbol ( 'riskyReify' )
268
268
269
- const formatter = new ChalkOrMarkdown ( false )
269
+ const formatter = new ColorOrMarkdown ( false )
270
270
const pubToken = getDefaultKey ( ) ?? FREE_API_KEY
271
271
272
272
type IssueUXLookup = ReturnType < typeof createIssueUXLookup >
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ const markdownLogSymbols = {
33
33
warning : ':warning:'
34
34
}
35
35
36
- export class ChalkOrMarkdown {
36
+ export class ColorOrMarkdown {
37
37
public useMarkdown : boolean
38
38
39
39
constructor ( useMarkdown : boolean ) {
Original file line number Diff line number Diff line change 1
- import { logSymbols } from './chalk -markdown'
1
+ import { logSymbols } from './color-or -markdown'
2
2
3
3
export function createDebugLogger (
4
4
printDebugLogs ?: boolean
You can’t perform that action at this time.
0 commit comments