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
+28 -28
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
import { invoke } from "@tauri-apps/api/core";
import { invoke } from '@tauri-apps/api/core'
export enum BiometryType {
None = 0,
@@ -11,39 +11,39 @@ export enum BiometryType {
// Apple FaceID or Android face authentication
FaceID = 2,
// Android iris authentication
Iris = 3,
Iris = 3
}
export interface Status {
isAvailable: boolean;
biometryType: BiometryType;
error?: string;
isAvailable: boolean
biometryType: BiometryType
error?: string
errorCode?:
| "appCancel"
| "authenticationFailed"
| "invalidContext"
| "notInteractive"
| "passcodeNotSet"
| "systemCancel"
| "userCancel"
| "userFallback"
| "biometryLockout"
| "biometryNotAvailable"
| "biometryNotEnrolled";
| 'appCancel'
| 'authenticationFailed'
| 'invalidContext'
| 'notInteractive'
| 'passcodeNotSet'
| 'systemCancel'
| 'userCancel'
| 'userFallback'
| 'biometryLockout'
| 'biometryNotAvailable'
| 'biometryNotEnrolled'
}
export interface AuthOptions {
allowDeviceCredential?: boolean;
cancelTitle?: string;
allowDeviceCredential?: boolean
cancelTitle?: string
// iOS options
fallbackTitle?: string;
fallbackTitle?: string
// android options
title?: string;
subtitle?: string;
confirmationRequired?: boolean;
maxAttemps?: number;
title?: string
subtitle?: string
confirmationRequired?: boolean
maxAttemps?: number
}
/**
@@ -51,7 +51,7 @@ export interface AuthOptions {
* @returns a promise resolving to an object containing all the information about the status of the biometry.
*/
export async function checkStatus(): Promise<Status> {
return await invoke("plugin:biometric|status");
return await invoke('plugin:biometric|status')
}
/**
@@ -68,10 +68,10 @@ export async function checkStatus(): Promise<Status> {
*/
export async function authenticate(
reason: string,
options?: AuthOptions,
options?: AuthOptions
): Promise<void> {
await invoke("plugin:biometric|authenticate", {
await invoke('plugin:biometric|authenticate', {
reason,
...options,
});
...options
})
}