Scott Kyle
b34e52b290
The schema property should be directly on constructor
...
The constructor is now also called with `this` set as the constructed object.
Fixes #232
2016-02-18 11:10:02 -08:00
Scott Kyle
15052985f1
Remove confusion between propTypes and objectTypes
...
The RPC layer now only speaks in objectTypes, since they don't always equate to propTypes. We were overloading the use of propTypes for no good purpose.
2016-01-05 13:53:54 -08:00
Scott Kyle
358e5dacf3
Add method to clear mutation listeners in RPC client
2016-01-05 13:40:53 -08:00
Scott Kyle
616f78ea07
Add support for data properties in RPC layer
...
The data is base64 encoded before being sent via the RPC.
2015-11-17 13:32:31 -08:00
Scott Kyle
336ef55c1f
Remove uses of for-of loops in RPC modules
...
The React Native packager does not transform for-of loops, and minification step uses UglifyJS, which does not yet support ES6 syntax.
Fixes #120
2015-11-05 16:10:52 -08:00
Scott Kyle
7df2997ee7
Use a Set to store listener callbacks in JS
2015-11-03 02:41:52 -08:00
Scott Kyle
0b35564830
Merge pull request #107 from realm/sk-live-update-fixes
...
Ensure Lists and Results live-update in Chrome
2015-10-28 10:46:43 -07:00
Scott Kyle
46bee3c867
Add beta licenses to Chrome JS modules
2015-10-28 10:37:17 -07:00
Scott Kyle
0eb3b49970
Ensure Lists and Results live-update in Chrome
...
Results needed to live-update during a transaction (not just as the end), and Lists needed to update on deletions as well.
2015-10-28 10:21:32 -07:00
Ari Lazier
a1c4cd5702
pr fixes
2015-10-27 07:48:11 -07:00
Ari Lazier
6f41c3cf68
take notification name
2015-10-26 19:18:24 -07:00
Ari Lazier
bb68e45250
support notifications in chrome
2015-10-26 16:49:46 -07:00
Scott Kyle
2e592bc101
Sprinkle some const inside ES6 JS code
...
React Native 0.13.0 fixes the bug we experienced by using const.
2015-10-21 13:57:34 -07:00
Scott Kyle
34b84759c8
Fix crash when reloading app during Chrome debugging
...
Added a session ID, that actually tracks the Realm constructor in our RPC server's JS context. This conveniently let us remove the special casing for defaultPath as well as letting us call the Realm constructor with JSObjectCallAsConstructor.
Fixes #68
2015-10-20 15:10:52 -07:00
Scott Kyle
85e2a26b42
Make RPC Results objects auto-resize
2015-10-19 17:28:20 -07:00
Scott Kyle
3439b4c455
Add getter/setter for defaultPath to RPC
2015-10-19 16:59:04 -07:00
Scott Kyle
b07aa72a55
Move all constants into a single JS file
2015-10-19 16:19:43 -07:00
Scott Kyle
57778ce878
Improve calling object methods through RPC
2015-10-19 16:15:38 -07:00
Scott Kyle
d172b43535
Add path and schemaVersion getters to realm object
2015-10-19 15:46:28 -07:00
Scott Kyle
4c0cc578d5
Generalize calling methods through the RPC
2015-10-19 12:46:31 -07:00
Scott Kyle
d482ea82e7
Error messages deserve good grammar
2015-10-19 12:18:16 -07:00
Scott Kyle
78ec67cd6c
Hacky support for adding notifications in Chrome
...
Since notifications are called synchronously after a write, we fake it by calling them manually for now. The future plan will be more involved, so some of that is stubbed out.
2015-10-19 12:09:14 -07:00
Scott Kyle
b985e1f0a6
Add realm.close() method to JS shim
...
That was easy!
2015-10-19 12:07:50 -07:00
Ari Lazier
5ccc03eeb7
rename some methods for clarity - try to cleanup js objects
2015-10-15 18:48:13 -07:00
Scott Kyle
7a79ac8803
Make Xcode tests run in React environment
...
The deleteTestFiles() function is now added to the Realm object, so that it's easy for the RPC module to handle this as well. We can only do this in testing environments in the future.
2015-10-15 03:26:56 -07:00
Scott Kyle
94521b73bb
Properly serialize args to create Realm through RPC
...
An exception was thrown when parsing the JSON when only a string was passed. This is better and no longer uses the Objective-C API for converting the dictionary to a JSValue.
2015-10-15 03:00:13 -07:00
Scott Kyle
a997ec5be9
Some cleanup of JS
2015-10-08 15:32:14 -07:00
Ari Lazier
417f0a0c72
don't add Results to property types
2015-10-08 11:22:52 -06:00
Ari Lazier
afa974ccc6
serialize Results like other types, use common method rpc call for objects()
2015-10-08 11:04:50 -06:00
Ari Lazier
ed3cf01432
consolidate realm methods, code cleanup/remove some duplication
2015-10-08 10:43:38 -06:00
Scott Kyle
ebb400ed41
Support delete and deleteAll from RPC
2015-10-08 01:53:22 -07:00
Scott Kyle
31fc14d602
Support (de)serialization of objects in RPC
...
Everything is a dictionary with either a `value` key or an `id` key. If it's a value, then it will recursively be (de)serialized.
2015-10-08 01:53:01 -07:00
Scott Kyle
41ba3b62b8
JS implementation for Results from RPC
2015-10-07 17:08:31 -07:00
Scott Kyle
cb4fea97d4
Fix "const" search and replace
2015-10-07 17:08:31 -07:00
Ari Lazier
476b3623bb
partial rpc server implemenation
2015-10-06 13:36:56 -06:00