import { File , LabDirectory , instanceOfFile } from '@machinelabs/models' ; export const MAIN_PYTHON_FILENAME = 'main.py' ; export const getMainFile = ( dir ) => < File > dir . find ( file => file . name === MAIN_PYTHON_FILENAME && instanceOfFile ( file ) ) ; export const stringifyDirectory = ( dir ) => JSON . stringify ( dir , ( key , value ) => ( key === 'clientState' ? undefined : value ) ) ;