@alwaysmeticulous/api 2.267.0 → 2.273.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.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  export { Organization } from "./organization.types";
2
2
  export { Project, ProjectSettingsScreenshottingOptions } from "./project.types";
3
3
  export { EndStateScreenshot, ScreenshotAfterEvent, ScreenshotDiffResult, ScreenshotDiffResultCompared, ScreenshotDiffResultDifferentSize, ScreenshotDiffResultMissingBase, ScreenshotDiffResultMissingBaseAndHead, ScreenshotDiffResultMissingHead, ScreenshotDiffResultDifference, ScreenshotDiffResultNoDifference, ScreenshotIdentifier, ScreenshotVariant, SingleTryScreenshotDiffResult, ScreenshotDiffRetryResult, SingleTryScreenshotDiffRetryResult, RedactedScreenshotIncompatible, RedactedScreenshotsCompared, RedactedScreenshotsComparison, } from "./sdk-bundle-api/bundle-to-sdk/screenshot-diff-result";
4
- export { SessionRelevance, isPrAuthorRelevance, TestCase, TestCaseReplayOptions, TestRunStatus, TestCaseResult, TestCaseResultStatus, AppContainerLogsLocations, TestRunDataLocations, } from "./replay/test-run.types";
4
+ export { SessionRelevance, isPrAuthorRelevance, TestCase, TestCaseReplayOptions, TestRunStatus, TestCaseResult, TestCaseResultStatus, AppContainerLogsLocations, TestRunDataLocations, TestRun, ExecuteSecureTunnelTestRunOptions, ExecuteSecureTunnelTestRunResponse, } from "./replay/test-run.types";
5
+ export { BaseResolutionDetails, FailedForOtherReason, RequiredNewWorkflowRunButFailedDueToNewCommitToBaseBranch, SuitableTestRunAlreadyExisted, TestRunTriggerDebugContext, TriggeredNewWorkflowRunSuccessfully, WaitedForExistingWorkflowRun, } from "./replay/test-run-debug-context.types";
5
6
  export { TestRunChunkStatus } from "./replay/test-run-chunk.types";
6
7
  export * from "./sdk-bundle-api/sdk-to-bundle/test-run-environment";
7
8
  export { ReplayableEvent } from "./sdk-bundle-api/bidirectional/replayable-event";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="997f0734-7bff-5d3a-acd6-bcd8d79f321a")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="241d0bfa-4ceb-5286-b3c4-2a8e60fcaee0")}catch(e){}}();
3
3
 
4
4
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
5
  if (k2 === undefined) k2 = k;
@@ -25,4 +25,4 @@ var session_data_1 = require("./sdk-bundle-api/sdk-to-bundle/session-data");
25
25
  Object.defineProperty(exports, "CustomDataSingletonInternalKey", { enumerable: true, get: function () { return session_data_1.CustomDataSingletonInternalKey; } });
26
26
  __exportStar(require("./sdk-bundle-api/sdk-to-bundle/event-source-data"), exports);
27
27
  //# sourceMappingURL=index.js.map
