@tauri-apps/plugin-os
Advanced tools
Comparing version 2.0.0-beta.5 to 2.0.0-beta.6
@@ -6,2 +6,8 @@ /** @ignore */ | ||
eol: string; | ||
os_type: OsType; | ||
platform: Platform; | ||
family: Family; | ||
version: string; | ||
arch: Arch; | ||
exe_extension: string; | ||
}; | ||
@@ -34,3 +40,3 @@ } | ||
*/ | ||
declare function platform(): Promise<Platform>; | ||
declare function platform(): Platform; | ||
/** | ||
@@ -46,3 +52,3 @@ * Returns the current operating system version. | ||
*/ | ||
declare function version(): Promise<string>; | ||
declare function version(): string; | ||
type Family = "unix" | "windows"; | ||
@@ -59,3 +65,3 @@ /** | ||
*/ | ||
declare function family(): Promise<Family>; | ||
declare function family(): Family; | ||
/** | ||
@@ -71,3 +77,3 @@ * Returns the current operating system type. Returns `'linux'` on Linux, `'macos'` on macOS, `'windows'` on Windows, `'ios'` on iOS and `'android'` on Android. | ||
*/ | ||
declare function type(): Promise<OsType>; | ||
declare function type(): OsType; | ||
/** | ||
@@ -84,4 +90,15 @@ * Returns the current operating system architecture. | ||
*/ | ||
declare function arch(): Promise<Arch>; | ||
declare function arch(): Arch; | ||
/** | ||
* Returns the file extension, if any, used for executable binaries on this platform. Possible values are `'exe'` and `''` (empty string). | ||
* @example | ||
* ```typescript | ||
* import { exeExtension } from '@tauri-apps/plugin-os'; | ||
* const exeExt = await exeExtension(); | ||
* ``` | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
declare function exeExtension(): string; | ||
/** | ||
* Returns a String with a `BCP-47` language tag inside. If the locale couldn’t be obtained, `null` is returned instead. | ||
@@ -101,13 +118,2 @@ * @example | ||
/** | ||
* Returns the file extension, if any, used for executable binaries on this platform. Possible values are `'exe'` and `''` (empty string). | ||
* @example | ||
* ```typescript | ||
* import { exeExtension } from '@tauri-apps/plugin-os'; | ||
* const exeExt = await exeExtension(); | ||
* ``` | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
declare function exeExtension(): Promise<string | null>; | ||
/** | ||
* Returns the host name of the operating system. | ||
@@ -114,0 +120,0 @@ * @example |
@@ -34,4 +34,4 @@ import { invoke } from '@tauri-apps/api/core'; | ||
*/ | ||
async function platform() { | ||
return await invoke("plugin:os|platform"); | ||
function platform() { | ||
return window.__TAURI_OS_PLUGIN_INTERNALS__.platform; | ||
} | ||
@@ -48,4 +48,4 @@ /** | ||
*/ | ||
async function version() { | ||
return await invoke("plugin:os|version"); | ||
function version() { | ||
return window.__TAURI_OS_PLUGIN_INTERNALS__.version; | ||
} | ||
@@ -62,4 +62,4 @@ /** | ||
*/ | ||
async function family() { | ||
return await invoke("plugin:os|family"); | ||
function family() { | ||
return window.__TAURI_OS_PLUGIN_INTERNALS__.family; | ||
} | ||
@@ -76,4 +76,4 @@ /** | ||
*/ | ||
async function type() { | ||
return await invoke("plugin:os|os_type"); | ||
function type() { | ||
return window.__TAURI_OS_PLUGIN_INTERNALS__.os_type; | ||
} | ||
@@ -91,6 +91,19 @@ /** | ||
*/ | ||
async function arch() { | ||
return await invoke("plugin:os|arch"); | ||
function arch() { | ||
return window.__TAURI_OS_PLUGIN_INTERNALS__.arch; | ||
} | ||
/** | ||
* Returns the file extension, if any, used for executable binaries on this platform. Possible values are `'exe'` and `''` (empty string). | ||
* @example | ||
* ```typescript | ||
* import { exeExtension } from '@tauri-apps/plugin-os'; | ||
* const exeExt = await exeExtension(); | ||
* ``` | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
function exeExtension() { | ||
return window.__TAURI_OS_PLUGIN_INTERNALS__.exe_extension; | ||
} | ||
/** | ||
* Returns a String with a `BCP-47` language tag inside. If the locale couldn’t be obtained, `null` is returned instead. | ||
@@ -112,15 +125,2 @@ * @example | ||
/** | ||
* Returns the file extension, if any, used for executable binaries on this platform. Possible values are `'exe'` and `''` (empty string). | ||
* @example | ||
* ```typescript | ||
* import { exeExtension } from '@tauri-apps/plugin-os'; | ||
* const exeExt = await exeExtension(); | ||
* ``` | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
async function exeExtension() { | ||
return await invoke("plugin:os|exe_extension"); | ||
} | ||
/** | ||
* Returns the host name of the operating system. | ||
@@ -127,0 +127,0 @@ * @example |
{ | ||
"name": "@tauri-apps/plugin-os", | ||
"version": "2.0.0-beta.5", | ||
"version": "2.0.0-beta.6", | ||
"license": "MIT or APACHE-2.0", | ||
@@ -23,3 +23,3 @@ "authors": [ | ||
"dependencies": { | ||
"@tauri-apps/api": "2.0.0-beta.13" | ||
"@tauri-apps/api": "2.0.0-beta.14" | ||
}, | ||
@@ -26,0 +26,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
15033
388
+ Added@tauri-apps/api@2.0.0-beta.14(transitive)
- Removed@tauri-apps/api@2.0.0-beta.13(transitive)