mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
chore(repo): prune dead code and duplicate abstractions (#3413)
This commit is contained in:
1 parent
c17091768c
commit
c9fdf8fead
2937 files changed
+42233
-176793
No files matched your search
@@ -26,6 +26,8 @@ function transform(relativePath) {
|
||||
const constantsSource = transform('../common/Constants.ts');
|
||||
const localAppRouteContractSource = transform('../../../packages/desktop_ipc/src/LocalAppRouteContract.ts');
|
||||
const desktopConfigSource = transform('../common/DesktopConfig.ts');
|
||||
const plainRecordSource = transform('../common/PlainRecord.ts');
|
||||
const recordGuardsSource = transform('../../../packages/record_utils/src/RecordGuards.ts');
|
||||
const globalShortcutActionsSource = transform('../common/GlobalShortcutActions.ts');
|
||||
|
||||
const silentLog = {debug() {}, info() {}, warn() {}, error() {}};
|
||||
@@ -62,7 +64,15 @@ function loadDesktop({channel = 'stable', settings} = {}) {
|
||||
const globalShortcutActions = runModule(globalShortcutActionsSource, (specifier) => {
|
||||
throw new Error(`Unexpected import: ${specifier}`);
|
||||
});
|
||||
const plainRecord = runModule(plainRecordSource, (specifier) => {
|
||||
throw new Error(`Unexpected import: ${specifier}`);
|
||||
});
|
||||
const recordGuards = runModule(recordGuardsSource, (specifier) => {
|
||||
throw new Error(`Unexpected import: ${specifier}`);
|
||||
});
|
||||
const desktopConfig = runModule(desktopConfigSource, (specifier) => {
|
||||
if (specifier === '@electron/common/PlainRecord') return plainRecord;
|
||||
if (specifier === '@fluxer/record_utils/src/RecordGuards') return recordGuards;
|
||||
if (specifier === 'node:fs') return fs;
|
||||
if (specifier === '@electron/common/GlobalShortcutActions') return globalShortcutActions;
|
||||
if (specifier === 'node:path') return path;
|
||||
|
||||
Reference in new issue
Block a user