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

Specify a default package manager if none is detected #192

Open
1 task done
SelfhostedPro opened this issue Nov 12, 2024 · 0 comments
Open
1 task done

Specify a default package manager if none is detected #192

SelfhostedPro opened this issue Nov 12, 2024 · 0 comments
Labels
enhancement New feature or request nypm

Comments

@SelfhostedPro
Copy link

SelfhostedPro commented Nov 12, 2024

Describe the feature

I would love a way to specify a default package manager if none is detected.

      const result = await downloadTemplate(pluginName, {
        dir: `${storagePath}/downloaded/${targetDir}`,
        registry: registry.url.endsWith('/') ? registry.url.slice(0, -1) : registry.url,
        auth: registry.auth,
        install: 'bun', // Passing name of package manager instead of true
        // or
        install: true,
        fallbackPackageManager: 'bun' // Adding a separate property
        forceClean: true
      })

Example use case:
https://github.com/SelfhostedPro/h0st3d-nuxt/blob/9f0c9c1868ed59f319ec5e35482c4793c7d82830/manager/server/utils/plugins/plugin-downloader.ts#L25-L31
I'd like to enable the ability for users to create their own plugins for my app to use but not all of them may specify a specific package manager and would like to keep the barrier of entry as low as possible.

Additional information

  • Would you be willing to help implement this feature?
@SelfhostedPro SelfhostedPro added the enhancement New feature or request label Nov 12, 2024
@pi0 pi0 added the nypm label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request nypm
Projects
None yet
Development

No branches or pull requests

2 participants