From a2d6b18bff6eb5c1773ae4adfd5665f87569422e Mon Sep 17 00:00:00 2001 From: Huan Date: Sat, 23 Jan 2021 15:44:04 +0800 Subject: [PATCH] Rename from puppet-hostie -> puppet-service (#118) --- README.md | 14 +++++++++----- package.json | 12 ++++++------ src/client/puppet-hostie.spec.ts | 2 +- src/client/puppet-hostie.ts | 4 ++-- src/config.ts | 2 +- tests/fixtures/smoke-testing.ts | 2 +- tests/integration.spec.ts | 4 ++-- tests/performance.spec.ts | 4 ++-- 8 files changed, 24 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index ac40933a..85ccbdc7 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# wechaty-puppet-hostie +# wechaty-puppet-service -[![NPM Version](https://badge.fury.io/js/wechaty-puppet-hostie.svg)](https://www.npmjs.com/package/wechaty-puppet-hostie) -[![NPM](https://github.com/Chatie/grpc/workflows/NPM/badge.svg)](https://github.com/wechaty/wechaty-puppet-hostie/actions?query=workflow%3ANPM) +[![NPM Version](https://badge.fury.io/js/wechaty-puppet-service.svg)](https://www.npmjs.com/package/wechaty-puppet-service) +[![NPM](https://github.com/Chatie/grpc/workflows/NPM/badge.svg)](https://github.com/wechaty/wechaty-puppet-service/actions?query=workflow%3ANPM) -![Hostie](https://wechaty.github.io/wechaty-puppet-hostie/images/hostie.png) +![Hostie](https://wechaty.github.io/wechaty-puppet-service/images/hostie.png) Hostie Puppet for Wechaty @@ -20,7 +20,7 @@ Hostie Puppet for Wechaty import { Wechaty } from 'wechaty' const wechaty = new Wechaty({ - puppet: 'wechaty-puppet-hostie', + puppet: 'wechaty-puppet-service', puppetOptions: { token: 'hostie_token' } @@ -43,6 +43,10 @@ WECHATY_PUPPET_HOSTIE_TOKEN=hostie_token node bot.js ### master +### v0.14 (Jan 2021) + +Rename from `wechaty-puppet-hostie` to `wechaty-puppet-service` (Issue [#118](https://github.com/wechaty/wechaty-puppet-service/issues/118)) + ### v0.10.4 (Oct 2020) 1. Add 'grpc.default_authority' to gRPC client option. diff --git a/package.json b/package.json index a1c6f0a3..3e58760c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "wechaty-puppet-hostie", - "version": "0.13.2", - "description": "Puppet Hostie for Wechaty", + "name": "wechaty-puppet-service", + "version": "0.14.0", + "description": "Puppet Service for Wechaty", "main": "dist/src/index.js", "typings": "dist/src/index.d.ts", "directories": { @@ -26,7 +26,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/Chatie/wechaty-puppet-hostie.git" + "url": "git+https://github.com/wechaty/wechaty-puppet-service.git" }, "keywords": [ "chatie", @@ -40,9 +40,9 @@ "author": "Huan LI ", "license": "Apache-2.0", "bugs": { - "url": "https://github.com/Chatie/wechaty-puppet-hostie/issues" + "url": "https://github.com/wechaty/wechaty-puppet-service/issues" }, - "homepage": "https://github.com/Chatie/wechaty-puppet-hostie#readme", + "homepage": "https://github.com/wechaty/wechaty-puppet-service#readme", "devDependencies": { "@chatie/eslint-config": "^0.12.1", "@chatie/git-scripts": "^0.6.2", diff --git a/src/client/puppet-hostie.spec.ts b/src/client/puppet-hostie.spec.ts index abfed402..622d8d4e 100644 --- a/src/client/puppet-hostie.spec.ts +++ b/src/client/puppet-hostie.spec.ts @@ -13,7 +13,7 @@ test('version()', async (t) => { /** * Huan(202003): - * need to setup a test server to provide test token for puppet hostie + * need to setup a test server to provide test token for Puppet Service */ test.skip('PuppetHostie restart without problem', async (t) => { const puppet = new PuppetHostie() diff --git a/src/client/puppet-hostie.ts b/src/client/puppet-hostie.ts index 9d99bc08..6bf56f7e 100644 --- a/src/client/puppet-hostie.ts +++ b/src/client/puppet-hostie.ts @@ -258,7 +258,7 @@ export class PuppetHostie extends Puppet { log.verbose('PuppetHostie', 'start()') if (!this.options.token) { - throw new Error('wechaty-puppet-hostie: token not found (save token to WECHATY_PUPPET_HOSTIE_TOKEN env var or pass it to puppet options is required.). See: ') + throw new Error('wechaty-puppet-service: token not found (save token to WECHATY_PUPPET_HOSTIE_TOKEN env var or pass it to puppet options is required.). See: ') } if (this.state.on()) { @@ -399,7 +399,7 @@ export class PuppetHostie extends Puppet { log.verbose('PuppetHostie', 'startGrpcStream() eventStream.on(end)') }) .on('error', e => { - // https://github.com/wechaty/wechaty-puppet-hostie/issues/16 + // https://github.com/wechaty/wechaty-puppet-service/issues/16 log.verbose('PuppetHostie', 'startGrpcStream() eventStream.on(error) %s', e) const reason = 'startGrpcStream() eventStream.on(error) ' + e /** diff --git a/src/config.ts b/src/config.ts index deb2719c..9736d82f 100644 --- a/src/config.ts +++ b/src/config.ts @@ -5,7 +5,7 @@ export { log } from 'wechaty-puppet' export { VERSION } from './version' export const GRPC_LIMITATION = { - // https://github.com/wechaty/wechaty-puppet-hostie/issues/86 + // https://github.com/wechaty/wechaty-puppet-service/issues/86 // 'grpc.max_receive_message_length': 1024 * 1024 * 150, // 'grpc.max_send_message_length': 1024 * 1024 * 150, } diff --git a/tests/fixtures/smoke-testing.ts b/tests/fixtures/smoke-testing.ts index 07945426..4ca8c3df 100644 --- a/tests/fixtures/smoke-testing.ts +++ b/tests/fixtures/smoke-testing.ts @@ -2,7 +2,7 @@ import { VERSION, PuppetHostie, -} from 'wechaty-puppet-hostie' +} from 'wechaty-puppet-service' async function main () { if (VERSION === '0.0.0') { diff --git a/tests/integration.spec.ts b/tests/integration.spec.ts index 9c602d6d..8956c980 100755 --- a/tests/integration.spec.ts +++ b/tests/integration.spec.ts @@ -44,7 +44,7 @@ test('integration testing', async (t) => { await hostieServer.start() /** - * Puppet Hostie Client + * Puppet Service Client */ const puppetOptions = { endpoint: ENDPOINT, @@ -81,7 +81,7 @@ test('integration testing', async (t) => { * Stop * 1. Puppet in Hostie * 2. Hostie Service - * 3. Puppet Hostie Client + * 3. Puppet Service Client * */ await puppetHostie.stop() diff --git a/tests/performance.spec.ts b/tests/performance.spec.ts index 8ebf0cb8..9f4ae957 100755 --- a/tests/performance.spec.ts +++ b/tests/performance.spec.ts @@ -88,7 +88,7 @@ test.skip('stress testing', async (t) => { await hostieServer.start() /** - * Puppet Hostie Client + * Puppet Service Client */ const puppetOptions = { endpoint : ENDPOINT, @@ -135,7 +135,7 @@ test.skip('stress testing', async (t) => { * Stop * 1. Puppet in Hostie * 2. Hostie Service - * 3. Puppet Hostie Client + * 3. Puppet Service Client * */ await puppetHostie.stop()