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

nadial-logic

v1.0.0

Published

Core logic for NadiaL, enabling multi-round fulfillment processes, directory scanning, and contextual verification for research and project analysis.

Readme

nadial-logic

This package contains the core fulfillment logic for the NadiaL Monorepo. It provides functions for scanning directories based on a configuration and validating these configurations.

Installation

npm install nadial-logic

Quickstart

Programmatic Usage

You can use the run and validateConfig functions directly in your Node.js applications.

const { run, validateConfig } = require('nadial-logic');
const path = require('path');

// Example Configuration
const config = {
  main: path.resolve(__dirname, './my-project-root'), // The main directory to scan
  scanFor: ['adapters', 'modules'], // Folder names to look for
  siblings: ['README.md'], // Files/folders that must exist at the sibling level
  // ... other configuration options
};

// Validate the configuration
const errors = validateConfig(config);
if (errors.length > 0) {
  console.error('Configuration errors:', errors);
} else {
  // Run the fulfillment logic
  run(config)
    .then(summary => {
      console.log('NadiaL Summary:', JSON.stringify(summary, null, 2));
    })
    .catch(error => {
      console.error('NadiaL process failed:', error.message);
    });
}

// You can also pass a path to a JSON config file:
// run('./path/to/your/config.json').then(...);

CLI Usage (within the monorepo)

If you are within the NadiaL Monorepo, you can use the root-level script to run a NadiaL process with a JSON configuration file:

npm run run-fulfillment -- <path-to-your-config.json>

For example:

npm run run-fulfillment -- packages/admin-server/data/1.json

API

run(configOrPath, options?)

Runs the NadiaL logic (fulfillment) based on the provided configuration.

  • configOrPath: (Object | string) A configuration object or a path to a JSON configuration file.
  • options: (Object, optional) Options for running the NadiaL process (e.g., workers, noWorkers, onChunk, signal).

Returns a Promise that resolves to a summary object containing the scan results.

validateConfig(config)

Validates a given configuration object.

  • config: (Object) The configuration object to validate.

Returns an array of strings, where each string is an error message. An empty array means the configuration is valid.

DEFAULT_IGNORES

An array of default directory names that are ignored during scanning (e.g., node_modules, .git).

version

The version string of the package.