MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / getThemeHelpers

Function getThemeHelpers

desktop/runtime-host/theme-service.ts:57–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55}
56
57async function getThemeHelpers() {
58 if (!themeHelpersPromise) {
59 const piPackageRoot = await resolvePiPackageRootFromImport().catch(() => findPiPackageRoot())
60 const themeModulePath = path.join(piPackageRoot, 'dist', 'modes/interactive/theme/theme.js')
61 themeHelpersPromise = import(pathToFileURL(themeModulePath).href) as Promise<ThemeHelpersModule>
62 }
63 return themeHelpersPromise
64}
65
66function asDiagnostic(diagnostic: unknown): PiThemeState['diagnostics'][number] | null {
67 if (!diagnostic || typeof diagnostic !== 'object') return null

Callers 1

loadPiThemeStateInHostFunction · 0.85

Calls 2

findPiPackageRootFunction · 0.70

Tested by

no test coverage detected