Skip to content
This repository was archived by the owner on Oct 12, 2021. It is now read-only.

Commit 5ace924

Browse files
committed
WIP
1 parent e4b7378 commit 5ace924

File tree

5 files changed

+154
-7
lines changed

5 files changed

+154
-7
lines changed

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ module.exports = {
2929
'quote-props': ['warn', 'consistent-as-needed'],
3030
'react/no-deprecated': 'off',
3131
'no-console': 0,
32+
'keyword-spacing': ['error']
3233
},
3334
};

app/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"electron-publisher-s3": "^20.14.0",
4343
"electron-remote": "^1.2.0",
4444
"electron-updater": "^2.21.10",
45+
"getstream": "^3.17.0",
4546
"github-buttons": "^0.0.1-security",
4647
"global": "^4.3.2",
4748
"history": "^4.7.2",
@@ -145,4 +146,4 @@
145146
}
146147
}
147148
}
148-
}
149+
}

app/src/components/PodcastEpisodesView.js

+11
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,24 @@ class PodcastEpisodesView extends React.Component {
2222
episodeCursor: 1, // mongoose-api-query starts pages at 1, not 0
2323
menuIsOpen: false,
2424
sortBy: 'latest',
25+
newEpisodesAvailable: false,
2526
};
2627
}
28+
subscribeToStreamFeed(podcastID, streamFeedKey) {
29+
console.log("subscribing to stream feed....");
30+
window.streamClient.feed('podcast', podcastID);
31+
}
32+
2733
componentDidMount() {
2834
this.props.getPodcast(this.props.match.params.podcastID);
2935
this.getEpisodes(this.props.match.params.podcastID);
3036
getPinnedEpisodes(this.props.dispatch);
3137
getFeed(this.props.dispatch, 'episode', 0, 20); // this is to populate 'recent' state indicators
38+
// subscribe to feed updates
39+
console.log(this.props);
40+
if (this.props.podcast) {
41+
this.subscribeToStreamFeed(this.props.match.params.podcastID);
42+
}
3243
}
3344
componentWillReceiveProps(nextProps) {
3445
if (nextProps.match.params.podcastID !== this.props.match.params.podcastID) {

app/src/index.js

+8
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,21 @@ import App from './App';
33
import React from 'react';
44
import ReactDOM from 'react-dom';
55
import Raven from 'raven-js';
6+
import stream from 'getstream';
67

78
import packageInfo from '../package.json';
89

910
Raven.config(process.env.REACT_APP_SENTRY_DSN, {
1011
release: packageInfo.version,
1112
}).install();
1213

14+
// set up single instance of stream client
15+
window.streamClient = stream.connect(
16+
process.env.REACT_APP_STREAM_API_KEY,
17+
null,
18+
process.env.REACT_APP_STREAM_APP_ID,
19+
);
20+
1321
Raven.context(() => {
1422
ReactDOM.render(<App />, document.getElementById('root'));
1523
});

app/yarn.lock

+132-6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
version "8.5.10"
4242
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.5.10.tgz#49bd3637125dea5f55d7d1e8f51efd6cb835e1f7"
4343

44+
Base64@^1.0.1:
45+
version "1.0.1"
46+
resolved "https://registry.yarnpkg.com/Base64/-/Base64-1.0.1.tgz#def45cc50c961bcc9bf2321d0f52bcbfec1f1bb1"
47+
4448
abab@^1.0.3:
4549
version "1.0.4"
4650
resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e"
@@ -398,7 +402,7 @@ arrify@^1.0.0, arrify@^1.0.1:
398402
version "1.0.1"
399403
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
400404

401-
asap@~2.0.3:
405+
asap@*, asap@~2.0.3:
402406
version "2.0.6"
403407
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
404408

@@ -1500,6 +1504,10 @@ bser@^2.0.0:
15001504
dependencies:
15011505
node-int64 "^0.4.0"
15021506

1507+
1508+
version "1.0.1"
1509+
resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819"
1510+
15031511
buffer-from@^1.0.0:
15041512
version "1.0.0"
15051513
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531"
@@ -2259,6 +2267,12 @@ crypto-random-string@^1.0.0:
22592267
version "1.0.0"
22602268
resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e"
22612269

2270+
csprng@*:
2271+
version "0.1.2"
2272+
resolved "https://registry.yarnpkg.com/csprng/-/csprng-0.1.2.tgz#4bc68f12fa368d252a59841cbaca974b18ab45e2"
2273+
dependencies:
2274+
sequin "*"
2275+
22622276
css-animation@^1.3.2:
22632277
version "1.4.1"
22642278
resolved "https://registry.yarnpkg.com/css-animation/-/css-animation-1.4.1.tgz#5b8813125de0fbbbb0bbe1b472ae84221469b7a8"
@@ -2752,6 +2766,12 @@ ecc-jsbn@~0.1.1:
27522766
dependencies:
27532767
jsbn "~0.1.0"
27542768

2769+
2770+
version "1.0.10"
2771+
resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz#1c595000f04a8897dfb85000892a0f4c33af86c3"
2772+
dependencies:
2773+
safe-buffer "^5.0.1"
2774+
27552775
27562776
version "1.1.1"
27572777
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
@@ -3615,17 +3635,27 @@ fastparse@^1.1.1:
36153635
version "1.1.1"
36163636
resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8"
36173637

3638+
faye-websocket@>=0.9.1, faye-websocket@~0.11.0:
3639+
version "0.11.1"
3640+
resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38"
3641+
dependencies:
3642+
websocket-driver ">=0.5.1"
3643+
36183644
faye-websocket@^0.10.0:
36193645
version "0.10.0"
36203646
resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4"
36213647
dependencies:
36223648
websocket-driver ">=0.5.1"
36233649

3624-
faye-websocket@~0.11.0:
3625-
version "0.11.1"
3626-
resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38"
3650+
faye@^1.2.4:
3651+
version "1.2.4"
3652+
resolved "https://registry.yarnpkg.com/faye/-/faye-1.2.4.tgz#978ed8a58f1d481e5c1f98bacb8959de5ec5c643"
36273653
dependencies:
3628-
websocket-driver ">=0.5.1"
3654+
asap "*"
3655+
csprng "*"
3656+
faye-websocket ">=0.9.1"
3657+
tough-cookie "*"
3658+
tunnel-agent "*"
36293659

36303660
fb-watchman@^1.8.0:
36313661
version "1.9.2"
@@ -3992,6 +4022,18 @@ getpass@^0.1.1:
39924022
dependencies:
39934023
assert-plus "^1.0.0"
39944024

4025+
getstream@^3.17.0:
4026+
version "3.17.0"
4027+
resolved "https://registry.yarnpkg.com/getstream/-/getstream-3.17.0.tgz#69868691acca92b30cbbc0f320624f70ff7e1c08"
4028+
dependencies:
4029+
Base64 "^1.0.1"
4030+
faye "^1.2.4"
4031+
http-signature "~1.2.0"
4032+
jsonwebtoken "^8.2.0"
4033+
qs "^6.5.1"
4034+
request "^2.85.0"
4035+
xmlhttp-request "~0.4.1"
4036+
39954037
github-buttons@^0.0.1-security:
39964038
version "0.0.1-security"
39974039
resolved "https://registry.yarnpkg.com/github-buttons/-/github-buttons-0.0.1-security.tgz#1ff3836e87844e39adcdb2d7c286f99bea41068a"
@@ -5601,6 +5643,20 @@ jsonpointer@^4.0.0:
56015643
version "4.0.1"
56025644
resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9"
56035645

5646+
jsonwebtoken@^8.2.0:
5647+
version "8.3.0"
5648+
resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.3.0.tgz#056c90eee9a65ed6e6c72ddb0a1d325109aaf643"
5649+
dependencies:
5650+
jws "^3.1.5"
5651+
lodash.includes "^4.3.0"
5652+
lodash.isboolean "^3.0.3"
5653+
lodash.isinteger "^4.0.4"
5654+
lodash.isnumber "^3.0.3"
5655+
lodash.isplainobject "^4.0.6"
5656+
lodash.isstring "^4.0.1"
5657+
lodash.once "^4.0.0"
5658+
ms "^2.1.1"
5659+
56045660
jsprim@^1.2.2:
56055661
version "1.4.1"
56065662
resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
@@ -5620,6 +5676,21 @@ jsx-ast-utils@^2.0.0, jsx-ast-utils@^2.0.1:
56205676
dependencies:
56215677
array-includes "^3.0.3"
56225678

5679+
jwa@^1.1.5:
5680+
version "1.1.6"
5681+
resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.1.6.tgz#87240e76c9808dbde18783cf2264ef4929ee50e6"
5682+
dependencies:
5683+
buffer-equal-constant-time "1.0.1"
5684+
ecdsa-sig-formatter "1.0.10"
5685+
safe-buffer "^5.0.1"
5686+
5687+
jws@^3.1.5:
5688+
version "3.1.5"
5689+
resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.5.tgz#80d12d05b293d1e841e7cb8b4e69e561adcf834f"
5690+
dependencies:
5691+
jwa "^1.1.5"
5692+
safe-buffer "^5.0.1"
5693+
56235694
killable@^1.0.0:
56245695
version "1.0.0"
56255696
resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b"
@@ -5824,6 +5895,10 @@ lodash.get@^4.4.2:
58245895
version "4.4.2"
58255896
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
58265897

5898+
lodash.includes@^4.3.0:
5899+
version "4.3.0"
5900+
resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f"
5901+
58275902
lodash.isarguments@^3.0.0:
58285903
version "3.1.0"
58295904
resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
@@ -5832,10 +5907,30 @@ lodash.isarray@^3.0.0:
58325907
version "3.0.4"
58335908
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
58345909

5910+
lodash.isboolean@^3.0.3:
5911+
version "3.0.3"
5912+
resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6"
5913+
58355914
lodash.isequal@^4.5.0:
58365915
version "4.5.0"
58375916
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
58385917

5918+
lodash.isinteger@^4.0.4:
5919+
version "4.0.4"
5920+
resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343"
5921+
5922+
lodash.isnumber@^3.0.3:
5923+
version "3.0.3"
5924+
resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc"
5925+
5926+
lodash.isplainobject@^4.0.6:
5927+
version "4.0.6"
5928+
resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
5929+
5930+
lodash.isstring@^4.0.1:
5931+
version "4.0.1"
5932+
resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451"
5933+
58395934
lodash.keys@^3.1.2:
58405935
version "3.1.2"
58415936
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
@@ -5852,6 +5947,10 @@ lodash.mergewith@^4.6.0:
58525947
version "4.6.0"
58535948
resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz#150cf0a16791f5903b8891eab154609274bdea55"
58545949

5950+
lodash.once@^4.0.0:
5951+
version "4.1.1"
5952+
resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac"
5953+
58555954
lodash.template@^4.4.0:
58565955
version "4.4.0"
58575956
resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0"
@@ -6259,6 +6358,10 @@ [email protected]:
62596358
version "2.0.0"
62606359
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
62616360

6361+
ms@^2.1.1:
6362+
version "2.1.1"
6363+
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
6364+
62626365
multicast-dns-service-types@^1.1.0:
62636366
version "1.1.0"
62646367
resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901"
@@ -7495,6 +7598,10 @@ pseudomap@^1.0.2:
74957598
version "1.0.2"
74967599
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
74977600

7601+
psl@^1.1.24:
7602+
version "1.1.28"
7603+
resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.28.tgz#4fb6ceb08a1e2214d4fd4de0ca22dae13740bc7b"
7604+
74987605
public-encrypt@^4.0.0:
74997606
version "4.0.0"
75007607
resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6"
@@ -7525,6 +7632,10 @@ [email protected], qs@~6.5.1:
75257632
version "6.5.1"
75267633
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
75277634

7635+
qs@^6.5.1:
7636+
version "6.5.2"
7637+
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
7638+
75287639
qs@~6.3.0:
75297640
version "6.3.2"
75307641
resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c"
@@ -8550,6 +8661,10 @@ [email protected]:
85508661
range-parser "~1.2.0"
85518662
statuses "~1.3.1"
85528663

8664+
sequin@*:
8665+
version "0.1.1"
8666+
resolved "https://registry.yarnpkg.com/sequin/-/sequin-0.1.1.tgz#5c2d389d66a383734eaafbc45edeb2c1cb1be701"
8667+
85538668
serve-index@^1.7.2:
85548669
version "1.9.1"
85558670
resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239"
@@ -9385,6 +9500,13 @@ toposort@^1.0.0:
93859500
version "1.0.6"
93869501
resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.6.tgz#c31748e55d210effc00fdcdc7d6e68d7d7bb9cec"
93879502

9503+
tough-cookie@*:
9504+
version "2.4.2"
9505+
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.2.tgz#aa9133154518b494efab98a58247bfc38818c00c"
9506+
dependencies:
9507+
psl "^1.1.24"
9508+
punycode "^1.4.1"
9509+
93889510
tough-cookie@^2.3.2, tough-cookie@~2.3.0:
93899511
version "2.3.3"
93909512
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561"
@@ -9449,7 +9571,7 @@ [email protected]:
94499571
version "0.0.0"
94509572
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
94519573

9452-
tunnel-agent@^0.6.0:
9574+
tunnel-agent@*, tunnel-agent@^0.6.0:
94539575
version "0.6.0"
94549576
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
94559577
dependencies:
@@ -10141,6 +10263,10 @@ [email protected]:
1014110263
version "0.1.27"
1014210264
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9"
1014310265

10266+
xmlhttp-request@~0.4.1:
10267+
version "0.4.1"
10268+
resolved "https://registry.yarnpkg.com/xmlhttp-request/-/xmlhttp-request-0.4.1.tgz#636d99355a91e1865b38ea039099ddc59af6a7a7"
10269+
1014410270
xmlhttprequest@^1.8.0:
1014510271
version "1.8.0"
1014610272
resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc"

0 commit comments

Comments
 (0)