ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/llms-txt-hub / apps/web/app/api/debug/content-paths/route.ts

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/llms-txt-hub / apps/web/app/api/debug/content-paths/route.ts
DateNot specified in source
RepositoryJanady13/llms-txt-hub
Revisione0f4bf978d4df168369c7601d9c5f5ea89e84377
Branchmain
Path or archive memberapps/web/app/api/debug/content-paths/route.ts
Original SHA-2564359edbea3109e1b9b7cd564aaf0bda920ad3177f5454e26c438d8103dbdb43d
Git blob SHAa6c097af6c4de2ef00aa809c2d86284788075345
Reading-copy SHA-2564359edbea3109e1b9b7cd564aaf0bda920ad3177f5454e26c438d8103dbdb43d

Original source ↗

Recovered source transcript

import fs from 'node:fs' import path from 'node:path' import { type NextRequest, NextResponse } from 'next/server' import { ensureDebugAccess } from '@/app/api/debug/_utils' /** * Endpoint to check content paths and debug content-collections issues */ export async function GET(_request: NextRequest) { const access = await ensureDebugAccess(_request) if (!access.ok) { return access.response } const paths = { cwd: process.cwd(), relPath: path.resolve(process.cwd(), '../../packages/content/data'), absPath: path.resolve(process.cwd(), '..', 'packages/content/data'), exists: { relPath: fs.existsSync(path.resolve(process.cwd(), '../../packages/content/data')), absPath: fs.existsSync(path.resolve(process.cwd(), '..', 'packages/content/data')) }, contentDirs: {} } // Check if content directories exist try { const contentDir = paths.exists.relPath ? paths.relPath : paths.absPath const dirs = ['websites', 'guides', 'resources', 'legal'] type ContentDirInfo = { path: string exists: boolean files: number } paths.contentDirs = dirs.reduce<Record<string, ContentDirInfo>>((acc, dir) => { const dirPath = path.join(contentDir, dir) acc[dir] = { path: dirPath, exists: fs.existsSync(dirPath), files: fs.existsSync(dirPath) ? fs.readdirSync(dirPath).length : 0 } return acc }, {}) } catch (error: unknown) { const errorMessage = error instanceof Error ? error.message : String(error) const errorStack = error instanceof Error ? error.stack : undefined return NextResponse.json({ paths, error: errorMessage, stack: errorStack }) } return NextResponse.json(paths) }

Search equations, builds, manuscript text, and recovered sources.