faster uuid

This commit is contained in:
Dave Horton
2022-12-28 10:40:26 -06:00
parent e2c99609bf
commit e2ad0dca0e
10 changed files with 51 additions and 60 deletions

View File

@@ -3,7 +3,7 @@ const makeTask = require('../../tasks/make_task');
const RestCallSession = require('../../session/rest-call-session');
const CallInfo = require('../../session/call-info');
const {CallDirection, CallStatus} = require('../../utils/constants');
const uuidv4 = require('random-uuid');
const uuidv4 = require('uuid-random');
const SipError = require('drachtio-srf').SipError;
const sysError = require('./error');
const HttpRequestor = require('../../utils/http-requestor');

View File

@@ -1,4 +1,4 @@
const uuidv4 = require('random-uuid');
const uuidv4 = require('uuid-random');
const {CallDirection, AllowedSipRecVerbs} = require('./utils/constants');
const {parseSiprecPayload} = require('./utils/siprec-utils');
const CallInfo = require('./session/call-info');

View File

@@ -1,6 +1,6 @@
const {CallDirection, CallStatus} = require('../utils/constants');
const parseUri = require('drachtio-srf').parseUri;
const uuidv4 = require('random-uuid');
const uuidv4 = require('uuid-random');
/**
* @classdesc Represents the common information for all calls
* that is provided in call status webhooks

View File

@@ -1,7 +1,7 @@
const Task = require('./task');
const {TaskName, TaskPreconditions} = require('../utils/constants');
const bent = require('bent');
const uuidv4 = require('random-uuid');
const uuidv4 = require('uuid-random');
class TaskMessage extends Task {
constructor(logger, opts) {

View File

@@ -1,5 +1,5 @@
const Emitter = require('events');
const uuidv4 = require('random-uuid');
const uuidv4 = require('uuid-random');
const debug = require('debug')('jambonz:feature-server');
const assert = require('assert');
const {TaskPreconditions} = require('../utils/constants');

View File

@@ -12,7 +12,7 @@ const deepcopy = require('deepcopy');
const moment = require('moment');
const stripCodecs = require('./strip-ancillary-codecs');
const RootSpan = require('./call-tracer');
const uuidv4 = require('random-uuid');
const uuidv4 = require('uuid-random');
class SingleDialer extends Emitter {
constructor({logger, sbcAddress, target, opts, application, callInfo, accountInfo, rootSpan, startSpan}) {

View File

@@ -1,5 +1,5 @@
const assert = require('assert');
const uuidv4 = require('random-uuid');
const uuidv4 = require('uuid-random');
const {LifeCycleEvents, FS_UUID_SET_NAME} = require('./constants');
const Emitter = require('events');
const debug = require('debug')('jambonz:feature-server');

View File

@@ -1,5 +1,5 @@
const xmlParser = require('xml2js').parseString;
const uuidv4 = require('random-uuid');
const uuidv4 = require('uuid-random');
const parseUri = require('drachtio-srf').parseUri;
const transform = require('sdp-transform');
const debug = require('debug')('jambonz:feature-server');

85
package-lock.json generated
View File

@@ -27,19 +27,25 @@
"bent": "^7.3.12",
"debug": "^4.3.4",
"deepcopy": "^2.1.0",
<<<<<<< HEAD
"drachtio-fsmrf": "^3.0.12",
"drachtio-srf": "^4.5.19",
"express": "^4.18.1",
"helmet": "^5.1.0",
=======
"drachtio-fsmrf": "^3.0.15",
"drachtio-srf": "^4.5.20",
"express": "^4.18.2",
>>>>>>> 29f578f (faster uuid)
"ip": "^1.1.8",
"moment": "^2.29.4",
"parse-url": "^8.1.0",
"pino": "^6.14.0",
"random-uuid": "^1.0.2",
"sdp-transform": "^2.14.1",
"short-uuid": "^4.2.0",
"to-snake-case": "^1.0.0",
"undici": "^5.11.0",
"uuid-random": "^1.3.2",
"verify-aws-sns-signature": "^0.1.0",
"ws": "^8.8.0",
"xml2js": "^0.4.23"
@@ -2018,19 +2024,19 @@
}
},
"node_modules/drachtio-fsmrf": {
"version": "3.0.12",
"resolved": "https://registry.npmjs.org/drachtio-fsmrf/-/drachtio-fsmrf-3.0.12.tgz",
"integrity": "sha512-wpBqlNMj6mKSdMI03mFI5nBZbCmohiLWYBQdSJqSum/slW9kIsigDISwjLATboWbgzI+dpoImvoTB9CgGUm2bQ==",
"version": "3.0.15",
"resolved": "https://registry.npmjs.org/drachtio-fsmrf/-/drachtio-fsmrf-3.0.15.tgz",
"integrity": "sha512-+UPlPLBCjAAqCDG9rkGrMZpn7B2oGfZGQrnGkDxiUnfmmr56zZbElB7rPfiAKvwEOV6e3dTP+GASiZe/jIIWoQ==",
"dependencies": {
"camel-case": "^4.1.2",
"debug": "^2.6.9",
"delegates": "^0.1.0",
"drachtio-modesl": "^1.2.7",
"drachtio-srf": "^4.5.19",
"drachtio-srf": "^4.5.20",
"only": "^0.0.2",
"random-uuid": "^1.0.2",
"sdp-transform": "^2.14.1",
"snake-case": "^3.0.4"
"snake-case": "^3.0.4",
"uuid-random": "^1.3.2"
},
"engines": {
"node": ">= 6.9.3"
@@ -2073,9 +2079,9 @@
}
},
"node_modules/drachtio-srf": {
"version": "4.5.19",
"resolved": "https://registry.npmjs.org/drachtio-srf/-/drachtio-srf-4.5.19.tgz",
"integrity": "sha512-U12haYDpG8hvKJOtoPhAQDKnI8cwBiuJR1bBbQ6O1+MeaRZVBwNLT4ZPmifXKt7YWzeG53kN7jiMOWBppYrLIw==",
"version": "4.5.20",
"resolved": "https://registry.npmjs.org/drachtio-srf/-/drachtio-srf-4.5.20.tgz",
"integrity": "sha512-ZlKJaHeuTb/t6uD0EUuZcsvYac8YvXY7IvzqY2YDtV4BNywOtOqE7VhGgaVEvamBA3dTTRllThIKJv6f8Mhglw==",
"dependencies": {
"debug": "^3.2.7",
"delegates": "^0.1.0",
@@ -2083,12 +2089,12 @@
"eslint-plugin-promise": "^6.1.1",
"node-noop": "^0.0.1",
"only": "^0.0.2",
"random-uuid": "^1.0.2",
"sdp-transform": "^2.14.1",
"short-uuid": "^4.2.0",
"sip-methods": "^0.3.0",
"sip-status": "^0.1.0",
"utils-merge": "^1.0.0"
"utils-merge": "^1.0.0",
"uuid-random": "^1.3.2"
},
"engines": {
"node": ">= 6.9.3"
@@ -3606,14 +3612,6 @@
"resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.2.1.tgz",
"integrity": "sha512-Rf4YVNYpKjZ6ASAmibcwTNciQ5Co5Ztq6iZPEykHpkoflnD/K5ryE/rHehFsTm4NJj8nKDhbi3eKBWGogmNnkg=="
},
"node_modules/helmet": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.1.tgz",
"integrity": "sha512-/yX0oVZBggA9cLJh8aw3PPCfedBnbd7J2aowjzsaWwZh7/UFY0nccn/aHAggIgWUFfnykX8GKd3a1pSbrmlcVQ==",
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/hexer": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/hexer/-/hexer-1.5.0.tgz",
@@ -5579,11 +5577,6 @@
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz",
"integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg=="
},
"node_modules/random-uuid": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/random-uuid/-/random-uuid-1.0.2.tgz",
"integrity": "sha512-WcfhSG5bcJg9M0Fv7R6ISs/BqCrZqUAiGtpYrIsX/8kV/afx02pehG9f8Awszy/rTKqZNidHMc4oKdIzI21olg=="
},
"node_modules/range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
@@ -6711,6 +6704,11 @@
"uuid": "dist/bin/uuid"
}
},
"node_modules/uuid-random": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/uuid-random/-/uuid-random-1.3.2.tgz",
"integrity": "sha512-UOzej0Le/UgkbWEO8flm+0y+G+ljUon1QWTEZOq1rnMAsxo2+SckbiZdKzAHHlVh6gJqI1TjC/xwgR50MuCrBQ=="
},
"node_modules/v8-compile-cache": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
@@ -8467,19 +8465,19 @@
}
},
"drachtio-fsmrf": {
"version": "3.0.12",
"resolved": "https://registry.npmjs.org/drachtio-fsmrf/-/drachtio-fsmrf-3.0.12.tgz",
"integrity": "sha512-wpBqlNMj6mKSdMI03mFI5nBZbCmohiLWYBQdSJqSum/slW9kIsigDISwjLATboWbgzI+dpoImvoTB9CgGUm2bQ==",
"version": "3.0.15",
"resolved": "https://registry.npmjs.org/drachtio-fsmrf/-/drachtio-fsmrf-3.0.15.tgz",
"integrity": "sha512-+UPlPLBCjAAqCDG9rkGrMZpn7B2oGfZGQrnGkDxiUnfmmr56zZbElB7rPfiAKvwEOV6e3dTP+GASiZe/jIIWoQ==",
"requires": {
"camel-case": "^4.1.2",
"debug": "^2.6.9",
"delegates": "^0.1.0",
"drachtio-modesl": "^1.2.7",
"drachtio-srf": "^4.5.19",
"drachtio-srf": "^4.5.20",
"only": "^0.0.2",
"random-uuid": "^1.0.2",
"sdp-transform": "^2.14.1",
"snake-case": "^3.0.4"
"snake-case": "^3.0.4",
"uuid-random": "^1.3.2"
},
"dependencies": {
"debug": {
@@ -8516,9 +8514,9 @@
}
},
"drachtio-srf": {
"version": "4.5.19",
"resolved": "https://registry.npmjs.org/drachtio-srf/-/drachtio-srf-4.5.19.tgz",
"integrity": "sha512-U12haYDpG8hvKJOtoPhAQDKnI8cwBiuJR1bBbQ6O1+MeaRZVBwNLT4ZPmifXKt7YWzeG53kN7jiMOWBppYrLIw==",
"version": "4.5.20",
"resolved": "https://registry.npmjs.org/drachtio-srf/-/drachtio-srf-4.5.20.tgz",
"integrity": "sha512-ZlKJaHeuTb/t6uD0EUuZcsvYac8YvXY7IvzqY2YDtV4BNywOtOqE7VhGgaVEvamBA3dTTRllThIKJv6f8Mhglw==",
"requires": {
"debug": "^3.2.7",
"delegates": "^0.1.0",
@@ -8526,12 +8524,12 @@
"eslint-plugin-promise": "^6.1.1",
"node-noop": "^0.0.1",
"only": "^0.0.2",
"random-uuid": "^1.0.2",
"sdp-transform": "^2.14.1",
"short-uuid": "^4.2.0",
"sip-methods": "^0.3.0",
"sip-status": "^0.1.0",
"utils-merge": "^1.0.0"
"utils-merge": "^1.0.0",
"uuid-random": "^1.3.2"
},
"dependencies": {
"@eslint/eslintrc": {
@@ -9673,11 +9671,6 @@
}
}
},
"helmet": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.1.tgz",
"integrity": "sha512-/yX0oVZBggA9cLJh8aw3PPCfedBnbd7J2aowjzsaWwZh7/UFY0nccn/aHAggIgWUFfnykX8GKd3a1pSbrmlcVQ=="
},
"hexer": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/hexer/-/hexer-1.5.0.tgz",
@@ -11150,11 +11143,6 @@
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz",
"integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg=="
},
"random-uuid": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/random-uuid/-/random-uuid-1.0.2.tgz",
"integrity": "sha512-WcfhSG5bcJg9M0Fv7R6ISs/BqCrZqUAiGtpYrIsX/8kV/afx02pehG9f8Awszy/rTKqZNidHMc4oKdIzI21olg=="
},
"range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
@@ -12001,6 +11989,11 @@
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
},
"uuid-random": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/uuid-random/-/uuid-random-1.3.2.tgz",
"integrity": "sha512-UOzej0Le/UgkbWEO8flm+0y+G+ljUon1QWTEZOq1rnMAsxo2+SckbiZdKzAHHlVh6gJqI1TjC/xwgR50MuCrBQ=="
},
"v8-compile-cache": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",

View File

@@ -25,7 +25,6 @@
},
"dependencies": {
"@jambonz/http-health-check": "^0.0.1",
"@jambonz/db-helpers": "^0.7.3",
"@jambonz/realtimedb-helpers": "^0.5.9",
"@jambonz/stats-collector": "^0.1.6",
"@jambonz/time-series": "^0.2.5",
@@ -42,19 +41,18 @@
"bent": "^7.3.12",
"debug": "^4.3.4",
"deepcopy": "^2.1.0",
"drachtio-fsmrf": "^3.0.12",
"drachtio-srf": "^4.5.19",
"express": "^4.18.1",
"helmet": "^5.1.0",
"drachtio-fsmrf": "^3.0.15",
"drachtio-srf": "^4.5.20",
"express": "^4.18.2",
"ip": "^1.1.8",
"moment": "^2.29.4",
"parse-url": "^8.1.0",
"pino": "^6.14.0",
"random-uuid": "^1.0.2",
"sdp-transform": "^2.14.1",
"short-uuid": "^4.2.0",
"to-snake-case": "^1.0.0",
"undici": "^5.11.0",
"uuid-random": "^1.3.2",
"verify-aws-sns-signature": "^0.1.0",
"ws": "^8.8.0",
"xml2js": "^0.4.23"