update ts to 3.7.3
This commit is contained in:
parent
17e0177670
commit
ed6379c160
@ -17,6 +17,7 @@
|
||||
"rules": {
|
||||
"no-var": "error",
|
||||
"no-console": "off",
|
||||
"@typescript-eslint/camelcase": "off"
|
||||
"@typescript-eslint/camelcase": "off",
|
||||
"@typescript-eslint/interface-name-prefix": "off"
|
||||
}
|
||||
}
|
4
dist/src/index.js
vendored
4
dist/src/index.js
vendored
@ -59,7 +59,7 @@ const init = ({ app, server, options }) => {
|
||||
};
|
||||
function ExpressPeerServer(server, options) {
|
||||
const app = express_1.default();
|
||||
const newOptions = Object.assign({}, config_1.default, options);
|
||||
const newOptions = Object.assign(Object.assign({}, config_1.default), options);
|
||||
if (newOptions.proxied) {
|
||||
app.set("trust proxy", newOptions.proxied === "false" ? false : !!newOptions.proxied);
|
||||
}
|
||||
@ -75,7 +75,7 @@ function ExpressPeerServer(server, options) {
|
||||
exports.ExpressPeerServer = ExpressPeerServer;
|
||||
function PeerServer(options = {}, callback) {
|
||||
const app = express_1.default();
|
||||
const newOptions = Object.assign({}, config_1.default, options);
|
||||
const newOptions = Object.assign(Object.assign({}, config_1.default), options);
|
||||
let path = newOptions.path;
|
||||
const port = newOptions.port;
|
||||
if (path[0] !== "/") {
|
||||
|
9
dist/src/models/realm.js
vendored
9
dist/src/models/realm.js
vendored
@ -1,5 +1,9 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const v4_1 = __importDefault(require("uuid/v4"));
|
||||
const messageQueue_1 = require("./messageQueue");
|
||||
class Realm {
|
||||
constructor() {
|
||||
@ -39,10 +43,9 @@ class Realm {
|
||||
this.messageQueues.delete(id);
|
||||
}
|
||||
generateClientId() {
|
||||
const randomId = () => (Math.random().toString(36) + "0000000000000000000").substr(2, 16);
|
||||
let clientId = randomId();
|
||||
let clientId = v4_1.default();
|
||||
while (this.getClientById(clientId)) {
|
||||
clientId = randomId();
|
||||
clientId = v4_1.default();
|
||||
}
|
||||
return clientId;
|
||||
}
|
||||
|
832
package-lock.json
generated
832
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
38
package.json
38
package.json
@ -27,32 +27,32 @@
|
||||
"branch": "master"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/cors": "^2.8.6",
|
||||
"@types/express": "^4.17.1",
|
||||
"@types/ws": "^6.0.2",
|
||||
"body-parser": "^1.19.0",
|
||||
"cors": "~2.8.4",
|
||||
"express": "^4.17.1",
|
||||
"optimist": "~0.6.1",
|
||||
"@types/cors": "2.8.6",
|
||||
"@types/express": "4.17.1",
|
||||
"@types/ws": "6.0.4",
|
||||
"body-parser": "1.19.0",
|
||||
"cors": "2.8.4",
|
||||
"express": "4.17.1",
|
||||
"optimist": "0.6.1",
|
||||
"uuid": "3.3.3",
|
||||
"ws": "^7.1.2"
|
||||
"ws": "7.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.1.7",
|
||||
"@types/mocha": "^5.2.7",
|
||||
"@types/node": "^10.14.16",
|
||||
"@types/uuid": "^3.4.6",
|
||||
"@typescript-eslint/eslint-plugin": "^2.0.0",
|
||||
"@typescript-eslint/parser": "^2.0.0",
|
||||
"@types/uuid": "3.4.6",
|
||||
"@typescript-eslint/eslint-plugin": "^2.11.0",
|
||||
"@typescript-eslint/parser": "^2.11.0",
|
||||
"chai": "^4.2.0",
|
||||
"eslint": "^6.2.1",
|
||||
"mocha": "^6.2.0",
|
||||
"nodemon": "^1.19.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"rimraf": "^3.0.0",
|
||||
"sinon": "^7.4.1",
|
||||
"ts-node": "^8.3.0",
|
||||
"typescript": "^3.5.3"
|
||||
"eslint": "^6.7.2",
|
||||
"mocha": "^6.2.2",
|
||||
"nodemon": "1.19.1",
|
||||
"npm-run-all": "4.1.5",
|
||||
"rimraf": "3.0.0",
|
||||
"sinon": "7.5.0",
|
||||
"ts-node": "8.5.4",
|
||||
"typescript": "3.7.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
|
@ -1,10 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": [
|
||||
"es5",
|
||||
"es6",
|
||||
"es7",
|
||||
"es2017"
|
||||
"esnext"
|
||||
],
|
||||
"target": "es2016",
|
||||
"module": "commonjs",
|
||||
@ -16,15 +13,11 @@
|
||||
"noUnusedParameters": true,
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"outDir": "dist",
|
||||
"sourceMap": false,
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*",
|
||||
],
|
||||
"exclude": [
|
||||
"./test/",
|
||||
"./node_modules/",
|
||||
"./bin/",
|
||||
"test",
|
||||
"bin",
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user