Socket
Socket
Sign inDemoInstall

feedr

Package Overview
Dependencies
57
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.7.5 to 2.7.6

43

out/lib/feedr.js

@@ -217,11 +217,17 @@ // Generated by CoffeeScript 1.6.3

readFile = function(path, complete) {
feedr.log('debug', "Feedr is reading [" + feedDetails.url + "] on [" + path + "]");
feedr.log('debug', "Feedr is reading [" + feedDetails.url + "] on [" + path + "], checking exists");
return safefs.exists(path, function(exists) {
if (!exists) {
feedr.log('debug', "Feedr is reading [" + feedDetails.url + "] on [" + path + "], it doesn't exist");
return complete(null, null);
}
feedr.log('debug', "Feedr is reading [" + feedDetails.url + "] on [" + path + "], it exists, now reading");
return safefs.readFile(path, function(err, rawData) {
if (err) {
return complete(err, null);
feedr.log('debug', "Feedr is reading [" + feedDetails.url + "] on [" + path + "], it exists, read failed", err);
if (err) {
return complete(err, null);
}
}
feedr.log('debug', "Feedr is reading [" + feedDetails.url + "] on [" + path + "], it exists, read completed");
return complete(null, rawData);

@@ -236,2 +242,3 @@ });

if (err || !rawData) {
feedr.log('debug', "Feedr is parsing [" + feedDetails.url + "] on [" + path + "], read failed", err);
return complete(err, null);

@@ -243,4 +250,6 @@ }

err = _error;
feedr.log('debug', "Feedr is parsing [" + feedDetails.url + "] on [" + path + "], parse failed", err);
return complete(err, null);
}
feedr.log('debug', "Feedr is parsing [" + feedDetails.url + "] on [" + path + "], parse completed", err);
return complete(null, data);

@@ -255,15 +264,22 @@ });

}).once('complete', function(err) {
if (err) {
feedr.log('debug', "Feedr is writing [" + feedDetails.url + "] to [" + feedDetails.path + "], write failed", err);
return complete(err, null);
}
feedr.log('debug', "Feedr is writing [" + feedDetails.url + "] to [" + feedDetails.path + "], write completed");
return complete(err, data);
});
writeTasks.addTask(function(complete) {
return safefs.writeFile(feedDetails.metaPath, JSON.stringify(response.headers), complete);
writeTasks.addTask('store the meta data in a cache somewhere', function(complete) {
var writeData;
writeData = JSON.stringify(response.headers);
return safefs.writeFile(feedDetails.metaPath, writeData, complete);
});
writeTasks.addTask(function(complete) {
var rawData;
writeTasks.addTask('store the parsed data in a cache somewhere', function(complete) {
var writeData;
if (feedDetails.parse) {
rawData = JSON.stringify(data);
writeData = JSON.stringify(data);
} else {
rawData = data;
writeData = data;
}
return safefs.writeFile(feedDetails.path, rawData, complete);
return safefs.writeFile(feedDetails.path, writeData, complete);
});

@@ -282,3 +298,3 @@ return writeTasks.run();

});
readTasks.addTask(function(complete) {
readTasks.addTask('read the meta data in a cache somewhere', function(complete) {
return parseFile(feedDetails.metaPath, function(err, result) {

@@ -292,3 +308,3 @@ if (err || !result) {

});
readTasks.addTask(function(complete) {
readTasks.addTask('read the parsed data in a cache somewhere', function(complete) {
return readFile(feedDetails.path, function(err, rawData) {

@@ -315,3 +331,3 @@ if (err || !rawData) {

var _base, _ref1;
feedr.log('debug', "Feedr is fetching [" + feedDetails.url + "] to [" + feedDetails.path + "]");
feedr.log('debug', "Feedr is fetching [" + feedDetails.url + "] to [" + feedDetails.path + "], requesting");
if (useCache && ((_ref1 = feedDetails.metaData) != null ? _ref1.etag : void 0)) {

@@ -324,3 +340,5 @@ if ((_base = requestOptions.headers)['If-None-Match'] == null) {

var handleError, handleSuccess, parser, xml2js;
feedr.log('debug', "Feedr is fetching [" + feedDetails.url + "] to [" + feedDetails.path + "], requested");
handleError = function(err) {
feedr.log('debug', "Feedr is fetching [" + feedDetails.url + "] to [" + feedDetails.path + "], error", err);
if (useCache) {

@@ -332,2 +350,3 @@ return viaCache(next);

handleSuccess = function(data) {
feedr.log('debug', "Feedr is fetching [" + feedDetails.url + "] to [" + feedDetails.path + "], requested, checking");
return feedDetails.checkResponse(response, data, function(err) {

@@ -334,0 +353,0 @@ if (err) {

{
"title": "Feedr",
"name": "feedr",
"version": "2.7.5",
"version": "2.7.6",
"description": "Feedr takes in a remote feed (regardless of format type) and converts it into JSON data",

@@ -15,3 +15,5 @@ "homepage": "http://bevry.me/project/feedr",

"flattr": "344188/balupton-on-Flattr",
"paypal": "QB8GQPZAH84N6"
"paypal": "QB8GQPZAH84N6",
"david": true,
"daviddev": true
},

@@ -45,3 +47,3 @@ "keywords": [

"dependencies": {
"safefs": "~3.0.1",
"safefs": "~3.1.0",
"safeps": "~2.2.6",

@@ -53,3 +55,3 @@ "eachr": "~2.0.2",

"xml2js": "~0.2.4",
"request": "~2.27.0",
"request": "~2.30.0",
"yamljs": "~0.1.4",

@@ -63,3 +65,3 @@ "cson": "~1.4.4"

"chai": "~1.8.0",
"projectz": "~0.2.5"
"projectz": "~0.3.5"
},

@@ -66,0 +68,0 @@ "main": "./out/lib/feedr.js",

@@ -12,2 +12,4 @@ <!-- TITLE/ -->

[![NPM version](http://badge.fury.io/js/feedr.png)](https://npmjs.org/package/feedr "View this project on NPM")
[![Dependency Status](https://david-dm.org/bevry/feedr.png)](https://david-dm.org/bevry/feedr)
[![Development Dependency Status](https://david-dm.org/bevry/feedr/dev-status.png)](https://david-dm.org/bevry/feedr#info=devDependencies)
[![Gittip donate button](http://img.shields.io/gittip/bevry.png)](https://www.gittip.com/bevry/ "Donate weekly to this project using Gittip")

@@ -31,10 +33,6 @@ [![Flattr donate button](http://img.shields.io/flattr/donate.png?color=yellow)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")

### [Node](http://nodejs.org/), [Browserify](http://browserify.org/)
### [Node](http://nodejs.org/)
- Use: `require('feedr')`
- Install: `npm install --save feedr`
### [Ender](http://ender.jit.su/)
- Use: `require('feedr')`
- Install: `ender add feedr`
<!-- /INSTALL -->

@@ -98,3 +96,3 @@

## History
[Discover the change history by heading on over to the `History.md` file.](https://github.com/bevry/feedr/blob/master/History.md#files)
[Discover the change history by heading on over to the `HISTORY.md` file.](https://github.com/bevry/feedr/blob/master/HISTORY.md#files)

@@ -108,3 +106,3 @@ <!-- /HISTORY -->

[Discover how you can contribute by heading on over to the `Contributing.md` file.](https://github.com/bevry/feedr/blob/master/Contributing.md#files)
[Discover how you can contribute by heading on over to the `CONTRIBUTING.md` file.](https://github.com/bevry/feedr/blob/master/CONTRIBUTING.md#files)

@@ -136,5 +134,5 @@ <!-- /CONTRIBUTE -->

- Benjamin Lupton <b@lupton.cc> (https://github.com/balupton) - [view contributions](https://github.com/bevry/feedr/commits?author=balupton)
- [Benjamin Lupton](https://github.com/balupton) <b@lupton.cc> — [view contributions](https://github.com/bevry/feedr/commits?author=balupton)
[Become a contributor!](https://github.com/bevry/feedr/blob/master/Contributing.md#files)
[Become a contributor!](https://github.com/bevry/feedr/blob/master/CONTRIBUTING.md#files)

@@ -141,0 +139,0 @@ <!-- /BACKERS -->

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc