rsshub: fix __dirname not defined and change maintainer; 0-unstable-2025-05-31 -> 0-unstable-2025-11-28 (#463265)
This commit is contained in:
@@ -1,18 +1,45 @@
|
||||
diff --git a/scripts/workflow/build-routes.ts b/scripts/workflow/build-routes.ts
|
||||
index 9807cfc..b9dcfb9 100644
|
||||
index 1bbb64cc5..941d86149 100644
|
||||
--- a/scripts/workflow/build-routes.ts
|
||||
+++ b/scripts/workflow/build-routes.ts
|
||||
@@ -4,6 +4,7 @@ import { parse } from 'tldts';
|
||||
@@ -1,5 +1,6 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import toSource from 'tosource';
|
||||
+import { exit } from 'node:process';
|
||||
|
||||
import { getCurrentPath } from '../../lib/utils/helpers';
|
||||
|
||||
import { parse } from 'tldts';
|
||||
import toSource from 'tosource';
|
||||
@@ -11,17 +12,7 @@ import { getCurrentPath } from '../../lib/utils/helpers';
|
||||
|
||||
const __dirname = getCurrentPath(import.meta.url);
|
||||
@@ -73,3 +74,5 @@ fs.writeFileSync(path.join(__dirname, '../../assets/build/radar-rules.js'), `(${
|
||||
fs.writeFileSync(path.join(__dirname, '../../assets/build/maintainers.json'), JSON.stringify(maintainers, null, 2));
|
||||
|
||||
-const foloAnalysis = await (
|
||||
- await fetch('https://raw.githubusercontent.com/RSSNext/rsshub-docs/refs/heads/main/rsshub-analytics.json', {
|
||||
- headers: {
|
||||
- 'user-agent': config.trueUA,
|
||||
- },
|
||||
- })
|
||||
-).json();
|
||||
-const foloAnalysisResult = foloAnalysis.data as Record<string, { subscriptionCount: number; topFeeds: any[] }>;
|
||||
-const foloAnalysisTop100 = Object.entries(foloAnalysisResult)
|
||||
- .sort((a, b) => b[1].subscriptionCount - a[1].subscriptionCount)
|
||||
- .slice(0, 150);
|
||||
+const foloAnalysisTop100: any[] = [];
|
||||
|
||||
const maintainers: Record<string, string[]> = {};
|
||||
const radar: {
|
||||
@@ -100,7 +91,7 @@ const uniquePaths = [...allRoutePaths].toSorted();
|
||||
const routePathsType = `// This file is auto-generated by scripts/workflow/build-routes.ts
|
||||
// Do not edit manually
|
||||
|
||||
-export type RoutePath =
|
||||
+export type RoutePath =
|
||||
${uniquePaths.map((path) => ` | \`${path}\``).join('\n')};
|
||||
`;
|
||||
|
||||
@@ -110,3 +101,5 @@ fs.writeFileSync(path.join(__dirname, '../../assets/build/maintainers.json'), JS
|
||||
fs.writeFileSync(path.join(__dirname, '../../assets/build/routes.json'), JSON.stringify(namespaces, null, 2));
|
||||
fs.writeFileSync(path.join(__dirname, '../../assets/build/routes.js'), `export default ${JSON.stringify(namespaces, null, 2)}`.replaceAll(/"module": "(.*)"\n/g, `"module": $1\n`));
|
||||
fs.writeFileSync(path.join(__dirname, '../../assets/build/route-paths.ts'), routePathsType);
|
||||
+
|
||||
+exit(0);
|
||||
|
||||
@@ -12,13 +12,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rsshub";
|
||||
version = "0-unstable-2025-05-31";
|
||||
version = "0-unstable-2025-11-28";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "DIYgod";
|
||||
repo = "RSSHub";
|
||||
rev = "2dce2e32dd5f4dade2fc915ac8384c953e11cc83";
|
||||
hash = "sha256-gS/t6O3MishJgi2K9hV22hT95oYHfm44cJqrUo2GPlM=";
|
||||
rev = "b6dbafe33e0c3e3a4ba5a1edd2da29b70412389f";
|
||||
hash = "sha256-FsevO2nb6leuuRmzCLIy093FCafl3Y/CsSp1ydJOnKY=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
pnpmDeps = pnpm.fetchDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
fetcherVersion = 1;
|
||||
hash = "sha256-7qh6YZbIH/kHVssDZxHY7X8bytrnMcUq0MiJzWZYItc=";
|
||||
hash = "sha256-zTsJZnhX7xUOsKST6S3TQUV8M1Tewcs9fZgrDSf5ba8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -48,8 +48,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin $out/lib/rsshub
|
||||
cp -r lib node_modules assets api package.json tsconfig.json $out/lib/rsshub
|
||||
mkdir -p $out/bin $out/lib/rsshub/lib
|
||||
cp -r dist node_modules $out/lib/rsshub
|
||||
cp -r lib/assets $out/lib/rsshub/lib
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
@@ -59,8 +60,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
--set "NODE_ENV" "production" \
|
||||
--set "NO_LOGFILES" "true" \
|
||||
--set "TSX_TSCONFIG_PATH" "$out/lib/rsshub/tsconfig.json" \
|
||||
--append-flags "$out/lib/rsshub/node_modules/tsx/dist/cli.mjs" \
|
||||
--append-flags "$out/lib/rsshub/lib/index.ts"
|
||||
--append-flags "$out/lib/rsshub/dist/index.mjs"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
@@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
homepage = "https://docs.rsshub.app";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ Guanran928 ];
|
||||
maintainers = with lib.maintainers; [ xinyangli ];
|
||||
mainProgram = "rsshub";
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user