ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/llms-txt-hub / apps/web/lib/extension-updates.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/lib/extension-updates.ts
DateNot specified in source
RepositoryJanady13/llms-txt-hub
Revisione0f4bf978d4df168369c7601d9c5f5ea89e84377
Branchmain
Path or archive memberapps/web/lib/extension-updates.ts
Original SHA-25668edf630776b20111710e237b9f6b1863ffbeca65ac27ded4c1ac8c1100d98d8
Git blob SHA54f255aa5c36bc2f632209a904760dd148908315
Reading-copy SHA-25668edf630776b20111710e237b9f6b1863ffbeca65ac27ded4c1ac8c1100d98d8

Original source ↗

Recovered source transcript

let allExtensionUpdates: any[] = [] try { const collections = require('@/.content-collections/generated') allExtensionUpdates = collections.allExtensionUpdates || [] } catch { if (process.env.NODE_ENV !== 'test') { console.warn('Extension update content collection not available, using empty array') } } interface ContentMeta { path: string content?: string } interface ExtensionUpdate { slug?: string version: string title: string description: string date: string published: boolean highlights: string[] content?: string _meta?: ContentMeta } export interface ExtensionUpdateMetadata { slug: string version: string title: string description: string date: string published: boolean highlights: string[] content?: string } /** * Normalize extension versions so both `v2.0.0` and `2.0.0` match. * * @param version - Version string from query/frontmatter * @returns Normalized version without leading `v` */ function normalizeExtensionVersion(version: string): string { if (typeof version !== 'string') { return '' } const normalized = version.trim().toLowerCase() return normalized.startsWith('v') ? normalized.slice(1) : normalized } /** * Return all published extension updates sorted by release date descending. * * @returns List of normalized extension updates */ export function getExtensionUpdates(): ExtensionUpdateMetadata[] { return allExtensionUpdates .filter((update: ExtensionUpdate) => update.published) .map((update: ExtensionUpdate) => ({ slug: update.slug || update._meta?.path || '', version: update.version || '', title: update.title || '', description: update.description || '', date: update.date || '', published: update.published !== false, highlights: Array.isArray(update.highlights) ? update.highlights.slice(0, 5) : [], content: update.content || update._meta?.content || '' })) .sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()) } /** * Return the newest published extension update. * * @returns Latest update or null when none exist */ export function getLatestExtensionUpdate(): ExtensionUpdateMetadata | null { const updates = getExtensionUpdates() return updates.length > 0 ? updates[0] : null } /** * Resolve an extension update by version. * * @param version - Version identifier (`2.0.0` or `v2.0.0`) * @returns Matching update or null */ export function getExtensionUpdateByVersion(version: string): ExtensionUpdateMetadata | null { const normalizedTarget = normalizeExtensionVersion(version) if (!normalizedTarget) { return null } const updates = getExtensionUpdates() return ( updates.find(update => normalizeExtensionVersion(update.version) === normalizedTarget) || null ) }

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