@jetthai/cuora 1.1.408-dev-1 → 1.1.408-dev-2

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 CHANGED
@@ -2,13 +2,9 @@
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.408-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.406-dev-8...v1.1.408-dev-1) (2026-01-14)
5
+ ### [1.1.408-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.408-dev-1...v1.1.408-dev-2) (2026-01-16)
6
6
 
7
- ### [1.1.408](https://github.com/jetthai/cuora-module/compare/v1.1.406-dev-6...v1.1.408) (2026-01-12)
8
-
9
- ### Bug Fixes
10
-
11
- - add null check for appendContent to prevent TypeError ([5c9de6e](https://github.com/jetthai/cuora-module/commit/5c9de6eaeff4182dd8098aa8816fb9b5650f36c1))
7
+ ### [1.1.408-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.408...v1.1.408-dev-1) (2026-01-16)
12
8
 
13
9
  ### [1.1.408](https://github.com/jetthai/cuora-module/compare/v1.1.407...v1.1.408) (2026-01-12)
14
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.408-dev-1",
3
+ "version": "1.1.408-dev-2",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
package/resetGitBranch.sh CHANGED
@@ -51,27 +51,13 @@ if [ $? -ne 0 ]; then
51
51
  exit 1
52
52
  fi
53
53
 
54
- # 切換到 master 分支
54
+ # 切換到 master
55
55
  git checkout master
56
56
  if [ $? -ne 0 ]; then
57
57
  echo "切換到 master 分支失敗"
58
58
  exit 1
59
59
  fi
60
60
 
61
- # 刪除本地的 qa 分支
62
- git branch -D qa
63
- if [ $? -ne 0 ]; then
64
- echo "刪除本地 qa 分支失敗"
65
- exit 1
66
- fi
67
-
68
- # 刪除遠端的 qa 分支
69
- git push origin --delete qa
70
- if [ $? -ne 0 ]; then
71
- echo "刪除遠端 qa 分支失敗"
72
- exit 1
73
- fi
74
-
75
61
  # 建立並切換到新的 qa 分支
76
62
  git checkout -b qa
77
63
  if [ $? -ne 0 ]; then
@@ -93,9 +79,23 @@ if [ $? -ne 0 ]; then
93
79
  exit 1
94
80
  fi
95
81
 
96
- # 切換到 master 分支
82
+ # 切換到 master
97
83
  git checkout master
98
84
  if [ $? -ne 0 ]; then
99
85
  echo "切換到 master 分支失敗"
100
86
  exit 1
87
+ fi
88
+
89
+ # 刪除所有已經合併到 master 分支的本地分支,除了 master 分支本身
90
+ git branch --merged master | grep -v "^\* master$" | grep -vE "^[* ]*(dev|qa)$" | xargs -r git branch -d
91
+ if [ $? -ne 0 ]; then
92
+ echo "刪除已合併到 master 分支的本地分支失敗"
93
+ exit 1
94
+ fi
95
+
96
+ # 刪除所有已經合併到 master 分支的遠端分支,除了 master 分支本身
97
+ git branch -r --merged master | grep -v "master" | grep -vE "(dev|qa)$" | sed 's/origin\///' | xargs -r -I {} git push origin --delete {}
98
+ if [ $? -ne 0 ]; then
99
+ echo "刪除已合併到 master 分支的遠端分支失敗"
100
+ exit 1
101
101
  fi
@@ -87,12 +87,6 @@ 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
- }),
96
90
  exchangeDiamond: ({ activityNo, exchangeAward = [] }) => ({
97
91
  url: 'activities/exchange/diamond',
98
92
  method: 'post',
package/src/api/common.js CHANGED
@@ -7,9 +7,4 @@ export default {
7
7
  getNavbar: ({ appSecret } = {}) => ({ url: 'getNavbarSetting', params: { appSecret }, method: 'get', isPublic: true }),
8
8
  getDefaultAffiliateCode: ({ appSecret }) => ({ url: 'getAffiliateCode', params: { appSecret }, method: 'get', isPublic: true }),
9
9
  getSiteInfoConfig: ({ appSecret, config }) => ({ url: 'get-site-config', method: 'get', params: { appSecret, config }, isPublic: true }),
10
- sendPixel: ({ appSecret, eventId, fbc, fbp, event }) => ({
11
- url: 'pixel',
12
- method: 'post',
13
- params: { appSecret, eventId, fbc, fbp, event },
14
- }),
15
10
  }
@@ -55,7 +55,7 @@ export default function (request) {
55
55
  },
56
56
  },
57
57
  fetching: {
58
- entry: ['setUA', 'setAgent', 'setPixel', 'setKPixel', 'setFbclid'],
58
+ entry: ['setUA', 'setAgent', 'setPixel', 'setKPixel'],
59
59
  invoke: {
60
60
  src: 'fetchConfig',
61
61
  onDone: [
@@ -237,18 +237,6 @@ export default function (request) {
237
237
  isMobile: userAgent?.device?.type,
238
238
  }
239
239
  }),
240
- setFbclid: assign(() => {
241
- const urlParams = new URLSearchParams(window.location.search)
242
- const fbclid = urlParams.get('fbclid') || ''
243
- if (fbclid !== '') {
244
- const timestamp = Date.now()
245
- const cookieRecord = 'fb.1.' + timestamp + '.' + fbclid
246
- document.cookie = `_fbc=${cookieRecord}; path=/; max-age=${60 * 60 * 24 * 7}`
247
- }
248
- return {
249
- fbclid,
250
- }
251
- }),
252
240
  setPixel: assign(() => {
253
241
  let urlParams = new URLSearchParams(window.location.search)
254
242
  const pix = urlParams.get('pix') || storage.get('pix') || ''
@@ -390,10 +390,6 @@ export default function (request) {
390
390
  }),
391
391
  appendContent: assign((context, event) => {
392
392
  const { room, additionEnable } = context
393
- // [防呆] 確保有 categoryId
394
- if (!room?.categoryId) {
395
- return
396
- }
397
393
  if (room.categoryId === GAME_SEARCH) {
398
394
  return
399
395
  } else if (additionEnable) {
@@ -37,13 +37,12 @@ export default function (request) {
37
37
  checking: {
38
38
  always: [
39
39
  { target: 'idle', actions: 'setActivityDetail', cond: 'isExist' },
40
- { target: 'loading', cond: 'hasActivityNoAndToken' },
41
- { target: 'idle' },
40
+ { target: 'loading', cond: 'hasActivityNo' },
42
41
  ],
43
42
  },
44
43
  loading: {
45
44
  invoke: {
46
- src: 'fetchActivityDetail',
45
+ src: 'fetchPublicActivityDetail',
47
46
  onDone: {
48
47
  target: 'idle',
49
48
  actions: ['setActivityMap', 'setActivityDetail'],
@@ -101,9 +100,8 @@ export default function (request) {
101
100
  const { activityMap, activityNo } = context
102
101
  return activityMap[activityNo]
103
102
  },
104
- hasActivityNoAndToken: (context, event) => {
105
- const hasToken = request.getToken()
106
- return !!context.activityNo && hasToken
103
+ hasActivityNo: (context, event) => {
104
+ return !!context.activityNo
107
105
  },
108
106
  },
109
107
  services: {
@@ -118,10 +116,15 @@ export default function (request) {
118
116
  const { data } = await request.send(hasToken ? api.getActivityList({ appSecret }) : api.getAllActivityList({ appSecret }))
119
117
  return data
120
118
  },
121
- fetchActivityDetail: async (context, event) => {
119
+ fetchPublicActivityDetail: async (context, event) => {
120
+ const hasToken = request.getToken()
122
121
  const { activityNo } = context
123
122
  let result = {}
124
- result = await request.send(api.getActivityDetail({ activityNo, appSecret }))
123
+ if (hasToken) {
124
+ result = await request.send(api.getActivityDetail({ activityNo, appSecret }))
125
+ } else {
126
+ result = await request.send(api.getTournamentDetail({ activityNo, appSecret }))
127
+ }
125
128
  return result.data
126
129
  },
127
130
  },
@@ -140,8 +140,6 @@ const supportVersion2List = [
140
140
  'game/list/v3/gameInfo',
141
141
  'payment/v2/uploadCommonSlip',
142
142
  'game/history/options',
143
- // 09/30
144
- 'pixel',
145
143
  // 10/09
146
144
  'account-binding/status',
147
145
  'account-binding/bind',