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

@dasl/tile-server

v2.1.0

Published

Minimal Express server that isolates DASL tiles in their own origin for browser loading

Readme

@dasl/tile-server

The minimal server that makes browser tile loading safe.

Isolating untrusted DASL tiles in the browser needs two things a normal static host doesn't give you: a fresh origin per tile, and a service worker allowed to control that origin. This package is a tiny Express router (and a CLI) that does exactly that — it serves the loader runtime (the shuttle and worker from @dasl/tile-loader) under a hardened set of headers, and redirects each load onto its own random subdomain.

It never sees or stores tile content; it only serves the fixed runtime assets.

Install

npm install @dasl/tile-server

As a library

createTileLoadingRouter(baseHost) returns an Express router. Give it your base host; it listens on load.<baseHost> and redirects each request to a random <subdomain>.<baseHost>:

import express from 'express';
import { createTileLoadingRouter } from '@dasl/tile-server';

const app = express();
app.set('trust proxy', 'loopback'); // needed so req.hostname is right behind a proxy
app.use(createTileLoadingRouter('example.site'));
app.listen(1503);

You are responsible for pointing load.example.site and *.example.site at this app (wildcard DNS + TLS), and for setting loadDomain: 'load.example.site' on the mothership.

As a CLI

# installed globally, or via npx
tiles-loading-server example.site 8080

Starts an Express app on the given port (default 1503) serving the router for the given base host.

What it enforces

  • Per-tile origin isolation — a request to load.<host> gets a 303 redirect to a fresh 20-character random subdomain, so every tile loads on its own origin, cross-origin from your site and from every other tile.
  • A strict Content-Security-Policy on the runtime assets. Notably default-src is limited to 'self' blob: data: with no connect-src, so a tile's fetch/XHR/WebSocket can't reach arbitrary origins (no data exfiltration); sandbox grants scripts/forms/popups but not top-navigation or other host-hijacking capabilities; object-src, base-uri, and script-src-attr are 'none'.
  • Cross-origin isolation & hardening headersCross-Origin-Opener-Policy: same-origin, Cross-Origin-Resource-Policy: cross-origin, Origin-Agent-Cluster: ?1, X-Content-Type-Options: nosniff, Referrer-Policy: no-referrer, interest-cohort/browsing-topics disabled, and Service-Worker-Allowed: / so the loader's worker can control the origin.

Everything is served under /.well-known/web-tiles/.

Part of DASL tiles

License

Apache-2.0