sitemap-stream-parser
Advanced tools
Comparing version 1.2.2 to 1.3.0
21
index.js
@@ -1,4 +0,4 @@ | ||
// Generated by CoffeeScript 1.10.0 | ||
// Generated by CoffeeScript 1.12.7 | ||
(function() { | ||
var agentOptions, async, domain, headers, request, sax, sitemapParser, zlib, | ||
var SitemapParser, agentOptions, async, headers, request, sax, urlParser, zlib, | ||
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | ||
@@ -14,3 +14,3 @@ | ||
domain = require('domain'); | ||
urlParser = require('url'); | ||
@@ -31,4 +31,4 @@ headers = { | ||
sitemapParser = (function() { | ||
function sitemapParser(url_cb1, sitemap_cb1) { | ||
SitemapParser = (function() { | ||
function SitemapParser(url_cb1, sitemap_cb1) { | ||
this.url_cb = url_cb1; | ||
@@ -40,3 +40,3 @@ this.sitemap_cb = sitemap_cb1; | ||
sitemapParser.prototype._download = function(url, parserStream) { | ||
SitemapParser.prototype._download = function(url, parserStream) { | ||
var unzip; | ||
@@ -57,3 +57,3 @@ if (url.lastIndexOf('gz') === url.length - 2) { | ||
sitemapParser.prototype.parse = function(url, done) { | ||
SitemapParser.prototype.parse = function(url, done) { | ||
var inLoc, isSitemapIndex, isURLSet, parserStream; | ||
@@ -87,2 +87,3 @@ isURLSet = false; | ||
return function(text) { | ||
text = urlParser.resolve(url, text); | ||
if (inLoc) { | ||
@@ -109,3 +110,3 @@ if (isURLSet) { | ||
return sitemapParser; | ||
return SitemapParser; | ||
@@ -116,3 +117,3 @@ })(); | ||
var parser; | ||
parser = new sitemapParser(url_cb, sitemap_cb); | ||
parser = new SitemapParser(url_cb, sitemap_cb); | ||
return parser.parse(url, done); | ||
@@ -126,3 +127,3 @@ }; | ||
} | ||
parser = new sitemapParser(url_cb, function(sitemap) { | ||
parser = new SitemapParser(url_cb, function(sitemap) { | ||
return queue.push(sitemap); | ||
@@ -129,0 +130,0 @@ }); |
{ | ||
"name": "sitemap-stream-parser", | ||
"version": "1.2.2", | ||
"version": "1.3.0", | ||
"description": "Get a list of URLs from one or more sitemaps", | ||
@@ -13,2 +13,5 @@ "main": "index.js", | ||
], | ||
"bin": { | ||
"sitemap-stream-parser": "cli.js" | ||
}, | ||
"scripts": { | ||
@@ -21,2 +24,3 @@ "prepublish": "coffee -c index.coffee" | ||
"async": "^1.5.0", | ||
"commander": "^2.11.0", | ||
"request": "^2.67.0", | ||
@@ -30,4 +34,4 @@ "sax": "^1.1.4" | ||
"devDependencies": { | ||
"coffee-script": "^1.10.0" | ||
"coffeescript": "^1.10.0" | ||
} | ||
} |
@@ -26,3 +26,3 @@ # node-sitemap-stream-parser | ||
all_urls = [] | ||
sitemaps.parseSitemaps(urls, function(url) { all_urls.push[url] });, function(err, sitemaps) { | ||
sitemaps.parseSitemaps(urls, function(url) { all_urls.push(url) });, function(err, sitemaps) { | ||
console.log(all_urls); | ||
@@ -44,2 +44,2 @@ console.log('All done!'); | ||
} | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
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
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
31562
7
172
44
4
1
+ Addedcommander@^2.11.0
+ Addedcommander@2.20.3(transitive)