<commit_before>import { Location } from '@angular/common';
import { Injectable } from '@angular/core';
import { Headers, Http, RequestOptions, RequestOptionsArgs, Response } from '@angular/http';
import { AuthenticationService } from 'ngx-login-client';

import { Observable, Observer } from 'rxjs/Rx';

import { ApiLocatorService } from '../../../shared/api-locator.service';

import { ILoggerDelegate, LoggerFactory } from '../../common/logger';
import { formatJson, clone } from '../../common/utilities';


import {
  ForgeCommands,
  ForgeService,
  IForgeCommand,
  IForgeCommandData,
  IForgeCommandPipeline,
  IForgeCommandRequest,
  IForgeCommandResponse,
  IForgeInput,
  IForgeState
} from '../contracts/forge-service';

class CommandPipelineStep {
  public static begin = 'begin';
  public static next = 'next';
  public static validate = 'validate';
  public static execute = 'execute';
}

@Injectable()
export class Fabric8ForgeService extends ForgeService {

  static instanceCount: number = 1;

  private _apiUrl: string;

  executeCommand(request: IForgeCommandRequest = {
      payload: {
        command: {
          name: 'empty'
        }
      }
    }): Observable<IForgeCommandResponse> {
    let command = request.payload.command;
    // map the forge command system name into the parameters
    switch ( command.name ) {
      case ForgeCommands.forgeStarter: {
        command.parameters.pipeline.name = 'obsidian-new-project';
        return this.forgeHttpCommandRequest(request);
      }
      case ForgeCommands.forgeQuickStart: {
        command.parameters.pipeline.name = 'obsidian-new-quickstart';
        return this.forgeHttpCommandRequest(request);
      }
      case ForgeCommands.forgeImportGit: {
        command.parameters.pipeline.name = 'fabric8-import-git';
        return this.forgeHttpCommandRequest(request);
      }
      default: {
        return Observable.empty();
      }
    }
  }<commit_msg>fix(quickstarts): switch to upstream fabric8 quickstarts<commit_after>import { Location } from '@angular/common';
import { Injectable } from '@angular/core';
import { Headers, Http, RequestOptions, RequestOptionsArgs, Response } from '@angular/http';
import { AuthenticationService } from 'ngx-login-client';

import { Observable, Observer } from 'rxjs/Rx';

import { ApiLocatorService } from '../../../shared/api-locator.service';

import { ILoggerDelegate, LoggerFactory } from '../../common/logger';
import { formatJson, clone } from '../../common/utilities';


import {
  ForgeCommands,
  ForgeService,
  IForgeCommand,
  IForgeCommandData,
  IForgeCommandPipeline,
  IForgeCommandRequest,
  IForgeCommandResponse,
  IForgeInput,
  IForgeState
} from '../contracts/forge-service';

class CommandPipelineStep {
  public static begin = 'begin';
  public static next = 'next';
  public static validate = 'validate';
  public static execute = 'execute';
}

@Injectable()
export class Fabric8ForgeService extends ForgeService {

  static instanceCount: number = 1;

  private _apiUrl: string;

  executeCommand(request: IForgeCommandRequest = {
      payload: {
        command: {
          name: 'empty'
        }
      }
    }): Observable<IForgeCommandResponse> {
    let command = request.payload.command;
    // map the forge command system name into the parameters
    switch ( command.name ) {
      case ForgeCommands.forgeStarter: {
        // TODO when laucnpad is integrated into the back end the command
        // will change to:
        //command.parameters.pipeline.name = 'launchpad-new-starer-project';
        command.parameters.pipeline.name = 'obsidian-new-project';
        return this.forgeHttpCommandRequest(request);
      }
      case ForgeCommands.forgeQuickStart: {
        // TODO when laucnpad is integrated into the back end the command
        // will change to:
        //command.parameters.pipeline.name = 'launchpad-new-project';
        command.parameters.pipeline.name = 'fabric8-new-quickstart';
        return this.forgeHttpCommandRequest(request);
      }
      case ForgeCommands.forgeImportGit: {
        command.parameters.pipeline.name = 'fabric8-import-git';
        return this.forgeHttpCommandRequest(request);
      }
      default: {
        return Observable.empty();
      }
    }
  }
{'fraction_non_alphanumeric': 0.11087719298245614, 'fraction_numerical': 0.0018713450292397662, 'mean_word_length': 3.254726368159204, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3749757', 'n_tokens_mistral': 1222, 'n_tokens_neox': 1209, 'n_words': 285}