UNPKG

taylo

Version:

Make changes to a branch a plugin. A command-line tool to manage and apply plugins '.taylored'. Supports applying, removing, verifying plugins, and generating them from branch (GIT).

21 lines (20 loc) 938 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.handleOffsetCommand = handleOffsetCommand; const git_patch_offset_updater_1 = require("../git-patch-offset-updater"); const utils_1 = require("../utils"); async function handleOffsetCommand(userInputFileName, CWD, branchName) { const resolvedTayloredFileName = (0, utils_1.resolveTayloredFileName)(userInputFileName); try { await (0, git_patch_offset_updater_1.updatePatchOffsets)(resolvedTayloredFileName, CWD, undefined, branchName); } catch (error) { console.error(`\nCRITICAL ERROR: Failed to update offsets for '${resolvedTayloredFileName}'.`); let message = error.message || 'An unknown error occurred during offset update.'; console.error(` Error: ${message}`); if (error.stderr) { console.error(` Git STDERR details: ${error.stderr}`); } throw error; } }