import { nanoid } from 'nanoid' ; import validateConfigs from './validate-configs' ; import { CoreContext } from './core-context' ; import { getArgs } from './sysconfig' ; import * as i from './interfaces' ; todo todo export class ProcessContext < S = Record < string , any > , A = Record < string , any > , D extends string = string > extends CoreContext < S , A , D > { constructor ( config , overrideArgs ? ) { const cluster = { isMaster : false , worker : { id : nanoid ( 8 ) , } } as any ; const parsedArgs = overrideArgs || getArgs < S > ( config . default_config_file ) ; const sysconfig = validateConfigs ( cluster , config , parsedArgs . configfile ) ; super ( config , cluster , sysconfig ) ; } }