* Get a session’s error handler
* Change the signature of all methods to add the callee
* Deserialize rpc callbacks
* Expose the session error handle on its config property
* When a token refresh error occurs and there is a session error handler
propagate the error to the handler
* Add Session class and expose it to JS
* Add error property on the sync config object for the event handler
* tests
* refactor access token refresh
* chrome debugging
* Add Permissions models and User Management Realm API
* docs and changelog
* fix bad merge
* add test
* fix jsdoc annotation
* rename permissions to management schema
* Add user tests
* Add Sync member to Realm
* Add a simple test for addListener
* Introduce browser User class
* Introduce Sync.User proxy
* Fix User.all
* Add User.logout
* Remove some console.log statements
* Update rpc.cpp from tests-folder
* Use user.current from user-methods, not cpp
* remove user.current from two missing places
* Start server in realmjs and react tests
* Add user tests
* Add Sync member to Realm
* Add a simple test for addListener
* Introduce browser User class
* Introduce Sync.User proxy
* Fix User.all
* Add User.logout
* Remove some console.log statements
* Update rpc.cpp from tests-folder
* Use user.current from user-methods, not cpp
* remove user.current from two missing places
* Start server in realmjs and react tests
* Replace needle with node-fetch
* Make AuthError work in the browser
* Allow for persistent callbacks
* Expose _authenticateRealm to native
* Use clear_test_state in roc
* Streamline test inclusion
* Fix login tests
* Promisify testLogin()
* Disable AsyncTests for now
* Mode jasmine timeout to spec/unit_tests.js
* Avoid use of global for fetch module
* Only include user-tests is sync is enabled
* Skip ROS for android tests
* Add some comments about persistent callbacks
* Fix results-test
* Run async-tests in node
* Add a comment about (user object)
* Cache all users in User.current and return promises in fetch
* node_require async-tests so RN doesn't try and package them
* Add missing parenthesis
* Use ES6 Proxies to implement collections in the Chrome debugger
* rework realm-test-names event
* move React stuff on the CPH mac mini
* use node with npm3
* remove debugging aid code
* Update test app to RN 0.39.0
* Fix getContext in index.js
* Add dependency on invariant
* Add some comments to getContext
* Make invariant a devdependency rather than a dependency
* Add user file
* Clean up initialization and add error message
* Revert "Add user file"
This reverts commit 2948f4cfc2dfd2d5d75594307b1e89806b817eb7.
* Make index.js more robust
* Fix review comments
Electron is a combination of a node and
Chromium processes. Chromium processes
can have node bindings enabled and can
therefore run most npm modules seamlessly.
The current `lib/index.js` bootstrapping
logic results in a ReferenceError on the
following statement:
typeof Realm != 'undefined'
Thus, checking whether running under node
first allows realm-js to run inside the
Electron renderer (Chromium) process.
* Pass AuthError in Realm.Sync.User methods callbacks
The new Realm.Sync.AuthError class exposes properties common to the Problem family of classes in the Realm Object Server
* extract AuthError in a separate file
* whitespace
Since Code runs in Node, rather than Chrome, we need to require the `sync-request` module. The global `__debug__` object was exposed by the vscode-react-native plugin v0.1.5 for us to be able to do that.
Resolves#374
The callbacks are stored by their id in the RPCServer so they are properly uniqued. This prevents the same callback from being added multiple times as a change listener.
All realm operations for the RPC are now done in their own thread so it can be allowed to block on waiting for callback results. The recursive and multi-threaded nature of this makes it pretty tricky, but it works!