Comparing version 2.0.0 to 2.0.1
@@ -10,4 +10,4 @@ 'use strict'; | ||
var fs = require('fs'); | ||
var Q = require('q'); | ||
var URL = require('url'); | ||
var Q = require('q'); | ||
@@ -51,10 +51,11 @@ var $28 = (function() { | ||
var root = path.dirname(path.resolve('28.json')) + '/'; | ||
_.forEach(manifest.dependencies, function(url, name){ | ||
url = URL.parse(url); | ||
url.hash = url.hash.substring(1); | ||
url.path = _.endsWith(url.path, '.git') ? url.path.substring(0, url.path.length - 4) : url.path; | ||
var href = _.template('<%= protocol %>//<%= hostname %><%= path %>/archive/<%= hash %>.zip')(url); | ||
console.log('Installing ' + name + '...'); | ||
_.forEach(manifest.dependencies, function(hash, path){ | ||
var href = _.template('https://github.com/<%= path %>/archive/<%= hash %>.zip')({ | ||
path: path, | ||
hash: hash | ||
}); | ||
console.log('Installing ' + path + '#' + hash + '...'); | ||
var name = path.split('/')[1]; | ||
var output = root + 'jsoniq_modules/'; | ||
var base = output + name + '-' + url.hash; | ||
var base = output + name + '-' + hash; | ||
new Download({ mode: '755', extract: true }) | ||
@@ -81,9 +82,7 @@ .get(href) | ||
var root = path.dirname(path.resolve('28.json')) + '/'; | ||
_.forEach(manifest.dependencies, function(url, name){ | ||
url = URL.parse(url); | ||
url.hash = url.hash.substring(1); | ||
url.path = _.endsWith(url.path, '.git') ? url.path.substring(0, url.path.length - 4) : url.path; | ||
console.log('Uninstalling ' + name + '...'); | ||
_.forEach(manifest.dependencies, function(hash, path){ | ||
console.log('Uninstalling ' + path + '#' + hash + '...'); | ||
var name = path.split('/')[1]; | ||
var output = root + 'jsoniq_modules/'; | ||
var base = output + name + '-' + url.hash; | ||
var base = output + name + '-' + hash; | ||
var manifest = JSON.parse(fs.readFileSync(base + '/28.json', 'utf-8')); | ||
@@ -90,0 +89,0 @@ manifest.exports.forEach(function(ns){ |
@@ -9,3 +9,3 @@ { | ||
"description": "Command line utility to download and upload 28.io queries.", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"keywords": [ | ||
@@ -12,0 +12,0 @@ "jsoniq", |
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
180241
1209