taggor 0.9.0 → 0.10.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/EXIT_CODES.md +2 -1
- package/README.md +4 -0
- package/dist/taggor.mjs +72 -11
- package/package.json +8 -7
package/EXIT_CODES.md
CHANGED
|
@@ -8,12 +8,13 @@ added at the end.
|
|
|
8
8
|
| 0 | ok | The command did what it was asked. |
|
|
9
9
|
| 1 | generic | Any other failure: API 5xx, an unexpected error, a file the CLI could not write, a `promote` or `rollback` the person did not confirm (nothing changed), an API answer that is not the change asked for, `taggor logs --follow` past its `--timeout` or interrupted by SIGINT/SIGTERM before the build ended (the build keeps running; never 0, so `logs --follow && promote` stops). `taggor pull` whose downloaded source does not match its hash or came without one, or is over the size limit (`pull.hashMismatch`, `pull.noHash`, `pull.tooLarge`; nothing is written). |
|
|
10
10
|
| 2 | usage | Invalid use: unknown flag or command, missing argument, invalid value (tag, workspace, API URL, config file), or an input the run could not ask for (no TTY, `CI=true`, `--no-input`, `--json`): the message names the flag to pass. API 400, 413, 415 and 422. `taggor pull` with both `--version` and `--channel`, or a source the validator refuses (`pull.packageRefused`); `taggor projects clean` with an invalid `--older-than`. |
|
|
11
|
-
| 3 | unauthenticated | No credential, or the API did not accept it
|
|
11
|
+
| 3 | unauthenticated | No credential, or the API did not accept it (401), or the login was denied in the browser or expired before approval. |
|
|
12
12
|
| 4 | not_found | The API answered 404, or `promote`/`rollback` decided locally (no API 404) that the version is not in the component's list (`versionNotFound`) or `staging` has nothing to promote (`stagingEmpty`). `taggor data export` with a collection name that is not in the workspace (`data.collectionNotFound`). `taggor pull` of a component with no versions, a channel that points to nothing, or a version the API does not have. |
|
|
13
13
|
| 5 | conflict | Something already exists: files `init` would overwrite (use `--force`), a file whose `<!-- taggor:start -->`/`<!-- taggor:end -->` markers `taggor agent install` cannot read (`agent.markers`, nothing changed), API 409, or `rollback` decided locally (no API 409) that the channel points to nothing (`nothingToRollBack`). A `promote` or `rollback` that left an environment of a site on its pinned version is not a conflict: it exits 0 and names the site, the environment and the `taggor unpin` that undoes the pin. `taggor data export --out` onto a file that exists (use `--force`; `data.outExists`). `taggor pull` into a folder that is not empty or over existing files without `--force` (`pull.notEmpty`), and `taggor projects clean` that kept a folder because it holds unpublished changes (the result is printed first). |
|
|
14
14
|
| 6 | build_failed | The build or the publication gates failed (`build_not_publishable`, `version_not_ready`), `taggor publish` found a secret in the package before sending it, `taggor logs` read a build that ended `failed`, or `taggor check` found a component that fails a publication gate. `taggor pull` of a source that holds a credential (`pull.secrets`; nothing is written). |
|
|
15
15
|
| 7 | rate_limited | Rate limit or quota: API 429, `rate_limited`, `build_quota_exceeded`. |
|
|
16
16
|
| 8 | network | The API could not be reached, or `taggor logs --follow` lost the stream 8 times in a row. `taggor data export` whose stream dropped mid-way (nothing is kept; `data.streamLost`). |
|
|
17
|
+
| 9 | forbidden | Signed in, but not allowed (API 403): the role, the API key's scopes or the account do not allow it (`permission_denied`, `insufficient_scope`), or the action is one only a person does in the portal (`human_action_required`). `taggor data export` as a viewer or member (only owner and admins export; `data.forbidden`). Signing in again does not help: ask the person. |
|
|
17
18
|
|
|
18
19
|
API errors become codes from the problem's HTTP status and `code` (`exitCodeForProblem`); the
|
|
19
20
|
problem `code` wins when it is a build, gate or quota one.
|
package/README.md
CHANGED
|
@@ -20,6 +20,10 @@ npx taggor publish # build it remotely and publish a version to a channel
|
|
|
20
20
|
`login` prints a code and a URL, waits, and you approve it in the browser. `logout` revokes the saved login
|
|
21
21
|
and deletes it from the machine.
|
|
22
22
|
|
|
23
|
+
Without a browser (a server or a CI job), set `TAGGOR_API_KEY` to an API key from the portal (Settings, then
|
|
24
|
+
API keys) instead of running `login`: the key wins over any saved login. `TAGGOR_API_URL` sets the API
|
|
25
|
+
origin the CLI talks to.
|
|
26
|
+
|
|
23
27
|
You do not need GitHub or a repository: the source of every published version is stored in Taggor, and
|
|
24
28
|
`npx taggor pull` brings every component of your workspace back (the project is kept in
|
|
25
29
|
`~/.taggor/projects/<workspace>/`). To keep the project in a folder or repository of your own, use
|