import FetchAnArtifact from "./FetchAnArtifact" ; import { FetchAnArtifactFromNPM } from "./FetchAnArtifactFromNPM" ; import { FetchAnArtifactUsingScript } from "./FetchAnArtifactUsingScript" ; export default class FetchArtifactSelector { constructor ( private fetchArtifactScript ? , private scope ? , private npmrcPath ? ) { } public getArtifactFetcher ( ) { if ( this . fetchArtifactScript ) { return new FetchAnArtifactUsingScript ( this . fetchArtifactScript ) ; } else if ( this . scope ) { return new FetchAnArtifactFromNPM ( this . scope , this . npmrcPath ) ; } else { throw new Error ( "Unable to determine artifact fetcher" ) ; } } }