Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Use default import instead of star import

Manav Rathi140b65b69d9e
diff --git a/desktop/src/main.ts b/desktop/src/main.ts
index cb0d3f6e5b..3644e3b249 100644
--- a/desktop/src/main.ts
+++ b/desktop/src/main.ts
@@ -8,12 +8,12 @@
*
* https://www.electronjs.org/docs/latest/tutorial/process-model#the-main-process
*/
-import * as log from "electron-log";
+import log from "electron-log";
import { app, BrowserWindow } from "electron/main";
import serveNextAt from "next-electron-server";
import { existsSync } from "node:fs";
-import * as fs from "node:fs/promises";
-import * as path from "node:path";
+import fs from "node:fs/promises";
+import path from "node:path";
import { isDev } from "./main/general";
import { attachFSWatchIPCHandlers, attachIPCHandlers } from "./main/ipc";
import { logErrorSentry, setupLogging } from "./main/log";
diff --git a/desktop/src/main/dialogs.ts b/desktop/src/main/dialogs.ts
index a4efed473a..80813a78f5 100644
--- a/desktop/src/main/dialogs.ts
+++ b/desktop/src/main/dialogs.ts
@@ -1,5 +1,5 @@
import { dialog } from "electron/main";
-import * as path from "node:path";
+import path from "node:path";
import { getDirFilePaths, getElectronFile } from "../services/fs";
import { getElectronFilesFromGoogleZip } from "../services/upload";
import type { ElectronFile } from "../types";
diff --git a/desktop/src/main/fs.ts b/desktop/src/main/fs.ts
index f56e765c0b..cf34acb782 100644
--- a/desktop/src/main/fs.ts
+++ b/desktop/src/main/fs.ts
@@ -2,8 +2,8 @@
* @file file system related functions exposed over the context bridge.
*/
import { createWriteStream, existsSync } from "node:fs";
-import * as fs from "node:fs/promises";
-import * as path from "node:path";
+import fs from "node:fs/promises";
+import path from "node:path";
import { Readable } from "node:stream";
import { logError } from "./log";
diff --git a/desktop/src/main/general.ts b/desktop/src/main/general.ts
index a92656e31c..e0b7654fe1 100644
--- a/desktop/src/main/general.ts
+++ b/desktop/src/main/general.ts
@@ -1,6 +1,6 @@
import { shell } from "electron"; /* TODO(MR): Why is this not in /main? */
import { app } from "electron/main";
-import * as path from "node:path";
+import path from "node:path";
/** `true` if the app is running in development mode. */
export const isDev = !app.isPackaged;
diff --git a/desktop/src/services/chokidar.ts b/desktop/src/services/chokidar.ts
index 81107536e3..57a0e504ee 100644
--- a/desktop/src/services/chokidar.ts
+++ b/desktop/src/services/chokidar.ts
@@ -1,6 +1,6 @@
import chokidar from "chokidar";
import { BrowserWindow } from "electron";
-import * as path from "path";
+import path from "path";
import { logError } from "../main/log";
import { getWatchMappings } from "../services/watch";
import { getElectronFile } from "./fs";
diff --git a/desktop/src/services/clipService.ts b/desktop/src/services/clipService.ts
index a01501d1f3..7874d56207 100644
--- a/desktop/src/services/clipService.ts
+++ b/desktop/src/services/clipService.ts
@@ -1,8 +1,8 @@
-import * as log from "electron-log";
+import log from "electron-log";
import { app, net } from "electron/main";
import { existsSync } from "fs";
-import * as fs from "node:fs/promises";
-import * as path from "node:path";
+import fs from "node:fs/promises";
+import path from "node:path";
import util from "util";
import { CustomErrors } from "../constants/errors";
import { writeStream } from "../main/fs";
diff --git a/desktop/src/services/ffmpeg.ts b/desktop/src/services/ffmpeg.ts
index 50fcfd54f0..b04c84c793 100644
--- a/desktop/src/services/ffmpeg.ts
+++ b/desktop/src/services/ffmpeg.ts
@@ -1,7 +1,7 @@
import log from "electron-log";
import pathToFfmpeg from "ffmpeg-static";
import { existsSync } from "node:fs";
-import * as fs from "node:fs/promises";
+import fs from "node:fs/promises";
import util from "util";
import { CustomErrors } from "../constants/errors";
import { writeStream } from "../main/fs";
diff --git a/desktop/src/services/fs.ts b/desktop/src/services/fs.ts
index 6e4fff214c..3b9a63802c 100644
--- a/desktop/src/services/fs.ts
+++ b/desktop/src/services/fs.ts
@@ -1,7 +1,7 @@
import StreamZip from "node-stream-zip";
import { existsSync } from "node:fs";
-import * as fs from "node:fs/promises";
-import * as path from "node:path";
+import fs from "node:fs/promises";
+import path from "node:path";
import { logError } from "../main/log";
import { ElectronFile } from "../types";
diff --git a/desktop/src/services/imageProcessor.ts b/desktop/src/services/imageProcessor.ts
index a799ba83fc..1abc78451e 100644
--- a/desktop/src/services/imageProcessor.ts
+++ b/desktop/src/services/imageProcessor.ts
@@ -1,7 +1,7 @@
import { exec } from "child_process";
import log from "electron-log";
import { existsSync } from "fs";
-import * as fs from "node:fs/promises";
+import fs from "node:fs/promises";
import path from "path";
import util from "util";
import { CustomErrors } from "../constants/errors";
diff --git a/desktop/src/utils/createWindow.ts b/desktop/src/utils/createWindow.ts
index 23dd5128c3..baebfed986 100644
--- a/desktop/src/utils/createWindow.ts
+++ b/desktop/src/utils/createWindow.ts
@@ -1,11 +1,11 @@
import { app, BrowserWindow, nativeImage } from "electron";
import ElectronLog from "electron-log";
-import * as path from "path";
+import path from "path";
import { isAppQuitting, rendererURL } from "../main";
-import autoLauncher from "../services/autoLauncher";
+import { isDev } from "../main/general";
import { logErrorSentry } from "../main/log";
+import autoLauncher from "../services/autoLauncher";
import { getHideDockIconPreference } from "../services/userPreference";
-import { isDev } from "../main/general";
import { isPlatform } from "./common/platform";
/**
diff --git a/desktop/src/utils/temp.ts b/desktop/src/utils/temp.ts
index 099e6b6674..489e5cbd47 100644
--- a/desktop/src/utils/temp.ts
+++ b/desktop/src/utils/temp.ts
@@ -1,6 +1,6 @@
import { app } from "electron/main";
import { existsSync } from "node:fs";
-import * as fs from "node:fs/promises";
+import fs from "node:fs/promises";
import path from "path";
const CHARACTERS =