jobs fix, reverted

This commit is contained in:
Martin Donnelly 2017-09-11 11:34:45 +01:00
parent 17166c74a4
commit b61e60cd5e
19 changed files with 1973 additions and 2260 deletions

22
.eslintrc Normal file
View File

@ -0,0 +1,22 @@
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"sourceType": "module"
},
"rules": {
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn",
"indent": [2, 2, {SwitchCase: 1}]
}
}

File diff suppressed because it is too large Load Diff

202
fixer.js Normal file
View File

@ -0,0 +1,202 @@
const querystring = require('querystring');
let list = [
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.JobServe.com/MySearch/EDF47BEA6B31EF.rss"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.JobServe.com/MySearch/3CAD044BEF2BFA.rss"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.JobServe.com/MySearch/C7B25D86D0844A.rss"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.JobServe.com/MySearch/64A3EEF615FA4C.rss"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=21564698"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=21564712"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=21942123"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=33166238"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=34888173"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/m7dp711z2r.xml"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/pfvf7o7z2r.xml"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/lluqnt8z2r.xml"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/tu33qt8z2r.xml"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/u3btnz8z2r.xml"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.purelyit.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=33256062"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.purelyit.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=33450169"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.purelyit.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=34517029"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.purelyit.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=34888105"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.technojobs.co.uk/rss.php/glasgow/searchtypeand/locationScotland/sortbyrelevant/jobtypeall"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobserve.com/MySearch/6FC7E9ED5F042ECB.rss"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html,%20asp,%20web,%20sql,%20delphi,%20vb,%20vbscript,%20php,%20ajax,%20mysql,%20sqlserver,%20javascript,%20intranet,%20vmware,%20virtulization&location_include=Abu%20Dhabi&compare_resolved=RE_ABUDHABI_UNITEDARABEMIRATES&compare_search=Abu%20Dhabi&jobtype=X&search_emp_mkt_cd=ALL"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_include=London&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&compare_resolved=CO_LONDON&compare_search=London&search_emp_mkt_cd=ALL"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_include=Glasgow&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&compare_resolved=TO_G1_GLASGOW&compare_search=Glasgow&search_emp_mkt_cd=ALL"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&search_emp_mkt_cd=ALL"
} ,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_include=Germany&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&compare_resolved=CY_GERMANY&compare_search=Germany&search_emp_mkt_cd=ALL"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/b1d7e6c3a9a11964z3r.xml"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/b1d7e6c3a9a11964z3r.xml"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobisjob.co.uk/rss?what=web+developer+javascript&where=glasgow&jobType=Contract"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobisjob.co.uk/rss?what=javascript&where=glasgow&jobType=Contract"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobisjob.co.uk/rss?what=asp&where=glasgow&jobType=Contract%2Ftemp"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobserve.com/MySearch/CA49421A86CA3F74.rss"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/ddeded091b6f6d33z3r.xml"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/3eafc1ea20f1ca02z3r.xml"
}
];
let newArray = list.map((item) => {
let encoded = querystring.escape(item.feed_url);
console.log(encoded);
return {count:item.count, 'feed_url' : `http://52.211.105.9:6566/${encoded}`}
});
console.log(JSON.stringify(newArray));

View File

@ -1,222 +1,107 @@
var outputFile = 'jobs-local',
RssBraider = require('rss-braider'),
fs = require('fs'),
ejs = require('ejs'),
read = require('fs').readFileSync,
join = require('path').join,
str = read(join(__dirname, '/templates/rss.ejs'), 'utf8'),
feeds = {};
RssBraider = require('rss-braider'),
fs = require('fs'),
ejs = require('ejs'),
read = require('fs').readFileSync,
join = require('path').join,
str = read(join(__dirname, '/templates/rss.ejs'), 'utf8'),
feeds = {};
// Pull feeds from config files:
// feeds.simple_test_feed = require("./config/feed").feed;
// Or define in-line
feeds.simple_test_feed = {
"feed_name" : "feed",
"default_count" : 1,
"no_cdata_fields" : [], // Don't wrap these fields in CDATA tags
"plugins" : ['filter_today_only' ],
"meta" : {
"title": "Jobs",
"description": "Combined Jobs Feed",
'site_url':'http://pipes.silvrtree.co.uk/jobs-local.xml'
},
"sources" : [
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.JobServe.com/MySearch/EDF47BEA6B31EF.rss"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.JobServe.com/MySearch/3CAD044BEF2BFA.rss"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.JobServe.com/MySearch/C7B25D86D0844A.rss"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.JobServe.com/MySearch/64A3EEF615FA4C.rss"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=21564698"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=21564712"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=21942123"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=33166238"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=34888173"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/m7dp711z2r.xml"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/pfvf7o7z2r.xml"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/lluqnt8z2r.xml"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/tu33qt8z2r.xml"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/u3btnz8z2r.xml"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.purelyit.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=33256062"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.purelyit.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=33450169"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.purelyit.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=34517029"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.purelyit.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=34888105"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.technojobs.co.uk/rss.php/glasgow/searchtypeand/locationScotland/sortbyrelevant/jobtypeall"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobserve.com/MySearch/6FC7E9ED5F042ECB.rss"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html,%20asp,%20web,%20sql,%20delphi,%20vb,%20vbscript,%20php,%20ajax,%20mysql,%20sqlserver,%20javascript,%20intranet,%20vmware,%20virtulization&location_include=Abu%20Dhabi&compare_resolved=RE_ABUDHABI_UNITEDARABEMIRATES&compare_search=Abu%20Dhabi&jobtype=X&search_emp_mkt_cd=ALL"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_include=London&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&compare_resolved=CO_LONDON&compare_search=London&search_emp_mkt_cd=ALL"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_include=Glasgow&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&compare_resolved=TO_G1_GLASGOW&compare_search=Glasgow&search_emp_mkt_cd=ALL"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&search_emp_mkt_cd=ALL"
} ,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_include=Germany&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&compare_resolved=CY_GERMANY&compare_search=Germany&search_emp_mkt_cd=ALL"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/b1d7e6c3a9a11964z3r.xml"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/b1d7e6c3a9a11964z3r.xml"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobisjob.co.uk/rss?what=web+developer+javascript&where=glasgow&jobType=Contract"
}
,
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobisjob.co.uk/rss?what=javascript&where=glasgow&jobType=Contract"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobisjob.co.uk/rss?what=asp&where=glasgow&jobType=Contract%2Ftemp"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.jobserve.com/MySearch/CA49421A86CA3F74.rss"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/ddeded091b6f6d33z3r.xml"
},
{
/* "name" : "JobServe",*/
"count" : 100,
"feed_url" : "http://www.s1jobs.com/xml/3eafc1ea20f1ca02z3r.xml"
}
]
'feed_name': 'feed',
'default_count': 1,
'no_cdata_fields': [], // Don't wrap these fields in CDATA tags
'plugins': ['filter_today_only'],
'meta': {
'title': 'Jobs',
'description': 'Combined Jobs Feed',
'site_url': 'http://pipes.silvrtree.co.uk/jobs-local.xml'
},
'sources': [{
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.JobServe.com%2FMySearch%2FEDF47BEA6B31EF.rss'
}, {'count': 100, 'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.JobServe.com%2FMySearch%2F3CAD044BEF2BFA.rss'}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.JobServe.com%2FMySearch%2FC7B25D86D0844A.rss'
}, {'count': 100, 'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.JobServe.com%2FMySearch%2F64A3EEF615FA4C.rss'}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobsite.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26daysback%3D1%26jbe_id%3D21564698'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobsite.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26daysback%3D1%26jbe_id%3D21564712'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobsite.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26daysback%3D1%26jbe_id%3D21942123'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobsite.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26daysback%3D1%26jbe_id%3D33166238'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobsite.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26daysback%3D1%26jbe_id%3D34888173'
}, {'count': 100, 'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.s1jobs.com%2Fxml%2Fm7dp711z2r.xml'}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.s1jobs.com%2Fxml%2Fpfvf7o7z2r.xml'
}, {'count': 100, 'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.s1jobs.com%2Fxml%2Flluqnt8z2r.xml'}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.s1jobs.com%2Fxml%2Ftu33qt8z2r.xml'
}, {'count': 100, 'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.s1jobs.com%2Fxml%2Fu3btnz8z2r.xml'}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.purelyit.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26daysback%3D1%26jbe_id%3D33256062'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.purelyit.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26daysback%3D1%26jbe_id%3D33450169'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.purelyit.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26daysback%3D1%26jbe_id%3D34517029'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.purelyit.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26daysback%3D1%26jbe_id%3D34888105'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.technojobs.co.uk%2Frss.php%2Fglasgow%2Fsearchtypeand%2FlocationScotland%2Fsortbyrelevant%2Fjobtypeall'
}, {'count': 100, 'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobserve.com%2FMySearch%2F6FC7E9ED5F042ECB.rss'}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobsite.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26skill_atleast%3Dhtml%2C%2520asp%2C%2520web%2C%2520sql%2C%2520delphi%2C%2520vb%2C%2520vbscript%2C%2520php%2C%2520ajax%2C%2520mysql%2C%2520sqlserver%2C%2520javascript%2C%2520intranet%2C%2520vmware%2C%2520virtulization%26location_include%3DAbu%2520Dhabi%26compare_resolved%3DRE_ABUDHABI_UNITEDARABEMIRATES%26compare_search%3DAbu%2520Dhabi%26jobtype%3DX%26search_emp_mkt_cd%3DALL'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobsite.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26skill_atleast%3Dhtml%2520%2C%2520asp%2520%2C%2520web%2520%2C%2520sql%2520%2C%2520delphi%2520%2C%2520vb%2520%2C%2520vbscript%2520%2C%2520php%2520%2C%2520ajax%2520%2C%2520mysql%2520%2C%2520sqlserver%2520%2C%2520javascript%2520%2C%2520intranet%2520%2C%2520vmware%2520%2C%2520virtulization%26location_include%3DLondon%26location_within%3D10%26reqd_salary%3DANY%7C%26daysback%3D7%26scc%3DUK%26compare_resolved%3DCO_LONDON%26compare_search%3DLondon%26search_emp_mkt_cd%3DALL'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobsite.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26skill_atleast%3Dhtml%2520%2C%2520asp%2520%2C%2520web%2520%2C%2520sql%2520%2C%2520delphi%2520%2C%2520vb%2520%2C%2520vbscript%2520%2C%2520php%2520%2C%2520ajax%2520%2C%2520mysql%2520%2C%2520sqlserver%2520%2C%2520javascript%2520%2C%2520intranet%2520%2C%2520vmware%2520%2C%2520virtulization%26location_include%3DGlasgow%26location_within%3D10%26reqd_salary%3DANY%7C%26daysback%3D7%26scc%3DUK%26compare_resolved%3DTO_G1_GLASGOW%26compare_search%3DGlasgow%26search_emp_mkt_cd%3DALL'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobsite.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26skill_atleast%3Dhtml%2520%2C%2520asp%2520%2C%2520web%2520%2C%2520sql%2520%2C%2520delphi%2520%2C%2520vb%2520%2C%2520vbscript%2520%2C%2520php%2520%2C%2520ajax%2520%2C%2520mysql%2520%2C%2520sqlserver%2520%2C%2520javascript%2520%2C%2520intranet%2520%2C%2520vmware%2520%2C%2520virtulization%26location_within%3D10%26reqd_salary%3DANY%7C%26daysback%3D7%26scc%3DUK%26search_emp_mkt_cd%3DALL'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobsite.co.uk%2Fcgi-bin%2Fadvsearch%3Frss_feed%3D1%26skill_atleast%3Dhtml%2520%2C%2520asp%2520%2C%2520web%2520%2C%2520sql%2520%2C%2520delphi%2520%2C%2520vb%2520%2C%2520vbscript%2520%2C%2520php%2520%2C%2520ajax%2520%2C%2520mysql%2520%2C%2520sqlserver%2520%2C%2520javascript%2520%2C%2520intranet%2520%2C%2520vmware%2520%2C%2520virtulization%26location_include%3DGermany%26location_within%3D10%26reqd_salary%3DANY%7C%26daysback%3D7%26scc%3DUK%26compare_resolved%3DCY_GERMANY%26compare_search%3DGermany%26search_emp_mkt_cd%3DALL'
}, {'count': 100, 'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.s1jobs.com%2Fxml%2Fb1d7e6c3a9a11964z3r.xml'}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.s1jobs.com%2Fxml%2Fb1d7e6c3a9a11964z3r.xml'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobisjob.co.uk%2Frss%3Fwhat%3Dweb%2Bdeveloper%2Bjavascript%26where%3Dglasgow%26jobType%3DContract'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobisjob.co.uk%2Frss%3Fwhat%3Djavascript%26where%3Dglasgow%26jobType%3DContract'
}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobisjob.co.uk%2Frss%3Fwhat%3Dasp%26where%3Dglasgow%26jobType%3DContract%252Ftemp'
}, {'count': 100, 'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.jobserve.com%2FMySearch%2FCA49421A86CA3F74.rss'}, {
'count': 100,
'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.s1jobs.com%2Fxml%2Fddeded091b6f6d33z3r.xml'
}, {'count': 100, 'feed_url': 'http://52.211.105.9:6566/http%3A%2F%2Fwww.s1jobs.com%2Fxml%2F3eafc1ea20f1ca02z3r.xml'}]
};
var braider_options = {
feeds: feeds,
indent: " ",
date_sort_order: "desc", // Newest first
log_level: "warn",
dedupe_fields: ['link', 'guid'],
plugins_directories : [__dirname + "/plugins/"]
feeds: feeds,
indent: ' ',
date_sort_order: 'desc', // Newest first
log_level: 'warn',
dedupe_fields: ['link', 'guid'],
plugins_directories: [__dirname + '/plugins/']
};
var rss_braider = RssBraider.createClient(braider_options);
@ -224,41 +109,41 @@ var rss_braider = RssBraider.createClient(braider_options);
rss_braider.logger.level('error');
rss_braider.processFeed('simple_test_feed', 'json', function (err, data) {
if (err) {
return console.log(err);
}
var j = JSON.parse(data);
var ejsOutput = ejs.compile(str)(j);
fs.writeFile(__dirname + '/dist/' + outputFile + '.html', ejsOutput, function (err) {
if (err) {
return console.log(err);
return console.log(err);
}
var j = JSON.parse(data);
var ejsOutput = ejs.compile(str)(j);
console.log('The file was saved!');
});
fs.writeFile(__dirname + "/dist/" + outputFile + ".html", ejsOutput, function (err) {
fs.writeFile(__dirname + '/dist/' + outputFile + '.json', data, function (err) {
if (err) {
logger.error(err);
return console.log(err);
}
if (err) {
return console.log(err);
}
console.log("The file was saved!");
});
fs.writeFile(__dirname + "/dist/" + outputFile + ".json", data, function (err) {
if (err) {
logger.error(err);
return console.log(err);
}
console.log("The file was saved!");
});
console.log('The file was saved!');
});
});
rss_braider.processFeed('simple_test_feed', 'rss', function (err, data) {
if (err) {
return console.log(err);
}
fs.writeFile(__dirname + '/dist/' + outputFile + '.xml', data, function (err) {
if (err) {
return console.log(err);
return console.log(err);
}
fs.writeFile(__dirname + "/dist/" + outputFile + ".xml", data, function (err) {
if (err) {
return console.log(err);
}
console.log("The file was saved!");
});
console.log('The file was saved!');
});
});

