MCPcopy
hub / github.com/di-sukharev/opencommit / makeIssue

Function makeIssue

out/cli.cjs:29352–29376  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

29350 var errors_1 = require_errors();
29351 var en_1 = __importDefault(require_en());
29352 var makeIssue = (params) => {
29353 const { data, path: path5, errorMaps, issueData } = params;
29354 const fullPath = [...path5, ...issueData.path || []];
29355 const fullIssue = {
29356 ...issueData,
29357 path: fullPath
29358 };
29359 if (issueData.message !== void 0) {
29360 return {
29361 ...issueData,
29362 path: fullPath,
29363 message: issueData.message
29364 };
29365 }
29366 let errorMessage = "";
29367 const maps = errorMaps.filter((m5) => !!m5).slice().reverse();
29368 for (const map of maps) {
29369 errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
29370 }
29371 return {
29372 ...issueData,
29373 path: fullPath,
29374 message: errorMessage
29375 };
29376 };
29377 exports2.makeIssue = makeIssue;
29378 exports2.EMPTY_PATH = [];
29379 function addIssueToContext(ctx, issueData) {

Callers

nothing calls this directly

Calls 3

mapFunction · 0.85
filterMethod · 0.80
sliceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…