Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a meta interface to puppet (DRAFT) #190

Open
huan opened this issue Mar 13, 2022 · 0 comments
Open

Add a meta interface to puppet (DRAFT) #190

huan opened this issue Mar 13, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@huan
Copy link
Member

huan commented Mar 13, 2022

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?
@huan huan added the enhancement New feature or request label Mar 13, 2022
@huan huan changed the title Add a meta interface to puppet Add a meta interface to puppet (DRAFT) Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant