{"_id":"@typeschema/superstruct","_rev":"3-4053dd6b3140bb6f759bcbca858eeddc","name":"@typeschema/superstruct","dist-tags":{"latest":"0.14.0"},"versions":{"0.13.0":{"name":"@typeschema/superstruct","version":"0.13.0","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/superstruct@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":"e17e6cc32753dce1128b7c56498ecd1cdff411a1","tarball":"https://registry.npmjs.org/@typeschema/superstruct/-/superstruct-0.13.0.tgz","fileCount":7,"integrity":"sha512-vtNrNKNZqwP3NZKJfXMXspEWF6xFEmk8y+P98u6ihUk8pv0ZwR6kKtLy3Z7RmFAIY44Bz58zPrFS0rgRRa+fJQ==","signatures":[{"sig":"MEUCIHM0PT8Gp4FbRwnvJ8cRcQ5QgxPUVQshdX7d0MhM27zSAiEAm5zdOa9lSOqj0Oo9Rc+XtKVOawsw8lRROLZojQbGbuM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9107},"main":"dist/index.js","_from":"file:typeschema-superstruct-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/5a5481960eefb64626de4c367f296089/typeschema-superstruct-0.13.0.tgz","_integrity":"sha512-vtNrNKNZqwP3NZKJfXMXspEWF6xFEmk8y+P98u6ihUk8pv0ZwR6kKtLy3Z7RmFAIY44Bz58zPrFS0rgRRa+fJQ==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Superstruct schemas","directories":{},"sideEffects":false,"_nodeVersion":"20.11.0","dependencies":{"@typeschema/core":"0.13.0"},"//description":"This field is manually maintained.","_hasShrinkwrap":false,"devDependencies":{"superstruct":"^1.0.3"},"peerDependencies":{"superstruct":"^1.0.3"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"superstruct":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/superstruct_0.13.0_1708584818559_0.10977202821496368","host":"s3://npm-registry-packages"}},"0.13.1":{"name":"@typeschema/superstruct","version":"0.13.1","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/superstruct@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":"88baab89d75c8fe78a0557f65d7ed5e9c5102cbb","tarball":"https://registry.npmjs.org/@typeschema/superstruct/-/superstruct-0.13.1.tgz","fileCount":7,"integrity":"sha512-LPI2EXAMCRtLLFeiv0sjDAkHLMB6rL492SSkfYe4kHLoUC4uloFQwVMd1yAOl7Et0D+kWvoEUcda/Z20xJ72Yw==","signatures":[{"sig":"MEYCIQDqhoXD6HjgPprt1rhIFl4XwHiIJeIHhLbDosZQCrskbwIhANJ8K3DBpz2srLxykJtOIdaQgYzMFPrljWGP3DLygT+X","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9287},"main":"dist/index.js","_from":"file:typeschema-superstruct-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/cc8848bd8d347d77b0dcbd475e0efe04/typeschema-superstruct-0.13.1.tgz","_integrity":"sha512-LPI2EXAMCRtLLFeiv0sjDAkHLMB6rL492SSkfYe4kHLoUC4uloFQwVMd1yAOl7Et0D+kWvoEUcda/Z20xJ72Yw==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Superstruct 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":{"superstruct":"^1.0.3"},"peerDependencies":{"superstruct":"^1.0.3"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"superstruct":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/superstruct_0.13.1_1708712694339_0.7021364195717799","host":"s3://npm-registry-packages"}},"0.13.2":{"name":"@typeschema/superstruct","version":"0.13.2","keywords":["typescript","type","schema","adapter","validation","inference","assert"],"author":{"name":"André Costa","email":"andrefonsecacosta@gmail.com"},"license":"MIT","_id":"@typeschema/superstruct@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":"689e772eac0b7a0e65649734c8658fe3bbd46b9c","tarball":"https://registry.npmjs.org/@typeschema/superstruct/-/superstruct-0.13.2.tgz","fileCount":7,"integrity":"sha512-ZyotJF9zxufelkArXzgE3RdJhKvUIlK3sdn9nSOz6WXtFjdG18apiqDlcVNxCVDQ6pdi+p36w/+5tme7+IKvGw==","signatures":[{"sig":"MEYCIQDlA90vJJNNFv8AUmEYCXWHzJWFRRsG9puTWmWbn1QtNwIhAO1DcR8cHe8xT7ULBGSxFSP8jRMNEafxl7523rmOB0ec","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9361},"main":"dist/index.js","_from":"file:typeschema-superstruct-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/835f4c480554a4dfe3aafdd716bfe32a/typeschema-superstruct-0.13.2.tgz","_integrity":"sha512-ZyotJF9zxufelkArXzgE3RdJhKvUIlK3sdn9nSOz6WXtFjdG18apiqDlcVNxCVDQ6pdi+p36w/+5tme7+IKvGw==","repository":{"url":"git+https://github.com/decs/typeschema.git","type":"git"},"_npmVersion":"10.2.4","description":"Reusable adapter for Superstruct 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":{"superstruct":"^1.0.3"},"peerDependencies":{"superstruct":"^1.0.3"},"//devDependencies":"This field is manually maintained.","//peerDependencies":"This field is manually maintained.","peerDependenciesMeta":{"superstruct":{"optional":true}},"//peerDependenciesMeta":"This field is manually maintained.","_npmOperationalInternal":{"tmp":"tmp/superstruct_0.13.2_1709024744621_0.5891038768594279","host":"s3://npm-registry-packages"}},"0.14.0":{"//":"This file is partially generated. Only some fields can be modified manually!","name":"@typeschema/superstruct","//version":"This field is manually maintained.","version":"0.14.0","//description":"This field is manually maintained.","description":"Reusable adapter for Superstruct 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":{"superstruct":"^2.0.2"},"//peerDependencies":{"//":"This field is manually maintained.","superstruct":"Required for inference and validation"},"peerDependencies":{"superstruct":"^2.0.2"},"//peerDependenciesMeta":"This field is manually maintained.","peerDependenciesMeta":{"superstruct":{"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/superstruct@0.14.0","bugs":{"url":"https://github.com/decs/typeschema/issues"},"_integrity":"sha512-/1h3VwK736zsWHeGirxbtYp5E7aI89pfhFFN9BZm3RbthuGL+ozkR2bnHrdkbl3sleVPLfrHmAsC7Y+znX67qQ==","_resolved":"/tmp/485aaab3debc65499d669c2878b84415/typeschema-superstruct-0.14.0.tgz","_from":"file:typeschema-superstruct-0.14.0.tgz","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-/1h3VwK736zsWHeGirxbtYp5E7aI89pfhFFN9BZm3RbthuGL+ozkR2bnHrdkbl3sleVPLfrHmAsC7Y+znX67qQ==","shasum":"8e4a7bafc681d7d4289eea4e1e1a8f2f67e8d504","tarball":"https://registry.npmjs.org/@typeschema/superstruct/-/superstruct-0.14.0.tgz","fileCount":7,"unpackedSize":9617,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAJaUqqbv9dt43K4oos0XXbSu6RIuVZuIqmor5ADxV9nAiBBTpoSFQEEvrG8hcry/sYWNrIOelYAJgNZzgB2ZdZZJQ=="}]},"_npmUser":{"name":"decs","email":"andrefonsecacosta@gmail.com"},"directories":{},"maintainers":[{"name":"decs","email":"andrefonsecacosta@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/superstruct_0.14.0_1724625240969_0.9429384297850723"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-22T06:53:38.472Z","modified":"2024-08-25T22:34:01.332Z","0.13.0":"2024-02-22T06:53:38.829Z","0.13.1":"2024-02-23T18:24:54.543Z","0.13.2":"2024-02-27T09:05:44.783Z","0.14.0":"2024-08-25T22:34:01.143Z"},"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 Superstruct 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/superstruct</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/superstruct\" rel=\"nofollow\"><img src=\"https://img.shields.io/bundlephobia/minzip/%40typeschema%2Fsuperstruct\" alt=\"Bundle size\"></a>\n  <a href=\"https://www.npmjs.com/package/@typeschema/superstruct\" rel=\"nofollow\"><img src=\"https://img.shields.io/npm/dw/@typeschema/superstruct.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 Superstruct 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 'superstruct';\n\nimport {wrap} from '@typeschema/superstruct';\n\nconst schema = object({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- [`superstruct`](https://www.npmjs.com/package/superstruct): Required for inference and validation (`^2.0.2`)\n\n## API\n\n### Inference\n- `Infer<TSchema>`: Extracts the output 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"}