dessn-sync
Sync a local checkout with Dessn, both ways
A Dessn project holds its app's repository: the Library and every frame are checkouts of it on cloud sandboxes. Someone who codes in their own clone pushes their working tree to a frame's copy in one call, and gets back the build and its picture. Their own git (index, branch, stash) is never touched.
The push
-
Find the project and a surface.
dessn_projects_search({ query })gives the project'slink;dessn_surfaces_list({ project, query })its Library surfaces, each with arouteand alink. -
A copy to push to. The Library's own frames are never written. Make a page and a copy on it, once:
dessn_pages_create({ project, title: 'Local · <branch>', private: true, key })dessn_nodes_create({ page, key, items: [{ kind: 'frame', from: { frame: <the surface's link>, copy: true }, x: 0, y: 0 }] }): its answer'sresults[0].idis the copy; its link is<page>?frameId=<id>.
Push to the same copy for every later change: it keeps what was last pushed.
-
The commit both sides share.
dessn_canvas_get({ target: <the page or the copy's link> })answers each frame'supstream:{ repo, branch, commit, subdir? }(so doesdessn_files_listasat.upstream).commit(U) is the repository commit the Library was built from; the frame's owncommitandbaseare Dessn's and no clone has them. -
The patch, from the person's clone, without touching their index: