mirror of
https://github.com/dergigi/boris.git
synced 2026-01-25 01:34:30 +01:00
fix: avoid deep imports for Vercel compatibility
- Define APP_DATA_KIND constant inline (30078 for NIP-78) - Implement getAppDataContent helper inline to parse JSON - Import AppDataBlueprint from 'applesauce-factory/blueprints' main export - Fixes Vercel build errors with deep package imports
This commit is contained in:
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -5,7 +5,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Boris - Nostr Bookmarks</title>
|
||||
<script type="module" crossorigin src="/assets/index-D55Gme04.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-B2pQs-Td.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-Bqz-n1DY.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -1,12 +1,22 @@
|
||||
import { IEventStore, mapEventsToStore } from 'applesauce-core'
|
||||
import { APP_DATA_KIND, getAppDataContent } from 'applesauce-core/helpers/app-data'
|
||||
import { AppDataBlueprint } from 'applesauce-factory/blueprints/app-data'
|
||||
import { EventFactory } from 'applesauce-factory'
|
||||
import { AppDataBlueprint } from 'applesauce-factory/blueprints'
|
||||
import { RelayPool, onlyEvents } from 'applesauce-relay'
|
||||
import { NostrEvent } from 'nostr-tools'
|
||||
import { firstValueFrom } from 'rxjs'
|
||||
|
||||
const SETTINGS_IDENTIFIER = 'com.dergigi.boris.user-settings'
|
||||
const APP_DATA_KIND = 30078 // NIP-78 Application Data
|
||||
|
||||
// Helper to extract and parse app data content from an event
|
||||
function getAppDataContent<R>(event: NostrEvent): R | undefined {
|
||||
if (!event.content || event.content.length === 0) return undefined
|
||||
try {
|
||||
return JSON.parse(event.content) as R
|
||||
} catch {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
export interface UserSettings {
|
||||
collapseOnArticleOpen?: boolean
|
||||
|
||||
Reference in New Issue
Block a user