MOBILE-3833 dx: Expose app provider in devtools

main
Noel De Martin 2022-03-31 12:00:47 +02:00
parent 1ae5c6b3a7
commit 7a7950f49c
1 changed files with 3 additions and 0 deletions

View File

@ -12,18 +12,21 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { CoreApp, CoreAppProvider } from '@services/app';
import { CoreConfig, CoreConfigProvider } from '@services/config'; import { CoreConfig, CoreConfigProvider } from '@services/config';
import { CoreDB, CoreDbProvider } from '@services/db'; import { CoreDB, CoreDbProvider } from '@services/db';
import { CoreCustomURLSchemes, CoreCustomURLSchemesProvider } from '@services/urlschemes'; import { CoreCustomURLSchemes, CoreCustomURLSchemesProvider } from '@services/urlschemes';
import { CoreConstants } from '../constants'; import { CoreConstants } from '../constants';
type DevelopmentWindow = Window & { type DevelopmentWindow = Window & {
appProvider?: CoreAppProvider;
configProvider?: CoreConfigProvider; configProvider?: CoreConfigProvider;
dbProvider?: CoreDbProvider; dbProvider?: CoreDbProvider;
urlSchemes?: CoreCustomURLSchemesProvider; urlSchemes?: CoreCustomURLSchemesProvider;
}; };
function initializeDevelopmentWindow(window: DevelopmentWindow) { function initializeDevelopmentWindow(window: DevelopmentWindow) {
window.appProvider = CoreApp.instance;
window.configProvider = CoreConfig.instance; window.configProvider = CoreConfig.instance;
window.dbProvider = CoreDB.instance; window.dbProvider = CoreDB.instance;
window.urlSchemes = CoreCustomURLSchemes.instance; window.urlSchemes = CoreCustomURLSchemes.instance;