@jetthai/cuora 1.1.355-dev-8 → 1.1.355-dev-9

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,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.355-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.355-dev-8...v1.1.355-dev-9) (2025-05-06)
6
+
5
7
  ### [1.1.355-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.355-dev-7...v1.1.355-dev-8) (2025-05-05)
6
8
 
7
9
  ### [1.1.355-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.355-dev-6...v1.1.355-dev-7) (2025-05-02)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.355-dev-8",
3
+ "version": "1.1.355-dev-9",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -39,6 +39,7 @@ export default function (request) {
39
39
  portrait: null,
40
40
  gameCode: null,
41
41
  name: null,
42
+ isDemo: false,
42
43
  },
43
44
  walletType: null,
44
45
  lang: 'en_US',
@@ -88,6 +89,10 @@ export default function (request) {
88
89
  target: 'demoGame',
89
90
  actions: ['setGameInfo', 'setLang', 'setSite'],
90
91
  },
92
+ DEMO_GAME: {
93
+ target: 'demoGame',
94
+ actions: ['setGameInfo', 'setLang', 'setSite'],
95
+ },
91
96
  MENU_ENTER_GAME: {
92
97
  target: 'connecting',
93
98
  actions: ['setGameInfo', 'setLang'],
@@ -232,6 +237,9 @@ export default function (request) {
232
237
  },
233
238
  playingDemo: {
234
239
  on: {
240
+ EXIT_GAME: {
241
+ target: 'disconnect',
242
+ },
235
243
  EXIT_DEMO_GAME: {
236
244
  target: 'idle',
237
245
  },
@@ -611,7 +619,7 @@ export default function (request) {
611
619
  return { type, gameToken, gameHtml, gameURL: redirect_url, gameWalletType: wallet_type }
612
620
  },
613
621
  demoGame: async (context, event) => {
614
- const { lang, site, isMobile } = context
622
+ const { lang, site, isMobile, game } = context
615
623
  const { providerId, gameId, gameTypeId, mappingId } = context.game
616
624
  const params = {
617
625
  site,
@@ -622,8 +630,10 @@ export default function (request) {
622
630
  is_mobile: isMobile === 'mobile' ? 'y' : null,
623
631
  lang,
624
632
  }
625
- const { type, redirect_url, gameToken, gameHtml } = await request.send(api.demoGame(params))
626
- return { type, gameToken, gameHtml, gameURL: redirect_url }
633
+ const { type, redirect_url, gameToken, gameHtml, is_demo } = await request.send(api.demoGame(params))
634
+ // 將 is_demo 設置到 context.game.isDemo
635
+ game.isDemo = is_demo
636
+ return { type, gameToken, gameHtml, gameURL: redirect_url, game }
627
637
  },
628
638
  disconnectGame: async (context, event) => {
629
639
  const uid_site = event.data