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

@unieojs/unio-evjs-adapter

v0.2.0

Published

EVJS adapter that emits Unio Build Output API manifests.

Readme

@unieojs/unio-evjs-adapter

EVJS adapter for emitting Unio Build Output API (uboa) manifests.

Usage

Preferred integration is the EVJS plugin hook:

import { defineConfig } from "@evjs/ev";
import { unio } from "@unieojs/unio-evjs-adapter";

export default defineConfig({
  plugins: [unio()],
});

After a production ev build, the plugin writes .unio/output with unio.json, routes.json, middleware.json, artifacts.json, static assets, and an evjs serverFunction when the EVJS buildEnd server manifest has an entry.

build() and emitUboa() are lower-level APIs used by the plugin and expect manifest objects supplied by @evjs/ev build hooks. They do not invoke ev build, modify user config, or parse EVJS manifest files from dist.

Extension Hooks

The emitter stays platform-neutral. Deployment integrations that need platform-specific metadata or sidecar files can extend the generic uboa output through unio() or emitUboa() options instead of forking the EVJS adapter.

The available hooks are:

  • extendServerFunctionDescriptor: called when a server function is emitted. It receives the generated serverFunction.json descriptor and must return an object. Use this to add generic deployment metadata, x-* extension records, environment variables, or runtime bindings.
  • extendArtifacts: called after built-in artifacts are collected and before artifacts.json is written. It receives the current artifact list and must return the final artifact list. Use this to register sidecars such as apiSchema artifacts.
  • afterEmit: called after the adapter writes the uboa manifests. Use this to write files referenced by extra artifacts or descriptor metadata.

Example:

import fs from "node:fs/promises";
import path from "node:path";
import { defineConfig } from "@evjs/ev";
import { unio } from "@unieojs/unio-evjs-adapter";

export default defineConfig({
  plugins: [
    unio({
      extendServerFunctionDescriptor({ descriptor, serverFunctionName }) {
        return {
          ...descriptor,
          deployment: { mode: "dedicated" },
          "x-example-platform": {
            resourceName: serverFunctionName,
            manifest: `api-schemas/${serverFunctionName}/metadata.json`,
          },
        };
      },
      extendArtifacts({ artifacts, serverFunctionName }) {
        return [
          ...artifacts,
          {
            id: `${serverFunctionName}-api-schema`,
            resourceKind: "apiSchema",
            schemaFormat: "oneapi",
            path: `api-schemas/${serverFunctionName}/metadata.json`,
            describes: {
              resourceKind: "serverFunction",
              id: serverFunctionName,
            },
          },
        ];
      },
      async afterEmit({ outputDir, serverFunctionName }) {
        await fs.mkdir(
          path.join(outputDir, "api-schemas", serverFunctionName),
          { recursive: true },
        );
        await fs.writeFile(
          path.join(outputDir, "api-schemas", serverFunctionName, "metadata.json"),
          `${JSON.stringify({ oneapi: "1.0.0" }, null, 2)}\n`,
          "utf8",
        );
      },
    }),
  ],
});

Hooks should keep platform-specific fields namespaced, for example under an x-* key, so the base adapter contract remains framework-neutral.

The generated output is:

.unio/output/
  unio.json
  routes.json
  middleware.json
  artifacts.json
  features.json
  observability.json
  static/
    index.html
    assets/
      app.js
      app.css
  server-functions/
    evjs/
      serverFunction.json
      main.js
      chunks/
        dep.js
  api-schemas/
    evjs/
      metadata.json

apiSchema entries in artifacts.json describe schema sidecars:

{
  "id": "evjs-api-schema",
  "resourceKind": "apiSchema",
  "schemaFormat": "oneapi",
  "path": "api-schemas/evjs/metadata.json",
  "describes": {
    "resourceKind": "serverFunction",
    "id": "evjs"
  }
}

describes is optional. When present, validation checks that the referenced artifact exists in the same artifacts.json.

P0 Behavior

  • CSR-only EVJS builds emit static-only uboa output.
  • Fullstack EVJS builds map the whole server bundle to one Fetch-style serverFunction named evjs.
  • POST /api/fn is the default EVJS server function route.
  • REST route handlers are bound through /api/:path* and marked degraded until EVJS exposes stable server route metadata.