49 lines
No EOL
1.5 KiB
TypeScript
49 lines
No EOL
1.5 KiB
TypeScript
// import patchErrorBoundary from "@core/debug/patches/patchErrorBoundary";
|
|
import initFixes from "@core/fixes";
|
|
import { initFetchI18nStrings } from "@core/i18n";
|
|
import initSettings from "@core/ui/settings";
|
|
import { initVendettaObject } from "@core/vendetta/api";
|
|
import { VdPluginManager } from "@core/vendetta/plugins";
|
|
import { updateFonts } from "@lib/addons/fonts";
|
|
import { initPlugins, updatePlugins } from "@lib/addons/plugins";
|
|
import { initThemes } from "@lib/addons/themes";
|
|
import { patchCommands } from "@lib/api/commands";
|
|
import { patchLogHook } from "@lib/api/debug";
|
|
import { injectFluxInterceptor } from "@lib/api/flux";
|
|
import { patchJsx } from "@lib/api/react/jsx";
|
|
import { logger } from "@lib/utils/logger";
|
|
import { patchSettings } from "@ui/settings";
|
|
import { getDebugInfo } from "@lib/api/debug";
|
|
|
|
import * as lib from "./lib";
|
|
|
|
export default async () => {
|
|
// Load everything in parallel
|
|
|
|
await Promise.all([
|
|
initThemes(),
|
|
injectFluxInterceptor(),
|
|
patchSettings(),
|
|
patchLogHook(),
|
|
patchCommands(),
|
|
patchJsx(),
|
|
initVendettaObject(),
|
|
initFetchI18nStrings(),
|
|
initSettings(),
|
|
initFixes(),
|
|
// patchErrorBoundary(),
|
|
updatePlugins(),
|
|
updateFonts(),
|
|
initPlugins(),
|
|
VdPluginManager.initPlugins(),
|
|
]).then(
|
|
// Push them all to unloader
|
|
u => u.forEach(f => f && lib.unload.push(f))
|
|
);
|
|
|
|
// Assign window object
|
|
window.bunny = lib;
|
|
|
|
// We good :)
|
|
logger.log("Kettu is ready!");
|
|
}; |