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

Method _parse

out/cli.cjs:32695–32740  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

32693 exports2.ZodBranded = ZodBranded;
32694 var ZodPipeline = class _ZodPipeline extends ZodType {
32695 _parse(input) {
32696 const { status, ctx } = this._processInputParams(input);
32697 if (ctx.common.async) {
32698 const handleAsync = async () => {
32699 const inResult = await this._def.in._parseAsync({
32700 data: ctx.data,
32701 path: ctx.path,
32702 parent: ctx
32703 });
32704 if (inResult.status === "aborted")
32705 return parseUtil_1.INVALID;
32706 if (inResult.status === "dirty") {
32707 status.dirty();
32708 return (0, parseUtil_1.DIRTY)(inResult.value);
32709 } else {
32710 return this._def.out._parseAsync({
32711 data: inResult.value,
32712 path: ctx.path,
32713 parent: ctx
32714 });
32715 }
32716 };
32717 return handleAsync();
32718 } else {
32719 const inResult = this._def.in._parseSync({
32720 data: ctx.data,
32721 path: ctx.path,
32722 parent: ctx
32723 });
32724 if (inResult.status === "aborted")
32725 return parseUtil_1.INVALID;
32726 if (inResult.status === "dirty") {
32727 status.dirty();
32728 return {
32729 status: "dirty",
32730 value: inResult.value
32731 };
32732 } else {
32733 return this._def.out._parseSync({
32734 data: inResult.value,
32735 path: ctx.path,
32736 parent: ctx
32737 });
32738 }
32739 }
32740 }
32741 static create(a4, b7) {
32742 return new _ZodPipeline({
32743 in: a4,

Callers

nothing calls this directly

Calls 3

_processInputParamsMethod · 0.80
_parseSyncMethod · 0.80
dirtyMethod · 0.80

Tested by

no test coverage detected