4badc768d995454b84e375b7ccb441ab16d4391855491d798915bd01862090ca.json 2.7 KB

1
  1. {"ast":null,"code":"import { getDefaultOptions } from \"./Options.js\";\nexport const getRefs = options => {\n const _options = getDefaultOptions(options);\n const currentPath = _options.name !== undefined ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;\n return {\n ..._options,\n currentPath: currentPath,\n propertyPath: undefined,\n seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [def._def, {\n def: def._def,\n path: [..._options.basePath, _options.definitionPath, name],\n // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now.\n jsonSchema: undefined\n }]))\n };\n};","map":{"version":3,"names":["getDefaultOptions","getRefs","options","_options","currentPath","name","undefined","basePath","definitionPath","propertyPath","seen","Map","Object","entries","definitions","map","def","_def","path","jsonSchema"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/zod-to-json-schema/dist/esm/Refs.js"],"sourcesContent":["import { getDefaultOptions } from \"./Options.js\";\nexport const getRefs = (options) => {\n const _options = getDefaultOptions(options);\n const currentPath = _options.name !== undefined\n ? [..._options.basePath, _options.definitionPath, _options.name]\n : _options.basePath;\n return {\n ..._options,\n currentPath: currentPath,\n propertyPath: undefined,\n seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [\n def._def,\n {\n def: def._def,\n path: [..._options.basePath, _options.definitionPath, name],\n // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now.\n jsonSchema: undefined,\n },\n ])),\n };\n};\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,cAAc;AAChD,OAAO,MAAMC,OAAO,GAAIC,OAAO,IAAK;EAChC,MAAMC,QAAQ,GAAGH,iBAAiB,CAACE,OAAO,CAAC;EAC3C,MAAME,WAAW,GAAGD,QAAQ,CAACE,IAAI,KAAKC,SAAS,GACzC,CAAC,GAAGH,QAAQ,CAACI,QAAQ,EAAEJ,QAAQ,CAACK,cAAc,EAAEL,QAAQ,CAACE,IAAI,CAAC,GAC9DF,QAAQ,CAACI,QAAQ;EACvB,OAAO;IACH,GAAGJ,QAAQ;IACXC,WAAW,EAAEA,WAAW;IACxBK,YAAY,EAAEH,SAAS;IACvBI,IAAI,EAAE,IAAIC,GAAG,CAACC,MAAM,CAACC,OAAO,CAACV,QAAQ,CAACW,WAAW,CAAC,CAACC,GAAG,CAAC,CAAC,CAACV,IAAI,EAAEW,GAAG,CAAC,KAAK,CACpEA,GAAG,CAACC,IAAI,EACR;MACID,GAAG,EAAEA,GAAG,CAACC,IAAI;MACbC,IAAI,EAAE,CAAC,GAAGf,QAAQ,CAACI,QAAQ,EAAEJ,QAAQ,CAACK,cAAc,EAAEH,IAAI,CAAC;MAC3D;MACAc,UAAU,EAAEb;IAChB,CAAC,CACJ,CAAC;EACN,CAAC;AACL,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}