@hot-updater/apple-helper 1.0.0-rc.0 → 1.0.0-rc.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/dist/index.cjs +8 -6
- package/dist/index.d.cts +3 -12
- package/dist/index.d.mts +3 -12
- package/dist/index.mjs +4 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -16,21 +16,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
}
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
20
20
|
value: mod,
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
23
23
|
//#endregion
|
|
24
24
|
let fs = require("fs");
|
|
25
|
-
fs = __toESM(fs);
|
|
25
|
+
fs = __toESM(fs, 1);
|
|
26
26
|
let path = require("path");
|
|
27
|
-
path = __toESM(path);
|
|
27
|
+
path = __toESM(path, 1);
|
|
28
28
|
let _hot_updater_cli_tools = require("@hot-updater/cli-tools");
|
|
29
29
|
let _hot_updater_plugin_core = require("@hot-updater/plugin-core");
|
|
30
30
|
let execa = require("execa");
|
|
31
31
|
let node_fs_promises = require("node:fs/promises");
|
|
32
32
|
let node_os = require("node:os");
|
|
33
|
-
node_os = __toESM(node_os);
|
|
33
|
+
node_os = __toESM(node_os, 1);
|
|
34
34
|
let node_path = require("node:path");
|
|
35
35
|
let stream_promises = require("stream/promises");
|
|
36
36
|
//#region src/utils/cocoapods.ts
|
|
@@ -773,7 +773,8 @@ const getDevices = async () => {
|
|
|
773
773
|
"-j",
|
|
774
774
|
tmpPath
|
|
775
775
|
]);
|
|
776
|
-
|
|
776
|
+
const output = JSON.parse(fs.default.readFileSync(tmpPath, "utf8"));
|
|
777
|
+
return parseDevicectlList(output.result.devices);
|
|
777
778
|
} catch (error) {
|
|
778
779
|
throw new Error(`Failed to get devices: ${error}`);
|
|
779
780
|
}
|
|
@@ -790,7 +791,8 @@ const getSimulators = async () => {
|
|
|
790
791
|
"available",
|
|
791
792
|
"-j"
|
|
792
793
|
]);
|
|
793
|
-
|
|
794
|
+
const output = JSON.parse(stdout);
|
|
795
|
+
return parseSimctlJson(output);
|
|
794
796
|
} catch (error) {
|
|
795
797
|
throw new Error(`Failed to get simulators: ${error}`);
|
|
796
798
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ApplePlatform, NativeBuildIosScheme, NativeBuildOptions } from "@hot-updater/plugin-core";
|
|
2
|
-
|
|
3
2
|
//#region src/utils/enrichNativeBuildIosScheme.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Validated scheme filled nullish values with default values.
|
|
@@ -7,18 +6,13 @@ import { ApplePlatform, NativeBuildIosScheme, NativeBuildOptions } from "@hot-up
|
|
|
7
6
|
type EnrichedNativeBuildIosScheme = NativeBuildIosScheme & Required<Pick<NativeBuildIosScheme, "platform" | "installPods" | "configuration" | "destination" | "simulator">> & {
|
|
8
7
|
hotUpdaterSchemeName: string;
|
|
9
8
|
};
|
|
10
|
-
declare const enrichNativeBuildIosScheme: ({
|
|
11
|
-
scheme,
|
|
12
|
-
hotUpdaterSchemeName
|
|
13
|
-
}: {
|
|
9
|
+
declare const enrichNativeBuildIosScheme: ({ scheme, hotUpdaterSchemeName }: {
|
|
14
10
|
scheme: NativeBuildIosScheme;
|
|
15
11
|
hotUpdaterSchemeName: string;
|
|
16
12
|
}) => Promise<EnrichedNativeBuildIosScheme>;
|
|
17
13
|
//#endregion
|
|
18
14
|
//#region src/buildIos.d.ts
|
|
19
|
-
declare const buildIos: ({
|
|
20
|
-
schemeConfig
|
|
21
|
-
}: {
|
|
15
|
+
declare const buildIos: ({ schemeConfig }: {
|
|
22
16
|
schemeConfig: EnrichedNativeBuildIosScheme;
|
|
23
17
|
}) => Promise<{
|
|
24
18
|
buildDirectory: string;
|
|
@@ -41,10 +35,7 @@ interface IosNativeRunOptions extends NativeBuildOptions {
|
|
|
41
35
|
}
|
|
42
36
|
//#endregion
|
|
43
37
|
//#region src/runIos.d.ts
|
|
44
|
-
declare const runIos: ({
|
|
45
|
-
schemeConfig,
|
|
46
|
-
runOption
|
|
47
|
-
}: {
|
|
38
|
+
declare const runIos: ({ schemeConfig, runOption }: {
|
|
48
39
|
schemeConfig: EnrichedNativeBuildIosScheme;
|
|
49
40
|
runOption: IosNativeRunOptions;
|
|
50
41
|
}) => Promise<{
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ApplePlatform, NativeBuildIosScheme, NativeBuildOptions } from "@hot-updater/plugin-core";
|
|
2
|
-
|
|
3
2
|
//#region src/utils/enrichNativeBuildIosScheme.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Validated scheme filled nullish values with default values.
|
|
@@ -7,18 +6,13 @@ import { ApplePlatform, NativeBuildIosScheme, NativeBuildOptions } from "@hot-up
|
|
|
7
6
|
type EnrichedNativeBuildIosScheme = NativeBuildIosScheme & Required<Pick<NativeBuildIosScheme, "platform" | "installPods" | "configuration" | "destination" | "simulator">> & {
|
|
8
7
|
hotUpdaterSchemeName: string;
|
|
9
8
|
};
|
|
10
|
-
declare const enrichNativeBuildIosScheme: ({
|
|
11
|
-
scheme,
|
|
12
|
-
hotUpdaterSchemeName
|
|
13
|
-
}: {
|
|
9
|
+
declare const enrichNativeBuildIosScheme: ({ scheme, hotUpdaterSchemeName }: {
|
|
14
10
|
scheme: NativeBuildIosScheme;
|
|
15
11
|
hotUpdaterSchemeName: string;
|
|
16
12
|
}) => Promise<EnrichedNativeBuildIosScheme>;
|
|
17
13
|
//#endregion
|
|
18
14
|
//#region src/buildIos.d.ts
|
|
19
|
-
declare const buildIos: ({
|
|
20
|
-
schemeConfig
|
|
21
|
-
}: {
|
|
15
|
+
declare const buildIos: ({ schemeConfig }: {
|
|
22
16
|
schemeConfig: EnrichedNativeBuildIosScheme;
|
|
23
17
|
}) => Promise<{
|
|
24
18
|
buildDirectory: string;
|
|
@@ -41,10 +35,7 @@ interface IosNativeRunOptions extends NativeBuildOptions {
|
|
|
41
35
|
}
|
|
42
36
|
//#endregion
|
|
43
37
|
//#region src/runIos.d.ts
|
|
44
|
-
declare const runIos: ({
|
|
45
|
-
schemeConfig,
|
|
46
|
-
runOption
|
|
47
|
-
}: {
|
|
38
|
+
declare const runIos: ({ schemeConfig, runOption }: {
|
|
48
39
|
schemeConfig: EnrichedNativeBuildIosScheme;
|
|
49
40
|
runOption: IosNativeRunOptions;
|
|
50
41
|
}) => Promise<{
|
package/dist/index.mjs
CHANGED
|
@@ -747,7 +747,8 @@ const getDevices = async () => {
|
|
|
747
747
|
"-j",
|
|
748
748
|
tmpPath
|
|
749
749
|
]);
|
|
750
|
-
|
|
750
|
+
const output = JSON.parse(fs.readFileSync(tmpPath, "utf8"));
|
|
751
|
+
return parseDevicectlList(output.result.devices);
|
|
751
752
|
} catch (error) {
|
|
752
753
|
throw new Error(`Failed to get devices: ${error}`);
|
|
753
754
|
}
|
|
@@ -764,7 +765,8 @@ const getSimulators = async () => {
|
|
|
764
765
|
"available",
|
|
765
766
|
"-j"
|
|
766
767
|
]);
|
|
767
|
-
|
|
768
|
+
const output = JSON.parse(stdout);
|
|
769
|
+
return parseSimctlJson(output);
|
|
768
770
|
} catch (error) {
|
|
769
771
|
throw new Error(`Failed to get simulators: ${error}`);
|
|
770
772
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/apple-helper",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"execa": "9.5.2",
|
|
31
31
|
"fast-xml-parser": "5.8.0",
|
|
32
|
-
"@hot-updater/cli-tools": "1.0.0-rc.
|
|
33
|
-
"@hot-updater/plugin-core": "1.0.0-rc.
|
|
32
|
+
"@hot-updater/cli-tools": "1.0.0-rc.2",
|
|
33
|
+
"@hot-updater/plugin-core": "1.0.0-rc.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^20"
|