# @universal-deploy/store

> This package provides a global `addEntry` helper for registering server entries. ```js import { addEntry, getAllEntries } from "@universal-deploy/store";

Latest version **0.2.2** (published 2026-08-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @universal-deploy/store
pnpm add @universal-deploy/store
yarn add @universal-deploy/store
bun add @universal-deploy/store
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2026-08-05 |
| First published | 2025-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Maintainers | brillout, magne4000 |

## Links

- npm: https://www.npmjs.com/package/@universal-deploy/store
- Repository: https://github.com/photon-js/universal-deploy
- Homepage: https://github.com/photon-js/universal-deploy#readme
- Issues: https://github.com/photon-js/universal-deploy/issues
- npm.io page: https://npm.io/package/@universal-deploy/store

## Dependencies (2)

- [rou3](https://npm.io/package/rou3.md) ^0.8.1
- [srvx](https://npm.io/package/srvx.md) *

## Recent versions

- 0.2.2 (latest) — 2026-08-05
- 0.0.8-beta.1 (beta) — 2026-02-11
- 0.2.1 — 2026-04-01
- 0.2.0 — 2026-03-11
- 0.1.4 — 2026-03-09
- 0.1.3 — 2026-03-04
- 0.1.2 — 2026-03-04
- 0.1.1 — 2026-03-04
- 0.1.0 — 2026-02-17
- 0.0.8-beta.0 — 2026-02-11
- 0.0.7 — 2026-02-03
- 0.0.6 — 2026-01-30
- 0.0.5 — 2026-01-21
- 0.0.4 — 2026-01-21
- 0.0.3 — 2026-01-21
- … 2 more at https://npm.io/package/@universal-deploy/store/versions

## README

## @universal-deploy/store

This package provides a global `addEntry` helper for registering server entries.
```js
import { addEntry, getAllEntries } from "@universal-deploy/store";

// Registering — add entries to the store
addEntry(
  {
    id: "./src/server/api.ts",  
    route: "/api",
  },
);

// Retrieving
const entries = getAllEntries();
```

### Entry Configuration

Each entry accepts the following options:
```ts
export interface EntryMeta {
  /**
   * Module identifier for this entry. This can be a filesystem path or a virtual module.
   */
  id: string;
  /**
   * HTTP method(s) to match. When omitted, matches all HTTP methods.
   */
  method?: HttpMethod | HttpMethod[];
  /**
   * Route pattern(s) for this entry.
   *
   * Should be a valid {@link https://github.com/h3js/rou3 | rou3} pattern.
   */
  route: string | string[];
  /**
   * The Vite environment for this entry.
   *
   * @default ssr
   */
  environment?: string;
}
```

### Vite Plugins

#### `catchAll`

Creates a `virtual:ud:catch-all` entry that aggregates all store entries and handles routing between them.

#### `devServer`

Adds development middleware that invokes the catch-all entry and returns the response to the client.

#### `compat`

Provides compatibility for resolving SSR Rollup entries and automatically registers them in the global store.

#### `hmr`

Define route boundaries on server entries.

#### `resolver`

Keeps a mapping between unresolved and resolved module ids. Provides `isServerEntry` helper to query this mapping.

---
_Source: https://npm.io/package/@universal-deploy/store · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
