peer-term 1.1.5 → 1.1.6
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.
- package/package.json +1 -1
- package/src/index.js +4 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -173,6 +173,7 @@ class Session {
|
|
|
173
173
|
|
|
174
174
|
this.ws = null;
|
|
175
175
|
this.code = null;
|
|
176
|
+
this.hostToken = null;
|
|
176
177
|
this.keyPair = null;
|
|
177
178
|
this.sharedKey = null;
|
|
178
179
|
this.ptyProcess = null;
|
|
@@ -211,7 +212,7 @@ class Session {
|
|
|
211
212
|
const config = JSON.stringify({
|
|
212
213
|
type: 'session-config',
|
|
213
214
|
readonly: this.readOnly,
|
|
214
|
-
version: '1.1.
|
|
215
|
+
version: '1.1.6',
|
|
215
216
|
shell: this.shell,
|
|
216
217
|
startPath: this.startPath,
|
|
217
218
|
});
|
|
@@ -267,6 +268,7 @@ class Session {
|
|
|
267
268
|
switch (msg.type) {
|
|
268
269
|
case 'code': {
|
|
269
270
|
this.code = msg.code;
|
|
271
|
+
this.hostToken = msg.hostToken || null;
|
|
270
272
|
printSessionBox({
|
|
271
273
|
code: this.code,
|
|
272
274
|
expiry: formatDuration(this.expiryMs),
|
|
@@ -632,7 +634,7 @@ class Session {
|
|
|
632
634
|
this._pendingReconnectWs = newWs;
|
|
633
635
|
|
|
634
636
|
newWs.on('open', () => {
|
|
635
|
-
newWs.send(JSON.stringify({ type: 'host-rejoin', code: this.code }));
|
|
637
|
+
newWs.send(JSON.stringify({ type: 'host-rejoin', code: this.code, hostToken: this.hostToken }));
|
|
636
638
|
});
|
|
637
639
|
|
|
638
640
|
newWs.on('message', (raw) => {
|