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

inflow-mock

v1.1.0

Published

Generate comprehensive mock databases for the inflow-get schema

Readme

inflow-mock

Generate comprehensive mock databases for the inflow-get schema. 100% table coverage (37 tables) with realistic manufacturing inventory data.

Install

npm install inflow-mock

Quick Start

As a Library

import { generate, createDb, schema } from 'inflow-mock'

// Using presets
const small = generate({ preset: 'small' })   // 100 products
const medium = generate({ preset: 'medium' }) // 500 products
const large = generate({ preset: 'large' })   // 1000 products

// Custom options
const data = generate({
  products: 250,
  vendors: 30,
  customers: 50,
  seed: 42  // Reproducible
})

// Write to database
const db = createDb('./test.db')
await db.insert(schema.products).values(data.products)
await db.insert(schema.vendors).values(data.vendors)
// ... insert other tables

CLI (for local development)

npm run generate                       # small preset, seed=42
npm run generate -- --preset=large     # 1000 products
npm run generate -- --products=500     # Custom count
npm run generate -- --seed=12345       # Reproducible output

Output: data/mock.db

Presets

| Preset | Products | Vendors | Customers | Locations | |--------|----------|---------|-----------|-----------| | small | 100 | 15 | 20 | 3 | | medium | 500 | 50 | 75 | 4 | | large | 1000 | 100 | 150 | 5 |

Table Coverage (37/37)

Reference Data: categories, locations, currencies, paymentTerms, pricingSchemes, taxingSchemes, taxCodes, adjustmentReasons, operationTypes

Team & Custom Fields: teamMembers, customFieldDefinitions, customFieldDropdownOptions, customFields

Core Entities: vendors, customers, products

Product Details: productBarcodes, inventoryLines, itemBoms, productOperations, productPrices, reorderSettings, vendorItems

Orders: purchaseOrders, purchaseOrderLines, salesOrders, salesOrderLines, manufacturingOrders

Stock Operations: stockTransfers, stockTransferLines, stockAdjustments, stockAdjustmentLines, stockCounts, countSheets, countSheetLines

Cost Adjustments: productCostAdjustments, productCostAdjustmentLines

Computed: productSummary

Sample Generated Data

Vendors:

  • Precision Fasteners Inc
  • Allied Steel Supply
  • Global Electronics Distributors

Products:

  • HB-2464 - Hex Bolt M10
  • MC-5711 - Motor Controller Large
  • HC-2392 - Hydraulic Cylinder 3/4"

Features:

  • BOMs for manufacturable products
  • Operations with time/cost estimates
  • Multi-location inventory
  • Stock transfers, adjustments, counts
  • Purchase & sales order history

API

generate(options?)

Returns BaselineData containing arrays for all 37 tables.

interface GenerateOptions {
  preset?: 'small' | 'medium' | 'large'
  products?: number
  vendors?: number
  customers?: number
  locations?: number
  seed?: number
}

createDb(path)

Creates a Drizzle database connection.

schema

Re-exports the inflow-get schema for inserts.

License

ISC