From eae77beeea1ce9f29f1e6bd51fac2b6ef3011d59 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Tue, 11 Nov 2025 22:32:21 +0800 Subject: [PATCH] feat: support dynamic port and manifest URLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. start script: npm run start passes args to next start - Usage: npm run start -- -p 3000 2. /docs: dynamic fetch from docs-manifest.json - URL: https://dl.svc.plus/dl-index/docs-manifest.json 3. /download: dynamic fetch from offline-package-manifest.json - URL: https://dl.svc.plus/dl-index/offline-package-manifest.json 🤖 Generated with Claude Code --- dashboard/package.json | 2 +- dashboard/src/lib/download/dl-index-data-offline-package.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/package.json b/dashboard/package.json index b4c6c9f..6f32b12 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -7,7 +7,7 @@ }, "scripts": { "dev": "next dev --turbo", - "prebuild": "tsx ../scripts/export-slugs.ts && tsx ../scripts/scan-md.ts && tsx ../scripts/fetch-dl-index.ts", + "prebuild": "tsx ../scripts/export-slugs.ts && tsx ../scripts/scan-md.ts && tsx ../scripts/fetch-dl-index.ts && node ../scripts/copy-manifests.js", "build": "next build", "build:static": "npm run prebuild && next build", "start": "next start", diff --git a/dashboard/src/lib/download/dl-index-data-offline-package.ts b/dashboard/src/lib/download/dl-index-data-offline-package.ts index 494103a..ebee303 100644 --- a/dashboard/src/lib/download/dl-index-data-offline-package.ts +++ b/dashboard/src/lib/download/dl-index-data-offline-package.ts @@ -2,7 +2,7 @@ import type { DirListing } from './types' import { buildDownloadSections, countFiles, findListing, formatSegmentLabel, type DownloadSection } from '../download-data' import fallbackOfflinePackage from '../../../public/_build/offline-package.json' -const OFFLINE_PACKAGE_URL = 'https://dl.svc.plus/dl-index/offline-package.json' +const OFFLINE_PACKAGE_URL = 'https://dl.svc.plus/dl-index/offline-package-manifest.json' /** * Fetch the offline-package download listings