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

@datafire/codesearch_debian

v3.0.0

Published

DataFire integration for Debian Code Search

Downloads

3

Readme

@datafire/codesearch_debian

Client library for Debian Code Search

Installation and Usage

npm install --save @datafire/codesearch_debian
let codesearch_debian = require('@datafire/codesearch_debian').create({
  api_key: ""
});

.then(data => {
  console.log(data);
});

Description

OpenAPI for https://codesearch.debian.net/

Actions

search

Performs a search through the full Debian Code Search corpus, blocking until all results are available (might take a few seconds depending on the search query).

Search results are ordered by their ranking (best results come first).

codesearch_debian.search({
  "query": ""
}, context)

Input

  • input object
    • query required string: The search query, for example who knows... (literal) or who knows\.\.\. (regular expression). See https://codesearch.debian.net/faq for more details about which keywords are supported. The regular expression flavor is RE2, see https://github.com/google/re2/blob/master/doc/syntax.txt
    • match_mode string (values: literal, regexp): Whether the query is to be interpreted as a literal (literal) instead of as an RE2 regular expression (regexp). Literal searches are faster and do not require escaping special characters, regular expression searches are more powerful.

Output

searchperpackage

The search results are currently sorted arbitrarily, but we intend to sort them by ranking eventually: https://github.com/Debian/dcs/blob/51338e934eb7ee18d00c5c18531c0790a83cb698/cmd/dcs-web/querymanager.go#L719

codesearch_debian.searchperpackage({
  "query": ""
}, context)

Input

  • input object
    • query required string: The search query, for example who knows... (literal) or who knows\.\.\. (regular expression). See https://codesearch.debian.net/faq for more details about which keywords are supported. The regular expression flavor is RE2, see https://github.com/google/re2/blob/master/doc/syntax.txt
    • match_mode string (values: literal, regexp): Whether the query is to be interpreted as a literal (literal) instead of as an RE2 regular expression (regexp). Literal searches are faster and do not require escaping special characters, regular expression searches are more powerful.

Output

Definitions

PackageSearchResult

  • PackageSearchResult object
    • package required string: The Debian source package for which up to 2 search results have been aggregated in results.
    • results required array

SearchResult

  • SearchResult object: A search result matching the specified query. You can use sources.debian.org to view the file contents. See https://github.com/Debian/dcs/blob/master/cmd/dcs-web/show/show.go for how to construct a sources.debian.org URL from a search result.
    • context required string: The full line containing the search result.
    • context_after array: Up to 2 full lines after the search result (see context).
      • items string
    • context_before array: Up to 2 full lines before the search result (see context).
      • items string
    • line required integer: Line number containing the search result.
    • package required string: The Debian source package containing this search result, including the full Debian version number.
    • path required string: Path to the file containing the this search result, relative to package.