Skip to content

Add a meta interface to puppet (DRAFT) #190

Description

@huan
interface PuppetMeta {
  /**
   * the official IM name
   * @example 'WeChat', 'QQ', 
   */
  channel: string
  /**
   * the Puppet Name
   * @example 'Xyz' (PuppetXyz)
   */
  protocol: string
  /**
   * the NPM package name
   * @example 'wechaty-puppet-xpz'
   */
  npm: string
  /**
   * SemVer
   * @example '1.2.3'
   */
  version: string
}

class PuppetXyz extends Puppet {

  override static meta: PuppetMeta = {
    channel = 'WeChat',
    protocol = 'Xyz', // <- PuppetXyz
    npm = 'wechaty-puppet-xpz'
    version = '1.2.3',
  }

  override meta = PuppetTest.meta
}

There are two features that need to be designed:

  1. The meta should be able to pass the Wechaty Puppet Service, how?
  2. The meta should be able to get all the upstream puppets, like PuppetService -> PuppetWxWork, how?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions