ms-types 0.11.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/jbsystem.d.ts +15 -0
- package/types/lua/jbsystem.lua +13 -0
package/package.json
CHANGED
package/types/jbsystem.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* `respring` 重启 SpringBoard。`reboot` 重启用户空间,不是重启整机。
|
|
5
5
|
* `restartSelf` 重启当前 App 进程。
|
|
6
6
|
* 还可读写「允许 App 请求跟踪」「个性化广告」和定位服务总开关。
|
|
7
|
+
* `jbroot` 把系统根路径映射成越狱根路径,`rootfs` 是逆运算。
|
|
7
8
|
*/
|
|
8
9
|
declare namespace jbsystem {
|
|
9
10
|
/**
|
|
@@ -69,4 +70,18 @@ declare namespace jbsystem {
|
|
|
69
70
|
* @example jbsystem.setLocationServices(false)
|
|
70
71
|
*/
|
|
71
72
|
function setLocationServices(enabled: boolean): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* 把系统根下的路径映射成越狱根下的绝对路径。
|
|
75
|
+
* @param path 系统根下的路径
|
|
76
|
+
* @returns 对应的越狱根路径
|
|
77
|
+
* @example jbsystem.jbroot("/")
|
|
78
|
+
*/
|
|
79
|
+
function jbroot(path: string): string;
|
|
80
|
+
/**
|
|
81
|
+
* 把越狱根下的路径还原成系统根路径,是 `jbroot` 的逆运算。
|
|
82
|
+
* @param path 越狱根下的路径
|
|
83
|
+
* @returns 对应的系统根路径
|
|
84
|
+
* @example jbsystem.rootfs(jbsystem.jbroot("/"))
|
|
85
|
+
*/
|
|
86
|
+
function rootfs(path: string): string;
|
|
72
87
|
}
|
package/types/lua/jbsystem.lua
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
--- `respring` 重启 SpringBoard。`reboot` 重启用户空间,不是重启整机。
|
|
4
4
|
--- `restartSelf` 重启当前 App 进程。
|
|
5
5
|
--- 还可读写「允许 App 请求跟踪」「个性化广告」和定位服务总开关。
|
|
6
|
+
--- `jbroot` 把系统根路径映射成越狱根路径,`rootfs` 是逆运算。
|
|
6
7
|
---@class JbSystem
|
|
7
8
|
local _JbSystem = {}
|
|
8
9
|
|
|
@@ -54,5 +55,17 @@ function _JbSystem.getLocationServices() return nil end
|
|
|
54
55
|
---@example jbsystem.setLocationServices(false)
|
|
55
56
|
function _JbSystem.setLocationServices(enabled) return false end
|
|
56
57
|
|
|
58
|
+
--- 把系统根下的路径映射成越狱根下的绝对路径。
|
|
59
|
+
---@param path string 系统根下的路径
|
|
60
|
+
---@return string 对应的越狱根路径
|
|
61
|
+
---@example jbsystem.jbroot("/")
|
|
62
|
+
function _JbSystem.jbroot(path) return path end
|
|
63
|
+
|
|
64
|
+
--- 把越狱根下的路径还原成系统根路径,是 `jbroot` 的逆运算。
|
|
65
|
+
---@param path string 越狱根下的路径
|
|
66
|
+
---@return string 对应的系统根路径
|
|
67
|
+
---@example jbsystem.rootfs(jbsystem.jbroot("/"))
|
|
68
|
+
function _JbSystem.rootfs(path) return path end
|
|
69
|
+
|
|
57
70
|
---@type JbSystem
|
|
58
71
|
jbsystem = _JbSystem
|