@jetthai/cuora 1.1.83 → 1.1.84
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 +13 -12
- package/package.json +1 -1
- package/src/machine/auth.js +4 -4
- package/src/machine/common.js +3 -3
- package/src/machine/game_v2_1.js +2 -1
- 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.84](https://github.com/jetthai/cuora-module/compare/v1.1.83...v1.1.84) (2023-04-26)
|
|
6
|
+
|
|
5
7
|
### [1.1.83](https://github.com/jetthai/cuora-module/compare/v1.1.82...v1.1.83) (2023-04-24)
|
|
6
8
|
|
|
7
9
|
### [1.1.82](https://github.com/jetthai/cuora-module/compare/v1.1.81...v1.1.82) (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 ac = 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
|
+
ac,
|
|
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(ac)) {
|
|
15779
|
+
referralObj.ac = ac;
|
|
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 ac = 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('
|
|
17024
|
+
storage.set('ac', ac, {
|
|
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
|
+
ac,
|
|
17033
17033
|
}
|
|
17034
17034
|
}
|
|
17035
17035
|
}),
|
|
@@ -17829,6 +17829,7 @@ function game_v2_1 (request) {
|
|
|
17829
17829
|
id: 'game',
|
|
17830
17830
|
type: 'parallel',
|
|
17831
17831
|
context: {
|
|
17832
|
+
base: '',
|
|
17832
17833
|
loadable: false,
|
|
17833
17834
|
isLastPage: false,
|
|
17834
17835
|
room: null,
|
|
@@ -18198,7 +18199,7 @@ function game_v2_1 (request) {
|
|
|
18198
18199
|
is_demo: false,
|
|
18199
18200
|
is_mobile: isMobile,
|
|
18200
18201
|
lang,
|
|
18201
|
-
return_url: returnProviders.includes(providerId) ? `${window.location.origin}
|
|
18202
|
+
return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
|
|
18202
18203
|
};
|
|
18203
18204
|
const { redirect_url } = await request.send(game$1.playGame(params));
|
|
18204
18205
|
return { gameURL: redirect_url }
|
|
@@ -20406,7 +20407,7 @@ function user_sign_up (request) {
|
|
|
20406
20407
|
const dt = await getDeviceToken({ fpToken, sentry, hosts: request.hosts });
|
|
20407
20408
|
sentry.setTag('dt', dt);
|
|
20408
20409
|
|
|
20409
|
-
const
|
|
20410
|
+
const ac = storage.get('ac');
|
|
20410
20411
|
const messages = {
|
|
20411
20412
|
url: window.location.href,
|
|
20412
20413
|
channelOrders: [
|
|
@@ -20414,13 +20415,13 @@ function user_sign_up (request) {
|
|
|
20414
20415
|
{ channel: defaultChannel, subchannel: defaultSubchannel },
|
|
20415
20416
|
{ channel: channel, subchannel: subchannel },
|
|
20416
20417
|
],
|
|
20417
|
-
|
|
20418
|
+
ac,
|
|
20418
20419
|
};
|
|
20419
20420
|
sentry.captureMessage(JSON.stringify(messages));
|
|
20420
20421
|
|
|
20421
20422
|
const referralObj = {};
|
|
20422
|
-
if (![undefined, 'undefined', null, 'null'].includes(
|
|
20423
|
-
referralObj.ac =
|
|
20423
|
+
if (![undefined, 'undefined', null, 'null'].includes(ac)) {
|
|
20424
|
+
referralObj.ac = ac;
|
|
20424
20425
|
} else {
|
|
20425
20426
|
(referralObj.channel = storage.get('channel') || defaultChannel || channel),
|
|
20426
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 ac = 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
|
+
ac,
|
|
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(ac)) {
|
|
347
|
+
referralObj.ac = ac
|
|
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 ac = 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('
|
|
170
|
+
storage.set('ac', ac, {
|
|
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
|
+
ac,
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
}),
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -10,6 +10,7 @@ export default function (request) {
|
|
|
10
10
|
id: 'game',
|
|
11
11
|
type: 'parallel',
|
|
12
12
|
context: {
|
|
13
|
+
base: '',
|
|
13
14
|
loadable: false,
|
|
14
15
|
isLastPage: false,
|
|
15
16
|
room: null,
|
|
@@ -379,7 +380,7 @@ export default function (request) {
|
|
|
379
380
|
is_demo: false,
|
|
380
381
|
is_mobile: isMobile,
|
|
381
382
|
lang,
|
|
382
|
-
return_url: returnProviders.includes(providerId) ? `${window.location.origin}
|
|
383
|
+
return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
|
|
383
384
|
}
|
|
384
385
|
const { redirect_url } = await request.send(api.playGame(params))
|
|
385
386
|
return { gameURL: redirect_url }
|
|
@@ -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 ac = 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
|
+
ac,
|
|
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(ac)) {
|
|
129
|
+
referralObj.ac = ac
|
|
130
130
|
} else {
|
|
131
131
|
;(referralObj.channel = storage.get('channel') || defaultChannel || channel),
|
|
132
132
|
(referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel)
|