Skip to content

feat(core): add capability devOnly field #13261

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

lucasfernog
Copy link
Member

a dev environment might need particular scope configurations (such as allowing a localhost API). This change allows marking a whole capability file as "dev only"

a dev environment might need particular scope configurations (such as allowing a localhost API). This change allows marking a whole capability file as "dev only"
@lucasfernog lucasfernog requested a review from a team as a code owner April 18, 2025 12:46
@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Apr 18, 2025
Copy link
Contributor

Package Changes Through 9ed7143

There are 3 changes which include tauri-utils with minor, tauri-codegen with minor, tauri with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-utils 2.4.0 2.5.0
tauri-bundler 2.4.0 2.4.1
tauri-runtime 2.6.0 2.6.1
tauri-runtime-wry 2.6.0 2.6.1
tauri-codegen 2.2.0 2.3.0
tauri-macros 2.2.0 2.2.1
tauri-plugin 2.2.0 2.2.1
tauri-build 2.2.0 2.2.1
tauri 2.5.0 2.6.0
@tauri-apps/cli 2.5.0 2.5.1
tauri-cli 2.5.0 2.5.1

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@FabianLars
Copy link
Member

What about buildOnly/prodOnly (whatever you wanna call it)?

@lucasfernog
Copy link
Member Author

What about buildOnly/prodOnly (whatever you wanna call it)?

the main idea of devOnly is that you could enable for instance connecting to a localhost server in dev mode only, not affecting the security scope of a prod app. I don't see value in the opposite - if you allow connecting to the real API backend for instance, that doesn't impact the security of the dev mode.

@amrbashir
Copy link
Member

How about just allowing to pass a capability from CLI, this way you can cover the dev only situation and potentially other environment specific capabilities

The problem is all capabilities files are active by default and so we need to pair this with should a config option to select which capabilities file should be loaded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📬Proposal
Development

Successfully merging this pull request may close these issues.

3 participants