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

plugin-autocomplete does not support bundling #846

Open
sergei-dyshel opened this issue Nov 29, 2024 · 1 comment
Open

plugin-autocomplete does not support bundling #846

sergei-dyshel opened this issue Nov 29, 2024 · 1 comment
Labels
help wanted Accepting PRs

Comments

@sergei-dyshel
Copy link

I tried to modify https://github.com/oclif/plugin-test-esbuild to use https://github.com/oclif/plugin-autocomplete to be able to generate completion for bundled scripts.

The example already uses https://github.com/oclif/plugin-plugins in the following way (https://github.com/oclif/plugin-test-esbuild/blob/main/src/index.ts#L13-L15):

import * as PluginPlugins from '@oclif/plugin-plugins'
export const COMMANDS: Record<string, Command.Class> = {
  ...PluginPlugins.commands,
...

However this doesn't work with plug-autocomplete because it doesn't export any commands, as can be seen here: https://github.com/oclif/plugin-autocomplete/blob/main/src/index.ts.

Wondering if it's done on purpose, or we can change it something like

import Index from './commands/autocomplete'
import Create from './commands/autocomplete/create'
import Script from './commands/autocomplete/script'

export const commands = {
  autocomplete: Index,
  'autocomplete:create': Create,
  'autocomplete:script': Script,
}

export {default as hook} from './hooks/refresh-cache'
@mdonnalley mdonnalley transferred this issue from oclif/oclif Dec 2, 2024
@mdonnalley
Copy link
Contributor

@sergei-dyshel you're welcome to submit a PR with the desired changes

@mdonnalley mdonnalley added the help wanted Accepting PRs label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Accepting PRs
Projects
None yet
Development

No branches or pull requests

2 participants