@pubinfo-pr/module-auth 0.189.2 → 0.197.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.
@@ -1,15 +1,15 @@
1
- export declare const LoginWithFourA: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').DefineComponent<import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ExtractPropTypes<{
1
+ export declare const LoginWithFourA: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
2
  color: {
3
3
  type: StringConstructor;
4
4
  default: string;
5
5
  };
6
- }>, () => import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').VNode<import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').RendererNode, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').RendererElement, {
6
+ }>, () => globalThis.VNode<import("vue").RendererNode, import("vue").RendererElement, {
7
7
  [key: string]: any;
8
- }>, {}, {}, {}, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ComponentOptionsMixin, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ComponentOptionsMixin, {}, string, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PublicProps, Readonly<import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ExtractPropTypes<{
8
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
9
9
  color: {
10
10
  type: StringConstructor;
11
11
  default: string;
12
12
  };
13
13
  }>> & Readonly<{}>, {
14
14
  color: string;
15
- }, {}, {}, {}, string, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ComponentProvideOptions, true, {}, any>;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,11 +1,11 @@
1
- export declare const RedirectLogin: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').DefineComponent<import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ExtractPropTypes<{
1
+ export declare const RedirectLogin: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
2
  id: StringConstructor;
3
3
  src: StringConstructor;
4
4
  color: StringConstructor;
5
- }>, () => import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').VNode<import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').RendererNode, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').RendererElement, {
5
+ }>, () => globalThis.VNode<import("vue").RendererNode, import("vue").RendererElement, {
6
6
  [key: string]: any;
7
- }>, {}, {}, {}, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ComponentOptionsMixin, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ComponentOptionsMixin, {}, string, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PublicProps, Readonly<import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ExtractPropTypes<{
7
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
8
8
  id: StringConstructor;
9
9
  src: StringConstructor;
10
10
  color: StringConstructor;
11
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ComponentProvideOptions, true, {}, any>;
11
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
package/dist/context.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { InternalContext } from './interface';
2
- export declare const ctx: import('unctx').UseContext<InternalContext>;
1
+ import type { InternalContext } from './interface';
2
+ export declare const ctx: import("unctx").UseContext<InternalContext>;
package/dist/core.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Recordable, ThirdParty } from './interface';
1
+ import type { Recordable, ThirdParty } from './interface';
2
2
  /**
3
3
  * 前往登录
4
4
  * @param id 唯一值
package/dist/helper.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { ProviderUserOptions, Recordable, ThirdParty } from './interface';
1
+ import type { ProviderUserOptions, Recordable, ThirdParty } from './interface';
2
2
  /**
3
3
  * 获取指定的 `Provider`
4
4
  * @param id
5
5
  */
