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

Method _parse

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

Source from the content-addressed store, hash-verified

31884 return this._def.valueType;
31885 }
31886 _parse(input) {
31887 const { status, ctx } = this._processInputParams(input);
31888 if (ctx.parsedType !== util_1.ZodParsedType.object) {
31889 (0, parseUtil_1.addIssueToContext)(ctx, {
31890 code: ZodError_1.ZodIssueCode.invalid_type,
31891 expected: util_1.ZodParsedType.object,
31892 received: ctx.parsedType
31893 });
31894 return parseUtil_1.INVALID;
31895 }
31896 const pairs = [];
31897 const keyType = this._def.keyType;
31898 const valueType = this._def.valueType;
31899 for (const key in ctx.data) {
31900 pairs.push({
31901 key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
31902 value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),
31903 alwaysSet: key in ctx.data
31904 });
31905 }
31906 if (ctx.common.async) {
31907 return parseUtil_1.ParseStatus.mergeObjectAsync(status, pairs);
31908 } else {
31909 return parseUtil_1.ParseStatus.mergeObjectSync(status, pairs);
31910 }
31911 }
31912 get element() {
31913 return this._def.valueType;
31914 }

Callers

nothing calls this directly

Calls 5

_processInputParamsMethod · 0.80
mergeObjectAsyncMethod · 0.80
mergeObjectSyncMethod · 0.80
pushMethod · 0.45
_parseMethod · 0.45

Tested by

no test coverage detected