Add waitFor of 5000ms for changeTracking format (#1450)

* Add waitFor of 5000ms for changeTracking format

Co-Authored-By: hello@sideguide.dev <hello@sideguide.dev>

* Move waitFor check for changeTracking to types.ts refine layer

Co-Authored-By: hello@sideguide.dev <hello@sideguide.dev>

* Fix waitFor check to handle undefined values

Co-Authored-By: hello@sideguide.dev <hello@sideguide.dev>

* Update apps/api/src/__tests__/snips/scrape.test.ts

Co-authored-by: Gergő Móricz <mo.geryy@gmail.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: hello@sideguide.dev <hello@sideguide.dev>
Co-authored-by: Nicolas <nicolascamara29@gmail.com>
Co-authored-by: Gergő Móricz <mo.geryy@gmail.com>
This commit is contained in:
devin-ai-integration[bot] 2025-04-13 11:52:01 -07:00 committed by GitHub
parent d8e3c36ccc
commit 6bdae3cf4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -282,6 +282,10 @@ const extractTransform = (obj) => {
obj = { ...obj, timeout: 60000 };
}
if (obj.formats?.includes("changeTracking") && (obj.waitFor === undefined || obj.waitFor < 5000)) {
obj = { ...obj, waitFor: 5000 };
}
if (obj.formats?.includes("json")) {
obj.formats.push("extract");
}