@alwaysmeticulous/client 2.262.1 → 2.264.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,62 @@
1
+ import { MeticulousClient } from "../types/client.types";
2
+ export interface DiffsSummaryOptions {
3
+ includeDomDiffGroups?: boolean;
4
+ includeImageDiffHashes?: boolean;
5
+ includeJsCoverageGroups?: boolean;
6
+ includeCssCoverageGroups?: boolean;
7
+ showAll?: boolean;
8
+ }
9
+ export interface DiffsSummaryScreenshot {
10
+ screenshotName: string;
11
+ index: number;
12
+ total: number;
13
+ outcome: string;
14
+ userVisibleOutcome: string;
15
+ mismatchFraction: number | null;
16
+ domDiffIds: string;
17
+ imageDiffId?: string;
18
+ jsCoverageGroupId?: string;
19
+ cssCoverageGroupId?: string;
20
+ }
21
+ export interface DiffsSummaryReplayDiff {
22
+ replayDiffId: string;
23
+ screenshots: DiffsSummaryScreenshot[];
24
+ }
25
+ export interface DiffsSummaryResponse {
26
+ jobId: string;
27
+ status: "pending" | "processing" | "complete" | "error";
28
+ progress?: string;
29
+ error?: string;
30
+ data?: DiffsSummaryReplayDiff[];
31
+ }
32
+ export interface ScreenshotDomDiffResponse {
33
+ diffs: Array<{
34
+ index: number;
35
+ content: string;
36
+ }>;
37
+ totalDiffs: number;
38
+ }
39
+ export interface ScreenshotUrlsResponse {
40
+ outcome: string;
41
+ screenshot?: string;
42
+ before?: string;
43
+ after?: string;
44
+ diffImage?: string;
45
+ }
46
+ export interface TimelineDiffEntry {
47
+ status: "identical" | "removed" | "added" | "changed";
48
+ timeMs: number;
49
+ eventKind: string;
50
+ description: string;
51
+ mismatchFraction?: number | null;
52
+ }
53
+ export interface TimelineDiffResponse {
54
+ baseReplayId: string;
55
+ headReplayId: string;
56
+ entries: TimelineDiffEntry[];
57
+ }
58
+ export declare const triggerTestRunDiffsSummary: (client: MeticulousClient, testRunId: string, options: DiffsSummaryOptions) => Promise<DiffsSummaryResponse>;
59
+ export declare const getTestRunDiffsSummaryStatus: (client: MeticulousClient, testRunId: string, jobId: string) => Promise<DiffsSummaryResponse>;
60
+ export declare const getScreenshotDomDiff: (client: MeticulousClient, replayDiffId: string, screenshotName: string, index?: number) => Promise<ScreenshotDomDiffResponse>;
61
+ export declare const getScreenshotUrls: (client: MeticulousClient, replayDiffId: string, screenshotName: string) => Promise<ScreenshotUrlsResponse>;
62
+ export declare const getTimelineDiff: (client: MeticulousClient, replayDiffId: string) => Promise<TimelineDiffResponse>;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTimelineDiff = exports.getScreenshotUrls = exports.getScreenshotDomDiff = exports.getTestRunDiffsSummaryStatus = exports.triggerTestRunDiffsSummary = void 0;
4
+ const errors_1 = require("../errors");
5
+ // ---------------------------------------------------------------------------
6
+ // API methods
7
+ // ---------------------------------------------------------------------------
8
+ const triggerTestRunDiffsSummary = async (client, testRunId, options) => {
9
+ const { data } = await client
10
+ .post(`agent/test-runs/${testRunId}/diffs-summary`, options)
11
+ .catch((error) => {
12
+ throw (0, errors_1.maybeEnrichFetchError)(error);
13
+ });
14
+ return data;
15
+ };
16
+ exports.triggerTestRunDiffsSummary = triggerTestRunDiffsSummary;
17
+ const getTestRunDiffsSummaryStatus = async (client, testRunId, jobId) => {
18
+ const { data } = await client
19
+ .get(`agent/test-runs/${testRunId}/diffs-summary/${jobId}`)
20
+ .catch((error) => {
21
+ throw (0, errors_1.maybeEnrichFetchError)(error);
22
+ });
23
+ return data;
24
+ };
25
+ exports.getTestRunDiffsSummaryStatus = getTestRunDiffsSummaryStatus;
26
+ const getScreenshotDomDiff = async (client, replayDiffId, screenshotName, index) => {
27
+ const params = { screenshotName };
28
+ if (index != null) {
29
+ params.index = String(index);
30
+ }
31
+ const { data } = await client
32
+ .get(`agent/replay-diffs/${replayDiffId}/screenshot-dom-diff`, { params })
33
+ .catch((error) => {
34
+ throw (0, errors_1.maybeEnrichFetchError)(error);
35
+ });
36
+ return data;
37
+ };
38
+ exports.getScreenshotDomDiff = getScreenshotDomDiff;
39
+ const getScreenshotUrls = async (client, replayDiffId, screenshotName) => {
40
+ const { data } = await client
41
+ .get(`agent/replay-diffs/${replayDiffId}/screenshot-urls`, {
42
+ params: { screenshotName },
43
+ })
44
+ .catch((error) => {
45
+ throw (0, errors_1.maybeEnrichFetchError)(error);
46
+ });
47
+ return data;
48
+ };
49
+ exports.getScreenshotUrls = getScreenshotUrls;
50
+ const getTimelineDiff = async (client, replayDiffId) => {
51
+ const { data } = await client
52
+ .get(`agent/replay-diffs/${replayDiffId}/timeline-diff`)
53
+ .catch((error) => {
54
+ throw (0, errors_1.maybeEnrichFetchError)(error);
55
+ });
56
+ return data;
57
+ };
58
+ exports.getTimelineDiff = getTimelineDiff;
59
+ //# sourceMappingURL=agent.api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.api.js","sourceRoot":"","sources":["../../src/api/agent.api.ts"],"names":[],"mappings":";;;AAAA,sCAAkD;AAgFlD,8EAA8E;AAC9E,cAAc;AACd,8EAA8E;AAEvE,MAAM,0BAA0B,GAAG,KAAK,EAC7C,MAAwB,EACxB,SAAiB,EACjB,OAA4B,EACG,EAAE;IACjC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM;SAC1B,IAAI,CAAC,mBAAmB,SAAS,gBAAgB,EAAE,OAAO,CAAC;SAC3D,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACf,MAAM,IAAA,8BAAqB,EAAC,KAAK,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IACL,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAXW,QAAA,0BAA0B,8BAWrC;AAEK,MAAM,4BAA4B,GAAG,KAAK,EAC/C,MAAwB,EACxB,SAAiB,EACjB,KAAa,EACkB,EAAE;IACjC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM;SAC1B,GAAG,CAAC,mBAAmB,SAAS,kBAAkB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,YAAoB,EACW,EAAE;IACjC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM;SAC1B,GAAG,CAAC,sBAAsB,YAAY,gBAAgB,CAAC;SACvD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACf,MAAM,IAAA,8BAAqB,EAAC,KAAK,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IACL,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAVW,QAAA,eAAe,mBAU1B"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { DiffsSummaryOptions, DiffsSummaryScreenshot, DiffsSummaryReplayDiff, DiffsSummaryResponse, ScreenshotDomDiffResponse, ScreenshotUrlsResponse, TimelineDiffEntry, TimelineDiffResponse, triggerTestRunDiffsSummary, getTestRunDiffsSummaryStatus, getScreenshotDomDiff, getScreenshotUrls, getTimelineDiff, } from "./api/agent.api";
1
2
  export * from "./api/github-cloud-replay.api";
