mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 09:01:19 +00:00
feat: replace flat context with tuple-keyed store (#50)
Context keys are now tuples instead of strings, inspired by
React Query's query keys. This prevents context collisions
when multiple instances of the same source type are registered.
Sources write to structured keys like
["aris.google-calendar", "nextEvent", { account: "work" }]
and consumers can query by prefix via context.find().
Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
* bun run test-live.ts
|
||||
*/
|
||||
|
||||
import { Context } from "@aris/core"
|
||||
|
||||
import { CalDavSource } from "../src/index.ts"
|
||||
|
||||
const serverUrl = prompt("CalDAV server URL:")
|
||||
@@ -27,7 +29,7 @@ const source = new CalDavSource({
|
||||
lookAheadDays,
|
||||
})
|
||||
|
||||
const context = { time: new Date() }
|
||||
const context = new Context()
|
||||
|
||||
console.log(`\nFetching from ${serverUrl} as ${username} (lookAheadDays=${lookAheadDays})...\n`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user