
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
prember-crawler
Advanced tools
A web crawler that works with prember to discover URLs in your app
A tiny web crawler that's designed to discover URLs in your app while you are pre-rendering it with prember.
yarn add --dev prember-crawler
or npm install --dev prember-crawler
And configure prember to use the crawler to discover URLs:
// In ember-cli-build.js
const crawl = require('prember-crawler');
let app = new EmberApp(defaults, {
prember: {
urls: crawl
}
});
The crawl
method accepts the following arguments:
visit
: the function for visiting a new URL, provided by Prember. This is required.startingFrom
: list of local URLs to use as starting points for the crawl. Defaults to ['/']
.selector
: a CSS selector to use for identifying links that should be followed. Defaults to 'a'
.exclude
: a regular expression, used for excluding specific paths from being crawled.Putting these together, we can use crawl
from within a customer URL-discovery function:
// In ember-cli-build.js
const crawl = require('prember-crawler');
let app = new EmberApp(defaults, {
prember: {
urls: async function({ visit }) {
let productURLs = await crawl({
visit,
startingFrom: ['/products'],
selector: 'a.related-product'
exclude: new RegExp(/^(\/app.*|\/auth.*)$/), //excludes all `/app` and `/auth` pages
});
let otherURLs = ['/about', '/contact'];
return productURLs.concat(otherURLs);
}
}
});
FAQs
A web crawler that works with prember to discover URLs in your app
The npm package prember-crawler receives a total of 2,130 weekly downloads. As such, prember-crawler popularity was classified as popular.
We found that prember-crawler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.