import { ProcessRepresentation , ProcessScale } from '../domain' ; import { ProcfileReconciler } from './ProcfileReconciler' ; export class ProcessRepresentationChainModifier { representation : ProcessRepresentation ; procfileReconciler : ProcfileReconciler ; constructor ( representation , procfileReconciler ) { this . representation = representation ; this . procfileReconciler = procfileReconciler ; } name ( ) ; name ( name ) ; name ( name ? ) { if ( ! name ) { return this . representation . processName ; } this . representation . processName = name ; return this ; } entry ( ) ; entry ( entry ) ; entry ( entry ? ) { if ( ! entry ) { return this . representation . entryFile ; } this . representation . entryFile = entry ; return this ; } scale ( ) ; scale ( scale ) ; scale ( scale ? ) { if ( ! scale ) { return this . representation . scale ; } this . representation . scale = scale ; return this ; } env ( ) ; env ( env ) ; env ( env ? ) { if ( ! env ) { return this . representation . env ; } this . representation . env = env ; return this ; } args ( ) ; args ( args ) ; args ( args ? ) { if ( ! args ) { return this . representation . args ; } this . representation . args = args ; return this ; } nodeArgs ( ) ; nodeArgs ( nodeArgs ) ; nodeArgs ( nodeArgs ? ) { if ( ! nodeArgs ) { return this . representation . execArgv ; } this . representation . execArgv = nodeArgs ; return this ; } argv ( argv ? ) { console . warn ( 'Pandora.js: process().argv() has been deprecated, replace it to .nodeArgs()' ) ; return this . nodeArgs ( argv ) ; } order ( ) ; order ( order ) ; order ( order ? ) { if ( ! order ) { return this . representation . order ; } this . representation . order = order ; return this ; } drop ( ) { this . procfileReconciler . dropProcessByName ( this . representation . processName ) ; } }