diff --git a/.github/workflows/coding-linter.yml b/.github/workflows/coding-linter.yml index d022ca8..8e4ce0c 100644 --- a/.github/workflows/coding-linter.yml +++ b/.github/workflows/coding-linter.yml @@ -20,7 +20,7 @@ jobs: with: toolchain: stable - name: Cache crates - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ @@ -47,7 +47,7 @@ jobs: toolchain: stable components: rustfmt, clippy - name: Cache crates - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/bin/ @@ -72,11 +72,11 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: latest - name: Install pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v3 with: version: latest run_install: false @@ -85,7 +85,7 @@ jobs: run: | echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - name: Setup pnpm cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} @@ -96,4 +96,4 @@ jobs: pnpm i - name: Run pnpm lint run: | - pnpm run lint \ No newline at end of file + pnpm biome:check \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 6303611..0000000 --- a/.prettierrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "useTabs": false, - "tabWidth": 2, - "printWidth": 100, - "singleQuote": true, - "trailingComma": "none", - "bracketSpacing": true, - "semi": false -} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b15eb62..0484cb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v1.4.3 + +### chore + +- chore(frontend): 迁移到 biome(#65) + ## v1.4.2 ### fixed diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..2511c38 --- /dev/null +++ b/biome.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.7.2/schema.json", + "files": { + "ignore": ["miniprogram/miniprogram_npm/**/*"] + }, + "organizeImports": { + "enabled": true + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + } +} diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index ea92866..0000000 --- a/eslint.config.js +++ /dev/null @@ -1,14 +0,0 @@ -// @ts-expect-error 配置文件忽略 - -import eslint from '@eslint/js' -import tseslint from 'typescript-eslint' -import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' - -export default tseslint.config({ - ignores: ['miniprogram/miniprogram_npm/**'], - extends: [ - eslint.configs.recommended, - ...tseslint.configs.recommended, - eslintPluginPrettierRecommended - ] -}) diff --git a/miniprogram/api/accessToken.ts b/miniprogram/api/accessToken.ts index 2781f4a..56a12e9 100644 --- a/miniprogram/api/accessToken.ts +++ b/miniprogram/api/accessToken.ts @@ -1,19 +1,22 @@ -import http from '@utils/http' -import { URL } from '@constant/accessToken' -import { CODE } from '@constant/error' -import logger from '@utils/logger' -import error from '@utils/error' -import { HttpError } from '@models/error' -import type { LoginRequest, LoginResponse } from 'types/accessToken' +import { URL } from "@constant/accessToken"; +import { CODE } from "@constant/error"; +import { HttpError } from "@models/error"; +import error from "@utils/error"; +import http from "@utils/http"; +import logger from "@utils/logger"; +import type { LoginRequest, LoginResponse } from "types/accessToken"; const login = async (code: string) => { - try { - return await http.post(URL.LOGIN, { code } as LoginRequest) - } catch (e: unknown) { - logger.error('登录接口请求失败', e) + try { + return await http.post(URL.LOGIN, { code } as LoginRequest); + } catch (e: unknown) { + logger.error("登录接口请求失败", e); - throw new HttpError(CODE.HTTP_API_ACCESS_TOKEN_LOGIN, error.getErrorMessage(e)) - } -} + throw new HttpError( + CODE.HTTP_API_ACCESS_TOKEN_LOGIN, + error.getErrorMessage(e), + ); + } +}; -export default { login } +export default { login }; diff --git a/miniprogram/api/shortUrl.ts b/miniprogram/api/shortUrl.ts index 255b184..07607bc 100644 --- a/miniprogram/api/shortUrl.ts +++ b/miniprogram/api/shortUrl.ts @@ -1,21 +1,24 @@ -import http from '@utils/http' -import { URL } from '@constant/shortUrl' -import { CODE } from '@constant/error' -import { HttpError } from '@models/error' -import logger from '@utils/logger' -import error from '@utils/error' -import type { CreateRequest, CreateResponse } from 'types/shortUrl' +import { CODE } from "@constant/error"; +import { URL } from "@constant/shortUrl"; +import { HttpError } from "@models/error"; +import error from "@utils/error"; +import http from "@utils/http"; +import logger from "@utils/logger"; +import type { CreateRequest, CreateResponse } from "types/shortUrl"; const create = async (url: string) => { - try { - return await http.post(URL.CREATE, { - url - } as CreateRequest) - } catch (e: unknown) { - logger.error('创建短链接失败', e) + try { + return await http.post(URL.CREATE, { + url, + } as CreateRequest); + } catch (e: unknown) { + logger.error("创建短链接失败", e); - throw new HttpError(CODE.HTTP_API_SHORT_URL_CREATE, error.getErrorMessage(e)) - } -} + throw new HttpError( + CODE.HTTP_API_SHORT_URL_CREATE, + error.getErrorMessage(e), + ); + } +}; -export default { create } +export default { create }; diff --git a/miniprogram/api/totp.ts b/miniprogram/api/totp.ts index b02ce2c..f7af6a9 100644 --- a/miniprogram/api/totp.ts +++ b/miniprogram/api/totp.ts @@ -1,66 +1,66 @@ -import http from '@utils/http' -import { URL } from '@constant/totp' -import { CODE } from '@constant/error' -import { HttpError } from '@models/error' -import logger from '@utils/logger' -import error from '@utils/error' +import { CODE } from "@constant/error"; +import { URL } from "@constant/totp"; +import { HttpError } from "@models/error"; +import error from "@utils/error"; +import http from "@utils/http"; +import logger from "@utils/logger"; import type { - CreateRequest, - DeleteRequest, - DetailRequest, - Item, - Response, - UpdateRequest -} from 'types/totp' + CreateRequest, + DeleteRequest, + DetailRequest, + Item, + Response, + UpdateRequest, +} from "types/totp"; const all = async () => { - try { - return await http.post(URL.ALL) - } catch (e: unknown) { - logger.error('查询 TOTP 列表失败', e) + try { + return await http.post(URL.ALL); + } catch (e: unknown) { + logger.error("查询 TOTP 列表失败", e); - throw new HttpError(CODE.HTTP_API_TOTP_ALL, error.getErrorMessage(e)) - } -} + throw new HttpError(CODE.HTTP_API_TOTP_ALL, error.getErrorMessage(e)); + } +}; const detail = async (id: number) => { - try { - return await http.post(URL.DETAIL, { id } as DetailRequest) - } catch (e: unknown) { - logger.error('查询 TOTP 详情失败', e) + try { + return await http.post(URL.DETAIL, { id } as DetailRequest); + } catch (e: unknown) { + logger.error("查询 TOTP 详情失败", e); - throw new HttpError(CODE.HTTP_API_TOTP_DETAIL, error.getErrorMessage(e)) - } -} + throw new HttpError(CODE.HTTP_API_TOTP_DETAIL, error.getErrorMessage(e)); + } +}; const create = async (uri: string) => { - try { - return await http.post(URL.CREATE, { uri } as CreateRequest) - } catch (e: unknown) { - logger.error('创建 TOTP 失败', e) + try { + return await http.post(URL.CREATE, { uri } as CreateRequest); + } catch (e: unknown) { + logger.error("创建 TOTP 失败", e); - throw new HttpError(CODE.HTTP_API_TOTP_CREATE, error.getErrorMessage(e)) - } -} + throw new HttpError(CODE.HTTP_API_TOTP_CREATE, error.getErrorMessage(e)); + } +}; const update = async (data: UpdateRequest) => { - try { - return await http.post(URL.UPDATE, data) - } catch (e: unknown) { - logger.error('更新 TOTP 信息失败', e) + try { + return await http.post(URL.UPDATE, data); + } catch (e: unknown) { + logger.error("更新 TOTP 信息失败", e); - throw new HttpError(CODE.HTTP_API_TOTP_UPDATE, error.getErrorMessage(e)) - } -} + throw new HttpError(CODE.HTTP_API_TOTP_UPDATE, error.getErrorMessage(e)); + } +}; const deleteTotp = async (id: number) => { - try { - return await http.post(URL.DELETE, { id } as DeleteRequest) - } catch (e: unknown) { - logger.error('删除 TOTP 失败', e) + try { + return await http.post(URL.DELETE, { id } as DeleteRequest); + } catch (e: unknown) { + logger.error("删除 TOTP 失败", e); - throw new HttpError(CODE.HTTP_API_TOTP_ALL, error.getErrorMessage(e)) - } -} + throw new HttpError(CODE.HTTP_API_TOTP_ALL, error.getErrorMessage(e)); + } +}; -export default { all, detail, create, update, deleteTotp } +export default { all, detail, create, update, deleteTotp }; diff --git a/miniprogram/api/user.ts b/miniprogram/api/user.ts index 5dcfaac..6919632 100644 --- a/miniprogram/api/user.ts +++ b/miniprogram/api/user.ts @@ -1,29 +1,29 @@ -import http from '@utils/http' -import { URL } from '@constant/user' -import { CODE } from '@constant/error' -import logger from '@utils/logger' -import error from '@utils/error' -import { HttpError } from '@models/error' -import type { DetailResponse, UpdateRequest, UpdateResponse } from 'types/user' +import { CODE } from "@constant/error"; +import { URL } from "@constant/user"; +import { HttpError } from "@models/error"; +import error from "@utils/error"; +import http from "@utils/http"; +import logger from "@utils/logger"; +import type { DetailResponse, UpdateRequest, UpdateResponse } from "types/user"; const detail = async () => { - try { - return await http.post(URL.DETAIL) - } catch (e: unknown) { - logger.error('查询用户详情失败', e) + try { + return await http.post(URL.DETAIL); + } catch (e: unknown) { + logger.error("查询用户详情失败", e); - throw new HttpError(CODE.HTTP_API_USER_DETAIL, error.getErrorMessage(e)) - } -} + throw new HttpError(CODE.HTTP_API_USER_DETAIL, error.getErrorMessage(e)); + } +}; const update = async (updated: UpdateRequest) => { - try { - return await http.post(URL.UPDATE, updated) - } catch (e: unknown) { - logger.error('更新用户信息失败', e) + try { + return await http.post(URL.UPDATE, updated); + } catch (e: unknown) { + logger.error("更新用户信息失败", e); - throw new HttpError(CODE.HTTP_API_USER_UPDATE, error.getErrorMessage(e)) - } -} + throw new HttpError(CODE.HTTP_API_USER_UPDATE, error.getErrorMessage(e)); + } +}; -export default { detail, update } +export default { detail, update }; diff --git a/miniprogram/app.json b/miniprogram/app.json index 163c6f4..f2eff90 100644 --- a/miniprogram/app.json +++ b/miniprogram/app.json @@ -1,43 +1,43 @@ { - "pages": [ - "pages/home/index", - "pages/user/index", - "pages/user/edit", - "pages/totp/index", - "pages/totp/edit", - "pages/shortUrl/index" - ], - "window": { - "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#fff", - "navigationBarTitleText": "闫嵩达", - "navigationBarTextStyle": "black" - }, - "tabBar": { - "custom": true, - "color": "#000000", - "selectedColor": "#000000", - "backgroundColor": "#000000", - "list": [ - { - "pagePath": "pages/home/index", - "text": "首页" - }, - { - "pagePath": "pages/user/index", - "text": "我" - } - ] - }, - "networkTimeout": { - "request": 5000 - }, - "lazyCodeLoading": "requiredComponents", - "sitemapLocation": "sitemap.json", - "resolveAlias": { - "@api/*": "/api/*", - "@utils/*": "/utils/*", - "@constant/*": "/constant/*", - "@models/*": "/models/*" - } -} \ No newline at end of file + "pages": [ + "pages/home/index", + "pages/user/index", + "pages/user/edit", + "pages/totp/index", + "pages/totp/edit", + "pages/shortUrl/index" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "闫嵩达", + "navigationBarTextStyle": "black" + }, + "tabBar": { + "custom": true, + "color": "#000000", + "selectedColor": "#000000", + "backgroundColor": "#000000", + "list": [ + { + "pagePath": "pages/home/index", + "text": "首页" + }, + { + "pagePath": "pages/user/index", + "text": "我" + } + ] + }, + "networkTimeout": { + "request": 5000 + }, + "lazyCodeLoading": "requiredComponents", + "sitemapLocation": "sitemap.json", + "resolveAlias": { + "@api/*": "/api/*", + "@utils/*": "/utils/*", + "@constant/*": "/constant/*", + "@models/*": "/models/*" + } +} diff --git a/miniprogram/app.ts b/miniprogram/app.ts index ca005d8..8660f93 100644 --- a/miniprogram/app.ts +++ b/miniprogram/app.ts @@ -1,82 +1,93 @@ -import { STORAGE } from '@constant/app' -import accessToken from '@api/accessToken' -import { EE, WeixinError } from '@models/error' -import { CODE, MESSAGE } from '@constant/error' -import logger from '@utils/logger' -import type { GlobalData } from 'types/app' +import accessToken from "@api/accessToken"; +import { STORAGE } from "@constant/app"; +import { CODE, MESSAGE } from "@constant/error"; +import { EE, WeixinError } from "@models/error"; +import logger from "@utils/logger"; +import type { LoginResponse } from "types/accessToken"; import type { - AppOnUnhandledRejection, - WxGetUpdateManagerOnCheckForUpdateResult, - WxLoginSuccessCallbackResult -} from 'types/wechat' -import type { LoginResponse } from 'types/accessToken' + AppOnUnhandledRejection, + WxGetUpdateManagerOnCheckForUpdateResult, + WxLoginSuccessCallbackResult, +} from "types/wechat"; -App({ - async onLaunch() { - try { - await wx.checkSession() +App({ + async onLaunch() { + try { + await wx.checkSession(); - await wx.getStorage({ key: STORAGE.ACCESS_TOKEN }) + await wx.getStorage({ key: STORAGE.ACCESS_TOKEN }); - return - } catch (e) { - /* empty */ - } + return; + } catch (e) { + /* empty */ + } - await wx.showToast({ title: '登录中...', icon: 'loading', duration: 6000, mask: true }) + await wx.showToast({ + title: "登录中...", + icon: "loading", + duration: 6000, + mask: true, + }); - wx.login({ - success: async (res: WxLoginSuccessCallbackResult) => { - const loginResponse: LoginResponse = await accessToken.login(res.code) + wx.login({ + success: async (res: WxLoginSuccessCallbackResult) => { + const loginResponse: LoginResponse = await accessToken.login(res.code); - await wx - .setStorage({ key: STORAGE.ACCESS_TOKEN, data: loginResponse.access_token }) - .catch(() => Promise.reject(new WeixinError(CODE.WEIXIN_STORAGE_SET))) + await wx + .setStorage({ + key: STORAGE.ACCESS_TOKEN, + data: loginResponse.access_token, + }) + .catch(() => + Promise.reject(new WeixinError(CODE.WEIXIN_STORAGE_SET)), + ); - await wx.hideToast() - }, - fail: async () => Promise.reject(new WeixinError(CODE.WEIXIN_LOGIN)) - }) - }, - onShow() { - const updateManager = wx.getUpdateManager() + await wx.hideToast(); + }, + fail: async () => Promise.reject(new WeixinError(CODE.WEIXIN_LOGIN)), + }); + }, + onShow() { + const updateManager = wx.getUpdateManager(); - updateManager.onCheckForUpdate((res: WxGetUpdateManagerOnCheckForUpdateResult) => { - if (res.hasUpdate) { - logger.info('小程序有最新版本,后续将自动更新') - } - }) + updateManager.onCheckForUpdate( + (res: WxGetUpdateManagerOnCheckForUpdateResult) => { + if (res.hasUpdate) { + logger.info("小程序有最新版本,后续将自动更新"); + } + }, + ); - updateManager.onUpdateReady(() => { - wx.showModal({ - title: '更新提示', - content: '新版本已经准备好,是否重启应用?', - success(res) { - if (res.confirm) { - updateManager.applyUpdate() - } - } - }) - }) + updateManager.onUpdateReady(() => { + wx.showModal({ + title: "更新提示", + content: "新版本已经准备好,是否重启应用?", + success(res) { + if (res.confirm) { + updateManager.applyUpdate(); + } + }, + }); + }); - updateManager.onUpdateFailed(() => { - logger.error('小程序更新下载异常') - }) - }, - async onError(e: string) { - logger.error('小程序异常', e) + updateManager.onUpdateFailed(() => { + logger.error("小程序更新下载异常"); + }); + }, + async onError(e: string) { + logger.error("小程序异常", e); - await wx.showToast({ title: '小程序异常', icon: 'error' }) - }, - async onUnhandledRejection(e: AppOnUnhandledRejection) { - if (e.reason instanceof EE) { - await wx.showToast({ title: MESSAGE[e.reason.code], icon: 'error' }) + await wx.showToast({ title: "小程序异常", icon: "error" }); + }, + async onUnhandledRejection(e: AppOnUnhandledRejection) { + if (e.reason instanceof EE) { + await wx.showToast({ title: MESSAGE[e.reason.code], icon: "error" }); - return - } + return; + } - logger.error('未知错误', e) + logger.error("未知错误", e); - await wx.showToast({ title: '出现未知错误', icon: 'error' }) - } -}) + await wx.showToast({ title: "出现未知错误", icon: "error" }); + }, +}); diff --git a/miniprogram/constant/accessToken.ts b/miniprogram/constant/accessToken.ts index d9f71d6..2d6ec0d 100644 --- a/miniprogram/constant/accessToken.ts +++ b/miniprogram/constant/accessToken.ts @@ -1,5 +1,5 @@ const URL = { - LOGIN: '/api/v1/access-token/login' -} + LOGIN: "/api/v1/access-token/login", +}; -export { URL } +export { URL }; diff --git a/miniprogram/constant/app.ts b/miniprogram/constant/app.ts index 6b72bb7..293c14d 100644 --- a/miniprogram/constant/app.ts +++ b/miniprogram/constant/app.ts @@ -1,10 +1,10 @@ const STORAGE = { - ACCESS_TOKEN: 'access_token', - USER: 'user' -} + ACCESS_TOKEN: "access_token", + USER: "user", +}; const URL = { - BASE: 'https://miniprogram.yanda.net.cn' -} + BASE: "https://miniprogram.yanda.net.cn", +}; -export { STORAGE, URL } +export { STORAGE, URL }; diff --git a/miniprogram/constant/error.ts b/miniprogram/constant/error.ts index 5f834be..03e2873 100644 --- a/miniprogram/constant/error.ts +++ b/miniprogram/constant/error.ts @@ -1,54 +1,54 @@ const CODE = { - UNKNOWN: 9999, - // 微信错误 - WEIXIN: 1, - WEIXIN_LOGIN: 2, - WEIXIN_QR_CODE: 3, - WEIXIN_STORAGE_SET: 4, - // 权限错误 - LOGIN: 1000, - // http 调用错误 - HTTP: 2000, - // http 内部参数错误 - HTTP_PARAMS: 2001, - // http 业务接口 - token - HTTP_API_ACCESS_TOKEN_LOGIN: 2100, - // http 业务错误 - 用户接口 - HTTP_API_USER_DETAIL: 2201, - HTTP_API_USER_UPDATE: 2202, - // http 业务错误 - TOTP 接口 - HTTP_API_TOTP_ALL: 2300, - HTTP_API_TOTP_DETAIL: 2301, - HTTP_API_TOTP_CREATE: 2302, - HTTP_API_TOTP_UPDATE: 2303, - HTTP_API_TOTP_DELETE: 2304, - // http 业务错误 - short-url 接口 - HTTP_API_SHORT_URL_CREATE: 2400 -} + UNKNOWN: 9999, + // 微信错误 + WEIXIN: 1, + WEIXIN_LOGIN: 2, + WEIXIN_QR_CODE: 3, + WEIXIN_STORAGE_SET: 4, + // 权限错误 + LOGIN: 1000, + // http 调用错误 + HTTP: 2000, + // http 内部参数错误 + HTTP_PARAMS: 2001, + // http 业务接口 - token + HTTP_API_ACCESS_TOKEN_LOGIN: 2100, + // http 业务错误 - 用户接口 + HTTP_API_USER_DETAIL: 2201, + HTTP_API_USER_UPDATE: 2202, + // http 业务错误 - TOTP 接口 + HTTP_API_TOTP_ALL: 2300, + HTTP_API_TOTP_DETAIL: 2301, + HTTP_API_TOTP_CREATE: 2302, + HTTP_API_TOTP_UPDATE: 2303, + HTTP_API_TOTP_DELETE: 2304, + // http 业务错误 - short-url 接口 + HTTP_API_SHORT_URL_CREATE: 2400, +}; const MESSAGE = { - [CODE.UNKNOWN]: '未知错误', - [CODE.WEIXIN]: '微信调用错误', - [CODE.WEIXIN_LOGIN]: '微信登录错误', - [CODE.WEIXIN_QR_CODE]: '二维码识别出错', - [CODE.WEIXIN_STORAGE_SET]: '微信存储出错', - [CODE.LOGIN]: '登录失败', - [CODE.HTTP]: '网络请求失败', - [CODE.HTTP_PARAMS]: '内部参数错误', - [CODE.HTTP_API_ACCESS_TOKEN_LOGIN]: '登录失败请重开', - [CODE.HTTP_API_USER_DETAIL]: '查询详情失败', - [CODE.HTTP_API_USER_UPDATE]: '更新失败', - [CODE.HTTP_API_TOTP_ALL]: '查询列表失败', - [CODE.HTTP_API_TOTP_DETAIL]: '查询详情失败', - [CODE.HTTP_API_TOTP_CREATE]: '新增失败', - [CODE.HTTP_API_TOTP_UPDATE]: '更新失败', - [CODE.HTTP_API_TOTP_DELETE]: '删除失败', - [CODE.HTTP_API_SHORT_URL_CREATE]: '生成失败' -} + [CODE.UNKNOWN]: "未知错误", + [CODE.WEIXIN]: "微信调用错误", + [CODE.WEIXIN_LOGIN]: "微信登录错误", + [CODE.WEIXIN_QR_CODE]: "二维码识别出错", + [CODE.WEIXIN_STORAGE_SET]: "微信存储出错", + [CODE.LOGIN]: "登录失败", + [CODE.HTTP]: "网络请求失败", + [CODE.HTTP_PARAMS]: "内部参数错误", + [CODE.HTTP_API_ACCESS_TOKEN_LOGIN]: "登录失败请重开", + [CODE.HTTP_API_USER_DETAIL]: "查询详情失败", + [CODE.HTTP_API_USER_UPDATE]: "更新失败", + [CODE.HTTP_API_TOTP_ALL]: "查询列表失败", + [CODE.HTTP_API_TOTP_DETAIL]: "查询详情失败", + [CODE.HTTP_API_TOTP_CREATE]: "新增失败", + [CODE.HTTP_API_TOTP_UPDATE]: "更新失败", + [CODE.HTTP_API_TOTP_DELETE]: "删除失败", + [CODE.HTTP_API_SHORT_URL_CREATE]: "生成失败", +}; const WECHAT_MESSAGE = { - 3: '系统权限未授予微信', - 5: '请求超时' -} + 3: "系统权限未授予微信", + 5: "请求超时", +}; -export { CODE, MESSAGE, WECHAT_MESSAGE } +export { CODE, MESSAGE, WECHAT_MESSAGE }; diff --git a/miniprogram/constant/shortUrl.ts b/miniprogram/constant/shortUrl.ts index 78a2d16..ebba6d5 100644 --- a/miniprogram/constant/shortUrl.ts +++ b/miniprogram/constant/shortUrl.ts @@ -1,5 +1,5 @@ const URL = { - CREATE: '/api/v1/short-url/create' -} + CREATE: "/api/v1/short-url/create", +}; -export { URL } +export { URL }; diff --git a/miniprogram/constant/totp.ts b/miniprogram/constant/totp.ts index b25f0a0..4ff5dac 100644 --- a/miniprogram/constant/totp.ts +++ b/miniprogram/constant/totp.ts @@ -1,9 +1,9 @@ const URL = { - ALL: '/api/v1/totp/all', - DETAIL: '/api/v1/totp/detail', - CREATE: '/api/v1/totp/create', - UPDATE: '/api/v1/totp/update', - DELETE: '/api/v1/totp/delete' -} + ALL: "/api/v1/totp/all", + DETAIL: "/api/v1/totp/detail", + CREATE: "/api/v1/totp/create", + UPDATE: "/api/v1/totp/update", + DELETE: "/api/v1/totp/delete", +}; -export { URL } +export { URL }; diff --git a/miniprogram/constant/user.ts b/miniprogram/constant/user.ts index 148e39d..8ab9dfe 100644 --- a/miniprogram/constant/user.ts +++ b/miniprogram/constant/user.ts @@ -1,12 +1,12 @@ const DEFAULT = { - avatar: '/images/default-avatar.png', - nickname: '微信用户', - slogan: '让科技更便利' -} + avatar: "/images/default-avatar.png", + nickname: "微信用户", + slogan: "让科技更便利", +}; const URL = { - DETAIL: '/api/v1/users/detail', - UPDATE: '/api/v1/users/update' -} + DETAIL: "/api/v1/users/detail", + UPDATE: "/api/v1/users/update", +}; -export { DEFAULT, URL } +export { DEFAULT, URL }; diff --git a/miniprogram/custom-tab-bar/index.json b/miniprogram/custom-tab-bar/index.json index e16a2dd..d2f450e 100644 --- a/miniprogram/custom-tab-bar/index.json +++ b/miniprogram/custom-tab-bar/index.json @@ -1,7 +1,7 @@ { - "component": true, - "usingComponents": { - "t-tab-bar": "tdesign-miniprogram/tab-bar/tab-bar", - "t-tab-bar-item": "tdesign-miniprogram/tab-bar-item/tab-bar-item" - } + "component": true, + "usingComponents": { + "t-tab-bar": "tdesign-miniprogram/tab-bar/tab-bar", + "t-tab-bar-item": "tdesign-miniprogram/tab-bar-item/tab-bar-item" + } } diff --git a/miniprogram/custom-tab-bar/index.ts b/miniprogram/custom-tab-bar/index.ts index 9b56eb6..789b59c 100644 --- a/miniprogram/custom-tab-bar/index.ts +++ b/miniprogram/custom-tab-bar/index.ts @@ -1,26 +1,26 @@ -import type { TabbarTap } from 'types/tdesign' +import type { TabbarTap } from "types/tdesign"; Component({ - data: { - value: 'pages/home/index', - list: [ - { value: 'pages/home/index', label: '首页', icon: 'home' }, - { value: 'pages/user/index', label: '我的', icon: 'user' } - ] - }, - lifetimes: { - ready() { - const pages = getCurrentPages() - const curPage = pages[pages.length - 1] + data: { + value: "pages/home/index", + list: [ + { value: "pages/home/index", label: "首页", icon: "home" }, + { value: "pages/user/index", label: "我的", icon: "user" }, + ], + }, + lifetimes: { + ready() { + const pages = getCurrentPages(); + const curPage = pages[pages.length - 1]; - this.setData({ value: curPage.route }) - } - }, - methods: { - onChange(e: TabbarTap) { - const path = e.detail.value + this.setData({ value: curPage.route }); + }, + }, + methods: { + onChange(e: TabbarTap) { + const path = e.detail.value; - wx.switchTab({ url: '/' + path }) - } - } -}) + wx.switchTab({ url: `/${path}` }); + }, + }, +}); diff --git a/miniprogram/models/error.ts b/miniprogram/models/error.ts index 909f74a..ad77e41 100644 --- a/miniprogram/models/error.ts +++ b/miniprogram/models/error.ts @@ -1,36 +1,36 @@ -import { CODE, MESSAGE } from '@constant/error' -import type { RequestData, RequestHeaders, RequestQuery } from 'types/http' +import { CODE, MESSAGE } from "@constant/error"; +import type { RequestData, RequestHeaders, RequestQuery } from "types/http"; export class EE { - code: number - message: string + code: number; + message: string; - constructor(code?: number, message?: string) { - this.code = code || CODE.UNKNOWN - this.message = message || MESSAGE[this.code] || MESSAGE[CODE.UNKNOWN] - } + constructor(code?: number, message?: string) { + this.code = code || CODE.UNKNOWN; + this.message = message || MESSAGE[this.code] || MESSAGE[CODE.UNKNOWN]; + } } export class WeixinError extends EE { - constructor(code?: number, message?: string) { - super(code || CODE.WEIXIN, message) - } + constructor(code?: number, message?: string) { + super(code || CODE.WEIXIN, message); + } } export class LoginError extends EE { - constructor(code?: number, message?: string) { - super(code || CODE.LOGIN, message) - } + constructor(code?: number, message?: string) { + super(code || CODE.LOGIN, message); + } } export class HttpError extends EE { - url?: string - headers?: RequestHeaders - query?: RequestQuery - data?: RequestData - timeout?: number + url?: string; + headers?: RequestHeaders; + query?: RequestQuery; + data?: RequestData; + timeout?: number; - constructor(code?: number, message?: string) { - super(code || CODE.HTTP, message) - } + constructor(code?: number, message?: string) { + super(code || CODE.HTTP, message); + } } diff --git a/miniprogram/pages/home/index.json b/miniprogram/pages/home/index.json index 733c59a..0367e73 100644 --- a/miniprogram/pages/home/index.json +++ b/miniprogram/pages/home/index.json @@ -1,7 +1,7 @@ { - "usingComponents": { - "t-cell-group": "tdesign-miniprogram/cell-group/cell-group", - "t-cell": "tdesign-miniprogram/cell/cell", - "t-icon": "tdesign-miniprogram/icon/icon" - } -} \ No newline at end of file + "usingComponents": { + "t-cell-group": "tdesign-miniprogram/cell-group/cell-group", + "t-cell": "tdesign-miniprogram/cell/cell", + "t-icon": "tdesign-miniprogram/icon/icon" + } +} diff --git a/miniprogram/pages/home/index.ts b/miniprogram/pages/home/index.ts index d028d2f..7e5404a 100644 --- a/miniprogram/pages/home/index.ts +++ b/miniprogram/pages/home/index.ts @@ -1,16 +1,16 @@ Page({ - data: { - tools: [ - { - name: 'TOTP身份验证器', - icon: 'rotate-locked', - url: '/pages/totp/index' - }, - { - name: '短链生成服务', - icon: 'link-1', - url: '/pages/shortUrl/index' - } - ] - } -}) + data: { + tools: [ + { + name: "TOTP身份验证器", + icon: "rotate-locked", + url: "/pages/totp/index", + }, + { + name: "短链生成服务", + icon: "link-1", + url: "/pages/shortUrl/index", + }, + ], + }, +}); diff --git a/miniprogram/pages/shortUrl/index.json b/miniprogram/pages/shortUrl/index.json index 86a3169..d3b1196 100644 --- a/miniprogram/pages/shortUrl/index.json +++ b/miniprogram/pages/shortUrl/index.json @@ -1,9 +1,9 @@ { - "usingComponents": { - "t-message": "tdesign-miniprogram/message/message", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-textarea": "tdesign-miniprogram/textarea/textarea", - "t-button": "tdesign-miniprogram/button/button" - }, - "navigationBarTitleText": "短链生成" -} \ No newline at end of file + "usingComponents": { + "t-message": "tdesign-miniprogram/message/message", + "t-toast": "tdesign-miniprogram/toast/toast", + "t-textarea": "tdesign-miniprogram/textarea/textarea", + "t-button": "tdesign-miniprogram/button/button" + }, + "navigationBarTitleText": "短链生成" +} diff --git a/miniprogram/pages/shortUrl/index.ts b/miniprogram/pages/shortUrl/index.ts index 537e13f..45c6ae7 100644 --- a/miniprogram/pages/shortUrl/index.ts +++ b/miniprogram/pages/shortUrl/index.ts @@ -1,61 +1,61 @@ -import Message from 'tdesign-miniprogram/message/index' -import Toast from 'tdesign-miniprogram/toast/index' -import api from '@api/shortUrl' -import { HttpError } from '@models/error' -import type { CreateResponse } from 'types/shortUrl' -import type { FormSubmit } from 'types/wechat' +import api from "@api/shortUrl"; +import type { HttpError } from "@models/error"; +import Message from "tdesign-miniprogram/message/index"; +import Toast from "tdesign-miniprogram/toast/index"; +import type { CreateResponse } from "types/shortUrl"; +import type { FormSubmit } from "types/wechat"; interface FormData { - url: string + url: string; } Page({ - data: { - url: '', - short: '' - }, - submit(e: FormSubmit) { - Toast({ - message: '生成中...', - theme: 'loading', - duration: 5000, - direction: 'column', - preventScrollThrough: true - }) + data: { + url: "", + short: "", + }, + submit(e: FormSubmit) { + Toast({ + message: "生成中...", + theme: "loading", + duration: 5000, + direction: "column", + preventScrollThrough: true, + }); - api - .create(e.detail.value.url) - .then((response: CreateResponse) => { - Toast({ - message: '生成成功', - theme: 'success', - duration: 100, - direction: 'column' - }) + api + .create(e.detail.value.url) + .then((response: CreateResponse) => { + Toast({ + message: "生成成功", + theme: "success", + duration: 100, + direction: "column", + }); - this.setData({ short: response.short }) - }) - .catch((e: HttpError) => { - Toast({ - message: '生成失败', - theme: 'error', - duration: 100, - direction: 'column' - }) + this.setData({ short: response.short }); + }) + .catch((e: HttpError) => { + Toast({ + message: "生成失败", + theme: "error", + duration: 100, + direction: "column", + }); - Message.error({ - content: '生成失败:' + e.message, - duration: 5000, - offset: [20, 32], - context: this - }) - }) - }, - async copy() { - if (this.data.short == '') { - return - } + Message.error({ + content: `生成失败:${e.message}`, + duration: 5000, + offset: [20, 32], + context: this, + }); + }); + }, + async copy() { + if (this.data.short === "") { + return; + } - await wx.setClipboardData({ data: this.data.short }) - } -}) + await wx.setClipboardData({ data: this.data.short }); + }, +}); diff --git a/miniprogram/pages/totp/edit.json b/miniprogram/pages/totp/edit.json index eea1d6e..f2456c9 100644 --- a/miniprogram/pages/totp/edit.json +++ b/miniprogram/pages/totp/edit.json @@ -1,10 +1,10 @@ { - "usingComponents": { - "t-message": "tdesign-miniprogram/message/message", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-dialog": "tdesign-miniprogram/dialog/dialog", - "t-input": "tdesign-miniprogram/input/input", - "t-button": "tdesign-miniprogram/button/button" - }, - "navigationBarTitleText": "备注身份验证器" -} \ No newline at end of file + "usingComponents": { + "t-message": "tdesign-miniprogram/message/message", + "t-toast": "tdesign-miniprogram/toast/toast", + "t-dialog": "tdesign-miniprogram/dialog/dialog", + "t-input": "tdesign-miniprogram/input/input", + "t-button": "tdesign-miniprogram/button/button" + }, + "navigationBarTitleText": "备注身份验证器" +} diff --git a/miniprogram/pages/totp/edit.ts b/miniprogram/pages/totp/edit.ts index dcbf65c..9ab8112 100644 --- a/miniprogram/pages/totp/edit.ts +++ b/miniprogram/pages/totp/edit.ts @@ -1,108 +1,108 @@ -import Message from 'tdesign-miniprogram/message/index' -import Toast from 'tdesign-miniprogram/toast/index' -import api from '@api/totp' -import { HttpError } from '@models/error' -import type { UpdateRequest } from 'types/totp' -import type { FormSubmit } from 'types/wechat' +import api from "@api/totp"; +import type { HttpError } from "@models/error"; +import Message from "tdesign-miniprogram/message/index"; +import Toast from "tdesign-miniprogram/toast/index"; +import type { UpdateRequest } from "types/totp"; +import type { FormSubmit } from "types/wechat"; interface Query { - id?: string + id?: string; } interface FormData { - issuer: string - username: string + issuer: string; + username: string; } Page({ - data: { - dialogVisible: false, - dialogConfirmBtn: { content: '重试', variant: 'base' }, - id: 0, - issuer: '', - username: '' - }, - onLoad(query: Query) { - this.data.id = Number(query.id || 0) - }, - onShow() { - Toast({ - message: '加载中...', - theme: 'loading', - duration: 5000, - direction: 'column' - }) + data: { + dialogVisible: false, + dialogConfirmBtn: { content: "重试", variant: "base" }, + id: 0, + issuer: "", + username: "", + }, + onLoad(query: Query) { + this.data.id = Number(query.id || 0); + }, + onShow() { + Toast({ + message: "加载中...", + theme: "loading", + duration: 5000, + direction: "column", + }); - api - .detail(this.data.id) - .then(({ id, issuer, username }) => { - Toast({ - message: '加载成功', - theme: 'success', - duration: 100, - direction: 'column' - }) + api + .detail(this.data.id) + .then(({ id, issuer, username }) => { + Toast({ + message: "加载成功", + theme: "success", + duration: 100, + direction: "column", + }); - this.setData({ id, issuer: issuer ?? '', username: username ?? '' }) - }) - .catch(() => { - Toast({ - message: '加载失败', - theme: 'error', - duration: 100, - direction: 'column' - }) + this.setData({ id, issuer: issuer ?? "", username: username ?? "" }); + }) + .catch(() => { + Toast({ + message: "加载失败", + theme: "error", + duration: 100, + direction: "column", + }); - this.setData({ dialogVisible: true }) - }) - }, - submit(e: FormSubmit) { - Toast({ - message: '更新中...', - theme: 'loading', - duration: 5000, - direction: 'column', - preventScrollThrough: true - }) + this.setData({ dialogVisible: true }); + }); + }, + submit(e: FormSubmit) { + Toast({ + message: "更新中...", + theme: "loading", + duration: 5000, + direction: "column", + preventScrollThrough: true, + }); - api - .update({ id: this.data.id, ...e.detail.value } as UpdateRequest) - .then(() => { - Toast({ - message: '更新成功', - theme: 'success', - duration: 1500, - direction: 'column', - preventScrollThrough: true - }) + api + .update({ id: this.data.id, ...e.detail.value } as UpdateRequest) + .then(() => { + Toast({ + message: "更新成功", + theme: "success", + duration: 1500, + direction: "column", + preventScrollThrough: true, + }); - setTimeout(() => wx.navigateBack(), 1500) - }) - .catch((e: HttpError) => { - Toast({ - message: '更新失败', - theme: 'error', - duration: 100, - direction: 'column' - }) + setTimeout(() => wx.navigateBack(), 1500); + }) + .catch((e: HttpError) => { + Toast({ + message: "更新失败", + theme: "error", + duration: 100, + direction: "column", + }); - Message.error({ - content: '更新失败:' + e.message, - duration: 5000, - context: this, - offset: [20, 32] - }) - }) - }, - async cancel() { - await wx.navigateBack() - }, - dialogConfirm() { - this.setData({ dialogVisible: false }) + Message.error({ + content: `更新失败:${e.message}`, + duration: 5000, + context: this, + offset: [20, 32], + }); + }); + }, + async cancel() { + await wx.navigateBack(); + }, + dialogConfirm() { + this.setData({ dialogVisible: false }); - this.onShow() - }, - dialogCancel() { - this.setData({ dialogVisible: false }) - } -}) + this.onShow(); + }, + dialogCancel() { + this.setData({ dialogVisible: false }); + }, +}); diff --git a/miniprogram/pages/totp/index.json b/miniprogram/pages/totp/index.json index d07cf8d..93ed53c 100644 --- a/miniprogram/pages/totp/index.json +++ b/miniprogram/pages/totp/index.json @@ -1,11 +1,11 @@ { - "usingComponents": { - "t-message": "tdesign-miniprogram/message/message", - "t-toast": "tdesign-miniprogram/toast/toast", - "t-empty": "tdesign-miniprogram/empty/empty", - "t-fab": "tdesign-miniprogram/fab/fab", - "t-dialog": "tdesign-miniprogram/dialog/dialog", - "t-swipe-cell": "tdesign-miniprogram/swipe-cell/swipe-cell" - }, - "navigationBarTitleText": "TOTP身份验证器" -} \ No newline at end of file + "usingComponents": { + "t-message": "tdesign-miniprogram/message/message", + "t-toast": "tdesign-miniprogram/toast/toast", + "t-empty": "tdesign-miniprogram/empty/empty", + "t-fab": "tdesign-miniprogram/fab/fab", + "t-dialog": "tdesign-miniprogram/dialog/dialog", + "t-swipe-cell": "tdesign-miniprogram/swipe-cell/swipe-cell" + }, + "navigationBarTitleText": "TOTP身份验证器" +} diff --git a/miniprogram/pages/totp/index.ts b/miniprogram/pages/totp/index.ts index 1d23e58..e016d75 100644 --- a/miniprogram/pages/totp/index.ts +++ b/miniprogram/pages/totp/index.ts @@ -1,173 +1,175 @@ -import Message from 'tdesign-miniprogram/message/index' -import Toast from 'tdesign-miniprogram/toast/index' -import api from '@api/totp' -import { CODE } from '@constant/error' -import { HttpError, WeixinError } from '@models/error' -import type { Item } from 'types/totp' -import type { SwipeTap } from 'types/tdesign' +import api from "@api/totp"; +import { CODE } from "@constant/error"; +import { type HttpError, WeixinError } from "@models/error"; +import Message from "tdesign-miniprogram/message/index"; +import Toast from "tdesign-miniprogram/toast/index"; +import type { SwipeTap } from "types/tdesign"; +import type { Item } from "types/totp"; interface SwipeButton { - text: string - className: string + text: string; + className: string; } interface Dataset { - id: string + id: string; } Page({ - data: { - swipeButtons: [ - { text: '备注', className: 'btn edit-btn' }, - { text: '删除', className: 'btn delete-btn' } - ] as SwipeButton[], - dialogVisible: false, - dialogConfirmBtn: { content: '删除', variant: 'base' }, - dialogDataId: 0, - intervalIdentity: -1, - items: [] as Item[] - }, - onShow() { - this.setupRefreshInterval() - - this.all() - }, - onHide() { - this.clearRefreshInterval() - }, - onUnload() { - this.clearRefreshInterval() - }, - all() { - Toast({ - message: '加载中...', - theme: 'loading', - duration: 5000, - direction: 'column', - preventScrollThrough: true - }) - - api - .all() - .then((response) => { - Toast({ - message: '加载成功', - theme: 'success', - duration: 100, - direction: 'column' - }) - - this.setData({ items: response }) - }) - .catch((e: HttpError) => { - Toast({ - message: '加载失败', - theme: 'error', - duration: 100, - direction: 'column' - }) - - Message.error({ - content: '加载失败:' + e.message, - duration: 5000, - offset: [20, 32], - context: this - }) - }) - }, - async create() { - const scan = await wx.scanCode({ scanType: ['qrCode'] }).catch(() => { - throw new WeixinError(CODE.WEIXIN_QR_CODE) - }) - - api - .create(scan.result) - .catch((e: HttpError) => - Message.error({ - content: e.message, - duration: 5000, - offset: [20, 32], - context: this - }) - ) - .finally(() => this.all()) - }, - async edit(id: number) { - this.clearRefreshInterval() - - await wx.navigateTo({ url: '/pages/totp/edit?id=' + id }) - }, - refreshCode(id: number, index: number) { - api - .detail(id) - .then((response) => this.setData({ [`items[${index}].code`]: response.code })) - .catch((e: HttpError) => - Message.error({ - content: '更新验证码失败:' + e.message, - duration: 5000, - offset: [20, 32], - context: this - }) - ) - }, - async swipeClick(e: SwipeTap) { - const id = Number(e.currentTarget.dataset.id) - - switch (e.detail.text) { - case '备注': - await this.edit(id) - break - case '删除': - this.setData({ dialogVisible: true, dialogDataId: id }) - break - } - }, - dialogConfirm(e: SwipeTap) { - const id = Number(e.currentTarget.dataset.id) - - api - .deleteTotp(id) - .catch((e: HttpError) => - Message.error({ - content: '删除失败:' + e.message, - duration: 5000, - offset: [20, 32], - context: this - }) - ) - .finally(() => this.all()) - }, - dialogCancel() { - this.setData({ dialogVisible: false, dialogDataId: 0 }) - }, - setupRefreshInterval() { - const intervalIdentity = setInterval(async () => { - for (const item of this.data.items) { - const index = this.data.items.indexOf(item) - const period = item.period ?? 30 - - let remainSeconds = period - new Date().getSeconds() - if (remainSeconds <= 0) { - remainSeconds += period - } - - this.setData({ [`items[${index}].remainSeconds`]: remainSeconds }) - - if (remainSeconds == period) { - this.refreshCode(item.id, index) - } - } - }, 1000) - - this.setData({ intervalIdentity }) - }, - clearRefreshInterval() { - if (this.data.intervalIdentity > 0) { - clearInterval(this.data.intervalIdentity) - } - - this.setData({ intervalIdentity: -1 }) - } -}) - -export default {} + data: { + swipeButtons: [ + { text: "备注", className: "btn edit-btn" }, + { text: "删除", className: "btn delete-btn" }, + ] as SwipeButton[], + dialogVisible: false, + dialogConfirmBtn: { content: "删除", variant: "base" }, + dialogDataId: 0, + intervalIdentity: -1, + items: [] as Item[], + }, + onShow() { + this.setupRefreshInterval(); + + this.all(); + }, + onHide() { + this.clearRefreshInterval(); + }, + onUnload() { + this.clearRefreshInterval(); + }, + all() { + Toast({ + message: "加载中...", + theme: "loading", + duration: 5000, + direction: "column", + preventScrollThrough: true, + }); + + api + .all() + .then((response) => { + Toast({ + message: "加载成功", + theme: "success", + duration: 100, + direction: "column", + }); + + this.setData({ items: response }); + }) + .catch((e: HttpError) => { + Toast({ + message: "加载失败", + theme: "error", + duration: 100, + direction: "column", + }); + + Message.error({ + content: `加载失败:${e.message}`, + duration: 5000, + offset: [20, 32], + context: this, + }); + }); + }, + async create() { + const scan = await wx.scanCode({ scanType: ["qrCode"] }).catch(() => { + throw new WeixinError(CODE.WEIXIN_QR_CODE); + }); + + api + .create(scan.result) + .catch((e: HttpError) => + Message.error({ + content: e.message, + duration: 5000, + offset: [20, 32], + context: this, + }), + ) + .finally(() => this.all()); + }, + async edit(id: number) { + this.clearRefreshInterval(); + + await wx.navigateTo({ url: `/pages/totp/edit?id=${id}` }); + }, + refreshCode(id: number, index: number) { + api + .detail(id) + .then((response) => + this.setData({ [`items[${index}].code`]: response.code }), + ) + .catch((e: HttpError) => + Message.error({ + content: `更新验证码失败:${e.message}`, + duration: 5000, + offset: [20, 32], + context: this, + }), + ); + }, + async swipeClick(e: SwipeTap) { + const id = Number(e.currentTarget.dataset.id); + + switch (e.detail.text) { + case "备注": + await this.edit(id); + break; + case "删除": + this.setData({ dialogVisible: true, dialogDataId: id }); + break; + } + }, + dialogConfirm(e: SwipeTap) { + const id = Number(e.currentTarget.dataset.id); + + api + .deleteTotp(id) + .catch((e: HttpError) => + Message.error({ + content: `删除失败:${e.message}`, + duration: 5000, + offset: [20, 32], + context: this, + }), + ) + .finally(() => this.all()); + }, + dialogCancel() { + this.setData({ dialogVisible: false, dialogDataId: 0 }); + }, + setupRefreshInterval() { + const intervalIdentity = setInterval(async () => { + for (const item of this.data.items) { + const index = this.data.items.indexOf(item); + const period = item.period ?? 30; + + let remainSeconds = period - new Date().getSeconds(); + if (remainSeconds <= 0) { + remainSeconds += period; + } + + this.setData({ [`items[${index}].remainSeconds`]: remainSeconds }); + + if (remainSeconds === period) { + this.refreshCode(item.id, index); + } + } + }, 1000); + + this.setData({ intervalIdentity }); + }, + clearRefreshInterval() { + if (this.data.intervalIdentity > 0) { + clearInterval(this.data.intervalIdentity); + } + + this.setData({ intervalIdentity: -1 }); + }, +}); + +export default {}; diff --git a/miniprogram/pages/user/edit.json b/miniprogram/pages/user/edit.json index 75fc1e6..67536bf 100644 --- a/miniprogram/pages/user/edit.json +++ b/miniprogram/pages/user/edit.json @@ -1,9 +1,9 @@ { - "usingComponents": { - "t-message": "tdesign-miniprogram/message/message", - "t-avatar": "tdesign-miniprogram/avatar/avatar", - "t-input": "tdesign-miniprogram/input/input", - "t-button": "tdesign-miniprogram/button/button", - "t-toast": "tdesign-miniprogram/toast/toast" - } -} \ No newline at end of file + "usingComponents": { + "t-message": "tdesign-miniprogram/message/message", + "t-avatar": "tdesign-miniprogram/avatar/avatar", + "t-input": "tdesign-miniprogram/input/input", + "t-button": "tdesign-miniprogram/button/button", + "t-toast": "tdesign-miniprogram/toast/toast" + } +} diff --git a/miniprogram/pages/user/edit.ts b/miniprogram/pages/user/edit.ts index a2f058d..a187e70 100644 --- a/miniprogram/pages/user/edit.ts +++ b/miniprogram/pages/user/edit.ts @@ -1,95 +1,100 @@ -import Message from 'tdesign-miniprogram/message/index' -import Toast from 'tdesign-miniprogram/toast/index' -import api from '@api/user' -import user from '@utils/user' -import error from '@utils/error' +import api from "@api/user"; +import { STORAGE } from "@constant/app"; +import { DEFAULT } from "@constant/user"; +import error from "@utils/error"; +import user from "@utils/user"; +import Message from "tdesign-miniprogram/message/index"; +import Toast from "tdesign-miniprogram/toast/index"; +import type { UpdateRequest, User } from "types/user"; import type { - ChooseAvatarButtonTap, - FormSubmit, - WxGetFileSystemManagerReadFileSuccess, - WxGetStorageSuccess -} from 'types/wechat' -import { STORAGE } from '@constant/app' -import type { UpdateRequest, User } from 'types/user' -import { DEFAULT } from '@constant/user' + ChooseAvatarButtonTap, + FormSubmit, + WxGetFileSystemManagerReadFileSuccess, + WxGetStorageSuccess, +} from "types/wechat"; interface FormData { - avatar: string - nickname: string - slogan: string + avatar: string; + nickname: string; + slogan: string; } Page({ - data: { - avatar: DEFAULT.avatar, - nickname: DEFAULT.nickname, - slogan: DEFAULT.slogan - }, - async onShow() { - const storage: WxGetStorageSuccess = await wx.getStorage({ key: STORAGE.USER }) + data: { + avatar: DEFAULT.avatar, + nickname: DEFAULT.nickname, + slogan: DEFAULT.slogan, + }, + async onShow() { + const storage: WxGetStorageSuccess = await wx.getStorage({ + key: STORAGE.USER, + }); - this.setData({ - avatar: storage.data.avatar, - nickname: storage.data.nickname, - slogan: storage.data.slogan - }) - }, - async onChooseAvatar(e: ChooseAvatarButtonTap) { - await wx.showLoading({ title: '上传中', icon: 'loading', mask: true }) + this.setData({ + avatar: storage.data.avatar, + nickname: storage.data.nickname, + slogan: storage.data.slogan, + }); + }, + async onChooseAvatar(e: ChooseAvatarButtonTap) { + await wx.showLoading({ title: "上传中", icon: "loading", mask: true }); - const res = await wx.compressImage({ src: e.detail.avatarUrl.toString(), quality: 50 }) + const res = await wx.compressImage({ + src: e.detail.avatarUrl.toString(), + quality: 50, + }); - wx.getFileSystemManager().readFile({ - filePath: res.tempFilePath, - encoding: 'base64', - success: async (res: WxGetFileSystemManagerReadFileSuccess) => { - this.setData({ avatar: 'data:image/jpeg;base64,' + res.data }) + wx.getFileSystemManager().readFile({ + filePath: res.tempFilePath, + encoding: "base64", + success: async (res: WxGetFileSystemManagerReadFileSuccess) => { + this.setData({ avatar: `data:image/jpeg;base64,${res.data}` }); - await wx.hideLoading() - } - }) - }, - async submit(e: FormSubmit) { - Toast({ - message: '更新中...', - theme: 'loading', - duration: 5000, - direction: 'column', - preventScrollThrough: true - }) + await wx.hideLoading(); + }, + }); + }, + async submit(e: FormSubmit) { + Toast({ + message: "更新中...", + theme: "loading", + duration: 5000, + direction: "column", + preventScrollThrough: true, + }); - try { - await api.update(e.detail.value as UpdateRequest) + try { + await api.update(e.detail.value as UpdateRequest); - // 同步完成之后更新下全局的用户信息状态 - await user.sync() + // 同步完成之后更新下全局的用户信息状态 + await user.sync(); - Toast({ - message: '修改成功', - theme: 'success', - duration: 1500, - direction: 'column', - preventScrollThrough: true - }) + Toast({ + message: "修改成功", + theme: "success", + duration: 1500, + direction: "column", + preventScrollThrough: true, + }); - setTimeout(() => wx.navigateBack(), 1500) - } catch (e: unknown) { - Toast({ - message: '更新失败', - theme: 'error', - duration: 100, - direction: 'column' - }) + setTimeout(() => wx.navigateBack(), 1500); + } catch (e: unknown) { + Toast({ + message: "更新失败", + theme: "error", + duration: 100, + direction: "column", + }); - Message.error({ - content: '更新失败:' + error.getErrorMessage(e), - duration: 5000, - context: this, - offset: [20, 32] - }) - } - }, - async cancel() { - await wx.navigateBack() - } -}) + Message.error({ + content: `更新失败:${error.getErrorMessage(e)}`, + duration: 5000, + context: this, + offset: [20, 32], + }); + } + }, + async cancel() { + await wx.navigateBack(); + }, +}); diff --git a/miniprogram/pages/user/index.json b/miniprogram/pages/user/index.json index a85271f..65ace2e 100644 --- a/miniprogram/pages/user/index.json +++ b/miniprogram/pages/user/index.json @@ -1,5 +1,5 @@ { - "usingComponents": { - "t-cell": "tdesign-miniprogram/cell/cell" - } -} \ No newline at end of file + "usingComponents": { + "t-cell": "tdesign-miniprogram/cell/cell" + } +} diff --git a/miniprogram/pages/user/index.ts b/miniprogram/pages/user/index.ts index 18d37ae..1516540 100644 --- a/miniprogram/pages/user/index.ts +++ b/miniprogram/pages/user/index.ts @@ -1,24 +1,24 @@ -import { DEFAULT } from '@constant/user' -import utils from '@utils/user' -import type { User } from 'types/user' +import { DEFAULT } from "@constant/user"; +import utils from "@utils/user"; +import type { User } from "types/user"; Page({ - data: { - avatar: DEFAULT.avatar, - nickname: DEFAULT.nickname, - slogan: DEFAULT.slogan - }, - async onShow() { - const user: User = await utils.detail() + data: { + avatar: DEFAULT.avatar, + nickname: DEFAULT.nickname, + slogan: DEFAULT.slogan, + }, + async onShow() { + const user: User = await utils.detail(); - this.setData({ - avatar: user.avatar, - nickname: user.nickname, - slogan: user.slogan - }) - }, - onHide() {}, - onReady() {} -}) + this.setData({ + avatar: user.avatar, + nickname: user.nickname, + slogan: user.slogan, + }); + }, + onHide() {}, + onReady() {}, +}); -export default {} +export default {}; diff --git a/miniprogram/sitemap.json b/miniprogram/sitemap.json index ca02add..ebdec9f 100644 --- a/miniprogram/sitemap.json +++ b/miniprogram/sitemap.json @@ -1,7 +1,9 @@ { - "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", - "rules": [{ - "action": "allow", - "page": "*" - }] -} \ No newline at end of file + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [ + { + "action": "allow", + "page": "*" + } + ] +} diff --git a/miniprogram/types/accessToken.ts b/miniprogram/types/accessToken.ts index 1a4b091..aae1a79 100644 --- a/miniprogram/types/accessToken.ts +++ b/miniprogram/types/accessToken.ts @@ -1,9 +1,9 @@ -import { RequestData } from './http' +import type { RequestData } from "./http"; export interface LoginRequest extends RequestData { - code: string + code: string; } export interface LoginResponse { - access_token: string + access_token: string; } diff --git a/miniprogram/types/app.d.ts b/miniprogram/types/app.d.ts index 7076752..e69de29 100644 --- a/miniprogram/types/app.d.ts +++ b/miniprogram/types/app.d.ts @@ -1 +0,0 @@ -export interface GlobalData {} diff --git a/miniprogram/types/http.d.ts b/miniprogram/types/http.d.ts index 2db25cc..b5479fa 100644 --- a/miniprogram/types/http.d.ts +++ b/miniprogram/types/http.d.ts @@ -1,27 +1,43 @@ export interface Request { - url: string - query?: RequestQuery - data?: RequestData - headers?: RequestHeaders - method?: 'POST' | 'OPTIONS' | 'GET' | 'HEAD' | 'PUT' | 'DELETE' | 'TRACE' | 'CONNECT' | undefined - timeout?: number - isUploadFile?: boolean + url: string; + query?: RequestQuery; + data?: RequestData; + headers?: RequestHeaders; + method?: + | "POST" + | "OPTIONS" + | "GET" + | "HEAD" + | "PUT" + | "DELETE" + | "TRACE" + | "CONNECT" + | undefined; + timeout?: number; + isUploadFile?: boolean; } export interface RequestQuery { - [key: string]: number | string + [key: string]: number | string; } export interface RequestData { - [key: string]: number | string | object | number[] | string[] | object[] | undefined + [key: string]: + | number + | string + | object + | number[] + | string[] + | object[] + | undefined; } export interface RequestHeaders { - [key: string]: number | string + [key: string]: number | string; } export interface Response { - code: number | string - message: string - data: T + code: number | string; + message: string; + data: T; } diff --git a/miniprogram/types/shortUrl.d.ts b/miniprogram/types/shortUrl.d.ts index 6f2235e..2e2cbca 100644 --- a/miniprogram/types/shortUrl.d.ts +++ b/miniprogram/types/shortUrl.d.ts @@ -1,10 +1,10 @@ -import { RequestData } from './http' +import type { RequestData } from "./http"; export interface CreateRequest extends RequestData { - url: string + url: string; } export interface CreateResponse { - url: string - short: string + url: string; + short: string; } diff --git a/miniprogram/types/tdesign.d.ts b/miniprogram/types/tdesign.d.ts index 2e14b4d..7a86ab5 100644 --- a/miniprogram/types/tdesign.d.ts +++ b/miniprogram/types/tdesign.d.ts @@ -1,11 +1,11 @@ -import { Tap } from './wechat' +import type { Tap } from "./wechat"; export interface TabbarTap extends Tap { - detail: { - value: string - } + detail: { + value: string; + }; } export interface SwipeTap extends Tap { - detail: DETAIL + detail: DETAIL; } diff --git a/miniprogram/types/totp.d.ts b/miniprogram/types/totp.d.ts index cc1a064..3476715 100644 --- a/miniprogram/types/totp.d.ts +++ b/miniprogram/types/totp.d.ts @@ -1,30 +1,33 @@ -import { RequestData } from './http' +import type { RequestData } from "./http"; export interface Item { - id: number - issuer: string - username: string - code: string - period: number - remainSeconds?: number + id: number; + issuer: string; + username: string; + code: string; + period: number; + remainSeconds?: number; } export interface DetailRequest extends RequestData { - id: number + id: number; } export interface UpdateRequest extends RequestData { - id: number - issuer: string - username: string + id: number; + issuer: string; + username: string; } export interface CreateRequest extends RequestData { - uri: string + uri: string; } export interface DeleteRequest extends RequestData { - id: number + id: number; } -export interface Response {} +export interface Response { + code: number; + message: string; +} diff --git a/miniprogram/types/user.d.ts b/miniprogram/types/user.d.ts index b0703a8..a150f8c 100644 --- a/miniprogram/types/user.d.ts +++ b/miniprogram/types/user.d.ts @@ -1,27 +1,27 @@ -import { RequestData } from './http' +import type { RequestData } from "./http"; export interface DetailResponse { - open_id: string - avatar: string - nickname: string - slogan: string + open_id: string; + avatar: string; + nickname: string; + slogan: string; } export interface UpdateRequest extends RequestData { - avatar?: string - nickname?: string - slogan?: string + avatar?: string; + nickname?: string; + slogan?: string; } export interface UpdateResponse { - open_id: string - avatar: string - nickname: string - slogan: string + open_id: string; + avatar: string; + nickname: string; + slogan: string; } export interface User { - avatar: string - nickname: string - slogan: string + avatar: string; + nickname: string; + slogan: string; } diff --git a/miniprogram/types/wechat.d.ts b/miniprogram/types/wechat.d.ts index 8600729..ce49fec 100644 --- a/miniprogram/types/wechat.d.ts +++ b/miniprogram/types/wechat.d.ts @@ -1,62 +1,62 @@ -import { Response } from './http' +import type { Response } from "./http"; export interface WxRequestSuccess { - data: Response - statusCode: number - header: object + data: Response; + statusCode: number; + header: object; } export interface WxRequestFail { - errno: number - errMsg: string + errno: number; + errMsg: string; } export interface AppOnUnhandledRejection { - /** 被拒绝的 Promise 对象 */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - promise: Promise - /** 拒绝原因,一般是一个 Error 对象 */ - reason: Error | string + /** 被拒绝的 Promise 对象 */ + // biome-ignore lint: 微信的提示,不改变 + promise: Promise; + /** 拒绝原因,一般是一个 Error 对象 */ + reason: Error | string; } export interface Tap { - type: string - currentTarget: { - id: string - dataset: T - } - target: { - id: string - dataset: D - } + type: string; + currentTarget: { + id: string; + dataset: T; + }; + target: { + id: string; + dataset: D; + }; } export interface FormSubmit { - detail: { - formId: string - value: T - } + detail: { + formId: string; + value: T; + }; } export interface ChooseAvatarButtonTap extends Tap { - detail: { - avatarUrl: string - } + detail: { + avatarUrl: string; + }; } export interface WxGetFileSystemManagerReadFileSuccess { - data: string | ArrayBuffer + data: string | ArrayBuffer; } export interface WxGetUpdateManagerOnCheckForUpdateResult { - hasUpdate: boolean + hasUpdate: boolean; } export interface WxLoginSuccessCallbackResult { - code: string - errMsg: string + code: string; + errMsg: string; } export interface WxGetStorageSuccess { - data: T + data: T; } diff --git a/miniprogram/utils/error.ts b/miniprogram/utils/error.ts index bddf1e3..6055bde 100644 --- a/miniprogram/utils/error.ts +++ b/miniprogram/utils/error.ts @@ -1,7 +1,7 @@ -import { EE } from '@models/error' +import { EE } from "@models/error"; const getErrorMessage = (e: unknown) => { - return e instanceof Error || e instanceof EE ? e.message : '未知异常' -} + return e instanceof Error || e instanceof EE ? e.message : "未知异常"; +}; -export default { getErrorMessage } +export default { getErrorMessage }; diff --git a/miniprogram/utils/http.ts b/miniprogram/utils/http.ts index 789099b..468d86a 100644 --- a/miniprogram/utils/http.ts +++ b/miniprogram/utils/http.ts @@ -1,131 +1,145 @@ -import { STORAGE, URL } from '@constant/app' -import { CODE, WECHAT_MESSAGE } from '@constant/error' -import { HttpError } from '@models/error' -import logger from '@utils/logger' -import type { Request, RequestData, RequestQuery, Response } from 'types/http' -import type { WxRequestFail, WxRequestSuccess } from 'types/wechat' +import { STORAGE, URL } from "@constant/app"; +import { CODE, WECHAT_MESSAGE } from "@constant/error"; +import { HttpError } from "@models/error"; +import logger from "@utils/logger"; +import type { Request, RequestData, RequestQuery, Response } from "types/http"; +import type { WxRequestFail, WxRequestSuccess } from "types/wechat"; const formatUrl = (request: Request): void => { - // 处理 url 的 query - if (typeof request.query != 'undefined') { - const query = request.query + // 处理 url 的 query + if (typeof request.query !== "undefined") { + const query = request.query; - const paramsArray: string[] = [] + const paramsArray: string[] = []; - Object.keys(request.query).forEach( - (key) => query[key] && paramsArray.push(`${key}=${query[key]}`) - ) + // biome-ignore lint: no-check + Object.keys(request.query).forEach( + (key) => query[key] && paramsArray.push(`${key}=${query[key]}`), + ); - request.url += (request.url.search(/\?/) === -1 ? '?' : '&') + `${paramsArray.join('&')}` - } + request.url += `${ + request.url.search(/\?/) === -1 ? "?" : "&" + }${paramsArray.join("&")}`; + } - // 处理 url - if (request.url.startsWith('/')) { - request.url = URL.BASE + request.url - } -} + // 处理 url + if (request.url.startsWith("/")) { + request.url = URL.BASE + request.url; + } +}; const formatHeaders = (request: Request): void => { - if (typeof request.headers == 'undefined') { - request.headers = {} - } + if (typeof request.headers === "undefined") { + request.headers = {}; + } - request.headers.authorization = 'Bearer ' + wx.getStorageSync(STORAGE.ACCESS_TOKEN) || '' -} + request.headers.authorization = + `Bearer·${wx.getStorageSync(STORAGE.ACCESS_TOKEN)}` || ""; +}; const request = (request: Request): Promise => { - formatUrl(request) - formatHeaders(request) + formatUrl(request); + formatHeaders(request); - if (request.isUploadFile) { - return wxUpload(request) - } + if (request.isUploadFile) { + return wxUpload(request); + } - return wxRequest(request) -} + return wxRequest(request); +}; const wxRequest = (request: Request) => { - logger.info('请求接口', request.url.indexOf('users/update') === -1 ? request : '用户更新') - - return new Promise((resolve, reject) => { - wx.request({ - url: request.url, - data: request.data || {}, - header: request.headers ?? {}, - timeout: request.timeout || 5000, - method: request.method || 'GET', - success: (res: WxRequestSuccess) => { - logger.info('接口请求成功', request.url.indexOf('users/detail') === -1 ? res : '用户详情') - - if (Number(res.data.code) === 0) { - resolve(res.data.data) - } - - reject(new HttpError(Number(res.data.code), res.data.message)) - }, - fail: (err: WxRequestFail) => { - logger.warning('接口请求失败', err) - - reject( - new HttpError( - err.errno, - WECHAT_MESSAGE[err.errno as keyof typeof WECHAT_MESSAGE] || - '接口请求失败:' + err.errMsg - ) - ) - } - }) - }) -} + logger.info( + "请求接口", + request.url.indexOf("users/update") === -1 ? request : "用户更新", + ); + + return new Promise((resolve, reject) => { + wx.request({ + url: request.url, + data: request.data || {}, + header: request.headers ?? {}, + timeout: request.timeout || 5000, + method: request.method || "GET", + success: (res: WxRequestSuccess) => { + logger.info( + "接口请求成功", + request.url.indexOf("users/detail") === -1 ? res : "用户详情", + ); + + if (Number(res.data.code) === 0) { + resolve(res.data.data); + } + + reject(new HttpError(Number(res.data.code), res.data.message)); + }, + fail: (err: WxRequestFail) => { + logger.warning("接口请求失败", err); + + reject( + new HttpError( + err.errno, + WECHAT_MESSAGE[err.errno as keyof typeof WECHAT_MESSAGE] || + `接口请求失败:${err.errMsg}`, + ), + ); + }, + }); + }); +}; const wxUpload = (request: Request) => { - logger.info('请求上传接口', request.url, request.headers) - - return new Promise((resolve, reject) => { - const filePath: string = (request.data?.filePath ?? '') as string - const name: string = (request.data?.name ?? '') as string - const formData = request.data ?? {} - - if (!filePath || !name) { - reject(new HttpError(CODE.HTTP_PARAMS)) - } - - delete formData.filePath - delete formData.name - - wx.uploadFile({ - url: request.url, - filePath, - name, - formData, - header: request.headers ?? {}, - timeout: request.timeout || 30000, - success: (res) => { - logger.info('接口请求成功', res) - - const response = JSON.parse(res.data) as Response - - if (response.code == 0) { - resolve(response.data) - } - - reject(new HttpError(Number(response.code), response.message)) - }, - fail: (err) => { - logger.warning('接口请求失败', err) - - reject(new HttpError(undefined, '接口请求失败:' + err.errMsg)) - } - }) - }) -} - -const post = (url: string, data?: RequestData, isUploadFile?: boolean): Promise => { - return request({ url, data, isUploadFile, method: 'POST' } as Request) -} + logger.info("请求上传接口", request.url, request.headers); + + return new Promise((resolve, reject) => { + const filePath: string = (request.data?.filePath ?? "") as string; + const name: string = (request.data?.name ?? "") as string; + const formData = request.data ?? {}; + + if (!filePath || !name) { + reject(new HttpError(CODE.HTTP_PARAMS)); + } + + formData.filePath = undefined; + formData.name = undefined; + + wx.uploadFile({ + url: request.url, + filePath, + name, + formData, + header: request.headers ?? {}, + timeout: request.timeout || 30000, + success: (res) => { + logger.info("接口请求成功", res); + + const response = JSON.parse(res.data) as Response; + + if (response.code === 0) { + resolve(response.data); + } + + reject(new HttpError(Number(response.code), response.message)); + }, + fail: (err) => { + logger.warning("接口请求失败", err); + + reject(new HttpError(undefined, `接口请求失败:${err.errMsg}`)); + }, + }); + }); +}; + +const post = ( + url: string, + data?: RequestData, + isUploadFile?: boolean, +): Promise => { + return request({ url, data, isUploadFile, method: "POST" } as Request); +}; const get = (url: string, query?: RequestQuery): Promise => { - return request({ url, query, method: 'GET' } as Request) -} + return request({ url, query, method: "GET" } as Request); +}; -export default { request, post, get } +export default { request, post, get }; diff --git a/miniprogram/utils/logger.ts b/miniprogram/utils/logger.ts index c6dab5b..95db955 100644 --- a/miniprogram/utils/logger.ts +++ b/miniprogram/utils/logger.ts @@ -1,16 +1,18 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -const l = wx.getRealtimeLogManager ? wx.getRealtimeLogManager() : null +const l = wx.getRealtimeLogManager ? wx.getRealtimeLogManager() : null; const logger = { - info: (...args: any[]) => { - l?.info(args) - }, - warning: (...args: any[]) => { - l?.warn(args) - }, - error: (...args: any[]) => { - l?.error(args) - } -} + // biome-ignore lint: 日志 + info: (...args: any[]) => { + l?.info(args); + }, + // biome-ignore lint: 日志 + warning: (...args: any[]) => { + l?.warn(args); + }, + // biome-ignore lint: 日志 + error: (...args: any[]) => { + l?.error(args); + }, +}; -export default logger +export default logger; diff --git a/miniprogram/utils/user.ts b/miniprogram/utils/user.ts index c531cef..36e6590 100644 --- a/miniprogram/utils/user.ts +++ b/miniprogram/utils/user.ts @@ -1,33 +1,35 @@ -import api from '@api/user' -import { STORAGE } from '@constant/app' -import { DEFAULT } from '@constant/user' -import type { User } from 'types/user' -import { WxGetStorageSuccess } from 'types/wechat' +import api from "@api/user"; +import { STORAGE } from "@constant/app"; +import { DEFAULT } from "@constant/user"; +import type { User } from "types/user"; +import type { WxGetStorageSuccess } from "types/wechat"; const detail = async (): Promise => { - try { - const storage: WxGetStorageSuccess = await wx.getStorage({ key: STORAGE.USER }) + try { + const storage: WxGetStorageSuccess = await wx.getStorage({ + key: STORAGE.USER, + }); - return storage.data - } catch (e) { - /* empty */ - } + return storage.data; + } catch (e) { + /* empty */ + } - return sync() -} + return sync(); +}; const sync = async (): Promise => { - const detail = await api.detail() + const detail = await api.detail(); - const user: User = { - avatar: detail.avatar || DEFAULT.avatar, - nickname: detail.nickname || DEFAULT.nickname, - slogan: detail.slogan || DEFAULT.slogan - } + const user: User = { + avatar: detail.avatar || DEFAULT.avatar, + nickname: detail.nickname || DEFAULT.nickname, + slogan: detail.slogan || DEFAULT.slogan, + }; - wx.setStorageSync(STORAGE.USER, user) + wx.setStorageSync(STORAGE.USER, user); - return user -} + return user; +}; -export default { detail, sync } +export default { detail, sync }; diff --git a/package.json b/package.json index 0a09f5e..bea5ffc 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "yansongda", - "version": "1.4.2", + "version": "1.4.3", "description": "miniprogram for yansongda", "type": "module", "scripts": { - "lint": "eslint -c eslint.config.js .", - "lint:fix": "pnpm lint --fix" + "biome:check": "biome check miniprogram", + "biome:fix": "biome check --apply miniprogram" }, "keywords": [ "miniprogram", @@ -14,12 +14,9 @@ "author": "me@yansongda.cn", "license": "MIT", "devDependencies": { - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.1.3", + "@biomejs/biome": "1.7.2", "miniprogram-api-typings": "^3.12.2", - "prettier": "^3.2.5", - "typescript": "^5.4.5", - "typescript-eslint": "^7.8.0" + "typescript": "^5.4.5" }, "dependencies": { "tdesign-miniprogram": "^1.3.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b00324..6da1408 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,1201 +12,128 @@ importers: specifier: ^1.3.1 version: 1.3.1 devDependencies: - eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@8.57.0) - eslint-plugin-prettier: - specifier: ^5.1.3 - version: 5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.2.5) + '@biomejs/biome': + specifier: 1.7.2 + version: 1.7.2 miniprogram-api-typings: specifier: ^3.12.2 version: 3.12.2 - prettier: - specifier: ^3.2.5 - version: 3.2.5 typescript: specifier: ^5.4.5 version: 5.4.5 - typescript-eslint: - specifier: ^7.8.0 - version: 7.8.0(eslint@8.57.0)(typescript@5.4.5) packages: - '@eslint-community/eslint-utils@4.4.0': - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - - '@eslint-community/regexpp@4.10.0': - resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - '@eslint/js@8.57.0': - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - '@humanwhocodes/config-array@0.11.14': - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} - engines: {node: '>=10.10.0'} - - '@humanwhocodes/module-importer@1.0.1': - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - - '@nodelib/fs.scandir@2.1.5': - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} - - '@nodelib/fs.stat@2.0.5': - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} - - '@nodelib/fs.walk@1.2.8': - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} - - '@pkgr/core@0.1.1': - resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - - '@types/json-schema@7.0.15': - resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - - '@types/semver@7.5.8': - resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} - - '@typescript-eslint/eslint-plugin@7.8.0': - resolution: {integrity: sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/parser@7.8.0': - resolution: {integrity: sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/scope-manager@7.8.0': - resolution: {integrity: sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==} - engines: {node: ^18.18.0 || >=20.0.0} - - '@typescript-eslint/type-utils@7.8.0': - resolution: {integrity: sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/types@7.8.0': - resolution: {integrity: sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==} - engines: {node: ^18.18.0 || >=20.0.0} - - '@typescript-eslint/typescript-estree@7.8.0': - resolution: {integrity: sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/utils@7.8.0': - resolution: {integrity: sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - - '@typescript-eslint/visitor-keys@7.8.0': - resolution: {integrity: sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==} - engines: {node: ^18.18.0 || >=20.0.0} - - '@ungap/structured-clone@1.2.0': - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - - acorn-jsx@5.3.2: - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - - acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} - engines: {node: '>=0.4.0'} + '@biomejs/biome@1.7.2': + resolution: {integrity: sha512-6Skx9N47inLQzYi9RKgJ7PBnUnaHnMe/imqX43cOcJjZtfMnQLxEvfM2Eyo7gChkwrZlwc+VbA4huFRjw2fsYA==} + engines: {node: '>=14.21.3'} hasBin: true - ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - - array-union@2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} - - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - - brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - - brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - - braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - - cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} - engines: {node: '>= 8'} + '@biomejs/cli-darwin-arm64@1.7.2': + resolution: {integrity: sha512-CrldIueHivWEWmeTkK8bTXajeX53F8i2Rrkkt8cPZyMtzkrwxf8Riq4a/jz3SQBHkxHFT4TqGbSTNMXe3X1ogA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + + '@biomejs/cli-darwin-x64@1.7.2': + resolution: {integrity: sha512-UELnLJuJOsTL9meArvn8BtiXDURyPil2Ej9me2uVpEvee8UQdqd/bssP5we400OWShlL1AAML4fn6d2WX5332g==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + + '@biomejs/cli-linux-arm64-musl@1.7.2': + resolution: {integrity: sha512-kKYZiem7Sj7wI0dpVxJlK7C+TFQwzO/ctufIGXGJAyEmUe9vEKSzV8CXpv+JIRiTWyqaZJ4K+eHz4SPdPCv05w==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-arm64@1.7.2': + resolution: {integrity: sha512-Z1CSGQE6fHz55gkiFHv9E8wEAaSUd7dHSRaxSCBa7utonHqpIeMbvj3Evm1w0WfGLFDtRXLV1fTfEdM0FMTOhA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-x64-musl@1.7.2': + resolution: {integrity: sha512-x10LpGMepDrLS+h2TZ6/T7egpHjGKtiI4GuShNylmBQJWfTotbFf9eseHggrqJ4WZf9yrGoVYrtbxXftuB95sQ==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-linux-x64@1.7.2': + resolution: {integrity: sha512-vXXyox8/CQijBxAu0+r8FfSO7JlC4tob3PbaFda8gPJFRz2uFJw39HtxVUwbTV1EcU6wSPh4SiRu5sZfP1VHrQ==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-win32-arm64@1.7.2': + resolution: {integrity: sha512-kRXdlKzcU7INf6/ldu0nVmkOgt7bKqmyXRRCUqqaJfA32+9InTbkD8tGrHZEVYIWr+eTuKcg16qZVDsPSDFZ8g==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + + '@biomejs/cli-win32-x64@1.7.2': + resolution: {integrity: sha512-qHTtpAs+CNglAAuaTy09htoqUhrQyd3nd0aGTuLNqD10h1llMVi8WFZfoa+e5MuDSfYtMK6nW2Tbf6WgzzR1Qw==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] dayjs@1.11.11: resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==} - debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - - dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} - - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - - eslint-plugin-prettier@5.1.3: - resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - '@types/eslint': '>=8.0.0' - eslint: '>=8.0.0' - eslint-config-prettier: '*' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true - - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - hasBin: true - - espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} - engines: {node: '>=0.10'} - - esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} - - estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - - esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - - fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - - fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - - fast-glob@3.3.2: - resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} - engines: {node: '>=8.6.0'} - - fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - - fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - - fastq@1.17.1: - resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} - - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} - - fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} - - flatted@3.3.1: - resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} - - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - - glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - - glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} - - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} - - globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} - - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} - engines: {node: '>= 4'} - - import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} - - imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - - is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - - is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - - is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - - js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - - json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - - json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - - json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - - keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - - levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} - - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - - lru-cache@6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - - merge2@1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} - - micromatch@4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} - engines: {node: '>=8.6'} - - minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - - minimatch@9.0.4: - resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} - engines: {node: '>=16 || 14 >=14.17'} - miniprogram-api-typings@3.12.2: resolution: {integrity: sha512-OJB2uVAfhycX4teG/zEVpoThushQqLOx946XACDpVc6OQydiJWjn7djVzvNCbv0VOA7sbHGPQp/RkXD9vMCDEw==} - ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - - natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - - optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} - engines: {node: '>= 0.8.0'} - - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - - path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - - path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - - picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - - prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - - prettier-linter-helpers@1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} - engines: {node: '>=6.0.0'} - - prettier@3.2.5: - resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} - engines: {node: '>=14'} - hasBin: true - - punycode@2.3.1: - resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} - engines: {node: '>=6'} - - queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - - reusify@1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true - - run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - - semver@7.6.0: - resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} - engines: {node: '>=10'} - hasBin: true - - shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - - shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - - slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - - synckit@0.8.8: - resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} - engines: {node: ^14.18.0 || >=16.0.0} - tdesign-miniprogram@1.3.1: resolution: {integrity: sha512-6IDYFk8voXW16FgX5IiYtjEs2Hk2NXFts5VDmDaUwDDM4MmjRRgifFmW0U6mg9mJCGNGrfkzc6vfIz5C/1ycDg==} - text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - - to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - - ts-api-utils@1.3.0: - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' - - tslib@2.6.2: - resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - - type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} - - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - - typescript-eslint@7.8.0: - resolution: {integrity: sha512-sheFG+/D8N/L7gC3WT0Q8sB97Nm573Yfr+vZFzl/4nBdYcmviBPtwGSX9TJ7wpVg28ocerKVOt+k2eGmHzcgVA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - typescript@5.4.5: resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} engines: {node: '>=14.17'} hasBin: true - uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - - yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - snapshots: - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': - dependencies: - eslint: 8.57.0 - eslint-visitor-keys: 3.4.3 - - '@eslint-community/regexpp@4.10.0': {} - - '@eslint/eslintrc@2.1.4': - dependencies: - ajv: 6.12.6 - debug: 4.3.4 - espree: 9.6.1 - globals: 13.24.0 - ignore: 5.3.1 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - - '@eslint/js@8.57.0': {} - - '@humanwhocodes/config-array@0.11.14': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.4 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@humanwhocodes/module-importer@1.0.1': {} - - '@humanwhocodes/object-schema@2.0.3': {} - - '@nodelib/fs.scandir@2.1.5': - dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 - - '@nodelib/fs.stat@2.0.5': {} - - '@nodelib/fs.walk@1.2.8': - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.17.1 - - '@pkgr/core@0.1.1': {} - - '@types/json-schema@7.0.15': {} - - '@types/semver@7.5.8': {} - - '@typescript-eslint/eslint-plugin@7.8.0(@typescript-eslint/parser@7.8.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': - dependencies: - '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.8.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.8.0 - '@typescript-eslint/type-utils': 7.8.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.8.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.8.0 - debug: 4.3.4 - eslint: 8.57.0 - graphemer: 1.4.0 - ignore: 5.3.1 - natural-compare: 1.4.0 - semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.5) - optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@7.8.0(eslint@8.57.0)(typescript@5.4.5)': - dependencies: - '@typescript-eslint/scope-manager': 7.8.0 - '@typescript-eslint/types': 7.8.0 - '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.8.0 - debug: 4.3.4 - eslint: 8.57.0 - optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/scope-manager@7.8.0': - dependencies: - '@typescript-eslint/types': 7.8.0 - '@typescript-eslint/visitor-keys': 7.8.0 - - '@typescript-eslint/type-utils@7.8.0(eslint@8.57.0)(typescript@5.4.5)': - dependencies: - '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.8.0(eslint@8.57.0)(typescript@5.4.5) - debug: 4.3.4 - eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.4.5) - optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/types@7.8.0': {} - - '@typescript-eslint/typescript-estree@7.8.0(typescript@5.4.5)': - dependencies: - '@typescript-eslint/types': 7.8.0 - '@typescript-eslint/visitor-keys': 7.8.0 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.4 - semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.5) + '@biomejs/biome@1.7.2': optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@7.8.0(eslint@8.57.0)(typescript@5.4.5)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@types/json-schema': 7.0.15 - '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.8.0 - '@typescript-eslint/types': 7.8.0 - '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) - eslint: 8.57.0 - semver: 7.6.0 - transitivePeerDependencies: - - supports-color - - typescript - - '@typescript-eslint/visitor-keys@7.8.0': - dependencies: - '@typescript-eslint/types': 7.8.0 - eslint-visitor-keys: 3.4.3 + '@biomejs/cli-darwin-arm64': 1.7.2 + '@biomejs/cli-darwin-x64': 1.7.2 + '@biomejs/cli-linux-arm64': 1.7.2 + '@biomejs/cli-linux-arm64-musl': 1.7.2 + '@biomejs/cli-linux-x64': 1.7.2 + '@biomejs/cli-linux-x64-musl': 1.7.2 + '@biomejs/cli-win32-arm64': 1.7.2 + '@biomejs/cli-win32-x64': 1.7.2 - '@ungap/structured-clone@1.2.0': {} + '@biomejs/cli-darwin-arm64@1.7.2': + optional: true - acorn-jsx@5.3.2(acorn@8.11.3): - dependencies: - acorn: 8.11.3 - - acorn@8.11.3: {} - - ajv@6.12.6: - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - - ansi-regex@5.0.1: {} + '@biomejs/cli-darwin-x64@1.7.2': + optional: true - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 + '@biomejs/cli-linux-arm64-musl@1.7.2': + optional: true - argparse@2.0.1: {} + '@biomejs/cli-linux-arm64@1.7.2': + optional: true - array-union@2.1.0: {} + '@biomejs/cli-linux-x64-musl@1.7.2': + optional: true - balanced-match@1.0.2: {} - - brace-expansion@1.1.11: - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - - brace-expansion@2.0.1: - dependencies: - balanced-match: 1.0.2 - - braces@3.0.2: - dependencies: - fill-range: 7.0.1 - - callsites@3.1.0: {} - - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 + '@biomejs/cli-linux-x64@1.7.2': + optional: true - color-name@1.1.4: {} + '@biomejs/cli-win32-arm64@1.7.2': + optional: true - concat-map@0.0.1: {} - - cross-spawn@7.0.3: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 + '@biomejs/cli-win32-x64@1.7.2': + optional: true dayjs@1.11.11: {} - debug@4.3.4: - dependencies: - ms: 2.1.2 - - deep-is@0.1.4: {} - - dir-glob@3.0.1: - dependencies: - path-type: 4.0.0 - - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - - escape-string-regexp@4.0.0: {} - - eslint-config-prettier@9.1.0(eslint@8.57.0): - dependencies: - eslint: 8.57.0 - - eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.2.5): - dependencies: - eslint: 8.57.0 - prettier: 3.2.5 - prettier-linter-helpers: 1.0.0 - synckit: 0.8.8 - optionalDependencies: - eslint-config-prettier: 9.1.0(eslint@8.57.0) - - eslint-scope@7.2.2: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-visitor-keys@3.4.3: {} - - eslint@8.57.0: - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.10.0 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.4 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.5.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 - ignore: 5.3.1 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - - espree@9.6.1: - dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) - eslint-visitor-keys: 3.4.3 - - esquery@1.5.0: - dependencies: - estraverse: 5.3.0 - - esrecurse@4.3.0: - dependencies: - estraverse: 5.3.0 - - estraverse@5.3.0: {} - - esutils@2.0.3: {} - - fast-deep-equal@3.1.3: {} - - fast-diff@1.3.0: {} - - fast-glob@3.3.2: - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.5 - - fast-json-stable-stringify@2.1.0: {} - - fast-levenshtein@2.0.6: {} - - fastq@1.17.1: - dependencies: - reusify: 1.0.4 - - file-entry-cache@6.0.1: - dependencies: - flat-cache: 3.2.0 - - fill-range@7.0.1: - dependencies: - to-regex-range: 5.0.1 - - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - - flat-cache@3.2.0: - dependencies: - flatted: 3.3.1 - keyv: 4.5.4 - rimraf: 3.0.2 - - flatted@3.3.1: {} - - fs.realpath@1.0.0: {} - - glob-parent@5.1.2: - dependencies: - is-glob: 4.0.3 - - glob-parent@6.0.2: - dependencies: - is-glob: 4.0.3 - - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - - globals@13.24.0: - dependencies: - type-fest: 0.20.2 - - globby@11.1.0: - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.2 - ignore: 5.3.1 - merge2: 1.4.1 - slash: 3.0.0 - - graphemer@1.4.0: {} - - has-flag@4.0.0: {} - - ignore@5.3.1: {} - - import-fresh@3.3.0: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - - imurmurhash@0.1.4: {} - - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.4: {} - - is-extglob@2.1.1: {} - - is-glob@4.0.3: - dependencies: - is-extglob: 2.1.1 - - is-number@7.0.0: {} - - is-path-inside@3.0.3: {} - - isexe@2.0.0: {} - - js-yaml@4.1.0: - dependencies: - argparse: 2.0.1 - - json-buffer@3.0.1: {} - - json-schema-traverse@0.4.1: {} - - json-stable-stringify-without-jsonify@1.0.1: {} - - keyv@4.5.4: - dependencies: - json-buffer: 3.0.1 - - levn@0.4.1: - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - - lodash.merge@4.6.2: {} - - lru-cache@6.0.0: - dependencies: - yallist: 4.0.0 - - merge2@1.4.1: {} - - micromatch@4.0.5: - dependencies: - braces: 3.0.2 - picomatch: 2.3.1 - - minimatch@3.1.2: - dependencies: - brace-expansion: 1.1.11 - - minimatch@9.0.4: - dependencies: - brace-expansion: 2.0.1 - miniprogram-api-typings@3.12.2: {} - ms@2.1.2: {} - - natural-compare@1.4.0: {} - - once@1.4.0: - dependencies: - wrappy: 1.0.2 - - optionator@0.9.4: - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.5 - - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - - parent-module@1.0.1: - dependencies: - callsites: 3.1.0 - - path-exists@4.0.0: {} - - path-is-absolute@1.0.1: {} - - path-key@3.1.1: {} - - path-type@4.0.0: {} - - picomatch@2.3.1: {} - - prelude-ls@1.2.1: {} - - prettier-linter-helpers@1.0.0: - dependencies: - fast-diff: 1.3.0 - - prettier@3.2.5: {} - - punycode@2.3.1: {} - - queue-microtask@1.2.3: {} - - resolve-from@4.0.0: {} - - reusify@1.0.4: {} - - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - - run-parallel@1.2.0: - dependencies: - queue-microtask: 1.2.3 - - semver@7.6.0: - dependencies: - lru-cache: 6.0.0 - - shebang-command@2.0.0: - dependencies: - shebang-regex: 3.0.0 - - shebang-regex@3.0.0: {} - - slash@3.0.0: {} - - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - - strip-json-comments@3.1.1: {} - - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - - synckit@0.8.8: - dependencies: - '@pkgr/core': 0.1.1 - tslib: 2.6.2 - tdesign-miniprogram@1.3.1: dependencies: dayjs: 1.11.11 - text-table@0.2.0: {} - - to-regex-range@5.0.1: - dependencies: - is-number: 7.0.0 - - ts-api-utils@1.3.0(typescript@5.4.5): - dependencies: - typescript: 5.4.5 - - tslib@2.6.2: {} - - type-check@0.4.0: - dependencies: - prelude-ls: 1.2.1 - - type-fest@0.20.2: {} - - typescript-eslint@7.8.0(eslint@8.57.0)(typescript@5.4.5): - dependencies: - '@typescript-eslint/eslint-plugin': 7.8.0(@typescript-eslint/parser@7.8.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 7.8.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.8.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 - optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - typescript@5.4.5: {} - - uri-js@4.4.1: - dependencies: - punycode: 2.3.1 - - which@2.0.2: - dependencies: - isexe: 2.0.0 - - word-wrap@1.2.5: {} - - wrappy@1.0.2: {} - - yallist@4.0.0: {} - - yocto-queue@0.1.0: {}