Remove Fluent, Tags

This commit is contained in:
Jon Staab
2024-12-13 15:18:33 -08:00
parent 6235c3f6bb
commit 760d6d07cd
7 changed files with 14 additions and 258 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
import {uniq, identity, flatten, pushToMapKey, intersection, tryCatch, now} from '@welshman/lib'
import type {TrustedEvent, Filter} from '@welshman/util'
import {Tags, intersectFilters, matchFilter, getAddress, getIdFilters, unionFilters} from '@welshman/util'
import {intersectFilters, matchFilter, getAddress, getIdFilters, unionFilters} from '@welshman/util'
import type {CreatedAtItem, RequestItem, ListItem, LabelItem, WOTItem, DVMItem, Scope, Feed, FeedOptions} from './core'
import {getFeedArgs, feedsFromTags} from './utils'
import {FeedType} from './core'
@@ -110,7 +110,7 @@ export class FeedCompiler {
this.options.requestDVM({
...request,
onEvent: async (e: TrustedEvent) => {
const tags = Tags.wrap(await tryCatch(() => JSON.parse(e.content)) || [])
const tags = await tryCatch(() => JSON.parse(e.content)) || []
for (const feed of feedsFromTags(tags, mappings)) {
feeds.push(feed)
@@ -231,7 +231,7 @@ export class FeedCompiler {
const event = eventsByAddress.get(address)
if (event) {
for (const feed of feedsFromTags(Tags.fromEvent(event), mappings)) {
for (const feed of feedsFromTags(event.tags, mappings)) {
feeds.push(feed)
}
}
@@ -271,7 +271,7 @@ export class FeedCompiler {
}
}
return feedsFromTags(Tags.wrap(tags), mappings)
return feedsFromTags(tags, mappings)
})
)
)