feat: update backend repository url

This commit is contained in:
kunish 2023-12-01 18:36:46 +08:00
parent ee84c2f780
commit 43acdace5d
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430
4 changed files with 1300 additions and 1169 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "metacubexd", "name": "metacubexd",
"version": "1.130.0", "version": "1.129.0",
"description": "Clash.Meta Dashboard, The Official One, XD", "description": "Clash.Meta Dashboard, The Official One, XD",
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
@ -14,7 +14,7 @@
"serve": "vite preview" "serve": "vite preview"
}, },
"dependencies": { "dependencies": {
"@commitlint/config-conventional": "^18.1.0", "@commitlint/config-conventional": "^18.4.3",
"@felte/solid": "^1.2.11", "@felte/solid": "^1.2.11",
"@felte/validator-zod": "^1.0.17", "@felte/validator-zod": "^1.0.17",
"@fontsource/fira-sans": "^5.0.17", "@fontsource/fira-sans": "^5.0.17",
@ -28,48 +28,48 @@
"@solid-primitives/storage": "^2.1.1", "@solid-primitives/storage": "^2.1.1",
"@solid-primitives/timer": "^1.3.7", "@solid-primitives/timer": "^1.3.7",
"@solid-primitives/websocket": "^1.2.0", "@solid-primitives/websocket": "^1.2.0",
"@solidjs/router": "^0.8.3", "@solidjs/router": "^0.9.1",
"@tabler/icons-solidjs": "^2.40.0", "@tabler/icons-solidjs": "^2.42.0",
"@tanstack/match-sorter-utils": "^8.8.4", "@tanstack/match-sorter-utils": "^8.8.4",
"@tanstack/solid-table": "^8.10.7", "@tanstack/solid-table": "^8.10.7",
"@tanstack/solid-virtual": "3.0.0-beta.68", "@tanstack/solid-virtual": "3.0.0-beta.6",
"@tanstack/virtual-core": "3.0.0-beta.68", "@tanstack/virtual-core": "3.0.0-alpha.1",
"@thisbeyond/solid-dnd": "^0.7.4", "@thisbeyond/solid-dnd": "^0.7.5",
"@types/byte-size": "^8.1.1", "@types/byte-size": "^8.1.2",
"@types/lodash": "^4.14.200", "@types/lodash": "^4.14.202",
"@types/node": "^20.8.10", "@types/node": "^20.10.1",
"@types/uuid": "^9.0.6", "@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^6.9.1", "@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.9.1", "@typescript-eslint/parser": "^6.13.1",
"@vite-pwa/assets-generator": "^0.0.10", "@vite-pwa/assets-generator": "^0.0.11",
"apexcharts": "^3.44.0", "apexcharts": "^3.44.0",
"autoprefixer": "^10.4.16", "autoprefixer": "^10.4.16",
"byte-size": "^8.1.1", "byte-size": "^8.1.1",
"commitlint": "^18.2.0", "commitlint": "^18.4.3",
"daisyui": "^3.9.4", "daisyui": "^4.4.17",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"eslint": "^8.52.0", "eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0", "eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1", "eslint-plugin-prettier": "^5.0.1",
"husky": "^8.0.3", "husky": "^8.0.3",
"is-ip": "^5.0.1", "is-ip": "^5.0.1",
"ky": "^1.1.3", "ky": "^1.1.3",
"lint-staged": "^15.0.2", "lint-staged": "^15.1.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"match-sorter": "^6.3.1", "match-sorter": "^6.3.1",
"prettier": "^3.0.3", "prettier": "^3.1.0",
"prettier-plugin-organize-imports": "^3.2.3", "prettier-plugin-organize-imports": "^3.2.4",
"prettier-plugin-tailwindcss": "^0.5.6", "prettier-plugin-tailwindcss": "^0.5.7",
"solid-apexcharts": "^0.3.2", "solid-apexcharts": "^0.3.2",
"solid-js": "^1.8.5", "solid-js": "^1.8.6",
"solid-toast": "^0.5.0", "solid-toast": "^0.5.0",
"sort-package-json": "^2.6.0", "sort-package-json": "^2.6.0",
"tailwind-merge": "^2.0.0", "tailwind-merge": "^2.0.0",
"tailwindcss": "^3.3.5", "tailwindcss": "^3.3.5",
"typescript": "^5.2.2", "typescript": "^5.3.2",
"uuid": "^9.0.1", "uuid": "^9.0.1",
"vite": "^4.5.0", "vite": "^5.0.4",
"vite-plugin-pwa": "^0.16.6", "vite-plugin-pwa": "^0.17.2",
"vite-plugin-solid": "^2.7.2", "vite-plugin-solid": "^2.7.2",
"zod": "^3.22.4" "zod": "^3.22.4"
} }

