@ckeditor/ckeditor5-dev-web-crawler
Advanced tools
Comparing version 44.0.0-alpha.5 to 44.0.0
@@ -34,11 +34,11 @@ #!/usr/bin/env node | ||
* | ||
* @param {Object} options Parsed CLI arguments. | ||
* @param {String} options.url The URL to start crawling. This argument is required. | ||
* @param {Number} [options.depth=Infinity] Defines how many nested page levels should be examined. Infinity by default. | ||
* @param {Array.<String>} [options.exclusions=[]] An array of patterns to exclude links. Empty array by default to not exclude anything. | ||
* @param {Number} [options.concurrency=1] Number of concurrent pages (browser tabs) to be used during crawling. One by default. | ||
* @param {Boolean} [options.quit=false] Terminates the scan as soon as an error is found. False (off) by default. | ||
* @param {Boolean} [options.disableBrowserSandbox=false] Whether the browser should be created with the `--no-sandbox` flag. | ||
* @param {Boolean} [options.noSpinner=false] Whether to display the spinner with progress or a raw message with current progress. | ||
* @param {Boolean} [options.ignoreHTTPSErrors=false] Whether the browser should ignore invalid (self-signed) certificates. | ||
* @param {object} options Parsed CLI arguments. | ||
* @param {string} options.url The URL to start crawling. This argument is required. | ||
* @param {number} [options.depth=Infinity] Defines how many nested page levels should be examined. Infinity by default. | ||
* @param {Array.<string>} [options.exclusions=[]] An array of patterns to exclude links. Empty array by default to not exclude anything. | ||
* @param {number} [options.concurrency=1] Number of concurrent pages (browser tabs) to be used during crawling. One by default. | ||
* @param {boolean} [options.quit=false] Terminates the scan as soon as an error is found. False (off) by default. | ||
* @param {boolean} [options.disableBrowserSandbox=false] Whether the browser should be created with the `--no-sandbox` flag. | ||
* @param {boolean} [options.noSpinner=false] Whether to display the spinner with progress or a raw message with current progress. | ||
* @param {boolean} [options.ignoreHTTPSErrors=false] Whether the browser should ignore invalid (self-signed) certificates. | ||
* @returns {Promise} Promise is resolved, when the crawler has finished the whole crawling procedure. | ||
@@ -110,7 +110,7 @@ */ | ||
* | ||
* @param {Object} options | ||
* @param {Boolean} [options.disableBrowserSandbox] Whether the browser should be created with the `--no-sandbox` flag. | ||
* @param {Boolean} [options.ignoreHTTPSErrors] Whether the browser should ignore invalid (self-signed) certificates. | ||
* @param {object} options | ||
* @param {boolean} [options.disableBrowserSandbox] Whether the browser should be created with the `--no-sandbox` flag. | ||
* @param {boolean} [options.ignoreHTTPSErrors] Whether the browser should ignore invalid (self-signed) certificates. | ||
* | ||
* @returns {Promise.<Object>} A promise, which resolves to the Puppeteer browser instance. | ||
* @returns {Promise.<object>} A promise, which resolves to the Puppeteer browser instance. | ||
*/ | ||
@@ -185,12 +185,12 @@ async function createBrowser( options ) { | ||
* | ||
* @param {Object} browser The headless browser instance from Puppeteer. | ||
* @param {Object} data All data needed for crawling the links. | ||
* @param {String} data.baseUrl The base URL from the initial page URL. | ||
* @param {object} browser The headless browser instance from Puppeteer. | ||
* @param {object} data All data needed for crawling the links. | ||
* @param {string} data.baseUrl The base URL from the initial page URL. | ||
* @param {Array.<Link>} data.linksQueue An array of link to crawl. | ||
* @param {Array.<String>} data.foundLinks An array of all links, which have been already discovered. | ||
* @param {Array.<String>} data.exclusions An array of patterns to exclude links. Empty array by default to not exclude anything. | ||
* @param {Number} data.concurrency Number of concurrent pages (browser tabs) to be used during crawling. | ||
* @param {Boolean} data.quit Terminates the scan as soon as an error is found. | ||
* @param {Function} data.onError Callback called ever time an error has been found. | ||
* @param {Function} data.onProgress Callback called every time just before opening a new link. | ||
* @param {Array.<string>} data.foundLinks An array of all links, which have been already discovered. | ||
* @param {Array.<string>} data.exclusions An array of patterns to exclude links. Empty array by default to not exclude anything. | ||
* @param {number} data.concurrency Number of concurrent pages (browser tabs) to be used during crawling. | ||
* @param {boolean} data.quit Terminates the scan as soon as an error is found. | ||
* @param {function} data.onError Callback called ever time an error has been found. | ||
* @param {function} data.onProgress Callback called every time just before opening a new link. | ||
* @returns {Promise} Promise is resolved, when all links have been visited. | ||
@@ -260,8 +260,8 @@ */ | ||
* | ||
* @param {Object} browser The headless browser instance from Puppeteer. | ||
* @param {Object} data All data needed for crawling the link. | ||
* @param {String} data.baseUrl The base URL from the initial page URL. | ||
* @param {object} browser The headless browser instance from Puppeteer. | ||
* @param {object} data All data needed for crawling the link. | ||
* @param {string} data.baseUrl The base URL from the initial page URL. | ||
* @param {Link} data.link A link to crawl. | ||
* @param {Array.<String>} data.foundLinks An array of all links, which have been already discovered. | ||
* @param {Array.<String>} data.exclusions An array of patterns to exclude links. Empty array by default to not exclude anything. | ||
* @param {Array.<string>} data.foundLinks An array of all links, which have been already discovered. | ||
* @param {Array.<string>} data.exclusions An array of patterns to exclude links. Empty array by default to not exclude anything. | ||
* @returns {Promise.<ErrorsAndLinks>} A promise, which resolves to a collection of unique errors and links. | ||
@@ -337,8 +337,8 @@ */ | ||
* | ||
* @param {Object} page The page instance from Puppeteer. | ||
* @param {Object} data All data needed for crawling the link. | ||
* @param {String} data.baseUrl The base URL from the initial page URL. | ||
* @param {Array.<String>} data.foundLinks An array of all links, which have been already discovered. | ||
* @param {Array.<String>} data.exclusions An array patterns to exclude links. Empty array by default to not exclude anything. | ||
* @returns {Promise.<Array.<String>>} A promise, which resolves to an array of unique links. | ||
* @param {object} page The page instance from Puppeteer. | ||
* @param {object} data All data needed for crawling the link. | ||
* @param {string} data.baseUrl The base URL from the initial page URL. | ||
* @param {Array.<string>} data.foundLinks An array of all links, which have been already discovered. | ||
* @param {Array.<string>} data.exclusions An array patterns to exclude links. Empty array by default to not exclude anything. | ||
* @returns {Promise.<Array.<string>>} A promise, which resolves to an array of unique links. | ||
*/ | ||
@@ -375,4 +375,4 @@ async function getLinksFromPage( page, { baseUrl, foundLinks, exclusions } ) { | ||
* | ||
* @param {Object} page The page instance from Puppeteer. | ||
* @returns {Promise.<Map.<ErrorType, Set.<String>>>} A promise, which resolves to a map between an error type and a set of patterns. | ||
* @param {object} page The page instance from Puppeteer. | ||
* @returns {Promise.<Map.<ErrorType, Set.<string>>>} A promise, which resolves to a map between an error type and a set of patterns. | ||
*/ | ||
@@ -425,3 +425,3 @@ async function getErrorIgnorePatternsFromPage( page ) { | ||
* @param {Array.<Error>} errors An array of errors to check. | ||
* @param {Map.<ErrorType, Set.<String>>} errorIgnorePatterns A map between an error type and a set of patterns. | ||
* @param {Map.<ErrorType, Set.<string>>} errorIgnorePatterns A map between an error type and a set of patterns. | ||
*/ | ||
@@ -463,7 +463,7 @@ function markErrorsAsIgnored( errors, errorIgnorePatterns ) { | ||
* | ||
* @param {Object} browser The headless browser instance from Puppeteer. | ||
* @param {Object} data All data needed for creating a new page. | ||
* @param {object} browser The headless browser instance from Puppeteer. | ||
* @param {object} data All data needed for creating a new page. | ||
* @param {Link} data.link A link to crawl. | ||
* @param {Function} data.onError Callback called every time just before opening a new link. | ||
* @returns {Promise.<Object>} A promise, which resolves to the page instance from Puppeteer. | ||
* @param {function} data.onError Callback called every time just before opening a new link. | ||
* @returns {Promise.<object>} A promise, which resolves to the page instance from Puppeteer. | ||
*/ | ||
@@ -489,3 +489,3 @@ async function createPage( browser, { link, onError } ) { | ||
* | ||
* @param {Object} page The page instance from Puppeteer. | ||
* @param {object} page The page instance from Puppeteer. | ||
*/ | ||
@@ -501,6 +501,6 @@ function dismissDialogs( page ) { | ||
* | ||
* @param {Object} page The page instance from Puppeteer. | ||
* @param {Object} data All data needed for registering error handlers. | ||
* @param {object} page The page instance from Puppeteer. | ||
* @param {object} data All data needed for registering error handlers. | ||
* @param {Link} data.link A link to crawl associated with Puppeteer's page. | ||
* @param {Function} data.onError Called each time an error has been found. | ||
* @param {function} data.onError Called each time an error has been found. | ||
*/ | ||
@@ -622,4 +622,4 @@ function registerErrorHandlers( page, { link, onError } ) { | ||
* | ||
* @param {Object} request The Puppeteer's HTTP request instance. | ||
* @returns {Boolean} | ||
* @param {object} request The Puppeteer's HTTP request instance. | ||
* @returns {boolean} | ||
*/ | ||
@@ -633,4 +633,4 @@ function isNavigationRequest( request ) { | ||
* | ||
* @param {Object} page The page instance from Puppeteer. | ||
* @returns {Promise.<Boolean>} | ||
* @param {object} page The page instance from Puppeteer. | ||
* @returns {Promise.<boolean>} | ||
*/ | ||
@@ -647,3 +647,3 @@ async function isPageResponding( page ) { | ||
* | ||
* @param {Object} page The page instance from Puppeteer. | ||
* @param {object} page The page instance from Puppeteer. | ||
* @returns {Promise} Promise is resolved, when the request interception procedure is registered. | ||
@@ -709,33 +709,33 @@ */ | ||
/** | ||
* @typedef {Object.<String, String|Number>} Link | ||
* @property {String} url The URL associated with the link. | ||
* @property {String} parentUrl The page on which the link was found. | ||
* @property {Number} remainingNestedLevels The remaining number of nested levels to be checked. If this value is 0, the | ||
* @typedef {Object.<string, String|Number>} Link | ||
* @property {string} url The URL associated with the link. | ||
* @property {string} parentUrl The page on which the link was found. | ||
* @property {number} remainingNestedLevels The remaining number of nested levels to be checked. If this value is 0, the | ||
* requested traversing depth has been reached and nested links from the URL associated with this link are not collected anymore. | ||
* @property {Number} remainingAttempts The total number of reopenings allowed for the given link. | ||
* @property {number} remainingAttempts The total number of reopenings allowed for the given link. | ||
*/ | ||
/** | ||
* @typedef {Object.<String, String>} ErrorType | ||
* @property {String} [event] The event name emitted by Puppeteer. | ||
* @property {String} description Human-readable description of the error. | ||
* @typedef {Object.<string, String>} ErrorType | ||
* @property {string} [event] The event name emitted by Puppeteer. | ||
* @property {string} description Human-readable description of the error. | ||
*/ | ||
/** | ||
* @typedef {Object.<String, String|Boolean|ErrorType>} Error | ||
* @property {String} pageUrl The URL, where error has occurred. | ||
* @typedef {Object.<string, String|Boolean|ErrorType>} Error | ||
* @property {string} pageUrl The URL, where error has occurred. | ||
* @property {ErrorType} type Error type. | ||
* @property {String} message Error message. | ||
* @property {String} [failedResourceUrl] Full resource URL, that has failed. Necessary for matching against exclusion patterns. | ||
* @property {Boolean} [ignored] Indicates that error should be ignored, because its message matches the exclusion pattern. | ||
* @property {string} message Error message. | ||
* @property {string} [failedResourceUrl] Full resource URL, that has failed. Necessary for matching against exclusion patterns. | ||
* @property {boolean} [ignored] Indicates that error should be ignored, because its message matches the exclusion pattern. | ||
*/ | ||
/** | ||
* @typedef {Object.<String, Set.<String>>} ErrorOccurrence | ||
* @property {Set.<String>} pages A set of unique pages, where error has been found. | ||
* @property {Set.<String>} [details] Additional error details (i.e. an error stack). | ||
* @typedef {Object.<string, Set.<string>>} ErrorOccurrence | ||
* @property {Set.<string>} pages A set of unique pages, where error has been found. | ||
* @property {Set.<string>} [details] Additional error details (i.e. an error stack). | ||
*/ | ||
/** | ||
* @typedef {Map.<String, ErrorOccurrence>} ErrorCollection | ||
* @typedef {Map.<string, ErrorOccurrence>} ErrorCollection | ||
* @property {ErrorOccurrence} [*] Error message. | ||
@@ -745,5 +745,5 @@ */ | ||
/** | ||
* @typedef {Object.<String, Array.<String>>} ErrorsAndLinks Collection of unique errors and links. | ||
* @property {Array.<String>} errors An array of errors. | ||
* @property {Array.<String>} links An array of links. | ||
* @typedef {Object.<string, Array.<string>>} ErrorsAndLinks Collection of unique errors and links. | ||
* @property {Array.<string>} errors An array of errors. | ||
* @property {Array.<string>} links An array of links. | ||
*/ |
@@ -15,4 +15,4 @@ #!/usr/bin/env node | ||
* Creates nice-looking CLI spinner. | ||
* @param {Object} options | ||
* @param {Boolean} [options.noSpinner=false] Whether to display the spinner with progress or a message with current progress. | ||
* @param {object} options | ||
* @param {boolean} [options.noSpinner=false] Whether to display the spinner with progress or a message with current progress. | ||
*/ | ||
@@ -33,5 +33,5 @@ export function createSpinner( { noSpinner } ) { | ||
* | ||
* @param {Object} spinner Spinner instance | ||
* @param {Object} options | ||
* @param {Boolean} [options.verbose] Whether to display raw log instead of modifying the spinner instance. | ||
* @param {object} spinner Spinner instance | ||
* @param {object} options | ||
* @param {boolean} [options.verbose] Whether to display raw log instead of modifying the spinner instance. | ||
* @returns {Function} Progress handler. | ||
@@ -38,0 +38,0 @@ */ |
@@ -14,4 +14,4 @@ #!/usr/bin/env node | ||
* | ||
* @param {String} url Page URL. | ||
* @returns {String} Base URL from page URL. | ||
* @param {string} url Page URL. | ||
* @returns {string} Base URL from page URL. | ||
*/ | ||
@@ -27,4 +27,4 @@ export function getBaseUrl( url ) { | ||
* | ||
* @param {String} url The URL to validate. | ||
* @returns {Boolean} | ||
* @param {string} url The URL to validate. | ||
* @returns {boolean} | ||
*/ | ||
@@ -31,0 +31,0 @@ export function isUrlValid( url ) { |
{ | ||
"name": "@ckeditor/ckeditor5-dev-web-crawler", | ||
"version": "44.0.0-alpha.5", | ||
"version": "44.0.0", | ||
"description": "Used to run a web crawler that checks for errors on specified pages.", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
33367