/** * pub.dev registry adapter for source-sync. * * Owns: resumable pub.dev package listing sync via the official * JSON API at https://pub.dev/api/package-names. * * Per https://pub.dev/help/api, the supported listing endpoint is * /api/package-names — it returns paginated package name strings * with a camelCase `nextUrl` cursor. The /api/packages?page=N URL * is not a supported public API. */ import type { SourceDefinition } from "../../../../types.js"; import type { SourceSyncContext, SourceSyncSourceState } from "../types.js"; /** * pub.dev intentionally returns HTTP 406 unless clients advertise gzip support. * Node's Fetch implementation transparently decodes gzip response bodies, so * the adapter only needs to opt into the required content negotiation header. */ export declare const PUB_DEV_REQUEST_HEADERS: { readonly "Accept-Encoding": "gzip"; }; /** * Syncs the pub.dev package registry using the official paginated * `/api/package-names` API. Each response page contains: * * { "packages": ["name1", ...], "nextUrl": "..." } * * Packages are returned as plain names — the listing API does not * expose per-package metadata. Individual package details require * separate calls to /api/packages/, which are not used here * to keep sync fast and bounded. */ export declare function syncPubDevSource(source: SourceDefinition, context: SourceSyncContext): Promise;