@tai2/aco 0.2.3 → 0.2.6
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/README.md +1 -1
- package/dist/cli.js +105 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ aco device list --state all --json # everything, machine-readable
|
|
|
61
61
|
|
|
62
62
|
```sh
|
|
63
63
|
# iOS simulator (foreground; Ctrl-C tears it down)
|
|
64
|
-
aco session start --platform ios --app /tmp/MyApp.app --device-name "iPhone 15"
|
|
64
|
+
aco session start --platform ios --app /tmp/MyApp.app.zip --device-name "iPhone 15"
|
|
65
65
|
|
|
66
66
|
# Android emulator
|
|
67
67
|
aco session start --platform android --app com.example.app --app-activity .MainActivity --avd Pixel_8_API_34
|
package/dist/cli.js
CHANGED
|
@@ -3,6 +3,97 @@
|
|
|
3
3
|
// src/cli.ts
|
|
4
4
|
import { Command } from "@commander-js/extra-typings";
|
|
5
5
|
|
|
6
|
+
// package.json
|
|
7
|
+
var package_default = {
|
|
8
|
+
name: "@tai2/aco",
|
|
9
|
+
version: "0.2.6",
|
|
10
|
+
description: "Appium Command-line Operator \u2014 drive an Appium session from the shell, one command at a time.",
|
|
11
|
+
type: "module",
|
|
12
|
+
license: "MIT",
|
|
13
|
+
author: "tai2",
|
|
14
|
+
homepage: "https://github.com/tai2/aco#readme",
|
|
15
|
+
repository: {
|
|
16
|
+
type: "git",
|
|
17
|
+
url: "git+https://github.com/tai2/aco.git"
|
|
18
|
+
},
|
|
19
|
+
bugs: {
|
|
20
|
+
url: "https://github.com/tai2/aco/issues"
|
|
21
|
+
},
|
|
22
|
+
keywords: [
|
|
23
|
+
"appium",
|
|
24
|
+
"cli",
|
|
25
|
+
"mobile",
|
|
26
|
+
"ios",
|
|
27
|
+
"android",
|
|
28
|
+
"webdriver",
|
|
29
|
+
"automation",
|
|
30
|
+
"e2e"
|
|
31
|
+
],
|
|
32
|
+
bin: {
|
|
33
|
+
aco: "./dist/cli.js"
|
|
34
|
+
},
|
|
35
|
+
files: ["dist"],
|
|
36
|
+
engines: {
|
|
37
|
+
node: ">=20"
|
|
38
|
+
},
|
|
39
|
+
publishConfig: {
|
|
40
|
+
access: "public",
|
|
41
|
+
provenance: true
|
|
42
|
+
},
|
|
43
|
+
packageManager: "pnpm@10.33.4",
|
|
44
|
+
scripts: {
|
|
45
|
+
dev: "tsx src/cli.ts",
|
|
46
|
+
"dev:watch": "tsx watch src/cli.ts",
|
|
47
|
+
build: "tsup",
|
|
48
|
+
typecheck: "tsc --noEmit && tsc -p e2e/tsconfig.json --noEmit",
|
|
49
|
+
test: "vitest run",
|
|
50
|
+
"test:watch": "vitest",
|
|
51
|
+
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
52
|
+
"e2e:ios": "pnpm run build && ACO_E2E_PLATFORM=ios pnpm run test:e2e",
|
|
53
|
+
"e2e:android": "pnpm run build && ACO_E2E_PLATFORM=android pnpm run test:e2e",
|
|
54
|
+
format: "biome format --write .",
|
|
55
|
+
"format:check": "biome format .",
|
|
56
|
+
lint: "biome lint .",
|
|
57
|
+
"lint:fix": "biome lint --write .",
|
|
58
|
+
check: "biome check .",
|
|
59
|
+
verify: "pnpm run check && pnpm run typecheck && pnpm run test && pnpm run build",
|
|
60
|
+
"aut:install": "pnpm --dir aut install",
|
|
61
|
+
"aut:prebuild": "pnpm --dir aut run prebuild",
|
|
62
|
+
"aut:start": "pnpm --dir aut run start",
|
|
63
|
+
"aut:build:ios": "pnpm --dir aut run build:ios",
|
|
64
|
+
"aut:build:android": "pnpm --dir aut run build:android",
|
|
65
|
+
"gen:extensions": "node --import tsx/esm scripts/generate-extensions.ts",
|
|
66
|
+
prepublishOnly: "pnpm run verify",
|
|
67
|
+
version: "biome format --write package.json && git add package.json",
|
|
68
|
+
"release:patch": 'npm version patch -m "Release %s" && git push --follow-tags',
|
|
69
|
+
"release:minor": 'npm version minor -m "Release %s" && git push --follow-tags',
|
|
70
|
+
"release:major": 'npm version major -m "Release %s" && git push --follow-tags'
|
|
71
|
+
},
|
|
72
|
+
dependencies: {
|
|
73
|
+
"@appium/logger": "^2.0.8",
|
|
74
|
+
"@commander-js/extra-typings": "^12.0.0",
|
|
75
|
+
"@xmldom/xmldom": "^0.9.10",
|
|
76
|
+
"appium-adb": "^15.0.0",
|
|
77
|
+
"appium-ios-device": "^3.1.14",
|
|
78
|
+
commander: "^12.0.0",
|
|
79
|
+
webdriverio: "^9.27.2",
|
|
80
|
+
xpath: "^0.0.34"
|
|
81
|
+
},
|
|
82
|
+
devDependencies: {
|
|
83
|
+
"@biomejs/biome": "^1.9.0",
|
|
84
|
+
"@types/node": "^20.0.0",
|
|
85
|
+
"appium-uiautomator2-driver": "^7.5.2",
|
|
86
|
+
"appium-xcuitest-driver": "^11.9.0",
|
|
87
|
+
tsup: "^8.0.0",
|
|
88
|
+
tsx: "^4.0.0",
|
|
89
|
+
typescript: "^5.4.0",
|
|
90
|
+
vitest: "^1.0.0"
|
|
91
|
+
},
|
|
92
|
+
pnpm: {
|
|
93
|
+
onlyBuiltDependencies: ["esbuild"]
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
6
97
|
// src/lib/actions.ts
|
|
7
98
|
var MOVE_DEFAULT_DURATION = 100;
|
|
8
99
|
var TAP_DEFAULT_DURATION = 100;
|
|
@@ -4776,7 +4867,12 @@ function registerSessionList(session) {
|
|
|
4776
4867
|
|
|
4777
4868
|
// src/commands/session/start.ts
|
|
4778
4869
|
import { spawn as spawn2 } from "child_process";
|
|
4779
|
-
import {
|
|
4870
|
+
import {
|
|
4871
|
+
createWriteStream as createWriteStream2,
|
|
4872
|
+
mkdirSync as mkdirSync3,
|
|
4873
|
+
readFileSync as readFileSync3,
|
|
4874
|
+
realpathSync
|
|
4875
|
+
} from "fs";
|
|
4780
4876
|
import { homedir as homedir4 } from "os";
|
|
4781
4877
|
import { join as join4 } from "path";
|
|
4782
4878
|
|
|
@@ -5083,7 +5179,13 @@ function readFirstLine(stream, timeoutMs) {
|
|
|
5083
5179
|
});
|
|
5084
5180
|
}
|
|
5085
5181
|
async function detachAndExit(sessionTimeoutSec) {
|
|
5086
|
-
const
|
|
5182
|
+
const invoked = process.argv[1];
|
|
5183
|
+
let entry;
|
|
5184
|
+
try {
|
|
5185
|
+
entry = invoked ? realpathSync(invoked) : void 0;
|
|
5186
|
+
} catch {
|
|
5187
|
+
entry = invoked;
|
|
5188
|
+
}
|
|
5087
5189
|
if (!entry || !entry.endsWith(".js")) {
|
|
5088
5190
|
process.stderr.write(
|
|
5089
5191
|
"aco: --detach is not supported in dev mode (tsx). Run the built `dist/cli.js` to use --detach.\n"
|
|
@@ -5999,7 +6101,7 @@ function compareSemver(a, b) {
|
|
|
5999
6101
|
assertSupportedNodeVersion("20.0.0");
|
|
6000
6102
|
var program = new Command().name("aco").description(
|
|
6001
6103
|
"Appium Command-line Operator -- start a session, then drive it from the shell."
|
|
6002
|
-
).version(
|
|
6104
|
+
).version(package_default.version).showHelpAfterError();
|
|
6003
6105
|
registerSession(program);
|
|
6004
6106
|
registerElement(program);
|
|
6005
6107
|
registerSource(program);
|