Browse Source
Add access to db,commands,store in the console
gre-patch-1
Gaëtan Renaudeau
6 years ago
No known key found for this signature in database
GPG Key ID: 7B66B85F042E5451
2 changed files with
12 additions and
0 deletions
-
src/commands/index.js
-
src/renderer/init.js
|
|
@ -69,8 +69,11 @@ const all: Array<Command<any, any>> = [ |
|
|
|
uninstallApp, |
|
|
|
] |
|
|
|
|
|
|
|
export const commandsById = {} |
|
|
|
|
|
|
|
all.forEach(cmd => { |
|
|
|
invariant(!all.some(c => c !== cmd && c.id === cmd.id), `duplicate command '${cmd.id}'`) |
|
|
|
commandsById[cmd.id] = cmd |
|
|
|
}) |
|
|
|
|
|
|
|
export default all |
|
|
|
|
|
@ -18,6 +18,7 @@ import { fetchAccounts } from 'actions/accounts' |
|
|
|
import { fetchSettings } from 'actions/settings' |
|
|
|
import { lock } from 'reducers/application' |
|
|
|
import { languageSelector, sentryLogsSelector } from 'reducers/settings' |
|
|
|
import { commandsById } from 'commands' |
|
|
|
import libcoreGetVersion from 'commands/libcoreGetVersion' |
|
|
|
|
|
|
|
import resolveUserDataDirectory from 'helpers/resolveUserDataDirectory' |
|
|
@ -111,6 +112,14 @@ async function init() { |
|
|
|
}, |
|
|
|
false, |
|
|
|
) |
|
|
|
|
|
|
|
// expose stuff in Windows for DEBUG purpose
|
|
|
|
|
|
|
|
window.ledger = { |
|
|
|
commands: commandsById, |
|
|
|
store, |
|
|
|
db, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function r(Comp) { |
|
|
|