Commit Graph

916 Commits

Author SHA1 Message Date
Yavor Georgiev 7c1dab7079 Propagate token refresh errors to the session error handler (#843)
* 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
2017-02-07 11:01:26 +01:00
Yavor Georgiev bb0dc575c9 Implement proactive access token refresh (#842)
Closes #840
2017-02-03 16:40:13 +01:00
Yavor Georgiev f22efa7117
[1.0.1] Bump version 2017-02-02 15:50:17 +01:00
Yavor Georgiev 7843e72595 Don’t capture the current JS context in the session bind callback (#839) 2017-02-02 15:41:52 +01:00
Yavor Georgiev de3c3e6788
[1.0.0] Bump version 2017-02-02 13:51:53 +01:00
Yavor Georgiev 19f00e1b4b Rework #832 (#833) 2017-02-02 02:41:11 +01:00
Yavor Georgiev 36dd43b3b2 Make sure all JavaScriptCore prototypes have a constructor (#832)
`js_class` for v8 sets up the `Class.prototype.constructor === Class` relationship automatically, but we need to do it manually in JavaScriptCore.
2017-02-01 23:52:36 +01:00
Yavor Georgiev 9d1d970b1f Sync Session API (#825)
* 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
2017-02-01 14:18:59 +01:00
Kristian Dupont 0c9c5ac407 Add missing chrome debugging apis for Sync.User (#801)
* 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
2017-01-31 14:07:29 +01:00
Yavor Georgiev 5183ff9a8c Always invoke sync callbacks on the JavaScript thread (#809)
* Always invoke sync callbacks on the JavaScript thread

* Address review comments

* Make Callback::m_state be a shared, not a weak pointer

* Use the protected GlobalContext in the session bind handler

* Only dispatch on the event loop if we’re not on its thread
2017-01-23 12:37:13 +01:00
Radu Tutueanu fa8088348d Update Object Store Submodule (#797)
* Update OS

* Use the latest sync

* Update objectstore

* Use realm-sync 7.2

* Add files to project

* Use OS submodule with fix

* Fix object store includes in xcode project

* add missing object store file to binding.gyp

* Update OS with fix for the GlobalNotifier

* Add OS files to Android jni

* Use master@ObjectStore
2017-01-18 12:39:56 +01:00
Kristian Dupont 35c21c203f [0.15.4] Bump version 2017-01-11 12:53:01 +01:00
Kristian Dupont f9f61aeb36 [0.15.3] Bump version 2017-01-10 16:21:11 +01:00
Radu Tutueanu 14d82c703f Enable sync by default on macOS (#781) 2017-01-10 15:40:19 +01:00
Kristian Dupont bd8a27b963 Improve error message for typeerrors (#785)
* Add a test

* Catch TypeErrorException

* Make exception asserts check error type

* Remove commented-out testcase and check for error type

* Test for Error, not TypeError
2017-01-10 13:41:56 +01:00
Mark Rowe 9d858d0329 Update to object store master to pick up the fix for the global notifier. (#778) 2017-01-05 11:56:11 +01:00
Mark Rowe c4b22a160a Update to sync v1.0.0-BETA-6.3 (#776)
* Update to sync v1.0.0-BETA-6.3.

This requires updating to current object store master to accommodate the
changes to sync error reporting.

* Add some include folder search paths

* Add thread_safe_reference to the RealmJS target
2017-01-04 15:07:25 +01:00
Kristian Dupont f0fd0d4308 [0.15.2] Bump version 2016-12-29 10:35:07 +01:00
Mark Rowe d8e13bc7bb Switch to using object store's master branch (#748)
* Switch to using object store's master branch.

* Switch to caching Realm instances per JavaScript execution context.
2016-12-28 17:28:44 +01:00
Kristian Dupont c1e7ddcda1 Throw when deleting detached object (#694)
* Throw when deleting detached object

* Update error message

* Add user file

* Throw when deleting detached object

* Update error message

* Revert "Add user file"

This reverts commit 2948f4cfc2dfd2d5d75594307b1e89806b817eb7.
2016-12-20 16:28:02 +01:00
Ari Lazier 43cb7bc463 only use custom dir for the notifier 2016-12-09 17:16:07 +01:00
Ari Lazier 64730e7e97 allow use of a custom sync dir 2016-12-09 12:49:59 +01:00
Ari Lazier bfa9402a06 submodule udpate 2016-12-07 16:39:39 +01:00
Kristian Dupont 62f5157565 Update object store 2016-12-07 16:33:11 +01:00
Kristian Dupont 43d94d1b8b Add checks for removeListener 2016-12-07 16:31:52 +01:00
Kristian Dupont 1d4bb7c2ad Add more tests and fix add_notification 2016-12-07 16:31:52 +01:00
Radu Tutueanu 19d82caec4 Update ObjectStore (#723) 2016-12-07 11:21:32 +01:00
Ari Lazier 216d97ed5d update object store 2016-12-06 10:24:30 +01:00
Ari Lazier 4f3bf08704 use proper object store merge 2016-12-05 16:25:52 +01:00
Ari Lazier 335d035752 update object-store 2016-12-05 16:25:52 +01:00
Ari Lazier 696a80ec0a merge master 2016-12-05 16:25:07 +01:00
Marius Rackwitz 8964e4d7f9 Only set the path derived from the SyncManager if none was provided (#679)
* Only set the path derived from the SyncManager if none was provided

* Disable synchronizeChangeswithTwoClientsAndOneUser
2016-11-29 10:51:26 +01:00
Ari Lazier 6ed6b77b52 Remove unneccesary braces 2016-11-28 10:40:50 -08:00
Ari Lazier 0f8536f23c fix for node/osx 2016-11-28 09:02:15 -08:00
Ari Lazier e48e0b19f7 fixes for latest object store update 2016-11-28 07:42:41 -08:00
Radu Tutueanu 70a30484d8 Update OS (#696)
Remove duplicate files from the submodule.
2016-11-24 14:15:15 +01:00
Ari Lazier f44f31e721 [0.15.1-rc] Bump version 2016-11-22 16:42:07 -08:00
Radu Tutueanu 4b0f5f41e6 Merge pull request #655 from realm/rt/build-without-by-default
Do not build node with sync by default
2016-11-15 18:04:07 +01:00
Ari Lazier db524a56a2 [0.15.0-rc] Bump version 2016-11-15 05:42:25 -08:00
Radu Tutueanu ca0fd78cee Do not build node with sync by default 2016-11-15 13:49:41 +01:00
Ari Lazier eef8a2de3b property clean up sync state between tests in c++ 2016-11-12 05:26:37 -08:00
Ari Lazier 011f293d13 Merge branch 'al-sync-user-tests' of https://github.com/realm/realm-js into al-sync-user-tests 2016-11-11 17:54:04 -08:00
Ari Lazier e4d4cbbdf3 proper fix/hack removal, partially working sync for rn 2016-11-11 17:53:58 -08:00
Ari Lazier 41b0426e01 Merge pull request #652 from realm/rt/improve-build
Improve build
2016-11-11 16:31:48 -08:00
Ari Lazier 043d801bb7 fix for node 2016-11-11 15:33:13 -08:00
Ari Lazier 2b90def150 terrible hack to make rn not retain the context 2016-11-11 15:05:08 -08:00
Ari Lazier b2077910a4 fix for handle scope warning 2016-11-11 11:41:27 -08:00
Radu Tutueanu e268cfef58 Add variable to enable skipping the download 2016-11-11 17:39:07 +01:00
Ari Lazier d229cd6130 throw exception when trying to open a realm with an invalid user 2016-11-11 00:14:52 -08:00
Ari Lazier 08ffc3bf15 ccache support 2016-11-10 23:55:26 -08:00