@jetthai/cuora 1.1.341-dev-10 → 1.1.341-dev-12

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,6 +2,32 @@
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.341-dev-12](https://github.com/jetthai/cuora-module/compare/v1.1.341-rank-4...v1.1.341-dev-12) (2025-03-12)
6
+
7
+ ### [1.1.341-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-10...v1.1.341-dev-11) (2025-03-11)
8
+
9
+ ### [1.1.341-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-9...v1.1.341-dev-10) (2025-03-11)
10
+
11
+ ### [1.1.341-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.341-rank-3...v1.1.341-dev-9) (2025-03-10)
12
+
13
+ ### [1.1.341-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-7...v1.1.341-dev-8) (2025-03-10)
14
+
15
+ ### [1.1.341-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-6...v1.1.341-dev-7) (2025-03-10)
16
+
17
+ ### [1.1.341-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.341-rank-2...v1.1.341-dev-6) (2025-03-06)
18
+
19
+ ### [1.1.341-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.341-rank-1...v1.1.341-dev-5) (2025-03-06)
20
+
21
+ ### [1.1.341-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-3...v1.1.341-dev-4) (2025-03-03)
22
+
23
+ ### [1.1.341-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-2...v1.1.341-dev-3) (2025-03-03)
24
+
25
+ ### [1.1.341-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-1...v1.1.341-dev-2) (2025-02-27)
26
+
27
+ ### [1.1.341-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.341...v1.1.341-dev-1) (2025-02-27)
28
+
29
+ ### [1.1.341-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-10...v1.1.341-dev-11) (2025-03-11)
30
+
5
31
  ### [1.1.341-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-9...v1.1.341-dev-10) (2025-03-11)
6
32
 
7
33
  ### [1.1.341-rank-3](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-8...v1.1.341-rank-3) (2025-03-10)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.341-dev-10",
3
+ "version": "1.1.341-dev-12",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -12,6 +12,12 @@ export default function (request) {
12
12
  }, {})
13
13
  }
14
14
 
15
+ function transGameData(item) {
16
+ if (!item) return {}
17
+ item.providerId = item.provider
18
+ return item
19
+ }
20
+
15
21
  return createMachine(
16
22
  {
17
23
  id: 'dragon_tiger_ranking',
@@ -115,16 +121,18 @@ export default function (request) {
115
121
  }
116
122
  }),
117
123
  setRanking: assign((context, event) => {
124
+ const topRanking = event.data?.topRanking?.map((rank) => transGameData(rank))
118
125
  return {
119
126
  description: event.data?.description,
120
127
  descriptionUrl: event.data?.descriptionUrl,
121
- topRanking: event.data?.topRanking || [],
122
- playerRanking: event.data?.playerRanking || {},
128
+ topRanking: topRanking || [],
129
+ playerRanking: transGameData(event.data?.playerRanking) || {},
123
130
  }
124
131
  }),
125
132
  setRankingGames: assign((context, event) => {
133
+ const gameRanking = event.data?.map((rank) => transGameData(rank))
126
134
  return {
127
- gameRanking: event.data || [],
135
+ gameRanking: gameRanking || [],
128
136
  }
129
137
  }),
130
138
  setRankingOptions: assign((context, event) => {
@@ -140,9 +148,11 @@ export default function (request) {
140
148
  roundOptions.ALL = roundOptions.MONTHLY
141
149
  }
142
150
  return {
143
- options: { cycle: cycleOptions, round: roundOptions },
144
- round: currentRound[currentRound.length - 1],
145
151
  ...event.data,
152
+ options: { cycle: cycleOptions, round: roundOptions },
153
+ // 初始固定顯示 DAILY
154
+ cycle: event.data?.rule !== 'NORMAL' ? 'DAILY' : cycle,
155
+ round: currentRound[0],
146
156
  }
147
157
  }),
148
158
  setOptions: assign((context, event) => {