@kushki/js 1.27.2-alpha → 1.27.3

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.
@@ -10,9 +10,11 @@ var DynamicImportUtils = /** @class */ (function () {
10
10
  DynamicImportUtils["import"] = function (src) {
11
11
  switch (src) {
12
12
  case CardinalEnum_1.CardinalEnum.STAGING:
13
- return Promise.resolve().then(function () { return require("../libs/cardinal/staging"); });
13
+ // @ts-ignore
14
+ return Promise.resolve().then(function () { return require(".././../../lib/libs/cardinal/staging"); });
14
15
  case CardinalEnum_1.CardinalEnum.PROD:
15
- return Promise.resolve().then(function () { return require("../libs/cardinal/prod"); });
16
+ // @ts-ignore
17
+ return Promise.resolve().then(function () { return require(".././../../lib/libs/cardinal/prod"); });
16
18
  }
17
19
  };
18
20
  return DynamicImportUtils;
@@ -0,0 +1,2 @@
1
+ /* tslint:disable:all */
2
+
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ // istanbul ignore file
3
+ // tslint:disable
4
+ // @ts-nocheck
5
+ !(function (e) {
6
+ function n(i) {
7
+ if (t[i])
8
+ return t[i].exports;
9
+ var o = (t[i] = { exports: {}, id: i, loaded: !1 });
10
+ return e[i].call(o.exports, o, o.exports, n), (o.loaded = !0), o.exports;
11
+ }
12
+ var i = window.songbirdLoader;
13
+ window.songbirdLoader = function (t, r) {
14
+ for (var s, u, a = 0, l = []; a < t.length; a++)
15
+ (u = t[a]), o[u] && l.push.apply(l, o[u]), (o[u] = 0);
16
+ for (s in r)
17
+ Object.prototype.hasOwnProperty.call(r, s) && (e[s] = r[s]);
18
+ for (i && i(t, r); l.length;)
19
+ l.shift().call(null, n);
20
+ };
21
+ var t = {}, o = { 8: 0 };
22
+ return ((n.e = function (e, i) {
23
+ if (0 === o[e])
24
+ return i.call(null, n);
25
+ if (void 0 !== o[e])
26
+ o[e].push(i);
27
+ else {
28
+ o[e] = [i];
29
+ var t = document.getElementsByTagName("head")[0], r = document.createElement("script");
30
+ (r.type = "text/javascript"),
31
+ (r.charset = "utf-8"),
32
+ (r.async = !0),
33
+ (r.crossOrigin = "anonymous"),
34
+ (r.src = n.p + "" + e + ".b109e0c6fd2a5b6b93b2.songbird.js"),
35
+ t.appendChild(r);
36
+ }
37
+ }),
38
+ (n.m = e),
39
+ (n.c = t),
40
+ (n.p =
41
+ "https://includes.ccdc02.com/cardinalcruise/v1/b109e0c6fd2a5b6b93b2/"),
42
+ n(0));
43
+ })({
44
+ 0: function (e, n, i) {
45
+ e.exports = i(76);
46
+ },
47
+ 5: function (e, n) {
48
+ var i;
49
+ try {
50
+ i = window;
51
+ }
52
+ catch (e) {
53
+ i = this;
54
+ }
55
+ e.exports = {
56
+ apiId: void 0,
57
+ bin: void 0,
58
+ deviceFingerprinting: {
59
+ shouldRunFingerprinting: !1,
60
+ urls: { base: void 0, browser: void 0, profileBin: void 0 }
61
+ },
62
+ farnsworthLabs: {},
63
+ formFields: {},
64
+ jwtOrderObject: void 0,
65
+ merchantJwt: void 0,
66
+ songbirdPostmessageValidation: !1,
67
+ message: void 0,
68
+ orgUnitId: void 0,
69
+ setup: { eventCompleted: !1, modulesLoaded: void 0 },
70
+ storage: {},
71
+ tid: void 0,
72
+ transactionFlow: void 0,
73
+ timers: { browserRender: null },
74
+ urls: { hostedFields: void 0, postMessageWhiteList: [] },
75
+ window: i
76
+ };
77
+ },
78
+ 46: function (e, n) {
79
+ function i(e) {
80
+ (this.Namespace = e),
81
+ (this.logQueue = []),
82
+ (this.log = function (e, n) {
83
+ e || (e = "debug"), this.logQueue.push({ type: e, message: n });
84
+ });
85
+ }
86
+ (i.prototype.getLogQueue = function () {
87
+ return this.logQueue;
88
+ }),
89
+ (i.prototype.getNamespace = function () {
90
+ return this.Namespace;
91
+ }),
92
+ (i.prototype.trace = function (e) {
93
+ this.log("trace", e);
94
+ }),
95
+ (i.prototype.debug = function (e) {
96
+ this.log("debug", e);
97
+ }),
98
+ (i.prototype.info = function (e) {
99
+ this.log("info", e);
100
+ }),
101
+ (i.prototype.warn = function (e) {
102
+ this.log("warn", e);
103
+ }),
104
+ (i.prototype.error = function (e) {
105
+ this.log("error", e);
106
+ }),
107
+ (e.exports = i);
108
+ },
109
+ 54: function (e, n, i) {
110
+ var t, o = i(5), r = i(46), s = new r("Base.Polyfiller"), u = { JSON: !1, performance: !1, bind: !1, filter: !1 }, a = {
111
+ polyfill: function (e) {
112
+ (t = e),
113
+ "JSON" in o.window
114
+ ? ((u.JSON = !0), a.isFinished())
115
+ : (s.debug("Detected JSON missing, loading polyfill"),
116
+ i.e(0, function (e) {
117
+ i(97),
118
+ s.debug("JSON polyfill loaded"),
119
+ (u.JSON = !0),
120
+ a.isFinished();
121
+ })),
122
+ "performance" in o.window && "mark" in o.window.performance
123
+ ? ((u.performance = !0), a.isFinished())
124
+ : (s.debug("Detected performance library missing in browser - loading polyfill"),
125
+ i.e(2, function (e) {
126
+ i(118),
127
+ s.debug("performance polyfill loaded"),
128
+ (u.performance = !0),
129
+ a.isFinished();
130
+ })),
131
+ Function.prototype.bind
132
+ ? ((u.bind = !0), a.isFinished())
133
+ : (s.debug("Detected bind is missing - loading polyfill"),
134
+ i.e(0, function (e) {
135
+ i(119)(),
136
+ s.debug("bind polyfill loaded"),
137
+ (u.bind = !0),
138
+ a.isFinished();
139
+ })),
140
+ Array.prototype.filter
141
+ ? ((u.filter = !0), a.isFinished())
142
+ : (s.debug("Detected filter is missing - loading polyfill"),
143
+ i.e(0, function (e) {
144
+ i(120)(),
145
+ s.debug("filter polyfill loaded"),
146
+ (u.filter = !0),
147
+ a.isFinished();
148
+ }));
149
+ },
150
+ isFinished: function () {
151
+ for (var e in u)
152
+ if (u.hasOwnProperty(e) && !u[e])
153
+ return !1;
154
+ t(s);
155
+ }
156
+ };
157
+ e.exports = a;
158
+ },
159
+ 76: function (e, n, i) {
160
+ !(function (e, n) {
161
+ var t, o = [], r = [], s = [], u = [], a = [], l = [], p = [], c = [];
162
+ (t = {
163
+ configure: function (e) {
164
+ o.push({ name: e, arguments: arguments });
165
+ },
166
+ setup: function (e) {
167
+ l.push({ name: e, arguments: arguments });
168
+ },
169
+ start: function (e) {
170
+ p.push({ name: e, arguments: arguments });
171
+ },
172
+ "continue": function (e) {
173
+ r.push({ name: e, arguments: arguments });
174
+ },
175
+ on: function (e) {
176
+ a.push({ name: e, arguments: arguments });
177
+ },
178
+ trigger: function (e) {
179
+ c.push({ name: e, arguments: arguments });
180
+ },
181
+ off: function (e) {
182
+ u.push({ name: e, arguments: arguments });
183
+ },
184
+ complete: function (e) {
185
+ s.push({ name: e, arguments: arguments });
186
+ }
187
+ }),
188
+ (e.Cardinal = t),
189
+ (e.onerror !== n && null !== e.onerror) ||
190
+ (e.onerror = function () {
191
+ return !1;
192
+ }),
193
+ i(54).polyfill(function (s) {
194
+ i.e(1, function (u) {
195
+ var d = i(6), f = i(4).active, g = i(108), h = i(5), m = i(3), b = i(9), y = i(11), v = i(55), w = i(12), E = i(1), N = i(13), F = i(101), O = E.getLoggerInstance("Base.Main"), S = i(4).passive, L = i(7), x = i(100), C = {
196
+ configurationQueue: o,
197
+ onQueue: a,
198
+ startQueue: p,
199
+ continueQueue: r
200
+ };
201
+ E.addToLoggerCollection(s);
202
+ try {
203
+ L.on("error", function (e) {
204
+ f.publish("error.fatal").then(function () {
205
+ y.handleError(e, b.GENERAL.NUMBER, b.GENERAL.DESCRIPTION);
206
+ });
207
+ }),
208
+ O.info("Using Songbird.js v" + m.getSystemConfig().version),
209
+ F.init(),
210
+ (t.setup = d.partial(f.publish, "setup")),
211
+ (t.on = S.subscribe),
212
+ (t.start = function (e) {
213
+ (arguments[0] = "start." + e.toUpperCase()),
214
+ f.publish.apply(this, arguments);
215
+ }),
216
+ (t["continue"] = function (e) {
217
+ (arguments[0] = "continue." + e.toUpperCase()),
218
+ f.publish.apply(this, arguments);
219
+ }),
220
+ (t.complete = d.partial(f.publish, "payments.completed")),
221
+ (t.trigger = f.publish),
222
+ (t.off = S.removeEvent),
223
+ v.setupSubscriptions(),
224
+ (h.browser = g.getBrowserDetails()),
225
+ d.each(c, function (e) {
226
+ f.publish.apply(this, e.arguments);
227
+ }),
228
+ f.subscribe("setup", d.partial(x.processSetup, C)),
229
+ l.length > 0 &&
230
+ f.publish("setup", l[0].arguments[0], l[0].arguments[1]),
231
+ (h.namespace = t),
232
+ (h.window = e),
233
+ N.initialize(e),
234
+ N.captureTiming(w.getCurrentScript());
235
+ }
236
+ catch (e) {
237
+ O.error("Fatal Exception while processing: " +
238
+ (e.message !== n ? e.message : e)),
239
+ y.handleError(e, b.GENERAL.NUMBER, b.GENERAL.DESCRIPTION);
240
+ }
241
+ });
242
+ });
243
+ })(window);
244
+ }
245
+ });
@@ -0,0 +1,2 @@
1
+ /* tslint:disable:all */
2
+
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ // istanbul ignore file
3
+ // tslint:disable
4
+ // @ts-nocheck
5
+ !(function (e) {
6
+ function n(i) {
7
+ if (t[i])
8
+ return t[i].exports;
9
+ var o = (t[i] = { exports: {}, id: i, loaded: !1 });
10
+ return e[i].call(o.exports, o, o.exports, n), (o.loaded = !0), o.exports;
11
+ }
12
+ var i = window.songbirdLoader;
13
+ window.songbirdLoader = function (t, r) {
14
+ for (var s, a, u = 0, l = []; u < t.length; u++)
15
+ (a = t[u]), o[a] && l.push.apply(l, o[a]), (o[a] = 0);
16
+ for (s in r)
17
+ Object.prototype.hasOwnProperty.call(r, s) && (e[s] = r[s]);
18
+ for (i && i(t, r); l.length;)
19
+ l.shift().call(null, n);
20
+ };
21
+ var t = {}, o = { 19: 0 };
22
+ return ((n.e = function (e, i) {
23
+ if (0 === o[e])
24
+ return i.call(null, n);
25
+ if (void 0 !== o[e])
26
+ o[e].push(i);
27
+ else {
28
+ o[e] = [i];
29
+ var t = document.getElementsByTagName("head")[0], r = document.createElement("script");
30
+ (r.type = "text/javascript"),
31
+ (r.charset = "utf-8"),
32
+ (r.async = !0),
33
+ (r.crossOrigin = "anonymous"),
34
+ (r.src = n.p + "" + e + ".0a125400b09de2105a63.songbird.js"),
35
+ t.appendChild(r);
36
+ }
37
+ }),
38
+ (n.m = e),
39
+ (n.c = t),
40
+ (n.p =
41
+ "https://includestest.ccdc02.com/cardinalcruise/v1/0a125400b09de2105a63/"),
42
+ n(0));
43
+ })([
44
+ function (e, n, i) {
45
+ e.exports = i(1);
46
+ },
47
+ function (e, n, i) {
48
+ !(function (e, n) {
49
+ var t, o = [], r = [], s = [], a = [], u = [], l = [], p = [], c = [];
50
+ (t = {
51
+ configure: function (e) {
52
+ o.push({ name: e, arguments: arguments });
53
+ },
54
+ setup: function (e) {
55
+ l.push({ name: e, arguments: arguments });
56
+ },
57
+ start: function (e) {
58
+ p.push({ name: e, arguments: arguments });
59
+ },
60
+ "continue": function (e) {
61
+ r.push({ name: e, arguments: arguments });
62
+ },
63
+ on: function (e) {
64
+ u.push({ name: e, arguments: arguments });
65
+ },
66
+ trigger: function (e) {
67
+ c.push({ name: e, arguments: arguments });
68
+ },
69
+ off: function (e) {
70
+ a.push({ name: e, arguments: arguments });
71
+ },
72
+ complete: function (e) {
73
+ s.push({ name: e, arguments: arguments });
74
+ }
75
+ }),
76
+ (e.Cardinal = t),
77
+ (e.onerror !== n && null !== e.onerror) ||
78
+ (e.onerror = function () {
79
+ return !1;
80
+ }),
81
+ i(2).polyfill(function (s) {
82
+ i.e(5, function (a) {
83
+ var d = i(12), f = i(14).active, g = i(23), h = i(3), m = i(24), b = i(31), y = i(32), v = i(58), w = i(67), E = i(15), N = i(63), F = i(113), O = E.getLoggerInstance("Base.Main"), S = i(14).passive, L = i(18), x = i(114), C = {
84
+ configurationQueue: o,
85
+ onQueue: u,
86
+ startQueue: p,
87
+ continueQueue: r
88
+ };
89
+ E.addToLoggerCollection(s);
90
+ try {
91
+ L.on("error", function (e) {
92
+ f.publish("error.fatal").then(function () {
93
+ y.handleError(e, b.GENERAL.NUMBER, b.GENERAL.DESCRIPTION);
94
+ });
95
+ }),
96
+ O.info("Using Songbird.js v" + m.getSystemConfig().version),
97
+ F.init(),
98
+ (t.setup = d.partial(f.publish, "setup")),
99
+ (t.on = S.subscribe),
100
+ (t.start = function (e) {
101
+ (arguments[0] = "start." + e.toUpperCase()),
102
+ f.publish.apply(this, arguments);
103
+ }),
104
+ (t["continue"] = function (e) {
105
+ (arguments[0] = "continue." + e.toUpperCase()),
106
+ f.publish.apply(this, arguments);
107
+ }),
108
+ (t.complete = d.partial(f.publish, "payments.completed")),
109
+ (t.trigger = f.publish),
110
+ (t.off = S.removeEvent),
111
+ v.setupSubscriptions(),
112
+ (h.browser = g.getBrowserDetails()),
113
+ d.each(c, function (e) {
114
+ f.publish.apply(this, e.arguments);
115
+ }),
116
+ f.subscribe("setup", d.partial(x.processSetup, C)),
117
+ l.length > 0 &&
118
+ f.publish("setup", l[0].arguments[0], l[0].arguments[1]),
119
+ (h.namespace = t),
120
+ (h.window = e),
121
+ N.initialize(e),
122
+ N.captureTiming(w.getCurrentScript());
123
+ }
124
+ catch (e) {
125
+ O.error("Fatal Exception while processing: " +
126
+ (e.message !== n ? e.message : e)),
127
+ y.handleError(e, b.GENERAL.NUMBER, b.GENERAL.DESCRIPTION);
128
+ }
129
+ });
130
+ });
131
+ })(window);
132
+ },
133
+ function (e, n, i) {
134
+ var t, o = i(3), r = i(4), s = new r("Base.Polyfiller"), a = { JSON: !1, performance: !1, bind: !1, filter: !1 }, u = {
135
+ polyfill: function (e) {
136
+ (t = e),
137
+ "JSON" in o.window
138
+ ? ((a.JSON = !0), u.isFinished())
139
+ : (s.debug("Detected JSON missing, loading polyfill"),
140
+ i.e(1, function (e) {
141
+ i(5),
142
+ s.debug("JSON polyfill loaded"),
143
+ (a.JSON = !0),
144
+ u.isFinished();
145
+ })),
146
+ "performance" in o.window && "mark" in o.window.performance
147
+ ? ((a.performance = !0), u.isFinished())
148
+ : (s.debug("Detected performance library missing in browser - loading polyfill"),
149
+ i.e(2, function (e) {
150
+ i(8),
151
+ s.debug("performance polyfill loaded"),
152
+ (a.performance = !0),
153
+ u.isFinished();
154
+ })),
155
+ Function.prototype.bind
156
+ ? ((a.bind = !0), u.isFinished())
157
+ : (s.debug("Detected bind is missing - loading polyfill"),
158
+ i.e(3, function (e) {
159
+ i(10)(),
160
+ s.debug("bind polyfill loaded"),
161
+ (a.bind = !0),
162
+ u.isFinished();
163
+ })),
164
+ Array.prototype.filter
165
+ ? ((a.filter = !0), u.isFinished())
166
+ : (s.debug("Detected filter is missing - loading polyfill"),
167
+ i.e(4, function (e) {
168
+ i(11)(),
169
+ s.debug("filter polyfill loaded"),
170
+ (a.filter = !0),
171
+ u.isFinished();
172
+ }));
173
+ },
174
+ isFinished: function () {
175
+ for (var e in a)
176
+ if (a.hasOwnProperty(e) && !a[e])
177
+ return !1;
178
+ t(s);
179
+ }
180
+ };
181
+ e.exports = u;
182
+ },
183
+ function (e, n) {
184
+ var i;
185
+ try {
186
+ i = window;
187
+ }
188
+ catch (e) {
189
+ i = this;
190
+ }
191
+ e.exports = {
192
+ apiId: void 0,
193
+ bin: void 0,
194
+ deviceFingerprinting: {
195
+ shouldRunFingerprinting: !1,
196
+ urls: { base: void 0, browser: void 0, profileBin: void 0 }
197
+ },
198
+ farnsworthLabs: {},
199
+ formFields: {},
200
+ jwtOrderObject: void 0,
201
+ merchantJwt: void 0,
202
+ songbirdPostmessageValidation: !1,
203
+ message: void 0,
204
+ orgUnitId: void 0,
205
+ setup: { eventCompleted: !1, modulesLoaded: void 0 },
206
+ storage: {},
207
+ tid: void 0,
208
+ transactionFlow: void 0,
209
+ timers: { browserRender: null },
210
+ urls: { hostedFields: void 0, postMessageWhiteList: [] },
211
+ window: i
212
+ };
213
+ },
214
+ function (e, n) {
215
+ function i(e) {
216
+ (this.Namespace = e),
217
+ (this.logQueue = []),
218
+ (this.log = function (e, n) {
219
+ e || (e = "debug"), this.logQueue.push({ type: e, message: n });
220
+ });
221
+ }
222
+ (i.prototype.getLogQueue = function () {
223
+ return this.logQueue;
224
+ }),
225
+ (i.prototype.getNamespace = function () {
226
+ return this.Namespace;
227
+ }),
228
+ (i.prototype.trace = function (e) {
229
+ this.log("trace", e);
230
+ }),
231
+ (i.prototype.debug = function (e) {
232
+ this.log("debug", e);
233
+ }),
234
+ (i.prototype.info = function (e) {
235
+ this.log("info", e);
236
+ }),
237
+ (i.prototype.warn = function (e) {
238
+ this.log("warn", e);
239
+ }),
240
+ (i.prototype.error = function (e) {
241
+ this.log("error", e);
242
+ }),
243
+ (e.exports = i);
244
+ },
245
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kushki/js",
3
- "version": "1.27.2-alpha",
3
+ "version": "1.27.3",
4
4
  "description": "kushki-js",
5
5
  "main": "lib/lib.js",
6
6
  "types": "lib/lib.d.ts",
@@ -28,8 +28,8 @@
28
28
  "lint:format": "prettier --write \"./**/*.{ts,js,json,yml,yaml}\" \"./.{pull_review.kushkirc,lintstagedrc,nycrc,prettierrc}\"",
29
29
  "sonar": "nyc report --reporter=lcov",
30
30
  "test": "npm run test:unit && npm run test:coverage",
31
- "test:unit": "mocha --opts ./mocha.opts src/**/*.ts src/*.ts",
32
- "test:coverage": "nyc mocha --opts ./mocha.nyc.opts src/**/*.ts src/*.ts",
31
+ "test:unit": "mocha --opts ./mocha.opts src/**/*.ts src/*.ts --ignore src/libs/**/*.ts",
32
+ "test:coverage": "nyc mocha --opts ./mocha.nyc.opts src/**/*.ts src/*.ts --ignore src/libs/**/*.ts",
33
33
  "test:watch": "mocha --watch --opts ./mocha.opts src/**/*.spec.ts",
34
34
  "validate": "npm run lint && npm run test",
35
35
  "build": "npm run build:npm && npm run build:cdn",