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

@undeadsheep/dsh-file-preview

v0.1.2

Published

Workspace file tree listing and text preview/editing backed by a Host Remote for the DeepSeek Harness (distributable bundle: host service + client UI)

Readme

@undeadsheep/dsh-file-preview

Workspace file-preview host half: a Typert Remote (filePreview) that lists the workspace tree, reads/writes text files, and resolves the preview theme and config for the browser half.

The browser UI lives in a separate package: @undeadsheep/dsh-client-ui-file-preview.

Remote surface

| Method | Request | Result | |--------|---------|--------| | listDir | { sessionId, path } | Ok<FileTreeNode[]> \| Rejected | | readFile | { sessionId, path } | Ok<{ path, content }> \| Rejected | | readImage | { sessionId, path } | Ok<{ path, mimeType, data }> \| Rejected | | writeFile | { sessionId, path, content } | Ok<{ path }> \| Rejected | | readTheme | { sessionId } | Ok<{ colors, bg, fg }> | | readConfig | { sessionId } | Ok<{ indentSize, useTabs, pollInterval, fontSize }> |

Business results use the repo's { ok: true, value } | { ok: false, error: { code, ... } } convention; the generated ./remote face wraps them in the RemoteResult carrier. Wire codecs are generated from the @Remote method types by typert codegen — there is no hand-written schema file.

listDir lists a single directory (path = '' for the workspace root) and skips heavy/noise directories (node_modules, .git, .next, .ssh, …) plus sensitive filenames (.env*, id_rsa*, *.pem, *.key, …). A single listing is capped at 1000 children. Dir nodes carry empty children, which the browser half fills lazily by calling listDir again when a directory is expanded. readFile / readImage / writeFile also refuse those sensitive paths, so typing them in Quick Open does not bypass the tree filter.

Config

| Key | Default | Meaning | |-----|---------|---------| | maxFileBytes | 2097152 | Maximum UTF-8 byte length the preview will read or write | | maxImageBytes | 5242880 | Maximum byte length of an inline image the preview will read |

Workspace config files (read per Session, optional)

  • preview.config.jsonindentSize, useTabs, pollInterval, fontSize (with .prettierrc / package.json#prettier fallback for indent knobs)
  • preview-theme.jsonkeyword, string, number, comment, tag, function, type, variable, background, foreground
  • .vscode/settings.jsoneditor.tokenColorCustomizations and workbench.colorCustomizations are read as a fallback theme

Known limitations

  • Preview is text-only (plus raster png/jpeg/gif/webp); binary, SVG-as-image, or oversized files return not-text / too-large. A stat with no size is refused rather than reading the whole file into memory. Writes use the same byte cap as text reads.
  • listDir returns at most 1000 children per directory.
  • Symlink following after resolve is the host ctx.fs implementation's responsibility; this plugin re-resolves search children against workspaceRoot but cannot realpath on its own.
  • Syntax highlighting is a lightweight hand-written tokenizer (not highlight.js / TextMate), and a prettier engine cannot be embedded.
  • Auto-refresh is polling (pollInterval, clamped 500–60000 ms), not a real file watcher.