{"_id":"@brad-jones/tsos","_rev":"11-a387429590ffa73fc2fafc577ef46f11","name":"@brad-jones/tsos","dist-tags":{"latest":"1.3.1"},"versions":{"1.0.0":{"name":"@brad-jones/tsos","version":"1.0.0","author":{"name":"Brad Jones","email":"brad@bjc.id.au"},"license":"MIT","_id":"@brad-jones/tsos@1.0.0","maintainers":[{"name":"gears","email":"brad@bjc.id.au"}],"homepage":"https://github.com/brad-jones/tsos#readme","bugs":{"url":"https://github.com/brad-jones/tsos/issues"},"dist":{"shasum":"ec996d30bfa33676a6ea5a3e70f4a7d867a844d5","tarball":"https://registry.npmjs.org/@brad-jones/tsos/-/tsos-1.0.0.tgz","integrity":"sha512-12/8M/vf4l5XuwMyBdIzcfWxRxSyudlLMekHSxIjJRWnyB1GnB/8erjnm8Vtvft8I3w1PuxIcnYYMjyGSL3KeA==","signatures":[{"sig":"MEYCIQD0wcTo4XqyBPhARhM25uhK88qwTR6/HDf458ycPQbv3QIhALicj8ajOetNItH1CQjF1EcEC2Ge5nXTUB2T0B3dRfyY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"jest":{"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"moduleFileExtensions":["ts","tsx","js"]},"main":"./dist/tsos.js","_from":".","types":"./dist/tsos.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"_shasum":"ec996d30bfa33676a6ea5a3e70f4a7d867a844d5","engines":{"node":">=7.0.0"},"gitHead":"5d694b4a93fd344d7c24fb486d37b690bf79dac0","scripts":{"test":"yarn run build && jest","build":"rm -rf ./dist && ./node_modules/typescript/bin/tsc --outDir ./dist","semantic-release":"semantic-release pre && npm publish --access public && semantic-release post"},"_npmUser":{"name":"gears","email":"brad@bjc.id.au"},"repository":{"url":"git+https://github.com/brad-jones/tsos.git","type":"git"},"_npmVersion":"4.1.2","description":"TypeScript on Steroids","_nodeVersion":"7.7.4","dependencies":{"tslib":"^1.6.0","tspoon":"^1.0.354","tsconfig":"^6.0.0","@types/node":"^7.0.10","require-dir":"^0.3.1","@types/source-map":"^0.5.0"},"devDependencies":{"jest":"^19.0.2","ts-jest":"^19.0.4","@types/jest":"^19.2.2","semantic-release":"^6.3.2","cz-conventional-changelog":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/tsos-1.0.0.tgz_1490439786536_0.7101144972257316","host":"packages-18-east.internal.npmjs.com"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.1.0":{"name":"@brad-jones/tsos","version":"1.1.0","author":{"name":"Brad Jones","email":"brad@bjc.id.au"},"license":"MIT","_id":"@brad-jones/tsos@1.1.0","maintainers":[{"name":"gears","email":"brad@bjc.id.au"}],"homepage":"https://github.com/brad-jones/tsos#readme","bugs":{"url":"https://github.com/brad-jones/tsos/issues"},"bin":{"tsos":"dist/tsnode/bin.js"},"dist":{"shasum":"fdf50addd0774da0819864ded1ef45852587a5e8","tarball":"https://registry.npmjs.org/@brad-jones/tsos/-/tsos-1.1.0.tgz","integrity":"sha512-4FCcuKk3TiucLK2hHLe8sfkbs6Izwa023RwDZ1Mn/LIlfwUxEURqyH+JygTntGh32ne3IBUCjUAy7qRdQwlKzA==","signatures":[{"sig":"MEUCIAxridxn5fIKKPBJsmuTgWEsDlKOGMzKqRyfUZyv7hIgAiEA0biMdnF1fXYzBYKACtN4Ro1G7hhWmXAGLtS/sh4PdOY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./dist/tsos.js","tsos":{"visitors":["tests/visitors/*.js"]},"_from":".","types":"./dist/tsos.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"_shasum":"fdf50addd0774da0819864ded1ef45852587a5e8","engines":{"node":">=7.0.0"},"gitHead":"fc77334f20329485a4ea471ff45056cacf30c3e4","scripts":{"test":"yarn run build && yarn run build-test && jest","build":"rm -rf ./dist && tsc --outDir ./dist","build-test":"tsc -p ./tests","semantic-release":"semantic-release pre && npm publish --access public && semantic-release post"},"_npmUser":{"name":"gears","email":"brad@bjc.id.au"},"repository":{"url":"git+https://github.com/brad-jones/tsos.git","type":"git"},"_npmVersion":"4.1.2","description":"TypeScript on Steroids","_nodeVersion":"7.7.4","dependencies":{"yn":"^1.2.0","diff":"^3.2.0","tslib":"^1.6.0","crypto":"^0.0.3","module":"^1.2.5","v8flags":"^2.0.11","tsconfig":"^6.0.0","make-error":"^1.2.3","typescript":"^2.2.1","@types/diff":"^0.0.31","@types/node":"^7.0.10","require-dir":"^0.3.1","require-glob":"^3.2.0","@types/source-map":"^0.5.0","@brad-jones/tspoon":"^1.0.357"},"devDependencies":{"jest":"^19.0.2","shelljs":"^0.7.7","@types/jest":"^19.2.2","semantic-release":"^6.3.2","cz-conventional-changelog":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/tsos-1.1.0.tgz_1490610657245_0.9471337175928056","host":"packages-12-west.internal.npmjs.com"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.2.0":{"name":"@brad-jones/tsos","version":"1.2.0","author":{"name":"Brad Jones","email":"brad@bjc.id.au"},"license":"MIT","_id":"@brad-jones/tsos@1.2.0","maintainers":[{"name":"gears","email":"brad@bjc.id.au"}],"homepage":"https://github.com/brad-jones/tsos#readme","bugs":{"url":"https://github.com/brad-jones/tsos/issues"},"bin":{"tsos":"dist/tsnode/bin.js"},"dist":{"shasum":"f8c6f502653f95921622e9da45a659a08423d354","tarball":"https://registry.npmjs.org/@brad-jones/tsos/-/tsos-1.2.0.tgz","integrity":"sha512-oPQThGZROBkTfq1+ok20OlDoDJ+miciQ9uGUFJLCigOG17s27aJkV6Gdw2+fmux/4e8gICPk3SD0jH5NU+HsOA==","signatures":[{"sig":"MEQCIA6dYjTvCHvq7hOUM++Wzpn8SOH2dOl3Pv4Asx6F7kUaAiAfBTgn6DqaIFm2cy1Sed1Z1jPuzU+wiZh2h2DKTQKecw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./dist/tsos.js","tsos":{"visitors":["tests/visitors/*.js"]},"_from":".","types":"./dist/tsos.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"_shasum":"f8c6f502653f95921622e9da45a659a08423d354","engines":{"node":">=7.0.0"},"gitHead":"6ec18c6df1047d9779df8bd65909d12f2e13df24","scripts":{"test":"yarn run build && yarn run build-test && jest","build":"rm -rf ./dist && tsc --outDir ./dist","build-test":"rm -rf ./tests/output && tsc -p ./tests","semantic-release":"semantic-release pre && npm publish --access public && semantic-release post"},"_npmUser":{"name":"gears","email":"brad@bjc.id.au"},"repository":{"url":"git+https://github.com/brad-jones/tsos.git","type":"git"},"_npmVersion":"4.1.2","description":"TypeScript on Steroids","_nodeVersion":"7.7.4","dependencies":{"yn":"^1.2.0","diff":"^3.2.0","tslib":"^1.6.0","crypto":"^0.0.3","module":"^1.2.5","v8flags":"^2.0.11","tsconfig":"^6.0.0","make-error":"^1.2.3","typescript":"^2.2.1","@types/diff":"^0.0.31","@types/node":"^7.0.10","require-dir":"^0.3.1","require-glob":"^3.2.0","@types/source-map":"^0.5.0","@brad-jones/tspoon":"^1.0.357"},"devDependencies":{"jest":"^19.0.2","rollup":"^0.41.6","shelljs":"^0.7.7","@types/jest":"^19.2.2","semantic-release":"^6.3.2","rollup-pluginutils":"^2.0.1","cz-conventional-changelog":"^2.0.0"},"peerDependencies":{"rollup":"^0.41.6","rollup-pluginutils":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/tsos-1.2.0.tgz_1490666934576_0.15602785116061568","host":"packages-12-west.internal.npmjs.com"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.3.0":{"name":"@brad-jones/tsos","version":"1.3.0","author":{"name":"Brad Jones","email":"brad@bjc.id.au"},"license":"MIT","_id":"@brad-jones/tsos@1.3.0","maintainers":[{"name":"gears","email":"brad@bjc.id.au"}],"homepage":"https://github.com/brad-jones/tsos#readme","bugs":{"url":"https://github.com/brad-jones/tsos/issues"},"bin":{"tsos":"dist/tsnode/bin.js"},"dist":{"shasum":"3260d2a6b44e0b16c41336830a7b3ded16907ec9","tarball":"https://registry.npmjs.org/@brad-jones/tsos/-/tsos-1.3.0.tgz","integrity":"sha512-TTjR/NjPvJxV6lRAjhDjpBushw/FwhKbG6707JeTAaHpcLtphgF/dPPYL3TXT6LqNmukn+Tq68d26EeHe57JDw==","signatures":[{"sig":"MEUCIQCn9xdMKST1YlfokUzannbL5Qt3rtxSwHhftKMWDfMw3AIgDCv8IXgCjWOgS6ILCJytPu7lqTkblom28pOFZD2M6QY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./dist/tsos.js","tsos":{"visitors":["dist/visitors/*.js"]},"_from":".","types":"./dist/tsos.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"_shasum":"3260d2a6b44e0b16c41336830a7b3ded16907ec9","engines":{"node":">=7.0.0"},"gitHead":"1e2840b19a018c01db5c22d5e04757a4345e9b74","scripts":{"test":"yarn run build && yarn run build-test && jest","build":"rm -rf ./dist && tsc --outDir ./dist","build-test":"rm -rf ./tests/output && tsc -p ./tests","semantic-release":"semantic-release pre && npm publish --access public && semantic-release post"},"_npmUser":{"name":"gears","email":"brad@bjc.id.au"},"repository":{"url":"git+https://github.com/brad-jones/tsos.git","type":"git"},"_npmVersion":"4.1.2","description":"TypeScript on Steroids","_nodeVersion":"7.7.4","dependencies":{"yn":"^1.2.0","diff":"^3.2.0","tslib":"^1.6.0","crypto":"^0.0.3","module":"^1.2.5","v8flags":"^2.0.11","tsconfig":"^6.0.0","make-error":"^1.2.3","typescript":"^2.2.1","@types/diff":"^0.0.31","@types/node":"^7.0.10","require-dir":"^0.3.1","require-glob":"^3.2.0","@types/source-map":"^0.5.0","@brad-jones/tspoon":"^1.0.357"},"devDependencies":{"jest":"^19.0.2","rollup":"^0.41.6","shelljs":"^0.7.7","@types/jest":"^19.2.2","semantic-release":"^6.3.2","rollup-pluginutils":"^2.0.1","cz-conventional-changelog":"^2.0.0"},"peerDependencies":{"rollup":"^0.41.6","rollup-pluginutils":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/tsos-1.3.0.tgz_1490675874768_0.8990961420349777","host":"packages-18-east.internal.npmjs.com"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.3.1":{"name":"@brad-jones/tsos","version":"1.3.1","author":{"name":"Brad Jones","email":"brad@bjc.id.au"},"license":"MIT","_id":"@brad-jones/tsos@1.3.1","maintainers":[{"name":"gears","email":"brad@bjc.id.au"}],"homepage":"https://github.com/brad-jones/tsos#readme","bugs":{"url":"https://github.com/brad-jones/tsos/issues"},"bin":{"tsos":"dist/tsnode/bin.js"},"dist":{"shasum":"a2d8b84e368de6b9849b28279cb70309061e6cbb","tarball":"https://registry.npmjs.org/@brad-jones/tsos/-/tsos-1.3.1.tgz","integrity":"sha512-TxM1Yt+AoS4JnghXS3Phrh3jOx4Z9owBk7gz8wPOqYDgMBs4QgpwMX+WG+hx8uDSBNiq3LlPgVuXyn5Ge/u+mw==","signatures":[{"sig":"MEUCIQCqXBiXfQIZ03WH/Bh4l30FJC2HROo5x5vVyN7dIz8NagIgbSGad205R0/H9C4v818a/PI0eaRuhOuRJBRtXu7cr/M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./dist/tsos.js","_from":".","types":"./dist/tsos.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"_shasum":"a2d8b84e368de6b9849b28279cb70309061e6cbb","engines":{"node":">=7.0.0"},"gitHead":"ae03395a8929ced0ccc91812831ada518fbe6e05","scripts":{"test":"yarn run build && yarn run build-test && jest","build":"rm -rf ./dist && tsc --outDir ./dist","build-test":"rm -rf ./tests/output && tsc -p ./tests","semantic-release":"semantic-release pre && npm publish --access public && semantic-release post"},"_npmUser":{"name":"gears","email":"brad@bjc.id.au"},"repository":{"url":"git+https://github.com/brad-jones/tsos.git","type":"git"},"_npmVersion":"4.1.2","description":"TypeScript on Steroids","_nodeVersion":"7.7.4","dependencies":{"yn":"^1.2.0","diff":"^3.2.0","tslib":"^1.6.0","crypto":"^0.0.3","module":"^1.2.5","v8flags":"^2.0.11","tsconfig":"^6.0.0","make-error":"^1.2.3","typescript":"^2.2.1","@types/diff":"^0.0.31","@types/node":"^7.0.10","require-dir":"^0.3.1","require-glob":"^3.2.0","@types/source-map":"^0.5.0","@brad-jones/tspoon":"^1.0.357"},"devDependencies":{"jest":"^19.0.2","rollup":"^0.41.6","shelljs":"^0.7.7","@types/jest":"^19.2.2","semantic-release":"^6.3.2","rollup-pluginutils":"^2.0.1","cz-conventional-changelog":"^2.0.0"},"peerDependencies":{"rollup":"^0.41.6","rollup-pluginutils":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/tsos-1.3.1.tgz_1490679217651_0.6806582591962069","host":"packages-18-east.internal.npmjs.com"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2017-03-25T11:03:07.105Z","modified":"2025-01-22T07:50:48.885Z","1.0.0":"2017-03-25T11:03:07.105Z","1.1.0":"2017-03-27T10:30:59.139Z","1.2.0":"2017-03-28T02:08:56.661Z","1.3.0":"2017-03-28T04:37:55.362Z","1.3.1":"2017-03-28T05:33:38.234Z"},"bugs":{"url":"https://github.com/brad-jones/tsos/issues"},"author":{"name":"Brad Jones","email":"brad@bjc.id.au"},"license":"MIT","homepage":"https://github.com/brad-jones/tsos#readme","repository":{"url":"git+https://github.com/brad-jones/tsos.git","type":"git"},"description":"TypeScript on Steroids","maintainers":[{"name":"gears","email":"brad@bjc.id.au"}],"readme":"# TypeScript on Steroids\n[![Build Status](https://travis-ci.org/brad-jones/tsos.svg?branch=master)](https://travis-ci.org/brad-jones/tsos)\n[![Coverage Status](https://coveralls.io/repos/github/brad-jones/tsos/badge.svg?branch=master)](https://coveralls.io/github/brad-jones/tsos?branch=master)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![TypeScript](https://badges.frapsoft.com/typescript/code/typescript.svg?v=101)](https://github.com/ellerbrock/typescript-badges/)\n\n__So if TypeScript is JavaScript on Steroids, this project is, well you get the idea...__\n\n## No really what is this?\nIn short this provides, [ts-node](https://github.com/TypeStrong/ts-node) +\n[tspoon](https://github.com/wix/tspoon) in one executable but it is so much more.\n\nTypeScript is awesome however it does lack some features from more established\nprogramming languages. Reflection is one such feature that I am always wishing\nwas more powerful. This is not so much a TypeScript issue, it's more to do with\nthe fact that TypeScript is just JavaScript and Js is very poor in this area.\n\nWith [tspoon](https://github.com/wix/tspoon) we can effectively extend the\nTypeScript language to support some of these concepts. For example automatically\napplying a `@decorator` to every class so that _design time_ meta data is output\nby the TypeScript transpiler.\n\nBut now we have non portable TypeScript source code. This project aims to solve\nthis problem by making _tspoon vistors_ shareable between TypeScript code bases.\n\n## Reflection vs Transpilation\nIntially I started this project with the idea of sharing my existing\n_tspoon vistors_ that make reflection more powerful in TypeScript.\n\nBut then I got thinking that there are situations that instead of using a\nreflective model to build some dynamic object at run time. Perhaps we can get\nthe same end result by simply applying more transpilations.\n\nSee this example:\n\n```ts\nimport 'reflect-metadata';\nimport * as commander from 'commander';\nimport { paramCase } from 'change-case';\n\n// This class represents our commander cli application.\nclass Foo\n{\n    public fooBar(someValue: string)\n    {\n        console.log('fooBar says: ' + someValue);\n    }\n    \n    public barFoo()\n    {\n        console.log('Hello from barFoo');\n    }\n    \n    public barFooQuz()\n    {\n        console.log('Hello from barFooQuz');\n    }\n}\n\n// This code uses reflection to configure commander for us.\nlet foo = new Foo;\nfor (let name of Object.getOwnPropertyNames(Object.getPrototypeOf(foo)))\n{\n    let method = foo[name];\n    \n    // Ignore the constructor\n    if (!(method instanceof Function) || method === Foo) continue;\n    \n    commander\n    .command(paramCase(name).replace('-', ':'))\n    //.description( TODO: We could use a decorator to provide this. )\n    .action(method);\n}\n\ncommander.parse(process.argv);\n```\n\nSo using some imagination, it wouldn't be too much of a stretch to see how one\nmight transpile the typescript class directly into commander calls.\n\nThinking about this concept further one might end up with TypeScript packages,\nsuch as an Inversion of Control container, that implement some of their logic at\nruntime as well as at transpilation time through tspoon vistors.\n","readmeFilename":"README.md"}