Socket
Book a DemoInstallSign in
Socket

@elasticprojects/abstract-cli

Package Overview
Dependencies
Maintainers
1
Versions
968
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elasticprojects/abstract-cli

`abstract-cli` provides a set of commands for working with local and remote Abstract data.

Source
npmnpm
Version
0.26.5
Version published
Weekly downloads
3K
37.28%
Maintainers
1
Weekly downloads
 
Created
Source

abstract-cli

abstract-cli provides a set of commands for working with local and remote Abstract data.

The primary purpose of abstract-cli is to serve as local backend for the desktop app. The desktop app ships with an abstract-cli binary and spawns it as necessary to run commands.

Most commands provide access to git data in the local Abstract repos and are simple wrappers around functionality supplied by the gab library.

Currently the only supported output format is json.

Node API

The compiled abstract-cli binary is distributed (privately) via npm. This allows simple, versioned integration into the desktop project.

A small shim is included to provide easy access to the binary.

Example usage:

import abstractCLI from "@elasticprojects/abstract-cli";

Promise.resolve(
  spawn(abstractCLI, "project init 123", {
    capture: ["stdout", "stderr"]
  })
)
.then(output => JSON.parse(output.stdout))
.catch(output => console.error(output.stderrr));

Development

Run tests:

$ yarn test

Compile a binary:

$ yarn run build

Once a binary has been built, it can be useful to link it into the desktop project for testing. To do so, first run:

$ yarn link

Then in the desktop project, run:

$ yarn link "@elasticprojects/abstract-cli"

Publishing New Versions

To publish a new version, update the version field in package.json with the desired version and commit the change. CI will automatically publish the release to npm when the commit is merged to master.

The version can be easily updated with:

$ ./script/version (major|minor|patch)

which will run npm version with whatever argument you pass in and commit package.json.

FAQs

Package last updated on 08 Jun 2018

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