Skip to content

yeticgi/debugging-fun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

debugging-fun

An opt-in debugging overlay for web projects and a small macOS/Linux machine diagnostics CLI. The package is dependency-free and avoids reporting hostnames, usernames, IP addresses, or environment variables.

Install

npm install @yeti-cgi/debugging-fun

Browser library

Nothing is rendered unless debuggingFun is explicitly enabled:

import { debuggingFun } from "@yeti-cgi/debugging-fun";

const removeOverlay = debuggingFun({
  debuggingFun: import.meta.env.DEV
});

// Later, if needed:
removeOverlay();

Passing true is also supported: debuggingFun(true). The accessible overlay uses Shadow DOM so application styles do not leak into it. It shows the current URL, viewport and screen sizes, language, connectivity, platform, and user agent.

CLI

Run without installing:

npx @yeti-cgi/debugging-fun
npx @yeti-cgi/debugging-fun --json

Or after a global install, run debugging-fun. Reports include OS version and architecture, Node/V8 versions, CPU, memory, uptime, shell name, and terminal status.

Library machine diagnostics

import { getMachineInfo, formatMachineInfo } from "@yeti-cgi/debugging-fun/machine";

const info = getMachineInfo();
console.log(formatMachineInfo(info));

Publishing with npm trusted publishing (OIDC)

The included GitHub Actions workflow publishes whenever a GitHub Release is published. Before the first release:

  1. Create the @yeti-cgi/debugging-fun package on npm (the initial publish may need to be performed manually).
  2. On npmjs.com, open the package's Settings → Trusted Publisher and choose GitHub Actions.
  3. Set organization/user to yeticgi, repository to debugging-fun, workflow to release.yml, environment to npm, and allow npm publish.
  4. In GitHub, create an environment named npm. Add required reviewers if desired.
  5. Update package.json to a version not already published, commit it, tag it (for example v0.1.0), and publish the matching GitHub Release.

No long-lived NPM_TOKEN secret is required. The workflow requests an OIDC identity token; provenance is currently disabled by publishConfig.provenance.

Alpha releases

Every push to the staging branch publishes a unique prerelease such as 0.1.1-alpha.42 under npm's alpha dist-tag. Install the newest staging build with:

npm install @yeti-cgi/debugging-fun@alpha

Alpha publishing does not change the stable latest tag. Keep package.json set to the intended next stable version; publishing a GitHub Release publishes that exact version under latest.

Development

npm test
npm run check
npm pack --dry-run

License

GNU Lesser General Public License v2.1 only. See LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors