@alwaysmeticulous/client 2.56.0 → 2.58.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.
@@ -11,5 +11,6 @@ export interface TestRun {
11
11
  export interface GetLatestTestRunOptions {
12
12
  client: AxiosInstance;
13
13
  commitSha: string;
14
+ logicalEnvironmentVersion?: number;
14
15
  }
15
- export declare const getLatestTestRunResults: ({ client, commitSha, }: GetLatestTestRunOptions) => Promise<TestRun | null>;
16
+ export declare const getLatestTestRunResults: ({ client, commitSha, logicalEnvironmentVersion, }: GetLatestTestRunOptions) => Promise<TestRun | null>;
@@ -2,10 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getLatestTestRunResults = void 0;
4
4
  const axios_1 = require("axios");
5
- const getLatestTestRunResults = async ({ client, commitSha, }) => {
5
+ const getLatestTestRunResults = async ({ client, commitSha, logicalEnvironmentVersion, }) => {
6
6
  var _a;
7
7
  const { data } = await client
8
- .get(`test-runs/cache?commitSha=${encodeURIComponent(commitSha)}`)
8
+ .get("test-runs/cache", {
9
+ params: {
10
+ commitSha: encodeURIComponent(commitSha),
11
+ ...(logicalEnvironmentVersion
12
+ ? {
13
+ logicalEnvironmentVersion: encodeURIComponent(logicalEnvironmentVersion),
14
+ }
15
+ : {}),
16
+ },
17
+ })
9
18
  .catch((error) => {
10
19
  var _a;
11
20
  if (error instanceof axios_1.AxiosError && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/client",
3
- "version": "2.56.0",
3
+ "version": "2.58.0",
4
4
  "description": "Helper methods for using the Meticulous backend API",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -41,5 +41,5 @@
41
41
  "bugs": {
42
42
  "url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
43
43
  },
44
- "gitHead": "78222a2650425ced6537f3077ad47199a1fa45c3"
44
+ "gitHead": "326644a7d96790615fe2b61035c80220f95ef6fc"
45
45
  }