New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cozy-doctypes): Allow Document to use a CozyClient #455
Conversation
449c7b9
to
6d66c6d
Compare
6d66c6d
to
2084975
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had removed the unregister explicitly to show that Document was not usable in parallel on multiple cozy. If it's needed for tests, we can make it private or rename it dangerousUnregisterClient
?
On utilise le même modèle mais on considère que les méthodes ne doivent être accessibles que via un client et pas l'autre. C'est une vraie volonté de les abandonner et de forcer cet abandon ou c'est juste par manque de temps pour les implémenter avec cozy-client ? |
@edas c'est une première étape qui permet de permettre l'utilisation avec |
3600261
to
8d347e9
Compare
Update packages/cozy-doctypes/src/Document.js Co-Authored-By: Patrick Browne <pt.browne@gmail.com>
8d347e9
to
d1576b2
Compare
This is a first step to allow users to choose between
cozy-client
andcozy-client-js
when they register a client for their models.This is still at draft state since I would like to do the following before merge:renamenewCozyClient
➡️cozyClient
andcozyClient
➡️cozyClientJS
intestUtils.js
add tests for methods that use "thestackClient
trick" (getAll
,fetchChanges
,fetchAll
,updateAll
). To do this, I need to be able to mock the stack client thatCozyClient
uses, it may not be easy.we could also be more explicit in the methods names (e.g_ccjs_getIndex
instead of_getIndex
?)