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

@hia-doc/dotnet-source-extractor

v0.1.9

Published

Parse C# source files into DotNetDoc extraction artifacts through a Roslyn helper.

Readme

@hia-doc/dotnet-source-extractor

C# source, ASP.NET endpoint surface and ASP.NET/Razor markup comment extractor for DotNetDoc.

DotNetDoc 源码抽取器,覆盖 C# 源码、ASP.NET endpoint surface,以及 ASP.NET/Razor 标记层非 XML 注释。

import {
  extractAspNetEndpoints,
  extractDotnetMarkupComments,
  extractDotnetProjectDiscovery,
  extractDotnetSourceFiles
} from "@hia-doc/dotnet-source-extractor";

const artifact = await extractDotnetSourceFiles({
  workspaceRoot: process.cwd(),
  paths: ["src/Example.cs"]
});

const projectSource = await extractDotnetSourceFiles({
  workspaceRoot: process.cwd(),
  projectPath: "src/Example/Example.csproj"
});

const endpoints = await extractAspNetEndpoints({
  workspaceRoot: process.cwd(),
  applicationRoot: "src/Web",
  paths: ["src/Web/Default.aspx", "src/Web/Controllers/BooksController.cs"]
});

const markupComments = await extractDotnetMarkupComments({
  workspaceRoot: process.cwd(),
  paths: ["src/Web/Default.aspx", "src/Web/Views/Home/Index.cshtml"]
});

const projects = await extractDotnetProjectDiscovery({
  workspaceRoot: process.cwd(),
  path: "Example.sln"
});

The C# source slice builds a lightweight Roslyn compilation for explicit .cs files or for source files resolved from a .csproj projectPath. It extracts documented/public declarations, XML documentation trivia, source ranges and semantic documentation comment ids without loading an MSBuild workspace. It does not yet perform inherited docs, package restore or full project-load semantic analysis.

C# 源码抽取既支持显式 .cs 文件,也支持通过 .csproj projectPath 解析项目源码集合。当前实现不会加载完整 MSBuild workspace,也不会执行 package restore;它适合作为目标项目文档化的轻量 source probe,后续再扩展完整项目语义。

XML documentation <lang> / <l> markers and legacy div h_type="doc" > para[lang] blocks are normalized into each member's HIA field-level i18n model. The temporary raw XML trivia used for this normalization is not retained in the returned artifact.

The project discovery slice reads .sln and .csproj files without compiling. It records solution/project structure, target frameworks, package references, project references and explicit compile items as a dotnetdoc-project-discovery artifact.

项目发现产物使用 project-relative-owner-resolved identity policy。每个 project 都包含由安全的工作区相对 .csproj path 生成的稳定 identity,并独立记录 resolution、confidence 与 provenance;产物不会保留 workspace absolute path 或 source body,sourcesContentPolicy 固定为 none

The ASP.NET endpoint slice is source-scan based. It recognizes Web Forms Page/Control directives, controller attribute routing such as Route and HttpGet, and Minimal API MapGet/MapPost calls. It records route metadata, endpoint names, tags, source-scan authorization hints, response hints and source ranges without embedding source text.

The markup comment slice recognizes Web Forms <%-- --%>, Razor @* *@ and HTML <!-- --> comments in .aspx, .ascx, .cshtml and .razor files. It records source ranges, syntax kind, server/client visibility and <lang> / <l> locale markers without embedding complete source files.

标记层注释抽取识别 .aspx.ascx.cshtml.razor 中的 Web Forms <%-- --%>、Razor @* *@ 与 HTML <!-- --> 注释,记录位置、语法类型与 服务端/客户端可见性,并解析 <lang> / <l> 语言标记,不嵌入完整源码。