@sitel/common 1.0.123 → 1.0.125

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.
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -18,7 +18,7 @@ var Listener = /** @class */ (function () {
18
18
  var _this = this;
19
19
  var subscription = this.client.subscribe(this.subject, this.queueGroupName, this.subscriptionOptions());
20
20
  subscription.on('message', function (msg) {
21
- console.log("Message received[" + msg.getSequence() + "]:" + _this.subject + "/" + _this.queueGroupName);
21
+ console.log("Message received[".concat(msg.getSequence(), "]:").concat(_this.subject, "/").concat(_this.queueGroupName));
22
22
  var parsedData = _this.parseMessage(msg);
23
23
  _this.onMessage(parsedData, msg);
24
24
  });
@@ -13,7 +13,7 @@ var Publisher = /** @class */ (function () {
13
13
  reject('publish failed: ' + err);
14
14
  }
15
15
  else {
16
- console.log("published message with guid:" + guid + " to subject:" + _this.subject);
16
+ console.log("published message with guid:".concat(guid, " to subject:").concat(_this.subject));
17
17
  resolve();
18
18
  }
19
19
  });
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/build/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -2,4 +2,4 @@ import { Request, Response, NextFunction } from 'express';
2
2
  /**
3
3
  * normal middleware have 3 args, but error middleware has an extra arg which is the Error
4
4
  */
5
- export declare const errorHandler: (err: Error, req: Request, res: Response, next: NextFunction) => Response<any> | undefined;
5
+ export declare const errorHandler: (err: Error, req: Request, res: Response, next: NextFunction) => Response<any, Record<string, any>> | undefined;
@@ -4,7 +4,7 @@ exports.validateRequestHandler = void 0;
4
4
  var express_validator_1 = require("express-validator");
5
5
  var request_validation_error_1 = require("../errors/request-validation-error");
6
6
  var validateRequestHandler = function (req, res, next) {
7
- var errors = express_validator_1.validationResult(req);
7
+ var errors = (0, express_validator_1.validationResult)(req);
8
8
  if (!errors.isEmpty()) {
9
9
  throw new request_validation_error_1.RequestValidationError(errors.array());
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitel/common",
3
- "version": "1.0.123",
3
+ "version": "1.0.125",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -18,14 +18,14 @@
18
18
  "devDependencies": {
19
19
  "rimraf": "^3.0.2",
20
20
  "ts-node": "^9.0.0",
21
- "typescript": "^4.0.3"
21
+ "typescript": "^4.1.3"
22
22
  },
23
23
  "dependencies": {
24
24
  "@types/cookie-session": "^2.0.41",
25
- "@types/express": "^4.17.8",
25
+ "@types/express": "4.17.18",
26
26
  "@types/jsonwebtoken": "^8.5.0",
27
27
  "cookie-session": "^1.4.0",
28
- "express": "^4.17.1",
28
+ "express": "4.17.1",
29
29
  "express-validator": "^6.6.1",
30
30
  "jsonwebtoken": "^8.5.1",
31
31
  "node-nats-streaming": "^0.3.2"