@nitpicker/crawler 0.24.0 → 0.25.1
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/README.md +2 -2
- package/lib/beholder-type-mirror-parity.d.ts +96 -0
- package/lib/crawler/capture-custom-elements.d.ts +4 -4
- package/lib/crawler/capture-custom-elements.js +3 -3
- package/lib/crawler/capture-image-dom-paths.d.ts +3 -3
- package/lib/crawler/capture-image-dom-paths.js +2 -2
- package/lib/crawler/collect-custom-elements.d.ts +1 -1
- package/lib/crawler/collect-image-dom-paths.d.ts +2 -2
- package/lib/crawler/collect-image-dom-paths.js +1 -1
- package/lib/crawler/crawler.js +6 -6
- package/lib/crawler/dedupe/build-dedupe-cap-observation.d.ts +3 -3
- package/lib/crawler/dedupe/build-dedupe-cap-observation.js +3 -3
- package/lib/crawler/dedupe/resolve-og-url-mismatch.d.ts +1 -1
- package/lib/crawler/dedupe/resolve-og-url-mismatch.js +1 -1
- package/lib/crawler/derive-page-source.d.ts +1 -1
- package/lib/crawler/derive-resource-source.d.ts +1 -1
- package/lib/crawler/destination-cache.d.ts +1 -1
- package/lib/crawler/detect-pagination-pattern.js +1 -1
- package/lib/crawler/dns-burned-host-cache.d.ts +1 -1
- package/lib/crawler/evict-network-classified-destination-cache-entries.js +2 -2
- package/lib/crawler/evict-outage-tainted-dns-burns.d.ts +2 -2
- package/lib/crawler/evict-outage-tainted-dns-burns.js +1 -1
- package/lib/crawler/fetch-robots-txt.js +1 -3
- package/lib/crawler/generate-predicted-urls.js +2 -2
- package/lib/crawler/handle-scrape-end.js +1 -1
- package/lib/crawler/is-external-url.js +1 -1
- package/lib/crawler/is-puppeteer-fallback-candidate.js +1 -1
- package/lib/crawler/link-list.js +1 -1
- package/lib/crawler/network-outage-detector.js +1 -1
- package/lib/crawler/plan-sub-resource-emits.d.ts +1 -1
- package/lib/crawler/resource-to-page-data.js +1 -1
- package/lib/crawler/scan-js-resource-for-license-comment.d.ts +4 -3
- package/lib/crawler/scan-js-resource-for-license-comment.js +11 -23
- package/lib/crawler/scan-js-resources-for-technology-signals.d.ts +1 -1
- package/lib/crawler/scan-js-resources-for-technology-signals.js +1 -1
- package/lib/crawler/should-burn-host.d.ts +1 -1
- package/lib/crawler/should-get-fallback-on-head-failure.js +1 -1
- package/lib/crawler/types.d.ts +4 -18
- package/lib/crawler-orchestrator.d.ts +6 -9
- package/lib/crawler-orchestrator.js +27 -30
- package/lib/crawler.d.ts +5 -58
- package/lib/crawler.js +10 -73
- package/lib/resolve-output-path.js +1 -1
- package/lib/resource-row-to-lookup-result.d.ts +1 -1
- package/lib/resource-row-to-lookup-result.js +1 -1
- package/lib/types.d.ts +4 -53
- package/lib/utils/types/types.d.ts +0 -15
- package/package.json +11 -18
- package/lib/archive/archive-accessor.d.ts +0 -274
- package/lib/archive/archive-accessor.js +0 -505
- package/lib/archive/archive-lock.d.ts +0 -45
- package/lib/archive/archive-lock.js +0 -154
- package/lib/archive/archive.d.ts +0 -762
- package/lib/archive/archive.js +0 -1073
- package/lib/archive/body-hash/compute-body-hash.d.ts +0 -22
- package/lib/archive/body-hash/compute-body-hash.js +0 -31
- package/lib/archive/body-hash/extract-body.d.ts +0 -18
- package/lib/archive/body-hash/extract-body.js +0 -29
- package/lib/archive/body-hash/mask-dynamic-ids.d.ts +0 -33
- package/lib/archive/body-hash/mask-dynamic-ids.js +0 -44
- package/lib/archive/body-hash/normalize-url-like-strings.d.ts +0 -16
- package/lib/archive/body-hash/normalize-url-like-strings.js +0 -19
- package/lib/archive/cache/clear-archive-cache-entry.d.ts +0 -19
- package/lib/archive/cache/clear-archive-cache-entry.js +0 -25
- package/lib/archive/cache/clear-archive-cache-root.d.ts +0 -26
- package/lib/archive/cache/clear-archive-cache-root.js +0 -32
- package/lib/archive/cache/compute-archive-cache-key.d.ts +0 -39
- package/lib/archive/cache/compute-archive-cache-key.js +0 -95
- package/lib/archive/cache/extract-archive-to-cache.d.ts +0 -57
- package/lib/archive/cache/extract-archive-to-cache.js +0 -326
- package/lib/archive/cache/get-archive-cache-root.d.ts +0 -20
- package/lib/archive/cache/get-archive-cache-root.js +0 -53
- package/lib/archive/cache/is-archive-cache-disabled.d.ts +0 -24
- package/lib/archive/cache/is-archive-cache-disabled.js +0 -34
- package/lib/archive/cache/list-archive-cache-entries.d.ts +0 -23
- package/lib/archive/cache/list-archive-cache-entries.js +0 -125
- package/lib/archive/cache/path-exists.d.ts +0 -9
- package/lib/archive/cache/path-exists.js +0 -18
- package/lib/archive/cache/resolve-archive-cache-dir.d.ts +0 -26
- package/lib/archive/cache/resolve-archive-cache-dir.js +0 -32
- package/lib/archive/cache/types.d.ts +0 -33
- package/lib/archive/create-adjunct-tables.d.ts +0 -68
- package/lib/archive/create-adjunct-tables.js +0 -548
- package/lib/archive/create-entity-tables.d.ts +0 -191
- package/lib/archive/create-entity-tables.js +0 -387
- package/lib/archive/create-progress-reporter.d.ts +0 -30
- package/lib/archive/create-progress-reporter.js +0 -38
- package/lib/archive/create-ref-tables.d.ts +0 -35
- package/lib/archive/create-ref-tables.js +0 -188
- package/lib/archive/create-template-tables.d.ts +0 -30
- package/lib/archive/create-template-tables.js +0 -95
- package/lib/archive/database.d.ts +0 -560
- package/lib/archive/database.js +0 -805
- package/lib/archive/db-ops/_shared/clear-write-ref-caches.d.ts +0 -27
- package/lib/archive/db-ops/_shared/clear-write-ref-caches.js +0 -35
- package/lib/archive/db-ops/_shared/compress-payload.d.ts +0 -26
- package/lib/archive/db-ops/_shared/compress-payload.js +0 -30
- package/lib/archive/db-ops/_shared/create-write-ref-caches.d.ts +0 -17
- package/lib/archive/db-ops/_shared/create-write-ref-caches.js +0 -27
- package/lib/archive/db-ops/_shared/decode-json-ref.d.ts +0 -17
- package/lib/archive/db-ops/_shared/decode-json-ref.js +0 -31
- package/lib/archive/db-ops/_shared/keyset-paginate-by-id.d.ts +0 -49
- package/lib/archive/db-ops/_shared/keyset-paginate-by-id.js +0 -69
- package/lib/archive/db-ops/_shared/load-response-headers-by-set-ids.d.ts +0 -20
- package/lib/archive/db-ops/_shared/load-response-headers-by-set-ids.js +0 -53
- package/lib/archive/db-ops/_shared/resolve-content-item-id.d.ts +0 -62
- package/lib/archive/db-ops/_shared/resolve-content-item-id.js +0 -143
- package/lib/archive/db-ops/_shared/resolve-url-or-blob.d.ts +0 -23
- package/lib/archive/db-ops/_shared/resolve-url-or-blob.js +0 -29
- package/lib/archive/db-ops/_shared/retry-setting.d.ts +0 -16
- package/lib/archive/db-ops/_shared/retry-setting.js +0 -18
- package/lib/archive/db-ops/_shared/safe-parse-json.d.ts +0 -11
- package/lib/archive/db-ops/_shared/safe-parse-json.js +0 -18
- package/lib/archive/db-ops/_shared/types.d.ts +0 -94
- package/lib/archive/db-ops/_shared/types.js +0 -1
- package/lib/archive/db-ops/_shared/upsert-blob-ref.d.ts +0 -25
- package/lib/archive/db-ops/_shared/upsert-blob-ref.js +0 -48
- package/lib/archive/db-ops/_shared/upsert-content-type-ref.d.ts +0 -30
- package/lib/archive/db-ops/_shared/upsert-content-type-ref.js +0 -45
- package/lib/archive/db-ops/_shared/upsert-json-ref.d.ts +0 -22
- package/lib/archive/db-ops/_shared/upsert-json-ref.js +0 -41
- package/lib/archive/db-ops/_shared/upsert-response-headers.d.ts +0 -35
- package/lib/archive/db-ops/_shared/upsert-response-headers.js +0 -49
- package/lib/archive/db-ops/_shared/upsert-url-ref.d.ts +0 -39
- package/lib/archive/db-ops/_shared/upsert-url-ref.js +0 -62
- package/lib/archive/db-ops/analysis/replace-analysis-violations.d.ts +0 -28
- package/lib/archive/db-ops/analysis/replace-analysis-violations.js +0 -155
- package/lib/archive/db-ops/anchors/get-anchors-on-page.d.ts +0 -10
- package/lib/archive/db-ops/anchors/get-anchors-on-page.js +0 -21
- package/lib/archive/db-ops/config/get-base-url.d.ts +0 -8
- package/lib/archive/db-ops/config/get-base-url.js +0 -14
- package/lib/archive/db-ops/config/get-config.d.ts +0 -10
- package/lib/archive/db-ops/config/get-config.js +0 -29
- package/lib/archive/db-ops/config/get-created-cwd.d.ts +0 -11
- package/lib/archive/db-ops/config/get-created-cwd.js +0 -13
- package/lib/archive/db-ops/config/get-name.d.ts +0 -8
- package/lib/archive/db-ops/config/get-name.js +0 -14
- package/lib/archive/db-ops/config/info-column-allowlist.d.ts +0 -7
- package/lib/archive/db-ops/config/info-column-allowlist.js +0 -29
- package/lib/archive/db-ops/config/info-json-columns.d.ts +0 -5
- package/lib/archive/db-ops/config/info-json-columns.js +0 -11
- package/lib/archive/db-ops/config/set-config.d.ts +0 -12
- package/lib/archive/db-ops/config/set-config.js +0 -21
- package/lib/archive/db-ops/config/update-config.d.ts +0 -17
- package/lib/archive/db-ops/config/update-config.js +0 -36
- package/lib/archive/db-ops/console-logs/compute-console-log-hash.d.ts +0 -19
- package/lib/archive/db-ops/console-logs/compute-console-log-hash.js +0 -30
- package/lib/archive/db-ops/console-logs/replace-console-logs.d.ts +0 -34
- package/lib/archive/db-ops/console-logs/replace-console-logs.js +0 -123
- package/lib/archive/db-ops/console-logs/stringify-console-log-args.d.ts +0 -16
- package/lib/archive/db-ops/console-logs/stringify-console-log-args.js +0 -26
- package/lib/archive/db-ops/console-logs/types.d.ts +0 -38
- package/lib/archive/db-ops/console-logs/types.js +0 -1
- package/lib/archive/db-ops/console-logs/upsert-console-log-item.d.ts +0 -29
- package/lib/archive/db-ops/console-logs/upsert-console-log-item.js +0 -52
- package/lib/archive/db-ops/dedupe-cap/accumulate-dedupe-cap-rejected-count.d.ts +0 -18
- package/lib/archive/db-ops/dedupe-cap/accumulate-dedupe-cap-rejected-count.js +0 -23
- package/lib/archive/db-ops/dedupe-cap/finalize-dedupe-cap-event.d.ts +0 -12
- package/lib/archive/db-ops/dedupe-cap/finalize-dedupe-cap-event.js +0 -15
- package/lib/archive/db-ops/dedupe-cap/insert-dedupe-cap-event.d.ts +0 -14
- package/lib/archive/db-ops/dedupe-cap/insert-dedupe-cap-event.js +0 -30
- package/lib/archive/db-ops/dedupe-cap/list-dedupe-cap-observations.d.ts +0 -57
- package/lib/archive/db-ops/dedupe-cap/list-dedupe-cap-observations.js +0 -87
- package/lib/archive/db-ops/dedupe-cap/list-dedupe-cap-shape-keys.d.ts +0 -21
- package/lib/archive/db-ops/dedupe-cap/list-dedupe-cap-shape-keys.js +0 -27
- package/lib/archive/db-ops/errors/insert-crawl-error.d.ts +0 -15
- package/lib/archive/db-ops/errors/insert-crawl-error.js +0 -21
- package/lib/archive/db-ops/errors/insert-page-error.d.ts +0 -21
- package/lib/archive/db-ops/errors/insert-page-error.js +0 -30
- package/lib/archive/db-ops/errors/list-dns-burned-host-candidates.d.ts +0 -33
- package/lib/archive/db-ops/errors/list-dns-burned-host-candidates.js +0 -158
- package/lib/archive/db-ops/html/get-html-of-page-by-id.d.ts +0 -18
- package/lib/archive/db-ops/html/get-html-of-page-by-id.js +0 -29
- package/lib/archive/db-ops/lifecycle/checkpoint.d.ts +0 -8
- package/lib/archive/db-ops/lifecycle/checkpoint.js +0 -9
- package/lib/archive/db-ops/lifecycle/destroy.d.ts +0 -6
- package/lib/archive/db-ops/lifecycle/destroy.js +0 -7
- package/lib/archive/db-ops/lifecycle/init.d.ts +0 -58
- package/lib/archive/db-ops/lifecycle/init.js +0 -121
- package/lib/archive/db-ops/list-reconcile/record-list-reconcile-run.d.ts +0 -22
- package/lib/archive/db-ops/list-reconcile/record-list-reconcile-run.js +0 -41
- package/lib/archive/db-ops/meta/get-audios-of-page.d.ts +0 -11
- package/lib/archive/db-ops/meta/get-audios-of-page.js +0 -15
- package/lib/archive/db-ops/meta/get-buttons-of-page.d.ts +0 -11
- package/lib/archive/db-ops/meta/get-buttons-of-page.js +0 -15
- package/lib/archive/db-ops/meta/get-canvases-of-page.d.ts +0 -11
- package/lib/archive/db-ops/meta/get-canvases-of-page.js +0 -15
- package/lib/archive/db-ops/meta/get-custom-elements-of-page.d.ts +0 -11
- package/lib/archive/db-ops/meta/get-custom-elements-of-page.js +0 -15
- package/lib/archive/db-ops/meta/get-headings-of-page.d.ts +0 -11
- package/lib/archive/db-ops/meta/get-headings-of-page.js +0 -15
- package/lib/archive/db-ops/meta/get-iframes-of-page.d.ts +0 -11
- package/lib/archive/db-ops/meta/get-iframes-of-page.js +0 -15
- package/lib/archive/db-ops/meta/get-jsonld-of-page.d.ts +0 -13
- package/lib/archive/db-ops/meta/get-jsonld-of-page.js +0 -27
- package/lib/archive/db-ops/meta/get-main-content-images-of-page.d.ts +0 -11
- package/lib/archive/db-ops/meta/get-main-content-images-of-page.js +0 -15
- package/lib/archive/db-ops/meta/get-main-content-tables-of-page.d.ts +0 -11
- package/lib/archive/db-ops/meta/get-main-content-tables-of-page.js +0 -15
- package/lib/archive/db-ops/meta/get-page-technologies-of-page.d.ts +0 -11
- package/lib/archive/db-ops/meta/get-page-technologies-of-page.js +0 -15
- package/lib/archive/db-ops/meta/get-technology-signals-of-page.d.ts +0 -11
- package/lib/archive/db-ops/meta/get-technology-signals-of-page.js +0 -15
- package/lib/archive/db-ops/meta/get-videos-of-page.d.ts +0 -11
- package/lib/archive/db-ops/meta/get-videos-of-page.js +0 -15
- package/lib/archive/db-ops/outages/close-network-outage.d.ts +0 -12
- package/lib/archive/db-ops/outages/close-network-outage.js +0 -15
- package/lib/archive/db-ops/outages/close-stale-open-network-outages.d.ts +0 -26
- package/lib/archive/db-ops/outages/close-stale-open-network-outages.js +0 -42
- package/lib/archive/db-ops/outages/compute-outage-clamp-timestamp.d.ts +0 -26
- package/lib/archive/db-ops/outages/compute-outage-clamp-timestamp.js +0 -31
- package/lib/archive/db-ops/outages/insert-network-outage.d.ts +0 -14
- package/lib/archive/db-ops/outages/insert-network-outage.js +0 -29
- package/lib/archive/db-ops/outages/list-network-outages.d.ts +0 -28
- package/lib/archive/db-ops/outages/list-network-outages.js +0 -42
- package/lib/archive/db-ops/pages/order/set-url-order.d.ts +0 -13
- package/lib/archive/db-ops/pages/order/set-url-order.js +0 -38
- package/lib/archive/db-ops/pages/read/build-page-query.d.ts +0 -18
- package/lib/archive/db-ops/pages/read/build-page-query.js +0 -40
- package/lib/archive/db-ops/pages/read/get-crawling-state.d.ts +0 -117
- package/lib/archive/db-ops/pages/read/get-crawling-state.js +0 -161
- package/lib/archive/db-ops/pages/read/get-existing-page-urls.d.ts +0 -15
- package/lib/archive/db-ops/pages/read/get-existing-page-urls.js +0 -30
- package/lib/archive/db-ops/pages/read/get-page-count.d.ts +0 -12
- package/lib/archive/db-ops/pages/read/get-page-count.js +0 -21
- package/lib/archive/db-ops/pages/read/get-page-source-by-url.d.ts +0 -24
- package/lib/archive/db-ops/pages/read/get-page-source-by-url.js +0 -28
- package/lib/archive/db-ops/pages/read/get-pages-with-rels.d.ts +0 -38
- package/lib/archive/db-ops/pages/read/get-pages-with-rels.js +0 -107
- package/lib/archive/db-ops/pages/read/get-pages.d.ts +0 -11
- package/lib/archive/db-ops/pages/read/get-pages.js +0 -51
- package/lib/archive/db-ops/pages/read/get-scraped-html-page-count.d.ts +0 -18
- package/lib/archive/db-ops/pages/read/get-scraped-html-page-count.js +0 -25
- package/lib/archive/db-ops/pages/read/reconstruct-page-rows.d.ts +0 -31
- package/lib/archive/db-ops/pages/read/reconstruct-page-rows.js +0 -32
- package/lib/archive/db-ops/pages/reset/clear-page-derived-rows.d.ts +0 -20
- package/lib/archive/db-ops/pages/reset/clear-page-derived-rows.js +0 -37
- package/lib/archive/db-ops/pages/reset/repromote-external-pages.d.ts +0 -30
- package/lib/archive/db-ops/pages/reset/repromote-external-pages.js +0 -91
- package/lib/archive/db-ops/pages/reset/reset-failed-pages.d.ts +0 -88
- package/lib/archive/db-ops/pages/reset/reset-failed-pages.js +0 -216
- package/lib/archive/db-ops/pages/reset/reset-pages-by-urls.d.ts +0 -78
- package/lib/archive/db-ops/pages/reset/reset-pages-by-urls.js +0 -146
- package/lib/archive/db-ops/pages/reset/retryable-image-scan-codes.d.ts +0 -24
- package/lib/archive/db-ops/pages/reset/retryable-image-scan-codes.js +0 -24
- package/lib/archive/db-ops/pages/write/insert-audios.d.ts +0 -14
- package/lib/archive/db-ops/pages/write/insert-audios.js +0 -25
- package/lib/archive/db-ops/pages/write/insert-buttons.d.ts +0 -14
- package/lib/archive/db-ops/pages/write/insert-buttons.js +0 -29
- package/lib/archive/db-ops/pages/write/insert-canvases.d.ts +0 -14
- package/lib/archive/db-ops/pages/write/insert-canvases.js +0 -26
- package/lib/archive/db-ops/pages/write/insert-custom-elements.d.ts +0 -27
- package/lib/archive/db-ops/pages/write/insert-custom-elements.js +0 -40
- package/lib/archive/db-ops/pages/write/insert-headings.d.ts +0 -15
- package/lib/archive/db-ops/pages/write/insert-headings.js +0 -27
- package/lib/archive/db-ops/pages/write/insert-iframes.d.ts +0 -14
- package/lib/archive/db-ops/pages/write/insert-iframes.js +0 -28
- package/lib/archive/db-ops/pages/write/insert-inventory-content-items.d.ts +0 -38
- package/lib/archive/db-ops/pages/write/insert-inventory-content-items.js +0 -60
- package/lib/archive/db-ops/pages/write/insert-inventory-seeds.d.ts +0 -36
- package/lib/archive/db-ops/pages/write/insert-inventory-seeds.js +0 -48
- package/lib/archive/db-ops/pages/write/insert-inventory-skipped-pages.d.ts +0 -42
- package/lib/archive/db-ops/pages/write/insert-inventory-skipped-pages.js +0 -56
- package/lib/archive/db-ops/pages/write/insert-jsonld.d.ts +0 -17
- package/lib/archive/db-ops/pages/write/insert-jsonld.js +0 -49
- package/lib/archive/db-ops/pages/write/insert-main-content-images.d.ts +0 -20
- package/lib/archive/db-ops/pages/write/insert-main-content-images.js +0 -32
- package/lib/archive/db-ops/pages/write/insert-main-content-tables.d.ts +0 -14
- package/lib/archive/db-ops/pages/write/insert-main-content-tables.js +0 -29
- package/lib/archive/db-ops/pages/write/insert-page.d.ts +0 -56
- package/lib/archive/db-ops/pages/write/insert-page.js +0 -259
- package/lib/archive/db-ops/pages/write/insert-technologies.d.ts +0 -25
- package/lib/archive/db-ops/pages/write/insert-technologies.js +0 -45
- package/lib/archive/db-ops/pages/write/insert-videos.d.ts +0 -14
- package/lib/archive/db-ops/pages/write/insert-videos.js +0 -28
- package/lib/archive/db-ops/pages/write/link-redirect-sources.d.ts +0 -42
- package/lib/archive/db-ops/pages/write/link-redirect-sources.js +0 -101
- package/lib/archive/db-ops/pages/write/record-redirect.d.ts +0 -35
- package/lib/archive/db-ops/pages/write/record-redirect.js +0 -100
- package/lib/archive/db-ops/pages/write/set-skipped-page.d.ts +0 -13
- package/lib/archive/db-ops/pages/write/set-skipped-page.js +0 -24
- package/lib/archive/db-ops/pages/write/update-page.d.ts +0 -40
- package/lib/archive/db-ops/pages/write/update-page.js +0 -419
- package/lib/archive/db-ops/pages/write/write-page-html-blob.d.ts +0 -19
- package/lib/archive/db-ops/pages/write/write-page-html-blob.js +0 -41
- package/lib/archive/db-ops/referrers/get-redirects-for-pages.d.ts +0 -9
- package/lib/archive/db-ops/referrers/get-redirects-for-pages.js +0 -15
- package/lib/archive/db-ops/referrers/get-referrers-of-page.d.ts +0 -17
- package/lib/archive/db-ops/referrers/get-referrers-of-page.js +0 -32
- package/lib/archive/db-ops/referrers/get-referrers-of-resource.d.ts +0 -8
- package/lib/archive/db-ops/referrers/get-referrers-of-resource.js +0 -15
- package/lib/archive/db-ops/resources/build-resource-query.d.ts +0 -25
- package/lib/archive/db-ops/resources/build-resource-query.js +0 -29
- package/lib/archive/db-ops/resources/get-existing-resource-urls.d.ts +0 -9
- package/lib/archive/db-ops/resources/get-existing-resource-urls.js +0 -24
- package/lib/archive/db-ops/resources/get-resource-by-url.d.ts +0 -13
- package/lib/archive/db-ops/resources/get-resource-by-url.js +0 -22
- package/lib/archive/db-ops/resources/get-resource-url-list.d.ts +0 -17
- package/lib/archive/db-ops/resources/get-resource-url-list.js +0 -26
- package/lib/archive/db-ops/resources/get-resources.d.ts +0 -8
- package/lib/archive/db-ops/resources/get-resources.js +0 -11
- package/lib/archive/db-ops/resources/insert-inventory-resources.d.ts +0 -24
- package/lib/archive/db-ops/resources/insert-inventory-resources.js +0 -64
- package/lib/archive/db-ops/resources/insert-resource-referrers.d.ts +0 -15
- package/lib/archive/db-ops/resources/insert-resource-referrers.js +0 -54
- package/lib/archive/db-ops/resources/insert-resource.d.ts +0 -34
- package/lib/archive/db-ops/resources/insert-resource.js +0 -73
- package/lib/archive/db-ops/resources/reconstruct-resource-rows.d.ts +0 -26
- package/lib/archive/db-ops/resources/reconstruct-resource-rows.js +0 -30
- package/lib/archive/db-ops/templates/assign-template-labels.d.ts +0 -60
- package/lib/archive/db-ops/templates/assign-template-labels.js +0 -187
- package/lib/archive/db-ops/templates/replace-page-templates.d.ts +0 -45
- package/lib/archive/db-ops/templates/replace-page-templates.js +0 -174
- package/lib/archive/db-ops/templates/types.d.ts +0 -99
- package/lib/archive/db-ops/templates/types.js +0 -1
- package/lib/archive/debug.d.ts +0 -8
- package/lib/archive/debug.js +0 -9
- package/lib/archive/decode-html-blob.d.ts +0 -18
- package/lib/archive/decode-html-blob.js +0 -31
- package/lib/archive/derive-lineage-from-parent.d.ts +0 -37
- package/lib/archive/derive-lineage-from-parent.js +0 -42
- package/lib/archive/drop-legacy-tables.d.ts +0 -45
- package/lib/archive/drop-legacy-tables.js +0 -56
- package/lib/archive/filesystem/append-text.d.ts +0 -9
- package/lib/archive/filesystem/append-text.js +0 -14
- package/lib/archive/filesystem/copy-dir-sync.d.ts +0 -6
- package/lib/archive/filesystem/copy-dir-sync.js +0 -9
- package/lib/archive/filesystem/copy-dir.d.ts +0 -7
- package/lib/archive/filesystem/copy-dir.js +0 -13
- package/lib/archive/filesystem/copy-file-with-progress.d.ts +0 -20
- package/lib/archive/filesystem/copy-file-with-progress.js +0 -34
- package/lib/archive/filesystem/exists.d.ts +0 -6
- package/lib/archive/filesystem/exists.js +0 -9
- package/lib/archive/filesystem/get-file-list.d.ts +0 -8
- package/lib/archive/filesystem/get-file-list.js +0 -12
- package/lib/archive/filesystem/is-dir.d.ts +0 -6
- package/lib/archive/filesystem/is-dir.js +0 -10
- package/lib/archive/filesystem/mkdir.d.ts +0 -8
- package/lib/archive/filesystem/mkdir.js +0 -15
- package/lib/archive/filesystem/output-binary.d.ts +0 -12
- package/lib/archive/filesystem/output-binary.js +0 -17
- package/lib/archive/filesystem/output-json.d.ts +0 -9
- package/lib/archive/filesystem/output-json.js +0 -14
- package/lib/archive/filesystem/output-text.d.ts +0 -11
- package/lib/archive/filesystem/output-text.js +0 -32
- package/lib/archive/filesystem/parse-pax-path.d.ts +0 -18
- package/lib/archive/filesystem/parse-pax-path.js +0 -47
- package/lib/archive/filesystem/parse-tar-size-field.d.ts +0 -13
- package/lib/archive/filesystem/parse-tar-size-field.js +0 -40
- package/lib/archive/filesystem/peek-tar-top-dir.d.ts +0 -35
- package/lib/archive/filesystem/peek-tar-top-dir.js +0 -215
- package/lib/archive/filesystem/read-json.d.ts +0 -7
- package/lib/archive/filesystem/read-json.js +0 -11
- package/lib/archive/filesystem/read-text.d.ts +0 -6
- package/lib/archive/filesystem/read-text.js +0 -10
- package/lib/archive/filesystem/readline.d.ts +0 -11
- package/lib/archive/filesystem/readline.js +0 -26
- package/lib/archive/filesystem/remove.d.ts +0 -5
- package/lib/archive/filesystem/remove.js +0 -10
- package/lib/archive/filesystem/rename.d.ts +0 -16
- package/lib/archive/filesystem/rename.js +0 -48
- package/lib/archive/filesystem/tar.d.ts +0 -23
- package/lib/archive/filesystem/tar.js +0 -78
- package/lib/archive/filesystem/untar.d.ts +0 -33
- package/lib/archive/filesystem/untar.js +0 -84
- package/lib/archive/get-failed-page-messages.d.ts +0 -56
- package/lib/archive/get-failed-page-messages.js +0 -146
- package/lib/archive/get-json.d.ts +0 -10
- package/lib/archive/get-json.js +0 -25
- package/lib/archive/init-schema.d.ts +0 -59
- package/lib/archive/init-schema.js +0 -158
- package/lib/archive/is-inventory-source.d.ts +0 -21
- package/lib/archive/is-inventory-source.js +0 -22
- package/lib/archive/libsql-dialect.d.ts +0 -25
- package/lib/archive/libsql-dialect.js +0 -28
- package/lib/archive/limited-page-ids.d.ts +0 -9
- package/lib/archive/limited-page-ids.js +0 -18
- package/lib/archive/meta/assert-compatible-version.d.ts +0 -60
- package/lib/archive/meta/assert-compatible-version.js +0 -93
- package/lib/archive/meta/classify-jsonld-type.d.ts +0 -23
- package/lib/archive/meta/classify-jsonld-type.js +0 -43
- package/lib/archive/meta/compare-semver.d.ts +0 -23
- package/lib/archive/meta/compare-semver.js +0 -51
- package/lib/archive/meta/compute-main-contents-denormalized.d.ts +0 -41
- package/lib/archive/meta/compute-main-contents-denormalized.js +0 -88
- package/lib/archive/meta/compute-page-denormalized.d.ts +0 -21
- package/lib/archive/meta/compute-page-denormalized.js +0 -35
- package/lib/archive/meta/derive-flat-from-meta.d.ts +0 -35
- package/lib/archive/meta/derive-flat-from-meta.js +0 -158
- package/lib/archive/meta/derive-meta-extras.d.ts +0 -20
- package/lib/archive/meta/derive-meta-extras.js +0 -23
- package/lib/archive/meta/extract-tags-for-archive.d.ts +0 -18
- package/lib/archive/meta/extract-tags-for-archive.js +0 -36
- package/lib/archive/meta/summarize-jsonld.d.ts +0 -17
- package/lib/archive/meta/summarize-jsonld.js +0 -29
- package/lib/archive/meta/technologies/combine-technology-confidence.d.ts +0 -46
- package/lib/archive/meta/technologies/combine-technology-confidence.js +0 -93
- package/lib/archive/meta/technologies/convert-legacy-page-tags-to-inserts.d.ts +0 -45
- package/lib/archive/meta/technologies/convert-legacy-page-tags-to-inserts.js +0 -53
- package/lib/archive/meta/technologies/convert-tag-row-to-wappalyzer-signal.d.ts +0 -33
- package/lib/archive/meta/technologies/convert-tag-row-to-wappalyzer-signal.js +0 -46
- package/lib/archive/meta/technologies/extract-technologies-for-archive.d.ts +0 -30
- package/lib/archive/meta/technologies/extract-technologies-for-archive.js +0 -27
- package/lib/archive/meta/technologies/match-structural-technology-signals.d.ts +0 -13
- package/lib/archive/meta/technologies/match-structural-technology-signals.js +0 -44
- package/lib/archive/meta/technologies/normalize-wappalyzer-entries.d.ts +0 -25
- package/lib/archive/meta/technologies/normalize-wappalyzer-entries.js +0 -35
- package/lib/archive/meta/technologies/technology-signal-definitions.d.ts +0 -43
- package/lib/archive/meta/technologies/technology-signal-definitions.js +0 -193
- package/lib/archive/meta/technologies/types.d.ts +0 -68
- package/lib/archive/meta/technologies/types.js +0 -13
- package/lib/archive/meta/types.d.ts +0 -647
- package/lib/archive/meta/types.js +0 -65
- package/lib/archive/migrate-content-items-alias-of-id.d.ts +0 -52
- package/lib/archive/migrate-content-items-alias-of-id.js +0 -69
- package/lib/archive/migrate-content-items-dedupe-cap-event-id.d.ts +0 -46
- package/lib/archive/migrate-content-items-dedupe-cap-event-id.js +0 -62
- package/lib/archive/migrate-content-items-is-metadata-only.d.ts +0 -44
- package/lib/archive/migrate-content-items-is-metadata-only.js +0 -60
- package/lib/archive/migrate-entity-tables.d.ts +0 -55
- package/lib/archive/migrate-entity-tables.js +0 -66
- package/lib/archive/migrate-info-created-cwd.d.ts +0 -17
- package/lib/archive/migrate-info-created-cwd.js +0 -36
- package/lib/archive/migrate-info-main-content-selector.d.ts +0 -16
- package/lib/archive/migrate-info-main-content-selector.js +0 -35
- package/lib/archive/migrate-info-request-header-names.d.ts +0 -16
- package/lib/archive/migrate-info-request-header-names.js +0 -35
- package/lib/archive/migrate-info-roots.d.ts +0 -20
- package/lib/archive/migrate-info-roots.js +0 -52
- package/lib/archive/migrate-inventory-runs-to-list-reconcile-runs.d.ts +0 -34
- package/lib/archive/migrate-inventory-runs-to-list-reconcile-runs.js +0 -51
- package/lib/archive/migrate-list-reconcile-runs-exclude-skipped.d.ts +0 -25
- package/lib/archive/migrate-list-reconcile-runs-exclude-skipped.js +0 -44
- package/lib/archive/migrate-list-reconcile-runs-invalid-skipped.d.ts +0 -16
- package/lib/archive/migrate-list-reconcile-runs-invalid-skipped.js +0 -35
- package/lib/archive/migrate-main-contents-columns.d.ts +0 -26
- package/lib/archive/migrate-main-contents-columns.js +0 -61
- package/lib/archive/migrate-page-meta-body-hash.d.ts +0 -44
- package/lib/archive/migrate-page-meta-body-hash.js +0 -63
- package/lib/archive/migrate-page-meta-console-error-count.d.ts +0 -27
- package/lib/archive/migrate-page-meta-console-error-count.js +0 -45
- package/lib/archive/migrate-page-meta-custom-element-count.d.ts +0 -33
- package/lib/archive/migrate-page-meta-custom-element-count.js +0 -51
- package/lib/archive/migrate-page-meta-image-scan.d.ts +0 -27
- package/lib/archive/migrate-page-meta-image-scan.js +0 -52
- package/lib/archive/migrate-page-tags-to-page-technologies.d.ts +0 -39
- package/lib/archive/migrate-page-tags-to-page-technologies.js +0 -79
- package/lib/archive/migrate-ref-tables.d.ts +0 -25
- package/lib/archive/migrate-ref-tables.js +0 -38
- package/lib/archive/page-meta-column-maps.d.ts +0 -32
- package/lib/archive/page-meta-column-maps.js +0 -43
- package/lib/archive/page.d.ts +0 -532
- package/lib/archive/page.js +0 -750
- package/lib/archive/peek-archive-lock.d.ts +0 -40
- package/lib/archive/peek-archive-lock.js +0 -62
- package/lib/archive/populate-entity-tables/collapse-anchor-rows.d.ts +0 -41
- package/lib/archive/populate-entity-tables/collapse-anchor-rows.js +0 -87
- package/lib/archive/populate-entity-tables/derive-dom-path.d.ts +0 -35
- package/lib/archive/populate-entity-tables/derive-dom-path.js +0 -72
- package/lib/archive/populate-entity-tables/is-blob-ref-value.d.ts +0 -16
- package/lib/archive/populate-entity-tables/is-blob-ref-value.js +0 -19
- package/lib/archive/populate-entity-tables/match-images-to-dom-paths.d.ts +0 -66
- package/lib/archive/populate-entity-tables/match-images-to-dom-paths.js +0 -96
- package/lib/archive/populate-entity-tables/populate-anchor-edges.d.ts +0 -33
- package/lib/archive/populate-entity-tables/populate-anchor-edges.js +0 -153
- package/lib/archive/populate-entity-tables/populate-content-items.d.ts +0 -40
- package/lib/archive/populate-entity-tables/populate-content-items.js +0 -141
- package/lib/archive/populate-entity-tables/populate-entities.d.ts +0 -81
- package/lib/archive/populate-entity-tables/populate-entities.js +0 -111
- package/lib/archive/populate-entity-tables/populate-image-items.d.ts +0 -91
- package/lib/archive/populate-entity-tables/populate-image-items.js +0 -223
- package/lib/archive/populate-entity-tables/populate-page-meta.d.ts +0 -33
- package/lib/archive/populate-entity-tables/populate-page-meta.js +0 -267
- package/lib/archive/populate-entity-tables/populate-resource-items.d.ts +0 -22
- package/lib/archive/populate-entity-tables/populate-resource-items.js +0 -114
- package/lib/archive/populate-entity-tables/populate-resource-ref-edges.d.ts +0 -31
- package/lib/archive/populate-entity-tables/populate-resource-ref-edges.js +0 -33
- package/lib/archive/populate-entity-tables/resolve-blob-refs.d.ts +0 -31
- package/lib/archive/populate-entity-tables/resolve-blob-refs.js +0 -100
- package/lib/archive/populate-entity-tables/resolve-content-type-refs.d.ts +0 -22
- package/lib/archive/populate-entity-tables/resolve-content-type-refs.js +0 -27
- package/lib/archive/populate-entity-tables/resolve-header-sets.d.ts +0 -49
- package/lib/archive/populate-entity-tables/resolve-header-sets.js +0 -122
- package/lib/archive/populate-entity-tables/resolve-json-refs.d.ts +0 -25
- package/lib/archive/populate-entity-tables/resolve-json-refs.js +0 -67
- package/lib/archive/populate-entity-tables/resolve-text-refs.d.ts +0 -30
- package/lib/archive/populate-entity-tables/resolve-text-refs.js +0 -61
- package/lib/archive/populate-entity-tables/resolve-url-or-blob-from-maps.d.ts +0 -21
- package/lib/archive/populate-entity-tables/resolve-url-or-blob-from-maps.js +0 -27
- package/lib/archive/populate-entity-tables/resolve-url-refs.d.ts +0 -33
- package/lib/archive/populate-entity-tables/resolve-url-refs.js +0 -60
- package/lib/archive/populate-entity-tables/test-utils/count-rows.d.ts +0 -17
- package/lib/archive/populate-entity-tables/test-utils/count-rows.js +0 -20
- package/lib/archive/populate-entity-tables/test-utils/seed-content-items.d.ts +0 -25
- package/lib/archive/populate-entity-tables/test-utils/seed-content-items.js +0 -42
- package/lib/archive/populate-entity-tables/test-utils/setup-entities-db.d.ts +0 -30
- package/lib/archive/populate-entity-tables/test-utils/setup-entities-db.js +0 -187
- package/lib/archive/populate-entity-tables/types.d.ts +0 -157
- package/lib/archive/populate-entity-tables/types.js +0 -12
- package/lib/archive/populate-entity-tables/upsert-text-refs.d.ts +0 -38
- package/lib/archive/populate-entity-tables/upsert-text-refs.js +0 -78
- package/lib/archive/populate-ref-tables/classify-content-type.d.ts +0 -16
- package/lib/archive/populate-ref-tables/classify-content-type.js +0 -52
- package/lib/archive/populate-ref-tables/compute-content-hash.d.ts +0 -22
- package/lib/archive/populate-ref-tables/compute-content-hash.js +0 -26
- package/lib/archive/populate-ref-tables/compute-header-flags.d.ts +0 -16
- package/lib/archive/populate-ref-tables/compute-header-flags.js +0 -70
- package/lib/archive/populate-ref-tables/content-type-rules.d.ts +0 -38
- package/lib/archive/populate-ref-tables/content-type-rules.js +0 -133
- package/lib/archive/populate-ref-tables/create-header-table-caches.d.ts +0 -25
- package/lib/archive/populate-ref-tables/create-header-table-caches.js +0 -49
- package/lib/archive/populate-ref-tables/data-uri-url-refs-limit.d.ts +0 -15
- package/lib/archive/populate-ref-tables/data-uri-url-refs-limit.js +0 -15
- package/lib/archive/populate-ref-tables/decode-data-uri.d.ts +0 -21
- package/lib/archive/populate-ref-tables/decode-data-uri.js +0 -126
- package/lib/archive/populate-ref-tables/decompose-header-set.d.ts +0 -29
- package/lib/archive/populate-ref-tables/decompose-header-set.js +0 -157
- package/lib/archive/populate-ref-tables/decompose-url.d.ts +0 -25
- package/lib/archive/populate-ref-tables/decompose-url.js +0 -70
- package/lib/archive/populate-ref-tables/header-stability.d.ts +0 -19
- package/lib/archive/populate-ref-tables/header-stability.js +0 -22
- package/lib/archive/populate-ref-tables/header-value-cache-key.d.ts +0 -17
- package/lib/archive/populate-ref-tables/header-value-cache-key.js +0 -19
- package/lib/archive/populate-ref-tables/normalize-mime.d.ts +0 -24
- package/lib/archive/populate-ref-tables/normalize-mime.js +0 -36
- package/lib/archive/populate-ref-tables/populate-blob-refs.d.ts +0 -38
- package/lib/archive/populate-ref-tables/populate-blob-refs.js +0 -134
- package/lib/archive/populate-ref-tables/populate-content-type-refs.d.ts +0 -27
- package/lib/archive/populate-ref-tables/populate-content-type-refs.js +0 -70
- package/lib/archive/populate-ref-tables/populate-header-tables.d.ts +0 -35
- package/lib/archive/populate-ref-tables/populate-header-tables.js +0 -80
- package/lib/archive/populate-ref-tables/populate-json-refs.d.ts +0 -29
- package/lib/archive/populate-ref-tables/populate-json-refs.js +0 -101
- package/lib/archive/populate-ref-tables/populate-refs.d.ts +0 -51
- package/lib/archive/populate-ref-tables/populate-refs.js +0 -62
- package/lib/archive/populate-ref-tables/populate-text-refs.d.ts +0 -32
- package/lib/archive/populate-ref-tables/populate-text-refs.js +0 -133
- package/lib/archive/populate-ref-tables/populate-url-refs.d.ts +0 -28
- package/lib/archive/populate-ref-tables/populate-url-refs.js +0 -148
- package/lib/archive/populate-ref-tables/test-utils/count-rows.d.ts +0 -15
- package/lib/archive/populate-ref-tables/test-utils/count-rows.js +0 -17
- package/lib/archive/populate-ref-tables/types.d.ts +0 -197
- package/lib/archive/populate-ref-tables/types.js +0 -7
- package/lib/archive/populate-ref-tables/upsert-one-header-set.d.ts +0 -34
- package/lib/archive/populate-ref-tables/upsert-one-header-set.js +0 -208
- package/lib/archive/populate-ref-tables/volatile-header-names.d.ts +0 -20
- package/lib/archive/populate-ref-tables/volatile-header-names.js +0 -33
- package/lib/archive/redirect-table.d.ts +0 -9
- package/lib/archive/redirect-table.js +0 -28
- package/lib/archive/resolve-redirect-chain.d.ts +0 -33
- package/lib/archive/resolve-redirect-chain.js +0 -27
- package/lib/archive/resource.d.ts +0 -46
- package/lib/archive/resource.js +0 -62
- package/lib/archive/retarget-legacy-fk-tables.d.ts +0 -60
- package/lib/archive/retarget-legacy-fk-tables.js +0 -153
- package/lib/archive/safe-path.d.ts +0 -9
- package/lib/archive/safe-path.js +0 -17
- package/lib/archive/test-utils/build-full-schema-test-db.d.ts +0 -34
- package/lib/archive/test-utils/build-full-schema-test-db.js +0 -74
- package/lib/archive/test-utils/fk-parent-tables.d.ts +0 -15
- package/lib/archive/test-utils/fk-parent-tables.js +0 -19
- package/lib/archive/test-utils/seed-content-item.d.ts +0 -35
- package/lib/archive/test-utils/seed-content-item.js +0 -42
- package/lib/archive/test-utils/setup-legacy-fk-db.d.ts +0 -33
- package/lib/archive/test-utils/setup-legacy-fk-db.js +0 -270
- package/lib/archive/transfer/attach-source-database.d.ts +0 -31
- package/lib/archive/transfer/attach-source-database.js +0 -40
- package/lib/archive/transfer/build-split-config.d.ts +0 -30
- package/lib/archive/transfer/build-split-config.js +0 -42
- package/lib/archive/transfer/clear-replaced-page-rows.d.ts +0 -20
- package/lib/archive/transfer/clear-replaced-page-rows.js +0 -57
- package/lib/archive/transfer/concat-archives.d.ts +0 -55
- package/lib/archive/transfer/concat-archives.js +0 -95
- package/lib/archive/transfer/content-item-rank-sql.d.ts +0 -21
- package/lib/archive/transfer/content-item-rank-sql.js +0 -23
- package/lib/archive/transfer/copy-analysis-violations.d.ts +0 -19
- package/lib/archive/transfer/copy-analysis-violations.js +0 -43
- package/lib/archive/transfer/copy-anchor-edges.d.ts +0 -28
- package/lib/archive/transfer/copy-anchor-edges.js +0 -42
- package/lib/archive/transfer/copy-dictionaries-for-concat.d.ts +0 -39
- package/lib/archive/transfer/copy-dictionaries-for-concat.js +0 -81
- package/lib/archive/transfer/copy-dictionaries-for-split.d.ts +0 -29
- package/lib/archive/transfer/copy-dictionaries-for-split.js +0 -235
- package/lib/archive/transfer/copy-header-set-children.d.ts +0 -27
- package/lib/archive/transfer/copy-header-set-children.js +0 -51
- package/lib/archive/transfer/copy-image-items.d.ts +0 -21
- package/lib/archive/transfer/copy-image-items.js +0 -62
- package/lib/archive/transfer/copy-inventory-source-lists.d.ts +0 -30
- package/lib/archive/transfer/copy-inventory-source-lists.js +0 -61
- package/lib/archive/transfer/copy-journal-tables.d.ts +0 -30
- package/lib/archive/transfer/copy-journal-tables.js +0 -56
- package/lib/archive/transfer/copy-page-console-logs.d.ts +0 -16
- package/lib/archive/transfer/copy-page-console-logs.js +0 -27
- package/lib/archive/transfer/copy-page-html-blobs.d.ts +0 -31
- package/lib/archive/transfer/copy-page-html-blobs.js +0 -43
- package/lib/archive/transfer/copy-page-meta.d.ts +0 -27
- package/lib/archive/transfer/copy-page-meta.js +0 -68
- package/lib/archive/transfer/copy-page-template-clusters.d.ts +0 -31
- package/lib/archive/transfer/copy-page-template-clusters.js +0 -56
- package/lib/archive/transfer/copy-page-template-labels.d.ts +0 -34
- package/lib/archive/transfer/copy-page-template-labels.js +0 -88
- package/lib/archive/transfer/copy-resource-items.d.ts +0 -29
- package/lib/archive/transfer/copy-resource-items.js +0 -89
- package/lib/archive/transfer/copy-resource-ref-edges.d.ts +0 -20
- package/lib/archive/transfer/copy-resource-ref-edges.js +0 -33
- package/lib/archive/transfer/copy-simple-page-scoped-tables.d.ts +0 -15
- package/lib/archive/transfer/copy-simple-page-scoped-tables.js +0 -34
- package/lib/archive/transfer/count-external-pages-in-scope.d.ts +0 -26
- package/lib/archive/transfer/count-external-pages-in-scope.js +0 -40
- package/lib/archive/transfer/create-transfer-temp-tables.d.ts +0 -30
- package/lib/archive/transfer/create-transfer-temp-tables.js +0 -59
- package/lib/archive/transfer/dictionary-copy-specs.d.ts +0 -32
- package/lib/archive/transfer/dictionary-copy-specs.js +0 -29
- package/lib/archive/transfer/drop-transfer-temp-tables.d.ts +0 -9
- package/lib/archive/transfer/drop-transfer-temp-tables.js +0 -18
- package/lib/archive/transfer/flatten-redirect-chains.d.ts +0 -44
- package/lib/archive/transfer/flatten-redirect-chains.js +0 -74
- package/lib/archive/transfer/insert-content-items.d.ts +0 -35
- package/lib/archive/transfer/insert-content-items.js +0 -116
- package/lib/archive/transfer/list-transfer-columns.d.ts +0 -35
- package/lib/archive/transfer/list-transfer-columns.js +0 -45
- package/lib/archive/transfer/mark-in-scope-content-items.d.ts +0 -31
- package/lib/archive/transfer/mark-in-scope-content-items.js +0 -54
- package/lib/archive/transfer/merge-archive-configs.d.ts +0 -51
- package/lib/archive/transfer/merge-archive-configs.js +0 -85
- package/lib/archive/transfer/plan-content-items-for-concat.d.ts +0 -33
- package/lib/archive/transfer/plan-content-items-for-concat.js +0 -51
- package/lib/archive/transfer/plan-content-items-for-split.d.ts +0 -42
- package/lib/archive/transfer/plan-content-items-for-split.js +0 -83
- package/lib/archive/transfer/plan-resource-items.d.ts +0 -40
- package/lib/archive/transfer/plan-resource-items.js +0 -69
- package/lib/archive/transfer/quote-transfer-identifier.d.ts +0 -18
- package/lib/archive/transfer/quote-transfer-identifier.js +0 -20
- package/lib/archive/transfer/reclassify-resource-externality.d.ts +0 -37
- package/lib/archive/transfer/reclassify-resource-externality.js +0 -66
- package/lib/archive/transfer/remap-redirect-dest-ids.d.ts +0 -34
- package/lib/archive/transfer/remap-redirect-dest-ids.js +0 -51
- package/lib/archive/transfer/replace-content-items.d.ts +0 -39
- package/lib/archive/transfer/replace-content-items.js +0 -83
- package/lib/archive/transfer/simple-page-scoped-tables.d.ts +0 -25
- package/lib/archive/transfer/simple-page-scoped-tables.js +0 -38
- package/lib/archive/transfer/split-archive.d.ts +0 -55
- package/lib/archive/transfer/split-archive.js +0 -98
- package/lib/archive/transfer/transfer-action.d.ts +0 -34
- package/lib/archive/transfer/transfer-action.js +0 -32
- package/lib/archive/transfer/transfer-archive-rows.d.ts +0 -65
- package/lib/archive/transfer/transfer-archive-rows.js +0 -158
- package/lib/archive/transfer/transfer-dictionary-tables.d.ts +0 -12
- package/lib/archive/transfer/transfer-dictionary-tables.js +0 -23
- package/lib/archive/transfer/transfer-source-alias.d.ts +0 -9
- package/lib/archive/transfer/transfer-source-alias.js +0 -9
- package/lib/archive/transfer/types.d.ts +0 -111
- package/lib/archive/transfer/types.js +0 -35
- package/lib/archive/types.d.ts +0 -755
- package/lib/archive/types.js +0 -1
- package/lib/archive/url-alias/compute-tier-a-alias-key.d.ts +0 -31
- package/lib/archive/url-alias/compute-tier-a-alias-key.js +0 -36
- package/lib/archive/url-alias/compute-tier-b-alias-key.d.ts +0 -19
- package/lib/archive/url-alias/compute-tier-b-alias-key.js +0 -30
- package/lib/archive/url-alias/format-alias-key.d.ts +0 -13
- package/lib/archive/url-alias/format-alias-key.js +0 -14
- package/lib/archive/url-alias/parse-alias-key-parts.d.ts +0 -15
- package/lib/archive/url-alias/parse-alias-key-parts.js +0 -40
- package/lib/archive/url-alias/types.d.ts +0 -7
- package/lib/archive/url-alias/types.js +0 -1
- package/lib/archive/verify-migration/capture-rejection.d.ts +0 -24
- package/lib/archive/verify-migration/capture-rejection.js +0 -31
- package/lib/archive/verify-migration/check-anchor-edges-count.d.ts +0 -34
- package/lib/archive/verify-migration/check-anchor-edges-count.js +0 -72
- package/lib/archive/verify-migration/check-anchor-edges-sum.d.ts +0 -13
- package/lib/archive/verify-migration/check-anchor-edges-sum.js +0 -27
- package/lib/archive/verify-migration/check-content-items-count.d.ts +0 -16
- package/lib/archive/verify-migration/check-content-items-count.js +0 -30
- package/lib/archive/verify-migration/check-content-type-preservation.d.ts +0 -22
- package/lib/archive/verify-migration/check-content-type-preservation.js +0 -40
- package/lib/archive/verify-migration/check-foreign-key-integrity.d.ts +0 -31
- package/lib/archive/verify-migration/check-foreign-key-integrity.js +0 -47
- package/lib/archive/verify-migration/check-image-items-count.d.ts +0 -12
- package/lib/archive/verify-migration/check-image-items-count.js +0 -26
- package/lib/archive/verify-migration/check-page-meta-count.d.ts +0 -15
- package/lib/archive/verify-migration/check-page-meta-count.js +0 -31
- package/lib/archive/verify-migration/check-reader-parity.d.ts +0 -23
- package/lib/archive/verify-migration/check-reader-parity.js +0 -211
- package/lib/archive/verify-migration/check-resource-items-count.d.ts +0 -17
- package/lib/archive/verify-migration/check-resource-items-count.js +0 -33
- package/lib/archive/verify-migration/check-url-round-trip.d.ts +0 -43
- package/lib/archive/verify-migration/check-url-round-trip.js +0 -112
- package/lib/archive/verify-migration/types.d.ts +0 -70
- package/lib/archive/verify-migration/types.js +0 -63
- package/lib/archive/verify-migration/verify-migration.d.ts +0 -41
- package/lib/archive/verify-migration/verify-migration.js +0 -120
- package/lib/classify-error-kind.d.ts +0 -20
- package/lib/classify-error-kind.js +0 -136
- package/lib/concat-source-transfer-phases.d.ts +0 -10
- package/lib/concat-source-transfer-phases.js +0 -17
- package/lib/crawler/build-scope-map.d.ts +0 -21
- package/lib/crawler/build-scope-map.js +0 -32
- package/lib/crawler/decompose-url.d.ts +0 -25
- package/lib/crawler/decompose-url.js +0 -71
- package/lib/crawler/dedupe/compute-shape-key.d.ts +0 -57
- package/lib/crawler/dedupe/compute-shape-key.js +0 -128
- package/lib/crawler/find-scope-entry.d.ts +0 -25
- package/lib/crawler/find-scope-entry.js +0 -45
- package/lib/crawler/is-html-content-type.d.ts +0 -17
- package/lib/crawler/is-html-content-type.js +0 -19
- package/lib/crawler/normalize-content-type.d.ts +0 -14
- package/lib/crawler/normalize-content-type.js +0 -20
- package/lib/crawler/reconstruct-url.d.ts +0 -10
- package/lib/crawler/reconstruct-url.js +0 -28
- package/lib/is-within-outage-window.d.ts +0 -49
- package/lib/is-within-outage-window.js +0 -33
- package/lib/network-related-error-kinds.d.ts +0 -23
- package/lib/network-related-error-kinds.js +0 -28
- package/lib/permanent-error-kinds.d.ts +0 -48
- package/lib/permanent-error-kinds.js +0 -54
- package/lib/split-source-transfer-phases.d.ts +0 -11
- package/lib/split-source-transfer-phases.js +0 -18
- package/lib/template-classification/classify-archive-page-templates.d.ts +0 -41
- package/lib/template-classification/classify-archive-page-templates.js +0 -79
- package/lib/template-classification/classify-page-templates.d.ts +0 -37
- package/lib/template-classification/classify-page-templates.js +0 -69
- package/lib/template-classification/collect-page-stylesheet-urls.d.ts +0 -32
- package/lib/template-classification/collect-page-stylesheet-urls.js +0 -130
- package/lib/template-classification/create-content-root-hint.d.ts +0 -36
- package/lib/template-classification/create-content-root-hint.js +0 -47
- package/lib/template-classification/create-page-cluster-factory.d.ts +0 -60
- package/lib/template-classification/create-page-cluster-factory.js +0 -98
- package/lib/template-classification/types.d.ts +0 -108
- package/lib/template-classification/types.js +0 -1
- package/lib/transfer-post-phases.d.ts +0 -10
- package/lib/transfer-post-phases.js +0 -13
- package/lib/utils/array/each-splitted.d.ts +0 -10
- package/lib/utils/array/each-splitted.js +0 -14
- package/lib/utils/error/emit-error-with-retry.d.ts +0 -40
- package/lib/utils/error/emit-error-with-retry.js +0 -44
- package/lib/utils/error/emit-error.d.ts +0 -39
- package/lib/utils/error/emit-error.js +0 -41
- package/lib/utils/object/parse-response-headers.d.ts +0 -12
- package/lib/utils/object/parse-response-headers.js +0 -26
- package/lib/utils/object/redact-request-headers.d.ts +0 -15
- package/lib/utils/object/redact-request-headers.js +0 -27
- package/lib/write-queue.d.ts +0 -32
- package/lib/write-queue.js +0 -55
- /package/lib/{archive/cache/types.js → beholder-type-mirror-parity.js} +0 -0
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { TRANSFER_ACTION } from './transfer-action.js';
|
|
2
|
-
import { TRANSFER_SOURCE_ALIAS } from './transfer-source-alias.js';
|
|
3
|
-
/**
|
|
4
|
-
* Populates `temp.xfer_ci_plan` for split, in three passes over the
|
|
5
|
-
* source's `content_items`:
|
|
6
|
-
*
|
|
7
|
-
* 1. **Core** — every id `temp.xfer_ci_in_scope` marked (in-scope,
|
|
8
|
-
* internal — see
|
|
9
|
-
* {@link import('./mark-in-scope-content-items.js').markInScopeContentItems})
|
|
10
|
-
* is kept in `full`.
|
|
11
|
-
* 2. **Redirect-destination promotion** — a core row's `redirect_dest_id`,
|
|
12
|
-
* when it points at an INTERNAL row, joins core as `full` too, even if
|
|
13
|
-
* that destination's own path falls outside the split scope. This is
|
|
14
|
-
* the same invariant `insertPage` documents: "the redirect destination
|
|
15
|
-
* of an in-scope request is recorded internal even when its path is out
|
|
16
|
-
* of scope" (a soft-404 landing page is the canonical example) — split
|
|
17
|
-
* must not treat that page differently than a live crawl would. Only
|
|
18
|
-
* ONE hop is honoured here, matching `redirect_dest_id`'s own
|
|
19
|
-
* contract: crawler writes always pre-flatten a redirect chain to its
|
|
20
|
-
* final destination at write time, so a single JOIN already reaches the
|
|
21
|
-
* terminal page — there is no multi-hop chain left to walk in a
|
|
22
|
-
* single, not-yet-merged source archive (concat, which CAN reintroduce
|
|
23
|
-
* a multi-hop chain by combining two sources, re-flattens separately —
|
|
24
|
-
* see `flatten-redirect-chains.ts`).
|
|
25
|
-
* 3. **Referenced-row stubbing** — any row NOT in core that a core row's
|
|
26
|
-
* `anchor_edges` targets, or that a core row's `redirect_dest_id`
|
|
27
|
-
* points at (now only the EXTERNAL case survives this filter, since
|
|
28
|
-
* every internal destination was already absorbed into core by pass
|
|
29
|
-
* 2), is kept as a `stub`: the `content_items` row only, forced
|
|
30
|
-
* external — see `insert-content-items.ts`. A row reachable by neither
|
|
31
|
-
* path is left out of the plan entirely, which is split's definition
|
|
32
|
-
* of "dropped".
|
|
33
|
-
* @param trx - Transaction with the source ATTACHed as
|
|
34
|
-
* {@link TRANSFER_SOURCE_ALIAS}. Must run after
|
|
35
|
-
* {@link import('./mark-in-scope-content-items.js').markInScopeContentItems}
|
|
36
|
-
* has populated `temp.xfer_ci_in_scope`.
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* await markInScopeContentItems(trx, scope, sourceConfig);
|
|
40
|
-
* await planContentItemsForSplit(trx);
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
export async function planContentItemsForSplit(trx) {
|
|
44
|
-
await trx.raw(`
|
|
45
|
-
INSERT INTO xfer_ci_plan (src_id, action)
|
|
46
|
-
SELECT src_id, ${TRANSFER_ACTION.full} FROM xfer_ci_in_scope
|
|
47
|
-
`);
|
|
48
|
-
await trx.raw(`
|
|
49
|
-
INSERT INTO xfer_ci_plan (src_id, action)
|
|
50
|
-
SELECT DISTINCT d.id, ${TRANSFER_ACTION.full}
|
|
51
|
-
FROM ${TRANSFER_SOURCE_ALIAS}.content_items s
|
|
52
|
-
JOIN xfer_ci_plan p ON p.src_id = s.id
|
|
53
|
-
JOIN ${TRANSFER_SOURCE_ALIAS}.content_items d ON d.id = s.redirect_dest_id
|
|
54
|
-
WHERE d.is_external = 0
|
|
55
|
-
AND d.id NOT IN (SELECT src_id FROM xfer_ci_plan)
|
|
56
|
-
`);
|
|
57
|
-
await trx.raw(`
|
|
58
|
-
INSERT OR IGNORE INTO xfer_ci_ref (src_id)
|
|
59
|
-
SELECT DISTINCT ae.href_page_id
|
|
60
|
-
FROM ${TRANSFER_SOURCE_ALIAS}.anchor_edges ae
|
|
61
|
-
JOIN xfer_ci_plan p ON p.src_id = ae.page_id
|
|
62
|
-
WHERE ae.href_page_id NOT IN (SELECT src_id FROM xfer_ci_plan)
|
|
63
|
-
`);
|
|
64
|
-
// `OR IGNORE` on BOTH inserts (not just this one) is deliberate, not
|
|
65
|
-
// redundant: this table's PK is `src_id`, and an anchor target can also
|
|
66
|
-
// be a redirect target of some other core row, so the two passes can
|
|
67
|
-
// legitimately overlap. The first pass alone cannot collide with itself
|
|
68
|
-
// (`SELECT DISTINCT` on an empty destination table), but relying on
|
|
69
|
-
// that ordering to justify leaving it unguarded would silently break if
|
|
70
|
-
// a third insert into `xfer_ci_ref` were ever added ahead of it.
|
|
71
|
-
await trx.raw(`
|
|
72
|
-
INSERT OR IGNORE INTO xfer_ci_ref (src_id)
|
|
73
|
-
SELECT DISTINCT s.redirect_dest_id
|
|
74
|
-
FROM ${TRANSFER_SOURCE_ALIAS}.content_items s
|
|
75
|
-
JOIN xfer_ci_plan p ON p.src_id = s.id
|
|
76
|
-
WHERE s.redirect_dest_id IS NOT NULL
|
|
77
|
-
AND s.redirect_dest_id NOT IN (SELECT src_id FROM xfer_ci_plan)
|
|
78
|
-
`);
|
|
79
|
-
await trx.raw(`
|
|
80
|
-
INSERT INTO xfer_ci_plan (src_id, action)
|
|
81
|
-
SELECT src_id, ${TRANSFER_ACTION.stub} FROM xfer_ci_ref
|
|
82
|
-
`);
|
|
83
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { Knex } from 'knex';
|
|
2
|
-
/**
|
|
3
|
-
* Populates `temp.xfer_ri_plan` for `resource_items`, one call per source,
|
|
4
|
-
* for either transfer mode:
|
|
5
|
-
*
|
|
6
|
-
* - **`concat`** — every source resource is matched against the
|
|
7
|
-
* destination by its identity (`url_id` resolved through `url_refs.url`,
|
|
8
|
-
* or `url_blob_id` resolved through `blob_refs.hash` — the two are
|
|
9
|
-
* mutually exclusive per `resource_items`' own CHECK constraint, so at
|
|
10
|
-
* most one of the two LEFT JOINs below ever produces a match for a given
|
|
11
|
-
* row) and classified `full` (no destination row yet), `replace`
|
|
12
|
-
* (destination exists but has never recorded a response — `status IS
|
|
13
|
-
* NULL` — while this source has), or `skip` (destination already has a
|
|
14
|
-
* recorded response). Matching happens directly against raw
|
|
15
|
-
* `url`/`hash` values, not through `temp.xfer_map_url_refs`/
|
|
16
|
-
* `xfer_map_blob_refs` — those dictionary maps are built AFTER this
|
|
17
|
-
* plan (`copy-dictionaries-for-concat.ts` needs to know which resources
|
|
18
|
-
* are kept before it can compute needed dictionary ids for split), so
|
|
19
|
-
* this plan cannot depend on them.
|
|
20
|
-
* - **`split`** — a resource is kept (`full`) only when at least one
|
|
21
|
-
* `full`-action page in `temp.xfer_ci_plan` references it via
|
|
22
|
-
* `resource_ref_edges`. A resource with no surviving referrer is left
|
|
23
|
-
* out of the plan (dropped) — split does not preserve an
|
|
24
|
-
* otherwise-orphan resource just because its URL happens to still be
|
|
25
|
-
* in scope (accepted simplification: a resource with zero referring
|
|
26
|
-
* pages has no page context left to display it against in the output
|
|
27
|
-
* archive anyway).
|
|
28
|
-
* @param trx - Transaction with the source ATTACHed as
|
|
29
|
-
* {@link TRANSFER_SOURCE_ALIAS}. For `'split'`, must run after
|
|
30
|
-
* `temp.xfer_ci_plan` has been fully populated (every `full` page
|
|
31
|
-
* decided) — see
|
|
32
|
-
* {@link import('./plan-content-items-for-split.js').planContentItemsForSplit}.
|
|
33
|
-
* @param mode - Which transfer this plan is for.
|
|
34
|
-
* @example
|
|
35
|
-
* ```ts
|
|
36
|
-
* await planContentItemsForSplit(trx);
|
|
37
|
-
* await planResourceItems(trx, 'split');
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
export declare function planResourceItems(trx: Knex, mode: 'concat' | 'split'): Promise<void>;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { TRANSFER_ACTION } from './transfer-action.js';
|
|
2
|
-
import { TRANSFER_SOURCE_ALIAS } from './transfer-source-alias.js';
|
|
3
|
-
/**
|
|
4
|
-
* Populates `temp.xfer_ri_plan` for `resource_items`, one call per source,
|
|
5
|
-
* for either transfer mode:
|
|
6
|
-
*
|
|
7
|
-
* - **`concat`** — every source resource is matched against the
|
|
8
|
-
* destination by its identity (`url_id` resolved through `url_refs.url`,
|
|
9
|
-
* or `url_blob_id` resolved through `blob_refs.hash` — the two are
|
|
10
|
-
* mutually exclusive per `resource_items`' own CHECK constraint, so at
|
|
11
|
-
* most one of the two LEFT JOINs below ever produces a match for a given
|
|
12
|
-
* row) and classified `full` (no destination row yet), `replace`
|
|
13
|
-
* (destination exists but has never recorded a response — `status IS
|
|
14
|
-
* NULL` — while this source has), or `skip` (destination already has a
|
|
15
|
-
* recorded response). Matching happens directly against raw
|
|
16
|
-
* `url`/`hash` values, not through `temp.xfer_map_url_refs`/
|
|
17
|
-
* `xfer_map_blob_refs` — those dictionary maps are built AFTER this
|
|
18
|
-
* plan (`copy-dictionaries-for-concat.ts` needs to know which resources
|
|
19
|
-
* are kept before it can compute needed dictionary ids for split), so
|
|
20
|
-
* this plan cannot depend on them.
|
|
21
|
-
* - **`split`** — a resource is kept (`full`) only when at least one
|
|
22
|
-
* `full`-action page in `temp.xfer_ci_plan` references it via
|
|
23
|
-
* `resource_ref_edges`. A resource with no surviving referrer is left
|
|
24
|
-
* out of the plan (dropped) — split does not preserve an
|
|
25
|
-
* otherwise-orphan resource just because its URL happens to still be
|
|
26
|
-
* in scope (accepted simplification: a resource with zero referring
|
|
27
|
-
* pages has no page context left to display it against in the output
|
|
28
|
-
* archive anyway).
|
|
29
|
-
* @param trx - Transaction with the source ATTACHed as
|
|
30
|
-
* {@link TRANSFER_SOURCE_ALIAS}. For `'split'`, must run after
|
|
31
|
-
* `temp.xfer_ci_plan` has been fully populated (every `full` page
|
|
32
|
-
* decided) — see
|
|
33
|
-
* {@link import('./plan-content-items-for-split.js').planContentItemsForSplit}.
|
|
34
|
-
* @param mode - Which transfer this plan is for.
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* await planContentItemsForSplit(trx);
|
|
38
|
-
* await planResourceItems(trx, 'split');
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
export async function planResourceItems(trx, mode) {
|
|
42
|
-
if (mode === 'split') {
|
|
43
|
-
await trx.raw(`
|
|
44
|
-
INSERT INTO xfer_ri_plan (src_id, action)
|
|
45
|
-
SELECT DISTINCT r.id, ${TRANSFER_ACTION.full}
|
|
46
|
-
FROM ${TRANSFER_SOURCE_ALIAS}.resource_items r
|
|
47
|
-
JOIN ${TRANSFER_SOURCE_ALIAS}.resource_ref_edges e ON e.resource_id = r.id
|
|
48
|
-
JOIN xfer_ci_plan p ON p.src_id = e.page_id AND p.action = ${TRANSFER_ACTION.full}
|
|
49
|
-
`);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
await trx.raw(`
|
|
53
|
-
INSERT INTO xfer_ri_plan (src_id, action, dest_id)
|
|
54
|
-
SELECT
|
|
55
|
-
s.id,
|
|
56
|
-
CASE
|
|
57
|
-
WHEN d.id IS NULL THEN ${TRANSFER_ACTION.full}
|
|
58
|
-
WHEN (s.status IS NOT NULL) >= (d.status IS NOT NULL) THEN ${TRANSFER_ACTION.replace}
|
|
59
|
-
ELSE ${TRANSFER_ACTION.skip}
|
|
60
|
-
END,
|
|
61
|
-
d.id
|
|
62
|
-
FROM ${TRANSFER_SOURCE_ALIAS}.resource_items s
|
|
63
|
-
LEFT JOIN ${TRANSFER_SOURCE_ALIAS}.url_refs su ON su.id = s.url_id
|
|
64
|
-
LEFT JOIN main.url_refs du ON du.url = su.url
|
|
65
|
-
LEFT JOIN ${TRANSFER_SOURCE_ALIAS}.blob_refs sb ON sb.id = s.url_blob_id
|
|
66
|
-
LEFT JOIN main.blob_refs db ON db.hash = sb.hash
|
|
67
|
-
LEFT JOIN main.resource_items d ON d.url_id = du.id OR d.url_blob_id = db.id
|
|
68
|
-
`);
|
|
69
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Double-quotes a bare SQL identifier (`"order"`, not `order`) so a column
|
|
3
|
-
* name that happens to collide with a SQLite keyword (`order`, `key`,
|
|
4
|
-
* `references`, …) never breaks a transfer statement built by
|
|
5
|
-
* interpolating {@link import('./list-transfer-columns.js').listTransferColumns}'
|
|
6
|
-
* output directly into raw SQL — every generic (not hand-written)
|
|
7
|
-
* column-list builder in `archive/transfer/` must quote through this
|
|
8
|
-
* function rather than splicing bare names.
|
|
9
|
-
* @param name - A bare, trusted column or table identifier (never
|
|
10
|
-
* user-supplied — every caller sources `name` from `pragma_table_info`
|
|
11
|
-
* against this codebase's own fixed schema).
|
|
12
|
-
* @returns The identifier wrapped in double quotes.
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* columns.map(quoteTransferIdentifier).join(', ') // '"id", "order", "text"'
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare function quoteTransferIdentifier(name: string): string;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Double-quotes a bare SQL identifier (`"order"`, not `order`) so a column
|
|
3
|
-
* name that happens to collide with a SQLite keyword (`order`, `key`,
|
|
4
|
-
* `references`, …) never breaks a transfer statement built by
|
|
5
|
-
* interpolating {@link import('./list-transfer-columns.js').listTransferColumns}'
|
|
6
|
-
* output directly into raw SQL — every generic (not hand-written)
|
|
7
|
-
* column-list builder in `archive/transfer/` must quote through this
|
|
8
|
-
* function rather than splicing bare names.
|
|
9
|
-
* @param name - A bare, trusted column or table identifier (never
|
|
10
|
-
* user-supplied — every caller sources `name` from `pragma_table_info`
|
|
11
|
-
* against this codebase's own fixed schema).
|
|
12
|
-
* @returns The identifier wrapped in double quotes.
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* columns.map(quoteTransferIdentifier).join(', ') // '"id", "order", "text"'
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export function quoteTransferIdentifier(name) {
|
|
19
|
-
return `"${name.replaceAll('"', '""')}"`;
|
|
20
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { ExURL, ParseURLOptions } from '@d-zero/shared/parse-url';
|
|
2
|
-
import type { Knex } from 'knex';
|
|
3
|
-
/**
|
|
4
|
-
* Recomputes `resource_items.is_external` for the WHOLE destination
|
|
5
|
-
* archive against its final (merged or narrowed) scope, once every source
|
|
6
|
-
* has been transferred.
|
|
7
|
-
*
|
|
8
|
-
* Unlike `content_items.is_external` ("was this taken on as a crawl
|
|
9
|
-
* target" — a write-time fact this transfer never re-derives, per
|
|
10
|
-
* ARCHITECTURE.md's invariant), `resource_items.is_external` is a pure
|
|
11
|
-
* scope check computed the same way at crawl time
|
|
12
|
-
* (`crawler.ts`'s `#handleResources`: `findScopeEntry(url, this.#scope)
|
|
13
|
-
* === null`). Concat's merged scope is a union of every source's roots,
|
|
14
|
-
* so a resource one source recorded as external can legitimately become
|
|
15
|
-
* internal-by-scope in the output even though nothing about the resource
|
|
16
|
-
* itself changed — recomputing this is the resource-table equivalent of
|
|
17
|
-
* what `content_items` deliberately does NOT do, and the two must not be
|
|
18
|
-
* "unified" into the same rule.
|
|
19
|
-
*
|
|
20
|
-
* Mirrors `repromoteExternalPages`'s shape (load every resource's URL,
|
|
21
|
-
* classify in JS, write matches back in bound-safe chunks) rather than a
|
|
22
|
-
* single SQL scope join — `resource_items.url_id` is nullable
|
|
23
|
-
* (`url_blob_id` rows have no URL to classify and are left as recorded),
|
|
24
|
-
* so the candidate set is every resource with a non-null `url_id`.
|
|
25
|
-
* @param trx - The destination transaction (no source ATTACHed).
|
|
26
|
-
* @param scope - The output archive's final scope map
|
|
27
|
-
* (`buildScopeMap(mergedOrNarrowedRoots, config)`).
|
|
28
|
-
* @param options - URL parsing options forwarded to {@link findScopeEntry}
|
|
29
|
-
* (the output archive's own `disableQueries`).
|
|
30
|
-
* @returns The number of resources whose `is_external` flipped.
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const scope = buildScopeMap(config.roots, config);
|
|
34
|
-
* const flipped = await reclassifyResourceExternality(knex, scope, config);
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export declare function reclassifyResourceExternality(trx: Knex, scope: ReadonlyMap<string, readonly ExURL[]>, options?: ParseURLOptions): Promise<number>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { tryParseUrl as parseUrl } from '@d-zero/shared/parse-url';
|
|
2
|
-
import { findScopeEntry } from '../../crawler/find-scope-entry.js';
|
|
3
|
-
/**
|
|
4
|
-
* Recomputes `resource_items.is_external` for the WHOLE destination
|
|
5
|
-
* archive against its final (merged or narrowed) scope, once every source
|
|
6
|
-
* has been transferred.
|
|
7
|
-
*
|
|
8
|
-
* Unlike `content_items.is_external` ("was this taken on as a crawl
|
|
9
|
-
* target" — a write-time fact this transfer never re-derives, per
|
|
10
|
-
* ARCHITECTURE.md's invariant), `resource_items.is_external` is a pure
|
|
11
|
-
* scope check computed the same way at crawl time
|
|
12
|
-
* (`crawler.ts`'s `#handleResources`: `findScopeEntry(url, this.#scope)
|
|
13
|
-
* === null`). Concat's merged scope is a union of every source's roots,
|
|
14
|
-
* so a resource one source recorded as external can legitimately become
|
|
15
|
-
* internal-by-scope in the output even though nothing about the resource
|
|
16
|
-
* itself changed — recomputing this is the resource-table equivalent of
|
|
17
|
-
* what `content_items` deliberately does NOT do, and the two must not be
|
|
18
|
-
* "unified" into the same rule.
|
|
19
|
-
*
|
|
20
|
-
* Mirrors `repromoteExternalPages`'s shape (load every resource's URL,
|
|
21
|
-
* classify in JS, write matches back in bound-safe chunks) rather than a
|
|
22
|
-
* single SQL scope join — `resource_items.url_id` is nullable
|
|
23
|
-
* (`url_blob_id` rows have no URL to classify and are left as recorded),
|
|
24
|
-
* so the candidate set is every resource with a non-null `url_id`.
|
|
25
|
-
* @param trx - The destination transaction (no source ATTACHed).
|
|
26
|
-
* @param scope - The output archive's final scope map
|
|
27
|
-
* (`buildScopeMap(mergedOrNarrowedRoots, config)`).
|
|
28
|
-
* @param options - URL parsing options forwarded to {@link findScopeEntry}
|
|
29
|
-
* (the output archive's own `disableQueries`).
|
|
30
|
-
* @returns The number of resources whose `is_external` flipped.
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const scope = buildScopeMap(config.roots, config);
|
|
34
|
-
* const flipped = await reclassifyResourceExternality(knex, scope, config);
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export async function reclassifyResourceExternality(trx, scope, options) {
|
|
38
|
-
const candidates = await trx
|
|
39
|
-
.select('resource_items.id as id', 'url_refs.url as url', 'resource_items.is_external')
|
|
40
|
-
.from('resource_items')
|
|
41
|
-
.join('url_refs', 'url_refs.id', 'resource_items.url_id');
|
|
42
|
-
const toInternal = [];
|
|
43
|
-
const toExternal = [];
|
|
44
|
-
for (const row of candidates) {
|
|
45
|
-
const parsed = parseUrl(row.url, options);
|
|
46
|
-
const isExternal = parsed ? findScopeEntry(parsed, scope, options) === null : true;
|
|
47
|
-
if (isExternal && row.is_external === 0) {
|
|
48
|
-
toExternal.push(row.id);
|
|
49
|
-
}
|
|
50
|
-
else if (!isExternal && row.is_external === 1) {
|
|
51
|
-
toInternal.push(row.id);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
const chunkSize = 500;
|
|
55
|
-
for (const [ids, value] of [
|
|
56
|
-
[toInternal, 0],
|
|
57
|
-
[toExternal, 1],
|
|
58
|
-
]) {
|
|
59
|
-
for (let i = 0; i < ids.length; i += chunkSize) {
|
|
60
|
-
await trx('resource_items')
|
|
61
|
-
.whereIn('id', ids.slice(i, i + chunkSize))
|
|
62
|
-
.update({ is_external: value });
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return toInternal.length + toExternal.length;
|
|
66
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { Knex } from 'knex';
|
|
2
|
-
/**
|
|
3
|
-
* Remaps `redirect_dest_id` for every `full`/`stub`/`replace`-action
|
|
4
|
-
* destination row this source just wrote, from the source's own id space
|
|
5
|
-
* into the destination's, via `temp.xfer_ci_plan` (which by this point
|
|
6
|
-
* maps EVERY source id to a destination id, not just the ones this source
|
|
7
|
-
* inserted — `skip`/`replace` rows already had `dest_id` set at plan
|
|
8
|
-
* time).
|
|
9
|
-
*
|
|
10
|
-
* `skip`-action rows are deliberately excluded from the `SET` target
|
|
11
|
-
* (via the `p.action IN (...)` filter) — a `skip` row's `content_items`
|
|
12
|
-
* row belongs to a PRIOR, better-ranked source, and this (losing) source
|
|
13
|
-
* has no business touching its `redirect_dest_id`.
|
|
14
|
-
*
|
|
15
|
-
* Must run AFTER both
|
|
16
|
-
* {@link import('./insert-content-items.js').insertContentItems} and
|
|
17
|
-
* {@link import('./replace-content-items.js').replaceContentItems} —
|
|
18
|
-
* every plan row needs a resolved `dest_id` (its own AND its redirect
|
|
19
|
-
* target's) before this can run. A source row whose `redirect_dest_id`
|
|
20
|
-
* points outside this source's own plan (should not happen — concat's
|
|
21
|
-
* plan covers every source row, and split's plan closure always pulls a
|
|
22
|
-
* kept row's redirect target in too, see `plan-content-items-for-split.ts`)
|
|
23
|
-
* silently leaves that destination row's `redirect_dest_id` at `NULL`
|
|
24
|
-
* rather than erroring — a dangling-but-absent redirect is a safe
|
|
25
|
-
* degrade, never a wrong one.
|
|
26
|
-
* @param trx - Transaction with the source ATTACHed as
|
|
27
|
-
* {@link TRANSFER_SOURCE_ALIAS}.
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* await insertContentItems(trx, { crawlOrderOffset: 0 });
|
|
31
|
-
* await remapRedirectDestIds(trx);
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export declare function remapRedirectDestIds(trx: Knex): Promise<void>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { TRANSFER_ACTION } from './transfer-action.js';
|
|
2
|
-
import { TRANSFER_SOURCE_ALIAS } from './transfer-source-alias.js';
|
|
3
|
-
/**
|
|
4
|
-
* Remaps `redirect_dest_id` for every `full`/`stub`/`replace`-action
|
|
5
|
-
* destination row this source just wrote, from the source's own id space
|
|
6
|
-
* into the destination's, via `temp.xfer_ci_plan` (which by this point
|
|
7
|
-
* maps EVERY source id to a destination id, not just the ones this source
|
|
8
|
-
* inserted — `skip`/`replace` rows already had `dest_id` set at plan
|
|
9
|
-
* time).
|
|
10
|
-
*
|
|
11
|
-
* `skip`-action rows are deliberately excluded from the `SET` target
|
|
12
|
-
* (via the `p.action IN (...)` filter) — a `skip` row's `content_items`
|
|
13
|
-
* row belongs to a PRIOR, better-ranked source, and this (losing) source
|
|
14
|
-
* has no business touching its `redirect_dest_id`.
|
|
15
|
-
*
|
|
16
|
-
* Must run AFTER both
|
|
17
|
-
* {@link import('./insert-content-items.js').insertContentItems} and
|
|
18
|
-
* {@link import('./replace-content-items.js').replaceContentItems} —
|
|
19
|
-
* every plan row needs a resolved `dest_id` (its own AND its redirect
|
|
20
|
-
* target's) before this can run. A source row whose `redirect_dest_id`
|
|
21
|
-
* points outside this source's own plan (should not happen — concat's
|
|
22
|
-
* plan covers every source row, and split's plan closure always pulls a
|
|
23
|
-
* kept row's redirect target in too, see `plan-content-items-for-split.ts`)
|
|
24
|
-
* silently leaves that destination row's `redirect_dest_id` at `NULL`
|
|
25
|
-
* rather than erroring — a dangling-but-absent redirect is a safe
|
|
26
|
-
* degrade, never a wrong one.
|
|
27
|
-
* @param trx - Transaction with the source ATTACHed as
|
|
28
|
-
* {@link TRANSFER_SOURCE_ALIAS}.
|
|
29
|
-
* @example
|
|
30
|
-
* ```ts
|
|
31
|
-
* await insertContentItems(trx, { crawlOrderOffset: 0 });
|
|
32
|
-
* await remapRedirectDestIds(trx);
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export async function remapRedirectDestIds(trx) {
|
|
36
|
-
await trx.raw(`
|
|
37
|
-
UPDATE main.content_items
|
|
38
|
-
SET redirect_dest_id = x.redirect_dest_id
|
|
39
|
-
FROM (
|
|
40
|
-
SELECT p.dest_id AS id, p2.dest_id AS redirect_dest_id
|
|
41
|
-
FROM xfer_ci_plan p
|
|
42
|
-
JOIN ${TRANSFER_SOURCE_ALIAS}.content_items s ON s.id = p.src_id
|
|
43
|
-
JOIN xfer_ci_plan p2 ON p2.src_id = s.redirect_dest_id
|
|
44
|
-
WHERE s.redirect_dest_id IS NOT NULL
|
|
45
|
-
AND p.action IN (${TRANSFER_ACTION.full}, ${TRANSFER_ACTION.stub}, ${TRANSFER_ACTION.replace})
|
|
46
|
-
AND p2.dest_id IS NOT NULL
|
|
47
|
-
) x
|
|
48
|
-
WHERE main.content_items.id = x.id
|
|
49
|
-
AND x.redirect_dest_id != x.id
|
|
50
|
-
`);
|
|
51
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Knex } from 'knex';
|
|
2
|
-
/**
|
|
3
|
-
* Overwrites every `replace`-action destination `content_items` row
|
|
4
|
-
* (concat only — split never assigns `replace`) with this source's
|
|
5
|
-
* column values, using the same per-column remap rules
|
|
6
|
-
* {@link import('./insert-content-items.js').insertContentItems} applies
|
|
7
|
-
* (dictionary FKs through their `temp.xfer_map_*` table, `redirect_dest_id`/
|
|
8
|
-
* `alias_of_id`/`dedupe_cap_event_id` always `NULL`, `crawl_order` offset).
|
|
9
|
-
*
|
|
10
|
-
* `url_id` is deliberately excluded from the UPDATE — a `replace` row was
|
|
11
|
-
* matched by URL string in the first place (`plan-content-items-for-concat.ts`),
|
|
12
|
-
* so the destination's `url_id` already points at the correct `url_refs`
|
|
13
|
-
* row and must not change. `is_external`/`is_target` are never forced
|
|
14
|
-
* here (unlike `insertContentItems`'s `stub` case) — concat has no stub
|
|
15
|
-
* action, so the source's own observed values pass straight through the
|
|
16
|
-
* generic `default` branch.
|
|
17
|
-
*
|
|
18
|
-
* Must run BEFORE {@link import('./insert-content-items.js').insertContentItems}
|
|
19
|
-
* would otherwise be fine in either order relative to it (they touch
|
|
20
|
-
* disjoint plan actions), but MUST run before the page-scoped table
|
|
21
|
-
* copies (`copy-page-meta.ts` et al.) — and after
|
|
22
|
-
* {@link import('./clear-replaced-page-rows.js').clearReplacedPageRows}
|
|
23
|
-
* has deleted the old derived rows for these same destination ids, so the
|
|
24
|
-
* fresh page-scoped copy does not collide with stale data.
|
|
25
|
-
* @param trx - Transaction with the source ATTACHed as
|
|
26
|
-
* {@link TRANSFER_SOURCE_ALIAS}.
|
|
27
|
-
* @param options - Options.
|
|
28
|
-
* @param options.crawlOrderOffset - See `insertContentItems`'s parameter
|
|
29
|
-
* of the same name — the same value passed to that call for this source.
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* await clearReplacedPageRows(trx);
|
|
33
|
-
* await replaceContentItems(trx, { crawlOrderOffset: 0 });
|
|
34
|
-
* await insertContentItems(trx, { crawlOrderOffset: 0 });
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export declare function replaceContentItems(trx: Knex, options: {
|
|
38
|
-
crawlOrderOffset: number;
|
|
39
|
-
}): Promise<void>;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { listTransferColumns } from './list-transfer-columns.js';
|
|
2
|
-
import { quoteTransferIdentifier } from './quote-transfer-identifier.js';
|
|
3
|
-
import { TRANSFER_ACTION } from './transfer-action.js';
|
|
4
|
-
import { TRANSFER_SOURCE_ALIAS } from './transfer-source-alias.js';
|
|
5
|
-
const SRC = TRANSFER_SOURCE_ALIAS;
|
|
6
|
-
/**
|
|
7
|
-
* Overwrites every `replace`-action destination `content_items` row
|
|
8
|
-
* (concat only — split never assigns `replace`) with this source's
|
|
9
|
-
* column values, using the same per-column remap rules
|
|
10
|
-
* {@link import('./insert-content-items.js').insertContentItems} applies
|
|
11
|
-
* (dictionary FKs through their `temp.xfer_map_*` table, `redirect_dest_id`/
|
|
12
|
-
* `alias_of_id`/`dedupe_cap_event_id` always `NULL`, `crawl_order` offset).
|
|
13
|
-
*
|
|
14
|
-
* `url_id` is deliberately excluded from the UPDATE — a `replace` row was
|
|
15
|
-
* matched by URL string in the first place (`plan-content-items-for-concat.ts`),
|
|
16
|
-
* so the destination's `url_id` already points at the correct `url_refs`
|
|
17
|
-
* row and must not change. `is_external`/`is_target` are never forced
|
|
18
|
-
* here (unlike `insertContentItems`'s `stub` case) — concat has no stub
|
|
19
|
-
* action, so the source's own observed values pass straight through the
|
|
20
|
-
* generic `default` branch.
|
|
21
|
-
*
|
|
22
|
-
* Must run BEFORE {@link import('./insert-content-items.js').insertContentItems}
|
|
23
|
-
* would otherwise be fine in either order relative to it (they touch
|
|
24
|
-
* disjoint plan actions), but MUST run before the page-scoped table
|
|
25
|
-
* copies (`copy-page-meta.ts` et al.) — and after
|
|
26
|
-
* {@link import('./clear-replaced-page-rows.js').clearReplacedPageRows}
|
|
27
|
-
* has deleted the old derived rows for these same destination ids, so the
|
|
28
|
-
* fresh page-scoped copy does not collide with stale data.
|
|
29
|
-
* @param trx - Transaction with the source ATTACHed as
|
|
30
|
-
* {@link TRANSFER_SOURCE_ALIAS}.
|
|
31
|
-
* @param options - Options.
|
|
32
|
-
* @param options.crawlOrderOffset - See `insertContentItems`'s parameter
|
|
33
|
-
* of the same name — the same value passed to that call for this source.
|
|
34
|
-
* @example
|
|
35
|
-
* ```ts
|
|
36
|
-
* await clearReplacedPageRows(trx);
|
|
37
|
-
* await replaceContentItems(trx, { crawlOrderOffset: 0 });
|
|
38
|
-
* await insertContentItems(trx, { crawlOrderOffset: 0 });
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
export async function replaceContentItems(trx, options) {
|
|
42
|
-
const columns = await listTransferColumns(trx, SRC, 'content_items', ['id', 'url_id']);
|
|
43
|
-
const setList = columns
|
|
44
|
-
.map((col) => `${quoteTransferIdentifier(col)} = x.${quoteTransferIdentifier(col)}`)
|
|
45
|
-
.join(', ');
|
|
46
|
-
const selectList = columns
|
|
47
|
-
.map((col) => {
|
|
48
|
-
const quotedCol = quoteTransferIdentifier(col);
|
|
49
|
-
switch (col) {
|
|
50
|
-
case 'content_type_id': {
|
|
51
|
-
return `mct.dest_id AS ${quotedCol}`;
|
|
52
|
-
}
|
|
53
|
-
case 'header_set_id': {
|
|
54
|
-
return `mhs.dest_id AS ${quotedCol}`;
|
|
55
|
-
}
|
|
56
|
-
case 'redirect_dest_id':
|
|
57
|
-
case 'alias_of_id':
|
|
58
|
-
case 'dedupe_cap_event_id': {
|
|
59
|
-
return `NULL AS ${quotedCol}`;
|
|
60
|
-
}
|
|
61
|
-
case 'crawl_order': {
|
|
62
|
-
return `s.crawl_order + ${options.crawlOrderOffset} AS ${quotedCol}`;
|
|
63
|
-
}
|
|
64
|
-
default: {
|
|
65
|
-
return `s.${quotedCol} AS ${quotedCol}`;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
})
|
|
69
|
-
.join(', ');
|
|
70
|
-
await trx.raw(`
|
|
71
|
-
UPDATE main.content_items
|
|
72
|
-
SET ${setList}
|
|
73
|
-
FROM (
|
|
74
|
-
SELECT p.dest_id AS dest_id, ${selectList}
|
|
75
|
-
FROM xfer_ci_plan p
|
|
76
|
-
JOIN ${SRC}.content_items s ON s.id = p.src_id
|
|
77
|
-
LEFT JOIN xfer_map_content_type_refs mct ON mct.src_id = s.content_type_id
|
|
78
|
-
LEFT JOIN xfer_map_header_sets mhs ON mhs.src_id = s.header_set_id
|
|
79
|
-
WHERE p.action = ${TRANSFER_ACTION.replace}
|
|
80
|
-
) x
|
|
81
|
-
WHERE main.content_items.id = x.dest_id
|
|
82
|
-
`);
|
|
83
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Every page-scoped table whose only FK column is its own page reference
|
|
3
|
-
* — no dictionary or cross-entity FK columns to remap, so every other
|
|
4
|
-
* column passes through unchanged. Covers the 9
|
|
5
|
-
* beholder-`MainContentsData` sub-entity tables, the technology-detection
|
|
6
|
-
* pair (always updated together, per ARCHITECTURE.md's pairing
|
|
7
|
-
* invariant — copying both in the same call keeps that true here too),
|
|
8
|
-
* `page_jsonld`, `page_errors`, `page_html_ref` (`hash` is the content-
|
|
9
|
-
* addressed identity of a `page_html_blobs` row, identical in every archive,
|
|
10
|
-
* so it passes through once `copy-page-html-blobs.ts` has copied the blob),
|
|
11
|
-
* and `page_templates` (`template_key` is a plain string column, not a
|
|
12
|
-
* dictionary FK — see `copy-page-template-clusters.ts` for its paired
|
|
13
|
-
* cluster-evidence table).
|
|
14
|
-
*
|
|
15
|
-
* Shared between {@link import('./copy-simple-page-scoped-tables.js').copySimplePageScopedTables}
|
|
16
|
-
* (what to copy verbatim) and
|
|
17
|
-
* {@link import('./clear-replaced-page-rows.js').clearReplacedPageRows}
|
|
18
|
-
* (a subset of what to delete for a `replace`d page) — a single list here
|
|
19
|
-
* means a future page-scoped table only needs adding in one place to stay
|
|
20
|
-
* consistent between the two operations.
|
|
21
|
-
*/
|
|
22
|
-
export declare const SIMPLE_PAGE_SCOPED_TABLES: readonly {
|
|
23
|
-
table: string;
|
|
24
|
-
pageColumn: string;
|
|
25
|
-
}[];
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Every page-scoped table whose only FK column is its own page reference
|
|
3
|
-
* — no dictionary or cross-entity FK columns to remap, so every other
|
|
4
|
-
* column passes through unchanged. Covers the 9
|
|
5
|
-
* beholder-`MainContentsData` sub-entity tables, the technology-detection
|
|
6
|
-
* pair (always updated together, per ARCHITECTURE.md's pairing
|
|
7
|
-
* invariant — copying both in the same call keeps that true here too),
|
|
8
|
-
* `page_jsonld`, `page_errors`, `page_html_ref` (`hash` is the content-
|
|
9
|
-
* addressed identity of a `page_html_blobs` row, identical in every archive,
|
|
10
|
-
* so it passes through once `copy-page-html-blobs.ts` has copied the blob),
|
|
11
|
-
* and `page_templates` (`template_key` is a plain string column, not a
|
|
12
|
-
* dictionary FK — see `copy-page-template-clusters.ts` for its paired
|
|
13
|
-
* cluster-evidence table).
|
|
14
|
-
*
|
|
15
|
-
* Shared between {@link import('./copy-simple-page-scoped-tables.js').copySimplePageScopedTables}
|
|
16
|
-
* (what to copy verbatim) and
|
|
17
|
-
* {@link import('./clear-replaced-page-rows.js').clearReplacedPageRows}
|
|
18
|
-
* (a subset of what to delete for a `replace`d page) — a single list here
|
|
19
|
-
* means a future page-scoped table only needs adding in one place to stay
|
|
20
|
-
* consistent between the two operations.
|
|
21
|
-
*/
|
|
22
|
-
export const SIMPLE_PAGE_SCOPED_TABLES = [
|
|
23
|
-
{ table: 'page_main_content_headings', pageColumn: 'pageId' },
|
|
24
|
-
{ table: 'page_main_content_images', pageColumn: 'pageId' },
|
|
25
|
-
{ table: 'page_main_content_tables', pageColumn: 'pageId' },
|
|
26
|
-
{ table: 'page_main_content_buttons', pageColumn: 'pageId' },
|
|
27
|
-
{ table: 'page_main_content_iframes', pageColumn: 'pageId' },
|
|
28
|
-
{ table: 'page_main_content_videos', pageColumn: 'pageId' },
|
|
29
|
-
{ table: 'page_main_content_audios', pageColumn: 'pageId' },
|
|
30
|
-
{ table: 'page_main_content_canvases', pageColumn: 'pageId' },
|
|
31
|
-
{ table: 'page_main_content_custom_elements', pageColumn: 'pageId' },
|
|
32
|
-
{ table: 'technology_signals', pageColumn: 'pageId' },
|
|
33
|
-
{ table: 'page_technologies', pageColumn: 'pageId' },
|
|
34
|
-
{ table: 'page_jsonld', pageColumn: 'pageId' },
|
|
35
|
-
{ table: 'page_errors', pageColumn: 'pageId' },
|
|
36
|
-
{ table: 'page_html_ref', pageColumn: 'page_id' },
|
|
37
|
-
{ table: 'page_templates', pageColumn: 'page_id' },
|
|
38
|
-
];
|