Engine Client

Summary

Engine client is used when Dendron is run as client/server.

Flows

Writing a new note

  • file: src/engineClient.ts
writeNote props {
    
    /**
     *  [{note, status: update}, {note, status: create}]
     * /
    resp = @api.engineWrite props
    ...
    @refreshNotesV2 resp.data
}

Ref

refreshNotesV2


refreshNotesV2(notes) {
    notes.map {
        uri, id := it

        if it.status = 'create' {
            @history.add(action: create, uri)
        }
        @notes[id] = it
    }
    @fuseEngine.update(notes)
}