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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@phytest/debbie

v1.1.2

Published

Node module for interfacing with phytest databases

Readme

Debbie

A node module designed to interface with Phytest databases

Debbie is designed to be lightweight and easy to use.

She is outfitted with a series of useful utilities:

  • Automatic deadlock handling and configurable tolerance
    • Debbie will recognize when a deadlock occurs and attempt the call again
    • Deadlock tolerance is configurable, by default Debbie attempts a call up to 3 times in 1 second intervals if a deadlock is detected
  • Database Error Handling
    • Debbie is equipped with a custom DatabaseError class that translates errors from the database into objects better suited for node handling
  • Result Set Grouping
    • Debbie is configured to collect results from a stored procedure in result sets; if a procedure were to return multiple different result sets, they are grouped separately for easier identification
  • Automatic JSON Parsing
    • Debbie is capable of identifying JSON strings returned from the database and converting them from a string into JSON objects!

USAGE :

CONFIGURATION :

Debbie requires a specific configuration object upon instantiation to establish a relationship with a particular database. That configuration object looks like this:

const config = {
    server: "<NAME OF SERVER",                                      // REQUIRED STRING
    authentication: {                                               // REQUIRED OBJECT
        type: "default",                                            // REQUIRED STRING
        options: {                                                  // REQUIRED OBJECT
            userName: "<NAME OF USER CONNECTING TO DATABASE>",      // REQUIRED STRING
            password: "<PASSWORD OF USER CONNECTING TO DATABASE>"   // REQUIRED STRING
        }
    },
    options: {                                                      // REQUIRED OBJECT
        database: "<NAME OF DATABASE TO CONNECT TO>",               // REQUIRED STRING
        requestTimeout: 1800000,                                    // REQUIRED INT
        rowCollectionOnDone: true,                                  // REQUIRED BOOLEAN
        trustServerCertificate: true,                               // REQUIRED BOOLEAN
        deadlockTolerance: 3,                                       // OPTIONAL INT
        deadlockTimeDelay: 1000                                     // OPTIONAL INT
    }
};

Note: deadlockTolerance is the value that dictates how many attempts Debbie will make to call a stored procedure when a deadlock is detected Note: deadlockTimeDelay is the time in milliseconds Debbie will wait before trying a stored procedure again when a deadlock is detected

INSTANTIATION :

Once configuration is complete, simply instantiate Debbie and apply the configuration:

const example_dbi = new Debbie(config);

Congratulations! If your code didn't crash, it means you supplied the bare minimum required to create a Debbie.

USE :

Debbie only has one public method. Debbie only needs one public method.

.call(stored procedure name, payload)

const test = async () => {
    try {
        let results = await example_dbi.call("TestStoredProcedure", { UserName: "Test!" });
        // successful results available here
    } catch(err) {
        // if Debbie throws an error, be it from the database or within herself, it will end up here!
        console.log(err);
    }
}

Note: It is important to wrap calls Debbie makes in try/catch blocks to ensure proper handling of the errors she may encounter

:D