@jetthai/cuora 1.1.440 → 1.1.441-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/commands/auto-git-flow.md +5 -12
- package/.claude/commands/commit-push.md +15 -4
- package/.claude/commands/sync-ai-prompts.md +88 -1
- package/.claude/settings.local.json +3 -1
- package/.github/copilot-instructions.md +551 -399
- package/.husky/post-checkout +3 -3
- package/.husky/pre-push +1 -1
- package/.prettierignore +2 -1
- package/AGENTS.md +551 -399
- package/AI_PROMPT_SOURCE.md +662 -130
- package/CHANGELOG.md +234 -21
- package/CLAUDE.md +551 -399
- package/GEMINI.md +551 -399
- package/README.md +40 -137
- package/package.json +1 -1
- package/scripts/auto-version.js +1 -0
- package/src/api/activity.js +10 -0
- package/src/api/auth.js +2 -2
- package/src/api/common.js +4 -2
- package/src/machine/activity/activity_cash.js +18 -3
- package/src/machine/auth.js +2 -10
- package/src/machine/common.js +1 -15
- package/src/machine/ranking.js +43 -25
- package/src/machine/user_sign_up.js +7 -67
|
@@ -3,15 +3,13 @@ import auth from '../api/auth.js'
|
|
|
3
3
|
import storage from '../util/storage.js'
|
|
4
4
|
|
|
5
5
|
export default function (request) {
|
|
6
|
-
const { sentry
|
|
6
|
+
const { sentry } = request.config
|
|
7
7
|
return createMachine(
|
|
8
8
|
{
|
|
9
9
|
id: 'user_sign_up',
|
|
10
10
|
initial: 'idle',
|
|
11
11
|
context: {
|
|
12
12
|
provider: null,
|
|
13
|
-
channel: null,
|
|
14
|
-
subchannel: null,
|
|
15
13
|
signUpData: {},
|
|
16
14
|
fc: null,
|
|
17
15
|
reCaptchaToken: null,
|
|
@@ -74,22 +72,8 @@ export default function (request) {
|
|
|
74
72
|
return { fc }
|
|
75
73
|
}),
|
|
76
74
|
setSignUpId: assign((context, event) => {
|
|
77
|
-
const {
|
|
78
|
-
|
|
79
|
-
username,
|
|
80
|
-
nick_name,
|
|
81
|
-
password,
|
|
82
|
-
countryCode,
|
|
83
|
-
phone,
|
|
84
|
-
channel,
|
|
85
|
-
subchannel,
|
|
86
|
-
bankCode,
|
|
87
|
-
bankAccount,
|
|
88
|
-
holderName,
|
|
89
|
-
branch,
|
|
90
|
-
branchCode,
|
|
91
|
-
affiliateCode,
|
|
92
|
-
} = event.data
|
|
75
|
+
const { email, username, nick_name, password, countryCode, phone, bankCode, bankAccount, holderName, branch, branchCode, affiliateCode } =
|
|
76
|
+
event.data
|
|
93
77
|
return {
|
|
94
78
|
signUpData: {
|
|
95
79
|
provider: 'local',
|
|
@@ -106,26 +90,10 @@ export default function (request) {
|
|
|
106
90
|
branchCode,
|
|
107
91
|
affiliateCode,
|
|
108
92
|
},
|
|
109
|
-
channel,
|
|
110
|
-
subchannel,
|
|
111
93
|
}
|
|
112
94
|
}),
|
|
113
95
|
setSignUpPhone: assign((context, event) => {
|
|
114
|
-
const {
|
|
115
|
-
email,
|
|
116
|
-
countryCode,
|
|
117
|
-
phone,
|
|
118
|
-
nick_name,
|
|
119
|
-
password,
|
|
120
|
-
channel,
|
|
121
|
-
subchannel,
|
|
122
|
-
bankCode,
|
|
123
|
-
bankAccount,
|
|
124
|
-
holderName,
|
|
125
|
-
branch,
|
|
126
|
-
branchCode,
|
|
127
|
-
affiliateCode,
|
|
128
|
-
} = event.data
|
|
96
|
+
const { email, countryCode, phone, nick_name, password, bankCode, bankAccount, holderName, branch, branchCode, affiliateCode } = event.data
|
|
129
97
|
return {
|
|
130
98
|
signUpData: {
|
|
131
99
|
provider: 'phone',
|
|
@@ -141,26 +109,10 @@ export default function (request) {
|
|
|
141
109
|
branchCode,
|
|
142
110
|
affiliateCode,
|
|
143
111
|
},
|
|
144
|
-
channel,
|
|
145
|
-
subchannel,
|
|
146
112
|
}
|
|
147
113
|
}),
|
|
148
114
|
setSignUpEmail: assign((context, event) => {
|
|
149
|
-
const {
|
|
150
|
-
email,
|
|
151
|
-
nick_name,
|
|
152
|
-
password,
|
|
153
|
-
channel,
|
|
154
|
-
subchannel,
|
|
155
|
-
bankCode,
|
|
156
|
-
bankAccount,
|
|
157
|
-
holderName,
|
|
158
|
-
branch,
|
|
159
|
-
branchCode,
|
|
160
|
-
affiliateCode,
|
|
161
|
-
countryCode,
|
|
162
|
-
phone,
|
|
163
|
-
} = event.data
|
|
115
|
+
const { email, nick_name, password, bankCode, bankAccount, holderName, branch, branchCode, affiliateCode, countryCode, phone } = event.data
|
|
164
116
|
return {
|
|
165
117
|
signUpData: {
|
|
166
118
|
provider: 'email',
|
|
@@ -176,12 +128,10 @@ export default function (request) {
|
|
|
176
128
|
countryCode,
|
|
177
129
|
phone,
|
|
178
130
|
},
|
|
179
|
-
channel,
|
|
180
|
-
subchannel,
|
|
181
131
|
}
|
|
182
132
|
}),
|
|
183
133
|
setRegistrationData: assign((context, event) => {
|
|
184
|
-
const { account, currency, site, strategy, uid
|
|
134
|
+
const { account, currency, site, strategy, uid } = event.data
|
|
185
135
|
return {
|
|
186
136
|
registrationData: {
|
|
187
137
|
account,
|
|
@@ -189,8 +139,6 @@ export default function (request) {
|
|
|
189
139
|
site,
|
|
190
140
|
strategy,
|
|
191
141
|
uid,
|
|
192
|
-
channel,
|
|
193
|
-
sub_channel,
|
|
194
142
|
},
|
|
195
143
|
}
|
|
196
144
|
}),
|
|
@@ -202,17 +150,12 @@ export default function (request) {
|
|
|
202
150
|
},
|
|
203
151
|
services: {
|
|
204
152
|
authenticate: async (context, event) => {
|
|
205
|
-
const {
|
|
153
|
+
const { signUpData, deviceTokenEnable } = context
|
|
206
154
|
const dt = deviceTokenEnable ? await request.config.getDt?.() : undefined
|
|
207
155
|
|
|
208
156
|
const affiliateCode = storage.get('ac') || signUpData?.affiliateCode
|
|
209
157
|
const messages = {
|
|
210
158
|
url: window.location.href,
|
|
211
|
-
channelOrders: [
|
|
212
|
-
{ channel: storage.get('channel'), subchannel: storage.get('subchannel') },
|
|
213
|
-
{ channel: defaultChannel, subchannel: defaultSubchannel },
|
|
214
|
-
{ channel: channel, subchannel: subchannel },
|
|
215
|
-
],
|
|
216
159
|
affiliateCode,
|
|
217
160
|
}
|
|
218
161
|
|
|
@@ -225,9 +168,6 @@ export default function (request) {
|
|
|
225
168
|
referralObj.ac = affiliateCode
|
|
226
169
|
}
|
|
227
170
|
|
|
228
|
-
referralObj.channel = storage.get('channel') || defaultChannel || channel
|
|
229
|
-
referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel
|
|
230
|
-
|
|
231
171
|
return await request.send(
|
|
232
172
|
auth.register({
|
|
233
173
|
...signUpData,
|