giget icon indicating copy to clipboard operation
giget copied to clipboard

Specify a default package manager if none is detected

Open SelfhostedPro opened this issue 1 year ago • 0 comments

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

  • [X] Would you be willing to help implement this feature?

SelfhostedPro avatar Nov 12 '24 21:11 SelfhostedPro