2
3
  export { WhoamiResponse, getWhoami } from "./api/oauth.api";
3
4
  export { getProject, getRepoUrl } from "./api/project.api";
package/dist/index.js CHANGED
@@ -14,7 +14,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.getRelevantSessions = exports.isFetchError = exports.getRegistryAuth = exports.getContainerDeployment = exports.downloadProjectDeployment = exports.completeContainerUpload = exports.completeAssetUpload = exports.requestGitDiffUpload = exports.requestUploadPart = exports.requestMultipartAssetUpload = exports.requestAssetUpload = exports.getProxyAgent = exports.clearOAuthTokens = exports.getValidAccessToken = exports.performOAuthLogin = exports.makeRequest = exports.isInteractiveContext = exports.createClientWithOAuth = exports.createClient = exports.getAuthToken = exports.getApiToken = exports.IN_PROGRESS_TEST_RUN_STATUS = exports.getIsLocked = exports.emitTelemetry = exports.getLatestTestRunResults = exports.getTestRunReplayDiffs = exports.getTestRunData = exports.getTestRun = exports.executeSecureTunnelTestRun = exports.getPrDiff = exports.getReplayDiff = exports.postSessionIdNotification = exports.getRecordingCommandId = exports.getRecordedSessionData = exports.getRecordedSession = exports.getReplayV3DownloadUrls = exports.getReplayDownloadUrl = exports.getReplay = exports.getRepoUrl = exports.getProject = exports.getWhoami = void 0;
17
+ exports.getRelevantSessions = exports.isFetchError = exports.getRegistryAuth = exports.getContainerDeployment = exports.downloadProjectDeployment = exports.completeContainerUpload = exports.completeAssetUpload = exports.requestGitDiffUpload = exports.requestUploadPart = exports.requestMultipartAssetUpload = exports.requestAssetUpload = exports.getProxyAgent = exports.clearOAuthTokens = exports.getValidAccessToken = exports.performOAuthLogin = exports.makeRequest = exports.isInteractiveContext = exports.createClientWithOAuth = exports.createClient = exports.getAuthToken = exports.getApiToken = exports.IN_PROGRESS_TEST_RUN_STATUS = exports.getIsLocked = exports.emitTelemetry = exports.getLatestTestRunResults = exports.getTestRunReplayDiffs = exports.getTestRunData = exports.getTestRun = exports.executeSecureTunnelTestRun = exports.getPrDiff = exports.getReplayDiff = exports.postSessionIdNotification = exports.getRecordingCommandId = exports.getRecordedSessionData = exports.getRecordedSession = exports.getReplayV3DownloadUrls = exports.getReplayDownloadUrl = exports.getReplay = exports.getRepoUrl = exports.getProject = exports.getWhoami = exports.getTimelineDiff = exports.getScreenshotUrls = exports.getScreenshotDomDiff = exports.getTestRunDiffsSummaryStatus = exports.triggerTestRunDiffsSummary = void 0;
18
+ var agent_api_1 = require("./api/agent.api");
19
+ Object.defineProperty(exports, "triggerTestRunDiffsSummary", { enumerable: true, get: function () { return agent_api_1.triggerTestRunDiffsSummary; } });
20
+ Object.defineProperty(exports, "getTestRunDiffsSummaryStatus", { enumerable: true, get: function () { return agent_api_1.getTestRunDiffsSummaryStatus; } });
21
+ Object.defineProperty(exports, "getScreenshotDomDiff", { enumerable: true, get: function () { return agent_api_1.getScreenshotDomDiff; } });
22
+ Object.defineProperty(exports, "getScreenshotUrls", { enumerable: true, get: function () { return agent_api_1.getScreenshotUrls; } });
23
+ Object.defineProperty(exports, "getTimelineDiff", { enumerable: true, get: function () { return agent_api_1.getTimelineDiff; } });
18
24
  __exportStar(require("./api/github-cloud-replay.api"), exports);
