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

reqon-dsl

v0.3.0

Published

A DSL framework for fetch, map, validate pipelines - built on Vague

Readme

Reqon

A declarative DSL for fetch, map, validate pipelines - built on Vague.

What is Reqon?

Reqon lets you define data synchronization pipelines in a readable, declarative language. Think of it like Temporal.io, but with a focus on API data fetching and transformation.

Example

mission SyncXeroInvoices {
  source Xero {
    auth: oauth2,
    base: "https://api.xero.com/api.xro/2.0"
  }

  store invoices: memory("invoices")
  store normalized: memory("normalized")

  action FetchInvoices {
    get "/Invoices" {
      paginate: offset(page, 100),
      until: length(response.Invoices) == 0
    }

    store response.Invoices -> invoices {
      key: .InvoiceID,
      partial: true
    }
  }

  action NormalizeInvoices {
    for invoice in invoices {
      map invoice -> StandardInvoice {
        id: .InvoiceID,
        amount: .Total,
        status: match .Status {
          "PAID" => "paid",
          "AUTHORISED" => "approved",
          _ => "pending"
        }
      }

      validate response {
        assume .amount >= 0
      }

      store response -> normalized { key: .id }
    }
  }

  run FetchInvoices then NormalizeInvoices
}

Installation

npm install reqon

Usage

CLI

reqon sync-invoices.vague --verbose
reqon sync-invoices.vague --auth ./credentials.json
reqon sync-invoices.vague --dry-run

Programmatic

import { parse, execute } from 'reqon';

const program = parse(`
  mission Test {
    source API { auth: bearer, base: "https://api.example.com" }
    store items: memory("items")
    action Fetch {
      get "/items"
      store response -> items { key: .id }
    }
    run Fetch
  }
`);

const result = await execute(source, {
  auth: { API: { type: 'bearer', token: 'your-token' } }
});

console.log(result.stores.get('items').list());

DSL Reference

Sources

Sources can be defined with explicit base URLs or by referencing an OpenAPI spec:

// Traditional: explicit base URL
source Name {
  auth: oauth2 | bearer | basic | api_key,
  base: "https://api.example.com"
}

// OAS-based: load from OpenAPI spec (base URL derived from spec)
source Petstore from "./petstore-openapi.yaml" {
  auth: bearer,
  validateResponses: true  // Optional: validate responses against OAS schema
}

Stores

store name: memory("collection")
store name: sql("table_name")
store name: nosql("collection")

Actions

action Name {
  // Steps: get/post/put/patch/delete, call, for, map, validate, store
}

HTTP Requests

Two styles are supported:

// Traditional: explicit HTTP method and path
get "/path" {
  paginate: offset(page, 100),
  until: response.items.length == 0,
  retry: { maxAttempts: 3, backoff: exponential }
}

// OAS-based: reference by Source.operationId
call Petstore.listPets {
  paginate: cursor(cursor, 20, "nextCursor"),
  until: response.pets.length == 0
}

When using OAS-based call, the HTTP method and path are resolved from the OpenAPI spec automatically.

Iteration

for item in collection where .status == "pending" {
  // nested steps
}

Mapping

map source -> TargetSchema {
  field: .sourceField,
  computed: .price * .quantity,
  status: match .state {
    "A" => "active",
    _ => "unknown"
  }
}

Validation

validate target {
  assume .amount > 0,
  assume .date >= .createdAt
}

Pipeline

// Sequential execution
run Step1 then Step2 then Step3

// Parallel execution with brackets
run [Step1, Step2] then Step3  // Step1 and Step2 run in parallel, then Step3

Durability Features

mission DurablePipeline {
  // Checkpoint after each step for resume-on-failure
  checkpoint: afterStep  // or onFailure

  // Enable time-travel debugging
  trace: full  // or minimal

  action WaitForApproval {
    // Resource-free pause (days/weeks without holding resources)
    pause {
      duration: "7d",
      resumeOn: timeout | webhook "/approved"
    }
  }

  run WaitForApproval
}

OpenAPI Integration

Reqon can consume OpenAPI specs directly, eliminating the need for handwritten SDK code:

mission SyncPets {
  // Load API definition from OpenAPI spec
  source Petstore from "./petstore.yaml" {
    auth: bearer,
    validateResponses: true
  }

  store pets: memory("pets")

  action FetchPets {
    // Use operationId from spec - method and path are resolved automatically
    call Petstore.listPets

    store response.pets -> pets { key: .id }
  }

  run FetchPets
}

Benefits:

  • No SDK required - The OpenAPI spec is the SDK
  • Always up-to-date - Spec changes are picked up automatically
  • Response validation - Validate API responses against the spec's schemas
  • Auto-discovery - Base URLs, paths, and methods come from the spec

Development

npm run build      # Compile TypeScript
npm run test:run   # Run tests
npm run dev        # Watch mode

License

ISC