@snapvisor/cli 6.4.1 → 7.1.0

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/LICENSE CHANGED
@@ -1,8 +1,8 @@
1
- Copyright 2026 Devino Solutions Inc. (Snapvisor modifications)
2
- Copyright 2022 Smooth Code
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
-
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright 2026 Devino Solutions Inc. (Snapvisor modifications)
2
+ Copyright 2022 Smooth Code
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+
6
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,45 +1,63 @@
1
- <p align="center">
2
- <a href="https://argos-ci.com/?utm_source=github&utm_medium=logo" target="_blank">
3
- <picture>
4
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/argos-ci/argos/main/resources/logos/github-readme-logo-dark.png">
5
- <img alt="Argos" src="https://raw.githubusercontent.com/argos-ci/argos/main/resources/logos/github-readme-logo-light.png" width="360" height="70">
6
- </picture>
7
- </a>
8
- </p>
9
-
10
- <p align="center"><strong>The open source visual testing platform for AI-native engineering teams.</strong></p>
11
-
12
- # Argos Command Line Interface
13
-
14
- Interact with and upload screenshots to [argos-ci.com](https://argos-ci.com) from the command line.
15
-
16
- [![npm version](https://img.shields.io/npm/v/@snapvisor/cli.svg)](https://www.npmjs.com/package/@snapvisor/cli)
17
- [![npm dm](https://img.shields.io/npm/dm/@snapvisor/cli.svg)](https://www.npmjs.com/package/@snapvisor/cli)
18
- [![npm dt](https://img.shields.io/npm/dt/@snapvisor/cli.svg)](https://www.npmjs.com/package/@snapvisor/cli)
19
-
20
- Visit the [Argos CLI documentation](https://argos-ci.com/docs/reference/argos-command-line-interface-cli) for the full command reference and more.
21
-
22
- ## Installation
23
-
24
- ```sh
25
- npm install --save-dev @snapvisor/cli
26
- ```
27
-
28
- ## Usage
29
-
30
- Upload a directory of screenshots to Argos. Authenticate with your project token via the `ARGOS_TOKEN` environment variable:
31
-
32
- ```sh
33
- ARGOS_TOKEN="<your-argos-token>" npx @snapvisor/cli upload ./screenshots
34
- ```
35
-
36
- The CLI also exposes commands to `deploy` a static build, inspect and `review` builds, post a `comment`, and more. List them all with:
37
-
38
- ```sh
39
- npx @snapvisor/cli --help
40
- ```
41
-
42
- ## Links
43
-
44
- - [Official CLI Docs](https://argos-ci.com/docs/reference/argos-command-line-interface-cli)
45
- - [Discord](https://argos-ci.com/discord)
1
+ <p align="center">
2
+ <a href="https://argos-ci.com/?utm_source=github&utm_medium=logo" target="_blank">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/argos-ci/argos/main/resources/logos/github-readme-logo-dark.png">
5
+ <img alt="Argos" src="https://raw.githubusercontent.com/argos-ci/argos/main/resources/logos/github-readme-logo-light.png" width="360" height="70">
6
+ </picture>
7
+ </a>
8
+ </p>
9
+
10
+ <p align="center"><strong>The open source visual testing platform for AI-native engineering teams.</strong></p>
11
+
12
+ # Argos Command Line Interface
13
+
14
+ Interact with and upload screenshots to [argos-ci.com](https://argos-ci.com) from the command line.
15
+
16
+ [![npm version](https://img.shields.io/npm/v/@snapvisor/cli.svg)](https://www.npmjs.com/package/@snapvisor/cli)
17
+ [![npm dm](https://img.shields.io/npm/dm/@snapvisor/cli.svg)](https://www.npmjs.com/package/@snapvisor/cli)
18
+ [![npm dt](https://img.shields.io/npm/dt/@snapvisor/cli.svg)](https://www.npmjs.com/package/@snapvisor/cli)
19
+
20
+ Visit the [Argos CLI documentation](https://argos-ci.com/docs/reference/argos-command-line-interface-cli) for the full command reference and more.
21
+
22
+ ## Installation
23
+
24
+ ```sh
25
+ npm install --save-dev @snapvisor/cli
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ Upload a directory of screenshots to Argos. Authenticate with your project token via the `ARGOS_TOKEN` environment variable:
31
+
32
+ ```sh
33
+ ARGOS_TOKEN="<your-argos-token>" npx @snapvisor/cli upload ./screenshots
34
+ ```
35
+
36
+ ### Failing CI when a build needs review
37
+
38
+ By default `upload` exits right after the build is created, so a build with unreviewed changes does not fail the job (the commit status does). Pass `--wait` to make the command wait for the build to finish and report the result through its exit code:
39
+
40
+ ```sh
41
+ ARGOS_TOKEN="<your-argos-token>" npx @snapvisor/cli upload ./screenshots --wait --wait-timeout 300
42
+ ```
43
+
44
+ | Build state | Exit code |
45
+ | ---------------------------------------------------------- | --------- |
46
+ | `accepted` / `no-changes` | `0` |
47
+ | `changes-detected` on a reference build (auto-approved) | `0` |
48
+ | `changes-detected` awaiting review | `1` |
49
+ | `rejected`, `expired`, `aborted`, `error` | `1` |
50
+ | Still running after `--wait-timeout` seconds (default 600) | `1` |
51
+
52
+ The exit code always agrees with the build's commit status: success is exit 0, pending review or failure is exit 1. A `429` from the API is retried until the timeout. The build URL and final state are printed either way. `--wait` polls the Snapvisor API, so it needs a token it can read the build with (`--token` or `ARGOS_TOKEN`): GitHub Actions OIDC and tokenless uploads, and `argos login` sessions, are not supported. It cannot be combined with `--parallel`, because a parallel build only finishes once it is finalized.
53
+
54
+ The CLI also exposes commands to `deploy` a static build, inspect and `review` builds, post a `comment`, and more. List them all with:
55
+
56
+ ```sh
57
+ npx @snapvisor/cli --help
58
+ ```
59
+
60
+ ## Links
61
+
62
+ - [Official CLI Docs](https://argos-ci.com/docs/reference/argos-command-line-interface-cli)
63
+ - [Discord](https://argos-ci.com/discord)
package/bin/argos-cli.js CHANGED
@@ -1,3 +1,3 @@
1
- #!/usr/bin/env node
2
-
3
- import "../dist/index.mjs";
1
+ #!/usr/bin/env node
2
+
3
+ import "../dist/index.mjs";