MCPcopy
hub / github.com/modstart-lib/aigcpanel / init

Function init

electron/mapi/render.ts:22–53  ·  view source on GitHub ↗
(env: typeof AppEnv = null)

Source from the content-addressed store, hash-verified

20
21export const MAPI = {
22 init(env: typeof AppEnv = null) {
23 if (!env) {
24 // expose context
25 exposeContext("$mapi", {
26 app,
27 log,
28 config,
29 storage,
30 db,
31 file,
32 event,
33 ui,
34 updater,
35 statistics,
36 user,
37 misc,
38 server,
39 httpserver,
40 workflow,
41 });
42 db.init();
43 event.init();
44 ui.init();
45 } else {
46 // init context
47 AppEnv.appRoot = env.appRoot;
48 AppEnv.appData = env.appData;
49 AppEnv.userData = env.userData;
50 AppEnv.dataRoot = env.dataRoot;
51 AppEnv.isInit = true;
52 }
53 },
54};

Callers

nothing calls this directly

Calls 2

exposeContextFunction · 0.90
initMethod · 0.45

Tested by

no test coverage detected