Skip to content

Commit

Permalink
Spelling (tauri-apps#4880)
Browse files Browse the repository at this point in the history
Co-authored-by: Lorenzo Lewis <[email protected]>
Co-authored-by: Amr Bashir <[email protected]>
  • Loading branch information
3 people authored Sep 3, 2022
1 parent 14f337d commit 8fd79b8
Show file tree
Hide file tree
Showing 46 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Prerequisites are mainly derived from VS Code's instructions for usage of develo

### A note on filesystem performance

Due to limititations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy opearations (`cargo build`, `yarn install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.
Due to limitations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy operations (`cargo build`, `yarn install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.

To do this, open your project with VS Code and run **Remote-Containers: Clone Repository in Container Volume...** from the Command Palette (<kbd>F1</kbd>).

Expand Down
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ First, [join our Discord server](https://discord.gg/SpmNs4S) and let us know tha

To set up your machine for development, follow the [Tauri setup guide](https://tauri.app/v1/guides/getting-started/prerequisites/) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [Yarn](https://yarnpkg.com/), it is only required if you are developing the Node CLI or API packages (`tooling/cli/node` and `tooling/api`). Next, fork and clone this repo. It is structured as a monorepo, which means that all the various Tauri packages are under the same repository. The development process varies depending on what part of Tauri you are contributing to, see the guides below for per-package instructions.

Some Tauri packages will be automatically built when running one of the examples. Others, however, will need to be built beforehand. To build these automatically, run the `.scripts/setup.sh` (Linux and macOS) or `.scripts/setup.ps1` (Windows) script. This will install the Rust and Node.js CLI and build the JS API. After that, you should be able to run all the examples. Note that the setup script should be executed from the root folder of the respository in order to run correctly.
Some Tauri packages will be automatically built when running one of the examples. Others, however, will need to be built beforehand. To build these automatically, run the `.scripts/setup.sh` (Linux and macOS) or `.scripts/setup.ps1` (Windows) script. This will install the Rust and Node.js CLI and build the JS API. After that, you should be able to run all the examples. Note that the setup script should be executed from the root folder of the repository in order to run correctly.

### Packages Overview

Expand Down Expand Up @@ -87,4 +87,4 @@ The JS API provides bindings between the developer's JS in the Webview and the b

## Financial Contribution

Tauri is an MIT-licensed open source project. Its ongoing development can be supported via [Github Sponsors](https://github.com/sponsors/nothingismagick) or [Open Collective](https://opencollective.com/tauri). We prefer Github Sponsors as donations made are doubled through the matching fund program.
Tauri is an MIT-licensed open source project. Its ongoing development can be supported via [GitHub Sponsors](https://github.com/sponsors/nothingismagick) or [Open Collective](https://opencollective.com/tauri). We prefer GitHub Sponsors as donations made are doubled through the matching fund program.
2 changes: 1 addition & 1 deletion .github/workflows/artifacts-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ concurrency:
cancel-in-progress: true

jobs:
build-artifacs:
build-artifacts:
runs-on: ${{ matrix.platform }}

strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
python-version: '3.x'
architecture: x64

- name: install depedencies
- name: install dependencies
run: |
python -m pip install --upgrade pip
sudo apt-get update
Expand Down
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This is common code that is reused in many places and offers useful utilities li

### Tauri Tooling
#### [api](https://github.com/tauri-apps/tauri/tree/dev/tooling/api) [TS -> JS]
A typescript library that creates `cjs` and `esm` Javascript endpoints for you to import into your Frontend framework so that the Webview can call and listen to backend activity. We also ship the pure typescript, because for some frameworks this is more optimal. It uses the message passing of webviews to their hosts.
A TypeScript library that creates `cjs` and `esm` JavaScript endpoints for you to import into your Frontend framework so that the Webview can call and listen to backend activity. We also ship the pure TypeScript, because for some frameworks this is more optimal. It uses the message passing of webviews to their hosts.

#### [bundler](https://github.com/tauri-apps/tauri/tree/dev/tooling/bundler) [RUST / SHELL]
The bundler is a library that builds a Tauri App for the platform triple it detects / is told. At the moment it currently supports macOS, Windows and Linux - but in the near future will support mobile platforms as well. May be used outside of Tauri projects.
Expand Down
2 changes: 1 addition & 1 deletion core/tauri-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub struct WindowsAttributes {
///
/// For MSVC the Windows SDK has to be installed. It comes with the resource compiler rc.exe.
/// This should be set to the root directory of the Windows SDK, e.g., "C:\Program Files (x86)\Windows Kits\10" or,
/// if multiple 10 versions are installed, set it directly to the corret bin directory "C:\Program Files (x86)\Windows Kits\10\bin\10.0.14393.0\x64"
/// if multiple 10 versions are installed, set it directly to the correct bin directory "C:\Program Files (x86)\Windows Kits\10\bin\10.0.14393.0\x64"
///
/// If it is left unset, it will look up a path in the registry, i.e. HKLM\SOFTWARE\Microsoft\Windows Kits\Installed Roots
sdk_dir: Option<PathBuf>,
Expand Down
2 changes: 1 addition & 1 deletion core/tauri-codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub fn get_config(path: &Path) -> Result<(Config, PathBuf), CodegenConfigError>

let config = serde_json::from_value(config)?;

// Reset workding directory.
// Reset working directory.
std::env::set_current_dir(old_cwd).map_err(CodegenConfigError::CurrentDir)?;

Ok((config, parent))
Expand Down
2 changes: 1 addition & 1 deletion core/tauri-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub fn derive_command_module(input: TokenStream) -> TokenStream {
/// The `run` method takes a `tauri::endpoints::InvokeContext`
/// and returns a `tauri::Result<tauri::endpoints::InvokeResponse>`.
/// It matches on each enum variant and call a method with name equal to the variant name, lowercased and snake_cased,
/// passing the the context and the variant's fields as arguments.
/// passing the context and the variant's fields as arguments.
/// That function must also return the same `Result<InvokeResponse>`.
#[doc(hidden)]
#[proc_macro_attribute]
Expand Down
2 changes: 1 addition & 1 deletion core/tauri-runtime/src/webview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pub trait WindowBuilder: WindowBuilderBase {
#[must_use]
fn visible(self, visible: bool) -> Self;

/// Whether the the window should be transparent. If this is true, writing colors
/// Whether the window should be transparent. If this is true, writing colors
/// with alpha values different than `1.0` will produce a transparent window.
#[cfg(any(not(target_os = "macos"), feature = "macos-private-api"))]
#[cfg_attr(
Expand Down
4 changes: 2 additions & 2 deletions core/tauri-utils/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ pub struct CliArg {
pub required: bool,
/// Sets an arg that override this arg's required setting
/// i.e. this arg will be required unless this other argument is present.
#[serde(alias = "requred-unless-present")]
#[serde(alias = "required-unless-present")]
pub required_unless_present: Option<String>,
/// Sets args that override this arg's required setting
/// i.e. this arg will be required unless all these other arguments are present.
Expand Down Expand Up @@ -2551,7 +2551,7 @@ pub struct PackageConfig {
/// App name.
#[serde(alias = "product-name")]
pub product_name: Option<String>,
/// App version. It is a semver version number or a path to a `package.json` file contaning the `version` field.
/// App version. It is a semver version number or a path to a `package.json` file containing the `version` field.
#[serde(deserialize_with = "version_deserializer", default)]
pub version: Option<String>,
}
Expand Down
2 changes: 1 addition & 1 deletion core/tauri-utils/src/pattern/isolation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub enum Error {
#[error("CSPRNG error")]
Csprng(#[from] CsprngError),

/// Something went wrong with decryping an AES-GCM payload
/// Something went wrong with decrypting an AES-GCM payload
#[error("AES-GCM")]
Aes,

Expand Down
2 changes: 1 addition & 1 deletion core/tauri/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ Note: The order that event handlers are called when triggered is still non-deter
- The HTTP API was improved with client caching and better payload and response types.
- [a7bc472](https://www.github.com/tauri-apps/tauri/commit/a7bc472e994730071f960d09a12ac85296a080ae) refactor(core): improve HTTP API, closes [#1098](https://www.github.com/tauri-apps/tauri/pull/1098) ([#1237](https://www.github.com/tauri-apps/tauri/pull/1237)) on 2021-02-15
- [a6def70](https://www.github.com/tauri-apps/tauri/commit/a6def7066eec19c889b0f14cc1e475bf209a332e) Refactor(tauri): move tauri-api and tauri-updater to tauri ([#1455](https://www.github.com/tauri-apps/tauri/pull/1455)) on 2021-04-11
- Added new Javascript API to extract `name`, `version`, `tauri version` from the running application. We exposed `relaunch` and `exit` as well to control your application state.
- Added new JavaScript API to extract `name`, `version`, `tauri version` from the running application. We exposed `relaunch` and `exit` as well to control your application state.
- [e511d39](https://www.github.com/tauri-apps/tauri/commit/e511d3991041a974273a2674a9bf60230b7519ee) feat(api): Expose application metadata and functions to JS api - fix [#1387](https://www.github.com/tauri-apps/tauri/pull/1387) ([#1445](https://www.github.com/tauri-apps/tauri/pull/1445)) on 2021-04-08
- [a6def70](https://www.github.com/tauri-apps/tauri/commit/a6def7066eec19c889b0f14cc1e475bf209a332e) Refactor(tauri): move tauri-api and tauri-updater to tauri ([#1455](https://www.github.com/tauri-apps/tauri/pull/1455)) on 2021-04-11
- The event listener `once` kind was moved to a dedicated function.
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/api/dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ impl From<MessageDialogKind> for rfd::MessageLevel {
/// which makes them easier to use.
///
/// **NOTE:** You cannot block the main thread when executing the dialog APIs, so you must use the [`crate::api::dialog`] methods instead.
/// Examples of main thread context are the [`crate::App::run`] closure and non-async commmands.
/// Examples of main thread context are the [`crate::App::run`] closure and non-async commands.
pub mod blocking {
use super::{MessageDialogButtons, MessageDialogKind};
use crate::{Runtime, Window};
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ impl<R: Runtime> App<R> {
// we only listen for `tauri://update`
// once we receive the call, we check if an update is available or not
// if there is a new update we emit `tauri://update-available` with details
// this is the user responsabilities to display dialog and ask if user want to install
// this is the user responsibilities to display dialog and ask if user want to install
// to install the update you need to invoke the Event `tauri://update-install`
updater::listener(handle);
}
Expand Down
10 changes: 5 additions & 5 deletions core/tauri/src/endpoints/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type ChildId = u32;
type ChildStore = Arc<Mutex<HashMap<ChildId, crate::api::process::CommandChild>>>;

#[cfg(any(shell_execute, shell_sidecar))]
fn command_childs() -> &'static ChildStore {
fn command_child_store() -> &'static ChildStore {
use once_cell::sync::Lazy;
static STORE: Lazy<ChildStore> = Lazy::new(Default::default);
&STORE
Expand Down Expand Up @@ -160,12 +160,12 @@ impl Cmd {
let (mut rx, child) = command.spawn()?;

let pid = child.pid();
command_childs().lock().unwrap().insert(pid, child);
command_child_store().lock().unwrap().insert(pid, child);

crate::async_runtime::spawn(async move {
while let Some(event) = rx.recv().await {
if matches!(event, crate::api::process::CommandEvent::Terminated(_)) {
command_childs().lock().unwrap().remove(&pid);
command_child_store().lock().unwrap().remove(&pid);
}
let js = crate::api::ipc::format_callback(on_event_fn, &event)
.expect("unable to serialize CommandEvent");
Expand All @@ -184,7 +184,7 @@ impl Cmd {
pid: ChildId,
buffer: Buffer,
) -> super::Result<()> {
if let Some(child) = command_childs().lock().unwrap().get_mut(&pid) {
if let Some(child) = command_child_store().lock().unwrap().get_mut(&pid) {
match buffer {
Buffer::Text(t) => child.write(t.as_bytes())?,
Buffer::Raw(r) => child.write(&r)?,
Expand All @@ -195,7 +195,7 @@ impl Cmd {

#[module_command_handler(shell_script)]
fn kill_child<R: Runtime>(_context: InvokeContext<R>, pid: ChildId) -> super::Result<()> {
if let Some(child) = command_childs().lock().unwrap().remove(&pid) {
if let Some(child) = command_child_store().lock().unwrap().remove(&pid) {
child.kill()?;
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use tauri_macros::default_runtime;
pub type SetupHook<R> =
Box<dyn FnOnce(&mut App<R>) -> Result<(), Box<dyn std::error::Error>> + Send>;

/// A closure that is run everytime Tauri receives a message it doesn't explicitly handle.
/// A closure that is run every time Tauri receives a message it doesn't explicitly handle.
pub type InvokeHandler<R> = dyn Fn(Invoke<R>) + Send + Sync + 'static;

/// A closure that is responsible for respond a JS message.
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ pub struct InnerWindowManager<R: Runtime> {
pub(crate) tray_icon: Option<Icon>,

package_info: PackageInfo,
/// The webview protocols protocols available to all windows.
/// The webview protocols available to all windows.
uri_scheme_protocols: HashMap<String, Arc<CustomProtocol<R>>>,
/// The menu set to all windows.
menu: Option<Menu>,
Expand Down
20 changes: 10 additions & 10 deletions core/tauri/src/scope/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type EventListener = Box<dyn Fn(&Event) + Send>;
/// Scope for filesystem access.
#[derive(Clone)]
pub struct Scope {
alllowed_patterns: Arc<Mutex<HashSet<Pattern>>>,
allowed_patterns: Arc<Mutex<HashSet<Pattern>>>,
forbidden_patterns: Arc<Mutex<HashSet<Pattern>>>,
event_listeners: Arc<Mutex<HashMap<Uuid, EventListener>>>,
}
Expand All @@ -41,9 +41,9 @@ impl fmt::Debug for Scope {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Scope")
.field(
"alllowed_patterns",
"allowed_patterns",
&self
.alllowed_patterns
.allowed_patterns
.lock()
.unwrap()
.iter()
Expand Down Expand Up @@ -86,10 +86,10 @@ impl Scope {
env: &Env,
scope: &FsAllowlistScope,
) -> crate::Result<Self> {
let mut alllowed_patterns = HashSet::new();
let mut allowed_patterns = HashSet::new();
for path in scope.allowed_paths() {
if let Ok(path) = parse_path(config, package_info, env, path) {
push_pattern(&mut alllowed_patterns, path)?;
push_pattern(&mut allowed_patterns, path)?;
}
}

Expand All @@ -103,15 +103,15 @@ impl Scope {
}

Ok(Self {
alllowed_patterns: Arc::new(Mutex::new(alllowed_patterns)),
allowed_patterns: Arc::new(Mutex::new(allowed_patterns)),
forbidden_patterns: Arc::new(Mutex::new(forbidden_patterns)),
event_listeners: Default::default(),
})
}

/// The list of allowed patterns.
pub fn allowed_patterns(&self) -> HashSet<Pattern> {
self.alllowed_patterns.lock().unwrap().clone()
self.allowed_patterns.lock().unwrap().clone()
}

/// The list of forbidden patterns.
Expand Down Expand Up @@ -141,7 +141,7 @@ impl Scope {
pub fn allow_directory<P: AsRef<Path>>(&self, path: P, recursive: bool) -> crate::Result<()> {
let path = path.as_ref().to_path_buf();
{
let mut list = self.alllowed_patterns.lock().unwrap();
let mut list = self.allowed_patterns.lock().unwrap();

// allow the directory to be read
push_pattern(&mut list, &path)?;
Expand All @@ -157,7 +157,7 @@ impl Scope {
/// After this function has been called, the frontend will be able to use the Tauri API to read the contents of this file.
pub fn allow_file<P: AsRef<Path>>(&self, path: P) -> crate::Result<()> {
let path = path.as_ref();
push_pattern(&mut self.alllowed_patterns.lock().unwrap(), &path)?;
push_pattern(&mut self.allowed_patterns.lock().unwrap(), &path)?;
self.trigger(Event::PathAllowed(path.to_path_buf()));
Ok(())
}
Expand Down Expand Up @@ -212,7 +212,7 @@ impl Scope {
false
} else {
let allowed = self
.alllowed_patterns
.allowed_patterns
.lock()
.unwrap()
.iter()
Expand Down
8 changes: 4 additions & 4 deletions core/tauri/src/updater/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ impl<R: Runtime> UpdateBuilder<R> {
let mut last_error: Option<Error> = None;
for url in &self.urls {
// replace {{current_version}}, {{target}} and {{arch}} in the provided URL
// this is usefull if we need to query example
// this is useful if we need to query example
// https://releases.myapp.com/update/{{target}}/{{arch}}/{{current_version}}
// will be translated into ->
// https://releases.myapp.com/update/darwin/aarch64/1.0.0
Expand Down Expand Up @@ -420,7 +420,7 @@ impl<R: Runtime> UpdateBuilder<R> {
// Extracted remote metadata
let final_release = remote_release.ok_or(Error::ReleaseNotFound)?;

// did the announced version is greated than our current one?
// is the announced version greater than our current one?
let should_update = if let Some(comparator) = self.should_install.take() {
comparator(&self.current_version, &final_release)
} else {
Expand Down Expand Up @@ -520,7 +520,7 @@ impl<R: Runtime> Update<R> {
// We fail here because later we can add more linux support
// actually if we use APPIMAGE, our extract path should already
// be set with our APPIMAGE env variable, we don't need to do
// anythin with it yet
// anything with it yet
#[cfg(target_os = "linux")]
if self.app.state::<Env>().appimage.is_none() {
return Err(Error::UnsupportedLinuxPackage);
Expand Down Expand Up @@ -1309,7 +1309,7 @@ mod test {
}

#[test]
fn http_updater_fallback_urls_withs_array() {
fn http_updater_fallback_urls_with_array() {
let _m = mockito::mock("GET", "/")
.with_status(200)
.with_header("content-type", "application/json")
Expand Down
12 changes: 6 additions & 6 deletions core/tauri/src/updater/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
//!
//! If the user accepts, the download and install are initialized. The user will be then prompted to restart the application.
//!
//! ## Javascript API
//! ## JavaScript API
//!
//! **Attention, you need to _disable built-in dialog_ in your [tauri configuration](#configuration), otherwise, events aren't emitted and the javascript API will NOT work.**
//!
Expand Down Expand Up @@ -107,7 +107,7 @@
//! });
//! ```
//!
//! #### Javascript
//! #### JavaScript
//! ```js
//! import { emit } from "@tauri-apps/api/event";
//! emit("tauri://update");
Expand Down Expand Up @@ -145,7 +145,7 @@
//! });
//! ```
//!
//! #### Javascript
//! #### JavaScript
//! ```js
//! import { listen } from "@tauri-apps/api/event";
//! listen("tauri://update-available", function (res) {
Expand Down Expand Up @@ -180,7 +180,7 @@
//! });
//! ```
//!
//! #### Javascript
//! #### JavaScript
//! ```js
//! import { emit } from "@tauri-apps/api/event";
//! emit("tauri://update-install");
Expand Down Expand Up @@ -209,7 +209,7 @@
//! });
//! ```
//!
//! #### Javascript
//! #### JavaScript
//!
//! Event : `tauri://update-download-progress`
//!
Expand Down Expand Up @@ -270,7 +270,7 @@
//! });
//! ```
//!
//! #### Javascript
//! #### JavaScript
//! Event : `tauri://update-status`
//!
//! Emitted data:
Expand Down
Loading

0 comments on commit 8fd79b8

Please sign in to comment.