feat: remove unnecessary export default for better tree-shaking

This commit is contained in:
JellyBrick
2025-09-06 22:31:02 +09:00
parent 26fa1f85b2
commit c1a06ab955
29 changed files with 53 additions and 81 deletions

View File

@ -1,7 +1,7 @@
import { createRoute, z } from '@hono/zod-openapi';
import { ipcMain } from 'electron';
import getSongControls from '@/providers/song-controls';
import { getSongControls } from '@/providers/song-controls';
import {
LikeType,
type RepeatMode,

View File

@ -1,17 +1,15 @@
import net from 'net';
import * as net from 'node:net';
import { SocksClient, type SocksClientOptions } from 'socks';
import is from 'electron-is';
import { createBackend, LoggerPrefix } from '@/utils';
import { type BackendType } from './types';
import config from '@/config';
import * as config from '@/config';
import { type AuthProxyConfig, defaultAuthProxyConfig } from '../config';
import type { BackendType } from './types';
import type { BackendContext } from '@/types/contexts';
// Parsing the upstream authentication SOCK proxy URL

View File

@ -2,7 +2,7 @@ import { createSignal } from 'solid-js';
import { render } from 'solid-js/web';
import defaultConfig from '@/config/defaults';
import { defaultConfig } from '@/config/defaults';
import { getSongMenu } from '@/providers/dom-elements';
import { getSongInfo } from '@/providers/song-info-front';
import { t } from '@/i18n';

View File

@ -7,7 +7,7 @@ import previousIcon from '@assets/media-icons-black/previous.png?asset&asarUnpac
import { notificationImage, secondsToMinutes, ToastStyles } from './utils';
import getSongControls from '@/providers/song-controls';
import { getSongControls } from '@/providers/song-controls';
import {
registerCallback,
type SongInfo,

View File

@ -2,8 +2,8 @@ import { type BrowserWindow, globalShortcut } from 'electron';
import is from 'electron-is';
import { register as registerElectronLocalShortcut } from 'electron-localshortcut';
import registerMPRIS from './mpris';
import getSongControls from '@/providers/song-controls';
import { registerMPRIS } from './mpris';
import { getSongControls } from '@/providers/song-controls';
import type { ShortcutMappingType, ShortcutsPluginConfig } from './index';

View File

@ -19,8 +19,8 @@ import {
type SongInfo,
SongInfoEvent,
} from '@/providers/song-info';
import getSongControls from '@/providers/song-controls';
import config from '@/config';
import { getSongControls } from '@/providers/song-controls';
import * as config from '@/config';
import { LoggerPrefix } from '@/utils';
import type { RepeatMode, VolumeState } from '@/types/datahost-get-state';
@ -84,7 +84,7 @@ function setupMPRIS() {
return instance;
}
function registerMPRIS(win: BrowserWindow) {
export function registerMPRIS(win: BrowserWindow) {
const songControls = getSongControls(win);
const {
playPause,
@ -363,5 +363,3 @@ function registerMPRIS(win: BrowserWindow) {
console.trace(error);
}
}
export default registerMPRIS;

View File

@ -1,4 +1,4 @@
import { z } from 'zod';
import * as z from 'zod';
import { LRC } from '../parsers/lrc';
import { netFetch } from '../renderer';

View File

@ -7,7 +7,7 @@ import nextIcon from '@assets/media-icons-black/next.png?asset&asarUnpack';
import previousIcon from '@assets/media-icons-black/previous.png?asset&asarUnpack';
import { createPlugin } from '@/utils';
import getSongControls from '@/providers/song-controls';
import { getSongControls } from '@/providers/song-controls';
import {
registerCallback,
type SongInfo,

View File

@ -1,7 +1,7 @@
import { nativeImage, type NativeImage, TouchBar } from 'electron';
import { createPlugin } from '@/utils';
import getSongControls from '@/providers/song-controls';
import { getSongControls } from '@/providers/song-controls';
import { registerCallback, SongInfoEvent } from '@/providers/song-info';
import { t } from '@/i18n';