From f164d38c6f8557c1934fef593c0092f9456be83e Mon Sep 17 00:00:00 2001 From: Ian Date: Tue, 28 Feb 2023 15:28:02 -0500 Subject: [PATCH] (feat) Add implicit config for all registered apps (O3-1933) --- packages/shell/esm-app-shell/src/apps.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/shell/esm-app-shell/src/apps.ts b/packages/shell/esm-app-shell/src/apps.ts index 33eaf2c78..b0bce8058 100644 --- a/packages/shell/esm-app-shell/src/apps.ts +++ b/packages/shell/esm-app-shell/src/apps.ts @@ -7,6 +7,7 @@ import { registerExtension, ResourceLoader, Lifecycle, + defineConfigSchema, } from "@openmrs/esm-framework/src/internal"; import { registerApplication } from "single-spa"; import { routePrefix, routeRegex, wrapLifecycle } from "./helpers"; @@ -35,7 +36,7 @@ function preprocessActivator( } } -function trySetup(appName: string, setup: () => any): any { +function trySetup(appName: string, setup: () => unknown): any { try { return setup(); } catch (error) { @@ -100,6 +101,8 @@ export function registerApp(appName: string, appExports: System.Module) { const setup = appExports.setupOpenMRS; if (typeof setup === "function") { + defineConfigSchema(appName, {}); + const assets = appExports.assets; const result = trySetup(appName, setup);