feat(packages): add @sa/alova to example

This commit is contained in:
子殊 2024-09-24 16:20:09 +08:00
commit e9552e476d
7 changed files with 273 additions and 180 deletions

View File

@ -0,0 +1,16 @@
{
"name": "@sa/alova",
"version": "0.1.0",
"exports": {
".": "./src/index.ts"
},
"typesVersions": {
"*": {
"*": ["./src/*"]
}
},
"dependencies": {
"@sa/utils": "workspace:*",
"alova": "^3.0.16"
}
}

View File

@ -0,0 +1,5 @@
/** request id key */
export const REQUEST_ID_KEY = 'X-Request-Id';
/** the backend error code key */
export const BACKEND_ERROR_CODE = 'BACKEND_ERROR';

View File

@ -0,0 +1,86 @@
import { createAlova } from 'alova';
import VueHook from 'alova/vue';
import adapterFetch from 'alova/fetch';
import { createServerTokenAuthentication } from 'alova/client';
import { BACKEND_ERROR_CODE, REQUEST_ID_KEY } from './constant';
import { isJSON } from './shared';
import type { CustomAlovaConfig, RequestOptions } from './type';
export const createAlovaRequest = (customConfig: CustomAlovaConfig<any>, options: RequestOptions<any>) => {
const { onAuthRequired, onResponseRefreshToken } = createServerTokenAuthentication({
refreshTokenOnSuccess: {
isExpired: async response => {
const contentType = response.headers.get('Content-Type');
if (isJSON(contentType ?? '')) {
const resp = response.clone();
const data = await resp.json();
const responseCode = String(data.code);
if (customConfig.expiredTokenCodes.includes(responseCode)) {
return true;
}
}
return false;
},
handler: async () => {
if (options.refreshTokenHandler) {
await options.refreshTokenHandler();
}
}
},
refreshTokenOnError: {
isExpired: async response => {
const contentType = response.headers.get('Content-Type');
if (isJSON(contentType ?? '')) {
const resp = response.clone();
const data = await resp.json();
const responseCode = String(data.code);
if (customConfig.expiredTokenCodes.includes(responseCode)) {
return true;
}
}
return false;
},
handler: async () => {
if (options.refreshTokenHandler) {
await options.refreshTokenHandler();
}
}
}
});
const instance = createAlova({
...customConfig,
timeout: customConfig.timeout ?? 10 * 1000,
requestAdapter: customConfig.requestAdapter ?? adapterFetch(),
statesHook: VueHook,
beforeRequest: onAuthRequired(options.onRequest),
responded: onResponseRefreshToken({
onSuccess: async resp => {
// check if http status is success
if (resp.ok || resp.status === 304) {
if (
!isJSON(resp.headers.get('Content-Type') ?? '') ||
(options.isBackendSuccess && (await options.isBackendSuccess(resp)))
) {
return resp;
}
if (options.onBackendFail) {
const fail = await options.onBackendFail(resp);
if (fail) {
return fail;
}
}
return options.transformBackendResponse ? await options.transformBackendResponse(resp) : resp;
}
throw new Error(resp.statusText);
},
onComplete: options.onComplete,
onError: options.onError
})
});
return instance;
};
export { BACKEND_ERROR_CODE, REQUEST_ID_KEY };
export type * from './type';

View File

@ -0,0 +1,3 @@
export function isJSON(contentType: string) {
return contentType.includes('application/json');
}

View File

