UNPKG

103 kBSource Map (JSON)View Raw
1{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@babel/runtime/regenerator\"","webpack:///external \"@babel/runtime/helpers/asyncToGenerator\"","webpack:///external \"@babel/runtime/helpers/toConsumableArray\"","webpack:///external \"debug\"","webpack:///external \"@babel/runtime/helpers/classCallCheck\"","webpack:///external \"path\"","webpack:///external \"@babel/runtime/helpers/possibleConstructorReturn\"","webpack:///external \"@babel/runtime/helpers/getPrototypeOf\"","webpack:///external \"@babel/runtime/helpers/inherits\"","webpack:///external \"url\"","webpack:///external \"@babel/runtime/helpers/createClass\"","webpack:///external \"node-fetch\"","webpack:///external \"@babel/runtime/helpers/objectSpread\"","webpack:///external \"child_process\"","webpack:///external \"pino\"","webpack:///external \"denodeify\"","webpack:///external \"@babel/runtime/helpers/slicedToArray\"","webpack:///external \"jsonfile\"","webpack:///external \"fs\"","webpack:///external \"minimatch\"","webpack:///external \"semver\"","webpack:///external \"jsdom\"","webpack:///external \"@babel/runtime/helpers/taggedTemplateLiteral\"","webpack:///external \"fake-tag\"","webpack:///external \"node-ask\"","webpack:///external \"tree-kill\"","webpack:///external \"env-ci\"","webpack:///external \"uuid\"","webpack:///external \"tmp\"","webpack:///./src/tester/storybook.js","webpack:///external \"https\"","webpack:///external \"@chromaui/localtunnel\"","webpack:///external \"async-retry\"","webpack:////Users/tom/Chroma/chromatic/lib/util/serializers.js","webpack:///external \"node-loggly-bulk\"","webpack:///external \"util\"","webpack:///external \"strip-color\"","webpack:///external \"progress-stream\"","webpack:///external \"progress\"","webpack:////Users/tom/Chroma/chromatic/lib/util/errSerializer.js","webpack:////Users/tom/Chroma/chromatic/lib/util/responseSerializer.js","webpack:///./src/tester/runtimes.js","webpack:///./src/tester/start-app.js","webpack:///./src/lib/tunnel.js","webpack:///./src/tester/package-json.js","webpack:////Users/tom/Chroma/chromatic/lib/util/HTTPClient.js","webpack:////Users/tom/Chroma/chromatic/lib/util/GraphQLClient.js","webpack:///./src/tester/git.js","webpack:///./src/assets/environment.js","webpack:///./src/tester/sendDebugToLoggly.js","webpack:///./src/tester/upload-to-s3.js","webpack:///./src/tester/index.js","webpack:///./src/tester/log.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","require","viewLayers","require2","eval","getStorybookInfo","CHROMATIC_STORYBOOK_VERSION","process","env","_CHROMATIC_STORYBOOK_","split","_CHROMATIC_STORYBOOK_2","_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default","viewLayer","storybookVersion","Error","length","shift","concat","version","err","pino","errSerializer","default","stdSerializers","responseSerializer","envPairs","serializedErr","response","status","statusText","headers","url","_raw","toString","addShimsToJSDOM","dom","window","matches","addListener","removeListener","writable","LocalStorageMock","classCallCheck_default","this","store","createClass_default","WorkerMock","MutationObserverMock","getRandomValues","navigator","URL","observe","takeRecords","disconnect","IntlMock","IntlFormatMock","_IntlMock","possibleConstructorReturn_default","getPrototypeOf_default","apply","arguments","inherits_default","IntlCollatorMock","_IntlMock2","IntlPluralRulesMock","_IntlMock3","IntlDateTimeFormatMock","_IntlFormatMock","IntlListFormatMock","_IntlFormatMock2","IntlNumberFormatMock","_IntlFormatMock3","IntlRelativeTimeFormatMock","_IntlFormatMock4","Collator","DateTimeFormat","ListFormat","NumberFormat","PluralRules","RelativeTimeFormat","customElements","define","constructor","resolvers","forEach","resolve","upgrade","whenDefined","Promise","push","HTMLCanvasElement","getContext","fillRect","clearRect","getImageData","x","y","w","h","data","Array","putImageData","createImageData","setTransform","drawImage","save","fillText","restore","beginPath","moveTo","lineTo","closePath","stroke","translate","scale","rotate","arc","fill","measureText","width","transform","rect","clip","toDataURL","getRuntimeSpecs","_x","_getRuntimeSpecs","_callee","_ref","_ref$verbose","verbose","_ref$names","product","packageName","logs","virtualConsole","_args","regenerator_default","a","wrap","_context","prev","next","undefined","names","VirtualConsole","keys","console","logType","on","log","sendTo","JSDOM","fromURL","userAgent","runScripts","resources","pretendToBeVisual","sent","abrupt","reject","document","addEventListener","separator","__chromaticRuntimeSpecs__","error","_ref2","find","filter","_ref3","specs","close","stop","CHECK_EVERY","TIMEOUT","httpsAgent","https","Agent","rejectUnauthorized","checkResponse","_checkResponse","fetch","agent","startsWith","t0","waitForResponse","_callee3","child","timeoutAt","_context3","Date","now","resolved","check","_check","asyncToGenerator_default","mark","_callee2","_context2","setTimeout","output","stderr","e","stdout","startApp","_x4","_startApp","_callee4","scriptName","commandName","_ref$args","args","_ref$inheritStdio","inheritStdio","npmPath","npmPathIsJs","execPath","_context4","objectSpread_default","NODE_ENV","BROWSER","npm_execpath","test","path","extname","spawn","toConsumableArray_default","stdio","shell","debug","setupDebug","openTunnel","_openTunnel","tunnelUrl","port","tunnel","denodeify","localtunnel","local_host","host","cert","ca","request","tunnel_cluster","checkPackageJson","command","_ref$appDir","appDir","cwd","packageJson","readFileSync","values","scripts","script","match","addScriptToPackageJson","scriptCommand","_ref2$appDir","filename","writeFileSync","spaces","HTTPClientError","fetchResponse","message","params","super","captureStackTrace","HTTPClient","options","serializers","retries","[object Object]","noLogErrorBody","retry","async","res","ok","body","text","warn","onRetry","buffer","fetchOptions","clientOptions","fetchBuffer","GraphQLClient","uri","client","query","variables","Content-Type","method","JSON","stringify","errors","json","runQuery","execGitCommand","_error$message","execSync","trim","FETCH_N_INITIAL_BUILD_COMMITS","TesterFirstCommittedAtQuery","gql","_templateObject","TesterHasBuildsWithCommitsQuery","_templateObject2","getCommit","_getCommit","_split","_split2","commit","committedAtSeconds","committerEmail","committerName","slicedToArray_default","committedAt","getBranch","_getBranch","commitExists","commitsForCLI","commits","map","join","nextCommits","_callee5","limit","firstCommittedAtSeconds","commitsWithBuilds","commitsWithoutBuilds","_context5","includes","slice","maximallyDescendentCommits","_callee6","parentCommits","maxCommits","_context6","step","_callee7","candidateCommits","_ref4","newCommitsWithBuilds","newCommitsWithoutBuilds","_context7","app","hasBuildsWithCommits","getBaselineCommits","_x9","_getBaselineCommits","_callee8","branch","_ref3$ignoreLastBuild","ignoreLastBuildOnBranch","_ref5","_ref6","_ref6$app","firstBuild","lastBuild","initialCommitsWithBuilds","extraBaselineCommits","_args8","_context8","t1","t2","t3","t4","CHROMATIC_SERVER_PORT","CHROMATIC_INDEX_URL","CHROMATIC_TUNNEL_URL","CHROMATIC_CREATE_TUNNEL","CHROMATIC_APP_CODE","CHROMA_APP_CODE","LOGGLY_CUSTOMER_TOKEN","sendDebugToLoggly","sessionId","DISABLE_LOGGING","loggly","createClient","token","subdomain","tags","isDebugging","DEBUG","enable","msg","format","strip","write","TesterGetUploadUrlsMutation","getPathsInDir","rootDir","dirname","readdirSync","pathname","stats","statSync","isDirectory","contentLength","size","reduce","b","uploadToS3","_uploadToS","pathAndLengths","_ref2$getUploadUrls","domain","urls","total","bar","uploads","paths","getUploadUrls","ProgressBar","contentType","pathWithDirname","progressStream","progress","delta","tick","_ref7","createReadStream","pipe","content-type","content-length","all","prefix","lastInProgressCount","BUILD_POLL_INTERVAL","ENVIRONMENT_WHITELIST","STORYBOOK_CLI_FLAGS_BY_VERSION","--ci","--loglevel","envVar","_ref$noPrefix","noPrefix","_ref$level","level","TesterCreateAppTokenMutation","TesterCreateBuildMutation","TesterSkipBuildMutation","TesterBuildQuery","pluralize","noun","noNumber","pluralizedNoun","endsWith","replace","waitForBuild","diffs","build","inProgressCount","snapshotCount","changeCount","errorCount","getCommitAndBranch","inputFromCI","isTravisPrBuild","_process$env","TRAVIS_EVENT_TYPE","TRAVIS_PULL_REQUEST_SLUG","TRAVIS_REPO_SLUG","TRAVIS_PULL_REQUEST_SHA","TRAVIS_PULL_REQUEST_BRANCH","_envCi","fromCI","envCi","HEAD","GERRIT_BRANCH","CI_BRANCH","CI","REPOSITORY_URL","prepareAppOrBuild","noStart","buildScriptName","createTunnel","buildDirName","_dirSync","isolatorUrl","cleanup","_child","_parse","hash","cleanupTunnel","cachedUrlObject","cachedUrl","isolatorUrlObject","dirSync","unsafeCleanup","gte","rej","code","kill","pid","parse","_ref9","search","getStories","only","list","predicate","listStory","runtimeSpecs","_ref10","componentName","component","minimatch","story","getEnvironment","filteredEnvironment","environment","regex","runTest","_x7","_runTest","appCode","_ref5$noStart","skip","_ref5$fromCI","_ref5$autoAcceptChang","autoAcceptChanges","_ref5$exitZeroOnChang","exitZeroOnChanges","_ref5$ignoreLastBuild","_ref5$preserveMissing","preserveMissingSpecs","_ref5$verbose","_ref5$interactive","interactive","_ref5$indexUrl","indexUrl","_ref5$tunnelUrl","_ref5$createTunnel","_ref5$originalArgv","originalArgv","_ref5$sessionId","_ref11","jwtToken","_ref12","doAutoAcceptChanges","doExitZeroOnChanges","doIgnoreLastBuildOnBranch","baselineCommits","_getStorybookInfo","exitCode","_ref13","_ref14","_ref14$createBuild","number","specCount","componentCount","webUrl","onlineHint","_ref15","buildAutoAcceptChanges","exec","storybookBuildDir","uuid","x-chromatic-session-id","createAppToken","Authorization","packageVersion","input","createBuild","account","features","buildNumber","finish","confirm"],"mappings":"2BACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QA0DA,OArDAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwD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AsPLkH,GAAgB,GAAA/O,OAAG+H,GAAMiS,OAAT,KAAAha,OAAmBkf,EAAnB,KAAAlf,OAA8B+H,GAAMqG,QAApC,KAAApO,OAA+CqgB,EAClE1M,MAAM,GACNT,KAAK,MACL4H,QAAQ,oBAAqB,IAC7BnJ,OA1PQ8D,EAAA5N,KAAA,IA4Pa0a,kBAAO,6BAAAviB,OACC+H,GAAM6G,OADP,yEA5PpB,SAAA6G,EAAA5M,MAgQTiG,GAAuB/G,GAAM6G,OAAQG,IACrC1G,GAAG,mBAAArI,OAEQ+H,GAAM6G,OAFd,sDAAA5O,OAE2E+H,GAAM6G,OAFjF,gBAAA5O,OAEwG+H,GAAM6G,OAF9G,8CAAA5O,OAI8B+H,GAAMiS,OAJpC,0QAKD,CAAEE,UAAU,KAGd7R,GAAG,qEAAArI,OAKF+H,GAAM6G,OALJ,QAAA5O,OAKiB+O,GALjB,aAQD,CAAEmL,UAAU,IAjRL,gBAAAzE,EAAA3M,OAAA,SAsRNiY,IAtRM,0BAAAtL,EAAA9L,SAAAkL,EAAAnT,KAAA","file":"tester.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 42);\n","module.exports = require(\"@babel/runtime/regenerator\");","module.exports = require(\"@babel/runtime/helpers/asyncToGenerator\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","module.exports = require(\"debug\");","module.exports = require(\"@babel/runtime/helpers/classCallCheck\");","module.exports = require(\"path\");","module.exports = require(\"@babel/runtime/helpers/possibleConstructorReturn\");","module.exports = require(\"@babel/runtime/helpers/getPrototypeOf\");","module.exports = require(\"@babel/runtime/helpers/inherits\");","module.exports = require(\"url\");","module.exports = require(\"@babel/runtime/helpers/createClass\");","module.exports = require(\"node-fetch\");","module.exports = require(\"@babel/runtime/helpers/objectSpread\");","module.exports = require(\"child_process\");","module.exports = require(\"pino\");","module.exports = require(\"denodeify\");","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","module.exports = require(\"jsonfile\");","module.exports = require(\"fs\");","module.exports = require(\"minimatch\");","module.exports = require(\"semver\");","module.exports = require(\"jsdom\");","module.exports = require(\"@babel/runtime/helpers/taggedTemplateLiteral\");","module.exports = require(\"fake-tag\");","module.exports = require(\"node-ask\");","module.exports = require(\"tree-kill\");","module.exports = require(\"env-ci\");","module.exports = require(\"uuid\");","module.exports = require(\"tmp\");","// Figure out the storybook version and view layer\n\nconst viewLayers = [\n 'react',\n 'angular',\n 'vue',\n 'polymer',\n 'mithril',\n 'marko',\n 'html',\n 'svelte',\n 'riot',\n 'ember',\n];\n\n// This hack is simply to stop webpack from trying to do something with this require\n// This code is bundled by webpack but runs in node\n// eslint-disable-next-line no-eval\nconst require2 = eval('require');\n\nexport default function getStorybookInfo() {\n // Allow setting storybook version via CHROMATIC_STORYBOOK_VERSION='react@4.0-alpha.8' for unusual\n // cases (such as our permacache examples)\n const { CHROMATIC_STORYBOOK_VERSION } = process.env;\n if (CHROMATIC_STORYBOOK_VERSION) {\n const [viewLayer, storybookVersion] = CHROMATIC_STORYBOOK_VERSION.split('@');\n if (!viewLayer || !storybookVersion) {\n throw new Error('CHROMATIC_STORYBOOK_VERSION misspecified -- use \"viewLayer@version\"');\n }\n return { viewLayer, storybookVersion };\n }\n\n while (viewLayers.length > 0) {\n const viewLayer = viewLayers.shift();\n try {\n const { version: storybookVersion } = require2(`@storybook/${viewLayer}/package.json`);\n return { viewLayer, storybookVersion };\n } catch (err) {\n // This is OK\n }\n }\n\n throw new Error(\n `Couldn't discover storybook version. Try upgrading the storybook-chromatic package?`\n );\n}\n","module.exports = require(\"https\");","module.exports = require(\"@chromaui/localtunnel\");","module.exports = require(\"async-retry\");","const pino = require('pino');\nconst errSerializer = require('./errSerializer').default;\n\nmodule.exports = {\n __esModule: true,\n default: {\n ...pino.stdSerializers,\n err: errSerializer,\n },\n};\n","module.exports = require(\"node-loggly-bulk\");","module.exports = require(\"util\");","module.exports = require(\"strip-color\");","module.exports = require(\"progress-stream\");","module.exports = require(\"progress\");","const pino = require('pino');\nconst responseSerializer = require('./responseSerializer').default;\n\nmodule.exports = {\n __esModule: true,\n default: err => {\n // We *don't* want to log the envPairs key -- this is added by node and includes\n // all of our environment variables! See https://github.com/chromaui/chromatic/issues/1993\n const { envPairs, ...serializedErr } = pino.stdSerializers.err(err);\n return {\n ...serializedErr,\n // Serialize the response part of err with the response serializer\n ...(err.response && { response: responseSerializer(err.response) }),\n };\n },\n};\n","// Serialize a response object as returned by node-fetch into version useful for debugging\n// https://developer.mozilla.org/en-US/docs/Web/API/Response\n\nmodule.exports = {\n __esModule: true,\n default: function responseSerializer({ status, statusText, headers, url, _raw }) {\n return {\n status,\n statusText,\n headers,\n url,\n _raw: _raw.toString(),\n };\n },\n};\n","/* eslint-disable no-console, class-methods-use-this, no-param-reassign */\nimport { JSDOM, VirtualConsole } from 'jsdom';\n\n// Add canvas mock based on this comment: https://github.com/jsdom/jsdom/issues/1782#issuecomment-337656878\nfunction mockCanvas(window) {\n window.HTMLCanvasElement.prototype.getContext = () => ({\n fillRect: () => ({}),\n clearRect: () => ({}),\n getImageData: (x, y, w, h) => ({ data: new Array(w * h * 4) }),\n putImageData: () => ({}),\n createImageData: () => [],\n setTransform: () => ({}),\n drawImage: () => ({}),\n save: () => ({}),\n fillText: () => ({}),\n restore: () => ({}),\n beginPath: () => ({}),\n moveTo: () => ({}),\n lineTo: () => ({}),\n closePath: () => ({}),\n stroke: () => ({}),\n translate: () => ({}),\n scale: () => ({}),\n rotate: () => ({}),\n arc: () => ({}),\n fill: () => ({}),\n measureText: () => ({ width: 0 }),\n transform: () => ({}),\n rect: () => ({}),\n clip: () => ({}),\n });\n\n window.HTMLCanvasElement.prototype.toDataURL = () => '';\n}\n\nfunction addShimsToJSDOM(dom) {\n Object.defineProperty(dom.window, 'matchMedia', {\n value: () => ({\n matches: true,\n addListener: () => {},\n removeListener: () => {},\n }),\n writable: true,\n });\n\n class LocalStorageMock {\n constructor() {\n this.store = {};\n }\n\n getItem(key) {\n return this.store[key];\n }\n\n removeItem(key) {\n delete this.store[key];\n }\n\n setItem(key, value) {\n this.store[key] = value.toString();\n }\n\n clear() {\n this.store = {};\n }\n }\n Object.defineProperty(dom.window, 'localStorage', {\n value: new LocalStorageMock(),\n writable: true,\n });\n\n class WorkerMock {\n addEventListener() {}\n\n removeEventLister() {}\n\n postMessage() {}\n\n terminate() {}\n }\n Object.defineProperty(dom.window, 'Worker', {\n value: WorkerMock,\n writable: true,\n });\n\n Object.defineProperty(dom.window, 'crypto', {\n value: {\n getRandomValues: () => 0,\n },\n writable: true,\n });\n\n Object.defineProperty(dom.window.navigator, 'mimeTypes', {\n value: () => [],\n writable: true,\n });\n\n Object.defineProperty(dom.window.URL, 'createObjectURL', { value: () => {} });\n Object.defineProperty(dom.window.URL, 'revokeObjectURL', { value: () => {} });\n\n // We have to do this in this screwy way because Angular does some monkey patching\n // expects an non-es2015 class here.\n function MutationObserverMock() {}\n MutationObserverMock.prototype = {\n observe() {\n return [];\n },\n takeRecords() {\n return [];\n },\n disconnect() {},\n };\n Object.defineProperty(dom.window, 'MutationObserver', {\n value: MutationObserverMock,\n writable: true,\n });\n\n class IntlMock {\n static supportedLocalesOf() {\n return [];\n }\n\n resolvedOptions() {\n return {};\n }\n }\n class IntlFormatMock extends IntlMock {\n format() {\n return '';\n }\n\n formatToParts() {\n return [];\n }\n }\n class IntlCollatorMock extends IntlMock {\n compare() {\n return 0;\n }\n }\n class IntlPluralRulesMock extends IntlMock {\n select() {\n return '';\n }\n }\n class IntlDateTimeFormatMock extends IntlFormatMock {}\n class IntlListFormatMock extends IntlFormatMock {}\n class IntlNumberFormatMock extends IntlFormatMock {}\n class IntlRelativeTimeFormatMock extends IntlFormatMock {}\n Object.defineProperty(dom.window, 'Intl', {\n value: {\n Collator: IntlCollatorMock,\n DateTimeFormat: IntlDateTimeFormatMock,\n ListFormat: IntlListFormatMock,\n NumberFormat: IntlNumberFormatMock,\n PluralRules: IntlPluralRulesMock,\n RelativeTimeFormat: IntlRelativeTimeFormatMock,\n },\n writable: true,\n });\n\n const customElements = {};\n Object.defineProperty(dom.window, 'customElements', {\n value: {\n define: (name, constructor) => {\n customElements[name] = customElements[name] || { resolvers: [] };\n customElements[name].constructor = constructor;\n customElements[name].resolvers.forEach(resolve => resolve());\n },\n get: name => customElements[name] && customElements[name].constructor,\n upgrade: () => {},\n whenDefined: name =>\n new Promise(resolve => {\n customElements[name] = customElements[name] || { resolvers: [] };\n if (customElements[name].constructor) resolve();\n else customElements[name].resolvers.push(resolve);\n }),\n },\n writable: false,\n });\n\n mockCanvas(dom.window);\n}\n\nexport default async function getRuntimeSpecs(\n url,\n { verbose = false, names: { product, packageName } } = {}\n) {\n const logs = [];\n const virtualConsole = new VirtualConsole();\n Object.keys(console).forEach(logType => {\n virtualConsole.on(logType, log => logs.push({ logType, log }));\n });\n virtualConsole.on('jsdomError', log => logs.push({ logType: 'error', log }));\n\n if (verbose) {\n virtualConsole.sendTo(console);\n }\n\n const dom = await JSDOM.fromURL(url, {\n userAgent: 'Chromatic',\n // We need to execute the scripts on the page\n runScripts: 'dangerously',\n // We need to load scripts that are loaded via script tags\n resources: 'usable',\n // Send console.logs -> /dev/null (so to speak)\n virtualConsole,\n // Add a requestAnimationFrame polyfill, react@16 warns about it\n pretendToBeVisual: true,\n });\n\n // NOTE: this line runs immediately after the HTML for the page has been loaded\n // it's not possible that any external script tags have been executed.\n // It is possible that they have a <script> tag that need these shims, but\n // I highly doubt it. If we run into this we can always use JSDOM's old API\n // to inject our own scripts at 'create' time\n addShimsToJSDOM(dom);\n\n return new Promise((resolve, reject) =>\n dom.window.document.addEventListener('DOMContentLoaded', () => {\n try {\n const separator = '=========================';\n\n if (!dom.window.__chromaticRuntimeSpecs__) {\n console.error(\n `Didn't find ${product} addon in your storybook.\n \nDid you add it with \\`import '${packageName}'\\` in your \\`.storybook/config.js\\`?\n\nRead more: http://docs.chromaticqa.com`\n );\n\n if (!verbose && logs.length) {\n console.error(`Your app's output:\\n${separator}\\n`);\n logs.forEach(({ logType, log }) => console[logType](log));\n console.error(`\\n${separator}\\n`);\n }\n throw new Error(`Didn't find 'window.__chromaticRuntimeSpecs__' at ${url}.`);\n }\n\n // If their app logged something to console.error, it's probably, but\n // not definitely an issue. See https://github.com/hichroma/chromatic/issues/757\n if (logs.find(log => log.logType === 'error')) {\n console.error(`\\nYour app logged the following to the error console:\\n${separator}`);\n logs\n .filter(log => log.logType === 'error')\n .forEach(({ logType, log }) => console[logType](log));\n console.error(\n `\\n${separator}\\nThis may lead to some stories not working right or getting detected by Chromatic` +\n `\\nWe suggest you fix the errors, but we will continue anyway..\\n`\n );\n }\n\n const specs = dom.window.__chromaticRuntimeSpecs__();\n dom.window.close();\n resolve(specs);\n } catch (err) {\n dom.window.close();\n reject(err);\n }\n })\n );\n}\n","import { spawn } from 'child_process';\nimport https from 'https';\nimport fetch from 'node-fetch';\nimport path from 'path';\n\nconst CHECK_EVERY = 1000;\nconst TIMEOUT = 5 * 60 * 1000;\nconst httpsAgent = new https.Agent({ rejectUnauthorized: false });\n\nexport async function checkResponse(url) {\n try {\n await fetch(url, { agent: url.startsWith('https:') ? httpsAgent : undefined });\n return true;\n } catch (e) {\n return false;\n }\n}\n\nasync function waitForResponse(child, url) {\n const timeoutAt = Date.now() + TIMEOUT;\n return new Promise((resolve, reject) => {\n let resolved = false;\n async function check() {\n if (Date.now() > timeoutAt) {\n resolved = true;\n reject(new Error(`No server responding at ${url} within ${TIMEOUT / 1000} seconds.`));\n return;\n }\n\n if (await checkResponse(url)) {\n resolved = true;\n resolve();\n return;\n }\n setTimeout(check, CHECK_EVERY);\n }\n check();\n\n if (child) {\n let output = '';\n child.stderr.on('data', e => {\n output += e.toString();\n });\n child.stdout.on('data', o => {\n output += o.toString();\n });\n\n child.on('close', () => {\n if (!resolved) {\n reject(new Error(`Script failed to start: ${output}\\n`));\n }\n });\n }\n });\n}\n\nexport default async function startApp({\n scriptName,\n commandName,\n args = [],\n url,\n inheritStdio = false,\n}) {\n const env = {\n ...process.env,\n NODE_ENV: 'development',\n BROWSER: 'none',\n };\n\n let child;\n if (scriptName) {\n if (await checkResponse(url)) {\n // We assume the process that is already running on the url is indeed our storybook\n return null;\n }\n\n // This technique lifted from https://github.com/mysticatea/npm-run-all/blob/52eaf86242ba408dedd015f53ca7ca368f25a026/lib/run-task.js#L156-L174\n const npmPath = process.env.npm_execpath;\n const npmPathIsJs = typeof npmPath === 'string' && /\\.m?js/.test(path.extname(npmPath));\n const execPath = npmPathIsJs ? process.execPath : npmPath || 'npm';\n\n // Run either:\n // npm/yarn run scriptName (depending on npm_execpath)\n // node path/to/npm.js run scriptName (if npm run via node)\n child = spawn(execPath, [...(npmPathIsJs ? [npmPath] : []), 'run', scriptName, ...args], {\n env,\n ...(inheritStdio && { stdio: 'inherit' }),\n });\n } else {\n if (!commandName) {\n throw new Error('You must pass commandName or scriptName');\n }\n child = spawn(commandName, { env, shell: true });\n }\n\n if (url) {\n await waitForResponse(child, url);\n }\n\n return child;\n}\n","import localtunnel from '@chromaui/localtunnel';\nimport setupDebug from 'debug';\nimport denodeify from 'denodeify';\n\nconst debug = setupDebug('storybook-chromatic:tester:tunnel');\n\nexport default async function openTunnel({ tunnelUrl, port, https }) {\n if (!port) {\n throw new Error('Need to pass a port into `openTunnel`');\n }\n\n const tunnel = await denodeify(localtunnel)(port, {\n local_host: 'localhost',\n host: tunnelUrl,\n https: !!https,\n cert: https && https.cert,\n key: https && https.key,\n ca: https && https.ca,\n });\n\n // The ones that are commented out are debugged already by our localtunnel fork\n tunnel.on('url', url => debug(`Got tunnel url: %s`, url));\n // tunnel.on('error', error => debug(`Got tunnel error: %O`, error));\n tunnel.on('request', request => debug(`Got request: %O`, request));\n // tunnel.tunnel_cluster.on('open', socket => debug(`Got tunnel cluster open`));\n // tunnel.tunnel_cluster.on('request', request => debug(`Got tunnel cluster request: %O`, request));\n tunnel.tunnel_cluster.on('error', error => debug(`Got tunnel cluster error: %O`, error));\n // tunnel.tunnel_cluster.on('dead', () => debug(`Got tunnel cluster dead`));\n\n return tunnel;\n}\n","import path from 'path';\nimport { readFileSync, writeFileSync } from 'jsonfile';\n\nexport function checkPackageJson({ command, appDir = process.cwd() } = {}) {\n const packageJson = readFileSync(path.resolve(appDir, './package.json'));\n\n return Object.values(packageJson.scripts || {}).find(script => script.match(command));\n}\n\nexport function addScriptToPackageJson(scriptName, scriptCommand, { appDir = process.cwd() } = {}) {\n const filename = path.resolve(appDir, './package.json');\n const packageJson = readFileSync(filename);\n\n if (packageJson[scriptName]) {\n throw new Error(`Script named '${scriptName}' already exists in package.json`);\n }\n\n if (!packageJson.scripts) {\n packageJson.scripts = {};\n }\n packageJson.scripts[scriptName] = scriptCommand;\n writeFileSync(filename, packageJson, { spaces: 2 });\n}\n","import fetch from 'node-fetch';\nimport pino from 'pino';\nimport retry from 'async-retry';\nimport serializers from './serializers';\n\nexport class HTTPClientError extends Error {\n constructor(fetchResponse, message, ...params) {\n // Pass remaining arguments (including vendor specific ones) to parent constructor\n super(...params);\n\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, HTTPClientError);\n }\n\n this.response = fetchResponse;\n this.message =\n message ||\n `HTTPClient Failed to fetch ${fetchResponse.url}, got ${fetchResponse.status}/${\n fetchResponse.statusText\n }`;\n }\n}\n\n// A basic wrapper class for fetch with the ability to retry fetches\nexport default class HTTPClient {\n constructor(options = {}) {\n const { log = pino({ name: 'HTTPClient', serializers }), retries = 0, headers = {} } = options;\n this.log = log;\n this.retries = retries;\n this.headers = headers;\n }\n\n async fetch(url, options = {}, { retries, noLogErrorBody = false } = {}) {\n return retry(\n async () => {\n const res = await fetch(url, {\n ...options,\n headers: {\n ...this.headers,\n ...options.headers,\n },\n });\n\n if (!res.ok) {\n const error = new HTTPClientError(res);\n // You can only call text() or json() once, so if we are going to handle it outside of here..\n if (!noLogErrorBody) {\n const body = await res.text();\n this.log.warn({ body }, error.message);\n }\n\n throw error;\n }\n\n return res;\n },\n {\n // The user can override retries and set it to 0\n retries: typeof retries !== 'undefined' ? retries : this.retries,\n onRetry: err => {\n this.log.warn({ url, err }, 'Retrying fetch');\n },\n }\n );\n }\n\n async fetchBuffer(url, options) {\n const res = await this.fetch(url, options);\n return res.buffer();\n }\n\n // Convenience static methods\n static async fetch(url, fetchOptions = {}, clientOptions = {}) {\n return new HTTPClient(clientOptions).fetch(url, fetchOptions);\n }\n\n static async fetchBuffer(url, fetchOptions = {}, clientOptions = {}) {\n return new HTTPClient(clientOptions).fetchBuffer(url, fetchOptions);\n }\n}\n","import HTTPClient from './HTTPClient';\n\nexport default class GraphQLClient {\n constructor({ uri, headers, retries }) {\n if (!uri) throw new Error('Option `uri` required.');\n\n this.uri = uri;\n this.headers = headers;\n this.retries = retries;\n this.client = new HTTPClient();\n }\n\n async runQuery(query, variables) {\n const response = await this.client.fetch(\n this.uri,\n {\n headers: {\n ...this.headers,\n 'Content-Type': 'application/json',\n },\n method: 'post',\n body: JSON.stringify({ query, variables }),\n },\n { retries: this.retries }\n );\n\n const { data, errors } = await response.json();\n\n if (errors) throw errors;\n\n return data;\n }\n\n // Convenience static method.\n static async runQuery(options, query, variables) {\n return new GraphQLClient(options).runQuery(query, variables);\n }\n}\n","import { execSync } from 'child_process';\nimport setupDebug from 'debug';\nimport gql from 'fake-tag';\n\nconst debug = setupDebug('storybook-chromatic:tester:git');\n\nasync function execGitCommand(command) {\n try {\n return execSync(`${command} 2>&1`)\n .toString()\n .trim();\n } catch (error) {\n const { message = '' } = error;\n\n if (message.match('Not a git repository')) {\n throw new Error(\n `Unable to execute git command '${command}'.\n\nChromatic only works in git projects.\nContact us at support@hichroma.com if you need to use Chromatic outside of one.\n`\n );\n }\n\n if (message.match('does not have any commits yet')) {\n throw new Error(\n `Unable to execute git command '${command}'.\n\nChromatic requires that you have created a commit before it can be run.\n`\n );\n }\n\n throw error;\n }\n}\n\nexport const FETCH_N_INITIAL_BUILD_COMMITS = 20;\n\nconst TesterFirstCommittedAtQuery = gql`\n query TesterFirstCommittedAtQuery($branch: String!) {\n app {\n firstBuild(sortByCommittedAt: true) {\n committedAt\n }\n lastBuild(branch: $branch, sortByCommittedAt: true) {\n commit\n committedAt\n }\n }\n }\n`;\n\nconst TesterHasBuildsWithCommitsQuery = gql`\n query TesterHasBuildsWithCommitsQuery($commits: [String!]!) {\n app {\n hasBuildsWithCommits(commits: $commits)\n }\n }\n`;\n\n// NOTE: At some point we should check that the commit has been pushed to the\n// remote and the branch matches with origin/REF, but for now we are naive about\n// adhoc builds.\n\n// We could cache this, but it's probably pretty quick\nexport async function getCommit() {\n const [commit, committedAtSeconds, committerEmail, committerName] = (await execGitCommand(\n `git log -n 1 --format=\"%H,%ct,%ce,%cn\"`\n )).split(',');\n\n return { commit, committedAt: committedAtSeconds * 1000, committerEmail, committerName };\n}\n\nexport async function getBranch() {\n return execGitCommand(`git rev-parse --abbrev-ref HEAD`);\n}\n\n// Check if a commit exists in the repository\nasync function commitExists(commit) {\n try {\n await execGitCommand(`git cat-file -e \"${commit}^{commit}\"`);\n return true;\n } catch (error) {\n return false;\n }\n}\n\nfunction commitsForCLI(commits) {\n return commits.map(c => c.trim()).join(' ');\n}\n\n// git rev-list in a basic form gives us a list of commits reaching back to\n// `firstCommittedAtSeconds` (i.e. when the first build of this app happened)\n// in reverse chronological order.\n//\n// A simplified version of what we are doing here is just finding the first\n// commit in that list that has a build. We only want to send `limit` to\n// the server in this pass (although we may already know some commits that do\n// or do not have builds from earlier passes). So we just pick the first `limit`\n// commits from the command, filtering out `commitsWith[out]Builds`.\n//\n// However, it's not quite that simple -- because of branching. However,\n// passing commits after `--not` in to `git rev-list` *occludes* all the ancestors\n// of those commits. This is exactly what we need once we find one or more commits\n// that do have builds: a list of the ancestors of HEAD that are not accestors of\n// `commitsWithBuilds`.\n//\nasync function nextCommits(\n limit,\n { firstCommittedAtSeconds, commitsWithBuilds, commitsWithoutBuilds }\n) {\n // We want the next limit commits that aren't \"covered\" by `commitsWithBuilds`\n // This will print out all commits in `commitsWithoutBuilds` (except if they are covered),\n // so we ask enough that we'll definitely get `limit` unknown commits\n const command = `git rev-list HEAD \\\n ${firstCommittedAtSeconds ? `--since ${firstCommittedAtSeconds}` : ''} \\\n -n ${limit + commitsWithoutBuilds.length} --not ${commitsForCLI(commitsWithBuilds)}`;\n debug(`running ${command}`);\n const commits = (await execGitCommand(command)).split('\\n').filter(c => !!c);\n debug(`command output: ${commits}`);\n\n return (\n commits\n // No sense in checking commits we already know about\n .filter(c => !commitsWithBuilds.includes(c))\n .filter(c => !commitsWithoutBuilds.includes(c))\n .slice(0, limit)\n );\n}\n\n// Which of the listed commits are \"maximally descendent\":\n// ie c in commits such that there are no descendents of c in commits.\nasync function maximallyDescendentCommits(commits) {\n if (commits.length === 0) {\n return commits;\n }\n\n // <commit>^@ expands to all parents of commit\n const parentCommits = commits.map(c => `\"${c}^@\"`);\n // List the tree from <commits> not including the tree from <parentCommits>\n // This just filters any commits that are ancestors of other commits\n const command = `git rev-list ${commitsForCLI(commits)} --not ${commitsForCLI(parentCommits)}`;\n debug(`running ${command}`);\n const maxCommits = (await execGitCommand(command)).split('\\n').filter(c => !!c);\n debug(`command output: ${maxCommits}`);\n\n return maxCommits;\n}\n\n// Exponentially iterate `limit` up to infinity to find a \"covering\" set of commits with builds\nasync function step(\n client,\n limit,\n { firstCommittedAtSeconds, commitsWithBuilds, commitsWithoutBuilds }\n) {\n debug(`step: checking ${limit} up to ${firstCommittedAtSeconds}`);\n debug(`step: commitsWithBuilds: ${commitsWithBuilds}`);\n debug(`step: commitsWithoutBuilds: ${commitsWithoutBuilds}`);\n\n const candidateCommits = await nextCommits(limit, {\n firstCommittedAtSeconds,\n commitsWithBuilds,\n commitsWithoutBuilds,\n });\n\n debug(`step: candidateCommits: ${candidateCommits}`);\n\n // No more commits uncovered commitsWithBuilds!\n if (candidateCommits.length === 0) {\n debug('step: no candidateCommits; we are done');\n return commitsWithBuilds;\n }\n\n const {\n app: { hasBuildsWithCommits: newCommitsWithBuilds },\n } = await client.runQuery(TesterHasBuildsWithCommitsQuery, {\n commits: candidateCommits,\n });\n debug(`step: newCommitsWithBuilds: ${newCommitsWithBuilds}`);\n\n const newCommitsWithoutBuilds = candidateCommits.filter(\n commit => !newCommitsWithBuilds.find(c => c === commit)\n );\n\n return step(client, limit * 2, {\n firstCommittedAtSeconds,\n commitsWithBuilds: [...commitsWithBuilds, ...newCommitsWithBuilds],\n commitsWithoutBuilds: [...commitsWithoutBuilds, ...newCommitsWithoutBuilds],\n });\n}\n\n// eslint-disable-next-line import/prefer-default-export\nexport async function getBaselineCommits(client, { branch, ignoreLastBuildOnBranch = false } = {}) {\n const { committedAt } = await getCommit();\n\n // Include the latest build from this branch as an ancestor of the current build\n const {\n app: { firstBuild, lastBuild },\n } = await client.runQuery(TesterFirstCommittedAtQuery, {\n branch,\n });\n debug(`App firstBuild: ${firstBuild}, lastBuild: ${lastBuild}`);\n\n if (!firstBuild) {\n debug('App has no builds, returning []');\n return [];\n }\n\n const initialCommitsWithBuilds = [];\n const extraBaselineCommits = [];\n\n // Don't do any special branching logic for builds on `HEAD`, this is fairly meaningless\n // (CI systems that have been pushed tags can not set a branch)\n if (\n branch !== 'HEAD' &&\n !ignoreLastBuildOnBranch &&\n lastBuild &&\n lastBuild.committedAt <= committedAt\n ) {\n if (await commitExists(lastBuild.commit)) {\n initialCommitsWithBuilds.push(lastBuild.commit);\n } else {\n debug(`Last build commit not in index, blindly appending to baselines`);\n extraBaselineCommits.push(lastBuild.commit);\n }\n }\n\n // Get a \"covering\" set of commits that have builds. This is a set of commits\n // such that any ancestor of HEAD is either:\n // - in commitsWithBuilds\n // - an ancestor of a commit in commitsWithBuilds\n // - has no build\n const commitsWithBuilds = await step(client, FETCH_N_INITIAL_BUILD_COMMITS, {\n firstCommittedAtSeconds: firstBuild.committedAt && firstBuild.committedAt / 1000,\n commitsWithBuilds: initialCommitsWithBuilds,\n commitsWithoutBuilds: [],\n });\n\n debug(`Final commitsWithBuilds: ${commitsWithBuilds}`);\n\n // For any pair A,B of builds, there is no point in using B if it is an ancestor of A.\n return [...extraBaselineCommits, ...(await maximallyDescendentCommits(commitsWithBuilds))];\n}\n","// Note this file differs from our usual convention because it is packaged\nconst {\n CHROMATIC_SERVER_PORT = 3004,\n CHROMATIC_INDEX_URL = 'https://index.chromaticqa.com',\n CHROMATIC_TUNNEL_URL = 'https://tunnel.chromaticqa.com',\n CHROMATIC_CREATE_TUNNEL = 'true',\n CHROMATIC_APP_CODE,\n CHROMA_APP_CODE,\n LOGGLY_CUSTOMER_TOKEN = 'b5e26204-cdc5-4c78-a9cc-c69eb7fabad3',\n} = process.env;\n\nexport {\n CHROMATIC_SERVER_PORT,\n CHROMATIC_INDEX_URL,\n CHROMATIC_TUNNEL_URL,\n CHROMATIC_CREATE_TUNNEL,\n CHROMATIC_APP_CODE,\n CHROMA_APP_CODE,\n LOGGLY_CUSTOMER_TOKEN,\n};\n","import debug from 'debug';\nimport loggly from 'node-loggly-bulk';\nimport { format } from 'util';\nimport strip from 'strip-color';\n\nimport { LOGGLY_CUSTOMER_TOKEN } from '../assets/environment';\n\nexport default function sendDebugToLoggly({ sessionId }) {\n if (process.env.DISABLE_LOGGING) {\n return;\n }\n\n const client = loggly.createClient({\n token: LOGGLY_CUSTOMER_TOKEN,\n subdomain: 'hichroma',\n tags: ['storybook-chromatic'],\n json: true,\n });\n\n // Is the user debugging already? If so they will get what we want to debug :shrug:\n const isDebugging = !!process.env.DEBUG;\n\n debug.enable('storybook-chromatic:*,localtunnel:*');\n\n debug.log = (...args) => {\n const msg = format(...args);\n client.log({ sessionId, msg: strip(msg) });\n\n if (isDebugging) {\n process.stderr.write(`${msg}\\n`);\n }\n };\n}\n","import setupDebug from 'debug';\nimport { readdirSync, statSync, createReadStream } from 'fs';\nimport fetch from 'node-fetch';\nimport { join } from 'path';\nimport { URL } from 'url';\nimport progress from 'progress-stream';\nimport ProgressBar from 'progress';\n\nconst debug = setupDebug('storybook-chromatic:tester:upload');\n\nconst TesterGetUploadUrlsMutation = `\n mutation TesterGetUploadUrlsMutation($paths: [String!]!) {\n getUploadUrls(paths: $paths) {\n domain\n urls {\n path\n url\n contentType\n }\n }\n }\n`;\n\n// Get all paths in rootDir, starting at dirname.\n// We don't want the paths to include rootDir -- so if rootDir = storybook-static,\n// paths will be like iframe.html rather than storybook-static/iframe.html\nfunction getPathsInDir(rootDir, dirname = '.') {\n return readdirSync(join(rootDir, dirname))\n .map(p => join(dirname, p))\n .map(pathname => {\n const stats = statSync(join(rootDir, pathname));\n if (stats.isDirectory()) {\n return getPathsInDir(rootDir, pathname);\n }\n return [{ pathname, contentLength: stats.size }];\n })\n .reduce((a, b) => [...a, ...b], []); // flatten\n}\n\nexport default async function uploadToS3({ client, dirname }) {\n debug(`uploading '${dirname}' to s3`);\n\n const pathAndLengths = getPathsInDir(dirname);\n\n const {\n getUploadUrls: { domain, urls },\n } = await client.runQuery(TesterGetUploadUrlsMutation, {\n paths: pathAndLengths.map(({ pathname }) => pathname),\n });\n\n const total = pathAndLengths.map(({ contentLength }) => contentLength).reduce((a, b) => a + b, 0);\n const bar = new ProgressBar('uploading [:bar] :rate/bps :percent :etas', { width: 20, total });\n\n const uploads = [];\n urls.forEach(({ path, url, contentType }) => {\n const pathWithDirname = join(dirname, path);\n debug(`uploading '${pathWithDirname}' to '${url}' with content type '${contentType}'`);\n\n const progressStream = progress();\n progressStream.on('progress', ({ delta }) => bar.tick(delta));\n const { contentLength } = pathAndLengths.find(({ pathname }) => pathname === path);\n uploads.push(\n (async () => {\n const res = await fetch(url, {\n method: 'PUT',\n body: createReadStream(pathWithDirname).pipe(progressStream),\n headers: {\n 'content-type': contentType,\n 'content-length': contentLength,\n },\n });\n\n if (!res.ok) {\n debug(`Uploading '${path}' failed: %O`, res);\n throw new Error(`Failed to upload ${path}`);\n }\n })()\n );\n });\n\n await Promise.all(uploads);\n\n // NOTE: storybook-specific\n return new URL('/iframe.html', domain).toString();\n}\n","import denodeify from 'denodeify';\nimport { confirm } from 'node-ask';\nimport setupDebug from 'debug';\nimport kill from 'tree-kill';\nimport envCi from 'env-ci';\nimport { v4 as uuid } from 'uuid';\nimport { parse, format } from 'url';\nimport minimatch from 'minimatch';\nimport { dirSync } from 'tmp';\nimport { gte } from 'semver';\n\nimport getRuntimeSpecs from './runtimes';\nimport getStorybookInfo from './storybook';\nimport startApp, { checkResponse } from './start-app';\nimport openTunnel from '../lib/tunnel';\nimport { checkPackageJson, addScriptToPackageJson } from './package-json';\nimport GraphQLClient from '../../../../lib/util/GraphQLClient';\nimport { getBaselineCommits, getCommit, getBranch } from './git';\nimport { name as packageName, version as packageVersion } from '../../package.json';\nimport { CHROMATIC_INDEX_URL, CHROMATIC_TUNNEL_URL } from '../assets/environment';\nimport sendDebugToLoggly from './sendDebugToLoggly';\nimport uploadToS3 from './upload-to-s3';\nimport makeLog from './log';\n\nconst BUILD_POLL_INTERVAL = 1000;\n// We send up all environment variables provided by these complicated systems.\n// We don't want to send up *all* environment vars as they could include sensitive information\n// about the user's build environment\nconst ENVIRONMENT_WHITELIST = [/^GERRIT/, /^TRAVIS/];\n\nconst STORYBOOK_CLI_FLAGS_BY_VERSION = {\n '--ci': '4.0.0',\n '--loglevel': '5.1.0',\n};\n\nconst names =\n packageName === 'storybook-chromatic'\n ? {\n product: 'Chromatic',\n packageName: 'storybook-chromatic',\n script: 'chromatic',\n command: 'chromatic test',\n envVar: 'CHROMATIC_APP_CODE',\n url: 'https://www.chromaticqa.com',\n }\n : {\n product: 'Chroma',\n packageName: 'storybook-chroma',\n script: 'chroma',\n command: 'chroma publish',\n envVar: 'CHROMA_APP_CODE',\n url: 'https://www.chromaui.com',\n };\n\nconst log = makeLog(names.product);\n\nconst TesterCreateAppTokenMutation = `\n mutation TesterCreateAppTokenMutation($appCode: String!) {\n createAppToken(code: $appCode)\n }\n`;\n\nconst TesterCreateBuildMutation = `\n mutation TesterCreateBuildMutation($input: CreateBuildInput!, $isolatorUrl: String!) {\n createBuild(input: $input, isolatorUrl: $isolatorUrl) {\n id\n number\n specCount\n snapshotCount\n componentCount\n webUrl\n app {\n account {\n features { \n diffs\n }\n }\n }\n }\n }\n`;\n\nconst TesterSkipBuildMutation = `\n mutation TesterSkipBuildMutation($appId: ObjID, $commit: String!) {\n skipBuild(appId: $appId, commit: $commit)\n }\n`;\n\nconst TesterBuildQuery = `\n query TesterBuildQuery($buildNumber: Int!) {\n app {\n build(number: $buildNumber) {\n id\n status\n autoAcceptChanges\n inProgressCount: snapshotCount(statuses: [SNAPSHOT_IN_PROGRESS])\n snapshotCount\n changeCount\n errorCount: snapshotCount(statuses: [SNAPSHOT_CAPTURE_ERROR])\n }\n }\n }\n`;\n\nconst debug = setupDebug('storybook-chromatic:tester');\n\nfunction pluralize(n, noun, noNumber) {\n let pluralizedNoun = n === 1 ? noun : `${noun}s`;\n\n if (pluralizedNoun.endsWith('ys')) {\n pluralizedNoun = pluralizedNoun.replace(/ys$/, 'ies');\n }\n\n return noNumber ? pluralizedNoun : `${n} ${pluralizedNoun}`;\n}\n\nlet lastInProgressCount;\nasync function waitForBuild(client, variables, { diffs }) {\n const {\n app: { build },\n } = await client.runQuery(TesterBuildQuery, variables);\n\n debug(`build:${JSON.stringify(build)}`);\n const { status, inProgressCount, snapshotCount, changeCount, errorCount } = build;\n if (status === 'BUILD_IN_PROGRESS') {\n if (inProgressCount !== lastInProgressCount) {\n lastInProgressCount = inProgressCount;\n log(\n diffs\n ? `${inProgressCount}/${pluralize(snapshotCount, 'snapshot')} remain to test. ` +\n `(${pluralize(changeCount, 'change')}, ${pluralize(errorCount, 'error')})`\n : `${inProgressCount}/${pluralize(snapshotCount, 'story')} remain to publish. `\n );\n }\n await new Promise(resolve => setTimeout(resolve, BUILD_POLL_INTERVAL));\n return waitForBuild(client, variables, { diffs });\n }\n\n return build;\n}\n\nasync function getCommitAndBranch({ inputFromCI }) {\n // eslint-disable-next-line prefer-const\n let { commit, committedAt, committerEmail, committerName } = await getCommit();\n let branch = await getBranch();\n const isTravisPrBuild = process.env.TRAVIS_EVENT_TYPE === 'pull_request';\n\n const {\n TRAVIS_EVENT_TYPE,\n TRAVIS_PULL_REQUEST_SLUG,\n TRAVIS_REPO_SLUG,\n TRAVIS_PULL_REQUEST_SHA,\n TRAVIS_PULL_REQUEST_BRANCH,\n } = process.env;\n if (TRAVIS_EVENT_TYPE === 'pull_request' && TRAVIS_PULL_REQUEST_SLUG === TRAVIS_REPO_SLUG) {\n log(\n `WARNING: Running Chromatic on a Travis PR build from an internal branch.\n\nIt is recommended to run Chromatic on the push builds from Travis where possible.\nWe advise turning on push builds and disabling Chromatic for internal PR builds.\nRead more: https://docs.chromaticqa.com/setup_ci#travis\n`,\n { noPrefix: true, level: 'warn' }\n );\n }\n\n // Travis PR builds are weird, we want to ensure we mark build against the commit that was\n // merged from, rather than the resulting \"psuedo\" merge commit that doesn't stick around in the\n // history of the project (so approvals will get lost). We also have to ensure we use the right branch.\n if (isTravisPrBuild) {\n commit = TRAVIS_PULL_REQUEST_SHA;\n branch = TRAVIS_PULL_REQUEST_BRANCH;\n\n if (!commit || !branch) {\n throw new Error(`\\`TRAVIS_EVENT_TYPE\\` environment variable set to 'pull_request', \nbut \\`TRAVIS_PULL_REQUEST_SHA\\` and \\`TRAVIS_PULL_REQUEST_BRANCH\\` are not both set.\n\nRead more here: https://docs.chromaticqa.com/setup_ci#travis`);\n }\n }\n\n // On certain CI systems, a branch is not checked out\n // (instead a detached head is used for the commit).\n if (branch === 'HEAD' || !branch) {\n ({ branch } = envCi());\n\n if (branch === 'HEAD' || !branch) {\n // $HEAD is for netlify: https://www.netlify.com/docs/continuous-deployment/\n // $GERRIT_BRANCH is for Gerrit/Jenkins: https://wiki.jenkins.io/display/JENKINS/Gerrit+Trigger\n // $CI_BRANCH is a general setting that lots of systems use\n branch =\n process.env.HEAD || process.env.GERRIT_BRANCH || process.env.CI_BRANCH || branch || 'HEAD';\n }\n }\n\n // REPOSITORY_URL is for netlify: https://www.netlify.com/docs/continuous-deployment/\n const fromCI = inputFromCI || !!process.env.CI || !!process.env.REPOSITORY_URL;\n\n debug(\n `git info: ${JSON.stringify({\n commit,\n committedAt,\n committerEmail,\n committerName,\n branch,\n isTravisPrBuild,\n fromCI,\n })}`\n );\n\n return { commit, committedAt, committerEmail, committerName, branch, isTravisPrBuild, fromCI };\n}\n\nasync function prepareAppOrBuild({\n client,\n dirname,\n noStart,\n buildScriptName,\n scriptName,\n commandName,\n https,\n url,\n createTunnel,\n tunnelUrl,\n storybookVersion,\n}) {\n if (dirname || buildScriptName) {\n let buildDirName = dirname;\n if (buildScriptName) {\n log(`Building your storybook`);\n ({ name: buildDirName } = dirSync({ unsafeCleanup: true, prefix: `${names.script}-` }));\n debug(`Building storybook to ${buildDirName}`);\n\n const child = await startApp({\n scriptName: buildScriptName,\n // Make storybook build as quiet as possible\n args: [\n '--',\n '-o',\n buildDirName,\n ...(storybookVersion &&\n gte(storybookVersion, STORYBOOK_CLI_FLAGS_BY_VERSION['--loglevel'])\n ? ['--loglevel', 'error']\n : []),\n ],\n inheritStdio: true,\n });\n\n // Wait for the process to exit\n await new Promise((res, rej) => {\n child.on('error', rej);\n child.on('close', code => {\n if (code > 0) {\n rej(new Error(`${buildScriptName} script exited with code ${code}`));\n }\n res();\n });\n });\n }\n\n log(`Uploading your built storybook...`);\n const isolatorUrl = await uploadToS3({ client, dirname: buildDirName });\n debug(`uploading to s3, got ${isolatorUrl}`);\n log(`Uploaded your build, verifying`);\n\n return { isolatorUrl };\n }\n\n let cleanup;\n if (!noStart) {\n log(`Starting storybook`);\n const child = await startApp({\n scriptName,\n commandName,\n url,\n args: scriptName &&\n storybookVersion &&\n gte(storybookVersion, STORYBOOK_CLI_FLAGS_BY_VERSION['--ci']) && ['--', '--ci'],\n });\n cleanup = child && (async () => denodeify(kill)(child.pid, 'SIGHUP'));\n log(`Started storybook at ${url}`);\n } else if (url) {\n if (!(await checkResponse(url))) {\n throw new Error(`No server responding at ${url} -- make sure you've started it.`);\n }\n log(`Detected storybook at ${url}`);\n }\n\n const { port, pathname, query, hash } = parse(url, true);\n if (!createTunnel) {\n return {\n cleanup,\n isolatorUrl: url,\n };\n }\n\n log(`Opening tunnel to Chromatic capture servers`);\n let tunnel;\n let cleanupTunnel;\n try {\n tunnel = await openTunnel({ tunnelUrl, port, https });\n cleanupTunnel = async () => {\n if (cleanup) {\n await cleanup();\n }\n await tunnel.close();\n };\n debug(`Opened tunnel to ${tunnel.url}`);\n } catch (err) {\n debug('Got error %O', err);\n if (cleanup) {\n cleanup();\n }\n throw err;\n }\n\n // ** Are we using a v1 or v2 tunnel? **\n // If the tunnel returns a cachedUrl, we are using a v2 tunnel and need to use\n // the slightly esoteric URL format for the isolatorUrl.\n // If not, they are the same:\n const cachedUrlObject = parse(tunnel.cachedUrl || tunnel.url);\n cachedUrlObject.pathname = pathname;\n cachedUrlObject.query = query;\n cachedUrlObject.hash = hash;\n const cachedUrl = cachedUrlObject.format();\n\n if (tunnel.cachedUrl) {\n const isolatorUrlObject = parse(tunnel.url, true);\n isolatorUrlObject.query = {\n ...isolatorUrlObject.query,\n // This will encode the pathname and query into a single query parameter\n path: format({ pathname, query }),\n };\n isolatorUrlObject.hash = hash;\n\n // For some reason we need to unset this to change the params\n isolatorUrlObject.search = null;\n\n return {\n cleanup: cleanupTunnel,\n isolatorUrl: isolatorUrlObject.format(),\n cachedUrl,\n };\n }\n\n // See comment about v1/v2 tunnel above\n return {\n cleanup: cleanupTunnel,\n isolatorUrl: cachedUrl,\n };\n}\n\nasync function getStories({ only, list, isolatorUrl, verbose }) {\n let predicate = () => true;\n if (only) {\n const match = only.match(/(.*):([^:]*)/);\n if (!match) {\n throw new Error(`--only argument must provided in the form \"componentName:storyName\"`);\n }\n log(`Running only story '${match[2]}' of component '${match[1]}'`);\n\n predicate = ({ name, component: { name: componentName } }) =>\n minimatch(name, match[2]) && minimatch(componentName, match[1]);\n }\n\n let listStory = story => story;\n if (list) {\n log('Listing available stories:');\n listStory = story => {\n const {\n name,\n component: { name: componentName },\n } = story;\n log(`${componentName}:${name}`);\n return story;\n };\n }\n const runtimeSpecs = (await getRuntimeSpecs(isolatorUrl, { verbose, names }))\n .map(listStory)\n .filter(predicate);\n\n if (runtimeSpecs.length === 0) {\n throw new Error('Cannot run a build with no stories. Please add some stories!');\n }\n\n log(`Found ${pluralize(runtimeSpecs.length, 'story')}`);\n\n return runtimeSpecs;\n}\n\nasync function getEnvironment() {\n const filteredEnvironment = {};\n Object.keys(process.env).forEach(key => {\n if (ENVIRONMENT_WHITELIST.find(regex => key.match(regex))) {\n filteredEnvironment[key] = process.env[key];\n }\n });\n const environment = JSON.stringify(filteredEnvironment);\n debug(`Got environment %s`, environment);\n return environment;\n}\n\nexport default async function runTest({\n appCode,\n buildScriptName,\n scriptName,\n exec: commandName,\n noStart = false,\n https,\n url,\n storybookBuildDir: dirname,\n only,\n skip,\n list,\n fromCI: inputFromCI = false,\n autoAcceptChanges = false,\n exitZeroOnChanges = false,\n ignoreLastBuildOnBranch = false,\n preserveMissingSpecs = false,\n verbose = false,\n interactive = true,\n indexUrl = CHROMATIC_INDEX_URL,\n tunnelUrl = CHROMATIC_TUNNEL_URL,\n createTunnel = true,\n originalArgv = false,\n sessionId = uuid(),\n}) {\n sendDebugToLoggly({ sessionId });\n\n debug(`Creating build with session id: ${sessionId}`);\n debug(\n `Connecting to index:${indexUrl} and ${\n createTunnel ? `using tunnel:${tunnelUrl}` : 'not creating a tunnel'\n }`\n );\n\n const client = new GraphQLClient({\n uri: `${indexUrl}/graphql`,\n headers: { 'x-chromatic-session-id': sessionId },\n retries: 3,\n });\n\n if (!appCode) {\n throw new Error(\n `You must provide an app code.\n\nIf you don't have a project yet login to ${names.url} and create a new project.\nOr find your code on the manage page of an existing project.\n\nPass your app code with the \\`${names.envVar}\\` environment variable or the \\`--app-code\\` flag.`\n );\n }\n\n try {\n const { createAppToken: jwtToken } = await client.runQuery(TesterCreateAppTokenMutation, {\n appCode,\n });\n client.headers = { ...client.headers, Authorization: `Bearer ${jwtToken}` };\n } catch (errors) {\n if (errors[0] && errors[0].message && errors[0].message.match('No app with code')) {\n throw new Error(`Incorrect app code '${appCode}'.\n \nIf you don't have a project yet login to ${names.url} and create a new project.\nOr find your code on the manage page of an existing project.`);\n }\n throw errors;\n }\n\n const {\n commit,\n committedAt,\n committerEmail,\n committerName,\n branch,\n isTravisPrBuild,\n fromCI,\n } = await getCommitAndBranch({ inputFromCI });\n\n if (skip) {\n if (await client.runQuery(TesterSkipBuildMutation, { commit })) {\n log(`Build skipped for commit ${commit}.`);\n return 0;\n }\n throw new Error('Failed to skip build.');\n }\n\n if (!(buildScriptName || scriptName || commandName || noStart)) {\n throw new Error('Either buildScriptName, scriptName, commandName or noStart is required');\n }\n\n // These three options can be branch specific\n const doAutoAcceptChanges =\n typeof autoAcceptChanges === 'string' ? autoAcceptChanges === branch : autoAcceptChanges;\n const doExitZeroOnChanges =\n typeof exitZeroOnChanges === 'string' ? exitZeroOnChanges === branch : exitZeroOnChanges;\n const doIgnoreLastBuildOnBranch =\n typeof ignoreLastBuildOnBranch === 'string'\n ? ignoreLastBuildOnBranch === branch\n : ignoreLastBuildOnBranch;\n\n const baselineCommits = await getBaselineCommits(client, {\n branch,\n ignoreLastBuildOnBranch: doIgnoreLastBuildOnBranch,\n });\n debug(`Found baselineCommits: ${baselineCommits}`);\n\n const { storybookVersion, viewLayer } = getStorybookInfo();\n debug(\n `Detected package version:${packageVersion}, storybook version:${storybookVersion}, view layer: ${viewLayer}`\n );\n\n let exitCode = 5;\n const { cleanup, isolatorUrl, cachedUrl } = await prepareAppOrBuild({\n storybookVersion,\n client,\n dirname,\n noStart,\n buildScriptName,\n scriptName,\n commandName,\n https,\n url,\n createTunnel,\n tunnelUrl,\n });\n debug(`Connecting to ${isolatorUrl} (cachedUrl ${cachedUrl})`);\n log(`Uploading and verifying build (this may take a few minutes depending on your connection)`);\n\n try {\n const runtimeSpecs = await getStories({\n only,\n list,\n isolatorUrl,\n verbose,\n });\n\n const environment = await getEnvironment();\n\n const {\n createBuild: {\n number,\n snapshotCount,\n specCount,\n componentCount,\n webUrl,\n app: {\n account: {\n features: { diffs },\n },\n },\n },\n } = await client.runQuery(TesterCreateBuildMutation, {\n input: {\n cachedUrl,\n autoAcceptChanges: doAutoAcceptChanges,\n preserveMissingSpecs,\n branch,\n commit,\n committedAt,\n baselineCommits,\n runtimeSpecs,\n fromCI,\n isTravisPrBuild,\n packageVersion,\n storybookVersion,\n viewLayer,\n committerEmail,\n committerName,\n environment,\n },\n isolatorUrl,\n });\n\n const onlineHint = `View it online at ${webUrl}`;\n log(\n `Started Build ${number} ` +\n `(${pluralize(componentCount, 'component')}, ${pluralize(specCount, 'story')}, ${pluralize(\n snapshotCount,\n 'snapshot'\n )}).\n\n${onlineHint}.`\n );\n\n const {\n status,\n autoAcceptChanges: buildAutoAcceptChanges, // if it is the first build, this may have been set\n changeCount,\n errorCount,\n } = await waitForBuild(client, { buildNumber: number }, { diffs });\n\n switch (status) {\n case 'BUILD_PASSED':\n log(\n diffs\n ? `Build ${number} passed! ${onlineHint}.`\n : `Build ${number} published! ${onlineHint}.`\n );\n exitCode = 0;\n break;\n // They may have sneakily looked at the build while we were waiting\n case 'BUILD_ACCEPTED':\n case 'BUILD_PENDING':\n case 'BUILD_DENIED':\n log(`Build ${number} has ${pluralize(changeCount, 'change')}. ${onlineHint}.`);\n exitCode = doExitZeroOnChanges || buildAutoAcceptChanges ? 0 : 1;\n if (exitCode !== 0) {\n log(`Pass --exit-zero-on-changes if you want this command to exit successfully in this case.\n Alternatively, pass --auto-accept-changes if you want changed builds to pass on this branch.\n Read more: https://docs.chromaticqa.com/test`);\n }\n break;\n case 'BUILD_FAILED':\n log(\n diffs\n ? `Build ${number} has ${pluralize(errorCount, 'error')}. ${onlineHint}.`\n : `Build ${number} was published but we found errors. ${onlineHint}.`\n );\n exitCode = 2;\n break;\n case 'BUILD_TIMED_OUT':\n case 'BUILD_ERROR':\n log(`Build ${number} has failed to run. Our apologies. Please try again.`);\n exitCode = 3;\n break;\n default:\n throw new Error(`Unexpected build status: ${status}`);\n }\n } catch (e) {\n if (\n e.length &&\n e[0] &&\n e[0].message &&\n e[0].message.match(/Cannot run a build with no specs./)\n ) {\n log(e[0].message);\n exitCode = 255;\n } else {\n debug('Got error %O', e);\n throw e;\n }\n } finally {\n if (cleanup) {\n await cleanup();\n }\n }\n\n if (!checkPackageJson({ command: names.command }) && originalArgv && !fromCI && interactive) {\n const scriptCommand = `${names.envVar}=${appCode} ${names.command} ${originalArgv\n .slice(2)\n .join(' ')}`\n .replace(/--app-code[= ]\\S+/, '')\n .trim();\n\n const confirmed = await confirm(\n `\\nYou have not added the \\`${names.script}\\` script to your \\`package.json\\`. Would you like me to do it for you?`\n );\n if (confirmed) {\n addScriptToPackageJson(names.script, scriptCommand);\n log(\n `\nAdded script \\`${names.script}\\`. You can now run it here or in CI with \\`npm run ${names.script}\\` (or \\`yarn ${names.script}\\`)\n\nNOTE: I wrote your app code to the \\`${names.envVar}\\` environment variable. The app code cannot be used to read story data, it can only be used to create new builds. If you would still prefer not to check it into source control, you can remove it from \\`package.json\\` and set it via an environment variable instead.`,\n { noPrefix: true }\n );\n } else {\n log(\n `\nNo problem. You can add it later with:\n{\n \"scripts\": {\n \"${names.script}\": \"${scriptCommand}\"\n }\n}`,\n { noPrefix: true }\n );\n }\n }\n\n return exitCode;\n}\n","export default prefix => (msg, { noPrefix = false, level = 'log' } = {}) => {\n if (process.env.DISABLE_LOGGING !== 'true') {\n if (noPrefix) {\n // eslint-disable-next-line no-console\n console[level](msg);\n } else {\n // eslint-disable-next-line no-console\n console[level](`${prefix}: ${msg}`);\n }\n }\n};\n"],"sourceRoot":""}
\No newline at end of file