@alwaysmeticulous/client
Advanced tools
Comparing version 2.189.0 to 2.190.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getIsLocked = void 0; | ||
const axios_1 = require("axios"); | ||
const errors_1 = require("../errors"); | ||
const getIsLocked = async ({ client, deploymentId, }) => { | ||
@@ -11,10 +11,3 @@ const { data } = await client | ||
.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; | ||
throw (0, errors_1.maybeEnrichAxiosError)(error); | ||
}); | ||
@@ -21,0 +14,0 @@ return data; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getGitHubCloudReplayRepoUrl = exports.getGitHubCloudReplayBaseTestRun = void 0; | ||
const axios_1 = require("axios"); | ||
const errors_1 = require("../errors"); | ||
const getGitHubCloudReplayBaseTestRun = async ({ client, headCommitSha, }) => { | ||
@@ -11,10 +11,3 @@ const { data } = await client | ||
.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; | ||
throw (0, errors_1.maybeEnrichAxiosError)(error); | ||
}); | ||
@@ -28,10 +21,3 @@ return data; | ||
.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; | ||
throw (0, errors_1.maybeEnrichAxiosError)(error); | ||
}); | ||
@@ -38,0 +24,0 @@ return data; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getProject = void 0; | ||
const axios_1 = __importDefault(require("axios")); | ||
const axios_1 = require("axios"); | ||
const errors_1 = require("../errors"); | ||
const getProject = async (client) => { | ||
@@ -13,8 +11,6 @@ const { data } = await client | ||
var _a; | ||
if (axios_1.default.isAxiosError(error)) { | ||
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
if ((0, axios_1.isAxiosError)(error) && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
throw error; | ||
throw (0, errors_1.maybeEnrichAxiosError)(error); | ||
}); | ||
@@ -21,0 +17,0 @@ return data; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getReplayV3DownloadUrls = exports.getReplayDownloadUrl = exports.getReplay = void 0; | ||
const axios_1 = __importDefault(require("axios")); | ||
const axios_1 = require("axios"); | ||
const errors_1 = require("../errors"); | ||
const getReplay = async (client, replayId) => { | ||
const { data } = await client.get(`replays/${replayId}`).catch((error) => { | ||
var _a; | ||
if (axios_1.default.isAxiosError(error)) { | ||
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
if ((0, axios_1.isAxiosError)(error) && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
throw error; | ||
throw (0, errors_1.maybeEnrichAxiosError)(error); | ||
}); | ||
@@ -26,8 +22,6 @@ return data; | ||
var _a; | ||
if (axios_1.default.isAxiosError(error)) { | ||
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
if ((0, axios_1.isAxiosError)(error) && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
throw error; | ||
throw (0, errors_1.maybeEnrichAxiosError)(error); | ||
}); | ||
@@ -42,8 +36,6 @@ return data; | ||
var _a; | ||
if (axios_1.default.isAxiosError(error)) { | ||
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
if ((0, axios_1.isAxiosError)(error) && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
throw error; | ||
throw (0, errors_1.maybeEnrichAxiosError)(error); | ||
}); | ||
@@ -50,0 +42,0 @@ return data; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.postSessionIdNotification = exports.getRecordingCommandId = exports.getRecordedSessionData = exports.getRecordedSession = void 0; | ||
const axios_1 = __importDefault(require("axios")); | ||
const axios_1 = require("axios"); | ||
const errors_1 = require("../errors"); | ||
const getRecordedSession = async (client, sessionId) => { | ||
const { data } = await client.get(`sessions/${sessionId}`).catch((error) => { | ||
var _a; | ||
if (axios_1.default.isAxiosError(error)) { | ||
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
if ((0, axios_1.isAxiosError)(error) && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
throw error; | ||
throw (0, errors_1.maybeEnrichAxiosError)(error); | ||
}); | ||
@@ -26,8 +22,6 @@ return data; | ||
var _a; | ||
if (axios_1.default.isAxiosError(error)) { | ||
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
if ((0, axios_1.isAxiosError)(error) && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
throw error; | ||
throw (0, errors_1.maybeEnrichAxiosError)(error); | ||
}); | ||
@@ -34,0 +28,0 @@ return data; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const axios_1 = require("axios"); | ||
const errors_1 = require("../errors"); | ||
const executeSecureTunnelTestRun = async ({ client, headSha, tunnelUrl, basicAuthUser, basicAuthPassword, environment, isLockable, }) => { | ||
@@ -17,13 +18,7 @@ const { data } = await client | ||
.catch((error) => { | ||
var _a, _b, _c; | ||
if ((0, axios_1.isAxiosError)(error)) { | ||
if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
const errorMessage = (_c = (_b = error.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.message; | ||
if (errorMessage) { | ||
throw new Error(errorMessage); | ||
} | ||
var _a; | ||
if ((0, axios_1.isAxiosError)(error) && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { | ||
return { data: null }; | ||
} | ||
throw error; | ||
throw (0, errors_1.maybeEnrichAxiosError)(error); | ||
}); | ||
@@ -30,0 +25,0 @@ return data; |
{ | ||
"name": "@alwaysmeticulous/client", | ||
"version": "2.189.0", | ||
"version": "2.190.0", | ||
"description": "Helper methods for using the Meticulous backend API", | ||
@@ -45,3 +45,3 @@ "license": "ISC", | ||
}, | ||
"gitHead": "13157dddb2b56ba517a67ace75e8441cdf2d7cc1" | ||
"gitHead": "a8bc31ee48f3978633e3ea54419a186f7ad21fd9" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36474
36
498