From 0de9637bd56279d02b21555a2a7f1d8de4d2057a Mon Sep 17 00:00:00 2001 From: Mark Doliner Date: Mon, 21 Sep 2020 16:03:30 -0400 Subject: [PATCH] Various updates needed to rename the fork. Basically just changing the package scope from @creditkarma to @statestitle so we can publish to a package service. Had to remove extra parts of the URL from the GitHub URLs in package.json so GitHub would let me publish to their package service. --- packages/thrift-client/README.md | 24 +++++++-------- packages/thrift-client/package-lock.json | 12 ++++---- packages/thrift-client/package.json | 10 +++---- .../src/main/connections/Connection.ts | 2 +- .../src/main/connections/HttpConnection.ts | 8 ++--- .../src/main/connections/NullConnection.ts | 2 +- .../src/main/connections/TcpConnection.ts | 2 +- .../src/main/connections/index.ts | 2 +- .../src/main/connections/pool.ts | 2 +- packages/thrift-client/src/main/logger.ts | 2 +- packages/thrift-client/src/main/types.ts | 2 +- packages/thrift-server-core/package-lock.json | 30 +++++++++---------- packages/thrift-server-core/package.json | 8 ++--- packages/thrift-server-express/README.md | 10 +++---- .../thrift-server-express/package-lock.json | 12 ++++---- packages/thrift-server-express/package.json | 10 +++---- .../src/main/ThriftServerExpress.ts | 2 +- .../thrift-server-express/src/main/index.ts | 2 +- .../thrift-server-express/src/main/logger.ts | 2 +- .../thrift-server-express/src/main/types.ts | 2 +- 20 files changed, 73 insertions(+), 73 deletions(-) diff --git a/packages/thrift-client/README.md b/packages/thrift-client/README.md index 906cde4a..18202a89 100644 --- a/packages/thrift-client/README.md +++ b/packages/thrift-client/README.md @@ -19,9 +19,9 @@ We're going to go through this step-by-step. All Thrift Server libraries define inter-dependencies as peer dependencies to avoid type collisions. ```sh -$ npm install --save-dev @creditkarma/thrift-typescript -$ npm install --save @creditkarma/thrift-server-core -$ npm install --save @creditkarma/thrift-client +$ npm install --save-dev @statestitle/thrift-typescript +$ npm install --save @statestitle/thrift-server-core +$ npm install --save @statestitle/thrift-client $ npm install --save request $ npm install --save @types/request ``` @@ -37,7 +37,7 @@ service Calculator { ### Codegen -Requires @creditkarma/thrift-typescript >= v3.0.0 +Requires @statestitle/thrift-typescript >= v3.0.0 Add 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. @@ -69,7 +69,7 @@ When creating a client using this method Thrift Client uses the [Request library ```typescript import { createHttpClient -} from '@creditkarma/thrift-client' +} from '@statestitle/thrift-client' import { CoreOptions } from 'request' @@ -99,7 +99,7 @@ The available options are: * register (optional): A list of filters to apply to your client. More on this later. * requestImpl (optional): Provide a request implementation. Defaults to 'request' module. -Currently `@creditkarma/thrift-server-core"` only supports buffered transport and binary or compact protocols. +Currently `@statestitle/thrift-server-core"` only supports buffered transport and binary or compact protocols. ```typescript type TransportType = 'buffered' @@ -120,7 +120,7 @@ import { RequestInstance, HttpConnection, IHttpConnectionOptions, -} from '@creditkarma/thrift-client' +} from '@statestitle/thrift-client' import * as request from 'request' import { CoreOptions } from 'request' @@ -163,7 +163,7 @@ Using the `createTcpClient` function you pass in two arguments, the first is you ```typescript import { createTcpClient -} from '@creditkarma/thrift-client' +} from '@statestitle/thrift-client' import { Calculator } from './codegen/calculator' @@ -193,7 +193,7 @@ The available options are: ```typescript import { TcpConnection, -} from '@creditkarma/thrift-client' +} from '@statestitle/thrift-client' import { Calculator } from './codegen/calculator' @@ -220,7 +220,7 @@ Related to context you will notice that our Thrift service client is a generic ` ```typescript import { createHttpClient -} from '@creditkarma/thrift-client' +} from '@statestitle/thrift-client' import { CoreOptions } from 'request' import * as express from 'express' @@ -343,7 +343,7 @@ You could do something like this: import { createHttpClient, IThriftRequest, -} from '@creditkarma/thrift-client' +} from '@statestitle/thrift-client' import { Calculator } from './codegen/calculator' @@ -372,7 +372,7 @@ To apply filters to the response you would call `.then` on the `next` function. import { createHttpClient, IThriftRequest -} from '@creditkarma/thrift-client' +} from '@statestitle/thrift-client' import { Calculator } from './codegen/calculator' diff --git a/packages/thrift-client/package-lock.json b/packages/thrift-client/package-lock.json index 97ff262d..e8e24c70 100644 --- a/packages/thrift-client/package-lock.json +++ b/packages/thrift-client/package-lock.json @@ -1,6 +1,6 @@ { - "name": "@creditkarma/thrift-client", - "version": "0.16.1", + "name": "@statestitle/thrift-client", + "version": "0.16.1-statestitle1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -24,10 +24,10 @@ "js-tokens": "^4.0.0" } }, - "@creditkarma/thrift-server-core": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@creditkarma/thrift-server-core/-/thrift-server-core-0.16.0.tgz", - "integrity": "sha512-5Eio0QL991VQUkK2MUqHbH3/pqe4SGNYAT8hMKxNBiESPEkRtdwUwN+YTd4uRwIFl7+I8MTcRdwmoJwz/G6YNA==", + "@statestitle/thrift-server-core": { + "version": "0.16.1-statestitle2", + "resolved": "https://npm.pkg.github.com/download/@statestitle/thrift-server-core/0.16.1-statestitle2/46ead0678f9e9487631096018ff4d49635bbba72caa9bb86be11dfbe67e1891f", + "integrity": "sha512-G86yqOMcMBpiylY1+r9rbnqCGFfTEwiajJWfaVjKnKFvyt0UVfryigB4CXkJUcscbIrZsSHLXqsE2HyprtjZbw==", "dev": true, "requires": { "@types/lodash": "^4.14.136", diff --git a/packages/thrift-client/package.json b/packages/thrift-client/package.json index a5693281..3451a0f1 100644 --- a/packages/thrift-client/package.json +++ b/packages/thrift-client/package.json @@ -1,6 +1,6 @@ { - "name": "@creditkarma/thrift-client", - "version": "0.16.1", + "name": "@statestitle/thrift-client", + "version": "0.16.1-statestitle1", "description": "Thrift client library for NodeJS written in TypeScript.", "main": "dist/main/index.js", "types": "dist/main/index.d.ts", @@ -32,13 +32,13 @@ "license": "Apache-2.0", "repository": { "type": "git", - "url": "https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-client" + "url": "https://github.com/statestitle/thrift-server" }, "peerDependencies": { - "@creditkarma/thrift-server-core": "0.16.x" + "@statestitle/thrift-server-core": "0.16.x" }, "devDependencies": { - "@creditkarma/thrift-server-core": "^0.16.1", + "@statestitle/thrift-server-core": "^0.16.1-statestitle2", "@types/node": "^8.10.38", "prettier": "^1.18.2", "rimraf": "^2.6.2", diff --git a/packages/thrift-client/src/main/connections/Connection.ts b/packages/thrift-client/src/main/connections/Connection.ts index c115fdc1..bace7d08 100644 --- a/packages/thrift-client/src/main/connections/Connection.ts +++ b/packages/thrift-client/src/main/connections/Connection.ts @@ -7,7 +7,7 @@ import { TProtocol, TTransport, TType, -} from '@creditkarma/thrift-server-core' +} from '@statestitle/thrift-server-core' import * as net from 'net' import * as tls from 'tls' diff --git a/packages/thrift-client/src/main/connections/HttpConnection.ts b/packages/thrift-client/src/main/connections/HttpConnection.ts index f7bfaf0d..17303f11 100644 --- a/packages/thrift-client/src/main/connections/HttpConnection.ts +++ b/packages/thrift-client/src/main/connections/HttpConnection.ts @@ -1,4 +1,4 @@ -import * as Core from '@creditkarma/thrift-server-core' +import * as Core from '@statestitle/thrift-server-core' import * as request from 'request' import { @@ -178,9 +178,9 @@ export class HttpConnection extends Core.ThriftConnection { this.Protocol, ) - const filters: Array> = this.filtersForMethod(requestMethod) + const filters: Array< + RequestHandler + > = this.filtersForMethod(requestMethod) const thriftRequest: IThriftRequest = { data: dataToSend, diff --git a/packages/thrift-client/src/main/connections/NullConnection.ts b/packages/thrift-client/src/main/connections/NullConnection.ts index 7f8a21ef..43b6ba9a 100644 --- a/packages/thrift-client/src/main/connections/NullConnection.ts +++ b/packages/thrift-client/src/main/connections/NullConnection.ts @@ -1,4 +1,4 @@ -import * as Core from '@creditkarma/thrift-server-core' +import * as Core from '@statestitle/thrift-server-core' export class NullConnection extends Core.ThriftConnection { public send(dataToSend: Buffer, context: any = {}): Promise { diff --git a/packages/thrift-client/src/main/connections/TcpConnection.ts b/packages/thrift-client/src/main/connections/TcpConnection.ts index f59916c3..84eb6e6e 100644 --- a/packages/thrift-client/src/main/connections/TcpConnection.ts +++ b/packages/thrift-client/src/main/connections/TcpConnection.ts @@ -6,7 +6,7 @@ import { LogFunction, readThriftMethod, ThriftConnection, -} from '@creditkarma/thrift-server-core' +} from '@statestitle/thrift-server-core' import { IConnectionOptions, diff --git a/packages/thrift-client/src/main/connections/index.ts b/packages/thrift-client/src/main/connections/index.ts index 6a59b842..541e8099 100644 --- a/packages/thrift-client/src/main/connections/index.ts +++ b/packages/thrift-client/src/main/connections/index.ts @@ -4,7 +4,7 @@ import { deepMerge, IClientConstructor, ThriftClient, -} from '@creditkarma/thrift-server-core' +} from '@statestitle/thrift-server-core' import { HttpConnection } from './HttpConnection' import { NullConnection } from './NullConnection' diff --git a/packages/thrift-client/src/main/connections/pool.ts b/packages/thrift-client/src/main/connections/pool.ts index 780cf28f..0ec62300 100644 --- a/packages/thrift-client/src/main/connections/pool.ts +++ b/packages/thrift-client/src/main/connections/pool.ts @@ -1,4 +1,4 @@ -import { LogFunction } from '@creditkarma/thrift-server-core' +import { LogFunction } from '@statestitle/thrift-server-core' import * as GenericPool from 'generic-pool' import { Connection, createConnection, IConnectionConfig } from './Connection' diff --git a/packages/thrift-client/src/main/logger.ts b/packages/thrift-client/src/main/logger.ts index c97f75ed..7eb67552 100644 --- a/packages/thrift-client/src/main/logger.ts +++ b/packages/thrift-client/src/main/logger.ts @@ -1,3 +1,3 @@ -import { LogFunction, makeLogger } from '@creditkarma/thrift-server-core' +import { LogFunction, makeLogger } from '@statestitle/thrift-server-core' export const defaultLogger: LogFunction = makeLogger('thrift-client') diff --git a/packages/thrift-client/src/main/types.ts b/packages/thrift-client/src/main/types.ts index d9ac0d98..6b2daa94 100644 --- a/packages/thrift-client/src/main/types.ts +++ b/packages/thrift-client/src/main/types.ts @@ -3,7 +3,7 @@ import { LogFunction, ProtocolType, TransportType, -} from '@creditkarma/thrift-server-core' +} from '@statestitle/thrift-server-core' import * as GenericPool from 'generic-pool' diff --git a/packages/thrift-server-core/package-lock.json b/packages/thrift-server-core/package-lock.json index 1ad8c02d..f852865a 100644 --- a/packages/thrift-server-core/package-lock.json +++ b/packages/thrift-server-core/package-lock.json @@ -1,6 +1,6 @@ { - "name": "@creditkarma/thrift-server-core", - "version": "0.16.1", + "name": "@statestitle/thrift-server-core", + "version": "0.16.1-statestitle2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -30,19 +30,6 @@ "integrity": "sha512-mSRxjSXvU6sBfWhMBWXl7H/XEKWHQ7x+MUDLwyeFIwwX9UaZKPOc7TgGd0N78kcZtIMk82ArdxO6aFhqnBuNtg==", "dev": true }, - "@creditkarma/thrift-typescript": { - "version": "3.7.6", - "resolved": "https://registry.npmjs.org/@creditkarma/thrift-typescript/-/thrift-typescript-3.7.6.tgz", - "integrity": "sha512-v/9Bi3YqExw8bOHA1F/087zru14qExO1e4rdV/+hjYOnUk0HX3zmi6giu/QR9c9QK+5bxekZd4pUxgX7HWwvwQ==", - "dev": true, - "requires": { - "@creditkarma/thrift-parser": "^1.2.0", - "@types/fs-extra": "^7.0.0", - "fs-extra": "^8.0.1", - "glob": "^7.1.2", - "typescript": "3.5.x" - } - }, "@hapi/address": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", @@ -264,6 +251,19 @@ "fastq": "^1.6.0" } }, + "@statestitle/thrift-typescript": { + "version": "3.7.6-statestitle3", + "resolved": "https://npm.pkg.github.com/download/@statestitle/thrift-typescript/3.7.6-statestitle3/ce58822bc67edf50cfc9bb069dc98c572dcc64f49d62c14d6e6af2c312c0605f", + "integrity": "sha512-/lXsIBmPjCQBtuzwDKPAL1Kn6gLmGgncEcpd8mJ6dlkrvHsQIUjGp7A7JvgCBnF38YJmXyyRfrYIq3nhR2aSGg==", + "dev": true, + "requires": { + "@creditkarma/thrift-parser": "^1.2.0", + "@types/fs-extra": "^7.0.0", + "fs-extra": "^8.0.1", + "glob": "^7.1.2", + "typescript": "3.5.x" + } + }, "@types/events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", diff --git a/packages/thrift-server-core/package.json b/packages/thrift-server-core/package.json index 10d2c44f..522a7581 100644 --- a/packages/thrift-server-core/package.json +++ b/packages/thrift-server-core/package.json @@ -1,6 +1,6 @@ { - "name": "@creditkarma/thrift-server-core", - "version": "0.16.1", + "name": "@statestitle/thrift-server-core", + "version": "0.16.1-statestitle2", "description": "Thrift core library in TypeScript", "main": "dist/main/index.js", "types": "dist/main/index.d.ts", @@ -28,10 +28,10 @@ "license": "Apache-2.0", "repository": { "type": "git", - "url": "https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-core" + "url": "https://github.com/StatesTitle/thrift-server" }, "devDependencies": { - "@creditkarma/thrift-typescript": "^3.7.6", + "@statestitle/thrift-typescript": "^3.7.6-statestitle3", "@hapi/code": "^5.3.0", "@hapi/lab": "^20.3.2", "@types/hapi__code": "^5.3.0", diff --git a/packages/thrift-server-express/README.md b/packages/thrift-server-express/README.md index 8d412316..47fc804c 100644 --- a/packages/thrift-server-express/README.md +++ b/packages/thrift-server-express/README.md @@ -8,12 +8,12 @@ Adding Thrift support to Express is as easy as just including the provided middl ### Codegen -Requires @creditkarma/thrift-typescript >= v3.0.0 +Requires @statestitle/thrift-typescript >= v3.0.0 -The easiest way to get started is to generate your thrift services using @creditkarma/thrift-typescript. +The easiest way to get started is to generate your thrift services using @statestitle/thrift-typescript. ```sh -npm install --save-dev @creditkarma/thrift-typescript +npm install --save-dev @statestitle/thrift-typescript ``` Add 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. @@ -38,7 +38,7 @@ service Calculator { ```sh npm install --save express npm install --save thrift -npm install --save @creditkarma/thrift-server-express +npm install --save @statestitle/thrift-server-express ``` ### Use the Plugin @@ -107,7 +107,7 @@ The factory function takes one additional config options `path`, the path on whi ```typescript import * as express from 'express' -import { createThriftServer } from '@creditkarma/thrift-server-express' +import { createThriftServer } from '@statestitle/thrift-server-express' import { Calculator } from './codegen/calculator' const PORT = 8080 diff --git a/packages/thrift-server-express/package-lock.json b/packages/thrift-server-express/package-lock.json index 54806c8c..da36e644 100644 --- a/packages/thrift-server-express/package-lock.json +++ b/packages/thrift-server-express/package-lock.json @@ -1,6 +1,6 @@ { - "name": "@creditkarma/thrift-server-express", - "version": "0.16.1", + "name": "@statestitle/thrift-server-express", + "version": "0.16.1-statestitle1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -24,10 +24,10 @@ "js-tokens": "^4.0.0" } }, - "@creditkarma/thrift-server-core": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@creditkarma/thrift-server-core/-/thrift-server-core-0.16.0.tgz", - "integrity": "sha512-5Eio0QL991VQUkK2MUqHbH3/pqe4SGNYAT8hMKxNBiESPEkRtdwUwN+YTd4uRwIFl7+I8MTcRdwmoJwz/G6YNA==", + "@statestitle/thrift-server-core": { + "version": "0.16.1-statestitle2", + "resolved": "https://npm.pkg.github.com/download/@statestitle/thrift-server-core/0.16.1-statestitle2/46ead0678f9e9487631096018ff4d49635bbba72caa9bb86be11dfbe67e1891f", + "integrity": "sha512-G86yqOMcMBpiylY1+r9rbnqCGFfTEwiajJWfaVjKnKFvyt0UVfryigB4CXkJUcscbIrZsSHLXqsE2HyprtjZbw==", "dev": true, "requires": { "@types/lodash": "^4.14.136", diff --git a/packages/thrift-server-express/package.json b/packages/thrift-server-express/package.json index 6aa2c871..707a0788 100644 --- a/packages/thrift-server-express/package.json +++ b/packages/thrift-server-express/package.json @@ -1,6 +1,6 @@ { - "name": "@creditkarma/thrift-server-express", - "version": "0.16.1", + "name": "@statestitle/thrift-server-express", + "version": "0.16.1-statestitle1", "description": "Express server middleware for the Apache Thrift protocol", "main": "dist/main/index.js", "types": "dist/main/index.d.ts", @@ -29,15 +29,15 @@ "license": "Apache-2.0", "repository": { "type": "git", - "url": "https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express" + "url": "https://github.com/statestitle/thrift-server" }, "peerDependencies": { - "@creditkarma/thrift-server-core": "0.16.x", + "@statestitle/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", + "@statestitle/thrift-server-core": "^0.16.1-statestitle2", "@types/body-parser": "^1.16.5", "@types/express": "^4.16.0", "@types/node": "^8.10.38", diff --git a/packages/thrift-server-express/src/main/ThriftServerExpress.ts b/packages/thrift-server-express/src/main/ThriftServerExpress.ts index e530553c..27daac65 100644 --- a/packages/thrift-server-express/src/main/ThriftServerExpress.ts +++ b/packages/thrift-server-express/src/main/ThriftServerExpress.ts @@ -6,7 +6,7 @@ import { ITransportConstructor, process, readThriftMethod, -} from '@creditkarma/thrift-server-core' +} from '@statestitle/thrift-server-core' import * as express from 'express' diff --git a/packages/thrift-server-express/src/main/index.ts b/packages/thrift-server-express/src/main/index.ts index f07912ef..8ad2d2e0 100644 --- a/packages/thrift-server-express/src/main/index.ts +++ b/packages/thrift-server-express/src/main/index.ts @@ -1,4 +1,4 @@ -import { IThriftProcessor } from '@creditkarma/thrift-server-core' +import { IThriftProcessor } from '@statestitle/thrift-server-core' import * as bodyParser from 'body-parser' import * as express from 'express' diff --git a/packages/thrift-server-express/src/main/logger.ts b/packages/thrift-server-express/src/main/logger.ts index e1fa174c..58e13b25 100644 --- a/packages/thrift-server-express/src/main/logger.ts +++ b/packages/thrift-server-express/src/main/logger.ts @@ -1,3 +1,3 @@ -import { LogFunction, makeLogger } from '@creditkarma/thrift-server-core' +import { LogFunction, makeLogger } from '@statestitle/thrift-server-core' export const defaultLogger: LogFunction = makeLogger('thrift-server-express') diff --git a/packages/thrift-server-express/src/main/types.ts b/packages/thrift-server-express/src/main/types.ts index 4e366285..98ad1c91 100644 --- a/packages/thrift-server-express/src/main/types.ts +++ b/packages/thrift-server-express/src/main/types.ts @@ -3,7 +3,7 @@ import * as express from 'express' import { IThriftProcessor, IThriftServerOptions, -} from '@creditkarma/thrift-server-core' +} from '@statestitle/thrift-server-core' export type IExpressServerOptions< TProcessor extends IThriftProcessor