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

tarojs-plugin-chucker

v1.1.0

Published

A Chucker-like debugger plugin for Taro JS miniapps to track api requests, responses and native plugin calls

Readme

tarojs-plugin-chucker

A Chucker-like debugger plugin for Taro JS miniapps. It intercepts, logs, and displays network requests and native plugin calls (wx.invokeNativePlugin) directly in your miniapp during Runtime.

It automatically injects a floating trigger button into every page at build-time, which opens a dedicated full-screen debugger console.


Features

  • 🛰️ API Request Interception: Automatically hooks into Taro.request, Taro.uploadFile, and Taro.downloadFile.
  • 🔌 WeChat Native Plugins Tracker: Intercepts wx.invokeNativePlugin parameters, callbacks, and Promise resolutions.
  • 🛠️ Build-time Injection: Automatically injects the WXML floating debugger button and layout styling onto every compiled page, and registers /pages/chucker/index in-memory.
  • 📋 Copy to cURL: Formats network calls into standard shell cURL commands and copies them to the clipboard with one tap.
  • 🔍 Interactive Console: Beautiful dark-mode UI overlay with tabs (Overview, Request, Response), search, filters (All, Network, Native), and JSON pretty-printing.

Installation

Install the package via pnpm, yarn, or npm:

pnpm add tarojs-plugin-chucker --save-dev
# or
yarn add tarojs-plugin-chucker --dev
# or
npm install tarojs-plugin-chucker --save-dev

Configuration

1. Register Compile-Time Plugin

Add tarojs-plugin-chucker to the plugins array in your Taro project configuration:

// config/index.js
const config = {
  // ...
  plugins: [
    [
      "tarojs-plugin-chucker",
      {
        // By default, only enabled in development. Set true to force enable.
        enabled: process.env.NODE_ENV === "development",
      },
    ],
  ],
};

Dedicated Debugger Page

To navigate to the debugger manually (e.g., from custom menus or gestures):

import Taro from "@tarojs/taro";

Taro.navigateTo({ url: "/pages/chucker/index" });

Custom Logging

Beyond the automatic network interception, you can log any custom event into the Chucker console using the chuckerStore API. All custom entries appear alongside network logs in the same debugger UI.

Import

import { chuckerStore } from "tarojs-plugin-chucker/runtime";

One-shot logging — chuckerStore.log()

Use log() to record a complete event in a single call. An id and startTime are auto-generated if omitted.

// Log a WebSocket message
chuckerStore.log({
  type: "websocket",
  method: "MESSAGE",
  url: "wss://example.com/ws",
  requestData: { event: "ping" },
  status: "success",
  responseData: { event: "pong" },
});

// Log a custom analytics event
chuckerStore.log({
  type: "analytics",
  method: "TRACK",
  url: "page_view",
  requestData: { page: "/home", userId: "abc123" },
  status: "sent",
});

Async tracking — startTracking() / completeTracking()

For operations that have a measurable duration (e.g., GraphQL queries, RPC calls), use the tracking pair. Duration is calculated automatically.

// Start tracking a GraphQL mutation
const id = chuckerStore.startTracking({
  type: "graphql",
  method: "MUTATION",
  url: "https://api.example.com/graphql",
  requestData: { query: "mutation { createUser(name: \"Alice\") { id } }" },
});

// ... later when the response arrives
chuckerStore.completeTracking(id, {
  status: 200,
  responseData: { data: { createUser: { id: 1 } } },
});

// You can also provide an explicit duration (in ms)
chuckerStore.completeTracking(id, {
  status: 200,
  responseData: result,
  duration: 350,
});

API Reference

| Method | Returns | Description | |--------|---------|-------------| | chuckerStore.log(input) | string (id) | Add a complete log entry in one call | | chuckerStore.startTracking(input) | string (id) | Begin tracking an async operation | | chuckerStore.completeTracking(id, result?) | void | Finalize a tracked operation | | chuckerStore.getLogs() | ChuckerLog[] | Get all current log entries | | chuckerStore.clear() | void | Clear all log entries | | chuckerStore.subscribe(listener) | () => void | Subscribe to log changes, returns unsubscribe function |

CustomLogInput fields

| Field | Type | Required | Default | |-------|------|----------|---------| | type | "network" \| "native" \| string | ✅ | — | | method | string | ✅ | — | | url | string | ✅ | — | | id | string | ❌ | Auto-generated (usr_xxxxx) | | startTime | number | ❌ | Date.now() | | requestHeaders | Record<string, string> | ❌ | — | | requestData | any | ❌ | — | | status | string \| number | ❌ | — | | responseHeaders | Record<string, string> | ❌ | — | | responseData | any | ❌ | — | | error | string | ❌ | — | | duration | number | ❌ | — |