ouisys-engine 3.0.13 → 3.0.14

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,4 +1,4 @@
1
- declare type IVisitor = {
1
+ export declare type IVisitor = {
2
2
  country: string;
3
3
  rockmanId: string;
4
4
  impressionNumber: number;
@@ -1,2 +1,2 @@
1
- import IVisitor from '../common-types/IVisitor';
1
+ import { IVisitor } from '../common-types/IVisitor';
2
2
  export default function tryGetIPRangeName(visitor: IVisitor): Promise<string>;
@@ -53,6 +53,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
53
53
 
54
54
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
55
55
 
56
+ // eslint-disable-next-line consistent-return
56
57
  function tryGetIPRangeName(_x) {
57
58
  return _tryGetIPRangeName.apply(this, arguments);
58
59
  }
@@ -64,7 +65,8 @@ function _tryGetIPRangeName() {
64
65
  while (1) {
65
66
  switch (_context.prev = _context.next) {
66
67
  case 0:
67
- mockip = (0, _queryString.default)(window.location.href, 'mock-ip') || process.env.mock_ip;
68
+ mockip = (0, _queryString.default)(window.location.href, 'mock-ip') || process.env.mock_ip; // eslint-disable-next-line no-console
69
+
68
70
  console.log('mockip', mockip);
69
71
 
70
72
  if (!(!visitor.ip && typeof window !== 'undefined')) {
@@ -333,7 +333,7 @@ var he_pin_one_click_header_enrichment = function he_pin_one_click_header_enrich
333
333
  mapIpRangeToAgency = {
334
334
  om_ooredoo: 'o2_ooredoo'
335
335
  };
336
- flowObj = (0, _utils.determineFlowByOperator)(mapIpRangeToAgency[ipRangeName.toUpperCase()]);
336
+ flowObj = (0, _utils.determineFlowByOperator)(mapIpRangeToAgency[ipRangeName]);
337
337
 
338
338
  if (!(flowObj.flow === 'oneClick')) {
339
339
  _context2.next = 19;
@@ -506,7 +506,7 @@ var he_mo_redir_one_click_header_enrichment = function he_mo_redir_one_click_hea
506
506
  case 3:
507
507
  ipRangeName = _context3.sent;
508
508
 
509
- if (!(ipRangeName === null)) {
509
+ if (!ipRangeName) {
510
510
  _context3.next = 7;
511
511
  break;
512
512
  }
@@ -332,9 +332,9 @@ function _determineFlowByMsidn() {
332
332
 
333
333
  function determineFlowByOperator(operator) {
334
334
  var flowObj = _objectSpread({
335
- operator: operator,
335
+ operator: operator === null || operator === void 0 ? void 0 : operator.toUpperCase(),
336
336
  default: defaultFlowConfig
337
- }, operatorsConfig[operator]);
337
+ }, operatorsConfig[operator === null || operator === void 0 ? void 0 : operator.toUpperCase()]);
338
338
 
339
339
  return flowObj;
340
340
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ouisys-engine",
3
- "version": "3.0.13",
3
+ "version": "3.0.14",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "directories": "dist dev-tools",