From c4c3fdb45ad2bf14887ff57eaca821c79bba1be2 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 27 Jun 2018 11:51:13 +0200 Subject: [PATCH] rename fileprovider keys --- src/app.js | 17 +++++++++-------- src/app/plugin/pluginAPI.js | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/app.js b/src/app.js index bfef9b84b4..fb42301102 100644 --- a/src/app.js +++ b/src/app.js @@ -133,8 +133,8 @@ class App { self._api.filesProviders['browser'] = new Browserfiles(fileStorage) self._api.filesProviders['config'] = new BrowserfilesTree('config', configStorage) self._api.filesProviders['config'].init() - registry.put({api: self._api.filesProviders['browser'], name: 'fileProviders/browser'}) - registry.put({api: self._api.filesProviders['config'], name: 'fileProviders/config'}) + registry.put({api: self._api.filesProviders['browser'], name: 'fileproviders/browser'}) + registry.put({api: self._api.filesProviders['config'], name: 'fileproviders/config'}) var remixd = new Remixd() registry.put({api: remixd, name: 'remixd/config'}) remixd.event.register('system', (message) => { @@ -145,15 +145,16 @@ class App { self._api.filesProviders['github'] = new BasicReadOnlyExplorer('github') self._api.filesProviders['gist'] = new NotPersistedExplorer('gist') self._api.filesProviders['ipfs'] = new BasicReadOnlyExplorer('ipfs') - registry.put({api: self._api.filesProviders['localhost'], name: 'fileProviders/localhost'}) - registry.put({api: self._api.filesProviders['swarm'], name: 'fileProviders/swarm'}) - registry.put({api: self._api.filesProviders['github'], name: 'fileProviders/github'}) - registry.put({api: self._api.filesProviders['gist'], name: 'fileProviders/gist'}) - registry.put({api: self._api.filesProviders['ipfs'], name: 'fileProviders/ipfs'}) + registry.put({api: self._api.filesProviders['localhost'], name: 'fileproviders/localhost'}) + registry.put({api: self._api.filesProviders['swarm'], name: 'fileproviders/swarm'}) + registry.put({api: self._api.filesProviders['github'], name: 'fileproviders/github'}) + registry.put({api: self._api.filesProviders['gist'], name: 'fileproviders/gist'}) + registry.put({api: self._api.filesProviders['ipfs'], name: 'fileproviders/ipfs'}) + registry.put({api: self._api.filesProviders, name: 'fileproviders'}) self._view = {} self._components = {} self._components.compilerImport = new CompilerImport() - registry.put({api: self._components.compilerImport, name: 'compilerImport'}) + registry.put({api: self._components.compilerImport, name: 'compilerimport'}) self.data = { _layout: { right: { diff --git a/src/app/plugin/pluginAPI.js b/src/app/plugin/pluginAPI.js index 82119414c4..79bea002e0 100644 --- a/src/app/plugin/pluginAPI.js +++ b/src/app/plugin/pluginAPI.js @@ -6,14 +6,14 @@ module.exports = (registry) => { return { config: { setConfig: (mod, path, content, cb) => { - registry.get('fileProviders/config').api.set(mod + '/' + path, content) + registry.get('fileproviders/config').api.set(mod + '/' + path, content) cb() }, getConfig: (mod, path, cb) => { - cb(null, registry.get('fileProviders/config').get(mod + '/' + path)) + cb(null, registry.get('fileproviders/config').get(mod + '/' + path)) }, removeConfig: (mod, path, cb) => { - cb(null, registry.get('fileProviders/config').api.remove(mod + '/' + path)) + cb(null, registry.get('fileproviders/config').api.remove(mod + '/' + path)) if (cb) cb() } },