fix(workflow): load workflow after application initialization

This commit is contained in:
chenos 2022-06-29 17:19:10 +08:00
parent 8f0ea6c3c0
commit 0348392037

View File

@ -29,7 +29,6 @@ import { SchemaInitializerProvider } from '../schema-initializer';
import { BlockTemplateDetails, BlockTemplatePage, SchemaTemplateShortcut } from '../schema-templates'; import { BlockTemplateDetails, BlockTemplatePage, SchemaTemplateShortcut } from '../schema-templates';
import { SystemSettingsProvider, SystemSettingsShortcut } from '../system-settings'; import { SystemSettingsProvider, SystemSettingsShortcut } from '../system-settings';
import { SigninPage, SignupPage } from '../user'; import { SigninPage, SignupPage } from '../user';
import { WorkflowPage, WorkflowRouteProvider, WorkflowShortcut } from '../workflow';
import { compose } from './compose'; import { compose } from './compose';
export interface ApplicationOptions { export interface ApplicationOptions {
@ -48,6 +47,7 @@ export class Application {
plugins: PluginCallback[] = []; plugins: PluginCallback[] = [];
constructor(options: ApplicationOptions) { constructor(options: ApplicationOptions) {
const { WorkflowPage, WorkflowRouteProvider, WorkflowShortcut } = require('../workflow');
this.apiClient = new APIClient({ this.apiClient = new APIClient({
baseURL: process.env.API_BASE_URL, baseURL: process.env.API_BASE_URL,
headers: { headers: {