@chromatic-com/cypress 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../../../node_modules/graceful-fs/graceful-fs.js","../../../node_modules/jsonfile/utils.js","../../../node_modules/jsonfile/index.js","../../../node_modules/fs-extra/lib/json/jsonfile.js","../../../node_modules/fs-extra/lib/output-file/index.js","../../../node_modules/fs-extra/lib/json/output-json.js","../../../node_modules/fs-extra/lib/json/output-json-sync.js","../../../node_modules/fs-extra/lib/json/index.js","../../../node_modules/fs-extra/lib/move/move.js","../../../node_modules/fs-extra/lib/move/move-sync.js","../../../node_modules/fs-extra/lib/move/index.js","../../../node_modules/fs-extra/lib/index.js","../../../node_modules/mime/Mime.js","../../../node_modules/mime/types/standard.js"],"names":["CDP","Version","console","finalEOL","replacer","spaces","EOL","replace","jn","content","Buffer","isBuffer","toString","t","i","wi","stripBom","module","stringify","require_jsonfile","exports","_fs","universalify","require","_readFile","options","e","__require","encoding","fs","throws","fromCallback","readFile","data","reviver","err","message","file","fromPromise","readFileSync","a","Sn","En","shouldThrow","n","bn","JSON","parse","qn","obj","$i","writeFile","str","_writeFile","writeFileSync","jsonfile","jsonFile","readJson","readJsonSync","writeJson","writeJsonSync","__commonJSMin","nt","h","nr","et","u","path","ki","mkdir","pathExists","dirname","itDoes","mkdirs","callback","outputFile","outputFileSync","existsSync","Li","mkdirsSync","args","require_output_json","o","outputJson","require_output_json_sync","p","outputJsonSync","c","require_json","l","outputJSON","outputJSONSync","writeJSON","writeJSONSync","readJSON","readJSONSync","On","require_move","remove","mkdirp","stat","j","I","move","src","opts","cb","overwrite","clobber","checkPaths","dest","_","srcStat","isChangingCase","stats","checkParentPaths","r","d","isParentRoot","doRename","parent","root","ci","it","tt","rename","destExists","m","__name","code","moveAcrossDevice","copy","errorOnExist","preserveTimestamps","require_move_sync","copySync","removeSync","mkdirpSync","f","checkPathsSync","checkParentPathsSync","K","moveSync","s","Error","y","renameSync","require_lib","Mime","_types","Object","create","v","_extensions","arguments","length","define","bind","getType","getExtension","prototype","force","extensions","typeMap","toLowerCase","type","ext","substr","String","last","hasPath","rt","Cn","test","RegExp","at","ct","pr","pt","Nn","Dn","W","sr","Ai","q","z","Tn","_n","$n","bi","T","ji","Ln","mt","ii","writeArchives","testTitle","domSnapshots","resourceArchive","chromaticStorybookParams","pageUrl","bufferedArchiveList","entries","map","key","value","body","from","allSnapshots","fromEntries","name","snapshot","index","writeTestResult","title","outputDir","watcher","host","port","setupNetworkListener","allowedDomains","webSocketDebuggerUrl","cdp","target","Watcher","watch","log","saveArchives","archiveInfo","Promise","resolve","archive","then","prepareArchives","action","payload","onBeforeBrowserLaunch","browser","launchOptions","config","isTextTerminal","hostArg","find","arg","startsWith","split","portArg","portString","process","env","ELECTRON_EXTRA_LAUNCH_ARGS","item","parseInt","installPlugin","on"],"mappings":"2UACA,OAAOA,IAAOC,WAAAA,OAAe,kECqCzBC,cAAAA,OAHM,gICnC6BC,GAAAA,OAAW,OAAMC,GAAW,OAAMC,eAChDC,GAAM,OAG7B,yBAAWC,GAAQ,OAAOD,oBAG5BE,GAAA,OAAmBC,eAEbC,GAAOC,OAAAA,UAAqCC,eACzCH,GAAQF,EAAAA,CAAAA,EAAAA,EAAAA,IAAQM,KAAAC,EAAWC,GACpCD,EAJSE,EAAAA,CAAAA,WAAAA,GAMTC,aAAmBC,GAAAA,SAAWF,GAAAA,MAAAA,CAAS,CAAA,EAAAF,ECbvCD,CAAA,EAAAM,EDUiBZ,MCVjBa,EAAAA,EAAAA,CAAAH,EAAAA,IAAAF,GAAAD,EAAIO,OAEFA,CAAAA,MACFR,EAAA,aAEA,EACA,CAAA,EANAO,KAMME,GAAeC,GAAAA,OACbL,GAAWF,IAAAA,GAAQ,OAE3B,MAAA,IAAA,IAAeQ,MAAiBC,EAAW,CAAA,IACrC,CAAAZ,EAAAa,KAAmB,OAAAC,GACTC,IAAAA,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IJ0E,OAAAA,GAAOkC,SAASL,EAAY,EAAA,EAErBT,CACT,EApCqC,yBAsCxBe,GAAgB7H,EAAA,CAAC8H,EAA0Bf,IAAAA,CAEtDe,EAAG,OAAQ,CACTrB,gBAAAA,EACF,CAAA,EACAqB,EACE,wBACA,CAACjB,EAA0BC,IAAAA,CACzBF,GAAsBC,EAASC,EAAeC,CAAAA,CAChD,CAAA,CAEJ,EAX6B","sourcesContent":["import type { elementNode } from 'rrweb-snapshot';\nimport CDP, { Version } from 'chrome-remote-interface';\nimport {\n Watcher,\n writeTestResult,\n ChromaticStorybookParameters,\n ResourceArchive,\n} from '@chromatic-com/shared-e2e';\n\ninterface CypressSnapshot {\n // the name of the snapshot (optionally provided for manual snapshots, never provided for automatic snapshots)\n name?: string;\n // the DOM snapshot\n snapshot: elementNode;\n}\n\ninterface WriteParams {\n testTitle: string;\n domSnapshots: CypressSnapshot[];\n chromaticStorybookParams: ChromaticStorybookParameters;\n pageUrl: string;\n}\n\ninterface WriteArchivesParams extends WriteParams {\n resourceArchive: ResourceArchive;\n}\n\nconst writeArchives = async ({\n testTitle,\n domSnapshots,\n resourceArchive,\n chromaticStorybookParams,\n pageUrl,\n}: WriteArchivesParams) => {\n const bufferedArchiveList = Object.entries(resourceArchive).map(([key, value]) => {\n return [\n key,\n {\n ...value,\n // we can't use Buffer in the browser (when we collect the responses)\n // so we go through one by one here and bufferize them\n // @ts-expect-error will fix when Cypress has its own package\n body: Buffer.from(value.body, 'utf8'),\n },\n ];\n });\n\n const allSnapshots = Object.fromEntries(\n // manual snapshots can be given a name; otherwise, just use the snapshot's place in line as the name\n domSnapshots.map(({ name, snapshot }, index) => [\n name ?? `Snapshot #${index + 1}`,\n Buffer.from(JSON.stringify(snapshot)),\n ])\n );\n\n await writeTestResult(\n {\n title: testTitle,\n // this will store it at ./cypress/downloads (the last directory doesn't matter)\n // TODO: change so we don't have to do this trickery\n outputDir: './cypress/downloads/some',\n pageUrl,\n },\n allSnapshots,\n Object.fromEntries(bufferedArchiveList),\n chromaticStorybookParams\n );\n};\n\n// using a single Watcher instance across all tests (for the test run)\n// each time a test completes, we'll save to disk whatever archives are there at that point.\n// This should be safe since the same resource from the same URL should be the same during the entire test run.\n// Cypress doesn't give us a way to share variables between the \"before test\" and \"after test\" lifecycle events on the server.\nlet watcher: Watcher = null;\n\nlet host = '';\nlet port = 0;\n\nconst setupNetworkListener = async ({\n allowedDomains,\n}: {\n allowedDomains?: string[];\n}): Promise<null> => {\n try {\n const { webSocketDebuggerUrl } = await Version({\n host,\n port,\n });\n\n const cdp = await CDP({\n target: webSocketDebuggerUrl,\n });\n\n if (!watcher) {\n watcher = new Watcher(cdp, allowedDomains);\n await watcher.watch();\n }\n } catch (err) {\n console.log('err', err);\n }\n\n return null;\n};\n\nconst saveArchives = (archiveInfo: WriteParams) => {\n return new Promise((resolve) => {\n // the watcher's archives come from the server, everything else (DOM snapshots, test info, etc) comes from the browser\n // notice we're not calling + awaiting watcher.idle() here...\n // that's because in Cypress, cy.visit() waits until all resources have loaded before finishing\n // so at this point (after the test) we're confident that the resources are all there already without having to wait more\n return writeArchives({ ...archiveInfo, resourceArchive: watcher.archive }).then(() => {\n resolve(null);\n });\n });\n};\n\ninterface TaskParams {\n action: 'setup-network-listener' | 'save-archives';\n payload?: any;\n}\n\n// Handles all server-side tasks, dispatching each to its proper handler.\n// Why? So users don't have to register all these individual tasks\n// (they can just import and register prepareArchives)\nexport const prepareArchives = async ({ action, payload }: TaskParams) => {\n switch (action) {\n case 'setup-network-listener':\n return setupNetworkListener(payload);\n case 'save-archives':\n return saveArchives(payload);\n default:\n return null;\n }\n};\n\n// We use this lifecycle hook because we need to know what host and port Chrome Devtools Protocol is listening at.\nexport const onBeforeBrowserLaunch = (\n // we don't use the browser parameter but we're keeping it here in case we'd ever need to read from it\n // (this way users wouldn't have to change their cypress.config file as it's already passed to us)\n browser: Cypress.Browser,\n launchOptions: Cypress.BeforeBrowserLaunchOptions,\n config: Cypress.PluginConfigOptions\n) => {\n // don't take snapshots when running `cypress open`\n if (!config.isTextTerminal) {\n return launchOptions;\n }\n\n const hostArg = launchOptions.args.find((arg) => arg.startsWith('--remote-debugging-address='));\n host = hostArg ? hostArg.split('=')[1] : '127.0.0.1';\n\n const portArg = launchOptions.args.find((arg) => arg.startsWith('--remote-debugging-port='));\n let portString = '';\n\n if (portArg) {\n [, portString] = portArg.split('=');\n } else if (process.env.ELECTRON_EXTRA_LAUNCH_ARGS) {\n // Electron doesn't pass along the address and port in the launch options, so we need to read the port from the\n // environment variable that we'll require the user to use (this assumes the host will be 127.0.0.1).\n const entry = process.env.ELECTRON_EXTRA_LAUNCH_ARGS.split(' ').find((item) =>\n item.startsWith('--remote-debugging-port')\n );\n [, portString] = entry.split('=');\n } else {\n throw new Error(\n 'Please provide a port number \\nExample: ELECTRON_EXTRA_LAUNCH_ARGS=--remote-debugging-port=<port-number> yarn cypress run'\n );\n }\n\n port = parseInt(portString, 10);\n\n return launchOptions;\n};\n\nexport const installPlugin = (on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) => {\n // these events are run on the server (in Node)\n on('task', {\n prepareArchives,\n });\n on(\n 'before:browser:launch',\n (browser: Cypress.Browser, launchOptions: Cypress.BeforeBrowserLaunchOptions) => {\n onBeforeBrowserLaunch(browser, launchOptions, config);\n }\n );\n};\n","var fs = require('fs')\nvar polyfills = require('./polyfills.js')\nvar legacy = require('./legacy-streams.js')\nvar clone = require('./clone.js')\n\nvar util = require('util')\n\n/* istanbul ignore next - node 0.x polyfill */\nvar gracefulQueue\nvar previousSymbol\n\n/* istanbul ignore else - node 0.x polyfill */\nif (typeof Symbol === 'function' && typeof Symbol.for === 'function') {\n gracefulQueue = Symbol.for('graceful-fs.queue')\n // This is used in testing by future versions\n previousSymbol = Symbol.for('graceful-fs.previous')\n} else {\n gracefulQueue = '___graceful-fs.queue'\n previousSymbol = '___graceful-fs.previous'\n}\n\nfunction noop () {}\n\nfunction publishQueue(context, queue) {\n Object.defineProperty(context, gracefulQueue, {\n get: function() {\n return queue\n }\n })\n}\n\nvar debug = noop\nif (util.debuglog)\n debug = util.debuglog('gfs4')\nelse if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || ''))\n debug = function() {\n var m = util.format.apply(util, arguments)\n m = 'GFS4: ' + m.split(/\\n/).join('\\nGFS4: ')\n console.error(m)\n }\n\n// Once time initialization\nif (!fs[gracefulQueue]) {\n // This queue can be shared by multiple loaded instances\n var queue = global[gracefulQueue] || []\n publishQueue(fs, queue)\n\n // Patch fs.close/closeSync to shared queue version, because we need\n // to retry() whenever a close happens *anywhere* in the program.\n // This is essential when multiple graceful-fs instances are\n // in play at the same time.\n fs.close = (function (fs$close) {\n function close (fd, cb) {\n return fs$close.call(fs, fd, function (err) {\n // This function uses the graceful-fs shared queue\n if (!err) {\n resetQueue()\n }\n\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n })\n }\n\n Object.defineProperty(close, previousSymbol, {\n value: fs$close\n })\n return close\n })(fs.close)\n\n fs.closeSync = (function (fs$closeSync) {\n function closeSync (fd) {\n // This function uses the graceful-fs shared queue\n fs$closeSync.apply(fs, arguments)\n resetQueue()\n }\n\n Object.defineProperty(closeSync, previousSymbol, {\n value: fs$closeSync\n })\n return closeSync\n })(fs.closeSync)\n\n if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || '')) {\n process.on('exit', function() {\n debug(fs[gracefulQueue])\n require('assert').equal(fs[gracefulQueue].length, 0)\n })\n }\n}\n\nif (!global[gracefulQueue]) {\n publishQueue(global, fs[gracefulQueue]);\n}\n\nmodule.exports = patch(clone(fs))\nif (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {\n module.exports = patch(fs)\n fs.__patched = true;\n}\n\nfunction patch (fs) {\n // Everything that references the open() function needs to be in here\n polyfills(fs)\n fs.gracefulify = patch\n\n fs.createReadStream = createReadStream\n fs.createWriteStream = createWriteStream\n var fs$readFile = fs.readFile\n fs.readFile = readFile\n function readFile (path, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$readFile(path, options, cb)\n\n function go$readFile (path, options, cb, startTime) {\n return fs$readFile(path, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$writeFile = fs.writeFile\n fs.writeFile = writeFile\n function writeFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$writeFile(path, data, options, cb)\n\n function go$writeFile (path, data, options, cb, startTime) {\n return fs$writeFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$appendFile = fs.appendFile\n if (fs$appendFile)\n fs.appendFile = appendFile\n function appendFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$appendFile(path, data, options, cb)\n\n function go$appendFile (path, data, options, cb, startTime) {\n return fs$appendFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$copyFile = fs.copyFile\n if (fs$copyFile)\n fs.copyFile = copyFile\n function copyFile (src, dest, flags, cb) {\n if (typeof flags === 'function') {\n cb = flags\n flags = 0\n }\n return go$copyFile(src, dest, flags, cb)\n\n function go$copyFile (src, dest, flags, cb, startTime) {\n return fs$copyFile(src, dest, flags, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$readdir = fs.readdir\n fs.readdir = readdir\n var noReaddirOptionVersions = /^v[0-5]\\./\n function readdir (path, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n var go$readdir = noReaddirOptionVersions.test(process.version)\n ? function go$readdir (path, options, cb, startTime) {\n return fs$readdir(path, fs$readdirCallback(\n path, options, cb, startTime\n ))\n }\n : function go$readdir (path, options, cb, startTime) {\n return fs$readdir(path, options, fs$readdirCallback(\n path, options, cb, startTime\n ))\n }\n\n return go$readdir(path, options, cb)\n\n function fs$readdirCallback (path, options, cb, startTime) {\n return function (err, files) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([\n go$readdir,\n [path, options, cb],\n err,\n startTime || Date.now(),\n Date.now()\n ])\n else {\n if (files && files.sort)\n files.sort()\n\n if (typeof cb === 'function')\n cb.call(this, err, files)\n }\n }\n }\n }\n\n if (process.version.substr(0, 4) === 'v0.8') {\n var legStreams = legacy(fs)\n ReadStream = legStreams.ReadStream\n WriteStream = legStreams.WriteStream\n }\n\n var fs$ReadStream = fs.ReadStream\n if (fs$ReadStream) {\n ReadStream.prototype = Object.create(fs$ReadStream.prototype)\n ReadStream.prototype.open = ReadStream$open\n }\n\n var fs$WriteStream = fs.WriteStream\n if (fs$WriteStream) {\n WriteStream.prototype = Object.create(fs$WriteStream.prototype)\n WriteStream.prototype.open = WriteStream$open\n }\n\n Object.defineProperty(fs, 'ReadStream', {\n get: function () {\n return ReadStream\n },\n set: function (val) {\n ReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n Object.defineProperty(fs, 'WriteStream', {\n get: function () {\n return WriteStream\n },\n set: function (val) {\n WriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n // legacy names\n var FileReadStream = ReadStream\n Object.defineProperty(fs, 'FileReadStream', {\n get: function () {\n return FileReadStream\n },\n set: function (val) {\n FileReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n var FileWriteStream = WriteStream\n Object.defineProperty(fs, 'FileWriteStream', {\n get: function () {\n return FileWriteStream\n },\n set: function (val) {\n FileWriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n function ReadStream (path, options) {\n if (this instanceof ReadStream)\n return fs$ReadStream.apply(this, arguments), this\n else\n return ReadStream.apply(Object.create(ReadStream.prototype), arguments)\n }\n\n function ReadStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n if (that.autoClose)\n that.destroy()\n\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n that.read()\n }\n })\n }\n\n function WriteStream (path, options) {\n if (this instanceof WriteStream)\n return fs$WriteStream.apply(this, arguments), this\n else\n return WriteStream.apply(Object.create(WriteStream.prototype), arguments)\n }\n\n function WriteStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n that.destroy()\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n }\n })\n }\n\n function createReadStream (path, options) {\n return new fs.ReadStream(path, options)\n }\n\n function createWriteStream (path, options) {\n return new fs.WriteStream(path, options)\n }\n\n var fs$open = fs.open\n fs.open = open\n function open (path, flags, mode, cb) {\n if (typeof mode === 'function')\n cb = mode, mode = null\n\n return go$open(path, flags, mode, cb)\n\n function go$open (path, flags, mode, cb, startTime) {\n return fs$open(path, flags, mode, function (err, fd) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n return fs\n}\n\nfunction enqueue (elem) {\n debug('ENQUEUE', elem[0].name, elem[1])\n fs[gracefulQueue].push(elem)\n retry()\n}\n\n// keep track of the timeout between retry() calls\nvar retryTimer\n\n// reset the startTime and lastTime to now\n// this resets the start of the 60 second overall timeout as well as the\n// delay between attempts so that we'll retry these jobs sooner\nfunction resetQueue () {\n var now = Date.now()\n for (var i = 0; i < fs[gracefulQueue].length; ++i) {\n // entries that are only a length of 2 are from an older version, don't\n // bother modifying those since they'll be retried anyway.\n if (fs[gracefulQueue][i].length > 2) {\n fs[gracefulQueue][i][3] = now // startTime\n fs[gracefulQueue][i][4] = now // lastTime\n }\n }\n // call retry to make sure we're actively processing the queue\n retry()\n}\n\nfunction retry () {\n // clear the timer and remove it to help prevent unintended concurrency\n clearTimeout(retryTimer)\n retryTimer = undefined\n\n if (fs[gracefulQueue].length === 0)\n return\n\n var elem = fs[gracefulQueue].shift()\n var fn = elem[0]\n var args = elem[1]\n // these items may be unset if they were added by an older graceful-fs\n var err = elem[2]\n var startTime = elem[3]\n var lastTime = elem[4]\n\n // if we don't have a startTime we have no way of knowing if we've waited\n // long enough, so go ahead and retry this item now\n if (startTime === undefined) {\n debug('RETRY', fn.name, args)\n fn.apply(null, args)\n } else if (Date.now() - startTime >= 60000) {\n // it's been more than 60 seconds total, bail now\n debug('TIMEOUT', fn.name, args)\n var cb = args.pop()\n if (typeof cb === 'function')\n cb.call(null, err)\n } else {\n // the amount of time between the last attempt and right now\n var sinceAttempt = Date.now() - lastTime\n // the amount of time between when we first tried, and when we last tried\n // rounded up to at least 1\n var sinceStart = Math.max(lastTime - startTime, 1)\n // backoff. wait longer than the total time we've been retrying, but only\n // up to a maximum of 100ms\n var desiredDelay = Math.min(sinceStart * 1.2, 100)\n // it's been long enough since the last retry, do it again\n if (sinceAttempt >= desiredDelay) {\n debug('RETRY', fn.name, args)\n fn.apply(null, args.concat([startTime]))\n } else {\n // if we can't do this job yet, push it to the end of the queue\n // and let the next iteration check again\n fs[gracefulQueue].push(elem)\n }\n }\n\n // schedule our next run if one isn't already scheduled\n if (retryTimer === undefined) {\n retryTimer = setTimeout(retry, 0)\n }\n}\n","function stringify (obj, { EOL = '\\n', finalEOL = true, replacer = null, spaces } = {}) {\n const EOF = finalEOL ? EOL : ''\n const str = JSON.stringify(obj, replacer, spaces)\n\n return str.replace(/\\n/g, EOL) + EOF\n}\n\nfunction stripBom (content) {\n // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified\n if (Buffer.isBuffer(content)) content = content.toString('utf8')\n return content.replace(/^\\uFEFF/, '')\n}\n\nmodule.exports = { stringify, stripBom }\n","let _fs\ntry {\n _fs = require('graceful-fs')\n} catch (_) {\n _fs = require('fs')\n}\nconst universalify = require('universalify')\nconst { stringify, stripBom } = require('./utils')\n\nasync function _readFile (file, options = {}) {\n if (typeof options === 'string') {\n options = { encoding: options }\n }\n\n const fs = options.fs || _fs\n\n const shouldThrow = 'throws' in options ? options.throws : true\n\n let data = await universalify.fromCallback(fs.readFile)(file, options)\n\n data = stripBom(data)\n\n let obj\n try {\n obj = JSON.parse(data, options ? options.reviver : null)\n } catch (err) {\n if (shouldThrow) {\n err.message = `${file}: ${err.message}`\n throw err\n } else {\n return null\n }\n }\n\n return obj\n}\n\nconst readFile = universalify.fromPromise(_readFile)\n\nfunction readFileSync (file, options = {}) {\n if (typeof options === 'string') {\n options = { encoding: options }\n }\n\n const fs = options.fs || _fs\n\n const shouldThrow = 'throws' in options ? options.throws : true\n\n try {\n let content = fs.readFileSync(file, options)\n content = stripBom(content)\n return JSON.parse(content, options.reviver)\n } catch (err) {\n if (shouldThrow) {\n err.message = `${file}: ${err.message}`\n throw err\n } else {\n return null\n }\n }\n}\n\nasync function _writeFile (file, obj, options = {}) {\n const fs = options.fs || _fs\n\n const str = stringify(obj, options)\n\n await universalify.fromCallback(fs.writeFile)(file, str, options)\n}\n\nconst writeFile = universalify.fromPromise(_writeFile)\n\nfunction writeFileSync (file, obj, options = {}) {\n const fs = options.fs || _fs\n\n const str = stringify(obj, options)\n // not sure if fs.writeFileSync returns anything, but just in case\n return fs.writeFileSync(file, str, options)\n}\n\nconst jsonfile = {\n readFile,\n readFileSync,\n writeFile,\n writeFileSync\n}\n\nmodule.exports = jsonfile\n","'use strict'\n\nconst jsonFile = require('jsonfile')\n\nmodule.exports = {\n // jsonfile exports\n readJson: jsonFile.readFile,\n readJsonSync: jsonFile.readFileSync,\n writeJson: jsonFile.writeFile,\n writeJsonSync: jsonFile.writeFileSync\n}\n","'use strict'\n\nconst u = require('universalify').fromCallback\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst mkdir = require('../mkdirs')\nconst pathExists = require('../path-exists').pathExists\n\nfunction outputFile (file, data, encoding, callback) {\n if (typeof encoding === 'function') {\n callback = encoding\n encoding = 'utf8'\n }\n\n const dir = path.dirname(file)\n pathExists(dir, (err, itDoes) => {\n if (err) return callback(err)\n if (itDoes) return fs.writeFile(file, data, encoding, callback)\n\n mkdir.mkdirs(dir, err => {\n if (err) return callback(err)\n\n fs.writeFile(file, data, encoding, callback)\n })\n })\n}\n\nfunction outputFileSync (file, ...args) {\n const dir = path.dirname(file)\n if (fs.existsSync(dir)) {\n return fs.writeFileSync(file, ...args)\n }\n mkdir.mkdirsSync(dir)\n fs.writeFileSync(file, ...args)\n}\n\nmodule.exports = {\n outputFile: u(outputFile),\n outputFileSync\n}\n","'use strict'\n\nconst { stringify } = require('jsonfile/utils')\nconst { outputFile } = require('../output-file')\n\nasync function outputJson (file, data, options = {}) {\n const str = stringify(data, options)\n\n await outputFile(file, str, options)\n}\n\nmodule.exports = outputJson\n","'use strict'\n\nconst { stringify } = require('jsonfile/utils')\nconst { outputFileSync } = require('../output-file')\n\nfunction outputJsonSync (file, data, options) {\n const str = stringify(data, options)\n\n outputFileSync(file, str, options)\n}\n\nmodule.exports = outputJsonSync\n","'use strict'\n\nconst u = require('universalify').fromPromise\nconst jsonFile = require('./jsonfile')\n\njsonFile.outputJson = u(require('./output-json'))\njsonFile.outputJsonSync = require('./output-json-sync')\n// aliases\njsonFile.outputJSON = jsonFile.outputJson\njsonFile.outputJSONSync = jsonFile.outputJsonSync\njsonFile.writeJSON = jsonFile.writeJson\njsonFile.writeJSONSync = jsonFile.writeJsonSync\njsonFile.readJSON = jsonFile.readJson\njsonFile.readJSONSync = jsonFile.readJsonSync\n\nmodule.exports = jsonFile\n","'use strict'\n\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst copy = require('../copy').copy\nconst remove = require('../remove').remove\nconst mkdirp = require('../mkdirs').mkdirp\nconst pathExists = require('../path-exists').pathExists\nconst stat = require('../util/stat')\n\nfunction move (src, dest, opts, cb) {\n if (typeof opts === 'function') {\n cb = opts\n opts = {}\n }\n\n opts = opts || {}\n\n const overwrite = opts.overwrite || opts.clobber || false\n\n stat.checkPaths(src, dest, 'move', opts, (err, stats) => {\n if (err) return cb(err)\n const { srcStat, isChangingCase = false } = stats\n stat.checkParentPaths(src, srcStat, dest, 'move', err => {\n if (err) return cb(err)\n if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb)\n mkdirp(path.dirname(dest), err => {\n if (err) return cb(err)\n return doRename(src, dest, overwrite, isChangingCase, cb)\n })\n })\n })\n}\n\nfunction isParentRoot (dest) {\n const parent = path.dirname(dest)\n const parsedPath = path.parse(parent)\n return parsedPath.root === parent\n}\n\nfunction doRename (src, dest, overwrite, isChangingCase, cb) {\n if (isChangingCase) return rename(src, dest, overwrite, cb)\n if (overwrite) {\n return remove(dest, err => {\n if (err) return cb(err)\n return rename(src, dest, overwrite, cb)\n })\n }\n pathExists(dest, (err, destExists) => {\n if (err) return cb(err)\n if (destExists) return cb(new Error('dest already exists.'))\n return rename(src, dest, overwrite, cb)\n })\n}\n\nfunction rename (src, dest, overwrite, cb) {\n fs.rename(src, dest, err => {\n if (!err) return cb()\n if (err.code !== 'EXDEV') return cb(err)\n return moveAcrossDevice(src, dest, overwrite, cb)\n })\n}\n\nfunction moveAcrossDevice (src, dest, overwrite, cb) {\n const opts = {\n overwrite,\n errorOnExist: true,\n preserveTimestamps: true\n }\n copy(src, dest, opts, err => {\n if (err) return cb(err)\n return remove(src, cb)\n })\n}\n\nmodule.exports = move\n","'use strict'\n\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst copySync = require('../copy').copySync\nconst removeSync = require('../remove').removeSync\nconst mkdirpSync = require('../mkdirs').mkdirpSync\nconst stat = require('../util/stat')\n\nfunction moveSync (src, dest, opts) {\n opts = opts || {}\n const overwrite = opts.overwrite || opts.clobber || false\n\n const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, 'move', opts)\n stat.checkParentPathsSync(src, srcStat, dest, 'move')\n if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest))\n return doRename(src, dest, overwrite, isChangingCase)\n}\n\nfunction isParentRoot (dest) {\n const parent = path.dirname(dest)\n const parsedPath = path.parse(parent)\n return parsedPath.root === parent\n}\n\nfunction doRename (src, dest, overwrite, isChangingCase) {\n if (isChangingCase) return rename(src, dest, overwrite)\n if (overwrite) {\n removeSync(dest)\n return rename(src, dest, overwrite)\n }\n if (fs.existsSync(dest)) throw new Error('dest already exists.')\n return rename(src, dest, overwrite)\n}\n\nfunction rename (src, dest, overwrite) {\n try {\n fs.renameSync(src, dest)\n } catch (err) {\n if (err.code !== 'EXDEV') throw err\n return moveAcrossDevice(src, dest, overwrite)\n }\n}\n\nfunction moveAcrossDevice (src, dest, overwrite) {\n const opts = {\n overwrite,\n errorOnExist: true,\n preserveTimestamps: true\n }\n copySync(src, dest, opts)\n return removeSync(src)\n}\n\nmodule.exports = moveSync\n","'use strict'\n\nconst u = require('universalify').fromCallback\nmodule.exports = {\n move: u(require('./move')),\n moveSync: require('./move-sync')\n}\n","'use strict'\n\nmodule.exports = {\n // Export promiseified graceful-fs:\n ...require('./fs'),\n // Export extra methods:\n ...require('./copy'),\n ...require('./empty'),\n ...require('./ensure'),\n ...require('./json'),\n ...require('./mkdirs'),\n ...require('./move'),\n ...require('./output-file'),\n ...require('./path-exists'),\n ...require('./remove')\n}\n","'use strict';\n\n/**\n * @param typeMap [Object] Map of MIME type -> Array[extensions]\n * @param ...\n */\nfunction Mime() {\n this._types = Object.create(null);\n this._extensions = Object.create(null);\n\n for (let i = 0; i < arguments.length; i++) {\n this.define(arguments[i]);\n }\n\n this.define = this.define.bind(this);\n this.getType = this.getType.bind(this);\n this.getExtension = this.getExtension.bind(this);\n}\n\n/**\n * Define mimetype -> extension mappings. Each key is a mime-type that maps\n * to an array of extensions associated with the type. The first extension is\n * used as the default extension for the type.\n *\n * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});\n *\n * If a type declares an extension that has already been defined, an error will\n * be thrown. To suppress this error and force the extension to be associated\n * with the new type, pass `force`=true. Alternatively, you may prefix the\n * extension with \"*\" to map the type to extension, without mapping the\n * extension to the type.\n *\n * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']});\n *\n *\n * @param map (Object) type definitions\n * @param force (Boolean) if true, force overriding of existing definitions\n */\nMime.prototype.define = function(typeMap, force) {\n for (let type in typeMap) {\n let extensions = typeMap[type].map(function(t) {\n return t.toLowerCase();\n });\n type = type.toLowerCase();\n\n for (let i = 0; i < extensions.length; i++) {\n const ext = extensions[i];\n\n // '*' prefix = not the preferred type for this extension. So fixup the\n // extension, and skip it.\n if (ext[0] === '*') {\n continue;\n }\n\n if (!force && (ext in this._types)) {\n throw new Error(\n 'Attempt to change mapping for \"' + ext +\n '\" extension from \"' + this._types[ext] + '\" to \"' + type +\n '\". Pass `force=true` to allow this, otherwise remove \"' + ext +\n '\" from the list of extensions for \"' + type + '\".'\n );\n }\n\n this._types[ext] = type;\n }\n\n // Use first extension as default\n if (force || !this._extensions[type]) {\n const ext = extensions[0];\n this._extensions[type] = (ext[0] !== '*') ? ext : ext.substr(1);\n }\n }\n};\n\n/**\n * Lookup a mime type based on extension\n */\nMime.prototype.getType = function(path) {\n path = String(path);\n let last = path.replace(/^.*[/\\\\]/, '').toLowerCase();\n let ext = last.replace(/^.*\\./, '').toLowerCase();\n\n let hasPath = last.length < path.length;\n let hasDot = ext.length < last.length - 1;\n\n return (hasDot || !hasPath) && this._types[ext] || null;\n};\n\n/**\n * Return file extension associated with a mime type\n */\nMime.prototype.getExtension = function(type) {\n type = /^\\s*([^;\\s]*)/.test(type) && RegExp.$1;\n return type && this._extensions[type.toLowerCase()] || null;\n};\n\nmodule.exports = Mime;\n","module.exports = {\"application/andrew-inset\":[\"ez\"],\"application/applixware\":[\"aw\"],\"application/atom+xml\":[\"atom\"],\"application/atomcat+xml\":[\"atomcat\"],\"application/atomdeleted+xml\":[\"atomdeleted\"],\"application/atomsvc+xml\":[\"atomsvc\"],\"application/atsc-dwd+xml\":[\"dwd\"],\"application/atsc-held+xml\":[\"held\"],\"application/atsc-rsat+xml\":[\"rsat\"],\"application/bdoc\":[\"bdoc\"],\"application/calendar+xml\":[\"xcs\"],\"application/ccxml+xml\":[\"ccxml\"],\"application/cdfx+xml\":[\"cdfx\"],\"application/cdmi-capability\":[\"cdmia\"],\"application/cdmi-container\":[\"cdmic\"],\"application/cdmi-domain\":[\"cdmid\"],\"application/cdmi-object\":[\"cdmio\"],\"application/cdmi-queue\":[\"cdmiq\"],\"application/cu-seeme\":[\"cu\"],\"application/dash+xml\":[\"mpd\"],\"application/davmount+xml\":[\"davmount\"],\"application/docbook+xml\":[\"dbk\"],\"application/dssc+der\":[\"dssc\"],\"application/dssc+xml\":[\"xdssc\"],\"application/ecmascript\":[\"es\",\"ecma\"],\"application/emma+xml\":[\"emma\"],\"application/emotionml+xml\":[\"emotionml\"],\"application/epub+zip\":[\"epub\"],\"application/exi\":[\"exi\"],\"application/express\":[\"exp\"],\"application/fdt+xml\":[\"fdt\"],\"application/font-tdpfr\":[\"pfr\"],\"application/geo+json\":[\"geojson\"],\"application/gml+xml\":[\"gml\"],\"application/gpx+xml\":[\"gpx\"],\"application/gxf\":[\"gxf\"],\"application/gzip\":[\"gz\"],\"application/hjson\":[\"hjson\"],\"application/hyperstudio\":[\"stk\"],\"application/inkml+xml\":[\"ink\",\"inkml\"],\"application/ipfix\":[\"ipfix\"],\"application/its+xml\":[\"its\"],\"application/java-archive\":[\"jar\",\"war\",\"ear\"],\"application/java-serialized-object\":[\"ser\"],\"application/java-vm\":[\"class\"],\"application/javascript\":[\"js\",\"mjs\"],\"application/json\":[\"json\",\"map\"],\"application/json5\":[\"json5\"],\"application/jsonml+json\":[\"jsonml\"],\"application/ld+json\":[\"jsonld\"],\"application/lgr+xml\":[\"lgr\"],\"application/lost+xml\":[\"lostxml\"],\"application/mac-binhex40\":[\"hqx\"],\"application/mac-compactpro\":[\"cpt\"],\"application/mads+xml\":[\"mads\"],\"application/manifest+json\":[\"webmanifest\"],\"application/marc\":[\"mrc\"],\"application/marcxml+xml\":[\"mrcx\"],\"application/mathematica\":[\"ma\",\"nb\",\"mb\"],\"application/mathml+xml\":[\"mathml\"],\"application/mbox\":[\"mbox\"],\"application/mediaservercontrol+xml\":[\"mscml\"],\"application/metalink+xml\":[\"metalink\"],\"application/metalink4+xml\":[\"meta4\"],\"application/mets+xml\":[\"mets\"],\"application/mmt-aei+xml\":[\"maei\"],\"application/mmt-usd+xml\":[\"musd\"],\"application/mods+xml\":[\"mods\"],\"application/mp21\":[\"m21\",\"mp21\"],\"application/mp4\":[\"mp4s\",\"m4p\"],\"application/msword\":[\"doc\",\"dot\"],\"application/mxf\":[\"mxf\"],\"application/n-quads\":[\"nq\"],\"application/n-triples\":[\"nt\"],\"application/node\":[\"cjs\"],\"application/octet-stream\":[\"bin\",\"dms\",\"lrf\",\"mar\",\"so\",\"dist\",\"distz\",\"pkg\",\"bpk\",\"dump\",\"elc\",\"deploy\",\"exe\",\"dll\",\"deb\",\"dmg\",\"iso\",\"img\",\"msi\",\"msp\",\"msm\",\"buffer\"],\"application/oda\":[\"oda\"],\"application/oebps-package+xml\":[\"opf\"],\"application/ogg\":[\"ogx\"],\"application/omdoc+xml\":[\"omdoc\"],\"application/onenote\":[\"onetoc\",\"onetoc2\",\"onetmp\",\"onepkg\"],\"application/oxps\":[\"oxps\"],\"application/p2p-overlay+xml\":[\"relo\"],\"application/patch-ops-error+xml\":[\"xer\"],\"application/pdf\":[\"pdf\"],\"application/pgp-encrypted\":[\"pgp\"],\"application/pgp-signature\":[\"asc\",\"sig\"],\"application/pics-rules\":[\"prf\"],\"application/pkcs10\":[\"p10\"],\"application/pkcs7-mime\":[\"p7m\",\"p7c\"],\"application/pkcs7-signature\":[\"p7s\"],\"application/pkcs8\":[\"p8\"],\"application/pkix-attr-cert\":[\"ac\"],\"application/pkix-cert\":[\"cer\"],\"application/pkix-crl\":[\"crl\"],\"application/pkix-pkipath\":[\"pkipath\"],\"application/pkixcmp\":[\"pki\"],\"application/pls+xml\":[\"pls\"],\"application/postscript\":[\"ai\",\"eps\",\"ps\"],\"application/provenance+xml\":[\"provx\"],\"application/pskc+xml\":[\"pskcxml\"],\"application/raml+yaml\":[\"raml\"],\"application/rdf+xml\":[\"rdf\",\"owl\"],\"application/reginfo+xml\":[\"rif\"],\"application/relax-ng-compact-syntax\":[\"rnc\"],\"application/resource-lists+xml\":[\"rl\"],\"application/resource-lists-diff+xml\":[\"rld\"],\"application/rls-services+xml\":[\"rs\"],\"application/route-apd+xml\":[\"rapd\"],\"application/route-s-tsid+xml\":[\"sls\"],\"application/route-usd+xml\":[\"rusd\"],\"application/rpki-ghostbusters\":[\"gbr\"],\"application/rpki-manifest\":[\"mft\"],\"application/rpki-roa\":[\"roa\"],\"application/rsd+xml\":[\"rsd\"],\"application/rss+xml\":[\"rss\"],\"application/rtf\":[\"rtf\"],\"application/sbml+xml\":[\"sbml\"],\"application/scvp-cv-request\":[\"scq\"],\"application/scvp-cv-response\":[\"scs\"],\"application/scvp-vp-request\":[\"spq\"],\"application/scvp-vp-response\":[\"spp\"],\"application/sdp\":[\"sdp\"],\"application/senml+xml\":[\"senmlx\"],\"application/sensml+xml\":[\"sensmlx\"],\"application/set-payment-initiation\":[\"setpay\"],\"application/set-registration-initiation\":[\"setreg\"],\"application/shf+xml\":[\"shf\"],\"application/sieve\":[\"siv\",\"sieve\"],\"application/smil+xml\":[\"smi\",\"smil\"],\"application/sparql-query\":[\"rq\"],\"application/sparql-results+xml\":[\"srx\"],\"application/srgs\":[\"gram\"],\"application/srgs+xml\":[\"grxml\"],\"application/sru+xml\":[\"sru\"],\"application/ssdl+xml\":[\"ssdl\"],\"application/ssml+xml\":[\"ssml\"],\"application/swid+xml\":[\"swidtag\"],\"application/tei+xml\":[\"tei\",\"teicorpus\"],\"application/thraud+xml\":[\"tfi\"],\"application/timestamped-data\":[\"tsd\"],\"application/toml\":[\"toml\"],\"application/trig\":[\"trig\"],\"application/ttml+xml\":[\"ttml\"],\"application/ubjson\":[\"ubj\"],\"application/urc-ressheet+xml\":[\"rsheet\"],\"application/urc-targetdesc+xml\":[\"td\"],\"application/voicexml+xml\":[\"vxml\"],\"application/wasm\":[\"wasm\"],\"application/widget\":[\"wgt\"],\"application/winhlp\":[\"hlp\"],\"application/wsdl+xml\":[\"wsdl\"],\"application/wspolicy+xml\":[\"wspolicy\"],\"application/xaml+xml\":[\"xaml\"],\"application/xcap-att+xml\":[\"xav\"],\"application/xcap-caps+xml\":[\"xca\"],\"application/xcap-diff+xml\":[\"xdf\"],\"application/xcap-el+xml\":[\"xel\"],\"application/xcap-ns+xml\":[\"xns\"],\"application/xenc+xml\":[\"xenc\"],\"application/xhtml+xml\":[\"xhtml\",\"xht\"],\"application/xliff+xml\":[\"xlf\"],\"application/xml\":[\"xml\",\"xsl\",\"xsd\",\"rng\"],\"application/xml-dtd\":[\"dtd\"],\"application/xop+xml\":[\"xop\"],\"application/xproc+xml\":[\"xpl\"],\"application/xslt+xml\":[\"*xsl\",\"xslt\"],\"application/xspf+xml\":[\"xspf\"],\"application/xv+xml\":[\"mxml\",\"xhvml\",\"xvml\",\"xvm\"],\"application/yang\":[\"yang\"],\"application/yin+xml\":[\"yin\"],\"application/zip\":[\"zip\"],\"audio/3gpp\":[\"*3gpp\"],\"audio/adpcm\":[\"adp\"],\"audio/amr\":[\"amr\"],\"audio/basic\":[\"au\",\"snd\"],\"audio/midi\":[\"mid\",\"midi\",\"kar\",\"rmi\"],\"audio/mobile-xmf\":[\"mxmf\"],\"audio/mp3\":[\"*mp3\"],\"audio/mp4\":[\"m4a\",\"mp4a\"],\"audio/mpeg\":[\"mpga\",\"mp2\",\"mp2a\",\"mp3\",\"m2a\",\"m3a\"],\"audio/ogg\":[\"oga\",\"ogg\",\"spx\",\"opus\"],\"audio/s3m\":[\"s3m\"],\"audio/silk\":[\"sil\"],\"audio/wav\":[\"wav\"],\"audio/wave\":[\"*wav\"],\"audio/webm\":[\"weba\"],\"audio/xm\":[\"xm\"],\"font/collection\":[\"ttc\"],\"font/otf\":[\"otf\"],\"font/ttf\":[\"ttf\"],\"font/woff\":[\"woff\"],\"font/woff2\":[\"woff2\"],\"image/aces\":[\"exr\"],\"image/apng\":[\"apng\"],\"image/avif\":[\"avif\"],\"image/bmp\":[\"bmp\"],\"image/cgm\":[\"cgm\"],\"image/dicom-rle\":[\"drle\"],\"image/emf\":[\"emf\"],\"image/fits\":[\"fits\"],\"image/g3fax\":[\"g3\"],\"image/gif\":[\"gif\"],\"image/heic\":[\"heic\"],\"image/heic-sequence\":[\"heics\"],\"image/heif\":[\"heif\"],\"image/heif-sequence\":[\"heifs\"],\"image/hej2k\":[\"hej2\"],\"image/hsj2\":[\"hsj2\"],\"image/ief\":[\"ief\"],\"image/jls\":[\"jls\"],\"image/jp2\":[\"jp2\",\"jpg2\"],\"image/jpeg\":[\"jpeg\",\"jpg\",\"jpe\"],\"image/jph\":[\"jph\"],\"image/jphc\":[\"jhc\"],\"image/jpm\":[\"jpm\"],\"image/jpx\":[\"jpx\",\"jpf\"],\"image/jxr\":[\"jxr\"],\"image/jxra\":[\"jxra\"],\"image/jxrs\":[\"jxrs\"],\"image/jxs\":[\"jxs\"],\"image/jxsc\":[\"jxsc\"],\"image/jxsi\":[\"jxsi\"],\"image/jxss\":[\"jxss\"],\"image/ktx\":[\"ktx\"],\"image/ktx2\":[\"ktx2\"],\"image/png\":[\"png\"],\"image/sgi\":[\"sgi\"],\"image/svg+xml\":[\"svg\",\"svgz\"],\"image/t38\":[\"t38\"],\"image/tiff\":[\"tif\",\"tiff\"],\"image/tiff-fx\":[\"tfx\"],\"image/webp\":[\"webp\"],\"image/wmf\":[\"wmf\"],\"message/disposition-notification\":[\"disposition-notification\"],\"message/global\":[\"u8msg\"],\"message/global-delivery-status\":[\"u8dsn\"],\"message/global-disposition-notification\":[\"u8mdn\"],\"message/global-headers\":[\"u8hdr\"],\"message/rfc822\":[\"eml\",\"mime\"],\"model/3mf\":[\"3mf\"],\"model/gltf+json\":[\"gltf\"],\"model/gltf-binary\":[\"glb\"],\"model/iges\":[\"igs\",\"iges\"],\"model/mesh\":[\"msh\",\"mesh\",\"silo\"],\"model/mtl\":[\"mtl\"],\"model/obj\":[\"obj\"],\"model/step+xml\":[\"stpx\"],\"model/step+zip\":[\"stpz\"],\"model/step-xml+zip\":[\"stpxz\"],\"model/stl\":[\"stl\"],\"model/vrml\":[\"wrl\",\"vrml\"],\"model/x3d+binary\":[\"*x3db\",\"x3dbz\"],\"model/x3d+fastinfoset\":[\"x3db\"],\"model/x3d+vrml\":[\"*x3dv\",\"x3dvz\"],\"model/x3d+xml\":[\"x3d\",\"x3dz\"],\"model/x3d-vrml\":[\"x3dv\"],\"text/cache-manifest\":[\"appcache\",\"manifest\"],\"text/calendar\":[\"ics\",\"ifb\"],\"text/coffeescript\":[\"coffee\",\"litcoffee\"],\"text/css\":[\"css\"],\"text/csv\":[\"csv\"],\"text/html\":[\"html\",\"htm\",\"shtml\"],\"text/jade\":[\"jade\"],\"text/jsx\":[\"jsx\"],\"text/less\":[\"less\"],\"text/markdown\":[\"markdown\",\"md\"],\"text/mathml\":[\"mml\"],\"text/mdx\":[\"mdx\"],\"text/n3\":[\"n3\"],\"text/plain\":[\"txt\",\"text\",\"conf\",\"def\",\"list\",\"log\",\"in\",\"ini\"],\"text/richtext\":[\"rtx\"],\"text/rtf\":[\"*rtf\"],\"text/sgml\":[\"sgml\",\"sgm\"],\"text/shex\":[\"shex\"],\"text/slim\":[\"slim\",\"slm\"],\"text/spdx\":[\"spdx\"],\"text/stylus\":[\"stylus\",\"styl\"],\"text/tab-separated-values\":[\"tsv\"],\"text/troff\":[\"t\",\"tr\",\"roff\",\"man\",\"me\",\"ms\"],\"text/turtle\":[\"ttl\"],\"text/uri-list\":[\"uri\",\"uris\",\"urls\"],\"text/vcard\":[\"vcard\"],\"text/vtt\":[\"vtt\"],\"text/xml\":[\"*xml\"],\"text/yaml\":[\"yaml\",\"yml\"],\"video/3gpp\":[\"3gp\",\"3gpp\"],\"video/3gpp2\":[\"3g2\"],\"video/h261\":[\"h261\"],\"video/h263\":[\"h263\"],\"video/h264\":[\"h264\"],\"video/iso.segment\":[\"m4s\"],\"video/jpeg\":[\"jpgv\"],\"video/jpm\":[\"*jpm\",\"jpgm\"],\"video/mj2\":[\"mj2\",\"mjp2\"],\"video/mp2t\":[\"ts\"],\"video/mp4\":[\"mp4\",\"mp4v\",\"mpg4\"],\"video/mpeg\":[\"mpeg\",\"mpg\",\"mpe\",\"m1v\",\"m2v\"],\"video/ogg\":[\"ogv\"],\"video/quicktime\":[\"qt\",\"mov\"],\"video/webm\":[\"webm\"]};"]}
@@ -0,0 +1,12 @@
1
+ /** @type { import('@storybook/server-webpack5').StorybookConfig } */
2
+ declare const _default: {
3
+ stories: string[];
4
+ addons: string[];
5
+ framework: {
6
+ name: string;
7
+ options: {};
8
+ };
9
+ staticDirs: string[];
10
+ };
11
+
12
+ export { _default as default };
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var a = require('path');
4
+ var n = require('fs');
5
+
6
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
+
8
+ var a__default = /*#__PURE__*/_interopDefault(a);
9
+ var n__default = /*#__PURE__*/_interopDefault(n);
10
+
11
+ var c=Object.defineProperty;var e=(r,o)=>c(r,"name",{value:o,configurable:!0});var h=Object.defineProperty,s=e((r,o)=>h(r,"name",{value:o,configurable:!0}),"t"),{CHROMATIC_ARCHIVE_LOCATION:u="test-results"}=process.env;function i(){return process.cwd()}e(i,"c");s(i,"rootDir");function t(){return a__default.default.resolve(i(),u,"chromatic-archives")}e(t,"a");s(t,"archivesDir");function f(){let r=t();if(!n__default.default.existsSync(r))throw new Error(`Chromatic archives directory cannot be found: ${r}
12
+
13
+ Please make sure that you have run your E2E tests, or have set the CHROMATIC_ARCHIVE_LOCATION env var if the output directory for the tests is not in the standard location.`)}e(f,"v");s(f,"checkArchivesDirExists");var k={stories:[a__default.default.resolve(t(),"*.stories.json")],addons:["@storybook/addon-essentials","."],framework:{name:"@storybook/server-webpack5",options:{}},staticDirs:[a__default.default.resolve(t(),"archive")]};
14
+
15
+ module.exports = k;
16
+ //# sourceMappingURL=out.js.map
17
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../shared/storybook-config/main.ts"],"names":["path","main_default","stories","resolve","archivesDir","addons","framework","name","options","staticDirs"],"mappings":"+EAAA,OAAOA,MAAU;;sNAIjB,IAAAC,EAAe,CACbC,QAAS,CAACF,EAAKG,QAAQC,EAAAA,EAAe,gBAAA,GACtCC,OAAQ,CAAC,8BAA+B,KACxCC,UAAW,CACTC,KAAM,6BACNC,QAAS,CAAC,CACZ,EACAC,WAAY,CAACT,EAAKG,QAAQC,EAAAA,EAAe,SAAA,EAC3C","sourcesContent":["import path from 'path';\nimport { archivesDir } from '@chromatic-com/shared-e2e/utils/filePaths';\n\n/** @type { import('@storybook/server-webpack5').StorybookConfig } */\nexport default {\n stories: [path.resolve(archivesDir(), '*.stories.json')],\n addons: ['@storybook/addon-essentials', '.'],\n framework: {\n name: '@storybook/server-webpack5',\n options: {},\n },\n staticDirs: [path.resolve(archivesDir(), 'archive')],\n};\n"]}
@@ -0,0 +1,114 @@
1
+ declare global {
2
+ interface SymbolConstructor {
3
+ readonly observable: symbol;
4
+ }
5
+ }
6
+
7
+ type StoryId = string;
8
+ type ComponentTitle = string;
9
+ type StoryName = string;
10
+ type Tag = string;
11
+ interface Parameters {
12
+ [name: string]: any;
13
+ }
14
+
15
+ type ExportName = string;
16
+ type MetaId = string;
17
+ interface IndexerOptions {
18
+ makeTitle: (userTitle?: string) => string;
19
+ }
20
+ interface IndexedStory {
21
+ id: string;
22
+ name: string;
23
+ tags?: Tag[];
24
+ parameters?: Parameters;
25
+ }
26
+ interface IndexedCSFFile {
27
+ meta: {
28
+ id?: string;
29
+ title?: string;
30
+ tags?: Tag[];
31
+ };
32
+ stories: IndexedStory[];
33
+ }
34
+ /**
35
+ * FIXME: This is a temporary type to allow us to deprecate the old indexer API.
36
+ * We should remove this type and the deprecated indexer API in 8.0.
37
+ */
38
+ type BaseIndexer = {
39
+ /**
40
+ * A regular expression that should match all files to be handled by this indexer
41
+ */
42
+ test: RegExp;
43
+ };
44
+ /**
45
+ * An indexer describes which filenames it handles, and how to index each individual file - turning it into an entry in the index.
46
+ */
47
+ type Indexer = BaseIndexer & {
48
+ /**
49
+ * Indexes a file containing stories or docs.
50
+ * @param fileName The name of the file to index.
51
+ * @param options {@link IndexerOptions} for indexing the file.
52
+ * @returns A promise that resolves to an array of {@link IndexInput} objects.
53
+ */
54
+ createIndex: (fileName: string, options: IndexerOptions) => Promise<IndexInput[]>;
55
+ /**
56
+ * @deprecated Use {@link index} instead
57
+ */
58
+ indexer?: never;
59
+ };
60
+ type DeprecatedIndexer = BaseIndexer & {
61
+ indexer: (fileName: string, options: IndexerOptions) => Promise<IndexedCSFFile>;
62
+ createIndex?: never;
63
+ };
64
+ /**
65
+ * @deprecated Use {@link Indexer} instead
66
+ */
67
+ type StoryIndexer = Indexer | DeprecatedIndexer;
68
+ /**
69
+ * The base input for indexing a story or docs entry.
70
+ */
71
+ type BaseIndexInput = {
72
+ /** The file to import from e.g. the story file. */
73
+ importPath: Path;
74
+ /** The name of the export to import. */
75
+ exportName: ExportName;
76
+ /** The name of the entry, auto-generated from {@link exportName} if unspecified. */
77
+ name?: StoryName;
78
+ /** The location in the sidebar, auto-generated from {@link importPath} if unspecified. */
79
+ title?: ComponentTitle;
80
+ /**
81
+ * The custom id optionally set at `meta.id` if it needs to differ from the id generated via {@link title}.
82
+ * If unspecified, the meta id will be auto-generated from {@link title}.
83
+ * If specified, the meta in the CSF file _must_ have a matching id set at `meta.id`, to be correctly matched.
84
+ */
85
+ metaId?: MetaId;
86
+ /** Tags for filtering entries in Storybook and its tools. */
87
+ tags?: Tag[];
88
+ /**
89
+ * The id of the entry, auto-generated from {@link title}/{@link metaId} and {@link exportName} if unspecified.
90
+ * If specified, the story in the CSF file _must_ have a matching id set at `parameters.__id`, to be correctly matched.
91
+ * Only use this if you need to override the auto-generated id.
92
+ */
93
+ __id?: StoryId;
94
+ };
95
+ /**
96
+ * The input for indexing a story entry.
97
+ */
98
+ type StoryIndexInput = BaseIndexInput & {
99
+ type: 'story';
100
+ };
101
+ /**
102
+ * The input for indexing a docs entry.
103
+ */
104
+ type DocsIndexInput = BaseIndexInput & {
105
+ type: 'docs';
106
+ /** Paths to story files that must be pre-loaded for this docs entry. */
107
+ storiesImports?: Path[];
108
+ };
109
+ type IndexInput = StoryIndexInput | DocsIndexInput;
110
+ type Path = string;
111
+
112
+ declare const storyIndexers: (indexers: StoryIndexer[]) => StoryIndexer[];
113
+
114
+ export { storyIndexers };
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var fs = require('fs');
4
+ var csf = require('@storybook/csf');
5
+
6
+ var m=Object.defineProperty;var e=(t,r)=>m(t,"name",{value:r,configurable:!0});var I=e(t=>[{test:/(stories|story)\.json$/,indexer:e(async(i,{makeTitle:d})=>{let s=JSON.parse(fs.readFileSync(i,"utf8")),o=d(s.title);return {meta:{title:o},stories:s.stories.map(({name:n,parameters:c})=>({id:csf.toId(o,n),name:n,parameters:c}))}},"jsonIndexer")},...t||[]],"storyIndexers");
7
+
8
+ exports.storyIndexers = I;
9
+ //# sourceMappingURL=out.js.map
10
+ //# sourceMappingURL=preset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../shared/storybook-config/preset.ts"],"names":["readFileSync","toId","storyIndexers","__name","indexers","test","indexer","fileName","makeTitle","json","JSON","parse","title","meta","stories","map","name","parameters","id"],"mappings":"+EAAA,OAASA,gBAAAA,MAAoB,KAE7B,OAASC,QAAAA,MAAY,iBAEd,IAAMC,EAAgBC,EAACC,GAiBrB,CACL,CACEC,KAAM,yBACNC,QAnByCH,EAAA,MAAOI,EAAU,CAAEC,UAAAA,CAAS,IAAE,CACzE,IAAMC,EAAOC,KAAKC,MAAMX,EAAaO,EAAU,MAAA,CAAA,EAEzCK,EAAQJ,EAAUC,EAAKG,KAAK,EAClC,MAAO,CACLC,KAAM,CAAED,MAAAA,CAAM,EACdE,QAASL,EAAKK,QAAQC,IACpB,CAAC,CAAEC,KAAAA,EAAMC,WAAAA,CAAU,KAAkD,CACnEC,GAAIjB,EAAKW,EAAOI,CAAAA,EAChBA,KAAAA,EACAC,WAAAA,CACF,EAAA,CAEJ,CACF,EAd6C,cAoB3C,KACIb,GAAY,CAAA,GAtBS","sourcesContent":["import { readFileSync } from 'fs';\nimport type { StoryIndexer, Parameters } from '@storybook/types';\nimport { toId } from '@storybook/csf';\n\nexport const storyIndexers = (indexers: StoryIndexer[]): StoryIndexer[] => {\n const jsonIndexer: StoryIndexer['indexer'] = async (fileName, { makeTitle }) => {\n const json = JSON.parse(readFileSync(fileName, 'utf8'));\n\n const title = makeTitle(json.title);\n return {\n meta: { title },\n stories: json.stories.map(\n ({ name, parameters }: { name: string; parameters: Parameters }) => ({\n id: toId(title, name),\n name,\n parameters,\n })\n ),\n };\n };\n\n return [\n {\n test: /(stories|story)\\.json$/,\n indexer: jsonIndexer,\n },\n ...(indexers || []),\n ];\n};\n"]}
@@ -0,0 +1,7 @@
1
+ import { rebuild } from 'rrweb-snapshot';
2
+
3
+ var i=Object.defineProperty;var r=(e,o)=>i(e,"name",{value:o,configurable:!0});var t=new URL(window.location.href);t.pathname="";t.search="";var l=t.toString().replace(/\/$/,""),p=r(async(e,o)=>{let{url:s,id:n}=e.storyContext.parameters.server,a=(await(await fetch(`${s}/${n}`)).json()).childNodes[1],c=await rebuild(a,{doc:document});return document.replaceChild(c,document.children[0]),document.head.innerHTML+='<script id="storybook-root"><\/script><script id="storybook-docs"><\/script>',e.showMain(),()=>{}},"renderToCanvas"),f={renderToCanvas:p,parameters:{server:{url:l},layout:"fullscreen"}};
4
+
5
+ export { f as default };
6
+ //# sourceMappingURL=out.js.map
7
+ //# sourceMappingURL=preview.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../shared/storybook-config/preview.ts"],"names":["rebuild","pageUrl","URL","window","location","href","pathname","search","strippedUrl","toString","replace","renderToCanvas","__name","context","element","url","id","storyContext","parameters","server","htmlNode","fetch","json","childNodes","html","doc","document","replaceChild","children","head","innerHTML","showMain","preview_default","layout"],"mappings":"+EACA,OAASA,WAAAA,MAAe,iBAExB,IAAMC,EAAU,IAAIC,IAAIC,OAAOC,SAASC,IAAI,EAC5CJ,EAAQK,SAAW,GACnBL,EAAQM,OAAS,GACjB,IAAMC,EAAcP,EAAQQ,SAAQ,EAAGC,QAAQ,MAAO,EAAA,EAOhDC,EAAiDC,EAAA,MAAOC,EAASC,IAAAA,CACrE,GAAM,CAAEC,IAAAA,EAAKC,GAAAA,CAAE,EAAKH,EAAQI,aAAaC,WAAWC,OAM9CC,GAJW,MADA,MAAMC,MAAM,GAAGN,KAAOC,GAAI,GACXM,KAAI,GAIVC,WAAW,CAAA,EAQ/BC,EAAQ,MAAMxB,EAAQoB,EAAU,CAAEK,IAAKC,QAAS,CAAA,EAGtDA,gBAASC,aAAaH,EAAME,SAASE,SAAS,CAAA,CAAE,EAOhDF,SAASG,KAAKC,WACZ,+EAEFjB,EAAQkB,SAAQ,EACT,IAAA,CAAO,CAChB,EA9BuD,kBAgCvDC,EAAe,CACbrB,eAAAA,EACAO,WAAY,CACVC,OAAQ,CAAEJ,IAAKP,CAAY,EAC3ByB,OAAQ,YACV,CACF","sourcesContent":["import type { RenderToCanvas, WebRenderer } from '@storybook/types';\nimport { rebuild } from 'rrweb-snapshot';\n\nconst pageUrl = new URL(window.location.href);\npageUrl.pathname = '';\npageUrl.search = '';\nconst strippedUrl = pageUrl.toString().replace(/\\/$/, '');\n\nexport interface RRWebFramework extends WebRenderer {\n component: undefined;\n storyResult: Record<string, never>;\n}\n\nconst renderToCanvas: RenderToCanvas<RRWebFramework> = async (context, element) => {\n const { url, id } = context.storyContext.parameters.server;\n const response = await fetch(`${url}/${id}`);\n const snapshot = await response.json();\n\n // The snapshot is a representation of a complete HTML document. The first child is the\n // doc type declaration and the second is the html element.\n const htmlNode = snapshot.childNodes[1];\n\n // If you rebuild the full snapshot with rrweb (the document) it will replace the\n // current document and call `document.open()` in the process, which unbinds all event handlers\n // (and breaks Storybook).\n // However, if you just rebuild the html element part, it will recreate but not attempt to\n // insert it in the DOM.\n // @ts-expect-error rebuild is typed incorreclty, cache and mirror are optional\n const html = (await rebuild(htmlNode, { doc: document })) as HTMLElement;\n\n // Now we insert the rebuilt html element in the DOM\n document.replaceChild(html, document.children[0]);\n\n // Storybook's WebView will throw an error if it cannot find these two ids in the DOM.\n // We never render docs (so the #storybook-docs doesn't matter), and our`renderToCanvas`\n // function is already ignoring the #storybook-root (`element` above), so it doesn't matter where\n // they are or what they contain.\n // We make them a script in the head to ensure they don't impact layout.\n document.head.innerHTML +=\n '<script id=\"storybook-root\"></script><script id=\"storybook-docs\"></script>';\n\n context.showMain();\n return () => {}; // We can't really cleanup\n};\n\nexport default {\n renderToCanvas,\n parameters: {\n server: { url: strippedUrl },\n layout: 'fullscreen',\n },\n};\n"]}
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var rrwebSnapshot = require('rrweb-snapshot');
4
+
5
+ Cypress.Commands.add("takeSnapshot",e=>{Cypress.config("isTextTerminal")&&cy.document().then(s=>{let n=rrwebSnapshot.snapshot(s);cy.get("@manualSnapshots").then(r=>[...r,{name:e,snapshot:n}]).as("manualSnapshots");});});beforeEach(()=>{Cypress.config("isTextTerminal")&&(cy.wrap([]).as("manualSnapshots"),cy.task("prepareArchives",{action:"setup-network-listener",payload:{allowedDomains:Cypress.env("assetDomains")}}));});afterEach(()=>{Cypress.env("disableAutoSnapshot")||!Cypress.config("isTextTerminal")||cy.document().then(e=>{let s=rrwebSnapshot.snapshot(e);cy.get("@manualSnapshots").then((n=[])=>{cy.url().then(r=>{cy.task("prepareArchives",{action:"save-archives",payload:{testTitle:Cypress.currentTest.title,domSnapshots:[...n,{snapshot:s}],chromaticStorybookParams:{...Cypress.env("diffThreshold")&&{diffThreshold:Cypress.env("diffThreshold")},...Cypress.env("delay")&&{delay:Cypress.env("delay")},...Cypress.env("diffIncludeAntiAliasing")&&{diffIncludeAntiAliasing:Cypress.env("diffIncludeAntiAliasing")},...Cypress.env("diffThreshold")&&{diffThreshold:Cypress.env("diffThreshold")},...Cypress.env("forcedColors")&&{forcedColors:Cypress.env("forcedColors")},...Cypress.env("pauseAnimationAtEnd")&&{pauseAnimationAtEnd:Cypress.env("pauseAnimationAtEnd")},...Cypress.env("prefersReducedMotion")&&{prefersReducedMotion:Cypress.env("prefersReducedMotion")}},pageUrl:r}});});});});});
6
+ //# sourceMappingURL=out.js.map
7
+ //# sourceMappingURL=support.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/support.ts","../src/commands.ts"],"names":["snapshot","Cypress","Commands","add","name","config","cy","document","then","doc","manualSnapshot","get","snapshots","as","beforeEach","wrap","task","action","payload","allowedDomains","env","afterEach","automaticSnapshot","manualSnapshots","url","testTitle","currentTest","title","domSnapshots","chromaticStorybookParams","diffThreshold","delay","diffIncludeAntiAliasing","forcedColors","pauseAnimationAtEnd","prefersReducedMotion","pageUrl"],"mappings":"AAAA,OAASA,YAAAA,MAAgB,iBCAzB,OAASA,YAAAA,MAAgB,iBAGzBC,QAAQC,SAASC,IAAI,eAAiBC,GAAAA,CAE/BH,QAAQI,OAAO,gBAAA,GAIpBC,GAAGC,SAAQ,EAAGC,KAAMC,GAAAA,CAElB,IAAMC,EAAiBV,EAASS,CAAAA,EAEhCH,GAAGK,IAAI,kBAAA,EAEJH,KAAMI,GACE,IAAIA,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,QAAQmB,IAAI,qBAAA,CACnC,EACA,GAAInB,QAAQmB,IAAI,sBAAA,GAA2B,CACzCe,qBAAsBlC,QAAQmB,IAAI,sBAAA,CACpC,CACF,EACAgB,QAASZ,CACX,CACF,CAAA,CACF,CAAA,CACF,CAAA,CACF,CAAA,CACF,CAAA","sourcesContent":["import { snapshot } from 'rrweb-snapshot';\nimport './commands';\n\n// these client-side lifecycle hooks will be added to the user's Cypress suite\nbeforeEach(() => {\n // don't take snapshots when running `cypress open`\n if (!Cypress.config('isTextTerminal')) {\n return;\n }\n // this \"manualSnapshots\" variable will be available before, during, and after the test,\n // then cleaned up before the next test is run\n // (see https://docs.cypress.io/guides/core-concepts/variables-and-aliases#Aliases)\n cy.wrap([]).as('manualSnapshots');\n cy.task('prepareArchives', {\n action: 'setup-network-listener',\n payload: { allowedDomains: Cypress.env('assetDomains') },\n });\n});\n\nafterEach(() => {\n // don't take snapshots when running `cypress open`\n if (Cypress.env('disableAutoSnapshot') || !Cypress.config('isTextTerminal')) {\n return;\n }\n // can we be sure this always fires after all the requests are back?\n cy.document().then((doc) => {\n const automaticSnapshot = snapshot(doc);\n // @ts-expect-error will fix when Cypress has its own package\n cy.get('@manualSnapshots').then((manualSnapshots = []) => {\n cy.url().then((url) => {\n // pass the snapshot to the server to write to disk\n cy.task('prepareArchives', {\n action: 'save-archives',\n payload: {\n testTitle: Cypress.currentTest.title,\n domSnapshots: [...manualSnapshots, { snapshot: automaticSnapshot }],\n chromaticStorybookParams: {\n ...(Cypress.env('diffThreshold') && { diffThreshold: Cypress.env('diffThreshold') }),\n ...(Cypress.env('delay') && { delay: Cypress.env('delay') }),\n ...(Cypress.env('diffIncludeAntiAliasing') && {\n diffIncludeAntiAliasing: Cypress.env('diffIncludeAntiAliasing'),\n }),\n ...(Cypress.env('diffThreshold') && { diffThreshold: Cypress.env('diffThreshold') }),\n ...(Cypress.env('forcedColors') && { forcedColors: Cypress.env('forcedColors') }),\n ...(Cypress.env('pauseAnimationAtEnd') && {\n pauseAnimationAtEnd: Cypress.env('pauseAnimationAtEnd'),\n }),\n ...(Cypress.env('prefersReducedMotion') && {\n prefersReducedMotion: Cypress.env('prefersReducedMotion'),\n }),\n },\n pageUrl: url,\n },\n });\n });\n });\n });\n});\n","import { snapshot } from 'rrweb-snapshot';\nimport type { elementNode } from 'rrweb-snapshot';\n// @ts-expect-error will fix when Cypress has its own package\nCypress.Commands.add('takeSnapshot', (name?: string) => {\n // don't take snapshots when running `cypress open`\n if (!Cypress.config('isTextTerminal')) {\n return;\n }\n\n cy.document().then((doc) => {\n // here, handle the source map\n const manualSnapshot = snapshot(doc);\n // reassign manualSnapshots so it includes this new snapshot\n cy.get('@manualSnapshots')\n // @ts-expect-error will fix when Cypress has its own package\n .then((snapshots: elementNode[]) => {\n return [...snapshots, { name, snapshot: manualSnapshot }];\n })\n .as('manualSnapshots');\n });\n});\n"]}
@@ -0,0 +1,5 @@
1
+ import { snapshot } from 'rrweb-snapshot';
2
+
3
+ Cypress.Commands.add("takeSnapshot",e=>{Cypress.config("isTextTerminal")&&cy.document().then(s=>{let n=snapshot(s);cy.get("@manualSnapshots").then(r=>[...r,{name:e,snapshot:n}]).as("manualSnapshots");});});beforeEach(()=>{Cypress.config("isTextTerminal")&&(cy.wrap([]).as("manualSnapshots"),cy.task("prepareArchives",{action:"setup-network-listener",payload:{allowedDomains:Cypress.env("assetDomains")}}));});afterEach(()=>{Cypress.env("disableAutoSnapshot")||!Cypress.config("isTextTerminal")||cy.document().then(e=>{let s=snapshot(e);cy.get("@manualSnapshots").then((n=[])=>{cy.url().then(r=>{cy.task("prepareArchives",{action:"save-archives",payload:{testTitle:Cypress.currentTest.title,domSnapshots:[...n,{snapshot:s}],chromaticStorybookParams:{...Cypress.env("diffThreshold")&&{diffThreshold:Cypress.env("diffThreshold")},...Cypress.env("delay")&&{delay:Cypress.env("delay")},...Cypress.env("diffIncludeAntiAliasing")&&{diffIncludeAntiAliasing:Cypress.env("diffIncludeAntiAliasing")},...Cypress.env("diffThreshold")&&{diffThreshold:Cypress.env("diffThreshold")},...Cypress.env("forcedColors")&&{forcedColors:Cypress.env("forcedColors")},...Cypress.env("pauseAnimationAtEnd")&&{pauseAnimationAtEnd:Cypress.env("pauseAnimationAtEnd")},...Cypress.env("prefersReducedMotion")&&{prefersReducedMotion:Cypress.env("prefersReducedMotion")}},pageUrl:r}});});});});});
4
+ //# sourceMappingURL=out.js.map
5
+ //# sourceMappingURL=support.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/support.ts","../src/commands.ts"],"names":["snapshot","Cypress","Commands","add","name","config","cy","document","then","doc","manualSnapshot","get","snapshots","as","beforeEach","wrap","task","action","payload","allowedDomains","env","afterEach","automaticSnapshot","manualSnapshots","url","testTitle","currentTest","title","domSnapshots","chromaticStorybookParams","diffThreshold","delay","diffIncludeAntiAliasing","forcedColors","pauseAnimationAtEnd","prefersReducedMotion","pageUrl"],"mappings":"AAAA,OAASA,YAAAA,MAAgB,iBCAzB,OAASA,YAAAA,MAAgB,iBAGzBC,QAAQC,SAASC,IAAI,eAAiBC,GAAAA,CAE/BH,QAAQI,OAAO,gBAAA,GAIpBC,GAAGC,SAAQ,EAAGC,KAAMC,GAAAA,CAElB,IAAMC,EAAiBV,EAASS,CAAAA,EAEhCH,GAAGK,IAAI,kBAAA,EAEJH,KAAMI,GACE,IAAIA,EAAW,CAAER,KAAAA,EAAMJ,SAAUU,CAAe,EACzD,EACCG,GAAG,iBAAA,CACR,CAAA,CACF,CAAA,EDhBAC,WAAW,IAAA,CAEJb,QAAQI,OAAO,gBAAA,IAMpBC,GAAGS,KAAK,CAAA,CAAE,EAAEF,GAAG,iBAAA,EACfP,GAAGU,KAAK,kBAAmB,CACzBC,OAAQ,yBACRC,QAAS,CAAEC,eAAgBlB,QAAQmB,IAAI,cAAA,CAAgB,CACzD,CAAA,EACF,CAAA,EAEAC,UAAU,IAAA,CAEJpB,QAAQmB,IAAI,qBAAA,GAA0B,CAACnB,QAAQI,OAAO,gBAAA,GAI1DC,GAAGC,SAAQ,EAAGC,KAAMC,GAAAA,CAClB,IAAMa,EAAoBtB,EAASS,CAAAA,EAEnCH,GAAGK,IAAI,kBAAA,EAAoBH,KAAK,CAACe,EAAkB,CAAA,IAAE,CACnDjB,GAAGkB,IAAG,EAAGhB,KAAMgB,GAAAA,CAEblB,GAAGU,KAAK,kBAAmB,CACzBC,OAAQ,gBACRC,QAAS,CACPO,UAAWxB,QAAQyB,YAAYC,MAC/BC,aAAc,IAAIL,EAAiB,CAAEvB,SAAUsB,CAAkB,GACjEO,yBAA0B,CACxB,GAAI5B,QAAQmB,IAAI,eAAA,GAAoB,CAAEU,cAAe7B,QAAQmB,IAAI,eAAA,CAAiB,EAClF,GAAInB,QAAQmB,IAAI,OAAA,GAAY,CAAEW,MAAO9B,QAAQmB,IAAI,OAAA,CAAS,EAC1D,GAAInB,QAAQmB,IAAI,yBAAA,GAA8B,CAC5CY,wBAAyB/B,QAAQmB,IAAI,yBAAA,CACvC,EACA,GAAInB,QAAQmB,IAAI,eAAA,GAAoB,CAAEU,cAAe7B,QAAQmB,IAAI,eAAA,CAAiB,EAClF,GAAInB,QAAQmB,IAAI,cAAA,GAAmB,CAAEa,aAAchC,QAAQmB,IAAI,cAAA,CAAgB,EAC/E,GAAInB,QAAQmB,IAAI,qBAAA,GAA0B,CACxCc,oBAAqBjC,QAAQmB,IAAI,qBAAA,CACnC,EACA,GAAInB,QAAQmB,IAAI,sBAAA,GAA2B,CACzCe,qBAAsBlC,QAAQmB,IAAI,sBAAA,CACpC,CACF,EACAgB,QAASZ,CACX,CACF,CAAA,CACF,CAAA,CACF,CAAA,CACF,CAAA,CACF,CAAA","sourcesContent":["import { snapshot } from 'rrweb-snapshot';\nimport './commands';\n\n// these client-side lifecycle hooks will be added to the user's Cypress suite\nbeforeEach(() => {\n // don't take snapshots when running `cypress open`\n if (!Cypress.config('isTextTerminal')) {\n return;\n }\n // this \"manualSnapshots\" variable will be available before, during, and after the test,\n // then cleaned up before the next test is run\n // (see https://docs.cypress.io/guides/core-concepts/variables-and-aliases#Aliases)\n cy.wrap([]).as('manualSnapshots');\n cy.task('prepareArchives', {\n action: 'setup-network-listener',\n payload: { allowedDomains: Cypress.env('assetDomains') },\n });\n});\n\nafterEach(() => {\n // don't take snapshots when running `cypress open`\n if (Cypress.env('disableAutoSnapshot') || !Cypress.config('isTextTerminal')) {\n return;\n }\n // can we be sure this always fires after all the requests are back?\n cy.document().then((doc) => {\n const automaticSnapshot = snapshot(doc);\n // @ts-expect-error will fix when Cypress has its own package\n cy.get('@manualSnapshots').then((manualSnapshots = []) => {\n cy.url().then((url) => {\n // pass the snapshot to the server to write to disk\n cy.task('prepareArchives', {\n action: 'save-archives',\n payload: {\n testTitle: Cypress.currentTest.title,\n domSnapshots: [...manualSnapshots, { snapshot: automaticSnapshot }],\n chromaticStorybookParams: {\n ...(Cypress.env('diffThreshold') && { diffThreshold: Cypress.env('diffThreshold') }),\n ...(Cypress.env('delay') && { delay: Cypress.env('delay') }),\n ...(Cypress.env('diffIncludeAntiAliasing') && {\n diffIncludeAntiAliasing: Cypress.env('diffIncludeAntiAliasing'),\n }),\n ...(Cypress.env('diffThreshold') && { diffThreshold: Cypress.env('diffThreshold') }),\n ...(Cypress.env('forcedColors') && { forcedColors: Cypress.env('forcedColors') }),\n ...(Cypress.env('pauseAnimationAtEnd') && {\n pauseAnimationAtEnd: Cypress.env('pauseAnimationAtEnd'),\n }),\n ...(Cypress.env('prefersReducedMotion') && {\n prefersReducedMotion: Cypress.env('prefersReducedMotion'),\n }),\n },\n pageUrl: url,\n },\n });\n });\n });\n });\n});\n","import { snapshot } from 'rrweb-snapshot';\nimport type { elementNode } from 'rrweb-snapshot';\n// @ts-expect-error will fix when Cypress has its own package\nCypress.Commands.add('takeSnapshot', (name?: string) => {\n // don't take snapshots when running `cypress open`\n if (!Cypress.config('isTextTerminal')) {\n return;\n }\n\n cy.document().then((doc) => {\n // here, handle the source map\n const manualSnapshot = snapshot(doc);\n // reassign manualSnapshots so it includes this new snapshot\n cy.get('@manualSnapshots')\n // @ts-expect-error will fix when Cypress has its own package\n .then((snapshots: elementNode[]) => {\n return [...snapshots, { name, snapshot: manualSnapshot }];\n })\n .as('manualSnapshots');\n });\n});\n"]}
package/jest.config.js ADDED
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ testMatch: ['**/*.test.*'],
3
+ };
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@chromatic-com/cypress",
3
+ "version": "0.5.0",
4
+ "description": "Chromatic Visual Regression Testing for Cypress",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/chromaui/chromatic-e2e.git",
8
+ "directory": "packages/cypress"
9
+ },
10
+ "author": "Chromatic <tom@chromatic.com>",
11
+ "license": "MIT",
12
+ "main": "dist/index.js",
13
+ "module": "dist/index.mjs",
14
+ "types": "dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.mjs",
19
+ "require": "./dist/index.js"
20
+ },
21
+ "./support": {
22
+ "types": "./dist/support.d.ts",
23
+ "import": "./dist/support.mjs",
24
+ "require": "./dist/support.js"
25
+ },
26
+ "./bin/archive-storybook": "./dist/bin/archive-storybook.js",
27
+ "./bin/build-archive-storybook": "./dist/bin/build-archive-storybook.js",
28
+ "./package.json": "./package.json"
29
+ },
30
+ "bin": {
31
+ "archive-storybook": "dist/bin/archive-storybook.js",
32
+ "build-archive-storybook": "dist/bin/build-archive-storybook.js"
33
+ },
34
+ "files": [
35
+ "dist/**/*",
36
+ "README.md",
37
+ "*.js",
38
+ "*.d.ts"
39
+ ],
40
+ "scripts": {
41
+ "clean": "rimraf ./dist",
42
+ "prebuild": "yarn clean",
43
+ "build": "tsup",
44
+ "build:watch": "yarn build --watch",
45
+ "test:cypress": "start-server-and-test 'yarn run test:server' 3000 'yarn run test:do-cypress'",
46
+ "test:do-cypress": "ELECTRON_EXTRA_LAUNCH_ARGS=--remote-debugging-port=8192 cypress run --project tests",
47
+ "test:unit": "jest --passWithNoTests",
48
+ "start": "yarn build:watch",
49
+ "lint": "eslint src/*",
50
+ "prettier": "prettier"
51
+ },
52
+ "devDependencies": {
53
+ "@chromatic-com/shared-e2e": "0.5.0",
54
+ "@storybook/types": "^7.0.2",
55
+ "cypress": "^13.4.0",
56
+ "start-server-and-test": "^2.0.3"
57
+ },
58
+ "lint-staged": {
59
+ "*.{ts,js,css,md}": "prettier --write"
60
+ },
61
+ "publishConfig": {
62
+ "access": "public"
63
+ },
64
+ "dependencies": {
65
+ "@segment/analytics-node": "^1.1.0",
66
+ "@storybook/csf": "^0.1.0",
67
+ "chrome-remote-interface": "^0.33.0",
68
+ "rrweb-snapshot": "^2.0.0-alpha.4"
69
+ },
70
+ "peerDependencies": {
71
+ "@storybook/addon-essentials": "^7.0.0 || ^8.0.x",
72
+ "@storybook/server-webpack5": "^7.0.0 || ^8.0.x",
73
+ "storybook": "^7.0.0 || ^8.0.x"
74
+ }
75
+ }
@@ -0,0 +1,25 @@
1
+ // ***********************************************
2
+ // This example commands.js shows you how to
3
+ // create various custom commands and overwrite
4
+ // existing commands.
5
+ //
6
+ // For more comprehensive examples of custom
7
+ // commands please read more here:
8
+ // https://on.cypress.io/custom-commands
9
+ // ***********************************************
10
+ //
11
+ //
12
+ // -- This is a parent command --
13
+ // Cypress.Commands.add('login', (email, password) => { ... })
14
+ //
15
+ //
16
+ // -- This is a child command --
17
+ // Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
18
+ //
19
+ //
20
+ // -- This is a dual command --
21
+ // Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
22
+ //
23
+ //
24
+ // -- This will overwrite an existing command --
25
+ // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
@@ -0,0 +1,21 @@
1
+ // ***********************************************************
2
+ // This example support/e2e.js is processed and
3
+ // loaded automatically before your test files.
4
+ //
5
+ // This is a great place to put global configuration and
6
+ // behavior that modifies Cypress.
7
+ //
8
+ // You can change the location of this file or turn off
9
+ // automatically serving support files with the
10
+ // 'supportFile' configuration option.
11
+ //
12
+ // You can read more here:
13
+ // https://on.cypress.io/configuration
14
+ // ***********************************************************
15
+
16
+ // Import commands.js using ES2015 syntax:
17
+ import './commands';
18
+ import '../../../dist/support';
19
+
20
+ // Alternatively you can use CommonJS syntax:
21
+ // require('./commands')