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

Function handleResult

out/cli.cjs:29535–29553  ·  view source on GitHub ↗
(ctx, result)

Source from the content-addressed store, hash-verified

29533 }
29534 };
29535 var handleResult = (ctx, result) => {
29536 if ((0, parseUtil_1.isValid)(result)) {
29537 return { success: true, data: result.value };
29538 } else {
29539 if (!ctx.common.issues.length) {
29540 throw new Error("Validation failed but no issues detected.");
29541 }
29542 return {
29543 success: false,
29544 get error() {
29545 if (this._error)
29546 return this._error;
29547 const error = new ZodError_1.ZodError(ctx.common.issues);
29548 this._error = error;
29549 return this._error;
29550 }
29551 };
29552 }
29553 };
29554 function processCreateParams(params) {
29555 if (!params)
29556 return {};

Callers 2

safeParseMethod · 0.85
safeParseAsyncMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…