happo 6.4.1 → 6.5.1
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.
- package/dist/cli/cancelJob-RNJNTEO6.js +10 -0
- package/dist/cli/{chunk-JQ5JKJGY.js → chunk-4DIEFVB6.js} +2 -2
- package/dist/cli/{chunk-FZHTC4L5.js → chunk-7LVB6VSD.js} +2 -2
- package/dist/cli/{chunk-FZHTC4L5.js.map → chunk-7LVB6VSD.js.map} +1 -1
- package/dist/cli/{chunk-JAUTKTZY.js → chunk-SCQIFNJG.js} +2 -2
- package/dist/cli/{chunk-NAK4M3PS.js → chunk-SVXHNTZV.js} +2 -2
- package/dist/cli/{chunk-F4CUEMIS.js → chunk-Z3ISMK3L.js} +3 -3
- package/dist/cli/{chunk-XM2DXDSO.js → chunk-ZFINBURL.js} +2 -2
- package/dist/cli/createAsyncComparison-7TQ6WCAL.js +10 -0
- package/dist/cli/{createAsyncReport-XKNIFAJB.js → createAsyncReport-YYPR6QMH.js} +4 -4
- package/dist/cli/{getFlakes-KRJUAUHV.js → getFlakes-2IDWWM6K.js} +4 -4
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/main.js +149 -97
- package/dist/cli/main.js.map +3 -3
- package/dist/cli/package-XNDR47YX.js +7 -0
- package/dist/cli/parseOptions.d.ts +83 -0
- package/dist/cli/parseOptions.d.ts.map +1 -0
- package/dist/cli/{prepareSnapRequests-EXILTRP4.js → prepareSnapRequests-YRX3FLO3.js} +4 -4
- package/dist/cli/startJob-6UNQDHQ6.js +10 -0
- package/dist/cli/{wrapper-KRUJ2F4T.js → wrapper-YSLGURLA.js} +7 -7
- package/dist/config/loadConfig.d.ts.map +1 -1
- package/dist/cypress/task.js +3 -2
- package/dist/cypress/task.js.map +2 -2
- package/dist/environment/index.d.ts +2 -16
- package/dist/environment/index.d.ts.map +1 -1
- package/dist/playwright/index.js +3 -2
- package/dist/playwright/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/cli/cancelJob-ROJDWYPD.js +0 -10
- package/dist/cli/createAsyncComparison-37KSA6M4.js +0 -10
- package/dist/cli/package-S5HBIHRL.js +0 -7
- package/dist/cli/startJob-KT7MPC4H.js +0 -10
- /package/dist/cli/{cancelJob-ROJDWYPD.js.map → cancelJob-RNJNTEO6.js.map} +0 -0
- /package/dist/cli/{chunk-JQ5JKJGY.js.map → chunk-4DIEFVB6.js.map} +0 -0
- /package/dist/cli/{chunk-JAUTKTZY.js.map → chunk-SCQIFNJG.js.map} +0 -0
- /package/dist/cli/{chunk-NAK4M3PS.js.map → chunk-SVXHNTZV.js.map} +0 -0
- /package/dist/cli/{chunk-F4CUEMIS.js.map → chunk-Z3ISMK3L.js.map} +0 -0
- /package/dist/cli/{chunk-XM2DXDSO.js.map → chunk-ZFINBURL.js.map} +0 -0
- /package/dist/cli/{createAsyncComparison-37KSA6M4.js.map → createAsyncComparison-7TQ6WCAL.js.map} +0 -0
- /package/dist/cli/{createAsyncReport-XKNIFAJB.js.map → createAsyncReport-YYPR6QMH.js.map} +0 -0
- /package/dist/cli/{getFlakes-KRJUAUHV.js.map → getFlakes-2IDWWM6K.js.map} +0 -0
- /package/dist/cli/{package-S5HBIHRL.js.map → package-XNDR47YX.js.map} +0 -0
- /package/dist/cli/{prepareSnapRequests-EXILTRP4.js.map → prepareSnapRequests-YRX3FLO3.js.map} +0 -0
- /package/dist/cli/{startJob-KT7MPC4H.js.map → startJob-6UNQDHQ6.js.map} +0 -0
- /package/dist/cli/{wrapper-KRUJ2F4T.js.map → wrapper-YSLGURLA.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeHappoAPIRequest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZFINBURL.js";
|
|
4
4
|
|
|
5
5
|
// src/network/startJob.ts
|
|
6
6
|
function assertResultIsStartJobResult(result) {
|
|
@@ -36,4 +36,4 @@ async function startJob(config, { beforeSha, afterSha, link, message }, logger)
|
|
|
36
36
|
export {
|
|
37
37
|
startJob
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-4DIEFVB6.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "happo",
|
|
4
|
-
version: "6.
|
|
4
|
+
version: "6.5.1",
|
|
5
5
|
description: "Catch unexpected visual and accessibility changes and UI bugs",
|
|
6
6
|
license: "MIT",
|
|
7
7
|
repository: {
|
|
@@ -183,4 +183,4 @@ var package_default = {
|
|
|
183
183
|
export {
|
|
184
184
|
package_default
|
|
185
185
|
};
|
|
186
|
-
//# sourceMappingURL=chunk-
|
|
186
|
+
//# sourceMappingURL=chunk-7LVB6VSD.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.
|
|
4
|
+
"sourcesContent": ["{\n \"name\": \"happo\",\n \"version\": \"6.5.1\",\n \"description\": \"Catch unexpected visual and accessibility changes and UI bugs\",\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/main.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 \"./custom\": {\n \"types\": \"./dist/custom/index.d.ts\",\n \"default\": \"./dist/custom/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 \"preset.js\"\n ],\n \"scripts\": {\n \"all\": \"node ./scripts/allchecks.ts\",\n \"build\": \"pnpm build:types && pnpm build:dist\",\n \"build:custom\": \"esbuild src/custom/__happo__/index.ts --bundle --format=iife --global-name=happoCustom --outfile=tmp/happo-custom/bundle.js --platform=browser --target=esnext\",\n \"build:dist\": \"./scripts/build.ts\",\n \"build:types\": \"pnpm tsc --pretty\",\n \"build:watch\": \"tsc --build --watch\",\n \"clean\": \"rm -rf dist tmp/tsc tmp/happo-custom\",\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:custom\": \"pnpm build:dist && pnpm build:custom && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.custom.config.ts\",\n \"test:cypress\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.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/main.js -c ./happoconfigs/happo.playwright.config.ts e2e -- playwright test\",\n \"test:storybook\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.storybook.config.ts\",\n \"test:pages\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.pages.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\": \"^10.0.1\",\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/async-retry\": \"^1.4.9\",\n \"@types/base64-stream\": \"^1.0.5\",\n \"@types/jsdom\": \"^28.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 \"cypress\": \"^15.5.0\",\n \"esbuild\": \"^0.27.0\",\n \"eslint\": \"^10.0.2\",\n \"eslint-config-prettier\": \"^10.1.8\",\n \"eslint-plugin-compat\": \"^7.0.1\",\n \"eslint-plugin-depend\": \"^1.4.0\",\n \"eslint-plugin-simple-import-sort\": \"^12.1.1\",\n \"eslint-plugin-unicorn\": \"^63.0.0\",\n \"jiti\": \"^2.6.1\",\n \"jsdom\": \"^28.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 \"storybook\": \"^10.0.1\",\n \"typescript\": \"^5.9.2\",\n \"typescript-eslint\": \"^8.56.1\"\n },\n \"dependencies\": {\n \"async-retry\": \"^1.3.3\",\n \"base64-stream\": \"^1.0.0\",\n \"empathic\": \"^2.0.0\",\n \"fflate\": \"^0.8.2\",\n \"jose\": \"^6.1.0\",\n \"limit-concur\": \"^4.0.0\",\n \"mime-types\": \"^3.0.1\",\n \"srcset\": \"^5.0.2\"\n },\n \"storybook\": {\n \"displayName\": \"Happo\",\n \"icon\": \"https://happo.io/static/happo-hippo.png\",\n \"supportedFrameworks\": [\n \"angular\",\n \"ember\",\n \"html\",\n \"preact\",\n \"react\",\n \"react-native\",\n \"svelte\",\n \"vue\",\n \"web-components\"\n ],\n \"unsupportedFrameworks\": []\n },\n \"keywords\": [\n \"storybook-addon\",\n \"accessibility\",\n \"cypress\",\n \"playwright\",\n \"regression\",\n \"storybook\",\n \"test\",\n \"testing\",\n \"ui\",\n \"visual-regression\",\n \"visual\",\n \"vrt\"\n ],\n \"engines\": {\n \"node\": \"^22.18.0 || ^23.6.0 || >=24.0.0\"\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,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;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
package_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7LVB6VSD.js";
|
|
4
4
|
|
|
5
5
|
// src/network/fetchWithRetry.ts
|
|
6
6
|
import asyncRetry from "async-retry";
|
|
@@ -95,4 +95,4 @@ export {
|
|
|
95
95
|
ErrorWithStatusCode,
|
|
96
96
|
fetchWithRetry
|
|
97
97
|
};
|
|
98
|
-
//# sourceMappingURL=chunk-
|
|
98
|
+
//# sourceMappingURL=chunk-SCQIFNJG.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeHappoAPIRequest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZFINBURL.js";
|
|
4
4
|
|
|
5
5
|
// src/network/createAsyncComparison.ts
|
|
6
6
|
function assertResultIsCreateAsyncComparisonResult(result) {
|
|
@@ -60,4 +60,4 @@ async function createAsyncComparison(config, {
|
|
|
60
60
|
export {
|
|
61
61
|
createAsyncComparison
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-SVXHNTZV.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeHappoAPIRequest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZFINBURL.js";
|
|
4
4
|
import {
|
|
5
5
|
ErrorWithStatusCode
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SCQIFNJG.js";
|
|
7
7
|
|
|
8
8
|
// src/network/cancelJob.ts
|
|
9
9
|
async function cancelJob(status, message, config, { beforeSha, afterSha, link }, logger) {
|
|
@@ -43,4 +43,4 @@ async function cancelJob(status, message, config, { beforeSha, afterSha, link },
|
|
|
43
43
|
export {
|
|
44
44
|
cancelJob
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-Z3ISMK3L.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchWithRetry
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SCQIFNJG.js";
|
|
4
4
|
|
|
5
5
|
// src/network/makeHappoAPIRequest.ts
|
|
6
6
|
import { SignJWT } from "jose";
|
|
@@ -51,4 +51,4 @@ async function makeHappoAPIRequest({ url, path, method = "GET", formData, body }
|
|
|
51
51
|
export {
|
|
52
52
|
makeHappoAPIRequest
|
|
53
53
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
//# sourceMappingURL=chunk-ZFINBURL.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAsyncComparison
|
|
3
|
+
} from "./chunk-SVXHNTZV.js";
|
|
4
|
+
import "./chunk-ZFINBURL.js";
|
|
5
|
+
import "./chunk-SCQIFNJG.js";
|
|
6
|
+
import "./chunk-7LVB6VSD.js";
|
|
7
|
+
export {
|
|
8
|
+
createAsyncComparison as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=createAsyncComparison-7TQ6WCAL.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeHappoAPIRequest
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ZFINBURL.js";
|
|
4
|
+
import "./chunk-SCQIFNJG.js";
|
|
5
|
+
import "./chunk-7LVB6VSD.js";
|
|
6
6
|
|
|
7
7
|
// src/network/createAsyncReport.ts
|
|
8
8
|
function assertResultIsCreateAsyncReportResult(result) {
|
|
@@ -38,4 +38,4 @@ async function createAsyncReport(snapRequestIds, config, { afterSha, link, messa
|
|
|
38
38
|
export {
|
|
39
39
|
createAsyncReport as default
|
|
40
40
|
};
|
|
41
|
-
//# sourceMappingURL=createAsyncReport-
|
|
41
|
+
//# sourceMappingURL=createAsyncReport-YYPR6QMH.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeHappoAPIRequest
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ZFINBURL.js";
|
|
4
|
+
import "./chunk-SCQIFNJG.js";
|
|
5
|
+
import "./chunk-7LVB6VSD.js";
|
|
6
6
|
|
|
7
7
|
// src/network/getFlakes.ts
|
|
8
8
|
function formatFlakeOutput(flakes) {
|
|
@@ -70,4 +70,4 @@ export {
|
|
|
70
70
|
getFlakes as default,
|
|
71
71
|
formatFlakeOutput
|
|
72
72
|
};
|
|
73
|
-
//# sourceMappingURL=getFlakes-
|
|
73
|
+
//# sourceMappingURL=getFlakes-2IDWWM6K.js.map
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAqMrD,wBAAsB,IAAI,CACxB,OAAO,GAAE,KAAK,CAAC,MAAM,CAAgB,EACrC,MAAM,GAAE,MAAgB,GACvB,OAAO,CAAC,IAAI,CAAC,CA4Ff"}
|
package/dist/cli/main.js
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-JTRP4JVC.js";
|
|
5
5
|
import {
|
|
6
6
|
fetchWithRetry
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SCQIFNJG.js";
|
|
8
8
|
import {
|
|
9
9
|
package_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7LVB6VSD.js";
|
|
11
11
|
|
|
12
12
|
// src/cli/index.ts
|
|
13
13
|
import path3 from "node:path";
|
|
@@ -16,6 +16,7 @@ import { parseArgs } from "node:util";
|
|
|
16
16
|
// src/config/loadConfig.ts
|
|
17
17
|
import fs from "node:fs";
|
|
18
18
|
import path from "node:path";
|
|
19
|
+
import { pathToFileURL } from "node:url";
|
|
19
20
|
import { any as findAny } from "empathic/find";
|
|
20
21
|
|
|
21
22
|
// src/config/openBrowser.ts
|
|
@@ -280,7 +281,7 @@ async function loadConfigFile(configFilePath, environment, logger = console) {
|
|
|
280
281
|
}
|
|
281
282
|
let config;
|
|
282
283
|
try {
|
|
283
|
-
config = (await import(configFilePath)).default;
|
|
284
|
+
config = (await import(pathToFileURL(configFilePath).href)).default;
|
|
284
285
|
} catch (error) {
|
|
285
286
|
if (error instanceof Error && "code" in error && error.code === "ERR_UNKNOWN_FILE_EXTENSION") {
|
|
286
287
|
const extension = path.extname(configFilePath);
|
|
@@ -814,6 +815,86 @@ async function resolveEnvironment(cliArgs, env = process.env) {
|
|
|
814
815
|
return result;
|
|
815
816
|
}
|
|
816
817
|
|
|
818
|
+
// src/cli/parseOptions.ts
|
|
819
|
+
var parseOptions = {
|
|
820
|
+
version: {
|
|
821
|
+
type: "boolean",
|
|
822
|
+
short: "v"
|
|
823
|
+
},
|
|
824
|
+
help: {
|
|
825
|
+
type: "boolean",
|
|
826
|
+
short: "h"
|
|
827
|
+
},
|
|
828
|
+
config: {
|
|
829
|
+
type: "string",
|
|
830
|
+
short: "c"
|
|
831
|
+
},
|
|
832
|
+
baseBranch: {
|
|
833
|
+
type: "string"
|
|
834
|
+
},
|
|
835
|
+
link: {
|
|
836
|
+
type: "string"
|
|
837
|
+
},
|
|
838
|
+
message: {
|
|
839
|
+
type: "string"
|
|
840
|
+
},
|
|
841
|
+
authorEmail: {
|
|
842
|
+
type: "string"
|
|
843
|
+
},
|
|
844
|
+
afterSha: {
|
|
845
|
+
type: "string"
|
|
846
|
+
},
|
|
847
|
+
beforeSha: {
|
|
848
|
+
type: "string"
|
|
849
|
+
},
|
|
850
|
+
beforeShaTagMatcher: {
|
|
851
|
+
type: "string"
|
|
852
|
+
},
|
|
853
|
+
fallbackShas: {
|
|
854
|
+
type: "string"
|
|
855
|
+
},
|
|
856
|
+
fallbackShasCount: {
|
|
857
|
+
type: "string"
|
|
858
|
+
},
|
|
859
|
+
notify: {
|
|
860
|
+
type: "string"
|
|
861
|
+
},
|
|
862
|
+
nonce: {
|
|
863
|
+
type: "string"
|
|
864
|
+
},
|
|
865
|
+
githubToken: {
|
|
866
|
+
type: "string"
|
|
867
|
+
},
|
|
868
|
+
// Flake command options
|
|
869
|
+
allProjects: {
|
|
870
|
+
type: "boolean"
|
|
871
|
+
},
|
|
872
|
+
format: {
|
|
873
|
+
type: "string"
|
|
874
|
+
},
|
|
875
|
+
project: {
|
|
876
|
+
type: "string"
|
|
877
|
+
},
|
|
878
|
+
limit: {
|
|
879
|
+
type: "string"
|
|
880
|
+
},
|
|
881
|
+
page: {
|
|
882
|
+
type: "string"
|
|
883
|
+
},
|
|
884
|
+
component: {
|
|
885
|
+
type: "string"
|
|
886
|
+
},
|
|
887
|
+
variant: {
|
|
888
|
+
type: "string"
|
|
889
|
+
},
|
|
890
|
+
target: {
|
|
891
|
+
type: "string"
|
|
892
|
+
},
|
|
893
|
+
sha: {
|
|
894
|
+
type: "string"
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
|
|
817
898
|
// src/cli/telemetry.ts
|
|
818
899
|
import crypto2 from "node:crypto";
|
|
819
900
|
import fs2 from "node:fs";
|
|
@@ -1108,7 +1189,7 @@ function createReporter(opts = {}) {
|
|
|
1108
1189
|
|
|
1109
1190
|
// src/cli/index.ts
|
|
1110
1191
|
async function getVersion() {
|
|
1111
|
-
const packageJson = await import("./package-
|
|
1192
|
+
const packageJson = await import("./package-XNDR47YX.js");
|
|
1112
1193
|
return packageJson.default.version;
|
|
1113
1194
|
}
|
|
1114
1195
|
function parseDashdashCommandParts(rawArgs) {
|
|
@@ -1118,92 +1199,63 @@ function parseDashdashCommandParts(rawArgs) {
|
|
|
1118
1199
|
}
|
|
1119
1200
|
return rawArgs.slice(dashdashIndex + 1);
|
|
1120
1201
|
}
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
type: "string"
|
|
1133
|
-
},
|
|
1134
|
-
page: {
|
|
1135
|
-
type: "string"
|
|
1136
|
-
},
|
|
1137
|
-
component: {
|
|
1138
|
-
type: "string"
|
|
1139
|
-
},
|
|
1140
|
-
variant: {
|
|
1141
|
-
type: "string"
|
|
1142
|
-
},
|
|
1143
|
-
target: {
|
|
1144
|
-
type: "string"
|
|
1145
|
-
},
|
|
1146
|
-
sha: {
|
|
1147
|
-
type: "string"
|
|
1202
|
+
function levenshtein(a, b) {
|
|
1203
|
+
const n = b.length;
|
|
1204
|
+
const row = Array.from({ length: n + 1 }, (_, j) => j);
|
|
1205
|
+
for (let i = 1; i <= a.length; i++) {
|
|
1206
|
+
let prev = row[0];
|
|
1207
|
+
row[0] = i;
|
|
1208
|
+
for (let j = 1; j <= n; j++) {
|
|
1209
|
+
const temp = row[j];
|
|
1210
|
+
row[j] = a[i - 1] === b[j - 1] ? prev : 1 + Math.min(prev, temp, row[j - 1]);
|
|
1211
|
+
prev = temp;
|
|
1212
|
+
}
|
|
1148
1213
|
}
|
|
1149
|
-
|
|
1214
|
+
return row[n];
|
|
1215
|
+
}
|
|
1216
|
+
function findClosestOption(unknownName, knownNames) {
|
|
1217
|
+
let bestMatch;
|
|
1218
|
+
let bestDistance = Infinity;
|
|
1219
|
+
for (const known of knownNames) {
|
|
1220
|
+
const distance = levenshtein(unknownName, known);
|
|
1221
|
+
const threshold = Math.floor(Math.max(unknownName.length, known.length) / 3);
|
|
1222
|
+
if (distance <= threshold && distance < bestDistance) {
|
|
1223
|
+
bestDistance = distance;
|
|
1224
|
+
bestMatch = known;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
return bestMatch;
|
|
1228
|
+
}
|
|
1150
1229
|
function parseRawArgs(rawArgs) {
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
},
|
|
1181
|
-
beforeSha: {
|
|
1182
|
-
type: "string"
|
|
1183
|
-
},
|
|
1184
|
-
fallbackShas: {
|
|
1185
|
-
type: "string"
|
|
1186
|
-
},
|
|
1187
|
-
fallbackShasCount: {
|
|
1188
|
-
type: "string"
|
|
1189
|
-
},
|
|
1190
|
-
notify: {
|
|
1191
|
-
type: "string"
|
|
1192
|
-
},
|
|
1193
|
-
nonce: {
|
|
1194
|
-
type: "string"
|
|
1195
|
-
},
|
|
1196
|
-
githubToken: {
|
|
1197
|
-
type: "string"
|
|
1198
|
-
},
|
|
1199
|
-
...fallbackOptions
|
|
1200
|
-
},
|
|
1201
|
-
allowPositionals: true
|
|
1202
|
-
});
|
|
1203
|
-
return {
|
|
1204
|
-
...parsedArgs,
|
|
1205
|
-
dashdashCommandParts: parseDashdashCommandParts(rawArgs)
|
|
1206
|
-
};
|
|
1230
|
+
try {
|
|
1231
|
+
const parsedArgs = parseArgs({
|
|
1232
|
+
args: rawArgs,
|
|
1233
|
+
options: parseOptions,
|
|
1234
|
+
allowPositionals: true
|
|
1235
|
+
});
|
|
1236
|
+
return {
|
|
1237
|
+
...parsedArgs,
|
|
1238
|
+
dashdashCommandParts: parseDashdashCommandParts(rawArgs)
|
|
1239
|
+
};
|
|
1240
|
+
} catch (error) {
|
|
1241
|
+
if (error instanceof Error && "code" in error && error.code === "ERR_PARSE_ARGS_UNKNOWN_OPTION") {
|
|
1242
|
+
const match = error.message.match(/^Unknown option '(--[^']+)'/);
|
|
1243
|
+
if (match && match[1]) {
|
|
1244
|
+
const unknownOption = match[1];
|
|
1245
|
+
const suggestion = findClosestOption(
|
|
1246
|
+
unknownOption.slice(2),
|
|
1247
|
+
Object.keys(parseOptions)
|
|
1248
|
+
);
|
|
1249
|
+
if (suggestion !== void 0) {
|
|
1250
|
+
throw new TypeError(
|
|
1251
|
+
`Unknown option: '${unknownOption}'. Did you mean '--${suggestion}'?`,
|
|
1252
|
+
{ cause: error }
|
|
1253
|
+
);
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
throw error;
|
|
1258
|
+
}
|
|
1207
1259
|
}
|
|
1208
1260
|
var helpText = `Happo ${await getVersion()}
|
|
1209
1261
|
Usage: happo [options]
|
|
@@ -1379,10 +1431,10 @@ async function main(rawArgs = process.argv, logger = console) {
|
|
|
1379
1431
|
async function handleDefaultCommand(config, environment, logger) {
|
|
1380
1432
|
logger.log("Running happo tests...");
|
|
1381
1433
|
const [startJob, createAsyncComparison, createAsyncReport, prepareSnapRequests] = await Promise.all([
|
|
1382
|
-
(await import("./startJob-
|
|
1383
|
-
(await import("./createAsyncComparison-
|
|
1384
|
-
(await import("./createAsyncReport-
|
|
1385
|
-
(await import("./prepareSnapRequests-
|
|
1434
|
+
(await import("./startJob-6UNQDHQ6.js")).default,
|
|
1435
|
+
(await import("./createAsyncComparison-7TQ6WCAL.js")).default,
|
|
1436
|
+
(await import("./createAsyncReport-YYPR6QMH.js")).default,
|
|
1437
|
+
(await import("./prepareSnapRequests-YRX3FLO3.js")).default
|
|
1386
1438
|
]);
|
|
1387
1439
|
await startJob(config, environment, logger);
|
|
1388
1440
|
try {
|
|
@@ -1415,7 +1467,7 @@ async function handleDefaultCommand(config, environment, logger) {
|
|
|
1415
1467
|
} catch (e) {
|
|
1416
1468
|
const message = e instanceof Error ? e.message : String(e);
|
|
1417
1469
|
logger.error(`${config.integration.type} run failed: ${message}`, e);
|
|
1418
|
-
const cancelJob = (await import("./cancelJob-
|
|
1470
|
+
const cancelJob = (await import("./cancelJob-RNJNTEO6.js")).default;
|
|
1419
1471
|
await cancelJob("failure", message, config, environment, logger);
|
|
1420
1472
|
process.exitCode = 1;
|
|
1421
1473
|
return;
|
|
@@ -1426,7 +1478,7 @@ async function handleFinalizeCommand(config, environment, logger) {
|
|
|
1426
1478
|
logger.log("Config:", config);
|
|
1427
1479
|
logger.log("Environment:", environment);
|
|
1428
1480
|
try {
|
|
1429
|
-
const finalizeAll = (await import("./wrapper-
|
|
1481
|
+
const finalizeAll = (await import("./wrapper-YSLGURLA.js")).finalizeAll;
|
|
1430
1482
|
await finalizeAll({ happoConfig: config, environment, logger });
|
|
1431
1483
|
} catch (e) {
|
|
1432
1484
|
logger.error(e instanceof Error ? e.message : String(e), e);
|
|
@@ -1447,14 +1499,14 @@ async function handleFlakeCommand(config, {
|
|
|
1447
1499
|
target,
|
|
1448
1500
|
sha
|
|
1449
1501
|
}, logger) {
|
|
1450
|
-
if (format &&
|
|
1502
|
+
if (format && format !== "json" && format !== "human") {
|
|
1451
1503
|
logger.error(
|
|
1452
1504
|
`Unsupported format: ${format}. Use --format=json for raw JSON output or --format=human for human-readable output.`
|
|
1453
1505
|
);
|
|
1454
1506
|
process.exitCode = 1;
|
|
1455
1507
|
return;
|
|
1456
1508
|
}
|
|
1457
|
-
const { default: getFlakes, formatFlakeOutput } = await import("./getFlakes-
|
|
1509
|
+
const { default: getFlakes, formatFlakeOutput } = await import("./getFlakes-2IDWWM6K.js");
|
|
1458
1510
|
const project = allProjects ? void 0 : projectOverride ?? config.project;
|
|
1459
1511
|
const flakes = await getFlakes(
|
|
1460
1512
|
{
|
|
@@ -1496,7 +1548,7 @@ async function handleE2ECommand(config, environment, dashdashCommandParts, confi
|
|
|
1496
1548
|
logger.log("Config:", config);
|
|
1497
1549
|
logger.log("Environment:", environment);
|
|
1498
1550
|
logger.log("Dashdash command parts:", dashdashCommandParts);
|
|
1499
|
-
const runWithWrapper = (await import("./wrapper-
|
|
1551
|
+
const runWithWrapper = (await import("./wrapper-YSLGURLA.js")).default;
|
|
1500
1552
|
const exitCode = await runWithWrapper(
|
|
1501
1553
|
dashdashCommandParts,
|
|
1502
1554
|
config,
|