layero 0.10.3 → 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.
@@ -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.3",
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",