/** * source-sync — public re-export barrel. * * The implementation has been decomposed into focused sub-modules under * src/domains/discovery/source-sync/. This file is kept as a stable re-export * point so that all existing callers continue to import from * "./source-sync.js" without modification. * * Public API: * syncIndexedSources – top-level driver (called by discover.ts) * loadSourceSyncState – read persisted state * getIndexedSourceIds – query helper * loadIndexedCatalogEntries – load persisted entries * SourceSyncState – aggregate state type * SourceSyncSourceState – per-source state type * SourceSyncCursorState – cursor type * sourceSyncInternals – test escape-hatch (internal functions) */ export type { SourceSyncCursorState, SourceSyncSourceState, SourceSyncState, } from "./source-sync/types.js"; export { syncIndexedSources, loadSourceSyncState, getIndexedSourceIds, loadIndexedCatalogEntries, synchronizeIndexedSource, formatSyncEtaMs, estimateRemainingSyncMs, } from "./source-sync/index.js"; import { estimateRemainingSyncMs, formatSyncEtaMs, synchronizeIndexedSource } from "./source-sync/index.js"; import { areIndexedCatalogEntriesEqual, stableStringify, sortJsonValue, countEntriesForSource, getPreviousCursorStates, restoreFiniteCursorState, parsePositiveIntegerToken, parseNonNegativeIntegerToken, allPreviousCursorsCompleted } from "./source-sync/state.js"; import { fetchRequiredText, fetchRequiredJson, isNonTransientError, resolveSitemapLeafUrls, parseSitemapIndex, parseUrlSet, toSameOriginUrl, stripUrlQueryAndHash, isAllowedOriginUrl, dedupeUrls, getAllowedOrigins, getAllowedOrigin, normalizeStringArray, asRecord, getString, getNumber, stringifyUnknown, getErrorMessage, hasHttpStatus, NonTransientFetchError, fetchWithRetry } from "./source-sync/fetching.js"; import { buildDisplayNameFromUrl, buildIndexedReferenceItem, buildManifestEntryFromUrl, decodePathSegments, extractPypiPackageNameFromUrl, extractSwiftPackageNameFromUrl } from "./source-sync/references.js"; import { classifyNonIndexedSource } from "./source-sync/reporting.js"; import { syncSitemapPackageRegistrySource, syncHtmlPackageRegistrySource } from "./source-sync/html.js"; import { syncMcpRegistrySource, buildMcpRegistryCatalogEntry, isLatestMcpRegistryEntry, getMcpRegistryUpdatedAt, buildMcpRegistryOriginUrl, extractMcpRegistryRemoteTypes } from "./source-sync/registries/mcp-registry.js"; import { syncNpmRegistrySource } from "./source-sync/registries/npm.js"; import { syncCargoRegistrySource } from "./source-sync/registries/crates.js"; import { syncGoRegistrySource } from "./source-sync/registries/go.js"; import { syncMavenRegistrySource } from "./source-sync/registries/maven.js"; import { syncNuGetRegistrySource, resolveNuGetSearchQueryServiceUrl } from "./source-sync/registries/nuget.js"; /** * Internal helpers exported for test-only use. Not part of the public API. * Allows the test suite to exercise internal logic without importing from * internal sub-module paths directly. */ export declare const sourceSyncInternals: { areIndexedCatalogEntriesEqual: typeof areIndexedCatalogEntriesEqual; stableStringify: typeof stableStringify; sortJsonValue: typeof sortJsonValue; classifyNonIndexedSource: typeof classifyNonIndexedSource; resolveNuGetSearchQueryServiceUrl: typeof resolveNuGetSearchQueryServiceUrl; syncSitemapPackageRegistrySource: typeof syncSitemapPackageRegistrySource; syncHtmlPackageRegistrySource: typeof syncHtmlPackageRegistrySource; syncMcpRegistrySource: typeof syncMcpRegistrySource; syncNpmRegistrySource: typeof syncNpmRegistrySource; syncCargoRegistrySource: typeof syncCargoRegistrySource; syncGoRegistrySource: typeof syncGoRegistrySource; syncMavenRegistrySource: typeof syncMavenRegistrySource; syncNuGetRegistrySource: typeof syncNuGetRegistrySource; buildMcpRegistryCatalogEntry: typeof buildMcpRegistryCatalogEntry; isLatestMcpRegistryEntry: typeof isLatestMcpRegistryEntry; getMcpRegistryUpdatedAt: typeof getMcpRegistryUpdatedAt; buildMcpRegistryOriginUrl: typeof buildMcpRegistryOriginUrl; extractMcpRegistryRemoteTypes: typeof extractMcpRegistryRemoteTypes; fetchRequiredText: typeof fetchRequiredText; fetchRequiredJson: typeof fetchRequiredJson; resolveSitemapLeafUrls: typeof resolveSitemapLeafUrls; parseSitemapIndex: typeof parseSitemapIndex; parseUrlSet: typeof parseUrlSet; toSameOriginUrl: typeof toSameOriginUrl; stripUrlQueryAndHash: typeof stripUrlQueryAndHash; isAllowedOriginUrl: typeof isAllowedOriginUrl; dedupeUrls: typeof dedupeUrls; getAllowedOrigins: typeof getAllowedOrigins; getAllowedOrigin: typeof getAllowedOrigin; getPreviousCursorStates: typeof getPreviousCursorStates; restoreFiniteCursorState: typeof restoreFiniteCursorState; parsePositiveIntegerToken: typeof parsePositiveIntegerToken; parseNonNegativeIntegerToken: typeof parseNonNegativeIntegerToken; countEntriesForSource: typeof countEntriesForSource; buildDisplayNameFromUrl: typeof buildDisplayNameFromUrl; buildIndexedReferenceItem: typeof buildIndexedReferenceItem; buildManifestEntryFromUrl: typeof buildManifestEntryFromUrl; decodePathSegments: typeof decodePathSegments; extractPypiPackageNameFromUrl: typeof extractPypiPackageNameFromUrl; extractSwiftPackageNameFromUrl: typeof extractSwiftPackageNameFromUrl; normalizeStringArray: typeof normalizeStringArray; asRecord: typeof asRecord; getString: typeof getString; getNumber: typeof getNumber; stringifyUnknown: typeof stringifyUnknown; getErrorMessage: typeof getErrorMessage; allPreviousCursorsCompleted: typeof allPreviousCursorsCompleted; hasHttpStatus: typeof hasHttpStatus; NonTransientFetchError: typeof NonTransientFetchError; isNonTransientError: typeof isNonTransientError; fetchWithRetry: typeof fetchWithRetry; synchronizeIndexedSource: typeof synchronizeIndexedSource; formatSyncEtaMs: typeof formatSyncEtaMs; estimateRemainingSyncMs: typeof estimateRemainingSyncMs; };