jscrambler
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -10,3 +10,4 @@ /** | ||
var assign = require('lodash.assign'); | ||
var cfg = require('./lib/config'); | ||
var config = require('./lib/config'); | ||
var defaults = require('lodash.defaults'); | ||
var fs = require('fs-extra'); | ||
@@ -16,2 +17,3 @@ var glob = require('glob'); | ||
var JSZip = require('jszip'); | ||
var omit = require('lodash.omit'); | ||
var path = require('flavored-path'); | ||
@@ -30,3 +32,3 @@ var Q = require('q'); | ||
Client: JScramblerClient, | ||
config: cfg, | ||
config: config, | ||
/** | ||
@@ -144,2 +146,8 @@ * Downloads code through the API. | ||
params = assign({}, params); | ||
// If there are no params fallback to `cfg` | ||
var rawParams = omit(params, 'files', 'cwd'); | ||
if (Object.keys(rawParams).length === 0) { | ||
params = defaults(params, this.config.params); | ||
} | ||
params.files = params.files.slice(); | ||
@@ -146,0 +154,0 @@ this.zipProject(params.files, params.cwd); |
@@ -5,4 +5,5 @@ 'use strict'; | ||
// Load RC configuration if present | ||
var cfg = rc('jscrambler', { | ||
// Load RC configuration if present. Pass `[]` as last argument to avoid | ||
// getting variables from `argv`. | ||
var config = rc('jscrambler', { | ||
keys: {}, | ||
@@ -12,4 +13,4 @@ host: 'api.jscrambler.com', | ||
apiVersion: 3 | ||
}); | ||
}, []); | ||
module.exports = cfg; | ||
module.exports = config; |
{ | ||
"name": "jscrambler", | ||
"description": "JScrambler API client.", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"homepage": "https://github.com/jscrambler/node-jscrambler", | ||
@@ -39,2 +39,3 @@ "author": { | ||
"lodash.keys": "^2.4.1", | ||
"lodash.omit": "^2.4.1", | ||
"lodash.pluck": "^2.4.1", | ||
@@ -41,0 +42,0 @@ "lodash.size": "^2.4.1", |
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
45042
751
17
+ Addedlodash.omit@^2.4.1
+ Addedlodash._basedifference@2.4.1(transitive)
+ Addedlodash._baseflatten@2.4.1(transitive)
+ Addedlodash._baseindexof@2.4.1(transitive)
+ Addedlodash._cacheindexof@2.4.1(transitive)
+ Addedlodash._cachepush@2.4.1(transitive)
+ Addedlodash._createcache@2.4.1(transitive)
+ Addedlodash._getobject@2.4.1(transitive)
+ Addedlodash._keyprefix@2.4.2(transitive)
+ Addedlodash._largearraysize@2.4.1(transitive)
+ Addedlodash._objectpool@2.4.1(transitive)
+ Addedlodash._releaseobject@2.4.1(transitive)
+ Addedlodash.isarguments@2.4.1(transitive)
+ Addedlodash.omit@2.4.1(transitive)