Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"dependencies": {
"babel-runtime": "^5.8.20",
"ws": "^1.0.1",
"xmlhttprequest": "^1.7.0"
},
"devDependencies": {
Expand Down
21 changes: 21 additions & 0 deletions src/CoreManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ var config: { [key: string]: mixed } = {
!process.version.electron),
REQUEST_ATTEMPT_LIMIT: 5,
SERVER_URL: 'https://api.parse.com/1',
LIVEQUERY_SERVER_URL: null,
VERSION: 'js' + require('../package.json').version,
APPLICATION_ID: null,
JAVASCRIPT_KEY: null,
Expand Down Expand Up @@ -455,5 +456,25 @@ module.exports = {

getUserController(): UserController {
return config['UserController'];
},

setLiveQueryController(controller: any) {
if (typeof controller.subscribe !== 'function') {
throw new Error('LiveQueryController must implement subscribe()');
}
if (typeof controller.unsubscribe !== 'function') {
throw new Error('LiveQueryController must implement unsubscribe()');
}
if (typeof controller.open !== 'function') {
throw new Error('LiveQueryController must implement open()');
}
if (typeof controller.close !== 'function') {
throw new Error('LiveQueryController must implement close()');
}
config['LiveQueryController'] = controller;
},

getLiveQueryController(): any {
return config['LiveQueryController'];
}
}
Loading