Skip to content

Commit

Permalink
Upgraded dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschwendener committed Mar 17, 2020
1 parent 4880712 commit 952d6e4
Show file tree
Hide file tree
Showing 9 changed files with 1,861 additions and 1,920 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,24 @@
},
"devDependencies": {
"@types/color": "^3.0.0",
"@types/jest": "^24.0.25",
"@types/jest": "^25.1.4",
"@types/mathjs": "^5.0.1",
"@types/node-powershell": "^3.1.0",
"@types/vue-color": "^2.4.2",
"axios": "^0.19.0",
"color": "^3.1.2",
"electron": "^5.0.9",
"electron-builder": "^21.2.0",
"electron-store": "^3.2.0",
"electron": "^8.1.1",
"electron-builder": "^22.4.1",
"electron-store": "^5.1.1",
"electron-updater": "^4.0.14",
"fuse.js": "^3.4.4",
"jest": "^24.9.0",
"fuse.js": "^5.0.3-beta",
"jest": "^25.1.0",
"mathjs": "^5.10.3",
"node-powershell": "^4.0.0",
"simple-plist": "^1.0.0",
"ts-jest": "^24.2.0",
"ts-jest": "^25.2.1",
"ts-loader": "^6.0.4",
"tslint": "^5.18.0",
"tslint": "^6.1.0",
"typescript": "^3.5.3",
"vue": "^2.6.10",
"vue-color": "^2.7.0",
Expand All @@ -66,7 +66,7 @@
},
"dependencies": {
"@fortawesome/fontawesome-free": "^5.10.1",
"bulma": "^0.7.5",
"bulma": "^0.8.0",
"bulma-extensions": "^6.2.7"
}
}
2 changes: 1 addition & 1 deletion src/common/config/electron-store-config-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { UserConfigOptions } from "./user-config-options";
import { mergeUserConfigWithDefault } from "../helpers/config-helpers";

