chore(deps): update npm packages and adapt major upgrades

Resolve the MikroORM packages together and use the dispatcher adapter with older built-in fetch implementations. Preserve existing Lucide names and regenerate the Studio and SDK catalogs.
This commit is contained in:
Maurice
2026-12-01 13:32:28 +01:00
parent a14b6a61e6
commit 7f4ece2e6f
29 changed files with 2660 additions and 1016 deletions
+9 -3
View File
@@ -1,12 +1,20 @@
import type { CSSProperties } from 'react'
import * as LucideIcons from 'lucide-react'
import { Blocks, type LucideIcon } from 'lucide-react'
import { legacyLucideIcons } from './legacyLucideIcons'
// Lucide names are PascalCase. Restricting the lookup to that shape keeps a manifest
// from reaching lucide's non-icon exports (`createLucideIcon`, `icons`, `default`,
// `module.exports`), which are all lowercase-initial.
const LUCIDE_ICON_NAME = /^[A-Z][A-Za-z0-9]*$/
export function findLucideIcon(name: string | null | undefined): LucideIcon | undefined {
if (!name || !LUCIDE_ICON_NAME.test(name) || name === 'Icon') return undefined
const icon = (LucideIcons as unknown as Record<string, LucideIcon | undefined>)[name]
if (typeof icon === 'object') return icon
return legacyLucideIcons.get(name.replace(/^Lucide/, '').replace(/Icon$/, ''))
}
/**
* Resolves a plugin manifest's `icon` (a lucide icon name, e.g. "Stethoscope") to the
* matching lucide component, falling back to Blocks for a missing or unknown name.
@@ -17,9 +25,7 @@ const LUCIDE_ICON_NAME = /^[A-Z][A-Za-z0-9]*$/
* building nav/tab arrays.
*/
export function resolvePluginIcon(name: string | null | undefined): LucideIcon {
if (!name || !LUCIDE_ICON_NAME.test(name)) return Blocks
const icon = (LucideIcons as unknown as Record<string, LucideIcon | undefined>)[name]
return icon ?? Blocks
return findLucideIcon(name) ?? Blocks
}
/** Renders the lucide icon a plugin declares in its manifest (Blocks if unknown). */