change to @tauri-apps/plugin

pull/368/head
Lucas Nogueira 2 years ago
parent e53e6c0054
commit 09adffa631
No known key found for this signature in database
GPG Key ID: FFEA6C72E73482F1

@ -11,19 +11,19 @@
"@tauri-apps/api": "2.0.0-alpha.3",
"@tauri-apps/cli": "2.0.0-alpha.8",
"@zerodevx/svelte-json-view": "0.2.1",
"@tauri-plugins/app": "0.0.0",
"@tauri-plugins/cli": "0.0.0",
"@tauri-plugins/clipboard": "0.0.0",
"@tauri-plugins/dialog": "0.0.0",
"@tauri-plugins/fs": "0.0.0",
"@tauri-plugins/global-shortcut": "0.0.0",
"@tauri-plugins/http": "0.0.0",
"@tauri-plugins/notification": "0.0.0",
"@tauri-plugins/os": "0.0.0",
"@tauri-plugins/process": "0.0.0",
"@tauri-plugins/shell": "0.0.0",
"@tauri-plugins/updater": "0.0.0",
"@tauri-plugins/window": "0.0.0"
"@tauri-apps/plugin-app": "0.0.0",
"@tauri-apps/plugin-cli": "0.0.0",
"@tauri-apps/plugin-clipboard": "0.0.0",
"@tauri-apps/plugin-dialog": "0.0.0",
"@tauri-apps/plugin-fs": "0.0.0",
"@tauri-apps/plugin-global-shortcut": "0.0.0",
"@tauri-apps/plugin-http": "0.0.0",
"@tauri-apps/plugin-notification": "0.0.0",
"@tauri-apps/plugin-os": "0.0.0",
"@tauri-apps/plugin-process": "0.0.0",
"@tauri-apps/plugin-shell": "0.0.0",
"@tauri-apps/plugin-updater": "0.0.0",
"@tauri-apps/plugin-window": "0.0.0"
},
"devDependencies": {
"@iconify-json/codicon": "^1.1.10",

@ -1,8 +1,8 @@
<script>
import { writable } from "svelte/store";
import { open } from "@tauri-plugins/shell";
import { appWindow, getCurrent } from "@tauri-plugins/window";
import * as os from "@tauri-plugins/os";
import { open } from "@tauri-apps/plugin-shell";
import { appWindow, getCurrent } from "@tauri-apps/plugin-window";
import * as os from "@tauri-apps/plugin-os";
import Welcome from "./views/Welcome.svelte";
import Cli from "./views/Cli.svelte";
@ -20,7 +20,7 @@
import App from "./views/App.svelte";
import { onMount } from "svelte";
import { ask } from "@tauri-plugins/dialog";
import { ask } from "@tauri-apps/plugin-dialog";
if (appWindow.label !== "main") {
appWindow.onCloseRequested(async (event) => {

@ -1,5 +1,5 @@
<script>
import { show, hide } from "@tauri-plugins/app";
import { show, hide } from "@tauri-apps/plugin-app";
export let onMessage;

@ -1,5 +1,5 @@
<script>
import { getMatches } from "@tauri-plugins/cli";
import { getMatches } from "@tauri-apps/plugin-cli";
export let onMessage;

@ -1,5 +1,5 @@
<script>
import { writeText, readText } from "@tauri-plugins/clipboard";
import { writeText, readText } from "@tauri-apps/plugin-clipboard";
export let onMessage;
let text = "clipboard message";

@ -1,5 +1,5 @@
<script>
import { appWindow } from "@tauri-plugins/window";
import { appWindow } from "@tauri-apps/plugin-window";
import { invoke } from "@tauri-apps/api/tauri";
import { onMount, onDestroy } from "svelte";

@ -1,6 +1,6 @@
<script>
import { open, save, confirm } from "@tauri-plugins/dialog";
import { readBinaryFile } from "@tauri-plugins/fs";
import { open, save, confirm } from "@tauri-apps/plugin-dialog";
import { readBinaryFile } from "@tauri-apps/plugin-fs";
export let onMessage;
export let insecureRenderHtml;

@ -4,7 +4,7 @@
writeTextFile,
readDir,
Dir,
} from "@tauri-plugins/fs";
} from "@tauri-apps/plugin-fs";
import { convertFileSrc } from "@tauri-apps/api/tauri";
export let onMessage;

@ -1,5 +1,5 @@
<script>
import { getClient, Body, ResponseType } from "@tauri-plugins/http";
import { getClient, Body, ResponseType } from "@tauri-apps/plugin-http";
import { JsonView } from "@zerodevx/svelte-json-view";
let httpMethod = "GET";

@ -1,5 +1,5 @@
<script>
import { Command } from "@tauri-plugins/shell";
import { Command } from "@tauri-apps/plugin-shell";
const windows = navigator.userAgent.includes("Windows");
let cmd = windows ? "cmd" : "sh";

@ -4,7 +4,7 @@
register as registerShortcut,
unregister as unregisterShortcut,
unregisterAll as unregisterAllShortcuts,
} from "@tauri-plugins/global-shortcut";
} from "@tauri-apps/plugin-global-shortcut";
export let onMessage;
const shortcuts = writable([]);

