@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.
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-P4CX6I4J.js";
7
7
 
8
8
  // package.json
9
- var version = "0.0.26";
9
+ var version = "0.0.28";
10
10
 
11
11
  // src/main/banner/banner-abstract.ts
12
12
  var BannerAbstract = class {
@@ -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-KBVHM5ZU.js";
47
+ } from "../../chunk-files/chunk-3T2U6UFF.js";
48
48
  import "../../chunk-files/chunk-YLZRRUY7.js";
49
49
  import {
50
50
  defineAppConfig,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  BannerAbstract,
3
3
  BannerManager
4
- } from "../../chunk-files/chunk-KBVHM5ZU.js";
4
+ } from "../../chunk-files/chunk-3T2U6UFF.js";
5
5
  import "../../chunk-files/chunk-YLZRRUY7.js";
6
6
  import "../../chunk-files/chunk-P4CX6I4J.js";
7
7
  export {
@@ -1,38 +1,47 @@
1
1
  import { type Pinia } from 'pinia';
2
- import { type ComputedRef, type Ref } from 'vue';
3
2
  /**
4
- * JWT 认证 Store 的 setup 返回类型
3
+ * JWT 认证 Store
5
4
  */
6
- interface AuthStoreSetup {
7
- /** 当前认证状态 */
8
- status: Ref<XoAuth.Status>;
9
- /** 当前登录用户 */
10
- user: Ref<XoAuth.User | undefined>;
11
- /** 最近一次认证错误信息 */
12
- error: Ref<string | undefined>;
13
- /** 是否正在初始化 */
14
- isInitializing: ComputedRef<boolean>;
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
- * JWT 认证 Store
34
- */
35
- declare const useXoAuthStoreDefinition: import("pinia").StoreDefinition<"useXoAuthStore", Pick<AuthStoreSetup, "error" | "status" | "user">, Pick<AuthStoreSetup, "isInitializing" | "isAuthenticating" | "isRefreshing" | "isAuthenticated" | "isUnauthenticated" | "isError">, Pick<AuthStoreSetup, "login" | "logout" | "initialize">>;
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 业务端指定的登录用户类型
@@ -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
- const jsDoc = model.jsDoc ?? `/** ${options.namespace} API \u7684 ${model.name} \u6570\u636E\u6A21\u578B */`;
47
- return `${indent(jsDoc, 8)}
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-xi/xion",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "type": "module",
5
5
  "description": "Electron Vite Vue3 TypeScript framework.",
6
6
  "exports": {