happo 6.0.0-beta.2 → 6.0.0-beta.3

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.
Files changed (31) hide show
  1. package/dist/cli/{cancelJob-VEJGYUSM.js → cancelJob-URIFHFSY.js} +3 -3
  2. package/dist/cli/{chunk-JUNBOLIK.js → chunk-CJCPD3BP.js} +3 -3
  3. package/dist/cli/{chunk-JUNBOLIK.js.map → chunk-CJCPD3BP.js.map} +1 -1
  4. package/dist/cli/{chunk-IS4ZMP6S.js → chunk-JUHWFN2G.js} +2 -3
  5. package/dist/cli/{createAsyncComparison-2GKE5XXV.js → createAsyncComparison-L7GSHG7G.js} +3 -3
  6. package/dist/cli/{createAsyncReport-O32MDG4M.js → createAsyncReport-L5QAKXE7.js} +3 -3
  7. package/dist/cli/index.js +8 -8
  8. package/dist/cli/package-TEFLJOJ3.js +7 -0
  9. package/dist/cli/{prepareSnapRequests-WXQMSHSS.js → prepareSnapRequests-Z2OGZ3NF.js} +29 -69
  10. package/dist/cli/prepareSnapRequests-Z2OGZ3NF.js.map +7 -0
  11. package/dist/cli/{startJob-KCYLIUR3.js → startJob-TMQQTP56.js} +3 -3
  12. package/dist/cli/{wrapper-QX2FX5O4.js → wrapper-2EC762P2.js} +3 -3
  13. package/dist/config/index.d.ts +10 -5
  14. package/dist/config/index.d.ts.map +1 -1
  15. package/dist/config/index.js.map +2 -2
  16. package/dist/cypress/task.js +4 -66
  17. package/dist/cypress/task.js.map +2 -2
  18. package/dist/network/prepareSnapRequests.d.ts.map +1 -1
  19. package/dist/network/uploadAssets.d.ts.map +1 -1
  20. package/dist/playwright/index.js +4 -66
  21. package/dist/playwright/index.js.map +2 -2
  22. package/package.json +2 -2
  23. package/dist/cli/package-RYVZDHU4.js +0 -7
  24. package/dist/cli/prepareSnapRequests-WXQMSHSS.js.map +0 -7
  25. /package/dist/cli/{cancelJob-VEJGYUSM.js.map → cancelJob-URIFHFSY.js.map} +0 -0
  26. /package/dist/cli/{chunk-IS4ZMP6S.js.map → chunk-JUHWFN2G.js.map} +0 -0
  27. /package/dist/cli/{createAsyncComparison-2GKE5XXV.js.map → createAsyncComparison-L7GSHG7G.js.map} +0 -0
  28. /package/dist/cli/{createAsyncReport-O32MDG4M.js.map → createAsyncReport-L5QAKXE7.js.map} +0 -0
  29. /package/dist/cli/{package-RYVZDHU4.js.map → package-TEFLJOJ3.js.map} +0 -0
  30. /package/dist/cli/{startJob-KCYLIUR3.js.map → startJob-TMQQTP56.js.map} +0 -0
  31. /package/dist/cli/{wrapper-QX2FX5O4.js.map → wrapper-2EC762P2.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  makeHappoAPIRequest
3
- } from "./chunk-IS4ZMP6S.js";
4
- import "./chunk-JUNBOLIK.js";
3
+ } from "./chunk-JUHWFN2G.js";
4
+ import "./chunk-CJCPD3BP.js";
5
5
 
6
6
  // src/network/cancelJob.ts