2390
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -209,7 +209,12 @@ export const updateRuleProviderAPI = (providerName: string) => {
return request.put(`providers/rules/${providerName}`) return request.put(`providers/rules/${providerName}`)
} }
type ReleaseAPIResponse = {
assets: { name: string }[]
}
export const isUpdateAvailableAPI = async (versionResponse: string) => { export const isUpdateAvailableAPI = async (versionResponse: string) => {
const repositoryURL = 'https://api.github.com/repos/MetaCubeX/mihomo'
const match = /(alpha|beta|meta)-?(\w+)/.exec(versionResponse) const match = /(alpha|beta|meta)-?(\w+)/.exec(versionResponse)
if (!match) { if (!match) {
@ -221,12 +226,8 @@ export const isUpdateAvailableAPI = async (versionResponse: string) => {
if (channel === 'meta') { if (channel === 'meta') {
const { assets } = await ky const { assets } = await ky
.get('https://api.github.com/repos/MetaCubeX/Clash.Meta/releases/latest') .get(`${repositoryURL}/releases/latest`)
.json<{ .json<ReleaseAPIResponse>()
assets: {
name: string
}[]
}>()
const alreadyLatest = assets.some(({ name }) => name.includes(version)) const alreadyLatest = assets.some(({ name }) => name.includes(version))
@ -235,14 +236,8 @@ export const isUpdateAvailableAPI = async (versionResponse: string) => {
if (channel === 'alpha') { if (channel === 'alpha') {
const { assets } = await ky const { assets } = await ky
.get( .get(`${repositoryURL}/releases/tags/Prerelease-Alpha`)
'https://api.github.com/repos/MetaCubeX/Clash.Meta/releases/tags/Prerelease-Alpha', .json<ReleaseAPIResponse>()
)
.json<{
assets: {
name: string
}[]
}>()
const alreadyLatest = assets.some(({ name }) => name.includes(version)) const alreadyLatest = assets.some(({ name }) => name.includes(version))

View File

@ -40,10 +40,10 @@ const ThemeSwitcher = () => (
</label> </label>
</div> </div>
<div class="drawer-side"> <div class="drawer-side overflow-x-hidden">
<label for="themes" class="drawer-overlay" /> <label for="themes" class="drawer-overlay" />
<ul class="menu rounded-l-box gap-2 bg-base-300 p-2"> <ul class="menu gap-2 rounded-l-box bg-base-300 p-2">
<For each={themes}> <For each={themes}>
{(theme) => ( {(theme) => (
<li <li
@ -120,7 +120,7 @@ export const Header = () => {
<div class="drawer-side"> <div class="drawer-side">
<label for="navs" class="drawer-overlay" /> <label for="navs" class="drawer-overlay" />
<ul class="menu rounded-r-box min-h-full w-2/5 gap-2 bg-base-300 pt-20"> <ul class="menu min-h-full w-2/5 gap-2 rounded-r-box bg-base-300 pt-20">
<For each={navs()}> <For each={navs()}>
{({ href, name }) => ( {({ href, name }) => (
<li onClick={() => setOpenedDrawer(false)}> <li onClick={() => setOpenedDrawer(false)}>