{"_id":"@typeschema/runtypes","_rev":"3-86ccfb342225a0c3f7c6d01039476a7f","name":"@typeschema/runtypes","dist-tags":{"latest":"0.14.0"},"versions":{"0.13.0":{"name":"@typeschema/runtypes","version":"0.13.0","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/runtypes@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":"ff570cf2b4d50823c294bd6a0f8316fa71491d91","tarball":"https://registry.npmjs.org/@typeschema/runtypes/-/runtypes-0.13.0.tgz","fileCount":7,"integrity":"sha512-cTSDS1s6He5VUJm2RWaZoyTJTsmS0FeWVc8/hxyn/lKYhUnvfblyhLpGX7hbB+PZL4xYu8hIEhnJ4dZreWL4sA==","signatures":[{"sig":"MEYCIQCNhXFd06yKgx7dNnSPc1P1btZqSbhuUeoJ+EdTZAX3cAIhAN6T+DUqKr0ABEiJOkwLtPzam1PZJhn/Wfy87Z4EWPB9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9154},"main":"dist/index.js","_from":"file:typeschema-runtypes-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/cbbb2032ac855db021117b60a3f8d978/typeschema-runtypes-0.13.0.tgz","_integrity":"sha512-cTSDS1s6He5VUJm2RWaZoyTJTsmS0FeWVc8/hxyn/lKYhUnvfblyhLpGX7hbB+PZL4xYu8hIEhnJ4dZreWL4sA==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Runtypes schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.0","dependencies":{"@typeschema/core":"0.13.0"},"//description":"This field is manually maintained.","_hasShrinkwrap":false,"devDependencies":{"runtypes":"^6.7.0"},"peerDependencies":{"runtypes":"^6.7.0"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"runtypes":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/runtypes_0.13.0_1708584815730_0.7108799161540289","host":"s3://npm-registry-packages"}},"0.13.1":{"name":"@typeschema/runtypes","version":"0.13.1","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/runtypes@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":"03ca513192907275e95fe91c3484ebb662f3f395","tarball":"https://registry.npmjs.org/@typeschema/runtypes/-/runtypes-0.13.1.tgz","fileCount":7,"integrity":"sha512-3TaAPGvEemI6i/3s7kBFZzmfuwKXZWFNhLIaJq4fp2Fyj7E6g12aw1K+fnLzX8vr57QzKKP9c7MHTP1jQE6cZQ==","signatures":[{"sig":"MEUCIQDKQBTdUqKxy76O3nl4ZZxvNsZ60vJ0y97t0onxp/TIoQIgIe0HTI8J6OCPf76WosR305REJtn7Zx1E8a2OdopH5gw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9334},"main":"dist/index.js","_from":"file:typeschema-runtypes-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/9871661521c251f82244b5623e35a630/typeschema-runtypes-0.13.1.tgz","_integrity":"sha512-3TaAPGvEemI6i/3s7kBFZzmfuwKXZWFNhLIaJq4fp2Fyj7E6g12aw1K+fnLzX8vr57QzKKP9c7MHTP1jQE6cZQ==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Runtypes 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":{"runtypes":"^6.7.0"},"peerDependencies":{"runtypes":"^6.7.0"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"runtypes":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/runtypes_0.13.1_1708712694354_0.760451971026445","host":"s3://npm-registry-packages"}},"0.13.2":{"name":"@typeschema/runtypes","version":"0.13.2","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/runtypes@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":"8d9869e5f4ab88beecd4bdf530ac847a0438c1c7","tarball":"https://registry.npmjs.org/@typeschema/runtypes/-/runtypes-0.13.2.tgz","fileCount":7,"integrity":"sha512-pg+5OjKYf+ZkQuFm89fhSeXwlKN+vlpoWz62Vls9wCAJiqaL23NAhUqP6+mUFjy6184Bd5RLh7mKSqM5xLy30Q==","signatures":[{"sig":"MEUCICJaESMz0cI2XHPpcU3ASk50IC44Mw3aNaATgxbgcOkjAiEAt7pPhmX+VQc3jat8zaVLFLd09yzCY69m4sYWEz2Zo8k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9402},"main":"dist/index.js","_from":"file:typeschema-runtypes-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/2147313856341b1beb5a57b227fa096f/typeschema-runtypes-0.13.2.tgz","_integrity":"sha512-pg+5OjKYf+ZkQuFm89fhSeXwlKN+vlpoWz62Vls9wCAJiqaL23NAhUqP6+mUFjy6184Bd5RLh7mKSqM5xLy30Q==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Runtypes 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":{"runtypes":"^6.7.0"},"peerDependencies":{"runtypes":"^6.7.0"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"runtypes":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/runtypes_0.13.2_1709024744726_0.7107078230633941","host":"s3://npm-registry-packages"}},"0.14.0":{"//":"This file is partially generated. Only some fields can be modified manually!","name":"@typeschema/runtypes","//version":"This field is manually maintained.","version":"0.14.0","//description":"This field is manually maintained.","description":"Reusable adapter for Runtypes 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":{"runtypes":"^6.7.0"},"//peerDependencies":{"//":"This field is manually maintained.","runtypes":"Required for inference and validation"},"peerDependencies":{"runtypes":"^6.7.0"},"//peerDependenciesMeta":"This field is manually maintained.","peerDependenciesMeta":{"runtypes":{"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/runtypes@0.14.0","bugs":{"url":"https://github.com/decs/typeschema/issues"},"_integrity":"sha512-jPUSp0ad9al1MBdYvnmq059n/adjJ+3G7ozV7mqeO5W7v1vnMUKqAhaCxIR+jTYUv2ixKGTaEL/7Q1uaXD6pHg==","_resolved":"/tmp/1a8bcb2fc44f2b756ddc236ab1f5b19a/typeschema-runtypes-0.14.0.tgz","_from":"file:typeschema-runtypes-0.14.0.tgz","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-jPUSp0ad9al1MBdYvnmq059n/adjJ+3G7ozV7mqeO5W7v1vnMUKqAhaCxIR+jTYUv2ixKGTaEL/7Q1uaXD6pHg==","shasum":"dce9d5493fe9341be9aafef7d0e917a3b78a9ec9","tarball":"https://registry.npmjs.org/@typeschema/runtypes/-/runtypes-0.14.0.tgz","fileCount":7,"unpackedSize":9649,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdOzi/Q80zpOK13o30PpxcSbyXxpYFBnRqkIkMcqWF6AIhAJsAP1Lp++gA/ZMK9+DgBP0DdUwLN10zX+6yy9zoX0Ed"}]},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"directories":{},"maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/runtypes_0.14.0_1724625240286_0.7878643583978582"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-22T06:53:35.595Z","modified":"2024-08-25T22:34:00.686Z","0.13.0":"2024-02-22T06:53:35.892Z","0.13.1":"2024-02-23T18:24:54.546Z","0.13.2":"2024-02-27T09:05:44.923Z","0.14.0":"2024-08-25T22:34:00.490Z"},"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 Runtypes 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/runtypes</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/runtypes\" rel=\"nofollow\"><img src=\"https://img.shields.io/bundlephobia/minzip/%40typeschema%2Fruntypes\" alt=\"Bundle size\"></a>\n  <a href=\"https://www.npmjs.com/package/@typeschema/runtypes\" rel=\"nofollow\"><img src=\"https://img.shields.io/npm/dw/@typeschema/runtypes.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 Runtypes schemas\n  <br />\n  <a href=\"https://typeschema.com\">https://typeschema.com</a> ✨\n</p>\n\n```ts\nimport {initTRPC} from '@trpc/server';\nimport {Record, String} from 'runtypes';\n\nimport {wrap} from '@typeschema/runtypes';\n\nconst schema = Record({name: String});\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- [`runtypes`](https://www.npmjs.com/package/runtypes): Required for inference and validation (`^6.7.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","readmeFilename":"README.md"}