MCPcopy
hub / github.com/brimdata/zui / initialize

Function initialize

apps/zui/src/js/initializers/initialize.ts:36–77  ·  view source on GitHub ↗
(
  windowId: string = getWindowId(),
  windowName: WindowName = getWindowName()
)

Source from the content-addressed store, hash-verified

34}
35
36export default async function initialize(
37 windowId: string = getWindowId(),
38 windowName: WindowName = getWindowName()
39) {
40 const renderer = new Renderer()
41 global.windowId = windowId
42 global.windowName = windowName
43
44 const api = new ZuiApi()
45 const store = await initStore(api, renderer)
46 const asyncTasks = initAsyncTasks(renderer)
47 initDomainModels({store})
48 initHandlers({
49 transition: startTransition,
50 oldApi: api,
51 dispatch: store.dispatch,
52 waitForSelector: createWaitForSelector(store),
53 select: (fn) => fn(store.getState()),
54 invoke: invoke,
55 toast,
56 asyncTasks,
57 })
58
59 await initGlobals(store)
60 await initLake(store)
61 api.init(store.dispatch, store.getState)
62 initDOM()
63 initIpcListeners(store)
64
65 ViewHandler.store = store
66 setMenuContext({select: (fn) => fn(store.getState()), api})
67 initDebugGlobals(store, api)
68 initAutosave(store)
69 commands.setContext(store, api)
70 invoke("windowInitialized", global.windowId)
71 initializeTabs(store)
72 initializeMonaco()
73 initializePluginContextSync(store)
74 initResizeListener()
75
76 return {store, api}
77}

Callers

nothing calls this directly

Calls 15

initMethod · 0.95
initAsyncTasksFunction · 0.90
initDomainModelsFunction · 0.90
initHandlersFunction · 0.90
createWaitForSelectorFunction · 0.90
initLakeFunction · 0.90
setMenuContextFunction · 0.90
initAutosaveFunction · 0.90
invokeFunction · 0.90
initializeTabsFunction · 0.90
initializeMonacoFunction · 0.90

Tested by

no test coverage detected