{"_id":"@creditkarma/thrift-server-express","_rev":"174-dd86087b7fe83ff5a82e5f0130b832d1","name":"@creditkarma/thrift-server-express","description":"Express server middleware for the Apache Thrift protocol","dist-tags":{"latest":"1.0.4","next":"1.1.0-alpha.1","fix":"0.6.35"},"versions":{"0.0.12":{"name":"@creditkarma/thrift-server-express","version":"0.0.12","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist"],"scripts":{"prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && tsc","clean":"rimraf ./dist","prepublish":"npm run build; rimraf ./dist/tests","watch":"npm run build -- --watch","start":"npm run build && node dist/server.js","pretest":"npm run build","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated; thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.12","thrift":"^0.10.0","typescript":"^2.5.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.23","@types/rimraf":"0.0.28","@types/thrift":"^0.10.1","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.12","_shasum":"a9693ae946975258c7a8657ee2c03699fa2dd0f5","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"a9693ae946975258c7a8657ee2c03699fa2dd0f5","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.12.tgz","integrity":"sha512-NnNmoTMb4+3wYyfJkXKDoLLmAWtRTTerCQFwvSuG7SWfIiJ7nKLWbpRYB5NExDuDeLSh/T08tT35STtwLmC8mw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiBqn9NXTFvgcCc7xhT0e0aYjiqiE9GsTrJ0s+NhEeKwIgbY4JGSIch2T0wIKiqqWh+ZYAVOqcJmGnhIwUD84dTT8="}]},"maintainers":[{"name":"nnanceck","email":"nick.nance@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.12.tgz_1508172750631_0.49607739015482366"},"directories":{}},"0.0.13":{"name":"@creditkarma/thrift-server-express","version":"0.0.13","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist"],"scripts":{"prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && tsc","clean":"rimraf ./dist","prepublish":"npm run build && rimraf ./dist/tests","watch":"npm run build -- --watch","start":"npm run build && node dist/server.js","pretest":"npm run build","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.13","thrift":"^0.10.0","typescript":"^2.5.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.23","@types/rimraf":"0.0.28","@types/thrift":"^0.10.1","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.13","_shasum":"1b36a74a059f67aa0228966982d1b7a8590fb2bf","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"1b36a74a059f67aa0228966982d1b7a8590fb2bf","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.13.tgz","integrity":"sha512-S7BRRxiggOh/ZbTHVcXirod/bt6cuiAcHUbSqPp7gXCv7GarBbDnODntyzaGxj7VCtgbJsEdNrr4z80Y6yAG8w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCM6KCR1mUOjtY7JhyrI2IT4VCPpi8Au8aJtur7kMaLqwIgLITv/TW0ld3bBgOVj+uN7CUenXZp/VeGCCrFhS54R6E="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.13.tgz_1508174442200_0.6341260487679392"},"directories":{}},"0.0.14":{"name":"@creditkarma/thrift-server-express","version":"0.0.14","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist"],"scripts":{"prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","prepublish":"npm run build && rimraf ./dist/tests","watch":"npm run build -- --watch","start":"npm run build && node dist/server.js","pretest":"npm run build","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.14","thrift":"^0.10.0","typescript":"^2.5.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.14","_shasum":"df7b485c829ab68a3dc20ad7a3b91ee09eeed225","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"df7b485c829ab68a3dc20ad7a3b91ee09eeed225","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.14.tgz","integrity":"sha512-pZ5tMsxd0lR0aVPAgKs1XCE0IVdSWBLevC52krN7SI/cbUPcnCpUPHl1LIDu9ANaoBs5p3iB7ny1cz67r1bF1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2o4r8Q4lAmqyQKgBW5GmafKGOUMYuUme2cAqXoLNOhAIhAJxg3tWypX3d6jV1u9EvSUqZRCeUejFgmHkuOLpTqlsG"}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.14.tgz_1508177577249_0.4276742129586637"},"directories":{}},"0.0.15":{"name":"@creditkarma/thrift-server-express","version":"0.0.15","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist"],"scripts":{"prepublish":"npm run build && rimraf ./dist/tests","prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run build -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.15","thrift":"^0.10.0","typescript":"^2.5.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.15","_shasum":"62c6921563173ea23086118f3c75a8e21a10d844","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"62c6921563173ea23086118f3c75a8e21a10d844","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.15.tgz","integrity":"sha512-yGJewSqmEhGqV6YMiPYaDlfuidoT4J717dZrSIGydpFGACo0fN+lfhW3B8mpWzlw8ccabdwHfwBHxfVWV9WFjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICkiAe9DlvETJPjyxi8jK7SqH0++mGIIVvuVdgesfNssAiEAtB+iAnht1eABABz+7YQn9hsCNjio/FXtVn2g8H2nY3E="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.15.tgz_1508180961018_0.2175199759658426"},"directories":{}},"0.0.16":{"name":"@creditkarma/thrift-server-express","version":"0.0.16","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist"],"scripts":{"prepublish":"npm run build && rimraf ./dist/tests","prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run build -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'","release":"npm publish --access public"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.16","thrift":"^0.10.0","typescript":"^2.5.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.16","_shasum":"9990164135a9fd8484425d6091b6107cf026fa98","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"9990164135a9fd8484425d6091b6107cf026fa98","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.16.tgz","integrity":"sha512-i3kSLvN4eFkOhxqqbHRWx9PRRlfrf2y0x3TGeToUOKrw2U3rvcl+v9yVSOBx225P663YI/1yZrknzttEPjH3Hw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRpQgsinAadGgMSulyTO1BJ7Ex4RULHb1JsCN9DSlsBAIgPkcAMnWlLG2dDV42DT75tjxd00ebrQr7Uz9VRNG11DI="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.16.tgz_1508181233609_0.5885333602782339"},"directories":{}},"0.0.17":{"name":"@creditkarma/thrift-server-express","version":"0.0.17","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist"],"scripts":{"prepublish":"rimraf ./dist/tests","prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run build -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'","release":"npm publish --access public"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.17","thrift":"^0.10.0","typescript":"^2.5.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.17","_shasum":"2ac47debde4ae1201fc8662ede530f75d7e6f82a","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"2ac47debde4ae1201fc8662ede530f75d7e6f82a","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.17.tgz","integrity":"sha512-w070H2Tx9YqEq9haD577Qo6vWmmRPNmnRZRDzm2nk1o9SEUkxOIcQNXNpAYzqYCBFLrotHmWU2r4H448T0m4jA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICi4erxrCt4gjCEt63sT9MUHMHLOnTRQETETnTXoQLuFAiEAyPjnKr2f4UpgFEAOEmgBQ4bv7Yvm1sqUxcufOWaqFOw="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.17.tgz_1508181741756_0.33866997878067195"},"directories":{}},"0.0.18":{"name":"@creditkarma/thrift-server-express","version":"0.0.18","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist"],"scripts":{"prepublish":"rimraf ./dist/tests","prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run build -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'","release":"ls . && npm publish --access public"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.18","thrift":"^0.10.0","typescript":"^2.5.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.18","_shasum":"97df98cf77c8226abf1a5f17aa236e449a7b4c6e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"97df98cf77c8226abf1a5f17aa236e449a7b4c6e","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.18.tgz","integrity":"sha512-4MArGvclByIxAehiUxeiDUaLO44cBLNAQtLDRM6fgjea6s24g9qAfvHpWTfvZOhi6dprDrvp9SLo0BYWt/eVFw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJt6M02HjeUxD8TxjO6+UEdcZwwLAqRGtOqMyJaTz9cwIhAIyzeH7nPK300HFvsOzHGnDiYDFVb0euJnyxfKq8u4kJ"}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.18.tgz_1508182492844_0.5413927501067519"},"directories":{}},"0.0.19":{"name":"@creditkarma/thrift-server-express","version":"0.0.19","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist"],"scripts":{"prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run build -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'","release":"ls -a . && npm publish --access public"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.19","thrift":"^0.10.0","typescript":"^2.5.3"},"peerDependencies":{"express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.19","_shasum":"aebb9943413789d7ec55f3aff345da27919b0914","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"aebb9943413789d7ec55f3aff345da27919b0914","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.19.tgz","integrity":"sha512-d0aNFytFS1zs6GiM/tppIEvtnqQaNiDYz49WmUKq+F0Spv1/hqMMS+TTmIK2h1UyXzqdUKu3743ZTY2TASakhQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBGQ7FSLLAKRA0ltZb7U4SUuEy0LjUM+IXXQE6BwZb0lAiAxdohobdxZOQmxzKJoiP1fhWDgLMRrCJuX3vMxUflo8w=="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.19.tgz_1508183107262_0.4005993129685521"},"directories":{}},"0.0.20":{"name":"@creditkarma/thrift-server-express","version":"0.0.20","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist"],"scripts":{"prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run build -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'","release":"ls -a ./dist && npm publish . --access public"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.20","thrift":"^0.10.0","typescript":"^2.5.3"},"peerDependencies":{"express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.20","_shasum":"6fc727e4c50dd614cd7d75523f7549fbbd2dd4f4","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"6fc727e4c50dd614cd7d75523f7549fbbd2dd4f4","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.20.tgz","integrity":"sha512-qnUNa1j0P3c6Q1gy4RyyMfiJm06c5NVIdNCls3mijsQnT5pIgbHwgO24wzz0MDDkNV2qmIVDJKJ622C1GeqmCQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDi/ugRtYG1uiMXStjY+Y4rW5pV5Of7FJzp4GOZ7HXm/gIhAKsKfQYvi5NgiS0Tsxs9GFJ71zIY3b6pGr3rGR/QNlee"}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.20.tgz_1508184053837_0.4374008900485933"},"directories":{}},"0.0.21":{"name":"@creditkarma/thrift-server-express","version":"0.0.21","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist"],"scripts":{"prepublish":"rimraf ./dist/tests","prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run build -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'","release":"ls -a ./dist/main && npm publish . --access public"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.21","thrift":"^0.10.0","typescript":"^2.5.3"},"peerDependencies":{"express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.21","_shasum":"0411d49f1556ff03ad0226f82c37cae7ffef9e06","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"0411d49f1556ff03ad0226f82c37cae7ffef9e06","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.21.tgz","integrity":"sha512-J+I7VWMA9CgDpbeC/M92Zf65JSuXEOhxlVFLDT/uxkPbv+jsACSqRjhJDKqF8Aqs7hLApu5oZYdvpNyj6wYNDg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/Z8eMNn0qoA1jA9VHiuDoS+sOKIZjzozcc/GRWxGMFAiEA++LTGe4vN4ru6Jw6O5ZW2ygVIKo2C5h3NnoUirCd7is="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.21.tgz_1508185426227_0.4377459881361574"},"directories":{}},"0.0.22":{"name":"@creditkarma/thrift-server-express","version":"0.0.22","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist/main"],"scripts":{"prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run build -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'","release":"ls -a ./dist/main && npm publish . --access public"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.22","thrift":"^0.10.0","typescript":"^2.5.3"},"peerDependencies":{"express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.22","_shasum":"61681ca747d4031676be9bc57cd2b58b920e23d3","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"61681ca747d4031676be9bc57cd2b58b920e23d3","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.22.tgz","integrity":"sha512-xkkwGWZMRfD1aLH0pJAGV8d4jGO8K1WqRSxDrx2U+KRj8iSX0ezjS7jAzsqhwS48ZRsEFEUCgI+oTeVbyMlUsw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEd9vW+pmBkwRsk82pW3a3cw11/j+NlC2dZBhGGHu9DtAiEAtvbaIjC2oAlQvHRSc+i1dbjIgWww2Q7/N7g2xFs1Y50="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.22.tgz_1508186058278_0.12667269096709788"},"directories":{}},"0.0.23":{"name":"@creditkarma/thrift-server-express","version":"0.0.23","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist/main"],"scripts":{"prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run build -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'","release:publish":"ls -a ./dist/main && npm publish . --access public"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.23","thrift":"^0.10.0","typescript":"^2.5.3"},"peerDependencies":{"express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.23","_shasum":"d67996f30fd5fa6b1b2862d1f387bc55ce9e0321","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"d67996f30fd5fa6b1b2862d1f387bc55ce9e0321","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.23.tgz","integrity":"sha512-2+RfHFDAa9js5D08idsIVyCFhjE2dPF4RxWKAq2iEDhXLCMJAOBXu2M4jvWBrZeDcVYxAiISRc7P4wJpCkAqxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGIgQTnKA0rdwpfqyn9I5AW/jRXuMbDJlsrHu9JH+RRQIhAJQHTBij9Q+GJbEJ/Rtyliofo1/JN80N8Gfz2UK0N3Xc"}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.23.tgz_1508187045462_0.8105747329536825"},"directories":{}},"0.0.24":{"name":"@creditkarma/thrift-server-express","version":"0.0.24","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist/main"],"scripts":{"prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run build -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.24","thrift":"^0.10.0","typescript":"^2.5.3"},"peerDependencies":{"express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.24","_shasum":"b7f46a667d27defca51011298811ef99be99b149","_from":"packages/thrift-server-express","_resolved":"file:packages/thrift-server-express","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"b7f46a667d27defca51011298811ef99be99b149","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.24.tgz","integrity":"sha512-lpwqgBomOtAD8Klpz3clnX1TKwVB4u7POnzc94MDXfcb68Tb4Hie8OEbkf16SMJYm5MMaRG8UJTaZI3LJ9NjKQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHcAsYhG+e+kztEMoQOGm07i4Fw1Gv2xwhehR69S4LPGAiEA7+JU2pf8NIG6kxIb5Q4MV46JTGnfTF8dqyUQ99VeQI8="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.24.tgz_1508187693013_0.05780372326262295"},"directories":{}},"0.0.27":{"name":"@creditkarma/thrift-server-express","version":"0.0.27","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist/main"],"scripts":{"prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run compile -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.27","thrift":"^0.10.0","typescript":"^2.5.3"},"peerDependencies":{"express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.27","_shasum":"c827e0461faf60afef4b2a1e4db5002e2620af19","_from":"packages/thrift-server-express","_resolved":"file:packages/thrift-server-express","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"c827e0461faf60afef4b2a1e4db5002e2620af19","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.27.tgz","integrity":"sha512-tU3C/Q9QmdUruGX7gxWM79V/iCEA4yoknmDxYNToCP/OVohjrz5PRUeLBwy72MGFziDzf1VGWo7e30rYVyyJgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUux5fd4DOV90XAephu+oeb9739ismixQJG/93d1XXmwIhAJONsBwUPXZrPy51iyAl0QMCBq8zWCsp+xmqQ5szHwsR"}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.27.tgz_1508189110143_0.7118840175680816"},"directories":{}},"0.0.28":{"name":"@creditkarma/thrift-server-express","version":"0.0.28","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist/main"],"scripts":{"prepublish":"npm run build","prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run compile -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.28","thrift":"^0.10.0","typescript":"^2.5.3"},"peerDependencies":{"express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.28","_shasum":"237d0a27686059e8943466f80e71895f92dac455","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"237d0a27686059e8943466f80e71895f92dac455","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.28.tgz","integrity":"sha512-XeRF/CEloZkqp4zFALksI5WyTK35DCttpa/jIPQZDw/5+SdrqR0dIT0djYRmBQgzml77gQb1lq/mk3f8xOHuQg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEi0rVM+7i7mpkVgpWpSDFakathnoZpmIsow0OsA2b1xAiEAyxb+nmZhvqodxQwmP23904n2gHTLBVCHItJuF4vZS6s="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.28.tgz_1508193362687_0.6013150475919247"},"directories":{}},"0.0.30":{"name":"@creditkarma/thrift-server-express","version":"0.0.30","description":"Thrift core library in TypeScript","main":"./dist/main/index.js","types":"./dist/main/index.d.ts","files":["./dist/main"],"scripts":{"prepublish":"npm run build && ls .","prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run compile -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.30","thrift":"^0.10.0","typescript":"^2.5.3"},"peerDependencies":{"express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.30","_shasum":"7b72e01d5df42a65fe692cc9abd1b1260532c9fc","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"7b72e01d5df42a65fe692cc9abd1b1260532c9fc","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.30.tgz","integrity":"sha512-3WuEN0EYQy/rpsEHyL+m86mGQiXo2YYyKy+Dl4R4Itm+QIvkJFV1ElXlNOlk4FSirEn88YkSngEHO/fJajnAPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsE3uEH7SbWHMKdOInVSxCbztvEEhyzQIz0qJb5x25eAIhAIIdlLgoRsmxUMq/Tk8Ney8HC0HpiyWGTwkBsM1m1rhL"}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.30.tgz_1508194642033_0.37999435793608427"},"directories":{}},"0.0.31":{"name":"@creditkarma/thrift-server-express","version":"0.0.31","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"scripts":{"prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && npm run compile","clean":"rimraf ./dist","compile":"tsc","watch":"npm run compile -- --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.31","thrift":"^0.10.0","typescript":"^2.5.3"},"peerDependencies":{"express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/rimraf":"0.0.28","@types/thrift":"^0.10.3","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.31","_shasum":"85cfa45610c799a1810a1d28a5e92523f443ea94","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"85cfa45610c799a1810a1d28a5e92523f443ea94","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.31.tgz","integrity":"sha512-mtBr3E8U3Yb+4KnYvZBaQVnoU4pGPzYehYMhSFQHO7nJWe6lBTCehxyhvOgpZoInveYfv83Oe2XuiyTedoPgJw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFNdO2wOVYUiB7vKwzlSVkXx3YpOiIufccHcKbFaB1wnAiEArjfdVTFtUZp8bLcaYSvDIukP9RUwQKwJwcp5Dx39CuI="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.31.tgz_1508197714863_0.37558832205832005"},"directories":{}},"0.0.32":{"name":"@creditkarma/thrift-server-express","version":"0.0.32","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"scripts":{"prepublish":"npm run build","prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && tsc","clean":"rimraf ./dist","watch":"tsc --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.32","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","@types/node":"^8.0.31","@types/node-int64":"^0.4.29","@types/q":"^1.0.5","@types/thrift":"^0.10.3","express":"^4.15.3","thrift":"^0.10.0","typescript":"^2.5.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.7","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/lab":"^11.1.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.32","_shasum":"8201cb5ef07d0c9ab9ba7ff04a619777de58ad72","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"8201cb5ef07d0c9ab9ba7ff04a619777de58ad72","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.32.tgz","integrity":"sha512-zO1Ub++fhhXmJ60VidNu+B7NFiKwt+1mvgF3zNob80kYCkDfWoiIbzv3mmTJYVxNHpo9lzHWhZt0bPIxkYoerA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCq5qxZVPuawKZQNXU9MD4NwBxL+kTd/Ydv/LbazVR/kgIgXAGTxnRoweubFqdlNyX28QfAWFuWMhG9dgdAfQ9OH6I="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.32.tgz_1508258903364_0.278631204739213"},"directories":{}},"0.0.34":{"name":"@creditkarma/thrift-server-express","version":"0.0.34","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"scripts":{"prepublish":"npm run build","prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && tsc","clean":"rimraf ./dist","watch":"tsc --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.34","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","@types/node":"^8.0.31","@types/node-int64":"^0.4.29","@types/q":"^1.0.5","@types/thrift":"^0.10.3","express":"^4.15.3","thrift":"^0.10.0","typescript":"^2.5.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.13","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/lab":"^11.1.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.34","_shasum":"c7a575e5a0ccf444329fea783a669b8308d60257","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"c7a575e5a0ccf444329fea783a669b8308d60257","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.34.tgz","integrity":"sha512-E1QyWvtEpnQQvGstmxin4iJyIAcqbmHFh3HCHgp8eTC0BCpfFMKLtSaHkKYCXXgYZIws88fhcMm/L9WgRbgTDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBlbO7g/SHJMijOOwgY+1bq4whfjt8H4L5B06EuL/JFJAiEAzl24uGbmE4xfNws8X/637jqFH4CRiSR3KCM8iF0RtBE="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.34.tgz_1508453847523_0.5457717194221914"},"directories":{}},"0.0.35":{"name":"@creditkarma/thrift-server-express","version":"0.0.35","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"scripts":{"prepublish":"npm run build","prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && tsc","clean":"rimraf ./dist","watch":"tsc --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.35","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","@types/node":"^8.0.31","@types/node-int64":"^0.4.29","@types/q":"^1.0.5","@types/thrift":"^0.10.4","express":"^4.15.3","thrift":"^0.10.0","typescript":"^2.5.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.13","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/lab":"^11.1.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.35","_shasum":"0596c5e3f2d167429fdfcebc448968d5b8320b5f","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"0596c5e3f2d167429fdfcebc448968d5b8320b5f","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.35.tgz","integrity":"sha512-LDlfSLWPYh5pefCq3I9PczBloXajOR76TVa+AELkFrbo82/ThRQdyM48WRK0BbrOYvmRtqwOVvPUN648g8qFwg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChVcYO6Tf+pKwRYA6f8UxVrcfr8C2lbJnXWpC6od31CQIhAMdYPBtagn+iH1UTLei0Qu/Yz2qmsUbkBvDVkTdk9ZqU"}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.35.tgz_1508954042726_0.12819054978899658"},"directories":{}},"0.0.36":{"name":"@creditkarma/thrift-server-express","version":"0.0.36","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"scripts":{"prepublish":"npm run build","prebuild":"npm run test:codegen","build":"npm run clean && npm run lint && tsc","clean":"rimraf ./dist","watch":"tsc --watch","start":"npm run build && node dist/main/server.js","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.36","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","@types/node":"^8.0.31","@types/node-int64":"^0.4.29","@types/q":"^1.0.5","@types/thrift":"^0.10.4","express":"^4.15.3","thrift":"^0.10.0","typescript":"^2.5.3"},"devDependencies":{"@creditkarma/thrift-typescript":"^0.0.15","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/lab":"^11.1.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.36","_shasum":"5b2a444d98866d591d4a08362021c6e8df0aa5b1","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"5b2a444d98866d591d4a08362021c6e8df0aa5b1","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.36.tgz","integrity":"sha512-uF9Xbj7wh0uBmzcAUtwpKzqCJP5YRB5ViLF7Jn1O5vNFSLD9aj/rSURABdM3igsMFaGYuh1ueCeFtmyvjpE74g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrLkofiOqBghUiFZrNscGxZ5I81GofJADI3kQXDBpjlQIhAMvX03VeHNM3VY3/EaRidEqD9kIWp9vn1ZCVjF0wVReu"}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.36.tgz_1509661575226_0.822201537899673"},"directories":{}},"0.0.37":{"name":"@creditkarma/thrift-server-express","version":"0.0.37","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"scripts":{"clean":"rimraf ./dist","prepublish":"npm run build","build":"npm run clean && npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run test:codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","start":"npm run build && node dist/main/server.js","pretest":"npm run build:test","test":"npm run test:only --","test:codegen":"rimraf ./src/tests/generated && thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.0.37","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","@types/node":"^8.0.31","@types/thrift":"^0.10.5","express":"^4.15.3","thrift":"^0.10.0","typescript":"^2.6.1"},"devDependencies":{"@creditkarma/thrift-client":"^0.0.37","@creditkarma/thrift-typescript":"^0.0.16","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/lab":"^11.1.0","@types/node-int64":"^0.4.29","@types/q":"^1.0.5","@types/request":"^2.0.8","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1"},"_id":"@creditkarma/thrift-server-express@0.0.37","_shasum":"570d02e912e13b11f337b484e1e609ea046bc076","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"570d02e912e13b11f337b484e1e609ea046bc076","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.0.37.tgz","integrity":"sha512-FCOMRPjdJIUxnlTSO2g/RGdV4FLqNK5tDYTzgH6uN8EjA7uZsCaS9OhFQOkBs+wZa2V+J7h5XS0MWEONzPgNQw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwWvMxhSkjPNCGiUcjbt1LBJ1la3d7ssLd5mlOydeLTAIhAL1DfSRd7oB/UuASfc2dw6S6LNgv7h6SdGIDDfVFqDQn"}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.0.37.tgz_1511897483046_0.07725098077207804"},"directories":{}},"0.1.1":{"name":"@creditkarma/thrift-server-express","version":"0.1.1","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prepublish":"npm run build","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.1.1","@types/express":"^4.0.37","express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.1.1","@creditkarma/thrift-typescript":"^1.0.0","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/node-int64":"^0.4.29","@types/q":"^1.0.5","@types/request":"^2.0.8","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"^2.6.1"},"_id":"@creditkarma/thrift-server-express@0.1.1","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-lCrxqeu3mPGAQm0AedSLXIJR8Zb92j2gbMGTzbPU8uI4Llcg5GJaoZgiJSe1DdRKy+Ip4RP1lQCKgFmaW5y9tg==","shasum":"fda7cb58724d77a0aa0337dfc02d379794f9be08","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.1.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIATWFifk+Xg8gr25PB6R8ry0g2BQGJeYrIeA0VSZ3pI1AiBL5RGzKqLsPOlA9TScKZyBpyVKbSeckxc53E9mznDEyQ=="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.1.1.tgz_1512518563740_0.6981911186594516"},"directories":{}},"0.1.2":{"name":"@creditkarma/thrift-server-express","version":"0.1.2","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prepublish":"npm run build","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"dependencies":{"@creditkarma/thrift-server-core":"^0.1.2","@types/express":"^4.0.37","express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.1.2","@creditkarma/thrift-typescript":"^1.0.2","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/node-int64":"^0.4.29","@types/q":"^1.0.5","@types/request":"^2.0.8","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.15.3","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"^2.6.1"},"_id":"@creditkarma/thrift-server-express@0.1.2","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-tilfsMRYHSVtO9WciykjdzW5m5qt47ZZ7P5KjyefgrthGRodfShGkbftBBGG5GXgW4QCNXJN/1khQpNfU26xyg==","shasum":"80b370dfeec175ab58985c94646d54fe37584301","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.1.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvbwHBsjth+3pfGY7ltfysCLuMuguacciYAGreUl5JMQIgZne7t3Ds7KuRvgGA4UMGPuvNvKVA9c6/G0hf5B9uSI8="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.1.2.tgz_1512773032867_0.5581539645791054"},"directories":{}},"0.1.3":{"name":"@creditkarma/thrift-server-express","version":"0.1.3","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prepublish":"npm run build","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.1.3","@types/express":"^4.0.37"},"dependencies":{"express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.1.3","@creditkarma/thrift-server-core":"^0.1.3","@creditkarma/thrift-typescript":"^1.0.2","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.0.8","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"^2.6.1"},"_id":"@creditkarma/thrift-server-express@0.1.3","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-ByS4czbzePICAP5J7eFehDWEvLZT/XmWsN3Rk64kNPnDkEEO/wxSb7OPp9924ZeDZyvC4fCWaiqbTMXqG2HnIQ==","shasum":"5a5ce92b77d1070848533e6f7310b0438d184d21","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.1.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB7qjcv5zEBUgdfRJTkIvo+QAnrpjTbF5jSUB4ip0QbGAiEAkKDkyXHlFS6sUDxs8wKn34m40m4DtJoZvQNZLt2rIqE="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.1.3.tgz_1513031660830_0.4264223526697606"},"directories":{}},"0.2.0":{"name":"@creditkarma/thrift-server-express","version":"0.2.0","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prepublish":"npm run build","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.2.0","@types/express":"^4.0.37"},"dependencies":{"express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.2.0","@creditkarma/thrift-server-core":"^0.2.0","@creditkarma/thrift-typescript":"^1.0.2","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.0.8","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"^2.6.1"},"_id":"@creditkarma/thrift-server-express@0.2.0","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-z81wyVOxSUsiQC4KSL1eRc6TUE1DA02FFV4odVmCLewg6hz+ibCvmY2+tyqv9c+el9Nw7qT6uYmpv/kyyAtE0Q==","shasum":"59ede569f929382443ad160ebe02dc2ae974e444","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3w8XwO/zKfqTUEO/19aNwITAKlLj1sVEOXJNm1DNzLAiAkEEnsD6wBS90N/5YrqO9K7QskxV9PcluLpZjn/CIXIw=="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.2.0.tgz_1513666496395_0.3721357216127217"},"directories":{}},"0.3.3":{"name":"@creditkarma/thrift-server-express","version":"0.3.3","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prepublish":"npm run build","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"keywords":["Thrift","TypeScript"],"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.3.3","@types/express":"^4.0.37"},"dependencies":{"express":"^4.15.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.3.3","@creditkarma/thrift-server-core":"^0.3.3","@creditkarma/thrift-typescript":"^1.0.2","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.0.8","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"^2.6.1"},"_id":"@creditkarma/thrift-server-express@0.3.3","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-wTPVoI3hupxyIIabKKyYz8N6/p8YpCkA5C6DR+J93qTW8RdzNqtIuTgKl6WAE2CFluTRv53a5IQELG19pwU3ZQ==","shasum":"e607db9f2c204dbf78a58f41829a7cfc4dceabd5","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.3.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDQMej1/SRjucqWQOO0xqgvx+jWN4UJFQ2BeQJbULdbZAiB6UzdZMf/Xw8TQIBRE/vxjzpCBvUh/1xKEcfV7dCPrtg=="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.3.3.tgz_1514919680299_0.1516817535739392"},"directories":{}},"0.3.5":{"name":"@creditkarma/thrift-server-express","version":"0.3.5","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["Thrift","Express","TypeScript","RPC"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prepublish":"npm run build","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.3.5","@types/express":"^4.0.37","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.3.5","@creditkarma/thrift-server-core":"^0.3.5","@creditkarma/thrift-typescript":"^1.0.2","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.0.8","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"^2.6.2"},"_id":"@creditkarma/thrift-server-express@0.3.5","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-ZFFk+fshBNxkNpBaqOyU3GsLpdrSUCngt+ExPSatUFcgvKk+vcQWRejMQR4jYuTssO7sZu8g5JngPUXGWPkbbg==","shasum":"5a35176eb8372c3363293736ec692ad3aaa7ed80","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.3.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkU3W0x1O1iZ3NrfV216iZIkNam55u587gfgp/uVHeHAIgSi/z8pVjNMWPLtwuja5+9dbGN7eNke5U/rNHSVg4aOg="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.3.5.tgz_1515718736105_0.3048194714356214"},"directories":{}},"0.3.6":{"name":"@creditkarma/thrift-server-express","version":"0.3.6","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["Thrift","Express","TypeScript","RPC"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prepublish":"npm run build","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.3.6","@types/express":"^4.0.37","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.3.6","@creditkarma/thrift-server-core":"^0.3.6","@creditkarma/thrift-typescript":"^1.0.2","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.0.8","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"^2.6.2"},"_id":"@creditkarma/thrift-server-express@0.3.6","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-R2Qd1QgfNeceJSrIZWp3tEy1c7zek/+x+j/Mk4ptuoWw16bVzTQcdFECU5vzdNEcxod7/BgFxdLpu01xpuS/Nw==","shasum":"39d0bcf719df1569692730e2cfa349a89a0ab6b4","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.3.6.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEXh3D5jtSLOWPySt0NYvQX6BG1ZtCiafZ6Z7FveJKc/AiEAmk749eWYtd7KvOl83lpPjwdGh1NfS3/7lVwoEKOZFZM="}]},"maintainers":[{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.3.6.tgz_1515785112211_0.8434897244442254"},"directories":{}},"0.4.0":{"name":"@creditkarma/thrift-server-express","version":"0.4.0","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["Thrift","Express","TypeScript","RPC"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prepublish":"npm run build","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.4.0","@types/express":"^4.0.37","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.4.0","@creditkarma/thrift-server-core":"^0.4.0","@creditkarma/thrift-typescript":"^1.0.2","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.0.8","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"^2.6.2"},"_id":"@creditkarma/thrift-server-express@0.4.0","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-IA7X99ewkhv4mDLkQ9Cxc6qc4EKGQzasXh2Wn16dkxV8jfX1KUbMGN+c4oRH+829DVVhBh/czOfxgiMnPPKCEg==","shasum":"52b35f1df6a8880c7d80996664f9868b37cfcd23","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.4.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGlOHvAjbV0EKWDfneChfSXa6pXccBtT9b5sK81gqR6BAiEAhBlSecx7j700aNyw+l/Fvryfx7Ik+FiWKyEFHE4Jzmc="}]},"maintainers":[{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.4.0.tgz_1516907411794_0.9588131245691329"},"directories":{}},"0.4.1":{"name":"@creditkarma/thrift-server-express","version":"0.4.1","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["Thrift","Express","TypeScript","RPC"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.4.1","@types/express":"^4.0.37","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.4.1","@creditkarma/thrift-server-core":"^0.4.1","@creditkarma/thrift-typescript":"^1.0.2","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"^2.6.2"},"_id":"@creditkarma/thrift-server-express@0.4.1","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-UnbsBaK/dQFtW3wkTvG3uoNBTbFmpGPFcanfkfSeVY5kTmT4xpYyCjSqpO55j2xceyZWrcgbmOllykpvJIYh0w==","shasum":"d37d9b6122748924f2d8a7869dfd59be14c83ce1","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.4.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEGyfFS80VbpMF4cOr5ZwlwQRldCOyaBsyKpN2ho6JLPAiAygTd4DbKTzJnkkFE43fa+x2W2gpbWBzAXEguMrzfbhA=="}]},"maintainers":[{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.4.1.tgz_1517374326121_0.47492025210522115"},"directories":{}},"0.4.2":{"name":"@creditkarma/thrift-server-express","version":"0.4.2","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["Thrift","Express","TypeScript","RPC"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.4.2","@types/express":"^4.0.37","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.4.2","@creditkarma/thrift-server-core":"^0.4.2","@creditkarma/thrift-typescript":"^1.1.0","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"_id":"@creditkarma/thrift-server-express@0.4.2","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-5SF9IM1mnJapuIPjgEOCnkW8dl6zC73Vu6lIAZYae7zKA33O+kFFaBtjO4C0n84OPNEox4eUU9rm8IqKeMk/LQ==","shasum":"7e3f21fcdaf349ee28bafc36f12da7f0d83d069b","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.4.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCs0aroMsPmbG+FrtmvE+G2Q69fQ7xRNwHcoJpuLjPH3gIhAL0PFbXLxJm8+M4Qn1ZJpCE09TtWW4Xbq3zr8EHJ48AK"}]},"maintainers":[{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.4.2.tgz_1517520267827_0.033741191728040576"},"directories":{}},"0.4.3":{"name":"@creditkarma/thrift-server-express","version":"0.4.3","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["Thrift","Express","TypeScript","RPC"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.4.3","@types/express":"^4.0.37","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.4.3","@creditkarma/thrift-server-core":"^0.4.3","@creditkarma/thrift-typescript":"^1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"_id":"@creditkarma/thrift-server-express@0.4.3","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-g2CQq98NuZjtI+g2iVU7ygXzWtKx/6GE8vUWMOZXlc83XKPAbSWRlAQxZnTyZbkTsu6XHNAH/FF9qnkjtYF8TQ==","shasum":"8dc0adb801b40590b8770fdb8a4275e24096ed8e","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.4.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFEUmIKBHriWVMmTPKR8y6kOFuajJkyUVZGUqQmD2EuSAiEA+QEe2dkqVkl6nljlAWNFTwuzZm/kPFxDykvRsEhnAxI="}]},"maintainers":[{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express-0.4.3.tgz_1517549471615_0.7877869529183954"},"directories":{}},"0.5.0-0":{"name":"@creditkarma/thrift-server-express","version":"0.5.0-0","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["Thrift","Express","TypeScript","RPC"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.4.3","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.5.0-0","@creditkarma/thrift-server-core":"^0.5.0-0","@creditkarma/thrift-typescript":"next","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { thriftExpress } from '../main'\n\nimport {\n  Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    thriftExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n  res.send('PASS')\n})\n\napp.listen(PORT, () => {\n  console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName - The name of your service. Used for logging and tracing.\n* handler - The service Processor instance to handle service method calls.\n* transport - The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol - The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes all the same configuration options as the middleware.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-hapi'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    serviceName: 'calculator-service',\n    path: '/thrift',\n    handler: new Calculator.Processor({\n        add(left: number, right: number, context?: express.Request): number {\n            return left + right\n        },\n        subtract(left: number, right: number, context?: express.Request): number {\n            return left - right\n        },\n    })\n})\n\napp.listen(PORT, () => {\n  console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.5.0-0","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-XPau1zgg2ex2jhQSyu7uhIWHAQbA7K86A5vV9PiUGhFlbhT+e/Yj709+SXOZ+y70AcBYqwaGGe+ZtHaijBKILQ==","shasum":"3af885eee9eed9a8bb24ed5ca1b897f6ed1ef523","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.5.0-0.tgz","fileCount":6,"unpackedSize":12904,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGnvxdXng8eTelXjFWt3jWm/wUkkkCNR8LI2aN0dDA3uAiEAzrFekH0zimYn6Zpgnr4O+QBZ8IjRNT4iEOQRFKjHDD4="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.5.0-0_1519174184318_0.10863759321282473"},"_hasShrinkwrap":false},"0.5.0-1":{"name":"@creditkarma/thrift-server-express","version":"0.5.0-1","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["Thrift","Express","TypeScript","RPC"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.4.3","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.5.0-1","@creditkarma/thrift-server-core":"^0.5.0-1","@creditkarma/thrift-typescript":"next","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { thriftExpress } from '../main'\n\nimport {\n  Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    thriftExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n  res.send('PASS')\n})\n\napp.listen(PORT, () => {\n  console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName - The name of your service. Used for logging and tracing.\n* handler - The service Processor instance to handle service method calls.\n* transport - The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol - The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes all the same configuration options as the middleware.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-hapi'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    serviceName: 'calculator-service',\n    path: '/thrift',\n    handler: new Calculator.Processor({\n        add(left: number, right: number, context?: express.Request): number {\n            return left + right\n        },\n        subtract(left: number, right: number, context?: express.Request): number {\n            return left - right\n        },\n    })\n})\n\napp.listen(PORT, () => {\n  console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.5.0-1","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-97xu17Xp6RWxVfyjppe433fSEcvPahoaIUOon+tJwI8nrFmG/8qqtoFGzdeskt7vy8HOB0V9zayFZb3GPt2MYw==","shasum":"f6af1fe03b089002c9cdf3362d7b66960587e8d0","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.5.0-1.tgz","fileCount":6,"unpackedSize":12904,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmhuNeBnNMJHApwbF0Ff9e7CZJsbhxZehMTj5sy/9WswIhAJHjgGZAJvv1D2+O142ZEQd8MULt97O9PY/WiptcY/4A"}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.5.0-1_1519251529710_0.2059521206674435"},"_hasShrinkwrap":false},"0.5.0":{"name":"@creditkarma/thrift-server-express","version":"0.5.0","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.4.3","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.5.0","@creditkarma/thrift-server-core":"^0.5.0","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"dependencies":{"zipkin":"^0.11.2"},"_id":"@creditkarma/thrift-server-express@0.5.0","_shasum":"95092bceffe591044534c42b62ce86cdf27cbbe8","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"95092bceffe591044534c42b62ce86cdf27cbbe8","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.5.0.tgz","fileCount":12,"unpackedSize":22106,"integrity":"sha512-c/sgIpuAAJD1kIWMGHx+zkUe4y5TiXJw1kOPMHmkYzLHBvjD8hkxEGoewOmqafIxU6F2f0DyulgViLchCBV2yQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDB2gSJFbNA4uqeUFBt5qQ6/8UHLe8IgB+6Mfe8coW+CAIgZzWZdJ8yIIo8y7mQu2s5y5+588X2pRwWtA37MrhYO3U="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.5.0_1520888282954_0.4347604835661383"},"_hasShrinkwrap":false},"0.5.1":{"name":"@creditkarma/thrift-server-express","version":"0.5.1","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.5.0","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.5.1","@creditkarma/thrift-server-core":"^0.5.1","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"dependencies":{"zipkin":"^0.11.2"},"_id":"@creditkarma/thrift-server-express@0.5.1","_shasum":"97a8ce160afa07e8e631e2e539f2702e8a0976d7","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"97a8ce160afa07e8e631e2e539f2702e8a0976d7","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.5.1.tgz","fileCount":12,"unpackedSize":22427,"integrity":"sha512-56p5mVAmmT5LwnmfMc2Lwx/CrmSZgE0q0AaLqda90J/uL3vAEXNouRN896MN/NLpiv/fh5Iu7KdjdBoTlE9/fA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHjvG0uK1QKGH8Wh63alTlYfpcP8gIf4bt7VGmogbd7oAiAoAKOVHKUwN/b4+OsdvhuS2RhvPsNBb5FUbY8F4ZnpnA=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.5.1_1520893262307_0.17543501877320922"},"_hasShrinkwrap":false},"0.6.0":{"name":"@creditkarma/thrift-server-express","version":"0.6.0","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.5.0","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.0","@creditkarma/thrift-server-core":"^0.6.0","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"dependencies":{"zipkin":"^0.11.2"},"_id":"@creditkarma/thrift-server-express@0.6.0","_shasum":"1b9606522490051bc0bd8821cc9a4f3e6a504233","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"1b9606522490051bc0bd8821cc9a4f3e6a504233","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.0.tgz","fileCount":12,"unpackedSize":22201,"integrity":"sha512-GUTpXiVLnuoVCDiahRitxFLZAGUzAsqP4bo29O85fH2FTepQspVhPmlQUn73Y/8tjyV/HV1mAI4yALXEyz1lsA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDxIEapham5WTpOzmwFuJ2vT3TCT3+IYNHm4cmquiGmbAiEAm98DWxsKCgiKiXPLwG6ouF1qQ9VXV1jnCHZP4p0gVOA="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.0_1520963042840_0.6341683800681508"},"_hasShrinkwrap":false},"0.6.1":{"name":"@creditkarma/thrift-server-express","version":"0.6.1","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.5.0","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.1","@creditkarma/thrift-server-core":"^0.6.1","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"dependencies":{"zipkin":"^0.11.2"},"_id":"@creditkarma/thrift-server-express@0.6.1","_shasum":"5788c188da57f38cbeba88194f3203997ad23604","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"5788c188da57f38cbeba88194f3203997ad23604","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.1.tgz","fileCount":12,"unpackedSize":22439,"integrity":"sha512-ydshrv5Gc4oDflnlG28MDIeA9ns8ylI3Umkf6g9apF/5NgAJtmkMr69AL56b0pvKXlksfzEMzDVn7dTYTIYbng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnIrxAQepNZxmULH8zQW6gWntPPXXnlGWYoxme8j8GyAIgE0EyPS1WidTsxn4WW4BfLJjNFLSv7hcJXor8WjZt8EE="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.1_1520964148452_0.35553112277934895"},"_hasShrinkwrap":false},"0.6.2":{"name":"@creditkarma/thrift-server-express","version":"0.6.2","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.2","@creditkarma/thrift-server-core":"^0.6.2","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"dependencies":{"zipkin":"^0.11.2"},"_id":"@creditkarma/thrift-server-express@0.6.2","_shasum":"df6821d3b7895678596915014732c48d3f40f108","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"df6821d3b7895678596915014732c48d3f40f108","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.2.tgz","fileCount":12,"unpackedSize":22758,"integrity":"sha512-8mvxSdCoF0LFDqXS4lHSwfSygR20yEgAPZj1Gst398YVfmU42wbDvDok0ATSKa2ISia9fNIsUgsHZn2qb5SQSQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDo6eW9L4fR1TT3wVhuUDPo0TdhX6WFDiOtNc9HTgJrCgIgfjhJ8TcvxeuDwFdsgo84ZOiLOH86zYgurHvf6ocZIfA="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.2_1520970952997_0.6273714882061885"},"_hasShrinkwrap":false},"0.6.3":{"name":"@creditkarma/thrift-server-express","version":"0.6.3","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.3","@creditkarma/thrift-server-core":"^0.6.3","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"dependencies":{"zipkin":"^0.11.2"},"_id":"@creditkarma/thrift-server-express@0.6.3","_shasum":"4d4e83dc48fc9834a9107530d43dcfe088f475c6","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"4d4e83dc48fc9834a9107530d43dcfe088f475c6","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.3.tgz","fileCount":12,"unpackedSize":22766,"integrity":"sha512-lhzYGQ+pajIeAsourgMbmZQDdNM+a5EhrvfkMfXlfWZMYTPxQS7t8UN3NqfcflMPuTPXRRvb5gmAv3jDIoDlRg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHDnldxTjJHfgdVZm2vjSc8fKOt5S3IQ6DpK8uCRM+PgIgHqDDAbF1Z8SSUo36Q+Y/Cjo/BxSomDmoZ7h8h4fh2Ng="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.3_1521479066178_0.7217392525548332"},"_hasShrinkwrap":false},"0.6.4":{"name":"@creditkarma/thrift-server-express","version":"0.6.4","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.4","@creditkarma/thrift-server-core":"^0.6.4","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.4","_shasum":"8b4eeff33c24f339ba3af7ab6298151050bd0b5a","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"8b4eeff33c24f339ba3af7ab6298151050bd0b5a","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.4.tgz","fileCount":12,"unpackedSize":22891,"integrity":"sha512-zbTcaGlXpGvxpgFn1J5a06ynI2Su4WmhFbTHLsNb4COMtWy2c5snRoBrOrXwJW4Oxj75qG1GGy6r7AraKJNDIg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDfaWSscAUguD+B6VDSTb7VuYGYOzt7SaykYl1Uz6s3GAiBWPuvhMMAoea27b95Z3OWDnnMOXeqJAc5hpNkdKINAHA=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.4_1521572373813_0.4211489017213923"},"_hasShrinkwrap":false},"0.6.5-2":{"name":"@creditkarma/thrift-server-express","version":"0.6.5-2","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.5-2","@creditkarma/thrift-server-core":"^0.6.5-2","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.5-2","_shasum":"a90d5f0bafd9cea7a98676edf88425302c21058b","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"a90d5f0bafd9cea7a98676edf88425302c21058b","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.5-2.tgz","fileCount":12,"unpackedSize":22897,"integrity":"sha512-xhqreAjWJfMd4ExM/wo9/2CWlUiTTdpPN6NxhXBxmKsCrNLH4nCIYHcMeTBE0rE14tALH+T9dxQKCyY2ifV/qA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHkeKWSqQTGuWrEJ4l8BEpbmCH4RlPQx3lICs1QROfEgAiBfn5CPoGucAHu3GeYDJAaDjHDBIjSs7dRz4MFVrRus4A=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.5-2_1521578397377_0.4265780871237821"},"_hasShrinkwrap":false},"0.6.5":{"name":"@creditkarma/thrift-server-express","version":"0.6.5","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.5","@creditkarma/thrift-server-core":"^0.6.5","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.5","_shasum":"be87374f1fe043c11aaf2e62e26949c0cf1523e7","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"be87374f1fe043c11aaf2e62e26949c0cf1523e7","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.5.tgz","fileCount":12,"unpackedSize":23996,"integrity":"sha512-7YDa1pPR43hwQ83KIGHo55LiOMDxsOWUXgShzsahbgFHUYlZLXKuHWj6A47p3xVl4+ac8a83y++TBmzSek4cRw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICoA4c/1Pre9ARq6XLyfkcK+XcHuLqblcQCpLUWucAzDAiBvpfMgu7SKd5SUdcfe1a9xKV+rTddjaALE7xI/7Dnvmw=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.5_1521653764246_0.8990641382100533"},"_hasShrinkwrap":false},"0.6.6-0":{"name":"@creditkarma/thrift-server-express","version":"0.6.6-0","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.6-0","@creditkarma/thrift-server-core":"^0.6.6-0","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"dependencies":{"@types/body-parser":"^1.16.5","@types/express":"^4.0.37","zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.6-0","_shasum":"be5b13abdf995c527eb89b8795c18be4a79aef9e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"be5b13abdf995c527eb89b8795c18be4a79aef9e","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.6-0.tgz","fileCount":12,"unpackedSize":24002,"integrity":"sha512-z5HXz/aGM3Be4um+rgesV8oUJBnoO8Mo8uGng7D+vu3Acv3L9ZJHDqgJhAu0eRsZpTTJVrbNx11J6wN+YFCHsg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBRNyredmilge36IXAgLfcYdKJCkGWEq/s1dNx+DVSSVAiAptSUXPIM+GwhUEkDnbgEO7gltN/qBW3lO3G4N+gZg6g=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.6-0_1521666329691_0.1095999478533034"},"_hasShrinkwrap":false},"0.6.6-1":{"name":"@creditkarma/thrift-server-express","version":"0.6.6-1","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.6-1","@creditkarma/thrift-server-core":"^0.6.6-1","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.6-1","_shasum":"3f0ab812ed761007585deed3039f9f744fdd166a","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"3f0ab812ed761007585deed3039f9f744fdd166a","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.6-1.tgz","fileCount":12,"unpackedSize":24002,"integrity":"sha512-ObSGT8raBn/SaBLzRgOHiongvji+0oozAvSW/Upb2mYWl8LHyJzqlm3XExUeT4YruoxRDMU1WGTrv/Q5VSUGww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfHxO5prHhuacDxEsXfbQ5yfjXfCE9FPrksibFuU+angIgba9hLCPfzgi9jkNulRM91Yl0ol3NfaGrrfvVPF6IeIs="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.6-1_1522187933006_0.8304093586285763"},"_hasShrinkwrap":false},"0.6.6":{"name":"@creditkarma/thrift-server-express","version":"0.6.6","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.6","@creditkarma/thrift-server-core":"^0.6.6","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.6","_shasum":"adca56f690af0619e38d38ec59b8cd9575390571","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"adca56f690af0619e38d38ec59b8cd9575390571","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.6.tgz","fileCount":12,"unpackedSize":23996,"integrity":"sha512-nWNSgw7AiyaBj7rZO4pW+Z5Vftxpb7DCoP1x4vSJqYJv6jRxK0uHF/a0qbGaYlZr83mSkkBl51RBu3LiEXDV3w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF5wO5thSLH3jtZUuG6rXuewi2a3B9Pw7N48/MWZgl4sAiBzlY3UAYybTRAaYb+SuxiKfciDMQmFjRg0vc7BZgxI2w=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.6_1522257271892_0.6112295894867168"},"_hasShrinkwrap":false},"0.4.5":{"name":"@creditkarma/thrift-server-express","version":"0.4.5","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["Thrift","Express","TypeScript","RPC"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:only --","test:watch":"watch 'npm run test:only' ./dist","test:only":"lab --timeout 10000 --verbose -l -S ./dist/**/*.spec.js","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"^0.4.5","@types/express":"^4.0.37","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.4.5","@creditkarma/thrift-server-core":"^0.4.5","@creditkarma/thrift-typescript":"^1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","rimraf":"^2.5.4","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.7.x"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.1.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { thriftExpress } from '../main'\n\nimport {\n  Calculator,\n} from './codegen/calculator'\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n  add(left: number, right: number, context?: express.Request): number {\n    return left + right\n  },\n  subtract(left: number, right: number, context?: express.Request): number {\n    return left - right\n  },\n}\n\nconst PORT = 8090\n\nconst app = express()\n\napp.use(\n  '/thrift',\n  bodyParser.raw(),\n  thriftExpress(Calculator.Processor, serviceHandlers),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n  res.send('PASS')\n})\n\napp.listen(PORT, () => {\n  console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.4.5","_npmVersion":"5.4.2","_nodeVersion":"6.1.0","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"integrity":"sha512-qGmToD2XpkPAUDYAmBTxh/lbtyLS0/7r3SM5ASt7V2L/KiJ3j0DN1a6OyN1BAikX07kXfZPo8xNXr5U0QCOcnw==","shasum":"9f2360388d8fc7c55da8d46d202088a5a720b02d","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.4.5.tgz","fileCount":6,"unpackedSize":10404,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE3ehUnop3CEOBZIYgPM7aV5SXTFSxDSg9t21tha49A0AiBD8hRtScV1Js/imb5aXCBGc5X109x9Y1tjvmjxndLwmg=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.4.5_1522343219475_0.16161361321029344"},"_hasShrinkwrap":false},"0.7.0-0":{"name":"@creditkarma/thrift-server-express","version":"0.7.0-0","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.7.0-0","@creditkarma/thrift-server-core":"^0.7.0-0","@creditkarma/thrift-typescript":"2.0.0-5","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.7.0-0","_shasum":"c42189846973048ba305839b53f7fe097b7e617f","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"c42189846973048ba305839b53f7fe097b7e617f","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.7.0-0.tgz","fileCount":12,"unpackedSize":23857,"integrity":"sha512-AtGcmxf5SzqJxzCIWOnw7wZPtmBImamY5ELH09FLy6uBTe6BiuEuXoOx4N1sRRIXrHpqWCGwINrTIpjXoDgoWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICVFGnOIvOCbToaCBULwGI1lzOrkLBYozO/y9f0PQXJgAiAi7+fRlXmIhpW7uI41VLGtSxuGNmGI0r9HRjqwlpxrIg=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.7.0-0_1522943091668_0.5057403509708938"},"_hasShrinkwrap":false},"0.7.0-1":{"name":"@creditkarma/thrift-server-express","version":"0.7.0-1","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"next","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.7.0-1","@creditkarma/thrift-server-core":"^0.7.0-1","@creditkarma/thrift-typescript":"2.0.0-5","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.7.0-1","_shasum":"c56deb7b84f4a7415ed2c8aa069d754f54abb44e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"c56deb7b84f4a7415ed2c8aa069d754f54abb44e","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.7.0-1.tgz","fileCount":12,"unpackedSize":23856,"integrity":"sha512-ZAZ5t50zVH2KkS3W5v9DOX/kDtCAWsA3P//EyC8e5FPA35WBRfAa9+UcEYqM7ao8a/CvnumkLkBDzjzq8xgJ3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDC05vdOvIXzqLMtgK77A61IasA+xrxCkBzRJuNjZyl3QIgdKRq/1Mq3u/fE5KtZl+M0CcUXDgwWx6Rx+R1tZII9ug="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.7.0-1_1522943885763_0.9451995076956932"},"_hasShrinkwrap":false},"0.7.0-2":{"name":"@creditkarma/thrift-server-express","version":"0.7.0-2","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"next","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.7.0-2","@creditkarma/thrift-server-core":"^0.7.0-2","@creditkarma/thrift-typescript":"2.0.0-5","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.7.0-2","_shasum":"a7524ca8f001cc389cefb3f7f4585f10be195443","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"a7524ca8f001cc389cefb3f7f4585f10be195443","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.7.0-2.tgz","fileCount":12,"unpackedSize":23856,"integrity":"sha512-sdnQcc+5homzh4HGkoA2llGs1fYN04rTXT5SCFYh9ofxsIz4QtwbwoGISoXIBRQ1+5FhTTofOK8Ch4xiu+Evog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBuZSCWuazZ+eHqGQMBkjwS44MGKYtj7KPFNaCkLK51IAiEAix6WPqHHOPr6/GeYlUxziAaXQFWW6Df0u84h5eAeAG8="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.7.0-2_1522950869367_0.2330521625076052"},"_hasShrinkwrap":false},"0.6.7":{"name":"@creditkarma/thrift-server-express","version":"0.6.7","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.7","@creditkarma/thrift-server-core":"^0.6.7","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.7","_shasum":"f00864fb44493d0c4cd02cc75043c1e712fb9558","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"f00864fb44493d0c4cd02cc75043c1e712fb9558","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.7.tgz","fileCount":12,"unpackedSize":23886,"integrity":"sha512-nhapG2n1HjafsfaoycuktH7BficcQnOY09bvibj7Psn1OZpl+97eGEvSoDX8AzmtyfCeUMOQyZFOwTC13k5lYQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtmgNO7SSZ3e0rWu1huS/H+6X1RjcsYai59lGym0uBLQIhANQoBXegse1lXertqDsncUxj47FNO9MBk2yaQGlfPqR6"}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.7_1523379825121_0.4522496886268119"},"_hasShrinkwrap":false},"0.6.8":{"name":"@creditkarma/thrift-server-express","version":"0.6.8","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.8","@creditkarma/thrift-server-core":"^0.6.8","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.8","_shasum":"377c9423fa82398dd575976ea4ecb8c2716ea14f","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"377c9423fa82398dd575976ea4ecb8c2716ea14f","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.8.tgz","fileCount":12,"unpackedSize":23886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa1jPjCRA9TVsSAnZWagAA0NgP/3AFWYdE3eAT9PzuC2ur\nN55YdrctTLvoILyrOBdpqBCBhsazJuw/1Xd86XzTHpXJvbRW69mQkJOt7AHd\no8wnsrmLJ/X/NQW5CrZTazIIATdYKQMu+aeijySaYNddgNS0kIhu9pPIw/ak\nzQYnQy+6J2W8lotoYvXjzRPYtuhBByyirnZNNG17WxMus+uOFL3Kdk+RyPSU\n748EtOesVNjfh6yAoCW/G6Oo44nAbaxBwLzAb4DVGqH/E5lXvZIN8h8Z8O96\nm9tlG5NdoO44+DiF28SqObNLiVFT+17QSS+7GFGxPsN1p6H0Z6xBRwvOrIHP\nEI2QzQs2/YFzzrhNCx8jZopH9rljp5lotdPx4HrhxugzRHSr2fSF7U1IAtu4\n4UKvm3fsPTPgJjqXA9TCWa00ufW79CacnpQxBuGVFkbf9WUMHfjVoHv8akeQ\njfwAkrQHq6KxoHNEFywcqLuX7jeUxbiconQT47fpLvErs0ZhEosPAS5336vr\njguLMAL9820rlSVyqAsEc9yjki91eh6AYQ7OkoPfQIcrpO0Y03GEbO0Ort/X\no1xBJEucGPKMjqjhNuX2d2XiTloYiSggnu/mnJMTgLFiaf/yks3gXJoSJJF/\nm20XqJUaidgQBtb0PXd3q2ocH0B/5WkHkuG2P/76Fe05IrKaB3WF8kNrWsYs\nECqP\r\n=a8U4\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-SA4TKnIx/a0VVQszxZj6+MMBSPnz9Drdr7YadgfVBcoMkJKZc44toGHJxHewA+0B3/P8aa2XPclyEtkGPv+fPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHtZ+EQh5jG4iwMqFehfYvqKaQn6Sm3pd4muv6PIEr3IAiBYfCj7InsUlxSqpB0qDZrYZUF2RIxIigAoZEn7L7q4oQ=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.8_1523987426653_0.8896371467392665"},"_hasShrinkwrap":false},"0.6.9":{"name":"@creditkarma/thrift-server-express","version":"0.6.9","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.9","@creditkarma/thrift-server-core":"^0.6.9","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.9","_shasum":"9736b4e2672f45889c90de3ba7619c1b9feb8c9b","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"9736b4e2672f45889c90de3ba7619c1b9feb8c9b","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.9.tgz","fileCount":12,"unpackedSize":23896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa5htvCRA9TVsSAnZWagAAtL4P/1fVc2FsSLbiKv9M7WpJ\nhp+tefG72IL501oiWQAK/VqDOOic1wHBMCrrYKuk/hlafcyexqZ+0GrezBJy\ngTiNxTCHZUAPLAg+Z34a93SX79xRsUY47jaT9QD9srGhONK3nKw/G+U+GG7u\n1z4Mfmms2zOLn89ayt+XmO02xUYd32gW7V/UqlbkYYFV3Ho9Ydd2FXU/m+C7\nLfINLGwxKAF50PcI7shch9wtseu9v63KXveaoyJDXCy1MSexArHfaHnA3pbR\npuTgpfA5cKhAKOzDm4iKTNjzUPL8BZOp3jSy3h8kEbJu2YDCJwKuw6dqdZwd\nEQcxnSVWzh7Q9qbiXr5nkcJniOYzGiq6VPmPRFTjViW3XENnftVDItAw/LhW\njF7+s7/mvAA83eOhCMQMf8Jncfu9Y1zSEwOkQ5EZUnBKlDMp6xh+9xEv4GYH\noEiMaC/YvdZdxYymqMEhtCzmCEhiPjS5OrO5gOitXWYLJgLtqRX9usIdlv0b\njTzpNSdjMNT9sNv3kFXxMpmQqaBhLB3sLTriI+K/PTSoqonCoqHcTkUnNjOh\nOiy3StNGt51P206cqDuu/1pjbuJJmQfsyq5zO0uHPzJ9UyVpVcQR2FmUxlut\nCZZ2RG/6AUo15x4qX9Au/ol1k6tc/ybWTQvofhBi/l+y0BMcRyssCWzTDLzw\nlXra\r\n=ZNVz\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-s4HoXqEh8/iERvmTG7sLbBhJjQcTYbAOxcpdPqdwCbo/GBaA4E66hOOMhRqriObtn/RyCY8lzMwYVlXvErnxcg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDAFolvjHaeIQr3QzsiRh3E+24CiBRjshNXRj+fUK5dgAiEAqCKeQrG13QEosyZCDUah4qZXDnE5b6wLsFHuofyipUI="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.9_1525029741666_0.2634029853666182"},"_hasShrinkwrap":false},"0.7.0-3":{"name":"@creditkarma/thrift-server-express","version":"0.7.0-3","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"next","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.7.0-3","@creditkarma/thrift-server-core":"^0.7.0-3","@creditkarma/thrift-typescript":"2.0.0-11","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x","watch":"^1.0.2"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.7.0-3","_shasum":"3fbcc46c8668cf5a8fc8b3f18e1702ea98f2a507","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"3fbcc46c8668cf5a8fc8b3f18e1702ea98f2a507","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.7.0-3.tgz","fileCount":12,"unpackedSize":23793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa7lc2CRA9TVsSAnZWagAA5GEP/AxhDfFp2c+yoNbqml8d\nhTSQ5ZsEI6AaIsDTb/p0IQjHPw0fgwUGqNzrZB9/U/0N/XvOaOmTQLHm72mS\nGelvNEncaOa021Rq4Q+sH4R6gcqNNSjpuBFv6CCLadt8DPL7zWU3a807aEuH\nH/4782/Sbls+CMXwzQ9wSOsJy1lxLj46WivVjyI9/cVVw6hZv8Q/FSl2pTaz\nEioIahfgcOrjXBk8NfE+KjkUIOXEwPUeWpVCFrTycNBzDmhcX/Pvi7+aDl45\nfkgi9YSTE5DATuB2QY0kZ5mEYgAy56NGE/vKH3oAGoAgg+B8F6N/0jLi9JP3\nXDlSNla+MTy1dKbqbLJTaZan7l/82+pLOtHH9bE1zYj2dWTgsjILsTrcD6TS\ntizobQyokb6bcgNk3Ms9xLp/Pm98mZQKz92hvUF3blfJkwB1oZ7ovGBXcdp7\n95uoPSjQsfXLXOZ9gxZSO1MbHNPQkbtWAM8e3nJuiSazE78kcwg5CB3enmHA\nNfKZoDNqQN3zFMsnBSaFOQkdvrQ06zGJ5/G+ET72Au8cUf2xxqzUMARZ4tdv\n450kpsqsoNJmYzMHf/OF6EEj0AGnO/wtXQcfvmp0FdaQDcNwA7GitXQkHIYK\nGvqOnTfaHgTqBq7oj1B3NlGUqyW0SyOUV43OmnppnWxbI/gUP380H2zvIScs\nJ6Lw\r\n=cpnj\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-G+2hHOkVqCRiZgBDliv+NS76fmIrjM4UXZLbWrGMvQVCIoKQLBiAGUijrMGrS5OVRsC/GAoMfio5sg8v4fSDsw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBG87VlhOsGodT1MjCmAF6R5mYmdZa+8RMPfIdTIQ3I6AiAKbADpdkfRoHXRo3kLRENARY3edriC8u/eRb9HX9/DwA=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.7.0-3_1525569333859_0.8737499124324042"},"_hasShrinkwrap":false},"0.6.10":{"name":"@creditkarma/thrift-server-express","version":"0.6.10","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.10","@creditkarma/thrift-server-core":"^0.6.10","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.10","_shasum":"6dd1f274ab3ab7c5b5dec3671b768d8558528d20","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"6dd1f274ab3ab7c5b5dec3671b768d8558528d20","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.10.tgz","fileCount":12,"unpackedSize":23899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa8ySdCRA9TVsSAnZWagAA1GcP/jyh2V61P/d4TmOivX/5\nadm3Vwmvfq5SLDTLdDIcldWoz76gnPkabOECPopcDRHTsX5fUguHP1jsLKvc\n2vMKutjV8dHM82lVzEpz0/MEbPdye3MNe+mZSBbuEBCtWP6PjYMafoUV+jW7\njTdNhMgtOXyFg5Q5JARAYo0yde9Se5ngAZqj4wUAaSMZxcucLeszjSrD9foo\nOjUEnWcJxn9swrHAIM5ne/hD55mQ8yjKOHorgSrE7ff4QqrhPHa7V8Z6SJ0T\nX1NOcL9AD1CYODYzvnssx7gf7MORY/0rGwkAbjBGjL8ZdSK7TtxZRqid/iAI\nYZhKQBEWjK5rDB4NIUfZ3AlVM6LByGPC8FenCAci35p5lXqyzS8FMf7/lgK4\nIzTCZZdzJySKdgD+sB1vSYYv5p/5HE0iJy8/qTbH85EprNHGEYZ3Pw7ug8MF\nCO39GCehV6uW5koPpmx1SKpYXJI1y9qtXicCIbXDhk53oQznHK8l94VloASN\n45Wi8omyZEmEBnrXBiWxfrPhJk634R0S/LOQGseDuVj6ZSnQoYR/PVhlX+I+\nF0D/hm3nFZzjLiy5TqBc2tZfEIetzPvBLFw9QkCnPBuxAy5YOvr7mFsrli2+\nJ6Z+z0a0HW/4/sp0ptVn9osYRBUe4jaTnF7rOwITBZVk1bF7sZgMJyElVE3V\nuZ71\r\n=aRU+\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-QdweTssZ+2yTe18EBNlSeRwIWXdN+vxrHmtkKixJk69aPA08AGg9Rvmh7PB/iZH8l95VnZ0vQocd/+QJipPMVA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbJs7skl59dk4iuIzKKFmDulaf339LGONs4fO41H+2JQIgDvWpogszNBFls1sHXnxoxz6IemMlEIB/MHClLVSlDB4="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.10_1525884059793_0.43922206717772316"},"_hasShrinkwrap":false},"0.6.11":{"name":"@creditkarma/thrift-server-express","version":"0.6.11","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.11","@creditkarma/thrift-server-core":"^0.6.11","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.11","_shasum":"45873c04a80debcce6dc166e830ef9d9e3d5bbc3","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"45873c04a80debcce6dc166e830ef9d9e3d5bbc3","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.11.tgz","fileCount":12,"unpackedSize":23899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa84EjCRA9TVsSAnZWagAAYHAQAILSGA4Ag988g+BNP019\njB9t0Uu304WhX+XfEpgZ8yfzlO5HJoouprfGOEQZwKjjTKxj8jz74ev8VK+E\nk7Lw9z/SrtSZgI8Wl53RamEFK0Raeg01utf2ZAcoXjfykZz4tNP/L5NCZQPh\n1AJWdBMYaDJm68A1wkSr/m+iluxyMNSMxDYNtcQw44uM0L/OhNjDmd5IEw7z\nhyhNRfF0bzjbZ/k6O8lxy8MAROK9EK8AOIA+PXYXr4PrOebl8bA8rtp7OOij\nGypkz14rpXgljeLsPVEOlgxXETBzpeHopWXkdWZhhA+OgQoS7vhZ5vBECHiO\nW0Po70C/ffzQTsliQBE/6gg/xfjsXZOHxYgIXWIj+dBGwWVO397V7MOyFpl/\nKFHPO8vbof5xw52CDxOc77usLDxbmnNckA2ksyuhXl7Cv69hnQMR9OqzBV4K\n0LFD/Y8gqnpLph4mYplGzz/lgVsn4gqiXbqj0NVB5u5Jva2Vv67PRyiR0vNy\nXtlpaY4PZKLUrLsE0F4rtQGEaqDI6jDI4T2M/T1+YtBfZKkhEnkvR5/eQF6Q\npgKpHzKmeRHicxsEQngg+3canIeqm1MLWTBy2Suj0cssmCgyCm5IvHXFdoPN\nxMcoZVQoqntzAs7LvHvlPC0109wyq1UPHD9cQ291VioV0CFO0mz2BO/6JNrw\nkvhz\r\n=HcDG\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-pec+FDc18VoMp+CMhrx60IC4EAFfe9kHPYKSaMlKjAphOhkz4jeLhhy6apG3cpYPtRGoJoYSmCuiEHs2S/S3wg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDRcWgo2z7fAAL74rOJhtrekNd7tUTL0T4ad8+WwdXXYAiEAnvf2srRkMc76IDxv8TGidNIZu3uhmqbgI4U1ZuwJFwk="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.11_1525907746467_0.787255050388197"},"_hasShrinkwrap":false},"0.6.12":{"name":"@creditkarma/thrift-server-express","version":"0.6.12","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.12","@creditkarma/thrift-server-core":"^0.6.12","@creditkarma/thrift-typescript":"~1.1.4","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.12","_shasum":"9770ea8667402295c42ce5b49845fe0a3aae8ea9","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"9770ea8667402295c42ce5b49845fe0a3aae8ea9","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.12.tgz","fileCount":12,"unpackedSize":23899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa9bTBCRA9TVsSAnZWagAARVMQAIRhJ2OFvoVFlMkCx0fV\n9vdQ6ZtYqufUPvVZxAybNsAEmaJe3dSlqMv8ZjuL7RTDRSA9S8sDyR1LujZA\nSgfaWnCfzAWfBNYTsQOtiFVc6PN6+A7u2fNRb5UPgtc08WVcsnpcILGgE/be\nb61KYyHNRlD/JkZgbNU+3BnqZaOAtjjqF9Uvx8lBCcY67hlXR/Y8zVIXjLAA\nAcSG+UKh/cYLRCdo2/kEpC964pzpI+9ctj/k7Yx+15QkLKAG4T1wwjFLsm0n\nTG8cuclOBa6lNxcAE4BTHj7yw+A3sQghlKoTXGd2nnWQo76ASGnstJzPi3ci\nMy/s/GzfnauedNGDp/xStWrsdTcNeQlZOSsLE+Pg2rouFNenQmXbDPBXTQH8\ne06HHU8gBL7ZYV82DQ97eaJhEUz0M8OaIcy/EYjKPdD9BWLM4/XMJIP1baIP\nEkYQUgJGvo6MGrVBCNHEALiV30kIh/+vXJf5UdYUNbWo2h6B8OxAnPLhNMh/\n31j5fdx6zQY8aPSYtAnimSdWa8j/ErU3ohpwC7jKXHaiMOlfol4N01USUXt/\nNlrzRCgxzEvkMrFkd2iuAm8dQ2h6avX7VdYiLPWVk/uyj95dX0RqfF9+edMd\njf+UsSgZtdcJwQZdIEVQpAyksYakS2w7txfmqqC2QzemzQch+kf/+FztAM3E\nkxeg\r\n=owrv\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-Uwrg1y9LXSg/+hqlQpqZC+biMn0pgjlsnRGkCIH0CCScu+3+0XuPZcbkqNzmGmAkeqMEyTzNU+V9+cQUtowfaQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHHpO68lZ8u/eXMBgY99EJB/eycufBARajq7xt8BYTRPAiA8ZewzQesW8rpSeBpfIx/iaUP2GvtIQHIUA6HjvLdwWg=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.12_1526052032575_0.6965287435168275"},"_hasShrinkwrap":false},"0.6.13-0":{"name":"@creditkarma/thrift-server-express","version":"0.6.13-0","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.13-0","@creditkarma/thrift-server-core":"^0.6.13-0","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.13-0","_shasum":"b388547b5783a395fa7ddacfea34f3d65b139155","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"b388547b5783a395fa7ddacfea34f3d65b139155","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.13-0.tgz","fileCount":12,"unpackedSize":23905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa+vtXCRA9TVsSAnZWagAAKKQQAKUv+Jz/JCaIv4InUhKc\n+4IsoQL/kWCBzJEXdXdWr5B+j8oDiv+VgIzw8p8n/umKBk7WxkIbushHqBGk\nbzGG+welPtWhlor+sZDK/2w6WEFIO1LJn8Ho6QfDi54r1zYpcXB9xdjKKMF5\nn81PDYdyCnsr5eqm+9lDPCYwQnhtI3F6iXjq7qKyM99C1kCfOiRSSqUpsVLh\n/tbrkLIEwl9EJqniq5XshSf4A5NwxN9YtjvOdqT4PvR9K9bvL/67rKCXY2sE\nc694RTERPQKXA3F+Tfys0Sjti16UxkAL5h/njvfvv6YsKwvrxP315SNwlO2Q\nAxjPYsoUuVvD4CgrYUTT2qsPlHZLbAY8OcLjOGEUIWc91Kn/WEQ+H+k+zj6p\nro1wn4szObt+14c/Q34o/iIlBhHoUUbGW4ae6Pd5tLwWzmStLS7yRu9mDWyd\nFFWlATaIjLWih3LTSL9t1vUD6CdR5xyJrbUqBAPmNHWnWsD9XkCf4BmJWRhb\nbvj5MzQl8JeJmmpqk5E1nO+Ev2mKDNeJFIO9iffO9xeKK0ImNOZTrRyyad2+\nbQTRXkVdqqh+J0KCGpxFQxu1amzBkXf7RN3jPaV+S74yJcxLhpkTkeyprIhC\nvynY2cl6gSkK3Zm1nq9/HKWYibrq/KM8bXBEcGb3Ce329C/vGdwW/BgcOjx8\nVMxk\r\n=dpu4\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-6qEITqo9rRN8bY1viibRieSPyS56jLYzwMy0+gNofTDWEZ+bAi1fEnRyYjCG2N6QHMsiRysiVXOxTFl9QwaJ9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICIufUAAUYdflw6QvsM9tEAVxqEK8b4gCXTJmhgLImjMAiEA2N2yK9qdNK9ahWxEXbry65PtsBeUOx40/fNrKPwPDGA="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.13-0_1526397783560_0.3209878856632482"},"_hasShrinkwrap":false},"0.6.13-1":{"name":"@creditkarma/thrift-server-express","version":"0.6.13-1","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.13-1","@creditkarma/thrift-server-core":"^0.6.13-1","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.13-1","_shasum":"0dd574366d5a051f954d829a3d0014e178355a43","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"0dd574366d5a051f954d829a3d0014e178355a43","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.13-1.tgz","fileCount":12,"unpackedSize":23905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa+0D7CRA9TVsSAnZWagAAZAgQAIcvkOthc5upEsRcFQxa\nQzCNKLwRh525qLvmzqT7xesBbvRdedSHhEdfJuT1Fxtz7UN00sYrmkFi3QpP\nO9k01Q1PfYJ2xVjqBHyEkrJZVNMUfgqpP8Wg2GlgrdoeIzI1aPChrcH+tGyH\n/5CtPEOkO+zzmdetFdQCKH875g2UTBlMTCBBh4OgN3wP80RuEhUCLFO1XX64\n070xmwkQAdc2GlBQHGe7pDOm07xMXGy7G7n0KmLmT5zhJiX8RWr/QpEh0ENd\nzzLHD1GPVmvMzC6a6SQR5bfLw9hR9PfuwLCzK95pGsrtm1XMTlhy2zxoStLs\nfYO/0x5PG+CUdjfirfhT5LRHFZ7o4P+IJRyqi85b/l3cVklPisHPSw7lqLMW\nRaCWX9nhXod5ieuAyjlnzDHIF8DCkQvpLUGdFszZudWqJsS74lOJ1Z3FMiVY\n/0raIIZZwAkD3tLsvYbC+2WIoieQomsmYc9xu42jRrpJ/iC7tJhja8e5Cllo\n/eCQvn9t46m+2dpvmkPOK/dO6pe15oXdrDFf6LINL8SV51DL9eLTXwc8fxBn\nAz8w0LIsUKEhKtsifyIGHYON/Z9lh8F+1pB3j+qPYk9O0MxV388ceNvALtxy\nu9XBNpBh2nPhOb3T/+CPAUVPDviplJtWggRPODbjsNgBjNPJByk8Q59ZBF1z\n9yO6\r\n=IlE6\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-mrs0jvRirgHTktzcp8Ngqhu9sgnKYQ2Pb779Vq+XqHKSswcwlMHjA712cEEgsHylb9EjZr1gG4na9w/VukFjeA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEh607A+5M5bo59DJHgbyg1y+x8rSMB50l2FgSshW0d5AiB+9LlZFjTy++YA4IS7C/vhK/iwYGKzlgEapdL5XDEBSg=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.13-1_1526415610973_0.06974151372688775"},"_hasShrinkwrap":false},"0.6.13-2":{"name":"@creditkarma/thrift-server-express","version":"0.6.13-2","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.13-2","@creditkarma/thrift-server-core":"^0.6.13-2","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.13-2","_shasum":"b28de610fcf074d570d14ee6b6ed3049bd021150","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"b28de610fcf074d570d14ee6b6ed3049bd021150","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.13-2.tgz","fileCount":12,"unpackedSize":23905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa+0POCRA9TVsSAnZWagAAXdYP/2buxMYqCtYZp39tFcsj\n4JC9sKRx85ICuvwhn6zUFnBpvPyaPaBdWAG6gHSoWPL0j70CxmHXetAP+uHP\nHKzd6ObTXIohZLWVUjaRCSeuhrBs3LhVVnowtiG/VQ4s0NUVplXne7pANmJ3\nz5sxJ7SSoC9QJgevT94DWQBW7m9fMcgRN1i6ap43AEgacQgaWsaCRvJb0+y/\nPQAjGy+ki3ijX/4DkiVGQJbrtFi2M3XiYAIr493Fs663cxEfcL62zwWVCJy2\na8RpaGdWaBl/6JFqucEUH/tfFhiZnsLcxktfSeQQzGCN/cDyfuedqZqgZChW\nFsiUq9F3c/Xc8eHgl7m+K6gkW0QuuAP/TpQxDOj6XAuaJMymTZ+tWyPeLnsy\ndd/yHCT/Uisw7EAyZEdqHp/vynaW+aqaoTbItByMXrHSDuzQ8qEUsBALEnxa\nw++QFITjNUMcK/bcgU/qCIpJl5zQduAp6mvyVCMfg5jO86t9uC63qfuJ69eQ\nEStKdKdJm1wCEZhcb+Fa0AzRrPNchE869kmoKtSWSWPtnL6voBcnjuyPeP5r\nOQ3Z4TeQaIqNg86RHfNo0nVAsWIjzR9IVX3fZdMIIEDd8zFhNU7d7jwV8BCT\n4ZkW7kn5VlByV9PBfo2Wp4Aore6RRhQs0r8VOObrduzqeVzxUSrQzhyKtMmM\nzYP7\r\n=M0tY\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-eEc+eu/xzQ+v38J+F44T9XYEVvsrrduw3+yt72JLQMSVILfukDgeDVUJlRnnyjMAuBu5WslwGQOXXlUgrVxhYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfQlWL1Id47orWPuxjlKN3bdYlGDA48mWwXyQW1Ci0ywIhAKvAAmh54WsqJ8ULA4brxYxkGMdMwacGmwltZffVMW6Y"}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.13-2_1526416333881_0.6681851952449915"},"_hasShrinkwrap":false},"0.6.13":{"name":"@creditkarma/thrift-server-express","version":"0.6.13","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.13","@creditkarma/thrift-server-core":"^0.6.13","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.13","_shasum":"1b90645f17d0a8745e961ee1426d82d35a8760e8","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"1b90645f17d0a8745e961ee1426d82d35a8760e8","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.13.tgz","fileCount":12,"unpackedSize":23899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa+0waCRA9TVsSAnZWagAAZXoP/jghuJTWdOuLwHv8SwEU\nqo5rOQuj36YXG6/M5Im8o5qxtHDOOhYf6vr+hhMi3q0i30vstqNGrwTmHPY4\nCfN853M1dhs02pe34nTQ/TuRy+JYvCGUaJpw0yoCNqYEEa4Mj/CR1QKvtcep\nM120nrBYLnu3+yYU0KxjDXMMblzD6enGGvDsBZ2NeQJSyXXcwjSdzdfTeXKy\n62UyLEY2wNssSmPm4gB2DSacTUe8+8eWon16v/1BjdWmAW1j7VxmiUPOLb4P\nv2Nhj+cebb0xhlBlye1ahAgRaJ8fDrCearzStanpgfxMOHI4deA5c1Lc6GU/\n77OjV/Gw6eIlNbNJ69iNdG7FeZPVz075eRPe2Pd4pRSXxqymom73LtSxLrUP\ndPklSd4hNgqkDXsHfcKjiHAkmL+5tmUreVB5xBHO5SuVQyliXbaJYLxyemmq\nH9UEIAEg9EE8Rfv1FZ57W7w3AMYM7Y27cJSuXIkuLO3oEvZDaJ8hOpNDdW77\nDhJ3eRDyENYdCerXEKqttvJu4vnYWn4oneVk/3L3WW6uCm514UTHTzrQ6yFZ\nFH/8i5/fqHpuZDvG+xaGOmC8h40FTddivYaBgyf3tNq8PSVKCfRbtT8r5F6a\npIBd3FAaiOXqzzLO2vY8SfAlwIWvQAU15oO51ci+rz1wGpjDYsazEchAETfI\nCceJ\r\n=jWiO\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-T/BDd49akqrmFZzpzxVCtHR64mqNrZP13vMldOYdeRNuhOi667VRvzwu5mE366iTej+h2YNucRonAxIsl1YVHQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG+fnPPPXRWbyq1K3nj1ekJWnkm/6D//NbQwSjWfVI+cAiEAt87iDY/m+gDr5p3tVtpO5K2SYXKmXw+Nh/9iwyVLZyQ="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.13_1526418457374_0.3349674213973002"},"_hasShrinkwrap":false},"0.6.14-0":{"name":"@creditkarma/thrift-server-express","version":"0.6.14-0","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.14-0","@creditkarma/thrift-server-core":"^0.6.14-0","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.14-0","_shasum":"7d8f3f17272eeff3c3f3df25555f2eb0d262690b","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"7d8f3f17272eeff3c3f3df25555f2eb0d262690b","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.14-0.tgz","fileCount":12,"unpackedSize":23905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa/gw9CRA9TVsSAnZWagAAUkMP/j9ICT+236OrBs9HjT45\nTDo2PmcrqniFX66tspdWECGtEAIY9YDMHUcVgjk93rZcnho22q2/J1fDGxKe\npVZeXucbcdSNxbjFFXGszl+nVuj4E40DaRuymNX2UrDEG8PsgszJ0I4U1HI+\nCSoLQURoyQmFpNpD2XfIzKVsDv6yNf3TnEc8Omu3HGXFwwmfvW52PXDbtMGF\nnznHgUZYXAmfWgyMQOC/kuQLD0AV2zCqLBHpEEw4W2i968t7BejhzOQekQOQ\neADunjGMX/RVjYvGoZRH5xvEItB8Pm6L3ekrvbdKEhtzKdv74FoIeLc01dX6\nehMGi4AlQTUSApidNCMAn2jPJ5J4G3Iaz+T0OVDD0m/gkOMEVZQbtr9MUu3v\nDqUsfV2f1GRvTFc6J8hQwp1/VO0ndJ9NGe8c6Y0u4u+rUoNWOEvZOccRa5UK\n+GcGvrQFgi0fU6ubHdgCDCbuz462Cu8OJJbF6ZGDk5mSFY8q4hr+TmqABpR+\nMWAx0VYvxJHUmDZBhqpWQ/llvLpOOAUTsH2NXqGYR+48oOS+I6cmYhSVLbm5\n+RUQ+N6/voa+oK/HhYUxr5rNTevnVcFIEYKBPbD9j58YTAvBNvxf8Njp5VF2\nRtUSoXaR4GsjxPez5MfmXGFeszXy6gDRBOLimwsh6yWrLxiwfoEv4gQrf9iV\nWhGl\r\n=yj9e\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-pTG8udr+Ph0ZMk2w1MdIbG6gNW1tJeQmRJOHLtqe7R/XcTb2mVc6ERiw4xSVzutJOv71THDZ8B9LG12NNOAu/A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8pm4ZLQol2r/JoVfHXo5/M3qFgGqVuf1pLFprszutcQIhAJXdVf/4BHEw6/B+qJc2RDYGcOAhMKIngt8z5qB6L61y"}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.14-0_1526598717116_0.33279874005016175"},"_hasShrinkwrap":false},"0.6.14-1":{"name":"@creditkarma/thrift-server-express","version":"0.6.14-1","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.14-1","@creditkarma/thrift-server-core":"^0.6.14-1","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.14-1","_shasum":"31832d49d428db36115cb6b1459f6366cd1c502d","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"31832d49d428db36115cb6b1459f6366cd1c502d","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.14-1.tgz","fileCount":12,"unpackedSize":23905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa/g/4CRA9TVsSAnZWagAAYHEP/20CSN1RzmX5Un13jCNl\nyJWQ+ldzV2II1rRvrIUCQH78Bm8gvMvxbFhyKpEru5GZuT3nGvnkBZ7469AZ\na6mAm6/FR12LWKx+VpqJwKYGL5rP24r2Sv2ClZGakyRGoVuJGzmZ0RSuUOII\nRWn9mz0/2avO2hHdc8MzKcqT+0DOx00KNuivK0kwqN7Wc6vAKMu9k4BFC+eV\nenay2RKPuBa2d1PgbvXazmI1sq/S4ipnnF+fsGBfSoIdtyhsmkgzDIiJ6e8d\nMlh9bkV+NJLQfiFaXJy1fkRLpkcXNfVWUq1RPnbSWSd4ikiGaVpL4fsiU7dW\nYbXmVvVxXFIm1svKzMTpmUGKXxw39x1jpYtG3CC+1PkfHl+1/m0+50B7q/Ah\nIJ9hYKB7JQXL5hiGIHgPTYEZ4LREznitnhr/jWwSFbkcdDcPACYRC1kn9jSc\nyCHAr/xzAYi3cL9txz0zEXUf7xDcEkot6XHBfy/tBvvkssWJ6O3SwDfV7NVf\nuZJ4ULBFSFG7z2XF8Lr1Q7WjyvAOBJyTuZ3gRUi8YFOPPwD7jxCTpFULzxY8\nYJ2DrT19O4ow2udi7XZyxUTnfW5njT09G7c1zr4LpIoFPHllqz+diPB73klo\nGh/TaFgsyHsiR8X2BmjLWYps+Ehx6hxDutP8kNyAo1r0bRTEYiPjMoq3ohs0\naWsb\r\n=Saxf\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-KCE6D8I2FcBAt5mDq1sl+S7aHUsjyqRKHp0lR3tlLx+seLy0XiY2IMm1poPTf2jwxFEthIGvJvAaN5Se8HH5oQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIET+BoM7cDqd41bgYh0MBGZ9uFBtdcDfeA1rqHMKR0P5AiAJO83RrBn28jvzhFdtYjFDNKerz0FgLDylA4ZWZPPMHw=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.14-1_1526599671882_0.3736541339220858"},"_hasShrinkwrap":false},"0.6.14":{"name":"@creditkarma/thrift-server-express","version":"0.6.14","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.14","@creditkarma/thrift-server-core":"^0.6.14","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.14","_shasum":"ef0d0d2f8f8e6fa2fc8787a3735825543a31aea7","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"ef0d0d2f8f8e6fa2fc8787a3735825543a31aea7","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.14.tgz","fileCount":12,"unpackedSize":23899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa/hRfCRA9TVsSAnZWagAA740P/019ykLKRWSbXQpH9+AX\noCySnoha6jV5Zy8QCKvIUaoPobHPraSBBspWH3ZQKGyaIzplS0VNba+3evTg\naw6q69TOBGoSj6Ft14PnQy/454+5rFpoeBLP7rda8ikZ5r1F6/Lxf3PJIYTK\n/YdjDxJhNbZPOsNBrPbKMj/aMYVtgxOrMclwXxlwyaU7S+H3X3NrzaS6CoDE\ne9H/2HSSnwxnRVqABqwy6mz+aJkv21BQzEjyrvZZwy60iCY8WaQ/6rwXnsj0\nmK4TY3w72Sfy3sWOXaBe5WxZVcIWnSaOJWOZ1P0hbH8VA0a5wcjdOAITkXNs\nXqwOKctUzRa0Mo3uBa2u8MD3VdzhPnikzIiLUz/kFjcGhXyJ7kA5ziDsaI8l\nI7jQ7Ht+cJuJ/y7eVQ1c2DRH6dnZZt9cJsJqM+bQ194BTEHIV7Wpf2LTTWdp\nKuCc1mcnK470cXDCeXDSLzUDkcyyBvhCT/vKo7VzwK6JYpBKKmFYekyGd/1I\nWFoR2jyLsyY/DM4fK5TtXUz55RL4PxL1INOCkEoUM+HC6TUEJSUCmJbWltEZ\nhvd/RmMKG2yYb0oG+ptAWAEIO7imcpAr+KbBempXkWJ+h30Vh3JA2iiA4Aa0\nU9OShgzYMugIUqQz/39Gi4+g0bJ2HasObfpwDSiY9BmyF2eYBzNkrHjil5re\nmKQ8\r\n=eeMI\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-QM9sg2nsqYZS7WU0Zsku6mwSl0W/81A9Hc2BEjm9WHLxWjJNToGZr1CCEUrcrdu0EqZM8PohpcoefDKWaCJrTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbvDpVpghAlAf9SyxEUcfg9XMwH100XJsL+cvLTbbmWwIhAO7nBvH9JRvc463DL6KoimpRoasY0AgzFRpmQRAynnxR"}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.14_1526600797838_0.2902108622272883"},"_hasShrinkwrap":false},"0.6.15":{"name":"@creditkarma/thrift-server-express","version":"0.6.15","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.15","@creditkarma/thrift-server-core":"^0.6.15","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.15","_shasum":"2a60786ee9f4978f0ae7bf2fb197a21601bd578b","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"2a60786ee9f4978f0ae7bf2fb197a21601bd578b","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.15.tgz","fileCount":12,"unpackedSize":23899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa/12BCRA9TVsSAnZWagAAgPkP/jyshvzjlmJYB9BFuOCP\n8Z464LtqikhDkcx9uwqKt0qusm40oRX6Uor1Cdh3RgJxX54EYGq5oUV8w9Nj\n71HbCqN2APyK8Fj/eNiWx633vYnAVrOaHj9m1wbQQmZNjzFbo8cQx9jgARBX\nY0eJ11xyryYHw6mYrLGY9hlnvGqOtGv0IYzPDvLh2oaplA3Q2c6ElfmNOTKb\nRdeDtbme0t4L8z4GuLzfBJ51daT4U6+g8CGX1eCajsGskRtXZKy9YZHRk4Go\nKFf8BkbTnRegSW0AezlTnIs3SdFGaHaavgb7ZiLZ9E33at4aMwHKApOzZ6iK\neNIobD/yAqgNfTtAo4vZFsyQymbHLvGNBMFJr3lDqlw1hSWhLADV38meCyIe\n3zoFPnA4kn/7ukCOdwCp6EdQxm9IOhscRUIcLRl3w+cHvVZLJwM0YDw4pNfm\nOQCLbm3i3xriqn3Z863N78kgP7mirn67OZQDKkEiZRMtz42AR12b8rfHkZ3P\nC5gVHjtJRdHH9IGawn6obGD7pgu40gE9Ex76sZDfTcnn5MwG5R4pRQQdMxVa\n9+PDPwz/0et3H7R369I1yFg5+oVuIl33/owSodKvmfi/lO3gt77QkAc2Alnq\nSkoOl0xfVNO449tMDUVmTczyqX8evsHba12datPgb8dyx4s1xbcKxMqjCXIC\n9ZE+\r\n=X/pf\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-QlVY1kp3FKyiAFvixRhIj8lbEXYKoq4FZqjP4jDhl17kEUTZM7BEtsp+LrVChmwIeCF/2V3mEJIUovKC91kjxg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCp+Q3wYHmi2gaDwxzEE/rTeaveRTI35VQ9B70RnYe1XAIhALR4qkMZ8JVamiti3yKm5s2PCJsR4bysziuKCU2C76sp"}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.15_1526685055163_0.30901942525773807"},"_hasShrinkwrap":false},"0.6.16":{"name":"@creditkarma/thrift-server-express","version":"0.6.16","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.16","@creditkarma/thrift-server-core":"^0.6.16","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.16","_shasum":"bdbac4e783dddf2e2536fc3603ca354a92cac839","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"bdbac4e783dddf2e2536fc3603ca354a92cac839","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.16.tgz","fileCount":18,"unpackedSize":24864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbBht3CRA9TVsSAnZWagAAN0sQAJ8H0l5n1sMD0WQ/W6wW\n9c8r9jh5bcUWcSQ3frHQmXFbMF6QCfbrN6vRQQ5N5LbPXpam58yo/QXmH4Gk\npX158hJ9NMVtbGrto3W2XVGAPXEA0GMq8u8QYSSK2WVP7rtBKSPH00V5XWSh\n7HrQoriHjkjS2K1ljn2OuzKlyx/wKCxDgbIMRPQQD6HdkHcDt+Hpk1e9fqry\njCwkw4JXj6E07G5QOo1N6U/rTTI3J6xsxF98Il23LAy9thjgz2ZAjfewqeNl\noLXsRvKIe3+31VF4LcxZXqemo2UBvNRt2zxDosoQ9gcBVOywzEzMEsrKdw9Z\n9PxLtGAR1YFy5VJm7Zfq4VaDDodnQH6s5lH0vlxLy3ewe6zWGryxl5bQ9/Ha\nLl63bubnrFHRf7Z6ZfeoHfXqj4CMm0n/Q9OHdM5McvNROOub0KVWhN+bi1ip\nDgdf1ew+SY2IdFf1nNx59cG37vjqm11CtVAMzMdpDu4OZ3iOk1KIZDABUqmt\nTbcJOguz1i48fdpls/ysZSnMSxEp6cFm3xu4yGNl0v4pE/ZryrHeOH2qrgQb\nnfQt5BvBbAzjHqseUzSCX88ze1ClGTZq6IL6ZAKf3OcaM7nPMK0QIC8MEypZ\nI0VKGFY7e6/Or1dAsDxSWRXX9bnsxQP+8yYCQvo6rsOBONgYDOkvpcil7lJL\nkSuC\r\n=fHCS\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-WtHWKJl52CsHiH2h+QydaGHj3dTm+OSRzc3TfBgZn/56h3SH8PAazkAOktWKl5Z0CN6+VCIAFpNDff3HY2eNow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGwNIF+FWuF5dS9rZPtr04QY3BayYvurQToWmHYeyT/uAiAdCow1sENZkASaUQhgQDhVbJh3DiZBSbc3avwPx48QFQ=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.16_1527126902184_0.9259900451512555"},"_hasShrinkwrap":false},"0.6.17":{"name":"@creditkarma/thrift-server-express","version":"0.6.17","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.17","@creditkarma/thrift-server-core":"^0.6.17","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.17","_shasum":"7e84cd2d987da58c5b6fcdc9016ac206d70786e8","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"7e84cd2d987da58c5b6fcdc9016ac206d70786e8","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.17.tgz","fileCount":18,"unpackedSize":25102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbBwBzCRA9TVsSAnZWagAAdKMP/23vltp4A1yt9G8xly68\nDg+zA/xdRS870oKnBZc+k5RWN55pP/9b6wNGwuY2Gt0BiNN60cNwo1O/TdLb\nDFyPG0xINX/KeIXh+P40pT8W2o9S3+yiYdAk98eSymH6uFs7NXhu3R2vRh+v\nYaLb0eOTGPX8BxUgycaN5iUozMA9iOZLj9ay2WdHCIlnzDdeqMuOyjWSxx0L\n3k3xllykdOTfgVi8sPP86pJkvSfLOe+N+2eyVrcCYuE4xuzE+KH0Yy5rFkP/\nbvNn/vtEuvERJWqy6F+mMtFjPcwz5ORuDA72m8UiZN2HmNbZGZN+Mbm2o5P+\nLW/HHGr0eoOvy/N7UiBsyp0ISy4HGtickphVyThyuB7IHc3rUxWoshtORIII\nacal3mw6VReqxv0KO6EbPDpR73hBiQUwt7RdL5FivIyoc5NzQI7M+F9jaBFS\nssGJzmV+schJZYSIFlcX5SMr4AjHMPPbd0/S/1UPZrxRJz4sYIG3zKH2YlWi\nyCrTuI9SgFy38KmItm1lZs40buy2Eaq+S+5BzsFRDs4i31EzRmndz5lPVDWw\nRB+3HkLbJ7FJXrfp1fTGv0XWp9VElR2tkDMO4YX3fPNrN2fo+RGMWGvdA97x\nfs6YjkdnmmJ3Zj06IM2j3wH3aqIu7G/rRemSZiMfuimwbPgLYoKOm1lvLNBD\nV+nR\r\n=DdGc\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-ym/rtD0gNsVoGf5/ZWIf7JMrqATrRL5hxi+MtDCVwsDOSelntke68OWPGL/cOgh1EJENNgQqjOcz0VQmYBX/8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxQnvlRtJJxfJdMS28DEfF3yBylqwwjgaMMhKFN97xcgIhAPHlhTumjx6y4AzkdE1Gq5PTb3rDusV1JHtxW/zR8HrU"}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.17_1527185522429_0.4196229901540185"},"_hasShrinkwrap":false},"0.6.18":{"name":"@creditkarma/thrift-server-express","version":"0.6.18","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.18","@creditkarma/thrift-server-core":"^0.6.18","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.6.0","tslint-eslint-rules":"^4.1.1","typescript":"2.8.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.18","_shasum":"1a5da27dde195bf011484ef1aa98e8f0a11ba6f3","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"1a5da27dde195bf011484ef1aa98e8f0a11ba6f3","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.18.tgz","fileCount":18,"unpackedSize":25102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbB6T9CRA9TVsSAnZWagAAL3kQAImdspo2HI0dF1DW8qrW\nOyIMSVxD3d+LSPPDTw0j2GqA7b8e5wdiKM/YRNbjIhejPU3oEgKG3GbV84uF\n+vJNVOtqwetBD6vCya0yR66L5V2R4psP0vL6rkCLmGCKNynIKmXFfH0UoCyz\nIUnQ02qq/+NCWN3/325qnonrWhN6GsKF4vEeQVezvW7wBnb3EriQKK9E/PWM\njqt4hVIpnfbNoHZ3DahuQs5m/ny0FYnEyi+t9tlVT9Es56K5ndUc0smb34mq\noEYkfO9qrCejRzWTf87KbIt7jpQ0v0WO2P45tcyNd15Wc4VWvfyMqc/h61CI\n/xZb9H4HY3KQgaNkgyNF9qXG/KsLfQmsJrTjv/Nd8FCnXhj8SJN7SZ/yx314\n33j37GKgcvt7GHa/LvVb8VxXyu9cYU1d4EnWkLcHu+cNvQGju3CGc4Nhp8sS\nIrRCR0338bXQfYc43heTacXQRHYhmdZO3zwGXViZZR0jzvaDljRgbG5q8JQy\n9FgKZhOXs73QhGft9ukq1urBYq8IWuzpew51DySciigokOWl8rxSNm2IZ1Rj\nWl24RqzbBGubpLytn89lMNxSB6EHy9EPTKF9hwZbs34Utl/K/e6g9v5ldctM\nwI6HTf2qeZbd9trnLm58biaBObKq0038fM/yhSqhROM9WZh/gnrYI2bcZ/6g\nlyyE\r\n=hXUB\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-iGP/wTDu8jB8bbW9V+lYssQBXEPfwMKGX6g2Tt4Bysh0tyjMjQX3S79+wyNhrEpbbr0QIs2oJF5IVmyt7+o/bA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGs7Prxq1uh8UJ5wAl7GRaQIqUwrFPpjeNfPFDX4QCw4AiBNetrjbBchssBviqjZ/P3w9n5TQ6sW4U/TXd20xNe7SA=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.18_1527227644400_0.8616235963328263"},"_hasShrinkwrap":false},"0.7.0-4":{"name":"@creditkarma/thrift-server-express","version":"0.7.0-4","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"next","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.7.0-4","@creditkarma/thrift-server-core":"^0.7.0-4","@creditkarma/thrift-typescript":"2.0.0-13","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.7.0-4","_shasum":"46ba355c5a337ded58e6c31a9f14bb56c0503f7e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"46ba355c5a337ded58e6c31a9f14bb56c0503f7e","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.7.0-4.tgz","fileCount":18,"unpackedSize":24912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbEYbvCRA9TVsSAnZWagAAU3IP/RbotBv+0EtbeKG0upLE\nu8vaYYaQxsryexCH94O1FWskVTWC0fIyFjN+dePNEJiQu0z+AKxMYDk5d99u\naUtSJ4sUCIahTR/3LNVlUOJP/n8yrCywZ6rJcNjSfhTfu6uUECUKHJcUn9kv\nwvElykmPkJCnaMOte6dbxkmNHARaZAi/sPtdhiN2FqKflT5E2EADel8jOiRi\nd64xD61m8YMLpyCeHzxdIe2EM4eoPofWRMmRU6t+KCWyqKIPW5hpt3bsGkza\nkn/fAeVOjZ3AXvZG7gDNE3XXYHAfXRNrFAlQ1LvzCrxQyG9VXuSZINpKK9FK\nsXEIzZQeOTR+xkOzCs9WZ3RezErBuBU+bhcTIbqqqZ8BlibJZoOEiFxUxD+3\nZPTQYf1RLWeUjT1ylaANUZqf23Q0qO+gJw7Jaxd66+bMCSDEsG7dddMGOP21\nkZA8ruIRXm9KohkYHqXOU5S+4aGYmswnKZMw1MI2pcGWTES+4Jbei9d93ZML\nvmNVKcvtZ3dSbLdX7j5jBPBTkx7oDbF3BtsbirRB8GfBr6Kp/V//AoWTlaLJ\nX8KX5vWIYtmYrM5X4s24o38gYVbmNCIbqX2EV8tJmi8f2x9Bneprh4klmze/\nWz9T2DagC2Le/jKCuIM/NJt2bnzaKjVvYUJotJSVVuncL0zb6XN5daUlhluH\nAihc\r\n=p4Zh\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-LktYIQAkRBCjdN57J6ycG1ktZ5AlpOSgvfFCZGx9fGMxNZVvzgBEnclSLfOXlb/jqUVRpmjQ2PkSkU01jQbuBw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPhfdOC1FFzek1+zHojTTyZZzvj7F6t9bVzLqIsOo0HgIhAN1U7kai/07rxfkyoyqrAHYKn7ULBODLvb+P0m8Ot/in"}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.7.0-4_1527875311192_0.5700751156076125"},"_hasShrinkwrap":false},"0.6.19":{"name":"@creditkarma/thrift-server-express","version":"0.6.19","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.19","@creditkarma/thrift-server-core":"^0.6.19","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.6.19","_shasum":"dd2d5993f9b0ff535a25a8d1e1f41e9fd41486de","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"dd2d5993f9b0ff535a25a8d1e1f41e9fd41486de","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.19.tgz","fileCount":18,"unpackedSize":25004,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbFYYgCRA9TVsSAnZWagAAUgUP/jOh5JSesWD2ntLDUCtj\nQv0wFAK5cgkGlQ3DNf5B2NjpR6gzTgMpQbnacXpEdJdDFPIt0m3zhwfRVDas\ny1PmOsyjlVQzJ8aN4F8n0slneDjjgFq101oTtXCr4RzMLK9y9TOWLs1hHWlW\njUZ7BrafC3CKBZCjx8sk7Y4TfYSuoo0A+izGmP9Ep74AuazMZN/n9IEDqtFq\nu0rMtLsQKu/95cQXvlWwn631UC7b0WRPJzVqhxXOIycJC2EYcAZeOmgUr/kJ\nrnQf9z9tE61BgevfRKFWVk7pk61mSn0XpwpkeycmS6uoEy3qQgaidyasJSGM\nhVCm5vGzYBATk9bdLqNupG+Y3vLmD/HsBbpm0XTU3Dxui9J8mmURD7pqfDOl\nGnzAvSUsU1C2fkCZF+21lK6BtAihEJWl5HSYfSHexTGU+8RWgehbY1FmWrEr\nD6V6bTH80nc/pKq3Ur5MCmMURmS+ciXiUvtnNpMPrUXUQY4d7NudF5t8O5NI\nph0ktSrtl2L+lPfMTN9S1rm7HHZY/oZuGA4sdJx5VQU5sD0LMe12NDbq/fYM\nDCpCpAJMCiNBflojc5AJbiP7hJriJSzIuqNtog28dxkRfx1mnnbQgLAj5pVL\niEQuUiL+pjIwyQRDn2OVK+zvE4LeFkgClqE+2iAc7nNpB+s+EFnZED3hbFFZ\n+2Vt\r\n=v9Mv\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-L9UiGnBiOAxTt2+quvqYHc/UaaxbkTtETuPN7mSg1CIslozMATrADiiOZ9CMf5BrRz4ug1Rw29+oEOenMEXB9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID6uAepsHwTK2Bea3sZKCUWh+8OK5MGLW4c6IUpj6bT4AiBPCyUrnf5exd/HlEgM+dDwJEJ3wf8wzK4eHiczK0hZAg=="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.19_1528137247745_0.2900993213052159"},"_hasShrinkwrap":false},"0.7.0":{"name":"@creditkarma/thrift-server-express","version":"0.7.0","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.7.x","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.7.0","@creditkarma/thrift-server-core":"^0.7.0","@creditkarma/thrift-typescript":"^2.0.0","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.7.0","_shasum":"35c2e77bc4ad16ed5c92a5b2aa6473c8bbf0e853","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"nnanceck","email":"nick.nance@creditkarma.com"},"dist":{"shasum":"35c2e77bc4ad16ed5c92a5b2aa6473c8bbf0e853","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.7.0.tgz","fileCount":18,"unpackedSize":24905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbFaJICRA9TVsSAnZWagAA0xMP/AhCv1qTGyd2d+f5XQiG\n2sAyMKsh7DLzDqkf57ncmb4hx5g2KIhSnY3JMhM6rBJ8V4FrRM2RmdGlopb9\nRXrS3a1EW61/02/9UhfZOE8m5/R1Y/0z4z47E729tJRN437jAlfp5FXNJB4m\nwiTReRkf+MSQi4GkTLuJoGXseSeTi+5G2wh6DUShNyTBD7rgv/8ryDKyx/Jx\n326Pg24uykBzgqYKTGba1ycktP2ROE1xdbyGvheJJ5pT+daq0+15fK9gu3HE\nA1uIBvCjd9Qfu2YwDraHdq0kvD3od2CS99PhDl4HdqPiS8rOeSOQOB7jNLy7\n5kwJUKJgCnG8ODI8b9x1lz0GQfqVrPMTsDIxIflzB83ASyyoMdlHYHcE0rfP\nEIiX5WiK4G8qDeEz2m8o+qPoMVqFQz6x4Ufxj2PEh2vsJANj0j8Yg5+ddRSX\nzV3wlL74ABzCLZCSNQJizLAlOQ8G9E5u5vviEF8IwxXsPoOMgBvcPRqPyGPI\niRZFlGVqn7HLdCPhAbLhYYH1boDZHT+tk2GiYLVX9gL/5oSoJ4F2PZ0yhqIA\nqMLC3fW6iOBQlEhdqYFK/QkohJaJm/bGEcPsSNh94JUFFT8g5vQq8mSYzJOi\nCG43RNP7zh+WjtatvssmKZlJevB2nMCJ2zLPXr6Jq/sky3V05ZhR6ZueCfCC\n54Bk\r\n=Cl8C\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-36YyRkHhjIT9vM408WYh7lUdbnYRdJZp+CS5+U6jqcIBeaUFpydzciQxhIaKYX47YHPbAGMlAuMZf4EENoYREQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKHYXbJvAwNseuOS9ZIs33aBh1xungIa+8kUBKgXOuCQIge9hMx0XIVMwVkt+ZF3VSCU9x5ibN76+I648O1F5Bly0="}]},"maintainers":[{"email":"alec.ferguson@creditkarma.com","name":"alec-ferguson-ck"},{"email":"ian.harshman@creditkarma.com","name":"iharshman"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.7.0_1528144454985_0.9831624065137374"},"_hasShrinkwrap":false},"0.6.21":{"name":"@creditkarma/thrift-server-express","version":"0.6.21","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.21","@creditkarma/thrift-server-core":"^0.6.21","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.21","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"ouranosskia","email":"UGAPiro@gmail.com"},"dist":{"integrity":"sha512-LZyVIInisdvAwiaBQ9yXTqCOzpw1JjbUM1KxplirUBo9jFpQS39sbvwBWahdUt4ia4TMS8vZlyF7RMqmPBIv2Q==","shasum":"7172332d34cc8513b570b8bf020d62a4a3fb7e6a","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.21.tgz","fileCount":18,"unpackedSize":24939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbI/R0CRA9TVsSAnZWagAAhsgQAKKlGXK536Afer+EZMpY\n4NS4Ps63rHGNjwNfD9ukyB/P/4zUo+VKFYIYWfBqQDgNdH3Wu0Dv0DErDjEz\ngc+OeJESpm3hS0ihVQhfLRFq37APIfJGS+LDi8X8aKxf6qJS6floowTArCp+\nzZJX+FWSAMdFY3qOuNmjUpBOWVgnANmgI/J6s8TqMUpOruq9/cJF3t+1wDgN\nGnih0xwtbwHvH2Isws2wlyv8TlU03hqjca2kzmwghx4NCaOxN2q+AHEoBGE+\nNdowiqt67uamk/rtV5CmkHbYqcy9DtvERPTSZ3HiLrpB6EsvQCS2EYkoE3O1\nItRkeHzREOQ4sswq1/hobBGuKMQ7smhBc02aj0ZN5AsujcOCVtyDc/5Av7s8\nLSR33UVszOjbiOwd3w7QI4mI/D3azkpcZrWmWFiSLVmGMmFLmDjVyXMdNPjn\n820c7bib6BSPPIt1zhCE1xYWvx8sM55rmkJwDHR/Z3B8WfkI/mfNIAgTkNIE\nIGPaSeBTCD2eP2RAF99vHN6jqHMuc9qTyXT71MZtiN3kR+EQFulBAXf3m92n\nnejHtlXQX0eKn+YZAzoYrsQ2psJVZqtjxxE2JpQ1Hf8An0Fo7QQNhF5LMA1I\nNuLkAMpI1tGODBTWTpxL7xBn7+k5L+Q9xvERBOJh6/Q3GGnXR6g7VgSQbLHh\nUiN8\r\n=/nGK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTyGJEn6uXTKetTOyTpv1r6jQUuBqhLN2P3afMUzj5GQIhAPUAFoorCp8QM7n6fhW1kkVr+Mu2SN23NpwEvfLg8rAN"}]},"maintainers":[{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.21_1529082995723_0.5522550356693208"},"_hasShrinkwrap":false},"0.7.3":{"name":"@creditkarma/thrift-server-express","version":"0.7.3","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.7.x","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.7.3","@creditkarma/thrift-server-core":"^0.7.3","@creditkarma/thrift-typescript":"^2.0.0","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.12.0"},"_id":"@creditkarma/thrift-server-express@0.7.3","_shasum":"ce38a40de648f4d7a8b1c6840c0d360f538a922d","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"shasum":"ce38a40de648f4d7a8b1c6840c0d360f538a922d","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.7.3.tgz","fileCount":18,"unpackedSize":24832,"integrity":"sha512-R4HLuCnXURTC6pfZ2Ec9hIMAfwp9uMKfV8NJY2kI6nn/4PH3NB4zzhBSVs/xaaq2WczPdTmI+SJ6/2fw5Rn6hA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+LJEK8mm0fqgIlO1LP/MQOk4l9mT73khb6vc7hcSdcwIhAIN1QLYo1WXaQEE6EeQBxhbJI8UcqMQPSC2TDJXPWXQT"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.7.3_1531162087871_0.22735289000750525"},"_hasShrinkwrap":false},"0.8.0-1":{"name":"@creditkarma/thrift-server-express","version":"0.8.0-1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.7.x","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.8.0-1","@creditkarma/thrift-server-core":"^0.8.0-1","@creditkarma/thrift-typescript":"^2.0.0","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.13.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.8.0-1","_shasum":"dc1cdff70077d839c7ad191446fb9a7ba46f1424","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"shasum":"dc1cdff70077d839c7ad191446fb9a7ba46f1424","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.8.0-1.tgz","integrity":"sha512-b6Sx9DTb9+ldj5a4c0t2w63oafVdvTvDrZwsI+cTX6PEMXixsh+7K63HaKB8i2XfLlg11rj5Cp90iB6ucTXIXw==","fileCount":18,"unpackedSize":25869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdaXLCRA9TVsSAnZWagAAkxgP/28bpMS0X6yAXdjWNmHf\neHyPbIa+Ttgw3cBWxQ982VCOe0F3+A8nWuop3Qu6VquvXSLbT1pQMIJT+lCZ\nRO/vMw2yEvy2rYa8JaqyPcLt7Q6ARsXehKPbXEaDzJaRYCWw+WwYK+GcDUgJ\nsaCnwUNaQgweKc/3RR9kZeakEWqthwLPQnFxxuKMj27b5tKOAP3aq4XDhtl5\ndKyKwB1qr00OOsf5+x9f+RQhNPCqeXzd1DJa2L6iVQmmExrhhk3HCNT5cQ/Q\nbm4afAYpwhGP749fUXpG2BCANAuB+/SMUbmCXjsGYaozaExY7Mu7+9Iq439J\ni9uYSgVrItD9UixS7JwpwCBnu9X9mkk/gKjwSdS6BTHDPCoDmibsCaIJrJqC\nkBphTcELyvP1W33MnI22igTBx9sOIZwLz/Tr2Y/0Hm21Am8WDZ+8/C7iJdpv\nGZEi6YX8A6KEfUP+ZbQqRLhOECCwGITY1hlRwNchHmwtPSRtuEctOWn+eFty\nIsmoTrJINVsZ9M+C/JuCtQDbf3p1ottcv0lCllwfR6+vpR+4eCRV3X80bPy7\nFVa4FmqE15X0w8GeJREA1FO9YaHtYZx8vtxemsJiOqf4EOTvG7yhy0c8z6LN\nk1PMOHsA5Z3TcYXtfYe0Cy+HNIwMjQnImCvx13+zAaGBA0WvvYCzyfwFZtkp\nqFAo\r\n=T6Cm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHTd3bBwKWV//8bG31uFFQ+kd15w+WSQxrHGRSKBnEh4AiAIQ2vHp9dxXDgdkvF2PP9yEKMNSIP6lBaICEqAiN9vYw=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.8.0-1_1534436811441_0.34700552103505466"},"_hasShrinkwrap":false},"0.8.1":{"name":"@creditkarma/thrift-server-express","version":"0.8.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.7.x","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.8.1","@creditkarma/thrift-server-core":"^0.8.1","@creditkarma/thrift-typescript":"^2.0.0","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.13.0"},"_id":"@creditkarma/thrift-server-express@0.8.1","_shasum":"22d2b3e255ccd77e2238b31e8f94e104a873b5db","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"shasum":"22d2b3e255ccd77e2238b31e8f94e104a873b5db","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.8.1.tgz","integrity":"sha512-HydJGAliXlMF+MtxwGk+izlFlQEt+sFkC7wLTsYbu/TFNdsMzgbnNbeck/JPsEUf3EImEnz66gJGspJvH/7CaA==","fileCount":18,"unpackedSize":25863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdfKhCRA9TVsSAnZWagAAh5MP/1v2V9gbTMapWPlSFlB3\nW6dC0S1aBy3Bdhtjo4YWiiB45cjghps77zyGxMq/Ol1zoxN7DOcwafy+CF60\n/0XUwIYK8uXWbXajTE0qKATxlG52myQ9adKJQ1/GoSg7hZTn7jBonxvkuhRl\nzg3RD7VxbiR4rSo9401cjiiH740whS1RrcVnCG7O7bgq9OH9/ueAbuMQNMir\nnDyQC65gbxz2U55mB46nOG7UBEb0y7Gcjn6Yo9QZ43jjcwU3wEQT/vmXm/tn\n4aVVW/qrHpsIUANxIYMqmGx6oh28ghxqulnVAG9ZHNRWBRdXOjUY9qa4nwXu\nwKe+FpShapxmZoADec3q8wOTSozrulOdPGGiuKaGPI57+dtC9n+2QKTb+oHG\nH20Re9dKWsgGNRPSWNpeMSTd0GqTI7eaQjoCz/YuS6wqrNPGiXHGS2ZJZdIk\n761jX2zTLqh4FBjPA0goellxNm76kxNZo/s7W9mCxEu3cuin7EMbkOTtnF5W\nEXVL6yNeA8YtFcHDY6StDb6mzGiANJZgrduqawhXCgfSNwasiaBmSLKt3Vv/\nSamh2MIZ5tKC9MiAXHREpRf/Ggbr2NaEIlyhV+POQflF7ESZgFGsYk1LbEfm\nVv2VJbMWjTjzbWMeP83Gk0HJWt7SgWVLBxWRN22KzE0NjfVUNISmv5pp0v8N\nDH0L\r\n=+qTz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHTJUJL5pEkfDk9op+U0snqUKXVU2xE5rVoJAaDX6hYbAiEArmWnwxjWUVgNfUAePzoNcI2HeEYVBRCHKQM2e3ZpQao="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.8.1_1534456481293_0.2187872330171563"},"_hasShrinkwrap":false},"0.8.2":{"name":"@creditkarma/thrift-server-express","version":"0.8.2","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.8.x","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.8.2","@creditkarma/thrift-server-core":"^0.8.2","@creditkarma/thrift-typescript":"^2.0.0","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"_id":"@creditkarma/thrift-server-express@0.8.2","_shasum":"058b5a4aca554fca3e149818fdf2558af8c76673","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"shasum":"058b5a4aca554fca3e149818fdf2558af8c76673","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.8.2.tgz","integrity":"sha512-XFwMma/8zW+Fx6VWkk1VDlSt2TvkdKKItlafWRPDkhOyPP06mlcKGeTw1LPr5ir8oKmlIatVps/HBgwVVWlCjg==","fileCount":18,"unpackedSize":25880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfdlkCRA9TVsSAnZWagAA35EP/jERAlYPG7iIgHgiI+kh\nVjry58ydTZrpcq6iLo0LaV0WqCc8ivufCUTl7WzyVQs4H5VyjXHCFLfabjQI\n6xC5sf4uwgaqYJoUORBpVLd7z+ZIx3qrhA95daMugK0EOXw6NmnqAQubONUo\n4ZwG0//lmkAfwGLU7SSRwfIJNIOb/qoYVir+2ClHb35T48TSGWjmqLbn5UMl\ndr6AEW+xLbiPMEsYWvwW2EXP3SmInbbClFoA7M/EDjk3qIHyyBvFs86K2KiF\nRYcotA+Ena3zALi/mKj0rSD+EmKGE16VfCESsoIspqaBpUsmMGzJnQGXD7bP\nlMhcN+OhMRipSrSwk75Uo+ncub+pyAJ0chYstyraSPnjBELSbVlwkgQuml+K\n9m9hXYQN3zDkZkUomAzMFMF4zU4vYyilhp/5E8frMx5Y23B0ZiWmeVofVyNq\nGgYnWBmY7szdW/Oi91fSUVxxM2p+ftvGZlqgQyVcyybhr0N89F2vIRgJ4Zpd\nIAeEAbPSPRB2lxnTeIF4nzacRDdsfgnuZ9v2T3wPsVl0yczTUI1LFH63qvLQ\n8bNsIDtDv40UqNLMUIG2SvXX4NDibLG8uch/3eXbk8cxcMMGzqQpcdnuNlOh\nZesyLdV1quFowTeYSqsLwzLv+WEdmeBPtSLKKjEPmqijOiw6aY9Y3lWM8vGc\nHJWf\r\n=5ib+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDc64i2Gaw5J3aWzhhoECSN8CU1DeLehrJLW7UCtTNckQIgQLVYAlzbSqGUZ2ja3SBenv1HdeNkDzqXBwP4EfVllEg="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.8.2_1534974307692_0.7410548344329504"},"_hasShrinkwrap":false},"0.9.0-alpha.2":{"name":"@creditkarma/thrift-server-express","version":"0.9.0-alpha.2","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","files":["dist/main"],"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.8.x","@types/express":"^4.16.0","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.9.0-alpha.2","@creditkarma/thrift-server-core":"^0.9.0-alpha.2","@creditkarma/thrift-typescript":"^2.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.4","@types/express":"^4.16.0","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/request":"^2.47.1","code":"^5.2.0","express":"^4.16.3","lab":"^16.0.0","request":"^2.88.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-eslint-rules":"^5.4.0","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.9.0-alpha.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-VEdri+ZP1NMhBQYGYPl6APc2OBWD9ku+hFJRDC54anQEql3gPOc7Xy/2EumgBQBd2xf5NoLCGZSwetZWm2+hmA==","shasum":"3a9d914af031014540d64c1e74a73bb03ada3569","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.9.0-alpha.2.tgz","fileCount":18,"unpackedSize":25927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhXV7CRA9TVsSAnZWagAA5pwQAJ9ufKNQ3FsxZK5joc0A\nnusN2x911VIwzuxGFGV+/YhIjBwp5/8iYqeIHLjAWS+GPRyq4ZyDrd+3LCYb\nd1mgidHQR/LlQmZ76XoSbrT6dOgcQ8Qw4GkyOPXbEPqMc9feyg02S3EQcxOr\njufwwUE2PaSZqemqG99q8AOJGA23VI9INC2ysbDaOmL2SzcHr84hO8HX0hLm\nBE4JNIixW5Jwp12w5YLLDw+8/pgLdSNIcBdfoUIRjgs9L+0IfsKfGXkSg0XP\nIUtcv+femqP5u5VDa/5QD3/O3PWbfpLSXkxfL07Z5oN6SB394Dql44Tshr7a\n8vYGvd5Vm9cM1kdWIbFFaOx39KFMfKx1C/DeZePCzyL1Du4d9JV5kDvCoH1p\nn2on6SV3b3GPVnH+FArSIBJpgFjedLj//2JQ/guIrNow4C2vBOSIwjW0Emc0\neytsH1HLRkagCibna9CGNqNQSSerQQVsmp1Xykze98sCxPr5fgUzdWrAcgTe\nZ3TUYX5uCUhtvi8JtmTdUUAaFz/IrChMxub95lX/Pf4UxKd58YbrYJCdmpw5\nI4Wwg45YKOhmuHTUA2m82hbSyHr6o88XVlwBGdSv1UlikcHJWWmFFbcbSX2B\nho8081PUfyoHyCql3cz4gIY9J1czlatGDcMiUGhCpQgSPtb67xhrvwYI6BwL\ng1/K\r\n=ET1r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC429vqFruCJyKZaKj6p+j8R/AvRmzDSyW2rQI6RaQVXwIhAJsGS8bV9Uz6bcg72SnQFaKLnKFjYIhUWEDlaHxmUcym"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.9.0-alpha.2_1535473018861_0.43407648506070284"},"_hasShrinkwrap":false},"0.6.22":{"name":"@creditkarma/thrift-server-express","version":"0.6.22","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.22","@creditkarma/thrift-server-core":"^0.6.22","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.22","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-EWTawvUSSGjv4zY0tivJLlpMKFjFvJsPjrw7nBtJufyPLE3jX0GA5IjpJvNEWnMoJEW+lDbBxybh/D3QsVPArg==","shasum":"0d0aaa6512fde548e3b66a1ac3922a0b5fb1976a","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.22.tgz","fileCount":18,"unpackedSize":24939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiDvFCRA9TVsSAnZWagAAjrsQAI2NDwAecupxasYwhJjj\n4ABPdlPUG4XePIoxH06Ee6XQ28JDapcmtU42qyAuCh2zspBGmPZCSP88LCZE\nCGUKdcxWx26Cn5tRcrvWaN6RtR9VUl9k3rIqjMMS2WzAmzkQjUDCoccvr82N\nAAB2ziYieKmgz35RvZcvV9Adp8fUgoLPL8S0AR2DxIYyBXYsvGq4aG+pIl6/\nuobdMXj8BulMfgXXEjNYSmQcKWWAAqKMD2pl68tWUXLQWbB9F3bBG7ieHiqu\nlHzxVLaSI6yoy1oVnTj0gj8/wdfQO7okmN2hqYcKUOI507KHZ2u3giU/zs5/\ns/Kd1hwaVqNy673g2kv8S2NG/wCbZR3wUJS7th6nlUHLLcSb+6i6+am3Hefg\n/jvEh8+kQdrWLn2gRoVVMjv41QX+UvMKc4VJGAFMTQEo8rH0D8FD8ppZ7W/c\ng44QY3vAu4IUhbXyvJha8fw62ETql/TJTfZjgxmds80/AfoksaAKAh0p0orV\nA1+RW46k8MCoPK2fpYnw/+sQKPZoZhYfOVMZ0SBhCgamv5K6hWio2vea5nmk\nQT3rWE0IWPfZzcti7ApucNvMgvuKzRWJrzF9OM0tSFlXHFmPp7GAfw89c2/T\noXoLbjBoEQSD+geoz8vXkUD3W9o4qOtclkBm/8TRL9WVY/B70fiRaTIgLDFr\nr+OK\r\n=PhBU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBkF76Oz8FFh3ew7frmtRjJsShMzi3UBqa8xk+PLdo+gAiALtFyA5aZSggJjUK3MbcovM8Z/HGXsa030dZO1b8IU3Q=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.22_1535654852854_0.4711990602374099"},"_hasShrinkwrap":false},"0.6.23":{"name":"@creditkarma/thrift-server-express","version":"0.6.23","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.23","@creditkarma/thrift-server-core":"^0.6.23","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.23","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-3sbUBeP6ExYwfbrFVrN52q5Mp9KxjueIUpXrkhTdMUcjtds+uOe6yvtnP4ebj+kC/5kxC4fv12IwfAXJvlAkZQ==","shasum":"6698e4976588cbd8583762e767c61c2441ce44f8","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.23.tgz","fileCount":18,"unpackedSize":25369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiFM8CRA9TVsSAnZWagAANK0P/25DbOy2vDLl5FTm7vza\nq8Qxy5NGXST4a8gmsg8PCVo/yqV8rIIeJZVxh2TZNndekvfjYLLxUw9iC/hp\n/CEn6OUUXTymmLRAhUsOc/DJoEC/KEJXT7hXoFnvwZknUIIp3jQs7Yy9dqgk\n0/p9xlAqVf0M/Wx0b1rL46UeeaD+8ZJ8zqpe/1imEzn176VkDhHCtpiYsmZv\nOO0AJF0VUHfMqhlpGIpY64z1s9aI2P2iV7dmUv+VL1fsw+cfxyclfJJK0/SM\nRv3V6Fp0mq9+o9x+SFAjO5Tw4HVe+XwU7MA2BCS9RTDJ397Q634ETN+owhqK\nfxJfYRCGuAubCf42MFThYClEKxgEk0qZoG981c+Pq49NGdApXhh4RKEaEBt7\nu3HXYAELxq7e8yoXNc0i6qr6sZ7XA7+WqCUzx8EtfOKrNRUxZN8yLp2u8AYU\nOQdS+ccuSOM5Yywhq8EGHiL2PGGJSvQrHNUmMGATh2SONI0k3BbvtyQIRnTq\njjS0olb9fbFqdB2Zzk1duJDUR68DXlnT9IwjsYPQpd05qraEilVJwPh1iQoY\nK0BKSAD/2dAKMrzhE7JbC3Pg8RhSuSyLHtTWMN/7et6pG7IsLQukp0PyHOzV\np2jCFHUXJ3+fxe1HbTvDhhBzPTpZ37vwGHJXH4Dj/4LP9eciV9U0lOBixQAP\nkM7h\r\n=+Isy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyeKmsA8N0EtjInZdgKdDVp5+4jQE+YJbYB7hNaVggOQIhAJ6n6rRQP/kgyISW2bcT5ItRQwy7h4dfUyQshO0Nk9+S"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.23_1535660859808_0.7254716019106506"},"_hasShrinkwrap":false},"0.8.3-alpha.0":{"name":"@creditkarma/thrift-server-express","version":"0.8.3-alpha.0","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.8.x","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.8.3-alpha.0","@creditkarma/thrift-server-core":"^0.8.3-alpha.0","@creditkarma/thrift-typescript":"^2.1.0-1","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.8.3-alpha.0","_shasum":"689b18c080884062d98932ecf19c06d6cbca51d9","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"shasum":"689b18c080884062d98932ecf19c06d6cbca51d9","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.8.3-alpha.0.tgz","integrity":"sha512-g7fqGs+CIkvs9/1hQY1KJtvb4vDRzkJC8C6WQc1DSjkbSY41TNy+fXuNQjDGr0bfTR/Mu6whhLeGpm/gf4Sf6g==","fileCount":18,"unpackedSize":25906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjtMtCRA9TVsSAnZWagAAU1wQAI9gESHJBnlBBdKWUq9E\np0pn2swvj+dluIkweye0ofYR9hYTBZuVkcLYRFnG+tH98rYbRMS0f0eIHMIH\nf9volZUKR2M6/Ewzyz8fvFhdp5hgqme0GqGh6oXUPieXbhU+eQz7+5ncbWlh\nYB3tqasFLHWLJVfP1diuycEwlNh7aLtP/TtBlIE71jAdce2d0qXc55nwIkMH\nWoT3iezUBnOPKXu4tSZiZdUMVZVhhon2cLrh8JWsbMXKsYwCPevE7XibaoWt\nYPDQ/z+TIs7bH1d9lYidLD1xllzgUj45PTxcAzFPAIx0j4pUMuIT/HbhSFmk\ndCKsXJqfT2axDtGQ8zfA72R/UYm4BQ1J2qC3irzUFpX98Ial5lSsCi5OUXH/\nn8oNhJKhOmIkxa+RUvEwQFQT6IddtFlro0P1khLgkXFIiamhCDxCIcrICOXj\nOdm3HAhokd91LMycNfc9Bq77nGArec8gwIJKmLtwnxk27SfkX8BV8E7Q5V/I\nPJxVzxgAsT1NlSUo/mpIAfBjpFtezuDH/JeJ8l7Kss22+jGoeATm60fDk+FH\nr094QCpLLyX0vS4o5IGvDCiLW1I5IrP+mjxM/KntHHaCTMkWKHBGa+wt1caL\nTp64w1AglN9859ddc8XaGo23I4DpR5Ufy8zmgU79xsxRqAqfZvpLfsl2Bh1t\nR0QK\r\n=2ywv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOZy6oauhp68+4PcLX4LJYOAxGeBT/gQ1VfgJCMP+h6gIhAJT029eUY4+7j9FfeYQoUcPYQlq9s1JQyqYVMXNtt25q"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.8.3-alpha.0_1536086828863_0.29427331026753456"},"_hasShrinkwrap":false},"0.8.3-alpha.1":{"name":"@creditkarma/thrift-server-express","version":"0.8.3-alpha.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.8.x","@creditkarma/thrift-typescript":"^2.1.0-1","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.8.3-alpha.1","@creditkarma/thrift-server-core":"^0.8.3-alpha.1","@creditkarma/thrift-typescript":"^2.1.0-1","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.8.3-alpha.1","_shasum":"dfb18fc41b9815ab4234e48ac6f1cfc5c1a00ebf","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"shasum":"dfb18fc41b9815ab4234e48ac6f1cfc5c1a00ebf","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.8.3-alpha.1.tgz","integrity":"sha512-4dnhnY6Gh9H/YkZyvFhCtibTRYdP6AD1HRaZYNTPpKxYwtWhxmkahQgnCcrVnrFsstmtHNKSdZfntwIQKfvw4Q==","fileCount":18,"unpackedSize":25956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjumVCRA9TVsSAnZWagAAV2cP/RH6qETwz0SVRkV1sJph\nrhXswWEiq9Oafgh4aRhjTJoz2UOAj+WyEARbvDBQZr+uhQDcXIOfmntx4KSP\n9q3OAzaY1uSbRtZ+4FlxYYpg7APwAWSfU1838spZLN1IcxmfuBSAtHugFpSK\nd4j3ymzY8PKzhGCBoKmKGup0JtTDzjvU2De14sUjzEyXaLVtacq9HXTMI0TP\nqUD2i31QLL7F4rO5EM3kZ0ECDs1GsMSoq+W7iDw1i5ARS8LO4jjnrguyH1w/\nkHWl7fj9H2EjhuqG2SLQJHygYzvM13+5f1FVR7ctMLoGOya29XxB1RCAgJdH\ni88KG5HRhj7qRVPkHiuAj7rWPzogu9g8AXxzsvCRaGnJdXiLK49QY4YtRgNs\n0LcjVemQjqHTaR8UndSltrmvO23Gip5S+WJNHVTzsEhW/dgIcHARoQ19Yt6n\nRjEhSwbreO1FFxC1Fwaawy6M+VWEDaH4Atya9ScDTM9UlCF2tHmYWk0wQjwr\nXttTexYtOtKPVafnvaj74ZhKtORwo8GZkkQs+GYk/5sjkhqlGCFIK3807H8m\nwAlTxIqFrzy6p4xgaUYglv+vcN3NKn7rFg1n87J5wUxvd0oLnj+/FK1js+h7\nRkLTqaze350/XDbArGyv+AZxLhENeY3srJ3x7hSC6oGFB/uDc2DezB1dnFWH\nrWua\r\n=GtZf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoy0ATG6uV4tCRlumU8P40XhIiVr4pHS2THURuCCOHrwIgXBrLkf7pVVUxKBJ7B4b9yznpgmLfuaMeP3U/XNUtS9Q="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.8.3-alpha.1_1536092565310_0.24196204384910547"},"_hasShrinkwrap":false},"0.8.3-alpha.2":{"name":"@creditkarma/thrift-server-express","version":"0.8.3-alpha.2","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.8.x","@creditkarma/thrift-typescript":"^2.1.0-2","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.8.3-alpha.2","@creditkarma/thrift-server-core":"^0.8.3-alpha.2","@creditkarma/thrift-typescript":"^2.1.0-2","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.8.3-alpha.2","_shasum":"0f8f991507a12515ff23a1cc677d93bba9703e5b","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"shasum":"0f8f991507a12515ff23a1cc677d93bba9703e5b","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.8.3-alpha.2.tgz","integrity":"sha512-WAzu/bYhVhvvUuFFdV1yI55bZGYdJIQGL+EqkxlyjdRlZwJhM691882kYyYsVpbUKdIjqwIXRhbM6Ox3Q9JX2g==","fileCount":18,"unpackedSize":26307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkCfFCRA9TVsSAnZWagAAS9sP/jYliF/M126bbJnq/Qw6\nEuRbbsuLpEzBHJ7Raj10TPTb7pZQtHTPGMyL8xjh7dd0cmzipP+GxsCJH65y\nBLs34FRR25/HQv9g3MOue6eAKD2QIccvM9l09ZO7zvw8vfbV/Ddhq4AIhCEe\nJ2nJ1PanU03A6ymF2HRcgVlF2zFxdGeoJGgjcoQN3p4G+MVBtayFv6nmDfv7\nh/nPSmqEZ4X9PybjHXp+KWb/gxaTWwjvqtrhYUSA8hPV/A4GPP3dWqtvZdPP\nx4ljcH2w1locVaJVd4ZBXqkNRfJKmvitlS4LYWNdgSTc8zNiYrn+P7/nQGaC\nZDxilFyiNjqUo0S0Z/FyI4WuznA0MRQXD2isIRhqsonqwu+4jJMzk+PtpX+p\nwXmA3V/ymS3d9K179YJx8W2huJdsdWdGu+CMiQtUkwzb86LN7mkumpNUFQet\nb8iEDNQvKUxGyrtQISV2kmMGcd4igBl50eyYTaBSd5c8zbSjh6BrjE9VA4uI\n4AvEwHMfs879K8F4INRWWqT+e4UnMGXGSB7yaiyqCONZBCoCBji8O+lD4g0i\nI4YwRW12TcKOT28ErlfBwa1Bs8HijMECo671+kY08kXKHESLb6YYWSvRDVMs\n+LN7+wuzpGz4dS196oapQHjTlvstaURZ5k7YDenwdRDm0nA70yUaSNq/EZBM\n1AYv\r\n=oFY+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtMfrg1HpqkdIaQpdFXxXUYeEYIDX/5NbjjwxN+kORqQIgJDViRLQsbbtq6B69+MNvwQsSbcwQuQuI+fT7BF8sI9o="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.8.3-alpha.2_1536174020363_0.9220249874501985"},"_hasShrinkwrap":false},"0.8.3-alpha.3":{"name":"@creditkarma/thrift-server-express","version":"0.8.3-alpha.3","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.8.x","@creditkarma/thrift-typescript":"^2.1.0-2","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.8.3-alpha.3","@creditkarma/thrift-server-core":"^0.8.3-alpha.3","@creditkarma/thrift-typescript":"^2.1.0-2","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.8.3-alpha.3","_shasum":"c54369df59b4ae9faae2a951e3e69f87536b95b2","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"shasum":"c54369df59b4ae9faae2a951e3e69f87536b95b2","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.8.3-alpha.3.tgz","integrity":"sha512-xpLDMTEJeKM798e9AMxFbJm6/XvLVMkIN+tn2ubK+HV/wyU/SyHXPWLyAs/xD/n+Gw6/ktGpH3pVPvpTvxKTEw==","fileCount":18,"unpackedSize":26307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkEqBCRA9TVsSAnZWagAATgEP/0iJ6NHXsYcogrhcFriq\n8Avb70vk34ZA1v6zi6KY9yCIYBYc0DxMVF8ttjb6LCVzPAnm7qDxWbop6+Pw\nwo4cehYRSdyVxqsJpPJZznI0u+oGzTR1+YIvP/oScrsZXZYPSDETyMRLSQPC\nbMHskSJWBSvl0JUMXG5C/VUv68Rm4j9/0quWO0L4rDSmMCfqnJijuXTHlE7d\ntRLEnEb5aFdvG2YRfrDF6T3OGCZ18BPYbspSHyX6SbXeRkKV1xACngVCJ9J+\nUUqCq4lADtXumMXlyF48c1CqyGzr9YdhKnuan0yWgjQMrjjwPzRa5EqO9y0v\nfFfoKE1Oh0JMrjg91Z1WS9QzqRGwQfKkzKqGxfPu+pHR2PT9hM5Hp3GwRwkn\n1ndkBat5UzHyvV7L+90OGP84lXowEhKyX/LIryl+l5KggTAGvEVVwL+h5JTM\n0b03aT2s9uap2WGc5ltwakjVVS75MMzEpfOZxy86ncnvtXT5C7EA5GLXgidU\nXLZRUJ5a2DxA0ThADZ7oY2mQN0Fx8QmoHvkt009bMa30eUi4mK9BDpM7ovk+\nVEJOFsKW3ALnbQYjg247spAEqg0RB6eqMRDQYV6KGM7LPdLLObmp7AmFHFk9\nn1fl+Gxd7OrxFV+pj6h//gpBEoJca6r07mexperh/k1iFqn6VZPJfd7QoZsV\nCGC5\r\n=caye\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG7k3LU8e76VSnsUpuk7Zmsgzc9dm9IyBnsgiVCYTWS0AiEAr5WfMNccTMtZm2uu076+nkaIUMOtxQnEr/8XfP0vMrY="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.8.3-alpha.3_1536182913301_0.5795834981883541"},"_hasShrinkwrap":false},"0.8.3-alpha.4":{"name":"@creditkarma/thrift-server-express","version":"0.8.3-alpha.4","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.8.x","@creditkarma/thrift-typescript":"^2.1.0-2","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.8.3-alpha.4","@creditkarma/thrift-server-core":"^0.8.3-alpha.4","@creditkarma/thrift-typescript":"^2.1.0-2","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.8.3-alpha.4","_shasum":"25d81efe3c8dacb877ea42c6fb73a200fa809801","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"shasum":"25d81efe3c8dacb877ea42c6fb73a200fa809801","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.8.3-alpha.4.tgz","integrity":"sha512-iKeD6mfMIvrBdiRFoUBTKSj1Bh4CKsDvVlz8XWJ/MzgHa8RVja5JHAncMW0whFYe2EWb1Z6fWitBr7x+J4Ojzw==","fileCount":18,"unpackedSize":26307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkYAQCRA9TVsSAnZWagAAvToP/22soCnBnAKZtIXdxZH7\npTwTMbdLtelI2amgVl/deHiBHSIrBtcn2Hv9LQl1KXx2BG09eijf3QMq+ngO\nMsjXUo74RRmfpMi3KOj3o/tZgZLgbCOqWu2MM84XEOgPDFkuwZTEIhS/8yOw\nIqrcIQyV2OyjwCNfnC3X2C8xg3YwBs3+UAaCEK6sroawwyGMxEzrAHMVF6Pu\nyECatya1hfmwWw1W+XQK09JhZGWjabJHtpeRdwyyviI5Bm/1H6IQdIVeVJkS\nkofo5QUuPS3nTXxWBkjBUiDbKZi9G9Yxhc1IUPt5dp5SMhVv6BshlJ7epWfZ\nV6rvYQFUQIuA0Nk/8GkrwSTSDbggQ+W0XYBvMjrjY6HLgwpVA0G/qHZooUVG\nSe9WpjXwy8+ANs76BQe2QWkWgepHF9lUnCDsHLAf9rjyxR0XMKVb9QUckL1/\nRwrY4vwsLog3ye1gAbDfz0e6PBK8xdOYIA5C6uiwU6XQ5WT4mNihVqszvg5m\n9TDTLNx0RABBIN1qcVI7Iz3/AWEjhN6PsoCetnNYOrGvmajnWOjiIA7ESg2a\nteS6alcRvBf2Mw3ScW6m7mKT/mE+HJZ2EvknxQixzKAdvf6z+1u6mnmbA2cw\nYhwzJv/4EUZ/8N4WmNehwaEOAwVAGhZA1mNJdAipc41g7a1iN84rNMUvlphv\ngw1f\r\n=G+6i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDJexuKyQE0AFcNrRP2HCXrqos/2p5aiR7oeY2+ojZW9AiBqZfZMijwuOnbGHHfF6huhknzttWgFE9zN/njwD43Wdw=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.8.3-alpha.4_1536262160004_0.6774129483568787"},"_hasShrinkwrap":false},"0.6.24":{"name":"@creditkarma/thrift-server-express","version":"0.6.24","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.24","@creditkarma/thrift-server-core":"^0.6.24","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.24","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-pwk2XPLSJdAKHcEpYcAnS7KZs2yFrpGVDi7DITsVHQpUfgaGZbe1hZ8zEFWgtxx4+w1pvCEH5b2WMB10967Nvw==","shasum":"4b8b8de618d4625a05746054c4e5b433bfd41c4c","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.24.tgz","fileCount":18,"unpackedSize":25369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbksSpCRA9TVsSAnZWagAA074P/3K58yk72rcwA41HuzwT\nmZZL70bRSh7PSBiPmJtf0CKe3e6eX60go1C4LqBKVpxj91GBEnprrzKASRZc\nnmiuS0V+CT20PAnO6Wgu8qT1qIB2zjmTwwGCI4TPy+Gl82MHiq3xmqBAx8Tg\n0V9CfoF7U3/GDlx8cUtRUrkH1XBv3I0wjw4Co6pMz6W0vnStieW4iizcXMEQ\nfa0vXjX2eiJq+kE5zPjtI0eRoVmrmfCGWWor44vjZFTvKeAycTxTzCt7c0Pi\n0hBGFlRFAXMOj68ieYWy/CZHz2gDAztmu5sjCe2BpGOsrgYnTRjhGMBOxeVp\nwPdw1hQpcYotW5xl3k4bN+HrDUYkKNBRYcGti2XlYTXMgmWG74gHJ3xAA9kM\nC660jrBsMntv9ak18hiCTQtdq97ry3T9fUlTrJHGIKlr+geNh0W6aDyAvXi5\nF6R+OQKVnvfAIyGz4yQqIK2KxE5kAj5KXr6HGvdCfdS7wWJtXToB4u9ajC+2\n9IkEGnstfkoAj9kRwUDpzy6Rq+V8UnKDncL5hQuGIahoKLNq6EumZTXhMUNF\nAjEoDwF2MVx2hCHUgvrpHgi/sU1vV5GoNSqpyWzFUD6OwfEhJW2mnbB2PPqu\nBqbtlOP7wr+5gpgL2fxaomcrJRJokWB5ZssUos68MUclMIbJRjRkln+JWkvU\n/8qz\r\n=QEmk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCA9WbohFFP6Fu6jYyrnooZe9Yt1KeLta96ftbSt3wH6AIgYlVP0TKfIXWXnckCLlwNWr7VS570l0M0md6RY5qmvv4="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.24_1536345256892_0.8082927049982915"},"_hasShrinkwrap":false},"0.6.25":{"name":"@creditkarma/thrift-server-express","version":"0.6.25","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.25","@creditkarma/thrift-server-core":"^0.6.25","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.25","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-N6q+rDGFYI1xr20scnFvPRfmBvxzKXMtKL04Az+JQ8+SJcKa1eGEOOY70M2xHdsOnaCAAsLcXAg5joGJIDnt/Q==","shasum":"d11507bfb5c83d0df0aa40af089a710f3b76a43d","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.25.tgz","fileCount":18,"unpackedSize":25369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbksZICRA9TVsSAnZWagAA7/0P/RneBGuYg2dShOe3hO9Y\nEGWzkHb9PrRUtcRVAGbEHRZF/DAikqkm2YhNsAZl53CwOZ5Z8EPw0Hv9Yjgf\ni5+5+we1CSLeeniPMajEJPLrwXmctCQpl9WSMLf2Tr2mG2O0GhO2KBfmsM0w\nuibesW4kc1IdB4MUsXUxNErOz/e5RxyS4srXx4h3ueB7K6snvUCHAHyQjxtt\ngLVhy5M3F7wx8Sn31/9PC1H+q0WULBsBBOYfwD0e8aREpLWMF5EaoQHC/QMB\nHuMeaKv+S+MYAgog34UvezXTANbh0HHIZp7LMeE4kTdwdJBF4zrW5BmndNMi\noIM9RFSMzFaa3YvzXoTEc5S/kPv4f8QND+YIrj5B+NHCc2cRVXY9/b9VhShF\nZ25IpvRdcjFUTwz9TcSTAjY44U+H1qmfUBQj+5+aljrZC2RIJT+8uBTknYDT\nlI2I1pmiHaYokDIm6Cl6HxhEwM5RffYbYko1firDXKH+HXTUOvXpWsXFnUV3\nDOY8XwsYcC06HZTYG+nLDT/j9sySsXi1l/1k94vbVJYbade/LDdEQGcVuXAZ\netUNOakYp555TkqufnVX8f7bXvJFa+NZS7/mUu0Efz9sdYJswhk5ue2Q91y7\nlRvqXNzulNGVYiiY0hO5I+6RpkYOM8D+nT7jG1BXRBkFFiBq0RhYxJZEMGBb\nP9SC\r\n=TN7n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE1GFEkwq4nlsM8DH5TNTmB8FkPiPYums3Bg4P7mu/V5AiBg5X7BCYU/avhO4a212nILP4no1FMWnh0+RScwuBGWVA=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.25_1536345671875_0.1948195438767304"},"_hasShrinkwrap":false},"0.9.0-alpha.3":{"name":"@creditkarma/thrift-server-express","version":"0.9.0-alpha.3","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.9.0-alpha.3","@creditkarma/thrift-server-core":"^0.9.0-alpha.3","@creditkarma/thrift-typescript":"^2.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.4","@types/express":"^4.16.0","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/request":"^2.47.1","code":"^5.2.0","express":"^4.16.3","lab":"^16.0.0","request":"^2.88.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-eslint-rules":"^5.4.0","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.9.0-alpha.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-A6f48Es3eg5IgYtMzEdTZO0egpAG+z7ZJ2260Wg8l5YU0NMxv5w5efe3xYHA3xBFShX3bVtaVXRK3FMYvIL13g==","shasum":"848deb421de1ed2d8fa3f885902965993ab9d96c","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.9.0-alpha.3.tgz","fileCount":18,"unpackedSize":26290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmEeWCRA9TVsSAnZWagAAhUgP+QHtz2nbe7zKnUFYFOfT\nEG43fD2vjnGmlUsFpFnK1pjBbdxvlYZBT8ovgulS8MUSgtQWVShCdj05+weo\nYAGQWWMERjam5fLlp57qwqpWCyoXPVp1bKDqjvDxQMnuE5EmAC7qTHFFK9UO\nxr2h/hk2pfqyOcLPWt8eiyg3OwVAm1Y1MOw0bXJyPQyGyHOO7gXPnG6U86cu\n5nqgpRPEaWzYvd7zNpWHK7Zbu+8NVR2mW9F7Aq1gXkDuYRSKFdL3VsF/dSAq\nf2Gt+5HF+RuAibtX/yjUZ1gmRZklG6Ct1EUUwFfGuE9k+kxNqwciE35DTvCa\nGiqoqG6uth+S7njWHDhgocLmFncg8c5DQ36k7IWxHEOMdNW8+1CZLsiVUoaR\nqiPgl1CLtXK2RU4ocH/GscAdi1DcmqA7U5AuMDe1bE6XgHHat7heTakZZIex\nrXiqglSI4qLAkRo39O7UJDr1Vs4oS8O+Dv3105qc67MvHKDJhjOmvcOcZT9J\nSQ0AWUN73pCgvtfuU0/5AIVCuaCnSpGwz4+GqQuOtJkDpc8DfiucbpBTPK0i\negDQSySN+gl8HAEwCJCDzCgOlsvtxuw4XOc+662ImseQKJY+bIcUavbXEQv7\noPJnttD6EvUqzF3bNpr1ugYLGTzRNHk7vtO/T/Sl5cEXUuI3QMEdrivO8Dtk\nqaeV\r\n=KtoE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxyY+yD/foMq1MIN1/hl7Jzw2w32Zz+uWL/kkxB2R8wgIgEZ4n6P4OBNGCac+D6+aF8tWrqh2pgJz5QpaBlpom4Nc="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.9.0-alpha.3_1536706453742_0.8138076571131956"},"_hasShrinkwrap":false},"0.9.0-alpha.4":{"name":"@creditkarma/thrift-server-express","version":"0.9.0-alpha.4","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.9.0-alpha.4","@creditkarma/thrift-server-core":"^0.9.0-alpha.4","@creditkarma/thrift-typescript":"^2.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.4","@types/express":"^4.16.0","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/request":"^2.47.1","code":"^5.2.0","express":"^4.16.3","lab":"^16.0.0","request":"^2.88.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-eslint-rules":"^5.4.0","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.9.0-alpha.4","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-jYq7ppIwSPuFEgBSHqS8nB3G+YXJjNblGgBtIgUN7JEWSO83PVFRtRO0BJbQe9DFTJ7n2RY7Tir1M1lPl5wW5w==","shasum":"ba9f6bdf9aa09ff4192fa758388fa4e5aecd68e2","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.9.0-alpha.4.tgz","fileCount":18,"unpackedSize":26290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmU1pCRA9TVsSAnZWagAArp8P+wRKdWPDSkK5O89Lvw7j\nXnJeKzQNEGoGdpiyDASXJf/wyqr91SVoD7+ghFI3o1AeSHZh4GkYZ0FRgU/S\n7bToz1aSyK5AJlWKw/P7INK4IthORZCnBVdC72i0AjvecSo6KEaoM7n86hNZ\nEtPD/VuuWRM4CGdDoOioMS7Pb2bwULIXJZg0Wnn752FjGw6PJ3k33Mjrbrmh\nezDLeVNFrVKKBiTAeT4mjTd0+KRw9G7K/3jRyDrvpv9kOvWYk3iLU2HvjRB1\nfiSvjl+bP/rGnBPfSxyr+BDXJy+rDBI3zJA6ucL3M0e03qwjyvJvWIXfXfJr\ny5Bwowo9rAJNiSDjJkPqoUTEOC7sYkluBQrSfWMlv5J73rqvH0xjXe+V8d9b\n6jrN9vs7P1Trt1IvzZP1am68LXfd17AfASg9xeX9g8dlHUZlto4dmr3Xcy21\nFYR/OxeC4Yh1fU8tqyOG9NRpiAfkE5M5+BBsbkl6XYgNZ1HA4nLPzlppClqs\nX7NV5+BduUkQI12XvAShpc+vJEhvh2R+3+kFQfPrC6cN05K1YQhW8u5CmBRT\nFmB272xMYDh+iUvt0hM77MXeFutOtXPIHtsqpFA+nG6ogqR+YYAy2jafJfW2\noZmBxKgXHnO41h2sUs3016byIng8COqOMKN//Ee7SuCZy+2W8ce0Z9usf5m+\nRDyP\r\n=CjSD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtN45/ddMIOcOddAAJx8VC39SVZ2d1YPgmH8jwBQUtIwIgNqNUVHHVsci4QGP+XYPkl3kyI1QMs1jWO+K3NAsSmKM="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.9.0-alpha.4_1536773481182_0.3954924899759915"},"_hasShrinkwrap":false},"0.9.0-alpha.5":{"name":"@creditkarma/thrift-server-express","version":"0.9.0-alpha.5","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.9.0-alpha.5","@creditkarma/thrift-server-core":"^0.9.0-alpha.5","@creditkarma/thrift-typescript":"^2.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.4","@types/express":"^4.16.0","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/request":"^2.47.1","code":"^5.2.0","express":"^4.16.3","lab":"^16.0.0","request":"^2.88.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-eslint-rules":"^5.4.0","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.9.0-alpha.5","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-ifvPoxnPlDYiJ4tbgOr+aPe7so1hoh/m0HrUnHwerrh7E4uEjY5NwOehLu9ncduSM0FaaKeoF+kbJA3MSO9xCg==","shasum":"8b1a5f180188316ce304b510e20de4ab4ec7141a","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.9.0-alpha.5.tgz","fileCount":18,"unpackedSize":26290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmVU2CRA9TVsSAnZWagAA+hcP/1UuEtsyPlMLdpLbScoj\n1zBgSxQEOmMVgRLJn9f/jnpXeVn97IJhqACBBt0XseZVQavPUDGFzu/qfUPK\nz94LG0VI9mkRfy+nrjbl7UEAjD0hmYtidqCgXm93TvzYKaF0QXW1SfPPuJlt\nlduGiBWnuAiqQBtTg5pw1XiS81uYr4nAPG7NFRqm/Oh5DP+7RY1H8bTVbYqW\nT1Ci+hTUOv4dx1lyqe4d+YSNc3s87jgznGgzpcgZt3+GwAc7Wj4tLgo44Gew\nsEaSSzut0aei31rq1AuGNXw0BmQgvOvzjREnXP1cHCEteOZfKbAmw+TO8KyO\nqOWI/fHLPRL58YcogPFZD4FAumRfNIYKNOVSVV42gR8MwwFBepS3zOPYtEBP\nxTUilWT0RVbvLg8VDZEX9U2D9hOmaoTtAVnfdisrx7zQAHozupgh/wvz6DIi\nXmbD85yjtG/GvvUFADFZfXDffX1I25+5gQB3yNXvd4YqJ6MYTI/oBVQvL7gP\n8N1w6cpDsEVFsxSFsgwXMmgVPf0gdG40FhB2taFKnjhotYT4hltq+CNVVmcC\nx53/TiLE7/aZNy0yuh9WD9oVdctrZMWGDSXJ8zYAkB17W0quvrCN07jz7LiO\nFQ4+ldESp03o5ElFGzZl6cGBC+PPDb/83GtVsa1XmS+QQunq2ib26TmZpoOV\nRPAB\r\n=fLbZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNlosrQ+RzSbk4Z3lOREfDYqnTg7up2kR0jT/wPjiasgIhAKAeTIdecsKhshLz8MRy9KZxtkDc4WX7Ma+cnQFhmz1G"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.9.0-alpha.5_1536775478238_0.9164490390473214"},"_hasShrinkwrap":false},"0.6.27":{"name":"@creditkarma/thrift-server-express","version":"0.6.27","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.27","@creditkarma/thrift-server-core":"^0.6.27","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.12.0"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.27","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-bbXRaFVa/mzEvuh3voAXeEDBvhjSHOn30Y8T5O/nsxE10lj2iqEmYVWZDlj81ILgAVhtEJGYEKCEUTdm8h+rXg==","shasum":"fa15518c83eac85d8a334b91b83eeb82b91fd061","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.27.tgz","fileCount":18,"unpackedSize":25369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmWS6CRA9TVsSAnZWagAAfFAP/0THdlBdVNQDary5k4Mb\nPAPaRD7PNefYzqOJ/szUFhMPikrrjl0yChJSme3HnIsFGNGI0n6nFUAaCiZs\n2ohM8jM0QlasxqXhlAG4fwf/hLCkxOG/CcfAqb7uxf7Apffjz7T5C/39kUDP\nm9j/6rHIwUxl4k26sXblJ33Yk7Y1+XJdvRu2oivk7ZOLRzhXuxhDC7i9rccs\nDtnhGc/EvC3UDGyliJTxT7X8Ujpeaq4F5Fa5EoIqOKQlLpe63wzIFvtQ55zl\ny+4PIBkd92zakdb4S2g1tVWdsbWIueW0ZzEI2m6d9N/WQsRwWTMIQZk6CHC6\nfAQX7TwAfQyMjZgBmQOZN3wln6IcjkYgmvVUNcDyiVJuN1/o1irROlneQDPN\n86X6tHCFcsRHNwoxkB3bUQCUa6XsCRwOjC/jh2KKXp/eP8oHrlK3oPk/jIBA\nm9POijwf36Zd/KYvCQAGoVBKgFdf1D0VMbZaiKrLkRuAM0nzTYQw+tnwJDiE\nWJ/RlAlCSkc7X2Mbs+EJhqhRkSY8E87cxaquodUE2DdgnoY7ykr9cz3b7g2h\noevgiFFlS04VunxCK+Z9RDi+sGkb3VwWT3a/efBHqe5+MH76KTITwBc4TXPf\n0vRP3GtKsvUPPOR1W6I86xUBIZnilQ8K4l08im4v+JBNHPGjFIpLZA+BGWuJ\nYNkO\r\n=v7Rm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFFaH6AhATVPDDtmG+2odPocPhfnarZihKWsTMUuMxEYAiAzCiYexJDTn74FMwS1ZNCY6mGImUEjvJfhABy7+C2JDA=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.27_1536779449933_0.6872782459197935"},"_hasShrinkwrap":false},"0.6.28":{"name":"@creditkarma/thrift-server-express","version":"0.6.28","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.28","@creditkarma/thrift-server-core":"^0.6.28","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.28","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-SLAiHN6E+GZr4AwHlgCCBCMkDvWRUocrhoOkWhvPL7A5DPjfLmIkeP3r2LGRIoQEC7W3f7twKNNbBnUWMj/nWA==","shasum":"83242d30625d4fc3cbbc5c64d7703e8f488bbb39","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.28.tgz","fileCount":18,"unpackedSize":25518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmYO/CRA9TVsSAnZWagAAQIgP/3NpwDBJW7VBjQTmzvOP\nCsO2BKY4azobRohS7VT/sLCK1CFQBqFhVLvyVrBSKKvUq9iM/D5m8d5xdArs\nJ8eil0ekoDxj5pLSE7yazne1yai40wOFupA2XBgSRFwq4qrt0nLvSPu8h11i\nw695wcWPe9ZnXL4tFLgBwhLMohEsOShy+BId+E1Y5my9/D5pqkwjYBobfHdM\nkWnn1d0ftrlMLr4BwLPyjevVWWH2FGYzsV3viI61I1gOxGGdTbfGzidHABu+\nqCDLV8TDiADeD/wadNYFyLjfeuMBrut+U3h13X6vuWgIPjnppfu6jZP+fg+4\nWi4TvhB2W8F2t3eapEmV8Hq61gzOWrEqhkTJE4k/9xxmlvjS+vnh1PnDQR/C\nsTtwFAsi3yXAsRbYkdfR2FFZLx9gqyF4H/1BtbMBTCqPVd/scyOJKD9Lb2BJ\nBagXm2KnWFii8Lt8BG/Xd3DOO+r/okywHEhRpse3aJBkj2ONO9erh1rRnmGK\n3EXoc8f1Nl8XLBY9LyZh2tlDxFhdyhWiqUaqUrTlb8ifFtNQUWTDRTb49eg5\nhHKO43y+zQ53XPcx4xixd8v3rJMF8p80F9jhCq5B50sx4ZVyzB6jUUig6Y4h\nEmNcNzp7tBfJJbOhH4eSg7Bg+I8z7nI69Gj1CNZ3I/jY+5gh3xWoYvVY0PEx\nupvj\r\n=mtgJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFtl/aLTCRqKcIaS75yr/HOILTYn6kybgy71DD04NBddAiAKpGA9yadJCQo0YJ1AtI1bvfouxLJJARnj0/yiwc1roA=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.28_1536787390640_0.03274339216855604"},"_hasShrinkwrap":false},"0.6.29":{"name":"@creditkarma/thrift-server-express","version":"0.6.29","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.29","@creditkarma/thrift-server-core":"^0.6.29","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.29","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-jeGNokYRP5bxx3IZBhqkFjpRCzkH7BeGQrTNRie+BzyoQ9Tvlt8h7TtpyhiaToUA57gXRs8zMxK5fjQVh8TUcg==","shasum":"964dacd029015b537b175fcb41ed0a6b6602acf8","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.29.tgz","fileCount":18,"unpackedSize":25518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbme3YCRA9TVsSAnZWagAAAJsP/j9OIIQgCPcduK5d3PDd\nIUnx1clvOmJwE0eMR3Hk8qUtfJpmoCj+SyPQX/n9FdzT7MH3xYmhYOjC98cQ\nrRzOCB2zQBfGntWuYtag0dcSPRYGtgyvTlarvSM2mL1C30aXjKW3wR7CQkTr\nvCRQipwuB+mzxxqF3E+IZT9/3ZK+zJ38pLqpCNqJkORQ0+HuPORYjqMB/Hgf\nELDHdGkFsgdnz/xBJAa59aHgBUIwJyO32/XXs7DX3z11gSKAKQhzfHsQMZN1\ni40EFbraGbYjD5MfolXg+XzZmvEfccFW3GDb0MIK3ECZGUvvnJsyop1YFbk+\nqK2kXtUHRae/ZnfECTdQVvsxDG7KgFjSGZ/g+eZQvoJX+AJM0TvlCsaH+9q1\no8Vq4yClTcJHowgaotXLjJG00DUCZse8JaI8GizV+cLigaG8F5lqR3jgQgFv\nVOUaAarkRHraKIR+ctALUXP+7Vm8z2hfqSQddLpNr3oDJh56RtDNJaCpMMhu\nIvqBszz7n8z8OAzMcHUzClB2MkAaXKB1rgfXI4dAu57G+Ib+OwdMQH7oqX1t\nwgqDmhktbOQxM5hl+vGdBxlsu/+aHhF3cu+dO+a8/82ih/GzLHp2GA3O6cvq\nDDlZyegU+6oIYKRNJ0yP0PpIxCnnE1ArDOBUX5nlF1UVcpfpyX2PdDa/nD3Q\n9Fhz\r\n=gLXW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmlNtnTWfvLpVXElYWT/q4jzSOCcAKGN3z/7ryqQaaHAIhAOHWFr4s3LqRR5lfvnFuxraHuPAJZhCkb/6HWyNs/7k9"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.29_1536814551843_0.8745342633441009"},"_hasShrinkwrap":false},"0.9.0-alpha.6":{"name":"@creditkarma/thrift-server-express","version":"0.9.0-alpha.6","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.9.0-alpha.6","@creditkarma/thrift-server-core":"^0.9.0-alpha.6","@creditkarma/thrift-typescript":"^2.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.4","@types/express":"^4.16.0","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/request":"^2.47.1","code":"^5.2.0","express":"^4.16.3","lab":"^16.0.0","request":"^2.88.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-eslint-rules":"^5.4.0","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.9.0-alpha.6","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-0P/vdIsA9jaG6jCpCNBeOvBDjrZU1XDMIK/DmEoUy+3SfRBe/jTpoPoDEmtj506MOuO4KC/dlO9LMDyn5RTyLw==","shasum":"eadd5ac64d2ab4fb89ad31c60cb5d1f12640583f","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.9.0-alpha.6.tgz","fileCount":18,"unpackedSize":26418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmq4FCRA9TVsSAnZWagAAaw0P/jh43w2UN1L1LBFTrPci\nr59R3NNtQfpGClDf9+gYMvTNGp8BAsGNZOp5uxvw9Ej1LkBCWe41OUombBUP\nur8gTjMlIxtFDrqZrkjyA91CIr/wsDuRhh+j50zY9iPg3d0WJRUQDigdWUwO\nfcnfDDBFgAo6Xk8lgMF1vGYT4qGQOgXAQnfwUm2Oa6V0l1RdaTfAG4KTo6eB\nRxAGprv8Oo4cFpAtFa1gsUM870RAMd9+QLbXriERL12zjueEn3ZG6iG4qKS1\neS/tJskOXwhfkPcbT13FSWp7gOvF5qeJ5iEBcCPbO0c4FyacorpeRJo4AqDX\niScaJX3AbrtPyBvhwrx4aykjLGsBrJl1bYs9qUd4wMa/KMPfeayz3eCcnwGJ\n/Sf14rjCduBouRMA5xDa9TTvvbJ73FXwC2tYa6WMRO/hcbu0XMBw4uHchzQO\np2sqdVi56Wu/u1vG0AJeEvqsq/mL9LsGnDSwqq7SvNYNjSnTAYUD85GzPc7v\nLPYAddCZLZP1ibGCLxtKYfNeofL+lMpOAVR9JpkeqwzfCnkseOI0BtOm4ZyW\nl0fzCMMQOt4FvdgJxumh0gujuXQouVNGg2YPxSmCPgm9UldZ8XDplmz5f64y\nESPKx+sA+CgYGNG1cPxtJW8tuAHOEWEy/YE4GgCiSj98Q+hmSMeeo+P5mw76\nzWnS\r\n=R0aR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDz7UaENB09C3aQzjVG6kan4ah+KGxi5UuFJzSnWetAOwIgF11VhNCvKRz7/HhLQs3WbVSp0Q6hfyEoL01ewAa+OYI="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.9.0-alpha.6_1536863748361_0.19491754344311785"},"_hasShrinkwrap":false},"0.9.0-alpha.7":{"name":"@creditkarma/thrift-server-express","version":"0.9.0-alpha.7","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.9.0-alpha.7","@creditkarma/thrift-server-core":"^0.9.0-alpha.7","@creditkarma/thrift-typescript":"^2.0.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.4","@types/express":"^4.16.0","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/request":"^2.47.1","code":"^5.2.0","express":"^4.16.3","lab":"^16.0.0","request":"^2.88.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-eslint-rules":"^5.4.0","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.9.0-alpha.7","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-uFNCVtHb68inx4bEXnXwHxNeCKUlTF5mEpliMwf5m6K5Q9ui1cWeMdOzti/t4EEvUFfjdy2LfhuYRMl6kLk6jQ==","shasum":"5e0a3a472350004374703bcade9bd9b80d080e13","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.9.0-alpha.7.tgz","fileCount":18,"unpackedSize":26418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbm+IHCRA9TVsSAnZWagAAiCQP+weTkWbNBn8c3H4C+0yn\n2WVp/uMHbFPMPH3sha17ifJP1EHeulQHX7xGMDVL3daJ/5U0WjH+EJuTyxHe\ncYng/biIyYM/bzWOcZAFbIAQMgszjdi1XrSd9WE9J+2QkcQp8rA9Sk8XBfv+\nhRxXwG8orJHDRbQZh+a+2WoCFB+3OgEW2gMBkEomWE08Pz8YmjWo6LWiQrSx\npno58tyY2zz0X59cs6hdG0OGNyi5niatgkBMQjQuecM04GAliFmUsmSNHCw7\nbpnskzPXM8elL6VtHJ4SODxZO5QyvAcW6zTMZpC2naCIVzD1jqbKpbMbD/MS\nlDlk5xytrA6WI8M1HD6VSfzE3Ry20nV52d0SdA6eZFRRrAX+ksJjdxuCW9bg\n4wbHET1eUw9ALERY1/h5HnBkLyJFw06/OBxCiDVxYM3UWhoTj0qND+P0nQ10\no+ABZtg4OoXeYnG+Z9bBVA018eL3WvlWvy6N8u86x77Nn6+wkPaMxIEzJhOX\nyD5HZZJBtguuRDToh6QPP9AsO267dpqC/4IT1QqJsBJV7QI0MX2rjnqgvHZz\nWr6DNki1fNSS/pxSmVU4m246faZcuBNEIPh99myA3JYQ4ak+5h3+zRGfIi1J\nkYRnteXDwQFRZUFcuJTYw7x36dNG4+9hccRHgOHrHG2Dkhb5lal6+2PvbQvS\nj40v\r\n=jFj9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSVWNvDcUkaOeHBFTF7CKvbLkD6mgmVXcshk8wpy2ebQIgH0WRytLj//pDaA9ZlAhGGHRjwjAsLqVrpe/zFye6W/M="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.9.0-alpha.7_1536942599133_0.7187228422903196"},"_hasShrinkwrap":false},"0.6.30":{"name":"@creditkarma/thrift-server-express","version":"0.6.30","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.30","@creditkarma/thrift-server-core":"^0.6.30","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.1"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.30","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-i7KI/+xZYCEcPLnNM6SUS78Ox8bE9etZK+DSOdvH00E6HziN+7f3vBl1cyTfGK/RNqbBq/F0J2uWp9Zc3+SbAg==","shasum":"7132201e899b596e509ec14bf443cfa72ccf105e","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.30.tgz","fileCount":18,"unpackedSize":25600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbqXw6CRA9TVsSAnZWagAA57IP/jpwvD+NKt0YjUxmNOvC\nvVVni/2fXOkcF7SDLqImNsUzriK3n0Xwqtzqqv7eihtCraCd2ykm2XvbaD4y\nTwD2tJvBTV4UomJzrnRELvuyvmKjYJvyGWVPi/Cxb09QiD4WiH+dQnrqGN+L\nNe/etkHDpNklcpuYC4wOQOF5ZUvkpVrWNgeevfSWVLVTxlsJQ/XtR7V88qAX\n9rjRR0cXOkm+2Broh8ZgRlnVFAl2PLPA9mAaut091gCldP18CbXIojdIdhll\nJMgYDzG8n4zdGu/DJF028PHcClgGXBY2CllXMN5I8pnUWbxQpvR196hVwuOf\nLFU6u308k1MF/F22UtTkwwX5vFoM+A/b7OqiolVm4eTzGZgOXBgn0N/AuFMe\nfGO5ExT96VK/UqehXAHNTeJXg+iIf7G7ltYylF77ZmemGo3HMoxyAzRe1jai\ni1Lsl9w66No44Q1LgpQirZdakc55iDUk5fZY9qK7dYX/Z8FHR9sy7j0EvSzA\nggELWQIpegD1q6uh8dltAqwLO/f2nEMeFxY6sNapvDqT/RLRueEh79DL9kbW\n8lnUPQrmgnb2XNPjWz2WQHOr0Fpw39KSHvL3GbdCLTbfYOlPWLLyEItm3zPs\nNx7g5OLXW5zLknVdjaCC/TA+d82OZXOqv2ybxsoo32N8+MJzNeAh5VDT6YK3\n48pR\r\n=i3z2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFsJ9KTuL82pBITpYAEvyENV5UuxClByrI6HJ6dvSLlAIgW4n1ovAh4I8Bqo9Ag5G/oGVIhx1Xo7Wh1aHtZFQvhTI="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.30_1537834042339_0.2568905777329078"},"_hasShrinkwrap":false},"0.9.0-alpha.8":{"name":"@creditkarma/thrift-server-express","version":"0.9.0-alpha.8","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && tsc","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.9.0-alpha.8","@creditkarma/thrift-typescript":"^2.0.8","@types/body-parser":"^1.16.5","@types/code":"^4.0.4","@types/express":"^4.16.0","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/request":"^2.47.1","code":"^5.2.0","express":"^4.16.3","lab":"^16.1.0","request":"^2.88.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-eslint-rules":"^5.4.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.1"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.9.0-alpha.8","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-wGCe5IA3qClbg4Wjq46owoAj9+XsLm67oFwqzOxIvnmLUBdtv3/Fjs8nZannxbADXDqyVxoKfrgVuB1mUNEiQQ==","shasum":"258e5f4b1af852e05a61d31f6f5597a3f9b8c3bf","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.9.0-alpha.8.tgz","fileCount":18,"unpackedSize":25985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbuD/4CRA9TVsSAnZWagAA/s4P/2UyakC37f3MPRYK72in\nX1jCf5aWg/5J3+hoawFDMIIfktCogSL58s2adCUuifO9umF9xmREwQwAkKwQ\nnxzXTBP5DJTVeJH57OODUWIsIVDYuMrgAzaD2lo9GNXi6gFluWbW7+eijR9q\nAR49GVfNP7IyGJGx9f3Z+cVuFHAI0qlh9JbM+UJROfxKKMSPVIJnIFqjJMqy\nkCRCRGjLTiaX4EpQj+bVspSe0dKzU7MksaFnIvO1IWUOsg6z82Svaa81IgOq\nwa/Xtp2uH/Ynps9jIRgRlxsLwJ4LXc0HiuiZdBK+qkJt0gCm7TrX6re5+IPs\nczsWYrGcFyLVtZfSvfDIgLoavdnnfj/aJ8x9R4yiHAaXZ0pQ+0hsknk6faoY\no1g+4BTsUfk7o623vJ2XQYJOmqXTfW6myy8RCa5YTvXqs0CSVAU1wzKkUfEa\nCyNen7R63r/ad0mHYyuCxL57F+udnHILxT6lgwSaWF8TgaWhUvTXFN56fxVW\n5Rrz43zPtxZTcyCxNny1QfUS9lFn5oWDe0stb7LB8Sqm7RjmzcZ2sXrY8AgZ\n8QZGPJcMwEcwcCWPvUybed6ZQ3nFqXnrWLW6LOiIHtl9nenGSN2DkZCyJTPc\nBD5TBhsrQY6FEtMMVBSwsjmn7g7P3SNSJUmojlLTIoBpBg+j0bItC+uXHGT0\n86Oj\r\n=uHtM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRZdobYZRS9IZhB+ILeIk/jdoc75m3kka5EGoBGM988wIgf/7FOFp7fDv3p+Mx8BUzlsGTvhy9vEsp7hiY9gxrEOo="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.9.0-alpha.8_1538801655830_0.3688688590673237"},"_hasShrinkwrap":false},"0.9.0-alpha.9":{"name":"@creditkarma/thrift-server-express","version":"0.9.0-alpha.9","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && tsc","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.9.0-alpha.9","@creditkarma/thrift-typescript":"^2.0.8","@types/body-parser":"^1.16.5","@types/code":"^4.0.4","@types/express":"^4.16.0","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/request":"^2.47.1","code":"^5.2.0","express":"^4.16.3","lab":"^16.1.0","request":"^2.88.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-eslint-rules":"^5.4.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.1"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.9.0-alpha.9","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-ayGbZviEe2GfXZjSgHeQlU9tpy2wZjpQLuBp1d5SPbzvq4zcdkiF2DQOPJxizrvejusnZmEj4xzoRT6gnyNkVg==","shasum":"f5ad67ff8b790c735106719a8f6d918460635d86","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.9.0-alpha.9.tgz","fileCount":18,"unpackedSize":25985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbuEIBCRA9TVsSAnZWagAAr9wP/RRIsTGWhTlXoJPSs7cN\nvAX8xxXoyRhi6q94MU2rwFLzVq6+kJk+HNIHK1mn8iy91koi+rNbqmy9VBC/\n+znridoOO+xwCgjHQziHiQYy0YxQJr7avgzhg3eYoiMva0QjcKwA5FjpFxiO\nbA358fVnFbrmB0A+gsA5yaC7SC6qmkYEcPEqEEYVuXWeInxRAC/WHI+hk+Ey\nTczP706g655FwcimJShY6A55QJq+ofLZu34XEmKcynX2ws5DnJwjmv/4xQL5\n6vb4pCGbjSk7WNRzU3KoKMRPwBwfhFa/WPdmQ9I/eCH1WkfRT3iymbfkDNQa\n9j3zRvsEW0Xu8qICUKfZ/+JCS/XoNrdn4b3CfUV0KiEYH+lA00NaiuAda9Ql\noO4ogw53tbMRmXFHbPTQJYBBaO2VCD3GfX76mvHtGvg1x/mE/JQ16ZTjRBLn\nrj8ptlllv9a5+sMzm+a49zYzt+N3juWINcifBCItktGflpWHTRsfBmLzumDY\nLbkuHsO4FJwSXdtmXvVwUsbp9g1XVjXPiuHuofB8SDpWOZdTT0ez64pWC2i9\n4bMRMzgSghs5oySFF4KZtxdkaZ9NLMFhbFom2W4+ogSWaEA2bnTnAQgpmgEE\n+p/YM+7hlov159yxCK3Ibsf6HfKA6YqymZkYZ6cw65FASKRqsv7hASgJRfi4\n2zb7\r\n=ELZc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICIP42ycdebcqxiYzFhNHz003m7tlpwgv5vJH9cecfOBAiEAvXoWMGoLSZpJI3JUL6Y1dRCH0cyiAFg6MMSl82gPqDM="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.9.0-alpha.9_1538802176747_0.9588107574379383"},"_hasShrinkwrap":false},"0.9.0-alpha.10":{"name":"@creditkarma/thrift-server-express","version":"0.9.0-alpha.10","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && tsc","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.9.0-alpha.10","@creditkarma/thrift-typescript":"^3.0.0-2","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.0.31","@types/request":"^2.47.1","express":"^4.16.3","request":"^2.88.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.11.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.1"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.9.0-alpha.10","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-YgngtRsg+k1q+1lkQvwLT5e0h+YBev/DNO0/2FLK3ASFCitP3Ip6cmK6XbnYVMJM6kV9NaaroYPu5Cw+/igYFA==","shasum":"da798dcfa62d4019f16f0075eda29a27d43432a3","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.9.0-alpha.10.tgz","fileCount":18,"unpackedSize":25850,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbv4Z8CRA9TVsSAnZWagAAmHAQAI2aLU3q/GKzwr46zL6A\n2L9NEIGjDwlf4IIyKG2GrwM3nmtFweMtIxBfvneI/R8D8Iaggs8+qoyg63S8\nBhoG/3XJBAzQ2b82CRAWD4YIyqEILMq7Ln5dcofLt9hDqf2/zhUktsiNudPh\nQKD6ObRQIvmkGVZXdJ02BBwI4rBCzq8tLUAFtAbmSsfPw/AcIE2tPmbpPtxX\ntkEwYRzt6+xXdMnR3tj34CQGbs77R2wjsLZ/XbRV0dAKREjaKFsjdoV964vP\nBfC3S4iLtC0ZsmqGNaz/HZNYUyNOfO6gTpqzQPRZ5rTLcCay98BbDUXC+Q6h\niZNAgjnDnrdimnwcQxHlMYaIbjs28U+x9p4kumoasFcEdFY1Dm9Ui1pgbJMN\neDo7wZ+VCHP0HPKc3KNWVXsOaOCxX+hGxvN+UwhPZQQFN6RHygkzR0UvDrcE\ndMZUE0Idq1B6E0WTQCMcgjvojPtxwlyURN3ljQlauurOzFj/0yPcgujPeNl3\nFQ+L+D+OpJ87tPIGpKouNxM/W1osTUYAJRCr1s4gL2sPjSIjl3F9m9Btst3L\nF7mf+GausWsDtFCKTn8Xb/YJQdsj4J1jJrDSZwF4tnlhM5Jjk4d8LTMQe7GP\n26MijMb5VAgyBCTfNztpgXxtsaYJen3J9IDkqw/V7Dryyu0VteGVFxU16qWr\ncmYp\r\n=oSs3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDslRZud9RoyogyyS5ca3IYoTCK52n0zubTz4Pg29mxFQIgOipTLz4ALzUthT/sogIrtIWCm1bP5jywrl7eiL7ZtTQ="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.9.0-alpha.10_1539278459204_0.57641792271016"},"_hasShrinkwrap":false},"0.9.1":{"name":"@creditkarma/thrift-server-express","version":"0.9.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && tsc","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.9.1","@creditkarma/thrift-typescript":"^3.0.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.0.31","@types/request":"^2.47.1","express":"^4.16.3","request":"^2.88.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.11.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.2"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.9.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-SshYD59VgJgHg2/Ur/x0kgcvhy5JaKWv10QkQQTqwmtlBtMk5s2fUDY7tSx/D+DlvHkbSWN9VmgQCjkro8InNw==","shasum":"591437c0718fb944d4077bd6397766abe90d3665","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.9.1.tgz","fileCount":17,"unpackedSize":19658,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbwQTJCRA9TVsSAnZWagAAw68P/3fJSaCVxkUewJXCyVPl\nRygSoRNMoPVPR66ixSRuNVe/bDKM02144QWhuuJpD61DGBJIM6kR9tEQRfty\n+0D8WiVibfUXJDQFzegt8Do5O1IwQD1YELOL0B3zA1gaXWbXMJ1HovFJprMQ\nwlmu6I0369bXeTML1/pIwTpX4DML9X1BRGGSQ4dtwyF/TvXNvclRDtjmKLea\nitxIbfE5/uh+OrrT/WA2kq1VdCc8PojFfQZ1TipdGj2E3XSHx4s4JYDEErSj\nn1BrEbAgITpFfbL4TDocnPgcsuReISB+dM1PaaJSdxNZMWju8Ck2OwShXV0I\nC6UiJz00BHhwQZvp+oQlxdfKRhWKe6Im8m5wnl1RJnO3QYMzSMJ74o7j9aoK\nziSyP+Dox9kzs6JOjdCgo82oM39XR0/HXKJgb72xz+1QR6org2XJbVplt0O+\nWB1r43CKobUIqw/tJ+/jvUrsrDAiTebWqlzFxeSjQlFbuMGCMO53DaIhGXy5\nACKpNafPasbm0xOyGvW9M77nW7aru2rFGQEUCg9uDBxLY4OsHjasLPOeY5k0\nyLX/0HWZ/O3WqCth5vtcP/fA9RX0Uy/+F8Taidl2RsvYYIJKTfBfqoVnWIAG\n6BKJqQ5bD19OKFWQELkFbMOye3+Cg3YGAhMVHPazwGUju5+03+hB4WXzsyrf\nWCEf\r\n=6HOq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyQuaFqx2FV1FCvnI3mhzrYSbl1PbFHAE9r44W2TP9OQIgKrmcJByatKOvILFD4ksKnjqD/aABlYWTGxlvNTUaZVg="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.9.1_1539376328528_0.5541049034414403"},"_hasShrinkwrap":false},"0.10.0-alpha.1":{"name":"@creditkarma/thrift-server-express","version":"0.10.0-alpha.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && tsc","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.10.0-alpha.1","@creditkarma/thrift-typescript":"^3.0.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.0.31","@types/request":"^2.47.1","express":"^4.16.3","request":"^2.88.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.11.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.2"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.10.0-alpha.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-WGuTmuRNXUg5rdIAL0aRHUmjP9royp/JF3Or+IXkWHRAkTh1O23H5dJ3PsQuBd1pEy2hDnvmRvP6UWr7DbFL1Q==","shasum":"5ad463963cc67f2d24ca32bb778e0f826cbceee8","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.10.0-alpha.1.tgz","fileCount":20,"unpackedSize":19832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0h79CRA9TVsSAnZWagAAIGEP+wc6CbA5a1IwFzdrJsso\nLlQ+ARMunNvee+pT2BF/EhiWn9Rt8azjPlJXsWP+dBzfawMvDL91MseHOzo5\nyDI/BCHdsTe+/DWXk9aCeA2ae1uHyb4n/JS0cuEgUrrdT1vmKy5ExtqyzZN7\nlpxkIA9woAUrGP9T4nWakzv0NIhgizam5x/oksd0Xj3zjQYQI+ejnMqLx9R7\njguWFpm6LIOd2FnN5dztFbLGPHei7RPn2RjH/yDVnamMCotC2/TatS3mFdH/\nUc5k91GeK4XhZ3IlNy6oxxID2ZFF355EnBXXPCnt9pocBjJhZScbqB8wPmE1\ns+1aCga6AwEGDGAz02mLZ0+kegcYf+S4fE1TlvtwQmt1BETzG1tu9GrvWCbY\nSWhP/ZfucxG9dZpMo/4EVKoF+57ebclcz5gqzinkJyMy19fhZ0VvpPjZ7H6k\nQmRIj0Bngqyx+rL7wbmjO1cGlVBcV3E4bPaNgnJSwDnADAMLTNMNc1QWrzV4\nD0XNEdgWcXV+IiVI5Ik4kyCp9qbl446X8BPd0FSn/8K/ZlebSxBzQ/ni1onB\ncBP/BhgOnKW9OEIymjX+PN1UrIPdA8konKaCq6GAtckATkImrb2pV/0Bd/Ti\nB3Pu3/XDInRu8K97Gbm0uRVsSXQwtXV14H7Nka4ZbXiGsbOcjp5qRC6PoUWr\n5RmA\r\n=M8hD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpa51safGmwVf2fSBwJYf8XkVGD5/jn0rcvmRbGjXw6QIhALqt8vxmHSLHE6aK+YXHyyRG+P0xccx+SIjUjifPkyMQ"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.10.0-alpha.1_1540497147727_0.01169758000865806"},"_hasShrinkwrap":false},"0.10.0-alpha.2":{"name":"@creditkarma/thrift-server-express","version":"0.10.0-alpha.2","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && tsc","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.10.0-alpha.2","@creditkarma/thrift-typescript":"^3.0.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.0.31","@types/request":"^2.47.1","express":"^4.16.3","request":"^2.88.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.11.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.2"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.10.0-alpha.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-wtO4K0PXn4FOQuAweba1S7zbmrG1T0zf1mrcngZBGW+9XlgJTpxDgrpxXPoEADVeU5jTy7qdvQaCa2qiP6+BAw==","shasum":"276607c219422ab7e48b7f59e52d42f637abab90","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.10.0-alpha.2.tgz","fileCount":20,"unpackedSize":19832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0iOpCRA9TVsSAnZWagAAxG8P/iboOEO+PCsqYKXRyof8\nLr1xc7NmRdmkV52l+V4O0tDnz6xbNlpu3bZRHvj4uA3rBwJorBEPPbBXsijy\nEDVCZV6JKuLqRJcgYQARrLJwi4zd0//1Vcq8a0FuDbuVSFTGRBrBlNkBQDhH\nAsE6grWDm4fj/3RtAGZzkUbxLLk5D7JZfSLAIvK1XhUf0oZDWJoPfUnjfYzk\n5I0YM6plSRlQ1Ij+o507gWYwSRBhkOIVRMeQ3l9MaITFa7fDVcLQQl2lFhLs\nXitizdNSA0NNo48/rU70374j81qqcIlsGDt48Jdfyt18uhQkA9ohlxVMgsnc\nUIgW0ID3L2khsOcytWg5u1nGXWN/ZPdlmcbHJ2SX1FRzUsEp+XK+Uad9VQmb\nQ9QxwHs0aLIFu9uDBthrJ6VgNyr5Y+E9y8Lyuu4HET5rh+3M+W/9l/qklRei\nx62kzB6/rtj5UPgilhQNx6C/tP8lrgC0UZ2+EwCJn4fr+/sYzAk81e+56si5\nfIYbo2W3REdklWZ3EL173V2XZBnLJcYBun5yoqq3iXmE8kV9iXKLcdU7wkvt\n1gm2xoiIRMm7r6EeaHEE7pZKsu8rJZEu8XZIJHuMtLjSvI9UTovhC8//ISpa\nEp070anSKVdFthDWJiHw5OQTSRpZglDSkl776H8FZ4wbCMg555s/BqEarJLs\nfbH3\r\n=9NwW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGabb2m2qPouqeV7ghVeRDsZgKKnMVwEQCjg7pVyj34RAiArY2KlWlejm/+gtaHp1Xs/Fa7U9x99Omk6ZDP8eLhmsg=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.10.0-alpha.2_1540498343482_0.4620824874236047"},"_hasShrinkwrap":false},"0.9.2":{"name":"@creditkarma/thrift-server-express","version":"0.9.2","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && tsc","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.9.2","@creditkarma/thrift-typescript":"^3.0.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.0.31","@types/request":"^2.47.1","express":"^4.16.3","request":"^2.88.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.11.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.3"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.9.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-XEbTRWUDPIE3lQr7PHRhZhNYqhE06Z+rAA/ja/8X5P4jKiVUziWVXgvWEBkZeddzAb3CTKoK3SVyVkRGlpANHA==","shasum":"d4a2daa86f51cd7824836decadf0a48861ffa542","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.9.2.tgz","fileCount":17,"unpackedSize":19658,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb15K8CRA9TVsSAnZWagAAtg8P/iOzzQaVkh8yQjpFjS4s\nDiDjYyva9mgxdZbaDo/uZXbRiyT+6l+TthjTYX7syIuwSD2N0G+NPs8zccEJ\nw79pJuf6M6+OhSzBA09BSvhKlq2hm5nLn30X/85Z373GdOm4z9U91vwRbnKZ\nPJZfSllxrDd4FTBYcN/VM/DiHDZ0X7LRtrAnoSVja9VsSDYV+TG2KI/rTWec\nv4h4RzRLUoUR0vuCRhED2EYArey18+2ip+oHnM3kMGfSwTs6yZBdwXPcze6Y\nlClgWy7SrvzmB0HnL+YtMtx+M3lpZc4YdHEyyJMcPiWnFmQAwIRQI2G/ky/k\ni8sHugbVYQhIBpAtIOaPyDdqV/2MnfgUsOaPm/lcqDwIAilTdE3KFOHhEBZR\n/9Ix3GbckxaJoakJllqeO++UOuMz4w9A2w6P6NsIDudT902RHI0juAA3ZNK0\nFjAn8oSsQUByxNMee4pWOnWbAFPwYa2/bl78AvBeFDaH+R+hCM6Xmou1i3L2\nr4n/msRXrY3zuvkrOcgQf03YiW3KD4xRKJv8P5E6mpWSWRpcy/OxspEtDUKp\nKSBQT1xJDkRGtGLD4UIgPVw74xpkHYsJbjQTUGC9iV+f1TsjmU4GcwBvvQa0\ny7YX/++msl5dcXt1ODmVtQj+x58w4Yys7p3AofaQNvzmZQCsUMm8IwYTbRcv\nxfgg\r\n=/xj7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsFOdG+qyXcPdX3/bb2WCrnPKk971BueoHsETlBZs4qwIhALhBXUc0qBLK5LsTVzEPxcqcjrjhubDkMagndPjf46QC"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.9.2_1540854460143_0.7451053657648659"},"_hasShrinkwrap":false},"0.6.31":{"name":"@creditkarma/thrift-server-express","version":"0.6.31","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.31","@creditkarma/thrift-server-core":"^0.6.31","@creditkarma/thrift-typescript":"~1.1.7","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.3"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.31","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-i4sxGmvvA+fmHYMfybrPHLurGy986delmZaiixy35bsfs4GbaKZj9+C1z/OHo6nBI8Y+2rJ405SA8z45AwYbFw==","shasum":"7c215c64c7828c081954bcb117e37cde5cf5f297","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.31.tgz","fileCount":18,"unpackedSize":25600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb15YHCRA9TVsSAnZWagAAn5wQAIiHSz75+gDv+Q9u4mOb\npd8ihocGfogyKzS6bqKth+nmW/F/MYEGsBI7q353wqXsOoAerIjxelD5kSxN\n9tDZ5M44kYGaQJPWqoFZkH+IIqXVYHxSfcENZsBBsn4UjO5FHw4UFvWtwg03\nB75fE00BNOctGsJYmibmdpZfx+mwKbIlOK46f7I5XYrtsmLnB+4TeQNBLr2E\ndrp14GD3exQRs5i82/zNQUmleGBvPuSgYxG2cR73Zv1J6DyjB4XqIoK7XfDp\neHez2oG/v4g/YmYl5wNk8gKDYaHAR148075nIgmkHHg3O3LTWD85H2w5j6da\nwjl/k0ALIFzyqKAXbksNTSHarUSuVHsLv7p5j7lG0qLkHLDQuWzkMSlSFoOl\n1oQdfIPBl0+qGeEJK45BLC0DSbU8pGeLAzJ6p3j19CFSLalF98EPtOoR/5vK\njYvHCXaA/srlIPejFblCHSPsK3pAUEtoAK4V06CEEu3iY6kmNgz/lPS3f+fY\nmT9HsjGbLRJSibFOj8sqUrBdCCFkOAhbCb2S0IDItFHhBb9yRdpyxg66EjAo\nMs3j1EAa/onnlFRfEtOe/vtmMwd4SWbCyeRR9konAfZMETUy0VneiMqJU7cv\nLiHxZKbzuIXFUVrEddu3vNeLCUJMhXn/lGl+GUlovvLGCzidzOZUZ5nyKyBu\nyUXg\r\n=FD9X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE3qgmpMbmMhy3R/MbkeEki7blEH1O/qXErVI5FzZFpNAiBQR0RaL8nUweM1TxT5WMynNQ3j7266Y7cZwPF/DV+9ug=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.31_1540855302756_0.1842345427016696"},"_hasShrinkwrap":false},"0.8.3":{"name":"@creditkarma/thrift-server-express","version":"0.8.3","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.8.x","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.8.3","@creditkarma/thrift-server-core":"^0.8.3","@creditkarma/thrift-typescript":"^2.0.0","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.3"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.8.3","_shasum":"c660efa1a7fc45ec21a672b1da5c3676922586d8","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"shasum":"c660efa1a7fc45ec21a672b1da5c3676922586d8","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.8.3.tgz","integrity":"sha512-/kR3XiJ10Ul7NdvZCQOXBY9n5x8+6T1Uo8q5msEghThVSm8hgnIhp4/mIJWArWW0Dcprl3Qe5BvaoVdH9UKmyw==","fileCount":18,"unpackedSize":25880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb15jrCRA9TVsSAnZWagAAytIP/053ZpQbO7px4LC0WPcg\nxXmwbYo4omLEgcnvg84vopbSOwe9U79DZNXGefXw4PrjXzClfkCuthzn/eWl\nZo6keJ0ovjFQmd4n3JlCmV+er8ZR4gzvyV1fePM9TnrDszvNR1YOFrIYbasc\nzobTYyzXdxO6mMdR0J5mK/vmNBBcZ6nOchhM+hI8z1WKacF9rAjNPAAvKNri\nkloxQFI6T/QJo64iuLKt1XbdyiawJp8Hl9wY424mk2FQcN2U6/+WLeL5GdHS\no3lavXcvErG314z7a3JeS9ubXsjiA6OIyfKEvq20KYGyM1rElJdpP8sUmYno\nDQ5w4qHMkeZlF0iiz95LhkoFuQzWnAqsmtv3pLY2vyPuLb4w4WwCScQctBrr\nb2OclHFzpZuHoC/ziQogvkJjzEdW5ItQUbejCrtkgDGHbROtWVX3BpZuoh2U\nU4zqJoMfyh7x4DcNCFYO7yzyO+waZUXdKY/gkbhapX1sDWnnRIf0mBi1Gq/V\nSXK53m4pfjbd6th6J2pw0Wk5jp2OZt98kXUgDxu7ksbISStuBOXzdDMgLY8i\niTv5X9fp3e3gGiOyi2P/XoRvFySe45yLyXkoMnPwmm7OIAR90B14bEeVhTPZ\nSlz8y2bswAlLV+QpW2r0fUWjZ+3ls0TjoPQddjH4pNrOeeFe4yM+zoDNAKkX\nMLpY\r\n=iDMu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCi+FgMZDPV5O9CeB2+LmwDpgTqgqeNIGRoSLujEa8ESgIhAKyyUriI4ZOemyZaEIqa0Y6ln/R7MynVc5GH84B/tTT7"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.8.3_1540856042711_0.7490741985719358"},"_hasShrinkwrap":false},"0.8.4":{"name":"@creditkarma/thrift-server-express","version":"0.8.4","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","test:only":"lab --timeout 10000 --verbose -l -S -P spec dist/tests"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.8.x","@types/express":"^4.11.1","express":"^4.16.3"},"devDependencies":{"@creditkarma/thrift-client":"^0.8.4","@creditkarma/thrift-server-core":"^0.8.4","@creditkarma/thrift-typescript":"^2.0.10","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/express":"^4.11.1","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/request-promise-native":"^1.0.15","code":"^4.1.0","express":"^4.16.3","lab":"^14.3.1","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.3"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.8.4","_shasum":"3b26104ae7d0d179672843cc4f0eeac893585c94","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"shasum":"3b26104ae7d0d179672843cc4f0eeac893585c94","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.8.4.tgz","integrity":"sha512-yrqRR+9RNQJIRuUhJ+S0tPXbBMeeAYmiXGhMMClYdaicPE6+a/cz4BzB22rWDhHjpWAkpvjQUXQ7ril124Y/pw==","fileCount":18,"unpackedSize":25929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4NCdCRA9TVsSAnZWagAAE94P/RHGzbw2BCpg2X6PGMOm\nSfNBnkZxCxydFT9JiZJ8IxaMzClx0nBypKPXZQRzPqhiHuIs0qGKEu0/RJxL\nEu77U+nr5ZMiXrXGkZ3ANIiXeuYNLq7+A5KrjYZgvF338ZY1fiIDQygY9J7G\nakX0kFD0NrRx4gCLQ+Z9Rw8/KtXeDYtABD4HmU5w4Misd6gum1OwM3ZpWOtn\n5PjVBgKwzjarxkj3+BzeSAkonr5QOQBC5FrjsbRYeLTZDzJxr3dvyTq8YakE\nZgDI0+EQmlTMYMJwfAcNnPDoaUyGpY4sEwpKIS9e6/cBScTtZ672Ddh/H07f\nQVwy4Moii78hgwfWLdX8gdPH8pLpB1WlnQ/q0tZwgP7LUm8joD0pHjjI5SEe\n26jU0Ygo38HPscg92UwZrJQM6s4NX+uO9o9FWuDimTVE2dIqEOSTFXyWNWWS\nZpSfL0LQIyGg5zBjc1NZirXJs7ds1eznMmNmZFPg978m0mZdohZDw3gDQwS7\n8NM4/w09lyJthl7WsGn7uoEQssHSfaQg/1GWZbjzpLfknEuhyoEGy4WWNTKT\nzRb6vjySWiQOQKnCVe2BCzyD6orDbm4ccK4dHNeNYm6+Cn28+M8OqQ/q3Zem\nIMVUvTdVO08HO0LZMJ7zQJACCXpOQS2nfxH6QUtknNXimKIhQ5rjNhVO1w73\n+FzJ\r\n=7oow\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBYsblaaMbH613l234BX48IsmdhKPhmY7dJwbNXyoAstAiBBubAZ9fMsUTvA2q06BaeBZf5PZfgU59B2afYbdMzn/w=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.8.4_1541460124786_0.6709662214340268"},"_hasShrinkwrap":false},"0.9.3":{"name":"@creditkarma/thrift-server-express","version":"0.9.3","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.9.3","@creditkarma/thrift-typescript":"^3.0.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.0.31","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.3"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.9.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-M3r0TCa/TZAkgpjWalScLsto6mLxNyMGrgVC/Q51GryeUjWvp0poz6qOf758VIaxHuoAm6NiBMuQsnwAXef3/A==","shasum":"24696e86f7443f620565d5daebfe52bf71d6172c","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.9.3.tgz","fileCount":17,"unpackedSize":19799,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb5KPnCRA9TVsSAnZWagAA5f4QAKNAEu5jB/LPacufOmkz\neYCqN2DOgKjONiDUIEfYfvJ2t/zQFstW9NoWMcUh/+gXljge6KKlW5V2cKpA\nExD03rUfEU8S4b6D4yaiPbvtzvV0DH9lLid7Wk4Bc1vvPtuFWSxCLqM8cffA\nSSmgNsTDjwGJnIwaJlgdLyToa8Y6+v7kVc/2653ByIawkQtjEEFFOc2BciMd\nJQQizXKt7q/92AGIZ2Dm0Brvo22zVu0k/yL+gGZFKG30k3b549xoPBHrxH9F\nzvQDRaM2aY2255vMDht6wGkN3CracoF/yUMKHuFndgDo8ZDnpsP7pO45/gYS\nNwDAxxvUgs0THAeZI4WKx/G0YYNHBitY6XflOeFD0fq/5D+y1amii+uo3iur\nydlpFzdO5zSvn4xOqaksdw82ddtxOVuAmGlIiXBb7Ih8bG/92J3KOvvDX8m0\nPZbXWziAxjkMPz4fHIfeN3VOMLMwSowOsYZYNkcMteOfvQqRBVmFPeh3DhUd\nVo4m/ilk7B5uUg/ODdr/n+w0hkn8FaiNWO+KEsxYYwdv0WyBIcWDd5YHpEf3\ntxY1tIr0p3Ma9PruuEMIPJdox6/ToHVJlonqbZSoH+zvi/Pq6pEztz/G76uZ\n6SYimi9yh25abPkGazRJnsEkz7isVGJwaAEKjqHFDY2Ry/SFPydfw9JKoNMl\nSAfq\r\n=K9zh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHgUNOD/ciIb4zTjXmmcaduy/FNaT3DbDgeqHI/S+3vzAiEA1cffprZkOgWzQH7hPSNs/6u2rCr58RnDWNc1rNtiQzU="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.9.3_1541710822583_0.02665797337127329"},"_hasShrinkwrap":false},"0.10.0":{"name":"@creditkarma/thrift-server-express","version":"0.10.0","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.10.0","@creditkarma/thrift-typescript":"^3.0.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.0.31","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.3"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.10.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-0YjcJONtqXosM/oZn25hpGB7OXB88Vv4NaCfLRfeZ2dwjXkHtNjxqO7lr3wMLXxax/kisHc0DjX8QUsl9sHSGw==","shasum":"59c193f88f21507b0084d7cbfcf956dfc147452f","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.10.0.tgz","fileCount":20,"unpackedSize":19888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb705XCRA9TVsSAnZWagAAhUEP+gKhYKpJMGaQr4YmnVIN\nkp3vmGzVoOA7jqqG2Ar2QUtd5HoFZMY3zeXjM2rq/98BhnMaLEdoPlqOIieJ\nVTFjCIqDzp0xwhXv55LdojztqLjojw9ejduyY78uRF9063+pWFRDFSFrg2y0\ndobkBQ71hMQXYOB5pu+nJG9vtMl3iJ1YavtUMVv0dgrXkjY7kDTBone4cMQc\nc3NSVjaMCexmrxbcLGcn7ff3dfKCn1A+5/AXuaTuVntfypYgRsCdk58XYeEk\nBrvAY0+39BwiRbVLJ1hLtbZwPWlEM2hUqyMDb51myVfXujnIF1+qQaAEeE83\nsBt3rn/ymLkBXSaszAfEzrEWeudfo4uvkRvl6zGmC7a7kk/pPPNyERSCkY8u\nWfXmCfAUCdz7pAwlFD0UmCks4Pgwdms8Q+oZW3xHumni1e2w9uWpMOQsn1CD\ncsJybOK6HnEY5DHL10/SCV9AFKwvcrI74KRSM0ZrIzRCGKXqnblG+Ewx6BJd\nW3k4ANAIGXPzK43VbiaBSFxxJjQ4RsOAr4DmVYvCW+FlfuE1IAI2c9D/cTRk\n7YDIwOvwR/KlSn0Jv32s5L1ympqHUAM1RY3XyEl1jTKxMWWz0fK0nlKevidz\n8m3v5JxzfTPSuR6Mwu60TDULqEx+TZa/69lSC7sfLyH2Uwal5yGB6fEiMIIJ\nfmFl\r\n=868W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCN+8rhX0cgWlx1xkBcSEwbmh9OJl13hwkRNwMjaWJOKgIhAKTGxf/qrwtU0jvdp8e/ru7R2yTtfcGsw6INJd/59Ien"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.10.0_1542409815023_0.07214316784414065"},"_hasShrinkwrap":false},"0.10.1":{"name":"@creditkarma/thrift-server-express","version":"0.10.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.10.1","@creditkarma/thrift-typescript":"^3.0.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.0.31","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.3"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.10.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-+4qvv5Gjmm3jebBfQu+8JZJ1MRqlECJnOK3ENtlCUtubk+8eoYhUSMDxvsQU6z5/wDmebK739ls91IVQbxMp8w==","shasum":"6dab8e6e1e08a45370521d1e69c1d4fdde24244b","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.10.1.tgz","fileCount":20,"unpackedSize":19888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb71SBCRA9TVsSAnZWagAAMgYQAJwqnmgISYdFd1kh6bNF\np/r4MA0Q/fbNpzLWF2mXNPk/64yyifT1QZ6rGs8OF4q/JgTxUv6DH9umsmJH\nfCigigxNuCeJeVTEm7WwuXlp3JemVXxLZcnNnysehtoU+P0pAoL9mGNscMuN\nKTkb+ky/CcV/AItKrabbhKzsd+oaRjb0WdncgTqVI6Zb5yKkNPzXl063dv88\nfyhcdaS3MKrp+SR8/Dx9zGjzmlcWbcbFq8H7YitQxagI8QJEmhLDPPU623+N\nKFmxiA7vLwjgLmlvIyeiu5bxUmBqE+fUPYbA9Ba40NRhD3oJfOy7m9JWMJ/5\nXCnAUr2PGT9ot1HER75BvWh69gaJ6rOEE8YqJSsiPSLjcuYsn6WLrK/MQqOg\nrGem+WdVXsEkQimvUWnkvPo0eLznsuW7Tcy8C/5xbMzjp9BBna+YjUzc9AHQ\n63cTbDOtv1NQ8NxvWwcuFRQvZ4mhsC+5vaGkiEN8jUh0q0xGZ1GrbaPo5bRC\nGisk9ljNmsZgD05ugkNBhYF4A+87dfEuwDvZ1jkQjytPBHxVHNqOJbM07VBO\nVdjZJBwmInaKMHuRpngQRRiw0PIgwuexK+EEV5GyI6dovHKeX2E5+AWzluSG\n8ebvqnNH/WJpghKJNaLgZ244iczjEipKS9GdQOzgIxPbwXMdICs/lPTGoRGJ\nGxth\r\n=urji\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH2W9ol7p4J9hwOqFSyobHbBMQ1tQ27QugcGc9eAJ22XAiB9vXOq99T5qG2c+f5LqFf9s7eL/vBK1S+bGa0LqKtnTw=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.10.1_1542411393103_0.8611619656735943"},"_hasShrinkwrap":false},"0.10.2":{"name":"@creditkarma/thrift-server-express","version":"0.10.2","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.10.2","@creditkarma/thrift-typescript":"^3.0.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.0.31","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.3"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.10.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-3i0uy2FbKphsolniE0hUq8JzDWOOwb+F1zNm8SH/rGlG3LzcKUM9zWmZKT6ghKmIrSGTRUBS5xILdL0w7yPG/A==","shasum":"396b1fb38b0b3e51fed7bb7ea86c26d831c0ec6b","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.10.2.tgz","fileCount":20,"unpackedSize":19888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8iZnCRA9TVsSAnZWagAAvEsP/jlIZDnEnR343tGZDUrs\nQt9d3IhI+4ZLeJmeiqu9iylwBK1cgxK7O9DTH2Zc7Ee5jlMY+U9GZCW8wTCr\n1dC1Ej0MyhdYB0wvCcPuBZzwyD2BbqFMES8dIbRC9dNd9T1sU1Trg8a1UVX2\nKuhR8nfahYKFdaq1ni/1AKTLxp2mB0vT4W8fqHbTItENhdOY60qZe0IGCtAa\nTu2xSvC0kZgQBvwd6CXOC5ELkKcwEXnhQE1GO/opVPdyer3H/YeUdjxkIhpB\nTfETvgiap1+ElpmLruhhG3jCi8Qg/97RNKunlud2C6dPAA2A3gCrOOxAykJA\nEleiSG0T8QuqG2k1dIsq3knNORXR/PLu0hJkYXMM1OUBGG/a9YL6SxPSwodS\nXHlgryo8HClMwBpRS0vMJnMFppFL41ioCLds1KQbnEBmaqOP7l1RPX/e89zf\nvPq8u3lSweXE4/lTkZ700vWHxBJCug0tAjVR7m3DrUsS/bfOylH05VzqeSc1\nsl1DBqgEGJJ8QcS21ioX5lNyppwxhnZzlLd47XgiA3ysn7PjRv2a4yyxZKNZ\n5YrPBGEpDfEw6Ab/Gt7KQin0prk87eRw06hM1BmRnc/mFoGMPHHnaGfv/Dh4\nXAzJhlj5rczHvCwLWWmuUFmcJH748h/FbdtGb0kWbvikzQ/zZuelfuIdnkTV\nQ04O\r\n=6i4H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB894QVMPrsLGMsWx2Zv9WH931TPk3TfsYRcWuY2g5pPAiEA282i/UfdR/aTcPUq854Li/z6mv7ZGvgU4ftAqNn+uz8="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.10.2_1542596198382_0.8697223106019547"},"_hasShrinkwrap":false},"0.10.3":{"name":"@creditkarma/thrift-server-express","version":"0.10.3","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.9.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.10.3","@creditkarma/thrift-typescript":"^3.0.1","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.0.31","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.3"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.10.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-p/s+Elfnpjkgq/fZMvF0hnzHoO3gks4aU0OlqautelJAdxei2Yii3R47q7QKCcdLl/E3OACC1kRZjlM5Qga6aA==","shasum":"e4ade3a54ba297a0e425e68c5b8bcc0dabc7b270","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.10.3.tgz","fileCount":20,"unpackedSize":19888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8vU4CRA9TVsSAnZWagAAm5cP/1WCOPCmExqwQN6ZWQS4\nhnklHmPrbbMN8OTSgqFLGD8GTGDSecXaJ654Wjao27YTBt1YaWIegz5/uBxf\ncz8Y0BUib/liqfzCbCdvNeUFFr1Nj6Aut2krxOprFvXL8PAV3t1DLz2oclw2\niH69jwXcBGk+gUfahNCRHTzCR2s5irEyDYbNunrUPPkkujK7iMtf1bGMRept\nUrwMqV111XsI5/onIGeq/8h9YfzimpIWQ+2HfLndM6wNzRpSSTvs3zM1X/RO\nvEsvMihr0Wpb2yKCc7Rk3TcYgPcvCmq6f/vi6xMewYEpWhCTT/DTueUZsrzI\nUgIH7XlYRYJrSfoZ2QJ8iYCsSKbJdu4is8/omhQlwaxHnovD3+xlmFMLOdz1\neJunPtEqX8d5NcJ3AX5ZiXS4jHPDcFd6UfllR2FadtfphGOPekBF4Yjj9uIE\nfdvPnDDy7hpoF6e+BvcQHoig3DfeiEHtZvjZ4AwaYGockujrsZjU4DQ/EDsA\n8QKeUbdReYPoSncKxu7j5WfHo5XTP+cdi7cI9nT1Drc+7t6eSlyNVZ/o5GQ/\noOufuLHoP6MWX2HpUaU0nEXfeOV2Jpmrae6JZFdudAc1VssPOPG5+ywkUHNi\nJyScePSjVq1PP2Y3KRdKhayBjuS5adKN1YlOtKM9rwAf/vamLMcfMzOFSIKu\nSuBN\r\n=FhOo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBKgCQv/oUQ/cq6G3273yBLapQrlwMpmbf+Kt4hLWaf8AiA2T0wAnLh36589zx+zVdcoeaOzsa+6xDbbJgg1znADPQ=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.10.3_1542649143911_0.6718267300108558"},"_hasShrinkwrap":false},"0.10.4":{"name":"@creditkarma/thrift-server-express","version":"0.10.4","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.10.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.10.4","@creditkarma/thrift-typescript":"^3.0.1","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.0.31","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.3"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.10.4","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-PkuPTe2gDxgFztwHpDnAOCitaujEZ4R+BXdDfWJ1WRF9rE2UQzqiROGxbgNz82sfP/83Sjzzq+zAJacka05uWw==","shasum":"192e4cae7d20d362ddd6fec59d2309eba2374b0a","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.10.4.tgz","fileCount":20,"unpackedSize":19889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8yXuCRA9TVsSAnZWagAA4uYQAImeEzKxxszCc+jT+/2O\nO/Nn6/PvF4MQQ1kvJQmlk51OqzLeUDZYh3uA3yqX/4BB6HXlMMxQ2/oIE8MM\n9zwn59tMSd7GKLqkoHIbqvcGeL+vJ/pF7lQtiyV0uE6Abf1lo3Tp8ofqk+TW\nAY+7/IMvwpANq0bGAhf1ClRY3CICysNwVHqrJH4nkpE6/TH2cL7bBuZcBwZe\nMOBxMHjpUy1dyn8NmnjkrWYLEET5xI2/0FtkzVR1SzkkL0BaSdiMsdQGjsKu\nIWGmJF4GqJu8t0HtCBvjMhtEXQees7VhY7RICLnxF/kMhUylx0hQd6axTRVT\nLEHCO38GsPm8aqkApY2zA34s2FXDj/dGO2bZ9gKuUDUeT3C7R2VWavum+7+F\nNxgvJ7LDn3D+dO/ucgJJX5LIJBSruHTgTNCVHOXnAcrMSxGB3CFRH2yzNm7F\nXXEy02kqit9FGKnPUreIpBw+UL5f+6JvQAeWlAc1tY+6UQX0RmwcdrSyI06c\n9RZPXlMb6rhJREjQCpV+VUetT+5Rr8vwmS2dvcoX/YhtFjk49oR7rM1czgwc\nkA7hdrbFeqYQ/cPXp4o9zRjPDjzYGjeaYi+77BTKG6G7uRIz4mc//nonmZyD\nZI+CR8Gzz1apEcFVcpile/Yf7UM40SrW/GZ0avmfyS7Fdg7L+MxtKpFHBR7v\neWxr\r\n=HTxu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWbWdjlwH3mZsUn4rgxvx6IoCBbTAFziDexJyN9vHVOAIhAK7WGAbS+4k1aRNEHkGZ+0FrawZAsUgS/P4uU9adoHwK"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.10.4_1542661613048_0.37006738389866256"},"_hasShrinkwrap":false},"0.8.5":{"name":"@creditkarma/thrift-server-express","version":"0.8.5","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist","lint":"tslint --fix './src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","test":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.8.x","@types/express":">=14.0.0 <15.0.0","express":">=14.0.0 <15.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.8.5","@types/body-parser":"^1.17.0","@types/code":"^4.0.3","@types/express":"^4.16.0","@types/lab":"^11.1.0","@types/node":"^8.0.31","code":"^4.1.0","express":"^4.16.4","lab":"^14.3.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.3"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v2.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.8.5","_shasum":"44a163281bdda978e8a1e975fe7505955d9bed00","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"shasum":"44a163281bdda978e8a1e975fe7505955d9bed00","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.8.5.tgz","integrity":"sha512-EWBSdKjmqvw+akSH6ASrbxdZSXu6tpk+IQ6spyFZSMLVX5AunG4KV2AXeGzQxRK3XqkHABBxUeNMPGEYJBvEpQ==","fileCount":18,"unpackedSize":25287,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcAHQqCRA9TVsSAnZWagAABZwP/3X8KkJz2sc0C8NsnRxl\n790re6G9+sGeKpmFL4P6SOeQRFekJDwxafPKD6sb9JOlhYUXsQC5qF2AL797\nnQ3ep57VtCOfZalhPVqLZ2wKiT5byN+GCarlFMVT9BxJf+JYtIQp/0lDN6pD\nhOk5HYryUlK+9xOewURqRL6oOcsqSYwr4J3Q6waR84zQgS3mIXQiwXRMx4Gt\nnh4phjBQ3rHXFTuMdbFgep23Cp3Cveo/HtsENkbaaKkx3xaDBbr4zi15afhx\nQoe7xxFxL+4at1V3QVtlrZVEGgOCROFsobUMHOsqQlvuZ1wNrvfTyHeDwT/u\n6i+0mhMzdUKzWXbyENU2sIFHrXbWpCWEkZxH5ldXbanLBBL6x4FhwD150Y3i\nIRJhmZR1anxYX+7DsWuxZUe3KUO+/Ef6emaqjwRVs+Jw1QGphAbs71b8sWKH\n2LGHVDjoFZwlR1kUFUqHDwdRIg0Lc5XKC/A/9DRF3zLVeuVQpApU7hGwmM7o\n1nWMbbUScbDOZIOetEVvcQtdAB9erY7sVAhqE78kp5sLGYhv49SxN7Z0jM9Q\nxt5DAh0XBIRT80MXbDt7tw62LgQDI4sed9/DRZG3CQh87OWswglPmN2sipRT\nE8NcwxFkYn03kw2zIafCijIUlNK6IkXYw2BQ7k17i2q197rx7YgQt+eN7bpz\nBsh/\r\n=HJxR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQColA5UtX/z02+SZ3oLTWXzwYrcjXhgbK3DcaRYXJ9yOAIhAL0OtdUECyNVxtAACXJT1aWdPoofT/PhsZFlFHufOZr6"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.8.5_1543533609663_0.23237009564020683"},"_hasShrinkwrap":false},"0.11.0-alpha.0":{"name":"@creditkarma/thrift-server-express","version":"0.11.0-alpha.0","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","watch":"tsc --watch","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.10.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.11.0-alpha.0","@creditkarma/thrift-typescript":"^3.0.3-0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.3"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.11.0-alpha.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-DAio6IkuKVk0Agp8ZEFyDUldbuPBtx3bq9iQE7pyetImdpYcfubaTrb4Jj5I9TJVrShpuP9eF/QOSIWHGCMekQ==","shasum":"8f03f50dc412ecc1d07d78fe4ceb45275ec3b67a","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.11.0-alpha.0.tgz","fileCount":15,"unpackedSize":22890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcAKcYCRA9TVsSAnZWagAAAPgP/jt+jEYp+sWrocQucuYZ\nQvg/OatGEyDUSfM0QDe9yOLkv+FT0Yf7mOEjxQwofjDeEvgTZkHzk03bnqRF\neG/DoO6R8puJT0Nb61kPRvEZSFPNIYr7NmpoDCn4JRN3DzPv0UAJYxy9vk4Z\nujEaihm16bjBDLJQ2vjv7HlLyypsfhKwevujFJJW6/IV4Dmw8GpHE79p5AEM\n/nJE0ASrvv0qD4uDnfHeW8WBNsY+99Z5tAJg9stV3bbptJe59ZCjcatRu7Q4\nnrwlIQqdD0pyWENh8YTrSeMsTaffyQLTMWlQbqVOk8KD8Ch37vYFCbBvV/c4\nNiuGC0MDTQMdn0ZROjuRWFPADXOP4c9zAAJ4TV9NrAE6ucZZim05dbzaIhfY\n20hbwkAXwNx/rINFDApqN0mK5G+RpycGl/Qs3HAnOgJpGVIPaktDXhzZlfSu\ncySAReRUPEQ3K7e6gULxAfTH5xlYQqlkltbQ3kb4NiVQ961oJK6ZL9UZ41PU\n8C3TwT2KcVIfekrgfIvK4h53Jd0ny+AHvp38+iOH/ykufa7QtKCGdjljYjBa\nHwwJfCEHnVZQ0ijQP+10KvifdoO40BA88aYAl/iAZJTSPju+dwPgaO5PEWxg\nNPlRs50/qfxuR0SZqgnq8EH6pBil/uS7kp7XSHDCu19rzIq+tRpnVSwolDjr\nYv72\r\n=XZgf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEY/BkiCjGiPRH7XuUKmtnDzbcwrggaCt5uKa7DuEPSLAiANjMoQCssh1tmmy1EdaR6DkcSDb4PMV59A/hgKoy7D6A=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.11.0-alpha.0_1543546648090_0.6896464228145174"},"_hasShrinkwrap":false},"0.11.0-alpha.1":{"name":"@creditkarma/thrift-server-express","version":"0.11.0-alpha.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","watch":"tsc --watch","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.11.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.11.0-alpha.1","@creditkarma/thrift-typescript":"^3.0.3-0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.3"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.11.0-alpha.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-opTm1WyxmwcfvzaltG4227Ve1IYg4/nWBDwlzt1vFde3M9ITZZQhQMobOjmA2Hqr/7/Gyji4Iff8RnFM3uI5IQ==","shasum":"031ee6383ab287c584fd369e5746661af7dc66ec","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.11.0-alpha.1.tgz","fileCount":15,"unpackedSize":22890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBviDCRA9TVsSAnZWagAAAR0P/3b3qhrSYuxfr4lSvAu/\nOuy0vIIDVkanZJPb5Yv/90E///RWSY/w7rv9sHPaGqB1GjDSYb81BQruTXoc\npqBnWREVXS5QVRMNUMhFuugVM+ZXRA8cvhd8+DP34A2h33GBbhcozcdtX0Yi\nNN5Wja5SnkjTx6kIvoxuaPudmN7jlk4MCyjCUFCAcYOKkvUU95f/zu6+n59I\nL7PNzurdPNZFn4CkCZiriHjPuNZ5qQIIEUeE038a9A6xBIvNuvf/IKKgUXUk\niWJAJAGHaEGXZ4zWp/Iy4ZhgC3RUvTJLtDpt9yVu5Q+3XupujgbwT14Y/CwF\n7p4sDS9DWiqOyS31OR7jrfBiDiFWsSAGEFlbETLMYjguV5fczGJml0zjc8Rz\ngMQz6D38zrdB4ENQwdCqVIOgZFsE/ErfuFuFOjDjP+SP+u5xLLz9NfIfxm77\nmNfinwvuyzZGSQqSQUcHyHp0g7huIa+jxDpCJxsh5Lixkcl60pVR925lrRdz\nnDjxDLokkPKiIIAj/7hx/LYSIyuU8KzjpRwb5VBLlioOhB2AXuWtsNwR8ywQ\nqd4sbIhYOD0r39BZICcZsB6KdPNLM0XGoTLEFk1beHyFHQC1Yz8eYB0KD6Ku\nGxcZoZsFW51y573yzBDhKeVL3t1+CVwJMpOA0/Bh26OG7/AnZX6PagIsTfp1\nmK/B\r\n=AQs8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFrBLfBVaHMChgpA5BwoCoX3Kb8sVsSkrZSj2dL4q9ZxAiB/lskrk2VUHGsMElrve9pnEw+j8eJCRhpZke1F04pKlw=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.11.0-alpha.1_1543960707229_0.36022674535182597"},"_hasShrinkwrap":false},"0.11.0-alpha.2":{"name":"@creditkarma/thrift-server-express","version":"0.11.0-alpha.2","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","watch":"tsc --watch","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.11.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.11.0-alpha.2","@creditkarma/thrift-typescript":"^3.0.3-0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.1.x"},"dependencies":{"zipkin":"^0.14.3"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.11.0-alpha.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-Hsvs6k0QQ20xTswivNSnslB88Zps3NB2sFhXaZYJkXnbeZ43PV+pXf0Px/MLrvvAKmMZbJWR/lDQ2+1PGINttQ==","shasum":"d461d423ab9cd7d26807708d7330b903dad2aeff","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.11.0-alpha.2.tgz","fileCount":15,"unpackedSize":22890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCETbCRA9TVsSAnZWagAAEdcQAIoN32+0u1u2S7C9AJwp\nIBdVFJQGm4Vma6cpQGnU1qrhAkovYHmzYc2ItixKbOlDEiEMcNhJ/beBhR19\nEMvO22LOMkqLXllhAwG8/3y9L8BkUzK764J/76HCMQuulAHdphbwt8cW7W0X\nzKkCzIOXAJv/DgJsHGoLFETHTv5Nmva0QuMWiQAyHT0n33Ha02JUF4Vrzmk0\nKLIJHTaB0isd5CyMY8nyIc/DgplQJe451tnRrLo5oJ0xBh34FEcP3xxFIgGH\nOoR4iPSpaDpj7+4PxbOrF9zDDjRn+scUgXAYPFwmF/rakw3qkoxFr+nu75Si\ni1bHlMROqNDEms1HAD0Y0aDowBP9XyDcUHXKzUTj/slHNXOawtsGbmMrczhW\npXQIuW2dZ0zJgVBIA17wxnTKOx9SoeMaPvNzF4ygwW/RPlchDzRdur4jaz6b\noAboh8dESz/fN4XoHO1XejIwdFtdhADFQyZRhv+scCTytOHek/56Y+Z6jQoY\nmDfr63b8+KCnf5RT2Fi582vdqewwiZu0hTfvFkyTgnqMl09oX6qaCdKURtKx\n34aZ9ZJhxLTVhm3a7UFZ7VfKxO0r4EI40wvIWB9ZPkBe2lvrPsfPR07e5Vi7\nU/d2Xt/h4kXI5U3IMj16XSfw8gv7CmbmUh8Z7Z6plr8pG6sUgZA57lfY6d29\nmgYw\r\n=YJAO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHjTiSxoznVAAfRTlQkMqpmG2fdFcXNwmKG8GIafqTgAIgFMrJm5CjUkvA+0Hh488Ivlxg+MEbSLYgE+QXtmUM37k="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.11.0-alpha.2_1544045786669_0.4221016874000294"},"_hasShrinkwrap":false},"0.6.32":{"name":"@creditkarma/thrift-server-express","version":"0.6.32","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.32","@creditkarma/thrift-server-core":"^0.6.32","@creditkarma/thrift-typescript":"^1.1.11","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/request-promise-native":"^1.0.15","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.3"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.32","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-i7kl8/dXj0VtaJGYTZ9vVCn3RNm3/z/LwJI0ORv8R+h/03tepIae/zuNKRhenNjVkF8Uybx4jhWXSJqfADBVyg==","shasum":"5e8d1aa5a862799f10afc84a27c34f938bee813e","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.32.tgz","fileCount":18,"unpackedSize":25649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCt3uCRA9TVsSAnZWagAA+0wP/2gqMo7Q6iozpH8OHc1U\nJeg9+zyhjSVQU5A1tIpu1aOP6/9BDXbhtqbMez8UqKkxMZ9sqwsbkhbYxdwF\n26J7dyPcPAEHgghmefqcCgcz8GdsS1zTYnjlVQzYZvWv3xWfsbh+F6kvkz2C\nP830ZVOuhoT+rXHyw5cTWxg7r0ShMXrtYCPQc6hJMpcLU9NQIMh/rEvPZ+OQ\nIFHZTErniavsVjmv3xr8cKSFWUiQJ1g19J42bWIlToNDQCdUVdyp2GLZWRWS\nYdLYvyaCOWS1iOXgg+Qe42bK10yegLa9847txeKy+nH8vlfC3g8PfYR/HzBS\nQHAlNzuHn3Lylyox1mQCypYr1rtOHgXi2UPHBVBWu5xK2lZinGkjND6LxHWc\nxX3wDorGDwuJtKCFQuh0BeVH5QQghoeK/HD0KJHeR/Ygc/563yiASyE+xTW2\nC+7MCzgusA38t+px6LxQa6mie/PEss4sD2DQRG21zqXfrO+h5VpvlRfIjMSU\nwnetMmuuHkxOaG7TFKexo0L2OrK7Wc1UVVzTuqlXyEeaBms8IfkwPHkGnYXM\npkxm3vWPAsug5i+eKEqkvNgnNSpsleBHc5rqOc4a34yssloHQpF7zqXrKNT8\n+OuC5dhGbGU9u6VhLDd4g6gWvuOk559UMfDFwsycEWz4NCA77vL+s64GT7GY\nDs6F\r\n=lpom\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDL58ikIVFUnlrOeChvqxzPMJ2gmmjGTOHvTHKT0tz+awIgEL6vuPDG0iqM59G12aGBYiNfU2vboEK3DglrWI865R8="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.32_1544216046171_0.9672629740588901"},"_hasShrinkwrap":false},"0.6.33":{"name":"@creditkarma/thrift-server-express","version":"0.6.33","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.33","@creditkarma/thrift-server-core":"^0.6.33","@creditkarma/thrift-typescript":"^1.1.11","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/request-promise-native":"^1.0.15","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.3"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.33","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-BazAQvQZwLZmkcbK/JPcaci0UDYxuk82a9Yw12loMz9cXwqJ9oknUlk3oDUuriCJ/CKHLpFwpRVBMVj5e+ySUA==","shasum":"ae4562947e2cee2598bdd7e7f10978618eba1919","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.33.tgz","fileCount":18,"unpackedSize":25649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEpVdCRA9TVsSAnZWagAAMtMQAIbpu7dULBVNuH6T+6jM\nYSXZyxJ8mQY7xOVYZfDZpEUi+D3VYueMu9+TD1xEcY++qc26vczS0dRu31I+\nPMKDXYL5xT1iUaeRK1fGlOgUU8kF14zjgJX7qy5crZWGx2yxzPNvNUsP5N5w\nU1f1FjcL8CYiaQddnapvpjbbYi+zIkjt4oQhQVTojtqoLJP2GirtRPMdR8S+\nhRkvT5zQURKaltBzjaTipzFjS3GVnR9a20TD9ztijDRw55yb/liBo4ASS/XF\nmeNvup6+3WWTJ3s0yFeEMOVYqrnxQ4J+wiNOMk5FzGgL9rVEhVt/F12UMnSP\nm9spEAi7uGDJ8cnTWGb0u98b/lWZsMQjThgSrYV480YmNVKTg6Fd49yOyAf5\n4mPWBmF71N2SB++KucQZvTSHdZwiGPHA+G/9iugxDCYDIj93ClXtgKIawA2S\nsAWlJQTgukcH9wZ+8ydwvqtv9Rb4E+h7tOED1dRRReedTIXpabDLYbPD+PdG\nr9K07zCX/Em6SHdb4xJsPvE3MtPn5JahUENiyzyRtxIPiaRCLQwunBpuWvgX\nQIeCUz+441rftcgagljkZNhYv5xYBk417fbb4xptkRRHhhLX206wUKZ+BXMU\nbcgUOSCG4d+dyRzTtQrDQUArEkEzcRmgIcjsyfYcCyB24t3b5x2/zK3VUa8o\nMmD9\r\n=zhJ0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICscrikutA18YJZtXsIGw8VgVTF/p9p7GipxAbw6c30qAiEAjC/a5pW+n2C1YHlGIuzKHg3Jxi/98tjAtvGuUjNHPrY="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.33_1544721756502_0.7728800063353405"},"_hasShrinkwrap":false},"0.11.1":{"name":"@creditkarma/thrift-server-express","version":"0.11.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.11.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.11.1","@creditkarma/thrift-typescript":"^3.0.3","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.11.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-2TvTEYmoXuPI1rbcL0ZtjLQffTk1Nhaf3WgQgvv/NejVlEXJRO4yo1LpMapxmXX6o6CRR7r2NaJ379QTZWvzGg==","shasum":"f84645141c80b850fd1eb86c3889359882fb2c5d","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.11.1.tgz","fileCount":15,"unpackedSize":22844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGYT8CRA9TVsSAnZWagAAN7cQAKTU+bPNEjfFq3u0cSx3\nr/1mYXN7uTZVDU/B5eDWacz+WRwGNvpUT3ukBOUdM066H8OM44QnznZGjhqu\ngaHmKezs+Qt5JgtMb9VBP80Ijg7cneiuh8M0AUdlgqHvUKEJBg5bj9h4s6ss\nHdWbURJjtcllSPxYlfV3xrPIDbwOjb7badREbnWa4jFWOx0Il7oV1D6x8Xn1\nQGazrZxuidcT+EbvCGasrn4PcQF0TtPXdHeNWtVk6pAIj+d1ZiuK1wqzDqVV\nB0AwE5QuRVqRgRBeScufcq5VNNld7OMqE8aES+0ipPzJ3cNIBYDp9uJuNgxr\nTXOxy9IIcxH0UN3KkCDiUd+V9kHvC+qYE1z3EOKC5mTx20I7NUNnMFWnu8ux\n9Tp2nIzodFOR1L0XqbXOXrm+QFWGN89e12y7xCf6BpOwZFzXsZX+shOfQYZm\nK74oIUjtC5qyfej1dI8/CsfgYA4NZ2LmtQXBI0eA00yIfUtoOrQULJFwfGbO\nhKK8LL6LXfC8cPsuCqTLWx2xZIgxmxiWu+YCHhWSVKQuEVGic/xAfkPbijVj\npbBs9Tom8erANi87PlRcbb+tmf6QhOutcd6eRY/duqbrA3AI+zyp4O98luaZ\n5niYe+GfXuXWWcQPbg53WEguOD7jREpF4LekAZ0rAg/VH05ip82BifkiTOCR\nnFg0\r\n=TcIZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNoMuk5cb8KR4NIwvwJbuYXc4/RgQN8OqezevYnFYxAwIgfbOIbmghBPunDSX1NZSeja1HqQgMoCxB2JVVV4/QmMQ="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.11.1_1545176316000_0.45946471715165593"},"_hasShrinkwrap":false},"0.11.2":{"name":"@creditkarma/thrift-server-express","version":"0.11.2","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.11.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.11.2","@creditkarma/thrift-typescript":"^3.0.3","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.11.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-kaZ31G8wiLG0l91PoTOnU5XAXLO0FRuttC/mHLOTPoC2SebEnb0qb7N05ikl/CsnxrXGK25k+f3SEIxs6/LypQ==","shasum":"11fe318d75953e6427ede9bbcef76ab4bb8effad","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.11.2.tgz","fileCount":15,"unpackedSize":22844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcM9JSCRA9TVsSAnZWagAA948P/2uCI5Qz7NUmLf9AZtCU\nvvoQUFw9SdRHME9uYhRplknJpjhgz1dJAoonSNTyw6xg4UC5JvjXUYqXq0dB\n9l9l8oy3tVhmRmgpBSxIqDTmxQ/+alNrqizpxCw8dYdTK18eYNrQw3R+m5PU\nA0OtCpLRV5VfuV6KsoYs3aAPP55cO5gB6ExPY8BNgSj6AMWX5i6fW15/8e3S\nhNFK1bSc6KY22vjObrGkX/y2QSNQ/UyGsRU3V8wB1WEx+5Rgf4iYIPXQCKQz\nv/4PV6ZpMMpSYqXT53DYXEJaPtkYs0gT4ptthEQva3kH1hTzA9lRQYu4POS6\nOZuTKP6eBGxX191fm4RGue4QcHnQoyr9Pp1kzkLuf3rvS6bjEQTTQ3F828Ix\n9xJgZDdUtgyRJ5XxwOIir9+T05pI0m2tu2toZo/k3GZCKQo8TZ1MxGkIfTZD\nX+opqmKHig019zjXtYPGYHfjX3At11v5M24IANYL5aSUbr6ZB1l0YSrBWxxI\nHBVpFijsNB0O4k3KdrBvKKPpuW+foIcy8jv5XDEb0KisdvMUpbHhy8ReYu31\nPf+GWtKwKXT5E9foCrpnnj5wxH2SF14r4TPf+GwLNXsLERUepw+XUhp5xxLV\n24Nj56qqWJFFeWCH0AmyzkpIU8CpqwCa0LVpw3uBYdGHRoKDvcxx23Zge1KI\nIHz1\r\n=EpTb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE1uuiOaxuX0zQTpCYeeYQYzJmUxWr9tdlY0oBxDQYMxAiBcXIoiVuvSH6LMnQwKa+7RkufX7T8w0XFgBBwP23H/lA=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.11.2_1546900049606_0.2610530392741144"},"_hasShrinkwrap":false},"0.6.34":{"name":"@creditkarma/thrift-server-express","version":"0.6.34","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.34","@creditkarma/thrift-server-core":"^0.6.34","@creditkarma/thrift-typescript":"^1.1.11","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/request-promise-native":"^1.0.15","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.3"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.34","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-tifoaJ9zFMj6sjsDTAM8GCAhtaO+dkP9MFNh4TaRNXD50fJz5goWbOaFCzHL20HOnBEmtzrp4aZT7tSKA1/u1g==","shasum":"5778c481f38c7b9dfa33b9cb7a877f187b6210e6","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.34.tgz","fileCount":18,"unpackedSize":25649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcN9ipCRA9TVsSAnZWagAAJJkP/05et2zB3DIqHtoTiFMZ\n5aGOul/6km4ucLhexf8oPMeexLj+Rzqy+um7bsjR+A7S1DjzXr88G9kZgYEZ\nFMwhgzelCUkhOwLTdyn9u0gfdVJ1VV+NcZ/cYo3mcys0B4ZpN6EP2RQsp/HM\nOcrexJNesPyKufnoLUXIP5AKFz/E8FR7kcU4gKYwELtfLrUwX9c7NPUvd103\nODZASFDTfuOGIKPJnT6udIKuPD+PY/MtN1K/Uvakka9jgfBGIO8x41+3hRYj\nPzpEQJhVAa/inp9ejp9AWsik0T9Qvg8fs9f0w7mW8WH4MYUmFpVGQcTddnb5\nXDizkMrArlEKbwLKd4O9bxDMc9PEpAXr06WH3yrTcmYK302DNrVcXQRTdd6F\n6lBWdPdvIgpNgwJXxdWxdEC6I5R/BQEjtosL5lS24Iw6SPb3SSXFkyNeoaTf\nM4NslSRwIIlYZCyjjR0OXdpBrc+UxpizJ01Ty7EdyJJIxGWcTZSOHeVLr8n9\nxt6Jvxu4Vhhy9cbgN9tfjNy7cLi62J99wvcrfwubrQI3X820Pjmd+iznzYzH\nVjzGUDDtWT99hKMNBA74VG/rI6xhU3Jylc38P02BCvQT4OnRui3jl2FJaDdZ\nqgVGaqm3qfA07B8rcA/MUV6h0DAsJ3C2BHfNeHu41FblMV+AGRXAmU0bL09g\nueJ6\r\n=xPwQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDpakk0SuVoEPo7ZIIvTgU/DJHJRspk0US+jr4dry1mUAiB8xqj5nvrkudyYUaJmD74njTJG6TBDx0wzNAc5nbZeRQ=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.34_1547163816584_0.628953242252368"},"_hasShrinkwrap":false},"0.12.1":{"name":"@creditkarma/thrift-server-express","version":"0.12.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.11.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.12.1","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.12.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-3b1BwQWR4EvBTSSR6WcOtvIYmDS/O3Bbz+ygSSzBk5d5FkUFj9IcTgaZMDHn/+5BMmxPiKl5phXSo8Wnn96flA==","shasum":"6eeed4efdd593a647054573cdf1edb91ad19b856","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.12.1.tgz","fileCount":15,"unpackedSize":22796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcOR30CRA9TVsSAnZWagAAj9YP/Rln5qXimzFSZCtmrHRg\nxRboPUuA3vCSNF129Rsm1EmrhxJlCkU8XI9wmEMEqQoUfuJSIk8NqSVuV5j4\nypbB0x3ndIIgz6vR/qsZ6ZOz+3VYgv7iaUCjx6QKfUxP9ThlSUvO7wb0m9XJ\nZd+HjtRy4NAU+6c+0EWHo6Xf0ui1J+BOyZAfzGMMYGra2JqSjOaowXUFYXBC\nCBX2XpzPHA7E7fxdIcgY/XdHyatpD/93QCA1goCx3L6XAf89owI01b8XwpmK\nRGueAbl1qjEuaFvWGkjLW42MLJFECq2WVIFdQWtxxpJLOIhZL4UaDHTS3cAF\noFdQxKlmilk0VJ8cYCTrFJSNkRqdGU/Z2SqcqGDi327rKsVXxlKwQ3/ve4sJ\nq30j5+qDTxmb0JXhH7SdIFDaEz56ztEEPh3RFTtmtVnzIilGstLvIgZ6a+Kc\nFB1881UtCaJTE5edqdQhT7OOKcD1B+m14vm3wT6YzTM5aBcbPEy4yNUd8txi\nProXBYBkdaaGD7O8cNz5Qduac8DP+pENu3YpNxtCOlEIDnobEqU8f3eITZ9I\nvDqC/qcZ4PZMChp5GeVEgVkCXKu3Ey/MLPcJLMvwO8WXRWrcvqr3iPEctqwm\nZxZvV/GUAiQvsCKRkCsfuNehjrARmkRQlLz9aoYelwMvzY8U6pHtR8OAVwZJ\nQmFp\r\n=/vYI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdgZuc0zjI5o5kgl9RqZ2f7fBmgfzZpK3t8LKUgS2b4QIhAPIOXX4maeJjt67N840c/HVQvT9lpywctO+R/GbpLqdX"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.12.1_1547247092088_0.6394657355842017"},"_hasShrinkwrap":false},"0.12.2":{"name":"@creditkarma/thrift-server-express","version":"0.12.2","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.12.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.12.2","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.12.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-syY0bN28nCsERKbt8Q3JE8ZWdiymEs6nA2uANwwqV+U860ANpPkL2h6cpkiZ/ECCygoM0iNz6weMWFpRL145MA==","shasum":"dc751e99f0440adae1c6663c9e89e70a9fc131e4","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.12.2.tgz","fileCount":15,"unpackedSize":22796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcOR+uCRA9TVsSAnZWagAAODoP/Rl68K43gYiS6Z/Zhrk0\nN/EFQZQo2X2IfITLIkb2dXNhLBMHQFJM0P8Tc7tOsRJw3edqKJpsRelx87/D\n0CmQIx3A59Be0bpYcurTxNrWh7FE3tht25G97iqh03OFOGEdZzxDkNBanve5\nbbEYkb+NCJzfkNUyvcyD+5oAKjOu5j+Y2c4B0CjfvFVCmOJaoHfUYCnzM0w+\nrRfNOvnLnc7p3VscSPlVBE4Q0/1sJWxQQZ5zRz20zYxrWCyI4y2qqFDroMqi\nJen8bpS5FtFPn5SIGDaV3/QHukta8FzZp6M28FbsMSMyJaCF6n3FwEPKrl9j\nbXsJpyqPlkUhTaMUte/9+tJsnvqYKJuVqofh48kW8xUj5BXUqvoD6AzQzNQC\nhgtZ2zOa5Rej/reVoeUzuPaELfgGlBWzzmVg7/ghAzwoCmaAMt2d+zSsfJ7O\nWxJ4bwD9lbfGXm9AiJIRVkWBzZMcg9PS09QWPLPFe44VUSlT2FvnR0fwwab9\nMo5MLsgmsZT+YevT5xNCxZ7/KgFvvF2DCJWZhTOZEdTN2UYznKV/dK4KU6bA\nPfyS9/+YBfSbiYZGr8v2LONiQQ12dLuwqZv+fgrjOhEqV7+ynbTfej+Pi2Gw\n1J0qP1sz46dlEqy9PC6lIkB9KRFN2G8msRbbPE+AMYC24MWjtumPvL721vYk\nN/Yo\r\n=0MLh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChNuvHFbKCZAyO+5r1yrtCzqtt2muziKkw4b+qzINThQIgaEsFEz24BkzJMq6OU+kMyJJEe5XFsuOJdvVlCNryZFU="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.12.2_1547247534319_0.30950626698224815"},"_hasShrinkwrap":false},"0.12.3-alpha.0":{"name":"@creditkarma/thrift-server-express","version":"0.12.3-alpha.0","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.12.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.12.3-alpha.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.12.3-alpha.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-b2XAlBXVRN4PthQnrBKk1J4bpdHv4rS1JtmSOgKe87/IEosDuf+EAdtzEAeYYt9mK8G5sDDQwga5zq2Nd9sC+w==","shasum":"9cb6c3882a336245974ca425975121cddc820667","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.12.3-alpha.0.tgz","fileCount":15,"unpackedSize":22812,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPA71CRA9TVsSAnZWagAAlTIP/3+ZoDDrZSBZJu2clBpT\nWHaEb4Z/MHS6WajnoU7nkL0KUuKWdKdWyYD8eDiaKwW7Cuqxn7DMgqOOMsq4\nyzpK1ixmIHEYnyCKTh79Y1kiS6OdXKFfRdUyx7MImo1kd/xvw40bC/0YPqIj\nqymvjb8NTXvMcVIruw/thPEOnUIimAHBD14YiM1ODJByA+U2oWCkqNuLvq8F\nPZ3Gsb61cjYoK1x5PjRfg57FDxWZ6cJ23wEhpO8U+d2wkBDGQHYuqKFHAlFO\nmAa4J/57huBLmGZ+TjNLCIkNN2TWTcGRtHnwBXTNxpZnbxau/bR2TQ/E4uI4\nLkX2XJTXiMXBuL4z3ovnyZENwIuDnfoR7Wn5LG3cwiS8khqSZev5OH3396Q8\nCtzYHxknLC1LzW0LQSQxexaJVNhJNglXqYqzEWnHbejleSA0tCs6Lbfvbobm\n1nQOSQ+EwRGxcA3AFWatbcvOa9RDWhD2Fk6n0aKEjSW/cbCIW02ZlsYTibBf\nm/ksnuX7Y9+91s0j08Ad0UWMWxdj14v+iiSdHo/mpXbeN+kPv8vpklTiZWWS\nF1GS3Yc/OQwNkYF9SGz3iRLW2gpepfI1ZNBVwBubauQxbWgMkvmtdJ1x6gfa\np4+AVXwhAGewx4lTlrd3xU5cqA5ND7IhVK7Y32fJ+BwiepqMda5kFW8YHg2F\nh/NV\r\n=sHZl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChkFl4LPpuhKOs7I+D66GRyKV3YTyxvb48dxP3FkSgpAIhAIKtd5csF+VLTFPf0AWQ7Z8buVKZLnMZamR6GV/VKFn6"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.12.3-alpha.0_1547439860901_0.8023120747810388"},"_hasShrinkwrap":false},"0.12.3":{"name":"@creditkarma/thrift-server-express","version":"0.12.3","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.12.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.12.3","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.12.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-x3ftEsQgOTLquQMidMiCnqiCEBIUg+T4WR1G07nZC1SuhO4b9lxesACkZ5I9SyEgqNUl+t+hRARAhOQup73VyA==","shasum":"2dfe81cc59507dad7e3bdc2a42f0ec1431587754","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.12.3.tgz","fileCount":15,"unpackedSize":22796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPBSbCRA9TVsSAnZWagAAlmoP/3EvZsUPOlBNE+xPCrOO\nsR26FTBzeri9j8q+YEflYdmdvfuo9VezWs/fEBSK838k3QKlcQS0ldjfqP0q\n22DsjzXOFuGsw1oYU15CbCTi+qNnyCLa19ZjksLAbOxWwNhjk6MX8qwHbBzr\nu6UmDMBiDz7K+UQW+63CDaTPvoxOWJ5SYmBSd0hI8N/EqGWR3hFl50mixOEN\n30qiZ9SYgxkM+agSu8VcUwwQqsQJnYb6c+39/YF7JEhK6c8JxlFFa5va+fj6\nkeqGDLNS5t8z1psqKU+VS2MHgLZCHMsWqr9wKXRhQwdU2iuqto7ygMmzdsEl\nqR1XQ1lKzClMd7jYgXPs1Jna2CKlCRn+6Jzdr+pCm5Mn56nZL4pIh9d1ZOto\nSFo2tdXI/jQPxWlMxmCwG7JHcHPVp7nH/eGRkvtXCMk1+5y9XA6iJq+u+d7A\nWeR0noW5Z7CutJW4E9nvVuyxW01hymJ0fayh3APMjP1Y8BBBysAC5tR+HJNx\nfAUi0LIG1COEJeNR/boU2hPjMwdGR1QKutBW6yskHdx6Z4eDHFMrKkGGVTHa\n6CddcI+f8ofAQoSY+I66hXGg0ToZo/ZMo9FKE91XejIqzMpEMDcPDH+LpQvJ\nrxP+W4wgJs94NEuqgF1/v/WAjCPm+sl9T1xMLpliTx8AlrYwW3j/yGffhwur\nS+am\r\n=Dt/X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+AE0mWMIJuZYjfCs65w7esOQ/q4+NCgnVPoIq7hfqSgIhAMH0QSkzCMJBP86rDWhYxchWUxeMx5b4Y+IwbAAAd4SC"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.12.3_1547441306766_0.026846706225994277"},"_hasShrinkwrap":false},"0.12.4":{"name":"@creditkarma/thrift-server-express","version":"0.12.4","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.12.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.12.4","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.12.4","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-iJygqutMEPpnAKiKzccHZwLZEIlJwNv0l6pN+oZjojo3WtzfSqJMeNd4/NJqIFWj0NFr8M8MtopUHWzgsafIsg==","shasum":"bd09a1e2105bf89d1bce2e09e438e2c67a072398","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.12.4.tgz","fileCount":15,"unpackedSize":22796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPOULCRA9TVsSAnZWagAAT8kQAKAQbSrVp4NMMXt3RlCo\nD93QwpdTNvBxgzbC6fTkDzED3Jl296w6eLc6bk8EwKOq8sKvb6np2sz/4LRf\nrzd0AFhdhjasu64sXyV+J5xN5BsUSvO/1U7xjRQ2wdvB4Fxn7no2gE8LoUOO\n6akhsGvwDC1EEL9its2UqCL9mvdmtiHwZVDJb13m/4m4bdZ3G0bELrW1njOJ\nMd79983MMnGU0Cy4ELnIqKLuPeKNFrxKxQ6CSLaqlD/OrmTkhiCB+p39J4ob\njXx5OFF8JTr7kPzddNdRk4Y6BBmg9gX/1JLITwHQaHUi2QZgj8Pn+H3kPx1J\nkGrXY5hi0w2y/qlpuVtzFRCkc3wkq2iVfRfYNJChBdXqweXREgvvl5RlbZ7z\n5F8mcVn0jUpKNRlemivCvhIkLsB5byQTiGZdh0y8oXmgPFYeIlzyn1Sf7aX1\nMVeVxqohwI4sBlrVXORnIXsqT37Se2LZ0JXs2mzc53x4uE1QDPzgSiHoWxY8\nYh1HE/kW0bY3Kvlulmal2RmJ2Xifnf1vglEHCgnqjOl++dVYRNfwIdpsquvb\nrB/UuXMQBzAbD8HRXv5MI/lwc8+HevAcfTB4FNE7mJZZB7D5shICEAZ6VMBb\n2zuRl5YPyb8VoM+rs+5d4RWnYyc6aU74/a/DHpwSsNAXPW8kZCWQX1zeKUBC\nZzLE\r\n=qQUi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpc7GST17SR53+VH6+iBLY0nUfCbAOgRHoA2RIlHiJ3wIhAMSZj7dLWbZUmuFU70K+Ctmi2f+FfzjMfh//rI4WC+Ax"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.12.4_1547494667349_0.9751631993424714"},"_hasShrinkwrap":false},"0.12.5":{"name":"@creditkarma/thrift-server-express","version":"0.12.5","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.12.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.12.5","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.12.5","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-TmDapNxYLSwPTvp8gIaKy0Cm2GQnZNbO19rep8ZCpUltldqe3SzUI83zeF5AYA3n/lVRYqLdSJ02x+b/eq9TTQ==","shasum":"2a3b10709f1ea166f2e3bd751974974a77c3bc4c","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.12.5.tgz","fileCount":15,"unpackedSize":22796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPQpACRA9TVsSAnZWagAAUs4P/jIr6NBmOL2iSb+pnjAO\nEyrxT/xsvcBGEJdLxoZAqFFRYwwcXDxBr4lTf1aXgJCjNsoFeNqqH6r6+2dT\no7dwcZDSw3vPCn2Wtcj482Tp1BhIB0IW1rvmiwWpV2eu6aEEVuS8DVvWqVJQ\nM03AV9ZN19a6dbgw0dxVSCvvbi/7YiDd7AIILb77EIDOyec6G/xMF9nWzVHX\nnD7bRwRp+XJaXLN2SE8ItR1KzI7LFD/4ClnlIsPIyVOe7BKxzzxOxV5ozb26\nfG3H/nFb8T79pNo8BR18GtqZtxVYnHNPsjURsty4IWSujQnHYxMKRESJv1JI\nfD+YNkSS2sxezJAhz03MRL0+PakyzHLYC3ut8+wxtXAuFswsJ0YItEv7qiW6\ng2EY/wmAkDXq5ng+p1o1g/Dxp51qti2cd/LtgGlmg54yJY3v5pLF4Jo1QE+m\nyxm8HAsxK0p8S7Q1Xk3h8AGY/b1ERYIqr8aIxuX49ybUEiApC45f0opVV4rS\nn42+ytOBLpz0MGL+54Dk8tLvZ9sLKJTn2YkYVK2tBwZ02v5E9JnWW8boQ1Jz\n6dAZZcemPiHHubCW42vbJfZ7DTF7zR5JjEDjIFeImcnHcBW6XPPcw0ZVZou9\nPmYYpmnLfPQA86BY2t3JTCuklty+qNCkU+LJ1bMFTnhu+YLkL+Ldjq1s/Bgr\nO/2v\r\n=AIXk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIATvYqJLVlPtvxA5AJTvfC+tReiq7hbsomf7Bn/poP0/AiEApw5uWPy8nyBV4qahCiBjpWk4OXfEIamAOlsyXxUWg+s="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.12.5_1547504191851_0.9311619320616504"},"_hasShrinkwrap":false},"0.6.35":{"name":"@creditkarma/thrift-server-express","version":"0.6.35","description":"Thrift core library in TypeScript","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/integration/generated ","codegen":"thrift-typescript --target thrift-server --rootDir ./src/tests/integration --sourceDir ./thrift --outDir ./generated","prebuild":"npm run clean","build":"npm run lint && tsc -p tsconfig.json","prebuild:test":"npm run clean && npm run codegen","build:test":"tsc -p tsconfig.test.json","watch":"tsc --watch","pretest":"npm run build:test","test":"npm run test:integration","test:integration":"lab --timeout 10000 --verbose -l -S -P spec dist/tests/integration","lint":"tslint --fix './src/**/*.ts'"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.6.x","@types/body-parser":"^1.16.5","@types/express":"^4.0.37","body-parser":"^1.17.2","express":"^4.16.0"},"devDependencies":{"@creditkarma/thrift-client":"^0.6.35","@creditkarma/thrift-server-core":"^0.6.35","@creditkarma/thrift-typescript":"^1.1.11","@types/body-parser":"^1.16.5","@types/code":"^4.0.3","@types/debug":"0.0.30","@types/express":"^4.0.37","@types/lab":"^11.1.0","@types/node":"^8.0.31","@types/q":"^1.0.5","@types/request":"^2.47.0","@types/request-promise-native":"^1.0.15","@types/rimraf":"0.0.28","body-parser":"^1.17.2","code":"^4.1.0","express":"^4.16.0","lab":"^14.2.0","lerna":"^2.0.0","request":"^2.83.0","request-promise-native":"^1.0.5","rimraf":"^2.6.2","tslint":"^5.10.0","tslint-eslint-rules":"^4.1.1","typescript":"2.9.x"},"dependencies":{"zipkin":"^0.14.3"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v1.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use. Only 'binary' is currently supported.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n### Observability\n\nDistributed tracing is provided out-of-the-box with [Zipkin](https://github.com/openzipkin/zipkin-js). Distributed tracing allows you to track a request across multiple service calls to see where latency is in your system or to see where a particular request is failing. Also, just to get a complete picture of how many services a request of a particular kind touch.\n\nZipkin tracing is added to your Express server through middleware.\n\n```typescript\nimport * as express from 'express'\n\nimport {\n    createThriftServer,\n    ZipkinTracingExpress,\n} from '@creditkarma/thrift-server-express'\n\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\nconst SERVICE_NAME = 'calculator-service'\n\nconst app: express.Application = createThriftServer<Calculator.Processor>({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: SERVICE_NAME,\n        handler: new Calculator.Processor({\n            add(left: number, right: number, context?: express.Request): number {\n                return left + right\n            },\n            subtract(left: number, right: number, context?: express.Request): number {\n                return left - right\n            },\n        })\n    }\n})\n\napp.use(ZipkinTracingExpress({\n    localServiceName: SERVICE_NAME,\n    endpoint: 'http://localhost:9411/api/v1/spans',\n    sampleRate: 0.1,\n}))\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\nIn order for tracing to be useful other services in your system will also need to be setup with Zipkin tracing. Plugins are available for `thrift-server-hapi` and `thrift-client`. The provided plugins in Thrift Server only support HTTP transport at the moment.\n\n#### Options\n\n* localServiceName (required): The name of your service.\n* remoteServiceName (optional): The name of the service you are calling.\n* debug (optional): In debug mode all requests are sampled.\n* port (optional): Port number on which local server operates. This is just added to recorded metadata. Defaults to 0.\n* endpoint (optional): URL of your collector (where to send traces).\n* sampleRate (optional): Percentage (from 0 to 1) of requests to sample. Defaults to 0.1.\n* httpInterval (optional): Sampling data is batched to reduce network load. This is the rate (in milliseconds) at which to empty the sample queue. Defaults to 1000.\n\nIf the endpoint is set then the plugin will send sampling data to the given endpoint over HTTP. If the endpoint is not set then sampling data will just be logged to the console.\n\n#### Tracing Non-Thrift Endpoints\n\nSometimes, as part of completing your service request, you may need to gather data from both Thrift and non-Thrift endpoints. To get a complete picture you need to trace all of these calls. You can add Zipkin to other requests with instrumentation provided by the [OpenZipkin](https://github.com/openzipkin/zipkin-js) project.\n\nWhen constructing instrumentation provided by another library you need to use the same `Tracer` in order to maintain the correct trace context. You can import this shared `Tracer` through a call to `getTracerForService`. This assumes a `Tracer` has already been created for your service by usage of one of the Thrift Zipkin plugins.\n\n```typescript\nimport { getTracerForService } from '@creditkarma/thrift-server-core'\nimport * as wrapRequest from 'zipkin-instrumentation-request'\nimport * as request from 'request'\n\nconst tracer = getTracerForService('calculator-client')\nconst zipkinRequest = wrapRequest(request, { tracer, remoteServiceName: 'calculator-service' })\nzipkinRequest.get(url, (err, resp, body) => {\n    // Do something\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.6.35","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-2ts0/J+SYwZfxHuVFwAtutaNngCiHoLonpt9AxxpQ+ToBVEQjoGwv2Ly67i10ELkEeg/M8fQZ/Z8YPUxNOEPCg==","shasum":"5e480512362f305f9d33b736b8d5308ad3fa8a74","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.6.35.tgz","fileCount":18,"unpackedSize":25649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcb1K9CRA9TVsSAnZWagAAfqIP/1elFbJv8A4IHpC/SPcc\nTFHP0VtN5Ew/RaZaHA1obvAv4UuzgmeqowZjd9faIE0LyRy52EIgu+DnU3hV\nbaRzo2NluobJrLwg4acMRkwe/VJWIhnV2qbhXTTmfXGdnAuHyv59LlNDhb2+\nJKrrU1vtb5NmGewZN3gMF8baUpdTQjE/8XBgWQQo7r0UzG0WgFGlHVjzFXVz\nuv2b4nknGDrCPP53LrCDL7lFkH/Hn4rz+Cq/CewlnF5YmnxxTbvzbu/1DsAq\n9rCJXACp8lIakYwDAOO5XB5JB4nE+R4hcru9m9fZcfMAzeTiTDUAEm4NgwNF\nIL4h8vkmk8uEeQqGDUjyjw6z+niqZBoIkQOm9zcdKNcBkrjM9ZSoUozc2r6V\npvlIc+gakoT9y7fl6tVBjNIF75YD375xM9OhtFWovwqawT0EQ5o2yWdSnP/2\n5y9TI1CUZiKmZaH/J/o14aHVL0JeEKUZ6+U2Ax1ftrdSeo1rnLoBfEY05HEX\ni/g4Rtk8V1oy0hDrZq+3jtPhJtBRxvdWaaJD3r7hcQtSYF3MnmBeNIChKPYC\nVWaLVhzAglMn8zCZrY5i+9NJXiSonAvbANFG/sGqcQAWR27RD+9fS+nD9BtM\nj6dPieAExALDFBpiUC819UgkT9eyF/voLt0L6F/hq7+IJZZWoF/Bp3hdfsXf\n1YsN\r\n=t2Wk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAwNMbZnTZAJhQi3APQN5etVLyP/b1IOwX7WdYhafkxaAiEA+BVIV3/L/h+znHgzYot3Bbugxw0pol29LceOYQ2MG7M="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.6.35_1550799548664_0.06532406825248738"},"_hasShrinkwrap":false},"0.13.2":{"name":"@creditkarma/thrift-server-express","version":"0.13.2","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.12.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.13.2","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.13.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-5ougDEUVKsBhNDp4VGuOAlPv5MSd2aeAwB2+b3vr4TaXrW94X7k1BJmnwaGqk42+rURIqaurAHOL2Kdc7RJT0Q==","shasum":"d1b5247d412c54aeb2a105930e82b87411a3f3d4","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.13.2.tgz","fileCount":15,"unpackedSize":22796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfgeFCRA9TVsSAnZWagAAQgoP/jvQ1nwSlAh60QSBpRDj\nhE8xmsKbPJGSMuN8dxha1kSNrdGNMoIJuEB8xon3VLRjvIzLo73XkoWtoEsc\nxfOunl4XaVxMvVS0OyOsq4JXyBo7JBcbn/2c0FgUF/Jl9VkYpBksFTmXuhw4\nHKGGBgvez082p/I4xKrXHlX88MNpLfp2Ou0WwAaNHsdDgiwZ4vHlb3a+fiz0\ndycSxPUcHu4WO28h4hpkrZL5vIfpPaS/+Y3uIOIkD0grtgkhvN4o6q9657Hy\n2+XWb4T9oeCYYrQmgJOFDjnvsLM09ef8JL9C8RNpFF1zSCSfaqmTLqHUVgGI\nfTWvBlW8nnQipYRFziGUEklQD9gXikN2xqnnxh3XIzg2KuVyCLbVFoa0Em9k\nFdAJpyiPPEe62BOG69xbyg8x+elC9wI8WaEW4mC3SVX3R4BCECuBloshC2Vf\npWiOBkBGZ3S8PQd/Ej+eu5bJ5PB3isSPU/OBNf6zXPbJiD2RBwp/r/WJuIfT\nqJ/2f0Kda34IVGkAAJWoiGzwReQKZHVe0iC/TE5NW/nTz4riUKVyoX6iRgbq\nkyd7YR56HTuSmRSIjCth7MaHbhXFgbbfLaXAxVSuKeGmT00k+yQoXE9HcJt/\n455skJ4YW/AGBjNtktNWkpFCYCtFaT8nyt86JIr9LBz8lCAwo/04yprxkbvs\nQr4i\r\n=PtZP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZkp3uDJDeVa4ZL+FloTD4YHT75Sj6EOA3vM63PfdvXwIhAJJ10kV29FPEnJydIgPnqTku748/FxoH0r+r/cc8srqC"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.13.2_1551763333026_0.1593368365323058"},"_hasShrinkwrap":false},"0.13.3":{"name":"@creditkarma/thrift-server-express","version":"0.13.3","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.13.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.13.3","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.13.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-hnYdJp11Wls6BnrRjhnGmJbCaFz3BAS2vBNDO1kQOjvcPEMWSY1oYifHKK7Zr4gH3PzjWCaVzhpDWj2R24iycw==","shasum":"6d50b86688bbd6b90cf8a34405c6f4c0dbb3936b","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.13.3.tgz","fileCount":15,"unpackedSize":22796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfgg5CRA9TVsSAnZWagAAzk8P/i9MjxzRcgF/UTXuDR/6\nYJOl/iLvZc9zuTbtSjgDeoWZxraNi6fn3JqtVViDbGgk4RKvYq52YPQlGWPU\nrEyNwx7/VAf9m0YN43PMzYi9UGPMfSBXZ2Ykv4U9o0sUZPTsvLVetv/oSn8p\noiTqqNwdHXY6doIyZQdXpKQiRUn+g17WGFCATvnzDMPban41HpXZJPDU+Xtw\nyFXAHZz7yDC/X4tO2zTth1R57em+u3zx/Jn0KzrdIWfyYI2JPrCEjGXNSB3z\nZk0cg2SaJVDo9SEv6mxHEuO+qX1zv64GMZNPZ/OwhNWOMvvhBQ9aimWphY19\nk/9J2bzt9eKq+Mhc3Lk8Upq87aWbi04y3r9pMr8LblbFI66FZwiGcRI2DMGf\ndQfdQrf5Mcy4FCQfz2hn+5ggTt3WXlGuHUxn+EUa3Por7uZ79rG0cQk4paQQ\nUwJrMparqP5wjfSlxOUbX3/3ymC6QyJ1dc1p/OBDM2IeVR3CqHRS3WFpjxqN\nDwZeTLs6B2HvfnrR+mrOnKJgPuC9AUklVaRbMY4pXOFq1KqZMixETJ6oxfqB\nFlXO3E0bQ4/xRJbLgK9qKzrI6hq25sJQ67Wi0DGr+bES5g8Me96XFwYf97K9\nxgK6K1RWeS+JB8HR0YLaJWFT3QhwUd+/N/a1qiVnojPKv82ikp3z5FITmF6K\ntccW\r\n=bY3G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlqlcdO/oLgRtHrsR5agMVgY8376DELad/GP38RoypfwIgaKYNtzPM4iz8Eghb4DkOVYOK6Lhs1gMZhRAp6OLEuwM="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.13.3_1551763512951_0.9128873411080503"},"_hasShrinkwrap":false},"0.13.4":{"name":"@creditkarma/thrift-server-express","version":"0.13.4","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.13.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.13.4","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.13.4","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-djLmjj9jg6m6YaBXVjFaZRfdt28kdLLUqctCRZ2xNCQfrWhXubZ1AX6FsmE1CALdHas/0TWm+mza7vwYmRLU7g==","shasum":"d1809760f2a26800d8956ad590f07cf24456703f","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.13.4.tgz","fileCount":15,"unpackedSize":22796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfpujCRA9TVsSAnZWagAAXEYP/29nHeF2KMItiZg8Cs/j\nkhx5VhBGmFAxGiDe9AJ9H9qJF/4BV0ctkxVeaLPwbvS1W6lgm6p7xx4k4HmL\n4zUitb/kYRM/3CtjbMUp/6o0UZ+Km7QQAZ/r/kfJjcZEKN+tulK/yQ8iYQjm\ncgTA3Jx1d7XVNNsqS0xAePgCfsuIiPHOwyn1HmqiWHXp8lu+WEpfXH1Fta9p\n8uTJiLjLy7NjH+iCtUX1mEfBXvkLUfwmskvaa2sXEnnnAW2xVLyzhjWexAQa\nF5vPTU7D9oKN2u0AgEwZayqbVi/inCOlJHfEK+rS6gFHMrvEcvbpOur6NeJ/\nmevohuWP/eaeRUUUBt3DMLUiktmat+VGqIRPxeRNQRVSxE1OM3BR2x0f4Eqe\nIDiHbs4vxui9Utyi5K8aa6PtkGzbi72FKpbOyoOR+BWV1+8ceJJpSJQ+9VLD\nFLqzdLkQi41XJGJ7q6Ne9RfjPsgWR8aL38zBMD5Mw+CvAqb0uLEkPquRcNEU\nj6G5AZnZqPfQclzJRoxKpLQ+wvhpNtQdHQcikqgAPhxlExgdZ60lFslaJ/BF\ncLJOOtNhWSmEHODqfu2fCRiHpV7DU0dX04NozCUhcHEVcfFvez4ePUOd45Or\nQlMoUvcg5mlTGmc9rNWUYdVluwuGo1FDJeRi7x3QQHVnzOrkxWwo70+BTP5p\nYkEf\r\n=mWVZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICDQXCljSpuiHDdnqLK4y8uhyb0ZD3jN9vf/S2c8qY/JAiACmryipg2viMz8LA1phFh7kmBpSkGhD/SgXIOYVlDWvw=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.13.4_1551801251204_0.9269179871356141"},"_hasShrinkwrap":false},"0.13.5":{"name":"@creditkarma/thrift-server-express","version":"0.13.5","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.13.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.13.5","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.13.5","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-fRMyhHSXlR7/UZaLEEuGTsLa4YinH65YBCd1+RiwhQwjqSqd+tcgJxqY8P3vIfW387O3gPWx0hnlrH6eE5O/pw==","shasum":"6b4d0ebd4626b2f4190701cef7890f04ae383f34","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.13.5.tgz","fileCount":15,"unpackedSize":22796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnbMHCRA9TVsSAnZWagAAA64P/ivyqh1+41c4CNFseLxh\nqqFTzHWjd6zgvu6sw7g44ly1pf9BtQCV5e8w9UBqHNk/ZzP1afsJrvxXauZh\noYV6TM+KDtXQmk4vrBfwCm3HXittwUUaToNtxQv0vI+AttQ62iOZaEQrBQ61\ncFnRPhr6D39IVME2a2QA4Fb/1LBZAMuoWxAfWpYilqU1DcnjlakHxT6iGiyE\n8XiYthFYzpw3uknDsF8AkDti6SC3IxyKKFQiCfrpf1wbV2egRBWRM3Qgr0O+\nRqsuqQOK7WaA+V+mJFLsxhHn+HmdJx03sNwUTuJYoAaYadLizp0nf6Z1Hoq8\nwNfFglZ541rnWonwEwOgRoLGXRYSFGMHsZw4VGI42Jz8oGOXdSFOmeyhSHrM\ngBZLDcn1NPkNJnEdJDUu8jMhsvX1JdQnk6ARk/44pAN2YZduQS0W3r51qez+\niVepBwELeeF/KcsaCySPXpFz35bQFlypJj47pqUkP3GQNZ7AV3KRubhFE0M3\n32ZBa+1HFnx79p+EGJuyR6VSsWuMHbJ+dpt/hzyR0l5AXgK1oWuD0I83jaUP\nZEf98QhewJvsRfYqouY8d1APZc2lVObBFsAif0KJVApxveAuHbgzKqhlijzc\nXRcr3gMIuVqcij9S49taVWX8YaDSVowvG+dFhLMJgWWNAaVgXwPFpCuUnvAG\nEHcc\r\n=yP12\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkH4BQPUOMqGdnNJvuGIrrg9o+dry9tRPmNQPyG1iuCgIgQ2s9fLrPbBFa3Qk0TYCDhSr774QfJjwh2HLjiR+NfkU="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.13.5_1553838854462_0.016226515425205035"},"_hasShrinkwrap":false},"0.13.6":{"name":"@creditkarma/thrift-server-express","version":"0.13.6","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.13.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.13.6","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.13.6","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-z8I37BVbwEpqk+JjVD2OlG+oPQaG765T56ozp+9Ae97mbMeQq4Pm7ZC/rGb4TypmI4qRjI7eO1x3vrwR/qAPzQ==","shasum":"ff223eb1561cc6c302a6c3b02084add3f3a06ed9","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.13.6.tgz","fileCount":15,"unpackedSize":22796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsRCmCRA9TVsSAnZWagAAcwsP/R2Xcc00XYxs1IOLX8fy\nu6E1fsNgs9rC4wsM04ONz6Ojm2zEcpPqBuMkEsTFHFlYEC8DFATKCYWliPuk\nnwYv1+pN0mz5+sa4pNVsjaPwXVBCiuHXLuNwTJVcqykDcbSTNiv5Ne+BQZY7\nWlpHYiK+UL/rkoZpi6SCN/PbMz4+xgT2gsu6jn3LfVNVRu5f4jCg2XUZyzui\nCySoDBvSbr1mozWYV/fwATt/Tom+UZjCWYE0BWfUoT6cWTbSZzvPjolpXiKN\nN7c4SuWWJsVCLwvPKQYUiwcrFMOWGK+6h/kArIiooEc+CU+ryozPU5to/jq2\nupVc3U1MHUYtWm7UVI/XES4qyYMuoW8VV2ZoF7DS3FXB+M0NT82a5v67+mZu\nqa/o96E2iEXLOGlauk0kOkfWay+Yu7EZ4ytEwHJYDqVQqMian2/VxFGUFMaf\nZhDZyJqKhI0S/C4dmOF5/B4vNs47FfVQIdM+xadFCbfSeFOoiS8TPMmkMpxd\nrAGPIvHpjsN6jbMkRs/M9GyzUARLgUF11sWDtq3ScfreEqiLi790klNyL5DC\n16Gjz/279K6+7OPntEG3WwSG4lsQuzRm0nQ5tofnA82KHTIHeizCYjMRiMSr\nqojHSh46orHWzihGTbKXQfupWOIQCXM2lcjdA7eEvCKeq3B0UAP/7Ay58/15\nsa0o\r\n=oZr0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA+jDvqeRfejPl8CXPJh4XzcI24Wmg4efTUUPhfwayWqAiEAwaEEOtmUs9nnFVB4/0ZHgZ8IsvFvh/nAy2I2nlgIEYM="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.13.6_1555108005560_0.6402871151890788"},"_hasShrinkwrap":false},"0.13.7":{"name":"@creditkarma/thrift-server-express","version":"0.13.7","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.13.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.13.7","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.15.1","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.2.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.13.7","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-Zjf6TA9N9v8HvFkirez5m7qhCB/ApH9gFxlPJQwyA07ED3ER+EoornQeQH2LHeNvB4/iSHHJK/asno1Q8qRxJg==","shasum":"a369cecc1b62c1fad094e409dd5adac517ae3bb9","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.13.7.tgz","fileCount":15,"unpackedSize":22796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCZtXCRA9TVsSAnZWagAAkRoP/0TrT6YlYbllXQV1rRjz\npOCWtW/WPxuL25Xc4J8lfrnmk17G6U2rAqunDkUvawGqf+WPJnCFt8zdXA9f\n7WRb4YhAcrC5QkZCCZYnwgfIO4e61l3dXlNmh4ClouL1Xr+l2hMEOD1YyY4V\n1EWbGTS66o5qd38H+nFocWL7qwRdtHmiD8U2dOIipvgCaqCIz2sjKQJyvNNf\n2gRhP9ujMOv2BzyKHIwUWJp8YTw/cdPeiFr2D4CPINw/P62eMhp+sbDTU/di\nAhtQaQM+dEPwP5HUcfGjrRbCGTQZdXRbnOiL2PHE3ablwIupgZWE40/Mp6zA\n4Bda6++tBMYQxUgYzX685skYlGsV0SKFWV9QM08Floo3fPXxOLo9YJ3cyROb\n0hxPpoIn3QHyv0Qmp5O4ctiEmMvE0T1M6T+RuVebB2x4WZRo4lj19t4JOe+Y\nIQ+IajAXLcWJB1nH6PucdoXOOUqAUxs0bZsdD/B8IOLic7V2TIWVrCNBGT3c\n39caZjDyHnullAcGXRFfF06BRrA8WnxKceYFOkK6VqUMsgAJoaQ7d18iLDFF\nTZqWhNTGsmHLEBYtml9AjrljvXcK4U+fTjdETWCz6YrRCsYRRIeRLvkopWKd\n8JW4QeIs+rC/no7ApsOPt/DmN0Wad/s/3BmTy0cDO8x8AaG1GNXobUXT3+kg\nka+O\r\n=jJ2u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIArLwUl5a4BmFYo1Ic4WjOSMW3t+7KL2lQV/BYcI9qNUAiEAhFMULy02+uwJuT4S7lJQcbenXEBdHdzTbtVateO9M3g="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.13.7_1560910679037_0.19590521647457249"},"_hasShrinkwrap":false},"0.13.8":{"name":"@creditkarma/thrift-server-express","version":"0.13.8","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.13.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.13.8","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.13.8","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-zn8hcOMtBpyaak6ws41O94FjEf6YuZIRUyK4bzv0fEBDKYvN2SineXmxvYuf7a9/inAwtNWyHkOzwiHoSKAnlA==","shasum":"1e2347fb609ca4f3e72c616ce1a95f831a5ac273","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.13.8.tgz","fileCount":15,"unpackedSize":22974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSzkkCRA9TVsSAnZWagAAuEEP/RwF07+mMrR4MKNis95W\nUd7fLMMlXRUhH9VMBLKOxWKrh7WSgV2ioQEPUwmDRtCEWeKUhMgvFxvEDm1E\nkVg6PuCMI04xYMvsvQDvQsMCYqUMRelS/EZuAM9V1zF2Mz/OZeMiSbWJH0im\noePzENaaooFIQi9vidzEIx+28Xj8v4jw4RLB1LPkc61FUZ9LPhT4ZBwD+7US\nTi2Bj3KsFYSChMgXnWHRIHmLzhHzIr6CbEPASarNWT7PwC4KqHvb0HWVMyKY\nl8UVIBi4dXucdpEDicnLrnhhz7mELTUHcw7WFkCaDhNkkNi646lg8S/l7Q+c\nIlwkYPlMD8L3PP4WFLgVrgSyDN3EL1BAhgfVz7//L8+GO95fYkLjn2kIHIoD\nG4ttH0Bf7vJwVlxha9CpmmPGpaiB4DoTtUJwn/8Um6OFi26MVTdviUOLj/EL\ndanFF3tR2hL5Jnc8nYG7TaNt4g52D2CCXYU2bdRY3RfEdy1GHFFr0wr2Q148\nY+v23wsKMYDG5Rfj7vTRKd88n6HBId00gQgx3JwPvSLepyKnB7MqP/u7tCPU\n/1tNwBwSeobyRSNmM2hvukTZNMI2r49szq0SK+6LItbh2HKTmx6b7iDmlAtG\nd+iboRtqexGVhg38ZlQgPmCKZW4nc2GTeNnZfH8CDQ+uAdoSzz2QaBAj4tWg\nC4aR\r\n=CaUZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3I8Ge1M/AQ80U3ncAmt8kQsyw775Njz6hVyO0UWyb+QIgKKpbCZCinidrN5hwLJevscoSo0XTp5QsEKegkKNJBeE="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.13.8_1565210916389_0.00047349954888198376"},"_hasShrinkwrap":false},"0.14.1":{"name":"@creditkarma/thrift-server-express","version":"0.14.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.14.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.14.1","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.14.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-Vy5SIVHd5/xLICRWE+ZNiVNtnPlE2Qw4j3FO8GVgxacSz6UzJdCXOMys0ekQGoNa3In0WWit7E5BsKbM0U4n/w==","shasum":"a99e184adbc2cac07b788372630f816c8ec1688c","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.14.1.tgz","fileCount":15,"unpackedSize":22974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTgZyCRA9TVsSAnZWagAAxOwP/3JU+pf/WvMIX3GKXA+Y\n5mCs73X94RMGX2fHPNhYOu5Vgmh04+HL7mw0P/scucxRr2JZ10Y72FApcpBv\nWnKI5o56CZx19CuIfN2pv25/QZdaSlvk+GLWmEFv3FRFqD0cirgPK8Y1ohZM\nKufJghVSZHJ7h/lkLNxQYT68Z7U/0pDU/U3uEm4vZa1v6HvKKKGzcfK9kaFP\ndrHpnlXAX8g4o26weZMwEy6e5iN6pEHmXqT1lj6C2g561k3EIyTQhUfCHU2s\nC4j2GYflXGfSUBi15QOHw0qmhaIhGsnPlh2FnA04yYqUzn/AqH0/Q5EMw/Td\nLSgRaglOyFzCedWED/vvHmmcbSXjH5I7le/HVzU8fkAlj6BWdYrgelDW1HBR\nCS4rqQgfMMdsrLu1wBJSDIIc330yPgnuM1jsm+Ro+yInhmad3qIBjIZJAP8m\nF8iNhuyaxDRrLQoPV9cB0LnshOrj2kPjqbQAPAI1rDoYf5/4grAcERF+yJGX\nawx4fpwVGlVnbC7+5X8ZqNJKpQ/4SxcYAwiKi76hMtYc1XH1SpUNw65tvQR9\n0Z2vJ36B6btesLtQEiDjgiwum3pwoU8JE+jqBT0uXeVixzKHwslRMI5DNf2E\n9De5C9felm0/jCvknyuT8euqX2hBi7PShnpETYIv+tJ89gU/Kt7WI8V5thRI\n7+DC\r\n=uc5G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDruezUvnRDFrOjUiErUYPQKaho3pTDhfwGehLCAr66SAIhAL7mFUQyyN98fdOiDz6d6Xt9VpjZxlAYmlUFkZEY/hWw"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.14.1_1565394545680_0.3601142833680149"},"_hasShrinkwrap":false},"0.14.2":{"name":"@creditkarma/thrift-server-express","version":"0.14.2","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.14.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.14.2","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.14.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-rUNTFzZFEEm6FcBYGFZaVCZ82lxRWBXuN5efLKp5/AMA2E4h4IW/gggMeDu8Mp0kG0+BeEDXqmEAr4vcIsp7qg==","shasum":"6f3eb2376b883779ce2b03470d289d49af54953c","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.14.2.tgz","fileCount":15,"unpackedSize":22974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUvPeCRA9TVsSAnZWagAAgUYQAJEjycXwBaEfsXT6lwf1\npJPQI6X4PccSBvI1QJkgZav9CPXQCIsIZDFbi8Lem+hJz5qoUH0+edFHsEkB\nGAS1orQGQqt6mAELYSlAJ3v4/GlbYXSBhb8hpdU7I9itSyCoFC6Fcrp9eFOk\n70LZvWbmuR1C5QD02QBrNaAhSQxc9DvgstrZcMiysyCa9IBk8PwOb43VCskX\nh44yJteX79jjTq+X2LvFXrMXrn2m/9aqNvJanrEh3Vlv4pcwhuWDeIncrOjs\nupUFpaQ4IMNgdChl0tSdUKQLGHIPmNHEasVWwjeJTLmXMBioN9ICZ1wvPZR5\npkwMW/15xdL5zQlhumojujsVabic1FQxvDxWNhcVuM0562Z7f23W0GJb5+B1\nF2S+oOKZN01f33dijJ13Ir3kmNAxFSx9ZAZgWySuxFOmlzrKgDs9BmVwDR2k\n9sM+3YRA4vmNZtXxIvNdY8RSwiOFSMjjiZuAapJ8jvGjXtPbq3ePcP9hdMQE\nTC0LcY5rtfK5iXgFVgcfJLZ2EeKSPMoSrzg6Qd1ff1TVOYgZadLBV3i2fM3J\n3GgjhWIncgRzeRDgqAmrbD41U5c8WS/hW94kCzgnRJB6MVGLx4jGtQl3QPxD\nYqsJqHpIRqwki0h3pmogvX9YfDrxF9FHglI/ORbhQjwYE0SPgqrED3Wbx8KX\nbnLl\r\n=QVJa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCu6SL97vIN6n+6nlwluRfPF023XuMS33ofclgoQWTLpAIhAOiml1P97V9Zrm+3OllF5z23DF8FeOxz94O6aS6CADVD"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.14.2_1565717469707_0.06636401016363469"},"_hasShrinkwrap":false},"0.14.3":{"name":"@creditkarma/thrift-server-express","version":"0.14.3","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.14.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.14.3","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.14.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-xHjeRss3j5tPnsl90LacCaIM5nsW24ih+7PxbjmvbicuMXkDDHixOIzFVy/tSbvrOviFvBbYR+DCIfmwCA3YOg==","shasum":"e36c24fe302c4f9954a93e8601022cf87e27e664","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.14.3.tgz","fileCount":15,"unpackedSize":22974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUx1SCRA9TVsSAnZWagAANPQP/1fm0CRoUXyFegtXcvQL\n8HQ6smR2MwJHm25i4AAnQgEYwB2qdRR6+QqPTsD+CzXpN0W8eEcaHsrkNKYg\nhHx1deGeHFzc+fGaZyHR55N2THaXNg5QtewPSl7p7QAyfkSf3AX5mCCWCm78\nY4hP/kB04emS4EQJ0Cwt8LP0UEQM59th64uYeu6HkFb5HUgIKThvN145qPW4\nSiGVq5y9fF+mNmxXB278iH26eHfye2foGfkNBemdoixUlOUvDDk+2bbh7kLN\ngW9t3mh2EROa2aPUgMz/SnniteVK6vusg1VLx9lmyZKQvEDhs1MhpujSdEtZ\nVPEbHLq5VeYa+0gudhqpmPRIRLE7lpdOjVA11NijkpM77QiRc/c1fJOzJD1m\nYyBtohnzX2TdnJKpC9BA1YOS63BHS7voCGfxpu4w2b4LMoCZwGMVro+V6bnW\n2jKbpPobP9nMRuJPc6JsXsrcnlQlFl0Ce0txpcC5/594BegIIQOGYhsV6oLN\nZ+5cLr1l6CbPe00fqXwXByqYgJAP5lZytPW1KLl4T2akSiEMDW7z/3xXGFeW\n4JoQT3IeMFXU7UE88nS9p+h3sbvfXd8WUF37ZehhjClS6jONb4Q/mw9wct/o\nRlKhgCnrTQhj5VNOZRz3NT+SBwrrNClhYCkQJzxkMtfV7eeM0QthY4GIX5p4\noR4Y\r\n=yoD0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGE7kjZBpLesL/LIdnroU7TOmjgb2fLsQ4HrQOygBOeaAiEAzweVwwS0nkAOqk5YUD0HLEfe6bGGJ3Mu8ZdtZGlRAuE="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.14.3_1565728081799_0.748225282400937"},"_hasShrinkwrap":false},"0.14.4":{"name":"@creditkarma/thrift-server-express","version":"0.14.4","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.14.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.14.4","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.14.4","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-Rx0knHLl6e9rzobP/CwLhPo3FLeKvgGsla3T5msSC6MyhtM3Yfo2i+lcMjD2LUnpRoBjid1jvUwyJS9aKVRXWw==","shasum":"154a16294304c70afb14f845639e69ab10d89374","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.14.4.tgz","fileCount":15,"unpackedSize":22974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVi1cCRA9TVsSAnZWagAAgx0P/i7wlCn0y6rg7O/qpyma\nqga6Oe5VRpyQP9oULbxntZ5LXaG1mza6+t9BN4UotDHFKM/zzYNCG1Ltfnls\nOJ4tTcYXI2bekaY64HEIQqdsq2qSmvBUvF/QQ4Fl+gj1VS6vzTNGntU512Ld\ncT+NF4/9oJv0fA09SWBMfVE+Qn6IHjNN7rLhts6jhGhfPhnCD9HhA0aGRFjU\nU5xD0TuaWehfck1aWLyUgxrcC5X0gcb9A4iCWkl/X4G0+/1LSe2gdlxztV/K\n5xYNuxMEOgUH7wN3qAta6e0jcZlmfvwRqNMoAHDfsZ8S7r6oW2N4U1ojb5jL\nhCQXQnfPYzM2lv7SkOFa8xq36oFX/pojSVM7Q/2VUPnNclxl8fST4DqHYXHG\n0U7zXWRQAu76wtQ53hzKzbzMQ60JySwc2YlmUJo23immfSqIqd+zkVAVB+zO\nhBGQeNny08jNHMXx58PPiKqUnxNSNd9aNcj/2myNOsNH1NBNtWLSog4KWW0+\nl61Ioo6uyUAWZZ1UP65FidmOMhrUo1hVq8xPL1uu9sG9W3TI1g18gto7kyA7\nENSFhB9BmkTmoIr0hWWxMSSBN9lEcXHxoWguvGW0UqzLB2JoU4sRx/v0u2C6\nxunJQewpwP0zdxy916T8cmdomqm285IfuhVd6RgMaQyxnUID/StiuYW8s3Zi\nPklJ\r\n=BFLk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBsjTzp5CL1uU3xxRWQYQ6WsUOQjdgsUQWoUpLYjssHjAiEAyuVc00hB8eEqx0DSyA+P/xXovUHolbgT/gNk/cdetTw="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.14.4_1565928795419_0.7009012249624209"},"_hasShrinkwrap":false},"0.14.5":{"name":"@creditkarma/thrift-server-express","version":"0.14.5","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.14.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.14.5","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.14.5","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-0U62FW68WtWe2qRKPrroTW38BnU38jW4Bxa2YTDQnmT91+Uh/XPKqQylFnRi6OmqsNcGZ7Gg+uXkiiVtVcX0KA==","shasum":"59ffbb7894a78540150d0347bc55dd301bfd1ecc","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.14.5.tgz","fileCount":15,"unpackedSize":22974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXrF1CRA9TVsSAnZWagAALHMP/jwVqOdUlxZ0vIMQjGqI\nysyKX0giTR6vb2p+ViwLHWtG8n9l6ABVqCdtPQjsIRLbN/B6ZvxOkB8uxMjx\nVLlHyWx4UB1y26bPz49DEtgH8AcXQeO/dAIWkI8YWVYSuVJLbTF8VrxEOne+\nqQ02L8+aSA8cTv7ifiyrA0P2lbUA4EtfJJHz5uOCFFJVoXZXF2dshUByFxGJ\n9RkV9hqUhoktSU4ttWvc/fe2/Fr/Ph3vMUTmfOHjxBPa9FR8vBpJl30R0zcr\nd3HstlR7LLXSF7U1/xCTm1EZ1iHeUhN8UROIo5J9HAImZJP9zZgCRS8P08ur\njVhE9Sd0dGkPW3sNbcdmEJHfpdOIJrzYogCbWGNwrkGqUaQ/dokBWq0t6XXt\nXHwoNNDTVJSZX9ANjkAcA0BDY8DisM/QFQ//2R/L3NUkARFUHpPdQgxjHIVn\n+EObXi2EEtbt6lTJmu2ta71NVYkP918I6hC4uhzNKYNwb9HHbazt3Wbyoker\n66ZHGVBoD94JazICOyYcCIeewPAuTuOiaB7Pwv+VzUSdu+bpU5ocdRrf3fvF\ngd9t52dpUOHH52B0N8CE4vRDwzakl+T9SmsQgy3EeYAimcNpORoFIYUcK2/E\nPi4j4gm9/Mxi46w2CMMJfXQB7cUnqXvKmLFGJ7q2IXEl/yozBIVwNpJoshau\n7e84\r\n=zj8/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDb4L12kZFoWXsdcK1gzsdCxBNuaBSxWOK7zsUu6aM+fAIhAJDV46tIL3DbLTfLDyouxgpWlq+XOpCAQtypMryAJ9Xo"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.14.5_1566486900416_0.9519938379299209"},"_hasShrinkwrap":false},"0.14.6":{"name":"@creditkarma/thrift-server-express","version":"0.14.6","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.14.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.14.6","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.14.6","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-+P6qnqXk7brZ8Cb8sUNiEzNk3r8+tADT7anaKGSaK6EhZiMnsxMfmf7ikzBwaq669FSlD1VdX2uJPtHrOBJoQg==","shasum":"eaef2ebafbfa519f87c3df7541ff021cd2e08b67","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.14.6.tgz","fileCount":15,"unpackedSize":22974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcVwTCRA9TVsSAnZWagAAQhIP/33ayrvSYA8Ed9QvfNN3\nxpVRojthxHDhY57eK68LGzfZLeH6EuIK96wvWDkyHY4NcGKFtnpGTmeVz+5t\nS+I/V9mxf5tJxh6kL+Luvpm0UlfNjhAgQ0EdV0DXaGv9ZbHQnx7LLE6N3wEM\ngt8SDFZLwjm8xwBorxZ+eNMeRGNCcU3q2PdOkOz9n1FMldT2iqDm4e2B7hXj\nx4Rpd/ut3OEtio9XbKA33qDPRv+I3DyIaNRHEIansPIoJZJjdEQQG2GpVxLo\nKH7Jb8vOpgnSLsOyu5xYcxBE8yeA63iBdCGAws14EHoZ06XTPu88uqVE9pHy\n/gZr+HuwD10hlOdQZz5xaeSV3iRO8OAkm9Q653xIp2CDidpp8O2cHfBa0KCJ\nMhCQ6gHIjJud0P++x3FaqUWtOrvnYJ78Oo55+QIKZxVR1QlhgRXVwRRNuMqE\nc22tIjhGxBym3HEzoEsN3pj4DdKaQDn8xsufQf5lXj+A/WDy/O0t1zaXWcKK\ngCe5s9A9B7clq/dEKH8+TLUEmaIPwNK7js9AAgAR5UzUTh04I+4wxQnrLIto\n92R4qvcv+XFe/94IypTsfcBZ2aKuuGJeWyQSaHZu4pFO6Zrz+V/2rvyqZTMr\n/aSOaaOVkiaxi9kWSj0zQ4WzAdHMxsyzPvVDjCR3c+P5Jnx4lr8gxqWVWRpA\nk/ko\r\n=/x4K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHSPW92e2Qd06jKUlZ0XEhxD+mTGFkAPSSedpo23rRB/AiA2IVuCEHaP6e//+lLSiGjSgDb9Y3PcDcHnenqPB2/i8w=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.14.6_1567710226839_0.3392286815041805"},"_hasShrinkwrap":false},"0.15.1":{"name":"@creditkarma/thrift-server-express","version":"0.15.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.15.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.15.1","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.15.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-krX6ekJTIxHFfPNja28CfR+2/bLins6bMcd+N0qS6bR6sKxXgRJRksVOdK7BH3AmQk1f+cPDagq9SjTwgCq8gQ==","shasum":"010931d5a265d2907e7815d1a0486eae2e17ab97","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.15.1.tgz","fileCount":15,"unpackedSize":22974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlOWqCRA9TVsSAnZWagAAPdwQAJx3UBlRQSFmZwH0kOAc\njvBUzU0LUqctLFzIqcCG4Fuiis/KSqQ/aPM4xO69Dr1hO68SyJ0IY7eKo5po\n10+4RAljDZbascnxnZofFRDoFnQ22iUiohM4lYgAwlQBUisvCkj27pKm7f+t\npUb3YkQ95m5QasSBXlSKF7N0ZTiZpX4KCW18B/hBXKCLTZes4VB4eHZyYAfW\nWu8k9ChmdU5WsYhGKcBnrRAq2mHYELb5yVv06QlOnH/oMX+B1eDesLiAQoaG\n+33mUvNvOr//yr5p7x6i25Aj7aeox+io0L/h7myX2jfNr9UII1SJOt21lR4Q\n6ZkHsR+scl2ufqRm2NUDSteYA/u4/wiQXZX0KwbhfHyfzTPLh8ueNgVALWMm\nYR3jfkDua8mbTfuu+AmZNIetQKi7P/xHPf8qH/O1BRjn2MphRIbY78pBoae+\nEYGtsunrjSJwr8hWyeU0M1qv42cxlPETg8hphV2oFWyzB2bwle1Mb/vKP/2d\nwQgVsfW9pFBTYiIXtcQWApg0Syr9BiSgkac+3knjRA2H/L5xZJ1s+01iix8+\noGx6X60VkGTM6GyR2w4NbSdFIpAJlIFwA8iemJE+tYv6Jp1Zr5brNURqwGFo\n3EJhs650uQX2OJsQCC8eX9VReBCLMc22ifJRlGiWRJ1oxmfia2cC6K8pxHp1\npVug\r\n=DO+9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8H3lZMFEL0PYfnv04Jc/mLW2ETupVGDglhXlG8oF5WwIgW70Hl71knTxpKS/lk0A0LmE0vo3t8dyOPLa5gsrQPR8="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.15.1_1570039209407_0.6338263416108905"},"_hasShrinkwrap":false},"0.15.2":{"name":"@creditkarma/thrift-server-express","version":"0.15.2","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.15.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.15.2","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.15.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-vXatk6LoBVwBDlnA5WQUCT3f+kFAXzBRyVsBBshhInCuRyExvxffLAsJFkY7fq5SEwyiceZZK/CZo7UT+579NA==","shasum":"33f985280cc7edbfce1b77867f52a38ea61bea57","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.15.2.tgz","fileCount":15,"unpackedSize":22974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpNIaCRA9TVsSAnZWagAAT+wP/iq8GAsJve79WXT2Bza6\nyuSscfBuXsH59sDFSFHIbrnv7suh693B2cVx9t/j3u3HlMu/o9Uy/UC7P34I\nT79unhMfyVvIfpANuWDsRVLW2dIuKwNuxQOdrADet/EFXoJHUMg1pGgF9oa9\nN5V6AtisiwJpWs2y/wxSaT4YqQkMfUCf27mAN1qOeKzlGZkfBytYavm/V1Mw\n9ekKF+4kydsRw+J3kFK9SSn6BG/dcBZnnQZ0m5N2VwhrCovFILxYUYmQ6zPx\nu24cHJmLbIgsYwUsj5Llj8l1eBqpdBAAnk0qo0YHY9kCT84Lt1RtCKnaOrQY\nwJcAivRYgTRxHTpSOVL2SihO1611AL+4YcZ8ej41FF2eDR4UhMFTLuMdI/uu\nsITO8kv0qjiKLlLCH2vDuduUYnVhEiZzDW1BGGRvqq9kcQX9qqT6gaJjpWoe\nS6ImT35SVqcG0fPP+bwLNQkOlTfHWvzfOd8DW/kyxgR0nec8o51VXdRZ3Pkf\n4Tc4jhW/3/2o0/GcgbEDIeVM0WqOvz2f9ShwwTgIje8GRR1i7mYplepHmRgi\nLfO5TvXDe2CHAZp0l3/+85rVCXcDAwl4SmBrB6VC5j3hhj6xLvqkzKP+KaRs\nHAq3r4ARd+pg0IQoQjP1tQQMk9uRqemzdaop48DP///EHIsUIQjzFnHQ07qt\nQSUi\r\n=st7Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEB/+xX2h1q02RueewGpXg6v3iNa55kPpJxG5E/IvqgAAiEAmCmFOGRbJJ2WAEXOSVjkQEDFwKGhGtYksqNI2FtzCLE="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.15.2_1571082778074_0.7689596590429746"},"_hasShrinkwrap":false},"0.15.3":{"name":"@creditkarma/thrift-server-express","version":"0.15.3","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.15.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.15.3","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.15.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-qKsT/eYwb705kcEdOIfpzYReFaBGWxOInP7Otq8omjKzptFNH7DONbgpsYJZTh7VhBC1tmseTuZn0ET1VyFkdw==","shasum":"a84d38a0ee4b4b19a3720b588cbbe5909b5ea821","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.15.3.tgz","fileCount":15,"unpackedSize":22974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpSN1CRA9TVsSAnZWagAAkGoP/iOuXop/FTEHp2af/wyq\nMHQw/t9TVe5DYza6MgkxkWasWGyQ995zg01/9ME/zctncUNjxgKJXnWz3xb1\npbZqvxaaZI6yp/Lq9m1ZgadNVrxhvCQTrKtASrMQYBQAj7EKa82X6qe1DEJg\n/YyDlierrvon3dWh3I1GPTSFqPi0JBMIwBqRyeW1bYSZSqYH0VnWEu4QixNt\nL3T8+6KNK5mnquowlFXDhJFMN+kSM68UZXTZREKtARJLAw05zVhH5raBJs7Y\nGyyAkoO3UOPxC+/SMEWi2Yb08am6flTBizBXY/AXJmsdfXJVmNo0qH/iyaOz\nNddr4WHDZc5aDgn0btEZesKJCFgCvNtj+xnPIk96YeNMaTu041pBHGNzFvIb\nT4ISXZrZpDXI8QDiSY6mClmdEYYOZ2Ejhjgi60ebCLl+6S4R/A9gy9gfLln2\npotigw7mPf3z5+RUkOnIqyi5pRRaW3qlvyckm1KgfxfPtv+M48nVwVTTXHSN\nWTEpn2ggBprhmirIapRly0xQdGtOf4k3xNl7CdTO4AmaJNEd8i5X37GuhOXt\nfWR0bk5u7M8m6IasKbL29H6+4wS4xr7y/ARwHiycCmBiEP5Dys7P7PSpWxv4\n+bKu41Qj54y4Ci+rnZH8Pywlw6UtnE+d0IqIITfcJ/umvBBUPbslRESCtxnN\nWqcx\r\n=egWB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB5SewA2KCQJid+mPt6xAjRHZQPaAFWyGgBk97yKEUp2AiAfOWisPFg1LqK9adaRg3JT6iIxJ8EY2cFcVah4/F0TRA=="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.15.3_1571103604401_0.3556674561897357"},"_hasShrinkwrap":false},"0.16.0":{"name":"@creditkarma/thrift-server-express","version":"0.16.0","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.16.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.16.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.16.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},"dist":{"integrity":"sha512-0Jv+VElNS38KiCdFcBu7ECZrx2c/34SeqsnGOjgxLgMROpORek35RoWqL3wvFcP1/Wstoh/gVNg1DZ5XRCgUKg==","shasum":"c01c3dbd9e1808bf610cd3353473d3139ff1cf76","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.16.0.tgz","fileCount":15,"unpackedSize":22974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJ3iWCRA9TVsSAnZWagAA/2UQAJYndqqw4UZtHduNCIKq\nbQjBcJ3dX6zsLtUf9vJMe5WzHVjgqafjQSdKSqJNhrdd5XeW6zLsy2xPbgGU\nll6bTwV1HYFYwi097GvL90GGxwdacSfrPlvT4JLxW6yQ1fW7jjtPHtxMqguC\ntTtF4UpeIunnSkG5jxMr0HNnTpYqqmEtpDZdVFa9uUo8b0SR3gD+pfCg+Q6v\no3aVdIshush7jOGhTGAwqfqtiHBMPFZLoU7NvsYdz/53A94ikqtSG0jyToaZ\nZ6mgSqIJCnHkT9Ck4EatG1iilb+jBrAl6x2BSaQa9tyMUUnAe+rLdo2Z2zFA\n7VWiHKmJGSUhzdBokT18c1ywBeqAsQJLKPy1uZp6T99ZSHvuqzk60ibidC+4\nnf6Fy1xMfG2FRH4E/09dAuRjekHCRm9eYDwI1jgLHfMDHt9R28jsRXkmHO5e\noc+WOHnzsGpf6DGI2OPeJHcENd99JrjxjZvKVkGMlg77CZj99AfWhtu2CXDN\naQhi2aNUAFOpN+dY1ZDkyk6FE0qsvFJsOEACnVYigUDzA7E1m8+dhnD75wap\nPecAbzX2komLvXDp7544NML3IdKsiQ4UAWFbVXh99QFhKjspJ8qXR4vKdbj3\nh9Q/UXGJH0rzboRnHcsAJoSYIYegIWeevuU1D7kzXUh/1EaSGC3LXj7x5uQf\n8WXh\r\n=Bdlg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDOc+mNBVALXCIbSfKa9hH8F60RZlGQXwIbpC1BfCS71AiEA1BJ/VwLM01XHM6soApGVMpsIi6zUJzTb/jWut3xi74Q="}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.16.0_1579645077581_0.28644028129222376"},"_hasShrinkwrap":false},"0.16.1":{"name":"@creditkarma/thrift-server-express","version":"0.16.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.16.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.16.1","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.16.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"dist":{"integrity":"sha512-XPUPRnnJkGbLCZZMwLRSNGMZgxlC0n1LYIW2CXuH24aZIcTd9hQP09xc1khs5STMZii6q79wWx2hg6H/oZDDYA==","shasum":"09117b018bd2c5ff9b77b99a502bb377c845fea3","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.16.1.tgz","fileCount":15,"unpackedSize":22974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezrjlCRA9TVsSAnZWagAAUyMP/RFo1UZO6/UbhSgvdEYn\nwTFl7Nar4p6K0atrc53m+bm641EIJIjO50IiNF60t+yf9CrQyxjhzziknGnc\nMYt2S4KlYzg2X10IWtDhvT46YaAxklPFlIDYb/Ft0l45IcL+544U06CwWyAd\nUPdnXwXlLpNiaEICkrKMifrHRZRCahco13WGJOa029/V9D9838AUzw8sxTSm\nqbc36oZ6gdLhKMHsrXf+X6Y7Lgqleq5lBy59MMgbUwvAV2KJbzXDUvq8Enpl\nbcfT2nq4xssrFmUDcOnYerxfO2XlkToHyw66NyuF6Yxhhuagf/kSqTQ9sI8k\nO/XlGLeq+K1f6KvG6GkmG/S0PSQNeCdBxEex+AN4xWkkc7zIMwTm+dIZBH+0\n5JndjRAdZ123i6JP4vCsIl0aRHoLg25wu1IDBAS/LHYR0DthFbUq7uHS46hQ\n3wZ9m7h4SXTYRPpIJp4aP+iJYkiHY11Fekh38aHmDLriMaBM56JAo8wlsPCQ\nhAOA0zog2KLacwoovRAo+v6atAogLnmBS6Dx0N2dj8VNI24GwKWyCMNE82rt\nE3LxslAkMVf+OAoQhdLbd1NwFHGT42llg0VMfn6n3ndD5rB4o7/fN/Iwn4Dc\nz6S2bZCjZDzgKJijUtOSdOeR85sH7U6sCIQbOVCvIQtuv+cLwyxNWeM1YHDD\nSRY+\r\n=A/K2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQIQiHAezpssKXARDpdtPRfFiEmIvWuSviUkQl4mgHHQIhAM0ne7A+c8j9jCC1IpxD90hWfrdSQAHTwm9+t4AwXc/w"}]},"maintainers":[{"email":"pie@creditkarma.com","name":"ck-npm"},{"email":"hightimesteddy@gmail.com","name":"hightimesteddy"},{"email":"nick.nance@creditkarma.com","name":"nnanceck"},{"email":"UGAPiro@gmail.com","name":"ouranosskia"},{"email":"riley.stroud@creditkarma.com","name":"riley-stroud-ck"},{"email":"samuel.breed@gmail.com","name":"wookiehangover"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.16.1_1590606052614_0.1605447875413748"},"_hasShrinkwrap":false},"0.17.0-alpha.0":{"name":"@creditkarma/thrift-server-express","version":"0.17.0-alpha.0","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.16.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.17.0-alpha.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","_id":"@creditkarma/thrift-server-express@0.17.0-alpha.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-8+zmHs5l2iiK93ZNUCebJ/1fLRNCiHpc4QgzQodx7Lvflfu/WbmDakBbZnqiu+McnHyC/uUhgyDNUJDEDMa7gA==","shasum":"0b63d5005ec9aaeac6dca17de33ee7f80dc4d3f5","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.17.0-alpha.0.tgz","fileCount":15,"unpackedSize":22990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZfNcCRA9TVsSAnZWagAAmEYP/RQyQC+56uMSZoHISdKw\nakZNU7CmgxjtEz+584ec9/+HdyToOEeWeeZppu97ZP5VfTaI4E3bLIpATQiB\nCpoZJEScbk1jtaeDwXXXngUH0aVrf1cx5LjHvjL6X19WDAZIwxDZ66TBrNTJ\nVXGGjdhODB/rA6PYC02Ubdz2itfd37kj1s5KwP15gDC/9HrR/EhZCCl0XbFB\nb9hoL/UpbrXDiaMCQyc7hxzwxb0GPBTJtMRged89DSrddQOalfv78jZuV9P4\nBbhw6Uj7uwaPIFpwZDuYaOI/Dnqb081aMaMKRyy57qoqPEup3IifD7kygzsm\nXbBD2d+q3ghz8kPe5Wok6x6+ELBvMgxB2mpO3pjyR/+16ojpvv783Zdlr9re\n9QS2YbP89Q4kGts/zMkCvJJDCsDxY7cGm4rPZpXonRAIJFll7Rc11wyRSuYg\ni6No/3IHYv49W0o/JNNS2k87U9cq2pCZUJ41vqpa5hXgV1S4kDrSqALJyCru\nLp19DPALXBPRrpzxwsELHYcHTG8U9Q+hYXIc+AuHJkcxBG5GdV9keuGYbUME\nVa4QR5LonlRTa2M0Yf13FDxuxabKOo+6BhaHKZGtk8qZ/+ohAM4X3Y14ojrD\nSI7dhDMJIzvFAFSfYTLNyWCRUml5UHKIvcDg5scA+4CMGCwvhF0IdQ93C60K\nE6hQ\r\n=TZac\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCecg7hUkmVmLe7dThJnD8umiKyXvx4hxiYDf5MlqC2MQIhAJs3hUwhe3vwM2ATR7GtXiNYNjxsLhchbBpe+mA/RSvA"}]},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.17.0-alpha.0_1617294171805_0.747889436051721"},"_hasShrinkwrap":false},"0.17.1":{"name":"@creditkarma/thrift-server-express","version":"0.17.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":">0.16.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.17.1","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.17.1","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-3S062q70bzlcUeMCLKZontPYLOM5h7fVVzNCNJSv9CaKYvc4Gc3S5G4IiYIPIlL9RZWMIu86lQPKdXfYc6fEwQ==","shasum":"4d7b5b09709aa1d43515347f91486190a223509e","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.17.1.tgz","fileCount":15,"unpackedSize":22975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ6nACRA9TVsSAnZWagAA4XQP/jJEJzFvMPPcKioJ3FwW\nSL0d7/M1WJMoGxhf9PioZejbGkazWlR3IbV2YRfsqUI3U3Fc14/IEnNuqmD/\nDBk+OJC/ysZYMg9n5/kR8ivStdZtwozLUrqV3mRyIgcU+lN5pSjVQSdwWEYK\nGKCkfZF022haNLSSlZGfwOZVtl5MCF8rAy7u007KBNZME6ZbLafcbduqFbmB\nCGugJqnxwX1XhfHvXN00FEirurcM2H3SioHMwRpIqMz58hJHBswpjhFT3CGs\ny/5A0tbHErTOTs0R8qGZOfdr+RIzKTlt+Wbk5K7uJHlgtydctM4qXyovEnBi\nHfmXcXokN7B1kXdZUUe1OKJpsLA92yhGZEhX+C5Pxp3vEedBHKOUtyPWnqgQ\na+icNBd/zXRBPOjEn/A0XwQ0m3pLb+YzqKItWz5H3dVkUQaENHfqCo0UDpcG\nIN0c8eTjmG/V8H2SMBw0c+jLzoys7zNqE1Ow0X7MpJHQ3URE0VEHFs3gEhZq\nVeFL45YJ1X+hvaEJJV3cdj4QSNFUroAHGnkePXaWP6HPucy+vgY9nRBqATmF\nszQxNJ+3A18pyq42TjVWUnDcSvc7aNilLX6QYMBoLMRM2EaMY5auFJdBtwUA\nf+XtUtU92rBYsJcUISaNysF0MYKFvPIMLxcWjr7Y9BSU5EQaEVOwoZJE+Ma8\nskIN\r\n=/1BF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4pSkfAdLXw/7++fRLWUvvMhIWFmwJCQ6uGylQ1p7/agIhAPiCD3h40/9lzt+ygO1UcfNOSH6gKHTOiF2DxdWvg0Di"}]},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.17.1_1617406400238_0.34170899017638035"},"_hasShrinkwrap":false},"0.17.2":{"name":"@creditkarma/thrift-server-express","version":"0.17.2","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.17.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.17.2","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^8.10.38","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"3.5.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"_id":"@creditkarma/thrift-server-express@0.17.2","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-3PmUO2qgN4KonjELK4Dnmt2D3jUg1tOI1WMfMlSHCwUq7dYPbnIQz7YF7iYAt0Wlq4vkMn3fFXHH9+HbmP10/w==","shasum":"3037c7e4b770bcc986120b8873a1a75c67e9cfd7","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.17.2.tgz","fileCount":15,"unpackedSize":22974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ89nCRA9TVsSAnZWagAAPGUP/R1of7rOngZ1g6jtIprT\nZVhqBhZjteN554z5Kjd41lByksBK3O3o/aG5JaVEuWvWJeu+YFTpfla7Do6+\nLW5EVkiekWOi8/fUn4/OoNNLg7kyPSSQCS1WznnJiFhEJnVA+rrvfusGaZAI\nMRuxkkPpaz7kMPyTwX6bRXy+hYL32BssraqcRQEkRwIWTapHHoSDLYZHtQRg\nl2f+Y9GglqVlTM0rlkX+XrUBlcbiJOan+h4fhPLyc7lAIsZnXlDO/ym0gqMW\nvFl97cirBvjUCsURonrB1QSercNh/DjTsR5Y0zxIUaFsO3Hr4s8wk3kTAlLR\nX1vLfS5af4TV/O+9Sjk2LDQ0vLFKCOMQ3SDlKpFZ0ikH9kjL+SqvZC6nzjYo\nnFIzQKGqmVytyLq6GVHeKwm4Q5JFjPE8LbXGmMQeoL8ImbV4ap8p/4CX2BRm\nWihUNsLtUyJcV8g/N97zcpJRyl0Hg2XOXJdVErpHWvuORdZYInYqdqXUaJHz\nrh1nK6WDt7u3m56EiZQF+6SxGaVvZQm3mdt8UJ2gSycMl9DNhaan3kIRpyc8\n1IGGR47k5CsjfSJm+LIzqxfe3Lx/HWon+fIaN/JkMbnuseMKX+DZcI3zzy2e\nFaJQG44f9Aeu0CdIE2kOX+rJprGIxOIDzzf0UUmHpQqJyS5b6loy9Yi5Cix/\n4AXf\r\n=c/zx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICc1VjtGETCTwYpnFNghFVrgNFVxLHx5FxziZpwEubc6AiEA/xgLTqnue6Aa4T6SjrMo3iGdKHJ59B9HvOViya7gANo="}]},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.17.2_1617416039132_0.8292111622065641"},"_hasShrinkwrap":false},"0.18.0-alpha.0":{"name":"@creditkarma/thrift-server-express","version":"0.18.0-alpha.0","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.17.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.18.0-alpha.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","gitHead":"1a3cd5ca4efeb0919049b47c3b5aca4747ffa0b9","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@0.18.0-alpha.0","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-UMAz0GCAPZ9wiK6kwEpklPYkBl49OMxHJgWkqF1NSNyB4/oNy9PWTa5dCfR9KlExLPoM1TOwuTSfwvQ7It6CXA==","shasum":"ac8648390e8ae4884b6e9bb34a031f59caab9db2","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.18.0-alpha.0.tgz","fileCount":15,"unpackedSize":23823,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA7g9Z6p3CB1+LYAtGKr9U45WwMpanbm/0hIPATRigcSAiEAxWMxmGCbQM9YkhSO/fdXolfLt+A4vim6XYlEYQnczl0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifobsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqfvg//WDJ1FAq7jvKvgpfsix5bDHeE03+wtwEv3du3IA/hbAsGNKbk\r\npSHJUWNW2sn/2ENkerjBwEHaHXt1nCfHGp1DCgwQgjYgSTGUI/BRdrZkCEIP\r\ncZh6MWgzwE+SpUlsRDdLNPBMhaqI0lZ8bWz6GdFHDaIZAn2Il+fKbu+uAgdY\r\nVsqq0YwHEovO4m/Dyrb46wXKtvvUxcqXWVcifc+jXinfg7ClrX1LDAbKNGsr\r\n1zytw0y2etivKKeQzt2F4tKp9+SafAhiwTeD49bQ6cJEA7k21Vr6KrXxfPLV\r\nYhz1BMiYcRaDWPWjHIZDp73SXpDZfiuI9EIg3RtAJ8vnf3/k70vOgX3YetRH\r\nOOynWUP8Mg4SoxlIX7TOHb2iD4whiAbidiqi/WxemLI8KyJD4rBj5StSQxsl\r\n7gP0zlwO6eov8Cznk/4+4YWHRLVTAC88BjztpWhUUsQqRyGYIkZiRAHjcHGo\r\np4LvmcTvR+iL7ZYpdZVi/PYaUllj+T2OjQAo8d+/+aQ6SojIUZct9aRoynLn\r\nVE2qDHet6uQDPRKMEYPYechrdRTOOJrOmpmOIWNB+FIxsLF3gNmUe+5//UBP\r\n3kEcBPOgVoaoc61TQm+sqWtKdPvmN//t1TwZ5OjwQR9zilEBr6tON2JR/Uex\r\nDM5ad7GgVAR13sDzpIEyOe6bbBfZ9vgmCJI=\r\n=NN8Q\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.18.0-alpha.0_1652459243718_0.6945290494780512"},"_hasShrinkwrap":false},"0.18.0-alpha.1":{"name":"@creditkarma/thrift-server-express","version":"0.18.0-alpha.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":">=0.17.x","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.18.0-alpha.1","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","gitHead":"936f7fc6ccf32ea9155eb008004359ac23343b6b","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@0.18.0-alpha.1","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-qR6D66Ro28SMVt1MjqA1qc73i90sl3vbLBtGbCdn7gWD7ynwMnCRpz8zPSv+Er9JFOnLpZxPk4C+wAGIltqhXQ==","shasum":"80b3a60486611573a412127ce739ba0e74febbf0","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.18.0-alpha.1.tgz","fileCount":15,"unpackedSize":23825,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeubmcIlmpIyDbLow8NmUXCE9PtX/x2I3+nNDxxI5M8wIgDmi1paCNwnRTnxHZSQQxIu5BRQS04fxNsL5swUjqeVw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJignQVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/wg/+LfpOkyWinrVu3jsN85V+/qkAS2lPLFi504AwDTEBChKfqy5s\r\nDBdL6dgWdSBDbKYJGVN6AC/Q/gyCGAIPRVSIOAQ+Il0yBJQVQuN46o8ViDoi\r\nyzQB+Czu/1CkAVqhEv5HpctIT58Dqibs5tHxn80XYe40MQuP0zDPKcSMNWEt\r\n3slyEWHbv/8Xc4YhoTr6Uan8HwMZLJIRgQT5N+KTpbUYq8Kt6F5lhmTvP4/n\r\nT2csv2EA5FvtYjSR9Vyj0DrzkxCort1+gsJlL5A5gT2QlsKcTcltV79iy2kL\r\nOchOlzU1dazn0xgDvgPN/jVdy6KVtTijq9LirZnpvOu3cUmt9lnCUhQCmPxs\r\n49uqAdauKpRVtqOG0FVJa9C+0cb2wo8xttkX2Kswr/3fsOpm1d8gYUgorD5U\r\n/wdTCwkvyj30frIEwSU1qACpRatd4xo8VbQb2IfEkIBITcSJpPxFEPZtMyV1\r\nxzBceJmqP66LSGURq6y/Kn76ZouxMhmhjWIZI2jetQqe3kW00/ljJ75m41Qj\r\n5VcKrtRQkA8KlY9cDfUGB0njNkMhHmh6Lelnb+agImB+oUyxjC9gj4D3oN01\r\nKn6n0uVCUmJCnGV+h0x95ZM/HU8cCIxjxLhS8B96/+BRUoZUAH2xoniwIxyn\r\nsbYFPCPas1I5DJI+Fr0kjX4KXvyDNN09Cqs=\r\n=W07l\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.18.0-alpha.1_1652716565768_0.2867125059129838"},"_hasShrinkwrap":false},"0.18.0-alpha.5":{"name":"@creditkarma/thrift-server-express","version":"0.18.0-alpha.5","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.18.0-alpha.5","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.18.0-alpha.5","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","gitHead":"1eaa8fc1016d0ade8d38ac610eb497837a8be680","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@0.18.0-alpha.5","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-f6j0etc3A9dwyMlZRCZUzg5vWTMr5h4o9G6lcMxgnj+OIMgWZ71qW0sDKpO/d6tzguLlTqiynywK/ODtsVzi1Q==","shasum":"e0371e4934fd369c84558eb53f1b6b547fbceeec","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.18.0-alpha.5.tgz","fileCount":3,"unpackedSize":17644,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCD4OELDi/2EtIEiolkZiqtzpzS93GVhcfXNkRsmSBbHQIgR+TZjDrSQdlbet6XwgrfmLpqIj5o6ljSO8beA3JRgRc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJigrUFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFcA/9E+TWtZqwq+TmJ8Wp1aiZ9MBrf78IPrsAXZ2PRdji0Z4V0irf\r\nby5The6cQLhYAPVPQmkOkKadRGzpnKURhIofu6NBrQJYfgcuIT2bdNQMIaTX\r\nr+zDQTBW8+biUwngrIG34U4yWoy8FnRdMdBliZ+0E/hEVrZIrV1cqKA5DYRI\r\n7+z9IEAifpg/xblK8maF/59mRAEXdx0uzZ+CnRhQTk3ozeXfVcK2SIA1v2I+\r\nDOQIc+Sii0FzFc0gVCUdCjUSbXnheqgN+1uSKam7ggEx2nzUrtNGOiaiuEvE\r\nef/tXLQ4UIUTi3CXEOzCyegzaL0l3dYjg+6p4u9sINHQLmBXkZuR8nM0XV2E\r\nlg41j7letiBohLPTH74jNwj3qhNyLNYBJUuNteqGaa8mxI3ZXk8sNKNPlaXe\r\n40h1BqoBQgJzd6/rEq1uqwVaL7hbeQ0qYSOSWbipNc+iaNG5uTHEmDKcGvvL\r\njMdI9wgtrqhGIsFXkUzKkTFHp/qE9cUNWhj9K5m+F5EyPPprNoWHUuwwqDP7\r\nDXq9MAzEFkBqJWSs3MQ4QG5zwMII7FLMPFJPfyWa/vqr/7YDoWBz0PTpXI9K\r\nQr1lOYZNzVZLKYA+dmoqL1wzzg0QxuJ3Knznvl9r5kG2/TL5v779PXUHAsjx\r\nn4Igo8tmftQNMhaH2RQ0uOCfi3ZTdpK6esw=\r\n=lCeq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.18.0-alpha.5_1652733189232_0.5781551021591051"},"_hasShrinkwrap":false},"0.18.1-alpha.0":{"name":"@creditkarma/thrift-server-express","version":"0.18.1-alpha.0","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.18.0-alpha.5","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.18.1-alpha.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","gitHead":"806fde6a64d9304a38d5e90ee61c93c06432aae1","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@0.18.1-alpha.0","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-qbaKEnqM7NV7UQPhgLFMjJLynelDOW7jPYxlbuYhJp6QlKwNcS1GmhAnB5QiszW7ENNIQCTcPsRObIJsJmh9wg==","shasum":"3baac3c9a5f322605f3629dd2e81ce51d1bc87d6","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.18.1-alpha.0.tgz","fileCount":3,"unpackedSize":17644,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQd001SKdt5gzvYnfFaKgVx0vVQQ/mg/qZwOC43/2ZuAIhAN+/4wm/nEeNOZPfZFPejpotJjnxJ86DPK5CgzjLAvPg"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihC+iACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmozBw//ewlWE5w9s7vyF2klNDDywpU9omgkSKXmy3QK39hqcQ2a5JFI\r\nGq5c07aqmeUGz7PebPDq7eWaaGVTc6E0we0GG5ckrFD+z60VAe3Z//ZBkIRo\r\nWq+3DYlJ/jd0u75J713ZJnq22kz2Z77/TIvkJhEeNTSTZHKB6DA97k0eDYMZ\r\nFf8cmzF8hm025QAZMzaY3JPfALqPBnBhySatKS8ZWNwpj7/tGK2rJ9G8OybR\r\nJj1DnhUnUbIPOntlVoUtUFAuIx84WN2xwAykA+bGrcox/bUGMlDGas3gkDgH\r\nR3yLsPXcdLFKgsogB4z4NAidlQ3ZMOYNhKLUxmvcKVLhr+WbvalN/ZY0CFxf\r\nhDP5WCQuUt4k+cx5j1U/+Q9XAELAUg1cX6yWTNTMhUvnypWsBjgv3WLHTVfb\r\n9x2etzA54dSLc9He//4DMJfie4qAompktOY1RPc4BnXU5JzPEOBSLyfDPtDl\r\nAqS4C01GrnMS11cvzTJy2K0gxkVIrCP0UTWWgKQeh1E9caPI+Xr9Uj7Alqvu\r\neEgHot+49iPGNsKAxmO9Zo4umeSqg98+g6rO8vsYuwPHfaGWHPzgbKHuaNP1\r\nM6fy3Brn6XkJsUe/CvSOVZF0nu/TgKm/mcrquQjM/fK/BU/dbN1uFneFBuZH\r\nd46fKYAX7YRZ3KPXcGG6+oGWVrnSOae4/Dw=\r\n=JIH4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.18.1-alpha.0_1652830113910_0.05456069674535535"},"_hasShrinkwrap":false},"0.18.1-alpha.3":{"name":"@creditkarma/thrift-server-express","version":"0.18.1-alpha.3","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.18.1-alpha.2","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.18.1-alpha.3","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","gitHead":"cca6d2eace0ca1cf84dc2f80a11a01fc99f0f625","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@0.18.1-alpha.3","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-dpIQf83ARf54f4u55NQ4Oizv+tcvoPU+T6Kqj938mGocVIxFFW7CwX+/9hlWyTfbsGeM1V9nMUFEylzbZCLTXQ==","shasum":"6f5bc9ed0a8c070238819ed80a8e54d5e27d52c9","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.18.1-alpha.3.tgz","fileCount":15,"unpackedSize":23831,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8liz14L9eyo+kVcUkplqxj7r8X9259EfZ+zfWLRi+CAIgLtpcC9Mc8khha3ufEATn92szrrBuHnFsW/96UJv/+hM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihDLYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWFw/8DpXkMO4rordb4QlV02DQK/1w2nvSLzcpB1C9VL649Y3I9Dbj\r\nQQTzbOHUfsYf4evSlqpWvGzg9dHAUV9AHEx1DPwJ74g3drITeggbxlFoOHre\r\nOQEmQ/NnmqBRIvTc8bqX+EtXdUtReAnRG4PnoMJhG/BV/vNK0/17Z2KAkl1D\r\ncqRBCnR/EP67CCH4qUdBXHp/i4C/9//fefjRRBNR8VKCT8QhAkevCqZYDBWQ\r\n5oPBJMobQRPM+ce776tWFPcjRL3ZcspwmdLRNvsk8mPB59jVdnG2K7/+i/FB\r\ndYA5W/EDcxxVVEUPyBAZEzOkPp45oNscznDR96Bnrbad1D/YUnTc3ago6xLG\r\n4hmJZS5N/Z0brWxbLi8DhE4tJSKi1m2J6MR+T20lazb1vdK9YU5NnZWikhqk\r\nJRnQOTLwlki7mW30RrSwMYNYiE384G5Hk+hhhq4KxR4vbbJbjZugqocH8Tg+\r\nEVssDM96yuJjjIPjpwKRoCl9NcJXdGTzA4rEhQuIkJtrcXZuwpcD6oXnK8I1\r\nOp5W0jxTPXJ5NU1P95NhhIA7qDWQXOp+IVXpQtNo2zId67fpr1+2ZdK+oDj7\r\n3wIPWFCOq1YLhULzYbJAdx0BgAICRagXshHAqZFRGU93ojgBATQVKijEjXuV\r\nP4nIp5wB0Oqce89j2SkicAIfcxwk6xUiusM=\r\n=yScL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.18.1-alpha.3_1652830936493_0.07322623604059109"},"_hasShrinkwrap":false},"0.18.1-alpha.4":{"name":"@creditkarma/thrift-server-express","version":"0.18.1-alpha.4","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.18.1-alpha.4","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.18.1-alpha.4","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","gitHead":"3f291032836e710508d829df5a0e2dd04a37b375","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@0.18.1-alpha.4","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-KS9MVauk5dKdouEz3378S/PYK11BeEfb2I2mjTD8GIao7Vhiy+YaXs2OEFb+ME+EWwyHdsQeTmtQ7Caqu5CeHA==","shasum":"381ae9a65ebaae6a6855bdffb63c55e11160dddc","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.18.1-alpha.4.tgz","fileCount":15,"unpackedSize":23831,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAKxQKMoIF2QCJT9BFc3kKE2QduLkFtQt7NfZLXGVzoNAiAZ0HsEI0iu8MKx62brO+39ei3rwHcWiT1V6pulERPvKg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihDSbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoG/A/+JrB+f8MD7zZu0jfZVGT1+dlwR5swXNN8ULuPXzpHWciqdAdE\r\n1YOSs+S6TzN1w7+/cms5XvRXAZAORVkJKnx5wHaR2jLUOPcIJ8Mm2ewpzBnS\r\nvpVKmLShLk8lqHam+s3+PvaWN1sNkwlwL35taixaqg0tSIR+MDgEfJ1MOpnp\r\nN5gOZb3h67cQJIt/c4r7CEQfaRaPHuHw371ZjrDjxbSPp/cDm2gGDTFz7HnN\r\nj9leoxAMzKzyEN7doWicaIQEm2xLK4TpwPpiq0z1rtlAcw0cAHc6a9bOlQY3\r\nXncQHYeMB9N4r5JgoFXq9enVgMGvquPaY1siyUMGLbzQLbBPgw++qCWxupJm\r\nt0+7/bmffkmMK50jeUz4Y/nzzFlKY8rt5Kpihy8LnxAneEgjBxJ+mIFLTsqX\r\nVVFJHcvMFTAmgyIbuHYQ/YrzJfNQro8EBPAdCU+TeWGIqkEC18S5/e0RrWZ3\r\namBySWA13aHzhlFXzazDUlPPSxdUaKJwgluVAYj7jcPPSRDMfCtGviEAPS9E\r\nqhWObN4nfGlEs2fOtOdeYLuslonk3GrQ4I/S2XON1dvKrT7kBgWNxUzUXNiG\r\njggI98YrxN0trh9Adnbw6gmgsjXc11kx0GpPApvwJYs2EPtRmzc9sTSrMEi0\r\nk9LgZnBpI0tPUfQRvssB4j9sNMO1DqgFnas=\r\n=9diw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.18.1-alpha.4_1652831387296_0.7907802666706389"},"_hasShrinkwrap":false},"0.18.1-alpha.5":{"name":"@creditkarma/thrift-server-express","version":"0.18.1-alpha.5","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.18.1-alpha.5","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.18.1-alpha.5","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","gitHead":"438ee54d27c7234d0a7f5b4ac13bfccbf4b881c1","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@0.18.1-alpha.5","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-SF4/Hg2F16pzi3celwEnU3NYxRw2fVqeUcYk8JCf7i02+PIoBI6uq9dvetcu/ANQYFnnSNzFTA8gAkFPPzdpBQ==","shasum":"fb00fe940a7bc4532bbc54fc5b9ad060472c37ba","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.18.1-alpha.5.tgz","fileCount":15,"unpackedSize":23831,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDo8WEhCk46R/sGEmote2FDhFMBOWgpLHs61Wwda0S3LgIgPNJrWsrALak/a5fzXEc8KAsl5w7U9eTFaN5zWiiSBbU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimU21ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpU6A//dxF0EQEwH+LcBfHhJrCm1dfi03tVS+0kEcF7j+b8tqy47iL5\r\nCVSWdR5SuNkrGuLmAs5egyVG3U2Rgo4vhmirB0ft0XP6v6NtqxGA+42dW/VP\r\nShqxMKzYleMZfzt7ci7iM6YsZDrP9Ju1wQfrbj+DKwiNilF9UT7dRHEkq9XD\r\nz4HD0YNkjjPbwoPvVHfwifd9XC5GErVE139MMGNQvM0O5Ua4zKMZc7zgsHLd\r\n9UENlos8B0/VyH7Q3QHHtoJaMui01MCKwVT69DewykySELN7eYv7LIiCUAI1\r\nBIB7W4UKXdepF1t4+NMGFtQWrOHCh9qvj4DqJOHIyRkrGtkb/7fZqIYqClLA\r\nz02MXN7JF/kNX8XBtiyoYmWKh1s75+PrggFCHqSPEj2LUGy2Dy8rFh06AIJc\r\nJJRCrWaB4YUgHrbrILeruz3Lfubq2PsV+15q5P7QnDlSOhQdqwpbgQVyMxyq\r\nKQlwmgynDPFMivbgIWddCHMzBKv/h5GDKQCIN2lh4OMzwZ90OZOcWbitpQxD\r\nz/ILULyyYKc3cs9OLPwwk6WK+Um4jJscDV8gdpRIz/va6KcA07OH42pCFpOm\r\n2KMhiVwA/JK0VBNpKCyXAVS1zhducaD1XY0z5lH37dk/UIwumTVInpMJrKHV\r\n9XHwCkAkPtL4qgO4SYhqHUXfuzrycf4slNs=\r\n=Bg6y\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.18.1-alpha.5_1654214068911_0.4388427343899661"},"_hasShrinkwrap":false},"0.18.1-alpha.6":{"name":"@creditkarma/thrift-server-express","version":"0.18.1-alpha.6","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.18.1-alpha.5","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.18.1-alpha.6","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","gitHead":"9c77845a0b15395f2c219d7844ce2963eb8df773","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@0.18.1-alpha.6","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-iYvXo4QirqVqWvuewtuOU6q69jW0bXVH6BzoRohunQ2mKHui6af1mUOzZcE4lk37tlaxm3VAZPGUXmeYfDUbkQ==","shasum":"1ebae3b8d541d36090262e19a4b9dddce09cbbf6","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.18.1-alpha.6.tgz","fileCount":15,"unpackedSize":23831,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1/js0MWL170Y/TJ5F8q5o7iKksnQL6+2nEqq9uXtMDgIhAJsREX/5yw3msckUvnn/jklro/AD4QXJ5LYUCW3CWyxl"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioOhKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNEBAAk6bnzI+MGxxKrZnEVTbepQeaJGddCRcZb1NUO0hRWuXMGN5s\r\n2BiqWuN4H9IM+LYv8D+Ch//a+SntXSzgiWFeTEoKlHbqBS5OKxWslf+Zy4GC\r\np/2xtVJFDfnA1wd1sY2qNKIxrJ7uLu6LkHt9dlHq7Q9lHtmdD6yiOSdwuyq9\r\nnTbRQde+uE/N/EUOxS6F/+Tb4ipeTpA26MmVIHXd5dlKi2BfpNA6aBMCKoE0\r\nOGoQ5vihQ/jhIvpbhHltqhvgWaBTmO1CHgBUqufn/ATDW0TPGMXTNGafLHse\r\n/SsBPn1xHLC+h8DQOqvJx0eM2+Y9yI/ghYTkREFqs3I5f2Q1afKNhm4reCFL\r\nRUR0ni7ITYhiFSrf/WbiDxGBQSvXjRqKMJd4BTdDSFe5dYTVgJprretj+rmD\r\na901puI4wkT2SC8gYkmhcWxbpn1gQXLziXCsn/hzagUNVdTbsmTOf01tsyyc\r\nuGoRZnHyb/mSdJvdRlRbxe1tasqBABEQJFx3RBe4ycJ7m483nbykCyEY6SX9\r\nP+ZYe6Zi8Du2KsYT8B1juBZUDDTSqaguXbqCs068aqnEiZDjpLa2UaSeOGoC\r\nckOeL2bS7Hrq6/3o31yfrwF3ksBmIjSy6qdlOvjiYjzaPQAMo8tU8kdd4TqW\r\nvgK6jTI7yE9iFutRYPAYM6iJ5jISMbKgIyM=\r\n=w3Ty\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.18.1-alpha.6_1654712394535_0.3425658943705012"},"_hasShrinkwrap":false},"0.18.1-alpha.7":{"name":"@creditkarma/thrift-server-express","version":"0.18.1-alpha.7","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.18.1-alpha.7","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.18.1-alpha.7","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","gitHead":"833898a2c75c4b9088a533ebf8008d392eef7b26","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@0.18.1-alpha.7","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-vrm5oBRZQf+LolqTZRuxYgjpBtj2/qg11RFqQPDH2HFAARxwgYm8hY1gKlbVQl3kExs85PXNjW11wRHzX14HjA==","shasum":"08ff208e9259c3e6137565fe1fbcd0806e885d08","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.18.1-alpha.7.tgz","fileCount":15,"unpackedSize":23831,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1iJ8zi//jgggTJEgIRMfigr4Bc4cJDblI8+9XmA6flQIhAJTamt+/y3mM7kvc0/186Nr4ZjYrLu9MUwNRlAR4U992"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioO7lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmphWQ/+NiGtanTxcrFRQAB8bwPB3CX3lrfwe0qDOH7AF2FJ3bFRRRYc\r\np1g0URrtiwHda7lX7imy0G3ZDisPYh2K3Bnmsl57EnD+ND7ePvcbawG1wKrJ\r\nQTv0Faxcpyy/PZILPC5OFwzehDUnacQTnmKdSJAnZN93w4ENHrc6ETMSl7M+\r\nnOfsiICzizP2tVF3ysWhR0xzv6Pwd4ejMdIFEVIHriCry/PCa+hb6wAenn2y\r\nZOMciTuMCuJbNFoFY5XrxW/mQJKH2MSb5l+kZzlZQg1rF9hk+QjKN7tF87gB\r\nSEso2Nr3w2npPMDH6JWsX382649TWQx6x0VlZJh0SJnOoGVcQMuNHZYNHFlM\r\nF/FJzOmauX7eU5KMHK76HMwXWoCWnIombBMzHvjGkER8XXaEcQfTHcX7so0h\r\nySyT37q2xmWQNJbk1Xgyt6cPJRbcOmGh0MuW+H1mUACdIiFKOSa0wquAR+hU\r\neb507TsJQxI684niSej78CyiaHNY3MYwFq+qGqhwZLO9E60awtVXMYYbO6Q0\r\nt8qEbBe6mX0YiDiWUNTZZ2ceUZDjwzLkICxDw7xSqjZq/UCBaElGTrmrMRYH\r\ne8QxubkM8idaAfnmn1fFzxNgoFLZjDQXdMmgSk7F6xF26aiQ+D29o56JCV8G\r\nO3XlKaIDduRF1AXiKiWhlK7HraDybJ2QZnU=\r\n=r39W\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.18.1-alpha.7_1654714085679_0.507502183179511"},"_hasShrinkwrap":false},"0.18.1-alpha.8":{"name":"@creditkarma/thrift-server-express","version":"0.18.1-alpha.8","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.18.1-alpha.8","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.18.1-alpha.8","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","gitHead":"608135313f757a77824ce29de90264d9388acab3","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@0.18.1-alpha.8","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-VgHLAjy9Ajv9ekMY4gu9I79JUt+2gsshKDv1hf1VNLsG8+1FG5+EY3brYkQ1UuubSpG+rCgmCRqh2rAmea+FKg==","shasum":"4a89bf576a2fea38d4dbec730f7fe85c24049ad7","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.18.1-alpha.8.tgz","fileCount":15,"unpackedSize":23831,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4s3NYQWfBXKnf5hUNL+pZjNBcXP3Ys9vXsID4r6eYaAIgaT+KuPmd092Mv4kumaNFuz828EZspkEFly7DRfKCn80="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioQalACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpcLhAApCtg7z4KNckrOkMhntR8iuot+hARhQN2KOIlZ9syUHGg2osN\r\n7DOOqeqevrMWlgIRoKc1wLSvD3lAaDpnG1YTKxdh3wovO3F6rNu6B7u7O/sV\r\nswvSgBV+gE1Y6VA+CS6HrXYt8DBDhvNxrodvAuQ8jHK5Wr4PioFNy6csbmmm\r\nJp+WqXJLbfVl6HE5NZjD/vakJbyv8QpcJrG9PdhlDaQvYv/oBi1aAeV9Z8Ou\r\npgbfoD48X9elLo3Fd/bFCpr6faqzpUY5tDSxcS5sypCjFJACSKU1tJFHv9kp\r\newWSNRlvWI9EZamGGLCzObeKXVGMpuo9tXGXl0WKqlajpp/MUN6GwKAIa7uh\r\nggLzZYHNZCQN6QgGthv+8RcTSSZB9a4RuOlk1Y8qqeFr8ralJPL+RpXPPJa0\r\nC+EyerQ3UWj/baj52Dm5TwYaapC1ui2pesSGymfSFgXionrghb4w2coF8CBM\r\nsEC1KtQyWq+fgDQUugKbBiIQrHg0xoni7+9JpGTFsDCE60fSXcwPzxpi+gq/\r\n9EVEb80Y9EL4FFvhMLbGdMaov2567D/OjD/uERmKot5KYe0vCYCm6AnfZQ+Y\r\n28ke6US1hmB27D3KhRiKJU+omemt9JuaG8Wr679qW10/Es4y9UCSOHDwjeKP\r\n9wEefmOXfCHxSCBso+38QjnkrLutqc/5u1Y=\r\n=xmng\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.18.1-alpha.8_1654720165823_0.36858032521458806"},"_hasShrinkwrap":false},"0.18.1-alpha.9":{"name":"@creditkarma/thrift-server-express","version":"0.18.1-alpha.9","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"0.18.1-alpha.8","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^0.18.1-alpha.9","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","gitHead":"b0c9fec3b7735e268f02163e7d1dec86ddf78acd","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@0.18.1-alpha.9","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-VEmQooBF6IcktTvOGQlQQP6uqSonNOcMsJJucb/+HdOZtIHwrvpqpuU9c4DiyHafJG0JI3/hmpWT5VPdL+FuiQ==","shasum":"7ffbbd08e4a1e94b6f5e059e34087ebc5dbe9044","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-0.18.1-alpha.9.tgz","fileCount":15,"unpackedSize":23831,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFSbQVVz2woThuzNAbzX+vUHm4odATO65blAu0G1LglJAiBiNNrx5WhBNeM9ch9DZZgwSiDYU57L2J3VkCiz6fkIsQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJip3naACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpj5g//V6GP+DXqFL3C+Q5wtOgUoIVUH4gQxdoIpUDKG5DHHo+Piy77\r\nEGRmpThFAINQPs3awrZF838/lu52+0YkdKukrYezXPPWuiUz2MecYRtFQC6M\r\n2U37wwMhivdM1F+KUPIPiRKXb3OX17tqO9AHiY3EvMOZuhXZgb06bApEj1jA\r\nGaWWJWnuwdnaz2T+OlZ41Jqk0/p0Hj5yuHDOIRcSZqCPfD4rg+kePGQP1dkr\r\nNHv4ddk+N3nCt41Fx82HJMlb24vFk7owJYQLAlY7azOyfOSCftpWMTdrliDJ\r\niCHcc3uxrttLhiZWkPFu+vfdlgyasFVSDNqkw+77/1WP+vogrxsZefGF1QAw\r\nmdct3DsFBE3Bz9H+YLFhjdleXE1BGxq4lTux8mRtOh61pk3Yq/p3uXwemVd5\r\nPLp76D1iITqN7MS8cupwtq0olrwMwGArUd+VtEuFVbb8M33vJ/QEOS6fn1tY\r\nLX1uuwPulI0q3LPX43C+JxJQnLb8/MNULV/1V7oTdigWBeC/DNZ3er+zf35G\r\nXpJw/slxugIE1hfWdyzZOjX2cqG5zLmqENVVWrGKZQiMGn83S8zMWiKMqp6E\r\nT6gb8p6qQZQMVye5lS+0Z7zCVbjw2+5NZZFVOXOncekQ2ZlzER5OiIpr8XVT\r\nj4LLLGVeUSWCh4R10uM8J8sar0rAW9/SBK8=\r\n=rca+\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_0.18.1-alpha.9_1655142874023_0.8244519696629866"},"_hasShrinkwrap":false},"1.0.3":{"name":"@creditkarma/thrift-server-express","version":"1.0.3","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"^1.0.0","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^1.0.3","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"gitHead":"d55fafa26ad389b578428abb3cd6bf1463269b10","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@1.0.3","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-6blhFVBj5MhVeOQG0B2lUUZGLAWAYH7RttM5HqegI0EbCKtD26Emv7rKT5f3O2ESbQhyaVU/XpQM683qmO1UBw==","shasum":"9ccea56954a11dfa1518d487738c4c3c1012f7e9","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-1.0.3.tgz","fileCount":15,"unpackedSize":23805,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZLHUFlTRVhXg4mZIXomT9pfLhSnaHIyCbhde+l5vGUwIgZd2gGM3YJiFMqNqGuhbrTWHUO0UmCqsIGzdHvIt/DSw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitkZLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDUw/+K+hrzq1OY+oUJm0wjs+qDQ9iju6zzM1JW85UmZgeJ/qP3iXh\r\nwD2pEmibR2Tidoajsiw5PIo0p6Fd1OuDqpMF0fM3VqQBUazH/V7wGvonkTXK\r\nFfbofvJ0rj7ez5lawQ7cVnlhm3SAvSQ095SvTSv91gwFPbXlGrDAnmF7EZNe\r\nA6I3Ivew444k6IYa822g2l+hhggNww/OuakvfLZBftxEOPxlgMRuaebBQYVh\r\nigHDdibmULP1Q1Je9vlZspXSmoIVrLgbaEn6SH6NvWNMkZrmUg7bPDfqdZTG\r\nAxsC8KNnpT6rcyb7VRv7VHW29m/Pp1zZQGRZoaflnfwyhyTCIUN33tEncIT2\r\n4naaHJq5o3+bBVagpIFB8yJL9pSxTh0YvDWQMdEuOp/5f+FQfFPMMAQXSUnm\r\ndkOuf9ilDsC/rqHV69QxcRWica9rzUUWRnxUF/4I/CpeEocUWbBeRpGYECb5\r\nrRMTgy1uDAK7HRhgOwtmVe0BTDaKn5iox3Y7GVw1OFaRq0fQoTFuUiCpArB3\r\nK1Edl0DVes5aRrEekjqryqplEYMwh/MhuX1r7wFRseK70zxKQmigoEG85y+4\r\nUPsquf8uEzYYL8WUpMi9LTTVpdRdAGN2d5iQju9WkQCP9fs9WJV70pD6Yw4L\r\nHIIXACTKNPB+ZDNAT9TWWyQTSUMYd+ljLvc=\r\n=A+7W\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_1.0.3_1656112715732_0.9368081266905068"},"_hasShrinkwrap":false},"1.0.4":{"name":"@creditkarma/thrift-server-express","version":"1.0.4","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"^1.0.0","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^1.0.4","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"gitHead":"e3f1e620734155b7f7d3391a5e0c87a1a24744ed","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@1.0.4","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-sbiIZsYnrQEyqjC6969XxZH11rftEtbjoHUrWRl6eePNiPwVF71YF+1u2mvwEAlfOsaCzbHFbp3h2xjNftqqNA==","shasum":"ae557e80e6c204cb0cccde981d859a7f245984bd","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-1.0.4.tgz","fileCount":15,"unpackedSize":23805,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID9HBKjRket+Cm4eljlexOGGvGicNlEDwQ/914eoTVPPAiB7e0uWD8PzjcpmUCVOblrtk3nYnijbPPq++M7OxnkdeQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitkgDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrvdA//ROuzbfBmQHssKHL0vokpRASHpGlbKrsWkToU39uNnvCeOgJM\r\nxeX9i9EAMVfmWYzgTqhO1UNrMwmMBG6u0VI1RedC/T0Tp9bq7N7hh8urVech\r\n7UssKK+U1LpNH18XacX27ks3z9PHUt5T9l4ZQ2KAX6gxQYD69bIkPHNh2XRw\r\nmNMi7s4dl7JAzPbjMh+LsKpdni6sZMNC0pK2cL7etWVJAbnwwIgTmYXSJU3s\r\nOm9pHwPaJW5nsv2Inh3TQG/PyM7MtxGjYisgBvg3Z9a26/P9HAWwFJfK5htp\r\nbd//7/njolSqDnwvT3tjJ0/fWl4c+iUP7NlhLk6919V8W475nlgG+4u15HEU\r\nebPAex6lCQoFGvZM3oJtpjXiDyWIsgm5X7DShUSmxeiJ0WAAneBxmU9iueWI\r\nANgyir7ju4SsljIvTcyMt0EsFsc06QoYe7Dbw/r7MoBkjcNB0dZIvwlA1ujb\r\nxRX24h14WJNZmEcDte3V6HfoXumGgh9B9oJ5d8PP9yzbsfxB9iKkrZhxEkZa\r\n79LpS0szhKrGFrERdohbJy1s3RLknSTYzdebOxI1AJxStaWkx0H+3+OiVLuV\r\nwAJ5K5M99c5AOv6vC36pS9RgvtMnaWmQeFhTt7HdGv40lFl1uI+xvhkFGyb5\r\nIcwdaVTgeuVtjBoNjjhXWxshta138aWvYtk=\r\n=Q+8F\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_1.0.4_1656113155351_0.3394867722509529"},"_hasShrinkwrap":false},"1.0.6-alpha.0":{"name":"@creditkarma/thrift-server-express","version":"1.0.6-alpha.0","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"^1.0.0","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^1.0.6-alpha.0","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","gitHead":"1e1eb36bbe546c9325be1a5174d7290ff142c328","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@1.0.6-alpha.0","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-pBVFfGZLU+Rg+ZOYN0THpGmxmTJSfEr663w1pN8gKmGM9agY6Y3boOr+SooTx+3ooIf1D7Babfde3vVG/eds7A==","shasum":"0a9e349199a026b1a921ea9b817ffb0cbad881c1","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-1.0.6-alpha.0.tgz","fileCount":15,"unpackedSize":23821,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDUROm1eF4I/zQM0vAyQCxROu5UrcNtCj+4omCLKQpudAiEA5ETl5YNuoAcsw/4ROK1x0Rqh6oD65f/hERpbO+1yCJ4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCP56ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrClw/9HoM/ldsguaV+uAz2KrEbcEvz4CFvDwZSflLSMNAdpCMbONmw\r\naZz1et0inE24Ux1OaZsCdlbXKyx3KXWqHZyd0gGdzIKY9Dv2kvyVrcg6ATtD\r\nEN0+nYkDH4v1wnnI43z0BNClsV4U5W4y/5VVBypYOy1EfiVktPxpSCrG2X01\r\n6Yy6Gl9tw9TH4csuJC2Fixhyu9vpJcUluYtyT5jtyMG/QzweY3h7Fk6wzmuR\r\nI4QgocNqGxfrIVOr+ivK37dOe4Xa54maKwlOIwt2TGr/leb5cMURBccy85ne\r\n1yomRh+uhNM4egXzuBbHzACF3Mz+48dKyELz7ca77f5f1wH+J4Se/+5IAxZ4\r\ncXVeLF0K9oa74xL1DnLAOJRq3BgriZFP9Dv23xyimBwEIeutu+CXdYlkGngh\r\nBy2JTQmbrAUUEuALgsBtjhjuqCY6NxpZHLvR9VACizsJKPODYhmnj2tJg03E\r\nTKW+e8vZ3lK0EGA9kU+PIyIWmV7NYSkhqC2n5NJb9dDLIpjkshX+2bTTti1j\r\ndiVV5Qs69+vWXiHI54UIWAaVQdR21Y/GjWg/28nVt6A0iwWxKaFTqSrlz34o\r\ngvO5mfXlBu883u1H807GDxhxJk8RxIYnUNJqel7TbtCB8rK1GmxHfzyNRkT2\r\n0uUwdBrJjVf495b6Be0ZHswGwyOBtv0LlWM=\r\n=+PAU\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_1.0.6-alpha.0_1678311034724_0.5000632593912613"},"_hasShrinkwrap":false},"1.1.0-alpha.1":{"name":"@creditkarma/thrift-server-express","version":"1.1.0-alpha.1","description":"Express server middleware for the Apache Thrift protocol","main":"dist/main/index.js","types":"dist/main/index.d.ts","keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"scripts":{"clean":"rimraf ./dist ./src/tests/generated","lint":"tslint --fix './src/**/*.ts'","format":"prettier --write 'src/**/*.ts'","prebuild":"npm run clean","build":"npm run lint && npm run format && tsc","test":"npm run test:only","test:only":"echo 'No tests for thrift-server-express'; exit 0;"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"peerDependencies":{"@creditkarma/thrift-server-core":"^1.0.0","@types/express":">=4.0.0 <5.0.0","express":">=4.0.0 <5.0.0"},"devDependencies":{"@creditkarma/thrift-server-core":"^1.1.0-alpha.1","@types/body-parser":"^1.16.5","@types/express":"^4.16.0","@types/node":"^16.11.0","express":"^4.16.3","prettier":"^1.18.2","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typescript":"4.6.x"},"dependencies":{"zipkin":"^0.15.0"},"publishConfig":{"access":"public"},"readme":"# Thrift Server Express\n\nExpress middleware for processing Thrift requests.\n\n## Usage\n\nAdding Thrift support to Express is as easy as just including the provided middleware. Because we are just including middleware it is easy for the same server to support APIs beyond Thrift RPC, such as REST.\n\n### Codegen\n\nRequires @creditkarma/thrift-typescript >= v3.0.0\n\nThe easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript.\n\n```sh\nnpm install --save-dev @creditkarma/thrift-typescript\n```\n\nAdd a script to your package.json to codegen. The 'target' option is important to make thrift-typescript generate for this library instead of the Apache libraries.\n\n```json\n\"scripts\": {\n  \"codegen\": \"thrift-typescript --target thrift-server --sourceDir thrift --outDir codegen\n}\n```\n\n### Example Service\n\n```c\nservice Calculator {\n  i32 add(1: i32 left, 2: i32 right)\n  i32 subtract(1: i32 left, 2: i32 right)\n}\n```\n\n### Install\n\n```sh\nnpm install --save express\nnpm install --save thrift\nnpm install --save @creditkarma/thrift-server-express\n```\n\n### Use the Plugin\n\nTo get things working you need to register the middleware as you would any other express middleware. An important thing to note is the use of bodyParse.raw(). This is required, Thrift must operate on the raw binary Buffers.\n\n```typescript\nimport * as bodyParser from 'body-parser'\nimport * as express from 'express'\nimport { ThriftServerExpress } from '../main'\n\nimport {\n    Calculator,\n} from './codegen/calculator'\n\nconst PORT = 8080\n\nconst app = express()\n\n/**\n * Implementation of our thrift service.\n *\n * Notice the optional final parameter, \"context\" - this is the Express request object,\n * passed along to our service by the Thrift Express middleware. Thus, you have access to\n * all HTTP request data from within your service implementation.\n */\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\napp.use(\n    '/thrift',\n    bodyParser.raw(),\n    ThriftServerExpress<Calculator.Processor>({\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    }),\n)\n\napp.get('/control', (req: express.Request, res: express.Response) => {\n    res.send('PASS')\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n#### Options\n\n* serviceName (required): The name of your service. Used for logging and tracing.\n* handler (required): The service Processor instance to handle service method calls.\n* transport (optional): The kind of Thrift transport to use. Only 'buffered' is currently supported.\n* protocol (optional): The kind of Thrift protocol to use, either 'binary' or 'compact'.\n\n### Thrift Server Factory\n\nIn the event that you will be creating an Express server only to serve Thrift, you can use the `createThriftServer` factory function to create a `Express.Application` and register the `thriftExpress` middleware in one step.\n\nThe factory function takes one additional config options `path`, the path on which to serve your Thrift API. The `path` parameter is optional and will default to `/thrift`. All of the plugin options are the same as above and passed in under the key `thriftOptions`.\n\n```typescript\nimport * as express from 'express'\nimport { createThriftServer } from '@creditkarma/thrift-server-express'\nimport { Calculator } from './codegen/calculator'\n\nconst PORT = 8080\n\nconst serviceHandlers: Calculator.IHandler<express.Request> = {\n    add(left: number, right: number, context?: express.Request): number {\n        return left + right\n    },\n    subtract(left: number, right: number, context?: express.Request): number {\n        return left - right\n    },\n}\n\nconst app: express.Application = createThriftServer({\n    path: '/thrift',\n    thriftOptions: {\n        serviceName: 'calculator-service',\n        handler: new Calculator.Processor(serviceHandlers),\n    },\n})\n\napp.listen(PORT, () => {\n    console.log(`Express server listening on port: ${PORT}`)\n})\n```\n\n## Contributing\n\nFor more information about contributing new features and bug fixes, see our [Contribution Guidelines](../../CONTRIBUTING.md).\nExternal contributors must sign Contributor License Agreement (CLA)\n\n## License\n\nThis project is licensed under [Apache License Version 2.0](./LICENSE)\n","readmeFilename":"README.md","gitHead":"d213bbef402a85ec849adaf93bae2c953d7c11dc","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"},"homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","_id":"@creditkarma/thrift-server-express@1.1.0-alpha.1","_nodeVersion":"16.11.1","_npmVersion":"8.0.0","dist":{"integrity":"sha512-+hIgr7fyap2nL2iZo5swjbzL9cEskb2ciMWsoF59vfPivcmJSvlXqE77B5j19XDgnGG2O6tv+DgkavnEjGc3Uw==","shasum":"903b325139eee298f3706d3e6e1d4f057c2dbcfa","tarball":"https://registry.npmjs.org/@creditkarma/thrift-server-express/-/thrift-server-express-1.1.0-alpha.1.tgz","fileCount":15,"unpackedSize":23821,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAmo1wTB0iViwu2P+SrCQRrzIuU3QYdasmeB7nBn+QxAAiEAp79jqPhE8MbR/H0pVlDH8VtW+I2O5exWWomJroWnUd0="}]},"_npmUser":{"name":"ck-npm","email":"pie@creditkarma.com"},"directories":{},"maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/thrift-server-express_1.1.0-alpha.1_1685987281628_0.9287742226595828"},"_hasShrinkwrap":false}},"readme":"","maintainers":[{"name":"ouranosskia","email":"UGAPiro@gmail.com"},{"name":"ck-npm","email":"pie@creditkarma.com"},{"name":"hightimesteddy","email":"hightimesteddy@gmail.com"},{"name":"nnanceck","email":"nick.nance@creditkarma.com"},{"name":"wookiehangover","email":"samuel.breed@gmail.com"},{"name":"riley-stroud-ck","email":"riley.stroud@creditkarma.com"}],"time":{"modified":"2023-06-05T17:48:01.962Z","created":"2017-10-16T16:52:31.548Z","0.0.12":"2017-10-16T16:52:31.548Z","0.0.13":"2017-10-16T17:20:43.094Z","0.0.14":"2017-10-16T18:12:58.181Z","0.0.15":"2017-10-16T19:09:21.917Z","0.0.16":"2017-10-16T19:13:54.478Z","0.0.17":"2017-10-16T19:22:22.685Z","0.0.18":"2017-10-16T19:34:53.762Z","0.0.19":"2017-10-16T19:45:08.192Z","0.0.20":"2017-10-16T20:00:54.819Z","0.0.21":"2017-10-16T20:23:49.069Z","0.0.22":"2017-10-16T20:34:19.239Z","0.0.23":"2017-10-16T20:50:46.417Z","0.0.24":"2017-10-16T21:01:33.867Z","0.0.27":"2017-10-16T21:25:11.065Z","0.0.28":"2017-10-16T22:36:03.566Z","0.0.30":"2017-10-16T22:57:23.068Z","0.0.31":"2017-10-16T23:48:36.116Z","0.0.32":"2017-10-17T16:48:24.307Z","0.0.34":"2017-10-19T22:57:28.550Z","0.0.35":"2017-10-25T17:54:03.667Z","0.0.36":"2017-11-02T22:26:15.299Z","0.0.37":"2017-11-28T19:31:23.927Z","0.1.1":"2017-12-06T00:02:44.616Z","0.1.2":"2017-12-08T22:43:53.905Z","0.1.3":"2017-12-11T22:34:21.707Z","0.2.0":"2017-12-19T06:54:57.404Z","0.3.3":"2018-01-02T19:01:21.193Z","0.3.5":"2018-01-12T00:58:56.192Z","0.3.6":"2018-01-12T19:25:12.324Z","0.4.0":"2018-01-25T19:10:12.605Z","0.4.1":"2018-01-31T04:52:06.278Z","0.4.2":"2018-02-01T21:24:28.746Z","0.4.3":"2018-02-02T05:31:12.432Z","0.5.0-0":"2018-02-21T00:49:44.362Z","0.5.0-1":"2018-02-21T22:18:49.752Z","0.5.0":"2018-03-12T20:58:03.080Z","0.5.1":"2018-03-12T22:21:02.406Z","0.6.0":"2018-03-13T17:44:02.914Z","0.6.1":"2018-03-13T18:02:28.512Z","0.6.2":"2018-03-13T19:55:53.060Z","0.6.3":"2018-03-19T17:04:26.250Z","0.6.4":"2018-03-20T18:59:33.872Z","0.6.5-2":"2018-03-20T20:39:57.422Z","0.6.5":"2018-03-21T17:36:04.318Z","0.6.6-0":"2018-03-21T21:05:29.774Z","0.6.6-1":"2018-03-27T21:58:53.052Z","0.6.6":"2018-03-28T17:14:31.975Z","0.4.5":"2018-03-29T17:06:59.550Z","0.7.0-0":"2018-04-05T15:44:51.793Z","0.7.0-1":"2018-04-05T15:58:05.905Z","0.7.0-2":"2018-04-05T17:54:29.494Z","0.6.7":"2018-04-10T17:03:45.189Z","0.6.8":"2018-04-17T17:50:26.709Z","0.6.9":"2018-04-29T19:22:21.816Z","0.7.0-3":"2018-05-06T01:15:33.978Z","0.6.10":"2018-05-09T16:40:59.836Z","0.6.11":"2018-05-09T23:15:46.549Z","0.6.12":"2018-05-11T15:20:32.694Z","0.6.13-0":"2018-05-15T15:23:03.648Z","0.6.13-1":"2018-05-15T20:20:11.025Z","0.6.13-2":"2018-05-15T20:32:13.942Z","0.6.13":"2018-05-15T21:07:37.457Z","0.6.14-0":"2018-05-17T23:11:57.412Z","0.6.14-1":"2018-05-17T23:27:51.979Z","0.6.14":"2018-05-17T23:46:37.945Z","0.6.15":"2018-05-18T23:10:55.258Z","0.6.16":"2018-05-24T01:55:02.229Z","0.6.17":"2018-05-24T18:12:02.582Z","0.6.18":"2018-05-25T05:54:04.491Z","0.7.0-4":"2018-06-01T17:48:31.247Z","0.6.19":"2018-06-04T18:34:07.807Z","0.7.0":"2018-06-04T20:34:15.441Z","0.6.21":"2018-06-15T17:16:35.794Z","0.7.3":"2018-07-09T18:48:08.838Z","0.8.0-1":"2018-08-16T16:26:51.502Z","0.8.1":"2018-08-16T21:54:41.384Z","0.8.2":"2018-08-22T21:45:07.913Z","0.9.0-alpha.2":"2018-08-28T16:16:58.952Z","0.6.22":"2018-08-30T18:47:33.016Z","0.6.23":"2018-08-30T20:27:40.022Z","0.8.3-alpha.0":"2018-09-04T18:47:08.999Z","0.8.3-alpha.1":"2018-09-04T20:22:45.466Z","0.8.3-alpha.2":"2018-09-05T19:00:20.487Z","0.8.3-alpha.3":"2018-09-05T21:28:33.454Z","0.8.3-alpha.4":"2018-09-06T19:29:20.081Z","0.6.24":"2018-09-07T18:34:17.015Z","0.6.25":"2018-09-07T18:41:12.075Z","0.9.0-alpha.3":"2018-09-11T22:54:13.875Z","0.9.0-alpha.4":"2018-09-12T17:31:21.283Z","0.9.0-alpha.5":"2018-09-12T18:04:38.304Z","0.6.27":"2018-09-12T19:10:50.086Z","0.6.28":"2018-09-12T21:23:10.752Z","0.6.29":"2018-09-13T04:55:51.949Z","0.9.0-alpha.6":"2018-09-13T18:35:48.486Z","0.9.0-alpha.7":"2018-09-14T16:29:59.352Z","0.6.30":"2018-09-25T00:07:22.503Z","0.9.0-alpha.8":"2018-10-06T04:54:16.067Z","0.9.0-alpha.9":"2018-10-06T05:02:56.913Z","0.9.0-alpha.10":"2018-10-11T17:20:59.424Z","0.9.1":"2018-10-12T20:32:08.667Z","0.10.0-alpha.1":"2018-10-25T19:52:27.871Z","0.10.0-alpha.2":"2018-10-25T20:12:23.594Z","0.9.2":"2018-10-29T23:07:40.282Z","0.6.31":"2018-10-29T23:21:42.970Z","0.8.3":"2018-10-29T23:34:02.856Z","0.8.4":"2018-11-05T23:22:04.909Z","0.9.3":"2018-11-08T21:00:22.750Z","0.10.0":"2018-11-16T23:10:15.151Z","0.10.1":"2018-11-16T23:36:33.259Z","0.10.2":"2018-11-19T02:56:38.570Z","0.10.3":"2018-11-19T17:39:04.019Z","0.10.4":"2018-11-19T21:06:53.174Z","0.8.5":"2018-11-29T23:20:09.818Z","0.11.0-alpha.0":"2018-11-30T02:57:28.272Z","0.11.0-alpha.1":"2018-12-04T21:58:27.384Z","0.11.0-alpha.2":"2018-12-05T21:36:26.820Z","0.6.32":"2018-12-07T20:54:06.270Z","0.6.33":"2018-12-13T17:22:36.604Z","0.11.1":"2018-12-18T23:38:36.211Z","0.11.2":"2019-01-07T22:27:29.862Z","0.6.34":"2019-01-10T23:43:36.699Z","0.12.1":"2019-01-11T22:51:32.192Z","0.12.2":"2019-01-11T22:58:54.487Z","0.12.3-alpha.0":"2019-01-14T04:24:21.011Z","0.12.3":"2019-01-14T04:48:26.933Z","0.12.4":"2019-01-14T19:37:47.474Z","0.12.5":"2019-01-14T22:16:31.985Z","0.6.35":"2019-02-22T01:39:08.820Z","0.13.2":"2019-03-05T05:22:13.206Z","0.13.3":"2019-03-05T05:25:13.212Z","0.13.4":"2019-03-05T15:54:11.379Z","0.13.5":"2019-03-29T05:54:14.617Z","0.13.6":"2019-04-12T22:26:45.759Z","0.13.7":"2019-06-19T02:17:59.128Z","0.13.8":"2019-08-07T20:48:36.497Z","0.14.1":"2019-08-09T23:49:05.815Z","0.14.2":"2019-08-13T17:31:09.838Z","0.14.3":"2019-08-13T20:28:01.939Z","0.14.4":"2019-08-16T04:13:15.570Z","0.14.5":"2019-08-22T15:15:00.551Z","0.14.6":"2019-09-05T19:03:46.952Z","0.15.1":"2019-10-02T18:00:09.621Z","0.15.2":"2019-10-14T19:52:58.199Z","0.15.3":"2019-10-15T01:40:04.540Z","0.16.0":"2020-01-21T22:17:57.744Z","0.16.1":"2020-05-27T19:00:52.758Z","0.17.0-alpha.0":"2021-04-01T16:22:52.008Z","0.17.1":"2021-04-02T23:33:20.410Z","0.17.2":"2021-04-03T02:13:59.296Z","0.18.0-alpha.0":"2022-05-13T16:27:24.006Z","0.18.0-alpha.1":"2022-05-16T15:56:05.942Z","0.18.0-alpha.5":"2022-05-16T20:33:09.411Z","0.18.1-alpha.0":"2022-05-17T23:28:34.046Z","0.18.1-alpha.3":"2022-05-17T23:42:16.608Z","0.18.1-alpha.4":"2022-05-17T23:49:47.756Z","0.18.1-alpha.5":"2022-06-02T23:54:29.094Z","0.18.1-alpha.6":"2022-06-08T18:19:54.724Z","0.18.1-alpha.7":"2022-06-08T18:48:05.839Z","0.18.1-alpha.8":"2022-06-08T20:29:25.961Z","0.18.1-alpha.9":"2022-06-13T17:54:34.161Z","1.0.3":"2022-06-24T23:18:35.940Z","1.0.4":"2022-06-24T23:25:55.529Z","1.0.6-alpha.0":"2023-03-08T21:30:34.887Z","1.1.0-alpha.1":"2023-06-05T17:48:01.804Z"},"keywords":["thrift","express","typescript","rpc","microservices","server","framework"],"repository":{"type":"git","url":"git+https://github.com/creditkarma/thrift-server.git#master"},"author":{"name":"Credit Karma"},"license":"Apache-2.0","readmeFilename":"","homepage":"https://github.com/creditkarma/thrift-server/tree/master#readme","bugs":{"url":"https://github.com/creditkarma/thrift-server/issues"}}