Skip to content

Commit 50ad8e3

Browse files
feat(scanner): finish IDE scanning add i18n (#5)
* feat(scanner): implement VSCode recent projects detection and enhance file/folder dialog options * refactor(ipc): refactor and move ipc function to services * dependencies: update version * feat(scanner): enhance project scanning with JetBrains and VSCode recent projects detection * fix(dependencies): add override for '@electron/node-gyp' to use GitHub repository * fix: update type definitions for IDE entries and improve type safety * feat(scanner): add i18n support
1 parent 4876497 commit 50ad8e3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+4123
-2974
lines changed

.github/workflows/release-it.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
workflow_dispatch:
99
inputs:
1010
increment:
11+
description: 选择版本号递增方式
1112
required: true
1213
default: patch
1314
type: choice

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

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

README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

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

electron/ipc.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import { ipcMain } from 'electron'
2+
3+
import * as dataFile from './services/dataFileService'
4+
import * as dialogSvc from './services/dialogService'
5+
import * as pathSvc from './services/pathService'
6+
import * as projectSvc from './services/projectService'
7+
import * as scanner from './services/scannerService'
8+
import * as systemSvc from './services/systemService'
9+
import * as themeSvc from './services/themeService'
10+
import * as updateSvc from './services/updateService'
11+
12+
// data file
13+
ipcMain.handle('data:save', (_e, fileType, data) => dataFile.saveData(fileType, data))
14+
ipcMain.handle('data:load', (_e, fileType) => dataFile.loadData(fileType))
15+
ipcMain.handle('data:open', (_e, fileType) => dataFile.openData(fileType))
16+
ipcMain.handle('data:delete', (_e, fileType) => dataFile.deleteData(fileType))
17+
18+
// dialog
19+
ipcMain.handle('dialog:open-folder', (_e, options) => dialogSvc.openFolder(options))
20+
ipcMain.handle('dialog:open-file', (_e, options) => dialogSvc.openFile(options))
21+
22+
// path
23+
ipcMain.handle('path:format', (_e, filePath) => pathSvc.format(filePath))
24+
ipcMain.handle('path:check-existence', (_e, path) => pathSvc.checkExistence(path))
25+
26+
// project
27+
ipcMain.handle('project:analyze', (e, folderPath) => projectSvc.analyzeProject(e, folderPath))
28+
ipcMain.handle('project:read-license', (_e, folderPath, maxLines) => projectSvc.readLicense(folderPath, maxLines))
29+
ipcMain.handle('project:open', (_e, idePath, projectPath) => projectSvc.openInIDE(idePath, projectPath))
30+
ipcMain.handle('project:delete', (_e, projectPath) => projectSvc.deleteProject(projectPath))
31+
ipcMain.handle('project:import', () => projectSvc.importProjects())
32+
ipcMain.handle('project:export', () => projectSvc.exportProjects())
33+
34+
// scanner
35+
ipcMain.handle('scanner:start', (e, payload) => scanner.start(e, payload))
36+
ipcMain.handle('scanner:stop', (_e, sessionId) => scanner.stop(sessionId))
37+
ipcMain.handle('scanner:detect-jb-config-root-path', () => scanner.detectJetBrainsConfigRootPath())
38+
ipcMain.handle('scanner:detect-vsc-state-db-path', () => scanner.detectVscodeStateDbPath())
39+
40+
// system
41+
ipcMain.handle('external:open', (_e, url) => systemSvc.openExternal(url))
42+
ipcMain.handle('explorer:open', (_e, folderPath) => systemSvc.openInExplorer(folderPath))
43+
ipcMain.handle('terminal:open', (_e, folderPath) => systemSvc.openInTerminal(folderPath))
44+
45+
// theme
46+
ipcMain.handle('theme:set', (_e, theme) => themeSvc.setTheme(theme))
47+
48+
// update
49+
ipcMain.handle('update:check', () => updateSvc.checkUpdate())

electron/ipc/dataFile.ts

Lines changed: 0 additions & 63 deletions
This file was deleted.

electron/ipc/dialog.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

electron/ipc/folder.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.

electron/ipc/index.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

electron/ipc/path.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

electron/ipc/scanner.ts

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)