Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@blockforfun/plugin-build

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockforfun/plugin-build - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

oclif.manifest.json

@@ -1,1 +0,1 @@

{"version":"0.0.1","commands":{"build":{"id":"build","description":"builds sqlite3 database from a BlockFor.fun git registry.","pluginName":"@blockforfun/plugin-build","pluginType":"core","aliases":[],"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":"target","description":"path to target sqlite3 database","required":true},{"name":"source","description":"git source repository URL or path","required":true}]}}}
{"version":"0.0.2","commands":{"build":{"id":"build","description":"builds sqlite3 database from a BlockFor.fun git registry.","pluginName":"@blockforfun/plugin-build","pluginType":"core","aliases":[],"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":"target","description":"path to target sqlite3 database","required":true},{"name":"source","description":"git source repository URL or path","required":true}]}}}
{
"name": "@blockforfun/plugin-build",
"description": "BlockFor.fun CLI build plugin",
"version": "0.0.1",
"version": "0.0.2",
"author": "Mikael Karon <mikael@karon.se>",
"bugs": "https://github.com/blockforfun/cli/issues",
"dependencies": {
"@es-git/core": "^0.9.0",
"@es-git/fetch-mixin": "^0.9.0",
"@es-git/load-as-mixin": "^0.9.0",
"@es-git/memory-repo": "^0.9.0",
"@es-git/mix": "^0.9.0",
"@es-git/node-fs-repo": "^0.9.0",
"@es-git/object-mixin": "^0.9.0",
"@es-git/walkers-mixin": "^0.9.0",
"@es-git/zlib-mixin": "^0.9.0",
"@oclif/command": "^1.5.6",
"@oclif/config": "^1.9.0",
"babel-runtime": "^6.26.0",
"micromatch": "^3.1.10",
"node-fetch": "^2.3.0",
"@blockforfun/plugin-git": "file:../plugin-git",
"sqlite": "^3.0.0"

@@ -23,0 +10,0 @@ },

@@ -22,3 +22,3 @@ @blockforfun/plugin-build

$ oclif-example (-v|--version|version)
@blockforfun/plugin-build/0.0.1 win32-x64 node-v10.10.0
@blockforfun/plugin-build/0.0.2 win32-x64 node-v10.10.0
$ oclif-example --help [COMMAND]

@@ -52,3 +52,3 @@ USAGE

_See code: [src\commands\build.js](https://github.com/blockforfun/cli/blob/v0.0.1/src\commands\build.js)_
_See code: [src\commands\build.js](https://github.com/blockforfun/cli/blob/v0.0.2/src\commands\build.js)_
<!-- commandsstop -->
const {parse} = require('url')
const sqlite = require('sqlite')
const {Command, flags} = require('@oclif/command')
const {MemRepo, FsRepo} = require('../lib/repo')
const BaseCommand = require('@blockforfun/plugin-git/src/lib/command')
const {MemRepo, FsRepo} = require('@blockforfun/plugin-git/src/lib/repo')
class BuildCommand extends Command {
async fetch(repo, url, options) {
const {spec} = options
this.log(`Fetching ${spec} from ${url}`)
return repo.fetch(url, spec, {progress: p => process.stdout.write(p)})
}
async tree(repo, url, options) {
const {ref, fetch: _fetch = url.href} = options
if (!url.protocol) {
this.log(`Mounting ${url.href}`)
}
if (url.protocol || options.fetch) {
await this.fetch(repo, _fetch, options)
}
this.log(`Reading from ${ref}...`)
const object = await repo.loadObject(await repo.getRef(ref))
if (!object) {
throw new Error(`Can't find ${ref}`)
}
return object.body.tree
}
class BuildCommand extends BaseCommand {
async build(repo, url, path, options) {

@@ -75,19 +53,4 @@ this.log(`Opening ${path}...`)

]
BuildCommand.flags = {
ref: flags.string({
char: 'r',
description: 'git ref to read from',
default: 'refs/heads/master',
}),
spec: flags.string({
char: 's',
description: 'git refspec to fetch',
default: 'refs/heads/*:refs/heads/*',
}),
fetch: flags.string({
char: 'f',
description: 'git fetch repository URL',
}),
}
BuildCommand.flags = BaseCommand.flags
module.exports = BuildCommand
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