chore: adjust prettier config, .gitignore and use taplo to format toml files (#1728)

* chore: adjust prettier config, .gitignore and use taplo to format toml files

This brings the plugins-workspace repository to the same code style of the main tauri repo

* format toml

* ignore examples gen dir

* add .vscode/extensions.json

* remove packageManager field

* fmt

* fix audit

* taplo ignore permissions autogenerated files

* remove create dummy dist

* fix prettier workflow

* install fmt in prettier workflow

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
Amr Bashir
2024-09-04 14:54:23 +03:00
committed by GitHub
parent 72c2ce82c1
commit cf4d7d4e6c
227 changed files with 2534 additions and 2505 deletions
+12 -12
View File
@@ -2,8 +2,8 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
import { invoke } from "@tauri-apps/api/core";
import { type UnlistenFn, listen } from "@tauri-apps/api/event";
import { invoke } from '@tauri-apps/api/core'
import { type UnlistenFn, listen } from '@tauri-apps/api/event'
/**
* Get the current URLs that triggered the deep link. Use this on app load to check whether your app was started via a deep link.
@@ -19,7 +19,7 @@ import { type UnlistenFn, listen } from "@tauri-apps/api/event";
* @since 2.0.0
*/
export async function getCurrent(): Promise<string[] | null> {
return await invoke("plugin:deep-link|get_current");
return await invoke('plugin:deep-link|get_current')
}
/**
@@ -38,7 +38,7 @@ export async function getCurrent(): Promise<string[] | null> {
* @since 2.0.0
*/
export async function register(protocol: string): Promise<null> {
return await invoke("plugin:deep-link|register", { protocol });
return await invoke('plugin:deep-link|register', { protocol })
}
/**
@@ -57,7 +57,7 @@ export async function register(protocol: string): Promise<null> {
* @since 2.0.0
*/
export async function unregister(protocol: string): Promise<null> {
return await invoke("plugin:deep-link|unregister", { protocol });
return await invoke('plugin:deep-link|unregister', { protocol })
}
/**
@@ -76,7 +76,7 @@ export async function unregister(protocol: string): Promise<null> {
* @since 2.0.0
*/
export async function isRegistered(protocol: string): Promise<boolean> {
return await invoke("plugin:deep-link|is_registered", { protocol });
return await invoke('plugin:deep-link|is_registered', { protocol })
}
/**
@@ -95,14 +95,14 @@ export async function isRegistered(protocol: string): Promise<boolean> {
* @since 2.0.0
*/
export async function onOpenUrl(
handler: (urls: string[]) => void,
handler: (urls: string[]) => void
): Promise<UnlistenFn> {
const current = await getCurrent();
const current = await getCurrent()
if (current) {
handler(current);
handler(current)
}
return await listen<string[]>("deep-link://new-url", (event) => {
handler(event.payload);
});
return await listen<string[]>('deep-link://new-url', (event) => {
handler(event.payload)
})
}