View File

@ -23,6 +23,11 @@ feeds.simple_test_feed = {
'site_url': 'http://pipes.silvrtree.co.uk/jobs-special.xml'
}, "sources": [
/*{
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=47820652"
} ,*/
{
@ -49,6 +54,31 @@ feeds.simple_test_feed = {
"count": 100,
"feed_url": "http://www.JobServe.com/MySearch/64A3EEF615FA4C.rss"
},
{
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=21564698"
},
{
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=21564712"
},
{
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=21942123"
},
{
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=33166238"
},
{
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=34888173"
},
{
"count": 100,
@ -94,11 +124,41 @@ feeds.simple_test_feed = {
"count": 100,
"feed_url": "http://www.purelyit.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=34888105"
},
{
"count": 100,
"feed_url": "http://www.technojobs.co.uk/rss.php/glasgow/searchtypeand/locationScotland/sortbyrelevant/jobtypeall"
},
{
"count": 100,
"feed_url": "http://www.jobserve.com/MySearch/6FC7E9ED5F042ECB.rss"
},
{
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html,%20asp,%20web,%20sql,%20delphi,%20vb,%20vbscript,%20php,%20ajax,%20mysql,%20sqlserver,%20javascript,%20intranet,%20vmware,%20virtulization&location_include=Abu%20Dhabi&compare_resolved=RE_ABUDHABI_UNITEDARABEMIRATES&compare_search=Abu%20Dhabi&jobtype=X&search_emp_mkt_cd=ALL"
},
{
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_include=London&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&compare_resolved=CO_LONDON&compare_search=London&search_emp_mkt_cd=ALL"
},
{
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_include=Glasgow&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&compare_resolved=TO_G1_GLASGOW&compare_search=Glasgow&search_emp_mkt_cd=ALL"
},
{
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&search_emp_mkt_cd=ALL"
},
{
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_include=Germany&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&compare_resolved=CY_GERMANY&compare_search=Germany&search_emp_mkt_cd=ALL"
},
{
"count": 100,
@ -123,7 +183,7 @@ feeds.simple_test_feed = {
"count": 100,
"feed_url": "http://www.s1jobs.com/xml/3eafc1ea20f1ca02z3r.xml"
}
}*/
]
};

79
node_modules/ejs/Jakefile generated vendored
View File

@ -1,12 +1,10 @@
var fs = require('fs');
var execSync = require('child_process').execSync;
var exec = function (cmd) {
execSync(cmd, {stdio: 'inherit'});
};
var fs = require('fs')
, buildOpts = {
printStdout: true
, printStderr: true
};
/* global jake, task, desc, publishTask */
task('build', ['lint', 'clean', 'browserify', 'minify'], function () {
task('build', ['browserify', 'minify'], function () {
console.log('Build completed.');
});
@ -14,58 +12,35 @@ desc('Cleans browerified/minified files and package files');
task('clean', ['clobber'], function () {
jake.rmRf('./ejs.js');
jake.rmRf('./ejs.min.js');
console.log('Cleaned up compiled files.');
});
desc('Lints the source code');
task('lint', function () {
exec('./node_modules/.bin/eslint \"**/*.js\" Jakefile');
console.log('Linting completed.');
task('browserify', {async: true}, function () {
jake.exec('./node_modules/browserify/bin/cmd.js lib/ejs.js > ejs.js',
buildOpts, function () {
console.log('Browserification completed.');
setTimeout(complete, 0);
});
});
task('browserify', function () {
exec('./node_modules/browserify/bin/cmd.js --standalone ejs lib/ejs.js > ejs.js');
console.log('Browserification completed.');
});
task('minify', function () {
exec('./node_modules/uglify-js/bin/uglifyjs ejs.js > ejs.min.js');
console.log('Minification completed.');
});
task('doc', function (dev) {
jake.rmRf('out');
var p = dev ? '-p' : '';
exec('./node_modules/.bin/jsdoc ' + p + ' -c jsdoc.json lib/* docs/jsdoc/*');
console.log('Documentation generated.');
});
task('docPublish', ['doc'], function () {
fs.writeFileSync('out/CNAME', 'api.ejs.co');
console.log('Pushing docs to gh-pages...');
exec('./node_modules/.bin/git-directory-deploy --directory out/');
console.log('Docs published to gh-pages.');
});
task('test', ['lint'], function () {
exec('./node_modules/.bin/mocha');
task('minify', {async: true}, function () {
jake.exec('./node_modules/uglify-js/bin/uglifyjs ejs.js > ejs.min.js',
buildOpts, function () {
console.log('Minification completed.');
setTimeout(complete, 0);
});
});
publishTask('ejs', ['build'], function () {
this.packageFiles.include([
'Jakefile',
'README.md',
'LICENSE',
'package.json',
'ejs.js',
'ejs.min.js',
'lib/**',
'test/**'
'Jakefile'
, 'README.md'
, 'LICENSE'
, 'package.json'
, 'ejs.js'
, 'ejs.min.js'
, 'lib/**'
, 'test/**'
]);
});
jake.Task.publish.on('complete', function () {
console.log('Updating hosted docs...');
console.log('If this fails, run jake docPublish to re-try.');
jake.Task.docPublish.invoke();
});

53
node_modules/ejs/README.md generated vendored
View File

@ -3,7 +3,7 @@
Embedded JavaScript templates
[![Build Status](https://img.shields.io/travis/mde/ejs/master.svg?style=flat)](https://travis-ci.org/mde/ejs)
[![Developing Dependencies](https://img.shields.io/david/dev/mde/ejs.svg?style=flat)](https://david-dm.org/mde/ejs?type=dev)
[![Developing Dependencies](https://img.shields.io/david/dev/mde/ejs.svg?style=flat)](https://david-dm.org/mde/ejs#info=devDependencies)
## Installation
@ -18,7 +18,7 @@ $ npm install ejs
* Unescaped raw output with `<%- %>`
* Newline-trim mode ('newline slurping') with `-%>` ending tag
* Whitespace-trim mode (slurp all whitespace) for control flow with `<%_ _%>`
* Custom delimiters (e.g., use `<? ?>` instead of `<% %>`)
* Custom delimiters (e.g., use '<? ?>' instead of '<% %>')
* Includes
* Client-side support
* Static caching of intermediate JavaScript
@ -33,8 +33,6 @@ $ npm install ejs
<% } %>
```
Try EJS online at: https://ionicabizau.github.io/ejs-playground/.
## Usage
```javascript
@ -52,20 +50,19 @@ ejs.renderFile(filename, data, options, function(err, str){
It is also possible to use `ejs.render(dataAndOptions);` where you pass
everything in a single object. In that case, you'll end up with local variables
for all the passed options. However, be aware that your code could break if we
for all the passed options. However, be aware that your code could break if we
add an option with the same name as one of your data object's properties.
Therefore, we do not recommend using this shortcut.
## Options
- `cache` Compiled functions are cached, requires `filename`
- `filename` The name of the file being rendered. Not required if you
- `filename` The name of the file being rendered. Not required if you
are using `renderFile()`. Used by `cache` to key caches, and for includes.
- `root` Set project root for includes with an absolute path (/file.ejs).
- `context` Function execution context
- `compileDebug` When `false` no debug instrumentation is compiled
- `client` When `true`, compiles a function that can be rendered
in the browser without needing to load the EJS Runtime
- `client` When `true`, compiles a function that can be rendered
in the browser without needing to load the EJS Runtime
([ejs.min.js](https://github.com/mde/ejs/releases/latest)).
- `delimiter` Character to use with angle brackets for open/close
- `debug` Output generated function body
@ -79,9 +76,9 @@ Therefore, we do not recommend using this shortcut.
- `escape` The escaping function used with `<%=` construct. It is
used in rendering and is `.toString()`ed in the generation of client functions. (By default escapes XML).
This project uses [JSDoc](http://usejsdoc.org/). For the full public API
documentation, clone the repository and run `npm run doc`. This will run JSDoc
with the proper options and output the documentation to `out/`. If you want
This project uses [JSDoc](http://usejsdoc.org/). For the full public API
documentation, clone the repository and run `npm run doc`. This will run JSDoc
with the proper options and output the documentation to `out/`. If you want
the both the public & private API docs, run `npm run devdoc` instead.
## Tags
@ -92,7 +89,6 @@ the both the public & private API docs, run `npm run devdoc` instead.
- `<%-` Outputs the unescaped value into the template
- `<%#` Comment tag, no execution, no output
- `<%%` Outputs a literal '<%'
- `%%>` Outputs a literal '%>'
- `%>` Plain ending tag
- `-%>` Trim-mode ('newline slurp') tag, trims following newline
- `_%>` 'Whitespace Slurping' ending tag, removes all whitespace after it
@ -102,11 +98,11 @@ For the full syntax documentation, please see [docs/syntax.md](https://github.co
## Includes
Includes either have to be an absolute path, or, if not, are assumed as
relative to the template with the `include` call. For example if you are
including `./views/user/show.ejs` from `./views/users.ejs` you would
relative to the template with the `include` call. For example if you are
including `./views/user/show.ejs` from `./views/users.ejs` you would
use `<%- include('user/show') %>`.
You must specify the `filename` option for the template with the `include`
You must specify the `filename` option for the template with the `include`
call unless you are using `renderFile()`.
You'll likely want to use the raw output tag (`<%-`) with your include to avoid
@ -162,21 +158,6 @@ If you want to clear the EJS cache, call `ejs.clearCache`. If you're using the
LRU cache and need a different limit, simple reset `ejs.cache` to a new instance
of the LRU.
## Custom FileLoader
The default file loader is `fs.readFileSync`, if you want to customize it, you can set ejs.fileLoader.
```javascript
var ejs = require('ejs');
var myFileLoad = function (filePath) {
return 'myFileLoad: ' + fs.readFileSync(filePath);
};
ejs.fileLoader = myFileLoad;
```
With this feature, you can preprocess the template before reading it.
## Layouts
EJS does not specifically support blocks, but layouts can be implemented by
@ -197,8 +178,8 @@ including headers and footers, like so:
## Client-side support
Go to the [Latest Release](https://github.com/mde/ejs/releases/latest), download
`./ejs.js` or `./ejs.min.js`. Alternately, you can compile it yourself by cloning
the repository and running `jake build` (or `$(npm bin)/jake build` if jake is
`./ejs.js` or `./ejs.min.js`. Alternately, you can compile it yourself by cloning
the repository and running `jake build` (or `$(npm bin)/jake build` if jake is
not installed globally).
Include one of these files on your page, and `ejs` should be available globally.
@ -227,11 +208,11 @@ Most of EJS will work as expected; however, there are a few things to note:
```javascript
var str = "Hello <%= include('file', {person: 'John'}); %>",
fn = ejs.compile(str, {client: true});
fn(data, null, function(path, d){ // IncludeCallback
// path -> 'file'
// d -> {person: 'John'}
// Put your code here
// Put your code here
// Return the contents of file as a string
}); // returns rendered string
```
@ -254,3 +235,5 @@ Licensed under the Apache License, Version 2.0
- - -
EJS Embedded JavaScript templates copyright 2112
mde@fleegix.org.

780
node_modules/ejs/ejs.js generated vendored

File diff suppressed because it is too large Load Diff

2
node_modules/ejs/ejs.min.js generated vendored

File diff suppressed because one or more lines are too long

566
node_modules/ejs/lib/ejs.js generated vendored
View File

@ -19,7 +19,7 @@
'use strict';
/**
* @file Embedded JavaScript templating engine. {@link http://ejs.co}
* @file Embedded JavaScript templating engine.
* @author Matthew Eernisse <mde@fleegix.org>
* @author Tiancheng "Timothy" Gu <timothygu99@gmail.com>
* @project EJS
@ -44,23 +44,19 @@
* @public
*/
var fs = require('fs');
var path = require('path');
var utils = require('./utils');
var scopeOptionWarned = false;
var _VERSION_STRING = require('../package.json').version;
var _DEFAULT_DELIMITER = '%';
var _DEFAULT_LOCALS_NAME = 'locals';
var _NAME = 'ejs';
var _REGEX_STRING = '(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)';
var _OPTS = ['delimiter', 'scope', 'context', 'debug', 'compileDebug',
'client', '_with', 'rmWhitespace', 'strict', 'filename'];
// We don't allow 'cache' option to be passed in the data obj
// for the normal `render` call, but this is where Express puts it
// so we make an exception for `renderFile`
var _OPTS_EXPRESS = _OPTS.concat('cache');
var _BOM = /^\uFEFF/;
var fs = require('fs')
, utils = require('./utils')
, scopeOptionWarned = false
, _VERSION_STRING = require('../package.json').version
, _DEFAULT_DELIMITER = '%'
, _DEFAULT_LOCALS_NAME = 'locals'
, _REGEX_STRING = '(<%%|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)'
, _OPTS = [ 'cache', 'filename', 'delimiter', 'scope', 'context'
, 'debug', 'compileDebug', 'client', '_with', 'rmWhitespace'
, 'strict', 'localsName'
]
, _TRAILING_SEMCOL = /;\s*$/
, _BOM = /^\uFEFF/;
/**
* EJS template function cache. This can be a LRU object from lru-cache NPM
@ -72,19 +68,10 @@ var _BOM = /^\uFEFF/;
exports.cache = utils.cache;
/**
* Custom file loader. Useful for template preprocessing or restricting access
* to a certain part of the filesystem.
*
* @type {fileLoader}
*/
exports.fileLoader = fs.readFileSync;
/**
* Name of the object containing the locals.
*
* This variable is overridden by {@link Options}`.localsName` if it is not
* This variable is overriden by {@link Options}`.localsName` if it is not
* `undefined`.
*
* @type {String}
@ -97,44 +84,24 @@ exports.localsName = _DEFAULT_LOCALS_NAME;
* Get the path to the included file from the parent file path and the
* specified path.
*
* @param {String} name specified path
* @param {String} filename parent file path
* @param {Boolean} isDir parent file path whether is directory
* @param {String} name specified path
* @param {String} filename parent file path
* @return {String}
*/
exports.resolveInclude = function(name, filename, isDir) {
var dirname = path.dirname;
var extname = path.extname;
var resolve = path.resolve;
var includePath = resolve(isDir ? filename : dirname(filename), name);
var ext = extname(name);
exports.resolveInclude = function(name, filename) {
var path = require('path')
, dirname = path.dirname
, extname = path.extname
, resolve = path.resolve
, includePath = resolve(dirname(filename), name)
, ext = extname(name);
if (!ext) {
includePath += '.ejs';
}
return includePath;
};
/**
* Get the path to the included file by Options
*
* @param {String} path specified path
* @param {Options} options compilation options
* @return {String}
*/
function getIncludePath(path, options){
var includePath;
if (path.charAt(0) == '/') {
includePath = exports.resolveInclude(path.replace(/^\/*/,''), options.root || '/', true);
}
else {
if (!options.filename) {
throw new Error('`include` use relative path requires the \'filename\' option.');
}
includePath = exports.resolveInclude(path, options.filename);
}
return includePath;
}
/**
* Get the template from a string or a file, either compiled on-the-fly or
* read from cache (if enabled), and cache the template if needed.
@ -154,70 +121,35 @@ function getIncludePath(path, options){
*/
function handleCache(options, template) {
var func;
var filename = options.filename;
var hasTemplate = arguments.length > 1;
var fn
, path = options.filename
, hasTemplate = arguments.length > 1;
if (options.cache) {
if (!filename) {
if (!path) {
throw new Error('cache option requires a filename');
}
func = exports.cache.get(filename);
if (func) {
return func;
fn = exports.cache.get(path);
if (fn) {
return fn;
}
if (!hasTemplate) {
template = fileLoader(filename).toString().replace(_BOM, '');
template = fs.readFileSync(path).toString().replace(_BOM, '');
}
}
else if (!hasTemplate) {
// istanbul ignore if: should not happen at all
if (!filename) {
if (!path) {
throw new Error('Internal EJS error: no file name or template '
+ 'provided');
}
template = fileLoader(filename).toString().replace(_BOM, '');
template = fs.readFileSync(path).toString().replace(_BOM, '');
}
func = exports.compile(template, options);
fn = exports.compile(template, options);
if (options.cache) {
exports.cache.set(filename, func);
exports.cache.set(path, fn);
}
return func;
}
/**
* Try calling handleCache with the given options and data and call the
* callback with the result. If an error occurs, call the callback with
* the error. Used by renderFile().
*
* @memberof module:ejs-internal
* @param {Options} options compilation options
* @param {Object} data template data
* @param {RenderFileCallback} cb callback
* @static
*/
function tryHandleCache(options, data, cb) {
var result;
try {
result = handleCache(options)(data);
}
catch (err) {
return cb(err);
}
return cb(null, result);
}
/**
* fileLoader is independent
*
* @param {String} filePath ejs file path.
* @return {String} The contents of the specified file.
* @static
*/
function fileLoader(filePath){
return exports.fileLoader(filePath);
return fn;
}
/**
@ -235,7 +167,10 @@ function fileLoader(filePath){
function includeFile(path, options) {
var opts = utils.shallowCopy({}, options);
opts.filename = getIncludePath(path, opts);
if (!opts.filename) {
throw new Error('`include` requires the \'filename\' option.');
}
opts.filename = exports.resolveInclude(path, opts.filename);
return handleCache(opts);
}
@ -245,24 +180,24 @@ function includeFile(path, options) {
* @memberof module:ejs-internal
* @param {String} path path for the specified file
* @param {Options} options compilation options
* @return {Object}
* @return {String}
* @static
*/
function includeSource(path, options) {
var opts = utils.shallowCopy({}, options);
var includePath;
var template;
includePath = getIncludePath(path, opts);
template = fileLoader(includePath).toString().replace(_BOM, '');
var opts = utils.shallowCopy({}, options)
, includePath
, template;
if (!opts.filename) {
throw new Error('`include` requires the \'filename\' option.');
}
includePath = exports.resolveInclude(path, opts.filename);
template = fs.readFileSync(includePath).toString().replace(_BOM, '');
opts.filename = includePath;
var templ = new Template(template, opts);
templ.generateSource();
return {
source: templ.source,
filename: includePath,
template: template
};
return templ.source;
}
/**
@ -278,11 +213,11 @@ function includeSource(path, options) {
* @static
*/
function rethrow(err, str, flnm, lineno, esc){
var lines = str.split('\n');
var start = Math.max(lineno - 3, 0);
var end = Math.min(lines.length, lineno + 3);
var filename = esc(flnm); // eslint-disable-line
function rethrow(err, str, filename, lineno){
var lines = str.split('\n')
, start = Math.max(lineno - 3, 0)
, end = Math.min(lines.length, lineno + 3);
// Error context
var context = lines.slice(start, end).map(function (line, i){
var curr = i + start + 1;
@ -302,8 +237,24 @@ function rethrow(err, str, flnm, lineno, esc){
throw err;
}
function stripSemi(str){
return str.replace(/;(\s*$)/, '$1');
/**
* Copy properties in data object that are recognized as options to an
* options object.
*
* This is used for compatibility with earlier versions of EJS and Express.js.
*
* @memberof module:ejs-internal
* @param {Object} data data object
* @param {Options} opts options object
* @static
*/
function cpOptsInData(data, opts) {
_OPTS.forEach(function (p) {
if (typeof data[p] != 'undefined') {
opts[p] = data[p];
}
});
}
/**
@ -351,14 +302,15 @@ exports.compile = function compile(template, opts) {
* @public
*/
exports.render = function (template, d, o) {
var data = d || {};
var opts = o || {};
exports.render = function (template, data, opts) {
data = data || {};
opts = opts || {};
var fn;
// No options object -- if there are optiony names
// in the data, copy them to options
if (arguments.length == 2) {
utils.shallowCopyFromList(opts, data, _OPTS);
cpOptsInData(data, opts);
}
return handleCache(opts, template)(data);
@ -378,38 +330,37 @@ exports.render = function (template, d, o) {
*/
exports.renderFile = function () {
var filename = arguments[0];
var cb = arguments[arguments.length - 1];
var opts = {filename: filename};
var data;
var args = Array.prototype.slice.call(arguments)
, path = args.shift()
, cb = args.pop()
, data = args.shift() || {}
, opts = args.pop() || {}
, result;
if (arguments.length > 2) {
data = arguments[1];
// Don't pollute passed in opts obj with new vals
opts = utils.shallowCopy({}, opts);
// No options object -- if there are optiony names
// in the data, copy them to options
if (arguments.length === 3) {
// Express 4
if (data.settings && data.settings['view options']) {
utils.shallowCopyFromList(opts, data.settings['view options'], _OPTS_EXPRESS);
}
// Express 3 and lower
else {
utils.shallowCopyFromList(opts, data, _OPTS_EXPRESS);
}
// No options object -- if there are optiony names
// in the data, copy them to options
if (arguments.length == 3) {
// Express 4
if (data.settings && data.settings['view options']) {
cpOptsInData(data.settings['view options'], opts);
}
// Express 3 and lower
else {
// Use shallowCopy so we don't pollute passed in opts obj with new vals
utils.shallowCopy(opts, arguments[2]);
cpOptsInData(data, opts);
}
opts.filename = filename;
}
else {
data = {};
}
opts.filename = path;
return tryHandleCache(opts, data, cb);
try {
result = handleCache(opts)(data);
}
catch(err) {
return cb(err);
}
return cb(null, result);
};
/**
@ -440,7 +391,6 @@ function Template(text, opts) {
options.context = opts.context;
options.cache = opts.cache || false;
options.rmWhitespace = opts.rmWhitespace;
options.root = opts.root;
options.localsName = opts.localsName || exports.localsName || _DEFAULT_LOCALS_NAME;
if (options.strict) {
@ -456,28 +406,39 @@ function Template(text, opts) {
}
Template.modes = {
EVAL: 'eval',
ESCAPED: 'escaped',
RAW: 'raw',
COMMENT: 'comment',
LITERAL: 'literal'
EVAL: 'eval'
, ESCAPED: 'escaped'
, RAW: 'raw'
, COMMENT: 'comment'
, LITERAL: 'literal'
};
Template.prototype = {
createRegex: function () {
var str = _REGEX_STRING;
var delim = utils.escapeRegExpChars(this.opts.delimiter);
var str = _REGEX_STRING
, delim = utils.escapeRegExpChars(this.opts.delimiter);
str = str.replace(/%/g, delim);
return new RegExp(str);
},
}
compile: function () {
var src;
var fn;
var opts = this.opts;
var prepended = '';
var appended = '';
var escapeFn = opts.escapeFunction;
, compile: function () {
var src
, fn
, opts = this.opts
, prepended = ''
, appended = ''
, escape = opts.escapeFunction;
if (opts.rmWhitespace) {
// Have to use two separate replace here as `^` and `$` operators don't
// work well with `\r`.
this.templateText =
this.templateText.replace(/\r/g, '').replace(/^\s+|\s+$/gm, '');
}
// Slurp spaces and tabs before <%_ and after _%>
this.templateText =
this.templateText.replace(/[ \t]*<%_/gm, '<%_').replace(/_%>[ \t]*/gm, '_%>');
if (!this.source) {
this.generateSource();
@ -498,7 +459,7 @@ Template.prototype = {
+ 'try {' + '\n'
+ this.source
+ '} catch (e) {' + '\n'
+ ' rethrow(e, __lines, __filename, __line, escapeFn);' + '\n'
+ ' rethrow(e, __lines, __filename, __line);' + '\n'
+ '}' + '\n';
}
else {
@ -510,7 +471,7 @@ Template.prototype = {
}
if (opts.client) {
src = 'escapeFn = escapeFn || ' + escapeFn.toString() + ';' + '\n' + src;
src = 'escape = escape || ' + escape.toString() + ';' + '\n' + src;
if (opts.compileDebug) {
src = 'rethrow = rethrow || ' + rethrow.toString() + ';' + '\n' + src;
}
@ -521,7 +482,7 @@ Template.prototype = {
}
try {
fn = new Function(opts.localsName + ', escapeFn, include, rethrow', src);
fn = new Function(opts.localsName + ', escape, include, rethrow', src);
}
catch(e) {
// istanbul ignore else
@ -529,9 +490,7 @@ Template.prototype = {
if (opts.filename) {
e.message += ' in ' + opts.filename;
}
e.message += ' while compiling ejs\n\n';
e.message += 'If the above error is not helpful, you may want to try EJS-Lint:\n';
e.message += 'https://github.com/RyanZim/EJS-Lint';
e.message += ' while compiling ejs';
}
throw e;
}
@ -552,38 +511,28 @@ Template.prototype = {
}
return includeFile(path, opts)(d);
};
return fn.apply(opts.context, [data || {}, escapeFn, include, rethrow]);
return fn.apply(opts.context, [data || {}, escape, include, rethrow]);
};
returnedFn.dependencies = this.dependencies;
return returnedFn;
},
}
generateSource: function () {
var opts = this.opts;
if (opts.rmWhitespace) {
// Have to use two separate replace here as `^` and `$` operators don't
// work well with `\r`.
this.templateText =
this.templateText.replace(/\r/g, '').replace(/^\s+|\s+$/gm, '');
}
// Slurp spaces and tabs before <%_ and after _%>
this.templateText =
this.templateText.replace(/[ \t]*<%_/gm, '<%_').replace(/_%>[ \t]*/gm, '_%>');
var self = this;
var matches = this.parseTemplateText();
var d = this.opts.delimiter;
, generateSource: function () {
var self = this
, matches = this.parseTemplateText()
, d = this.opts.delimiter;
if (matches && matches.length) {
if (this.opts.compileDebug && this.opts.filename) {
this.source = ' ; __lines = ' + JSON.stringify(this.templateText) + '\n';
this.source += ' ; __filename = "' + this.opts.filename.replace(/\\/g, '/') + '"\n';
}
matches.forEach(function (line, index) {
var opening;
var closing;
var include;
var includeOpts;
var includeObj;
var includeSrc;
var opening
, closing
, include
, includeOpts
, includeSrc;
// If this is an opening tag, check for closing tags
// FIXME: May end up with some false positives here
// Better to store modes as k/v with '<' + delimiter as key
@ -601,23 +550,9 @@ Template.prototype = {
// Must be in EVAL or RAW mode
if (opening && (opening == '<' + d || opening == '<' + d + '-' || opening == '<' + d + '_')) {
includeOpts = utils.shallowCopy({}, self.opts);
includeObj = includeSource(include[1], includeOpts);
if (self.opts.compileDebug) {
includeSrc =
' ; (function(){' + '\n'
+ ' var __line = 1' + '\n'
+ ' , __lines = ' + JSON.stringify(includeObj.template) + '\n'
+ ' , __filename = ' + JSON.stringify(includeObj.filename) + ';' + '\n'
+ ' try {' + '\n'
+ includeObj.source
+ ' } catch (e) {' + '\n'
+ ' rethrow(e, __lines, __filename, __line);' + '\n'
+ ' }' + '\n'
+ ' ; }).call(this)' + '\n';
}else{
includeSrc = ' ; (function(){' + '\n' + includeObj.source +
' ; }).call(this)' + '\n';
}
includeSrc = includeSource(include[1], includeOpts);
includeSrc = ' ; (function(){' + '\n' + includeSrc +
' ; })()' + '\n';
self.source += includeSrc;
self.dependencies.push(exports.resolveInclude(include[1],
includeOpts.filename));
@ -628,17 +563,19 @@ Template.prototype = {
});
}
},
}
parseTemplateText: function () {
var str = this.templateText;
var pat = this.regex;
var result = pat.exec(str);
var arr = [];
var firstPos;
, parseTemplateText: function () {
var str = this.templateText
, pat = this.regex
, result = pat.exec(str)
, arr = []
, firstPos
, lastPos;
while (result) {
firstPos = result.index;
lastPos = pat.lastIndex;
if (firstPos !== 0) {
arr.push(str.substring(0, firstPos));
@ -655,12 +592,12 @@ Template.prototype = {
}
return arr;
},
}
scanLine: function (line) {
var self = this;
var d = this.opts.delimiter;
var newLineCount = 0;
, scanLine: function (line) {
var self = this
, d = this.opts.delimiter
, newLineCount = 0;
function _addOutput() {
if (self.truncate) {
@ -669,12 +606,13 @@ Template.prototype = {
// after the tag that the truncation mode replaces
// Handle Win / Unix / old Mac linebreaks -- do the \r\n
// combo first in the regex-or
line = line.replace(/^(?:\r\n|\r|\n)/, '');
line = line.replace(/^(?:\r\n|\r|\n)/, '')
self.truncate = false;
}
else if (self.opts.rmWhitespace) {
// rmWhitespace has already removed trailing spaces, just need
// to remove linebreaks
// Gotta be more careful here.
// .replace(/^(\s*)\n/, '$1') might be more appropriate here but as
// rmWhitespace already removes trailing spaces anyway so meh.
line = line.replace(/^\n/, '');
}
if (!line) {
@ -697,75 +635,73 @@ Template.prototype = {
newLineCount = (line.split('\n').length - 1);
switch (line) {
case '<' + d:
case '<' + d + '_':
this.mode = Template.modes.EVAL;
break;
case '<' + d + '=':
this.mode = Template.modes.ESCAPED;
break;
case '<' + d + '-':
this.mode = Template.modes.RAW;
break;
case '<' + d + '#':
this.mode = Template.modes.COMMENT;
break;
case '<' + d + d:
this.mode = Template.modes.LITERAL;
this.source += ' ; __append("' + line.replace('<' + d + d, '<' + d) + '")' + '\n';
break;
case d + d + '>':
this.mode = Template.modes.LITERAL;
this.source += ' ; __append("' + line.replace(d + d + '>', d + '>') + '")' + '\n';
break;
case d + '>':
case '-' + d + '>':
case '_' + d + '>':
if (this.mode == Template.modes.LITERAL) {
_addOutput();
}
case '<' + d:
case '<' + d + '_':
this.mode = Template.modes.EVAL;
break;
case '<' + d + '=':
this.mode = Template.modes.ESCAPED;
break;
case '<' + d + '-':
this.mode = Template.modes.RAW;
break;
case '<' + d + '#':
this.mode = Template.modes.COMMENT;
break;
case '<' + d + d:
this.mode = Template.modes.LITERAL;
this.source += ' ; __append("' + line.replace('<' + d + d, '<' + d) + '")' + '\n';
break;
case d + '>':
case '-' + d + '>':
case '_' + d + '>':
if (this.mode == Template.modes.LITERAL) {
_addOutput();
}
this.mode = null;
this.truncate = line.indexOf('-') === 0 || line.indexOf('_') === 0;
break;
default:
this.mode = null;
this.truncate = line.indexOf('-') === 0 || line.indexOf('_') === 0;
break;
default:
// In script mode, depends on type of tag
if (this.mode) {
if (this.mode) {
// If '//' is found without a line break, add a line break.
switch (this.mode) {
case Template.modes.EVAL:
case Template.modes.ESCAPED:
case Template.modes.RAW:
if (line.lastIndexOf('//') > line.lastIndexOf('\n')) {
line += '\n';
switch (this.mode) {
case Template.modes.EVAL:
case Template.modes.ESCAPED:
case Template.modes.RAW:
if (line.lastIndexOf('//') > line.lastIndexOf('\n')) {
line += '\n';
}
}
switch (this.mode) {
// Just executing code
case Template.modes.EVAL:
this.source += ' ; ' + line + '\n';
break;
// Exec, esc, and output
case Template.modes.ESCAPED:
this.source += ' ; __append(escape(' +
line.replace(_TRAILING_SEMCOL, '').trim() + '))' + '\n';
break;
// Exec and output
case Template.modes.RAW:
this.source += ' ; __append(' +
line.replace(_TRAILING_SEMCOL, '').trim() + ')' + '\n';
break;
case Template.modes.COMMENT:
// Do nothing
break;
// Literal <%% mode, append as raw output
case Template.modes.LITERAL:
_addOutput();
break;
}
}
switch (this.mode) {
// Just executing code
case Template.modes.EVAL:
this.source += ' ; ' + line + '\n';
break;
// Exec, esc, and output
case Template.modes.ESCAPED:
this.source += ' ; __append(escapeFn(' + stripSemi(line) + '))' + '\n';
break;
// Exec and output
case Template.modes.RAW:
this.source += ' ; __append(' + stripSemi(line) + ')' + '\n';
break;
case Template.modes.COMMENT:
// Do nothing
break;
// Literal <%% mode, append as raw output
case Template.modes.LITERAL:
_addOutput();
break;
}
}
// In string mode, just add the output
else {
_addOutput();
}
else {
_addOutput();
}
}
if (self.opts.compileDebug && newLineCount) {
@ -775,17 +711,9 @@ Template.prototype = {
}
};
/**
* Escape characters reserved in XML.
*
* This is simply an export of {@link module:utils.escapeXML}.
*
* If `markup` is `undefined` or `null`, the empty string is returned.
*
* @param {String} markup Input string
* @return {String} Escaped string
* @public
* @func
/*
* Export the internal function for escaping XML so people
* can use for manual escaping if needed
* */
exports.escapeXML = utils.escapeXML;
@ -803,14 +731,14 @@ exports.__express = exports.renderFile;
// Add require support
/* istanbul ignore else */
if (require.extensions) {
require.extensions['.ejs'] = function (module, flnm) {
var filename = flnm || /* istanbul ignore next */ module.filename;
require.extensions['.ejs'] = function (module, filename) {
filename = filename || /* istanbul ignore next */ module.filename;
var options = {
filename: filename,
client: true
};
var template = fileLoader(filename).toString();
var fn = exports.compile(template, options);
filename: filename
, client: true
}
, template = fs.readFileSync(filename).toString()
, fn = exports.compile(template, options);
module._compile('module.exports = ' + fn.toString() + ';', filename);
};
}
@ -825,16 +753,6 @@ if (require.extensions) {
exports.VERSION = _VERSION_STRING;
/**
* Name for detection of EJS.
*
* @readonly
* @type {String}
* @public
*/
exports.name = _NAME;
/* istanbul ignore if */
if (typeof window != 'undefined') {
window.ejs = exports;

45
node_modules/ejs/lib/utils.js generated vendored
View File

@ -45,17 +45,17 @@ exports.escapeRegExpChars = function (string) {
};
var _ENCODE_HTML_RULES = {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&#34;',
"'": '&#39;'
};
var _MATCH_HTML = /[&<>\'"]/g;
'&': '&amp;'
, '<': '&lt;'
, '>': '&gt;'
, '"': '&#34;'
, "'": '&#39;'
}
, _MATCH_HTML = /[&<>\'"]/g;
function encode_char(c) {
return _ENCODE_HTML_RULES[c] || c;
}
};
/**
* Stringified version of constants used by {@link module:utils.escapeXML}.
@ -98,13 +98,11 @@ exports.escapeXML = function (markup) {
.replace(_MATCH_HTML, encode_char);
};
exports.escapeXML.toString = function () {
return Function.prototype.toString.call(this) + ';\n' + escapeFuncStr;
return Function.prototype.toString.call(this) + ';\n' + escapeFuncStr
};
/**
* Naive copy of properties from one object to another.
* Does not recurse into non-scalar properties
* Does not check to see if the property has a value before copying
* Copy all properties from one object to another, in a shallow fashion.
*
* @param {Object} to Destination object
* @param {Object} from Source object
@ -120,28 +118,6 @@ exports.shallowCopy = function (to, from) {
return to;
};
/**
* Naive copy of a list of key names, from one object to another.
* Only copies property if it is actually defined
* Does not recurse into non-scalar properties
*
* @param {Object} to Destination object
* @param {Object} from Source object
* @param {Array} list List of properties to copy
* @return {Object} Destination object
* @static
* @private
*/
exports.shallowCopyFromList = function (to, from, list) {
for (var i = 0; i < list.length; i++) {
var p = list[i];
if (typeof from[p] != 'undefined') {
to[p] = from[p];
}
}
return to;
};
/**
* Simple in-process cache implementation. Does not implement limits of any
* sort.
@ -162,3 +138,4 @@ exports.cache = {
this._data = {};
}
};

87
node_modules/ejs/package.json generated vendored
View File

@ -1,52 +1,33 @@
{
"_args": [
[
{
"name": "ejs",
"raw": "ejs@2.5.6",
"rawSpec": "2.5.6",
"scope": null,
"spec": "2.5.6",
"type": "version"
},
"/home/martind2000/dev/Rinser"
"ejs@http://registry.npmjs.org/ejs/-/ejs-2.4.2.tgz",
"/Users/martin/dev/Rinser"
]
],
"_from": "ejs@2.5.6",
"_id": "ejs@2.5.6",
"_inCache": true,
"_installable": true,
"_from": "ejs@http://registry.npmjs.org/ejs/-/ejs-2.4.2.tgz",
"_id": "ejs@http://registry.npmjs.org/ejs/-/ejs-2.4.2.tgz",
"_inBundle": false,
"_integrity": "sha1-cFfrSBKVj7cxhBzZyjUzQ+/ll7E=",
"_location": "/ejs",
"_nodeVersion": "6.9.1",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/ejs-2.5.6.tgz_1487277787176_0.4875628533773124"
},
"_npmUser": {
"email": "mde@fleegix.org",
"name": "mde"
},
"_npmVersion": "3.10.8",
"_phantomChildren": {},
"_requested": {
"type": "remote",
"raw": "ejs@http://registry.npmjs.org/ejs/-/ejs-2.4.2.tgz",
"name": "ejs",
"raw": "ejs@2.5.6",
"rawSpec": "2.5.6",
"scope": null,
"spec": "2.5.6",
"type": "version"
"escapedName": "ejs",
"rawSpec": "http://registry.npmjs.org/ejs/-/ejs-2.4.2.tgz",
"saveSpec": "http://registry.npmjs.org/ejs/-/ejs-2.4.2.tgz",
"fetchSpec": "http://registry.npmjs.org/ejs/-/ejs-2.4.2.tgz"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.6.tgz",
"_shasum": "479636bfa3fe3b1debd52087f0acb204b4f19c88",
"_shrinkwrap": null,
"_spec": "ejs@2.5.6",
"_where": "/home/martind2000/dev/Rinser",
"_spec": "http://registry.npmjs.org/ejs/-/ejs-2.4.2.tgz",
"_where": "/Users/martin/dev/Rinser",
"author": {
"email": "mde@fleegix.org",
"name": "Matthew Eernisse",
"email": "mde@fleegix.org",
"url": "http://fleegix.org"
},
"bugs": {
@ -54,28 +35,22 @@
},
"contributors": [
{
"email": "timothygu99@gmail.com",
"name": "Timothy Gu",
"email": "timothygu99@gmail.com",
"url": "https://timothygu.github.io"
}
],
"dependencies": {},
"description": "Embedded JavaScript templates",
"devDependencies": {
"browserify": "^13.0.1",
"eslint": "^3.0.0",
"git-directory-deploy": "^1.5.1",
"istanbul": "~0.4.3",
"browserify": "^8.0.3",
"istanbul": "~0.3.5",
"jake": "^8.0.0",
"jsdoc": "^3.4.0",
"lru-cache": "^4.0.1",
"mocha": "^3.0.2",
"uglify-js": "^2.6.2"
},
"directories": {},
"dist": {
"shasum": "479636bfa3fe3b1debd52087f0acb204b4f19c88",
"tarball": "https://registry.npmjs.org/ejs/-/ejs-2.5.6.tgz"
"jsdoc": "^3.3.0-beta1",
"lru-cache": "^2.5.0",
"mocha": "^2.1.0",
"rimraf": "^2.2.8",
"uglify-js": "^2.4.16"
},
"engines": {
"node": ">=0.10.0"
@ -88,25 +63,17 @@
],
"license": "Apache-2.0",
"main": "./lib/ejs.js",
"maintainers": [
{
"email": "mde@fleegix.org",
"name": "mde"
}
],
"name": "ejs",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/mde/ejs.git"
},
"scripts": {
"coverage": "istanbul cover node_modules/mocha/bin/_mocha",
"devdoc": "jake doc[dev]",
"doc": "jake doc",
"lint": "eslint \"**/*.js\" Jakefile",
"devdoc": "rimraf out && jsdoc -p -c jsdoc.json lib/* docs/jsdoc/*",
"doc": "rimraf out && jsdoc -c jsdoc.json lib/* docs/jsdoc/*",
"sample": "npm install express && node sample/index.js",
"test": "mocha"
},
"version": "2.5.6"
"version": "http://registry.npmjs.org/ejs/-/ejs-2.4.2.tgz"
}

345
node_modules/ejs/test/ejs.js generated vendored
View File

@ -1,16 +1,15 @@
/* jshint mocha: true */
/* eslint-env node, mocha */
/**
* Module dependencies.
*/
var ejs = require('..');
var fs = require('fs');
var read = fs.readFileSync;
var assert = require('assert');
var path = require('path');
var LRU = require('lru-cache');
var ejs = require('..')
, fs = require('fs')
, read = fs.readFileSync
, assert = require('assert')
, path = require('path')
, LRU = require('lru-cache');
try {
fs.mkdirSync(__dirname + '/tmp');
@ -104,28 +103,10 @@ suite('ejs.compile(str, options)', function () {
delete ejs.delimiter;
});
test('support custom escape function', function () {
var customEscape;
var fn;
customEscape = function customEscape(str) {
return !str ? '' : str.toUpperCase();
};
fn = ejs.compile('HELLO <%= name %>', {escape: customEscape});
assert.equal(fn({name: 'world'}), 'HELLO WORLD');
});
test('strict mode works', function () {
assert.equal(ejs.render(fixture('strict.ejs'), {}, {strict: true}), 'true');
});
});
suite('client mode', function () {
test('have a working client option', function () {
var fn;
var str;
var preFn;
var fn
, str
, preFn;
fn = ejs.compile('<p><%= foo %></p>', {client: true});
str = fn.toString();
if (!process.env.running_under_istanbul) {
@ -135,9 +116,9 @@ suite('client mode', function () {
});
test('support client mode without locals', function () {
var fn;
var str;
var preFn;
var fn
, str
, preFn;
fn = ejs.compile('<p><%= "foo" %></p>', {client: true});
str = fn.toString();
if (!process.env.running_under_istanbul) {
@ -148,17 +129,27 @@ suite('client mode', function () {
test('not include rethrow() in client mode if compileDebug is false', function () {
var fn = ejs.compile('<p><%= "foo" %></p>', {
client: true,
compileDebug: false
});
client: true
, compileDebug: false
});
// There could be a `rethrow` in the function declaration
assert((fn.toString().match(/rethrow/g) || []).length <= 1);
});
test('support custom escape function', function () {
var customEscape
, fn;
customEscape = function customEscape(str) {
return !str ? '' : str.toUpperCase();
};
fn = ejs.compile('HELLO <%= name %>', {escape: customEscape});
assert.equal(fn({name: 'world'}), 'HELLO WORLD');
});
test('support custom escape function in client mode', function () {
var customEscape;
var fn;
var str;
var customEscape
, fn
, str;
customEscape = function customEscape(str) {
return !str ? '' : str.toUpperCase();
};
@ -166,31 +157,10 @@ suite('client mode', function () {
str = fn.toString();
if (!process.env.running_under_istanbul) {
eval('var preFn = ' + str);
assert.equal(preFn({name: 'world'}), 'HELLO WORLD'); // eslint-disable-line no-undef
assert.equal(preFn({name: 'world'}), 'HELLO WORLD');
}
});
test('escape filename in errors in client mode', function () {
assert.throws(function () {
var fn = ejs.compile('<% throw new Error("whoops"); %>', {client: true, filename: '<script>'});
fn();
}, /Error: &lt;script&gt;/);
});
});
/* Old API -- remove when this shim goes away */
suite('ejs.render(str, dataAndOpts)', function () {
test('render the template with data/opts passed together', function () {
assert.equal(ejs.render('<p><?= foo ?></p>', {foo: 'yay', delimiter: '?'}),
'<p>yay</p>');
});
test('disallow unsafe opts passed along in data', function () {
assert.equal(ejs.render('<p><?= locals.foo ?></p>',
// localsName should not get reset because it's blacklisted
{_with: false, foo: 'yay', delimiter: '?', localsName: '_'}),
'<p>yay</p>');
});
});
suite('ejs.render(str, data, opts)', function () {
@ -254,10 +224,10 @@ suite('ejs.render(str, data, opts)', function () {
});
test('support caching', function () {
var file = __dirname + '/tmp/render.ejs';
var options = {cache: true, filename: file};
var out = ejs.render('<p>Old</p>', {}, options);
var expected = '<p>Old</p>';
var file = __dirname + '/tmp/render.ejs'
, options = {cache: true, filename: file}
, out = ejs.render('<p>Old</p>', {}, options)
, expected = '<p>Old</p>';
assert.equal(out, expected);
// Assert no change, still in cache
out = ejs.render('<p>New</p>', {}, options);
@ -265,11 +235,11 @@ suite('ejs.render(str, data, opts)', function () {
});
test('support LRU caching', function () {
var oldCache = ejs.cache;
var file = __dirname + '/tmp/render.ejs';
var options = {cache: true, filename: file};
var out;
var expected = '<p>Old</p>';
var oldCache = ejs.cache
, file = __dirname + '/tmp/render.ejs'
, options = {cache: true, filename: file}
, out
, expected = '<p>Old</p>';
// Switch to LRU
ejs.cache = LRU();
@ -285,8 +255,8 @@ suite('ejs.render(str, data, opts)', function () {
});
test('opts.context', function () {
var ctxt = {foo: 'FOO'};
var out = ejs.render('<%= this.foo %>', {}, {context: ctxt});
var ctxt = {foo: 'FOO'}
, out = ejs.render('<%= this.foo %>', {}, {context: ctxt});
assert.equal(out, ctxt.foo);
});
});
@ -303,8 +273,8 @@ suite('ejs.renderFile(path, [data], [options], fn)', function () {
});
test('accept locals', function(done) {
var data = {name: 'fonebone'};
var options = {delimiter: '$'};
var data = {name: 'fonebone'}
, options = {delimiter: '$'};
ejs.renderFile('test/fixtures/user.ejs', data, options, function(err, html) {
if (err) {
return done(err);
@ -315,10 +285,11 @@ suite('ejs.renderFile(path, [data], [options], fn)', function () {
});
test('accept locals without using with() {}', function(done) {
var data = {name: 'fonebone'};
var options = {delimiter: '$', _with: false};
var doneCount = 0;
ejs.renderFile('test/fixtures/user-no-with.ejs', data, options, function(err, html) {
var data = {name: 'fonebone'}
, options = {delimiter: '$', _with: false}
, doneCount = 0;
ejs.renderFile('test/fixtures/user-no-with.ejs', data, options,
function(err, html) {
if (err) {
if (doneCount === 2) {
return;
@ -348,9 +319,9 @@ suite('ejs.renderFile(path, [data], [options], fn)', function () {
});
test('not catch err thrown by callback', function(done) {
var data = {name: 'fonebone'};
var options = {delimiter: '$'};
var counter = 0;
var data = {name: 'fonebone'}
, options = {delimiter: '$'}
, counter = 0;
var d = require('domain').create();
d.on('error', function (err) {
@ -365,7 +336,8 @@ suite('ejs.renderFile(path, [data], [options], fn)', function () {
// domains. Have to make it async. Ticket closed because: "domains are
// deprecated :D"
process.nextTick(function () {
ejs.renderFile('test/fixtures/user.ejs', data, options, function(err) {
ejs.renderFile('test/fixtures/user.ejs', data, options,
function(err) {
counter++;
if (err) {
assert.notEqual(err.message, 'Exception in callback');
@ -378,9 +350,9 @@ suite('ejs.renderFile(path, [data], [options], fn)', function () {
});
test('support caching', function (done) {
var expected = '<p>Old</p>';
var file = __dirname + '/tmp/renderFile.ejs';
var options = {cache: true};
var expected = '<p>Old</p>'
, file = __dirname + '/tmp/renderFile.ejs'
, options = {cache: true};
fs.writeFileSync(file, '<p>Old</p>');
ejs.renderFile(file, {}, options, function (err, out) {
@ -403,7 +375,8 @@ suite('ejs.renderFile(path, [data], [options], fn)', function () {
test('opts.context', function (done) {
var ctxt = {foo: 'FOO'};
ejs.renderFile('test/fixtures/with-context.ejs', {}, {context: ctxt}, function(err, html) {
ejs.renderFile('test/fixtures/with-context.ejs', {},
{context: ctxt}, function(err, html) {
if (err) {
return done(err);
}
@ -416,10 +389,10 @@ suite('ejs.renderFile(path, [data], [options], fn)', function () {
suite('cache specific', function () {
test('`clearCache` work properly', function () {
var expected = '<p>Old</p>';
var file = __dirname + '/tmp/clearCache.ejs';
var options = {cache: true, filename: file};
var out = ejs.render('<p>Old</p>', {}, options);
var expected = '<p>Old</p>'
, file = __dirname + '/tmp/clearCache.ejs'
, options = {cache: true, filename: file}
, out = ejs.render('<p>Old</p>', {}, options);
assert.equal(out, expected);
ejs.clearCache();
@ -430,11 +403,11 @@ suite('cache specific', function () {
});
test('`clearCache` work properly, LRU', function () {
var expected = '<p>Old</p>';
var oldCache = ejs.cache;
var file = __dirname + '/tmp/clearCache.ejs';
var options = {cache: true, filename: file};
var out;
var expected = '<p>Old</p>'
, oldCache = ejs.cache
, file = __dirname + '/tmp/clearCache.ejs'
, options = {cache: true, filename: file}
, out;
ejs.cache = LRU();
@ -449,11 +422,11 @@ suite('cache specific', function () {
});
test('LRU with cache-size 1', function () {
var oldCache = ejs.cache;
var options;
var out;
var expected;
var file;
var oldCache = ejs.cache
, options
, out
, expected
, file;
ejs.cache = LRU(1);
@ -499,11 +472,6 @@ suite('<%', function () {
});
suite('<%=', function () {
test('should not throw an error with a // comment on the final line', function () {
assert.equal(ejs.render('<%=\n// a comment\nname\n// another comment %>', {name: '&nbsp;<script>'}),
'&amp;nbsp;&lt;script&gt;');
});
test('escape &amp;<script>', function () {
assert.equal(ejs.render('<%= name %>', {name: '&nbsp;<script>'}),
'&amp;nbsp;&lt;script&gt;');
@ -533,11 +501,6 @@ suite('<%=', function () {
});
suite('<%-', function () {
test('should not throw an error with a // comment on the final line', function () {
assert.equal(ejs.render('<%-\n// a comment\nname\n// another comment %>', {name: '&nbsp;<script>'}),
'&nbsp;<script>');
});
test('not escape', function () {
assert.equal(ejs.render('<%- name %>', {name: '<script>'}),
'<script>');
@ -588,13 +551,13 @@ suite('-%>', function () {
});
test('works with unix style', function () {
var content = '<ul><% -%>\n'
+ '<% users.forEach(function(user){ -%>\n'
+ '<li><%= user.name -%></li>\n'
+ '<% }) -%>\n'
+ '</ul><% -%>\n';
var content = "<ul><% -%>\n"
+ "<% users.forEach(function(user){ -%>\n"
+ "<li><%= user.name -%></li>\n"
+ "<% }) -%>\n"
+ "</ul><% -%>\n";
var expectedResult = '<ul><li>geddy</li>\n<li>neil</li>\n<li>alex</li>\n</ul>';
var expectedResult = "<ul><li>geddy</li>\n<li>neil</li>\n<li>alex</li>\n</ul>";
var fn;
fn = ejs.compile(content);
assert.equal(fn({users: users}),
@ -602,13 +565,13 @@ suite('-%>', function () {
});
test('works with windows style', function () {
var content = '<ul><% -%>\r\n'
+ '<% users.forEach(function(user){ -%>\r\n'
+ '<li><%= user.name -%></li>\r\n'
+ '<% }) -%>\r\n'
+ '</ul><% -%>\r\n';
var content = "<ul><% -%>\r\n"
+ "<% users.forEach(function(user){ -%>\r\n"
+ "<li><%= user.name -%></li>\r\n"
+ "<% }) -%>\r\n"
+ "</ul><% -%>\r\n";
var expectedResult = '<ul><li>geddy</li>\r\n<li>neil</li>\r\n<li>alex</li>\r\n</ul>';
var expectedResult = "<ul><li>geddy</li>\r\n<li>neil</li>\r\n<li>alex</li>\r\n</ul>";
var fn;
fn = ejs.compile(content);
assert.equal(fn({users: users}),
@ -628,15 +591,6 @@ suite('<%%', function () {
});
});
suite('%%>', function () {
test('produce literal', function () {
assert.equal(ejs.render('%%>'),
'%>');
assert.equal(ejs.render(' >', {}, {delimiter: ' '}),
' >');
});
});
suite('<%_ and _%>', function () {
test('slurps spaces and tabs', function () {
assert.equal(ejs.render(fixture('space-and-tab-slurp.ejs'), {users: users}),
@ -702,8 +656,8 @@ suite('exceptions', function () {
var unhook = null;
test('log JS source when debug is set', function (done) {
var out = '';
var needToExit = false;
var out = ''
, needToExit = false;
unhook = hook_stdio(process.stdout, function (str) {
out += str;
if (needToExit) {
@ -718,22 +672,6 @@ suite('exceptions', function () {
});
ejs.render(fixture('hello-world.ejs'), {}, {debug: true});
});
test('escape filename in errors', function () {
assert.throws(function () {
ejs.render('<% throw new Error("whoops"); %>', {}, {filename: '<script>'});
}, /Error: &lt;script&gt;/);
});
test('filename in errors uses custom escape', function () {
assert.throws(function () {
ejs.render('<% throw new Error("whoops"); %>', {}, {
filename: '<script>',
escape: function () { return 'zooby'; }
});
}, /Error: zooby/);
});
teardown(function() {
if (!unhook) {
return;
@ -789,13 +727,6 @@ suite('include()', function () {
fixture('include.html'));
});
test('include ejs with set root path', function () {
var file = 'test/fixtures/include-root.ejs';
var viewsPath = path.join(__dirname, 'fixtures');
assert.equal(ejs.render(fixture('include-root.ejs'), {pets: users}, {filename: file, delimiter: '@',root:viewsPath}),
fixture('include.html'));
});
test('work when nested', function () {
var file = 'test/fixtures/menu.ejs';
assert.equal(ejs.render(fixture('menu.ejs'), {pets: users}, {filename: file}),
@ -803,8 +734,8 @@ suite('include()', function () {
});
test('work with a variable path', function () {
var file = 'test/fixtures/menu_var.ejs';
var includePath = 'includes/menu-item';
var file = 'test/fixtures/menu_var.ejs',
includePath = 'includes/menu-item';
assert.equal(ejs.render(fixture('menu.ejs'), {pets: users, varPath: includePath}, {filename: file}),
fixture('menu.html'));
});
@ -816,12 +747,12 @@ suite('include()', function () {
});
test('pass compileDebug to include', function () {
var file = 'test/fixtures/include.ejs';
var fn;
var file = 'test/fixtures/include.ejs'
, fn;
fn = ejs.compile(fixture('include.ejs'), {
filename: file,
delimiter: '@',
compileDebug: false
filename: file
, delimiter: '@'
, compileDebug: false
});
try {
// Render without a required variable reference
@ -837,9 +768,9 @@ suite('include()', function () {
test('is dynamic', function () {
fs.writeFileSync(__dirname + '/tmp/include.ejs', '<p>Old</p>');
var file = 'test/fixtures/include_cache.ejs';
var options = {filename: file};
var out = ejs.compile(fixture('include_cache.ejs'), options);
var file = 'test/fixtures/include_cache.ejs'
, options = {filename: file}
, out = ejs.compile(fixture('include_cache.ejs'), options);
assert.equal(out(), '<p>Old</p>\n');
fs.writeFileSync(__dirname + '/tmp/include.ejs', '<p>New</p>');
@ -848,10 +779,10 @@ suite('include()', function () {
test('support caching', function () {
fs.writeFileSync(__dirname + '/tmp/include.ejs', '<p>Old</p>');
var file = 'test/fixtures/include_cache.ejs';
var options = {cache: true, filename: file};
var out = ejs.render(fixture('include_cache.ejs'), {}, options);
var expected = fixture('include_cache.html');
var file = 'test/fixtures/include_cache.ejs'
, options = {cache: true, filename: file}
, out = ejs.render(fixture('include_cache.ejs'), {}, options)
, expected = fixture('include_cache.html');
assert.equal(out, expected);
out = ejs.render(fixture('include_cache.ejs'), {}, options);
// No change, still in cache
@ -899,8 +830,8 @@ suite('preprocessor include', function () {
});
test('tracks dependency correctly', function () {
var file = 'test/fixtures/menu_preprocessor.ejs';
var fn = ejs.compile(fixture('menu_preprocessor.ejs'), {filename: file});
var file = 'test/fixtures/menu_preprocessor.ejs'
, fn = ejs.compile(fixture('menu_preprocessor.ejs'), {filename: file});
assert(fn.dependencies.length);
});
@ -911,12 +842,12 @@ suite('preprocessor include', function () {
});
test('pass compileDebug to include', function () {
var file = 'test/fixtures/include_preprocessor.ejs';
var fn;
var file = 'test/fixtures/include_preprocessor.ejs'
, fn;
fn = ejs.compile(fixture('include_preprocessor.ejs'), {
filename: file,
delimiter: '@',
compileDebug: false
filename: file
, delimiter: '@'
, compileDebug: false
});
try {
// Render without a required variable reference
@ -932,9 +863,9 @@ suite('preprocessor include', function () {
test('is static', function () {
fs.writeFileSync(__dirname + '/tmp/include_preprocessor.ejs', '<p>Old</p>');
var file = 'test/fixtures/include_preprocessor_cache.ejs';
var options = {filename: file};
var out = ejs.compile(fixture('include_preprocessor_cache.ejs'), options);
var file = 'test/fixtures/include_preprocessor_cache.ejs'
, options = {filename: file}
, out = ejs.compile(fixture('include_preprocessor_cache.ejs'), options);
assert.equal(out(), '<p>Old</p>\n');
fs.writeFileSync(__dirname + '/tmp/include_preprocessor.ejs', '<p>New</p>');
@ -943,25 +874,16 @@ suite('preprocessor include', function () {
test('support caching', function () {
fs.writeFileSync(__dirname + '/tmp/include_preprocessor.ejs', '<p>Old</p>');
var file = 'test/fixtures/include_preprocessor_cache.ejs';
var options = {cache: true, filename: file};
var out = ejs.render(fixture('include_preprocessor_cache.ejs'), {}, options);
var expected = fixture('include_preprocessor_cache.html');
var file = 'test/fixtures/include_preprocessor_cache.ejs'
, options = {cache: true, filename: file}
, out = ejs.render(fixture('include_preprocessor_cache.ejs'), {}, options)
, expected = fixture('include_preprocessor_cache.html');
assert.equal(out, expected);
fs.writeFileSync(__dirname + '/tmp/include_preprocessor.ejs', '<p>New</p>');
out = ejs.render(fixture('include_preprocessor_cache.ejs'), {}, options);
assert.equal(out, expected);
});
test('whitespace slurp and rmWhitespace work', function() {
var file = 'test/fixtures/include_preprocessor_line_slurp.ejs';
var template = fixture('include_preprocessor_line_slurp.ejs');
var expected = fixture('include_preprocessor_line_slurp.html');
var options = {rmWhitespace: true, filename: file};
assert.equal(ejs.render(template, {}, options),
expected);
});
});
suite('comments', function () {
@ -975,31 +897,12 @@ suite('require', function () {
// Only works with inline/preprocessor includes
test('allow ejs templates to be required as node modules', function () {
var file = 'test/fixtures/include_preprocessor.ejs';
var template = require(__dirname + '/fixtures/menu_preprocessor.ejs');
if (!process.env.running_under_istanbul) {
assert.equal(template({filename: file, pets: users}),
var file = 'test/fixtures/include_preprocessor.ejs'
, template = require(__dirname + '/fixtures/menu_preprocessor.ejs');
if (!process.env.running_under_istanbul) {
assert.equal(template({filename: file, pets: users}),
fixture('menu_preprocessor.html'));
}
});
});
suite('test fileloader', function () {
var myFileLoad = function (filePath) {
return 'myFileLoad: ' + fs.readFileSync(filePath);
};
test('test custom fileload', function (done) {
ejs.fileLoader = myFileLoad;
ejs.renderFile('test/fixtures/para.ejs', function(err, html) {
if (err) {
return done(err);
}
assert.equal(html, 'myFileLoad: <p>hey</p>\n');
done();
});
});
});
@ -1011,8 +914,8 @@ suite('examples', function () {
}
suite(f, function () {
test('doesn\'t throw any errors', function () {
var stderr = hook_stdio(process.stderr, noop);
var stdout = hook_stdio(process.stdout, noop);
var stderr = hook_stdio(process.stderr, noop)
, stdout = hook_stdio(process.stdout, noop);
try {
require('../examples/' + f);
}
@ -1027,13 +930,3 @@ suite('examples', function () {
});
});
});
suite('meta information', function () {
test('has a version', function () {
assert.strictEqual(ejs.VERSION, require('../package.json').version);
});
test('had a name', function () {
assert.strictEqual(ejs.name, 'ejs');
});
});

View File

@ -1,5 +1,5 @@
AAA
<% var data = "test"; -%>
<% data = "test"; -%>
BBB
<%= qdata %>
CCC

114
node_modules/express/package.json generated vendored
View File

@ -1,98 +1,77 @@
{
"_args": [
[
{
"name": "express",
"raw": "express@4.15.3",
"rawSpec": "4.15.3",
"scope": null,
"spec": "4.15.3",
"type": "version"
},
"/home/martind2000/dev/Rinser"
]
],
"_from": "express@4.15.3",
"_from": "express@^4.15.3",
"_id": "express@4.15.3",
"_inCache": true,
"_installable": true,
"_inBundle": false,
"_integrity": "sha1-urZdDwOqgMNYQIly/HAPkWlEtmI=",
"_location": "/express",
"_nodeVersion": "6.10.3",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/express-4.15.3.tgz_1495030658380_0.1599606357049197"
},
"_npmUser": {
"email": "doug@somethingdoug.com",
"name": "dougwilson"
},
"_npmVersion": "4.2.0",
"_phantomChildren": {
"debug": "2.6.7",
"depd": "1.1.0",
"destroy": "1.0.4",
"encodeurl": "1.0.1",
"escape-html": "1.0.3",
"etag": "1.8.0",
"forwarded": "0.1.0",
"fresh": "0.5.0",
"media-typer": "0.3.0",
"http-errors": "1.6.1",
"mime": "1.3.4",
"ms": "2.0.0",
"on-finished": "2.3.0",
"parseurl": "1.3.1",
"range-parser": "1.2.0",
"statuses": "1.3.1",
"unpipe": "1.0.0"
},
"_requested": {
"type": "range",
"registry": true,
"raw": "express@^4.15.3",
"name": "express",
"raw": "express@4.15.3",
"rawSpec": "4.15.3",
"scope": null,
"spec": "4.15.3",
"type": "version"
"escapedName": "express",
"rawSpec": "^4.15.3",
"saveSpec": null,
"fetchSpec": "^4.15.3"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz",
"_shasum": "bab65d0f03aa80c358408972fc700f916944b662",
"_shrinkwrap": null,
"_spec": "express@4.15.3",
"_where": "/home/martind2000/dev/Rinser",
"_spec": "express@^4.15.3",
"_where": "/Users/martin/dev/Rinser",
"author": {
"email": "tj@vision-media.ca",
"name": "TJ Holowaychuk"
"name": "TJ Holowaychuk",
"email": "tj@vision-media.ca"
},
"bugs": {
"url": "https://github.com/expressjs/express/issues"
},
"bundleDependencies": false,
"contributors": [
{
"email": "aaron.heckmann+github@gmail.com",
"name": "Aaron Heckmann"
"name": "Aaron Heckmann",
"email": "aaron.heckmann+github@gmail.com"
},
{
"email": "ciaranj@gmail.com",
"name": "Ciaran Jessup"
"name": "Ciaran Jessup",
"email": "ciaranj@gmail.com"
},
{
"email": "doug@somethingdoug.com",
"name": "Douglas Christopher Wilson"
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
},
{
"email": "rauchg@gmail.com",
"name": "Guillermo Rauch"
"name": "Guillermo Rauch",
"email": "rauchg@gmail.com"
},
{
"email": "me@jongleberry.com",
"name": "Jonathan Ong"
"name": "Jonathan Ong",
"email": "me@jongleberry.com"
},
{
"email": "shtylman+expressjs@gmail.com",
"name": "Roman Shtylman"
"name": "Roman Shtylman",
"email": "shtylman+expressjs@gmail.com"
},
{
"email": "hanul@hanul.me",
"name": "Young Jae Sim"
"name": "Young Jae Sim",
"email": "hanul@hanul.me"
}
],
"dependencies": {
@ -125,6 +104,7 @@
"utils-merge": "1.0.0",
"vary": "~1.1.1"
},
"deprecated": false,
"description": "Fast, unopinionated, minimalist web framework",
"devDependencies": {
"after": "0.8.2",
@ -146,11 +126,6 @@
"supertest": "1.2.0",
"vhost": "~3.0.2"
},
"directories": {},
"dist": {
"shasum": "bab65d0f03aa80c358408972fc700f916944b662",
"tarball": "https://registry.npmjs.org/express/-/express-4.15.3.tgz"
},
"engines": {
"node": ">= 0.10.0"
},
@ -161,7 +136,6 @@
"index.js",
"lib/"
],
"gitHead": "6da454c7fb37e68ed65ffe0371aa688b89f5bd6e",
"homepage": "http://expressjs.com/",
"keywords": [
"express",
@ -175,27 +149,7 @@
"api"
],
"license": "MIT",
"maintainers": [
{
"email": "doug@somethingdoug.com",
"name": "dougwilson"
},
{
"email": "captain@hacksparrow.com",
"name": "hacksparrow"
},
{
"email": "jasnell@gmail.com",
"name": "jasnell"
},
{
"email": "mikeal.rogers@gmail.com",
"name": "mikeal"
}
],
"name": "express",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/expressjs/express.git"

10
node_modules/lodash/package.json generated vendored
View File

@ -40,13 +40,19 @@
"_requiredBy": [
"#USER",
"/",
"/async",
"/babel-traverse",
"/babel-types",
"/eslint",
"/eslint-plugin-flowtype",
"/gulp-jshint",
"/gulp-uglify",
"/hipchat-notifier",
"/inquirer",
"/mailgun-js/async",
"/requestretry",
"/rss-braider"
"/rss-braider",
"/rss-braider/async",
"/table"
],
"_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
"_shasum": "78203a4d1c328ae1d86dca6460e369b57f4055ae",

192
node_modules/rss-braider/.npmignore generated vendored
View File

@ -1 +1,191 @@
node_modules
### Archives template
# It's better to unpack these files and commit the raw source because
# git has its own built in compression methods.
*.7z
*.jar
*.rar
*.zip
*.gz
*.bzip
*.bz2
*.xz
*.lzma
*.cab
#packing-only formats
*.iso
*.tar
#package management formats
*.dmg
*.xpi
*.gem
*.egg
*.deb
*.rpm
*.msi
*.msm
*.msp
### Windows template
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
### Xcode template
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
## Other
*.xccheckout
*.moved-aside
*.xcuserstate
### OSX template
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Node template
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directory
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
node_modules
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
# dependencies
/node_modules
/bower_components
# misc
/.sass-cache
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
testem.log
/lib/newdata.json

3
node_modules/rss-braider/README.md generated vendored
View File

@ -1,6 +1,5 @@
[![Build Status](https://travis-ci.org/KQED/rss-braider.svg?branch=master)](https://travis-ci.org/KQED/rss-braider)
[![Dependencies](https://david-dm.org/rKQED/rss-braider.svg?branch=master)](https://david-dm.org/KQED/rss-braider)
[![dependencies Status](https://david-dm.org/KQED/rss-braider/status.svg)](https://david-dm.org/KQED/rss-braider)
## Summary
Braid/aggregate one or more RSS feeds (file or url) into a single feed (RSS or JSON output). Process resulting feed through specified plugins. Automatic deduplication

View File

@ -1,57 +1,34 @@
{
"_args": [
[
{
"name": "rss-braider",
"raw": "rss-braider",
"rawSpec": "",
"scope": null,
"spec": "latest",
"type": "tag"
},
"/home/martind2000/dev/Rinser"
]
],
"_from": "rss-braider@latest",
"_id": "rss-braider@1.2.0",
"_inCache": true,
"_installable": true,
"_from": "git+https://gitlab.silvrtree.co.uk/martind2000/rss-braider.git",
"_id": "rss-braider@1.2.1",
"_inBundle": false,
"_integrity": "sha1-7O6RZ3ZBafnUvOCGLyGx1kee1mQ=",
"_location": "/rss-braider",
"_nodeVersion": "6.2.1",
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs.com",
"tmp": "tmp/rss-braider-1.2.0.tgz_1487633154488_0.3144866321235895"
},
"_npmUser": {
"email": "kgebhardt23@gmail.com",
"name": "rv-kip"
},
"_npmVersion": "3.9.3",
"_phantomChildren": {},
"_requested": {
"name": "rss-braider",
"raw": "rss-braider",
"rawSpec": "",
"scope": null,
"spec": "latest",
"type": "tag"
"type": "git",
"raw": "git+https://gitlab.silvrtree.co.uk/martind2000/rss-braider.git",
"rawSpec": "git+https://gitlab.silvrtree.co.uk/martind2000/rss-braider.git",
"saveSpec": "git+https://gitlab.silvrtree.co.uk/martind2000/rss-braider.git",
"fetchSpec": "https://gitlab.silvrtree.co.uk/martind2000/rss-braider.git",
"gitCommittish": "master"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/rss-braider/-/rss-braider-1.2.0.tgz",
"_shasum": "ce134542a39b643b916b95dd08a10dbfd7f1c28b",
"_shrinkwrap": null,
"_spec": "rss-braider",
"_where": "/home/martind2000/dev/Rinser",
"_resolved": "git+https://gitlab.silvrtree.co.uk/martind2000/rss-braider.git#436237e6255ea45acd5864ace1cc1a8b183d2954",
"_spec": "git+https://gitlab.silvrtree.co.uk/martind2000/rss-braider.git",
"_where": "/Users/martin/dev/Rinser",
"author": {
"email": "kgebhardt@kqed.org",
"name": "Kip Gebhardt"
"name": "Kip Gebhardt",
"email": "kgebhardt@kqed.org"
},
"bugs": {
"email": "kgebhardt@kqed.org",
"url": "http://github.com/KQED/rss-braider/issues"
"url": "http://github.com/KQED/rss-braider/issues",
"email": "kgebhardt@kqed.org"
},
"bundleDependencies": false,
"dependencies": {
"async": "^2.1.5",
"bunyan": "^1.4.0",
@ -59,19 +36,14 @@
"include-folder": "^1.0.0",
"lodash": "^4.17.4",
"request": "^2.57.0",
"rss": "1.2.0"
"rss": "^1.2.2"
},
"deprecated": false,
"description": "Braid/aggregate/combine RSS feeds into a single RSS (or JSON) document. Optionally process through specified plugins.",
"devDependencies": {
"mockdate": "^2.0.1",
"tape": "^4.0.0"
},
"directories": {},
"dist": {
"shasum": "ce134542a39b643b916b95dd08a10dbfd7f1c28b",
"tarball": "https://registry.npmjs.org/rss-braider/-/rss-braider-1.2.0.tgz"
},
"gitHead": "898ec8743c4ab37c4bf7a8fc925356c351d7df39",
"homepage": "https://github.com/KQED/rss-braider#readme",
"keywords": [
"rss",
@ -93,15 +65,7 @@
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"email": "kgebhardt23@gmail.com",
"name": "rv-kip"
}
],
"name": "rss-braider",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/KQED/rss-braider.git"
@ -109,5 +73,5 @@
"scripts": {
"test": "tape test"
},
"version": "1.2.0"
"version": "1.2.1"
}