6
- export declare function getProvider(id?: ThirdParty): import('./interface').ProviderOptions;
6
+ export declare function getProvider(id?: ThirdParty): import("./interface").ProviderOptions;
7
7
  /**
8
8
  * 构建第三方授权登录地址
9
9
  * @param provider
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ModuleOptions } from 'pubinfo-pr';
2
- import { AuthOptions } from './interface';
1
+ import type { ModuleOptions } from 'pubinfo-pr';
2
+ import type { AuthOptions } from './interface';
3
3
  export declare function auth(options: AuthOptions): ModuleOptions;
4
4
  export { LoginWithFourA } from './components/LoginWithFourA';
5
5
  export { authenticate, redirect, renderQRCode, signIn, } from './core';
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { cleanup, createContext, defineIconModule, defineRouteModule, useUserStore } from "pubinfo-pr";
2
2
  import { defineComponent, h, onMounted, ref } from "vue";
3
3
  import { useRoute, useRouter } from "vue-router";
4
- var __virtual_pubinfo_resolver_default = {
4
+ var _virtual_pubinfo_resolver_default = {
5
5
  icons: {},
6
6
  layouts: {},
7
7
  pages: {}
@@ -125,7 +125,7 @@ const RedirectLogin = defineComponent({
125
125
  });
126
126
  }
127
127
  });
128
- defineRouteModule("auth", __virtual_pubinfo_resolver_default.pages), defineIconModule("auth", __virtual_pubinfo_resolver_default.icons);
128
+ defineRouteModule("auth", _virtual_pubinfo_resolver_default.pages), defineIconModule("auth", _virtual_pubinfo_resolver_default.icons);
129
129
  function auth(b) {
130
130
  let { redirectTo: x = "/", pages: S = {}, baseURL: C, providers: w } = b, { signIn: T = "/login" } = S;
131
131
  return ctx.set({
@@ -1,4 +1,4 @@
1
- import { RouteLocationRaw } from '../../../node_modules/.pnpm/vue-router@4.5.1_vue@3.5.17_typescript@5.8.3_/node_modules/vue-router';
1
+ import type { RouteLocationRaw } from 'vue-router';
2
2
  export type Recordable = Record<string, any>;
3
3
  export type Fn<T = any, K = any> = (params?: Recordable & T) => Promise<K> | K;
4
4
  export type FnApi<T = any> = (params: Recordable & T, baseURL: string) => Promise<any>;
@@ -1,11 +1,11 @@
1
- export declare const PageAuth: import('../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').DefineComponent<import('../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ExtractPropTypes<{
1
+ export declare const PageAuth: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
2
  type: StringConstructor;
3
3
  redirectTo: FunctionConstructor;
4
4
  authenticate: FunctionConstructor;
5
- }>, () => import('../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').VNode<import('../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').RendererNode, import('../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').RendererElement, {
5
+ }>, () => globalThis.VNode<import("vue").RendererNode, import("vue").RendererElement, {
6
6
  [key: string]: any;
7
- }>, {}, {}, {}, import('../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ComponentOptionsMixin, import('../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ComponentOptionsMixin, {}, string, import('../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PublicProps, Readonly<import('../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ExtractPropTypes<{
7
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
8
8
  type: StringConstructor;
9
9
  redirectTo: FunctionConstructor;
10
10
  authenticate: FunctionConstructor;
11
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ComponentProvideOptions, true, {}, any>;
11
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,4 +1,4 @@
1
- import { ProviderOptions, ProviderUserOptions } from '../interface';
1
+ import type { ProviderOptions, ProviderUserOptions } from '../interface';
2
2
  export interface FourAOptions extends ProviderUserOptions {
3
3
  /** `client_id` */
4
4
  clientId?: string;
@@ -1,4 +1,4 @@
1
- import { ProviderOptions, ProviderUserOptions } from '../interface';
1
+ import type { ProviderOptions, ProviderUserOptions } from '../interface';
2
2
  export interface CredentialsOptions extends ProviderUserOptions {
3
3
  }
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { ProviderOptions, ProviderUserOptions } from '../interface';
1
+ import type { ProviderOptions, ProviderUserOptions } from '../interface';
2
2
  export interface DingZJOptions extends ProviderUserOptions {
3
3
  /**
4
4
  * 登录方式
@@ -1,4 +1,4 @@
1
- import { ProviderOptions, ProviderUserOptions } from '../interface';
1
+ import type { ProviderOptions, ProviderUserOptions } from '@/interface';
2
2
  export interface SsoOptions extends ProviderUserOptions {
3
3
  /**
4
4
  * 登录类型,根据调用 `/app/oauth/generateCode` 接口时传递的 `grantType` 参数值判断:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pubinfo-pr/module-auth",
3
3
  "type": "module",
4
- "version": "0.189.2",
4
+ "version": "0.197.1",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -23,10 +23,10 @@
23
23
  "node": "^20.19.0 || >=22.12.0"
24
24
  },
25
25
  "peerDependencies": {
26
- "pubinfo-pr": "0.189.2"
26
+ "pubinfo-pr": "0.197.1"
27
27
  },
28
28
  "devDependencies": {
29
- "pubinfo-pr": "0.189.2"
29
+ "pubinfo-pr": "0.197.1"
30
30
  },
31
31
  "scripts": {
32
32
  "dev": "pubinfo build --watch",