diff --git a/src/helpers/electron-ipc-proxy/server.ts b/src/helpers/electron-ipc-proxy/server.ts index caa1277f..2dbe6f5a 100644 --- a/src/helpers/electron-ipc-proxy/server.ts +++ b/src/helpers/electron-ipc-proxy/server.ts @@ -15,6 +15,7 @@ import { ProxyPropertyType, ApplySubscribeRequest, } from './common'; +import { logger } from '@services/libs/log'; // TODO: make it to be able to use @decorator, instead of write a description json. We can defer the setup of ipc handler to make this possible. const registrations: { [channel: string]: ProxyServerHandler | null } = {}; @@ -46,6 +47,13 @@ export function registerProxy(target: T, descriptor: ProxyDescriptor, transpo }) .catch((error) => { if (sender) { + let stringifiedRequest = ''; + try { + stringifiedRequest = request ? JSON.stringify(request) : ''; + } catch { + stringifiedRequest = request.type; + } + logger.error(`E-0 IPC Error on ${channel} ${stringifiedRequest} ${error.message} ${error.stack}`); sender.send(correlationId, { type: ResponseType.Error, error: Errio.stringify(error) }); sender.removeListener('destroyed', nullify); } diff --git a/src/pages/AddWorkspace/useForm.ts b/src/pages/AddWorkspace/useForm.ts index 9a82f0dc..5522ef08 100644 --- a/src/pages/AddWorkspace/useForm.ts +++ b/src/pages/AddWorkspace/useForm.ts @@ -151,11 +151,12 @@ export function useWikiWorkspaceForm() { export function workspaceConfigFromFrom(form: IWikiWorkspaceForm, isCreateMainWorkspace: boolean, isCreateSyncedWorkspace: boolean): INewWorkspaceConfig { return { gitUrl: isCreateSyncedWorkspace ? form.gitRepoUrl : null, - isSubWiki: isCreateMainWorkspace, - mainWikiToLink: isCreateMainWorkspace ? form.mainWikiToLink.name : null, + isSubWiki: !isCreateMainWorkspace, + mainWikiToLink: !isCreateMainWorkspace ? form.mainWikiToLink.name : null, name: form.wikiFolderName, storageService: form.storageProvider, - tagName: isCreateMainWorkspace ? form.tagName : null, + tagName: !isCreateMainWorkspace ? form.tagName : null, port: form.wikiPort, + wikiFolderLocation: form.wikiFolderLocation, }; } diff --git a/src/pages/AddWorkspace/useNewWiki.ts b/src/pages/AddWorkspace/useNewWiki.ts index e587d74f..930fb054 100644 --- a/src/pages/AddWorkspace/useNewWiki.ts +++ b/src/pages/AddWorkspace/useNewWiki.ts @@ -71,17 +71,30 @@ export function useNewWiki( wikiCreationMessageSetter(t('AddWorkspace.Processing')); hasErrorSetter(false); try { + // we first create the workspace + const newWorkspace = await window.service.workspaceView.createWorkspaceView( + workspaceConfigFromFrom(form, isCreateMainWorkspace, isCreateSyncedWorkspace), + ); + // then create the wiki and git if (isCreateMainWorkspace) { await window.service.wiki.copyWikiTemplate(form.parentFolderLocation, form.wikiFolderName); if (isCreateSyncedWorkspace) { - await window.service.wikiGitWorkspace.initWikiGitTransaction(form.wikiFolderLocation, true, true, form.gitRepoUrl, form.gitUserInfo!); + await window.service.wikiGitWorkspace.initWikiGitTransaction( + newWorkspace.id, + form.wikiFolderLocation, + true, + true, + form.gitRepoUrl, + form.gitUserInfo!, + ); } else { - await window.service.wikiGitWorkspace.initWikiGitTransaction(form.wikiFolderLocation, true, false); + await window.service.wikiGitWorkspace.initWikiGitTransaction(newWorkspace.id, form.wikiFolderLocation, true, false); } } else { await window.service.wiki.createSubWiki(form.parentFolderLocation, form.wikiFolderName, form.mainWikiToLink?.name, form.tagName); if (isCreateSyncedWorkspace) { await window.service.wikiGitWorkspace.initWikiGitTransaction( + newWorkspace.id, form.wikiFolderLocation, false, true, @@ -90,14 +103,10 @@ export function useNewWiki( form.mainWikiToLink?.name, ); } else { - await window.service.wikiGitWorkspace.initWikiGitTransaction(form.wikiFolderLocation, false, false, form.mainWikiToLink?.name); + await window.service.wikiGitWorkspace.initWikiGitTransaction(newWorkspace.id, form.wikiFolderLocation, false, false, form.mainWikiToLink?.name); } } - // we are done physical creation! we can create the workspace - await window.service.workspaceView.createWorkspaceView(workspaceConfigFromFrom(form, isCreateMainWorkspace, isCreateSyncedWorkspace)); - // wait for wiki to start and close the window now. - await window.remote.closeCurrentWindow(); } catch (error) { wikiCreationMessageSetter((error as Error).message); diff --git a/src/pages/Main/SortableWorkspaceSelector.tsx b/src/pages/Main/SortableWorkspaceSelector.tsx index 76b76e72..468c9fe8 100644 --- a/src/pages/Main/SortableWorkspaceSelector.tsx +++ b/src/pages/Main/SortableWorkspaceSelector.tsx @@ -28,7 +28,7 @@ export function SortableWorkspaceSelector({ index, workspace }: ISortableItemPro {...attributes} {...listeners} onClick={async () => { - if (isSubWiki) { + if (isSubWiki && typeof tagName === 'string') { await window.service.wiki.requestOpenTiddlerInWiki(tagName); } else { const activeWorkspace = await window.service.workspace.getActiveWorkspace(); diff --git a/src/services/libs/log/index.ts b/src/services/libs/log/index.ts index 771add62..77fc1ffe 100644 --- a/src/services/libs/log/index.ts +++ b/src/services/libs/log/index.ts @@ -5,49 +5,48 @@ import 'winston-daily-rotate-file'; export * from './wiki-output'; -const logger = - process.env.NODE_ENV === 'test' - ? Object.assign(console, { - emerg: console.error.bind(console), - alert: console.error.bind(console), - crit: console.error.bind(console), - warning: console.warn.bind(console), - notice: console.log.bind(console), - debug: console.log.bind(console), - }) - : winston.createLogger({ - levels: { - emerg: 0, - alert: 1, - crit: 2, - error: 3, - warning: 4, - warn: 5, - notice: 6, - info: 7, - debug: 8, - }, - transports: [ - new winston.transports.Console(), - new winston.transports.DailyRotateFile({ - filename: 'TiddlyGit-%DATE%.log', - datePattern: 'YYYY-MM-DD', - zippedArchive: false, - maxSize: '20mb', - maxFiles: '14d', - dirname: LOG_FOLDER, - }), - new RendererTransport(), - ], - exceptionHandlers: [ - new winston.transports.DailyRotateFile({ - filename: 'TiddlyGit-Exception-%DATE%.log', - datePattern: 'YYYY-MM-DD', - zippedArchive: false, - maxSize: '20mb', - maxFiles: '14d', - dirname: LOG_FOLDER, - }), - ], - }); +const logger = (process.env.NODE_ENV === 'test' + ? Object.assign(console, { + emerg: console.error.bind(console), + alert: console.error.bind(console), + crit: console.error.bind(console), + warning: console.warn.bind(console), + notice: console.log.bind(console), + debug: console.log.bind(console), + }) + : winston.createLogger({ + levels: { + emerg: 0, + alert: 1, + crit: 2, + error: 3, + warning: 4, + warn: 5, + notice: 6, + info: 7, + debug: 8, + }, + transports: [ + new winston.transports.Console(), + new winston.transports.DailyRotateFile({ + filename: 'TiddlyGit-%DATE%.log', + datePattern: 'YYYY-MM-DD', + zippedArchive: false, + maxSize: '20mb', + maxFiles: '14d', + dirname: LOG_FOLDER, + }), + new RendererTransport(), + ], + exceptionHandlers: [ + new winston.transports.DailyRotateFile({ + filename: 'TiddlyGit-Exception-%DATE%.log', + datePattern: 'YYYY-MM-DD', + zippedArchive: false, + maxSize: '20mb', + maxFiles: '14d', + dirname: LOG_FOLDER, + }), + ], + })) as winston.Logger; export { logger }; diff --git a/src/services/wiki/index.ts b/src/services/wiki/index.ts index eed90fe0..f2100ca6 100644 --- a/src/services/wiki/index.ts +++ b/src/services/wiki/index.ts @@ -27,6 +27,7 @@ import { updateSubWikiPluginContent, getSubWikiPluginContent, ISubWikiPluginCont import { IWikiService } from './interface'; import { WikiChannel } from '@/constants/channels'; import { CopyWikiTemplateError } from './error'; +import { SupportedStorageServices } from '@services/types'; @injectable() export class Wiki implements IWikiService { @@ -160,7 +161,7 @@ export class Wiki implements IWikiService { }); await delay(100); } catch (error) { - logger.info(`Wiki-worker have error ${error.message} when try to stop`, { function: 'stopWiki' }); + logger.info(`Wiki-worker have error ${(error as Error).message} when try to stop`, { function: 'stopWiki' }); await worker.terminate(); } // delete this.wikiWorkers[homePath]; @@ -349,25 +350,26 @@ export class Wiki implements IWikiService { // do nothing } - const userInfo = await this.authService.getStorageServiceUserInfo(workspace.storageService); + const { name: wikiPath, gitUrl: githubRepoUrl, port, isSubWiki, id, mainWikiToLink, storageService } = workspace; + const userInfo = await this.authService.getStorageServiceUserInfo(storageService); // use workspace specific userName first, and fall back to preferences' userName, pass empty editor username if undefined // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions const userName = (workspace.userName || (await this.authService.get('userName'))) ?? ''; - const { name: wikiPath, gitUrl: githubRepoUrl, port, isSubWiki, id, mainWikiToLink } = workspace; + const tryWatchForSync = async (watchPath?: string): Promise => { + if (storageService !== SupportedStorageServices.local && typeof githubRepoUrl === 'string' && userInfo !== undefined) { + await this.watchWikiForDebounceCommitAndSync(wikiPath, githubRepoUrl, userInfo, watchPath); + } + }; // if is main wiki if (!isSubWiki) { this.setWikiStarted(wikiPath); await this.startNodeJSWiki(wikiPath, port, userName, id); - if (userInfo !== undefined) { - await this.watchWiki(wikiPath, githubRepoUrl, userInfo, path.join(wikiPath, TIDDLERS_PATH)); - } + // sync to cloud + await tryWatchForSync(path.join(wikiPath, TIDDLERS_PATH)); } else { // if is private repo wiki - if (userInfo !== undefined) { - await this.watchWiki(wikiPath, githubRepoUrl, userInfo); - } - // if we are creating a sub-wiki, restart the main wiki to load content from private wiki - if (!this.justStartedWiki[mainWikiToLink]) { + // if we are creating a sub-wiki just now, restart the main wiki to load content from private wiki + if (typeof mainWikiToLink === 'string' && !this.justStartedWiki[mainWikiToLink]) { // TODO: change getByName to getByMainWikiPath, get by mainWikiPath const mainWorkspace = await this.workspaceService.getByName(mainWikiToLink); if (mainWorkspace === undefined) { @@ -376,10 +378,9 @@ export class Wiki implements IWikiService { await this.stopWatchWiki(mainWikiToLink); await this.stopWiki(mainWikiToLink); await this.startWiki(mainWikiToLink, mainWorkspace.port, userName); - if (userInfo !== undefined) { - await this.watchWiki(mainWikiToLink, githubRepoUrl, userInfo); - } } + // sync to cloud + await tryWatchForSync(); } } @@ -394,13 +395,13 @@ export class Wiki implements IWikiService { */ public async startNodeJSWiki(homePath: string, port: number, userName: string, workspaceID: string): Promise { if (typeof homePath !== 'string' || homePath.length === 0 || !path.isAbsolute(homePath)) { - const errorMessage = i18n.t('Dialog.NeedCorrectTiddlywikiFolderPath'); + const errorMessage = i18n.t('Dialog.NeedCorrectTiddlywikiFolderPath') + homePath; console.error(errorMessage); const mainWindow = this.windowService.get(WindowNames.main); if (mainWindow !== undefined) { await dialog.showMessageBox(mainWindow, { title: i18n.t('Dialog.PathPassInCantUse'), - message: errorMessage + homePath, + message: errorMessage, buttons: ['OK'], cancelId: 0, defaultId: 0, @@ -441,11 +442,18 @@ export class Wiki implements IWikiService { /** * watch wiki change and reset git sync count down */ - public async watchWiki(wikiRepoPath: string, githubRepoUrl: string, userInfo: IGitUserInfos, wikiFolderPath = wikiRepoPath): Promise { + public async watchWikiForDebounceCommitAndSync( + wikiRepoPath: string, + githubRepoUrl: string, + userInfo: IGitUserInfos, + wikiFolderPath = wikiRepoPath, + ): Promise { if (!fs.existsSync(wikiRepoPath)) { logger.error('Folder not exist in watchFolder()', { wikiRepoPath, wikiFolderPath, githubRepoUrl }); return; } + // simple lock to prevent running two instance of commit task + let lock = false; const onChange = debounce((fileName: string): void => { if (lock) { logger.info(`${fileName} changed, but lock is on, so skip`); @@ -458,8 +466,6 @@ export class Wiki implements IWikiService { lock = false; }); }, 1000); - // simple lock to prevent running two instance of commit task - let lock = false; // load ignore config from .gitignore located in the wiki repo folder const gitIgnoreFilePath = path.join(wikiRepoPath, '.gitignore'); let gitignoreFile = ''; diff --git a/src/services/wiki/interface.ts b/src/services/wiki/interface.ts index 351a83cb..31a6df5d 100644 --- a/src/services/wiki/interface.ts +++ b/src/services/wiki/interface.ts @@ -32,7 +32,7 @@ export interface IWikiService { ): Promise; wikiStartup(workspace: IWorkspace): Promise; startNodeJSWiki(homePath: string, port: number, userName: string, workspaceID: string): Promise; - watchWiki(wikiRepoPath: string, githubRepoUrl: string, userInfo: IGitUserInfos, wikiFolderPath?: string): Promise; + watchWikiForDebounceCommitAndSync(wikiRepoPath: string, githubRepoUrl: string, userInfo: IGitUserInfos, wikiFolderPath?: string): Promise; stopWatchWiki(wikiRepoPath: string): Promise; stopWatchAllWiki(): Promise; } @@ -55,7 +55,7 @@ export const WikiServiceIPCDescriptor = { cloneSubWiki: ProxyPropertyType.Function, wikiStartup: ProxyPropertyType.Function, startNodeJSWiki: ProxyPropertyType.Function, - watchWiki: ProxyPropertyType.Function, + watchWikiForDebounceCommitAndSync: ProxyPropertyType.Function, stopWatchWiki: ProxyPropertyType.Function, stopWatchAllWiki: ProxyPropertyType.Function, }, diff --git a/src/services/wiki/update-plugin-content.ts b/src/services/wiki/update-plugin-content.ts index 19cfe27e..6914f499 100644 --- a/src/services/wiki/update-plugin-content.ts +++ b/src/services/wiki/update-plugin-content.ts @@ -37,25 +37,31 @@ export function updateSubWikiPluginContent( if (oldConfig === undefined) { throw new Error('Both newConfig and oldConfig are not provided in the updateSubWikiPluginContent() for\n' + JSON.stringify(mainWikiPath)); } + const { tagName, subWikiFolderName } = oldConfig; + if (typeof tagName !== 'string' || subWikiFolderName === undefined) { + throw new Error('tagName or subWikiFolderName is not string for in the updateSubWikiPluginContent() for\n' + JSON.stringify(mainWikiPath)); + } // find the old line, delete it - const newFileSystemPaths = FileSystemPaths.filter( - (line) => !(line.includes(getMatchPart(oldConfig.tagName)) && line.includes(getPathPart(oldConfig.subWikiFolderName))), - ); + const newFileSystemPaths = FileSystemPaths.filter((line) => !(line.includes(getMatchPart(tagName)) && line.includes(getPathPart(subWikiFolderName)))); newFileSystemPathsFile = `${header.join('\n')}\n\n${newFileSystemPaths.join('\n')}`; } else { // if this config already exists, just return - if (FileSystemPaths.some((line) => line.includes(getMatchPart(newConfig.tagName)) && line.includes(getPathPart(newConfig.subWikiFolderName)))) { + const { tagName, subWikiFolderName } = newConfig; + if (typeof tagName !== 'string' || subWikiFolderName === undefined) { + throw new Error('tagName or subWikiFolderName is not string for in the updateSubWikiPluginContent() for\n' + JSON.stringify(mainWikiPath)); + } + if (FileSystemPaths.some((line) => line.includes(getMatchPart(tagName)) && line.includes(getPathPart(subWikiFolderName)))) { return; } // prepare new line - const { tagName, subWikiFolderName } = newConfig; const newConfigLine = getMatchPart(tagName) + getPathPart(subWikiFolderName); // if we are just to add a new config, just append it to the end of the file - if (oldConfig !== undefined) { + const oldConfigTagName = oldConfig?.tagName; + if (oldConfig !== undefined && typeof oldConfigTagName === 'string') { // find the old line, replace it with the new line const newFileSystemPaths = FileSystemPaths.map((line) => { - if (line.includes(getMatchPart(oldConfig.tagName)) && line.includes(getPathPart(oldConfig.subWikiFolderName))) { + if (line.includes(getMatchPart(oldConfigTagName)) && line.includes(getPathPart(oldConfig.subWikiFolderName))) { return newConfigLine; } return line; diff --git a/src/services/wikiGitWorkspace/index.ts b/src/services/wikiGitWorkspace/index.ts index cf0cc0d5..15ae6c89 100644 --- a/src/services/wikiGitWorkspace/index.ts +++ b/src/services/wikiGitWorkspace/index.ts @@ -29,6 +29,7 @@ export class WikiGitWorkspace implements IWikiGitWorkspaceService { @lazyInject(serviceIdentifier.MenuService) private readonly menuService!: IMenuService; public initWikiGitTransaction = async ( + workspaceID: string, wikiFolderPath: string, isMainWiki: boolean, isSyncedWiki: boolean, @@ -48,8 +49,15 @@ export class WikiGitWorkspace implements IWikiGitWorkspaceService { } else { await this.gitService.initWikiGit(wikiFolderPath, isMainWiki, false); } + const workspace = await this.workspaceService.get(workspaceID); + if (workspace === undefined) { + throw new Error(`Need to get workspace with id ${workspaceID} but failed`); + } + await this.wikiService.wikiStartup(workspace); } catch (error) { - logger.info(error); + const errorMessage = `initWikiGitTransaction failed, ${(error as Error).message} ${(error as Error).stack ?? ''}`; + logger.crit(errorMessage); + await this.workspaceService.remove(workspaceID); try { if (isMainWiki) { await this.wikiService.removeWiki(wikiFolderPath); @@ -59,11 +67,11 @@ export class WikiGitWorkspace implements IWikiGitWorkspaceService { } catch (error_) { throw new InitWikiGitRevertError((error_ as Error).message); } - throw new InitWikiGitError((error as Error).message); + throw new InitWikiGitError(errorMessage); } }; - public removeWorkspace = async (id: string): Promise => { + public removeWorkspace = async (workspaceID: string): Promise => { const mainWindow = this.windowService.get(WindowNames.main); if (mainWindow !== undefined) { const { response } = await dialog.showMessageBox(mainWindow, { @@ -74,31 +82,28 @@ export class WikiGitWorkspace implements IWikiGitWorkspaceService { }); try { if (response === 0 || response === 1) { - const workspace = await this.workspaceService.get(id); + const workspace = await this.workspaceService.get(workspaceID); if (workspace === undefined) { - throw new Error(`Need to get workspace with id ${id} but failed`); + throw new Error(`Need to get workspace with id ${workspaceID} but failed`); } await this.wikiService.stopWatchWiki(workspace.name).catch((error: Error) => logger.error(error.message, error)); await this.wikiService.stopWiki(workspace.name).catch((error: Error) => logger.error(error.message, error)); - await this.wikiService.removeWiki(workspace.name, workspace.isSubWiki ? workspace.mainWikiToLink : undefined, response === 0); - await this.workspaceViewService.removeWorkspaceView(id); - await this.menuService.buildMenu(); - // restart the main wiki to load content from private wiki - const mainWikiPath = workspace.mainWikiToLink; - const mainWorkspace = await this.workspaceService.getByName(mainWikiPath); - if (mainWorkspace === undefined) { - throw new Error(`Need to get mainWorkspace with name ${mainWikiPath} but failed`); - } - const userName = (await this.authService.get('userName')) ?? ''; - await this.wikiService.stopWiki(mainWikiPath); - await this.wikiService.startWiki(mainWikiPath, mainWorkspace.port, userName); - // remove folderName from fileSystemPaths - if (workspace.isSubWiki) { - await this.wikiService.updateSubWikiPluginContent(mainWikiPath, undefined, { + const { name, isSubWiki, mainWikiToLink } = workspace; + if (isSubWiki) { + if (mainWikiToLink === null) { + throw new Error(`workspace.mainWikiToLink is null in WikiGitWorkspace.removeWorkspace ${JSON.stringify(workspace)}`); + } + await this.wikiService.removeWiki(name, mainWikiToLink, response === 0); + // remove folderName from fileSystemPaths + await this.wikiService.updateSubWikiPluginContent(mainWikiToLink, undefined, { ...workspace, - subWikiFolderName: path.basename(workspace.name), + subWikiFolderName: path.basename(name), }); + } else { + await this.wikiService.removeWiki(name); } + await this.workspaceViewService.removeWorkspaceView(workspaceID); + await this.wikiService.wikiStartup(workspace); } } catch (error) { logger.error((error as Error).message, error); diff --git a/src/services/wikiGitWorkspace/interface.ts b/src/services/wikiGitWorkspace/interface.ts index cfaff570..68a06424 100644 --- a/src/services/wikiGitWorkspace/interface.ts +++ b/src/services/wikiGitWorkspace/interface.ts @@ -7,8 +7,9 @@ import { IGitUserInfos } from '@services/git/interface'; */ export interface IWikiGitWorkspaceService { /** call git.initWikiGit , and rollback (delete created wiki folder) if it failed */ - initWikiGitTransaction(wikiFolderPath: string, isMainWiki: false, isSyncedWiki: false, mainWikiToUnLink: string): Promise; + initWikiGitTransaction(workspaceID: string, wikiFolderPath: string, isMainWiki: false, isSyncedWiki: false, mainWikiToUnLink: string): Promise; initWikiGitTransaction( + workspaceID: string, wikiFolderPath: string, isMainWiki: false, isSyncedWiki: true, @@ -16,8 +17,15 @@ export interface IWikiGitWorkspaceService { userInfo: IGitUserInfos, mainWikiToUnLink: string, ): Promise; - initWikiGitTransaction(wikiFolderPath: string, isMainWiki: true, isSyncedWiki: false): Promise; - initWikiGitTransaction(wikiFolderPath: string, isMainWiki: true, isSyncedWiki: true, githubRepoUrl: string, userInfo: IGitUserInfos): Promise; + initWikiGitTransaction(workspaceID: string, wikiFolderPath: string, isMainWiki: true, isSyncedWiki: false): Promise; + initWikiGitTransaction( + workspaceID: string, + wikiFolderPath: string, + isMainWiki: true, + isSyncedWiki: true, + githubRepoUrl: string, + userInfo: IGitUserInfos, + ): Promise; removeWorkspace: (id: string) => Promise; } export const WikiGitWorkspaceServiceIPCDescriptor = { diff --git a/src/services/workspacesView/index.ts b/src/services/workspacesView/index.ts index 98acb928..1f9bbfd1 100644 --- a/src/services/workspacesView/index.ts +++ b/src/services/workspacesView/index.ts @@ -124,7 +124,7 @@ export class WorkspaceView implements IWorkspaceViewService { ); } - public async createWorkspaceView(workspaceOptions: INewWorkspaceConfig): Promise { + public async createWorkspaceView(workspaceOptions: INewWorkspaceConfig): Promise { const newWorkspace = await this.workspaceService.create(workspaceOptions); const mainWindow = this.windowService.get(WindowNames.main); if (mainWindow !== undefined) { @@ -138,6 +138,7 @@ export class WorkspaceView implements IWorkspaceViewService { if (typeof workspaceOptions.picturePath === 'string') { await this.workspaceService.setWorkspacePicture(newWorkspace.id, workspaceOptions.picturePath); } + return newWorkspace; } public async setWorkspaceView(id: string, workspaceOptions: IWorkspace): Promise { diff --git a/src/services/workspacesView/interface.ts b/src/services/workspacesView/interface.ts index b5b1c8b6..cd553964 100644 --- a/src/services/workspacesView/interface.ts +++ b/src/services/workspacesView/interface.ts @@ -7,7 +7,7 @@ import { IWorkspace, INewWorkspaceConfig } from '@services/workspaces/interface' * Deal with operations that needs to create a workspace and a browserView at once */ export interface IWorkspaceViewService { - createWorkspaceView(workspaceOptions: INewWorkspaceConfig): Promise; + createWorkspaceView(workspaceOptions: INewWorkspaceConfig): Promise; initializeAllWorkspaceView(): Promise; setWorkspaceView(id: string, workspaceOptions: IWorkspace): Promise; setWorkspaceViews(workspaces: Record): Promise;