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 🙏

© 2024 – Pkg Stats / Ryan Hefner

dltracker-doctor

v1.0.0

Published

CLI to diagnose and fix problems in a dltracker.json file

Downloads

2

Readme

dltracker-doctor

CLI to diagnose and fix problems in a dltracker.json file

Overview

A dltracker.json file is created by use of the download command provided by npm-two-stage.

Note that the official npm interface does not have a download command at this time.

For information about the purpose of a dltracker.json file, see the README for npm-download-tracker (a.k.a. the npm package npm-package-dl-tracker).

The kinds of problems addressed by this module are unlikely to be seen except in cases of interrupted network connection, file system corruption, or ill-advised manual editing of the JSON file. Of course, access permission issues can be solved by changing permissions or ownership of files.

Understand that the "fix" implemented in this module is always to remove the problematic entry. In some cases this fix itself may lead to problems of two types:

  • Missing records of dependencies
  • Orphaned dependencies (never get used because the record of the package that depends on them has been removed)

The best way to solve problems with a dltracker.json file, and the contents of the directory in which it resides, is to start over with a clean directory and rerun npm download.

That being said, read on for instructions.

To Install

Typical CLI use is from a global installation:

$ npm install -g dltracker-doctor

But local installation is valid, and possibly useful for the submodules:

$ npm install --save dltracker-doctor

Non-interactive Usage

Report problems and exit:

$ dlt-dr --report-only DOWNLOAD_PATH
$ dlt-dr -r DOWNLOAD_PATH

Show version and exit:

$ dlt-dr --version
$ dlt-dr -V

Interactive Usage

Enter the dlt-dr command with the path of the directory that contains the dltracker.json file.

$ dlt-dr DOWNLOAD_PATH

If no problems are found, the program exits immediately after displaying this message:

This download set is in good health!
No changes needed.

... else the first output will be a list of all problems discovered, grouped by category.

This output is followed by a prompt for an Action.

  • The available actions are represented by single letters.
  • Entering h, or only pressing Enter, will expand the descriptions of the available actions.
  • The l action (List) will always be available to display the current state.
  • The x action (eXit) will always be available.
  • Any other action letter will only be available while the type of problem it acts on exists in the loaded JSON.
  • Each choice of an action that will result in a change, or choosing x to exit when there are unwritten changes, will always be followed by a confirmation prompt, where 'Yes' is the default.
  • The s action (Save) is only available when there are unsaved changes.
  • When all problems have been fixed, the program exits after the Save action is chosen.

License: MIT