docpad-plugin-cachr
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -7,7 +7,6 @@ // Generated by CoffeeScript 1.3.3 | ||
module.exports = function(BasePlugin) { | ||
var CachrPlugin, balUtil, fs, path, request; | ||
var CachrPlugin, balUtil, pathUtil, request; | ||
balUtil = require('bal-util'); | ||
request = require('request'); | ||
path = require('path'); | ||
fs = require('fs'); | ||
pathUtil = require('path'); | ||
return CachrPlugin = (function(_super) { | ||
@@ -25,3 +24,3 @@ | ||
urlPrefix: '/_docpad/plugins/cachr', | ||
pathPrefix: path.join('_docpad', 'plugins', 'cachr') | ||
pathPrefix: pathUtil.join('_docpad', 'plugins', 'cachr') | ||
}; | ||
@@ -37,3 +36,3 @@ | ||
config = this.config; | ||
name = path.basename(sourceUrl); | ||
name = pathUtil.basename(sourceUrl); | ||
details = { | ||
@@ -43,3 +42,3 @@ name: name, | ||
cacheUrl: "" + config.urlPrefix + "/" + name, | ||
cachePath: path.resolve(docpad.config.outPath, config.pathPrefix, name) | ||
cachePath: pathUtil.resolve(docpad.config.outPath, config.pathPrefix, name) | ||
}; | ||
@@ -65,3 +64,3 @@ this.urlsToCache[sourceUrl] = details; | ||
if (attempt === 3) { | ||
return path.exists(details.cachePath, function(exists) { | ||
return balUtil.exists(details.cachePath, function(exists) { | ||
if (exists) { | ||
@@ -120,3 +119,3 @@ return fs.unlink(details.cachePath, function(err2) { | ||
urlsToCacheLength = this.urlsToCacheLength; | ||
cachrPath = path.resolve(docpad.config.outPath, config.pathPrefix); | ||
cachrPath = pathUtil.resolve(docpad.config.outPath, config.pathPrefix); | ||
failures = 0; | ||
@@ -123,0 +122,0 @@ if (!urlsToCacheLength) { |
{ | ||
"name": "docpad-plugin-cachr", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Caches remote resources locally", | ||
@@ -33,3 +33,3 @@ "homepage": "https://github.com/bevry/docpad-extras", | ||
"request": "2.9.x", | ||
"bal-util": "1.8.x" | ||
"bal-util": "1.12.x" | ||
}, | ||
@@ -36,0 +36,0 @@ "devDependencies": { |
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
138
1
+ Addedbal-util@1.12.5(transitive)
- Removedbal-util@1.8.8(transitive)
Updatedbal-util@1.12.x