{"_id":"@typeschema/yup","_rev":"4-9ca915bdbfc421dba638d4c4bad1ba86","name":"@typeschema/yup","dist-tags":{"latest":"0.14.0"},"versions":{"0.13.0":{"name":"@typeschema/yup","version":"0.13.0","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/yup@0.13.0","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"homepage":"https://typeschema.com","bugs":{"url":"https://github.com/decs/typeschema/issues"},"//":"This file is partially generated. Only some fields can be modified manually!","dist":{"shasum":"5498c9347f751a94a9c0b1c3766e51c8fbc48f0d","tarball":"https://registry.npmjs.org/@typeschema/yup/-/yup-0.13.0.tgz","fileCount":7,"integrity":"sha512-WNWhpQseGxcTk91e2STSkfP1BJLsbOPzZBgAozG7bWWfZuxjxVJVRPPyr4IlAUeL83NX34oq87cPefn3Ss9Hgg==","signatures":[{"sig":"MEUCIQDBFkH080AiaAI+EKFTLuZWmYXbf+RsIiIP8N6XmjrdcQIgT3eA+MZCY+0ZF6xPqD9O6CETTG7q53/W0XIEtKk3OGA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12267},"main":"dist/index.js","_from":"file:typeschema-yup-0.13.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"eslint src --fix","test":"vitest --config ../../vitest.config.ts","build":"tsup --config ../../tsup.config.ts","lint:package":"publint && attw --pack"},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"//version":"This field is manually maintained.","_resolved":"/private/var/folders/dq/77g3z6095pj93wyfv7wj52rm0000gn/T/b4d3ecbf01d433d98d820d157a708722/typeschema-yup-0.13.0.tgz","_integrity":"sha512-WNWhpQseGxcTk91e2STSkfP1BJLsbOPzZBgAozG7bWWfZuxjxVJVRPPyr4IlAUeL83NX34oq87cPefn3Ss9Hgg==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Yup schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.0","dependencies":{"@typeschema/core":"0.13.0"},"//description":"This field is manually maintained.","_hasShrinkwrap":false,"devDependencies":{"yup":"^1.3.3","@sodaru/yup-to-json-schema":"^2.0.1"},"peerDependencies":{"yup":"^1.3.3","@sodaru/yup-to-json-schema":"^2.0.1"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"yup":{"optional":true},"@sodaru/yup-to-json-schema":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/yup_0.13.0_1708584827339_0.5348843582051039","host":"s3://npm-registry-packages"}},"0.13.1":{"name":"@typeschema/yup","version":"0.13.1","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/yup@0.13.1","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"homepage":"https://typeschema.com","bugs":{"url":"https://github.com/decs/typeschema/issues"},"//":"This file is partially generated. Only some fields can be modified manually!","dist":{"shasum":"77456e65b70f4a67211b62cf4fd6e1bffe9a47f9","tarball":"https://registry.npmjs.org/@typeschema/yup/-/yup-0.13.1.tgz","fileCount":7,"integrity":"sha512-CY+Z0buwvf6VB8c7F+yxBGq5jI/0N0wsonyWGMF5bfVMulquWLtWhfA/Syo70YavIOI8MVjp6XD3nWtTT9FC0Q==","signatures":[{"sig":"MEUCIDvWPwTaQvJsYu/S+V8wu/9DaKs7PXNYbZ+r96cHtXn4AiEAqI8xItbyhYJWoNHpNgT3qWSWm4RQOmDQJk46kgHGKaU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12443},"main":"dist/index.js","_from":"file:typeschema-yup-0.13.1.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"eslint src --fix","test":"vitest --config ../../vitest.config.ts","build":"tsup --config ../../tsup.config.ts","lint:package":"publint && attw --pack"},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"//version":"This field is manually maintained.","_resolved":"/private/var/folders/dq/77g3z6095pj93wyfv7wj52rm0000gn/T/f459fcd5b9f614bd19049a2cf6a345d5/typeschema-yup-0.13.1.tgz","_integrity":"sha512-CY+Z0buwvf6VB8c7F+yxBGq5jI/0N0wsonyWGMF5bfVMulquWLtWhfA/Syo70YavIOI8MVjp6XD3nWtTT9FC0Q==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Yup schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.0","dependencies":{"@typeschema/core":"0.13.1"},"//description":"This field is manually maintained.","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"yup":"^1.3.3","@sodaru/yup-to-json-schema":"^2.0.1"},"peerDependencies":{"yup":"^1.3.3","@sodaru/yup-to-json-schema":"^2.0.1"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"yup":{"optional":true},"@sodaru/yup-to-json-schema":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/yup_0.13.1_1708712694504_0.1527182434751051","host":"s3://npm-registry-packages"}},"0.13.2":{"name":"@typeschema/yup","version":"0.13.2","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/yup@0.13.2","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"homepage":"https://typeschema.com","bugs":{"url":"https://github.com/decs/typeschema/issues"},"//":"This file is partially generated. Only some fields can be modified manually!","dist":{"shasum":"c42f49411be8e372e46e158e9953493c14004ab1","tarball":"https://registry.npmjs.org/@typeschema/yup/-/yup-0.13.2.tgz","fileCount":7,"integrity":"sha512-y4mwp4XGn/hRvaFToGTqsMj54OF0mCQtl+P9DLk+Y9dy0zG3OiBdFnyZcBuWZ0F7nYZmxz3+RpiJ8TqJD9yuiA==","signatures":[{"sig":"MEQCIEtnrvPzUZBVy/TZ6usM16uMlX13K5hX5PhQpHwIDmgsAiBgUd+Qq0S+l0ZhYT2eSSPGwPbwOu+CAF8Eswj3D92y0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12501},"main":"dist/index.js","_from":"file:typeschema-yup-0.13.2.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"eslint src --fix","test":"vitest --config ../../vitest.config.ts","build":"tsup --config ../../tsup.config.ts","lint:package":"publint && attw --pack"},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"//version":"This field is manually maintained.","_resolved":"/tmp/aa2892a1604f07a3f541927b40f0d419/typeschema-yup-0.13.2.tgz","_integrity":"sha512-y4mwp4XGn/hRvaFToGTqsMj54OF0mCQtl+P9DLk+Y9dy0zG3OiBdFnyZcBuWZ0F7nYZmxz3+RpiJ8TqJD9yuiA==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Yup schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.1","dependencies":{"@typeschema/core":"0.13.2"},"//description":"This field is manually maintained.","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"yup":"^1.3.3","@sodaru/yup-to-json-schema":"^2.0.1"},"peerDependencies":{"yup":"^1.3.3","@sodaru/yup-to-json-schema":"^2.0.1"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"yup":{"optional":true},"@sodaru/yup-to-json-schema":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/yup_0.13.2_1709024744664_0.6353256954564941","host":"s3://npm-registry-packages"}},"0.13.3":{"name":"@typeschema/yup","version":"0.13.3","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/yup@0.13.3","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"homepage":"https://typeschema.com","bugs":{"url":"https://github.com/decs/typeschema/issues"},"//":"This file is partially generated. Only some fields can be modified manually!","dist":{"shasum":"3e5abf5f1a4c901e508fce791366380dc892e43b","tarball":"https://registry.npmjs.org/@typeschema/yup/-/yup-0.13.3.tgz","fileCount":7,"integrity":"sha512-Z+MtVn/ypL3CISknBuAmdt2xvMM0Q/ZmfjV+2xk4O26dL+Sx3fu9h1X3ANX6n/3uTfS1C4RbT4HzlK9DX4Tdxg==","signatures":[{"sig":"MEYCIQC+dSkEip+5RPEq1S8J+drTX9qfCroTkRRklvFv19GT2wIhAJoqAoJriBq3UTLC7mTQoPc7oOnOscQN71/lvXyJZngk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13332},"main":"dist/index.js","_from":"file:typeschema-yup-0.13.3.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"lint":"eslint src --fix","test":"vitest --config ../../vitest.config.ts","build":"tsup --config ../../tsup.config.ts","lint:package":"publint && attw --pack"},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"//version":"This field is manually maintained.","_resolved":"/tmp/0b4b3e08c45af0285ec7a33915a7e4c6/typeschema-yup-0.13.3.tgz","_integrity":"sha512-Z+MtVn/ypL3CISknBuAmdt2xvMM0Q/ZmfjV+2xk4O26dL+Sx3fu9h1X3ANX6n/3uTfS1C4RbT4HzlK9DX4Tdxg==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Yup schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.1","dependencies":{"@typeschema/core":"0.13.2"},"//description":"This field is manually maintained.","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"yup":"^1.3.3","@sodaru/yup-to-json-schema":"^2.0.1"},"peerDependencies":{"yup":"^1.3.3","@sodaru/yup-to-json-schema":"^2.0.1"},"//devDependencies":"This field is manually maintained.","//peerDependencies":{"//":"This field is manually maintained.","yup":"Required for inference and validation","@sodaru/yup-to-json-schema":"Required for serialization"},"peerDependenciesMeta":{"yup":{"optional":true},"@sodaru/yup-to-json-schema":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/yup_0.13.3_1709278975654_0.425955395122219","host":"s3://npm-registry-packages"}},"0.14.0":{"//":"This file is partially generated. Only some fields can be modified manually!","name":"@typeschema/yup","//version":"This field is manually maintained.","version":"0.14.0","//description":"This field is manually maintained.","description":"Reusable adapter for Yup schemas","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"homepage":"https://typeschema.com","license":"MIT","author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"sideEffects":false,"repository":{"type":"git","url":"git+https://github.com/decs/typeschema.git"},"dependencies":{"@typeschema/core":"0.14.0"},"//devDependencies":"This field is manually maintained.","devDependencies":{"@sodaru/yup-to-json-schema":"^2.0.1","yup":"^1.4.0"},"//peerDependencies":{"//":"This field is manually maintained.","@sodaru/yup-to-json-schema":"Required for serialization","yup":"Required for inference and validation"},"peerDependencies":{"@sodaru/yup-to-json-schema":"^2.0.1","yup":"^1.4.0"},"//peerDependenciesMeta":"This field is manually maintained.","peerDependenciesMeta":{"@sodaru/yup-to-json-schema":{"optional":true},"yup":{"optional":true}},"scripts":{"build":"tsup --config ../../tsup.config.ts","lint":"eslint src --fix","lint:package":"publint && attw --pack","test":"vitest --config ../../vitest.config.ts","upgrade:deps":"ncu -u --dep=dev,peer --reject ow"},"_id":"@typeschema/yup@0.14.0","bugs":{"url":"https://github.com/decs/typeschema/issues"},"_integrity":"sha512-KBki4UPDwnKKBtLDKGPLXZXUm6cV9+zLLWgbt2kSaZV4VonrDciuCq4h6P1opguEU2UsQiXuTcdVeqlTS3tA0g==","_resolved":"/tmp/c5f92f17c7c1698a52fd156f0197107b/typeschema-yup-0.14.0.tgz","_from":"file:typeschema-yup-0.14.0.tgz","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-KBki4UPDwnKKBtLDKGPLXZXUm6cV9+zLLWgbt2kSaZV4VonrDciuCq4h6P1opguEU2UsQiXuTcdVeqlTS3tA0g==","shasum":"a535a0a64b43264eceda536ee7a4ee6c1cc7a0d2","tarball":"https://registry.npmjs.org/@typeschema/yup/-/yup-0.14.0.tgz","fileCount":7,"unpackedSize":13723,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCItE7zjhbhFSQjWZAKW5Tae68vIGUSRAUj4qbG/sgvQgIgEOXfZO/d+EsEqQjff7tBiZMX2Z52CFc255LXRSZH5t0="}]},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"directories":{},"maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yup_0.14.0_1724625241978_0.4947903783010368"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-22T06:53:47.258Z","modified":"2024-08-25T22:34:02.468Z","0.13.0":"2024-02-22T06:53:47.505Z","0.13.1":"2024-02-23T18:24:54.687Z","0.13.2":"2024-02-27T09:05:44.814Z","0.13.3":"2024-03-01T07:42:55.841Z","0.14.0":"2024-08-25T22:34:02.157Z"},"bugs":{"url":"https://github.com/decs/typeschema/issues"},"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","homepage":"https://typeschema.com","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"repository":{"type":"git","url":"git+https://github.com/decs/typeschema.git"},"description":"Reusable adapter for Yup schemas","maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"readme":"<!-- This file is generated. Do not modify it manually! -->\n\n<img src=\"https://typeschema.com/assets/logo.png\" width=\"64px\" alt=\"TypeSchema\" />\n<h1>@typeschema/yup</h1>\n<p>\n  <a href=\"https://opensource.org/licenses/MIT\" rel=\"nofollow\"><img src=\"https://img.shields.io/github/license/decs/typeschema\" alt=\"License\"></a>\n  <a href=\"https://bundlephobia.com/package/@typeschema/yup\" rel=\"nofollow\"><img src=\"https://img.shields.io/bundlephobia/minzip/%40typeschema%2Fyup\" alt=\"Bundle size\"></a>\n  <a href=\"https://www.npmjs.com/package/@typeschema/yup\" rel=\"nofollow\"><img src=\"https://img.shields.io/npm/dw/@typeschema/yup.svg\" alt=\"npm downloads\"></a>\n  <a href=\"https://github.com/decs/typeschema/stargazers\" rel=\"nofollow\"><img src=\"https://img.shields.io/github/stars/decs/typeschema\" alt=\"GitHub stars\"></a>\n</p>\n<p>\n  Reusable adapter for Yup schemas\n  <br />\n  <a href=\"https://typeschema.com\">https://typeschema.com</a> ✨\n</p>\n\n```ts\nimport {initTRPC} from '@trpc/server';\nimport {object, string} from 'yup';\n\nimport {wrap} from '@typeschema/yup';\n\nconst schema = object({name: string().required()});\n\nconst t = initTRPC.create();\nconst appRouter = t.router({\n  hello: t.procedure\n    .input(wrap(schema))\n    .query(({input}) => `Hello, ${input.name}!`),\n  //         ^? {name: string}\n});\n\n```\n\nUse it directly or through [`@typeschema/main`](https://github.com/decs/typeschema/tree/main/packages/main)\n\n## Dependencies\n- [`@sodaru/yup-to-json-schema`](https://www.npmjs.com/package/@sodaru/yup-to-json-schema): Required for serialization (`^2.0.1`)\n- [`yup`](https://www.npmjs.com/package/yup): Required for inference and validation (`^1.4.0`)\n\n## API\n\n### Inference\n- `Infer<TSchema>`: Extracts the output type of a schema\n- `InferIn<TSchema>`: Extracts the input type of a schema\n\n### Validation\n- `wrap(schema)`: Returns the wrapped schema with access to its operations\n- `validate(schema, data)`: Returns the validated data or a list of validation issues\n- `assert(schema, data)`: Returns the validated data or throws an `AggregateError`\n\n### Serialization\n- `toJSONSchema(schema)`: Converts the schema into the equivalent JSON schema\n","readmeFilename":"README.md"}