@hot-updater/apple-helper 1.2.0-rc.52 → 1.2.0-rc.54
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/dist/index.cjs +8 -2
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +8 -2
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -4058,6 +4058,11 @@ const simctl = async (args) => {
|
|
|
4058
4058
|
throw new Error(stderr?.trim() || shortMessage || String(error));
|
|
4059
4059
|
}
|
|
4060
4060
|
};
|
|
4061
|
+
/** `iOS 26.4` of `simctl`'s `com.apple.CoreSimulator.SimRuntime.iOS-26-4`. */
|
|
4062
|
+
const osOf = (runtime) => {
|
|
4063
|
+
const [, platform, version] = /(?:^|\.)([A-Za-z]+)-([\d-]+)$/u.exec(runtime) ?? [];
|
|
4064
|
+
return platform === void 0 || version === void 0 ? runtime : `${platform} ${version.replaceAll("-", ".")}`;
|
|
4065
|
+
};
|
|
4061
4066
|
/** Every simulator on this Mac, booted or not. */
|
|
4062
4067
|
const listSimulators = async () => {
|
|
4063
4068
|
const { devices } = JSON.parse(await simctl([
|
|
@@ -4065,11 +4070,12 @@ const listSimulators = async () => {
|
|
|
4065
4070
|
"devices",
|
|
4066
4071
|
"--json"
|
|
4067
4072
|
]));
|
|
4068
|
-
return Object.
|
|
4073
|
+
return Object.entries(devices).flatMap(([runtime, simulators]) => simulators.map(({ udid, name, state }) => ({
|
|
4069
4074
|
udid,
|
|
4070
4075
|
name,
|
|
4076
|
+
os: osOf(runtime),
|
|
4071
4077
|
state
|
|
4072
|
-
}));
|
|
4078
|
+
})));
|
|
4073
4079
|
};
|
|
4074
4080
|
/**
|
|
4075
4081
|
* The simulator to install on: `udid`, or else the only booted one, by its
|
package/dist/index.d.cts
CHANGED
|
@@ -444,6 +444,8 @@ declare const buildIos: ({ schemeConfig, minBundleId, credentials, sandbox, logH
|
|
|
444
444
|
interface Simulator {
|
|
445
445
|
readonly udid: string;
|
|
446
446
|
readonly name: string;
|
|
447
|
+
/** The runtime it runs, such as `iOS 26.4`. */
|
|
448
|
+
readonly os: string;
|
|
447
449
|
/** `Booted`, `Shutdown`, and the states between them, as `simctl` says. */
|
|
448
450
|
readonly state: string;
|
|
449
451
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -445,6 +445,8 @@ declare const buildIos: ({ schemeConfig, minBundleId, credentials, sandbox, logH
|
|
|
445
445
|
interface Simulator {
|
|
446
446
|
readonly udid: string;
|
|
447
447
|
readonly name: string;
|
|
448
|
+
/** The runtime it runs, such as `iOS 26.4`. */
|
|
449
|
+
readonly os: string;
|
|
448
450
|
/** `Booted`, `Shutdown`, and the states between them, as `simctl` says. */
|
|
449
451
|
readonly state: string;
|
|
450
452
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -4030,6 +4030,11 @@ const simctl = async (args) => {
|
|
|
4030
4030
|
throw new Error(stderr?.trim() || shortMessage || String(error));
|
|
4031
4031
|
}
|
|
4032
4032
|
};
|
|
4033
|
+
/** `iOS 26.4` of `simctl`'s `com.apple.CoreSimulator.SimRuntime.iOS-26-4`. */
|
|
4034
|
+
const osOf = (runtime) => {
|
|
4035
|
+
const [, platform, version] = /(?:^|\.)([A-Za-z]+)-([\d-]+)$/u.exec(runtime) ?? [];
|
|
4036
|
+
return platform === void 0 || version === void 0 ? runtime : `${platform} ${version.replaceAll("-", ".")}`;
|
|
4037
|
+
};
|
|
4033
4038
|
/** Every simulator on this Mac, booted or not. */
|
|
4034
4039
|
const listSimulators = async () => {
|
|
4035
4040
|
const { devices } = JSON.parse(await simctl([
|
|
@@ -4037,11 +4042,12 @@ const listSimulators = async () => {
|
|
|
4037
4042
|
"devices",
|
|
4038
4043
|
"--json"
|
|
4039
4044
|
]));
|
|
4040
|
-
return Object.
|
|
4045
|
+
return Object.entries(devices).flatMap(([runtime, simulators]) => simulators.map(({ udid, name, state }) => ({
|
|
4041
4046
|
udid,
|
|
4042
4047
|
name,
|
|
4048
|
+
os: osOf(runtime),
|
|
4043
4049
|
state
|
|
4044
|
-
}));
|
|
4050
|
+
})));
|
|
4045
4051
|
};
|
|
4046
4052
|
/**
|
|
4047
4053
|
* The simulator to install on: `udid`, or else the only booted one, by its
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/apple-helper",
|
|
3
|
-
"version": "1.2.0-rc.
|
|
3
|
+
"version": "1.2.0-rc.54",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"execa": "9.5.2",
|
|
31
31
|
"fast-xml-parser": "5.8.0",
|
|
32
|
-
"@hot-updater/
|
|
33
|
-
"@hot-updater/
|
|
34
|
-
"@hot-updater/
|
|
32
|
+
"@hot-updater/cli-tools": "1.2.0-rc.54",
|
|
33
|
+
"@hot-updater/plugin-core": "1.2.0-rc.54",
|
|
34
|
+
"@hot-updater/protocol": "1.2.0-rc.54"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^20"
|