chore(utils): remove unused RemoteDomainAccessScope (#9073)

This commit is contained in:
Lucas Fernandes Nogueira 2024-03-04 21:10:45 -03:00 committed by GitHub
parent 7cec1049e8
commit 6a47dd212c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1446,23 +1446,6 @@ impl Default for DisabledCspModificationKind {
}
}
/// External command access definition.
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct RemoteDomainAccessScope {
/// The URL scheme to allow. By default, all schemas are allowed.
pub scheme: Option<String>,
/// The domain to allow.
pub domain: String,
/// The list of window labels this scope applies to.
pub windows: Vec<String>,
/// The list of plugins that are allowed in this scope.
/// The names should be without the `tauri-plugin-` prefix, for example `"store"` for `tauri-plugin-store`.
#[serde(default)]
pub plugins: Vec<String>,
}
/// Protocol scope definition.
/// It is a list of glob patterns that restrict the API access from the webview.
///
@ -2472,24 +2455,6 @@ mod build {
}
}
impl ToTokens for RemoteDomainAccessScope {
fn to_tokens(&self, tokens: &mut TokenStream) {
let scheme = opt_str_lit(self.scheme.as_ref());
let domain = str_lit(&self.domain);
let windows = vec_lit(&self.windows, str_lit);
let plugins = vec_lit(&self.plugins, str_lit);
literal_struct!(
tokens,
::tauri::utils::config::RemoteDomainAccessScope,
scheme,
domain,
windows,
plugins
);
}
}
impl ToTokens for CapabilityEntry {
fn to_tokens(&self, tokens: &mut TokenStream) {
let prefix = quote! { ::tauri::utils::config::CapabilityEntry };