New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wechaty-puppet-service

Package Overview
Dependencies
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wechaty-puppet-service

Puppet Service for Wechaty

1.18.2
latest
Source
npm
Version published
Weekly downloads
643
-18.92%
Maintainers
1
Weekly downloads
 
Created
Source

wechaty-puppet-service

NPM Version NPM ES Modules

Wechaty Service

Wechaty Puppet Service is gRPC for Wechaty Puppet Provider.

For example, we can cloudify the Wechaty Puppet Provider wechaty-puppet-padlocal to a Wechaty Puppet Service by running our Wechaty Puppet Service Token Gateway.

If you want to learn more about what is Wechaty Puppet and Wechaty Puppet Service, we have a blog post to explain them in details at https://wechaty.js.org/2021/01/14/wechaty-puppet-service/

Powered by Wechaty

Features

  • Consume Wechaty Puppet Service
  • Provide Wechaty Puppet Service

Usage

import { WechatyBuilder } from 'wechaty'

const wechaty = WechatyBuilder.build({
  puppet: 'wechaty-puppet-service',
  puppetOptions: {
    token: `${TOKEN}`
  }
})

wechaty.start()

Learn more about Wechaty Puppet Token from our official website: http://wechaty.js.org/docs/puppet-services/

Environment Variables

1 WECHATY_PUPPET_SERVICE_TOKEN

The token set to this environment variable will become the default value of puppetOptions.token

WECHATY_PUPPET_SERVICE_TOKEN=${WECHATY_PUPPET_SERVCIE_TOKEN} node bot.js

gRPC Health Checking Protocol

From version 0.37, Wechaty Puppet Service start supporting the GRPC Health Checking Protocol.

$ npm install --global wechaty-token
$ go install github.com/grpc-ecosystem/grpc-health-probe@latest

$ wechaty-token discovery uuid_12345678-1234-1234-1234-567812345678
{"host": 1.2.3.4, "port": 5678}

$ grpc-health-probe -tls -tls-no-verify -addr 1.2.3.4
status: SERVING

See:

Resources

Authentication

History

master v0.31

  • ES Modules supported.
  • gRPC Health Checking Protocol support

v0.30 (Aug 25, 2021)

  • Implemented TLS and server-side token authorization.
  • Refactor the gRPC client code.
  • Add local payload cache to reduce the cost of RPC.
New environment variables
  • WECHATY_PUPPET_SERVICE_TLS_CA_CERT: can be overwrite by options.tlsRootCert. Set Root CA Cert to verify the server or client.

For Puppet Server:

Environment VariableOptionsDescription
WECHATY_PUPPET_SERVICE_TLS_SERVER_CERToptions.tls.serverCertServer CA Cert (string data)
WECHATY_PUPPET_SERVICE_TLS_SERVER_KEYoptions.tls.serverKeyServer CA Key (string data)
WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVERoptions.tls.disableSet true to disable server TLS

For Puppet Client:

Environment VariableOptionsDescription
WECHATY_PUPPET_SERVICE_AUTHORITYoptions.authorityService discovery host, default: api.chatie.io
WECHATY_PUPPET_SERVICE_TLS_CA_CERToptions.caCertCertification Authority Root Cert, default is using Wechaty Community root cert
WECHATY_PUPPET_SERVICE_TLS_SERVER_NAMEoptions.serverNameServer Name (mast match for SNI)
WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_CLIENToptions.tls.disableSet true to disable client TLS

Changelog

main v1.0 (Oct 29, 2021)

Release v1.0 of Wechaty Puppet Service.

  • use wechaty-token for gRPC service discovery with wechaty schema (xDS like)
  • deprecated WECHATY_SERVICE_DISCOVERY_ENDPOINT, replaced by WECHATY_PUPPET_SERVICE_AUTHORITY. (See #156)
  • enable TLS & Token Auth (See #124)

v0.14 (Jan 2021)

Rename from wechaty-puppet-hostie to wechaty-puppet-service (Issue #118)

v0.10.4 (Oct 2020)

v0.6 (Apr 2020)

Beta Version

  • Reconnect to Hostie Server with RxSJ Observables

v0.3 (Feb 2020)

v0.0.1 (Jun 2018)

Designing the puppet hostie with the following protocols:

Maintainers

  • Code & Docs © 2018-now Huan LI <zixia@zixia.net>
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons

Keywords

chatie

FAQs

Package last updated on 13 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts