[{"data":1,"prerenderedAt":1425},["ShallowReactive",2],{"navigation_docs":3,"-guide-lookups":72,"-guide-lookups-surround":1420},[4,40],{"title":5,"path":6,"stem":7,"children":8,"icon":39},"Guide","\u002Fguide","1.guide\u002F1.index",[9,11,15,19,23,27,31,35],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"PURLs","\u002Fguide\u002Fpurl","1.guide\u002F2.purl",{"title":16,"path":17,"stem":18},"Lookups","\u002Fguide\u002Flookups","1.guide\u002F3.lookups",{"title":20,"path":21,"stem":22},"Caching","\u002Fguide\u002Fcache","1.guide\u002F4.cache",{"title":24,"path":25,"stem":26},"CLI","\u002Fguide\u002Fcli","1.guide\u002F5.cli",{"title":28,"path":29,"stem":30},"Agents","\u002Fguide\u002Fagents","1.guide\u002F6.agents",{"title":32,"path":33,"stem":34},"Custom Registries","\u002Fguide\u002Fcustom","1.guide\u002F7.custom",{"title":36,"path":37,"stem":38},"Explorer","\u002Fguide\u002Fexplorer","1.guide\u002F8.explorer","i-lucide-book-open",{"title":41,"path":42,"stem":43,"children":44,"icon":71},"Registries","\u002Fregistries","2.registries\u002F0.index",[45,47,51,55,59,63,67],{"title":46,"path":42,"stem":43},"Overview",{"title":48,"path":49,"stem":50},"npm","\u002Fregistries\u002Fnpm","2.registries\u002F01.npm",{"title":52,"path":53,"stem":54},"crates.io","\u002Fregistries\u002Fcargo","2.registries\u002F02.cargo",{"title":56,"path":57,"stem":58},"PyPI","\u002Fregistries\u002Fpypi","2.registries\u002F03.pypi",{"title":60,"path":61,"stem":62},"RubyGems","\u002Fregistries\u002Frubygems","2.registries\u002F04.rubygems",{"title":64,"path":65,"stem":66},"Packagist","\u002Fregistries\u002Fpackagist","2.registries\u002F05.packagist",{"title":68,"path":69,"stem":70},"Arch Linux","\u002Fregistries\u002Falpm","2.registries\u002F06.alpm","i-lucide-library",{"id":73,"title":16,"body":74,"description":1413,"extension":1414,"links":1415,"meta":1416,"navigation":396,"path":17,"seo":1418,"stem":18,"__hash__":1419},"docs\u002F1.guide\u002F3.lookups.md",{"type":75,"value":76,"toc":1403},"minimark",[77,82,328,349,352,445,466,490,494,547,574,593,679,685,689,739,750,824,828,877,880,884,1024,1031,1035,1207,1217,1221,1231,1374,1399],[78,79,81],"h2",{"id":80},"the-contract","The contract",[83,84,89],"pre",{"className":85,"code":86,"language":87,"meta":88,"style":88},"language-ts shiki shiki-themes github-light github-light poimandres","abstract class Registry {\n  abstract ecosystem(): string;\n  abstract fetchPackage(name: string, signal?: AbortSignal): Promise\u003CPackage>;\n  abstract fetchVersions(name: string, signal?: AbortSignal): Promise\u003CVersion[]>;\n  abstract fetchDependencies(name: string, version: string, signal?: AbortSignal): Promise\u003CDependency[]>;\n  abstract fetchMaintainers(name: string, signal?: AbortSignal): Promise\u003CMaintainer[]>;\n  abstract urls(): URLBuilder;\n}\n","ts","",[90,91,92,113,135,184,222,268,305,322],"code",{"__ignoreMap":88},[93,94,97,101,105,109],"span",{"class":95,"line":96},"line",1,[93,98,100],{"class":99},"sP0CR","abstract",[93,102,104],{"class":103},"s1TYA"," class",[93,106,108],{"class":107},"scZRh"," Registry",[93,110,112],{"class":111},"sKlNE"," {\n",[93,114,116,119,122,125,128,132],{"class":95,"line":115},2,[93,117,118],{"class":99},"  abstract",[93,120,121],{"class":107}," ecosystem",[93,123,124],{"class":111},"()",[93,126,127],{"class":103},":",[93,129,131],{"class":130},"s8yaW"," string",[93,133,134],{"class":111},";\n",[93,136,138,140,143,146,150,152,154,157,160,163,167,170,172,175,178,181],{"class":95,"line":137},3,[93,139,118],{"class":99},[93,141,142],{"class":107}," fetchPackage",[93,144,145],{"class":111},"(",[93,147,149],{"class":148},"s1jWp","name",[93,151,127],{"class":103},[93,153,131],{"class":130},[93,155,156],{"class":111},", ",[93,158,159],{"class":148},"signal",[93,161,162],{"class":103},"?:",[93,164,166],{"class":165},"sCrqT"," AbortSignal",[93,168,169],{"class":111},")",[93,171,127],{"class":103},[93,173,174],{"class":165}," Promise",[93,176,177],{"class":111},"\u003C",[93,179,180],{"class":165},"Package",[93,182,183],{"class":111},">;\n",[93,185,187,189,192,194,196,198,200,202,204,206,208,210,212,214,216,219],{"class":95,"line":186},4,[93,188,118],{"class":99},[93,190,191],{"class":107}," fetchVersions",[93,193,145],{"class":111},[93,195,149],{"class":148},[93,197,127],{"class":103},[93,199,131],{"class":130},[93,201,156],{"class":111},[93,203,159],{"class":148},[93,205,162],{"class":103},[93,207,166],{"class":165},[93,209,169],{"class":111},[93,211,127],{"class":103},[93,213,174],{"class":165},[93,215,177],{"class":111},[93,217,218],{"class":165},"Version",[93,220,221],{"class":111},"[]>;\n",[93,223,225,227,230,232,234,236,238,240,243,245,247,249,251,253,255,257,259,261,263,266],{"class":95,"line":224},5,[93,226,118],{"class":99},[93,228,229],{"class":107}," fetchDependencies",[93,231,145],{"class":111},[93,233,149],{"class":148},[93,235,127],{"class":103},[93,237,131],{"class":130},[93,239,156],{"class":111},[93,241,242],{"class":148},"version",[93,244,127],{"class":103},[93,246,131],{"class":130},[93,248,156],{"class":111},[93,250,159],{"class":148},[93,252,162],{"class":103},[93,254,166],{"class":165},[93,256,169],{"class":111},[93,258,127],{"class":103},[93,260,174],{"class":165},[93,262,177],{"class":111},[93,264,265],{"class":165},"Dependency",[93,267,221],{"class":111},[93,269,271,273,276,278,280,282,284,286,288,290,292,294,296,298,300,303],{"class":95,"line":270},6,[93,272,118],{"class":99},[93,274,275],{"class":107}," fetchMaintainers",[93,277,145],{"class":111},[93,279,149],{"class":148},[93,281,127],{"class":103},[93,283,131],{"class":130},[93,285,156],{"class":111},[93,287,159],{"class":148},[93,289,162],{"class":103},[93,291,166],{"class":165},[93,293,169],{"class":111},[93,295,127],{"class":103},[93,297,174],{"class":165},[93,299,177],{"class":111},[93,301,302],{"class":165},"Maintainer",[93,304,221],{"class":111},[93,306,308,310,313,315,317,320],{"class":95,"line":307},7,[93,309,118],{"class":99},[93,311,312],{"class":107}," urls",[93,314,124],{"class":111},[93,316,127],{"class":103},[93,318,319],{"class":165}," URLBuilder",[93,321,134],{"class":111},[93,323,325],{"class":95,"line":324},8,[93,326,327],{"class":111},"}\n",[329,330,331,332,334,335,156,338,156,341,344,345,348],"p",{},"Every adapter and every decorator, the cache included, has this shape. ",[90,333,149],{}," is the registry's own name for the package: ",[90,336,337],{},"@vue\u002Fcore",[90,339,340],{},"laravel\u002Fframework",[90,342,343],{},"aur\u002Fparu",". The PURL helpers produce it with ",[90,346,347],{},"fullName","; when you hold an adapter directly you pass it yourself.",[78,350,180],{"id":351},"package",[83,353,355],{"className":85,"code":354,"language":87,"meta":88,"style":88},"const pkg = await fetchPackageFromPURL(\"pkg:cargo\u002Fserde\");\n\npkg.latestVersion; \u002F\u002F \"1.0.229\"\npkg.documentation; \u002F\u002F \"https:\u002F\u002Fdocs.rs\u002Fserde\"\npkg.metadata; \u002F\u002F { downloads: 1234567890, recentDownloads: …, categories: [...] }\n",[90,356,357,392,398,417,431],{"__ignoreMap":88},[93,358,359,362,366,369,373,377,379,383,387,389],{"class":95,"line":96},[93,360,361],{"class":103},"const",[93,363,365],{"class":364},"saoiD"," pkg",[93,367,368],{"class":103}," =",[93,370,372],{"class":371},"sZW6a"," await",[93,374,376],{"class":375},"sULi6"," fetchPackageFromPURL",[93,378,145],{"class":111},[93,380,382],{"class":381},"scVjq","\"",[93,384,386],{"class":385},"sQ7BG","pkg:cargo\u002Fserde",[93,388,382],{"class":381},[93,390,391],{"class":111},");\n",[93,393,394],{"class":95,"line":115},[93,395,397],{"emptyLinePlaceholder":396},true,"\n",[93,399,400,404,407,410,413],{"class":95,"line":137},[93,401,403],{"class":402},"spVlQ","pkg",[93,405,406],{"class":111},".",[93,408,409],{"class":402},"latestVersion",[93,411,412],{"class":111},"; ",[93,414,416],{"class":415},"sjhu3","\u002F\u002F \"1.0.229\"\n",[93,418,419,421,423,426,428],{"class":95,"line":186},[93,420,403],{"class":402},[93,422,406],{"class":111},[93,424,425],{"class":402},"documentation",[93,427,412],{"class":111},[93,429,430],{"class":415},"\u002F\u002F \"https:\u002F\u002Fdocs.rs\u002Fserde\"\n",[93,432,433,435,437,440,442],{"class":95,"line":224},[93,434,403],{"class":402},[93,436,406],{"class":111},[93,438,439],{"class":402},"metadata",[93,441,412],{"class":111},[93,443,444],{"class":415},"\u002F\u002F { downloads: 1234567890, recentDownloads: …, categories: [...] }\n",[329,446,447,449,450,453,454,457,458,461,462,465],{},[90,448,409],{}," is what the registry calls latest: npm's ",[90,451,452],{},"dist-tags.latest",", crates.io's ",[90,455,456],{},"max_stable_version"," with a fallback to ",[90,459,460],{},"max_version",", PyPI's ",[90,463,464],{},"info.version",", RubyGems' current version, Packagist's newest stable tag, the Arch package version with epoch and release. It is never computed from the version list, so a registry that pins latest to an older release keeps that decision.",[329,467,468,471,472,475,476,471,479,482,483,486,487,406],{},[90,469,470],{},"licenses"," goes through ",[90,473,474],{},"normalizeLicense",", which maps common spellings to SPDX identifiers and leaves anything that already looks like SPDX alone. ",[90,477,478],{},"repository",[90,480,481],{},"normalizeRepositoryURL",", which turns ",[90,484,485],{},"git+ssh:\u002F\u002Fgit@github.com\u002Fx\u002Fy.git"," and friends into ",[90,488,489],{},"https:\u002F\u002Fgithub.com\u002Fx\u002Fy",[78,491,493],{"id":492},"versions","Versions",[83,495,497],{"className":85,"code":496,"language":87,"meta":88,"style":88},"const versions = await fetchVersionsFromPURL(\"pkg:gem\u002Frails\");\n\nversions[0];\n\u002F\u002F { number: \"8.1.3.1\", publishedAt: Date, licenses: \"MIT\", integrity: \"sha256-…\", status: \"\", metadata: {} }\n",[90,498,499,524,528,542],{"__ignoreMap":88},[93,500,501,503,506,508,510,513,515,517,520,522],{"class":95,"line":96},[93,502,361],{"class":103},[93,504,505],{"class":364}," versions",[93,507,368],{"class":103},[93,509,372],{"class":371},[93,511,512],{"class":375}," fetchVersionsFromPURL",[93,514,145],{"class":111},[93,516,382],{"class":381},[93,518,519],{"class":385},"pkg:gem\u002Frails",[93,521,382],{"class":381},[93,523,391],{"class":111},[93,525,526],{"class":95,"line":115},[93,527,397],{"emptyLinePlaceholder":396},[93,529,530,532,535,539],{"class":95,"line":137},[93,531,492],{"class":402},[93,533,534],{"class":111},"[",[93,536,538],{"class":537},"siHFe","0",[93,540,541],{"class":111},"];\n",[93,543,544],{"class":95,"line":186},[93,545,546],{"class":415},"\u002F\u002F { number: \"8.1.3.1\", publishedAt: Date, licenses: \"MIT\", integrity: \"sha256-…\", status: \"\", metadata: {} }\n",[329,548,549,550,553,554,557,558,561,562,565,566,569,570,573],{},"The list is in the registry's order; the CLI sorts it newest first. ",[90,551,552],{},"publishedAt"," is a ",[90,555,556],{},"Date"," or ",[90,559,560],{},"null"," where the registry does not date versions. ",[90,563,564],{},"integrity"," is the registry's own checksum when it has one, prefixed like SRI (",[90,567,568],{},"sha512-"," on npm, ",[90,571,572],{},"sha256-"," elsewhere).",[329,575,576,579,580,156,583,156,586,589,590,127],{},[90,577,578],{},"status"," is one of ",[90,581,582],{},"\"\"",[90,584,585],{},"\"yanked\"",[90,587,588],{},"\"deprecated\""," and ",[90,591,592],{},"\"retracted\"",[594,595,596,616],"table",{},[597,598,599],"thead",{},[600,601,602,606,611],"tr",{},[603,604,605],"th",{},"Ecosystem",[603,607,608],{},[90,609,610],{},"yanked",[603,612,613],{},[90,614,615],{},"deprecated",[617,618,619,631,643,652,662,670],"tbody",{},[600,620,621,624,626],{},[622,623,48],"td",{},[622,625],{},[622,627,628,630],{},[90,629,615],{}," field on the version",[600,632,633,636,641],{},[622,634,635],{},"Cargo",[622,637,638,640],{},[90,639,610],{}," on the version",[622,642],{},[600,644,645,647,650],{},[622,646,56],{},[622,648,649],{},"any file of the release yanked",[622,651],{},[600,653,654,656,660],{},[622,655,60],{},[622,657,658,640],{},[90,659,610],{},[622,661],{},[600,663,664,666,668],{},[622,665,64],{},[622,667],{},[622,669],{},[600,671,672,674,676],{},[622,673,68],{},[622,675],{},[622,677,678],{},"flagged out of date, on both official and AUR",[329,680,681,684],{},[90,682,683],{},"selectVersion(versions, { requested, latest })"," picks the exact requested version if it is usable, then the registry's latest, then the newest usable one, skipping anything with a status.",[78,686,688],{"id":687},"dependencies","Dependencies",[83,690,692],{"className":85,"code":691,"language":87,"meta":88,"style":88},"const deps = await fetchDependenciesFromPURL(\"pkg:pypi\u002Fflask@3.1.3\");\n\ndeps[0];\n\u002F\u002F { name: \"blinker\", requirements: \">=1.9.0\", scope: \"runtime\", optional: false }\n",[90,693,694,719,723,734],{"__ignoreMap":88},[93,695,696,698,701,703,705,708,710,712,715,717],{"class":95,"line":96},[93,697,361],{"class":103},[93,699,700],{"class":364}," deps",[93,702,368],{"class":103},[93,704,372],{"class":371},[93,706,707],{"class":375}," fetchDependenciesFromPURL",[93,709,145],{"class":111},[93,711,382],{"class":381},[93,713,714],{"class":385},"pkg:pypi\u002Fflask@3.1.3",[93,716,382],{"class":381},[93,718,391],{"class":111},[93,720,721],{"class":95,"line":115},[93,722,397],{"emptyLinePlaceholder":396},[93,724,725,728,730,732],{"class":95,"line":137},[93,726,727],{"class":402},"deps",[93,729,534],{"class":111},[93,731,538],{"class":537},[93,733,541],{"class":111},[93,735,736],{"class":95,"line":186},[93,737,738],{"class":415},"\u002F\u002F { name: \"blinker\", requirements: \">=1.9.0\", scope: \"runtime\", optional: false }\n",[329,740,741,742,745,746,749],{},"A version is required. ",[90,743,744],{},"fetchDependenciesFromPURL"," throws ",[90,747,748],{},"InvalidPURLError"," without one; the CLI and the docs API resolve the latest version first, and say so.",[329,751,752,579,755,156,758,156,761,156,764,589,767,770,771,774,775,156,777,774,780,782,783,156,786,774,789,791,792,795,796,798,799,589,802,798,804,806,807,782,809,811,812,156,815,156,818,589,821,406],{},[90,753,754],{},"scope",[90,756,757],{},"runtime",[90,759,760],{},"development",[90,762,763],{},"test",[90,765,766],{},"build",[90,768,769],{},"optional",". The mapping is per ecosystem: npm's ",[90,772,773],{},"devDependencies"," are ",[90,776,760],{},[90,778,779],{},"optionalDependencies",[90,781,757],{}," with ",[90,784,785],{},"optional: true",[90,787,788],{},"peerDependencies",[90,790,757],{},"; crates.io kinds map one to one; PyPI ",[90,793,794],{},"extra"," markers become ",[90,797,760],{}," for ",[90,800,801],{},"dev",[90,803,763],{},[90,805,763],{},", other extras stay ",[90,808,757],{},[90,810,785],{},"; Arch splits ",[90,813,814],{},"depends",[90,816,817],{},"makedepends",[90,819,820],{},"checkdepends",[90,822,823],{},"optdepends",[78,825,827],{"id":826},"maintainers","Maintainers",[83,829,831],{"className":85,"code":830,"language":87,"meta":88,"style":88},"const maintainers = await fetchMaintainersFromPURL(\"pkg:npm\u002Flodash\");\n\nmaintainers[0];\n\u002F\u002F { uuid: \"\", login: \"\", name: \"bnjmnt4n\", email: \"…\", url: \"\", role: \"\" }\n",[90,832,833,858,862,872],{"__ignoreMap":88},[93,834,835,837,840,842,844,847,849,851,854,856],{"class":95,"line":96},[93,836,361],{"class":103},[93,838,839],{"class":364}," maintainers",[93,841,368],{"class":103},[93,843,372],{"class":371},[93,845,846],{"class":375}," fetchMaintainersFromPURL",[93,848,145],{"class":111},[93,850,382],{"class":381},[93,852,853],{"class":385},"pkg:npm\u002Flodash",[93,855,382],{"class":381},[93,857,391],{"class":111},[93,859,860],{"class":95,"line":115},[93,861,397],{"emptyLinePlaceholder":396},[93,863,864,866,868,870],{"class":95,"line":137},[93,865,826],{"class":402},[93,867,534],{"class":111},[93,869,538],{"class":537},[93,871,541],{"class":111},[93,873,874],{"class":95,"line":186},[93,875,876],{"class":415},"\u002F\u002F { uuid: \"\", login: \"\", name: \"bnjmnt4n\", email: \"…\", url: \"\", role: \"\" }\n",[329,878,879],{},"Registries disagree most here. npm lists maintainers (no role), then the author and the contributors of the latest version, each with that role. crates.io lists owner users with a login and a URL. PyPI has one author. RubyGems lists owners with a handle. Packagist lists the authors declared across versions, deduplicated, with whatever role they declared. Arch lists the official maintainers, or the single AUR maintainer. Empty strings mean the registry did not say; nothing is invented.",[78,881,883],{"id":882},"bulk","Bulk",[83,885,887],{"className":85,"code":886,"language":87,"meta":88,"style":88},"import { bulkFetchPackages } from \"@agntn\u002Fregistries\";\n\nconst results = await bulkFetchPackages([\"pkg:npm\u002Flodash\", \"pkg:cargo\u002Fserde\", \"pkg:npm\u002Fdoes-not-exist\"], {\n  concurrency: 10,\n});\n\nresults.size; \u002F\u002F 2\nresults.get(\"pkg:npm\u002Fdoes-not-exist\"); \u002F\u002F undefined\n",[90,888,889,918,922,964,977,982,986,1001],{"__ignoreMap":88},[93,890,891,894,897,901,904,908,911,914,916],{"class":95,"line":96},[93,892,893],{"class":99},"import",[93,895,896],{"class":111}," {",[93,898,900],{"class":899},"snHMy"," bulkFetchPackages",[93,902,903],{"class":111}," }",[93,905,907],{"class":906},"stCPd"," from",[93,909,910],{"class":381}," \"",[93,912,913],{"class":385},"@agntn\u002Fregistries",[93,915,382],{"class":381},[93,917,134],{"class":111},[93,919,920],{"class":95,"line":115},[93,921,397],{"emptyLinePlaceholder":396},[93,923,924,926,929,931,933,935,938,940,942,944,946,948,950,952,954,956,959,961],{"class":95,"line":137},[93,925,361],{"class":103},[93,927,928],{"class":364}," results",[93,930,368],{"class":103},[93,932,372],{"class":371},[93,934,900],{"class":375},[93,936,937],{"class":111},"([",[93,939,382],{"class":381},[93,941,853],{"class":385},[93,943,382],{"class":381},[93,945,156],{"class":111},[93,947,382],{"class":381},[93,949,386],{"class":385},[93,951,382],{"class":381},[93,953,156],{"class":111},[93,955,382],{"class":381},[93,957,958],{"class":385},"pkg:npm\u002Fdoes-not-exist",[93,960,382],{"class":381},[93,962,963],{"class":111},"], {\n",[93,965,966,969,971,974],{"class":95,"line":186},[93,967,968],{"class":899},"  concurrency",[93,970,127],{"class":111},[93,972,973],{"class":537}," 10",[93,975,976],{"class":111},",\n",[93,978,979],{"class":95,"line":224},[93,980,981],{"class":111},"});\n",[93,983,984],{"class":95,"line":270},[93,985,397],{"emptyLinePlaceholder":396},[93,987,988,991,993,996,998],{"class":95,"line":307},[93,989,990],{"class":402},"results",[93,992,406],{"class":111},[93,994,995],{"class":402},"size",[93,997,412],{"class":111},[93,999,1000],{"class":415},"\u002F\u002F 2\n",[93,1002,1003,1005,1007,1010,1012,1014,1016,1018,1021],{"class":95,"line":324},[93,1004,990],{"class":402},[93,1006,406],{"class":111},[93,1008,1009],{"class":375},"get",[93,1011,145],{"class":111},[93,1013,382],{"class":381},[93,1015,958],{"class":385},[93,1017,382],{"class":381},[93,1019,1020],{"class":111},"); ",[93,1022,1023],{"class":415},"\u002F\u002F undefined\n",[329,1025,1026,1027,1030],{},"Up to ",[90,1028,1029],{},"concurrency"," lookups run at once, fifteen by default. A failed package is absent from the map instead of failing the batch; that is deliberate, since a bulk audit should report what it could find.",[78,1032,1034],{"id":1033},"urls","URLs",[83,1036,1038],{"className":85,"code":1037,"language":87,"meta":88,"style":88},"const [registry, name] = createFromPURL(\"pkg:cargo\u002Fserde\");\nconst urls = registry.urls();\n\nurls.registry(name); \u002F\u002F \"https:\u002F\u002Fcrates.io\u002Fcrates\u002Fserde\"\nurls.download(name, \"1.0.229\"); \u002F\u002F \"https:\u002F\u002Fcrates.io\u002Fapi\u002Fv1\u002Fcrates\u002Fserde\u002F1.0.229\u002Fdownload\"\nurls.documentation(name); \u002F\u002F \"https:\u002F\u002Fdocs.rs\u002Fserde\"\nurls.readme(name, \"1.0.229\"); \u002F\u002F \"https:\u002F\u002Fcrates.io\u002Fapi\u002Fv1\u002Fcrates\u002Fserde\u002F1.0.229\u002Freadme\"\nurls.purl(name, \"1.0.229\"); \u002F\u002F \"pkg:cargo\u002Fserde@1.0.229\"\n",[90,1039,1040,1073,1091,1095,1112,1139,1155,1181],{"__ignoreMap":88},[93,1041,1042,1044,1047,1050,1052,1054,1057,1060,1063,1065,1067,1069,1071],{"class":95,"line":96},[93,1043,361],{"class":103},[93,1045,1046],{"class":111}," [",[93,1048,1049],{"class":364},"registry",[93,1051,156],{"class":111},[93,1053,149],{"class":364},[93,1055,1056],{"class":111},"] ",[93,1058,1059],{"class":103},"=",[93,1061,1062],{"class":375}," createFromPURL",[93,1064,145],{"class":111},[93,1066,382],{"class":381},[93,1068,386],{"class":385},[93,1070,382],{"class":381},[93,1072,391],{"class":111},[93,1074,1075,1077,1079,1081,1084,1086,1088],{"class":95,"line":115},[93,1076,361],{"class":103},[93,1078,312],{"class":364},[93,1080,368],{"class":103},[93,1082,1083],{"class":402}," registry",[93,1085,406],{"class":111},[93,1087,1033],{"class":375},[93,1089,1090],{"class":111},"();\n",[93,1092,1093],{"class":95,"line":137},[93,1094,397],{"emptyLinePlaceholder":396},[93,1096,1097,1099,1101,1103,1105,1107,1109],{"class":95,"line":186},[93,1098,1033],{"class":402},[93,1100,406],{"class":111},[93,1102,1049],{"class":375},[93,1104,145],{"class":111},[93,1106,149],{"class":402},[93,1108,1020],{"class":111},[93,1110,1111],{"class":415},"\u002F\u002F \"https:\u002F\u002Fcrates.io\u002Fcrates\u002Fserde\"\n",[93,1113,1114,1116,1118,1121,1123,1125,1127,1129,1132,1134,1136],{"class":95,"line":224},[93,1115,1033],{"class":402},[93,1117,406],{"class":111},[93,1119,1120],{"class":375},"download",[93,1122,145],{"class":111},[93,1124,149],{"class":402},[93,1126,156],{"class":111},[93,1128,382],{"class":381},[93,1130,1131],{"class":385},"1.0.229",[93,1133,382],{"class":381},[93,1135,1020],{"class":111},[93,1137,1138],{"class":415},"\u002F\u002F \"https:\u002F\u002Fcrates.io\u002Fapi\u002Fv1\u002Fcrates\u002Fserde\u002F1.0.229\u002Fdownload\"\n",[93,1140,1141,1143,1145,1147,1149,1151,1153],{"class":95,"line":270},[93,1142,1033],{"class":402},[93,1144,406],{"class":111},[93,1146,425],{"class":375},[93,1148,145],{"class":111},[93,1150,149],{"class":402},[93,1152,1020],{"class":111},[93,1154,430],{"class":415},[93,1156,1157,1159,1161,1164,1166,1168,1170,1172,1174,1176,1178],{"class":95,"line":307},[93,1158,1033],{"class":402},[93,1160,406],{"class":111},[93,1162,1163],{"class":375},"readme",[93,1165,145],{"class":111},[93,1167,149],{"class":402},[93,1169,156],{"class":111},[93,1171,382],{"class":381},[93,1173,1131],{"class":385},[93,1175,382],{"class":381},[93,1177,1020],{"class":111},[93,1179,1180],{"class":415},"\u002F\u002F \"https:\u002F\u002Fcrates.io\u002Fapi\u002Fv1\u002Fcrates\u002Fserde\u002F1.0.229\u002Freadme\"\n",[93,1182,1183,1185,1187,1190,1192,1194,1196,1198,1200,1202,1204],{"class":95,"line":324},[93,1184,1033],{"class":402},[93,1186,406],{"class":111},[93,1188,1189],{"class":375},"purl",[93,1191,145],{"class":111},[93,1193,149],{"class":402},[93,1195,156],{"class":111},[93,1197,382],{"class":381},[93,1199,1131],{"class":385},[93,1201,382],{"class":381},[93,1203,1020],{"class":111},[93,1205,1206],{"class":415},"\u002F\u002F \"pkg:cargo\u002Fserde@1.0.229\"\n",[329,1208,1209,1212,1213,1216],{},[90,1210,1211],{},"resolveDocsUrl(pkg, urls, version)"," prefers the package's own documentation link, then its homepage, then the ecosystem default. ",[90,1214,1215],{},"resolveReadmeUrl"," is the ecosystem README link.",[78,1218,1220],{"id":1219},"cancellation-and-the-client","Cancellation and the client",[329,1222,1223,1224,1227,1228,127],{},"Every method takes an ",[90,1225,1226],{},"AbortSignal",". The helpers also take a ",[90,1229,1230],{},"Client",[83,1232,1234],{"className":85,"code":1233,"language":87,"meta":88,"style":88},"import { Client, fetchPackageFromPURL } from \"@agntn\u002Fregistries\";\n\nconst client = new Client({ maxRetries: 2, timeout: 10_000, userAgent: \"my-tool\u002F1.0\" });\nconst controller = new AbortController();\n\nconst pkg = await fetchPackageFromPURL(\"pkg:npm\u002Flodash\", controller.signal, client);\n",[90,1235,1236,1262,1266,1318,1334,1338],{"__ignoreMap":88},[93,1237,1238,1240,1242,1245,1248,1250,1252,1254,1256,1258,1260],{"class":95,"line":96},[93,1239,893],{"class":99},[93,1241,896],{"class":111},[93,1243,1244],{"class":899}," Client",[93,1246,1247],{"class":111},",",[93,1249,376],{"class":899},[93,1251,903],{"class":111},[93,1253,907],{"class":906},[93,1255,910],{"class":381},[93,1257,913],{"class":385},[93,1259,382],{"class":381},[93,1261,134],{"class":111},[93,1263,1264],{"class":95,"line":115},[93,1265,397],{"emptyLinePlaceholder":396},[93,1267,1268,1270,1273,1275,1278,1280,1283,1286,1288,1291,1293,1296,1298,1301,1303,1306,1308,1310,1313,1315],{"class":95,"line":137},[93,1269,361],{"class":103},[93,1271,1272],{"class":364}," client",[93,1274,368],{"class":103},[93,1276,1277],{"class":99}," new",[93,1279,1244],{"class":375},[93,1281,1282],{"class":111},"({",[93,1284,1285],{"class":899}," maxRetries",[93,1287,127],{"class":111},[93,1289,1290],{"class":537}," 2",[93,1292,1247],{"class":111},[93,1294,1295],{"class":899}," timeout",[93,1297,127],{"class":111},[93,1299,1300],{"class":537}," 10_000",[93,1302,1247],{"class":111},[93,1304,1305],{"class":899}," userAgent",[93,1307,127],{"class":111},[93,1309,910],{"class":381},[93,1311,1312],{"class":385},"my-tool\u002F1.0",[93,1314,382],{"class":381},[93,1316,1317],{"class":111}," });\n",[93,1319,1320,1322,1325,1327,1329,1332],{"class":95,"line":186},[93,1321,361],{"class":103},[93,1323,1324],{"class":364}," controller",[93,1326,368],{"class":103},[93,1328,1277],{"class":99},[93,1330,1331],{"class":375}," AbortController",[93,1333,1090],{"class":111},[93,1335,1336],{"class":95,"line":224},[93,1337,397],{"emptyLinePlaceholder":396},[93,1339,1340,1342,1344,1346,1348,1350,1352,1354,1356,1358,1360,1363,1365,1367,1369,1372],{"class":95,"line":270},[93,1341,361],{"class":103},[93,1343,365],{"class":364},[93,1345,368],{"class":103},[93,1347,372],{"class":371},[93,1349,376],{"class":375},[93,1351,145],{"class":111},[93,1353,382],{"class":381},[93,1355,853],{"class":385},[93,1357,382],{"class":381},[93,1359,156],{"class":111},[93,1361,1362],{"class":402},"controller",[93,1364,406],{"class":111},[93,1366,159],{"class":402},[93,1368,156],{"class":111},[93,1370,1371],{"class":402},"client",[93,1373,391],{"class":111},[329,1375,1376,1378,1379,1382,1383,1386,1387,1390,1391,1394,1395,1398],{},[90,1377,1230],{}," is the only place the library talks HTTP. It retries on network errors, 429 and 5xx with exponential backoff and jitter, honours ",[90,1380,1381],{},"Retry-After",", throws ",[90,1384,1385],{},"RateLimitError"," when the registry asks for a wait it cannot schedule, and ",[90,1388,1389],{},"HTTPError"," for anything else, with the status, URL and body attached. A ",[90,1392,1393],{},"rateLimiter"," with a ",[90,1396,1397],{},"wait(signal)"," method is awaited before each request, so a token bucket of your own fits in.",[1400,1401,1402],"style",{},"html pre.shiki code .sP0CR, html code.shiki .sP0CR{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#5DE4C7}html pre.shiki code .s1TYA, html code.shiki .s1TYA{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#91B4D5}html pre.shiki code .scZRh, html code.shiki .scZRh{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#ADD7FF}html pre.shiki code .sKlNE, html code.shiki .sKlNE{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#A6ACCD}html pre.shiki code .s8yaW, html code.shiki .s8yaW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#A6ACCDC0}html pre.shiki code .s1jWp, html code.shiki .s1jWp{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#E4F0FB}html pre.shiki code .sCrqT, html code.shiki .sCrqT{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#A6ACCDC0}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .saoiD, html code.shiki .saoiD{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#E4F0FB}html pre.shiki code .sZW6a, html code.shiki .sZW6a{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#5DE4C7C0}html pre.shiki code .sULi6, html code.shiki .sULi6{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#E4F0FBD0}html pre.shiki code .scVjq, html code.shiki .scVjq{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#A6ACCD}html pre.shiki code .sQ7BG, html code.shiki .sQ7BG{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#5DE4C7}html pre.shiki code .spVlQ, html code.shiki .spVlQ{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E4F0FB}html pre.shiki code .sjhu3, html code.shiki .sjhu3{--shiki-light:#6A737D;--shiki-light-font-style:inherit;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#767C9DB0;--shiki-dark-font-style:italic}html pre.shiki code .siHFe, html code.shiki .siHFe{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#5DE4C7}html pre.shiki code .snHMy, html code.shiki .snHMy{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#ADD7FF}html pre.shiki code .stCPd, html code.shiki .stCPd{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#A6ACCD}",{"title":88,"searchDepth":115,"depth":115,"links":1404},[1405,1406,1407,1408,1409,1410,1411,1412],{"id":80,"depth":115,"text":81},{"id":351,"depth":115,"text":180},{"id":492,"depth":115,"text":493},{"id":687,"depth":115,"text":688},{"id":826,"depth":115,"text":827},{"id":882,"depth":115,"text":883},{"id":1033,"depth":115,"text":1034},{"id":1219,"depth":115,"text":1220},"Package, versions, dependencies and maintainers, what each returns, and what changes between registries.","md",null,{"icon":1417},"i-lucide-package-search",{"title":16,"description":1413},"m005A-TIzH0O-UQXCFHqVCtU8qWHbj8OWOq6r-g67R0",[1421,1423],{"title":12,"path":13,"stem":14,"description":1422,"children":-1},"The package URL is the only address the library takes. Parse it, build it, and know what each ecosystem does with the namespace.",{"title":20,"path":21,"stem":22,"description":1424,"children":-1},"The optional cache decorator, its lockfile, the TTL per data type, and how to put it on any unstorage driver.",1788462724332]