diff --git a/.github/workflows/audit-javascript.yml b/.github/workflows/audit-javascript.yml index bd84610d..19a7f4c8 100644 --- a/.github/workflows/audit-javascript.yml +++ b/.github/workflows/audit-javascript.yml @@ -6,14 +6,16 @@ on: - cron: "0 0 * * *" push: branches: - - dev + - v1 + - v2 paths: - ".github/workflows/audit-javascript.yml" - "**/pnpm-lock.yaml" - "**/package.json" pull_request: branches: - - dev + - v1 + - v2 paths: - ".github/workflows/audit-javascript.yml" - "**/pnpm-lock.yaml" diff --git a/.github/workflows/audit-rust.yml b/.github/workflows/audit-rust.yml index 7a824fa1..1ec0225e 100644 --- a/.github/workflows/audit-rust.yml +++ b/.github/workflows/audit-rust.yml @@ -6,14 +6,16 @@ on: - cron: "0 0 * * *" push: branches: - - dev + - v1 + - v2 paths: - ".github/workflows/audit-rust.yml" - "**/Cargo.lock" - "**/Cargo.toml" pull_request: branches: - - dev + - v1 + - v2 paths: - ".github/workflows/audit-rust.yml" - "**/Cargo.lock" diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index 14057c07..b5c4ab7d 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -3,7 +3,7 @@ name: version or publish on: push: branches: - - dev + - v1 jobs: version-or-publish: diff --git a/.github/workflows/lint-javascript.yml b/.github/workflows/lint-javascript.yml index 1483f288..c2c0a1d3 100644 --- a/.github/workflows/lint-javascript.yml +++ b/.github/workflows/lint-javascript.yml @@ -3,7 +3,8 @@ name: Lint JavaScript on: push: branches: - - dev + - v1 + - v2 paths: - ".github/workflows/lint-javascript.yml" - "plugins/*/guest-js/**" @@ -13,7 +14,8 @@ on: - "**/package.json" pull_request: branches: - - dev + - v1 + - v2 paths: - ".github/workflows/lint-javascript.yml" - "plugins/*/guest-js/**" diff --git a/.github/workflows/lint-rust.yml b/.github/workflows/lint-rust.yml index da353a56..f724e838 100644 --- a/.github/workflows/lint-rust.yml +++ b/.github/workflows/lint-rust.yml @@ -3,14 +3,16 @@ name: Lint Rust on: push: branches: - - dev + - v1 + - v2 paths: - ".github/workflows/lint-rust.yml" - "plugins/*/src/**" - "**/Cargo.toml" pull_request: branches: - - dev + - v1 + - v2 paths: - ".github/workflows/lint-rust.yml" - "plugins/*/src/**" @@ -32,7 +34,7 @@ jobs: - name: install webkit2gtk and libudev for [authenticator] run: | sudo apt-get update - sudo apt-get install -y webkit2gtk-4.0 libudev-dev + sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev - name: Install clippy with stable toolchain uses: dtolnay/rust-toolchain@stable diff --git a/.github/workflows/msrv-check.yml b/.github/workflows/msrv-check.yml index a603e8f0..807bbcad 100644 --- a/.github/workflows/msrv-check.yml +++ b/.github/workflows/msrv-check.yml @@ -3,7 +3,8 @@ name: Check MSRV on: push: branches: - - dev + - v1 + - v2 paths: - ".github/workflows/msrv-check.yml" - "plugins/*/src/**" @@ -11,7 +12,8 @@ on: - "**/Cargo.lock" pull_request: branches: - - dev + - v1 + - v2 paths: - ".github/workflows/msrv-check.yml" - "plugins/*/src/**" @@ -34,7 +36,7 @@ jobs: - name: install webkit2gtk and libudev for [authenticator] run: | sudo apt-get update - sudo apt-get install -y webkit2gtk-4.0 libudev-dev + sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev - uses: dtolnay/rust-toolchain@1.64.0 diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 6b42bf53..82da46fc 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -4,8 +4,8 @@ on: workflow_dispatch: push: branches: - - dev - - next + - v1 + - v2 concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/plugins/authenticator/README.md b/plugins/authenticator/README.md index 45c466c8..c64fecdf 100644 --- a/plugins/authenticator/README.md +++ b/plugins/authenticator/README.md @@ -20,7 +20,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: [dependencies] tauri-plugin-authenticator = "0.1" # or through git -tauri-plugin-authenticator = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-authenticator = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -28,11 +28,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-authenticator#next +pnpm add https://github.com/tauri-apps/tauri-plugin-authenticator#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-authenticator#next +npm add https://github.com/tauri-apps/tauri-plugin-authenticator#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-authenticator#next +yarn add https://github.com/tauri-apps/tauri-plugin-authenticator#v2 ``` ## Usage @@ -53,7 +53,7 @@ fn main() { Afterwards all the plugin's APIs are available through the JavaScript guest bindings: ```javascript -import { Authenticator } from 'tauri-plugin-authenticator-api'; +import { Authenticator } from "tauri-plugin-authenticator-api"; const auth = new Authenticator(); auth.init(); // initialize transports @@ -63,16 +63,21 @@ const arr = new Uint32Array(32); window.crypto.getRandomValues(arr); const b64 = btoa(String.fromCharCode.apply(null, arr)); // web-safe base64 -const challenge = b64.replace(/\+/g, '-').replace(/\//g, '_'); +const challenge = b64.replace(/\+/g, "-").replace(/\//g, "_"); -const domain = 'https://tauri.app'; +const domain = "https://tauri.app"; // attempt to register with the security key const json = await auth.register(challenge, domain); const registerResult = JSON.parse(json); // verify te registration was successfull -const r2 = await auth.verifyRegistration(challenge, app, registerResult.registerData, registerResult.clientData); +const r2 = await auth.verifyRegistration( + challenge, + app, + registerResult.registerData, + registerResult.clientData +); const j2 = JSON.parse(r2); // sign some data @@ -80,10 +85,17 @@ const json = await auth.sign(challenge, app, keyHandle); const signData = JSON.parse(json); // verify the signature again -const counter = await auth.verifySignature(challenge, app, signData.signData, clientData, keyHandle, pubkey); +const counter = await auth.verifySignature( + challenge, + app, + signData.signData, + clientData, + keyHandle, + pubkey +); if (counter && counter > 0) { - console.log('SUCCESS!'); + console.log("SUCCESS!"); } ``` diff --git a/plugins/autostart/README.md b/plugins/autostart/README.md index 34c32130..fa787275 100644 --- a/plugins/autostart/README.md +++ b/plugins/autostart/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-autostart#next +pnpm add https://github.com/tauri-apps/tauri-plugin-autostart#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-autostart#next +npm add https://github.com/tauri-apps/tauri-plugin-autostart#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-autostart#next +yarn add https://github.com/tauri-apps/tauri-plugin-autostart#v2 ``` ## Usage @@ -53,7 +53,7 @@ fn main() { Afterwards all the plugin's APIs are available through the JavaScript guest bindings: ```javascript -import { enable, isEnabled, disable } from 'tauri-plugin-autostart-api'; +import { enable, isEnabled, disable } from "tauri-plugin-autostart-api"; await enable(); diff --git a/plugins/cli/README.md b/plugins/cli/README.md index 0b63ebea..2d567acb 100644 --- a/plugins/cli/README.md +++ b/plugins/cli/README.md @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-cli#next +pnpm add https://github.com/tauri-apps/tauri-plugin-cli#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-cli#next +npm add https://github.com/tauri-apps/tauri-plugin-cli#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-cli#next +yarn add https://github.com/tauri-apps/tauri-plugin-cli#v2 ``` ## Usage diff --git a/plugins/clipboard/README.md b/plugins/clipboard/README.md index b95cf370..2879c77b 100644 --- a/plugins/clipboard/README.md +++ b/plugins/clipboard/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-clipboard = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-clipboard = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-clipboard#next +pnpm add https://github.com/tauri-apps/tauri-plugin-clipboard#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-clipboard#next +npm add https://github.com/tauri-apps/tauri-plugin-clipboard#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-clipboard#next +yarn add https://github.com/tauri-apps/tauri-plugin-clipboard#v2 ``` ## Usage diff --git a/plugins/dialog/README.md b/plugins/dialog/README.md index 8a37d5cd..24a5b214 100644 --- a/plugins/dialog/README.md +++ b/plugins/dialog/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-dialog-api = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-dialog-api = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: diff --git a/plugins/fs-watch/README.md b/plugins/fs-watch/README.md index a01de8f8..c410cf12 100644 --- a/plugins/fs-watch/README.md +++ b/plugins/fs-watch/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-fs-watch = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-fs-watch = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-fs-watch#next +pnpm add https://github.com/tauri-apps/tauri-plugin-fs-watch#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-fs-watch#next +npm add https://github.com/tauri-apps/tauri-plugin-fs-watch#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-fs-watch#next +yarn add https://github.com/tauri-apps/tauri-plugin-fs-watch#v2 ``` ## Usage @@ -51,7 +51,7 @@ fn main() { Afterwards all the plugin's APIs are available through the JavaScript guest bindings: ```javascript -import { watch, watchImmediate } from 'tauri-plugin-fs-watch-api'; +import { watch, watchImmediate } from "tauri-plugin-fs-watch-api"; // can also watch an array of paths const stopWatching = await watch( diff --git a/plugins/fs/README.md b/plugins/fs/README.md index 4dacbf07..55756f5b 100644 --- a/plugins/fs/README.md +++ b/plugins/fs/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-fs = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-fs = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-fs#next +pnpm add https://github.com/tauri-apps/tauri-plugin-fs#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-fs#next +npm add https://github.com/tauri-apps/tauri-plugin-fs#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-fs#next +yarn add https://github.com/tauri-apps/tauri-plugin-fs#v2 ``` ## Usage @@ -51,9 +51,9 @@ fn main() { Afterwards all the plugin's APIs are available through the JavaScript guest bindings: ```javascript -import { metadata } from 'tauri-plugin-fs-api'; +import { metadata } from "tauri-plugin-fs-api"; -await metadata('/path/to/file'); +await metadata("/path/to/file"); ``` ## Contributing diff --git a/plugins/global-shortcut/README.md b/plugins/global-shortcut/README.md index 90fe056d..f1611804 100644 --- a/plugins/global-shortcut/README.md +++ b/plugins/global-shortcut/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-shortcut = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-shortcut = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-shortcut#next +pnpm add https://github.com/tauri-apps/tauri-plugin-shortcut#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-shortcut#next +npm add https://github.com/tauri-apps/tauri-plugin-shortcut#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-shortcut#next +yarn add https://github.com/tauri-apps/tauri-plugin-shortcut#v2 ``` ## Usage diff --git a/plugins/http/README.md b/plugins/http/README.md index 2b72b4b9..0bace1a5 100644 --- a/plugins/http/README.md +++ b/plugins/http/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-http = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-fs-extra = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-http#next +pnpm add https://github.com/tauri-apps/tauri-plugin-http#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-http#next +npm add https://github.com/tauri-apps/tauri-plugin-http#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-http#next +yarn add https://github.com/tauri-apps/tauri-plugin-http#v2 ``` ## Usage diff --git a/plugins/localhost/README.md b/plugins/localhost/README.md index 8713350e..2a0e9fc3 100644 --- a/plugins/localhost/README.md +++ b/plugins/localhost/README.md @@ -20,7 +20,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } portpicker = "0.1" # used in the example to pick a random free port ``` diff --git a/plugins/log/README.md b/plugins/log/README.md index 1f08db96..779f9056 100644 --- a/plugins/log/README.md +++ b/plugins/log/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-log#next +pnpm add https://github.com/tauri-apps/tauri-plugin-log#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-log#next +npm add https://github.com/tauri-apps/tauri-plugin-log#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-log#next +yarn add https://github.com/tauri-apps/tauri-plugin-log#v2 ``` ## Usage @@ -57,14 +57,14 @@ fn main() { Afterwards all the plugin's APIs are available through the JavaScript guest bindings: ```javascript -import { trace, info, error, attachConsole } from 'tauri-plugin-log-api'; +import { trace, info, error, attachConsole } from "tauri-plugin-log-api"; // with LogTarget::Webview enabled this function will print logs to the browser console const detach = await attachConsole(); -trace('Trace'); -info('Info'); -error('Error'); +trace("Trace"); +info("Info"); +error("Error"); // detach the browser console from the log stream detach(); diff --git a/plugins/persisted-scope/README.md b/plugins/persisted-scope/README.md index e24d0e70..2dd60751 100644 --- a/plugins/persisted-scope/README.md +++ b/plugins/persisted-scope/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-persisted-scope = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-persisted-scope = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` ## Usage diff --git a/plugins/positioner/README.md b/plugins/positioner/README.md index d5f8fe37..ac2a152f 100644 --- a/plugins/positioner/README.md +++ b/plugins/positioner/README.md @@ -22,7 +22,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: [dependencies] tauri-plugin-positioner = "1.0" # or through git -tauri-plugin-positioner = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-positioner = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -40,11 +40,11 @@ yarn add tauri-plugin-positioner-api Or through git: ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-positioner#next +pnpm add https://github.com/tauri-apps/tauri-plugin-positioner#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-positioner#next +npm add https://github.com/tauri-apps/tauri-plugin-positioner#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-positioner#next +yarn add https://github.com/tauri-apps/tauri-plugin-positioner#v2 ``` ## Usage @@ -69,7 +69,7 @@ fn main() { Afterwards all the plugin's APIs are available through the JavaScript guest bindings: ```javascript -import { move_window, Position } from 'tauri-plugin-positioner-api'; +import { move_window, Position } from "tauri-plugin-positioner-api"; move_window(Position.TopRight); ``` diff --git a/plugins/shell/README.md b/plugins/shell/README.md index 6a0aa343..36385bf4 100644 --- a/plugins/shell/README.md +++ b/plugins/shell/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-shell = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-shell = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-shell#next +pnpm add https://github.com/tauri-apps/tauri-plugin-shell#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-shell#next +npm add https://github.com/tauri-apps/tauri-plugin-shell#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-shell#next +yarn add https://github.com/tauri-apps/tauri-plugin-shell#v2 ``` ## Usage diff --git a/plugins/single-instance/README.md b/plugins/single-instance/README.md index d68e6684..18ad3f6f 100644 --- a/plugins/single-instance/README.md +++ b/plugins/single-instance/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` ## Usage diff --git a/plugins/sql/README.md b/plugins/sql/README.md index df0eb482..387c5db1 100644 --- a/plugins/sql/README.md +++ b/plugins/sql/README.md @@ -19,7 +19,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies.tauri-plugin-sql] git = "https://github.com/tauri-apps/plugins-workspace" -branch = "next" +branch = "v2" features = ["sqlite"] # or "postgres", or "mysql" ``` @@ -28,11 +28,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-sql#next +pnpm add https://github.com/tauri-apps/tauri-plugin-sql#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-sql#next +npm add https://github.com/tauri-apps/tauri-plugin-sql#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-sql#next +yarn add https://github.com/tauri-apps/tauri-plugin-sql#v2 ``` ## Usage @@ -53,16 +53,16 @@ fn main() { Afterwards all the plugin's APIs are available through the JavaScript guest bindings: ```javascript -import Database from 'tauri-plugin-sql-api'; +import Database from "tauri-plugin-sql-api"; // sqlite. The path is relative to `tauri::api::path::BaseDirectory::App`. -const db = await Database.load('sqlite:test.db'); +const db = await Database.load("sqlite:test.db"); // mysql -const db = await Database.load('mysql://user:pass@host/database'); +const db = await Database.load("mysql://user:pass@host/database"); // postgres -const db = await Database.load('postgres://postgres:password@localhost/test'); +const db = await Database.load("postgres://postgres:password@localhost/test"); -await db.execute('INSERT INTO ...'); +await db.execute("INSERT INTO ..."); ``` ## Contributing diff --git a/plugins/store/README.md b/plugins/store/README.md index 4c68eb3d..4f6d1fa0 100644 --- a/plugins/store/README.md +++ b/plugins/store/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-store#next +pnpm add https://github.com/tauri-apps/tauri-plugin-store#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-store#next +npm add https://github.com/tauri-apps/tauri-plugin-store#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-store#next +yarn add https://github.com/tauri-apps/tauri-plugin-store#v2 ``` ## Usage @@ -51,13 +51,13 @@ fn main() { Afterwards all the plugin's APIs are available through the JavaScript guest bindings: ```javascript -import { Store } from 'tauri-plugin-store-api'; +import { Store } from "tauri-plugin-store-api"; -const store = new Store('.settings.dat'); +const store = new Store(".settings.dat"); -await store.set('some-key', { value: 5 }); +await store.set("some-key", { value: 5 }); -const val = await store.get('some-key'); +const val = await store.get("some-key"); assert(val, { value: 5 }); await store.save(); // this manually saves the store, otherwise the store is only saved when your app is closed diff --git a/plugins/stronghold/README.md b/plugins/stronghold/README.md index 25b95a7e..da84b0d7 100644 --- a/plugins/stronghold/README.md +++ b/plugins/stronghold/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-stronghold = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-stronghold = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-stronghold#next +pnpm add https://github.com/tauri-apps/tauri-plugin-stronghold#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-stronghold#next +npm add https://github.com/tauri-apps/tauri-plugin-stronghold#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-stronghold#next +yarn add https://github.com/tauri-apps/tauri-plugin-stronghold#v2 ``` ## Usage @@ -55,7 +55,7 @@ fn main() { Afterwards all the plugin's APIs are available through the JavaScript guest bindings: ```javascript -import { Stronghold, Location } from 'tauri-plugin-stronghold-api'; +import { Stronghold, Location } from "tauri-plugin-stronghold-api"; // TODO ``` diff --git a/plugins/upload/README.md b/plugins/upload/README.md index 5f143a4e..08401560 100644 --- a/plugins/upload/README.md +++ b/plugins/upload/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-upload = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-upload = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-upload#next +pnpm add https://github.com/tauri-apps/tauri-plugin-upload#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-upload#next +npm add https://github.com/tauri-apps/tauri-plugin-upload#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-upload#next +yarn add https://github.com/tauri-apps/tauri-plugin-upload#v2 ``` ## Usage diff --git a/plugins/websocket/README.md b/plugins/websocket/README.md index 716f113d..4557b851 100644 --- a/plugins/websocket/README.md +++ b/plugins/websocket/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-websocket = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-websocket = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-websocket#next +pnpm add https://github.com/tauri-apps/tauri-plugin-websocket#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-websocket#next +npm add https://github.com/tauri-apps/tauri-plugin-websocket#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-websocket#next +yarn add https://github.com/tauri-apps/tauri-plugin-websocket#v2 ``` ## Usage @@ -51,11 +51,11 @@ fn main() { Afterwards all the plugin's APIs are available through the JavaScript guest bindings: ```javascript -import { WebSocket } from 'tauri-plugin-websocket-api'; +import { WebSocket } from "tauri-plugin-websocket-api"; -const ws = await WebSocket.connect('wss://example.com'); +const ws = await WebSocket.connect("wss://example.com"); -await ws.send('Hello World'); +await ws.send("Hello World"); await ws.disconnect(); ``` diff --git a/plugins/window-state/README.md b/plugins/window-state/README.md index 051ee969..710270a3 100644 --- a/plugins/window-state/README.md +++ b/plugins/window-state/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] -tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa > Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-window-state#next +pnpm add https://github.com/tauri-apps/tauri-plugin-window-state#v2 # or -npm add https://github.com/tauri-apps/tauri-plugin-window-state#next +npm add https://github.com/tauri-apps/tauri-plugin-window-state#v2 # or -yarn add https://github.com/tauri-apps/tauri-plugin-window-state#next +yarn add https://github.com/tauri-apps/tauri-plugin-window-state#v2 ``` ## Usage @@ -62,7 +62,7 @@ app.save_window_state(StateFlags::all()); // will save the state of all open win or through Javascript ```javascript -import { saveWindowState, StateFlags } from 'tauri-plugin-window-state-api'; +import { saveWindowState, StateFlags } from "tauri-plugin-window-state-api"; saveWindowState(StateFlags.ALL); ``` @@ -79,7 +79,7 @@ window.restore_state(StateFlags::all()); // will restore the windows state from or through Javascript ```javascript -import { restoreStateCurrent, StateFlags } from 'tauri-plugin-window-state-api'; +import { restoreStateCurrent, StateFlags } from "tauri-plugin-window-state-api"; restoreStateCurrent(StateFlags.ALL); ``` diff --git a/shared/template/README.md b/shared/template/README.md index ed5545a2..9ef4ffe0 100644 --- a/shared/template/README.md +++ b/shared/template/README.md @@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file: ```toml [dependencies] - = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" } + = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: