Skip to content

Commit d022366

Browse files
committed
Add all commands to build.rs
1 parent bd424f4 commit d022366

29 files changed

+701
-10
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tauri-plugin-system-info"
3-
version = "2.0.0-beta.0"
3+
version = "2.0.0-beta.1"
44
authors = ["You"]
55
edition = "2021"
66
rust-version = "1.70"

build.rs

+29-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,32 @@
1-
const COMMANDS: &[&str] = &["ping", "execute"];
1+
const COMMANDS: &[&str] = &[
2+
"all_sys_info",
3+
"total_memory",
4+
"used_memory",
5+
"total_swap",
6+
"used_swap",
7+
"memory_info",
8+
"hostname",
9+
"name",
10+
"kernel_version",
11+
"os_version",
12+
"static_info",
13+
"components",
14+
"cpus",
15+
"cpu_count",
16+
"cpu_info",
17+
"disks",
18+
"networks",
19+
"processes",
20+
"refresh_all",
21+
"refresh_memory",
22+
"refresh_cpu",
23+
"refresh_processes",
24+
"batteries",
25+
];
226

327
fn main() {
4-
tauri_plugin::Builder::new(COMMANDS)
5-
.android_path("android")
6-
.ios_path("ios")
7-
.build();
28+
tauri_plugin::Builder::new(COMMANDS)
29+
.android_path("android")
30+
.ios_path("ios")
31+
.build();
832
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tauri-plugin-system-info-api",
3-
"version": "2.0.0-beta.0",
3+
"version": "2.0.0-beta.1",
44
"author": "You",
55
"description": "",
66
"type": "module",

permissions/all.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[[permission]]
44
identifier = "allow-all"
5-
description = "This enables all permissions for Jarvis"
5+
description = "This enables all permissions for system info plugin"
66
commands.allow = [
77
"all_sys_info",
88
"total_memory",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-all-sys-info"
7+
description = "Enables the all_sys_info command without any pre-configured scope."
8+
commands.allow = ["all_sys_info"]
9+
10+
[[permission]]
11+
identifier = "deny-all-sys-info"
12+
description = "Denies the all_sys_info command without any pre-configured scope."
13+
commands.deny = ["all_sys_info"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-batteries"
7+
description = "Enables the batteries command without any pre-configured scope."
8+
commands.allow = ["batteries"]
9+
10+
[[permission]]
11+
identifier = "deny-batteries"
12+
description = "Denies the batteries command without any pre-configured scope."
13+
commands.deny = ["batteries"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-components"
7+
description = "Enables the components command without any pre-configured scope."
8+
commands.allow = ["components"]
9+
10+
[[permission]]
11+
identifier = "deny-components"
12+
description = "Denies the components command without any pre-configured scope."
13+
commands.deny = ["components"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-cpu-count"
7+
description = "Enables the cpu_count command without any pre-configured scope."
8+
commands.allow = ["cpu_count"]
9+
10+
[[permission]]
11+
identifier = "deny-cpu-count"
12+
description = "Denies the cpu_count command without any pre-configured scope."
13+
commands.deny = ["cpu_count"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-cpu-info"
7+
description = "Enables the cpu_info command without any pre-configured scope."
8+
commands.allow = ["cpu_info"]
9+
10+
[[permission]]
11+
identifier = "deny-cpu-info"
12+
description = "Denies the cpu_info command without any pre-configured scope."
13+
commands.deny = ["cpu_info"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-cpus"
7+
description = "Enables the cpus command without any pre-configured scope."
8+
commands.allow = ["cpus"]
9+
10+
[[permission]]
11+
identifier = "deny-cpus"
12+
description = "Denies the cpus command without any pre-configured scope."
13+
commands.deny = ["cpus"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-disks"
7+
description = "Enables the disks command without any pre-configured scope."
8+
commands.allow = ["disks"]
9+
10+
[[permission]]
11+
identifier = "deny-disks"
12+
description = "Denies the disks command without any pre-configured scope."
13+
commands.deny = ["disks"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-hostname"
7+
description = "Enables the hostname command without any pre-configured scope."
8+
commands.allow = ["hostname"]
9+
10+
[[permission]]
11+
identifier = "deny-hostname"
12+
description = "Denies the hostname command without any pre-configured scope."
13+
commands.deny = ["hostname"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-kernel-version"
7+
description = "Enables the kernel_version command without any pre-configured scope."
8+
commands.allow = ["kernel_version"]
9+
10+
[[permission]]
11+
identifier = "deny-kernel-version"
12+
description = "Denies the kernel_version command without any pre-configured scope."
13+
commands.deny = ["kernel_version"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-memory-info"
7+
description = "Enables the memory_info command without any pre-configured scope."
8+
commands.allow = ["memory_info"]
9+
10+
[[permission]]
11+
identifier = "deny-memory-info"
12+
description = "Denies the memory_info command without any pre-configured scope."
13+
commands.deny = ["memory_info"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-name"
7+
description = "Enables the name command without any pre-configured scope."
8+
commands.allow = ["name"]
9+
10+
[[permission]]
11+
identifier = "deny-name"
12+
description = "Denies the name command without any pre-configured scope."
13+
commands.deny = ["name"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-networks"
7+
description = "Enables the networks command without any pre-configured scope."
8+
commands.allow = ["networks"]
9+
10+
[[permission]]
11+
identifier = "deny-networks"
12+
description = "Denies the networks command without any pre-configured scope."
13+
commands.deny = ["networks"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-os-version"
7+
description = "Enables the os_version command without any pre-configured scope."
8+
commands.allow = ["os_version"]
9+
10+
[[permission]]
11+
identifier = "deny-os-version"
12+
description = "Denies the os_version command without any pre-configured scope."
13+
commands.deny = ["os_version"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-processes"
7+
description = "Enables the processes command without any pre-configured scope."
8+
commands.allow = ["processes"]
9+
10+
[[permission]]
11+
identifier = "deny-processes"
12+
description = "Denies the processes command without any pre-configured scope."
13+
commands.deny = ["processes"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-refresh-all"
7+
description = "Enables the refresh_all command without any pre-configured scope."
8+
commands.allow = ["refresh_all"]
9+
10+
[[permission]]
11+
identifier = "deny-refresh-all"
12+
description = "Denies the refresh_all command without any pre-configured scope."
13+
commands.deny = ["refresh_all"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-refresh-cpu"
7+
description = "Enables the refresh_cpu command without any pre-configured scope."
8+
commands.allow = ["refresh_cpu"]
9+
10+
[[permission]]
11+
identifier = "deny-refresh-cpu"
12+
description = "Denies the refresh_cpu command without any pre-configured scope."
13+
commands.deny = ["refresh_cpu"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-refresh-memory"
7+
description = "Enables the refresh_memory command without any pre-configured scope."
8+
commands.allow = ["refresh_memory"]
9+
10+
[[permission]]
11+
identifier = "deny-refresh-memory"
12+
description = "Denies the refresh_memory command without any pre-configured scope."
13+
commands.deny = ["refresh_memory"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-refresh-processes"
7+
description = "Enables the refresh_processes command without any pre-configured scope."
8+
commands.allow = ["refresh_processes"]
9+
10+
[[permission]]
11+
identifier = "deny-refresh-processes"
12+
description = "Denies the refresh_processes command without any pre-configured scope."
13+
commands.deny = ["refresh_processes"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-static-info"
7+
description = "Enables the static_info command without any pre-configured scope."
8+
commands.allow = ["static_info"]
9+
10+
[[permission]]
11+
identifier = "deny-static-info"
12+
description = "Denies the static_info command without any pre-configured scope."
13+
commands.deny = ["static_info"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-total-memory"
7+
description = "Enables the total_memory command without any pre-configured scope."
8+
commands.allow = ["total_memory"]
9+
10+
[[permission]]
11+
identifier = "deny-total-memory"
12+
description = "Denies the total_memory command without any pre-configured scope."
13+
commands.deny = ["total_memory"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-total-swap"
7+
description = "Enables the total_swap command without any pre-configured scope."
8+
commands.allow = ["total_swap"]
9+
10+
[[permission]]
11+
identifier = "deny-total-swap"
12+
description = "Denies the total_swap command without any pre-configured scope."
13+
commands.deny = ["total_swap"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-used-memory"
7+
description = "Enables the used_memory command without any pre-configured scope."
8+
commands.allow = ["used_memory"]
9+
10+
[[permission]]
11+
identifier = "deny-used-memory"
12+
description = "Denies the used_memory command without any pre-configured scope."
13+
commands.deny = ["used_memory"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-used-swap"
7+
description = "Enables the used_swap command without any pre-configured scope."
8+
commands.allow = ["used_swap"]
9+
10+
[[permission]]
11+
identifier = "deny-used-swap"
12+
description = "Denies the used_swap command without any pre-configured scope."
13+
commands.deny = ["used_swap"]

0 commit comments

Comments
 (0)