@ -1,6 +1,6 @@
<script>
import { check } from "@tauri-plugins/updater";
import { relaunch } from "@tauri-plugins/process";
import { check } from "@tauri-apps/plugin-updater";
import { relaunch } from "@tauri-apps/plugin-process";
export let onMessage;

@ -1,6 +1,6 @@
<script>
import { getName, getVersion, getTauriVersion } from "@tauri-plugins/app";
import { relaunch, exit } from "@tauri-plugins/process";
import { getName, getVersion, getTauriVersion } from "@tauri-apps/plugin-app";
import { relaunch, exit } from "@tauri-apps/plugin-process";
let version = "0.0.0";
let tauriVersion = "0.0.0";

@ -6,9 +6,9 @@
UserAttentionType,
PhysicalSize,
PhysicalPosition,
} from "@tauri-plugins/window";
import { open as openDialog } from "@tauri-plugins/dialog";
import { open } from "@tauri-plugins/shell";
} from "@tauri-apps/plugin-window";
import { open as openDialog } from "@tauri-apps/plugin-dialog";
import { open } from "@tauri-apps/plugin-shell";
let selectedWindow = appWindow.label;
const windowMap = {

@ -40,7 +40,7 @@ npm manifest:
"dependencies": {
"@tauri-apps/api": "../../tooling/api/dist",
"@zerodevx/svelte-json-view": "0.2.1",
"@tauri-plugins/fs": "https://gitpkg.now.sh/tauri-apps/plugins-workspace/plugins/fs?feat/fs-plugin&scripts.build=build"
"@tauri-apps/plugin-fs": "https://gitpkg.now.sh/tauri-apps/plugins-workspace/plugins/fs?feat/fs-plugin&scripts.build=build"
},
"devDependencies": {
"@iconify-json/codicon": "^1.1.10",
@ -1009,7 +1009,7 @@ Lockfile:
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029"
integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA==
"@tauri-plugins/fs@https://gitpkg.now.sh/tauri-apps/plugins-workspace/plugins/fs?feat/fs-plugin":
"@tauri-apps/plugin-fs@https://gitpkg.now.sh/tauri-apps/plugins-workspace/plugins/fs?feat/fs-plugin":
version "0.0.0"
resolved "https://gitpkg.now.sh/tauri-apps/plugins-workspace/plugins/fs?feat/fs-plugin#a4b37d92c5fd3e638ad21d4ccf0132e07acc0136"
dependencies:

@ -51,7 +51,7 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import * as app from "@tauri-plugins/app";
import * as app from "@tauri-apps/plugin-app";
```
## Contributing

@ -30,7 +30,7 @@ import { invoke } from "@tauri-apps/api/tauri";
* Gets the application version.
* @example
* ```typescript
* import { getVersion } from '@tauri-plugins/app';
* import { getVersion } from '@tauri-apps/plugin-app';
* const appVersion = await getVersion();
* ```
*
@ -44,7 +44,7 @@ async function getVersion(): Promise<string> {
* Gets the application name.
* @example
* ```typescript
* import { getName } from '@tauri-plugins/app';
* import { getName } from '@tauri-apps/plugin-app';
* const appName = await getName();
* ```
*
@ -59,7 +59,7 @@ async function getName(): Promise<string> {
*
* @example
* ```typescript
* import { getTauriVersion } from '@tauri-plugins/app';
* import { getTauriVersion } from '@tauri-apps/plugin-app';
* const tauriVersion = await getTauriVersion();
* ```
*
@ -74,7 +74,7 @@ async function getTauriVersion(): Promise<string> {
*
* @example
* ```typescript
* import { show } from '@tauri-plugins/app';
* import { show } from '@tauri-apps/plugin-app';
* await show();
* ```
*
@ -89,7 +89,7 @@ async function show(): Promise<void> {
*
* @example
* ```typescript
* import { hide } from '@tauri-plugins/app';
* import { hide } from '@tauri-apps/plugin-app';
* await hide();
* ```
*

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/app",
"name": "@tauri-apps/plugin-app",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -53,7 +53,7 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { Authenticator } from "@tauri-plugins/authenticator";
import { Authenticator } from "@tauri-apps/plugin-authenticator";
const auth = new Authenticator();
auth.init(); // initialize transports

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/authenticator",
"name": "@tauri-apps/plugin-authenticator",
"version": "0.0.0",
"description": "Use hardware security-keys in your Tauri App.",
"license": "MIT or APACHE-2.0",

@ -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-plugins/autostart";
import { enable, isEnabled, disable } from "@tauri-apps/plugin-autostart";
await enable();

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/autostart",
"name": "@tauri-apps/plugin-autostart",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -47,7 +47,7 @@ interface CliMatches {
*
* @example
* ```typescript
* import { getMatches } from '@tauri-plugins/cli';
* import { getMatches } from '@tauri-apps/plugin-cli';
* const matches = await getMatches();
* if (matches.subcommand?.name === 'run') {
* // `./your-app run $ARGS` was executed

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/cli",
"name": "@tauri-apps/plugin-cli",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -37,7 +37,7 @@ type ClipResponse = Clip<"PlainText", string>;
* Writes plain text to the clipboard.
* @example
* ```typescript
* import { writeText, readText } from '@tauri-plugins/clipboard';
* import { writeText, readText } from '@tauri-apps/plugin-clipboard';
* await writeText('Tauri is awesome!');
* assert(await readText(), 'Tauri is awesome!');
* ```
@ -65,7 +65,7 @@ async function writeText(
* Gets the clipboard content as plain text.
* @example
* ```typescript
* import { readText } from '@tauri-plugins/clipboard';
* import { readText } from '@tauri-apps/plugin-clipboard';
* const clipboardText = await readText();
* ```
* @since 1.0.0.

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/clipboard",
"name": "@tauri-apps/plugin-clipboard",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
@tauri-plugins/dialog = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
@tauri-apps/plugin-dialog = { 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 @tauri-plugins/dialog
pnpm add @tauri-apps/plugin-dialog
# or
npm add @tauri-plugins/dialog
npm add @tauri-apps/plugin-dialog
# or
yarn add @tauri-plugins/dialog
yarn add @tauri-apps/plugin-dialog
```
## Usage

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/dialog",
"name": "@tauri-apps/plugin-dialog",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -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-plugins/fs-watch";
import { watch, watchImmediate } from "@tauri-apps/plugin-fs-watch";
// can also watch an array of paths
const stopWatching = await watch(

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/fs-watch",
"name": "@tauri-apps/plugin-fs-watch",
"version": "0.0.0",
"description": "Watch files and directories for changes.",
"license": "MIT or APACHE-2.0",

@ -51,7 +51,7 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { metadata } from "@tauri-plugins/fs";
import { metadata } from "@tauri-apps/plugin-fs";
await metadata("/path/to/file");
```

@ -273,7 +273,7 @@ interface FileEntry {
* Reads a file as an UTF-8 encoded string.
* @example
* ```typescript
* import { readTextFile, BaseDirectory } from '@tauri-plugins/fs';
* import { readTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
* // Read the text file in the `$APPCONFIG/app.conf` path
* const contents = await readTextFile('app.conf', { dir: BaseDirectory.AppConfig });
* ```
@ -294,7 +294,7 @@ async function readTextFile(
* Reads a file as byte array.
* @example
* ```typescript
* import { readBinaryFile, BaseDirectory } from '@tauri-plugins/fs';
* import { readBinaryFile, BaseDirectory } from '@tauri-apps/plugin-fs';
* // Read the image file in the `$RESOURCEDIR/avatar.png` path
* const contents = await readBinaryFile('avatar.png', { dir: BaseDirectory.Resource });
* ```
@ -317,7 +317,7 @@ async function readBinaryFile(
* Writes a UTF-8 text file.
* @example
* ```typescript
* import { writeTextFile, BaseDirectory } from '@tauri-plugins/fs';
* import { writeTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
* // Write a text file to the `$APPCONFIG/app.conf` path
* await writeTextFile('app.conf', 'file contents', { dir: BaseDirectory.AppConfig });
* ```
@ -334,7 +334,7 @@ async function writeTextFile(
* Writes a UTF-8 text file.
* @example
* ```typescript
* import { writeTextFile, BaseDirectory } from '@tauri-plugins/fs';
* import { writeTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
* // Write a text file to the `$APPCONFIG/app.conf` path
* await writeTextFile({ path: 'app.conf', contents: 'file contents' }, { dir: BaseDirectory.AppConfig });
* ```
@ -392,7 +392,7 @@ async function writeTextFile(
* Writes a byte array content to a file.
* @example
* ```typescript
* import { writeBinaryFile, BaseDirectory } from '@tauri-plugins/fs';
* import { writeBinaryFile, BaseDirectory } from '@tauri-apps/plugin-fs';
* // Write a binary file to the `$APPDATA/avatar.png` path
* await writeBinaryFile('avatar.png', new Uint8Array([]), { dir: BaseDirectory.AppData });
* ```
@ -412,7 +412,7 @@ async function writeBinaryFile(
* Writes a byte array content to a file.
* @example
* ```typescript
* import { writeBinaryFile, BaseDirectory } from '@tauri-plugins/fs';
* import { writeBinaryFile, BaseDirectory } from '@tauri-apps/plugin-fs';
* // Write a binary file to the `$APPDATA/avatar.png` path
* await writeBinaryFile({ path: 'avatar.png', contents: new Uint8Array([]) }, { dir: BaseDirectory.AppData });
* ```
@ -478,7 +478,7 @@ async function writeBinaryFile(
* List directory files.
* @example
* ```typescript
* import { readDir, BaseDirectory } from '@tauri-plugins/fs';
* import { readDir, BaseDirectory } from '@tauri-apps/plugin-fs';
* // Reads the `$APPDATA/users` directory recursively
* const entries = await readDir('users', { dir: BaseDirectory.AppData, recursive: true });
*
@ -510,7 +510,7 @@ async function readDir(
* and the `recursive` option isn't set to true, the promise will be rejected.
* @example
* ```typescript
* import { createDir, BaseDirectory } from '@tauri-plugins/fs';
* import { createDir, BaseDirectory } from '@tauri-apps/plugin-fs';
* // Create the `$APPDATA/users` directory
* await createDir('users', { dir: BaseDirectory.AppData, recursive: true });
* ```
@ -534,7 +534,7 @@ async function createDir(
* If the directory is not empty and the `recursive` option isn't set to true, the promise will be rejected.
* @example
* ```typescript
* import { removeDir, BaseDirectory } from '@tauri-plugins/fs';
* import { removeDir, BaseDirectory } from '@tauri-apps/plugin-fs';
* // Remove the directory `$APPDATA/users`
* await removeDir('users', { dir: BaseDirectory.AppData });
* ```
@ -557,7 +557,7 @@ async function removeDir(
* Copies a file to a destination.
* @example
* ```typescript
* import { copyFile, BaseDirectory } from '@tauri-plugins/fs';
* import { copyFile, BaseDirectory } from '@tauri-apps/plugin-fs';
* // Copy the `$APPCONFIG/app.conf` file to `$APPCONFIG/app.conf.bk`
* await copyFile('app.conf', 'app.conf.bk', { dir: BaseDirectory.AppConfig });
* ```
@ -582,7 +582,7 @@ async function copyFile(
* Removes a file.
* @example
* ```typescript
* import { removeFile, BaseDirectory } from '@tauri-plugins/fs';
* import { removeFile, BaseDirectory } from '@tauri-apps/plugin-fs';
* // Remove the `$APPConfig/app.conf` file
* await removeFile('app.conf', { dir: BaseDirectory.AppConfig });
* ```
@ -605,7 +605,7 @@ async function removeFile(
* Renames a file.
* @example
* ```typescript
* import { renameFile, BaseDirectory } from '@tauri-plugins/fs';
* import { renameFile, BaseDirectory } from '@tauri-apps/plugin-fs';
* // Rename the `$APPDATA/avatar.png` file
* await renameFile('avatar.png', 'deleted.png', { dir: BaseDirectory.AppData });
* ```
@ -630,7 +630,7 @@ async function renameFile(
* Check if a path exists.
* @example
* ```typescript
* import { exists, BaseDirectory } from '@tauri-plugins/fs';
* import { exists, BaseDirectory } from '@tauri-apps/plugin-fs';
* // Check if the `$APPDATA/avatar.png` file exists
* await exists('avatar.png', { dir: BaseDirectory.AppData });
* ```

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/fs",
"name": "@tauri-apps/plugin-fs",
"version": "0.0.0",
"description": "Access the file system.",
"license": "MIT or APACHE-2.0",

@ -29,7 +29,7 @@ export type ShortcutHandler = (shortcut: string) => void;
* Register a global shortcut.
* @example
* ```typescript
* import { register } from '@tauri-plugins/global-shortcut';
* import { register } from '@tauri-apps/plugin-global-shortcut';
* await register('CommandOrControl+Shift+C', () => {
* console.log('Shortcut triggered');
* });
@ -54,7 +54,7 @@ async function register(
* Register a collection of global shortcuts.
* @example
* ```typescript
* import { registerAll } from '@tauri-plugins/global-shortcut';
* import { registerAll } from '@tauri-apps/plugin-global-shortcut';
* await registerAll(['CommandOrControl+Shift+C', 'Ctrl+Alt+F12'], (shortcut) => {
* console.log(`Shortcut ${shortcut} triggered`);
* });
@ -82,7 +82,7 @@ async function registerAll(
*
* @example
* ```typescript
* import { isRegistered } from '@tauri-plugins/global-shortcut';
* import { isRegistered } from '@tauri-apps/plugin-global-shortcut';
* const isRegistered = await isRegistered('CommandOrControl+P');
* ```
*
@ -100,7 +100,7 @@ async function isRegistered(shortcut: string): Promise<boolean> {
* Unregister a global shortcut.
* @example
* ```typescript
* import { unregister } from '@tauri-plugins/global-shortcut';
* import { unregister } from '@tauri-apps/plugin-global-shortcut';
* await unregister('CmdOrControl+Space');
* ```
*
@ -118,7 +118,7 @@ async function unregister(shortcut: string): Promise<void> {
* Unregisters all shortcuts registered by the application.
* @example
* ```typescript
* import { unregisterAll } from '@tauri-plugins/global-shortcut';
* import { unregisterAll } from '@tauri-apps/plugin-global-shortcut';
* await unregisterAll();
* ```
*

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/global-shortcut",
"name": "@tauri-apps/plugin-global-shortcut",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -108,7 +108,7 @@ class Body {
* Note that a file path must be allowed in the `fs` allowlist scope.
* @example
* ```typescript
* import { Body } from "@tauri-plugins/http"
* import { Body } from "@tauri-apps/plugin-http"
* const body = Body.form({
* key: 'value',
* image: {
@ -169,7 +169,7 @@ class Body {
* Creates a new JSON body.
* @example
* ```typescript
* import { Body } from "@tauri-plugins/http"
* import { Body } from "@tauri-apps/plugin-http"
* Body.json({
* registered: true,
* name: 'tauri'
@ -188,7 +188,7 @@ class Body {
* Creates a new UTF-8 string body.
* @example
* ```typescript
* import { Body } from "@tauri-plugins/http"
* import { Body } from "@tauri-apps/plugin-http"
* Body.text('The body content as a string');
* ```
*
@ -204,7 +204,7 @@ class Body {
* Creates a new byte array body.
* @example
* ```typescript
* import { Body } from "@tauri-plugins/http"
* import { Body } from "@tauri-apps/plugin-http"
* Body.bytes(new Uint8Array([1, 2, 3]));
* ```
*
@ -308,7 +308,7 @@ class Client {
* Drops the client instance.
* @example
* ```typescript
* import { getClient } from '@tauri-plugins/http';
* import { getClient } from '@tauri-apps/plugin-http';
* const client = await getClient();
* await client.drop();
* ```
@ -323,7 +323,7 @@ class Client {
* Makes an HTTP request.
* @example
* ```typescript
* import { getClient } from '@tauri-plugins/http';
* import { getClient } from '@tauri-apps/plugin-http';
* const client = await getClient();
* const response = await client.request({
* method: 'GET',
@ -367,7 +367,7 @@ class Client {
* Makes a GET request.
* @example
* ```typescript
* import { getClient, ResponseType } from '@tauri-plugins/http';
* import { getClient, ResponseType } from '@tauri-apps/plugin-http';
* const client = await getClient();
* const response = await client.get('http://localhost:3003/users', {
* timeout: 30,
@ -388,7 +388,7 @@ class Client {
* Makes a POST request.
* @example
* ```typescript
* import { getClient, Body, ResponseType } from '@tauri-plugins/http';
* import { getClient, Body, ResponseType } from '@tauri-apps/plugin-http';
* const client = await getClient();
* const response = await client.post('http://localhost:3003/users', {
* body: Body.json({
@ -417,7 +417,7 @@ class Client {
* Makes a PUT request.
* @example
* ```typescript
* import { getClient, Body } from '@tauri-plugins/http';
* import { getClient, Body } from '@tauri-apps/plugin-http';
* const client = await getClient();
* const response = await client.put('http://localhost:3003/users/1', {
* body: Body.form({
@ -447,7 +447,7 @@ class Client {
* Makes a PATCH request.
* @example
* ```typescript
* import { getClient, Body } from '@tauri-plugins/http';
* import { getClient, Body } from '@tauri-apps/plugin-http';
* const client = await getClient();
* const response = await client.patch('http://localhost:3003/users/1', {
* body: Body.json({ email: 'contact@tauri.app' })
@ -466,7 +466,7 @@ class Client {
* Makes a DELETE request.
* @example
* ```typescript
* import { getClient } from '@tauri-plugins/http';
* import { getClient } from '@tauri-apps/plugin-http';
* const client = await getClient();
* const response = await client.delete('http://localhost:3003/users/1');
* ```
@ -484,7 +484,7 @@ class Client {
* Creates a new client using the specified options.
* @example
* ```typescript
* import { getClient } from '@tauri-plugins/http';
* import { getClient } from '@tauri-apps/plugin-http';
* const client = await getClient();
* ```
*
@ -507,7 +507,7 @@ let defaultClient: Client | null = null;
* Perform an HTTP request using the default client.
* @example
* ```typescript
* import { fetch } from '@tauri-plugins/http';
* import { fetch } from '@tauri-apps/plugin-http';
* const response = await fetch('http://localhost:3003/users/2', {
* method: 'GET',
* timeout: 30,

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/http",
"name": "@tauri-apps/plugin-http",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -57,7 +57,7 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { trace, info, error, attachConsole } from "@tauri-plugins/log";
import { trace, info, error, attachConsole } from "@tauri-apps/plugin-log";
// with LogTarget::Webview enabled this function will print logs to the browser console
const detach = await attachConsole();

@ -75,7 +75,7 @@ async function log(
* # Examples
*
* ```js
* import { error } from '@tauri-plugins/log';
* import { error } from '@tauri-apps/plugin-log';
*
* const err_info = "No connection";
* const port = 22;
@ -98,7 +98,7 @@ export async function error(
* # Examples
*
* ```js
* import { warn } from '@tauri-plugins/log';
* import { warn } from '@tauri-apps/plugin-log';
*
* const warn_description = "Invalid Input";
*
@ -120,7 +120,7 @@ export async function warn(
* # Examples
*
* ```js
* import { info } from '@tauri-plugins/log';
* import { info } from '@tauri-apps/plugin-log';
*
* const conn_info = { port: 40, speed: 3.20 };
*
@ -142,7 +142,7 @@ export async function info(
* # Examples
*
* ```js
* import { debug } from '@tauri-plugins/log';
* import { debug } from '@tauri-apps/plugin-log';
*
* const pos = { x: 3.234, y: -1.223 };
*
@ -164,7 +164,7 @@ export async function debug(
* # Examples
*
* ```js
* import { trace } from '@tauri-plugins/log';
* import { trace } from '@tauri-apps/plugin-log';
*
* let pos = { x: 3.234, y: -1.223 };
*

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/log",
"name": "@tauri-apps/plugin-log",
"version": "0.0.0",
"description": "Configurable logging for your Tauri app.",
"license": "MIT or APACHE-2.0",

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/notification",
"name": "@tauri-apps/plugin-notification",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -51,7 +51,7 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import * as os from "@tauri-plugins/os";
import * as os from "@tauri-apps/plugin-os";
```
## Contributing

@ -68,7 +68,7 @@ const EOL = isWindows() ? "\r\n" : "\n";
* The value is set at compile time. Possible values are `'linux'`, `'darwin'`, `'ios'`, `'freebsd'`, `'dragonfly'`, `'netbsd'`, `'openbsd'`, `'solaris'`, `'android'`, `'win32'`
* @example
* ```typescript
* import { platform } from '@tauri-plugins/os';
* import { platform } from '@tauri-apps/plugin-os';
* const platformName = await platform();
* ```
*
@ -83,7 +83,7 @@ async function platform(): Promise<Platform> {
* Returns a string identifying the kernel version.
* @example
* ```typescript
* import { version } from '@tauri-plugins/os';
* import { version } from '@tauri-apps/plugin-os';
* const osVersion = await version();
* ```
*
@ -97,7 +97,7 @@ async function version(): Promise<string> {
* Returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
* @example
* ```typescript
* import { type } from '@tauri-plugins/os';
* import { type } from '@tauri-apps/plugin-os';
* const osType = await type();
* ```
*
@ -112,7 +112,7 @@ async function type(): Promise<OsType> {
* Possible values are `'x86'`, `'x86_64'`, `'arm'`, `'aarch64'`, `'mips'`, `'mips64'`, `'powerpc'`, `'powerpc64'`, `'riscv64'`, `'s390x'`, `'sparc64'`.
* @example
* ```typescript
* import { arch } from '@tauri-plugins/os';
* import { arch } from '@tauri-apps/plugin-os';
* const archName = await arch();
* ```
*
@ -126,7 +126,7 @@ async function arch(): Promise<Arch> {
* Returns the operating system's default directory for temporary files as a string.
* @example
* ```typescript
* import { tempdir } from '@tauri-plugins/os';
* import { tempdir } from '@tauri-apps/plugin-os';
* const tempdirPath = await tempdir();
* ```
*

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/os",
"name": "@tauri-apps/plugin-os",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -30,11 +30,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 @tauri-plugins/positioner
pnpm add @tauri-apps/plugin-positioner
# or
npm add @tauri-plugins/positioner
npm add @tauri-apps/plugin-positioner
# or
yarn add @tauri-plugins/positioner
yarn add @tauri-apps/plugin-positioner
```
Or through git:
@ -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-plugins/positioner";
import { move_window, Position } from "@tauri-apps/plugin-positioner";
move_window(Position.TopRight);
```

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/positioner",
"name": "@tauri-apps/plugin-positioner",
"version": "0.2.7",
"description": "Position your windows at well-known locations.",
"license": "MIT or APACHE-2.0",

@ -51,7 +51,7 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import * as process from "@tauri-plugins/process";
import * as process from "@tauri-apps/plugin-process";
```
## Contributing

@ -13,7 +13,7 @@ import { invoke } from "@tauri-apps/api/tauri";
* Exits immediately with the given `exitCode`.
* @example
* ```typescript
* import { exit } from '@tauri-plugins/process';
* import { exit } from '@tauri-apps/plugin-process';
* await exit(1);
* ```
*
@ -30,7 +30,7 @@ async function exit(code = 0): Promise<void> {
* Exits the current instance of the app then relaunches it.
* @example
* ```typescript
* import { relaunch } from '@tauri-plugins/process';
* import { relaunch } from '@tauri-apps/plugin-process';
* await relaunch();
* ```
*

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/process",
"name": "@tauri-apps/plugin-process",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -66,7 +66,7 @@
* ```
* Usage:
* ```typescript
* import { Command } from '@tauri-plugins/shell'
* import { Command } from '@tauri-apps/plugin-shell'
* Command.create('run-git-commit', ['commit', '-m', 'the commit message'])
* ```
*
@ -348,7 +348,7 @@ class Child {
* @param data The message to write, either a string or a byte array.
* @example
* ```typescript
* import { Command } from '@tauri-plugins/shell';
* import { Command } from '@tauri-apps/plugin-shell';
* const command = Command.create('node');
* const child = await command.spawn();
* await child.write('message');
@ -392,7 +392,7 @@ interface OutputEvents<O extends IOPayload> {
* It emits the `close` and `error` events.
* @example
* ```typescript
* import { Command } from '@tauri-plugins/shell';
* import { Command } from '@tauri-apps/plugin-shell';
* const command = Command.create('node');
* command.on('close', data => {
* console.log(`command finished with code ${data.code} and signal ${data.signal}`)
@ -456,7 +456,7 @@ class Command<O extends IOPayload> extends EventEmitter<CommandEvents> {
* Creates a command to execute the given program.
* @example
* ```typescript
* import { Command } from '@tauri-plugins/shell';
* import { Command } from '@tauri-apps/plugin-shell';
* const command = Command.create('my-app', ['run', 'tauri']);
* const output = await command.execute();
* ```
@ -488,7 +488,7 @@ class Command<O extends IOPayload> extends EventEmitter<CommandEvents> {
* Creates a command to execute the given sidecar program.
* @example
* ```typescript
* import { Command } from '@tauri-plugins/shell';
* import { Command } from '@tauri-apps/plugin-shell';
* const command = Command.sidecar('my-sidecar');
* const output = await command.execute();
* ```
@ -539,7 +539,7 @@ class Command<O extends IOPayload> extends EventEmitter<CommandEvents> {
* Executes the command as a child process, waiting for it to finish and collecting all of its output.
* @example
* ```typescript
* import { Command } from '@tauri-plugins/shell';
* import { Command } from '@tauri-apps/plugin-shell';
* const output = await Command.create('echo', 'message').execute();
* assert(output.code === 0);
* assert(output.signal === null);
@ -624,7 +624,7 @@ type CommandEvent<O extends IOPayload> =
*
* @example
* ```typescript
* import { open } from '@tauri-plugins/shell';
* import { open } from '@tauri-apps/plugin-shell';
* // opens the given URL on the default browser:
* await open('https://github.com/tauri-apps/tauri');
* // opens the given URL using `firefox`:

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/shell",
"name": "@tauri-apps/plugin-shell",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -53,7 +53,7 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import Database from "@tauri-plugins/sql";
import Database from "@tauri-apps/plugin-sql";
// sqlite. The path is relative to `tauri::api::path::BaseDirectory::App`.
const db = await Database.load("sqlite:test.db");

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/sql",
"name": "@tauri-apps/plugin-sql",
"version": "0.0.0",
"description": "Interface with SQL databases",
"license": "MIT or APACHE-2.0",

@ -51,7 +51,7 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { Store } from "@tauri-plugins/store";
import { Store } from "@tauri-apps/plugin-store";
const store = new Store(".settings.dat");

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/store",
"name": "@tauri-apps/plugin-store",
"version": "0.0.0",
"description": "Simple, persistent key-value store.",
"license": "MIT or APACHE-2.0",

@ -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-plugins/stronghold";
import { Stronghold, Location } from "@tauri-apps/plugin-stronghold";
// TODO
```

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/stronghold",
"name": "@tauri-apps/plugin-stronghold",
"version": "0.0.0",
"description": "Store secrets and keys using the IOTA Stronghold encrypted database.",
"license": "MIT or APACHE-2.0",

@ -51,7 +51,7 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import * as updater from "@tauri-plugins/updater";
import * as updater from "@tauri-apps/plugin-updater";
```
## Contributing

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/updater",
"name": "@tauri-apps/plugin-updater",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -51,7 +51,7 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { upload } from '@tauri-plugins/upload'
import { upload } from '@tauri-apps/plugin-upload'
upload(
'https://example.com/file-upload'

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/upload",
"name": "@tauri-apps/plugin-upload",
"version": "0.0.0",
"description": "Upload files from disk to a remote server over HTTP.",
"license": "MIT or APACHE-2.0",

@ -51,7 +51,7 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { WebSocket } from "@tauri-plugins/websocket";
import { WebSocket } from "@tauri-apps/plugin-websocket";
const ws = await WebSocket.connect("wss://example.com");

@ -22,7 +22,7 @@
},
"dependencies": {
"@tauri-apps/cli": "^2.0.0-alpha.8",
"@tauri-plugins/websocket": "link:../../"
"@tauri-apps/plugin-websocket": "link:../../"
},
"type": "module"
}

@ -1,5 +1,5 @@
<script lang="ts">
import WebSocket from "@tauri-plugins/websocket";
import WebSocket from "@tauri-apps/plugin-websocket";
import { onMount } from "svelte";
let ws;

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/websocket",
"name": "@tauri-apps/plugin-websocket",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -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-plugins/window-state";
import { saveWindowState, StateFlags } from "@tauri-apps/plugin-window-state";
saveWindowState(StateFlags.ALL);
```
@ -79,7 +79,10 @@ window.restore_state(StateFlags::all()); // will restore the windows state from
or through Javascript
```javascript
import { restoreStateCurrent, StateFlags } from "@tauri-plugins/window-state";
import {
restoreStateCurrent,
StateFlags,
} from "@tauri-apps/plugin-window-state";
restoreStateCurrent(StateFlags.ALL);
```

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/window-state",
"name": "@tauri-apps/plugin-window-state",
"version": "0.0.0",
"description": "Save window positions and sizes and restore them when the app is reopened.",
"license": "MIT or APACHE-2.0",

@ -51,7 +51,7 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import * as tauriWindow from "@tauri-plugins/window";
import * as tauriWindow from "@tauri-apps/plugin-window";
```
## Contributing

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/window",
"name": "@tauri-apps/plugin-window",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

@ -61,43 +61,43 @@ importers:
'@zerodevx/svelte-json-view':
specifier: 0.2.1
version: 0.2.1
'@tauri-plugins/app':
'@tauri-apps/plugin-app':
specifier: 0.0.0
version: link:../../plugins/app
'@tauri-plugins/cli':
'@tauri-apps/plugin-cli':
specifier: 0.0.0
version: link:../../plugins/cli
'@tauri-plugins/clipboard':
'@tauri-apps/plugin-clipboard':
specifier: 0.0.0
version: link:../../plugins/clipboard
'@tauri-plugins/dialog':
'@tauri-apps/plugin-dialog':
specifier: 0.0.0
version: link:../../plugins/dialog
'@tauri-plugins/fs':
'@tauri-apps/plugin-fs':
specifier: 0.0.0
version: link:../../plugins/fs
'@tauri-plugins/global-shortcut':
'@tauri-apps/plugin-global-shortcut':
specifier: 0.0.0
version: link:../../plugins/global-shortcut
'@tauri-plugins/http':
'@tauri-apps/plugin-http':
specifier: 0.0.0
version: link:../../plugins/http
'@tauri-plugins/notification':
'@tauri-apps/plugin-notification':
specifier: 0.0.0
version: link:../../plugins/notification
'@tauri-plugins/os':
'@tauri-apps/plugin-os':
specifier: 0.0.0
version: link:../../plugins/os
'@tauri-plugins/process':
'@tauri-apps/plugin-process':
specifier: 0.0.0
version: link:../../plugins/process
'@tauri-plugins/shell':
'@tauri-apps/plugin-shell':
specifier: 0.0.0
version: link:../../plugins/shell
'@tauri-plugins/updater':
'@tauri-apps/plugin-updater':
specifier: 0.0.0
version: link:../../plugins/updater
'@tauri-plugins/window':
'@tauri-apps/plugin-window':
specifier: 0.0.0
version: link:../../plugins/window
devDependencies:
@ -354,7 +354,7 @@ importers:
'@tauri-apps/cli':
specifier: ^2.0.0-alpha.8
version: 2.0.0-alpha.8
'@tauri-plugins/websocket':
'@tauri-apps/plugin-websocket':
specifier: link:../../
version: link:../..
devDependencies:

@ -1,5 +1,5 @@
{
"name": "@tauri-plugins/{{name}}",
"name": "@tauri-apps/plugin-{{name}}",
"version": "0.0.0",
"license": "MIT or APACHE-2.0",
"authors": [

Loading…
Cancel
Save