@jetthai/cuora 1.1.441 → 1.1.442

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.
Files changed (149) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/package.json +1 -1
  3. package/src/api/auth.js +2 -2
  4. package/src/machine/auth.js +2 -10
  5. package/src/machine/common.js +1 -15
  6. package/src/machine/user_sign_up.js +7 -67
  7. package/.claude/worktrees/geemee-sendpixel/.claude/commands/auto-git-flow.md +0 -52
  8. package/.claude/worktrees/geemee-sendpixel/.claude/commands/commit-push.md +0 -174
  9. package/.claude/worktrees/geemee-sendpixel/.claude/commands/create-branch.md +0 -142
  10. package/.claude/worktrees/geemee-sendpixel/.claude/commands/sync-ai-prompts.md +0 -93
  11. package/.claude/worktrees/geemee-sendpixel/.claude/settings.local.json +0 -23
  12. package/.claude/worktrees/geemee-sendpixel/.github/copilot-instructions.md +0 -696
  13. package/.claude/worktrees/geemee-sendpixel/.husky/post-checkout +0 -32
  14. package/.claude/worktrees/geemee-sendpixel/.husky/pre-commit +0 -2
  15. package/.claude/worktrees/geemee-sendpixel/.husky/pre-push +0 -36
  16. package/.claude/worktrees/geemee-sendpixel/.prettierignore +0 -1
  17. package/.claude/worktrees/geemee-sendpixel/.prettierrc +0 -7
  18. package/.claude/worktrees/geemee-sendpixel/AGENTS.md +0 -696
  19. package/.claude/worktrees/geemee-sendpixel/AI_PROMPT_SOURCE.md +0 -758
  20. package/.claude/worktrees/geemee-sendpixel/CHANGELOG.md +0 -1779
  21. package/.claude/worktrees/geemee-sendpixel/CLAUDE.md +0 -696
  22. package/.claude/worktrees/geemee-sendpixel/GEMINI.md +0 -696
  23. package/.claude/worktrees/geemee-sendpixel/README.md +0 -308
  24. package/.claude/worktrees/geemee-sendpixel/docs/kibana/crypto-way-deposit-amount-bug-analysis.md +0 -1003
  25. package/.claude/worktrees/geemee-sendpixel/docs/kibana/play-providerId-error.md +0 -202
  26. package/.claude/worktrees/geemee-sendpixel/docs/kibana/play-selectedWalletType.md +0 -1
  27. package/.claude/worktrees/geemee-sendpixel/docs/kibana/play-selectedWalletType_2.md +0 -1
  28. package/.claude/worktrees/geemee-sendpixel/docs/kibana/play-selectedWalletType_analysis.md +0 -565
  29. package/.claude/worktrees/geemee-sendpixel/package-lock.json +0 -2455
  30. package/.claude/worktrees/geemee-sendpixel/package.json +0 -34
  31. package/.claude/worktrees/geemee-sendpixel/scripts/auto-version.js +0 -68
  32. package/.claude/worktrees/geemee-sendpixel/scripts/auto-version.sh +0 -33
  33. package/.claude/worktrees/geemee-sendpixel/scripts/branch-auto-npm-publish.js +0 -29
  34. package/.claude/worktrees/geemee-sendpixel/scripts/check-version.sh +0 -36
  35. package/.claude/worktrees/geemee-sendpixel/scripts/clean-tags.sh +0 -59
  36. package/.claude/worktrees/geemee-sendpixel/src/api/account.js +0 -8
  37. package/.claude/worktrees/geemee-sendpixel/src/api/activity.js +0 -128
  38. package/.claude/worktrees/geemee-sendpixel/src/api/auth.js +0 -63
  39. package/.claude/worktrees/geemee-sendpixel/src/api/common.js +0 -17
  40. package/.claude/worktrees/geemee-sendpixel/src/api/form.js +0 -3
  41. package/.claude/worktrees/geemee-sendpixel/src/api/game.js +0 -114
  42. package/.claude/worktrees/geemee-sendpixel/src/api/index.js +0 -13
  43. package/.claude/worktrees/geemee-sendpixel/src/api/mailbox.js +0 -24
  44. package/.claude/worktrees/geemee-sendpixel/src/api/otp.js +0 -5
  45. package/.claude/worktrees/geemee-sendpixel/src/api/payment.js +0 -262
  46. package/.claude/worktrees/geemee-sendpixel/src/api/ranking.js +0 -27
  47. package/.claude/worktrees/geemee-sendpixel/src/api/user.js +0 -69
  48. package/.claude/worktrees/geemee-sendpixel/src/index.js +0 -7
  49. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/activity.js +0 -209
  50. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/activity_cash.js +0 -181
  51. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/cash_rain_activity.js +0 -153
  52. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/continue_deposit_activity.js +0 -146
  53. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/deposit_activity.js +0 -95
  54. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/diamond_shop_activity_cash.js +0 -179
  55. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/diamond_shop_activity_fc.js +0 -196
  56. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/diamond_shop_activity_vn.js +0 -178
  57. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/fafafa_activity.js +0 -208
  58. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/friend_invite_friends_activity.js +0 -287
  59. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/index.js +0 -51
  60. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/instant_rebate_activity.js +0 -209
  61. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/invite_friends_activity.js +0 -114
  62. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/jackpot.js +0 -74
  63. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/mini_game_activity.js +0 -68
  64. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/otp_verified_activity.js +0 -74
  65. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/ranking_activity.js +0 -105
  66. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/return_bonus_activity.js +0 -153
  67. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/roulette_activity_v2.js +0 -95
  68. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/sign_in_activity.js +0 -157
  69. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/sign_in_monthly_activity.js +0 -65
  70. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/specify_bets_activity.js +0 -157
  71. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/specify_turnover_activity.js +0 -136
  72. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/time_bomb_activity.js +0 -89
  73. package/.claude/worktrees/geemee-sendpixel/src/machine/activity/vip_card_activity.js +0 -187
  74. package/.claude/worktrees/geemee-sendpixel/src/machine/auth.js +0 -592
  75. package/.claude/worktrees/geemee-sendpixel/src/machine/auth_otp_v2.js +0 -177
  76. package/.claude/worktrees/geemee-sendpixel/src/machine/auth_otp_v3.js +0 -300
  77. package/.claude/worktrees/geemee-sendpixel/src/machine/bank_binding.js +0 -277
  78. package/.claude/worktrees/geemee-sendpixel/src/machine/bank_binding_amb.js +0 -146
  79. package/.claude/worktrees/geemee-sendpixel/src/machine/bonus.js +0 -76
  80. package/.claude/worktrees/geemee-sendpixel/src/machine/common.js +0 -418
  81. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/amb.js +0 -93
  82. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/crypto_bank.js +0 -330
  83. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/crypto_bank_cash.js +0 -307
  84. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/crypto_qrcode.js +0 -148
  85. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/crypto_qrcode_cash.js +0 -131
  86. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/crypto_way.js +0 -252
  87. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/crypto_way_cash.js +0 -296
  88. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/deposit_fc.js +0 -272
  89. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/direct.js +0 -310
  90. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/direct_cash.js +0 -225
  91. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/float.js +0 -375
  92. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/index.js +0 -49
  93. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/krway.js +0 -151
  94. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/loadcard_cash.js +0 -215
  95. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/loadcard_vn.js +0 -351
  96. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/manual_cash.js +0 -364
  97. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/manual_vn.js +0 -458
  98. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/qrcode_cash.js +0 -225
  99. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/qrcode_v2.js +0 -338
  100. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/usdt.js +0 -144
  101. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/usdt_cash.js +0 -138
  102. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/virtual_bank_cash.js +0 -209
  103. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/virtual_bank_vn.js +0 -269
  104. package/.claude/worktrees/geemee-sendpixel/src/machine/deposit/vpay.js +0 -368
  105. package/.claude/worktrees/geemee-sendpixel/src/machine/error.js +0 -112
  106. package/.claude/worktrees/geemee-sendpixel/src/machine/game_betslip.js +0 -46
  107. package/.claude/worktrees/geemee-sendpixel/src/machine/game_favorite_v2.js +0 -160
  108. package/.claude/worktrees/geemee-sendpixel/src/machine/game_hot_new.js +0 -79
  109. package/.claude/worktrees/geemee-sendpixel/src/machine/game_info.js +0 -61
  110. package/.claude/worktrees/geemee-sendpixel/src/machine/game_replay.js +0 -46
  111. package/.claude/worktrees/geemee-sendpixel/src/machine/game_search_cash.js +0 -401
  112. package/.claude/worktrees/geemee-sendpixel/src/machine/game_search_v2.js +0 -401
  113. package/.claude/worktrees/geemee-sendpixel/src/machine/game_v2_1.js +0 -699
  114. package/.claude/worktrees/geemee-sendpixel/src/machine/honor_board.js +0 -132
  115. package/.claude/worktrees/geemee-sendpixel/src/machine/honor_board_cash.js +0 -89
  116. package/.claude/worktrees/geemee-sendpixel/src/machine/inbox.js +0 -489
  117. package/.claude/worktrees/geemee-sendpixel/src/machine/index.js +0 -89
  118. package/.claude/worktrees/geemee-sendpixel/src/machine/leaderboard.js +0 -130
  119. package/.claude/worktrees/geemee-sendpixel/src/machine/merge.js +0 -57
  120. package/.claude/worktrees/geemee-sendpixel/src/machine/navbar.js +0 -126
  121. package/.claude/worktrees/geemee-sendpixel/src/machine/payment_data.js +0 -86
  122. package/.claude/worktrees/geemee-sendpixel/src/machine/promotions.js +0 -170
  123. package/.claude/worktrees/geemee-sendpixel/src/machine/ranking.js +0 -219
  124. package/.claude/worktrees/geemee-sendpixel/src/machine/reward.js +0 -255
  125. package/.claude/worktrees/geemee-sendpixel/src/machine/reward_cash.js +0 -276
  126. package/.claude/worktrees/geemee-sendpixel/src/machine/reward_fc.js +0 -98
  127. package/.claude/worktrees/geemee-sendpixel/src/machine/roulette_v2.js +0 -280
  128. package/.claude/worktrees/geemee-sendpixel/src/machine/setting.js +0 -47
  129. package/.claude/worktrees/geemee-sendpixel/src/machine/side.js +0 -154
  130. package/.claude/worktrees/geemee-sendpixel/src/machine/side_cash.js +0 -111
  131. package/.claude/worktrees/geemee-sendpixel/src/machine/side_v2.js +0 -209
  132. package/.claude/worktrees/geemee-sendpixel/src/machine/user_info.js +0 -64
  133. package/.claude/worktrees/geemee-sendpixel/src/machine/user_photo.js +0 -65
  134. package/.claude/worktrees/geemee-sendpixel/src/machine/user_reset_password.js +0 -231
  135. package/.claude/worktrees/geemee-sendpixel/src/machine/user_sign_up.js +0 -244
  136. package/.claude/worktrees/geemee-sendpixel/src/machine/vip_table.js +0 -57
  137. package/.claude/worktrees/geemee-sendpixel/src/machine/websocket.js +0 -361
  138. package/.claude/worktrees/geemee-sendpixel/src/machine/welcome.js +0 -110
  139. package/.claude/worktrees/geemee-sendpixel/src/machine/withdraw/index.js +0 -11
  140. package/.claude/worktrees/geemee-sendpixel/src/machine/withdraw/withdraw_crypto_cash.js +0 -327
  141. package/.claude/worktrees/geemee-sendpixel/src/machine/withdraw/withdraw_krway.js +0 -223
  142. package/.claude/worktrees/geemee-sendpixel/src/machine/withdraw/withdraw_manual.js +0 -536
  143. package/.claude/worktrees/geemee-sendpixel/src/machine/withdraw/withdraw_manual_cash.js +0 -324
  144. package/.claude/worktrees/geemee-sendpixel/src/request/config.js +0 -41
  145. package/.claude/worktrees/geemee-sendpixel/src/request/request.js +0 -365
  146. package/.claude/worktrees/geemee-sendpixel/src/util/constant.js +0 -20
  147. package/.claude/worktrees/geemee-sendpixel/src/util/index.js +0 -6
  148. package/.claude/worktrees/geemee-sendpixel/src/util/math.js +0 -4
  149. package/.claude/worktrees/geemee-sendpixel/src/util/storage.js +0 -42
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.442](https://github.com/jetthai/cuora-module/compare/v1.1.441...v1.1.442) (2026-06-15)
6
+
5
7
  ### [1.1.441](https://github.com/jetthai/cuora-module/compare/v1.1.440...v1.1.441) (2026-06-13)
6
8
 
7
9
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.441",
3
+ "version": "1.1.442",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
package/src/api/auth.js CHANGED
@@ -31,8 +31,8 @@ export default {
31
31
  },
32
32
  isPublic: true,
33
33
  }),
