npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dofek/climbing-catalogue

v0.1.5

Published

Cross-provider climbing route search and conservative identity matching with attributed evidence

Readme

@dofek/climbing-catalogue

Cross-provider climbing route search and conservative identity matching, with source attribution and human-readable evidence. Independent of Dofek application packages, databases, queues, caches, and UI frameworks.

npm install @dofek/climbing-catalogue

Requires Node.js 22.14 or newer. Ships ESM JavaScript and TypeScript declarations.

Search

import { ClimbingCatalogueSearch } from "@dofek/climbing-catalogue";
import { MountainProjectCatalogueAdapter } from "@dofek/climbing-catalogue/mountain-project";
import { OpenBetaCatalogueAdapter } from "@dofek/climbing-catalogue/openbeta";

const search = new ClimbingCatalogueSearch([
  new MountainProjectCatalogueAdapter(fetch),
  new OpenBetaCatalogueAdapter(fetch),
]);

const sources = await search.search({
  providerId: "mountain-project",
  externalId: "105736399",
  sourceUrl: "https://www.mountainproject.com/route/105736399/cheddar-corner",
  name: "Cheddar Corner",
  kind: "route",
  setting: "outdoor",
  locations: [],
});

for (const source of sources) {
  console.log(source.providerId, source.searchComplete);
  for (const match of source.matches) {
    console.log(match.confidence, match.candidate.url, match.evidence);
  }
}

The native provider is queried first when the seed has an external ID. Its current name, aliases, references, and locations inform subsequent discovery; the original seed is unchanged. Provider results validate before matching. An unsuccessful provider request rejects with CatalogueSearchError, an AggregateError whose errors retains the original failures, whose sources retains successful source results, and whose message has one display line per failed provider. A failed native lookup leaves other discovery on the original seed; it is not requested twice. Callers own error reporting, user messages, caching, scheduling, and retry policy; see the search implementation.

All seed fields shown above are required; externalId, sourceUrl, name, kind, and setting may be null. Optional aliases and references carry source-declared identity evidence. No user ID or log-entry ID is needed. Location ancestry is ordered root to leaf. Each location has nullable externalId and name, scope: "area" | "climb", and nullable coordinates: { latitude, longitude }. Area coordinates and route coordinates remain distinct observations.

Source area context

Area locations may include optional context with a source URL, nullable literal area type, plain-text sections, attributed tags with nullable source counts, and source statistics. Sections and tags retain inherited-area labels when supplied. These remain area observations: descriptions, counts and categorical steepness do not become route measurements. Climb-scoped locations cannot carry this context; see the schemas and plain-text projection.

| Source | Area fields and hydration boundary | | --- | --- | | KAYA | Inline public and authenticated native destination/area/subarea fields supply descriptions, access text, type and access flags. Gym profiles retain address and website context. The separately verified native selection excludes unsupported public-only short descriptions. Parent references retain native IDs; no recursive location query is added. See the reader and native location client. | | Mountain Project | A native route's local area and its immediate parent supply source sections, access notes and route-type counts. Name-discovery hits lack a proven parent ID, so their area context remains unavailable rather than guessed. See the reader. | | OpenBeta | The local area and immediate parent supply description/location text and source grade/discipline totals. Area reads are shared within a search and validate native UUIDs. See the reader and upstream Area schema. | | 8a.nu / Vertical-Life | Verified crag and broader area records supply descriptions/access, crag flags with literal counts, and source statistics. Native crag/area identities are checked before attaching context. See the reader. |

Absent fields stay absent or nullable; each reader retains its observed source contract rather than synthesizing tags from prose. Hydration requests are shared within a search; callers own longer-lived caching, as defined by the adapter interface and readers above.

Match decisions

| Confidence | Meaning | | --- | --- | | source | The recorded provider and external ID match; contradictions remain in the evidence. | | reference | An explicit provider reference links the climbs without conflicting evidence. | | corroborated | Exact/alias name, known kind, outdoor setting, compatible nearby local areas, complete discovery, and one plausible candidate support identity. | | possible | A discovery suggestion requiring review; fuzzy names never establish identity. |

These are evidence-based suggestions, not instructions to merge records. A complete search is scoped to its returned searchArea when supplied; an empty incomplete result does not establish absence. Grades and tags stay attributed to each provider. The library writes nothing and selects no stored winner. See the matching implementation and its regressions.

Provider adapters and transport

Each adapter implements ClimbingCatalogueAdapter: a providerId and search(seed): Promise<CatalogueSearchResult>. Use a subset of providers or supply your own adapter for one of the supported provider namespaces.

| Subpath | Export | Constructor | | --- | --- | --- | | kaya | KayaCatalogueAdapter | (fetchFn, getAccessToken) | | mountain-project | MountainProjectCatalogueAdapter | (fetchFn = fetch) | | openbeta | OpenBetaCatalogueAdapter | (fetchFn) | | vertical-life | VerticalLifeCatalogueAdapter | (fetchFn) |

Kaya's token resolver returns Promise<string | null>; return null for public metadata or resolve the current user's access token for authenticated details. Supply your own rate-limited fetch, request deadlines, or specialized transport. The library does not load credentials or set up sessions.

Vertical-Life uses the eight-a provider namespace and public outdoor route search. Native detail lookup uses an 8a.nu route URL and validates its unified ID against the recorded ID. Discovery shares a three-page budget across names; incomplete results remain suggestions. Coordinates, wall angles and tags are left unknown when absent from the response. The transport reads the collection search and outdoor detail contracts used by the deployed web client. The search record's zlaggableId matches the detail record's unifiedId; the detail record's separate zlaggableId is not the catalogue identity (example search, example detail).

The adapters read observed application endpoints and may need updates when providers change them. They are unofficial and unaffiliated with the providers. Source references: Kaya web application, Mountain Project route JSON, OpenBeta GraphQL schema. Use only data you are authorized to access and follow each provider's terms.

TheCrag public-page catalogue enrichment is not included. Its site policy prohibits screen scraping for programmatic access, and its general integration guide says API access requires a legal agreement. The personal Logbook Read API remains a separate, account-scoped source for an owner's ascents. See the usage policy, API integration guide, and personal logbook API.

Pure matching and schemas

import { matchCatalogueCandidates } from "@dofek/climbing-catalogue/matching";
import { catalogueSeedSchema } from "@dofek/climbing-catalogue/contracts";

const seed = catalogueSeedSchema.parse(input);
const matches = matchCatalogueCandidates(seed, providerResult, seed.locations);

matching exports name normalization, query-name preparation, name comparison, local-area selection, the 100-metre proximity policy, and candidate matching. contracts exports Zod schemas for seeds, locations, tags, candidates, search results, and attributed source results, with named inferred types for each except tags. Use CatalogueCandidate["tags"][number] for a candidate tag. geometry exports coordinate and numeric wall-angle schemas. kaya-tags exposes literal Kaya tag decoding independently of the search adapter. Import subpaths when only one provider or pure contract is needed.

Development

pnpm --dir packages/climbing-catalogue test
pnpm --dir packages/climbing-catalogue build
pnpm --dir packages/climbing-catalogue typecheck

Tests run without databases, credentials, or live provider requests. Packaging uses pnpm's publish configuration overrides to expose compiled files while workspace consumers use TypeScript sources.