jason-rails 0.7.5 → 0.7.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -0
- data/client/lib/createOptDis.js +1 -0
- data/client/lib/transportAdapters/actionCableAdapter.js +8 -2
- data/client/lib/transportAdapters/pusherAdapter.js +12 -3
- data/client/package.json +1 -1
- data/client/src/createOptDis.ts +2 -0
- data/client/src/transportAdapters/actionCableAdapter.ts +8 -2
- data/client/src/transportAdapters/pusherAdapter.ts +12 -3
- data/lib/jason/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c0ca4e6c931fdf041e8bd13a516e11d89699396691ff6328c73a0241f5672cc9
|
|
4
|
+
data.tar.gz: a0a6680af3dc06b0a5f96ee4f96513c172e12cf84cccc70339c0d46f7f0b742a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f39c46227135319c3c9bfe81fce8cbda84769bd9de3d14103604c95cb4106dc0ff00a362a340c2f9a981f412947116848b569d64d33c879b094c2bdd8a24a990
|
|
7
|
+
data.tar.gz: c9cd5cf85a36769697b50f7d68c4204b6d61db2169a3378000bab6b8f1a6c05f3ecc42322c6480ea22a3dced1cbcd4625c8b64eb554ed21b3611a92f203c92fc
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## v0.7.5.1
|
|
2
|
+
- Fix bug where axios errors get swallowed
|
|
3
|
+
|
|
4
|
+
## v0.7.5
|
|
5
|
+
- Fixed JS errors when payloads arrive on websockets after the subscription has been unmounted
|
|
6
|
+
- Fixed errors during initialization due to calling `cache_all` on a Rails model before it had fully initialized.
|
|
7
|
+
|
|
1
8
|
## v0.7.3
|
|
2
9
|
- Added: Add JasonContext to exports, for use in scenarios where you need to forward the context into some other React reconciler (e.g. `react-three-fiber`)
|
|
3
10
|
- Fixed: Unneeded `reload` in Publisher resulting in extra database calls
|
data/README.md
CHANGED
data/client/lib/createOptDis.js
CHANGED
|
@@ -29,6 +29,7 @@ function createOptDis(schema, dispatch, restClient, serverActionQueue) {
|
|
|
29
29
|
.catch(error => {
|
|
30
30
|
dispatch({ type: 'jason/upsert', payload: { error } });
|
|
31
31
|
serverActionQueue.itemFailed(id, error);
|
|
32
|
+
Promise.reject(error);
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
35
|
setInterval(dispatchServerAction, 10);
|
|
@@ -34,7 +34,10 @@ function actionCableAdapter(jasonConfig, handlePayload, dispatch, onConnected, t
|
|
|
34
34
|
}
|
|
35
35
|
function removeSubscription(config) {
|
|
36
36
|
restClient_1.default.post('/jason/api/remove_subscription', { config, consumerId })
|
|
37
|
-
.catch(e =>
|
|
37
|
+
.catch(e => {
|
|
38
|
+
console.error(e);
|
|
39
|
+
Promise.reject(e);
|
|
40
|
+
});
|
|
38
41
|
}
|
|
39
42
|
function getPayload(config, options) {
|
|
40
43
|
restClient_1.default.post('/jason/api/get_payload', {
|
|
@@ -46,7 +49,10 @@ function actionCableAdapter(jasonConfig, handlePayload, dispatch, onConnected, t
|
|
|
46
49
|
handlePayload(payload);
|
|
47
50
|
});
|
|
48
51
|
})
|
|
49
|
-
.catch(e =>
|
|
52
|
+
.catch(e => {
|
|
53
|
+
console.error(e);
|
|
54
|
+
Promise.reject(e);
|
|
55
|
+
});
|
|
50
56
|
}
|
|
51
57
|
function fullChannelName(channelName) {
|
|
52
58
|
return channelName;
|
|
@@ -33,13 +33,19 @@ function pusherAdapter(jasonConfig, handlePayload, dispatch) {
|
|
|
33
33
|
configToChannel[JSON.stringify(config)] = channelName;
|
|
34
34
|
subscribeToChannel(channelName);
|
|
35
35
|
})
|
|
36
|
-
.catch(e =>
|
|
36
|
+
.catch(e => {
|
|
37
|
+
console.error(e);
|
|
38
|
+
Promise.reject(e);
|
|
39
|
+
});
|
|
37
40
|
}
|
|
38
41
|
function removeSubscription(config) {
|
|
39
42
|
const channelName = configToChannel[JSON.stringify(config)];
|
|
40
43
|
unsubscribeFromChannel(fullChannelName(channelName));
|
|
41
44
|
restClient_1.default.post('/jason/api/remove_subscription', { config, consumerId })
|
|
42
|
-
.catch(e =>
|
|
45
|
+
.catch(e => {
|
|
46
|
+
console.error(e);
|
|
47
|
+
Promise.reject(e);
|
|
48
|
+
});
|
|
43
49
|
}
|
|
44
50
|
function getPayload(config, options) {
|
|
45
51
|
restClient_1.default.post('/jason/api/get_payload', {
|
|
@@ -51,7 +57,10 @@ function pusherAdapter(jasonConfig, handlePayload, dispatch) {
|
|
|
51
57
|
handlePayload(payload);
|
|
52
58
|
});
|
|
53
59
|
})
|
|
54
|
-
.catch(e =>
|
|
60
|
+
.catch(e => {
|
|
61
|
+
console.error(e);
|
|
62
|
+
Promise.reject(e);
|
|
63
|
+
});
|
|
55
64
|
}
|
|
56
65
|
function subscribeToChannel(channelName) {
|
|
57
66
|
const channel = pusher.subscribe(fullChannelName(channelName));
|
data/client/package.json
CHANGED
data/client/src/createOptDis.ts
CHANGED
|
@@ -35,7 +35,10 @@ export default function actionCableAdapter(jasonConfig, handlePayload, dispatch,
|
|
|
35
35
|
|
|
36
36
|
function removeSubscription(config) {
|
|
37
37
|
restClient.post('/jason/api/remove_subscription', { config, consumerId })
|
|
38
|
-
.catch(e =>
|
|
38
|
+
.catch(e => {
|
|
39
|
+
console.error(e)
|
|
40
|
+
Promise.reject(e)
|
|
41
|
+
})
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
function getPayload(config, options) {
|
|
@@ -48,7 +51,10 @@ export default function actionCableAdapter(jasonConfig, handlePayload, dispatch,
|
|
|
48
51
|
handlePayload(payload)
|
|
49
52
|
})
|
|
50
53
|
})
|
|
51
|
-
.catch(e =>
|
|
54
|
+
.catch(e => {
|
|
55
|
+
console.error(e)
|
|
56
|
+
Promise.reject(e)
|
|
57
|
+
})
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
function fullChannelName(channelName) {
|
|
@@ -31,14 +31,20 @@ export default function pusherAdapter(jasonConfig, handlePayload, dispatch) {
|
|
|
31
31
|
configToChannel[JSON.stringify(config)] = channelName
|
|
32
32
|
subscribeToChannel(channelName)
|
|
33
33
|
})
|
|
34
|
-
.catch(e =>
|
|
34
|
+
.catch(e => {
|
|
35
|
+
console.error(e)
|
|
36
|
+
Promise.reject(e)
|
|
37
|
+
})
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
function removeSubscription(config) {
|
|
38
41
|
const channelName = configToChannel[JSON.stringify(config)]
|
|
39
42
|
unsubscribeFromChannel(fullChannelName(channelName))
|
|
40
43
|
restClient.post('/jason/api/remove_subscription', { config, consumerId })
|
|
41
|
-
.catch(e =>
|
|
44
|
+
.catch(e => {
|
|
45
|
+
console.error(e)
|
|
46
|
+
Promise.reject(e)
|
|
47
|
+
})
|
|
42
48
|
}
|
|
43
49
|
|
|
44
50
|
function getPayload(config, options) {
|
|
@@ -51,7 +57,10 @@ export default function pusherAdapter(jasonConfig, handlePayload, dispatch) {
|
|
|
51
57
|
handlePayload(payload)
|
|
52
58
|
})
|
|
53
59
|
})
|
|
54
|
-
.catch(e =>
|
|
60
|
+
.catch(e => {
|
|
61
|
+
console.error(e)
|
|
62
|
+
Promise.reject(e)
|
|
63
|
+
})
|
|
55
64
|
}
|
|
56
65
|
|
|
57
66
|
function subscribeToChannel(channelName) {
|
data/lib/jason/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jason-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.5
|
|
4
|
+
version: 0.7.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Rees
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-04-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|