@alwaysmeticulous/client
Advanced tools
Comparing version 2.134.0 to 2.136.1
@@ -11,2 +11,9 @@ import { AxiosInstance } from "axios"; | ||
} | ||
export interface GetRepoUrlOptions { | ||
client: AxiosInstance; | ||
} | ||
export interface GitHubRepoUrlResponse { | ||
repoUrl: string; | ||
} | ||
export declare const getGitHubCloudReplayBaseTestRun: ({ client, headCommitSha, }: GetBaseTestRunOptions) => Promise<GitHubBaseTestRunResponse>; | ||
export declare const getGitHubCloudReplayRepoUrl: ({ client, }: GetRepoUrlOptions) => Promise<GitHubRepoUrlResponse>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getGitHubCloudReplayBaseTestRun = void 0; | ||
exports.getGitHubCloudReplayRepoUrl = exports.getGitHubCloudReplayBaseTestRun = void 0; | ||
const axios_1 = require("axios"); | ||
@@ -23,2 +23,18 @@ const getGitHubCloudReplayBaseTestRun = async ({ client, headCommitSha, }) => { | ||
exports.getGitHubCloudReplayBaseTestRun = getGitHubCloudReplayBaseTestRun; | ||
const getGitHubCloudReplayRepoUrl = async ({ client, }) => { | ||
const { data } = await client | ||
.get("github-cloud-replay/repo-url") | ||
.catch((error) => { | ||
var _a, _b; | ||
if ((0, axios_1.isAxiosError)(error)) { | ||
const errorMessage = (_b = (_a = error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message; | ||
if (errorMessage) { | ||
throw new Error(errorMessage); | ||
} | ||
} | ||
throw error; | ||
}); | ||
return data; | ||
}; | ||
exports.getGitHubCloudReplayRepoUrl = getGitHubCloudReplayRepoUrl; | ||
//# sourceMappingURL=github-cloud-replay.api.js.map |
{ | ||
"name": "@alwaysmeticulous/client", | ||
"version": "2.134.0", | ||
"version": "2.136.1", | ||
"description": "Helper methods for using the Meticulous backend API", | ||
@@ -45,3 +45,3 @@ "license": "ISC", | ||
}, | ||
"gitHead": "6514dfb7b664cec93b837b2e9c96b59008c1b64c" | ||
"gitHead": "e122b0ba5a024395e3c8e2e37b56b67a558901e4" | ||
} |
Sorry, the diff of this file is not supported yet
30915
431