@detiq/crawler 1.1.20 → 1.1.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@detiq/crawler",
3
- "version": "1.1.20",
3
+ "version": "1.1.21",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
package/src/crawler.ts CHANGED
@@ -6717,6 +6717,16 @@ async function captureAuthDiscoveryScreen(
6717
6717
  }
6718
6718
  await AppBrain.updateScreenDomSnapshot(opts.tenantId, screen.id, authDomPath, authDomCloudUrl).catch(() => {});
6719
6719
  }
6720
+ // Extract and save interactive elements (inputs, buttons, links) for this auth-discovery screen.
6721
+ // Without this, login pages and auth flows always show 0 elements in Crawl Captures.
6722
+ const authDiscoveryElements = await readScreen(page).catch(() => [] as Awaited<ReturnType<typeof readScreen>>);
6723
+ if (authDiscoveryElements.length > 0) {
6724
+ await AppBrain.clearScreenElements(opts.tenantId, opts.projectId, screen.id).catch(() => {});
6725
+ for (const el of authDiscoveryElements) {
6726
+ await AppBrain.saveElement(opts.tenantId, opts.projectId, screen.id, el.label, el.role, el.expectedData, undefined, undefined, true, undefined, undefined, undefined).catch(() => {});
6727
+ }
6728
+ logger.info({ screenId: screen.id, elements: authDiscoveryElements.length }, '[crawler] auth-discovery: saved elements');
6729
+ }
6720
6730
  await AppBrain.saveCrawlEvidence(opts.tenantId, opts.projectId, {
6721
6731
  screenId: screen.id,
6722
6732
  jobId: opts.jobId,