forked from galaxyproject/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.ts
More file actions
41 lines (32 loc) · 1.13 KB
/
index.ts
File metadata and controls
41 lines (32 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// index.ts
import { createPinia, PiniaVuePlugin } from "pinia";
import Vue from "vue";
import { installPendingRequestsInterceptor } from "@/api/pendingRequests";
import { initGalaxyInstance } from "@/app";
import { initSentry } from "@/app/addons/sentry";
import { initWebhooks } from "@/app/addons/webhooks";
import { getRouter } from "./router";
import App from "./App.vue";
Vue.use(PiniaVuePlugin);
const pinia = createPinia();
// Attach the shared AbortController signal to every outgoing axios request
// so we can cancel in-flight anonymous-cookie requests before login/register
// navigates — otherwise their late ``Set-Cookie: galaxysession=<anon>`` can
// clobber the authenticated cookie.
installPendingRequestsInterceptor();
window.addEventListener("load", async () => {
// Create Galaxy object
const Galaxy = await initGalaxyInstance();
// Build router
const router = getRouter(Galaxy);
// Initialize globals
await initSentry(Galaxy, router);
await initWebhooks(Galaxy);
// Mount application
new Vue({
el: "#app",
render: (h) => h(App),
router,
pinia,
});
});