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

Please export BaseSource class for extendability 🙏 #36

Closed
tolu opened this issue Jul 18, 2022 · 0 comments · Fixed by #37
Closed

Please export BaseSource class for extendability 🙏 #36

tolu opened this issue Jul 18, 2022 · 0 comments · Fixed by #37

Comments

@tolu
Copy link
Contributor

tolu commented Jul 18, 2022

Describe the bug

We're seeing rate limiting in CI from Github API from the default downloader.

I'd love to implement a custom BaseSource but since the class is not exported I'm not able to extend it 😊

Reproduction

// this is the auto-complete from TS in VS Code when attempting to use the BaseSource class
import { BaseSource } from 'vite-plugin-mkcert/dist/mkcert/source';

Example repo

https://stackblitz.com/edit/vitejs-vite-jnavgp?file=vite.config.ts

☝️ Trying to use the stable download-links presented on mkcert's latest release-notes.

Would also love if mkcertLocalPath-option could be a function that receives output from getPlatformIdentifier and can select the appropriate binary 🙌

System Info

Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:

Ofc not system info from stackblitz repro-repo 😄

System:
    OS: macOS 12.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 402.25 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
  npmPackages:
    vite: ^2.8.6 => 2.9.13

Used package manager: npm

Logs

failed to load config from /home/projects/vitejs-vite-jnavgp/vite.config.ts
error when starting dev server:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/mkcert/source' is not defined by "exports" in /home/projects/vitejs-vite-jnavgp/node_modules/vite-plugin-mkcert/package.json imported from /home/projects/vitejs-vite-jnavgp/vite.config.ts.mjs
    at InternalError.get (https://vitejs-vite-jnavgp.w.staticblitz.com/blitz.9dc2007b053e3e7ca4daf0ec1a74b5c3910935fe.js:6:292488)
    at CAC.eval (file:///home/projects/vitejs-vite-jnavgp/node_modules/vite/dist/node/cli.js:734:135)

@tolu tolu mentioned this issue Jul 18, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant