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

@stefanaki/wfs-ts

v0.1.2

Published

High-level TypeScript SDK for OGC WFS 2.0/1.1 services

Readme

wfs-ts

High-level TypeScript SDK for OGC WFS services (WFS 2.0.x and 1.1.0) with a GeoJSON-first API.

Features

  • Class-based API: WfsClient
  • WFS operations:
    • getCapabilities
    • describeFeatureType
    • getFeature
    • getFeatureWithLock
    • getPropertyValue
    • transaction
    • lockFeature
    • listStoredQueries
    • describeStoredQueries
    • createStoredQuery
    • dropStoredQuery
  • GET query params and POST XML bindings
  • GeoJSON-first responses with XML/GML fallback parser
  • Typed OWS exceptions (OwsExceptionError)
  • GeoServer vendor support (cql_filter, viewParams, format_options) + XML hints
  • Filter AST + compiler for FES 2.0 and OGC Filter 1.1

Install

axios is a peer dependency.

pnpm add @stefanaki/wfs-ts axios

Quick Start

import { WfsClient } from "@stefanaki/wfs-ts";

const client = new WfsClient({
  baseUrl: "https://example.com/geoserver/wfs",
  versionStrategy: "auto",
  geoserver: { enabled: true }
});

const roads = await client.getFeature({
  typeNames: ["topp:roads"],
  count: 100,
  geoserver: {
    cqlFilter: "POPULATION > 1000"
  }
});

Typed Feature Generics

import type { Point, GeoJsonProperties } from "geojson";

type CityProps = GeoJsonProperties & {
  name: string;
  population: number;
};

const cities = await client.getFeature<Point, CityProps>({
  typeNames: ["topp:cities"]
});

Scripts

pnpm build
pnpm test
pnpm schemas:sync
pnpm schemas:validate
pnpm types:validate

Release

Publishing is automated by GitHub Actions when a version tag is pushed.

Schema Assets

  • Seed schema files live in namespaces/.
  • Downloaded complete dependency trees are stored under:
    • namespaces/wfs20/
    • namespaces/wfs11/

Sync and validation scripts are in scripts/.

Integration Testing (GeoServer)

The integration stack starts:

  • PostGIS seeded with real vector data in integration.world_cities
  • GeoServer
  • A one-shot setup container that configures workspace/datastore/layer publishing
  1. Start integration services:
docker compose -f test/integration/docker-compose.yml up -d
  1. Run integration tests:
RUN_GEOSERVER_TESTS=1 \
GEOSERVER_WFS_URL=http://localhost:8080/geoserver/wfs \
GEOSERVER_ADMIN_USER=admin \
GEOSERVER_ADMIN_PASSWORD=geoserver \
GEOSERVER_TYPENAME=integration:world_cities \
pnpm test:integration

Environment variables:

  • RUN_GEOSERVER_TESTS=1 enables integration tests
  • GEOSERVER_WFS_URL defaults to http://localhost:8080/geoserver/wfs
  • GEOSERVER_ADMIN_USER defaults to admin
  • GEOSERVER_ADMIN_PASSWORD defaults to geoserver
  • GEOSERVER_TYPENAME defaults to integration:world_cities

Notes:

  • The WFS 2.0.2 client path is tested against GeoServer, but GeoServer capabilities may report 2.0.0; tests should not assert an exact capabilities version string.
  • WFS 1.1.0 intentionally tests stored-query methods (listStoredQueries, describeStoredQueries, createStoredQuery, dropStoredQuery) as expected OperationNotSupported errors, since these are not part of WFS 1.1.0.