mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Fix not starting with sentryDSN configured - Make sure that all beforeElectronIsReady runables are run completely syncronously - Fix when setupSentry is to be run (namely before electron is ready) Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix tests Signed-off-by: Sebastian Malton <sebastian@malton.name>
25 lines
722 B
TypeScript
25 lines
722 B
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
import { getInjectable } from "@ogre-tools/injectable";
|
|
import { initializeSentryReporting } from "../../../common/sentry";
|
|
import { init } from "@sentry/electron/main";
|
|
import { beforeElectronIsReadyInjectionToken } from "../runnable-tokens/before-electron-is-ready-injection-token";
|
|
|
|
const setupSentryInjectable = getInjectable({
|
|
id: "setup-sentry",
|
|
|
|
instantiate: () => ({
|
|
run: () => {
|
|
initializeSentryReporting(init);
|
|
},
|
|
}),
|
|
|
|
causesSideEffects: true,
|
|
|
|
injectionToken: beforeElectronIsReadyInjectionToken,
|
|
});
|
|
|
|
export default setupSentryInjectable;
|