mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 09:01:19 +00:00
feat: pass context to feed post-processors (#43)
Post-processors now receive Context as their 2nd parameter, allowing them to use contextual data (time, location, etc.) when producing enhancements. Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -333,12 +333,10 @@ describe("FeedPostProcessor", () => {
|
||||
},
|
||||
}
|
||||
|
||||
const engine = new FeedEngine()
|
||||
.register(source)
|
||||
.registerPostProcessor(async () => {
|
||||
callCount++
|
||||
return {}
|
||||
})
|
||||
const engine = new FeedEngine().register(source).registerPostProcessor(async () => {
|
||||
callCount++
|
||||
return {}
|
||||
})
|
||||
|
||||
engine.start()
|
||||
|
||||
@@ -377,12 +375,10 @@ describe("FeedPostProcessor", () => {
|
||||
},
|
||||
}
|
||||
|
||||
const engine = new FeedEngine()
|
||||
.register(source)
|
||||
.registerPostProcessor(async () => {
|
||||
callCount++
|
||||
return {}
|
||||
})
|
||||
const engine = new FeedEngine().register(source).registerPostProcessor(async () => {
|
||||
callCount++
|
||||
return {}
|
||||
})
|
||||
|
||||
engine.start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user