"Fossies" - the Fresh Open Source Software Archive

Member "cli-1.1280.1/src/lib/formatters/iac-output/text/share-results.ts" (20 Feb 2024, 1281 Bytes) of package /linux/misc/snyk-cli-1.1280.1.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 config from '../../../config';
    2 import { EOL } from 'os';
    3 import { colors, contentPadding } from './utils';
    4 
    5 export function formatShareResultsOutput(orgName: string, projectName: string) {
    6   return (
    7     colors.title('Report Complete') +
    8     EOL +
    9     EOL +
   10     contentPadding +
   11     'Your test results are available at: ' +
   12     colors.title(`${config.ROOT}/org/${orgName}/projects`) +
   13     EOL +
   14     contentPadding +
   15     'under the name: ' +
   16     colors.title(projectName)
   17   );
   18 }
   19 
   20 export function formatShareResultsOutputV2(
   21   orgName: string,
   22   projectName: string,
   23 ) {
   24   return (
   25     colors.title('Report Complete') +
   26     EOL +
   27     EOL +
   28     contentPadding +
   29     'Your test results are available at: ' +
   30     colors.title(
   31       `${
   32         config.ROOT
   33       }/org/${orgName}/cloud/issues?environment_name=${encodeURIComponent(
   34         projectName,
   35       )}`,
   36     )
   37   );
   38 }
   39 
   40 export const shareResultsTip =
   41   colors.title('Tip') +
   42   EOL +
   43   EOL +
   44   contentPadding +
   45   'New: Share your test results in the Snyk Web UI with the option ' +
   46   colors.title('--report');
   47 
   48 export const shareCustomRulesDisclaimer =
   49   contentPadding +
   50   colors.suggestion(
   51     'Please note that your custom rules will not be sent to the platform, and will not be available on the projects page.',
   52   );