vercel / hyper

A terminal built on web technologies
https://hyper.is
MIT License
43.28k stars 3.52k forks source link

[Notification] Plugin error!: Plugin does not expose any Hyper extension API methods #3144

Open gjuchault opened 6 years ago

gjuchault commented 6 years ago

Issue

Hello, I'm trying to create a plugin for Hyper. I'm exporting mapHyperDispatch in the module (as stated on the website). Launching with yarn run app, I get [Notification] Plugin error!: Plugin "xx" does not expose any Hyper extension API methods

I'm supposed to use mapHyperTermDispatch although it's disabled https://github.com/zeit/hyper/blob/bc6101e98f6bb57239aa4184afa02ca223f9dacd/app/plugins/extensions.js#L34-L36

https://github.com/zeit/hyper/blob/bc6101e98f6bb57239aa4184afa02ca223f9dacd/lib/utils/plugins.js#L173-L177

linonetwo commented 6 years ago

you can use some of

[
    'onApp',
    'onWindow',
    'onRendererWindow',
    'onUnload',
    'middleware',
    'reduceUI',
    'reduceSessions',
    'reduceTermGroups',
    'decorateBrowserOptions',
    'decorateMenu',
    'decorateTerm',
    'decorateHyper',
    'decorateHyperTerm', // for backwards compatibility with hyperterm
    'decorateHeader',
    'decorateTerms',
    'decorateTab',
    'decorateNotification',
    'decorateNotifications',
    'decorateTabs',
    'decorateConfig',
    'decorateKeymaps',
    'decorateEnv',
    'decorateTermGroup',
    'decorateSplitPane',
    'getTermProps',
    'getTabProps',
    'getTabsProps',
    'getTermGroupProps',
    'mapHyperTermState',
    'mapTermsState',
    'mapHeaderState',
    'mapNotificationsState',
    'mapHyperTermDispatch',
    'mapTermsDispatch',
    'mapHeaderDispatch',
    'mapNotificationsDispatch'
  ]
gjuchault commented 6 years ago

@linonetwo Yep I've linked the file.

I'm just raising an issue about a paradox: if I use mapHyperTermDispatch, the renderer logs that I'm using a deprecated function. If I use mapHyperDispatch as seen in the docs, it's not working.

Edit: same goes for other functions

linonetwo commented 6 years ago

Oh, sorry about that, I was reading the code to de my bug, and remember this issue so pasted it here.

Don't worry about deprecated, there are so many PR to merge, so this API may last for a long time I guess.