feat: disable specific built-in feature (or change it's config)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Start by tracing the builtinDevTools configuration and the configResolved hook to find where built-in features, especially terminal, are registered. Compare that path with terminalsVite({ shell: '/usr/bin/nologin' }); done means users can keep other built-in or package devtools enabled while excluding terminal through configuration.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Clear and concise description of the problem
Hello and thanks to everyone!
I would like to disable the terminal feature. As of today, the only way to do so is by set
devtools: {
builtinDevTools: false,
},
but this disables all the vite devtools entirely (even the ones from @vitejs/devtools-vite package).
I understand terminal is not active if no authentication is provided, but once it is (and I may want to open devtools for other reasons) I still feel like having it it's a security hole that must be closed. (such terminal is capable of doing too much thing, everything actually - install packages, sudo, reading envs and .bash_history as well as ssh into other machines).
I understand every hole I described can be done in many different way just with a bad package, but at least I would not like to have a terminal in my browser window and potentially accessibile in the network.
I tried to write a custom plugin that hook into the configResolved function to intercept the configuration, but I only managed to entirely disable the tools and I could not manage to reach the configuration.
Suggested solution
From a config perspective, it may be done in different ways, the one I prefer is something like
devtools: {
builtinDevTools: true,
excludeBuiltIn: ['terminal']
},
Alternative
Another way can be to override that specific plugin configuration
import { terminalsVite } from '@devframes/plugin-terminals/vite'
//...
plugins: [
...terminalsVite({
shell: '/usr/bin/nologin'
}),
]
Additional context
I never went that deep into vite: I never needed that (and that thanks to your awesome work, btw!), so I don't know that much of vite internal structure, but if the leading team decides this can be a feature, I can get my hands on it and try to prepare a PR (I feel like it's a small if somewhere, just I don't know where this "somewhere" is)
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- Ngôn ngữ chính
- TypeScript
- Star
- 1.2k
- Fork
- 92
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của vitejs/devtools
-
docs: manual client injection examples reference removed exportsCó thể đã có người làm @MFA-G đã nhận 6 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
vitejs/devtools#589 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vitejs/devtools#261 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Not working on Stackblitz (WebContainer)Có thể đã có người làm @webfansplz đã nhận hôm nay. Đang mởbug: upstream
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
vitejs/devtools#603 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Compare module sizes between build sessionsCó thể đã có người làm @webfansplz đã nhận 4 ngày trước. Đang mởenhancement
vitejs/devtools#601 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của vitejs/devtools
Issue tương tự
-
Add: Channel 5 (Singapore) SDĐang mởcheck:passed streams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
OpenSlides/OpenSlides#7180 ·
-
area:claude-code-web area:docs bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anthropics/claude-code#100184 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Thumbnail generation from video buffers frames at source resolution: 2–3 GB per upload for 4K+ HEVCĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Chocobozzz/PeerTube#7817 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
open-telemetry/opentelemetry-js-contrib#3808 ·
Maintainer thường phản hồi trong vòng 2 ngày