Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
///
import {readFileSync} from "fs";
import {resolve, URL} from "url";
// tslint:disable-next-line:no-var-requires
const validator = require("amphtml-validator").newInstance(
// Let's not fetch over the network on every run.
// Use `yarn run update-validator` to update.
// tslint:disable-next-line:no-var-requires
readFileSync(`${__dirname}/validator.js`).toString(),
);
import * as cheerio from "cheerio";
import throat = require("throat");
import {default as fetch, Request, RequestInit, Response} from "node-fetch";
import {basename} from "path";
import * as probe from "probe-image-size";
import * as punycode from "punycode";
import * as readline from "readline";
const CONCURRENCY = 8;
const UA_GOOGLEBOT_MOBILE = [
(() => {
const validator = ampHtmlValidator.newInstance("");
const result = validator.validateString("", "AMP4ADS");
const { status, errors } = result;
})();