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

@qualithm/arrow-flight-js

v1.7.6

Published

Arrow Flight client for JavaScript and TypeScript runtimes.

Readme

Arrow Flight JS

CI codecov npm

Arrow Flight client for JavaScript and TypeScript runtimes.

A high-performance transport layer for Apache Arrow data streams using gRPC. This is the base protocol library—for SQL functionality, see @qualithm/arrow-flight-sql-js.

Features

  • Full Arrow Flight protocol support (all RPC methods)
  • TypeScript-first with comprehensive type definitions
  • Cross-runtime: Bun, Node.js 20+, Deno
  • Streaming support with async iterables
  • Multiple authentication methods (Basic, Bearer, mTLS, Handshake)
  • TLS/mTLS configuration
  • Comprehensive error handling with typed error codes
  • ESM-only, tree-shakeable

Installation

npm install @qualithm/arrow-flight-js
# or
bun add @qualithm/arrow-flight-js

Quick Start

import { createFlightClient, pathDescriptor } from "@qualithm/arrow-flight-js"

// Connect to a Flight server
const client = await createFlightClient({
  host: "localhost",
  port: 8815,
  tls: false
})

// List available flights
for await (const info of client.listFlights()) {
  console.log("Flight:", info.flightDescriptor)
}

// Get flight info
const info = await client.getFlightInfo(pathDescriptor("my", "dataset"))
console.log("Records:", info.totalRecords)

// Retrieve data
for (const endpoint of info.endpoint) {
  for await (const data of client.doGet(endpoint.ticket!)) {
    console.log("Received:", data.dataBody.length, "bytes")
  }
}

client.close()

See the examples directory for complete, runnable demonstrations.

Examples

| Example | Description | | ------------------------------------------------------- | ------------------------------------------------- | | basic-connection.ts | Creating clients, connecting, listing flights | | authentication.ts | Basic auth, bearer tokens, handshake | | tls-configuration.ts | TLS, mTLS, custom CAs, server name override | | getting-data.ts | getFlightInfo(), getSchema(), doGet() | | putting-data.ts | Upload data with doPut() | | exchange.ts | Bidirectional streaming with doExchange() | | actions.ts | Custom actions with listActions(), doAction() | | streaming.ts | Memory-efficient streaming patterns | | cancellation.ts | Cancel flights with cancelFlightInfo() | | call-options.ts | Timeouts, custom headers, request tracing | | error-handling.ts | FlightError handling patterns |

API Reference

Client Methods

| Method | Description | | ------------- | ---------------------------------- | | connect() | Establish connection to the server | | close() | Close the connection | | handshake() | Authentication handshake |

Flight Operations

| Method | Description | | ----------------- | ---------------------------------------- | | listFlights() | List available data streams | | getFlightInfo() | Get metadata about a specific flight | | getSchema() | Get the Arrow schema for a flight | | doGet() | Retrieve a data stream (server → client) | | doPut() | Upload a data stream (client → server) | | doExchange() | Bidirectional data stream exchange |

Actions

| Method | Description | | --------------- | ----------------------------- | | doAction() | Execute a custom action | | listActions() | List available custom actions |

Cancellation

| Method | Description | | -------------------- | ----------------------- | | cancelFlightInfo() | Cancel a running flight |

Utilities

| Function | Description | | ------------------ | ---------------------------------------- | | pathDescriptor() | Create a path-based flight descriptor | | cmdDescriptor() | Create a command-based flight descriptor |

Development

Prerequisites

  • Bun (recommended), Node.js 20+, or Deno

Setup

bun install

Building

bun run build

Testing

# Unit tests
bun test

# Integration tests (requires running Arrow Flight server)
FLIGHT_HOST=localhost FLIGHT_PORT=50051 bun run test:integration

Benchmarks

# Requires running Arrow Flight server
FLIGHT_HOST=localhost FLIGHT_PORT=50051 bun run bench

Linting & Formatting

bun run lint
bun run format
bun run typecheck

License

Apache-2.0