@jetthai/cuora 1.1.468-dev.0 → 1.1.468-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/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.468-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.468-dev.0...v1.1.468-dev.1) (2026-09-13)
6
+
5
7
  ### [1.1.468-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.468...v1.1.468-dev.0) (2026-09-12)
6
8
 
7
9
  ### [1.1.467-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.467...v1.1.467-dev.2) (2026-09-10)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.468-dev.0",
3
+ "version": "1.1.468-dev.1",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -46,6 +46,7 @@ export default function (request) {
46
46
  redirectURL: null,
47
47
  reCaptchaToken: null,
48
48
  fc: null,
49
+ dt: null,
49
50
  },
50
51
  states: {
51
52
  fetchingConfig: {
@@ -183,6 +184,7 @@ export default function (request) {
183
184
  src: 'checkDeviceToken',
184
185
  onDone: {
185
186
  target: 'checkDeviceTokenDone',
187
+ actions: 'setDeviceToken',
186
188
  },
187
189
  onError: {
188
190
  target: 'fetching',
@@ -389,6 +391,11 @@ export default function (request) {
389
391
  token: event.data,
390
392
  }
391
393
  }),
394
+ setDeviceToken: assign((context, event) => {
395
+ return {
396
+ dt: event.data?.dt ?? null,
397
+ }
398
+ }),
392
399
  setAccount: assign((context, event) => {
393
400
  if (context.loginData.username) {
394
401
  storage.remove(accountEmailKey)
@@ -521,16 +528,16 @@ export default function (request) {
521
528
  },
522
529
  checkDeviceToken: async (context, event) => {
523
530
  const deviceTokenEnable = context.siteConfig?.dtVerify
524
- if (deviceTokenEnable) {
525
- const { exist } = await request.send(user.checkDt())
526
- if (!exist) {
527
- const dt = await request.config.getDt?.()
528
- // 確定有dt再取得updateDt
529
- if (dt) {
530
- await request.send(user.updateDt({ dt }))
531
- }
532
- }
531
+ if (!deviceTokenEnable) return { dt: null }
532
+ const { exist, dt: boundDt } = await request.send(user.checkDt())
533
+ if (exist) return { dt: boundDt }
534
+ const dt = await request.config.getDt?.()
535
+ // 確定有dt再取得updateDt
536
+ if (dt) {
537
+ await request.send(user.updateDt({ dt }))
538
+ return { dt }
533
539
  }
540
+ return { dt: null }
534
541
  },
535
542
  fetchSiteConfig: async (context, event) => {
536
543
  const { config } = await request.send(common.getConfig({ appSecret }))