tractr / directus-sync

A CLI tool for synchronizing the schema and configuration of Directus across various environments.
GNU General Public License v3.0
209 stars 8 forks source link

feat: allow Directus client config #86

Closed Khartir closed 2 months ago

Khartir commented 2 months ago

Closes #84

After some testing I realized that adding the onRequest hooks is not enough, because they are not used by the authentication extension. Instead the correct way is to use the client config itself to provide a fetch implementation, that adds the required headers (see https://docs.directus.io/guides/sdk/getting-started.html#polyfilling)

I still added the option to configure the rest client, but I am unsure if this is still necessary. (At least I don't need it any longer :wink: ).

Should I add an example for this to the firewall troubleshooting documentation?

EdouardDem commented 2 months ago

@Khartir Thanks for this PR. It's a good point. I have added some comments in the file changes

Khartir commented 2 months ago

@Khartir Thanks for this PR. It's a good point. I have added some comments in the file changes

I don't see the comments. Did you forget to submit them?

EdouardDem commented 2 months ago

Should I add an example for this to the firewall troubleshooting documentation?

Definitely, it is a great idea.

EdouardDem commented 2 months ago

@Khartir I have merged the PR. Later I will add some tests for this feature. I will publish a new package soon.

Khartir commented 1 month ago

@Khartir I have merged the PR. Later I will add some tests for this feature. I will publish a new package soon.

Hi, sorry to bother you, but do you have an estimate, when you will publish the new package?

EdouardDem commented 1 month ago

@Khartir I did it few days ago. I just forgot to create the release on Github. It should be on NPM.