import { CoreStart , CoreSetup , Plugin , PluginInitializerContext } from 'src/core/server' ; import { ExpressionsService , ExpressionsServiceSetup , ExpressionsServiceStart } from '../common' ; export type ExpressionsServerSetup = ExpressionsServiceSetup ; export type ExpressionsServerStart = ExpressionsServiceStart ; export class ExpressionsServerPlugin implements Plugin < ExpressionsServerSetup , ExpressionsServerStart > { readonly expressions : ExpressionsService = new ExpressionsService ( ) ; constructor ( initializerContext ) { } public setup ( core ) { this . expressions . executor . extendContext ( { environment : 'server' , } ) ; const setup = this . expressions . setup ( ) ; return Object . freeze ( setup ) ; } public start ( core ) { const start = this . expressions . start ( ) ; return Object . freeze ( start ) ; } public stop ( ) { this . expressions . stop ( ) ; } }