chore: fix various typos (#9131)

This commit is contained in:
Dimitris Apostolou 2024-03-11 16:25:20 +02:00 committed by GitHub
parent ba0206d8a3
commit 26f0f71a40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with 56 additions and 56 deletions

View File

@ -294,7 +294,7 @@ impl WindowsAttributes {
/// # Example /// # Example
/// ///
/// The following manifest will brand the exe as requesting administrator privileges. /// The following manifest will brand the exe as requesting administrator privileges.
/// Thus, everytime it is executed, a Windows UAC dialog will appear. /// Thus, every time it is executed, a Windows UAC dialog will appear.
/// ///
/// ```rust,no_run /// ```rust,no_run
/// let mut windows = tauri_build::WindowsAttributes::new(); /// let mut windows = tauri_build::WindowsAttributes::new();

View File

@ -183,12 +183,12 @@ fn insert_into_xml(xml: &str, block_identifier: &str, parent_tag: &str, contents
} }
if let Some(index) = line.find(&parent_closing_tag) { if let Some(index) = line.find(&parent_closing_tag) {
let identation = " ".repeat(index + 4); let indentation = " ".repeat(index + 4);
rewritten.push(format!("{}{}", identation, block_comment)); rewritten.push(format!("{}{}", indentation, block_comment));
for l in contents.split('\n') { for l in contents.split('\n') {
rewritten.push(format!("{}{}", identation, l)); rewritten.push(format!("{}{}", indentation, l));
} }
rewritten.push(format!("{}{}", identation, block_comment)); rewritten.push(format!("{}{}", indentation, block_comment));
} }
rewritten.push(line.to_string()); rewritten.push(line.to_string());

View File

@ -429,7 +429,7 @@ pub trait WebviewDispatch<T: UserEvent>: Debug + Clone + Send + Sync + Sized + '
// SETTER // SETTER
/// Naviagte to the given URL. /// Navigate to the given URL.
fn navigate(&self, url: Url) -> Result<()>; fn navigate(&self, url: Url) -> Result<()>;
/// Opens the dialog to prints the contents of the webview. /// Opens the dialog to prints the contents of the webview.
@ -517,7 +517,7 @@ pub trait WindowDispatch<T: UserEvent>: Debug + Clone + Send + Sync + Sized + 's
/// - **Linux / iOS / Android:** Unsupported. /// - **Linux / iOS / Android:** Unsupported.
fn is_maximizable(&self) -> Result<bool>; fn is_maximizable(&self) -> Result<bool>;
/// Gets the window's native minize button state. /// Gets the window's native minimize button state.
/// ///
/// ## Platform-specific /// ## Platform-specific
/// ///

View File

@ -122,7 +122,7 @@ pub enum ParseIdentifierError {
/// Identifier is too long. /// Identifier is too long.
#[error("identifiers cannot be longer than {}, found {0}", MAX_LEN_IDENTIFIER)] #[error("identifiers cannot be longer than {}, found {0}", MAX_LEN_IDENTIFIER)]
Humungous(usize), Humongous(usize),
/// Identifier is not in a valid format. /// Identifier is not in a valid format.
#[error("identifiers can only include lowercase ASCII, hyphens which are not leading or trailing, and a single colon if using a prefix")] #[error("identifiers can only include lowercase ASCII, hyphens which are not leading or trailing, and a single colon if using a prefix")]
@ -158,7 +158,7 @@ impl TryFrom<String> for Identifier {
let mut bytes = value.bytes(); let mut bytes = value.bytes();
if bytes.len() > MAX_LEN_IDENTIFIER { if bytes.len() > MAX_LEN_IDENTIFIER {
return Err(Self::Error::Humungous(bytes.len())); return Err(Self::Error::Humongous(bytes.len()));
} }
// grab the first byte only before parsing the rest // grab the first byte only before parsing the rest
@ -168,16 +168,16 @@ impl TryFrom<String> for Identifier {
.ok_or(Self::Error::InvalidFormat)?; .ok_or(Self::Error::InvalidFormat)?;
let mut idx = 0; let mut idx = 0;
let mut seperator = None; let mut separator = None;
for byte in bytes { for byte in bytes {
idx += 1; // we already consumed first item idx += 1; // we already consumed first item
match prev.next(byte) { match prev.next(byte) {
None => return Err(Self::Error::InvalidFormat), None => return Err(Self::Error::InvalidFormat),
Some(next @ ValidByte::Byte(_)) => prev = next, Some(next @ ValidByte::Byte(_)) => prev = next,
Some(ValidByte::Separator) => { Some(ValidByte::Separator) => {
if seperator.is_none() { if separator.is_none() {
// safe to unwrap because idx starts at 1 and cannot go over MAX_IDENTIFIER_LEN // safe to unwrap because idx starts at 1 and cannot go over MAX_IDENTIFIER_LEN
seperator = Some(idx.try_into().unwrap()); separator = Some(idx.try_into().unwrap());
prev = ValidByte::Separator prev = ValidByte::Separator
} else { } else {
return Err(Self::Error::MultipleSeparators); return Err(Self::Error::MultipleSeparators);
@ -198,7 +198,7 @@ impl TryFrom<String> for Identifier {
Ok(Self { Ok(Self {
inner: value, inner: value,
separator: seperator, separator,
}) })
} }
} }

View File

@ -244,7 +244,7 @@ pub enum ExecutionContext {
/// A local URL is used (the Tauri app URL). /// A local URL is used (the Tauri app URL).
#[default] #[default]
Local, Local,
/// Remote URL is tring to use the IPC. /// Remote URL is trying to use the IPC.
Remote { Remote {
/// The URL trying to access the IPC (URL pattern). /// The URL trying to access the IPC (URL pattern).
url: RemoteUrlPattern, url: RemoteUrlPattern,

View File

@ -196,7 +196,7 @@ pub enum RunEvent {
ExitRequested { ExitRequested {
/// Exit code. /// Exit code.
/// [`Option::None`] when the exit is requested by user interaction, /// [`Option::None`] when the exit is requested by user interaction,
/// [`Option::Some`] when requested programatically via [`AppHandle#method.exit`] and [`AppHandle#method.restart`]. /// [`Option::Some`] when requested programmatically via [`AppHandle#method.exit`] and [`AppHandle#method.restart`].
code: Option<i32>, code: Option<i32>,
/// Event API /// Event API
api: ExitRequestApi, api: ExitRequestApi,
@ -542,7 +542,7 @@ macro_rules! shared_app_impl {
self.manager.tray.icons.lock().unwrap().first().cloned() self.manager.tray.icons.lock().unwrap().first().cloned()
} }
/// Removes the first tray icon registerd, usually the one configured in /// Removes the first tray icon registered, usually the one configured in
/// tauri config file, from tauri's internal state and returns it. /// tauri config file, from tauri's internal state and returns it.
/// ///
/// Note that dropping the returned icon, will cause the tray icon to disappear. /// Note that dropping the returned icon, will cause the tray icon to disappear.

View File

@ -526,7 +526,7 @@ impl RuntimeAuthority {
} }
} }
/// List of allowed and denied objects that match either the command-specific or plugin global scope criterias. /// List of allowed and denied objects that match either the command-specific or plugin global scope criteria.
#[derive(Debug)] #[derive(Debug)]
pub struct ScopeValue<T: ScopeObject> { pub struct ScopeValue<T: ScopeObject> {
allow: Arc<Vec<Arc<T>>>, allow: Arc<Vec<Arc<T>>>,

View File

@ -16,7 +16,7 @@ pub struct MenuManager<R: Runtime> {
/// A set containing a reference to the active menus, including /// A set containing a reference to the active menus, including
/// the app-wide menu and the window-specific menus /// the app-wide menu and the window-specific menus
/// ///
/// This should be mainly used to acceess [`Menu::haccel`] /// This should be mainly used to access [`Menu::haccel`]
/// to setup the accelerator handling in the event loop /// to setup the accelerator handling in the event loop
pub menus: Arc<Mutex<HashMap<MenuId, Menu<R>>>>, pub menus: Arc<Mutex<HashMap<MenuId, Menu<R>>>>,
/// The menu set to all windows. /// The menu set to all windows.

View File

@ -4,7 +4,7 @@
#![cfg(desktop)] #![cfg(desktop)]
//! A module containting menu builder types //! A module containing menu builder types
mod menu; mod menu;
pub use menu::MenuBuilder; pub use menu::MenuBuilder;

View File

@ -253,7 +253,7 @@ impl<R: Runtime> Menu<R> {
/// Add a menu item to the end of this menu. /// Add a menu item to the end of this menu.
/// ///
/// ## Platform-spcific: /// ## Platform-specific:
/// ///
/// - **macOS:** Only [`Submenu`] can be added to the menu. /// - **macOS:** Only [`Submenu`] can be added to the menu.
/// ///
@ -268,7 +268,7 @@ impl<R: Runtime> Menu<R> {
/// Add menu items to the end of this menu. It calls [`Menu::append`] in a loop internally. /// Add menu items to the end of this menu. It calls [`Menu::append`] in a loop internally.
/// ///
/// ## Platform-spcific: /// ## Platform-specific:
/// ///
/// - **macOS:** Only [`Submenu`] can be added to the menu /// - **macOS:** Only [`Submenu`] can be added to the menu
/// ///
@ -283,7 +283,7 @@ impl<R: Runtime> Menu<R> {
/// Add a menu item to the beginning of this menu. /// Add a menu item to the beginning of this menu.
/// ///
/// ## Platform-spcific: /// ## Platform-specific:
/// ///
/// - **macOS:** Only [`Submenu`] can be added to the menu /// - **macOS:** Only [`Submenu`] can be added to the menu
/// ///
@ -298,7 +298,7 @@ impl<R: Runtime> Menu<R> {
/// Add menu items to the beginning of this menu. It calls [`Menu::insert_items`] with position of `0` internally. /// Add menu items to the beginning of this menu. It calls [`Menu::insert_items`] with position of `0` internally.
/// ///
/// ## Platform-spcific: /// ## Platform-specific:
/// ///
/// - **macOS:** Only [`Submenu`] can be added to the menu /// - **macOS:** Only [`Submenu`] can be added to the menu
/// ///
@ -307,9 +307,9 @@ impl<R: Runtime> Menu<R> {
self.insert_items(items, 0) self.insert_items(items, 0)
} }
/// Insert a menu item at the specified `postion` in the menu. /// Insert a menu item at the specified `position` in the menu.
/// ///
/// ## Platform-spcific: /// ## Platform-specific:
/// ///
/// - **macOS:** Only [`Submenu`] can be added to the menu /// - **macOS:** Only [`Submenu`] can be added to the menu
/// ///
@ -322,9 +322,9 @@ impl<R: Runtime> Menu<R> {
.map_err(Into::into) .map_err(Into::into)
} }
/// Insert menu items at the specified `postion` in the menu. /// Insert menu items at the specified `position` in the menu.
/// ///
/// ## Platform-spcific: /// ## Platform-specific:
/// ///
/// - **macOS:** Only [`Submenu`] can be added to the menu /// - **macOS:** Only [`Submenu`] can be added to the menu
/// ///

View File

@ -153,7 +153,7 @@ gen_wrappers!(
MenuItem(MenuItemInner, MenuItem), MenuItem(MenuItemInner, MenuItem),
/// A type that is a submenu inside a [`Menu`] or [`Submenu`] /// A type that is a submenu inside a [`Menu`] or [`Submenu`]
Submenu(SubmenuInner, Submenu), Submenu(SubmenuInner, Submenu),
/// A predefined (native) menu item which has a predfined behavior by the OS or by this crate. /// A predefined (native) menu item which has a predefined behavior by the OS or by this crate.
PredefinedMenuItem(PredefinedMenuItemInner, Predefined), PredefinedMenuItem(PredefinedMenuItemInner, Predefined),
/// A menu item inside a [`Menu`] or [`Submenu`] /// A menu item inside a [`Menu`] or [`Submenu`]
/// and usually contains a text and a check mark or a similar toggle /// and usually contains a text and a check mark or a similar toggle
@ -228,7 +228,7 @@ pub struct AboutMetadata<'a> {
pub struct AboutMetadataBuilder<'a>(AboutMetadata<'a>); pub struct AboutMetadataBuilder<'a>(AboutMetadata<'a>);
impl<'a> AboutMetadataBuilder<'a> { impl<'a> AboutMetadataBuilder<'a> {
/// Create a new about metdata builder. /// Create a new about metadata builder.
pub fn new() -> Self { pub fn new() -> Self {
Default::default() Default::default()
} }

View File

@ -191,7 +191,7 @@ impl<R: Runtime> Submenu<R> {
self.insert_items(items, 0) self.insert_items(items, 0)
} }
/// Insert a menu item at the specified `postion` in this submenu. /// Insert a menu item at the specified `position` in this submenu.
pub fn insert(&self, item: &dyn IsMenuItem<R>, position: usize) -> crate::Result<()> { pub fn insert(&self, item: &dyn IsMenuItem<R>, position: usize) -> crate::Result<()> {
let kind = item.kind(); let kind = item.kind();
run_item_main_thread!(self, |self_: Self| { run_item_main_thread!(self, |self_: Self| {
@ -202,7 +202,7 @@ impl<R: Runtime> Submenu<R> {
.map_err(Into::into) .map_err(Into::into)
} }
/// Insert menu items at the specified `postion` in this submenu. /// Insert menu items at the specified `position` in this submenu.
pub fn insert_items(&self, items: &[&dyn IsMenuItem<R>], position: usize) -> crate::Result<()> { pub fn insert_items(&self, items: &[&dyn IsMenuItem<R>], position: usize) -> crate::Result<()> {
for (i, item) in items.iter().enumerate() { for (i, item) in items.iter().enumerate() {
self.insert(*item, position + i)? self.insert(*item, position + i)?
@ -260,7 +260,7 @@ impl<R: Runtime> Submenu<R> {
/// Set the text for this submenu. `text` could optionally contain /// Set the text for this submenu. `text` could optionally contain
/// an `&` before a character to assign this character as the mnemonic /// an `&` before a character to assign this character as the mnemonic
/// for this submenu. To display a `&` without assigning a mnemenonic, use `&&`. /// for this submenu. To display a `&` without assigning a mnemonic, use `&&`.
pub fn set_text<S: AsRef<str>>(&self, text: S) -> crate::Result<()> { pub fn set_text<S: AsRef<str>>(&self, text: S) -> crate::Result<()> {
let text = text.as_ref().to_string(); let text = text.as_ref().to_string();
run_item_main_thread!(self, |self_: Self| (*self_.0).as_ref().set_text(text)) run_item_main_thread!(self, |self_: Self| (*self_.0).as_ref().set_text(text))

View File

@ -518,7 +518,7 @@ impl<R: Runtime, C: DeserializeOwned> Builder<R, C> {
/// ///
/// # Known limitations /// # Known limitations
/// ///
/// URI scheme protocols are registered when the webview is created. Due to this limitation, if the plugin is registed after a webview has been created, this protocol won't be available. /// URI scheme protocols are registered when the webview is created. Due to this limitation, if the plugin is registered after a webview has been created, this protocol won't be available.
/// ///
/// # Arguments /// # Arguments
/// ///

View File

@ -51,7 +51,7 @@ impl Default for ClickType {
/// ///
/// ## Platform-specific: /// ## Platform-specific:
/// ///
/// - **Linux**: Unsupported. The event is not emmited even though the icon is shown, /// - **Linux**: Unsupported. The event is not emitted even though the icon is shown,
/// the icon will still show a context menu on right click. /// the icon will still show a context menu on right click.
#[derive(Debug, Clone, Default, Serialize)] #[derive(Debug, Clone, Default, Serialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]

View File

@ -1243,7 +1243,7 @@ impl<R: Runtime> WebviewWindow<R> {
self.webview.window().set_maximizable(maximizable) self.webview.window().set_maximizable(maximizable)
} }
/// Determines if this window's native minize button should be enabled. /// Determines if this window's native minimize button should be enabled.
/// ///
/// ## Platform-specific /// ## Platform-specific
/// ///

View File

@ -1574,7 +1574,7 @@ impl<R: Runtime> Window<R> {
.map_err(Into::into) .map_err(Into::into)
} }
/// Determines if this window's native minize button should be enabled. /// Determines if this window's native minimize button should be enabled.
/// ///
/// ## Platform-specific /// ## Platform-specific
/// ///

View File

@ -22,7 +22,7 @@ export default defineConfig({
} }
}, },
// Vite optons tailored for Tauri development and only applied in `tauri dev` or `tauri build` // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
// prevent vite from obscuring rust errors // prevent vite from obscuring rust errors
clearScreen: false, clearScreen: false,
// tauri expects a fixed port, fail if that port is not available // tauri expects a fixed port, fail if that port is not available

View File

@ -107,7 +107,7 @@ export interface PredefinedMenuItemOptions {
} }
} }
/** A predefined (native) menu item which has a predfined behavior by the OS or by tauri. */ /** A predefined (native) menu item which has a predefined behavior by the OS or by tauri. */
export class PredefinedMenuItem extends MenuItemBase { export class PredefinedMenuItem extends MenuItemBase {
/** @ignore */ /** @ignore */
protected constructor(rid: number, id: string) { protected constructor(rid: number, id: string) {

View File

@ -11,7 +11,7 @@ import { Image, transformImage } from './image'
* *
* #### Platform-specific: * #### Platform-specific:
* *
* - **Linux**: Unsupported. The event is not emmited even though the icon is shown, * - **Linux**: Unsupported. The event is not emitted even though the icon is shown,
* the icon will still show a context menu on right click. * the icon will still show a context menu on right click.
*/ */
export interface TrayIconEvent { export interface TrayIconEvent {
@ -45,7 +45,7 @@ export interface TrayIconEvent {
/** {@link TrayIcon.new|`TrayIcon`} creation options */ /** {@link TrayIcon.new|`TrayIcon`} creation options */
export interface TrayIconOptions { export interface TrayIconOptions {
/** The tray icon id. If undefined, a random one will be assigend */ /** The tray icon id. If undefined, a random one will be assigned */
id?: string id?: string
/** The tray icon menu */ /** The tray icon menu */
menu?: Menu | Submenu menu?: Menu | Submenu

View File

@ -168,7 +168,7 @@ class WebviewWindow {
} }
/** /**
* Listen to an emitted event on this webivew window only once. * Listen to an emitted event on this webview window only once.
* *
* @example * @example
* ```typescript * ```typescript
@ -203,7 +203,7 @@ class WebviewWindow {
// Order matters, we use window APIs by default // Order matters, we use window APIs by default
applyMixins(WebviewWindow, [Window, Webview]) applyMixins(WebviewWindow, [Window, Webview])
/** Extends a base class by other specifed classes, wihtout overriding existing properties */ /** Extends a base class by other specified classes, without overriding existing properties */
function applyMixins( function applyMixins(
baseClass: { prototype: unknown }, baseClass: { prototype: unknown },
extendedClasses: unknown extendedClasses: unknown

View File

@ -98,7 +98,7 @@ pub fn bundle_project(settings: Settings) -> crate::Result<Vec<Bundle>> {
PackageType::MacOsBundle => macos::app::bundle_project(&settings)?, PackageType::MacOsBundle => macos::app::bundle_project(&settings)?,
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
PackageType::IosBundle => macos::ios::bundle_project(&settings)?, PackageType::IosBundle => macos::ios::bundle_project(&settings)?,
// dmg is dependant of MacOsBundle, we send our bundles to prevent rebuilding // dmg is dependent of MacOsBundle, we send our bundles to prevent rebuilding
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
PackageType::Dmg => { PackageType::Dmg => {
let bundled = macos::dmg::bundle_project(&settings, &bundles)?; let bundled = macos::dmg::bundle_project(&settings, &bundles)?;
@ -122,7 +122,7 @@ pub fn bundle_project(settings: Settings) -> crate::Result<Vec<Bundle>> {
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
PackageType::AppImage => linux::appimage::bundle_project(&settings)?, PackageType::AppImage => linux::appimage::bundle_project(&settings)?,
// updater is dependant of multiple bundle, we send our bundles to prevent rebuilding // updater is dependent of multiple bundle, we send our bundles to prevent rebuilding
PackageType::Updater => { PackageType::Updater => {
if !package_types.iter().any(|p| { if !package_types.iter().any(|p| {
matches!( matches!(

View File

@ -16,7 +16,7 @@
; !insertmacro APP_ASSOCIATE "txt" "myapp.textfile" "Description of txt files" \ ; !insertmacro APP_ASSOCIATE "txt" "myapp.textfile" "Description of txt files" \
; "$INSTDIR\myapp.exe,0" "Open with myapp" "$INSTDIR\myapp.exe $\"%1$\"" ; "$INSTDIR\myapp.exe,0" "Open with myapp" "$INSTDIR\myapp.exe $\"%1$\""
; ;
; Never insert the APP_ASSOCIATE macro multiple times, it is only ment ; Never insert the APP_ASSOCIATE macro multiple times, it is only meant
; to associate an application with a single file and using the ; to associate an application with a single file and using the
; the "open" verb as default. To add more verbs (actions) to a file ; the "open" verb as default. To add more verbs (actions) to a file
; use the APP_ASSOCIATE_ADDVERB macro. ; use the APP_ASSOCIATE_ADDVERB macro.

View File

@ -130,18 +130,18 @@ VIAddVersionKey "ProductVersion" "${VERSION}"
; 4. Custom page to ask user if he wants to reinstall/uninstall ; 4. Custom page to ask user if he wants to reinstall/uninstall
; only if a previous installtion was detected ; only if a previous installation was detected
Var ReinstallPageCheck Var ReinstallPageCheck
Page custom PageReinstall PageLeaveReinstall Page custom PageReinstall PageLeaveReinstall
Function PageReinstall Function PageReinstall
; Uninstall previous WiX installation if exists. ; Uninstall previous WiX installation if exists.
; ;
; A WiX installer stores the isntallation info in registry ; A WiX installer stores the installation info in registry
; using a UUID and so we have to loop through all keys under ; using a UUID and so we have to loop through all keys under
; `HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall` ; `HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall`
; and check if `DisplayName` and `Publisher` keys match ${PRODUCTNAME} and ${MANUFACTURER} ; and check if `DisplayName` and `Publisher` keys match ${PRODUCTNAME} and ${MANUFACTURER}
; ;
; This has a potentional issue that there maybe another installation that matches ; This has a potential issue that there maybe another installation that matches
; our ${PRODUCTNAME} and ${MANUFACTURER} but wasn't installed by our WiX installer, ; our ${PRODUCTNAME} and ${MANUFACTURER} but wasn't installed by our WiX installer,
; however, this should be fine since the user will have to confirm the uninstallation ; however, this should be fine since the user will have to confirm the uninstallation
; and they can chose to abort it if doesn't make sense. ; and they can chose to abort it if doesn't make sense.
@ -257,7 +257,7 @@ Function PageLeaveReinstall
; $R5 == "1" -> different versions ; $R5 == "1" -> different versions
; $R5 == "2" -> same version ; $R5 == "2" -> same version
; ;
; $R1 holds the radio buttons state. its meaning is dependant on the context ; $R1 holds the radio buttons state. its meaning is dependent on the context
StrCmp $R5 "1" 0 +2 ; Existing install is not the same version? StrCmp $R5 "1" 0 +2 ; Existing install is not the same version?
StrCmp $R1 "1" reinst_uninstall reinst_done ; $R1 == "1", then user chose to uninstall existing version, otherwise skip uninstalling StrCmp $R1 "1" reinst_uninstall reinst_done ; $R1 == "1", then user chose to uninstall existing version, otherwise skip uninstalling
StrCmp $R1 "1" reinst_done ; Same version? skip uninstalling StrCmp $R1 "1" reinst_done ; Same version? skip uninstalling
@ -297,7 +297,7 @@ Function PageLeaveReinstall
reinst_done: reinst_done:
FunctionEnd FunctionEnd
; 5. Choose install directoy page ; 5. Choose install directory page
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive
!insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_DIRECTORY

View File

@ -131,7 +131,7 @@ pub fn verify_file_hash<P: AsRef<Path>>(
verify_hash(&data, hash, hash_algorithm) verify_hash(&data, hash, hash_algorithm)
} }
/// Extracts the zips from memory into a useable path. /// Extracts the zips from memory into a usable path.
pub fn extract_zip(data: &[u8], path: &Path) -> crate::Result<()> { pub fn extract_zip(data: &[u8], path: &Path) -> crate::Result<()> {
let cursor = Cursor::new(data); let cursor = Cursor::new(data);

View File

@ -275,7 +275,7 @@ fn device_prompt<'a>(env: &'_ Env, target: Option<&str>) -> Result<Device<'a>> {
return Ok(device); return Ok(device);
} }
if tries >= 3 { if tries >= 3 {
log::info!("Waiting for emulator to start... (maybe the emulator is unathorized or offline, run `adb devices` to check)"); log::info!("Waiting for emulator to start... (maybe the emulator is unauthorized or offline, run `adb devices` to check)");
} else { } else {
log::info!("Waiting for emulator to start..."); log::info!("Waiting for emulator to start...");
} }

View File

@ -38,7 +38,7 @@ enum Commands {
#[clap(about = "Initializes the Android project for an existing Tauri plugin")] #[clap(about = "Initializes the Android project for an existing Tauri plugin")]
pub struct InitOptions { pub struct InitOptions {
/// Name of your Tauri plugin. Must match the current plugin's name. /// Name of your Tauri plugin. Must match the current plugin's name.
/// If not specified, it will be infered from the current directory. /// If not specified, it will be inferred from the current directory.
plugin_name: Option<String>, plugin_name: Option<String>,
/// The output directory. /// The output directory.
#[clap(short, long)] #[clap(short, long)]

View File

@ -26,7 +26,7 @@ pub const TEMPLATE_DIR: Dir<'_> = include_dir!("templates/plugin");
#[clap(about = "Initialize a Tauri plugin project on an existing directory")] #[clap(about = "Initialize a Tauri plugin project on an existing directory")]
pub struct Options { pub struct Options {
/// Name of your Tauri plugin. /// Name of your Tauri plugin.
/// If not specified, it will be infered from the current directory. /// If not specified, it will be inferred from the current directory.
pub(crate) plugin_name: Option<String>, pub(crate) plugin_name: Option<String>,
/// Initializes a Tauri plugin without the TypeScript API /// Initializes a Tauri plugin without the TypeScript API
#[clap(long)] #[clap(long)]

View File

@ -36,7 +36,7 @@ enum Commands {
#[clap(about = "Initializes the iOS project for an existing Tauri plugin")] #[clap(about = "Initializes the iOS project for an existing Tauri plugin")]
pub struct InitOptions { pub struct InitOptions {
/// Name of your Tauri plugin. Must match the current plugin's name. /// Name of your Tauri plugin. Must match the current plugin's name.
/// If not specified, it will be infered from the current directory. /// If not specified, it will be inferred from the current directory.
plugin_name: Option<String>, plugin_name: Option<String>,
/// The output directory. /// The output directory.
#[clap(short, long)] #[clap(short, long)]

View File

@ -8,7 +8,7 @@ const mobile = !!/android|ios/.exec(process.env.TAURI_ENV_PLATFORM);
export default defineConfig({ export default defineConfig({
plugins: [svelte()], plugins: [svelte()],
// Vite optons tailored for Tauri development and only applied in `tauri dev` or `tauri build` // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
// prevent vite from obscuring rust errors // prevent vite from obscuring rust errors
clearScreen: false, clearScreen: false,
// tauri expects a fixed port, fail if that port is not available // tauri expects a fixed port, fail if that port is not available