From 2822c5902a06fc41e2609f2c4517459e9547f5c7 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 22 Dec 2025 18:46:37 +0800 Subject: [PATCH] fix(workflow): ignore redis and remote config in build-routes --- scripts/workflow/build-routes.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/workflow/build-routes.ts b/scripts/workflow/build-routes.ts index 3d6b32322e..840dc038ce 100644 --- a/scripts/workflow/build-routes.ts +++ b/scripts/workflow/build-routes.ts @@ -4,13 +4,17 @@ import path from 'node:path'; import { parse } from 'tldts'; import toSource from 'tosource'; -import { config } from '../../lib/config'; -import { namespaces } from '../../lib/registry'; import type { RadarItem } from '../../lib/types'; import { getCurrentPath } from '../../lib/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); +// Ignore Redis and remote config in route generation to avoid side effects. +process.env.REDIS_URL = ''; +process.env.REMOTE_CONFIG = ''; + +const [{ config }, { namespaces }] = await Promise.all([import('../../lib/config'), import('../../lib/registry')]); + type FoloAnalysis = Record; const loadFoloAnalysis = async (): Promise => {