Merge branch 'master' into refactoring/ts
# Conflicts: # src/models/realm.js # test/services/checkBrokenConnections/index.ts
This commit is contained in:
commit
d46628067b
7
.gitpod.yml
Normal file
7
.gitpod.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
tasks:
|
||||||
|
- init: npm i
|
||||||
|
command: npm start
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- port: 9000
|
||||||
|
onOpen: open-preview
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
PeerServer helps broker connections between PeerJS clients. Data is not proxied through the server.
|
PeerServer helps broker connections between PeerJS clients. Data is not proxied through the server.
|
||||||
|
|
||||||
|
[](https://gitpod.io/#https://github.com/peers/peerjs-server)
|
||||||
|
|
||||||
## [https://peerjs.com](https://peerjs.com)
|
## [https://peerjs.com](https://peerjs.com)
|
||||||
|
|
||||||
### Run PeerServer
|
### Run PeerServer
|
||||||
|
5
package-lock.json
generated
5
package-lock.json
generated
@ -4738,6 +4738,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
||||||
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
|
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
|
||||||
},
|
},
|
||||||
|
"uuid4": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/uuid4/-/uuid4-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-Gr1q2k40LpF8CokcnQFjPDsdslzJbTCTBG5xQIEflUov431gFkY5KduiGIeKYAamkQnNn4IfdHJbLnl9Bib8TQ=="
|
||||||
|
},
|
||||||
"v8-compile-cache": {
|
"v8-compile-cache": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz",
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
"cors": "~2.8.4",
|
"cors": "~2.8.4",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"optimist": "~0.6.1",
|
"optimist": "~0.6.1",
|
||||||
|
"uuid4": "^1.1.4",
|
||||||
"ws": "^7.1.2"
|
"ws": "^7.1.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -53,6 +54,6 @@
|
|||||||
"typescript": "^3.5.3"
|
"typescript": "^3.5.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^10"
|
"node": ">=10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@ import { Client } from '../../src/models/client';
|
|||||||
|
|
||||||
describe('Realm', () => {
|
describe('Realm', () => {
|
||||||
describe('#generateClientId', () => {
|
describe('#generateClientId', () => {
|
||||||
it('should generate a 16-character ID', () => {
|
it('should generate a 36-character UUID', () => {
|
||||||
const realm = new Realm();
|
const realm = new Realm();
|
||||||
expect(realm.generateClientId().length).to.eq(16);
|
expect(realm.generateClientId().length).to.eq(36);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ describe('checkBrokenConnections service', () => {
|
|||||||
expect(realm.getClientById('id')).to.be.undefined;
|
expect(realm.getClientById('id')).to.be.undefined;
|
||||||
checkBrokenConnections.stop();
|
checkBrokenConnections.stop();
|
||||||
done();
|
done();
|
||||||
}, checkBrokenConnections.checkInterval * 2 + 10);
|
}, checkBrokenConnections.checkInterval * 2 + 30);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should remove client after 1 ping', (done) => {
|
it('should remove client after 1 ping', (done) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user