* feat: move necessary files to jan root Signed-off-by: James <james@jan.ai> * chore: check model dir --------- Signed-off-by: James <james@jan.ai> Co-authored-by: James <james@jan.ai> Co-authored-by: Louis <louis@jan.ai>
24 lines
646 B
TypeScript
24 lines
646 B
TypeScript
import * as cn from './cloudNativeService'
|
|
import { EventEmitter } from './eventsService'
|
|
export const setupCoreServices = () => {
|
|
if (typeof window === 'undefined') {
|
|
console.debug('undefine', window)
|
|
return
|
|
} else {
|
|
console.debug('Setting up core services')
|
|
}
|
|
if (!window.corePlugin) {
|
|
window.corePlugin = {
|
|
events: new EventEmitter(),
|
|
}
|
|
window.coreAPI = {}
|
|
window.coreAPI = window.electronAPI ?? {
|
|
invokePluginFunc: cn.invokePluginFunc,
|
|
downloadFile: cn.downloadFile,
|
|
deleteFile: cn.deleteFile,
|
|
appVersion: cn.appVersion,
|
|
openExternalUrl: cn.openExternalUrl,
|
|
}
|
|
}
|
|
}
|