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

testing-farm

v1.10.0

Published

A NodeJS module to access Testing Farm instances through the REST API.

Downloads

36

Readme

Testing Farm

npm version Tests Linters CodeQL codecov

Typesafe access to Testing Farm's REST API.

API

Creating the API instance

import TestingFarmAPI from "testing-farm";

const api = new TestingFarmAPI("https://api.dev.testing-farm.io/v0.1", "api-key");

// Passing api key in data - not recommended
const api = new TestingFarmAPI("https://api.dev.testing-farm.io/v0.1");

await api.about();

[!WARNING]

Passing the API key in request body is deprecated and not recommended. It is better to pass it in the constructor. This way the API key will be passed in the request header as part of Authorization header.

List a Test Requests

documentation of - GET /requests

const queryParams = { /* https://api.dev.testing-farm.io/redoc#operation/get_test_requests_v0_1_requests_get */ }

const requests: Requests[] = await api.requests(queryParams);
const requests: unknown = await api.requests(queryParams, false);

Request a New Test

documentation of - POST /requests

const request = { /* https://api.dev.testing-farm.io/redoc#operation/request_a_new_test_v0_1_requests_post */ }

const response: NewRequestResponse = await api.newRequest(request);
const response: unknown = await api.newRequest(request, false);
const response: unknown = await api.unsafeNewRequest(request /* unknown type */);

Test Request Details

documentation of - GET /requests/{request_id}

const details: Request = await api.requestDetails('test-id');
const details: unknown = await api.requestDetails('test-id', false);

Cancel a Test Request

documentation of - DELETE /requests/{request_id}

const response: CancelRequestResponse = await cancelRequest('test-id');
const response: unknown = await cancelRequest('test-id', false);

Composes Public Ranch

documentation of - GET /composes

const composes: Composes = await api.composes();
const composes: unknown = await api.composes(false);

Composes

documentation of - GET /composes/{ranch}

const composes: Composes = await api.ranchComposes('public');
const composes: unknown = await api.ranchComposes('public', false);

About Testing Farm

documentation of - GET /about

const about: About = await api.about();
const about: unknown = await api.about(false);