mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-23 22:55:24 +00:00
refactor: simplify typed conversions
This commit is contained in:
@@ -62,8 +62,8 @@ function stripInlineCode(text) {
|
||||
const docsConfig = JSON.parse(fs.readFileSync(DOCS_JSON_PATH, "utf8"));
|
||||
const redirects = new Map();
|
||||
for (const item of docsConfig.redirects || []) {
|
||||
const source = normalizeRoute(String(item.source || ""));
|
||||
const destination = normalizeRoute(String(item.destination || ""));
|
||||
const source = normalizeRoute(item.source || "");
|
||||
const destination = normalizeRoute(item.destination || "");
|
||||
redirects.set(source, destination);
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ export function auditDocsLinks() {
|
||||
}
|
||||
|
||||
for (const page of collectNavPageEntries(docsConfig.navigation || [])) {
|
||||
if (isGeneratedTranslatedDoc(String(page))) {
|
||||
if (isGeneratedTranslatedDoc(page)) {
|
||||
continue;
|
||||
}
|
||||
checked++;
|
||||
|
||||
@@ -157,7 +157,7 @@ export async function collectBundledChannelConfigMetadata(params?: { repoRoot?:
|
||||
const label = resolveRootLabel(source, channelId);
|
||||
const description = resolveRootDescription(source, channelId);
|
||||
entries.push({
|
||||
pluginId: String(source.manifest.id),
|
||||
pluginId: source.manifest.id,
|
||||
channelId,
|
||||
...(label ? { label } : {}),
|
||||
...(description ? { description } : {}),
|
||||
|
||||
@@ -61,7 +61,7 @@ if (options.field) {
|
||||
if (value === undefined) {
|
||||
throw new Error(`Unknown iOS version field '${options.field}'.`);
|
||||
}
|
||||
process.stdout.write(`${String(value)}\n`);
|
||||
process.stdout.write(`${value}\n`);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user