Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/release-it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
workflow_dispatch:
inputs:
increment:
description: 选择版本号递增方式
required: true
default: patch
type: choice
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

简体中文 | [English](README_EN.md)

<p align="center" style="margin-bottom: 0px !important;">
<p align="center" style="margin-bottom: 0 !important;">
<img width="600" alt="CodeNest Interface" src="https://raw.githubusercontent.com/MidnightCrowing/CodeNest/main/docs/source/Interface_CN.png"><br/>
</p>

Expand Down
2 changes: 1 addition & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[简体中文](README.md) | English

<p align="center" style="margin-bottom: 0px !important;">
<p align="center" style="margin-bottom: 0 !important;">
<img width="600" alt="CodeNest Interface" src="https://raw.githubusercontent.com/MidnightCrowing/CodeNest/main/docs/source/Interface_EN.png"><br/>
</p>

Expand Down
49 changes: 49 additions & 0 deletions electron/ipc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { ipcMain } from 'electron'

import * as dataFile from './services/dataFileService'
import * as dialogSvc from './services/dialogService'
import * as pathSvc from './services/pathService'
import * as projectSvc from './services/projectService'
import * as scanner from './services/scannerService'
import * as systemSvc from './services/systemService'
import * as themeSvc from './services/themeService'
import * as updateSvc from './services/updateService'

// data file
ipcMain.handle('data:save', (_e, fileType, data) => dataFile.saveData(fileType, data))
ipcMain.handle('data:load', (_e, fileType) => dataFile.loadData(fileType))
ipcMain.handle('data:open', (_e, fileType) => dataFile.openData(fileType))
ipcMain.handle('data:delete', (_e, fileType) => dataFile.deleteData(fileType))

// dialog
ipcMain.handle('dialog:open-folder', (_e, options) => dialogSvc.openFolder(options))
ipcMain.handle('dialog:open-file', (_e, options) => dialogSvc.openFile(options))

// path
ipcMain.handle('path:format', (_e, filePath) => pathSvc.format(filePath))
ipcMain.handle('path:check-existence', (_e, path) => pathSvc.checkExistence(path))

// project
ipcMain.handle('project:analyze', (e, folderPath) => projectSvc.analyzeProject(e, folderPath))
ipcMain.handle('project:read-license', (_e, folderPath, maxLines) => projectSvc.readLicense(folderPath, maxLines))
ipcMain.handle('project:open', (_e, idePath, projectPath) => projectSvc.openInIDE(idePath, projectPath))
ipcMain.handle('project:delete', (_e, projectPath) => projectSvc.deleteProject(projectPath))
ipcMain.handle('project:import', () => projectSvc.importProjects())
ipcMain.handle('project:export', () => projectSvc.exportProjects())

// scanner
ipcMain.handle('scanner:start', (e, payload) => scanner.start(e, payload))
ipcMain.handle('scanner:stop', (_e, sessionId) => scanner.stop(sessionId))
ipcMain.handle('scanner:detect-jb-config-root-path', () => scanner.detectJetBrainsConfigRootPath())
ipcMain.handle('scanner:detect-vsc-state-db-path', () => scanner.detectVscodeStateDbPath())

// system
ipcMain.handle('external:open', (_e, url) => systemSvc.openExternal(url))
ipcMain.handle('explorer:open', (_e, folderPath) => systemSvc.openInExplorer(folderPath))
ipcMain.handle('terminal:open', (_e, folderPath) => systemSvc.openInTerminal(folderPath))

// theme
ipcMain.handle('theme:set', (_e, theme) => themeSvc.setTheme(theme))

// update
ipcMain.handle('update:check', () => updateSvc.checkUpdate())
63 changes: 0 additions & 63 deletions electron/ipc/dataFile.ts

This file was deleted.

18 changes: 0 additions & 18 deletions electron/ipc/dialog.ts

This file was deleted.

40 changes: 0 additions & 40 deletions electron/ipc/folder.ts

This file was deleted.

10 changes: 0 additions & 10 deletions electron/ipc/index.ts

This file was deleted.

27 changes: 0 additions & 27 deletions electron/ipc/path.ts

This file was deleted.

118 changes: 0 additions & 118 deletions electron/ipc/scanner.ts

This file was deleted.

33 changes: 0 additions & 33 deletions electron/ipc/settings.ts

This file was deleted.

2 changes: 1 addition & 1 deletion electron/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './ipc/index'
import './ipc'

import * as path from 'node:path'
import { fileURLToPath } from 'node:url'
Expand Down
Loading
Loading