19
25
  var oauth_api_1 = require("./api/oauth.api");
20
26
  Object.defineProperty(exports, "getWhoami", { enumerable: true, get: function () { return oauth_api_1.getWhoami; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gEAA8C;AAC9C,6CAA4D;AAAnC,sGAAA,SAAS,OAAA;AAClC,iDAA2D;AAAlD,yGAAA,UAAU,OAAA;AAAE,yGAAA,UAAU,OAAA;AAK/B,+CAK0B;AAHxB,uGAAA,SAAS,OAAA;AACT,kHAAA,oBAAoB,OAAA;AACpB,qHAAA,uBAAuB,OAAA;AAEzB,iDAK2B;AAJzB,iHAAA,kBAAkB,OAAA;AAClB,qHAAA,sBAAsB,OAAA;AACtB,oHAAA,qBAAqB,OAAA;AACrB,wHAAA,yBAAyB,OAAA;AAE3B,yDAA0E;AAA7C,gHAAA,aAAa,OAAA;AAC1C,yDAAkD;AAAzC,4GAAA,SAAS,OAAA;AAClB,mDAU4B;AAR1B,0HAAA,0BAA0B,OAAA;AAC1B,0GAAA,UAAU,OAAA;AACV,8GAAA,cAAc,OAAA;AACd,qHAAA,qBAAqB,OAAA;AAErB,uHAAA,uBAAuB,OAAA;AAEvB,6GAAA,aAAa,OAAA;AAEf,iEAA4E;AAA/C,kHAAA,WAAW,OAAA;AACxC,+DAAuE;AAA9D,iIAAA,2BAA2B,OAAA;AACpC,qDAA8D;AAArD,8GAAA,WAAW,OAAA;AAAE,+GAAA,YAAY,OAAA;AAClC,mCAMkB;AAJhB,sGAAA,YAAY,OAAA;AACZ,+GAAA,qBAAqB,OAAA;AACrB,8GAAA,oBAAoB,OAAA;AACpB,qGAA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,mDAU4B;AAR1B,0HAAA,0BAA0B,OAAA;AAC1B,0GAAA,UAAU,OAAA;AACV,8GAAA,cAAc,OAAA;AACd,qHAAA,qBAAqB,OAAA;AAErB,uHAAA,uBAAuB,OAAA;AAEvB,6GAAA,aAAa,OAAA;AAEf,iEAA4E;AAA/C,kHAAA,WAAW,OAAA;AACxC,+DAAuE;AAA9D,iIAAA,2BAA2B,OAAA;AACpC,qDAA8D;AAArD,8GAAA,WAAW,OAAA;AAAE,+GAAA,YAAY,OAAA;AAClC,mCAMkB;AAJhB,sGAAA,YAAY,OAAA;AACZ,+GAAA,qBAAqB,OAAA;AACrB,8GAAA,oBAAoB,OAAA;AACpB,qGAAA,WAAW,OAAA;AAEb,mDAAwD;AAA/C,gHAAA,iBAAiB,OAAA;AAC1B,uDAA4D;AAAnD,oHAAA,mBAAmB,OAAA;AAC5B,+DAA6D;AAApD,qHAAA,gBAAgB,OAAA;AAEzB,2DAAwD;AAA/C,gHAAA,aAAa,OAAA;AACtB,yEAwBuC;AArBrC,6HAAA,kBAAkB,OAAA;AAClB,sIAAA,2BAA2B,OAAA;AAI3B,4HAAA,iBAAiB,OAAA;AAGjB,+HAAA,oBAAoB,OAAA;AAGpB,8HAAA,mBAAmB,OAAA;AAGnB,kIAAA,uBAAuB,OAAA;AAGvB,oIAAA,yBAAyB,OAAA;AAEzB,iIAAA,sBAAsB,OAAA;AAGxB,mDAA8E;AAA5C,+GAAA,eAAe,OAAA;AACjD,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,6DAMiC;AAD/B,wHAAA,mBAAmB,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/client",
3
- "version": "2.262.1",
3
+ "version": "2.264.0",
4
4
  "description": "Helper methods for using the Meticulous backend API",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -19,8 +19,8 @@
19
19
  "depcheck": "depcheck --ignore-patterns=dist"
20
20
  },
21
21
  "dependencies": {
22
- "@alwaysmeticulous/api": "2.262.0",
23
- "@alwaysmeticulous/common": "2.262.1",
22
+ "@alwaysmeticulous/api": "2.264.0",
23
+ "@alwaysmeticulous/common": "2.264.0",
24
24
  "loglevel": "^1.8.0",
25
25
  "node-fetch": "^2.6.9",
26
26
  "proxy-agent": "^6.4.0"
@@ -45,5 +45,5 @@
45
45
  "devDependencies": {
46
46
  "@types/node-fetch": "^2.6.13"
47
47
  },
48
- "gitHead": "e10f7d08b09a5c68d3a15f9c85646bb8e255348e"
48
+ "gitHead": "6296ae8e1b450b160eef2c0b84134a35a9fff8db"
49
49
  }