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

docpad-plugin-cachr

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docpad-plugin-cachr - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

15

out/cachr.plugin.js

@@ -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": {

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