34
- register: ({ channel, subchannel, ac, fc = null, reCaptchaToken, dt, ...rest }) => {
35
- const params = pickBy({ channel, subchannel, ac, fc }, (value) => {
34
+ register: ({ ac, fc = null, reCaptchaToken, dt, ...rest }) => {
35
+ const params = pickBy({ ac, fc }, (value) => {
36
36
  return value !== undefined && value !== null
37
37
  })
38
38
  const qs = Object.keys(params)
@@ -7,7 +7,7 @@ import common from '../api/common.js'
7
7
  import pickBy from 'lodash/pickBy.js'
8
8
 
9
9
  export default function (request) {
10
- const { appSecret, clientId, sentry, defaultChannel, defaultSubchannel } = request.config
10
+ const { appSecret, clientId, sentry } = request.config
11
11
  const tokenKey = `cuora_${clientId}`
12
12
  const userKey = `cuora_tempuser`
13
13
  const phoneCountryCode = 'phone_countrycode'
@@ -464,7 +464,7 @@ export default function (request) {
464
464
  return { token }
465
465
  }),
466
466
  redirectTo3Party: async (context, event) => {
467
- const { provider, channel, subchannel, fc } = event.data
467
+ const { provider, fc } = event.data
468
468
  const deviceTokenEnable = context.siteConfig?.dtVerify
469
469
 
470
470
  const dt = deviceTokenEnable ? await request.config.getDt?.() : undefined
@@ -476,11 +476,6 @@ export default function (request) {
476
476
  const email = storage.get('tp_email')
477
477
  const messages = {
478
478
  url: window.location.href,
479
- channelOrders: [
480
- { channel: storage.get('channel'), subchannel: storage.get('subchannel') },
481
- { channel: defaultChannel, subchannel: defaultSubchannel },
482
- { channel: channel, subchannel: subchannel },
483
- ],
484
479
  affiliateCode,
485
480
  nickname,
486
481
  }
@@ -508,9 +503,6 @@ export default function (request) {
508
503
  referralObj.email = email
509
504
  }
510
505
 
511
- referralObj.channel = storage.get('channel') || defaultChannel || channel
512
- referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel
513
-
514
506
  storage.remove('tp_phone')
515
507
  storage.remove('tp_countryCode')
516
508
  storage.remove('tp_email')
@@ -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, defaultChannel, defaultSubchannel } = request.config
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
  }
@@ -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, defaultChannel, defaultSubchannel } = request.config
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
- email,
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, channel, sub_channel } = event.data
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 { channel, subchannel, signUpData, deviceTokenEnable } = context
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,
@@ -1,52 +0,0 @@
1
- # Auto Git Flow
2
-
3
- 請依序執行每個步驟進行完整的清理流程,每步執行前先告知使用者當前進度。
4
-
5
- ---
6
-
7
- ## Phase 1: 清理
8
-
9
- ### Step 1 — 刪除已合併到 master 的分支
10
-
11
- ```bash
12
- git checkout master
13
- git fetch --prune
14
- ```
15
-
16
- 刪除已合併至 master 的 remote 分支(排除 master/qa/dev/HEAD):
17
-
18
- ```bash
19
- git branch -r --merged origin/master | grep -v -E "(master|qa|dev|HEAD)" | sed 's/origin\///' | xargs -r -I {} git push origin --delete {}
20
- ```
21
-
22
- 刪除已合併至 master 的 local 分支(排除 master/qa/dev):
23
-
24
- ```bash
25
- git branch --merged master | grep -v -E "^\*?\s*(master|qa|dev)$" | xargs -r git branch -d
26
- ```
27
-
28
- ### Step 5 — 刪除不合規 tags
29
-
30
- 執行 `scripts/clean-tags.sh` 清理不符合正式版號格式的本地及遠端 tags:
31
-
32
- ```bash
33
- sh scripts/clean-tags.sh
34
- ```
35
-
36
- ---
37
-
38
- ## Phase 2: 完成
39
-
40
- ### Step 2 — 回報結果
41
-
42
- 切回 master 分支,顯示完成摘要:
43
-
44
- ```bash
45
- git checkout master
46
- ```
47
-
48
- 回報以下資訊:
49
-
50
- - 刪除了多少已合併分支
51
- - 刪除了多少不合規 tags
52
- - 當前所在分支
@@ -1,174 +0,0 @@
1
- # Commit & Push
2
-
3
- 執行 git commit 和 push 流程,支援多種 commit message 生成方式。
4
-
5
- ---
6
-
7
- ## Step 1 — 同步遠端分支
8
-
9
- 檢查當前分支的遠端是否有更新:
10
-
11
- ```bash
12
- git fetch origin
13
- git status
14
- ```
15
-
16
- 如果本地已經是最新(沒有 behind commits),直接進入 Step 2。
17
-
18
- 如果遠端有更新(本地 behind),執行 pull:
19
-
20
- ```bash
21
- git pull
22
- ```
23
-
24
- 如果 pull 發生衝突:
25
-
26
- 1. 取消 merge:
27
- ```bash
28
- git merge --abort
29
- ```
30
- 2. 告知使用者:「遠端有更新且與本地變更衝突,請先還原當前所有檔案的異動,還原完成後請回覆。」
31
- 3. 等待使用者回覆。
32
- 4. 使用者回覆後,重新執行 pull:
33
- ```bash
34
- git pull
35
- ```
36
- 5. Pull 成功後,告知使用者:「遠端同步完成,請將剛才還原的異動重新加回,完成後請回覆。」
37
- 6. 等待使用者回覆確認已全部加回,再繼續後續流程。
38
-
39
- 出現錯誤則停止,詢問使用者要怎麼做。
40
-
41
- ---
42
-
43
- ## Step 2 — 檢查工作區狀態
44
-
45
- ```bash
46
- git status
47
- ```
48
-
49
- 如果沒有任何變更(工作區乾淨),告知使用者「沒有需要提交的變更」並停止。
50
-
51
- 如果有變更,顯示變更檔案清單給使用者確認。
52
-
53
- 出現錯誤則停止,詢問使用者要怎麼做。
54
-
55
- ---
56
-
57
- ## Step 3 — Stage 變更
58
-
59
- 將所有變更加入 staging area:
60
-
61
- ```bash
62
- git add -A
63
- ```
64
-
65
- 出現錯誤則停止,詢問使用者要怎麼做。
66
-
67
- ---
68
-
69
- ## Step 4 — 選擇 Commit Message 方式
70
-
71
- 使用 `AskUserQuestion` 工具顯示選單,讓使用者從以下選項中選擇:
72
-
73
- - **自動生成** — AI 根據異動自動生成,直接使用
74
- - **自動生成 + 修改** — AI 自動生成後,顯示給使用者確認或修改
75
- - **手動輸入** — 完全由使用者手動輸入 commit message
76
-
77
- 使用者也可以選擇「Other」輸入自訂指示,AI 會根據指示和異動內容生成 commit message 並顯示給使用者確認。
78
-
79
- 等待使用者選擇。
80
-
81
- ---
82
-
83
- ## Step 5 — 生成 Commit Message
84
-
85
- 根據使用者在 Step 3 的選擇執行:
86
-
87
- ### 選項 1 或 2:自動生成
88
-
89
- 分析 `git diff --cached` 的內容,生成符合 Conventional Commits 格式的 commit message:
90
-
91
- - 格式:`type(scope): description`
92
- - type:feat / fix / refactor / style / docs / chore / perf / test
93
- - scope:根據變更的主要目錄或功能模組決定(可省略)
94
- - description:簡潔描述變更內容(中文)
95
-
96
- 當變更涉及多個不同類型或模組時,自行分類並以條列式呈現:
97
-
98
- ```
99
- type(scope): 主要描述
100
-
101
- - type(scope): 細項描述 1
102
- - type(scope): 細項描述 2
103
- - type(scope): 細項描述 3
104
- ```
105
-
106
- 例如:
107
-
108
- ```
109
- feat(payment): 新增加密貨幣存款功能
110
-
111
- - feat(deposit): 新增 USDT 存款方式
112
- - fix(withdraw): 修正提款金額驗證邏輯
113
- - style(modal): 調整存款彈窗樣式
114
- ```
115
-
116
- 如果是選項 2,將生成的 message 顯示給使用者,等待使用者確認或提供修改後的版本。
117
-
118
- ### 選項 3:手動輸入
119
-
120
- 等待使用者輸入完整的 commit message。
121
-
122
- ### 選項 4:其他
123
-
124
- 等待使用者輸入自訂指示,然後結合 `git diff --cached` 的異動內容,根據使用者的指示生成 commit message,顯示給使用者確認或修改。
125
-
126
- 出現錯誤則停止,詢問使用者要怎麼做。
127
-
128
- ---
129
-
130
- ## Step 6 — 執行 Commit
131
-
132
- 使用確定的 commit message 執行 commit:
133
-
134
- ```bash
135
- git commit -m "<commit_message>"
136
- ```
137
-
138
- 如果 commit message 包含多行,使用:
139
-
140
- ```bash
141
- git commit -m "<title>" -m "<body>"
142
- ```
143
-
144
- 出現錯誤則停止,詢問使用者要怎麼做。
145
-
146
- ---
147
-
148
- ## Step 7 — 執行 Push
149
-
150
- Commit 完成後直接執行 push,不需詢問使用者。
151
-
152
- 將 commit push 到遠端:
153
-
154
- ```bash
155
- git push
156
- ```
157
-
158
- 如果當前分支沒有設定 upstream,使用:
159
-
160
- ```bash
161
- git push --set-upstream origin <current_branch>
162
- ```
163
-
164
- 出現錯誤則停止,詢問使用者要怎麼做。
165
-
166
- ---
167
-
168
- ## Step 8 — 完成回報
169
-
170
- 顯示以下資訊:
171
-
172
- - 分支名稱
173
- - Commit message 內容
174
- - Push 結果(成功/失敗)
@@ -1,142 +0,0 @@
1
- # Create Branch
2
-
3
- 從目前 HEAD 建立新分支(feat / fix / hotfix),**建立後切換到該分支**。
4
-
5
- - 分支命名:
6
- - `feat` → `feat/well/{子名稱}`
7
- - `fix` → `fix/well/{子名稱}`
8
- - `hotfix` → `hotfix/{版號}`(例如 `hotfix/1.1.562`)
9
-
10
- 請依序執行每個步驟,每步執行前先告知使用者當前進度。
11
-
12
- ---
13
-
14
- ## Step 1 — 檢查工作區是否乾淨(忽略 submodule)
15
-
16
- 若有未提交的變更(staged、unstaged、untracked),立即終止並提醒使用者先處理(commit 或 stash)。**忽略 submodule 變更。**
17
-
18
- ```bash
19
- git status --porcelain --ignore-submodules=all
20
- ```
21
-
22
- 若輸出非空,停止後續步驟並回報:
23
-
24
- - 工作區目前有未提交的變更,為避免遺失,已中止操作
25
- - 列出 `git status --short --ignore-submodules=all` 的結果
26
- - 建議使用者先 `git commit` 或 `git stash` 後再重新執行
27
-
28
- ---
29
-
30
- ## Step 2 — 詢問 branch 類型
31
-
32
- 使用 `AskUserQuestion` 工具,讓使用者選擇 branch 類型:
33
-
34
- - 問題:`請選擇要建立的 branch 類型?`
35
- - header:`Branch 類型`
36
- - 選項:
37
- - `feat` — 新功能開發
38
- - `fix` — Bug 修正
39
- - `hotfix` — 緊急修復
40
-
41
- 將使用者選擇的答案儲存為 `<BRANCH_TYPE>`。
42
-
43
- ---
44
-
45
- ## Step 3 — 決定最終 branch 名稱
46
-
47
- 依 `<BRANCH_TYPE>` 分支處理:
48
-
49
- ### 若 `<BRANCH_TYPE>` 為 `hotfix`
50
-
51
- 使用 `AskUserQuestion` 工具,請使用者透過「Other」選項輸入版號:
52
-
53
- - 問題:`請輸入 hotfix 版號(例如:1.1.562)?`
54
- - header:`Hotfix 版號`
55
- - 選項:
56
- - 提供 1~2 個範例選項讓使用者參考(例如 `1.0.0`、`1.1.562`)
57
- - 明確提示使用者應該選「Other」自行輸入
58
-
59
- 將使用者輸入的值儲存為 `<HOTFIX_VERSION>`。
60
-
61
- **驗證規則**:
62
-
63
- - 不可為空
64
- - 必須符合 `^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$` 格式(不含 `v` 前綴)
65
- - 若不符合規則,請使用者重新輸入
66
-
67
- 組合:
68
-
69
- ```
70
- <FINAL_BRANCH_NAME> = hotfix/<HOTFIX_VERSION>
71
- ```
72
-
73
- 例如 `hotfix/1.1.562`。跳到 Step 4。
74
-
75
- ### 若 `<BRANCH_TYPE>` 為 `feat` 或 `fix`
76
-
77
- 使用 `AskUserQuestion` 工具,請使用者透過「Other」選項自行輸入 branch 子名稱:
78
-
79
- - 問題:`請輸入 branch 子名稱(例如:login-fix、header-refactor)?`
80
- - header:`子名稱`
81
- - 選項:
82
- - 提供 2 個範例選項讓使用者參考(例如 `example-feature`、`example-bug`)
83
- - 明確提示使用者應該選「Other」自行輸入
84
-
85
- 將使用者輸入的值儲存為 `<BRANCH_SUBNAME>`。
86
-
87
- **驗證規則**:
88
-
89
- - 不可為空
90
- - 只允許英文字母、數字、連字號(`-`)、底線(`_`)、斜線(`/`)
91
- - 若不符合規則,請使用者重新輸入
92
-
93
- 組合:
94
-
95
- ```
96
- <FINAL_BRANCH_NAME> = <BRANCH_TYPE>/well/<BRANCH_SUBNAME>
97
- ```
98
-
99
- 範例:
100
-
101
- - `feat/well/login-page`
102
- - `fix/well/header-layout`
103
-
104
- ---
105
-
106
- ## Step 4 — 檢查 branch 是否已存在
107
-
108
- 檢查 `<FINAL_BRANCH_NAME>` 是否已存在(本地或遠端):
109
-
110
- ```bash
111
- git rev-parse --verify <FINAL_BRANCH_NAME> 2>/dev/null
112
- git ls-remote --exit-code --heads origin <FINAL_BRANCH_NAME> 2>/dev/null
113
- ```
114
-
115
- 若已存在,停止並告知使用者:
116
-
117
- - hotfix 場景:該版號的 hotfix 分支已存在,建議改用其他版號或先處理舊分支再重試
118
- - feat / fix 場景:建議改用其他子名稱
119
-
120
- ---
121
-
122
- ## Step 5 — 建立新 branch 並切換
123
-
124
- 從目前 HEAD 建立新分支,**並切換到該分支**:
125
-
126
- ```bash
127
- git checkout -b <FINAL_BRANCH_NAME>
128
- ```
129
-
130
- 若失敗則停止並回報原因。
131
-
132
- ---
133
-
134
- ## Step 6 — 回報結果
135
-
136
- 顯示完成摘要:
137
-
138
- - 新 branch 名稱:`<FINAL_BRANCH_NAME>`
139
- - 基於的 commit SHA(短版,`git log -1 --pretty=format:'%h'`)與訊息首行(`git log -1 --pretty=format:'%s'`)
140
- - 已切換到新分支
141
- - 提示使用者:
142
- - 若要推送到遠端,可執行 `git push -u origin <FINAL_BRANCH_NAME>`