@e-xi/xion 0.0.26 → 0.0.28
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/dist/main/app/index.js
CHANGED
|
@@ -44,7 +44,7 @@ import "../../chunk-files/chunk-J34MOWJP.js";
|
|
|
44
44
|
import "../../chunk-files/chunk-RSUM4GBD.js";
|
|
45
45
|
import {
|
|
46
46
|
BannerManager
|
|
47
|
-
} from "../../chunk-files/chunk-
|
|
47
|
+
} from "../../chunk-files/chunk-3T2U6UFF.js";
|
|
48
48
|
import "../../chunk-files/chunk-YLZRRUY7.js";
|
|
49
49
|
import {
|
|
50
50
|
defineAppConfig,
|
|
@@ -1,38 +1,47 @@
|
|
|
1
1
|
import { type Pinia } from 'pinia';
|
|
2
|
-
import { type ComputedRef, type Ref } from 'vue';
|
|
3
2
|
/**
|
|
4
|
-
* JWT 认证 Store
|
|
3
|
+
* JWT 认证 Store
|
|
5
4
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
isAuthenticating: ComputedRef<boolean>;
|
|
17
|
-
/** 是否正在刷新 */
|
|
18
|
-
isRefreshing: ComputedRef<boolean>;
|
|
19
|
-
/** 是否已登录 */
|
|
20
|
-
isAuthenticated: ComputedRef<boolean>;
|
|
21
|
-
/** 是否未登录 */
|
|
22
|
-
isUnauthenticated: ComputedRef<boolean>;
|
|
23
|
-
/** 是否认证异常 */
|
|
24
|
-
isError: ComputedRef<boolean>;
|
|
25
|
-
/** 初始化认证状态与监听器 */
|
|
5
|
+
declare const useXoAuthStoreDefinition: import("pinia").StoreDefinition<"useXoAuthStore", Pick<{
|
|
6
|
+
status: import("vue").Ref<"error" | "unauthenticated" | "initializing" | "authenticating" | "refreshing" | "authenticated", "error" | "unauthenticated" | "initializing" | "authenticating" | "refreshing" | "authenticated">;
|
|
7
|
+
user: import("vue").Ref<unknown, unknown>;
|
|
8
|
+
error: import("vue").Ref<string | undefined, string | undefined>;
|
|
9
|
+
isInitializing: import("vue").ComputedRef<boolean>;
|
|
10
|
+
isAuthenticating: import("vue").ComputedRef<boolean>;
|
|
11
|
+
isRefreshing: import("vue").ComputedRef<boolean>;
|
|
12
|
+
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
13
|
+
isUnauthenticated: import("vue").ComputedRef<boolean>;
|
|
14
|
+
isError: import("vue").ComputedRef<boolean>;
|
|
26
15
|
initialize: () => Promise<void>;
|
|
27
|
-
/** 登录 */
|
|
28
16
|
login: (request: XoAuth.LoginRequest) => Promise<void>;
|
|
29
|
-
/** 退出登录 */
|
|
30
17
|
logout: () => Promise<void>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
}, "error" | "status" | "user">, Pick<{
|
|
19
|
+
status: import("vue").Ref<"error" | "unauthenticated" | "initializing" | "authenticating" | "refreshing" | "authenticated", "error" | "unauthenticated" | "initializing" | "authenticating" | "refreshing" | "authenticated">;
|
|
20
|
+
user: import("vue").Ref<unknown, unknown>;
|
|
21
|
+
error: import("vue").Ref<string | undefined, string | undefined>;
|
|
22
|
+
isInitializing: import("vue").ComputedRef<boolean>;
|
|
23
|
+
isAuthenticating: import("vue").ComputedRef<boolean>;
|
|
24
|
+
isRefreshing: import("vue").ComputedRef<boolean>;
|
|
25
|
+
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
26
|
+
isUnauthenticated: import("vue").ComputedRef<boolean>;
|
|
27
|
+
isError: import("vue").ComputedRef<boolean>;
|
|
28
|
+
initialize: () => Promise<void>;
|
|
29
|
+
login: (request: XoAuth.LoginRequest) => Promise<void>;
|
|
30
|
+
logout: () => Promise<void>;
|
|
31
|
+
}, "isInitializing" | "isAuthenticating" | "isRefreshing" | "isAuthenticated" | "isUnauthenticated" | "isError">, Pick<{
|
|
32
|
+
status: import("vue").Ref<"error" | "unauthenticated" | "initializing" | "authenticating" | "refreshing" | "authenticated", "error" | "unauthenticated" | "initializing" | "authenticating" | "refreshing" | "authenticated">;
|
|
33
|
+
user: import("vue").Ref<unknown, unknown>;
|
|
34
|
+
error: import("vue").Ref<string | undefined, string | undefined>;
|
|
35
|
+
isInitializing: import("vue").ComputedRef<boolean>;
|
|
36
|
+
isAuthenticating: import("vue").ComputedRef<boolean>;
|
|
37
|
+
isRefreshing: import("vue").ComputedRef<boolean>;
|
|
38
|
+
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
39
|
+
isUnauthenticated: import("vue").ComputedRef<boolean>;
|
|
40
|
+
isError: import("vue").ComputedRef<boolean>;
|
|
41
|
+
initialize: () => Promise<void>;
|
|
42
|
+
login: (request: XoAuth.LoginRequest) => Promise<void>;
|
|
43
|
+
logout: () => Promise<void>;
|
|
44
|
+
}, "login" | "logout" | "initialize">>;
|
|
36
45
|
/**
|
|
37
46
|
* 认证 Store 实例类型
|
|
38
47
|
* @template TUser 业务端指定的登录用户类型
|
package/dist/vite/orval/index.js
CHANGED
|
@@ -43,10 +43,8 @@ async function generateOrvalGlobalTypes(options) {
|
|
|
43
43
|
const modelPaths = await exportedModelPaths(modelsDir);
|
|
44
44
|
const models = (await Promise.all(modelPaths.map(modelTypes))).flat().sort((left, right) => left.name.localeCompare(right.name));
|
|
45
45
|
const declarations = models.map((model) => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
type ${model.name} = Models.${model.name}`;
|
|
49
|
-
}).join("\n\n");
|
|
46
|
+
return `${indent("", 8)}type ${model.name} = Models.${model.name}`;
|
|
47
|
+
}).join("\n");
|
|
50
48
|
const output = `/**
|
|
51
49
|
* @file Automatically generated by @e-xi/xion/vite/orval
|
|
52
50
|
* Do not edit manually.
|