export class ElectronStoreConfigRepository implements ConfigRepository {
private readonly store: Store<UserConfigOptions>;
private readonly store: Store;
private readonly configStoreKey = "userConfigOptions";
private readonly defaultOptions: UserConfigOptions;

Expand Down
19 changes: 9 additions & 10 deletions src/common/icon/generate-file-icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@ export interface FileIconDataResult {
}

export function getFileIconDataUrl(filePath: string, defaultFileIcon: Icon, folderIcon?: Icon): Promise<FileIconDataResult> {
const defaultResult = {
filePath,
icon: defaultFileIcon,
};

return new Promise((resolve, reject) => {
FileHelpers.fileExists(filePath)
.then((fileExistsResult) => {
if (fileExistsResult.fileExists) {
app.getFileIcon(filePath, (err, icon) => {
const defaultResult = {
filePath,
icon: defaultFileIcon,
};
if (err) {
resolve(defaultResult);
} else {
app.getFileIcon(filePath)
.then((icon) => {
FileHelpers.getStats(filePath)
.then((stats) => {
const isDirectory = stats.stats.isDirectory() && !filePath.endsWith(".app");
Expand All @@ -32,8 +31,8 @@ export function getFileIconDataUrl(filePath: string, defaultFileIcon: Icon, fold
});
})
.catch(() => resolve(defaultResult));
}
});
})
.catch(() => resolve(defaultResult));
} else {
resolve({
filePath,
Expand Down
6 changes: 3 additions & 3 deletions src/main/executors/file-path-location-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { shell } from "electron";

export function openFileLocation(filePath: string): Promise<void> {
return new Promise((resolve, reject) => {
const success = shell.showItemInFolder(filePath);
if (success) {
try {
shell.showItemInFolder(filePath);
resolve();
} else {
} catch (error) {
reject(`Could not open the location of ${filePath}`);
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/main/favorites/electron-store-favorite-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { SearchResultItem } from "../../common/search-result-item";
import Store = require("electron-store");

export class ElectronStoreFavoriteRepository implements FavoriteRepository {
private readonly store: Store<Favorite[]>;
private readonly store: Store;
private readonly favoritesStoreKey = "favorites";
private favorites: Favorite[];

Expand Down
46 changes: 20 additions & 26 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ function registerAllIpcListeners() {
updateConfig(updatedConfig, needsIndexRefresh, pluginType);
});

ipcMain.on(IpcChannels.search, (event: Electron.Event, userInput: string) => {
ipcMain.on(IpcChannels.search, (event: Electron.IpcMainEvent, userInput: string) => {
searchEngine.getSearchResults(userInput)
.then((result) => updateSearchResults(result, event.sender))
.catch((err) => {
Expand All @@ -604,7 +604,7 @@ function registerAllIpcListeners() {
});
});

ipcMain.on(IpcChannels.favoritesRequested, (event: Electron.Event) => {
ipcMain.on(IpcChannels.favoritesRequested, (event: Electron.IpcMainEvent) => {
searchEngine.getFavorites()
.then((result) => updateSearchResults(result, event.sender))
.catch((err) => {
Expand Down Expand Up @@ -639,7 +639,7 @@ function registerAllIpcListeners() {
});
});

ipcMain.on(IpcChannels.autoComplete, (event: Electron.Event, searchResultItem: SearchResultItem) => {
ipcMain.on(IpcChannels.autoComplete, (event: Electron.IpcMainEvent, searchResultItem: SearchResultItem) => {
const updatedUserInput = searchEngine.autoComplete(searchResultItem);
event.sender.send(IpcChannels.autoCompleteResponse, updatedUserInput);
});
Expand All @@ -652,27 +652,19 @@ function registerAllIpcListeners() {
openSettings();
});

ipcMain.on(IpcChannels.folderPathRequested, (event: Electron.Event) => {
dialog.showOpenDialog(settingsWindow, {
properties: ["openDirectory"],
}, (folderPaths: string[]) => {
event.sender.send(IpcChannels.folderPathResult, folderPaths);
});
ipcMain.on(IpcChannels.folderPathRequested, (event: Electron.IpcMainEvent) => {
dialog.showOpenDialog(settingsWindow, { properties: ["openDirectory"] })
.then((folderPaths) => event.sender.send(IpcChannels.folderPathResult, folderPaths))
.catch(() => event.sender.send(IpcChannels.folderPathResult, []));
});

ipcMain.on(IpcChannels.filePathRequested, (event: Electron.Event, filters?: Electron.FileFilter[]) => {
dialog.showOpenDialog(settingsWindow, {
filters,
properties: ["openFile"],
}, (filePaths: string[]) => {
if (!filePaths) {
filePaths = [];
}
event.sender.send(IpcChannels.filePathResult, filePaths);
});
ipcMain.on(IpcChannels.filePathRequested, (event: Electron.IpcMainEvent, filters?: Electron.FileFilter[]) => {
dialog.showOpenDialog(settingsWindow, { filters, properties: ["openFile"] })
.then((filePaths) => event.sender.send(IpcChannels.filePathResult, filePaths))
.catch(() => event.sender.send(IpcChannels.filePathResult, []));
});

ipcMain.on(IpcChannels.clearExecutionLogConfirmed, (event: Electron.Event) => {
ipcMain.on(IpcChannels.clearExecutionLogConfirmed, () => {
searchEngine.clearExecutionLog()
.then(() => notifyRenderer(translationSet.successfullyClearedExecutionLog, NotificationType.Info))
.catch((err) => {
Expand All @@ -681,24 +673,26 @@ function registerAllIpcListeners() {
});
});

ipcMain.on(IpcChannels.openDebugLogRequested, (event: Electron.Event) => {
ipcMain.on(IpcChannels.openDebugLogRequested, () => {
logger.openLog()
.then(() => { /* do nothing */ })
.catch((err) => notifyRenderer(err, NotificationType.Error));
});

ipcMain.on(IpcChannels.openTempFolderRequested, (event: Electron.Event) => {
ipcMain.on(IpcChannels.openTempFolderRequested, () => {
filePathExecutor(ueliTempFolder, false);
});

ipcMain.on(IpcChannels.selectInputHistoryItem, (event: Electron.Event, direction: string) => {
ipcMain.on(IpcChannels.selectInputHistoryItem, (event: Electron.IpcMainEvent, direction: string) => {
const newUserInput = direction === "next"
? userInputHistoryManager.getNext()
: userInputHistoryManager.getPrevious();
event.sender.send(IpcChannels.userInputUpdated, newUserInput, true);
});

ipcMain.on(IpcChannels.ueliCommandExecuted, (command: UeliCommand) => {
ipcMain.on(IpcChannels.ueliCommandExecuted, (command: any) => {
command = command as UeliCommand;

switch (command.executionArgument) {
case UeliCommandExecutionArgument.Exit:
quitApp();
Expand All @@ -724,7 +718,7 @@ function registerAllIpcListeners() {
}
});

ipcMain.on(IpcChannels.checkForUpdate, (event: Electron.Event) => {
ipcMain.on(IpcChannels.checkForUpdate, () => {
logger.debug("Check for updates");
if (isDev()) {
sendMessageToSettingsWindow(IpcChannels.checkForUpdateResponse, UpdateCheckResult.NoUpdateAvailable);
Expand All @@ -733,7 +727,7 @@ function registerAllIpcListeners() {
}
});

ipcMain.on(IpcChannels.downloadUpdate, (event: Electron.Event) => {
ipcMain.on(IpcChannels.downloadUpdate, () => {
if (isWindows(platform())) {
logger.debug("Downloading updated");
autoUpdater.downloadUpdate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class ControlPanelItemsRetriever {
.then(() => shell.invoke())
.then(
(controlPanelItemIconsJson) => {
const controlPanelItemIcons: Array<{ applicationName: string, iconBase64: string }> = JSON.parse(controlPanelItemIconsJson);
const controlPanelItemIcons: { applicationName: string, iconBase64: string }[] = JSON.parse(controlPanelItemIconsJson);
for (const icon of controlPanelItemIcons) {
const item = newControlPanelItems.find((i) => i.CanonicalName === icon.applicationName);
if (item != null && icon.iconBase64 != null) {
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/settings/settings-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ export const settingsComponent = Vue.extend({
visible: false,
},
pluginSettingMenuItems: Object.values(PluginSettings)
.map((setting) => setting.toString())
.concat(Object
.values(SettingOsSpecific)
.map((setting) => setting.toString())
.filter((setting: string) => setting.startsWith(platform()))
.map((setting: string) => setting.replace(`${platform()}:`, "")))
.sort(),
Expand Down
Loading

0 comments on commit 952d6e4

Please sign in to comment.