@jetthai/cuora 1.1.426 → 1.1.427-dev.1
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/.claude/settings.local.json +3 -1
- package/.prettierignore +2 -1
- package/CHANGELOG.md +140 -2
- package/package.json +1 -1
- package/scripts/auto-version.js +1 -0
- package/src/api/activity.js +11 -0
- package/src/machine/auth.js +22 -0
- package/src/machine/leaderboard.js +8 -11
package/.prettierignore
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
dist/
|
|
1
|
+
dist/
|
|
2
|
+
CHANGELOG.md
|
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,75 @@
|
|
|
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.
|
|
5
|
+
### [1.1.427-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.425...v1.1.427-dev.1) (2026-04-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **scripts:** auto pull --rebase before push in branch-auto-npm-publish ([761f5c8](https://github.com/jetthai/cuora-module/commit/761f5c8ac653d0a1578cbc610b7c9b1798066875))
|
|
11
|
+
* **scripts:** extend clean-tags to delete orphan and master-merged tags ([f24bc33](https://github.com/jetthai/cuora-module/commit/f24bc3337bcf558e67e613818ba5a79983675a26))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **scripts:** add --no-verify to git push in branch-auto-npm-publish to prevent pre-push hook infinite recursion ([4214aee](https://github.com/jetthai/cuora-module/commit/4214aeeed05834bce2537acd6ef816719c388b64))
|
|
17
|
+
* **scripts:** add CHANGELOG.md to prettierignore to prevent format conflict with standard-version ([0cd508f](https://github.com/jetthai/cuora-module/commit/0cd508ff7fe91c4c6a4ed9df0a534ca3a0d6b731))
|
|
18
|
+
* **scripts:** format and stage changes before standard-version to prevent rebase failure ([fbdd7f1](https://github.com/jetthai/cuora-module/commit/fbdd7f1f69a9576bb80c78607abf19dc19557cc6))
|
|
19
|
+
* **scripts:** prevent infinite recursion in clean-tags pre-push hook ([5e9db84](https://github.com/jetthai/cuora-module/commit/5e9db84f1a655318b73839ab9a215f4dbe980772))
|
|
20
|
+
|
|
21
|
+
### [1.1.427-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.427...v1.1.427-dev.0) (2026-04-09)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* **scripts:** add CHANGELOG.md to prettierignore to prevent format conflict with standard-version ([0cd508f](https://github.com/jetthai/cuora-module/commit/0cd508ff7fe91c4c6a4ed9df0a534ca3a0d6b731))
|
|
27
|
+
* **scripts:** format and stage changes before standard-version to prevent rebase failure ([fbdd7f1](https://github.com/jetthai/cuora-module/commit/fbdd7f1f69a9576bb80c78607abf19dc19557cc6))
|
|
28
|
+
|
|
29
|
+
### [1.1.426-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.426-dev.1...v1.1.426-dev.2) (2026-04-01)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* **scripts:** add CHANGELOG.md to prettierignore to prevent format conflict with standard-version ([d254b54](https://github.com/jetthai/cuora-module/commit/d254b54335c06b69f8af54d1bdb3f2995f75436f))
|
|
35
|
+
|
|
36
|
+
### [1.1.426-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.426-dev.0...v1.1.426-dev.1) (2026-04-01)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
* **scripts:** format and stage changes before standard-version to prevent rebase failure ([b5cb701](https://github.com/jetthai/cuora-module/commit/b5cb70155a0eaf516f96b76e6790cf57d80886a2))
|
|
42
|
+
|
|
43
|
+
### [1.1.426-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.425...v1.1.426-dev.0) (2026-04-01)
|
|
44
|
+
|
|
45
|
+
### Features
|
|
46
|
+
|
|
47
|
+
- **scripts:** auto pull --rebase before push in branch-auto-npm-publish ([761f5c8](https://github.com/jetthai/cuora-module/commit/761f5c8ac653d0a1578cbc610b7c9b1798066875))
|
|
48
|
+
- **scripts:** extend clean-tags to delete orphan and master-merged tags ([f24bc33](https://github.com/jetthai/cuora-module/commit/f24bc3337bcf558e67e613818ba5a79983675a26))
|
|
49
|
+
|
|
50
|
+
### Bug Fixes
|
|
51
|
+
|
|
52
|
+
- **scripts:** add --no-verify to git push in branch-auto-npm-publish to prevent pre-push hook infinite recursion ([4214aee](https://github.com/jetthai/cuora-module/commit/4214aeeed05834bce2537acd6ef816719c388b64))
|
|
53
|
+
- **scripts:** prevent infinite recursion in clean-tags pre-push hook ([5e9db84](https://github.com/jetthai/cuora-module/commit/5e9db84f1a655318b73839ab9a215f4dbe980772))
|
|
54
|
+
|
|
55
|
+
### [1.1.425-dev.4](https://github.com/jetthai/cuora-module/compare/v1.1.425-dev.3...v1.1.425-dev.4) (2026-03-31)
|
|
56
|
+
|
|
57
|
+
### [1.1.425-dev.3](https://github.com/jetthai/cuora-module/compare/v1.1.425...v1.1.425-dev.3) (2026-03-31)
|
|
58
|
+
|
|
59
|
+
### Features
|
|
60
|
+
|
|
61
|
+
- **scripts:** auto pull --rebase before push in branch-auto-npm-publish ([761f5c8](https://github.com/jetthai/cuora-module/commit/761f5c8ac653d0a1578cbc610b7c9b1798066875))
|
|
62
|
+
- **scripts:** extend clean-tags to delete orphan and master-merged tags ([f24bc33](https://github.com/jetthai/cuora-module/commit/f24bc3337bcf558e67e613818ba5a79983675a26))
|
|
63
|
+
|
|
64
|
+
### Bug Fixes
|
|
65
|
+
|
|
66
|
+
- **scripts:** add --no-verify to git push in branch-auto-npm-publish to prevent pre-push hook infinite recursion ([4214aee](https://github.com/jetthai/cuora-module/commit/4214aeeed05834bce2537acd6ef816719c388b64))
|
|
67
|
+
- **scripts:** prevent infinite recursion in clean-tags pre-push hook ([5e9db84](https://github.com/jetthai/cuora-module/commit/5e9db84f1a655318b73839ab9a215f4dbe980772))
|
|
68
|
+
|
|
69
|
+
### [1.1.425-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.425-dev.1...v1.1.425-dev.2) (2026-03-31)
|
|
70
|
+
|
|
71
|
+
### [1.1.425-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.425-dev.0...v1.1.425-dev.1) (2026-03-30)
|
|
72
|
+
|
|
73
|
+
### [1.1.425-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.425...v1.1.425-dev.0) (2026-03-30)
|
|
6
74
|
|
|
7
75
|
### Features
|
|
8
76
|
|
|
@@ -18,7 +86,77 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
18
86
|
|
|
19
87
|
### [1.1.424](https://github.com/jetthai/cuora-module/compare/v1.1.423...v1.1.424) (2026-03-17)
|
|
20
88
|
|
|
21
|
-
### [1.1.
|
|
89
|
+
### [1.1.422-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.422-dev-1...v1.1.422-dev-2) (2026-03-17)
|
|
90
|
+
|
|
91
|
+
### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
|
|
92
|
+
|
|
93
|
+
### [1.1.413-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-10...v1.1.413-dev-11) (2026-03-12)
|
|
94
|
+
|
|
95
|
+
### [1.1.413-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-9...v1.1.413-dev-10) (2026-03-11)
|
|
96
|
+
|
|
97
|
+
### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
|
|
98
|
+
|
|
99
|
+
### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
|
|
100
|
+
|
|
101
|
+
### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
|
|
102
|
+
|
|
103
|
+
### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
|
|
104
|
+
|
|
105
|
+
### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
|
|
106
|
+
|
|
107
|
+
### [1.1.422-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.422-dev-1...v1.1.422-dev-2) (2026-03-17)
|
|
108
|
+
|
|
109
|
+
### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
|
|
110
|
+
|
|
111
|
+
### [1.1.413-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-10...v1.1.413-dev-11) (2026-03-12)
|
|
112
|
+
|
|
113
|
+
### [1.1.413-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-9...v1.1.413-dev-10) (2026-03-11)
|
|
114
|
+
|
|
115
|
+
### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
|
|
116
|
+
|
|
117
|
+
### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
|
|
118
|
+
|
|
119
|
+
### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
|
|
120
|
+
|
|
121
|
+
### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
|
|
122
|
+
|
|
123
|
+
### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
|
|
124
|
+
|
|
125
|
+
### [1.1.422-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.422-dev-1...v1.1.422-dev-2) (2026-03-17)
|
|
126
|
+
|
|
127
|
+
### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
|
|
128
|
+
|
|
129
|
+
### [1.1.413-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-10...v1.1.413-dev-11) (2026-03-12)
|
|
130
|
+
|
|
131
|
+
### [1.1.413-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-9...v1.1.413-dev-10) (2026-03-11)
|
|
132
|
+
|
|
133
|
+
### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
|
|
134
|
+
|
|
135
|
+
### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
|
|
136
|
+
|
|
137
|
+
### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
|
|
138
|
+
|
|
139
|
+
### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
|
|
140
|
+
|
|
141
|
+
### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
|
|
142
|
+
|
|
143
|
+
### [1.1.422-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.422-dev-1...v1.1.422-dev-2) (2026-03-17)
|
|
144
|
+
|
|
145
|
+
### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
|
|
146
|
+
|
|
147
|
+
### [1.1.413-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-10...v1.1.413-dev-11) (2026-03-12)
|
|
148
|
+
|
|
149
|
+
### [1.1.413-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-9...v1.1.413-dev-10) (2026-03-11)
|
|
150
|
+
|
|
151
|
+
### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
|
|
152
|
+
|
|
153
|
+
### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
|
|
154
|
+
|
|
155
|
+
### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
|
|
156
|
+
|
|
157
|
+
### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
|
|
158
|
+
|
|
159
|
+
### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
|
|
22
160
|
|
|
23
161
|
### [1.1.422](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.422) (2026-03-16)
|
|
24
162
|
|
package/package.json
CHANGED
package/scripts/auto-version.js
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -87,6 +87,12 @@ export default {
|
|
|
87
87
|
getVipTable: ({ appSecret }) => ({ url: 'activities/viptable', method: 'get', params: { appSecret } }),
|
|
88
88
|
getLevelBonusInfo: () => ({ url: 'activities/level-bonus/info', method: 'get' }),
|
|
89
89
|
getRankingList: () => ({ url: 'activities/ranking', method: 'get' }),
|
|
90
|
+
getPublicRankingList: ({ appSecret }) => ({
|
|
91
|
+
url: 'activities/ranking/public/promotion-ranking',
|
|
92
|
+
method: 'get',
|
|
93
|
+
isPublic: true,
|
|
94
|
+
params: { appSecret },
|
|
95
|
+
}),
|
|
90
96
|
exchangeDiamond: ({ activityNo, exchangeAward = [] }) => ({
|
|
91
97
|
url: 'activities/exchange/diamond',
|
|
92
98
|
method: 'post',
|
|
@@ -114,4 +120,9 @@ export default {
|
|
|
114
120
|
method: 'post',
|
|
115
121
|
params: { startDate, endDate, appSecret },
|
|
116
122
|
}),
|
|
123
|
+
getMissionHistory: ({ activityNo, appSecret }) => ({
|
|
124
|
+
url: 'activities/mission-history',
|
|
125
|
+
method: 'get',
|
|
126
|
+
params: { activityNo, appSecret },
|
|
127
|
+
}),
|
|
117
128
|
}
|
package/src/machine/auth.js
CHANGED
|
@@ -110,6 +110,28 @@ export default function (request) {
|
|
|
110
110
|
},
|
|
111
111
|
},
|
|
112
112
|
otpChecking: {
|
|
113
|
+
initial: 'pending',
|
|
114
|
+
states: {
|
|
115
|
+
pending: {
|
|
116
|
+
after: {
|
|
117
|
+
TIMEOUT: {
|
|
118
|
+
target: 'fetching',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
fetching: {
|
|
123
|
+
invoke: {
|
|
124
|
+
src: 'fetchUserInfo',
|
|
125
|
+
onDone: {
|
|
126
|
+
target: 'pending',
|
|
127
|
+
actions: ['setUserInfo', 'extendToken'],
|
|
128
|
+
},
|
|
129
|
+
onError: {
|
|
130
|
+
target: 'pending',
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
113
135
|
on: {
|
|
114
136
|
OTP_VERIFIED: {
|
|
115
137
|
target: 'loginSuccess',
|
|
@@ -37,12 +37,13 @@ export default function (request) {
|
|
|
37
37
|
checking: {
|
|
38
38
|
always: [
|
|
39
39
|
{ target: 'idle', actions: 'setActivityDetail', cond: 'isExist' },
|
|
40
|
-
{ target: 'loading', cond: '
|
|
40
|
+
{ target: 'loading', cond: 'hasActivityNoAndToken' },
|
|
41
|
+
{ target: 'idle' },
|
|
41
42
|
],
|
|
42
43
|
},
|
|
43
44
|
loading: {
|
|
44
45
|
invoke: {
|
|
45
|
-
src: '
|
|
46
|
+
src: 'fetchActivityDetail',
|
|
46
47
|
onDone: {
|
|
47
48
|
target: 'idle',
|
|
48
49
|
actions: ['setActivityMap', 'setActivityDetail'],
|
|
@@ -100,8 +101,9 @@ export default function (request) {
|
|
|
100
101
|
const { activityMap, activityNo } = context
|
|
101
102
|
return activityMap[activityNo]
|
|
102
103
|
},
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
hasActivityNoAndToken: (context, event) => {
|
|
105
|
+
const hasToken = request.getToken()
|
|
106
|
+
return !!context.activityNo && hasToken
|
|
105
107
|
},
|
|
106
108
|
},
|
|
107
109
|
services: {
|
|
@@ -116,15 +118,10 @@ export default function (request) {
|
|
|
116
118
|
const { data } = await request.send(hasToken ? api.getActivityList({ appSecret }) : api.getAllActivityList({ appSecret }))
|
|
117
119
|
return data
|
|
118
120
|
},
|
|
119
|
-
|
|
120
|
-
const hasToken = request.getToken()
|
|
121
|
+
fetchActivityDetail: async (context, event) => {
|
|
121
122
|
const { activityNo } = context
|
|
122
123
|
let result = {}
|
|
123
|
-
|
|
124
|
-
result = await request.send(api.getActivityDetail({ activityNo, appSecret }))
|
|
125
|
-
} else {
|
|
126
|
-
result = await request.send(api.getTournamentDetail({ activityNo, appSecret }))
|
|
127
|
-
}
|
|
124
|
+
result = await request.send(api.getActivityDetail({ activityNo, appSecret }))
|
|
128
125
|
return result.data
|
|
129
126
|
},
|
|
130
127
|
},
|