You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rewrite "Writing an app" for collections, typed migrations and app installs #412
The root README contradicts the apps spec. Under "Writing an app" it says "An app that isn't the owner has no way to install its own types yet". docs/spec/apps.md and Stack.planInstall()/installApp() provide exactly that.
Rewrite "Writing an app" once, after the API in #405 has settled:
Startup:Stack.open(adapter, { migrations }) with typed migration(from, to, fn) values. The separate "register migrations on every start" layer goes.
Install:defineType(handle) for an owner-run app, and app installs for one the owner doesn't run: a manifest built from the handles (types: [Shelf, BookV1, Book, Review]), planInstall()/installApp(), pointing at docs/spec/apps.md.
Data layer: a class over StackClient holding one collection per Type, returning typed records from every verb, and handling misfits from a query.
Naming content types. Show interface BookContent extends ContentOf<typeof Book.schema> {}, since a type alias doesn't survive into editor hovers (ContentOf flattens its result) and an interface does. typescript-eslint's recommended no-empty-object-type rule rejects an empty interface, so mention its allowInterfaces: 'with-single-extends' option.
Actions
Root README.md and packages/core/README.md: "Writing an app" as above, replacing the "no way to install its own types yet" sentence.
Quick starts use a collection rather than handle-first overloads.
Changeset: patch for @haverstack/core (its README is published).
Order
Last in #405, so the READMEs are written once against #407, #409 and #410.
Activity