d8ed37d759f5ff25fb7c95be3d7cf94fd92375bb3c1e91910f29f1426ce56b7d.json 1.6 KB

1
  1. {"ast":null,"code":"export function addErrorMessage(res, key, errorMessage, refs) {\n if (!(refs !== null && refs !== void 0 && refs.errorMessages)) return;\n if (errorMessage) {\n res.errorMessage = {\n ...res.errorMessage,\n [key]: errorMessage\n };\n }\n}\nexport function setResponseValueAndErrors(res, key, value, errorMessage, refs) {\n res[key] = value;\n addErrorMessage(res, key, errorMessage, refs);\n}","map":{"version":3,"names":["addErrorMessage","res","key","errorMessage","refs","errorMessages","setResponseValueAndErrors","value"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"],"sourcesContent":["export function addErrorMessage(res, key, errorMessage, refs) {\n if (!refs?.errorMessages)\n return;\n if (errorMessage) {\n res.errorMessage = {\n ...res.errorMessage,\n [key]: errorMessage,\n };\n }\n}\nexport function setResponseValueAndErrors(res, key, value, errorMessage, refs) {\n res[key] = value;\n addErrorMessage(res, key, errorMessage, refs);\n}\n"],"mappings":"AAAA,OAAO,SAASA,eAAeA,CAACC,GAAG,EAAEC,GAAG,EAAEC,YAAY,EAAEC,IAAI,EAAE;EAC1D,IAAI,EAACA,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEC,aAAa,GACpB;EACJ,IAAIF,YAAY,EAAE;IACdF,GAAG,CAACE,YAAY,GAAG;MACf,GAAGF,GAAG,CAACE,YAAY;MACnB,CAACD,GAAG,GAAGC;IACX,CAAC;EACL;AACJ;AACA,OAAO,SAASG,yBAAyBA,CAACL,GAAG,EAAEC,GAAG,EAAEK,KAAK,EAAEJ,YAAY,EAAEC,IAAI,EAAE;EAC3EH,GAAG,CAACC,GAAG,CAAC,GAAGK,KAAK;EAChBP,eAAe,CAACC,GAAG,EAAEC,GAAG,EAAEC,YAAY,EAAEC,IAAI,CAAC;AACjD","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}