373 Commits

Author SHA1 Message Date
Jesse Gibson
30fe844cab Check JSON support just once
Two separate modules (localStorage & websockets) ensured JSON was
globally defined. Since only one is needed to alert the user, the
other has been removed.
2016-12-12 16:10:39 -07:00
Jesse Gibson
bb65acab10 Merge branch '0.5' of https://github.com/amark/gun into 0.5 2016-12-12 15:12:41 -07:00
Jesse Gibson
01c93157cb Fix msg passing, add reconnect & backoff
Fixed broadcast storm caused by re-enveloping the same message and
re-emitting it (I passed the envelope to gun, not just the msg body).
Sockets will attempt an exponential reconnect if the message queue isn't
empty, otherwise they're still just lazy bums that only open when
needed.
JSONP wasn't working before I took on this project, but now it's
completely disconnected. Once it's working, it should go in the
`request` function as a websocket fallback.
2016-12-12 14:37:09 -07:00
Mark Nadal
9f7acfd27f Merge branch '0.5' of https://github.com/amark/gun into 0.5 2016-12-09 18:20:45 -08:00
Mark Nadal
0779e32544 merged? Maybe? 2016-12-09 18:20:16 -08:00
Mark Nadal
69d1e81fc9 Update gun.js 2016-12-09 18:13:25 -08:00
Mark Nadal
34eb293a63 be brave, clean up 2016-12-06 23:48:10 -08:00
Jesse Gibson
b352cd742a Update client WebSocket plugin
Lovely little abstraction layer over websockets sends messages using
gun's new envelope system. Exponential backoff has not been
implemented yet. If the socket fails to connect, it won't retry (yet).
Also, this update left some dead code with the jsonp implementation.
Soon that should be ported over to the new envelope system too, but now
it's disconnected from gun.
2016-12-01 16:51:35 -07:00
Mark Nadal
dd72a24740 Merge branch '0.5' of https://github.com/amark/gun into 0.5 2016-11-29 20:20:32 -08:00
Mark Nadal
111d0f5bda instance specific dedup for @d3x0r 2016-11-29 20:19:59 -08:00
Mark Nadal
bd960b4d67 thanks to @Stefdv #284 2016-11-29 11:35:20 -08:00
Mark Nadal
ce32d8414b ahem, thank you d3x0r 2016-11-28 20:31:27 -08:00
Mark Nadal
3e2bf996fa final touches 2016-11-28 19:40:39 -08:00
Mark Nadal
9abe3fb75f fix for d3x0r and Stefdv 2016-11-28 17:57:20 -08:00
Jesse Gibson
4848493530 Add envelope-system server sync
Using gun's new envelope system (where routing and de-duplication happen
inside gun core), server-to-server synchronization has been
implemented.
However, it comes with this warning: the chain isn't yet ready and
you'll have difficulty reading or writing data via the chain.
2016-11-25 14:42:44 -07:00
Jesse Gibson
9d9dea2553 Add envelope plugin system
@amark made these changes, I'm just committing them.
2016-11-25 09:49:48 -07:00
Mark Nadal
c8e919f287 fix chain 2016-11-22 18:07:49 -08:00
Mark Nadal
92103e0767 Merge branch '0.5' of https://github.com/amark/gun into 0.5 2016-11-16 21:22:58 -08:00
Mark Nadal
bfd1107e61 merge again 2016-11-16 21:22:55 -08:00
Cole Albon
86a5abd550 #271 one liner fix error while assigning console 2016-11-16 19:14:31 -07:00
Mark Nadal
7c2c52d235 Merge branch '0.5' of https://github.com/amark/gun into 0.5 2016-11-15 14:40:30 -08:00
Mark Nadal
914cce726b merge again 2016-11-15 14:40:27 -08:00
Mark Nadal
126a668bf3 Update gun.js 2016-11-15 14:39:24 -08:00
Mark Nadal
6b054146c8 attempted merge with @alancnet 's awesomeness! 2016-11-14 16:53:33 -08:00
Mark Nadal
1966a09ac2 mid conflict merge 2016-11-14 16:44:00 -08:00
Mark Nadal
8bb003e311 getting back from Italy... 2016-11-14 16:34:28 -08:00
Mark Nadal
fe624166cc fix #263 for @imomin and limit back off 2016-11-13 10:05:03 -08:00
Mark Nadal
24a6c858a2 Merge pull request #254 from alancnet/off-0.5
.off for .on, and .map. (0.5)
2016-11-10 16:39:45 -08:00
Jesse Gibson
878dad4153 Fix reconnection replication
Fixes issue #259, where edits made offline wouldn't be queued for when a
socket comes back online.
I didn't quite follow the logic of the previous queuing system, so I
refined it and the issue was fixed, so.... yay!
2016-11-02 15:08:05 -06:00
Alan Colon
281a56292e .off for .on, and .map. (0.5) 2016-10-23 20:02:28 -06:00
Alan Colon
74b0242682 Enable .set with node, or new soul. (0.5) 2016-10-23 16:45:39 -06:00
Mark Nadal
c006690ced Merge pull request #252 from alancnet/off
.off for .on, .map, and .path
2016-10-23 23:39:49 +02:00
Alan Colon
b00b27ceaf Enable .set with node, or new soul. 2016-10-23 14:33:56 -06:00
Alan Colon
1ab36fa3e1 .off for .on, .map, and .path 2016-10-23 00:24:54 -06:00
Mark Nadal
0aef927eec Update gun.js 2016-10-18 12:11:02 -07:00
Mark Nadal
23f126f219 Update gun.js 2016-10-18 12:05:14 -07:00
BartVDACodeware
fc8aa597a7 check for window.localStorage
Hi, the window.localStorage gives an exception when you use it in Edge on localHost or from a file based html.
I've added a check for the localStorage.
The code is a snipped from here: https://mathiasbynens.be/notes/localstorage-pattern
2016-10-14 22:04:03 +02:00
Mark Nadal
53e171310d experimental approach works! 2016-10-13 00:48:36 -07:00
Mark Nadal
58753e0f9e Update gun.js 2016-10-12 01:35:20 -07:00
Mark Nadal
9355a36a54 Update gun.js 2016-10-12 01:00:42 -07:00
d3x0r
c5c2d190e5 Update gun.js
Fix localStorage to pull and cache options from parent.
2016-10-10 20:11:56 -07:00
Mark Nadal
df4d87eb3e Update gun.js 2016-10-10 02:03:25 -07:00
Mark Nadal
cdfd411ec8 this to window 2016-10-08 15:31:57 -07:00
Mark Nadal
da3e644c70 try to simplify? 2016-10-08 02:33:22 -07:00
Mark Nadal
4facd22aec 75 tests passing even complex plural! 2016-10-07 15:09:29 -07:00
Mark Nadal
17ab1d291c fix React Native breaking Webpack live reload scope 2016-10-07 14:10:20 -07:00
Mark Nadal
80e2fa9e6f tests passign without duplication but need to fix on pause/resume 2016-10-07 14:03:44 -07:00
Mark Nadal
448ee86ffa 70 tests passing including plurals! 2016-10-06 03:43:02 -07:00
Mark Nadal
bf4097beeb temp fix for @d3x0r 2016-10-06 00:28:26 -07:00
d3x0r
5774fa37c6 hoise function implicit() 2016-10-04 21:59:20 -07:00