How to use the colors/safe.cyan function in colors

To help you get started, we’ve selected a few colors examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zapier / zapier-platform-cli / src / utils / misc.js View on Github external
fileExistsSync(
          path.resolve(`./node_modules/${PLATFORM_PACKAGE}/package.json`)
        )
      ) {
        // double check they have the right version installed
        const installedPkgVersion = require(path.resolve(
          `./node_modules/${PLATFORM_PACKAGE}/package.json`
        )).version;

        if (requiredVersion !== installedPkgVersion) {
          versions.push(
            `${colors.yellow('\nWarning!')} Required version (${colors.green(
              requiredVersion
            )}) and installed version (${colors.green(
              installedPkgVersion
            )}) are out of sync. Run ${colors.cyan('`npm install`')} to fix.\n`
          );
        }
      }
    }
  }

  context.line(versions.join('\n'));
};
github postmanlabs / newman / lib / reporters / cli / index.js View on Github external
!reporterOptions.noAssertions && emitter.on('assertion', function (err, o) {
        var passed = !err;

        // handle skipped test display
        if (o.skipped && !reporterOptions.noSuccessAssertions) {
            print.lf('%s %s', colors.cyan('  - '), colors.cyan('[skipped] ' + o.assertion));
            return;
        }

        if (passed && reporterOptions.noSuccessAssertions) {
            return;
        }

        // print each test assertions
        print.lf('%s %s', passed ? colors.green(`  ${symbols.ok} `) :
            colors.red.bold(pad(this.summary.run.failures.length, 3, SPC) + symbols.dot), passed ?
            colors.gray(o.assertion) : colors.red.bold(o.assertion));
    });
github simplecrawler / simplecrawler / example / phantom-example / index.js View on Github external
function getLinks(phantom, url, callback) {
    console.log(colors.green("Phantom attempting to load ") + colors.cyan("%s"), url);

    makePage(phantom, url, function(page, status) {
        console.log(
            colors.green("Phantom opened URL with %s — ") + colors.cyan("%s"), status, url);

        page.evaluate(findPageLinks, function(result) {
            result.forEach(function(url) {
                crawler.queueURL(url);
            });
            callback();
        });
    });
}
github yoksel / shadowPainter / gulpfile.js View on Github external
var processors = [
    autoprefixer({browsers: [
      'last 1 version',
      'last 2 Chrome versions',
      'last 2 Firefox versions',
      'last 2 Opera versions',
      'last 2 Edge versions'
    ]}),
    mqpacker()
  ];

  console.log('⬤  Run ' + colors.yellow('Sass') +
              ' + ' +
              colors.green('Autoprefixer') +
              ' + ' +
              colors.cyan('Cssnano') + ' ⬤'
  );

  return gulp.src('src/scss/styles.scss')
    .pipe(sass().on('error', sass.logError))
    .pipe(postcss(processors))
    .pipe(gulp.dest('./assets/css'))
    .pipe(sync.stream())
    .pipe(postcss([cssnano()]))
    .pipe(rename('styles.min.css'))
    .pipe(gulp.dest('assets/css'));
});
github google / WebFundamentals / tools / exporttrans.js View on Github external
zip.addLocalFile(filename);
    countFilesToTranslate++;
  });
  zip.writeZip(commander.output);

  if (commander.keep !== true) {
    rimraf(commander.temp, function(err) {
      if (err) {
        console.log(colors.red('Error: Unable to remove temporary directory.'));
      }
    });
  }

  console.log('Files inspected:    ', countAllFiles);
  console.log('Files to translate: ', colors.green(countFilesToTranslate));
  console.log('ZIP file created:   ', colors.cyan(commander.output));
}
github bkimminich / juice-shop / lib / utils.js View on Github external
challenge.save().then(solvedChallenge => {
    solvedChallenge.description = entities.decode(sanitizeHtml(solvedChallenge.description, {
      allowedTags: [],
      allowedAttributes: []
    }))
    logger.info(colors.green('Solved') + ' challenge ' + colors.cyan(solvedChallenge.name) + ' (' + solvedChallenge.description + ')')
    self.sendNotification(solvedChallenge, isRestore)
  })
}
github aws / jsii / packages / jsii / lib / assembler.ts View on Github external
private async _visitMethod(symbol: ts.Symbol, type: spec.ClassType | spec.InterfaceType, ctx: EmitContext) {
    if (LOG.isTraceEnabled()) {
      LOG.trace(`Processing method: ${colors.green(type.fqn)}#${colors.cyan(symbol.name)}`);
    }

    const declaration = symbol.valueDeclaration as (ts.MethodDeclaration | ts.MethodSignature);
    const signature = this._typeChecker.getSignatureFromDeclaration(declaration);
    if (!signature) {
      this._diagnostic(declaration, ts.DiagnosticCategory.Error, `Unable to compute signature for ${type.fqn}#${symbol.name}`);
      return;
    }
    if (isProhibitedMemberName(symbol.name)) {
      this._diagnostic(declaration, ts.DiagnosticCategory.Error, `Prohibited member name: ${symbol.name}`);
      return;
    }
    this._warnAboutReservedWords(symbol);

    const parameters = await Promise.all(signature.getParameters().map(p => this._toParameter(p, ctx)));
github s-a / time-track / lib / default-reporter.js View on Github external
var time = new tt.Moment("00:00:00", "HH:mm:ss").add(result, "seconds");
	var color = colors.green;

	if (result >= restSecondsToWorkThisDay){
		color = colors.cyan;
		if (restSecondsToWorkThisDay > 0 && result > 0){
			tt.log(color("Time elapsed:"), color(date), color("-"), color(time.format("HH:mm:ss")), color("You are done for this day ;O)"));
		} else {
			tt.log(color("Time elapsed:"), color(date), color("-"), color(time.format("HH:mm:ss")));
		}
	} else {
		var canWorkUntil = new tt.Moment(date + " " + tt.time.toString(), "DD.MM.YYYY HH:mm:ss").add(restSecondsToWorkThisDay - result, "seconds");
		tt.log(colors.bold.yellow("Elapsed time on " + date + ": ") + colors.cyan(time.format("HH:mm:ss")));
		tt.log(colors.bold.yellow("Expected end-time:          ") + colors.cyan(canWorkUntil.format("dddd, MMMM Do YYYY, HH:mm:ss")));
	}


	return result;
};