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

@mockarty/types

v0.1.0

Published

TypeScript declarations for Mockarty perfengine scripts — re-exports @types/k6 and declares the 20 require-able Mockarty modules (mockarty/http, core, grpc, soap, ws, sse, kafka, rabbitmq, mcp, encoding, data, faker, sql, redis, crypto, html, metrics, exe

Readme

@mockarty/types

TypeScript declarations for Mockarty perfengine scripts. Gives you IDE autocomplete (VS Code, WebStorm, Vim-LSP) for both standard k6 modules and Mockarty's own extensions in a single package.

What's inside

The package is two layers:

  1. @types/k6 is a runtime dependency, so every standard k6 module (k6/http, k6/ws, k6/grpc, k6/data, k6/encoding, k6/crypto, k6/metrics, k6/html, k6/execution, k6/timers, k6/experimental/browser) keeps working under its original name. Mockarty's perfengine maps k6/* imports to its own mockarty/* modules at load time — your script keeps the standard k6 import paths.

  2. The 20 Mockarty perfengine modules, declared as ambient declarations under mockarty/*. Each k6 import name maps to the matching module, so you can write either import path.

    | Module | Purpose | | --------------------- | -------------------------------------------------------- | | mockarty/http | HTTP client (get/post/…/batch, JSON helpers) | | mockarty/core | check / sleep / group / fail / randomSeed | | mockarty/grpc | gRPC client driven by server reflection | | mockarty/soap | SOAP-over-HTTP call() | | mockarty/ws | Synchronous WebSocket client | | mockarty/sse | Server-Sent Events client (buffered) | | mockarty/kafka | Kafka producer / consumer | | mockarty/rabbitmq | RabbitMQ (AMQP) publish / consume | | mockarty/mcp | MCP (Model Context Protocol) client over SSE | | mockarty/encoding | JSON + base64 helpers | | mockarty/data | SharedArray — dataset shared read-only across VUs | | mockarty/faker | Synthetic data generators | | mockarty/sql | SQL client (open/connect, query/exec) | | mockarty/redis | Synchronous Redis client ({ value, error } results) | | mockarty/crypto | Hashing + HMAC + base64 | | mockarty/html | Parse HTML, query with a jQuery-style Selection | | mockarty/metrics | Counter / Gauge / Rate / Trend constructors | | mockarty/execution | Runtime state (instance/vu/scenario/test) | | mockarty/timers | setTimeout / setInterval (+ clear) | | mockarty/allure | Allure annotations (step, feature, severity, …) |

    Plus the mockarty global (mockarty.version, mockarty.cliMode, mockarty.namespace) and the top-level allure binding.

Install

npm i --save-dev @mockarty/types
// tsconfig.json
{
  "compilerOptions": {
    "types": ["@mockarty/types"]
  }
}

mockarty-cli init adds both lines for you.

Quick example

import http from "k6/http";
import { check, sleep } from "k6";
import * as faker from "mockarty/faker";
import * as Allure from "mockarty/allure";

export const options = {
  scenarios: {
    smoke: { executor: "constant-vus", vus: 5, duration: "30s" },
  },
  thresholds: { http_req_duration: ["p(95)<500"] },
};

export default function (): void {
  Allure.feature("signup");

  const res = http.post(
    "https://api.example.com/signup",
    JSON.stringify({ email: faker.email() }),
    { headers: { "Content-Type": "application/json" } },
  );

  check(res, {
    "status is 201": (r) => r.status === 201,
  });

  sleep(1);
}

More examples in examples/.

IDE integration

VS Code

Works out of the box once @mockarty/types is in devDependencies and listed in tsconfig.json. No extension required.

WebStorm / IntelliJ

Same — pick up the types from the tsconfig.json. Mark node_modules/@mockarty as a library root if hints don't show up.

Vim / Neovim / Helix (LSP)

Install typescript-language-server (npm) or tsserver. The LSP picks up @mockarty/types from package.json automatically.

Air-gapped

@mockarty/types is also published as a .tgz tarball on https://mockarty.ru/download/types/ for environments that can't reach npmjs.com. Drop it into a local registry (Verdaccio, Nexus) or install the tarball directly:

npm i --save-dev /path/to/mockarty-types-X.Y.Z.tgz

mockarty-cli init --offline unpacks an embedded copy of the bundle into your project's node_modules without touching the network.

License

MIT — same as @types/k6. See LICENSE.

The Mockarty product itself ships under the Mockarty Software License Agreement; this types-only package is intentionally MIT so it can be freely included in any TypeScript toolchain.

Versioning

The package version tracks the Mockarty platform release it targets. X.Y.Z of @mockarty/types is the type surface for Mockarty X.Y.Z runtime — newer releases may add modules, but the public type surface is backward-compatible inside a major version.

See CHANGELOG.md.

Publishing

The npm publish workflow lives at .github/workflows/types-publish.yml. It is currently a skeleton — publishing requires the @mockarty organisation on npmjs.com and an automation token in the NPM_PUBLISH_TOKEN GitHub secret. Owner sets these up in a separate sysop session; see the workflow file for the step-by-step.