feat: 更新版本至 0.0.52,升级依赖 @kevisual/query 至 0.0.47 和 @kevisual/router 至 0.0.75,移除不必要的 setBaseResponse 调用
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kevisual/api",
|
"name": "@kevisual/api",
|
||||||
"version": "0.0.51",
|
"version": "0.0.52",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "mod.ts",
|
"main": "mod.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -18,14 +18,14 @@
|
|||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
|
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"packageManager": "pnpm@10.29.3",
|
"packageManager": "pnpm@10.30.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@kevisual/cache": "^0.0.5",
|
"@kevisual/cache": "^0.0.5",
|
||||||
"@kevisual/code-builder": "^0.0.6",
|
"@kevisual/code-builder": "^0.0.6",
|
||||||
"@kevisual/query": "^0.0.40",
|
"@kevisual/query": "^0.0.47",
|
||||||
"@kevisual/remote-app": "^0.0.4",
|
"@kevisual/remote-app": "^0.0.4",
|
||||||
"@kevisual/router": "^0.0.70",
|
"@kevisual/router": "^0.0.75",
|
||||||
"@kevisual/types": "^0.0.12",
|
"@kevisual/types": "^0.0.12",
|
||||||
"@kevisual/use-config": "^1.0.30",
|
"@kevisual/use-config": "^1.0.30",
|
||||||
"@types/bun": "^1.3.9",
|
"@types/bun": "^1.3.9",
|
||||||
|
|||||||
27
pnpm-lock.yaml
generated
27
pnpm-lock.yaml
generated
@@ -52,14 +52,14 @@ importers:
|
|||||||
specifier: ^0.0.6
|
specifier: ^0.0.6
|
||||||
version: 0.0.6
|
version: 0.0.6
|
||||||
'@kevisual/query':
|
'@kevisual/query':
|
||||||
specifier: ^0.0.40
|
specifier: ^0.0.47
|
||||||
version: 0.0.40
|
version: 0.0.47
|
||||||
'@kevisual/remote-app':
|
'@kevisual/remote-app':
|
||||||
specifier: ^0.0.4
|
specifier: ^0.0.4
|
||||||
version: 0.0.4
|
version: 0.0.4
|
||||||
'@kevisual/router':
|
'@kevisual/router':
|
||||||
specifier: ^0.0.70
|
specifier: ^0.0.75
|
||||||
version: 0.0.70
|
version: 0.0.75
|
||||||
'@kevisual/types':
|
'@kevisual/types':
|
||||||
specifier: ^0.0.12
|
specifier: ^0.0.12
|
||||||
version: 0.0.12
|
version: 0.0.12
|
||||||
@@ -126,8 +126,8 @@ packages:
|
|||||||
'@kevisual/query@0.0.18':
|
'@kevisual/query@0.0.18':
|
||||||
resolution: {integrity: sha512-I2vHTu0I6AyD9PJyr+vxyp9jIJ6rd2EZqLVHTv/+zrVKVc2SS76Tg7aGNkmAFqqLSCB8kLLsmMGtSJU1Qb8VVg==}
|
resolution: {integrity: sha512-I2vHTu0I6AyD9PJyr+vxyp9jIJ6rd2EZqLVHTv/+zrVKVc2SS76Tg7aGNkmAFqqLSCB8kLLsmMGtSJU1Qb8VVg==}
|
||||||
|
|
||||||
'@kevisual/query@0.0.40':
|
'@kevisual/query@0.0.47':
|
||||||
resolution: {integrity: sha512-7m5BgDzd01m51hCHUId6ugQHdwgrLTb6fI7DSuMY17VjWb0+zGnkYmvRBqkTXzoIjjYbP5iwtRnrooEoToQfhg==}
|
resolution: {integrity: sha512-ZR7WXeDDGUSzBtcGVU3J173sA0hCqrGTw5ybGbdNGlM0VyJV/XQIovCcSoZh1YpnciLRRqJvzXUgTnCkam+M3g==}
|
||||||
|
|
||||||
'@kevisual/remote-app@0.0.4':
|
'@kevisual/remote-app@0.0.4':
|
||||||
resolution: {integrity: sha512-2yIlWY98pLCcxG+DJsqXXkd5YYEgymuOsyElH+31AoEPb7mlNREnYS81zN0KM9nvdSmU2G51vV4UVirJlYBZCQ==}
|
resolution: {integrity: sha512-2yIlWY98pLCcxG+DJsqXXkd5YYEgymuOsyElH+31AoEPb7mlNREnYS81zN0KM9nvdSmU2G51vV4UVirJlYBZCQ==}
|
||||||
@@ -135,8 +135,8 @@ packages:
|
|||||||
'@kevisual/router@0.0.20':
|
'@kevisual/router@0.0.20':
|
||||||
resolution: {integrity: sha512-uSwDYWh+kvAu6i0m0SJVgcLR/CYz7WvIWGz0nSF8Vg6smJuAgI+laHR4ESO8Fbz+Xn8bPHuSwmM//HHLMLx2FA==}
|
resolution: {integrity: sha512-uSwDYWh+kvAu6i0m0SJVgcLR/CYz7WvIWGz0nSF8Vg6smJuAgI+laHR4ESO8Fbz+Xn8bPHuSwmM//HHLMLx2FA==}
|
||||||
|
|
||||||
'@kevisual/router@0.0.70':
|
'@kevisual/router@0.0.75':
|
||||||
resolution: {integrity: sha512-vXlIj9jRufhcIfeuPWemjSI+dxdzSmIBq5eRxQzqEfAJ7k+mBPhoI4KxH8vHnwyL30bqm8EdODL/p6Wg8uBw3g==}
|
resolution: {integrity: sha512-WBDRKMjNYTP7ymkUUtiQwWYIcqnc+TGo3rFuRze8ovYV2UN5cQxIkIfsDbgWOdV1/v9b57gtiJvJRqWjCBWKRg==}
|
||||||
|
|
||||||
'@kevisual/types@0.0.10':
|
'@kevisual/types@0.0.10':
|
||||||
resolution: {integrity: sha512-Q73uzzjk9UidumnmCvOpgzqDDvQxsblz22bIFuoiioUFJWwaparx8bpd8ArRyFojicYL1YJoFDzDZ9j9NN8grA==}
|
resolution: {integrity: sha512-Q73uzzjk9UidumnmCvOpgzqDDvQxsblz22bIFuoiioUFJWwaparx8bpd8ArRyFojicYL1YJoFDzDZ9j9NN8grA==}
|
||||||
@@ -454,9 +454,6 @@ packages:
|
|||||||
tr46@0.0.3:
|
tr46@0.0.3:
|
||||||
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
|
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
|
||||||
|
|
||||||
tslib@2.8.1:
|
|
||||||
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
|
|
||||||
|
|
||||||
undici-types@5.26.5:
|
undici-types@5.26.5:
|
||||||
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
|
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
|
||||||
|
|
||||||
@@ -520,9 +517,7 @@ snapshots:
|
|||||||
- ws
|
- ws
|
||||||
- zod
|
- zod
|
||||||
|
|
||||||
'@kevisual/query@0.0.40':
|
'@kevisual/query@0.0.47': {}
|
||||||
dependencies:
|
|
||||||
tslib: 2.8.1
|
|
||||||
|
|
||||||
'@kevisual/remote-app@0.0.4': {}
|
'@kevisual/remote-app@0.0.4': {}
|
||||||
|
|
||||||
@@ -531,7 +526,7 @@ snapshots:
|
|||||||
path-to-regexp: 8.2.0
|
path-to-regexp: 8.2.0
|
||||||
selfsigned: 2.4.1
|
selfsigned: 2.4.1
|
||||||
|
|
||||||
'@kevisual/router@0.0.70':
|
'@kevisual/router@0.0.75':
|
||||||
dependencies:
|
dependencies:
|
||||||
es-toolkit: 1.44.0
|
es-toolkit: 1.44.0
|
||||||
|
|
||||||
@@ -819,8 +814,6 @@ snapshots:
|
|||||||
|
|
||||||
tr46@0.0.3: {}
|
tr46@0.0.3: {}
|
||||||
|
|
||||||
tslib@2.8.1: {}
|
|
||||||
|
|
||||||
undici-types@5.26.5: {}
|
undici-types@5.26.5: {}
|
||||||
|
|
||||||
undici-types@6.21.0: {}
|
undici-types@6.21.0: {}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Query, BaseQuery } from '@kevisual/query';
|
import { Query, BaseQuery } from '@kevisual/query';
|
||||||
import type { Result, DataOpts } from '@kevisual/query/query';
|
import type { Result, DataOpts } from '@kevisual/query/query';
|
||||||
import { setBaseResponse } from '@kevisual/query/query';
|
|
||||||
import { LoginCacheStore, CacheStore } from './login-cache.ts';
|
import { LoginCacheStore, CacheStore } from './login-cache.ts';
|
||||||
import { Cache } from './login-cache.ts';
|
import { Cache } from './login-cache.ts';
|
||||||
import { BaseLoad } from '@kevisual/load';
|
import { BaseLoad } from '@kevisual/load';
|
||||||
@@ -166,7 +165,6 @@ export class QueryLogin extends BaseQuery {
|
|||||||
{ key: 'refreshToken', data },
|
{ key: 'refreshToken', data },
|
||||||
{
|
{
|
||||||
afterResponse: async (response, ctx) => {
|
afterResponse: async (response, ctx) => {
|
||||||
setBaseResponse(response);
|
|
||||||
return response as any;
|
return response as any;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -200,7 +198,6 @@ export class QueryLogin extends BaseQuery {
|
|||||||
body: body,
|
body: body,
|
||||||
headers: { ...headers, Authorization: `Bearer ${accessToken}` },
|
headers: { ...headers, Authorization: `Bearer ${accessToken}` },
|
||||||
});
|
});
|
||||||
setBaseResponse(res);
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export const initApi = async (opts: {
|
|||||||
metadata: metadata,
|
metadata: metadata,
|
||||||
}).define(async (ctx) => {
|
}).define(async (ctx) => {
|
||||||
const msg = { ...ctx.query };
|
const msg = { ...ctx.query };
|
||||||
if (msg.token === undefined && token !== undefined) {
|
if (msg.token === undefined && token !== undefined && !_isBrowser) {
|
||||||
msg.token = token;
|
msg.token = token;
|
||||||
}
|
}
|
||||||
const res = await query.post<any>({ path: r.path, key: r.key, ...msg });
|
const res = await query.post<any>({ path: r.path, key: r.key, ...msg });
|
||||||
|
|||||||
Reference in New Issue
Block a user