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

@abeyjs/openapi

v0.1.2

Published

Browser-oriented **glue** between an **OpenAPI document** (`Record<string, unknown>` — typically parsed JSON) and **`OmegaRuntime`**: discovers collection paths that look like REST lists (**GET + POST**), builds **`ListViewDef` / `FormViewDef`** + a **Zod

Readme

@abeyjs/openapi

Browser-oriented glue between an OpenAPI document (Record<string, unknown> — typically parsed JSON) and OmegaRuntime: discovers collection paths that look like REST lists (GET + POST), builds ListViewDef / FormViewDef + a Zod row schema, registers a DynamicCrudAgent with CRUD intents, and optionally mountOpenApiCrudView renders list + form + trace panel.

Heavy lifting for workflow + codegen lives in @abeyjs/cli (abeyjs connect, abeyjs generate views, …). This package is what running apps import at runtime.


Typical stack

OpenAPI JSON  →  discoverFirstCrud / discoverAllCrud  →  DiscoveredCrud
                     ↓
        registerOpenApiCrud(runtime, spec, http?)   →  DynamicCrudAgent + intents …/List, …/Create, …
                     ↓
        mountOpenApiCrudView({ root, agent, discovered, intents… })   →  DOM

OmegaHttp from @abeyjs/http is optional; omit it only when you rely on useMemoryOnApiFailure or purely local mocks.


Public API (see src/index.ts)

| Export | Role | |--------|------| | discoverFirstCrud, discoverAllCrud | Parse spec → DiscoveredCrud (path, entity name, list/form defs, Zod, row key, optional item/update/delete metadata, pagination hints). | | registerOpenApiCrud, registerWithDiscovered, registerOpenApiAllCrud | Register DynamicCrudAgent + Entity/List, Entity/Create, optional Update / Delete intents. | | DynamicCrudAgent, DynamicCrudViewState, OpenApiRow | Stateful agent: loads list (server paging when configured), applies create/update/delete intents, drives form validation from Zod. | | mountOpenApiCrudView | Mounts list + form + optional HTTP trace strip to a root HTMLElement. | | **jsonObjectSchemaToZod**, **guessRowKeyFromSchema** | Low-level JSON Schema → Zod for CRUD item rows (flat scalars + enums). | | **OpenApiCrudListBehaviorOverrides** | Type for advanced list behaviour hints (from **crud-view-config-types.ts`). |


Discovery heuristics (discover-crud.ts)

  • Looks for collection paths where GET returns an array (or data / items / results / value wrapping an array) and POST accepts a JSON body.
  • $ref / components.schemas resolved via derefNode (refs.ts).
  • Sibling {id}-style item routes unlock update (PUT/PATCH) and delete when present in the spec.
  • Entity PascalCase name is derived from path segments (see pathToEntityPascal).

When the spec does not match these patterns, discovery returns an error string or an empty array (discoverAllCrud).


Intents & agent

For entity Product (example):

| Intent | When registered | |--------|-----------------| | Product/List | agent.loadList() | | Product/Create | applyCreateIntent(row) | | Product/Update | If update path exists | | Product/Delete | If delete operation exists |

registerWithDiscovered throws if registerAgent receives a channel different from runtime.channel (guards mis-wired runtimes).


mountOpenApiCrudView

Expects an already registered agent and the DiscoveredCrud + intent name strings returned from registration. Options include showToolbar, showTrace, showFlowMessage (defaults lean toward on except where noted in source).

UI labels in the default mount are Spanish in the current implementation (toolbar / row actions); replace by forking the mount or generating views from the CLI for your locale.


CLI companion (@abeyjs/cli)

| Command | Relation to this package | |---------|--------------------------| | abeyjs add openapi | Adds @abeyjs/openapi, @abeyjs/http, Vite proxies, stubs; does not replace manual registerOpenApiCrud wiring unless the template already does so. | | abeyjs connect | Writes .abeyjs/connect.json (ConnectContract in cli/src/openapi-contract.ts) + abeyjs.connect.yml — input to abeyjs generate views, not consumed directly by @abeyjs/openapi at runtime unless you glue it yourself. | | abeyjs generate views | Emits OM/TS views from the contract; overlaps conceptually with mountOpenApiCrudView (different output path). | | abeyjs codegen | openapi-typescript types + stubs — orthogonal to DynamicCrudAgent. |


Dependencies

Pulls @abeyjs/agents, @abeyjs/core, @abeyjs/runtime, @abeyjs/state, @abeyjs/http, @abeyjs/view, @abeyjs/uikit, @abeyjs/validation, zod.


Build

npm run build -w @abeyjs/openapi