Ejemplo n.º 1
0
 exec('npm run lint', (err, stdout) => {
   ui.writeLine(stdout);
   if (err) {
     ui.writeLine(chalk.red('Lint errors found in the listed files.'));
   } else {
     ui.writeLine(chalk.green('All files pass linting.'));
   }
   resolve();
 });
Ejemplo n.º 2
0
 return replace(this.config).then(changedFiles => {
   if (changedFiles.length > 0) {
     console.log();
     console.log(chalk.green(changedFiles.length, 'file(s) were changed'));
     changedFiles.forEach(file => console.log(chalk.grey('-', file)));
   } else {
     console.log(chalk.yellow('No files were changed'));
   }
 });
Ejemplo n.º 3
0
   (err: NodeJS.ErrnoException, _stdout: string, stderr: string) => {
   if (err) {
     ui.writeLine(stderr);
     ui.writeLine(chalk.red('Package install failed, see above.'));
     reject();
   } else {
     ui.writeLine(chalk.green(`Installed packages for tooling via ${packageManager}.`));
     resolve();
   }
 });
  .then((token: string) => {
    // get the aad token
    aadToken = token;
    console.log(chalk.green('.. obtained AAD access token.'));

    // use aad token to request parter center token
    console.log(chalk.white('Obtaining Partner Center token..'));
    let pcAuth: PartnerCenterAuth = new PartnerCenterAuth();
    return pcAuth.login(aadToken);
  })
Ejemplo n.º 5
0
   .on('close', (code: number) => {
     if (code === 0) {
       ui.writeLine(chalk.green(`Installed packages for tooling via ${packageManager}.`));
       resolve();
     } else {
       const message = 'Package install failed, see above.';
       ui.writeLine(chalk.red(message));
       reject(message);
     }
 });
Ejemplo n.º 6
0
export async function setupCommand() {
  await createConfiguration()
  console.log(
    chalk.green(
      `Created configuration file ${chalk.cyan(
        'text-run.yml'
      )} with default values`
    )
  )
}
Ejemplo n.º 7
0
 exec(`npm run e2e -- ${this.project.ngConfig.e2e.protractor.config}`, (err, stdout, stderr) => {
   ui.writeLine(stdout);
   if (err) {
     ui.writeLine(stderr);
     ui.writeLine(chalk.red('Some end-to-end tests failed, see above.'));
   } else {
     ui.writeLine(chalk.green('All end-to-end tests pass.'));
   }
   resolve();
 });
Ejemplo n.º 8
0
 .then((story: IStory) => {
   const id = story.id;
   const storySlug = slug(story.name).toLowerCase();
   const gitCmd = `git checkout -b ${story.story_type}/ch${id}/${storySlug}`;
   console.info(Chalk.green(`Successfully created a story with id ${id}`));
   console.info("You can view your story at " + link(`https://app.clubhouse.io/story/${id}`));
   console.info("To start working on this story (copied to clipboard): " + Chalk.bold(gitCmd));
   writeSync(gitCmd);
   return story;
 })
Ejemplo n.º 9
0
 stop(msg: string = chalk.green(figures.tick) as any) {
   const task = this.task
   if (!task) {
     return
   }
   this.status = msg
   this._stop()
   task.active = false
   delete this.task
 }
Ejemplo n.º 10
0
 mongoose.connect(nconf.get("db"), (err) => {
     if (err) {
         console.error(chalk.red("MongoDB connection crushed!"));
         console.log(err);
         reject(err)
     } else {
         console.log(chalk.green("Connected to MongoDB..."));
         resolve()
     }
 });