0.1.0 • Published yesterday
@nervur-org/kit
Licence
Apache-2.0
Version
0.1.0
Deps
1
Size
36 kB
Vulns
0
Weekly
0
@nervur-org/kit
The being-side kit — ergonomics over the carcass handler bridge. A being imports the kit to serve its app package (queries, mutations, subscriptions, views, theme) to its host carcass; the kit holds no key — custody stays with the carcass's vault.
The kit also carries the empty template, so nervur add empty works cold
and offline; every other template resolves as an npm package by name through
the same resolver (templates.js).
Use
import { serve } from '@nervur-org/kit'
serve({
name: 'todolist',
queries: {
// a query is `async (args, ctx) => value`, or
// `{ input, output, handler }` with JSON-schema-shaped schemas
},
mutations: {
/* the being's hands, same shapes */
},
subscriptions: {
/* `{ input, handler: async (args, ctx, emit) => teardown }` */
}
})
Beings are scaffolded by the nervur CLI
(nervur add, nervur scaffold); the kit comes with the scaffold.
License
Apache-2.0 — see LICENSE.