diff options
author | 2022-04-22 15:04:21 -0500 | |
---|---|---|
committer | 2022-04-22 20:04:21 +0000 | |
commit | 759d93dc198a3cc8c5265245c0144efa5435682b (patch) | |
tree | 53e963a085d3d12af5a2efa2f1ab6f3e5574edc7 /src/api/server/LocalApi.ts | |
parent | Added build scripts for linux, macos and windows to help new contributors get... (diff) | |
download | ferdium-app-759d93dc198a3cc8c5265245c0144efa5435682b.tar.gz ferdium-app-759d93dc198a3cc8c5265245c0144efa5435682b.tar.zst ferdium-app-759d93dc198a3cc8c5265245c0144efa5435682b.zip |
Turn off usage of 'debug' npm package using with electron-16 (fixes #17)
Diffstat (limited to 'src/api/server/LocalApi.ts')
-rw-r--r-- | src/api/server/LocalApi.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/api/server/LocalApi.ts b/src/api/server/LocalApi.ts index 5e205cbe4..28028bf80 100644 --- a/src/api/server/LocalApi.ts +++ b/src/api/server/LocalApi.ts | |||
@@ -4,14 +4,15 @@ import fastFolderSize from 'fast-folder-size'; | |||
4 | 4 | ||
5 | import { getServicePartitionsDirectory } from '../../helpers/service-helpers'; | 5 | import { getServicePartitionsDirectory } from '../../helpers/service-helpers'; |
6 | 6 | ||
7 | const debug = require('debug')('Ferdium:LocalApi'); | 7 | // TODO: Go back to 'debug' from 'console.log' when https://github.com/electron/electron/issues/31689 is fixed |
8 | // const debug = require('debug')('Ferdium:LocalApi'); | ||
8 | 9 | ||
9 | export default class LocalApi { | 10 | export default class LocalApi { |
10 | // Settings | 11 | // Settings |
11 | getAppSettings(type: string) { | 12 | getAppSettings(type: string) { |
12 | return new Promise(resolve => { | 13 | return new Promise(resolve => { |
13 | ipcRenderer.once('appSettings', (_event, resp) => { | 14 | ipcRenderer.once('appSettings', (_event, resp) => { |
14 | debug('LocalApi::getAppSettings resolves', resp.type, resp.data); | 15 | console.log('LocalApi::getAppSettings resolves', resp.type, resp.data); |
15 | resolve(resp); | 16 | resolve(resp); |
16 | }); | 17 | }); |
17 | 18 | ||
@@ -20,7 +21,7 @@ export default class LocalApi { | |||
20 | } | 21 | } |
21 | 22 | ||
22 | async updateAppSettings(type: string, data: any) { | 23 | async updateAppSettings(type: string, data: any) { |
23 | debug('LocalApi::updateAppSettings resolves', type, data); | 24 | console.log('LocalApi::updateAppSettings resolves', type, data); |
24 | ipcRenderer.send('updateAppSettings', { | 25 | ipcRenderer.send('updateAppSettings', { |
25 | type, | 26 | type, |
26 | data, | 27 | data, |
@@ -39,7 +40,7 @@ export default class LocalApi { | |||
39 | reject(err); | 40 | reject(err); |
40 | } | 41 | } |
41 | 42 | ||
42 | debug('LocalApi::getAppCacheSize resolves', bytes); | 43 | console.log('LocalApi::getAppCacheSize resolves', bytes); |
43 | resolve(bytes); | 44 | resolve(bytes); |
44 | }, | 45 | }, |
45 | ); | 46 | ); |