layero 0.10.2 → 0.10.4

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 CHANGED
@@ -5,7 +5,7 @@ Deploy a directory or connect a repository with one command; every command
5
5
  speaks JSON for AI agents and CI.
6
6
 
7
7
  Source: [github.com/LayeroInfra/cli](https://github.com/LayeroInfra/cli)
8
- (public mirror of the `cli/` directory of the platform monorepo).
8
+ (the CLI's home; mirrored to [gitverse.ru/layero/cli](https://gitverse.ru/layero/cli)).
9
9
  Docs: [docs.layero.ru/cli](https://docs.layero.ru/cli/).
10
10
 
11
11
  ## For AI agents (Cursor, Claude Code, Codex, Aider…)
@@ -342,11 +342,13 @@ the rule files themselves. Maximum archive size is 200 MB.
342
342
 
343
343
  ## Contributing
344
344
 
345
- The package is developed in the `cli/` directory of the platform monorepo and
346
- mirrored to [LayeroInfra/cli](https://github.com/LayeroInfra/cli) on every
347
- release (`git subtree push --prefix=cli https://github.com/LayeroInfra/cli main`,
348
- `make cli-mirror`). Issues and pull requests are welcome on the mirror.
349
- `npm test` runs the unit tests; `npm run build` compiles with `tsc`.
345
+ This repository is the CLI's home (since 2026-09-18; before that it was the
346
+ `cli/` directory of the platform monorepo and this repo was a read-only
347
+ mirror). Issues and pull requests are welcome here. `make check` runs the
348
+ build, the unit tests and the consistency gates; `npm test` alone runs the
349
+ tests, `npm run build` compiles with `tsc`. Releases are published to npm by
350
+ `.github/workflows/publish.yml` on a `vX.Y.Z` tag. Contributor rules for
351
+ humans and agents: `AGENTS.md`; how the package is put together: `ARCH.md`.
350
352
 
351
353
  ## Links
352
354
 
@@ -174,6 +174,12 @@ export async function rollbackCmd(opts) {
174
174
  "а у статики артефакт мог быть вычищен по ретенции — " +
175
175
  "пересобери нужный коммит через `layero deploy`");
176
176
  }
177
+ // 400 «target deploy is already the active one» — тоже штатный отказ:
178
+ // цель отката уже раздаётся (типичный случай — второй `rollback`
179
+ // подряд). Это неверный ввод, а не сбой платформы: выход 4, не 5.
180
+ if (err.status === 400 && err.body.includes("already the active one")) {
181
+ throw new LayeroError("rollback_noop", "откатывать нечего: эта сборка уже на живом адресе", "точечно — `layero promote <sha>`; список — `layero deploys list`");
182
+ }
177
183
  throw new Error(`rollback failed (${err.status}): ${err.body.slice(0, 200)}`);
178
184
  }
179
185
  throw err;
@@ -45,6 +45,7 @@ const INVALID_INPUT = new Set([
45
45
  "prebuilt_no_index",
46
46
  "bad_format",
47
47
  "nothing_to_set",
48
+ "rollback_noop",
48
49
  "sql_missing",
49
50
  "branch_unsupported",
50
51
  "provider_unknown",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "layero",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "description": "Layero CLI — deploy a directory or a repo to hosting with build servers in Russia. JSON events and exit codes for AI agents and CI.",
5
5
  "license": "MIT",
6
6
  "type": "module",