ouisys-engine 2.1.76 → 3.0.0
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.
- package/.eslintrc.js +0 -2
- package/.nvmrc +1 -1
- package/dist/@types/window.d.js +5 -1
- package/dist/api/index.js +80 -48
- package/dist/common-types/AppThunk.js +5 -1
- package/dist/common-types/Either.js +5 -1
- package/dist/common-types/IError.js +5 -1
- package/dist/common-types/ITracker.js +3 -0
- package/dist/common-types/IVisitor.js +5 -1
- package/dist/common-types/RemoteDataState.js +3 -3
- package/dist/ips/tryGetIPRangeName.js +37 -5
- package/dist/pacman/index.js +16 -14
- package/dist/pacman/queryString.js +12 -10
- package/dist/reducers/click2smsFlow/Click2smsTypes.js +5 -1
- package/dist/reducers/click2smsFlow/IClick2smsConstants.js +5 -1
- package/dist/reducers/click2smsFlow/index.d.ts +1 -1
- package/dist/reducers/click2smsFlow/index.js +41 -25
- package/dist/reducers/click2smsFlow/utils.js +53 -31
- package/dist/reducers/moFlow/IMoConstants.js +5 -1
- package/dist/reducers/moFlow/MoTypes.js +5 -1
- package/dist/reducers/moFlow/index.d.ts +1 -1
- package/dist/reducers/moFlow/index.js +41 -25
- package/dist/reducers/moFlow/utils.js +57 -39
- package/dist/reducers/moRedirFlow/IMoRedirConstants.js +5 -1
- package/dist/reducers/moRedirFlow/MoRedirTypes.js +5 -1
- package/dist/reducers/moRedirFlow/index.d.ts +1 -1
- package/dist/reducers/moRedirFlow/index.js +37 -19
- package/dist/reducers/moRedirFlow/utils.js +48 -32
- package/dist/reducers/oneClickFlow/IOneClickConstants.js +5 -1
- package/dist/reducers/oneClickFlow/OneClickTypes.js +5 -1
- package/dist/reducers/oneClickFlow/index.d.ts +1 -1
- package/dist/reducers/oneClickFlow/index.js +44 -28
- package/dist/reducers/oneClickFlow/utils.js +49 -35
- package/dist/reducers/pinFlow/IPinConstants.js +5 -1
- package/dist/reducers/pinFlow/PinTypes.js +5 -1
- package/dist/reducers/pinFlow/index.d.ts +1 -1
- package/dist/reducers/pinFlow/index.js +47 -31
- package/dist/reducers/pinFlow/utils.js +63 -47
- package/dist/reducers/strategy/IStategyActionContants.js +5 -1
- package/dist/reducers/strategy/StrategyTypes.js +5 -1
- package/dist/reducers/strategy/index.d.ts +2 -2
- package/dist/reducers/strategy/index.js +44 -24
- package/dist/reducers/strategy/strategies/ask_mobile_number.js +39 -23
- package/dist/reducers/strategy/strategies/ask_operator.js +41 -25
- package/dist/reducers/strategy/strategies/detect_operator_by_ip.js +50 -33
- package/dist/reducers/strategy/strategies/header_enrichment.js +42 -24
- package/dist/reducers/strategy/utils.js +72 -54
- package/dist/reducers/ussdFlow/IUssdConstants.js +5 -1
- package/dist/reducers/ussdFlow/UssdTypes.js +5 -1
- package/dist/reducers/ussdFlow/index.d.ts +1 -1
- package/dist/reducers/ussdFlow/index.js +41 -25
- package/dist/reducers/ussdFlow/utils.js +53 -35
- package/dist/store/index.js +16 -16
- package/dist/utilities/handleSubmitNumber.js +6 -6
- package/dist/utilities/index.js +2 -2
- package/package.json +63 -58
- package/prettier.config.js +1 -1
- package/src/reducers/pinFlow/utils.ts +0 -1
- package/src/reducers/strategy/index.ts +3 -2
- package/src/reducers/strategy/strategies/detect_operator_by_ip.ts +0 -1
- package/src/utilities/index.ts +1 -1
- package/tsconfig.json +1 -1
package/dist/store/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
|
-
require("core-js/modules/es.
|
|
5
|
+
require("core-js/modules/es.array.iterator.js");
|
|
6
6
|
|
|
7
|
-
require("core-js/modules/es.
|
|
7
|
+
require("core-js/modules/es.object.to-string.js");
|
|
8
8
|
|
|
9
|
-
require("core-js/modules/es.
|
|
9
|
+
require("core-js/modules/es.string.iterator.js");
|
|
10
10
|
|
|
11
|
-
require("core-js/modules/es.
|
|
11
|
+
require("core-js/modules/es.weak-map.js");
|
|
12
12
|
|
|
13
|
-
require("core-js/modules/
|
|
13
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
14
14
|
|
|
15
|
-
require("core-js/modules/es.object.get-own-property-descriptor");
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
16
|
|
|
17
|
-
require("core-js/modules/es.
|
|
17
|
+
require("core-js/modules/es.symbol.js");
|
|
18
18
|
|
|
19
|
-
require("core-js/modules/es.
|
|
19
|
+
require("core-js/modules/es.symbol.description.js");
|
|
20
20
|
|
|
21
|
-
require("core-js/modules/es.
|
|
22
|
-
|
|
23
|
-
require("core-js/modules/es.weak-map");
|
|
24
|
-
|
|
25
|
-
require("core-js/modules/web.dom-collections.iterator");
|
|
21
|
+
require("core-js/modules/es.symbol.iterator.js");
|
|
26
22
|
|
|
27
23
|
Object.defineProperty(exports, "__esModule", {
|
|
28
24
|
value: true
|
|
29
25
|
});
|
|
30
26
|
exports.default = void 0;
|
|
31
27
|
|
|
28
|
+
require("core-js/modules/es.array.includes.js");
|
|
29
|
+
|
|
30
|
+
require("core-js/modules/es.string.includes.js");
|
|
31
|
+
|
|
32
32
|
var RDS = _interopRequireWildcard(require("../common-types/RemoteDataState"));
|
|
33
33
|
|
|
34
34
|
var _redux = require("redux");
|
|
@@ -43,9 +43,9 @@ var _utils = require("../reducers/strategy/utils");
|
|
|
43
43
|
|
|
44
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
45
45
|
|
|
46
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
46
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
47
47
|
|
|
48
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
48
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
49
49
|
|
|
50
50
|
var log = (0, _reduxLogger.createLogger)({
|
|
51
51
|
diff: true,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.array.join");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.regexp.exec");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.string.match");
|
|
8
|
-
|
|
9
3
|
Object.defineProperty(exports, "__esModule", {
|
|
10
4
|
value: true
|
|
11
5
|
});
|
|
12
6
|
exports.handleFormSubmit = exports.handleAutoSubmitMsisdn = void 0;
|
|
13
7
|
|
|
8
|
+
require("core-js/modules/es.array.join.js");
|
|
9
|
+
|
|
10
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
11
|
+
|
|
12
|
+
require("core-js/modules/es.string.match.js");
|
|
13
|
+
|
|
14
14
|
var _awesomePhonenumber = _interopRequireDefault(require("awesome-phonenumber"));
|
|
15
15
|
|
|
16
16
|
var _utils = require("../reducers/strategy/utils");
|
package/dist/utilities/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.setOnLoadUtilities = exports.
|
|
6
|
+
exports.setOnLoadUtilities = exports.isDMBCheck = exports.getHost = void 0;
|
|
7
7
|
|
|
8
8
|
var _utils = require("../reducers/moFlow/utils");
|
|
9
9
|
|
|
@@ -35,7 +35,7 @@ var setOnLoadUtilities = function setOnLoadUtilities(config) {
|
|
|
35
35
|
(0, _utils2.startEvinaAgency)(config);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
if (process.env.country.toLowerCase() === "sa" || process.env.country.toLowerCase() === "iq") {
|
|
38
|
+
if (process.env.country.toLowerCase() === "sa" || process.env.country.toLowerCase() === "iq" || process.env.country.toLowerCase() === "k2") {
|
|
39
39
|
(0, _utils3.loadMcpShield)(window, config);
|
|
40
40
|
}
|
|
41
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ouisys-engine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"directories": "dist dev-tools",
|
|
@@ -11,78 +11,83 @@
|
|
|
11
11
|
"build:init": "tsc --init --declaration --allowSyntheticDefaultImports --target esnext --outDir dist",
|
|
12
12
|
"release": "ts-node ./src/dev-tools/publish-package",
|
|
13
13
|
"manage:configs": "ts-node ./src/test-tools/configure-page-strategy.ts",
|
|
14
|
+
"lint": "eslint --fix 'src/**/*.{ts,tsx}'",
|
|
14
15
|
"format": "prettier --write ."
|
|
15
16
|
},
|
|
16
17
|
"author": "",
|
|
17
18
|
"license": "ISC",
|
|
18
19
|
"dependencies": {
|
|
19
|
-
"awesome-phonenumber": "^2.
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
20
|
+
"awesome-phonenumber": "^3.2.0",
|
|
21
|
+
"immutability-helper": "^3.1.1",
|
|
22
|
+
"pacman-client": "^1.5.6",
|
|
23
|
+
"react-addons-update": "^15.6.3",
|
|
24
|
+
"redux": "^4.2.0",
|
|
23
25
|
"redux-logger": "^3.0.6",
|
|
24
|
-
"redux-thunk": "^2.
|
|
25
|
-
"rxjs": "^
|
|
26
|
-
"rxjs-compat": "^6.
|
|
27
|
-
"typescript": "^4.4
|
|
28
|
-
"uuid": "^
|
|
26
|
+
"redux-thunk": "^2.4.1",
|
|
27
|
+
"rxjs": "^7.5.5",
|
|
28
|
+
"rxjs-compat": "^6.6.7",
|
|
29
|
+
"typescript": "^4.7.4",
|
|
30
|
+
"uuid": "^8.3.2"
|
|
29
31
|
},
|
|
30
32
|
"devDependencies": {
|
|
31
|
-
"@babel/cli": "7.
|
|
32
|
-
"@babel/core": "7.
|
|
33
|
-
"@babel/plugin-proposal-class-properties": "7.
|
|
34
|
-
"@babel/plugin-transform-member-expression-literals": "^7.
|
|
35
|
-
"@babel/preset-env": "7.
|
|
36
|
-
"@babel/preset-typescript": "7.
|
|
37
|
-
"@babel/runtime": "7.
|
|
38
|
-
"@reduxjs/toolkit": "
|
|
39
|
-
"@types/chai": "^4.1
|
|
40
|
-
"@types/crypto-js": "^4.
|
|
41
|
-
"@types/fs-extra": "^
|
|
42
|
-
"@types/inquirer": "^
|
|
43
|
-
"@types/mocha": "^
|
|
44
|
-
"@types/node": "^
|
|
45
|
-
"@types/node-fetch": "^2.
|
|
46
|
-
"@types/ramda": "^0.
|
|
47
|
-
"@types/react": "^
|
|
48
|
-
"@types/react-
|
|
49
|
-
"@types/react-
|
|
50
|
-
"@types/react-
|
|
51
|
-
"@types/
|
|
52
|
-
"@types/redux-
|
|
53
|
-
"@types/
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"eslint": "^
|
|
58
|
-
"eslint-config-
|
|
59
|
-
"eslint-
|
|
60
|
-
"eslint-plugin-
|
|
61
|
-
"eslint-plugin-
|
|
62
|
-
"eslint-plugin-
|
|
63
|
-
"eslint-plugin-
|
|
64
|
-
"eslint-plugin-react": "^
|
|
65
|
-
"eslint-plugin-
|
|
66
|
-
"eslint-plugin
|
|
67
|
-
"
|
|
68
|
-
"jsdom": "^13.2.0",
|
|
33
|
+
"@babel/cli": "7.18.6",
|
|
34
|
+
"@babel/core": "7.18.6",
|
|
35
|
+
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
36
|
+
"@babel/plugin-transform-member-expression-literals": "^7.18.6",
|
|
37
|
+
"@babel/preset-env": "7.18.6",
|
|
38
|
+
"@babel/preset-typescript": "7.18.6",
|
|
39
|
+
"@babel/runtime": "7.18.6",
|
|
40
|
+
"@reduxjs/toolkit": "1.8.3",
|
|
41
|
+
"@types/chai": "^4.3.1",
|
|
42
|
+
"@types/crypto-js": "^4.1.1",
|
|
43
|
+
"@types/fs-extra": "^9.0.13",
|
|
44
|
+
"@types/inquirer": "^8.2.1",
|
|
45
|
+
"@types/mocha": "^9.1.1",
|
|
46
|
+
"@types/node": "^18.0.3",
|
|
47
|
+
"@types/node-fetch": "^2.6.2",
|
|
48
|
+
"@types/ramda": "^0.28.15",
|
|
49
|
+
"@types/react": "^18.0.15",
|
|
50
|
+
"@types/react-dom": "^18.0.6",
|
|
51
|
+
"@types/react-redux": "^7.1.24",
|
|
52
|
+
"@types/react-test-renderer": "^18.0.0",
|
|
53
|
+
"@types/redux-logger": "^3.0.9",
|
|
54
|
+
"@types/redux-mock-store": "^1.0.3",
|
|
55
|
+
"@types/uuid": "^8.3.4",
|
|
56
|
+
"chai": "^4.3.6",
|
|
57
|
+
"core-js": "3.23.4",
|
|
58
|
+
"eslint": "^8.19.0",
|
|
59
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
60
|
+
"eslint-config-prettier": "^8.5.0",
|
|
61
|
+
"eslint-plugin-import": "^2.26.0",
|
|
62
|
+
"eslint-plugin-jest": "^26.5.3",
|
|
63
|
+
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
64
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
65
|
+
"eslint-plugin-react": "^7.30.1",
|
|
66
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
67
|
+
"eslint-plugin-testing-library": "^5.5.1",
|
|
68
|
+
"eslint-webpack-plugin": "^3.2.0",
|
|
69
|
+
"jsdom": "^20.0.0",
|
|
69
70
|
"jsdom-global": "^3.0.2",
|
|
70
|
-
"msw": "^0.
|
|
71
|
-
"prettier": "^2.
|
|
72
|
-
"prettier-plugin-organize-imports": "^
|
|
73
|
-
"react-test-renderer": "^
|
|
71
|
+
"msw": "^0.43.1",
|
|
72
|
+
"prettier": "^2.7.1",
|
|
73
|
+
"prettier-plugin-organize-imports": "^3.0.0",
|
|
74
|
+
"react-test-renderer": "^18.2.0",
|
|
74
75
|
"redux-cli-logger": "^2.1.0",
|
|
75
76
|
"redux-mock-store": "^1.5.4",
|
|
76
|
-
"ts-node": "^8.
|
|
77
|
-
"yarn": "^1.17.3"
|
|
77
|
+
"ts-node": "^10.8.2"
|
|
78
78
|
},
|
|
79
79
|
"resolutions": {
|
|
80
|
-
"@types/react": "^
|
|
81
|
-
"@types/react-dom": "^
|
|
82
|
-
"react": "
|
|
83
|
-
"react-dom": "
|
|
80
|
+
"@types/react": "^18.0.14",
|
|
81
|
+
"@types/react-dom": "^18.0.5",
|
|
82
|
+
"react": "^18.2.0",
|
|
83
|
+
"react-dom": "^18.2.0"
|
|
84
84
|
},
|
|
85
85
|
"proxy": "http://localhost:3030/",
|
|
86
|
+
"husky": {
|
|
87
|
+
"hooks": {
|
|
88
|
+
"pre-commit": "lint-staged"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
86
91
|
"lint-staged": {
|
|
87
92
|
"*": "prettier --ignore-unknown --write",
|
|
88
93
|
"src/**/*.{ts,tsx}": "eslint --fix"
|
package/prettier.config.js
CHANGED
|
@@ -73,7 +73,6 @@ async function submitMSISDNOnce(window: Window, config: IConfig, internationalMS
|
|
|
73
73
|
const search = (window.location.search.indexOf("redirect-back=1") == -1) ? (window.location.search.substr(1) || '') : ''
|
|
74
74
|
const extraParamsQs = !extraParams ? '' : '&' + Object.keys(extraParams).map(k => `${k}=${extraParams[k]}`).join('&')
|
|
75
75
|
const uniqid = (!!uniqidResult && uniqidResult != "") ? `&mcpUniqid=${uniqidResult}` : '';
|
|
76
|
-
|
|
77
76
|
|
|
78
77
|
|
|
79
78
|
const result: IMSISDNSubmissionResult = await window.tallymanApi.triggerPin(host, country, slug, device, offer, msisdn, rockmanId, extraParamsQs, search, uniqid)
|
|
@@ -21,7 +21,7 @@ import ask_mobile_number,
|
|
|
21
21
|
{
|
|
22
22
|
submitMSISDNAction
|
|
23
23
|
} from "./strategies/ask_mobile_number";
|
|
24
|
-
import update from
|
|
24
|
+
import update from 'immutability-helper';
|
|
25
25
|
import mkTracker from "../../pacman";
|
|
26
26
|
import detect_operator_by_ip from "./strategies/detect_operator_by_ip";
|
|
27
27
|
import { loadOc2sms } from "../click2smsFlow";
|
|
@@ -270,8 +270,9 @@ export function checkSubscriptionAction(trackingArgs:{flow: string, action: stri
|
|
|
270
270
|
}
|
|
271
271
|
export function genericHandler<S,P>(state:S, payload:P){
|
|
272
272
|
return update(state, {
|
|
273
|
+
//@ts-ignore
|
|
273
274
|
currentState:{
|
|
274
|
-
$set:payload
|
|
275
|
+
$set: payload
|
|
275
276
|
}
|
|
276
277
|
});
|
|
277
278
|
}
|
|
@@ -2,7 +2,6 @@ import * as RDS from "../../../common-types/RemoteDataState";
|
|
|
2
2
|
|
|
3
3
|
import {getConfig, determineFlowByOperatorFromIp } from "../utils";
|
|
4
4
|
import { AppThunk } from "../../../common-types/AppThunk";
|
|
5
|
-
import update from "react-addons-update";
|
|
6
5
|
import {
|
|
7
6
|
IFlow
|
|
8
7
|
} from "../StrategyTypes";
|
package/src/utilities/index.ts
CHANGED
|
@@ -20,7 +20,7 @@ export const setOnLoadUtilities = (config:IConfig)=>{
|
|
|
20
20
|
if(process.env.country.toLowerCase() === "a2" && process.env.NODE_ENV === "production"){
|
|
21
21
|
startEvinaAgency(config)
|
|
22
22
|
}
|
|
23
|
-
if(process.env.country.toLowerCase() === "sa" || process.env.country.toLowerCase() === "iq"){
|
|
23
|
+
if(process.env.country.toLowerCase() === "sa" || process.env.country.toLowerCase() === "iq" || process.env.country.toLowerCase() === "k2"){
|
|
24
24
|
loadMcpShield(window, config);
|
|
25
25
|
}
|
|
26
26
|
}
|
package/tsconfig.json
CHANGED