Browse Source

matrix-js-sdk and login screen

pull/2/head
f0x 7 months ago
parent
commit
720ccb2d2e
8 changed files with 313 additions and 117 deletions
  1. 64
    13
      app.js
  2. 56
    89
      backends/matrix.js
  3. 18
    2
      components/chat.js
  4. 3
    3
      components/filterList.js
  5. 6
    1
      components/sidebar.js
  6. 2
    0
      package.json
  7. 47
    0
      public/scss/style.scss
  8. 117
    9
      shrinkwrap.yaml

+ 64
- 13
app.js View File

@@ -3,6 +3,7 @@ const React = require('react')
3 3
 const ReactDOM = require('react-dom')
4 4
 const create = require('create-react-class')
5 5
 const Promise = require('bluebird')
6
+const urllib = require('url')
6 7
 
7 8
 const Matrix = require('./backends/matrix.js')
8 9
 
@@ -18,37 +19,87 @@ const Input = require('./components/input.js')
18 19
 // incoming/outgoing message alignment (split)
19 20
 
20 21
 
21
-let backend = new Matrix("user", "pass", "https://lain.haus")
22
-backend.sync()
23 22
 
24 23
 let App = create({
25 24
   displayName: "App",
26 25
 
27 26
   getInitialState: function() {
28
-    return this.checkBackend()
27
+    return {rooms: {}, events: {}}
29 28
   },
30 29
 
31 30
   checkBackend: function() {
32
-    let returnValue = null
33
-    if(backend.hasUpdates()) {
34
-      returnValue = {
35
-        rooms: backend.getRooms(),
36
-        events: backend.getEvents()
37
-      }
31
+    if(this.state.backend.hasUpdates()) {
32
+      console.log("RECEIVING UPDATES FROM BACKEND")
33
+      this.setState({
34
+        rooms: this.state.backend.getRooms(),
35
+        events: this.state.backend.getEvents()
36
+      })
38 37
     }
39 38
     setTimeout(() => {
40
-      this.setState(this.checkBackend())
39
+      this.checkBackend()
41 40
     }, 100)
42
-    return returnValue
41
+  },
42
+
43
+  login: function() {
44
+    let user = document.getElementById("user").value
45
+    let pass = document.getElementById("pass").value
46
+    let hs = document.getElementById("hs").value
47
+    hs = urllib.parse(hs)
48
+
49
+    let data = {
50
+      user: user,
51
+      password: pass,
52
+      type: "m.login.password",
53
+      initial_device_display_name: "Neo v4",
54
+    };
55
+
56
+    let url = urllib.format(Object.assign(hs, {
57
+      pathname: "/_matrix/client/r0/login"
58
+    }));
59
+
60
+    fetch(url, {
61
+      body: JSON.stringify(data),
62
+      headers: {
63
+        'content-type': 'application/json'
64
+      },
65
+      method: 'POST',
66
+    }).then((response) => response.json())
67
+      .then((responseJson) => {
68
+        this.setState({json: responseJson});
69
+        if(responseJson.access_token != undefined) {
70
+          let backend = new Matrix(responseJson.user_id, responseJson.access_token, "https://"+responseJson.home_server)
71
+          this.setState({
72
+            backend: backend
73
+          })
74
+          this.checkBackend()
75
+        }
76
+      })
77
+      .catch((error) => {
78
+        console.error(error);
79
+      });
43 80
   },
44 81
 
45 82
   render: function() {
83
+    if (this.state.backend == undefined) {
84
+      //Login screen
85
+      return (
86
+        <div className="loginwrapper">
87
+          <img src="/neo.png"/>
88
+          <div className="login">
89
+            <label htmlFor="user">Username: </label><input type="text" id="user" placeholder="username"/>
90
+            <label htmlFor="pass">Password: </label><input type="password" id="pass"/>
91
+            <label htmlFor="hs">Homeserver: </label><input type="text" id="hs" placeholder="https://lain.haus"/>
92
+            <button onClick={()=>this.login()}>Log in</button>
93
+          </div>
94
+        </div>
95
+      )
96
+    }
46 97
     return (
47 98
       <>
48
-        <Sidebar rooms={this.state.rooms}/>
99
+        <Sidebar rooms={this.state.rooms} selectRoom={(roomId) => {this.setState({roomId: roomId})}}/>
49 100
         <div className="main">
50 101
           <Info />
51
-          <Chat events={this.state.events} backend={backend}/>
102
+          <Chat events={this.state.events} backend={this.state.backend} roomId={this.state.roomId}/>
52 103
           <Input />
53 104
         </div>
54 105
       </>

+ 56
- 89
backends/matrix.js View File

@@ -2,83 +2,53 @@
2 2
 const React = require('react')
3 3
 const ReactDOM = require('react-dom')
4 4
 const defaultValue = require('default-value')
5
+const sdk = require('matrix-js-sdk')
5 6
 
6 7
 class Matrix {
7
-  constructor(user, password, homeserver) {
8
+  constructor(user, token, homeserver) {
8 9
     this.user = user;
9
-    this.password = password;
10 10
     this.homeserver = homeserver;
11
-    this.a = 0
12
-    this.events = {
13
-      "roomId": [
14
-        {
15
-          type: "m.room.message",
16
-          sender: "@f0x:lain.haus",
17
-          content: {
18
-            body: "Image caption",
19
-            info: {
20
-              size: 1331429,
21
-              mimetype: "image/png",
22
-              thumbnail_info: {
23
-                w: 600,
24
-                h: 600,
25
-                mimetype: "image/png",
26
-                size: 151911
27
-              },
28
-              w: 2000,
29
-              h: 2000,
30
-              thumbnail_url: "mxc://lain.haus/PnptnVmLprDNICfhCqIIurHZ"
31
-            },
32
-            msgtype: "m.image",
33
-            url: "mxc://lain.haus/MXtCRwxheuSEVsIyHfyUGJNz"
34
-          },
35
-          event_id: "$155317808164309EPnWP:lain.haus",
36
-          origin_server_ts: 1553178081145,
37
-          unsigned: {
38
-            age: 587,
39
-            transaction_id: "m1553178080798.12"
40
-          },
41
-          room_id: "!bghqZrxFTiDyEUzunK:disroot.org"
42
-        }
43
-      ]
44
-    }
11
+    this.client = sdk.createClient({
12
+      baseUrl: homeserver,
13
+      accessToken: token,
14
+      userId: user
15
+    });
45 16
 
46
-    //this.rooms = ["Neo", "version 4", "Codename", "Iris", "Let's All Love Lain", "Very long room name abcdefghijklmnopqrstuvwxyz"]
47
-    this.rooms = {
48
-      "room0": {
49
-        name: "Neo",
50
-        lastEvent: 10
51
-      },
52
-      "room1": {
53
-        name: "v4: iris",
54
-        lastEvent: 10
55
-      },
56
-      "room2": {
57
-        name: "groups",
58
-        lastEvent: 10
59
-      },
60
-      "room3": {
61
-        name: "GUI Demo",
62
-        lastEvent: 0
63
-      }
64
-    }
17
+    this.events = {}
18
+    this.rooms = {}
19
+    this.startClient()
65 20
     this.updates = true
66 21
   }
67 22
 
23
+  startClient() {
24
+    this.client.on("Room.timeline", (event, room, toStartOfTimeline) => {
25
+      if (toStartOfTimeline) {
26
+          return
27
+        }
28
+        if (this.events[room.roomId] == undefined) {
29
+          this.events[room.roomId] = []
30
+          this.rooms[room.roomId] = {
31
+            name: room.name,
32
+            lastEvent: 0
33
+          }
34
+        }
35
+        this.events[room.roomId].push(event.event)
36
+        this.updates = true
37
+        console.log("NEW EVENTS")
38
+    })
39
+    this.client.startClient()
40
+  }
41
+
68 42
   getHS() {
69 43
     return this.homeserver
70 44
   }
71 45
 
72 46
   getEvents(roomId) {
73
-    return this.events["roomId"]
47
+    return this.events
74 48
   }
75 49
 
76 50
   getRooms() {
77
-    let orderList = Object.keys(this.rooms)
78
-    orderList.sort((a, b) => {
79
-      return this.rooms[b].lastEvent - this.rooms[a].lastEvent
80
-    })
81
-    return {rooms: this.rooms, order: orderList}
51
+    return this.rooms
82 52
   }
83 53
 
84 54
   hasUpdates() {
@@ -89,36 +59,33 @@ class Matrix {
89 59
     return false
90 60
   }
91 61
 
92
-  addEvent(event) {
93
-    this.events["roomId"].push(event)
94
-  }
95
-
96 62
   sync() {
97
-    let rand = this.lastRand
98
-    while(rand == this.lastRand) {
99
-      rand = Math.floor(Math.random()*Object.keys(this.rooms).length)
100
-    }
101
-    this.lastRand = rand
102
-    let roomId = `room${rand}`
103
-    let now = new Date().getMilliseconds()
104
-    this.rooms[roomId].lastEvent = now
105
-    this.updates = true
63
+    // let rand = this.lastRand
64
+    // while(rand == this.lastRand) {
65
+    //   rand = Math.floor(Math.random()*Object.keys(this.rooms).length)
66
+    // }
67
+    // this.lastRand = rand
68
+    // let roomId = `room${rand}`
69
+    // let now = new Date().getMilliseconds()
70
+    // this.rooms[roomId].lastEvent = now
71
+    // this.updates = true
72
+
73
+    // let event = {
74
+    //   content: {
75
+    //     body: "New <code>m.text</code> Event",
76
+    //     msgtype: "m.text"
77
+    //   },
78
+    //   event_id: this.fakeEventId(),
79
+    //   origin_server_ts: 1432735824653,
80
+    //   room_id: "!jEsUZKDJdhlrceRyVU:domain.com",
81
+    //   sender: "@example:domain.com",
82
+    //   type: "m.room.message",
83
+    //   unsigned: {
84
+    //     age: 1234
85
+    //   }
86
+    // }
87
+    // this.events["roomId"].push(event)
106 88
 
107
-    let event = {
108
-      content: {
109
-        body: "Testing m.text",
110
-        msgtype: "m.text"
111
-      },
112
-      event_id: this.fakeEventId(),
113
-      origin_server_ts: 1432735824653,
114
-      room_id: "!jEsUZKDJdhlrceRyVU:domain.com",
115
-      sender: "@example:domain.com",
116
-      type: "m.room.message",
117
-      unsigned: {
118
-        age: 1234
119
-      }
120
-    }
121
-    this.events["roomId"].push(event)
122 89
     setTimeout(() => {this.sync()}, 2000)
123 90
   }
124 91
 

+ 18
- 2
components/chat.js View File

@@ -27,8 +27,15 @@ jdenticon.config = {
27 27
 let chat = create({
28 28
   displayName: "Chat",
29 29
 
30
+  getInitialState: function() {
31
+    return {
32
+      ref: null
33
+    }
34
+  },
35
+
30 36
   getSnapshotBeforeUpdate: function(oldProps, oldState) {
31 37
     let ref = this.state.ref
38
+    if (ref == null) {return}
32 39
     if ((ref.scrollHeight - ref.offsetHeight) - ref.scrollTop < 100) { // Less than 100px from bottom
33 40
       return true
34 41
     }
@@ -37,6 +44,7 @@ let chat = create({
37 44
 
38 45
   componentDidUpdate(prevProps, prevState, snapshot) {
39 46
     let ref = this.state.ref
47
+    if (ref == null) {return}
40 48
     if (snapshot) { // scroll to bottom
41 49
       ref.scrollTop = (ref.scrollHeight - ref.offsetHeight)
42 50
     }
@@ -49,6 +57,14 @@ let chat = create({
49 57
   },
50 58
 
51 59
   render: function() {
60
+    if (this.props.roomId == undefined || this.props.events[this.props.roomId] == undefined) {
61
+      //empty screen
62
+      return <div className="chat" ref={this.setRef}>
63
+        <div className="events">
64
+        </div>
65
+      </div>
66
+    }
67
+
52 68
     let messageGroups = {
53 69
       current: [],
54 70
       groups: [],
@@ -58,7 +74,7 @@ let chat = create({
58 74
     // if the sender is the same, add it to the 'current' messageGroup, if not,
59 75
     // push the old one to 'groups' and start with a new array.
60 76
 
61
-    this.props.events.forEach((event, id) => {
77
+    this.props.events[this.props.roomId].forEach((event, id) => {
62 78
       if (event.sender != messageGroups.sender) {
63 79
         messageGroups.sender = event.sender
64 80
         if (messageGroups.current.length != 0) {
@@ -115,7 +131,7 @@ let EventGroup = create({
115 131
 function getRenderedEvent(event, id, backend) {
116 132
   if (event.type == "m.room.message") {
117 133
     let msgtype = event.content.msgtype;
118
-    return React.createElement(elements[defaultValue(msgtype, "m.text")], {event: event, key: id, backend: backend})
134
+    return React.createElement(defaultValue(elements[msgtype], elements["m.text"]), {event: event, key: id, backend: backend})
119 135
   }
120 136
 }
121 137
 

+ 3
- 3
components/filterList.js View File

@@ -17,7 +17,7 @@ let FilterList = create({
17 17
 
18 18
   select: function(id) {
19 19
     this.setState({selection: id})
20
-    //this.props.callback(id)
20
+    this.props.callback(id)
21 21
   },
22 22
 
23 23
   inputRef: function(ref) {
@@ -37,9 +37,9 @@ let FilterList = create({
37 37
   },
38 38
 
39 39
   render: function() {
40
-    let items = Object.keys(this.props.items).map((itemKey, id) => {
40
+    let keys = Object.keys(this.props.items)
41
+    let items = keys.map((itemKey, id) => {
41 42
       let item = this.props.items[itemKey]
42
-
43 43
       let props = {
44 44
         selected:  this.state.selection == itemKey,
45 45
         filter:  this.state.filter,

+ 6
- 1
components/sidebar.js View File

@@ -4,6 +4,7 @@ const ReactDOM = require('react-dom')
4 4
 const create = require('create-react-class')
5 5
 const Promise = require('bluebird')
6 6
 const debounce = require('debounce')
7
+const jdenticon = require('jdenticon')
7 8
 
8 9
 const FilterList = require('./filterList.js')
9 10
 
@@ -17,6 +18,10 @@ let RoomListItem = create({
17 18
     }
18 19
   },
19 20
 
21
+  componentDidMount() {
22
+    jdenticon.update("svg")
23
+  },
24
+
20 25
   setRef: function(ref) {
21 26
     if (ref == null) {
22 27
       return
@@ -61,7 +66,7 @@ let Sidebar = create({
61 66
 
62 67
   render: function() {
63 68
     return <div className="sidebar">
64
-      <FilterList items={this.props.rooms.rooms} order={this.props.rooms.order} element={RoomListItem}/>
69
+      <FilterList items={this.props.rooms} element={RoomListItem} callback={(roomId) => {this.props.selectRoom(roomId)}}/>
65 70
     </div>
66 71
   }
67 72
 })

+ 2
- 0
package.json View File

@@ -35,9 +35,11 @@
35 35
     "gulp-util": "^3.0.8",
36 36
     "jdenticon": "^2.1.1",
37 37
     "livereactload": "^4.0.0-beta.2",
38
+    "matrix-js-sdk": "^1.0.2",
38 39
     "react": "^16.6.3",
39 40
     "react-dom": "^16.6.3",
40 41
     "sanitize-html": "^1.20.0",
42
+    "sourceify": "^0.1.0",
41 43
     "vinyl-buffer": "^1.0.1",
42 44
     "vinyl-source-stream": "^2.0.0",
43 45
     "webpack": "^4.27.1"

+ 47
- 0
public/scss/style.scss View File

@@ -48,6 +48,53 @@ body {
48 48
   height: 100vh;
49 49
   width: 100vw;
50 50
   display: flex;
51
+  justify-content: center;
52
+}
53
+
54
+.loginwrapper {
55
+  margin-top: -15rem;
56
+  display: flex;
57
+  justify-content: center;
58
+  flex-direction: column;
59
+
60
+  img {
61
+    height: 15rem;
62
+    width: 15rem;
63
+    text-align: center;
64
+    align-self: center;
65
+  }
66
+}
67
+
68
+.login {
69
+  align-self: center;
70
+  display: inline-grid;
71
+  grid-template-columns: 1fr 1fr;
72
+
73
+  $blue: #5294e2;
74
+
75
+  label, input, button {
76
+    margin: 0.3rem;
77
+    padding: 0.3rem;
78
+  }
79
+
80
+  label {
81
+    background: $blue;
82
+    justify-self: left;
83
+  }
84
+
85
+  input {
86
+    border: 0.1rem solid $blue;
87
+    background: transparent;
88
+    color: white;
89
+  }
90
+
91
+  button {
92
+    grid-column-start: 2;
93
+    background: $blue;
94
+    color: white;
95
+    justify-self: right;
96
+    border: none;
97
+  }
51 98
 }
52 99
 
53 100
 .main {

+ 117
- 9
shrinkwrap.yaml View File

@@ -25,9 +25,11 @@ dependencies:
25 25
   gulp-util: 3.0.8
26 26
   jdenticon: 2.1.1
27 27
   livereactload: 4.0.0-beta.2
28
+  matrix-js-sdk: 1.0.2
28 29
   react: 16.6.3
29 30
   react-dom: 16.6.3
30 31
   sanitize-html: 1.20.0
32
+  sourceify: 0.1.0
31 33
   vinyl-buffer: 1.0.1
32 34
   vinyl-source-stream: 2.0.0
33 35
   webpack: 4.27.1
@@ -989,6 +991,15 @@ packages:
989 991
       ajv: ^6.0.0
990 992
     resolution:
991 993
       integrity: sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=
994
+  /ajv/6.10.0:
995
+    dependencies:
996
+      fast-deep-equal: 2.0.1
997
+      fast-json-stable-stringify: 2.0.0
998
+      json-schema-traverse: 0.4.1
999
+      uri-js: 4.2.2
1000
+    dev: false
1001
+    resolution:
1002
+      integrity: sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==
992 1003
   /ajv/6.6.2:
993 1004
     dependencies:
994 1005
       fast-deep-equal: 2.0.1
@@ -1004,6 +1015,10 @@ packages:
1004 1015
       node: '>=0.4.2'
1005 1016
     resolution:
1006 1017
       integrity: sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=
1018
+  /another-json/0.2.0:
1019
+    dev: false
1020
+    resolution:
1021
+      integrity: sha1-tfQBnJc7bdXGUGotk0acttMq7tw=
1007 1022
   /ansi-colors/1.1.0:
1008 1023
     dependencies:
1009 1024
       ansi-wrap: 0.1.0
@@ -1393,6 +1408,13 @@ packages:
1393 1408
     dev: false
1394 1409
     resolution:
1395 1410
       integrity: sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==
1411
+  /babel-runtime/6.26.0:
1412
+    dependencies:
1413
+      core-js: 2.6.5
1414
+      regenerator-runtime: 0.11.1
1415
+    dev: false
1416
+    resolution:
1417
+      integrity: sha1-llxwWGaOgrVde/4E/yM3vItWR/4=
1396 1418
   /babelify/10.0.0:
1397 1419
     dev: false
1398 1420
     engines:
@@ -1421,6 +1443,18 @@ packages:
1421 1443
     dev: false
1422 1444
     resolution:
1423 1445
       integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
1446
+  /base-x/3.0.4:
1447
+    dependencies:
1448
+      safe-buffer: 5.1.2
1449
+    dev: false
1450
+    resolution:
1451
+      integrity: sha512-UYOadoSIkEI/VrRGSG6qp93rp2WdokiAiNYDfGW5qURAY8GiAQkvMbwNNSDYiVJopqv4gCna7xqf4rrNGp+5AA==
1452
+  /base-x/3.0.5:
1453
+    dependencies:
1454
+      safe-buffer: 5.1.2
1455
+    dev: false
1456
+    resolution:
1457
+      integrity: sha512-C3picSgzPSLE+jW3tcBzJoGwitOtazb5B+5YmAxZm2ybmTi9LNgAtDO/jjVEBZwHoXmDBZ9m/IELj3elJVRBcA==
1424 1458
   /base/0.11.2:
1425 1459
     dependencies:
1426 1460
       cache-base: 1.0.1
@@ -1620,6 +1654,12 @@ packages:
1620 1654
     hasBin: true
1621 1655
     resolution:
1622 1656
       integrity: sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==
1657
+  /browser-request/0.3.3:
1658
+    dev: false
1659
+    engines:
1660
+      '0': node
1661
+    resolution:
1662
+      integrity: sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=
1623 1663
   /browser-resolve/1.11.3:
1624 1664
     dependencies:
1625 1665
       resolve: 1.1.7
@@ -1819,6 +1859,12 @@ packages:
1819 1859
     hasBin: true
1820 1860
     resolution:
1821 1861
       integrity: sha512-kMGKs4BTzRWviZ8yru18xBpx+CyHG9eqgRbj9XbE3IMgtczf4aiA0Y1YCpVdvUieKGZ03kolSPXqTcscBCb9qw==
1862
+  /bs58/4.0.1:
1863
+    dependencies:
1864
+      base-x: 3.0.5
1865
+    dev: false
1866
+    resolution:
1867
+      integrity: sha1-vhYedsNU9veIrkBx9j806MTwpCo=
1822 1868
   /budo/11.5.0:
1823 1869
     dependencies:
1824 1870
       bole: 2.0.0
@@ -2405,6 +2451,12 @@ packages:
2405 2451
     optional: true
2406 2452
     resolution:
2407 2453
       integrity: sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==
2454
+  /content-type/1.0.4:
2455
+    dev: false
2456
+    engines:
2457
+      node: '>= 0.6'
2458
+    resolution:
2459
+      integrity: sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
2408 2460
   /convert-source-map/0.3.5:
2409 2461
     dev: false
2410 2462
     resolution:
@@ -2451,6 +2503,10 @@ packages:
2451 2503
     resolution:
2452 2504
       integrity: sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=
2453 2505
       tarball: 'http://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz'
2506
+  /core-js/2.6.5:
2507
+    dev: false
2508
+    resolution:
2509
+      integrity: sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==
2454 2510
   /core-util-is/1.0.2:
2455 2511
     resolution:
2456 2512
       integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
@@ -3839,7 +3895,7 @@ packages:
3839 3895
     dependencies:
3840 3896
       asynckit: 0.4.0
3841 3897
       combined-stream: 1.0.7
3842
-      mime-types: 2.1.21
3898
+      mime-types: 2.1.22
3843 3899
     dev: false
3844 3900
     engines:
3845 3901
       node: '>= 0.12'
@@ -4491,7 +4547,7 @@ packages:
4491 4547
       integrity: sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
4492 4548
   /har-validator/5.1.3:
4493 4549
     dependencies:
4494
-      ajv: 6.6.2
4550
+      ajv: 6.10.0
4495 4551
       har-schema: 2.0.0
4496 4552
     dev: false
4497 4553
     engines:
@@ -4675,7 +4731,7 @@ packages:
4675 4731
     dependencies:
4676 4732
       assert-plus: 1.0.0
4677 4733
       jsprim: 1.4.1
4678
-      sshpk: 1.16.0
4734
+      sshpk: 1.16.1
4679 4735
     dev: false
4680 4736
     engines:
4681 4737
       node: '>=0.8'
@@ -5832,6 +5888,12 @@ packages:
5832 5888
     optional: true
5833 5889
     resolution:
5834 5890
       integrity: sha1-X46MkNME7fElMJUaVVSruMXj9VI=
5891
+  /loglevel/1.6.1:
5892
+    dev: false
5893
+    engines:
5894
+      node: '>= 0.6.0'
5895
+    resolution:
5896
+      integrity: sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=
5835 5897
   /longest/1.0.1:
5836 5898
     dev: false
5837 5899
     engines:
@@ -5953,6 +6015,22 @@ packages:
5953 6015
   /math-random/1.0.1:
5954 6016
     resolution:
5955 6017
       integrity: sha1-izqsWIuKZuSXXjzepn97sylgH6w=
6018
+  /matrix-js-sdk/1.0.2:
6019
+    dependencies:
6020
+      another-json: 0.2.0
6021
+      babel-runtime: 6.26.0
6022
+      base-x: 3.0.4
6023
+      bluebird: 3.5.3
6024
+      browser-request: 0.3.3
6025
+      bs58: 4.0.1
6026
+      content-type: 1.0.4
6027
+      loglevel: 1.6.1
6028
+      qs: 6.6.0
6029
+      request: 2.88.0
6030
+      unhomoglyph: 1.0.2
6031
+    dev: false
6032
+    resolution:
6033
+      integrity: sha512-4WCBJFSoOLelHi7IUAcVxPQF+gTc/i9NUKZ77qwUfcZVED8VKTIyWZnwpeLgocK5gAOJV9fkAyO5mny9SkZaGg==
5956 6034
   /md5.js/1.3.5:
5957 6035
     dependencies:
5958 6036
       hash-base: 3.0.4
@@ -6085,16 +6163,23 @@ packages:
6085 6163
     dev: false
6086 6164
     engines:
6087 6165
       node: '>= 0.6'
6166
+    optional: true
6088 6167
     resolution:
6089 6168
       integrity: sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==
6090
-  /mime-types/2.1.21:
6169
+  /mime-db/1.38.0:
6170
+    dev: false
6171
+    engines:
6172
+      node: '>= 0.6'
6173
+    resolution:
6174
+      integrity: sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==
6175
+  /mime-types/2.1.22:
6091 6176
     dependencies:
6092
-      mime-db: 1.37.0
6177
+      mime-db: 1.38.0
6093 6178
     dev: false
6094 6179
     engines:
6095 6180
       node: '>= 0.6'
6096 6181
     resolution:
6097
-      integrity: sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==
6182
+      integrity: sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==
6098 6183
   /mime/1.4.1:
6099 6184
     dev: false
6100 6185
     hasBin: true
@@ -7321,6 +7406,12 @@ packages:
7321 7406
       node: '>=0.6'
7322 7407
     resolution:
7323 7408
       integrity: sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
7409
+  /qs/6.6.0:
7410
+    dev: false
7411
+    engines:
7412
+      node: '>=0.6'
7413
+    resolution:
7414
+      integrity: sha512-KIJqT9jQJDQx5h5uAVPimw6yVg2SekOKu959OCtktD3FjzbpvaPr8i4zzg07DOMz+igA4W/aNM7OV8H37pFYfA==
7324 7415
   /query-string/4.3.4:
7325 7416
     dependencies:
7326 7417
       object-assign: 4.1.1
@@ -7521,6 +7612,10 @@ packages:
7521 7612
     dev: false
7522 7613
     resolution:
7523 7614
       integrity: sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==
7615
+  /regenerator-runtime/0.11.1:
7616
+    dev: false
7617
+    resolution:
7618
+      integrity: sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==
7524 7619
   /regenerator-runtime/0.12.1:
7525 7620
     dev: false
7526 7621
     resolution:
@@ -7650,7 +7745,7 @@ packages:
7650 7745
       is-typedarray: 1.0.0
7651 7746
       isstream: 0.1.2
7652 7747
       json-stringify-safe: 5.0.1
7653
-      mime-types: 2.1.21
7748
+      mime-types: 2.1.22
7654 7749
       oauth-sign: 0.9.0
7655 7750
       performance-now: 2.1.0
7656 7751
       qs: 6.5.2
@@ -8161,6 +8256,13 @@ packages:
8161 8256
       node: '>=0.10.0'
8162 8257
     resolution:
8163 8258
       integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
8259
+  /sourceify/0.1.0:
8260
+    dependencies:
8261
+      convert-source-map: 1.6.0
8262
+      through2: 2.0.5
8263
+    dev: false
8264
+    resolution:
8265
+      integrity: sha1-C1b+V/lFc1DZJliBCq/afA9EA0w=
8164 8266
   /sparkles/1.0.1:
8165 8267
     dev: false
8166 8268
     engines:
@@ -8228,7 +8330,7 @@ packages:
8228 8330
       node: '>=0.10.0'
8229 8331
     resolution:
8230 8332
       integrity: sha1-pWad4StC87HV6D7QPHEEb8SPQe8=
8231
-  /sshpk/1.16.0:
8333
+  /sshpk/1.16.1:
8232 8334
     dependencies:
8233 8335
       asn1: 0.2.4
8234 8336
       assert-plus: 1.0.0
@@ -8244,7 +8346,7 @@ packages:
8244 8346
       node: '>=0.10.0'
8245 8347
     hasBin: true
8246 8348
     resolution:
8247
-      integrity: sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ==
8349
+      integrity: sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==
8248 8350
   /ssri/6.0.1:
8249 8351
     dependencies:
8250 8352
       figgy-pudding: 3.5.1
@@ -8987,6 +9089,10 @@ packages:
8987 9089
       node: '>= 0.10'
8988 9090
     resolution:
8989 9091
       integrity: sha1-M52kZGJS0ILcN45wgGcpl1DhG0k=
9092
+  /unhomoglyph/1.0.2:
9093
+    dev: false
9094
+    resolution:
9095
+      integrity: sha1-1p5fWmocayEZQaCIm4HrqGWVwlM=
8990 9096
   /unicode-canonical-property-names-ecmascript/1.0.4:
8991 9097
     dev: false
8992 9098
     engines:
@@ -9546,9 +9652,11 @@ specifiers:
9546 9652
   gulp-watch: ^5.0.1
9547 9653
   jdenticon: ^2.1.1
9548 9654
   livereactload: ^4.0.0-beta.2
9655
+  matrix-js-sdk: ^1.0.2
9549 9656
   react: ^16.6.3
9550 9657
   react-dom: ^16.6.3
9551 9658
   sanitize-html: ^1.20.0
9659
+  sourceify: ^0.1.0
9552 9660
   vinyl-buffer: ^1.0.1
9553 9661
   vinyl-source-stream: ^2.0.0
9554 9662
   webpack: ^4.27.1

Loading…
Cancel
Save