@blockforfun/plugin-git
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.1.3](https://github.com/blockforfun/cli/compare/@blockforfun/plugin-git@1.1.2...@blockforfun/plugin-git@1.1.3) (2018-11-27) | ||
### Bug Fixes | ||
* remove @ from GitHub badge link ([27ca1cb](https://github.com/blockforfun/cli/commit/27ca1cb)) | ||
## [1.1.2](https://github.com/blockforfun/cli/compare/@blockforfun/plugin-git@1.1.1...@blockforfun/plugin-git@1.1.2) (2018-11-27) | ||
@@ -8,0 +19,0 @@ |
@@ -1,1 +0,1 @@ | ||
{"version":"1.1.2","commands":{"list:json":{"id":"list:json","description":"lists entries in json format from a BlockFor.fun git registry","pluginName":"@blockforfun/plugin-git","pluginType":"core","aliases":["ls:json"],"flags":{"ref":{"name":"ref","type":"option","char":"r","description":"git ref to read from","default":"refs/heads/master"},"spec":{"name":"spec","type":"option","char":"s","description":"git refspec to fetch","default":"refs/heads/*:refs/heads/*"},"fetch":{"name":"fetch","type":"option","char":"f","description":"git fetch repository URL"}},"args":[{"name":"source","description":"git source repository URL or path","required":true},{"name":"target","description":"path to target json file"}]},"list:text":{"id":"list:text","description":"lists entries in text format from a BlockFor.fun git registry","pluginName":"@blockforfun/plugin-git","pluginType":"core","aliases":["ls","ls:text"],"flags":{"ref":{"name":"ref","type":"option","char":"r","description":"git ref to read from","default":"refs/heads/master"},"spec":{"name":"spec","type":"option","char":"s","description":"git refspec to fetch","default":"refs/heads/*:refs/heads/*"},"fetch":{"name":"fetch","type":"option","char":"f","description":"git fetch repository URL"}},"args":[{"name":"source","description":"git source repository URL or path","required":true},{"name":"target","description":"path to target json file"}]}}} | ||
{"version":"1.1.3","commands":{"list:json":{"id":"list:json","description":"lists entries in json format from a BlockFor.fun git registry","pluginName":"@blockforfun/plugin-git","pluginType":"core","aliases":["ls:json"],"flags":{"ref":{"name":"ref","type":"option","char":"r","description":"git ref to read from","default":"refs/heads/master"},"spec":{"name":"spec","type":"option","char":"s","description":"git refspec to fetch","default":"refs/heads/*:refs/heads/*"},"fetch":{"name":"fetch","type":"option","char":"f","description":"git fetch repository URL"}},"args":[{"name":"source","description":"git source repository URL or path","required":true},{"name":"target","description":"path to target json file"}]},"list:text":{"id":"list:text","description":"lists entries in text format from a BlockFor.fun git registry","pluginName":"@blockforfun/plugin-git","pluginType":"core","aliases":["ls","ls:text"],"flags":{"ref":{"name":"ref","type":"option","char":"r","description":"git ref to read from","default":"refs/heads/master"},"spec":{"name":"spec","type":"option","char":"s","description":"git refspec to fetch","default":"refs/heads/*:refs/heads/*"},"fetch":{"name":"fetch","type":"option","char":"f","description":"git fetch repository URL"}},"args":[{"name":"source","description":"git source repository URL or path","required":true},{"name":"target","description":"path to target json file"}]}}} |
{ | ||
"name": "@blockforfun/plugin-git", | ||
"description": "BlockFor.fun CLI git plugin", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"author": "Mikael Karon <mikael@karon.se>", | ||
@@ -62,3 +62,3 @@ "bugs": "https://github.com/blockforfun/cli/issues", | ||
}, | ||
"gitHead": "26d3c1650f75b1149d2619840f2e2b4ff91891f3" | ||
"gitHead": "8cb88ccf1fd60fc74a08ee7273879df80f6bd368" | ||
} |
@@ -7,5 +7,6 @@ @blockforfun/plugin-git | ||
[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io) | ||
[![Version](https://img.shields.io/npm/v/@blockforfun/plugin-git.svg)](https://npmjs.org/package/@blockforfun/plugin-git) | ||
[![Downloads/week](https://img.shields.io/npm/dw/@blockforfun/plugin-git.svg)](https://npmjs.org/package/@blockforfun/plugin-git) | ||
[![License](https://img.shields.io/npm/l/@blockforfun/cli.svg)](https://github.com/blockforfun/cli/blob/master/plugins/plugin-git/package.json) | ||
[![GitHub](https://img.shields.io/badge/github-%40blockforfun%2Fcli-lightgrey.svg?logo=github)](https://github.com/blockforfun/cli/tree/master/plugins/plugin-git) | ||
[![Version](https://img.shields.io/npm/v/@blockforfun/plugin-git.svg?logo=npm)](https://npmjs.org/package/@blockforfun/plugin-git) | ||
[![Downloads/week](https://img.shields.io/npm/dw/@blockforfun/plugin-git.svg?logo=npm)](https://npmjs.org/package/@blockforfun/plugin-git) | ||
[![License](https://img.shields.io/npm/l/@blockforfun/cli.svg?logo=github)](https://github.com/blockforfun/cli/blob/master/plugins/plugin-git/package.json) | ||
@@ -16,4 +17,2 @@ <!-- toc --> | ||
<!-- tocstop --> | ||
<!-- tocstop --> | ||
# Usage | ||
@@ -26,3 +25,3 @@ <!-- usage --> | ||
$ oclif-example (-v|--version|version) | ||
@blockforfun/plugin-git/1.1.2 win32-x64 node-v10.10.0 | ||
@blockforfun/plugin-git/1.1.3 win32-x64 node-v10.10.0 | ||
$ oclif-example --help [COMMAND] | ||
@@ -34,14 +33,2 @@ USAGE | ||
<!-- usagestop --> | ||
```sh-session | ||
$ npm install -g @blockforfun/plugin-git | ||
$ oclif-example COMMAND | ||
running command... | ||
$ oclif-example (-v|--version|version) | ||
@blockforfun/plugin-git/1.1.1 win32-x64 node-v10.10.0 | ||
$ oclif-example --help [COMMAND] | ||
USAGE | ||
$ oclif-example COMMAND | ||
... | ||
``` | ||
<!-- usagestop --> | ||
# Commands | ||
@@ -73,3 +60,3 @@ <!-- commands --> | ||
_See code: [src\commands\list\json.js](https://github.com/blockforfun/cli/blob/v1.1.2/src\commands\list\json.js)_ | ||
_See code: [src\commands\list\json.js](https://github.com/blockforfun/cli/blob/v1.1.3/src\commands\list\json.js)_ | ||
@@ -98,53 +85,3 @@ ## `oclif-example list:text SOURCE [TARGET]` | ||
_See code: [src\commands\list\text.js](https://github.com/blockforfun/cli/blob/v1.1.2/src\commands\list\text.js)_ | ||
_See code: [src\commands\list\text.js](https://github.com/blockforfun/cli/blob/v1.1.3/src\commands\list\text.js)_ | ||
<!-- commandsstop --> | ||
* [`oclif-example list:json SOURCE [TARGET]`](#oclif-example-listjson-source-target) | ||
* [`oclif-example list:text SOURCE [TARGET]`](#oclif-example-listtext-source-target) | ||
## `oclif-example list:json SOURCE [TARGET]` | ||
lists entries in json format from a BlockFor.fun git registry | ||
``` | ||
USAGE | ||
$ oclif-example list:json SOURCE [TARGET] | ||
ARGUMENTS | ||
SOURCE git source repository URL or path | ||
TARGET path to target json file | ||
OPTIONS | ||
-f, --fetch=fetch git fetch repository URL | ||
-r, --ref=ref [default: refs/heads/master] git ref to read from | ||
-s, --spec=spec [default: refs/heads/*:refs/heads/*] git refspec to fetch | ||
ALIASES | ||
$ oclif-example ls:json | ||
``` | ||
_See code: [src\commands\list\json.js](https://github.com/blockforfun/cli/blob/v1.1.1/src\commands\list\json.js)_ | ||
## `oclif-example list:text SOURCE [TARGET]` | ||
lists entries in text format from a BlockFor.fun git registry | ||
``` | ||
USAGE | ||
$ oclif-example list:text SOURCE [TARGET] | ||
ARGUMENTS | ||
SOURCE git source repository URL or path | ||
TARGET path to target json file | ||
OPTIONS | ||
-f, --fetch=fetch git fetch repository URL | ||
-r, --ref=ref [default: refs/heads/master] git ref to read from | ||
-s, --spec=spec [default: refs/heads/*:refs/heads/*] git refspec to fetch | ||
ALIASES | ||
$ oclif-example ls | ||
$ oclif-example ls:text | ||
``` | ||
_See code: [src\commands\list\text.js](https://github.com/blockforfun/cli/blob/v1.1.1/src\commands\list\text.js)_ | ||
<!-- commandsstop --> |
const {createWriteStream} = require('fs') | ||
const BaseCommand = require('../../lib/command') | ||
const GitCommand = require('../../lib/command') | ||
const {MemRepo, FsRepo} = require('../../lib/repo') | ||
class ListCommand extends BaseCommand { | ||
class ListCommand extends GitCommand { | ||
async list(repo, url, target, options) { | ||
@@ -36,3 +36,3 @@ const write = target ? message => target.write(`${message}\n`) : this.log | ||
ListCommand.args = [ | ||
...BaseCommand.args, | ||
...GitCommand.args, | ||
{ | ||
@@ -44,5 +44,5 @@ name: 'target', | ||
] | ||
ListCommand.flags = BaseCommand.flags | ||
ListCommand.flags = GitCommand.flags | ||
ListCommand.aliases = ['ls', 'ls:text'] | ||
module.exports = ListCommand |
const {parse} = require('url') | ||
const {Command, flags} = require('@oclif/command') | ||
class BaseCommand extends Command { | ||
class GitCommand extends Command { | ||
async fetch(repo, url, options) { | ||
@@ -28,3 +28,3 @@ const {spec} = options | ||
BaseCommand.args = [ | ||
GitCommand.args = [ | ||
{ | ||
@@ -38,3 +38,3 @@ name: 'source', | ||
BaseCommand.flags = { | ||
GitCommand.flags = { | ||
ref: flags.string({ | ||
@@ -56,2 +56,2 @@ char: 'r', | ||
module.exports = BaseCommand | ||
module.exports = GitCommand |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14042
82