@ -0,0 +1,64 @@
import type {
AlovaGenerics,
AlovaOptions,
AlovaRequestAdapter,
Method,
ResponseCompleteHandler,
ResponseErrorHandler
} from 'alova';
export type CustomAlovaConfig<AG extends AlovaGenerics> = Omit<
AlovaOptions<AG>,
'statesHook' | 'beforeRequest' | 'responded' | 'requestAdapter'
> & {
/** expired token codes */
expiredTokenCodes: string[];
/** request adapter. all request of alova will be sent by it. */
requestAdapter?: AlovaRequestAdapter<AG['RequestConfig'], AG['Response'], AG['ResponseHeader']>;
};
export interface RequestOptions<AG extends AlovaGenerics> {
/**
* The hook before request
*
* For example: You can add header token in this hook
*
* @param method alova Method Instance
*/
onRequest?: (method: Method<AG>) => void | Promise<void>;
/**
* The hook to check backend response is success or not
*
* @param response Axios response
*/
isBackendSuccess?: (response: Response) => Promise<boolean>;
/** The hook to refresh token */
refreshTokenHandler?: () => Promise<void>;
/**
* The hook after backend request fail
*
* For example: You can handle the expired token in this hook
*
* @param response Axios response
* @param instance Axios instance
*/
onBackendFail?: (response: Response) => Promise<Response | null> | Promise<void>;
onComplete?: ResponseCompleteHandler<AG>;
/**
* The hook to handle error
*
* For example: You can show error message in this hook
*
* @param error
*/
onError?: ResponseErrorHandler<AG>;
/**
* transform backend response when the responseType is json
*
* @param response Axios response
*/
transformBackendResponse?: (response: AG['Response']) => any | Promise<any>;
}

View File

@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "ESNext",
"jsx": "preserve",
"lib": ["DOM", "ESNext"],
"baseUrl": ".",
"module": "ESNext",
"moduleResolution": "node",
"resolveJsonModule": true,
"types": ["node"],
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}

View File