7
7
  async function cancelJob(status, config, { beforeSha, afterSha, link, message }, logger) {
@@ -24,4 +24,4 @@ async function cancelJob(status, config, { beforeSha, afterSha, link, message },
24
24
  export {
25
25
  cancelJob as default
26
26
  };
27
- //# sourceMappingURL=cancelJob-VEJGYUSM.js.map
27
+ //# sourceMappingURL=cancelJob-URIFHFSY.js.map
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "happo",
4
- version: "6.0.0-beta.2",
4
+ version: "6.0.0-beta.3",
5
5
  description: "Visual regression testing and accessibility testing",
6
6
  license: "MIT",
7
7
  repository: {
@@ -62,7 +62,7 @@ var package_default = {
62
62
  build: "pnpm build:types && pnpm build:dist",
63
63
  "build:dist": "./scripts/build.ts",
64
64
  "build:types": "pnpm tsc --pretty",
65
- "build:static": "esbuild src/static/__happo__/index.ts --bundle --format=iife --global-name=happoStatic --outfile=tmp/happo-static/bundle.js --platform=browser --target=esnext && cp src/static/__happo__/iframe.html tmp/happo-static/",
65
+ "build:static": "esbuild src/static/__happo__/index.ts --bundle --format=iife --global-name=happoStatic --outfile=tmp/happo-static/bundle.js --platform=browser --target=esnext",
66
66
  "build:watch": "tsc --build --watch",
67
67
  clean: "rm -rf dist tmp/tsc tmp/happo-static",
68
68
  lint: "eslint .",
@@ -169,4 +169,4 @@ var package_default = {
169
169
  export {
170
170
  package_default
171
171
  };
172
- //# sourceMappingURL=chunk-JUNBOLIK.js.map
172
+ //# sourceMappingURL=chunk-CJCPD3BP.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../package.json"],
4
- "sourcesContent": ["{\n \"name\": \"happo\",\n \"version\": \"6.0.0-beta.2\",\n \"description\": \"Visual regression testing and accessibility testing\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/happo/happo.git\"\n },\n \"bugs\": \"https://github.com/happo/happo/issues\",\n \"homepage\": \"https://happo.io\",\n \"bin\": {\n \"happo\": \"dist/cli/index.js\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/config/index.js\",\n \"types\": \"./dist/config/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/config/index.d.ts\",\n \"default\": \"./dist/config/index.js\"\n },\n \"./cypress\": {\n \"types\": \"./dist/cypress/index.d.ts\",\n \"default\": \"./dist/cypress/index.js\"\n },\n \"./cypress/task\": {\n \"types\": \"./dist/cypress/task.d.ts\",\n \"default\": \"./dist/cypress/task.js\"\n },\n \"./playwright\": {\n \"types\": \"./dist/playwright/index.d.ts\",\n \"default\": \"./dist/playwright/index.js\"\n },\n \"./static\": {\n \"types\": \"./dist/static/index.d.ts\",\n \"default\": \"./dist/static/index.js\"\n },\n \"./storybook/addon\": {\n \"types\": \"./dist/storybook/browser/addon.d.ts\",\n \"default\": \"./dist/storybook/browser/addon.js\"\n },\n \"./storybook/decorator\": {\n \"types\": \"./dist/storybook/browser/decorator.d.ts\",\n \"default\": \"./dist/storybook/browser/decorator.js\"\n },\n \"./storybook/preset\": {\n \"types\": \"./dist/storybook/preset.d.ts\",\n \"default\": \"./dist/storybook/preset.js\"\n },\n \"./storybook/register\": {\n \"types\": \"./dist/storybook/browser/register.d.ts\",\n \"default\": \"./dist/storybook/browser/register.js\"\n }\n },\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"all\": \"node ./scripts/allchecks.ts\",\n \"build\": \"pnpm build:types && pnpm build:dist\",\n \"build:dist\": \"./scripts/build.ts\",\n \"build:types\": \"pnpm tsc --pretty\",\n \"build:static\": \"esbuild src/static/__happo__/index.ts --bundle --format=iife --global-name=happoStatic --outfile=tmp/happo-static/bundle.js --platform=browser --target=esnext && cp src/static/__happo__/iframe.html tmp/happo-static/\",\n \"build:watch\": \"tsc --build --watch\",\n \"clean\": \"rm -rf dist tmp/tsc tmp/happo-static\",\n \"lint\": \"eslint .\",\n \"prepublishOnly\": \"pnpm clean && pnpm build\",\n \"storybook:dev\": \"storybook dev --config-dir src/storybook/__tests__/storybook-app -p ${PORT:-6007}\",\n \"test\": \"node --env-file-if-exists=.env.local ./scripts/test.ts\",\n \"test:cypress\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/index.js -c ./happoconfigs/happo.cypress.config.ts e2e -- cypress run -C src/cypress/__cypress__/cypress.config.ts\",\n \"test:cypress:open\": \"cypress open -C src/cypress/__cypress__/cypress.config.ts\",\n \"test:playwright\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/index.js -c ./happoconfigs/happo.playwright.config.ts e2e -- playwright test\",\n \"test:static\": \"pnpm build:dist && pnpm build:static && node --env-file-if-exists=.env.local dist/cli/index.js -c ./happoconfigs/happo.static.config.ts\",\n \"test:storybook\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/index.js -c ./happoconfigs/happo.storybook.config.ts\",\n \"tsc\": \"tsc --build tsconfig.json\"\n },\n \"browserslist\": {\n \"node\": [\n \"node 22\"\n ],\n \"browser\": [\n \"last 2 Chrome major versions\",\n \"last 2 Firefox major versions\",\n \"last 2 Safari major versions\",\n \"last 2 Edge major versions\"\n ],\n \"isomorphic\": [\n \"node 22\",\n \"last 2 Chrome major versions\",\n \"last 2 Firefox major versions\",\n \"last 2 Safari major versions\",\n \"last 2 Edge major versions\"\n ]\n },\n \"prettier\": {\n \"printWidth\": 85,\n \"singleQuote\": true,\n \"trailingComma\": \"all\",\n \"arrowParens\": \"always\"\n },\n \"devDependencies\": {\n \"@eslint/js\": \"^9.36.0\",\n \"@playwright/test\": \"^1.55.1\",\n \"@reporters/github\": \"^1.11.0\",\n \"@storybook/builder-vite\": \"^10.0.1\",\n \"@storybook/react-vite\": \"^10.0.1\",\n \"@types/adm-zip\": \"^0.5.7\",\n \"@types/archiver\": \"^7.0.0\",\n \"@types/async-retry\": \"^1.4.9\",\n \"@types/base64-stream\": \"^1.0.5\",\n \"@types/jsdom\": \"^27.0.0\",\n \"@types/mime-types\": \"^3.0.1\",\n \"@types/multiparty\": \"^4.2.1\",\n \"@types/node\": \"^24.9.1\",\n \"@types/react\": \"^19.2.0\",\n \"@types/react-dom\": \"^19.2.0\",\n \"@types/serve-handler\": \"^6.1.4\",\n \"adm-zip\": \"^0.5.16\",\n \"cypress\": \"^15.5.0\",\n \"esbuild\": \"^0.25.10\",\n \"eslint\": \"^9.36.0\",\n \"eslint-config-prettier\": \"^10.1.8\",\n \"eslint-plugin-compat\": \"^6.0.2\",\n \"eslint-plugin-depend\": \"^1.3.1\",\n \"eslint-plugin-simple-import-sort\": \"^12.1.1\",\n \"eslint-plugin-unicorn\": \"^62.0.0\",\n \"jiti\": \"^2.6.0\",\n \"jsdom\": \"^27.0.0\",\n \"multiparty\": \"^4.2.3\",\n \"prettier\": \"^3.6.2\",\n \"react\": \"^19.2.0\",\n \"react-dom\": \"^19.2.0\",\n \"react-error-boundary\": \"^6.0.0\",\n \"serve-handler\": \"^6.1.6\",\n \"storybook\": \"^10.0.1\",\n \"typescript\": \"^5.9.2\",\n \"typescript-eslint\": \"^8.44.1\"\n },\n \"dependencies\": {\n \"archiver\": \"^7.0.1\",\n \"async-retry\": \"^1.3.3\",\n \"base64-stream\": \"^1.0.0\",\n \"empathic\": \"^2.0.0\",\n \"image-size\": \"^2.0.2\",\n \"jose\": \"^6.1.0\",\n \"mime-types\": \"^3.0.1\",\n \"p-all\": \"^5.0.1\",\n \"srcset\": \"^5.0.2\",\n \"supports-color\": \"^10.2.2\"\n },\n \"keywords\": [\n \"accessibility\",\n \"cypress\",\n \"playwright\",\n \"regression\",\n \"storybook\",\n \"testing\",\n \"ui\",\n \"visual regression\",\n \"visual\"\n ],\n \"engines\": {\n \"node\": \">=22\"\n }\n}\n"],
4
+ "sourcesContent": ["{\n \"name\": \"happo\",\n \"version\": \"6.0.0-beta.3\",\n \"description\": \"Visual regression testing and accessibility testing\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/happo/happo.git\"\n },\n \"bugs\": \"https://github.com/happo/happo/issues\",\n \"homepage\": \"https://happo.io\",\n \"bin\": {\n \"happo\": \"dist/cli/index.js\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/config/index.js\",\n \"types\": \"./dist/config/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/config/index.d.ts\",\n \"default\": \"./dist/config/index.js\"\n },\n \"./cypress\": {\n \"types\": \"./dist/cypress/index.d.ts\",\n \"default\": \"./dist/cypress/index.js\"\n },\n \"./cypress/task\": {\n \"types\": \"./dist/cypress/task.d.ts\",\n \"default\": \"./dist/cypress/task.js\"\n },\n \"./playwright\": {\n \"types\": \"./dist/playwright/index.d.ts\",\n \"default\": \"./dist/playwright/index.js\"\n },\n \"./static\": {\n \"types\": \"./dist/static/index.d.ts\",\n \"default\": \"./dist/static/index.js\"\n },\n \"./storybook/addon\": {\n \"types\": \"./dist/storybook/browser/addon.d.ts\",\n \"default\": \"./dist/storybook/browser/addon.js\"\n },\n \"./storybook/decorator\": {\n \"types\": \"./dist/storybook/browser/decorator.d.ts\",\n \"default\": \"./dist/storybook/browser/decorator.js\"\n },\n \"./storybook/preset\": {\n \"types\": \"./dist/storybook/preset.d.ts\",\n \"default\": \"./dist/storybook/preset.js\"\n },\n \"./storybook/register\": {\n \"types\": \"./dist/storybook/browser/register.d.ts\",\n \"default\": \"./dist/storybook/browser/register.js\"\n }\n },\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"all\": \"node ./scripts/allchecks.ts\",\n \"build\": \"pnpm build:types && pnpm build:dist\",\n \"build:dist\": \"./scripts/build.ts\",\n \"build:types\": \"pnpm tsc --pretty\",\n \"build:static\": \"esbuild src/static/__happo__/index.ts --bundle --format=iife --global-name=happoStatic --outfile=tmp/happo-static/bundle.js --platform=browser --target=esnext\",\n \"build:watch\": \"tsc --build --watch\",\n \"clean\": \"rm -rf dist tmp/tsc tmp/happo-static\",\n \"lint\": \"eslint .\",\n \"prepublishOnly\": \"pnpm clean && pnpm build\",\n \"storybook:dev\": \"storybook dev --config-dir src/storybook/__tests__/storybook-app -p ${PORT:-6007}\",\n \"test\": \"node --env-file-if-exists=.env.local ./scripts/test.ts\",\n \"test:cypress\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/index.js -c ./happoconfigs/happo.cypress.config.ts e2e -- cypress run -C src/cypress/__cypress__/cypress.config.ts\",\n \"test:cypress:open\": \"cypress open -C src/cypress/__cypress__/cypress.config.ts\",\n \"test:playwright\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/index.js -c ./happoconfigs/happo.playwright.config.ts e2e -- playwright test\",\n \"test:static\": \"pnpm build:dist && pnpm build:static && node --env-file-if-exists=.env.local dist/cli/index.js -c ./happoconfigs/happo.static.config.ts\",\n \"test:storybook\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/index.js -c ./happoconfigs/happo.storybook.config.ts\",\n \"tsc\": \"tsc --build tsconfig.json\"\n },\n \"browserslist\": {\n \"node\": [\n \"node 22\"\n ],\n \"browser\": [\n \"last 2 Chrome major versions\",\n \"last 2 Firefox major versions\",\n \"last 2 Safari major versions\",\n \"last 2 Edge major versions\"\n ],\n \"isomorphic\": [\n \"node 22\",\n \"last 2 Chrome major versions\",\n \"last 2 Firefox major versions\",\n \"last 2 Safari major versions\",\n \"last 2 Edge major versions\"\n ]\n },\n \"prettier\": {\n \"printWidth\": 85,\n \"singleQuote\": true,\n \"trailingComma\": \"all\",\n \"arrowParens\": \"always\"\n },\n \"devDependencies\": {\n \"@eslint/js\": \"^9.36.0\",\n \"@playwright/test\": \"^1.55.1\",\n \"@reporters/github\": \"^1.11.0\",\n \"@storybook/builder-vite\": \"^10.0.1\",\n \"@storybook/react-vite\": \"^10.0.1\",\n \"@types/adm-zip\": \"^0.5.7\",\n \"@types/archiver\": \"^7.0.0\",\n \"@types/async-retry\": \"^1.4.9\",\n \"@types/base64-stream\": \"^1.0.5\",\n \"@types/jsdom\": \"^27.0.0\",\n \"@types/mime-types\": \"^3.0.1\",\n \"@types/multiparty\": \"^4.2.1\",\n \"@types/node\": \"^24.9.1\",\n \"@types/react\": \"^19.2.0\",\n \"@types/react-dom\": \"^19.2.0\",\n \"@types/serve-handler\": \"^6.1.4\",\n \"adm-zip\": \"^0.5.16\",\n \"cypress\": \"^15.5.0\",\n \"esbuild\": \"^0.25.10\",\n \"eslint\": \"^9.36.0\",\n \"eslint-config-prettier\": \"^10.1.8\",\n \"eslint-plugin-compat\": \"^6.0.2\",\n \"eslint-plugin-depend\": \"^1.3.1\",\n \"eslint-plugin-simple-import-sort\": \"^12.1.1\",\n \"eslint-plugin-unicorn\": \"^62.0.0\",\n \"jiti\": \"^2.6.0\",\n \"jsdom\": \"^27.0.0\",\n \"multiparty\": \"^4.2.3\",\n \"prettier\": \"^3.6.2\",\n \"react\": \"^19.2.0\",\n \"react-dom\": \"^19.2.0\",\n \"react-error-boundary\": \"^6.0.0\",\n \"serve-handler\": \"^6.1.6\",\n \"storybook\": \"^10.0.1\",\n \"typescript\": \"^5.9.2\",\n \"typescript-eslint\": \"^8.44.1\"\n },\n \"dependencies\": {\n \"archiver\": \"^7.0.1\",\n \"async-retry\": \"^1.3.3\",\n \"base64-stream\": \"^1.0.0\",\n \"empathic\": \"^2.0.0\",\n \"image-size\": \"^2.0.2\",\n \"jose\": \"^6.1.0\",\n \"mime-types\": \"^3.0.1\",\n \"p-all\": \"^5.0.1\",\n \"srcset\": \"^5.0.2\",\n \"supports-color\": \"^10.2.2\"\n },\n \"keywords\": [\n \"accessibility\",\n \"cypress\",\n \"playwright\",\n \"regression\",\n \"storybook\",\n \"testing\",\n \"ui\",\n \"visual regression\",\n \"visual\"\n ],\n \"engines\": {\n \"node\": \">=22\"\n }\n}\n"],
5
5
  "mappings": ";AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,SAAW;AAAA,EACX,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,MAAQ;AAAA,EACR,UAAY;AAAA,EACZ,KAAO;AAAA,IACL,OAAS;AAAA,EACX;AAAA,EACA,MAAQ;AAAA,EACR,MAAQ;AAAA,EACR,OAAS;AAAA,EACT,SAAW;AAAA,IACT,KAAK;AAAA,MACH,OAAS;AAAA,MACT,SAAW;AAAA,IACb;AAAA,IACA,aAAa;AAAA,MACX,OAAS;AAAA,MACT,SAAW;AAAA,IACb;AAAA,IACA,kBAAkB;AAAA,MAChB,OAAS;AAAA,MACT,SAAW;AAAA,IACb;AAAA,IACA,gBAAgB;AAAA,MACd,OAAS;AAAA,MACT,SAAW;AAAA,IACb;AAAA,IACA,YAAY;AAAA,MACV,OAAS;AAAA,MACT,SAAW;AAAA,IACb;AAAA,IACA,qBAAqB;AAAA,MACnB,OAAS;AAAA,MACT,SAAW;AAAA,IACb;AAAA,IACA,yBAAyB;AAAA,MACvB,OAAS;AAAA,MACT,SAAW;AAAA,IACb;AAAA,IACA,sBAAsB;AAAA,MACpB,OAAS;AAAA,MACT,SAAW;AAAA,IACb;AAAA,IACA,wBAAwB;AAA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ACxB,oCAAoC;AAAA,IACpC,yBAAyB;AAAA,IACzB,MAAQ;AAAA,IACR,OAAS;AAAA,IACT,YAAc;AAAA,IACd,UAAY;AAAA,IACZ,OAAS;AAAA,IACT,aAAa;AAAA,IACb,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,IACjB,WAAa;AAAA,IACb,YAAc;AAAA,IACd,qBAAqB;AAAA,EACvB;AAAA,EACA,cAAgB;AAAA,IACd,UAAY;AAAA,IACZ,eAAe;AAAA,IACf,iBAAiB;AAAA,IACjB,UAAY;AAAA,IACZ,cAAc;AAAA,IACd,MAAQ;AAAA,IACR,cAAc;AAAA,IACd,SAAS;AAAA,IACT,QAAU;AAAA,IACV,kBAAkB;AAAA,EACpB;AAAA,EACA,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./chunk-JUNBOLIK.js";
3
+ } from "./chunk-CJCPD3BP.js";
4
4
 
5
5
  // src/network/makeHappoAPIRequest.ts
6
6
  import { SignJWT } from "jose";
@@ -136,7 +136,6 @@ async function makeHappoAPIRequest({ url, path, method = "GET", formData, body }
136
136
  }
137
137
 
138
138
  export {
139
- ErrorWithStatusCode,
140
139
  makeHappoAPIRequest
141
140
  };
142
- //# sourceMappingURL=chunk-IS4ZMP6S.js.map
141
+ //# sourceMappingURL=chunk-JUHWFN2G.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  makeHappoAPIRequest
3
- } from "./chunk-IS4ZMP6S.js";
4
- import "./chunk-JUNBOLIK.js";
3
+ } from "./chunk-JUHWFN2G.js";
4
+ import "./chunk-CJCPD3BP.js";
5
5
 
6
6
  // src/network/createAsyncComparison.ts
7
7
  function assertResultIsCreateAsyncComparisonResult(result) {
@@ -51,4 +51,4 @@ async function createAsyncComparison(config, {
51
51
  export {
52
52
  createAsyncComparison as default
53
53
  };
54
- //# sourceMappingURL=createAsyncComparison-2GKE5XXV.js.map
54
+ //# sourceMappingURL=createAsyncComparison-L7GSHG7G.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  makeHappoAPIRequest
3
- } from "./chunk-IS4ZMP6S.js";
4
- import "./chunk-JUNBOLIK.js";
3
+ } from "./chunk-JUHWFN2G.js";
4
+ import "./chunk-CJCPD3BP.js";
5
5
 
6
6
  // src/network/createAsyncReport.ts
7
7
  function assertResultIsCreateAsyncReportResult(result) {
@@ -37,4 +37,4 @@ async function createAsyncReport(snapRequestIds, config, { afterSha, link, messa
37
37
  export {
38
38
  createAsyncReport as default
39
39
  };
40
- //# sourceMappingURL=createAsyncReport-O32MDG4M.js.map
40
+ //# sourceMappingURL=createAsyncReport-L5QAKXE7.js.map
package/dist/cli/index.js CHANGED
@@ -431,7 +431,7 @@ async function resolveEnvironment(env = process.env) {
431
431
 
432
432
  // src/cli/index.ts
433
433
  async function getVersion() {
434
- const packageJson = await import("./package-RYVZDHU4.js");
434
+ const packageJson = await import("./package-TEFLJOJ3.js");
435
435
  return packageJson.default.version;
436
436
  }
437
437
  function parseDashdashCommandParts(rawArgs) {
@@ -531,10 +531,10 @@ async function main(rawArgs = process.argv, logger = console) {
531
531
  async function handleDefaultCommand(config, environment, logger) {
532
532
  logger.log("Running happo tests...");
533
533
  const [startJob, createAsyncComparison, createAsyncReport, prepareSnapRequests] = await Promise.all([
534
- (await import("./startJob-KCYLIUR3.js")).default,
535
- (await import("./createAsyncComparison-2GKE5XXV.js")).default,
536
- (await import("./createAsyncReport-O32MDG4M.js")).default,
537
- (await import("./prepareSnapRequests-WXQMSHSS.js")).default
534
+ (await import("./startJob-TMQQTP56.js")).default,
535
+ (await import("./createAsyncComparison-L7GSHG7G.js")).default,
536
+ (await import("./createAsyncReport-L5QAKXE7.js")).default,
537
+ (await import("./prepareSnapRequests-Z2OGZ3NF.js")).default
538
538
  ]);
539
539
  await startJob(config, environment, logger);
540
540
  try {
@@ -550,7 +550,7 @@ async function handleDefaultCommand(config, environment, logger) {
550
550
  logger.log(`[HAPPO] Async comparison URL: ${asyncComparison.compareUrl}`);
551
551
  } catch (e) {
552
552
  logger.error(e instanceof Error ? e.message : String(e), e);
553
- const cancelJob = (await import("./cancelJob-VEJGYUSM.js")).default;
553
+ const cancelJob = (await import("./cancelJob-URIFHFSY.js")).default;
554
554
  await cancelJob("failure", config, environment, logger);
555
555
  process.exitCode = 1;
556
556
  return;
@@ -561,7 +561,7 @@ async function handleFinalizeCommand(config, environment, logger) {
561
561
  logger.log("Config:", config);
562
562
  logger.log("Environment:", environment);
563
563
  try {
564
- const finalizeAll = (await import("./wrapper-QX2FX5O4.js")).finalizeAll;
564
+ const finalizeAll = (await import("./wrapper-2EC762P2.js")).finalizeAll;
565
565
  await finalizeAll({ happoConfig: config, environment, logger });
566
566
  } catch (e) {
567
567
  logger.error(e instanceof Error ? e.message : String(e), e);
@@ -590,7 +590,7 @@ async function handleE2ECommand(config, environment, dashdashCommandParts, confi
590
590
  logger.log("Config:", config);
591
591
  logger.log("Environment:", environment);
592
592
  logger.log("Dashdash command parts:", dashdashCommandParts);
593
- const runWithWrapper = (await import("./wrapper-QX2FX5O4.js")).default;
593
+ const runWithWrapper = (await import("./wrapper-2EC762P2.js")).default;
594
594
  const exitCode = await runWithWrapper(
595
595
  dashdashCommandParts,
596
596
  config,
@@ -0,0 +1,7 @@
1
+ import {
2
+ package_default
3
+ } from "./chunk-CJCPD3BP.js";
4
+ export {
5
+ package_default as default
6
+ };
7
+ //# sourceMappingURL=package-TEFLJOJ3.js.map
@@ -3,10 +3,13 @@ import {
3
3
  logTag
4
4
  } from "./chunk-GG2PHBJN.js";
5
5
  import {
6
- ErrorWithStatusCode,
7
6
  makeHappoAPIRequest
8
- } from "./chunk-IS4ZMP6S.js";
9
- import "./chunk-JUNBOLIK.js";
7
+ } from "./chunk-JUHWFN2G.js";
8
+ import "./chunk-CJCPD3BP.js";
9
+
10
+ // src/network/prepareSnapRequests.ts
11
+ import fs5 from "node:fs";
12
+ import path5 from "node:path";
10
13
 
11
14
  // src/utils/createHash.ts
12
15
  import crypto from "node:crypto";
@@ -461,65 +464,9 @@ async function deterministicArchive(dirsAndFiles, contentToArchive = []) {
461
464
 
462
465
  // src/network/uploadAssets.ts
463
466
  import retry from "async-retry";
464
- async function uploadAssetsThroughHappo(buffer, { hash, logger }, config) {
465
- const { project } = config;
466
- try {
467
- const assetsDataRes = await makeHappoAPIRequest(
468
- {
469
- path: `/api/snap-requests/assets-data/${hash}`,
470
- method: "GET",
471
- json: true
472
- },
473
- config,
474
- { retryCount: 2 }
475
- );
476
- if (!assetsDataRes) {
477
- throw new Error("Failed to get assets data");
478
- }
479
- if (!("path" in assetsDataRes)) {
480
- throw new Error("Asset data response is missing path");
481
- }
482
- if (!("uploadedAt" in assetsDataRes)) {
483
- throw new Error("Asset data response is missing uploadedAt");
484
- }
485
- const { path: uploadedPath, uploadedAt } = assetsDataRes;
486
- logger.info(
487
- `${logTag(project)}Reusing existing assets at ${uploadedPath} (previously uploaded on ${uploadedAt})`
488
- );
489
- return typeof uploadedPath === "string" ? uploadedPath : String(uploadedPath);
490
- } catch (error) {
491
- const err = error instanceof Error ? error : new Error(String(error));
492
- if (err instanceof ErrorWithStatusCode && err.statusCode !== 404) {
493
- logger.warn(
494
- `${logTag(
495
- project
496
- )}Assuming assets don't exist since we got error response: ${err.statusCode} - ${err.message} - ${err.stack}`
497
- );
498
- }
499
- }
500
- const assetsRes = await makeHappoAPIRequest(
501
- {
502
- path: `/api/snap-requests/assets/${hash}`,
503
- method: "POST",
504
- json: true,
505
- formData: {
506
- payload: new File([buffer], "payload.zip", { type: "application/zip" })
507
- }
508
- },
509
- config,
510
- { retryCount: 2 }
511
- );
512
- if (!assetsRes) {
513
- throw new Error("Failed to get assets data");
514
- }
515
- if (!("path" in assetsRes)) {
516
- throw new Error("Asset data response is missing path");
517
- }
518
- const { path: assetsPath } = assetsRes;
519
- return typeof assetsPath === "string" ? assetsPath : String(assetsPath);
520
- }
521
- async function uploadAssetsWithSignedUrl(buffer, { hash, logger }, config) {
467
+ async function uploadAssets(buffer, options, config) {
522
468
  const { project } = config;
469
+ const { hash, logger } = options;
523
470
  const signedUrlRes = await makeHappoAPIRequest(
524
471
  {
525
472
  path: `/api/snap-requests/assets/${hash}/signed-url`,
@@ -591,19 +538,32 @@ async function uploadAssetsWithSignedUrl(buffer, { hash, logger }, config) {
591
538
  const { path: finalizedPath } = finalizeRes;
592
539
  return typeof finalizedPath === "string" ? finalizedPath : String(finalizedPath);
593
540
  }
594
- async function uploadAssets(buffer, options, config) {
595
- if (process.env.HAPPO_SIGNED_URL) {
596
- return uploadAssetsWithSignedUrl(buffer, options, config);
597
- }
598
- return uploadAssetsThroughHappo(buffer, options, config);
599
- }
600
541
 
601
542
  // src/network/prepareSnapRequests.ts
543
+ async function createIframeHtml(rootDir, entryPoint) {
544
+ const iframePath = path5.join(rootDir, "iframe.html");
545
+ if (fs5.existsSync(iframePath)) {
546
+ return;
547
+ }
548
+ const iframeContent = `<!DOCTYPE html>
549
+ <html lang="en">
550
+ <head>
551
+ <title>Happo</title>
552
+ <meta name="viewport" content="width=device-width, initial-scale=1">
553
+ </head>
554
+ <body>
555
+ <script src="${entryPoint}"></script>
556
+ </body>
557
+ </html>`;
558
+ fs5.writeFileSync(iframePath, iframeContent);
559
+ }
602
560
  async function generateStaticPackage({
603
561
  integration
604
562
  }) {
605
563
  if (integration.type === "static") {
606
- return await integration.generateStaticPackage();
564
+ const { rootDir, entryPoint } = await integration.generateStaticPackage();
565
+ await createIframeHtml(rootDir, entryPoint);
566
+ return rootDir;
607
567
  }
608
568
  if (integration.type === "storybook") {
609
569
  return await generateStorybookStaticPackage(integration);
@@ -658,4 +618,4 @@ async function prepareSnapRequests(config) {
658
618
  export {
659
619
  prepareSnapRequests as default
660
620
  };
661
- //# sourceMappingURL=prepareSnapRequests-WXQMSHSS.js.map
621
+ //# sourceMappingURL=prepareSnapRequests-Z2OGZ3NF.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/network/prepareSnapRequests.ts", "../../src/utils/createHash.ts", "../../src/config/RemoteBrowserTarget.ts", "../../src/storybook/index.ts", "../../src/storybook/getStorybookBuildCommandParts.ts", "../../src/storybook/getStorybookVersionFromPackageJson.ts", "../../src/utils/deterministicArchive.ts", "../../src/utils/validateArchive.ts", "../../src/network/uploadAssets.ts"],
4
+ "sourcesContent": ["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { ConfigWithDefaults } from '../config/index.ts';\nimport RemoteBrowserTarget from '../config/RemoteBrowserTarget.ts';\nimport generateStorybookStaticPackage from '../storybook/index.ts';\nimport deterministicArchive from '../utils/deterministicArchive.ts';\nimport Logger, { logTag } from '../utils/Logger.ts';\nimport uploadAssets from './uploadAssets.ts';\n\nasync function createIframeHtml(rootDir: string, entryPoint: string): Promise<void> {\n const iframePath = path.join(rootDir, 'iframe.html');\n if (fs.existsSync(iframePath)) {\n return;\n }\n const iframeContent = `<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <title>Happo</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n </head>\n <body>\n <script src=\"${entryPoint}\"></script>\n </body>\n</html>`;\n fs.writeFileSync(iframePath, iframeContent);\n}\n\nasync function generateStaticPackage({\n integration,\n}: ConfigWithDefaults): Promise<string> {\n if (integration.type === 'static') {\n const { rootDir, entryPoint } = await integration.generateStaticPackage();\n await createIframeHtml(rootDir, entryPoint);\n return rootDir;\n }\n\n if (integration.type === 'storybook') {\n return await generateStorybookStaticPackage(integration);\n }\n\n throw new Error(`Unsupported integration type: ${integration.type}`);\n}\n\nexport default async function prepareSnapRequests(\n config: ConfigWithDefaults,\n): Promise<Array<number>> {\n const logger = new Logger();\n const staticPackageDir = await generateStaticPackage(config);\n\n const { buffer, hash } = await deterministicArchive([staticPackageDir]);\n const staticPackagePath = await uploadAssets(\n buffer,\n {\n hash,\n logger,\n },\n config,\n );\n const targetNames = Object.keys(config.targets);\n const tl = targetNames.length;\n logger.info(\n `${logTag(config.project)}Generating screenshots in ${tl} target${\n tl > 1 ? 's' : ''\n }...`,\n );\n const outerStartTime = Date.now();\n const results: Array<number> = [];\n await Promise.all(\n targetNames.map(async (name) => {\n const startTime = Date.now();\n if (!config.targets[name]) {\n throw new Error(`Target ${name} not found in config`);\n }\n const target = new RemoteBrowserTarget(\n config.targets[name].browserType,\n config.targets[name],\n );\n const snapRequestIds = await target.execute(\n {\n targetName: name,\n staticPackage: staticPackagePath,\n },\n config,\n );\n logger.start(` - ${logTag(config.project)}${name}`, { startTime });\n logger.success();\n results.push(...snapRequestIds);\n }),\n );\n logger.start(undefined, { startTime: outerStartTime });\n logger.success();\n return results;\n}\n", "import crypto from 'node:crypto';\n\n/**\n * Creates an MD5 hash of the input data\n * @param data - The data to hash (string, Buffer, or TypedArray)\n * @returns The MD5 hash as a hexadecimal string\n */\nexport default function createHash(\n data: string | Buffer | NodeJS.TypedArray,\n): string {\n return crypto.createHash('md5').update(data).digest('hex');\n}\n", "import makeHappoAPIRequest from '../network/makeHappoAPIRequest.ts';\nimport createHash from '../utils/createHash.ts';\nimport type { ConfigWithDefaults, TargetWithDefaults } from './index.ts';\n\nconst VIEWPORT_PATTERN = /^([0-9]+)x([0-9]+)$/;\n\ninterface Page {\n url: string;\n title: string;\n extends?: string;\n [key: string]: unknown;\n}\n\n/**\n * PageSlice is an array of pages with the extra extendsSha property.\n */\ninterface PageSlice extends Array<Page> {\n extendsSha?: string;\n}\n\ninterface Chunk {\n index: number;\n total: number;\n}\n\ninterface BoundMakeRequestParams {\n slice?: Array<unknown> | undefined;\n chunk?: Chunk | undefined;\n pageSlice?: PageSlice | undefined;\n}\n\nexport interface CSSBlock {\n id: string;\n conditional: boolean;\n css: string;\n}\n\ninterface ExecuteParams {\n globalCSS?: string | Array<CSSBlock>;\n assetsPackage?: unknown;\n staticPackage?: unknown;\n snapPayloads?: Array<unknown>;\n pages?: Array<Page>;\n targetName?: string;\n}\n\nfunction getPageSlices(pages: Array<Page>, chunks: number): Array<PageSlice> {\n const extendsPages: Record<string, PageSlice> = {};\n const rawPages: Array<Page> = [];\n\n for (const page of pages) {\n if (page.extends) {\n extendsPages[page.extends] = extendsPages[page.extends] ?? [];\n extendsPages[page.extends]!.push(page);\n } else {\n rawPages.push(page);\n }\n }\n\n const result: Array<PageSlice> = [];\n\n // First, split the raw pages into chunks\n const pagesPerChunk = Math.ceil(rawPages.length / chunks);\n for (let i = 0; i < chunks; i += 1) {\n const pageSlice = rawPages.slice(\n i * pagesPerChunk,\n i * pagesPerChunk + pagesPerChunk,\n );\n\n if (pageSlice.length > 0) {\n result.push(pageSlice);\n }\n }\n\n // Then, add the extends pages to the result\n for (const [sha, pageSlice] of Object.entries(extendsPages)) {\n pageSlice.extendsSha = sha;\n result.push(pageSlice);\n }\n\n return result;\n}\n\nexport default class RemoteBrowserTarget {\n public readonly chunks: number;\n public readonly browserName: string;\n public readonly viewport: string;\n public readonly maxHeight: number | undefined;\n public readonly otherOptions: Record<string, unknown>;\n\n constructor(\n browserName: string,\n {\n viewport = '1024x768',\n chunks = 1,\n maxHeight,\n ...otherOptions\n }: TargetWithDefaults,\n ) {\n const viewportMatch = viewport.match(VIEWPORT_PATTERN);\n if (!viewportMatch) {\n throw new Error(\n `Invalid viewport \"${viewport}\". Here's an example of a valid one: \"1024x768\".`,\n );\n }\n\n this.chunks = chunks;\n this.browserName = browserName;\n this.viewport = viewport;\n this.maxHeight = maxHeight ?? undefined;\n this.otherOptions = otherOptions;\n }\n\n async execute(\n {\n globalCSS,\n assetsPackage,\n staticPackage,\n snapPayloads,\n pages,\n targetName,\n }: ExecuteParams,\n config: ConfigWithDefaults,\n ): Promise<Array<number>> {\n const boundMakeRequest = async ({\n slice,\n chunk,\n pageSlice,\n }: BoundMakeRequestParams): Promise<number> => {\n const payloadString = JSON.stringify({\n viewport: this.viewport,\n maxHeight: this.maxHeight,\n ...this.otherOptions,\n globalCSS,\n snapPayloads: slice,\n chunk,\n staticPackage,\n assetsPackage,\n pages: pageSlice,\n extendsSha: pageSlice ? pageSlice.extendsSha : undefined,\n });\n\n const payloadHash = createHash(\n payloadString + (pageSlice ? Math.random() : ''),\n );\n\n const formData: Record<string, string | File | undefined> = {\n type:\n pageSlice && pageSlice.extendsSha\n ? 'extends-report'\n : `browser-${this.browserName}`,\n targetName,\n payloadHash,\n payload: new File([payloadString], 'payload.json', {\n type: 'application/json',\n }),\n };\n\n if (pageSlice && pageSlice.extendsSha) {\n formData.extendsSha = pageSlice.extendsSha;\n }\n\n const requestResult = await makeHappoAPIRequest(\n {\n path: `/api/snap-requests?payloadHash=${payloadHash}`,\n method: 'POST',\n json: true,\n formData,\n },\n config,\n { retryCount: 5 },\n );\n\n if (!requestResult) {\n throw new Error('No requestResult');\n }\n\n if (!('requestId' in requestResult)) {\n throw new Error('No requestId in requestResult');\n }\n\n if (typeof requestResult.requestId !== 'number') {\n throw new TypeError('requestId is not a number');\n }\n\n return requestResult.requestId;\n };\n\n const requestIds: Array<number> = [];\n\n if (staticPackage) {\n for (let i = 0; i < this.chunks; i += 1) {\n // We `await` here inside the loop to avoid POSTing all payloads to the\n // server at the same time (thus reducing load a little).\n const requestId = await boundMakeRequest({\n chunk: { index: i, total: this.chunks },\n });\n requestIds.push(requestId);\n }\n } else if (pages) {\n for (const pageSlice of getPageSlices(pages, this.chunks)) {\n // We `await` here inside the loop to avoid POSTing all payloads to the\n // server at the same time (thus reducing load a little).\n const requestId = await boundMakeRequest({\n pageSlice,\n });\n requestIds.push(requestId);\n }\n } else {\n const snapsPerChunk = Math.ceil((snapPayloads?.length ?? 0) / this.chunks);\n for (let i = 0; i < this.chunks; i += 1) {\n const slice = snapPayloads?.slice(\n i * snapsPerChunk,\n i * snapsPerChunk + snapsPerChunk,\n );\n\n // We `await` here inside the loop to avoid POSTing all payloads to the\n // server at the same time (thus reducing load a little).\n const requestId = await boundMakeRequest({\n slice,\n });\n requestIds.push(requestId);\n }\n }\n\n return requestIds;\n }\n}\n", "import { spawn } from 'node:child_process';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { StorybookIntegration } from '../config/index.ts';\nimport getStorybookBuildCommandParts from './getStorybookBuildCommandParts.ts';\nimport getStorybookVersionFromPackageJson from './getStorybookVersionFromPackageJson.ts';\nimport type { SkipItems } from './isomorphic/types.ts';\n\nconst { HAPPO_DEBUG, HAPPO_STORYBOOK_BUILD_COMMAND } = process.env;\n\nfunction assertSkippedIsSkipItems(skipped: unknown): asserts skipped is SkipItems {\n if (!Array.isArray(skipped)) {\n throw new TypeError(`The \\`skip\\` option didn't provide an array`);\n }\n\n if (skipped.some((item) => !item.component || !item.variant)) {\n throw new Error(\n `Each item provided by the \\`skip\\` option needs a \\`component\\` and a \\`variant\\` property`,\n );\n }\n}\n\nfunction resolveBuildCommandParts() {\n if (HAPPO_STORYBOOK_BUILD_COMMAND) {\n return HAPPO_STORYBOOK_BUILD_COMMAND.split(' ');\n }\n\n const version = getStorybookVersionFromPackageJson();\n\n if (version < 9) {\n throw new Error(\n `Storybook v${version} is not supported. Please update storybook to v9 or later.`,\n );\n }\n\n return getStorybookBuildCommandParts();\n}\n\nfunction buildStorybook({\n configDir,\n staticDir,\n outputDir,\n}: {\n configDir: string;\n staticDir?: string | undefined;\n outputDir: string;\n}): Promise<void> {\n return new Promise((resolve, reject) => {\n fs.rmSync(outputDir, { recursive: true, force: true });\n\n const buildCommandParts = resolveBuildCommandParts();\n\n if (!buildCommandParts[0]) {\n throw new Error('Failed to resolve build command parts');\n }\n\n const params = [\n ...buildCommandParts,\n '--output-dir',\n outputDir,\n '--config-dir',\n configDir,\n ];\n\n if (staticDir) {\n params.push('--static-dir', staticDir);\n }\n\n let binary = fs.existsSync('yarn.lock') ? 'yarn' : 'npx';\n\n if (buildCommandParts[0].includes('node_modules')) {\n binary = buildCommandParts[0];\n params.shift(); // remove binary from params\n }\n\n if (HAPPO_DEBUG) {\n console.log(`[happo] Using build command \\`${binary} ${params.join(' ')}\\``);\n }\n\n const spawned = spawn(binary, params, {\n stdio: 'inherit',\n shell: process.platform == 'win32',\n });\n\n spawned.on('exit', (code) => {\n if (code === 0) {\n try {\n fs.unlinkSync(path.join(outputDir, 'project.json'));\n } catch (error) {\n console.warn(\n `Ignoring error when attempting to remove project.json: ${error}`,\n );\n }\n resolve();\n } else {\n reject(new Error('Failed to build static storybook package'));\n }\n });\n });\n}\n\nexport default async function generateStorybookStaticPackage({\n configDir = '.storybook',\n staticDir,\n outputDir = '.out',\n usePrebuiltPackage = false,\n skip,\n}: Omit<StorybookIntegration, 'type'>): Promise<string> {\n if (!usePrebuiltPackage) {\n await buildStorybook({ configDir, staticDir, outputDir });\n }\n\n const iframePath = path.join(outputDir, 'iframe.html');\n if (!fs.existsSync(iframePath)) {\n throw new Error(\n 'Failed to build static storybook package (missing iframe.html)',\n );\n }\n\n try {\n const skipped =\n typeof skip === 'function' ? await skip() : Array.isArray(skip) ? skip : [];\n\n assertSkippedIsSkipItems(skipped);\n\n const iframeContent = fs.readFileSync(iframePath, 'utf8');\n\n fs.writeFileSync(\n iframePath,\n iframeContent.replace(\n '<head>',\n `<head>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <script type=\"text/javascript\">window.__IS_HAPPO_RUN = true;</script>\n <script type=\"text/javascript\">window.happoSkipped = ${JSON.stringify(\n skipped,\n )};</script>\n `,\n ),\n );\n\n // Tell happo where the files are located.\n return outputDir;\n } catch (e) {\n console.error(e);\n throw e;\n }\n}\n", "import fs from 'node:fs';\nimport path from 'node:path';\n\nconst { HAPPO_DEBUG } = process.env;\n\nexport default function getStorybookBuildCommandParts(\n packageJsonPath: string = path.join(process.cwd(), 'package.json'),\n): [string, string] {\n try {\n const data = fs.readFileSync(packageJsonPath, 'utf8');\n const packageJson = JSON.parse(data);\n\n if (packageJson.scripts.storybook) {\n if (HAPPO_DEBUG) {\n console.log(\n '[happo] Found `storybook` script in package.json. Will attempt to use binary found at `node_modules/.bin/storybook` instead',\n );\n }\n\n const pathToStorybookCommand = path.join(\n process.cwd(),\n 'node_modules',\n '.bin',\n 'storybook',\n );\n\n if (fs.existsSync(pathToStorybookCommand)) {\n return [pathToStorybookCommand, 'build'];\n }\n }\n } catch (e) {\n if (HAPPO_DEBUG) {\n console.log(\n '[happo] Caught error when resolving Storybook build command parts. Will use default.',\n e,\n );\n }\n }\n\n return ['storybook', 'build'];\n}\n", "import fs from 'node:fs';\nimport path from 'node:path';\n\nexport default function getStorybookVersionFromPackageJson(\n packageJsonPath: string = path.join(process.cwd(), 'package.json'),\n): number {\n const data = fs.readFileSync(packageJsonPath, 'utf8');\n const packageJson = JSON.parse(data);\n\n const combinedDependencies = {\n ...packageJson.dependencies,\n ...packageJson.devDependencies,\n };\n\n const storybookPackage = [\n 'storybook',\n '@storybook/react',\n '@storybook/angular',\n '@storybook/vue',\n ].find((pkg) => combinedDependencies[pkg]);\n\n if (storybookPackage) {\n const storybookVersion = combinedDependencies[storybookPackage];\n const majorVersion = Number.parseInt(storybookVersion.match(/\\d+/)[0], 10);\n return majorVersion;\n } else {\n throw new Error('Storybook is not listed as a dependency in package.json');\n }\n}\n", "import fs from 'node:fs';\nimport path from 'node:path';\nimport { Readable, Writable } from 'node:stream';\n\nimport type { EntryData } from 'archiver';\nimport archiver from 'archiver';\n\nimport createHash from './createHash.ts';\nimport validateArchive from './validateArchive.ts';\n\n// We're setting the creation date to the same for all files so that the zip\n// packages created for the same content ends up having the same fingerprint.\nconst FILE_CREATION_DATE = new Date('Fri Feb 08 2019 13:31:55 GMT+0100 (CET)');\n\n// Type definitions\ninterface FileEntry {\n name: string;\n stream: fs.ReadStream;\n}\n\nexport interface ArchiveContentEntry {\n name: string;\n content: string | Buffer | fs.ReadStream | Readable;\n}\n\ninterface ArchiveResult {\n buffer: Buffer<ArrayBuffer>;\n hash: string;\n}\n\n/**\n * Resolves all files in a directory and all of its subdirectories\n *\n * @param dirOrFile - The directory or file path to resolve\n * @returns Promise resolving to an array of file entries\n */\nasync function resolveFilesRecursiveForDir(\n dirOrFile: string,\n): Promise<Array<FileEntry>> {\n const resolvedDirOrFile = path.resolve(dirOrFile);\n const isDir = (await fs.promises.lstat(resolvedDirOrFile)).isDirectory();\n\n if (isDir) {\n const fileEntries: Array<FileEntry> = [];\n\n for await (const fileType of fs.promises.glob('**/*', {\n cwd: resolvedDirOrFile,\n withFileTypes: true,\n })) {\n // Check if it's a file (not a directory)\n if (fileType.isFile()) {\n const fullPath = `${fileType.parentPath}/${fileType.name}`;\n\n fileEntries.push({\n name: path.relative(resolvedDirOrFile, fullPath),\n stream: fs.createReadStream(fullPath),\n });\n }\n }\n\n return fileEntries;\n }\n\n return [\n {\n name: path.relative(process.cwd(), resolvedDirOrFile),\n stream: fs.createReadStream(resolvedDirOrFile),\n },\n ];\n}\n\n/**\n * Resolves all files in all directories recursively\n *\n * @param dirsAndFiles - Variable number of directory and file paths\n * @returns Promise resolving to a flattened array of file entries\n */\nasync function resolveFilesRecursive(\n ...dirsAndFiles: Array<string>\n): Promise<Array<FileEntry>> {\n const files = await Promise.all(\n dirsAndFiles.map((dirOrFile) => resolveFilesRecursiveForDir(dirOrFile)),\n );\n\n return files.flat();\n}\n\n/**\n * Creates a deterministic archive of the given files\n *\n * @param dirsAndFiles - Array of directory and file paths to include\n * @param contentToArchive - Array of content entries to include in the archive\n * @returns Promise resolving to archive result with buffer and hash\n */\nexport default async function deterministicArchive(\n dirsAndFiles: Array<string>,\n contentToArchive: Array<ArchiveContentEntry> = [],\n): Promise<ArchiveResult> {\n const uniqueDirsAndFiles = Array.from(new Set(dirsAndFiles));\n\n // Sort by name to make the output deterministic\n const filesToArchiveSorted = (\n await resolveFilesRecursive(...uniqueDirsAndFiles)\n ).toSorted((a, b) => a.name.localeCompare(b.name));\n\n const contentToArchiveSorted = contentToArchive.toSorted((a, b) =>\n a.name.localeCompare(b.name),\n );\n\n return new Promise<ArchiveResult>((resolve, reject) => {\n const archive = archiver('zip', {\n // Concurrency in the stat queue leads to non-deterministic output.\n // https://github.com/archiverjs/node-archiver/issues/383#issuecomment-2253139948\n statConcurrency: 1,\n zlib: { level: 6 },\n });\n\n const stream = new Writable();\n const data: Array<number> = [];\n\n stream._write = (chunk: Buffer, _enc: string, done: () => void) => {\n data.push(...chunk);\n done();\n };\n\n const entries: Array<EntryData> = [];\n archive.on('entry', (entry) => {\n entries.push(entry);\n });\n\n stream.on('finish', () => {\n validateArchive(archive.pointer(), entries);\n const buffer = Buffer.from(data);\n const hash = createHash(buffer);\n\n resolve({ buffer, hash });\n });\n archive.pipe(stream);\n\n const seenFiles = new Set<string>();\n\n // We can't use archive.directory() here because it is not deterministic.\n // https://github.com/archiverjs/node-archiver/issues/383#issuecomment-2252938075\n for (const file of filesToArchiveSorted) {\n if (!seenFiles.has(file.name)) {\n archive.append(file.stream, {\n name: file.name,\n prefix: '',\n date: FILE_CREATION_DATE,\n });\n seenFiles.add(file.name);\n }\n }\n\n for (const file of contentToArchiveSorted) {\n if (!seenFiles.has(file.name)) {\n archive.append(file.content, {\n name: file.name,\n prefix: '',\n date: FILE_CREATION_DATE,\n });\n seenFiles.add(file.name);\n }\n }\n\n archive.on('error', reject);\n archive.finalize();\n });\n}\n", "import type { EntryData } from 'archiver';\n\n/**\n * Validates that the archive was created successfully\n * @param pointer - The archive pointer (bytes written)\n * @param entries - Array of archive entries\n */\nexport default function validateArchive(\n totalBytes: number,\n entries: Array<EntryData | { name: string; size: number }>,\n): void {\n const totalMegaBytes = Math.round(totalBytes / 1024 / 1024);\n\n if (totalMegaBytes < 30) {\n return;\n }\n\n const messageBits = [\n `Package size is ${totalMegaBytes} MB (${totalBytes} bytes), maximum is 60 MB.`,\n \"Here are the largest 20 files in the archive. Consider removing ones that aren't necessary.\",\n ];\n\n const fileSizes = entries.map((entry) => ({\n name: entry.name,\n size:\n 'stats' in entry && entry.stats\n ? entry.stats.size\n : 'size' in entry\n ? entry.size\n : 0,\n }));\n\n for (const file of fileSizes.toSorted((a, b) => b.size - a.size).slice(0, 20)) {\n messageBits.push(\n `${file.name}: ${Math.round(file.size / 1024 / 1024)} MB (${file.size} bytes)`,\n );\n }\n\n if (totalMegaBytes > 60) {\n throw new Error(messageBits.join('\\n'));\n }\n\n console.warn(messageBits.join('\\n'));\n}\n", "import retry from 'async-retry';\n\nimport type { ConfigWithDefaults } from '../config/index.ts';\nimport { logTag } from '../utils/Logger.ts';\nimport makeHappoAPIRequest from './makeHappoAPIRequest.ts';\n\n// Type definitions\ninterface Logger {\n info: (message: string) => void;\n warn: (message: string) => void;\n}\n\ninterface UploadAssetsOptions {\n hash: string;\n logger: Logger;\n}\n\nexport default async function uploadAssets(\n buffer: Buffer<ArrayBuffer>,\n options: UploadAssetsOptions,\n config: ConfigWithDefaults,\n): Promise<string> {\n const { project } = config;\n const { hash, logger } = options;\n\n // First we need to get the signed URL from Happo.\n const signedUrlRes = await makeHappoAPIRequest(\n {\n path: `/api/snap-requests/assets/${hash}/signed-url`,\n method: 'GET',\n json: true,\n },\n config,\n { retryCount: 3 },\n );\n\n if (!signedUrlRes) {\n throw new Error('Failed to get signed URL');\n }\n\n if ('path' in signedUrlRes) {\n // If the asset has already been uploaded the response will have a path and\n // we can return it now.\n const { path: signedUrlPath } = signedUrlRes;\n\n logger.info(`${logTag(project)}Reusing existing assets at ${signedUrlPath}`);\n return typeof signedUrlPath === 'string' ? signedUrlPath : String(signedUrlPath);\n }\n\n if (!('signedUrl' in signedUrlRes)) {\n throw new Error(\n `Signed URL response does not have path or signedUrl. Response: ${JSON.stringify(signedUrlRes, null, 2)}`,\n );\n }\n\n const { signedUrl } = signedUrlRes;\n\n // Upload the assets to the signed URL using node's built-in fetch with\n // retries\n await retry(\n async (bail: (error: Error) => void) => {\n const res = await fetch(String(signedUrl), {\n method: 'PUT',\n body: buffer,\n headers: {\n 'Content-Type': 'application/zip',\n },\n });\n\n if (!res.ok) {\n const error = new Error(\n `Failed to upload assets to S3 signed URL: ${res.status} ${res.statusText}`,\n );\n\n if (res.status < 500 || res.status >= 600) {\n // If it's not a 5xx error, bail immediately instead of retrying\n bail(error);\n return;\n }\n\n throw error;\n }\n\n return res;\n },\n {\n retries: 3,\n onRetry: (error: Error, attempt: number) => {\n logger.warn(\n `${logTag(project)}PUT request attempt ${attempt} failed: ${error.message}. Retrying...`,\n );\n },\n },\n );\n\n // Finally, we need to tell Happo that we've uploaded the assets.\n const finalizeRes = await makeHappoAPIRequest(\n {\n path: `/api/snap-requests/assets/${hash}/signed-url/finalize`,\n method: 'POST',\n json: true,\n },\n config,\n { retryCount: 3 },\n );\n\n if (!finalizeRes) {\n throw new Error('Failed to finalize assets');\n }\n\n if (!('path' in finalizeRes)) {\n throw new Error('Finalize response is missing path');\n }\n\n const { path: finalizedPath } = finalizeRes;\n\n return typeof finalizedPath === 'string' ? finalizedPath : String(finalizedPath);\n}\n"],
5
+ "mappings": ";;;;;;;;;;AAAA,OAAOA,SAAQ;AACf,OAAOC,WAAU;;;ACDjB,OAAO,YAAY;AAOJ,SAAR,WACL,MACQ;AACR,SAAO,OAAO,WAAW,KAAK,EAAE,OAAO,IAAI,EAAE,OAAO,KAAK;AAC3D;;;ACPA,IAAM,mBAAmB;AA0CzB,SAAS,cAAc,OAAoB,QAAkC;AAC3E,QAAM,eAA0C,CAAC;AACjD,QAAM,WAAwB,CAAC;AAE/B,aAAW,QAAQ,OAAO;AACxB,QAAI,KAAK,SAAS;AAChB,mBAAa,KAAK,OAAO,IAAI,aAAa,KAAK,OAAO,KAAK,CAAC;AAC5D,mBAAa,KAAK,OAAO,EAAG,KAAK,IAAI;AAAA,IACvC,OAAO;AACL,eAAS,KAAK,IAAI;AAAA,IACpB;AAAA,EACF;AAEA,QAAM,SAA2B,CAAC;AAGlC,QAAM,gBAAgB,KAAK,KAAK,SAAS,SAAS,MAAM;AACxD,WAAS,IAAI,GAAG,IAAI,QAAQ,KAAK,GAAG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A,EACF;AACA,QAAM,cAAc,OAAO,KAAK,OAAO,OAAO;AAC9C,QAAM,KAAK,YAAY;AACvB,SAAO;AAAA,IACL,GAAG,OAAO,OAAO,OAAO,CAAC,6BAA6B,EAAE,UACtD,KAAK,IAAI,MAAM,EACjB;AAAA,EACF;AACA,QAAM,iBAAiB,KAAK,IAAI;AAChC,QAAM,UAAyB,CAAC;AAChC,QAAM,QAAQ;AAAA,IACZ,YAAY,IAAI,OAAO,SAAS;AAC9B,YAAM,YAAY,KAAK,IAAI;AAC3B,UAAI,CAAC,OAAO,QAAQ,IAAI,GAAG;AACzB,cAAM,IAAI,MAAM,UAAU,IAAI,sBAAsB;AAAA,MACtD;AACA,YAAM,SAAS,IAAI;AAAA,QACjB,OAAO,QAAQ,IAAI,EAAE;AAAA,QACrB,OAAO,QAAQ,IAAI;AAAA,MACrB;AACA,YAAM,iBAAiB,MAAM,OAAO;AAAA,QAClC;AAAA,UACE,YAAY;AAAA,UACZ,eAAe;AAAA,QACjB;AAAA,QACA;AAAA,MACF;AACA,aAAO,MAAM,OAAO,OAAO,OAAO,OAAO,CAAC,GAAG,IAAI,IAAI,EAAE,UAAU,CAAC;AAClE,aAAO,QAAQ;AACf,cAAQ,KAAK,GAAG,cAAc;AAAA,IAChC,CAAC;AAAA,EACH;AACA,SAAO,MAAM,QAAW,EAAE,WAAW,eAAe,CAAC;AACrD,SAAO,QAAQ;AACf,SAAO;AACT;",
6
+ "names": ["fs", "path", "fs", "path", "fs", "path", "HAPPO_DEBUG", "fs", "path", "fs", "path", "path", "fs", "path", "fs"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  makeHappoAPIRequest
3
- } from "./chunk-IS4ZMP6S.js";
4
- import "./chunk-JUNBOLIK.js";
3
+ } from "./chunk-JUHWFN2G.js";
4
+ import "./chunk-CJCPD3BP.js";
5
5
 
6
6
  // src/network/startJob.ts
7
7
  function assertResultIsStartJobResult(result) {
@@ -36,4 +36,4 @@ async function startJob(config, { beforeSha, afterSha, link, message }, logger)
36
36
  export {
37
37
  startJob as default
38
38
  };
39
- //# sourceMappingURL=startJob-KCYLIUR3.js.map
39
+ //# sourceMappingURL=startJob-TMQQTP56.js.map
@@ -3,8 +3,8 @@ import {
3
3
  } from "./chunk-GG2PHBJN.js";
4
4
  import {
5
5
  makeHappoAPIRequest
6
- } from "./chunk-IS4ZMP6S.js";
7
- import "./chunk-JUNBOLIK.js";
6
+ } from "./chunk-JUHWFN2G.js";
7
+ import "./chunk-CJCPD3BP.js";
8
8
 
9
9
  // src/e2e/wrapper.ts
10
10
  import { spawn } from "node:child_process";
@@ -420,4 +420,4 @@ export {
420
420
  runWithWrapper as default,
421
421
  finalizeAll
422
422
  };
423
- //# sourceMappingURL=wrapper-QX2FX5O4.js.map
423
+ //# sourceMappingURL=wrapper-2EC762P2.js.map
@@ -44,12 +44,17 @@ export type E2EIntegration = CypressIntegration | PlaywrightIntegration;
44
44
  interface StaticIntegration {
45
45
  type: 'static';
46
46
  /**
47
- * An async function that generates a static package. Returns the path to the
48
- * folder containing the static files. You can use a prebuilt package (simply
49
- * point to the output directory of the Storybook build) or build the package
50
- * yourself.
47
+ * An async function that generates a static package. Returns an object with
48
+ * the path to the folder containing the static files and the path to the
49
+ * entry point file relative to the root directory.
50
+ *
51
+ * @example
52
+ * { rootDir: 'dist/static', entryPoint: 'index.js' }
51
53
  */
52
- generateStaticPackage: () => Promise<string>;
54
+ generateStaticPackage: () => Promise<{
55
+ rootDir: string;
56
+ entryPoint: string;
57
+ }>;
53
58
  }
54
59
  interface Page {
55
60
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,WAAW,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IAC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;CAChC;AAED,MAAM,WAAW,kBAAmB,SAAQ,MAAM;IAChD,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;IAChD,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAC1C,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;IAClD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CAC7C;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnD"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/config/index.ts"],
4
- "sourcesContent": ["import type { SkipItems } from '../storybook/isomorphic/types.ts';\n\nexport interface StorybookIntegration {\n type: 'storybook';\n\n /**\n * The directory containing the Storybook configuration\n */\n configDir?: string;\n\n /**\n * The directory containing the static files to serve\n */\n staticDir?: string;\n\n /**\n * The directory to output the static Storybook package to\n */\n outputDir?: string;\n\n /**\n * Whether to use a prebuilt Storybook package. If you use this option, make\n * sure that files are built to the outputDir.\n */\n usePrebuiltPackage?: boolean;\n\n /**\n * Items to skip when generating snapshots.\n *\n * Can be an async function that resolves to an array of `{component,\n * variant}`, or an array of `{component, variant}`.\n */\n skip?: SkipItems | (() => Promise<SkipItems>) | undefined;\n}\n\ninterface CypressIntegration {\n type: 'cypress';\n\n /**\n * Whether to allow failures.\n */\n allowFailures?: boolean;\n}\n\ninterface PlaywrightIntegration {\n type: 'playwright';\n\n /**\n * Whether to allow failures.\n */\n allowFailures?: boolean;\n}\n\nexport type E2EIntegration = CypressIntegration | PlaywrightIntegration;\n\ninterface StaticIntegration {\n type: 'static';\n\n /**\n * An async function that generates a static package. Returns the path to the\n * folder containing the static files. You can use a prebuilt package (simply\n * point to the output directory of the Storybook build) or build the package\n * yourself.\n */\n generateStaticPackage: () => Promise<string>;\n}\n\ninterface Page {\n /**\n * URL of the page to screenshot\n *\n * Note: The URLs to the website need to be publicly available, otherwise\n * Happo workers won't be able to access the pages.\n */\n url: string;\n\n /**\n * Title of the page to screenshot\n *\n * This is used as the \"component\" identifier in Happo reports, so ensure\n * it is unique for each page.\n */\n title: string;\n}\n\ninterface PagesIntegration {\n type: 'pages';\n\n /**\n * A list of pages to screenshot.\n */\n pages: Array<Page>;\n}\n\nexport interface Config {\n /**\n * Key used to authenticate with the Happo API. Never store this in plain\n * text.\n */\n apiKey: string;\n\n /**\n * Secret used to authenticate with the Happo API. Never store this in plain\n * text.\n */\n apiSecret: string;\n\n /**\n * The endpoint to use for the happo run. Defaults to `https://happo.io`\n */\n endpoint?: string;\n\n /**\n * The name of the project to associate the Happo run with. If not provided,\n * the default project will be used.\n */\n project?: string;\n\n /**\n * Used when you have the CI script configured to post Happo statuses as comments\n *\n * The default is `'https://api.github.com'`. If you are using GitHub\n * Enterprise, enter the URL to your local GitHub API here, such as\n * `'https://ghe.mycompany.zone/api/v3'` (the default for GHE installation is\n * for the API to be located at `/api/v3`).\n */\n githubApiUrl?: string;\n /**\n * Browsers to use when generating snapshots\n */\n targets: Record<string, Target>;\n\n /**\n * Type of integration to use\n *\n * - 'storybook': Use Storybook to generate snapshots\n * - 'e2e': Use Playwright or Cypress to generate snapshots\n * - 'static': Use a static JS bundle to generate snapshots\n *\n * - 'pages': Use a list of pages to generate snapshots\n */\n integration?:\n | StorybookIntegration\n | CypressIntegration\n | PlaywrightIntegration\n | StaticIntegration\n | PagesIntegration;\n}\n\ntype MobileSafariBrowserType = 'ios-safari' | 'ipad-safari';\ntype DesktopBrowserType = 'chrome' | 'firefox' | 'edge' | 'safari' | 'accessibility';\nexport type BrowserType = MobileSafariBrowserType | DesktopBrowserType;\n\ninterface BaseTarget {\n browserType: BrowserType;\n\n /**\n * Split the target into chunks to be run on multiple workers in parallel\n *\n * This adds some overhead, so if your test suite isn't large, using more than\n * one chunk might actually slow things down.\n */\n chunks?: number;\n\n /**\n * Override the default maximum height (5000px) used by Happo workers\n *\n * This is useful when taking screenshots of tall components or pages.\n *\n * Note: The maximum width defaults to the maximum height, so if you set\n * `maxHeight`, you may also want to set `maxWidth` at the same time.\n */\n maxHeight?: number;\n\n /**\n * Override the default maximum width used by Happo workers (defaults to\n * `maxHeight`, which defaults to 5000 pixels)\n *\n * This is useful when taking screenshots of wide components or pages.\n */\n maxWidth?: number;\n\n /**\n * Controls how Happo handles elements with the `data-happo-hide` attribute.\n * By default, elements with this attribute are made invisible. Use the value\n * `'ignore'` to make the content appear in screenshots but exclude it from\n * comparison.\n */\n hideBehavior?: 'ignore';\n\n /**\n * When set to `true`, this option allows you to add `data-happo-hover`,\n * `data-happo-focus`, and `data-happo-active` attributes to your DOM elements\n * and have Happo apply the corresponding `:hover`, `:focus`, or `:active`\n * styles.\n *\n * For example, if you have this markup:\n *\n * ```html\n * <button>Hover me</button>\n * <style>\n * button:hover {\n * background-color: blue;\n * }\n * </style>\n * ```\n *\n * To apply the hover style before taking the screenshot (making the button\n * blue), change the markup to:\n *\n * ```html\n * <button data-happo-hover>Hover me</button>\n * <style>\n * button:hover {\n * background-color: blue;\n * }\n * </style>\n * ```\n *\n * Similarly, you can add focus to elements using `data-happo-focus`:\n *\n * ```html\n * <input type=\"text\" data-happo-focus />\n * ```\n *\n * And add `data-happo-active` to elements to simulate the `:active` state:\n *\n * ```html\n * <button data-happo-active>Click me</button>\n * <style>\n * button:active {\n * background-color: red;\n * }\n * </style>\n * ```\n */\n applyPseudoClasses?: boolean;\n\n /**\n * Set `prefersColorScheme: 'dark'` or `prefersColorScheme: 'light'` to set\n * the color scheme preference in the browser.\n */\n prefersColorScheme?: 'light' | 'dark';\n\n /**\n * Set `allowPointerEvents: true` to allow pointer events in the browser\n *\n * By default Happo injects some CSS to prevent spurious hover effects caused\n * by the system mouse pointer. If you rely on mouse interaction in your tests\n * (e.g., when using Storybook interactive stories), you might see an error\n * like this in your logs:\n *\n * > Error: Unable to perform pointer interaction as the element has\n * > `pointer-events: none`\n *\n * In some cases, this error prevents the variant from being included in the\n * report.\n *\n * To resolve this, set `allowPointerEvents: true` to tell Happo to skip\n * injecting the CSS that disables pointer events.\n *\n * If you're interested in testing `:hover`, `:focus`, and `:active` states\n * with Happo, you may also want to use the `applyPseudoClasses` option.\n */\n allowPointerEvents?: boolean;\n\n /**\n * Set `freezeAnimations: 'last-frame'` to freeze the animations at the last\n * frame. This is the default behavior.\n *\n * Set `freezeAnimations: 'first-frame'` to freeze the animations at the first\n * frame.\n */\n freezeAnimations?: 'last-frame' | 'first-frame';\n}\n\ninterface MobileSafariTarget extends BaseTarget {\n browserType: MobileSafariBrowserType;\n}\n\ninterface DesktopTarget extends BaseTarget {\n browserType: DesktopBrowserType;\n\n /**\n * Set the viewport size for the browser\n */\n viewport: `${number}x${number}`;\n\n /**\n * Set `prefersReducedMotion: true` to make the browser prefer reduced motion\n * when rendering the UI.\n */\n prefersReducedMotion?: boolean;\n\n /**\n * Add additional headers to the outgoing requests from the browser. This is\n * useful if you for instance need to tell a CDN that the request originates\n * from a Happo run.\n */\n outgoingRequestHeaders?: Array<{ name: string; value: string }>;\n}\n\nexport type Target = MobileSafariTarget | DesktopTarget;\n\nexport interface TargetWithDefaults extends BaseTarget {\n viewport: `${number}x${number}`;\n __dynamic: boolean;\n prefersReducedMotion?: boolean;\n}\n\nexport interface ConfigWithDefaults extends Config {\n integration: NonNullable<Config['integration']>;\n endpoint: NonNullable<Config['endpoint']>;\n githubApiUrl: NonNullable<Config['githubApiUrl']>;\n targets: Record<string, TargetWithDefaults>;\n}\n\nexport function defineConfig(config: Config): Config {\n return config;\n}\n"],
5
- "mappings": ";AA6TO,SAAS,aAAa,QAAwB;AACnD,SAAO;AACT;",
4
+ "sourcesContent": ["import type { SkipItems } from '../storybook/isomorphic/types.ts';\n\nexport interface StorybookIntegration {\n type: 'storybook';\n\n /**\n * The directory containing the Storybook configuration\n */\n configDir?: string;\n\n /**\n * The directory containing the static files to serve\n */\n staticDir?: string;\n\n /**\n * The directory to output the static Storybook package to\n */\n outputDir?: string;\n\n /**\n * Whether to use a prebuilt Storybook package. If you use this option, make\n * sure that files are built to the outputDir.\n */\n usePrebuiltPackage?: boolean;\n\n /**\n * Items to skip when generating snapshots.\n *\n * Can be an async function that resolves to an array of `{component,\n * variant}`, or an array of `{component, variant}`.\n */\n skip?: SkipItems | (() => Promise<SkipItems>) | undefined;\n}\n\ninterface CypressIntegration {\n type: 'cypress';\n\n /**\n * Whether to allow failures.\n */\n allowFailures?: boolean;\n}\n\ninterface PlaywrightIntegration {\n type: 'playwright';\n\n /**\n * Whether to allow failures.\n */\n allowFailures?: boolean;\n}\n\nexport type E2EIntegration = CypressIntegration | PlaywrightIntegration;\n\ninterface StaticIntegration {\n type: 'static';\n\n /**\n * An async function that generates a static package. Returns an object with\n * the path to the folder containing the static files and the path to the\n * entry point file relative to the root directory.\n *\n * @example\n * { rootDir: 'dist/static', entryPoint: 'index.js' }\n */\n generateStaticPackage: () => Promise<{ rootDir: string; entryPoint: string }>;\n}\n\ninterface Page {\n /**\n * URL of the page to screenshot\n *\n * Note: The URLs to the website need to be publicly available, otherwise\n * Happo workers won't be able to access the pages.\n */\n url: string;\n\n /**\n * Title of the page to screenshot\n *\n * This is used as the \"component\" identifier in Happo reports, so ensure\n * it is unique for each page.\n */\n title: string;\n}\n\ninterface PagesIntegration {\n type: 'pages';\n\n /**\n * A list of pages to screenshot.\n */\n pages: Array<Page>;\n}\n\nexport interface Config {\n /**\n * Key used to authenticate with the Happo API. Never store this in plain\n * text.\n */\n apiKey: string;\n\n /**\n * Secret used to authenticate with the Happo API. Never store this in plain\n * text.\n */\n apiSecret: string;\n\n /**\n * The endpoint to use for the happo run. Defaults to `https://happo.io`\n */\n endpoint?: string;\n\n /**\n * The name of the project to associate the Happo run with. If not provided,\n * the default project will be used.\n */\n project?: string;\n\n /**\n * Used when you have the CI script configured to post Happo statuses as comments\n *\n * The default is `'https://api.github.com'`. If you are using GitHub\n * Enterprise, enter the URL to your local GitHub API here, such as\n * `'https://ghe.mycompany.zone/api/v3'` (the default for GHE installation is\n * for the API to be located at `/api/v3`).\n */\n githubApiUrl?: string;\n /**\n * Browsers to use when generating snapshots\n */\n targets: Record<string, Target>;\n\n /**\n * Type of integration to use\n *\n * - 'storybook': Use Storybook to generate snapshots\n * - 'e2e': Use Playwright or Cypress to generate snapshots\n * - 'static': Use a static JS bundle to generate snapshots\n *\n * - 'pages': Use a list of pages to generate snapshots\n */\n integration?:\n | StorybookIntegration\n | CypressIntegration\n | PlaywrightIntegration\n | StaticIntegration\n | PagesIntegration;\n}\n\ntype MobileSafariBrowserType = 'ios-safari' | 'ipad-safari';\ntype DesktopBrowserType = 'chrome' | 'firefox' | 'edge' | 'safari' | 'accessibility';\nexport type BrowserType = MobileSafariBrowserType | DesktopBrowserType;\n\ninterface BaseTarget {\n browserType: BrowserType;\n\n /**\n * Split the target into chunks to be run on multiple workers in parallel\n *\n * This adds some overhead, so if your test suite isn't large, using more than\n * one chunk might actually slow things down.\n */\n chunks?: number;\n\n /**\n * Override the default maximum height (5000px) used by Happo workers\n *\n * This is useful when taking screenshots of tall components or pages.\n *\n * Note: The maximum width defaults to the maximum height, so if you set\n * `maxHeight`, you may also want to set `maxWidth` at the same time.\n */\n maxHeight?: number;\n\n /**\n * Override the default maximum width used by Happo workers (defaults to\n * `maxHeight`, which defaults to 5000 pixels)\n *\n * This is useful when taking screenshots of wide components or pages.\n */\n maxWidth?: number;\n\n /**\n * Controls how Happo handles elements with the `data-happo-hide` attribute.\n * By default, elements with this attribute are made invisible. Use the value\n * `'ignore'` to make the content appear in screenshots but exclude it from\n * comparison.\n */\n hideBehavior?: 'ignore';\n\n /**\n * When set to `true`, this option allows you to add `data-happo-hover`,\n * `data-happo-focus`, and `data-happo-active` attributes to your DOM elements\n * and have Happo apply the corresponding `:hover`, `:focus`, or `:active`\n * styles.\n *\n * For example, if you have this markup:\n *\n * ```html\n * <button>Hover me</button>\n * <style>\n * button:hover {\n * background-color: blue;\n * }\n * </style>\n * ```\n *\n * To apply the hover style before taking the screenshot (making the button\n * blue), change the markup to:\n *\n * ```html\n * <button data-happo-hover>Hover me</button>\n * <style>\n * button:hover {\n * background-color: blue;\n * }\n * </style>\n * ```\n *\n * Similarly, you can add focus to elements using `data-happo-focus`:\n *\n * ```html\n * <input type=\"text\" data-happo-focus />\n * ```\n *\n * And add `data-happo-active` to elements to simulate the `:active` state:\n *\n * ```html\n * <button data-happo-active>Click me</button>\n * <style>\n * button:active {\n * background-color: red;\n * }\n * </style>\n * ```\n */\n applyPseudoClasses?: boolean;\n\n /**\n * Set `prefersColorScheme: 'dark'` or `prefersColorScheme: 'light'` to set\n * the color scheme preference in the browser.\n */\n prefersColorScheme?: 'light' | 'dark';\n\n /**\n * Set `allowPointerEvents: true` to allow pointer events in the browser\n *\n * By default Happo injects some CSS to prevent spurious hover effects caused\n * by the system mouse pointer. If you rely on mouse interaction in your tests\n * (e.g., when using Storybook interactive stories), you might see an error\n * like this in your logs:\n *\n * > Error: Unable to perform pointer interaction as the element has\n * > `pointer-events: none`\n *\n * In some cases, this error prevents the variant from being included in the\n * report.\n *\n * To resolve this, set `allowPointerEvents: true` to tell Happo to skip\n * injecting the CSS that disables pointer events.\n *\n * If you're interested in testing `:hover`, `:focus`, and `:active` states\n * with Happo, you may also want to use the `applyPseudoClasses` option.\n */\n allowPointerEvents?: boolean;\n\n /**\n * Set `freezeAnimations: 'last-frame'` to freeze the animations at the last\n * frame. This is the default behavior.\n *\n * Set `freezeAnimations: 'first-frame'` to freeze the animations at the first\n * frame.\n */\n freezeAnimations?: 'last-frame' | 'first-frame';\n}\n\ninterface MobileSafariTarget extends BaseTarget {\n browserType: MobileSafariBrowserType;\n}\n\ninterface DesktopTarget extends BaseTarget {\n browserType: DesktopBrowserType;\n\n /**\n * Set the viewport size for the browser\n */\n viewport: `${number}x${number}`;\n\n /**\n * Set `prefersReducedMotion: true` to make the browser prefer reduced motion\n * when rendering the UI.\n */\n prefersReducedMotion?: boolean;\n\n /**\n * Add additional headers to the outgoing requests from the browser. This is\n * useful if you for instance need to tell a CDN that the request originates\n * from a Happo run.\n */\n outgoingRequestHeaders?: Array<{ name: string; value: string }>;\n}\n\nexport type Target = MobileSafariTarget | DesktopTarget;\n\nexport interface TargetWithDefaults extends BaseTarget {\n viewport: `${number}x${number}`;\n __dynamic: boolean;\n prefersReducedMotion?: boolean;\n}\n\nexport interface ConfigWithDefaults extends Config {\n integration: NonNullable<Config['integration']>;\n endpoint: NonNullable<Config['endpoint']>;\n githubApiUrl: NonNullable<Config['githubApiUrl']>;\n targets: Record<string, TargetWithDefaults>;\n}\n\nexport function defineConfig(config: Config): Config {\n return config;\n}\n"],
5
+ "mappings": ";AA+TO,SAAS,aAAa,QAAwB;AACnD,SAAO;AACT;",
6
6
  "names": []
7
7
  }