@alwaysmeticulous/cli
Advanced tools
Comparing version 1.2.5 to 1.2.6
@@ -17,2 +17,3 @@ import { AxiosInstance } from "axios"; | ||
export declare const getReplayPushUrl: (client: AxiosInstance, replayId: string) => Promise<ReplayPushUrlOutput | null>; | ||
export declare const putReplayPushedStatus: (client: AxiosInstance, projectBuildId: string, status: "success" | "failure") => Promise<any>; | ||
export declare const putReplayPushedStatus: (client: AxiosInstance, projectBuildId: string, status: "success" | "failure", replayCommandId: string) => Promise<any>; | ||
export declare const getReplayCommandId: (client: AxiosInstance, sessionId: string) => Promise<string>; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.putReplayPushedStatus = exports.getReplayPushUrl = exports.createReplay = exports.getReplay = void 0; | ||
exports.getReplayCommandId = exports.putReplayPushedStatus = exports.getReplayPushUrl = exports.createReplay = exports.getReplay = void 0; | ||
const axios_1 = __importDefault(require("axios")); | ||
@@ -47,5 +47,6 @@ const getReplay = async (client, replayId) => { | ||
exports.getReplayPushUrl = getReplayPushUrl; | ||
const putReplayPushedStatus = async (client, projectBuildId, status) => { | ||
const putReplayPushedStatus = async (client, projectBuildId, status, replayCommandId) => { | ||
const { data } = await client.put(`replays/${projectBuildId}/pushed`, { | ||
status, | ||
replayCommandId, | ||
}); | ||
@@ -55,1 +56,7 @@ return data; | ||
exports.putReplayPushedStatus = putReplayPushedStatus; | ||
const getReplayCommandId = async (client, sessionId) => { | ||
const { data } = await client.post("replays/start", { sessionId }); | ||
const { replayCommandId } = data; | ||
return replayCommandId; | ||
}; | ||
exports.getReplayCommandId = getReplayCommandId; |
@@ -41,2 +41,4 @@ "use strict"; | ||
} | ||
// Report replay start | ||
const replayCommandId = await (0, replay_api_1.getReplayCommandId)(client, sessionId); | ||
// 5. Create replay directory | ||
@@ -108,3 +110,3 @@ await (0, promises_1.mkdir)((0, path_1.join)((0, local_data_1.getMeticulousLocalDataDir)(), "replays"), { | ||
catch (error) { | ||
await (0, replay_api_1.putReplayPushedStatus)(client, replay.id, "failure").catch((updateError) => console.error(updateError)); | ||
await (0, replay_api_1.putReplayPushedStatus)(client, replay.id, "failure", replayCommandId).catch(console.error); | ||
console.error(error); | ||
@@ -114,3 +116,3 @@ process.exit(1); | ||
// 11. Report successful upload to Meticulous | ||
const updatedProjectBuild = await (0, replay_api_1.putReplayPushedStatus)(client, replay.id, "success"); | ||
const updatedProjectBuild = await (0, replay_api_1.putReplayPushedStatus)(client, replay.id, "success", replayCommandId); | ||
console.log("Replay artifacts successfully sent to Meticulous"); | ||
@@ -117,0 +119,0 @@ console.log(updatedProjectBuild); |
{ | ||
"name": "@alwaysmeticulous/cli", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"description": "The Meticulous CLI", | ||
@@ -5,0 +5,0 @@ "license": "ISC", |
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
66678
974