From 59cb08e90298b4736e73721679f4d4a74081393a Mon Sep 17 00:00:00 2001 From: FabianLars Date: Wed, 26 Apr 2023 18:01:46 +0200 Subject: [PATCH] chore: Adapt readmes to next branch --- plugins/authenticator/README.md | 32 ++++++++++--------------------- plugins/autostart/README.md | 10 +++++----- plugins/cli/README.md | 12 ++++++------ plugins/clipboard/README.md | 12 ++++++------ plugins/dialog/README.md | 2 +- plugins/fs-watch/README.md | 26 +++++++++---------------- plugins/fs/README.md | 12 ++++++------ plugins/global-shortcut/README.md | 12 ++++++------ plugins/http/README.md | 12 ++++++------ plugins/localhost/README.md | 2 +- plugins/log/README.md | 16 ++++++++-------- plugins/persisted-scope/README.md | 2 +- plugins/positioner/README.md | 10 +++++----- plugins/shell/README.md | 12 ++++++------ plugins/single-instance/README.md | 2 +- plugins/sql/README.md | 18 ++++++++--------- plugins/store/README.md | 16 ++++++++-------- plugins/stronghold/README.md | 10 +++++----- plugins/upload/README.md | 8 ++++---- plugins/websocket/README.md | 14 +++++++------- plugins/window-state/README.md | 12 ++++++------ 21 files changed, 116 insertions(+), 136 deletions(-) diff --git a/plugins/authenticator/README.md b/plugins/authenticator/README.md index 0e700f6a..45c466c8 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 = "dev" } +tauri-plugin-authenticator = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-authenticator#next # or -npm add https://github.com/tauri-apps/tauri-plugin-authenticator +npm add https://github.com/tauri-apps/tauri-plugin-authenticator#next # or -yarn add https://github.com/tauri-apps/tauri-plugin-authenticator +yarn add https://github.com/tauri-apps/tauri-plugin-authenticator#next ``` ## 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,21 +63,16 @@ 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 @@ -85,17 +80,10 @@ 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 419907c3..34c32130 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 = "dev" } +tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-autostart#next # or -npm add https://github.com/tauri-apps/tauri-plugin-autostart +npm add https://github.com/tauri-apps/tauri-plugin-autostart#next # or -yarn add https://github.com/tauri-apps/tauri-plugin-autostart +yarn add https://github.com/tauri-apps/tauri-plugin-autostart#next ``` ## 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 ed5545a2..0b63ebea 100644 --- a/plugins/cli/README.md +++ b/plugins/cli/README.md @@ -1,4 +1,4 @@ -![{{plugin name}}](banner.jpg) +![plugin-cli](banner.jpg) @@ -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" } +tauri-plugin-cli = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-cli#next # or -npm add +npm add https://github.com/tauri-apps/tauri-plugin-cli#next # or -yarn add +yarn add https://github.com/tauri-apps/tauri-plugin-cli#next ``` ## Usage @@ -42,7 +42,7 @@ First you need to register the core plugin with Tauri: ```rust fn main() { tauri::Builder::default() - .plugin() + .plugin(tauri_plugin_cli::init()) .run(tauri::generate_context!()) .expect("error while running tauri application"); } diff --git a/plugins/clipboard/README.md b/plugins/clipboard/README.md index ed5545a2..b95cf370 100644 --- a/plugins/clipboard/README.md +++ b/plugins/clipboard/README.md @@ -1,4 +1,4 @@ -![{{plugin name}}](banner.jpg) +![plugin-clipboard](banner.jpg) @@ -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" } +tauri-plugin-clipboard = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-clipboard#next # or -npm add +npm add https://github.com/tauri-apps/tauri-plugin-clipboard#next # or -yarn add +yarn add https://github.com/tauri-apps/tauri-plugin-clipboard#next ``` ## Usage @@ -42,7 +42,7 @@ First you need to register the core plugin with Tauri: ```rust fn main() { tauri::Builder::default() - .plugin() + .plugin(tauri_plugin_clipboard::init()) .run(tauri::generate_context!()) .expect("error while running tauri application"); } diff --git a/plugins/dialog/README.md b/plugins/dialog/README.md index 650d1b08..8a37d5cd 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 = "dev" } +tauri-plugin-dialog-api = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 8162d1fe..13b6f42e 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 = "dev" } +tauri-plugin-fs-watch = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-fs-watch#next # or -npm add https://github.com/tauri-apps/tauri-plugin-fs-watch +npm add https://github.com/tauri-apps/tauri-plugin-fs-watch#next # or -yarn add https://github.com/tauri-apps/tauri-plugin-fs-watch +yarn add https://github.com/tauri-apps/tauri-plugin-fs-watch#next ``` ## Usage @@ -51,24 +51,16 @@ 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( - "/path/to/something", - { recursive: true }, - (event) => { +const stopWatching = await watch('/path/to/something', { recursive: true }, (event) => { const { type, payload } = event; - } -); +}); -const stopRawWatcher = await watchImmediate( - ["/path/a", "/path/b"], - {}, - (event) => { +const stopRawWatcher = await watchImmediate(['/path/a', '/path/b'], {}, (event) => { const { path, operation, cookie } = event; - } -); +}); ``` ## Contributing diff --git a/plugins/fs/README.md b/plugins/fs/README.md index 4d5a2cd6..4dacbf07 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 = "dev" } +tauri-plugin-fs = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-fs#next # or -npm add https://github.com/tauri-apps/tauri-plugin-fs +npm add https://github.com/tauri-apps/tauri-plugin-fs#next # or -yarn add https://github.com/tauri-apps/tauri-plugin-fs +yarn add https://github.com/tauri-apps/tauri-plugin-fs#next ``` ## 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 ed5545a2..90fe056d 100644 --- a/plugins/global-shortcut/README.md +++ b/plugins/global-shortcut/README.md @@ -1,4 +1,4 @@ -![{{plugin name}}](banner.jpg) +![plugin-shortcut](banner.jpg) @@ -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" } +tauri-plugin-shortcut = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-shortcut#next # or -npm add +npm add https://github.com/tauri-apps/tauri-plugin-shortcut#next # or -yarn add +yarn add https://github.com/tauri-apps/tauri-plugin-shortcut#next ``` ## Usage @@ -42,7 +42,7 @@ First you need to register the core plugin with Tauri: ```rust fn main() { tauri::Builder::default() - .plugin() + .plugin(tauri_plugin_shortcut::init()) .run(tauri::generate_context!()) .expect("error while running tauri application"); } diff --git a/plugins/http/README.md b/plugins/http/README.md index ed5545a2..2b72b4b9 100644 --- a/plugins/http/README.md +++ b/plugins/http/README.md @@ -1,4 +1,4 @@ -![{{plugin name}}](banner.jpg) +![plugin-http](banner.jpg) @@ -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" } +tauri-plugin-http = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-http#next # or -npm add +npm add https://github.com/tauri-apps/tauri-plugin-http#next # or -yarn add +yarn add https://github.com/tauri-apps/tauri-plugin-http#next ``` ## Usage @@ -42,7 +42,7 @@ First you need to register the core plugin with Tauri: ```rust fn main() { tauri::Builder::default() - .plugin() + .plugin(tauri_plugin_http::init()) .run(tauri::generate_context!()) .expect("error while running tauri application"); } diff --git a/plugins/localhost/README.md b/plugins/localhost/README.md index 50665f66..8713350e 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 = "dev" } +tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } 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 fca43611..1f08db96 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 = "dev" } +tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-log#next # or -npm add https://github.com/tauri-apps/tauri-plugin-log +npm add https://github.com/tauri-apps/tauri-plugin-log#next # or -yarn add https://github.com/tauri-apps/tauri-plugin-log +yarn add https://github.com/tauri-apps/tauri-plugin-log#next ``` ## 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 26888b59..e24d0e70 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 = "dev" } +tauri-plugin-persisted-scope = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` ## Usage diff --git a/plugins/positioner/README.md b/plugins/positioner/README.md index ebac8500..099f7575 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 = "dev" } +tauri-plugin-positioner = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` You can install the JavaScript Guest bindings using your preferred JavaScript package manager: @@ -40,11 +40,11 @@ yarn add tauri-plugin-positioner Or through git: ```sh -pnpm add https://github.com/tauri-apps/tauri-plugin-positioner +pnpm add https://github.com/tauri-apps/tauri-plugin-positioner#next # or -npm add https://github.com/tauri-apps/tauri-plugin-positioner +npm add https://github.com/tauri-apps/tauri-plugin-positioner#next # or -yarn add https://github.com/tauri-apps/tauri-plugin-positioner +yarn add https://github.com/tauri-apps/tauri-plugin-positioner#next ``` ## 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 ed5545a2..6a0aa343 100644 --- a/plugins/shell/README.md +++ b/plugins/shell/README.md @@ -1,4 +1,4 @@ -![{{plugin name}}](banner.jpg) +![plugin-shell](banner.jpg) @@ -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" } +tauri-plugin-shell = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-shell#next # or -npm add +npm add https://github.com/tauri-apps/tauri-plugin-shell#next # or -yarn add +yarn add https://github.com/tauri-apps/tauri-plugin-shell#next ``` ## Usage @@ -42,7 +42,7 @@ First you need to register the core plugin with Tauri: ```rust fn main() { tauri::Builder::default() - .plugin() + .plugin(tauri_plugin_shell::init()) .run(tauri::generate_context!()) .expect("error while running tauri application"); } diff --git a/plugins/single-instance/README.md b/plugins/single-instance/README.md index 595d6b17..d68e6684 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 = "dev" } +tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` ## Usage diff --git a/plugins/sql/README.md b/plugins/sql/README.md index 7ec807b1..df0eb482 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 = "dev" +branch = "next" 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-sql#next # or -npm add https://github.com/tauri-apps/tauri-plugin-sql +npm add https://github.com/tauri-apps/tauri-plugin-sql#next # or -yarn add https://github.com/tauri-apps/tauri-plugin-sql +yarn add https://github.com/tauri-apps/tauri-plugin-sql#next ``` ## 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 f8ff874f..4c68eb3d 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 = "dev" } +tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-store#next # or -npm add https://github.com/tauri-apps/tauri-plugin-store +npm add https://github.com/tauri-apps/tauri-plugin-store#next # or -yarn add https://github.com/tauri-apps/tauri-plugin-store +yarn add https://github.com/tauri-apps/tauri-plugin-store#next ``` ## 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 2b5b2790..25b95a7e 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 = "dev" } +tauri-plugin-stronghold = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-stronghold#next # or -npm add https://github.com/tauri-apps/tauri-plugin-stronghold +npm add https://github.com/tauri-apps/tauri-plugin-stronghold#next # or -yarn add https://github.com/tauri-apps/tauri-plugin-stronghold +yarn add https://github.com/tauri-apps/tauri-plugin-stronghold#next ``` ## 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 cd24a9d5..5f143a4e 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 = "dev" } +tauri-plugin-upload = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-upload#next # or -npm add https://github.com/tauri-apps/tauri-plugin-upload +npm add https://github.com/tauri-apps/tauri-plugin-upload#next # or -yarn add https://github.com/tauri-apps/tauri-plugin-upload +yarn add https://github.com/tauri-apps/tauri-plugin-upload#next ``` ## Usage diff --git a/plugins/websocket/README.md b/plugins/websocket/README.md index 96c5c324..716f113d 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 = "dev" } +tauri-plugin-websocket = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-websocket#next # or -npm add https://github.com/tauri-apps/tauri-plugin-websocket +npm add https://github.com/tauri-apps/tauri-plugin-websocket#next # or -yarn add https://github.com/tauri-apps/tauri-plugin-websocket +yarn add https://github.com/tauri-apps/tauri-plugin-websocket#next ``` ## 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 90c0a0bb..051ee969 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 = "dev" } +tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } ``` 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 +pnpm add https://github.com/tauri-apps/tauri-plugin-window-state#next # or -npm add https://github.com/tauri-apps/tauri-plugin-window-state +npm add https://github.com/tauri-apps/tauri-plugin-window-state#next # or -yarn add https://github.com/tauri-apps/tauri-plugin-window-state +yarn add https://github.com/tauri-apps/tauri-plugin-window-state#next ``` ## 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); ```