layero 0.9.2 → 0.9.3

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/dist/agent.js CHANGED
@@ -141,6 +141,17 @@ function renderHuman(event) {
141
141
  case "setup_applied":
142
142
  process.stdout.write(`✓ Setup applied\n`);
143
143
  break;
144
+ case "preview_evicted": {
145
+ // Предупреждение, а не отчёт: перестал отвечать адрес, который кому-то
146
+ // уже отдали ссылкой. Пишем имя ветки — по нему её и возвращают.
147
+ const names = event.evicted
148
+ .map((e) => e.branch ?? e.hostname ?? "")
149
+ .filter(Boolean)
150
+ .join(", ");
151
+ process.stdout.write(`! Превью ${names} приостановлено — этот деплой занял его место\n`);
152
+ process.stdout.write(` Вернуть: задеплойте ту ветку снова или откройте панель\n`);
153
+ break;
154
+ }
144
155
  case "runtime_type_applied":
145
156
  process.stdout.write(`✓ Project type set to ${event.project_type}\n`);
146
157
  break;
@@ -638,6 +638,18 @@ export async function deployCmd(opts) {
638
638
  const liveUrl = promoted || !opts.branch
639
639
  ? (probe?.canonical_url ?? apexUrl)
640
640
  : (probe?.preview_url ?? probe?.canonical_url ?? apexUrl);
641
+ // V263: деплой мог занять слот превью и снять с раздачи чужую ветку.
642
+ // Говорим об этом ДО `ready`: агент, увидевший итог, дальше не читает, а
643
+ // здесь изменился чужой работающий адрес — тот, кому ссылку уже отдали,
644
+ // узнает об этом иначе только открыв её.
645
+ //
646
+ // Пустой список — обычный случай и молчит. Поля может не быть вовсе, если
647
+ // платформа старше него: `?? []` и никаких предупреждений о том, чего не
648
+ // знаем.
649
+ const evicted = deployRow.preview_evicted ?? [];
650
+ if (evicted.length > 0) {
651
+ emit({ event: "preview_evicted", evicted });
652
+ }
641
653
  emit({
642
654
  event: "ready",
643
655
  url: liveUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "layero",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "Layero CLI \u2014 publish a local site with one command. No git, no GitHub, agent-friendly (Cursor, Claude Code).",
5
5
  "license": "MIT",
6
6
  "type": "module",