@ -337,9 +337,6 @@ packages:
resolution: {integrity: sha512-LvxY21+ZhpuBf/aHeBUtGQhSEfad4PkNKXKvDOSvukaM3XVTfBhwmHX2EKwAsdq5DlfjbT3qqYyMiueBIO5iDQ==}
engines: {node: '>=18.0.0', npm: '>=9.0.0', pnpm: '>= 8.6.0'}
'@antfu/install-pkg@0.3.3':
resolution: {integrity: sha512-nHHsk3NXQ6xkCfiRRC8Nfrg8pU5kkr3P3Y9s9dKqiuRmBD0Yap7fymNDjGFKeWhZQHqqbCS5CfeMy9wtExM24w==}
'@antfu/install-pkg@0.4.1':
resolution: {integrity: sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw==}
@ -884,6 +881,10 @@ packages:
resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
'@eslint/compat@1.1.1':
resolution: {integrity: sha512-lpHyRyplhGPL5mGEh6M9O5nnKk0Gz4bFI+Zu6tKlPpDUN7XshWvH9C/px4UVm87IAANE0W81CEsNGbS1KlzXpA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/config-array@0.18.0':
resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -896,10 +897,6 @@ packages:
resolution: {integrity: sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/js@9.8.0':
resolution: {integrity: sha512-MfluB7EUfxXtv3i/++oh89uzAr4PDI4nn201hsp+qaXqsjAWzinlZEHEfPgAX4doIlKvPG/i0A9dpKxOLII8yA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/object-schema@2.1.4':
resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -1115,8 +1112,8 @@ packages:
resolution: {integrity: sha512-QQVDFOsAdrYkyE5eEXuwtEi3poIOptkZhA0NxV2dfZoU3ChfFo0pkkuDplgpXaZvx09Omu2i04fdNKxFftAC3w==}
engines: {node: '>=16', pnpm: '>=9'}
'@soybeanjs/eslint-config@1.4.0':
resolution: {integrity: sha512-4GT/4yk6ATLW9CBKJkwXWykaVLsWBp+lOlNWVuHeFmOlywfngWETlBcyTk7cwkKlRqCDAzN1i4hDrokJqfqncA==}
'@soybeanjs/eslint-config@1.4.1':
resolution: {integrity: sha512-FztmV23UsvFYiZD1JiDeAzw8o1UoM1WX7/HYSXxrR9eZWswQYZjuwa3n8exWfYsXm6jAjm7AckeWpXuinSLj/g==}
peerDependencies:
'@toml-tools/parser': '*'
'@unocss/eslint-config': '>=0.58.0'
@ -1231,62 +1228,44 @@ packages:
'@types/web-bluetooth@0.0.20':
resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==}
'@typescript-eslint/eslint-plugin@7.18.0':
resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==}
engines: {node: ^18.18.0 || >=20.0.0}
'@typescript-eslint/eslint-plugin@8.4.0':
resolution: {integrity: sha512-rg8LGdv7ri3oAlenMACk9e+AR4wUV0yrrG+XKsGKOK0EVgeEDqurkXMPILG2836fW4ibokTB5v4b6Z9+GYQDEw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
'@typescript-eslint/parser': ^7.0.0
eslint: ^8.56.0
'@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0
eslint: ^8.57.0 || ^9.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
'@typescript-eslint/parser@7.18.0':
resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==}
engines: {node: ^18.18.0 || >=20.0.0}
'@typescript-eslint/parser@8.4.0':
resolution: {integrity: sha512-NHgWmKSgJk5K9N16GIhQ4jSobBoJwrmURaLErad0qlLjrpP5bECYg+wxVTGlGZmJbU03jj/dfnb6V9bw+5icsA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.56.0
eslint: ^8.57.0 || ^9.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
'@typescript-eslint/scope-manager@7.18.0':
resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==}
engines: {node: ^18.18.0 || >=20.0.0}
'@typescript-eslint/scope-manager@8.4.0':
resolution: {integrity: sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/type-utils@7.18.0':
resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==}
engines: {node: ^18.18.0 || >=20.0.0}
'@typescript-eslint/type-utils@8.4.0':
resolution: {integrity: sha512-pu2PAmNrl9KX6TtirVOrbLPLwDmASpZhK/XU7WvoKoCUkdtq9zF7qQ7gna0GBZFN0hci0vHaSusiL2WpsQk37A==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.56.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
'@typescript-eslint/types@7.18.0':
resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==}
engines: {node: ^18.18.0 || >=20.0.0}
'@typescript-eslint/types@8.4.0':
resolution: {integrity: sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/typescript-estree@7.18.0':
resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==}
engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
'@typescript-eslint/typescript-estree@8.4.0':
resolution: {integrity: sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -1296,22 +1275,12 @@ packages:
typescript:
optional: true
'@typescript-eslint/utils@7.18.0':
resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==}
engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies:
eslint: ^8.56.0
'@typescript-eslint/utils@8.4.0':
resolution: {integrity: sha512-swULW8n1IKLjRAgciCkTCafyTHHfwVQFt8DovmaF69sKbOxTSFMmIZaSHjqO9i/RV0wIblaawhzvtva8Nmm7lQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
'@typescript-eslint/visitor-keys@7.18.0':
resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==}
engines: {node: ^18.18.0 || >=20.0.0}
'@typescript-eslint/visitor-keys@8.4.0':
resolution: {integrity: sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -1381,14 +1350,14 @@ packages:
vite: ^5.0.0
vue: ^3.2.25
'@volar/language-core@2.4.2':
resolution: {integrity: sha512-sONt5RLvLL1SlBdhyUSthZzuKePbJ7DwFFB9zT0eyWpDl+v7GXGh/RkPxxWaR22bIhYtTzp4Ka1MWatl/53Riw==}
'@volar/language-core@2.4.4':
resolution: {integrity: sha512-kO9k4kTLfxpg+6lq7/KAIv3m2d62IHuCL6GbVgYZTpfKvIGoAIlDxK7pFcB/eczN2+ydg/vnyaeZ6SGyZrJw2w==}
'@volar/source-map@2.4.2':
resolution: {integrity: sha512-qiGfGgeZ5DEarPX3S+HcFktFCjfDrFPCXKeXNbrlB7v8cvtPRm8YVwoXOdGG1NhaL5rMlv5BZPVQyu4EdWWIvA==}
'@volar/source-map@2.4.4':
resolution: {integrity: sha512-xG3PZqOP2haG8XG4Pg3PD1UGDAdqZg24Ru8c/qYjYAnmcj6GBR64mstx+bZux5QOyRaJK+/lNM/RnpvBD3489g==}
'@volar/typescript@2.4.2':
resolution: {integrity: sha512-m2uZduhaHO1SZuagi30OsjI/X1gwkaEAC+9wT/nCNAtJ5FqXEkKvUncHmffG7ESDZPlFFUBK4vJ0D9Hfr+f2EA==}
'@volar/typescript@2.4.4':
resolution: {integrity: sha512-QQMQRVj0fVHJ3XdRKiS1LclhG0VBXdFYlyuHRQF/xLk2PuJuHNWP26MDZNvEVCvnyUQuUQhIAfylwY5TGPgc6w==}
'@vue/babel-helper-vue-transform-on@1.2.4':
resolution: {integrity: sha512-3L9zXWRN2jvmLjtSyw9vtcO5KTSCfKhCD5rEZM+024bc+4dKSzTjIABl/5b+uZ5nXe5y31uUMxxLo1PdXkYaig==}
@ -1571,10 +1540,6 @@ packages:
resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==}
engines: {node: '>= 0.4'}
array-union@2.1.0:
resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==}
engines: {node: '>=8'}
array-unique@0.3.2:
resolution: {integrity: sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==}
engines: {node: '>=0.10.0'}
@ -2365,8 +2330,10 @@ packages:
peerDependencies:
eslint: '>=6.0.0'
eslint-config-flat-gitignore@0.1.8:
resolution: {integrity: sha512-OEUbS2wzzYtUfshjOqzFo4Bl4lHykXUdM08TCnYNl7ki+niW4Q1R0j0FDFDr0vjVsI5ZFOz5LvluxOP+Ew+dYw==}
eslint-config-flat-gitignore@0.3.0:
resolution: {integrity: sha512-0Ndxo4qGhcewjTzw52TK06Mc00aDtHNTdeeW2JfONgDcLkRO/n/BteMRzNVpLQYxdCC/dFEilfM9fjjpGIJ9Og==}
peerDependencies:
eslint: ^9.5.0
eslint-config-prettier@9.1.0:
resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==}
@ -2386,14 +2353,14 @@ packages:
peerDependencies:
eslint: '>=8'
eslint-plugin-import-x@3.1.0:
resolution: {integrity: sha512-/UbPA+bYY7nIxcjL3kpcDY3UNdoLHFhyBFzHox2M0ypcUoueTn6woZUUmzzi5et/dXChksasYYFeKE2wshOrhg==}
engines: {node: '>=16'}
eslint-plugin-import-x@4.2.1:
resolution: {integrity: sha512-WWi2GedccIJa0zXxx3WDnTgouGQTtdYK1nhXMwywbqqAgB0Ov+p1pYBsWh3VaB0bvBOwLse6OfVII7jZD9xo5Q==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.56.0 || ^9.0.0-0
eslint: ^8.57.0 || ^9.0.0
eslint-plugin-n@17.10.1:
resolution: {integrity: sha512-hm/q37W6efDptJXdwirsm6A257iY6ZNtpoSG0wEzFzjJ3AhL7OhEIhdSR2e4OdYfHO5EDeqlCfFrjf9q208IPw==}
eslint-plugin-n@17.10.2:
resolution: {integrity: sha512-e+s4eAf5NtJaxPhTNu3qMO0Iz40WANS93w9LQgYcvuljgvDmWi/a3rh+OrNyMHeng6aOWGJO0rCg5lH4zi8yTw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: '>=8.23.0'
@ -2747,18 +2714,14 @@ packages:
resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==}
engines: {node: '>=18'}
globals@15.8.0:
resolution: {integrity: sha512-VZAJ4cewHTExBWDHR6yptdIBlx9YSSZuwojj9Nt5mBRXQzrKakDsVKQ1J63sklLvzAJm0X5+RpO4i3Y2hcOnFw==}
globals@15.9.0:
resolution: {integrity: sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==}
engines: {node: '>=18'}
globalthis@1.0.4:
resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==}
engines: {node: '>= 0.4'}
globby@11.1.0:
resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==}
engines: {node: '>=10'}
good-listener@1.2.2:
resolution: {integrity: sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==}
@ -3705,10 +3668,6 @@ packages:
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
engines: {node: '>=6'}
parse-gitignore@2.0.0:
resolution: {integrity: sha512-RmVuCHWsfu0QPNW+mraxh/xjQVw/lhUCUru8Zni3Ctq3AoMhpDTq0OVdKS6iesd6Kqb7viCV3isAL43dciOSog==}
engines: {node: '>=14'}
parse-json@5.2.0:
resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==}
engines: {node: '>=8'}
@ -4185,10 +4144,6 @@ packages:
sisteransi@1.0.5:
resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}
slash@3.0.0:
resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
engines: {node: '>=8'}
slice-ansi@5.0.0:
resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==}
engines: {node: '>=12'}
@ -4921,10 +4876,6 @@ snapshots:
'@antfu/eslint-define-config@1.23.0-2': {}
'@antfu/install-pkg@0.3.3':
dependencies:
'@jsdevtools/ez-spawn': 3.0.4
'@antfu/install-pkg@0.4.1':
dependencies:
package-manager-detector: 0.2.0
@ -5507,6 +5458,8 @@ snapshots:
'@eslint-community/regexpp@4.11.0': {}
'@eslint/compat@1.1.1': {}
'@eslint/config-array@0.18.0':
dependencies:
'@eslint/object-schema': 2.1.4
@ -5531,8 +5484,6 @@ snapshots:
'@eslint/js@9.10.0': {}
'@eslint/js@9.8.0': {}
'@eslint/object-schema@2.1.4': {}
'@eslint/plugin-kit@0.1.0':
@ -5719,7 +5670,7 @@ snapshots:
'@soybeanjs/changelog@0.3.24(@unocss/eslint-config@0.62.3(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4))(eslint-plugin-vue@9.28.0(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.10.0(jiti@1.21.6)))':
dependencies:
'@soybeanjs/eslint-config': 1.4.0(@unocss/eslint-config@0.62.3(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4))(eslint-plugin-vue@9.28.0(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.10.0(jiti@1.21.6)))
'@soybeanjs/eslint-config': 1.4.1(@unocss/eslint-config@0.62.3(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4))(eslint-plugin-vue@9.28.0(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.10.0(jiti@1.21.6)))
cli-progress: 3.12.0
convert-gitmoji: 0.1.5
dayjs: 1.11.11
@ -5746,23 +5697,23 @@ snapshots:
- typescript
- vue-eslint-parser
'@soybeanjs/eslint-config@1.4.0(@unocss/eslint-config@0.62.3(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4))(eslint-plugin-vue@9.28.0(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.10.0(jiti@1.21.6)))':
'@soybeanjs/eslint-config@1.4.1(@unocss/eslint-config@0.62.3(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4))(eslint-plugin-vue@9.28.0(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.10.0(jiti@1.21.6)))':
dependencies:
'@antfu/eslint-define-config': 1.23.0-2
'@antfu/install-pkg': 0.3.3
'@antfu/install-pkg': 0.4.1
'@eslint/eslintrc': 3.1.0
'@eslint/js': 9.8.0
'@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
'@typescript-eslint/parser': 7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
'@eslint/js': 9.10.0
'@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
'@typescript-eslint/parser': 8.4.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
eslint: 9.10.0(jiti@1.21.6)
eslint-config-flat-gitignore: 0.1.8
eslint-config-flat-gitignore: 0.3.0(eslint@9.10.0(jiti@1.21.6))
eslint-config-prettier: 9.1.0(eslint@9.10.0(jiti@1.21.6))
eslint-parser-plain: 0.1.0
eslint-plugin-import-x: 3.1.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
eslint-plugin-n: 17.10.1(eslint@9.10.0(jiti@1.21.6))
eslint-plugin-import-x: 4.2.1(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
eslint-plugin-n: 17.10.2(eslint@9.10.0(jiti@1.21.6))
eslint-plugin-prettier: 5.2.1(eslint-config-prettier@9.1.0(eslint@9.10.0(jiti@1.21.6)))(eslint@9.10.0(jiti@1.21.6))(prettier@3.3.3)
eslint-plugin-unicorn: 55.0.0(eslint@9.10.0(jiti@1.21.6))
globals: 15.8.0
globals: 15.9.0
local-pkg: 0.5.0
prettier: 3.3.3
prettier-plugin-jsdoc: 1.3.0(prettier@3.3.3)
@ -5833,14 +5784,14 @@ snapshots:
'@types/web-bluetooth@0.0.20': {}
'@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)':
'@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)':
dependencies:
'@eslint-community/regexpp': 4.11.0
'@typescript-eslint/parser': 7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
'@typescript-eslint/scope-manager': 7.18.0
'@typescript-eslint/type-utils': 7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
'@typescript-eslint/utils': 7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
'@typescript-eslint/visitor-keys': 7.18.0
'@typescript-eslint/parser': 8.4.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
'@typescript-eslint/scope-manager': 8.4.0
'@typescript-eslint/type-utils': 8.4.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
'@typescript-eslint/utils': 8.4.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
'@typescript-eslint/visitor-keys': 8.4.0
eslint: 9.10.0(jiti@1.21.6)
graphemer: 1.4.0
ignore: 5.3.2
@ -5851,12 +5802,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/parser@7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)':
'@typescript-eslint/parser@8.4.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)':
dependencies:
'@typescript-eslint/scope-manager': 7.18.0
'@typescript-eslint/types': 7.18.0
'@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4)
'@typescript-eslint/visitor-keys': 7.18.0
'@typescript-eslint/scope-manager': 8.4.0
'@typescript-eslint/types': 8.4.0
'@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4)
'@typescript-eslint/visitor-keys': 8.4.0
debug: 4.3.7
eslint: 9.10.0(jiti@1.21.6)
optionalDependencies:
@ -5864,47 +5815,25 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/scope-manager@7.18.0':
dependencies:
'@typescript-eslint/types': 7.18.0
'@typescript-eslint/visitor-keys': 7.18.0
'@typescript-eslint/scope-manager@8.4.0':
dependencies:
'@typescript-eslint/types': 8.4.0
'@typescript-eslint/visitor-keys': 8.4.0
'@typescript-eslint/type-utils@7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)':
'@typescript-eslint/type-utils@8.4.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)':
dependencies:
'@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4)
'@typescript-eslint/utils': 7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
'@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4)
'@typescript-eslint/utils': 8.4.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
debug: 4.3.7
eslint: 9.10.0(jiti@1.21.6)
ts-api-utils: 1.3.0(typescript@5.5.4)
optionalDependencies:
typescript: 5.5.4
transitivePeerDependencies:
- eslint
- supports-color
'@typescript-eslint/types@7.18.0': {}
'@typescript-eslint/types@8.4.0': {}
'@typescript-eslint/typescript-estree@7.18.0(typescript@5.5.4)':
dependencies:
'@typescript-eslint/types': 7.18.0
'@typescript-eslint/visitor-keys': 7.18.0
debug: 4.3.7
globby: 11.1.0
is-glob: 4.0.3
minimatch: 9.0.5
semver: 7.6.3
ts-api-utils: 1.3.0(typescript@5.5.4)
optionalDependencies:
typescript: 5.5.4
transitivePeerDependencies:
- supports-color
'@typescript-eslint/typescript-estree@8.4.0(typescript@5.5.4)':
dependencies:
'@typescript-eslint/types': 8.4.0
@ -5920,17 +5849,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/utils@7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)':
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6))
'@typescript-eslint/scope-manager': 7.18.0
'@typescript-eslint/types': 7.18.0
'@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4)
eslint: 9.10.0(jiti@1.21.6)
transitivePeerDependencies:
- supports-color
- typescript
'@typescript-eslint/utils@8.4.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)':
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6))
@ -5942,11 +5860,6 @@ snapshots:
- supports-color
- typescript
'@typescript-eslint/visitor-keys@7.18.0':
dependencies:
'@typescript-eslint/types': 7.18.0
eslint-visitor-keys: 3.4.3
'@typescript-eslint/visitor-keys@8.4.0':
dependencies:
'@typescript-eslint/types': 8.4.0
@ -6068,15 +5981,15 @@ snapshots:
vite: 5.4.3(@types/node@22.5.4)(sass@1.78.0)
vue: 3.5.3(typescript@5.5.4)
'@volar/language-core@2.4.2':
'@volar/language-core@2.4.4':
dependencies:
'@volar/source-map': 2.4.2
'@volar/source-map': 2.4.4
'@volar/source-map@2.4.2': {}
'@volar/source-map@2.4.4': {}
'@volar/typescript@2.4.2':
'@volar/typescript@2.4.4':
dependencies:
'@volar/language-core': 2.4.2
'@volar/language-core': 2.4.4
path-browserify: 1.0.1
vscode-uri: 3.0.8
@ -6175,7 +6088,7 @@ snapshots:
'@vue/language-core@2.1.6(typescript@5.5.4)':
dependencies:
'@volar/language-core': 2.4.2
'@volar/language-core': 2.4.4
'@vue/compiler-dom': 3.5.3
'@vue/compiler-vue2': 2.7.16
'@vue/shared': 3.5.3
@ -6315,8 +6228,6 @@ snapshots:
call-bind: 1.0.7
is-array-buffer: 3.0.4
array-union@2.1.0: {}
array-unique@0.3.2: {}
arraybuffer.prototype.slice@1.0.3:
@ -7217,10 +7128,11 @@ snapshots:
eslint: 9.10.0(jiti@1.21.6)
semver: 7.6.3
eslint-config-flat-gitignore@0.1.8:
eslint-config-flat-gitignore@0.3.0(eslint@9.10.0(jiti@1.21.6)):
dependencies:
'@eslint/compat': 1.1.1
eslint: 9.10.0(jiti@1.21.6)
find-up-simple: 1.0.0
parse-gitignore: 2.0.0
eslint-config-prettier@9.1.0(eslint@9.10.0(jiti@1.21.6)):
dependencies:
@ -7243,9 +7155,9 @@ snapshots:
eslint: 9.10.0(jiti@1.21.6)
eslint-compat-utils: 0.5.1(eslint@9.10.0(jiti@1.21.6))
eslint-plugin-import-x@3.1.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4):
eslint-plugin-import-x@4.2.1(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4):
dependencies:
'@typescript-eslint/utils': 7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
'@typescript-eslint/utils': 8.4.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.5.4)
debug: 4.3.7
doctrine: 3.0.0
eslint: 9.10.0(jiti@1.21.6)
@ -7260,14 +7172,14 @@ snapshots:
- supports-color
- typescript
eslint-plugin-n@17.10.1(eslint@9.10.0(jiti@1.21.6)):
eslint-plugin-n@17.10.2(eslint@9.10.0(jiti@1.21.6)):
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6))
enhanced-resolve: 5.17.1
eslint: 9.10.0(jiti@1.21.6)
eslint-plugin-es-x: 7.8.0(eslint@9.10.0(jiti@1.21.6))
get-tsconfig: 4.8.0
globals: 15.8.0
globals: 15.9.0
ignore: 5.3.2
minimatch: 9.0.5
semver: 7.6.3
@ -7290,7 +7202,7 @@ snapshots:
core-js-compat: 3.38.1
eslint: 9.10.0(jiti@1.21.6)
esquery: 1.6.0
globals: 15.8.0
globals: 15.9.0
indent-string: 4.0.0
is-builtin-module: 3.2.1
jsesc: 3.0.2
@ -7731,22 +7643,13 @@ snapshots:
globals@14.0.0: {}
globals@15.8.0: {}
globals@15.9.0: {}
globalthis@1.0.4:
dependencies:
define-properties: 1.2.1
gopd: 1.0.1
globby@11.1.0:
dependencies:
array-union: 2.1.0
dir-glob: 3.0.1
fast-glob: 3.3.2
ignore: 5.3.2
merge2: 1.4.1
slash: 3.0.0
good-listener@1.2.2:
dependencies:
delegate: 3.2.0
@ -8740,8 +8643,6 @@ snapshots:
dependencies:
callsites: 3.1.0
parse-gitignore@2.0.0: {}
parse-json@5.2.0:
dependencies:
'@babel/code-frame': 7.24.7
@ -9221,8 +9122,6 @@ snapshots:
sisteransi@1.0.5: {}
slash@3.0.0: {}
slice-ansi@5.0.0:
dependencies:
ansi-styles: 6.2.1
@ -9879,7 +9778,7 @@ snapshots:
vue-tsc@2.1.6(typescript@5.5.4):
dependencies:
'@volar/typescript': 2.4.2
'@volar/typescript': 2.4.4
'@vue/language-core': 2.1.6(typescript@5.5.4)
semver: 7.6.3
typescript: 5.5.4