deluan / contentful-migrate

🐎 Schema migration tooling for Contentful, with state management
https://www.contentful.com/blog/2018/09/13/content-model-changes-scale-telus-cms-as-code/
MIT License
60 stars 37 forks source link

Using lib directly #179

Open jmparsons opened 3 years ago

jmparsons commented 3 years ago

I'm trying to use the libs directly, and am having stale data returned. I think it's from the cachedState. I'm running ups and downs fine, but when I go to list after doing an up it's stale data.

https://github.com/deluan/contentful-migrate/blob/f97410aeb47aa04dad9566843dec03f6dbe439aa/lib/store.js#L54

The cachedState never gets cleared because I'm not using cli, so the node process never finishes etc. Can we add a flag to ignore the cachedState? Thanks!