UNPKG

nx

Version:

The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.

31 lines (30 loc) 1.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.handleRecordTaskRuns = handleRecordTaskRuns; exports.handleGetFlakyTasks = handleGetFlakyTasks; exports.handleGetEstimatedTaskTimings = handleGetEstimatedTaskTimings; const task_history_1 = require("../../utils/task-history"); async function handleRecordTaskRuns(taskRuns) { const taskHistory = (0, task_history_1.getTaskHistory)(); await taskHistory.recordTaskRuns(taskRuns); return { response: 'true', description: 'handleRecordTaskRuns', }; } async function handleGetFlakyTasks(hashes) { const taskHistory = (0, task_history_1.getTaskHistory)(); const history = await taskHistory.getFlakyTasks(hashes); return { response: JSON.stringify(history), description: 'handleGetFlakyTasks', }; } async function handleGetEstimatedTaskTimings(targets) { const taskHistory = (0, task_history_1.getTaskHistory)(); const history = await taskHistory.getEstimatedTaskTimings(targets); return { response: JSON.stringify(history), description: 'handleGetEstimatedTaskTimings', }; }