New Base func

This commit is contained in:
Jakob Wennberg
2026-02-19 09:48:02 +01:00
parent afc9f69def
commit cdf1dcc4c8
73 changed files with 11036 additions and 51 deletions
+30
View File
@@ -0,0 +1,30 @@
import { extensionRegistry } from './registry'
import { receiptOcrExtension } from '@/extensions/receipt-ocr'
import { aiCategorizationExtension } from '@/extensions/ai-categorization'
import type { Extension } from './types'
/**
* Explicit list of first-party extensions.
*
* Next.js bundling requires static imports — no dynamic filesystem scanning.
* Add extensions here as they are built.
*/
const FIRST_PARTY_EXTENSIONS: Extension[] = [
receiptOcrExtension,
aiCategorizationExtension,
]
let loaded = false
/**
* Load and register all first-party extensions.
* Idempotent — safe to call multiple times.
*/
export function loadExtensions(): void {
if (loaded) return
loaded = true
for (const extension of FIRST_PARTY_EXTENSIONS) {
extensionRegistry.register(extension)
}
}