layero 0.10.0 → 0.10.1

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.
@@ -43,8 +43,12 @@ export async function createClaimable(cfg, cwd, input) {
43
43
  created = await api.createClaimableProject(input);
44
44
  }
45
45
  catch (err) {
46
- if (err instanceof ApiError && (err.status === 404 || err.status === 501)) {
47
- throw new LayeroError("claimable_unavailable", "деплой без аккаунта на этой платформе ещё не включён", "войдите: `layero login`, либо задайте LAYERO_TOKEN (выпуск — `layero token create` или app.layero.ru/settings/cli)");
46
+ // 404/501 ручки нет; 503 платформа выключила песочницы; 429 квота
47
+ // заявок исчерпана. Все три «сейчас так нельзя», и совет один: войти.
48
+ if (err instanceof ApiError && [404, 429, 501, 503].includes(err.status)) {
49
+ throw new LayeroError("claimable_unavailable", err.status === 429
50
+ ? "лимит заявок без аккаунта исчерпан — попробуйте позже"
51
+ : "деплой без аккаунта на этой платформе сейчас не включён", "войдите: `layero login`, либо задайте LAYERO_TOKEN (выпуск — `layero token create` или app.layero.ru/settings/cli)");
48
52
  }
49
53
  throw err;
50
54
  }
@@ -95,7 +99,9 @@ export async function claimStatusCmd(code, opts) {
95
99
  status = await api.getClaimStatus(ref.code);
96
100
  }
97
101
  catch (err) {
98
- if (err instanceof ApiError && err.status === 404) {
102
+ // 422 код не той формы (короче 8 символов): для человека это тот же
103
+ // «кода нет», а не внутренняя ошибка CLI.
104
+ if (err instanceof ApiError && (err.status === 404 || err.status === 422)) {
99
105
  throw new LayeroError("claim_unknown", `заявки с кодом ${ref.code} нет — истекла или код неверный`, "новый проект без аккаунта: `layero deploy --claim`");
100
106
  }
101
107
  throw err;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "layero",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
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",
7
7
  "homepage": "https://docs.layero.ru/cli/",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/LayeroInfra/cli"
10
+ "url": "git+https://github.com/LayeroInfra/cli.git"
11
11
  },
12
12
  "bugs": {
13
13
  "url": "https://github.com/LayeroInfra/cli/issues"