@sipgate/integration-bridge 0.9.3 → 0.9.5

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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.extractHeaderMiddleware = void 0;
4
- const DEFAULT_LOCALE = "de_DE";
4
+ const DEFAULT_LOCALE = "de-DE";
5
5
  function extractHeaderMiddleware(req, res, next) {
6
6
  const apiKey = req.get("x-provider-key") || "";
7
7
  const apiUrl = req.get("x-provider-url") || "";
@@ -4,7 +4,7 @@ exports.isDirectDial = exports.convertPhoneNumberToE164 = void 0;
4
4
  const awesome_phonenumber_1 = require("awesome-phonenumber");
5
5
  const MIN_PHONE_NUMBER_LENGTH = 5;
6
6
  function convertPhoneNumberToE164(phoneNumber, locale) {
7
- const region = locale.replace(/.+_/, "").toUpperCase();
7
+ const region = locale.replace("_", "-").replace(/.+-/, "").toUpperCase();
8
8
  try {
9
9
  const parsedPhoneNumber = (0, awesome_phonenumber_1.parsePhoneNumber)(phoneNumber, region);
10
10
  const e164 = parsedPhoneNumber.getNumber("e164");
@@ -1 +1 @@
1
- {"version":3,"file":"phone-number-utils.js","sourceRoot":"","sources":["../../src/util/phone-number-utils.ts"],"names":[],"mappings":";;;AAAA,6DAAuD;AAGvD,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAElC,SAAgB,wBAAwB,CACtC,WAAmB,EACnB,MAAc;IAEd,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAEvD,IAAI;QACF,MAAM,iBAAiB,GAAG,IAAA,sCAAgB,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAChE,MAAM,IAAI,GAAG,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACjD,OAAO,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,WAAW,CAAC;KAC5B;IAAC,WAAM;QACN,OAAO,WAAW,CAAC;KACpB;AACH,CAAC;AAbD,4DAaC;AAEM,MAAM,YAAY,GAAG,CAAC,WAAwB,EAAE,EAAE;IACvD,OAAO,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,uBAAuB,CAAC;AAClE,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}
1
+ {"version":3,"file":"phone-number-utils.js","sourceRoot":"","sources":["../../src/util/phone-number-utils.ts"],"names":[],"mappings":";;;AAAA,6DAAuD;AAGvD,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAElC,SAAgB,wBAAwB,CACtC,WAAmB,EACnB,MAAc;IAEd,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAEzE,IAAI;QACF,MAAM,iBAAiB,GAAG,IAAA,sCAAgB,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAChE,MAAM,IAAI,GAAG,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACjD,OAAO,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,WAAW,CAAC;KAC5B;IAAC,WAAM;QACN,OAAO,WAAW,CAAC;KACpB;AACH,CAAC;AAbD,4DAaC;AAEM,MAAM,YAAY,GAAG,CAAC,WAAwB,EAAE,EAAE;IACvD,OAAO,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,uBAAuB,CAAC;AAClE,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sipgate/integration-bridge",
3
- "version": "0.9.3",
3
+ "version": "0.9.5",
4
4
  "description": "sipgate Integration Bridge Framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -71,7 +71,7 @@
71
71
  "prettier": "2.7.1",
72
72
  "rimraf": "3.0.2",
73
73
  "ts-jest": "28.0.8",
74
- "typescript": "4.8.3"
74
+ "typescript": "4.8.4"
75
75
  },
76
76
  "dependencies": {
77
77
  "ajv": "^8.11.0",