"Fossies" - the Fresh Open Source Software Archive 
Member "cli-1.1259.0/packages/snyk-fix/src/lib/output-formatters/format-unresolved-item.ts" (30 Nov 2023, 627 Bytes) of package /linux/misc/snyk-cli-1.1259.0.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 import * as chalk from 'chalk';
2
3 import { EntityToFix } from '../../types';
4 import { formatDisplayName } from './format-display-name';
5 import { PADDING_SPACE } from './show-results-summary';
6
7 export function formatUnresolved(
8 entity: EntityToFix,
9 userMessage: string,
10 tip?: string,
11 ): string {
12 const name = formatDisplayName(
13 entity.workspace.path,
14 entity.scanResult.identity,
15 );
16 const tipMessage = tip ? `\n${PADDING_SPACE}Tip: ${tip}` : '';
17 const errorMessage = `${PADDING_SPACE}${name}\n${PADDING_SPACE}${chalk.red(
18 '✖',
19 )} ${chalk.red(userMessage)}`;
20 return errorMessage + tipMessage;
21 }