New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@buggyorg/buggy

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@buggyorg/buggy

CLI for Buggy.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
41
increased by355.56%
Maintainers
2
Weekly downloads
 
Created
Source

Buggy Package

This package includes a CLI for the Buggy tool chain.

Basic Idea

A program in Buggy can take up various different forms depending on the position in the tool chain. The following pictures illustrates the different layers.

The Buggy toolchain with its layers

Buggy CLI Interface

{
"project": "Sort",
"file": "sort.clj",
"library": "http://libraryserver",
"targets": [
  {
    "compile":
    {
      "dependency": "@buggyorg/codegen^0.4.0",
      "args": ["--language", "c++", "--optimized"]
    }
  }],
"preprocessing": [
  {
    "@buggyorg/lisgy": {
      "handles": ".clj",
      "args": ["--fast"]
    },
    "yaml2json": {
      "handles": ".yaml",
      "runFormat": "<prog> --input <input-file> --output <output-file>"
    }
  }]
}

Call it from the Commandline via:

buggy compile

Possible "Backends"

  • API
  • CLI
  • Web-Service

Definition of APIs in external programs

JSON definition of the API for a CLI-tool via <prog> --buggy-api e.g. yaml2json --buggy-api. This could result in something similar to the following:

{
  "name": "yaml2json",
  "binary": "/usr/bin/yaml2json",
  "description": "fancy tool with buggy api interface",
  "produces": "stdout", // or "file" ?
  "takes": "stdin", // of "file"
  "command": "yaml2json"
}

Create a node module that exposes its API to buggy-cli

It must have a npm target to get information about the buggy-cli interface.

> npm run buggy-cli-info
{
  "name": "codegenerator",
  "description": "Creates code from buggy graphs",
  "buggy-version": "0.4.0"
}

It also must export cliApi as a function in its main export (package.json"main"). The function cliApi must return an object of the following form:

{
  "name": "codegeneration",
  "produces": "code",
  "dependencies": [
    "@buggyorg/resolve",
    {"package": "@buggyorg/optimize", "optional": true, "activateWhen": "optimize"}
  ]
}

There are two different dependencies. Required dependencies are always used when the tool is used. Optional dependencies are only used when a specific option is set like optimize. The attribute activateWhen specifies the command line parameter that activates the step in the tool chain.

Keywords

FAQs

Package last updated on 30 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc