Comparing version 0.0.6 to 0.0.7
@@ -30,6 +30,6 @@ 'use strict'; | ||
var PmpImage = (function () { | ||
function PmpImage(source, options) { | ||
function PmpImage(sourceId, options) { | ||
_classCallCheck(this, PmpImage); | ||
this.source = source; | ||
this.sourceId = sourceId; | ||
@@ -36,0 +36,0 @@ this.options = { |
@@ -39,3 +39,3 @@ 'use strict'; | ||
url: _joi2['default'].string().required(), | ||
source: _validators2['default'].source | ||
sourceId: _validators2['default'].sourceId | ||
}); | ||
@@ -51,3 +51,3 @@ | ||
var filename = val.source.id + '_' + _path2['default'].basename(parsed.pathname); | ||
var filename = val.sourceId + '_' + _path2['default'].basename(parsed.pathname); | ||
@@ -54,0 +54,0 @@ var encrypted_filename = _crypto2['default'].createHash('md5').update(filename).digest('hex'); |
@@ -30,3 +30,3 @@ 'use strict'; | ||
var schema = _joi2['default'].object().required().keys({ | ||
source: _validators2['default'].source, | ||
sourceId: _validators2['default'].sourceId, | ||
filename: _joi2['default'].string().required(), | ||
@@ -49,3 +49,3 @@ url: _joi2['default'].string().required(), | ||
url: val.url, | ||
source: val.source.id | ||
sourceId: val.sourceId | ||
}; | ||
@@ -52,0 +52,0 @@ |
@@ -14,12 +14,3 @@ 'use strict'; | ||
exports['default'] = { | ||
source: _joi2['default'].object().required().keys({ | ||
id: _joi2['default'].string().required(), | ||
url: _joi2['default'].string().required(), | ||
offset: _joi2['default'].number().required(), | ||
startingOffset: _joi2['default'].number().required(), | ||
mainPageSelector: _joi2['default'].string().required(), | ||
mainPageAttribute: _joi2['default'].string().required(), | ||
imagePageSelector: _joi2['default'].string().required(), | ||
imagePageAttribute: _joi2['default'].string().required() | ||
}), | ||
sourceId: _joi2['default'].string().required(), | ||
options: _joi2['default'].object().required().keys({ | ||
@@ -26,0 +17,0 @@ pmpApiUrl: _joi2['default'].string().required(), |
{ | ||
"name": "pmp-image", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "PicMePlease image", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/paolo-chiabrera/pmp-image", |
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
16984
383