@lytjs/plugin-auth 4.1.0 → 5.0.0
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/README.md +151 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/types/index.d.ts +19 -6
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# @lytjs/plugin-auth
|
|
2
|
+
|
|
3
|
+
> Lyt.js 认证授权插件 - 提供登录、权限校验、路由守卫等认证功能
|
|
4
|
+
|
|
5
|
+
**版本:** 4.2.0
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @lytjs/plugin-auth
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 使用
|
|
14
|
+
|
|
15
|
+
### 注册插件
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { createApp } from '@lytjs/core'
|
|
19
|
+
import { createAuth } from '@lytjs/plugin-auth'
|
|
20
|
+
|
|
21
|
+
const auth = createAuth({
|
|
22
|
+
loginUrl: '/api/login',
|
|
23
|
+
logoutUrl: '/api/logout',
|
|
24
|
+
userUrl: '/api/user',
|
|
25
|
+
tokenKey: 'lyt_token',
|
|
26
|
+
autoRedirect: true,
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const app = createApp({})
|
|
30
|
+
app.use(auth)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 登录与登出
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
// 登录
|
|
37
|
+
const { user, token } = await auth.login({
|
|
38
|
+
username: 'admin',
|
|
39
|
+
password: '123456',
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
// 登出
|
|
43
|
+
await auth.logout()
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 注册
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
const result = await auth.register({
|
|
50
|
+
username: 'newuser',
|
|
51
|
+
password: '123456',
|
|
52
|
+
email: 'user@example.com',
|
|
53
|
+
})
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 路由守卫
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import { createRouter } from '@lytjs/router'
|
|
60
|
+
|
|
61
|
+
const router = createRouter({ /* ... */ })
|
|
62
|
+
auth.setupRouterGuard(router)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 在组件中使用
|
|
66
|
+
|
|
67
|
+
通过 `app.provide('auth', auth)` 注入后,可在组件中通过 `inject('auth')` 获取认证实例。
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
import { inject } from '@lytjs/core'
|
|
71
|
+
|
|
72
|
+
const auth = inject('auth')
|
|
73
|
+
|
|
74
|
+
// 检查登录状态
|
|
75
|
+
console.log(auth.isAuthenticated) // boolean
|
|
76
|
+
|
|
77
|
+
// 获取当前用户
|
|
78
|
+
console.log(auth.user) // AuthUser | null
|
|
79
|
+
|
|
80
|
+
// 获取 token
|
|
81
|
+
console.log(auth.token) // string | null
|
|
82
|
+
|
|
83
|
+
// 角色检查
|
|
84
|
+
auth.hasRole('admin') // boolean
|
|
85
|
+
|
|
86
|
+
// 权限检查
|
|
87
|
+
auth.hasPermission('write') // boolean
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## API
|
|
91
|
+
|
|
92
|
+
### Options
|
|
93
|
+
|
|
94
|
+
| 选项 | 类型 | 默认值 | 描述 |
|
|
95
|
+
|------|------|--------|------|
|
|
96
|
+
| `loginUrl` | `string` | **必填** | 登录接口地址 |
|
|
97
|
+
| `logoutUrl` | `string` | - | 登出接口地址 |
|
|
98
|
+
| `userUrl` | `string` | - | 获取当前用户信息接口地址 |
|
|
99
|
+
| `registerUrl` | `string` | - | 注册接口地址 |
|
|
100
|
+
| `refreshTokenUrl` | `string` | - | Token 刷新接口地址 |
|
|
101
|
+
| `tokenKey` | `string` | `'lyt_token'` | localStorage 中存储 token 的 key |
|
|
102
|
+
| `autoRedirect` | `boolean` | `false` | 未登录时是否自动跳转到登录页 |
|
|
103
|
+
| `loginRoute` | `string` | `'/login'` | 登录页路由路径 |
|
|
104
|
+
| `homeRoute` | `string` | `'/'` | 登录后跳转的路由路径 |
|
|
105
|
+
| `onLoginSuccess` | `(user: any) => void` | - | 登录成功回调 |
|
|
106
|
+
| `onLoginError` | `(error: Error) => void` | - | 登录失败回调 |
|
|
107
|
+
| `onLogout` | `() => void` | - | 登出回调 |
|
|
108
|
+
| `onUnauthorized` | `() => void` | - | 未授权回调(401 等) |
|
|
109
|
+
| `onTokenRefreshed` | `(newToken: string) => void` | - | Token 刷新成功回调 |
|
|
110
|
+
| `onTokenRefreshError` | `(error: Error) => void` | - | Token 刷新失败回调 |
|
|
111
|
+
|
|
112
|
+
### 属性
|
|
113
|
+
|
|
114
|
+
| 属性 | 类型 | 描述 |
|
|
115
|
+
|------|------|------|
|
|
116
|
+
| `user` | `AuthUser \| null` | 当前用户信息 |
|
|
117
|
+
| `isAuthenticated` | `boolean` | 是否已认证 |
|
|
118
|
+
| `token` | `string \| null` | 当前 token |
|
|
119
|
+
| `loading` | `boolean` | 是否正在加载中 |
|
|
120
|
+
|
|
121
|
+
### 方法
|
|
122
|
+
|
|
123
|
+
| 方法 | 签名 | 描述 |
|
|
124
|
+
|------|------|------|
|
|
125
|
+
| `login` | `(credentials: Record<string, unknown>) => Promise<AuthUser>` | 登录,支持多种响应格式自动提取 token |
|
|
126
|
+
| `logout` | `() => Promise<void>` | 登出,清除本地认证状态 |
|
|
127
|
+
| `register` | `(data: Record<string, unknown>) => Promise<AuthUser>` | 注册新用户 |
|
|
128
|
+
| `fetchUser` | `() => Promise<AuthUser>` | 获取当前用户信息 |
|
|
129
|
+
| `getToken` | `() => string \| null` | 获取当前 token |
|
|
130
|
+
| `setToken` | `(token: string) => void` | 设置 token(内存 + localStorage) |
|
|
131
|
+
| `removeToken` | `() => void` | 移除 token(内存 + localStorage) |
|
|
132
|
+
| `hasRole` | `(role: string) => boolean` | 检查用户是否拥有指定角色 |
|
|
133
|
+
| `hasPermission` | `(perm: string) => boolean` | 检查用户是否拥有指定权限 |
|
|
134
|
+
| `refreshToken` | `() => Promise<string \| null>` | 刷新 Token |
|
|
135
|
+
| `setupRouterGuard` | `(router: Record<string, unknown>) => void` | 设置路由守卫,自动检查登录状态 |
|
|
136
|
+
|
|
137
|
+
### 类型
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
interface AuthUser {
|
|
141
|
+
id: string | number
|
|
142
|
+
name: string
|
|
143
|
+
email?: string
|
|
144
|
+
role?: string
|
|
145
|
+
[key: string]: unknown
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## License
|
|
150
|
+
|
|
151
|
+
MIT
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
"use strict";var p=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var D=(s,t)=>{for(var o in t)p(s,o,{get:t[o],enumerable:!0})},F=(s,t,o,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of C(t))!H.call(s,a)&&a!==o&&p(s,a,{get:()=>t[a],enumerable:!(u=j(t,a))||u.enumerable});return s};var M=s=>F(p({},"__esModule",{value:!0}),s);var W={};D(W,{createAuth:()=>V});module.exports=M(W);async function O(s,t={}){let o=await fetch(s,{headers:{"Content-Type":"application/json",...t.headers},...t});if(!o.ok){let a=await o.text().catch(()=>"\u8BF7\u6C42\u5931\u8D25");throw new Error(`HTTP ${o.status}: ${a}`)}let u=await o.text();if(!u)return null;try{return JSON.parse(u)}catch(a){return u}}async function Q(s,t){let o={};return t&&(o.Authorization=`Bearer ${t}`),O(s,{method:"GET",headers:o})}async function h(s,t,o){let u={};return o&&(u.Authorization=`Bearer ${o}`),O(s,{method:"POST",headers:u,body:JSON.stringify(t)})}function V(s){let{loginUrl:t,logoutUrl:o,userUrl:u,registerUrl:a,refreshTokenUrl:A,tokenKey:y="lyt_token",autoRedirect:q=!1,loginRoute:w="/login",homeRoute:I="/",onLoginSuccess:T,onLoginError:P,onLogout:v,onUnauthorized:U,onTokenRefreshed:R,onTokenRefreshError:b}=s,i=null,c=null,f=!1;try{let r=localStorage.getItem(y);r&&(c=r)}catch(r){}function E(){return!!c}function _(){return c}function d(r){c=r;try{localStorage.setItem(y,r)}catch(n){}}function k(){c=null;try{localStorage.removeItem(y)}catch(r){}}async function L(){if(!u)return i;f=!0;try{return i=await Q(u,c),i}catch(r){throw i=null,r}finally{f=!1}}async function $(r){var n,l;f=!0;try{let e=await h(t,r,null),g=(e==null?void 0:e.token)||(e==null?void 0:e.access_token)||((n=e==null?void 0:e.data)==null?void 0:n.token)||null;return g&&d(g),u?await L():(e!=null&&e.user||(l=e==null?void 0:e.data)!=null&&l.user)&&(i=e.user||e.data.user),T&&T(i),{user:i,token:g}}catch(e){throw P&&e instanceof Error&&P(e),e}finally{f=!1}}async function z(){f=!0;try{if(o&&c)try{await h(o,{},c)}catch(n){}let r=i;k(),i=null,v&&v()}finally{f=!1}}async function x(r){if(!a)throw new Error("\u672A\u914D\u7F6E registerUrl\uFF0C\u65E0\u6CD5\u6CE8\u518C");f=!0;try{return await h(a,r,null)}finally{f=!1}}async function G(){var r;if(!A)throw new Error("\u672A\u914D\u7F6E refreshTokenUrl\uFF0C\u65E0\u6CD5\u5237\u65B0 Token");if(!c)return null;f=!0;try{let n=await h(A,{},c),l=(n==null?void 0:n.token)||(n==null?void 0:n.access_token)||((r=n==null?void 0:n.data)==null?void 0:r.token)||null;return l&&(d(l),R&&R(l)),l}catch(n){throw b&&n instanceof Error&&b(n),k(),i=null,n}finally{f=!1}}function B(r){if(!i)return!1;let n=i.roles||i.role||[];return Array.isArray(n)?n.includes(r):typeof n=="string"?n.split(",").map(l=>l.trim()).includes(r):!1}function J(r){if(!i)return!1;let n=i.permissions||i.perms||[];return Array.isArray(n)?n.includes(r):typeof n=="string"?n.split(",").map(l=>l.trim()).includes(r):!1}function K(r){!r||typeof r.beforeEach!="function"||r.beforeEach((n,l,e)=>{var S;let g=((S=n.meta)==null?void 0:S.requiresAuth)!==!1,N=n.path===w;if(E()){if(N){e(I);return}e();return}if(g&&q){e({path:w,query:{redirect:n.fullPath}});return}g&&U&&U(),e()})}let m={install(r,n){r.config=r.config||{},r.config.globalProperties=r.config.globalProperties||{},r.config.globalProperties.$auth=m,typeof r.provide=="function"&&r.provide("auth",m)},get user(){return i},get isAuthenticated(){return E()},get token(){return c},get loading(){return f},login:$,logout:z,register:x,fetchUser:L,getToken:_,setToken:d,removeToken:k,hasRole:B,hasPermission:J,refreshToken:G,setupRouterGuard:K};return m}
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
async function S(c,a={}){let o=await fetch(c,{headers:{"Content-Type":"application/json",...a.headers},...a});if(!o.ok){let g=await o.text().catch(()=>"\u8BF7\u6C42\u5931\u8D25");throw new Error(`HTTP ${o.status}: ${g}`)}let
|
|
1
|
+
async function S(c,a={}){let o=await fetch(c,{headers:{"Content-Type":"application/json",...a.headers},...a});if(!o.ok){let g=await o.text().catch(()=>"\u8BF7\u6C42\u5931\u8D25");throw new Error(`HTTP ${o.status}: ${g}`)}let l=await o.text();if(!l)return null;try{return JSON.parse(l)}catch(g){return l}}async function N(c,a){let o={};return a&&(o.Authorization=`Bearer ${a}`),S(c,{method:"GET",headers:o})}async function h(c,a,o){let l={};return o&&(l.Authorization=`Bearer ${o}`),S(c,{method:"POST",headers:l,body:JSON.stringify(a)})}function j(c){let{loginUrl:a,logoutUrl:o,userUrl:l,registerUrl:g,refreshTokenUrl:p,tokenKey:y="lyt_token",autoRedirect:O=!1,loginRoute:A="/login",homeRoute:q="/",onLoginSuccess:w,onLoginError:T,onLogout:P,onUnauthorized:v,onTokenRefreshed:U,onTokenRefreshError:R}=c,t=null,s=null,u=!1;try{let r=localStorage.getItem(y);r&&(s=r)}catch(r){}function b(){return!!s}function I(){return s}function d(r){s=r;try{localStorage.setItem(y,r)}catch(n){}}function k(){s=null;try{localStorage.removeItem(y)}catch(r){}}async function E(){if(!l)return t;u=!0;try{return t=await N(l,s),t}catch(r){throw t=null,r}finally{u=!1}}async function _(r){var n,i;u=!0;try{let e=await h(a,r,null),f=(e==null?void 0:e.token)||(e==null?void 0:e.access_token)||((n=e==null?void 0:e.data)==null?void 0:n.token)||null;return f&&d(f),l?await E():(e!=null&&e.user||(i=e==null?void 0:e.data)!=null&&i.user)&&(t=e.user||e.data.user),w&&w(t),{user:t,token:f}}catch(e){throw T&&e instanceof Error&&T(e),e}finally{u=!1}}async function $(){u=!0;try{if(o&&s)try{await h(o,{},s)}catch(n){}let r=t;k(),t=null,P&&P()}finally{u=!1}}async function z(r){if(!g)throw new Error("\u672A\u914D\u7F6E registerUrl\uFF0C\u65E0\u6CD5\u6CE8\u518C");u=!0;try{return await h(g,r,null)}finally{u=!1}}async function x(){var r;if(!p)throw new Error("\u672A\u914D\u7F6E refreshTokenUrl\uFF0C\u65E0\u6CD5\u5237\u65B0 Token");if(!s)return null;u=!0;try{let n=await h(p,{},s),i=(n==null?void 0:n.token)||(n==null?void 0:n.access_token)||((r=n==null?void 0:n.data)==null?void 0:r.token)||null;return i&&(d(i),U&&U(i)),i}catch(n){throw R&&n instanceof Error&&R(n),k(),t=null,n}finally{u=!1}}function G(r){if(!t)return!1;let n=t.roles||t.role||[];return Array.isArray(n)?n.includes(r):typeof n=="string"?n.split(",").map(i=>i.trim()).includes(r):!1}function B(r){if(!t)return!1;let n=t.permissions||t.perms||[];return Array.isArray(n)?n.includes(r):typeof n=="string"?n.split(",").map(i=>i.trim()).includes(r):!1}function J(r){!r||typeof r.beforeEach!="function"||r.beforeEach((n,i,e)=>{var L;let f=((L=n.meta)==null?void 0:L.requiresAuth)!==!1,K=n.path===A;if(b()){if(K){e(q);return}e();return}if(f&&O){e({path:A,query:{redirect:n.fullPath}});return}f&&v&&v(),e()})}let m={install(r,n){r.config=r.config||{},r.config.globalProperties=r.config.globalProperties||{},r.config.globalProperties.$auth=m,typeof r.provide=="function"&&r.provide("auth",m)},get user(){return t},get isAuthenticated(){return b()},get token(){return s},get loading(){return u},login:_,logout:$,register:z,fetchUser:E,getToken:I,setToken:d,removeToken:k,hasRole:G,hasPermission:B,refreshToken:x,setupRouterGuard:J};return m}export{j as createAuth};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -31,12 +31,25 @@ interface AuthOptions {
|
|
|
31
31
|
/** Token 刷新失败回调 */
|
|
32
32
|
onTokenRefreshError?: (error: Error) => void;
|
|
33
33
|
}
|
|
34
|
+
/** 认证插件应用接口(最小化) */
|
|
35
|
+
interface AuthPluginApp {
|
|
36
|
+
use(plugin: unknown, options?: unknown): void;
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
}
|
|
39
|
+
/** 认证用户信息 */
|
|
40
|
+
interface AuthUser {
|
|
41
|
+
id: string | number;
|
|
42
|
+
name: string;
|
|
43
|
+
email?: string;
|
|
44
|
+
role?: string;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
34
47
|
/** 认证插件实例 */
|
|
35
48
|
interface Auth {
|
|
36
49
|
/** 安装到 Lyt 应用 */
|
|
37
|
-
install: (app:
|
|
50
|
+
install: (app: AuthPluginApp, options?: AuthOptions) => void;
|
|
38
51
|
/** 当前用户信息 */
|
|
39
|
-
user:
|
|
52
|
+
user: AuthUser | null;
|
|
40
53
|
/** 是否已认证 */
|
|
41
54
|
isAuthenticated: boolean;
|
|
42
55
|
/** 当前 token */
|
|
@@ -44,13 +57,13 @@ interface Auth {
|
|
|
44
57
|
/** 是否正在加载中 */
|
|
45
58
|
loading: boolean;
|
|
46
59
|
/** 登录 */
|
|
47
|
-
login(credentials: Record<string,
|
|
60
|
+
login(credentials: Record<string, unknown>): Promise<AuthUser>;
|
|
48
61
|
/** 登出 */
|
|
49
62
|
logout(): Promise<void>;
|
|
50
63
|
/** 注册 */
|
|
51
|
-
register(data: Record<string,
|
|
64
|
+
register(data: Record<string, unknown>): Promise<AuthUser>;
|
|
52
65
|
/** 获取当前用户信息 */
|
|
53
|
-
fetchUser(): Promise<
|
|
66
|
+
fetchUser(): Promise<AuthUser>;
|
|
54
67
|
/** 获取 token */
|
|
55
68
|
getToken(): string | null;
|
|
56
69
|
/** 设置 token */
|
|
@@ -64,7 +77,7 @@ interface Auth {
|
|
|
64
77
|
/** 刷新 Token */
|
|
65
78
|
refreshToken(): Promise<string | null>;
|
|
66
79
|
/** 设置路由守卫,自动检查登录状态 */
|
|
67
|
-
setupRouterGuard(router:
|
|
80
|
+
setupRouterGuard(router: Record<string, unknown>): void;
|
|
68
81
|
}
|
|
69
82
|
/**
|
|
70
83
|
* 创建认证授权插件实例
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAsBA,aAAa;AACb,UAAU,WAAW;IACnB,aAAa;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mBAAmB;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mBAAmB;IACnB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,qBAAqB;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,cAAc;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa;IACb,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAA;IACpC,aAAa;IACb,YAAY,CAAC,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AA;IAC9B,eAAe;IACf,QAAQ,IAAI,MAAM,GAAG,IAAI,CAAA;IACzB,eAAe;IACf,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,eAAe;IACf,WAAW,IAAI,IAAI,CAAA;IACnB,mBAAmB;IACnB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9B,mBAAmB;IACnB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IACpC,eAAe;IACf,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACtC,sBAAsB;IACtB,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CACxD;AA+DD;;;;GAIG;AACH,iBAAS,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAsU9C;AAED,OAAO,EAAE,UAAU,EAAE,CAAA;AACrB,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"fileNames":["../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/lib/lib.es2022.full.d.ts","../src/index.ts"],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","signature":false,"impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","signature":false,"impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","signature":false,"impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","signature":false,"impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","signature":false,"impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","signature":false,"impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","signature":false,"impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","signature":false,"impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","signature":false,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","signature":false,"impliedFormat":1},{"version":"2a2de5b9459b3fc44decd9ce6100b72f1b002ef523126c1d3d8b2a4a63d74d78","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"f13f4b465c99041e912db5c44129a94588e1aafee35a50eab51044833f50b4ee","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"01a30f9e8582b369075c0808df71121e6855cb06fd8d3d39511d9ebb66405205","signature":false,"impliedFormat":1},{"version":"80a521cc8d9a9a91b2ffb0c4f7abcc4dc6d753b78ab2c16c68d5fd5344f1b084","signature":false}],"root":[64],"options":{"allowImportingTsExtensions":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"module":99,"noEmitOnError":false,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noImplicitReturns":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./types","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"useDefineForClassFields":true,"verbatimModuleSyntax":true},"changeFileSet":[61,62,12,10,11,16,15,2,17,18,19,20,21,22,23,24,3,25,26,4,27,31,28,29,30,32,33,34,5,35,36,37,38,6,42,39,40,41,43,7,44,49,50,45,46,47,48,8,54,51,52,53,55,9,56,63,57,58,60,59,1,14,13,64],"version":"6.0.2"}
|