Skip to content

feat(core): introduce opaque storage adapters#110

Closed
Egge21M wants to merge 3 commits intomasterfrom
storage-api
Closed

feat(core): introduce opaque storage adapters#110
Egge21M wants to merge 3 commits intomasterfrom
storage-api

Conversation

@Egge21M
Copy link
Copy Markdown
Collaborator

@Egge21M Egge21M commented Mar 13, 2026

Summary

  • replace direct repository-bag injection with an opaque CocoStorage contract in core
  • add an adapter-only internal storage entrypoint so adapters can still access repositories and transactions without exposing them through the app-facing API
  • migrate coco-cashu-sqlite-bun and related tests/docs to the new storage-based initialization flow

Why

The framework is intended to be used through Manager and the public APIs it exposes. Previously, consumers had easy access to individual repositories because storage adapters surfaced the full repository bag directly. This change narrows the public boundary while still preserving a supported path for adapter authors.

What Changed

  • added an internal storage adapter boundary in packages/core
  • kept root CocoStorage minimal and app-facing
  • moved internal adapter access behind the adapter-only subpath
  • removed remaining direct repository plumbing from Manager
  • updated watcher bootstrapping to go through services
  • migrated sqlite-bun as the proof-of-concept adapter
  • updated docs and examples from repo to storage

Follow-ups

  • migrate sqlite3, indexeddb, and expo-sqlite to the same internal storage adapter pattern

Egge21M added 3 commits March 13, 2026 11:49
Keep app-facing storage opaque while giving adapters a supported internal access hook. Route watcher bootstrap through services so Manager no longer needs to retain raw repositories.
Expose an opaque SqliteStorage to app code while preserving adapter test coverage and transaction helpers. This keeps sqlite-bun aligned with the new core storage boundary without exposing repository properties.
Update guides and package READMEs to explain the opaque storage adapter flow. This keeps examples aligned with the new Manager initialization contract and sqlite-bun proof of concept.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 13, 2026

⚠️ No Changeset found

Latest commit: 2811de8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Egge21M Egge21M closed this Apr 7, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Done in coco Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant