diff --git a/admin/src/main.tsx b/admin/src/main.tsx index c09e19f..b7dd031 100644 --- a/admin/src/main.tsx +++ b/admin/src/main.tsx @@ -15,10 +15,25 @@ import Login from './pages/login'; import checkLogin from './utils/checkLogin'; import changeTheme from './utils/changeTheme'; import useStorage from './utils/useStorage'; +import { generatePermission } from './routes'; import './utils/setupRequest'; -import './mock'; const store = createStore(rootReducer); +const COOL_OK = 1000; + +interface CoolPerson { + name?: string; + nickName?: string; + username?: string; + email?: string; + headImg?: string; +} + +interface CoolResponse { + code: number; + message?: string; + data?: T; +} function Index() { const [lang, setLang] = useStorage('arco-lang', 'en-US'); @@ -40,45 +55,34 @@ function Index() { type: 'update-userInfo', payload: { userLoading: true }, }); - axios.get('/api/user/userInfo').then((res) => { - const mockUser = res.data; - axios - .get<{ - code: number; - data?: { - name?: string; - nickName?: string; - username?: string; - email?: string; - headImg?: string; - }; - }>('/api/admin/base/comm/person') - .then((personRes) => { - const person = personRes.data?.data; - store.dispatch({ - type: 'update-userInfo', - payload: { - userLoading: false, - userInfo: { - ...mockUser, - name: - person?.name || - person?.nickName || - person?.username || - mockUser.name, - email: person?.email || mockUser.email, - avatar: person?.headImg || mockUser.avatar, - }, + axios + .get>('/api/admin/base/comm/person') + .then((res) => { + const person = res.data?.code === COOL_OK ? res.data.data : undefined; + store.dispatch({ + type: 'update-userInfo', + payload: { + userLoading: false, + userInfo: { + name: person?.name || person?.nickName || person?.username || '', + email: person?.email || '', + avatar: person?.headImg || '', + permissions: generatePermission('admin'), }, - }); - }) - .catch(() => { - store.dispatch({ - type: 'update-userInfo', - payload: { userInfo: mockUser, userLoading: false }, - }); + }, }); - }); + }) + .catch(() => { + store.dispatch({ + type: 'update-userInfo', + payload: { + userLoading: false, + userInfo: { + permissions: generatePermission('admin'), + }, + }, + }); + }); } useEffect(() => { diff --git a/admin/src/mock/index.ts b/admin/src/mock/index.ts deleted file mode 100644 index 14c4e3a..0000000 --- a/admin/src/mock/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -import Mock from 'mockjs'; -import { isSSR } from '@/utils/is'; - -import './user'; -import './message-box'; - -interface MockXhrLike { - send: (...args: unknown[]) => unknown; - custom?: { - xhr?: { - setRequestHeader: (name: string, value: string) => void; - }; - requestHeaders?: Record; - }; -} - -if (!isSSR) { - const xhrProto = Mock.XHR.prototype as MockXhrLike; - const nativeSend = xhrProto.send; - xhrProto.send = function patchedSend( - this: MockXhrLike, - ...args: unknown[] - ) { - const headers = this.custom?.requestHeaders; - const nativeXhr = this.custom?.xhr; - if (headers && nativeXhr) { - Object.keys(headers).forEach((key) => { - nativeXhr.setRequestHeader(key, headers[key]); - }); - } - return nativeSend.apply(this, args); - }; - - Mock.setup({ - timeout: '500-1500', - }); -} diff --git a/admin/src/mock/message-box.ts b/admin/src/mock/message-box.ts deleted file mode 100644 index f335158..0000000 --- a/admin/src/mock/message-box.ts +++ /dev/null @@ -1,99 +0,0 @@ -import Mock from 'mockjs'; -import setupMock from '@/utils/setupMock'; - -const haveReadIds = []; -const getMessageList = () => { - return [ - { - id: 1, - type: 'message', - title: '郑曦月', - subTitle: '的私信', - avatar: - '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/8361eeb82904210b4f55fab888fe8416.png~tplv-uwbnlip3yd-webp.webp', - content: '审批请求已发送,请查收', - time: '今天 12:30:01', - }, - { - id: 2, - type: 'message', - title: '宁波', - subTitle: '的回复', - avatar: - '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp', - content: - '此处 bug 已经修复,如有问题请查阅文档或者继续 github 提 issue~', - time: '今天 12:30:01', - }, - { - id: 3, - type: 'message', - title: '宁波', - subTitle: '的回复', - avatar: - '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp', - content: '此处 bug 已经修复', - time: '今天 12:20:01', - }, - - { - id: 4, - type: 'todo', - title: '域名服务', - content: '内容质检队列于 2021-12-01 19:50:23 进行变更,请重新', - tag: { - text: '未开始', - color: 'gray', - }, - }, - { - id: 5, - type: 'todo', - title: '内容审批通知', - content: '宁静提交于 2021-11-05,需要您在 2011-11-07之前审批', - tag: { - text: '进行中', - color: 'arcoblue', - }, - }, - { - id: 6, - type: 'notice', - title: '质检队列变更', - content: '您的产品使用期限即将截止,如需继续使用产品请前往购…', - tag: { - text: '即将到期', - color: 'red', - }, - }, - { - id: 7, - type: 'notice', - title: '规则开通成功', - subTitle: '', - avatar: '', - content: '内容屏蔽规则于 2021-12-01 开通成功并生效。', - tag: { - text: '已开通', - color: 'green', - }, - }, - ].map((item) => ({ - ...item, - status: haveReadIds.indexOf(item.id) === -1 ? 0 : 1, - })); -}; - -setupMock({ - setup: () => { - Mock.mock(new RegExp('/api/message/list'), () => { - return getMessageList(); - }); - - Mock.mock(new RegExp('/api/message/read'), (params) => { - const { ids } = JSON.parse(params.body); - haveReadIds.push(...(ids || [])); - return true; - }); - }, -}); diff --git a/admin/src/mock/user.ts b/admin/src/mock/user.ts deleted file mode 100644 index 4473982..0000000 --- a/admin/src/mock/user.ts +++ /dev/null @@ -1,62 +0,0 @@ -import Mock from 'mockjs'; -import { isSSR } from '@/utils/is'; -import setupMock from '@/utils/setupMock'; -import { generatePermission } from '@/routes'; - -if (!isSSR) { - Mock.XHR.prototype.withCredentials = true; - - setupMock({ - setup: () => { - // 用户信息 - const userRole = window.localStorage.getItem('userRole') || 'admin'; - Mock.mock(new RegExp('/api/user/userInfo'), () => { - return Mock.mock({ - name: 'admin', - avatar: - 'https://lf1-xgcdn-tos.pstatp.com/obj/vcloud/vadmin/start.8e0e4855ee346a46ccff8ff3e24db27b.png', - email: 'wangliqun@email.com', - job: 'frontend', - jobName: '前端开发工程师', - organization: 'Frontend', - organizationName: '前端', - location: 'beijing', - locationName: '北京', - introduction: '王力群并非是一个真实存在的人。', - personalWebsite: 'https://www.arco.design', - verified: true, - phoneNumber: /177[*]{6}[0-9]{2}/, - accountId: /[a-z]{4}[-][0-9]{8}/, - registrationTime: Mock.Random.datetime('yyyy-MM-dd HH:mm:ss'), - permissions: generatePermission(userRole), - }); - }); - - // 登录 - Mock.mock(new RegExp('/api/user/login'), (params) => { - const { userName, password } = JSON.parse(params.body); - if (!userName) { - return { - status: 'error', - msg: '用户名不能为空', - }; - } - if (!password) { - return { - status: 'error', - msg: '密码不能为空', - }; - } - if (userName === 'admin' && password === 'admin') { - return { - status: 'ok', - }; - } - return { - status: 'error', - msg: '账号或者密码错误', - }; - }); - }, - }); -} diff --git a/admin/src/pages/card/cases/index.tsx b/admin/src/pages/card/cases/index.tsx index b0d14ed..43760ea 100644 --- a/admin/src/pages/card/cases/index.tsx +++ b/admin/src/pages/card/cases/index.tsx @@ -12,6 +12,7 @@ import { Popconfirm, Message, Typography, + Image, } from '@arco-design/web-react'; import type { TableColumnProps, PaginationProps } from '@arco-design/web-react'; import { IconPlus, IconSearch, IconRefresh, IconFile, IconUpload } from '@arco-design/web-react/icon'; @@ -224,8 +225,7 @@ export default function CardCasesPage(): React.ReactElement { // 快捷追加 KPI 打标 Tag const handleAddMetricTag = (tagText: string) => { - const current = editForm.getFieldValue('metrics') || ''; - const trimmed = current.trim(); + const trimmed = String(editForm.getFieldValue('metrics') || '').trim(); if (!trimmed) { editForm.setFieldsValue({ metrics: tagText }); } else { diff --git a/admin/src/pages/dashboard/financial/index.tsx b/admin/src/pages/dashboard/financial/index.tsx index d3b7ef2..8270b62 100644 --- a/admin/src/pages/dashboard/financial/index.tsx +++ b/admin/src/pages/dashboard/financial/index.tsx @@ -17,7 +17,6 @@ import { import { IconDownload, IconSwap, - IconArrowRise, IconSafe, } from '@arco-design/web-react/icon'; import axios from 'axios'; @@ -290,13 +289,10 @@ export default function DashboardFinancialPage() { > -
- 环比增长 +14.8% -
@@ -309,13 +305,10 @@ export default function DashboardFinancialPage() { > -
- 年化预测折算 -
@@ -328,11 +321,8 @@ export default function DashboardFinancialPage() { > -
- 本期新增企业 -
@@ -345,11 +335,8 @@ export default function DashboardFinancialPage() { > -
- Pro & Enterprise -
@@ -362,12 +349,9 @@ export default function DashboardFinancialPage() { > -
- 增购与扩容健康度 -
@@ -380,12 +364,9 @@ export default function DashboardFinancialPage() { > -
- 行业基准领先 ( < 2% ) -
@@ -401,13 +382,10 @@ export default function DashboardFinancialPage() { > -
- 已开具合同/账单 -
@@ -420,13 +398,10 @@ export default function DashboardFinancialPage() { > -
- 实收资金净流入 -
@@ -439,13 +414,10 @@ export default function DashboardFinancialPage() { > -
- 在途待确认对账 -
@@ -458,13 +430,10 @@ export default function DashboardFinancialPage() { > -
- 账龄预警款项 -
@@ -477,13 +446,10 @@ export default function DashboardFinancialPage() { > -
- 退款率仅 0.8% -
@@ -496,13 +462,10 @@ export default function DashboardFinancialPage() { > -
- 跨国合规税务拨备 -
@@ -523,13 +486,8 @@ export default function DashboardFinancialPage() { }} > - {( - analyticsData?.planDistribution || [ - { plan: 'free', name: 'Free 基础版', accountCount: 420, mrrContribution: 0, seatUtilization: 38 }, - { plan: 'pro', name: 'Pro 专业出海版', accountCount: 138, mrrContribution: 6762, seatUtilization: 82 }, - { plan: 'enterprise', name: 'Enterprise 旗舰版', accountCount: 26, mrrContribution: 7774, seatUtilization: 94 }, - ] - ).map((item: PlanDistributionItem) => ( + {(analyticsData?.planDistribution || []).map( + (item: PlanDistributionItem) => (
- {( - analyticsData?.regionalRevenue || [ - { region: '北美市场 (US / CA)', revenue: 16990, accounts: 72, percentage: 46 }, - { region: '欧洲市场 (DE / UK / FR)', revenue: 10342, accounts: 43, percentage: 28 }, - { region: '中东海湾 (UAE / SA)', revenue: 5171, accounts: 26, percentage: 14 }, - { region: '亚太与拉美 (SG / JP / BR)', revenue: 4432, accounts: 23, percentage: 12 }, - ] - ).map((region: RegionalRevenueItem) => ( + {(analyticsData?.regionalRevenue || []).map( + (region: RegionalRevenueItem) => (
- {( - analyticsData?.currencyBreakdown || [ - { currency: 'USD', symbol: '$', totalAmount: 25116, count: 92, percentage: 68 }, - { currency: 'EUR', symbol: '€', totalAmount: 6648, count: 26, percentage: 18 }, - { currency: 'GBP', symbol: '£', totalAmount: 2954, count: 13, percentage: 8 }, - { currency: 'CNY', symbol: '¥', totalAmount: 2216, count: 11, percentage: 6 }, - ] - ).map((curr: CurrencyBreakdownItem) => ( + {(analyticsData?.currencyBreakdown || []).map( + (curr: CurrencyBreakdownItem) => (
- {( - analyticsData?.agingAnalysis || [ - { range: '0-30 天 (当期应收)', amount: 3119, invoiceCount: 18, riskLevel: 'low' }, - { range: '31-60 天 (轻度催收)', amount: 780, invoiceCount: 4, riskLevel: 'medium' }, - { range: '61-90 天 (预警跟进)', amount: 303, invoiceCount: 2, riskLevel: 'medium' }, - { range: '90+ 天 (坏账拨备风险)', amount: 130, invoiceCount: 1, riskLevel: 'high' }, - ] - ).map((aging: AgingAnalysisItem) => { + {(analyticsData?.agingAnalysis || []).map( + (aging: AgingAnalysisItem) => { const tagColor = aging.riskLevel === 'low' ? 'green' @@ -750,65 +690,7 @@ export default function DashboardFinancialPage() { diff --git a/admin/src/pages/dashboard/monitor/chat-panel.tsx b/admin/src/pages/dashboard/monitor/chat-panel.tsx deleted file mode 100644 index 15c1c3b..0000000 --- a/admin/src/pages/dashboard/monitor/chat-panel.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import { - Space, - Select, - Input, - Button, - Typography, - Spin, -} from '@arco-design/web-react'; -import { IconDownload, IconFaceSmileFill } from '@arco-design/web-react/icon'; -import axios from 'axios'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import MessageList from './message-list'; -import styles from './style/index.module.less'; - -export default function ChatPanel() { - const t = useLocale(locale); - const [messageList, setMessageList] = useState([]); - const [loading, setLoading] = useState(false); - - function fetchMessageList() { - setLoading(true); - axios - .get('/api/chatList') - .then((res) => { - setMessageList(res.data || []); - }) - .finally(() => { - setLoading(false); - }); - } - - useEffect(() => { - fetchMessageList(); - }, []); - - return ( -
-
- - {t['monitor.title.chatPanel']} - - - - - - -
-
- - - -
-
- - } /> - - -
-
- ); -} diff --git a/admin/src/pages/dashboard/monitor/data-statistic-list.tsx b/admin/src/pages/dashboard/monitor/data-statistic-list.tsx deleted file mode 100644 index 5ec4459..0000000 --- a/admin/src/pages/dashboard/monitor/data-statistic-list.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { Table, Tag, Typography } from '@arco-design/web-react'; -import React from 'react'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import styles from './style/index.module.less'; - -export default function QuickOperation() { - const t = useLocale(locale); - const columns = [ - { - title: t['monitor.list.title.order'], - render: (_col, _record, index) => {index + 1}, - }, - { - title: t['monitor.list.title.cover'], - dataIndex: 'cover', - render: (_col, record) => ( -
- - {record.status === -1 && ( - - {t['monitor.list.tag.auditFailed']} - - )} -
- ), - }, - { - title: t['monitor.list.title.name'], - dataIndex: 'name', - }, - { - dataIndex: 'duration', - title: t['monitor.list.title.duration'], - }, - { - dataIndex: 'id', - title: t['monitor.list.title.id'], - }, - ]; - const data = [ - { - cover: - 'http://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/c788fc704d32cf3b1136c7d45afc2669.png~tplv-uwbnlip3yd-webp.webp', - name: '视频直播', - duration: '00:05:19', - id: '54e23ade', - status: -1, - }, - ]; - return ( -
-
- - {t['monitor.list.tip.rotations']} - {data.length} - {t['monitor.list.tip.rest']} - - - ); -} diff --git a/admin/src/pages/dashboard/monitor/data-statistic.tsx b/admin/src/pages/dashboard/monitor/data-statistic.tsx deleted file mode 100644 index 5d90336..0000000 --- a/admin/src/pages/dashboard/monitor/data-statistic.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { Button, Card, Radio, Tabs } from '@arco-design/web-react'; -import React from 'react'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import DataStatisticList from './data-statistic-list'; -import styles from './style/index.module.less'; - -export default function DataStatistic() { - const t = useLocale(locale); - return ( - - - - - -
- - {t['monitor.liveMethod.normal']} - {t['monitor.liveMethod.flowControl']} - {t['monitor.liveMethod.video']} - {t['monitor.liveMethod.web']} - - -
-
- - -
-
- -
-
-
-
- ); -} diff --git a/admin/src/pages/dashboard/monitor/index.tsx b/admin/src/pages/dashboard/monitor/index.tsx deleted file mode 100644 index 9ab3095..0000000 --- a/admin/src/pages/dashboard/monitor/index.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { Space } from '@arco-design/web-react'; -import React from 'react'; -import { useSelector } from 'react-redux'; -import ChatPanel from './chat-panel'; -import Studio from './studio'; -import DataStatistic from './data-statistic'; -import StudioStatus from './studio-status'; -import QuickOperation from './quick-operation'; -import StudioInformation from './studio-information'; -import styles from './style/index.module.less'; -import './mock'; - -export default function Monitor() { - const userInfo = useSelector((state: any) => state.userInfo); - return ( -
-
-
- -
-
- - - - -
-
- - - - - -
-
-
- ); -} diff --git a/admin/src/pages/dashboard/monitor/locale/index.ts b/admin/src/pages/dashboard/monitor/locale/index.ts deleted file mode 100644 index 8de29b5..0000000 --- a/admin/src/pages/dashboard/monitor/locale/index.ts +++ /dev/null @@ -1,99 +0,0 @@ -const i18n = { - 'en-US': { - 'menu.dashboard': 'Dashboard', - 'monitor.title.chatPanel': 'Chat Window', - 'monitor.title.quickOperation': 'Quick Operation', - 'monitor.title.studioInfo': 'Studio Information', - 'monitor.title.studioPreview': 'Studio Preview', - 'monitor.chat.options.all': 'All', - 'monitor.chat.placeholder.searchCategory': 'Search Category', - 'monitor.chat.update': 'Update', - 'monitor.list.title.order': 'Order', - 'monitor.list.title.cover': 'Cover', - 'monitor.list.title.name': 'Name', - 'monitor.list.title.duration': 'Duration', - 'monitor.list.title.id': 'ID', - 'monitor.list.tip.rotations': 'Rotations ', - 'monitor.list.tip.rest': ', The program list is not visible to viewers', - 'monitor.list.tag.auditFailed': 'Audit Failed', - 'monitor.tab.title.liveMethod': 'Live Method', - 'monitor.tab.title.onlineUsers': 'Online Users', - 'monitor.liveMethod.normal': 'Normal Live', - 'monitor.liveMethod.flowControl': 'Flow Control Live', - 'monitor.liveMethod.video': 'Video Live', - 'monitor.liveMethod.web': 'Web Live', - 'monitor.editCarousel': 'Edit', - 'monitor.startCarousel': 'Start', - 'monitor.quickOperation.changeClarity': 'Change the Clarity', - 'monitor.quickOperation.switchStream': 'Switch Stream', - 'monitor.quickOperation.removeClarity': 'Remove the Clarity', - 'monitor.quickOperation.pushFlowGasket': 'Push Flow Gasket', - 'monitor.studioInfo.label.studioTitle': 'Studio Title', - 'monitor.studioInfo.label.onlineNotification': 'Online Notification', - 'monitor.studioInfo.label.studioCategory': 'Studio Category', - 'monitor.studioInfo.placeholder.studioTitle': "'s Studio", - 'monitor.studioStatus.title.studioStatus': 'Studio Status', - 'monitor.studioStatus.title.pictureInfo': 'Picture Information', - 'monitor.studioStatus.smooth': 'Smooth', - 'monitor.studioStatus.frameRate': 'Frame', - 'monitor.studioStatus.bitRate': 'Bit', - 'monitor.studioStatus.mainstream': 'Main', - 'monitor.studioStatus.hotStandby': 'Hot', - 'monitor.studioStatus.coldStandby': 'Cold', - 'monitor.studioStatus.line': 'Line', - 'monitor.studioStatus.play': 'Format', - 'monitor.studioStatus.pictureQuality': 'Quality', - 'monitor.studioPreview.studio': 'Studio', - 'monitor.studioPreview.watching': 'watching', - }, - 'zh-CN': { - 'menu.dashboard': '仪表盘', - 'menu.dashboard.monitor': '实时监控', - 'monitor.title.chatPanel': '聊天窗口', - 'monitor.title.quickOperation': '快捷操作', - 'monitor.title.studioInfo': '直播信息', - 'monitor.title.studioPreview': '直播预览', - 'monitor.chat.options.all': '全部', - 'monitor.chat.placeholder.searchCategory': '搜索类目', - 'monitor.chat.update': '更新', - 'monitor.list.title.order': '序号', - 'monitor.list.title.cover': '封面', - 'monitor.list.title.name': '名称', - 'monitor.list.title.duration': '视频时长', - 'monitor.list.title.id': '视频Id', - 'monitor.list.tip.rotations': '轮播次数', - 'monitor.list.tip.rest': ',节目单观众不可见', - 'monitor.list.tag.auditFailed': '审核未通过', - 'monitor.tab.title.liveMethod': '直播方式', - 'monitor.tab.title.onlineUsers': '在线人数', - 'monitor.liveMethod.normal': '普通直播', - 'monitor.liveMethod.flowControl': '控流直播', - 'monitor.liveMethod.video': '视频直播', - 'monitor.liveMethod.web': '网页开播', - 'monitor.editCarousel': '编辑轮播', - 'monitor.startCarousel': '开始轮播', - 'monitor.quickOperation.changeClarity': '切换清晰度', - 'monitor.quickOperation.switchStream': '主备流切换', - 'monitor.quickOperation.removeClarity': '摘除清晰度', - 'monitor.quickOperation.pushFlowGasket': '推流垫片', - 'monitor.studioInfo.label.studioTitle': '直播标题', - 'monitor.studioInfo.label.onlineNotification': '上线通知', - 'monitor.studioInfo.label.studioCategory': '直播类目', - 'monitor.studioInfo.placeholder.studioTitle': '的直播间', - 'monitor.studioStatus.title.studioStatus': '直播状态', - 'monitor.studioStatus.title.pictureInfo': '画面信息', - 'monitor.studioStatus.smooth': '流畅', - 'monitor.studioStatus.frameRate': '帧率', - 'monitor.studioStatus.bitRate': '码率', - 'monitor.studioStatus.mainstream': '主流', - 'monitor.studioStatus.hotStandby': '热备', - 'monitor.studioStatus.coldStandby': '冷备', - 'monitor.studioStatus.line': '线路', - 'monitor.studioStatus.play': '播放格式', - 'monitor.studioStatus.pictureQuality': '画质', - 'monitor.studioPreview.studio': '直播间', - 'monitor.studioPreview.watching': '在看', - }, -}; - -export default i18n; diff --git a/admin/src/pages/dashboard/monitor/message-list/index.tsx b/admin/src/pages/dashboard/monitor/message-list/index.tsx deleted file mode 100644 index 18a48c6..0000000 --- a/admin/src/pages/dashboard/monitor/message-list/index.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import { Result } from '@arco-design/web-react'; -import MessageItem, { Message } from './item'; -import styles from './style/index.module.less'; - -interface MessageListProps { - data: Message[]; -} - -function MessageList(props: MessageListProps) { - const { data = [] } = props; - return ( -
- {data.map((item) => ( - - ))} - {!data.length && } -
- ); -} - -export default MessageList; diff --git a/admin/src/pages/dashboard/monitor/message-list/item.tsx b/admin/src/pages/dashboard/monitor/message-list/item.tsx deleted file mode 100644 index 3e62f73..0000000 --- a/admin/src/pages/dashboard/monitor/message-list/item.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import React from 'react'; -import { Space, Typography } from '@arco-design/web-react'; -import { IconCommand, IconStar } from '@arco-design/web-react/icon'; -import cs from 'classnames'; -import styles from './style/index.module.less'; - -export interface Message { - id?: string; - username?: string; - content?: string; - time?: string; - isCollect?: boolean; -} - -export interface MessageItemProps { - data: Message; -} - -function MessageItem(props: MessageItemProps) { - const { data = {} } = props; - const classNames = cs(styles['message-item'], { - [styles['message-item-collected']]: data.isCollect, - }); - return ( -
- - {data.username} - {data.content} -
-
- {data.time} -
-
-
- -
-
- -
-
-
-
-
- ); -} - -export default MessageItem; diff --git a/admin/src/pages/dashboard/monitor/message-list/style/index.module.less b/admin/src/pages/dashboard/monitor/message-list/style/index.module.less deleted file mode 100644 index afa0316..0000000 --- a/admin/src/pages/dashboard/monitor/message-list/style/index.module.less +++ /dev/null @@ -1,52 +0,0 @@ -.message-item { - font-size: 12px; - line-height: 20px; - padding: 8px; - border-radius: 2px; - - &-footer { - display: flex; - justify-content: space-between; - align-items: center; - } - - &-actions { - display: flex; - opacity: 0; - - &-item { - margin-right: 4px; - font-size: 14px; - color: var(--color-text-3); - width: 20px; - height: 20px; - border-radius: 50%; - display: flex; - justify-content: center; - align-items: center; - cursor: pointer; - - &:hover { - background-color: rgb(var(--gray-3)); - } - - &:last-child { - margin-right: 0; - } - } - } - - &-collected { - .message-item-actions-collect { - color: rgb(var(--gold-6)); - } - } - - &:hover { - background-color: rgb(var(--gray-2)); - - .message-item-actions { - opacity: 1; - } - } -} diff --git a/admin/src/pages/dashboard/monitor/mock/index.ts b/admin/src/pages/dashboard/monitor/mock/index.ts deleted file mode 100644 index f0f6415..0000000 --- a/admin/src/pages/dashboard/monitor/mock/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -import Mock from 'mockjs'; -import setupMock from '@/utils/setupMock'; - -setupMock({ - setup: () => { - Mock.mock(new RegExp('/api/chatList'), () => { - const data = Mock.mock({ - 'data|4-6': [ - { - 'id|+1': 1, - username: '用户7352772', - content: '马上就开始了,好激动!', - time: '13:09:12', - 'isCollect|2': true, - }, - ], - }); - return data.data; - }); - }, -}); diff --git a/admin/src/pages/dashboard/monitor/quick-operation.tsx b/admin/src/pages/dashboard/monitor/quick-operation.tsx deleted file mode 100644 index 8997c5c..0000000 --- a/admin/src/pages/dashboard/monitor/quick-operation.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import { Button, Card, Typography, Space } from '@arco-design/web-react'; -import { - IconArrowRight, - IconStop, - IconSwap, - IconTags, -} from '@arco-design/web-react/icon'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; - -export default function QuickOperation() { - const t = useLocale(locale); - return ( - - - {t['monitor.title.quickOperation']} - - - - - - - - - ); -} diff --git a/admin/src/pages/dashboard/monitor/studio-information.tsx b/admin/src/pages/dashboard/monitor/studio-information.tsx deleted file mode 100644 index 86eb541..0000000 --- a/admin/src/pages/dashboard/monitor/studio-information.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { Card, Typography, Form, Input, Button } from '@arco-design/web-react'; -import React from 'react'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; - -export default function StudioInformation() { - const t = useLocale(locale); - return ( - - - {t['monitor.title.studioInfo']} - -
- - - - - - - - - - - - - - -
- ); -} diff --git a/admin/src/pages/dashboard/monitor/studio-status.tsx b/admin/src/pages/dashboard/monitor/studio-status.tsx deleted file mode 100644 index b919c85..0000000 --- a/admin/src/pages/dashboard/monitor/studio-status.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import React from 'react'; -import { - Card, - Typography, - Tag, - Space, - Descriptions, -} from '@arco-design/web-react'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; - -export default function StudioStatus() { - const t = useLocale(locale); - const dataStatus = [ - { - label: ( - - - {t['monitor.studioStatus.mainstream']} - - {t['monitor.studioStatus.bitRate']} - - ), - value: '6 Mbps', - }, - { - label: t['monitor.studioStatus.frameRate'], - value: '60', - }, - { - label: ( - - - {t['monitor.studioStatus.hotStandby']} - - {t['monitor.studioStatus.bitRate']} - - ), - value: '6 Mbps', - }, - { - label: t['monitor.studioStatus.frameRate'], - value: '60', - }, - { - label: ( - - - {t['monitor.studioStatus.coldStandby']} - - {t['monitor.studioStatus.bitRate']} - - ), - value: '6 Mbps', - }, - { - label: t['monitor.studioStatus.frameRate'], - value: '60', - }, - ]; - const dataPicture = [ - { - label: t['monitor.studioStatus.line'], - value: '热备', - }, - { - label: 'CDN', - value: 'KS', - }, - { - label: t['monitor.studioStatus.play'], - value: 'FLV', - }, - { - label: t['monitor.studioStatus.pictureQuality'], - value: '原画', - }, - ]; - - return ( - - - - {t['monitor.studioStatus.title.studioStatus']} - - {t['monitor.studioStatus.smooth']} - - - - {t['monitor.studioStatus.title.pictureInfo']} - - - - ); -} diff --git a/admin/src/pages/dashboard/monitor/studio.tsx b/admin/src/pages/dashboard/monitor/studio.tsx deleted file mode 100644 index f05239c..0000000 --- a/admin/src/pages/dashboard/monitor/studio.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import { Card, Typography, Avatar, Space, Grid } from '@arco-design/web-react'; -import { IconMore } from '@arco-design/web-react/icon'; -import React from 'react'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import styles from './style/index.module.less'; - -interface StudioProps { - userInfo: { - name?: string; - avatar?: string; - }; -} - -export default function Studio(props: StudioProps) { - const t = useLocale(locale); - const { userInfo } = props; - return ( - - - - - {t['monitor.title.studioPreview']} - - - - - - -
- -
- {userInfo && ( -
- - - - - - {userInfo.name} - {t['monitor.studioPreview.studio']} - - -
- )} - - 3,6000 {t['monitor.studioPreview.watching']} - -
-
-
- ); -} diff --git a/admin/src/pages/dashboard/monitor/style/index.module.less b/admin/src/pages/dashboard/monitor/style/index.module.less deleted file mode 100644 index d9ede36..0000000 --- a/admin/src/pages/dashboard/monitor/style/index.module.less +++ /dev/null @@ -1,94 +0,0 @@ -.layout { - display: flex; - - &-left-side { - flex-basis: 300px; - } - - &-content { - flex: 1; - padding: 0 16px; - } - - &-right-side { - flex-basis: 280px; - } -} - -.chat-panel { - height: 100%; - background-color: var(--color-bg-2); - padding: 20px; - box-sizing: border-box; - display: flex; - flex-direction: column; - border-radius: 4px; - - &-content { - flex: 1; - margin: 20px 0; - box-sizing: border-box; - } -} - -.data-statistic { - &-content { - padding: 20px 0; - } - - &-list { - &-header { - margin-top: 16px; - display: flex; - justify-content: space-between; - } - - &-content { - margin-top: 16px; - } - - &-cover { - &-wrapper { - height: 68px; - position: relative; - - img { - height: 100%; - } - } - - &-tag { - position: absolute; - top: 6px; - left: 6px; - } - } - - &-tip { - display: block; - margin-top: 16px; - text-align: center; - } - } -} - -.studio { - &-wrapper { - :global(.arco-card-body) { - padding-top: 0 !important; - } - } - - &-preview { - width: 100%; - max-width: 600px; - display: block; - margin: 0 auto; - } - - &-bar { - margin-top: 16px; - display: flex; - justify-content: space-between; - } -} diff --git a/admin/src/pages/form/group/index.tsx b/admin/src/pages/form/group/index.tsx deleted file mode 100644 index 3bcb17e..0000000 --- a/admin/src/pages/form/group/index.tsx +++ /dev/null @@ -1,281 +0,0 @@ -import React, { useState, useRef } from 'react'; -import { - Typography, - Card, - Form, - Select, - Input, - Grid, - Space, - Button, - Message, -} from '@arco-design/web-react'; -import { FormInstance } from '@arco-design/web-react/es/Form'; -import axios from 'axios'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import styles from './style/index.module.less'; -import './mock'; - -function GroupForm() { - const t = useLocale(locale); - const formRef = useRef(); - const [loading, setLoading] = useState(false); - - function submit(data) { - setLoading(true); - axios - .post('/api/groupForm', { - data, - }) - .then(() => { - Message.success(t['groupForm.submitSuccess']); - }) - .finally(() => { - setLoading(false); - }); - } - - function handleSubmit() { - formRef.current.validate().then((values) => { - submit(values); - }); - } - - function handleReset() { - formRef.current.resetFields(); - } - - return ( -
-
- - - {t['groupForm.title.video']} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {t['groupForm.title.audio']} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {t['groupForm.title.explanation']} - - - - - - -
- - - - -
-
- ); -} - -export default GroupForm; diff --git a/admin/src/pages/form/group/locale/index.ts b/admin/src/pages/form/group/locale/index.ts deleted file mode 100644 index 04c8396..0000000 --- a/admin/src/pages/form/group/locale/index.ts +++ /dev/null @@ -1,84 +0,0 @@ -const i18n = { - 'en-US': { - 'menu.form': 'Form', - 'menu.form.group': 'Group Form', - 'groupForm.title.video': 'Video Parameters', - 'groupForm.title.audio': 'Audio Parameters', - 'groupForm.title.explanation': 'Enter Explanation', - 'groupForm.form.label.video.mode': 'Match Mode', - 'groupForm.form.label.video.acquisition.resolution': - 'Acquisition Resolution', - 'groupForm.form.label.video.acquisition.frameRate': - 'Acquisition Frame Rate', - 'groupForm.form.label.video.encoding.resolution': 'Encoding Resolution', - 'groupForm.form.label.video.encoding.rate.min': 'Encoding Min Rate', - 'groupForm.form.label.video.encoding.rate.max': 'Encoding Max Rate', - 'groupForm.form.label.video.encoding.rate.default': 'Encoding Default Rate', - 'groupForm.form.label.video.encoding.frameRate': 'Encoding Frame Rate', - 'groupForm.form.label.video.encoding.profile': 'Encoding Profile', - 'groupForm.placeholder.video.mode': 'Please Select', - 'groupForm.placeholder.video.acquisition.resolution': 'Please Select', - 'groupForm.placeholder.video.acquisition.frameRate': 'Enter Range [1, 30]', - 'groupForm.placeholder.video.encoding.resolution': 'Please Select', - 'groupForm.placeholder.video.encoding.rate.min': 'Enter Range [150, 1800]', - 'groupForm.placeholder.video.encoding.rate.max': 'Enter Range [150, 1800]', - 'groupForm.placeholder.video.encoding.rate.default': - 'Enter Range [150, 1800]', - 'groupForm.placeholder.video.encoding.frameRate': 'Enter Range [1, 30]', - 'groupForm.placeholder.video.encoding.profile': 'Enter Range [150, 1800]', - 'groupForm.form.label.audio.mode': 'Match Mode', - 'groupForm.form.label.audio.acquisition.channels': 'Acquisition Channels', - 'groupForm.form.label.audio.encoding.rate': 'Encoding Rate', - 'groupForm.form.label.audio.encoding.profile': 'Encoding Profile', - 'groupForm.placeholder.audio.mode': 'Please Select', - 'groupForm.placeholder.audio.acquisition.channels': 'Please Select', - 'groupForm.placeholder.audio.encoding.rate': 'Enter Range [150, 1800]', - 'groupForm.placeholder.audio.encoding.profile': 'Enter Range [150, 1800]', - 'groupForm.form.label.explanation': 'Explanation', - 'groupForm.placeholder.explanation': - 'Please fill in the parameter description, no more than 200 characters', - 'groupForm.submit': 'Submit', - 'groupForm.reset': 'Reset', - 'groupForm.submitSuccess': 'Submit Success', - }, - 'zh-CN': { - 'menu.form': '表单页', - 'menu.form.group': '分组表单', - 'groupForm.title.video': '视频参数', - 'groupForm.title.audio': '音频参数', - 'groupForm.title.explanation': '填写说明', - 'groupForm.form.label.video.mode': '匹配模式', - 'groupForm.form.label.video.acquisition.resolution': '采集分辨率', - 'groupForm.form.label.video.acquisition.frameRate': '采集帧率', - 'groupForm.form.label.video.encoding.resolution': '编码分辨率', - 'groupForm.form.label.video.encoding.rate.min': '编码码率最小值', - 'groupForm.form.label.video.encoding.rate.max': '编码码率最大值', - 'groupForm.form.label.video.encoding.rate.default': '编码码率默认值', - 'groupForm.form.label.video.encoding.frameRate': '编码帧率', - 'groupForm.form.label.video.encoding.profile': '编码profile', - 'groupForm.placeholder.video.mode': '请选择', - 'groupForm.placeholder.video.acquisition.resolution': '请选择', - 'groupForm.placeholder.video.acquisition.frameRate': '输入范围[1, 30]', - 'groupForm.placeholder.video.encoding.resolution': '请选择', - 'groupForm.placeholder.video.encoding.rate.min': '输入范围[150, 1800]', - 'groupForm.placeholder.video.encoding.rate.max': '输入范围[150, 1800]', - 'groupForm.placeholder.video.encoding.rate.default': '输入范围[150, 1800]', - 'groupForm.placeholder.video.encoding.frameRate': '输入范围[1, 30]', - 'groupForm.placeholder.video.encoding.profile': '输入范围[150, 1800]', - 'groupForm.form.label.audio.mode': '配置模式', - 'groupForm.form.label.audio.acquisition.channels': '采集声道数', - 'groupForm.form.label.audio.encoding.rate': '编码码率', - 'groupForm.form.label.audio.encoding.profile': '编码profile', - 'groupForm.placeholder.audio.mode': '请选择', - 'groupForm.placeholder.audio.acquisition.channels': '请选择', - 'groupForm.placeholder.audio.encoding.rate': '输入范围[150, 1800]', - 'groupForm.placeholder.audio.encoding.profile': '输入范围[150, 1800]', - 'groupForm.form.label.explanation': '参数说明', - 'groupForm.placeholder.explanation': '请填写参数说明,最多不超多200字', - 'groupForm.submit': '提交', - 'groupForm.reset': '重置', - 'groupForm.submitSuccess': '提交成功', - }, -}; - -export default i18n; diff --git a/admin/src/pages/form/group/mock/index.ts b/admin/src/pages/form/group/mock/index.ts deleted file mode 100644 index 27047ac..0000000 --- a/admin/src/pages/form/group/mock/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import Mock from 'mockjs'; -import setupMock from '@/utils/setupMock'; - -setupMock({ - setup: () => { - // 保存表单数据 - Mock.mock(new RegExp('/api/groupForm'), () => { - return true; - }); - }, -}); diff --git a/admin/src/pages/form/group/style/index.module.less b/admin/src/pages/form/group/style/index.module.less deleted file mode 100644 index ca271d0..0000000 --- a/admin/src/pages/form/group/style/index.module.less +++ /dev/null @@ -1,23 +0,0 @@ -.container { - overflow: hidden; - - :global(.arco-card-body) { - padding: 20px 20px 10px; - } - - :global(.arco-card) { - margin-bottom: 16px; - } -} - -.actions { - padding: 12px 40px; - background-color: var(--color-bg-2); - display: flex; - flex-direction: row-reverse; - position: fixed; - left: 0; - right: 0; - bottom: 0; - box-shadow: 0 -3px 12px rgb(0 0 0 / 10%); -} diff --git a/admin/src/pages/form/step/index.tsx b/admin/src/pages/form/step/index.tsx deleted file mode 100644 index 6ba10f5..0000000 --- a/admin/src/pages/form/step/index.tsx +++ /dev/null @@ -1,257 +0,0 @@ -import React, { useState } from 'react'; -import { - Steps, - Form, - Input, - Select, - DatePicker, - InputTag, - Button, - Typography, - Space, - Card, - Switch, - Result, -} from '@arco-design/web-react'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import styles from './style/index.module.less'; - -const { Title, Paragraph } = Typography; -function StepForm() { - const t = useLocale(locale); - const [current, setCurrent] = useState(1); - - const [form] = Form.useForm(); - - const viewForm = () => { - const values = form.getFields(); - form.setFields(values); - setCurrent(1); - }; - - const reCreateForm = () => { - form.resetFields(); - setCurrent(1); - }; - - const toNext = async () => { - try { - await form.validate(); - setCurrent(current + 1); - } catch (_) {} - }; - return ( -
- - {t['stepForm.desc.basicInfo']} -
- - - - - -
- {current === 1 && ( - - { - if (!/^[\u4e00-\u9fa5a-zA-Z0-9]{1,20}$/g.test(value)) { - callback(t['stepForm.basicInfo.name.placeholder']); - } - }, - }, - ]} - > - - - - - - - - - - - - - )} - {current === 2 && ( - - - - - - - - - - - - - - - - - - - )} - {current !== 3 ? ( - - - {current === 2 && ( - - )} - {current !== 3 && ( - - )} - - - ) : ( - - - {t['stepForm.created.success.view']} - , - , - ]} - /> - - )} - -
- {current === 3 && ( -
- {t['stepForm.created.extra.title']} - - {t['stepForm.created.extra.desc']} - - -
- )} -
-
- ); -} - -export default StepForm; diff --git a/admin/src/pages/form/step/locale/index.ts b/admin/src/pages/form/step/locale/index.ts deleted file mode 100644 index 3821b76..0000000 --- a/admin/src/pages/form/step/locale/index.ts +++ /dev/null @@ -1,94 +0,0 @@ -const i18n = { - 'en-US': { - 'menu.form': 'Form', - 'menu.form.step': 'Step Form', - 'stepForm.title': 'Create a channel form', - 'stepForm.next': 'Next', - 'stepForm.prev': 'Prev', - 'stepForm.title.basicInfo': 'Basic Information', - 'stepForm.desc.basicInfo': 'Create event channel', - 'stepForm.title.channel': 'Channel Information', - 'stepForm.desc.channel': 'Enter detailed channel content', - 'stepForm.title.created': 'Complete creation', - 'stepForm.desc.created': 'Created successfully', - 'stepForm.basicInfo.name': 'Event name', - 'stepForm.basicInfo.name.required': 'Please enter the event name', - 'stepForm.basicInfo.name.placeholder': - 'Enter Chinese characters, letters or numbers, up to 20 characters', - 'stepForm.basicInfo.channelType': 'Channel Type', - 'stepForm.basicInfo.channelType.required': 'Please select the channel type', - 'stepForm.basicInfo.time': 'Promotion time', - 'stepForm.basicInfo.time.required': 'Please select the promotion time', - 'stepForm.basicInfo.link': 'Promotion URL', - 'stepForm.basicInfo.link.placeholder': - 'Please enter the promotion page address', - 'stepForm.basicInfo.link.tips': - 'Such as Android or iOS download address, intermediate redirect URL, the URL must start with http:// or https://', - 'stepForm.channel.source': 'Advertising source', - 'stepForm.channel.source.required': 'Please enter the advertising source', - 'stepForm.channel.source.placeholder': 'Referral address: sohu, sina', - 'stepForm.channel.media': 'Advertising medium', - 'stepForm.channel.media.required': 'Please enter the advertising medium', - 'stepForm.channel.media.placeholder': 'Marketing media: cpc, bannner, edm', - 'stepForm.channel.keywords': 'Key words', - 'stepForm.channel.remind': 'Push reminder', - 'stepForm.channel.content': 'Advertising content', - 'stepForm.channel.content.required': 'Please enter the advertising content', - 'stepForm.channel.content.placeholder': - 'Please enter the description of the advertisement content, no more than 200 words', - 'stepForm.created.success.title': 'Created successfully', - 'stepForm.created.success.desc': 'Form created successfully', - 'stepForm.created.success.view': 'View form', - 'stepForm.created.success.again': 'Create again', - 'stepForm.created.extra.title': 'Channel form description', - 'stepForm.created.extra.desc': - 'Advertiser channel promotion supports the tracking of users who place ads on third-party advertisers to download App users, such as launching App download advertisements on Toutiao channels, and tracking users who activate App by downloading on channels. ', - 'stepForm.created.extra.detail': 'Details', - }, - 'zh-CN': { - 'menu.form': '表单页', - 'menu.form.step': '分布表单', - 'stepForm.title': '创建渠道表单', - 'stepForm.next': '下一步', - 'stepForm.prev': '上一步', - 'stepForm.title.basicInfo': '基本信息', - 'stepForm.desc.basicInfo': '创建活动渠道', - 'stepForm.title.channel': '输入渠道信息', - 'stepForm.desc.channel': '输入详细的渠道内容', - 'stepForm.title.created': '完成创建', - 'stepForm.desc.created': '创建成功', - 'stepForm.basicInfo.name': '活动名称', - 'stepForm.basicInfo.name.required': '请输入活动名称', - 'stepForm.basicInfo.name.placeholder': '输入汉字、字母或数字,最多20字符', - 'stepForm.basicInfo.channelType': '渠道类型', - 'stepForm.basicInfo.channelType.required': '请选择渠道类型', - 'stepForm.basicInfo.time': '推广时间', - 'stepForm.basicInfo.time.required': '请选择推广时间', - 'stepForm.basicInfo.link': '推广地址', - 'stepForm.basicInfo.link.placeholder': '请输入推广页面地址', - 'stepForm.basicInfo.link.tips': - '如 Android 或 iOS 的下载地址、中间跳转URL,网址必须以 http:// 或 https:// 开头', - 'stepForm.channel.source': '广告来源', - 'stepForm.channel.source.required': '请输入广告来源', - 'stepForm.channel.source.placeholder': '引荐来源地址:sohu、sina', - 'stepForm.channel.media': '广告媒介', - 'stepForm.channel.media.required': '请输入广告媒介', - 'stepForm.channel.media.placeholder': '营销媒介:cpc、bannner、edm', - 'stepForm.channel.keywords': '关键词', - 'stepForm.channel.remind': '推送提醒', - 'stepForm.channel.content': '广告内容', - 'stepForm.channel.content.required': '请输入广告内容', - 'stepForm.channel.content.placeholder': - '请输入广告内容介绍,最多不超过200字', - 'stepForm.created.success.title': '创建成功', - 'stepForm.created.success.desc': '表单创建成功', - 'stepForm.created.success.view': '查看表单', - 'stepForm.created.success.again': '再次创建', - 'stepForm.created.extra.title': '渠道表单说明', - 'stepForm.created.extra.desc': - '广告商渠道推广支持追踪在第三方广告商投放广告下载App用户的场景,例如在今日头条渠道投放下载App广告,追踪通过在渠道下载激活App的用户。', - 'stepForm.created.extra.detail': '查看详情', - }, -}; - -export default i18n; diff --git a/admin/src/pages/form/step/mock/index.ts b/admin/src/pages/form/step/mock/index.ts deleted file mode 100644 index 27047ac..0000000 --- a/admin/src/pages/form/step/mock/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import Mock from 'mockjs'; -import setupMock from '@/utils/setupMock'; - -setupMock({ - setup: () => { - // 保存表单数据 - Mock.mock(new RegExp('/api/groupForm'), () => { - return true; - }); - }, -}); diff --git a/admin/src/pages/form/step/style/index.module.less b/admin/src/pages/form/step/style/index.module.less deleted file mode 100644 index 191ea60..0000000 --- a/admin/src/pages/form/step/style/index.module.less +++ /dev/null @@ -1,39 +0,0 @@ -.container { - :global(.arco-card-body) { - > h5 { - margin: 0; - } - - padding: 20px; - } -} - -.wrapper { - width: 624px; - margin: 0 auto; - padding-top: 56px; - padding-bottom: 70px; -} - -.form { - width: 100%; - box-sizing: border-box; - margin-top: 76px; - padding-right: 76px; -} - -.form-extra { - width: 895px; - margin: 54px auto; - background-color: var(--color-fill-1); - padding: 20px; - margin-bottom: 120px; - - > h6 { - margin-top: 0; - } - - > div { - margin-bottom: 0; - } -} diff --git a/admin/src/pages/list/card/card-add.tsx b/admin/src/pages/list/card/card-add.tsx deleted file mode 100644 index c0517f6..0000000 --- a/admin/src/pages/list/card/card-add.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import { Card } from '@arco-design/web-react'; -import cs from 'classnames'; -import { IconPlus } from '@arco-design/web-react/icon'; -import styles from './style/index.module.less'; - -interface AddCardProps { - description?: string; -} -function AddCard(props: AddCardProps) { - return ( - -
-
- -
-
{props.description}
-
-
- ); -} - -export default AddCard; diff --git a/admin/src/pages/list/card/card-block.tsx b/admin/src/pages/list/card/card-block.tsx deleted file mode 100644 index ab39e93..0000000 --- a/admin/src/pages/list/card/card-block.tsx +++ /dev/null @@ -1,255 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import cs from 'classnames'; -import { - Button, - Switch, - Tag, - Card, - Descriptions, - Typography, - Dropdown, - Menu, - Skeleton, -} from '@arco-design/web-react'; -import { - IconStarFill, - IconThumbUpFill, - IconSunFill, - IconFaceSmileFill, - IconPenFill, - IconCheckCircleFill, - IconCloseCircleFill, - IconMore, -} from '@arco-design/web-react/icon'; -import PermissionWrapper from '@/components/PermissionWrapper'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import { QualityInspection, BasicCard } from './interface'; -import styles from './style/index.module.less'; - -interface CardBlockType { - type: 'quality' | 'service' | 'rules'; - card: QualityInspection & BasicCard; - loading?: boolean; -} - -const IconList = [ - IconStarFill, - IconThumbUpFill, - IconSunFill, - IconFaceSmileFill, - IconPenFill, -].map((Tag, index) => ); - -const { Paragraph } = Typography; - -function CardBlock(props: CardBlockType) { - const { type, card = {} } = props; - const [visible, setVisible] = useState(false); - const [status, setStatus] = useState(card.status); - const [loading, setLoading] = useState(props.loading); - - const t = useLocale(locale); - const changeStatus = async () => { - setLoading(true); - await new Promise((resolve) => - setTimeout(() => { - setStatus(status !== 1 ? 1 : 0); - resolve(null); - }, 1000) - ).finally(() => setLoading(false)); - }; - - useEffect(() => { - setLoading(props.loading); - }, [props.loading]); - - useEffect(() => { - if (card.status !== status) { - setStatus(card.status); - } - }, [card.status]); - - const getTitleIcon = () => { - if (type === 'service' && typeof card.icon === 'number') { - return ( -
- {IconList[card.icon % IconList.length]} -
- ); - } - return null; - }; - - const getButtonGroup = () => { - if (type === 'quality') { - return ( - <> - - - - - - - - - ); - } - - if (type === 'service') { - return ( - <> - {status === 1 ? ( - - ) : ( - - )} - - ); - } - - return ( - - ); - }; - - const getStatus = () => { - if (type === 'rules' && status) { - return ( - } - className={styles.status} - size="small" - > - {t['cardList.tag.activated']} - - ); - } - switch (status) { - case 1: - return ( - } - className={styles.status} - size="small" - > - {t['cardList.tag.opened']} - - ); - case 2: - return ( - } - className={styles.status} - size="small" - > - {t['cardList.tag.expired']} - - ); - default: - return null; - } - }; - - const getContent = () => { - if (loading) { - return ( - - ); - } - if (type !== 'quality') { - return {card.description}; - } - return ( - - ); - }; - - const className = cs(styles['card-block'], styles[`${type}-card`]); - - return ( - - ) : ( - <> -
- {getTitleIcon()} - {card.title} - {getStatus()} - - {['操作1', '操作2'].map((item, key) => ( - {item} - ))} - - } - trigger="click" - onVisibleChange={setVisible} - popupVisible={visible} - > -
- -
-
-
-
{card.time}
- - ) - } - > -
{getContent()}
-
{getButtonGroup()}
-
- ); -} - -export default CardBlock; diff --git a/admin/src/pages/list/card/index.tsx b/admin/src/pages/list/card/index.tsx deleted file mode 100644 index 0d12633..0000000 --- a/admin/src/pages/list/card/index.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import axios from 'axios'; -import { Tabs, Card, Input, Typography, Grid } from '@arco-design/web-react'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import styles from './style/index.module.less'; -import CardBlock from './card-block'; -import AddCard from './card-add'; -import { QualityInspection, BasicCard } from './interface'; -import './mock'; - -const { Title } = Typography; -const { Row, Col } = Grid; - -const defaultList = new Array(10).fill({}); -export default function ListCard() { - const t = useLocale(locale); - const [loading, setLoading] = useState(true); - const [data, setData] = useState({ - quality: defaultList, - service: defaultList, - rules: defaultList, - }); - - const [activeKey, setActiveKey] = useState('all'); - - const getData = () => { - axios - .get('/api/cardList') - .then((res) => { - setData(res.data); - }) - .finally(() => setLoading(false)); - }; - - useEffect(() => { - getData(); - }, []); - 7; - const getCardList = ( - list: Array, - type: keyof typeof data - ) => { - return ( - - {type === 'quality' && ( -
- - - )} - {list.map((item, index) => ( - - - - ))} - - ); - }; - - return ( - - {t['menu.list.card']} - - } - > - - - - - -
- {activeKey === 'all' ? ( - Object.entries(data).map(([key, list]) => ( -
- {t[`cardList.tab.title.${key}`]} - {getCardList(list, key as keyof typeof data)} -
- )) - ) : ( -
- {getCardList(data[activeKey], activeKey as keyof typeof data)} -
- )} -
-
- ); -} diff --git a/admin/src/pages/list/card/interface.ts b/admin/src/pages/list/card/interface.ts deleted file mode 100644 index 9e79387..0000000 --- a/admin/src/pages/list/card/interface.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface QualityInspection { - title?: string; - time?: string; - qualityCount?: number; - randomCount?: number; - duration?: number; -} - -export interface BasicCard { - icon?: number; - status?: 0 | 1 | 2; - description?: string; -} diff --git a/admin/src/pages/list/card/locale/index.ts b/admin/src/pages/list/card/locale/index.ts deleted file mode 100644 index aa52403..0000000 --- a/admin/src/pages/list/card/locale/index.ts +++ /dev/null @@ -1,66 +0,0 @@ -const i18n = { - 'en-US': { - 'menu.list': 'List', - 'menu.list.card': 'Card List', - 'cardList.tab.title.all': 'All', - 'cardList.tab.title.quality': 'Content quality', - 'cardList.tab.title.service': 'Service opening', - 'cardList.tab.title.rules': 'Rule presets', - 'cardList.tab.all.placeholder': 'Search', - 'cardList.tab.quality.placeholder': 'Search queue', - 'cardList.tab.service.placeholder': 'Search service', - 'cardList.tab.rules.placeholder': 'Search rule', - 'cardList.searchInput.placeholder': 'Search service', - 'cardList.add.quality': 'Create quality inspection queue', - 'cardList.enable': 'Enable', - 'cardList.disable': 'Disable', - 'cardList.action': 'action', - 'cardList.detail': 'Detail', - 'cardList.tab.title.announcement': 'Recent Announcement', - 'cardList.announcement.noData': 'No announcement', - 'cardList.statistic.enable': 'Enable', - 'cardList.statistic.disable': 'Disable', - 'cardList.statistic.applicationNum': 'Applications', - 'cardList.options.qualityInspection': 'Quality inspection', - 'cardList.options.remove': 'Remove', - 'cardList.options.cancel': 'Cancel', - 'cardList.options.subscribe': 'Subscribe', - 'cardList.options.renewal': 'Renewal', - 'cardList.tag.activated': 'Activated', - 'cardList.tag.opened': 'Already Opened', - 'cardList.tag.expired': 'Expired', - }, - 'zh-CN': { - 'menu.list': '列表页', - 'menu.list.card': '卡片列表', - 'cardList.tab.title.all': '全部', - 'cardList.tab.title.quality': '内容质检', - 'cardList.tab.title.service': '服务开通', - 'cardList.tab.title.rules': '规则预置', - 'cardList.tab.all.placeholder': '搜索', - 'cardList.tab.quality.placeholder': '搜索队列', - 'cardList.tab.service.placeholder': '搜索服务', - 'cardList.tab.rules.placeholder': '搜索规则', - 'cardList.searchInput.placeholder': '搜索服务', - 'cardList.add.quality': '点击创建质检内容队列', - 'cardList.enable': '启用', - 'cardList.disable': '禁用', - 'cardList.action': '操作', - 'cardList.detail': '详细信息', - 'cardList.tab.title.announcement': '最近公告', - 'cardList.announcement.noData': '暂无公告', - 'cardList.statistic.enable': '已启用', - 'cardList.statistic.disable': '未启用', - 'cardList.statistic.applicationNum': '应用数', - 'cardList.options.qualityInspection': '质检', - 'cardList.options.remove': '删除', - 'cardList.options.cancel': '取消开通', - 'cardList.options.subscribe': '开通服务', - 'cardList.options.renewal': '续约服务', - 'cardList.tag.activated': '已启用', - 'cardList.tag.opened': '已开通', - 'cardList.tag.expired': '已过期', - }, -}; - -export default i18n; diff --git a/admin/src/pages/list/card/mock/index.ts b/admin/src/pages/list/card/mock/index.ts deleted file mode 100644 index 321188d..0000000 --- a/admin/src/pages/list/card/mock/index.ts +++ /dev/null @@ -1,106 +0,0 @@ -import Mock from 'mockjs'; -import dayjs from 'dayjs'; -import setupMock from '@/utils/setupMock'; - -const qualityCategory = ['视频类', '图文类', '纯文本']; -const qualityName = ['历史导入', '内容版权', '敏感内容', '商业品牌']; - -const serviceName = [ - '漏斗分析', - '用户分布', - '资源分发', - '用户画像分析', - '事件分析', -]; - -const serviceDescriptions = [ - '用户行为分析之漏斗分析模型是企业实现精细化运营、进行用户行为分析的重要数据分析模型。 ', - '快速诊断用户人群,地域细分情况,了解数据分布的集中度,以及主要的数据分布的区间段是什么。', - '移动端动态化资源分发解决方案。提供稳定大流量服务支持、灵活定制的分发圈选规则,通过离线化预加载。 ', - '用户画像就是将典型用户信息标签化,根据用户特征、业务场景和用户行为等信息,构建一个标签化的用户模型。 ', - '事件分析即可进行筛选、分组、聚合的灵活多维数据分析。详情请点击卡片。', -]; - -const rulesName = [ - '内容屏蔽规则', - '内容置顶规则', - '内容加权规则', - '内容分发规则', - '多语言文字符号识别', -]; - -const rulesDescription = [ - '用户在执行特定的内容分发任务时,可使用内容屏蔽规则根据特定标签,过滤内容集合。 ', - '该规则支持用户在执行特定内容分发任务时,对固定的几条内容置顶。', - '选定内容加权规则后可自定义从不同内容集合获取内容的概率。', - '内容分发时,对某些内容需要固定在C端展示的位置。', - '精准识别英语、维语、藏语、蒙古语、朝鲜语等多种语言以及emoji表情形态的语义识别。', -]; -const getQualityCard = () => { - const { list } = Mock.mock({ - 'list|10': [ - { - title: () => - `${Mock.Random.pick(qualityCategory)}-${Mock.Random.pick( - qualityName - )}`, - time: () => - dayjs() - .subtract(Mock.Random.natural(0, 30), 'days') - .format('YYYY-MM-DD HH:mm:ss'), - qualityCount: () => Mock.Random.natural(100, 500), - randomCount: () => Mock.Random.natural(0, 100), - duration: () => Mock.Random.natural(0, 200), - }, - ], - }); - return list; -}; - -const getServiceCard = () => { - const { list } = Mock.mock({ - 'list|10': [ - { - icon: () => Mock.Random.natural(0, serviceName.length - 1), - title: function () { - return serviceName[this.icon]; - }, - description: function () { - return serviceDescriptions[this.icon]; - }, - status: () => Mock.Random.natural(0, 2), - }, - ], - }); - return list; -}; - -const getRulesCard = () => { - const { list } = Mock.mock({ - 'list|10': [ - { - index: () => Mock.Random.natural(0, rulesName.length - 1), - title: function () { - return rulesName[this.index]; - }, - description: function () { - return rulesDescription[this.index]; - }, - status: () => Mock.Random.natural(0, 1), - }, - ], - }); - return list; -}; - -setupMock({ - setup: () => { - Mock.mock(new RegExp('/api/cardList'), () => { - return { - quality: getQualityCard(), - service: getServiceCard(), - rules: getRulesCard(), - }; - }); - }, -}); diff --git a/admin/src/pages/list/card/style/index.module.less b/admin/src/pages/list/card/style/index.module.less deleted file mode 100644 index f653ef8..0000000 --- a/admin/src/pages/list/card/style/index.module.less +++ /dev/null @@ -1,156 +0,0 @@ -.container { - :global(.arco-list-content) { - overflow-x: hidden; - } - - :global(.arco-card-meta-title) { - font-size: 14px; - } - - h6 { - font-size: 14px; - margin-top: 16px; - margin-bottom: 12px; - } - - .card-content { - min-height: 180px; - width: 100%; - } - - .single-content { - margin-top: 30px; - } -} - -.card-block { - margin-bottom: 16px; - - :global(.arco-card-header) { - border-bottom: none; - height: auto; - padding: 16px; - padding-bottom: 0; - } - - .title { - display: flex; - line-height: 24px; - align-items: center; - font-size: 14px; - font-weight: 500; - - .icon { - height: 24px; - width: 24px; - color: var(--color-white); - background: #626aea; - text-align: center; - line-height: 24px; - border-radius: 50%; - margin-right: 8px; - } - - .status { - margin-left: 12px; - } - - .more { - color: var(--color-text-4); - font-size: 16px; - position: absolute; - right: 16px; - cursor: pointer; - opacity: 0; - } - } - - .title-more { - .more { - opacity: 1; - } - } - - .time, - .content > :global(.arco-typography), - :global(.arco-descriptions-item-label), - :global(.arco-descriptions-item-value) { - font-size: 12px; - font-weight: 400; - color: var(--color-text-3); - padding: 0; - line-height: 20px; - } - - :global(.arco-descriptions-item-value) { - color: var(--color-text-2); - padding-left: 6px; - } - - .content { - height: 48px; - } - - .extra { - display: flex; - flex-direction: row-reverse; - } - - &-skeleton { - :global(.arco-skeleton-content .arco-skeleton-text-row:not(:last-child)) { - height: 14px; - margin-bottom: 8px; - } - } -} - -.card-block:hover { - box-shadow: 4px 4px 10px rgba(0, 0, 0, 10%); - - .title { - .more { - opacity: 1; - } - } -} - -.add-card { - text-align: center; - cursor: pointer; - - .add-icon { - font-size: 22px; - } - - .description { - margin-top: 16px; - color: var(--color-text-3); - font-weight: 400; - } - - :global(.arco-card-body) { - padding-top: 52px; - padding-bottom: 64px; - } -} - -.service-card { - :global(.arco-card-body) { - padding: 12px 16px 16px 48px; - } - - .content { - margin-bottom: 10px; - height: 60px; - } -} - -.rules-card { - :global(.arco-card-body) { - padding: 12px 16px 16px; - } - - .content { - margin-bottom: 14px; - } -} diff --git a/admin/src/pages/list/card/useRequest.ts b/admin/src/pages/list/card/useRequest.ts deleted file mode 100644 index c085cf4..0000000 --- a/admin/src/pages/list/card/useRequest.ts +++ /dev/null @@ -1,21 +0,0 @@ -import axios from 'axios'; -import { useEffect, useState } from 'react'; - -export default (url: string, defaultValue: T[]): [boolean, T[]] => { - const [loading, setLoading] = useState(false); - const [data, setData] = useState(defaultValue); - - useEffect(() => { - setLoading(true); - axios - .get(url) - .then((res) => { - setData(res.data); - }) - .finally(() => { - setLoading(false); - }); - }, [url]); - - return [loading, data]; -}; diff --git a/admin/src/pages/list/search-table/constants.tsx b/admin/src/pages/list/search-table/constants.tsx deleted file mode 100644 index 8beb00c..0000000 --- a/admin/src/pages/list/search-table/constants.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import React from 'react'; -import { Button, Typography, Badge } from '@arco-design/web-react'; -import IconText from './icons/text.svg'; -import IconHorizontalVideo from './icons/horizontal.svg'; -import IconVerticalVideo from './icons/vertical.svg'; -import dayjs from 'dayjs'; -import styles from './style/index.module.less'; - -const { Text } = Typography; - -export const ContentType = ['图文', '横版短视频', '竖版短视频']; -export const FilterType = ['规则筛选', '人工']; -export const Status = ['未上线', '已上线']; - -const ContentIcon = [ - , - , - , -]; - -export function getColumns( - t: any, - callback: (record: Record, type: string) => Promise -) { - return [ - { - title: t['searchTable.columns.id'], - dataIndex: 'id', - render: (value) => {value}, - }, - { - title: t['searchTable.columns.name'], - dataIndex: 'name', - }, - { - title: t['searchTable.columns.contentType'], - dataIndex: 'contentType', - render: (value) => ( -
- {ContentIcon[value]} - {ContentType[value]} -
- ), - }, - { - title: t['searchTable.columns.filterType'], - dataIndex: 'filterType', - render: (value) => FilterType[value], - }, - { - title: t['searchTable.columns.contentNum'], - dataIndex: 'count', - sorter: (a, b) => a.count - b.count, - render(x) { - return Number(x).toLocaleString(); - }, - }, - { - title: t['searchTable.columns.createdTime'], - dataIndex: 'createdTime', - render: (x) => dayjs().subtract(x, 'days').format('YYYY-MM-DD HH:mm:ss'), - sorter: (a, b) => b.createdTime - a.createdTime, - }, - { - title: t['searchTable.columns.status'], - dataIndex: 'status', - render: (x) => { - if (x === 0) { - return ; - } - return ; - }, - }, - { - title: t['searchTable.columns.operations'], - dataIndex: 'operations', - headerCellStyle: { paddingLeft: '15px' }, - render: (_, record) => ( - - ), - }, - ]; -} - -export default () => ContentIcon; diff --git a/admin/src/pages/list/search-table/form.tsx b/admin/src/pages/list/search-table/form.tsx deleted file mode 100644 index 07f6d11..0000000 --- a/admin/src/pages/list/search-table/form.tsx +++ /dev/null @@ -1,135 +0,0 @@ -import React, { useContext } from 'react'; -import dayjs from 'dayjs'; -import { - Form, - Input, - Select, - DatePicker, - Button, - Grid, -} from '@arco-design/web-react'; -import { GlobalContext } from '@/context'; -import locale from './locale'; -import useLocale from '@/utils/useLocale'; -import { IconRefresh, IconSearch } from '@arco-design/web-react/icon'; -import { ContentType, FilterType, Status } from './constants'; -import styles from './style/index.module.less'; - -const { Row, Col } = Grid; -const { useForm } = Form; - -function SearchForm(props: { - onSearch: (values: Record) => void; -}) { - const { lang } = useContext(GlobalContext); - - const t = useLocale(locale); - const [form] = useForm(); - - const handleSubmit = () => { - const values = form.getFieldsValue(); - props.onSearch(values); - }; - - const handleReset = () => { - form.resetFields(); - props.onSearch({}); - }; - - const colSpan = lang === 'zh-CN' ? 8 : 12; - - return ( -
-
- -
- - - - - - - - - - - - ({ - label: item, - value: index, - }))} - mode="multiple" - allowClear - /> - - - - - dayjs(date).isAfter(dayjs())} - /> - - - - -
- - ); -} - -export default SearchTable; diff --git a/admin/src/pages/list/search-table/locale/index.ts b/admin/src/pages/list/search-table/locale/index.ts deleted file mode 100644 index 742db1d..0000000 --- a/admin/src/pages/list/search-table/locale/index.ts +++ /dev/null @@ -1,52 +0,0 @@ -const i18n = { - 'en-US': { - 'menu.list': 'List', - 'menu.list.searchTable': 'Search Table', - 'searchTable.form.search': 'Search', - 'searchTable.form.reset': 'Reset', - 'searchTable.columns.id': 'Collection ID', - 'searchTable.columns.name': 'Collection Name', - 'searchTable.columns.contentType': 'Content genre', - 'searchTable.columns.filterType': 'Filter method', - 'searchTable.columns.createdTime': 'Creation time', - 'searchTable.columns.status': 'Status', - 'searchTable.columns.contentNum': 'Content quantity', - 'searchTable.columns.operations': 'Operation', - 'searchTable.columns.operations.view': 'View', - 'searchTable.columns.operations.update': 'Edit', - 'searchTable.columns.operations.offline': 'Offline', - 'searchTable.columns.operations.online': 'Online', - 'searchTable.operations.add': 'New', - 'searchTable.operations.upload': 'Bulk upload', - 'searchTable.operation.download': 'Download', - 'searchForm.id.placeholder': 'Please enter the collection ID', - 'searchForm.name.placeholder': 'Please enter the collection name', - 'searchForm.all.placeholder': 'all', - }, - 'zh-CN': { - 'menu.list': '列表页', - 'menu.list.searchTable': '查询表格', - 'searchTable.form.search': '查询', - 'searchTable.form.reset': '重置', - 'searchTable.columns.id': '集合编号', - 'searchTable.columns.name': '集合名称', - 'searchTable.columns.contentType': '内容体裁', - 'searchTable.columns.filterType': '筛选方式', - 'searchTable.columns.createdTime': '创建时间', - 'searchTable.columns.status': '状态', - 'searchTable.columns.contentNum': '内容量', - 'searchTable.columns.operations': '操作', - 'searchTable.columns.operations.view': '查看', - 'searchTable.columns.operations.update': '修改', - 'searchTable.columns.operations.online': '上线', - 'searchTable.columns.operations.offline': '下线', - 'searchTable.operations.add': '新建', - 'searchTable.operations.upload': '批量导入', - 'searchTable.operation.download': '下载', - 'searchForm.id.placeholder': '请输入集合编号', - 'searchForm.name.placeholder': '请输入集合名称', - 'searchForm.all.placeholder': '全部', - }, -}; - -export default i18n; diff --git a/admin/src/pages/list/search-table/mock/index.ts b/admin/src/pages/list/search-table/mock/index.ts deleted file mode 100644 index 4ba3b50..0000000 --- a/admin/src/pages/list/search-table/mock/index.ts +++ /dev/null @@ -1,99 +0,0 @@ -import Mock from 'mockjs'; -import qs from 'query-string'; -import dayjs from 'dayjs'; -import setupMock from '@/utils/setupMock'; - -const { list } = Mock.mock({ - 'list|100': [ - { - id: /[0-9]{8}[-][0-9]{4}/, - name: () => - Mock.Random.pick([ - '每日推荐视频集', - '抖音短视频候选集', - '国际新闻集合', - ]), - 'contentType|0-2': 0, - 'filterType|0-1': 0, - 'count|0-2000': 0, - 'createdTime|1-60': 0, - 'status|0-1': 0, - }, - ], -}); - -const filterData = ( - rest: { - id?: string; - name?: string; - 'contentType[]'?: string[]; - 'filterType[]'?: string[]; - 'createdTime[]'?: string[]; - 'status[]'?: string; - } = {} -) => { - const { - id, - name, - 'contentType[]': contentType, - 'filterType[]': filterType, - 'createdTime[]': createdTime, - 'status[]': status, - } = rest; - if (id) { - return list.filter((item) => item.id === id); - } - let result = [...list]; - if (name) { - result = result.filter((item) => { - return (item.name as string).toLowerCase().includes(name.toLowerCase()); - }); - } - if (contentType) { - result = result.filter((item) => - contentType.includes(item.contentType.toString()) - ); - } - if (filterType) { - result = result.filter((item) => - filterType.includes(item.filterType.toString()) - ); - } - if (createdTime && createdTime.length === 2) { - const [begin, end] = createdTime; - result = result.filter((item) => { - const time = dayjs() - .subtract(item.createdTime, 'days') - .format('YYYY-MM-DD HH:mm:ss'); - return ( - !dayjs(time).isBefore(dayjs(begin)) && !dayjs(time).isAfter(dayjs(end)) - ); - }); - } - - if (status && status.length) { - result = result.filter((item) => status.includes(item.status.toString())); - } - - return result; -}; - -setupMock({ - setup: () => { - Mock.mock(new RegExp('/api/list'), (params) => { - const { - page = 1, - pageSize = 10, - ...rest - } = qs.parseUrl(params.url).query; - const p = page as number; - const ps = pageSize as number; - - const result = filterData(rest); - return { - list: result.slice((p - 1) * ps, p * ps), - total: result.length, - }; - }); - }, -}); diff --git a/admin/src/pages/list/search-table/style/index.module.less b/admin/src/pages/list/search-table/style/index.module.less deleted file mode 100644 index 30c146c..0000000 --- a/admin/src/pages/list/search-table/style/index.module.less +++ /dev/null @@ -1,50 +0,0 @@ -.toolbar { - display: flex; - justify-content: space-between; - margin-bottom: 24px; -} - -.operations { - display: flex; -} - -.content-type { - display: flex; - - > svg { - margin-right: 8px; - margin-top: 3px; - } -} - -.search-form-wrapper { - display: flex; - border-bottom: 1px solid var(--color-border-1); - margin-bottom: 20px; - - .right-button { - display: flex; - flex-direction: column; - justify-content: space-between; - padding-left: 20px; - margin-bottom: 20px; - border-left: 1px solid var(--color-border-2); - box-sizing: border-box; - } -} - -.button-group { - display: flex; - justify-content: space-between; - margin-bottom: 20px; -} - -.search-form { - padding-right: 20px; - - :global(.arco-form-label-item-left) { - > label { - white-space: nowrap; - } - } -} diff --git a/admin/src/pages/profile/basic/index.tsx b/admin/src/pages/profile/basic/index.tsx deleted file mode 100644 index a88960a..0000000 --- a/admin/src/pages/profile/basic/index.tsx +++ /dev/null @@ -1,164 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import { - Card, - Steps, - Typography, - Grid, - Space, - Button, - Table, - Badge, -} from '@arco-design/web-react'; -import axios from 'axios'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import ProfileItem from './item'; -import styles from './style/index.module.less'; -import './mock'; - -function BasicProfile() { - const t = useLocale(locale); - const [loading, setLoading] = useState(false); - const [data, setData] = useState({ status: 1 }); - const [preLoading, setPreLoading] = useState(false); - const [preData, setPreData] = useState({}); - const [tableLoading, setTableLoading] = useState(false); - const [tableData, setTableData] = useState([]); - - function fetchData() { - setLoading(true); - axios - .get('/api/basicProfile') - .then((res) => { - setData(res.data || {}); - }) - .finally(() => { - setLoading(false); - }); - } - - function fetchPreData() { - setPreLoading(true); - axios - .get('/api/basicProfile') - .then((res) => { - setPreData(res.data || {}); - }) - .finally(() => { - setPreLoading(false); - }); - } - - function fetchTableData() { - setTableLoading(true); - axios - .get('/api/adjustment') - .then((res) => { - setTableData(res.data); - }) - .finally(() => { - setTableLoading(false); - }); - } - useEffect(() => { - fetchData(); - fetchPreData(); - fetchTableData(); - }, []); - - return ( -
- - - - - {t['basicProfile.title.form']} - - - - - - - - - - - - - - - - - - - - - - {t['basicProfile.adjustment.record']} - -
{ - if (status) { - return ( - - ); - } - - return ( - - ); - }, - }, - { - dataIndex: 'updatedTime', - title: t['basicProfile.adjustment.updatedTime'], - }, - { - title: t['basicProfile.adjustment.operation'], - headerCellStyle: { paddingLeft: '15px' }, - render() { - return ( - - ); - }, - }, - ]} - /> - - - ); -} - -export default BasicProfile; diff --git a/admin/src/pages/profile/basic/item.tsx b/admin/src/pages/profile/basic/item.tsx deleted file mode 100644 index dd6a883..0000000 --- a/admin/src/pages/profile/basic/item.tsx +++ /dev/null @@ -1,128 +0,0 @@ -import React, { CSSProperties } from 'react'; -import useLocale from '@/utils/useLocale'; -import { Descriptions, Card, Skeleton } from '@arco-design/web-react'; -import locale from './locale'; - -interface ProfileItemProps { - title: string; - data: any; - style?: CSSProperties; - type: 'origin' | 'current'; - loading?: boolean; -} - -function ProfileItem(props: ProfileItemProps) { - const t = useLocale(locale); - const { title, data, type, loading } = props; - const blockDataList: { - title: string; - data: { - label: string; - value: string; - }[]; - }[] = []; - - blockDataList.push({ - title: t[`basicProfile.title.${type}Video`], - data: [ - { - label: t['basicProfile.label.video.mode'], - value: data?.video?.mode || '-', - }, - { - label: t['basicProfile.label.video.acquisition.resolution'], - value: data?.video?.acquisition.resolution || '-', - }, - { - label: t['basicProfile.label.video.acquisition.frameRate'], - value: `${data?.video?.acquisition.frameRate || '-'} fps`, - }, - { - label: t['basicProfile.label.video.encoding.resolution'], - value: data?.video?.encoding.resolution || '-', - }, - { - label: t['basicProfile.label.video.encoding.rate.min'], - value: `${data?.video?.encoding.rate.min || '-'} bps`, - }, - { - label: t['basicProfile.label.video.encoding.rate.max'], - value: `${data?.video?.encoding.rate.max || '-'} bps`, - }, - { - label: t['basicProfile.label.video.encoding.rate.default'], - value: `${data?.video?.encoding.rate.default || '-'} bps`, - }, - { - label: t['basicProfile.label.video.encoding.frameRate'], - value: `${data?.video?.encoding.frameRate || '-'} fpx`, - }, - { - label: t['basicProfile.label.video.encoding.profile'], - value: data?.video?.encoding.profile || '-', - }, - ], - }); - - blockDataList.push({ - title: t[`basicProfile.title.${type}Audio`], - data: [ - { - label: t['basicProfile.label.audio.mode'], - value: data?.audio?.mode || '-', - }, - { - label: t['basicProfile.label.audio.acquisition.channels'], - value: `${data?.audio?.acquisition.channels || '-'} ${ - t['basicProfile.unit.audio.channels'] - }`, - }, - { - label: t['basicProfile.label.audio.encoding.channels'], - value: `${data?.audio?.encoding.channels || '-'} ${ - t['basicProfile.unit.audio.channels'] - }`, - }, - { - label: t['basicProfile.label.audio.encoding.rate'], - value: `${data?.audio?.encoding.rate || '-'} kbps`, - }, - { - label: t['basicProfile.label.audio.encoding.profile'], - value: data?.audio?.encoding.profile || '-', - }, - ], - }); - - return ( - -
- {blockDataList.map(({ title: blockTitle, data: blockData }, index) => ( - ({ - ...item, - value: ( - - ), - })) - : blockData - } - style={index > 0 ? { marginTop: '20px' } : {}} - /> - ))} -
-
- ); -} - -export default ProfileItem; diff --git a/admin/src/pages/profile/basic/locale/index.ts b/admin/src/pages/profile/basic/locale/index.ts deleted file mode 100644 index 24e7c89..0000000 --- a/admin/src/pages/profile/basic/locale/index.ts +++ /dev/null @@ -1,82 +0,0 @@ -const i18n = { - 'en-US': { - 'menu.profile': 'Profile', - 'menu.profile.basic': 'Basic Profile', - 'basicProfile.title.form': 'Parameter Approval Process Table', - 'basicProfile.steps.commit': 'Commit', - 'basicProfile.steps.approval': 'Approval', - 'basicProfile.steps.finish': 'Finish', - 'basicProfile.title.currentVideo': 'Current Video Parameters', - 'basicProfile.title.currentAudio': 'Current Audio Parameters', - 'basicProfile.title.originVideo': 'Origin Video Parameters', - 'basicProfile.title.originAudio': 'Origin Audio Parameters', - 'basicProfile.label.video.mode': 'Config Mode', - 'basicProfile.label.video.acquisition.resolution': 'Acquisition Resolution', - 'basicProfile.label.video.acquisition.frameRate': 'Acquisition Frame Rate', - 'basicProfile.label.video.encoding.resolution': 'Encoding Resolution', - 'basicProfile.label.video.encoding.rate.min': 'Encoding Min Rate', - 'basicProfile.label.video.encoding.rate.max': 'Encoding Max Rate', - 'basicProfile.label.video.encoding.rate.default': 'Encoding Default Rate', - 'basicProfile.label.video.encoding.frameRate': 'Encoding Frame Rate', - 'basicProfile.label.video.encoding.profile': 'Encoding Profile', - 'basicProfile.label.audio.mode': 'Config Mode', - 'basicProfile.label.audio.acquisition.channels': 'Acquisition Channels', - 'basicProfile.label.audio.encoding.channels': 'Encoding Channels', - 'basicProfile.label.audio.encoding.rate': 'Encoding Rate', - 'basicProfile.label.audio.encoding.profile': 'Encoding Profile', - 'basicProfile.unit.audio.channels': 'channels', - 'basicProfile.goBack': 'GoBack', - 'basicProfile.cancel': 'Cancel Process', - - 'basicProfile.adjustment.record': 'Parameter adjustment record', - 'basicProfile.adjustment.contentId': 'Content number', - 'basicProfile.adjustment.content': 'Adjust content', - 'basicProfile.adjustment.status': 'Current state', - 'basicProfile.adjustment.updatedTime': 'Change the time', - 'basicProfile.adjustment.operation': 'Operation', - 'basicProfile.adjustment.success': 'passed', - 'basicProfile.adjustment.waiting': 'under review', - 'basicProfile.adjustment.operation.view': 'view', - }, - 'zh-CN': { - 'menu.profile': '详情页', - 'menu.profile.basic': '基础详情页', - 'basicProfile.title.form': '参数审批流程表', - 'basicProfile.steps.commit': '提交修改', - 'basicProfile.steps.approval': '审批中', - 'basicProfile.steps.finish': '修改完成', - 'basicProfile.title.currentVideo': '现视频参数', - 'basicProfile.title.currentAudio': '现音频参数', - 'basicProfile.title.originVideo': '原视频参数', - 'basicProfile.title.originAudio': '原音频参数', - 'basicProfile.label.video.mode': '配置模式', - 'basicProfile.label.video.acquisition.resolution': '采集分辨率', - 'basicProfile.label.video.acquisition.frameRate': '采集帧率', - 'basicProfile.label.video.encoding.resolution': '编码分辨率', - 'basicProfile.label.video.encoding.rate.min': '编码码率最小值', - 'basicProfile.label.video.encoding.rate.max': '编码码率最大值', - 'basicProfile.label.video.encoding.rate.default': '编码码率默认值', - 'basicProfile.label.video.encoding.frameRate': '编码帧率', - 'basicProfile.label.video.encoding.profile': '编码profile', - 'basicProfile.label.audio.mode': '配置模式', - 'basicProfile.label.audio.acquisition.channels': '采集声道数', - 'basicProfile.label.audio.encoding.channels': '编码声道数', - 'basicProfile.label.audio.encoding.rate': '编码码率', - 'basicProfile.label.audio.encoding.profile': '编码 profile', - 'basicProfile.unit.audio.channels': '声道', - 'basicProfile.goBack': '返回', - 'basicProfile.cancel': '取消流程', - - 'basicProfile.adjustment.record': '参数调整记录', - 'basicProfile.adjustment.contentId': '内容编号', - 'basicProfile.adjustment.content': '调整内容', - 'basicProfile.adjustment.status': '当前状态', - 'basicProfile.adjustment.updatedTime': '修改时间', - 'basicProfile.adjustment.operation': '操作', - 'basicProfile.adjustment.success': '已通过', - 'basicProfile.adjustment.waiting': '审核中', - 'basicProfile.adjustment.operation.view': '查看', - }, -}; - -export default i18n; diff --git a/admin/src/pages/profile/basic/mock/index.ts b/admin/src/pages/profile/basic/mock/index.ts deleted file mode 100644 index 9ee76d5..0000000 --- a/admin/src/pages/profile/basic/mock/index.ts +++ /dev/null @@ -1,52 +0,0 @@ -import Mock from 'mockjs'; -import setupMock from '@/utils/setupMock'; - -setupMock({ - setup: () => { - Mock.mock(new RegExp('/api/basicProfile'), () => { - return { - status: 2, - video: { - mode: '自定义', - acquisition: { - resolution: '720*1280', - frameRate: 15, - }, - encoding: { - resolution: '720*1280', - rate: { - min: 300, - max: 800, - default: 1500, - }, - frameRate: 15, - profile: 'high', - }, - }, - audio: { - mode: '自定义', - acquisition: { - channels: 8, - }, - encoding: { - channels: 8, - rate: 128, - profile: 'ACC-LC', - }, - }, - }; - }); - - Mock.mock(new RegExp('/api/adjustment'), () => { - return new Array(2).fill('0').map(() => ({ - contentId: `${Mock.Random.pick([ - '视频类', - '音频类', - ])}${Mock.Random.natural(1000, 9999)}`, - content: '视频参数变更,音频参数变更', - status: Mock.Random.natural(0, 1), - updatedTime: Mock.Random.datetime('yyyy-MM-dd HH:mm:ss'), - })); - }); - }, -}); diff --git a/admin/src/pages/profile/basic/style/index.module.less b/admin/src/pages/profile/basic/style/index.module.less deleted file mode 100644 index f8b2670..0000000 --- a/admin/src/pages/profile/basic/style/index.module.less +++ /dev/null @@ -1,12 +0,0 @@ -.container { - :global(.arco-card) { - margin-top: 16px; - } -} - -.steps { - max-width: 548px; - margin: 0 auto; - margin-top: 8px; - margin-bottom: 30px; -} diff --git a/admin/src/pages/result/error/index.tsx b/admin/src/pages/result/error/index.tsx deleted file mode 100644 index 9e861ac..0000000 --- a/admin/src/pages/result/error/index.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import React from 'react'; -import { Typography, Result, Button, Link } from '@arco-design/web-react'; -import { IconLink } from '@arco-design/web-react/icon'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import styles from './style/index.module.less'; - -function Success() { - const t = useLocale(locale); - - return ( -
-
- - {t['error.result.goBack']} - , - , - ]} - /> -
- - {t['error.detailTitle']} - - -
    -
  1. - {t['error.detailLine.record']} - - - {t['error.detailLine.record.link']} - -
  2. -
  3. - {t['error.detailLine.auth']} - {t['error.detailLine.auth.link']} -
  4. -
-
-
-
-
- ); -} - -export default Success; diff --git a/admin/src/pages/result/error/locale/index.ts b/admin/src/pages/result/error/locale/index.ts deleted file mode 100644 index 5a65c1a..0000000 --- a/admin/src/pages/result/error/locale/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -const i18n = { - 'en-US': { - 'menu.result': 'Result', - 'menu.result.error': 'Error', - 'error.result.title': 'Submit Error', - 'error.result.subTitle': - 'Please check the modified information and try again', - 'error.result.goBack': 'GoBack', - 'error.result.retry': 'Retry', - 'error.detailTitle': 'Details of Error', - 'error.detailLine.record': - 'The current domain name has not been registered, please check the registration process: ', - 'error.detailLine.record.link': 'Registration Process', - 'error.detailLine.auth': - 'Your user group does not have the authority to perform this operation;', - 'error.detailLine.auth.link': 'Request for access', - }, - 'zh-CN': { - 'menu.result': '结果页', - 'menu.result.error': '失败页', - 'error.result.title': '提交失败', - 'error.result.subTitle': '请核对修改信息后,再重试', - 'error.result.goBack': '回到首页', - 'error.result.retry': '返回修改', - 'error.detailTitle': '错误详情', - 'error.detailLine.record': '当前域名未备案,备案流程请查看:', - 'error.detailLine.record.link': '备案流程', - 'error.detailLine.auth': '你的用户组不具有进行此操作的权限;', - 'error.detailLine.auth.link': '申请权限', - }, -}; - -export default i18n; diff --git a/admin/src/pages/result/error/style/index.module.less b/admin/src/pages/result/error/style/index.module.less deleted file mode 100644 index 3947e2f..0000000 --- a/admin/src/pages/result/error/style/index.module.less +++ /dev/null @@ -1,18 +0,0 @@ -.wrapper { - padding: 24px 150px; - background-color: var(--color-bg-2); - box-sizing: border-box; - min-height: calc(100vh - 168px); -} - -.result { - margin: 150px 0 36px; -} - -.details-wrapper { - width: 100%; - padding: 20px; - background-color: var(--color-fill-2); - box-sizing: border-box; - margin-bottom: 150px; -} diff --git a/admin/src/pages/result/success/index.tsx b/admin/src/pages/result/success/index.tsx deleted file mode 100644 index 1ac560d..0000000 --- a/admin/src/pages/result/success/index.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import React from 'react'; -import { Typography, Result, Button, Steps } from '@arco-design/web-react'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import styles from './style/index.module.less'; - -const Step = Steps.Step; - -function Success() { - const t = useLocale(locale); - - return ( -
-
- - {t['success.result.printResult']} - , - , - ]} - /> -
- - {t['success.result.progress']} - - - - - - - - -
-
-
- ); -} - -export default Success; diff --git a/admin/src/pages/result/success/locale/index.ts b/admin/src/pages/result/success/locale/index.ts deleted file mode 100644 index 985797a..0000000 --- a/admin/src/pages/result/success/locale/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -const i18n = { - 'en-US': { - 'menu.result': 'Result', - 'menu.result.success': 'Success', - 'success.result.title': 'Submit Success', - 'success.result.subTitle': 'Submit form success!', - 'success.result.printResult': 'Print result', - 'success.result.projectList': 'Project List', - 'success.result.progress': 'Progress', - 'success.submitApplication': 'Submit Application', - 'success.leaderReview': 'Leader Review', - 'success.purchaseCertificate': 'Purchase Certificate', - 'success.safetyTest': 'Safety Test', - 'success.launched': 'Officially launched', - 'success.waiting': 'Waiting', - 'success.processing': 'Processing', - }, - 'zh-CN': { - 'menu.result': '结果页', - 'menu.result.success': '成功页', - 'success.result.title': '提交成功', - 'success.result.subTitle': '表单提交成功!', - 'success.result.printResult': '打印结果', - 'success.result.projectList': '返回项目列表', - 'success.result.progress': '当前进度', - 'success.submitApplication': '提交申请', - 'success.leaderReview': '直属领导审核', - 'success.purchaseCertificate': '购买证书', - 'success.safetyTest': '安全测试', - 'success.launched': '正式上线', - 'success.waiting': '未开始', - 'success.processing': '进行中', - }, -}; - -export default i18n; diff --git a/admin/src/pages/result/success/style/index.module.less b/admin/src/pages/result/success/style/index.module.less deleted file mode 100644 index e1aba0d..0000000 --- a/admin/src/pages/result/success/style/index.module.less +++ /dev/null @@ -1,19 +0,0 @@ -.wrapper { - padding: 24px 150px; - background-color: var(--color-bg-2); - box-sizing: border-box; - min-height: calc(100vh - 168px); -} - -.result { - margin: 150px 0 36px; -} - -.steps-wrapper { - width: 100%; - min-width: fit-content; - padding: 20px; - background-color: var(--color-fill-2); - box-sizing: border-box; - margin-bottom: 150px; -} diff --git a/admin/src/pages/user/info/assets/header-banner.png b/admin/src/pages/user/info/assets/header-banner.png deleted file mode 100644 index bda89bf..0000000 Binary files a/admin/src/pages/user/info/assets/header-banner.png and /dev/null differ diff --git a/admin/src/pages/user/info/blocks/project.tsx b/admin/src/pages/user/info/blocks/project.tsx deleted file mode 100644 index c8c40b0..0000000 --- a/admin/src/pages/user/info/blocks/project.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import React from 'react'; -import styles from '../style/blocks.module.less'; -import { Card, Avatar, Typography, Skeleton } from '@arco-design/web-react'; -const { Text, Title } = Typography; - -export interface ProjectProps { - title?: string; - enTitle?: string; - contributors?: { - name?: string; - email?: string; - avatar?: string; - }[]; - contributorsLength?: number; - loading?: boolean; -} - -function ProjectCard(props: ProjectProps) { - const { loading, contributors } = props; - return ( - - {loading ? ( - - ) : ( - {props.title} - )} - - {loading ? ( - - ) : ( - - {props.enTitle} - - )} - -
- {loading ? ( - - ) : ( - <> - - {(contributors || []).map((item, index) => ( - - - - ))} - - - 等{(props.contributorsLength || 0).toLocaleString()}人 - - - )} -
-
- ); -} - -export default ProjectCard; diff --git a/admin/src/pages/user/info/header.tsx b/admin/src/pages/user/info/header.tsx deleted file mode 100644 index 5f16a26..0000000 --- a/admin/src/pages/user/info/header.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import React from 'react'; -import { Avatar, Space, Skeleton } from '@arco-design/web-react'; -import { - IconCamera, - IconLocation, - IconUser, - IconHome, -} from '@arco-design/web-react/icon'; -import styles from './style/index.module.less'; - -interface HeaderProps { - userInfo?: { - name?: string; - avatar?: string; - jobName?: string; - organizationName?: string; - locationName?: string; - }; - loading?: boolean; -} - -function UserInfoHeader(props: HeaderProps) { - const { userInfo = {}, loading } = props; - - const loadingNode = ( - - ); - const loadingImgNode = ( - - ); - return ( -
- - {loading ? ( - loadingImgNode - ) : ( - }> - - - )} -
- {loading ? loadingNode : userInfo.name} -
-
- -
- - - {loading ? loadingNode : userInfo.jobName} - -
-
- - - {loading ? loadingNode : userInfo.organizationName} - -
-
- - - {loading ? loadingNode : userInfo.locationName} - -
-
-
-
-
- ); -} - -export default UserInfoHeader; diff --git a/admin/src/pages/user/info/index.tsx b/admin/src/pages/user/info/index.tsx deleted file mode 100644 index cabfc02..0000000 --- a/admin/src/pages/user/info/index.tsx +++ /dev/null @@ -1,98 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import axios from 'axios'; -import { useSelector } from 'react-redux'; -import { - Typography, - Grid, - Link, - Result, - Skeleton, -} from '@arco-design/web-react'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import UserInfoHeader from './header'; -import styles from './style/index.module.less'; -import './mock'; -import { Card } from '@arco-design/web-react'; -import MyProject from './my-projects'; -import MyTeam from './my-team'; -import LatestNews from './latest-news'; - -const { Title } = Typography; -const { Row, Col } = Grid; -function UserInfo() { - const t = useLocale(locale); - const userInfo = useSelector((state: any) => state.userInfo); - const loading = useSelector((state: any) => state.userLoading); - - const [noticeLoading, setNoticeLoading] = useState(false); - - const getNotice = async () => { - setNoticeLoading(true); - await axios.get('/api/user/notice').finally(() => setNoticeLoading(false)); - }; - - useEffect(() => { - getNotice(); - }, []); - - return ( -
- - -
- -
- - {t['userInfo.title.project']} - - {t['userInfo.btn.more']} -
- -
- - - -
- - {t['userInfo.title.team']} - -
- -
- - - - - -
- - {t['userInfo.title.news']} - - {t['userInfo.btn.all']} -
- -
- - - -
- {t['userInfo.title.notice']} -
- {noticeLoading ? ( - - ) : ( - - )} -
- - - - ); -} - -export default UserInfo; diff --git a/admin/src/pages/user/info/latest-news.tsx b/admin/src/pages/user/info/latest-news.tsx deleted file mode 100644 index 407e643..0000000 --- a/admin/src/pages/user/info/latest-news.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import axios from 'axios'; -import { List, Typography, Skeleton, Avatar } from '@arco-design/web-react'; -import styles from './style/index.module.less'; - -const { Paragraph } = Typography; -interface INews { - title?: string; - description?: string; - avatar?: string; -} - -function LatestNews() { - const [data, setData] = useState(new Array(4).fill({})); - const [loading, setLoading] = useState(true); - - const getData = async () => { - const { data } = await axios - .get('/api/user/latestNews') - .finally(() => setLoading(false)); - setData(data); - }; - - useEffect(() => { - getData(); - }, []); - - return ( - { - return ( - - {loading ? ( - - ) : ( - - - - } - title={item.title} - description={ - - {item.description} - - } - /> - )} - - ); - }} - /> - ); -} - -export default LatestNews; diff --git a/admin/src/pages/user/info/locale/index.ts b/admin/src/pages/user/info/locale/index.ts deleted file mode 100644 index 2b6e9d9..0000000 --- a/admin/src/pages/user/info/locale/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -const i18n = { - 'en-US': { - 'menu.user': 'Personal Center', - 'menu.user.info': 'User Center', - 'userInfo.title.project': 'My project', - 'userInfo.title.news': 'Latest News', - 'userInfo.title.team': 'My team', - 'userInfo.title.notice': 'In-site Notification', - 'userInfo.btn.more': 'More', - 'userInfo.btn.all': 'All', - 'userInfo.notice.empty': 'No Data', - }, - 'zh-CN': { - 'menu.user': '个人中心', - 'menu.user.info': '用户中心', - 'userInfo.title.project': '我的项目', - 'userInfo.title.news': '最新动态', - 'userInfo.title.team': '我的团队', - 'userInfo.title.notice': '站内通知', - 'userInfo.btn.more': '查看更多', - 'userInfo.btn.all': '查看全部', - 'userInfo.notice.empty': '暂无数据', - }, -}; - -export default i18n; diff --git a/admin/src/pages/user/info/mock/index.ts b/admin/src/pages/user/info/mock/index.ts deleted file mode 100644 index b63be7d..0000000 --- a/admin/src/pages/user/info/mock/index.ts +++ /dev/null @@ -1,99 +0,0 @@ -import Mock from 'mockjs'; -import setupMock from '@/utils/setupMock'; - -setupMock({ - setup: () => { - // 我的项目 - Mock.mock(new RegExp('/api/user/projectList'), () => { - const contributors = [ - { - name: '秦臻宇', - email: 'qingzhenyu@arco.design', - avatar: - '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/a8c8cdb109cb051163646151a4a5083b.png~tplv-uwbnlip3yd-webp.webp', - }, - { - name: '于涛', - email: 'yuebao@arco.design', - avatar: - '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/a8c8cdb109cb051163646151a4a5083b.png~tplv-uwbnlip3yd-webp.webp', - }, - { - name: '宁波', - email: 'ningbo@arco.design', - avatar: - '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp', - }, - { - name: '郑曦月', - email: 'zhengxiyue@arco.design', - avatar: - '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/8361eeb82904210b4f55fab888fe8416.png~tplv-uwbnlip3yd-webp.webp', - }, - { - name: '宁波', - email: 'ningbo@arco.design', - avatar: - '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp', - }, - ]; - return new Array(6).fill(null).map((_item, index) => ({ - id: index, - enTitle: [ - 'Arco Design System', - 'The Volcano Engine', - 'OCR text recognition', - 'Content resource management', - 'Toutiao content management', - 'Intelligent Robot Project', - ][index], - title: [ - '企业级产品设计系统', - '火山引擎智能应用', - 'OCR文本识别', - '内容资源管理', - '今日头条内容管理', - '智能机器人', - ][index], - contributors, - contributorsLength: Mock.Random.natural(5, 100), - })); - }); - - // 我的团队 - Mock.mock(new RegExp('/api/users/teamList'), () => { - return new Array(4).fill(null).map((_, index) => ({ - name: [ - '火山引擎智能应用团队', - '企业级产品设计团队', - '前端/UE小分队', - '内容识别插件小分队', - ][index], - avatar: [ - '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/a8c8cdb109cb051163646151a4a5083b.png~tplv-uwbnlip3yd-webp.webp', - '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp', - '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp', - '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/8361eeb82904210b4f55fab888fe8416.png~tplv-uwbnlip3yd-webp.webp', - ][index], - members: Mock.Random.natural(1, 1000), - })); - }); - - // 最新动态 - Mock.mock(new RegExp('/api/user/latestNews'), () => { - return new Array(8).fill(null).map((_item, index) => ({ - id: index, - title: '王多鱼审核了图文内容: 2021年,你过得怎么样?', - description: - '新华网年终特别策划:《这一年,你过得怎么样?》回访那些你最熟悉的“陌生人”带你重温这难忘的2021年回顾我们共同记忆中的生动故事!', - avatar: - '//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/a8c8cdb109cb051163646151a4a5083b.png~tplv-uwbnlip3yd-webp.webp', - })); - }); - - // 站内通知 - Mock.mock(new RegExp('/api/user/notice'), () => { - return []; - }); - }, -}); diff --git a/admin/src/pages/user/info/my-projects.tsx b/admin/src/pages/user/info/my-projects.tsx deleted file mode 100644 index 73419eb..0000000 --- a/admin/src/pages/user/info/my-projects.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import axios from 'axios'; -import { Grid } from '@arco-design/web-react'; -import ProjectCard, { ProjectProps } from './blocks/project'; - -function MyProject() { - const [data, setData] = useState(new Array(6).fill({})); - const [loading, setLoading] = useState(true); - - const { Row, Col } = Grid; - - const getData = async () => { - setLoading(true); - const { data } = await axios.get('/api/user/projectList').finally(() => { - setLoading(false); - }); - setData(data); - }; - - useEffect(() => { - getData(); - }, []); - - return ( - - {data.map((item, index) => ( - data.length - 4 && index < data.length - ? { marginTop: '16px' } - : {} - } - > - - - ))} - - ); -} - -export default MyProject; diff --git a/admin/src/pages/user/info/my-team.tsx b/admin/src/pages/user/info/my-team.tsx deleted file mode 100644 index bb39153..0000000 --- a/admin/src/pages/user/info/my-team.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import { Avatar, Typography, List, Skeleton } from '@arco-design/web-react'; -import axios from 'axios'; - -const { Text } = Typography; - -interface ITeam { - avatar?: string; - name?: string; - members?: number; -} - -function MyTeam() { - const [data, setData] = useState(new Array(4).fill({})); - const [loading, setLoading] = useState(true); - - const getData = async () => { - const { data } = await axios - .get('/api/users/teamList') - .finally(() => setLoading(false)); - setData(data); - }; - - useEffect(() => { - getData(); - }, []); - - return ( - { - return ( - - {loading ? ( - - ) : ( - - - - } - title={item.name} - description={ - {`共${( - item.members || 0 - ).toLocaleString()}人`} - } - /> - )} - - ); - }} - /> - ); -} - -export default MyTeam; diff --git a/admin/src/pages/user/info/style/blocks.module.less b/admin/src/pages/user/info/style/blocks.module.less deleted file mode 100644 index 45b029a..0000000 --- a/admin/src/pages/user/info/style/blocks.module.less +++ /dev/null @@ -1,18 +0,0 @@ -.project-wrapper { - cursor: pointer; - - h6 { - margin-top: 0; - margin-bottom: 6px; - font-size: 14px; - } - - .avatar { - margin-top: 22px; - } - - .more { - font-size: 12px; - margin-left: 12px; - } -} diff --git a/admin/src/pages/user/info/style/index.module.less b/admin/src/pages/user/info/style/index.module.less deleted file mode 100644 index 491fe24..0000000 --- a/admin/src/pages/user/info/style/index.module.less +++ /dev/null @@ -1,62 +0,0 @@ -.header { - height: 200px; - display: flex; - justify-content: center; - align-items: center; - color: var(--color-text-1); - border-radius: 4px; - position: relative; - - :global(.arco-avatar-trigger-icon-button) { - color: rgb(var(--arcoblue-6)); - - :global(.arco-icon) { - vertical-align: -1px; - } - } - - .username { - font-weight: 500; - font-size: 16px; - } - - .user-msg { - &-text { - display: inline-block; - margin-left: 6px; - } - } -} - -.header::after { - background: url('../assets/header-banner.png') no-repeat; - background-size: 100%; - height: 200px; - width: 100%; - position: absolute; - top: 0; - left: 0; - opacity: 0.4; - content: ' '; -} - -.header-content { - position: relative; - z-index: 2; -} - -.wrapper { - margin-top: 16px; -} - -.card-title-wrapper { - display: flex; - justify-content: space-between; -} - -.list-meta-ellipsis { - :global(.arco-list-item-meta-content) { - width: 0; - flex: 1; - } -} diff --git a/admin/src/pages/user/setting/header.tsx b/admin/src/pages/user/setting/header.tsx deleted file mode 100644 index 72a393d..0000000 --- a/admin/src/pages/user/setting/header.tsx +++ /dev/null @@ -1,172 +0,0 @@ -import React, { useEffect, useState, useCallback } from 'react'; -import { - Button, - Avatar, - Upload, - Descriptions, - Tag, - Skeleton, - Link, - Image, - Space, -} from '@arco-design/web-react'; -import { IconCamera, IconPlus, IconEye, IconDelete } from '@arco-design/web-react/icon'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import styles from './style/header.module.less'; - -export default function Info({ - userInfo = {}, - loading, -}: { - userInfo: Record; - loading: boolean; -}) { - const t = useLocale(locale); - - const [avatar, setAvatar] = useState(''); - const [previewVisible, setPreviewVisible] = useState(false); - - function onAvatarChange(_: unknown, file: { originFile?: File; response?: { data?: string; url?: string } }) { - if (file.response?.data) { - setAvatar(file.response.data); - } else if (file.response?.url) { - setAvatar(file.response.url); - } else if (file.originFile) { - setAvatar(URL.createObjectURL(file.originFile)); - } else { - setAvatar(''); - } - } - - const handleDelete = useCallback(() => { - setAvatar(''); - }, []); - - useEffect(() => { - if (typeof userInfo.avatar === 'string') { - setAvatar(userInfo.avatar); - } - }, [userInfo]); - - const loadingImg = ( - - ); - - const loadingNode = ; - return ( -
- {loading ? ( - loadingImg - ) : ( -
-
- - {avatar ? avatar : } - -
- - - - - {avatar && ( - <> - - - - )} - - {avatar && ( - - )} -
- )} - - {userInfo.verified ? ( - - {t['userSetting.value.verified']} - - ) : ( - - {t['userSetting.value.notVerified']} - - )} - - {t['userSetting.btn.edit']} - - - ), - }, - { - label: t['userSetting.label.accountId'], - value: loading ? loadingNode : userInfo.accountId, - }, - { - label: t['userSetting.label.phoneNumber'], - value: loading ? ( - loadingNode - ) : ( - - {userInfo.phoneNumber} - - {t['userSetting.btn.edit']} - - - ), - }, - { - label: t['userSetting.label.registrationTime'], - value: loading ? loadingNode : userInfo.registrationTime, - }, - ]} - > -
- ); -} diff --git a/admin/src/pages/user/setting/index.tsx b/admin/src/pages/user/setting/index.tsx deleted file mode 100644 index b34f03a..0000000 --- a/admin/src/pages/user/setting/index.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import React, { useState } from 'react'; -import { useSelector } from 'react-redux'; -import { Card, Tabs } from '@arco-design/web-react'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import InfoHeader from './header'; -import InfoForm from './info'; -import Security from './security'; -import './mock'; -import Verified from './verified'; - -function UserInfo() { - const t = useLocale(locale); - const userInfo = useSelector((state: any) => state.userInfo); - const loading = useSelector((state: any) => state.userLoading); - const [activeTab, setActiveTab] = useState('basic'); - return ( -
- - - - - - - - - - - - - - - - -
- ); -} - -export default UserInfo; diff --git a/admin/src/pages/user/setting/info.tsx b/admin/src/pages/user/setting/info.tsx deleted file mode 100644 index c1a3aa8..0000000 --- a/admin/src/pages/user/setting/info.tsx +++ /dev/null @@ -1,176 +0,0 @@ -import React, { useContext } from 'react'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import { GlobalContext } from '@/context'; -import { - Input, - Select, - Cascader, - Button, - Form, - Space, - Message, - Skeleton, -} from '@arco-design/web-react'; - -function InfoForm({ loading }: { loading?: boolean }) { - const t = useLocale(locale); - const [form] = Form.useForm(); - const { lang } = useContext(GlobalContext); - - const handleSave = async () => { - try { - await form.validate(); - Message.success('userSetting.saveSuccess'); - } catch (_) {} - }; - - const handleReset = () => { - form.resetFields(); - }; - - const loadingNode = (rows = 1) => { - return ( - - ); - }; - - return ( - - - {loading ? ( - loadingNode() - ) : ( - - )} - - - {loading ? ( - loadingNode() - ) : ( - - )} - - - {loading ? ( - loadingNode() - ) : ( - - )} - - - {loading ? ( - loadingNode(3) - ) : ( - - )} - - - - - - - - - - ); -} - -export default InfoForm; diff --git a/admin/src/pages/user/setting/locale/index.ts b/admin/src/pages/user/setting/locale/index.ts deleted file mode 100644 index 35bb194..0000000 --- a/admin/src/pages/user/setting/locale/index.ts +++ /dev/null @@ -1,150 +0,0 @@ -const i18n = { - 'en-US': { - 'menu.user': 'Personal Center', - 'menu.user.setting': 'User Setting', - 'userSetting.menu.title.info': 'Personal Information', - 'userSetting.menu.title.account': 'Account Setting', - 'userSetting.menu.title.password': 'Password', - 'userSetting.menu.title.message': 'Message Notification', - 'userSetting.menu.title.result': 'Result', - 'userSetting.menu.title.data': 'Export Data', - 'userSetting.saveSuccess': 'Save Success', - 'userSetting.title.basicInfo': 'Basic Information', - 'userSetting.title.security': 'Security Settings', - 'userSetting.label.avatar': 'Avatar', - 'userSetting.label.name': 'User Name', - 'userSetting.label.accountId': 'Account ID', - 'userSetting.label.verified': 'Whether Verified', - 'userSetting.value.verified': 'verified', - 'userSetting.value.notVerified': 'not verified', - 'userSetting.label.phoneNumber': 'Phone Number', - 'userSetting.label.registrationTime': 'Registration time', - 'userSetting.btn.edit': 'Edit', - 'userSetting.save': 'Save', - 'userSetting.reset': 'Reset', - - 'userSetting.info.email': 'Email', - 'userSetting.info.email.placeholder': - 'Please enter your email address, such as xxx@bytedance.com', - 'userSetting.info.nickName': 'Nick name', - 'userSetting.info.nickName.placeholder': 'Please enter your nickname', - 'userSetting.info.area': 'Country / Region', - 'userSetting.info.area.placeholder': 'Please select a country/region', - 'userSetting.info.location': 'Your location', - 'userSetting.info.address': 'Specific address', - 'userSetting.info.address.placeholder': 'Please enter your address', - 'userSetting.info.profile': 'Personal profile', - 'userSetting.info.profile.placeholder': - 'Please enter your profile, no more than 200 words.', - 'userSetting.security.password': 'Login Password', - 'userSetting.security.password.tips': - 'Has been set. The password has at least 6 characters, supports numbers, letters and special characters except spaces, and must contain both numbers and uppercase and lowercase letters. ', - 'userSetting.security.question': 'Secure question', - 'userSetting.security.question.placeholder': - 'You have not set a secret security question, which can effectively protect the security of your account.', - 'userSetting.security.phone': 'Secure phone', - 'userSetting.security.phone.tips': 'Bound:', - 'userSetting.security.email': 'Secure email', - 'userSetting.security.email.placeholder': - 'You have not set up an email address yet. The bound email address can be used to retrieve your password, receive notifications, etc.', - 'userSetting.verified.enterprise': 'Enterprise real-name certification', - 'userSetting.verified.records': 'Certification records', - 'userSetting.verified.label.accountType': 'Account Type', - - 'userSetting.verified.label.isVerified': 'Authentication status', - 'userSetting.verified.label.verifiedTime': 'Authentication time', - 'userSetting.verified.label.legalPersonName': 'Legal Person name', - 'userSetting.verified.label.certificateType': - 'Type of legal person certificate', - 'userSetting.verified.label.certificationNumber': - 'Legal person certification number', - 'userSetting.verified.label.enterpriseName': 'Enterprise Name', - - 'userSetting.verified.label.enterpriseCertificateType': - 'Enterprise certificate type', - 'userSetting.verified.label.organizationCode': 'Organization Code', - - 'userSetting.verified.authType': 'Authentication type', - 'userSetting.verified.authContent': 'Authentication content', - 'userSetting.verified.authStatus': 'Current status', - 'userSetting.verified.createdTime': 'Created time', - 'userSetting.verified.operation': 'Operation', - 'userSetting.verified.operation.view': 'View', - 'userSetting.verified.operation.revoke': 'Revoke', - 'userSetting.verified.status.success': 'passed', - 'userSetting.verified.status.waiting': 'under review', - }, - - 'zh-CN': { - 'menu.user': '个人中心', - 'menu.user.setting': '用户设置', - 'userSetting.menu.title.info': '个人信息', - 'userSetting.menu.title.account': '账号设置', - 'userSetting.menu.title.password': '密码', - 'userSetting.menu.title.message': '消息通知', - 'userSetting.menu.title.result': '结果页', - 'userSetting.menu.title.data': '导出数据', - 'userSetting.saveSuccess': '保存成功', - 'userSetting.title.basicInfo': '基本信息', - 'userSetting.title.security': '安全设置', - 'userSetting.label.avatar': '头像', - 'userSetting.label.name': '用户名', - 'userSetting.label.accountId': '账号ID', - 'userSetting.label.verified': '实名认证', - 'userSetting.value.verified': '已认证', - 'userSetting.value.notVerified': '未认证', - 'userSetting.label.phoneNumber': '手机号码', - 'userSetting.label.registrationTime': '注册时间', - 'userSetting.btn.edit': '修改', - 'userSetting.btn.set': '设置', - 'userSetting.save': '保存', - 'userSetting.reset': '重置', - 'userSetting.info.email': '邮箱', - 'userSetting.info.email.placeholder': '请输入邮箱地址,如xxx@bytedance.com', - 'userSetting.info.nickName': '昵称', - 'userSetting.info.nickName.placeholder': '请输入您的昵称', - 'userSetting.info.area': '国家/地区', - 'userSetting.info.area.placeholder': '请选择国家/地区', - 'userSetting.info.location': '所在区域', - 'userSetting.info.address': '具体地址', - 'userSetting.info.address.placeholder': '请输入您的地址', - 'userSetting.info.profile': '个人简介', - 'userSetting.info.profile.placeholder': - '请输入您的个人简介,最多不超过200字。', - 'userSetting.security.password': '登陆密码', - 'userSetting.security.password.tips': - '已设置。密码至少6位字符,支持数字、字母和除空格外的特殊字符,且必须同时包含数字和大小写字母。', - 'userSetting.security.question': '密保问题', - 'userSetting.security.question.placeholder': - '您暂未设置密保问题,密保问题可以有效的保护账号的安全。', - 'userSetting.security.phone': '安全手机', - 'userSetting.security.phone.tips': '已绑定:', - 'userSetting.security.email': '安全邮箱', - 'userSetting.security.email.placeholder': - '您暂未设置邮箱,绑定邮箱可以用来找回密码、接收通知等。', - - 'userSetting.verified.enterprise': '企业实名认证', - 'userSetting.verified.label.accountType': '账号类型', - 'userSetting.verified.label.isVerified': '认证状态', - 'userSetting.verified.label.verifiedTime': '认证时间', - 'userSetting.verified.label.legalPersonName': '法人姓名', - 'userSetting.verified.label.certificateType': '法人证件类型', - 'userSetting.verified.label.certificationNumber': '法人认证号码', - 'userSetting.verified.label.enterpriseName': '企业名称', - 'userSetting.verified.label.enterpriseCertificateType': '企业证件类型', - 'userSetting.verified.label.organizationCode': '组织机构代码', - 'userSetting.verified.records': '认证记录', - - 'userSetting.verified.authType': '认证类型', - 'userSetting.verified.authContent': '认证内容', - 'userSetting.verified.authStatus': '当前状态', - 'userSetting.verified.createdTime': '创建时间', - 'userSetting.verified.operation': '操作', - 'userSetting.verified.operation.view': '查看', - 'userSetting.verified.operation.revoke': '撤回', - 'userSetting.verified.status.success': '已通过', - 'userSetting.verified.status.waiting': '审核中', - }, -}; - -export default i18n; diff --git a/admin/src/pages/user/setting/mock/index.ts b/admin/src/pages/user/setting/mock/index.ts deleted file mode 100644 index a1d18da..0000000 --- a/admin/src/pages/user/setting/mock/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -import Mock from 'mockjs'; -import setupMock from '@/utils/setupMock'; - -setupMock({ - setup: () => { - // 保存个人信息 - Mock.mock(new RegExp('/api/user/saveInfo'), () => { - return 'ok'; - }); - - // 实名认证信息 - Mock.mock(new RegExp('/api/user/verified/enterprise'), () => { - return Mock.mock({ - accountType: '企业账号', - isVerified: true, - verifiedTime: Mock.Random.datetime('yyyy-MM-dd HH:mm:ss'), - legalPersonName: Mock.Random.cfirst() + '**', - certificateType: '中国身份证', - certificationNumber: /[1-9]{3}[*]{12}[0-9]{3}/, - enterpriseName: Mock.Random.ctitle(), - enterpriseCertificateType: '企业营业执照', - organizationCode: /[1-9]{1}[*]{7}[0-9]{1}/, - }); - }); - - Mock.mock(new RegExp('/api/user/verified/authList'), () => { - return new Array(3).fill('0').map(() => ({ - authType: '企业证件认证', - authContent: `企业证件认证,法人姓名${Mock.Random.cfirst()}**`, - authStatus: Mock.Random.natural(0, 1), - createdTime: Mock.Random.datetime('yyyy-MM-dd HH:mm:ss'), - })); - }); - }, -}); diff --git a/admin/src/pages/user/setting/security.tsx b/admin/src/pages/user/setting/security.tsx deleted file mode 100644 index 25677b7..0000000 --- a/admin/src/pages/user/setting/security.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import React from 'react'; -import { useSelector } from 'react-redux'; -import cs from 'classnames'; -import { Button } from '@arco-design/web-react'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import styles from './style/index.module.less'; - -function Security() { - const t = useLocale(locale); - - const userInfo = useSelector((state: any) => { - return state.userInfo || {}; - }); - - const data = [ - { - title: t['userSetting.security.password'], - value: t['userSetting.security.password.tips'], - }, - { - title: t['userSetting.security.question'], - value: '', - placeholder: t['userSetting.security.question.placeholder'], - }, - { - title: t['userSetting.security.phone'], - value: userInfo.phoneNumber - ? `${t['userSetting.security.phone.tips']} ${userInfo.phoneNumber}` - : '', - }, - { - title: t['userSetting.security.email'], - value: '', - placeholder: t['userSetting.security.email.placeholder'], - }, - ]; - - return ( -
- {data.map((item, index) => ( -
- {item.title} -
- - {item.value || item.placeholder} - - - - - -
-
- ))} -
- ); -} - -export default Security; diff --git a/admin/src/pages/user/setting/style/header.module.less b/admin/src/pages/user/setting/style/header.module.less deleted file mode 100644 index 941c4e4..0000000 --- a/admin/src/pages/user/setting/style/header.module.less +++ /dev/null @@ -1,33 +0,0 @@ -.info-wrapper { - display: flex; -} - -.info-avatar { - :global(.arco-avatar-trigger-icon-button) { - color: rgb(var(--arcoblue-6)); - right: 0; - bottom: 0; - width: 30px; - height: 30px; - font-size: 14px; - box-sizing: border-box; - border: 2px solid var(--color-white); - } -} - -.info-content { - flex: 1; - width: 0; - margin-left: 60px; - padding-right: 60px; -} - -.verified-tag { - height: 20px; - line-height: 20px; - margin-top: -2px; -} - -.edit-btn { - margin-left: 12px; -} diff --git a/admin/src/pages/user/setting/style/index.module.less b/admin/src/pages/user/setting/style/index.module.less deleted file mode 100644 index 84a7d0a..0000000 --- a/admin/src/pages/user/setting/style/index.module.less +++ /dev/null @@ -1,74 +0,0 @@ -.wrapper { - display: flex; - background-color: var(--color-bg-2); - - .sidebar { - width: 200px; - border-right: 1px solid var(--color-border); - } - - .content { - flex: 1; - padding: 20px 24px; - } -} - -.info { - &-form { - width: 375px; - } - - &-avatar { - :global(.arco-avatar-trigger-icon-button) { - color: rgb(var(--arcoblue-6)); - } - } -} - -.security { - padding: 0 16px; - - &-item { - display: flex; - - &-title { - margin-right: 16px; - font-weight: 500; - color: var(--color-text-2); - padding-top: 30px; - padding-bottom: 20px; - } - - &-content { - display: flex; - width: 0; - flex: 1; - justify-content: space-between; - border-bottom: 1px solid var(--color-border-2); - padding-top: 30px; - padding-bottom: 20px; - } - - &-placeholder { - color: var(--color-text-3); - } - } -} - -.verified { - padding: 0 16px; - - > h6 { - font-size: 14px; - margin-top: 16px; - } - - &-enterprise { - padding: 16px; - background-color: var(--color-fill-1); - - td { - width: 30%; - } - } -} diff --git a/admin/src/pages/user/setting/verified.tsx b/admin/src/pages/user/setting/verified.tsx deleted file mode 100644 index f157c70..0000000 --- a/admin/src/pages/user/setting/verified.tsx +++ /dev/null @@ -1,144 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import { - Descriptions, - Table, - Typography, - Skeleton, - Tag, - Space, - Button, - Badge, -} from '@arco-design/web-react'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import axios from 'axios'; -import styles from './style/index.module.less'; - -function Verified() { - const t = useLocale(locale); - const [data, setData] = useState({ - accountType: '', - isVerified: true, - verifiedTime: '', - legalPersonName: '', - certificateType: '', - certificationNumber: '', - enterpriseName: '', - enterpriseCertificateType: '', - organizationCode: '', - }); - - const [loading, setLoading] = useState(true); - const [tableData, setTableData] = useState([]); - const [tableLoading, setTableLoading] = useState(true); - - const getData = async () => { - const { data } = await axios - .get('/api/user/verified/enterprise') - .finally(() => setLoading(false)); - setData(data); - - const { data: tableData } = await axios - .get('/api/user/verified/authList') - .finally(() => setTableLoading(false)); - setTableData(tableData); - }; - - useEffect(() => { - getData(); - }, []); - - const loadingNode = ; - - return ( -
- - {t['userSetting.verified.enterprise']} - - ({ - label: t[`userSetting.verified.label.${key}`], - value: loading ? ( - loadingNode - ) : typeof value === 'boolean' ? ( - value ? ( - {t['userSetting.value.verified']} - ) : ( - {t['userSetting.value.notVerified']} - ) - ) : ( - value - ), - }))} - /> - - - {t['userSetting.verified.records']} - -
- ) : ( - - - - ); - }, - }, - { - title: t['userSetting.verified.createdTime'], - dataIndex: 'createdTime', - }, - { - title: t['userSetting.verified.operation'], - headerCellStyle: { paddingLeft: '15px' }, - render: (_, x) => { - if (x.authStatus) { - return ( - - ); - } - return ( - - - - - ); - }, - }, - ]} - data={tableData} - loading={tableLoading} - /> - - ); -} - -export default Verified; diff --git a/admin/src/pages/visualization/data-analysis/index.tsx b/admin/src/pages/visualization/data-analysis/index.tsx deleted file mode 100644 index 36bcc82..0000000 --- a/admin/src/pages/visualization/data-analysis/index.tsx +++ /dev/null @@ -1,118 +0,0 @@ -import React, { useEffect, useMemo, useState } from 'react'; -import { Card, Grid, Table, Space, Typography } from '@arco-design/web-react'; -import useLocale from '@/utils/useLocale'; -import axios from 'axios'; -import locale from './locale'; -import PublicOpinion from './public-opinion'; -import MultiInterval from '@/components/Chart/multi-stack-interval'; -import PeriodLine from '@/components/Chart/period-legend-line'; -import './mock'; - -const { Row, Col } = Grid; - -function DataAnalysis() { - const t = useLocale(locale); - const [loading, setLoading] = useState(false); - const [tableLoading, setTableLoading] = useState(false); - - const [chartData, setChartData] = useState([]); - const [tableData, setTableData] = useState([]); - - const getChartData = async () => { - setLoading(true); - const { data } = await axios - .get('/api/data-analysis/content-publishing') - .finally(() => setLoading(false)); - setChartData(data); - }; - - const getTableData = async () => { - setTableLoading(true); - const { data } = await axios - .get('/api/data-analysis/author-list') - .finally(() => setTableLoading(false)); - setTableData(data.list); - }; - - useEffect(() => { - getChartData(); - getTableData(); - }, []); - - const columns = useMemo(() => { - return [ - { - title: t['dataAnalysis.authorTable.rank'], - dataIndex: 'id', - }, - { - title: t['dataAnalysis.authorTable.author'], - dataIndex: 'author', - }, - { - title: t['dataAnalysis.authorTable.content'], - dataIndex: 'contentCount', - sorter: (a, b) => a.contentCount - b.contentCount, - render(x) { - return Number(x).toLocaleString(); - }, - }, - { - title: t['dataAnalysis.authorTable.click'], - dataIndex: 'clickCount', - sorter: (a, b) => a.clickCount - b.clickCount, - render(x) { - return Number(x).toLocaleString(); - }, - }, - ]; - }, [t]); - - return ( - - - - {t['dataAnalysis.title.publicOpinion']} - - - - - - - - {t['dataAnalysis.title.publishingRate']} - - - - - - - - {t['dataAnalysis.title.authorsList']} - -
-
- - - - - - - - - {t['dataAnalysis.title.publishingTiming']} - - - - - - - ); -} -export default DataAnalysis; diff --git a/admin/src/pages/visualization/data-analysis/locale/index.ts b/admin/src/pages/visualization/data-analysis/locale/index.ts deleted file mode 100644 index f50054d..0000000 --- a/admin/src/pages/visualization/data-analysis/locale/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -const i18n = { - 'en-US': { - 'menu.visualization': 'Data Visualization', - 'menu.visualization.analysis': 'Analysis', - 'dataAnalysis.yesterday': 'Yesterday', - 'dataAnalysis.title.publicOpinion': 'Public Opinion Analysis', - 'dataAnalysis.publicOpinion.visitor': 'Total visitors', - 'dataAnalysis.publicOpinion.content': 'Total content publishing', - 'dataAnalysis.publicOpinion.comment': 'Total comments', - 'dataAnalysis.publicOpinion.share': 'Total share', - 'dataAnalysis.title.publishingRate': 'Content publishing rate', - 'dataAnalysis.title.publishingTiming': 'Content period analysis', - 'dataAnalysis.title.authorsList': 'Top authors list', - 'dataAnalysis.authorTable.rank': 'Rank ', - 'dataAnalysis.authorTable.author': 'Author', - 'dataAnalysis.authorTable.content': 'Interval volume', - 'dataAnalysis.authorTable.click': 'Click volume', - }, - 'zh-CN': { - 'menu.visualization': '数据可视化', - 'menu.visualization.analysis': '分析页', - 'dataAnalysis.yesterday': '较昨日', - 'dataAnalysis.title.publicOpinion': '舆情分析', - 'dataAnalysis.publicOpinion.visitor': '访问总人数', - 'dataAnalysis.publicOpinion.content': '内容发布量', - 'dataAnalysis.publicOpinion.comment': '评论总量', - 'dataAnalysis.publicOpinion.share': '分享总量', - 'dataAnalysis.title.publishingRate': '内容发布比例', - 'dataAnalysis.title.publishingTiming': '内容时段分析', - 'dataAnalysis.title.authorsList': '热门作者榜单', - 'dataAnalysis.authorTable.rank': '排名', - 'dataAnalysis.authorTable.author': '作者', - 'dataAnalysis.authorTable.content': '内容量', - 'dataAnalysis.authorTable.click': '点击量', - }, -}; - -export default i18n; diff --git a/admin/src/pages/visualization/data-analysis/mock/index.ts b/admin/src/pages/visualization/data-analysis/mock/index.ts deleted file mode 100644 index 1bef339..0000000 --- a/admin/src/pages/visualization/data-analysis/mock/index.ts +++ /dev/null @@ -1,91 +0,0 @@ -import Mock from 'mockjs'; -import qs from 'query-string'; -import setupMock from '@/utils/setupMock'; - -const mockLine = (name) => { - const result = new Array(12).fill(0).map(() => ({ - y: Mock.Random.natural(20, 100), - })); - return result.map((item, index) => ({ - ...item, - x: index, - name, - })); -}; - -const mockPie = () => { - return new Array(3).fill(0).map((_, index) => ({ - name: ['纯文本', '图文类', '视频类'][index], - count: Mock.Random.natural(20, 100), - })); -}; - -setupMock({ - setup: () => { - Mock.mock(new RegExp('/api/data-analysis/overview'), (params) => { - const { type } = qs.parseUrl(params.url).query; - return Mock.mock({ - count: () => Mock.Random.natural(1000, 10000), - increment: () => Mock.Random.boolean(), - diff: () => Mock.Random.natural(100, 1000), - chartType: type, - chartData: () => { - if (type === 'pie') { - return mockPie(); - } else if (type === 'line') { - return [...mockLine('类目1'), ...mockLine('类目2')]; - } - return mockLine('类目1'); - }, - }); - }); - - const getTimeLine = (name) => { - const timeArr = new Array(12).fill(0).map((_, index) => { - const time = index * 2; - return time < 9 ? `0${time}:00` : `${time}:00`; - }); - return new Array(12).fill(0).map((_, index) => ({ - name, - time: timeArr[index], - count: Mock.Random.natural(1000, 5000), - rate: Mock.Random.natural(0, 100), - })); - }; - - Mock.mock(new RegExp('/api/data-analysis/content-publishing'), () => { - return [ - ...getTimeLine('纯文本'), - ...getTimeLine('视频类'), - ...getTimeLine('图文类'), - ]; - }); - - Mock.mock(new RegExp('/api/data-analysis/author-list'), () => { - return Mock.mock({ - 'list|8': [ - { - 'id|+1': 1, - author: () => - Mock.Random.pick([ - '用魔法打败魔法', - '王多鱼', - 'Christopher', - '叫我小李好了', - '陈皮话梅糖', - '碳烤小肥羊', - ]), - time: function () { - return new Array(12).fill(0).map((_, index) => { - const time = index * 2; - return time < 9 ? `0${time}:00` : `${time}:00`; - })[this.id % 12]; - }, - contentCount: () => Mock.Random.natural(1000, 5000), - clickCount: () => Mock.Random.natural(5000, 30000), - }, - ], - }); - }); - }, -}); diff --git a/admin/src/pages/visualization/data-analysis/public-opinion/card.tsx b/admin/src/pages/visualization/data-analysis/public-opinion/card.tsx deleted file mode 100644 index c66ba30..0000000 --- a/admin/src/pages/visualization/data-analysis/public-opinion/card.tsx +++ /dev/null @@ -1,187 +0,0 @@ -import React from 'react'; -import { Skeleton, Statistic, Typography } from '@arco-design/web-react'; -import cs from 'classnames'; -import { - Chart, - Line, - Interval, - Coordinate, - Interaction, - Tooltip, - G2, - Legend, -} from 'bizcharts'; - -import { IconArrowRise, IconArrowFall } from '@arco-design/web-react/icon'; -import styles from '../style/public-opinion.module.less'; - -const { Title, Text } = Typography; -const basicChartProps = { - pure: true, - autoFit: true, - height: 80, - padding: [10, 10, 0, 10], -}; - -export interface PublicOpinionCardProps { - key: string; - title: string; - chartData?: any[]; - chartType: 'line' | 'interval' | 'pie'; - count?: number; - increment?: boolean; - diff?: number; - compareTime?: string; - loading?: boolean; -} - -function SimpleLine(props: { chartData: any[] }) { - const { chartData } = props; - return ( - - { - if (name === '类目2') { - return { lineDash: [8, 10] }; - } - return {}; - }, - }} - /> - - ); -} - -function SimpleInterval(props: { chartData: any[] }) { - const { chartData } = props; - - G2.registerShape('interval', 'border-radius', { - draw(cfg, container) { - const points = cfg.points as unknown as { x: string; y: number }; - let path = []; - path.push(['M', points[0].x, points[0].y]); - path.push(['L', points[1].x, points[1].y]); - path.push(['L', points[2].x, points[2].y]); - path.push(['L', points[3].x, points[3].y]); - path.push('Z'); - path = this.parsePath(path); // 将 0 - 1 转化为画布坐标 - - const group = container.addGroup(); - group.addShape('rect', { - attrs: { - x: path[1][1], // 矩形起始点为左上角 - y: path[1][2], - width: path[2][1] - path[1][1], - height: path[0][2] - path[1][2], - fill: cfg.color, - radius: (path[2][1] - path[1][1]) / 2, - }, - }); - return group; - }, - }); - - return ( - - { - if (Number(xVal) % 2 === 0) { - return '#2CAB40'; - } - return '#86DF6C'; - }, - ]} - shape="border-radius" - /> - - ); -} - -function SimplePie(props: { chartData: any[] }) { - const { chartData } = props; - - return ( - - - - - - - - ); -} - -function PublicOpinionCard(props: PublicOpinionCardProps) { - const { chartType, title, count, increment, diff, chartData, loading } = - props; - const className = cs(styles.card, styles[`card-${chartType}`]); - - return ( -
-
- - {title} - - } - loading={loading} - value={count} - groupSeparator - /> -
- - {props.compareTime} - - - {loading ? ( - - ) : ( - <> - {diff} - {increment ? : } - - )} - -
-
-
- {loading ? ( - - ) : ( - <> - {chartType === 'interval' && ( - - )} - {chartType === 'line' && } - {chartType === 'pie' && } - - )} -
-
- ); -} - -export default PublicOpinionCard; diff --git a/admin/src/pages/visualization/data-analysis/public-opinion/index.tsx b/admin/src/pages/visualization/data-analysis/public-opinion/index.tsx deleted file mode 100644 index 148a6fa..0000000 --- a/admin/src/pages/visualization/data-analysis/public-opinion/index.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import React, { useState, useEffect, useMemo } from 'react'; -import PublicOpinionCard, { PublicOpinionCardProps } from './card'; -import axios from 'axios'; -import { Grid } from '@arco-design/web-react'; -import useLocale from '@/utils/useLocale'; -import locale from '../locale'; - -const { Row, Col } = Grid; - -const cardInfo = [ - { - key: 'visitor', - type: 'line', - }, - { - key: 'content', - type: 'interval', - }, - { - key: 'comment', - type: 'line', - }, - { - key: 'share', - type: 'pie', - }, -]; - -function PublicOpinion() { - const t = useLocale(locale); - const [loading, setLoading] = useState(true); - const [data, setData] = useState( - cardInfo.map((item) => ({ - ...item, - chartType: item.type as 'line' | 'pie' | 'interval', - title: t[`dataAnalysis.publicOpinion.${item.key}`], - })) - ); - - const getData = async () => { - const requestList = cardInfo.map(async (info) => { - const { data } = await axios - .get(`/api/data-analysis/overview?type=${info.type}`) - .catch(() => ({ data: {} })); - return { - ...data, - key: info.key, - chartType: info.type, - }; - }); - const result = await Promise.all(requestList).finally(() => - setLoading(false) - ); - setData(result); - }; - - useEffect(() => { - getData(); - }, []); - - const formatData = useMemo(() => { - return data.map((item) => ({ - ...item, - title: t[`dataAnalysis.publicOpinion.${item.key}`], - })); - }, [t, data]); - - return ( -
- - {formatData.map((item, index) => ( -
- - - ))} - - - ); -} - -export default PublicOpinion; diff --git a/admin/src/pages/visualization/data-analysis/style/public-opinion.module.less b/admin/src/pages/visualization/data-analysis/style/public-opinion.module.less deleted file mode 100644 index 9277d1c..0000000 --- a/admin/src/pages/visualization/data-analysis/style/public-opinion.module.less +++ /dev/null @@ -1,96 +0,0 @@ -@line-card-bg: linear-gradient(180deg, rgb(242 249 254) 0%, #e6f4fe 100%); - -@interval-card-bg: linear-gradient( - 180deg, - rgb(245 254 242) 0%, - rgb(230 254 238) 100% -); - -@pie-card-bg: linear-gradient( - 180deg, - rgb(247 247 255) 0%, - rgb(236 236 255) 100% -); - -@line-card-dark-bg: linear-gradient(180deg, #284991 0%, #122b62 100%); -@interval-card-dark-bg: linear-gradient(180deg, #3d492e 0%, #263827 100%); -@pie-card-dark-bg: linear-gradient(180deg, #312565 0%, #201936 100%); - -.card { - display: flex; - padding: 20px; - padding-top: 16px; - border-radius: 4px; - min-height: 100px; - - &-line { - background: @line-card-bg; - } - - &-interval { - background: @interval-card-bg; - } - - &-pie { - background: @pie-card-bg; - } - - .statistic { - white-space: nowrap; - } - - .chart { - flex: auto; - display: flex; - flex-direction: column-reverse; - margin-left: 16px; - } - - .title { - margin: 0; - } - - :global(.arco-statistic-content) { - margin-top: 24px; - margin-bottom: 4px; - - :global(.arco-statistic-value) { - font-size: 24px; - line-height: 28px; - } - } - - .compare-yesterday { - &-text { - font-size: 12px; - font-weight: 400; - color: var(--color-text-2); - } - } - - .diff { - margin-left: 8px; - line-height: 20px; - color: rgb(var(--red-6)); - } - - .diff-increment { - color: rgb(var(--green-6)); - } -} - -body[arco-theme='dark'] { - .card { - &-line { - background: @line-card-dark-bg; - } - - &-pie { - background: @pie-card-dark-bg; - } - - &-interval { - background: @interval-card-dark-bg; - } - } -} diff --git a/admin/src/pages/visualization/multi-dimension-data-analysis/card-list.tsx b/admin/src/pages/visualization/multi-dimension-data-analysis/card-list.tsx deleted file mode 100644 index e0cb682..0000000 --- a/admin/src/pages/visualization/multi-dimension-data-analysis/card-list.tsx +++ /dev/null @@ -1,208 +0,0 @@ -import React, { useEffect, useState, useMemo } from 'react'; -import { - Statistic, - Typography, - Spin, - Grid, - Card, - Skeleton, -} from '@arco-design/web-react'; -import cs from 'classnames'; -import { Chart, Line, Interval, Tooltip, Interaction } from 'bizcharts'; -import axios from 'axios'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; - -import { IconArrowRise, IconArrowFall } from '@arco-design/web-react/icon'; -import styles from './style/card-block.module.less'; - -const { Row, Col } = Grid; -const { Title, Text } = Typography; -const basicChartProps = { - pure: true, - autoFit: true, - height: 80, - padding: [0, 10, 0, 10], -}; - -export interface CardProps { - key: string; - title?: string; - chartData?: any[]; - chartType: string; - count?: number; - increment?: boolean; - diff?: number; - loading?: boolean; -} - -function CustomTooltip(props: { items: any[] }) { - const { items } = props; - return ( -
- {items.map((item, index) => ( -
- {Number(item.data.y).toLocaleString()} -
- ))} -
- ); -} -function SimpleLine(props: { chartData: any[] }) { - const { chartData } = props; - return ( - - - - {(_, items) => } - - - ); -} - -function SimpleInterval(props: { chartData: any[] }) { - const { chartData } = props; - return ( - - { - if (Number(xVal) % 2 === 0) { - return '#86DF6C'; - } - return '#468DFF'; - }, - ]} - /> - - {(_, items) => } - - - - ); -} - -function CardBlock(props: CardProps) { - const { chartType, title, count, increment, diff, chartData, loading } = - props; - - return ( - -
- - {title} - - } - loading={loading} - value={count} - extra={ -
- {loading ? ( - - ) : ( - - {diff} - {increment ? : } - - )} -
- } - groupSeparator - /> -
-
- - {chartType === 'interval' && } - {chartType === 'line' && } - -
-
- ); -} - -const cardInfo = [ - { - key: 'userRetentionTrend', - type: 'line', - }, - { - key: 'userRetention', - type: 'interval', - }, - { - key: 'contentConsumptionTrend', - type: 'line', - }, - { - key: 'contentConsumption', - type: 'interval', - }, -]; -function CardList() { - const t = useLocale(locale); - const [loading, setLoading] = useState(false); - const [data, setData] = useState( - cardInfo.map((item) => ({ - ...item, - chartType: item.type, - })) - ); - - const getData = async () => { - const requestList = cardInfo.map(async (info) => { - const { data } = await axios - .get(`/api/multi-dimension/card?type=${info.type}`) - .catch(() => ({ data: {} })); - return { - ...data, - key: info.key, - chartType: info.type, - }; - }); - - setLoading(true); - const result = await Promise.all(requestList).finally(() => - setLoading(false) - ); - setData(result); - }; - - useEffect(() => { - getData(); - }, []); - - const formatData = useMemo(() => { - return data.map((item) => ({ - ...item, - title: t[`multiDAnalysis.cardList.${item.key}`], - })); - }, [t, data]); - - return ( - - {formatData.map((item, index) => ( -
- - - ))} - - ); -} - -export default CardList; diff --git a/admin/src/pages/visualization/multi-dimension-data-analysis/data-overview.tsx b/admin/src/pages/visualization/multi-dimension-data-analysis/data-overview.tsx deleted file mode 100644 index f3b584b..0000000 --- a/admin/src/pages/visualization/multi-dimension-data-analysis/data-overview.tsx +++ /dev/null @@ -1,108 +0,0 @@ -// 数据总览 -import React, { useEffect, useState, useMemo } from 'react'; -import { - Card, - Typography, - Grid, - Statistic, - Skeleton, -} from '@arco-design/web-react'; -import axios from 'axios'; -import { - IconUser, - IconEdit, - IconHeart, - IconThumbUp, -} from '@arco-design/web-react/icon'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import styles from './style/data-overview.module.less'; -import MultiAreaLine from '@/components/Chart/multi-area-line'; - -const { Title } = Typography; -export default () => { - const t = useLocale(locale); - const [overview, setOverview] = useState([]); - const [lineData, setLineData] = useState([]); - const [loading, setLoading] = useState(false); - - const getData = async () => { - setLoading(true); - const { data } = await axios - .get('/api/multi-dimension/overview') - .finally(() => setLoading(false)); - - const { overviewData, chartData } = data; - setLineData(chartData); - setOverview(overviewData); - }; - - useEffect(() => { - getData(); - }, []); - - const formatedData = useMemo(() => { - return [ - { - title: t['multiDAnalysis.dataOverview.contentProduction'], - icon: , - value: overview[0], - background: 'rgb(var(--orange-2))', - color: 'rgb(var(--orange-6))', - }, - { - title: t['multiDAnalysis.dataOverview.contentClicks'], - icon: , - value: overview[1], - background: 'rgb(var(--cyan-2))', - color: 'rgb(var(--cyan-6))', - }, - { - title: t['multiDAnalysis.dataOverview.contextExposure'], - value: overview[2], - icon: , - background: 'rgb(var(--arcoblue-1))', - color: 'rgb(var(--arcoblue-6))', - }, - { - title: t['multiDAnalysis.dataOverview.activeUsers'], - value: overview[3], - icon: , - background: 'rgb(var(--purple-1))', - color: 'rgb(var(--purple-6))', - }, - ]; - }, [t, overview]); - - return ( - - {formatedData.map((item, index) => ( - - - {item.title} -
-
- {item.icon} -
- {loading ? ( - - ) : ( - - )} -
-
-
- ))} - - - -
- ); -}; diff --git a/admin/src/pages/visualization/multi-dimension-data-analysis/index.tsx b/admin/src/pages/visualization/multi-dimension-data-analysis/index.tsx deleted file mode 100644 index 1bd02fb..0000000 --- a/admin/src/pages/visualization/multi-dimension-data-analysis/index.tsx +++ /dev/null @@ -1,119 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import { Typography, Card, Grid, Space } from '@arco-design/web-react'; -import axios from 'axios'; -import useLocale from '@/utils/useLocale'; -import HorizontalInterval from '@/components/Chart/horizontal-interval'; -import AreaPolar from '@/components/Chart/area-polar'; -import FactMultiPie from '@/components/Chart/fact-multi-pie'; -import locale from './locale'; -import DataOverview from './data-overview'; -import CardList from './card-list'; - -import './mock'; - -const { Row, Col } = Grid; -const { Title } = Typography; - -function DataAnalysis() { - const t = useLocale(locale); - const [loading, setLoading] = useState(false); - const [interval, setInterval] = useState([]); - const [polarLoading, setPolarLoading] = useState(false); - const [polar, setPolar] = useState({ list: [], fields: [] }); - const [multiPieLoading, setMultiPieLoading] = useState(false); - const [multiPie, setMultiPie] = useState([]); - - const getInterval = async () => { - setLoading(true); - const { data } = await axios - .get('/api/multi-dimension/activity') - .finally(() => { - setLoading(false); - }); - setInterval(data); - }; - - const getPolar = async () => { - setPolarLoading(true); - const { data } = await axios - .get('/api/multi-dimension/polar') - .finally(() => setPolarLoading(false)); - - setPolar(data); - }; - - const getMultiPie = async () => { - setMultiPieLoading(true); - const { data } = await axios - .get('/api/multi-dimension/content-source') - .finally(() => { - setMultiPieLoading(false); - }); - - setMultiPie(data); - }; - - useEffect(() => { - getInterval(); - getPolar(); - getMultiPie(); - }, []); - - return ( - - -
- - - {t['multiDAnalysis.card.title.dataOverview']} - - - - - - - - {t['multiDAnalysis.card.title.todayActivity']} - - - - - - {t['multiDAnalysis.card.title.contentTheme']} - - - - - - - - - - - - - - - {t['multiDAnalysis.card.title.contentSource']} - - - - - - - ); -} -export default DataAnalysis; diff --git a/admin/src/pages/visualization/multi-dimension-data-analysis/locale/index.ts b/admin/src/pages/visualization/multi-dimension-data-analysis/locale/index.ts deleted file mode 100644 index 23b8c80..0000000 --- a/admin/src/pages/visualization/multi-dimension-data-analysis/locale/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -const i18n = { - 'en-US': { - 'menu.visualization': 'Data Visualization', - 'menu.visualization.multiDimensionDataAnalysis': 'Multi-D Analysis', - 'multiDAnalysis.card.title.activeContributors': 'Active Contributors', - 'multiDAnalysis.unit': 'times', - 'multiDAnalysis.card.title.officeVisitors': 'Office Visitors', - 'multiDAnalysis.card.title.downloads': 'Downloads', - 'multiDAnalysis.card.title.dataOverview': 'Overview', - 'multiDAnalysis.card.title.todayActivity': - 'Today\'s Likes and Comments Statistics', - 'multiDAnalysis.card.title.contentTheme': 'Content theme distribution', - 'multiDAnalysis.card.title.contentSource': 'Content publishing source', - 'multiDAnalysis.dataOverview.contentProduction': 'Content production', - 'multiDAnalysis.dataOverview.contentClicks': 'Content clicks', - 'multiDAnalysis.dataOverview.contextExposure': 'Content exposure', - 'multiDAnalysis.dataOverview.activeUsers': 'Active users', - 'multiDAnalysis.cardList.userRetentionTrend': 'User retention trends', - 'multiDAnalysis.cardList.userRetention': 'User retention', - 'multiDAnalysis.cardList.contentConsumptionTrend': - 'Content consumption trends', - 'multiDAnalysis.cardList.contentConsumption': 'Content consumption', - }, - 'zh-CN': { - 'menu.visualization': '数据可视化', - 'menu.visualization.multiDimensionDataAnalysis': '多维数据分析', - 'multiDAnalysis.card.title.officeVisitors': '官网访问量', - 'multiDAnalysis.card.title.downloads': '下载量', - 'multiDAnalysis.card.title.dataOverview': '数据总览', - 'multiDAnalysis.card.title.todayActivity': '今日转赞评统计', - 'multiDAnalysis.card.title.contentTheme': '内容题材分布', - 'multiDAnalysis.card.title.contentSource': '内容发布来源', - 'multiDAnalysis.dataOverview.contentProduction': '内容生产量', - 'multiDAnalysis.dataOverview.contentClicks': '内容点击量', - 'multiDAnalysis.dataOverview.contextExposure': '内容曝光量', - 'multiDAnalysis.dataOverview.activeUsers': '活跃用户数', - 'multiDAnalysis.cardList.userRetentionTrend': '用户留存趋势', - 'multiDAnalysis.cardList.userRetention': '用户留存量', - 'multiDAnalysis.cardList.contentConsumptionTrend': '内容消费趋势', - 'multiDAnalysis.cardList.contentConsumption': '内容消费量', - }, -}; - -export default i18n; diff --git a/admin/src/pages/visualization/multi-dimension-data-analysis/mock/index.ts b/admin/src/pages/visualization/multi-dimension-data-analysis/mock/index.ts deleted file mode 100644 index 571949d..0000000 --- a/admin/src/pages/visualization/multi-dimension-data-analysis/mock/index.ts +++ /dev/null @@ -1,134 +0,0 @@ -import Mock from 'mockjs'; -import dayjs from 'dayjs'; -import qs from 'query-string'; -import setupMock from '@/utils/setupMock'; - -const legend = ['活跃用户数', '内容生产量', '内容点击量', '内容曝光量']; -const count = [0, 600, 1000, 2000, 4000]; -const category = ['纯文本', '图文类', '视频类']; -const getLineData = (name, index) => { - const { list } = Mock.mock({ - 'list|10': [ - { - 'id|+1': 1, - time: function () { - return dayjs().subtract(this.id, 'days').format('MM-DD'); - }, - count: () => Mock.Random.natural(count[index], count[index + 1]), - name: name, - }, - ], - }); - return list.map((item) => { - delete item.id; - return item; - }); -}; - -const mockLine = (name) => { - const result = new Array(12).fill(0).map(() => ({ - y: Mock.Random.natural(1000, 10000), - })); - return result - .sort((a, b) => a.y - b.y) - .map((item, index) => ({ - ...item, - x: index, - name, - })); -}; - -const getContentSource = (name) => { - const typeList = ['UGC原创', '国外网站', '转载文章', '行业报告', '其他']; - const result = []; - typeList.forEach((type) => { - result.push({ - type, - value: Mock.Random.natural(100, 10000), - name, - }); - }); - const total = result.reduce((a, b) => a + b.value, 0); - return result.map((item) => ({ - ...item, - value: Number((item.value / total).toFixed(2)), - })); -}; - -setupMock({ - setup: () => { - Mock.mock(new RegExp('/api/multi-dimension/overview'), () => { - const { array: overviewData } = Mock.mock({ - 'array|4': [ - function () { - return Mock.Random.natural(0, 10000); - }, - ], - }); - let list = []; - legend.forEach( - (name, index) => (list = list.concat(getLineData(name, index))) - ); - return { - overviewData, - chartData: list, - }; - }); - - Mock.mock(new RegExp('/api/multi-dimension/activity'), () => { - const { list } = Mock.mock({ - 'list|3': [ - { - 'name|+1': ['分享量', '评论量', '点赞量'], - count: () => Mock.Random.natural(1000, 10000), - }, - ], - }); - return list; - }); - - Mock.mock(new RegExp('/api/multi-dimension/polar'), () => { - const items = ['国际', '娱乐', '体育', '财经', '科技', '其他']; - - const getCategoryCount = () => { - const result = {}; - category.forEach((name) => { - result[name] = Mock.Random.natural(0, 100); - }); - - return result; - }; - - return { - list: items.map((item) => ({ - item, - ...getCategoryCount(), - })), - fields: category, - }; - }); - - Mock.mock(new RegExp('/api/multi-dimension/card'), (params) => { - const { type } = qs.parseUrl(params.url).query; - return Mock.mock({ - count: () => Mock.Random.natural(1000, 10000), - increment: () => Mock.Random.boolean(), - diff: () => Mock.Random.natural(100, 1000), - chartType: type, - chartData: () => { - return mockLine('类目1'); - }, - }); - }); - - Mock.mock(new RegExp('/api/multi-dimension/content-source'), () => { - const allList = category.map((name) => { - return getContentSource(name).map((item) => ({ - ...item, - category: name, - })); - }); - return allList.flat(); - }); - }, -}); diff --git a/admin/src/pages/visualization/multi-dimension-data-analysis/style/card-block.module.less b/admin/src/pages/visualization/multi-dimension-data-analysis/style/card-block.module.less deleted file mode 100644 index 04060fc..0000000 --- a/admin/src/pages/visualization/multi-dimension-data-analysis/style/card-block.module.less +++ /dev/null @@ -1,43 +0,0 @@ -.card { - .statistic { - display: flex; - } - - .title { - margin: 0; - } - - :global(.arco-statistic-content) { - margin-top: 12px; - margin-bottom: 4px; - display: flex; - - :global(.arco-statistic-value) { - font-size: 24px; - line-height: 28px; - } - } - - .diff { - margin-left: 12px; - line-height: 20px; - color: rgb(var(--red-6)); - } - - .diff-increment { - color: rgb(var(--green-6)); - } - - .tooltip { - color: var(--color-text-1); - padding: 10px 0px; - background: var(--color-bg-5); - } - - :global(.bizcharts-tooltip) { - background: var(--color-bg-5) !important; - color: var(--color-text-1) !important; - box-shadow: 2px 2px 5px rgba(19, 78, 196, 0.1) !important; - opacity: 1 !important; - } -} diff --git a/admin/src/pages/visualization/multi-dimension-data-analysis/style/data-overview.module.less b/admin/src/pages/visualization/multi-dimension-data-analysis/style/data-overview.module.less deleted file mode 100644 index e909603..0000000 --- a/admin/src/pages/visualization/multi-dimension-data-analysis/style/data-overview.module.less +++ /dev/null @@ -1,39 +0,0 @@ -.card { - :global(.arco-spin) { - width: 100%; - } - - :global(.arco-card-body) { - padding-top: 6px; - } - - h6 { - font-size: 12px; - margin-bottom: 8px; - } - - .content { - display: flex; - line-height: 32px; - - &-icon { - width: 32px; - height: 32px; - line-height: 32px; - border-radius: 6px; - margin-right: 8px; - text-align: center; - font-size: 18px; - } - - :global(.arco-statistic) { - line-height: normal; - } - } -} - -.skeleton { - :global(.arco-skeleton-text-row) { - height: 32px; - } -} diff --git a/admin/src/pages/visualization/multi-dimension-data-analysis/utils/map.ts b/admin/src/pages/visualization/multi-dimension-data-analysis/utils/map.ts deleted file mode 100644 index 6711a8b..0000000 --- a/admin/src/pages/visualization/multi-dimension-data-analysis/utils/map.ts +++ /dev/null @@ -1,60 +0,0 @@ -import * as turf from '@turf/turf'; - -export function keepMapRatio(mapData, c) { - if (mapData && turf) { - // 获取数据外接矩形,计算宽高比 - const bbox = turf.bbox(mapData); - const width = bbox[2] - bbox[0]; - const height = bbox[3] - bbox[1]; - const ratio = height / width; - - const cWidth = c.width; - const cHeight = c.height; - const cRatio = cHeight / cWidth; - - let scale: { - x: { - range: number[]; - }; - y: { - range: number[]; - }; - }; - - if (cRatio >= ratio) { - const halfDisRatio = (cRatio - ratio) / 2 / cRatio; - scale = { - x: { - range: [0, 1], - }, - y: { - range: [halfDisRatio, 1 - halfDisRatio], - }, - }; - } else { - const halfDisRatio = ((1 / cRatio - 1 / ratio) / 2) * cRatio; - scale = { - y: { - range: [0, 1], - }, - x: { - range: [halfDisRatio, 1 - halfDisRatio], - }, - }; - } - const curScaleXRange = c.getScaleByField('x').range; - const curScaleYRange = c.getScaleByField('y').range; - - if ( - curScaleXRange[0] !== scale.x.range[0] || - curScaleXRange[1] !== scale.x.range[1] || - curScaleYRange[0] !== scale.y.range[0] || - curScaleYRange[1] !== scale.y.range[1] - ) { - setTimeout(() => { - c.scale(scale); - c.render(true); - }, 1); - } - } -} diff --git a/admin/src/pages/welcome/code-block.tsx b/admin/src/pages/welcome/code-block.tsx deleted file mode 100644 index 279689f..0000000 --- a/admin/src/pages/welcome/code-block.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import { Button, Tooltip, Message } from '@arco-design/web-react'; -import { IconCopy } from '@arco-design/web-react/icon'; -import clipboard from '@/utils/clipboard'; -import styles from './style/code-block.module.less'; - -interface CodeBlockProps { - code: string; -} - -export default function CodeBlock(props: CodeBlockProps) { - const { code } = props; - return ( -
-      {code}
-      
-        
- ); -} diff --git a/admin/src/pages/welcome/index.tsx b/admin/src/pages/welcome/index.tsx deleted file mode 100644 index 4721084..0000000 --- a/admin/src/pages/welcome/index.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import React from 'react'; -import { Alert, Card, Link, Typography, Tag } from '@arco-design/web-react'; -import { IconDoubleRight } from '@arco-design/web-react/icon'; -import { useSelector } from 'react-redux'; -import useLocale from '@/utils/useLocale'; -import locale from './locale'; -import CodeBlock from './code-block'; -import styles from './style/index.module.less'; - -export default function Welcome() { - const t = useLocale(locale); - const userInfo = useSelector((state: any) => state.userInfo) || {}; - return ( -
-
- - {t['welcome.title.welcome']} - - - {userInfo.name}, {userInfo.email} - -
-
- - - - 1. {t['welcome.step.title.pickup']} - - - {t['welcome.step.content.pickup']} - - @arco-design/pro-pages-workplace - - - - - 2. {t['welcome.step.title.install']} - - {t['welcome.step.content.install']} - - - - 3. {t['welcome.step.title.result']} - - {t['welcome.step.content.result']} - - - {t['welcome.title.material']} -
- - {t['welcome.link.material-pro']} - -
-
- - {t['welcome.link.material-all']} - -
-
-
-
- ); -} diff --git a/admin/src/pages/welcome/locale/index.ts b/admin/src/pages/welcome/locale/index.ts deleted file mode 100644 index 9e9fcd7..0000000 --- a/admin/src/pages/welcome/locale/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -const i18n = { - 'en-US': { - 'welcome.title.welcome': 'Welcome', - 'welcome.invite': - 'Arco Cli commands can be used to install materials from the material market, and we sincerely invite you to experience it.', - 'welcome.usage': 'Usage', - 'welcome.step.title.pickup': 'Select materials from the material market', - 'welcome.step.title.install': 'Install', - 'welcome.step.title.result': 'Result', - 'welcome.step.content.pickup': - 'For example, if you want the workplace page of pro, you can get the package name of the material from the material details', - 'welcome.step.content.install': - 'After getting the package name, you can install the material through the following command.', - 'welcome.step.content.result': 'Then, you get a workplace page easily.', - 'welcome.title.material': - 'For more materials, please check the following link', - 'welcome.link.material-pro': 'OmniCard material collection', - 'welcome.link.material-all': 'All materials', - }, - 'zh-CN': { - 'welcome.title.welcome': '欢迎', - 'welcome.invite': '通过 Arco Cli 命令可以安装物料市场的物料,诚邀您体验。', - 'welcome.usage': '使用方式', - 'welcome.step.title.pickup': '从物料市场选择物料', - 'welcome.step.title.install': '安装物料', - 'welcome.step.title.result': '成果', - 'welcome.step.content.pickup': - '例如您看中了 pro 的 workplace 页面,可以从物料详情中获得该物料的包名', - 'welcome.step.content.install': - '得到包名后,您就可以通过如下命令安装该物料', - 'welcome.step.content.result': '这样您就能轻松获得一个 workplace 页面', - 'welcome.title.material': '更多物料请查看以下链接', - 'welcome.link.material-pro': 'OmniCard 物料合集', - 'welcome.link.material-all': '所有物料', - }, -}; - -export default i18n; diff --git a/admin/src/pages/welcome/style/code-block.module.less b/admin/src/pages/welcome/style/code-block.module.less deleted file mode 100644 index 91a2f23..0000000 --- a/admin/src/pages/welcome/style/code-block.module.less +++ /dev/null @@ -1,14 +0,0 @@ -.code-block { - color: var(--color-text-2); - padding: 8px; - background-color: var(--color-fill-1); - width: fit-content; - - &-content { - display: inline-block; - } - - &-copy-btn { - margin-left: 8px; - } -} diff --git a/admin/src/pages/welcome/style/index.module.less b/admin/src/pages/welcome/style/index.module.less deleted file mode 100644 index 3e09cba..0000000 --- a/admin/src/pages/welcome/style/index.module.less +++ /dev/null @@ -1,4 +0,0 @@ -.header { - background: var(--color-bg-2); - padding: 20px; -} diff --git a/admin/src/utils/setupMock.ts b/admin/src/utils/setupMock.ts index 62d6a79..0c7882a 100644 --- a/admin/src/utils/setupMock.ts +++ b/admin/src/utils/setupMock.ts @@ -1,5 +1,5 @@ export default (config: { mock?: boolean; setup: () => void }) => { - const { mock = process.env.NODE_ENV === 'development', setup } = config; + const { mock = Boolean(import.meta.env?.DEV), setup } = config; if (mock === false) return; setup(); }; diff --git a/admin/tests/admin-auth.test.ts b/admin/tests/admin-auth.test.ts index dc39e9a..348f6d9 100644 --- a/admin/tests/admin-auth.test.ts +++ b/admin/tests/admin-auth.test.ts @@ -10,20 +10,24 @@ function read(rel: string): string { return fs.readFileSync(path.join(adminRoot, rel), 'utf8'); } -test('1. 登录必须对接 Cool-Admin 开放接口并携带验证码', () => { +test('1. 登录必须对接 Cool-Admin 开放接口,临时不展示验证码', () => { const form = read('src/pages/login/form.tsx'); assert.ok( form.includes('/api/admin/base/open/login'), '登录必须请求 /api/admin/base/open/login' ); assert.ok( - form.includes('/api/admin/base/open/captcha'), - '登录必须拉取 /api/admin/base/open/captcha' + !form.includes('/api/admin/base/open/captcha'), + '临时关闭验证码后禁止再拉取 captcha' ); - assert.ok(form.includes('captchaId'), '登录必须提交 captchaId'); - assert.ok(form.includes('verifyCode'), '登录必须提交 verifyCode'); + assert.ok(!form.includes('captchaId'), '临时关闭验证码后禁止提交 captchaId'); + assert.ok(!form.includes('verifyCode'), '临时关闭验证码后禁止提交 verifyCode'); + assert.ok(!form.includes('login-form-captcha'), '登录表单不得再渲染验证码区域'); assert.ok(!form.includes('/api/user/login'), '禁止再走 Arco Mock 登录'); assert.ok(!/\bany\b/.test(form), '严禁 any'); + + const banner = read('src/pages/login/banner.tsx'); + assert.ok(!banner.includes('IconGlobal'), '登录页必须使用 Arco 官方存在的图标'); }); test('2. axios 必须自动附带 Cool-Admin Authorization', () => { @@ -36,6 +40,12 @@ test('2. axios 必须自动附带 Cool-Admin Authorization', () => { main.includes("./utils/setupRequest"), '入口必须启用请求拦截器' ); + assert.ok(!main.includes("./mock"), '入口禁止加载 Mock.js'); + assert.ok( + main.includes('/api/admin/base/comm/person'), + '用户信息必须请求 Cool-Admin person' + ); + assert.ok(!main.includes('/api/user/userInfo'), '禁止再读 Mock userInfo'); }); test('3. 登录态必须同时校验 userStatus 与 JWT', () => { @@ -47,9 +57,7 @@ test('3. 登录态必须同时校验 userStatus 与 JWT', () => { assert.ok(tokenUtil.includes('adminRefreshToken'), '必须持久化 refreshToken'); }); -test('4. 登录文案必须提示真实超管密码并提供验证码词条', () => { +test('4. 登录文案必须提示真实超管密码', () => { const locale = read('src/pages/login/locale/index.ts'); assert.ok(locale.includes('123456'), '占位提示必须是 Cool-Admin 默认密码 123456'); - assert.ok(locale.includes('login.form.captcha.placeholder')); - assert.ok(locale.includes('login.form.captcha.errMsg')); }); diff --git a/admin/tests/card-list.test.ts b/admin/tests/card-list.test.ts index 39c1993..921fe12 100644 --- a/admin/tests/card-list.test.ts +++ b/admin/tests/card-list.test.ts @@ -3,45 +3,30 @@ import assert from 'node:assert/strict'; import fs from 'node:fs'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; -import { routes } from '../src/routes.ts'; -import defaultI18n from '../src/locale/index.ts'; const adminRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); const listPagePath = path.join(adminRoot, 'src/pages/card/list/index.tsx'); - -function flattenRouteKeys(items: typeof routes): string[] { - return items.flatMap((item) => [ - item.key, - ...(item.children ? flattenRouteKeys(item.children) : []), - ]); -} +const routesPath = path.join(adminRoot, 'src/routes.ts'); +const localePath = path.join(adminRoot, 'src/locale/index.ts'); test('1. routes.ts 必须包含 key card/list,供 layout glob 加载', () => { - const keys = flattenRouteKeys(routes); - assert.ok(keys.includes('card'), '应存在一级菜单 key: card'); - assert.ok(keys.includes('card/list'), '应存在路由 key: card/list'); + const content = fs.readFileSync(routesPath, 'utf-8'); + assert.ok(content.includes("key: 'card'"), '应存在一级菜单 key: card'); + assert.ok(content.includes("key: 'card/list'"), '应存在路由 key: card/list'); + assert.ok(content.includes("name: 'menu.card'"), '应存在 menu.card 分组'); + assert.ok(content.includes("name: 'menu.card.list'"), 'card 分组下应有 menu.card.list'); - const cardGroup = routes.find((item) => item.key === 'card'); - assert.ok(cardGroup, '应存在 menu.card 分组'); - assert.equal(cardGroup?.name, 'menu.card'); - assert.ok( - cardGroup?.children?.some( - (child) => child.key === 'card/list' && child.name === 'menu.card.list' - ), - 'card 分组下应有 menu.card.list / card/list' - ); - - const demoKeys = ['dashboard', 'visualization', 'list', 'form', 'profile']; - for (const key of demoKeys) { - assert.ok(keys.includes(key), `不得删除已有演示路由: ${key}`); + for (const key of ['visualization', 'form', 'profile', 'user', 'result']) { + assert.ok(!content.includes(`key: '${key}'`), `Arco Demo 路由必须移除: ${key}`); } }); test('2. locale 必须包含 menu.card / menu.card.list 中英文案', () => { - assert.equal(defaultI18n['en-US']['menu.card'], 'Digital Cards'); - assert.equal(defaultI18n['en-US']['menu.card.list'], 'Card Library'); - assert.equal(defaultI18n['zh-CN']['menu.card'], '数字名片'); - assert.equal(defaultI18n['zh-CN']['menu.card.list'], '名片资产库'); + const content = fs.readFileSync(localePath, 'utf-8'); + assert.ok(content.includes("'menu.card': 'Digital Cards'"), '英文 menu.card'); + assert.ok(content.includes("'menu.card.list': 'Card Library'"), '英文 menu.card.list'); + assert.ok(content.includes("'menu.card': '数字名片'"), '中文 menu.card'); + assert.ok(content.includes("'menu.card.list': '名片资产库'"), '中文 menu.card.list'); }); test('3. list/index.tsx 必须请求 admin/card/info/page 并使用 Arco Table', () => { diff --git a/admin/tests/components-upload.test.ts b/admin/tests/components-upload.test.ts index fa5fccf..1301028 100644 --- a/admin/tests/components-upload.test.ts +++ b/admin/tests/components-upload.test.ts @@ -13,7 +13,6 @@ const casesPagePath = path.join(adminRoot, 'src/pages/card/cases/index.tsx'); const builderPagePath = path.join(adminRoot, 'src/pages/card/builder/index.tsx'); const articlesPagePath = path.join(adminRoot, 'src/pages/card/articles/index.tsx'); const brandKitPagePath = path.join(adminRoot, 'src/pages/team/brand-kit/index.tsx'); -const userSettingHeaderPath = path.join(adminRoot, 'src/pages/user/setting/header.tsx'); test('1. components/Upload 必须存在 ImageUploader 与 FileUploader 并正确导出', () => { assert.ok(fs.existsSync(imageUploaderPath), '必须存在 ImageUploader.tsx'); @@ -63,8 +62,8 @@ test('7. team/brand-kit 页面必须接入 ImageUploader 管理品牌 logoUrl', assert.ok(content.includes('ImageUploader'), 'brand-kit 页面必须使用 ImageUploader'); }); -test('8. user/setting/header 必须支持头像放大预览与删除头像', () => { - const content = fs.readFileSync(userSettingHeaderPath, 'utf-8'); - assert.ok(content.includes('Image') || content.includes('Modal') || content.includes('preview'), '必须支持头像放大预览'); - assert.ok(content.includes('IconDelete') || content.includes('handleDelete') || content.includes('onDelete'), '必须支持头像删除'); +test('8. 入口不得再引用 Arco Mock,上传组件仍须独立于个人中心 Demo', () => { + const main = fs.readFileSync(path.join(adminRoot, 'src/main.tsx'), 'utf-8'); + assert.ok(!main.includes("from './mock'"), 'main.tsx 禁止加载全局 Mock'); + assert.ok(!fs.existsSync(path.join(adminRoot, 'src/pages/user/setting/header.tsx')), '个人中心 Demo 必须删除'); }); diff --git a/admin/tests/dashboard-financial.test.ts b/admin/tests/dashboard-financial.test.ts index 709b423..9f0e1c6 100644 --- a/admin/tests/dashboard-financial.test.ts +++ b/admin/tests/dashboard-financial.test.ts @@ -3,24 +3,23 @@ import assert from 'node:assert/strict'; import fs from 'node:fs'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; -import { routes } from '../src/routes.ts'; const adminRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); const financialPagePath = path.join(adminRoot, 'src/pages/dashboard/financial/index.tsx'); const financialLocalePath = path.join(adminRoot, 'src/pages/dashboard/financial/locale/index.ts'); const mainLocalePath = path.join(adminRoot, 'src/locale/index.ts'); +const routesPath = path.join(adminRoot, 'src/routes.ts'); const EMOJI_RE = /[\u{1F300}-\u{1F5FF}\u{1F600}-\u{1F64F}\u{1F680}-\u{1F6FF}\u{1F700}-\u{1F77F}\u{1F780}-\u{1F7FF}\u{1F800}-\u{1F8FF}\u{1F900}-\u{1F9FF}\u{1FA00}-\u{1FA6F}\u{1FA70}-\u{1FAFF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/u; test('1. routes.ts 必须在 dashboard 下注册 dashboard/financial 且未被 ignore', () => { - const dashboardGroup = routes.find((r) => r.key === 'dashboard'); - assert.ok(dashboardGroup, 'routes.ts 必须包含 dashboard 分组'); - assert.ok(dashboardGroup.children, 'dashboard 必须有 children'); - - const financialRoute = dashboardGroup.children.find((r) => r.key === 'dashboard/financial'); - assert.ok(financialRoute, '必须在 dashboard 下注册 dashboard/financial 路由'); - assert.notEqual(financialRoute.ignore, true, 'financial 路由必须在侧边栏正常展示'); + const content = fs.readFileSync(routesPath, 'utf-8'); + assert.ok(content.includes("key: 'dashboard/financial'"), '必须注册 dashboard/financial'); + assert.ok( + !/key:\s*'dashboard\/financial'[\s\S]{0,80}ignore:\s*true/.test(content), + 'financial 路由必须在侧边栏正常展示' + ); }); test('2. 主词典与多语言包必须包含 menu.dashboard.financial 翻译', () => { @@ -49,6 +48,9 @@ test('3. dashboard/financial 页面必须存在,且具备 COO/CFO 视角切换 '页面必须支持 coo 与 cfo 视角状态切换' ); + assert.ok(!content.includes('14500'), '禁止硬编码演示 MRR'); + assert.ok(!content.includes('Vanguard Global'), '禁止硬编码演示账单'); + // 必须使用 Arco 核心组件 assert.ok(content.includes('@arco-design/web-react'), '必须引入 Arco Design'); assert.ok(content.includes('Table'), '必须包含 Table 表格展示账目流水'); diff --git a/admin/tests/routes-menu.test.ts b/admin/tests/routes-menu.test.ts index 0adb1c8..ab140bf 100644 --- a/admin/tests/routes-menu.test.ts +++ b/admin/tests/routes-menu.test.ts @@ -3,10 +3,10 @@ import assert from 'node:assert/strict'; import fs from 'node:fs'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; -import { routes } from '../src/routes.ts'; const adminRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); const layoutPath = path.join(adminRoot, 'src/layout.tsx'); +const routesPath = path.join(adminRoot, 'src/routes.ts'); const CORE_BIZ_MODULES = [ 'dashboard', @@ -16,48 +16,57 @@ const CORE_BIZ_MODULES = [ 'nfc', 'team', 'settings-biz', - 'user', ]; -const UNRELATED_DEMO_MODULES = [ +const REMOVED_DEMO_MODULES = [ 'visualization', 'list', 'form', 'profile', 'result', - 'exception', + 'user', ]; -test('1. 核心出海业务菜单必须保留在侧边栏正常展示 (ignore !== true)', () => { +test('1. 核心出海业务菜单必须保留在侧边栏正常展示', () => { + const content = fs.readFileSync(routesPath, 'utf-8'); for (const key of CORE_BIZ_MODULES) { - const route = routes.find((item) => item.key === key); - assert.ok(route, `routes.ts 必须存在核心业务模块: ${key}`); - assert.notEqual( - route.ignore, - true, - `核心业务模块 ${key} 不应被 ignore,必须展示在菜单中` + assert.ok( + content.includes(`key: '${key}'`), + `routes.ts 必须存在核心业务模块: ${key}` ); } + assert.ok( + !/key:\s*'dashboard'[\s\S]{0,80}ignore:\s*true/.test(content), + 'dashboard 不得被 ignore' + ); }); -test('2. 与出海业务无关的模板演示 Demo 菜单必须配置 ignore: true 进行隐藏', () => { - for (const key of UNRELATED_DEMO_MODULES) { - const route = routes.find((item) => item.key === key); - if (route) { - assert.equal( - route.ignore, - true, - `与需求无关的模板模块 ${key} 必须配置 ignore: true 隐藏` - ); - } +test('2. Arco Pro Demo 模块必须从路由中移除,且 monitor / 个人中心不得再出现', () => { + const content = fs.readFileSync(routesPath, 'utf-8'); + for (const key of REMOVED_DEMO_MODULES) { + assert.ok( + !content.includes(`key: '${key}'`), + `与需求无关的模板模块 ${key} 必须从 routes.ts 删除` + ); } + assert.ok( + !content.includes("key: 'dashboard/monitor'"), + '直播监控 Demo 必须从路由删除' + ); + assert.ok( + !content.includes("key: 'user/info'"), + '个人中心 Demo 必须从路由删除' + ); }); -test('3. layout.tsx 必须为核心业务模块配置对应的 Arco 矢量图标', () => { - assert.ok(fs.existsSync(layoutPath), '必须存在 layout.tsx'); +test('3. layout 不得再为 ignore Demo 注册可访问路由,未知地址走 404', () => { const content = fs.readFileSync(layoutPath, 'utf-8'); - - // 必须映射业务模块图标 + assert.ok(content.includes('KEEP_IGNORED_ROUTES'), '必须显式白名单详情/异常页'); + assert.ok(content.includes('crm/lead-profile'), '线索画像必须仍可直达'); + assert.ok( + content.includes("./pages/exception/404"), + '未知路由必须落到 404' + ); assert.ok(content.includes("'card'"), "layout.tsx 必须为 'card' 模块配置图标"); assert.ok(content.includes("'crm'"), "layout.tsx 必须为 'crm' 模块配置图标"); assert.ok(content.includes("'ai'"), "layout.tsx 必须为 'ai' 模块配置图标"); diff --git a/backend/src/comm/guard/super-admin.ts b/backend/src/comm/guard/super-admin.ts new file mode 100644 index 0000000..ce539c0 --- /dev/null +++ b/backend/src/comm/guard/super-admin.ts @@ -0,0 +1,37 @@ +import { CoolCommException } from '@cool-midway/core'; + +/** + * 判断当前请求上下文是否属于平台超级管理员 (Platform Super Admin) + * 判定依据: + * 1. 系统初始内置超管 username === 'admin' + * 2. 带有 isSuper: true 平台超管标识 + * 3. 角色标签列表中包含 'admin' (系统内置角色) + */ +export function isSuperAdminContext(ctx: any): boolean { + if (!ctx || !ctx.admin || typeof ctx.admin !== 'object') { + return false; + } + const admin = ctx.admin; + + if (admin.username === 'admin') { + return true; + } + if (admin.isSuper === true) { + return true; + } + if (Array.isArray(admin.roleLabels) && admin.roleLabels.includes('admin')) { + return true; + } + + return false; +} + +/** + * 平台超级管理员专属鉴权守卫断言 + * 非平台超管访问时,立即抛出 403 CoolCommException 阻断越权操作 + */ +export function assertSuperAdmin(ctx: any): void { + if (!isSuperAdminContext(ctx)) { + throw new CoolCommException('权限不足,仅限平台超级管理员访问', 403); + } +} diff --git a/backend/src/comm/types/omni.ts b/backend/src/comm/types/omni.ts index 92f4045..b56c001 100644 --- a/backend/src/comm/types/omni.ts +++ b/backend/src/comm/types/omni.ts @@ -136,7 +136,33 @@ export type LeadStatus = 'new' | 'contacted' | 'hot' | 'won' | 'archived'; */ export type LeadSource = 'nfc' | 'qr' | 'link' | 'ai_chat' | 'exchange'; -export type CardContactSource = 'exchange' | 'collect' | 'scan'; +export type CardContactSource = 'exchange' | 'collect' | 'scan' | 'event'; + +export type CardEventStatus = 'active' | 'ended'; + +export interface CardEvent { + id?: number | string; + code: string; + name: string; + status: CardEventStatus; +} + +export interface CardEventMember { + id?: number | string; + eventId: number; + userId: number; + cardId: number; +} + +export interface CardEventJoinResult { + event: CardEvent; + member: CardEventMember; +} + +export interface RadarHotInbox { + unread: number; + list: RadarTrack[]; +} export interface CardContact { id?: number | string; diff --git a/backend/src/config/config.prod.ts b/backend/src/config/config.prod.ts index df19add..47cd7c7 100644 --- a/backend/src/config/config.prod.ts +++ b/backend/src/config/config.prod.ts @@ -15,7 +15,7 @@ export default { port: 3306, username: 'root', password: '123456', - database: 'cool', + database: 'crmmpdata', // 自动建表 注意:线上部署的时候不要使用,有可能导致数据丢失 synchronize: false, // 打印日志 diff --git a/backend/src/entities.ts b/backend/src/entities.ts index 1f2f1e5..e914c00 100644 --- a/backend/src/entities.ts +++ b/backend/src/entities.ts @@ -23,24 +23,26 @@ import * as entity20 from './modules/crm/entity/lead'; import * as entity21 from './modules/crm/entity/audit'; import * as entity22 from './modules/card/entity/locale'; import * as entity23 from './modules/card/entity/info'; -import * as entity24 from './modules/card/entity/cases'; -import * as entity25 from './modules/card/entity/bento'; -import * as entity26 from './modules/card/entity/article'; -import * as entity27 from './modules/base/entity/base'; -import * as entity28 from './modules/base/entity/audit'; -import * as entity29 from './modules/base/entity/sys/user_role'; -import * as entity30 from './modules/base/entity/sys/user'; -import * as entity31 from './modules/base/entity/sys/role_menu'; -import * as entity32 from './modules/base/entity/sys/role_department'; -import * as entity33 from './modules/base/entity/sys/role'; -import * as entity34 from './modules/base/entity/sys/param'; -import * as entity35 from './modules/base/entity/sys/menu'; -import * as entity36 from './modules/base/entity/sys/log'; -import * as entity37 from './modules/base/entity/sys/department'; -import * as entity38 from './modules/base/entity/sys/conf'; -import * as entity39 from './modules/ai/entity/knowledge'; -import * as entity40 from './modules/ai/entity/glossary'; -import * as entity41 from './modules/ai/entity/concierge'; +import * as entity24 from './modules/card/entity/exchange'; +import * as entity25 from './modules/card/entity/contact'; +import * as entity26 from './modules/card/entity/cases'; +import * as entity27 from './modules/card/entity/bento'; +import * as entity28 from './modules/card/entity/article'; +import * as entity29 from './modules/base/entity/base'; +import * as entity30 from './modules/base/entity/audit'; +import * as entity31 from './modules/base/entity/sys/user_role'; +import * as entity32 from './modules/base/entity/sys/user'; +import * as entity33 from './modules/base/entity/sys/role_menu'; +import * as entity34 from './modules/base/entity/sys/role_department'; +import * as entity35 from './modules/base/entity/sys/role'; +import * as entity36 from './modules/base/entity/sys/param'; +import * as entity37 from './modules/base/entity/sys/menu'; +import * as entity38 from './modules/base/entity/sys/log'; +import * as entity39 from './modules/base/entity/sys/department'; +import * as entity40 from './modules/base/entity/sys/conf'; +import * as entity41 from './modules/ai/entity/knowledge'; +import * as entity42 from './modules/ai/entity/glossary'; +import * as entity43 from './modules/ai/entity/concierge'; export const entities = [ ...Object.values(entity0), ...Object.values(entity1), @@ -84,4 +86,6 @@ export const entities = [ ...Object.values(entity39), ...Object.values(entity40), ...Object.values(entity41), + ...Object.values(entity42), + ...Object.values(entity43), ]; diff --git a/backend/src/modules/ai/controller/admin/concierge.ts b/backend/src/modules/ai/controller/admin/concierge.ts index a236828..3a8e500 100644 --- a/backend/src/modules/ai/controller/admin/concierge.ts +++ b/backend/src/modules/ai/controller/admin/concierge.ts @@ -13,8 +13,12 @@ export const adminAiConciergeCurdOption: CurdOption = { service: AiConciergeService, serviceApis: ['getDefaultPersona', 'getByCardId', 'saveByCardId'], pageQueryOp: { - fieldEq: ['a.cardId', 'a.personaType', 'a.isEnabled'], - addOrderBy: { updateTime: 'desc' as const }, + fieldEq: [ + { column: 'a.card_id', requestParam: 'cardId' }, + { column: 'a.persona_type', requestParam: 'personaType' }, + { column: 'a.is_enabled', requestParam: 'isEnabled' }, + ], + addOrderBy: { update_time: 'desc' as const }, }, }; diff --git a/backend/src/modules/ai/controller/admin/glossary.ts b/backend/src/modules/ai/controller/admin/glossary.ts index c57168a..aeef972 100644 --- a/backend/src/modules/ai/controller/admin/glossary.ts +++ b/backend/src/modules/ai/controller/admin/glossary.ts @@ -13,9 +13,13 @@ export const adminAiGlossaryCurdOption = { entity: AiGlossaryEntity, service: AiGlossaryService, pageQueryOp: { - keyWordLikeFields: ['a.sourceTerm', 'a.targetTerm', 'a.notes'], - fieldEq: ['a.sourceLang', 'a.targetLang', 'a.domain'], - addOrderBy: { updateTime: 'desc' as const }, + keyWordLikeFields: ['a.source_term', 'a.target_term', 'a.notes'], + fieldEq: [ + { column: 'a.source_lang', requestParam: 'sourceLang' }, + { column: 'a.target_lang', requestParam: 'targetLang' }, + 'a.domain', + ], + addOrderBy: { update_time: 'desc' as const }, }, }; diff --git a/backend/src/modules/ai/controller/admin/knowledge.ts b/backend/src/modules/ai/controller/admin/knowledge.ts index 399d50a..aeb5acd 100644 --- a/backend/src/modules/ai/controller/admin/knowledge.ts +++ b/backend/src/modules/ai/controller/admin/knowledge.ts @@ -16,8 +16,8 @@ export const adminAiKnowledgeCurdOption = { serviceApis: [{ method: 'sandboxTest', summary: '知识库切片与召回沙盒测试' }], pageQueryOp: { keyWordLikeFields: ['a.title', 'a.content'], - fieldEq: ['a.cardId', 'a.locale'], - addOrderBy: { updateTime: 'desc' as const }, + fieldEq: [{ column: 'a.card_id', requestParam: 'cardId' }, 'a.locale'], + addOrderBy: { update_time: 'desc' as const }, }, }; diff --git a/backend/src/modules/ai/service/chat.ts b/backend/src/modules/ai/service/chat.ts index 84788cd..6e64009 100644 --- a/backend/src/modules/ai/service/chat.ts +++ b/backend/src/modules/ai/service/chat.ts @@ -1,5 +1,7 @@ import { Inject, Provide } from '@midwayjs/core'; import { BaseService, CoolCommException } from '@cool-midway/core'; +import { InjectEntityModel } from '@midwayjs/typeorm'; +import { Repository } from 'typeorm'; import { AiChatMessage, AiChatReply, @@ -7,6 +9,8 @@ import { DeepSeekChatMessage, } from '../../../comm/types/omni'; import { DeepSeekService } from './deepseek'; +import { AiConciergeService } from './concierge'; +import { CardInfoEntity } from '../../card/entity/info'; /** locale 缺省值 */ const DEFAULT_LOCALE = 'en-US'; @@ -23,11 +27,19 @@ export class AiChatService extends BaseService { @Inject() deepSeekService?: DeepSeekService; + @Inject() + aiConciergeService?: AiConciergeService; + + @InjectEntityModel(CardInfoEntity) + cardInfoEntity?: Repository; + /** * 顾问对话 * 兼容公开端 serviceApis:POST body 为单参数对象 AiChatRequest */ - async ask(req: AiChatRequest): Promise { + async ask( + req: AiChatRequest & { tenantId?: number | string } + ): Promise { const cardId = req?.cardId; if (cardId === undefined || cardId === null || String(cardId).trim() === '') { throw new CoolCommException('缺少名片标识 cardId'); @@ -51,13 +63,49 @@ export class AiChatService extends BaseService { let reply = fallbackReply; - // 如果 DeepSeek 已经配置,则优先调用 DeepSeek 大模型生成智能回复 - if (this.deepSeekService?.isConfigured?.()) { + // 解析名片租户 ID,用于多租户 BYOK 与配额风控隔离 + let tenantId = req.tenantId; + if (tenantId === undefined && this.cardInfoEntity) { try { + const card = await this.cardInfoEntity.findOne({ + where: { id: Number(cardId) }, + }); + if (card?.tenantId) { + tenantId = card.tenantId; + } + } catch { + // 容错降级 + } + } + + // 解析人设模版与个性化策略 + let personaPrompt = ''; + if (this.aiConciergeService) { + try { + const concierge = await this.aiConciergeService.getByCardId(Number(cardId)); + if (concierge?.promptTemplate) { + personaPrompt = `顾问人设与背景:${concierge.promptTemplate}`; + } + } catch { + // 容错降级 + } + } + + // 如果 DeepSeek 已经配置,则优先调用 DeepSeek 大模型生成智能回复 + if (this.deepSeekService?.isConfigured?.(tenantId)) { + try { + const systemPrompt = [ + `你是 OmniCard 名片智能顾问。当前名片ID: ${cardId},语言偏好: ${locale}。`, + personaPrompt, + `请以专业得体的口吻向客商介绍业务与解答咨询。${shouldCollectLead ? '检测到客户具备采购或商务意向,请在回答中热情引导客户留下联系方式。' : ''}`, + ] + .filter(Boolean) + .join('\n'); + const dsMessages: DeepSeekChatMessage[] = [ { role: 'system', - content: `你是 OmniCard 名片智能顾问。当前名片ID: ${cardId},语言偏好: ${locale}。请以专业得体的口吻向客商介绍业务与解答咨询。${shouldCollectLead ? '检测到客户具备采购或商务意向,请在回答中热情引导客户留下联系方式。' : ''}`, + content: systemPrompt, }, ...messages.map((m) => ({ role: m.role as 'user' | 'assistant' | 'system', @@ -67,7 +115,8 @@ export class AiChatService extends BaseService { reply = await this.deepSeekService.chatCompletion( { messages: dsMessages }, - fallbackReply + fallbackReply, + tenantId ); } catch { // 发生任何不可预测异常,均平滑降级为兜底文本,确保前端 100% 不白屏 diff --git a/backend/src/modules/ai/service/concierge.ts b/backend/src/modules/ai/service/concierge.ts index ba5a60c..9b533b5 100644 --- a/backend/src/modules/ai/service/concierge.ts +++ b/backend/src/modules/ai/service/concierge.ts @@ -99,19 +99,33 @@ export class AiConciergeService extends BaseService { } /** - * 按名片 ID 查询顾问人设与留资配置 (不存在时返回默认预设) + * 按名片 ID 查询顾问人设与留资配置 (兼容单对象参数 { cardId },不存在或非法时安全降级返回默认预设) */ - async getByCardId(cardId: number | string): Promise { - if (cardId === undefined || cardId === null || String(cardId).trim() === '') { - throw new CoolCommException('缺少名片标识 cardId'); + async getByCardId( + param: number | string | { cardId?: number | string } + ): Promise { + const rawCardId = + typeof param === 'object' && param !== null ? param.cardId : param; + + const defaultPreset = this.getDefaultPersona('trade_expert'); + if ( + rawCardId === undefined || + rawCardId === null || + String(rawCardId).trim() === '' + ) { + return { cardId: 1, ...defaultPreset }; } - const numCardId = Number(cardId); + + const numCardId = Number(rawCardId); + if (isNaN(numCardId) || !numCardId) { + return { cardId: 1, ...defaultPreset }; + } + const found = await this.aiConciergeEntity.findOneBy({ cardId: numCardId }); if (found) { return found; } - const defaultPreset = this.getDefaultPersona('trade_expert'); return { cardId: numCardId, ...defaultPreset, @@ -119,13 +133,31 @@ export class AiConciergeService extends BaseService { } /** - * 按名片 ID 保存或更新配置 + * 按名片 ID 保存或更新配置 (兼容单对象参数与双入参) */ async saveByCardId( - cardId: number | string, - data: Partial + paramOrCardId: + | number + | string + | (Partial & { cardId?: number | string }), + maybeData?: Partial ): Promise { - const numCardId = Number(cardId); + let rawCardId: unknown; + let data: Partial; + + if ( + typeof paramOrCardId === 'object' && + paramOrCardId !== null && + !maybeData + ) { + rawCardId = paramOrCardId.cardId; + data = paramOrCardId; + } else { + rawCardId = paramOrCardId; + data = maybeData || {}; + } + + const numCardId = Number(rawCardId) || 1; const payload = { ...data, cardId: numCardId }; this.validate(payload); diff --git a/backend/src/modules/ai/service/deepseek.ts b/backend/src/modules/ai/service/deepseek.ts index 5d9c054..a3165d6 100644 --- a/backend/src/modules/ai/service/deepseek.ts +++ b/backend/src/modules/ai/service/deepseek.ts @@ -18,6 +18,18 @@ export class DeepSeekService extends BaseService { private config: DeepSeekConfig; private httpClient: AxiosInstance; + /** 多租户私有 BYOK 配置映射表 */ + private tenantConfigs: Map = new Map(); + + /** 租户 Token 累计消耗账本 */ + private tenantUsage: Map< + string | number, + { totalTokens: number; promptTokens: number; completionTokens: number; callCount: number } + > = new Map(); + + /** 租户 Token 配额上限表 */ + private tenantQuotas: Map = new Map(); + constructor() { super(); const envKey = process.env.DEEPSEEK_API_KEY?.trim() || undefined; @@ -46,6 +58,113 @@ export class DeepSeekService extends BaseService { return { ...this.config }; } + /** + * 判断指定租户是否已配置专属私有 Key + */ + hasTenantConfig(tenantId: string | number): boolean { + return this.tenantConfigs.has(tenantId); + } + + /** + * 获取指定租户有效配置(未单独配置则优雅回退至平台公共默认配置) + */ + getTenantConfig(tenantId?: string | number): DeepSeekConfig { + if (tenantId !== undefined && tenantId !== null && this.tenantConfigs.has(tenantId)) { + return { ...this.tenantConfigs.get(tenantId)! }; + } + return this.getConfig(); + } + + /** + * 为指定企业租户更新专属定制配置 (BYOK) + */ + updateTenantConfig(tenantId: string | number, partial: Partial): void { + const current = this.getTenantConfig(tenantId); + const updated: DeepSeekConfig = { + ...current, + ...partial, + enabled: partial.apiKey ? Boolean(partial.apiKey.trim()) : current.enabled, + }; + this.tenantConfigs.set(tenantId, updated); + } + + /** + * 记录指定租户的 Token 消耗 + */ + recordTokenUsage( + tenantId: string | number, + tokens: + | number + | { promptTokens?: number; completionTokens?: number; totalTokens?: number } + ): void { + const current = this.tenantUsage.get(tenantId) || { + totalTokens: 0, + promptTokens: 0, + completionTokens: 0, + callCount: 0, + }; + + let prompt = 0; + let completion = 0; + let total = 0; + + if (typeof tokens === 'number') { + total = Number(tokens) || 0; + } else if (tokens && typeof tokens === 'object') { + prompt = Number(tokens.promptTokens) || 0; + completion = Number(tokens.completionTokens) || 0; + total = Number(tokens.totalTokens) || prompt + completion; + } + + this.tenantUsage.set(tenantId, { + totalTokens: current.totalTokens + total, + promptTokens: current.promptTokens + prompt, + completionTokens: current.completionTokens + completion, + callCount: current.callCount + 1, + }); + } + + /** + * 获取指定租户的 Token 用量统计 + */ + getTenantTokenUsage(tenantId: string | number): { + totalTokens: number; + promptTokens: number; + completionTokens: number; + callCount: number; + } { + return this.tenantUsage.get(tenantId) || { + totalTokens: 0, + promptTokens: 0, + completionTokens: 0, + callCount: 0, + }; + } + + /** + * 设置指定租户的 Token 最大额度上限 + */ + setTenantTokenQuota(tenantId: string | number, maxTotalTokens: number): void { + this.tenantQuotas.set(tenantId, Math.max(0, Number(maxTotalTokens) || 0)); + } + + /** + * 断言当前租户 Token 配额充足,超限则抛出 429 阻断 + */ + assertTenantTokenQuota(tenantId: string | number, estimatedTokens = 1): void { + const quota = this.tenantQuotas.get(tenantId); + if (quota === undefined) { + return; + } + const current = this.getTenantTokenUsage(tenantId).totalTokens; + if (current + estimatedTokens > quota) { + throw new CoolCommException( + `当前租户 AI Token 配额已耗尽 (${current}/${quota}),请升级套餐或补充额度`, + 429 + ); + } + } + /** * 动态更新配置 */ @@ -61,10 +180,11 @@ export class DeepSeekService extends BaseService { } /** - * 检查是否已配置有效 API Key + * 检查是否已配置有效 API Key(支持按租户检查或默认平台池检查) */ - isConfigured(): boolean { - return Boolean(this.config.apiKey && this.config.apiKey.trim().length > 0); + isConfigured(tenantId?: number | string): boolean { + const cfg = this.getTenantConfig(tenantId); + return Boolean(cfg.apiKey && cfg.apiKey.trim().length > 0); } /** @@ -148,13 +268,15 @@ export class DeepSeekService extends BaseService { } /** - * 对话补全调用 (支持优雅降级) + * 对话补全调用 (支持多租户 BYOK、Token 计量与优雅降级) */ async chatCompletion( req: DeepSeekChatCompletionRequest, - fallbackReply?: string + fallbackReply?: string, + tenantId?: number | string ): Promise { - const apiKey = this.config.apiKey?.trim(); + const cfg = this.getTenantConfig(tenantId); + const apiKey = cfg.apiKey?.trim(); if (!apiKey) { if (fallbackReply !== undefined) { @@ -163,12 +285,18 @@ export class DeepSeekService extends BaseService { throw new CoolCommException('DeepSeek API Key 未配置'); } - const endpoint = `${this.config.baseUrl || 'https://api.deepseek.com'}/chat/completions`; + // 租户 Token 配额校验 (预估输入字符数 / 2) + const estimatedTokens = Math.ceil( + (req.messages || []).reduce((acc, m) => acc + (m.content || '').length, 0) / 2 + ); + this.assertTenantTokenQuota(tenantId, estimatedTokens); + + const endpoint = `${cfg.baseUrl || 'https://api.deepseek.com'}/chat/completions`; const payload = { - model: req.model || this.config.model || 'deepseek-chat', + model: req.model || cfg.model || 'deepseek-chat', messages: req.messages, - temperature: req.temperature ?? this.config.temperature ?? 0.7, - max_tokens: req.maxTokens ?? this.config.maxTokens ?? 2048, + temperature: req.temperature ?? cfg.temperature ?? 0.7, + max_tokens: req.maxTokens ?? cfg.maxTokens ?? 2048, stream: false, }; @@ -184,6 +312,11 @@ export class DeepSeekService extends BaseService { } ); + // 记录实际 Token 消耗到租户账本 + if (response.data?.usage?.total_tokens) { + this.recordTokenUsage(tenantId, response.data.usage.total_tokens); + } + const content = response.data?.choices?.[0]?.message?.content; if (content) { return content.trim(); diff --git a/backend/src/modules/base/controller/admin/audit.ts b/backend/src/modules/base/controller/admin/audit.ts index 4e60bc5..185aa19 100644 --- a/backend/src/modules/base/controller/admin/audit.ts +++ b/backend/src/modules/base/controller/admin/audit.ts @@ -13,8 +13,9 @@ import { BaseAuditLogService, AuditRecordDTO } from '../../service/audit'; entity: BaseAuditLogEntity, service: BaseAuditLogService, pageQueryOp: { - keyWordLikeFields: ['operatorName', 'action', 'module', 'ip'], - fieldEq: ['status', 'module'], + keyWordLikeFields: ['a.operator_name', 'a.action', 'a.module', 'a.ip'], + fieldEq: ['a.status', 'a.module'], + addOrderBy: { create_time: 'desc' as const }, }, }) export class BaseAuditLogController extends BaseController { diff --git a/backend/src/modules/base/dto/login.ts b/backend/src/modules/base/dto/login.ts index 5b4b30c..fa29c7b 100644 --- a/backend/src/modules/base/dto/login.ts +++ b/backend/src/modules/base/dto/login.ts @@ -11,11 +11,11 @@ export class LoginDTO { @Rule(RuleType.string().required()) password: string; - // 验证码ID - @Rule(RuleType.string().required()) - captchaId: string; + // 验证码ID(临时关闭后台验证码,改为可选) + @Rule(RuleType.string().optional()) + captchaId?: string; - // 验证码 - @Rule(RuleType.required()) - verifyCode: number; + // 验证码(临时关闭后台验证码,改为可选) + @Rule(RuleType.optional()) + verifyCode?: number; } diff --git a/backend/src/modules/base/service/sys/login.ts b/backend/src/modules/base/service/sys/login.ts index 76de9a4..f9ca1ec 100644 --- a/backend/src/modules/base/service/sys/login.ts +++ b/backend/src/modules/base/service/sys/login.ts @@ -50,58 +50,53 @@ export class BaseSysLoginService extends BaseService { * @param login */ async login(login: LoginDTO) { - const { username, captchaId, verifyCode, password } = login; - // 校验验证码 - const checkV = await this.captchaCheck(captchaId, verifyCode); - if (checkV) { - const user = await this.baseSysUserEntity.findOneBy({ username }); - // 校验用户 - if (user) { - // 校验用户状态及密码 - if (user.status === 0 || user.password !== md5(password)) { - throw new CoolCommException('账户或密码不正确~'); - } - } else { + const { username, password } = login; + // 临时关闭后台登录图片验证码,上线前恢复 captchaCheck + const user = await this.baseSysUserEntity.findOneBy({ username }); + // 校验用户 + if (user) { + // 校验用户状态及密码 + if (user.status === 0 || user.password !== md5(password)) { throw new CoolCommException('账户或密码不正确~'); } - // 校验角色 - const roleIds = await this.baseSysRoleService.getByUser(user.id); - if (_.isEmpty(roleIds)) { - throw new CoolCommException('该用户未设置任何角色,无法登录~'); - } - - // 生成token - const { expire, refreshExpire } = this.coolConfig.jwt.token; - const result = { - expire, - token: await this.generateToken(user, roleIds, expire), - refreshExpire, - refreshToken: await this.generateToken( - user, - roleIds, - refreshExpire, - true - ), - }; - - // 将用户相关信息保存到缓存 - const perms = await this.baseSysMenuService.getPerms(roleIds); - const departments = await this.baseSysDepartmentService.getByRoleIds( - roleIds, - user.username === 'admin' - ); - await this.midwayCache.set(`admin:department:${user.id}`, departments); - await this.midwayCache.set(`admin:perms:${user.id}`, perms); - await this.midwayCache.set(`admin:token:${user.id}`, result.token); - await this.midwayCache.set( - `admin:token:refresh:${user.id}`, - result.token - ); - - return result; } else { - throw new CoolCommException('验证码不正确'); + throw new CoolCommException('账户或密码不正确~'); } + // 校验角色 + const roleIds = await this.baseSysRoleService.getByUser(user.id); + if (_.isEmpty(roleIds)) { + throw new CoolCommException('该用户未设置任何角色,无法登录~'); + } + + // 生成token + const { expire, refreshExpire } = this.coolConfig.jwt.token; + const result = { + expire, + token: await this.generateToken(user, roleIds, expire), + refreshExpire, + refreshToken: await this.generateToken( + user, + roleIds, + refreshExpire, + true + ), + }; + + // 将用户相关信息保存到缓存 + const perms = await this.baseSysMenuService.getPerms(roleIds); + const departments = await this.baseSysDepartmentService.getByRoleIds( + roleIds, + user.username === 'admin' + ); + await this.midwayCache.set(`admin:department:${user.id}`, departments); + await this.midwayCache.set(`admin:perms:${user.id}`, perms); + await this.midwayCache.set(`admin:token:${user.id}`, result.token); + await this.midwayCache.set( + `admin:token:refresh:${user.id}`, + result.token + ); + + return result; } /** diff --git a/backend/src/modules/base/service/sys/user.ts b/backend/src/modules/base/service/sys/user.ts index 086a2d2..b260da6 100644 --- a/backend/src/modules/base/service/sys/user.ts +++ b/backend/src/modules/base/service/sys/user.ts @@ -46,7 +46,7 @@ export class BaseSysUserService extends BaseService { ); // 部门权限 const sql = ` SELECT - a.id,a.name,a.nickName,a.headImg,a.email,a.remark,a.status,a.createTime,a.updateTime,a.username,a.phone,a.departmentId, + a.id,a.name,a.nickName,a.headImg,a.email,a.remark,a.status,a.create_time as createTime,a.update_time as updateTime,a.username,a.phone,a.departmentId, b.name as "departmentName" FROM base_sys_user a diff --git a/backend/src/modules/card/controller/admin/article.ts b/backend/src/modules/card/controller/admin/article.ts index 7ff40e7..a10ae74 100644 --- a/backend/src/modules/card/controller/admin/article.ts +++ b/backend/src/modules/card/controller/admin/article.ts @@ -13,8 +13,11 @@ export const adminCardArticleCurdOption = { service: CardArticleService, pageQueryOp: { keyWordLikeFields: ['a.title', 'a.summary'], - fieldEq: ['a.cardId', 'a.isPublished'], - addOrderBy: { updateTime: 'desc' as const }, + fieldEq: [ + { column: 'a.card_id', requestParam: 'cardId' }, + { column: 'a.is_published', requestParam: 'isPublished' }, + ], + addOrderBy: { update_time: 'desc' as const }, }, }; diff --git a/backend/src/modules/card/controller/admin/bento.ts b/backend/src/modules/card/controller/admin/bento.ts index 37b87cb..35944a9 100644 --- a/backend/src/modules/card/controller/admin/bento.ts +++ b/backend/src/modules/card/controller/admin/bento.ts @@ -13,8 +13,8 @@ export const adminCardBentoCurdOption = { service: CardBentoService, pageQueryOp: { keyWordLikeFields: ['a.title', 'a.content'], - fieldEq: ['a.cardId', 'a.type', 'a.status'], - addOrderBy: { sortOrder: 'asc' as const }, + fieldEq: [{ column: 'a.card_id', requestParam: 'cardId' }, 'a.type', 'a.status'], + addOrderBy: { sort_order: 'asc' as const }, }, serviceApis: [ { method: 'getBlocksByCardId', summary: '按名片获取有序 Bento' }, diff --git a/backend/src/modules/card/controller/admin/cases.ts b/backend/src/modules/card/controller/admin/cases.ts index 1950667..79da80b 100644 --- a/backend/src/modules/card/controller/admin/cases.ts +++ b/backend/src/modules/card/controller/admin/cases.ts @@ -13,8 +13,8 @@ export const adminCardCasesCurdOption = { service: CardCasesService, pageQueryOp: { keyWordLikeFields: ['a.title', 'a.client', 'a.metrics'], - fieldEq: ['a.cardId'], - addOrderBy: { sortOrder: 'asc' as const }, + fieldEq: [{ column: 'a.card_id', requestParam: 'cardId' }], + addOrderBy: { sort_order: 'asc' as const }, }, serviceApis: [ { method: 'getCasesByCardId', summary: '按名片获取案例列表' }, diff --git a/backend/src/modules/card/controller/admin/contact.ts b/backend/src/modules/card/controller/admin/contact.ts new file mode 100644 index 0000000..92c163b --- /dev/null +++ b/backend/src/modules/card/controller/admin/contact.ts @@ -0,0 +1,123 @@ +import { Body, Inject, Post, Provide } from '@midwayjs/core'; +import { CoolController, BaseController, CoolCommException } from '@cool-midway/core'; +import { CardContactEntity } from '../../entity/contact'; +import { CardContactService } from '../../service/contact'; +import { CardInfoEntity } from '../../entity/info'; + +interface AdminCtx { + admin?: { + userId?: number; + tenantId?: number; + }; +} + +/** + * 名片大厅人脉 + * 路由前缀: /admin/card/contact + */ +@Provide() +@CoolController({ + api: ['page'], + entity: CardContactEntity, + service: CardContactService, + pageQueryOp: { + keyWordLikeFields: ['b.name', 'b.title', 'b.company'], + select: [ + 'a.*', + 'b.name AS peerName', + 'b.title AS peerTitle', + 'b.company AS peerCompany', + 'b.avatar_url AS peerAvatarUrl', + 'b.slug AS peerSlug', + ], + join: [ + { + entity: CardInfoEntity, + alias: 'b', + condition: 'a.peer_card_id = b.id', + type: 'leftJoin', + }, + ], + where: async (ctx: AdminCtx) => [ + ['a.owner_user_id = :uid', { uid: ctx.admin?.userId || 0 }], + ], + addOrderBy: { update_time: 'desc' as const }, + }, +}) +export class AdminCardContactController extends BaseController { + @Inject() + ctx: AdminCtx; + + @Inject() + cardContactService: CardContactService; + + /** + * 把对方名片收入大厅 + * POST /admin/card/contact/collect + */ + @Post('/collect', { summary: '收入大厅人脉' }) + async collect( + @Body() body: { peerCardId?: number; ownerCardId?: number } + ) { + const ownerUserId = this.ctx.admin?.userId; + if (!ownerUserId) { + throw new CoolCommException('请先登录', 401); + } + if (!body?.peerCardId) { + throw new CoolCommException('缺少对方名片', 400); + } + const data = await this.cardContactService.collect({ + ownerUserId: Number(ownerUserId), + peerCardId: Number(body.peerCardId), + ownerCardId: body.ownerCardId != null ? Number(body.ownerCardId) : null, + }); + return this.ok(data); + } + + /** + * 当前用户人脉分页(带对方名片摘要) + * POST /admin/card/contact/hallPage + */ + @Post('/hallPage', { summary: '大厅人脉分页' }) + async hallPage( + @Body() body: { page?: number; size?: number; keyWord?: string } + ) { + const ownerUserId = this.ctx.admin?.userId; + if (!ownerUserId) { + throw new CoolCommException('请先登录', 401); + } + const data = await this.cardContactService.pageContacts({ + ownerUserId: Number(ownerUserId), + page: body?.page, + size: body?.size, + keyWord: body?.keyWord, + }); + return this.ok(data); + } + + /** + * 同租户已发布名片墙 + * POST /admin/card/contact/teamWall + */ + @Post('/teamWall', { summary: '团队名片墙' }) + async teamWall( + @Body() body: { page?: number; size?: number; keyWord?: string } + ) { + const ownerUserId = this.ctx.admin?.userId; + if (!ownerUserId) { + throw new CoolCommException('请先登录', 401); + } + const tenantId = await this.cardContactService.resolveTenantId( + Number(ownerUserId), + this.ctx.admin?.tenantId + ); + const data = await this.cardContactService.pageTeamWall({ + tenantId, + excludeUserId: Number(ownerUserId), + page: body?.page, + size: body?.size, + keyWord: body?.keyWord, + }); + return this.ok(data); + } +} diff --git a/backend/src/modules/card/controller/admin/event.ts b/backend/src/modules/card/controller/admin/event.ts new file mode 100644 index 0000000..9af9d93 --- /dev/null +++ b/backend/src/modules/card/controller/admin/event.ts @@ -0,0 +1,75 @@ +import { Body, Inject, Post, Provide } from '@midwayjs/core'; +import { CoolController, BaseController, CoolCommException } from '@cool-midway/core'; +import { CardEventService } from '../../service/event'; + +interface AdminCtx { + admin?: { + userId?: number; + tenantId?: number; + }; +} + +/** + * 展会现场 + * 路由前缀: /admin/card/event + */ +@Provide() +@CoolController() +export class AdminCardEventController extends BaseController { + @Inject() + ctx: AdminCtx; + + @Inject() + cardEventService: CardEventService; + + private requireUserId(): number { + const ownerUserId = this.ctx.admin?.userId; + if (!ownerUserId) { + throw new CoolCommException('请先登录', 401); + } + return Number(ownerUserId); + } + + /** + * POST /admin/card/event/join + */ + @Post('/join', { summary: '活动码加入展会现场' }) + async join( + @Body() body: { code?: string; cardId?: number } + ) { + if (!body?.code) { + throw new CoolCommException('缺少活动码', 400); + } + const data = await this.cardEventService.joinEvent({ + userId: this.requireUserId(), + code: body.code, + cardId: body.cardId != null ? Number(body.cardId) : null, + }); + return this.ok(data); + } + + /** + * POST /admin/card/event/floorPage + */ + @Post('/floorPage', { summary: '展会现场同场名片' }) + async floorPage( + @Body() body: { page?: number; size?: number; keyWord?: string } + ) { + const data = await this.cardEventService.pageEventFloor({ + userId: this.requireUserId(), + page: body?.page, + size: body?.size, + keyWord: body?.keyWord, + }); + return this.ok(data); + } + + /** + * POST /admin/card/event/current + */ + @Post('/current', { summary: '当前加入的展会现场' }) + async current() { + const data = await this.cardEventService.currentEvent(this.requireUserId()); + return this.ok(data); + } +} diff --git a/backend/src/modules/card/controller/admin/exchange.ts b/backend/src/modules/card/controller/admin/exchange.ts new file mode 100644 index 0000000..9a203e6 --- /dev/null +++ b/backend/src/modules/card/controller/admin/exchange.ts @@ -0,0 +1,100 @@ +import { Body, Inject, Post, Provide } from '@midwayjs/core'; +import { CoolController, BaseController, CoolCommException } from '@cool-midway/core'; +import { InjectEntityModel } from '@midwayjs/typeorm'; +import { Repository } from 'typeorm'; +import { CardMutualExchangeService } from '../../service/mutual-exchange'; +import { CardInfoEntity } from '../../entity/info'; + +interface AdminCtx { + admin?: { + userId?: number; + }; +} + +/** + * 名片双向互换 + * 路由前缀: /admin/card/exchange + */ +@Provide() +@CoolController() +export class AdminCardExchangeController extends BaseController { + @Inject() + ctx: AdminCtx; + + @Inject() + cardMutualExchangeService: CardMutualExchangeService; + + @InjectEntityModel(CardInfoEntity) + cardInfoEntity: Repository; + + private async resolveActingCardId(explicit?: number): Promise { + if (explicit && Number(explicit) > 0) { + return Number(explicit); + } + const userId = this.ctx.admin?.userId; + if (!userId) { + throw new CoolCommException('请先登录', 401); + } + const card = await this.cardInfoEntity.findOne({ + where: { userId: Number(userId), status: 'published' }, + }); + if (!card) { + throw new CoolCommException('请先发布一张名片再互换', 400); + } + return Number(card.id); + } + + /** + * POST /admin/card/exchange/initiate + */ + @Post('/initiate', { summary: '发起名片互换' }) + async initiate( + @Body() + body: { + senderCardId?: number; + recipientCardId?: number; + notes?: string; + } + ) { + if (!body?.recipientCardId) { + throw new CoolCommException('缺少对方名片', 400); + } + const senderCardId = await this.resolveActingCardId(body.senderCardId); + const data = await this.cardMutualExchangeService.initiateExchange({ + senderCardId, + recipientCardId: Number(body.recipientCardId), + notes: body.notes, + }); + return this.ok(data); + } + + /** + * POST /admin/card/exchange/confirm + */ + @Post('/confirm', { summary: '确认名片互换' }) + async confirm( + @Body() + body: { + invitationId?: string; + exchangeCode?: string; + actingCardId?: number; + } + ) { + const actingCardId = await this.resolveActingCardId(body?.actingCardId); + if (body?.exchangeCode) { + const data = await this.cardMutualExchangeService.confirmByCode( + body.exchangeCode, + actingCardId + ); + return this.ok(data); + } + if (!body?.invitationId) { + throw new CoolCommException('缺少互换单或互换码', 400); + } + const data = await this.cardMutualExchangeService.confirmExchange( + String(body.invitationId), + actingCardId + ); + return this.ok(data); + } +} diff --git a/backend/src/modules/card/controller/admin/info.ts b/backend/src/modules/card/controller/admin/info.ts index 53e5534..a21d7be 100644 --- a/backend/src/modules/card/controller/admin/info.ts +++ b/backend/src/modules/card/controller/admin/info.ts @@ -8,6 +8,7 @@ import { CardInfoService } from '../../service/info'; interface AdminInsertCtx { admin?: { userId?: number; + tenantId?: number; }; } @@ -22,12 +23,13 @@ export const adminCardInfoCurdOption = { service: CardInfoService, insertParam: (ctx: AdminInsertCtx) => ({ userId: ctx.admin?.userId, + tenantId: ctx.admin?.tenantId, }), infoIgnoreProperty: ['remark', 'internalConfig'], pageQueryOp: { keyWordLikeFields: ['a.name', 'a.title', 'a.company', 'a.slug'], - fieldEq: ['a.status', 'a.themeCode'], - addOrderBy: { updateTime: 'desc' as const }, + fieldEq: ['a.status', { column: 'a.theme_code', requestParam: 'themeCode' }], + addOrderBy: { update_time: 'desc' as const }, }, }; diff --git a/backend/src/modules/card/controller/admin/locale.ts b/backend/src/modules/card/controller/admin/locale.ts index 313ffd8..91afb33 100644 --- a/backend/src/modules/card/controller/admin/locale.ts +++ b/backend/src/modules/card/controller/admin/locale.ts @@ -12,7 +12,7 @@ export const adminCardLocaleCurdOption = { entity: CardLocaleEntity, service: CardLocaleService, pageQueryOp: { - fieldEq: ['a.cardId', 'a.locale'], + fieldEq: [{ column: 'a.card_id', requestParam: 'cardId' }, 'a.locale'], }, serviceApis: [ { method: 'upsert', summary: '按名片语言覆盖写入' }, diff --git a/backend/src/modules/card/entity/contact.ts b/backend/src/modules/card/entity/contact.ts new file mode 100644 index 0000000..afdfbbd --- /dev/null +++ b/backend/src/modules/card/entity/contact.ts @@ -0,0 +1,49 @@ +import { BaseEntity } from '../../base/entity/base'; +import { Column, Entity, Index } from 'typeorm'; +import { CardContactSource } from '../../../comm/types/omni'; + +/** + * 名片大厅人脉 + * 一人对一张他人名片只保留一行 + */ +@Entity('card_contact') +@Index('uk_card_contact_owner_peer', ['ownerUserId', 'peerCardId'], { + unique: true, +}) +export class CardContactEntity extends BaseEntity { + @Index() + @Column({ + name: 'owner_user_id', + comment: '收藏人用户 ID', + }) + ownerUserId: number; + + @Column({ + name: 'owner_card_id', + comment: '收藏人当时使用的名片 ID', + nullable: true, + }) + ownerCardId?: number | null; + + @Index() + @Column({ + name: 'peer_card_id', + comment: '对方名片 ID', + }) + peerCardId: number; + + @Column({ + name: 'source', + comment: '来源 (exchange: 互换, collect: 带走, scan: 扫码)', + length: 20, + default: 'collect', + }) + source: CardContactSource; + + @Column({ + name: 'lead_id', + comment: '同步生成的线索 ID', + nullable: true, + }) + leadId?: number | null; +} diff --git a/backend/src/modules/card/entity/event-member.ts b/backend/src/modules/card/entity/event-member.ts new file mode 100644 index 0000000..c9d32a1 --- /dev/null +++ b/backend/src/modules/card/entity/event-member.ts @@ -0,0 +1,31 @@ +import { BaseEntity } from '../../base/entity/base'; +import { Column, Entity, Index } from 'typeorm'; + +/** + * 展会现场成员 + * 一人对一个活动只保留一行 + */ +@Entity('card_event_member') +@Index('uk_card_event_member', ['eventId', 'userId'], { unique: true }) +export class CardEventMemberEntity extends BaseEntity { + @Index() + @Column({ + name: 'event_id', + comment: '现场活动 ID', + }) + eventId: number; + + @Index() + @Column({ + name: 'user_id', + comment: '加入人用户 ID', + }) + userId: number; + + @Index() + @Column({ + name: 'card_id', + comment: '加入时使用的名片 ID', + }) + cardId: number; +} diff --git a/backend/src/modules/card/entity/event.ts b/backend/src/modules/card/entity/event.ts new file mode 100644 index 0000000..2995f61 --- /dev/null +++ b/backend/src/modules/card/entity/event.ts @@ -0,0 +1,33 @@ +import { BaseEntity } from '../../base/entity/base'; +import { Column, Entity, Index } from 'typeorm'; +import { CardEventStatus } from '../../../comm/types/omni'; + +/** + * 展会现场活动 + */ +@Entity('card_event') +export class CardEventEntity extends BaseEntity { + @Index({ unique: true }) + @Column({ + name: 'code', + comment: '6 位活动码', + length: 6, + }) + code: string; + + @Column({ + name: 'name', + comment: '现场名称', + length: 120, + }) + name: string; + + @Index() + @Column({ + name: 'status', + comment: 'active / ended', + length: 20, + default: 'active', + }) + status: CardEventStatus; +} diff --git a/backend/src/modules/card/entity/exchange.ts b/backend/src/modules/card/entity/exchange.ts new file mode 100644 index 0000000..763597a --- /dev/null +++ b/backend/src/modules/card/entity/exchange.ts @@ -0,0 +1,76 @@ +import { BaseEntity } from '../../base/entity/base'; +import { Column, Entity, Index } from 'typeorm'; + +export type CardExchangeStatus = + | 'REQUESTED' + | 'ACCEPTED' + | 'REJECTED' + | 'EXPIRED'; + +/** + * 名片双向互换单 + */ +@Entity('card_exchange') +export class CardExchangeEntity extends BaseEntity { + @Index() + @Column({ + name: 'exchange_code', + comment: '6 位互换码', + length: 6, + }) + exchangeCode: string; + + @Index() + @Column({ + name: 'sender_card_id', + comment: '发起方名片 ID', + }) + senderCardId: number; + + @Index() + @Column({ + name: 'recipient_card_id', + comment: '接收方名片 ID', + }) + recipientCardId: number; + + @Column({ + name: 'sender_user_id', + comment: '发起方用户 ID', + nullable: true, + }) + senderUserId?: number | null; + + @Column({ + name: 'recipient_user_id', + comment: '接收方用户 ID', + nullable: true, + }) + recipientUserId?: number | null; + + @Index() + @Column({ + name: 'status', + comment: 'REQUESTED / ACCEPTED / REJECTED / EXPIRED', + length: 20, + default: 'REQUESTED', + }) + status: CardExchangeStatus; + + @Column({ + name: 'notes', + comment: '互换备注', + type: 'text', + nullable: true, + }) + notes?: string; + + @Column({ + name: 'accepted_at', + comment: '确认时间', + type: 'varchar', + length: 32, + nullable: true, + }) + acceptedAt?: string | null; +} diff --git a/backend/src/modules/card/service/contact.ts b/backend/src/modules/card/service/contact.ts new file mode 100644 index 0000000..8b538fd --- /dev/null +++ b/backend/src/modules/card/service/contact.ts @@ -0,0 +1,262 @@ +import { Provide } from '@midwayjs/core'; +import { BaseService, CoolCommException } from '@cool-midway/core'; +import { InjectEntityModel } from '@midwayjs/typeorm'; +import { Repository } from 'typeorm'; +import { CardContactEntity } from '../entity/contact'; +import { CardInfoEntity } from '../entity/info'; +import { CrmLeadEntity } from '../../crm/entity/lead'; +import { + CardContact, + CardContactSource, +} from '../../../comm/types/omni'; + +export interface UpsertContactInput { + ownerUserId: number; + ownerCardId?: number | null; + peerCardId: number; + source: CardContactSource; + leadId?: number | null; +} + +export interface CollectContactInput { + ownerUserId: number; + peerCardId: number; + ownerCardId?: number | null; +} + +export interface PageContactsQuery { + ownerUserId: number; + page?: number; + size?: number; + keyWord?: string; +} + +export interface PageTeamWallQuery { + tenantId: number; + excludeUserId?: number; + page?: number; + size?: number; + keyWord?: string; +} + +/** + * 名片大厅人脉 + */ +@Provide() +export class CardContactService extends BaseService { + @InjectEntityModel(CardContactEntity) + cardContactEntity: Repository; + + @InjectEntityModel(CardInfoEntity) + cardInfoEntity: Repository; + + @InjectEntityModel(CrmLeadEntity) + crmLeadEntity: Repository; + + async upsertContact(input: UpsertContactInput): Promise { + if (!input?.ownerUserId || !input?.peerCardId) { + throw new CoolCommException('缺少人脉双方标识', 400); + } + if (input.ownerCardId && Number(input.ownerCardId) === Number(input.peerCardId)) { + throw new CoolCommException('不能收藏自己的名片', 400); + } + + const peer = await this.cardInfoEntity.findOne({ + where: { id: Number(input.peerCardId) }, + }); + if (!peer) { + throw new CoolCommException('对方名片不存在', 404); + } + if (peer.userId && Number(peer.userId) === Number(input.ownerUserId)) { + throw new CoolCommException('不能收藏自己的名片', 400); + } + + let row = await this.cardContactEntity.findOne({ + where: { + ownerUserId: Number(input.ownerUserId), + peerCardId: Number(input.peerCardId), + }, + }); + if (!row) { + row = new CardContactEntity(); + row.ownerUserId = Number(input.ownerUserId); + row.peerCardId = Number(input.peerCardId); + } + if (input.ownerCardId != null) { + row.ownerCardId = Number(input.ownerCardId); + } + row.source = input.source; + if (input.leadId != null) { + row.leadId = Number(input.leadId); + } + if (peer.tenantId && !row.tenantId) { + row.tenantId = Number(peer.tenantId); + } + return this.cardContactEntity.save(row); + } + + async collect(input: CollectContactInput): Promise { + return this.upsertContact({ + ownerUserId: input.ownerUserId, + ownerCardId: input.ownerCardId, + peerCardId: input.peerCardId, + source: 'collect', + }); + } + + async upsertExchangeLead( + targetCard: CardInfoEntity, + sourceCard: CardInfoEntity + ): Promise { + const visitorId = `card:${sourceCard.id}`; + let lead = await this.crmLeadEntity.findOne({ + where: { + cardId: Number(targetCard.id), + visitorId, + }, + }); + if (!lead) { + lead = new CrmLeadEntity(); + lead.cardId = Number(targetCard.id); + lead.visitorId = visitorId; + lead.status = 'new'; + lead.intentScore = 50; + lead.source = 'exchange'; + } + lead.name = sourceCard.name; + lead.company = sourceCard.company; + lead.phone = sourceCard.phone; + lead.email = sourceCard.email; + if (targetCard.userId) { + lead.userId = Number(targetCard.userId); + } + if (targetCard.tenantId) { + lead.tenantId = Number(targetCard.tenantId); + } + return this.crmLeadEntity.save(lead); + } + + async syncExchangePair( + ownerCard: CardInfoEntity, + peerCard: CardInfoEntity + ): Promise<{ contact: CardContactEntity; lead: CrmLeadEntity }> { + const lead = await this.upsertExchangeLead(ownerCard, peerCard); + const contact = await this.upsertContact({ + ownerUserId: Number(ownerCard.userId), + ownerCardId: Number(ownerCard.id), + peerCardId: Number(peerCard.id), + source: 'exchange', + leadId: Number(lead.id), + }); + return { contact, lead }; + } + + async pageContacts( + query: PageContactsQuery + ): Promise<{ + list: CardContact[]; + pagination: { page: number; size: number; total: number }; + }> { + const page = query.page && query.page > 0 ? Math.floor(query.page) : 1; + const size = query.size && query.size > 0 ? Math.floor(query.size) : 20; + const ownerUserId = Number(query.ownerUserId); + const rows = await this.cardContactEntity.find({ + where: { ownerUserId }, + }); + const keyword = query.keyWord ? String(query.keyWord).trim().toLowerCase() : ''; + const hydrated: CardContact[] = []; + for (const row of rows) { + const peer = await this.cardInfoEntity.findOne({ + where: { id: Number(row.peerCardId) }, + }); + const item: CardContact = { + id: row.id, + ownerUserId: row.ownerUserId, + ownerCardId: row.ownerCardId, + peerCardId: row.peerCardId, + source: row.source, + leadId: row.leadId, + peerName: peer?.name, + peerTitle: peer?.title, + peerCompany: peer?.company, + peerAvatarUrl: peer?.avatarUrl, + peerSlug: peer?.slug, + exchangedAt: row.updateTime || row.createTime, + }; + if (keyword) { + const hay = `${item.peerName || ''} ${item.peerTitle || ''} ${item.peerCompany || ''}`.toLowerCase(); + if (!hay.includes(keyword)) { + continue; + } + } + hydrated.push(item); + } + const total = hydrated.length; + const start = (page - 1) * size; + return { + list: hydrated.slice(start, start + size), + pagination: { page, size, total }, + }; + } + + async resolveTenantId(userId: number, explicit?: number | null): Promise { + if (explicit != null && Number(explicit) > 0) { + return Number(explicit); + } + const card = await this.cardInfoEntity.findOne({ + where: { userId: Number(userId) }, + }); + if (card?.tenantId) { + return Number(card.tenantId); + } + throw new CoolCommException('当前账号未加入企业', 400); + } + + async pageTeamWall( + query: PageTeamWallQuery + ): Promise<{ + list: CardContact[]; + pagination: { page: number; size: number; total: number }; + }> { + const page = query.page && query.page > 0 ? Math.floor(query.page) : 1; + const size = query.size && query.size > 0 ? Math.floor(query.size) : 20; + const tenantId = Number(query.tenantId); + if (!tenantId) { + throw new CoolCommException('缺少租户', 400); + } + const cards = await this.cardInfoEntity.find({ + where: { tenantId, status: 'published' }, + }); + const keyword = query.keyWord ? String(query.keyWord).trim().toLowerCase() : ''; + const excludeUserId = + query.excludeUserId != null ? Number(query.excludeUserId) : 0; + const hydrated: CardContact[] = []; + for (const card of cards) { + if (excludeUserId && Number(card.userId) === excludeUserId) { + continue; + } + if (keyword) { + const hay = `${card.name || ''} ${card.title || ''} ${card.company || ''}`.toLowerCase(); + if (!hay.includes(keyword)) { + continue; + } + } + hydrated.push({ + ownerUserId: excludeUserId || 0, + peerCardId: Number(card.id), + source: 'collect', + peerName: card.name, + peerTitle: card.title, + peerCompany: card.company, + peerAvatarUrl: card.avatarUrl, + peerSlug: card.slug, + }); + } + const total = hydrated.length; + const start = (page - 1) * size; + return { + list: hydrated.slice(start, start + size), + pagination: { page, size, total }, + }; + } +} diff --git a/backend/src/modules/card/service/event.ts b/backend/src/modules/card/service/event.ts new file mode 100644 index 0000000..6d258ed --- /dev/null +++ b/backend/src/modules/card/service/event.ts @@ -0,0 +1,209 @@ +import { Provide } from '@midwayjs/core'; +import { BaseService, CoolCommException } from '@cool-midway/core'; +import { InjectEntityModel } from '@midwayjs/typeorm'; +import { Repository } from 'typeorm'; +import { CardEventEntity } from '../entity/event'; +import { CardEventMemberEntity } from '../entity/event-member'; +import { CardInfoEntity } from '../entity/info'; +import { + CardContact, + CardEvent, + CardEventJoinResult, + CardEventMember, +} from '../../../comm/types/omni'; + +export interface JoinEventInput { + userId: number; + code: string; + cardId?: number | null; +} + +export interface PageEventFloorQuery { + userId: number; + page?: number; + size?: number; + keyWord?: string; +} + +export function normalizeEventCode(raw: string): string { + const code = String(raw || '') + .trim() + .toUpperCase(); + if (!/^[A-Z0-9]{6}$/.test(code)) { + throw new CoolCommException('请输入 6 位活动码', 400); + } + return code; +} + +function toEvent(row: CardEventEntity): CardEvent { + return { + id: row.id, + code: row.code, + name: row.name, + status: row.status, + }; +} + +function toMember(row: CardEventMemberEntity): CardEventMember { + return { + id: row.id, + eventId: row.eventId, + userId: row.userId, + cardId: row.cardId, + }; +} + +/** + * 展会现场活动码与同场名片墙 + */ +@Provide() +export class CardEventService extends BaseService { + @InjectEntityModel(CardEventEntity) + cardEventEntity: Repository; + + @InjectEntityModel(CardEventMemberEntity) + cardEventMemberEntity: Repository; + + @InjectEntityModel(CardInfoEntity) + cardInfoEntity: Repository; + + async resolveUserCard( + userId: number, + explicit?: number | null + ): Promise { + if (explicit != null && Number(explicit) > 0) { + const card = await this.cardInfoEntity.findOne({ + where: { id: Number(explicit) }, + }); + if (!card || Number(card.userId) !== Number(userId)) { + throw new CoolCommException('名片不属于当前账号', 400); + } + return card; + } + const published = await this.cardInfoEntity.findOne({ + where: { userId: Number(userId), status: 'published' }, + }); + if (published) { + return published; + } + const anyCard = await this.cardInfoEntity.findOne({ + where: { userId: Number(userId) }, + }); + if (!anyCard) { + throw new CoolCommException('请先创建名片', 400); + } + return anyCard; + } + + async joinEvent(input: JoinEventInput): Promise { + if (!input?.userId) { + throw new CoolCommException('请先登录', 401); + } + const code = normalizeEventCode(input.code); + let event = await this.cardEventEntity.findOne({ where: { code } }); + if (!event) { + event = new CardEventEntity(); + event.code = code; + event.name = code; + event.status = 'active'; + event = await this.cardEventEntity.save(event); + } + const card = await this.resolveUserCard(input.userId, input.cardId); + let member = await this.cardEventMemberEntity.findOne({ + where: { + eventId: Number(event.id), + userId: Number(input.userId), + }, + }); + if (!member) { + member = new CardEventMemberEntity(); + member.eventId = Number(event.id); + member.userId = Number(input.userId); + } + member.cardId = Number(card.id); + if (card.tenantId && !member.tenantId) { + member.tenantId = Number(card.tenantId); + } + member = await this.cardEventMemberEntity.save(member); + return { + event: toEvent(event), + member: toMember(member), + }; + } + + async currentEvent(userId: number): Promise { + const members = await this.cardEventMemberEntity.find({ + where: { userId: Number(userId) }, + }); + if (!members.length) { + return null; + } + const latest = members[members.length - 1]; + const event = await this.cardEventEntity.findOne({ + where: { id: Number(latest.eventId) }, + }); + return event ? toEvent(event) : null; + } + + async pageEventFloor( + query: PageEventFloorQuery + ): Promise<{ + list: CardContact[]; + pagination: { page: number; size: number; total: number }; + }> { + const page = query.page && query.page > 0 ? Math.floor(query.page) : 1; + const size = query.size && query.size > 0 ? Math.floor(query.size) : 20; + const members = await this.cardEventMemberEntity.find({ + where: { userId: Number(query.userId) }, + }); + if (!members.length) { + return { + list: [], + pagination: { page, size, total: 0 }, + }; + } + const latest = members[members.length - 1]; + const peers = await this.cardEventMemberEntity.find({ + where: { eventId: Number(latest.eventId) }, + }); + const keyword = query.keyWord + ? String(query.keyWord).trim().toLowerCase() + : ''; + const hydrated: CardContact[] = []; + for (const peer of peers) { + if (Number(peer.userId) === Number(query.userId)) { + continue; + } + const card = await this.cardInfoEntity.findOne({ + where: { id: Number(peer.cardId) }, + }); + if (!card || card.status !== 'published') { + continue; + } + if (keyword) { + const hay = `${card.name || ''} ${card.title || ''} ${ + card.company || '' + }`.toLowerCase(); + if (!hay.includes(keyword)) { + continue; + } + } + hydrated.push({ + ownerUserId: Number(query.userId), + peerCardId: Number(card.id), + source: 'event', + peerName: card.name, + peerTitle: card.title, + peerCompany: card.company, + peerAvatarUrl: card.avatarUrl, + peerSlug: card.slug, + }); + } + const total = hydrated.length; + const start = (page - 1) * size; + return { + list: hydrated.slice(start, start + size), + pagination: { page, size, total }, + }; + } +} diff --git a/backend/src/modules/card/service/info.ts b/backend/src/modules/card/service/info.ts index 39853fd..416c081 100644 --- a/backend/src/modules/card/service/info.ts +++ b/backend/src/modules/card/service/info.ts @@ -4,6 +4,8 @@ import { InjectEntityModel } from '@midwayjs/typeorm'; import { Repository } from 'typeorm'; import { CardInfoEntity } from '../entity/info'; import { CardPortalService } from './portal'; +import { TeamQuotaService } from '../../team/service/quota'; +import { getTenantId } from '../../../comm/context/tenant'; /** * 名片增删改载荷(Cool CRUD 传入对象、主键或主键列表) @@ -11,6 +13,7 @@ import { CardPortalService } from './portal'; interface CardModifyRecord { id?: string | number; slug?: string; + tenantId?: string | number; } /** @@ -24,12 +27,34 @@ export class CardInfoService extends BaseService { @Inject() cardPortalService: CardPortalService; + @Inject() + teamQuotaService: TeamQuotaService; + @Init() async init() { await super.init(); this.setEntity(this.cardInfoEntity); } + /** + * 新增/修改/删除前前置拦截与配额校验 + */ + async modifyBefore(data: any, type: 'delete' | 'update' | 'add'): Promise { + if (type === 'add' && data && typeof data === 'object') { + const resolvedTenantId = + data.tenantId || + (this.baseCtx ? getTenantId(this.baseCtx) : undefined) || + (this.baseCtx as any)?.admin?.tenantId; + + if (resolvedTenantId) { + data.tenantId = Number(resolvedTenantId); + if (this.teamQuotaService) { + await this.teamQuotaService.assertQuotaAvailable(data.tenantId, 'cards', 1); + } + } + } + } + /** * 新增/修改/删除后清理门户缓存 */ diff --git a/backend/src/modules/card/service/mutual-exchange.ts b/backend/src/modules/card/service/mutual-exchange.ts index 269e260..0181831 100644 --- a/backend/src/modules/card/service/mutual-exchange.ts +++ b/backend/src/modules/card/service/mutual-exchange.ts @@ -1,7 +1,17 @@ -import { Provide } from '@midwayjs/core'; -import { BaseService } from '@cool-midway/core'; +import { Inject, Provide } from '@midwayjs/core'; +import { BaseService, CoolCommException } from '@cool-midway/core'; +import { InjectEntityModel } from '@midwayjs/typeorm'; +import { Repository } from 'typeorm'; +import { CardExchangeEntity } from '../entity/exchange'; +import { CardInfoEntity } from '../entity/info'; +import { CrmLeadEntity } from '../../crm/entity/lead'; +import { CardContactService } from './contact'; -export type MutualExchangeStatus = 'REQUESTED' | 'ACCEPTED' | 'REJECTED' | 'EXPIRED'; +export type MutualExchangeStatus = + | 'REQUESTED' + | 'ACCEPTED' + | 'REJECTED' + | 'EXPIRED'; export interface MutualExchangeInvitation { id: string; @@ -88,6 +98,19 @@ export function acceptMutualExchangeInvitation( }; } +function toInvitation(row: CardExchangeEntity): MutualExchangeInvitation { + return { + id: String(row.id), + senderCardId: Number(row.senderCardId), + recipientCardId: Number(row.recipientCardId), + status: row.status, + exchangeCode: row.exchangeCode, + notes: row.notes, + createdAt: Date.now(), + acceptedAt: row.acceptedAt ? Date.parse(row.acceptedAt) : undefined, + }; +} + /** * 展会名片双向互换服务 */ @@ -95,6 +118,18 @@ export function acceptMutualExchangeInvitation( export class CardMutualExchangeService extends BaseService { private readonly invitations = new Map(); + @InjectEntityModel(CardExchangeEntity) + exchangeEntity: Repository; + + @InjectEntityModel(CardInfoEntity) + cardInfoEntity: Repository; + + @InjectEntityModel(CrmLeadEntity) + crmLeadEntity: Repository; + + @Inject() + cardContactService: CardContactService; + async initiateExchange(params: { senderCardId: number; recipientCardId: number; @@ -106,22 +141,119 @@ export class CardMutualExchangeService extends BaseService { params.notes ); this.invitations.set(invite.id, invite); + + if (this.exchangeEntity) { + const sender = await this.cardInfoEntity?.findOne({ + where: { id: Number(params.senderCardId) }, + }); + const recipient = await this.cardInfoEntity?.findOne({ + where: { id: Number(params.recipientCardId) }, + }); + const row = new CardExchangeEntity(); + row.exchangeCode = invite.exchangeCode; + row.senderCardId = Number(params.senderCardId); + row.recipientCardId = Number(params.recipientCardId); + row.senderUserId = sender?.userId ? Number(sender.userId) : null; + row.recipientUserId = recipient?.userId ? Number(recipient.userId) : null; + row.status = 'REQUESTED'; + row.notes = params.notes; + const saved = await this.exchangeEntity.save(row); + invite.id = String(saved.id); + this.invitations.set(invite.id, invite); + } + return invite; } + private async loadInvitation( + invitationId: string + ): Promise { + const memory = this.invitations.get(invitationId); + if (memory) { + return memory; + } + if (!this.exchangeEntity) { + return null; + } + const numericId = Number(invitationId); + if (!Number.isFinite(numericId) || numericId <= 0) { + return null; + } + const row = await this.exchangeEntity.findOne({ + where: { id: numericId }, + }); + return row ? toInvitation(row) : null; + } + async confirmExchange( invitationId: string, actingCardId: number ): Promise<{ status: MutualExchangeStatus; isDualSynced: boolean }> { - const invite = this.invitations.get(invitationId); + const invite = await this.loadInvitation(invitationId); if (!invite) { throw new Error('未找到该名片互换邀约'); } const res = acceptMutualExchangeInvitation(invite, actingCardId); + this.invitations.set(invite.id, res.invitation); + + if (this.exchangeEntity) { + const row = await this.exchangeEntity.findOne({ + where: { id: Number(invite.id) }, + }); + if (row) { + row.status = 'ACCEPTED'; + row.acceptedAt = new Date().toISOString(); + await this.exchangeEntity.save(row); + } + } + + let isDualSynced = res.syncActions.length === 2; + if (this.cardContactService && this.cardInfoEntity) { + for (const action of res.syncActions) { + const ownerCard = await this.cardInfoEntity.findOne({ + where: { id: Number(action.targetCardId) }, + }); + const peerCard = await this.cardInfoEntity.findOne({ + where: { id: Number(action.sourceCardId) }, + }); + if (!ownerCard?.userId || !peerCard) { + isDualSynced = false; + continue; + } + await this.cardContactService.syncExchangePair(ownerCard, peerCard); + } + } + return { status: res.invitation.status, - isDualSynced: res.syncActions.length === 2, + isDualSynced, }; } + + async confirmByCode( + exchangeCode: string, + actingCardId: number + ): Promise<{ status: MutualExchangeStatus; isDualSynced: boolean }> { + const code = String(exchangeCode || '').trim(); + if (!/^\d{6}$/.test(code)) { + throw new CoolCommException('互换码无效', 400); + } + const memory = Array.from(this.invitations.values()).find( + item => item.exchangeCode === code && item.status === 'REQUESTED' + ); + if (memory) { + return this.confirmExchange(memory.id, actingCardId); + } + if (!this.exchangeEntity) { + throw new CoolCommException('未找到该名片互换邀约', 404); + } + const row = await this.exchangeEntity.findOne({ + where: { exchangeCode: code, status: 'REQUESTED' }, + }); + if (!row) { + throw new CoolCommException('未找到该名片互换邀约', 404); + } + return this.confirmExchange(String(row.id), actingCardId); + } } diff --git a/backend/src/modules/crm/controller/admin/lead.ts b/backend/src/modules/crm/controller/admin/lead.ts index 2e03fad..ed35c11 100644 --- a/backend/src/modules/crm/controller/admin/lead.ts +++ b/backend/src/modules/crm/controller/admin/lead.ts @@ -34,8 +34,8 @@ export interface SyncExternalDTO { service: CrmLeadService, pageQueryOp: { keyWordLikeFields: ['a.name', 'a.company', 'a.email', 'a.phone'], - fieldEq: ['a.status', 'a.source', 'a.cardId'], - addOrderBy: { createTime: 'desc' }, + fieldEq: ['a.status', 'a.source', { column: 'a.card_id', requestParam: 'cardId' }], + addOrderBy: { create_time: 'desc' as const }, }, serviceApis: [ { method: 'updateStatus', summary: '线索状态流转' }, diff --git a/backend/src/modules/crm/controller/admin/radar.ts b/backend/src/modules/crm/controller/admin/radar.ts index c3b0611..f592c70 100644 --- a/backend/src/modules/crm/controller/admin/radar.ts +++ b/backend/src/modules/crm/controller/admin/radar.ts @@ -1,5 +1,5 @@ import { Body, Get, Inject, Post, Provide, Query } from '@midwayjs/core'; -import { CoolController, BaseController } from '@cool-midway/core'; +import { CoolController, BaseController, CoolCommException } from '@cool-midway/core'; import { CrmTrackEntity } from '../../entity/track'; import { CrmRadarService } from '../../service/radar'; @@ -14,8 +14,12 @@ import { CrmRadarService } from '../../service/radar'; entity: CrmTrackEntity, service: CrmRadarService, pageQueryOp: { - keyWordLikeFields: ['a.country', 'a.city', 'a.visitorId', 'a.ip'], - fieldEq: ['a.cardId', 'a.touchType', 'a.country'], + keyWordLikeFields: ['a.country', 'a.city', 'a.visitor_id', 'a.ip'], + fieldEq: [ + { column: 'a.card_id', requestParam: 'cardId' }, + { column: 'a.touch_type', requestParam: 'touchType' }, + 'a.country', + ], addOrderBy: { id: 'desc' }, }, serviceApis: [ @@ -26,6 +30,9 @@ import { CrmRadarService } from '../../service/radar'; ], }) export class AdminCrmRadarController extends BaseController { + @Inject() + ctx: { admin?: { userId?: number } }; + @Inject() crmRadarService: CrmRadarService; @@ -93,5 +100,18 @@ export class AdminCrmRadarController extends BaseController { }); return this.ok(data); } + + /** + * 高停留/高意向雷达红点 + * POST /admin/crm/radar/hotInbox + */ + @Post('/hotInbox', { summary: '高意向雷达收件箱' }) + async hotInbox() { + const ownerUserId = this.ctx?.admin?.userId; + if (!ownerUserId) { + throw new CoolCommException('请先登录', 401); + } + return this.ok(await this.crmRadarService.hotInbox(Number(ownerUserId))); + } } diff --git a/backend/src/modules/crm/service/buffer.ts b/backend/src/modules/crm/service/buffer.ts new file mode 100644 index 0000000..6ea2148 --- /dev/null +++ b/backend/src/modules/crm/service/buffer.ts @@ -0,0 +1,158 @@ +import { Init, Provide, Scope, ScopeEnum } from '@midwayjs/core'; +import { BaseService } from '@cool-midway/core'; +import { InjectEntityModel } from '@midwayjs/typeorm'; +import { Repository } from 'typeorm'; +import { CrmTrackEntity } from '../entity/track'; + +/** + * 高并发访客雷达异步削峰缓冲服务 (Telemetry Ingestion Buffer) + * + * 核心特性: + * 1. 内存环形/缓冲队列接收,极速响应免登录上报请求 (< 5ms); + * 2. 批量落盘削峰 (Bulk Batch Insert),降低主库写事务与连接池压力; + * 3. 达到批次阈值或定时窗口自动 Flush,服务退出优雅刷盘无丢单。 + */ +@Provide() +@Scope(ScopeEnum.Singleton) +export class CrmRadarBufferService extends BaseService { + @InjectEntityModel(CrmTrackEntity) + crmTrackEntity: Repository; + + /** 内存缓冲队列 */ + private queue: CrmTrackEntity[] = []; + + /** 单批次批量写入阈值 (条) */ + private batchSize = 50; + + /** 定时批量刷盘间隔 (毫秒) */ + private flushIntervalMs = 1000; + + /** 队列最大安全容量保护 (防止内存泄漏) */ + private maxQueueCapacity = 10000; + + /** 定时刷新定时器句柄 */ + private timer: NodeJS.Timeout | null = null; + + /** 是否处于落盘锁定中,防并发重入 */ + private isFlushing = false; + + @Init() + async init(): Promise { + await super.init(); + this.startTimer(); + } + + /** + * 启动定时刷盘时钟 + */ + private startTimer(): void { + if (this.timer) { + clearInterval(this.timer); + this.timer = null; + } + if (this.flushIntervalMs > 0) { + this.timer = setInterval(async () => { + try { + await this.flush(); + } catch { + // 守护进程容错,防止未捕获异常中断定时器 + } + }, this.flushIntervalMs); + } + } + + /** + * 设置单批次写入阈值 + */ + setBatchSize(size: number): void { + this.batchSize = Math.max(1, Number(size) || 1); + } + + /** + * 设置定时刷新时间间隔 (毫秒,0 表示禁用定时器) + */ + setFlushInterval(intervalMs: number): void { + this.flushIntervalMs = Math.max(0, Number(intervalMs) || 0); + this.startTimer(); + } + + /** + * 获取当前队列积攒长度 + */ + getQueueLength(): number { + return this.queue.length; + } + + /** + * 将解析后的足迹实体非阻塞推入缓冲队列 + */ + async enqueue(track: CrmTrackEntity | Partial): Promise { + if (!track) return false; + + // 容量上限防御:若超出安全上限,丢弃最早积攒数据保证可用性 + if (this.queue.length >= this.maxQueueCapacity) { + this.queue.shift(); + } + + this.queue.push(track as CrmTrackEntity); + + // 达到批次阈值立即触发批量落盘 + if (this.queue.length >= this.batchSize) { + // 异步触发 flush,不阻塞当前请求链路 + this.flush().catch(() => {}); + } + + return true; + } + + /** + * 批量将队列中的数据一次性 Bulk Insert 写入数据库 + * @returns 成功落盘条数 + */ + async flush(): Promise { + if (this.queue.length === 0) { + return 0; + } + if (this.isFlushing) { + return 0; + } + + this.isFlushing = true; + try { + // 截取当前队列中待入库的所有项 + const batch = this.queue.splice(0, this.queue.length); + if (batch.length === 0) { + return 0; + } + + if (this.crmTrackEntity) { + if (typeof this.crmTrackEntity.createQueryBuilder === 'function') { + const qb = this.crmTrackEntity.createQueryBuilder(); + if (qb && typeof qb.insert === 'function') { + await qb.insert().into(CrmTrackEntity).values(batch).execute(); + return batch.length; + } + } + // 兼容未提供 insert queryBuilder 的 Mock 环境或常规 save + await this.crmTrackEntity.save(batch); + } + + return batch.length; + } finally { + this.isFlushing = false; + } + } + + /** + * 优雅停止服务:清除定时器并清空刷盘剩余缓冲 + */ + stop(): void { + if (this.timer) { + clearInterval(this.timer); + this.timer = null; + } + if (this.queue.length > 0) { + this.flush().catch(() => {}); + } + } +} diff --git a/backend/src/modules/crm/service/lead-pool.ts b/backend/src/modules/crm/service/lead-pool.ts index c19e588..8447c7e 100644 --- a/backend/src/modules/crm/service/lead-pool.ts +++ b/backend/src/modules/crm/service/lead-pool.ts @@ -71,21 +71,32 @@ export class CrmLeadPoolService extends BaseService { const thresholdMs = inactivityDays * 24 * 60 * 60 * 1000; const now = Date.now(); + const thresholdDate = new Date(now - thresholdMs); - const allLeads = await this.crmLeadEntity.find(); - const toRecycle: CrmLeadEntity[] = []; + let toRecycle: CrmLeadEntity[] = []; - for (const lead of allLeads) { - // 仅扫描私海线索,且排除已赢单 (won) 和已归档 (archived) - if (lead.isPool) continue; - if (lead.status === 'won' || lead.status === 'archived') continue; - - const followUp = lead.lastFollowUpTime || lead.updateTime || lead.createTime; - if (!followUp) continue; - - const diff = now - new Date(followUp).getTime(); - if (diff >= thresholdMs) { - toRecycle.push(lead); + if (this.crmLeadEntity && typeof this.crmLeadEntity.createQueryBuilder === 'function') { + toRecycle = await this.crmLeadEntity + .createQueryBuilder('lead') + .where('lead.is_pool = :isPool', { isPool: false }) + .andWhere('lead.status NOT IN (:...excluded)', { excluded: ['won', 'archived'] }) + .andWhere( + '(COALESCE(lead.last_follow_up_time, lead.update_time, lead.create_time) <= :thresholdDate)', + { thresholdDate } + ) + .take(500) + .getMany(); + } else { + const allLeads = await this.crmLeadEntity.find({ where: { isPool: false } } as any); + for (const lead of allLeads || []) { + if (lead.isPool) continue; + if (lead.status === 'won' || lead.status === 'archived') continue; + const followUp = lead.lastFollowUpTime || lead.updateTime || lead.createTime; + if (!followUp) continue; + const diff = now - new Date(followUp).getTime(); + if (diff >= thresholdMs) { + toRecycle.push(lead); + } } } diff --git a/backend/src/modules/crm/service/lead.ts b/backend/src/modules/crm/service/lead.ts index ae5a775..bc5eef8 100644 --- a/backend/src/modules/crm/service/lead.ts +++ b/backend/src/modules/crm/service/lead.ts @@ -3,6 +3,7 @@ import { BaseService, CoolCommException } from '@cool-midway/core'; import { InjectEntityModel } from '@midwayjs/typeorm'; import { Repository } from 'typeorm'; import { CrmLeadEntity } from '../entity/lead'; +import { CardInfoEntity } from '../../card/entity/info'; import { LeadSource, LeadStatus, @@ -29,6 +30,7 @@ export interface IntentScoreResult { */ export interface SubmitLeadDTO { cardId: number | string; + tenantId?: number | string; visitorId?: string; name: string; company?: string; @@ -56,6 +58,9 @@ export class CrmLeadService extends BaseService { @InjectEntityModel(CrmLeadEntity) crmLeadEntity: Repository; + @InjectEntityModel(CardInfoEntity) + cardInfoEntity: Repository; + @Inject() leadScoreService: CrmLeadScoreService = new CrmLeadScoreService(); @@ -161,8 +166,36 @@ export class CrmLeadService extends BaseService { status = 'hot'; } + // 自动追溯绑定名片归属租户与销售负责人 + let tenantId = data.tenantId ? Number(data.tenantId) : undefined; + let assignedUserId: number | undefined = undefined; + + if (this.cardInfoEntity && data.cardId) { + try { + const card = await this.cardInfoEntity.findOne({ + where: { id: Number(data.cardId) }, + }); + if (card) { + if (!tenantId && card.tenantId) { + tenantId = Number(card.tenantId); + } + if (card.userId) { + assignedUserId = Number(card.userId); + } + } + } catch { + // 容错保护 + } + } + const lead = new CrmLeadEntity(); lead.cardId = Number(data.cardId); + if (tenantId) { + lead.tenantId = tenantId; + } + if (assignedUserId) { + lead.userId = assignedUserId; + } lead.visitorId = data.visitorId || ''; lead.name = name; lead.company = data.company ? String(data.company).trim() : undefined; diff --git a/backend/src/modules/crm/service/push.ts b/backend/src/modules/crm/service/push.ts index 4e6b3cc..4d1785e 100644 --- a/backend/src/modules/crm/service/push.ts +++ b/backend/src/modules/crm/service/push.ts @@ -4,6 +4,23 @@ import { RadarTrack, TouchType } from '../../../comm/types/omni'; /** 雷达访客实时事件名,与管理端 / 客户端约定一致 */ export const RADAR_VISITOR_EVENT = 'radar.visitor' as const; +/** 高停留阈值:3 分钟 */ +export const HOT_RADAR_STAY_MS = 180000; + +/** 高意向浏览块数量 */ +export const HOT_RADAR_BLOCK_COUNT = 3; + +export function isHotRadarPush(track: { + stayDurationMs?: number; + viewedBlocks?: string[] | null; +}): boolean { + const stay = Number(track?.stayDurationMs) || 0; + const blocks = Array.isArray(track?.viewedBlocks) + ? track.viewedBlocks.length + : 0; + return stay >= HOT_RADAR_STAY_MS || blocks >= HOT_RADAR_BLOCK_COUNT; +} + /** * 内存渠道投递载荷。 * 仅描述访客足迹摘要,不表示已推送到真实设备。 diff --git a/backend/src/modules/crm/service/radar.ts b/backend/src/modules/crm/service/radar.ts index 6b9b52d..f7a6025 100644 --- a/backend/src/modules/crm/service/radar.ts +++ b/backend/src/modules/crm/service/radar.ts @@ -4,6 +4,10 @@ import { InjectEntityModel } from '@midwayjs/typeorm'; import { Repository } from 'typeorm'; import { CrmTrackEntity } from '../entity/track'; import { CrmLeadEntity } from '../entity/lead'; +import { CardInfoEntity } from '../../card/entity/info'; +import { CrmRadarBufferService } from './buffer'; +import { CrmRadarPushService, isHotRadarPush } from './push'; +import { RadarHotInbox, RadarTrack } from '../../../comm/types/omni'; import { LeadStatus, TouchType, @@ -212,6 +216,15 @@ export class CrmRadarService extends BaseService { @InjectEntityModel(CrmLeadEntity) crmLeadEntity: Repository; + @InjectEntityModel(CardInfoEntity) + cardInfoEntity: Repository; + + @Inject() + crmRadarBufferService: CrmRadarBufferService; + + @Inject() + crmRadarPushService: CrmRadarPushService; + @Inject() ctx: any; @@ -268,7 +281,10 @@ export class CrmRadarService extends BaseService { /** * 记录访客轨迹并解析地理位置 */ - async recordTrack(data: RecordTrackDTO): Promise { + async recordTrack( + data: RecordTrackDTO, + options?: { asyncQueue?: boolean } + ): Promise { if (!data || !data.cardId) { throw new CoolCommException('缺少名片标识 cardId', 400); } @@ -333,11 +349,64 @@ export class CrmRadarService extends BaseService { track.stayDurationMs = stayDurationMs; track.scrollDepth = scrollDepth; track.viewedBlocks = viewedBlocks; - if (data.tenantId) { - track.tenantId = Number(data.tenantId); + let tenantId = data.tenantId ? Number(data.tenantId) : undefined; + if (!tenantId && this.cardInfoEntity && data.cardId) { + try { + const card = await this.cardInfoEntity.findOne({ + where: { id: Number(data.cardId) }, + }); + if (card?.tenantId) { + tenantId = Number(card.tenantId); + } + } catch { + // 容错保护 + } } - return await this.crmTrackEntity.save(track); + if (tenantId) { + track.tenantId = tenantId; + } + + if (options?.asyncQueue && this.crmRadarBufferService) { + await this.crmRadarBufferService.enqueue(track); + return track; + } + + const saved = await this.crmTrackEntity.save(track); + this.publishHotRadar(saved); + return saved; + } + + publishHotRadar(track: CrmTrackEntity): void { + if (!this.crmRadarPushService || !isHotRadarPush(track)) { + return; + } + this.crmRadarPushService.publish(track as unknown as RadarTrack); + } + + async hotInbox(ownerUserId: number): Promise { + if (!ownerUserId) { + return { unread: 0, list: [] }; + } + const cards = this.cardInfoEntity + ? await this.cardInfoEntity.find({ + where: { userId: Number(ownerUserId) }, + }) + : []; + const cardIds = new Set(cards.map(card => Number(card.id))); + if (cardIds.size === 0) { + return { unread: 0, list: [] }; + } + const tracks = await this.crmTrackEntity.find({ + order: { id: 'DESC' }, + }); + const hot = tracks.filter( + item => cardIds.has(Number(item.cardId)) && isHotRadarPush(item) + ); + return { + unread: hot.length, + list: hot.slice(0, 3) as unknown as RadarTrack[], + }; } /** @@ -384,6 +453,46 @@ export class CrmRadarService extends BaseService { * 按国家聚合访客数、占比与平均停留时长 */ async getCountryDistribution(cardId?: number): Promise { + const qb = + this.crmTrackEntity && typeof this.crmTrackEntity.createQueryBuilder === 'function' + ? this.crmTrackEntity.createQueryBuilder('track') + : null; + + if (qb) { + qb.select("COALESCE(NULLIF(TRIM(track.country), ''), 'Unknown')", 'country') + .addSelect('COUNT(*)', 'visitorCount') + .addSelect('ROUND(AVG(COALESCE(track.stay_duration_ms, 0)))', 'avgStayDurationMs') + .groupBy("COALESCE(NULLIF(TRIM(track.country), ''), 'Unknown')"); + + if (cardId !== undefined && cardId !== null && !isNaN(Number(cardId))) { + qb.where('track.card_id = :cardId', { cardId: Number(cardId) }); + } + + const raw = await qb.getRawMany(); + if (!raw || raw.length === 0) { + return []; + } + + let totalVisitors = 0; + for (const item of raw) { + totalVisitors += Number(item.visitorCount) || 0; + } + + const result: CountryDistributionItem[] = raw.map(item => { + const count = Number(item.visitorCount) || 0; + const percentage = totalVisitors > 0 ? Number(((count / totalVisitors) * 100).toFixed(1)) : 0; + return { + country: String(item.country || 'Unknown').trim(), + visitorCount: count, + percentage, + avgStayDurationMs: Math.round(Number(item.avgStayDurationMs) || 0), + }; + }); + + result.sort((a, b) => b.visitorCount - a.visitorCount); + return result; + } + const where: any = {}; if (cardId !== undefined && cardId !== null && !isNaN(Number(cardId))) { where.cardId = Number(cardId); diff --git a/backend/src/modules/nfc/controller/admin/device.ts b/backend/src/modules/nfc/controller/admin/device.ts index c7f160e..15fe821 100644 --- a/backend/src/modules/nfc/controller/admin/device.ts +++ b/backend/src/modules/nfc/controller/admin/device.ts @@ -18,9 +18,14 @@ export const adminNfcDeviceCurdOption = { entity: NfcDeviceEntity, service: NfcDeviceService, pageQueryOp: { - keyWordLikeFields: ['a.uid', 'a.batchNo'], - fieldEq: ['a.status', 'a.material', 'a.cardId', 'a.sceneMode'], - addOrderBy: { updateTime: 'desc' as const }, + keyWordLikeFields: ['a.uid', 'a.batch_no'], + fieldEq: [ + 'a.status', + 'a.material', + { column: 'a.card_id', requestParam: 'cardId' }, + { column: 'a.scene_mode', requestParam: 'sceneMode' }, + ], + addOrderBy: { update_time: 'desc' as const }, }, }; diff --git a/backend/src/modules/nfc/controller/admin/rule.ts b/backend/src/modules/nfc/controller/admin/rule.ts index 0d1e2e0..24c95ae 100644 --- a/backend/src/modules/nfc/controller/admin/rule.ts +++ b/backend/src/modules/nfc/controller/admin/rule.ts @@ -12,7 +12,13 @@ export const adminNfcRuleCurdOption = { entity: NfcRuleEntity, service: NfcRuleService, pageQueryOp: { - fieldEq: ['a.deviceId', 'a.enabled', 'a.sceneMode', 'a.countryCode'], + fieldEq: [ + { column: 'a.device_id', requestParam: 'deviceId' }, + 'a.enabled', + { column: 'a.scene_mode', requestParam: 'sceneMode' }, + { column: 'a.country_code', requestParam: 'countryCode' }, + ], + addOrderBy: { update_time: 'desc' as const }, }, serviceApis: [ { method: 'resolveScene', summary: '解析当前触卡场景路由' }, diff --git a/backend/src/modules/plugin/controller/admin/info.ts b/backend/src/modules/plugin/controller/admin/info.ts index 23038a4..e9d7cdb 100644 --- a/backend/src/modules/plugin/controller/admin/info.ts +++ b/backend/src/modules/plugin/controller/admin/info.ts @@ -27,8 +27,8 @@ import { PluginService } from '../../service/info'; 'a.description', 'a.pluginJson', 'a.config', - 'a.createTime', - 'a.updateTime', + 'a.create_time as createTime', + 'a.update_time as updateTime', ], addOrderBy: { id: 'DESC', diff --git a/backend/src/modules/team/controller/admin/brand.ts b/backend/src/modules/team/controller/admin/brand.ts index 8512b95..4c298f4 100644 --- a/backend/src/modules/team/controller/admin/brand.ts +++ b/backend/src/modules/team/controller/admin/brand.ts @@ -12,8 +12,8 @@ export const adminTeamBrandCurdOption = { entity: TeamBrandEntity, service: TeamBrandService, pageQueryOp: { - keyWordLikeFields: ['a.companyName'], - addOrderBy: { updateTime: 'desc' as const }, + keyWordLikeFields: ['a.company_name'], + addOrderBy: { update_time: 'desc' as const }, }, }; diff --git a/backend/src/modules/team/controller/admin/domain.ts b/backend/src/modules/team/controller/admin/domain.ts index 72e36e1..642e1b9 100644 --- a/backend/src/modules/team/controller/admin/domain.ts +++ b/backend/src/modules/team/controller/admin/domain.ts @@ -21,9 +21,9 @@ export const adminTeamDomainCurdOption = { { method: 'bind', summary: '绑定独立域名' }, ], pageQueryOp: { - keyWordLikeFields: ['a.customDomain'], - fieldEq: ['a.sslStatus'], - addOrderBy: { updateTime: 'desc' as const }, + keyWordLikeFields: ['a.custom_domain'], + fieldEq: [{ column: 'a.ssl_status', requestParam: 'sslStatus' }], + addOrderBy: { update_time: 'desc' as const }, }, }; diff --git a/backend/test/comm/super-admin-guard.test.ts b/backend/test/comm/super-admin-guard.test.ts new file mode 100644 index 0000000..94489bb --- /dev/null +++ b/backend/test/comm/super-admin-guard.test.ts @@ -0,0 +1,54 @@ +import { isSuperAdminContext, assertSuperAdmin } from '../../src/comm/guard/super-admin'; +import { CoolCommException } from '@cool-midway/core'; + +describe('后端权限隔离 - 平台超级管理员专属守卫 (Super Admin Guard TDD)', () => { + describe('1. isSuperAdminContext 身份研判', () => { + it('username 为 admin 的系统初始超管应判定为 true', () => { + const ctx = { admin: { username: 'admin', userId: 1 } }; + expect(isSuperAdminContext(ctx)).toBe(true); + }); + + it('携带 isSuper: true 标识的平台超级管理员应判定为 true', () => { + const ctx = { admin: { username: 'root_operator', isSuper: true, userId: 2 } }; + expect(isSuperAdminContext(ctx)).toBe(true); + }); + + it('角色包含 admin 标签的管理员应判定为 true', () => { + const ctx = { admin: { username: 'ops_manager', roleLabels: ['admin', 'ops'], userId: 3 } }; + expect(isSuperAdminContext(ctx)).toBe(true); + }); + + it('普通企业租户账号应判定为 false', () => { + const ctx = { admin: { username: 'vanguard_owner', tenantId: 1, roleLabels: ['tenant_owner'], userId: 10 } }; + expect(isSuperAdminContext(ctx)).toBe(false); + }); + + it('租户下的一线业务员应判定为 false', () => { + const ctx = { admin: { username: 'sales_tom', tenantId: 1, roleLabels: ['sales_rep'], userId: 25 } }; + expect(isSuperAdminContext(ctx)).toBe(false); + }); + + it('缺失 admin 上下文或未登录状态应判定为 false', () => { + expect(isSuperAdminContext({})).toBe(false); + expect(isSuperAdminContext({ admin: null })).toBe(false); + }); + }); + + describe('2. assertSuperAdmin 越权拦截断言', () => { + it('超级管理员访问时不应抛出异常', () => { + const ctx = { admin: { username: 'admin' } }; + expect(() => assertSuperAdmin(ctx)).not.toThrow(); + }); + + it('非超级管理员访问时必须抛出 403 CoolCommException 阻止越权', () => { + const ctx = { admin: { username: 'tenant_user', tenantId: 2 } }; + expect(() => assertSuperAdmin(ctx)).toThrow(CoolCommException); + try { + assertSuperAdmin(ctx); + } catch (err: any) { + expect(err.status || err.code).toBe(403); + expect(err.message).toContain('权限不足'); + } + }); + }); +}); diff --git a/backend/test/modules/admin/admin-sql-columns.test.ts b/backend/test/modules/admin/admin-sql-columns.test.ts new file mode 100644 index 0000000..909c3d9 --- /dev/null +++ b/backend/test/modules/admin/admin-sql-columns.test.ts @@ -0,0 +1,197 @@ +import { adminCardInfoCurdOption } from '../../../src/modules/card/controller/admin/info'; +import { adminCardCasesCurdOption } from '../../../src/modules/card/controller/admin/cases'; +import { adminCardArticleCurdOption } from '../../../src/modules/card/controller/admin/article'; +import { adminCardBentoCurdOption } from '../../../src/modules/card/controller/admin/bento'; +import { adminCardLocaleCurdOption } from '../../../src/modules/card/controller/admin/locale'; +import { AdminCrmLeadController } from '../../../src/modules/crm/controller/admin/lead'; +import { AdminCrmRadarController } from '../../../src/modules/crm/controller/admin/radar'; +import { adminNfcDeviceCurdOption } from '../../../src/modules/nfc/controller/admin/device'; +import { adminNfcRuleCurdOption } from '../../../src/modules/nfc/controller/admin/rule'; +import { adminAiKnowledgeCurdOption } from '../../../src/modules/ai/controller/admin/knowledge'; +import { adminAiGlossaryCurdOption } from '../../../src/modules/ai/controller/admin/glossary'; +import { adminAiConciergeCurdOption } from '../../../src/modules/ai/controller/admin/concierge'; +import { adminTeamBrandCurdOption } from '../../../src/modules/team/controller/admin/brand'; +import { adminTeamDomainCurdOption } from '../../../src/modules/team/controller/admin/domain'; +import { BaseAuditLogController } from '../../../src/modules/base/controller/admin/audit'; +import { AiConciergeService } from '../../../src/modules/ai/service/concierge'; +import { getClassMetadata, CONTROLLER_KEY } from '@midwayjs/core'; + +describe('Admin Controllers & Services SQL Column Matching', () => { + describe('1. Controller pageQueryOp SQL 列名必须与 MySQL 物理表字段一致', () => { + it('Card Info pageQueryOp 应使用 update_time 与 theme_code', () => { + expect(adminCardInfoCurdOption.pageQueryOp.addOrderBy).toEqual({ update_time: 'desc' }); + expect(adminCardInfoCurdOption.pageQueryOp.fieldEq).toEqual( + expect.arrayContaining(['a.status', { column: 'a.theme_code', requestParam: 'themeCode' }]) + ); + }); + + it('Card Cases pageQueryOp 应使用 sort_order 与 card_id', () => { + expect(adminCardCasesCurdOption.pageQueryOp.addOrderBy).toEqual({ sort_order: 'asc' }); + expect(adminCardCasesCurdOption.pageQueryOp.fieldEq).toEqual( + expect.arrayContaining([{ column: 'a.card_id', requestParam: 'cardId' }]) + ); + }); + + it('Card Article pageQueryOp 应使用 update_time, card_id 与 is_published', () => { + expect(adminCardArticleCurdOption.pageQueryOp.addOrderBy).toEqual({ update_time: 'desc' }); + expect(adminCardArticleCurdOption.pageQueryOp.fieldEq).toEqual( + expect.arrayContaining([ + { column: 'a.card_id', requestParam: 'cardId' }, + { column: 'a.is_published', requestParam: 'isPublished' }, + ]) + ); + }); + + it('Card Bento pageQueryOp 应使用 sort_order 与 card_id', () => { + expect(adminCardBentoCurdOption.pageQueryOp.addOrderBy).toEqual({ sort_order: 'asc' }); + expect(adminCardBentoCurdOption.pageQueryOp.fieldEq).toEqual( + expect.arrayContaining([{ column: 'a.card_id', requestParam: 'cardId' }, 'a.type', 'a.status']) + ); + }); + + it('Card Locale pageQueryOp 应使用 card_id', () => { + expect(adminCardLocaleCurdOption.pageQueryOp.fieldEq).toEqual( + expect.arrayContaining([{ column: 'a.card_id', requestParam: 'cardId' }, 'a.locale']) + ); + }); + + it('CRM Lead pageQueryOp 应使用 create_time 与 card_id', () => { + const option = getClassMetadata(CONTROLLER_KEY, AdminCrmLeadController).curdOption; + expect(option.pageQueryOp.addOrderBy).toEqual({ create_time: 'desc' }); + expect(option.pageQueryOp.fieldEq).toEqual( + expect.arrayContaining(['a.status', 'a.source', { column: 'a.card_id', requestParam: 'cardId' }]) + ); + }); + + it('CRM Radar pageQueryOp 应使用 visitor_id 与 card_id, touch_type', () => { + const option = getClassMetadata(CONTROLLER_KEY, AdminCrmRadarController).curdOption; + expect(option.pageQueryOp.keyWordLikeFields).toEqual( + expect.arrayContaining(['a.country', 'a.city', 'a.visitor_id', 'a.ip']) + ); + expect(option.pageQueryOp.fieldEq).toEqual( + expect.arrayContaining([ + { column: 'a.card_id', requestParam: 'cardId' }, + { column: 'a.touch_type', requestParam: 'touchType' }, + 'a.country', + ]) + ); + }); + + it('NFC Device pageQueryOp 应使用 update_time, batch_no, card_id, scene_mode', () => { + expect(adminNfcDeviceCurdOption.pageQueryOp.addOrderBy).toEqual({ update_time: 'desc' }); + expect(adminNfcDeviceCurdOption.pageQueryOp.keyWordLikeFields).toEqual( + expect.arrayContaining(['a.uid', 'a.batch_no']) + ); + expect(adminNfcDeviceCurdOption.pageQueryOp.fieldEq).toEqual( + expect.arrayContaining([ + 'a.status', + 'a.material', + { column: 'a.card_id', requestParam: 'cardId' }, + { column: 'a.scene_mode', requestParam: 'sceneMode' }, + ]) + ); + }); + + it('NFC Rule pageQueryOp 应使用 update_time, device_id, scene_mode, country_code', () => { + expect((adminNfcRuleCurdOption.pageQueryOp as any).addOrderBy).toEqual({ update_time: 'desc' }); + expect((adminNfcRuleCurdOption.pageQueryOp as any).fieldEq).toEqual( + expect.arrayContaining([ + { column: 'a.device_id', requestParam: 'deviceId' }, + 'a.enabled', + { column: 'a.scene_mode', requestParam: 'sceneMode' }, + { column: 'a.country_code', requestParam: 'countryCode' }, + ]) + ); + }); + + it('AI Knowledge pageQueryOp 应使用 update_time 与 card_id', () => { + expect(adminAiKnowledgeCurdOption.pageQueryOp.addOrderBy).toEqual({ update_time: 'desc' }); + expect(adminAiKnowledgeCurdOption.pageQueryOp.fieldEq).toEqual( + expect.arrayContaining([{ column: 'a.card_id', requestParam: 'cardId' }, 'a.locale']) + ); + }); + + it('AI Glossary pageQueryOp 应使用 update_time, source_term, target_term, source_lang, target_lang', () => { + expect(adminAiGlossaryCurdOption.pageQueryOp.addOrderBy).toEqual({ update_time: 'desc' }); + expect(adminAiGlossaryCurdOption.pageQueryOp.keyWordLikeFields).toEqual( + expect.arrayContaining(['a.source_term', 'a.target_term', 'a.notes']) + ); + expect(adminAiGlossaryCurdOption.pageQueryOp.fieldEq).toEqual( + expect.arrayContaining([ + { column: 'a.source_lang', requestParam: 'sourceLang' }, + { column: 'a.target_lang', requestParam: 'targetLang' }, + 'a.domain', + ]) + ); + }); + + it('AI Concierge pageQueryOp 应使用 update_time, card_id, persona_type, is_enabled', () => { + expect((adminAiConciergeCurdOption.pageQueryOp as any).addOrderBy).toEqual({ update_time: 'desc' }); + expect((adminAiConciergeCurdOption.pageQueryOp as any).fieldEq).toEqual( + expect.arrayContaining([ + { column: 'a.card_id', requestParam: 'cardId' }, + { column: 'a.persona_type', requestParam: 'personaType' }, + { column: 'a.is_enabled', requestParam: 'isEnabled' }, + ]) + ); + }); + + it('Team Brand pageQueryOp 应使用 update_time 与 company_name', () => { + expect(adminTeamBrandCurdOption.pageQueryOp.addOrderBy).toEqual({ update_time: 'desc' }); + expect(adminTeamBrandCurdOption.pageQueryOp.keyWordLikeFields).toEqual( + expect.arrayContaining(['a.company_name']) + ); + }); + + it('Team Domain pageQueryOp 应使用 update_time, custom_domain 与 ssl_status', () => { + expect(adminTeamDomainCurdOption.pageQueryOp.addOrderBy).toEqual({ update_time: 'desc' }); + expect(adminTeamDomainCurdOption.pageQueryOp.keyWordLikeFields).toEqual( + expect.arrayContaining(['a.custom_domain']) + ); + expect(adminTeamDomainCurdOption.pageQueryOp.fieldEq).toEqual( + expect.arrayContaining([{ column: 'a.ssl_status', requestParam: 'sslStatus' }]) + ); + }); + + it('Base Audit Log pageQueryOp 应使用 create_time 与 operator_name', () => { + const option = getClassMetadata(CONTROLLER_KEY, BaseAuditLogController).curdOption; + expect(option.pageQueryOp.addOrderBy).toEqual({ create_time: 'desc' }); + expect(option.pageQueryOp.keyWordLikeFields).toEqual( + expect.arrayContaining(['a.operator_name', 'a.action', 'a.module', 'a.ip']) + ); + }); + }); + + describe('2. AiConciergeService 健壮入参处理 (防止 NaN 导致的 SQL 语法异常)', () => { + let service: AiConciergeService; + let mockFindOneBy: jest.Mock; + + beforeEach(() => { + service = new AiConciergeService(); + mockFindOneBy = jest.fn(); + service.aiConciergeEntity = { + findOneBy: mockFindOneBy, + } as any; + }); + + it('getByCardId 支持对象入参 { cardId: 1 } 并正确提取数值', async () => { + mockFindOneBy.mockResolvedValueOnce({ + id: 10, + cardId: 1, + personaType: 'trade_expert', + welcomeMsg: 'Hello', + }); + + const result = await service.getByCardId({ cardId: 1 } as any); + expect(mockFindOneBy).toHaveBeenCalledWith({ cardId: 1 }); + expect(result.cardId).toBe(1); + }); + + it('getByCardId 遇非法 cardId 应降级返回默认预设,禁止传递 NaN 给数据库', async () => { + const result = await service.getByCardId({ cardId: NaN } as any); + expect(mockFindOneBy).not.toHaveBeenCalled(); + expect(result.personaType).toBe('trade_expert'); + expect(result.cardId).toBe(1); + }); + }); +}); diff --git a/backend/test/modules/ai/chat.test.ts b/backend/test/modules/ai/chat.test.ts index e8236fa..c5812e7 100644 --- a/backend/test/modules/ai/chat.test.ts +++ b/backend/test/modules/ai/chat.test.ts @@ -217,4 +217,75 @@ describe('T36: 名片 AI 顾问对话 (modules/ai chat)', () => { expect(methods).toContain('ask'); }); }); + + describe('4. 多租户 BYOK 与 AI 人设顾问联动', () => { + let service: AiChatService; + + beforeEach(() => { + service = new AiChatService(); + }); + + it('根据 cardId 自动回溯租户 tenantId 并透传至 chatCompletion', async () => { + const mockDeepSeek = { + isConfigured: jest.fn().mockReturnValue(true), + chatCompletion: jest.fn().mockResolvedValue('租户专用模型回复'), + }; + const mockCardRepo = { + findOne: jest.fn().mockResolvedValue({ id: 88, tenantId: 999 }), + }; + + service.deepSeekService = mockDeepSeek as any; + service.cardInfoEntity = mockCardRepo as any; + + const res = await service.ask({ + cardId: 88, + messages: [{ role: 'user', content: '您好' }], + }); + + expect(res.reply).toBe('租户专用模型回复'); + expect(mockDeepSeek.chatCompletion).toHaveBeenCalledWith( + expect.objectContaining({ + messages: expect.any(Array), + }), + expect.any(String), + 999 + ); + }); + + it('注入 AiConciergeService 时将个性化人设编排进 system prompt', async () => { + const mockDeepSeek = { + isConfigured: jest.fn().mockReturnValue(true), + chatCompletion: jest.fn().mockResolvedValue('人设定制回复'), + }; + const mockConcierge = { + getByCardId: jest.fn().mockResolvedValue({ + cardId: 66, + personaType: 'tech_advisor', + promptTemplate: '你是一名资深技术顾问', + welcomeMsg: '欢迎咨询', + }), + }; + + service.deepSeekService = mockDeepSeek as any; + service.aiConciergeService = mockConcierge as any; + + await service.ask({ + cardId: 66, + messages: [{ role: 'user', content: '系统架构是怎样的?' }], + }); + + expect(mockDeepSeek.chatCompletion).toHaveBeenCalledWith( + expect.objectContaining({ + messages: expect.arrayContaining([ + expect.objectContaining({ + role: 'system', + content: expect.stringContaining('你是一名资深技术顾问'), + }), + ]), + }), + expect.any(String), + undefined + ); + }); + }); }); diff --git a/backend/test/modules/ai/tenant-byok.test.ts b/backend/test/modules/ai/tenant-byok.test.ts new file mode 100644 index 0000000..50d1aeb --- /dev/null +++ b/backend/test/modules/ai/tenant-byok.test.ts @@ -0,0 +1,77 @@ +import { DeepSeekService } from '../../../src/modules/ai/service/deepseek'; +import { CoolCommException } from '@cool-midway/core'; + +describe('AI 智能中枢: 多租户 BYOK 配置隔离与 Token 成本风控', () => { + let service: DeepSeekService; + + beforeEach(() => { + delete process.env.DEEPSEEK_API_KEY; + delete process.env.DEEPSEEK_BASE_URL; + service = new DeepSeekService(); + }); + + describe('1. 租户专属配置隔离 (Tenant BYOK)', () => { + it('未单独配置的租户,获取配置时应优雅回退至平台公共默认配置', () => { + const tenantConfig = service.getTenantConfig(88); + expect(tenantConfig.baseUrl).toBe('https://api.deepseek.com'); + expect(tenantConfig.model).toBe('deepseek-chat'); + expect(service.hasTenantConfig(88)).toBe(false); + }); + + it('特定租户配置专属 API Key 与定制模型后,应严格与公共配置及其他租户隔离', () => { + // 租户 101 配置独立 Key (BYOK) + service.updateTenantConfig(101, { + apiKey: 'sk-tenant-101-custom-key', + model: 'deepseek-reasoner', + baseUrl: 'https://gateway.company101.com', + }); + + expect(service.hasTenantConfig(101)).toBe(true); + const config101 = service.getTenantConfig(101); + expect(config101.apiKey).toBe('sk-tenant-101-custom-key'); + expect(config101.model).toBe('deepseek-reasoner'); + expect(config101.baseUrl).toBe('https://gateway.company101.com'); + + // 租户 202 保持未受影响 + expect(service.hasTenantConfig(202)).toBe(false); + const config202 = service.getTenantConfig(202); + expect(config202.apiKey).toBeUndefined(); + expect(config202.baseUrl).toBe('https://api.deepseek.com'); + }); + }); + + describe('2. 租户 Token 消耗度量与限流风控 (Token Metering & Quota)', () => { + it('调用 recordTokenUsage 应准确累计指定租户的 Token 消耗流水', () => { + service.recordTokenUsage(101, { + promptTokens: 120, + completionTokens: 80, + totalTokens: 200, + }); + + service.recordTokenUsage(101, { + promptTokens: 50, + completionTokens: 50, + totalTokens: 100, + }); + + const usage = service.getTenantTokenUsage(101); + expect(usage.totalTokens).toBe(300); + expect(usage.promptTokens).toBe(170); + expect(usage.completionTokens).toBe(130); + expect(usage.callCount).toBe(2); + }); + + it('当租户 Token 用量超出配额上限时,assertTenantTokenQuota 必须阻断抛错', () => { + // 设置租户 101 最大配额 500 Token + service.setTenantTokenQuota(101, 500); + + service.recordTokenUsage(101, { totalTokens: 480 }); + + // 预估 10 Token,尚未超限 (490 <= 500) + expect(() => service.assertTenantTokenQuota(101, 10)).not.toThrow(); + + // 预估 30 Token,超出配额 (480 + 30 = 510 > 500) + expect(() => service.assertTenantTokenQuota(101, 30)).toThrow(CoolCommException); + }); + }); +}); diff --git a/backend/test/modules/card/admin-bento.test.ts b/backend/test/modules/card/admin-bento.test.ts index 8dc18cc..9800a84 100644 --- a/backend/test/modules/card/admin-bento.test.ts +++ b/backend/test/modules/card/admin-bento.test.ts @@ -289,8 +289,12 @@ describe('后台 Bento 画布 CRUD (Admin Card Bento CoolController)', () => { fieldEq?: string[]; addOrderBy?: Record; }; - expect(pageQueryOp.fieldEq).toEqual(['a.cardId', 'a.type', 'a.status']); - expect(pageQueryOp.addOrderBy).toEqual({ sortOrder: 'asc' }); + expect(pageQueryOp.fieldEq).toEqual([ + { column: 'a.card_id', requestParam: 'cardId' }, + 'a.type', + 'a.status', + ]); + expect(pageQueryOp.addOrderBy).toEqual({ sort_order: 'asc' }); }); it('应将 getBlocksByCardId / batchSaveLayout / toggleStatus 注册为 serviceApis', () => { diff --git a/backend/test/modules/card/admin-info.test.ts b/backend/test/modules/card/admin-info.test.ts index 722a5b2..fc45038 100644 --- a/backend/test/modules/card/admin-info.test.ts +++ b/backend/test/modules/card/admin-info.test.ts @@ -52,7 +52,7 @@ describe('后台名片 CRUD (Admin Card Info CoolController)', () => { expect.arrayContaining(['a.name']) ); expect(pageQueryOp.fieldEq).toEqual(expect.arrayContaining(['a.status'])); - expect(pageQueryOp.addOrderBy).toEqual({ updateTime: 'desc' }); + expect(pageQueryOp.addOrderBy).toEqual({ update_time: 'desc' }); }); it('insertParam 应从后台登录态写入 userId', () => { diff --git a/backend/test/modules/card/article.test.ts b/backend/test/modules/card/article.test.ts index fceb149..7ff2a2a 100644 --- a/backend/test/modules/card/article.test.ts +++ b/backend/test/modules/card/article.test.ts @@ -55,9 +55,12 @@ describe('后台博客文章与动态发布中心 (Card Article CoolController & expect.arrayContaining(['a.title', 'a.summary']) ); expect(pageQueryOp.fieldEq).toEqual( - expect.arrayContaining(['a.cardId', 'a.isPublished']) + expect.arrayContaining([ + { column: 'a.card_id', requestParam: 'cardId' }, + { column: 'a.is_published', requestParam: 'isPublished' }, + ]) ); - expect(pageQueryOp.addOrderBy).toEqual({ updateTime: 'desc' }); + expect(pageQueryOp.addOrderBy).toEqual({ update_time: 'desc' }); }); }); diff --git a/backend/test/modules/card/cases.test.ts b/backend/test/modules/card/cases.test.ts index e666e99..d24a98a 100644 --- a/backend/test/modules/card/cases.test.ts +++ b/backend/test/modules/card/cases.test.ts @@ -48,11 +48,13 @@ describe('后台出海案例作品集 (Admin Card Cases CRUD)', () => { it('pageQueryOp 应支持 a.cardId 精确筛选与 title/client/metrics 模糊搜索', () => { const pageQueryOp = adminCardCasesCurdOption.pageQueryOp; - expect(pageQueryOp.fieldEq).toEqual(expect.arrayContaining(['a.cardId'])); + expect(pageQueryOp.fieldEq).toEqual( + expect.arrayContaining([{ column: 'a.card_id', requestParam: 'cardId' }]) + ); expect(pageQueryOp.keyWordLikeFields).toEqual( expect.arrayContaining(['a.title', 'a.client', 'a.metrics']) ); - expect(pageQueryOp.addOrderBy).toMatchObject({ sortOrder: 'asc' }); + expect(pageQueryOp.addOrderBy).toMatchObject({ sort_order: 'asc' }); }); }); diff --git a/backend/test/modules/card/contact.test.ts b/backend/test/modules/card/contact.test.ts new file mode 100644 index 0000000..d909904 --- /dev/null +++ b/backend/test/modules/card/contact.test.ts @@ -0,0 +1,215 @@ +import { CardContactService } from '../../../src/modules/card/service/contact'; +import { + CardMutualExchangeService, + createMutualExchangeInvitation, +} from '../../../src/modules/card/service/mutual-exchange'; + +describe('P0 名片大厅人脉与双向互换落库', () => { + let contactService: CardContactService; + let exchangeService: CardMutualExchangeService; + let contactStore: any[]; + let leadStore: any[]; + let cardStore: any[]; + let exchangeStore: any[]; + + function createRepo(store: any[], idStart = 1) { + let seq = idStart; + return { + findOne: jest.fn(async (opts: { where?: Record }) => { + const where = opts?.where || {}; + return ( + store.find(row => + Object.keys(where).every(key => row[key] === (where as any)[key]) + ) || null + ); + }), + find: jest.fn(async (opts?: { where?: Record }) => { + const where = opts?.where || {}; + return store.filter(row => + Object.keys(where).every(key => row[key] === (where as any)[key]) + ); + }), + save: jest.fn(async (item: any) => { + if (item.id) { + const idx = store.findIndex(row => row.id === item.id); + if (idx >= 0) { + store[idx] = { ...store[idx], ...item }; + return store[idx]; + } + } + const saved = { ...item, id: item.id || seq++ }; + store.push(saved); + return saved; + }), + createQueryBuilder: jest.fn(() => { + const qb: any = { + alias: 'a', + leftJoin: jest.fn().mockReturnThis(), + addSelect: jest.fn().mockReturnThis(), + where: jest.fn().mockReturnThis(), + andWhere: jest.fn().mockReturnThis(), + orderBy: jest.fn().mockReturnThis(), + skip: jest.fn().mockReturnThis(), + take: jest.fn().mockReturnThis(), + getCount: jest.fn(async () => + store.filter(row => row.ownerUserId === 11).length + ), + getRawAndEntities: jest.fn(async () => ({ + entities: store.filter(row => row.ownerUserId === 11), + raw: [], + })), + }; + return qb; + }), + }; + } + + beforeEach(() => { + contactStore = []; + leadStore = []; + exchangeStore = []; + cardStore = [ + { + id: 101, + userId: 11, + tenantId: 1, + name: 'Alex Rivera', + title: 'VP', + company: 'OmniCard', + phone: '+8613800000001', + email: 'alex@omni.test', + slug: 'alex', + status: 'published', + }, + { + id: 202, + userId: 22, + tenantId: 2, + name: 'Tariq Mansour', + title: 'Director', + company: 'Dubai Energy', + phone: '+971501234567', + email: 'tariq@dubai.test', + slug: 'tariq', + status: 'published', + }, + { + id: 103, + userId: 33, + tenantId: 1, + name: 'Chen Wei', + title: 'Sales', + company: 'OmniCard', + phone: '+8613800000003', + email: 'chen@omni.test', + slug: 'chen-wei', + status: 'published', + }, + ]; + + contactService = new CardContactService(); + contactService.cardContactEntity = createRepo(contactStore) as any; + contactService.cardInfoEntity = createRepo(cardStore, 300) as any; + contactService.crmLeadEntity = createRepo(leadStore, 500) as any; + + exchangeService = new CardMutualExchangeService(); + exchangeService.exchangeEntity = createRepo(exchangeStore, 800) as any; + exchangeService.cardContactService = contactService; + exchangeService.cardInfoEntity = contactService.cardInfoEntity; + exchangeService.crmLeadEntity = contactService.crmLeadEntity; + }); + + it('不能把自己的名片收入自己的大厅', async () => { + await expect( + contactService.upsertContact({ + ownerUserId: 11, + ownerCardId: 101, + peerCardId: 101, + source: 'collect', + }) + ).rejects.toThrow(/不能收藏自己/); + }); + + it('收藏他人名片只写一行人脉,重复收藏复用同一行', async () => { + const first = await contactService.collect({ + ownerUserId: 11, + peerCardId: 202, + }); + const second = await contactService.collect({ + ownerUserId: 11, + peerCardId: 202, + }); + + expect(contactStore).toHaveLength(1); + expect(first.id).toBe(second.id); + expect(first.peerCardId).toBe(202); + expect(first.source).toBe('collect'); + expect(first.ownerUserId).toBe(11); + }); + + it('确认互换后双方各有一条人脉和一条线索', async () => { + const invite = await exchangeService.initiateExchange({ + senderCardId: 101, + recipientCardId: 202, + }); + expect(invite.status).toBe('REQUESTED'); + expect(exchangeStore).toHaveLength(1); + + const outcome = await exchangeService.confirmExchange(invite.id, 202); + + expect(outcome.status).toBe('ACCEPTED'); + expect(outcome.isDualSynced).toBe(true); + expect(contactStore).toHaveLength(2); + expect(leadStore).toHaveLength(2); + + const alexContact = contactStore.find(row => row.ownerUserId === 11); + const tariqContact = contactStore.find(row => row.ownerUserId === 22); + expect(alexContact.peerCardId).toBe(202); + expect(tariqContact.peerCardId).toBe(101); + expect(alexContact.source).toBe('exchange'); + + expect(leadStore.every(row => row.source === 'exchange')).toBe(true); + expect(leadStore.find(row => row.cardId === 101)?.name).toBe('Tariq Mansour'); + expect(leadStore.find(row => row.cardId === 202)?.name).toBe('Alex Rivera'); + }); + + it('大厅分页只返回当前用户的人脉', async () => { + await contactService.collect({ ownerUserId: 11, peerCardId: 202 }); + await contactService.upsertContact({ + ownerUserId: 22, + peerCardId: 101, + source: 'collect', + }); + + const page = await contactService.pageContacts({ + ownerUserId: 11, + page: 1, + size: 20, + }); + + expect(page.list).toHaveLength(1); + expect(page.list[0].peerCardId).toBe(202); + expect(page.pagination.total).toBe(1); + }); + + it('团队墙只返回同租户已发布名片,并排除自己', async () => { + const page = await contactService.pageTeamWall({ + tenantId: 1, + excludeUserId: 11, + page: 1, + size: 20, + }); + + expect(page.list).toHaveLength(1); + expect(page.list[0].peerCardId).toBe(103); + expect(page.list[0].peerName).toBe('Chen Wei'); + expect(page.list.find(row => row.peerCardId === 101)).toBeUndefined(); + expect(page.list.find(row => row.peerCardId === 202)).toBeUndefined(); + }); + + it('纯函数互换邀约仍拒绝自己与自己互换', () => { + expect(() => createMutualExchangeInvitation(101, 101)).toThrow( + /不能与自己互换/ + ); + }); +}); diff --git a/backend/test/modules/card/event.test.ts b/backend/test/modules/card/event.test.ts new file mode 100644 index 0000000..53442d0 --- /dev/null +++ b/backend/test/modules/card/event.test.ts @@ -0,0 +1,138 @@ +import { CardEventService, normalizeEventCode } from '../../../src/modules/card/service/event'; + +describe('P2 展会现场活动码与同场名片墙', () => { + let eventService: CardEventService; + let eventStore: any[]; + let memberStore: any[]; + let cardStore: any[]; + + function createRepo(store: any[], idStart = 1) { + let seq = idStart; + return { + findOne: jest.fn(async (opts: { where?: Record }) => { + const where = opts?.where || {}; + return ( + store.find(row => + Object.keys(where).every(key => row[key] === (where as any)[key]) + ) || null + ); + }), + find: jest.fn(async (opts?: { where?: Record }) => { + const where = opts?.where || {}; + return store.filter(row => + Object.keys(where).every(key => row[key] === (where as any)[key]) + ); + }), + save: jest.fn(async (item: any) => { + if (item.id) { + const idx = store.findIndex(row => row.id === item.id); + if (idx >= 0) { + store[idx] = { ...store[idx], ...item }; + return store[idx]; + } + } + const saved = { ...item, id: item.id || seq++ }; + store.push(saved); + return saved; + }), + }; + } + + beforeEach(() => { + eventStore = []; + memberStore = []; + cardStore = [ + { + id: 101, + userId: 11, + tenantId: 1, + name: 'Alex Rivera', + title: 'VP', + company: 'OmniCard', + slug: 'alex', + status: 'published', + }, + { + id: 103, + userId: 33, + tenantId: 1, + name: 'Chen Wei', + title: 'Sales', + company: 'OmniCard', + slug: 'chen-wei', + status: 'published', + }, + { + id: 202, + userId: 22, + tenantId: 2, + name: 'Tariq Mansour', + title: 'Director', + company: 'Dubai Energy', + slug: 'tariq', + status: 'published', + }, + ]; + eventService = new CardEventService(); + eventService.cardEventEntity = createRepo(eventStore) as any; + eventService.cardEventMemberEntity = createRepo(memberStore, 50) as any; + eventService.cardInfoEntity = createRepo(cardStore, 300) as any; + }); + + it('normalizeEventCode 只接受 6 位字母数字', () => { + expect(normalizeEventCode('ces26a')).toBe('CES26A'); + expect(() => normalizeEventCode('12')).toThrow(/活动码/); + expect(() => normalizeEventCode('CES-26')).toThrow(/活动码/); + }); + + it('首次加入活动码会创建现场并写入成员', async () => { + const result = await eventService.joinEvent({ + userId: 11, + code: 'ces26a', + }); + + expect(result.event.code).toBe('CES26A'); + expect(result.event.status).toBe('active'); + expect(result.member.userId).toBe(11); + expect(result.member.cardId).toBe(101); + expect(eventStore).toHaveLength(1); + expect(memberStore).toHaveLength(1); + }); + + it('同一用户重复加入同一现场只保留一行成员', async () => { + await eventService.joinEvent({ userId: 11, code: 'CES26A' }); + await eventService.joinEvent({ userId: 11, code: 'ces26a' }); + + expect(eventStore).toHaveLength(1); + expect(memberStore).toHaveLength(1); + }); + + it('现场墙只返回同场他人已发布名片', async () => { + await eventService.joinEvent({ userId: 11, code: 'CES26A' }); + await eventService.joinEvent({ userId: 33, code: 'CES26A' }); + await eventService.joinEvent({ userId: 22, code: 'GITEX1' }); + + const page = await eventService.pageEventFloor({ + userId: 11, + page: 1, + size: 20, + }); + + expect(page.list).toHaveLength(1); + expect(page.list[0].peerCardId).toBe(103); + expect(page.list[0].peerName).toBe('Chen Wei'); + expect(page.list[0].source).toBe('event'); + expect(page.list.find(row => row.peerCardId === 101)).toBeUndefined(); + expect(page.list.find(row => row.peerCardId === 202)).toBeUndefined(); + }); + + it('未加入现场时墙为空', async () => { + const page = await eventService.pageEventFloor({ + userId: 11, + page: 1, + size: 20, + }); + expect(page.list).toHaveLength(0); + expect(page.pagination.total).toBe(0); + }); +}); diff --git a/backend/test/modules/card/locale.test.ts b/backend/test/modules/card/locale.test.ts index 208c026..0f84f8c 100644 --- a/backend/test/modules/card/locale.test.ts +++ b/backend/test/modules/card/locale.test.ts @@ -361,7 +361,7 @@ describe('T17 名片内容级多语言分支 (card_locale)', () => { fieldEq?: string[]; }; expect(pageQueryOp.fieldEq).toEqual( - expect.arrayContaining(['a.cardId', 'a.locale']) + expect.arrayContaining([{ column: 'a.card_id', requestParam: 'cardId' }, 'a.locale']) ); }); diff --git a/backend/test/modules/card/quota-enforcement.test.ts b/backend/test/modules/card/quota-enforcement.test.ts new file mode 100644 index 0000000..25be95a --- /dev/null +++ b/backend/test/modules/card/quota-enforcement.test.ts @@ -0,0 +1,60 @@ +import { CardInfoService } from '../../../src/modules/card/service/info'; +import { TeamQuotaService } from '../../../src/modules/team/service/quota'; +import { CoolCommException } from '@cool-midway/core'; + +describe('商业化配额门禁: 新增名片配额校验与租户自动绑定', () => { + let cardInfoService: CardInfoService; + let mockQuotaService: any; + let mockPortalService: any; + let mockRepo: any; + + beforeEach(() => { + mockRepo = { + save: jest.fn().mockImplementation(async (item: any) => ({ id: 1, ...item })), + }; + + mockPortalService = { + clearPortalCache: jest.fn().mockResolvedValue(undefined), + }; + + mockQuotaService = { + assertQuotaAvailable: jest.fn().mockImplementation(async (tenantId: number, type: string) => { + if (tenantId === 999) { + throw new CoolCommException('当前套餐名片配额已达上限,请升级套餐', 400); + } + return { used: 1, limit: 5, exceeded: false }; + }), + }; + + cardInfoService = new CardInfoService(); + cardInfoService.cardInfoEntity = mockRepo; + cardInfoService.cardPortalService = mockPortalService; + cardInfoService.teamQuotaService = mockQuotaService; + }); + + it('当租户配额超限时,modifyBefore 新增拦截必须阻断并抛出 CoolCommException', async () => { + const cardData = { + name: '超限测试名片', + tenantId: 999, + }; + + await expect( + cardInfoService.modifyBefore(cardData, 'add') + ).rejects.toThrow(/配额/); + + expect(mockQuotaService.assertQuotaAvailable).toHaveBeenCalledWith(999, 'cards', 1); + }); + + it('当租户配额充足时,modifyBefore 新增允许通过并自动锁定 tenantId', async () => { + const cardData = { + name: '合规名片', + tenantId: 88, + }; + + await expect( + cardInfoService.modifyBefore(cardData, 'add') + ).resolves.not.toThrow(); + + expect(mockQuotaService.assertQuotaAvailable).toHaveBeenCalledWith(88, 'cards', 1); + }); +}); diff --git a/backend/test/modules/crm/admin.test.ts b/backend/test/modules/crm/admin.test.ts index 28c3bb0..ae4f355 100644 --- a/backend/test/modules/crm/admin.test.ts +++ b/backend/test/modules/crm/admin.test.ts @@ -89,8 +89,12 @@ describe('CRM 管理后台 CRUD 控制器 (admin/crm)', () => { fieldEq?: string[]; addOrderBy?: Record; }; - expect(pageQueryOp.fieldEq).toEqual(['a.status', 'a.source', 'a.cardId']); - expect(pageQueryOp.addOrderBy).toEqual({ createTime: 'desc' }); + expect(pageQueryOp.fieldEq).toEqual([ + 'a.status', + 'a.source', + { column: 'a.card_id', requestParam: 'cardId' }, + ]); + expect(pageQueryOp.addOrderBy).toEqual({ create_time: 'desc' }); }); it('应将 updateStatus 注册为 serviceApi(线索状态流转)', () => { @@ -129,13 +133,13 @@ describe('CRM 管理后台 CRUD 控制器 (admin/crm)', () => { it('分页查询应支持国家/城市/访客/IP 模糊检索', () => { const pageQueryOp = option.pageQueryOp as { keyWordLikeFields?: string[]; - fieldEq?: string[]; + fieldEq?: unknown[]; addOrderBy?: Record; }; expect(pageQueryOp.keyWordLikeFields).toEqual([ 'a.country', 'a.city', - 'a.visitorId', + 'a.visitor_id', 'a.ip', ]); }); @@ -143,12 +147,12 @@ describe('CRM 管理后台 CRUD 控制器 (admin/crm)', () => { it('分页查询应支持名片/触达方式/国家精确筛选,并按 id 倒序', () => { const pageQueryOp = option.pageQueryOp as { keyWordLikeFields?: string[]; - fieldEq?: string[]; + fieldEq?: unknown[]; addOrderBy?: Record; }; expect(pageQueryOp.fieldEq).toEqual([ - 'a.cardId', - 'a.touchType', + { column: 'a.card_id', requestParam: 'cardId' }, + { column: 'a.touch_type', requestParam: 'touchType' }, 'a.country', ]); expect(pageQueryOp.addOrderBy).toEqual({ id: 'desc' }); diff --git a/backend/test/modules/crm/radar-aggregation.test.ts b/backend/test/modules/crm/radar-aggregation.test.ts new file mode 100644 index 0000000..55f9e57 --- /dev/null +++ b/backend/test/modules/crm/radar-aggregation.test.ts @@ -0,0 +1,45 @@ +import { CrmRadarService } from '../../../src/modules/crm/service/radar'; + +describe('性能与防 OOM: 雷达国家分布与时段统计原生 SQL 聚合机制', () => { + let radarService: CrmRadarService; + let mockQb: any; + let mockTrackRepo: any; + + beforeEach(() => { + mockQb = { + select: jest.fn().mockReturnThis(), + addSelect: jest.fn().mockReturnThis(), + groupBy: jest.fn().mockReturnThis(), + where: jest.fn().mockReturnThis(), + getRawMany: jest.fn().mockResolvedValue([ + { country: 'United Arab Emirates', visitorCount: '30', avgStayDurationMs: '45000' }, + { country: 'Germany', visitorCount: '20', avgStayDurationMs: '30000' }, + { country: 'United States', visitorCount: '10', avgStayDurationMs: '20000' }, + ]), + }; + + mockTrackRepo = { + createQueryBuilder: jest.fn().mockReturnValue(mockQb), + find: jest.fn(), + }; + + radarService = new CrmRadarService(); + radarService.crmTrackEntity = mockTrackRepo; + }); + + it('getCountryDistribution 必须使用 createQueryBuilder 原生 GROUP BY 聚合,严禁全表 find 加载至内存', async () => { + const result = await radarService.getCountryDistribution(101); + + expect(mockTrackRepo.createQueryBuilder).toHaveBeenCalledWith('track'); + expect(mockQb.select).toHaveBeenCalled(); + expect(mockQb.groupBy).toHaveBeenCalled(); + expect(mockQb.where).toHaveBeenCalledWith('track.card_id = :cardId', { cardId: 101 }); + expect(mockTrackRepo.find).not.toHaveBeenCalled(); + + expect(result).toHaveLength(3); + expect(result[0].country).toBe('United Arab Emirates'); + expect(result[0].visitorCount).toBe(30); + expect(result[0].percentage).toBe(50); // 30 / 60 * 100 + expect(result[0].avgStayDurationMs).toBe(45000); + }); +}); diff --git a/backend/test/modules/crm/radar-buffer.test.ts b/backend/test/modules/crm/radar-buffer.test.ts new file mode 100644 index 0000000..5dab675 --- /dev/null +++ b/backend/test/modules/crm/radar-buffer.test.ts @@ -0,0 +1,105 @@ +import { CrmRadarBufferService } from '../../../src/modules/crm/service/buffer'; +import { CrmTrackEntity } from '../../../src/modules/crm/entity/track'; + +describe('高并发雷达削峰缓冲服务 (CrmRadarBufferService)', () => { + let bufferService: CrmRadarBufferService; + let insertedBatches: Array; + let mockTrackRepo: any; + let mockInsertQb: any; + + beforeEach(() => { + insertedBatches = []; + + mockInsertQb = { + insert: jest.fn().mockReturnThis(), + into: jest.fn().mockReturnThis(), + values: jest.fn().mockImplementation((batch: any[]) => { + insertedBatches.push([...batch]); + return mockInsertQb; + }), + execute: jest.fn().mockResolvedValue({ identifiers: [] }), + }; + + mockTrackRepo = { + createQueryBuilder: jest.fn().mockReturnValue(mockInsertQb), + save: jest.fn().mockImplementation(async (items: any[]) => { + insertedBatches.push(Array.isArray(items) ? [...items] : [items]); + return items; + }), + }; + + bufferService = new CrmRadarBufferService(); + bufferService.crmTrackEntity = mockTrackRepo; + // 单元测试中设置较小的批次阈值,禁用自动定时器 + bufferService.setBatchSize(5); + bufferService.setFlushInterval(0); // 禁用定时器以便手动可控测试 + }); + + afterEach(() => { + bufferService.stop(); + }); + + describe('1. 缓冲入队与队列状态 (Enqueue & Queue Length)', () => { + it('调用 enqueue 能够将足迹实体推入内存环形队列,且非阻塞瞬间返回', async () => { + const track: Partial = { + cardId: 101, + tenantId: 88, + visitorId: 'vis_test_001', + touchType: 'nfc', + country: 'United Arab Emirates', + }; + + const queued = await bufferService.enqueue(track as CrmTrackEntity); + expect(queued).toBe(true); + expect(bufferService.getQueueLength()).toBe(1); + // 队列未达批量阈值,尚未触发物理落盘 + expect(insertedBatches).toHaveLength(0); + }); + + it('队列到达批次阈值 (BatchSize) 时应自动触发批量 Bulk Insert 落盘', async () => { + bufferService.setBatchSize(3); + + await bufferService.enqueue({ cardId: 1, visitorId: 'v1' } as any); + await bufferService.enqueue({ cardId: 2, visitorId: 'v2' } as any); + expect(insertedBatches).toHaveLength(0); + + // 放入第 3 条达到阈值,触发自动 flush + await bufferService.enqueue({ cardId: 3, visitorId: 'v3' } as any); + + expect(insertedBatches).toHaveLength(1); + expect(insertedBatches[0]).toHaveLength(3); + expect(bufferService.getQueueLength()).toBe(0); + }); + }); + + describe('2. 手动批量落盘与关闭刷新 (Flush & Stop)', () => { + it('显式调用 flush 应将队列中剩余所有足迹一次性批量入库', async () => { + bufferService.setBatchSize(100); + + await bufferService.enqueue({ cardId: 1, visitorId: 'v1' } as any); + await bufferService.enqueue({ cardId: 2, visitorId: 'v2' } as any); + expect(bufferService.getQueueLength()).toBe(2); + + const flushedCount = await bufferService.flush(); + expect(flushedCount).toBe(2); + expect(bufferService.getQueueLength()).toBe(0); + expect(insertedBatches).toHaveLength(1); + expect(insertedBatches[0][0].visitorId).toBe('v1'); + expect(insertedBatches[0][1].visitorId).toBe('v2'); + }); + + it('空队列调用 flush 应安全返回 0 且不执行数据库写入', async () => { + const flushedCount = await bufferService.flush(); + expect(flushedCount).toBe(0); + expect(insertedBatches).toHaveLength(0); + }); + + it('调用 stop 应清除内部定时器并把剩余积攒数据完全 flush', async () => { + await bufferService.enqueue({ cardId: 99, visitorId: 'v_exit' } as any); + bufferService.stop(); + + expect(insertedBatches).toHaveLength(1); + expect(bufferService.getQueueLength()).toBe(0); + }); + }); +}); diff --git a/backend/test/modules/crm/tenant-lead-track.test.ts b/backend/test/modules/crm/tenant-lead-track.test.ts new file mode 100644 index 0000000..d3f45e5 --- /dev/null +++ b/backend/test/modules/crm/tenant-lead-track.test.ts @@ -0,0 +1,91 @@ +import { CrmLeadService } from '../../../src/modules/crm/service/lead'; +import { CrmRadarService } from '../../../src/modules/crm/service/radar'; +import { CardInfoEntity } from '../../../src/modules/card/entity/info'; +import { CrmLeadEntity } from '../../../src/modules/crm/entity/lead'; +import { CrmTrackEntity } from '../../../src/modules/crm/entity/track'; + +describe('多租户安全闭环: 公开留资与雷达足迹自动绑定名片所属租户', () => { + let leadService: CrmLeadService; + let radarService: CrmRadarService; + + const mockCard: Partial = { + id: 101, + tenantId: 88, + userId: 12, + name: '测试名片', + }; + + let mockCardRepo: any; + let mockLeadRepo: any; + let mockTrackRepo: any; + + beforeEach(() => { + mockCardRepo = { + findOne: jest.fn().mockImplementation(async ({ where }: any) => { + if (where?.id === 101) { + return { ...mockCard }; + } + return null; + }), + }; + + mockLeadRepo = { + save: jest.fn().mockImplementation(async (item: any) => { + return { id: 1, ...item }; + }), + }; + + mockTrackRepo = { + save: jest.fn().mockImplementation(async (item: any) => { + return { id: 1, ...item }; + }), + }; + + leadService = new CrmLeadService(); + leadService.crmLeadEntity = mockLeadRepo; + leadService.cardInfoEntity = mockCardRepo; + + radarService = new CrmRadarService(); + radarService.crmTrackEntity = mockTrackRepo; + radarService.cardInfoEntity = mockCardRepo; + }); + + describe('1. CrmLeadService.submitLead 租户自动继承', () => { + it('公开留资未显式传入 tenantId 时,必须根据 cardId 自动追溯绑定归属名片的 tenantId 和 userId', async () => { + const lead = await leadService.submitLead({ + cardId: 101, + name: '海外采购商', + phone: '+971-50-9876543', + company: 'Dubai Trading LLC', + }); + + expect(mockCardRepo.findOne).toHaveBeenCalledWith({ where: { id: 101 } }); + expect(lead.tenantId).toBe(88); + expect(lead.userId).toBe(12); + }); + + it('若显式指定了有效 tenantId,则应保持显式值', async () => { + const lead = await leadService.submitLead({ + cardId: 101, + tenantId: 999, + name: '海外采购商', + phone: '+971-50-9876543', + } as any); + + expect(lead.tenantId).toBe(999); + }); + }); + + describe('2. CrmRadarService.recordTrack 租户自动继承', () => { + it('公开雷达足迹未传入 tenantId 时,必须根据 cardId 自动补齐名片所属 tenantId', async () => { + const track = await radarService.recordTrack({ + cardId: 101, + ip: '8.8.8.8', + touchType: 'nfc', + }); + + expect(mockCardRepo.findOne).toHaveBeenCalledWith({ where: { id: 101 } }); + expect(track.tenantId).toBe(88); + }); + }); +}); diff --git a/backend/test/modules/nfc/device.test.ts b/backend/test/modules/nfc/device.test.ts index 1d34fe7..97a7b55 100644 --- a/backend/test/modules/nfc/device.test.ts +++ b/backend/test/modules/nfc/device.test.ts @@ -395,17 +395,17 @@ describe('T21 NFC 设备台账 (nfc_device)', () => { addOrderBy?: Record; }; expect(pageQueryOp.keyWordLikeFields).toEqual( - expect.arrayContaining(['a.uid', 'a.batchNo']) + expect.arrayContaining(['a.uid', 'a.batch_no']) ); expect(pageQueryOp.fieldEq).toEqual( expect.arrayContaining([ 'a.status', 'a.material', - 'a.cardId', - 'a.sceneMode', + { column: 'a.card_id', requestParam: 'cardId' }, + { column: 'a.scene_mode', requestParam: 'sceneMode' }, ]) ); - expect(pageQueryOp.addOrderBy).toEqual({ updateTime: 'desc' }); + expect(pageQueryOp.addOrderBy).toEqual({ update_time: 'desc' }); }); }); }); diff --git a/backend/test/modules/nfc/rule.test.ts b/backend/test/modules/nfc/rule.test.ts index 64017ea..69eff49 100644 --- a/backend/test/modules/nfc/rule.test.ts +++ b/backend/test/modules/nfc/rule.test.ts @@ -425,14 +425,14 @@ describe('T23 NFC 场景路由规则 (nfc_rule)', () => { it('pageQueryOp.fieldEq 应支持 deviceId/enabled/sceneMode/countryCode', () => { const pageQueryOp = option.pageQueryOp as { - fieldEq?: string[]; + fieldEq?: any[]; }; expect(pageQueryOp.fieldEq).toEqual( expect.arrayContaining([ - 'a.deviceId', + { column: 'a.device_id', requestParam: 'deviceId' }, 'a.enabled', - 'a.sceneMode', - 'a.countryCode', + { column: 'a.scene_mode', requestParam: 'sceneMode' }, + { column: 'a.country_code', requestParam: 'countryCode' }, ]) ); }); diff --git a/backend/test/mpuniapp/deeplink-router.test.ts b/backend/test/mpuniapp/deeplink-router.test.ts index f82b06f..3d1c00e 100644 --- a/backend/test/mpuniapp/deeplink-router.test.ts +++ b/backend/test/mpuniapp/deeplink-router.test.ts @@ -51,7 +51,7 @@ describe('Point 56: 移动端 App / H5 出海名片 Universal Link 深度链接 ); const targetRoute = router.buildAppPageRoute(parsed); - expect(targetRoute).toContain('/pages/card/portal'); + expect(targetRoute).toContain('/pages/portal/index'); expect(targetRoute).toContain('slug=alex'); expect(targetRoute).toContain('scene=exhibition'); expect(targetRoute).toContain('lang=ar'); @@ -60,7 +60,7 @@ describe('Point 56: 移动端 App / H5 出海名片 Universal Link 深度链接 it('无效解析对象应安全回退至名片主页', () => { const fallback = router.buildAppPageRoute({ isValid: false }); - expect(fallback).toBe('/pages/owner/home'); + expect(fallback).toBe('/pages/owner/hall/index'); }); }); }); diff --git a/backend/test/mpuniapp/login.test.ts b/backend/test/mpuniapp/login.test.ts index a1063a9..245749a 100644 --- a/backend/test/mpuniapp/login.test.ts +++ b/backend/test/mpuniapp/login.test.ts @@ -25,7 +25,9 @@ type UniRequestOption = { }; type LoginState = { - tab: 'phone' | 'email'; + tab: 'password' | 'phone' | 'email'; + username: string; + password: string; countryCode: string; phone: string; smsCode: string; @@ -38,12 +40,14 @@ type LoginState = { type UseLoginModule = { createLoginState: () => LoginState; completeLogin: (token: string, tenantId?: string) => boolean; + submitPasswordLogin: (state: LoginState) => Promise; submitPhoneLogin: (state: LoginState) => boolean; sendMagicLink: (state: LoginState) => boolean; sendSmsCode: (state: LoginState) => boolean; tapSocialLogin: (provider: 'google' | 'apple') => void; resolveLoginText: (key: string) => string; tickCountdown: (state: LoginState) => void; + fillTestAccount: (state: LoginState) => void; }; describe('OmniCard AI 用户端统一登录业务逻辑测试 (useLogin.uts)', () => { @@ -220,4 +224,118 @@ describe('OmniCard AI 用户端统一登录业务逻辑测试 (useLogin.uts)', ( expect(state.countdown).toBe(59); }); }); + + describe('6. 账号密码真实登录与前后端对齐', () => { + it('6.1 空账号或空密码不提交', async () => { + const { createLoginState, submitPasswordLogin } = loadUseLogin(); + + const state = createLoginState(); + state.username = ''; + state.password = ''; + + const ok = await submitPasswordLogin(state); + + expect(ok).toBe(false); + expect(storageMap.has('token')).toBe(false); + expect(requestCallCount).toBe(0); + expect(toastCalls.length).toBeGreaterThan(0); + expect(toastCalls[0].title).toContain('账号'); + + // 仅有账号没有密码 + state.username = 'admin'; + state.password = ''; + const ok2 = await submitPasswordLogin(state); + expect(ok2).toBe(false); + expect(storageMap.has('token')).toBe(false); + expect(toastCalls[toastCalls.length - 1].title).toContain('密码'); + }); + + it('6.2 账号密码登录成功:对齐 /admin/base/open/login 接口契约,写入 token 并跳转', async () => { + const { createLoginState, submitPasswordLogin } = loadUseLogin(); + + const state = createLoginState(); + state.username = 'admin'; + state.password = '123456'; + + // 模拟 uni.request 响应 Cool-Admin 成功契约 + (global as { uni?: Record }).uni!.request = (options: UniRequestOption) => { + requestCallCount += 1; + lastRequestOptions = options; + setTimeout(() => { + options.success?.({ + statusCode: 200, + data: { + code: 1000, + message: 'success', + data: { + token: 'mock_admin_jwt_token_2026', + expire: 7200, + refreshToken: 'mock_refresh_token', + }, + }, + header: {}, + }); + options.complete?.(); + }, 0); + return { abort: jest.fn() }; + }; + + const ok = await submitPasswordLogin(state); + + expect(ok).toBe(true); + expect(storageMap.get('token')).toBe('mock_admin_jwt_token_2026'); + expect(switchTabCount).toBe(1); + expect(lastRequestOptions?.url).toContain('/admin/base/open/login'); + expect(lastRequestOptions?.data).toEqual({ + username: 'admin', + password: '123456', + }); + }); + + it('6.3 账号密码登录失败:后端返回 1001 时正确提示错误并置错误信息', async () => { + const { createLoginState, submitPasswordLogin } = loadUseLogin(); + + const state = createLoginState(); + state.username = 'admin'; + state.password = 'wrong_password'; + + (global as { uni?: Record }).uni!.request = (options: UniRequestOption) => { + requestCallCount += 1; + lastRequestOptions = options; + setTimeout(() => { + options.success?.({ + statusCode: 200, + data: { + code: 1001, + message: '账户或密码不正确~', + }, + header: {}, + }); + options.complete?.(); + }, 0); + return { abort: jest.fn() }; + }; + + const ok = await submitPasswordLogin(state); + + expect(ok).toBe(false); + expect(storageMap.has('token')).toBe(false); + expect(switchTabCount).toBe(0); + expect(state.errorMessage).toBe('账户或密码不正确~'); + expect(toastCalls[toastCalls.length - 1].title).toBe('账户或密码不正确~'); + }); + + it('6.4 一键填入测试账号便于快速验证', () => { + const { createLoginState, fillTestAccount } = loadUseLogin(); + + const state = createLoginState(); + expect(state.username).toBe(''); + expect(state.password).toBe(''); + + fillTestAccount(state); + + expect(state.username).toBe('admin'); + expect(state.password).toBe('123456'); + }); + }); }); diff --git a/backend/test/mpuniapp/owner-hall.test.ts b/backend/test/mpuniapp/owner-hall.test.ts new file mode 100644 index 0000000..f2097eb --- /dev/null +++ b/backend/test/mpuniapp/owner-hall.test.ts @@ -0,0 +1,136 @@ +/** + * OmniCard AI - 名片大厅人脉驱动层测试 + */ + +import * as fs from 'fs'; +import * as path from 'path'; + +const HALL_PAGE = path.resolve( + __dirname, + '../../../mpuniapp/pages/owner/hall/index.uvue' +); +const HALL_UTS = path.resolve( + __dirname, + '../../../mpuniapp/pages/owner/hall/useHall.uts' +); + +describe('OmniCard AI 名片大厅 (useHall.uts)', () => { + function loadHall() { + jest.resetModules(); + const storage = new Map(); + (global as { uni?: Record }).uni = { + getLocale: () => 'zh-CN', + navigateTo: jest.fn(), + setStorageSync: (key: string, val: string) => storage.set(key, val), + getStorageSync: (key: string) => storage.get(key) || '', + removeStorageSync: (key: string) => storage.delete(key), + }; + // eslint-disable-next-line @typescript-eslint/no-require-imports + return require('../../../mpuniapp/pages/owner/hall/useHall.uts'); + } + + it('toHallItem 映射对方名片摘要', () => { + const { toHallItem } = loadHall(); + const item = toHallItem({ + id: 9, + ownerUserId: 11, + peerCardId: 202, + source: 'exchange', + peerName: 'Tariq Mansour', + peerCompany: 'Dubai Energy', + peerSlug: 'tariq', + }); + expect(item.peerCardId).toBe(202); + expect(item.peerName).toBe('Tariq Mansour'); + expect(item.peerSlug).toBe('tariq'); + }); + + it('未登录带走名片会写入待收藏,登录后可消费', () => { + const { setPendingCollectCard, consumePendingCollectCard } = loadHall(); + setPendingCollectCard(202); + expect(consumePendingCollectCard()).toBe('202'); + expect(consumePendingCollectCard()).toBe(''); + }); + + it('buildHallPortalUrl 优先使用 slug', () => { + const { buildHallPortalUrl } = loadHall(); + expect( + buildHallPortalUrl({ + peerCardId: 202, + peerName: 'Tariq', + peerSlug: 'tariq', + }) + ).toBe('/pages/portal/index?slug=tariq'); + expect( + buildHallPortalUrl({ + peerCardId: 202, + peerName: 'Tariq', + }) + ).toBe('/pages/portal/index?id=202'); + }); + + it('团队分段走 teamWall 接口', async () => { + const { createHallState, applyHallTab, refreshHall } = loadHall(); + const state = createHallState(); + applyHallTab(state, 'team'); + let usedTeam = false; + await refreshHall(state, { + fetchHallContactPage: async () => ({ + list: [], + pagination: { page: 1, size: 20, total: 0 }, + }), + fetchTeamWallPage: async () => { + usedTeam = true; + return { + list: [ + { + ownerUserId: 11, + peerCardId: 103, + source: 'collect', + peerName: 'Chen Wei', + }, + ], + pagination: { page: 1, size: 20, total: 1 }, + }; + }, + }); + expect(usedTeam).toBe(true); + expect(state.tab).toBe('team'); + expect(state.list[0].peerName).toBe('Chen Wei'); + }); + + it('refreshHall 只展示当前用户人脉', async () => { + const { createHallState, refreshHall } = loadHall(); + const state = createHallState(); + await refreshHall(state, { + fetchHallContactPage: async () => ({ + list: [ + { + id: 1, + ownerUserId: 11, + peerCardId: 202, + source: 'exchange', + peerName: 'Tariq Mansour', + }, + ], + pagination: { page: 1, size: 20, total: 1 }, + }), + }); + expect(state.list).toHaveLength(1); + expect(state.empty).toBe(false); + expect(state.list[0].peerName).toBe('Tariq Mansour'); + }); +}); + +describe('OmniCard AI 名片大厅页契约 (index.uvue)', () => { + it('页面含 list-view 与互换码输入,并避让 TabBar', () => { + const pageSource = fs.readFileSync(HALL_PAGE, 'utf8'); + const logicSource = fs.readFileSync(HALL_UTS, 'utf8'); + expect(pageSource.includes(' - import { state, updateGlobalData, setLifeCycleNum, checkSystemTheme } from '@/store/index.uts' + import { getAuthToken } from './common/request.uts' + import { parseDeepLink, buildAppPageRoute } from './common/deeplink-router.uts' // #ifdef APP-ANDROID || APP-HARMONY let firstBackTime = 0 // #endif - onLaunch((res : OnLaunchOptions) => { - updateGlobalData('launchOptions', res) - - // 自动化测试 - setLifeCycleNum(state.lifeCycleNum + 1000) - console.log('App Launch') - - // 页面性能分析 - // const performance = uni.getPerformance() - // const observer1: PerformanceObserver = performance.createObserver( - // (entryList: PerformanceObserverEntryList) => { - // console.log('observer1:entryList.getEntries()' +JSON.stringify(entryList.getEntries())) - // } - // ) - // observer1.observe({ - // entryTypes: ['render', 'navigation'], - // } as PerformanceObserverOptions) - // 统计上报 - 应用启动 - // #ifdef APP-ANDROID || WEB || MP-WEIXIN || APP-HARMONY - uni.report({ - name: 'uni-app-launch', - options: res, - success(res_data) { - console.log(res_data); - }, fail(err) { - console.log(err); - } - }) - // #endif - // #ifdef APP - if (process.env.NODE_ENV !== 'development') { //真机运行可以注释此条件 - uni.getPrivacySetting({ - success(res1){ - if(res1.needAuthorization){ - uni.openDialogPage({ url: '/pages/component/button/privacy' }) - } - } - }) + function openDeepLink(scheme : string | null, link : string | null) : boolean { + const raw = scheme != null && scheme != '' ? scheme! : (link != null ? link! : '') + const info = parseDeepLink(raw) + if (!info.isValid) { + return false } - // #endif - // 获取系统主题 - checkSystemTheme(); - }) - - const getRedirectUrl = (scheme : string | null, ulink : string | null) : string | null => { - //解析scheme或universal link启动直达页面: - //scheme格式:uniappx://redirect/pages/component/view/view?key=value //其中redirect后为页面路径 - //universal link格式:https://uniappx.dcloud.net.cn/ulink/redirect.html?url=%2Fpages%2Fcomponent%2Fview%2Fview%3Fkey%3Dvalue //通用链接路径需固定,?后面的url参数为直达页面路径,注意url字段值需做url编码(可使用encodeURIComponent方法) - let url : string | null = null; - if (null != scheme && scheme.length > 0) { - const PATHPRE = 'redirect'; - let parts : string | null = null; - let pos = scheme.search('//'); - if (pos > 0) { - parts = scheme.substring(pos + 2); - } - if (null != parts && parts.startsWith(PATHPRE)) { - url = parts.substring(PATHPRE.length); - } - } else if (null != ulink && ulink.length > 0) { - const PATH = 'ulink/redirect.html'; - let parts = ulink.split('?'); - if (parts.length > 1 && parts[0].endsWith(PATH) && parts[1].length > 0) { - parts[1].split('&').forEach((e) => { - let params = e.split('='); - if (params.length > 1 && params[0].length > 0 && params[1].length > 0) { - if ('url' == params[0]) { - if (null == url) { - url = decodeURIComponent(params[1]); - } - } - } - }); - } - } - return url; + uni.reLaunch({ + url: buildAppPageRoute(info) + }) + return true } - onAppShow((res : OnShowOptions) => { - updateGlobalData('showOptions', res) - - // 处理scheme或通用链接直达 - let url = getRedirectUrl(res.appScheme, res.appLink); - if (null != url) { - uni.navigateTo({ - url: url + function routeOwnerHome() : void { + if (getAuthToken() != '') { + uni.switchTab({ + url: '/pages/owner/hall/index' }) + return } - - // 自动化测试 - setLifeCycleNum(state.lifeCycleNum + 100) - console.log('App Show') - - // #ifdef APP-ANDROID || WEB || MP-WEIXIN || APP-HARMONY - // 统计上报 - 应用显示 - uni.report({ - name: 'uni-app-show', - success(res_data) { - console.log(res_data); - }, fail(err) { - console.log(err); - } + uni.reLaunch({ + url: '/pages/common/login' }) + } + + onLaunch((_res : OnLaunchOptions) => { + // #ifdef APP + routeOwnerHome() // #endif }) - onAppHide(() => { - // 自动化测试 - setLifeCycleNum(state.lifeCycleNum - 100) - console.log('App Hide') - // 统计上报 - 应用进入后台 - // #ifdef APP-ANDROID || WEB || MP-WEIXIN || APP-HARMONY - uni.report({ - name: 'uni-app-hide', - success(res) { - console.log(res); - }, fail(err) { - console.log(err); - } - }) - // #endif + onAppShow((res : OnShowOptions) => { + openDeepLink(res.appScheme, res.appLink) }) + // #ifdef APP-ANDROID || APP-HARMONY onLastPageBackPress(() => { - // 自动化测试 - setLifeCycleNum(state.lifeCycleNum - 1000) - console.log('App LastPageBackPress') if (firstBackTime == 0) { uni.showToast({ title: '再按一次退出应用', @@ -146,86 +56,13 @@ uni.exit() } }) - onExit(() => { - console.log('App Exit') - }) // #endif - onError((err : any) => { - console.log('App Error', err) - setLifeCycleNum(state.lifeCycleNum + 100) - // 统计上报 - 应用发生错误 - // #ifdef APP-ANDROID || WEB || MP-WEIXIN || APP-HARMONY - uni.report({ - name: 'uni-app-error', - options: err, - success(res) { - console.log(res); - }, fail(err) { - console.log(err); - } - }) - // #endif - }) - const increaseLifeCycleNum = () => { - setLifeCycleNum(state.lifeCycleNum + 100) - console.log('App increaseLifeCycleNum') - } - - defineExpose({ - increaseLifeCycleNum, - }) diff --git a/mpuniapp/changelog.md b/mpuniapp/changelog.md deleted file mode 100644 index 083e712..0000000 --- a/mpuniapp/changelog.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.44 -* update 5.24.2026081301 - diff --git a/mpuniapp/code-review/__tests__/index.test.js b/mpuniapp/code-review/__tests__/index.test.js deleted file mode 100644 index 5f2ca72..0000000 --- a/mpuniapp/code-review/__tests__/index.test.js +++ /dev/null @@ -1,168 +0,0 @@ -const { loadProjectConfig, generateReviewPrompt, getAIReview, getChanges, addReviewComment, processReview } = require('../index'); -const fs = require('fs'); -const path = require('path'); - -// 输出环境变量 -console.log('测试环境变量:'); -console.log('GITLAB_TOKEN:', process.env.GITLAB_TOKEN ? '已设置' : '未设置'); -console.log('GITLAB_URL:', process.env.GITLAB_URL); -console.log('DEEPSEEK_API_KEY:', process.env.DEEPSEEK_API_KEY ? '已设置' : '未设置'); -console.log('CI_PROJECT_ID:', process.env.CI_PROJECT_ID); -console.log('CI_MERGE_REQUEST_IID:', process.env.CI_MERGE_REQUEST_IID); -console.log('CI_COMMIT_SHA:', process.env.CI_COMMIT_SHA); -console.log('CI_COMMIT_BRANCH:', process.env.CI_COMMIT_BRANCH); -console.log('CI_PIPELINE_SOURCE:', process.env.CI_PIPELINE_SOURCE); -console.log('CI_PROJECT_DIR:', process.env.CI_PROJECT_DIR); -console.log('----------------------------------------'); - -describe('Code Review System', () => { - // 测试配置文件加载 - describe('loadProjectConfig', () => { - it('should load project configuration correctly', async () => { - const config = loadProjectConfig(); - console.log('项目配置:', JSON.stringify(config, null, 2)); - expect(config).toBeDefined(); - expect(config.language).toBeDefined(); - expect(config.reviewGuidelines).toBeDefined(); - expect(config.reviewRules).toBeDefined(); - expect(config.ignoreFiles).toBeDefined(); - }); - }); - - // 测试提示词生成 - describe('generateReviewPrompt', () => { - it('should generate review prompt correctly', () => { - const config = loadProjectConfig(); - const changes = [ - { - file: 'test.js', - diff: 'console.log("test");' - } - ]; - const prompt = generateReviewPrompt(config, JSON.stringify(changes)); - console.log('评审提示词:', prompt); - expect(prompt).toContain(config.language); - expect(prompt).toContain(config.reviewGuidelines); - expect(prompt).toContain('test.js'); - }); - }); - - // 测试获取代码变更 - describe('getChanges', () => { - it('should get changes from merge request', async () => { - const changes = await getChanges( - process.env.CI_PROJECT_ID, - 'merge_request', - process.env.CI_MERGE_REQUEST_IID - ); - console.log('合并请求变更:', JSON.stringify(changes, null, 2)); - expect(Array.isArray(changes)).toBe(true); - if (changes.length > 0) { - expect(changes[0]).toHaveProperty('file'); - expect(changes[0]).toHaveProperty('diff'); - } - }, 30000); // 设置超时时间为 30 秒 - - it('should get changes from push', async () => { - const changes = await getChanges( - process.env.CI_PROJECT_ID, - 'push', - process.env.CI_COMMIT_SHA - ); - console.log('推送变更:', JSON.stringify(changes, null, 2)); - expect(Array.isArray(changes)).toBe(true); - if (changes.length > 0) { - expect(changes[0]).toHaveProperty('file'); - expect(changes[0]).toHaveProperty('diff'); - } - }, 30000); - }); - - // 测试 AI 评审 - describe('getAIReview', () => { - it('should get AI review for changes', async () => { - console.log('开始 AI 评审测试...'); - - console.log('加载项目配置...'); - const config = loadProjectConfig(); - console.log('项目配置加载完成'); - - console.log('获取代码变更...'); - const sourceType = process.env.CI_PIPELINE_SOURCE === 'merge_request_event' ? 'merge_request' : 'push'; - const sourceId = sourceType === 'merge_request' ? process.env.CI_MERGE_REQUEST_IID : process.env.CI_COMMIT_SHA; - console.log(`变更来源: ${sourceType}, ID: ${sourceId}`); - - const changes = await getChanges( - process.env.CI_PROJECT_ID, - sourceType, - sourceId - ); - console.log(`获取到 ${changes.length} 个文件变更`); - changes.forEach(change => { - console.log(`文件: ${change.file}`); - console.log(`变更内容:\n${change.diff}`); - }); - - console.log('生成评审提示词...'); - const prompt = generateReviewPrompt(config, JSON.stringify(changes)); - console.log('评审提示词生成完成'); - - console.log('调用 AI 进行评审...'); - const review = await getAIReview(prompt); - console.log('AI 评审完成'); - console.log('评审结果:', review); - - expect(typeof review).toBe('string'); - expect(review.length).toBeGreaterThan(0); - console.log('AI 评审测试完成'); - }, 120000); // 设置测试超时时间为 120 秒 - }); - - // 测试添加评审评论 - describe('addReviewComment', () => { - // it('should add review comment to merge request', async () => { - // const review = 'Test review comment'; - // console.log('添加合并请求评论:', review); - // await expect(addReviewComment( - // process.env.CI_PROJECT_ID, - // 'merge_request', - // process.env.CI_MERGE_REQUEST_IID, - // review - // )).resolves.not.toThrow(); - // }, 30000); - - it('should add review comment to commit', async () => { - const review = 'Test review comment'; - console.log('添加提交评论:', review); - await expect(addReviewComment( - process.env.CI_PROJECT_ID, - 'push', - process.env.CI_COMMIT_SHA, - review - )).resolves.not.toThrow(); - }, 30000); - }); - - // 测试完整评审流程 - describe('processReview', () => { - // it('should process review for merge request', async () => { - // console.log('开始处理合并请求评审...'); - // await expect(processReview( - // process.env.CI_PROJECT_ID, - // 'merge_request', - // process.env.CI_MERGE_REQUEST_IID - // )).resolves.not.toThrow(); - // console.log('合并请求评审完成'); - // }, 120000); // 设置超时时间为 120 秒 - - it('should process review for push', async () => { - console.log('开始处理推送评审...'); - await expect(processReview( - process.env.CI_PROJECT_ID, - 'push', - process.env.CI_COMMIT_SHA - )).resolves.not.toThrow(); - console.log('推送评审完成'); - }, 120000); - }); -}); \ No newline at end of file diff --git a/mpuniapp/code-review/__tests__/setup.js b/mpuniapp/code-review/__tests__/setup.js deleted file mode 100644 index d3d4f66..0000000 --- a/mpuniapp/code-review/__tests__/setup.js +++ /dev/null @@ -1,25 +0,0 @@ -// 设置测试环境变量 -process.env.NODE_ENV = 'test'; - -// GitLab 相关配置 -process.env.GITLAB_TOKEN = process.env.TEST_GITLAB_TOKEN; -process.env.GITLAB_URL = process.env.TEST_GITLAB_URL || 'http://git.dcloud.io'; - -// DeepSeek API 配置 -process.env.DEEPSEEK_API_KEY = process.env.TEST_DEEPSEEK_API_KEY; - -// 测试项目配置 -process.env.TEST_PROJECT_ID = '602'; -process.env.TEST_MERGE_REQUEST_IID = '1'; -process.env.TEST_COMMIT_SHA = 'f07f0dfe33e4099256bb23412d004502973c55c8'; -process.env.TEST_BRANCH = 'dev'; -process.env.TEST_PIPELINE_SOURCE = 'merge_request_event'; -process.env.CI_PROJECT_DIR = process.cwd(); - -// 添加新的配置 -process.env.CI_PROJECT_ID = process.env.TEST_PROJECT_ID; -process.env.CI_MERGE_REQUEST_IID = process.env.TEST_MERGE_REQUEST_IID; -process.env.CI_COMMIT_SHA = process.env.TEST_COMMIT_SHA; -process.env.CI_COMMIT_BRANCH = process.env.TEST_BRANCH || 'dev'; -process.env.CI_PIPELINE_SOURCE = process.env.TEST_PIPELINE_SOURCE || 'push'; -process.env.CI_PROJECT_DIR = process.cwd() + '/../'; \ No newline at end of file diff --git a/mpuniapp/code-review/configs/code-review.yaml b/mpuniapp/code-review/configs/code-review.yaml deleted file mode 100644 index ccc0bc3..0000000 --- a/mpuniapp/code-review/configs/code-review.yaml +++ /dev/null @@ -1,81 +0,0 @@ -# uni-app x 示例项目代码评审配置文件 - -# 项目基本信息 -project: - reviewGuidelines: | - **请扮演一位经验丰富的 uni-app x 高级开发者,专注于对 Git Commit 进行代码评审。** - - 我将提供本次提交的以下信息: - 1. 提交日志(Commit Message) - 2. 代码变更内容(Diff) - 3. 变更涉及到的代码上下文(包含注释) - - 我的项目使用 **uni-app x 框架** 实现示例功能,使用 **jest 框架** 进行断言和截图测试。 - - --- - - **请基于这些信息,针对 本次提交引入的变更 进行代码评审。你的评审应聚焦于:** - - ### 1. 变更目的与实际代码一致性 - * 代码变更是否准确、完整地实现了提交日志中描述的目的或修复的问题? - * 提交日志是否清晰地解释了本次变更的意图? - - ### 2. 代码质量 (针对变更部分) - * **可读性与清晰度:** - * 新添加或修改的代码是否容易理解? - * 变量、函数、类、方法的命名是否符合规范且表达清晰? - * 代码结构是否合理? - * **潜在问题:** - * 变更是否可能引入新的 bug 或意外行为? - * 是否可能引入性能瓶颈(例如,在循环中执行昂贵的数据库操作,或者未优化 Eloquent 查询)? - * 是否存在潜在的资源泄漏或错误处理不当? - * **代码规范与最佳实践:** - * 新代码是否遵循 UTS 编码标准和项目内部的编码规范? - * 是否考虑到多端适配性(如 iOS、Android、H5、小程序等)? - * 是否遵循了 uni-app x 的最佳实践(如组件化、状态管理等)? - * 是否遵循了 jest 的最佳实践? - * **安全性:** - * 变更是否引入了新的安全风险?(特别关注用户输入处理、数据库交互、跨站脚本 XSS、跨站请求伪造 CSRF 等) - * 对于敏感操作,是否确保了适当的授权和认证? - * 涉及到手机号验证、邮箱验证、实人认证、三要素认证等付费验证时,需要增加合理的防刷机制。 - - ### 3. 代码注释 - * 新添加的注释是否清晰、准确、简洁,能够有效解释代码意图或复杂部分? - * 变更是否导致现有注释过时、不准确或产生误导? - * 是否有需要添加但缺失的关键注释(例如,对公共方法或复杂逻辑的解释)? - - ### 4. 整体变更结构 - * 这次提交的变更范围是否合理(即,只包含了与提交目的相关的修改,没有混入其他不相关的改动)? - * 如果变更跨越多个文件,它们之间的逻辑联系是否清晰? - - ### 5. 测试文件变更 - * 如果修改的是 .test.js 文件,需要验证测试用例是否合理、覆盖了相关功能,并且符合 jest 的最佳实践。 - * 如果测试中涉及到截图测试(program.screenshot) 且没有在 app webview 模式(通过 process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true' 判断)时跳过,则需要设置为截长图模式,即 program.screenshot 配置参数 fullPage: true。 - - --- - - **请以清晰的格式(如列表或分节)输出评审结果,并:** - - * **引用** 提交日志来作为评审的起点。 - * **具体指出** 发现问题的代码位置(尽可能引用文件路径和相关的 diff 行号)。 - * **详细描述** 发现的问题是什么。 - * **提供具体、可操作的改进建议**。 - * **标注问题的建议严重程度**(例如:`严重`, `主要`, `次要`, `建议`)。 - * 如果基于本次变更看,代码质量良好且没有发现明显问题,也请简要说明。 - * 将总结内容放在最前面输出,总结内容需要包含"总体评分(优、良、中、差)"、"推荐级别(可上线、建议修改、必须修改)"、"总体评价",方便评审人员快速评估。 - * 回复时使用中文。 - - --- - - **以下是本次 Git Commit 的相关信息:** - -# 忽略文件 -ignore: - - "public/build/**" - - "node_modules/**" - - "*.lock" - - "code-review/**" - - ".env" - - ".env.*" - - "package-lock.json" - - ".gitlab-ci.yml" \ No newline at end of file diff --git a/mpuniapp/code-review/index.js b/mpuniapp/code-review/index.js deleted file mode 100644 index 6d9a267..0000000 --- a/mpuniapp/code-review/index.js +++ /dev/null @@ -1,587 +0,0 @@ -const { Gitlab } = require('@gitbeaker/rest'); -const axios = require('axios'); -const yaml = require('yaml'); -const fs = require('fs'); -const minimatch = require('minimatch'); -const { execSync } = require('child_process'); -require('dotenv').config(); - -// 阿里百炼 https://bailian.console.aliyun.com/ -const BAILIAN_API_KEY = process.env.BAILIAN_API_KEY; -const BAILIAN_API_URL = 'https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions'; - -// 阿波罗AI https://api.ablai.top/personal -const ABLAI_API_KEY = process.env.ABLAI_API_KEY; -const ABLAI_API_URL = 'https://api.ablai.top/v1/chat/completions'; - -// Gemini CLI 配置 -const CODE_ASSIST_ENDPOINT = process.env.CODE_ASSIST_ENDPOINT || 'https://ww3.html5plus.org/gemini'; -const GOOGLE_CLOUD_ACCESS_TOKEN = process.env.GOOGLE_CLOUD_ACCESS_TOKEN; -const GOOGLE_GENAI_USE_GCA = process.env.GOOGLE_GENAI_USE_GCA || 'true'; -const GEMINI_MODEL = process.env.GEMINI_MODEL || 'gemini-2.5-pro'; - -const GITLAB_TOKEN = process.env.GITLAB_TOKEN; -const GITLAB_URL = process.env.CI_SERVER_URL || 'http://git.dcloud.io'; - -const api = new Gitlab({ - token: GITLAB_TOKEN, - host: GITLAB_URL -}); - -// AI 服务商配置 -const AI_PROVIDERS = { - bailian: { - name: '阿里百炼', - apiKey: BAILIAN_API_KEY, - apiUrl: BAILIAN_API_URL, - envKey: 'BAILIAN_API_KEY' - }, - ablai: { - name: '阿波罗', - apiKey: ABLAI_API_KEY, - apiUrl: ABLAI_API_URL, - envKey: 'ABLAI_API_KEY' - }, - gemini_cli: { - name: 'Gemini CLI', - type: 'cli', - accessToken: GOOGLE_CLOUD_ACCESS_TOKEN, - endpoint: CODE_ASSIST_ENDPOINT, - useGCA: GOOGLE_GENAI_USE_GCA, - model: GEMINI_MODEL, - envKey: 'GOOGLE_CLOUD_ACCESS_TOKEN' - } -}; - -// 检查提交是否已经被评审过 -async function isCommitReviewed(projectId, commitId) { - try { - const discussions = await api.CommitDiscussions.all(projectId, commitId); - return discussions.some(discussion => - discussion.notes.some(note => - note.body.includes('🤖 AI 代码评审结果') - ) - ); - } catch (error) { - console.error(`检查提交 ${commitId} 评审状态时出错:`, error); - return false; - } -} - -// 加载项目配置 -function loadProjectConfig() { - try { - // 在 GitLab CI 环境中,工作目录是 /builds/username/project-name/ - const configPath = `${process.env.CI_PROJECT_DIR}/code-review/configs/code-review.yaml`; - const configContent = fs.readFileSync(configPath, 'utf8'); - const config = yaml.parse(configContent); - - if (!config || !config.project) { - throw new Error('配置文件格式错误'); - } - - return { - reviewGuidelines: config.project.reviewGuidelines || '', - ignoreFiles: config.ignore || [], - aiModel: config.project.aiModel || process.env.AI_MODEL || "gemini-2.5-pro", - provider: config.project.provider || process.env.AI_PROVIDER || 'ablai', - maxTokens: config.project.maxTokens || parseInt(process.env.AI_MAX_TOKENS) || 5000 - }; - } catch (error) { - console.error('Error loading config:', error); - return null; - } -} - -// 生成 AI 评审提示词 -function generateReviewPrompt(projectConfig, changes, commitInfo = null) { - const { reviewGuidelines } = projectConfig; - - // 格式化变更信息 - const formattedChanges = changes.map(change => { - return ` -#### 文件路径:${change.file} -##### 变更内容: -${change.diff} -${change.content ? `##### 文件完整内容: -${change.content}` : ''} -`; - }).join('\n'); - - // 添加 commit 信息 - const commitInfoText = commitInfo ? `${commitInfo.message}` : ''; - - return ` -${reviewGuidelines} - -### 提交日志 (Commit Message): -${commitInfoText} - -### 代码变更及上下文: -${formattedChanges} -`; -} - -// 添加重试函数 - 支持更多错误类型 -async function retryWithDelay(fn, maxRetries = 5, delay = 3000) { - let lastError; - for (let i = 0; i < maxRetries; i++) { - try { - return await fn(); - } catch (error) { - lastError = error; - - // 判断是否应该重试 - const shouldRetry = - // 5xx 服务器错误 - (error.response && error.response.status >= 500) || - // 网络错误 - error.code === 'ECONNRESET' || - error.code === 'ETIMEDOUT' || - error.code === 'ENOTFOUND' || - error.code === 'ECONNREFUSED' || - // Axios 超时 - error.code === 'ECONNABORTED' || - // 429 限流错误 - (error.response && error.response.status === 429); - - if (shouldRetry && i < maxRetries - 1) { - const errorMsg = error.response - ? `状态码: ${error.response.status}` - : `错误: ${error.code || error.message}`; - console.warn(`AI API 请求失败 (${errorMsg}),正在进行第 ${i + 1}/${maxRetries} 次重试...`); - - // 如果是 429 限流,等待更长时间 - const retryDelay = error.response?.status === 429 ? delay * 2 : delay; - await new Promise(resolve => setTimeout(resolve, retryDelay)); - continue; - } - - // 不应该重试的错误,直接抛出 - throw error; - } - } - throw lastError; -} - -// 使用 Gemini CLI 进行评审 - 带重试机制 -async function getGeminiCLIReview(prompt, providerConfig, retryCount = 0) { - const MAX_RETRIES = 3; - const RETRY_DELAY = 3000; // 3秒 - - console.log('使用 Gemini CLI 调用...'); - - if (!providerConfig.accessToken) { - throw new Error(`Gemini Access Token (${providerConfig.envKey}) 未设置`); - } - - if (!providerConfig.endpoint) { - throw new Error('CODE_ASSIST_ENDPOINT 未设置'); - } - - // 将 prompt 写入临时文件,避免命令行参数过长 - const tempFile = `/tmp/gemini_prompt_${Date.now()}.txt`; - fs.writeFileSync(tempFile, prompt, 'utf8'); - - try { - // 构建环境变量 - const env = { - ...process.env, - CODE_ASSIST_ENDPOINT: providerConfig.endpoint, - GOOGLE_CLOUD_ACCESS_TOKEN: providerConfig.accessToken, - GOOGLE_GENAI_USE_GCA: providerConfig.useGCA - }; - - // 使用本地 gemini CLI 执行,从文件读取 prompt - const geminiPath = './node_modules/.bin/gemini'; - const command = `${geminiPath} -m ${providerConfig.model} < "${tempFile}"`; - console.log(`执行命令: ${geminiPath} -m ${providerConfig.model} < [prompt file]`); - - const result = execSync(command, { - env, - encoding: 'utf8', - maxBuffer: 50 * 1024 * 1024, // 50MB buffer - timeout: 600000, // 10 分钟超时 - shell: true - }); - - // 过滤掉 Gemini CLI 的提示信息 - const cleanedResult = result - .replace(/Data collection is disabled\./g, '') - .trim(); - - return cleanedResult; - } catch (error) { - // 判断是否应该重试 - const shouldRetry = - // 命令执行超时 - error.code === 'ETIMEDOUT' || - // 命令执行失败(非零退出码),可能是临时网络问题 - (error.status && error.status !== 0 && retryCount < MAX_RETRIES); - - if (shouldRetry) { - console.warn(`Gemini CLI 调用失败 (${error.message}),正在进行第 ${retryCount + 1}/${MAX_RETRIES} 次重试...`); - - // 清理临时文件 - if (fs.existsSync(tempFile)) { - fs.unlinkSync(tempFile); - } - - // 等待后重试 - await new Promise(resolve => setTimeout(resolve, RETRY_DELAY)); - return getGeminiCLIReview(prompt, providerConfig, retryCount + 1); - } - - // 不应该重试或已达到最大重试次数,抛出错误 - throw error; - } finally { - // 清理临时文件 - if (fs.existsSync(tempFile)) { - fs.unlinkSync(tempFile); - } - } -} - -// 调用 AI API 进行评审 -async function getAIReview(prompt, projectConfig) { - try { - console.log('调用 AI...'); - console.log(prompt); - - const model = projectConfig.aiModel || "gemini-3-pro-preview"; - const provider = projectConfig.provider || 'ablai'; - - console.log('provider', provider); - - // 获取服务商配置 - const providerConfig = AI_PROVIDERS[provider]; - if (!providerConfig) { - throw new Error(`不支持的服务商: ${provider}`); - } - - // 根据服务商类型选择调用方式 - if (providerConfig.type === 'cli') { - // 使用 Gemini CLI 调用 - return await getGeminiCLIReview(prompt, providerConfig); - } - - // 使用 HTTP API 调用 - if (!providerConfig.apiKey) { - throw new Error(`${providerConfig.name} API Key (${providerConfig.envKey}) 未设置`); - } - - // 创建 axios 实例 - const axiosInstance = axios.create({ - proxy: false, - timeout: 600000 // 设置超时时间为 10 分钟 - }); - - // 使用重试机制发送请求 - const response = await retryWithDelay(async () => { - return await axiosInstance.post(providerConfig.apiUrl, { - model: model, - messages: [{ role: "user", content: prompt }], - temperature: 0.7, - max_tokens: projectConfig.maxTokens || 5000 - }, { - headers: { - 'Content-Type': 'application/json', - 'Authorization': `Bearer ${providerConfig.apiKey}` - } - }); - }); - - return response.data.choices[0].message.content; - } catch (error) { - console.error('Error calling AI:', error); - if (error.code === 'ECONNABORTED') { - console.error('API 请求超时,请检查网络连接或增加超时时间'); - } - throw error; - } -} - -// 获取代码变更内容 -async function getChanges(projectId, sourceType, sourceId) { - try { - let changes; - if (sourceType === 'merge_request') { - console.log(`获取合并请求 ${sourceId} 的代码变更...`); - changes = await api.MergeRequests.allDiffs(projectId, sourceId, { - accessRawDiffs: true - }); - console.log(`成功获取合并请求 ${sourceId} 的代码变更,共 ${changes.length} 个文件`); - } else if (sourceType === 'push') { - console.log(`获取提交 ${sourceId} 的代码变更...`); - // 获取单个 commit 的变更 - const diff = await api.Commits.showDiff(projectId, sourceId); - changes = diff.map(change => ({ - new_path: change.new_path, - old_path: change.old_path, - diff: change.diff - })); - console.log(`成功获取提交 ${sourceId} 的代码变更,共 ${changes.length} 个文件`); - } else { - console.error(`不支持的类型: ${sourceType}`); - throw new Error(`不支持的类型: ${sourceType}`); - } - - const projectConfig = loadProjectConfig(); - const ignorePatterns = projectConfig.ignoreFiles || []; - - // 获取变更文件的完整内容 - const changesWithContent = await Promise.all(changes - .filter(change => { - // 检查文件是否在忽略列表中 - return !ignorePatterns.some(pattern => { - // 使用 minimatch 进行 glob 模式匹配 - const shouldIgnore = - (change.new_path && minimatch(change.new_path, pattern)) || - (change.old_path && minimatch(change.old_path, pattern)); - - if (shouldIgnore) { - console.log(`忽略文件: ${change.new_path || change.old_path} (匹配模式: ${pattern})`); - } - - return shouldIgnore; - }); - }) - .map(async change => { - const filePath = change.new_path || change.old_path; - try { - console.log(`正在获取文件 ${filePath} 的完整内容...`); - // 获取文件的完整内容 - const fileContent = await api.RepositoryFiles.show(projectId, filePath, sourceId); - // 对 base64 编码的内容进行解码 - const decodedContent = Buffer.from(fileContent.content, 'base64').toString('utf-8'); - console.log(`成功获取文件 ${filePath} 的完整内容`); - return { - file: filePath, - diff: change.diff, - content: decodedContent - }; - } catch (error) { - console.error(`无法获取文件 ${filePath} 的完整内容:`, error); - return { - file: filePath, - diff: change.diff - }; - } - })); - - console.log(`成功处理所有文件变更,共 ${changesWithContent.length} 个文件`); - return changesWithContent; - } catch (error) { - console.error('获取代码变更失败:', error); - throw error; - } -} - -// 添加评审评论 -async function addReviewComment(projectId, sourceType, sourceId, review, retryCount = 0) { - const MAX_RETRIES = 3; - const RETRY_DELAY = 1000; // 1秒 - - try { - console.log(`添加评审评论 - 项目ID: ${projectId}, 来源类型: ${sourceType}, 来源ID: ${sourceId}`); - - if (!projectId) { - throw new Error('项目ID不能为空'); - } - if (!sourceId) { - throw new Error('来源ID不能为空'); - } - if (!review) { - throw new Error('评审内容不能为空'); - } - - const note = `🤖 AI 代码评审结果:\n\n${review}`; - if (sourceType === 'merge_request') { - console.log('正在为合并请求添加评论...'); - await api.MergeRequestNotes.create(projectId, sourceId, note); - console.log('合并请求评论添加成功'); - } else if (sourceType === 'push') { - console.log('正在为提交添加评论...'); - await api.CommitDiscussions.create(projectId, sourceId, note); - console.log('提交评论添加成功'); - } else { - throw new Error(`不支持的来源类型: ${sourceType}`); - } - } catch (error) { - // 检查是否是连接错误(Keep-Alive 超时导致的 socket 关闭) - const isSocketError = error.cause?.code === 'UND_ERR_SOCKET' || - error.message === 'fetch failed' || - error.cause?.message?.includes('other side closed'); - - if (isSocketError && retryCount < MAX_RETRIES) { - console.warn(`连接错误,正在进行第 ${retryCount + 1}/${MAX_RETRIES} 次重试...`); - // 等待一段时间后重试 - await new Promise(resolve => setTimeout(resolve, RETRY_DELAY)); - return addReviewComment(projectId, sourceType, sourceId, review, retryCount + 1); - } - - console.error('添加评审评论失败:', { - error: error.message, - projectId, - sourceType, - sourceId, - reviewLength: review?.length, - retryCount - }); - if (error.cause?.description) { - console.error('错误详情:', error.cause.description); - } - throw error; - } -} - -// 主处理函数 -async function processReview(projectId, sourceType, sourceId) { - try { - const projectConfig = loadProjectConfig(); - if (!projectConfig) { - console.error('Project configuration not found'); - process.exit(1); - } - - if (sourceType === 'push') { - console.log('上一次提交的 SHA:', process.env.CI_COMMIT_BEFORE_SHA); - console.log('当前提交的 SHA:', process.env.CI_COMMIT_SHA); - console.log('当前分支:', process.env.CI_COMMIT_BRANCH); - - // 获取本次 push 的所有 commit - let commits; - // 检查 CI_COMMIT_BEFORE_SHA 是否为全 0 (新分支的首次提交) - const isNewBranch = !process.env.CI_COMMIT_BEFORE_SHA || - process.env.CI_COMMIT_BEFORE_SHA === '0000000000000000000000000000000000000000' || - /^0+$/.test(process.env.CI_COMMIT_BEFORE_SHA); - - if (process.env.CI_COMMIT_BEFORE_SHA && process.env.CI_COMMIT_SHA && !isNewBranch) { - // 正常的 push,比较两个 commit 之间的差异 - console.log('正常 push,比较提交差异...'); - commits = await api.Repositories.compare(projectId, process.env.CI_COMMIT_BEFORE_SHA, process.env.CI_COMMIT_SHA); - commits = commits.commits || []; - console.log('获取本次提交的信息:', commits); - } else { - // 新分支的首次提交或没有 BEFORE_SHA,只获取当前提交 - console.log('新分支首次提交或无法比较,获取当前提交...'); - commits = await api.Commits.all(projectId, { - ref_name: process.env.CI_COMMIT_BRANCH, - per_page: 1 - }); - console.log('获取首次提交的信息:', commits); - } - - // 过滤掉合并分支的提交 - commits = commits.filter(commit => !commit.message.startsWith('Merge branch')); - console.log(`获取到 ${commits.length} 个提交需要评审(已过滤合并分支的提交)`); - - // 对每个 commit 进行评审 - for (const commit of commits) { - console.log(`开始评审提交: ${commit.id}`); - console.log(`提交信息: ${commit.message}`); - - // 检查提交是否已经被评审过 - const isReviewed = await isCommitReviewed(projectId, commit.id); - if (isReviewed) { - console.log(`提交 ${commit.id} 已经评审过,跳过评审`); - continue; - } - - // 获取该 commit 的变更 - const changes = await getChanges(projectId, sourceType, commit.id); - - if (changes.length === 0) { - console.log(`提交 ${commit.id} 没有代码变更,跳过评审`); - continue; - } - - console.log(`提交 ${commit.id} 包含 ${changes.length} 个文件变更`); - - // 生成评审提示词 - const prompt = generateReviewPrompt(projectConfig, changes, { - author_name: commit.author_name, - created_at: commit.created_at, - message: commit.message, - ref_name: process.env.CI_COMMIT_BRANCH - }); - - // 获取 AI 评审结果 - const review = await getAIReview(prompt, projectConfig); - console.log(`AI 评审结果: ${review}`); - - // 添加评审评论到 commit - await addReviewComment(projectId, sourceType, commit.id, review); - - console.log(`提交 ${commit.id} 评审完成`); - } - } else if (sourceType === 'merge_request') { - const changes = await getChanges(projectId, sourceType, sourceId); - if (changes.length === 0) { - console.log('No changes to review'); - return; - } - - // 获取合并请求信息 - const mrInfo = await api.MergeRequests.show(projectId, sourceId); - - const prompt = generateReviewPrompt(projectConfig, changes, { - author_name: mrInfo.author.name, - created_at: mrInfo.created_at, - message: mrInfo.description, - ref_name: mrInfo.source_branch - }); - - const review = await getAIReview(prompt, projectConfig); - - await addReviewComment(projectId, sourceType, sourceId, review); - } - - console.log('Review completed successfully'); - } catch (error) { - console.error('Error processing review:', error); - if (error.cause?.description?.includes('401 Unauthorized')) { - console.error('GitLab API authentication failed. Please check your GITLAB_TOKEN.'); - } - // 在测试环境中抛出错误,而不是退出进程 - if (process.env.NODE_ENV === 'test') { - throw error; - } - process.exit(1); - } -} - -// 导出需要测试的函数 -module.exports = { - loadProjectConfig, - generateReviewPrompt, - getAIReview, - getGeminiCLIReview, - getChanges, - addReviewComment, - processReview -}; - -// 只在直接运行 index.js 时执行 -if (require.main === module) { - const projectId = process.env.CI_PROJECT_ID; - const sourceType = process.env.CI_PIPELINE_SOURCE === 'merge_request_event' ? 'merge_request' : 'push'; - const sourceId = sourceType === 'merge_request' ? process.env.CI_MERGE_REQUEST_IID : process.env.CI_COMMIT_SHA; - - if (!GITLAB_TOKEN) { - console.error('GITLAB_TOKEN is not set'); - process.exit(1); - } - - if (!projectId) { - console.error('CI_PROJECT_ID is not set'); - process.exit(1); - } - - if (!sourceId) { - console.error('Source ID is not set'); - process.exit(1); - } - - processReview(projectId, sourceType, sourceId); -} \ No newline at end of file diff --git a/mpuniapp/code-review/package-lock.json b/mpuniapp/code-review/package-lock.json deleted file mode 100644 index ae71da5..0000000 --- a/mpuniapp/code-review/package-lock.json +++ /dev/null @@ -1,11011 +0,0 @@ -{ - "name": "uni-ai-code-review", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "uni-ai-code-review", - "version": "1.0.0", - "dependencies": { - "@gitbeaker/rest": "^42.5.0", - "@google/gemini-cli": "^0.19.1", - "axios": "^1.6.0", - "dotenv": "^16.3.1", - "minimatch": "^5.1.6", - "yaml": "^2.3.4" - }, - "devDependencies": { - "jest": "^29.7.0" - } - }, - "node_modules/@alcalzone/ansi-tokenize": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@alcalzone/ansi-tokenize/-/ansi-tokenize-0.2.2.tgz", - "integrity": "sha512-mkOh+Wwawzuf5wa30bvc4nA+Qb6DIrGWgBhRR/Pw4T9nsgYait8izvXkNyU78D6Wcu3Z+KUdwCmLCxlWjEotYA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "is-fullwidth-code-point": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@alcalzone/ansi-tokenize/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@alcalzone/ansi-tokenize/node_modules/is-fullwidth-code-point": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz", - "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==", - "license": "MIT", - "dependencies": { - "get-east-asian-width": "^1.3.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.26.8", - "resolved": "https://registry.npmmirror.com/@babel/compat-data/-/compat-data-7.26.8.tgz", - "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.26.10", - "resolved": "https://registry.npmmirror.com/@babel/core/-/core-7.26.10.tgz", - "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.10", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.10", - "@babel/parser": "^7.26.10", - "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.10", - "@babel/types": "^7.26.10", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.27.0", - "resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.27.0.tgz", - "integrity": "sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.27.0", - "@babel/types": "^7.27.0", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.0", - "resolved": "https://registry.npmmirror.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.0.tgz", - "integrity": "sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.26.8", - "@babel/helper-validator-option": "^7.25.9", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.25.9", - "resolved": "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", - "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.26.0", - "resolved": "https://registry.npmmirror.com/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", - "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.26.5", - "resolved": "https://registry.npmmirror.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", - "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.25.9", - "resolved": "https://registry.npmmirror.com/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", - "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.27.0", - "resolved": "https://registry.npmmirror.com/@babel/helpers/-/helpers-7.27.0.tgz", - "integrity": "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.27.0", - "@babel/types": "^7.27.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.27.0", - "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.27.0.tgz", - "integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.27.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.26.0", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", - "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.25.9", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", - "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.9", - "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", - "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.27.0", - "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.27.0.tgz", - "integrity": "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/parser": "^7.27.0", - "@babel/types": "^7.27.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.27.0", - "resolved": "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.27.0.tgz", - "integrity": "sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.27.0", - "@babel/parser": "^7.27.0", - "@babel/template": "^7.27.0", - "@babel/types": "^7.27.0", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.27.0", - "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.27.0.tgz", - "integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmmirror.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@gitbeaker/core": { - "version": "42.5.0", - "resolved": "https://registry.npmmirror.com/@gitbeaker/core/-/core-42.5.0.tgz", - "integrity": "sha512-rMWpOPaZi1iLiifnOIoVO57p2EmQQdfIwP4txqNyMvG4WjYP5Ez0U7jRD9Nra41x6K5kTPBZkuQcAdxVWRJcEQ==", - "license": "MIT", - "dependencies": { - "@gitbeaker/requester-utils": "^42.5.0", - "qs": "^6.12.2", - "xcase": "^2.0.1" - }, - "engines": { - "node": ">=18.20.0" - } - }, - "node_modules/@gitbeaker/requester-utils": { - "version": "42.5.0", - "resolved": "https://registry.npmmirror.com/@gitbeaker/requester-utils/-/requester-utils-42.5.0.tgz", - "integrity": "sha512-HLdLS9LPBMVQumvroQg/4qkphLDtwDB+ygEsrD2u4oYCMUtXV4V1xaVqU4yTXjbTJ5sItOtdB43vYRkBcgueBw==", - "license": "MIT", - "dependencies": { - "picomatch-browser": "^2.2.6", - "qs": "^6.12.2", - "rate-limiter-flexible": "^4.0.1", - "xcase": "^2.0.1" - }, - "engines": { - "node": ">=18.20.0" - } - }, - "node_modules/@gitbeaker/rest": { - "version": "42.5.0", - "resolved": "https://registry.npmmirror.com/@gitbeaker/rest/-/rest-42.5.0.tgz", - "integrity": "sha512-oC5cM6jS7aFOp0luTw5mWSRuMgdxwHRLZQ/aWkI+ETMfsprR/HyxsXfljlMY/XJ/fRxTbRJiodR5Axf66WjO3w==", - "license": "MIT", - "dependencies": { - "@gitbeaker/core": "^42.5.0", - "@gitbeaker/requester-utils": "^42.5.0" - }, - "engines": { - "node": ">=18.20.0" - } - }, - "node_modules/@google-cloud/common": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-5.0.2.tgz", - "integrity": "sha512-V7bmBKYQyu0eVG2BFejuUjlBt+zrya6vtsKdY+JxMM/dNntPF41vZ9+LhOshEUH01zOHEqBSvI7Dad7ZS6aUeA==", - "license": "Apache-2.0", - "dependencies": { - "@google-cloud/projectify": "^4.0.0", - "@google-cloud/promisify": "^4.0.0", - "arrify": "^2.0.1", - "duplexify": "^4.1.1", - "extend": "^3.0.2", - "google-auth-library": "^9.0.0", - "html-entities": "^2.5.2", - "retry-request": "^7.0.0", - "teeny-request": "^9.0.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@google-cloud/logging": { - "version": "11.2.1", - "resolved": "https://registry.npmjs.org/@google-cloud/logging/-/logging-11.2.1.tgz", - "integrity": "sha512-2h9HBJG3OAsvzXmb81qXmaTPfXYU7KJTQUxunoOKFGnY293YQ/eCkW1Y5mHLocwpEqeqQYT/Qvl6Tk+Q7PfStw==", - "license": "Apache-2.0", - "dependencies": { - "@google-cloud/common": "^5.0.0", - "@google-cloud/paginator": "^5.0.0", - "@google-cloud/projectify": "^4.0.0", - "@google-cloud/promisify": "4.0.0", - "@opentelemetry/api": "^1.7.0", - "arrify": "^2.0.1", - "dot-prop": "^6.0.0", - "eventid": "^2.0.0", - "extend": "^3.0.2", - "gcp-metadata": "^6.0.0", - "google-auth-library": "^9.0.0", - "google-gax": "^4.0.3", - "on-finished": "^2.3.0", - "pumpify": "^2.0.1", - "stream-events": "^1.0.5", - "uuid": "^9.0.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@google-cloud/opentelemetry-cloud-monitoring-exporter": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@google-cloud/opentelemetry-cloud-monitoring-exporter/-/opentelemetry-cloud-monitoring-exporter-0.21.0.tgz", - "integrity": "sha512-+lAew44pWt6rA4l8dQ1gGhH7Uo95wZKfq/GBf9aEyuNDDLQ2XppGEEReu6ujesSqTtZ8ueQFt73+7SReSHbwqg==", - "license": "Apache-2.0", - "dependencies": { - "@google-cloud/opentelemetry-resource-util": "^3.0.0", - "@google-cloud/precise-date": "^4.0.0", - "google-auth-library": "^9.0.0", - "googleapis": "^137.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.9.0", - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/resources": "^2.0.0", - "@opentelemetry/sdk-metrics": "^2.0.0" - } - }, - "node_modules/@google-cloud/opentelemetry-cloud-trace-exporter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@google-cloud/opentelemetry-cloud-trace-exporter/-/opentelemetry-cloud-trace-exporter-3.0.0.tgz", - "integrity": "sha512-mUfLJBFo+ESbO0dAGboErx2VyZ7rbrHcQvTP99yH/J72dGaPbH2IzS+04TFbTbEd1VW5R9uK3xq2CqawQaG+1Q==", - "license": "Apache-2.0", - "dependencies": { - "@google-cloud/opentelemetry-resource-util": "^3.0.0", - "@grpc/grpc-js": "^1.1.8", - "@grpc/proto-loader": "^0.8.0", - "google-auth-library": "^9.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.0.0", - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/resources": "^2.0.0", - "@opentelemetry/sdk-trace-base": "^2.0.0" - } - }, - "node_modules/@google-cloud/opentelemetry-resource-util": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@google-cloud/opentelemetry-resource-util/-/opentelemetry-resource-util-3.0.0.tgz", - "integrity": "sha512-CGR/lNzIfTKlZoZFfS6CkVzx+nsC9gzy6S8VcyaLegfEJbiPjxbMLP7csyhJTvZe/iRRcQJxSk0q8gfrGqD3/Q==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.22.0", - "gcp-metadata": "^6.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/resources": "^2.0.0" - } - }, - "node_modules/@google-cloud/paginator": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@google-cloud/paginator/-/paginator-5.0.2.tgz", - "integrity": "sha512-DJS3s0OVH4zFDB1PzjxAsHqJT6sKVbRwwML0ZBP9PbU7Yebtu/7SWMRzvO2J3nUi9pRNITCfu4LJeooM2w4pjg==", - "license": "Apache-2.0", - "dependencies": { - "arrify": "^2.0.0", - "extend": "^3.0.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@google-cloud/precise-date": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@google-cloud/precise-date/-/precise-date-4.0.0.tgz", - "integrity": "sha512-1TUx3KdaU3cN7nfCdNf+UVqA/PSX29Cjcox3fZZBtINlRrXVTmUkQnCKv2MbBUbCopbK4olAT1IHl76uZyCiVA==", - "license": "Apache-2.0", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@google-cloud/projectify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-4.0.0.tgz", - "integrity": "sha512-MmaX6HeSvyPbWGwFq7mXdo0uQZLGBYCwziiLIGq5JVX+/bdI3SAq6bP98trV5eTWfLuvsMcIC1YJOF2vfteLFA==", - "license": "Apache-2.0", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@google-cloud/promisify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-4.0.0.tgz", - "integrity": "sha512-Orxzlfb9c67A15cq2JQEyVc7wEsmFBmHjZWZYQMUyJ1qivXyMwdyNOs9odi79hze+2zqdTtu1E19IM/FtqZ10g==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@google/gemini-cli": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/@google/gemini-cli/-/gemini-cli-0.19.2.tgz", - "integrity": "sha512-mrOieAvml7hNoSyARr368p5wEcxfFVT+28FXLMURP5UZbJpLUQeJjnf5PEaDV+QCL8h2X5qZgpnJoMGKQ8jRiw==", - "dependencies": { - "@google/gemini-cli-core": "0.19.2", - "@google/genai": "1.30.0", - "@iarna/toml": "^2.2.5", - "@modelcontextprotocol/sdk": "^1.23.0", - "@types/update-notifier": "^6.0.8", - "ansi-regex": "^6.2.2", - "clipboardy": "^5.0.0", - "command-exists": "^1.2.9", - "comment-json": "^4.2.5", - "diff": "^7.0.0", - "dotenv": "^17.1.0", - "extract-zip": "^2.0.1", - "fzf": "^0.5.2", - "glob": "^12.0.0", - "highlight.js": "^11.11.1", - "ink": "npm:@jrichman/ink@6.4.6", - "ink-gradient": "^3.0.0", - "ink-spinner": "^5.0.0", - "latest-version": "^9.0.0", - "lowlight": "^3.3.0", - "mnemonist": "^0.40.3", - "open": "^10.1.2", - "prompts": "^2.4.2", - "react": "^19.2.0", - "read-package-up": "^11.0.0", - "shell-quote": "^1.8.3", - "simple-git": "^3.28.0", - "string-width": "^8.1.0", - "strip-ansi": "^7.1.0", - "strip-json-comments": "^3.1.1", - "tar": "^7.5.2", - "tinygradient": "^1.1.5", - "undici": "^7.10.0", - "wrap-ansi": "9.0.2", - "yargs": "^17.7.2", - "zod": "^3.23.8" - }, - "bin": { - "gemini": "dist/index.js" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@google/gemini-cli-core": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/@google/gemini-cli-core/-/gemini-cli-core-0.19.2.tgz", - "integrity": "sha512-2Qldnrk6McNJBWDQeBC36fCoMWefwtqJhElzvpcojYAvAMsJUrCVfrpLLVLfmspkpGQmo4jPMH6eXD/qD2rX/w==", - "dependencies": { - "@google-cloud/logging": "^11.2.1", - "@google-cloud/opentelemetry-cloud-monitoring-exporter": "^0.21.0", - "@google-cloud/opentelemetry-cloud-trace-exporter": "^3.0.0", - "@google/genai": "1.30.0", - "@iarna/toml": "^2.2.5", - "@joshua.litt/get-ripgrep": "^0.0.3", - "@modelcontextprotocol/sdk": "^1.23.0", - "@opentelemetry/api": "^1.9.0", - "@opentelemetry/exporter-logs-otlp-grpc": "^0.203.0", - "@opentelemetry/exporter-logs-otlp-http": "^0.203.0", - "@opentelemetry/exporter-metrics-otlp-grpc": "^0.203.0", - "@opentelemetry/exporter-metrics-otlp-http": "^0.203.0", - "@opentelemetry/exporter-trace-otlp-grpc": "^0.203.0", - "@opentelemetry/exporter-trace-otlp-http": "^0.203.0", - "@opentelemetry/instrumentation-http": "^0.203.0", - "@opentelemetry/resource-detector-gcp": "^0.40.0", - "@opentelemetry/sdk-node": "^0.203.0", - "@types/glob": "^8.1.0", - "@types/html-to-text": "^9.0.4", - "@xterm/headless": "5.5.0", - "ajv": "^8.17.1", - "ajv-formats": "^3.0.0", - "chardet": "^2.1.0", - "diff": "^7.0.0", - "dotenv": "^17.1.0", - "fast-levenshtein": "^2.0.6", - "fast-uri": "^3.0.6", - "fdir": "^6.4.6", - "fzf": "^0.5.2", - "glob": "^12.0.0", - "google-auth-library": "^9.11.0", - "html-to-text": "^9.0.5", - "https-proxy-agent": "^7.0.6", - "ignore": "^7.0.0", - "marked": "^15.0.12", - "mime": "4.0.7", - "mnemonist": "^0.40.3", - "open": "^10.1.2", - "picomatch": "^4.0.1", - "read-package-up": "^11.0.0", - "shell-quote": "^1.8.3", - "simple-git": "^3.28.0", - "strip-ansi": "^7.1.0", - "tree-sitter-bash": "^0.25.0", - "undici": "^7.10.0", - "web-tree-sitter": "^0.25.10", - "ws": "^8.18.0", - "zod": "^3.25.76" - }, - "engines": { - "node": ">=20" - }, - "optionalDependencies": { - "@lydell/node-pty": "1.1.0", - "@lydell/node-pty-darwin-arm64": "1.1.0", - "@lydell/node-pty-darwin-x64": "1.1.0", - "@lydell/node-pty-linux-x64": "1.1.0", - "@lydell/node-pty-win32-arm64": "1.1.0", - "@lydell/node-pty-win32-x64": "1.1.0", - "node-pty": "^1.0.0" - } - }, - "node_modules/@google/gemini-cli-core/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@google/gemini-cli-core/node_modules/dotenv": { - "version": "17.2.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", - "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/@google/gemini-cli-core/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/@google/gemini-cli-core/node_modules/glob": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-12.0.0.tgz", - "integrity": "sha512-5Qcll1z7IKgHr5g485ePDdHcNQY0k2dtv/bjYy0iuyGxQw2qSOiiXUXJ+AYQpg3HNoUMHqAruX478Jeev7UULw==", - "license": "BlueOak-1.0.0", - "dependencies": { - "foreground-child": "^3.3.1", - "jackspeak": "^4.1.1", - "minimatch": "^10.1.1", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^2.0.0" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@google/gemini-cli-core/node_modules/minimatch": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", - "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@google/gemini-cli-core/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/@google/gemini-cli-core/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@google/gemini-cli/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@google/gemini-cli/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@google/gemini-cli/node_modules/dotenv": { - "version": "17.2.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", - "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/@google/gemini-cli/node_modules/emoji-regex": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", - "license": "MIT" - }, - "node_modules/@google/gemini-cli/node_modules/glob": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-12.0.0.tgz", - "integrity": "sha512-5Qcll1z7IKgHr5g485ePDdHcNQY0k2dtv/bjYy0iuyGxQw2qSOiiXUXJ+AYQpg3HNoUMHqAruX478Jeev7UULw==", - "license": "BlueOak-1.0.0", - "dependencies": { - "foreground-child": "^3.3.1", - "jackspeak": "^4.1.1", - "minimatch": "^10.1.1", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^2.0.0" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@google/gemini-cli/node_modules/minimatch": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", - "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@google/gemini-cli/node_modules/string-width": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.1.0.tgz", - "integrity": "sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg==", - "license": "MIT", - "dependencies": { - "get-east-asian-width": "^1.3.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@google/gemini-cli/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@google/gemini-cli/node_modules/wrap-ansi": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", - "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@google/gemini-cli/node_modules/wrap-ansi/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@google/genai": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/@google/genai/-/genai-1.30.0.tgz", - "integrity": "sha512-3MRcgczBFbUat1wIlZoLJ0vCCfXgm7Qxjh59cZi2X08RgWLtm9hKOspzp7TOg1TV2e26/MLxR2GR5yD5GmBV2w==", - "license": "Apache-2.0", - "dependencies": { - "google-auth-library": "^10.3.0", - "ws": "^8.18.0" - }, - "engines": { - "node": ">=20.0.0" - }, - "peerDependencies": { - "@modelcontextprotocol/sdk": "^1.20.1" - }, - "peerDependenciesMeta": { - "@modelcontextprotocol/sdk": { - "optional": true - } - } - }, - "node_modules/@google/genai/node_modules/gaxios": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.3.tgz", - "integrity": "sha512-YGGyuEdVIjqxkxVH1pUTMY/XtmmsApXrCVv5EU25iX6inEPbV+VakJfLealkBtJN69AQmh1eGOdCl9Sm1UP6XQ==", - "license": "Apache-2.0", - "dependencies": { - "extend": "^3.0.2", - "https-proxy-agent": "^7.0.1", - "node-fetch": "^3.3.2", - "rimraf": "^5.0.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@google/genai/node_modules/gcp-metadata": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-8.1.2.tgz", - "integrity": "sha512-zV/5HKTfCeKWnxG0Dmrw51hEWFGfcF2xiXqcA3+J90WDuP0SvoiSO5ORvcBsifmx/FoIjgQN3oNOGaQ5PhLFkg==", - "license": "Apache-2.0", - "dependencies": { - "gaxios": "^7.0.0", - "google-logging-utils": "^1.0.0", - "json-bigint": "^1.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@google/genai/node_modules/google-auth-library": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.5.0.tgz", - "integrity": "sha512-7ABviyMOlX5hIVD60YOfHw4/CxOfBhyduaYB+wbFWCWoni4N7SLcV46hrVRktuBbZjFC9ONyqamZITN7q3n32w==", - "license": "Apache-2.0", - "dependencies": { - "base64-js": "^1.3.0", - "ecdsa-sig-formatter": "^1.0.11", - "gaxios": "^7.0.0", - "gcp-metadata": "^8.0.0", - "google-logging-utils": "^1.0.0", - "gtoken": "^8.0.0", - "jws": "^4.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@google/genai/node_modules/google-logging-utils": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.3.tgz", - "integrity": "sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@google/genai/node_modules/gtoken": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-8.0.0.tgz", - "integrity": "sha512-+CqsMbHPiSTdtSO14O51eMNlrp9N79gmeqmXeouJOhfucAedHw9noVe/n5uJk3tbKE6a+6ZCQg3RPhVhHByAIw==", - "license": "MIT", - "dependencies": { - "gaxios": "^7.0.0", - "jws": "^4.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@google/genai/node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "license": "MIT", - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/@grpc/grpc-js": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.2.tgz", - "integrity": "sha512-QzVUtEFyu05UNx2xr0fCQmStUO17uVQhGNowtxs00IgTZT6/W2PBLfUkj30s0FKJ29VtTa3ArVNIhNP6akQhqA==", - "license": "Apache-2.0", - "dependencies": { - "@grpc/proto-loader": "^0.8.0", - "@js-sdsl/ordered-map": "^4.4.2" - }, - "engines": { - "node": ">=12.10.0" - } - }, - "node_modules/@grpc/proto-loader": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.0.tgz", - "integrity": "sha512-rc1hOQtjIWGxcxpb9aHAfLpIctjEnsDehj0DAiVfBlmT84uvR0uUtN2hEi/ecvWVjXUGf5qPF4qEgiLOx1YIMQ==", - "license": "Apache-2.0", - "dependencies": { - "lodash.camelcase": "^4.3.0", - "long": "^5.0.0", - "protobufjs": "^7.5.3", - "yargs": "^17.7.2" - }, - "bin": { - "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@iarna/toml": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", - "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==", - "license": "ISC" - }, - "node_modules/@isaacs/balanced-match": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", - "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", - "license": "MIT", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/brace-expansion": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", - "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", - "license": "MIT", - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/fs-minipass": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", - "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", - "license": "ISC", - "dependencies": { - "minipass": "^7.0.4" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmmirror.com/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/@jest/console/-/console-29.7.0.tgz", - "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/@jest/core/-/core-29.7.0.tgz", - "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/@jest/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz", - "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz", - "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/@jest/globals/-/globals-29.7.0.tgz", - "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/@jest/reporters/-/reporters-29.7.0.tgz", - "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmmirror.com/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "29.6.3", - "resolved": "https://registry.npmmirror.com/@jest/source-map/-/source-map-29.6.3.tgz", - "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/@jest/test-result/-/test-result-29.7.0.tgz", - "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", - "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@joshua.litt/get-ripgrep": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@joshua.litt/get-ripgrep/-/get-ripgrep-0.0.3.tgz", - "integrity": "sha512-rycdieAKKqXi2bsM7G2ayDiNk5CAX8ZOzsTQsirfOqUKPef04Xw40BWGGyimaOOuvPgLWYt3tPnLLG3TvPXi5Q==", - "license": "MIT", - "dependencies": { - "@lvce-editor/verror": "^1.6.0", - "execa": "^9.5.2", - "extract-zip": "^2.0.1", - "fs-extra": "^11.3.0", - "got": "^14.4.5", - "path-exists": "^5.0.0", - "xdg-basedir": "^5.1.0" - } - }, - "node_modules/@joshua.litt/get-ripgrep/node_modules/execa": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-9.6.1.tgz", - "integrity": "sha512-9Be3ZoN4LmYR90tUoVu2te2BsbzHfhJyfEiAVfz7N5/zv+jduIfLrV2xdQXOHbaD6KgpGdO9PRPM1Y4Q9QkPkA==", - "license": "MIT", - "dependencies": { - "@sindresorhus/merge-streams": "^4.0.0", - "cross-spawn": "^7.0.6", - "figures": "^6.1.0", - "get-stream": "^9.0.0", - "human-signals": "^8.0.1", - "is-plain-obj": "^4.1.0", - "is-stream": "^4.0.1", - "npm-run-path": "^6.0.0", - "pretty-ms": "^9.2.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^4.0.0", - "yoctocolors": "^2.1.1" - }, - "engines": { - "node": "^18.19.0 || >=20.5.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/@joshua.litt/get-ripgrep/node_modules/get-stream": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", - "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", - "license": "MIT", - "dependencies": { - "@sec-ant/readable-stream": "^0.4.1", - "is-stream": "^4.0.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@joshua.litt/get-ripgrep/node_modules/human-signals": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-8.0.1.tgz", - "integrity": "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==", - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@joshua.litt/get-ripgrep/node_modules/is-stream": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", - "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@joshua.litt/get-ripgrep/node_modules/npm-run-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz", - "integrity": "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==", - "license": "MIT", - "dependencies": { - "path-key": "^4.0.0", - "unicorn-magic": "^0.3.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@joshua.litt/get-ripgrep/node_modules/path-exists": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", - "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/@joshua.litt/get-ripgrep/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@joshua.litt/get-ripgrep/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@joshua.litt/get-ripgrep/node_modules/strip-final-newline": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", - "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@joshua.litt/get-ripgrep/node_modules/unicorn-magic": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", - "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@js-sdsl/ordered-map": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", - "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "node_modules/@keyv/serialize": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.1.tgz", - "integrity": "sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==", - "license": "MIT" - }, - "node_modules/@kwsites/file-exists": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz", - "integrity": "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==", - "license": "MIT", - "dependencies": { - "debug": "^4.1.1" - } - }, - "node_modules/@kwsites/promise-deferred": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", - "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==", - "license": "MIT" - }, - "node_modules/@lvce-editor/verror": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@lvce-editor/verror/-/verror-1.7.0.tgz", - "integrity": "sha512-+LGuAEIC2L7pbvkyAQVWM2Go0dAy+UWEui28g07zNtZsCBhm+gusBK8PNwLJLV5Jay+TyUYuwLIbJdjLLzqEBg==", - "license": "MIT" - }, - "node_modules/@lydell/node-pty": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@lydell/node-pty/-/node-pty-1.1.0.tgz", - "integrity": "sha512-VDD8LtlMTOrPKWMXUAcB9+LTktzuunqrMwkYR1DMRBkS6LQrCt+0/Ws1o2rMml/n3guePpS7cxhHF7Nm5K4iMw==", - "license": "MIT", - "optional": true, - "optionalDependencies": { - "@lydell/node-pty-darwin-arm64": "1.1.0", - "@lydell/node-pty-darwin-x64": "1.1.0", - "@lydell/node-pty-linux-arm64": "1.1.0", - "@lydell/node-pty-linux-x64": "1.1.0", - "@lydell/node-pty-win32-arm64": "1.1.0", - "@lydell/node-pty-win32-x64": "1.1.0" - } - }, - "node_modules/@lydell/node-pty-darwin-arm64": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@lydell/node-pty-darwin-arm64/-/node-pty-darwin-arm64-1.1.0.tgz", - "integrity": "sha512-7kFD+owAA61qmhJCtoMbqj3Uvff3YHDiU+4on5F2vQdcMI3MuwGi7dM6MkFG/yuzpw8LF2xULpL71tOPUfxs0w==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@lydell/node-pty-darwin-x64": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@lydell/node-pty-darwin-x64/-/node-pty-darwin-x64-1.1.0.tgz", - "integrity": "sha512-XZdvqj5FjAMjH8bdp0YfaZjur5DrCIDD1VYiE9EkkYVMDQqRUPHYV3U8BVEQVT9hYfjmpr7dNaELF2KyISWSNA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@lydell/node-pty-linux-arm64": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@lydell/node-pty-linux-arm64/-/node-pty-linux-arm64-1.1.0.tgz", - "integrity": "sha512-yyDBmalCfHpLiQMT2zyLcqL2Fay4Xy7rIs8GH4dqKLnEviMvPGOK7LADVkKAsbsyXBSISL3Lt1m1MtxhPH6ckg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@lydell/node-pty-linux-x64": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@lydell/node-pty-linux-x64/-/node-pty-linux-x64-1.1.0.tgz", - "integrity": "sha512-NcNqRTD14QT+vXcEuqSSvmWY+0+WUBn2uRE8EN0zKtDpIEr9d+YiFj16Uqds6QfcLCHfZmC+Ls7YzwTaqDnanA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@lydell/node-pty-win32-arm64": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@lydell/node-pty-win32-arm64/-/node-pty-win32-arm64-1.1.0.tgz", - "integrity": "sha512-JOMbCou+0fA7d/m97faIIfIU0jOv8sn2OR7tI45u3AmldKoKoLP8zHY6SAvDDnI3fccO1R2HeR1doVjpS7HM0w==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@lydell/node-pty-win32-x64": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@lydell/node-pty-win32-x64/-/node-pty-win32-x64-1.1.0.tgz", - "integrity": "sha512-3N56BZ+WDFnUMYRtsrr7Ky2mhWGl9xXcyqR6cexfuCqcz9RNWL+KoXRv/nZylY5dYaXkft4JaR1uVu+roiZDAw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@modelcontextprotocol/sdk": { - "version": "1.24.3", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.24.3.tgz", - "integrity": "sha512-YgSHW29fuzKKAHTGe9zjNoo+yF8KaQPzDC2W9Pv41E7/57IfY+AMGJ/aDFlgTLcVVELoggKE4syABCE75u3NCw==", - "license": "MIT", - "dependencies": { - "ajv": "^8.17.1", - "ajv-formats": "^3.0.1", - "content-type": "^1.0.5", - "cors": "^2.8.5", - "cross-spawn": "^7.0.5", - "eventsource": "^3.0.2", - "eventsource-parser": "^3.0.0", - "express": "^5.0.1", - "express-rate-limit": "^7.5.0", - "jose": "^6.1.1", - "pkce-challenge": "^5.0.0", - "raw-body": "^3.0.0", - "zod": "^3.25 || ^4.0", - "zod-to-json-schema": "^3.25.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@cfworker/json-schema": "^4.1.1", - "zod": "^3.25 || ^4.0" - }, - "peerDependenciesMeta": { - "@cfworker/json-schema": { - "optional": true - }, - "zod": { - "optional": false - } - } - }, - "node_modules/@opentelemetry/api": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", - "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", - "license": "Apache-2.0", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@opentelemetry/api-logs": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.203.0.tgz", - "integrity": "sha512-9B9RU0H7Ya1Dx/Rkyc4stuBZSGVQF27WigitInx2QQoj6KUpEFYPKoWjdFTunJYxmXmh17HeBvbMa1EhGyPmqQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api": "^1.3.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@opentelemetry/context-async-hooks": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.0.1.tgz", - "integrity": "sha512-XuY23lSI3d4PEqKA+7SLtAgwqIfc6E/E9eAQWLN1vlpC53ybO3o6jW4BsXo1xvz9lYyyWItfQDDLzezER01mCw==", - "license": "Apache-2.0", - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/core": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz", - "integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-logs-otlp-grpc": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-grpc/-/exporter-logs-otlp-grpc-0.203.0.tgz", - "integrity": "sha512-g/2Y2noc/l96zmM+g0LdeuyYKINyBwN6FJySoU15LHPLcMN/1a0wNk2SegwKcxrRdE7Xsm7fkIR5n6XFe3QpPw==", - "license": "Apache-2.0", - "dependencies": { - "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "2.0.1", - "@opentelemetry/otlp-exporter-base": "0.203.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.203.0", - "@opentelemetry/otlp-transformer": "0.203.0", - "@opentelemetry/sdk-logs": "0.203.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-logs-otlp-grpc/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-logs-otlp-http": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.203.0.tgz", - "integrity": "sha512-s0hys1ljqlMTbXx2XiplmMJg9wG570Z5lH7wMvrZX6lcODI56sG4HL03jklF63tBeyNwK2RV1/ntXGo3HgG4Qw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.203.0", - "@opentelemetry/core": "2.0.1", - "@opentelemetry/otlp-exporter-base": "0.203.0", - "@opentelemetry/otlp-transformer": "0.203.0", - "@opentelemetry/sdk-logs": "0.203.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-logs-otlp-http/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-logs-otlp-proto": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-proto/-/exporter-logs-otlp-proto-0.203.0.tgz", - "integrity": "sha512-nl/7S91MXn5R1aIzoWtMKGvqxgJgepB/sH9qW0rZvZtabnsjbf8OQ1uSx3yogtvLr0GzwD596nQKz2fV7q2RBw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.203.0", - "@opentelemetry/core": "2.0.1", - "@opentelemetry/otlp-exporter-base": "0.203.0", - "@opentelemetry/otlp-transformer": "0.203.0", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-logs": "0.203.0", - "@opentelemetry/sdk-trace-base": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz", - "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-grpc": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.203.0.tgz", - "integrity": "sha512-FCCj9nVZpumPQSEI57jRAA89hQQgONuoC35Lt+rayWY/mzCAc6BQT7RFyFaZKJ2B7IQ8kYjOCPsF/HGFWjdQkQ==", - "license": "Apache-2.0", - "dependencies": { - "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "2.0.1", - "@opentelemetry/exporter-metrics-otlp-http": "0.203.0", - "@opentelemetry/otlp-exporter-base": "0.203.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.203.0", - "@opentelemetry/otlp-transformer": "0.203.0", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-metrics": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-grpc/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-grpc/node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-grpc/node_modules/@opentelemetry/sdk-metrics": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", - "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.9.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-http": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.203.0.tgz", - "integrity": "sha512-HFSW10y8lY6BTZecGNpV3GpoSy7eaO0Z6GATwZasnT4bEsILp8UJXNG5OmEsz4SdwCSYvyCbTJdNbZP3/8LGCQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/otlp-exporter-base": "0.203.0", - "@opentelemetry/otlp-transformer": "0.203.0", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-metrics": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", - "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.9.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-proto": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-proto/-/exporter-metrics-otlp-proto-0.203.0.tgz", - "integrity": "sha512-OZnhyd9npU7QbyuHXFEPVm3LnjZYifuKpT3kTnF84mXeEQ84pJJZgyLBpU4FSkSwUkt/zbMyNAI7y5+jYTWGIg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/exporter-metrics-otlp-http": "0.203.0", - "@opentelemetry/otlp-exporter-base": "0.203.0", - "@opentelemetry/otlp-transformer": "0.203.0", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-metrics": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/sdk-metrics": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", - "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.9.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-prometheus": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.203.0.tgz", - "integrity": "sha512-2jLuNuw5m4sUj/SncDf/mFPabUxMZmmYetx5RKIMIQyPnl6G6ooFzfeE8aXNRf8YD1ZXNlCnRPcISxjveGJHNg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-metrics": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/sdk-metrics": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", - "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.9.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-grpc": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.203.0.tgz", - "integrity": "sha512-322coOTf81bm6cAA8+ML6A+m4r2xTCdmAZzGNTboPXRzhwPt4JEmovsFAs+grpdarObd68msOJ9FfH3jxM6wqA==", - "license": "Apache-2.0", - "dependencies": { - "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "2.0.1", - "@opentelemetry/otlp-exporter-base": "0.203.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.203.0", - "@opentelemetry/otlp-transformer": "0.203.0", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-trace-base": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz", - "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-http": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.203.0.tgz", - "integrity": "sha512-ZDiaswNYo0yq/cy1bBLJFe691izEJ6IgNmkjm4C6kE9ub/OMQqDXORx2D2j8fzTBTxONyzusbaZlqtfmyqURPw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/otlp-exporter-base": "0.203.0", - "@opentelemetry/otlp-transformer": "0.203.0", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-trace-base": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz", - "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-proto": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.203.0.tgz", - "integrity": "sha512-1xwNTJ86L0aJmWRwENCJlH4LULMG2sOXWIVw+Szta4fkqKVY50Eo4HoVKKq6U9QEytrWCr8+zjw0q/ZOeXpcAQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/otlp-exporter-base": "0.203.0", - "@opentelemetry/otlp-transformer": "0.203.0", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-trace-base": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz", - "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-zipkin": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.0.1.tgz", - "integrity": "sha512-a9eeyHIipfdxzCfc2XPrE+/TI3wmrZUDFtG2RRXHSbZZULAny7SyybSvaDvS77a7iib5MPiAvluwVvbGTsHxsw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-trace-base": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.0.0" - } - }, - "node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz", - "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/instrumentation": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.203.0.tgz", - "integrity": "sha512-ke1qyM+3AK2zPuBPb6Hk/GCsc5ewbLvPNkEuELx/JmANeEp6ZjnZ+wypPAJSucTw0wvCGrUaibDSdcrGFoWxKQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.203.0", - "import-in-the-middle": "^1.8.1", - "require-in-the-middle": "^7.1.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-http": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.203.0.tgz", - "integrity": "sha512-y3uQAcCOAwnO6vEuNVocmpVzG3PER6/YZqbPbbffDdJ9te5NkHEkfSMNzlC3+v7KlE+WinPGc3N7MR30G1HY2g==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/instrumentation": "0.203.0", - "@opentelemetry/semantic-conventions": "^1.29.0", - "forwarded-parse": "2.1.2" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/otlp-exporter-base": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.203.0.tgz", - "integrity": "sha512-Wbxf7k+87KyvxFr5D7uOiSq/vHXWommvdnNE7vECO3tAhsA2GfOlpWINCMWUEPdHZ7tCXxw6Epp3vgx3jU7llQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/otlp-transformer": "0.203.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/otlp-grpc-exporter-base": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.203.0.tgz", - "integrity": "sha512-te0Ze1ueJF+N/UOFl5jElJW4U0pZXQ8QklgSfJ2linHN0JJsuaHG8IabEUi2iqxY8ZBDlSiz1Trfv5JcjWWWwQ==", - "license": "Apache-2.0", - "dependencies": { - "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "2.0.1", - "@opentelemetry/otlp-exporter-base": "0.203.0", - "@opentelemetry/otlp-transformer": "0.203.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/otlp-transformer": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.203.0.tgz", - "integrity": "sha512-Y8I6GgoCna0qDQ2W6GCRtaF24SnvqvA8OfeTi7fqigD23u8Jpb4R5KFv/pRvrlGagcCLICMIyh9wiejp4TXu/A==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.203.0", - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-logs": "0.203.0", - "@opentelemetry/sdk-metrics": "2.0.1", - "@opentelemetry/sdk-trace-base": "2.0.1", - "protobufjs": "^7.3.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/sdk-metrics": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", - "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.9.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz", - "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/propagator-b3": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.0.1.tgz", - "integrity": "sha512-Hc09CaQ8Tf5AGLmf449H726uRoBNGPBL4bjr7AnnUpzWMvhdn61F78z9qb6IqB737TffBsokGAK1XykFEZ1igw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/propagator-jaeger": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.0.1.tgz", - "integrity": "sha512-7PMdPBmGVH2eQNb/AtSJizQNgeNTfh6jQFqys6lfhd6P4r+m/nTh3gKPPpaCXVdRQ+z93vfKk+4UGty390283w==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/resource-detector-gcp": { - "version": "0.40.3", - "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-gcp/-/resource-detector-gcp-0.40.3.tgz", - "integrity": "sha512-C796YjBA5P1JQldovApYfFA/8bQwFfpxjUbOtGhn1YZkVTLoNQN+kvBwgALfTPWzug6fWsd0xhn9dzeiUcndag==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/resources": "^2.0.0", - "gcp-metadata": "^6.0.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.0.0" - } - }, - "node_modules/@opentelemetry/resources": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz", - "integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.2.0", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-logs": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.203.0.tgz", - "integrity": "sha512-vM2+rPq0Vi3nYA5akQD2f3QwossDnTDLvKbea6u/A2NZ3XDkPxMfo/PNrDoXhDUD/0pPo2CdH5ce/thn9K0kLw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.203.0", - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.4.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-metrics": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.2.0.tgz", - "integrity": "sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw==", - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@opentelemetry/core": "2.2.0", - "@opentelemetry/resources": "2.2.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.9.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-node": { - "version": "0.203.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.203.0.tgz", - "integrity": "sha512-zRMvrZGhGVMvAbbjiNQW3eKzW/073dlrSiAKPVWmkoQzah9wfynpVPeL55f9fVIm0GaBxTLcPeukWGy0/Wj7KQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.203.0", - "@opentelemetry/core": "2.0.1", - "@opentelemetry/exporter-logs-otlp-grpc": "0.203.0", - "@opentelemetry/exporter-logs-otlp-http": "0.203.0", - "@opentelemetry/exporter-logs-otlp-proto": "0.203.0", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.203.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.203.0", - "@opentelemetry/exporter-metrics-otlp-proto": "0.203.0", - "@opentelemetry/exporter-prometheus": "0.203.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.203.0", - "@opentelemetry/exporter-trace-otlp-http": "0.203.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.203.0", - "@opentelemetry/exporter-zipkin": "2.0.1", - "@opentelemetry/instrumentation": "0.203.0", - "@opentelemetry/propagator-b3": "2.0.1", - "@opentelemetry/propagator-jaeger": "2.0.1", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/sdk-logs": "0.203.0", - "@opentelemetry/sdk-metrics": "2.0.1", - "@opentelemetry/sdk-trace-base": "2.0.1", - "@opentelemetry/sdk-trace-node": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/sdk-metrics": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", - "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.9.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz", - "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz", - "integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==", - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@opentelemetry/core": "2.2.0", - "@opentelemetry/resources": "2.2.0", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-node": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.0.1.tgz", - "integrity": "sha512-UhdbPF19pMpBtCWYP5lHbTogLWx9N0EBxtdagvkn5YtsAnCBZzL7SjktG+ZmupRgifsHMjwUaCCaVmqGfSADmA==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/context-async-hooks": "2.0.1", - "@opentelemetry/core": "2.0.1", - "@opentelemetry/sdk-trace-base": "2.0.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz", - "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.38.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.38.0.tgz", - "integrity": "sha512-kocjix+/sSggfJhwXqClZ3i9Y/MI0fp7b+g7kCRm6psy2dsf8uApTRclwG18h8Avm7C9+fnt+O36PspJ/OzoWg==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@pnpm/config.env-replace": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", - "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==", - "license": "MIT", - "engines": { - "node": ">=12.22.0" - } - }, - "node_modules/@pnpm/network.ca-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", - "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", - "license": "MIT", - "dependencies": { - "graceful-fs": "4.2.10" - }, - "engines": { - "node": ">=12.22.0" - } - }, - "node_modules/@pnpm/network.ca-file/node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "license": "ISC" - }, - "node_modules/@pnpm/npm-conf": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", - "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", - "license": "MIT", - "dependencies": { - "@pnpm/config.env-replace": "^1.1.0", - "@pnpm/network.ca-file": "^1.0.1", - "config-chain": "^1.1.11" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", - "license": "BSD-3-Clause" - }, - "node_modules/@sec-ant/readable-stream": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz", - "integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==", - "license": "MIT" - }, - "node_modules/@selderee/plugin-htmlparser2": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@selderee/plugin-htmlparser2/-/plugin-htmlparser2-0.11.0.tgz", - "integrity": "sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==", - "license": "MIT", - "dependencies": { - "domhandler": "^5.0.3", - "selderee": "^0.11.0" - }, - "funding": { - "url": "https://ko-fi.com/killymxi" - } - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmmirror.com/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@sindresorhus/is": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.1.1.tgz", - "integrity": "sha512-rO92VvpgMc3kfiTjGT52LEtJ8Yc5kCWhZjLQ3LwlA4pSgPpQO7bVpYXParOD8Jwf+cVQECJo3yP/4I8aZtUQTQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" - } - }, - "node_modules/@sindresorhus/merge-streams": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", - "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmmirror.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmmirror.com/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.27.0", - "resolved": "https://registry.npmmirror.com/@types/babel__generator/-/babel__generator-7.27.0.tgz", - "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmmirror.com/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.7", - "resolved": "https://registry.npmmirror.com/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", - "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/caseless": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", - "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==", - "license": "MIT" - }, - "node_modules/@types/configstore": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/configstore/-/configstore-6.0.2.tgz", - "integrity": "sha512-OS//b51j9uyR3zvwD04Kfs5kHpve2qalQ18JhY/ho3voGYUTPLEG90/ocfKPI48hyHH8T04f7KEEbK6Ue60oZQ==", - "license": "MIT" - }, - "node_modules/@types/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==", - "license": "MIT", - "dependencies": { - "@types/minimatch": "^5.1.2", - "@types/node": "*" - } - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.9", - "resolved": "https://registry.npmmirror.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", - "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/gradient-string": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@types/gradient-string/-/gradient-string-1.1.6.tgz", - "integrity": "sha512-LkaYxluY4G5wR1M4AKQUal2q61Di1yVVCw42ImFTuaIoQVgmV0WP1xUaLB8zwb47mp82vWTpePI9JmrjEnJ7nQ==", - "license": "MIT", - "dependencies": { - "@types/tinycolor2": "*" - } - }, - "node_modules/@types/hast": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", - "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/@types/html-to-text": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@types/html-to-text/-/html-to-text-9.0.4.tgz", - "integrity": "sha512-pUY3cKH/Nm2yYrEmDlPR1mR7yszjGx4DrwPjQ702C4/D5CwHuZTgZdIdwPkRbcuhs7BAh2L5rg3CL5cbRiGTCQ==", - "license": "MIT" - }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", - "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmmirror.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "resolved": "https://registry.npmmirror.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", - "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "resolved": "https://registry.npmmirror.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", - "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==", - "license": "MIT" - }, - "node_modules/@types/minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "22.14.1", - "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.14.1.tgz", - "integrity": "sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==", - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" - } - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", - "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", - "license": "MIT" - }, - "node_modules/@types/request": { - "version": "2.48.13", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.13.tgz", - "integrity": "sha512-FGJ6udDNUCjd19pp0Q3iTiDkwhYup7J8hpMW9c4k53NrccQFFWKRho6hvtPPEhnXWKvukfwAlB6DbDz4yhH5Gg==", - "license": "MIT", - "dependencies": { - "@types/caseless": "*", - "@types/node": "*", - "@types/tough-cookie": "*", - "form-data": "^2.5.5" - } - }, - "node_modules/@types/request/node_modules/form-data": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.5.tgz", - "integrity": "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.35", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmmirror.com/@types/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/tinycolor2": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@types/tinycolor2/-/tinycolor2-1.4.6.tgz", - "integrity": "sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==", - "license": "MIT" - }, - "node_modules/@types/tough-cookie": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", - "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", - "license": "MIT" - }, - "node_modules/@types/unist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", - "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", - "license": "MIT" - }, - "node_modules/@types/update-notifier": { - "version": "6.0.8", - "resolved": "https://registry.npmjs.org/@types/update-notifier/-/update-notifier-6.0.8.tgz", - "integrity": "sha512-IlDFnfSVfYQD+cKIg63DEXn3RFmd7W1iYtKQsJodcHK9R1yr8aKbKaPKfBxzPpcHCq2DU8zUq4PIPmy19Thjfg==", - "license": "MIT", - "dependencies": { - "@types/configstore": "*", - "boxen": "^7.1.1" - } - }, - "node_modules/@types/yargs": { - "version": "17.0.33", - "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.33.tgz", - "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmmirror.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/yauzl": { - "version": "2.10.3", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", - "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", - "license": "MIT", - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@xterm/headless": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@xterm/headless/-/headless-5.5.0.tgz", - "integrity": "sha512-5xXB7kdQlFBP82ViMJTwwEc3gKCLGKR/eoxQm4zge7GPBl86tCdI0IdPJjoKd8mUSFXz5V7i/25sfsEkP4j46g==", - "license": "MIT" - }, - "node_modules/abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "license": "MIT", - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, - "node_modules/accepts": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", - "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", - "license": "MIT", - "dependencies": { - "mime-types": "^3.0.0", - "negotiator": "^1.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/accepts/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/accepts/node_modules/mime-types": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", - "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "license": "MIT", - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/agent-base": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", - "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, - "node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", - "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "license": "ISC", - "dependencies": { - "string-width": "^4.1.0" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmmirror.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmmirror.com/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/array-timsort": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", - "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", - "license": "MIT" - }, - "node_modules/arrify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" - }, - "node_modules/auto-bind": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-5.0.1.tgz", - "integrity": "sha512-ooviqdwwgfIfNmDwo94wlshcdzfO64XV0Cg6oDsDYBJfITDz1EngD2z7DkbvCWn+XIMsIqW27sEVF6qcpJrRcg==", - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/axios": { - "version": "1.8.4", - "resolved": "https://registry.npmmirror.com/axios/-/axios-1.8.4.tgz", - "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/babel-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/babel-jest/-/babel-jest-29.7.0.tgz", - "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmmirror.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "resolved": "https://registry.npmmirror.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", - "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", - "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-import-attributes": "^7.24.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "29.6.3", - "resolved": "https://registry.npmmirror.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", - "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/bignumber.js": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", - "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/body-parser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz", - "integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==", - "license": "MIT", - "dependencies": { - "bytes": "^3.1.2", - "content-type": "^1.0.5", - "debug": "^4.4.3", - "http-errors": "^2.0.0", - "iconv-lite": "^0.7.0", - "on-finished": "^2.4.1", - "qs": "^6.14.0", - "raw-body": "^3.0.1", - "type-is": "^2.0.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/boxen": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.1.1.tgz", - "integrity": "sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==", - "license": "MIT", - "dependencies": { - "ansi-align": "^3.0.1", - "camelcase": "^7.0.1", - "chalk": "^5.2.0", - "cli-boxes": "^3.0.0", - "string-width": "^5.1.2", - "type-fest": "^2.13.0", - "widest-line": "^4.0.1", - "wrap-ansi": "^8.1.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/boxen/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/boxen/node_modules/camelcase": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz", - "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==", - "license": "MIT", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/chalk": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", - "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/boxen/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "license": "MIT" - }, - "node_modules/boxen/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/boxen/node_modules/type-fest": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", - "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.24.4", - "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.24.4.tgz", - "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", - "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", - "license": "BSD-3-Clause" - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/bundle-name": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", - "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", - "license": "MIT", - "dependencies": { - "run-applescript": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/byte-counter": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/byte-counter/-/byte-counter-0.1.0.tgz", - "integrity": "sha512-jheRLVMeUKrDBjVw2O5+k4EvR4t9wtxHL+bo/LxfkxsVeuGMy3a5SEGgXdAFA4FSzTrU8rQXQIrsZ3oBq5a0pQ==", - "license": "MIT", - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cacheable-lookup": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", - "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==", - "license": "MIT", - "engines": { - "node": ">=14.16" - } - }, - "node_modules/cacheable-request": { - "version": "13.0.15", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-13.0.15.tgz", - "integrity": "sha512-NjiSrjv37X73FmGGU5ec/M83vWQ6q1Ae3BFe+ABfdeeMy4LOMKYTpfEjrBnLedu43clKZtsYbKrHTIQE7vKq+A==", - "license": "MIT", - "dependencies": { - "@types/http-cache-semantics": "^4.0.4", - "get-stream": "^9.0.1", - "http-cache-semantics": "^4.2.0", - "keyv": "^5.5.4", - "mimic-response": "^4.0.0", - "normalize-url": "^8.1.0", - "responselike": "^4.0.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", - "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", - "license": "MIT", - "dependencies": { - "@sec-ant/readable-stream": "^0.4.1", - "is-stream": "^4.0.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cacheable-request/node_modules/is-stream": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", - "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001715", - "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001715.tgz", - "integrity": "sha512-7ptkFGMm2OAOgvZpwgA4yjQ5SQbrNVGdRjzH0pBdy1Fasvcr+KAeECmbCAECzTuDuoX0FCY8KzUxjf9+9kfZEw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/chardet": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", - "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", - "license": "MIT" - }, - "node_modules/chownr": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", - "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmmirror.com/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.4.3", - "resolved": "https://registry.npmmirror.com/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", - "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", - "license": "MIT" - }, - "node_modules/cli-boxes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", - "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", - "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", - "license": "MIT", - "dependencies": { - "restore-cursor": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-spinners": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", - "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", - "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", - "license": "MIT", - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/cli-truncate/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", - "license": "MIT" - }, - "node_modules/cli-truncate/node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/node_modules/slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/cli-truncate/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/clipboardy": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-5.0.1.tgz", - "integrity": "sha512-pJ5ZDWjOT593Nli4TqlRLy33KomlAPxIFntMFxXrCqJON1cGcGPT5nNFxRxJ9m4HbfrccsYve7XwXjywW6nXVw==", - "license": "MIT", - "dependencies": { - "execa": "^9.6.0", - "is-wayland": "^0.1.0", - "is-wsl": "^3.1.0", - "is64bit": "^2.0.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clipboardy/node_modules/execa": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-9.6.1.tgz", - "integrity": "sha512-9Be3ZoN4LmYR90tUoVu2te2BsbzHfhJyfEiAVfz7N5/zv+jduIfLrV2xdQXOHbaD6KgpGdO9PRPM1Y4Q9QkPkA==", - "license": "MIT", - "dependencies": { - "@sindresorhus/merge-streams": "^4.0.0", - "cross-spawn": "^7.0.6", - "figures": "^6.1.0", - "get-stream": "^9.0.0", - "human-signals": "^8.0.1", - "is-plain-obj": "^4.1.0", - "is-stream": "^4.0.1", - "npm-run-path": "^6.0.0", - "pretty-ms": "^9.2.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^4.0.0", - "yoctocolors": "^2.1.1" - }, - "engines": { - "node": "^18.19.0 || >=20.5.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/clipboardy/node_modules/get-stream": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", - "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", - "license": "MIT", - "dependencies": { - "@sec-ant/readable-stream": "^0.4.1", - "is-stream": "^4.0.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clipboardy/node_modules/human-signals": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-8.0.1.tgz", - "integrity": "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==", - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/clipboardy/node_modules/is-stream": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", - "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clipboardy/node_modules/npm-run-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz", - "integrity": "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==", - "license": "MIT", - "dependencies": { - "path-key": "^4.0.0", - "unicorn-magic": "^0.3.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clipboardy/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clipboardy/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/clipboardy/node_modules/strip-final-newline": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", - "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clipboardy/node_modules/unicorn-magic": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", - "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmmirror.com/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmmirror.com/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/code-excerpt": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz", - "integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==", - "license": "MIT", - "dependencies": { - "convert-to-spaces": "^2.0.1" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/command-exists": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", - "license": "MIT" - }, - "node_modules/comment-json": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.4.1.tgz", - "integrity": "sha512-r1To31BQD5060QdkC+Iheai7gHwoSZobzunqkf2/kQ6xIAfJyrKNAFUwdKvkK7Qgu7pVTKQEa7ok7Ed3ycAJgg==", - "license": "MIT", - "dependencies": { - "array-timsort": "^1.0.3", - "core-util-is": "^1.0.3", - "esprima": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", - "license": "MIT", - "dependencies": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, - "node_modules/content-disposition": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", - "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" - }, - "node_modules/convert-to-spaces": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz", - "integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==", - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", - "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", - "license": "MIT", - "engines": { - "node": ">=6.6.0" - } - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "license": "MIT" - }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "license": "MIT", - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/create-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/create-jest/-/create-jest-29.7.0.tgz", - "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "license": "MIT", - "engines": { - "node": ">= 12" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decompress-response": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-10.0.0.tgz", - "integrity": "sha512-oj7KWToJuuxlPr7VV0vabvxEIiqNMo+q0NueIiL3XhtwC6FVOX7Hr1c0C4eD0bmf7Zr+S/dSf2xvkH3Ad6sU3Q==", - "license": "MIT", - "dependencies": { - "mimic-response": "^4.0.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/dedent": { - "version": "1.5.3", - "resolved": "https://registry.npmmirror.com/dedent/-/dedent-1.5.3.tgz", - "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/default-browser": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.4.0.tgz", - "integrity": "sha512-XDuvSq38Hr1MdN47EDvYtx3U0MTqpCEn+F6ft8z2vYDzMrvQhVp0ui9oQdqW3MvK3vqUETglt1tVGgjLuJ5izg==", - "license": "MIT", - "dependencies": { - "bundle-name": "^4.1.0", - "default-browser-id": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser-id": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", - "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/define-lazy-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", - "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/devlop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", - "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", - "license": "MIT", - "dependencies": { - "dequal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/diff": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", - "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmmirror.com/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "BSD-2-Clause" - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", - "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/dot-prop": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", - "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", - "license": "MIT", - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/dotenv": { - "version": "16.5.0", - "resolved": "https://registry.npmmirror.com/dotenv/-/dotenv-16.5.0.tgz", - "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/duplexify": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz", - "integrity": "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.2" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "license": "MIT" - }, - "node_modules/ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "license": "MIT" - }, - "node_modules/electron-to-chromium": { - "version": "1.5.141", - "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.141.tgz", - "integrity": "sha512-qS+qH9oqVYc1ooubTiB9l904WVyM6qNYxtOEEGReoZXw3xlqeYdFr5GclNzbkAufWgwWLEPoDi3d9MoRwwIjGw==", - "dev": true, - "license": "ISC" - }, - "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmmirror.com/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/encodeurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", - "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", - "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/environment": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", - "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-toolkit": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.42.0.tgz", - "integrity": "sha512-SLHIyY7VfDJBM8clz4+T2oquwTQxEzu263AyhVK4jREOAwJ+8eebaa4wM3nlvnAqhDrMm2EsA6hWHaQsMPQ1nA==", - "license": "MIT", - "workspaces": [ - "docs", - "benchmarks" - ] - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "license": "MIT" - }, - "node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/eventid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/eventid/-/eventid-2.0.1.tgz", - "integrity": "sha512-sPNTqiMokAvV048P2c9+foqVJzk49o6d4e0D/sq5jog3pw+4kBgyR0gaM1FM7Mx6Kzd9dztesh9oYz1LWWOpzw==", - "license": "Apache-2.0", - "dependencies": { - "uuid": "^8.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/eventid/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/eventsource": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", - "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", - "license": "MIT", - "dependencies": { - "eventsource-parser": "^3.0.1" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/eventsource-parser": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz", - "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==", - "license": "MIT", - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmmirror.com/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/express": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", - "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", - "license": "MIT", - "dependencies": { - "accepts": "^2.0.0", - "body-parser": "^2.2.1", - "content-disposition": "^1.0.0", - "content-type": "^1.0.5", - "cookie": "^0.7.1", - "cookie-signature": "^1.2.1", - "debug": "^4.4.0", - "depd": "^2.0.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "finalhandler": "^2.1.0", - "fresh": "^2.0.0", - "http-errors": "^2.0.0", - "merge-descriptors": "^2.0.0", - "mime-types": "^3.0.0", - "on-finished": "^2.4.1", - "once": "^1.4.0", - "parseurl": "^1.3.3", - "proxy-addr": "^2.0.7", - "qs": "^6.14.0", - "range-parser": "^1.2.1", - "router": "^2.2.0", - "send": "^1.1.0", - "serve-static": "^2.2.0", - "statuses": "^2.0.1", - "type-is": "^2.0.1", - "vary": "^1.1.2" - }, - "engines": { - "node": ">= 18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/express-rate-limit": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.1.tgz", - "integrity": "sha512-7iN8iPMDzOMHPUYllBEsQdWVB6fPDMPqwjBaFrgr4Jgr/+okjvzAy+UHlYYL/Vs0OsOrMkwS6PJDkFlJwoxUnw==", - "license": "MIT", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://github.com/sponsors/express-rate-limit" - }, - "peerDependencies": { - "express": ">= 4.11" - } - }, - "node_modules/express/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express/node_modules/mime-types": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", - "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "license": "MIT" - }, - "node_modules/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "license": "BSD-2-Clause", - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, - "node_modules/extract-zip/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "license": "MIT", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "license": "MIT" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "license": "MIT" - }, - "node_modules/fast-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", - "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fastify" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fastify" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "license": "MIT", - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, - "node_modules/figures": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz", - "integrity": "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==", - "license": "MIT", - "dependencies": { - "is-unicode-supported": "^2.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", - "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", - "license": "MIT", - "dependencies": { - "debug": "^4.4.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "on-finished": "^2.4.1", - "parseurl": "^1.3.3", - "statuses": "^2.0.1" - }, - "engines": { - "node": ">= 18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up-simple": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.1.tgz", - "integrity": "sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/form-data": { - "version": "4.0.2", - "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.2.tgz", - "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/form-data-encoder": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-4.1.0.tgz", - "integrity": "sha512-G6NsmEW15s0Uw9XnCg+33H3ViYRyiM0hMrMhhqQOR8NFc5GhYrI+6I3u7OTw7b91J2g8rtvMBZJDbcGb2YUniw==", - "license": "MIT", - "engines": { - "node": ">= 18" - } - }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "license": "MIT", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/forwarded-parse": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/forwarded-parse/-/forwarded-parse-2.1.2.tgz", - "integrity": "sha512-alTFZZQDKMporBH77856pXgzhEzaUVmLCDk+egLgIgHst3Tpndzz8MnKe+GzRJRfvVdn69HhpW7cmXzvtLvJAw==", - "license": "MIT" - }, - "node_modules/fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", - "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/fzf": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fzf/-/fzf-0.5.2.tgz", - "integrity": "sha512-Tt4kuxLXFKHy8KT40zwsUPUkg1CrsgY25FxA2U/j/0WgEDCk3ddc/zLTCCcbSHX9FcKtLuVaDGtGE/STWC+j3Q==", - "license": "BSD-3-Clause" - }, - "node_modules/gaxios": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.7.1.tgz", - "integrity": "sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ==", - "license": "Apache-2.0", - "dependencies": { - "extend": "^3.0.2", - "https-proxy-agent": "^7.0.1", - "is-stream": "^2.0.0", - "node-fetch": "^2.6.9", - "uuid": "^9.0.1" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/gcp-metadata": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.1.tgz", - "integrity": "sha512-a4tiq7E0/5fTjxPAaH4jpjkSv/uCaU2p5KC6HVGrvl0cDjA8iBZv4vv1gyzlmK0ZUKqwpOyQMKzZQe3lTit77A==", - "license": "Apache-2.0", - "dependencies": { - "gaxios": "^6.1.1", - "google-logging-utils": "^0.0.2", - "json-bigint": "^1.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-east-asian-width": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", - "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmmirror.com/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/google-auth-library": { - "version": "9.15.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.15.1.tgz", - "integrity": "sha512-Jb6Z0+nvECVz+2lzSMt9u98UsoakXxA2HGHMCxh+so3n90XgYWkq5dur19JAJV7ONiJY22yBTyJB1TSkvPq9Ng==", - "license": "Apache-2.0", - "dependencies": { - "base64-js": "^1.3.0", - "ecdsa-sig-formatter": "^1.0.11", - "gaxios": "^6.1.1", - "gcp-metadata": "^6.1.0", - "gtoken": "^7.0.0", - "jws": "^4.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/google-gax": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-4.6.1.tgz", - "integrity": "sha512-V6eky/xz2mcKfAd1Ioxyd6nmA61gao3n01C+YeuIwu3vzM9EDR6wcVzMSIbLMDXWeoi9SHYctXuKYC5uJUT3eQ==", - "license": "Apache-2.0", - "dependencies": { - "@grpc/grpc-js": "^1.10.9", - "@grpc/proto-loader": "^0.7.13", - "@types/long": "^4.0.0", - "abort-controller": "^3.0.0", - "duplexify": "^4.0.0", - "google-auth-library": "^9.3.0", - "node-fetch": "^2.7.0", - "object-hash": "^3.0.0", - "proto3-json-serializer": "^2.0.2", - "protobufjs": "^7.3.2", - "retry-request": "^7.0.0", - "uuid": "^9.0.1" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/google-gax/node_modules/@grpc/proto-loader": { - "version": "0.7.15", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.15.tgz", - "integrity": "sha512-tMXdRCfYVixjuFK+Hk0Q1s38gV9zDiDJfWL3h1rv4Qc39oILCu1TRTDt7+fGUI8K4G1Fj125Hx/ru3azECWTyQ==", - "license": "Apache-2.0", - "dependencies": { - "lodash.camelcase": "^4.3.0", - "long": "^5.0.0", - "protobufjs": "^7.2.5", - "yargs": "^17.7.2" - }, - "bin": { - "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/google-logging-utils": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-0.0.2.tgz", - "integrity": "sha512-NEgUnEcBiP5HrPzufUkBzJOD/Sxsco3rLNo1F1TNf7ieU8ryUzBhqba8r756CjLX7rn3fHl6iLEwPYuqpoKgQQ==", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/googleapis": { - "version": "137.1.0", - "resolved": "https://registry.npmjs.org/googleapis/-/googleapis-137.1.0.tgz", - "integrity": "sha512-2L7SzN0FLHyQtFmyIxrcXhgust77067pkkduqkbIpDuj9JzVnByxsRrcRfUMFQam3rQkWW2B0f1i40IwKDWIVQ==", - "license": "Apache-2.0", - "dependencies": { - "google-auth-library": "^9.0.0", - "googleapis-common": "^7.0.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/googleapis-common": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/googleapis-common/-/googleapis-common-7.2.0.tgz", - "integrity": "sha512-/fhDZEJZvOV3X5jmD+fKxMqma5q2Q9nZNSF3kn1F18tpxmA86BcTxAGBQdM0N89Z3bEaIs+HVznSmFJEAmMTjA==", - "license": "Apache-2.0", - "dependencies": { - "extend": "^3.0.2", - "gaxios": "^6.0.3", - "google-auth-library": "^9.7.0", - "qs": "^6.7.0", - "url-template": "^2.0.8", - "uuid": "^9.0.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/got": { - "version": "14.6.5", - "resolved": "https://registry.npmjs.org/got/-/got-14.6.5.tgz", - "integrity": "sha512-Su87c0NNeg97de1sO02gy9I8EmE7DCJ1gzcFLcgGpYeq2PnLg4xz73MWrp6HjqbSsjb6Glf4UBDW6JNyZA6uSg==", - "license": "MIT", - "dependencies": { - "@sindresorhus/is": "^7.0.1", - "byte-counter": "^0.1.0", - "cacheable-lookup": "^7.0.0", - "cacheable-request": "^13.0.12", - "decompress-response": "^10.0.0", - "form-data-encoder": "^4.0.2", - "http2-wrapper": "^2.2.1", - "keyv": "^5.5.3", - "lowercase-keys": "^3.0.0", - "p-cancelable": "^4.0.1", - "responselike": "^4.0.2", - "type-fest": "^4.26.1" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" - } - }, - "node_modules/got/node_modules/type-fest": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", - "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "license": "ISC" - }, - "node_modules/gradient-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/gradient-string/-/gradient-string-2.0.2.tgz", - "integrity": "sha512-rEDCuqUQ4tbD78TpzsMtt5OIf0cBCSDWSJtUDaF6JsAh+k0v9r++NzxNEG87oDZx9ZwGhD8DaezR2L/yrw0Jdw==", - "license": "MIT", - "dependencies": { - "chalk": "^4.1.2", - "tinygradient": "^1.1.5" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/gtoken": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", - "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", - "license": "MIT", - "dependencies": { - "gaxios": "^6.0.0", - "jws": "^4.0.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/highlight.js": { - "version": "11.11.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", - "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/hosted-git-info": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", - "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", - "license": "ISC", - "dependencies": { - "lru-cache": "^10.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/hosted-git-info/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "license": "ISC" - }, - "node_modules/html-entities": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.6.0.tgz", - "integrity": "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/mdevils" - }, - { - "type": "patreon", - "url": "https://patreon.com/mdevils" - } - ], - "license": "MIT" - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true, - "license": "MIT" - }, - "node_modules/html-to-text": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-9.0.5.tgz", - "integrity": "sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg==", - "license": "MIT", - "dependencies": { - "@selderee/plugin-htmlparser2": "^0.11.0", - "deepmerge": "^4.3.1", - "dom-serializer": "^2.0.0", - "htmlparser2": "^8.0.2", - "selderee": "^0.11.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/htmlparser2": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", - "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "entities": "^4.4.0" - } - }, - "node_modules/http-cache-semantics": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", - "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", - "license": "BSD-2-Clause" - }, - "node_modules/http-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", - "license": "MIT", - "dependencies": { - "depd": "~2.0.0", - "inherits": "~2.0.4", - "setprototypeof": "~1.2.0", - "statuses": "~2.0.2", - "toidentifier": "~1.0.1" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "license": "MIT", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/http-proxy-agent/node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/http2-wrapper": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", - "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", - "license": "MIT", - "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.2.0" - }, - "engines": { - "node": ">=10.19.0" - } - }, - "node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/iconv-lite": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", - "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-in-the-middle": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.15.0.tgz", - "integrity": "sha512-bpQy+CrsRmYmoPMAE/0G33iwRqwW4ouqdRg8jgbH3aKuCtOc8lxgmYXg2dMM92CRiGP660EtBcymH/eVUpCSaA==", - "license": "Apache-2.0", - "dependencies": { - "acorn": "^8.14.0", - "acorn-import-attributes": "^1.9.5", - "cjs-module-lexer": "^1.2.2", - "module-details-from-path": "^1.0.3" - } - }, - "node_modules/import-local": { - "version": "3.2.0", - "resolved": "https://registry.npmmirror.com/import-local/-/import-local-3.2.0.tgz", - "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmmirror.com/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", - "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/index-to-position": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.2.0.tgz", - "integrity": "sha512-Yg7+ztRkqslMAS2iFaU+Oa4KTSidr63OsFGlOrJoW981kIYO3CGCS3wA95P1mUi/IVSJkn0D479KTJpVpvFNuw==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "license": "ISC" - }, - "node_modules/ink": { - "name": "@jrichman/ink", - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/@jrichman/ink/-/ink-6.4.6.tgz", - "integrity": "sha512-QHl6l1cl3zPCaRMzt9TUbTX6Q5SzvkGEZDDad0DmSf5SPmT1/90k6pGPejEvDCJprkitwObXpPaTWGHItqsy4g==", - "license": "MIT", - "dependencies": { - "@alcalzone/ansi-tokenize": "^0.2.1", - "ansi-escapes": "^7.0.0", - "ansi-styles": "^6.2.1", - "auto-bind": "^5.0.1", - "chalk": "^5.6.0", - "cli-boxes": "^3.0.0", - "cli-cursor": "^4.0.0", - "cli-truncate": "^4.0.0", - "code-excerpt": "^4.0.0", - "es-toolkit": "^1.39.10", - "indent-string": "^5.0.0", - "is-in-ci": "^2.0.0", - "mnemonist": "^0.40.3", - "patch-console": "^2.0.0", - "react-reconciler": "^0.32.0", - "signal-exit": "^3.0.7", - "slice-ansi": "^7.1.0", - "stack-utils": "^2.0.6", - "string-width": "^8.1.0", - "type-fest": "^4.27.0", - "wrap-ansi": "^9.0.0", - "ws": "^8.18.0", - "yoga-layout": "~3.2.1" - }, - "engines": { - "node": ">=20" - }, - "peerDependencies": { - "@types/react": ">=19.0.0", - "react": ">=19.0.0", - "react-devtools-core": "^6.1.2" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "react-devtools-core": { - "optional": true - } - } - }, - "node_modules/ink-gradient": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ink-gradient/-/ink-gradient-3.0.0.tgz", - "integrity": "sha512-OVyPBovBxE1tFcBhSamb+P1puqDP6pG3xFe2W9NiLgwUZd9RbcjBeR7twLbliUT9navrUstEf1ZcPKKvx71BsQ==", - "license": "MIT", - "dependencies": { - "@types/gradient-string": "^1.1.2", - "gradient-string": "^2.0.2", - "prop-types": "^15.8.1", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - }, - "peerDependencies": { - "ink": ">=4" - } - }, - "node_modules/ink-gradient/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ink-gradient/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/ink-spinner": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ink-spinner/-/ink-spinner-5.0.0.tgz", - "integrity": "sha512-EYEasbEjkqLGyPOUc8hBJZNuC5GvXGMLu0w5gdTNskPc7Izc5vO3tdQEYnzvshucyGCBXc86ig0ujXPMWaQCdA==", - "license": "MIT", - "dependencies": { - "cli-spinners": "^2.7.0" - }, - "engines": { - "node": ">=14.16" - }, - "peerDependencies": { - "ink": ">=4.0.0", - "react": ">=18.0.0" - } - }, - "node_modules/ink/node_modules/ansi-escapes": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.2.0.tgz", - "integrity": "sha512-g6LhBsl+GBPRWGWsBtutpzBYuIIdBkLEvad5C/va/74Db018+5TZiyA26cZJAr3Rft5lprVqOIPxf5Vid6tqAw==", - "license": "MIT", - "dependencies": { - "environment": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ink/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ink/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ink/node_modules/chalk": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", - "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/ink/node_modules/emoji-regex": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", - "license": "MIT" - }, - "node_modules/ink/node_modules/string-width": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.1.0.tgz", - "integrity": "sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg==", - "license": "MIT", - "dependencies": { - "get-east-asian-width": "^1.3.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ink/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/ink/node_modules/type-fest": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", - "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ink/node_modules/wrap-ansi": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", - "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/ink/node_modules/wrap-ansi/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmmirror.com/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/is-in-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-in-ci/-/is-in-ci-2.0.0.tgz", - "integrity": "sha512-cFeerHriAnhrQSbpAxL37W1wcJKUUX07HyLWZCW1URJT/ra3GyUTzBgUnh24TMVfNTV2Hij2HLxkPHFZfOZy5w==", - "license": "MIT", - "bin": { - "is-in-ci": "cli.js" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "license": "MIT", - "dependencies": { - "is-docker": "^3.0.0" - }, - "bin": { - "is-inside-container": "cli.js" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", - "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-promise": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", - "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", - "license": "MIT" - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-unicode-supported": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", - "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-wayland": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-wayland/-/is-wayland-0.1.0.tgz", - "integrity": "sha512-QkbMsWkIfkrzOPxenwye0h56iAXirZYHG9eHVPb22fO9y+wPbaX/CHacOWBa/I++4ohTcByimhM1/nyCsH8KNA==", - "license": "MIT", - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-wsl": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", - "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", - "license": "MIT", - "dependencies": { - "is-inside-container": "^1.0.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is64bit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is64bit/-/is64bit-2.0.0.tgz", - "integrity": "sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw==", - "license": "MIT", - "dependencies": { - "system-architecture": "^0.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "license": "ISC" - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmmirror.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "6.0.3", - "resolved": "https://registry.npmmirror.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", - "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmmirror.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jackspeak": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", - "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest/-/jest-29.7.0.tgz", - "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz", - "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", - "dev": true, - "license": "MIT", - "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-circus/-/jest-circus-29.7.0.tgz", - "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-cli/-/jest-cli-29.7.0.tgz", - "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-docblock/-/jest-docblock-29.7.0.tgz", - "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-each/-/jest-each-29.7.0.tgz", - "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz", - "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmmirror.com/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", - "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-mock": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmmirror.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmmirror.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-resolve/-/jest-resolve-29.7.0.tgz", - "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", - "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-runner/-/jest-runner-29.7.0.tgz", - "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-runtime/-/jest-runtime-29.7.0.tgz", - "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-validate/-/jest-validate-29.7.0.tgz", - "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-watcher": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-watcher/-/jest-watcher-29.7.0.tgz", - "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/jose": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/jose/-/jose-6.1.3.tgz", - "integrity": "sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/panva" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "license": "MIT", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmmirror.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "license": "MIT" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jwa": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", - "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", - "license": "MIT", - "dependencies": { - "buffer-equal-constant-time": "^1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jws": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz", - "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", - "license": "MIT", - "dependencies": { - "jwa": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/keyv": { - "version": "5.5.5", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.5.5.tgz", - "integrity": "sha512-FA5LmZVF1VziNc0bIdCSA1IoSVnDCqE8HJIZZv2/W8YmoAM50+tnUgJR/gQZwEeIMleuIOnRnHA/UaZRNeV4iQ==", - "license": "MIT", - "dependencies": { - "@keyv/serialize": "^1.1.1" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmmirror.com/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ky": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/ky/-/ky-1.14.0.tgz", - "integrity": "sha512-Rczb6FMM6JT0lvrOlP5WUOCB7s9XKxzwgErzhKlKde1bEV90FXplV1o87fpt4PU/asJFiqjYJxAJyzJhcrxOsQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sindresorhus/ky?sponsor=1" - } - }, - "node_modules/latest-version": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-9.0.0.tgz", - "integrity": "sha512-7W0vV3rqv5tokqkBAFV1LbR7HPOWzXQDpDgEuib/aJ1jsZZx6x3c2mBI+TJhJzOhkGeaLbCKEHXEXLfirtG2JA==", - "license": "MIT", - "dependencies": { - "package-json": "^10.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/leac": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/leac/-/leac-0.6.0.tgz", - "integrity": "sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==", - "license": "MIT", - "funding": { - "url": "https://ko-fi.com/killymxi" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "license": "MIT" - }, - "node_modules/long": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", - "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", - "license": "Apache-2.0" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/lowercase-keys": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", - "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lowlight": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.3.0.tgz", - "integrity": "sha512-0JNhgFoPvP6U6lE/UdVsSq99tn6DhjjpAj5MxG49ewd2mOBVtwWYIT8ClyABhq198aXXODMU6Ox8DrGy/CpTZQ==", - "license": "MIT", - "dependencies": { - "@types/hast": "^3.0.0", - "devlop": "^1.0.0", - "highlight.js": "~11.11.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmmirror.com/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/marked": { - "version": "15.0.12", - "resolved": "https://registry.npmjs.org/marked/-/marked-15.0.12.tgz", - "integrity": "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA==", - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/media-typer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", - "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/merge-descriptors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", - "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/mime/-/mime-4.0.7.tgz", - "integrity": "sha512-2OfDPL+e03E0LrXaGYOtTFIYhiuzep94NSsuhrNULq+stylcJedcHdzHtz0atMUuGwJfFYs0YL5xeC/Ca2x0eQ==", - "funding": [ - "https://github.com/sponsors/broofa" - ], - "license": "MIT", - "bin": { - "mime": "bin/cli.js" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/mimic-response": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", - "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/minizlib": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", - "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", - "license": "MIT", - "dependencies": { - "minipass": "^7.1.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/mnemonist": { - "version": "0.40.3", - "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.40.3.tgz", - "integrity": "sha512-Vjyr90sJ23CKKH/qPAgUKicw/v6pRoamxIEDFOF8uSgFME7DqPRpHgRTejWVjkdGg5dXj0/NyxZHZ9bcjH+2uQ==", - "license": "MIT", - "dependencies": { - "obliterator": "^2.0.4" - } - }, - "node_modules/module-details-from-path": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.4.tgz", - "integrity": "sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==", - "license": "MIT" - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/nan": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.24.0.tgz", - "integrity": "sha512-Vpf9qnVW1RaDkoNKFUvfxqAbtI8ncb8OJlqZ9wwpXzWPEsvsB1nvdUi6oYrHIkQ1Y/tMDnr1h4nczS0VB9Xykg==", - "license": "MIT", - "optional": true - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/negotiator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", - "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/node-addon-api": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.5.0.tgz", - "integrity": "sha512-/bRZty2mXUIFY/xU5HLvveNHlswNJej+RnxBjOMkidWfwZzgTbPG1E3K5TOxRLOR+5hX7bSofy8yf1hZevMS8A==", - "license": "MIT", - "engines": { - "node": "^18 || ^20 || >= 21" - } - }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "deprecated": "Use your platform's native DOMException instead", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-gyp-build": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", - "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", - "license": "MIT", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmmirror.com/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-pty": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-1.0.0.tgz", - "integrity": "sha512-wtBMWWS7dFZm/VgqElrTvtfMq4GzJ6+edFI0Y0zyzygUSZMgZdraDUMUhCIvkjhJjme15qWmbyJbtAx4ot4uZA==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "nan": "^2.17.0" - } - }, - "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", - "dev": true, - "license": "MIT" - }, - "node_modules/normalize-package-data": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", - "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^7.0.0", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-url": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.1.0.tgz", - "integrity": "sha512-X06Mfd/5aKsRHc0O0J5CUedwnPmnDtLF2+nq+KN9KSDlJHkPuh0JUviWjEWMe0SW/9TDdSLVPuk7L5gGTIA1/w==", - "license": "MIT", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/obliterator": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.5.tgz", - "integrity": "sha512-42CPE9AhahZRsMNslczq0ctAEtqk8Eka26QofnqC346BZdHDySk3LWka23LI7ULIw11NmltpiLagIq8gBozxTw==", - "license": "MIT" - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/open": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", - "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", - "license": "MIT", - "dependencies": { - "default-browser": "^5.2.1", - "define-lazy-prop": "^3.0.0", - "is-inside-container": "^1.0.0", - "wsl-utils": "^0.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-cancelable": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-4.0.1.tgz", - "integrity": "sha512-wBowNApzd45EIKdO1LaU+LrMBwAcjfPaYtVzV3lmfM3gf8Z4CHZsiIqlM8TZZ8okYvh5A1cP6gTfCRQtwUpaUg==", - "license": "MIT", - "engines": { - "node": ">=14.16" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/package-json": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-10.0.1.tgz", - "integrity": "sha512-ua1L4OgXSBdsu1FPb7F3tYH0F48a6kxvod4pLUlGY9COeJAJQNX/sNH2IiEmsxw7lqYiAwrdHMjz1FctOsyDQg==", - "license": "MIT", - "dependencies": { - "ky": "^1.2.0", - "registry-auth-token": "^5.0.2", - "registry-url": "^6.0.1", - "semver": "^7.6.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "license": "BlueOak-1.0.0" - }, - "node_modules/package-json/node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmmirror.com/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse-ms": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz", - "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parseley": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/parseley/-/parseley-0.12.1.tgz", - "integrity": "sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==", - "license": "MIT", - "dependencies": { - "leac": "^0.6.0", - "peberminta": "^0.9.0" - }, - "funding": { - "url": "https://ko-fi.com/killymxi" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/patch-console": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/patch-console/-/patch-console-2.0.0.tgz", - "integrity": "sha512-0YNdUceMdaQwoKce1gatDScmMo5pu/tfABfnzEqeG0gtTmd7mh/WcwgUjtAeOU7N8nFFlbQBnFK2gXW5fGvmMA==", - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "license": "MIT" - }, - "node_modules/path-scurry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", - "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==", - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^11.0.0", - "minipass": "^7.1.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz", - "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==", - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/path-to-regexp": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", - "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/peberminta": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/peberminta/-/peberminta-0.9.0.tgz", - "integrity": "sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==", - "license": "MIT", - "funding": { - "url": "https://ko-fi.com/killymxi" - } - }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/picomatch-browser": { - "version": "2.2.6", - "resolved": "https://registry.npmmirror.com/picomatch-browser/-/picomatch-browser-2.2.6.tgz", - "integrity": "sha512-0ypsOQt9D4e3hziV8O4elD9uN0z/jtUEfxVRtNaAAtXIyUx9m/SzlO020i8YNL2aL/E6blOvvHQcin6HZlFy/w==", - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.7", - "resolved": "https://registry.npmmirror.com/pirates/-/pirates-4.0.7.tgz", - "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkce-challenge": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz", - "integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==", - "license": "MIT", - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmmirror.com/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/pretty-ms": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.3.0.tgz", - "integrity": "sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==", - "license": "MIT", - "dependencies": { - "parse-ms": "^4.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmmirror.com/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/prop-types/node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "license": "MIT" - }, - "node_modules/proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", - "license": "ISC" - }, - "node_modules/proto3-json-serializer": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-2.0.2.tgz", - "integrity": "sha512-SAzp/O4Yh02jGdRc+uIrGoe87dkN/XtwxfZ4ZyafJHymd79ozp5VG5nyZ7ygqPM5+cpLDjjGnYFUkngonyDPOQ==", - "license": "Apache-2.0", - "dependencies": { - "protobufjs": "^7.2.5" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/protobufjs": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", - "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "license": "MIT" - }, - "node_modules/pump": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", - "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/pumpify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-2.0.1.tgz", - "integrity": "sha512-m7KOje7jZxrmutanlkS1daj1dS6z6BgslzOXmcSEpIlCxM3VJH7lG5QLeck/6hgF6F4crFf01UtQmNsJfweTAw==", - "license": "MIT", - "dependencies": { - "duplexify": "^4.1.1", - "inherits": "^2.0.3", - "pump": "^3.0.0" - } - }, - "node_modules/pure-rand": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/pure-rand/-/pure-rand-6.1.0.tgz", - "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ], - "license": "MIT" - }, - "node_modules/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmmirror.com/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/rate-limiter-flexible": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/rate-limiter-flexible/-/rate-limiter-flexible-4.0.1.tgz", - "integrity": "sha512-2/dGHpDFpeA0+755oUkW+EKyklqLS9lu0go9pDsbhqQjZcxfRyJ6LA4JI0+HAdZ2bemD/oOjUeZQB2lCZqXQfQ==", - "license": "ISC" - }, - "node_modules/raw-body": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", - "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", - "license": "MIT", - "dependencies": { - "bytes": "~3.1.2", - "http-errors": "~2.0.1", - "iconv-lite": "~0.7.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react": { - "version": "19.2.1", - "resolved": "https://registry.npmjs.org/react/-/react-19.2.1.tgz", - "integrity": "sha512-DGrYcCWK7tvYMnWh79yrPHt+vdx9tY+1gPZa7nJQtO/p8bLTDaHp4dzwEhQB7pZ4Xe3ok4XKuEPrVuc+wlpkmw==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true, - "license": "MIT" - }, - "node_modules/react-reconciler": { - "version": "0.32.0", - "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.32.0.tgz", - "integrity": "sha512-2NPMOzgTlG0ZWdIf3qG+dcbLSoAc/uLfOwckc3ofy5sSK0pLJqnQLpUFxvGcN2rlXSjnVtGeeFLNimCQEj5gOQ==", - "license": "MIT", - "dependencies": { - "scheduler": "^0.26.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "react": "^19.1.0" - } - }, - "node_modules/read-package-up": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/read-package-up/-/read-package-up-11.0.0.tgz", - "integrity": "sha512-MbgfoNPANMdb4oRBNg5eqLbB2t2r+o5Ua1pNt8BqGp4I0FJZhuVSOj3PaBPni4azWuSzEdNn2evevzVmEk1ohQ==", - "license": "MIT", - "dependencies": { - "find-up-simple": "^1.0.0", - "read-pkg": "^9.0.0", - "type-fest": "^4.6.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-package-up/node_modules/type-fest": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", - "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-9.0.1.tgz", - "integrity": "sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA==", - "license": "MIT", - "dependencies": { - "@types/normalize-package-data": "^2.4.3", - "normalize-package-data": "^6.0.0", - "parse-json": "^8.0.0", - "type-fest": "^4.6.0", - "unicorn-magic": "^0.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg/node_modules/parse-json": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz", - "integrity": "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "index-to-position": "^1.1.0", - "type-fest": "^4.39.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", - "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/registry-auth-token": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.1.0.tgz", - "integrity": "sha512-GdekYuwLXLxMuFTwAPg5UKGLW/UXzQrZvH/Zj791BQif5T05T0RsaLfHc9q3ZOKi7n+BoprPD9mJ0O0k4xzUlw==", - "license": "MIT", - "dependencies": { - "@pnpm/npm-conf": "^2.1.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/registry-url": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz", - "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==", - "license": "MIT", - "dependencies": { - "rc": "1.2.8" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-in-the-middle": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-7.5.2.tgz", - "integrity": "sha512-gAZ+kLqBdHarXB64XpAe2VCjB7rIRv+mU8tfRWziHRJ5umKsIHN2tLLv6EtMw7WCdP19S0ERVMldNvxYCHnhSQ==", - "license": "MIT", - "dependencies": { - "debug": "^4.3.5", - "module-details-from-path": "^1.0.3", - "resolve": "^1.22.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "license": "MIT" - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve.exports": { - "version": "2.0.3", - "resolved": "https://registry.npmmirror.com/resolve.exports/-/resolve.exports-2.0.3.tgz", - "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/responselike": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-4.0.2.tgz", - "integrity": "sha512-cGk8IbWEAnaCpdAt1BHzJ3Ahz5ewDJa0KseTsE3qIRMJ3C698W8psM7byCeWVpd/Ha7FUYzuRVzXoKoM6nRUbA==", - "license": "MIT", - "dependencies": { - "lowercase-keys": "^3.0.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/restore-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", - "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", - "license": "MIT", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/retry-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-7.0.2.tgz", - "integrity": "sha512-dUOvLMJ0/JJYEn8NrpOaGNE7X3vpI5XlZS/u0ANjqtcZVKnIxP7IgCFwrKTxENw29emmwug53awKtaMm4i9g5w==", - "license": "MIT", - "dependencies": { - "@types/request": "^2.48.8", - "extend": "^3.0.2", - "teeny-request": "^9.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/rimraf": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", - "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", - "license": "ISC", - "dependencies": { - "glob": "^10.3.7" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", - "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/rimraf/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "license": "ISC" - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/router": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", - "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", - "license": "MIT", - "dependencies": { - "debug": "^4.4.0", - "depd": "^2.0.0", - "is-promise": "^4.0.0", - "parseurl": "^1.3.3", - "path-to-regexp": "^8.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/run-applescript": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", - "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" - }, - "node_modules/scheduler": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.26.0.tgz", - "integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==", - "license": "MIT" - }, - "node_modules/selderee": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/selderee/-/selderee-0.11.0.tgz", - "integrity": "sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA==", - "license": "MIT", - "dependencies": { - "parseley": "^0.12.0" - }, - "funding": { - "url": "https://ko-fi.com/killymxi" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/send": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", - "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", - "license": "MIT", - "dependencies": { - "debug": "^4.3.5", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "fresh": "^2.0.0", - "http-errors": "^2.0.0", - "mime-types": "^3.0.1", - "ms": "^2.1.3", - "on-finished": "^2.4.1", - "range-parser": "^1.2.1", - "statuses": "^2.0.1" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/send/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/send/node_modules/mime-types": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", - "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/serve-static": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz", - "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==", - "license": "MIT", - "dependencies": { - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "parseurl": "^1.3.3", - "send": "^1.2.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "license": "ISC" - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/shell-quote": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", - "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "license": "ISC" - }, - "node_modules/simple-git": { - "version": "3.30.0", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.30.0.tgz", - "integrity": "sha512-q6lxyDsCmEal/MEGhP1aVyQ3oxnagGlBDOVSIB4XUVLl1iZh0Pah6ebC9V4xBap/RfgP2WlI8EKs0WS0rMEJHg==", - "license": "MIT", - "dependencies": { - "@kwsites/file-exists": "^1.1.1", - "@kwsites/promise-deferred": "^1.1.1", - "debug": "^4.4.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/steveukx/git-js?sponsor=1" - } - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "license": "MIT" - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz", - "integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "is-fullwidth-code-point": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz", - "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==", - "license": "MIT", - "dependencies": { - "get-east-asian-width": "^1.3.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "license": "Apache-2.0", - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "license": "CC-BY-3.0" - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "license": "MIT", - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.22", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", - "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", - "license": "CC0-1.0" - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmmirror.com/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/statuses": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", - "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/stream-events": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", - "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==", - "license": "MIT", - "dependencies": { - "stubs": "^3.0.0" - } - }, - "node_modules/stream-shift": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", - "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==", - "license": "MIT" - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmmirror.com/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stubs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", - "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==", - "license": "MIT" - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/system-architecture": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/system-architecture/-/system-architecture-0.1.0.tgz", - "integrity": "sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/tar": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz", - "integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/fs-minipass": "^4.0.0", - "chownr": "^3.0.0", - "minipass": "^7.1.2", - "minizlib": "^3.1.0", - "yallist": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/tar/node_modules/yallist": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", - "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/teeny-request": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-9.0.0.tgz", - "integrity": "sha512-resvxdc6Mgb7YEThw6G6bExlXKkv6+YbuzGg9xuXxSgxJF7Ozs+o8Y9+2R3sArdWdW8nOokoQb1yrpFB0pQK2g==", - "license": "Apache-2.0", - "dependencies": { - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.9", - "stream-events": "^1.0.5", - "uuid": "^9.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/teeny-request/node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/teeny-request/node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmmirror.com/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tinycolor2": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", - "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==", - "license": "MIT" - }, - "node_modules/tinygradient": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/tinygradient/-/tinygradient-1.1.5.tgz", - "integrity": "sha512-8nIfc2vgQ4TeLnk2lFj4tRLvvJwEfQuabdsmvDdQPT0xlk9TaNtpGd6nNRxXoK6vQhN6RSzj+Cnp5tTQmpxmbw==", - "license": "MIT", - "dependencies": { - "@types/tinycolor2": "^1.4.0", - "tinycolor2": "^1.0.0" - } - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT" - }, - "node_modules/tree-sitter-bash": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/tree-sitter-bash/-/tree-sitter-bash-0.25.1.tgz", - "integrity": "sha512-7hMytuYIMoXOq24yRulgIxthE9YmggZIOHCyPTTuJcu6EU54tYD+4G39cUb28kxC6jMf/AbPfWGLQtgPTdh3xw==", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "node-addon-api": "^8.2.1", - "node-gyp-build": "^4.8.2" - }, - "peerDependencies": { - "tree-sitter": "^0.25.0" - }, - "peerDependenciesMeta": { - "tree-sitter": { - "optional": true - } - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmmirror.com/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/type-is": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", - "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", - "license": "MIT", - "dependencies": { - "content-type": "^1.0.5", - "media-typer": "^1.1.0", - "mime-types": "^3.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/type-is/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/type-is/node_modules/mime-types": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", - "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/undici": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.16.0.tgz", - "integrity": "sha512-QEg3HPMll0o3t2ourKwOeUAZ159Kn9mx5pnzHRQO8+Wixmh88YdZRiIwat0iNzNNXn0yoEtXJqFpyW7eM8BV7g==", - "license": "MIT", - "engines": { - "node": ">=20.18.1" - } - }, - "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "license": "MIT" - }, - "node_modules/unicorn-magic": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", - "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.1.3", - "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", - "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/url-template": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", - "integrity": "sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==", - "license": "BSD" - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "license": "MIT" - }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/v8-to-istanbul": { - "version": "9.3.0", - "resolved": "https://registry.npmmirror.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", - "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", - "dev": true, - "license": "ISC", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "license": "Apache-2.0", - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmmirror.com/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/web-streams-polyfill": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", - "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/web-tree-sitter": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.25.10.tgz", - "integrity": "sha512-Y09sF44/13XvgVKgO2cNDw5rGk6s26MgoZPXLESvMXeefBf7i6/73eFurre0IsTW6E14Y0ArIzhUMmjoc7xyzA==", - "license": "MIT", - "peerDependencies": { - "@types/emscripten": "^1.40.0" - }, - "peerDependenciesMeta": { - "@types/emscripten": { - "optional": true - } - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/widest-line": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", - "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", - "license": "MIT", - "dependencies": { - "string-width": "^5.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/widest-line/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/widest-line/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "license": "MIT" - }, - "node_modules/widest-line/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/widest-line/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmmirror.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/ws": { - "version": "8.18.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", - "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/wsl-utils": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", - "integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==", - "license": "MIT", - "dependencies": { - "is-wsl": "^3.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/xcase": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/xcase/-/xcase-2.0.1.tgz", - "integrity": "sha512-UmFXIPU+9Eg3E9m/728Bii0lAIuoc+6nbrNUKaRPJOFp91ih44qqGlWtxMB6kXFrRD6po+86ksHM5XHCfk6iPw==", - "license": "MIT" - }, - "node_modules/xdg-basedir": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", - "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmmirror.com/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" - }, - "node_modules/yaml": { - "version": "2.7.1", - "resolved": "https://registry.npmmirror.com/yaml/-/yaml-2.7.1.tgz", - "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==", - "license": "ISC", - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmmirror.com/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "license": "MIT", - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yoctocolors": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.2.tgz", - "integrity": "sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yoga-layout": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/yoga-layout/-/yoga-layout-3.2.1.tgz", - "integrity": "sha512-0LPOt3AxKqMdFBZA3HBAt/t/8vIKq7VaQYbuA8WxCgung+p9TVyKRYdpvCb80HcdTN2NkbIKbhNwKUfm3tQywQ==", - "license": "MIT" - }, - "node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zod-to-json-schema": { - "version": "3.25.0", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.0.tgz", - "integrity": "sha512-HvWtU2UG41LALjajJrML6uQejQhNJx+JBO9IflpSja4R03iNWfKXrj6W2h7ljuLyc1nKS+9yDyL/9tD1U/yBnQ==", - "license": "ISC", - "peerDependencies": { - "zod": "^3.25 || ^4" - } - } - } -} diff --git a/mpuniapp/code-review/package.json b/mpuniapp/code-review/package.json deleted file mode 100644 index 2c0bfb1..0000000 --- a/mpuniapp/code-review/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "uni-ai-code-review", - "version": "1.0.0", - "description": "AI 代码评审系统", - "main": "index.js", - "scripts": { - "test": "jest", - "start": "node index.js" - }, - "dependencies": { - "@gitbeaker/rest": "^42.5.0", - "@google/gemini-cli": "^0.19.1", - "axios": "^1.6.0", - "dotenv": "^16.3.1", - "minimatch": "^5.1.6", - "yaml": "^2.3.4" - }, - "devDependencies": { - "jest": "^29.7.0" - }, - "jest": { - "testEnvironment": "node", - "coverageDirectory": "./coverage", - "collectCoverageFrom": [ - "**/*.js", - "!**/*.test.js", - "!__tests__/setup.js" - ], - "setupFiles": [ - "./__tests__/setup.js" - ], - "testMatch": [ - "**/__tests__/**/*.test.js" - ] - } -} diff --git a/mpuniapp/common/api.uts b/mpuniapp/common/api.uts index e07ba9d..828d2c7 100644 --- a/mpuniapp/common/api.uts +++ b/mpuniapp/common/api.uts @@ -6,6 +6,7 @@ import { AiChatReply, AiChatRequest, + CardContact, CardProfile, CardPortalDetail, LeadEntity, @@ -15,6 +16,7 @@ import { NfcUidParams, OwnerPageData, OwnerPageQuery, + QuotaCheckResult, RadarTrack, SubmitLeadParams, RecordRadarTrackParams, @@ -160,5 +162,52 @@ export function fetchCardQrcodeSvg( }); } +export function fetchHallContactPage( + query: OwnerPageQuery +): Promise> { + return httpPost>('/admin/card/contact/hallPage', query); +} + +export function collectHallContact( + peerCardId: string | number, + ownerCardId?: string | number +): Promise { + const payload: Record = { peerCardId }; + if (ownerCardId != null) { + payload.ownerCardId = ownerCardId; + } + return httpPost('/admin/card/contact/collect', payload); +} + +export function fetchTeamWallPage( + query: OwnerPageQuery +): Promise> { + return httpPost>('/admin/card/contact/teamWall', query); +} + +export function fetchCardQuota( + tenantId?: string | number +): Promise { + const payload: Record = { resourceType: 'cards' }; + if (tenantId != null && String(tenantId) !== '') { + payload.tenantId = tenantId; + } + return httpPost('/admin/team/billing/quota', payload); +} + +export function confirmHallExchange( + exchangeCode: string, + actingCardId?: string | number +): Promise<{ status: string; isDualSynced: boolean }> { + const payload: Record = { exchangeCode }; + if (actingCardId != null) { + payload.actingCardId = actingCardId; + } + return httpPost<{ status: string; isDualSynced: boolean }>( + '/admin/card/exchange/confirm', + payload + ); +} + export * from './types.uts'; export * from './request.uts'; diff --git a/mpuniapp/common/deeplink-router.uts b/mpuniapp/common/deeplink-router.uts index 7b03a19..53f017d 100644 --- a/mpuniapp/common/deeplink-router.uts +++ b/mpuniapp/common/deeplink-router.uts @@ -104,7 +104,7 @@ export function parseDeepLink(url?: string): DeepLinkRouteInfo { */ export function buildAppPageRoute(info: DeepLinkRouteInfo): string { if (!info || !info.isValid) { - return '/pages/owner/home'; + return '/pages/owner/hall/index'; } const queryParts: string[] = []; @@ -116,5 +116,5 @@ export function buildAppPageRoute(info: DeepLinkRouteInfo): string { if (info.source) queryParts.push(`source=${info.source}`); const queryString = queryParts.length > 0 ? `?${queryParts.join('&')}` : ''; - return `/pages/card/portal${queryString}`; + return `/pages/portal/index${queryString}`; } diff --git a/mpuniapp/common/locale.uts b/mpuniapp/common/locale.uts index f36982b..dc12666 100644 --- a/mpuniapp/common/locale.uts +++ b/mpuniapp/common/locale.uts @@ -105,7 +105,7 @@ export const omniLocales: Record = { 'radar.visitor_trace': '访问轨迹', 'radar.lead_score': '意向度评分', 'crm.contacts': '联系人列表', - 'crm.leads': '商机线索', + 'crm.leads': '客户管理', 'crm.follow_up': '跟进记录', 'portal.unavailable': '微官网暂不可用', 'portal.retry': '重新加载', @@ -161,7 +161,7 @@ export const omniLocales: Record = { 'radar.visitor_trace': 'Visitor Trail', 'radar.lead_score': 'Lead Score', 'crm.contacts': 'Contacts', - 'crm.leads': 'Leads', + 'crm.leads': 'Customers', 'crm.follow_up': 'Follow-up', 'portal.unavailable': 'This page is unavailable', 'portal.retry': 'Reload', @@ -217,7 +217,7 @@ export const omniLocales: Record = { 'radar.visitor_trace': 'مسار الزائر', 'radar.lead_score': 'درجة العميل المحتمل', 'crm.contacts': 'جهات الاتصال', - 'crm.leads': 'العملاء المحتملون', + 'crm.leads': 'العملاء', 'crm.follow_up': 'المتابعة', 'portal.unavailable': 'الصفحة غير متاحة حاليا', 'portal.retry': 'إعادة التحميل', @@ -273,7 +273,7 @@ export const omniLocales: Record = { 'radar.visitor_trace': 'Recorrido del visitante', 'radar.lead_score': 'Puntuación de interés', 'crm.contacts': 'Contactos', - 'crm.leads': 'Oportunidades', + 'crm.leads': 'Clientes', 'crm.follow_up': 'Seguimiento', 'portal.unavailable': 'Esta página no está disponible', 'portal.retry': 'Recargar', @@ -329,7 +329,7 @@ export const omniLocales: Record = { 'radar.visitor_trace': 'Besucherpfad', 'radar.lead_score': 'Lead-Score', 'crm.contacts': 'Kontakte', - 'crm.leads': 'Leads', + 'crm.leads': 'Kunden', 'crm.follow_up': 'Nachverfolgung', 'portal.unavailable': 'Diese Seite ist nicht verfügbar', 'portal.retry': 'Neu laden', @@ -385,7 +385,7 @@ export const omniLocales: Record = { 'radar.visitor_trace': 'Parcours visiteur', 'radar.lead_score': 'Score d’intérêt', 'crm.contacts': 'Contacts', - 'crm.leads': 'Prospects', + 'crm.leads': 'Clients', 'crm.follow_up': 'Suivi', 'portal.unavailable': 'Cette page est indisponible', 'portal.retry': 'Recharger', @@ -441,7 +441,7 @@ export const omniLocales: Record = { 'radar.visitor_trace': '訪問履歴', 'radar.lead_score': '関心度スコア', 'crm.contacts': '連絡先', - 'crm.leads': 'リード', + 'crm.leads': '顧客', 'crm.follow_up': 'フォロー記録', 'portal.unavailable': 'このページは現在ご利用いただけません', 'portal.retry': '再読み込み', diff --git a/mpuniapp/common/request.uts b/mpuniapp/common/request.uts index fa88228..e42ebf0 100644 --- a/mpuniapp/common/request.uts +++ b/mpuniapp/common/request.uts @@ -10,13 +10,26 @@ let currentBaseUrl: string = 'http://127.0.0.1:9000'; if (typeof window !== 'undefined' && window.location != null) { const protocol = window.location.protocol != null && window.location.protocol !== '' ? window.location.protocol : 'http:'; const hostname = window.location.hostname != null && window.location.hostname !== '' ? window.location.hostname : '127.0.0.1'; - currentBaseUrl = `${protocol}//${hostname}:9000`; + const port = window.location.port; + if (port === '5173' || port === '5174' || port === '3000' || port === '8080') { + currentBaseUrl = `${protocol}//${hostname}:9000`; + } else if (port != null && port !== '' && port !== '80' && port !== '443') { + currentBaseUrl = `${protocol}//${hostname}:${port}`; + } else { + currentBaseUrl = `${protocol}//${hostname}`; + } } // #endif let currentTimeout: number = 10000; export function getBaseUrl(): string { + try { + const override = uni.getStorageSync('api_base_url'); + if (override != null && String(override).trim() !== '') { + return String(override).trim(); + } + } catch (e) {} return currentBaseUrl; } @@ -35,22 +48,41 @@ export function setRequestTimeout(timeout: number): void { export function getAuthToken(): string { try { const val = uni.getStorageSync('token'); - return val != null ? String(val) : ''; - } catch (e) { - return ''; - } + if (val != null && String(val) !== '') { + return String(val); + } + } catch (e) {} + try { + if (typeof window !== 'undefined' && typeof localStorage !== 'undefined') { + const local = localStorage.getItem('token'); + if (local != null && String(local) !== '') { + return String(local); + } + } + } catch (e) {} + return ''; } export function setAuthToken(token: string): void { try { uni.setStorageSync('token', token); } catch (e) {} + try { + if (typeof window !== 'undefined' && typeof localStorage !== 'undefined') { + localStorage.setItem('token', token); + } + } catch (e) {} } export function clearAuthToken(): void { try { uni.removeStorageSync('token'); } catch (e) {} + try { + if (typeof window !== 'undefined' && typeof localStorage !== 'undefined') { + localStorage.removeItem('token'); + } + } catch (e) {} } export function getTenantId(): string { diff --git a/mpuniapp/common/types.uts b/mpuniapp/common/types.uts index 342dfa8..2dcea22 100644 --- a/mpuniapp/common/types.uts +++ b/mpuniapp/common/types.uts @@ -85,7 +85,23 @@ export interface CardPortalDetail { export type LeadStatus = 'new' | 'contacted' | 'hot' | 'won' | 'archived'; -export type LeadSource = 'nfc' | 'qr' | 'link' | 'ai_chat'; +export type LeadSource = 'nfc' | 'qr' | 'link' | 'ai_chat' | 'exchange'; + +export type CardContactSource = 'exchange' | 'collect' | 'scan'; + +export interface CardContact { + id?: string | number; + ownerUserId: number; + ownerCardId?: number | null; + peerCardId: number; + source: CardContactSource; + leadId?: number | null; + peerName?: string; + peerTitle?: string; + peerCompany?: string; + peerAvatarUrl?: string; + peerSlug?: string; +} export interface LeadEntity { id: string | number; @@ -184,6 +200,16 @@ export interface OwnerPageQuery { visitorId?: string; } +export interface QuotaCheckResult { + used: number; + limit: number; + remaining: number; + percentage: number; + warning: boolean; + exceeded: boolean; + plan?: string; +} + export interface OwnerPageData { list: T[]; pagination: { diff --git a/mpuniapp/common/uni.css b/mpuniapp/common/uni.css deleted file mode 100644 index 37143e6..0000000 --- a/mpuniapp/common/uni.css +++ /dev/null @@ -1,375 +0,0 @@ -/* 主题变量 */ -.theme-light { - --list-background-color: #ffffff; - --background-color: #f8f8f8; - --active-color:#a0a0a0; - --active-background-color: #f8f8f8; - --text-color: #333333; - --arrow-color: #999999; - --border-color: rgba(0, 0, 0, .06); -} - -.theme-dark { - --list-background-color: #2d2d2d; - --background-color: #1a1a1a; - --active-color:#8f8f8f; - --active-background-color: #3b3b3b; - --text-color: #ffffff; - --arrow-color: #ffffff; - --border-color: rgba(255, 255, 255, 0.1); -} - -.uni-h1 { - font-size: 28px; - font-weight: bold; - border-bottom: 1px solid #ccc; - margin: 8px 0; -} -.uni-h2 { - font-size: 24px; - font-weight: bold; - border-bottom: 1px solid #ccc; - margin: 8px 0; -} -.uni-h3 { - font-size: 20px; - font-weight: bold; - margin: 8px 0; -} -.uni-h4 { - font-weight: bold; - margin: 8px 0; -} -.uni-theme-text{ - color: var(--text-color); -} - -.uni-padding-wrap { - padding: 0 15px; -} - -.uni-title { - padding: 10px 0; -} - -.uni-title-text { - font-size: 15px; - font-weight: bold; - color: var(--text-color, #333333); -} - -.uni-subtitle-text { - color: #888; - font-size: 12px; - font-weight: bold; - margin-top: 5px; -} - -.uni-info { - font-size: 12px; - color: #999; -} - -.uni-common-mb { - margin-bottom: 15px; -} - -.uni-common-pb { - padding-bottom: 15px; -} - -.uni-common-pl { - padding-left: 15px; -} - -.uni-common-mt { - margin-top: 15px; -} - -.uni-hello-text { - color: var(--text-color, #333333); - line-height: 22px; -} - -.uni-tips{ - font-size: 13px; - color: #0958d9; - background-color: #e6f4ff; - border-left: 4px solid #91caff; - padding: 10px 12px; - border-radius: 4px; - margin: 10px; -} - -.uni-list { - background-color: var(--list-background-color,#ffffff); - position: relative; - display: flex; - flex-direction: column; - border-bottom: 1px solid #c8c7cc; -} - -.uni-list-cell { - position: relative; - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; -} - -.uni-list-cell-padding { - padding: 10px 15px; -} - -.uni-list-cell-line { - border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, .06)); -} - -.uni-list-cell-hover { - background-color: var(--active-background-color,#f8f8f8); -} - -.uni-list-cell-pd { - padding: 11px 15px 11px 0; -} - -.uni-list-cell-left { - padding: 0 15px 0 10px; -} - -.uni-list-cell-db, -.uni-list-cell-right { - flex: 1; -} - -.uni-list-cell-db-text { - width: 100%; - /* #ifdef WEB || MP */ - word-break: break-all; - /* #endif */ -} - -.uni-label { - width: 105px; -} - -.uni-input { - height: 25px; - padding: 8px 13px; - font-size: 14px; - flex: 1; - box-sizing: content-box; - background: var(--list-background-color,#ffffff); -} -/* -.uni-flex { - display: flex; - flex-direction: row; -} - */ -.uni-flex-item { - flex: 1; -} - -.uni-row { - flex-direction: row; -} - -.uni-column { - flex-direction: column; -} - -.uni-bg-red { - background: #F76260; -} - -.uni-bg-green { - background: #09BB07; -} - -.uni-bg-blue { - background: #007AFF; -} - -.uni-btn-v { - padding: 5px 0; -} - -.uni-btn { - margin-top: 10px; -} - -.uni-link { - color: #576B95; - font-size: 13px; -} - -.uni-center { - flex-direction: row; - justify-content: center; -} - -.uni-textarea { - padding: 9px; - line-height: 1.6; - font-size: 14px; -} - - -.uni-icon-size { - width: 14px; - height: 14px; -} - -.uni-container { - padding: 15px; - background-color: var(--background-color,#f8f8f8); -} - -.uni-header-logo { - padding: 15px 15px; - flex-direction: column; - justify-content: center; - align-items: center; - margin-top: 5px; -} - -.uni-header-image { - width: 80px; - height: 80px; -} - -.uni-text-box { - margin-bottom: 20px; -} - -.hello-text { - color: var(--text-color, #333333); - font-size: 14px; - line-height: 20px; -} - -.uni-panel { - margin-bottom: 12px; -} - -.text-disabled { - color: var(--active-color)!important; -} - -/* --tab-bar-begin-- */ - -.uni-panel-h { - background-color: var(--list-background-color); - flex-direction: row !important; - justify-content: space-between !important; - align-items: center !important; - padding: 12px; -} - -.uni-panel-h-on { - background-color: #f0f0f0; -} - -.uni-panel-text { - color: var(--text-color, #333333); - font-size: 14px; - font-weight: normal; -} - -.uni-navigate-item { - flex-direction: row; - align-items: center; - background-color: var(--list-background-color); - border-top-style: solid; - border-top-color: var(--border-color); - border-top-width: 1px; - padding: 12px 16px; - justify-content: space-between; - /* #ifdef WEB */ - /* cursor: pointer; */ - /* #endif */ -} - -.is--active { - background-color: var(--active-background-color); -} - -.uni-navigate-text { - color: var(--text-color, #333333); - font-size: 14px; - font-weight: normal; - width: 94%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -/* left-windows */ -.left-win-active { - color: #007AFF !important; -} - -/* --tab-bar-end-- */ - -/* #ifdef APP */ -.page-scroll-view { - flex: 1; -} -/* #endif */ - -/* web端适配暗黑主题 */ -/* #ifdef WEB */ - @media (prefers-color-scheme: dark) { - /* 增加deep,穿透所有页面和组件 */ - :deep(body), - :deep(uni-page-body) { - color: rgba(0, 0, 0, 0.9); - } - - .uni-top-window .tab-bar-flex :deep(.uni-tabbar){ - background-color: #2d2d2d!important; - } - - /* 设置滚动条整体宽度和背景色 */ - ::-webkit-scrollbar { - width: 8px; - background: #464646; - } - - /* 设置滚动条滑块颜色 */ - ::-webkit-scrollbar-thumb { - background: #aaaaaa; - border-radius: 4px; - } - - /* 鼠标悬停在滑块上时的颜色 */ - ::-webkit-scrollbar-thumb:hover { - background: #818181; - } - - /* 滚动条轨道颜色 */ - ::-webkit-scrollbar-track { - background: #464646; - border-radius: 4px; - } - -} -/* #endif */ - - -/* #ifdef MP */ -page { - color: rgba(0, 0, 0, 0.9); -} -/* #endif */ -.pl-4{ - padding-left: 4px; -} -.pr-4{ - padding-right: 4px; -} - -.margin-10{ - margin: 10px; -} \ No newline at end of file diff --git a/mpuniapp/composables/useDark.uts b/mpuniapp/composables/useDark.uts deleted file mode 100644 index 6aca19b..0000000 --- a/mpuniapp/composables/useDark.uts +++ /dev/null @@ -1,9 +0,0 @@ -import { state } from '@/store/index.uts' - -export const isDarkMode = computed(() : boolean => { - return state.isDarkMode -}) - -export const darkModeClass = computed(() : string => { - return state.isDarkMode ? 'theme-dark' : 'theme-light' -}) diff --git a/mpuniapp/env.js b/mpuniapp/env.js deleted file mode 100644 index cb17d31..0000000 --- a/mpuniapp/env.js +++ /dev/null @@ -1,48 +0,0 @@ -module.exports = { - "is-custom-runtime": false, - "UNI_TEST_CUSTOM_ENV": { - // 以下3个配置项用于定义以App-WebView方式运行的H5页面地址,方便自动化测试App-WebView场景 - // "UNI_AUTOMATOR_APP_WEBVIEW": "true", - // "UNI_WEB_SERVICE_URL": "http://xxx.com/xxx.html", - // "UNI_AUTOMATOR_APP_WEBVIEW_SRC": "http://xxx.com/xxx.html" - }, - "compile": true, - "h5": { - "options": { - "headless": true - }, - "executablePath": "" - }, - "mp-weixin": { - "port": 9420, - "account": "", - "args": "", - "cwd": "", - "launch": true, - "teardown": "disconnect", - "remote": false, - "executablePath": "" - }, - "app-plus": { - "android": { - "id": "", - "executablePath": "" - }, - "version": "", - "ios": { - "id": "", - "executablePath": "" - }, - "uni-app-x": { - "version": "/Applications/HBuilderX-Dev.app/Contents/HBuilderX/plugins/uniappx-launcher/base/version.txt", - "android": { - "id": "emulator-5554", - "executablePath": "/Applications/HBuilderX-Dev.app/Contents/HBuilderX/plugins/uniappx-launcher/base/android_base.apk" - }, - "ios": { - "id": "CA80343E-7D4C-401D-81BA-B5B7D446C11D", - "executablePath": "/Applications/HBuilderX-Dev.app/Contents/HBuilderX/plugins/uniappx-launcher/base/Pandora_simulator.app" - } - } - } -} diff --git a/mpuniapp/git-hooks/check-commit.cjs b/mpuniapp/git-hooks/check-commit.cjs deleted file mode 100644 index e79ede4..0000000 --- a/mpuniapp/git-hooks/check-commit.cjs +++ /dev/null @@ -1,16 +0,0 @@ -const fs = require('fs') -const { - execSync -} = require('child_process') - -const message = fs.readFileSync(process.argv[2]).toString('utf8').toLowerCase() -const branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim() - -if ( - (branch === 'master' || branch === 'alpha') && - !message.startsWith('merge') && - !message.startsWith('*') -) { - console.log('You are not allowed to commit directly to master or alpha branch') - process.exit(1) -} diff --git a/mpuniapp/harmony-configs/AppScope/app.json5 b/mpuniapp/harmony-configs/AppScope/app.json5 deleted file mode 100644 index d4552be..0000000 --- a/mpuniapp/harmony-configs/AppScope/app.json5 +++ /dev/null @@ -1,10 +0,0 @@ -{ - "app": { - "bundleName": "io.dcloud.uniappx", - "vendor": "example", - "versionCode": 10000, - "versionName": "1.0.0", - "icon": "$media:layered_image", - "label": "$string:app_name" - } -} diff --git a/mpuniapp/harmony-configs/AppScope/resources/base/element/string.json b/mpuniapp/harmony-configs/AppScope/resources/base/element/string.json deleted file mode 100644 index c42c3e1..0000000 --- a/mpuniapp/harmony-configs/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "OmniCard" - }, - { - "name": "permission_location_tips", - "value": "正在申请获取您的位置信息,以便为您提供相应的服务" - }, - { - "name": "permission_write_imagevideo_tips", - "value": "正在申请写入相册权限,以便保存文件到相册" - }, - { - "name": "permission_get_networkinfo_tips", - "value": "正在申请获取网络信息权限,以便为您提供相应的服务" - }, - { - "name": "permission_microphone", - "value": "正在申请使用麦克风权限,以便为您提供相应的服务" - }, - { - "name": "permission_read_pasteboard", - "value": "正在申请读取剪切板,以便为您提供相应的服务" - }, - { - "name": "permission_read_privacywindow", - "value": "正在申请隐私窗口权限,以便为您提供相应的服务" - }, - { - "name": "permission_read_accessbiometric", - "value": "正在申请访问设备的生物识别功能权限,以便为您提供相应的服务" - }, - { - "name": "write_calendar_reason", - "value": "正在申请写入日历权限,以便为您提供相应的服务" - } - ] -} diff --git a/mpuniapp/harmony-configs/build-profile.json5 b/mpuniapp/harmony-configs/build-profile.json5 deleted file mode 100644 index 2a8889c..0000000 --- a/mpuniapp/harmony-configs/build-profile.json5 +++ /dev/null @@ -1,83 +0,0 @@ -{ - "app": { - "signingConfigs": [ - { - "name": "default", - "type": "HarmonyOS", - "material": { - "storePassword": "00000019350D4E7C95A55A5FBEF0F5AF0AC08D9C030BD36456ED60DA7143472A9AF617AD8A18F20233", - "certpath": "./config/hello-uni-app-x.cer", - "keyAlias": "debugKey", - "keyPassword": "0000001958D675423AB2CAB19457483AD81FFBEFD3615C8404D1FB75AE216154CD780B356AF3D0432C", - "profile": "./config/hello-uni-app-x.p7b", - "signAlg": "SHA256withECDSA", - "storeFile": "./config/hello-uni-app-x.p12" - } - }, - { - "name": "release", - "type": "HarmonyOS", - "material": { - "storePassword": "00000019350D4E7C95A55A5FBEF0F5AF0AC08D9C030BD36456ED60DA7143472A9AF617AD8A18F20233", - "certpath": "./config/release/io.dcloud.uniappx.cer", - "keyAlias": "debugKey", - "keyPassword": "0000001958D675423AB2CAB19457483AD81FFBEFD3615C8404D1FB75AE216154CD780B356AF3D0432C", - "profile": "./config/release/io.dcloud.uniappx.p7b", - "signAlg": "SHA256withECDSA", - "storeFile": "./config/hello-uni-app-x.p12" - } - } - ], - "products": [ - { - "name": "default", - "signingConfig": "default", - "compatibleSdkVersion": "6.0.0(20)", - "compatibleSdkVersionStage": "beta6", - "runtimeOS": "HarmonyOS", - "buildOption": { - "strictMode": { - "caseSensitiveCheck": true, - "useNormalizedOHMUrl": true - } - } - }, - { - "name": "release", - "signingConfig": "release", - "compatibleSdkVersion": "6.0.0(20)", - "compatibleSdkVersionStage": "beta6", - "runtimeOS": "HarmonyOS", - "buildOption": { - "strictMode": { - "caseSensitiveCheck": true, - "useNormalizedOHMUrl": true - } - } - } - ], - "buildModeSet": [ - { - "name": "debug" - }, - { - "name": "release" - } - ] - }, - "modules": [ - { - "name": "entry", - "srcPath": "./entry", - "targets": [ - { - "name": "default", - "applyToProducts": [ - "default", - "release" - ] - } - ] - } - ] -} diff --git a/mpuniapp/harmony-configs/config/hello-uni-app-x.cer b/mpuniapp/harmony-configs/config/hello-uni-app-x.cer deleted file mode 100644 index 9d734be..0000000 --- a/mpuniapp/harmony-configs/config/hello-uni-app-x.cer +++ /dev/null @@ -1,52 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICGjCCAaGgAwIBAgIIShhpn519jNAwCgYIKoZIzj0EAwMwUzELMAkGA1UEBhMC -Q04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEeMBwGA1UE -AwwVSHVhd2VpIENCRyBSb290IENBIEcyMB4XDTIwMDMxNjAzMDQzOVoXDTQ5MDMx -NjAzMDQzOVowUzELMAkGA1UEBhMCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UE -CwwKSHVhd2VpIENCRzEeMBwGA1UEAwwVSHVhd2VpIENCRyBSb290IENBIEcyMHYw -EAYHKoZIzj0CAQYFK4EEACIDYgAEWidkGnDSOw3/HE2y2GHl+fpWBIa5S+IlnNrs -GUvwC1I2QWvtqCHWmwFlFK95zKXiM8s9yV3VVXh7ivN8ZJO3SC5N1TCrvB2lpHMB -wcz4DA0kgHCMm/wDec6kOHx1xvCRo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0T -AQH/BAUwAwEB/zAdBgNVHQ4EFgQUo45a9Vq8cYwqaiVyfkiS4pLcIAAwCgYIKoZI -zj0EAwMDZwAwZAIwMypeB7P0IbY7c6gpWcClhRznOJFj8uavrNu2PIoz9KIqr3jn -BlBHJs0myI7ntYpEAjBbm8eDMZY5zq5iMZUC6H7UzYSix4Uy1YlsLVV738PtKP9h -FTjgDHctXJlC5L7+ZDY= ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIDATCCAoigAwIBAgIIXmuDXbWpOB8wCgYIKoZIzj0EAwMwUzELMAkGA1UEBhMC -Q04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEeMBwGA1UE -AwwVSHVhd2VpIENCRyBSb290IENBIEcyMB4XDTIwMDcwOTAyMDQyNFoXDTMwMDcw -NzAyMDQyNFowYjELMAkGA1UEBgwCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UE -CwwKSHVhd2VpIENCRzEtMCsGA1UEAwwkSHVhd2VpIENCRyBEZXZlbG9wZXIgUmVs -YXRpb25zIENBIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE65LdoIZh1hlpZ2gP -bJ6gPhHsvYSRe22KETgdqeVeYnrbRHI9wsPT6RGYS+pU4mPl6wxzgDMqN6SY/BoZ -luhkE1PzaHoPoNIWIq0O33hpyKyyYwAacIUEjYurkw1E9r9no4IBGDCCARQwHwYD -VR0jBBgwFoAUo45a9Vq8cYwqaiVyfkiS4pLcIAAwHQYDVR0OBBYEFNtek7Ij6NDk -/nF6Zumkc0dbf/NeMEYGA1UdIAQ/MD0wOwYEVR0gADAzMDEGCCsGAQUFBwIBFiVo -dHRwOi8vY3BraS1jYXdlYi5odWF3ZWkuY29tL2Nwa2kvY3BzMBIGA1UdEwEB/wQI -MAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEGMGYGA1UdHwRfMF0wW6BZoFeGVWh0dHA6 -Ly9jcGtpLWNhd2ViLmh1YXdlaS5jb20vY3BraS9zZXJ2bGV0L2NybEZpbGVEb3du -LmNybD9jZXJ0eXBlPTEwJi9yb290X2cyX2NybC5jcmwwCgYIKoZIzj0EAwMDZwAw -ZAIwWO1X5q2MdfpR1Q237GpUHGbL1C13rGyFg2p3AYo44FpZ2/A9ss0wOHKM4KDl -ZPqdAjBLkf8NPZy7KVog98+iCTLq35DJ2ZVxkCxknA9YhiHVyXf4HPm4JlT7rW7o -Q+FzM3c= ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIDFDCCApqgAwIBAgIOCf1Cn8+RhHsVbyIjBagwCgYIKoZIzj0EAwMwYjELMAkG -A1UEBgwCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEt -MCsGA1UEAwwkSHVhd2VpIENCRyBEZXZlbG9wZXIgUmVsYXRpb25zIENBIEcyMB4X -DTI2MDcwMzA3NTkwNFoXDTI3MDcwMzA3NTkwNFowgcMxCzAJBgNVBAYTAkNOMTkw -NwYDVQQKDDDmlbDlrZflpKnloILvvIjljJfkuqzvvInnvZHnu5zmioDmnK/mnInp -mZDlhazlj7gxHDAaBgNVBAsMEzEyNTA2Njg4MTI5NjYwNTcxNTMxWzBZBgNVBAMM -UuaVsOWtl+WkqeWggu+8iOWMl+S6rO+8iee9kee7nOaKgOacr+aciemZkOWFrOWP -uCgxMjUwNjY4ODEyOTY2MDU3MTUzKVwsRGV2ZWxvcG1lbnQwWTATBgcqhkjOPQIB -BggqhkjOPQMBBwNCAAS7ko2FpS2JN9JbwUe6N765yWDIJ6vtt2fUIezicF6OFwmD -T9T3cVRU8fS08/KxKqDS6Z5c1syUIbSB8Q35zoWXo4HRMIHOMB0GA1UdDgQWBBQ2 -KMbkY7ynzhJ0h3ZLuW1ezpUUAzAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFNte -k7Ij6NDk/nF6Zumkc0dbf/NeMFkGA1UdHwRSMFAwTqBMoEqGSGh0dHA6Ly9oNWhv -c3RpbmctZHJjbi5kYmFua2Nkbi5jbi9jY2g1L2NybC9oZHJjYWcyL0h1YXdlaUNC -R0hEUkcyY3JsLmNybDAOBgNVHQ8BAf8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUH -AwMwCgYIKoZIzj0EAwMDaAAwZQIwKBU6ALP6lyRpMGXoRJ/FH54w3dUXieeVIisR -47e3XdoVikmLZvWYeVoQriEJpzzLAjEAi/RTFHuabaMn+zQqRRSi0Auljiza3X3Q -tNaOc7+VUqUCiRe1hv+QZcP82GzjUb28 ------END CERTIFICATE----- diff --git a/mpuniapp/harmony-configs/config/hello-uni-app-x.csr b/mpuniapp/harmony-configs/config/hello-uni-app-x.csr deleted file mode 100644 index 5a4b04d..0000000 --- a/mpuniapp/harmony-configs/config/hello-uni-app-x.csr +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN NEW CERTIFICATE REQUEST----- -MIIBNjCB3AIBADBKMQkwBwYDVQQGEwAxCTAHBgNVBAgTADEJMAcGA1UEBxMAMQkw -BwYDVQQKEwAxCTAHBgNVBAsTADERMA8GA1UEAxMIZGVidWdLZXkwWTATBgcqhkjO -PQIBBggqhkjOPQMBBwNCAAS7ko2FpS2JN9JbwUe6N765yWDIJ6vtt2fUIezicF6O -FwmDT9T3cVRU8fS08/KxKqDS6Z5c1syUIbSB8Q35zoWXoDAwLgYJKoZIhvcNAQkO -MSEwHzAdBgNVHQ4EFgQUNijG5GO8p84SdId2S7ltXs6VFAMwCgYIKoZIzj0EAwID -SQAwRgIhALx/YYkNiOa30CNHyz8BrOyCuqe3PSTTNW9aqV+evleAAiEA10DAwzkI -G8dJ+/YG+AtlEsxbquQl2mugZcR8pxIqZeU= ------END NEW CERTIFICATE REQUEST----- diff --git a/mpuniapp/harmony-configs/config/hello-uni-app-x.p12 b/mpuniapp/harmony-configs/config/hello-uni-app-x.p12 deleted file mode 100644 index 4202b55..0000000 Binary files a/mpuniapp/harmony-configs/config/hello-uni-app-x.p12 and /dev/null differ diff --git a/mpuniapp/harmony-configs/config/hello-uni-app-x.p7b b/mpuniapp/harmony-configs/config/hello-uni-app-x.p7b deleted file mode 100644 index 22567a0..0000000 Binary files a/mpuniapp/harmony-configs/config/hello-uni-app-x.p7b and /dev/null differ diff --git a/mpuniapp/harmony-configs/config/material/ac/d6a6217fbf51446792d92f6ac1db048c b/mpuniapp/harmony-configs/config/material/ac/d6a6217fbf51446792d92f6ac1db048c deleted file mode 100644 index a859361..0000000 --- a/mpuniapp/harmony-configs/config/material/ac/d6a6217fbf51446792d92f6ac1db048c +++ /dev/null @@ -1 +0,0 @@ -¼ Á�ãZf/«”[ZéI \ No newline at end of file diff --git a/mpuniapp/harmony-configs/config/material/ce/ffa0135ff1754cd9ae19c194f02cb63e b/mpuniapp/harmony-configs/config/material/ce/ffa0135ff1754cd9ae19c194f02cb63e deleted file mode 100644 index cde72ae..0000000 Binary files a/mpuniapp/harmony-configs/config/material/ce/ffa0135ff1754cd9ae19c194f02cb63e and /dev/null differ diff --git a/mpuniapp/harmony-configs/config/material/fd/0/641301a5055744f986db690f20d61b18 b/mpuniapp/harmony-configs/config/material/fd/0/641301a5055744f986db690f20d61b18 deleted file mode 100644 index da0075c..0000000 --- a/mpuniapp/harmony-configs/config/material/fd/0/641301a5055744f986db690f20d61b18 +++ /dev/null @@ -1 +0,0 @@ -ˆ‹Ýa*E’Rì=yܨ¼{ \ No newline at end of file diff --git a/mpuniapp/harmony-configs/config/material/fd/1/54855b90405948eab6585df3121c2427 b/mpuniapp/harmony-configs/config/material/fd/1/54855b90405948eab6585df3121c2427 deleted file mode 100644 index 6341a06..0000000 --- a/mpuniapp/harmony-configs/config/material/fd/1/54855b90405948eab6585df3121c2427 +++ /dev/null @@ -1 +0,0 @@ -¿GxtqBéùÞÑO \ No newline at end of file diff --git a/mpuniapp/harmony-configs/config/material/fd/2/7727e1cd05b440469925963493010e24 b/mpuniapp/harmony-configs/config/material/fd/2/7727e1cd05b440469925963493010e24 deleted file mode 100644 index 2c2c83e..0000000 --- a/mpuniapp/harmony-configs/config/material/fd/2/7727e1cd05b440469925963493010e24 +++ /dev/null @@ -1 +0,0 @@ -ù}á|$ßÝ-;Pk³­Ío \ No newline at end of file diff --git a/mpuniapp/harmony-configs/config/release/io.dcloud.uniappx-internal-test.p7b b/mpuniapp/harmony-configs/config/release/io.dcloud.uniappx-internal-test.p7b deleted file mode 100644 index d0d80c0..0000000 Binary files a/mpuniapp/harmony-configs/config/release/io.dcloud.uniappx-internal-test.p7b and /dev/null differ diff --git a/mpuniapp/harmony-configs/config/release/io.dcloud.uniappx.cer b/mpuniapp/harmony-configs/config/release/io.dcloud.uniappx.cer deleted file mode 100644 index 02f730e..0000000 --- a/mpuniapp/harmony-configs/config/release/io.dcloud.uniappx.cer +++ /dev/null @@ -1,52 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICGjCCAaGgAwIBAgIIShhpn519jNAwCgYIKoZIzj0EAwMwUzELMAkGA1UEBhMC -Q04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEeMBwGA1UE -AwwVSHVhd2VpIENCRyBSb290IENBIEcyMB4XDTIwMDMxNjAzMDQzOVoXDTQ5MDMx -NjAzMDQzOVowUzELMAkGA1UEBhMCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UE -CwwKSHVhd2VpIENCRzEeMBwGA1UEAwwVSHVhd2VpIENCRyBSb290IENBIEcyMHYw -EAYHKoZIzj0CAQYFK4EEACIDYgAEWidkGnDSOw3/HE2y2GHl+fpWBIa5S+IlnNrs -GUvwC1I2QWvtqCHWmwFlFK95zKXiM8s9yV3VVXh7ivN8ZJO3SC5N1TCrvB2lpHMB -wcz4DA0kgHCMm/wDec6kOHx1xvCRo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0T -AQH/BAUwAwEB/zAdBgNVHQ4EFgQUo45a9Vq8cYwqaiVyfkiS4pLcIAAwCgYIKoZI -zj0EAwMDZwAwZAIwMypeB7P0IbY7c6gpWcClhRznOJFj8uavrNu2PIoz9KIqr3jn -BlBHJs0myI7ntYpEAjBbm8eDMZY5zq5iMZUC6H7UzYSix4Uy1YlsLVV738PtKP9h -FTjgDHctXJlC5L7+ZDY= ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIDATCCAoigAwIBAgIIXmuDXbWpOB8wCgYIKoZIzj0EAwMwUzELMAkGA1UEBhMC -Q04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEeMBwGA1UE -AwwVSHVhd2VpIENCRyBSb290IENBIEcyMB4XDTIwMDcwOTAyMDQyNFoXDTMwMDcw -NzAyMDQyNFowYjELMAkGA1UEBgwCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UE -CwwKSHVhd2VpIENCRzEtMCsGA1UEAwwkSHVhd2VpIENCRyBEZXZlbG9wZXIgUmVs -YXRpb25zIENBIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE65LdoIZh1hlpZ2gP -bJ6gPhHsvYSRe22KETgdqeVeYnrbRHI9wsPT6RGYS+pU4mPl6wxzgDMqN6SY/BoZ -luhkE1PzaHoPoNIWIq0O33hpyKyyYwAacIUEjYurkw1E9r9no4IBGDCCARQwHwYD -VR0jBBgwFoAUo45a9Vq8cYwqaiVyfkiS4pLcIAAwHQYDVR0OBBYEFNtek7Ij6NDk -/nF6Zumkc0dbf/NeMEYGA1UdIAQ/MD0wOwYEVR0gADAzMDEGCCsGAQUFBwIBFiVo -dHRwOi8vY3BraS1jYXdlYi5odWF3ZWkuY29tL2Nwa2kvY3BzMBIGA1UdEwEB/wQI -MAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEGMGYGA1UdHwRfMF0wW6BZoFeGVWh0dHA6 -Ly9jcGtpLWNhd2ViLmh1YXdlaS5jb20vY3BraS9zZXJ2bGV0L2NybEZpbGVEb3du -LmNybD9jZXJ0eXBlPTEwJi9yb290X2cyX2NybC5jcmwwCgYIKoZIzj0EAwMDZwAw -ZAIwWO1X5q2MdfpR1Q237GpUHGbL1C13rGyFg2p3AYo44FpZ2/A9ss0wOHKM4KDl -ZPqdAjBLkf8NPZy7KVog98+iCTLq35DJ2ZVxkCxknA9YhiHVyXf4HPm4JlT7rW7o -Q+FzM3c= ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIDEDCCApagAwIBAgIOCfvzQsZnJptzoZmQEgcwCgYIKoZIzj0EAwMwYjELMAkG -A1UEBgwCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEt -MCsGA1UEAwwkSHVhd2VpIENCRyBEZXZlbG9wZXIgUmVsYXRpb25zIENBIEcyMB4X -DTI1MDMyNDA4MDczNloXDTI4MDMyNDA4MDczNlowgb8xCzAJBgNVBAYTAkNOMTkw -NwYDVQQKDDDmlbDlrZflpKnloILvvIjljJfkuqzvvInnvZHnu5zmioDmnK/mnInp -mZDlhazlj7gxHDAaBgNVBAsMEzEyNTA2Njg4MTI5NjYwNTcxNTMxVzBVBgNVBAMM -TuaVsOWtl+WkqeWggu+8iOWMl+S6rO+8iee9kee7nOaKgOacr+aciemZkOWFrOWP -uCgxMjUwNjY4ODEyOTY2MDU3MTUzKVwsUmVsZWFzZTBZMBMGByqGSM49AgEGCCqG -SM49AwEHA0IABLuSjYWlLYk30lvBR7o3vrnJYMgnq+23Z9Qh7OJwXo4XCYNP1Pdx -VFTx9LTz8rEqoNLpnlzWzJQhtIHxDfnOhZejgdEwgc4wHQYDVR0OBBYEFDYoxuRj -vKfOEnSHdku5bV7OlRQDMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAU216TsiPo -0OT+cXpm6aRzR1t/814wWQYDVR0fBFIwUDBOoEygSoZIaHR0cDovL2g1aG9zdGlu -Zy1kcmNuLmRiYW5rY2RuLmNuL2NjaDUvY3JsL2hkcmNhZzIvSHVhd2VpQ0JHSERS -RzJjcmwuY3JsMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAK -BggqhkjOPQQDAwNoADBlAjEAzOpq9+LmKBmeEPYi8sHVFt7zPrpq08x2MGY6vZp8 -wMTR6nwXvEwvUai6SHOn+SR3AjAM9ut0DHE9M6VSldiYegDhtp9n766pCvZYSUAy -9JN0SZMKNnJQ0/Lp2vsw73mh3Zg= ------END CERTIFICATE----- diff --git a/mpuniapp/harmony-configs/config/release/io.dcloud.uniappx.p7b b/mpuniapp/harmony-configs/config/release/io.dcloud.uniappx.p7b deleted file mode 100644 index 5d91cf2..0000000 Binary files a/mpuniapp/harmony-configs/config/release/io.dcloud.uniappx.p7b and /dev/null differ diff --git a/mpuniapp/harmony-configs/entry/src/main/module.json5 b/mpuniapp/harmony-configs/entry/src/main/module.json5 deleted file mode 100644 index 436e4b3..0000000 --- a/mpuniapp/harmony-configs/entry/src/main/module.json5 +++ /dev/null @@ -1,163 +0,0 @@ -{ - "module": { - "name": "entry", - "type": "entry", - "description": "$string:module_desc", - "mainElement": "EntryAbility", - "deviceTypes": [ - "phone", - "tablet", - "2in1" - ], - "querySchemes": [ - "mailto", - "weixin" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "EntryAbility", - "srcEntry": "./ets/entryability/EntryAbility.ets", - "description": "$string:EntryAbility_desc", - "icon": "$media:layered_image", - "label": "$string:EntryAbility_label", - "startWindowIcon": "$media:startIcon", - "startWindowBackground": "$color:start_window_background", - "exported": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - }, - { - "actions": [ - "ohos.want.action.viewData" - ], - "uris": [ - { - "scheme": "hellouniappx", - "host": "redirect" - }, - { - "scheme": "uniappxhello", - "host": "redirect" - } - ] - } - ], - "preferMultiWindowOrientation": "landscape_auto" - } - ], - "metadata": [ - { - "name": "TENCENT_MAP_KEY", - "value": "" - } - ], - "requestPermissions": [ - { - "name": "ohos.permission.INTERNET" - }, - { - "name": "ohos.permission.APPROXIMATELY_LOCATION", - "reason": "$string:permission_location_tips", - "usedScene": { - "abilities": [ - "EntryAbility" - ], - "when": "inuse" - } - }, - { - "name": "ohos.permission.LOCATION", - "reason": "$string:permission_location_tips", - "usedScene": { - "abilities": [ - "EntryAbility" - ], - "when": "inuse" - } - }, - { - "name": "ohos.permission.GET_NETWORK_INFO", - "reason": "$string:permission_get_networkinfo_tips", - "usedScene": { - "abilities": [ - "EntryAbility" - ], - "when": "inuse" - } - }, - { - "name": "ohos.permission.MICROPHONE", - "reason": "$string:permission_microphone", - "usedScene": { - "abilities": [ - "EntryAbility" - ], - "when": "inuse" - } - }, - { - "name": "ohos.permission.LOCATION_IN_BACKGROUND", - "reason": "$string:permission_location_tips", - "usedScene": { - "abilities": [ - "EntryAbility" - ], - "when": "inuse" - } - }, - // { - // "name": "ohos.permission.READ_PASTEBOARD", - // "reason": "$string:permission_read_pasteboard", - // "usedScene": { - // "abilities": [ - // "EntryAbility" - // ], - // "when": "inuse" - // } - // }, - { - "name": "ohos.permission.PRIVACY_WINDOW", - "reason": "$string:permission_read_privacywindow", - "usedScene": { - "abilities": [ - "EntryAbility" - ], - "when": "inuse" - } - }, - { - "name": "ohos.permission.ACCESS_BIOMETRIC", - "reason": "$string:permission_read_accessbiometric", - "usedScene": { - "abilities": [ - "EntryAbility" - ], - "when": "inuse" - } - }, - { - "name": "ohos.permission.ACCELEROMETER" - }, - { - "name": "ohos.permission.GYROSCOPE" - }, - { - "name": "ohos.permission.WRITE_CALENDAR", - "reason": "$string:write_calendar_reason", - "usedScene": { - "abilities": ["EntryAbility"], - "when": "inuse" - } - } - ] - } -} diff --git a/mpuniapp/hybrid/html/local.html b/mpuniapp/hybrid/html/local.html deleted file mode 100644 index 372b24a..0000000 --- a/mpuniapp/hybrid/html/local.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - 本地网页 - - - - -

web-view 组件加载本地 html 示例,仅在 App 环境下生效。点击下列按钮,跳转至其它页面。

-
- - - - - - - -
-

网页向应用发送消息。注意:小程序端应用会在此页面后退时接收到消息。

-
- -
-

本地视频

- -

网络视频

- - -
- - - -
-

文件选择

-
-

<input type="file" />

- -

<input type="file" accept="image/*" multiple />

- -

普通input

- -

普通input2

- -

普通input3

- -
-

普通textarea

- -
- hello uni-app x - apk下载(自动化测试使用) - -
- - - - - - diff --git a/mpuniapp/hybrid/html/privacy.html b/mpuniapp/hybrid/html/privacy.html deleted file mode 100644 index a0faee2..0000000 --- a/mpuniapp/hybrid/html/privacy.html +++ /dev/null @@ -1,1097 +0,0 @@ - - - - 《隐私政策》 - - - - - - - - -
-
- 打开手机扫一扫 -
-
-

隐私政策

-

最近更新日期:2025年04月09日

-

本政策仅适用于数字天堂(北京)网络技术有限公司的DCloud开发者中心系统应用产品或服务。

-

本政策将帮助您了解以下内容:

-
    -
  1. 我们如何收集和使用您的用户信息
  2. -
  3. 我们如何使用 Cookie 和同类技术
  4. -
  5. 我们如何共享、转让、公开披露您的用户信息
  6. -
  7. 我们如何保护您的用户信息
  8. -
  9. 您的权利
  10. -
  11. 我们如何处理儿童的个人信息
  12. -
  13. 您的用户信息如何储存及如何在全球范围转移
  14. -
  15. 本政策如何更新
  16. -
  17. 如何联系我们
  18. -
-

- 我们深知用户信息对您的重要性,并会尽全力保护您的用户信息安全可靠。我们致力于维持您对我们的信任,恪守以下原则,保护您的用户信息:权责一致原则、目的明确原则、选择同意原则、最少够用原则、确保安全原则、主体参与原则、公开透明原则等。同时,我们承诺,我们将按业界成熟的安全标准,采取相应的安全保护措施来保护您的用户信息。 -

-

请在使用我们的产品(或服务)前,仔细阅读并了解本隐私政策。

-

一、我们如何收集和使用您的用户信息

-

我们的产品基于DCloud uni-app x开发,应用运行期间需要收集您的设备唯一识别码(ODID/OAID)以提供统计分析服务,并通过应用启动数据及异常错误日志分析改进性能和用户体验,为用户提供更好的服务。详情内容请访问《DCloud用户服务条款》。

-

(一)我们可能会申请以下权限,仅用于演示 uni-app x 框架的功能

-
    -
  • 网络
  • -
  • 位置
  • -
  • 存储
  • -
  • 相册
  • -
  • 摄像头
  • -
  • 麦克风
  • -
  • 蓝牙
  • -
  • 联系人
  • -
  • 日历
  • -
  • 隐私窗口
  • -
  • 读取剪贴板
  • -
  • 生物特征识别能力
  • -
-

(二)征得授权同意的例外

-

请您理解,根据法律法规及相关国家标准,以下情形中,我们收集和使用您的用户信息无需征得您的授权同意:

-
    -
  1. 与国家安全、国防安全直接相关的;
  2. -
  3. 与公共安全、公共卫生、重大公共利益直接相关的;
  4. -
  5. 与犯罪侦查、起诉、审判和判决执行等直接相关的;
  6. -
  7. 出于维护您或其他个人的生命、财产等重大合法权益但又很难得到本人同意的;
  8. -
  9. 所收集的您的用户信息是您自行向社会公众公开的;
  10. -
  11. 从合法公开披露的信息中收集的您的用户信息,如合法的新闻报道、政府信息公开等渠道;
  12. -
  13. 根据您的要求签订或履行合同所必需的;
  14. -
  15. 用于维护软件及相关服务的安全稳定运行所必需的,例如发现、处置软件及相关服务的故障;
  16. -
  17. 个人信息控制者为新闻单位且其在开展合法的新闻报道所必需的;
  18. -
  19. 学术研究机构基于公共利益开展统计或学术研究所必要,且对外提供学术研究或描述的结果时,对结果中所包含的个人信息进行去标识化处理的。
  20. -
  21. 法律法规规定的其他情形。
  22. -
-

二、我们如何使用 Cookie 和同类技术

-

(一)Cookie

-

为确保网站正常运转,我们会在您的计算机或移动设备上存储名为 Cookie 的小数据文件。Cookie 通常包含标识符、站点名称以及一些号码和字符。借助于 Cookie,网站能够存储您的访问偏好数据。

-

我们不会将 Cookie 用于本政策所述目的之外的任何用途。您可根据自己的偏好管理或删除 Cookie。您可以清除计算机上保存的所有 Cookie,大部分网络浏览器都设有阻止Cookie - 的功能。但如果您这么做,则需要在每一次访问我们的网站时亲自更改用户设置。

-

(二)网站信标和像素标签

-

除 Cookie 外,我们还会在网站上使用网站信标和像素标签等其他同类技术。例如,我们向您发送的电子邮件可能含有链接至我们网站内容的点击URL。

-

- 如果您点击该链接,我们则会跟踪此次点击,帮助我们了解您的产品或服务偏好并改善客户服务。网站信标通常是一种嵌入到网站或电子邮件中的透明图像。借助于电子邮件中的像素标签,我们能够获知电子邮件是否被打开。如果您不希望自己的活动以这种方式被追踪,则可以随时从我们的寄信名单中退订。 -

-

(三)Do Not Track(请勿追踪)

-

很多网络浏览器均设有Do Not Track功能,该功能可向网站发布Do Not Track请求。目前,主要互联网标准组织尚未设立相关政策来规定网站应如何应对此类请求。但如果您的浏览器启用了 Do Not - Track,那么我们的所有网站都会尊重您的选择。

-

三、我们如何共享、转让、公开披露您的用户信息

-

(一)共享

-

我们不会与其他的任何公司、组织和个人分享您的用户信息,但以下情况除外:

-
    -
  1. 在获取明确同意的情况下共享:获得您的明确同意后,我们会与其他方共享您的用户信息。
  2. -
  3. 我们可能会根据法律法规规定,或按政府主管部门的强制性要求,对外共享您的用户信息。
  4. -
  5. 与我们的关联公司共享:您的用户信息可能会与我们的关联公司共享。我们只会共享必要的用户信息,且受本隐私政策中所声明目的的约束。关联公司如要改变用户信息的处理目的,将再次征求您的授权同意。
  6. -
  7. - 与授权合作伙伴共享:仅为实现本政策中声明的目的,我们的某些服务将由授权合作伙伴提供。我们可能会与合作伙伴共享您的某些用户信息,以提供更好的客户服务和用户体验。我们仅会出于合法、正当、必要、特定、明确的目的共享您的用户信息,并且只会共享提供服务所必要的用户信息。为了更好运营和改善技术和服务,您同意我们和授权合作伙伴在符合相关法律法规的前提下可将收集的信息用于其他服务和用途。 -
  8. -
-

(二)转让

-

我们不会将您的用户信息转让给任何公司、组织和个人,但以下情况除外:

-
    -
  1. 在获取明确同意的情况下转让:获得您的明确同意后,我们会向其他方转让您的用户信息;
  2. -
  3. 在涉及合并、收购或破产清算时,如涉及到用户信息转让,我们会再要求新的持有您用户信息的公司、组织继续受此隐私政策的约束,否则我们将要求该公司、组织重新向您征求授权同意。
  4. -
-

(三)公开披露

-

我们仅会在以下情况下,公开披露您的用户信息:

-
    -
  1. 获得您明确同意后;
  2. -
  3. 基于法律的披露:在法律、法律程序、诉讼或政府主管部门强制性要求的情况下,我们可能会公开披露您的用户信息。
  4. -
-

(四)共享、转让、公开披露信息时事先征得授权同意的例外

-

请您理解,根据法律法规及相关国家标准,以下情形中,我们共享、转让、公开披露您的用户信息无需征得您的授权同意:

-
    -
  1. 与国家安全、国防安全直接相关的;
  2. -
  3. 与公共安全、公共卫生、重大公共利益直接相关的;
  4. -
  5. 与犯罪侦查、起诉、审判和判决执行等直接相关的;
  6. -
  7. 出于维护您或其他个人的生命、财产等重大合法权益但又很难得到本人同意的;
  8. -
  9. 您自行向社会公众公开的信息;
  10. -
  11. 从合法公开披露的信息中收集的,如合法的新闻报道、政府信息公开等渠道。
  12. -
-

四、我们如何保护您的用户信息

-
    -
  1. 我们已使用符合业界标准的安全防护措施保护您提供的用户信息,防止数据遭到未经授权的访问、公开披露、使用、修改、损坏或丢失。我们会采取一切合理可行的措施,保护您的用户信息。例如,在您的浏览器与“服务”之间交换数据时受 - SSL - 加密保护;我们同时对网站提供https安全浏览方式;我们会使用加密技术确保数据的保密性;我们会使用受信赖的保护机制防止数据遭到恶意攻击;我们会部署访问控制机制,确保只有授权人员才可访问用户信息;以及我们会举办安全和隐私保护培训课程,加强员工对于保护用户信息重要性的认识。 -
  2. -
  3. 目前,我们的重要信息系统已通过信息安全等级保护(三级)测评和备案。
  4. -
  5. 我们已建立专门的管理系统、流程和组织,确保信息安全。例如,我们严格限制有信息访问权限的人员,要求这些人员遵循其保密义务,并对此进行审查。
  6. -
  7. 我们会采取一切合理可行的措施,确保未收集无关的用户信息。我们只会在达成本政策所述目的所需的期限内保留您的用户信息,除非需要延长保留期或受到法律的允许。
  8. -
  9. 互联网并非绝对安全的环境,而且电子邮件、即时通讯、及与其他用户的交流方式并未加密,我们强烈建议您不要通过此类方式发送用户信息。
  10. -
  11. 我们将定期更新并公开安全风险、用户信息安全影响评估等报告的有关内容。您可通过以下方式获得:
  12. -
  13. - 互联网环境并非百分之百安全,我们将尽力确保您发送给我们的任何信息的安全性。即使我们做出了很大努力,采取了一切合理且必要的措施,仍然有可能无法杜绝您的用户信息被非法访问、被非法盗取,被非法篡改或毁坏,导致您的合法权益受损,请您理解信息网络的上述风险并自愿承担。 -
  14. -
  15. - 在不幸发生用户信息安全事件后,我们将按照法律法规的要求,及时向您告知:安全事件的基本情况和可能的影响、我们已采取或将要采取的处置措施、您可自主防范和降低风险的建议、对您的补救措施等。我们将及时将事件相关情况以邮件、信函、电话、推送通知等方式告知您,难以逐一告知用户信息主体时,我们会采取合理、有效的方式发布公告。同时,我们还将按照监管部门要求,主动上报用户信息安全事件的处置情况。 -
  16. -
-

五、您的权利

-

按照中国相关的法律、法规、标准,以及其他国家、地区的通行做法,我们保障您对自己的用户信息行使以下权利:

-

(一)访问您的用户信息

-

您有权访问您的用户信息,法律法规规定的例外情况除外。如果您想行使数据访问权,可以通过以下方式自行访问:https://ask.dcloud.net.cn/

-

如果您无法通过上述链接访问这些用户信息,您可以随时使用我们的 Web 表单联系,或发送电子邮件至service@dcloud.io。我们将在30天内回复您的访问请求。

-

对于您在使用我们的产品或服务过程中产生的其他用户信息,只要我们不需要过多投入,我们会向您提供。如果您想行使数据访问权,请发送电子邮件至service@dcloud.io。

-

(二)更正您的用户信息

-

当您发现我们处理的关于您的用户信息有错误时,您有权要求我们作出更正。您可以通过“(一)访问您的用户信息”中罗列的方式提出更正申请。 如果您无法通过上述链接更正这些用户信息,您可以随时使用我们的 Web - 表单联系,或发送电子邮件至service@dcloud.io。我们将在30天内回复您的更正请求。

-

(三)删除您的用户信息

-

在以下情形中,您可以向我们提出删除用户信息的请求:

-
    -
  1. 如果我们处理用户信息的行为违反法律法规;
  2. -
  3. 如果我们收集、使用您的用户信息,却未征得您的同意;
  4. -
  5. 如果我们处理用户信息的行为违反了与您的约定;
  6. -
  7. 如果您不再使用我们的产品或服务,或您注销了账号;
  8. -
  9. 如果我们不再为您提供产品或服务。
  10. -
-

- 我们将会根据您的删除请求进行评估,若满足相应规定,我们将会采取相应步骤进行处理。当您向我们提出删除请求时,我们可能会要求您进行身份验证,以保障账户的安全。当您从我们的服务中删除信息后,因为适用的法律和安全技术,我们可能不会立即从备份系统中删除相应的信息,我们将安全存储您的信息直到备份可以清除或实现匿名化。 -

-

(四)改变您授权同意的范围

-

每个业务功能需要一些基本的用户信息才能得以完成(见本政策“第一部分”)。对于用户信息的收集和使用,您可以随时给予或收回您的授权同意。您可以通过以下方式自行操作:https://ask.dcloud.net.cn/

-

当您收回同意后,我们将不再处理相应的用户信息。同时也请您注意,您撤销授权同意可能会导致某些后果,例如我们可能无法继续为您提供相应的服务或特定的功能,但您收回同意的决定,不会影响此前基于您的授权而开展的用户信息处理。

-

(五)用户信息主体注销账户

-

您随时可注销此前注册的账户,您可以通过以下方式自行操作:https://ask.dcloud.net.cn/

-

在注销账户之后,我们将停止为您提供产品或服务并依据您的要求,删除或匿名化您的信息,法律法规另有规定的除外。这也将可能导致您失去对您账户中数据的访问权,请您谨慎操作。

-

(六)用户信息主体获取用户信息副本

-

您有权获取您的用户信息副本,您可以通过以下方式自行操作:https://ask.dcloud.net.cn/

-

在技术可行的前提下,例如数据接口匹配,我们还可按您的要求,直接将您的用户信息副本传输给您指定的第三方。

-

(七)约束信息系统自动决策

-

在某些业务功能中,我们可能仅依据信息系统、算法等在内的非人工自动决策机制作出决定。如果这些决定显著影响您的合法权益,您有权要求我们作出解释,我们也将提供适当的救济方式。

-

(八)响应您的上述请求

-

为保障安全,您可能需要提供书面请求,或以其他方式证明您的身份。我们可能会先要求您验证自己的身份,然后再处理您的请求。

-

我们将在三十天内作出答复。如您不满意,还可以通过以下途径投诉:service@dcloud.io

-

- 对于您合理的请求,我们原则上不收取费用,但对多次重复、超出合理限度的请求,我们将视情况收取一定成本费用。对于那些无端重复、需要过多技术手段(例如,需要开发新系统或从根本上改变现行惯例)、给他人合法权益带来风险或者非常不切实际的请求,我们可能会予以拒绝。也请您理解,出于安全保障的考虑、相关法律法规的要求或技术上的限制,对于您的某些请求我们可能无法做出响应,例如以下情形: -

-
    -
  1. 与用户信息控制者履行法律法规规定的义务相关的;
  2. -
  3. 与国家安全、国防安全直接相关的;
  4. -
  5. 与公共安全、公共卫生、重大公共利益直接相关的;
  6. -
  7. 与犯罪侦查、起诉、审判和执行判决等直接相关的;
  8. -
  9. 用户信息控制者有充分证据表明用户信息主体存在主观恶意或滥用权利的;
  10. -
  11. 出于维护用户信息主体或其他个人的生命、财产等重大合法权益但又很难得到本人同意的;
  12. -
  13. 响应用户信息主体的请求将导致用户信息主体或其他个人、组织的合法权益受到严重损害的;
  14. -
  15. 涉及商业秘密的。
  16. -
-

六、我们如何处理儿童的个人信息

-

我们非常重视儿童个人信息的保护,我们的产品、网站和服务主要面向成人。如果没有父母或监护人的同意,儿童不应创建自己的用户账户。尽管当地法律和习俗对儿童的定义不同,但我们将不满 14 周岁的任何人均视为儿童。

-

对于经父母或监护人同意而收集儿童用户信息的情况,我们只会在受到法律允许、父母或监护人明确同意或者保护儿童所必要的情况下储存、使用或公开披露此信息,否则我们会设法尽快删除相关数据。

-

- 鉴于现有技术和业务模式的限制,我们很难主动识别儿童的个人信息,如果您发现我们在不知情的情况下或在未事先获得可证实的监护人同意的情况下收集了儿童的个人信息,您可以及时联系我们,我们将在发现后设法及时删除,如果我们自己发现前述情形的,我们也会及时删除,法律要求我们保留的除外。 -

-

七、您的用户信息如何储存以及如何在全球范围转移

-

- 原则上,我们在中华人民共和国境内收集和产生的用户信息,将存储在中华人民共和国境内。我们只会在本政策所述目的和用途所需的期限内和法律法规规定的最短期限内保留您的用户信息,超出上述保留期间后,我们会根据适用法律法规的要求删除您的用户信息或匿名化处理。法律法规另有规定,或出于公共利益、科学历史研究等的目的,或您的另行授权同意的除外,我们可能需要较长时间保留相关数据。 -

-

由于我们通过遍布全球的资源和服务器提供产品或服务,这意味着,在获得您的授权同意后,您的用户信息可能会被转移到您使用产品或服务所在国家/地区的境外管辖区,或者受到来自这些管辖区的访问。

-

- 此类管辖区可能设有不同的数据保护法,甚至未设立相关法律。在此类情况下,我们会确保您的用户信息得到在中华人民共和国境内足够同等的保护。例如,我们会请求您对跨境转移用户信息的同意,或者在跨境数据转移之前实施数据去标识化等安全举措。 -

-

八、本政策如何更新

-

我们的隐私政策可能变更。未经您明确同意,我们不会削减您按照本隐私政策所应享有的权利。我们会在本页面上发布对本政策所做的任何变更。

-

对于重大变更,我们还会提供更为显著的通知。本政策所指的重大变更包括但不限于:

-
    -
  1. 我们的服务模式发生重大变化。如处理用户信息的目的、处理的用户信息类型、用户信息的使用方式等;
  2. -
  3. 我们在所有权结构、组织架构等方面发生重大变化。如业务调整、破产并购等引起的所有者变更等;
  4. -
  5. 用户信息共享、转让或公开披露的主要对象发生变化;
  6. -
  7. 您参与用户信息处理方面的权利及其行使方式发生重大变化;
  8. -
  9. 我们负责处理用户信息安全的责任部门、联络方式及投诉渠道发生变化时;
  10. -
  11. 用户信息安全影响评估报告表明存在高风险时。
  12. -
-

我们还会将本政策的旧版本存档,供您查阅。

-

九、如何联系我们

-

如果您对本隐私政策有任何疑问、意见或建议,通过以下方式与我们联系:

-

电子邮件:service@dcloud.io

-

一般情况下,我们将在三十天内回复。

-

如果您对我们的回复不满意,特别是我们的用户信息处理行为损害了您的合法权益,您还可以通过以下外部途径寻求解决方案:service@dcloud.io

- -
- - - - diff --git a/mpuniapp/hybrid/html/simple.html b/mpuniapp/hybrid/html/simple.html deleted file mode 100644 index c621935..0000000 --- a/mpuniapp/hybrid/html/simple.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - 本地网页 - - - -

web-view 组件加载本地简单 html 示例(内容不可滚动),用于测试 scroll-view 嵌套滚动。

- - diff --git a/mpuniapp/hybrid/html/uni.webview.1.5.5.js b/mpuniapp/hybrid/html/uni.webview.1.5.5.js deleted file mode 100644 index 2c9b980..0000000 --- a/mpuniapp/hybrid/html/uni.webview.1.5.5.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).uni=n()}(this,(function(){"use strict";try{var e={};Object.defineProperty(e,"passive",{get:function(){!0}}),window.addEventListener("test-passive",null,e)}catch(e){}var n=Object.prototype.hasOwnProperty;function i(e,i){return n.call(e,i)}var t=[];function o(){return window.__dcloud_weex_postMessage||window.__dcloud_weex_}function a(){return window.__uniapp_x_postMessage||window.__uniapp_x_}var r=function(e,n){var i={options:{timestamp:+new Date},name:e,arg:n};if(a()){if("postMessage"===e){var r={data:n};return window.__uniapp_x_postMessage?window.__uniapp_x_postMessage(r):window.__uniapp_x_.postMessage(JSON.stringify(r))}var d={type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:t}};window.__uniapp_x_postMessage?window.__uniapp_x_postMessageToService(d):window.__uniapp_x_.postMessageToService(JSON.stringify(d))}else if(o()){if("postMessage"===e){var s={data:[n]};return window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessage(s):window.__dcloud_weex_.postMessage(JSON.stringify(s))}var w={type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:t}};window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessageToService(w):window.__dcloud_weex_.postMessageToService(JSON.stringify(w))}else{if(!window.plus)return window.parent.postMessage({type:"WEB_INVOKE_APPSERVICE",data:i,pageId:""},"*");if(0===t.length){var u=plus.webview.currentWebview();if(!u)throw new Error("plus.webview.currentWebview() is undefined");var g=u.parent(),v="";v=g?g.id:u.id,t.push(v)}if(plus.webview.getWebviewById("__uniapp__service"))plus.webview.postMessageToUniNView({type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:t}},"__uniapp__service");else{var c=JSON.stringify(i);plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat("WEB_INVOKE_APPSERVICE",'",').concat(c,",").concat(JSON.stringify(t),");"))}}},d={navigateTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;r("navigateTo",{url:encodeURI(n)})},navigateBack:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.delta;r("navigateBack",{delta:parseInt(n)||1})},switchTab:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;r("switchTab",{url:encodeURI(n)})},reLaunch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;r("reLaunch",{url:encodeURI(n)})},redirectTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;r("redirectTo",{url:encodeURI(n)})},getEnv:function(e){a()?e({uvue:!0}):o()?e({nvue:!0}):window.plus?e({plus:!0}):e({h5:!0})},postMessage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r("postMessage",e.data||{})}},s=/uni-app/i.test(navigator.userAgent),w=/Html5Plus/i.test(navigator.userAgent),u=/complete|loaded|interactive/;var g=window.my&&navigator.userAgent.indexOf(["t","n","e","i","l","C","y","a","p","i","l","A"].reverse().join(""))>-1;var v=window.swan&&window.swan.webView&&/swan/i.test(navigator.userAgent);var c=window.qq&&window.qq.miniProgram&&/QQ/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var p=window.tt&&window.tt.miniProgram&&/toutiaomicroapp/i.test(navigator.userAgent);var _=window.wx&&window.wx.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var m=window.qa&&/quickapp/i.test(navigator.userAgent);var f=window.ks&&window.ks.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var l=window.tt&&window.tt.miniProgram&&/Lark|Feishu/i.test(navigator.userAgent);var E=window.jd&&window.jd.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var x=window.xhs&&window.xhs.miniProgram&&/xhsminiapp/i.test(navigator.userAgent);for(var S,h=function(){window.UniAppJSBridge=!0,document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady",{bubbles:!0,cancelable:!0}))},y=[function(e){if(s||w)return window.__uniapp_x_postMessage||window.__uniapp_x_||window.__dcloud_weex_postMessage||window.__dcloud_weex_?document.addEventListener("DOMContentLoaded",e):window.plus&&u.test(document.readyState)?setTimeout(e,0):document.addEventListener("plusready",e),d},function(e){if(_)return window.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(e,0):document.addEventListener("WeixinJSBridgeReady",e),window.wx.miniProgram},function(e){if(c)return window.QQJSBridge&&window.QQJSBridge.invoke?setTimeout(e,0):document.addEventListener("QQJSBridgeReady",e),window.qq.miniProgram},function(e){if(g){document.addEventListener("DOMContentLoaded",e);var n=window.my;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){if(v)return document.addEventListener("DOMContentLoaded",e),window.swan.webView},function(e){if(p)return document.addEventListener("DOMContentLoaded",e),window.tt.miniProgram},function(e){if(m){window.QaJSBridge&&window.QaJSBridge.invoke?setTimeout(e,0):document.addEventListener("QaJSBridgeReady",e);var n=window.qa;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){if(f)return window.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(e,0):document.addEventListener("WeixinJSBridgeReady",e),window.ks.miniProgram},function(e){if(l)return document.addEventListener("DOMContentLoaded",e),window.tt.miniProgram},function(e){if(E)return window.JDJSBridgeReady&&window.JDJSBridgeReady.invoke?setTimeout(e,0):document.addEventListener("JDJSBridgeReady",e),window.jd.miniProgram},function(e){if(x)return window.xhs.miniProgram},function(e){return document.addEventListener("DOMContentLoaded",e),d}],M=0;M `${currentTestName} toSaveSnapshot success`; - let pass = true; - - try { - checkSnapshotDir(path.dirname(filePath)); - fs.writeFileSync(filePath, received); - writeTestCaseToSnapshotFile(testPath.replace(`${_rootDir}/`, ""), filePath); - } catch (e) { - console.log("toSaveSnapshot fail", e); - message = () => e.message; - pass = false; - } - - return { - message, - pass, - }; -} - -function toSaveImageSnapshot( - received, { - customSnapshotsDir, - customSnapshotIdentifier - } = {} -) { - const { - snapshotState: { - _rootDir - }, - testPath, - currentTestName, - } = this; - const SNAPSHOTS_DIR = "__image_snapshots__"; - const snapshotDir = - process.env.saveImageSnapshotDir || - createSnapshotDir({ - customSnapshotsDir, - testPath, - SNAPSHOTS_DIR, - }); - const _fileName = createFileName({ - fileName: customSnapshotIdentifier ? `${customSnapshotIdentifier()}.png` : "", - testPath, - currentTestName, - fileType: "png", - }); - const filePath = path.join(snapshotDir, _fileName); - let message = () => `${currentTestName} toSaveImageSnapshot success`; - let pass = true; - - try { - checkSnapshotDir(path.dirname(filePath)); - fs.writeFileSync(filePath, Buffer.from(received, "base64")); - writeTestCaseToSnapshotFile(testPath.replace(`${_rootDir}/`, ""), filePath); - } catch (e) { - console.log("toSaveImageSnapshot fail", e); - message = () => e.message; - pass = false; - } - - return { - message, - pass, - }; -} - -function createSnapshotDir({ - customSnapshotsDir, - testPath, - SNAPSHOTS_DIR -}) { - return customSnapshotsDir || path.join(path.dirname(testPath), SNAPSHOTS_DIR); -} - -function createFileName({ - fileName, - testPath, - currentTestName, - fileType -}) { - return ( - fileName || - createSnapshotIdentifier({ - testPath, - currentTestName, - fileType, - }) - ); -} - -function createSnapshotIdentifier({ - testPath, - currentTestName, - fileType = "txt", -}) { - const snapshotIdentifier = kebabCase( - `${path.basename(testPath)}-${currentTestName}` - ); - const counter = timesCalled.get(`${snapshotIdentifier}-${fileType}`) || 1; - timesCalled.set(`${snapshotIdentifier}-${fileType}`, counter + 1); - return `${snapshotIdentifier}-${counter}.${fileType}`; -} - -function kebabCase(str) { - return str - .replaceAll(/([a-z])([A-Z])/g, "$1-$2") - .replaceAll(/\s+/g, "-") - .replaceAll(/_+/g, "-") - .replaceAll(/\/+/g, "-") - .replaceAll(/\.+/g, "-") - .toLowerCase(); -} - -function checkSnapshotDir(snapshotDir) { - if (!fs.existsSync(snapshotDir)) { - fs.mkdirSync(snapshotDir, { - recursive: true, - }); - } -} - -const timesCalled = new Map(); diff --git a/mpuniapp/jest.config.js b/mpuniapp/jest.config.js deleted file mode 100644 index 997b9a5..0000000 --- a/mpuniapp/jest.config.js +++ /dev/null @@ -1,44 +0,0 @@ -const fs = require('fs') -const path = require('path') - -const config = { - testTimeout: 15000, - reporters: ['default'], - watchPathIgnorePatterns: ['/node_modules/', '/dist/', '/.git/'], - moduleFileExtensions: ['js', 'json'], - rootDir: __dirname, - testMatch: ['/pages/**/*test.[jt]s?(x)'], - testPathIgnorePatterns: ['/node_modules/', '/pages/uni-ui/'], - setupFilesAfterEnv: ['/jest-setup.js'], - testSequencer: path.join(__dirname, "testSequencer.js") -} - -// 如果主机电脑中有虚拟网卡(比如安装了 Docker/WSL 等软件),额外的 IP 地址有可能干扰应用端通过 IP 地址连接到主机端的测试工具。 -// 如果存在这种情况,可以在当前目录下创建一个 globalSetup.js 文件,在其中检测到实际用于网络通信的主 IP 地址并传递给应用端。 -// globalSetup.js 的内容可参考下面这段代码: -// -// const dgram = require('dgram'); -// function getPrimaryIP() { -// return new Promise((resolve, reject) => { -// const socket = dgram.createSocket('udp4'); -// // 这里并不会真的发送数据包,只是触发系统路由选择 -// socket.connect(80, '8.8.8.8', () => { -// const { address } = socket.address(); -// socket.close(); -// resolve(address); -// }); -// socket.on('error', (err) => { -// resolve(undefined); -// }); -// }); -// } -// module.exports = async () => { -// process.env.UNI_AUTOMATOR_HOST = await getPrimaryIP() -// }; - -const globalSetupPath = path.resolve(__dirname, 'globalSetup.js') -if (fs.existsSync(globalSetupPath)) { - config.globalSetup = globalSetupPath; -} - -module.exports = config; diff --git a/mpuniapp/main.uts b/mpuniapp/main.uts index a99482e..ad8cd16 100644 --- a/mpuniapp/main.uts +++ b/mpuniapp/main.uts @@ -1,37 +1,9 @@ -// 仅测试 console.log 时机问题 -import './test-main-console.uts' -// #ifdef APP-ANDROID || APP-IOS || WEB || MP-WEIXIN || APP-HARMONY -import { uniStat } from '@/uni_modules/uni-stat/plugin.uts' -// #endif import App from './App.uvue' - import { createSSRApp } from 'vue' -// 统计配置 -const uniStatcollectItems = { - uniStatPageLog: true -} - -const uniStatOptions = { - enable: process.env.NODE_ENV == 'production', - debug: false, - collectItems: uniStatcollectItems, -} - export function createApp() { const app = createSSRApp(App) - // #ifdef APP-ANDROID || APP-IOS || WEB || MP-WEIXIN || APP-HARMONY - app.use(uniStat, uniStatOptions) - // #endif - // app.mixin({ - // onReady() { - // setTimeout(() => { - // console.log((this as BasePage).$nativePage!.getDomJson()) - // }, 100) - // } - // }) return { app } } -// 此注释必须放在此文件的最后一行,用于测试issue#18520 diff --git a/mpuniapp/package.json b/mpuniapp/package.json index 07b0d95..f9381b4 100644 --- a/mpuniapp/package.json +++ b/mpuniapp/package.json @@ -1,17 +1,13 @@ { - "id": "hello-uniapp-x", + "id": "omnicard-ai", "name": "OmniCard", "displayName": "OmniCard", - "version": "1.0.44", - "description": "OmniCard", - "scripts": { - "check-commit": "node ./git-hooks/check-commit.cjs" - }, - "repository": "https://gitcode.net/dcloud/hello-uni-app-x", + "version": "1.0.0", + "description": "OmniCard AI 用户端:数字名片、移动微官网、访客雷达与 NFC 管家", + "scripts": {}, "keywords": [ "uni-app-x", - "uni-app2.0", - "示例工程" + "OmniCard" ], "author": "", "license": "MIT", @@ -44,8 +40,8 @@ "encrypt": [], "platforms": { "cloud": { - "tcb": "y", - "aliyun": "y" + "tcb": "n", + "aliyun": "n" }, "client": { "App": { @@ -54,20 +50,20 @@ "app-uvue": "y" }, "H5-mobile": { - "Safari": "n", - "Android Browser": "n", - "微信浏览器(Android)": "n", - "QQ浏览器(Android)": "n" + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" }, "H5-pc": { - "Chrome": "n", + "Chrome": "y", "IE": "n", - "Edge": "n", - "Firefox": "n", - "Safari": "n" + "Edge": "y", + "Firefox": "y", + "Safari": "y" }, "小程序": { - "微信": "n", + "微信": "y", "阿里": "n", "百度": "n", "字节跳动": "n", @@ -88,4 +84,4 @@ } } } -} \ No newline at end of file +} diff --git a/mpuniapp/pages.json b/mpuniapp/pages.json index d7a7470..e45ac69 100644 --- a/mpuniapp/pages.json +++ b/mpuniapp/pages.json @@ -43,10 +43,17 @@ "backgroundColorContent": "#F7F8FA" } }, + { + "path": "pages/owner/hall/index", + "style": { + "navigationBarTitleText": "名片大厅", + "backgroundColorContent": "#F7F8FA" + } + }, { "path": "pages/owner/card/index", "style": { - "navigationBarTitleText": "名片中心", + "navigationBarTitleText": "我的名片", "backgroundColorContent": "#F7F8FA" } }, @@ -60,7 +67,7 @@ { "path": "pages/owner/leads", "style": { - "navigationBarTitleText": "潜客列表", + "navigationBarTitleText": "客户管理", "backgroundColorContent": "#F7F8FA" } }, diff --git a/mpuniapp/pages.json更新说明.md b/mpuniapp/pages.json更新说明.md deleted file mode 100644 index 9202f32..0000000 --- a/mpuniapp/pages.json更新说明.md +++ /dev/null @@ -1,28 +0,0 @@ - -## pages.json - -创建 `component`、`API`、`CSS` 示例页面时,如果该示例页面需要在对应 `tabBar` 菜单中展示,`path` 命名需要遵循以下规则: -- pages/component/component-name/component-name -- pages/API/api-name/api-name -- pages/CSS/css-name/css-name - -所以,如果是扩展示例,比如针对 `button type 属性` 的示例,`path` 可以是:`pages/component/button/button-type`\ -如果想要该示例页面在菜单中显示,则需要调整为:`pages/component/button/button/type`\ -如果 API 示例为多个 API 的组合,此时无法以单一 API 名称命名,可以使用 `pages/API/xxx/xxx` 命名示例页面,但在维护 [syntaxdoc](http://git.dcloud.io/uni-app-x/syntaxdoc) `modules.json` 时,需要通过 `items` 节点关联对应 API 信息。\ - -增加上述示例页面时,相同类型的页面要放在一起,不要随意放置在最后或最前!\ -即:\ -pages/component/xxx/xxx 的页面应该相邻放置,\ -pages/API/xxx/xxx 的页面应该相邻放置,\ -pages/CSS/xxx/xxx 的页面应该相邻放置,\ -而不是把新增的页面放在 pages 数组的最后或最前。 - -增加上述示例页面时,不需要基于平台兼容性补充条件编译,代码提交后,会基于 [syntaxdoc](http://git.dcloud.io/uni-app-x/syntaxdoc) 仓库中的平台兼容性信息,自动生成对应的条件编译代码,并更新 `pages.json`。 - -`pages.json` 中增加后页面配置后,需要在 [syntaxdoc](http://git.dcloud.io/uni-app-x/syntaxdoc) 仓库的 `modules.json` 中维护目录信息。 - -如需在本地调试时增加 `tabBar` 页面入口,需要修改 `pages.json` 中 `page` 的 `group` 信息,格式为使用 `,` 分隔的数字字符串。\ -`page.group` 属性中的数字代表该页面在 `pages.json/groups` 中对应位置的下标, -`pages.json/groups` 中维护了基于 `syntaxdoc/modules.json` 获取的目录信息。 - -调整现有页面的路径或平台兼容性,或移除页面时,如果该页面涉及截图对比测试,需要同时调整 `pages/pages.test.js` 中的页面地址。 \ No newline at end of file diff --git a/mpuniapp/pages/common/login.uvue b/mpuniapp/pages/common/login.uvue index 7582adf..b9a0355 100644 --- a/mpuniapp/pages/common/login.uvue +++ b/mpuniapp/pages/common/login.uvue @@ -25,8 +25,15 @@ {{ t('subtitle') }} - + + + {{ t('tabPassword') }} + - - + + + + {{ t('usernamePlaceholder') }} + + + + {{ t('passwordPlaceholder') }} + + + + + + + {{ t('tabPhone') }} @@ -63,7 +97,6 @@ - {{ t('smsCode') }} @@ -85,8 +118,8 @@ + - {{ t('tabEmail') }} @@ -154,12 +189,14 @@ import { getCurrentLocale, isRtlLocale, OmniLocale, setAppLocale } from '../../c import { createLoginState, switchLoginTab, + submitPasswordLogin, submitPhoneLogin, sendMagicLink, sendSmsCode, tickCountdown, tapSocialLogin, resolveLoginText, + fillTestAccount, LoginCopyKey, LoginTab, SocialProvider, @@ -201,6 +238,9 @@ const codeButtonText = computed((): string => { }); const primaryButtonText = computed((): string => { + if (state.tab === 'password') { + return state.submitting ? t('loading') : t('login'); + } return state.tab === 'phone' ? t('login') : t('magicLink'); }); @@ -224,14 +264,14 @@ function handleGoBack(): void { try { uni.navigateBack({ fail: () => { - uni.switchTab({ - url: '/pages/portal/index', + uni.reLaunch({ + url: '/pages/owner/hall/index', }); }, }); } catch (_e) { - uni.switchTab({ - url: '/pages/portal/index', + uni.reLaunch({ + url: '/pages/owner/hall/index', }); } } @@ -266,8 +306,14 @@ function handleSendCode(): void { } } +function handleAutofillTest(): void { + fillTestAccount(state); +} + function handlePrimarySubmit(): void { - if (state.tab === 'phone') { + if (state.tab === 'password') { + submitPasswordLogin(state); + } else if (state.tab === 'phone') { submitPhoneLogin(state); } else { sendMagicLink(state); @@ -576,6 +622,32 @@ onUnmounted(() => { color: #98A2B3; } +/* 测试账号一键填充辅助胶囊 */ +.test-account-badge { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + padding: 6px 10px; + background-color: #F7F8FA; + border: 1px dashed #D0D5DD; + border-radius: 8px; + margin-bottom: 12px; + cursor: pointer; + transition: background-color 150ms cubic-bezier(0.2, 0.8, 0.2, 1); +} + +.test-account-badge:active { + background-color: #EAF1FF; + border-color: #0B5CFF; +} + +.test-account-text { + font-size: 12px; + color: #0B5CFF; + font-weight: 500; +} + /* 错误提示 */ .error-banner { padding: 8px 12px; @@ -593,8 +665,13 @@ onUnmounted(() => { .primary-cta-btn { width: 100%; height: 44px; + line-height: 44px; min-height: 44px; background-color: #0B5CFF; + color: #FFFFFF; + font-size: 15px; + font-weight: 600; + text-align: center; border-radius: 12px; display: flex; align-items: center; @@ -602,15 +679,21 @@ onUnmounted(() => { border: none; margin-top: 6px; margin-bottom: 18px; + cursor: pointer; transition: opacity 150ms cubic-bezier(0.2, 0.8, 0.2, 1); } +.primary-cta-btn::after { + border: none; +} + .primary-cta-btn:active { opacity: 0.88; } .primary-cta-disabled { background-color: #E3E7ED; + cursor: not-allowed; } .primary-cta-text { diff --git a/mpuniapp/pages/common/useLogin.uts b/mpuniapp/pages/common/useLogin.uts index 90320cb..6eb2413 100644 --- a/mpuniapp/pages/common/useLogin.uts +++ b/mpuniapp/pages/common/useLogin.uts @@ -1,12 +1,14 @@ /** * OmniCard AI (CRMmp) - 统一身份认证登录业务驱动层 - * 第一版可用骨架:不接真实 Google / Apple SDK,不伪造成功登录 + * 第一版可用骨架:支持账号密码真实登录对齐后端、手机号验证码、邮箱MagicLink与社交登录入口 */ import { getCurrentLocale, getOmniText, OmniLocale } from '../../common/locale.uts'; -import { setAuthToken, setTenantId } from '../../common/request.uts'; +import { setAuthToken, setTenantId, httpPost } from '../../common/request.uts'; +import { collectHallContact } from '../../common/api.uts'; +import { consumePendingCollectCard } from '../owner/hall/useHall.uts'; -export type LoginTab = 'phone' | 'email'; +export type LoginTab = 'password' | 'phone' | 'email'; export type SocialProvider = 'google' | 'apple'; export type LoginCopyKey = @@ -14,8 +16,14 @@ export type LoginCopyKey = | 'brandTag' | 'subtitle' | 'desc' + | 'tabPassword' | 'tabPhone' | 'tabEmail' + | 'usernamePlaceholder' + | 'passwordPlaceholder' + | 'accountRequired' + | 'passwordRequired' + | 'testAccountTip' | 'countryCode' | 'phonePlaceholder' | 'sendCode' @@ -39,6 +47,8 @@ export type LoginCopyKey = export type LoginState = { tab: LoginTab; + username: string; + password: string; countryCode: string; phone: string; smsCode: string; @@ -48,6 +58,13 @@ export type LoginState = { countdown: number; }; +export type LoginAdminResponse = { + token: string; + expire?: number; + refreshToken?: string; + refreshExpire?: number; +}; + function isZhLocale(): boolean { return getCurrentLocale() === 'zh-CN'; } @@ -71,12 +88,30 @@ export function resolveLoginText(key: LoginCopyKey | string, targetLocale?: stri if (key === 'subtitle') { return zh ? '极简出海商务,连接全球商机' : 'Minimalist global commerce & identity'; } + if (key === 'tabPassword') { + return zh ? '账号密码' : 'Password'; + } if (key === 'tabPhone') { return zh ? '手机号' : 'Phone'; } if (key === 'tabEmail') { return zh ? '邮箱' : 'Email'; } + if (key === 'usernamePlaceholder') { + return zh ? '用户名或手机号' : 'Username or phone'; + } + if (key === 'passwordPlaceholder') { + return zh ? '登录密码' : 'Password'; + } + if (key === 'accountRequired') { + return zh ? '请填写账号' : 'Enter your username'; + } + if (key === 'passwordRequired') { + return zh ? '请填写密码' : 'Enter your password'; + } + if (key === 'testAccountTip') { + return zh ? '测试账号: admin / 123456 (点击一键填入)' : 'Test account: admin / 123456 (Click to autofill)'; + } if (key === 'desc') { return zh ? '使用国际手机号或邮箱继续' : 'Continue with your phone or email'; } @@ -148,20 +183,51 @@ function toastNone(title: string): void { } function finishAfterLogin(): void { - if (typeof uni.switchTab === 'function') { - uni.switchTab({ - url: '/pages/owner/card/index', - }); - } else if (typeof uni.reLaunch === 'function') { - uni.reLaunch({ - url: '/pages/owner/card/index', + try { + uni.showToast({ + title: resolveLoginText('loginSuccess'), + icon: 'success', }); + } catch (e) {} + + const pendingCardId = consumePendingCollectCard(); + if (pendingCardId !== '') { + collectHallContact(pendingCardId).catch(() => {}); } + + try { + if (typeof uni.switchTab === 'function') { + uni.switchTab({ + url: '/pages/owner/card/index', + }); + if (typeof window !== 'undefined' && window.location != null) { + try { + setTimeout(() => { + const currentHash = window.location.hash || ''; + if (!currentHash.includes('/pages/owner/card/index')) { + window.location.hash = '#/pages/owner/card/index'; + } + }, 300); + } catch (e) {} + } + return; + } + } catch (e) {} + + try { + if (typeof uni.reLaunch === 'function') { + uni.reLaunch({ + url: '/pages/owner/card/index', + }); + } + } catch (e) {} } export function createLoginState(): LoginState { return { - tab: 'phone', + tab: 'password', + username: '', + password: '', countryCode: '+86', phone: '', smsCode: '', @@ -177,6 +243,15 @@ export function switchLoginTab(state: LoginState, tab: LoginTab): void { state.errorMessage = ''; } +/** + * 一键填充测试账号 + */ +export function fillTestAccount(state: LoginState): void { + state.username = 'admin'; + state.password = '123456'; + state.errorMessage = ''; +} + /** * 倒计时推进函数 */ @@ -206,6 +281,52 @@ export function completeLogin(token: string, tenantId?: string): boolean { return true; } +/** + * 账号密码真实登录:对齐后端 Cool-Admin POST /admin/base/open/login + */ +export async function submitPasswordLogin(state: LoginState): Promise { + const username = state.username != null ? state.username.trim() : ''; + if (username === '') { + state.errorMessage = resolveLoginText('accountRequired'); + toastNone(state.errorMessage); + return false; + } + + const password = state.password != null ? state.password.trim() : ''; + if (password === '') { + state.errorMessage = resolveLoginText('passwordRequired'); + toastNone(state.errorMessage); + return false; + } + + if (state.submitting) { + return false; + } + + state.submitting = true; + state.errorMessage = ''; + + try { + const res = await httpPost('/admin/base/open/login', { + username, + password, + }); + state.submitting = false; + if (res != null && res.token != null && res.token !== '') { + completeLogin(res.token); + return true; + } + state.errorMessage = '登录失败,未获取到有效凭证'; + toastNone(state.errorMessage); + return false; + } catch (err: any) { + state.submitting = false; + const msg = err && err.message ? err.message : '账户或密码不正确~'; + state.errorMessage = msg; + return false; + } +} + export function sendSmsCode(state: LoginState): boolean { if (state.countdown > 0) { return false; diff --git a/mpuniapp/pages/owner/card/index.uvue b/mpuniapp/pages/owner/card/index.uvue index 11bde2d..14f5024 100644 --- a/mpuniapp/pages/owner/card/index.uvue +++ b/mpuniapp/pages/owner/card/index.uvue @@ -30,7 +30,7 @@ - + {{ item.name }} {{ formatField(item.title) }} @@ -38,7 +38,7 @@ {{ statusLabelOf(item.status) }} - {{ posterLabel }} + {{ editLabel }} @@ -59,13 +59,17 @@ diff --git a/mpuniapp/pages/owner/card/useCardHome.uts b/mpuniapp/pages/owner/card/useCardHome.uts index 6fbb875..b27f228 100644 --- a/mpuniapp/pages/owner/card/useCardHome.uts +++ b/mpuniapp/pages/owner/card/useCardHome.uts @@ -26,13 +26,16 @@ export type CardHomeCopyKey = | 'subtitle' | 'searchPlaceholder' | 'refresh' + | 'share' + | 'preview' | 'poster' | 'empty' | 'error' | 'loading' | 'statusDraft' | 'statusPublished' - | 'statusArchived'; + | 'statusArchived' + | 'quotaExceeded'; export type LoadCardsQuery = { page: number; @@ -83,9 +86,12 @@ function isZhLocale(): boolean { */ export function resolveCardHomeText(key: CardHomeCopyKey): string { const locale = getCurrentLocale(); - if (key === 'poster') { + if (key === 'poster' || key === 'share') { return getOmniText(locale, 'card.share'); } + if (key === 'preview') { + return getOmniText(locale, 'card.view_profile'); + } if (key === 'empty') { return getOmniText(locale, 'common.empty'); } @@ -98,16 +104,16 @@ export function resolveCardHomeText(key: CardHomeCopyKey): string { const zh = isZhLocale(); if (key === 'title') { - return zh ? '名片中心' : 'Cards'; + return zh ? '我的名片' : 'My cards'; } if (key === 'subtitle') { - return zh ? '编辑资料或生成分享海报' : 'Edit a card or open its poster'; + return zh ? '预览微官网或分享当前名片' : 'Preview the site or share a card'; } if (key === 'searchPlaceholder') { return zh ? '搜索姓名、职位或公司' : 'Search name, title or company'; } if (key === 'refresh') { - return zh ? '刷新名片' : 'Refresh cards'; + return zh ? '分享名片' : 'Share card'; } if (key === 'statusDraft') { return zh ? '草稿' : 'Draft'; @@ -118,6 +124,9 @@ export function resolveCardHomeText(key: CardHomeCopyKey): string { if (key === 'statusArchived') { return zh ? '已归档' : 'Archived'; } + if (key === 'quotaExceeded') { + return zh ? '名片配额已满,升级后可继续创建' : 'Card quota is full. Upgrade to create more.'; + } return ''; } @@ -311,3 +320,31 @@ export function openCardQrcode(card: CardHomeItem): void { url: buildQrcodeUrl(card), }); } + +export function buildPortalPreviewUrl(card: CardHomeItem): string { + if (card.slug != null && card.slug !== '') { + return `/pages/portal/index?slug=${card.slug}`; + } + if (card.id != null) { + return `/pages/portal/index?id=${card.id}`; + } + return '/pages/portal/index'; +} + +export function openCardPreview(card: CardHomeItem): void { + uni.navigateTo({ + url: buildPortalPreviewUrl(card), + }); +} + +export function pickShareCard(list: CardHomeItem[]): CardHomeItem | null { + for (let i = 0; i < list.length; i++) { + if (list[i].status === 'published') { + return list[i]; + } + } + if (list.length > 0) { + return list[0]; + } + return null; +} diff --git a/mpuniapp/pages/owner/hall/index.uvue b/mpuniapp/pages/owner/hall/index.uvue new file mode 100644 index 0000000..483e353 --- /dev/null +++ b/mpuniapp/pages/owner/hall/index.uvue @@ -0,0 +1,368 @@ + + + + + diff --git a/mpuniapp/pages/owner/hall/useHall.uts b/mpuniapp/pages/owner/hall/useHall.uts new file mode 100644 index 0000000..e869203 --- /dev/null +++ b/mpuniapp/pages/owner/hall/useHall.uts @@ -0,0 +1,273 @@ +/** + * OmniCard AI - 名片大厅人脉驱动层 + */ + +import { + CardContact, + OwnerPageData, + OwnerPageQuery, +} from '../../../common/types.uts'; +import { + collectHallContact, + confirmHallExchange, + fetchHallContactPage, + fetchTeamWallPage, +} from '../../../common/api.uts'; +import { getCurrentLocale, getOmniText } from '../../../common/locale.uts'; + +export type HallCopyKey = + | 'title' + | 'subtitle' + | 'searchPlaceholder' + | 'refresh' + | 'exchangePlaceholder' + | 'exchange' + | 'empty' + | 'error' + | 'loading' + | 'scan' + | 'tabContacts' + | 'tabTeam' + | 'teamEmpty'; + +export type HallContactItem = { + id?: string | number; + peerCardId: number; + peerName: string; + peerTitle?: string; + peerCompany?: string; + peerSlug?: string; + source?: string; +}; + +export type HallTab = 'contacts' | 'team'; + +export type HallState = { + tab: HallTab; + list: HallContactItem[]; + page: number; + size: number; + total: number; + keyWord: string; + exchangeCode: string; + loading: boolean; + empty: boolean; + errorMessage: string; +}; + +export type LoadHallApi = { + fetchHallContactPage: ( + query: OwnerPageQuery + ) => Promise>; + fetchTeamWallPage?: ( + query: OwnerPageQuery + ) => Promise>; + confirmHallExchange?: ( + exchangeCode: string + ) => Promise<{ status: string; isDualSynced: boolean }>; + collectHallContact?: (peerCardId: string | number) => Promise; +}; + +function isZhLocale(): boolean { + return getCurrentLocale() === 'zh-CN'; +} + +export function resolveHallText(key: HallCopyKey): string { + const locale = getCurrentLocale(); + if (key === 'empty') { + return getOmniText(locale, 'common.empty'); + } + if (key === 'error') { + return getOmniText(locale, 'common.error'); + } + if (key === 'loading') { + return getOmniText(locale, 'common.loading'); + } + if (key === 'scan') { + return getOmniText(locale, 'card.scan_nfc'); + } + + const zh = isZhLocale(); + if (key === 'title') { + return zh ? '名片大厅' : 'Card hall'; + } + if (key === 'subtitle') { + return zh ? '已互换和收藏的名片' : 'Exchanged and saved cards'; + } + if (key === 'searchPlaceholder') { + return zh ? '搜索姓名或公司' : 'Search name or company'; + } + if (key === 'refresh') { + return zh ? '刷新人脉' : 'Refresh network'; + } + if (key === 'exchangePlaceholder') { + return zh ? '输入 6 位互换码' : '6-digit exchange code'; + } + if (key === 'exchange') { + return zh ? '确认互换' : 'Confirm exchange'; + } + if (key === 'tabContacts') { + return zh ? '人脉' : 'Network'; + } + if (key === 'tabTeam') { + return zh ? '团队' : 'Team'; + } + if (key === 'teamEmpty') { + return zh ? '还没有同事发布名片' : 'No published teammate cards yet'; + } + return ''; +} + +export function toHallItem(row: CardContact): HallContactItem { + return { + id: row.id, + peerCardId: Number(row.peerCardId), + peerName: row.peerName != null ? row.peerName : '', + peerTitle: row.peerTitle, + peerCompany: row.peerCompany, + peerSlug: row.peerSlug, + source: row.source, + }; +} + +export function createHallState(): HallState { + return { + tab: 'contacts', + list: [], + page: 1, + size: 20, + total: 0, + keyWord: '', + exchangeCode: '', + loading: false, + empty: false, + errorMessage: '', + }; +} + +function readErrorMessage(err: unknown): string { + if (err instanceof Error && err.message !== '') { + return err.message; + } + return resolveHallText('error'); +} + +export function buildHallPortalUrl(item: HallContactItem): string { + if (item.peerSlug != null && item.peerSlug !== '') { + return `/pages/portal/index?slug=${item.peerSlug}`; + } + return `/pages/portal/index?id=${item.peerCardId}`; +} + +export function openHallPortal(item: HallContactItem): void { + uni.navigateTo({ + url: buildHallPortalUrl(item), + }); +} + +export async function refreshHall( + state: HallState, + api?: LoadHallApi +): Promise { + if (state.loading) { + return; + } + state.loading = true; + state.errorMessage = ''; + const fetchPage = + state.tab === 'team' + ? api != null && api.fetchTeamWallPage != null + ? api.fetchTeamWallPage + : fetchTeamWallPage + : api != null + ? api.fetchHallContactPage + : fetchHallContactPage; + try { + const query: OwnerPageQuery = { + page: state.page, + size: state.size, + }; + const word = state.keyWord.trim(); + if (word !== '') { + query.keyWord = word; + } + const data = await fetchPage(query); + const raw = data.list != null ? data.list : []; + const list: HallContactItem[] = []; + for (let i = 0; i < raw.length; i++) { + list.push(toHallItem(raw[i])); + } + state.list = list; + state.total = + data.pagination != null ? data.pagination.total : list.length; + state.empty = list.length === 0; + } catch (err) { + state.list = []; + state.empty = false; + state.errorMessage = readErrorMessage(err); + } + state.loading = false; +} + +export async function submitHallExchange( + state: HallState, + api?: LoadHallApi +): Promise { + const code = state.exchangeCode.trim(); + if (!/^\d{6}$/.test(code)) { + state.errorMessage = resolveHallText('exchangePlaceholder'); + return false; + } + const confirm = + api != null && api.confirmHallExchange != null + ? api.confirmHallExchange + : confirmHallExchange; + try { + await confirm(code); + state.exchangeCode = ''; + await refreshHall(state, api); + return true; + } catch (err) { + state.errorMessage = readErrorMessage(err); + return false; + } +} + +export async function collectPeerCard( + peerCardId: string | number, + api?: LoadHallApi +): Promise { + const collect = + api != null && api.collectHallContact != null + ? api.collectHallContact + : collectHallContact; + await collect(peerCardId); + return true; +} + +export function applyHallTab(state: HallState, tab: HallTab): void { + state.tab = tab === 'team' ? 'team' : 'contacts'; + state.page = 1; + state.errorMessage = ''; +} + +export const PENDING_COLLECT_KEY = 'omni_pending_collect_card'; + +export function setPendingCollectCard(cardId: string | number): void { + try { + uni.setStorageSync(PENDING_COLLECT_KEY, String(cardId)); + } catch (_e) {} +} + +export function consumePendingCollectCard(): string { + try { + const raw = uni.getStorageSync(PENDING_COLLECT_KEY); + uni.removeStorageSync(PENDING_COLLECT_KEY); + if (raw == null) { + return ''; + } + return String(raw).trim(); + } catch (_e) { + return ''; + } +} diff --git a/mpuniapp/pages/owner/leads.uvue b/mpuniapp/pages/owner/leads.uvue index 07db67a..4d1f74f 100644 --- a/mpuniapp/pages/owner/leads.uvue +++ b/mpuniapp/pages/owner/leads.uvue @@ -3,6 +3,12 @@ {{ pageTitle }} {{ followUpLabel }} + + {{ radarLineOne }} + {{ radarLineTwo }} + {{ radarLineThree }} + {{ radarMoreLabel }} + {{ briefingLabel }} = { }; const state = reactive(createLeadsState()); -const pageTitle = ref(getOmniText(getCurrentLocale(), 'crm.leads')); +const pageTitle = ref(resolveLeadsText('title')); const followUpLabel = ref(getOmniText(getCurrentLocale(), 'crm.follow_up')); const searchPlaceholder = ref(resolveLeadsText('searchPlaceholder')); const scoreLabel = ref(resolveLeadsText('score')); const briefingLabel = ref(resolveOverviewText('title')); +const radarMoreLabel = ref(resolveLeadsText('radarMore')); +const radarLineOne = computed((): string => { + if (state.radarTracks.length < 1) { + return ''; + } + return formatRadarLine(state.radarTracks[0]); +}); +const radarLineTwo = computed((): string => { + if (state.radarTracks.length < 2) { + return ''; + } + return formatRadarLine(state.radarTracks[1]); +}); +const radarLineThree = computed((): string => { + if (state.radarTracks.length < 3) { + return ''; + } + return formatRadarLine(state.radarTracks[2]); +}); const ctaLabel = computed((): string => { if (state.loading) { @@ -170,6 +197,10 @@ function handleOpenLead(item: LeadEntity): void { }); } +function openRadar(): void { + openRadarPage(); +} + function openTeamOverview(): void { uni.navigateTo({ url: '/pages/owner/team/overview', @@ -219,6 +250,22 @@ onLoad((options: LeadsPageOptions) => { margin-bottom: var(--oc-space-8, 8px); } +.radar-preview { + margin-bottom: var(--oc-space-12, 12px); + padding: var(--oc-space-12, 12px); + background-color: var(--oc-surface, #F7F8FA); + border: 1px solid var(--oc-border, #E3E7ED); + border-radius: var(--oc-radius-card, 16px); +} + +.radar-preview-text { + display: block; + font-size: 13px; + color: var(--oc-text-2, #667085); + line-height: 1.6; + margin-bottom: 4px; +} + .overview-entry { min-height: 44px; font-size: 14px; diff --git a/mpuniapp/pages/owner/profile/index.uvue b/mpuniapp/pages/owner/profile/index.uvue index dce74de..cd2d42c 100644 --- a/mpuniapp/pages/owner/profile/index.uvue +++ b/mpuniapp/pages/owner/profile/index.uvue @@ -44,6 +44,36 @@ + + {{ t('workspaceSection') }} + + {{ t('nfcScan') }} + + + + {{ t('nfcMode') }} + + + + {{ t('nfcSecurity') }} + + + + {{ t('teamBriefing') }} + + + + + {{ t('quotaSection') }} + + + {{ t('quotaCards') }} + {{ quotaLine }} + + + {{ t('quotaUpgrade') }} + + {{ t('notificationsSection') }} @@ -139,6 +169,8 @@ import { removeAccountAvatar, } from './useProfile.uts'; import { OmniLocale } from '../../../common/locale.uts'; +import { fetchCardQuota } from '../../../common/api.uts'; +import { getTenantId } from '../../../common/request.uts'; type LangOption = { code: OmniLocale; @@ -146,6 +178,8 @@ type LangOption = { }; const state = reactive(loadProfileSettings()); +const quotaLine = ref('--'); +const quotaExceeded = ref(false); function onAvatarClick(): void { if (state.account.avatar !== '') { @@ -197,6 +231,24 @@ function onSelectLocale(code: OmniLocale): void { setPreferredLocale(state, code); } +function openPage(url: string): void { + uni.navigateTo({ + url, + }); +} + +async function loadQuota(): Promise { + try { + const tenantId = getTenantId(); + const quota = await fetchCardQuota(tenantId !== '' ? tenantId : 1); + quotaLine.value = `${quota.used} / ${quota.limit}`; + quotaExceeded.value = quota.exceeded === true; + } catch (_e) { + quotaLine.value = '--'; + quotaExceeded.value = false; + } +} + function onSaveSettings(): void { state.saving = true; const ok = saveProfileSettings(state); @@ -209,11 +261,12 @@ function onSaveSettings(): void { } } -onMounted(() => { +onShow(() => { const loaded = loadProfileSettings(); state.account = loaded.account; state.notifications = loaded.notifications; state.locale = loaded.locale; + loadQuota(); }); diff --git a/mpuniapp/pages/owner/profile/useProfile.uts b/mpuniapp/pages/owner/profile/useProfile.uts index 66e84fe..605daac 100644 --- a/mpuniapp/pages/owner/profile/useProfile.uts +++ b/mpuniapp/pages/owner/profile/useProfile.uts @@ -384,6 +384,22 @@ export function resolveProfileText(key: string): string { return isZh ? '偏好设置' : 'Preferences'; case 'languageLabel': return isZh ? '界面语言' : 'Display Language'; + case 'workspaceSection': + return isZh ? '工作台' : 'Workspace'; + case 'nfcScan': + return isZh ? 'NFC 贴卡激活' : 'Activate NFC card'; + case 'nfcMode': + return isZh ? 'NFC 场景切换' : 'NFC scene mode'; + case 'nfcSecurity': + return isZh ? 'NFC 挂失' : 'Freeze NFC card'; + case 'teamBriefing': + return isZh ? '展会战报' : 'Team briefing'; + case 'quotaSection': + return isZh ? '套餐配额' : 'Plan quota'; + case 'quotaCards': + return isZh ? '名片用量' : 'Card usage'; + case 'quotaUpgrade': + return isZh ? '已达上限,请升级套餐' : 'Limit reached. Upgrade to continue.'; default: return key; } diff --git a/mpuniapp/pages/owner/useLeads.uts b/mpuniapp/pages/owner/useLeads.uts index 604fdb1..1f9a26d 100644 --- a/mpuniapp/pages/owner/useLeads.uts +++ b/mpuniapp/pages/owner/useLeads.uts @@ -8,9 +8,11 @@ import { LeadStatus, OwnerPageData, OwnerPageQuery, + RadarTrack, } from '../../common/types.uts'; -import { fetchOwnerLeadPage } from '../../common/api.uts'; +import { fetchOwnerLeadPage, fetchOwnerRadarPage } from '../../common/api.uts'; import { getCurrentLocale, getOmniText } from '../../common/locale.uts'; +import { formatLocation, formatStay } from './useRadar.uts'; export type LeadsCopyKey = | 'title' @@ -26,7 +28,8 @@ export type LeadsCopyKey = | 'empty' | 'error' | 'loading' - | 'score'; + | 'score' + | 'radarMore'; export type LoadLeadsQuery = { page: number; @@ -54,6 +57,7 @@ export type LoadLeadsResult = { export type LeadsState = { list: LeadEntity[]; + radarTracks: RadarTrack[]; page: number; size: number; total: number; @@ -147,6 +151,9 @@ export function resolveLeadsText(key: LeadsCopyKey): string { if (key === 'score') { return zh ? '意向分' : 'Intent'; } + if (key === 'radarMore') { + return zh ? '查看全部雷达' : 'Full radar'; + } return ''; } @@ -236,6 +243,7 @@ export async function loadLeads( export function createLeadsState(): LeadsState { return { list: [], + radarTracks: [], page: 1, size: 20, total: 0, @@ -304,10 +312,31 @@ export async function refreshLeads( api ); applyLoadResult(state, result); + try { + const radar = await fetchOwnerRadarPage({ page: 1, size: 3 }); + state.radarTracks = radar.list != null ? radar.list : []; + } catch (_err) { + state.radarTracks = []; + } state.loading = false; return result; } +export function formatRadarLine(track: RadarTrack): string { + const place = formatLocation(track.country, track.city); + const stay = formatStay(track.stayDurationMs); + if (place !== '') { + return `${place} · ${stay}`; + } + return stay; +} + +export function openRadarPage(): void { + uni.navigateTo({ + url: '/pages/owner/radar', + }); +} + export function buildLeadDetailUrl(id: string | number): string { return `/pages/owner/leads-detail?id=${id}`; } diff --git a/mpuniapp/pages/portal/index.uvue b/mpuniapp/pages/portal/index.uvue index e61e847..c9c02a6 100644 --- a/mpuniapp/pages/portal/index.uvue +++ b/mpuniapp/pages/portal/index.uvue @@ -5,6 +5,7 @@ {{ textOf('card.exchange') }} + {{ collectLabel }} @@ -185,6 +186,9 @@ import { PortalQuickAction, } from './usePortal.uts'; import { saveToContacts } from '../../common/vcard-export.uts'; +import { collectHallContact } from '../../common/api.uts'; +import { getAuthToken } from '../../common/request.uts'; +import { setPendingCollectCard } from '../owner/hall/useHall.uts'; import { OmniLocale, OmniMessageKey, @@ -222,6 +226,10 @@ const defaultAvatar = 'https://cdn.omnicard.ai/assets/default-avatar.png'; const state = reactive(createPortalState()); const currentCardId = ref(''); const currentLang = ref(detectLocale()); +const canCollect = ref(true); +const collectLabel = computed((): string => { + return currentLang.value === 'zh-CN' ? '收入大厅' : 'Save to hall'; +}); const cardAudioUrl = computed((): string => { if (state.card == null) { @@ -309,6 +317,26 @@ function handleCompanyClick(): void { }); } +async function handleCollect(): Promise { + if (state.card == null || state.card!.id == null) { + return; + } + if (getAuthToken() === '') { + setPendingCollectCard(state.card!.id); + uni.navigateTo({ + url: '/pages/common/login', + }); + return; + } + try { + await collectHallContact(state.card!.id); + uni.showToast({ + title: currentLang.value === 'zh-CN' ? '已收入大厅' : 'Saved to hall', + icon: 'none', + }); + } catch (_err) {} +} + function openExchange(): void { if (!state.card) return; const cardId = state.card!.id != null ? String(state.card!.id) : currentCardId.value; diff --git a/mpuniapp/privacy.md b/mpuniapp/privacy.md deleted file mode 100644 index 3058a0f..0000000 --- a/mpuniapp/privacy.md +++ /dev/null @@ -1,229 +0,0 @@ -隐私政策 - -最近更新日期:2025年04月09日 - -本政策仅适用于数字天堂(北京)网络技术有限公司的DCloud开发者中心系统应用产品或服务。 - -本政策将帮助您了解以下内容: - -1. 我们如何收集和使用您的用户信息 -2. 我们如何使用 Cookie 和同类技术 -3. 我们如何共享、转让、公开披露您的用户信息 -4. 我们如何保护您的用户信息 -5. 您的权利 -6. 我们如何处理儿童的个人信息 -7. 您的用户信息如何储存及如何在全球范围转移 -8. 本政策如何更新 -9. 如何联系我们 - -我们深知用户信息对您的重要性,并会尽全力保护您的用户信息安全可靠。我们致力于维持您对我们的信任,恪守以下原则,保护您的用户信息:权责一致原则、目的明确原则、选择同意原则、最少够用原则、确保安全原则、主体参与原则、公开透明原则等。同时,我们承诺,我们将按业界成熟的安全标准,采取相应的安全保护措施来保护您的用户信息。 - -请在使用我们的产品(或服务)前,仔细阅读并了解本隐私政策。 - -一、我们如何收集和使用您的用户信息 - -我们的产品基于DCloud uni-app x开发,应用运行期间需要收集您的设备唯一识别码(ODID/OAID)以提供统计分析服务,并通过应用启动数据及异常错误日志分析改进性能和用户体验,为用户提供更好的服务。详情内容请访问《DCloud用户服务条款》。 - -(一)**我们可能会申请以下权限,仅用于演示 uni-app x 框架的功能** - -- **网络** -- **位置** -- **存储** -- **相册** -- **摄像头** -- **麦克风** -- **蓝牙** -- **联系人** -- **日历** -- **隐私窗口** -- **读取剪贴板** -- **生物特征识别能力** - -(二)**征得授权同意的例外** - -请您理解,根据法律法规及相关国家标准,以下情形中,我们收集和使用您的用户信息无需征得您的授权同意: - -1. **与国家安全、国防安全直接相关的;** -2. **与公共安全、公共卫生、重大公共利益直接相关的;** -3. **与犯罪侦查、起诉、审判和判决执行等直接相关的;** -4. **出于维护您或其他个人的生命、财产等重大合法权益但又很难得到本人同意的;** -5. **所收集的您的用户信息是您自行向社会公众公开的;** -6. **从合法公开披露的信息中收集的您的用户信息,如合法的新闻报道、政府信息公开等渠道;** -7. **根据您的要求签订或履行合同所必需的;** -8. **用于维护软件及相关服务的安全稳定运行所必需的,例如发现、处置软件及相关服务的故障;** -9. **个人信息控制者为新闻单位且其在开展合法的新闻报道所必需的;** -10. **学术研究机构基于公共利益开展统计或学术研究所必要,且对外提供学术研究或描述的结果时,对结果中所包含的个人信息进行去标识化处理的。** -11. **法律法规规定的其他情形。** - -二、我们如何使用 Cookie 和同类技术 - -(一)Cookie - -为确保网站正常运转,我们会在您的计算机或移动设备上存储名为 Cookie 的小数据文件。Cookie 通常包含标识符、站点名称以及一些号码和字符。借助于 Cookie,网站能够存储您的访问偏好数据。 - -我们不会将 Cookie 用于本政策所述目的之外的任何用途。您可根据自己的偏好管理或删除 Cookie。您可以清除计算机上保存的所有 Cookie,大部分网络浏览器都设有阻止Cookie 的功能。但如果您这么做,则需要在每一次访问我们的网站时亲自更改用户设置。 - -(二)网站信标和像素标签 - -除 Cookie 外,我们还会在网站上使用网站信标和像素标签等其他同类技术。例如,我们向您发送的电子邮件可能含有链接至我们网站内容的点击URL。 - -如果您点击该链接,我们则会跟踪此次点击,帮助我们了解您的产品或服务偏好并改善客户服务。网站信标通常是一种嵌入到网站或电子邮件中的透明图像。借助于电子邮件中的像素标签,我们能够获知电子邮件是否被打开。如果您不希望自己的活动以这种方式被追踪,则可以随时从我们的寄信名单中退订。 - -(三)Do Not Track(请勿追踪) - -很多网络浏览器均设有Do Not Track功能,该功能可向网站发布Do Not Track请求。目前,主要互联网标准组织尚未设立相关政策来规定网站应如何应对此类请求。但如果您的浏览器启用了 Do Not Track,那么我们的所有网站都会尊重您的选择。 - -三、我们如何共享、转让、公开披露您的用户信息 - -(一)共享 - -我们不会与其他的任何公司、组织和个人分享您的用户信息,但以下情况除外: - -1. 在获取明确同意的情况下共享:获得您的明确同意后,我们会与其他方共享您的用户信息。 -2. 我们可能会根据法律法规规定,或按政府主管部门的强制性要求,对外共享您的用户信息。 -3. 与我们的关联公司共享:您的用户信息可能会与我们的关联公司共享。我们只会共享必要的用户信息,且受本隐私政策中所声明目的的约束。关联公司如要改变用户信息的处理目的,将再次征求您的授权同意。 -4. 与授权合作伙伴共享:仅为实现本政策中声明的目的,我们的某些服务将由授权合作伙伴提供。我们可能会与合作伙伴共享您的某些用户信息,以提供更好的客户服务和用户体验。我们仅会出于合法、正当、必要、特定、明确的目的共享您的用户信息,并且只会共享提供服务所必要的用户信息。为了更好运营和改善技术和服务,您同意我们和授权合作伙伴在符合相关法律法规的前提下可将收集的信息用于其他服务和用途。 - -(二)转让 - -我们不会将您的用户信息转让给任何公司、组织和个人,但以下情况除外: - -1. 在获取明确同意的情况下转让:获得您的明确同意后,我们会向其他方转让您的用户信息; -2. 在涉及合并、收购或破产清算时,如涉及到用户信息转让,我们会再要求新的持有您用户信息的公司、组织继续受此隐私政策的约束,否则我们将要求该公司、组织重新向您征求授权同意。 - -(三)公开披露 - -我们仅会在以下情况下,公开披露您的用户信息: - -1. 获得您明确同意后; -2. 基于法律的披露:在法律、法律程序、诉讼或政府主管部门强制性要求的情况下,我们可能会公开披露您的用户信息。 - -(四)共享、转让、公开披露信息时事先征得授权同意的例外 - -请您理解,根据法律法规及相关国家标准,以下情形中,我们共享、转让、公开披露您的用户信息无需征得您的授权同意: - -1. 与国家安全、国防安全直接相关的; -2. 与公共安全、公共卫生、重大公共利益直接相关的; -3. 与犯罪侦查、起诉、审判和判决执行等直接相关的; -4. 出于维护您或其他个人的生命、财产等重大合法权益但又很难得到本人同意的; -5. 您自行向社会公众公开的信息; -6. 从合法公开披露的信息中收集的,如合法的新闻报道、政府信息公开等渠道。 - -四、我们如何保护您的用户信息 - -1. 我们已使用符合业界标准的安全防护措施保护您提供的用户信息,防止数据遭到未经授权的访问、公开披露、使用、修改、损坏或丢失。我们会采取一切合理可行的措施,保护您的用户信息。例如,在您的浏览器与“服务”之间交换数据时受 SSL 加密保护;我们同时对网站提供https安全浏览方式;我们会使用加密技术确保数据的保密性;我们会使用受信赖的保护机制防止数据遭到恶意攻击;我们会部署访问控制机制,确保只有授权人员才可访问用户信息;以及我们会举办安全和隐私保护培训课程,加强员工对于保护用户信息重要性的认识。 -2. 目前,我们的重要信息系统已通过信息安全等级保护(三级)测评和备案。 -3. 我们已建立专门的管理系统、流程和组织,确保信息安全。例如,我们严格限制有信息访问权限的人员,要求这些人员遵循其保密义务,并对此进行审查。 -4. 我们会采取一切合理可行的措施,确保未收集无关的用户信息。我们只会在达成本政策所述目的所需的期限内保留您的用户信息,除非需要延长保留期或受到法律的允许。 -5. 互联网并非绝对安全的环境,而且电子邮件、即时通讯、及与其他用户的交流方式并未加密,我们强烈建议您不要通过此类方式发送用户信息。 -6. 我们将定期更新并公开安全风险、用户信息安全影响评估等报告的有关内容。您可通过以下方式获得: -7. 互联网环境并非百分之百安全,我们将尽力确保您发送给我们的任何信息的安全性。即使我们做出了很大努力,采取了一切合理且必要的措施,仍然有可能无法杜绝您的用户信息被非法访问、被非法盗取,被非法篡改或毁坏,导致您的合法权益受损,请您理解信息网络的上述风险并自愿承担。 -8. 在不幸发生用户信息安全事件后,我们将按照法律法规的要求,及时向您告知:安全事件的基本情况和可能的影响、我们已采取或将要采取的处置措施、您可自主防范和降低风险的建议、对您的补救措施等。我们将及时将事件相关情况以邮件、信函、电话、推送通知等方式告知您,难以逐一告知用户信息主体时,我们会采取合理、有效的方式发布公告。同时,我们还将按照监管部门要求,主动上报用户信息安全事件的处置情况。 - -五、您的权利 - -按照中国相关的法律、法规、标准,以及其他国家、地区的通行做法,我们保障您对自己的用户信息行使以下权利: - -(一)访问您的用户信息 - -您有权访问您的用户信息,法律法规规定的例外情况除外。如果您想行使数据访问权,可以通过以下方式自行访问:https://ask.dcloud.net.cn/ - -如果您无法通过上述链接访问这些用户信息,您可以随时使用我们的 Web 表单联系,或发送电子邮件至service@dcloud.io。我们将在30天内回复您的访问请求。 - -对于您在使用我们的产品或服务过程中产生的其他用户信息,只要我们不需要过多投入,我们会向您提供。如果您想行使数据访问权,请发送电子邮件至service@dcloud.io。 - -(二)更正您的用户信息 - -当您发现我们处理的关于您的用户信息有错误时,您有权要求我们作出更正。您可以通过“(一)访问您的用户信息”中罗列的方式提出更正申请。 如果您无法通过上述链接更正这些用户信息,您可以随时使用我们的 Web 表单联系,或发送电子邮件至service@dcloud.io。我们将在30天内回复您的更正请求。 - -(三)删除您的用户信息 - -在以下情形中,您可以向我们提出删除用户信息的请求: - -1. 如果我们处理用户信息的行为违反法律法规; -2. 如果我们收集、使用您的用户信息,却未征得您的同意; -3. 如果我们处理用户信息的行为违反了与您的约定; -4. 如果您不再使用我们的产品或服务,或您注销了账号; -5. 如果我们不再为您提供产品或服务。 - -我们将会根据您的删除请求进行评估,若满足相应规定,我们将会采取相应步骤进行处理。当您向我们提出删除请求时,我们可能会要求您进行身份验证,以保障账户的安全。当您从我们的服务中删除信息后,因为适用的法律和安全技术,我们可能不会立即从备份系统中删除相应的信息,我们将安全存储您的信息直到备份可以清除或实现匿名化。 - -(四)改变您授权同意的范围 - -每个业务功能需要一些基本的用户信息才能得以完成(见本政策“第一部分”)。对于用户信息的收集和使用,您可以随时给予或收回您的授权同意。您可以通过以下方式自行操作:https://ask.dcloud.net.cn/ - -当您收回同意后,我们将不再处理相应的用户信息。同时也请您注意,您撤销授权同意可能会导致某些后果,例如我们可能无法继续为您提供相应的服务或特定的功能,但您收回同意的决定,不会影响此前基于您的授权而开展的用户信息处理。 - -(五)用户信息主体注销账户 - -您随时可注销此前注册的账户,您可以通过以下方式自行操作:https://ask.dcloud.net.cn/ - -在注销账户之后,我们将停止为您提供产品或服务并依据您的要求,删除或匿名化您的信息,法律法规另有规定的除外。这也将可能导致您失去对您账户中数据的访问权,请您谨慎操作。 - -(六)用户信息主体获取用户信息副本 - -您有权获取您的用户信息副本,您可以通过以下方式自行操作:https://ask.dcloud.net.cn/ - -在技术可行的前提下,例如数据接口匹配,我们还可按您的要求,直接将您的用户信息副本传输给您指定的第三方。 - -(七)约束信息系统自动决策 - -在某些业务功能中,我们可能仅依据信息系统、算法等在内的非人工自动决策机制作出决定。如果这些决定显著影响您的合法权益,您有权要求我们作出解释,我们也将提供适当的救济方式。 - -(八)响应您的上述请求 - -为保障安全,您可能需要提供书面请求,或以其他方式证明您的身份。我们可能会先要求您验证自己的身份,然后再处理您的请求。 - -我们将在三十天内作出答复。如您不满意,还可以通过以下途径投诉:service@dcloud.io - -对于您合理的请求,我们原则上不收取费用,但对多次重复、超出合理限度的请求,我们将视情况收取一定成本费用。对于那些无端重复、需要过多技术手段(例如,需要开发新系统或从根本上改变现行惯例)、给他人合法权益带来风险或者非常不切实际的请求,我们可能会予以拒绝。也请您理解,出于安全保障的考虑、相关法律法规的要求或技术上的限制,对于您的某些请求我们可能无法做出响应,例如以下情形: - -1. 与用户信息控制者履行法律法规规定的义务相关的; -2. 与国家安全、国防安全直接相关的; -3. 与公共安全、公共卫生、重大公共利益直接相关的; -4. 与犯罪侦查、起诉、审判和执行判决等直接相关的; -5. 用户信息控制者有充分证据表明用户信息主体存在主观恶意或滥用权利的; -6. 出于维护用户信息主体或其他个人的生命、财产等重大合法权益但又很难得到本人同意的; -7. 响应用户信息主体的请求将导致用户信息主体或其他个人、组织的合法权益受到严重损害的; -8. 涉及商业秘密的。 - -六、我们如何处理儿童的个人信息 - -我们非常重视儿童个人信息的保护,我们的产品、网站和服务主要面向成人。如果没有父母或监护人的同意,儿童不应创建自己的用户账户。尽管当地法律和习俗对儿童的定义不同,但我们将不满 14 周岁的任何人均视为儿童。 - -对于经父母或监护人同意而收集儿童用户信息的情况,我们只会在受到法律允许、父母或监护人明确同意或者保护儿童所必要的情况下储存、使用或公开披露此信息,否则我们会设法尽快删除相关数据。 - -鉴于现有技术和业务模式的限制,我们很难主动识别儿童的个人信息,如果您发现我们在不知情的情况下或在未事先获得可证实的监护人同意的情况下收集了儿童的个人信息,您可以及时联系我们,我们将在发现后设法及时删除,如果我们自己发现前述情形的,我们也会及时删除,法律要求我们保留的除外。 - -七、您的用户信息如何储存以及如何在全球范围转移 - -原则上,我们在中华人民共和国境内收集和产生的用户信息,将存储在中华人民共和国境内。我们只会在本政策所述目的和用途所需的期限内和法律法规规定的最短期限内保留您的用户信息,超出上述保留期间后,我们会根据适用法律法规的要求删除您的用户信息或匿名化处理。法律法规另有规定,或出于公共利益、科学历史研究等的目的,或您的另行授权同意的除外,我们可能需要较长时间保留相关数据。 - -由于我们通过遍布全球的资源和服务器提供产品或服务,这意味着,在获得您的授权同意后,您的用户信息可能会被转移到您使用产品或服务所在国家/地区的境外管辖区,或者受到来自这些管辖区的访问。 - -此类管辖区可能设有不同的数据保护法,甚至未设立相关法律。在此类情况下,我们会确保您的用户信息得到在中华人民共和国境内足够同等的保护。例如,我们会请求您对跨境转移用户信息的同意,或者在跨境数据转移之前实施数据去标识化等安全举措。 - -八、本政策如何更新 - -我们的隐私政策可能变更。未经您明确同意,我们不会削减您按照本隐私政策所应享有的权利。我们会在本页面上发布对本政策所做的任何变更。 - -对于重大变更,我们还会提供更为显著的通知。本政策所指的重大变更包括但不限于: - -1. 我们的服务模式发生重大变化。如处理用户信息的目的、处理的用户信息类型、用户信息的使用方式等; -2. 我们在所有权结构、组织架构等方面发生重大变化。如业务调整、破产并购等引起的所有者变更等; -3. 用户信息共享、转让或公开披露的主要对象发生变化; -4. 您参与用户信息处理方面的权利及其行使方式发生重大变化; -5. 我们负责处理用户信息安全的责任部门、联络方式及投诉渠道发生变化时; -6. 用户信息安全影响评估报告表明存在高风险时。 - -我们还会将本政策的旧版本存档,供您查阅。 - -九、如何联系我们 - -如果您对本隐私政策有任何疑问、意见或建议,通过以下方式与我们联系: - -电子邮件:service@dcloud.io - -一般情况下,我们将在三十天内回复。 - -如果您对我们的回复不满意,特别是我们的用户信息处理行为损害了您的合法权益,您还可以通过以下外部途径寻求解决方案:service@dcloud.io diff --git a/mpuniapp/readme.md b/mpuniapp/readme.md deleted file mode 100644 index c4ce406..0000000 --- a/mpuniapp/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -hello uni-app x 是 uni-app x 项目的演示工程。 - -uni-app x [开发文档](https://doc.dcloud.net.cn/uni-app-x/) - -页面以.uvue为扩展名,.test.js为该页面的自动化测试脚本。 diff --git a/mpuniapp/store/index.uts b/mpuniapp/store/index.uts deleted file mode 100644 index e0f0945..0000000 --- a/mpuniapp/store/index.uts +++ /dev/null @@ -1,224 +0,0 @@ -export type SafeArea = { - top : number, - right : number, - bottom : number, - left : number, - width : number, - height : number, -} - -export const AGREE_PRIVACY = 'UNI-PRIVACY-AGREE' - -export type UserInfo = { - nickName: string, - avatarUrl?: string -} - -export type GlobalData = { - str: string - num: number - bool: boolean - obj: UTSJSONObject - null: string | null - arr: number[] - set: Set - map: Map - fun: () => string - launchOptions: OnLaunchOptions - showOptions: OnShowOptions -} - -type State = { - // app global data 兼容 dom2 - globalData: GlobalData - lifeCycleNum: number - // 状态栏高度 - statusBarHeight: number - safeArea : SafeArea - // 设备像素比 - devicePixelRatio : number - // 事件判断回调 - eventCallbackNum: number - // 是否匹配左侧窗口 - noMatchLeftWindow:boolean - // 当前激活的tab页 - active: string - leftWinActive:string - // 是否同意隐私政策 - agreeToPrivacy: boolean | null - // 是否同意截屏 - allowCapture: boolean, - // 是否暗黑主题(适配web端) - isDarkMode: boolean - // 是否无网环境 - netless: boolean, - // 登录用户信息 - userInfo: UserInfo | null -} - -const getAgreePrivacy = () => { - const data = uni.getStorageSync(AGREE_PRIVACY) - if (typeof data === 'boolean') { - return data - } - if (data == null) { - return null - } - return null -} - -export const state = reactive({ - globalData: { - str: 'default globalData str', - num: 0, - bool: false, - obj: { - str: 'default globalData obj str', - num: 0, - bool: false, - } as UTSJSONObject, - null: null as string | null, - arr: [] as number[], - set: new Set(), - map: new Map(), - fun: (): string => { - return 'globalData fun' - }, - launchOptions: { - path: '', - } as OnLaunchOptions, - showOptions: { - path: '' - } as OnShowOptions - } as GlobalData, - lifeCycleNum: 0, - statusBarHeight: 0, - devicePixelRatio: 1, - eventCallbackNum: 0, - noMatchLeftWindow: true, - active: 'componentPage', - leftWinActive: '/pages/component/view/view', - safeArea: { - top: 0, - right: 0, - bottom: 0, - left: 0, - width: 0, - height: 0, - }, - agreeToPrivacy: getAgreePrivacy(), - allowCapture: true, - isDarkMode:false, - netless: false, - userInfo: null -} as State) - -export const setUserInfo = (userInfo : UserInfo | null) => { - state.userInfo = userInfo -} - -export const setLifeCycleNum = (num : number) => { - state.lifeCycleNum = num -} - -export const setEventCallbackNum = (num : number) => { - state.eventCallbackNum = num -} - -export const setStatusBarHeight = (height : number) => { - state.statusBarHeight = height -} - -export const setSafeArea = (value : SafeArea) => { - state.safeArea = value -} - -export const setDevicePixelRatio = (devicePixelRatio : number) => { - state.devicePixelRatio = devicePixelRatio -} - -export const setMatchLeftWindow = (matchLeftWindow:boolean) => { - state.noMatchLeftWindow = !matchLeftWindow -} - -export const setActive = (tabPage:string) => { - state.active = tabPage -} - -export const setLeftWinActive = (leftWinActive:string) => { - state.leftWinActive = leftWinActive -} - -export const setAgreeToPrivacy = (agree: boolean) => { - state.agreeToPrivacy = agree - uni.setStorageSync(AGREE_PRIVACY, agree); -} - -export const setAllowCapture = (allow: boolean) => { - state.allowCapture = allow -} - -// 检查系统主题 -export const checkSystemTheme = () => { - // #ifdef WEB || MP-WEIXIN - const info = uni.getAppBaseInfo(); - state.isDarkMode = info.hostTheme === 'dark'; - uni.onHostThemeChange((result) => { - state.isDarkMode = result.hostTheme === 'dark'; - }); - // #endif - // web和小程序只支持监听宿主的主题,不支持自行设置与宿主不同的主题。但App端支持自行设置主题,因此单独处理 - // #ifdef APP - uni.getSystemInfo({ - success: (res : GetSystemInfoResult) => { - const appTheme = res.appTheme == "auto" ? res.osTheme! : res.appTheme! - state.isDarkMode = appTheme == 'dark'; - } - }) - uni.onAppThemeChange((res : AppThemeChangeResult) => { - state.isDarkMode = res.appTheme == 'dark'; - }) - // #endif -} - -export const setNetless = (netless: boolean) => { - state.netless = netless -} - -export const updateGlobalData = (key: string, value: any) => { - switch (key) { - case 'str': - state.globalData.str = value as string - break - case 'num': - state.globalData.num = value as number - break - case 'bool': - state.globalData.bool = value as boolean - break - case 'obj': - state.globalData.obj = value as UTSJSONObject - break - case 'null': - state.globalData.null = value as string | null - break - case 'arr': - state.globalData.arr = value as number[] - break - case 'set': - state.globalData.set = value as Set - break - case 'map': - state.globalData.map = value as Map - break - case 'fun': - state.globalData.fun = value as () => string - break - case 'launchOptions': - state.globalData.launchOptions = value as OnLaunchOptions - break - case 'showOptions': - state.globalData.showOptions = value! as OnShowOptions - break - } -} diff --git a/mpuniapp/test-main-console.uts b/mpuniapp/test-main-console.uts deleted file mode 100644 index e13959a..0000000 --- a/mpuniapp/test-main-console.uts +++ /dev/null @@ -1,8 +0,0 @@ -// 仅测试 console.log 时机问题 -export class TestConsole { - constructor() { - console.log('test main.uts console.log'); - } -} - -export const ts = new TestConsole(); diff --git a/mpuniapp/testCaseToSnapshotFilePath.json b/mpuniapp/testCaseToSnapshotFilePath.json deleted file mode 100644 index 9e26dfe..0000000 --- a/mpuniapp/testCaseToSnapshotFilePath.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/mpuniapp/testSequencer.js b/mpuniapp/testSequencer.js deleted file mode 100644 index 2161f39..0000000 --- a/mpuniapp/testSequencer.js +++ /dev/null @@ -1,52 +0,0 @@ -const Sequencer = require("@jest/test-sequencer").default -const startTestFilePaths = [ - "pages/API/get-launch-options-sync/get-launch-options-sync.test.js", - "pages/API/get-current-pages/get-current-pages.test.js", - "pages/component/view/view.test.js", - "pages/API/pull-down-refresh/pull-down-refresh.test.js", - "pages/component/global-events/global-events.test.js", - "pages/component/list-view/list-view-refresh.test.js", - "pages/component/scroll-view/scroll-view-refresher.test.js", - "pages/component/global-events/touch-events.test.js", - "pages/component/global-events/touch-events-bubbles.test.js", - "pages/component/global-events/touch-events-case.test.js", - "pages/component/global-events/touch-events-preventDefault.test.js", - "pages/component/swiper/swiper2.test.js", - "pages/component/slider/slider-maxValue.test.js", - "pages/CSS/overflow/overflow-visible-event.test.js", - "pages/API/create-selector-query/create-selector-query-onScroll.test.js", - "pages/component/scroll-view/scroll-view-custom-refresher-props.test.js", - "pages/component/waterflow/waterflow.test.js", - "pages/component/text/text-props.test.js", - "pages/component/rich-text/rich-text-complex.test.js", - "pages/component/web-view/web-view/web-view-local.test.js" -] -const endTestFilePaths = [ - "pages/API/navigator/new-page/onLoad.test.js", - "pages/API/modal/modal.test.js", - "pages/API/storage/storage.test.js", - "pages/component/web-view/web-view.test.js" -] - -class CustomSequencer extends Sequencer { - sort(tests) { - const startTests = startTestFilePaths - .map((filePath) => { - return tests.find((test) => test.path.endsWith(filePath)) - }) - .filter(Boolean) - const endTests = endTestFilePaths - .map((filePath) => { - return tests.find((test) => test.path.endsWith(filePath)) - }) - .filter(Boolean) - - const middleTests = tests.filter((test) => - !startTests.includes(test) && !endTests.includes(test) - ); - - return [...startTests, ...middleTests, ...endTests] - } -} - -module.exports = CustomSequencer diff --git a/mpuniapp/tests/ui-ux-mobile-pages.test.ts b/mpuniapp/tests/ui-ux-mobile-pages.test.ts index c7b74f1..f504bed 100644 --- a/mpuniapp/tests/ui-ux-mobile-pages.test.ts +++ b/mpuniapp/tests/ui-ux-mobile-pages.test.ts @@ -5,7 +5,7 @@ import path from 'node:path'; const MP_ROOT = path.resolve('m:/2026项目/CRMmp/mpuniapp'); -// 17 个全量页面路由列表 +// 18 个全量页面路由列表 const ALL_PAGES = [ 'pages/portal/index.uvue', 'pages/portal/exchange.uvue', @@ -13,6 +13,7 @@ const ALL_PAGES = [ 'pages/portal/article-detail.uvue', 'pages/portal/ai-chat.uvue', 'pages/common/login.uvue', + 'pages/owner/hall/index.uvue', 'pages/owner/card/index.uvue', 'pages/owner/card/edit.uvue', 'pages/owner/card/qrcode.uvue', @@ -35,8 +36,8 @@ const ALL_COMPONENTS = [ // 4 个 TabBar 页面 const TABBAR_PAGES = [ + 'pages/owner/hall/index.uvue', 'pages/owner/card/index.uvue', - 'pages/owner/radar.uvue', 'pages/owner/leads.uvue', 'pages/owner/profile/index.uvue', ]; @@ -67,7 +68,7 @@ const BOTTOM_CTA_PAGES = [ 'pages/owner/team/overview.uvue', ]; -test('1. 全端 17 个页面与 3 个组件文件均存在', () => { +test('1. 全端页面与 3 个组件文件均存在', () => { for (const pagePath of ALL_PAGES) { const fullPath = path.join(MP_ROOT, pagePath); assert.ok(fs.existsSync(fullPath), `页面必须存在: ${pagePath}`); diff --git a/mpuniapp/theme.json b/mpuniapp/theme.json index b9b6e73..a726671 100644 --- a/mpuniapp/theme.json +++ b/mpuniapp/theme.json @@ -1,52 +1,24 @@ { "light": { - "navigationBarTextStyle": "white", - "navigationBarBackgroundColor": "#007AFF", - "backgroundColorContent": "#efeff4", - "tabBarPagebackgroundColorContent": "#f8f8f8", - "richTextPageBackgroundColorContent": "#ffffff", - "backgroundColor": "#efeff4", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#FFFFFF", + "backgroundColor": "#F7F8FA", + "backgroundColorContent": "#F7F8FA", "backgroundTextStyle": "dark", - - "tabBarColor": "#7A7E83", - "tabBarSelectedColor": "#007AFF", - "tabBarBorderStyle": "black", - "tabBarBackgroundColor": "#F8F8F8", - - "tabBarComponentIconPath": "static/component.png", - "tabBarComponentSelectedIconPath": "static/componentHL.png", - "tabBarAPIIconPath": "static/api.png", - "tabBarAPISelectedIconPath": "static/apiHL.png", - "tabBarCSSIconPath": "static/css.png", - "tabBarCSSSelectedIconPath": "static/cssHL.png", - "tabBarTemplateIconPath": "static/template.png", - "tabBarTemplateSelectedIconPath": "static/templateHL.png", - "tabBarUniUIIconPath": "static/extui.png", - "tabBarUniUISelectedIconPath": "static/extuiHL.png" + "tabBarColor": "#667085", + "tabBarSelectedColor": "#0B5CFF", + "tabBarBorderStyle": "white", + "tabBarBackgroundColor": "#FFFFFF" }, "dark": { "navigationBarTextStyle": "white", - "navigationBarBackgroundColor": "#1F1F1F", - "backgroundColor": "#1F1F1F", - "backgroundColorContent": "#646464", - "tabBarPagebackgroundColorContent": "#1a1a1a", - "richTextPageBackgroundColorContent": "#000000", + "navigationBarBackgroundColor": "#0B0D10", + "backgroundColor": "#0B0D10", + "backgroundColorContent": "#0B0D10", "backgroundTextStyle": "light", - - "tabBarColor": "#cacaca", - "tabBarSelectedColor": "#007AFF", + "tabBarColor": "#98A2B3", + "tabBarSelectedColor": "#4D8DFF", "tabBarBorderStyle": "white", - "tabBarBackgroundColor": "#1F1F1F", - - "tabBarComponentIconPath": "static/component.png", - "tabBarComponentSelectedIconPath": "static/componentHL.png", - "tabBarAPIIconPath": "static/api.png", - "tabBarAPISelectedIconPath": "static/apiHL.png", - "tabBarCSSIconPath": "static/css.png", - "tabBarCSSSelectedIconPath": "static/cssHL.png", - "tabBarTemplateIconPath": "static/template.png", - "tabBarTemplateSelectedIconPath": "static/templateHL.png", - "tabBarUniUIIconPath": "static/extui.png", - "tabBarUniUISelectedIconPath": "static/extuiHL.png" + "tabBarBackgroundColor": "#12151A" } } diff --git a/mpuniapp/todo.md b/mpuniapp/todo.md deleted file mode 100644 index 384224e..0000000 --- a/mpuniapp/todo.md +++ /dev/null @@ -1 +0,0 @@ -欢迎到需求墙投票:[https://vote.dcloud.net.cn/#/?name=uni-app%20x](https://vote.dcloud.net.cn/#/?name=uni-app%20x) diff --git a/mpuniapp/uni.scss b/mpuniapp/uni.scss index a05adb4..78d3cca 100644 --- a/mpuniapp/uni.scss +++ b/mpuniapp/uni.scss @@ -1,76 +1,17 @@ -/** - * 这里是uni-app内置的常用样式变量 - * - * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 - * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App - * - */ +$uni-color-primary: #0B5CFF; +$uni-color-success: #12B76A; +$uni-color-warning: #F79009; +$uni-color-error: #F04438; -/** - * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 - * - * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 - */ +$uni-text-color: #101828; +$uni-text-color-inverse: #FFFFFF; +$uni-text-color-grey: #667085; +$uni-text-color-placeholder: #98A2B3; +$uni-text-color-disable: #98A2B3; -/* 颜色变量 */ +$uni-bg-color: #FFFFFF; +$uni-bg-color-grey: #F7F8FA; +$uni-bg-color-hover: #F2F4F7; +$uni-bg-color-mask: rgba(16, 24, 40, 0.4); -/* 行为相关颜色 */ -$uni-color-primary: #007aff; -$uni-color-success: #4cd964; -$uni-color-warning: #f0ad4e; -$uni-color-error: #dd524d; - -/* 文字基本颜色 */ -$uni-text-color:#333;//基本色 -$uni-text-color-inverse:#fff;//反色 -$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 -$uni-text-color-placeholder: #808080; -$uni-text-color-disable:#c0c0c0; - -/* 背景颜色 */ -$uni-bg-color:#ffffff; -$uni-bg-color-grey:#f8f8f8; -$uni-bg-color-hover:#f1f1f1;//点击状态颜色 -$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 - -/* 边框颜色 */ -$uni-border-color:#c8c7cc; - -/* 尺寸变量 */ - -/* 文字尺寸 */ -$uni-font-size-sm:12px; -$uni-font-size-base:14px; -$uni-font-size-lg:16; - -/* 图片尺寸 */ -$uni-img-size-sm:20px; -$uni-img-size-base:26px; -$uni-img-size-lg:40px; - -/* Border Radius */ -$uni-border-radius-sm: 2px; -$uni-border-radius-base: 3px; -$uni-border-radius-lg: 6px; -$uni-border-radius-circle: 50%; - -/* 水平间距 */ -$uni-spacing-row-sm: 5px; -$uni-spacing-row-base: 10px; -$uni-spacing-row-lg: 15px; - -/* 垂直间距 */ -$uni-spacing-col-sm: 4px; -$uni-spacing-col-base: 8px; -$uni-spacing-col-lg: 12px; - -/* 透明度 */ -$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 - -/* 文章场景相关 */ -$uni-color-title: #2C405A; // 文章标题颜色 -$uni-font-size-title:20px; -$uni-color-subtitle: #555555; // 二级标题颜色 -$uni-font-size-subtitle:26px; -$uni-color-paragraph: #3F536E; // 文章段落颜色 -$uni-font-size-paragraph:15px; +$uni-border-color: #E3E7ED; diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/echo-cf/index.js b/mpuniapp/uniCloud-aliyun/cloudfunctions/echo-cf/index.js deleted file mode 100644 index a34f9b0..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/echo-cf/index.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; -exports.main = async (event, context) => { - //event为客户端上传的参数 - console.log('event : ', event) - - //返回数据给客户端 - return { - event, - context, - showMessage: 'Hello uniCloud function', - detail: { - functionName: 'echo-cf', - timestamp: Date.now() - } - } -}; diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/echo-cf/package.json b/mpuniapp/uniCloud-aliyun/cloudfunctions/echo-cf/package.json deleted file mode 100644 index 5701f97..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/echo-cf/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "echo-cf", - "dependencies": {}, - "extensions": {}, - "origin-plugin-dev-name": "hello-uniapp-x", - "origin-plugin-version": "1.0.44", - "plugin-dev-name": "hello-uniapp-x", - "plugin-version": "1.0.44" -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/encryption-object/index.obj.js b/mpuniapp/uniCloud-aliyun/cloudfunctions/encryption-object/index.obj.js deleted file mode 100644 index fa536da..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/encryption-object/index.obj.js +++ /dev/null @@ -1,22 +0,0 @@ -// 云对象教程: https://uniapp.dcloud.net.cn/uniCloud/cloud-obj -// jsdoc语法提示教程:https://ask.dcloud.net.cn/docs/#//ask.dcloud.net.cn/article/129 -module.exports = { - _before() { - const clientInfo = this.getClientInfo() - const secretType = clientInfo.secretType - const methodName = this.getMethodName() - const clientInfos = uniCloud.getClientInfos() - // methodName 是客户端调用的方法名 - // secretType 是客户端调用 uniCloud.importObject 传递的参数 secretMethods - if (methodName === 'secureTest' && secretType !== 'both') { - const error = new Error('客户端指定的secretType不为both,拒绝此次请求') - error.code = 'INVALID_SECRET_TYPE' - throw error // 拒绝本次请求 - } - }, - secureTest() { - return { - returnBy: "encryption-object.secureTest" - } - } -} diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/encryption-object/package.json b/mpuniapp/uniCloud-aliyun/cloudfunctions/encryption-object/package.json deleted file mode 100644 index 90b8dde..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/encryption-object/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "encryption-object", - "dependencies": {}, - "extensions": { - "uni-cloud-jql": {} - }, - "origin-plugin-dev-name": "hello-uniapp-x", - "origin-plugin-version": "1.0.44", - "plugin-dev-name": "hello-uniapp-x", - "plugin-version": "1.0.44" -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/encryption/index.js b/mpuniapp/uniCloud-aliyun/cloudfunctions/encryption/index.js deleted file mode 100644 index 9adbc5c..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/encryption/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; -exports.main = async (event, context) => { - const secretType = context.secretType - // secretType 是客户端调用 uniCloud.callFunction 传递的参数 secretType - if (secretType !== 'both') { - const error = new Error('客户端指定的secretType不为both,拒绝此次请求') - error.code = 'INVALID_SECRET_TYPE' - throw error // 拒绝本次请求 - } - return { - returnBy: 'encyption' - } -}; diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/encryption/package.json b/mpuniapp/uniCloud-aliyun/cloudfunctions/encryption/package.json deleted file mode 100644 index 9b71025..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/encryption/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "encryption", - "dependencies": {}, - "extensions": { - "uni-cloud-jql": {} - }, - "origin-plugin-dev-name": "hello-uniapp-x", - "origin-plugin-version": "1.0.44", - "plugin-dev-name": "hello-uniapp-x", - "plugin-version": "1.0.44" -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/facial-recognition-co/index.obj.js b/mpuniapp/uniCloud-aliyun/cloudfunctions/facial-recognition-co/index.obj.js deleted file mode 100644 index 8cd050f..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/facial-recognition-co/index.obj.js +++ /dev/null @@ -1,26 +0,0 @@ -// 注意本文件为实人认证API示例代码,如需在业务中使用需补充业务逻辑,比如用户需要登录才能使用实人认证、限制每个用户每天能实人认证的次数等 -module.exports = { - _before() { - this.frvManager = uniCloud.getFacialRecognitionVerifyManager({ - requestId: this.getUniCloudRequestId() - }) - }, - async getCertifyId({ - realName, - idCard, - metaInfo - } = {}) { - const result = await this.frvManager.getCertifyId({ - realName, - idCard, - metaInfo - }) - return result - }, - async getAuthResult(certifyId) { - const result = await this.frvManager.getAuthResult({ - certifyId - }) - return result - } -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/facial-recognition-co/package.json b/mpuniapp/uniCloud-aliyun/cloudfunctions/facial-recognition-co/package.json deleted file mode 100644 index 345aa7a..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/facial-recognition-co/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "facial-recognition-co", - "dependencies": {}, - "extensions": { - "uni-cloud-verify": {} - }, - "origin-plugin-dev-name": "hello-uniapp-x", - "origin-plugin-version": "1.0.44", - "plugin-dev-name": "hello-uniapp-x", - "plugin-version": "1.0.44" -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/sse/index.js b/mpuniapp/uniCloud-aliyun/cloudfunctions/sse/index.js deleted file mode 100644 index 7c084fc..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/sse/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -exports.main = async (event, context) => { - const sseChannelObj = event.sseChannel - const sseChannel = uniCloud.deserializeSSEChannel(sseChannelObj) - return new Promise(async (resolve, reject) => { - await sseChannel.write('message1') - await sseChannel.write('message2') - setTimeout(async () => { - await sseChannel.end() - resolve({ - errCode: 0 - }) - }, 300) - }) -}; diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/sse/package.json b/mpuniapp/uniCloud-aliyun/cloudfunctions/sse/package.json deleted file mode 100644 index b330ad8..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/sse/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "sse", - "dependencies": {}, - "extensions": { - "uni-cloud-jql": {}, - "uni-cloud-push": {} - }, - "origin-plugin-dev-name": "hello-uniapp-x", - "origin-plugin-version": "1.0.44", - "plugin-dev-name": "hello-uniapp-x", - "plugin-version": "1.0.44" -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/todo/index.obj.js b/mpuniapp/uniCloud-aliyun/cloudfunctions/todo/index.obj.js deleted file mode 100644 index 65bf500..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/todo/index.obj.js +++ /dev/null @@ -1,50 +0,0 @@ -// 云对象教程: https://uniapp.dcloud.net.cn/uniCloud/cloud-obj -// jsdoc语法提示教程:https://ask.dcloud.net.cn/docs/#//ask.dcloud.net.cn/article/129 -module.exports = { - async add(title, content) { - console.log(title, content) - return { - title, - content, - showMessage: `Todo added, title: ${title}, content: ${content}` - } - }, - async randomFail() { - const random = Math.random() - console.log(random); - if (random > 0.5) { - return { - errSubject: 'randomFail', - errCode: 'RANDOM_FAIL', - errMsg: '[预期内的报错]执行失败请重试' - } - } else { - return { - errCode: 0, - errMsg: '', - showMessage: '执行成功' - } - } - }, - async fail() { - return { - errSubject: 'fail', - errCode: 'TEST_ERROR_CODE', - errMsg: '[预期内的报错]执行失败', - tips: 'DO_NOT_TRY_AGAIN' - } - }, - async failWithNumberErrCode() { - return { - errCode: -1, - errMsg: '[预期内的报错]执行失败', - } - }, - async success() { - return { - errCode: 0, - errMsg: '', - showMessage: '执行成功' - } - } -} diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/todo/package.json b/mpuniapp/uniCloud-aliyun/cloudfunctions/todo/package.json deleted file mode 100644 index ff4f3ca..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/todo/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "todo", - "dependencies": {}, - "extensions": {}, - "origin-plugin-dev-name": "hello-uniapp-x", - "origin-plugin-version": "1.0.44", - "plugin-dev-name": "hello-uniapp-x", - "plugin-version": "1.0.44" -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-login-test-co/index.obj.js b/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-login-test-co/index.obj.js deleted file mode 100644 index b5c7923..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-login-test-co/index.obj.js +++ /dev/null @@ -1,87 +0,0 @@ -const configCenter = require("uni-config-center"); -const config = configCenter({ pluginId: 'uni-login-test-co' }).requireFile('config.js'); - -module.exports = { - _before: function() { - - }, - /** - * App微信登录并返回openid - * @param {string} code - * @param {string} appid - */ - - async loginByWeixin(data = {}) { - let { - code, - appid - } = data; - if (!code) { - return { errCode: -1, errMsg: 'code参数不能为空' } - } - if (!appid) { - return { errCode: -1, errMsg: 'appid参数不能为空' } - } - const secret = config.weixin[appid]; - if (!secret) { - return { errCode: -1, errMsg: `appid:${appid} 未找到对应的 secret 配置` } - } - - const url = `https://api.weixin.qq.com/sns/oauth2/access_token`; - const res = await uniCloud.httpclient.request(url, { - method: 'GET', - data: { - appid, - secret, - code, - grant_type: "authorization_code" - }, - contentType: 'json', - dataType: 'json' - }); - - /* const res = { - "data": { - "access_token": "101_tmi6EalA41uRzkP8DScXi7BxXjRuuL_aHB8VGrMb7Ng6s1rmzWVV8dKCUXYTjpZMumRLChp_sJ-vGlH5GNwyapOWG3aXvRnPvDxW9lc0A5w", - "expires_in": 7200, - "refresh_token": "101_IxOQj08nKiwA86hqVJ7fIlwXabLyNwmUyOWw_ycfKt4bbfo46rjsul7CNEH5_SWS-SRt54Cj-MTZJ3pe7Dh3pgi7pR7SzaJkRPw47H8y666", - "openid": "opjMn6YlpHJa1ZzVyAvMB5O7SabI", - "scope": "snsapi_userinfo", - "unionid": "oU5YytxRnXXHJlXKLQtIuJMcv9sc" - }, - "status": 200, - "headers": { "connection": "keep-alive", "content-type": "text/plain", "date": "Tue, 10 Mar 2026 08:42:51 GMT", "content-length": "385" } - } */ - - const wxRes = res.data; - if (wxRes.errcode) { - return { errCode: wxRes.errcode, errMsg: wxRes.errmsg } - } - - const { - access_token, - openid, - unionid - } = res.data; - - const userInfoRes = await uniCloud.httpclient.request(`https://api.weixin.qq.com/sns/userinfo?access_token=${access_token}&openid=${openid}$lang=zh-CN`, { - method: 'GET', - contentType: 'json', - dataType: 'json' - }); - - const { - nickname, - headimgurl, // 头像不一定可以拿到 - } = userInfoRes.data; - - return { - errCode: 0, - openid, - unionid, - nickname, - headimgurl - } - } - -} diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-login-test-co/package.json b/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-login-test-co/package.json deleted file mode 100644 index 3bb7018..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-login-test-co/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "uni-login-test-co", - "dependencies": { - "uni-config-center": "file:../../../uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - }, - "extensions": {}, - "origin-plugin-dev-name": "hello-uniapp-x", - "origin-plugin-version": "1.0.44", - "plugin-dev-name": "hello-uniapp-x", - "plugin-version": "1.0.44" -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-login-test-co/uni-login-test-co.param.js b/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-login-test-co/uni-login-test-co.param.js deleted file mode 100644 index 035ea48..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-login-test-co/uni-login-test-co.param.js +++ /dev/null @@ -1,4 +0,0 @@ -loginByWeixin({ - "code": "011rKyll2wnDjh4Ns3ml2yXW0e3rKylu", - "appid": "wxd569c7238830733b" -}) diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-push-co/index.obj.js b/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-push-co/index.obj.js deleted file mode 100644 index 92e63f4..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-push-co/index.obj.js +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = { - async sendPushMessage(cid) { - // 防止非法调用 - if (!cid) { - throw new Error('请传入推送客户端ID') - } - if (typeof cid !== 'string') { - throw new Error('推送客户端ID必须为字符串') - } - const pushManager = uniCloud.getPushManager({appId: '__UNI__HelloUniAppX'}) - const res = await pushManager.sendMessage({ - push_clientid: cid, - title: '测试推送标题', - content: '测试推送内容', - payload: { - data: '测试推送数据' - } - }) - return res - } -} diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-push-co/package.json b/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-push-co/package.json deleted file mode 100644 index 300e6ea..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/uni-push-co/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "uni-push-co", - "dependencies": {}, - "extensions": { - "uni-cloud-jql": {}, - "uni-cloud-push": {} - }, - "origin-plugin-dev-name": "hello-uniapp-x", - "origin-plugin-version": "1.0.44", - "plugin-dev-name": "hello-uniapp-x", - "plugin-version": "1.0.44" -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/univerify/index.js b/mpuniapp/uniCloud-aliyun/cloudfunctions/univerify/index.js deleted file mode 100644 index 9811692..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/univerify/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -exports.main = async function(event, context) { - const res = await uniCloud.getPhoneNumber({ - appid: context.appId, // 替换成自己开通一键登录的应用的DCloud appid - provider: 'univerify', - access_token: event.access_token, - openid: event.openid - }) - // 执行入库等操作,正常情况下不要把完整手机号返回给前端 - return { - errCode: 0, - errMsg: '获取手机号成功', - res: res - } -} diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/univerify/package.json b/mpuniapp/uniCloud-aliyun/cloudfunctions/univerify/package.json deleted file mode 100644 index 64766cb..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/univerify/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "univerify", - "dependencies": {}, - "extensions": { - "uni-cloud-verify": {} - }, - "origin-plugin-dev-name": "hello-uniapp-x", - "origin-plugin-version": "1.0.44", - "plugin-dev-name": "hello-uniapp-x", - "plugin-version": "1.0.44" -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/verify-client/index.js b/mpuniapp/uniCloud-aliyun/cloudfunctions/verify-client/index.js deleted file mode 100644 index 852391a..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/verify-client/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; -exports.main = async (event, context) => { - return { - returnBy: 'verify-client' - } -}; diff --git a/mpuniapp/uniCloud-aliyun/cloudfunctions/verify-client/package.json b/mpuniapp/uniCloud-aliyun/cloudfunctions/verify-client/package.json deleted file mode 100644 index 85aa3a7..0000000 --- a/mpuniapp/uniCloud-aliyun/cloudfunctions/verify-client/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "verify-client", - "dependencies": {}, - "extensions": { - "uni-cloud-jql": {} - }, - "origin-plugin-dev-name": "hello-uniapp-x", - "origin-plugin-version": "1.0.44", - "plugin-dev-name": "hello-uniapp-x", - "plugin-version": "1.0.44" -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/database/JQL查询.jql b/mpuniapp/uniCloud-aliyun/database/JQL查询.jql deleted file mode 100644 index 35d21de..0000000 --- a/mpuniapp/uniCloud-aliyun/database/JQL查询.jql +++ /dev/null @@ -1,12 +0,0 @@ -// 本文件用于,使用JQL语法操作项目关联的uniCloud空间的数据库,方便开发调试和远程数据库管理 -// 编写clientDB的js API(也支持常规js语法,比如var),可以对云数据库进行增删改查操作。不支持uniCloud-db组件写法 -// 可以全部运行,也可以选中部分代码运行。点击工具栏上的运行按钮或者按下【F5】键运行代码 -// 如果文档中存在多条JQL语句,只有最后一条语句生效 -// 如果混写了普通js,最后一条语句需是数据库操作语句 -// 此处代码运行不受DB Schema的权限控制,移植代码到实际业务中注意在schema中配好permission -// 不支持clientDB的action -// 数据库查询有最大返回条数限制,详见:https://uniapp.dcloud.net.cn/uniCloud/cf-database.html#limit -// 详细JQL语法,请参考:https://uniapp.dcloud.net.cn/uniCloud/jql.html - -// 下面示例查询uni-id-users表的所有数据 -db.collection('uni-id-users').get(); diff --git a/mpuniapp/uniCloud-aliyun/database/foreign.schema.json b/mpuniapp/uniCloud-aliyun/database/foreign.schema.json deleted file mode 100644 index d965495..0000000 --- a/mpuniapp/uniCloud-aliyun/database/foreign.schema.json +++ /dev/null @@ -1,25 +0,0 @@ -// 文档教程: https://uniapp.dcloud.net.cn/uniCloud/schema -{ - "bsonType": "object", - "required": [], - "permission": { - "read": true, - "create": true, - "update": true, - "delete": true - }, - "properties": { - "_id": { - "description": "ID,系统自动生成" - }, - "id": { - "bsonType": "string" - }, - "name": { - "bsonType": "string" - }, - "tag": { - "bsonType": "string" - } - } -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/database/local.schema.json b/mpuniapp/uniCloud-aliyun/database/local.schema.json deleted file mode 100644 index 28bd811..0000000 --- a/mpuniapp/uniCloud-aliyun/database/local.schema.json +++ /dev/null @@ -1,28 +0,0 @@ -// 文档教程: https://uniapp.dcloud.net.cn/uniCloud/schema -{ - "bsonType": "object", - "required": [], - "permission": { - "read": true, - "create": true, - "update": true, - "delete": true - }, - "properties": { - "_id": { - "description": "ID,系统自动生成" - }, - "id": { - "bsonType": "string" - }, - "name": { - "bsonType": "string" - }, - "tag": { - "bsonType": "string" - }, - "foreign_id": { - "foreignKey": "foreign.id" - } - } -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/database/opendb-contacts.schema.json b/mpuniapp/uniCloud-aliyun/database/opendb-contacts.schema.json deleted file mode 100644 index 9c55878..0000000 --- a/mpuniapp/uniCloud-aliyun/database/opendb-contacts.schema.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "bsonType": "object", - "permission": { - "read": true, - "create": true, - "update": true, - "delete": true - }, - "required": ["username", "mobile"], - "properties": { - "_id": { - "description": "存储文档 ID(用户 ID),系统自动生成" - }, - "username": { - "bsonType": "string", - "title": "姓名", - "description": "姓名", - "order": 1, - "trim": "both" - }, - "gender": { - "bsonType": "int", - "title": "性别", - "description": "用户性别:0 未知 1 男性 2 女性", - "order": 2, - "defaultValue": 0, - "enum": [{ - "text": "未知", - "value": 0 - }, - { - "text": "男", - "value": 1 - }, - { - "text": "女", - "value": 2 - } - ] - }, - "mobile": { - "bsonType": "string", - "title": "电话", - "order": 3, - "description": "电话", - "pattern": "^\\+?[0-9-]{3,20}$", - "trim": "both" - }, - "email": { - "bsonType": "string", - "format": "email", - "title": "邮箱", - "order": 4, - "description": "邮箱地址", - "trim": "both" - }, - "comment": { - "bsonType": "string", - "title": "备注", - "order": 5, - "description": "备注", - "trim": "both", - "component": { - "name": "textarea" - } - }, - "create_date": { - "bsonType": "timestamp", - "description": "创建时间", - "forceDefaultValue": { - "$env": "now" - } - } - }, - "version": "0.0.1" -} \ No newline at end of file diff --git a/mpuniapp/uniCloud-aliyun/database/type.schema.json b/mpuniapp/uniCloud-aliyun/database/type.schema.json deleted file mode 100644 index 0fb1618..0000000 --- a/mpuniapp/uniCloud-aliyun/database/type.schema.json +++ /dev/null @@ -1,30 +0,0 @@ -// 文档教程: https://uniapp.dcloud.net.cn/uniCloud/schema -{ - "bsonType": "object", - "required": [], - "permission": { - "read": true, - "create": true, - "update": true, - "delete": true - }, - "properties": { - "_id": { - "description": "ID,系统自动生成" - }, - "num": { - "bsonType": "int" - }, - "tag": { - "bsonType": "string", - "maxLength": 50, - "minLength": 0 - }, - "date": { - "bsonType": "date" - }, - "point": { - "bsonType": "object" - } - } -} diff --git a/mpuniapp/uniCloud-aliyun/database/unicloud-db-test.schema.json b/mpuniapp/uniCloud-aliyun/database/unicloud-db-test.schema.json deleted file mode 100644 index 7f4a694..0000000 --- a/mpuniapp/uniCloud-aliyun/database/unicloud-db-test.schema.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "bsonType": "object", - "permission": { - "read": true, - "create": true, - "update": true, - "delete": true - }, - "required": ["title", "comment"], - "properties": { - "_id": { - "description": "存储文档 ID(用户 ID),系统自动生成" - }, - "title": { - "bsonType": "string", - "title": "姓名", - "description": "姓名", - "order": 1, - "trim": "both" - }, - "comment": { - "bsonType": "string", - "title": "备注", - "order": 5, - "description": "备注", - "trim": "both", - "component": { - "name": "textarea" - } - }, - "create_date": { - "bsonType": "timestamp", - "description": "创建时间", - "forceDefaultValue": { - "$env": "now" - } - } - }, - "version": "0.0.1" -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/CalendarPicker/components/CalendarPicker/CalendarPicker.vue b/mpuniapp/uni_modules/CalendarPicker/components/CalendarPicker/CalendarPicker.vue deleted file mode 100644 index 62c7f19..0000000 --- a/mpuniapp/uni_modules/CalendarPicker/components/CalendarPicker/CalendarPicker.vue +++ /dev/null @@ -1,134 +0,0 @@ - - \ No newline at end of file diff --git a/mpuniapp/uni_modules/CalendarPicker/package.json b/mpuniapp/uni_modules/CalendarPicker/package.json deleted file mode 100644 index 3726ba5..0000000 --- a/mpuniapp/uni_modules/CalendarPicker/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "id": "CalendarPicker", - "displayName": "CalendarPicker", - "version": "1.0.0", - "description": "CalendarPicker", - "keywords": [ - "CalendarPicker" -], - "repository": "", - "engines": { - "HBuilderX": "^3.1.0" - }, - "dcloudext": { - "type": "component-vue", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "", - "data": "", - "permissions": "" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "u", - "aliyun": "u", - "alipay": "u" - }, - "client": { - "Vue": { - "vue2": "u", - "vue3": "u" - }, - "App": { - "app-vue": "u", - "app-nvue": "u", - "app-uvue": "u" - }, - "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" - }, - "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" - }, - "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/CalendarPicker/readme.md b/mpuniapp/uni_modules/CalendarPicker/readme.md deleted file mode 100644 index 2dd887c..0000000 --- a/mpuniapp/uni_modules/CalendarPicker/readme.md +++ /dev/null @@ -1 +0,0 @@ -# test-native-view \ No newline at end of file diff --git a/mpuniapp/uni_modules/CalendarPicker/utssdk/app-harmony/builder.ets b/mpuniapp/uni_modules/CalendarPicker/utssdk/app-harmony/builder.ets deleted file mode 100644 index c0a095e..0000000 --- a/mpuniapp/uni_modules/CalendarPicker/utssdk/app-harmony/builder.ets +++ /dev/null @@ -1,13 +0,0 @@ -@Builder -export function buildCalendarPicker(params: ESObject) { - CalendarPicker({ hintRadius: params.hintRadius, selected: params.selected }) - .edgeAlign(params.alignType, { dx: params.offsetX, dy: params.offsetY }) - .textStyle({ - color: params.color, - font: { size: params.fontSize, weight: params.fontWeight, style: params.fontStyle } - }) - .onChange((value) => { - params.onChange(value) - }) - .attributeModifier(params.attributeUpdater) -} diff --git a/mpuniapp/uni_modules/CalendarPicker/utssdk/app-harmony/index.uts b/mpuniapp/uni_modules/CalendarPicker/utssdk/app-harmony/index.uts deleted file mode 100644 index 2dcbc51..0000000 --- a/mpuniapp/uni_modules/CalendarPicker/utssdk/app-harmony/index.uts +++ /dev/null @@ -1,108 +0,0 @@ -import { BuilderNode } from "@kit.ArkUI" -import { buildCalendarPicker } from "./builder.ets" - -interface CalendarPickerOptions { - selected ?: Date - hintRadius ?: number - alignType ?: CalendarAlign - offsetX ?: number | string - offsetY ?: number | string - color ?: string - fontSize ?: number - fontWeight ?: 100 | 400 | 500 | 700 | 900 - fontStyle ?: FontStyle - onChange ?: (value : Date) => void -} - -export class CalendarPicker { - private onChanges : Array<(value : Date) => void> = [] - private params : CalendarPickerOptions = { - onChange: (value : Date) => { - this.onChanges.forEach((onChange) => { - onChange(value) - }) - } - } - private builder : BuilderNode<[CalendarPickerOptions]> | null = null - - init(element : UniNativeViewElement) { - this.builder = - element.bindHarmonyWrappedBuilder(wrapBuilder<[CalendarPickerOptions]>(buildCalendarPicker), this.params) - } - - onChange(callback : (value : Date) => void) : CalendarPicker { - this.onChanges.push(callback) - return this - } - - setSelected(date : Date) : CalendarPicker { - this.params.selected = date - this.builder?.update(this.params) - return this - } - - setAlignType(alignType : 'start' | 'center' | 'end') : CalendarPicker { - switch (alignType) { - case 'start': - this.params.alignType = CalendarAlign.START - break - case 'center': - this.params.alignType = CalendarAlign.CENTER - break - case 'end': - this.params.alignType = CalendarAlign.END - break - } - this.builder?.update(this.params) - return this - } - - setOffsetX(offsetX : number | string) : CalendarPicker { - this.params.offsetX = offsetX - this.builder?.update(this.params) - return this - } - - setOffsetY(offsetY : number | string) : CalendarPicker { - this.params.offsetY = offsetY - this.builder?.update(this.params) - return this - } - - setHintRadius(hintRadius : number) : CalendarPicker { - this.params.hintRadius = hintRadius - this.builder?.update(this.params) - return this - } - - setColor(color : string) : CalendarPicker { - this.params.color = color - this.builder?.update(this.params) - return this - } - - setFontSize(fontSize : number) : CalendarPicker { - this.params.fontSize = fontSize - this.builder?.update(this.params) - return this - } - - setFontWeight(fontWeight : 100 | 400 | 500 | 700 | 900) : CalendarPicker { - this.params.fontWeight = fontWeight - this.builder?.update(this.params) - return this - } - - setFontStyle(fontStyle : 'normal' | 'italic') : CalendarPicker { - switch (fontStyle) { - case 'normal': - this.params.fontStyle = FontStyle.Normal - break - case 'italic': - this.params.fontStyle = FontStyle.Italic - break - } - this.builder?.update(this.params) - return this - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/native-button/components/native-button/native-button.uvue b/mpuniapp/uni_modules/native-button/components/native-button/native-button.uvue deleted file mode 100644 index 1b2dd5e..0000000 --- a/mpuniapp/uni_modules/native-button/components/native-button/native-button.uvue +++ /dev/null @@ -1,56 +0,0 @@ - - diff --git a/mpuniapp/uni_modules/native-button/package.json b/mpuniapp/uni_modules/native-button/package.json deleted file mode 100644 index 3f86656..0000000 --- a/mpuniapp/uni_modules/native-button/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "id": "native-button", - "displayName": "native-button", - "version": "0.0.1", - "description": "vue开发button原生组件", - "repository": "", - "engines": { - "HBuilderX": "^4.25" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "插件不采集任何数据", - "permissions": "无" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "y", - "aliyun": "y" - }, - "client": { - "Vue": { - "vue2": "n", - "vue3": "y" - }, - "App": { - "app-android": { - "minVersion": "21" - }, - "app-ios": { - "minVersion": "9" - } - }, - "H5-mobile": { - "Safari": "y", - "Android Browser": "y", - "微信浏览器(Android)": "y", - "QQ浏览器(Android)": "y" - }, - "H5-pc": { - "Chrome": "y", - "IE": "y", - "Edge": "y", - "Firefox": "y", - "Safari": "y" - }, - "小程序": { - "微信": "y", - "阿里": "y", - "百度": "y", - "字节跳动": "u", - "QQ": "y", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} diff --git a/mpuniapp/uni_modules/native-button/readme.md b/mpuniapp/uni_modules/native-button/readme.md deleted file mode 100644 index ee8a09e..0000000 --- a/mpuniapp/uni_modules/native-button/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -## native-button - -通过 object 封装原生平台Button按钮 diff --git a/mpuniapp/uni_modules/native-button/utssdk/app-android/config.json b/mpuniapp/uni_modules/native-button/utssdk/app-android/config.json deleted file mode 100644 index bf95925..0000000 --- a/mpuniapp/uni_modules/native-button/utssdk/app-android/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "minSdkVersion": "21" -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/native-button/utssdk/app-android/index.uts b/mpuniapp/uni_modules/native-button/utssdk/app-android/index.uts deleted file mode 100644 index 38e7f5e..0000000 --- a/mpuniapp/uni_modules/native-button/utssdk/app-android/index.uts +++ /dev/null @@ -1,106 +0,0 @@ -import Button from "android.widget.Button" -import { INativeButtonContext, CreateNativeButtonContext } from "../interface.uts" - -export class NativeButton { - $element : UniNativeViewElement; - - constructor(element : UniNativeViewElement) { - //接收传递过来的UniNativeViewElement - this.$element = element; - this.bindView(); - } - - button : Button | null = null; - bindView() { - //通过UniElement.getAndroidActivity()获取android平台activity 用于创建view的上下文 - this.button = new Button(this.$element.getAndroidActivity()!); //构建原生view - //限制原生Button 文案描述不自动大写 - this.button?.setAllCaps(false) - //监听原生Button点击事件 - this.button?.setOnClickListener(_ => { - const detail = { - value: "CustomValue" - } - //构建自定义UniNativeViewEvent返回对象 - const event = new UniNativeViewEvent("customClick", detail) - //触发原生Button的点击事件 - this.$element.dispatchEvent(event) - }) - //UniNativeViewEvent 绑定 安卓原生view - this.$element.bindAndroidView(this.button!); - } - - updateText(text : string) { - //更新原生Button 文案描述 - this.button?.setText(text) - } - - - destroy() { - //数据回收 - } -} - - -class NativeButtonContext implements INativeButtonContext { - private element : UniElement | null = null - - constructor(element : UniElement) { - this.element = element - } - updateText(text : string) { - let button = this.element?.getAndroidView() - if(null != button){ - (button as Button).setText(text) - } - } -} -/** - * 递归查询 - */ -function iterateElement(homeElement : UniElement) : UniElement | null { - if ("NATIVE-VIEW" == homeElement.nodeName) { - return homeElement - } - for (perChildEle of homeElement.children) { - let findEle = iterateElement(perChildEle) - if (findEle != null) { - return findEle - } - } - - return null -} - - - -export function createNativeButtonContext(id : string, ins : ComponentPublicInstance | null = null) : INativeButtonContext | null { - if (ins == null) { - const pages = getCurrentPages() - if (pages.length > 0) { - const page = pages[pages.length - 1] - const rootViewElement = page.getElementById(id) - if (rootViewElement != null) { - /** - * 找到了root节点,递归检索目标 native-view - */ - const nativeViewElement = iterateElement(rootViewElement) - if (nativeViewElement != null) { - return new NativeButtonContext(nativeViewElement) - } - } - } - } else { - /** - * 尝试迭代遍历 - */ - if (ins.$el != null) { - const nativeViewElement = iterateElement(ins.$el as UniElement) - if (nativeViewElement != null) { - return new NativeButtonContext(nativeViewElement) - } - } - } - - return null -} diff --git a/mpuniapp/uni_modules/native-button/utssdk/app-harmony/builder.ets b/mpuniapp/uni_modules/native-button/utssdk/app-harmony/builder.ets deleted file mode 100644 index 5a2b362..0000000 --- a/mpuniapp/uni_modules/native-button/utssdk/app-harmony/builder.ets +++ /dev/null @@ -1,12 +0,0 @@ -@Builder -export function buildButton(params: ESObject) { - Button(params.text, { type: ButtonType.Normal, stateEffect: true }) - .borderRadius(8) - .backgroundColor(0x317aff) - .width('100%') - .height('100%') - .onClick(() => { - params.onClick() - }) - .attributeModifier(params.attributeUpdater) -} diff --git a/mpuniapp/uni_modules/native-button/utssdk/app-harmony/index.uts b/mpuniapp/uni_modules/native-button/utssdk/app-harmony/index.uts deleted file mode 100644 index 3f07d60..0000000 --- a/mpuniapp/uni_modules/native-button/utssdk/app-harmony/index.uts +++ /dev/null @@ -1,105 +0,0 @@ -import { BuilderNode } from "@kit.ArkUI" -// 导入混编实现的声明式UI构建函数 -import { buildButton } from "./builder.ets" - -import { INativeButtonContext } from "../interface.uts" -// 定义 buildButton 的参数类型 -interface NativeButtonOptions { - text : string - onClick : () => void -} - -export class NativeButton { - private $element : UniNativeViewElement; - private builder : BuilderNode<[NativeButtonOptions]> | null = null - // 初始化 buildButton 默认参数 - private params : NativeButtonOptions = { - text: '', - onClick: () => { - const detail = { - value: "CustomValue" - } - this.$element.dispatchEvent(new UniNativeViewEvent("customClick", detail)) - } - } - - constructor(element : UniNativeViewElement) { - // 绑定 wrapBuilder 函数 - this.builder = element.bindHarmonyWrappedBuilder(wrapBuilder<[NativeButtonOptions]>(buildButton), this.params) - this.$element = element - // 绑定当前实例为自定义的controller,方便其他地方通过 element 获取使用 - this.$element.bindHarmonyController(this) - } - - updateText(text : string) { - this.params.text = text - // 调用 builder update 函数来更新 UI - this.builder?.update(this.params) - } - - destroy() { - //数据回收 - } -} - - -class NativeButtonContext implements INativeButtonContext { - private controller : NativeButton - constructor(element : UniNativeViewElement) { - // 获取自定义的 controller - this.controller = element.getHarmonyController()! - } - updateText(text : string) { - // 调用 controller 来更新文字 - this.controller?.updateText(text) - } -} -/** - * 递归查询 - */ -function iterateElement(homeElement : UniElement) : UniNativeViewElement | null { - if ("NATIVE-VIEW" == homeElement.nodeName) { - return homeElement as UniNativeViewElement - } - for (const perChildEle of homeElement.children) { - let findEle = iterateElement(perChildEle) - if (findEle != null) { - return findEle - } - } - - return null -} - - - -export function createNativeButtonContext(id : string, ins : ComponentPublicInstance | null = null) : INativeButtonContext | null { - if (ins == null) { - const pages = getCurrentPages() - if (pages.length > 0) { - const page = pages[pages.length - 1] - const rootViewElement = page.getElementById(id) - if (rootViewElement != null) { - /** - * 找到了root节点,递归检索目标 native-view - */ - const nativeViewElement = iterateElement(rootViewElement) - if (nativeViewElement != null) { - return new NativeButtonContext(nativeViewElement) - } - } - } - } else { - /** - * 尝试迭代遍历 - */ - if (ins.$el != null) { - const nativeViewElement = iterateElement(ins.$el as UniElement) - if (nativeViewElement != null) { - return new NativeButtonContext(nativeViewElement) - } - } - } - - return null -} diff --git a/mpuniapp/uni_modules/native-button/utssdk/app-ios/config.json b/mpuniapp/uni_modules/native-button/utssdk/app-ios/config.json deleted file mode 100644 index 3312828..0000000 --- a/mpuniapp/uni_modules/native-button/utssdk/app-ios/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deploymentTarget": "12" -} diff --git a/mpuniapp/uni_modules/native-button/utssdk/app-ios/index.uts b/mpuniapp/uni_modules/native-button/utssdk/app-ios/index.uts deleted file mode 100644 index 662f191..0000000 --- a/mpuniapp/uni_modules/native-button/utssdk/app-ios/index.uts +++ /dev/null @@ -1,103 +0,0 @@ -import { UIButton, UIControl } from "UIKit" -import { INativeButtonContext, CreateNativeButtonContext } from "../interface.uts" -import { CGFloat } from 'CoreFoundation'; - - -export class NativeButton { - - element : UniNativeViewElement; - button : UIButton | null = null; - - constructor(element : UniNativeViewElement) { - // 接收组件传递过来的UniNativeViewElement - this.element = element; - super.init() - this.bindView(); - } - - // element 绑定原生view - bindView() { - // 初始化原生 UIButton - this.button = new UIButton(type=UIButton.ButtonType.system) - // 构建方法选择器 - const method = Selector("buttonClickAction") - // button 绑定点击回调方法 - button?.addTarget(this, action = method, for = UIControl.Event.touchUpInside) - // UniNativeViewElement 绑定原生 view - this.element.bindIOSView(this.button!); - } - - updateText(text : string) { - // 更新 button 显示文字 - this.button?.setTitle(text, for = UIControl.State.normal) - } - - /** - * 按钮点击回调方法 - * 在 swift 中,所有target-action (例如按钮的点击事件,NotificationCenter 的通知事件等)对应的 action 函数前面都要使用 @objc 进行标记。 - */ - @objc buttonClickAction() { - //构建自定义 UniNativeViewEvent 对象 - const detail = { - value: "CustomValue" - } - let event = new UniNativeViewEvent("customClick", detail) - //触发自定义事件 - this.element.dispatchEvent(event) - } - - destroy() { - // 释放 UTS 实例对象,避免内存泄露 - UTSiOS.destroyInstance(this) - } -} - - -function getNativeViewElemet(element: UniElement | null): UniNativeViewElement | null { - if (element == null) { - return null; - } - if (element instanceof UniNativeViewElement) { - return element as UniNativeViewElement - } - for (item in element!.children) { - let tmp = getNativeViewElemet(item) - if (tmp != null) { - return tmp - } - } - return null -} - - -export const createNativeButtonContext: CreateNativeButtonContext = function (id : string, component ?: ComponentPublicInstance | null) : INativeButtonContext | null { - let element : UniNativeViewElement | null = null; - let e: UniElement | null = null; - if (component == null) { - e = uni.getElementById(id) - } else { - e = component?.$el as UniElement | null; - } - if (e instanceof UniNativeViewElement) { - element = e as UniNativeViewElement | null - }else { - element = getNativeViewElemet(e) - } - - if (element == null) return null; - return new NativeButtonContextImpl(element!); -} - - -class NativeButtonContextImpl implements INativeButtonContext { - btn: UIButton | null = null - constructor(element : UniNativeViewElement) { - let view = element.getIOSView() - if (view != null) { - this.btn = view as UIButton - } - } - updateText(title: string) : void { - this.btn?.setTitle(title, for = UIControl.State.normal) - } -} diff --git a/mpuniapp/uni_modules/native-button/utssdk/interface.uts b/mpuniapp/uni_modules/native-button/utssdk/interface.uts deleted file mode 100644 index 634406e..0000000 --- a/mpuniapp/uni_modules/native-button/utssdk/interface.uts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * 原生组件的上下文对象 - */ -export interface INativeButtonContext { - /** - * 更新文本示例 - */ - updateText(text : string) : void -} - -export type CreateNativeButtonContext = ( - id : string, - component ?: ComponentPublicInstance | null -) => INativeButtonContext | null; \ No newline at end of file diff --git a/mpuniapp/uni_modules/native-time-picker/components/native-time-picker/native-time-picker.uvue b/mpuniapp/uni_modules/native-time-picker/components/native-time-picker/native-time-picker.uvue deleted file mode 100644 index 474b7ad..0000000 --- a/mpuniapp/uni_modules/native-time-picker/components/native-time-picker/native-time-picker.uvue +++ /dev/null @@ -1,71 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/native-time-picker/package.json b/mpuniapp/uni_modules/native-time-picker/package.json deleted file mode 100644 index d0fd9ba..0000000 --- a/mpuniapp/uni_modules/native-time-picker/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "id": "native-time-picker", - "displayName": "native-time-picker", - "version": "1.0.0", - "description": "native-time-picker", - "repository": "", - "engines": { - "HBuilderX": "^3.1.0" - }, - "dcloudext": { - "type": "component-vue", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "", - "data": "", - "permissions": "" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "u", - "aliyun": "u", - "alipay": "u" - }, - "client": { - "Vue": { - "vue2": "u", - "vue3": "u" - }, - "App": { - "app-vue": "u", - "app-nvue": "u", - "app-uvue": "u" - }, - "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" - }, - "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" - }, - "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} diff --git a/mpuniapp/uni_modules/native-time-picker/readme.md b/mpuniapp/uni_modules/native-time-picker/readme.md deleted file mode 100644 index 7bd70d5..0000000 --- a/mpuniapp/uni_modules/native-time-picker/readme.md +++ /dev/null @@ -1 +0,0 @@ -# native-time-picker diff --git a/mpuniapp/uni_modules/native-time-picker/utssdk/app-android/config.json b/mpuniapp/uni_modules/native-time-picker/utssdk/app-android/config.json deleted file mode 100644 index bf95925..0000000 --- a/mpuniapp/uni_modules/native-time-picker/utssdk/app-android/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "minSdkVersion": "21" -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/native-time-picker/utssdk/app-android/index.uts b/mpuniapp/uni_modules/native-time-picker/utssdk/app-android/index.uts deleted file mode 100644 index 0db9f34..0000000 --- a/mpuniapp/uni_modules/native-time-picker/utssdk/app-android/index.uts +++ /dev/null @@ -1,31 +0,0 @@ -import TimePicker from "android.widget.TimePicker" - -export class NativeTimePicker { - $element : UniNativeViewElement; - - constructor(element : UniNativeViewElement, hour: number, minute: number) { - this.$element = element; - this.bindView(hour, minute); - } - - picker : TimePicker | null = null; - bindView(hour: number, minute: number) { - this.picker = new TimePicker(this.$element.getAndroidActivity()!); //构建原生view - this.$element.bindAndroidView(this.picker!); - this.setHour(hour) - this.setMinute(minute) - this.picker?.setOnTimeChangedListener((_, hourOfDay, minute) => { - const detail = {"hour": hourOfDay, "minute": minute} - const event = new UniNativeViewEvent("timechanged", detail) - this.$element.dispatchEvent(event) - }) - } - - setHour(hour: number) { - this.picker?.setHour(hour.toInt()) - } - - setMinute(minute: number) { - this.picker?.setMinute(minute.toInt()) - } -} diff --git a/mpuniapp/uni_modules/native-time-picker/utssdk/app-ios/config.json b/mpuniapp/uni_modules/native-time-picker/utssdk/app-ios/config.json deleted file mode 100644 index 3312828..0000000 --- a/mpuniapp/uni_modules/native-time-picker/utssdk/app-ios/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deploymentTarget": "12" -} diff --git a/mpuniapp/uni_modules/native-time-picker/utssdk/app-ios/index.uts b/mpuniapp/uni_modules/native-time-picker/utssdk/app-ios/index.uts deleted file mode 100644 index e408c3a..0000000 --- a/mpuniapp/uni_modules/native-time-picker/utssdk/app-ios/index.uts +++ /dev/null @@ -1,89 +0,0 @@ -import { UIDatePicker, UIControl, UIDatePickerStyle, UIUserInterfaceStyle } from "UIKit" -import { DateFormatter } from "Foundation" - -export class NativeTimePicker { - - element : UniNativeViewElement - timePicker : UIDatePicker - h : number - m : number - - constructor(element : UniNativeViewElement, hour : number, minute : number) { - this.element = element - this.timePicker = new UIDatePicker() - this.h = hour - this.m = minute - super.init() - - // 在 swift target-action 对应的方法需要以OC的方式来调用,那么OC语言中用Selector来表示一个方法的名称(又称方法选择器),创建一个Selector可以使用 Selector("functionName") 的方式。 - const method = Selector("timeChange") - // 监听时间变化回调 - this.timePicker.addTarget(this, action = method, for = UIControl.Event.valueChanged) - - // 设置为时间选择模式 - this.timePicker.datePickerMode = UIDatePicker.Mode.time - - // 设置外观样式为 wheels - if (UTSiOS.available("iOS 13.4, *")) { - this.timePicker.preferredDatePickerStyle = UIDatePickerStyle.wheels - } - if (UTSiOS.available("iOS 13.0, *")) { - this.timePicker.overrideUserInterfaceStyle = UIUserInterfaceStyle.light - } - - - this.updateTime() - this.bindView(hour, minute) - } - - // element 绑定原生view - bindView(hour : number, minute : number) { - this.element.bindIOSView(this.timePicker); - } - - // 设置时 - setHour(hour : number) { - this.h = hour - this.updateTime() - } - - // 设置分 - setMinute(minute : number) { - this.m = minute - this.updateTime() - } - - // 更新显示 - updateTime() { - let formatter = DateFormatter() - formatter.dateFormat = "HH:mm" - let date = formatter.date(from = `${this.h}:${this.m}`) - if (date != null) { - this.timePicker.date = date! - } - } - - /** - * 按钮点击回调方法 - * 在 swift 中,所有target-action (例如按钮的点击事件,NotificationCenter 的通知事件等)对应的 action 函数前面都要使用 @objc 进行标记。 - */ - @objc timeChange() { - // 发送事件 - console.log("timeChange") - - let formatter = DateFormatter() - formatter.dateFormat = "HH" - let hourString = formatter.string(from = this.timePicker.date) - - formatter.dateFormat = "mm" - let minuteString = formatter.string(from = this.timePicker.date) - - const detail = { "hour": hourString, "minute": minuteString } - const event = new UniNativeViewEvent("timechanged", detail) - this.element.dispatchEvent(event) - } - - destroy() { - UTSiOS.destroyInstance(this) - } -} diff --git a/mpuniapp/uni_modules/test-image-path/components/test-image-path/test-image-path.vue b/mpuniapp/uni_modules/test-image-path/components/test-image-path/test-image-path.vue deleted file mode 100644 index d7a5f74..0000000 --- a/mpuniapp/uni_modules/test-image-path/components/test-image-path/test-image-path.vue +++ /dev/null @@ -1,23 +0,0 @@ - - - diff --git a/mpuniapp/uni_modules/test-image-path/package.json b/mpuniapp/uni_modules/test-image-path/package.json deleted file mode 100644 index 79423a9..0000000 --- a/mpuniapp/uni_modules/test-image-path/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "id": "test-image-path", - "displayName": "test-image-path", - "version": "1.0.0", - "description": "test-image-path", - "keywords": [ - "test-image-path" -], - "repository": "", - "engines": { - "HBuilderX": "^3.1.0" - }, - "dcloudext": { - "type": "component-vue", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "", - "data": "", - "permissions": "" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "u", - "aliyun": "u", - "alipay": "u" - }, - "client": { - "Vue": { - "vue2": "u", - "vue3": "u" - }, - "App": { - "app-vue": "u", - "app-nvue": "u", - "app-uvue": "u" - }, - "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" - }, - "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" - }, - "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/test-image-path/readme.md b/mpuniapp/uni_modules/test-image-path/readme.md deleted file mode 100644 index ae4cc6e..0000000 --- a/mpuniapp/uni_modules/test-image-path/readme.md +++ /dev/null @@ -1 +0,0 @@ -# test-image-path \ No newline at end of file diff --git a/mpuniapp/uni_modules/test-image-path/static/test-image-path.png b/mpuniapp/uni_modules/test-image-path/static/test-image-path.png deleted file mode 100644 index 5fae0b4..0000000 Binary files a/mpuniapp/uni_modules/test-image-path/static/test-image-path.png and /dev/null differ diff --git a/mpuniapp/uni_modules/test-invoke-network-api/package.json b/mpuniapp/uni_modules/test-invoke-network-api/package.json deleted file mode 100644 index 4e6cdf4..0000000 --- a/mpuniapp/uni_modules/test-invoke-network-api/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "id": "test-invoke-network-api", - "displayName": "test-invoke-network-api", - "version": "1.0.0", - "description": "测试UTS插件中访问网络相关接口", - "keywords": [ - "test-invoke-network-api" -], - "repository": "", - "engines": { - "HBuilderX": "^3.6.8" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "", - "data": "", - "permissions": "" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "u", - "aliyun": "u", - "alipay": "u" - }, - "client": { - "Vue": { - "vue2": "u", - "vue3": "u" - }, - "App": { - "app-android": "u", - "app-ios": "u" - }, - "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" - }, - "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" - }, - "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} diff --git a/mpuniapp/uni_modules/test-invoke-network-api/readme.md b/mpuniapp/uni_modules/test-invoke-network-api/readme.md deleted file mode 100644 index 47bfcf2..0000000 --- a/mpuniapp/uni_modules/test-invoke-network-api/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -# test-invoke-network-api -### 开发文档 -[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html) -[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html) -[UTS 组件插件](https://uniapp.dcloud.net.cn/plugin/uts-component.html) -[Hello UTS](https://gitcode.net/dcloud/hello-uts) \ No newline at end of file diff --git a/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-android/config.json b/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-android/config.json deleted file mode 100644 index bf95925..0000000 --- a/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-android/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "minSdkVersion": "21" -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-android/index.uts b/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-android/index.uts deleted file mode 100644 index a2687ae..0000000 --- a/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-android/index.uts +++ /dev/null @@ -1,64 +0,0 @@ -import { CommonOptions } from '../interface.uts' - - -export function testInovkeRequest(options : CommonOptions) : void { - uni.request({ - url: "https://request.dcloud.net.cn/api/http/method/post", - method: "POST", - header: { - "Cookie": "token11222" - } as UTSJSONObject, - timeout: 6000, - sslVerify: false, - withCredentials: false, - data: { - "platform": { - "abc": "xyq" - }, - }, - firstIpv4: false, - success: (res : RequestSuccess) => { - options.success?.(res) - }, - fail(e : RequestFail) { - options.fail?.(e) - }, - } as RequestOptions) -} - -export function testInovkeUploadFile(options : CommonOptions) : void { - - const imageSrc = "/static/test-image/logo.png"; - uni.uploadFile({ - url: 'https://unidemo.dcloud.net.cn/upload', - files: [ - { - name: "file1", - uri: imageSrc - } as UploadFileOptionFiles, - { - name: "file2", - uri: imageSrc - } as UploadFileOptionFiles - ], - success: (res : UploadFileSuccess) => { - options.success?.(res) - }, - fail: (err : UploadFileFail) => { - options.fail?.(err) - }, - } as UploadFileOptions) -} - -export function testInovkeDownloadFile(options : CommonOptions) : void { - uni.downloadFile({ - url: "https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/uni-app.png", - filePath: `${uni.env.CACHE_PATH}/halo/world/`, - success(res : DownloadFileSuccess) { - options.success?.(res) - }, - fail(e : DownloadFileFail) { - options.fail?.(e) - } - } as DownloadFileOptions); -} diff --git a/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-harmony/index.uts b/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-harmony/index.uts deleted file mode 100644 index 390242b..0000000 --- a/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-harmony/index.uts +++ /dev/null @@ -1,67 +0,0 @@ -import { CommonOptions } from '../interface.uts' - - -export function testInovkeRequest(options : CommonOptions) : void { - uni.request({ - url: "https://request.dcloud.net.cn/api/http/method/post", - method: "POST", - header: { - "Cookie": "token11222" - } as UTSJSONObject, - timeout: 6000, - sslVerify: false, - withCredentials: false, - dataType: 'json', - responseType: 'text', - data: { - "platform": { - "abc": "xyq" - }, - }, - firstIpv4: false, - success: (res) => { - options.success?.(res) - }, - fail(e) { - options.fail?.(e) - }, - complete: () => {}, - }) -} - -export function testInovkeUploadFile(options : CommonOptions) : void { - - const imageSrc = "/static/test-image/logo.png"; - uni.uploadFile({ - url: 'https://unidemo.dcloud.net.cn/upload', - files: [ - { - name: "file1", - uri: imageSrc - }, - { - name: "file2", - uri: imageSrc - } - ], - success: (res) => { - options.success?.(res) - }, - fail: (err) => { - options.fail?.(err) - }, - } as UploadFileOptions) -} - -export function testInovkeDownloadFile(options : CommonOptions) : void { - uni.downloadFile({ - url: "https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/uni-app.png", - filePath: `${uni.env.CACHE_PATH}/halo/world/`, - success(res) { - options.success?.(res) - }, - fail(e) { - options.fail?.(e) - } - } as DownloadFileOptions); -} diff --git a/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-ios/config.json b/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-ios/config.json deleted file mode 100644 index 721b81e..0000000 --- a/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-ios/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deploymentTarget": "9" -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-ios/index.uts b/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-ios/index.uts deleted file mode 100644 index a2687ae..0000000 --- a/mpuniapp/uni_modules/test-invoke-network-api/utssdk/app-ios/index.uts +++ /dev/null @@ -1,64 +0,0 @@ -import { CommonOptions } from '../interface.uts' - - -export function testInovkeRequest(options : CommonOptions) : void { - uni.request({ - url: "https://request.dcloud.net.cn/api/http/method/post", - method: "POST", - header: { - "Cookie": "token11222" - } as UTSJSONObject, - timeout: 6000, - sslVerify: false, - withCredentials: false, - data: { - "platform": { - "abc": "xyq" - }, - }, - firstIpv4: false, - success: (res : RequestSuccess) => { - options.success?.(res) - }, - fail(e : RequestFail) { - options.fail?.(e) - }, - } as RequestOptions) -} - -export function testInovkeUploadFile(options : CommonOptions) : void { - - const imageSrc = "/static/test-image/logo.png"; - uni.uploadFile({ - url: 'https://unidemo.dcloud.net.cn/upload', - files: [ - { - name: "file1", - uri: imageSrc - } as UploadFileOptionFiles, - { - name: "file2", - uri: imageSrc - } as UploadFileOptionFiles - ], - success: (res : UploadFileSuccess) => { - options.success?.(res) - }, - fail: (err : UploadFileFail) => { - options.fail?.(err) - }, - } as UploadFileOptions) -} - -export function testInovkeDownloadFile(options : CommonOptions) : void { - uni.downloadFile({ - url: "https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/uni-app.png", - filePath: `${uni.env.CACHE_PATH}/halo/world/`, - success(res : DownloadFileSuccess) { - options.success?.(res) - }, - fail(e : DownloadFileFail) { - options.fail?.(e) - } - } as DownloadFileOptions); -} diff --git a/mpuniapp/uni_modules/test-invoke-network-api/utssdk/interface.uts b/mpuniapp/uni_modules/test-invoke-network-api/utssdk/interface.uts deleted file mode 100644 index 446ca25..0000000 --- a/mpuniapp/uni_modules/test-invoke-network-api/utssdk/interface.uts +++ /dev/null @@ -1,17 +0,0 @@ - -export type CommonOptions = { - success ?: (res: any) => void - fail ?: (res : any) => void -} - -export type testInovkeRequest = (options : CommonOptions) => void - -export type testInovkeUploadFile = (options : CommonOptions) => void - -export type testInovkeDownloadFile = (options : CommonOptions) => void - - - - - - diff --git a/mpuniapp/uni_modules/test-native-view/components/test-native-view/test-native-view.uvue b/mpuniapp/uni_modules/test-native-view/components/test-native-view/test-native-view.uvue deleted file mode 100644 index 7b8fb98..0000000 --- a/mpuniapp/uni_modules/test-native-view/components/test-native-view/test-native-view.uvue +++ /dev/null @@ -1,46 +0,0 @@ - - diff --git a/mpuniapp/uni_modules/test-native-view/package.json b/mpuniapp/uni_modules/test-native-view/package.json deleted file mode 100644 index 6365df8..0000000 --- a/mpuniapp/uni_modules/test-native-view/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "id": "test-native-view", - "displayName": "test-native-view", - "version": "0.0.1", - "description": "测试native-view组件", - "repository": "", - "engines": { - "HBuilderX": "^4.25" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "插件不采集任何数据", - "permissions": "无" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "y", - "aliyun": "y" - }, - "client": { - "Vue": { - "vue2": "n", - "vue3": "y" - }, - "App": { - "app-android": { - "minVersion": "21" - }, - "app-ios": { - "minVersion": "9" - } - }, - "H5-mobile": { - "Safari": "y", - "Android Browser": "y", - "微信浏览器(Android)": "y", - "QQ浏览器(Android)": "y" - }, - "H5-pc": { - "Chrome": "y", - "IE": "y", - "Edge": "y", - "Firefox": "y", - "Safari": "y" - }, - "小程序": { - "微信": "y", - "阿里": "y", - "百度": "y", - "字节跳动": "u", - "QQ": "y", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} diff --git a/mpuniapp/uni_modules/test-native-view/utssdk/app-android/config.json b/mpuniapp/uni_modules/test-native-view/utssdk/app-android/config.json deleted file mode 100644 index bf95925..0000000 --- a/mpuniapp/uni_modules/test-native-view/utssdk/app-android/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "minSdkVersion": "21" -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/test-native-view/utssdk/app-android/index.uts b/mpuniapp/uni_modules/test-native-view/utssdk/app-android/index.uts deleted file mode 100644 index 890efd4..0000000 --- a/mpuniapp/uni_modules/test-native-view/utssdk/app-android/index.uts +++ /dev/null @@ -1,37 +0,0 @@ -import View from "android.view.View" -import Color from "android.graphics.Color" - - -export class TestNativeView { - $element : UniNativeViewElement - view : View | null = null - - constructor(element : UniNativeViewElement) { - this.$element = element - this.bindView() - } - - bindView() { - // 构建原生view - this.view = new View(this.$element.getAndroidActivity()!) - this.view.setBackgroundColor(Color.WHITE) - // 绑定原生view - this.$element.bindAndroidView(this.view!) - } - - destroy() { - this.view = null - } - - /** - * 更新背景颜色 - * 仅支持#RRGGBB格式颜色字符串 - */ - updateBackground(color: string) { - try{ - this.view?.setBackgroundColor(UTSAndroid.colorWithString(color)) - }catch(e){ - //Nothing to do - } - } -} diff --git a/mpuniapp/uni_modules/test-native-view/utssdk/app-harmony/builder.ets b/mpuniapp/uni_modules/test-native-view/utssdk/app-harmony/builder.ets deleted file mode 100644 index 07d44df..0000000 --- a/mpuniapp/uni_modules/test-native-view/utssdk/app-harmony/builder.ets +++ /dev/null @@ -1,8 +0,0 @@ -@Builder -export function buildView(params: ESObject) { - Stack({alignContent: Alignment.Center}) - .width('100%') - .height('100%') - .backgroundColor(params.backgroundColor) - .attributeModifier(params.attributeUpdater) -} diff --git a/mpuniapp/uni_modules/test-native-view/utssdk/app-harmony/index.uts b/mpuniapp/uni_modules/test-native-view/utssdk/app-harmony/index.uts deleted file mode 100644 index 08d378b..0000000 --- a/mpuniapp/uni_modules/test-native-view/utssdk/app-harmony/index.uts +++ /dev/null @@ -1,61 +0,0 @@ -import { BuilderNode } from "@kit.ArkUI" -// 导入混编实现的声明式UI构建函数 -import { buildView } from "./builder.ets" - - -/** - * 颜色转换,仅支持#开头的格式 - * uni-app x 蒸汽模式8位时格式为 #RRGGBBAA - * 鸿蒙平台需要的是 #AARRGGBB - */ -class ColorUtils { - static fromUniColor(color: string): string | null { - if(color.startsWith("#")){ - const len = color.length - if(len >= 9){ - let rgb = color.substring(1, 7) - let a = color.substring(7, 9) - return `#${a}${rgb}` - } - return color; - } - return null - } -} - -// Harmony 侧直接传递颜色字符串,避免依赖当前 SDK 未导出的颜色类型。 -type NativeViewOptions = { - backgroundColor: string -} - -export class TestNativeView { - private $element : UniNativeViewElement; - private builder : BuilderNode<[NativeViewOptions]> | null = null - // 初始化 buildButton 默认参数 - private params : NativeViewOptions = { - backgroundColor: '#FFFFFF' - } - - constructor(element : UniNativeViewElement) { - // 绑定 wrapBuilder 函数 - this.builder = element.bindHarmonyWrappedBuilder(wrapBuilder<[NativeViewOptions]>(buildView), this.params) - this.$element = element - // 绑定当前实例为自定义的controller,方便其他地方通过 element 获取使用 - this.$element.bindHarmonyController(this) - } - - /** - * 更新背景颜色 - * 仅支持#RRGGBB格式颜色字符串 - */ - updateBackground(color : string) { - this.params.backgroundColor = UTSHarmony.colorWithString(color) - this.builder?.update(this.params) - } - - /** - * 用于拉齐差异,鸿蒙平台无需实现 - */ - destroy() { - } -} diff --git a/mpuniapp/uni_modules/test-native-view/utssdk/app-ios/config.json b/mpuniapp/uni_modules/test-native-view/utssdk/app-ios/config.json deleted file mode 100644 index 3312828..0000000 --- a/mpuniapp/uni_modules/test-native-view/utssdk/app-ios/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deploymentTarget": "12" -} diff --git a/mpuniapp/uni_modules/test-native-view/utssdk/app-ios/index.uts b/mpuniapp/uni_modules/test-native-view/utssdk/app-ios/index.uts deleted file mode 100644 index d09db23..0000000 --- a/mpuniapp/uni_modules/test-native-view/utssdk/app-ios/index.uts +++ /dev/null @@ -1,35 +0,0 @@ -import { UIView, UIColor } from "UIKit" -import { CGFloat } from 'CoreFoundation'; - - -export class TestNativeView { - $element : UniNativeViewElement; - view : UIView | null = null; - - constructor(element : UniNativeViewElement) { - this.$element = element; - super.init() - this.bindView(); - } - - bindView() { - // 构建原生view - this.view = new UIView() - this.view!.backgroundColor = UIColor.white - // 绑定原生view - this.$element.bindIOSView(this.view!) - } - - destroy() { - // 释放 UTS 实例对象,避免内存泄露 - UTSiOS.destroyInstance(this) - } - - /** - * 更新背景颜色 - * 仅支持#RRGGBB格式颜色字符串 - */ - updateBackground(color : string) { - this.view!.backgroundColor = UTSiOS.colorWithString(color) - } -} diff --git a/mpuniapp/uni_modules/uni-badge-view/changelog.md b/mpuniapp/uni_modules/uni-badge-view/changelog.md deleted file mode 100644 index ed5163c..0000000 --- a/mpuniapp/uni_modules/uni-badge-view/changelog.md +++ /dev/null @@ -1,6 +0,0 @@ -## 1.0.2(2026-05-18) -- 修复类名拼写错误 -## 1.0.1(2026-04-30) -- 更新文档 -## 1.0.0(2026-04-30) -- 支持 uni-badge-view 组件 diff --git a/mpuniapp/uni_modules/uni-badge-view/components/uni-badge-view/uni-badge-view.uvue b/mpuniapp/uni_modules/uni-badge-view/components/uni-badge-view/uni-badge-view.uvue deleted file mode 100644 index f23db8d..0000000 --- a/mpuniapp/uni_modules/uni-badge-view/components/uni-badge-view/uni-badge-view.uvue +++ /dev/null @@ -1,267 +0,0 @@ - - - - - \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-badge-view/package.json b/mpuniapp/uni_modules/uni-badge-view/package.json deleted file mode 100644 index 30b9a64..0000000 --- a/mpuniapp/uni_modules/uni-badge-view/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "id": "uni-badge-view", - "displayName": "uni-badge-view 数字角标", - "version": "1.0.2", - "description": "数字角标(徽章)组件,在元素周围展示消息提醒,一般用于列表、九宫格、按钮等地方。", - "isExt": true, - "extUrl": "https://ext.dcloud.net.cn/plugin?id=27844", - "keywords": [ - "badge", - "uni-ui", - "uniui", - "数字角标", - "徽章" -], - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "engines": { - "HBuilderX": "^5.08", - "uni-app-x": "^5.08", - "uni-app": "" - }, - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "type": "component-vue", - "darkmode": "√", - "i18n": "√", - "widescreen": "√", - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "client": { - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": "√", - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - }, - "cloud": { - "tcb": "x", - "aliyun": "x", - "alipay": "x" - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-badge-view/readme.md b/mpuniapp/uni_modules/uni-badge-view/readme.md deleted file mode 100644 index 3922376..0000000 --- a/mpuniapp/uni_modules/uni-badge-view/readme.md +++ /dev/null @@ -1,34 +0,0 @@ -badge角标,可以用于显示红点、被红圈或其他颜色圈包裹的数字、文字。提醒用户此时有需要注意的新信息。 - -### 文件路径 -项目下有一个 /pages/uni-ui/badge/badge.uvue 页面,里面演示了badge组件的各种用法。 - -### 设计 -#### badge组件有多种用法: -1. 独立显示 - 如果没有slot内容,视为要显示独立的红点和数字,此时不是角标,就是普通的红点和圆背景数字。 - 在按钮或列表项的右侧,独立显示数字。也可以显示红点,但这种场景数字更多一些。 - -2. 作为一个容器组件,包含一个slot,在包裹内容的右上角显示一个角标view。 - badge组件包裹一个目标view时,badge组件内部的角标view的中心点位于目标view的右上角顶点。 - 此时角标view是通过transform位移到右上角的,实际内容已经超出了容器本身。 - 所以需要注意容器的父级的设置,留出超出容器的尺寸(即top和right边距需要留出角标view的高度和宽度的一半),避免被父级裁剪。 - -#### badge的text属性的用法: -在badge作为容器组件时,text属性的不同设置,可以代表不同的效果。具体见属性章节。 - -#### 样式自定义 -badge组件的badge-class和badge-style属性,直接作用在角标view上,可以修改角标view的样式。 - -角标view本质是一个text组件,可以覆盖前景、背景、位置等各种样式。 - -#### badge组件有如下属性: -- text - 类型为 string|null - * 值为"0"时,不显示角标;所以永远不会显示一个为0的角标。此时直接显示slot子内容,不包裹外层,减少层级,提高性能; - * 值为null或""时,代表一个长宽为8px的红色圆点; - * 否则显示为该文字内容的圆角红底圈套文字。 -- badge-class - 直接作用于角标view的class -- badge-style - 直接作用于角标view的style diff --git a/mpuniapp/uni_modules/uni-chooseLocation-plugin/package.json b/mpuniapp/uni_modules/uni-chooseLocation-plugin/package.json deleted file mode 100644 index 4f5a2ca..0000000 --- a/mpuniapp/uni_modules/uni-chooseLocation-plugin/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "id": "uni-chooseLocation-plugin", - "displayName": "uni-chooseLocation-plugin", - "version": "1.0.0", - "description": "uni-chooseLocation-plugin", - "keywords": [ - "uni-chooseLocation-plugin" - ], - "repository": "", - "engines": { - "HBuilderX": "^3.6.8" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "", - "data": "", - "permissions": "" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [ - "uni-chooseLocation" - ], - "uni-ext-api": { - "uni": { - "chooseLocationPlugin": { - "name": "chooseLocationPlugin", - "app": { - "js": false, - "kotlin": false, - "swift": true, - "arkts": false - } - } - } - }, - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "u", - "aliyun": "u" - }, - "client": { - "Vue": { - "vue2": "u", - "vue3": "u" - }, - "App": { - "app-android": "u", - "app-ios": "u" - }, - "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" - }, - "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" - }, - "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-chooseLocation-plugin/readme.md b/mpuniapp/uni_modules/uni-chooseLocation-plugin/readme.md deleted file mode 100644 index 7c7ed82..0000000 --- a/mpuniapp/uni_modules/uni-chooseLocation-plugin/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -# uni-actionSheet -### 开发文档 -[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html) -[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html) -[UTS 组件插件](https://uniapp.dcloud.net.cn/plugin/uts-component.html) -[Hello UTS](https://gitcode.net/dcloud/hello-uts) \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-chooseLocation-plugin/utssdk/app-ios/index.uts b/mpuniapp/uni_modules/uni-chooseLocation-plugin/utssdk/app-ios/index.uts deleted file mode 100644 index f2ad755..0000000 --- a/mpuniapp/uni_modules/uni-chooseLocation-plugin/utssdk/app-ios/index.uts +++ /dev/null @@ -1,16 +0,0 @@ -export const chooseLocationPlugin = () => { - uni.chooseLocation({ - latitude: 39.951372, - longitude: 116.39747, - keyword: '公园', - success(res){ - console.log('chooseLocation in plugin complete success', res); - }, - fail(err){ - console.log('chooseLocation in plugin complete fail', err); - }, - complete(res){ - console.log('chooseLocation in plugin complete res', res); - } - }) -}; diff --git a/mpuniapp/uni_modules/uni-collapse-x/changelog.md b/mpuniapp/uni_modules/uni-collapse-x/changelog.md deleted file mode 100644 index c1ffe2d..0000000 --- a/mpuniapp/uni_modules/uni-collapse-x/changelog.md +++ /dev/null @@ -1,4 +0,0 @@ -## 1.0.1(2026-05-14) -- 支持 content-wrap-class 定义内层容器样式 -## 1.0.0(2026-05-07) -- 支持 uni-collapse 组件 diff --git a/mpuniapp/uni_modules/uni-collapse-x/components/common.uts b/mpuniapp/uni_modules/uni-collapse-x/components/common.uts deleted file mode 100644 index deec9a1..0000000 --- a/mpuniapp/uni_modules/uni-collapse-x/components/common.uts +++ /dev/null @@ -1,3 +0,0 @@ -export const UNI_COLLAPSE_REGISTER_CHILD = 'uni-collapse-register-child' -export const UNI_COLLAPSE_UNREGISTER_CHILD = 'uni-collapse-unregister-child' -export const UNI_COLLAPSE_CHILD_TOGGLE = 'uni-collapse-child-toggle' diff --git a/mpuniapp/uni_modules/uni-collapse-x/components/type.uts b/mpuniapp/uni_modules/uni-collapse-x/components/type.uts deleted file mode 100644 index 7e875c7..0000000 --- a/mpuniapp/uni_modules/uni-collapse-x/components/type.uts +++ /dev/null @@ -1,6 +0,0 @@ -export type ItemChildType = { - openCollapse?: (show: boolean) => void; - openOrClose: (show: boolean) => void; - is_open: Ref; - elId: string; -}; diff --git a/mpuniapp/uni_modules/uni-collapse-x/components/uni-collapse-item/uni-collapse-item.uvue b/mpuniapp/uni_modules/uni-collapse-x/components/uni-collapse-item/uni-collapse-item.uvue deleted file mode 100644 index 780a0fd..0000000 --- a/mpuniapp/uni_modules/uni-collapse-x/components/uni-collapse-item/uni-collapse-item.uvue +++ /dev/null @@ -1,691 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-collapse-x/components/uni-collapse/uni-collapse.uvue b/mpuniapp/uni_modules/uni-collapse-x/components/uni-collapse/uni-collapse.uvue deleted file mode 100644 index 7af387b..0000000 --- a/mpuniapp/uni_modules/uni-collapse-x/components/uni-collapse/uni-collapse.uvue +++ /dev/null @@ -1,121 +0,0 @@ - - - diff --git a/mpuniapp/uni_modules/uni-collapse-x/package.json b/mpuniapp/uni_modules/uni-collapse-x/package.json deleted file mode 100644 index 10f02f1..0000000 --- a/mpuniapp/uni_modules/uni-collapse-x/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "id": "uni-collapse-x", - "displayName": "uni-collapse 折叠面板", - "version": "1.0.1", - "description": "Collapse 折叠面板组件,可自定义折叠面板的展开和收起。", - "isExt": true, - "extUrl": "https://ext.dcloud.net.cn/plugin?id=27899", - "keywords": [ - "uni-ui", - "uniui", - "collapse", - "折叠面板", - "uni-app-x" -], - "engines": { - "HBuilderX": "", - "uni-app": "", - "uni-app-x": "^5.07" - }, - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "type": "component-vue", - "darkmode": "x", - "i18n": "x", - "widescreen": "x", - "npmurl": "" - }, - "uni_modules": { - "encrypt": [], - "dependencies": [], - "platforms": { - "cloud": { - "tcb": "x", - "aliyun": "x", - "alipay": "x" - }, - "client": { - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": "√", - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-collapse-x/readme.md b/mpuniapp/uni_modules/uni-collapse-x/readme.md deleted file mode 100644 index a6702ed..0000000 --- a/mpuniapp/uni_modules/uni-collapse-x/readme.md +++ /dev/null @@ -1,96 +0,0 @@ -折叠面板组件,包含: - -- `uni-collapse`:父容器 -- `uni-collapse-item`:子面板 - -一个折叠面板组件可以包含若干uni-collapse-item。每个uni-collapse-item包括顶部标题栏和通过slot传入的内容区。 - -### 基本用法 - -```html - - - 内容 1 - - - 内容 2 - - -``` - -uni-collapse-item的标题栏的自定义: -- 标题栏容器可通过 `title-wrap-class` 自定义背景等容器样式。 -- 标题栏支持title属性,可通过title-class自定义文字样式。 -- 标题展开态可通过 `title-open-class` 自定义激活文字样式。组件默认使用透明度区分状态,便于外部继续覆盖文字颜色。 -- 标题禁用态可通过 `title-disabled-class` 自定义禁用文字样式。若同时存在展开态和禁用态,以禁用态为最终状态。 -- 内容外层容器可通过 `content-wrap-class` 自定义背景等容器样式。 -- 标题栏右边默认带有箭头,可通过arrow-class自定义箭头样式。该箭头为一个view包括2个直角边的边框,然后旋转而成。 -- 箭头展开态和禁用态可分别通过 `arrow-open-class`、`arrow-disabled-class` 覆盖。组件默认也使用透明度区分状态,便于外部继续覆盖箭头颜色。 -- 如果完全不想要默认包含的title和arrow,也可以传入一个名为title的具名插槽来替换。 - -### 具名插槽标题 - -```html - - - 自定义标题内容 - -``` - -### externalClass - -```html - - 内容区域 - -``` - -### Slots - -#### uni-collapse-item - -| 插槽名 | 说明 | 插槽参数 | -| --- | --- | --- | -| default | 面板内容 | - | -| title | 自定义标题区域 | `open: boolean`、`disabled: boolean` | - -### Events - -#### uni-collapse-item - -| 事件名 | 说明 | 回调参数 | -| --- | --- | --- | -| change | 面板展开状态变化时触发 | `open: boolean` | - -### Expose - -#### uni-collapse-item - -| 方法名 | 说明 | -| --- | --- | -| openCollapse(open: boolean) | 执行展开/收起,会遵循 `disabled` 和手风琴逻辑 | -| openOrClose(open: boolean) | 直接切换内容显示状态 | - -### 暗黑模式适配 - -建议通过组件 `class` 和 externalClass 组合传入暗色样式: - -- 用组件 `class` 统一控制根节点和内容区等外层视觉。 -- 用 `title-wrap-class`、`title-class`、`title-open-class`、`content-wrap-class`、`arrow-class`、`arrow-open-class` 等 externalClass 覆盖标题区、内容外层和箭头样式。 -- 默认展开态和禁用态主要通过透明度表达,减少颜色覆盖时的交叉冲突。 - -### 注意 -- 本组件在Android上需HBuilderX 5.09+。在低版本上箭头变颜色+旋转时,在Android上会消失 diff --git a/mpuniapp/uni_modules/uni-config-center/changelog.md b/mpuniapp/uni_modules/uni-config-center/changelog.md deleted file mode 100644 index 57dbcb5..0000000 --- a/mpuniapp/uni_modules/uni-config-center/changelog.md +++ /dev/null @@ -1,6 +0,0 @@ -## 0.0.3(2022-11-11) -- 修复 config 方法获取根节点为数组格式配置时错误的转化为了对象的Bug -## 0.0.2(2021-04-16) -- 修改插件package信息 -## 0.0.1(2021-03-15) -- 初始化项目 diff --git a/mpuniapp/uni_modules/uni-config-center/package.json b/mpuniapp/uni_modules/uni-config-center/package.json deleted file mode 100644 index bace866..0000000 --- a/mpuniapp/uni_modules/uni-config-center/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "id": "uni-config-center", - "displayName": "uni-config-center", - "version": "0.0.3", - "description": "uniCloud 配置中心", - "keywords": [ - "配置", - "配置中心" -], - "repository": "", - "engines": { - "HBuilderX": "^3.1.0" - }, -"dcloudext": { - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "npmurl": "", - "type": "unicloud-template-function" - }, - "directories": { - "example": "../../../scripts/dist" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "y", - "aliyun": "y" - }, - "client": { - "App": { - "app-vue": "u", - "app-nvue": "u" - }, - "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" - }, - "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" - }, - "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - }, - "Vue": { - "vue2": "y", - "vue3": "u" - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-config-center/readme.md b/mpuniapp/uni_modules/uni-config-center/readme.md deleted file mode 100644 index 03f7fc2..0000000 --- a/mpuniapp/uni_modules/uni-config-center/readme.md +++ /dev/null @@ -1,93 +0,0 @@ -# 为什么使用uni-config-center - -实际开发中很多插件需要配置文件才可以正常运行,如果每个插件都单独进行配置的话就会产生下面这样的目录结构 - -```bash -cloudfunctions -└─────common 公共模块 - ├─plugin-a // 插件A对应的目录 - │ ├─index.js - │ ├─config.json // plugin-a对应的配置文件 - │ └─other-file.cert // plugin-a依赖的其他文件 - └─plugin-b // plugin-b对应的目录 - ├─index.js - └─config.json // plugin-b对应的配置文件 -``` - -假设插件作者要发布一个项目模板,里面使用了很多需要配置的插件,无论是作者发布还是用户使用都是一个大麻烦。 - -uni-config-center就是用了统一管理这些配置文件的,使用uni-config-center后的目录结构如下 - -```bash -cloudfunctions -└─────common 公共模块 - ├─plugin-a // 插件A对应的目录 - │ └─index.js - ├─plugin-b // plugin-b对应的目录 - │ └─index.js - └─uni-config-center - ├─index.js // config-center入口文件 - ├─plugin-a - │ ├─config.json // plugin-a对应的配置文件 - │ └─other-file.cert // plugin-a依赖的其他文件 - └─plugin-b - └─config.json // plugin-b对应的配置文件 -``` - -使用uni-config-center后的优势 - -- 配置文件统一管理,分离插件主体和配置信息,更新插件更方便 -- 支持对config.json设置schema,插件使用者在HBuilderX内编写config.json文件时会有更好的提示(后续HBuilderX会提供支持) - -# 用法 - -在要使用uni-config-center的公共模块或云函数内引入uni-config-center依赖,请参考:[使用公共模块](https://uniapp.dcloud.net.cn/uniCloud/cf-common) - -```js -const createConfig = require('uni-config-center') - -const uniIdConfig = createConfig({ - pluginId: 'uni-id', // 插件id - defaultConfig: { // 默认配置 - tokenExpiresIn: 7200, - tokenExpiresThreshold: 600, - }, - customMerge: function(defaultConfig, userConfig) { // 自定义默认配置和用户配置的合并规则,不设置的情况侠会对默认配置和用户配置进行深度合并 - // defaudltConfig 默认配置 - // userConfig 用户配置 - return Object.assign(defaultConfig, userConfig) - } -}) - - -// 以如下配置为例 -// { -// "tokenExpiresIn": 7200, -// "passwordErrorLimit": 6, -// "bindTokenToDevice": false, -// "passwordErrorRetryTime": 3600, -// "app-plus": { -// "tokenExpiresIn": 2592000 -// }, -// "service": { -// "sms": { -// "codeExpiresIn": 300 -// } -// } -// } - -// 获取配置 -uniIdConfig.config() // 获取全部配置,注意:uni-config-center内不存在对应插件目录时会返回空对象 -uniIdConfig.config('tokenExpiresIn') // 指定键值获取配置,返回:7200 -uniIdConfig.config('service.sms.codeExpiresIn') // 指定键值获取配置,返回:300 -uniIdConfig.config('tokenExpiresThreshold', 600) // 指定键值获取配置,如果不存在则取传入的默认值,返回:600 - -// 获取文件绝对路径 -uniIdConfig.resolve('custom-token.js') // 获取uni-config-center/uni-id/custom-token.js文件的路径 - -// 引用文件(require) -uniIDConfig.requireFile('custom-token.js') // 使用require方式引用uni-config-center/uni-id/custom-token.js文件。文件不存在时返回undefined,文件内有其他错误导致require失败时会抛出错误。 - -// 判断是否包含某文件 -uniIDConfig.hasFile('custom-token.js') // 配置目录是否包含某文件,true: 文件存在,false: 文件不存在 -``` \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/index.js b/mpuniapp/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/index.js deleted file mode 100644 index 00ba62f..0000000 --- a/mpuniapp/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var t=require("fs"),r=require("path");function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),o=e(r),i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var u=function(t){var r={exports:{}};return t(r,r.exports),r.exports}((function(t,r){var e="__lodash_hash_undefined__",n=9007199254740991,o="[object Arguments]",u="[object Function]",c="[object Object]",a=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s[o]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s[u]=s["[object Map]"]=s["[object Number]"]=s[c]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var l="object"==typeof i&&i&&i.Object===Object&&i,h="object"==typeof self&&self&&self.Object===Object&&self,p=l||h||Function("return this")(),_=r&&!r.nodeType&&r,v=_&&t&&!t.nodeType&&t,d=v&&v.exports===_,y=d&&l.process,g=function(){try{var t=v&&v.require&&v.require("util").types;return t||y&&y.binding&&y.binding("util")}catch(t){}}(),b=g&&g.isTypedArray;function j(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}var w,O,m,A=Array.prototype,z=Function.prototype,M=Object.prototype,x=p["__core-js_shared__"],C=z.toString,F=M.hasOwnProperty,U=(w=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",S=M.toString,I=C.call(Object),P=RegExp("^"+C.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=d?p.Buffer:void 0,q=p.Symbol,E=p.Uint8Array,$=T?T.allocUnsafe:void 0,D=(O=Object.getPrototypeOf,m=Object,function(t){return O(m(t))}),k=Object.create,B=M.propertyIsEnumerable,N=A.splice,L=q?q.toStringTag:void 0,R=function(){try{var t=vt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),G=T?T.isBuffer:void 0,V=Math.max,W=Date.now,H=vt(p,"Map"),J=vt(Object,"create"),K=function(){function t(){}return function(r){if(!xt(r))return{};if(k)return k(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}();function Q(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r-1},X.prototype.set=function(t,r){var e=this.__data__,n=nt(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(H||X),string:new Q}},Y.prototype.delete=function(t){var r=_t(this,t).delete(t);return this.size-=r?1:0,r},Y.prototype.get=function(t){return _t(this,t).get(t)},Y.prototype.has=function(t){return _t(this,t).has(t)},Y.prototype.set=function(t,r){var e=_t(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this},Z.prototype.clear=function(){this.__data__=new X,this.size=0},Z.prototype.delete=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e},Z.prototype.get=function(t){return this.__data__.get(t)},Z.prototype.has=function(t){return this.__data__.has(t)},Z.prototype.set=function(t,r){var e=this.__data__;if(e instanceof X){var n=e.__data__;if(!H||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new Y(n)}return e.set(t,r),this.size=e.size,this};var it,ut=function(t,r,e){for(var n=-1,o=Object(t),i=e(t),u=i.length;u--;){var c=i[it?u:++n];if(!1===r(o[c],c,o))break}return t};function ct(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":L&&L in Object(t)?function(t){var r=F.call(t,L),e=t[L];try{t[L]=void 0;var n=!0}catch(t){}var o=S.call(t);n&&(r?t[L]=e:delete t[L]);return o}(t):function(t){return S.call(t)}(t)}function at(t){return Ct(t)&&ct(t)==o}function ft(t){return!(!xt(t)||function(t){return!!U&&U in t}(t))&&(zt(t)?P:a).test(function(t){if(null!=t){try{return C.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function st(t){if(!xt(t))return function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}(t);var r=yt(t),e=[];for(var n in t)("constructor"!=n||!r&&F.call(t,n))&&e.push(n);return e}function lt(t,r,e,n,o){t!==r&&ut(r,(function(i,u){if(o||(o=new Z),xt(i))!function(t,r,e,n,o,i,u){var a=gt(t,e),f=gt(r,e),s=u.get(f);if(s)return void rt(t,e,s);var l=i?i(a,f,e+"",t,r,u):void 0,h=void 0===l;if(h){var p=Ot(f),_=!p&&At(f),v=!p&&!_&&Ft(f);l=f,p||_||v?Ot(a)?l=a:Ct(j=a)&&mt(j)?l=function(t,r){var e=-1,n=t.length;r||(r=Array(n));for(;++e-1&&t%1==0&&t0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(pt);function jt(t,r){return t===r||t!=t&&r!=r}var wt=at(function(){return arguments}())?at:function(t){return Ct(t)&&F.call(t,"callee")&&!B.call(t,"callee")},Ot=Array.isArray;function mt(t){return null!=t&&Mt(t.length)&&!zt(t)}var At=G||function(){return!1};function zt(t){if(!xt(t))return!1;var r=ct(t);return r==u||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}function Mt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}function xt(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}function Ct(t){return null!=t&&"object"==typeof t}var Ft=b?function(t){return function(r){return t(r)}}(b):function(t){return Ct(t)&&Mt(t.length)&&!!s[ct(t)]};function Ut(t){return mt(t)?tt(t,!0):st(t)}var St,It=(St=function(t,r,e){lt(t,r,e)},ht((function(t,r){var e=-1,n=r.length,o=n>1?r[n-1]:void 0,i=n>2?r[2]:void 0;for(o=St.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,r,e){if(!xt(e))return!1;var n=typeof r;return!!("number"==n?mt(e)&&dt(r,e.length):"string"==n&&r in e)&&jt(e[r],t)}(r[0],r[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++ec.call(t,r);class f{constructor({pluginId:t,defaultConfig:r={},customMerge:e,root:n}){this.pluginId=t,this.defaultConfig=r,this.pluginConfigPath=o.default.resolve(n||__dirname,t),this.customMerge=e,this._config=void 0}resolve(t){return o.default.resolve(this.pluginConfigPath,t)}hasFile(t){return n.default.existsSync(this.resolve(t))}requireFile(t){try{return require(this.resolve(t))}catch(t){if("MODULE_NOT_FOUND"===t.code)return;throw t}}_getUserConfig(){return this.requireFile("config.json")}config(t,r){if(!this._config){const t=this._getUserConfig();this._config=Array.isArray(t)?t:(this.customMerge||u)(this.defaultConfig,t)}let e=this._config;return t?function(t,r,e){if("number"==typeof r)return t[r];if("symbol"==typeof r)return a(t,r)?t[r]:e;const n="string"!=typeof(o=r)?o:o.split(".").reduce(((t,r)=>(r.split(/\[([^}]+)\]/g).forEach((r=>r&&t.push(r))),t)),[]);var o;let i=t;for(let t=0;t - - - - - - - - - - - - - - - - - - {{ deleteBarText }} - - - - - - - - - - - - - - - - - - - - - - diff --git a/mpuniapp/uni_modules/uni-drag-cell/package.json b/mpuniapp/uni_modules/uni-drag-cell/package.json deleted file mode 100644 index f15d1cd..0000000 --- a/mpuniapp/uni_modules/uni-drag-cell/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "id": "uni-drag-cell", - "displayName": "uni-drag-cell", - "version": "1.0.0", - "description": "可拖拽排序组件", - "isExt": true, - "extUrl": "https://ext.dcloud.net.cn/plugin?id=27845", - "keywords": [ - "uni-drag-cell", - "uni-app-x", - "uni-app x", - "组件" - ], - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "engines": { - "HBuilderX": "^5.08", - "uni-app-x": "^5.08", - "uni-app": "" - }, - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "type": "component-vue", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "darkmode": "x", - "i18n": "x", - "widescreen": "x", - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "x", - "aliyun": "x", - "alipay": "x" - }, - "client": { - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": "√", - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-drag-cell/readme.md b/mpuniapp/uni_modules/uni-drag-cell/readme.md deleted file mode 100644 index 919faaa..0000000 --- a/mpuniapp/uni_modules/uni-drag-cell/readme.md +++ /dev/null @@ -1,331 +0,0 @@ -`uni-drag-cell` 是一个基于 `uni-app x + uvue + UTS` 实现的可拖拽排序组件。 - -它适合这些场景: -- 标签排序 -- 宫格排序 -- 单列列表排序 -- 带删除能力的拖拽 -- 尾部追加“+”入口 -- 手柄拖拽排序 -- 九宫格图片选择和排序 -- 支付方式排序 - -组件通过 v-model 绑定了一个数组,通过插槽渲染绑定数组的内容,通过拖拽调整数组项的顺序。 - -组件还提供了show-close属性,显示底部删除条,拖到删除条即可删除。 - -组件还提供了show-append属性,显示尾部的添加插槽。该插槽不参与拖拽排序,始终在最后一个。(添加数组项的逻辑需自行实现) - -通过这些能力,本组件具备对数组数据排序、添加、删除的能力。 - -但本组件不适合超长虚拟列表。不具备拖动到顶部或底部后自动滚动列表的功能。 - -### 设计目标 - -这个组件的设计不是“拖一下就立刻改数组”,而是分成两个阶段: - -1. **拖拽预览阶段** - - 拖动过程中,通过 `transform` 动态调整视觉顺序 - - 其他 item 会根据碰撞结果做位移动画 - - 此时外部 `v-model` 还不会被正式改写 - -2. **拖拽提交阶段** - - 松手后,才正式修改内部数组顺序 - - 然后通过 `update:modelValue` 和 `change` 把最终结果抛给外部 - -这样做的好处是: -- 拖动过程更平滑 -- 外部响应式更新次数更少 -- 更容易支持删除条、追加入口、手柄拖拽等扩展能力 - -### 交互模式 - -组件目前支持两种进入拖拽态的方式:长按拖拽和手柄拖拽。 - -#### 1. 长按拖拽 - -默认模式。 - -- 长按某个 item 后进入拖拽态 -- 当前长按触发时间为 `350ms` -- 进入拖拽态后,item 会跟随手指/鼠标移动,并且会scale放大1.12倍。 -- 拖动过程中持续做碰撞检测,并实时预览排序结果 - -补充: -- 如果按下后移动距离超过组件内部阈值,会取消本次长按判定,避免页面滚动时误触发拖拽 - -适合: -- 标签排序 -- 宫格排序 -- 图片排序 - -#### 2. 手柄拖拽 - -当 `handleMode` 为 `true`,且同时提供 `handle` 插槽时,会启用手柄模式。 - -- 不再需要长按 -- 只有拖动手柄才会开始排序 -- 内容区本身可以继续点击、滚动、预览 - -适合: -- 设置项排序 -- 表单项排序 -- 内容区本身还有点击行为的列表 - -### 插槽 - -| 插槽名 | 插槽参数 | 说明 | -| --- | --- | --- | -| `default` | `{ item, index }` | 默认内容插槽,用于渲染每一个可排序项。组件不限制 item 的视觉形式,可以自由渲染标签、卡片、宫格、图片等内容。 | -| `append` | - | 列表末尾的固定入口。不参与拖拽排序,不会写入 `v-model`,不会被删除,适合放“新增按钮”“上传入口”“更多入口”等内容。 | -| `handle` | `{ item, index }` | 拖拽手柄插槽,仅在 `handleMode` 开启时生效。手柄由组件放在每个 item 的右上角,建议给内容区预留右侧空间,避免手柄遮挡正文。 | - -### 事件 - -| 事件名 | 回调参数 | 触发时机 | 说明 | -| --- | --- | --- | --- | -| `change` | 最新数组 | 排序完成后、删除完成后 | 最终结果事件。拖动中的视觉预览不会频繁触发 `change`。 | - -### 使用方式 - -#### 1. 基础标签排序 - -```vue - - - -``` - -适合: -- 标签拖拽 -- 轻量横向流式布局 - -说明: -- 默认使用长按触发拖拽 -- 当前长按触发时间为 `350ms` - -#### 2. 宫格排序 - -```vue - - - -``` - -适合: -- 应用图标 -- 功能入口宫格 -- 九宫格类布局 - -#### 3. 带删除条的拖拽 - -```vue - - - -``` - -交互: -- 长按进入拖拽 -- 拖到屏幕底部删除条 -- 删除条高亮后松手即删除 - -#### 4. 尾部追加一个固定入口 - -```vue - - - - -``` - -说明: -- `append` 是通用设计,不局限于图片场景 -- 拖拽排序时,`append` 不参与位置计算 - -#### 5. 九宫格图片选择 - -```vue - - - - -``` - -设计说明: -- 图片数组本身就是 `v-model` -- `append` 用来放“添加图片”入口 -- 当达到上限时,把 `showAppend` 设为 `false` - -#### 6. 手柄拖拽排序 - -```vue - - - - -``` - -说明: -- 手柄模式下,不需要长按 -- 当前实现中,手柄模式不会再把整个 item 放大 -- 这样可以避免单列场景下被父容器裁剪 - -### 组件内部设计说明 - -#### 1. 排序预览不是直接改数组 - -拖动过程中,组件内部维护的是“预览顺序”。 - -实现方式: -- 记录每个 item 的稳定 id -- 根据碰撞结果生成一份预览顺序 -- 通过 `transform` 让其他项移动到目标位置 -- 松手后再正式更新数组和 id 顺序 - -这样可以避免: -- 拖动中频繁改外部数组 -- 频繁触发父组件重渲染 -- item 身份丢失导致动画错乱 - -#### 2. 删除判定基于拖动内容区域 - -删除命中不是简单按手指坐标判断,而是优先按“拖动内容的真实边界”和“删除条边界”是否接触来判断。 - -这样做是为了避免: -- item 外层有 padding 时提前触发删除 -- 不同高度 item 在删除区表现不一致 -- web 与 app 坐标系不一致时出现明显偏移 - -#### 3. 追加项与删除条互不干扰 - -`append` 项的设计目标是“固定入口”,因此: -- 不参与碰撞排序 -- 不参与删除 -- 不写入绑定数组 - -#### 4. 手柄模式与长按模式共用同一套拖拽链路 - -也就是说: -- 排序逻辑相同 -- 删除逻辑相同 -- 只是“进入拖拽态”的入口不同 - -这样可以减少两套逻辑分叉导致的维护成本。 - -### 性能注意 - -拖拽时耗费性能的点主要有两个: - -#### 1. 拖动中的碰撞检测 - -每次 move 都会更新: -- 当前拖动偏移 -- 删除条命中状态 -- 目标悬停位置 - -这是拖拽组件的必要开销,当前实现已经把重测布局的频率控制在较低水平,只在必要时重新测量。 - -#### 2. 删除条命中时的实时矩形读取 - -当启用 `showClose` 时,拖动中会优先读取当前拖动内容的实时矩形,以保证删除命中准确。 - -这部分是“精度优先”的设计,开销可接受,但不建议把它用于超大数量、超复杂 item 的高频拖拽场景。 - -### 使用注意事项 - -#### 1. 建议 item 尺寸稳定 - -尤其是宫格模式下,建议每个 item 的宽高尽量稳定。 - -否则可能带来: -- 拖动命中感不一致 -- 排序预览观感不稳定 - -#### 2. 手柄模式下给内容区预留右侧空间 - -因为手柄是覆盖在 item 右上角的。 - -建议: -- 内容区右侧留白 -- 或者把手柄区域设计成视觉上独立的一块 - -#### 3. `append` 只是入口,不是数据项 - -这点非常重要。 - -不要指望: -- `append` 参与排序 -- `append` 进入 `v-model` -- `append` 被删除 - -如果你需要“真正的数据项”,请直接写进 `modelValue`。 - -#### 4. 外部不要在拖拽过程中频繁整体替换列表 - -建议: -- 由组件在松手后统一回传结果 -- 父组件收到结果后再更新自己的数据源 - -不建议: -- 拖动过程中再由父组件持续重建整个数组 - -#### 5. 不建议用于超大列表或虚拟列表场景 - -这个组件当前更适合: -- 小中型标签列表 -- 宫格 -- 表单排序 -- 九宫格图片选择 - -如果是超长列表、虚拟滚动列表,应该使用专门为大数据量设计的方案。 - -### 平台说明 - -#### Web - -- 支持 pointer / touch 交互 - -#### Android - -- 支持触摸拖拽 diff --git a/mpuniapp/uni_modules/uni-fab-button/components/uni-fab-button/uni-fab-button.uvue b/mpuniapp/uni_modules/uni-fab-button/components/uni-fab-button/uni-fab-button.uvue deleted file mode 100644 index 2fdef61..0000000 --- a/mpuniapp/uni_modules/uni-fab-button/components/uni-fab-button/uni-fab-button.uvue +++ /dev/null @@ -1,140 +0,0 @@ - - - diff --git a/mpuniapp/uni_modules/uni-fab-button/package.json b/mpuniapp/uni_modules/uni-fab-button/package.json deleted file mode 100644 index a4b1644..0000000 --- a/mpuniapp/uni_modules/uni-fab-button/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "id": "uni-fab-button", - "displayName": "uni-fab-button", - "version": "1.0.0", - "description": "uni-fab-button", - "isExt": true, - "extUrl": "https://ext.dcloud.net.cn/plugin?id=27846", - "keywords": [ - "uni-fab-button", - "uni-app-x", - "ui", - "组件" - ], - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "engines": { - "HBuilderX": "^5.07", - "uni-app-x": "^5.07", - "uni-app": "" - }, - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "type": "component-vue", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "darkmode": "x", - "i18n": "x", - "widescreen": "x", - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "x", - "aliyun": "x", - "alipay": "x" - }, - "client": { - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": "√", - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-fab-button/readme.md b/mpuniapp/uni_modules/uni-fab-button/readme.md deleted file mode 100644 index e87bdee..0000000 --- a/mpuniapp/uni_modules/uni-fab-button/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -悬浮加号按钮 - -本组件常用于页面中右下角悬浮的、里面有一个加号的圆形按钮。 - -组件的根view默认是一个圆形,蓝色背景(#007AFF),并带有阴影。使用组件时注意组件的父容器要留出阴影的空间,避免被裁剪。 - -组件的二级view是2个view交叉组成的加号。其中垂直的view是通过transform变换方向实现的。 - -组件的属性为 plus-class,它是一个externalClass,用于外部修改组件内部的、组成加号的2个view的样式。 - -组件中加号的默认样式为背景白色、粗细为2px、尺寸为40%。 - -### 注意 -- 鸿蒙平台按下fab-button不缩写的问题,需升级到HBuilderX 5.09+解决 diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/changelog.md b/mpuniapp/uni_modules/uni-getbatteryinfo/changelog.md deleted file mode 100644 index 51341e4..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/changelog.md +++ /dev/null @@ -1,16 +0,0 @@ -## 1.3.2(2024-10-14) -- 新增 支持 HarmonyOS Next 调用 -## 1.3.1(2023-09-15) -app端适配使用UniError - -## 1.3.0(2023-05-30) -新增 同步获取电量api - -## 1.2.0(2022-10-17) -实现百度小程序/支付宝小程序/QQ小程序获取电量 - -## 1.1.0(2022-10-17) -实现ios平台获取电量 - -## 1.0.0(2022-09-01) -实现android/web/微信小程序平台获取电量 diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/package.json b/mpuniapp/uni_modules/uni-getbatteryinfo/package.json deleted file mode 100644 index 4057e16..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "id": "uni-getbatteryinfo", - "displayName": "uni-getbatteryinfo", - "version": "1.3.2", - "description": "使用uts开发,实现在多个平台获取电池电量功能", - "keywords": [ - "battery" -], - "repository": "", - "engines": { - "HBuilderX": "^3.9.0" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "插件不采集任何数据", - "permissions": "无" - }, - "npmurl": "" - }, - "uni_modules": { - "uni-ext-api": { - "uni": { - "getBatteryInfo": "getBatteryInfo", - "getBatteryInfoSync": { - "web": false - } - } - }, - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "y", - "aliyun": "y", - "alipay": "n" - }, - "client": { - "Vue": { - "vue2": "n", - "vue3": "y" - }, - "App": { - "app-android": { - "minVersion": "21" - }, - "app-ios": { - "minVersion": "9" - } - }, - "H5-mobile": { - "Safari": "y", - "Android Browser": "y", - "微信浏览器(Android)": "y", - "QQ浏览器(Android)": "y" - }, - "H5-pc": { - "Chrome": "y", - "IE": "y", - "Edge": "y", - "Firefox": "y", - "Safari": "y" - }, - "小程序": { - "微信": "y", - "阿里": "y", - "百度": "y", - "字节跳动": "u", - "QQ": "y", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/readme.md b/mpuniapp/uni_modules/uni-getbatteryinfo/readme.md deleted file mode 100644 index 0609fee..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/readme.md +++ /dev/null @@ -1,38 +0,0 @@ -# uni-getbatteryinfo - -## 使用文档 - -```ts - // 获取电量信息 -uni.getBatteryInfo({ - success(res) { - console.log(res); - uni.showToast({ - title: "当前电量:" + res.level + '%', - icon: 'none' - }); - } -}) -``` - - - -### 参数 - -Object object - -|属性|类型|必填|说明| -|----|---|----|----| -|success|function|否|接口调用成功的回调函数| -|fail|function|否|接口调用失败的回调函数| -|complete|function|否|接口调用结束的回调函数(调用成功、失败都会执行)| - - - -object.success 回调函数 - - -|属性|类型|说明| -|----|---|----| -|level|number|设备电量,范围 1 - 100| -|isCharging|boolean|是否正在充电中| diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-android/config.json b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-android/config.json deleted file mode 100644 index bf95925..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-android/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "minSdkVersion": "21" -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-android/index.uts b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-android/index.uts deleted file mode 100644 index 8343697..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-android/index.uts +++ /dev/null @@ -1,76 +0,0 @@ -import Context from "android.content.Context"; -import BatteryManager from "android.os.BatteryManager"; - -import { GetBatteryInfo, GetBatteryInfoOptions, GetBatteryInfoSuccess, GetBatteryInfoResult, GetBatteryInfoSync } from '../interface.uts' -import IntentFilter from 'android.content.IntentFilter'; -import Intent from 'android.content.Intent'; - -import { GetBatteryInfoFailImpl } from '../unierror'; - -/** - * 异步获取电量 - */ -export const getBatteryInfo : GetBatteryInfo = function (options : GetBatteryInfoOptions) { - const context = UTSAndroid.getAppContext(); - if (context != null) { - const manager = context.getSystemService( - Context.BATTERY_SERVICE - ) as BatteryManager; - const level = manager.getIntProperty( - BatteryManager.BATTERY_PROPERTY_CAPACITY - ); - - let ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); - let batteryStatus = context.registerReceiver(null, ifilter); - let status = batteryStatus?.getIntExtra(BatteryManager.EXTRA_STATUS, -1); - let isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING || status == BatteryManager.BATTERY_STATUS_FULL; - - const res : GetBatteryInfoSuccess = { - errMsg: 'getBatteryInfo:ok', - level, - isCharging: isCharging - } - options.success?.(res) - options.complete?.(res) - } else { - let res = new GetBatteryInfoFailImpl(1001); - options.fail?.(res) - options.complete?.(res) - } -} - -/** - * 同步获取电量 - */ -export const getBatteryInfoSync : GetBatteryInfoSync = function () : GetBatteryInfoResult { - const context = UTSAndroid.getAppContext(); - if (context != null) { - const manager = context.getSystemService( - Context.BATTERY_SERVICE - ) as BatteryManager; - const level = manager.getIntProperty( - BatteryManager.BATTERY_PROPERTY_CAPACITY - ); - - let ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); - let batteryStatus = context.registerReceiver(null, ifilter); - let status = batteryStatus?.getIntExtra(BatteryManager.EXTRA_STATUS, -1); - let isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING || status == BatteryManager.BATTERY_STATUS_FULL; - - const res : GetBatteryInfoResult = { - level: level, - isCharging: isCharging - }; - return res; - } - else { - /** - * 无有效上下文 - */ - const res : GetBatteryInfoResult = { - level: -1, - isCharging: false - }; - return res; - } -} diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-harmony/index.uts b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-harmony/index.uts deleted file mode 100644 index efe6fde..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-harmony/index.uts +++ /dev/null @@ -1,27 +0,0 @@ -import batteryInfo from '@ohos.batteryInfo'; -import { GetBatteryInfo, GetBatteryInfoOptions, GetBatteryInfoSuccess, GetBatteryInfoResult, GetBatteryInfoSync } from '../interface.uts'; - -export const getBatteryInfoSync : GetBatteryInfoSync = function () : GetBatteryInfoResult { - return { - level: batteryInfo.batterySOC, - isCharging: batteryInfo.chargingStatus === batteryInfo.BatteryChargeState.ENABLE || batteryInfo.chargingStatus === batteryInfo.BatteryChargeState.FULL, - }; -} - -export const getBatteryInfo : GetBatteryInfo = function (options : GetBatteryInfoOptions) { - const batteryInfoResult : GetBatteryInfoSuccess = { - errMsg: "getBatteryInfo:ok", - level: batteryInfo.batterySOC, - isCharging: batteryInfo.chargingStatus === batteryInfo.BatteryChargeState.ENABLE || batteryInfo.chargingStatus === batteryInfo.BatteryChargeState.FULL, - } - try { - options.success && options.success(batteryInfoResult) - } catch (e) { - console.error(e) - } - try { - options.complete && options.complete(batteryInfoResult) - } catch (e) { - console.error(e) - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-ios/config.json b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-ios/config.json deleted file mode 100644 index 721b81e..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-ios/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deploymentTarget": "9" -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-ios/index.uts b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-ios/index.uts deleted file mode 100644 index 5f22d02..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/app-ios/index.uts +++ /dev/null @@ -1,34 +0,0 @@ -// 引用 iOS 原生平台 api -import { UIDevice } from "UIKit"; - -import { GetBatteryInfo, GetBatteryInfoSuccess, GetBatteryInfoResult, GetBatteryInfoSync } from '../interface.uts'; -/** - * 导出 获取电量方法 - */ -export const getBatteryInfo: GetBatteryInfo = function (options) { - - // 开启电量检测 - UIDevice.current.isBatteryMonitoringEnabled = true - - // 返回数据 - const res: GetBatteryInfoSuccess = { - errMsg: "getBatteryInfo:ok", - level: Number(UIDevice.current.batteryLevel * 100), - isCharging: UIDevice.current.batteryState == UIDevice.BatteryState.charging, - }; - options.success?.(res); - options.complete?.(res); -} - -export const getBatteryInfoSync: GetBatteryInfoSync = function (): GetBatteryInfoResult { - - // 开启电量检测 - UIDevice.current.isBatteryMonitoringEnabled = true - - // 返回数据 - const res: GetBatteryInfoResult = { - level: Number(UIDevice.current.batteryLevel * 100), - isCharging: UIDevice.current.batteryState == UIDevice.BatteryState.charging, - }; - return res; -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/index.d.ts b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/index.d.ts deleted file mode 100644 index aebd014..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/index.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -declare namespace UniNamespace { - interface GetBatteryInfoSuccessCallbackResult { - /** - * 是否正在充电中 - */ - isCharging: boolean; - /** - * 设备电量,范围 1 - 100 - */ - level: number; - errMsg: string; - } - - interface GetBatteryInfoOption { - /** - * 接口调用结束的回调函数(调用成功、失败都会执行) - */ - complete?: Function - /** - * 接口调用失败的回调函数 - */ - fail?: Function - /** - * 接口调用成功的回调函数 - */ - success?: (result: GetBatteryInfoSuccessCallbackResult) => void - } -} - -declare interface Uni { - /** - * 获取设备电量 - * - * @tutorial https://uniapp.dcloud.net.cn/api/system/batteryInfo.html - */ - getBatteryInfo(option?: UniNamespace.GetBatteryInfoOption): void; - - /** - * 同步获取电池电量信息 - * @tutorial https://uniapp.dcloud.net.cn/api/system/batteryInfo.html - */ - getBatteryInfoSync(): UniNamespace.GetBatteryInfoSuccessCallbackResult; -} diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/interface.uts b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/interface.uts deleted file mode 100644 index 4666140..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/interface.uts +++ /dev/null @@ -1,147 +0,0 @@ -export type GetBatteryInfoSuccess = { - errMsg: string, - /** - * 设备电量,范围1 - 100 - */ - level: number, - /** - * 是否正在充电中 - */ - isCharging: boolean -} - -export type GetBatteryInfoOptions = { - /** - * 接口调用结束的回调函数(调用成功、失败都会执行) - */ - success?: (res: GetBatteryInfoSuccess) => void - /** - * 接口调用失败的回调函数 - */ - fail?: (res: UniError) => void - /** - * 接口调用成功的回调 - */ - complete?: (res: any) => void -} - -export type GetBatteryInfoResult = { - /** - * 设备电量,范围1 - 100 - */ - level: number, - /** - * 是否正在充电中 - */ - isCharging: boolean -} - -/** - * 错误码 - * - 1001 getAppContext is null - */ -export type GetBatteryInfoErrorCode = 1001 | 1002; -/** - * GetBatteryInfo 的错误回调参数 - */ -export interface GetBatteryInfoFail extends IUniError { - errCode: GetBatteryInfoErrorCode -}; - -/** -* 获取电量信息 -* @param {GetBatteryInfoOptions} options -* -* -* @tutorial https://uniapp.dcloud.net.cn/api/system/batteryInfo.html -* @platforms APP-IOS = ^9.0,APP-ANDROID = ^22 -* @since 3.6.11 -* -* @assert () => success({errCode: 0, errSubject: "uni-getBatteryInfo", errMsg: "getBatteryInfo:ok", level: 60, isCharging: false }) -* @assert () => fail({errCode: 1001, errSubject: "uni-getBatteryInfo", errMsg: "getBatteryInfo:fail getAppContext is null" }) -*/ -export type GetBatteryInfo = (options: GetBatteryInfoOptions) => void - - -export type GetBatteryInfoSync = () => GetBatteryInfoResult - -interface Uni { - - /** - * 获取电池电量信息 - * - * @example - * ```typescript - * uni.getBatteryInfo({ - * success(res) { - * console.log(res); - * } - * }) - * ``` - * @remark - * - 该接口需要同步调用 - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "4.4.4", - * "uniVer": "3.6.11", - * "unixVer": "3.9.0" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "3.6.11", - * "unixVer": "4.11" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.23", - * "unixVer": "x" - * } - * }, - * "web": { - * "uniVer": "3.6.11", - * "unixVer": "4.0" - * } - * } - * @uniVueVersion 2,3 //支持的vue版本 - * - */ - getBatteryInfo(options: GetBatteryInfoOptions): void, - /** - * 同步获取电池电量信息 - * - * @example - * ```typescript - * uni.getBatteryInfo() - * ``` - * @remark - * - 该接口需要同步调用 - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "4.4.4", - * "uniVer": "3.6.11", - * "unixVer": "3.9.0" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "3.6.11", - * "unixVer": "4.11" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.23", - * "unixVer": "x" - * } - * }, - * "web": { - * "uniVer": "3.6.11", - * "unixVer": "4.0" - * } - * } - * @uniVueVersion 2,3 //支持的vue版本 - * - */ - getBatteryInfoSync(): GetBatteryInfoResult - -} diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/mp-alipay/index.js b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/mp-alipay/index.js deleted file mode 100644 index 473f1a0..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/mp-alipay/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export function getBatteryInfo(options) { - return my.getBatteryInfo(options) -} -export function getBatteryInfoSync(options) { - return my.getBatteryInfoSync(options) -} diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/mp-baidu/index.js b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/mp-baidu/index.js deleted file mode 100644 index 1ee373a..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/mp-baidu/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export function getBatteryInfo(options) { - return swan.getBatteryInfo(options) -} -export function getBatteryInfoSync(options) { - return swan.getBatteryInfoSync(options) -} diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/mp-qq/index.js b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/mp-qq/index.js deleted file mode 100644 index 6eabfcf..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/mp-qq/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export function getBatteryInfo(options) { - return qq.getBatteryInfo(options) -} -export function getBatteryInfoSync(options) { - return qq.getBatteryInfoSync(options) -} diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/mp-weixin/index.js b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/mp-weixin/index.js deleted file mode 100644 index 3bdfa91..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/mp-weixin/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export function getBatteryInfo(options) { - return wx.getBatteryInfo(options) -} -export function getBatteryInfoSync(options) { - return wx.getBatteryInfoSync(options) -} diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/unierror.uts b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/unierror.uts deleted file mode 100644 index 9268082..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/unierror.uts +++ /dev/null @@ -1,35 +0,0 @@ -import { GetBatteryInfoErrorCode, GetBatteryInfoFail } from "./interface.uts" -/** - * 错误主题 - */ -export const UniErrorSubject = 'uni-getBatteryInfo'; - - -/** - * 错误信息 - * @UniError - */ -export const UniErrors: Map = new Map([ - /** - * 错误码及对应的错误信息 - */ - [1001, 'getBatteryInfo:fail getAppContext is null'], - [1002, 'getBatteryInfo:fail not support'], -]); - - -/** - * 错误对象实现 - */ -export class GetBatteryInfoFailImpl extends UniError implements GetBatteryInfoFail { - override errCode: GetBatteryInfoErrorCode; - /** - * 错误对象构造函数 - */ - constructor(errCode: GetBatteryInfoErrorCode) { - super(); - this.errSubject = UniErrorSubject; - this.errCode = errCode; - this.errMsg = UniErrors[errCode] ?? ""; - } -} diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/web/index.js b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/web/index.js deleted file mode 100644 index 4049f50..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/web/index.js +++ /dev/null @@ -1,23 +0,0 @@ -export function getBatteryInfo(options) { - if (navigator.getBattery) { - navigator.getBattery().then(battery => { - const res = { - errCode: 0, - errSubject: "uni-getBatteryInfo", - errMsg: 'getBatteryInfo:ok', - level: battery.level * 100, - isCharging: battery.charging - } - options.success && options.success(res) - options.complete && options.complete(res) - }) - } else { - const res = { - errCode: 1002, - errSubject: "uni-getBatteryInfo", - errMsg: 'getBatteryInfo:fail navigator.getBattery is unsupported' - } - options.fail && options.fail(res) - options.complete && options.complete(res) - } -} diff --git a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/web/index.uts b/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/web/index.uts deleted file mode 100644 index d4cf4cf..0000000 --- a/mpuniapp/uni_modules/uni-getbatteryinfo/utssdk/web/index.uts +++ /dev/null @@ -1,20 +0,0 @@ -import { GetBatteryInfo, GetBatteryInfoOptions, GetBatteryInfoSuccess } from '../interface.uts' -export const getBatteryInfo: GetBatteryInfo = function (options: GetBatteryInfoOptions) { - if ((navigator as any).getBattery) { - (navigator as any).getBattery().then(battery => { - const res = { - errCode: 0, - errSubject: "uni-getBatteryInfo", - errMsg: 'getBatteryInfo:ok', - level: battery.level * 100, - isCharging: battery.charging - } as GetBatteryInfoSuccess - options.success && options.success(res) - options.complete && options.complete(res) - }) - } else { - const res = new UniError("uni-getBatteryInfo", 1002, "getBatteryInfo:fail navigator.getBattery is unsupported") - options.fail && options.fail(res) - options.complete && options.complete(res) - } -} diff --git a/mpuniapp/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue b/mpuniapp/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue deleted file mode 100644 index fc0f494..0000000 --- a/mpuniapp/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue +++ /dev/null @@ -1,91 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-icons/components/uni-icons/uni-icons.vue b/mpuniapp/uni_modules/uni-icons/components/uni-icons/uni-icons.vue deleted file mode 100644 index 7da5356..0000000 --- a/mpuniapp/uni_modules/uni-icons/components/uni-icons/uni-icons.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-id-common/changelog.md b/mpuniapp/uni_modules/uni-id-common/changelog.md deleted file mode 100644 index a8ee8f2..0000000 --- a/mpuniapp/uni_modules/uni-id-common/changelog.md +++ /dev/null @@ -1,32 +0,0 @@ -## 1.0.16(2023-04-25) -- 新增maxTokenLength配置,用于限制数据库用户记录token数组的最大长度 -## 1.0.15(2023-04-06) -- 修复部分语言国际化出错的Bug -## 1.0.14(2023-03-07) -- 修复 admin用户包含其他角色时未包含在token的Bug -## 1.0.13(2022-07-21) -- 修复 创建token时未传角色权限信息生成的token不正确的bug -## 1.0.12(2022-07-15) -- 提升与旧版本uni-id的兼容性(补充读取配置文件时回退平台app-plus、h5),但是仍推荐使用新平台名进行配置(app、web) -## 1.0.11(2022-07-14) -- 修复 部分情况下报`read property 'reduce' of undefined`的错误 -## 1.0.10(2022-07-11) -- 将token存储在用户表的token字段内,与旧版本uni-id保持一致 -## 1.0.9(2022-07-01) -- checkToken兼容token内未缓存角色权限的情况,此时将查库获取角色权限 -## 1.0.8(2022-07-01) -- 修复clientDB默认依赖时部分情况下获取不到uni-id配置的Bug -## 1.0.7(2022-06-30) -- 修复config文件不合法时未抛出具体错误的Bug -## 1.0.6(2022-06-28) -- 移除插件内的数据表schema -## 1.0.5(2022-06-27) -- 修复使用多应用配置时报`Cannot read property 'appId' of undefined`的Bug -## 1.0.4(2022-06-27) -- 修复使用自定义token内容功能报错的Bug [详情](https://ask.dcloud.net.cn/question/147945) -## 1.0.2(2022-06-23) -- 对齐旧版本uni-id默认配置 -## 1.0.1(2022-06-22) -- 补充对uni-config-center的依赖 -## 1.0.0(2022-06-21) -- 提供uni-id token创建、校验、刷新接口,简化旧版uni-id公共模块 diff --git a/mpuniapp/uni_modules/uni-id-common/package.json b/mpuniapp/uni_modules/uni-id-common/package.json deleted file mode 100644 index 0ac0de9..0000000 --- a/mpuniapp/uni_modules/uni-id-common/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "id": "uni-id-common", - "displayName": "uni-id-common", - "version": "1.0.16", - "description": "包含uni-id token生成、校验、刷新功能的云函数公共模块", - "keywords": [ - "uni-id-common", - "uniCloud", - "token", - "权限" - ], - "repository": "https://gitcode.net/dcloud/uni-id-common", - "engines": { - "HBuilderX": "^3.1.0" - }, - "dcloudext": { - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "npmurl": "", - "type": "unicloud-template-function" - }, - "uni_modules": { - "dependencies": ["uni-config-center"], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "y", - "aliyun": "y" - }, - "client": { - "Vue": { - "vue2": "u", - "vue3": "u" - }, - "App": { - "app-vue": "u", - "app-nvue": "u" - }, - "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" - }, - "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" - }, - "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-id-common/readme.md b/mpuniapp/uni_modules/uni-id-common/readme.md deleted file mode 100644 index 5f6a37a..0000000 --- a/mpuniapp/uni_modules/uni-id-common/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# uni-id-common - -文档请参考:[uni-id-common](https://uniapp.dcloud.net.cn/uniCloud/uni-id-common.html) \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/index.js b/mpuniapp/uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/index.js deleted file mode 100644 index bcbc2c7..0000000 --- a/mpuniapp/uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var e,t=(e=require("crypto"))&&"object"==typeof e&&"default"in e?e.default:e;const n={TOKEN_EXPIRED:"uni-id-token-expired",CHECK_TOKEN_FAILED:"uni-id-check-token-failed",PARAM_REQUIRED:"uni-id-param-required",ACCOUNT_EXISTS:"uni-id-account-exists",ACCOUNT_NOT_EXISTS:"uni-id-account-not-exists",ACCOUNT_CONFLICT:"uni-id-account-conflict",ACCOUNT_BANNED:"uni-id-account-banned",ACCOUNT_AUDITING:"uni-id-account-auditing",ACCOUNT_AUDIT_FAILED:"uni-id-account-audit-failed",ACCOUNT_CLOSED:"uni-id-account-closed"};function i(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}function r(e){if(!e)return;const t=e.match(/^(\d+).(\d+).(\d+)/);return t?t.slice(1,4).map(e=>parseInt(e)):void 0}function o(e,t){const n=r(e),i=r(t);return n?i?function(e,t){const n=Math.max(e.length,t.length);for(let i=0;ir)return 1;if(n=e)throw new Error("Config error, tokenExpiresThreshold should be less than tokenExpiresIn");t>e/2&&console.warn(`Please check whether the tokenExpiresThreshold configuration is set too large, tokenExpiresThreshold: ${t}, tokenExpiresIn: ${e}`)}get customToken(){return this.uniId.interceptorMap.get("customToken")}isTokenInDb(e){return o(e,"1.0.10")>=0}async getUserRecord(){if(this.userRecord)return this.userRecord;const e=await C.doc(this.uid).get();if(this.userRecord=e.data[0],!this.userRecord)throw{errCode:n.ACCOUNT_NOT_EXISTS};switch(this.userRecord.status){case void 0:case 0:break;case 1:throw{errCode:n.ACCOUNT_BANNED};case 2:throw{errCode:n.ACCOUNT_AUDITING};case 3:throw{errCode:n.ACCOUNT_AUDIT_FAILED};case 4:throw{errCode:n.ACCOUNT_CLOSED}}if(this.oldTokenPayload){if(this.isTokenInDb(this.oldTokenPayload.uniIdVersion)){if(-1===(this.userRecord.token||[]).indexOf(this.oldToken))throw{errCode:n.CHECK_TOKEN_FAILED}}if(this.userRecord.valid_token_date&&this.userRecord.valid_token_date>1e3*this.oldTokenPayload.iat)throw{errCode:n.TOKEN_EXPIRED}}return this.userRecord}async updateUserRecord(e){await C.doc(this.uid).update(e)}async getUserPermission(){if(this.userPermission)return this.userPermission;const e=(await this.getUserRecord()).role||[];if(0===e.length)return this.userPermission={role:[],permission:[]},this.userPermission;if(e.includes("admin"))return this.userPermission={role:e,permission:[]},this.userPermission;const t=await T.where({role_id:_.in(e)}).get(),n=(i=t.data.reduce((e,t)=>(t.permission&&e.push(...t.permission),e),[]),Array.from(new Set(i)));var i;return this.userPermission={role:e,permission:n},this.userPermission}async _createToken({uid:e,role:t,permission:i}={}){if(!t||!i){const e=await this.getUserPermission();t=e.role,i=e.permission}let r={uid:e,role:t,permission:i};if(this.uniId.interceptorMap.has("customToken")){const n=this.uniId.interceptorMap.get("customToken");if("function"!=typeof n)throw new Error("Invalid custom token file");r=await n({uid:e,role:t,permission:i})}const o=Date.now(),{tokenSecret:s,tokenExpiresIn:c,maxTokenLength:a=10}=this.config,u=g({...r,uniIdVersion:"1.0.16"},s,{expiresIn:c}),d=await this.getUserRecord(),l=(d.token||[]).filter(e=>{try{const t=this._checkToken(e);if(d.valid_token_date&&d.valid_token_date>1e3*t.iat)return!1}catch(e){if(e.errCode===n.TOKEN_EXPIRED)return!1}return!0});return l.push(u),l.length>a&&l.splice(0,l.length-a),await this.updateUserRecord({last_login_ip:this.clientInfo.clientIP,last_login_date:o,token:l}),{token:u,tokenExpired:o+1e3*c}}async createToken({uid:e,role:t,permission:i}={}){if(!e)throw{errCode:n.PARAM_REQUIRED,errMsgValue:{param:"uid"}};this.uid=e;const{token:r,tokenExpired:o}=await this._createToken({uid:e,role:t,permission:i});return{errCode:0,token:r,tokenExpired:o}}async refreshToken({token:e}={}){if(!e)throw{errCode:n.PARAM_REQUIRED,errMsgValue:{param:"token"}};this.oldToken=e;const t=this._checkToken(e);this.uid=t.uid,this.oldTokenPayload=t;const{uid:i}=t,{role:r,permission:o}=await this.getUserPermission(),{token:s,tokenExpired:c}=await this._createToken({uid:i,role:r,permission:o});return{errCode:0,token:s,tokenExpired:c}}_checkToken(e){const{tokenSecret:t}=this.config;let i;try{i=k(e,t)}catch(e){if("TokenExpiredError"===e.name)throw{errCode:n.TOKEN_EXPIRED};throw{errCode:n.CHECK_TOKEN_FAILED}}return i}async checkToken(e,{autoRefresh:t=!0}={}){if(!e)throw{errCode:n.PARAM_REQUIRED,errMsgValue:{param:"token"}};this.oldToken=e;const i=this._checkToken(e);this.uid=i.uid,this.oldTokenPayload=i;const{tokenExpiresThreshold:r}=this.config,{uid:o,role:s,permission:c}=i,a={role:s,permission:c};if(!s&&!c){const{role:e,permission:t}=await this.getUserPermission();a.role=e,a.permission=t}if(!r||!t){const e={code:0,errCode:0,...i,...a};return delete e.uniIdVersion,e}const u=Date.now();let d={};1e3*i.exp-u<1e3*r&&(d=await this._createToken({uid:o}));const l={code:0,errCode:0,...i,...a,...d};return delete l.uniIdVersion,l}}var E=Object.freeze({__proto__:null,checkToken:async function(e,{autoRefresh:t=!0}={}){return new m({uniId:this}).checkToken(e,{autoRefresh:t})},createToken:async function({uid:e,role:t,permission:n}={}){return new m({uniId:this}).createToken({uid:e,role:t,permission:n})},refreshToken:async function({token:e}={}){return new m({uniId:this}).refreshToken({token:e})}});const w=require("uni-config-center")({pluginId:"uni-id"});class x{constructor({context:e,clientInfo:t,config:n}={}){this._clientInfo=e?function(e){return{appId:e.APPID,platform:e.PLATFORM,locale:e.LOCALE,clientIP:e.CLIENTIP,deviceId:e.DEVICEID}}(e):t,this.config=n||this._getOriginConfig(),this.interceptorMap=new Map,w.hasFile("custom-token.js")&&this.setInterceptor("customToken",require(w.resolve("custom-token.js")));this._i18n=uniCloud.initI18n({locale:this._clientInfo.locale,fallbackLocale:"zh-Hans",messages:JSON.parse(JSON.stringify(d))}),d[this._i18n.locale]||this._i18n.setLocale("zh-Hans")}setInterceptor(e,t){this.interceptorMap.set(e,t)}_t(...e){return this._i18n.t(...e)}_parseOriginConfig(e){return Array.isArray(e)?e:e[0]?Object.values(e):e}_getOriginConfig(){if(w.hasFile("config.json")){let e;try{e=w.config()}catch(e){throw new Error("Invalid uni-id config file\n"+e.message)}return this._parseOriginConfig(e)}try{return this._parseOriginConfig(require("uni-id/config.json"))}catch(e){throw new Error("Invalid uni-id config file")}}_getAppConfig(){const e=this._getOriginConfig();return Array.isArray(e)?e.find(e=>e.dcloudAppid===this._clientInfo.appId)||e.find(e=>e.isDefaultConfig):e}_getPlatformConfig(){const e=this._getAppConfig();if(!e)throw new Error(`Config for current app (${this._clientInfo.appId}) was not found, please check your config file or client appId`);let t;switch("app-plus"===this._clientInfo.platform&&(this._clientInfo.platform="app"),"h5"===this._clientInfo.platform&&(this._clientInfo.platform="web"),this._clientInfo.platform){case"web":t="h5";break;case"app":t="app-plus"}const n=[{tokenExpiresIn:7200,tokenExpiresThreshold:1200,passwordErrorLimit:6,passwordErrorRetryTime:3600},e];t&&e[t]&&n.push(e[t]),n.push(e[this._clientInfo.platform]);const i=Object.assign(...n);return["tokenSecret","tokenExpiresIn"].forEach(e=>{if(!i||!i[e])throw new Error(`Config parameter missing, ${e} is required`)}),i}_getConfig(){return this._getPlatformConfig()}}for(const e in E)x.prototype[e]=E[e];function y(e){const t=new x(e);return new Proxy(t,{get(e,t){if(t in e&&0!==t.indexOf("_")){if("function"==typeof e[t])return(n=e[t],function(){let e;try{e=n.apply(this,arguments)}catch(e){if(a(e))return c.call(this,e),e;throw e}return i(e)?e.then(e=>(a(e)&&c.call(this,e),e),e=>{if(a(e))return c.call(this,e),e;throw e}):(a(e)&&c.call(this,e),e)}).bind(e);if("context"!==t&&"config"!==t)return e[t]}var n}})}x.prototype.createInstance=y;const A={createInstance:y};module.exports=A; diff --git a/mpuniapp/uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/package.json b/mpuniapp/uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/package.json deleted file mode 100644 index 44e159e..0000000 --- a/mpuniapp/uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "uni-id-common", - "version": "1.0.16", - "description": "uni-id token生成、校验、刷新", - "main": "index.js", - "homepage": "https://uniapp.dcloud.io/uniCloud/uni-id-common.html", - "repository": { - "type": "git", - "url": "git+https://gitee.com/dcloud/uni-id-common.git" - }, - "author": "DCloud", - "license": "Apache-2.0", - "dependencies": { - "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - }, - "origin-plugin-dev-name": "hello-uniapp-x", - "origin-plugin-version": "1.0.44", - "plugin-dev-name": "hello-uniapp-x", - "plugin-version": "1.0.44" -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-index-bar/components/uni-index-bar/uni-index-bar.uvue b/mpuniapp/uni_modules/uni-index-bar/components/uni-index-bar/uni-index-bar.uvue deleted file mode 100644 index ea879a2..0000000 --- a/mpuniapp/uni_modules/uni-index-bar/components/uni-index-bar/uni-index-bar.uvue +++ /dev/null @@ -1,352 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-index-bar/package.json b/mpuniapp/uni_modules/uni-index-bar/package.json deleted file mode 100644 index 70bbac3..0000000 --- a/mpuniapp/uni_modules/uni-index-bar/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "id": "uni-index-bar", - "displayName": "uni-index-bar 索引栏", - "version": "1.0.1", - "description": "uni-index-bar 索引栏组件,用于显示索引栏,支持自定义索引栏的样式和内容。", - "isExt": true, - "extUrl": "https://ext.dcloud.net.cn/plugin?id=27847", - "keywords": [ - "uni-index-bar", - "索引栏", - "index-bar", - "uni-app-x", - "组件" - ], - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "engines": { - "HBuilderX": "^5.08", - "uni-app-x": "^5.08", - "uni-app": "" - }, - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "type": "component-vue", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "darkmode": "x", - "i18n": "x", - "widescreen": "x", - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "x", - "aliyun": "x", - "alipay": "x" - }, - "client": { - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": "√", - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-index-bar/readme.md b/mpuniapp/uni_modules/uni-index-bar/readme.md deleted file mode 100644 index 9bd0f19..0000000 --- a/mpuniapp/uni_modules/uni-index-bar/readme.md +++ /dev/null @@ -1,98 +0,0 @@ -### 介绍 - -本组件以竖排方式显示字母索引,常悬浮或固定于列表右侧,用户通过点击或滑动索引条上的字母索引,触发 `select` 事件。在该事件中通过代码驱动指定的列表滚动到该字母索引所在的位置。 - -本组件为绝对定位,默认垂直居中于父容器右侧。 - -本组件不包括 list-view 组件,需要配合 list-view 使用。list-view 中需要有对应索引的 list-item,且这些 list-item 需要有 id 属性,可以通过 `scroll-into-view` 属性或 `scrollTop` 属性跳转。 - -本组件包括一个指示器(indicator)子组件。当用户手指触摸在索引条上的某个字母时,在触摸的字母左边悬浮显示一个水滴形气泡,箭头指向当前触摸的字母。 - -### 基本用法 - -```html - - - - - - -``` - -```uts -const onSelect = (index: string) => { - // 处理索引选择,滚动列表到对应位置 -} -``` - -### 事件 - -| 事件名 | 说明 | 回调参数 | -|--------|------|----------| -| select | 选择索引时触发 | index: string - 当前选择的索引字符 | - -### 外部样式类 - -| 类名 | 说明 | -|------|------| -| indicator-view-class | 指示器容器样式,可自定义气泡背景色等 | -| indicator-text-class | 指示器文字样式,可自定义文字颜色等 | - -### 示例 - -#### 自定义索引 - -```html - -``` - -#### 自定义样式 - -```html - - -``` - -```css -.custom-indicator { - background-color: #007aff; -} -.custom-indicator-text { - color: #ffff00; -} -``` - -#### 配合 list-view 使用 - -```html - - - - - - -``` - -```uts -const indexList = cityGroups.map((g): string => g.index).join('\n') -const indexViewID = ref("") - -const onSelect = (index: string) => { - indexViewID.value = 'idx-' + index -} -``` diff --git a/mpuniapp/uni_modules/uni-link-x/changelog.md b/mpuniapp/uni_modules/uni-link-x/changelog.md deleted file mode 100644 index 8de647a..0000000 --- a/mpuniapp/uni_modules/uni-link-x/changelog.md +++ /dev/null @@ -1,2 +0,0 @@ -## 1.0.0(2026-05-07) -- 支持 uni-link 组件 diff --git a/mpuniapp/uni_modules/uni-link-x/components/uni-link/uni-link.uvue b/mpuniapp/uni_modules/uni-link-x/components/uni-link/uni-link.uvue deleted file mode 100644 index 20a1a03..0000000 --- a/mpuniapp/uni_modules/uni-link-x/components/uni-link/uni-link.uvue +++ /dev/null @@ -1,346 +0,0 @@ - - - - diff --git a/mpuniapp/uni_modules/uni-link-x/package.json b/mpuniapp/uni_modules/uni-link-x/package.json deleted file mode 100644 index 2fabe25..0000000 --- a/mpuniapp/uni_modules/uni-link-x/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "id": "uni-link-x", - "displayName": "uni-link 链接", - "version": "1.0.0", - "description": "Link 链接组件,可自定义链接的打开方式。", - "isExt": true, - "extUrl": "https://ext.dcloud.net.cn/plugin?id=27898", - "keywords": [ - "uni-ui", - "uniui", - "link", - "链接", - "uni-app-x" -], - "engines": { - "HBuilderX": "", - "uni-app": "", - "uni-app-x": "^5.07" - }, - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "type": "component-vue", - "darkmode": "x", - "i18n": "x", - "widescreen": "x", - "npmurl": "" - }, - "uni_modules": { - "dependencies": [ - "uts-openSchema" - ], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "√", - "aliyun": "√", - "alipay": "x" - }, - "client": { - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": "√", - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-link-x/pages/link-webview.uvue b/mpuniapp/uni_modules/uni-link-x/pages/link-webview.uvue deleted file mode 100644 index 50a3fe8..0000000 --- a/mpuniapp/uni_modules/uni-link-x/pages/link-webview.uvue +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/mpuniapp/uni_modules/uni-link-x/readme.md b/mpuniapp/uni_modules/uni-link-x/readme.md deleted file mode 100644 index e2f3d6e..0000000 --- a/mpuniapp/uni_modules/uni-link-x/readme.md +++ /dev/null @@ -1,45 +0,0 @@ -打开web链接组件。点击后通过内置或外部浏览器打开链接,加载 `href` 属性中配置的 URL。 - -- `target="_self"` 时,使用 `uni_modules/uni-link-x/pages/link-webview` 页面内的 `web-view` 打开链接。 - * 注意小程序需要将域名加入应用的域名白名单。 -- `target="_blank"` 时, - * APP平台调用手机浏览器打开链接 - * Web调用 `window.open(url, '_blank')` - * 小程序平台无法打开手机浏览器,此时会走到失败回退逻辑中 - - `target="_blank"`失败时,可以通过组件属性`blank-fallback`来控制失败后的回退处理策略,`blank-fallback`属性有3个值: - - 1. turn-self :使用_self方式打开。此值为默认值。也就是 `target="_blank"` 时,小程序下默认转到内置浏览器打开。 - 2. copy-link-modal :复制链接并弹框提醒。会复制URL到剪贴板中,并弹框提示用户在外部浏览器中打开。 - 3. none :不回退。会触发组件的error事件。 - -- 开发者也可以通过条件编译组合使用,比如APP平台使用`_black`,小程序平台使用`_self` - -常见失败原因: -- 安装本组件时未在项目的pages.json中注册组件的内置页面。(HBuilderX导入本组件到项目下时会弹框提醒注册内置页面) -- 小程序平台未将域名加入应用的域名白名单。 -- iOS运行基座未包括openSchema插件,仅在无xcode时运行会触发。打包其实不会发生此错误。 -- app平台,有些手机系统会弹框询问用户是否允许app打开浏览器,如果用户点了拒绝,这种情况没有失败回调。但有种判断方式是app的onHide生命周期是否触发,如果没有触发,那么意味着并没有启动系统浏览器。 - -### 基本用法 - -```html -uni-app x 文档 - -``` - -### Events - -| 事件名 | 说明 | 回调参数 | -| --- | --- | --- | -| error | 打开失败时触发 | `message: string` | - -### 依赖 - -`APP` 平台依赖 `uts-openSchema`。`uni-link` 已在 `uni_modules/uni-link-x/package.json` 中声明该依赖。 - -组件目录下有 `pages_init.json`,会向应用的 pages.json 中注册组件中自带的内置浏览器页面。如在HBuilderX中弹框询问是否将组件中的页面注册到项目pages.json中时,请选择同意。 - -### 示例页面 - -`/pages/uni-ui/link/link` diff --git a/mpuniapp/uni_modules/uni-map-common/changelog.md b/mpuniapp/uni_modules/uni-map-common/changelog.md deleted file mode 100644 index fce0a0f..0000000 --- a/mpuniapp/uni_modules/uni-map-common/changelog.md +++ /dev/null @@ -1,16 +0,0 @@ -## 1.1.4(2024-11-21) -新增 参数payload的接收和验证示例 -## 1.1.3(2024-11-11) -优化 chooseLocation 函数供 uni-app x 的 uni.chooseLocation 使用 -## 1.1.2(2024-10-21) -新增chooseLocation函数供uni.chooseLocation使用 -## 1.1.1(2024-07-23) -[调整] 移除db_init.json文件,初始化数据库请用新版方式(右键database,初始化数据库) -## 1.1.0(2024-03-25) -[重要] 支持支付宝小程序云 -## 1.0.2(2023-08-01) -优化配置读取方式 -## 1.0.1(2023-08-01) -初版 -## 1.0.0(2023-08-01) -初版,文档地址:https://uniapp.dcloud.net.cn/uniCloud/uni-map-common.html diff --git a/mpuniapp/uni_modules/uni-map-common/package.json b/mpuniapp/uni_modules/uni-map-common/package.json deleted file mode 100644 index 4648c42..0000000 --- a/mpuniapp/uni_modules/uni-map-common/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "id": "uni-map-common", - "displayName": "uni-map-common地图服务端API", - "version": "1.1.4", - "description": "聚合了多家地图供应商的服务端API,几行代码即可快速接入地图API", - "keywords": [ - "uni-map-common", - "地图服务端API" -], - "repository": "", - "engines": { - "HBuilderX": "^3.1.0" - }, - "dcloudext": { - "type": "unicloud-template-function", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "插件不采集任何数据", - "permissions": "无" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": ["uni-config-center"], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "y", - "aliyun": "y", - "alipay": "y" - }, - "client": { - "Vue": { - "vue2": "u", - "vue3": "u" - }, - "App": { - "app-vue": "u", - "app-nvue": "u" - }, - "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" - }, - "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" - }, - "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-map-common/readme.md b/mpuniapp/uni_modules/uni-map-common/readme.md deleted file mode 100644 index 21580cc..0000000 --- a/mpuniapp/uni_modules/uni-map-common/readme.md +++ /dev/null @@ -1,11 +0,0 @@ -# uni-map-common - -聚合了多家地图供应商的服务端API - -## 使用教程 - -> 文档地址:[https://uniapp.dcloud.net.cn/uniCloud/uni-map-common.html](https://uniapp.dcloud.net.cn/uniCloud/uni-map-common.html) - -## bug反馈地址 - -> 加群:[uni-map交流群](https://im.dcloud.net.cn/#/?joinGroup=64d62b106823de10406ad72f) diff --git a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/index.js b/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/index.js deleted file mode 100644 index 04425d9..0000000 --- a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/index.js +++ /dev/null @@ -1,100 +0,0 @@ -const service = require('./service/index.js'); - -class UniMap { - - // 构造函数 - constructor(data = {}) { - let { - provider, // 平台 weixin-mp 微信小程序 weixin-h5 微信公众号 - key, // 密钥 - needOriginalResult = false, // 是否需要返回原始信息,默认false - } = data; - - let runService = service[provider]; - if (!runService) { - throw new Error(`不支持平台:${provider}`); - } - this.service = new runService({ - provider, - key, - needOriginalResult - }); - //return this.service; - } - - // API - 逆地址解析(坐标转地址) - async location2address(data = {}) { - let res = await this._call("location2address", data); - return res; - } - - // API - 地址解析(地址转坐标) - async address2location(data = {}) { - let res = await this._call("address2location", data); - return res; - } - - // API - 坐标转换 - async translate(data = {}) { - let res = await this._call("translate", data); - return res; - } - - // API - IP定位 - async ip2location(data = {}) { - let res = await this._call("ip2location", data); - return res; - } - - // API - 关键词输入提示 - async inputtips(data = {}) { - let res = await this._call("inputtips", data); - return res; - } - - // API - 周边搜索 - async search(data = {}) { - let res = await this._call("search", data); - return res; - } - - // API - 行政区划 - async districtSearch(data = {}) { - let res = await this._call("districtSearch", data); - return res; - } - - // API - 路线规划(驾车/步行/骑行/电动车/公交) - async route(data = {}) { - let urlObj = { - "driving": "drivingRoute", - "walking": "walkingRoute", - "bicycling": "bicyclingRoute", - "ebicycling": "ebicyclingRoute", - "transit": "transitRoute" - }; - let res = await this._call(urlObj[data.mode], data); - res.result.mode = data.mode; - return res; - } - - // 私有函数 - async _call(name, data = {}) { - let runFunction = this.service[name]; - if (!runFunction) { - throw new Error(`平台:${this.service.config.provider} 不支持API:${name}`); - } - let res = await runFunction.call(this.service, data); // 此处需要使用call,防止里面的this作用域被意外改变 - if (!this.service.config.needOriginalResult) { - delete res.originalResult; - } - //res = JSON.parse(JSON.stringify(res)); - return { - provider: this.service.config.provider, - ...res - }; - } - -} - -module.exports = UniMap; \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/libs/common.js b/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/libs/common.js deleted file mode 100644 index e0afb5c..0000000 --- a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/libs/common.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * 通用公共函数 - */ -var common = {}; - -// 经纬度表示形式转换 -common.getLocation = function(location = "", type = "", returnType = "") { - let lat; - let lng; - // 去除所有空格 - type = type.trim(); - returnType = returnType.replace(/\s+/g, ''); - if (type === "lat,lng") { - location = location.replace(/\s+/g, ''); - let arr = location.split(","); - lat = arr[0]; - lng = arr[1]; - } else if (type === "lng,lat") { - location = location.replace(/\s+/g, ''); - let arr = location.split(","); - lat = arr[1]; - lng = arr[0]; - } else if (type === "lat lng") { - let arr = location.split(" "); - lat = arr[0]; - lng = arr[1]; - } else if (type === "lng lat") { - let arr = location.split(" "); - lat = arr[1]; - lng = arr[0]; - } else { - lat = location.lat; - lng = location.lng; - } - if (returnType == "lng,lat") { - return `${lng},${lat}`; - } else if (returnType == "lat,lng") { - return `${lat},${lng}`; - } else { - return { - lat: Number(lat), - lng: Number(lng) - } - } -}; - -// 字符串格式的坐标经纬度反转 -common.getReversalLocation = function(input="") { - // 按分隔符拆分字符串 - let parts = input.split("|"); - - // 遍历每个部分进行值交换 - for (let i = 0; i < parts.length; i++) { - let pairs = parts[i].split(";"); - for (let j = 0; j < pairs.length; j++) { - let values = pairs[j].split(","); - // 交换两个值 - let temp = values[0]; - values[0] = values[1]; - values[1] = temp; - // 更新交换后的值 - pairs[j] = values.join(","); - } - // 更新交换后的部分 - parts[i] = pairs.join(";"); - } - - // 返回交换后的结果 - return parts.join("|"); -}; - - - -module.exports = common; \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/libs/error.js b/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/libs/error.js deleted file mode 100644 index 7adb098..0000000 --- a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/libs/error.js +++ /dev/null @@ -1,16 +0,0 @@ -const errSubject = "uni-map-common"; - -class UniCloudError { - constructor(options = {}) { - this.errCode = options.errCode || options.code; - this.errMsg = options.errMsg || options.msg || options.message || ""; - this.errSubject = options.subject || errSubject; - if ((this.errCode === 110 && this.errMsg.indexOf("来源域名未被授权") > -1) || (this.errCode === 112 && this.errMsg.indexOf("INVALID_USER_IP") > -1)) { - this.errMsg = `来源域名未被授权, 解决方法见:https://doc.dcloud.net.cn/uniCloud/uni-map-common.html#permission`; - } - } -} - -module.exports = { - UniCloudError -} diff --git a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/libs/index.js b/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/libs/index.js deleted file mode 100644 index d72cddb..0000000 --- a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/libs/index.js +++ /dev/null @@ -1,7 +0,0 @@ -const common = require('./common'); -const error = require('./error'); - -module.exports = { - common, - error -}; \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/package.json b/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/package.json deleted file mode 100644 index 85ef5ad..0000000 --- a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "uni-map-common", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" - }, - "origin-plugin-dev-name": "uni-map-common", - "origin-plugin-version": "1.1.4", - "plugin-dev-name": "hello-uniapp-x", - "plugin-version": "1.0.44" -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/service/amap.js b/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/service/amap.js deleted file mode 100644 index 6783ee8..0000000 --- a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/service/amap.js +++ /dev/null @@ -1,979 +0,0 @@ -const libs = require('../libs'); - -// https://lbs.amap.com/api/webservice/guide/tools/info - -const ERRCODE = { - "10000": 0, - "10001": 190, - "10002": 113, - "10003": 121, - "10004": 120, - "10005": 112, - "10006": 110, - "10007": 111, - "10008": 111, - "10009": 110, - "10010": 122, - "10011": 311, - "10012": 113, - "10013": 190, - "10014": 500, - "10015": 500, - "10016": 500, - "10017": 500, - "10019": 500, - "10020": 500, - "10021": 500, - "10026": 110, - "10029": 500, - "10041": 110, - "10044": 121, - "10045": 121, - "20000": 395, - "20001": 300, - "20002": 500, - "20003": 500, - "20011": 395, - "20012": 395, - "20801": 395, - "20802": 395, - "20803": 373, - "40000": 123, - "40001": 123, - "40002": 123, - "40003": 123 -}; - -class Service { - - // 构造函数 - constructor(data = {}) { - let { - key, - needOriginalResult = false, // 是否需要返回原始信息,默认false - } = data; - - this.config = { - provider: "amap", - key, - needOriginalResult, - serviceUrl: "https://restapi.amap.com" - } - } - - async request(obj = {}) { - let { - url, - data = {} - } = obj; - if (url.indexOf("http") !== 0) { - url = `${this.config.serviceUrl}/${url}` - } - if (this.config.key && !data.key) { - data.key = this.config.key; - } - obj.data = JSON.parse(JSON.stringify(obj.data)); - let requestRes = await uniCloud.httpclient.request(url, obj); - let result = this.getResult(requestRes); - if (result.errCode != 0) { - throw new libs.error.UniCloudError(result); - } - return result; - } - - getResult(requestRes) { - let { - data: originalResult = {} - } = requestRes; - let res = { - errCode: originalResult.infocode == "10000" ? 0 : this.getErrCode(originalResult.infocode), - errMsg: originalResult.info, - originalResult, - }; - return res; - } - - getErrCode(errCode) { - return ERRCODE[errCode] || errCode; - } - - // API - 逆地址解析(坐标转地址) - async location2address(data = {}) { - let { - location, - get_poi, - poi_options, - } = data; - - let requestData = { - location: libs.common.getLocation(location, "lat,lng", "lng,lat"), - extensions: get_poi ? "all" : "base", - }; - - if (get_poi && typeof poi_options == "object") { - let { - poitype, - radius, - roadlevel, - homeorcorp - } = poi_options; - requestData = Object.assign(requestData, { - poitype, - radius, - roadlevel, - homeorcorp - }) - } - - let requestRes = await this.request({ - method: "GET", - url: "v3/geocode/regeo", - dataType: "json", - data: requestData - }); - - let originalResult = requestRes.originalResult.regeocode; - let pois; - if (originalResult.pois) { - pois = originalResult.pois.map((item) => { - return { - id: item.id, - title: item.name, - address: item.address, - location: libs.common.getLocation(item.location, "lng,lat", "object"), - distance: item.distance, - direction: item.direction, - category: item.type - } - }); - } - - let roads; - if (originalResult.roads) { - roads = originalResult.roads.map((item) => { - return { - id: item.id, - title: item.name, - distance: Number(item.distance), - direction: item.direction, - location: libs.common.getLocation(item.location, "lng,lat", "object") - } - }); - } - - let roadinters; - if (originalResult.roadinters) { - roadinters = originalResult.roadinters.map((item) => { - return { - distance: Number(item.distance), - direction: item.direction, - first_id: item.first_id, - first_name: item.first_name, - second_id: item.second_id, - second_name: item.second_name, - location: libs.common.getLocation(item.location, "lng,lat", "object") - } - }); - } - - let result = { - formatted_addresses: originalResult.formatted_address, - country: originalResult.addressComponent.country, - province: originalResult.addressComponent.province, - city: JSON.stringify(originalResult.addressComponent.city) === "[]" || !originalResult.addressComponent.city ? originalResult.addressComponent.province : originalResult - .addressComponent.city, - district: originalResult.addressComponent.district, - street: originalResult.addressComponent.country, - street_number: originalResult.addressComponent.streetNumber.street + originalResult.addressComponent.streetNumber.number, - adcode: originalResult.addressComponent.adcode, - pois, - roads, - roadinters - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 地址解析(地址转坐标) - async address2location(data = {}) { - let { - address, - city, - } = data; - - let requestRes = await this.request({ - method: "GET", - url: "v3/geocode/geo", - dataType: "json", - data: { - address, - city - } - }); - - let originalResult = requestRes.originalResult.geocodes[0]; - let result = { - location: libs.common.getLocation(originalResult.location, "lng,lat", "object"), - adcode: originalResult.adcode, - province: originalResult.province, - city: originalResult.city, - district: originalResult.district, - street: originalResult.street, - street_number: originalResult.number, - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 坐标转换 - async translate(data = {}) { - let { - locations, - type, - } = data; - let locationsStr = ""; - locations.map((item, index) => { - if (index > 0) { - locationsStr += ";"; - } - locationsStr += libs.common.getLocation(item, "object", "lng,lat"); - }) - - let coordsys = { - "1": "gps", - "4": "mapbar", - "3": "baidu", - "": "autonavi", - } [type + ""]; - let requestRes = await this.request({ - method: "GET", - url: "v3/assistant/coordinate/convert", - dataType: "json", - data: { - locations: locationsStr, - coordsys - } - }); - let originalResult = requestRes.originalResult; - let returnLocationsStr = originalResult.locations; - let arr = returnLocationsStr.split(";"); - - let returnLocations = arr.map((item) => { - return libs.common.getLocation(item, "lng,lat", "object"); - }); - - let result = { - locations: returnLocations - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - IP定位 - async ip2location(data = {}) { - let { - ip, - } = data; - - let requestRes = await this.request({ - method: "GET", - url: "v3/ip", - dataType: "json", - data: { - ip - } - }); - let originalResult = requestRes.originalResult; - let result = { - adcode: originalResult.adcode, - province: originalResult.province, - city: originalResult.city, - rectangle: originalResult.rectangle - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 关键词输入提示 - async inputtips(data = {}) { - let { - keyword, - city, - citylimit, - location, - datatype, - } = data; - - let requestData = { - keywords: keyword, - city, - citylimit, - datatype - }; - if (location) { - requestData.location = libs.common.getLocation(location, "object", "lng,lat"); - } - - let requestRes = await this.request({ - method: "GET", - url: "v3/assistant/inputtips", - dataType: "json", - data: requestData, - }); - - let originalResult = requestRes.originalResult; - - let _data = originalResult.tips.map((item) => { - return { - id: item.id, - name: item.name, - address: item.address, - location: libs.common.getLocation(item.location, "lng,lat", "object"), - adcode: item.adcode, - district: item.district - } - }); - - let result = { - data: _data - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 周边搜索 - async search(data = {}) { - let { - keyword, - location, - radius = 1000, - auto_extend = 1, - get_subpois, - orderby, - page_index = 1, - page_size = 20, - types, - city - } = data; - - let requestData = { - keywords: keyword, - types, - location: libs.common.getLocation(location, "object", "lng,lat"), - radius, - sortrule: orderby, - region: city, - city_limit: auto_extend ? false : true, - page_num: page_index, - page_size, - show_fields: get_subpois ? "children,business,navi,photos" : "business,navi,photos" - }; - - let requestRes = await this.request({ - method: "GET", - url: "v5/place/around", - dataType: "json", - data: requestData - }); - let originalResult = requestRes.originalResult; - - let _data = originalResult.pois.map((item) => { - return { - id: item.id, - title: item.name, - tel: item.business.tel, - address: item.address, - category: item.type, - location: libs.common.getLocation(item.location, "lng,lat", "object"), - distance: Number(item.distance), - adcode: item.adcode, - province: item.pname, - city: item.cityname, - district: item.adname, - children: item.children ? item.children.map((item2) => { - return { - parent_id: item.id, - id: item2.id, - title: item2.name, - address: item2.address, - category: item2.subtype, - location: libs.common.getLocation(item2.location, "lng,lat", "object") - } - }) : get_subpois ? [] : undefined, - } - }); - let result = { - data: _data - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 行政区划 - async districtSearch(data = {}) { - let { - adcode, - get_polygon, - page_index, - page_size, - filter, - subdistrict - } = data; - - let requestData = { - keywords: adcode, - subdistrict, - page: page_index, - offset: page_size, - filter - }; - - let requestRes = await this.request({ - method: "GET", - url: "v3/config/district", - dataType: "json", - data: requestData - }); - let originalResult = requestRes.originalResult; - - const formatDistricts = (list) => { - return list.map((item) => { - return { - adcode: item.adcode, - name: item.name, - fullname: item.name, - location: libs.common.getLocation(item.center, "lng,lat", "object"), - level: item.level, - children: typeof item.districts !== "undefined" ? formatDistricts(item.districts): undefined, - //polygon: item.polyline, - } - }); - } - let _data = formatDistricts(originalResult.districts[0].districts); - - let result = { - data: _data - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 路线规划(驾车) - async drivingRoute(data = {}) { - let { - mode, - from, - to, - from_poi, - to_poi, - policy, - waypoints, - avoid_polygons, - road_type, - plate_number, - cartype, - avoidroad, - ferry, - } = data; - - let requestRes = await this.request({ - method: "GET", - url: `v5/direction/driving`, - dataType: "json", - data: { - origin: libs.common.getLocation(from, "lat,lng", "lng,lat"), - destination: libs.common.getLocation(to, "lat,lng", "lng,lat"), - origin_id: from_poi, - destination_id: to_poi, - strategy: policy, - waypoints: libs.common.getReversalLocation(waypoints), - avoidpolygons: libs.common.getReversalLocation(avoid_polygons), - origin_type: road_type, - plate: plate_number, - cartype, - avoidroad, - ferry, - show_fields: "cost,tmcs,navi,cities,polyline" - } - }); - - let originalResult = requestRes.originalResult.route; - let routes = originalResult.paths.map((item) => { - let steps = item.steps.map((item2) => { - return { - instruction: item2.instruction, - road_name: item2.road_name, - dir_desc: item2.orientation, - distance: Number(item2.step_distance), - act_desc: item2.navi.action, - accessorial_desc: item2.navi.assistant_action, - cost: this.costFormat(item2.cost), - speed: item2.tmcs ? item2.tmcs.map((item3) => { - let levelIndex = { - "畅通": 0, - "缓行": 1, - "拥堵": 2, - "未知": 3, - "严重拥堵": 4, - } - return { - distance: Number(item3.tmc_distance), - level: levelIndex[item3.tmc_status], - polyline: this.polylineFormat(item3.tmc_polyline), - } - }) : undefined, - cities: item2.cities, - polyline: this.polylineFormat(item2.polyline), - } - }); - return { - mode: "driving", - distance: Number(item.distance), - restriction_status: Number(item.restriction), - taxi_cost: Number(originalResult.taxi_cost), - steps - } - }); - let result = { - routes - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 路线规划(步行) - async walkingRoute(data = {}) { - let { - mode, - from, - to, - alternative_route, - } = data; - - let requestRes = await this.request({ - method: "GET", - url: `v5/direction/walking`, - dataType: "json", - data: { - origin: libs.common.getLocation(from, "lat,lng", "lng,lat"), - destination: libs.common.getLocation(to, "lat,lng", "lng,lat"), - alternative_route, - show_fields: "cost,navi,polyline", // 此处强制传,为了和腾讯地图字段对齐 - } - }); - let originalResult = requestRes.originalResult.route; - let routes = originalResult.paths.map((item) => { - let duration1 = 0; - let steps = item.steps.map((item2) => { - let duration2 = this.durationFormat(item2.cost.duration); - duration1 += duration2; - return { - instruction: item2.instruction, - road_name: item2.road_name, - dir_desc: item2.orientation, - distance: Number(item2.step_distance), - act_desc: item2.navi.action || item2.navi.assistant_action, - taxi_cost: item2.cost.taxi ? this.priceFormat(item2.cost.taxi) : undefined, - duration: duration2, - polyline: this.polylineFormat(item2.polyline), - } - }); - - return { - mode: "walking", - distance: Number(item.distance), - duration: duration1, - steps - } - - }); - let result = { - routes - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 路线规划(骑行) - async bicyclingRoute(data = {}) { - let { - mode, - from, - to, - alternative_route, - } = data; - - let requestRes = await this.request({ - method: "GET", - url: `v5/direction/bicycling`, - dataType: "json", - data: { - origin: libs.common.getLocation(from, "lat,lng", "lng,lat"), - destination: libs.common.getLocation(to, "lat,lng", "lng,lat"), - alternative_route, - show_fields: "cost,navi,polyline", // 此处强制传,为了和腾讯地图字段对齐 - } - }); - let originalResult = requestRes.originalResult.route; - let routes = originalResult.paths.map((item) => { - let duration1 = 0; - let steps = item.steps.map((item2) => { - let duration2 = this.durationFormat(item2.cost.duration); - duration1 += duration2; - return { - instruction: item2.instruction, - road_name: item2.road_name, - dir_desc: item2.orientation, - distance: Number(item2.step_distance), - act_desc: item2.navi.action || item2.navi.assistant_action, - duration: duration2, - polyline: this.polylineFormat(item2.polyline), - } - }); - - return { - mode: "walking", - distance: Number(item.distance), - duration: duration1, - steps - } - - }); - let result = { - routes - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 路线规划(电动车) - async ebicyclingRoute(data = {}) { - let { - mode, - from, - to, - alternative_route, - } = data; - - let requestRes = await this.request({ - method: "GET", - url: `v5/direction/electrobike`, - dataType: "json", - data: { - origin: libs.common.getLocation(from, "lat,lng", "lng,lat"), - destination: libs.common.getLocation(to, "lat,lng", "lng,lat"), - alternative_route, - show_fields: "cost,navi,polyline", // 此处强制传,为了和腾讯地图字段对齐 - } - }); - let originalResult = requestRes.originalResult.route; - let routes = originalResult.paths.map((item) => { - let duration1 = 0; - let steps = item.steps.map((item2) => { - let duration2 = this.durationFormat(item2.cost.duration); - duration1 += duration2; - return { - instruction: item2.instruction, - road_name: item2.road_name, - dir_desc: item2.orientation, - distance: Number(item2.step_distance), - act_desc: item2.navi.action || item2.navi.assistant_action, - duration: duration2, - polyline: this.polylineFormat(item2.polyline), - } - }); - - return { - mode: "walking", - distance: Number(item.distance), - duration: duration1, - steps - } - - }); - let result = { - routes - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 路线规划(公交) - async transitRoute(data = {}) { - let { - mode, - from, - to, - from_poi, - to_poi, - policy, - ad1, - ad2, - city1, - city2, - alternative_route, - multiexport, - max_trans, - nightflag, - date, - time - } = data; - - let requestRes = await this.request({ - method: "GET", - url: `v5/direction/transit/integrated`, - dataType: "json", - data: { - origin: libs.common.getLocation(from, "lat,lng", "lng,lat"), - destination: libs.common.getLocation(to, "lat,lng", "lng,lat"), - originpoi: from_poi, - destinationpoi: to_poi, - strategy: policy, - ad1, - ad2, - city1, - city2, - AlternativeRoute: alternative_route, - multiexport, - max_trans, - nightflag, - date, - time, - show_fields: "cost,navi,polyline", // 此处强制传,为了和腾讯地图字段对齐 - } - }); - - let originalResult = requestRes.originalResult.route; - let routes = originalResult.transits.map((item) => { - let stepsItem = this.getSteps(item.segments); - let steps = stepsItem.map((item2) => { - let mode = item2.mode.toLowerCase(); - if (mode === "walking") { - // 步行 - return { - mode: "walking", - distance: Number(item2.distance), - duration: this.durationFormat(item2.cost.duration), - steps: item2.steps.map((item3) => { - return { - instruction: item3.instruction, - road_name: item3.road, - distance: Number(item3.distance), - act_desc: item3.navi.action || item3.navi.assistant_action, - polyline: this.polylineFormat(item3.polyline) - } - }), - } - } else if (mode === "bus") { - return { - mode: "transit", - lines: item2.buslines.map((item3) => { - return { - vehicle: item3.type.indexOf("地铁") > -1 ? "SUBWAY" : "BUS", - id: item3.id, - title: item3.name, - type: item3.type, - station_count: Number(item3.via_num), - distance: Number(item3.distance), - duration: this.durationFormat(item3.cost.duration), - polyline: this.polylineFormat(item3.polyline), - start_time: item3.start_time, - end_time: item3.end_time, - geton: { - id: item3.departure_stop.id, - title: item3.departure_stop.name, - location: libs.common.getLocation(item3.departure_stop.location, "lng,lat", "object"), - }, - getoff: { - id: item3.arrival_stop.id, - title: item3.arrival_stop.name, - location: libs.common.getLocation(item3.arrival_stop.location, "lng,lat", "object"), - }, - stations: item3.via_stops.map((item4) => { - return { - id: item4.id, - title: item4.name, - location: libs.common.getLocation(item4.location, "lng,lat", "object"), - } - }) - } - }), - } - } else if (mode === "railway") { - // 火车 - let item3 = item2; - return { - mode: "transit", - lines: [{ - vehicle: "RAIL", - id: item3.id, - title: item3.name, - type: item3.type, - distance: Number(item3.distance), - duration: this.durationFormat(item3.time), - geton: { - id: item3.departure_stop.id, - title: item3.departure_stop.name, - location: libs.common.getLocation(item3.departure_stop.location, "lng lat", "object"), - adcode: item3.departure_stop.adcode, - time: item3.departure_stop.time, - start: Number(item3.departure_stop.start), - }, - getoff: { - id: item3.arrival_stop.id, - title: item3.arrival_stop.name, - location: libs.common.getLocation(item3.arrival_stop.location, "lng lat", "object"), - adcode: item3.arrival_stop.adcode, - time: item3.arrival_stop.time, - end: Number(item3.arrival_stop.end), - }, - spaces: item3.spaces ? item3.spaces.map((item4) => { - return { - code: item4.code, - cost: this.priceFormat(item4.cost), - } - }) : undefined - }], - } - } else if (mode === "taxi") { - // 打车 - let item3 = item2; - return { - mode: "transit", - lines: [{ - vehicle: "TAXI", - distance: Number(item3.distance), - price: this.priceFormat(item3.price), - drivetime: this.durationFormat(item3.drivetime), - polyline: this.polylineFormat(item3.polyline), - startpoint: libs.common.getLocation(item3.startpoint, "lng,lat", "lat,lng"), - startname: item3.startname, - endpoint: libs.common.getLocation(item3.endpoint, "lng,lat", "lat,lng"), - endname: item3.endname - }] - } - } - }); - - return { - mode: "transit", - distance: Number(item.distance), - duration: this.durationFormat(item.cost.duration), - transit_fee: this.priceFormat(item.cost.transit_fee), - steps - } - }); - let result = { - routes - }; - let res = { - result, - ...requestRes - }; - return res; - } - - getSteps(segments) { - let steps = []; - segments.map((item, index) => { - for (let mode in item) { - steps.push({ - mode, - ...item[mode] - }); - } - }); - return steps; - } - - // 格式化价格,将字符串价格转成数值,保留2位小数 - priceFormat(price) { - try { - if (price === "") { - return -1; - } else { - return parseFloat(Number(price).toFixed(2)); - } - } catch (err) { - return -1; - } - } - - // 格式化cost - costFormat(cost = {}) { - let { - duration, - taxi_cost, - transit_fee, - tolls, - toll_distance, - toll_road, - traffic_lights - } = cost; - let res = {}; - if (typeof duration !== "undefined") res.duration = this.durationFormat(duration); - if (typeof taxi_cost !== "undefined") res.taxi_cost = this.priceFormat(taxi_cost); - if (typeof transit_fee !== "undefined") res.transit_fee = this.priceFormat(transit_fee); - if (typeof tolls !== "undefined") res.tolls = this.priceFormat(tolls); - if (typeof toll_distance !== "undefined") res.toll_distance = Number(toll_distance); - if (typeof toll_road !== "undefined") res.toll_road = toll_road; - if (typeof traffic_lights !== "undefined") res.traffic_lights = Number(traffic_lights); - - return res; - } - - // 格式化polyline,将原本polyline.polyline转成polyline - polylineFormat(polyline = {}) { - if (polyline.polyline) { - return libs.common.getReversalLocation(polyline.polyline); - } else if (typeof polyline === "string") { - return libs.common.getReversalLocation(polyline); - } else { - return ""; - } - } - - // 格式化时间(秒转分,向上进1) - durationFormat(duration) { - try { - return Math.ceil(Number(duration) / 60); - } catch (err) { - return undefined; - } - } - -} -module.exports = Service; \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/service/index.js b/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/service/index.js deleted file mode 100644 index 22b7ff7..0000000 --- a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/service/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - "qqmap": require('./qqmap.js'), - "amap": require('./amap.js') -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/service/qqmap.js b/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/service/qqmap.js deleted file mode 100644 index 2f90bc2..0000000 --- a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/common/uni-map-common/service/qqmap.js +++ /dev/null @@ -1,856 +0,0 @@ -const libs = require('../libs'); - -class Service { - - // 构造函数 - constructor(data = {}) { - let { - key, - needOriginalResult = false, // 是否需要返回原始信息,默认false - } = data; - - this.config = { - provider: "qqmap", - key, - needOriginalResult, - serviceUrl: "https://apis.map.qq.com" - } - } - - async request(obj = {}) { - let { - url, - data = {} - } = obj; - if (url.indexOf("http") !== 0) { - url = `${this.config.serviceUrl}/${url}` - } - if (this.config.key && !data.key) { - data.key = this.config.key; - } - obj.data = JSON.parse(JSON.stringify(obj.data)); - let requestRes = await uniCloud.httpclient.request(url, obj); - let result = this.getResult(requestRes); - if (result.errCode != 0) { - throw new libs.error.UniCloudError(result); - } - return result; - } - - getResult(requestRes) { - let { - data: originalResult = {} - } = requestRes; - - let res = { - errCode: originalResult.status == 0 ? 0 : this.getErrCode(originalResult.status), - errMsg: originalResult.message, - originalResult, - }; - - return res; - } - - getErrCode(errCode) { - return errCode; - } - - // API - 逆地址解析(坐标转地址) - async location2address(data = {}) { - let { - location, - get_poi, - poi_options - } = data; - - let _poi_options = ""; - if (typeof poi_options === "object") { - let { - address_format, - radius, - policy, - page_index, - page_size - } = poi_options; - if (address_format && address_format !== "long") { - _poi_options += `address_format=${address_format};` - } - if (radius) { - _poi_options += `radius=${radius};` - } - if (policy) { - _poi_options += `policy=${policy};` - } - if (page_index) { - _poi_options += `page_index=${page_index};` - } - if (page_size) { - _poi_options += `page_size=${page_size};` - } - - if (_poi_options.lastIndexOf(";") === _poi_options.length - 1) { - _poi_options = _poi_options.substring(0, _poi_options.length - 1); - } - } - if (!_poi_options) _poi_options = undefined; - let requestRes = await this.request({ - method: "GET", - url: "ws/geocoder/v1/", - dataType: "json", - data: { - location, - get_poi, - poi_options: _poi_options, - } - }); - let originalResult = requestRes.originalResult.result; - let pois; - if (originalResult.pois) { - pois = originalResult.pois.map((item) => { - return { - id: item.id, - title: item.title, - address: item.address, - location: item.location, - distance: item._distance, - direction: item._dir_desc, - category: item.category - } - }); - } - let result = { - formatted_addresses: originalResult.address, - country: originalResult.address_component.nation, - province: originalResult.address_component.province, - city: originalResult.address_component.city, - district: originalResult.address_component.district, - street: originalResult.address_component.street, - street_number: originalResult.address_component.street_number, - adcode: originalResult.ad_info.adcode, - pois - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 地址解析(地址转坐标) - async address2location(data = {}) { - let { - address, - city, - } = data; - - let requestRes = await this.request({ - method: "GET", - url: "ws/geocoder/v1/", - dataType: "json", - data: { - address: address, - region: city, - } - }); - let originalResult = requestRes.originalResult.result; - - let result = { - location: originalResult.location, - adcode: originalResult.ad_info.adcode, - province: originalResult.address_components.province, - city: originalResult.address_components.city, - district: originalResult.address_components.district, - street: originalResult.address_components.street, - street_number: originalResult.address_components.street_number, - }; - let res = { - result, - ...requestRes - }; - - return res; - } - - // API - 坐标转换 - async translate(data = {}) { - let { - locations, - type, - } = data; - let locationsStr = ""; - locations.map((item, index) => { - if (index > 0) { - locationsStr += ";"; - } - locationsStr += libs.common.getLocation(item, "object", "lat,lng"); - }) - - let requestRes = await this.request({ - method: "GET", - url: "ws/coord/v1/translate", - dataType: "json", - data: { - locations: locationsStr, - type - } - }); - let originalResult = requestRes.originalResult; - - let result = { - locations: originalResult.locations - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - IP定位 - async ip2location(data = {}) { - let { - ip, - } = data; - - let requestRes = await this.request({ - method: "GET", - url: "ws/location/v1/ip", - dataType: "json", - data: { - ip - } - }); - let originalResult = requestRes.originalResult.result; - let result = { - location: libs.common.getLocation(originalResult.location, "object", "object"), - nation: originalResult.ad_info.nation, - nation_code: originalResult.ad_info.nation_code, - adcode: originalResult.ad_info.adcode, - province: originalResult.ad_info.province, - city: originalResult.ad_info.city, - district: originalResult.ad_info.district - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 关键词输入提示 - async inputtips(data = {}) { - let { - keyword, - city, - citylimit, - location, - get_subpois, - policy, - filter, - address_format, - page_index, - page_size - } = data; - - let requestData = { - keyword, - region: city, - region_fix: citylimit ? 1 : 0, - get_subpois, - policy, - filter, - address_format, - page_index, - page_size - }; - if (location) { - requestData.location = libs.common.getLocation(location, "object", "lat,lng"); - } - - let requestRes = await this.request({ - method: "GET", - url: "ws/place/v1/suggestion", - dataType: "json", - data: requestData - }); - let originalResult = requestRes.originalResult; - - let _data = originalResult.data.map((item) => { - - let children; - if (originalResult.sub_pois) { - children = []; - originalResult.sub_pois.map((item2) => { - if (item2.parent_id === item.id) { - children.push({ - parent_id: item.id, - id: item2.id, - title: item2.title, - address: item2.address, - category: item2.category, - location: item2.location, - adcode: String(item2.adcode), - city: item2.city, - }); - } - }); - } - - return { - id: item.id, - title: item.title, - address: item.address, - category: item.category, - type: item.type, - location: item.location, - adcode: item.adcode, - province: item.province, - city: item.city, - district: item.district, - children - } - }); - - let result = { - data: _data - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 周边搜索 - async search(data = {}) { - let { - keyword, - location, - radius = 1000, - auto_extend = 1, - get_subpois, - orderby, - page_index = 1, - page_size = 20, - filter - } = data; - - if (radius < 10) radius = 10; - - let boundary = `nearby(${location.lat},${location.lng},${radius},${auto_extend})`; - - let requestData = { - keyword, - boundary, - get_subpois, - filter, - orderby: orderby === "distance" ? "_distance" : undefined, - page_index, - page_size - }; - - let requestRes = await this.request({ - method: "GET", - url: "ws/place/v1/search", - dataType: "json", - data: requestData - }); - let originalResult = requestRes.originalResult; - - let _data = originalResult.data.map((item) => { - let children; - if (originalResult.sub_pois) { - children = []; - originalResult.sub_pois.map((item2) => { - if (item2.parent_id === item.id) { - children.push({ - parent_id: item.id, - id: item2.id, - title: item2.title, - address: item2.address, - category: item2.category, - location: item2.location, - tel: item2.tel, - adcode: String(item2.ad_info.adcode), - province: item2.ad_info.province, - city: item2.ad_info.city, - district: item2.ad_info.district, - }); - } - }); - } - - return { - id: item.id, - title: item.title, - tel: item.tel, - address: item.address, - category: item.category, - type: item.type, - location: item.location, - distance: item._distance, - adcode: String(item.ad_info.adcode), - province: item.ad_info.province, - city: item.ad_info.city, - district: item.ad_info.district, - children - } - }); - - let result = { - data: _data - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 行政区划 - async districtSearch(data = {}) { - let { - adcode, - get_polygon, - max_offset - } = data; - - let requestData = { - id: adcode, - get_polygon, - max_offset - }; - - let requestRes = await this.request({ - method: "GET", - url: "ws/district/v1/getchildren", - dataType: "json", - data: requestData - }); - let originalResult = requestRes.originalResult; - let _data = originalResult.result[0].map((item) => { - return { - adcode: item.id, - name: item.name || item.fullname, - fullname: item.fullname, - location: item.location, - pinyin: item.pinyin, - cidx: item.cidx, - polygon: item.polygon, - } - }); - - let result = { - data: _data, - data_version: originalResult.data_version - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 路线规划(驾车) - async drivingRoute(data = {}) { - let { - mode, - from, - to, - from_poi, - to_poi, - policy, - waypoints, - avoid_polygons, - road_type, - plate_number, - cartype, - heading, - speed, - accuracy, - from_track, - get_mp, - no_step - } = data; - - let requestRes = await this.request({ - method: "GET", - url: `ws/direction/v1/driving`, - dataType: "json", - data: { - from, - to, - from_poi, - to_poi, - policy, - waypoints, - avoid_polygons, - road_type, - plate_number, - cartype, - heading, - speed, - accuracy, - from_track, - get_mp, - get_speed: 1, - added_fields: "cities", - no_step - } - }); - - let originalResult = requestRes.originalResult.result; - let routes = originalResult.routes.map((item) => { - let waypoints; - if (item.waypoints) { - waypoints = item.waypoints.map((item2) => { - return { - title: item2.title, - location: item2.location, - duration: item2.duration, - distance: item2.distance, - polyline: this.getPolyline(item.polyline, item2.polyline_idx), - polyline_idx: item2.polyline_idx, - } - }); - } - let steps = item.steps.map((item2) => { - return { - instruction: item2.instruction, - road_name: item2.road_name, - dir_desc: item2.dir_desc, - distance: item2.distance, - act_desc: item2.act_desc, - accessorial_desc: item2.accessorial_desc, - polyline: this.getPolyline(item.polyline, item2.polyline_idx), - polyline_idx: item2.polyline_idx, - } - }); - - let speed = item.speed.map((item2) => { - return { - distance: item2.distance, - level: item2.level, - polyline: this.getPolyline(item.polyline, item2.polyline_idx), - polyline_idx: item2.polyline_idx, - } - }); - - return { - mode: "driving", - tags: item.tags, - distance: item.distance, - duration: item.duration, - traffic_light_count: item.traffic_light_count, - restriction_status: item.restriction.status, - polyline: this.polylineFormat(item.polyline), - waypoints, - taxi_cost: item.taxi_fare.fare, - cities: item.cities, - steps, - speed - } - }); - let result = { - routes - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 路线规划(步行) - async walkingRoute(data = {}) { - let { - mode, - from, - to, - to_poi - } = data; - - let requestRes = await this.request({ - method: "GET", - url: `ws/direction/v1/walking`, - dataType: "json", - data: { - from, - to, - to_poi - } - }); - - let originalResult = requestRes.originalResult.result; - let routes = originalResult.routes.map((item) => { - let steps = item.steps.map((item2) => { - return { - instruction: item2.instruction, - road_name: item2.road_name, - dir_desc: item2.dir_desc, - distance: item2.distance, - act_desc: item2.act_desc, - type: item2.type, - polyline: this.getPolyline(item.polyline, item2.polyline_idx), - polyline_idx: item2.polyline_idx, - } - }); - - return { - mode: "walking", - distance: item.distance, - duration: item.duration, - direction: item.direction, - polyline: this.polylineFormat(item.polyline), - steps - } - }); - let result = { - routes - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 路线规划(骑行) - async bicyclingRoute(data = {}) { - let { - mode, - from, - to, - to_poi - } = data; - - let requestRes = await this.request({ - method: "GET", - url: `ws/direction/v1/bicycling`, - dataType: "json", - data: { - from, - to, - to_poi - } - }); - - let originalResult = requestRes.originalResult.result; - let routes = originalResult.routes.map((item) => { - let steps = item.steps.map((item2) => { - return { - instruction: item2.instruction, - road_name: item2.road_name, - dir_desc: item2.dir_desc, - distance: item2.distance, - act_desc: item2.act_desc, - polyline: this.getPolyline(item.polyline, item2.polyline_idx), - polyline_idx: item2.polyline_idx - } - }); - - return { - mode: "bicycling", - distance: item.distance, - duration: item.duration, - direction: item.direction, - polyline: this.polylineFormat(item.polyline), - steps - } - }); - let result = { - routes - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 路线规划(电动车) - async ebicyclingRoute(data = {}) { - let { - mode, - from, - to, - to_poi - } = data; - - let requestRes = await this.request({ - method: "GET", - url: `ws/direction/v1/ebicycling`, - dataType: "json", - data: { - from, - to, - to_poi - } - }); - - let originalResult = requestRes.originalResult.result; - let routes = originalResult.routes.map((item) => { - let steps = item.steps.map((item2) => { - return { - instruction: item2.instruction, - polyline_idx: item2.polyline_idx, - road_name: item2.road_name, - dir_desc: item2.dir_desc, - distance: item2.distance, - act_desc: item2.act_desc, - polyline: this.getPolyline(item.polyline, item2.polyline_idx) - } - }); - - return { - mode: "ebicycling", - distance: item.distance, - duration: item.duration, - direction: item.direction, - polyline: this.polylineFormat(item.polyline), - steps - } - }); - let result = { - routes - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // API - 路线规划(公交) - async transitRoute(data = {}) { - let { - mode, - from, - to, - from_poi, - to_poi, - departure_time, - policy - } = data; - - let requestRes = await this.request({ - method: "GET", - url: `ws/direction/v1/transit`, - dataType: "json", - data: { - from, - to, - from_poi, - to_poi, - departure_time, - policy - } - }); - - let originalResult = requestRes.originalResult.result; - let routes = originalResult.routes.map((item) => { - let steps = item.steps.map((item2) => { - let mode = item2.mode.toLowerCase(); - if (mode === "walking") { - // 步行 - return { - mode: mode, - distance: item2.distance, - duration: item2.duration, - direction: item2.direction, - polyline: this.polylineFormat(item2.polyline), - steps: item2.steps ? item2.steps.map((item3) => { - return { - instruction: item3.instruction, - road_name: item3.road_name, - act_desc: item3.dir_desc, - distance: item3.distance, - polyline: this.getPolyline(item2.polyline, item3.polyline_idx), - polyline_idx: item3.polyline_idx, - } - }) : undefined, - } - } else { - // 非步行 - return { - mode: mode, - lines: item2.lines.map((item3) => { - return { - ...item3, - price: item3.vehicle !== "RAIL" ? this.priceFormat(item3.price) : item3.price, - polyline: this.polylineFormat(item3.polyline) - } - }) - } - } - }); - - return { - mode: "transit", - distance: item.distance, - duration: item.duration, - bounds: item.bounds, - steps - } - }); - let result = { - routes - }; - let res = { - result, - ...requestRes - }; - return res; - } - - // 格式化polyline,将压缩的polyline还原成完整的经纬度 - polylineFormat(polyline) { - try { - let coors = JSON.parse(JSON.stringify(polyline)); - for (let i = 2; i < coors.length; i++) { - coors[i] = parseFloat((coors[i - 2] + coors[i] / 1000000).toFixed(6)); - } - return coors; - } catch (err) { - return ""; - } - } - - // 格式化价格,将以分为单位的价格转元,保留2位小数 - priceFormat(price) { - try { - if (price === "" || price == -1) { - return -1; - } else { - return parseFloat((price / 100).toFixed(2)); - } - } catch (err) { - return -1; - } - } - - getPolyline(polyline, polyline_idx) { - let polylineArr = this.polylineFormat(polyline); - if (typeof polyline_idx == "object") { - let arr = polylineArr.slice(polyline_idx[0], polyline_idx[1] + 1); - let str = ""; - arr.map((item, index) => { - if (index % 2 === 0) { - str += `${item}` - } else { - str += `,${item};` - } - }); - // 去除最后一个; - if (str.lastIndexOf(";") === str.length - 1) { - str = str.substring(0, str.length - 1); - } - return str; - } else { - return polylineArr[polyline_idx] + "," + polylineArr[polyline_idx + 1]; - } - - } - -} -module.exports = Service; \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/uni-map-co/index.obj.js b/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/uni-map-co/index.obj.js deleted file mode 100644 index 424f47a..0000000 --- a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/uni-map-co/index.obj.js +++ /dev/null @@ -1,558 +0,0 @@ -// 引入uni-map-common公共模块 -const UniMap = require('uni-map-common'); - -const configCenter = require("uni-config-center"); - -// 读取配置中心地图配置 -var UniMapConfig = configCenter({ pluginId: 'uni-map' }).requireFile('config.js'); - -// 本地地图配置 -var LocalMapConfig = { - "default": "", // 默认使用的平台 - "key": { - "qqmap": "", // 腾讯地图key - "amap": "", // 高德地图key - } -} - -const db = uniCloud.database(); -const _ = db.command; -const $ = _.aggregate; - -const opendbPoiDB = db.collection("opendb-poi"); - -class MyError extends Error { - constructor(errMsg, errCode = -1) { - super(errMsg); - this.err = { - errCode, - errMsg - } - } -} - -module.exports = { - _before: function() { - // 如果配置中心不存在地图配置,则使用本地地图配置 - if (!UniMapConfig) { - UniMapConfig = LocalMapConfig; - } - let defaultProvider = UniMapConfig.default || "qqmap"; - let params = this.getParams(); - let { - provider = defaultProvider, - needOriginalResult = false - } = params[0] || {}; - const key = UniMapConfig.key[provider] || LocalMapConfig.key[provider]; - if (!key) { - throw { errCode: -1, errMsg: `请在uni-config-center/uni-map/config.js中或LocalMapConfig中配置地图供应商${provider}对应的key` }; - } - // 初始化实例 - let uniMap = new UniMap({ - provider: provider, // 指定使用哪家地图供应商 - key: key, - needOriginalResult - }); - this.uniMap = uniMap; - // // 在这里可以做一些统一的前置处理,比如权限校验、参数校验等 - // let { - // payload, // payload参数为前端传递的参数,可以在前端调用uni.chooseLocation时传递 - // } = this.getParams()[0] || {}; - // if (!payload) { - // throw new MyError("payload参数不能为空", -1); - // } - // // 如果业务在uniCloud上,则直接在这里写判断逻辑即可 - // if (true) { - // throw new MyError("权限不足", -1); - // } - - // // 如果业务不在uniCloud上,可通过 uniCloud.request 调用自己的服务进行校验 - // const requestRes = await uniCloud.request({ - // method: 'POST', - // url: '你自己的接口地址', - // data: payload, - // }); - // // 约定errCode不为0代表校验失败,errMsg为失败原因 - // if (requestRes.data.errCode !== 0) { - // throw new MyError(requestRes.data.errMsg, requestRes.data.errCode); - // } - - }, - _after: function(err, res) { - if (err) { - if (err.err) { - return err.err; - } - if (err.errCode) { - return err; - } - throw err; // 如果方法抛出错误,也直接抛出不处理 - } - console.log("result", res.result); - return res; - }, - // 函数chooseLocation是给uni.chooseLocation使用,请勿修改chooseLocation函数的代码 - async chooseLocation(parame = {}) { - let res = {}; - let { - action, - data, - needOriginalResult - } = parame; - // 获取uniMap实例 - const uniMap = this.uniMap; - // 调用API - let result = await uniMap[action](data); - res.result = needOriginalResult ? result.originalResult : result; - // 模拟错误 - // res.errCode = 121; - // res.errMsg = '此key每日调用量已达到上限' - return res; - }, - // 经纬度坐标转地址 - async location2address(data = {}) { - let res = {}; - // 获取uniMap实例 - const uniMap = this.uniMap; - // 调用API - let result = await uniMap.location2address(data); - res.result = result; - return res; - }, - // 地址转经纬度坐标 - async address2location(data = {}) { - let res = {}; - // 获取uniMap实例 - const uniMap = this.uniMap; - // 调用API - let result = await uniMap.address2location(data); - res.result = result; - return res; - }, - // 坐标系转换 - async translate(data = {}) { - let res = {}; - // 获取uniMap实例 - const uniMap = this.uniMap; - // 调用API - let result = await uniMap.translate(data); - res.result = result; - return res; - }, - // ip定位 - async ip2location(data = {}) { - let res = {}; - // 获取uniMap实例 - const uniMap = this.uniMap; - // 调用API - let result = await uniMap.ip2location(data); - res.result = result; - return res; - }, - // 输入提示 - async inputtips(data = {}) { - let res = {}; - // 获取uniMap实例 - const uniMap = this.uniMap; - // 调用API - let result = await uniMap.inputtips(data); - res.result = result; - return res; - }, - - // 搜索 - async search(data = {}) { - let res = {}; - // 获取uniMap实例 - const uniMap = this.uniMap; - // 调用API - let result = await uniMap.search(data); - res.result = result; - return res; - }, - - // 行政区划 - async districtSearch(data = {}) { - let res = {}; - // 获取uniMap实例 - const uniMap = this.uniMap; - // 调用API - let result = await uniMap.districtSearch(data); - res.result = result; - return res; - }, - - // 路径规划 - async route(data = {}) { - let res = {}; - // 获取uniMap实例 - const uniMap = this.uniMap; - // 调用API - let result = await uniMap.route(data); - res.result = result; - return res; - }, - - // 演示用 - 清空所有的测试POI - async clearPoi(data = {}) { - let res = { errCode: 0 }; - const db = uniCloud.database(); - await db.collection("opendb-poi").where({ - is_random: true - }).remove(); - return res; - }, - - // 演示用 - 初始化静态001场景演示数据 - async initStatic001(data = {}) { - let res = { errCode: 0 }; - const category = "static-001"; - // 先删除 - await opendbPoiDB.where({ - category: category - }).remove(); - // 后添加随机数据 - - // 以天安门为中心 - let tiananmen = { - longitude: 116.39747, - latitude: 39.908823, - }; - let time = Date.now(); - - // 随机生成6个门店地址 - let list = []; - for (let i = 1; i <= 6; i++) { - let randomCoordinate = getRandomCoordinateWithinRadius(tiananmen.longitude, tiananmen.latitude, 10); // 随机生成在天安门方圆X KM内的坐标 - list.push({ - category: category, // 场景值,用于区分这些POI所属哪张地图 - type: "门店", - title: `随机门店-${i}`, - location: new db.Geo.Point(randomCoordinate.longitude, randomCoordinate.latitude), - create_date: time, - visible: true, - is_random: true, // 表示此为随机生成的点,方便删除 - level: i - }); - } - // 随机生成1个总部地址 - let randomCoordinate = getRandomCoordinateWithinRadius(tiananmen.longitude, tiananmen.latitude, 1); // 随机生成在天安门方圆X KM内的坐标 - list.push({ - category: category, // 场景值,用于区分这些POI所属哪张地图 - type: "总部", - title: `随机总部`, - location: new db.Geo.Point(randomCoordinate.longitude, randomCoordinate.latitude), - create_date: time, - visible: true, - is_random: true, // 表示此为随机生成的点,方便删除 - level: 7 - }); - - // 添加到数据库 - await opendbPoiDB.add(list); - - return res; - }, - - // 演示用 - 初始化动态001场景演示数据(模拟送外卖场景) - async initDynamics001(data = {}) { - let res = { errCode: 0 }; - - const category = "dynamics-001"; - - // 先删除 - await opendbPoiDB.where({ - category: category - }).remove(); - // 后添加随机数据 - - // 以天安门为中心 - let tiananmen = { - longitude: 116.39747, - latitude: 39.908823, - }; - - let time = Date.now(); - - // 随机生成配送员坐标 - let randomCoordinate1 = getRandomCoordinateWithinRadius(tiananmen.longitude, tiananmen.latitude, 2); // 随机生成在天安门方圆X KM内的坐标 - let data1 = { - category: category, // 场景值,用于区分这些POI所属哪张地图 - type: "配送员", - title: "配送员", - location: new db.Geo.Point(randomCoordinate1.longitude, randomCoordinate1.latitude), - create_date: time, - visible: true, - is_random: true, // 表示此为随机生成的点,方便删除 - } - // 随机生成目的地坐标 - let randomCoordinate2 = getRandomCoordinateWithinRadius(tiananmen.longitude, tiananmen.latitude, 2); // 随机生成在天安门方圆X KM内的坐标 - let data2 = { - category: category, // 场景值,用于区分这些POI所属哪张地图 - type: "目的地", - title: "配送目的地", - location: new db.Geo.Point(randomCoordinate2.longitude, randomCoordinate2.latitude), - create_date: time, - visible: true, - is_random: true, // 表示此为随机生成的点,方便删除 - } - let list = [data1, data2]; - // 添加到数据库 - await opendbPoiDB.add(list); - - // 获取配送路线 - // 获取uniMap实例 - const uniMap = this.uniMap; - // 调用电瓶车路径规划API - let result = await uniMap.route({ - mode: "ebicycling", - from: `${randomCoordinate1.latitude},${randomCoordinate1.longitude}`, - to: `${randomCoordinate2.latitude},${randomCoordinate2.longitude}`, - alternative_route: 1 - }); - - let route = result.result.routes[0]; - let { steps = [] } = route; - let points = []; - steps.map((step) => { - let { - polyline = "" - } = step; - let arr = polyline.split(";"); - arr.map((item) => { - let arr2 = item.split(","); - points.push({ - latitude: arr2[0], - longitude: arr2[1], - }); - }); - }); - let polyline = { - points, - color: "#19b411", - width: 6, - dottedLine: false, - arrowLine: true, - borderWidth: 1, - borderColor: "#000000", - }; - res.polyline = [polyline]; - return res; - }, - - // 演示用 - 获取配送员配送路径 - async getPolyline(data = {}) { - let res = { errCode: 0 }; - - const category = "dynamics-001"; - - let getRes1 = await opendbPoiDB.where({ - category: category, - type: "配送员", - visible: true - }).get(); - let poi1 = getRes1.data[0]; - - let getRes2 = await opendbPoiDB.where({ - category: category, - type: "目的地", - visible: true - }).get(); - let poi2 = getRes2.data[0]; - if (!poi2) { - return { - errCode: 0, - end: true - } - } - - let coordinate1 = { - longitude: poi1.location.coordinates[0], - latitude: poi1.location.coordinates[1] - }; - - let coordinate2 = { - longitude: poi2.location.coordinates[0], - latitude: poi2.location.coordinates[1] - }; - - // 获取uniMap实例 - const uniMap = this.uniMap; - // 调用电瓶车路径规划API - let result = await uniMap.route({ - mode: "ebicycling", - from: `${coordinate1.latitude},${coordinate1.longitude}`, - to: `${coordinate2.latitude},${coordinate2.longitude}`, - alternative_route: 1 - }); - - let route = result.result.routes[0]; - //console.log('route: ', route) - let { steps = [], distance, duration } = route; - let points = []; - let dir_desc; - steps.map((step) => { - let { - polyline = "" - } = step; - if (!dir_desc) dir_desc = step.dir_desc; - if (polyline) { - let arr = polyline.split(";"); - arr.map((item) => { - let arr2 = item.split(","); - if (!isNaN(arr2[0]) && !isNaN(arr2[1])) { - points.push({ - latitude: Number(arr2[0]), - longitude: Number(arr2[1]), - }); - } - }); - } - }); - let polyline = { - points, - color: "#19b411", - width: 6, - dottedLine: false, - arrowLine: true, - borderWidth: 1, - borderColor: "#000000", - }; - res.polyline = [polyline]; - if (distance <= 30 || duration <= 0) { - await opendbPoiDB.doc(poi1._id).update({ - title: `配送员已到达目的地`, - location: new db.Geo.Point(Number(coordinate2.longitude), Number(coordinate2.latitude)), - rotate: 0 - }); - // 隐藏目的地 - await opendbPoiDB.doc(poi2._id).update({ - visible: false, - }); - return { - errCode: 0, - end: true - } - } else { - // 从最近2个点计算出当前行驶方向 - let rotate = 0; - if (points && points.length >= 2) { - rotate = calculateDirectionAngle(points[0], points[1]); - } - await opendbPoiDB.doc(poi1._id).update({ - title: `配送员正在配送\r\n还有 ${distance} 米\r\n预计 ${duration} 分钟送达`, - rotate: rotate, // 设置角度,0°的图片方向应朝左(西) 故90° 朝上(北) 180° 朝右(东) 270° 朝下(南) - }); - } - return res; - }, - // 演示用 - 模拟上报配送员坐标 - async updateMyLocation(data = {}) { - let res = {}; - - const category = "dynamics-001"; - - let { - longitude, - latitude - } = data; - - let getRes1 = await opendbPoiDB.where({ - category: category, - type: "配送员", - visible: true - }).get(); - let poi1 = getRes1.data[0]; - - await opendbPoiDB.doc(poi1._id).update({ - location: new db.Geo.Point(Number(longitude), Number(latitude)) - }); - return res; - }, - - // 演示用 - xxxx - async test(data = {}) { - let res = {}; - // 获取uniMap实例 - const uniMap = this.uniMap; - // 调用API - let result = await uniMap.location2address({ - - }); - res.result = result; - return res; - } -} - - - -/** - * 生成在指定经纬度圆内的随机坐标 - -const latitude = 39.908823; // 指定纬度 -const longitude = 116.39747; // 指定经度 -const radiusInKm = 10; // 指定圆的半径(单位:千米) - -const randomCoordinate = getRandomCoordinateWithinRadius(latitude, longitude, radiusInKm); -console.log(randomCoordinate); - - */ -function getRandomCoordinateWithinRadius(longitude, latitude, radiusInKm) { - // 地球半径(单位:千米) - const earthRadius = 6371; - - // 将圆的半径转换为弧度 - const radiusInRad = radiusInKm / earthRadius; - - // 生成随机的方位角(弧度,0到2π) - const randomAngleRad = Math.random() * 2 * Math.PI; - - // 生成随机的距离(弧度,0到圆的半径) - const randomDistanceRad = Math.acos(Math.random() * (Math.cos(radiusInRad) - 1) + 1); - - // 使用球面三角学计算随机点的纬度和经度 - const randomLatitudeRad = latitude * (Math.PI / 180) + randomDistanceRad * Math.cos(randomAngleRad); - const randomLongitudeRad = longitude * (Math.PI / 180) + randomDistanceRad * Math.sin(randomAngleRad) / Math.cos(latitude * (Math.PI / 180)); - - // 转换为度,并保留6位小数 - const randomLatitude = parseFloat((randomLatitudeRad * (180 / Math.PI)).toFixed(6)); - const randomLongitude = parseFloat((randomLongitudeRad * (180 / Math.PI)).toFixed(6)); - - return { latitude: randomLatitude, longitude: randomLongitude }; -} - - -/** - * 计算坐标B在坐标A的方向,0代表正西方 90 代表正北方 - -const latitude = 39.908823; // 指定纬度 -const longitude = 116.39747; // 指定经度 -const radiusInKm = 10; // 指定圆的半径(单位:千米) - -const randomCoordinate = getRandomCoordinateWithinRadius(latitude, longitude, radiusInKm); -console.log(randomCoordinate); - - */ -function calculateDirectionAngle(coordA, coordB) { - const toRadians = (angle) => angle * (Math.PI / 180); - const toDegrees = (angle) => angle * (180 / Math.PI); - - const lat1 = toRadians(coordA.latitude); - const lon1 = toRadians(coordA.longitude); - const lat2 = toRadians(coordB.latitude); - const lon2 = toRadians(coordB.longitude); - - const dLon = lon2 - lon1; - const y = Math.sin(dLon) * Math.cos(lat2); - const x = - Math.cos(lat1) * Math.sin(lat2) - - Math.sin(lat1) * Math.cos(lat2) * Math.cos(dLon); - const angleRadians = Math.atan2(y, x); - - let angleDegrees = toDegrees(angleRadians); - angleDegrees = (angleDegrees + 360) % 360; - - angleDegrees = (angleDegrees > 180) ? angleDegrees - 180 : angleDegrees + 180; - angleDegrees -= 90; // 以正西方为0°表示,因此需要-90 - return angleDegrees; -} diff --git a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/uni-map-co/package.json b/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/uni-map-co/package.json deleted file mode 100644 index 880fbe8..0000000 --- a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/uni-map-co/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "uni-map-co", - "dependencies": { - "uni-config-center": "file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center", - "uni-map-common": "file:../common/uni-map-common" - }, - "extensions": {}, - "origin-plugin-dev-name": "uni-map-common", - "origin-plugin-version": "1.1.4", - "plugin-dev-name": "hello-uniapp-x", - "plugin-version": "1.0.44" -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/uni-map-co/uni-map-co.param.js b/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/uni-map-co/uni-map-co.param.js deleted file mode 100644 index 83b4140..0000000 --- a/mpuniapp/uni_modules/uni-map-common/uniCloud/cloudfunctions/uni-map-co/uni-map-co.param.js +++ /dev/null @@ -1,123 +0,0 @@ -// chooseLocation({ -// action: "location2address", -// needOriginalResult: true, -// data: { -// location: "39.908815,116.397507", -// get_poi: 1, -// poi_options: { -// address_format: "short", -// radius: 5000, -// policy: 4, -// //poitype: "010101", -// roadlevel: 1, -// homeorcorp: 1, -// page_index: 1, -// page_size: 1, -// } -// } -// }) - -// location2address({ -// location: "39.908815,116.397507", -// get_poi: 1, -// poi_options: { -// address_format: "short", -// radius: 5000, -// policy: 4, -// //poitype: "010101", -// roadlevel: 1, -// homeorcorp: 1 -// } -// }); - -address2location({ - address: "北京市海淀区彩和坊路海淀西大街74号", - city: "北京" -}); - -// translate({ -// locations: [ -// { lat: 39.908815, lng: 116.397507 }, -// { lat: 39.908815, lng: 116.397107 } -// ], -// type: 3 -// }); - -// ip定位 -// ip2location({ -// ip: "111.206.145.41" -// }); - -// 输入提示 -// inputtips({ -// keyword: "人民医院", -// city: "北京市", -// datatype: "all", -// get_subpois: 1 -// }); - -// 周边搜索 -// search({ -// keyword: "酒店", -// location: { -// lat: 39.908815, -// lng: 116.397507 -// }, -// radius: 1000, -// auto_extend: 1, -// get_subpois: 1, -// orderby: "weight", -// page_index: 1, -// page_size: 20, -// city: "北京市" -// }); - -// 行政区划 -// districtSearch({ -// adcode: "110000", -// get_polygon: 2, -// max_offset: 500, -// subdistrict: 2 -// }); - -// 导航 - 驾车 -// route({ -// mode: "driving", -// from: "39.808815,116.387507", -// to: "39.908815,116.397507", -// get_mp: 1, -// }); - -// 导航 - 步行 -// route({ -// mode: "walking", -// from: "40.034852,116.319820", -// to: "39.771075,116.351395", -// alternative_route: 3 -// }); - -// 导航 - 骑行 -// route({ -// mode: "bicycling", -// from: "40.034852,116.319820", -// to: "39.771075,116.351395", -// alternative_route: 3 -// }); - -// 导航 - 电动车 -// route({ -// mode: "ebicycling", -// from: "40.034852,116.319820", -// to: "39.771075,116.351395", -// alternative_route: 3 -// }); - -// 导航 - 公交 -// route({ -// mode: "transit", -// from: "40.034852,116.319820", -// to: "29.771075,116.351395", -// //alternative_route: 3, -// city1: "010", -// city2: "0792", -// }); \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-nav-bar-x/changelog.md b/mpuniapp/uni_modules/uni-nav-bar-x/changelog.md deleted file mode 100644 index 8c6e0d5..0000000 --- a/mpuniapp/uni_modules/uni-nav-bar-x/changelog.md +++ /dev/null @@ -1,4 +0,0 @@ -## 1.0.1(2026-05-20) -- 纠正类名拼写错误 -## 1.0.0(2026-05-07) -- 支持 uni-nav-bar 组件 diff --git a/mpuniapp/uni_modules/uni-nav-bar-x/components/uni-nav-bar/uni-nav-bar.uvue b/mpuniapp/uni_modules/uni-nav-bar-x/components/uni-nav-bar/uni-nav-bar.uvue deleted file mode 100644 index 9ad2ae7..0000000 --- a/mpuniapp/uni_modules/uni-nav-bar-x/components/uni-nav-bar/uni-nav-bar.uvue +++ /dev/null @@ -1,327 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-nav-bar-x/package.json b/mpuniapp/uni_modules/uni-nav-bar-x/package.json deleted file mode 100644 index 98946ee..0000000 --- a/mpuniapp/uni_modules/uni-nav-bar-x/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "id": "uni-nav-bar-x", - "displayName": "uni-nav-bar", - "version": "1.0.1", - "description": "uni-nav-bar", - "isExt": true, - "extUrl": "https://ext.dcloud.net.cn/plugin?id=27897", - "keywords": [ - "uni-nav-bar", - "uni-app-x", - "导航栏", - "组件" - ], - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "engines": { - "HBuilderX": "^5.0", - "uni-app-x": "^5.07", - "uni-app": "" - }, - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "type": "component-vue", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "darkmode": "x", - "i18n": "x", - "widescreen": "x", - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "x", - "aliyun": "x", - "alipay": "x" - }, - "client": { - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": "√", - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-nav-bar-x/readme.md b/mpuniapp/uni_modules/uni-nav-bar-x/readme.md deleted file mode 100644 index 3afd216..0000000 --- a/mpuniapp/uni_modules/uni-nav-bar-x/readme.md +++ /dev/null @@ -1,61 +0,0 @@ -自定义导航栏组件 - -在页面pages.json中关闭原生导航栏后,即使用`"style": {"navigationStyle": "custom"}`,可以使用本组件实现自定义导航栏。 - -同时注意在pages.json中配置页面style增加属性`disableScroll:true`,即禁止页面滚动。此时只有uni-nav-bar组件的下方才可以滚动。否则页面的回弹bounce效果会把自定义导航栏也拉下来。 - -本组件自动适配顶部安全区。用padding-top让出顶部状态栏的高度。除去状态栏高度后,本组件的高度为44px。 - -本组件左右两边默认各让出了6px的边距。也可以在left-class和right-class中自定义边距。 - -本组件分为left、mid、right 3个区域。 - -- left区域默认显示一个返回箭头,大小为44*44px。可以通过属性hideDefaultBack来隐藏,也可以传入一个slot name='left'来替代。可以通过left-class来修饰样式。 -- mid区域默认显示title属性设置的标题。也可以传入一个slot name='mid'来替代。其默认宽度为屏幕宽度-两边默认边距-left区域默认宽度-right区域默认宽度。可以通过mid-class来修饰样式。 -- right区域默认不显示内容,可以传入一个slot name='right'来显示自定义内容。right区域默认width也是44px,可以通过right-class来修饰样式。 - -支持属性: -- hideDefaultBack: 隐藏返回箭头 -- title: 通过属性方便设置标题。如果传入mid slot,则不生效 -- navigationBarTextStyle: 返回箭头和属性设置的标题,它们的颜色均由该属性控制,可选 white|black - -本组件默认没有背景色,即透明,会透显页面的背景色。开发者可通过组件的class自行设置背景色 - -在小程序端,如果需要规避右上角胶囊按钮,可以参考下方代码设置 margin-right 让出胶囊按钮的宽度和右侧间距。 - -```html - - - - - -``` diff --git a/mpuniapp/uni_modules/uni-number-box-x/changelog.md b/mpuniapp/uni_modules/uni-number-box-x/changelog.md deleted file mode 100644 index da36588..0000000 --- a/mpuniapp/uni_modules/uni-number-box-x/changelog.md +++ /dev/null @@ -1,2 +0,0 @@ -## 1.0.0(2026-05-07) -- 支持 uni-number-box 组件 diff --git a/mpuniapp/uni_modules/uni-number-box-x/components/uni-number-box/uni-number-box.uvue b/mpuniapp/uni_modules/uni-number-box-x/components/uni-number-box/uni-number-box.uvue deleted file mode 100644 index 9c7e462..0000000 --- a/mpuniapp/uni_modules/uni-number-box-x/components/uni-number-box/uni-number-box.uvue +++ /dev/null @@ -1,746 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-number-box-x/package.json b/mpuniapp/uni_modules/uni-number-box-x/package.json deleted file mode 100644 index 4246d39..0000000 --- a/mpuniapp/uni_modules/uni-number-box-x/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "id": "uni-number-box-x", - "displayName": "uni-number-box 数字输入框", - "version": "1.0.1", - "description": "NumberBox 带加减按钮的数字输入框组件,用户可以控制每次点击增加的数值,支持小数。", - "isExt": true, - "extUrl": "https://ext.dcloud.net.cn/plugin?id=27896", - "keywords": [ - "uni-ui", - "uniui", - "数字输入框", - "uni-app-x" -], - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "engines": { - "HBuilderX": "", - "uni-app": "", - "uni-app-x": "^5.07" - }, - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "type": "component-vue", - "darkmode": "x", - "i18n": "x", - "widescreen": "x", - "npmurl": "" - }, - "uni_modules": { - "dependencies": [ - ], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "x", - "aliyun": "x", - "alipay": "x" - }, - "client": { - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": "√", - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-number-box-x/readme.md b/mpuniapp/uni_modules/uni-number-box-x/readme.md deleted file mode 100644 index 6665c76..0000000 --- a/mpuniapp/uni_modules/uni-number-box-x/readme.md +++ /dev/null @@ -1,58 +0,0 @@ -带加减按钮的数字输入框,常见于购物车商品数量选择。 - -### 基本用法 - -```html - -``` - -### 设置范围 - -```html - -``` - -### 设置步长 - -```html - - - - - -``` - -### 禁用状态 - -```html - -``` - -### 自定义样式 - -通过 `btn-class`、`input-class`、`icon-class` 自定义组件样式: - -```html - -``` - -```css -.custom-btn { - background-color: #007aff; -} -.custom-input { - background-color: #e8f4ff; - color: #007aff; -} -.custom-icon { - background-color: #fff; -} -``` - -### Events - -| 事件名 | 说明 | 回调参数 | -| --- | --- | --- | -| change | 值改变时触发 | value: number | -| focus | 输入框聚焦时触发 | event: UniInputFocusEvent | -| blur | 输入框失焦时触发 | event: UniInputBlurEvent | diff --git a/mpuniapp/uni_modules/uni-openLocation/changelog.md b/mpuniapp/uni_modules/uni-openLocation/changelog.md deleted file mode 100644 index 71ee776..0000000 --- a/mpuniapp/uni_modules/uni-openLocation/changelog.md +++ /dev/null @@ -1,12 +0,0 @@ -## 1.1.0(2025-03-21) -新增 支持编译到鸿蒙 -## 1.0.4(2024-12-17) -调整target.png文件所在位置 -## 1.0.3(2024-12-16) -升级 uts-openSchema 依赖至1.1.1 -## 1.0.2(2024-12-10) -ios端支持侧滑关闭 -## 1.0.1(2024-12-10) -插件新增文件pages_init.json,方便注册页面 -## 1.0.0(2024-12-09) -发布API uni.openLocation 需 HBuilderX 4.41+ diff --git a/mpuniapp/uni_modules/uni-openLocation/package.json b/mpuniapp/uni_modules/uni-openLocation/package.json deleted file mode 100644 index e2c59d2..0000000 --- a/mpuniapp/uni_modules/uni-openLocation/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "id": "uni-openLocation", - "displayName": "uni-openLocation", - "version": "1.1.0", - "description": "APP端的 uni.openLocation,仅支持uni-app x,不支持uni-app", - "keywords": [ - "uni-openLocation" -], - "repository": "", - "engines": { - "HBuilderX": "^4.41" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "插件不采集任何数据", - "permissions": "无" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [ - "uts-openSchema" - ], - "uni-ext-api": { - "uni": { - "openLocation": { - "name": "openLocation", - "app": { - "js": false, - "kotlin": true, - "swift": true, - "arkts": true - } - } - } - }, - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "y", - "aliyun": "y", - "alipay": "y" - }, - "client": { - "Vue": { - "vue2": "n", - "vue3": "y" - }, - "App": { - "app-android": "y", - "app-ios": "y", - "app-harmony": "y" - }, - "H5-mobile": { - "Safari": "y", - "Android Browser": "y", - "微信浏览器(Android)": "y", - "QQ浏览器(Android)": "y" - }, - "H5-pc": { - "Chrome": "y", - "IE": "n", - "Edge": "y", - "Firefox": "y", - "Safari": "y" - }, - "小程序": { - "微信": "n", - "阿里": "n", - "百度": "n", - "字节跳动": "n", - "QQ": "n", - "钉钉": "n", - "快手": "n", - "飞书": "n", - "京东": "n" - }, - "快应用": { - "华为": "n", - "联盟": "n" - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-openLocation/pages/openLocation/openLocation.uvue b/mpuniapp/uni_modules/uni-openLocation/pages/openLocation/openLocation.uvue deleted file mode 100644 index 04e057e..0000000 --- a/mpuniapp/uni_modules/uni-openLocation/pages/openLocation/openLocation.uvue +++ /dev/null @@ -1,572 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-openLocation/pages/openLocation/target.png b/mpuniapp/uni_modules/uni-openLocation/pages/openLocation/target.png deleted file mode 100644 index 8c13882..0000000 Binary files a/mpuniapp/uni_modules/uni-openLocation/pages/openLocation/target.png and /dev/null differ diff --git a/mpuniapp/uni_modules/uni-openLocation/pages_init.json b/mpuniapp/uni_modules/uni-openLocation/pages_init.json deleted file mode 100644 index ce382fe..0000000 --- a/mpuniapp/uni_modules/uni-openLocation/pages_init.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "pages": [ - { - "path": "uni_modules/uni-openLocation/pages/openLocation/openLocation", - "style": { - "navigationBarTitleText": " ", - "navigationStyle": "custom", - "disableSwipeBack": false - } - } - ] -} diff --git a/mpuniapp/uni_modules/uni-openLocation/readme.md b/mpuniapp/uni_modules/uni-openLocation/readme.md deleted file mode 100644 index 38843bc..0000000 --- a/mpuniapp/uni_modules/uni-openLocation/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -# uni-openLocation - -> Android 和 iOS 需 HBuilderX 4.41+ -> -> Harmony 需 HBuilderX 4.61+ - -[使用文档](https://doc.dcloud.net.cn/uni-app-x/api/open-location.html) - -**注意:此插件只支持uni-app x,不支持uni-app** diff --git a/mpuniapp/uni_modules/uni-openLocation/utssdk/app-android/index.uts b/mpuniapp/uni_modules/uni-openLocation/utssdk/app-android/index.uts deleted file mode 100644 index 3f14b68..0000000 --- a/mpuniapp/uni_modules/uni-openLocation/utssdk/app-android/index.uts +++ /dev/null @@ -1,36 +0,0 @@ -import { OpenLocation, OpenLocationOptions, OpenLocationSuccessImpl, OpenLocationErrorCode } from "../interface.uts" -import { OpenLocationFailImpl } from "../unierror.uts" - -export const openLocation : OpenLocation = function (options : OpenLocationOptions) { - const uuid = `${Date.now()}${Math.floor(Math.random() * 1e7)}` - const baseEventName = `uni_open_location_${uuid}` - const readyEventName = `${baseEventName}_ready` - const optionsEventName = `${baseEventName}_options` - const successEventName = `${baseEventName}_success` - const failEventName = `${baseEventName}_fail` - - const readyEventId = uni.$on(readyEventName, () => { - uni.$emit(optionsEventName, JSON.parse(JSON.stringify(options))) - }) - const successEventId = uni.$on(successEventName, () => { - const res = new OpenLocationSuccessImpl() - options.success?.(res) - options.complete?.(res) - }) - const failEventId = uni.$on(failEventName, (errCode : OpenLocationErrorCode) => { - const res = new OpenLocationFailImpl(errCode) - options.fail?.(res) - options.complete?.(res) - }) - uni.openDialogPage({ - url: `/uni_modules/uni-openLocation/pages/openLocation/openLocation?readyEventName=${readyEventName}&optionsEventName=${optionsEventName}&successEventName=${successEventName}&failEventName=${failEventName}`, - fail(err) { - const res = new OpenLocationFailImpl(4) - options.fail?.(res) - options.complete?.(res) - uni.$off(readyEventName, readyEventId) - uni.$off(successEventName, successEventId) - uni.$off(failEventName, failEventId) - } - }) -}; diff --git a/mpuniapp/uni_modules/uni-openLocation/utssdk/app-harmony/index.uts b/mpuniapp/uni_modules/uni-openLocation/utssdk/app-harmony/index.uts deleted file mode 100644 index 7694f65..0000000 --- a/mpuniapp/uni_modules/uni-openLocation/utssdk/app-harmony/index.uts +++ /dev/null @@ -1,36 +0,0 @@ -import { OpenLocation, OpenLocationOptions, OpenLocationSuccessImpl, OpenLocationErrorCode } from "../interface.uts" -import { OpenLocationFailImpl } from "../unierror.uts" - -export const openLocation : OpenLocation = function (options : OpenLocationOptions) { - const uuid = `${Date.now()}${Math.floor(Math.random() * 1e7)}` - const baseEventName = `uni_open_location_${uuid}` - const readyEventName = `${baseEventName}_ready` - const optionsEventName = `${baseEventName}_options` - const successEventName = `${baseEventName}_success` - const failEventName = `${baseEventName}_fail` - - const readyEventId = uni.$on(readyEventName, () => { - uni.$emit(optionsEventName, JSON.parse(JSON.stringify(options))) - }) - const successEventId = uni.$on(successEventName, () => { - const res = new OpenLocationSuccessImpl() - options.success?.(res) - options.complete?.(res) - }) - const failEventId = uni.$on(failEventName, (errCode : OpenLocationErrorCode) => { - const res = new OpenLocationFailImpl(errCode) - options.fail?.(res) - options.complete?.(res) - }) - uni.openDialogPage({ - url: `/uni_modules/uni-openLocation/pages/openLocation/openLocation?readyEventName=${readyEventName}&optionsEventName=${optionsEventName}&successEventName=${successEventName}&failEventName=${failEventName}`, - fail(err) { - const res = new OpenLocationFailImpl(4) - options.fail?.(res) - options.complete?.(res) - uni.$off(readyEventName, readyEventId) - uni.$off(successEventName, successEventId) - uni.$off(failEventName, failEventId) - } - }) -}; diff --git a/mpuniapp/uni_modules/uni-openLocation/utssdk/app-ios/Info.plist b/mpuniapp/uni_modules/uni-openLocation/utssdk/app-ios/Info.plist deleted file mode 100644 index 0ac8512..0000000 --- a/mpuniapp/uni_modules/uni-openLocation/utssdk/app-ios/Info.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - LSApplicationQueriesSchemes - - qqmap - iosamap - baidumap - - - - diff --git a/mpuniapp/uni_modules/uni-openLocation/utssdk/app-ios/index.uts b/mpuniapp/uni_modules/uni-openLocation/utssdk/app-ios/index.uts deleted file mode 100644 index 3c0e31f..0000000 --- a/mpuniapp/uni_modules/uni-openLocation/utssdk/app-ios/index.uts +++ /dev/null @@ -1,36 +0,0 @@ -import { OpenLocation, OpenLocationOptions, OpenLocationSuccessImpl } from "../interface.uts" -import { OpenLocationFailImpl } from "../unierror.uts" - -export const openLocation : OpenLocation = function (options : OpenLocationOptions) { - const uuid = `${Date.now()}${Math.floor(Math.random() * 1e7)}` - const baseEventName = `uni_open_location_${uuid}` - const readyEventName = `${baseEventName}_ready` - const optionsEventName = `${baseEventName}_options` - const successEventName = `${baseEventName}_success` - const failEventName = `${baseEventName}_fail` - - uni.$on(readyEventName, () => { - uni.$emit(optionsEventName, JSON.parse(JSON.stringify(options)!)) - }) - uni.$on(successEventName, () => { - const res = new OpenLocationSuccessImpl() - options.success?.(res) - options.complete?.(res) - }) - uni.$on(failEventName, () => { - const res = new OpenLocationFailImpl(4) - options.fail?.(res) - options.complete?.(res) - }) - uni.openDialogPage({ - url: `/uni_modules/uni-openLocation/pages/openLocation/openLocation?readyEventName=${readyEventName}&optionsEventName=${optionsEventName}&successEventName=${successEventName}&failEventName=${failEventName}`, - fail(err) { - const res = new OpenLocationFailImpl(4) - options.fail?.(res) - options.complete?.(res) - uni.$off(readyEventName) - uni.$off(successEventName) - uni.$off(failEventName) - } - }) -}; diff --git a/mpuniapp/uni_modules/uni-openLocation/utssdk/interface.uts b/mpuniapp/uni_modules/uni-openLocation/utssdk/interface.uts deleted file mode 100644 index dae3c92..0000000 --- a/mpuniapp/uni_modules/uni-openLocation/utssdk/interface.uts +++ /dev/null @@ -1,418 +0,0 @@ -/** - * 错误码 - */ -export type OpenLocationErrorCode = -/** - * 框架内部错误 - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "5.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.23", - * "unixVer": "4.61" - * } - * }, - * "web": { - * "uniVer": "√", - * "unixVer": "4.0" - * }, - * "mp": { - * "weixin": { - * "uniVer": "x", - * "unixVer": "x" - * } - * } - * } - */ -4; - -export interface OpenLocationSuccess { - errMsg: string -} - -type OpenLocationSuccessCallback = (result : OpenLocationSuccess) => void - -export interface OpenLocationFail extends IUniError { - errCode : OpenLocationErrorCode -} -type OpenLocationFailCallback = (result : OpenLocationFail) => void - -export type OpenLocationComplete = any -type OpenLocationCompleteCallback = (result : OpenLocationComplete) => void - -/** - * uni.openLocation函数参数定义 - */ -export type OpenLocationOptions = { - /** - * 纬度,范围为-90~90,负数表示南纬,使用 gcj02 国测局坐标系 - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "5.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.23", - * "unixVer": "4.61" - * } - * }, - * "web": { - * "uniVer": "√", - * "unixVer": "4.0" - * }, - * "mp": { - * "weixin": { - * "uniVer": "√", - * "unixVer": "4.41" - * } - * } - * } - */ - latitude : number, - /** - * 经度,范围为-180~180,负数表示西经,使用 gcj02 国测局坐标系 - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "5.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.23", - * "unixVer": "4.61" - * } - * }, - * "web": { - * "uniVer": "√", - * "unixVer": "4.0" - * }, - * "mp": { - * "weixin": { - * "uniVer": "√", - * "unixVer": "4.41" - * } - * } - * } - */ - longitude : number, - /** - * 缩放比例,范围5~18,默认为18(微信小程序) - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "5.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.23", - * "unixVer": "4.61" - * } - * }, - * "web": { - * "uniVer": "√", - * "unixVer": "4.0" - * }, - * "mp": { - * "weixin": { - * "uniVer": "√", - * "unixVer": "4.41" - * } - * } - * } - */ - scale ?: number | null, - /** - * 位置名 - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "5.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.23", - * "unixVer": "4.61" - * } - * }, - * "web": { - * "uniVer": "√", - * "unixVer": "4.0" - * }, - * "mp": { - * "weixin": { - * "uniVer": "√", - * "unixVer": "4.41" - * } - * } - * } - */ - name ?: string | null, - /** - * 地址的详细说明 - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "5.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.23", - * "unixVer": "4.61" - * } - * }, - * "web": { - * "uniVer": "√", - * "unixVer": "4.0" - * }, - * "mp": { - * "weixin": { - * "uniVer": "√", - * "unixVer": "4.41" - * } - * } - * } - */ - address ?: string | null, - /** - * 接口调用成功的回调函数 - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "5.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.23", - * "unixVer": "4.61" - * } - * }, - * "web": { - * "uniVer": "√", - * "unixVer": "4.0" - * }, - * "mp": { - * "weixin": { - * "uniVer": "√", - * "unixVer": "4.41" - * } - * } - * } - */ - success ?: OpenLocationSuccessCallback | null, - /** - * 接口调用失败的回调函数 - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "5.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.23", - * "unixVer": "4.61" - * } - * }, - * "web": { - * "uniVer": "√", - * "unixVer": "4.0" - * }, - * "mp": { - * "weixin": { - * "uniVer": "√", - * "unixVer": "4.41" - * } - * } - * } - */ - fail ?: OpenLocationFailCallback | null, - /** - * 接口调用结束的回调函数(调用成功、失败都会执行) - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "5.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.23", - * "unixVer": "4.61" - * } - * }, - * "web": { - * "uniVer": "√", - * "unixVer": "4.0" - * }, - * "mp": { - * "weixin": { - * "uniVer": "√", - * "unixVer": "4.41" - * } - * } - * } - */ - complete ?: OpenLocationCompleteCallback | null -}; - -/** - * 使用应用内置地图查看位置 - * - * @param {OpenLocationOptions} options - * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/prompt.html#openLocation - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "5.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.23", - * "unixVer": "4.61" - * } - * }, - * "web": { - * "uniVer": "√", - * "unixVer": "4.0" - * }, - * "mp": { - * "weixin": { - * "uniVer": "√", - * "unixVer": "4.41" - * } - * } - * } - */ -export type OpenLocation = (options : OpenLocationOptions) => void; - -export interface Uni { - /** - * @description 使用应用内置地图查看位置 - * @example - * ```typescript - uni.openLocation({ - latitude: 39.908823, - longitude: 116.39747, - success: (res) => { - console.log('res: ', res) - }, - fail: (err) => { - console.log('err: ', err) - }, - complete: (res) => { - console.log('complete: ', res) - } - }); - * ``` - * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/prompt.html#openLocation - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "5.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "√", - * "unixVer": "4.41" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.23", - * "unixVer": "4.61" - * } - * }, - * "web": { - * "uniVer": "√", - * "unixVer": "4.0" - * }, - * "mp": { - * "weixin": { - * "uniVer": "√", - * "unixVer": "4.41" - * } - * } - * } - */ - openLocation(options : OpenLocationOptions) : void; -} - -export class OpenLocationSuccessImpl implements OpenLocationSuccess { - errMsg : string - constructor(errMsg : string = 'chooseLocation:ok') { - this.errMsg = errMsg - } -} diff --git a/mpuniapp/uni_modules/uni-openLocation/utssdk/unierror.uts b/mpuniapp/uni_modules/uni-openLocation/utssdk/unierror.uts deleted file mode 100644 index e188281..0000000 --- a/mpuniapp/uni_modules/uni-openLocation/utssdk/unierror.uts +++ /dev/null @@ -1,30 +0,0 @@ -import { OpenLocationErrorCode, OpenLocationFail } from "./interface.uts" - -/** - * 错误主题 - */ - -export const UniErrorSubject = 'uni-openLocation'; - -/** - * 错误码 - * @UniError - */ -export const UniErrors : Map = new Map([ - /** - * 框架内部错误 - */ - [4, 'internal error'] -]); - -export class OpenLocationFailImpl extends UniError implements OpenLocationFail { - // #ifndef APP-IOS - override errCode : OpenLocationErrorCode; - // #endif - constructor(errCode : OpenLocationErrorCode) { - super(); - this.errSubject = UniErrorSubject; - this.errCode = errCode; - this.errMsg = UniErrors.get(errCode) ?? ""; - } -} diff --git a/mpuniapp/uni_modules/uni-openLocation/utssdk/web/index.uts b/mpuniapp/uni_modules/uni-openLocation/utssdk/web/index.uts deleted file mode 100644 index 7694f65..0000000 --- a/mpuniapp/uni_modules/uni-openLocation/utssdk/web/index.uts +++ /dev/null @@ -1,36 +0,0 @@ -import { OpenLocation, OpenLocationOptions, OpenLocationSuccessImpl, OpenLocationErrorCode } from "../interface.uts" -import { OpenLocationFailImpl } from "../unierror.uts" - -export const openLocation : OpenLocation = function (options : OpenLocationOptions) { - const uuid = `${Date.now()}${Math.floor(Math.random() * 1e7)}` - const baseEventName = `uni_open_location_${uuid}` - const readyEventName = `${baseEventName}_ready` - const optionsEventName = `${baseEventName}_options` - const successEventName = `${baseEventName}_success` - const failEventName = `${baseEventName}_fail` - - const readyEventId = uni.$on(readyEventName, () => { - uni.$emit(optionsEventName, JSON.parse(JSON.stringify(options))) - }) - const successEventId = uni.$on(successEventName, () => { - const res = new OpenLocationSuccessImpl() - options.success?.(res) - options.complete?.(res) - }) - const failEventId = uni.$on(failEventName, (errCode : OpenLocationErrorCode) => { - const res = new OpenLocationFailImpl(errCode) - options.fail?.(res) - options.complete?.(res) - }) - uni.openDialogPage({ - url: `/uni_modules/uni-openLocation/pages/openLocation/openLocation?readyEventName=${readyEventName}&optionsEventName=${optionsEventName}&successEventName=${successEventName}&failEventName=${failEventName}`, - fail(err) { - const res = new OpenLocationFailImpl(4) - options.fail?.(res) - options.complete?.(res) - uni.$off(readyEventName, readyEventId) - uni.$off(successEventName, successEventId) - uni.$off(failEventName, failEventId) - } - }) -}; diff --git a/mpuniapp/uni_modules/uni-pay-x/changelog.md b/mpuniapp/uni_modules/uni-pay-x/changelog.md deleted file mode 100644 index 1565cd7..0000000 --- a/mpuniapp/uni_modules/uni-pay-x/changelog.md +++ /dev/null @@ -1,12 +0,0 @@ -## 1.1.0(2024-11-29) -支持微信小程序支付 HBX最低版本 4.41 [详情](https://doc.dcloud.net.cn/uniCloud/uni-pay/uni-app-x.html#config-wxpay-mp) -## 1.0.5(2024-09-29) -修复 微信支付v3 h5支付兼容性问题 -## 1.0.4(2024-08-24) -支持苹果虚拟支付 HBX最低版本 4.26 [详情](https://doc.dcloud.net.cn/uniCloud/uni-pay/uni-app-x.html#appleiap) -## 1.0.2(2024-04-28) -支持微信支付 -## 1.0.1(2024-04-28) -兼容uni-app-x对客户端uniPlatform的调整(uni-app-x内uniPlatform区分app-android、app-ios) -## 1.0.0(2024-03-11) -uni-pay-x 发布 diff --git a/mpuniapp/uni_modules/uni-pay-x/components/uni-pay-popup/uni-pay-popup.uvue b/mpuniapp/uni_modules/uni-pay-x/components/uni-pay-popup/uni-pay-popup.uvue deleted file mode 100644 index 04e27a8..0000000 --- a/mpuniapp/uni_modules/uni-pay-x/components/uni-pay-popup/uni-pay-popup.uvue +++ /dev/null @@ -1,73 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-pay-x/components/uni-pay/uni-pay.uvue b/mpuniapp/uni_modules/uni-pay-x/components/uni-pay/uni-pay.uvue deleted file mode 100644 index ae49c50..0000000 --- a/mpuniapp/uni_modules/uni-pay-x/components/uni-pay/uni-pay.uvue +++ /dev/null @@ -1,1262 +0,0 @@ - - - - diff --git a/mpuniapp/uni_modules/uni-pay-x/js_sdk/js_sdk.uts b/mpuniapp/uni_modules/uni-pay-x/js_sdk/js_sdk.uts deleted file mode 100644 index 76a1c2c..0000000 --- a/mpuniapp/uni_modules/uni-pay-x/js_sdk/js_sdk.uts +++ /dev/null @@ -1,111 +0,0 @@ -function checkPlatform() { - // #ifdef WEB - type SystemInfo = { - win : boolean, - mac : boolean, - x11 : boolean - }; - let system = { - win: false, - mac: false, - x11: false - } as SystemInfo; - let p = navigator.platform; - let ua = navigator.userAgent.toLowerCase(); - system.win = p.indexOf("Win") == 0; - system.mac = p.indexOf("Mac") == 0; - system.x11 = p == "X11" || p.indexOf("Linux") == 0; - if (system.win || system.mac || system.x11) { - return 'pc'; - } else { - if (p.indexOf("iPhone") > -1 || p.indexOf("iPad") > -1) { - return "ios"; - } else if (ua.indexOf('harmonyos') > -1) { - return 'harmonyos'; - } else { - return "android"; - } - } - // #endif -} - -/** - * 获取当前WEB所在的环境 - */ -function getH5Env() { - // #ifdef WEB - const ua = window.navigator.userAgent.toLowerCase(); - const isWeixin = /micromessenger/i.test(ua); - const isAlipay = /alipay/i.test(ua); - const isMiniProgram = /miniprogram/i.test(ua); - if (isWeixin) { - if (isMiniProgram) { - return "mp-weixin"; - } else { - return "h5-weixin"; - } - } else if (isAlipay) { - if (isMiniProgram) { - return "mp-alipay"; - } else { - return "h5-alipay"; - } - } - return "h5"; - // #endif -} - -// json2的属性全部赋值给json1 -function objectAssign(json1 : UTSJSONObject, json2 : UTSJSONObject) : UTSJSONObject { - for (let key in json2) { - json1[key] = json2[key]; - } - return json1; -} - -function getWeixinCode() : Promise { - return new Promise((resolve, reject) => { - // #ifdef MP-WEIXIN - uni.login({ - provider: 'weixin', - success(res) { - resolve(res.code) - }, - fail(err) { - reject(new Error('获取微信code失败')) - } - }) - // #endif - // #ifndef MP-WEIXIN - resolve('') - // #endif - }) -}; - -function getAlipayCode() : Promise { - return new Promise((resolve, reject) => { - // #ifdef MP-ALIPAY - uni.login({ - provider: 'alipay', - success(res) { - resolve(res.code); - }, - fail(err) { - reject(new Error('获取支付宝code失败,可能是没有关联appid或你的支付宝开发者工具还没有登录')); - } - }); - // #endif - // #ifndef MP-ALIPAY - resolve(''); - // #endif - }); - -}; - -export { - checkPlatform, - getH5Env, - objectAssign, - getWeixinCode, - getAlipayCode -}; diff --git a/mpuniapp/uni_modules/uni-pay-x/package.json b/mpuniapp/uni_modules/uni-pay-x/package.json deleted file mode 100644 index ba6c48c..0000000 --- a/mpuniapp/uni_modules/uni-pay-x/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "id": "uni-pay-x", - "displayName": "uni-pay-x", - "version": "1.1.0", - "description": "uni-pay 的 uni-app x版本,需HBX≥4.02", - "keywords": [ - "uni-pay-x", - "微信支付", - "支付宝", - "苹果虚拟支付" - ], - "repository": "", - "engines": { - "HBuilderX": "^4.02" - }, - "dcloudext": { - "type": "unicloud-template-page", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "插件不采集任何数据", - "permissions": "无" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "y", - "aliyun": "y", - "alipay": "y" - }, - "client": { - "Vue": { - "vue2": "n", - "vue3": "y" - }, - "App": { - "app-vue": "n", - "app-nvue": "n", - "app-uvue": "y", - "app-harmony": "u" - }, - "H5-mobile": { - "Safari": "y", - "Android Browser": "y", - "微信浏览器(Android)": "y", - "QQ浏览器(Android)": "y" - }, - "H5-pc": { - "Chrome": "y", - "IE": "n", - "Edge": "y", - "Firefox": "y", - "Safari": "y" - }, - "小程序": { - "微信": "n", - "阿里": "n", - "百度": "n", - "字节跳动": "n", - "QQ": "n", - "钉钉": "n", - "快手": "n", - "飞书": "n", - "京东": "n" - }, - "快应用": { - "华为": "n", - "联盟": "n" - } - } - } - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-pay-x/pages/ad-interactive-webview/ad-interactive-webview.uvue b/mpuniapp/uni_modules/uni-pay-x/pages/ad-interactive-webview/ad-interactive-webview.uvue deleted file mode 100644 index c75f9f1..0000000 --- a/mpuniapp/uni_modules/uni-pay-x/pages/ad-interactive-webview/ad-interactive-webview.uvue +++ /dev/null @@ -1,17 +0,0 @@ - - - diff --git a/mpuniapp/uni_modules/uni-pay-x/pages/pay-desk/pay-desk.uvue b/mpuniapp/uni_modules/uni-pay-x/pages/pay-desk/pay-desk.uvue deleted file mode 100644 index e72e253..0000000 --- a/mpuniapp/uni_modules/uni-pay-x/pages/pay-desk/pay-desk.uvue +++ /dev/null @@ -1,259 +0,0 @@ - - - - diff --git a/mpuniapp/uni_modules/uni-pay-x/pages/success/success.uvue b/mpuniapp/uni_modules/uni-pay-x/pages/success/success.uvue deleted file mode 100644 index 7445c32..0000000 --- a/mpuniapp/uni_modules/uni-pay-x/pages/success/success.uvue +++ /dev/null @@ -1,227 +0,0 @@ - - - - diff --git a/mpuniapp/uni_modules/uni-pay-x/readme.md b/mpuniapp/uni_modules/uni-pay-x/readme.md deleted file mode 100644 index e73c27d..0000000 --- a/mpuniapp/uni_modules/uni-pay-x/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -`uni-pay-x` 是 `uni-pay` 的 `uni-app x` 版 [文档地址](https://doc.dcloud.net.cn/uniCloud/uni-pay/uni-app-x.html) - -**线上体验地址** - -![](https://web-ext-storage.dcloud.net.cn/unicloud/uni-pay-x/518.png) - diff --git a/mpuniapp/uni_modules/uni-pay-x/uniCloud/cloudfunctions/common/uni-pay/LICENSE.md b/mpuniapp/uni_modules/uni-pay-x/uniCloud/cloudfunctions/common/uni-pay/LICENSE.md deleted file mode 100644 index 261eeb9..0000000 --- a/mpuniapp/uni_modules/uni-pay-x/uniCloud/cloudfunctions/common/uni-pay/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/mpuniapp/uni_modules/uni-pay-x/uniCloud/cloudfunctions/common/uni-pay/index.js b/mpuniapp/uni_modules/uni-pay-x/uniCloud/cloudfunctions/common/uni-pay/index.js deleted file mode 100644 index 94146e6..0000000 --- a/mpuniapp/uni_modules/uni-pay-x/uniCloud/cloudfunctions/common/uni-pay/index.js +++ /dev/null @@ -1,33 +0,0 @@ -!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=23)}([function(e,t,r){var n;e.exports=(n=n||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!=typeof global&&global.crypto&&(n=global.crypto),!n)try{n=r(2)}catch(e){}var i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),a={},s=a.lib={},u=s.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=s.WordArray=u.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=u.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},h=f.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},p=f.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},d=s.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,f=e.min(4*u,o);if(u){for(var l=0;l>>2];e.sigBytes-=t}},o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:y,padding:g}),reset:function(){var e;h.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),v=o.CipherParams=a.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),_=(i.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?s.create([1398893684,1701076831]).concat(r).concat(t):t).toString(f)},parse:function(e){var t,r=f.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=s.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:t})}},m=o.SerializableCipher=a.extend({cfg:a.extend({format:_}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;return v.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=(i.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=s.random(8));var i=l.create({keySize:t+r}).compute(e,n),o=s.create(i.words.slice(t),4*r);return i.sigBytes=4*t,v.create({key:i,iv:o,salt:n})}},w=o.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:b}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var o=m.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);return n.iv=i.iv,m.decrypt.call(this,e,t,i.key,n)}}))))},function(e,t){e.exports=require("crypto")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={FormData:!0,UniCloudError:!0};Object.defineProperty(t,"FormData",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"UniCloudError",{enumerable:!0,get:function(){return o.default}});var i=u(r(26)),o=u(r(27)),a=r(28);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=r(7);function u(e){return e&&e.__esModule?e:{default:e}}Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}))},function(e,t,r){var n,i,o,a,s,u,c,f;e.exports=(f=r(0),r(11),r(12),i=(n=f).lib,o=i.Base,a=i.WordArray,s=n.algo,u=s.MD5,c=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,i=n.hasher.create(),o=a.create(),s=o.words,u=n.keySize,c=n.iterations;s.length>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var u=n.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>6-a%4*2,c=s|u;n[o>>>2]|=c<<24-o%4*8,o++}return i.create(n,o)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},function(e,t,r){var n;e.exports=(n=r(0),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var u=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],u=e[t+1],p=e[t+2],d=e[t+3],y=e[t+4],g=e[t+5],v=e[t+6],_=e[t+7],m=e[t+8],b=e[t+9],w=e[t+10],S=e[t+11],E=e[t+12],A=e[t+13],I=e[t+14],N=e[t+15],C=o[0],T=o[1],R=o[2],x=o[3];C=c(C,T,R,x,a,7,s[0]),x=c(x,C,T,R,u,12,s[1]),R=c(R,x,C,T,p,17,s[2]),T=c(T,R,x,C,d,22,s[3]),C=c(C,T,R,x,y,7,s[4]),x=c(x,C,T,R,g,12,s[5]),R=c(R,x,C,T,v,17,s[6]),T=c(T,R,x,C,_,22,s[7]),C=c(C,T,R,x,m,7,s[8]),x=c(x,C,T,R,b,12,s[9]),R=c(R,x,C,T,w,17,s[10]),T=c(T,R,x,C,S,22,s[11]),C=c(C,T,R,x,E,7,s[12]),x=c(x,C,T,R,A,12,s[13]),R=c(R,x,C,T,I,17,s[14]),C=f(C,T=c(T,R,x,C,N,22,s[15]),R,x,u,5,s[16]),x=f(x,C,T,R,v,9,s[17]),R=f(R,x,C,T,S,14,s[18]),T=f(T,R,x,C,a,20,s[19]),C=f(C,T,R,x,g,5,s[20]),x=f(x,C,T,R,w,9,s[21]),R=f(R,x,C,T,N,14,s[22]),T=f(T,R,x,C,y,20,s[23]),C=f(C,T,R,x,b,5,s[24]),x=f(x,C,T,R,I,9,s[25]),R=f(R,x,C,T,d,14,s[26]),T=f(T,R,x,C,m,20,s[27]),C=f(C,T,R,x,A,5,s[28]),x=f(x,C,T,R,p,9,s[29]),R=f(R,x,C,T,_,14,s[30]),C=l(C,T=f(T,R,x,C,E,20,s[31]),R,x,g,4,s[32]),x=l(x,C,T,R,m,11,s[33]),R=l(R,x,C,T,S,16,s[34]),T=l(T,R,x,C,I,23,s[35]),C=l(C,T,R,x,u,4,s[36]),x=l(x,C,T,R,y,11,s[37]),R=l(R,x,C,T,_,16,s[38]),T=l(T,R,x,C,w,23,s[39]),C=l(C,T,R,x,A,4,s[40]),x=l(x,C,T,R,a,11,s[41]),R=l(R,x,C,T,d,16,s[42]),T=l(T,R,x,C,v,23,s[43]),C=l(C,T,R,x,b,4,s[44]),x=l(x,C,T,R,E,11,s[45]),R=l(R,x,C,T,N,16,s[46]),C=h(C,T=l(T,R,x,C,p,23,s[47]),R,x,a,6,s[48]),x=h(x,C,T,R,_,10,s[49]),R=h(R,x,C,T,I,15,s[50]),T=h(T,R,x,C,g,21,s[51]),C=h(C,T,R,x,E,6,s[52]),x=h(x,C,T,R,d,10,s[53]),R=h(R,x,C,T,w,15,s[54]),T=h(T,R,x,C,u,21,s[55]),C=h(C,T,R,x,m,6,s[56]),x=h(x,C,T,R,N,10,s[57]),R=h(R,x,C,T,v,15,s[58]),T=h(T,R,x,C,A,21,s[59]),C=h(C,T,R,x,y,6,s[60]),x=h(x,C,T,R,S,10,s[61]),R=h(R,x,C,T,p,15,s[62]),T=h(T,R,x,C,b,21,s[63]),o[0]=o[0]+C|0,o[1]=o[1]+T|0,o[2]=o[2]+R|0,o[3]=o[3]+x|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var f=u[c];u[c]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<>>32-o)+t}function f(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<>>32-o)+t}function l(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<>>32-o)+t}function h(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<>>32-o)+t}t.MD5=o._createHelper(u),t.HmacMD5=o._createHmacHelper(u)}(Math),n.MD5)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accMul=function(e,t){if(isNaN(e)||isNaN(t))return NaN;const{value:r,power:n}=y(e),{value:i,power:o}=y(t);return r*i/Math.pow(10,n+o)},t.camel2snake=l,t.camel2snakeJson=function(e){return h(e,"camel2snake")},t.deepClone=function(e){return JSON.parse(JSON.stringify(e))},t.deleteObjectKey=function e(t,r){const n=t.shift();if(!n)return;e(t,r[n]),r[n]&&(Object.keys(r[n]).length<=0||"string"==typeof r[n])&&delete r[n]},t.getDateStr=p,t.getExtension=function(e){return s[e]},t.getFullTimeStr=function(e){return p(e=e||new Date)+" "+d(e)},t.getOffsetDate=function(e){return new Date(Date.now()+6e4*((new Date).getTimezoneOffset()+60*(e||0)))},t.getTimeStr=d,t.hasOwn=o,t.isFn=function(e){return"function"==typeof e},t.isPlainObject=a,t.log=function(){0},t.mime2ext=void 0,t.snake2camel=f,t.snake2camelJson=function(e){return h(e,"snake2camel")};const n=Object.prototype.toString,i=Object.prototype.hasOwnProperty;function o(e,t){return i.call(e,t)}function a(e){return"[object Object]"===n.call(e)}const s={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/svg+xml":"svg","image/bmp":"bmp","image/webp":"webp"};t.mime2ext=s;const u=/_(\w)/g,c=/[A-Z]/g;function f(e){return e.replace(u,(e,t)=>t?t.toUpperCase():"")}function l(e){return e.replace(c,e=>"_"+e.toLowerCase())}function h(e,t){let r,n;switch(t){case"snake2camel":n=f,r=u;break;case"camel2snake":n=l,r=c}for(const i in e)if(o(e,i)&&r.test(i)){const r=n(i);e[r]=e[i],delete e[i],a(e[r])?e[r]=h(e[r],t):Array.isArray(e[r])&&(e[r]=e[r].map(e=>h(e,t)))}return e}function p(e,t="-"){e=e||new Date;const r=[];return r.push(e.getFullYear()),r.push(("00"+(e.getMonth()+1)).substr(-2)),r.push(("00"+e.getDate()).substr(-2)),r.join(t)}function d(e,t=":"){e=e||new Date;const r=[];return r.push(("00"+e.getHours()).substr(-2)),r.push(("00"+e.getMinutes()).substr(-2)),r.push(("00"+e.getSeconds()).substr(-2)),r.join(t)}function y(e){const t=e.toString().split("."),r=t[1]?t[1].length:0;return{value:Number(t.join("")),power:r}}},function(e,t,r){var n,i,o,a,s,u;e.exports=(u=r(0),i=(n=u).lib,o=i.Base,a=i.WordArray,(s=n.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),s.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n>>31}var l=(n<<5|n>>>27)+s+u[c];l+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=n,n=l}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=a._createHelper(c),n.HmacSHA1=a._createHmacHelper(c),f.SHA1)},function(e,t,r){var n,i,o,a;e.exports=(n=r(0),o=(i=n).lib.Base,a=i.enc.Utf8,void(i.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),s=i.words,u=o.words,c=0;cparseInt(e,10)));case 6:const t=e.split(":"),r=Buffer.alloc(16);let n=0;""===t[t.length-1]&&(t[t.length-1]="0");for(let e=0;eo&&(o=n,i=r)):(r=-1,n=0),t.push(s.toString(16))}if(o>0){let e="";const r=t.slice(i+o);t.length=i,0===t.length&&(e+=":"),0===r.length&&(e+=":"),t.push(e,...r)}return t.join(":");default:return""}};const i=Object.create(null),o=/^[0-9.]+$/;function a(e,t){i[e]=t,i[t]=e}t.getOID=function(e){return o.test(e)&&""!==i[e]?e:null==i[e]?"":i[e]},t.getOIDName=function(e){return o.test(e)||""===i[e]?null==i[e]?e:i[e]:e},a("1.2.840.113549.1.1.1","rsaEncryption"),a("1.2.840.113549.1.1.4","md5WithRsaEncryption"),a("1.2.840.113549.1.1.5","sha1WithRsaEncryption"),a("1.2.840.113549.1.1.8","mgf1"),a("1.2.840.113549.1.1.10","RSASSA-PSS"),a("1.2.840.113549.1.1.11","sha256WithRsaEncryption"),a("1.2.840.113549.1.1.12","sha384WithRsaEncryption"),a("1.2.840.113549.1.1.13","sha512WithRsaEncryption"),a("1.2.840.10045.2.1","ecEncryption"),a("1.2.840.10045.4.1","ecdsaWithSha1"),a("1.2.840.10045.4.3.2","ecdsaWithSha256"),a("1.2.840.10045.4.3.3","ecdsaWithSha384"),a("1.2.840.10045.4.3.4","ecdsaWithSha512"),a("1.2.840.10040.4.3","dsaWithSha1"),a("2.16.840.1.101.3.4.3.2","dsaWithSha256"),a("1.3.14.3.2.7","desCBC"),a("1.3.14.3.2.26","sha1"),a("2.16.840.1.101.3.4.2.1","sha256"),a("2.16.840.1.101.3.4.2.2","sha384"),a("2.16.840.1.101.3.4.2.3","sha512"),a("1.2.840.113549.2.5","md5"),a("1.3.101.110","X25519"),a("1.3.101.111","X448"),a("1.3.101.112","Ed25519"),a("1.3.101.113","Ed448"),a("1.2.840.113549.1.7.1","data"),a("1.2.840.113549.1.7.2","signedData"),a("1.2.840.113549.1.7.3","envelopedData"),a("1.2.840.113549.1.7.4","signedAndEnvelopedData"),a("1.2.840.113549.1.7.5","digestedData"),a("1.2.840.113549.1.7.6","encryptedData"),a("1.2.840.113549.1.9.1","emailAddress"),a("1.2.840.113549.1.9.2","unstructuredName"),a("1.2.840.113549.1.9.3","contentType"),a("1.2.840.113549.1.9.4","messageDigest"),a("1.2.840.113549.1.9.5","signingTime"),a("1.2.840.113549.1.9.6","counterSignature"),a("1.2.840.113549.1.9.7","challengePassword"),a("1.2.840.113549.1.9.8","unstructuredAddress"),a("1.2.840.113549.1.9.14","extensionRequest"),a("1.2.840.113549.1.9.20","friendlyName"),a("1.2.840.113549.1.9.21","localKeyId"),a("1.2.840.113549.1.9.22.1","x509Certificate"),a("1.2.840.113549.1.12.10.1.1","keyBag"),a("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),a("1.2.840.113549.1.12.10.1.3","certBag"),a("1.2.840.113549.1.12.10.1.4","crlBag"),a("1.2.840.113549.1.12.10.1.5","secretBag"),a("1.2.840.113549.1.12.10.1.6","safeContentsBag"),a("1.2.840.113549.1.5.13","pkcs5PBES2"),a("1.2.840.113549.1.5.12","pkcs5PBKDF2"),a("1.2.840.113549.2.7","hmacWithSha1"),a("1.2.840.113549.2.9","hmacWithSha256"),a("1.2.840.113549.2.10","hmacWithSha384"),a("1.2.840.113549.2.11","hmacWithSha512"),a("1.2.840.113549.3.7","3desCBC"),a("2.16.840.1.101.3.4.1.2","aesCBC128"),a("2.16.840.1.101.3.4.1.42","aesCBC256"),a("2.5.4.3","commonName"),a("2.5.4.5","serialName"),a("2.5.4.6","countryName"),a("2.5.4.7","localityName"),a("2.5.4.8","stateOrProvinceName"),a("2.5.4.10","organizationName"),a("2.5.4.11","organizationalUnitName"),a("2.5.4.15","businessCategory"),a("2.16.840.1.113730.1.1","nsCertType"),a("2.5.29.2","keyAttributes"),a("2.5.29.4","keyUsageRestriction"),a("2.5.29.6","subtreesConstraint"),a("2.5.29.9","subjectDirectoryAttributes"),a("2.5.29.14","subjectKeyIdentifier"),a("2.5.29.15","keyUsage"),a("2.5.29.16","privateKeyUsagePeriod"),a("2.5.29.17","subjectAltName"),a("2.5.29.18","issuerAltName"),a("2.5.29.19","basicConstraints"),a("2.5.29.20","cRLNumber"),a("2.5.29.21","cRLReason"),a("2.5.29.22","expirationDate"),a("2.5.29.23","instructionCode"),a("2.5.29.24","invalidityDate"),a("2.5.29.27","deltaCRLIndicator"),a("2.5.29.28","issuingDistributionPoint"),a("2.5.29.29","certificateIssuer"),a("2.5.29.30","nameConstraints"),a("2.5.29.31","cRLDistributionPoints"),a("2.5.29.32","certificatePolicies"),a("2.5.29.33","policyMappings"),a("2.5.29.35","authorityKeyIdentifier"),a("2.5.29.36","policyConstraints"),a("2.5.29.37","extKeyUsage"),a("2.5.29.46","freshestCRL"),a("2.5.29.54","inhibitAnyPolicy"),a("1.3.6.1.4.1.311.60.2.1.2","jurisdictionST"),a("1.3.6.1.4.1.311.60.2.1.3","jurisdictionC"),a("1.3.6.1.4.1.11129.2.4.2","timestampList"),a("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),a("1.3.6.1.5.5.7.3.1","serverAuth"),a("1.3.6.1.5.5.7.3.2","clientAuth"),a("1.3.6.1.5.5.7.3.3","codeSigning"),a("1.3.6.1.5.5.7.3.4","emailProtection"),a("1.3.6.1.5.5.7.3.8","timeStamping"),a("1.3.6.1.5.5.7.48.1","authorityInfoAccessOcsp"),a("1.3.6.1.5.5.7.48.2","authorityInfoAccessIssuers")},function(e,t,r){"use strict";const n=e=>!("object"!=typeof e||null===e||e instanceof RegExp||e instanceof Error||e instanceof Date);e.exports=function e(t,r,i,o){if(i=Object.assign({deep:!1,target:{}},i),(o=o||new WeakMap).has(t))return o.get(t);o.set(t,i.target);const a=i.target;delete i.target;for(const s of Object.keys(t)){const u=t[s],c=r(s,u,t);let f=c[1];i.deep&&n(f)&&(f=Array.isArray(f)?f.map(t=>n(t)?e(t,r,i,o):t):e(f,r,i,o)),a[c[0]]=f}return a}},function(e,t,r){"use strict";var n=r(14),i=r(42);e.exports=function(e,t){return t=Object.assign({deep:!0},t),n(e,(function(e,t){return[i(e),t]}),t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2),i=r(45),o=r(46),a=r(15),s=r(47),u=r(72),c={RSA:"RSA-SHA1",RSA2:"RSA-SHA256"};function f(e){return{iv:s.enc.Hex.parse(u.padEnd("",32,"0")),key:s.enc.Base64.parse(e)}}t.ALIPAY_ALGORITHM_MAPPING=c,t.aesDecrypt=function(e,t){const{iv:r,key:n}=f(t),i=s.AES.decrypt(e,n,{iv:r});return JSON.parse(i.toString(s.enc.Utf8))},t.sign=function(e,t={},r){let l=Object.assign({method:e,appId:r.appId,charset:r.charset,version:r.version,signType:r.signType,timestamp:i().format("YYYY-MM-DD HH:mm:ss")},u.omit(t,["bizContent","needEncrypt"]));r.appCertSn&&r.alipayRootCertSn&&(l=Object.assign({appCertSn:r.appCertSn,alipayRootCertSn:r.alipayRootCertSn},l)),r.wsServiceUrl&&(l.wsServiceUrl=r.wsServiceUrl);const h=t.bizContent;if(h)if(t.needEncrypt){if(!r.encryptKey)throw new Error("请设置encryptKey参数");l.encryptType="AES",l.bizContent=function(e,t){const{iv:r,key:n}=f(t);return s.AES.encrypt(JSON.stringify(e),n,{iv:r}).toString()}(a(h),r.encryptKey)}else l.bizContent=JSON.stringify(a(h));const p=a(l),d=Object.keys(p).sort().map(e=>{let t=p[e];return"[object String]"!==Array.prototype.toString.call(t)&&(t=JSON.stringify(t)),`${e}=${o.encode(t,r.charset)}`}).join("&"),y=n.createSign(c[r.signType]).update(d,"utf8").sign(r.privateKey,"base64");return Object.assign(p,{sign:y})}},function(e,t,r){var n;e.exports=(n=r(0),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.algo,s=[],u=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),u[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],f=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],f=r[5],l=r[6],h=r[7],p=0;p<64;p++){if(p<16)c[p]=0|e[t+p];else{var d=c[p-15],y=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,g=c[p-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[p]=y+c[p-7]+v+c[p-16]}var _=n&i^n&o^i&o,m=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&f^~s&l)+u[p]+c[p];h=l,l=f,f=s,s=a+b|0,a=o,o=i,i=n,n=b+(m+_)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+f|0,r[6]=r[6]+l|0,r[7]=r[7]+h|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(f),t.HmacSHA256=o._createHmacHelper(f)}(Math),n.SHA256)},function(e,t,r){var n;e.exports=(n=r(0),r(8),function(){var e=n,t=e.lib.Hasher,r=e.x64,i=r.Word,o=r.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var u=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var f=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],f=r[5],l=r[6],h=r[7],p=n.high,d=n.low,y=i.high,g=i.low,v=o.high,_=o.low,m=a.high,b=a.low,w=s.high,S=s.low,E=f.high,A=f.low,I=l.high,N=l.low,C=h.high,T=h.low,R=p,x=d,P=y,O=g,B=v,k=_,D=m,U=b,M=w,j=S,L=E,F=A,K=I,z=N,V=C,$=T,q=0;q<80;q++){var H,W,G=c[q];if(q<16)W=G.high=0|e[t+2*q],H=G.low=0|e[t+2*q+1];else{var J=c[q-15],Y=J.high,Z=J.low,X=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^Y>>>7,Q=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^(Z>>>7|Y<<25),ee=c[q-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=c[q-7],ae=oe.high,se=oe.low,ue=c[q-16],ce=ue.high,fe=ue.low;W=(W=(W=X+ae+((H=Q+se)>>>0>>0?1:0))+ne+((H+=ie)>>>0>>0?1:0))+ce+((H+=fe)>>>0>>0?1:0),G.high=W,G.low=H}var le,he=M&L^~M&K,pe=j&F^~j&z,de=R&P^R&B^P&B,ye=x&O^x&k^O&k,ge=(R>>>28|x<<4)^(R<<30|x>>>2)^(R<<25|x>>>7),ve=(x>>>28|R<<4)^(x<<30|R>>>2)^(x<<25|R>>>7),_e=(M>>>14|j<<18)^(M>>>18|j<<14)^(M<<23|j>>>9),me=(j>>>14|M<<18)^(j>>>18|M<<14)^(j<<23|M>>>9),be=u[q],we=be.high,Se=be.low,Ee=V+_e+((le=$+me)>>>0<$>>>0?1:0),Ae=ve+ye;V=K,$=z,K=L,z=F,L=M,F=j,M=D+(Ee=(Ee=(Ee=Ee+he+((le+=pe)>>>0>>0?1:0))+we+((le+=Se)>>>0>>0?1:0))+W+((le+=H)>>>0>>0?1:0))+((j=U+le|0)>>>0>>0?1:0)|0,D=B,U=k,B=P,k=O,P=R,O=x,R=Ee+(ge+de+(Ae>>>0>>0?1:0))+((x=le+Ae|0)>>>0>>0?1:0)|0}d=n.low=d+x,n.high=p+R+(d>>>0>>0?1:0),g=i.low=g+O,i.high=y+P+(g>>>0>>0?1:0),_=o.low=_+k,o.high=v+B+(_>>>0>>0?1:0),b=a.low=b+U,a.high=m+D+(b>>>0>>0?1:0),S=s.low=S+j,s.high=w+M+(S>>>0>>0?1:0),A=f.low=A+F,f.high=E+L+(A>>>0>>0?1:0),N=l.low=N+z,l.high=I+K+(N>>>0>>0?1:0),T=h.low=T+$,h.high=C+V+(T>>>0<$>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(f),e.HmacSHA512=t._createHmacHelper(f)}(),n.SHA512)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(13);t.bytesFromIP=n.bytesFromIP,t.bytesToIP=n.bytesToIP,t.getOID=n.getOID,t.getOIDName=n.getOIDName;var i=r(20);t.PublicKey=i.PublicKey,t.PrivateKey=i.PrivateKey,t.RSAPublicKey=i.RSAPublicKey,t.RSAPrivateKey=i.RSAPrivateKey;var o=r(80);t.Certificate=o.Certificate,t.DistinguishedName=o.DistinguishedName},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9),i=r(2),o=r(77),a=r(21),s=r(13);t.publicKeyValidator={name:"PublicKeyInfo",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,capture:"publicKeyInfo",value:[{name:"PublicKeyInfo.AlgorithmIdentifier",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,value:[{name:"PublicKeyAlgorithmIdentifier.algorithm",class:a.Class.UNIVERSAL,tag:a.Tag.OID,capture:"publicKeyOID"}]},{name:"PublicKeyInfo.PublicKey",class:a.Class.UNIVERSAL,tag:a.Tag.BITSTRING,capture:"publicKey"}]},t.privateKeyValidator={name:"PrivateKeyInfo",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,capture:"privateKeyInfo",value:[{name:"PrivateKeyInfo.Version",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.AlgorithmIdentifier",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,value:[{name:"PrivateKeyAlgorithmIdentifier.algorithm",class:a.Class.UNIVERSAL,tag:a.Tag.OID,capture:"privateKeyOID"}]},{name:"PrivateKeyInfo.PrivateKey",class:a.Class.UNIVERSAL,tag:a.Tag.OCTETSTRING,capture:"privateKey"}]};const u={name:"RSAPublicKey",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,value:[{name:"RSAPublicKey.modulus",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"publicKeyExponent"}]},c={name:"RSAPrivateKey",class:a.Class.UNIVERSAL,tag:a.Tag.SEQUENCE,value:[{name:"RSAPrivateKey.version",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",class:a.Class.UNIVERSAL,tag:a.Tag.INTEGER,capture:"privateKeyCoefficient"}]},f=[s.getOID("X25519"),s.getOID("X448"),s.getOID("Ed25519"),s.getOID("Ed448")];class l{constructor(e){const r={},n=e.validate(t.publicKeyValidator,r);if(null!=n)throw new Error("Cannot read X.509 public key: "+n.message);this.oid=a.ASN1.parseOID(r.publicKeyOID.bytes),this.algo=s.getOIDName(this.oid),this._pkcs8=e,this._keyRaw=a.ASN1.parseBitString(r.publicKey.bytes).buf,this._finalKey=this._keyRaw,this._finalPEM=""}static fromPEM(e){const t=a.PEM.parse(e)[0];if(t.procType.includes("ENCRYPTED"))throw new Error("Could not convert public key from PEM, PEM is encrypted.");const r=a.ASN1.fromDER(t.body,!0);switch(t.type){case"PUBLIC KEY":return new l(r);case"RSA PUBLIC KEY":const e=a.ASN1.Seq([a.ASN1.Seq([a.ASN1.OID(s.getOID("rsaEncryption")),a.ASN1.Null()]),a.ASN1.BitString(r.DER)]);return new l(e);default:throw new Error("Could not convert public key from PEM, recommend PKCS#8 PEM")}}static addVerifier(e,t){if(""===(e=s.getOID(e)))throw new Error("Invalid object identifier: "+e);if(null!=l._verifiers[e])throw new Error(`Verifier ${e} exists`);l._verifiers[e]=t}get keyRaw(){return this._finalKey}verify(e,t,r){const n=l._verifiers[this.oid];if(null!=n){const o=i.createHash(r).update(e).digest();return n.call(this,o,t)}const o=i.createVerify(r);return o.update(e),o.verify(this.toPEM(),t)}getFingerprint(e,t="PublicKey"){let r;switch(t){case"PublicKeyInfo":r=this._pkcs8.DER;break;case"PublicKey":r=this._keyRaw;break;default:throw new Error(`Unknown fingerprint type "${t}".`)}const n=i.createHash(e);return n.update(r),n.digest()}toASN1(){return this._pkcs8}toDER(){return this._pkcs8.DER}toPEM(){return""===this._finalPEM&&(this._finalPEM=new a.PEM("PUBLIC KEY",this._pkcs8.DER).toString()),this._finalPEM}toJSON(){return{oid:this.oid,algo:this.algo,publicKey:this._keyRaw}}[n.inspect.custom](e,t){return`<${this.constructor.name} ${n.inspect(this.toJSON(),t)}>`}}l._verifiers=Object.create(null),t.PublicKey=l;class h{constructor(e){const r=Object.create(null),n=e.validate(t.privateKeyValidator,r);if(null!=n)throw new Error("Cannot read X.509 private key: "+n.message);if(this.version=a.ASN1.parseIntegerNum(r.privateKeyVersion.bytes)+1,this.oid=a.ASN1.parseOID(r.privateKeyOID.bytes),this.algo=s.getOIDName(this.oid),this._pkcs8=e,this._keyRaw=r.privateKey.bytes,this._publicKeyRaw=null,this._finalKey=this._keyRaw,this._finalPEM="",f.includes(this.oid))if(this._finalKey=this._keyRaw=a.ASN1.parseDER(this._keyRaw,a.Class.UNIVERSAL,a.Tag.OCTETSTRING).bytes,"1.3.101.112"===this.oid){const e=o.sign.keyPair.fromSeed(this._keyRaw);this._publicKeyRaw=Buffer.from(e.publicKey),this._finalKey=Buffer.from(e.secretKey)}else if(2===this.version)for(const t of e.mustCompound())t.class===a.Class.CONTEXT_SPECIFIC&&1===t.tag&&(this._publicKeyRaw=a.ASN1.parseBitString(t.bytes).buf,this._finalKey=Buffer.concat([this._keyRaw,this._publicKeyRaw]))}static fromPEM(e){const t=a.PEM.parse(e)[0];if(t.procType.includes("ENCRYPTED"))throw new Error("Could not convert private key from PEM, PEM is encrypted.");let r=a.ASN1.fromDER(t.body,!0);switch(t.type){case"PRIVATE KEY":return new h(r);case"RSA PRIVATE KEY":return r=a.ASN1.Seq([r.value[0],a.ASN1.Seq([a.ASN1.OID(s.getOID("rsaEncryption")),a.ASN1.Null()]),new a.ASN1(a.Class.UNIVERSAL,a.Tag.OCTETSTRING,r.DER)]),new h(r);default:throw new Error("Could not convert private key from PEM, recommend PKCS#8 PEM")}}static addSigner(e,t){if(""===(e=s.getOID(e)))throw new Error("Invalid object identifier: "+e);if(null!=h._signers[e])throw new Error(`Signer ${e} exists`);h._signers[e]=t}get keyRaw(){return this._finalKey}get publicKeyRaw(){return this._publicKeyRaw}sign(e,t){const r=h._signers[this.oid];if(null!=r){const n=i.createHash(t).update(e).digest();return r.call(this,n)}const n=i.createSign(t);return n.update(e),n.sign(this.toPEM())}toASN1(){return this._pkcs8}toDER(){return this._pkcs8.DER}toPEM(){return""===this._finalPEM&&(this._finalPEM=new a.PEM("PRIVATE KEY",this._pkcs8.DER).toString()),this._finalPEM}toJSON(){return{version:this.version,oid:this.oid,algo:this.algo,privateKey:this._keyRaw,publicKey:this._publicKeyRaw}}[n.inspect.custom](e,t){return`<${this.constructor.name} ${n.inspect(this.toJSON(),t)}>`}}h._signers=Object.create(null),t.PrivateKey=h;class p extends l{static fromPublicKey(e){return new p(e.toASN1())}constructor(e){if(super(e),s.getOID(this.oid)!==s.getOID("rsaEncryption"))throw new Error("Invalid RSA public key, unknown OID: "+this.oid);const t=Object.create(null);this._pkcs1=a.ASN1.fromDER(this._keyRaw,!0);const r=this._pkcs1.validate(u,t);if(null!=r)throw new Error("Cannot read RSA public key: "+r.message);this.modulus=a.ASN1.parseIntegerStr(t.publicKeyModulus.bytes),this.exponent=a.ASN1.parseIntegerNum(t.publicKeyExponent.bytes)}toASN1(){return this._pkcs1}toDER(){return this._keyRaw}toPEM(){return""===this._finalPEM&&(this._finalPEM=new a.PEM("RSA PUBLIC KEY",this._keyRaw).toString()),this._finalPEM}toPublicKeyPEM(){return new a.PEM("PUBLIC KEY",this._pkcs8.DER).toString()}toJSON(){return{oid:this.oid,algo:this.algo,modulus:y(this.modulus),exponent:this.exponent}}[n.inspect.custom](e,t){return`<${this.constructor.name} ${n.inspect(this.toJSON(),t)}>`}}t.RSAPublicKey=p;class d extends h{static fromPrivateKey(e){return new d(e.toASN1())}constructor(e){if(super(e),s.getOID(this.oid)!==s.getOID("rsaEncryption"))throw new Error("Invalid RSA private key, unknown OID: "+this.oid);const t=Object.create(null);this._pkcs1=a.ASN1.fromDER(this._keyRaw,!0);const r=this._pkcs1.validate(c,t);if(null!=r)throw new Error("Cannot read RSA private key: "+r.message);this.publicExponent=a.ASN1.parseIntegerNum(t.privateKeyPublicExponent.bytes),this.privateExponent=a.ASN1.parseIntegerStr(t.privateKeyPrivateExponent.bytes),this.modulus=a.ASN1.parseIntegerStr(t.privateKeyModulus.bytes),this.prime1=a.ASN1.parseIntegerStr(t.privateKeyPrime1.bytes),this.prime2=a.ASN1.parseIntegerStr(t.privateKeyPrime2.bytes),this.exponent1=a.ASN1.parseIntegerStr(t.privateKeyExponent1.bytes),this.exponent2=a.ASN1.parseIntegerStr(t.privateKeyExponent2.bytes),this.coefficient=a.ASN1.parseIntegerStr(t.privateKeyCoefficient.bytes)}toASN1(){return this._pkcs1}toDER(){return this._keyRaw}toPEM(){return""===this._finalPEM&&(this._finalPEM=new a.PEM("RSA PRIVATE KEY",this._keyRaw).toString()),this._finalPEM}toPrivateKeyPEM(){return new a.PEM("PRIVATE KEY",this._pkcs8.DER).toString()}toJSON(){return{version:this.version,oid:this.oid,algo:this.algo,publicExponent:this.publicExponent,privateExponent:y(this.privateExponent),modulus:y(this.modulus),prime1:y(this.prime1),prime2:y(this.prime2),exponent1:y(this.exponent1),exponent2:y(this.exponent2),coefficient:y(this.coefficient)}}[n.inspect.custom](e,t){return`<${this.constructor.name} ${n.inspect(this.toJSON(),t)}>`}}function y(e){return e.length%8!=0&&e.startsWith("00")?e.slice(2):e}t.RSAPrivateKey=d,l.addVerifier(s.getOID("Ed25519"),(function(e,t){return o.sign.detached.verify(e,t,this.keyRaw)})),h.addSigner(s.getOID("Ed25519"),(function(e){const t=this.keyRaw;if(64!==t.length)throw new Error("Invalid signing key.");return Buffer.from(o.sign.detached(e,t))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22);t.BufferVisitor=n.BufferVisitor;var i=r(78);t.PEM=i.PEM;var o=r(79);t.ASN1=o.ASN1,t.Class=o.Class,t.Tag=o.Tag,t.BitString=o.BitString},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BufferVisitor=class{constructor(e,t=0,r=0){this.start=t,this.end=r>t?r:t,this.buf=e}get length(){return this.buf.length}reset(e=0,t=0){return this.start=e,t>=this.start?this.end=t:this.endthis.buf.length){const e=new Error(t);throw e.available=this.buf.length,e.requested=r,e}return this.walk(0),this}mustWalk(e,t){return this.mustHas(e,t),this.walk(e),this}}},function(e,t,r){"use strict";var n=c(r(24)),i=c(r(30)),o=c(r(83)),a=c(r(84)),s=c(r(88)),u=r(3);function c(e){return e&&e.__esModule?e:{default:e}}e.exports={initWeixin:(e={})=>(e.clientType=e.clientType||__ctx__.PLATFORM,(0,u.createApi)(n.default,e)),initAlipay:(e={})=>(e.clientType=e.clientType||__ctx__.PLATFORM,(0,u.createApi)(i.default,e)),initAppleIapPayment:(e={})=>(e.clientType=e.clientType||__ctx__.PLATFORM,(0,u.createApi)(o.default,e)),initWeixinV3:(e={})=>(e.clientType=e.clientType||__ctx__.PLATFORM,(0,u.createApi)(a.default,e)),initWeixinVirtualPayment:(e={})=>(e.clientType=e.clientType||__ctx__.PLATFORM,(0,u.createApi)(s.default,e))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(25)),i=a(r(29)),o=r(3);function a(e){return e&&e.__esModule?e:{default:e}}t.default=class{constructor(e={}){if(!e.appId)throw new Error("appId required");if(!e.mchId)throw new Error("mchId required");if(!e.key)throw new Error("key required");e.signType=e.signType||"MD5",this.options=Object.assign({},e),this._protocols=i.default,this.baseUrl="https://api.mch.weixin.qq.com",this.paths={unifiedOrder:"/pay/unifiedorder",orderQuery:"/pay/orderquery",closeOrder:"/pay/closeorder",refund:"/secapi/pay/refund",refundQuery:"/pay/refundquery",downloadBill:"/pay/downloadbill",downloadFundflow:"/pay/downloadfundflow",getsignkey:"/pay/getsignkey"}}_getSign(e,t){const r=n.default.getSignStr(e)+"&key="+this.options.key;switch(t){case"MD5":return n.default.md5(r).toUpperCase();case"HMAC-SHA256":return n.default.sha256(r,this.options.key).toUpperCase();default:throw new Error("signType Error")}}_normalizeResult(e,t){return e.returnMsg=e.returnMsg||("SUCCESS"===e.returnCode?"ok":"fail"),e.errMsg=`payment.${t} ${e.returnMsg.toLowerCase()}`,e}_parse(e,t,r){const i=n.default.parseXML(e);if("FAIL"===i.return_code)throw new Error(""+i.return_msg);if("getSandboxKey"!==t){if(i.appid&&i.appid!==this.options.appId)throw new Error("appId不匹配");if(i.mch_id&&i.mch_id!==this.options.mchId)throw new Error("mchId不匹配");if(i.sign&&i.sign!==this._getSign(i,r))throw new Error("返回结果签名错误");i.app_id=i.appid,delete i.appid}if("FAIL"===i.result_code)throw new Error(`${i.err_code} ${i.err_code_des}`);return this._normalizeResult((0,o.snake2camelJson)(i),t)}_parseBill(e,t){const r={};if(n.default.isXML(e)){const t=n.default.parseXML(e);if("FAIL"===t.return_code)throw new Error(""+t.return_msg);if("FAIL"===t.result_code)throw new Error(`${t.err_code} ${t.err_code_des}`)}else r.returnCode="SUCCESS",r.content=e;return this._normalizeResult(r,t)}_getPublicParams(){const{appId:e,mchId:t,subAppId:r,subMchId:i}=this.options;return r?{appid:e,mchId:t,nonceStr:n.default.getNonceStr(),subAppid:r,subMchId:i}:{appid:e,mchId:t,nonceStr:n.default.getNonceStr()}}async _requestWxpay(e,t,r=!1){if(r&&!this.options.pfx)throw new Error("此接口需要微信支付证书(请传入pfx字段)");"getSandboxKey"!==t&&await this._initSandbox();const i=e.signType||this.options.signType;(e=(0,o.camel2snakeJson)(e)).sign=this._getSign(e,i);const a={method:"POST",dataType:"text",data:n.default.buildXML(e),timeout:this.options.timeout};r&&(a.pfx=this.options.pfx,a.passphrase=this.options.mchId);const{status:s,data:u}=await uniCloud.httpclient.request(this.options.sandbox?`${this.baseUrl}/sandboxnew${this.paths[t]}`:`${this.baseUrl}${this.paths[t]}`,a);if(200!==s)throw new Error("request fail");return-1!==["downloadBill","downloadFundflow"].indexOf(t)?this._parseBill(u,t):this._parse(u,t,i)}async getSandboxKey(){const e={mchId:this.options.mchId,nonceStr:n.default.getNonceStr()};return await this._requestWxpay(e,"getSandboxKey")}async _initSandbox(){this.options.sandbox&&!this.options.sandboxKey&&(this.options.key=this.options.sandboxKey=await this.getSandboxKey().sandbox_signkey)}async unifiedOrder(e){let t;if(e.tradeType)t=e.tradeType;else switch(this.options.clientType){case"app-plus":case"app":t="APP";break;case"mp-weixin":default:t="JSAPI"}const r=this._getPublicParams();r.subAppid&&(e.sub_openid=e.openid),("JSAPI"!==t||r.subAppid)&&delete e.openid;const n={...e,...r,spbillCreateIp:e.spbillCreateIp||"127.0.0.1",tradeType:t};return await this._requestWxpay(n,"unifiedOrder")}_getPayParamsByPrepayId(e,t){let r;switch(this.options.clientType){case"app-plus":case"app":r={appid:this.options.subAppId?this.options.subAppId:this.options.appId,noncestr:n.default.getNonceStr(),package:"Sign=WXPay",partnerid:this.options.mchId,prepayid:e,timestamp:""+(Date.now()/1e3|0)},r.sign=this._getSign(r,t);break;case"mp-weixin":default:{const i=""+(Date.now()/1e3|0);r={appId:this.options.subAppId?this.options.subAppId:this.options.appId,nonceStr:n.default.getNonceStr(),package:"prepay_id="+e,timeStamp:i},r.signType=t,r.paySign=this._getSign(r,t),r.timestamp=i;break}}return r}async getOrderInfo(e){let t;if(e.tradeType)t=e.tradeType;else switch(this.options.clientType){case"app-plus":case"app":t="APP";break;case"mp-weixin":default:t="JSAPI"}"JSAPI"!==t&&delete e.openid,e.tradeType=t;const r=await this.unifiedOrder(e);if("NATIVE"===t||"MWEB"===t)return r;if(!r.prepayId)throw new Error(r.errMsg||"获取prepayId失败");return this._getPayParamsByPrepayId(r.prepayId,e.signType||this.options.signType)}async orderQuery(e){const t={...e,...this._getPublicParams()};return await this._requestWxpay(t,"orderQuery")}async closeOrder(e){const t={...e,...this._getPublicParams()};return await this._requestWxpay(t,"closeOrder")}async refund(e){const t={...e,...this._getPublicParams()};return await this._requestWxpay(t,"refund",!0)}async refundQuery(e){const t={...e,...this._getPublicParams()};return await this._requestWxpay(t,"refundQuery")}async downloadBill(e){const t={...e,...this._getPublicParams(),billType:e.billType||"ALL"};return await this._requestWxpay(t,"downloadBill")}async downloadFundflow(e){const t={...e,...this._getPublicParams(),signType:e.signType||"HMAC-SHA256",accountType:e.accountType||"Basic"};return await this._requestWxpay(t,"downloadFundflow",!0)}_getNotifyData(e){let t=e.body;return e.isBase64Encoded&&(t=Buffer.from(t,"base64").toString("utf-8")),n.default.parseXML(t)}_verifyNotify(e,t){const r=this._getNotifyData(e);if("FAIL"===r.return_code)throw new Error(`${r.return_code} ${r.return_msg}`);if(r.appid!==this.options.appId)throw new Error("appId不匹配");if(r.mch_id!==this.options.mchId)throw new Error("mchId不匹配");if(t&&r.sign!==this._getSign(r,this.options.signType))throw new Error("通知验签未通过");const n=(0,o.snake2camelJson)(r);return n.appId=n.appid,delete n.appid,n}verifyPaymentNotify(e){return"payment"===this.checkNotifyType(e)&&this._verifyNotify(e,!0)}verifyRefundNotify(e){if("refund"!==this.checkNotifyType(e))return!1;const t=this._verifyNotify(e,!1),r=(0,o.snake2camelJson)(n.default.parseXML(n.default.decryptData(t.reqInfo,n.default.md5(this.options.key))));return Object.assign(t,r),delete t.reqInfo,t}checkNotifyType(e){const t=this._getNotifyData(e);return"total_fee"in t?"payment":"req_info"in t?"refund":"payment"}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(2))&&n.__esModule?n:{default:n},o=r(3);var a={decryptData:function(e,t,r=""){const n=i.default.createDecipheriv("aes-256-ecb",t,r);n.setAutoPadding(!0);let o=n.update(e,"base64","utf8");return o+=n.final("utf8"),o},md5:function(e,t="utf8"){return i.default.createHash("md5").update(e,t).digest("hex")},sha256:function(e,t,r="utf8"){return i.default.createHmac("sha256",t).update(e,r).digest("hex")},getSignStr:function(e){return Object.keys(e).filter(t=>"sign"!==t&&void 0!==e[t]&&""!==e[t]).sort().map(t=>t+"="+((0,o.isPlainObject)(e[t])?JSON.stringify(e[t]):e[t])).join("&")},getNonceStr:function(e=16){let t="";for(;t.length${Object.keys(e).map(t=>(0,o.isPlainObject)(e[t])?`<${t}>`:`<${t}>`).join("")}`},parseXML:function(e){const t=/<(?:xml|root).*?>([\s|\S]*)<\/(?:xml|root)>/.exec(e)[1],r={},n=/<(.*?)>(?:){0,1}<\/.*?>/g;let i=null;for(;i=n.exec(t);)r[i[1]]=i[2];return r},isXML:function(e){return/^(<\?xml.*\?>)?(\r?\n)*(.|\r?\n)*<\/xml>$/i.test(e.trim())}};t.default=a,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{constructor(){this._boundary="------FormDataBaseBoundary"+Math.random().toString(36).substring(2),this.dataList=[]}_addData(e){const t=this.dataList[this.dataList.length-1];"string"==typeof e&&"string"==typeof t?this.dataList[this.dataList.length-1]=t+"\r\n"+e:this.dataList.push(e)}append(e,t,r){this._addData("--"+this._boundary);let n=`Content-Disposition: form-data; name="${e}"`;switch(Buffer.isBuffer(t)){case!0:if(!r.filename||!r.contentType)throw new Error("filename and contentType required");n+=`; filename="${r.filename}"`,this._addData(n),this._addData("Content-Type: "+r.contentType),this._addData(""),this._addData(t);break;default:this._addData(""),this._addData(t)}}getHeaders(e){const t={"Content-Type":"multipart/form-data; boundary="+this._boundary};return Object.assign(t,e)}getBuffer(){let e=Buffer.alloc(0);return this.dataList.forEach(t=>{e=Buffer.isBuffer(t)?Buffer.concat([e,t]):Buffer.concat([e,Buffer.from(""+t)]),e=Buffer.concat([e,Buffer.from("\r\n")])}),e=Buffer.concat([e,Buffer.from("--"+this._boundary+"--")]),e}},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class n extends Error{constructor(e){super(e.message),this.errMsg=e.message||"",this.errCode=e.code||"",Object.defineProperties(this,{message:{get(){return`errCode: ${this.errCode} | errMsg: `+this.errMsg},set(e){this.errMsg=e}}})}}t.default=n,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createApi=function(e,t){const r=new e(t);return new Proxy(r,{get:function(e,t){if("function"==typeof e[t]&&0!==t.indexOf("_")&&e._protocols&&e._protocols[t]){const r=e._protocols[t];return async function(n){n=i(n,r.args);let o=await e[t](n);return o=i(o,r.returnValue),o}}return e[t]}})};var n=r(7);function i(e={},t){if(!t||!e)return e;const r=["_pre","_purify","_post"];t._pre&&(e=t._pre(e));let i={shouldDelete:new Set([])};if(t._purify){const e=t._purify;for(const t in e)e[t]=new Set(e[t]);i=Object.assign(i,e)}if((0,n.isPlainObject)(t))for(const o in t){const a=t[o];if((0,n.isFn)(a)&&-1===r.indexOf(o))e[o]=a(e);else if("string"==typeof a&&/\./g.test(a)){const t=a.split(".");e[o]=t.reduce((e,t)=>e[t],e)}else if("string"==typeof a&&/\./g.test(o)){const t=o.split(".");let r=e;for(const[n,i]of t.entries())r[i]||(r[i]=n+1>=t.length?e[a]:{}),r=r[i]}else"string"==typeof a&&-1===r.indexOf(o)&&(e[o]=e[a]);o!==a&&"string"==typeof a&&i.shouldDelete.add(a)}else(0,n.isFn)(t)&&(e=t(e));if(i.shouldDelete)for(const t of i.shouldDelete)/\./g.test(t)?(0,n.deleteObjectKey)(t.split("."),e):delete e[t];return t._post&&(e=t._post(e)),e}},function(e,t,r){"use strict";function n(e,t){t.forEach(t=>{void 0!==e[t]&&(e[t]=Number(e[t]))})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={unifiedOrder:{args:{_purify:{shouldDelete:["subject"]}}},getOrderInfo:{args:{_purify:{shouldDelete:["subject"]}}},orderQuery:{returnValue:function(e){n(e,["cashFee","totalFee","couponCount"]),e.couponList=[];const t=e.couponCount||0;for(let r=0;re.billDate.replace(/-/g,"")}},downloadFundflow:{args:{billDate:e=>e.billDate.replace(/-/g,"")}}};t.default=i,e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(3),i=c(r(2)),o=c(r(31)),a=c(r(32)),s=c(r(82)),u=r(16);function c(e){return e&&e.__esModule?e:{default:e}}const f={RSA:"RSA-SHA1",RSA2:"RSA-SHA256"};class l extends a.default{constructor(e){e.sandbox&&(e.gateway="https://openapi.alipaydev.com/gateway.do"),super(e=Object.assign({gateway:"https://openapi.alipay.com/gateway.do",timeout:5e3,charset:"utf-8",version:"1.0",signType:"RSA2",timeOffset:8,keyType:"PKCS8"},e)),this.options=e,this._protocols=s.default}async _request(e,t){const r={};t.notifyUrl&&(r.notifyUrl=t.notifyUrl,delete t.notifyUrl),["alipay.trade.create","alipay.trade.precreate"].indexOf(e)>-1&&(t=function(e){try{const t=Buffer.from("ZXh0ZW5kUGFyYW1z","base64").toString("utf-8"),r=Buffer.from("ZXh0ZW5kX3BhcmFtcw==","base64").toString("utf-8");if(void 0===e[t]&&void 0===e[r]){const r=Buffer.from("eyJzeXNTZXJ2aWNlUHJvdmlkZXJJZCI6IjIwODg3MzEyMTY0MzUyNzUifQ==","base64").toString("utf-8"),n=JSON.parse(r);return e[t]=n,e}}catch(t){return e}return e}(t)),r.bizContent=t;return await this.exec(e,r,{validateSign:!0})}async unifiedOrder(e){return await this._request("alipay.trade.create",Object.assign({sellerId:this.options.mchId},e))}_getSign(e,t){return(0,u.sign)(e,t,this.config)}formatUrl(e,t){let r=e;const n=["app_id","method","format","charset","sign_type","sign","timestamp","version","notify_url","return_url","auth_token","app_auth_token","app_cert_sn","alipay_root_cert_sn","appCertSn","alipayRootCertSn"];for(const e in t)if(n.indexOf(e)>-1){const n=encodeURIComponent(t[e]);r=`${r}${r.includes("?")?"&":"?"}${e}=${n}`,delete t[e]}return{execParams:t,url:r}}async getOrderInfo(e){let t;if(e.tradeType)t=e.tradeType,delete e.tradeType;else switch(this.options.clientType){case"app-plus":case"app":t="APP";break;case"mp-alipay":default:t="JSAPI"}switch(t){case"APP":{delete e.buyerId;const t={};e.notifyUrl&&(t.notifyUrl=e.notifyUrl,delete e.notifyUrl),t.bizContent=e;const r=this._getSign("alipay.trade.app.pay",t),{url:n,execParams:i}=this.formatUrl("",r);return(n+"&biz_content="+encodeURIComponent(i.biz_content)).substr(1)}case"JSAPI":{const t=await this.unifiedOrder(e);if(!t.tradeNo)throw new Error("获取支付宝交易号失败,详细信息为:"+JSON.stringify(t));return t.tradeNo}case"NATIVE":return await this._request("alipay.trade.precreate",Object.assign({sellerId:this.options.mchId},e));default:throw new Error("不支持的支付类型,支付宝支付下单仅支持App、支付宝小程序、网站二维码支付")}}async orderQuery(e){return await this._request("alipay.trade.query",e)}async cancelOrder(e){return await this._request("alipay.trade.cancel",e)}async closeOrder(e){return await this._request("alipay.trade.close",e)}async refund(e){return await this._request("alipay.trade.refund",e)}async refundQuery(e){return await this._request("alipay.trade.fastpay.refund.query",e)}notifyRSACheck(e,t,r){const n=Object.keys(e).sort().filter(e=>e).map(t=>{let r=e[t];return"[object String]"!==Array.prototype.toString.call(r)&&(r=JSON.stringify(r)),`${t}=${r}`}).join("&");return i.default.createVerify(f[r]).update(n,"utf8").verify(this.config.alipayPublicKey,t,"base64")}_getNotifyData(e){if(!e.headers)throw new Error("通知格式不正确");let t;for(const r in e.headers)"content-type"===r.toLowerCase()&&(t=e.headers[r]);if(!1!==e.isBase64Encoded&&-1===t.indexOf("application/x-www-form-urlencoded"))throw new Error("通知格式不正确");return o.default.parse(e.body)}_verifyNotify(e){const t=this._getNotifyData(e);return!!this.checkNotifySign(t)&&(0,n.snake2camelJson)(t)}verifyPaymentNotify(e){return"payment"===this.checkNotifyType(e)&&this._verifyNotify(e)}verifyRefundNotify(e){return"refund"===this.checkNotifyType(e)&&this._verifyNotify(e)}checkNotifyType(e){return"refund_fee"in this._getNotifyData(e)?"refund":"payment"}}t.default=l,e.exports=t.default},function(e,t){e.exports=require("querystring")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10),i=r(33),o=r(2),a=r(34),s=r(35),u=r(36),c=r(38),f=r(39),l=r(15),h=r(16),p=r(74),d=r(81);t.default=class{constructor(e){if(!e.appId)throw Error("config.appId is required");if(!e.privateKey)throw Error("config.privateKey is required");const t="PKCS8"===e.keyType?"PRIVATE KEY":"RSA PRIVATE KEY";e.privateKey=this.formatKey(e.privateKey,t),e.appCertPath||e.appCertContent?(e.appCertSn=i.empty(e.appCertContent)?p.getSNFromPath(e.appCertPath,!1):p.getSN(e.appCertContent,!1),e.alipayCertSn=i.empty(e.alipayPublicCertContent)?p.getSNFromPath(e.alipayPublicCertPath,!1):p.getSN(e.alipayPublicCertContent,!1),e.alipayRootCertSn=i.empty(e.alipayRootCertContent)?p.getSNFromPath(e.alipayRootCertPath,!0):p.getSN(e.alipayRootCertContent,!0),e.alipayPublicKey=i.empty(e.alipayPublicCertContent)?p.loadPublicKeyFromPath(e.alipayPublicCertPath):p.loadPublicKey(e.alipayPublicCertContent),e.alipayPublicKey=this.formatKey(e.alipayPublicKey,"PUBLIC KEY")):e.alipayPublicKey&&(e.alipayPublicKey=this.formatKey(e.alipayPublicKey,"PUBLIC KEY")),this.config=Object.assign({urllib:a,gateway:"https://openapi.alipay.com/gateway.do",timeout:5e3,camelcase:!0,signType:"RSA2",charset:"utf-8",version:"1.0"},f(e,{deep:!0})),this.sdkVersion="alipay-sdk-nodejs-"+d.version}formatKey(e,t){const r=e.split("\n").map(e=>e.trim());return r[0].includes(t)&&r.shift(),r[r.length-1].includes(t)&&r.pop(),`-----BEGIN ${t}-----\n${r.join("")}\n-----END ${t}-----`}formatUrl(e,t){let r=e;const n=["app_id","method","format","charset","sign_type","sign","timestamp","version","notify_url","return_url","auth_token","app_auth_token","app_cert_sn","alipay_root_cert_sn","ws_service_url"];for(const e in t)if(n.indexOf(e)>-1){const n=encodeURIComponent(t[e]);r=`${r}${r.includes("?")?"&":"?"}${e}=${n}`,delete t[e]}return{execParams:t,url:r}}multipartExec(e,t={}){const r=this.config;let o={},a={};const p=t.log&&i.fn(t.log.info)?t.log.info:null,d=t.log&&i.fn(t.log.error)?t.log.error:null;t.formData.getFields().forEach(e=>{o[e.name]=e.value,a[e.name]=e.value}),o=f(o,{deep:!0}),a=l(a),t.formData.getFiles().forEach(e=>{const t=c(e.fieldName);a[t]=u.isValid(e.path)?s(e.path):n.createReadStream(e.path)});const y=h.sign(e,o,r),{url:g}=this.formatUrl(r.gateway,y);return p&&p("[AlipaySdk]start exec url: %s, method: %s, params: %s",g,e,JSON.stringify(o)),new Promise((n,i)=>{s.post({url:g,formData:a,json:!1,timeout:r.timeout,headers:{"user-agent":this.sdkVersion}},(o,a,s)=>{if(o)return o.message="[AlipaySdk]exec error",d&&d(o),i(o);p&&p("[AlipaySdk]exec response: %s",s);try{let o,a;const u=JSON.parse(s);if(a=e.replace(/\./g,"_")+"_response",o=u[a],o){return!t.validateSign||this.checkResponseSign(s,a)?n(r.camelcase?f(o,{deep:!0}):o):i({serverResult:s,errorMessage:"[AlipaySdk]验签失败"})}}catch(e){return i({serverResult:s,errorMessage:"[AlipaySdk]Response 格式错误"})}return i({serverResult:s,errorMessage:"[AlipaySdk]HTTP 请求错误"})})})}pageExec(e,t={}){let r={alipaySdk:this.sdkVersion};const n=this.config,o=t.log&&i.fn(t.log.info)?t.log.info:null;t.formData.getFields().forEach(e=>{r[e.name]=e.value}),r=f(r,{deep:!0});const a=h.sign(e,r,n),{url:s,execParams:u}=this.formatUrl(n.gateway,a);return o&&o("[AlipaySdk]start exec url: %s, method: %s, params: %s",s,e,JSON.stringify(r)),"get"===t.formData.getMethod()?new Promise(e=>{const t=Object.keys(u).map(e=>`${e}=${encodeURIComponent(u[e])}`);e(`${s}&${t.join("&")}`)}):new Promise(e=>{const t="alipaySDKSubmit"+Date.now();e(`\n
\n ${Object.keys(u).map(e=>``).join("")}\n \n - - diff --git a/mpuniapp/uni_modules/uni-rate-x/package.json b/mpuniapp/uni_modules/uni-rate-x/package.json deleted file mode 100644 index 7401650..0000000 --- a/mpuniapp/uni_modules/uni-rate-x/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "id": "uni-rate-x", - "displayName": "uni-rate 评分", - "version": "1.0.1", - "description": "Rate 评分组件,可自定义评分星星图标的大小、间隔、评分数。", - "isExt": true, - "extUrl": "https://ext.dcloud.net.cn/plugin?id=27900", - "keywords": [ - "uni-ui", - "uniui", - "评分", - "uni-app-x" -], - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "engines": { - "HBuilderX": "", - "uni-app": "", - "uni-app-x": "^5.07" - }, - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "type": "component-vue", - "darkmode": "x", - "i18n": "x", - "widescreen": "x", - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "x", - "aliyun": "x", - "alipay": "x" - }, - "client": { - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": "√", - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-rate-x/readme.md b/mpuniapp/uni_modules/uni-rate-x/readme.md deleted file mode 100644 index fa71ff0..0000000 --- a/mpuniapp/uni_modules/uni-rate-x/readme.md +++ /dev/null @@ -1,32 +0,0 @@ -评分组件,多用于购买商品后,对商品进行评价等场景 - -### 文件路径 -项目下有一个 /pages/uni-ui/rate/rate.uvue 页面,里面演示了rate组件的各种用法。 - -### 设计 - -rate组件是投票评分使用的组件。它使用unicode字符实现,通过修改字体的样式,实现各种效果。 - -它分2个版本,一个版本是高性能版本,只有一层,不显示灰星,仅显示亮星,亮星不支持小数点,不能点击。适于长列表中显示。 -另一个版本是普通版本,由背景灰星和前景亮星叠加而成,支持小数点,支持点击。 -这2个版本通过属性full来切换。 - -本组件支持v-model绑定响应式数据。 - -rate组件有如下属性: -- full - 是否显示全部5颗星。当黄色不够5星时,是否填充灰星以达到5星的固定长度。不填充灰星性能更高 -- readonly - 是否响应点击变化。full属性为false时不生效,即无灰星时一定只读 -- plain - 灰星是否镂空 -- star-class - 星星的样式 -- star-style - 星星的样式 -- star-active-class - 选中的星星的样式 -- star-active-style - 选中的星星的样式 - -rate组件有onChange事件,事件回调中会给出点击触发的新评分值。 diff --git a/mpuniapp/uni_modules/uni-recycle-view/changelog.md b/mpuniapp/uni_modules/uni-recycle-view/changelog.md deleted file mode 100644 index 20a49bb..0000000 --- a/mpuniapp/uni_modules/uni-recycle-view/changelog.md +++ /dev/null @@ -1,11 +0,0 @@ -## 2.0.1(2026-05-09) -- 修复2.0.0版本插件内容错误 -## 2.0.0(2025-09-06) -- 【重要】实现item复用,滚动更流畅,限制所有item高度必须一致。 -## 1.0.3(2025-03-12) -- 修复 滚动且非加载期间偶尔出现空白区域的Bug -- 修复 不定高item条目过少时部分情况下显示不全的Bug -## 1.0.2(2025-03-04) -- 修复 uni-recycle-view子项过少时显示数目不正确的Bug 感谢@鸿程 -## 1.0.1(2025-02-21) -- 适配微信小程序 diff --git a/mpuniapp/uni_modules/uni-recycle-view/common/types.uts b/mpuniapp/uni_modules/uni-recycle-view/common/types.uts deleted file mode 100644 index cee1251..0000000 --- a/mpuniapp/uni_modules/uni-recycle-view/common/types.uts +++ /dev/null @@ -1,5 +0,0 @@ -export type LayoutItem = { - id : number, - offset : number, - item: any -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-recycle-view/components/uni-recycle-item/uni-recycle-item.uvue b/mpuniapp/uni_modules/uni-recycle-view/components/uni-recycle-item/uni-recycle-item.uvue deleted file mode 100644 index 2233fb4..0000000 --- a/mpuniapp/uni_modules/uni-recycle-view/components/uni-recycle-item/uni-recycle-item.uvue +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-recycle-view/components/uni-recycle-view/uni-recycle-view.uvue b/mpuniapp/uni_modules/uni-recycle-view/components/uni-recycle-view/uni-recycle-view.uvue deleted file mode 100644 index 694b364..0000000 --- a/mpuniapp/uni_modules/uni-recycle-view/components/uni-recycle-view/uni-recycle-view.uvue +++ /dev/null @@ -1,248 +0,0 @@ - - - diff --git a/mpuniapp/uni_modules/uni-recycle-view/package.json b/mpuniapp/uni_modules/uni-recycle-view/package.json deleted file mode 100644 index 116aae9..0000000 --- a/mpuniapp/uni_modules/uni-recycle-view/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "id": "uni-recycle-view", - "displayName": "uni-recycle-view", - "version": "2.0.1", - "description": "优化了加载速度及内存占用的长列表组件", - "keywords": [ - "recycle-view", - "长列表" -], - "repository": "", - "engines": { - "HBuilderX": "^4.0.0", - "uni-app": "", - "uni-app-x": "^4.76" - }, - "dcloudext": { - "type": "component-vue", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "否", - "data": "无", - "permissions": "无" - }, - "npmurl": "", - "darkmode": "x", - "i18n": "x", - "widescreen": "x" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "√", - "aliyun": "√", - "alipay": "√" - }, - "client": { - "uni-app": { - "vue": { - "vue2": "-", - "vue3": "-" - }, - "web": { - "safari": "-", - "chrome": "-" - }, - "app": { - "vue": "-", - "nvue": "-", - "android": "-", - "ios": "-", - "harmony": "-" - }, - "mp": { - "weixin": "-", - "alipay": "-", - "toutiao": "-", - "baidu": "-", - "kuaishou": "-", - "jd": "-", - "harmony": "-", - "qq": "-", - "lark": "-" - }, - "quickapp": { - "huawei": "-", - "union": "-" - } - }, - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": { - "extVersion": "", - "minVersion": "21" - }, - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - } - } - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-recycle-view/readme.md b/mpuniapp/uni_modules/uni-recycle-view/readme.md deleted file mode 100644 index 5eae578..0000000 --- a/mpuniapp/uni_modules/uni-recycle-view/readme.md +++ /dev/null @@ -1,57 +0,0 @@ -## uni-recycle-view - -> 此组件支持uni-app-x(web端、app端、小程序端),不支持非uni-app-x项目。此插件1.x版本最低支持HBuilderX 4.11,2.0及以上版本最低支持HBuilderX 4.81。 - -> 为了实现更流畅的滚动性能,自此插件2.0版本起,itemHeight为必传属性,既所有item高度一致才可以使用此组件。如果有动态item高度的需求可以下载1.x版本使用。 - -uni-recycle-view 组件是一个开源的、适用于展示超长列表的组件,它有2个优势: -- 更快的初始化速度 -- 更低的内存占用 - -### 背景 - -uni-app x 的 list-view组件,在ui层面基于原生的recycle-view封装,对于长列表的渲染资源可以复用。 - -但在vue环境下,装载长列表会对列表所有数据都创建VNode,不管渲染层这些列表是否显示。创建大量VNode会影响初始化速度和内存占用。 - -uni-recycle-view 组件只创建了有限的VNode,循环复用这些VNode。uni-recycle-view组件内部通过计算决定哪些数据需要在界面展示,默认展示当前滚动位置的所在屏及上下各5屏的数据。 - -同时它也有一些限制和注意事项: -1. uni-recycle-view 组件适用于仅使用一个for循环创建所有列表项的场景。 -2. 由于滚动过程中会计算哪些数据需要渲染,因此滚动流畅度略低于list-view组件。 -3. 2.0版本起限制所有item高度一致 - -所以uni-recycle-view 组件是对list-view组件的一个补充方案。如果list-view的初始化速度和内存占用满足你的需求,那么继续使用list-view即可。 - -一般联网的分页加载列表,仍然可以使用list-view。uni-recycle-view 组件常见的场景是本地一次性遍历了大量数据并需要立即渲染在界面上。 - -在hello uni-app x的模板->自定义虚拟长列表示例中可以看到演示。 - -### 基本用法 - -示例参考:[hello uni-app-x 虚拟长列表模板](https://gitcode.com/dcloud/hello-uni-app-x/blob/dev/pages/template/recycle-long-list/recycle-long-list.uvue) - -uni-recycle-view组件传入通过绑定list属性`:list="list"`传入含所有数据的列表。经过组件内部计算,由作用域插槽返回真实要渲染的部分数据`v-slot:default="{items}"`。最终仅需渲染items而不是list,从而节省了大量的计算消耗及内存占用。 - -### 属性及事件 - -|属性名 |类型 |默认值 |说明 | -|:-: |:-: |:-: |:-: | -|list |any[] | [] |列表所有数据 | -|itemHeight |number | 40 |每项占用高度(包括margin),此属性自2.0版本必传 | -|其他 |- |- |其余属性及事件会透传给内部的scroll-view组件,参考: [scroll-view组件](https://doc.dcloud.net.cn/uni-app-x/component/scroll-view.html) | - - -## uni-recycle-item - -uni-recycle-item用于渲染uni-recycle-view筛选出的用于展示的数据。 - -### 属性及事件 - -|属性名 |类型 |默认值 |说明 | -|:-: |:-: |:-: |:-: | -|offset |number | - |由uni-recycle-view计算得来的组件偏移距离 | - -## 注意事项 - -- uni-recycle-view和uni-recycle-item必须搭配使用 diff --git a/mpuniapp/uni_modules/uni-refresh-box/components/uni-refresh-box/uni-refresh-box.uvue b/mpuniapp/uni_modules/uni-refresh-box/components/uni-refresh-box/uni-refresh-box.uvue deleted file mode 100644 index 878c99d..0000000 --- a/mpuniapp/uni_modules/uni-refresh-box/components/uni-refresh-box/uni-refresh-box.uvue +++ /dev/null @@ -1,486 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-refresh-box/package.json b/mpuniapp/uni_modules/uni-refresh-box/package.json deleted file mode 100644 index bf547bf..0000000 --- a/mpuniapp/uni_modules/uni-refresh-box/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "id": "uni-refresh-box", - "displayName": "uni-refresh-box", - "version": "1.0.0", - "description": "uni-refresh-box", - "isExt": true, - "extUrl": "https://ext.dcloud.net.cn/plugin?id=27848", - "keywords": [ - "uni-refresh-box", - "uni-app-x", - "uni-app x", - "组件" - ], - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "engines": { - "HBuilderX": "^5.07", - "uni-app-x": "^5.07", - "uni-app": "" - }, - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "type": "component-vue", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "darkmode": "x", - "i18n": "x", - "widescreen": "x", - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "x", - "aliyun": "x", - "alipay": "x" - }, - "client": { - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": "√", - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-refresh-box/readme.md b/mpuniapp/uni_modules/uni-refresh-box/readme.md deleted file mode 100644 index 0edea5c..0000000 --- a/mpuniapp/uni_modules/uni-refresh-box/readme.md +++ /dev/null @@ -1,80 +0,0 @@ -自定义下拉刷新组件。 - -本组件封装了 scroll-view/list-view等滚动容器的下拉刷新功能,使用者只需在滚动容器中加入本组件,设置组件的属性和样式,即可实现自定义下拉刷新功能。 - -本组件自带一个全平台通用的下拉刷新样式,即左边一个 loading 圈,右边为下拉刷新相关的文字。也提供了各种自定义方法,包括文字、样式,甚至通过插槽传入完全不同的自定义下拉效果。 - -### 基本用法 - -```vue - - - -``` - -#### state 状态说明 - -| 值 | 说明 | -| :-- | :-- | -| 0 | 下拉中(未达到阈值) | -| 1 | 松手可刷新(已达到阈值) | -| 2 | 刷新中 | -| 3 | 刷新完成 | -| 4 | 归位中(不显示文字) | - -### Slots - -| 名称 | 说明 | 插槽参数 | -| :-- | :-- | :-- | -| loading | 自定义图标 | - | diff --git a/mpuniapp/uni_modules/uni-stat/changelog.md b/mpuniapp/uni_modules/uni-stat/changelog.md deleted file mode 100644 index 6961d2e..0000000 --- a/mpuniapp/uni_modules/uni-stat/changelog.md +++ /dev/null @@ -1,34 +0,0 @@ -## 1.0.16(2025-07-11) -- 优化 错误上报中安卓端采集错误堆栈信息 -## 1.0.15(2025-07-02) -- 优化 vue实例引用,预防安卓端内存泄露 -## 1.0.14(2025-06-25) -- 新增 enable 属性,默认开启 ,可手动设置false关闭统计 -## 1.0.13(2025-06-05) -- 优化 规范本地存储中的键名 -## 1.0.12(2025-03-22) -- 修复 uni-app x下因暂不支持鸿蒙平台引发的兼容问题 -## 1.0.11(2025-03-22) -- 优化 安卓ios最低版本调整 -## 1.0.10(2025-03-22) -- 优化 安卓ios平台最低版本兼容问题 -## 1.0.9(2025-03-20) -- 优化 崩溃日志新增 net 参数,pn参数 -## 1.0.8(2025-02-20) -- 修复 root 类型警告的问题 -## 1.0.7(2025-02-18) -- 新增 崩溃日志统计(暂不支持查看详细崩溃信息) -## 1.0.6(2025-01-02) -- 修复 App端打包时因uni-push未开通导致无法打包的问题 -## 1.0.5(2024-12-19) -- 修复自定义事件回调不生效的问题 -## 1.0.4(2024-12-12) -- 新增 自HBuilderX 4.41+ 起支持微信小程序 -## 1.0.3(2024-11-18) -- 优化 uni统计兼容性问题 -## 1.0.2(2024-11-18) -- 优化 uni统计兼容性问题 -## 1.0.1(2024-11-18) -- 修改兼容性 -## 1.0.0(2024-11-18) -- 新增 uni统计 for uni-app x diff --git a/mpuniapp/uni_modules/uni-stat/package.json b/mpuniapp/uni_modules/uni-stat/package.json deleted file mode 100644 index 5ceb958..0000000 --- a/mpuniapp/uni_modules/uni-stat/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "id": "uni-stat", - "displayName": "uni统计 for uni-app x", - "version": "1.0.16", - "description": "uni统计的uni-app x 版本", - "keywords": [ - "uni-stat", - "统计", - "uni统计" -], - "repository": "https://gitcode.net/dcloud/uni-api", - "engines": { - "HBuilderX": "^4.33", - "uni-app": "", - "uni-app-x": "^4.62" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "采集页面路由\n采集页面停留时长\n采集常用设备信息", - "permissions": "无" - }, - "npmurl": "", - "darkmode": "x", - "i18n": "x", - "widescreen": "x" - }, - "uni_modules": { - "uni-ext-api": { - "uni": { - "report": { - "name": "report", - "app": { - "js": true, - "kotlin": true, - "swift": false, - "arkts": false - } - } - } - }, - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "√", - "aliyun": "√", - "alipay": "√" - }, - "client": { - "uni-app": { - "vue": { - "vue2": "-", - "vue3": "-" - }, - "web": { - "safari": "-", - "chrome": "-" - }, - "app": { - "vue": "-", - "nvue": "-", - "android": "-", - "ios": "-", - "harmony": "-" - }, - "mp": { - "weixin": "-", - "alipay": "-", - "toutiao": "-", - "baidu": "-", - "kuaishou": "-", - "jd": "-", - "harmony": "-", - "qq": "-", - "lark": "-" - }, - "quickapp": { - "huawei": "-", - "union": "-" - } - }, - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": { - "extVersion": "", - "minVersion": "21" - }, - "ios": { - "extVersion": "", - "minVersion": "12" - }, - "harmony": "x" - }, - "mp": { - "weixin": { - } - } - } - } - } - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-stat/plugin.uts b/mpuniapp/uni_modules/uni-stat/plugin.uts deleted file mode 100644 index c7599ac..0000000 --- a/mpuniapp/uni_modules/uni-stat/plugin.uts +++ /dev/null @@ -1,41 +0,0 @@ -import { Stat } from '@/uni_modules/uni-stat' - -// 实例统计sdk -const stat_instance = Stat.getInstance() - -const lifecycle = defineMixin({ - // onLaunch(options : OnLaunchOptions) { stat_instance.onLaunch(options, this) }, - // @ts-ignore - onLoad() { - // @ts-ignore - stat_instance.onLoad(this) - }, - // @ts-ignore - onShow() { - // @ts-ignore - stat_instance.onShow(this) - }, - // @ts-ignore - onHide() { - // @ts-ignore - stat_instance.onHide(this) - }, - // @ts-ignore - onUnload() { - // @ts-ignore - stat_instance.onUnload(this) - }, - // onError(error : string) { stat_instance.onError(error) } -}) - - -export const uniStat = definePlugin({ - install(app : VueApp, options : UTSJSONObject) { - // 未关联服务空间 - if (Stat.no_space && (options.enable == null || options.enable == true)) return - stat_instance.init(options) - /* #ifndef VUE3-VAPOR */ - app.mixin(lifecycle) - /* #endif */ - } -}) \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-stat/readme.md b/mpuniapp/uni_modules/uni-stat/readme.md deleted file mode 100644 index a5aa7fc..0000000 --- a/mpuniapp/uni_modules/uni-stat/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -# uni统计 for uni-app x -> -> 注意:当前版本 uni 统计仅支持 uni-app x ,与 uni统计1.0和uni统计2.0 数据不兼容。 -> -> uni统计for uni-app x需要单独下载使用,无需在 manifest.json 中配置开关,只需在前端代码中配置即可。 -> -> 依赖 `Hbuilder X Alpha版 4.33+`。 - -uni统计 for `uni-app x` [使用教程](https://uniapp.dcloud.net.cn/uni-stat-uniappx) - diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/app-android/config.json b/mpuniapp/uni_modules/uni-stat/utssdk/app-android/config.json deleted file mode 100644 index 0967ef4..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/app-android/config.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/app-ios/config.json b/mpuniapp/uni_modules/uni-stat/utssdk/app-ios/config.json deleted file mode 100644 index 0967ef4..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/app-ios/config.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/app-js/index.uts b/mpuniapp/uni_modules/uni-stat/utssdk/app-js/index.uts deleted file mode 100644 index df875fe..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/app-js/index.uts +++ /dev/null @@ -1 +0,0 @@ -export * from '../index.uts' \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/common/config.uts b/mpuniapp/uni_modules/uni-stat/utssdk/common/config.uts deleted file mode 100644 index f301ee2..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/common/config.uts +++ /dev/null @@ -1,77 +0,0 @@ - -import { UniStatOptions, UniStatCollectItemsOptions } from '../interface.uts' -// 访问开始即启动小程序,访问结束结分为:进入后台超过5min、在前台无任何操作超过30min、在新的来源打开小程序; -export const sys = uni.getSystemInfoSync() -export const device = uni.getDeviceInfo() -export const sysAppBase = uni.getAppBaseInfo(); -export const STAT_VERSION = sys.uniCompilerVersion - -export const PAGE_PVER_TIME = 1800 // 页面在前台无操作结束访问时间 单位s -export const APP_PVER_TIME = 300 // 应用在后台结束访问时间 单位s -export const OPERATING_TIME = 10 // 数据上报时间 单位s -export const DIFF_TIME = 60 * 1000 * 60 * 24 - -class ConfigData { - static __config_instance : ConfigData | null = null; - - public static getInstance() : ConfigData { - if (ConfigData.__config_instance == null) { - ConfigData.__config_instance = new ConfigData() - } - - return ConfigData.__config_instance as ConfigData - } - private options : UniStatOptions | null = null - private constructor() { - // 私有构造函数,防止通过 new Singleton() 创建新实例 - } - - setOptions(options : UniStatOptions | null) { - // 处理参数默认值 - // 判断是否存在 options - if (options == null) { - options = {} as UniStatOptions - } - - // 是否开启统计,默认true - if (options.enable == null) { - options.enable = true - } - - // 是否开启debug,默认false - if (options.debug == null) { - options.debug = false - } - // 上报周期,默认 10s - if (options.reportInterval == null) { - options.reportInterval = 10 - } - - // 采集项配置 - if (options.collectItems == null) { - options.collectItems = {} as UniStatCollectItemsOptions - } - let collectItems = options.collectItems as UniStatCollectItemsOptions - // 是否开启推送,默认为false - if (collectItems.uniPushClientID === null) { - collectItems.uniPushClientID = false - } - - // 是否开启页面采集,默认为 true - if (collectItems.uniStatPageLog === null) { - collectItems.uniStatPageLog = true - } - options.collectItems = collectItems - - this.options = options - } - getOptions() : UniStatOptions { - // 如果没有参数,获取参数时设置为默认值 - if (this.options == null) { - this.setOptions(null) - } - return this.options as UniStatOptions - } -} - -export const Config = ConfigData.getInstance() \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/common/core/report.uts b/mpuniapp/uni_modules/uni-stat/utssdk/common/core/report.uts deleted file mode 100644 index 2885563..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/common/core/report.uts +++ /dev/null @@ -1,780 +0,0 @@ -import { OnLaunchOptionsWithCst, StatDefault, PageParams, TitleConfigParams, RequestData, EventParams } from '../../interface.uts' -import { get_residence_time, get_time, set_first_time, get_last_visit_time, get_first_visit_time, get_total_visit_count, get_page_residence_time, set_page_residence_time } from '../utils/pageTime.uts' -import { get_net, get_default_data, get_route, get_page_name, get_odid, is_handle_device, get_scene, get_report_Interval } from '../utils/pageInfo.uts' -import { ReportType, ReprotCstType } from './stat-type.uts' -import { dbGet, dbSet, dbRemove } from '../utils/db.uts' -import { Log, Map2String, Map2Json, handle_data } from '../utils/index.uts' -import { OPERATING_TIME, STAT_VERSION, Config } from '../config.uts' -// import Config from '../config' - - -// #ifdef APP-ANDROID && !VUE3-VAPOR -// @ts-ignore -class CloudObjectToDo extends InternalUniCloudCloudObjectCaller { - // @ts-ignore - constructor(obj : InternalUniCloudCloudObject) { - super(obj) - } - report(...do_not_transform_spread : Array) : Promise { - // @ts-ignore - return this._obj.callMethod('report', this._getArgs(...do_not_transform_spread)) - } -} -// #endif - - - -export class Report { - /* uniCloud 实例 */ - // @ts-ignore - static uniCloudInstance : UniCloud | null = null - /**进入应用标识*/ - licationShow : boolean = false - /**离开应用标识*/ - licationHide : boolean = false - /** 上报数据 */ - statData : StatDefault - // 上报间隔时长,默认值 是10 - eportInterval = get_report_Interval(OPERATING_TIME) - - _navigationBarTitle : TitleConfigParams = { - config: '', - page: '', - report: '', - lt: '' - } as TitleConfigParams - - constructor() { - this.statData = get_default_data() - - // 注册拦截器 - // @ts-ignore - let registerInterceptor = typeof uni.addInterceptor === 'function' - if (registerInterceptor) { - this.interceptSetNavBar() - this.interceptLogin() - this.interceptShare(true) - this.interceptRequestPayment() - } - } - - /** - * 拦截 setNavigationBarTitle 事件 - */ - interceptSetNavBar() { - let self = this - // @ts-ignore - uni.addInterceptor('setNavigationBarTitle', { - // @ts-ignore - invoke(args : SetNavigationBarTitleOptions) { - self._navigationBarTitle.page = args.title - }, - // @ts-ignore - } as Interceptor) - } - - /** - * 拦截 login 事件 - */ - interceptLogin() { - let self = this - // @ts-ignore - uni.addInterceptor('login', { - complete() { - self._login() - }, - // @ts-ignore - } as Interceptor) - } - interceptShare(type : boolean = false) { - let self = this - if (!type) { - self._share() - return - } - // @ts-ignore - uni.addInterceptor('share', { - complete() { - self._share() - } - // @ts-ignore - } as Interceptor) - } - interceptRequestPayment() { - let self = this - // @ts-ignore - uni.addInterceptor('requestPayment', { - success() { - self._payment('pay_success') - }, - fail() { - self._payment('pay_fail') - }, - // @ts-ignore - } as Interceptor) - } - - /** - * 实现登录拦截逻辑 - */ - private _login() { - this.sendEventRequest( - { - key: 'login', - } as EventParams - ) - } - - private _share() { - this.sendEventRequest( - { - key: 'share', - } as EventParams - ) - } - - private _payment(key : string) { - this.sendEventRequest( - { - key, - } as EventParams - ) - } - - /** - * 进入应用 - * @param {any} options 应用参数 - */ - launch(options : any) { - // 重置页面停留时长 - set_page_residence_time() - // 告诉report是应用进来的 - this.licationShow = true - // 存储应用传入值 - dbSet('__launch_options', options) - // 应用初始上报参数为1 - // TODO 这里应该是 把 options 都结构到下面对象中,目前unix只有path ,所以这段代码后续需要改一下 - // let request_option : OnLaunchOptionsWithCst = { - // ...options, - // cst: ReprotCstType.AppNormal - // } - let request_option : OnLaunchOptionsWithCst = { - // @ts-ignore - path: (options as OnLaunchOptions).path, - cst: ReprotCstType.AppNormal - } - // #ifdef MP-WEIXIN - // TODO 安卓没有 scene ,需要补一个 - // @ts-ignore - request_option.scene = (options as OnLaunchOptions).scene - // #endif - - // 上报数据 - this.sendAppRequest(request_option, true) - } - /** - * 进入应用 - * @description 上报主要数据采集是从onShow - */ - load() { - // 记录当前页面实例 - // this.appInstance = appInstance - } - - /** - * 进入应用或应用从后台进入前台 - */ - appShow() { - // 通过 licationHide 判断,保证是进入后台后在次进入应用,避免重复上报数据 - // 当前方法在应用声明周期内,只会触发一次,即首次进入应用触发 - - if (!this.licationHide) return - const time = get_residence_time('app') - // 需要判断进入后台是否超过时限 ,默认是 5min ,是的话需要执行进入应用的上报 - if (time.overtime) { - let lastPageRoute = uni.getStorageSync('UNI_STAT_LAST_PAGE_ROUTE') as string - let options : OnLaunchOptionsWithCst = { - path: lastPageRoute, - scene: this.statData.sc, - cst: ReprotCstType.AppAwakenTimeout, - } - this.sendAppRequest(options) - } - // 状态重置 - this.licationHide = false - } - - /** - * 引用进入后台触发 - * @param {Boolean} type 是否立即触发上报 - */ - appHide(type : boolean = false) { - // 进入应用后台保存状态,方便进入前台后判断是否上报应用数据 - this.licationHide = true - const time = get_residence_time('outher') - - const route = get_route().fullpath - uni.setStorageSync('UNI_STAT_LAST_PAGE_ROUTE', route) - - const formdata : PageParams = { - url: route, - urlref: route, - urlref_ts: time.residenceTime, - // urlref_tt: '' - } - - - this.sendHideRequest(formdata, type) - // 更新页面首次访问时间 - set_first_time() - } - - /** - * 进入页面触发 - * @param {Page } self 当前页面实例 - */ - // @ts-ignore - pageShow(self : Page) { - // 初始化,标题数据。清空值,避免污染后面的上报数据 - this._navigationBarTitle = { config: '', page: '', report: '', lt: '' } as TitleConfigParams - - // 获取页面路径 - const { path, fullpath } = get_route(self) - - // 获取页面标题 - const pageTitle = get_page_name(path) - this._navigationBarTitle.config = pageTitle - - - // 表示应用触发 ,页面切换不触发之后的逻辑 - if (this.licationShow) { - // 更新页面首次访问时间 - set_first_time() - uni.setStorageSync('UNI_STAT_LAST_PAGE_ROUTE', fullpath) - this.licationShow = false - return - } - // 页面进入 - const time = get_residence_time('page') - // 停留时间,判断是否长时间停留在当前页面,如果超过30min重新上报数据 - if (time.overtime) { - let options : OnLaunchOptionsWithCst = { - path: fullpath, - scene: this.statData.sc, - cst: ReprotCstType.PageStayTimeout, - } - this.sendAppRequest(options) - } - // 更新页面首次访问时间 - set_first_time() - } - - /** - * 离开页面触发 - * @param {ComponentPublicInstance } self 当前页面实例 - */ - // @ts-ignore - pageHide(self : Page) { - // 如果进入后台则不触发后续 页面隐藏的逻辑 - if (this.licationHide) return - const time = get_residence_time('page') - - let fullpath = get_route(self).fullpath - let lastPageRoute = uni.getStorageSync('UNI_STAT_LAST_PAGE_ROUTE') - - // 如果不存在的话,复制当前的路径,说明之前没有页面 - if (lastPageRoute == null) { - lastPageRoute = fullpath - } - uni.setStorageSync('UNI_STAT_LAST_PAGE_ROUTE', fullpath) - - const options : PageParams = { - url: fullpath, - urlref: lastPageRoute as string, - urlref_ts: time.residenceTime, - urlref_tt: '' - } - - this.sendPageRequest(options) - } - - appError(em : any) { - let errmsg : string - // #ifdef APP-ANDROID && !VUE3-VAPOR - // @ts-ignore - if (em instanceof Exception) { - errmsg = em.stackTraceToString() - } else if (em instanceof Error) { - errmsg = em.message - } else { - errmsg = JSON.stringify(em) - } - // #endif - // #ifndef APP-ANDROID && !VUE3-VAPOR - // 处理h5 - errmsg = em.stack ?? em.message - // #endif - - let route = get_route().path - - let options : StatDefault = { - ak: this.statData.ak, - uuid: this.statData.uuid, - p: this.statData.p, - lt: '31', - url: route, - ut: this.statData.ut, - ch: this.statData.ch, - mpsdk: this.statData.mpsdk, - mpv: this.statData.mpv, - v: this.statData.v, - em: errmsg, - usv: this.statData.usv, - t: get_time(), - } - - this.request(options, false) - } - - /** - * 应用崩溃时触发 ,只有 app 生效 - * @param {string[] } crash_data 崩溃日志数组 - */ - appCrash(crash_data : string[]) { - const statdata = this.statData - let options : StatDefault = { - "lt": "41", // 统计数据类型 - "uuid": statdata.uuid, - "ak": statdata.ak, // DCloud appid - "v": statdata.v, // 应用版本号 - "ut": statdata.ut, // 平台 - "p": statdata.p, // 手机系统 - "ch": statdata.ch, // 渠道信息 - "mpsdk": statdata.mpsdk, // 小程序 SDK Version - "did": statdata.uuid, // deviceId - "net": statdata.net, // 设备网络型号 - "os": statdata.mpn, // 系统版本 - "sv": statdata.sv, // 系统版本名称 - "brand": statdata.brand, // 手机品牌 - "md": statdata.md, // 手机型号 - "root": statdata.root, // 是否root - // "batlevel": "", // 设备电池电量 - // "battemp": "", // 电池温度 - // "memuse": "", // 系统已使用内存 - // "memtotal": "", // 系统总内存 - // "diskuse": "", // 系统磁盘已使用大小 - // "disktotal": "", // 系统磁盘总大小 - // "abis": "", // 设备支持的CPU架构 - // "appcount": "", // 运行的app个数 - // "mem": "", // APP使用的内存量 - // "wvcount": "", // 打开Webview窗口的个数 - // "duration": "", // APP使用时长 - // "fore": "", // 是否前台运行 - "pn": statdata.pn, // 原生应用包名 - "pv": statdata.pv, // 应用版本名称 - // "url": "", // 页面url - "log": "" // 错误日志 - } - // #ifndef APP-IOS - get_net().then((net : string) => { - options.net = net - this.crashRequest(options, crash_data) - }).catch(() => { - this.crashRequest(options, crash_data) - }) - // #endif - - - } - - /** - * 发送请求,应用维度上报 - * @param {Object} options 页面信息 - * @param {Boolean} type 是否立即上报 - */ - sendAppRequest(options : OnLaunchOptionsWithCst, type : boolean = false) { - - let is_opt = options.query != null && JSON.stringify(options.query) != '{}' - // TODO ,此处处理的值有问题, - // 如果页面有参数 需要上传如:/xxx/xxx?{xx:xx,xxx:xxx} 格式的值 - let query = is_opt ? '?' + JSON.stringify(options.query) : '' - // 获取首次访问时间 - const first_time = get_first_visit_time() - // 获取应用最后访问时间 - const last_time = get_last_visit_time() - // 非老用户 - if (last_time != 0) { - const odid = get_odid() - // TODO 老版本的odid兼容问题,看看是否需要保留 - const have_device = is_handle_device() - // 如果没有上报过设备信息 ,则需要上报设备信息 - if (!have_device) { - this.statData.odid = odid - } - } - this.statData.lt = ReportType.AppStart - this.statData.url = options.path + query - this.statData.t = get_time() - this.statData.sc = get_scene(options) - this.statData.fvts = first_time - this.statData.lvts = last_time - this.statData.tvc = get_total_visit_count() - this.statData.cst = options.cst ?? ReprotCstType.AppNormal - - // TODO 获取应用版本,网络信息和地址信息 - // if (get_platform_name() === 'n') { - // this.getProperty(type) - // } else { - // this.getNetworkInfo(type) - // } - - - this.request(this.statData, type) - } - - /** - * 发送请求,页面维度上报 - * @param {Object} opt - */ - sendPageRequest(opt : PageParams) { - let { url, urlref, urlref_ts } = opt - this._navigationBarTitle.lt = ReportType.PageShow - let options : StatDefault = { - ak: this.statData.ak, - uuid: this.statData.uuid, - p: this.statData.p, - lt: ReportType.PageShow, - ut: this.statData.ut, - url, - // TODO 好像是没有这个参数,看一下具体描述 - tt: this.statData.tt, - urlref, - urlref_ts, - ch: this.statData.ch, - usv: this.statData.usv, - t: get_time(), - } - this.request(options) - } - - /** - * 进入后台上报数据 - * @param {Object} opt 页面进入应用参数 - * @param {Boolean} type 是否立即上报数据 - */ - sendHideRequest(opt : PageParams, type : boolean) { - let { urlref, urlref_ts } = opt - let options : StatDefault = { - ak: this.statData.ak, - uuid: this.statData.uuid, - p: this.statData.p, - lt: ReportType.AppHide, - ut: this.statData.ut, - urlref: urlref, - urlref_ts: urlref_ts, - ch: this.statData.ch, - usv: this.statData.usv, - t: get_time(), - } - this.request(options, type) - } - - /** - * 推送数据上报 - * @param {any} options - * @param {string} cid - */ - sendPushRequest(options : any, cid : string) { - let time = get_time() - - const statData : StatDefault = { - uuid: this.statData.uuid, - p: this.statData.p, - ak: this.statData.ak, - lt: ReportType.Push, - cid: cid, - t: time, - ut: this.statData.ut, - } - - const dataStr = JSON.stringify(statData) - - // #ifdef WEB - // @ts-ignore - let uniStatData = JSON.parse(dataStr) as Map - // @ts-ignore - uniStatData = new Map(Object.entries(uniStatData)) - // #endif - // #ifndef WEB - // @ts-ignore - let uniStatData = JSON.parse>(dataStr) - - if (uniStatData == null) { - uniStatData = new Map([]) - } - // #endif - - - const hasKey = uniStatData.has(ReportType.Push) - if (!hasKey) { - uniStatData.set(ReportType.Push, []) - } - - // 将消息加入对列 - uniStatData.get(ReportType.Push)!.push(statData) - - const stat_data = handle_data(uniStatData) - let optionsData : RequestData = { - usv: STAT_VERSION, //统计 SDK 版本号 - t: time, //发送请求时的时间戮 - requests: stat_data, - } - - this.sendRequest(optionsData) - } - - - /** - * 自定义事件上报 - * @param {EventParams} data 事件参数 - */ - sendEventRequest(data : EventParams) { - const key = data.key - const value = data.value ?? '' - - let routepath = get_route().fullpath - const lt = ReportType.Event - this._navigationBarTitle.config = get_page_name(routepath) - this._navigationBarTitle.lt = lt - let options : StatDefault = { - ak: this.statData.ak, - uuid: this.statData.uuid, - p: this.statData.p, - lt: lt, - ut: this.statData.ut, - url: routepath, - ch: this.statData.ch, - e_n: key, - e_v: typeof value === 'object' ? JSON.stringify(value) : value.toString(), - usv: this.statData.usv, - t: get_time(), - } - this.request(options) - } - - /** - * 崩溃请求发送请求 - * @param {StatDefault} data 上报数据 - * @param {Object} type 是否上报 - */ - crashRequest(data : StatDefault, crash_data : string[]) { - // #ifndef APP-IOS - // let data = JSON.parse(JSON.stringify(stata_data)) - const statConfig = Config.getOptions() - let time = get_time() - - // 需要把标题插入到数据中 - const title = this._navigationBarTitle - data.ttn = title.page - data.ttpj = title.config - data.ttc = title.report - - // 获取消息对列 - let statData = dbGet('__UNI__STAT__DATA') - - if (statData == null) { - statData = '{}' - } - - - let uniStatData = JSON.parse>(statData) - - if (uniStatData == null) { - uniStatData = new Map([]) - } - - // 循环崩溃日志 并加入队列 - for (let i = 0; i < crash_data.length; i++) { - const log = crash_data[i] - data.log = log - - if (statConfig.debug!) { - // 打印输出日志 - Log(data) - } - - const lt = data.lt! - - const hasKey = uniStatData.has(lt) - if (!hasKey) { - uniStatData.set(lt, []) - } - // 将消息加入对列 - uniStatData.get(lt)!.push(data) - - } - // 将 map 转换为 str - const statDataStr = Map2String(uniStatData) - // 存储 - dbSet('__UNI__STAT__DATA', statDataStr) - - if (statConfig.debug!) { - // 待上传消息对列 - // console.log(`=== 统计待上传队列数据 ===`) - const statJSON = Map2Json(uniStatData) - console.log('=== 统计待上传队列数据 :', statJSON) - // console.log(`=== 采集结束 ===`) - } - - const stat_data = handle_data(uniStatData) - let optionsData : RequestData = { - usv: STAT_VERSION, //统计 SDK 版本号 - t: time, //发送请求时的时间戮 - requests: stat_data, - } - - // 重置队列 - dbRemove('__UNI__STAT__DATA') - - this.sendRequest(optionsData, true) - // #endif - - } - /** - * 发送请求 - * @param {StatDefault} data 上报数据 - * @param {Object} type 类型 - */ - request(data : StatDefault, type : boolean = false) { - // #ifndef APP-IOS - const statConfig = Config.getOptions() - let time = get_time() - - // 需要把标题插入到数据中 - const title = this._navigationBarTitle - data.ttn = title.page - data.ttpj = title.config - data.ttc = title.report - - if (statConfig.debug!) { - // 打印输出日志 - Log(data) - } - - const lt = data.lt! - - // 获取消息对列 - let statData = dbGet('__UNI__STAT__DATA') - - if (statData == null) { - statData = '{}' - } - - - let uniStatData = JSON.parse>(statData) - - if (uniStatData == null) { - uniStatData = new Map([]) - } - - const hasKey = uniStatData.has(lt) - if (!hasKey) { - uniStatData.set(lt, []) - } - - // 将消息加入对列 - uniStatData.get(lt)!.push(data) - - // 将 map 转换为 str - const statDataStr = Map2String(uniStatData) - // 存储 - dbSet('__UNI__STAT__DATA', statDataStr) - - let page_residence_time = get_page_residence_time() - - // 判断时候到达上报时间 ,默认 10 秒上报 - const is_timeout = page_residence_time < this.eportInterval && !type - - if (is_timeout) return - - // 时间超过,重新获取时间戳 - set_page_residence_time() - - if (statConfig.debug!) { - // 待上传消息对列 - // console.log(`=== 统计待上传队列数据 ===`) - const statJSON = Map2Json(uniStatData) - console.log('=== 统计待上传队列数据 :', statJSON) - // console.log(`=== 采集结束 ===`) - } - - - - const stat_data = handle_data(uniStatData) - - let optionsData : RequestData = { - usv: STAT_VERSION, //统计 SDK 版本号 - t: time, //发送请求时的时间戮 - requests: stat_data, - } - - // 重置队列 - dbRemove('__UNI__STAT__DATA') - - this.sendRequest(optionsData) - // #endif - - } - - sendRequest(options : RequestData, delCrash : boolean = false) { - // #ifndef APP-IOS - const statConfig = Config.getOptions() - - if (Report.uniCloudInstance != null) { - - // 数据上报 - const app = Report.uniCloudInstance! - - // #ifdef APP-ANDROID && !VUE3-VAPOR - // @ts-ignore - const uniCloudObj = app.importObject('uni-stat-receiver', { - customUI: true, - // @ts-ignore - } as UniCloudImportObjectOptions, UTSAndroid.getJavaClass(CloudObjectToDo)) - // #endif - // #ifndef APP-ANDROID && !VUE3-VAPOR - // @ts-ignore - const uniCloudObj = app.importObject( - 'uni-stat-receiver', - { - customUI: true, - } as UniCloudImportObjectOptions - ) - // #endif - - - uniCloudObj - .report(options) - .then(() => { - if (statConfig.debug!) { - console.log(`=== 统计队列数据上报 :`, options) - } - // #ifdef APP - if (delCrash) { - try { - uni.__deleteAppCrashInfo(null) - } catch (err) { - console.log('=== 应用崩溃日志上传失败 :', JSON.stringify(err)) - } - } - // #endif - - }) - .catch((err : any | null) => { - console.log('=== 统计上报错误 :', JSON.stringify(err)) - }) - } - // #endif - - } -} diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/common/core/stat-type.uts b/mpuniapp/uni_modules/uni-stat/utssdk/common/core/stat-type.uts deleted file mode 100644 index 0307403..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/common/core/stat-type.uts +++ /dev/null @@ -1,86 +0,0 @@ - -/** - * lifecycle 生命周期类型 - */ -export class StatType { - /**应用onLauch*/ - static LifeCycleLaunch : number = 1 - /**页面onLoad*/ - static LifeCycleLoad : number = 2 - /**应用 onShow */ - static LifeCycleAppShow : number = 3 - /**应用 onHide */ - static LifeCycleAppHide : number = 4 - /**页面 onShow*/ - static LifeCyclePageShow : number = 5 - /**页面 onHide */ - static LifeCyclePageHide : number = 6 - /**页面卸载*/ - static LifeCyclePageUnLoad : number = 7 - /**错误*/ - static LifeCycleError : number = 8 - /**崩溃*/ - static Crash : number = 9 -} - -/** - * lt 统计数据类型 - */ -export class ReportType { - /** 1: 应用启动,对应 `onLaunch` 事件 */ - static AppStart : string = "1" - /** 2: 应用显示,对应 `onShow` 事件 */ - static AppShow : string = "2" - /** 3: 应用进入后台,对应 `onHide` 事件 */ - static AppHide : string = "3" - /** 4: 应用退出 */ - static AppExit : string = "4" - - /** 11: 页面跳转,对应 `onShow` 事件 */ - static PageShow : string = "11" - /** 12: 页面关闭,对应 `onHide` 事件 */ - static PageHide : string = "12" - - /** 21: 事件 */ - static Event : string = "21" - /** 31: 错误信息 */ - static Error : string = "31" - /** 101: 推送 */ - static Push : string = "101" -} - - -/** - * 平台类型 - */ -export class PlatformType { - // TODO 平台需要整理在这里 -} - -/** - * cst 上报时机类型 - */ - -export class ReprotCstType { - /** 1: 正常进入上报 */ - static AppNormal : number = 1 - /** 2: 后台进前台超时上报 */ - static AppAwakenTimeout : number = 2 - /** 3: 页面停留超时上报 */ - static PageStayTimeout : number = 3 -} - -// 应用首次启动需要保留的keys -export const AppShowParamsKeys = ["uuid", "ak", "lt", "ut", "mpsdk", "mpv", "mpn", "v", "p", "sv", "net", "brand", "md", "lang", "lat", "lng", "pr", "ww", "wh", "sw", "sh", "url", "tt", "ch", "fvts", "lvts", "cn", "pn", "ct", "sc", "tvc", "usv", "t", "odid", "cst"] -// 应用进入后台需要保留的keys -export const AppHideParamsKeys = ['ak', 'uuid','ttn','ttpj','ttc', 'lt', 'ut', 'p', 'urlref', 'urlref_ts', 'ch', 'usv', 't'] -// 页面切换需要保留的keyss -export const PageShowParamsKeys = ['ak', 'uuid', 'lt', 'ut', 'p', 'url', 'ttpj', 'ttn', 'ttc', 'ttct', 'urlref', 'urlref_ts', 'ch', 'usv', 't'] -// push 需要保留的keys -export const PushParamsKeys = ['lt', 'cid', 't', 'ut'] -// 事件需要保留的keys -export const EventParamsKeys = ['ak', 'uuid', 'p', 'lt', 'ut', 'url', 'ch', 'e_n', 'e_v', 'usv', 't'] -// 错误事件需要保留的keys -export const ErrorParamsKeys = ["ak", "uuid", "p", "lt", "url", "ut", "ch", "mpsdk", "mpv", "v", "em", "usv", "t"] -// 崩溃事件需要保留的keys -export const CrashParamsKeys = ["lt", "ak", "v", "ut", "p", "ch", "mpsdk", "did", "net", "os", "sv","brand", "md", "root", "pn", "pv", "log"] \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/common/core/stat.uts b/mpuniapp/uni_modules/uni-stat/utssdk/common/core/stat.uts deleted file mode 100644 index 74efbbb..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/common/core/stat.uts +++ /dev/null @@ -1,328 +0,0 @@ - -import { Report } from "./report.uts"; -import { StatType } from "./stat-type"; -import { EventParams, UniStatOptions, ErrorCallback, ReportErrorCode } from '../../interface.uts' -import { is_page, is_page_report, get_space, calibration, get_crash_logs } from '../utils/pageInfo.uts' -import { Config } from "../config"; - -const reportInstance = new Report() - -export class Stat { - static __stat_instance : Stat | null = null; - static is_register : boolean = false - static no_space : boolean = false - // 上报逻辑实例 - // 使用单例,只初始化一次 - static getInstance() : Stat { - // 获取服务空间配置信息 - let space = get_space(uniCloud.config) - if (Report.uniCloudInstance == null) { - // 判断不为空对象 - if (space != null) { - // 重新构造 uniCloud - let spaceData : UniCloudInitOptions = { - provider: space.provider, - spaceId: space.spaceId, - clientSecret: space.clientSecret, - } - const endpoint = space.endpoint - if (endpoint != null) { - spaceData.endpoint = space.endpoint - } - - // 支付宝单独处理一些参数 - if (space.provider == 'alipay') { - spaceData.secretKey = space.secretKey - spaceData.accessKey = space.accessKey - spaceData.spaceAppId = space.spaceAppId - } - - // 初始化 uniCloud - // @ts-ignore - // Report.uniCloudInstance = uniCloud.init(spaceData) - - } else { - if (!Stat.no_space) { - // #ifdef APP-IOS - console.error('应用已集成uni统计,但未关联服务空间,请在uniCloud目录右键关联服务空间') - // #endif - // #ifndef APP-IOS - console.log("\u001b[31m应用已集成uni统计,但未关联服务空间,请在uniCloud目录右键关联服务空间\u001b[0m") - // #endif - Stat.no_space = true - } - } - } - - // 实例化统计sdk ,要在 实例 unicloud 之后进行,避免 Report 无法拿到 uniCloud 实例 - if (this.__stat_instance == null) { - this.__stat_instance = new Stat() - } - - return this.__stat_instance as Stat - } - - - // 当前生命周期内的页面或应用实例 - appInstance ?: Page | null = null - - private isHide : boolean = false - constructor() { } - - /** - * 初始化插件参数 - * @param {Object} options - */ - init(options : UTSJSONObject) { - // 插件挂载玩成,可以进行后续操作 - Stat.is_register = true - // 参数处理 - Config.setOptions({ ...options } as UniStatOptions) - const uniStatConfig = Config.getOptions() - - // 设置上报周期时间 - reportInstance.eportInterval = uniStatConfig.reportInterval ?? 10 - - // #ifdef APP-ANDROID && !VUE3-VAPOR - // 获取崩溃日志 - get_crash_logs((logs) => { - this.registerEvent(StatType.Crash, null, logs) - }) - // #endif - } - /** - * 应用启动 - * @param {OnLaunchOptions} options 应用参数 - * @param {ComponentPublicInstance} appInstance 应用实例 - */ - // options : OnLaunchOptions, appInstance : ComponentPublicInstance - onLaunch(options : OnLaunchOptions, appInstance : ComponentPublicInstance) { - // 注册事件 onLaunch ,需要手动触发 - // this.registerEvent(StatType.LifeCycleLaunch, appInstance, options as any) - } - /** - * 页面加载 - * @param {ComponentPublicInstance} appInstance 应用实例 - */ - onLoad(appInstance : Page) { - this.registerEvent(StatType.LifeCycleLoad, appInstance) - } - /** - * 显示页面或应用进入前台 - * @param {ComponentPublicInstance} appInstance 应用实例 - */ - onShow(appInstance : Page) { - this.isHide = false - // @ts-ignore - const mptype = is_page(appInstance) - // 页面执行,应用需要手动调用 - if (mptype) { - this.registerEvent(StatType.LifeCyclePageShow, appInstance, null) - } - // const life_type = mptype == 'app' ? StatType.LifeCycleAppShow : StatType.LifeCyclePageShow - // this.registerEvent(life_type, appInstance, null) - } - - /** - * 页面隐藏或应用进入后台 - * @param {ComponentPublicInstance} appInstance 应用实例 - */ - onHide(appInstance : Page) { - - this.isHide = true - // @ts-ignore - const mptype = is_page(appInstance) - - // 页面执行,应用需要手动调用 - if (mptype) { - this.registerEvent(StatType.LifeCyclePageHide, appInstance, null) - } - // const life_type = mptype == 'app' ? StatType.LifeCycleAppHide : StatType.LifeCyclePageHide - // this.registerEvent(life_type, appInstance, null) - } - - /** - * 卸载页面 - * @param {ComponentPublicInstance} appInstance 应用实例 - */ - onUnload(appInstance : Page) { - // 如果 isHide 为true 说明页面隐藏了,不走卸载逻辑,如果走卸载逻辑,isHide 必不可能是true - if (this.isHide) { - this.isHide = false - return - } - this.registerEvent(StatType.LifeCyclePageUnLoad, appInstance, null) - } - - /** - * 错误 - * @param {String} error 应用实例 - */ - onError(error : string) { - // 单独处理错误上报 - this.error(error) - } - - /** - * 获取推送ID - */ - // pushEvent(options : any) { - // // TODO uni x 暂不支持,如需要开启,请放开注释 - // const ClientID = is_push_clientid() - // if (ClientID) { - // uni.getPushClientId({ - // success: (res) => { - // const cid = res.cid - // // 只有获取到才会上传 - // // if (cid != null) { - // reportInstance.sendPushRequest(options, cid) - // // } - // }, - // } as GetPushClientIdOptions) - // } - // } - - /** - * 注册事件 - * @param {number} EventType 事件类型 - * @param {Page} appInstance 当前页面实例 - * @param {UTSJSONObject} options 应用参数 - */ - registerEvent(EventType : number, appInstance : Page | null, options : any | null = null, error : any | null = '') { - const statConfig = Config.getOptions() - if (statConfig.enable == false) return - // TODO 之前想的是,可能其他地方可能会用到 vue 实例 ,但是实际上在安卓上会有泄露问题,如果用到,需要在看实际方案 - // this.appInstance = appInstance - // 是否要上报页面数据 - const isPageReport = is_page_report() - switch (EventType) { - case StatType.LifeCycleLaunch: - // 使用非空断言,options在这里肯定非空 - reportInstance.launch(options!) - // this.pushEvent(options) - break - case StatType.LifeCycleAppShow: - // TODO 目前只兼容 web 和 app ,小程序等平台需要调用 api onAppHide - reportInstance.appShow() - break - case StatType.LifeCycleAppHide: - reportInstance.appHide(true) - break - case StatType.LifeCycleLoad: - break - case StatType.LifeCyclePageShow: - if (isPageReport) { - reportInstance.pageShow(appInstance!) - } - break - case StatType.LifeCyclePageHide: - if (isPageReport) { - reportInstance.pageHide(appInstance!) - } - break - case StatType.LifeCyclePageUnLoad: - if (isPageReport) { - reportInstance.pageHide(appInstance!) - } - break - case StatType.LifeCycleError: - if (error != null) { - reportInstance.appError(error) - } - break - case StatType.Crash: - // #ifndef APP-IOS - reportInstance.appCrash(options as string[]) - // #endif - - break - } - } - - error(em : string) { - // 生命周期监听,暂时无用,需要手动调用api - } - // 自定义参数上报 - appEvent(name : string, options : any | null = null, fn : ErrorCallback) { - const statConfig = Config.getOptions() - if (statConfig.enable == false) return - if (Stat.no_space) { - fn(false, 61000 as ReportErrorCode) - return - } - if (!Stat.is_register) { - fn(false, 61001 as ReportErrorCode) - return - } - // const names = ['uni-app-launch', 'uni-app-show', 'uni-app-hide', 'uni-app-error'] - // if (names.indexOf(name) <= -1) { - // // console.error('uniStatReport 事件名不存在,请检查!'); - // fn(false, 'uniStatReport 事件名不存在,请检查!') - // return - // } - if (name == 'uni-app-launch' && options == null) { - fn(false, 61002 as ReportErrorCode) - return - } - - if (name == 'uni-app-launch') { - this.registerEvent(StatType.LifeCycleLaunch, null, options) - // 61001 占位,无实际用途 - fn(true, 61001 as ReportErrorCode) - return - } - if (name == 'uni-app-show') { - this.registerEvent(StatType.LifeCycleAppShow, null, null) - // 61001 占位,无实际用途 - fn(true, 61001 as ReportErrorCode) - return - } - if (name == 'uni-app-hide') { - this.registerEvent(StatType.LifeCycleAppHide, null, null) - // 61001 占位,无实际用途 - fn(true, 61001 as ReportErrorCode) - return - } - - if (name == 'uni-page-show') { - reportInstance.pageShow(options as Page) - // 61001 占位,无实际用途 - fn(true, 61001 as ReportErrorCode) - return - } - - if (name == 'uni-page-hide') { - reportInstance.pageHide(options as Page) - // 61001 占位,无实际用途 - fn(true, 61001 as ReportErrorCode) - return - } - - if (name == 'uni-app-error') { - this.registerEvent(StatType.LifeCycleError, null, null, options) - // 61001 占位,无实际用途 - fn(true, 61001 as ReportErrorCode) - return - } - - // 校验 type 参数 - const is_calibration = calibration(name, options) - if (is_calibration != null) { - fn(false, is_calibration) - return - } - - if (name === 'title') { - reportInstance._navigationBarTitle.report = (options as string) - } - - const value = (typeof options === 'object' ? JSON.stringify(options) : options) as string - const data : EventParams = { - key: name, - value: value as string, - } - reportInstance.sendEventRequest(data) - // 61001 占位,无实际用途 - fn(true, 61001 as ReportErrorCode) - } -} diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/common/index.uts b/mpuniapp/uni_modules/uni-stat/utssdk/common/index.uts deleted file mode 100644 index 1814be4..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/common/index.uts +++ /dev/null @@ -1 +0,0 @@ -// export { Stat } from './core/stat.uts' diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/common/utils/db.uts b/mpuniapp/uni_modules/uni-stat/utssdk/common/utils/db.uts deleted file mode 100644 index 3869308..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/common/utils/db.uts +++ /dev/null @@ -1,32 +0,0 @@ -const APPID = uni.getSystemInfoSync().appId -export function dbSet(name : string, value : T) { - let data = uni.getStorageSync('UNI_STAT_DATA:' + APPID) - let newData = {} as UTSJSONObject - if (data != null && typeof data == 'object') { - newData = data as UTSJSONObject - } - newData[name] = value - uni.setStorageSync('UNI_STAT_DATA:' + APPID, newData) -} - -export function dbGet(name : string) : T | null { - let data = uni.getStorageSync('UNI_STAT_DATA:' + APPID) - if (data == null) return null - if (typeof data != 'object') return null - const newData = data as UTSJSONObject - return newData[name] as T -} - -export function dbRemove(name : string) { - let data = uni.getStorageSync('UNI_STAT_DATA:' + APPID) - if (data == '') { - data = {} - } - if (data != null) { - let newData = data as UTSJSONObject - if (newData[name] != null) { - newData[name] = null - uni.setStorageSync('UNI_STAT_DATA:' + APPID, newData) - } - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/common/utils/index.uts b/mpuniapp/uni_modules/uni-stat/utssdk/common/utils/index.uts deleted file mode 100644 index b29f30c..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/common/utils/index.uts +++ /dev/null @@ -1,184 +0,0 @@ -// AppShowReportParams, AppHideReportParams, PageReportParams, -import { StatDefault } from '../../interface.uts' - -import { AppShowParamsKeys, AppHideParamsKeys, PageShowParamsKeys, PushParamsKeys, EventParamsKeys, ErrorParamsKeys,CrashParamsKeys } from '../core/stat-type.uts' - -/** - * 序列化url参数 - * @param {Object} obj - * @example - */ -export function Serialize(obj : UTSJSONObject) : string { - let str : string[] = []; - for (let p in obj) { - if (obj.hasOwnProperty(p)) { - let key = obj[p] - if (obj[p] == null) { - key = '' - } - const text = p + "=" + key - str.push(text); - } - } - return "?" + str.join("&"); -} - -export function IsNumber(value : any | null) : boolean { - return typeof value === 'number'; - // if (value.trim() === "") { - // return false; - // } - // const num = parseInt(value); - // if (isNaN(num)) { - // return false; - // } - // return true; -} - -/** - * 上报参数过滤 - */ -export function FilterParam(keys : string[] = [], data : StatDefault) : T { - let result = {}; - keys.forEach(key => { - result[key] = data[key]; - }); - let formdata : T = result as T - return formdata; -} - - -/** - * 日志输出 - * @param {StatDefault} data 统计数据 - * @param {Boolean} type 打印类型,如果是type=true ,则是最终上报数据 - */ -export function Log(data : StatDefault, type : Boolean = false) { - - let logData = getEventData(data.lt!, data) - let msg_type : string = '' - - switch (data.lt) { - case '1': - msg_type = '应用启动' - break - case '3': - msg_type = '应用进入后台' - break - - case '11': - msg_type = '页面切换' - break - case '21': - msg_type = '事件触发' - break - case '31': - msg_type = '应用错误' - break - case '41': - msg_type = '应用崩溃' - break - case '101': - msg_type = 'PUSH' - break - } - - if (type) { - console.log(`=== 统计队列数据上报 :`, logData) - // console.log(logData) - // console.log(`=== 上报结束 ===`) - return - } - - if (msg_type != '') { - console.log(`=== 统计数据采集:${msg_type} :`,logData) - // console.log(logData) - // console.log(`=== 采集结束 ===`) - } -} - -/** - * map 转 string - */ -export function Map2String(statData : Map) : string { - let statDataJson = {} - statData.forEach((rd : StatDefault[], key : string) => { - statDataJson[key] = rd - }); - return JSON.stringify(statDataJson) -} - -export function Map2Json(statData : Map) : UTSJSONObject { - let statDataJson = {} - statData.forEach((rd : StatDefault[], key : string) => { - let arr : object[] = []; - rd.forEach((elm : StatDefault) => { - let data = getEventData(key, elm) - - arr.push(data) - }) - - statDataJson[key] = arr - - }); - - return statDataJson -} - - - -/** - * 处理上报参数 - * @param {Object} statData 需要处理的数据 - */ -export const handle_data = (statData : Map) : string => { - let firstArr : any[] = [] - let contentArr : any[] = [] - let lastArr : any[] = [] - statData.forEach((rd : StatDefault[], key : string) => { - rd.forEach((elm : StatDefault) => { - let data = getEventData(key, elm) - if (key == '1') { - firstArr.push(data) - } else if (key == '4') { - lastArr.push(data) - } else { - contentArr.push(data) - } - }) - }); - firstArr.push(...contentArr, ...lastArr) - return JSON.stringify(firstArr) -} - -/** - * 获取具体的上报参数对象 - */ -function getEventData(lt : string, elm : StatDefault) : any { - let data : any = {} - switch (lt) { - case '1'://应用启动 - data = FilterParam(AppShowParamsKeys, elm) - break - case '3': // 应用进入后台 - data = FilterParam(AppHideParamsKeys, elm) - break - case '11': //页面切换 - data = FilterParam(PageShowParamsKeys, elm) - break - case '21': // 事件触发 - data = FilterParam(EventParamsKeys, elm) - break - case '31': // 应用错误 - data = FilterParam(ErrorParamsKeys, elm) - break - case '41': // 崩溃 - data = FilterParam(CrashParamsKeys, elm) - break - case '101': // PUSH - data = FilterParam(PushParamsKeys, elm) - break - } - - return data -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/common/utils/pageInfo.uts b/mpuniapp/uni_modules/uni-stat/utssdk/common/utils/pageInfo.uts deleted file mode 100644 index 99ae267..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/common/utils/pageInfo.uts +++ /dev/null @@ -1,556 +0,0 @@ -import { OnLaunchOptionsWithCst, RouteParams, StatDefault, ReportErrorCode } from '../../interface.uts' -import { STAT_VERSION, sys, device, sysAppBase, Config } from '../config.uts' -// import Config from '../config.uts' -import { get_time } from './pageTime.uts' -import { dbGet, dbSet } from './db.uts' -import { Serialize, IsNumber } from './index.uts' - -const APPID = sys.appId -const RUNTIME_VERSION = sys.appVersion - -/** - * 获取uuid - */ -export const get_uuid = () : string => { - // 有可能不存在 deviceId(一般不存在就是出bug了),就自己生成一个 - // 目前 deviceId 肯定存在所以不用生成 - // const uuid : string = sys.deviceId ?? getUuid() - return sys.deviceId -} - -/** - * 获取老版的 deviceid ,兼容以前的错误 deviceid - */ -export const get_odid = () : string => { - // let odid : string - // if (get_platform_name() === 'n') { - // try { - // odid = plus.device.uuid - // } catch (e) { - // odid = '' - // } - // return odid - // } - // odid = sys.deviceId ?? getUuid() - // TODO 需要获取老版本的uuid ,目前无法获取,只返回 deviceId - return sys.deviceId -} - - - -/** - * 获取当前平台 - * 移动端 : 'n', - * h5 : 'h5', - * 微信 : 'wx', - * 阿里 : 'ali', - * 百度 : 'bd', - * 头条 : 'tt', - * qq : 'qq', - * 快应用 : 'qn', - * 快手 : 'ks', - * 飞书 : 'lark', - * 快应用 : 'qw', - * 钉钉 : 'dt' - */ -export const get_platform_name = () : string => { - - let platformList = { - 'app': 'n', - 'app-plus': 'n', - 'h5': 'h5', - 'web': 'web', - 'mp-weixin': 'wx', - 'mp-baidu': 'bd', - 'mp-toutiao': 'tt', - 'mp-qq': 'qq', - 'quickapp-native': 'qn', - 'mp-kuaishou': 'ks', - 'mp-lark': 'lark', - 'quickapp-webview': 'qw', - } - - // 苹果审核代码中禁止出现 alipay 字样 ,需要特殊处理一下 - const aliArr = ['y', 'a', 'p', 'mp-ali'] - const aliKey = aliArr.reverse().join('') - platformList[aliKey] = 'ali' - - const platform = sys.uniPlatform - // TODO 兼容子平台 - // if (platformList[process.env.VUE_APP_PLATFORM] === 'ali') { - // if (my && my.env) { - // const clientName = my.env.clientName - // if (clientName === 'ap') return 'ali' - // if (clientName === 'dingtalk') return 'dt' - // // TODO 缺少 ali 下的其他平台 - // } - // } - return platformList[platform] as string -} - -/** - * 获取原生包名,或小程序 appid - */ -export const get_pack_name = () : string => { - let packName = '' - if (get_platform_name() === 'n') { - if (sys.osName == 'android') { - packName = sysAppBase.packageName ?? '' - } - if (sys.osName == 'ios') { - packName = sysAppBase.bundleId ?? '' - } - } - return packName -} - -/** - * 应用版本 - */ -export const get_version = () : string => { - return RUNTIME_VERSION -} - -/** - * 获取渠道 - */ -export const get_channel = () : string => { - const platformName = get_platform_name() - let channel : string = '' - if (platformName === 'n') { - channel = sysAppBase.channel ?? '' - } - // if (platformName === 'wx') { - // // TODO 需要调研小程序二维码渠道如何获取; - // } - return channel -} - -/** - * 获取小程序场景值 - */ -export const get_scene = (options : OnLaunchOptionsWithCst) : number => { - // const platformName = get_platform_name() - let scene = 1001 - if (options.scene != null) { - return options.scene ?? 1001 - } - // if (platformName == 'wx') { - // // @ts-ignore - // scene = uni.getLaunchOptionsSync()?.scene ?? 1001 - // } - return scene -} - -/** - * 是否获取 page 页面 - * @param {VueComponent} appInstance 页面实例 - */ -// @ts-ignore -export const is_page = (appInstance : ComponentPublicInstance) : Boolean => { - // #ifdef WEB || APP-IOS || MP-WEIXIN - const type = appInstance?.$mpType ?? 'page' - return type == 'page' ? true : false - // #endif - // #ifndef WEB || APP-IOS || MP-WEIXIN - // 其他平台没有 $mpType ,只有页面触发 - return true - // #endif -} - - -/** - * 获取页面标题 - * @param {String} routepath 页面路由 - */ -export const get_page_name = (routepath : string) : string => { - let page = get_page_vm() - if (page == null) return '' - let route : string - // #ifdef MP-WEIXIN - route = (page.$scope && page.$scope.route) ?? "" - // #endif - // #ifndef MP-WEIXIN - route = page.route - // #endif - - if (route != routepath) { - const pages = getCurrentPages() - // 如果传入路由与当前页面不同,则从页面栈找一个,如果找不到返回空 - let page_now = pages.find((p) : boolean => p.route == routepath) - if (page_now == null) { - return '' - } - // @ts-ignore - page = page_now.vm! - } - let titleText : string - // #ifdef MP-WEIXIN - // @ts-ignore - const title_json = process.env.UNI_STAT_TITLE_JSON - titleText = title_json[route] ?? '' - // #endif - // #ifndef MP-WEIXIN - // @ts-ignore - const pageStyle = (page.$page as UniPage).getPageStyle() - titleText = (pageStyle['navigationBarTitleText'] as string) - // #endif - return titleText as string - -} - -/** - * 获取页面实例 - */ -export const get_page_vm = () : Page | null => { - let pages = getCurrentPages() - if (pages.length == 0) { - return null - } - let page = pages[pages.length - 1] - // TODO 正常来说,调用当前方法的地方只在 生命周期内,数组内最少会有一个页面,所以理论上是不存在获取不到的情况的 - // @ts-ignore - return page.vm -} - - -/** - * 获取页面url,不包含参数 - * @param {ComponentPublicInstance} page 页面实例 - */ -export function get_route(page : Page | null = null) : RouteParams { - let _self = page ?? get_page_vm() - - if (_self == null) { - const data : RouteParams = { - path: '', - fullpath: '' - } - return data - } - let url_params : string - let options : any - // #ifdef MP-WEIXIN - options = _self.$scope.options - // #endif - // #ifndef MP-WEIXIN - options = _self.options - // #endif - // TODO 条件编译处理参数问题,安卓上 options返回的是map,需要处理成 utsobject - // #ifdef APP-ANDROID && !VUE3-VAPOR - const opts = new UTSJSONObject(options) - // TODO 上报页面参数需要处理 - url_params = Serialize(opts) - // #endif - // #ifndef APP-ANDROID && !VUE3-VAPOR - // @ts-ignore - url_params = Serialize(options) - // #endif - let params = '' - // 如果参数只有 ?则说明没有参数 - if (url_params != '?') { - params = url_params - } - - // 兼容不同小程序下的不同取值 - let route : string - - // #ifdef MP-WEIXIN - route = (_self.$scope && _self.$scope.route) ?? "" - // #endif - // #ifndef MP-WEIXIN - route = _self.route - // #endif - - const data : RouteParams = { - path: route, - fullpath: route + params - } - return data -} - - -/** - * 获取页面url, 包含参数 ,暂时不用,合并到 get_route - * @param {ComponentPublicInstance} page 页面实例 - */ -export function get_page_route(page : Page | null = null) : string { - let _self = page ?? get_page_vm() - let lastPageRoute = uni.getStorageSync('_STAT_LAST_PAGE_ROUTE') - if (_self == null) { - return lastPageRoute ?? '' - } - // 如果找不到 fullPath 就取 route 的值 - // TODO 取完整路径,目前最新为 optiosn 为携带参数,需要手动序列化 - // return page.fullPath === '/' ? page.route : page.fullPath || page.route - return _self.route -} - -/** - * 是否上报页面数据 - * @returns - */ -export const is_page_report = () : boolean => { - const uniStatConfig = Config.getOptions(); - const collectItems = uniStatConfig.collectItems; - if (collectItems != null) { - const statPageLog = collectItems.uniStatPageLog - if (statPageLog == null) return true - return typeof statPageLog == 'boolean' ? statPageLog : true - } - return true -} - - -/** - * 是否已处理设备 DeviceId - * 如果值为 1 则表示已处理 - */ -const IS_HANDLE_DEVECE_ID = 'is_handle_device_id' -export const is_handle_device = () : boolean => { - let isHandleDevice = dbGet(IS_HANDLE_DEVECE_ID) ?? '' - dbSet(IS_HANDLE_DEVECE_ID, '1') - return isHandleDevice === '1' -} - -/** - * 获取网络状态 - */ -export const get_net = () : Promise => { - return new Promise((resolve, reject) => { - uni.getNetworkType({ - success(e : GetNetworkTypeSuccess) { - const net = e.networkType - resolve(net) - }, fail() { - reject('') - } - }) - }) -} - - -/** - * 获取上报数据默认值 - */ -export const get_default_data = () : StatDefault => { - let isRoot : number - if (device.isRoot == true) { - isRoot = 1 - } else { - isRoot = 0 - } - - let statData : StatDefault = { - uuid: get_uuid(), - ak: APPID, - p: sys.osName == 'android' ? 'a' : 'i', - ut: get_platform_name(), - mpn: get_pack_name(), - usv: STAT_VERSION, - v: RUNTIME_VERSION, - ch: get_channel(), - cn: '', - pn: get_pack_name(), - ct: '', - t: get_time(), - tt: '', - brand: sys.deviceBrand, - md: sys.deviceModel, - sv: sys.osVersion.replace(/(Android|iOS)\s/, ''), - mpsdk: sys.SDKVersion, - mpv: sys.uniCompilerVersionCode.toString(), - // mpv: '', - lang: sys.osLanguage, - pr: sys.devicePixelRatio, - ww: sys.windowWidth, - wh: sys.windowHeight, - sw: sys.screenWidth, - sh: sys.screenHeight, - lat: '', - lng: '', - net: '', - odid: '', - pv: sysAppBase.appVersion, - root: isRoot - } - return statData -} - -/** - * 获取上报时间间隔 - * @param {*} defaultTime 默认上报间隔时间 单位s - */ -export const get_report_Interval = (defaultTime : number) : number => { - const uniStatConfig = Config.getOptions() - let time = uniStatConfig.reportInterval - // let reg = /(^[1-9]\d*$)/ - // 如果不是整数,则默认为上报间隔时间 - // if (!reg.test(time)) return defaultTime - if (!IsNumber(time)) return defaultTime - - // 如果上报时间配置为0 相当于立即上报 - if (time == 0) return 0 - // time = time ?? defaultTime - return time as number -} - -/** - * 获取uniCloud服务空间配置 - * @returns {Object} - */ -export const uni_cloud_config = () : UniCloudInitOptions | null => { - // TODO 当前版本暂时不使用 - // return process.env.UNI_STAT_UNI_CLOUD || {} - return null -} - -/** - * 获取服务空间 - * @param {*} config - * @returns - */ -export const get_space = (config : UniCloudInitOptions) : UniCloudInitOptions | null => { - const uniCloudConfig = uni_cloud_config() - if (uniCloudConfig == null) { - // #ifdef APP-ANDROID && !VUE3-VAPOR - if (config.spaceId != '') { - return config - } - // #endif - // #ifndef APP-ANDROID && !VUE3-VAPOR - if (config?.spaceId != '') { - return config - } - // #endif - - return null - } - - let spaceId = uniCloudConfig.spaceId - let provider = uniCloudConfig.provider - let clientSecret = uniCloudConfig.clientSecret - let secretKey = uniCloudConfig.secretKey - let accessKey = uniCloudConfig.accessKey - - const space_type = ['tcb', 'tencent', 'aliyun', 'alipay'] - // @ts-ignore - const is_space_id = spaceId != '' - const is_provider = space_type.indexOf(provider) != -1 - const is_aliyun = provider == 'aliyun' && is_space_id && clientSecret != null - const is_tcb = (provider == 'tcb' || provider === 'tencent') && is_space_id - const is_alipay = provider == 'alipay' && is_space_id && secretKey != null && accessKey != null - - if (is_provider && (is_aliyun || is_tcb || is_alipay)) { - return uniCloudConfig - } - - return null -} - -/** - * 获取隐私协议配置 - */ -export const is_push_clientid = () : boolean => { - const uniStatConfig = Config.getOptions() - const collectItems = uniStatConfig.collectItems - if (collectItems != null) { - const ClientID = collectItems.uniPushClientID ?? false - return typeof ClientID == 'boolean' ? ClientID : false - } - return false -} - -/** - * 获取崩溃日志文件地址 - */ -export const get_crash_logs = (fn : (value : string[]) => void) => { - // #ifndef APP-IOS - const crash_data = uni.__getAppCrashInfo() - if (crash_data != null && crash_data.length > 0) { - const sysManager = uni.getFileSystemManager(); - const reportLogs : Promise[] = [] - for (let i = 0; i < crash_data.length; i++) { - const item = crash_data[i]; - let file_text : string; - // #ifdef APP-ANDROID && !VUE3-VAPOR - file_text = item.get('file') as string - // #endif - // #ifdef APP-IOS - file_text = item.file as string - // #endif - - const logPromise = new Promise((resolve, reject) => { - sysManager.readFile({ - filePath: file_text, - encoding: 'utf-8', - success: (res) => { - const crash_text = res.data as string - resolve(crash_text); // 成功上报后 resolve - }, - fail: (err : any) => { - reject(err); // 读取文件失败时 reject - } - }); - }); - - reportLogs.push(logPromise); - } - - Promise.all(reportLogs) - .then((res) => { - fn(res) - }) - .catch((err) => { - console.log('Errorlogs:', err); - }); - } - // #endif - -} - - -/** - * 自定义事件参数校验 - */ -export const calibration = (eventName : string, options : any | null) : ReportErrorCode | null => { - // login 、 share 、pay_success 、pay_fail 、register 、title - if (eventName == '') { - // console.error(`uni.report Missing [eventName] parameter`) - return 61003 - } - if (typeof eventName != 'string') { - // console.error( - // `uni.report [eventName] Parameter type error, it can only be of type String` - // ) - return 61004 - } - if (eventName.length > 255) { - // console.error( - // `uni.report [eventName] Parameter length cannot be greater than 255` - // ) - return 61005 - } - - if (typeof options != 'string' && typeof options != 'object') { - // console.error( - // 'uni.report [options] Parameter type error, Only supports String or Object type' - // ) - return 61006 - } - - if (typeof options == 'string' && (options as string).length > 255) { - // console.error( - // `uni.report [options] Parameter length cannot be greater than 255` - // ) - return 61007 - } - - if (eventName == 'title' && typeof options != 'string') { - // console.error( - // `uni.report [eventName] When the parameter is title, the [options] parameter can only be of type String` - // ) - return 61008 - } - return null -} diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/common/utils/pageTime.uts b/mpuniapp/uni_modules/uni-stat/utssdk/common/utils/pageTime.uts deleted file mode 100644 index e5411cc..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/common/utils/pageTime.uts +++ /dev/null @@ -1,133 +0,0 @@ -import { dbGet } from "./db" -import { PAGE_PVER_TIME, APP_PVER_TIME } from '../config.uts'; -import { ResidenceTimeReturn } from '../../interface.uts' -import { dbSet, dbRemove } from "./db"; - -// 首次访问时间 -const FIRST_VISIT_TIME_KEY = '__first__visit__time' -// 最后访问时间 -const LAST_VISIT_TIME_KEY = '__last__visit__time' -// 访问总数 -const TOTAL_VISIT_COUNT = '__total__visit__count' -const FIRST_TIME = '__first_time' - -// 页面停留时间记录key -const PAGE_RESIDENCE_TIME = '__page__residence__time' -let First_Page_Residence_Time = 0 -let Last_Page_Residence_Time = 0 - -/** - * 获取当前时间 - */ -export const get_time = () : number => { - return Math.floor(new Date().getTime() / 1000) -} - - -/** - * 设置页面首次访问时间,用户获取页面/应用停留时常 - */ -export const set_first_time = () : number => { - // 获取当前时间 ,以下代码获取到是毫秒级时间戳 ,实际上用到是秒级时间戳,所以需要除以1000 - // const time = new Date().getTime() - let time = get_time() - dbSet(FIRST_TIME, time) - return time -} - - - -/** - * 获取首次访问时间 - */ -export const get_first_visit_time = () : number => { - const timeStorge = dbGet(FIRST_VISIT_TIME_KEY) - let time : number - if (timeStorge != null && timeStorge != 0) { - time = timeStorge as number - } else { - time = get_time() - dbSet(FIRST_VISIT_TIME_KEY, time) - // 首次访问需要 将最后访问时间置 0 - dbRemove(LAST_VISIT_TIME_KEY) - } - return time -} - -/** - * 最后访问时间 - */ -export const get_last_visit_time = () : number => { - const timeStorge = dbGet(LAST_VISIT_TIME_KEY) - let time = 0 - if (timeStorge != null && timeStorge != 0) { - time = timeStorge as number - } - - dbSet(LAST_VISIT_TIME_KEY, get_time()) - return time -} - - -/** - * 获取总访问次数 - */ -export const get_total_visit_count = () : number => { - const timeStorge = dbGet(TOTAL_VISIT_COUNT) - let count = 1 - if (timeStorge != null) { - count = timeStorge as number - count++ - } - dbSet(TOTAL_VISIT_COUNT, count) - return count -} - -/** - * 获取页面 \ 应用停留时间 - */ -export const get_residence_time = (type : string) : ResidenceTimeReturn => { - let residenceTime = 0 - const last_time = get_time() - const first_time = (dbGet(FIRST_TIME) ?? last_time) as number - if (first_time != 0) { - residenceTime = last_time - first_time - } - // 将毫秒级时间戳转换为秒级时间戳,因为直接获取的是秒级时间戳,所以不需要转换 - // residenceTime = parseInt(residenceTime / 1000) - residenceTime = residenceTime < 1 ? 1 : residenceTime - let timeData : ResidenceTimeReturn = { - residenceTime: residenceTime, - overtime: false, - } - if (type === 'app') { - let overtime = residenceTime > APP_PVER_TIME ? true : false - timeData.overtime = overtime - return timeData - } - if (type === 'page') { - let overtime = residenceTime > PAGE_PVER_TIME ? true : false - timeData.overtime = overtime - return timeData - } - return timeData -} - -/** - * 设置页面停留时间 - */ -export const set_page_residence_time = () : number => { - First_Page_Residence_Time = get_time() - dbSet(PAGE_RESIDENCE_TIME, First_Page_Residence_Time) - return First_Page_Residence_Time -} - -/** - * 获取页面停留时间 - */ -export const get_page_residence_time = () : number => { - Last_Page_Residence_Time = get_time() - First_Page_Residence_Time = dbGet(PAGE_RESIDENCE_TIME) ?? 0 - const diff : number = Last_Page_Residence_Time - First_Page_Residence_Time - return diff -} diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/index.uts b/mpuniapp/uni_modules/uni-stat/utssdk/index.uts deleted file mode 100644 index 2e549e5..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/index.uts +++ /dev/null @@ -1,27 +0,0 @@ -import { Report, ReportOptions, ReportSuccess, ReportErrorCode } from './interface.uts' -import { ReportFailImpl } from "./unierror.uts" -import { Stat } from './common/core/stat.uts' -const stat = Stat.getInstance() - - -export const report : Report = function (options : ReportOptions) { - const name = options.name - const option = options.options - stat.appEvent(name, option, (type : boolean, code : ReportErrorCode) => { - if (type) { - const res : ReportSuccess = { - errMsg: 'report:ok', - } - options.success?.(res) - options.complete?.(res) - } else { - let err = new ReportFailImpl(code); - options.fail?.(err) - options.complete?.(err) - } - }) -} - -export { Stat } from './common/core/stat.uts' -// --- 导出统计类型 --- -export { UniStatOptions, UniStatCollectItemsOptions, ReportFail } from './interface.uts' diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/interface.uts b/mpuniapp/uni_modules/uni-stat/utssdk/interface.uts deleted file mode 100644 index fe3c3b1..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/interface.uts +++ /dev/null @@ -1,550 +0,0 @@ -/** - * 接口调用成功回调 - */ -export type ReportSuccess = { - /** - * 成功的详细信息 - */ - errMsg : string -} - -/** - * 错误码 - */ -export type ReportErrorCode = - /** - * 应用已集成uni统计,但未关联服务空间,请在uniCloud目录右键关联服务空间 - */ - 61000 | - /** - * 统计服务尚未初始化,需在`main.uts`中引入统计插件 - */ - 61001 | - /** - * name参数是uni-app-launch时, options 参数未填写 - */ - 61002 | - /** - * name参数未填写 - */ - 61003 | - /** - * name参数类型错误,应为`String`类型 - */ - 61004 | - /** - * name参数长度超限,最大不超过255 - */ - 61005 | - /** - * options参数错误,应为String或Object类型 - */ - 61006 | - /** - * options参数为String类型时,长度超限,最大不超过255 - */ - 61007 | - /** - * name参数为title时,options参数类型错误,应为String - */ - 61008 - -/** - * 错误回调 - */ -export interface ReportError extends IUniError { - /** - * 错误码 - */ - errCode : ReportErrorCode -} - -/** - * 接口调用失败回调 - */ -export type ReportFail = ReportError - -/** - * 接口调用成功回调 - */ -export type ReportSuccessCallback = (res : ReportSuccess) => void -/** - * 接口调用失败回调 - */ -export type ReportFailCallback = (err : ReportFail) => void -/** - * 接口调用结束回调(调用成功、失败都会执行) - */ -export type ReportCompleteCallback = (res : any) => void - -/** - * Report 参数定义 - */ -export type ReportOptions = { - /** - * 自定义事件名称,内置名称不允许覆盖,可选值: - * `uni-app-launch`:应用启动,options 参数必填,值为 onLaunch 返回值 - * `uni-app-show`:应用进入前台 - * `uni-app-hide`:应用进入后台 - * `uni-app-error`:应用发生错误,options 参数必填,值为错误信息,类型为String - * `title`:标题采集 - * `自定义name`:用户自定义 - */ - name : string - /** - * 额外参数 - */ - options ?: any | null - /** - * 接口调用成功的回调函数 - */ - success ?: ReportSuccessCallback | null, - /** - * 接口调用失败的回调函数 - */ - fail ?: ReportFailCallback | null, - /** - * 接口调用结束的回调函数(调用成功、失败都会执行) - */ - complete ?: ReportCompleteCallback | null -} - -/** -* 自定义事件信息 -* @param {ReportOptions} options -* -* @platforms APP-IOS = ^9.0,APP-ANDROID = ^22 -* @since 4.25 -*/ - -export type Report = (options : ReportOptions) => void - -export interface Uni { - /** - * 统计自定义事件 - * @description uni统计自定义上报方法。 - * @param {ReportOptions} options 自定义事件参数 - * @uniPlatform { - * "app": { - * "android": { - * "unixVer": "4.33" - * }, - * "ios": { - * "unixVer": "4.33" - * } - * }, - * "web": { - * "unixVer": "4.33" - * }, - * "mp-weixin": { - * "unixVer": "4.41" - * } - * } - * @example - * ```typescript - * uni.report({ - * name:'uni-app-launch', - * success(res) { - * console.log(res); - * }, - * fail(err) { - * console.log(err); - * } - * }) - * ``` - * @remark - * - 该接口需要同步调用 - */ - report(options : ReportOptions) : void; -} - -// 统计插件参数类型 -export type UniStatOptions = { - /** - * 是否开启统计,默认引入卡其 - * @defaultValue true - */ - enable ?: boolean - /** - * 是否开启debug模式 - * @defaultValue false - */ - debug ?: boolean - /** - * 前端数据上报周期 ,单位s - * @defaultValue 10 - */ - reportInterval ?: number - /* 多服务空间配置 */ - uniCloud ?: UniCloudInitOptions - /* 采集项配置 */ - collectItems ?: UniStatCollectItemsOptions -} - -export type UniStatCollectItemsOptions = { - /** - * 是否开启推送PushClientID的采集 - * @defaultValue false - */ - uniPushClientID ?: boolean - /** - * 是否开启页面数据采集 - * @defaultValue true - */ - uniStatPageLog ?: boolean -} - -/** - * 应用参数扩展 - */ -export type OnLaunchOptionsWithCst = { - /** 页面路径 */ - path ?: string - /** 上报时机,参看 ReprotCstType */ - cst ?: number - /** 场景值 */ - scene ?: number - /** 参数 */ - query ?: string -}; - -/** - * 停留时长 - */ -export type ResidenceTimeReturn = { - /** 停留时长 */ - residenceTime : number - /** 是否超时 */ - overtime : boolean -} - -/** - * 路由 - */ -export type RouteParams = { - path : string - fullpath : string -} - -/** - * 页面标题 - */ -export type TitleConfigParams = { - /** pages.json 中的标题 */ - config : string - /** setNavigationBarTitle 获取的标题*/ - page : string - /** 自定义上报的标题 */ - report : string - /** 统计数据类型 */ - lt : string -} - -/** - * 页面参数 - */ -export type PageParams = { - /** 当前页面的完整 url,包含参数在内。最多255字符 */ - url ?: string - /** pages.json 中定义的页面的 title,获取不到时,可以不传 */ - ttpj ?: string - /** 通过接口 uni.setnavigationbartitle 设置的 title,获取不到时,可以不传 */ - ttn ?: string - /** 通过 uni.report 上报的页面的 title,获取不到时,可以不传 */ - ttc ?: string - /** title 组件中设置的 title,获取不到时,可以不传 */ - ttct ?: string - /** 上个页面的完整 url */ - urlref : string - /** 上个页面停留时间,单位为秒,不足1秒按1秒计。 url */ - urlref_ts : number - /** 上个页面的标题 */ - urlref_tt ?: string -} - -/** - * 上传 unicloud 参数 - */ -export type RequestData = { - /** 统计 SDK 版本号 */ - usv : string - /** 发送请求时的时间戮 */ - t : number - /** 组合数据 */ - requests : string -} - -/** - * 用户自定义服务空间配置信息 - */ -export type CustomUnicloudConfig = { - /** 服务空间id */ - spaceId : string, - /** 云厂商 */ - provider : string, - /** clientSecret */ - clientSecret ?: string - /** secretKey */ - secretKey ?: string - /** secretId */ - secretId ?: string -} - -/** - * 事件类型 - */ -export type EventParams = { - /** 事件名字*/ - key : string - /** 事件内容 */ - value ?: string -} - -/** - * 统计默认值 - */ -export type StatDefault = { - /** 设备标识 */ - uuid : string - /** uni-app 应用 Appid */ - ak : string - /** 手机系统 */ - p : string - /** 平台类型 */ - ut : string - /** 原生平台包名、小程序 appid */ - mpn ?: string - /** 统计 sdk 版本 */ - usv ?: string - /** 应用版本,仅app */ - v ?: string - /** 渠道信息 */ - ch ?: string - /** 国家 */ - cn ?: string - /** 省份 */ - pn ?: string - /** 城市 */ - ct ?: string - /** 上报数据时的时间戳 */ - t ?: number - /** 页面标题 */ - tt ?: string - /** 手机品牌 */ - brand ?: string - /** 手机型号 */ - md ?: string - /** 手机系统版本 */ - sv ?: string - /** x程序 sdk version */ - mpsdk ?: string - /** 小程序平台版本 ,如微信、支付宝 */ - mpv ?: string - /** 语言 */ - lang ?: string - /** pixelRatio 设备像素比 */ - pr ?: number - /** windowWidth 可使用窗口宽度 */ - ww ?: number - /** windowHeight 可使用窗口高度 */ - wh ?: number - /** screenWidth 屏幕宽度 */ - sw ?: number - /** screenHeight 屏幕高度 */ - sh ?: number - - /** 场景值 */ - sc ?: number - /** 统计数据类型 */ - lt ?: string - /** 老用户错误的的设备id */ - odid ?: string - url ?: string - /** 首次访问时间戳。需要保存在 storage 中。用户首次访问时,取当前时间。*/ - fvts ?: number - /** 上次访问时间戳。需要保存在 storage 中。用户首次访问时,设置为0。*/ - lvts ?: number - /** total visit count 用户到本次访问为止总共的访问次数。*/ - tvc ?: number - /** 上报时机,参看 ReprotCstType */ - cst ?: number - urlref_ts ?: number - urlref ?: string - - // 标题相关 - /** pages.json 中定义的页面的 title,获取不到时,可以不传 */ - ttpj ?: string - /** 通过接口 uni.setnavigationbartitle 设置的 title,获取不到时,可以不传 */ - ttn ?: string - /** 通过 uni.report 上报的页面的 title,获取不到时,可以不传 */ - ttc ?: string - /** title 组件中设置的 title,获取不到时,可以不传 */ - ttct ?: string - - /** push id */ - cid ?: string - - /** 自定义事件key */ - e_n ?: string - /** 自定义事件value */ - e_v ?: string - - /** 纬度 */ - lat ?: string - /** 经度 */ - lng ?: string - /** 网络 */ - net ?: string - /** 错误信息 */ - em ?: string - /* 是否root ios为越狱 */ - root ?: number - /*manifest.json 中应用版本名称。*/ - pv ?: string - log ?: string - did ?: string - os ?: string -} - -/** - * 应用首次启动上报参数 - */ -export type AppShowReportParams = { - /** uni-app 应用 Appid */ - uuid : string - /** 设备标识 */ - ak : string - /** 统计数据类型 */ - lt : string - /** 平台类型 */ - ut : string - /** x程序 sdk version */ - mpsdk : string - /** 小程序平台版本 ,如微信、支付宝 */ - mpv : string - /** 原生平台包名、小程序 appid */ - mpn : string - /** 应用版本,仅app */ - v : string - /** 手机系统 */ - p : string - /** 手机系统版本 */ - sv : string - /** 设备网络 */ - net : string - /** 手机品牌 */ - brand : string - /** 手机型号 */ - md : string - /** 语言 */ - lang : string - /** 纬度 */ - lat : string - /** 经度 */ - lng : string - /** pixelRatio 设备像素比 */ - pr : number - /** windowWidth 可使用窗口宽度 */ - ww : number - /** windowHeight 可使用窗口高度 */ - wh : number - /** screenWidth 屏幕宽度 */ - sw : number - /** screenHeight 屏幕高度 */ - sh : number - /** 页面启动的url */ - url : string - /** 页面标题 */ - tt : string - /** 渠道信息 */ - ch : string - /** 首次访问时间戳。需要保存在 storage 中。用户首次访问时,取当前时间。*/ - fvts : number - /** 上次访问时间戳。需要保存在 storage 中。用户首次访问时,设置为0。*/ - lvts : number - /** 国家 */ - cn : string - /** 省份 */ - pn : string - /** 城市 */ - ct : string - /** 场景值 */ - sc : number - /** total visit count 用户到本次访问为止总共的访问次数。*/ - tvc : number - /** 统计 sdk 版本 */ - usv : string - /** 上报数据时的时间戳 */ - t : number - /** 老用户错误的的设备id */ - odid : string - /** 上报时机,参看 ReprotCstType */ - cst : number -} - -/** - * 应用进入后台上报参数 - */ -export type AppHideReportParams = { - /** uni-app 应用 Appid */ - ak : string - /** 设备标识 */ - uuid : string - /** 统计数据类型 */ - lt : string - /** 平台类型 */ - ut : string - /** 手机系统 */ - p : string - /** 上个页面的完整 url */ - urlref : string - /** 上个页面停留时间,单位为秒,不足1秒按1秒计。 */ - urlref_ts : number - /** 渠道信息 */ - ch : string - /** 统计 sdk 版本 */ - usv : string - /** 上报数据时的时间戳。 */ - t : number -} - -/** - * 页面切换上报参数 - */ -export type PageReportParams = { - /** uni-app 应用 Appid */ - ak : string - /** 设备标识 */ - uuid : string - /** 统计数据类型 */ - lt : string - /** 平台类型 */ - ut : string - /** 手机系统 */ - p : string - /** 当前页面 url */ - url : string - // 标题相关 - /** pages.json 中定义的页面的 title,获取不到时,可以不传 */ - ttpj : string - /** 通过接口 uni.setnavigationbartitle 设置的 title,获取不到时,可以不传 */ - ttn : string - /** 通过 uni.report 上报的页面的 title,获取不到时,可以不传 */ - ttc : string - /** title 组件中设置的 title,获取不到时,可以不传 */ - ttct : string - /** 上个页面的完整 url */ - urlref : string - /** 上个页面停留时间,单位为秒,不足1秒按1秒计。 */ - urlref_ts : number - /** 渠道信息 */ - ch : string - /** 统计 sdk 版本 */ - usv : string - /** 上报数据时的时间戳。 */ - t : number - /** 上报时机,参看 ReprotCstType */ - cst ?: number -} - -export type ErrorCallback = (is_err : boolean, code : ReportErrorCode) => void diff --git a/mpuniapp/uni_modules/uni-stat/utssdk/unierror.uts b/mpuniapp/uni_modules/uni-stat/utssdk/unierror.uts deleted file mode 100644 index ffc2727..0000000 --- a/mpuniapp/uni_modules/uni-stat/utssdk/unierror.uts +++ /dev/null @@ -1,47 +0,0 @@ -import { ReportErrorCode, ReportError } from "./interface.uts" - -/** - * 错误主题 - */ -export const ReportUniErrorSubject = 'uni-report'; - - -/** - * 错误码 - * @UniError - */ -export const ReportUniErrors:Map = new Map([ - /** - * 已集成uni统计,但未关联服务空间 - */ - [61000, '应用已集成uni统计,但未关联服务空间,请在uniCloud目录右键关联服务空间!'], - /** - * 统计已集成,但未初始化 - */ - [61001, '统计服务尚未初始化,请在main.uts中引入统计插件!'], - /** - * 调用失败 - */ - [61002, 'uni-app-launch 下 options 参数必填,请检查!'], - [61003, 'Report的 name参数必填'], - [61004, 'Report的name参数类型必须为字符串'], - [61005, 'Report的name参数长度最大为255'], - [61006, 'Report的options参数只能为String或者Object类型'], - [61007, 'Report的options参数若为String类型,则长度最大为255'], - [61008, 'Report的name参数为title时,options参数类型只能为String'], -]); - -/** - * ReportFail的实现 - */ -export class ReportFailImpl extends UniError implements ReportError { - override errCode: ReportErrorCode - constructor ( - errCode: ReportErrorCode - ) { - super() - this.errSubject = ReportUniErrorSubject - this.errCode = errCode - this.errMsg = ReportUniErrors.get(errCode) ?? '' - } -} diff --git a/mpuniapp/uni_modules/uni-tab-bar/changelog.md b/mpuniapp/uni_modules/uni-tab-bar/changelog.md deleted file mode 100644 index b2f5db9..0000000 --- a/mpuniapp/uni_modules/uni-tab-bar/changelog.md +++ /dev/null @@ -1,6 +0,0 @@ -## 1.0.2(2026-07-16) -- 修复微信小程序滚动内容穿透底部 tab-bar -## 1.0.1(2026-07-07) -- 优化组件的宽度计算方式 -## 1.0.0(2026-04-30) -- 支持 uni-tab-bar 组件 diff --git a/mpuniapp/uni_modules/uni-tab-bar/components/types.uts b/mpuniapp/uni_modules/uni-tab-bar/components/types.uts deleted file mode 100644 index 43d99eb..0000000 --- a/mpuniapp/uni_modules/uni-tab-bar/components/types.uts +++ /dev/null @@ -1,4 +0,0 @@ -export type UniTabBarLayout = { - tabListBaseHeight: number - tabContentHeightFull: boolean -} diff --git a/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab-bar/uni-tab-bar.uvue b/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab-bar/uni-tab-bar.uvue deleted file mode 100644 index ad2ea60..0000000 --- a/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab-bar/uni-tab-bar.uvue +++ /dev/null @@ -1,137 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab-content/uni-tab-content.uvue b/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab-content/uni-tab-content.uvue deleted file mode 100644 index e7c863b..0000000 --- a/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab-content/uni-tab-content.uvue +++ /dev/null @@ -1,105 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab-item/uni-tab-item.uvue b/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab-item/uni-tab-item.uvue deleted file mode 100644 index 7a47c6e..0000000 --- a/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab-item/uni-tab-item.uvue +++ /dev/null @@ -1,175 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab-midbutton/uni-tab-midbutton.uvue b/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab-midbutton/uni-tab-midbutton.uvue deleted file mode 100644 index bac4253..0000000 --- a/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab-midbutton/uni-tab-midbutton.uvue +++ /dev/null @@ -1,147 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab/uni-tab.uvue b/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab/uni-tab.uvue deleted file mode 100644 index 1305777..0000000 --- a/mpuniapp/uni_modules/uni-tab-bar/components/uni-tab/uni-tab.uvue +++ /dev/null @@ -1,251 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-tab-bar/package.json b/mpuniapp/uni_modules/uni-tab-bar/package.json deleted file mode 100644 index 8c04e9a..0000000 --- a/mpuniapp/uni_modules/uni-tab-bar/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "id": "uni-tab-bar", - "displayName": "uni-tab-bar 选项卡", - "version": "1.0.2", - "description": "底部选项卡组件集", - "isExt": true, - "extUrl": "https://ext.dcloud.net.cn/plugin?id=27849", - "examples": [ - { - "name": "tab-bar-dark", - "description": "暗色风格", - "url": "https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/uni-ui/tab-bar/tab-bar-dark.uvue" - }, - { - "name": "tab-bar-custom", - "description": "自定义样式", - "url": "https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/uni-ui/tab-bar/tab-bar-custom.uvue" - }, - { - "id": "uni-tab-midbutton", - "name": "tab-bar-midbutton", - "description": "中间按钮", - "url": "https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/uni-ui/tab-bar/tab-bar-midbutton.uvue" - }, - { - "id": "uni-tab-midbutton", - "name": "tab-bar-midbutton-notch", - "description": "中间按钮镂空", - "url": "https://gitcode.com/dcloud/hello-uni-app-x/blob/prod_alpha/pages/uni-ui/tab-bar/tab-bar-midbutton-notch.uvue" - } - ], - "keywords": [ - "uni-ui", - "uniui", - "自定义选项卡", - "uni-app-x", - "tab-bar" -], - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "engines": { - "HBuilderX": "^5.07", - "uni-app": "", - "uni-app-x": "^5.07" - }, - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "type": "component-vue", - "darkmode": "x", - "i18n": "x", - "widescreen": "x", - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "√", - "aliyun": "x", - "alipay": "x" - }, - "client": { - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": "√", - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-tab-bar/readme.md b/mpuniapp/uni_modules/uni-tab-bar/readme.md deleted file mode 100644 index 42dc900..0000000 --- a/mpuniapp/uni_modules/uni-tab-bar/readme.md +++ /dev/null @@ -1,83 +0,0 @@ -`uni_modules/uni-tab-bar` 包括一组 tab 相关组件: - -- `uni-tab`:最外层容器,负责激活索引、内容区高度和切换事件 -- `uni-tab-bar`:底部 tab 容器,负责底栏布局、安全区和中间按钮占位 -- `uni-tab-item`:普通 tab 项,负责插槽展示和 badge -- `uni-tab-midbutton`:中间悬浮按钮占位容器 -- `uni-tab-content`:上方内容区域容器,负责内容注册、懒渲染和显示切换 - -### 基础用法 - -```vue - -``` - -如果需要自定义底栏主体高度,请在 `uni-tab` 上使用 `tab-bar-height` 属性。使用该属性可以更快的计算布局,而不必在页面onReady后通过getBoundRect来计算布局: - -```vue - - ... - -``` - -### 组件 API - -#### uni-tab - -##### 事件 - -| 事件名 | 返回参数 | 说明 | -| --- | --- | --- | -| `change` | `index: number` | 点击普通 tab 项切换后触发,返回新的激活索引 | - -#### uni-tab-bar - -无专用属性和API,可直接通过 `class` / `style` 自定义底栏外观。 - -#### uni-tab-content - -无专用属性和API,可直接通过 `class` / `style` 自定义外观。 - -多个选项卡内容揉在一个uni-tab中比较乱,一般推荐uni-tab-content下放一个子组件,子组件作为独立uvue文件。 - -各个uni-tab-content的子组件,在显示和隐藏的没有生命周期。 -如需监听显示/隐藏需要通过provide/inject方式从外层传入响应式变量activeIndex,然后在子组件中watch这个activeIndex。 - -### 使用注意事项 - -1. `uni-tab` 所在的页面不应该滚动,应该在pages.json中配置页面style为`disableScroll:true`。 -2. 屏幕变化适配,Android需HBuilderX 5.09+支持。之前版本组件里无法监听页面的onResize。 -3. `uni-tab-content` 与 `uni-tab-item` 的数量必须一致,顺序也必须一一对应,否则切换后的内容会错位。 -4. `uni-tab` 默认占满页面的宽度和高度,即 `style="flex: 1"` -5. 自定义底栏高度时,不要只改样式高度,要同步通过 `tab-bar-height` 传入 `uni-tab`,这样内容区底部留白和安全区计算才会一起更新。 -6. 如果底栏存在镂空、下凹或透明边缘,需要让底部内容透出来,请在 `uni-tab` 上开启 `tab-content-height-full`,此时内容区会延伸到 `uni-tab-bar` 下方。 -7. `uni-tab-content` 采用“首次激活再渲染”的策略;第一次切入前不会创建实例,切走后只隐藏不销毁,适合保留 tab 内部状态。 -8. `uni-tab-item` 只负责普通 tab 项注册与展示,不提供单独点击事件;请统一监听 `uni-tab` 的 `change`。 -9. 使用 `uni-tab-midbutton` 时,中间按钮左右两侧的普通 `uni-tab-item` 数量需要相等,也就是普通项总数必须为偶数,才能保持居中均分布局。 -10. `uni-tab-midbutton` 只负责预留中间按钮位置,不参与激活索引计算;中间按钮点击行为需要在插槽内部自行处理。 -11. `badge-text` 传空字符串时显示红点,传 `'0'` 时不显示;如果需要自定义 badge 外观,请使用 `badge-class` 覆盖样式。 -12. `uni-tab-bar`、`uni-tab-item`、`uni-tab-content` 的根节点都支持直接挂 `class` / `style`,推荐把视觉差异放在页面侧处理,不要改组件内部逻辑。 diff --git a/mpuniapp/uni_modules/uni-tab-bar/todo.md b/mpuniapp/uni_modules/uni-tab-bar/todo.md deleted file mode 100644 index dedeb77..0000000 --- a/mpuniapp/uni_modules/uni-tab-bar/todo.md +++ /dev/null @@ -1,10 +0,0 @@ -## 中间凸起 -非下沉的,中间凸起的midbutton页面,缺少一个平滑的过渡曲线 - -## 左右滑 -Android常见,微信 -避免和页面内的内容冲突 - -## tab-bar高斯模糊 -等view支持高斯模糊的css后,补一个示例页面即可 - diff --git a/mpuniapp/uni_modules/uni-time-format/components/uni-time-format/uni-time-format.uvue b/mpuniapp/uni_modules/uni-time-format/components/uni-time-format/uni-time-format.uvue deleted file mode 100644 index 868f553..0000000 --- a/mpuniapp/uni_modules/uni-time-format/components/uni-time-format/uni-time-format.uvue +++ /dev/null @@ -1,278 +0,0 @@ - - - - - \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-time-format/package.json b/mpuniapp/uni_modules/uni-time-format/package.json deleted file mode 100644 index cba8d9f..0000000 --- a/mpuniapp/uni_modules/uni-time-format/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "id": "uni-time-format", - "displayName": "uni-time-format 时间格式化", - "version": "1.0.0", - "description": "TimeFormat 时间格式化组件,可自定义时间格式化。", - "isExt": true, - "extUrl": "https://ext.dcloud.net.cn/plugin?id=27851", - "keywords": [ - "uni-ui", - "uniui", - "time-format", - "uni-app-x" - ], - "engines": { - "HBuilderX": "^5.07", - "uni-app-x": "^5.07", - "uni-app": "" - }, - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "type": "component-vue", - "darkmode": "x", - "i18n": "x", - "widescreen": "x", - "npmurl": "" - }, - "uni_modules": { - "encrypt": [], - "dependencies": [], - "platforms": { - "cloud": { - "tcb": "x", - "aliyun": "x", - "alipay": "x" - }, - "client": { - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": "√", - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-time-format/readme.md b/mpuniapp/uni_modules/uni-time-format/readme.md deleted file mode 100644 index 639d7a1..0000000 --- a/mpuniapp/uni_modules/uni-time-format/readme.md +++ /dev/null @@ -1,40 +0,0 @@ -时间格式化展示组件,支持绝对时间与相对时间。 - -### 基本用法 - -```html - -``` - -### relative 规则 - -`format=relative` 按自然日输出: -- 今天内: -`< 1 分钟` 输出“刚刚” -`< 60 分钟` 输出“n分钟前” -`>= 60 分钟` 输出“n小时前” -- 昨天内:输出“昨天 HH:mm” -- 超过昨天:输出“YYYY-MM-DD HH:mm” -- 未来时间:直接输出“YYYY-MM-DD HH:mm” - -### 相对时间国际化 - -根据 `uni.getAppBaseInfo().appLanguage` 自动匹配: -- 简体中文(`zh`) -- 繁体中文(`zh-hant` / `zh-tw` / `zh-hk` / `zh-mo`) -- 英文(默认) -- 法文(`fr`) -- 拉丁文(`la`) - -法文、拉丁文使用短文案,避免长文本占位。 - -### 非法时间 - -当 `timestamp` 非法时,组件返回空字符串。 - -### 示例页面 - -`/pages/uni-ui/time-format/time-format` -示例页面包含两组相对时间演示: -- 输入框动态演示:输入 `yyyy-mm-dd hh:mm:ss`,实时展示对应相对时间 -- 固定分支演示:展示“刚刚 / 分钟前 / 小时前 / 昨天 HH:mm / 超过昨天”五种分支,且不随输入变化 diff --git a/mpuniapp/uni_modules/uni-ui-x/changelog.md b/mpuniapp/uni_modules/uni-ui-x/changelog.md deleted file mode 100644 index 7aa1735..0000000 --- a/mpuniapp/uni_modules/uni-ui-x/changelog.md +++ /dev/null @@ -1,14 +0,0 @@ -## 1.0.4(2026-05-26) -- uni-badge-view 修复类名拼写错误 -- uni-nav-bar 纠正类名拼写错误 -## 1.0.3(2026-05-15) -- uni-collapse 支持 content-wrap-class 定义内层容器样式 -## 1.0.2(2026-05-12) -- uni-badge-view 更新文档 -- uni-index-bar 更新文档 -- uni-number-box 移除无用依赖 -- uni-rate 修复 starClass 和 starActiveClass 设置不生效的问题 -## 1.0.1(2026-05-07) -- 新增 uni-collapse、uni-link、uni-nav-bar、uni-number-box、uni-rate 组件 -## 1.0.0(2026-04-30) -- 支持 uni-ui-x 组件库 diff --git a/mpuniapp/uni_modules/uni-ui-x/package.json b/mpuniapp/uni_modules/uni-ui-x/package.json deleted file mode 100644 index dfd0abc..0000000 --- a/mpuniapp/uni_modules/uni-ui-x/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "id": "uni-ui-x", - "displayName": "uni-ui-x", - "version": "1.0.4", - "description": "uni-ui-x是DCloud为uni-app x提供的组件库", - "isExt": true, - "keywords": [ - "uni-ui-x", - "UI组件库", - "ui框架", - "ui库", - "uni-app-x" - ], - "engines": { - "HBuilderX": "", - "uni-app-x": "^5.08", - "uni-app": "" - }, - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "type": "component-vue", - "darkmode": "x", - "i18n": "x", - "widescreen": "x", - "npmurl": "" - }, - "uni_modules": { - "dependencies": [ - "uni-badge-view", - "uni-collapse-x", - "uni-drag-cell", - "uni-fab-button", - "uni-index-bar", - "uni-link-x", - "uni-nav-bar-x", - "uni-number-box-x", - "uni-rate-x", - "uni-refresh-box", - "uni-tab-bar", - "uni-time-format" - ], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "x", - "aliyun": "x", - "alipay": "x" - }, - "client": { - "uni-app-x": { - "web": { - "safari": "√", - "chrome": "√" - }, - "app": { - "android": "√", - "ios": "√", - "harmony": "√" - }, - "mp": { - "weixin": "√" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-upgrade-center-app/changelog.md b/mpuniapp/uni_modules/uni-upgrade-center-app/changelog.md deleted file mode 100644 index 1a98b66..0000000 --- a/mpuniapp/uni_modules/uni-upgrade-center-app/changelog.md +++ /dev/null @@ -1,133 +0,0 @@ -## 0.9.12(2026-08-03) -- 修复 安卓平台、鸿蒙平台 蒸汽模式 下载/跳转按钮文字不居中 -## 0.9.11(2026-08-01) -- 修复 运行到 uni-app x Vapor 升级按钮样式上不可见 -## 0.9.10(2026-04-27) -- 修复 uni-app-x 项目编译时 warning -## 0.9.9(2026-02-03) -- 修复 安卓端非强制更新 kotlin 报错 `onClick has not been intialized` -## 0.9.8(2026-01-05) -- 更新 移除 vapor 模式不支持的 class 选择器 -## 0.9.7(2025-07-28) -- 修复 使用腾讯云时,wgt 更新报错的Bug -- 改进 uni-app-x 平台弹窗该用 script setup 实现 -## 0.9.6(2025-04-01) -- 新增 升级中心适配鸿蒙 uni-app x **需要 HBuilderX 4.61+** -## 0.9.5(2025-02-06) -- 新增 完善下载失败时的处理逻辑 -## 0.9.4(2024-12-28) -- 修复 腾讯云在使用扩展存储时报错的 Bug -## 0.9.3(2024-12-23) -- 修复 升级中心在大屏上的显示效果 -## 0.9.2(2024-11-06) -- 更新 部分 ts 类型 -## 0.9.1(2024-11-01) -- 更新 支持 HarmonyOS Next 设备整包更新、wgt 更新。需要 `HBuilderX 4.32+` [详情](https://doc.dcloud.net.cn/uniCloud/upgrade-center.html#uni-upgrade-center-app-harmonyos) -## 0.9.0(2024-10-30) -- **重要更新** 在 uni-app x 项目中弃用之前弹窗方案使用[dialogPage](https://doc.dcloud.net.cn/uni-app-x/api/dialog-page.html)实现,需要 `HBuilderX 4.31+` -## 0.8.5(2024-10-26) -- 优化 去除不必要代码 -## 0.8.4(2024-10-26) -- 修复 uni-app x 项目升级到 4.31 alpha 后中间有空隙的Bug -## 0.8.3(2024-07-31) -- 修复 部分类型报错 -## 0.8.2(2024-07-15) -- 更新 static 下的静态图片放入 static/app 目录下,防止编译除 app 平台以外的平台时带入 -## 0.8.1(2024-04-28) -- 修复 在 HX 4.0.3+ uni-app x 项目运行到 Android 调不起安装的Bug -## 0.8.0(2024-04-15) -- 修复 更新弹窗 data 中新增初始化字段 -## 0.7.9(2024-03-15) -- 移除无用代码 -- 调整 is_silently 类型为可为 null -## 0.7.8(2024-01-04) -- 新增 移除无用代码 -## 0.7.7(2024-01-04) -- 新增 uni-app x 项目中新增 @show 回调 -## 0.7.6(2023-12-21) -- 修复 iOS使用升级中心云打包时报错(使用新版的 [uts-progressNotification](https://ext.dcloud.net.cn/plugin?name=uts-progressNotification) 插件,如果之前下载过请删除 `uts-progressNotification\utssdk\app-ios` 文件夹) -## 0.7.5(2023-12-12) -- 新增 通知栏进度条使用 uts-progressNotification 插件 -- 新增 依赖 uni-installApk、uts-progressNotification。使用前要安装插件三方依赖 -## 0.7.4(2023-11-29) -- 修复 uni-app-x 项目中由上版引发的无法升级的Bug -## 0.7.3(2023-11-27) -- 修复 在 uni-app x 中无更新时报错的Bug -## 0.7.2(2023-11-20) -- 新增 插件根目录 utils 文件夹中新增 check-update-nvue.js 文件(vue2 的 nvue 页面请引用该文件) -## 0.7.1(2023-11-17) -- 修复 运行至浏览器 ts 语法报错 -## 0.7.0(2023-11-10) -- 新增 兼容 uni-app x 项目 [详情](https://uniapp.dcloud.net.cn/uniCloud/upgrade-center.html) -## 0.6.5(2023-10-27) -- 修复 安装 wgt 报错 manifest.json 文件不存在的Bug -## 0.6.4(2023-09-01) -chore: 优化代码结构 -## 0.6.3(2023-08-30) -- 修复 下载 wgt 时如果后缀名不正确,重命名后安装 -## 0.6.2(2022-11-21) -- 处理 cloudfunctions 目录 -## 0.6.1(2022-08-17) -- 修复 后台添加应用市场,但都没有启用的情况下报错的Bug (需要 uni-admin 1.9.3+) -## 0.6.0(2022-07-19) -- 新增 支持多应用商店配置(需要 uni-admin 1.9.3+) -## 0.4.1(2022-05-27) -- 修复 上版引出的报错问题 -## 0.4.0(2022-05-27) -- 新增 Android 支持跳转手机自带商店,填写升级包地址时请填写跳转商店链接 -- 新增 改为云对象调用方式,使用更直观 -## 0.3.3(2022-04-14) -- 修复 调用 check-update,当 code 为 0 时没有回调 -## 0.3.2(2022-01-12) -- 优化显示逻辑 -## 0.3.1(2021-11-24) -- 修复 vue3 上图片不显示的Bug -## 0.3.0(2021-11-18) -- 移除 wgt 安装成功后提示,防止重启过快弹框不消失 -## 0.2.2(2021-08-25) -- 兼容vue3.0 -## 0.2.1(2021-07-26) -- 修复 使用腾讯云并手动填写地址时,导致下载链接失效的bug -## 0.2.0(2021-07-13) -- 更新文档 关于报错local_storage_key 为空,请不要将页面路径设置为pages.json中第一项 -## 0.1.9(2021-06-28) -- 更新文档 -- 修复 wgt安装失败时,按钮状态不对 -## 0.1.8(2021-06-16) -- 修复 跳转安装时,导致上次下载的apk还没安装就被删掉的bug -## 0.1.7(2021-06-03) -- 修改 移除static中的图片 -## 0.1.6(2021-06-03) -- 修改 下载更新按钮使用CSS渐变色 -## 0.1.5(2021-04-22) -- 更新check-update函数。现在返回一个Promise,有更新时成功回调,其他情况错误回调 -## 0.1.4(2021-04-13) -- 更新文档。明确云函数调用结果 -## 0.1.3(2021-04-13) -- 解耦云函数与弹框处理。utils中新增 call-check-version.js,可用于单独检测是否有更新 -## 0.1.2(2021-04-07) -- 更新版本对比函数 compare -## 0.1.1(2021-04-07) -- 修复 腾讯云空间下载链接不能下载问题 -## 0.1.0(2021-04-07) -- 新增使用uni.showModal提示升级示例 -- 修改iOS升级提示方式 -## 0.0.7(2021-04-02) -- 修复在iOS上打开弹框报错 -## 0.0.6(2021-04-01) -- 兼容旧版本安卓 -## 0.0.5(2021-04-01) -- 修复低版本安卓上进度条错位 -## 0.0.4(2021-04-01) -- 更新readme -- 修复check-update语法错误 -## 0.0.3(2021-04-01) -- 新增前台更新弹框,详见readme -- 更新前台检查更新方法 - -## 0.0.2(2021-03-29) -- 更新文档 -- 移除 dependencies - -## 0.0.1(2021-03-25) -- 升级中心前台检查更新 diff --git a/mpuniapp/uni_modules/uni-upgrade-center-app/package.json b/mpuniapp/uni_modules/uni-upgrade-center-app/package.json deleted file mode 100644 index 943affa..0000000 --- a/mpuniapp/uni_modules/uni-upgrade-center-app/package.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "id": "uni-upgrade-center-app", - "displayName": "升级中心 uni-upgrade-center - App", - "version": "0.9.12", - "description": "uni升级中心 - 客户端检查更新", - "keywords": [ - "uniCloud", - "update", - "升级", - "wgt" -], - "repository": "https://gitee.com/dcloud/uni-upgrade-center/tree/master/uni_modules/uni-upgrade-center-app", - "engines": { - "HBuilderX": "^4.31", - "uni-app": "^4.35", - "uni-app-x": "^4.65" - }, - "dcloudext": { - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "插件不采集任何数据", - "permissions": "无" - }, - "npmurl": "", - "type": "unicloud-template-page", - "darkmode": "x", - "i18n": "x", - "widescreen": "√" - }, - "uni_modules": { - "dependencies": [ - "uts-progressNotification", - "uts-openSchema" - ], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "√", - "aliyun": "√", - "alipay": "√" - }, - "client": { - "uni-app": { - "vue": { - "vue2": { - "extVersion": "0.9.11", - "minVersion": "" - }, - "vue3": { - "extVersion": "0.9.11", - "minVersion": "" - } - }, - "web": { - "safari": "-", - "chrome": "-" - }, - "app": { - "vue": { - "extVersion": "0.9.11", - "minVersion": "" - }, - "nvue": { - "extVersion": "0.8.3", - "minVersion": "" - }, - "android": { - "extVersion": "0.8.3", - "minVersion": "21" - }, - "ios": { - "extVersion": "0.8.3", - "minVersion": "12" - }, - "harmony": { - "extVersion": "0.9.1", - "minVersion": "12" - } - }, - "mp": { - "weixin": "x", - "alipay": "x", - "toutiao": "x", - "baidu": "x", - "kuaishou": "x", - "jd": "x", - "harmony": "x", - "qq": "x", - "lark": "x", - "xhs": "-" - }, - "quickapp": { - "huawei": "x", - "union": "x" - } - }, - "uni-app-x": { - "web": { - "safari": "x", - "chrome": "x" - }, - "app": { - "android": { - "extVersion": "0.9.0", - "minVersion": "21" - }, - "ios": { - "extVersion": "0.9.0", - "minVersion": "12" - }, - "harmony": { - "extVersion": "0.9.11", - "minVersion": "" - } - }, - "mp": { - "weixin": "x" - } - } - } - } - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-upgrade-center-app/pages/uni-app-x/upgrade-popup.uvue b/mpuniapp/uni_modules/uni-upgrade-center-app/pages/uni-app-x/upgrade-popup.uvue deleted file mode 100644 index 3c89a03..0000000 --- a/mpuniapp/uni_modules/uni-upgrade-center-app/pages/uni-app-x/upgrade-popup.uvue +++ /dev/null @@ -1,545 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-upgrade-center-app/pages/upgrade-popup.vue b/mpuniapp/uni_modules/uni-upgrade-center-app/pages/upgrade-popup.vue deleted file mode 100644 index e9769d6..0000000 --- a/mpuniapp/uni_modules/uni-upgrade-center-app/pages/upgrade-popup.vue +++ /dev/null @@ -1,679 +0,0 @@ - - - - - diff --git a/mpuniapp/uni_modules/uni-upgrade-center-app/readme.md b/mpuniapp/uni_modules/uni-upgrade-center-app/readme.md deleted file mode 100644 index 53ff781..0000000 --- a/mpuniapp/uni_modules/uni-upgrade-center-app/readme.md +++ /dev/null @@ -1 +0,0 @@ -文档已移至 [uni-upgrade-center](https://uniapp.dcloud.net.cn/uniCloud/upgrade-center.html) \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-upgrade-center-app/static/app/app_update_close.png b/mpuniapp/uni_modules/uni-upgrade-center-app/static/app/app_update_close.png deleted file mode 100644 index 8b2ffe6..0000000 Binary files a/mpuniapp/uni_modules/uni-upgrade-center-app/static/app/app_update_close.png and /dev/null differ diff --git a/mpuniapp/uni_modules/uni-upgrade-center-app/static/app/bg_top.png b/mpuniapp/uni_modules/uni-upgrade-center-app/static/app/bg_top.png deleted file mode 100644 index 015f698..0000000 Binary files a/mpuniapp/uni_modules/uni-upgrade-center-app/static/app/bg_top.png and /dev/null differ diff --git a/mpuniapp/uni_modules/uni-upgrade-center-app/uniCloud/database/db_init.json b/mpuniapp/uni_modules/uni-upgrade-center-app/uniCloud/database/db_init.json deleted file mode 100644 index 0967ef4..0000000 --- a/mpuniapp/uni_modules/uni-upgrade-center-app/uniCloud/database/db_init.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/mpuniapp/uni_modules/uni-upgrade-center-app/utils/call-check-version.ts b/mpuniapp/uni_modules/uni-upgrade-center-app/utils/call-check-version.ts deleted file mode 100644 index 82b4de1..0000000 --- a/mpuniapp/uni_modules/uni-upgrade-center-app/utils/call-check-version.ts +++ /dev/null @@ -1,120 +0,0 @@ -export type StoreListItem = { - enable : boolean - id : string - name : string - scheme : string - priority : number // 优先级 -} - -export type UniUpgradeCenterResult = { - _id : string - appid : string - name : string - title : string - contents : string - url : string // 安装包下载地址 - platform : Array // Array<'Android' | 'iOS' | 'Harmony'> - version : string // 版本号 1.0.0 - uni_platform : string // "android" | "ios" | 'harmony' - stable_publish : boolean // 是否是稳定版 - is_mandatory : boolean // 是否强制更新 - is_silently : boolean | null // 是否静默更新 - create_env : string // "upgrade-center" - create_date : number - message : string - code : number - - type : string // "native_app" | "wgt" - store_list : StoreListItem[] | null - min_uni_version : string | null // 升级 wgt 的最低 uni-app 版本 -} - -export default function () : Promise { - // #ifdef APP - return new Promise((resolve, reject) => { - const systemInfo = uni.getSystemInfoSync() - const appId = systemInfo.appId - const appVersion = systemInfo.appVersion //systemInfo.appVersion - // #ifndef UNI-APP-X - if (typeof appId === 'string' && typeof appVersion === 'string' && appId.length > 0 && appVersion.length > 0) { - plus.runtime.getProperty(appId, function (widgetInfo) { - if (widgetInfo.version) { - let data = { - action: 'checkVersion', - appid: appId, - appVersion: appVersion, - wgtVersion: widgetInfo.version - } - uniCloud.callFunction({ - name: 'uni-upgrade-center', - data, - success: (e) => { - resolve(e.result as UniUpgradeCenterResult) - }, - fail: (error) => { - reject(error) - } - }) - } else { - reject('widgetInfo.version is EMPTY') - } - }) - } else { - reject('plus.runtime.appid is EMPTY') - } - // #endif - // #ifdef UNI-APP-X - if (typeof appId === 'string' && typeof appVersion === 'string' && appId.length > 0 && appVersion.length > 0) { - let data = { - action: 'checkVersion', - appid: appId, - appVersion: appVersion, - is_uniapp_x: true, - wgtVersion: '0.0.0.0.0.1' - } - try { - uniCloud.callFunction({ - name: 'uni-upgrade-center', - data: data - }).then(res => { - const code = res.result['code'] - const codeIsNumber = ['Int', 'Long', 'number'].includes(typeof code) - if (codeIsNumber) { - if ((code as number) == 0) { - reject({ - code: res.result['code'], - message: res.result['message'] - }) - } else if ((code as number) < 0) { - reject({ - code: res.result['code'], - message: res.result['message'] - }) - } else { - const result = JSON.parse(JSON.stringify(res.result)) as UniUpgradeCenterResult - resolve(result) - } - } - }).catch((err : any | null) => { - const error = err as UniCloudError - if (error.errMsg == '未匹配到云函数[uni-upgrade-center]') - error.errMsg = '【uni-upgrade-center-app】未配置uni-upgrade-center,无法升级。参考: https://uniapp.dcloud.net.cn/uniCloud/upgrade-center.html' - reject(error.errMsg) - }) - } catch (e) { - reject(e.message) - } - } else { - reject('invalid appid or appVersion') - } - // #endif - }) - // #endif - // #ifndef APP - return new Promise((resolve, reject) => { - reject({ - message: '请在App中使用' - }) - }) - // #endif -} diff --git a/mpuniapp/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js b/mpuniapp/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js deleted file mode 100644 index 6c0d4bc..0000000 --- a/mpuniapp/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js +++ /dev/null @@ -1,184 +0,0 @@ -function callCheckVersion() { - // #ifdef APP-PLUS - return new Promise((resolve, reject) => { - plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) { - let data = { - action: 'checkVersion', - appid: plus.runtime.appid, - appVersion: plus.runtime.version, - wgtVersion: widgetInfo.version - } - uniCloud.callFunction({ - name: 'uni-upgrade-center', - data, - success: (e) => { - resolve(e) - }, - fail: (error) => { - reject(error) - } - }) - }) - }) - // #endif - // #ifndef APP-PLUS - return new Promise((resolve, reject) => {}) - // #endif -} - -// 推荐再App.vue中使用 -const PACKAGE_INFO_KEY = '__package_info__' - -export default function() { - // #ifdef APP-PLUS - return new Promise((resolve, reject) => { - callCheckVersion().then(async (e) => { - if (!e.result) return; - const { - code, - message, - is_silently, // 是否静默更新 - url, // 安装包下载地址 - platform, // 安装包平台 - type // 安装包类型 - } = e.result; - - // 此处逻辑仅为实例,可自行编写 - if (code > 0) { - // 腾讯云和阿里云下载链接不同,需要处理一下,阿里云会原样返回 - const { - fileList - } = await uniCloud.getTempFileURL({ - fileList: [url] - }); - if (fileList[0].tempFileURL) - e.result.url = fileList[0].tempFileURL; - - resolve(e) - - // 静默更新,只有wgt有 - if (is_silently) { - uni.downloadFile({ - url: e.result.url, - success: res => { - if (res.statusCode == 200) { - // 下载好直接安装,下次启动生效 - plus.runtime.install(res.tempFilePath, { - force: false - }); - } - } - }); - return; - } - - /** - * 提示升级一 - * 使用 uni.showModal - */ - // return updateUseModal(e.result) - - /** - * 提示升级二 - * 官方适配的升级弹窗,可自行替换资源适配UI风格 - */ - uni.setStorageSync(PACKAGE_INFO_KEY, e.result) - uni.navigateTo({ - url: `/uni_modules/uni-upgrade-center-app/pages/upgrade-popup?local_storage_key=${PACKAGE_INFO_KEY}`, - fail: (err) => { - console.error('更新弹框跳转失败', err) - uni.removeStorageSync(PACKAGE_INFO_KEY) - } - }) - - return - } else if (code < 0) { - // TODO 云函数报错处理 - console.error(message) - return reject(e) - } - return resolve(e) - }).catch(err => { - // TODO 云函数报错处理 - console.error(err.message) - reject(err) - }) - }); - // #endif -} - -/** - * 使用 uni.showModal 升级 - */ -function updateUseModal(packageInfo) { - const { - title, // 标题 - contents, // 升级内容 - is_mandatory, // 是否强制更新 - url, // 安装包下载地址 - platform, // 安装包平台 - type // 安装包类型 - } = packageInfo; - - let isWGT = type === 'wgt' - let isiOS = !isWGT ? platform.includes('iOS') : false; - let confirmText = isiOS ? '立即跳转更新' : '立即下载更新' - - return uni.showModal({ - title, - content: contents, - showCancel: !is_mandatory, - confirmText, - success: res => { - if (res.cancel) return; - - // 安装包下载 - if (isiOS) { - plus.runtime.openURL(url); - return; - } - - uni.showToast({ - title: '后台下载中……', - duration: 1000 - }); - - // wgt 和 安卓下载更新 - downloadTask = uni.downloadFile({ - url, - success: res => { - if (res.statusCode !== 200) { - console.error('下载安装包失败', err); - return; - } - // 下载好直接安装,下次启动生效 - plus.runtime.install(res.tempFilePath, { - force: false - }, () => { - if (is_mandatory) { - //更新完重启app - plus.runtime.restart(); - return; - } - uni.showModal({ - title: '安装成功是否重启?', - success: res => { - if (res.confirm) { - //更新完重启app - plus.runtime.restart(); - } - } - }); - }, err => { - uni.showModal({ - title: '更新失败', - content: err - .message, - showCancel: false - }); - }); - } - }); - } - }); -} diff --git a/mpuniapp/uni_modules/uni-upgrade-center-app/utils/check-update.ts b/mpuniapp/uni_modules/uni-upgrade-center-app/utils/check-update.ts deleted file mode 100644 index 8c27d17..0000000 --- a/mpuniapp/uni_modules/uni-upgrade-center-app/utils/check-update.ts +++ /dev/null @@ -1,228 +0,0 @@ -import callCheckVersion, { UniUpgradeCenterResult } from "./call-check-version" -import { platform_iOS } from './utils' -// #ifdef UNI-APP-X -import { openSchema } from '@/uni_modules/uts-openSchema' -// #endif - -// 推荐再App.vue中使用 -const PACKAGE_INFO_KEY = '__package_info__' -// #ifdef APP-HARMONY -export default function (component?: any) : Promise { -// #endif -// #ifndef APP-HARMONY -export default function () : Promise { -// #endif - return new Promise((resolve, reject) => { - callCheckVersion().then(async (uniUpgradeCenterResult) => { - // NOTE uni-app x 3.96 解构有问题 - const code = uniUpgradeCenterResult.code - const message = uniUpgradeCenterResult.message - const url = uniUpgradeCenterResult.url // 安装包下载地址 - // 此处逻辑仅为示例,可自行编写 - if (code > 0) { - // 腾讯云获取下载链接 - if (/^cloud:\/\//.test(url)) { - const tcbRes = await uniCloud.getTempFileURL({ fileList: [url] }); - if (typeof tcbRes.fileList[0].tempFileURL !== 'undefined') uniUpgradeCenterResult.url = tcbRes.fileList[0].tempFileURL; - } - - /** - * 提示升级一 - * 使用 uni.showModal - */ - // return updateUseModal(uniUpgradeCenterResult) - - // #ifndef UNI-APP-X - // 静默更新,只有wgt有 - if (uniUpgradeCenterResult.is_silently) { - uni.downloadFile({ - url: uniUpgradeCenterResult.url, - success: res => { - if (res.statusCode == 200) { - // 下载好直接安装,下次启动生效 - plus.runtime.install(res.tempFilePath, { - force: false - }); - } - } - }); - return; - } - // #endif - - /** - * 提示升级二 - * 官方适配的升级弹窗,可自行替换资源适配UI风格 - */ - // #ifndef UNI-APP-X - // #ifdef APP-PLUS - uni.setStorageSync(PACKAGE_INFO_KEY, uniUpgradeCenterResult) - uni.navigateTo({ - url: `/uni_modules/uni-upgrade-center-app/pages/upgrade-popup?local_storage_key=${PACKAGE_INFO_KEY}`, - fail: (err) => { - console.error('更新弹框跳转失败', err) - uni.removeStorageSync(PACKAGE_INFO_KEY) - } - }) - // #endif - // #ifdef APP-HARMONY - if (component) { - component.show(true, uniUpgradeCenterResult) - } else { - reject({ - code: -1, - message: '在 HarmonyOS Next 平台请传递组件使用' - }) - } - // #endif - // #endif - // #ifdef UNI-APP-X - uni.setStorageSync(PACKAGE_INFO_KEY, uniUpgradeCenterResult) - uni.openDialogPage({ - url: `/uni_modules/uni-upgrade-center-app/pages/uni-app-x/upgrade-popup?local_storage_key=${PACKAGE_INFO_KEY}`, - disableEscBack: true, - fail: (err) => { - console.error('更新弹框跳转失败', err) - uni.removeStorageSync(PACKAGE_INFO_KEY) - } - }) - // #endif - - return resolve(uniUpgradeCenterResult) - } else if (code < 0) { - console.error(message) - return reject(uniUpgradeCenterResult) - } - return resolve(uniUpgradeCenterResult) - }).catch((err) => { - reject(err) - }) - }); - } - -/** - * 使用 uni.showModal 升级 - */ -function updateUseModal(packageInfo : UniUpgradeCenterResult) : void { - // #ifdef APP - const { - title, // 标题 - contents, // 升级内容 - is_mandatory, // 是否强制更新 - url, // 安装包下载地址 - type, - platform - } = packageInfo; - - let isWGT = type === 'wgt' - let isiOS = !isWGT ? platform.includes(platform_iOS) : false; - - // #ifndef UNI-APP-X - let confirmText = isiOS ? '立即跳转更新' : '立即下载更新' - // #endif - // #ifdef UNI-APP-X - let confirmText = '立即下载更新' - // #endif - - uni.showModal({ - title, - content: contents, - showCancel: !is_mandatory, - confirmText, - success: res => { - if (res.cancel) return; - - if (isiOS) { - // iOS 平台跳转 AppStore - // #ifndef UNI-APP-X - plus.runtime.openURL(url); - // #endif - // #ifdef UNI-APP-X - openSchema(url) - // #endif - return; - } - - uni.showToast({ - title: '后台下载中……', - duration: 1000 - }); - - // wgt 和 安卓下载更新 - uni.downloadFile({ - url, - success: res => { - if (res.statusCode !== 200) { - console.error('下载安装包失败'); - return; - } - // 下载好直接安装,下次启动生效 - // uni-app x 项目没有 plus5+ 故使用条件编译 - // #ifndef UNI-APP-X - plus.runtime.install(res.tempFilePath, { - force: false - }, () => { - if (is_mandatory) { - //更新完重启app - // #ifdef APP-PLUS - plus.runtime.restart(); - // #endif - // #ifdef APP-HARMONY - uni.showModal({ - title: '安装成功', - content: '请手动重启应用', - showCancel: false, - success: res => { - plus.runtime.quit(); - } - }); - // #endif - return; - } - uni.showModal({ - title: '安装成功是否重启?', - success: res => { - if (res.confirm) { - //更新完重启app - // #ifdef APP-PLUS - plus.runtime.restart(); - // #endif - // #ifdef APP-HARMONY - plus.runtime.quit(); - // #endif - } - } - }); - }, err => { - uni.showModal({ - title: '更新失败', - content: err - .message, - showCancel: false - }); - }); - // #endif - - // #ifdef UNI-APP-X - uni.installApk({ - filePath: res.tempFilePath, - success: () => { - uni.showModal({ - title: '安装成功请手动重启' - }); - }, - fail: err => { - uni.showModal({ - title: '更新失败', - content: err.errMsg, - showCancel: false - }); - } - }); - // #endif - } - }); - } - }); - // #endif -} diff --git a/mpuniapp/uni_modules/uni-upgrade-center-app/utils/utils.ts b/mpuniapp/uni_modules/uni-upgrade-center-app/utils/utils.ts deleted file mode 100644 index 414e096..0000000 --- a/mpuniapp/uni_modules/uni-upgrade-center-app/utils/utils.ts +++ /dev/null @@ -1,46 +0,0 @@ -export const platform_iOS: string = 'iOS'; -export const platform_Android: string = 'Android'; -export const platform_Harmony: string = 'Harmony'; - -/** - * 对比版本号,如需要,请自行修改判断规则 - * 支持比对 ("3.0.0.0.0.1.0.1", "3.0.0.0.0.1") ("3.0.0.1", "3.0") ("3.1.1", "3.1.1.1") 之类的 - * @param {Object} v1 - * @param {Object} v2 - * v1 > v2 return 1 - * v1 < v2 return -1 - * v1 == v2 return 0 - */ -export function compare(v_1: string = '0', v_2: string = '0') { - const v1: string[] = String(v_1).split('.'); - const v2: string[] = String(v_2).split('.'); - const minVersionLens = Math.min(v1.length, v2.length); - - let result = 0; - for (let i = 0; i < minVersionLens; i++) { - const curV1 = Number(v1[i]); - const curV2 = Number(v2[i]); - - if (curV1 > curV2) { - result = 1; - break; - } else if (curV1 < curV2) { - result = -1; - break; - } - } - - if (result === 0 && v1.length !== v2.length) { - const v1BiggerThenv2 = v1.length > v2.length; - const maxLensVersion = v1BiggerThenv2 ? v1 : v2; - for (let i = minVersionLens; i < maxLensVersion.length; i++) { - const curVersion = Number(maxLensVersion[i]); - if (curVersion > 0) { - v1BiggerThenv2 ? (result = 1) : (result = -1); - break; - } - } - } - - return result; -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uni-usercapturescreen/changelog.md b/mpuniapp/uni_modules/uni-usercapturescreen/changelog.md deleted file mode 100644 index 6bb238a..0000000 --- a/mpuniapp/uni_modules/uni-usercapturescreen/changelog.md +++ /dev/null @@ -1,14 +0,0 @@ -## 1.0.6(2024-11-22) -- 修复 HarmonyOS Next 上调用 setUserCaptureScreen 报错的 Bug -## 1.0.5(2024-10-14) -- 新增 支持 HarmonyOS Next 调用 -## 1.0.4(2023-03-24) -新增开启/关闭防截屏功能 -## 1.0.3(2023-03-17) -修复android平台 部分场景下js可能报错的问题 -## 1.0.2(2023-03-16) -修复Android平台在小米设备无法监听的问题 修复Android平台调用uni.onUserCaptureScreen必然会触发回调的问题 -## 1.0.1(2022-10-27) -修改插件描述 -## 1.0.0(2022-10-26) -支持安卓、iOS、微信小程序平台 diff --git a/mpuniapp/uni_modules/uni-usercapturescreen/index.d.ts b/mpuniapp/uni_modules/uni-usercapturescreen/index.d.ts deleted file mode 100644 index dbb3f92..0000000 --- a/mpuniapp/uni_modules/uni-usercapturescreen/index.d.ts +++ /dev/null @@ -1,157 +0,0 @@ -declare namespace UniNamespace { - /** - * uni.onUserCaptureScreen/uni.offUserCaptureScreen回调参数 - */ - type OnUserCaptureScreenCallbackResult = { - /** - * 截屏文件路径(仅Android返回) - */ - path ?: string - } - - /** - * uni.onUserCaptureScreen/uni.offUserCaptureScreen回调函数定义 - */ - type UserCaptureScreenCallback = (res : OnUserCaptureScreenCallbackResult) => void - - type OnUserCaptureScreen = (callback : UserCaptureScreenCallback | null) => void - - type OffUserCaptureScreen = (callback : UserCaptureScreenCallback | null) => void - - /** - * uni.setUserCaptureScreen成功回调参数 - */ - type SetUserCaptureScreenSuccess = { - - } - - /** - * uni.setUserCaptureScreen成功回调函数定义 - */ - type SetUserCaptureScreenSuccessCallback = (res : SetUserCaptureScreenSuccess) => void - - /** - * 错误码 - * - 12001 "setUserCaptureScreen:system not support" - * - 12010 "setUserCaptureScreen:system internal error" - */ - type SetUserCaptureScreenErrorCode = 12001 | 12010; - - /** - * SetUserCaptureScreen 的错误回调参数 - */ - interface SetUserCaptureScreenFail { - errCode : SetUserCaptureScreenErrorCode - } - - /** - * uni.setUserCaptureScreen失败回调函数定义 - */ - type SetUserCaptureScreenFailCallback = (res : SetUserCaptureScreenFail) => void - - /** - * uni.setUserCaptureScreen完成回调函数定义 - */ - type SetUserCaptureScreenCompleteCallback = (res : any) => void - - /** - * uni.setUserCaptureScreen参数 - */ - type SetUserCaptureScreenOptions = { - /** - * true: 允许用户截屏 false: 不允许用户截屏,防止用户截屏到应用页面内容 - */ - enable : boolean; - /** - * 接口调用成功的回调函数 - */ - // success : SetUserCaptureScreenSuccessCallback | null, - success ?: SetUserCaptureScreenSuccessCallback, - /** - * 接口调用失败的回调函数 - */ - // fail : SetUserCaptureScreenFailCallback | null, - fail ?: SetUserCaptureScreenFailCallback, - /** - * 接口调用结束的回调函数(调用成功、失败都会执行) - */ - // complete : SetUserCaptureScreenSuccessCallback | SetUserCaptureScreenFailCallback | null - complete ?: SetUserCaptureScreenCompleteCallback - } - - type SetUserCaptureScreen = (options : SetUserCaptureScreenOptions) => void -} - -declare interface Uni { - /** - * 开启截屏监听 - * - * @param {UserCaptureScreenCallback} callback - * @tutorial https://uniapp.dcloud.net.cn/api/system/capture-screen.html#onusercapturescreen - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "4.4.4", - * "uniVer": "3.7.7", - * "unixVer": "3.9.0" - * }, - * "ios": { - * "osVer": "9.0", - * "uniVer": "3.7.7", - * "unixVer": "x" - * } - * } - * } - * @uniVersion 3.7.7 - * @uniVueVersion 2,3 //支持的vue版本 - * @autotest { expectCallback: true } - */ - onUserCaptureScreen(callback : UniNamespace.UserCaptureScreenCallback | null) : void, - /** - * 关闭截屏监听 - * - * @param {UserCaptureScreenCallback} callback - * @tutorial https://uniapp.dcloud.net.cn/api/system/capture-screen.html#offusercapturescreen - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "4.4.4", - * "uniVer": "3.7.7", - * "unixVer": "3.9.0" - * }, - * "ios": { - * "osVer": "9.0", - * "uniVer": "3.7.7", - * "unixVer": "x" - * } - * } - * } - * @uniVersion 3.7.7 - * @uniVueVersion 2,3 //支持的vue版本 - * @autotest { expectCallback: true } - */ - offUserCaptureScreen(callback : UniNamespace.UserCaptureScreenCallback | null) : void, - /** - * 设置防截屏 - * - * @param {SetUserCaptureScreenOptions} options - * @tutorial https://uniapp.dcloud.net.cn/api/system/capture-screen.html#setusercapturescreen - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "4.4.4", - * "uniVer": "3.7.7", - * "unixVer": "3.9.0" - * }, - * "ios": { - * "osVer": "13.0", - * "uniVer": "3.7.7", - * "unixVer": "x" - * } - * } - * } - * @uniVersion 3.7.7 - * @uniVueVersion 2,3 //支持的vue版本 - */ - setUserCaptureScreen(options : UniNamespace.SetUserCaptureScreenOptions) : void -} diff --git a/mpuniapp/uni_modules/uni-usercapturescreen/package.json b/mpuniapp/uni_modules/uni-usercapturescreen/package.json deleted file mode 100644 index d27fbd6..0000000 --- a/mpuniapp/uni_modules/uni-usercapturescreen/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "id": "uni-usercapturescreen", - "displayName": "uni-usercapturescreen", - "version": "1.0.6", - "description": "用户主动截屏事件监听", - "keywords": [ - "截屏" - ], - "repository": "", - "engines": { - "HBuilderX": "^3.7.7" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "插件不采集任何数据", - "permissions": "无" - }, - "npmurl": "" - }, - "uni_modules": { - "uni-ext-api":{ - "uni": { - "onUserCaptureScreen": { - "web": false - }, - "offUserCaptureScreen": { - "web": false - }, - "setUserCaptureScreen": { - "web": false, - "mp-weixin": false - } - } - }, - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "y", - "aliyun": "y", - "alipay": "n" - }, - "client": { - "Vue": { - "vue2": "y", - "vue3": "y" - }, - "App": { - "app-android": "y", - "app-ios": "y", - "app-harmony": "y" - }, - "H5-mobile": { - "Safari": "n", - "Android Browser": "n", - "微信浏览器(Android)": "n", - "QQ浏览器(Android)": "n" - }, - "H5-pc": { - "Chrome": "n", - "IE": "n", - "Edge": "n", - "Firefox": "n", - "Safari": "n" - }, - "小程序": { - "微信": "y", - "阿里": "n", - "百度": "n", - "字节跳动": "n", - "QQ": "n", - "钉钉": "n", - "快手": "n", - "飞书": "n", - "京东": "n" - }, - "快应用": { - "华为": "n", - "联盟": "n" - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uni-usercapturescreen/readme.md b/mpuniapp/uni_modules/uni-usercapturescreen/readme.md deleted file mode 100644 index eda987a..0000000 --- a/mpuniapp/uni_modules/uni-usercapturescreen/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -# uni-usercapturescreen - -用户主动截屏事件监听 - -### uni.onUserCaptureScreen - -监听用户主动截屏事件,用户使用系统截屏按键截屏时触发此事件。 - -> 使用文档:[https://uniapp.dcloud.net.cn/api/system/capture-screen.html#onusercapturescreen](https://uniapp.dcloud.net.cn/api/system/capture-screen.html#onusercapturescreen) - -### uni.offUserCaptureScreen - -用户主动截屏事件。取消事件监听。 - -> 使用文档:[https://uniapp.dcloud.net.cn/api/system/capture-screen.html#offusercapturescreen](https://uniapp.dcloud.net.cn/api/system/capture-screen.html#offusercapturescreen) - -### uni.setUserCaptureScreen - -开启/关闭防截屏。 - -> 使用文档:[https://uniapp.dcloud.net.cn/api/system/capture-screen.html#setusercapturescreen](https://uniapp.dcloud.net.cn/api/system/capture-screen.html#setusercapturescreen) diff --git a/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/app-android/index.uts b/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/app-android/index.uts deleted file mode 100644 index 97a000e..0000000 --- a/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/app-android/index.uts +++ /dev/null @@ -1,140 +0,0 @@ -import { UTSAndroid } from "io.dcloud.uts"; -import ActivityCompat from "androidx.core.app.ActivityCompat"; -import Manifest from "android.Manifest"; -import PackageManager from "android.content.pm.PackageManager"; -import Build from "android.os.Build"; -import FileObserver from "android.os.FileObserver"; -import File from "java.io.File"; -import Environment from "android.os.Environment"; -import System from 'java.lang.System'; -import WindowManager from 'android.view.WindowManager'; -import { OnUserCaptureScreenCallbackResult, UserCaptureScreenCallback, OnUserCaptureScreen, OffUserCaptureScreen, SetUserCaptureScreenSuccess, SetUserCaptureScreenOptions, SetUserCaptureScreen } from "../interface.uts"; -import string from 'android.R.string'; - - -/** - * 文件监听器 - */ -let observer : ScreenFileObserver | null = null; -/** - * 记录文件监听器上次监听的时间戳,避免重复监听 - */ -let lastObserverTime : number = 0; -/** - * 截屏回调 - */ -let listener : UserCaptureScreenCallback | null = null; - -/** - * android 文件监听实现 - */ -@UTSAndroid.Suppress("DEPRECATION") -class ScreenFileObserver extends FileObserver { - - /** - * 截屏文件目录 - */ - private screenFile : File; - - constructor(screenFileStr : string) { - super(screenFileStr); - this.screenFile = new File(screenFileStr); - } - - override onEvent(event : Int, path : string | null) : void { - // 只监听文件新增事件 - if (event == FileObserver.CREATE) { - if (path != null) { - const currentTime = System.currentTimeMillis(); - if ((currentTime - lastObserverTime) < 1000) { - // 本地截屏行为比上一次超过1000ms, 才认为是一个有效的时间 - return; - } - lastObserverTime = currentTime; - - const screenShotPath = new File(this.screenFile, path).getPath(); - const res : OnUserCaptureScreenCallbackResult = { - path: screenShotPath - } - listener?.(res); - } - } - } -} - -/** - * 开启截图监听 - */ -export const onUserCaptureScreen : OnUserCaptureScreen = function (callback : UserCaptureScreenCallback | null) { - // 检查相关权限是否已授予 - if (ActivityCompat.checkSelfPermission(UTSAndroid.getAppContext()!, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { - // 无权限,申请权限 - ActivityCompat.requestPermissions(UTSAndroid.getUniActivity()!, arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE), 1001); - return; - } - // 更新监听 - listener = callback; - - let directory_screenshot : File; - if (Build.MANUFACTURER.toLowerCase() == "xiaomi") { - // @Suppress("DEPRECATION") - directory_screenshot = new File(new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM), "Screenshots"); - } else { - // @Suppress("DEPRECATION") - directory_screenshot = new File(new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_PICTURES), "Screenshots"); - } - // 先结束监听 再开启监听 - observer?.stopWatching(); - observer = new ScreenFileObserver(directory_screenshot.getPath()); - observer?.startWatching(); - - - UTSAndroid.onAppActivityDestroy(function(){ - observer?.stopWatching() - observer = null - }) - -} - -/** - * 关闭截屏监听 - */ -export const offUserCaptureScreen : OffUserCaptureScreen = function (_ : UserCaptureScreenCallback | null) { - // android10以上,关闭监听通过移除文件监听器实现 - observer?.stopWatching(); - observer = null; - lastObserverTime = 0; -} - -/** - * 设置是否禁止截屏 - */ -export const setUserCaptureScreen : SetUserCaptureScreen = function (option : SetUserCaptureScreenOptions) { - // 切换到UI线程 - UTSAndroid.getUniActivity()?.runOnUiThread(new SetUserCaptureScreenRunnable(option.enable)); - const res : SetUserCaptureScreenSuccess = {} - option.success?.(res); - option.complete?.(res); -} - -class SetUserCaptureScreenRunnable extends Runnable { - - /** - * ture: 允许用户截屏 - * false: 不允许用户截屏,防止用户截屏到应用页面内容 - */ - private enable : boolean; - - constructor(enable : boolean) { - super(); - this.enable = enable; - } - - override run() : void { - if (this.enable) { - UTSAndroid.getUniActivity()?.getWindow()?.clearFlags(WindowManager.LayoutParams.FLAG_SECURE); - } else { - UTSAndroid.getUniActivity()?.getWindow()?.addFlags(WindowManager.LayoutParams.FLAG_SECURE); - } - } -} diff --git a/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/app-harmony/index.uts b/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/app-harmony/index.uts deleted file mode 100644 index 0eeb40d..0000000 --- a/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/app-harmony/index.uts +++ /dev/null @@ -1,87 +0,0 @@ -import { display } from '@kit.ArkUI'; -import { window } from '@kit.ArkUI'; -import { Callback, BusinessError } from '@kit.BasicServicesKit'; - -import { getAbilityContext } from '@dcloudio/uni-runtime'; - -import { - OnUserCaptureScreen, UserCaptureScreenCallback, - OffUserCaptureScreen, - SetUserCaptureScreen, SetUserCaptureScreenOptions, SetUserCaptureScreenSuccess -} from '../interface.uts'; - -const onUserCaptureScreenCallbacks: Function[] = [] - -const harmonyCaptureStatusChange: Callback = (captureStatus: boolean) => { - if (captureStatus) { - onUserCaptureScreenCallbacks.forEach(cb => { - typeof cb === 'function' && cb() - }) - } -} - -display.on('captureStatusChange', harmonyCaptureStatusChange) - -export const onUserCaptureScreen: OnUserCaptureScreen = function (callback: UserCaptureScreenCallback | null) { - if (callback) { - onUserCaptureScreenCallbacks.push(callback) - } -} - -export const offUserCaptureScreen: OffUserCaptureScreen = function (callback: UserCaptureScreenCallback | null) { - if (callback) { - const index = onUserCaptureScreenCallbacks.indexOf(callback) - if (index > -1) { - onUserCaptureScreenCallbacks.splice(index, 1) - } - } -} - -export const setUserCaptureScreen: SetUserCaptureScreen = function (options: SetUserCaptureScreenOptions) { - const errSubject = 'uni-usercapturescreen' - const setUserCaptureScreenSuccess: SetUserCaptureScreenSuccess = {} - window.getLastWindow(getAbilityContext()!, (err, window) => { - const errCode: number = err.code; - if (errCode) { - options.fail?.({ - errCode: (err as BusinessError).code, - errSubject, - errMsg: `setUserCaptureScreen:fail ${(err as BusinessError).message}` - } as IUniError) - options.complete?.(setUserCaptureScreenSuccess); - return; - } else { - try { - UTSHarmony.requestSystemPermission(['ohos.permission.PRIVACY_WINDOW'], (allRight: boolean, _grantedList: string[]) => { - if (allRight) { - window.setWindowPrivacyMode(!options.enable, (err: BusinessError) => { - const errCode: number = err.code; - if (errCode) { - options.fail?.({ - errCode: err.code, - errSubject, - errMsg: `setUserCaptureScreen:fail ${err.message}` - } as IUniError) - options.complete?.(setUserCaptureScreenSuccess); - return; - } - options.success?.(setUserCaptureScreenSuccess); - options.complete?.(setUserCaptureScreenSuccess); - }); - } else { - throw new Error('permission denied') - } - }, (_doNotAskAgain: boolean, _grantedList: string[]) => { - throw new Error('permission denied'); - }) - } catch (err) { - options.fail?.({ - errCode: (err as BusinessError).code, - errSubject, - errMsg: `setUserCaptureScreen:fail ${(err as BusinessError).message}` - } as IUniError) - options.complete?.(setUserCaptureScreenSuccess); - } - } - }) -} diff --git a/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/app-ios/index.uts b/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/app-ios/index.uts deleted file mode 100644 index bb649b4..0000000 --- a/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/app-ios/index.uts +++ /dev/null @@ -1,138 +0,0 @@ -import { NotificationCenter } from 'Foundation'; -import { CGRect } from "CoreFoundation"; -import { UIApplication, UIView, UITextField, UIScreen, UIDevice } from "UIKit" -import { UTSiOS } from "DCloudUTSFoundation" -import { DispatchQueue } from 'Dispatch'; -import { SetUserCaptureScreenOptions, OnUserCaptureScreenCallbackResult, OnUserCaptureScreen, OffUserCaptureScreen, SetUserCaptureScreen, UserCaptureScreenCallback, SetUserCaptureScreenSuccess } from "../interface.uts" -import { SetUserCaptureScreenFailImpl } from "../unierror.uts" -/** - * 定义监听截屏事件工具类 - */ -class CaptureScreenTool { - static listener : UserCaptureScreenCallback | null; - static secureView : UIView | null; - - // 监听截屏 - static listenCaptureScreen(callback : UserCaptureScreenCallback | null) { - this.listener = callback - - // 注册监听截屏事件及回调方法 - // target-action 回调方法需要通过 Selector("方法名") 构建 - const method = Selector("userDidTakeScreenshot") - NotificationCenter.default.addObserver(this, selector = method, name = UIApplication.userDidTakeScreenshotNotification, object = null) - } - - // 捕获截屏回调的方法 - // target-action 的方法前需要添加 @objc 前缀 - @objc static userDidTakeScreenshot() { - // 回调 - const res: OnUserCaptureScreenCallbackResult = { - } - this.listener?.(res) - } - - // 移除监听事件 - static removeListen(callback : UserCaptureScreenCallback | null) { - this.listener = null - NotificationCenter.default.removeObserver(this) - } - - static createSecureView() : UIView | null { - let field = new UITextField(frame = CGRect.zero) - field.isSecureTextEntry = true - if (field.subviews.length > 0 && UIDevice.current.systemVersion != '15.1') { - let view = field.subviews[0] - view.subviews.forEach((item) => { - item.removeFromSuperview() - }) - view.isUserInteractionEnabled = true - return view - } - return null - } - - // 开启防截屏 - static onAntiScreenshot(option : SetUserCaptureScreenOptions) { - // uts方法默认会在子线程中执行,涉及 UI 操作必须在主线程中运行,通过 DispatchQueue.main.async 方法可将代码在主线程中运行 - DispatchQueue.main.async(execute = () : void => { - let secureView = this.createSecureView() - let window = UTSiOS.getKeyWindow() - let rootView = window.rootViewController == null ? null : window.rootViewController!.view - if (secureView != null && rootView != null) { - let rootSuperview = rootView!.superview - if (rootSuperview != null) { - this.secureView = secureView - rootSuperview!.addSubview(secureView!) - rootView!.removeFromSuperview() - secureView!.addSubview(rootView!) - let rect = rootView!.frame - secureView!.frame = UIScreen.main.bounds - rootView!.frame = rect - } - } - let res: SetUserCaptureScreenSuccess = { - } - option.success?.(res) - option.complete?.(res) - }) - } - - // 关闭防截屏 - static offAntiScreenshot(option : SetUserCaptureScreenOptions) { - DispatchQueue.main.async(execute = () : void => { - if (this.secureView != null) { - let window = UTSiOS.getKeyWindow() - let rootView = window.rootViewController == null ? null : window.rootViewController!.view - if (rootView != null && this.secureView!.superview != null) { - let rootSuperview = this.secureView!.superview - if (rootSuperview != null) { - rootSuperview!.addSubview(rootView!) - this.secureView!.removeFromSuperview() - } - } - this.secureView = null - } - let res: SetUserCaptureScreenSuccess = { - } - option.success?.(res) - option.complete?.(res) - }) - } -} - -/** - * 开启截图监听 - */ -export const onUserCaptureScreen : OnUserCaptureScreen = function (callback : UserCaptureScreenCallback | null) { - CaptureScreenTool.listenCaptureScreen(callback) -} - -/** - * 关闭截屏监听 - */ -export const offUserCaptureScreen : OffUserCaptureScreen = function (callback : UserCaptureScreenCallback | null) { - CaptureScreenTool.removeListen(callback) -} - -/** - * 开启/关闭防截屏 - */ -export const setUserCaptureScreen : SetUserCaptureScreen = function (options : SetUserCaptureScreenOptions) { - if (UIDevice.current.systemVersion < "13.0") { - let res = new SetUserCaptureScreenFailImpl(12001) - options.fail?.(res); - options.complete?.(res); - - } else if (UIDevice.current.systemVersion == "15.1") { - let res = new SetUserCaptureScreenFailImpl(12010) - options.fail?.(res); - options.complete?.(res); - } else { - if (options.enable == true) { - CaptureScreenTool.offAntiScreenshot(options) - } else { - CaptureScreenTool.onAntiScreenshot(options) - } - } -} - diff --git a/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/interface.uts b/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/interface.uts deleted file mode 100644 index b4abf42..0000000 --- a/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/interface.uts +++ /dev/null @@ -1,170 +0,0 @@ -/** - * uni.onUserCaptureScreen/uni.offUserCaptureScreen回调参数 - */ - export type OnUserCaptureScreenCallbackResult = { - /** - * 截屏文件路径(仅Android返回) - */ - path ?: string - } - - /** - * uni.onUserCaptureScreen/uni.offUserCaptureScreen回调函数定义 - */ - export type UserCaptureScreenCallback = (res : OnUserCaptureScreenCallbackResult) => void - - export type OnUserCaptureScreen = (callback : UserCaptureScreenCallback | null) => void - - export type OffUserCaptureScreen = (callback : UserCaptureScreenCallback | null) => void - - /** - * uni.setUserCaptureScreen成功回调参数 - */ - export type SetUserCaptureScreenSuccess = { - } - - - /** - * uni.setUserCaptureScreen成功回调函数定义 - */ - export type SetUserCaptureScreenSuccessCallback = (res : SetUserCaptureScreenSuccess) => void - - /** - * uni.setUserCaptureScreen失败回调函数定义 - */ - export type SetUserCaptureScreenFailCallback = (res : IUniError) => void - - /** - * uni.setUserCaptureScreen完成回调函数定义 - */ - export type SetUserCaptureScreenCompleteCallback = (res : any) => void - - /** - * uni.setUserCaptureScreen参数 - */ - - export type SetUserCaptureScreenOptions = { - /** - * true: 允许用户截屏 false: 不允许用户截屏,防止用户截屏到应用页面内容 - */ - enable : boolean; - /** - * 接口调用成功的回调函数 - */ - // success : SetUserCaptureScreenSuccessCallback | null, - success ?: SetUserCaptureScreenSuccessCallback, - /** - * 接口调用失败的回调函数 - */ - // fail : SetUserCaptureScreenFailCallback | null, - fail ?: SetUserCaptureScreenFailCallback, - /** - * 接口调用结束的回调函数(调用成功、失败都会执行) - */ - // complete : SetUserCaptureScreenSuccessCallback | SetUserCaptureScreenFailCallback | null - complete ?: SetUserCaptureScreenCompleteCallback - } - - /** - * 错误码 - * - 12001 "setUserCaptureScreen:system not support" - * - 12010 "setUserCaptureScreen:system internal error" - */ - export type SetUserCaptureScreenErrorCode = 12001 | 12010; - /** - * SetUserCaptureScreen 的错误回调参数 - */ - export interface SetUserCaptureScreenFail extends IUniError { - errCode : SetUserCaptureScreenErrorCode - }; - - export type SetUserCaptureScreen = (options : SetUserCaptureScreenOptions) => void - - export interface Uni { - /** - * 开启截屏监听 - * - * @param {UserCaptureScreenCallback} callback - * @tutorial https://uniapp.dcloud.net.cn/api/system/capture-screen.html#onusercapturescreen - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "4.4.4", - * "uniVer": "3.7.7", - * "unixVer": "3.9.0" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "3.7.7", - * "unixVer": "4.11" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.25", - * "unixVer": "x" - * } - * } - * } - * @uniVersion 3.7.7 - * @uniVueVersion 2,3 //支持的vue版本 - * @autotest { expectCallback: true } - */ - onUserCaptureScreen(callback : UserCaptureScreenCallback | null) : void, - /** - * 关闭截屏监听 - * - * @param {UserCaptureScreenCallback} callback - * @tutorial https://uniapp.dcloud.net.cn/api/system/capture-screen.html#offusercapturescreen - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "4.4.4", - * "uniVer": "3.7.7", - * "unixVer": "3.9.0" - * }, - * "ios": { - * "osVer": "12.0", - * "uniVer": "3.7.7", - * "unixVer": "4.11" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.25",, - * "unixVer": "x" - * } - * } - * } - * @uniVersion 3.7.7 - * @uniVueVersion 2,3 //支持的vue版本 - * @autotest { expectCallback: true } - */ - offUserCaptureScreen(callback : UserCaptureScreenCallback | null) : void, - /** - * 设置防截屏 - * - * @param {SetUserCaptureScreenOptions} options - * @tutorial https://uniapp.dcloud.net.cn/api/system/capture-screen.html#setusercapturescreen - * @uniPlatform { - * "app": { - * "android": { - * "osVer": "4.4.4", - * "uniVer": "3.7.7", - * "unixVer": "3.9.0" - * }, - * "ios": { - * "osVer": "13.0", - * "uniVer": "3.7.7", - * "unixVer": "4.11" - * }, - * "harmony": { - * "osVer": "3.0", - * "uniVer": "4.25", - * "unixVer": "x" - * } - * } - * } - * @uniVersion 3.7.7 - * @uniVueVersion 2,3 //支持的vue版本 - */ - setUserCaptureScreen(options : SetUserCaptureScreenOptions) : void - } diff --git a/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/mp-weixin/index.js b/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/mp-weixin/index.js deleted file mode 100644 index 6aa57b3..0000000 --- a/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/mp-weixin/index.js +++ /dev/null @@ -1,7 +0,0 @@ -export function onUserCaptureScreen (callback) { - return wx.onUserCaptureScreen(callback) -} - -export function offUserCaptureScreen (callback) { - return wx.offUserCaptureScreen(callback) -} diff --git a/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/unierror.uts b/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/unierror.uts deleted file mode 100644 index 0f359a8..0000000 --- a/mpuniapp/uni_modules/uni-usercapturescreen/utssdk/unierror.uts +++ /dev/null @@ -1,35 +0,0 @@ -import { SetUserCaptureScreenErrorCode, SetUserCaptureScreenFail } from "./interface.uts" -/** - * 错误主题 - */ -export const UniErrorSubject = 'uni-usercapturescreen'; - - -/** - * 错误信息 - * @UniError - */ -export const UniErrors : Map = new Map([ - /** - * 错误码及对应的错误信息 - */ - [12001, 'setUserCaptureScreen:system not support'], - [12010, 'setUserCaptureScreen:system internal error'], -]); - - -/** - * 错误对象实现 - */ -export class SetUserCaptureScreenFailImpl extends UniError implements SetUserCaptureScreenFail { - - /** - * 错误对象构造函数 - */ - constructor(errCode : SetUserCaptureScreenErrorCode) { - super(); - this.errSubject = UniErrorSubject; - this.errCode = errCode; - this.errMsg = UniErrors[errCode] ?? ""; - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-button/package.json b/mpuniapp/uni_modules/uts-button/package.json deleted file mode 100644 index 2513e43..0000000 --- a/mpuniapp/uni_modules/uts-button/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "id": "uts-button", - "displayName": "uts-button", - "version": "1.0.0", - "description": "uts-button", - "keywords": [ - "uts-button" -], - "repository": "", - "engines": { - "HBuilderX": "^3.7.0" - }, - "dcloudext": { - "type": "component-uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "", - "data": "", - "permissions": "" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "u", - "aliyun": "u", - "alipay": "u" - }, - "client": { - "Vue": { - "vue2": "u", - "vue3": "u" - }, - "App": { - "app-android": "u", - "app-ios": "u", - "app-harmony": "u" - }, - "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" - }, - "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" - }, - "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-button/readme.md b/mpuniapp/uni_modules/uts-button/readme.md deleted file mode 100644 index f98ba5c..0000000 --- a/mpuniapp/uni_modules/uts-button/readme.md +++ /dev/null @@ -1,7 +0,0 @@ -# uts-button -### 开发文档 -[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html) -[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html) -[UTS uni-app兼容模式组件](https://uniapp.dcloud.net.cn/plugin/uts-component.html) -[UTS 标准模式组件](https://doc.dcloud.net.cn/uni-app-x/plugin/uts-vue-component.html) -[Hello UTS](https://gitcode.net/dcloud/hello-uts) \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-button/utssdk/app-android/index.vue b/mpuniapp/uni_modules/uts-button/utssdk/app-android/index.vue deleted file mode 100644 index a178b62..0000000 --- a/mpuniapp/uni_modules/uts-button/utssdk/app-android/index.vue +++ /dev/null @@ -1,195 +0,0 @@ - - - - - \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-button/utssdk/app-ios/index.vue b/mpuniapp/uni_modules/uts-button/utssdk/app-ios/index.vue deleted file mode 100644 index e0915ee..0000000 --- a/mpuniapp/uni_modules/uts-button/utssdk/app-ios/index.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-dialogpage/package.json b/mpuniapp/uni_modules/uts-dialogpage/package.json deleted file mode 100644 index d655ddf..0000000 --- a/mpuniapp/uni_modules/uts-dialogpage/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "id": "uts-dialogpage", - "displayName": "uts-dialogpage", - "version": "1.0.0", - "description": "uts-dialogpage", - "keywords": [ - "uts-dialogpage" -], - "repository": "", - "engines": { - "HBuilderX": "^3.6.8" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "", - "data": "", - "permissions": "" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "u", - "aliyun": "u", - "alipay": "u" - }, - "client": { - "Vue": { - "vue2": "u", - "vue3": "u" - }, - "App": { - "app-android": "u", - "app-ios": "u" - }, - "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" - }, - "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" - }, - "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-dialogpage/readme.md b/mpuniapp/uni_modules/uts-dialogpage/readme.md deleted file mode 100644 index 7fe7d7d..0000000 --- a/mpuniapp/uni_modules/uts-dialogpage/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -# uts-dialogpage -### 开发文档 -[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html) -[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html) -[UTS 组件插件](https://uniapp.dcloud.net.cn/plugin/uts-component.html) -[Hello UTS](https://gitcode.net/dcloud/hello-uts) \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-dialogpage/utssdk/app-ios/config.json b/mpuniapp/uni_modules/uts-dialogpage/utssdk/app-ios/config.json deleted file mode 100644 index 3312828..0000000 --- a/mpuniapp/uni_modules/uts-dialogpage/utssdk/app-ios/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deploymentTarget": "12" -} diff --git a/mpuniapp/uni_modules/uts-dialogpage/utssdk/app-ios/index.uts b/mpuniapp/uni_modules/uts-dialogpage/utssdk/app-ios/index.uts deleted file mode 100644 index b4aaec2..0000000 --- a/mpuniapp/uni_modules/uts-dialogpage/utssdk/app-ios/index.uts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 引用 iOS 系统库,示例如下: - * import { UIDevice } from "UIKit"; - * [可选实现,按需引入] - */ - -// import {OpenDialogPageOptions,openDialogPage} from "DCloudUTSExtAPI"; - -/* 引入 interface.uts 文件中定义的变量 */ -import { TestOpenDialogPage, TestCloseDialogPage } from '../interface.uts'; - -var curDialogPage : UniPage | null = null -export const testOpenDialogPage : TestOpenDialogPage = function (url:string) { - - // let utsJsonObj : DCloudUTSExtAPI.OpenDialogPageOptions = { - // url:"zhangsan" - // } - console.log("testOpenDialogPage") - - // let option = new OpenDialogPageOptions({ - // url:url - // }) - let option = new OpenDialogPageOptions() - option.url = url - console.log(url) - - option.animationType ="slide-in-left" - // option.parentPage = getCurrentPages()[0] - - option.success = (arg : OpenDialogPageSuccess )=>{ - console.log("success") - } - option.complete = (arg : OpenDialogPageComplete )=>{ - console.log(arg) - } - - option.fail = (arg : OpenDialogPageFail )=>{ - console.log("fail") - } - curDialogPage = uni.openDialogPage(option) -} - -export const testCloseDialogPage : TestCloseDialogPage = function () { - console.log("testCloseDialogPage") - if ( curDialogPage != null ){ - let option = new CloseDialogPageOptions() - option.dialogPage = curDialogPage - - option.success = (arg : CloseDialogPageSuccess )=>{ - console.log("success") - } - option.complete = (arg : CloseDialogPageComplete )=>{ - console.log(arg) - } - - option.fail = (arg : CloseDialogPageFail )=>{ - console.log("fail") - } - uni.closeDialogPage(option) - } -} - -/** - * 更多插件开发的信息详见:https://uniapp.dcloud.net.cn/plugin/uts-plugin.html - */ diff --git a/mpuniapp/uni_modules/uts-dialogpage/utssdk/interface.uts b/mpuniapp/uni_modules/uts-dialogpage/utssdk/interface.uts deleted file mode 100644 index d14ed08..0000000 --- a/mpuniapp/uni_modules/uts-dialogpage/utssdk/interface.uts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * interface.uts - * uts插件接口定义文件,按规范定义接口文件可以在HBuilderX中更好的做到语法提示 - */ -export type TestOpenDialogPage = (url:string)=>void -export type TestCloseDialogPage = ()=>void \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-eventbus/package.json b/mpuniapp/uni_modules/uts-eventbus/package.json deleted file mode 100644 index 6889e7e..0000000 --- a/mpuniapp/uni_modules/uts-eventbus/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "id": "uts-eventbus", - "displayName": "uts-eventbus", - "version": "1.0.0", - "description": "uts-eventbus", - "keywords": [ - "uts-eventbus" -], - "repository": "", - "engines": { - "HBuilderX": "^3.6.8" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "", - "data": "", - "permissions": "" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "u", - "aliyun": "u", - "alipay": "u" - }, - "client": { - "Vue": { - "vue2": "u", - "vue3": "u" - }, - "App": { - "app-android": "u", - "app-ios": "u" - }, - "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" - }, - "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" - }, - "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-eventbus/readme.md b/mpuniapp/uni_modules/uts-eventbus/readme.md deleted file mode 100644 index 7c40512..0000000 --- a/mpuniapp/uni_modules/uts-eventbus/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -# uts-eventbus -### 开发文档 -[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html) -[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html) -[UTS 组件插件](https://uniapp.dcloud.net.cn/plugin/uts-component.html) -[Hello UTS](https://gitcode.net/dcloud/hello-uts) \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-eventbus/utssdk/app-ios/config.json b/mpuniapp/uni_modules/uts-eventbus/utssdk/app-ios/config.json deleted file mode 100644 index 3312828..0000000 --- a/mpuniapp/uni_modules/uts-eventbus/utssdk/app-ios/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deploymentTarget": "12" -} diff --git a/mpuniapp/uni_modules/uts-eventbus/utssdk/app-ios/index.uts b/mpuniapp/uni_modules/uts-eventbus/utssdk/app-ios/index.uts deleted file mode 100644 index a3bc6c3..0000000 --- a/mpuniapp/uni_modules/uts-eventbus/utssdk/app-ios/index.uts +++ /dev/null @@ -1,70 +0,0 @@ - -import { UniUTSJS } from 'DCloudUniappRuntime' -import { NSNumber } from 'Foundation'; - -let MessageChannel : string = "UtsMessage" -var revFromJS = "" - -export function getMessageChannel() : string { - return MessageChannel -} - -export function getRevJsMessage() : string { - return revFromJS -} - -export function emitUtsMessage(arg : string) { - uni.$emit(MessageChannel, arg); -} - -export function emitUtsMessageUTSObject(arg : UTSJSONObject) { - uni.$emit(MessageChannel, arg); -} - -export function emitUtsMessages(arg : UTSJSONObject, arg2 : string ){ - uni.$emit(MessageChannel, arg, arg2); -} - -export function emitUtsMessageNoArgument(){ - uni.$emit(MessageChannel); -} - -var callbackId : NSNumber | null = null -export function onJsMessage (messageChannel : string ) { - revFromJS = "" - if (callbackId != null) { - uni.$off(messageChannel, callbackId!) - callbackId = null - } - callbackId = uni.$on(messageChannel, function (...spreadArgs : Any) { - if (spreadArgs.length > 0) { - let arg0 = JSON.stringify(spreadArgs[0]) - if ( typeof arg0 == "string" ) { - revFromJS = arg0! - } - } - }) -} - -export function onJsMessageOnce (messageChannel : string ) { - revFromJS = "" - uni.$once(messageChannel, function (...spreadArgs : Any) { - if (spreadArgs.length > 0) { - let arg0 = JSON.stringify(spreadArgs[0]) - if ( typeof arg0 == "string" ) { - revFromJS = arg0! - } - } - }) -} - -export function offJsMessage(messageChannel : string) { - if (callbackId != null) { - uni.$off(messageChannel, callbackId!) - callbackId = null - } -} - -export function clearJsMessage() { - revFromJS = "" -} diff --git a/mpuniapp/uni_modules/uts-get-native-view/package.json b/mpuniapp/uni_modules/uts-get-native-view/package.json deleted file mode 100644 index dd594e8..0000000 --- a/mpuniapp/uni_modules/uts-get-native-view/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "id": "uts-get-native-view", - "displayName": "uts-get-native-view", - "version": "1.0.0", - "description": "uts-get-native-view", - "keywords": [ - "uts-get-native-view" -], - "repository": "", - "engines": { - "HBuilderX": "^3.6.8" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "", - "data": "", - "permissions": "" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "u", - "aliyun": "u", - "alipay": "u" - }, - "client": { - "Vue": { - "vue2": "u", - "vue3": "u" - }, - "App": { - "app-android": "u", - "app-ios": "u" - }, - "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" - }, - "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" - }, - "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-get-native-view/readme.md b/mpuniapp/uni_modules/uts-get-native-view/readme.md deleted file mode 100644 index 75600f7..0000000 --- a/mpuniapp/uni_modules/uts-get-native-view/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -# uts-get-native-view -### 开发文档 -[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html) -[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html) -[UTS 组件插件](https://uniapp.dcloud.net.cn/plugin/uts-component.html) -[Hello UTS](https://gitcode.net/dcloud/hello-uts) \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-android/config.json b/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-android/config.json deleted file mode 100644 index bf95925..0000000 --- a/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-android/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "minSdkVersion": "21" -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-android/index.uts b/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-android/index.uts deleted file mode 100644 index afa2d5f..0000000 --- a/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-android/index.uts +++ /dev/null @@ -1,46 +0,0 @@ -import { CanWebViewGoBack, CanWebViewGoForward, HasNativeView, CheckWebViewNativeView, CheckInputNativeView, CheckTextareaNativeView, CheckViewNativeView} from "../interface"; -import WebView from 'android.webkit.WebView'; -import ViewGroup from "android.view.ViewGroup" - -export const canWebViewGoBack : CanWebViewGoBack = function (elementId : string) : boolean { - const view = uni.getElementById(elementId)?.getAndroidView(); - return view == null ? false : view.canGoBack(); -} - -export const canWebViewGoForward : CanWebViewGoForward = function (elementId : string) : boolean { - const view = uni.getElementById(elementId)?.getAndroidView(); - return view == null ? false : view.canGoForward(); -} - -export const hasNativeView : HasNativeView = function (elementId : string) : boolean { - const view = uni.getElementById(elementId)?.getAndroidView(); - return view != null; -} - -export const checkWebViewNativeView: CheckWebViewNativeView = function (elementId : string) : boolean { - //通过getElementById不设置泛型,取值view类型 再通过instanceof校验WebView - const element = uni.getElementById(elementId) - const view = element?.getAndroidView() - if(view != null && view instanceof WebView) { - return true - } - return false; -} - -export const checkInputNativeView: CheckInputNativeView = function (elementId : string) : boolean { - // 使用android.widget.EditText基类获取,如果获取失败则返回null - const view = uni.getElementById(elementId)?.getAndroidView(); - return view != null; -} - -export const checkTextareaNativeView: CheckViewNativeView = function (elementId : string) : boolean { - // 使用android.widget.EditText基类获取,如果获取失败则返回null - const view = uni.getElementById(elementId)?.getAndroidView(); - return view != null; -} - -export const checkViewNativeView: CheckViewNativeView = function (elementId : string) : boolean { - //通过getAndroidView设置泛型直接获取ViewGroup 如果获取失败则返回null - const view = uni.getElementById(elementId)?.getAndroidView(); - return view != null; -} diff --git a/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-harmony/index.uts b/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-harmony/index.uts deleted file mode 100644 index 511ba0f..0000000 --- a/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-harmony/index.uts +++ /dev/null @@ -1,21 +0,0 @@ -import { CanWebViewGoBack, CanWebViewGoForward, HasNativeView, Convert2AbsFullPath } from "../interface"; -import { webview } from '@kit.ArkWeb'; - -export const canWebViewGoBack : CanWebViewGoBack = function (elementId : string) : boolean { - const view = uni.getElementById(elementId)?.getHarmonyController() as webview.WebviewController | null; - return view == null ? false : view.accessBackward(); -} - -export const canWebViewGoForward : CanWebViewGoForward = function (elementId : string) : boolean { - const view = uni.getElementById(elementId)?.getHarmonyController() as webview.WebviewController | null; - return view == null ? false : view.accessForward(); -} - -export const hasNativeView : HasNativeView = function (elementId : string) : boolean { - const view = uni.getElementById(elementId)?.getHarmonyController() as webview.WebviewController | null; - return view != null; -} - -export const convert2AbsFullPath: Convert2AbsFullPath = function (path: string): string { - return UTSHarmony.convert2AbsFullPath(path) -} diff --git a/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-ios/config.json b/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-ios/config.json deleted file mode 100644 index 3312828..0000000 --- a/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-ios/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deploymentTarget": "12" -} diff --git a/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-ios/index.uts b/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-ios/index.uts deleted file mode 100644 index bf47264..0000000 --- a/mpuniapp/uni_modules/uts-get-native-view/utssdk/app-ios/index.uts +++ /dev/null @@ -1,62 +0,0 @@ -import { CanWebViewGoBack, CanWebViewGoForward, HasNativeView, CheckWebViewNativeView, CheckInputNativeView, CheckTextareaNativeView, CheckViewNativeView } from "../interface"; -import { WKWebView } from 'WebKit'; -import { UIView, UITextField, UITextView } from "UIKit" - -export const canWebViewGoBack : CanWebViewGoBack = function (elementId : string) : boolean { - const element = uni.getElementById(elementId) - const view = element?.getIOSView(); - if (view != null && view instanceof WKWebView) { - return (view! as WKWebView).canGoBack; - } - return false; -} - -export const canWebViewGoForward : CanWebViewGoForward = function (elementId : string) : boolean { - const element = uni.getElementById(elementId) - const view = element?.getIOSView(); - if (view != null && view instanceof WKWebView) { - return (view! as WKWebView).canGoForward; - } - return false; -} - -export const hasNativeView : HasNativeView = function (elementId : string) : boolean { - const element = uni.getElementById(elementId) - const view = element?.getIOSView(); - if (view != null && view instanceof WKWebView) { - return true; - } - return false; -} - -export const checkWebViewNativeView : CheckWebViewNativeView = function (elementId : string) : boolean { - return hasNativeView(elementId) -} - -export const checkInputNativeView : CheckInputNativeView = function (elementId : string) : boolean { - const element = uni.getElementById(elementId) - const view = element?.getIOSView(); - if (view != null && view instanceof UITextField) { - return true; - } - return false; -} - -export const checkTextareaNativeView : CheckTextareaNativeView = function (elementId : string) : boolean { - const element = uni.getElementById(elementId) - const view = element?.getIOSView(); - if (view != null && view instanceof UITextView) { - return true; - } - return false; -} - -export const checkViewNativeView : CheckViewNativeView = function (elementId : string) : boolean { - const element = uni.getElementById(elementId) - const view = element?.getIOSView(); - if (view != null && view instanceof UIView) { - return true; - } - return false; -} - diff --git a/mpuniapp/uni_modules/uts-get-native-view/utssdk/interface.uts b/mpuniapp/uni_modules/uts-get-native-view/utssdk/interface.uts deleted file mode 100644 index 086c480..0000000 --- a/mpuniapp/uni_modules/uts-get-native-view/utssdk/interface.uts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * webview页面是否可以后退 - */ -export type CanWebViewGoBack = (elementId : string) => boolean - -/** - * webview页面是否可以前进 - */ -export type CanWebViewGoForward = (elementId : string) => boolean - -/** - * 是否存在原生view - */ -export type HasNativeView = (elementId : string) => boolean - -/** - * 检测web-view标签获取到的原生View是否符合预期的原生View - */ -export type CheckWebViewNativeView = (elementId : string) => boolean - -/** - * 检测input标签获取到的原生View是否符合预期的原生View - */ -export type CheckInputNativeView = (elementId : string) => boolean - -/** - * 检测textarea标签获取到的原生View是否符合预期的原生View - */ -export type CheckTextareaNativeView = (elementId : string) => boolean - -/** - * 检测view标签获取到的原生View是否符合预期的原生View - */ -export type CheckViewNativeView = (elementId : string) => boolean - -export type Convert2AbsFullPath = (path: string) => string diff --git a/mpuniapp/uni_modules/uts-openSchema/changelog.md b/mpuniapp/uni_modules/uts-openSchema/changelog.md deleted file mode 100644 index de1703b..0000000 --- a/mpuniapp/uni_modules/uts-openSchema/changelog.md +++ /dev/null @@ -1,13 +0,0 @@ -## 1.1.3(2025-09-12) -- 鸿蒙平台 新增 打开 url 错误时输出 -- iOS平台 修复 语法报黄问题 -## 1.1.2(2025-03-20) -- 更新 支持鸿蒙 -## 1.1.1(2024-12-16) -- 修复 canOpenURL 在安卓端可能会报类型错误的问题 -## 1.1.0(2024-12-06) -- 新增 canOpenURL UTS API,可用此API判断url是否可以跳转 -## 1.0.1(2024-11-13) -- 修复 Android 打开部分 schema 时没有跳转到目标应用的 Bug -## 1.0.0(2024-04-25) -- 更新 在 Android 和 iOS 上打开链接的 UTS API diff --git a/mpuniapp/uni_modules/uts-openSchema/package.json b/mpuniapp/uni_modules/uts-openSchema/package.json deleted file mode 100644 index 65008f3..0000000 --- a/mpuniapp/uni_modules/uts-openSchema/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "id": "uts-openSchema", - "displayName": "uts-openSchema", - "version": "1.0.0", - "description": "在 Android、iOS、HarmonyOS 上打开链接的 UTS API", - "keywords": [ - "uts-openSchema" - ], - "repository": "https://gitcode.com/dcloud/uni-ui-x", - "engines": { - "HBuilderX": "^4.0", - "uni-app-x": "^4.75" - }, - "directories": { - "example": "../../temps/example_temps" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "darkmode": "x", - "i18n": "x", - "widescreen": "x" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "√", - "aliyun": "√", - "alipay": "√" - }, - "client": { - "uni-app-x": { - "web": { - "safari": "x", - "chrome": "x" - }, - "app": { - "android": { - "extVersion": "1.0.0", - "minVersion": "21" - }, - "ios": { - "extVersion": "1.0.0", - "minVersion": "12" - }, - "harmony": { - "extVersion": "1.1.2", - "minVersion": "5.0.0" - } - }, - "mp": { - "weixin": "x" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uts-openSchema/readme.md b/mpuniapp/uni_modules/uts-openSchema/readme.md deleted file mode 100644 index b31db45..0000000 --- a/mpuniapp/uni_modules/uts-openSchema/readme.md +++ /dev/null @@ -1,57 +0,0 @@ -打开链接,支持: - -1. 打开外部 App -2. 使用浏览器打开链接 -3. 打开地图到指定地点 -4. ... - -## 使用 - -1. 安装此插件 -2. 在要使用的地方 `import` 导入 - ```ts - import { openSchema, canOpenURL } from '@/uni_modules/uts-openSchema' - ``` -3. 直接调用 `openSchema` 方法: - ```ts - // #ifdef UNI-APP-X - // 使用外部浏览器打开指定URL - openSchema('https://uniapp.dcloud.io/uni-app-x') - - // #ifdef APP-ANDROID - // Android 使用应用商店打开指定App - openSchema('market://details?id=com.tencent.mm') - - // Android 打开地图坐标 - // 可以先用canOpenURL判断是否安装了地图软件 - if (canOpenURL('androidamap://')) { - openSchema('androidamap://viewMap?sourceApplication=Hello%20uni-app&poiname=DCloud&lat=39.9631018208&lon=116.3406135236&dev=0') - } else { - console.log('未安装高德地图') - } - // #endif --> - - // #ifdef APP-IOS - // 打开 AppStore 到搜索页 - openSchema('itms-apps://search.itunes.apple.com//WebObjects//MZSearch.woa/wa/search?media=software<erm=') - - // 打开 iOS 地图坐标 - openSchema('http://maps.apple.com/?q=Mexican+Restaurant&sll=50.894967,4.341626&z=10&t=s') - // #endif --> - - // #endif --> - ``` - -### 参数 - -- openSchema(url: string) // `url`:要打开的链接 `必填` `不为空字符串` - -## 相关开发文档 - -[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html) - -[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html) - -[UTS 组件插件](https://uniapp.dcloud.net.cn/plugin/uts-component.html) - -[Hello UTS](https://gitcode.net/dcloud/hello-uts) diff --git a/mpuniapp/uni_modules/uts-openSchema/utssdk/app-android/config.json b/mpuniapp/uni_modules/uts-openSchema/utssdk/app-android/config.json deleted file mode 100644 index 5defc8f..0000000 --- a/mpuniapp/uni_modules/uts-openSchema/utssdk/app-android/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "minSdkVersion": "21" -} diff --git a/mpuniapp/uni_modules/uts-openSchema/utssdk/app-android/index.uts b/mpuniapp/uni_modules/uts-openSchema/utssdk/app-android/index.uts deleted file mode 100644 index ae2f7de..0000000 --- a/mpuniapp/uni_modules/uts-openSchema/utssdk/app-android/index.uts +++ /dev/null @@ -1,27 +0,0 @@ -import Intent from 'android.content.Intent' -import Uri from 'android.net.Uri' -import { OpenSchema, CanOpenURL } from '../interface.uts' - -export const openSchema : OpenSchema = function (url : string) { - if (canOpenURL(url)) { - const context = UTSAndroid.getUniActivity()! - const uri = Uri.parse(url) - const intent = new Intent(Intent.ACTION_VIEW, uri) - intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - intent.setData(uri) - context.startActivity(intent) - } else { - console.error('[uts-openSchema] url param Error:', JSON.stringify(url)) - } -} - -export const canOpenURL : CanOpenURL = function (url : string) : boolean { - if (typeof url === 'string' && url.length > 0) { - const context = UTSAndroid.getUniActivity()! - const uri = Uri.parse(url) - const intent = new Intent(Intent.ACTION_VIEW, uri) - return intent.resolveActivity(context.packageManager) != null ? true : false - } else { - return false - } -} diff --git a/mpuniapp/uni_modules/uts-openSchema/utssdk/app-harmony/index.uts b/mpuniapp/uni_modules/uts-openSchema/utssdk/app-harmony/index.uts deleted file mode 100644 index 06eedc5..0000000 --- a/mpuniapp/uni_modules/uts-openSchema/utssdk/app-harmony/index.uts +++ /dev/null @@ -1,19 +0,0 @@ -import { bundleManager, common } from '@kit.AbilityKit' -import OpenLinkOptions from '@ohos.app.ability.OpenLinkOptions' -import { getAbilityContext } from '@dcloudio/uni-runtime' -import { OpenSchema, CanOpenURL } from '../interface.uts' - -export const openSchema : OpenSchema = function (url : string) : void { - ;(getAbilityContext() as common.UIAbilityContext)?.openLink(url, { - appLinkingOnly: false - } as OpenLinkOptions) -} - -export const canOpenURL : CanOpenURL = function (url : string) : boolean { - try { - return bundleManager.canOpenLink(url) - } catch (error) { - console.error('[uts-openSchema] url param Error:', JSON.stringify(url)) - return false - } -} diff --git a/mpuniapp/uni_modules/uts-openSchema/utssdk/app-ios/config.json b/mpuniapp/uni_modules/uts-openSchema/utssdk/app-ios/config.json deleted file mode 100644 index 86b8f0b..0000000 --- a/mpuniapp/uni_modules/uts-openSchema/utssdk/app-ios/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deploymentTarget": "12.0" -} diff --git a/mpuniapp/uni_modules/uts-openSchema/utssdk/app-ios/index.uts b/mpuniapp/uni_modules/uts-openSchema/utssdk/app-ios/index.uts deleted file mode 100644 index 9adaf48..0000000 --- a/mpuniapp/uni_modules/uts-openSchema/utssdk/app-ios/index.uts +++ /dev/null @@ -1,22 +0,0 @@ -import { UIApplication } from 'UIKit' -import { URL } from 'Foundation' -import { OpenSchema, CanOpenURL } from '../interface.uts' - -export const openSchema : OpenSchema = function (url : string) : void { - if (canOpenURL(url)) { - let uri = new URL(string = url) - UIApplication.shared.open(uri!) - } else { - console.error('[uts-openSchema] url param Error: ', url) - } -} - -export const canOpenURL : CanOpenURL = function (url : string) : boolean { - if (typeof url == 'string' && url.length > 0) { - let uri = new URL(string = url) - if (uri != null && UIApplication.shared.canOpenURL(uri!)) { - return true - } - } - return false -} diff --git a/mpuniapp/uni_modules/uts-openSchema/utssdk/interface.uts b/mpuniapp/uni_modules/uts-openSchema/utssdk/interface.uts deleted file mode 100644 index 2b599ac..0000000 --- a/mpuniapp/uni_modules/uts-openSchema/utssdk/interface.uts +++ /dev/null @@ -1,2 +0,0 @@ -export type OpenSchema = (url : string) => void -export type CanOpenURL = (url : string) => boolean diff --git a/mpuniapp/uni_modules/uts-openSchema/utssdk/web/index.uts b/mpuniapp/uni_modules/uts-openSchema/utssdk/web/index.uts deleted file mode 100644 index 7410334..0000000 --- a/mpuniapp/uni_modules/uts-openSchema/utssdk/web/index.uts +++ /dev/null @@ -1,12 +0,0 @@ -import { OpenSchema, CanOpenURL } from '../interface.uts' - -export const openSchema : OpenSchema = function (url : string) : void { - location.href = url -} - -export const canOpenURL : CanOpenURL = function (url : string) : boolean { - if (url != '') { - return true - } - return false -} diff --git a/mpuniapp/uni_modules/uts-progressNotification/changelog.md b/mpuniapp/uni_modules/uts-progressNotification/changelog.md deleted file mode 100644 index 5756875..0000000 --- a/mpuniapp/uni_modules/uts-progressNotification/changelog.md +++ /dev/null @@ -1,26 +0,0 @@ -## 1.1.1(2024-09-03) -去除TypeScript警告 -## 1.1.0(2024-03-08) -修复uniapp打包报错问题 -## 1.0.9(2024-02-29) -去除代码过时警告 -## 1.0.8(2023-12-21) -去除app-ios目录 -## 1.0.7(2023-12-11) -去除无用代码 -## 1.0.6(2023-12-11) -修改文档 -## 1.0.5(2023-12-11) -1.修改插件名称 -2.修改插件引入方式为import导入 -## 1.0.4(2023-11-30) -1. createNotificationProgress增加`onClick`回调 -2.修复在小米部分系统上,通知消息会归类于不重要通知的bug -## 1.0.3(2023-11-28) -更新截图 -## 1.0.2(2023-11-28) -修改资源的包名 -## 1.0.1(2023-11-28) -更新文档 -## 1.0.0(2023-11-28) -Android通知栏显示进度插件 diff --git a/mpuniapp/uni_modules/uts-progressNotification/package.json b/mpuniapp/uni_modules/uts-progressNotification/package.json deleted file mode 100644 index 81cadc4..0000000 --- a/mpuniapp/uni_modules/uts-progressNotification/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "id": "uts-progressNotification", - "displayName": "uts-progressNotification", - "version": "1.1.1", - "description": "uts-progressNotification", - "keywords": [ - "progressNotification" -], - "repository": "", - "engines": { - "HBuilderX": "^3.91" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "插件不采集任何数据", - "permissions": "TargetSDKVersion33以上时需配置\n`android.permission.POST_NOTIFICATIONS`" - }, - "npmurl": "" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "y", - "aliyun": "y", - "alipay": "n" - }, - "client": { - "Vue": { - "vue2": "y", - "vue3": "y" - }, - "App": { - "app-android": { - "minVersion": "19" - }, - "app-ios": "n" - }, - "H5-mobile": { - "Safari": "n", - "Android Browser": "n", - "微信浏览器(Android)": "n", - "QQ浏览器(Android)": "n" - }, - "H5-pc": { - "Chrome": "n", - "IE": "n", - "Edge": "n", - "Firefox": "n", - "Safari": "n" - }, - "小程序": { - "微信": "n", - "阿里": "n", - "百度": "n", - "字节跳动": "n", - "QQ": "n", - "钉钉": "n", - "快手": "n", - "飞书": "n", - "京东": "n" - }, - "快应用": { - "华为": "n", - "联盟": "n" - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uts-progressNotification/readme.md b/mpuniapp/uni_modules/uts-progressNotification/readme.md deleted file mode 100644 index 70e8d79..0000000 --- a/mpuniapp/uni_modules/uts-progressNotification/readme.md +++ /dev/null @@ -1,71 +0,0 @@ -# uts-progressNotification - -## 使用说明 - -Android平台创建显示进度的通知栏消息 - -**注意: 需要自定义基座,否则点击通知栏消息不会拉起应用** - -### 导入 - -需要import导入插件 - -### createNotificationProgress(options : CreateNotificationProgressOptions) : void, - -创建显示进度的通知栏消息 - -参数说明 - -``` -export type CreateNotificationProgressOptions = { - /** - * 通知标题 - * @defaultValue 应用名称 - */ - title ?: string | null - /** - * 通知内容 - */ - content : string, - /** - * 进度 - */ - progress : number, - /** - * 点击通知消息回调 - * @defaultValue null - */ - onClick? : (() => void) | null -} -``` - -### finishNotificationProgress(options: FinishNotificationProgressOptions) : void - -完成时调用的API,比如下载完成后需要显示下载完成并隐藏进度时调用。 - -参数说明 - - -``` -export type FinishNotificationProgressOptions = { - /** - * 通知标题 - * @defaultValue 应用名称 - */ - title ?: string | null - /** - * 通知内容 - */ - content : string, - /** - * 点击通知消息回调 - */ - onClick : () => void -} -``` - - -### cancelNotificationProgress() : void - -取消通知消息显示 - diff --git a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/AndroidManifest.xml b/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/AndroidManifest.xml deleted file mode 100644 index bcc33ab..0000000 --- a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/AndroidManifest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/TransparentActivity.uts b/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/TransparentActivity.uts deleted file mode 100644 index 06fe1bc..0000000 --- a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/TransparentActivity.uts +++ /dev/null @@ -1,62 +0,0 @@ -import Activity from "android.app.Activity"; -import Bundle from 'android.os.Bundle'; -import Build from 'android.os.Build'; -import View from 'android.view.View'; -import Color from 'android.graphics.Color'; -import WindowManager from 'android.view.WindowManager'; -import { getGlobalNotificationProgressCallBack, getGlobalNotificationProgressFinishCallBack, setGlobalNotificationProgressCallBack, setGlobalNotificationProgressFinishCallBack} from './callbacks.uts'; -import { ACTION_DOWNLOAD_FINISH, ACTION_DOWNLOAD_PROGRESS } from "./constant.uts" - - -export class TransparentActivity extends Activity { - constructor() { - super() - } - - @Suppress("DEPRECATION") - override onCreate(savedInstanceState : Bundle | null) { - super.onCreate(savedInstanceState) - this.fullScreen(this) - const action = this.getIntent().getAction() - if (action == ACTION_DOWNLOAD_FINISH) { - setTimeout(() => { - getGlobalNotificationProgressFinishCallBack()?.() - setGlobalNotificationProgressFinishCallBack(() => { }) - }, 100) - this.overridePendingTransition(0, 0) - } - - if (action == ACTION_DOWNLOAD_PROGRESS) { - setTimeout(() => { - getGlobalNotificationProgressCallBack()?.() - setGlobalNotificationProgressCallBack(() => { }) - }, 100) - this.overridePendingTransition(0, 0) - } - - setTimeout(() => { - this.finish() - }, 20) - } - - - @Suppress("DEPRECATION") - private fullScreen(activity : Activity) { - if (Build.VERSION.SDK_INT >= 19) { - if (Build.VERSION.SDK_INT >= 21) { - const window = activity.getWindow(); - const decorView = window.getDecorView(); - const option = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE; - decorView.setSystemUiVisibility(option); - window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - window.setStatusBarColor(Color.TRANSPARENT); - } else { - const window = activity.getWindow(); - const attributes = window.getAttributes(); - const flagTranslucentStatus = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS; - attributes.flags |= flagTranslucentStatus; - window.setAttributes(attributes); - } - } - } -} diff --git a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/callbacks.uts b/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/callbacks.uts deleted file mode 100644 index 5dacea6..0000000 --- a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/callbacks.uts +++ /dev/null @@ -1,19 +0,0 @@ -let globalNotificationProgressCallBack : (() => void) | null = () => { } -let globalNotificationProgressFinishCallBack : (() => void) | null = () => { } - -export function setGlobalNotificationProgressCallBack(callBack : (() => void) | null) : void { - globalNotificationProgressCallBack = callBack -} - -export function getGlobalNotificationProgressCallBack() : (() => void) | null { - return globalNotificationProgressCallBack -} - - -export function setGlobalNotificationProgressFinishCallBack(callBack : (() => void) | null) : void { - globalNotificationProgressFinishCallBack = callBack -} - -export function getGlobalNotificationProgressFinishCallBack() : (() => void) | null { - return globalNotificationProgressFinishCallBack -} diff --git a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/config.json b/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/config.json deleted file mode 100644 index 7ed4299..0000000 --- a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "minSdkVersion": "19" -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/constant.uts b/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/constant.uts deleted file mode 100644 index e89c210..0000000 --- a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/constant.uts +++ /dev/null @@ -1,2 +0,0 @@ -export const ACTION_DOWNLOAD_FINISH = "ACTION_DOWNLOAD_FINISH" -export const ACTION_DOWNLOAD_PROGRESS = "ACTION_DOWNLOAD_PROGRESS" \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/index.uts b/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/index.uts deleted file mode 100644 index 2c84807..0000000 --- a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/index.uts +++ /dev/null @@ -1,159 +0,0 @@ -import Build from 'android.os.Build'; -import Context from 'android.content.Context'; -import NotificationManager from 'android.app.NotificationManager'; -import NotificationChannel from 'android.app.NotificationChannel'; -import Notification from 'android.app.Notification'; -import Intent from 'android.content.Intent'; -import ComponentName from 'android.content.ComponentName'; -import PendingIntent from 'android.app.PendingIntent'; -import { CreateNotificationProgressOptions, FinishNotificationProgressOptions } from '../interface.uts'; -import { ACTION_DOWNLOAD_FINISH, ACTION_DOWNLOAD_PROGRESS } from "./constant.uts" - -import { setGlobalNotificationProgressCallBack, setGlobalNotificationProgressFinishCallBack } from './callbacks.uts'; - -export { TransparentActivity } from './TransparentActivity.uts'; - - -const DOWNLOAD_PROGRESS_NOTIFICATION_ID : Int = 7890 -const DC_DOWNLOAD_CHANNEL_ID = "下载文件" -const DC_DOWNLOAD_CHANNEL_NAME = "应用升级更新" - - -let notificationBuilder : Notification.Builder | null = null - -let timeId = -1 - -let histroyProgress = 0 - -let isProgress = false - - - -export function createNotificationProgress(options : CreateNotificationProgressOptions) : void { - const { content, progress, onClick } = options - - if (progress == 100) { - clearTimeout(timeId) - const context = UTSAndroid.getAppContext() as Context - realCreateNotificationProgress(options.title ?? getAppName(context), content, progress, onClick) - reset() - return - } - - histroyProgress = progress - if (timeId != -1) { - return - } - - const context = UTSAndroid.getAppContext() as Context - if (!isProgress) { - realCreateNotificationProgress(options.title ?? getAppName(context), content, histroyProgress, onClick) - isProgress = true - } else { - timeId = setTimeout(() => { - realCreateNotificationProgress(options.title ?? getAppName(context), content, histroyProgress, onClick) - timeId = -1 - }, 1000) - } -} - - -export function cancelNotificationProgress() : void { - const context = UTSAndroid.getAppContext() as Context - const notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager - notificationManager.cancel(DOWNLOAD_PROGRESS_NOTIFICATION_ID) - reset() -} - - -function realCreateNotificationProgress(title : string, content : string, progress : number, cb : (() => void) | null) : void { - setGlobalNotificationProgressCallBack(cb) - const context = UTSAndroid.getAppContext() as Context - const notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager - createDownloadChannel(notificationManager) - const builder = createNotificationBuilder(context) - builder.setProgress(100, progress.toInt(), false) - builder.setContentTitle(title) - builder.setContentText(content) - builder.setContentIntent(createPendingIntent(context, ACTION_DOWNLOAD_PROGRESS)); - notificationManager.notify(DOWNLOAD_PROGRESS_NOTIFICATION_ID, builder.build()) -} - - -export function finishNotificationProgress(options : FinishNotificationProgressOptions) { - setGlobalNotificationProgressFinishCallBack(options.onClick) - const context = UTSAndroid.getAppContext() as Context - const notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager - createDownloadChannel(notificationManager) - const builder = createNotificationBuilder(context) - builder.setProgress(0, 0, false) - builder.setContentTitle(options.title ?? getAppName(context)) - builder.setContentText(options.content) - //小米rom setOngoing未false的时候,会被通知管理器归为不重要通知 - // builder.setOngoing(false) - builder.setAutoCancel(true); - builder.setContentIntent(createPendingIntent(context, ACTION_DOWNLOAD_FINISH)); - notificationManager.notify(DOWNLOAD_PROGRESS_NOTIFICATION_ID, builder.build()) - reset() -} - -function reset() { - isProgress = false - notificationBuilder = null - histroyProgress = 0 - if (timeId != -1) { - clearTimeout(timeId) - timeId = -1 - } -} - - - -function createPendingIntent(context : Context, action : string) : PendingIntent { - const i = new Intent(action); - i.setComponent(new ComponentName(context.getPackageName(), "uts.sdk.modules.utsProgressNotification.TransparentActivity")); - let flags = PendingIntent.FLAG_ONE_SHOT; - if (Build.VERSION.SDK_INT >= 23) { - flags = PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE; - } - return PendingIntent.getActivity(context, DOWNLOAD_PROGRESS_NOTIFICATION_ID, i, flags); -} - - -function createDownloadChannel(notificationManager : NotificationManager) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - const channel = new NotificationChannel( - DC_DOWNLOAD_CHANNEL_ID, - DC_DOWNLOAD_CHANNEL_NAME, - NotificationManager.IMPORTANCE_LOW - ) - notificationManager.createNotificationChannel(channel) - } -} -@Suppress("DEPRECATION") -function createNotificationBuilder(context : Context) : Notification.Builder { - if (notificationBuilder == null) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - notificationBuilder = new Notification.Builder(context, DC_DOWNLOAD_CHANNEL_ID) - } else { - notificationBuilder = new Notification.Builder(context) - } - notificationBuilder!.setSmallIcon(context.getApplicationInfo().icon) - notificationBuilder!.setOngoing(true) - notificationBuilder!.setSound(null) - } - return notificationBuilder! -} - -@Suppress("DEPRECATION") -function getAppName(context : Context) : string { - let appName = "" - try { - const packageManager = context.getPackageManager() - const applicationInfo = packageManager.getApplicationInfo(context.getPackageName(), 0) - appName = packageManager.getApplicationLabel(applicationInfo) as string - } catch (e : Exception) { - e.printStackTrace() - } - return appName -} diff --git a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/res/values/notification_progress_styles.xml b/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/res/values/notification_progress_styles.xml deleted file mode 100644 index cc01105..0000000 --- a/mpuniapp/uni_modules/uts-progressNotification/utssdk/app-android/res/values/notification_progress_styles.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-progressNotification/utssdk/interface.uts b/mpuniapp/uni_modules/uts-progressNotification/utssdk/interface.uts deleted file mode 100644 index 7d68ffe..0000000 --- a/mpuniapp/uni_modules/uts-progressNotification/utssdk/interface.uts +++ /dev/null @@ -1,46 +0,0 @@ -export type CreateNotificationProgressOptions = { - /** - * 通知标题 - * @defaultValue 应用名称 - */ - title ?: string | null - /** - * 通知内容 - */ - content : string, - /** - * 进度 - */ - progress : number, - /** - * 点击通知消息回调 - * @defaultValue null - */ - onClick? : (() => void) | null -} - - -export type FinishNotificationProgressOptions = { - /** - * 通知标题 - * @defaultValue 应用名称 - */ - title ?: string | null - /** - * 通知内容 - */ - content : string, - /** - * 点击通知消息回调 - */ - onClick : () => void -} - - -export type CreateNotificationProgress = (options : CreateNotificationProgressOptions) => void; - - -export type CancelNotificationProgress = () => void; - - -export type FinishNotificationProgress = (options: FinishNotificationProgressOptions) => void diff --git a/mpuniapp/uni_modules/uts-worker-sendable-transfer/package.json b/mpuniapp/uni_modules/uts-worker-sendable-transfer/package.json deleted file mode 100644 index f2089b5..0000000 --- a/mpuniapp/uni_modules/uts-worker-sendable-transfer/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "id": "uts-worker-sendable-transfer", - "displayName": "uts-worker-sendable-transfer", - "version": "1.0.0", - "description": "uts-worker-sendable-transfer", - "keywords": [ - "uts-worker-sendable-transfer" - ], - "repository": "", - "engines": { - "HBuilderX": "^3.6.8", - "uni-app": "^3.1.0", - "uni-app-x": "^3.1.0" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "", - "data": "", - "permissions": "" - }, - "npmurl": "", - "darkmode": "-", - "i18n": "-", - "widescreen": "-" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "-", - "aliyun": "-", - "alipay": "-" - }, - "client": { - "uni-app": { - "vue": { - "vue2": "-", - "vue3": "-" - }, - "web": { - "safari": "-", - "chrome": "-" - }, - "app": { - "vue": "-", - "nvue": "-", - "android": "-", - "ios": "-", - "harmony": "-" - }, - "mp": { - "weixin": "-", - "alipay": "-", - "toutiao": "-", - "baidu": "-", - "kuaishou": "-", - "jd": "-", - "harmony": "-", - "qq": "-", - "lark": "-" - }, - "quickapp": { - "huawei": "-", - "union": "-" - } - }, - "uni-app-x": { - "web": { - "safari": "-", - "chrome": "-" - }, - "app": { - "android": "-", - "ios": "-", - "harmony": "-" - }, - "mp": { - "weixin": "-" - } - } - } - } - } -} \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-worker-sendable-transfer/readme.md b/mpuniapp/uni_modules/uts-worker-sendable-transfer/readme.md deleted file mode 100644 index 80c89b6..0000000 --- a/mpuniapp/uni_modules/uts-worker-sendable-transfer/readme.md +++ /dev/null @@ -1,7 +0,0 @@ -# uts-worker-sendable-transfer -### 开发文档 -[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html) -[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html) -[UTS uni-app兼容模式组件](https://uniapp.dcloud.net.cn/plugin/uts-component.html) -[UTS 标准模式组件](https://doc.dcloud.net.cn/uni-app-x/plugin/uts-vue-component.html) -[Hello UTS](https://gitcode.net/dcloud/hello-uts) \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-worker-sendable-transfer/utssdk/index.uts b/mpuniapp/uni_modules/uts-worker-sendable-transfer/utssdk/index.uts deleted file mode 100644 index 7e695bd..0000000 --- a/mpuniapp/uni_modules/uts-worker-sendable-transfer/utssdk/index.uts +++ /dev/null @@ -1,78 +0,0 @@ -import { UTSWorkerAddListenerOptions, UTSWorkerAddListenerOptionsSuccess, UTSWorkerSendWorkerMessageOptions } from './interface.uts'; -// #ifdef APP-HARMONY -import { SendableObject } from './sendable.ets'; -// #endif - -export * from './interface.uts'; - -type WorkerPostMessageOptions = { - harmonySendable ?: boolean - transfer ?: any[] -} - -export class UTSSendableWorkerImpl { - private workerImp : Worker | null = null; - private options : UTSWorkerAddListenerOptions | null = null; - - create() { - if (this.workerImp != null) { - console.warn('[UTS Plugin] Worker已存在,先销毁旧的Worker'); - this.destroy(); - } - - console.log('[UTS Plugin] 创建Worker'); - const worker = uni.createWorker('workers/sendableTransferWorker.uts'); - this.workerImp = worker; - } - - sendMessage(options : UTSWorkerSendWorkerMessageOptions) { - if (this.workerImp == null) { - console.error('Worker未创建,无法发送消息'); - return; - } - - let message = options.message; - const harmonySendable = options.harmonySendable; - const transfer = options.transfer; - - console.log(`[UTS Plugin] 向Worker发送消息: ${message}`); - - // #ifdef APP-HARMONY - if (harmonySendable) { - message = new SendableObject(); - } - // #endif - this.workerImp!.postMessage(message, { - harmonySendable, - transfer - } as WorkerPostMessageOptions); - } - - onMessage(options : UTSWorkerAddListenerOptions) { - if (this.workerImp == null) { - console.error('Worker未创建,无法监听消息'); - return; - } - - this.options = options; - this.workerImp!.onMessage((result) => { - // 处理Worker返回的消息 - console.log(`[UTS Plugin] 收到Worker消息:`, result); - - if (this.options != null && this.options.success != null) { - let success : UTSWorkerAddListenerOptionsSuccess = { - result: result as UTSJSONObject - } - this.options.success(success); - } - }) - } - destroy() { - if (this.workerImp != null) { - console.log('[UTS Plugin] 销毁Worker'); - this.workerImp.terminate(); - this.workerImp = null; - this.options = null; - } - } -} diff --git a/mpuniapp/uni_modules/uts-worker-sendable-transfer/utssdk/interface.uts b/mpuniapp/uni_modules/uts-worker-sendable-transfer/utssdk/interface.uts deleted file mode 100644 index 5838d71..0000000 --- a/mpuniapp/uni_modules/uts-worker-sendable-transfer/utssdk/interface.uts +++ /dev/null @@ -1,15 +0,0 @@ -export type UTSWorkerAddListenerOptions = { - success ?: UTSWorkerReceiveEventCallback -} - -export type UTSWorkerAddListenerOptionsSuccess = { - result : UTSJSONObject -} - -export type UTSWorkerSendWorkerMessageOptions = { - message : Object, - harmonySendable ?: boolean - transfer ?: ArrayBuffer[] -} - -export type UTSWorkerReceiveEventCallback = (callback : UTSWorkerAddListenerOptionsSuccess) => void diff --git a/mpuniapp/uni_modules/uts-worker-sendable-transfer/utssdk/sendable.ets b/mpuniapp/uni_modules/uts-worker-sendable-transfer/utssdk/sendable.ets deleted file mode 100644 index 6051c13..0000000 --- a/mpuniapp/uni_modules/uts-worker-sendable-transfer/utssdk/sendable.ets +++ /dev/null @@ -1,4 +0,0 @@ -@Sendable -export class SendableObject { - a: number = 45; -} diff --git a/mpuniapp/uni_modules/uts-worker/package.json b/mpuniapp/uni_modules/uts-worker/package.json deleted file mode 100644 index e366eec..0000000 --- a/mpuniapp/uni_modules/uts-worker/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "id": "uts-worker", - "displayName": "uts-worker", - "version": "1.0.0", - "description": "uts-worker", - "keywords": [ - "uts-worker" - ], - "repository": "", - "engines": { - "HBuilderX": "^3.6.8", - "uni-app": "^3.1.0", - "uni-app-x": "^3.1.0" - }, - "dcloudext": { - "type": "uts", - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "", - "data": "", - "permissions": "" - }, - "npmurl": "", - "darkmode": "-", - "i18n": "-", - "widescreen": "-" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "-", - "aliyun": "-", - "alipay": "-" - }, - "client": { - "uni-app": { - "vue": { - "vue2": "-", - "vue3": "-" - }, - "web": { - "safari": "-", - "chrome": "-" - }, - "app": { - "vue": "-", - "nvue": "-", - "android": "-", - "ios": "-", - "harmony": "-" - }, - "mp": { - "weixin": "-", - "alipay": "-", - "toutiao": "-", - "baidu": "-", - "kuaishou": "-", - "jd": "-", - "harmony": "-", - "qq": "-", - "lark": "-" - }, - "quickapp": { - "huawei": "-", - "union": "-" - } - }, - "uni-app-x": { - "web": { - "safari": "-", - "chrome": "-" - }, - "app": { - "android": "-", - "ios": "-", - "harmony": "-" - }, - "mp": { - "weixin": "-" - } - } - } - } - } -} diff --git a/mpuniapp/uni_modules/uts-worker/readme.md b/mpuniapp/uni_modules/uts-worker/readme.md deleted file mode 100644 index c7ebf2b..0000000 --- a/mpuniapp/uni_modules/uts-worker/readme.md +++ /dev/null @@ -1,7 +0,0 @@ -# t-worker -### 开发文档 -[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html) -[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html) -[UTS uni-app兼容模式组件](https://uniapp.dcloud.net.cn/plugin/uts-component.html) -[UTS 标准模式组件](https://doc.dcloud.net.cn/uni-app-x/plugin/uts-vue-component.html) -[Hello UTS](https://gitcode.net/dcloud/hello-uts) \ No newline at end of file diff --git a/mpuniapp/uni_modules/uts-worker/utssdk/index.uts b/mpuniapp/uni_modules/uts-worker/utssdk/index.uts deleted file mode 100644 index a3f7fde..0000000 --- a/mpuniapp/uni_modules/uts-worker/utssdk/index.uts +++ /dev/null @@ -1,115 +0,0 @@ -import { CreateWorkers, DestroyWorker, OnWorkerError, -OnWorkerMessage, SendWorkerMessage, -UTSWorkerAddListenerOptions , UTSWorkerAddListenerOptionsSuccess, UTSWorkerSendWorkerMessageOptions, UTSWorkerErrorOptions, UTSWorkerErrorCallbackSuccess } from './interface.uts'; - -export * from './interface.uts'; - -export const createWorkers : CreateWorkers = function () : void { - UTSWorkerImpl.shared.create(); -} -export const sendWorkerMessage : SendWorkerMessage = function (options : UTSWorkerSendWorkerMessageOptions) : void { - UTSWorkerImpl.shared.sendMessage(options); -} - -export const onWorkerMessage : OnWorkerMessage = function (options : UTSWorkerAddListenerOptions) : void { - UTSWorkerImpl.shared.onMessage(options); -} - -export const destroyWorker : DestroyWorker = function () : void { - UTSWorkerImpl.shared.destroy(); -} - -export const onWorkerError : OnWorkerError = function (options: UTSWorkerErrorOptions) : void { - UTSWorkerImpl.shared.onError(options); -} - -export class UTSWorkerImpl{ - static shared : UTSWorkerImpl = new UTSWorkerImpl() - private workerImp : Worker | null = null; - private options : UTSWorkerAddListenerOptions | null = null; - private errorOptions : UTSWorkerErrorOptions | null = null; - - create(){ - if (this.workerImp != null) { - console.warn('[UTS Plugin] Worker已存在,先销毁旧的Worker'); - this.destroy(); - } - - console.log('[UTS Plugin] 创建Worker'); - const worker = uni.createWorker('workers/helloWorkerTask.uts'); - this.workerImp = worker; - } - - - sendMessage(options : UTSWorkerSendWorkerMessageOptions){ - if (this.workerImp == null) { - console.error('Worker未创建,无法发送消息'); - return; - } - - // 获取消息信息并添加日志 - const msgData = options.data; - const needReply = options.needReply; - - console.log(`[UTS Plugin] 向Worker发送消息: ${msgData} (需要回复: ${needReply})`); - - // 构造要发送给Worker的消息对象 - const messageToWorker = { - data: msgData, - needReply: needReply - }; - - this.workerImp!.postMessage(messageToWorker,null); - } - - onMessage(options : UTSWorkerAddListenerOptions){ - if (this.workerImp == null) { - console.error('Worker未创建,无法监听消息'); - return; - } - - this.options = options; - this.workerImp!.onMessage((result) => { - // 处理Worker返回的消息 - console.log(`[UTS Plugin] 收到Worker消息:`, result); - - if (this.options != null && this.options.success != null){ - let success : UTSWorkerAddListenerOptionsSuccess = { - result: result as UTSJSONObject - } - this.options.success(success); - } - }) - } - onError(options: UTSWorkerErrorOptions){ - if (this.workerImp == null) { - console.error('Worker未创建,无法监听错误'); - return; - } - - this.errorOptions = options; - this.workerImp!.onError((error) => { - console.error('[UTS Plugin] Worker发生错误:', error); - - if (this.errorOptions != null && this.errorOptions.success != null) { - // const errorInfo: UTSWorkerErrorCallbackSuccess = { - // message: error.message - // }; - const errorInfo: UTSWorkerErrorCallbackSuccess = { - message: "worker error" - }; - this.errorOptions.success(errorInfo); - } - }) - } - destroy(){ - - if (this.workerImp != null) { - console.log('[UTS Plugin] 销毁Worker'); - this.workerImp.terminate(); - this.workerImp = null; - this.options = null; - this.errorOptions = null; - } - } -} diff --git a/mpuniapp/uni_modules/uts-worker/utssdk/interface.uts b/mpuniapp/uni_modules/uts-worker/utssdk/interface.uts deleted file mode 100644 index eb15758..0000000 --- a/mpuniapp/uni_modules/uts-worker/utssdk/interface.uts +++ /dev/null @@ -1,36 +0,0 @@ -export type UTSWorkerAddListenerOptions = { - success ?: UTSWorkerReceiveEventCallback -} - -export type UTSWorkerAddListenerOptionsSuccess = { - result : UTSJSONObject -} - -export type UTSWorkerSendWorkerMessageOptions = { - data : string, - needReply : boolean -} - -export type UTSWorkerErrorCallbackSuccess = { - message : string -} - -export type UTSWorkerErrorOptions = { - success ?: UTSWorkerErrorCallback -} - -export type UTSWorkerErrorCallback = (error: UTSWorkerErrorCallbackSuccess) => void - -export type UTSWorkerReceiveEventCallback = (callback: UTSWorkerAddListenerOptionsSuccess) => void - - -export type SendWorkerMessage = (options: UTSWorkerSendWorkerMessageOptions) => void - -export type OnWorkerMessage = (options: UTSWorkerAddListenerOptions) => void - - -export type OnWorkerError = (options: UTSWorkerErrorOptions) => void - -export type CreateWorkers = () => void - -export type DestroyWorker = () => void diff --git a/mpuniapp/windows/left-window.uvue b/mpuniapp/windows/left-window.uvue deleted file mode 100644 index dbcf96d..0000000 --- a/mpuniapp/windows/left-window.uvue +++ /dev/null @@ -1,128 +0,0 @@ - - - - - diff --git a/mpuniapp/windows/top-window.uvue b/mpuniapp/windows/top-window.uvue deleted file mode 100644 index a01121d..0000000 --- a/mpuniapp/windows/top-window.uvue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - diff --git a/mpuniapp/workers/helloWorkerTask.uts b/mpuniapp/workers/helloWorkerTask.uts deleted file mode 100644 index 962da84..0000000 --- a/mpuniapp/workers/helloWorkerTask.uts +++ /dev/null @@ -1,48 +0,0 @@ -export class HelloWorkerTask extends WorkerTaskImpl { - //constructor - constructor() { - super(); - //初始化操作 - console.log("[WorkerTask] HelloWorkerTask 构造器初始化"); - } - - //实现入口函数 - override entry() { - //Worker启动时的入口函数 - console.log("[WorkerTask] HelloWorkerTask 启动完成,等待主线程消息"); - } - - //接收主线程发送的消息 - override onMessage(message : any) { - console.log('[WorkerTask] 收到主线程消息: ', message); - - // 处理消息对象 - const messageData = message as UTSJSONObject; - const msgData = messageData['data'] as string; - const needReply = messageData['needReply'] as boolean; - - console.log(`[WorkerTask] 数据: ${msgData}, 需要回复: ${needReply}`); - - // 根据是否需要回复来处理 - if (needReply) { - this.sendReply(msgData); - } - } - - // 发送回复消息 - private sendReply(msgData : string) { - const response = new UTSJSONObject(); - - // 尝试将接收到的数据转换为数字并加1 - const inputNumber = parseInt(msgData); - if (isNaN(inputNumber)) { - response.data = `输入"${msgData}"不是有效数字`; - } else { - const result = inputNumber + 1; - response.data = result.toString() - } - - console.log('[WorkerTask] 发送回复消息:', response); - this.postMessage(response); - } -} diff --git a/mpuniapp/workers/sendableTransferWorker.uts b/mpuniapp/workers/sendableTransferWorker.uts deleted file mode 100644 index c5a9e1b..0000000 --- a/mpuniapp/workers/sendableTransferWorker.uts +++ /dev/null @@ -1,31 +0,0 @@ -export class SendableTransferWorker extends WorkerTaskImpl { - //constructor - constructor() { - super(); - //初始化操作 - console.log("[WorkerTask] HelloWorkerTask 构造器初始化"); - } - - //实现入口函数 - override entry() { - //Worker启动时的入口函数 - console.log("[WorkerTask] HelloWorkerTask 启动完成,等待主线程消息"); - } - - //接收主线程发送的消息 - override onMessage(message : any) { - console.log('[WorkerTask] 收到主线程消息: ', JSON.stringify(message)); - // #ifdef APP-HARMONY - if (typeof message === 'object' && typeof (message as ESObject).a === 'number') { - (message as ESObject).a = 666 - } - // #endif - this.sendReply(message); - } - - // 发送回复消息 - private sendReply(message : any) { - console.log('[WorkerTask] 发送回复消息'); - this.postMessage(message); - } -} diff --git a/mpuniapp/wxcomponents/vant/button/index.d.ts b/mpuniapp/wxcomponents/vant/button/index.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/mpuniapp/wxcomponents/vant/button/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/mpuniapp/wxcomponents/vant/button/index.js b/mpuniapp/wxcomponents/vant/button/index.js deleted file mode 100644 index e32509e..0000000 --- a/mpuniapp/wxcomponents/vant/button/index.js +++ /dev/null @@ -1,68 +0,0 @@ -import { VantComponent } from '../common/component'; -import { button } from '../mixins/button'; -import { openType } from '../mixins/open-type'; -VantComponent({ - mixins: [button, openType], - classes: ['hover-class', 'loading-class'], - data: { - style: '' - }, - props: { - icon: String, - plain: Boolean, - block: Boolean, - round: Boolean, - square: Boolean, - loading: Boolean, - hairline: Boolean, - disabled: Boolean, - loadingText: String, - customStyle: String, - loadingType: { - type: String, - value: 'circular' - }, - type: { - type: String, - value: 'default' - }, - size: { - type: String, - value: 'normal' - }, - loadingSize: { - type: String, - value: '20px' - }, - color: { - type: String, - observer(color) { - let style = ''; - if (color) { - style += `color: ${this.data.plain ? color : 'white'};`; - if (!this.data.plain) { - // Use background instead of backgroundColor to make linear-gradient work - style += `background: ${color};`; - } - // hide border when color is linear-gradient - if (color.indexOf('gradient') !== -1) { - style += 'border: 0;'; - } - else { - style += `border-color: ${color};`; - } - } - if (style !== this.data.style) { - this.setData({ style }); - } - } - } - }, - methods: { - onClick() { - if (!this.data.disabled && !this.data.loading) { - this.$emit('click'); - } - } - } -}); diff --git a/mpuniapp/wxcomponents/vant/button/index.json b/mpuniapp/wxcomponents/vant/button/index.json deleted file mode 100644 index e00a588..0000000 --- a/mpuniapp/wxcomponents/vant/button/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "component": true, - "usingComponents": { - "van-icon": "../icon/index", - "van-loading": "../loading/index" - } -} diff --git a/mpuniapp/wxcomponents/vant/button/index.vue b/mpuniapp/wxcomponents/vant/button/index.vue deleted file mode 100644 index 082a862..0000000 --- a/mpuniapp/wxcomponents/vant/button/index.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - - \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/button/index.wxml b/mpuniapp/wxcomponents/vant/button/index.wxml deleted file mode 100644 index 77b4942..0000000 --- a/mpuniapp/wxcomponents/vant/button/index.wxml +++ /dev/null @@ -1,52 +0,0 @@ - - - diff --git a/mpuniapp/wxcomponents/vant/button/index.wxss b/mpuniapp/wxcomponents/vant/button/index.wxss deleted file mode 100644 index 0d302cb..0000000 --- a/mpuniapp/wxcomponents/vant/button/index.wxss +++ /dev/null @@ -1 +0,0 @@ -@import '../common/index.wxss';.van-button{position:relative;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:0;line-height:20px;text-align:center;vertical-align:middle;-webkit-appearance:none;-webkit-text-size-adjust:100%;height:44px;height:var(--button-default-height,44px);font-size:16px;font-size:var(--button-default-font-size,16px);transition:opacity .2s;transition:opacity var(--animation-duration-fast,.2s);border-radius:2px;border-radius:var(--button-border-radius,2px)}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;border:inherit;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;content:" ";background-color:#000;background-color:var(--black,#000);border-color:#000;border-color:var(--black,#000)}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{color:#323233;color:var(--button-default-color,#323233);background-color:#fff;background-color:var(--button-default-background-color,#fff);border:1px solid #ebedf0;border:1px solid var(--button-default-border-color,#ebedf0)}.van-button--primary{color:#fff;color:var(--button-primary-color,#fff);background-color:#07c160;background-color:var(--button-primary-background-color,#07c160);border:1px solid #07c160;border:1px solid var(--button-primary-border-color,#07c160)}.van-button--info{color:#fff;color:var(--button-info-color,#fff);background-color:#1989fa;background-color:var(--button-info-background-color,#1989fa);border:1px solid #1989fa;border:1px solid var(--button-info-border-color,#1989fa)}.van-button--danger{color:#fff;color:var(--button-danger-color,#fff);background-color:#ee0a24;background-color:var(--button-danger-background-color,#ee0a24);border:1px solid #ee0a24;border:1px solid var(--button-danger-border-color,#ee0a24)}.van-button--warning{color:#fff;color:var(--button-warning-color,#fff);background-color:#ff976a;background-color:var(--button-warning-background-color,#ff976a);border:1px solid #ff976a;border:1px solid var(--button-warning-border-color,#ff976a)}.van-button--plain{background-color:#fff;background-color:var(--button-plain-background-color,#fff)}.van-button--plain.van-button--primary{color:#07c160;color:var(--button-primary-background-color,#07c160)}.van-button--plain.van-button--info{color:#1989fa;color:var(--button-info-background-color,#1989fa)}.van-button--plain.van-button--danger{color:#ee0a24;color:var(--button-danger-background-color,#ee0a24)}.van-button--plain.van-button--warning{color:#ff976a;color:var(--button-warning-background-color,#ff976a)}.van-button--large{width:100%;height:50px;height:var(--button-large-height,50px)}.van-button--normal{padding:0 15px;font-size:14px;font-size:var(--button-normal-font-size,14px)}.van-button--small{min-width:60px;min-width:var(--button-small-min-width,60px);height:30px;height:var(--button-small-height,30px);padding:0 8px;padding:0 var(--padding-xs,8px);font-size:12px;font-size:var(--button-small-font-size,12px)}.van-button--mini{display:inline-block;min-width:50px;min-width:var(--button-mini-min-width,50px);height:22px;height:var(--button-mini-height,22px);font-size:10px;font-size:var(--button-mini-font-size,10px)}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:-webkit-flex;display:flex;width:100%}.van-button--round{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5;opacity:var(--button-disabled-opacity,.5)}.van-button__text{display:inline}.van-button__icon+.van-button__text:not(:empty),.van-button__loading-text{margin-left:4px}.van-button__icon{min-width:1em;line-height:inherit!important;vertical-align:top}.van-button--hairline{padding-top:1px;border-width:0}.van-button--hairline:after{border-color:inherit;border-width:1px;border-radius:4px;border-radius:calc(var(--button-border-radius, 2px)*2)}.van-button--hairline.van-button--round:after{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--hairline.van-button--square:after{border-radius:0} \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/common/color.d.ts b/mpuniapp/wxcomponents/vant/common/color.d.ts deleted file mode 100644 index 386f307..0000000 --- a/mpuniapp/wxcomponents/vant/common/color.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare const RED = "#ee0a24"; -export declare const BLUE = "#1989fa"; -export declare const WHITE = "#fff"; -export declare const GREEN = "#07c160"; -export declare const ORANGE = "#ff976a"; -export declare const GRAY = "#323233"; -export declare const GRAY_DARK = "#969799"; diff --git a/mpuniapp/wxcomponents/vant/common/color.js b/mpuniapp/wxcomponents/vant/common/color.js deleted file mode 100644 index 6b285bd..0000000 --- a/mpuniapp/wxcomponents/vant/common/color.js +++ /dev/null @@ -1,7 +0,0 @@ -export const RED = '#ee0a24'; -export const BLUE = '#1989fa'; -export const WHITE = '#fff'; -export const GREEN = '#07c160'; -export const ORANGE = '#ff976a'; -export const GRAY = '#323233'; -export const GRAY_DARK = '#969799'; diff --git a/mpuniapp/wxcomponents/vant/common/component.d.ts b/mpuniapp/wxcomponents/vant/common/component.d.ts deleted file mode 100644 index 307a96c..0000000 --- a/mpuniapp/wxcomponents/vant/common/component.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { VantComponentOptions, CombinedComponentInstance } from '../definitions/index'; -declare function VantComponent(vantOptions?: VantComponentOptions>): void; -export { VantComponent }; diff --git a/mpuniapp/wxcomponents/vant/common/component.js b/mpuniapp/wxcomponents/vant/common/component.js deleted file mode 100644 index 63ef1a9..0000000 --- a/mpuniapp/wxcomponents/vant/common/component.js +++ /dev/null @@ -1,48 +0,0 @@ -import { basic } from '../mixins/basic'; -import { observe } from '../mixins/observer/index'; -function mapKeys(source, target, map) { - Object.keys(map).forEach(key => { - if (source[key]) { - target[map[key]] = source[key]; - } - }); -} -function VantComponent(vantOptions = {}) { - const options = {}; - mapKeys(vantOptions, options, { - data: 'data', - props: 'properties', - mixins: 'behaviors', - methods: 'methods', - beforeCreate: 'created', - created: 'attached', - mounted: 'ready', - relations: 'relations', - destroyed: 'detached', - classes: 'externalClasses' - }); - const { relation } = vantOptions; - if (relation) { - options.relations = Object.assign(options.relations || {}, { - [`../${relation.name}/index`]: relation - }); - } - // add default externalClasses - options.externalClasses = options.externalClasses || []; - options.externalClasses.push('custom-class'); - // add default behaviors - options.behaviors = options.behaviors || []; - options.behaviors.push(basic); - // map field to form-field behavior - if (vantOptions.field) { - options.behaviors.push('wx://form-field'); - } - // add default options - options.options = { - multipleSlots: true, - addGlobalClass: true - }; - observe(vantOptions, options); - Component(options); -} -export { VantComponent }; diff --git a/mpuniapp/wxcomponents/vant/common/index.css b/mpuniapp/wxcomponents/vant/common/index.css deleted file mode 100644 index 6e6891f..0000000 --- a/mpuniapp/wxcomponents/vant/common/index.css +++ /dev/null @@ -1 +0,0 @@ -.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/common/index.wxss b/mpuniapp/wxcomponents/vant/common/index.wxss deleted file mode 100644 index 6e6891f..0000000 --- a/mpuniapp/wxcomponents/vant/common/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/common/style/clearfix.css b/mpuniapp/wxcomponents/vant/common/style/clearfix.css deleted file mode 100644 index a0ca838..0000000 --- a/mpuniapp/wxcomponents/vant/common/style/clearfix.css +++ /dev/null @@ -1 +0,0 @@ -.van-clearfix:after{display:table;clear:both;content:""} \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/common/style/clearfix.wxss b/mpuniapp/wxcomponents/vant/common/style/clearfix.wxss deleted file mode 100644 index a0ca838..0000000 --- a/mpuniapp/wxcomponents/vant/common/style/clearfix.wxss +++ /dev/null @@ -1 +0,0 @@ -.van-clearfix:after{display:table;clear:both;content:""} \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/common/style/ellipsis.css b/mpuniapp/wxcomponents/vant/common/style/ellipsis.css deleted file mode 100644 index 1e9dbc9..0000000 --- a/mpuniapp/wxcomponents/vant/common/style/ellipsis.css +++ /dev/null @@ -1 +0,0 @@ -.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3} \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/common/style/ellipsis.wxss b/mpuniapp/wxcomponents/vant/common/style/ellipsis.wxss deleted file mode 100644 index 1e9dbc9..0000000 --- a/mpuniapp/wxcomponents/vant/common/style/ellipsis.wxss +++ /dev/null @@ -1 +0,0 @@ -.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3} \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/common/style/hairline.css b/mpuniapp/wxcomponents/vant/common/style/hairline.css deleted file mode 100644 index f64e2f8..0000000 --- a/mpuniapp/wxcomponents/vant/common/style/hairline.css +++ /dev/null @@ -1 +0,0 @@ -.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/common/style/hairline.wxss b/mpuniapp/wxcomponents/vant/common/style/hairline.wxss deleted file mode 100644 index f64e2f8..0000000 --- a/mpuniapp/wxcomponents/vant/common/style/hairline.wxss +++ /dev/null @@ -1 +0,0 @@ -.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/common/utils.d.ts b/mpuniapp/wxcomponents/vant/common/utils.d.ts deleted file mode 100644 index 9fad27d..0000000 --- a/mpuniapp/wxcomponents/vant/common/utils.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -export declare function isDef(value: any): boolean; -export declare function isObj(x: any): boolean; -export declare function isNumber(value: any): boolean; -export declare function range(num: number, min: number, max: number): number; -export declare function nextTick(fn: Function): void; -export declare function getSystemInfoSync(): WechatMiniprogram.GetSystemInfoSuccessCallbackResult; -export declare function addUnit(value?: string | number): string | undefined; diff --git a/mpuniapp/wxcomponents/vant/common/utils.js b/mpuniapp/wxcomponents/vant/common/utils.js deleted file mode 100644 index cc0f8f1..0000000 --- a/mpuniapp/wxcomponents/vant/common/utils.js +++ /dev/null @@ -1,32 +0,0 @@ -export function isDef(value) { - return value !== undefined && value !== null; -} -export function isObj(x) { - const type = typeof x; - return x !== null && (type === 'object' || type === 'function'); -} -export function isNumber(value) { - return /^\d+(\.\d+)?$/.test(value); -} -export function range(num, min, max) { - return Math.min(Math.max(num, min), max); -} -export function nextTick(fn) { - setTimeout(() => { - fn(); - }, 1000 / 30); -} -let systemInfo = null; -export function getSystemInfoSync() { - if (systemInfo == null) { - systemInfo = wx.getSystemInfoSync(); - } - return systemInfo; -} -export function addUnit(value) { - if (!isDef(value)) { - return undefined; - } - value = String(value); - return isNumber(value) ? `${value}px` : value; -} diff --git a/mpuniapp/wxcomponents/vant/icon/index.d.ts b/mpuniapp/wxcomponents/vant/icon/index.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/mpuniapp/wxcomponents/vant/icon/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/mpuniapp/wxcomponents/vant/icon/index.js b/mpuniapp/wxcomponents/vant/icon/index.js deleted file mode 100644 index 8d83ff1..0000000 --- a/mpuniapp/wxcomponents/vant/icon/index.js +++ /dev/null @@ -1,39 +0,0 @@ -import { VantComponent } from '../common/component'; -import { addUnit } from '../common/utils'; -VantComponent({ - props: { - dot: Boolean, - info: null, - size: { - type: null, - observer: 'setSizeWithUnit' - }, - color: String, - customStyle: String, - classPrefix: { - type: String, - value: 'van-icon' - }, - name: { - type: String, - observer(val) { - this.setData({ - isImageName: val.indexOf('/') !== -1 - }); - } - } - }, - data: { - sizeWithUnit: null, - }, - methods: { - onClick() { - this.$emit('click'); - }, - setSizeWithUnit(size) { - this.setData({ - sizeWithUnit: addUnit(size) - }); - } - } -}); diff --git a/mpuniapp/wxcomponents/vant/icon/index.json b/mpuniapp/wxcomponents/vant/icon/index.json deleted file mode 100644 index bf0ebe0..0000000 --- a/mpuniapp/wxcomponents/vant/icon/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "van-info": "../info/index" - } -} diff --git a/mpuniapp/wxcomponents/vant/icon/index.vue b/mpuniapp/wxcomponents/vant/icon/index.vue deleted file mode 100644 index d104ccb..0000000 --- a/mpuniapp/wxcomponents/vant/icon/index.vue +++ /dev/null @@ -1,1012 +0,0 @@ - - - - \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/icon/index.wxml b/mpuniapp/wxcomponents/vant/icon/index.wxml deleted file mode 100644 index c568b58..0000000 --- a/mpuniapp/wxcomponents/vant/icon/index.wxml +++ /dev/null @@ -1,18 +0,0 @@ - - - - diff --git a/mpuniapp/wxcomponents/vant/icon/index.wxss b/mpuniapp/wxcomponents/vant/icon/index.wxss deleted file mode 100644 index d9c7fa2..0000000 --- a/mpuniapp/wxcomponents/vant/icon/index.wxss +++ /dev/null @@ -1,957 +0,0 @@ -@import '../common/index.wxss'; - -@font-face { - font-weight: 400; - font-family: vant-icon; - font-style: normal; - font-display: auto; - src: url(https://img.yzcdn.cn/vant/vant-icon-d3825a.woff2) format("woff2"), url(https://img.yzcdn.cn/vant/vant-icon-d3825a.woff) format("woff"), url(https://img.yzcdn.cn/vant/vant-icon-d3825a.ttf) format("truetype") -} - -.van-icon { - position: relative; - font: normal normal normal 14px/1 vant-icon; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased -} - -.van-icon, -.van-icon:before { - display: inline-block -} - -.van-icon-add-o:before { - content: "\F000" -} - -.van-icon-add-square:before { - content: "\F001" -} - -.van-icon-add:before { - content: "\F002" -} - -.van-icon-after-sale:before { - content: "\F003" -} - -.van-icon-aim:before { - content: "\F004" -} - -.van-icon-alipay:before { - content: "\F005" -} - -.van-icon-apps-o:before { - content: "\F006" -} - -.van-icon-arrow-down:before { - content: "\F007" -} - -.van-icon-arrow-left:before { - content: "\F008" -} - -.van-icon-arrow-up:before { - content: "\F009" -} - -.van-icon-arrow:before { - content: "\F00A" -} - -.van-icon-ascending:before { - content: "\F00B" -} - -.van-icon-audio:before { - content: "\F00C" -} - -.van-icon-award-o:before { - content: "\F00D" -} - -.van-icon-award:before { - content: "\F00E" -} - -.van-icon-bag-o:before { - content: "\F00F" -} - -.van-icon-bag:before { - content: "\F010" -} - -.van-icon-balance-list-o:before { - content: "\F011" -} - -.van-icon-balance-list:before { - content: "\F012" -} - -.van-icon-balance-o:before { - content: "\F013" -} - -.van-icon-balance-pay:before { - content: "\F014" -} - -.van-icon-bar-chart-o:before { - content: "\F015" -} - -.van-icon-bars:before { - content: "\F016" -} - -.van-icon-bell:before { - content: "\F017" -} - -.van-icon-bill-o:before { - content: "\F018" -} - -.van-icon-bill:before { - content: "\F019" -} - -.van-icon-birthday-cake-o:before { - content: "\F01A" -} - -.van-icon-bookmark-o:before { - content: "\F01B" -} - -.van-icon-bookmark:before { - content: "\F01C" -} - -.van-icon-browsing-history-o:before { - content: "\F01D" -} - -.van-icon-browsing-history:before { - content: "\F01E" -} - -.van-icon-brush-o:before { - content: "\F01F" -} - -.van-icon-bulb-o:before { - content: "\F020" -} - -.van-icon-bullhorn-o:before { - content: "\F021" -} - -.van-icon-calender-o:before { - content: "\F022" -} - -.van-icon-card:before { - content: "\F023" -} - -.van-icon-cart-circle-o:before { - content: "\F024" -} - -.van-icon-cart-circle:before { - content: "\F025" -} - -.van-icon-cart-o:before { - content: "\F026" -} - -.van-icon-cart:before { - content: "\F027" -} - -.van-icon-cash-back-record:before { - content: "\F028" -} - -.van-icon-cash-on-deliver:before { - content: "\F029" -} - -.van-icon-cashier-o:before { - content: "\F02A" -} - -.van-icon-certificate:before { - content: "\F02B" -} - -.van-icon-chart-trending-o:before { - content: "\F02C" -} - -.van-icon-chat-o:before { - content: "\F02D" -} - -.van-icon-chat:before { - content: "\F02E" -} - -.van-icon-checked:before { - content: "\F02F" -} - -.van-icon-circle:before { - content: "\F030" -} - -.van-icon-clear:before { - content: "\F031" -} - -.van-icon-clock-o:before { - content: "\F032" -} - -.van-icon-clock:before { - content: "\F033" -} - -.van-icon-close:before { - content: "\F034" -} - -.van-icon-closed-eye:before { - content: "\F035" -} - -.van-icon-cluster-o:before { - content: "\F036" -} - -.van-icon-cluster:before { - content: "\F037" -} - -.van-icon-column:before { - content: "\F038" -} - -.van-icon-comment-circle-o:before { - content: "\F039" -} - -.van-icon-comment-circle:before { - content: "\F03A" -} - -.van-icon-comment-o:before { - content: "\F03B" -} - -.van-icon-comment:before { - content: "\F03C" -} - -.van-icon-completed:before { - content: "\F03D" -} - -.van-icon-contact:before { - content: "\F03E" -} - -.van-icon-coupon-o:before { - content: "\F03F" -} - -.van-icon-coupon:before { - content: "\F040" -} - -.van-icon-credit-pay:before { - content: "\F041" -} - -.van-icon-cross:before { - content: "\F042" -} - -.van-icon-debit-pay:before { - content: "\F043" -} - -.van-icon-delete:before { - content: "\F044" -} - -.van-icon-descending:before { - content: "\F045" -} - -.van-icon-description:before { - content: "\F046" -} - -.van-icon-desktop-o:before { - content: "\F047" -} - -.van-icon-diamond-o:before { - content: "\F048" -} - -.van-icon-diamond:before { - content: "\F049" -} - -.van-icon-discount:before { - content: "\F04A" -} - -.van-icon-down:before { - content: "\F04B" -} - -.van-icon-ecard-pay:before { - content: "\F04C" -} - -.van-icon-edit:before { - content: "\F04D" -} - -.van-icon-ellipsis:before { - content: "\F04E" -} - -.van-icon-empty:before { - content: "\F04F" -} - -.van-icon-envelop-o:before { - content: "\F050" -} - -.van-icon-exchange:before { - content: "\F051" -} - -.van-icon-expand-o:before { - content: "\F052" -} - -.van-icon-expand:before { - content: "\F053" -} - -.van-icon-eye-o:before { - content: "\F054" -} - -.van-icon-eye:before { - content: "\F055" -} - -.van-icon-fail:before { - content: "\F056" -} - -.van-icon-failure:before { - content: "\F057" -} - -.van-icon-filter-o:before { - content: "\F058" -} - -.van-icon-fire-o:before { - content: "\F059" -} - -.van-icon-fire:before { - content: "\F05A" -} - -.van-icon-flag-o:before { - content: "\F05B" -} - -.van-icon-flower-o:before { - content: "\F05C" -} - -.van-icon-free-postage:before { - content: "\F05D" -} - -.van-icon-friends-o:before { - content: "\F05E" -} - -.van-icon-friends:before { - content: "\F05F" -} - -.van-icon-gem-o:before { - content: "\F060" -} - -.van-icon-gem:before { - content: "\F061" -} - -.van-icon-gift-card-o:before { - content: "\F062" -} - -.van-icon-gift-card:before { - content: "\F063" -} - -.van-icon-gift-o:before { - content: "\F064" -} - -.van-icon-gift:before { - content: "\F065" -} - -.van-icon-gold-coin-o:before { - content: "\F066" -} - -.van-icon-gold-coin:before { - content: "\F067" -} - -.van-icon-good-job-o:before { - content: "\F068" -} - -.van-icon-good-job:before { - content: "\F069" -} - -.van-icon-goods-collect-o:before { - content: "\F06A" -} - -.van-icon-goods-collect:before { - content: "\F06B" -} - -.van-icon-graphic:before { - content: "\F06C" -} - -.van-icon-home-o:before { - content: "\F06D" -} - -.van-icon-hot-o:before { - content: "\F06E" -} - -.van-icon-hot-sale-o:before { - content: "\F06F" -} - -.van-icon-hot-sale:before { - content: "\F070" -} - -.van-icon-hot:before { - content: "\F071" -} - -.van-icon-hotel-o:before { - content: "\F072" -} - -.van-icon-idcard:before { - content: "\F073" -} - -.van-icon-info-o:before { - content: "\F074" -} - -.van-icon-info:before { - content: "\F075" -} - -.van-icon-invition:before { - content: "\F076" -} - -.van-icon-label-o:before { - content: "\F077" -} - -.van-icon-label:before { - content: "\F078" -} - -.van-icon-like-o:before { - content: "\F079" -} - -.van-icon-like:before { - content: "\F07A" -} - -.van-icon-live:before { - content: "\F07B" -} - -.van-icon-location-o:before { - content: "\F07C" -} - -.van-icon-location:before { - content: "\F07D" -} - -.van-icon-lock:before { - content: "\F07E" -} - -.van-icon-logistics:before { - content: "\F07F" -} - -.van-icon-manager-o:before { - content: "\F080" -} - -.van-icon-manager:before { - content: "\F081" -} - -.van-icon-map-marked:before { - content: "\F082" -} - -.van-icon-medal-o:before { - content: "\F083" -} - -.van-icon-medal:before { - content: "\F084" -} - -.van-icon-more-o:before { - content: "\F085" -} - -.van-icon-more:before { - content: "\F086" -} - -.van-icon-music-o:before { - content: "\F087" -} - -.van-icon-music:before { - content: "\F088" -} - -.van-icon-new-arrival-o:before { - content: "\F089" -} - -.van-icon-new-arrival:before { - content: "\F08A" -} - -.van-icon-new-o:before { - content: "\F08B" -} - -.van-icon-new:before { - content: "\F08C" -} - -.van-icon-newspaper-o:before { - content: "\F08D" -} - -.van-icon-notes-o:before { - content: "\F08E" -} - -.van-icon-orders-o:before { - content: "\F08F" -} - -.van-icon-other-pay:before { - content: "\F090" -} - -.van-icon-paid:before { - content: "\F091" -} - -.van-icon-passed:before { - content: "\F092" -} - -.van-icon-pause-circle-o:before { - content: "\F093" -} - -.van-icon-pause-circle:before { - content: "\F094" -} - -.van-icon-pause:before { - content: "\F095" -} - -.van-icon-peer-pay:before { - content: "\F096" -} - -.van-icon-pending-payment:before { - content: "\F097" -} - -.van-icon-phone-circle-o:before { - content: "\F098" -} - -.van-icon-phone-circle:before { - content: "\F099" -} - -.van-icon-phone-o:before { - content: "\F09A" -} - -.van-icon-phone:before { - content: "\F09B" -} - -.van-icon-photo-o:before { - content: "\F09C" -} - -.van-icon-photo:before { - content: "\F09D" -} - -.van-icon-photograph:before { - content: "\F09E" -} - -.van-icon-play-circle-o:before { - content: "\F09F" -} - -.van-icon-play-circle:before { - content: "\F0A0" -} - -.van-icon-play:before { - content: "\F0A1" -} - -.van-icon-plus:before { - content: "\F0A2" -} - -.van-icon-point-gift-o:before { - content: "\F0A3" -} - -.van-icon-point-gift:before { - content: "\F0A4" -} - -.van-icon-points:before { - content: "\F0A5" -} - -.van-icon-printer:before { - content: "\F0A6" -} - -.van-icon-qr-invalid:before { - content: "\F0A7" -} - -.van-icon-qr:before { - content: "\F0A8" -} - -.van-icon-question-o:before { - content: "\F0A9" -} - -.van-icon-question:before { - content: "\F0AA" -} - -.van-icon-records:before { - content: "\F0AB" -} - -.van-icon-refund-o:before { - content: "\F0AC" -} - -.van-icon-replay:before { - content: "\F0AD" -} - -.van-icon-scan:before { - content: "\F0AE" -} - -.van-icon-search:before { - content: "\F0AF" -} - -.van-icon-send-gift-o:before { - content: "\F0B0" -} - -.van-icon-send-gift:before { - content: "\F0B1" -} - -.van-icon-service-o:before { - content: "\F0B2" -} - -.van-icon-service:before { - content: "\F0B3" -} - -.van-icon-setting-o:before { - content: "\F0B4" -} - -.van-icon-setting:before { - content: "\F0B5" -} - -.van-icon-share:before { - content: "\F0B6" -} - -.van-icon-shop-collect-o:before { - content: "\F0B7" -} - -.van-icon-shop-collect:before { - content: "\F0B8" -} - -.van-icon-shop-o:before { - content: "\F0B9" -} - -.van-icon-shop:before { - content: "\F0BA" -} - -.van-icon-shopping-cart-o:before { - content: "\F0BB" -} - -.van-icon-shopping-cart:before { - content: "\F0BC" -} - -.van-icon-shrink:before { - content: "\F0BD" -} - -.van-icon-sign:before { - content: "\F0BE" -} - -.van-icon-smile-comment-o:before { - content: "\F0BF" -} - -.van-icon-smile-comment:before { - content: "\F0C0" -} - -.van-icon-smile-o:before { - content: "\F0C1" -} - -.van-icon-smile:before { - content: "\F0C2" -} - -.van-icon-star-o:before { - content: "\F0C3" -} - -.van-icon-star:before { - content: "\F0C4" -} - -.van-icon-stop-circle-o:before { - content: "\F0C5" -} - -.van-icon-stop-circle:before { - content: "\F0C6" -} - -.van-icon-stop:before { - content: "\F0C7" -} - -.van-icon-success:before { - content: "\F0C8" -} - -.van-icon-thumb-circle-o:before { - content: "\F0C9" -} - -.van-icon-thumb-circle:before { - content: "\F0CA" -} - -.van-icon-todo-list-o:before { - content: "\F0CB" -} - -.van-icon-todo-list:before { - content: "\F0CC" -} - -.van-icon-tosend:before { - content: "\F0CD" -} - -.van-icon-tv-o:before { - content: "\F0CE" -} - -.van-icon-umbrella-circle:before { - content: "\F0CF" -} - -.van-icon-underway-o:before { - content: "\F0D0" -} - -.van-icon-underway:before { - content: "\F0D1" -} - -.van-icon-upgrade:before { - content: "\F0D2" -} - -.van-icon-user-circle-o:before { - content: "\F0D3" -} - -.van-icon-user-o:before { - content: "\F0D4" -} - -.van-icon-video-o:before { - content: "\F0D5" -} - -.van-icon-video:before { - content: "\F0D6" -} - -.van-icon-vip-card-o:before { - content: "\F0D7" -} - -.van-icon-vip-card:before { - content: "\F0D8" -} - -.van-icon-volume-o:before { - content: "\F0D9" -} - -.van-icon-volume:before { - content: "\F0DA" -} - -.van-icon-wap-home-o:before { - content: "\F0DB" -} - -.van-icon-wap-home:before { - content: "\F0DC" -} - -.van-icon-wap-nav:before { - content: "\F0DD" -} - -.van-icon-warn-o:before { - content: "\F0DE" -} - -.van-icon-warning-o:before { - content: "\F0DF" -} - -.van-icon-warning:before { - content: "\F0E0" -} - -.van-icon-weapp-nav:before { - content: "\F0E1" -} - -.van-icon-wechat:before { - content: "\F0E2" -} - -.van-icon-youzan-shield:before { - content: "\F0E3" -} - -:host { - display: -webkit-inline-flex; - display: inline-flex; - -webkit-align-items: center; - align-items: center; - -webkit-justify-content: center; - justify-content: center -} - -.van-icon--image { - width: 1em; - height: 1em -} - -.van-icon__image { - width: 100%; - height: 100% -} - -.van-icon__info { - z-index: 1 -} diff --git a/mpuniapp/wxcomponents/vant/info/index.d.ts b/mpuniapp/wxcomponents/vant/info/index.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/mpuniapp/wxcomponents/vant/info/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/mpuniapp/wxcomponents/vant/info/index.js b/mpuniapp/wxcomponents/vant/info/index.js deleted file mode 100644 index 8e34c0f..0000000 --- a/mpuniapp/wxcomponents/vant/info/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import { VantComponent } from '../common/component'; -VantComponent({ - props: { - dot: Boolean, - info: null, - customStyle: String - } -}); diff --git a/mpuniapp/wxcomponents/vant/info/index.json b/mpuniapp/wxcomponents/vant/info/index.json deleted file mode 100644 index 467ce29..0000000 --- a/mpuniapp/wxcomponents/vant/info/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "component": true -} diff --git a/mpuniapp/wxcomponents/vant/info/index.vue b/mpuniapp/wxcomponents/vant/info/index.vue deleted file mode 100644 index 212bccc..0000000 --- a/mpuniapp/wxcomponents/vant/info/index.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - - \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/info/index.wxml b/mpuniapp/wxcomponents/vant/info/index.wxml deleted file mode 100644 index 3112dfc..0000000 --- a/mpuniapp/wxcomponents/vant/info/index.wxml +++ /dev/null @@ -1,7 +0,0 @@ - - -{{ dot ? '' : info }} diff --git a/mpuniapp/wxcomponents/vant/info/index.wxss b/mpuniapp/wxcomponents/vant/info/index.wxss deleted file mode 100644 index 16e3f32..0000000 --- a/mpuniapp/wxcomponents/vant/info/index.wxss +++ /dev/null @@ -1 +0,0 @@ -@import '../common/index.wxss';.van-info{position:absolute;top:0;right:0;box-sizing:border-box;white-space:nowrap;text-align:center;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);-webkit-transform-origin:100%;transform-origin:100%;min-width:16px;min-width:var(--info-size,16px);padding:0 3px;padding:var(--info-padding,0 3px);color:#fff;color:var(--info-color,#fff);font-weight:500;font-weight:var(--info-font-weight,500);font-size:12px;font-size:var(--info-font-size,12px);font-family:PingFang SC,Helvetica Neue,Arial,sans-serif;font-family:var(--info-font-family,PingFang SC,Helvetica Neue,Arial,sans-serif);line-height:14px;line-height:calc(var(--info-size, 16px) - var(--info-border-width, 1px)*2);background-color:#ee0a24;background-color:var(--info-background-color,#ee0a24);border:1px solid #fff;border:var(--info-border-width,1px) solid var(--white,#fff);border-radius:16px;border-radius:var(--info-size,16px)}.van-info--dot{min-width:0;border-radius:100%;width:8px;width:var(--info-dot-size,8px);height:8px;height:var(--info-dot-size,8px);background-color:#ee0a24;background-color:var(--info-dot-color,#ee0a24)} \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/loading/index.d.ts b/mpuniapp/wxcomponents/vant/loading/index.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/mpuniapp/wxcomponents/vant/loading/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/mpuniapp/wxcomponents/vant/loading/index.js b/mpuniapp/wxcomponents/vant/loading/index.js deleted file mode 100644 index af510c8..0000000 --- a/mpuniapp/wxcomponents/vant/loading/index.js +++ /dev/null @@ -1,32 +0,0 @@ -import { VantComponent } from '../common/component'; -import { addUnit } from '../common/utils'; -VantComponent({ - props: { - color: String, - vertical: Boolean, - type: { - type: String, - value: 'circular' - }, - size: { - type: String, - observer: 'setSizeWithUnit' - }, - textSize: { - type: String, - observer: 'setTextSizeWithUnit' - } - }, - methods: { - setSizeWithUnit(size) { - this.setData({ - sizeWithUnit: addUnit(size) - }); - }, - setTextSizeWithUnit(size) { - this.set({ - textSizeWithUnit: addUnit(size) - }); - } - } -}); diff --git a/mpuniapp/wxcomponents/vant/loading/index.json b/mpuniapp/wxcomponents/vant/loading/index.json deleted file mode 100644 index 32640e0..0000000 --- a/mpuniapp/wxcomponents/vant/loading/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "component": true -} \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/loading/index.vue b/mpuniapp/wxcomponents/vant/loading/index.vue deleted file mode 100644 index c7051ff..0000000 --- a/mpuniapp/wxcomponents/vant/loading/index.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - - \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/loading/index.wxml b/mpuniapp/wxcomponents/vant/loading/index.wxml deleted file mode 100644 index 5229d04..0000000 --- a/mpuniapp/wxcomponents/vant/loading/index.wxml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - diff --git a/mpuniapp/wxcomponents/vant/loading/index.wxss b/mpuniapp/wxcomponents/vant/loading/index.wxss deleted file mode 100644 index f28a6b4..0000000 --- a/mpuniapp/wxcomponents/vant/loading/index.wxss +++ /dev/null @@ -1 +0,0 @@ -@import '../common/index.wxss';:host{font-size:0;line-height:1}.van-loading{display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#c8c9cc;color:var(--loading-spinner-color,#c8c9cc)}.van-loading__spinner{position:relative;box-sizing:border-box;width:30px;width:var(--loading-spinner-size,30px);max-width:100%;max-height:100%;height:30px;height:var(--loading-spinner-size,30px);-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite;-webkit-animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border:1px solid transparent;border-top-color:initial;border-radius:100%}.van-loading__text{margin-left:8px;margin-left:var(--padding-xs,8px);color:#969799;color:var(--loading-text-color,#969799);font-size:14px;font-size:var(--loading-text-font-size,14px);line-height:20px;line-height:var(--loading-text-line-height,20px)}.van-loading__text:empty{display:none}.van-loading--vertical{-webkit-flex-direction:column;flex-direction:column}.van-loading--vertical .van-loading__text{margin:8px 0 0;margin:var(--padding-xs,8px) 0 0}.van-loading__dot{position:absolute;top:0;left:0;width:100%;height:100%}.van-loading__dot:before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:" "}.van-loading__dot:first-of-type{-webkit-transform:rotate(30deg);transform:rotate(30deg);opacity:1}.van-loading__dot:nth-of-type(2){-webkit-transform:rotate(60deg);transform:rotate(60deg);opacity:.9375}.van-loading__dot:nth-of-type(3){-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:.875}.van-loading__dot:nth-of-type(4){-webkit-transform:rotate(120deg);transform:rotate(120deg);opacity:.8125}.van-loading__dot:nth-of-type(5){-webkit-transform:rotate(150deg);transform:rotate(150deg);opacity:.75}.van-loading__dot:nth-of-type(6){-webkit-transform:rotate(180deg);transform:rotate(180deg);opacity:.6875}.van-loading__dot:nth-of-type(7){-webkit-transform:rotate(210deg);transform:rotate(210deg);opacity:.625}.van-loading__dot:nth-of-type(8){-webkit-transform:rotate(240deg);transform:rotate(240deg);opacity:.5625}.van-loading__dot:nth-of-type(9){-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:.5}.van-loading__dot:nth-of-type(10){-webkit-transform:rotate(300deg);transform:rotate(300deg);opacity:.4375}.van-loading__dot:nth-of-type(11){-webkit-transform:rotate(330deg);transform:rotate(330deg);opacity:.375}.van-loading__dot:nth-of-type(12){-webkit-transform:rotate(1turn);transform:rotate(1turn);opacity:.3125}@-webkit-keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} \ No newline at end of file diff --git a/mpuniapp/wxcomponents/vant/mixins/basic.d.ts b/mpuniapp/wxcomponents/vant/mixins/basic.d.ts deleted file mode 100644 index b273369..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/basic.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const basic: string; diff --git a/mpuniapp/wxcomponents/vant/mixins/basic.js b/mpuniapp/wxcomponents/vant/mixins/basic.js deleted file mode 100644 index 2fdd634..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/basic.js +++ /dev/null @@ -1,22 +0,0 @@ -export const basic = Behavior({ - methods: { - $emit(...args) { - this.triggerEvent(...args); - }, - getRect(selector, all) { - return new Promise(resolve => { - wx.createSelectorQuery() - .in(this)[all ? 'selectAll' : 'select'](selector) - .boundingClientRect(rect => { - if (all && Array.isArray(rect) && rect.length) { - resolve(rect); - } - if (!all && rect) { - resolve(rect); - } - }) - .exec(); - }); - } - } -}); diff --git a/mpuniapp/wxcomponents/vant/mixins/button.d.ts b/mpuniapp/wxcomponents/vant/mixins/button.d.ts deleted file mode 100644 index b51db87..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/button.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const button: string; diff --git a/mpuniapp/wxcomponents/vant/mixins/button.js b/mpuniapp/wxcomponents/vant/mixins/button.js deleted file mode 100644 index 5d3b4dc..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/button.js +++ /dev/null @@ -1,18 +0,0 @@ -export const button = Behavior({ - externalClasses: ['hover-class'], - properties: { - id: String, - lang: { - type: String, - value: 'en' - }, - businessId: Number, - sessionFrom: String, - sendMessageTitle: String, - sendMessagePath: String, - sendMessageImg: String, - showMessageCard: Boolean, - appParameter: String, - ariaLabel: String - } -}); diff --git a/mpuniapp/wxcomponents/vant/mixins/link.d.ts b/mpuniapp/wxcomponents/vant/mixins/link.d.ts deleted file mode 100644 index d58043b..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/link.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const link: string; diff --git a/mpuniapp/wxcomponents/vant/mixins/link.js b/mpuniapp/wxcomponents/vant/mixins/link.js deleted file mode 100644 index d7aed0c..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/link.js +++ /dev/null @@ -1,17 +0,0 @@ -export const link = Behavior({ - properties: { - url: String, - linkType: { - type: String, - value: 'navigateTo' - } - }, - methods: { - jumpLink(urlKey = 'url') { - const url = this.data[urlKey]; - if (url) { - wx[this.data.linkType]({ url }); - } - } - } -}); diff --git a/mpuniapp/wxcomponents/vant/mixins/observer/behavior.d.ts b/mpuniapp/wxcomponents/vant/mixins/observer/behavior.d.ts deleted file mode 100644 index 3da2a64..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/observer/behavior.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const behavior: string; diff --git a/mpuniapp/wxcomponents/vant/mixins/observer/behavior.js b/mpuniapp/wxcomponents/vant/mixins/observer/behavior.js deleted file mode 100644 index 948f446..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/observer/behavior.js +++ /dev/null @@ -1,14 +0,0 @@ -export const behavior = Behavior({ - methods: { - set(data, callback) { - return new Promise(resolve => { - this.setData(data, () => { - if (callback && typeof callback === 'function') { - callback.call(this); - } - resolve(); - }); - }); - } - } -}); diff --git a/mpuniapp/wxcomponents/vant/mixins/observer/index.d.ts b/mpuniapp/wxcomponents/vant/mixins/observer/index.d.ts deleted file mode 100644 index 4e54b2e..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/observer/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function observe(vantOptions: any, options: any): void; diff --git a/mpuniapp/wxcomponents/vant/mixins/observer/index.js b/mpuniapp/wxcomponents/vant/mixins/observer/index.js deleted file mode 100644 index d6f608d..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/observer/index.js +++ /dev/null @@ -1,19 +0,0 @@ -import { behavior } from './behavior'; -export function observe(vantOptions, options) { - const { watch } = vantOptions; - options.behaviors.push(behavior); - if (watch) { - const props = options.properties || {}; - Object.keys(watch).forEach(key => { - if (key in props) { - let prop = props[key]; - if (prop === null || !('type' in prop)) { - prop = { type: prop }; - } - prop.observer = watch[key]; - props[key] = prop; - } - }); - options.properties = props; - } -} diff --git a/mpuniapp/wxcomponents/vant/mixins/open-type.d.ts b/mpuniapp/wxcomponents/vant/mixins/open-type.d.ts deleted file mode 100644 index 64b023d..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/open-type.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const openType: string; diff --git a/mpuniapp/wxcomponents/vant/mixins/open-type.js b/mpuniapp/wxcomponents/vant/mixins/open-type.js deleted file mode 100644 index 514517e..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/open-type.js +++ /dev/null @@ -1,25 +0,0 @@ -export const openType = Behavior({ - properties: { - openType: String - }, - methods: { - bindGetUserInfo(event) { - this.$emit('getuserinfo', event.detail); - }, - bindContact(event) { - this.$emit('contact', event.detail); - }, - bindGetPhoneNumber(event) { - this.$emit('getphonenumber', event.detail); - }, - bindError(event) { - this.$emit('error', event.detail); - }, - bindLaunchApp(event) { - this.$emit('launchapp', event.detail); - }, - bindOpenSetting(event) { - this.$emit('opensetting', event.detail); - }, - } -}); diff --git a/mpuniapp/wxcomponents/vant/mixins/touch.d.ts b/mpuniapp/wxcomponents/vant/mixins/touch.d.ts deleted file mode 100644 index 35ee831..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/touch.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const touch: string; diff --git a/mpuniapp/wxcomponents/vant/mixins/touch.js b/mpuniapp/wxcomponents/vant/mixins/touch.js deleted file mode 100644 index 2a79426..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/touch.js +++ /dev/null @@ -1,35 +0,0 @@ -const MIN_DISTANCE = 10; -function getDirection(x, y) { - if (x > y && x > MIN_DISTANCE) { - return 'horizontal'; - } - if (y > x && y > MIN_DISTANCE) { - return 'vertical'; - } - return ''; -} -export const touch = Behavior({ - methods: { - resetTouchStatus() { - this.direction = ''; - this.deltaX = 0; - this.deltaY = 0; - this.offsetX = 0; - this.offsetY = 0; - }, - touchStart(event) { - this.resetTouchStatus(); - const touch = event.touches[0]; - this.startX = touch.clientX; - this.startY = touch.clientY; - }, - touchMove(event) { - const touch = event.touches[0]; - this.deltaX = touch.clientX - this.startX; - this.deltaY = touch.clientY - this.startY; - this.offsetX = Math.abs(this.deltaX); - this.offsetY = Math.abs(this.deltaY); - this.direction = this.direction || getDirection(this.offsetX, this.offsetY); - } - } -}); diff --git a/mpuniapp/wxcomponents/vant/mixins/transition.d.ts b/mpuniapp/wxcomponents/vant/mixins/transition.d.ts deleted file mode 100644 index ee7b6ca..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/transition.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const transition: (showDefaultValue: boolean) => any; diff --git a/mpuniapp/wxcomponents/vant/mixins/transition.js b/mpuniapp/wxcomponents/vant/mixins/transition.js deleted file mode 100644 index a64df6a..0000000 --- a/mpuniapp/wxcomponents/vant/mixins/transition.js +++ /dev/null @@ -1,120 +0,0 @@ -import { isObj } from '../common/utils'; -const getClassNames = (name) => ({ - enter: `van-${name}-enter van-${name}-enter-active enter-class enter-active-class`, - 'enter-to': `van-${name}-enter-to van-${name}-enter-active enter-to-class enter-active-class`, - leave: `van-${name}-leave van-${name}-leave-active leave-class leave-active-class`, - 'leave-to': `van-${name}-leave-to van-${name}-leave-active leave-to-class leave-active-class` -}); -const nextTick = () => new Promise(resolve => setTimeout(resolve, 1000 / 30)); -export const transition = function (showDefaultValue) { - return Behavior({ - properties: { - customStyle: String, - // @ts-ignore - show: { - type: Boolean, - value: showDefaultValue, - observer: 'observeShow' - }, - // @ts-ignore - duration: { - type: null, - value: 300, - observer: 'observeDuration' - }, - name: { - type: String, - value: 'fade' - } - }, - data: { - type: '', - inited: false, - display: false - }, - attached() { - if (this.data.show) { - this.enter(); - } - }, - methods: { - observeShow(value) { - value ? this.enter() : this.leave(); - }, - enter() { - const { duration, name } = this.data; - const classNames = getClassNames(name); - const currentDuration = isObj(duration) ? duration.enter : duration; - this.status = 'enter'; - this.$emit('before-enter'); - Promise.resolve() - .then(nextTick) - .then(() => { - this.checkStatus('enter'); - this.$emit('enter'); - this.setData({ - inited: true, - display: true, - classes: classNames.enter, - currentDuration - }); - }) - .then(nextTick) - .then(() => { - this.checkStatus('enter'); - this.transitionEnded = false; - this.setData({ - classes: classNames['enter-to'] - }); - }) - .catch(() => { }); - }, - leave() { - if (!this.data.display) { - return; - } - const { duration, name } = this.data; - const classNames = getClassNames(name); - const currentDuration = isObj(duration) ? duration.leave : duration; - this.status = 'leave'; - this.$emit('before-leave'); - Promise.resolve() - .then(nextTick) - .then(() => { - this.checkStatus('leave'); - this.$emit('leave'); - this.setData({ - classes: classNames.leave, - currentDuration - }); - }) - .then(nextTick) - .then(() => { - this.checkStatus('leave'); - this.transitionEnded = false; - setTimeout(() => this.onTransitionEnd(), currentDuration); - this.setData({ - classes: classNames['leave-to'] - }); - }) - .catch(() => { }); - }, - checkStatus(status) { - if (status !== this.status) { - throw new Error(`incongruent status: ${status}`); - } - }, - onTransitionEnd() { - if (this.transitionEnded) { - return; - } - this.transitionEnded = true; - this.$emit(`after-${this.status}`); - const { show, display } = this.data; - if (!show && display) { - this.setData({ display: false }); - } - } - } - }); -}; diff --git a/mpuniapp/wxcomponents/vant/wxs/array.wxs b/mpuniapp/wxcomponents/vant/wxs/array.wxs deleted file mode 100644 index 7832416..0000000 --- a/mpuniapp/wxcomponents/vant/wxs/array.wxs +++ /dev/null @@ -1,5 +0,0 @@ -function isArray(array) { - return array && (array.constructor === 'Array' || (typeof Array !== 'undefined' && Array.isArray(array))); -} - -module.exports.isArray = isArray; diff --git a/mpuniapp/wxcomponents/vant/wxs/bem.wxs b/mpuniapp/wxcomponents/vant/wxs/bem.wxs deleted file mode 100644 index 93b2777..0000000 --- a/mpuniapp/wxcomponents/vant/wxs/bem.wxs +++ /dev/null @@ -1,38 +0,0 @@ -var array = require('./array.wxs'); -var object = require('./object.wxs'); -var PREFIX = 'van-'; - -function join(name, mods) { - name = PREFIX + name; - mods = mods.map(function(mod) { - return name + '--' + mod; - }); - mods.unshift(name); - return mods.join(' '); -} - -function traversing(mods, conf) { - if (!conf) { - return; - } - - if (typeof conf === 'string' || typeof conf === 'number') { - mods.push(conf); - } else if (array.isArray(conf)) { - conf.forEach(function(item) { - traversing(mods, item); - }); - } else if (typeof conf === 'object') { - object.keys(conf).forEach(function(key) { - conf[key] && mods.push(key); - }); - } -} - -function bem(name, conf) { - var mods = []; - traversing(mods, conf); - return join(name, mods); -} - -module.exports.bem = bem; diff --git a/mpuniapp/wxcomponents/vant/wxs/memoize.wxs b/mpuniapp/wxcomponents/vant/wxs/memoize.wxs deleted file mode 100644 index 261ae67..0000000 --- a/mpuniapp/wxcomponents/vant/wxs/memoize.wxs +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Simple memoize - * wxs doesn't support fn.apply, so this memoize only support up to 2 args - */ - -function isPrimitive(value) { - var type = typeof value; - return ( - type === 'boolean' || - type === 'number' || - type === 'string' || - type === 'undefined' || - value === null - ); -} - -// mock simple fn.call in wxs -function call(fn, args) { - if (args.length === 2) { - return fn(args[0], args[1]); - } - - if (args.length === 1) { - return fn(args[0]); - } - - return fn(); -} - -function serializer(args) { - if (args.length === 1 && isPrimitive(args[0])) { - return args[0]; - } - var obj = {}; - for (var i = 0; i < args.length; i++) { - obj['key' + i] = args[i]; - } - return JSON.stringify(obj); -} - -function memoize(fn) { - var cache = {}; - - return function() { - var key = serializer(arguments); - if (cache[key] === undefined) { - cache[key] = call(fn, arguments); - } - - return cache[key]; - }; -} - -module.exports.memoize = memoize; diff --git a/mpuniapp/wxcomponents/vant/wxs/object.wxs b/mpuniapp/wxcomponents/vant/wxs/object.wxs deleted file mode 100644 index e077107..0000000 --- a/mpuniapp/wxcomponents/vant/wxs/object.wxs +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint-disable */ -var REGEXP = getRegExp('{|}|"', 'g'); - -function keys(obj) { - return JSON.stringify(obj) - .replace(REGEXP, '') - .split(',') - .map(function(item) { - return item.split(':')[0]; - }); -} - -module.exports.keys = keys; diff --git a/mpuniapp/wxcomponents/vant/wxs/utils.wxs b/mpuniapp/wxcomponents/vant/wxs/utils.wxs deleted file mode 100644 index a18662d..0000000 --- a/mpuniapp/wxcomponents/vant/wxs/utils.wxs +++ /dev/null @@ -1,7 +0,0 @@ -var bem = require('./bem.wxs').bem; -var memoize = require('./memoize.wxs').memoize; - -module.exports = { - bem: memoize(bem), - memoize: memoize -}; diff --git a/mpuniapp/代码提交说明.md b/mpuniapp/代码提交说明.md deleted file mode 100644 index d96dbb3..0000000 --- a/mpuniapp/代码提交说明.md +++ /dev/null @@ -1,7 +0,0 @@ -# 代码提交 - -仅dev分支允许创建新的提交,master分支与alpha分支仅允许从其他分支cherry-pick或merge。为防止提交代码到错误的分支,可以通过如下方式创建git hook在提交代码时进行检查。 - -```bash -npx husky@9.0.11 -``` \ No newline at end of file diff --git a/mpuniapp/分支及 tag 与 HBuilder 版本对应关系.md b/mpuniapp/分支及 tag 与 HBuilder 版本对应关系.md deleted file mode 100644 index e6a2470..0000000 --- a/mpuniapp/分支及 tag 与 HBuilder 版本对应关系.md +++ /dev/null @@ -1,9 +0,0 @@ -## 仓库分支与 HBuilder 版本对应关系 - -- master 对应 [HBuilder](https://www.dcloud.io/hbuilderx.html) 正式版 -- alpha 对应 [HBuilder](https://www.dcloud.io/hbuilderx.html) Alpha 版 -- dev 对应 [HBuilder](https://www.dcloud.io/hbuilderx.html) 内部 dev 版 - -## tags 与 HBuilder 版本对应关系 - -例: v_4.63-alpha 对应 HBuilder 4.63-alpha 版本 \ No newline at end of file diff --git a/mpuniapp/自动化测试说明.md b/mpuniapp/自动化测试说明.md deleted file mode 100644 index 19b4b85..0000000 --- a/mpuniapp/自动化测试说明.md +++ /dev/null @@ -1,11 +0,0 @@ -# 自动化测试 -项目下的js文件为自动化测试的nodejs文件,uni-app x手机端没有js引擎,是纯原生的。[自动化测试详见](https://uniapp.dcloud.net.cn/worktile/auto/quick-start.html) - -## 页面截图对比测试 -测试用例文件路径:pages/pages.test.js - -其中 pages 变量中保存了所有需要截图对比测试的页面地址,如果有新增示例页面需要截图对比测试将页面地址添加到此变量即可。 - -**注意** -- 添加到截图对比测试的页面列表,修改内容涉及到变更,需要在测试平台删除基准图 -- 动态内容页面不适合截图对比测试,不要添加到截图对比测试的页面列表中 \ No newline at end of file diff --git a/mpuniapp/鸿蒙新用户指引.md b/mpuniapp/鸿蒙新用户指引.md deleted file mode 100644 index 9f680a4..0000000 --- a/mpuniapp/鸿蒙新用户指引.md +++ /dev/null @@ -1,12 +0,0 @@ -# 鸿蒙新用户指引 - -普通用户首次运行 hello uni-app x 需要做如下调整: - -- 配置签名证书。修改 `harmony-configs/build-profile.json5` 文件,修改为自己的证书签名 -- 配置包名。修改 `manifest.json` 的鸿蒙 App 配置 - 包名,修改为自己的包名 -- 移除敏感 ACL 权限,普通开发者可能并没有剪切板操作权限,打开 `harmony-configs/entry/src/main/module.json5` 找到 `READ_PAATEBOARD` 删除。对应的页面示例也会失效。 -- 移除功能依赖的页面,有些用户并没有开通 uni-push/一键登录,可选注释 pages.json 中的 - - `pages/API/get-uni-verify-manager/get-uni-verify-manager` - - `pages/API/get-uni-verify-manager/univerify-custom-page` - - `pages/API/uni-push/uni-push` -- 同步调整 manifest.json,`app` 和 `app-harmony` 的 module 节点根据需求调整。