@jetthai/cuora 1.1.253 → 1.1.254

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.254](https://github.com/jetthai/cuora-module/compare/v1.1.253...v1.1.254) (2024-05-03)
6
+
5
7
  ### [1.1.253](https://github.com/jetthai/cuora-module/compare/v1.1.252...v1.1.253) (2024-05-02)
6
8
 
7
9
  ### [1.1.252](https://github.com/jetthai/cuora-module/compare/v1.1.251...v1.1.252) (2024-04-17)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.253",
3
+ "version": "1.1.254",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -55,7 +55,7 @@ export default function (request) {
55
55
  },
56
56
  idle: {
57
57
  entry: 'fetchToken',
58
- always: [{ target: 'authenticated', cond: 'hasToken' }],
58
+ always: [{ target: 'tokenAuthenticated', cond: 'hasToken' }],
59
59
  },
60
60
  authentication: {
61
61
  invoke: {
@@ -108,6 +108,18 @@ export default function (request) {
108
108
  },
109
109
  },
110
110
  },
111
+ tokenAuthenticated: {
112
+ invoke: {
113
+ src: 'fetchUserInfo',
114
+ onDone: {
115
+ target: 'inline',
116
+ actions: ['setUserInfo', 'extendToken'],
117
+ },
118
+ onError: {
119
+ target: 'leaving',
120
+ },
121
+ },
122
+ },
111
123
  inline: {
112
124
  initial: 'pending',
113
125
  states: {