@hot-updater/android-helper 1.0.0-rc.1 → 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 +4 -4
package/dist/index.cjs
CHANGED
|
@@ -16,20 +16,20 @@ 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 path = require("path");
|
|
25
|
-
path = __toESM(path);
|
|
25
|
+
path = __toESM(path, 1);
|
|
26
26
|
let _hot_updater_cli_tools = require("@hot-updater/cli-tools");
|
|
27
27
|
let _hot_updater_plugin_core = require("@hot-updater/plugin-core");
|
|
28
28
|
let fs = require("fs");
|
|
29
|
-
fs = __toESM(fs);
|
|
29
|
+
fs = __toESM(fs, 1);
|
|
30
30
|
let execa = require("execa");
|
|
31
31
|
let node_os = require("node:os");
|
|
32
|
-
node_os = __toESM(node_os);
|
|
32
|
+
node_os = __toESM(node_os, 1);
|
|
33
33
|
//#region src/utils/createGradleLogger.ts
|
|
34
34
|
const createGradleLogger = ({ logPrefix }) => new _hot_updater_cli_tools.BuildLogger({
|
|
35
35
|
logPrefix,
|
|
@@ -311,7 +311,8 @@ async function tryRunAdbReverse({ port = 8081, deviceId }) {
|
|
|
311
311
|
* Get name of Android emulator
|
|
312
312
|
*/
|
|
313
313
|
const getEmulatorName = async (deviceId) => {
|
|
314
|
-
const
|
|
314
|
+
const adbPath = getAdbPath();
|
|
315
|
+
const { stdout } = await (0, execa.execa)(adbPath, [
|
|
315
316
|
"-s",
|
|
316
317
|
deviceId,
|
|
317
318
|
"emu",
|
|
@@ -325,7 +326,8 @@ const getEmulatorName = async (deviceId) => {
|
|
|
325
326
|
* Get Android device name in readable format
|
|
326
327
|
*/
|
|
327
328
|
const getPhoneName = async (deviceId) => {
|
|
328
|
-
const
|
|
329
|
+
const adbPath = getAdbPath();
|
|
330
|
+
const { stdout } = await (0, execa.execa)(adbPath, [
|
|
329
331
|
"-s",
|
|
330
332
|
deviceId,
|
|
331
333
|
"shell",
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NativeBuildAndroidScheme, NativeBuildOptions } from "@hot-updater/plugin-core";
|
|
2
|
-
|
|
3
2
|
//#region src/utils/enrichNativeBuildAndroidScheme.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Validated scheme filled nullish values with default values.
|
|
@@ -7,18 +6,13 @@ import { NativeBuildAndroidScheme, NativeBuildOptions } from "@hot-updater/plugi
|
|
|
7
6
|
type EnrichedNativeBuildAndroidScheme = Required<NativeBuildAndroidScheme> & {
|
|
8
7
|
hotUpdaterSchemeName: string;
|
|
9
8
|
};
|
|
10
|
-
declare const enrichNativeBuildAndroidScheme: ({
|
|
11
|
-
schemeConfig,
|
|
12
|
-
hotUpdaterSchemeName
|
|
13
|
-
}: {
|
|
9
|
+
declare const enrichNativeBuildAndroidScheme: ({ schemeConfig, hotUpdaterSchemeName }: {
|
|
14
10
|
schemeConfig: NativeBuildAndroidScheme;
|
|
15
11
|
hotUpdaterSchemeName: string;
|
|
16
12
|
}) => Promise<EnrichedNativeBuildAndroidScheme>;
|
|
17
13
|
//#endregion
|
|
18
14
|
//#region src/buildAndroid.d.ts
|
|
19
|
-
declare const buildAndroid: ({
|
|
20
|
-
schemeConfig
|
|
21
|
-
}: {
|
|
15
|
+
declare const buildAndroid: ({ schemeConfig }: {
|
|
22
16
|
schemeConfig: EnrichedNativeBuildAndroidScheme;
|
|
23
17
|
}) => Promise<{
|
|
24
18
|
buildDirectory: string;
|
|
@@ -34,10 +28,7 @@ interface AndroidNativeRunOptions extends NativeBuildOptions {
|
|
|
34
28
|
}
|
|
35
29
|
//#endregion
|
|
36
30
|
//#region src/runAndroid.d.ts
|
|
37
|
-
declare const runAndroid: ({
|
|
38
|
-
schemeConfig,
|
|
39
|
-
runOption
|
|
40
|
-
}: {
|
|
31
|
+
declare const runAndroid: ({ schemeConfig, runOption }: {
|
|
41
32
|
schemeConfig: EnrichedNativeBuildAndroidScheme;
|
|
42
33
|
runOption: AndroidNativeRunOptions;
|
|
43
34
|
}) => Promise<{
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NativeBuildAndroidScheme, NativeBuildOptions } from "@hot-updater/plugin-core";
|
|
2
|
-
|
|
3
2
|
//#region src/utils/enrichNativeBuildAndroidScheme.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Validated scheme filled nullish values with default values.
|
|
@@ -7,18 +6,13 @@ import { NativeBuildAndroidScheme, NativeBuildOptions } from "@hot-updater/plugi
|
|
|
7
6
|
type EnrichedNativeBuildAndroidScheme = Required<NativeBuildAndroidScheme> & {
|
|
8
7
|
hotUpdaterSchemeName: string;
|
|
9
8
|
};
|
|
10
|
-
declare const enrichNativeBuildAndroidScheme: ({
|
|
11
|
-
schemeConfig,
|
|
12
|
-
hotUpdaterSchemeName
|
|
13
|
-
}: {
|
|
9
|
+
declare const enrichNativeBuildAndroidScheme: ({ schemeConfig, hotUpdaterSchemeName }: {
|
|
14
10
|
schemeConfig: NativeBuildAndroidScheme;
|
|
15
11
|
hotUpdaterSchemeName: string;
|
|
16
12
|
}) => Promise<EnrichedNativeBuildAndroidScheme>;
|
|
17
13
|
//#endregion
|
|
18
14
|
//#region src/buildAndroid.d.ts
|
|
19
|
-
declare const buildAndroid: ({
|
|
20
|
-
schemeConfig
|
|
21
|
-
}: {
|
|
15
|
+
declare const buildAndroid: ({ schemeConfig }: {
|
|
22
16
|
schemeConfig: EnrichedNativeBuildAndroidScheme;
|
|
23
17
|
}) => Promise<{
|
|
24
18
|
buildDirectory: string;
|
|
@@ -34,10 +28,7 @@ interface AndroidNativeRunOptions extends NativeBuildOptions {
|
|
|
34
28
|
}
|
|
35
29
|
//#endregion
|
|
36
30
|
//#region src/runAndroid.d.ts
|
|
37
|
-
declare const runAndroid: ({
|
|
38
|
-
schemeConfig,
|
|
39
|
-
runOption
|
|
40
|
-
}: {
|
|
31
|
+
declare const runAndroid: ({ schemeConfig, runOption }: {
|
|
41
32
|
schemeConfig: EnrichedNativeBuildAndroidScheme;
|
|
42
33
|
runOption: AndroidNativeRunOptions;
|
|
43
34
|
}) => Promise<{
|
package/dist/index.mjs
CHANGED
|
@@ -285,7 +285,8 @@ async function tryRunAdbReverse({ port = 8081, deviceId }) {
|
|
|
285
285
|
* Get name of Android emulator
|
|
286
286
|
*/
|
|
287
287
|
const getEmulatorName = async (deviceId) => {
|
|
288
|
-
const
|
|
288
|
+
const adbPath = getAdbPath();
|
|
289
|
+
const { stdout } = await execa(adbPath, [
|
|
289
290
|
"-s",
|
|
290
291
|
deviceId,
|
|
291
292
|
"emu",
|
|
@@ -299,7 +300,8 @@ const getEmulatorName = async (deviceId) => {
|
|
|
299
300
|
* Get Android device name in readable format
|
|
300
301
|
*/
|
|
301
302
|
const getPhoneName = async (deviceId) => {
|
|
302
|
-
const
|
|
303
|
+
const adbPath = getAdbPath();
|
|
304
|
+
const { stdout } = await execa(adbPath, [
|
|
303
305
|
"-s",
|
|
304
306
|
deviceId,
|
|
305
307
|
"shell",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/android-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",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"execa": "9.5.2",
|
|
31
|
-
"@hot-updater/cli-tools": "1.0.0-rc.
|
|
32
|
-
"@hot-updater/
|
|
33
|
-
"@hot-updater/core": "1.0.0-rc.
|
|
31
|
+
"@hot-updater/cli-tools": "1.0.0-rc.2",
|
|
32
|
+
"@hot-updater/core": "1.0.0-rc.0",
|
|
33
|
+
"@hot-updater/plugin-core": "1.0.0-rc.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^20"
|