mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 09:01:19 +00:00
feat(core): add sourceId to FeedItem
Each FeedSource implementation now sets sourceId on items it produces, allowing consumers to trace items back to their originating source. Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -6,6 +6,7 @@ describe("FeedItem slots", () => {
|
||||
test("FeedItem without slots is valid", () => {
|
||||
const item: FeedItem<"test", { value: number }> = {
|
||||
id: "test-1",
|
||||
sourceId: "test-source",
|
||||
type: "test",
|
||||
timestamp: new Date(),
|
||||
data: { value: 42 },
|
||||
@@ -17,6 +18,7 @@ describe("FeedItem slots", () => {
|
||||
test("FeedItem with unfilled slots", () => {
|
||||
const item: FeedItem<"weather", { temp: number }> = {
|
||||
id: "weather-1",
|
||||
sourceId: "aelis.weather",
|
||||
type: "weather",
|
||||
timestamp: new Date(),
|
||||
data: { temp: 18 },
|
||||
@@ -41,6 +43,7 @@ describe("FeedItem slots", () => {
|
||||
test("FeedItem with filled slots", () => {
|
||||
const item: FeedItem<"weather", { temp: number }> = {
|
||||
id: "weather-1",
|
||||
sourceId: "aelis.weather",
|
||||
type: "weather",
|
||||
timestamp: new Date(),
|
||||
data: { temp: 18 },
|
||||
@@ -75,6 +78,7 @@ describe("FeedItem slots", () => {
|
||||
test("FeedItem with empty slots record", () => {
|
||||
const item: FeedItem<"test", { value: number }> = {
|
||||
id: "test-1",
|
||||
sourceId: "test-source",
|
||||
type: "test",
|
||||
timestamp: new Date(),
|
||||
data: { value: 1 },
|
||||
|
||||
Reference in New Issue
Block a user