"Fossies" - the Fresh Open Source Software Archive

Member "angular-cli-15.2.4/tests/legacy-cli/e2e/initialize/300-log-environment.ts" (16 Mar 2023, 550 Bytes) of package /linux/www/angular-cli-15.2.4.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 { exec, ng } from '../utils/process';
    2 
    3 export default async function () {
    4   console.log('Environment:');
    5 
    6   Object.keys(process.env).forEach((envName) => {
    7     // CI Logs should not contain environment variables that are considered secret
    8     const lowerName = envName.toLowerCase();
    9     if (lowerName.includes('key') || lowerName.includes('secret')) {
   10       return;
   11     }
   12 
   13     console.log(`  ${envName}: ${process.env[envName]!.replace(/[\n\r]+/g, '\n        ')}`);
   14   });
   15 
   16   await exec('which', 'ng', 'yarn', 'npm');
   17   await ng('version');
   18 }