@jetthai/cuora 1.1.84 → 1.1.85
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/CHANGELOG.md +2 -0
- package/dist/bundle.mjs +11 -11
- package/package.json +1 -1
- package/src/machine/auth.js +4 -4
- package/src/machine/common.js +3 -3
- package/src/machine/user_sign_up.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.85](https://github.com/jetthai/cuora-module/compare/v1.1.84...v1.1.85) (2023-04-26)
|
|
6
|
+
|
|
5
7
|
### [1.1.84](https://github.com/jetthai/cuora-module/compare/v1.1.83...v1.1.84) (2023-04-26)
|
|
6
8
|
|
|
7
9
|
### [1.1.83](https://github.com/jetthai/cuora-module/compare/v1.1.82...v1.1.83) (2023-04-24)
|
package/dist/bundle.mjs
CHANGED
|
@@ -15762,7 +15762,7 @@ function auth (request) {
|
|
|
15762
15762
|
});
|
|
15763
15763
|
sentry.setTag('dt', dt);
|
|
15764
15764
|
|
|
15765
|
-
const
|
|
15765
|
+
const affiliateCode = storage.get('ac');
|
|
15766
15766
|
const messages = {
|
|
15767
15767
|
url: window.location.href,
|
|
15768
15768
|
channelOrders: [
|
|
@@ -15770,13 +15770,13 @@ function auth (request) {
|
|
|
15770
15770
|
{ channel: defaultChannel, subchannel: defaultSubchannel },
|
|
15771
15771
|
{ channel: channel, subchannel: subchannel },
|
|
15772
15772
|
],
|
|
15773
|
-
|
|
15773
|
+
affiliateCode,
|
|
15774
15774
|
};
|
|
15775
15775
|
sentry.captureMessage(JSON.stringify(messages));
|
|
15776
15776
|
|
|
15777
15777
|
const referralObj = {};
|
|
15778
|
-
if (![undefined, 'undefined', null, 'null'].includes(
|
|
15779
|
-
referralObj.ac =
|
|
15778
|
+
if (![undefined, 'undefined', null, 'null'].includes(affiliateCode)) {
|
|
15779
|
+
referralObj.ac = affiliateCode;
|
|
15780
15780
|
} else {
|
|
15781
15781
|
(referralObj.channel = storage.get('channel') || defaultChannel || channel),
|
|
15782
15782
|
(referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel);
|
|
@@ -17011,7 +17011,7 @@ function common (request) {
|
|
|
17011
17011
|
let urlParams = new URLSearchParams(window.location.search);
|
|
17012
17012
|
const channel = urlParams.get('channel') || storage.get('channel') || defaultChannel || 'official';
|
|
17013
17013
|
const subchannel = urlParams.get('subchannel') || storage.get('subchannel') || defaultSubchannel || 'pwa';
|
|
17014
|
-
const
|
|
17014
|
+
const affiliateCode = urlParams.get('ac') || urlParams.get('referralCode') || storage.get('ac') || storage.get('referralCode');
|
|
17015
17015
|
|
|
17016
17016
|
storage.set('channel', channel, {
|
|
17017
17017
|
path: '/',
|
|
@@ -17021,7 +17021,7 @@ function common (request) {
|
|
|
17021
17021
|
path: '/',
|
|
17022
17022
|
maxAge: 60 * 60 * 24 * 7,
|
|
17023
17023
|
});
|
|
17024
|
-
storage.set('ac',
|
|
17024
|
+
storage.set('ac', affiliateCode, {
|
|
17025
17025
|
path: '/',
|
|
17026
17026
|
maxAge: 60 * 60 * 24 * 7,
|
|
17027
17027
|
});
|
|
@@ -17029,7 +17029,7 @@ function common (request) {
|
|
|
17029
17029
|
return {
|
|
17030
17030
|
channel,
|
|
17031
17031
|
subchannel,
|
|
17032
|
-
|
|
17032
|
+
affiliateCode,
|
|
17033
17033
|
}
|
|
17034
17034
|
}
|
|
17035
17035
|
}),
|
|
@@ -20407,7 +20407,7 @@ function user_sign_up (request) {
|
|
|
20407
20407
|
const dt = await getDeviceToken({ fpToken, sentry, hosts: request.hosts });
|
|
20408
20408
|
sentry.setTag('dt', dt);
|
|
20409
20409
|
|
|
20410
|
-
const
|
|
20410
|
+
const affiliateCode = storage.get('ac');
|
|
20411
20411
|
const messages = {
|
|
20412
20412
|
url: window.location.href,
|
|
20413
20413
|
channelOrders: [
|
|
@@ -20415,13 +20415,13 @@ function user_sign_up (request) {
|
|
|
20415
20415
|
{ channel: defaultChannel, subchannel: defaultSubchannel },
|
|
20416
20416
|
{ channel: channel, subchannel: subchannel },
|
|
20417
20417
|
],
|
|
20418
|
-
|
|
20418
|
+
affiliateCode,
|
|
20419
20419
|
};
|
|
20420
20420
|
sentry.captureMessage(JSON.stringify(messages));
|
|
20421
20421
|
|
|
20422
20422
|
const referralObj = {};
|
|
20423
|
-
if (![undefined, 'undefined', null, 'null'].includes(
|
|
20424
|
-
referralObj.ac =
|
|
20423
|
+
if (![undefined, 'undefined', null, 'null'].includes(affiliateCode)) {
|
|
20424
|
+
referralObj.ac = affiliateCode;
|
|
20425
20425
|
} else {
|
|
20426
20426
|
(referralObj.channel = storage.get('channel') || defaultChannel || channel),
|
|
20427
20427
|
(referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel);
|
package/package.json
CHANGED
package/src/machine/auth.js
CHANGED
|
@@ -330,7 +330,7 @@ export default function (request) {
|
|
|
330
330
|
})
|
|
331
331
|
sentry.setTag('dt', dt)
|
|
332
332
|
|
|
333
|
-
const
|
|
333
|
+
const affiliateCode = storage.get('ac')
|
|
334
334
|
const messages = {
|
|
335
335
|
url: window.location.href,
|
|
336
336
|
channelOrders: [
|
|
@@ -338,13 +338,13 @@ export default function (request) {
|
|
|
338
338
|
{ channel: defaultChannel, subchannel: defaultSubchannel },
|
|
339
339
|
{ channel: channel, subchannel: subchannel },
|
|
340
340
|
],
|
|
341
|
-
|
|
341
|
+
affiliateCode,
|
|
342
342
|
}
|
|
343
343
|
sentry.captureMessage(JSON.stringify(messages))
|
|
344
344
|
|
|
345
345
|
const referralObj = {}
|
|
346
|
-
if (![undefined, 'undefined', null, 'null'].includes(
|
|
347
|
-
referralObj.ac =
|
|
346
|
+
if (![undefined, 'undefined', null, 'null'].includes(affiliateCode)) {
|
|
347
|
+
referralObj.ac = affiliateCode
|
|
348
348
|
} else {
|
|
349
349
|
;(referralObj.channel = storage.get('channel') || defaultChannel || channel),
|
|
350
350
|
(referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel)
|
package/src/machine/common.js
CHANGED
|
@@ -157,7 +157,7 @@ export default function (request) {
|
|
|
157
157
|
let urlParams = new URLSearchParams(window.location.search)
|
|
158
158
|
const channel = urlParams.get('channel') || storage.get('channel') || defaultChannel || 'official'
|
|
159
159
|
const subchannel = urlParams.get('subchannel') || storage.get('subchannel') || defaultSubchannel || 'pwa'
|
|
160
|
-
const
|
|
160
|
+
const affiliateCode = urlParams.get('ac') || urlParams.get('referralCode') || storage.get('ac') || storage.get('referralCode')
|
|
161
161
|
|
|
162
162
|
storage.set('channel', channel, {
|
|
163
163
|
path: '/',
|
|
@@ -167,7 +167,7 @@ export default function (request) {
|
|
|
167
167
|
path: '/',
|
|
168
168
|
maxAge: 60 * 60 * 24 * 7,
|
|
169
169
|
})
|
|
170
|
-
storage.set('ac',
|
|
170
|
+
storage.set('ac', affiliateCode, {
|
|
171
171
|
path: '/',
|
|
172
172
|
maxAge: 60 * 60 * 24 * 7,
|
|
173
173
|
})
|
|
@@ -175,7 +175,7 @@ export default function (request) {
|
|
|
175
175
|
return {
|
|
176
176
|
channel,
|
|
177
177
|
subchannel,
|
|
178
|
-
|
|
178
|
+
affiliateCode,
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
}),
|
|
@@ -112,7 +112,7 @@ export default function (request) {
|
|
|
112
112
|
const dt = await getDeviceToken({ fpToken, sentry, hosts: request.hosts })
|
|
113
113
|
sentry.setTag('dt', dt)
|
|
114
114
|
|
|
115
|
-
const
|
|
115
|
+
const affiliateCode = storage.get('ac')
|
|
116
116
|
const messages = {
|
|
117
117
|
url: window.location.href,
|
|
118
118
|
channelOrders: [
|
|
@@ -120,13 +120,13 @@ export default function (request) {
|
|
|
120
120
|
{ channel: defaultChannel, subchannel: defaultSubchannel },
|
|
121
121
|
{ channel: channel, subchannel: subchannel },
|
|
122
122
|
],
|
|
123
|
-
|
|
123
|
+
affiliateCode,
|
|
124
124
|
}
|
|
125
125
|
sentry.captureMessage(JSON.stringify(messages))
|
|
126
126
|
|
|
127
127
|
const referralObj = {}
|
|
128
|
-
if (![undefined, 'undefined', null, 'null'].includes(
|
|
129
|
-
referralObj.ac =
|
|
128
|
+
if (![undefined, 'undefined', null, 'null'].includes(affiliateCode)) {
|
|
129
|
+
referralObj.ac = affiliateCode
|
|
130
130
|
} else {
|
|
131
131
|
;(referralObj.channel = storage.get('channel') || defaultChannel || channel),
|
|
132
132
|
(referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel)
|