Change V1 links to V2 site (#11111)

* Change V1 links to V2 site

* update lockfile

---------

Co-authored-by: Lucas Nogueira <118899497+lucasfernog-crabnebula@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@crabnebula.dev>
This commit is contained in:
Tillmann 2024-09-24 20:09:00 +09:00 committed by GitHub
parent cbe3bd80d8
commit e08c4e6888
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 545 additions and 667 deletions

View File

@ -5,7 +5,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
# Derived from Tauri contribution and setup guides:
# See: https://github.com/tauri-apps/tauri/blob/dev/.github/CONTRIBUTING.md#development-guide
# See: https://tauri.app/v1/guides/getting-started/prerequisites/#setting-up-linux
# See: https://v2.tauri.app/start/prerequisites/
ARG TAURI_BUILD_DEPS="build-essential curl libappindicator3-dev libgtk-3-dev librsvg2-dev libssl-dev libwebkit2gtk-4.1-dev wget"
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

View File

@ -51,7 +51,7 @@ Hi! We, the maintainers, are really excited that you are interested in contribut
First, [join our Discord server](https://discord.gg/SpmNs4S) and let us know that you want to contribute. This way we can point you in the right direction and help ensure your contribution will be as helpful as possible.
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 [PNPM](https://pnpm.io/), it is only required if you are developing the Node CLI or API packages (`packages/cli` and `packages/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.
To set up your machine for development, follow the [Tauri setup guide](https://v2.tauri.app/start/prerequisites/) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [PNPM](https://pnpm.io/), it is only required if you are developing the Node CLI or API packages (`packages/cli` and `packages/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 repository in order to run correctly.

View File

@ -103,7 +103,7 @@ This plugin allows you to very quickly install tauri in a vue-cli project.
This project enhances the VS Code interface with several nice-to-have features.
# Tauri Plugins [documentation](https://tauri.app/v1/guides/features/plugin/)
# Tauri Plugins [documentation](https://v2.tauri.app/develop/plugins/)
Generally speaking, plugins are authored by third parties (even though there may be official, supported plugins). A plugin generally does 3 things:

View File

@ -21,7 +21,7 @@ To learn more about the details of how all of these pieces fit together, please
If you are interested in making a tauri app, please visit the [documentation website](https://tauri.app).
The quickest way to get started is to install the [prerequisites](https://tauri.app/v1/guides/getting-started/prerequisites) for your system and create a new project with [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app/#usage). For example with `npm`:
The quickest way to get started is to install the [prerequisites](https://v2.tauri.app/start/prerequisites/) for your system and create a new project with [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app/#usage). For example with `npm`:
```sh
npm create tauri-app@latest

View File

@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema.tauri.app/config/2.0.0-rc.15",
"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://tauri.app/v1/api/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\": \"../dist\",\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 ```",
"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\": \"../dist\",\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",
"required": [
"identifier"
@ -157,7 +157,7 @@
"additionalProperties": false,
"definitions": {
"AppConfig": {
"description": "The App configuration object.\n\n See more: <https://tauri.app/v1/api/config#appconfig>",
"description": "The App configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#appconfig>",
"type": "object",
"properties": {
"windows": {
@ -218,7 +218,7 @@
"additionalProperties": false
},
"WindowConfig": {
"description": "The window configuration object.\n\n See more: <https://tauri.app/v1/api/config#windowconfig>",
"description": "The window configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#windowconfig>",
"type": "object",
"properties": {
"label": {
@ -855,7 +855,7 @@
"minItems": 4
},
"SecurityConfig": {
"description": "Security configuration.\n\n See more: <https://tauri.app/v1/api/config#securityconfig>",
"description": "Security configuration.\n\n See more: <https://v2.tauri.app/reference/config/#securityconfig>",
"type": "object",
"properties": {
"csp": {
@ -977,7 +977,7 @@
]
},
"AssetProtocolConfig": {
"description": "Config for the asset custom protocol.\n\n See more: <https://tauri.app/v1/api/config#assetprotocolconfig>",
"description": "Config for the asset custom protocol.\n\n See more: <https://v2.tauri.app/reference/config/#assetprotocolconfig>",
"type": "object",
"properties": {
"scope": {
@ -1334,7 +1334,7 @@
]
},
"TrayIconConfig": {
"description": "Configuration for application tray icon.\n\n See more: <https://tauri.app/v1/api/config#trayiconconfig>",
"description": "Configuration for application tray icon.\n\n See more: <https://v2.tauri.app/reference/config/#trayiconconfig>",
"type": "object",
"required": [
"iconPath"
@ -1379,7 +1379,7 @@
"additionalProperties": false
},
"BuildConfig": {
"description": "The Build configuration object.\n\n See more: <https://tauri.app/v1/api/config#buildconfig>",
"description": "The Build configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#buildconfig>",
"type": "object",
"properties": {
"runner": {
@ -1539,7 +1539,7 @@
]
},
"BundleConfig": {
"description": "Configuration for tauri-bundler.\n\n See more: <https://tauri.app/v1/api/config#bundleconfig>",
"description": "Configuration for tauri-bundler.\n\n See more: <https://v2.tauri.app/reference/config/#bundleconfig>",
"type": "object",
"properties": {
"active": {
@ -1979,7 +1979,7 @@
]
},
"WindowsConfig": {
"description": "Windows bundler configuration.\n\n See more: <https://tauri.app/v1/api/config#windowsconfig>",
"description": "Windows bundler configuration.\n\n See more: <https://v2.tauri.app/reference/config/#windowsconfig>",
"type": "object",
"properties": {
"digestAlgorithm": {
@ -2062,7 +2062,7 @@
"additionalProperties": false
},
"WebviewInstallMode": {
"description": "Install modes for the Webview2 runtime.\n Note that for the updater bundle [`Self::DownloadBootstrapper`] is used.\n\n For more information see <https://tauri.app/v1/guides/building/windows>.",
"description": "Install modes for the Webview2 runtime.\n Note that for the updater bundle [`Self::DownloadBootstrapper`] is used.\n\n For more information see <https://v2.tauri.app/distribute/windows-installer/#webview2-installation-options>.",
"oneOf": [
{
"description": "Do not install the Webview2 as part of the Windows Installer.",
@ -2167,7 +2167,7 @@
]
},
"WixConfig": {
"description": "Configuration for the MSI bundle using WiX.\n\n See more: <https://tauri.app/v1/api/config#wixconfig>",
"description": "Configuration for the MSI bundle using WiX.\n\n See more: <https://v2.tauri.app/reference/config/#wixconfig>",
"type": "object",
"properties": {
"upgradeCode": {
@ -2288,7 +2288,7 @@
]
},
"WixLanguageConfig": {
"description": "Configuration for a target language for the WiX build.\n\n See more: <https://tauri.app/v1/api/config#wixlanguageconfig>",
"description": "Configuration for a target language for the WiX build.\n\n See more: <https://v2.tauri.app/reference/config/#wixlanguageconfig>",
"type": "object",
"properties": {
"localePath": {
@ -2491,7 +2491,7 @@
]
},
"LinuxConfig": {
"description": "Configuration for Linux bundles.\n\n See more: <https://tauri.app/v1/api/config#linuxconfig>",
"description": "Configuration for Linux bundles.\n\n See more: <https://v2.tauri.app/reference/config/#linuxconfig>",
"type": "object",
"properties": {
"appimage": {
@ -2534,7 +2534,7 @@
"additionalProperties": false
},
"AppImageConfig": {
"description": "Configuration for AppImage bundles.\n\n See more: <https://tauri.app/v1/api/config#appimageconfig>",
"description": "Configuration for AppImage bundles.\n\n See more: <https://v2.tauri.app/reference/config/#appimageconfig>",
"type": "object",
"properties": {
"bundleMediaFramework": {
@ -2554,7 +2554,7 @@
"additionalProperties": false
},
"DebConfig": {
"description": "Configuration for Debian (.deb) bundles.\n\n See more: <https://tauri.app/v1/api/config#debconfig>",
"description": "Configuration for Debian (.deb) bundles.\n\n See more: <https://v2.tauri.app/reference/config/#debconfig>",
"type": "object",
"properties": {
"depends": {
@ -2767,7 +2767,7 @@
"additionalProperties": false
},
"MacConfig": {
"description": "Configuration for the macOS bundles.\n\n See more: <https://tauri.app/v1/api/config#macconfig>",
"description": "Configuration for the macOS bundles.\n\n See more: <https://v2.tauri.app/reference/config/#macconfig>",
"type": "object",
"properties": {
"frameworks": {
@ -2855,7 +2855,7 @@
"additionalProperties": false
},
"DmgConfig": {
"description": "Configuration for Apple Disk Image (.dmg) bundles.\n\n See more: <https://tauri.app/v1/api/config#dmgconfig>",
"description": "Configuration for Apple Disk Image (.dmg) bundles.\n\n See more: <https://v2.tauri.app/reference/config/#dmgconfig>",
"type": "object",
"properties": {
"background": {
@ -3022,7 +3022,7 @@
"additionalProperties": false
},
"PluginConfig": {
"description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.\n\n See more: <https://tauri.app/v1/api/config#pluginconfig>",
"description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#pluginconfig>",
"type": "object",
"additionalProperties": true
}

View File

@ -243,7 +243,7 @@ pub fn items() -> Vec<SectionItem> {
format!(
"webkit2gtk-4.1: {}\nVisit {} to learn more about tauri prerequisites",
"not installed".red(),
"https://tauri.app/v1/guides/getting-started/prerequisites".cyan()
"https://v2.tauri.app/start/prerequisites/".cyan()
),
Status::Error,
)
@ -265,7 +265,7 @@ pub fn items() -> Vec<SectionItem> {
format!(
"rsvg2: {}\nVisit {} to learn more about tauri prerequisites",
"not installed".red(),
"https://tauri.app/v1/guides/getting-started/prerequisites".cyan()
"https://v2.tauri.app/start/prerequisites/".cyan()
),
Status::Error,
)

View File

@ -207,7 +207,7 @@ fn build_dev_app<F: FnOnce(Option<i32>, ExitReason) + Send + 'static>(
"`{}` command not found.{}",
runner,
if runner == "cargo" {
" Please follow the Tauri setup guide: https://tauri.app/v1/guides/getting-started/prerequisites"
" Please follow the Tauri setup guide: https://v2.tauri.app/start/prerequisites/"
} else {
""
}
@ -276,7 +276,7 @@ fn build_production_app(
"`{}` command not found.{}",
runner,
if runner == "cargo" {
" Please follow the Tauri setup guide: https://tauri.app/v1/guides/getting-started/prerequisites"
" Please follow the Tauri setup guide: https://v2.tauri.app/start/prerequisites/"
} else {
""
}

View File

@ -522,7 +522,7 @@ function App() {
const [name, setName] = useState("");
async function greet() {
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
// Learn more about Tauri commands at https://v2.tauri.app/develop/calling-rust/#commands
setGreetMsg(await invoke("greet", { name }));
await open();
await dialog.save();
@ -596,7 +596,7 @@ function App() {
const [name, setName] = useState("");
async function greet() {
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
// Learn more about Tauri commands at https://v2.tauri.app/develop/calling-rust/#commands
setGreetMsg(await invoke("greet", { name }));
await open();
await dialog.save();

View File

@ -1,4 +1,4 @@
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
// Learn more about Tauri commands at https://v2.tauri.app/develop/calling-rust/#commands
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust!", name)

View File

@ -5,7 +5,7 @@
let greetMsg = ""
async function greet(){
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
// Learn more about Tauri commands at https://v2.tauri.app/develop/calling-rust/#commands
greetMsg = await invoke("greet", { name })
}
</script>

View File

@ -763,7 +763,7 @@ impl WindowBuilder for WindowBuilderWrapper {
if config.transparent {
eprintln!(
"The window is set to be transparent but the `macos-private-api` is not enabled.
This can be enabled via the `tauri.macOSPrivateApi` configuration property <https://tauri.app/docs/api/config#tauri.macOSPrivateApi>
This can be enabled via the `tauri.macOSPrivateApi` configuration property <https://v2.tauri.app/reference/config/#macosprivateapi>
");
}

View File

@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema.tauri.app/config/2.0.0-rc.15",
"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://tauri.app/v1/api/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\": \"../dist\",\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 ```",
"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\": \"../dist\",\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",
"required": [
"identifier"
@ -157,7 +157,7 @@
"additionalProperties": false,
"definitions": {
"AppConfig": {
"description": "The App configuration object.\n\n See more: <https://tauri.app/v1/api/config#appconfig>",
"description": "The App configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#appconfig>",
"type": "object",
"properties": {
"windows": {
@ -218,7 +218,7 @@
"additionalProperties": false
},
"WindowConfig": {
"description": "The window configuration object.\n\n See more: <https://tauri.app/v1/api/config#windowconfig>",
"description": "The window configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#windowconfig>",
"type": "object",
"properties": {
"label": {
@ -855,7 +855,7 @@
"minItems": 4
},
"SecurityConfig": {
"description": "Security configuration.\n\n See more: <https://tauri.app/v1/api/config#securityconfig>",
"description": "Security configuration.\n\n See more: <https://v2.tauri.app/reference/config/#securityconfig>",
"type": "object",
"properties": {
"csp": {
@ -977,7 +977,7 @@
]
},
"AssetProtocolConfig": {
"description": "Config for the asset custom protocol.\n\n See more: <https://tauri.app/v1/api/config#assetprotocolconfig>",
"description": "Config for the asset custom protocol.\n\n See more: <https://v2.tauri.app/reference/config/#assetprotocolconfig>",
"type": "object",
"properties": {
"scope": {
@ -1334,7 +1334,7 @@
]
},
"TrayIconConfig": {
"description": "Configuration for application tray icon.\n\n See more: <https://tauri.app/v1/api/config#trayiconconfig>",
"description": "Configuration for application tray icon.\n\n See more: <https://v2.tauri.app/reference/config/#trayiconconfig>",
"type": "object",
"required": [
"iconPath"
@ -1379,7 +1379,7 @@
"additionalProperties": false
},
"BuildConfig": {
"description": "The Build configuration object.\n\n See more: <https://tauri.app/v1/api/config#buildconfig>",
"description": "The Build configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#buildconfig>",
"type": "object",
"properties": {
"runner": {
@ -1539,7 +1539,7 @@
]
},
"BundleConfig": {
"description": "Configuration for tauri-bundler.\n\n See more: <https://tauri.app/v1/api/config#bundleconfig>",
"description": "Configuration for tauri-bundler.\n\n See more: <https://v2.tauri.app/reference/config/#bundleconfig>",
"type": "object",
"properties": {
"active": {
@ -1979,7 +1979,7 @@
]
},
"WindowsConfig": {
"description": "Windows bundler configuration.\n\n See more: <https://tauri.app/v1/api/config#windowsconfig>",
"description": "Windows bundler configuration.\n\n See more: <https://v2.tauri.app/reference/config/#windowsconfig>",
"type": "object",
"properties": {
"digestAlgorithm": {
@ -2062,7 +2062,7 @@
"additionalProperties": false
},
"WebviewInstallMode": {
"description": "Install modes for the Webview2 runtime.\n Note that for the updater bundle [`Self::DownloadBootstrapper`] is used.\n\n For more information see <https://tauri.app/v1/guides/building/windows>.",
"description": "Install modes for the Webview2 runtime.\n Note that for the updater bundle [`Self::DownloadBootstrapper`] is used.\n\n For more information see <https://v2.tauri.app/distribute/windows-installer/#webview2-installation-options>.",
"oneOf": [
{
"description": "Do not install the Webview2 as part of the Windows Installer.",
@ -2167,7 +2167,7 @@
]
},
"WixConfig": {
"description": "Configuration for the MSI bundle using WiX.\n\n See more: <https://tauri.app/v1/api/config#wixconfig>",
"description": "Configuration for the MSI bundle using WiX.\n\n See more: <https://v2.tauri.app/reference/config/#wixconfig>",
"type": "object",
"properties": {
"upgradeCode": {
@ -2288,7 +2288,7 @@
]
},
"WixLanguageConfig": {
"description": "Configuration for a target language for the WiX build.\n\n See more: <https://tauri.app/v1/api/config#wixlanguageconfig>",
"description": "Configuration for a target language for the WiX build.\n\n See more: <https://v2.tauri.app/reference/config/#wixlanguageconfig>",
"type": "object",
"properties": {
"localePath": {
@ -2491,7 +2491,7 @@
]
},
"LinuxConfig": {
"description": "Configuration for Linux bundles.\n\n See more: <https://tauri.app/v1/api/config#linuxconfig>",
"description": "Configuration for Linux bundles.\n\n See more: <https://v2.tauri.app/reference/config/#linuxconfig>",
"type": "object",
"properties": {
"appimage": {
@ -2534,7 +2534,7 @@
"additionalProperties": false
},
"AppImageConfig": {
"description": "Configuration for AppImage bundles.\n\n See more: <https://tauri.app/v1/api/config#appimageconfig>",
"description": "Configuration for AppImage bundles.\n\n See more: <https://v2.tauri.app/reference/config/#appimageconfig>",
"type": "object",
"properties": {
"bundleMediaFramework": {
@ -2554,7 +2554,7 @@
"additionalProperties": false
},
"DebConfig": {
"description": "Configuration for Debian (.deb) bundles.\n\n See more: <https://tauri.app/v1/api/config#debconfig>",
"description": "Configuration for Debian (.deb) bundles.\n\n See more: <https://v2.tauri.app/reference/config/#debconfig>",
"type": "object",
"properties": {
"depends": {
@ -2767,7 +2767,7 @@
"additionalProperties": false
},
"MacConfig": {
"description": "Configuration for the macOS bundles.\n\n See more: <https://tauri.app/v1/api/config#macconfig>",
"description": "Configuration for the macOS bundles.\n\n See more: <https://v2.tauri.app/reference/config/#macconfig>",
"type": "object",
"properties": {
"frameworks": {
@ -2855,7 +2855,7 @@
"additionalProperties": false
},
"DmgConfig": {
"description": "Configuration for Apple Disk Image (.dmg) bundles.\n\n See more: <https://tauri.app/v1/api/config#dmgconfig>",
"description": "Configuration for Apple Disk Image (.dmg) bundles.\n\n See more: <https://v2.tauri.app/reference/config/#dmgconfig>",
"type": "object",
"properties": {
"background": {
@ -3022,7 +3022,7 @@
"additionalProperties": false
},
"PluginConfig": {
"description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.\n\n See more: <https://tauri.app/v1/api/config#pluginconfig>",
"description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#pluginconfig>",
"type": "object",
"additionalProperties": true
}

View File

@ -307,7 +307,7 @@ impl BundleTarget {
/// Configuration for AppImage bundles.
///
/// See more: <https://tauri.app/v1/api/config#appimageconfig>
/// See more: <https://v2.tauri.app/reference/config/#appimageconfig>
#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
@ -323,7 +323,7 @@ pub struct AppImageConfig {
/// Configuration for Debian (.deb) bundles.
///
/// See more: <https://tauri.app/v1/api/config#debconfig>
/// See more: <https://v2.tauri.app/reference/config/#debconfig>
#[skip_serializing_none]
#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
@ -373,7 +373,7 @@ pub struct DebConfig {
/// Configuration for Linux bundles.
///
/// See more: <https://tauri.app/v1/api/config#linuxconfig>
/// See more: <https://v2.tauri.app/reference/config/#linuxconfig>
#[skip_serializing_none]
#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
@ -485,7 +485,7 @@ pub struct Size {
/// Configuration for Apple Disk Image (.dmg) bundles.
///
/// See more: <https://tauri.app/v1/api/config#dmgconfig>
/// See more: <https://v2.tauri.app/reference/config/#dmgconfig>
#[skip_serializing_none]
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
@ -549,7 +549,7 @@ where
/// Configuration for the macOS bundles.
///
/// See more: <https://tauri.app/v1/api/config#macconfig>
/// See more: <https://v2.tauri.app/reference/config/#macconfig>
#[skip_serializing_none]
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
@ -622,7 +622,7 @@ fn ios_minimum_system_version() -> String {
/// Configuration for a target language for the WiX build.
///
/// See more: <https://tauri.app/v1/api/config#wixlanguageconfig>
/// See more: <https://v2.tauri.app/reference/config/#wixlanguageconfig>
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
@ -653,7 +653,7 @@ impl Default for WixLanguage {
/// Configuration for the MSI bundle using WiX.
///
/// See more: <https://tauri.app/v1/api/config#wixconfig>
/// See more: <https://v2.tauri.app/reference/config/#wixconfig>
#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
@ -858,7 +858,7 @@ pub struct NsisConfig {
/// Install modes for the Webview2 runtime.
/// Note that for the updater bundle [`Self::DownloadBootstrapper`] is used.
///
/// For more information see <https://tauri.app/v1/guides/building/windows>.
/// For more information see <https://v2.tauri.app/distribute/windows-installer/#webview2-installation-options>.
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
#[serde(tag = "type", rename_all = "camelCase", deny_unknown_fields)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
@ -936,7 +936,7 @@ pub enum CustomSignCommandConfig {
/// Windows bundler configuration.
///
/// See more: <https://tauri.app/v1/api/config#windowsconfig>
/// See more: <https://v2.tauri.app/reference/config/#windowsconfig>
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
@ -1136,7 +1136,7 @@ pub enum V1Compatible {
/// Configuration for tauri-bundler.
///
/// See more: <https://tauri.app/v1/api/config#bundleconfig>
/// See more: <https://v2.tauri.app/reference/config/#bundleconfig>
#[skip_serializing_none]
#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
@ -1260,7 +1260,7 @@ pub struct WindowEffectsConfig {
/// The window configuration object.
///
/// See more: <https://tauri.app/v1/api/config#windowconfig>
/// See more: <https://v2.tauri.app/reference/config/#windowconfig>
#[skip_serializing_none]
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
@ -1746,7 +1746,7 @@ impl FsScope {
/// Config for the asset custom protocol.
///
/// See more: <https://tauri.app/v1/api/config#assetprotocolconfig>
/// See more: <https://v2.tauri.app/reference/config/#assetprotocolconfig>
#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
@ -1761,7 +1761,7 @@ pub struct AssetProtocolConfig {
/// Security configuration.
///
/// See more: <https://tauri.app/v1/api/config#securityconfig>
/// See more: <https://v2.tauri.app/reference/config/#securityconfig>
#[skip_serializing_none]
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
@ -1855,7 +1855,7 @@ impl Default for PatternKind {
/// The App configuration object.
///
/// See more: <https://tauri.app/v1/api/config#appconfig>
/// See more: <https://v2.tauri.app/reference/config/#appconfig>
#[skip_serializing_none]
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
@ -1916,7 +1916,7 @@ impl AppConfig {
/// Configuration for application tray icon.
///
/// See more: <https://tauri.app/v1/api/config#trayiconconfig>
/// See more: <https://v2.tauri.app/reference/config/#trayiconconfig>
#[skip_serializing_none]
#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
@ -2077,7 +2077,7 @@ pub enum HookCommand {
/// The Build configuration object.
///
/// See more: <https://tauri.app/v1/api/config#buildconfig>
/// See more: <https://v2.tauri.app/reference/config/#buildconfig>
#[skip_serializing_none]
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize, Default)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
@ -2196,7 +2196,7 @@ where
/// configure the bundler and define a tray icon.
///
/// The configuration file is generated by the
/// [`tauri init`](https://tauri.app/v1/api/cli#init) command that lives in
/// [`tauri init`](https://v2.tauri.app/reference/cli/#init) command that lives in
/// your Tauri application source directory (src-tauri).
///
/// Once generated, you may modify it at will to customize your Tauri application.
@ -2298,7 +2298,7 @@ pub struct Config {
/// The plugin configs holds a HashMap mapping a plugin name to its configuration object.
///
/// See more: <https://tauri.app/v1/api/config#pluginconfig>
/// See more: <https://v2.tauri.app/reference/config/#pluginconfig>
#[derive(Debug, Clone, Default, PartialEq, Eq, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
pub struct PluginConfig(pub HashMap<String, JsonValue>);

View File

@ -267,8 +267,8 @@ impl<R: Runtime> AssetResolver<R> {
/// Gets the app asset associated with the given path.
///
/// Resolves to the embedded asset that is part of the app
/// in dev when [`devPath`](https://tauri.app/v1/api/config/#buildconfig.devpath) points to a folder in your filesystem
/// or in production when [`distDir`](https://tauri.app/v1/api/config/#buildconfig.distdir)
/// in dev when [`devUrl`](https://v2.tauri.app/reference/config/#devurl) points to a folder in your filesystem
/// or in production when [`frontendDist`](https://v2.tauri.app/reference/config/#frontenddist)
/// points to your frontend assets.
///
/// Fallbacks to reading the asset from the [distDir] folder so the behavior is consistent in development.

View File

@ -267,7 +267,7 @@
<a
class="nv justify-between"
target="_blank"
href="https://tauri.app/v1/guides/"
href="https://v2.tauri.app/start/"
>
Documentation
<span class="i-codicon-link-external" />

View File

@ -5,7 +5,7 @@
/**
* Invoke your custom commands.
*
* This package is also accessible with `window.__TAURI__.tauri` when [`app.withGlobalTauri`](https://tauri.app/v1/api/config/#appconfig.withglobaltauri) in `tauri.conf.json` is set to `true`.
* This package is also accessible with `window.__TAURI__.tauri` when [`app.withGlobalTauri`](https://v2.tauri.app/reference/config/#withglobaltauri) in `tauri.conf.json` is set to `true`.
* @module
*/
@ -182,11 +182,11 @@ async function invoke<T>(
/**
* Convert a device file path to an URL that can be loaded by the webview.
* Note that `asset:` and `http://asset.localhost` must be added to [`tauri.security.csp`](https://tauri.app/v1/api/config/#securityconfig.csp) in `tauri.conf.json`.
* Note that `asset:` and `http://asset.localhost` must be added to [`app.security.csp`](https://v2.tauri.app/reference/config/#csp-1) in `tauri.conf.json`.
* Example CSP value: `"csp": "default-src 'self' ipc: http://ipc.localhost; img-src 'self' asset: http://asset.localhost"` to use the asset protocol on image sources.
*
* Additionally, `asset` must be added to [`tauri.allowlist.protocol`](https://tauri.app/v1/api/config/#allowlistconfig.protocol)
* in `tauri.conf.json` and its access scope must be defined on the `assetScope` array on the same `protocol` object.
* Additionally, `"enable" : "true"` must be added to [`app.security.assetProtocol`](https://v2.tauri.app/reference/config/#assetprotocolconfig)
* in `tauri.conf.json` and its access scope must be defined on the `scope` array on the same `assetProtocol` object.
*
* @param filePath The file path.
* @param protocol The protocol to use. Defaults to `asset`. You only need to set this when using a custom protocol.

View File

@ -5,7 +5,7 @@
/**
* The event system allows you to emit events to the backend and listen to events from it.
*
* This package is also accessible with `window.__TAURI__.event` when [`app.withGlobalTauri`](https://tauri.app/v1/api/config/#appconfig.withglobaltauri) in `tauri.conf.json` is set to `true`.
* This package is also accessible with `window.__TAURI__.event` when [`app.withGlobalTauri`](https://v2.tauri.app/reference/config/#withglobaltauri) in `tauri.conf.json` is set to `true`.
* @module
*/

View File

@ -12,6 +12,6 @@ export * from './menu/predefinedMenuItem'
/**
* Menu types and utilities.
*
* This package is also accessible with `window.__TAURI__.menu` when [`app.withGlobalTauri`](https://tauri.app/v1/api/config/#appconfig.withglobaltauri) in `tauri.conf.json` is set to `true`.
* This package is also accessible with `window.__TAURI__.menu` when [`app.withGlobalTauri`](https://v2.tauri.app/reference/config/#withglobaltauri) in `tauri.conf.json` is set to `true`.
* @module
*/

View File

@ -5,7 +5,7 @@
/**
* The path module provides utilities for working with file and directory paths.
*
* This package is also accessible with `window.__TAURI__.path` when [`app.withGlobalTauri`](https://tauri.app/v1/api/config/#appconfig.withglobaltauri) in `tauri.conf.json` is set to `true`.
* This package is also accessible with `window.__TAURI__.path` when [`app.withGlobalTauri`](https://v2.tauri.app/reference/config/#withglobaltauri) in `tauri.conf.json` is set to `true`.
*
* It is recommended to allowlist only the APIs you use for optimal bundle size and security.
* @module
@ -45,7 +45,7 @@ enum BaseDirectory {
/**
* Returns the path to the suggested directory for your app's config files.
* Resolves to `${configDir}/${bundleIdentifier}`, where `bundleIdentifier` is the value [`tauri.bundle.identifier`](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in `tauri.conf.json`.
* Resolves to `${configDir}/${bundleIdentifier}`, where `bundleIdentifier` is the [`identifier`](https://v2.tauri.app/reference/config/#identifier) value configured in `tauri.conf.json`.
* @example
* ```typescript
* import { appConfigDir } from '@tauri-apps/api/path';
@ -62,7 +62,7 @@ async function appConfigDir(): Promise<string> {
/**
* Returns the path to the suggested directory for your app's data files.
* Resolves to `${dataDir}/${bundleIdentifier}`, where `bundleIdentifier` is the value [`tauri.bundle.identifier`](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in `tauri.conf.json`.
* Resolves to `${dataDir}/${bundleIdentifier}`, where `bundleIdentifier` is the [`identifier`](https://v2.tauri.app/reference/config/#identifier) value configured in `tauri.conf.json`.
* @example
* ```typescript
* import { appDataDir } from '@tauri-apps/api/path';
@ -79,7 +79,7 @@ async function appDataDir(): Promise<string> {
/**
* Returns the path to the suggested directory for your app's local data files.
* Resolves to `${localDataDir}/${bundleIdentifier}`, where `bundleIdentifier` is the value [`tauri.bundle.identifier`](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in `tauri.conf.json`.
* Resolves to `${localDataDir}/${bundleIdentifier}`, where `bundleIdentifier` is the [`identifier`](https://v2.tauri.app/reference/config/#identifier) value configured in `tauri.conf.json`.
* @example
* ```typescript
* import { appLocalDataDir } from '@tauri-apps/api/path';
@ -96,7 +96,7 @@ async function appLocalDataDir(): Promise<string> {
/**
* Returns the path to the suggested directory for your app's cache files.
* Resolves to `${cacheDir}/${bundleIdentifier}`, where `bundleIdentifier` is the value [`tauri.bundle.identifier`](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in `tauri.conf.json`.
* Resolves to `${cacheDir}/${bundleIdentifier}`, where `bundleIdentifier` is the [`identifier`](https://v2.tauri.app/reference/config/#identifier) value configured in `tauri.conf.json`.
* @example
* ```typescript
* import { appCacheDir } from '@tauri-apps/api/path';

View File

@ -109,7 +109,7 @@ export type TrayIconEvent =
/**
* Tray icon types and utilities.
*
* This package is also accessible with `window.__TAURI__.tray` when [`app.withGlobalTauri`](https://tauri.app/v1/api/config/#appconfig.withglobaltauri) in `tauri.conf.json` is set to `true`.
* This package is also accessible with `window.__TAURI__.tray` when [`app.withGlobalTauri`](https://v2.tauri.app/reference/config/#withglobaltauri) in `tauri.conf.json` is set to `true`.
* @module
*/

File diff suppressed because it is too large Load Diff