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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ node_modules
test_output
*~
.DS_Store
.idea/
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parse",
"version": "1.7.1",
"version": "1.8.0-rc1",
"description": "The Parse JavaScript SDK",
"homepage": "https://www.parse.com",
"keywords": [
Expand Down Expand Up @@ -29,6 +29,7 @@
},
"dependencies": {
"babel-runtime": "^5.8.20",
"ws": "^1.0.1",
"xmlhttprequest": "^1.7.0"
},
"devDependencies": {
Expand Down
22 changes: 22 additions & 0 deletions src/CoreManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import type { PushData } from './Push';
type RequestOptions = {
useMasterKey?: boolean;
sessionToken?: string;
installationId?: string;
};
type AnalyticsController = {
track: (name: string, dimensions: { [key: string]: string }) => ParsePromise;
Expand Down Expand Up @@ -116,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 @@ -454,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