{"_id":"@drdgvhbh/io-ts-codegen","_rev":"3-881101db31eaa1fbe4850a42a25ca1d3","name":"@drdgvhbh/io-ts-codegen","dist-tags":{"latest":"0.4.7"},"versions":{"0.4.4":{"name":"@drdgvhbh/io-ts-codegen","version":"0.4.4","description":"Code generation for io-ts","main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"lint":"tslint -p tsconfig.json src/**/*.ts test/**/*.ts","mocha":"mocha -r ts-node/register test/*.ts","prettier":"prettier --no-semi --single-quote --print-width 120 --parser typescript --list-different \"{src,test,examples}/**/*.ts\"","fix-prettier":"prettier --no-semi --single-quote --print-width 120 --parser typescript --write \"{src,test,examples}/**/*.ts\"","test":"npm run prettier && npm run lint && npm run jest && npm run docs","clean":"rm -rf lib/*","build":"npm run clean && tsc","prepublish":"npm run build","jest":"jest --ci --coverage","docs":"docs-ts"},"repository":{"type":"git","url":"git+https://github.com/gcanti/io-ts-codegen.git"},"author":{"name":"Giulio Canti","email":"giulio.canti@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/gcanti/io-ts-codegen/issues"},"homepage":"https://github.com/gcanti/io-ts-codegen","dependencies":{},"devDependencies":{"@types/jest":"^23.3.13","@types/node":"7.0.4","docs-ts":"^0.1.0","jest":"^24.8.0","mocha":"^5.2.0","prettier":"^1.18.2","ts-jest":"^24.0.2","ts-lint":"^4.5.1","ts-node":"3.2.0","tslint":"^5.12.1","tslint-config-standard":"^8.0.1","typescript":"^3.5.3"},"tags":["typescript","io-ts","code-generation"],"keywords":["typescript","io-ts","code-generation"],"gitHead":"ef7736099e6ca54d0bd33034db1e9eafcf3e1b08","_id":"@drdgvhbh/io-ts-codegen@0.4.4","_nodeVersion":"13.5.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-PBDMBcMcEnLprnhsbAUL2+XHOHyRSnQzsEOTVPCeyHinZorNBtobCOMkhZfIYG8+QrDZ6QALpye2bolLvyO86Q==","shasum":"1627c3b3d947907103f83eb1b0eae6e00e84f2d6","tarball":"https://registry.npmjs.org/@drdgvhbh/io-ts-codegen/-/io-ts-codegen-0.4.4.tgz","fileCount":6,"unpackedSize":43444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJet12RCRA9TVsSAnZWagAAZvsP/2AhWlucGbR6ZGCDXgGd\nXXGHpK4V9Ja9q0QIrPI5xuv1WBkKTXVw0Y+XHMphksFKUBTidqCsDOQKDO9z\nxTzDTyiAAp3FT4oOwjO66fvVhXAMlO6ncCg7+JaSTxDGBSeLA+fN+VQHX7dr\nnWSX4yp6hpeHnXF2Vs6EzEcpuPutQS7gKYD5AHIhftoPVT0siMxF55TBjlR3\nYX1FuOsbgJmUxc8cLubMzHnj5v8ofm9P/JSAK4LsLEt8wN2gnNeNng6ACe3e\nCivgEvec8qk22GGKgW+xGV/ob3oD2C0XiVpjrYFWI4VwhCi1UcV9c+jw4oRk\nqWAFVRTNw8LZpafwACDD6qVEcQBLHzSYsWJv3KolVSiz1f8nP1XjgLdS46Bi\npzAv2l/KRyCq5WR4iqLv+n1VkI/ofOiCQdpouv4IPwLmXmhgMQHG25xSya79\nm3TA6c6K8qHE9fPnQf3YOG7Z6yh0+SXxrl2ODzIJie3+AvU3F1tIA2tBqofJ\nZviSbM0rZCNQrd6h6ixPXWacsPCdeGLaGd2LWBslIQ7x/OtJPzZ57EEWjQSN\nLqxKvYsjqX+rcNRSEoxLkjFlXr6ziei4cMcH3ossh5LdaGvvExpTDa1TVEvc\nJdwG7ORA1GLxB4+b4diuphozGmGl6/ogNXq+01iAcF2ooeyPoLkd0kPawRyd\nEFkU\r\n=umeA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFpqW9V9XuFWvke8W+cndaHCY/AzLBRnIOT4s/sAGGhAIhALdqQAg4likCee6Q1IDZxVAq9D6CFWFJX4S5fILOSZxb"}]},"maintainers":[{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"}],"_npmUser":{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/io-ts-codegen_0.4.4_1589075344787_0.08138217823900717"},"_hasShrinkwrap":false},"0.4.5":{"name":"@drdgvhbh/io-ts-codegen","version":"0.4.5","description":"Code generation for io-ts","main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"lint":"tslint -p tsconfig.json src/**/*.ts test/**/*.ts","mocha":"mocha -r ts-node/register test/*.ts","prettier":"prettier --no-semi --single-quote --print-width 120 --parser typescript --list-different \"{src,test,examples}/**/*.ts\"","fix-prettier":"prettier --no-semi --single-quote --print-width 120 --parser typescript --write \"{src,test,examples}/**/*.ts\"","test":"npm run prettier && npm run lint && npm run jest && npm run docs","clean":"rm -rf lib/*","build":"npm run clean && tsc","prepublish":"npm run build","jest":"jest --ci --coverage","docs":"docs-ts"},"repository":{"type":"git","url":"git+https://github.com/gcanti/io-ts-codegen.git"},"author":{"name":"Giulio Canti","email":"giulio.canti@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/gcanti/io-ts-codegen/issues"},"homepage":"https://github.com/gcanti/io-ts-codegen","dependencies":{},"devDependencies":{"@types/jest":"^23.3.13","@types/node":"7.0.4","docs-ts":"^0.1.0","jest":"^24.8.0","mocha":"^5.2.0","prettier":"^1.18.2","ts-jest":"^24.0.2","ts-lint":"^4.5.1","ts-node":"3.2.0","tslint":"^5.12.1","tslint-config-standard":"^8.0.1","typescript":"^3.5.3"},"tags":["typescript","io-ts","code-generation"],"keywords":["typescript","io-ts","code-generation"],"gitHead":"ef7736099e6ca54d0bd33034db1e9eafcf3e1b08","_id":"@drdgvhbh/io-ts-codegen@0.4.5","_nodeVersion":"13.5.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-XLCPYmRA+rwCbPo3hwNXSdEDpWW8vjuNRFMNUHJghgYnhHve7DmBgd9VF1tDgUg9JC6P2qqPlhiG9K+jVn9kNg==","shasum":"cbfc695c5316e1276aafc338b3f86a1fd4ba52c6","tarball":"https://registry.npmjs.org/@drdgvhbh/io-ts-codegen/-/io-ts-codegen-0.4.5.tgz","fileCount":6,"unpackedSize":43451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJet13rCRA9TVsSAnZWagAApxcP/jb90CPEELnqxayEcpjF\nsVvlgFCcXvH3861nNw9nPlWZQ9T5m3r8aPQhL5A0Yg9Mgsel+gDRYDMyhGVZ\nIoeu33XtQQv/08qQWwYjHV99j26oufysibkQHSXEDsGQ80oEG5H4yX6zqQoi\nz9DJIYHUQ19J6MpWvyXnQis93l4dJoKWmgJgfDB53+D4/+R8/IhcelNviXR8\nuXWHhnXEF73ADRt7C7cgokK6bzJL/wHp0o1wZ/QfTTdiae285kqBJQYjPmlu\nkwHhp39Orht5/RwGlqKpPR9Szg2KDijgKibnDsnlYYgFFs2c9YDiwJa5yP3U\nMr+JiSZM0QDzfgThRMsta+Azs9NS4AdAE+MNcipqUwdzjrOXPjVhF3QBES3S\njGEFZfvjq+FdX9sepz7YOPzjB+qe/DcgaRCZeG1pU2QvBfTqdCP+mvl4LB6w\nZk5I3/adXkJ2B9zvTSbVm9UX5SXBZF99ZKeiWkpCkPSTaK2kkDXGROEh/uA9\nC8xCQUhxE18lCAe+cGIyyDLulT42duSO2JeP8OJIukv37l5Hgc9fnxZm4ANd\ntYSWn1qM5VwqaA9goNneW8w1ati7hCeJGQLLA9/GbGm2SrVXyDZmlcfa0Yt3\n+CIIvGDATffbcUrMoZ7E0y2X+qct5Fm6TpR7ERnr/+H0MwJ5i/MrWDvqgVyH\nnTnN\r\n=rrRF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICXLSEM/i+SSDk7R0DoFRTeCZ8mK0EHQMxnB6B8eBwy/AiEA9BvwB2GSWFWW/fiRMNjrkk1qi160JgRCNAuBoEVmmi4="}]},"maintainers":[{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"}],"_npmUser":{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/io-ts-codegen_0.4.5_1589075434933_0.9591561632744519"},"_hasShrinkwrap":false},"0.4.7":{"name":"@drdgvhbh/io-ts-codegen","version":"0.4.7","description":"Code generation for io-ts","main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"lint":"tslint -p tsconfig.json src/**/*.ts test/**/*.ts","mocha":"mocha -r ts-node/register test/*.ts","prettier":"prettier --no-semi --single-quote --print-width 120 --parser typescript --list-different \"{src,test,examples}/**/*.ts\"","fix-prettier":"prettier --no-semi --single-quote --print-width 120 --parser typescript --write \"{src,test,examples}/**/*.ts\"","test":"npm run prettier && npm run lint && npm run jest && npm run docs","clean":"rm -rf lib/*","build":"npm run clean && tsc","prepublish":"npm run build","jest":"jest --ci --coverage","docs":"docs-ts"},"repository":{"type":"git","url":"git+https://github.com/gcanti/io-ts-codegen.git"},"author":{"name":"Giulio Canti","email":"giulio.canti@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/gcanti/io-ts-codegen/issues"},"homepage":"https://github.com/gcanti/io-ts-codegen","dependencies":{},"devDependencies":{"@types/jest":"^23.3.13","@types/node":"7.0.4","docs-ts":"^0.1.0","jest":"^24.8.0","mocha":"^5.2.0","prettier":"^1.18.2","ts-jest":"^24.0.2","ts-lint":"^4.5.1","ts-node":"3.2.0","tslint":"^5.12.1","tslint-config-standard":"^8.0.1","typescript":"^3.5.3"},"tags":["typescript","io-ts","code-generation"],"keywords":["typescript","io-ts","code-generation"],"gitHead":"2d4fc3f5bad0d8271e29c4541b3edee4ababe549","_id":"@drdgvhbh/io-ts-codegen@0.4.7","_nodeVersion":"13.5.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-X0QhL+GvYYEGhnk5ZMy3VR/EF2ev+CpTCKKZ9u1WsdUvZIkpe3PB+7iEGaiRV817iDdWhnsgacXmd3p4L06SoQ==","shasum":"7c785b111f86eb93505d7c547c67f10a2230c80b","tarball":"https://registry.npmjs.org/@drdgvhbh/io-ts-codegen/-/io-ts-codegen-0.4.7.tgz","fileCount":6,"unpackedSize":43432,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuBfgCRA9TVsSAnZWagAA1XwP/2if+fH7duGM24BTX+3L\nTLv7BYhBpQMG7wNapLNDHXcPr8K5sYJe3LfVm41eQ+C155Cu8D7DFNSZKAU3\nBC9t/FbQBNy08LSXlzT/jlcS2uRF3r58RyYkE34P2H4Gnn4er1fmonpC/J/1\nGplOXJiRveHzkwEHfM5DYIEOv2mG8KsmceUeiOERc595wYv1U60OOApNJ2Vc\nfmuA8iIXK5TvSnlVVKqAeM5rPv+ymPPkC+bgDtW3IJPKOsM4y3og0OrXZzSE\nqP/jKlJfxkJbrM/8vi1vdp4BAeiPnOCpRJDMHWVkAAMgMv5tJmOoFZJW8A6q\nAVy401jrGLTC3b9slY5a8s1AcOz82xHLFZFN05bd6GMCxrBE105m/xAzEgh8\nxxtRVRyGZ+HTkxG6eZijjYHLkjN5eSSUBLNuYo27XHZUWcolwyGcs3NiSzNU\njn4Lgqr6vh+OygHrBshVM6aHdzfgETiGyRQd9X4hgoLLgIalclmZzVf6uNsW\nxFuZk8oajP8TQLi2aFMxzsO+4I6a3vB5DzVyxJZai7lBgCPHRcKdu2+E7TnU\n+ETO+8yx2m+FzJTbwsaWZl7qkIyv6q5Mh0PaazJkjnPXhZ4/H7i9fsaY1L13\nB724RiI0p4RIos05y47gj6ql7MtT2vuythOUQhwnWGdb9A5oGa6BgaCSLedp\nQN+J\r\n=ZyKx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFWlwz2ObMq1u/tLdLr+8GivmOQzoAwqZc8AUvpwkwduAiBRztg6ZH0EVpoFUwC51S0fTtxDJiGaH5Hh7W34Srfn5A=="}]},"maintainers":[{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"}],"_npmUser":{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/io-ts-codegen_0.4.7_1589123039667_0.9884798197948685"},"_hasShrinkwrap":false}},"time":{"created":"2020-05-10T01:49:04.735Z","0.4.4":"2020-05-10T01:49:04.891Z","modified":"2022-04-05T05:37:13.067Z","0.4.5":"2020-05-10T01:50:35.091Z","0.4.7":"2020-05-10T15:03:59.821Z"},"maintainers":[{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"}],"description":"Code generation for io-ts","homepage":"https://github.com/gcanti/io-ts-codegen","keywords":["typescript","io-ts","code-generation"],"repository":{"type":"git","url":"git+https://github.com/gcanti/io-ts-codegen.git"},"author":{"name":"Giulio Canti","email":"giulio.canti@gmail.com"},"bugs":{"url":"https://github.com/gcanti/io-ts-codegen/issues"},"license":"MIT","readme":"# Motivation\n\nGenerate both static and runtime types from an intermediate language.\n\nThe intermediate language can in turn be generated from other schemas: JSON Schema, Swagger, [metarpheus](https://github.com/buildo/metarpheus), etc..\n\n# `io-ts` compatibility\n\n| `io-ts-codegen` version | target `io-ts` version |\n| ----------------------- | ---------------------- |\n| 0.4.0+                  | 1.0.0+ \\|\\| 2.0.0+     |\n| 0.3.0+                  | 1.0.0+ \\|\\| 2.0.0+     |\n\n# Usage\n\nNodes of the intermediate language can be built from the provided builders.\n\n```ts\nimport * as gen from 'io-ts-codegen'\n\n// list of type declarations\nconst declarations = [\n  gen.typeDeclaration('Persons', gen.arrayCombinator(gen.identifier('Person'))),\n  gen.typeDeclaration(\n    'Person',\n    gen.typeCombinator([gen.property('name', gen.stringType), gen.property('age', gen.numberType)])\n  )\n]\n\n// apply topological sort in order to get the right order\nconst sorted = gen.sort(declarations)\n\nconsole.log(sorted.map(d => gen.printRuntime(d)).join('\\n'))\nconsole.log(sorted.map(d => gen.printStatic(d)).join('\\n'))\n```\n\nOutput (as string)\n\n```ts\nconst Person = t.type({\n  name: t.string,\n  age: t.number\n})\nconst Persons = t.array(Person)\ninterface Person {\n  name: string\n  age: number\n}\ntype Persons = Array<t.TypeOf<typeof Person>>\n```\n\n# Documentation\n\n- [API Reference](https://gcanti.github.io/io-ts-codegen)\n","readmeFilename":"README.md"}