@jetthai/cuora 1.1.439-dev.3 β 1.1.439-dev.5
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 +4 -0
- package/package.json +1 -1
- package/src/api/activity.js +10 -0
- package/src/machine/activity/activity_cash.js +18 -3
- package/src/machine/common.js +1 -15
- package/prepare-for-pr/JT-1776243420.md +0 -85
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
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.439-dev.5](https://github.com/jetthai/cuora-module/compare/v1.1.439-dev.4...v1.1.439-dev.5) (2026-05-29)
|
|
6
|
+
|
|
7
|
+
### [1.1.439-dev.4](https://github.com/jetthai/cuora-module/compare/v1.1.439-dev.3...v1.1.439-dev.4) (2026-05-29)
|
|
8
|
+
|
|
5
9
|
### [1.1.439-dev.3](https://github.com/jetthai/cuora-module/compare/v1.1.439-dev.2...v1.1.439-dev.3) (2026-05-29)
|
|
6
10
|
|
|
7
11
|
### [1.1.439-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.439-dev.1...v1.1.439-dev.2) (2026-05-27)
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -125,4 +125,14 @@ export default {
|
|
|
125
125
|
method: 'get',
|
|
126
126
|
params: { activityNo, appSecret },
|
|
127
127
|
}),
|
|
128
|
+
getProgressSummary: ({ appSecret }) => ({
|
|
129
|
+
url: 'activities/progress-summary',
|
|
130
|
+
method: 'get',
|
|
131
|
+
params: { appSecret },
|
|
132
|
+
}),
|
|
133
|
+
getProgressDetail: ({ appSecret }) => ({
|
|
134
|
+
url: 'activities/progress-details',
|
|
135
|
+
method: 'get',
|
|
136
|
+
params: { appSecret },
|
|
137
|
+
}),
|
|
128
138
|
}
|
|
@@ -11,6 +11,7 @@ export default function (request) {
|
|
|
11
11
|
context: {
|
|
12
12
|
tick: 2000,
|
|
13
13
|
activityList: [],
|
|
14
|
+
progressSummary: {},
|
|
14
15
|
tournamentList: [],
|
|
15
16
|
promotionList: [],
|
|
16
17
|
uidSite: '',
|
|
@@ -24,7 +25,7 @@ export default function (request) {
|
|
|
24
25
|
src: 'fetchList',
|
|
25
26
|
onDone: {
|
|
26
27
|
target: 'checking',
|
|
27
|
-
actions: ['setActivityList', 'setTournamentList', 'setPromotionList'],
|
|
28
|
+
actions: ['setActivityList', 'setTournamentList', 'setPromotionList', 'setProgressSummary'],
|
|
28
29
|
},
|
|
29
30
|
onError: {
|
|
30
31
|
target: 'pending',
|
|
@@ -96,6 +97,12 @@ export default function (request) {
|
|
|
96
97
|
activityList: list,
|
|
97
98
|
}
|
|
98
99
|
}),
|
|
100
|
+
setProgressSummary: assign((context, event) => {
|
|
101
|
+
const { progressSummary } = event.data
|
|
102
|
+
return {
|
|
103
|
+
progressSummary: progressSummary || null,
|
|
104
|
+
}
|
|
105
|
+
}),
|
|
99
106
|
setPromotionList: assign((context, event) => {
|
|
100
107
|
const { promotionList } = event.data
|
|
101
108
|
return {
|
|
@@ -154,12 +161,20 @@ export default function (request) {
|
|
|
154
161
|
services: {
|
|
155
162
|
fetchList: async (context, event) => {
|
|
156
163
|
const hasToken = request.getToken()
|
|
157
|
-
const
|
|
164
|
+
const siteConfig = window?.$nuxt?.$store?.state?.siteConfig
|
|
165
|
+
const isProgressEnable = siteConfig?.frontendActivityProgressEnable
|
|
166
|
+
|
|
167
|
+
const [{ data }, promotionList, progressSummaryRes] = await Promise.all([
|
|
158
168
|
hasToken ? request.send(activity.getActivityList({ appSecret })) : request.send(activity.getAllActivityList({ appSecret })),
|
|
159
169
|
hasToken ? request.send(payment.getPromotionsList()) : [],
|
|
170
|
+
hasToken && isProgressEnable ? request.send(activity.getProgressSummary({ appSecret })).catch(() => null) : null,
|
|
160
171
|
])
|
|
161
172
|
|
|
162
|
-
return {
|
|
173
|
+
return {
|
|
174
|
+
activityList: data,
|
|
175
|
+
promotionList,
|
|
176
|
+
progressSummary: progressSummaryRes?.data || null,
|
|
177
|
+
}
|
|
163
178
|
},
|
|
164
179
|
fetchActivityDetailList: async (context, event) => {
|
|
165
180
|
await new Promise((resolve) => setTimeout(resolve, 1000)) // delay 1 second
|
package/src/machine/common.js
CHANGED
|
@@ -5,7 +5,7 @@ import api from '../api/common.js'
|
|
|
5
5
|
import storage from '../util/storage.js'
|
|
6
6
|
|
|
7
7
|
export default function (request) {
|
|
8
|
-
const { appSecret
|
|
8
|
+
const { appSecret } = request.config
|
|
9
9
|
return createMachine(
|
|
10
10
|
{
|
|
11
11
|
id: 'common',
|
|
@@ -35,8 +35,6 @@ export default function (request) {
|
|
|
35
35
|
promotions: [],
|
|
36
36
|
normalBroadcast: null,
|
|
37
37
|
sentNormalBroadcastList: [],
|
|
38
|
-
channel: null,
|
|
39
|
-
subchannel: null,
|
|
40
38
|
affiliateCode: null,
|
|
41
39
|
defaultAffiliateCode: null,
|
|
42
40
|
friendCode: null,
|
|
@@ -284,19 +282,9 @@ export default function (request) {
|
|
|
284
282
|
return
|
|
285
283
|
} else {
|
|
286
284
|
let urlParams = new URLSearchParams(window.location.search)
|
|
287
|
-
const channel = urlParams.get('channel') || storage.get('channel') || defaultChannel || 'official'
|
|
288
|
-
const subchannel = urlParams.get('subchannel') || storage.get('subchannel') || defaultSubchannel || 'pwa'
|
|
289
285
|
const affiliateCode = urlParams.get('ac') || urlParams.get('referralCode') || storage.get('ac') || storage.get('referralCode')
|
|
290
286
|
const friendCode = urlParams.get('fc') || urlParams.get('affiliate') || storage.get('fc') || storage.get('affiliate')
|
|
291
287
|
|
|
292
|
-
storage.set('channel', channel, {
|
|
293
|
-
path: '/',
|
|
294
|
-
maxAge: 60 * 60 * 24 * 7,
|
|
295
|
-
})
|
|
296
|
-
storage.set('subchannel', subchannel, {
|
|
297
|
-
path: '/',
|
|
298
|
-
maxAge: 60 * 60 * 24 * 7,
|
|
299
|
-
})
|
|
300
288
|
storage.set('ac', affiliateCode, {
|
|
301
289
|
path: '/',
|
|
302
290
|
maxAge: 60 * 60 * 24 * 7,
|
|
@@ -307,8 +295,6 @@ export default function (request) {
|
|
|
307
295
|
})
|
|
308
296
|
|
|
309
297
|
return {
|
|
310
|
-
channel,
|
|
311
|
-
subchannel,
|
|
312
298
|
affiliateCode,
|
|
313
299
|
friendCode,
|
|
314
300
|
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# JT-1776243420: Third-Party Register Carry Phone / Email Payload
|
|
2
|
-
|
|
3
|
-
## Key Changes
|
|
4
|
-
|
|
5
|
-
1. Extended third-party redirect payload assembly to read `tp_phone`, `tp_countryCode`, and `tp_email` from storage.
|
|
6
|
-
2. Preserved existing affiliate code / nickname behavior and appended new fields only when values are valid.
|
|
7
|
-
3. Cleans the temporary third-party storage keys after composing the redirect query.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Key Findings
|
|
12
|
-
|
|
13
|
-
### Strengths
|
|
14
|
-
|
|
15
|
-
1. The change is tightly scoped to the third-party auth redirect builder in `src/machine/auth.js:477-520`.
|
|
16
|
-
2. Existing affiliate code and nickname logic remains unchanged while phone / email are additive only.
|
|
17
|
-
3. Temporary keys are removed after payload composition, reducing leakage into later unrelated auth flows.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
### Behavior Observed
|
|
22
|
-
|
|
23
|
-
1. Static review confirms `phone`, `countryCode`, and `email` are appended only when storage values are not `undefined` / `null`.
|
|
24
|
-
2. Channel and subchannel fallback logic stays intact after the new fields are added.
|
|
25
|
-
3. No unrelated file changes were present in this repo for the review scope.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## π§ Change Type
|
|
30
|
-
|
|
31
|
-
- [ ] π Bug fix
|
|
32
|
-
- [x] β¨ New feature
|
|
33
|
-
- [ ] π Style
|
|
34
|
-
- [ ] β»οΈ Refactor
|
|
35
|
-
- [ ] β‘ Performance
|
|
36
|
-
- [ ] π§ Chore
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## π± Impact Scope
|
|
41
|
-
|
|
42
|
-
- Third-party register / login redirect query assembly in cuora shared auth machine.
|
|
43
|
-
- Downstream PWA clients that store `tp_phone`, `tp_countryCode`, and `tp_email` before `LOGIN_3PARTY`.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Test Completion Status
|
|
48
|
-
|
|
49
|
-
| Item | Validation Tested | Status |
|
|
50
|
-
| -------------------------- | --------------------------------------------------------------------- | ------- |
|
|
51
|
-
| Diff hygiene | `git diff --check` in `cuora-module` | PASS |
|
|
52
|
-
| Shared auth payload review | Reviewed `src/machine/auth.js:477-520` against ticket intent | PASS |
|
|
53
|
-
| Runtime redirect execution | Not run in this repo directly; validated through client repos instead | NOT RUN |
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## π Spec Validation (Aligned with review-playbook)
|
|
58
|
-
|
|
59
|
-
| Spec Item | Evidence (File/Line/Result) | Status |
|
|
60
|
-
| ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ------ |
|
|
61
|
-
| Third-party flow can carry phone when client stored it | `src/machine/auth.js:479-520` reads `tp_phone` / `tp_countryCode` and appends them to `referralObj` | PASS |
|
|
62
|
-
| Third-party flow can carry email when client stored it | `src/machine/auth.js:481-520` reads `tp_email` and appends it to `referralObj` | PASS |
|
|
63
|
-
| Affiliate code and nickname keep original logic | `src/machine/auth.js:477-500` keeps `ac` / `nick_name` handling unchanged | PASS |
|
|
64
|
-
| Temporary third-party data does not leak into later unrelated flows | `src/machine/auth.js:518-520` removes the temporary storage keys after composing the redirect URL | PASS |
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## π Standards Checklist (Summary)
|
|
69
|
-
|
|
70
|
-
| Category | Result | Notes |
|
|
71
|
-
| ---------------------- | ------- | --------------------------------------------------------------------------- |
|
|
72
|
-
| Memory Safety | PASS | Simple storage reads and object assembly only. |
|
|
73
|
-
| Rendering Performance | PASS | No rendering code touched. |
|
|
74
|
-
| Network Requests | PASS | Existing redirect flow only; no extra requests added. |
|
|
75
|
-
| Bundle Optimization | PASS | No new imports or heavy logic added. |
|
|
76
|
-
| Code Quality | PASS | Scope is narrow and branch contains only the required file change. |
|
|
77
|
-
| Vue / Nuxt Standards | NOT RUN | Shared module; not a Vue / Nuxt surface. |
|
|
78
|
-
| SSR Security Standards | PASS | Query parameters are assembled from existing client-side storage path only. |
|
|
79
|
-
| Project Conventions | PASS | Matches existing storage-guard pattern used for affiliate / nickname. |
|
|
80
|
-
|
|
81
|
-
## Conclusion
|
|
82
|
-
|
|
83
|
-
This repoβs shared auth-machine change matches the ticket intent and is internally consistent. Runtime behavior was not executed in `cuora-module` directly, but both client repos now pass the new storage keys into this shared payload path.
|
|
84
|
-
|
|
85
|
-
**Overall Result:** PASS (PARTIAL)
|