renderer.mock.ts 620 B

12345678910111213141516171819
  1. /**
  2. * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
  3. * SPDX-License-Identifier: MIT
  4. */
  5. import { EntityManager, PlaygroundConfigEntity, PlaygroundContainerModule } from '@flowgram.ai/core'
  6. import { Container } from 'inversify'
  7. export function createPlaygroundContainer(): Container {
  8. const container = new Container()
  9. container.load(PlaygroundContainerModule)
  10. return container
  11. }
  12. export function createPlaygroundConfigEntity(): PlaygroundConfigEntity {
  13. return createPlaygroundContainer()
  14. .get<EntityManager>(EntityManager)
  15. .getEntity<PlaygroundConfigEntity>(PlaygroundConfigEntity, true)!
  16. }