@keinar/aac-cli 1.1.0 → 1.1.1
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 +53 -25
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,63 +1,91 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @keinar/aac-cli
|
|
2
2
|
|
|
3
|
-
> **Agnostic Automation Center CLI** —
|
|
3
|
+
> **Agnostic Automation Center CLI** — The deployment assistant that prepares and ships any test automation repository to the AAC platform, end-to-end.
|
|
4
4
|
|
|
5
5
|
[](https://github.com/keinar/aac-cli/actions/workflows/release.yml)
|
|
6
|
-
[](https://www.npmjs.com/package/aac-cli)
|
|
6
|
+
[](https://www.npmjs.com/package/@keinar/aac-cli)
|
|
7
|
+
|
|
8
|
+
## Quick Start
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx @keinar/aac-cli@latest init
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
> No installation required. This always runs the latest version.
|
|
7
15
|
|
|
8
16
|
## What It Does
|
|
9
17
|
|
|
10
|
-
|
|
18
|
+
`@keinar/aac-cli` handles the entire flow from raw test project to a deployed, platform-ready Docker image:
|
|
19
|
+
|
|
20
|
+
### 1. Generates Integration Files
|
|
11
21
|
|
|
12
22
|
| File | Purpose |
|
|
13
23
|
|---|---|
|
|
14
|
-
| `Dockerfile` | Builds your test suite image
|
|
15
|
-
| `entrypoint.sh` | Executed by the Worker
|
|
24
|
+
| `Dockerfile` | Builds your test suite image — no `ENTRYPOINT`/`CMD` (the AAC Worker injects it at runtime) |
|
|
25
|
+
| `entrypoint.sh` | Executed by the Worker: `/app/entrypoint.sh <folder>` |
|
|
16
26
|
| `.dockerignore` | Prevents secrets (`.env`, `.git`) and bloat (`node_modules`, `__pycache__`) from entering the image |
|
|
17
27
|
|
|
28
|
+
### 2. Detects Framework Versions
|
|
29
|
+
|
|
30
|
+
For **Playwright** projects, the CLI reads your `package.json`, extracts the `@playwright/test` version, and uses it to pin the exact Docker base image (`mcr.microsoft.com/playwright:v{version}-jammy`). No more mismatched browser binaries.
|
|
31
|
+
|
|
32
|
+
### 3. Automates Docker Deployment
|
|
33
|
+
|
|
34
|
+
After generating files, the CLI offers to handle the full deployment:
|
|
35
|
+
|
|
36
|
+
- **Docker Hub login** — interactive authentication via `docker login`
|
|
37
|
+
- **Project name detection** — reads from `package.json`, with manual override
|
|
38
|
+
- **Multi-platform build** — `linux/amd64` + `linux/arm64` via Docker Buildx, ensuring compatibility with any AAC Worker architecture
|
|
39
|
+
- **Push to registry** — ships the image directly to Docker Hub
|
|
40
|
+
|
|
18
41
|
### Supported Frameworks
|
|
19
42
|
|
|
20
|
-
- **Playwright** (TypeScript / Node.js)
|
|
43
|
+
- **Playwright** (TypeScript / Node.js) — auto-detects version
|
|
21
44
|
- **Pytest** (Python)
|
|
22
45
|
|
|
23
|
-
##
|
|
46
|
+
## Prerequisites
|
|
24
47
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
npx aac-cli init
|
|
28
|
-
```
|
|
48
|
+
- **Node.js 18+** — required to run the CLI
|
|
49
|
+
- **Docker Desktop** — must be running for the automated build & push features
|
|
29
50
|
|
|
30
51
|
## Installation (optional)
|
|
31
52
|
|
|
32
53
|
```bash
|
|
33
|
-
npm install -g aac-cli
|
|
54
|
+
npm install -g @keinar/aac-cli
|
|
34
55
|
```
|
|
35
56
|
|
|
36
57
|
## Usage
|
|
37
58
|
|
|
38
59
|
```bash
|
|
39
|
-
#
|
|
40
|
-
|
|
41
|
-
aac-cli init
|
|
60
|
+
# Run the full init + deploy flow
|
|
61
|
+
npx @keinar/aac-cli@latest init
|
|
42
62
|
|
|
43
63
|
# Check version
|
|
44
|
-
aac-cli --version
|
|
64
|
+
npx @keinar/aac-cli@latest --version
|
|
45
65
|
```
|
|
46
66
|
|
|
47
67
|
## How It Works
|
|
48
68
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
69
|
+
```
|
|
70
|
+
┌─────────────────────────────────────────────────┐
|
|
71
|
+
│ npx @keinar/aac-cli@latest init │
|
|
72
|
+
├─────────────────────────────────────────────────┤
|
|
73
|
+
│ 1. Select framework (Playwright / Pytest) │
|
|
74
|
+
│ 2. Auto-detect version from package.json │
|
|
75
|
+
│ 3. Generate Dockerfile + entrypoint.sh │
|
|
76
|
+
│ 4. (Optional) Docker login │
|
|
77
|
+
│ 5. (Optional) Buildx multi-platform build │
|
|
78
|
+
│ 6. (Optional) Push image to Docker Hub │
|
|
79
|
+
│ 7. Enter image name in the AAC Dashboard │
|
|
80
|
+
└─────────────────────────────────────────────────┘
|
|
81
|
+
```
|
|
54
82
|
|
|
55
83
|
## Development
|
|
56
84
|
|
|
57
85
|
```bash
|
|
58
86
|
npm install
|
|
59
87
|
npm run build
|
|
60
|
-
node dist/index.
|
|
88
|
+
node dist/index.cjs init
|
|
61
89
|
```
|
|
62
90
|
|
|
63
91
|
## Release
|
|
@@ -65,8 +93,8 @@ node dist/index.js init
|
|
|
65
93
|
Tag a new version to trigger the CI/CD pipeline:
|
|
66
94
|
|
|
67
95
|
```bash
|
|
68
|
-
git tag v1.
|
|
69
|
-
git push origin v1.
|
|
96
|
+
git tag v1.1.0
|
|
97
|
+
git push origin v1.1.0
|
|
70
98
|
```
|
|
71
99
|
|
|
72
100
|
The workflow will build with tsup, publish to npm, and create a GitHub release.
|