28
- //# debugId=997f0734-7bff-5d3a-acd6-bcd8d79f321a
28
+ //# debugId=241d0bfa-4ceb-5286-b3c4-2a8e60fcaee0
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourceRoot":"","names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAsBA,0DAUiC;AAT/B,kHAAA,gBAAgB,OAAA;AAChB,qHAAA,mBAAmB,OAAA;AAUrB,sFAAoE;AAQpE,4EAoBqD;AAPnD,8HAAA,8BAA8B,OAAA;AAoBhC,mFAAiE","debugId":"997f0734-7bff-5d3a-acd6-bcd8d79f321a"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourceRoot":"","names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAsBA,0DAaiC;AAZ/B,kHAAA,gBAAgB,OAAA;AAChB,qHAAA,mBAAmB,OAAA;AAsBrB,sFAAoE;AAQpE,4EAoBqD;AAPnD,8HAAA,8BAA8B,OAAA;AAoBhC,mFAAiE","debugId":"241d0bfa-4ceb-5286-b3c4-2a8e60fcaee0"}
@@ -0,0 +1,51 @@
1
+ export interface TestRunTriggerDebugContext {
2
+ baseResolutionDetails?: BaseResolutionDetails;
3
+ }
4
+ /**
5
+ * We sometimes need to re-run the CI job for the base commit to (re-)compute Meticulous results for the base commit.
6
+ *
7
+ * The caller can optionally provide information on whether this happened or was required, and was successful or not.
8
+ *
9
+ * This is useful for debugging -- for example if the base isn't available.
10
+ */
11
+ export type BaseResolutionDetails = SuitableTestRunAlreadyExisted | WaitedForExistingWorkflowRun | RequiredNewWorkflowRunButFailedDueToNewCommitToBaseBranch | TriggeredNewWorkflowRunSuccessfully | FailedForOtherReason;
12
+ export type SuitableTestRunAlreadyExisted = {
13
+ type: "suitable-test-run-already-existed";
14
+ testRunId: string;
15
+ };
16
+ /**
17
+ * We waited for the CI workflow to complete before calling this function, and it completed successfully.
18
+ */
19
+ export type WaitedForExistingWorkflowRun = {
20
+ type: "waited-for-existing-workflow-run";
21
+ workflowId: string;
22
+ baseCommitSha: string;
23
+ msTaken: number;
24
+ };
25
+ /**
26
+ * No suitable existing Meticulous results existed for the target base commit, and no existing CI workflow was running, and we were
27
+ * not able to trigger a new CI workflow because the base branch had been updated to a new commit, and the CI system only supports
28
+ * triggering new runs on the latest commit on the base branch.
29
+ */
30
+ export type RequiredNewWorkflowRunButFailedDueToNewCommitToBaseBranch = {
31
+ type: "required-new-workflow-run-but-failed-due-to-new-commit-to-base-branch";
32
+ baseRef: string;
33
+ targetBaseCommitSha: string;
34
+ currentLastestBaseCommitSha: string;
35
+ };
36
+ /**
37
+ * No suitable existing Meticulous results existed for the target base commit, and no existing CI workflow was running,
38
+ * so we triggered a new CI workflow, waited for it to complete, and it completed successfully.
39
+ */
40
+ export type TriggeredNewWorkflowRunSuccessfully = {
41
+ type: "triggered-new-workflow-run-successfully";
42
+ workflowId: string;
43
+ msTaken: number;
44
+ };
45
+ /**
46
+ * A catch all for more exceptional failures
47
+ */
48
+ export type FailedForOtherReason = {
49
+ type: "failed-for-other-reason";
50
+ message: string;
51
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ece528ed-5148-5cbc-ac24-fef3be6baf51")}catch(e){}}();
3
+
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=test-run-debug-context.types.js.map
6
+ //# debugId=ece528ed-5148-5cbc-ac24-fef3be6baf51
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-run-debug-context.types.js","sources":["../../src/replay/test-run-debug-context.types.ts"],"sourceRoot":"","names":[],"mappings":"","debugId":"ece528ed-5148-5cbc-ac24-fef3be6baf51"}
@@ -1,5 +1,8 @@
1
+ import { Project } from "../project.types";
1
2
  import { S3Location } from "../s3.types";
3
+ import { CompanionAssetsInfo } from "../sdk-bundle-api/sdk-to-bundle/companion-assets";
2
4
  import { ScreenshotDiffOptions } from "../sdk-bundle-api/sdk-to-bundle/screenshotting-options";
5
+ import type { TestRunTriggerDebugContext } from "./test-run-debug-context.types";
3
6
  /**
4
7
  * Relevance of a session
5
8
  */
@@ -84,3 +87,32 @@ export interface TestRunDataLocations {
84
87
  relevantReplayContexts: S3Location;
85
88
  appContainerLogs?: AppContainerLogsLocations;
86
89
  }
90
+ export interface TestRun {
91
+ id: string;
92
+ status: TestRunStatus;
93
+ project: Project;
94
+ configData: {
95
+ testCases?: TestCase[];
96
+ };
97
+ resultData?: {
98
+ results?: TestCaseResult[];
99
+ };
100
+ url: string;
101
+ }
102
+ export interface ExecuteSecureTunnelTestRunOptions {
103
+ headSha: string;
104
+ tunnelUrl: string;
105
+ basicAuthUser: string;
106
+ basicAuthPassword: string;
107
+ environment: string;
108
+ isLockable: boolean;
109
+ companionAssetsInfo?: CompanionAssetsInfo;
110
+ pullRequestHostingProviderId?: string;
111
+ postComment?: boolean;
112
+ debugContext?: TestRunTriggerDebugContext;
113
+ }
114
+ export interface ExecuteSecureTunnelTestRunResponse {
115
+ testRun?: TestRun;
116
+ deploymentId: string;
117
+ message?: string;
118
+ }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ce911e58-445b-52ee-8918-2c7e74c317c4")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="eb3b2b0d-be93-5eab-b9e7-ddd3cd69022c")}catch(e){}}();
3
3
 
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.isPrAuthorRelevance = exports.SessionRelevance = void 0;
@@ -26,4 +26,4 @@ const isPrAuthorRelevance = (relevance) => {
26
26
  };
27
27
  exports.isPrAuthorRelevance = isPrAuthorRelevance;
28
28
  //# sourceMappingURL=test-run.types.js.map
29
- //# debugId=ce911e58-445b-52ee-8918-2c7e74c317c4
29
+ //# debugId=eb3b2b0d-be93-5eab-b9e7-ddd3cd69022c
@@ -1 +1 @@
1
- {"version":3,"file":"test-run.types.js","sources":["../../src/replay/test-run.types.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AAGA;;GAEG;AACH,IAAY,gBAQX;AARD,WAAY,gBAAgB;IAC1B,+CAA2B,CAAA;IAC3B,gEAA4C,CAAA;IAC5C,uEAAmD,CAAA;IACnD,uDAAmC,CAAA;IACnC,8CAA0B,CAAA;IAC1B,gDAA4B,CAAA;IAC5B,oDAAgC,CAAA;AAClC,CAAC,EARW,gBAAgB,gCAAhB,gBAAgB,QAQ3B;AAEM,MAAM,mBAAmB,GAAG,CACjC,SAA8C,EACrC,EAAE;IACX,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,CACL,SAAS,KAAK,gBAAgB,CAAC,UAAU;QACzC,SAAS,KAAK,gBAAgB,CAAC,kBAAkB;QACjD,SAAS,KAAK,gBAAgB,CAAC,qBAAqB,CACrD,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,mBAAmB,uBAY9B","debugId":"ce911e58-445b-52ee-8918-2c7e74c317c4"}
1
+ {"version":3,"file":"test-run.types.js","sources":["../../src/replay/test-run.types.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AAMA;;GAEG;AACH,IAAY,gBAQX;AARD,WAAY,gBAAgB;IAC1B,+CAA2B,CAAA;IAC3B,gEAA4C,CAAA;IAC5C,uEAAmD,CAAA;IACnD,uDAAmC,CAAA;IACnC,8CAA0B,CAAA;IAC1B,gDAA4B,CAAA;IAC5B,oDAAgC,CAAA;AAClC,CAAC,EARW,gBAAgB,gCAAhB,gBAAgB,QAQ3B;AAEM,MAAM,mBAAmB,GAAG,CACjC,SAA8C,EACrC,EAAE;IACX,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,CACL,SAAS,KAAK,gBAAgB,CAAC,UAAU;QACzC,SAAS,KAAK,gBAAgB,CAAC,kBAAkB;QACjD,SAAS,KAAK,gBAAgB,CAAC,qBAAqB,CACrD,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,mBAAmB,uBAY9B","debugId":"eb3b2b0d-be93-5eab-b9e7-ddd3cd69022c"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/api",
3
- "version": "2.267.0",
3
+ "version": "2.273.0",
4
4
  "description": "Meticulous API types",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -35,5 +35,5 @@
35
35
  "bugs": {
36
36
  "url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
37
37
  },
38
- "gitHead": "a29aa1a86ad6fa6f9e6ab6abf53dd64c2efd9ac1"
38
+ "gitHead": "a359e47f23aaf6606936babaaf9b12576bad188a"
39
39
  }