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

emdash-simple-history

v0.1.2

Published

Lightweight activity history for EmDash CMS content changes.

Downloads

364

Readme

emdash-simple-history

Simple History is a focused activity feed for EmDash CMS. It records content create, update, and delete events, then surfaces them in an admin history page and a dashboard widget so operators can quickly answer: what changed, and roughly when?

It is intentionally narrower than a compliance-grade audit product.

Features

  • Records content lifecycle events with timestamps, action, collection, and resource identity
  • Recent Activity dashboard widget for a quick operational pulse
  • Dedicated /history admin page with:
    • collection filtering
    • action filtering
    • rolling windows and custom date ranges
    • pagination
    • empty states
    • retention summary
  • Retention controls and tracked-collection controls stored in plugin KV
  • Standard-format plugin architecture for trusted or sandboxed EmDash installs
  • Private-only admin data routes backed by plugin storage

Installation

pnpm add emdash-simple-history

Register it in your EmDash config:

import { defineConfig } from "astro/config";
import { emdash } from "emdash/astro";
import { simpleHistoryPlugin } from "emdash-simple-history";

export default defineConfig({
	integrations: [
		emdash({
			plugins: [simpleHistoryPlugin()],
			// or sandboxed: [simpleHistoryPlugin()]
		}),
	],
});

What it captures

Each entry contains:

  • timestamp
  • action (create, update, delete)
  • collection
  • resourceId
  • resourceType
  • optional metadata (title, slug, status) when available

Admin UX

Dashboard widget

The widget highlights recent activity and short rolling-window counts.

History page

The plugin registers a /history admin page that combines:

  • summary stats
  • top active collections
  • filter controls
  • paginated activity table
  • settings for retention, tracked collections, widget visibility, and page size

Settings

Simple History currently stores settings in the history page itself instead of a separate generated settings screen.

Available settings:

  • retentionDays0 means keep entries forever
  • trackedCollections — comma-separated collection slugs; empty means capture all collections
  • showWidget — enables or disables the dashboard widget's content
  • maxPageSize — hard cap for route and page pagination

Private plugin routes

All routes are private and mounted under /_emdash/api/plugins/simple-history/.

history/list

POST /_emdash/api/plugins/simple-history/history/list

Request body:

{
	"filters": {
		"collection": "posts",
		"action": "update",
		"window": "7d"
	},
	"limit": 25,
	"cursor": "optional-cursor"
}

Response data includes paginated items, nextCursor, hasMore, the normalized filters, and retention metadata.

history/summary

POST /_emdash/api/plugins/simple-history/history/summary

Returns retained totals, rolling-window counts, known collections, and widget state.

EmDash wraps successful plugin route responses in the normal { data: ... } envelope.

Marketplace / bundling

This package is structured for EmDash's plugin bundling flow:

pnpm build
emdash plugin bundle
emdash plugin publish --tarball dist/simple-history-0.1.1.tar.gz

Development

pnpm install
pnpm typecheck
pnpm test
pnpm build

Limitations

  • This is activity history, not a forensic audit trail
  • Actor attribution is intentionally omitted in v1
  • Only content create/update/delete events are included in v1
  • Tracked collection changes affect future captures only; they do not backfill historical data
  • Standard plugins cannot dynamically unregister dashboard widgets at runtime, so a disabled widget renders a disabled state instead of disappearing entirely
  • Current standard Block Kit tables do not provide a direct per-row deep-link affordance here, so the plugin surfaces collection and resource identity for fast lookup via the admin command palette/search

License

MIT