Commit 9f9e20cf authored by yPhil's avatar yPhil
Browse files

Back to feedParser

parent f2584cd8
Pipeline #413274 passed with stage
in 52 seconds
......@@ -3287,7 +3287,182 @@
"treeverse",
"validate-npm-package-name",
"which",
"write-file-atomic"
"write-file-atomic",
"@npmcli/disparity-colors",
"@npmcli/git",
"@npmcli/installed-package-contents",
"@npmcli/map-workspaces",
"@npmcli/metavuln-calculator",
"@npmcli/move-file",
"@npmcli/name-from-folder",
"@npmcli/node-gyp",
"@npmcli/promise-spawn",
"@tootallnate/once",
"agent-base",
"agentkeepalive",
"aggregate-error",
"ajv",
"ansi-regex",
"ansi-styles",
"aproba",
"are-we-there-yet",
"asap",
"asn1",
"assert-plus",
"asynckit",
"aws-sign2",
"aws4",
"balanced-match",
"bcrypt-pbkdf",
"bin-links",
"binary-extensions",
"brace-expansion",
"builtins",
"caseless",
"cidr-regex",
"clean-stack",
"clone",
"cmd-shim",
"code-point-at",
"color-convert",
"color-name",
"colors",
"combined-stream",
"common-ancestor-path",
"concat-map",
"console-control-strings",
"core-util-is",
"dashdash",
"debug",
"debuglog",
"defaults",
"delayed-stream",
"delegates",
"depd",
"dezalgo",
"diff",
"ecc-jsbn",
"emoji-regex",
"encoding",
"env-paths",
"err-code",
"extend",
"extsprintf",
"fast-deep-equal",
"fast-json-stable-stringify",
"forever-agent",
"form-data",
"fs-minipass",
"fs.realpath",
"function-bind",
"gauge",
"getpass",
"har-schema",
"har-validator",
"has",
"has-flag",
"has-unicode",
"http-cache-semantics",
"http-proxy-agent",
"http-signature",
"https-proxy-agent",
"humanize-ms",
"iconv-lite",
"ignore-walk",
"imurmurhash",
"indent-string",
"infer-owner",
"inflight",
"inherits",
"ip",
"ip-regex",
"is-core-module",
"is-fullwidth-code-point",
"is-lambda",
"is-typedarray",
"isarray",
"isexe",
"isstream",
"jsbn",
"json-schema",
"json-schema-traverse",
"json-stringify-nice",
"json-stringify-safe",
"jsonparse",
"jsprim",
"just-diff",
"just-diff-apply",
"lru-cache",
"mime-db",
"mime-types",
"minimatch",
"minipass-collect",
"minipass-fetch",
"minipass-flush",
"minipass-json-stream",
"minipass-sized",
"minizlib",
"mute-stream",
"normalize-package-data",
"npm-bundled",
"npm-install-checks",
"npm-normalize-package-bin",
"npm-packlist",
"number-is-nan",
"oauth-sign",
"object-assign",
"once",
"p-map",
"path-is-absolute",
"path-parse",
"performance-now",
"proc-log",
"process-nextick-args",
"promise-all-reject-late",
"promise-call-limit",
"promise-inflight",
"promise-retry",
"promzard",
"psl",
"punycode",
"qs",
"read-cmd-shim",
"readable-stream",
"request",
"resolve",
"retry",
"safe-buffer",
"safer-buffer",
"set-blocking",
"signal-exit",
"smart-buffer",
"socks",
"socks-proxy-agent",
"spdx-correct",
"spdx-exceptions",
"spdx-expression-parse",
"spdx-license-ids",
"sshpk",
"string_decoder",
"string-width",
"stringify-package",
"strip-ansi",
"supports-color",
"tunnel-agent",
"tweetnacl",
"typedarray-to-buffer",
"unique-filename",
"unique-slug",
"uri-js",
"util-deprecate",
"uuid",
"validate-npm-package-license",
"verror",
"walk-up-path",
"wcwidth",
"wide-align",
"wrappy",
"yallist"
],
"dependencies": {
"@npmcli/arborist": "^2.4.1",
......
......@@ -66,16 +66,15 @@ function getFeed (feedUrl, lastItem, callback) {
try {
var item = this.read();
// console.error('ITEM: %s (%s)', JSON.stringify(item));
if (item !== null){
console.error('ITEM: %s (%s)', item.link);
i++;
if (typeof newLastItem === 'undefined') {
newLastItem = item.link;
}
if (item.link !== lastItem) {
if (true) {
console.error('### PUSHING [%s] lastItem:[%s]', item.link, newLastItem);
feedItems.push(item);
} else {
......
......@@ -70,14 +70,22 @@ router.use(morgan('combined'));
router.get('/feed', function(req, res) {
feeder.getFeed(req.query.url, req.query.lastItem, function (error, feedItems, feedTitle, feedLink, lastItem) {
var lastItem = req.query.lastItem;
feeder.getFeed(req.query.url, req.query.lastItem, function (error, feedItems, feedTitle, feedLink, newLastItem) {
if (newLastItem == lastItem) {
console.error('### same: new [%s] last (%s)', newLastItem, lastItem);
} else {
console.error('### newLastItem: new [%s] last (%s)', newLastItem, lastItem);
}
if (feedItems && !res.headersSent) {
res.send({
feedItems: feedItems,
feedLink: feedLink,
feedTitle: feedTitle,
lastItem: lastItem
lastItem: newLastItem
});
} else if (error && !res.headersSent) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment