mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-11 10:43:31 +02:00
Compare commits
4 Commits
@tauri-app
...
@tauri-app
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d869717da | ||
|
|
f0172a454a | ||
|
|
5075b67d36 | ||
|
|
c3252f72f6 |
4
.github/workflows/test-core.yml
vendored
4
.github/workflows/test-core.yml
vendored
@@ -95,10 +95,10 @@ jobs:
|
||||
|
||||
- name: test
|
||||
if: ${{ !matrix.platform.cross }}
|
||||
run: cargo ${{ matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }} --manifest-path crates/tauri/Cargo.toml
|
||||
run: cargo ${{ matrix.features.key == 'no-default' && 'check' || matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }} --manifest-path crates/tauri/Cargo.toml
|
||||
|
||||
- name: test (using cross)
|
||||
if: ${{ matrix.platform.cross }}
|
||||
run: |
|
||||
cargo install cross --git https://github.com/cross-rs/cross --rev 51f46f296253d8122c927c5bb933e3c4f27cc317 --locked
|
||||
cross ${{ matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }} --manifest-path crates/tauri/Cargo.toml
|
||||
cross ${{ matrix.features.key == 'no-default' && 'check' || matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }} --manifest-path crates/tauri/Cargo.toml
|
||||
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -8484,7 +8484,7 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "2.8.0"
|
||||
version = "2.8.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://schema.tauri.app/config/2.8.0",
|
||||
"$id": "https://schema.tauri.app/config/2.8.2",
|
||||
"title": "Config",
|
||||
"description": "The Tauri configuration object.\n It is read from a file where you can define your frontend assets,\n configure the bundler and define a tray icon.\n\n The configuration file is generated by the\n [`tauri init`](https://v2.tauri.app/reference/cli/#init) command that lives in\n your Tauri application source directory (src-tauri).\n\n Once generated, you may modify it at will to customize your Tauri application.\n\n ## File Formats\n\n By default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\n Tauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively.\n The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\n The TOML file name is `Tauri.toml`.\n\n ## Platform-Specific Configuration\n\n In addition to the default configuration file, Tauri can\n read a platform-specific configuration from `tauri.linux.conf.json`,\n `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json`\n (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used),\n which gets merged with the main configuration object.\n\n ## Configuration Structure\n\n The configuration is composed of the following objects:\n\n - [`app`](#appconfig): The Tauri configuration\n - [`build`](#buildconfig): The build configuration\n - [`bundle`](#bundleconfig): The bundle configurations\n - [`plugins`](#pluginconfig): The plugins configuration\n\n Example tauri.config.json file:\n\n ```json\n {\n \"productName\": \"tauri-app\",\n \"version\": \"0.1.0\",\n \"build\": {\n \"beforeBuildCommand\": \"\",\n \"beforeDevCommand\": \"\",\n \"devUrl\": \"http://localhost:3000\",\n \"frontendDist\": \"../dist\"\n },\n \"app\": {\n \"security\": {\n \"csp\": null\n },\n \"windows\": [\n {\n \"fullscreen\": false,\n \"height\": 600,\n \"resizable\": true,\n \"title\": \"Tauri App\",\n \"width\": 800\n }\n ]\n },\n \"bundle\": {},\n \"plugins\": {}\n }\n ```",
|
||||
"type": "object",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"cli.js": {
|
||||
"version": "2.8.0",
|
||||
"version": "2.8.1",
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"tauri": "2.8.0",
|
||||
"tauri": "2.8.2",
|
||||
"tauri-build": "2.4.0",
|
||||
"tauri-plugin": "2.4.0"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://schema.tauri.app/config/2.8.0",
|
||||
"$id": "https://schema.tauri.app/config/2.8.2",
|
||||
"title": "Config",
|
||||
"description": "The Tauri configuration object.\n It is read from a file where you can define your frontend assets,\n configure the bundler and define a tray icon.\n\n The configuration file is generated by the\n [`tauri init`](https://v2.tauri.app/reference/cli/#init) command that lives in\n your Tauri application source directory (src-tauri).\n\n Once generated, you may modify it at will to customize your Tauri application.\n\n ## File Formats\n\n By default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\n Tauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively.\n The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\n The TOML file name is `Tauri.toml`.\n\n ## Platform-Specific Configuration\n\n In addition to the default configuration file, Tauri can\n read a platform-specific configuration from `tauri.linux.conf.json`,\n `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json`\n (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used),\n which gets merged with the main configuration object.\n\n ## Configuration Structure\n\n The configuration is composed of the following objects:\n\n - [`app`](#appconfig): The Tauri configuration\n - [`build`](#buildconfig): The build configuration\n - [`bundle`](#bundleconfig): The bundle configurations\n - [`plugins`](#pluginconfig): The plugins configuration\n\n Example tauri.config.json file:\n\n ```json\n {\n \"productName\": \"tauri-app\",\n \"version\": \"0.1.0\",\n \"build\": {\n \"beforeBuildCommand\": \"\",\n \"beforeDevCommand\": \"\",\n \"devUrl\": \"http://localhost:3000\",\n \"frontendDist\": \"../dist\"\n },\n \"app\": {\n \"security\": {\n \"csp\": null\n },\n \"windows\": [\n {\n \"fullscreen\": false,\n \"height\": 600,\n \"resizable\": true,\n \"title\": \"Tauri App\",\n \"width\": 800\n }\n ]\n },\n \"bundle\": {},\n \"plugins\": {}\n }\n ```",
|
||||
"type": "object",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.8.2]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- [`5075b67d3`](https://www.github.com/tauri-apps/tauri/commit/5075b67d368e63e07df5bac5e43c24396460692d) ([#14039](https://www.github.com/tauri-apps/tauri/pull/14039) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fix compilation when the `wry` Cargo feature is disabled.
|
||||
|
||||
## \[2.8.1]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- [`902727`](https://www.github.com/tauri-apps/tauri/commit/902727a6acea0bd9569b62ca243ae9563b4ed795) Move `WebviewWindowBuilder::with_related_view` behind the `wry` feature flag.
|
||||
|
||||
## \[2.8.0]
|
||||
|
||||
### New Features
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri"
|
||||
version = "2.8.0"
|
||||
version = "2.8.2"
|
||||
description = "Make tiny, secure apps for all desktop platforms with Tauri"
|
||||
exclude = ["/test", "/.scripts", "CHANGELOG.md", "/target"]
|
||||
readme = "README.md"
|
||||
|
||||
@@ -1176,7 +1176,7 @@ fn main() {
|
||||
|
||||
/// Set the environment for the webview.
|
||||
/// Useful if you need to share the same environment, for instance when using the [`Self::on_new_window`].
|
||||
#[cfg(windows)]
|
||||
#[cfg(all(feature = "wry", windows))]
|
||||
pub fn with_environment(
|
||||
mut self,
|
||||
environment: webview2_com::Microsoft::Web::WebView2::Win32::ICoreWebView2Environment,
|
||||
@@ -1187,12 +1187,15 @@ fn main() {
|
||||
|
||||
/// Creates a new webview sharing the same web process with the provided webview.
|
||||
/// Useful if you need to link a webview to another, for instance when using the [`Self::on_new_window`].
|
||||
#[cfg(any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd",
|
||||
#[cfg(all(
|
||||
feature = "wry",
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd",
|
||||
)
|
||||
))]
|
||||
pub fn with_related_view(mut self, related_view: webkit2gtk::WebView) -> Self {
|
||||
self.webview_attributes.related_view.replace(related_view);
|
||||
|
||||
@@ -1265,7 +1265,7 @@ impl<R: Runtime, M: Manager<R>> WebviewWindowBuilder<'_, R, M> {
|
||||
|
||||
/// Set the environment for the webview.
|
||||
/// Useful if you need to share the same environment, for instance when using the [`Self::on_new_window`].
|
||||
#[cfg(windows)]
|
||||
#[cfg(all(feature = "wry", windows))]
|
||||
pub fn with_environment(
|
||||
mut self,
|
||||
environment: webview2_com::Microsoft::Web::WebView2::Win32::ICoreWebView2Environment,
|
||||
@@ -1276,12 +1276,15 @@ impl<R: Runtime, M: Manager<R>> WebviewWindowBuilder<'_, R, M> {
|
||||
|
||||
/// Creates a new webview sharing the same web process with the provided webview.
|
||||
/// Useful if you need to link a webview to another, for instance when using the [`Self::on_new_window`].
|
||||
#[cfg(any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd"
|
||||
#[cfg(all(
|
||||
feature = "wry",
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd",
|
||||
)
|
||||
))]
|
||||
pub fn with_related_view(mut self, related_view: webkit2gtk::WebView) -> Self {
|
||||
self.webview_builder = self.webview_builder.with_related_view(related_view);
|
||||
@@ -1328,19 +1331,22 @@ impl<R: Runtime, M: Manager<R>> WebviewWindowBuilder<'_, R, M> {
|
||||
.with_webview_configuration(features.opener().target_configuration.clone());
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[cfg(all(feature = "wry", windows))]
|
||||
{
|
||||
self.webview_builder = self
|
||||
.webview_builder
|
||||
.with_environment(features.opener().environment.clone());
|
||||
}
|
||||
|
||||
#[cfg(any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd"
|
||||
#[cfg(all(
|
||||
feature = "wry",
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd",
|
||||
)
|
||||
))]
|
||||
{
|
||||
self.webview_builder = self
|
||||
|
||||
@@ -6,6 +6,11 @@ import { invoke } from './core'
|
||||
import { Image } from './image'
|
||||
import { Theme } from './window'
|
||||
|
||||
/**
|
||||
* Identifier type used for data stores on macOS and iOS.
|
||||
*
|
||||
* Represents a 128-bit identifier, commonly expressed as a 16-byte UUID.
|
||||
*/
|
||||
export type DataStoreIdentifier = [
|
||||
number,
|
||||
number,
|
||||
@@ -78,7 +83,7 @@ async function getName(): Promise<string> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Tauri version.
|
||||
* Gets the Tauri framework version used by this application.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
@@ -109,7 +114,8 @@ async function getIdentifier(): Promise<string> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the application on macOS. This function does not automatically focus any specific app window.
|
||||
* Shows the application on macOS. This function does not automatically
|
||||
* focus any specific app window.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
@@ -166,29 +172,28 @@ async function fetchDataStoreIdentifiers(): Promise<DataStoreIdentifier[]> {
|
||||
* ```typescript
|
||||
* import { fetchDataStoreIdentifiers, removeDataStore } from '@tauri-apps/api/app';
|
||||
* for (const id of (await fetchDataStoreIdentifiers())) {
|
||||
* await removeDataStore(id);
|
||||
* await removeDataStore(id);
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @since 2.4.0
|
||||
*/
|
||||
async function removeDataStore(
|
||||
uuid: DataStoreIdentifier
|
||||
): Promise<DataStoreIdentifier[]> {
|
||||
async function removeDataStore(uuid: DataStoreIdentifier): Promise<void> {
|
||||
return invoke('plugin:app|remove_data_store', { uuid })
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default window icon.
|
||||
* Gets the default window icon.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { defaultWindowIcon } from '@tauri-apps/api/app';
|
||||
* await defaultWindowIcon();
|
||||
* const icon = await defaultWindowIcon();
|
||||
* ```
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
|
||||
async function defaultWindowIcon(): Promise<Image | null> {
|
||||
return invoke<number | null>('plugin:app|default_window_icon').then((rid) =>
|
||||
rid ? new Image(rid) : null
|
||||
@@ -196,7 +201,8 @@ async function defaultWindowIcon(): Promise<Image | null> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set app's theme, pass in `null` or `undefined` to follow system theme
|
||||
* Sets the application's theme. Pass in `null` or `undefined` to follow
|
||||
* the system theme.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
@@ -217,13 +223,31 @@ async function setTheme(theme?: Theme | null): Promise<void> {
|
||||
/**
|
||||
* Sets the dock visibility for the application on macOS.
|
||||
*
|
||||
* @param visible whether the dock should be visible or not
|
||||
* @param visible - Whether the dock should be visible or not.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { setDockVisibility } from '@tauri-apps/api/app';
|
||||
* await setDockVisibility(false);
|
||||
* ```
|
||||
*
|
||||
* @since 2.5.0
|
||||
*/
|
||||
async function setDockVisibility(visible: boolean): Promise<void> {
|
||||
return invoke('plugin:app|set_dock_visibility', { visible })
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the application bundle type.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getBundleType } from '@tauri-apps/api/app';
|
||||
* const type = await getBundleType();
|
||||
* ```
|
||||
*
|
||||
* @since 2.5.0
|
||||
*/
|
||||
async function getBundleType(): Promise<BundleType> {
|
||||
return invoke('plugin:app|bundle_type')
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.8.1]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- [`f0172a454`](https://www.github.com/tauri-apps/tauri/commit/f0172a454aea101cb699233be3d73dbf86e64a31) ([#14038](https://www.github.com/tauri-apps/tauri/pull/14038) by [@KushalMeghani1644](https://www.github.com/tauri-apps/tauri/../../KushalMeghani1644)) Fixes `removeDataStore` return type.
|
||||
|
||||
## \[2.8.0]
|
||||
|
||||
### New Features
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/cli",
|
||||
"version": "2.8.0",
|
||||
"version": "2.8.1",
|
||||
"description": "Command line interface for building Tauri apps",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
||||
Reference in New Issue
Block a user