mongodb-livedata-server 0.1.2 → 0.1.3
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.
|
@@ -8,8 +8,9 @@ export interface SessionConnectionHandle {
|
|
|
8
8
|
id: string;
|
|
9
9
|
close: Function;
|
|
10
10
|
onClose: Function;
|
|
11
|
-
clientAddress:
|
|
11
|
+
clientAddress: string | null;
|
|
12
12
|
httpHeaders: Record<string, any>;
|
|
13
|
+
sockjsSessionId?: string;
|
|
13
14
|
}
|
|
14
15
|
interface DDPMessage {
|
|
15
16
|
msg: string;
|
|
@@ -195,7 +195,8 @@ class DDPSession {
|
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
197
|
clientAddress: self._clientAddress(),
|
|
198
|
-
httpHeaders: self.socket.headers
|
|
198
|
+
httpHeaders: self.socket.headers,
|
|
199
|
+
sockjsSessionId: self.socket.pathname.split('/')[3]
|
|
199
200
|
};
|
|
200
201
|
self.send({ msg: 'connected', session: self.id });
|
|
201
202
|
// On initial connect, spin up all the universal publishers.
|
package/dist/meteor/ddp/utils.js
CHANGED
|
@@ -40,7 +40,7 @@ function parseDDP(stringMessage) {
|
|
|
40
40
|
var msg = JSON.parse(stringMessage);
|
|
41
41
|
}
|
|
42
42
|
catch (e) {
|
|
43
|
-
console.log("Discarding message with invalid JSON", stringMessage);
|
|
43
|
+
console.log("Discarding message with invalid JSON", stringMessage, '\r\n' + e.toString());
|
|
44
44
|
return null;
|
|
45
45
|
}
|
|
46
46
|
// DDP messages must be objects.
|
|
@@ -1630,11 +1630,7 @@ const MODIFIERS = {
|
|
|
1630
1630
|
});
|
|
1631
1631
|
}
|
|
1632
1632
|
else {
|
|
1633
|
-
|
|
1634
|
-
toPush.forEach(element => {
|
|
1635
|
-
spliceArguments.push(element);
|
|
1636
|
-
});
|
|
1637
|
-
target[field].splice(...spliceArguments);
|
|
1633
|
+
target[field].splice(position, 0, ...toPush);
|
|
1638
1634
|
}
|
|
1639
1635
|
// Actually sort.
|
|
1640
1636
|
if (sortFunction) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongodb-livedata-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "MongoDB live data server, extracted from Meteor, Fibers removed and converted to TypeScript",
|
|
5
5
|
"main": "dist/livedata_server.js",
|
|
6
6
|
"types": "dist/livedata_server.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
+
"prepack": "tsc",
|
|
8
9
|
"build": "tsc"
|
|
9
10
|
},
|
|
10
11
|
"keywords": [],
|