Skip to content
This repository was archived by the owner on Feb 9, 2026. It is now read-only.

Commit d8e727d

Browse files
refactor: Create modules dir and move most logic into it
1 parent d5f46c5 commit d8e727d

File tree

13 files changed

+13
-13
lines changed

13 files changed

+13
-13
lines changed

src/main/events.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import electron, { shell } from "electron";
2-
import { installMod, getReleaseMetadata, isInstallPossible, updatePaths, checkMacPermissions } from "./patcher.js";
3-
import { deleteLegacyYM } from "./utils.js";
4-
import { getState } from "./state.js";
2+
import { installMod, getReleaseMetadata, isInstallPossible, updatePaths, checkMacPermissions } from "./modules/patcher.js";
3+
import { deleteLegacyYM } from "./modules/utils.js";
4+
import { getState } from "./modules/state.js";
55
import { mainWindow } from "./index.js";
66
import Events from "./types/Events.js";
77

src/main/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import installExtension, { REACT_DEVELOPER_TOOLS } from 'electron-devtools-installer';
22
import { handleApplicationEvents } from './events.js'
3-
import { handleDeeplinkOnApplicationStartup, handleDeeplink } from './handleDeeplinks.js';
4-
import { getNativeImg } from './utils.js';
5-
import { getState } from "./state.js";
6-
import { checkForSingleInstance } from './singleInstance.js';
3+
import { handleDeeplinkOnApplicationStartup, handleDeeplink } from './modules/handleDeeplinks.js';
4+
import { getNativeImg } from './modules/utils.js';
5+
import { getState } from "./modules/state.js";
6+
import { checkForSingleInstance } from './modules/singleInstance.js';
77
import electron, { app, BrowserWindow } from 'electron';
88
import config from './config.js';
99

File renamed without changes.

src/main/deeplinkCommands/patch/index.js renamed to src/main/modules/deeplinkCommands/patch/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Events from '../../types/Events.js';
2-
import PatchTypes from '../../types/PatchTypes.js';
1+
import Events from '../../../types/Events.js';
2+
import PatchTypes from '../../../types/PatchTypes.js';
33
import { ipcMain } from 'electron';
44
import { getState } from '../../state.js';
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import deeplinkCommands from './deeplinkCommands/index.js';
22
import electron from 'electron';
3-
import config from './config.js';
3+
import config from '../config.js';
44

55

66
const transformUrl = (url) => {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import plist from 'plist';
1414
import { downloadFile, isYandexMusicRunning, closeYandexMusic, launchYandexMusic, isMac, isWin, isLinux, checkIfLegacyYMInstalled } from "./utils.js";
1515
import { getState } from "./state.js";
1616

17-
import Events from "./types/Events.js";
18-
import PatchTypes from './types/PatchTypes.js';
17+
import Events from "../types/Events.js";
18+
import PatchTypes from '../types/PatchTypes.js';
1919

2020
const State = getState();
2121

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getStore } from "./store.js";
2-
import { sendStateUpdated } from "./events.js";
2+
import { sendStateUpdated } from "../events.js";
33

44

55
class State {

0 commit comments

Comments
 (0)