@detiq/crawler 0.1.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/crawler.js +81 -3
- package/dist/crawler.js.map +2 -2
- package/dist/job-queue.js +2 -0
- package/dist/job-queue.js.map +2 -2
- package/package.json +1 -1
- package/src/crawler.ts +88 -3
- package/src/job-queue.ts +2 -0
- package/types/crawler.d.ts +12 -0
package/dist/job-queue.js
CHANGED
|
@@ -416,11 +416,13 @@ async function processJob(jobId, config, opts) {
|
|
|
416
416
|
...config.credentials,
|
|
417
417
|
...config.credentials.totpSecret ? { getOneTimeCode: async () => generateTOTP(config.credentials.totpSecret) } : {}
|
|
418
418
|
} : void 0;
|
|
419
|
+
const storageConfigForCrawl = await getTenantStorageConfig(tenantId).catch(() => null);
|
|
419
420
|
const result = await crawlProject({
|
|
420
421
|
...config,
|
|
421
422
|
credentials: runtimeCreds,
|
|
422
423
|
abortSignal: controller.signal,
|
|
423
424
|
jobId,
|
|
425
|
+
storageConfig: storageConfigForCrawl,
|
|
424
426
|
onCheckpoint: async (visitedUrls, pendingQueue) => {
|
|
425
427
|
jobCheckpoints.set(jobId, { visitedUrls, pendingQueue });
|
|
426
428
|
}
|