layero 0.8.4 → 0.8.6
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 +51 -5
- package/package.json +15 -2
package/README.md
CHANGED
|
@@ -80,7 +80,7 @@ Run `layero <cmd> --help` for full options.
|
|
|
80
80
|
- `--name <name>` — project name (only on first deploy).
|
|
81
81
|
- `--project <id_or_slug>` — deploy into an existing project, ignoring
|
|
82
82
|
`./.layero/project.json` (useful for CI).
|
|
83
|
-
- `--prod` — deploy to
|
|
83
|
+
- `--prod` — target the production environment of a repository-linked project. **Redundant for CLI projects**: a project created by `layero deploy` auto-promotes to its apex on every deploy, so a plain `deploy` already replaces the live site. Use `--branch <name>` when you want a publish that leaves the live address alone.
|
|
84
84
|
- `--branch <name>` — deploy to a specific branch's environment.
|
|
85
85
|
- `--org <slug>` — Layero organization for first-time project creation.
|
|
86
86
|
- `--yes` / `-y` — non-interactive mode.
|
|
@@ -151,6 +151,42 @@ faster deploys, no surprises from the platform's package-manager defaults.
|
|
|
151
151
|
|
|
152
152
|
Override anything by editing `.layero/project.json` after the first `layero init`.
|
|
153
153
|
|
|
154
|
+
## In CI
|
|
155
|
+
|
|
156
|
+
`layero login` opens a browser — there isn't one on a runner, so a pipeline
|
|
157
|
+
authenticates with a long-lived token instead. Create it at
|
|
158
|
+
[app.layero.ru/settings/cli](https://app.layero.ru/settings/cli) and pass it
|
|
159
|
+
through the environment:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
LAYERO_TOKEN=... npx layero@latest deploy --prod --yes
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
`LAYERO_TOKEN` is read **before** `~/.layero/config.json`, deliberately: on a
|
|
166
|
+
developer machine that is already signed in to a different account, the
|
|
167
|
+
opposite order would silently deploy to the wrong place. `--yes` skips the
|
|
168
|
+
confirmation prompt that would otherwise wait forever with nobody to answer it.
|
|
169
|
+
|
|
170
|
+
The token is account-scoped, like a login session, so create a separate one per
|
|
171
|
+
repository — then a leak is contained to that repository. Revoke on the same
|
|
172
|
+
page; running builds start failing immediately.
|
|
173
|
+
|
|
174
|
+
On GitHub Actions there is an official action that wraps the above:
|
|
175
|
+
|
|
176
|
+
```yaml
|
|
177
|
+
- uses: LayeroInfra/deploy-action@v1
|
|
178
|
+
with:
|
|
179
|
+
token: ${{ secrets.LAYERO_TOKEN }}
|
|
180
|
+
prod: true
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Note that if the repository is already linked to a Layero project, a push
|
|
184
|
+
builds it automatically — a pipeline would only duplicate that work. Reach for
|
|
185
|
+
CI when the build itself needs secrets or private dependencies the platform
|
|
186
|
+
does not have, then ship the result with `prebuilt: dist`.
|
|
187
|
+
|
|
188
|
+
Full guide: <https://docs.layero.ru/cli/github-actions>
|
|
189
|
+
|
|
154
190
|
## Agent / JSON mode
|
|
155
191
|
|
|
156
192
|
`layero` auto-switches to non-interactive + structured-output mode when any of these is true:
|
|
@@ -181,10 +217,20 @@ Event types emitted on stdout:
|
|
|
181
217
|
{"event":"error","code":"…","next_action":"…","message":"…"}
|
|
182
218
|
```
|
|
183
219
|
|
|
184
|
-
On `ready`, `url` is the **live public site**
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
220
|
+
On `ready`, `url` is the **live public site** — reachable the moment the event
|
|
221
|
+
arrives. Show it as-is and never rebuild the hostname from a template: project
|
|
222
|
+
addresses live in the `layero.app` zone, organizations that have not migrated
|
|
223
|
+
yet still use the older `<org>-<project>.layero.ru` scheme, and a guessed host
|
|
224
|
+
will be wrong for one of the two. `dashboard_url` is the management page, not
|
|
225
|
+
the site.
|
|
226
|
+
|
|
227
|
+
`preview_url`, `edge_ready` and `edge_eta_seconds` are legacy fields from the
|
|
228
|
+
era when user sites sat behind a CDN that needed warming. They no longer do —
|
|
229
|
+
sites are served straight from the platform edge. `preview_url` is `null` for
|
|
230
|
+
projects in the `layero.app` zone. **Do not gate on `edge_ready`**: waiting for
|
|
231
|
+
it means waiting for something that will not arrive.
|
|
232
|
+
|
|
233
|
+
Not logged in? `deploy` starts the device-flow itself (`auth_required`).
|
|
188
234
|
|
|
189
235
|
Errors carry a stable `code` (e.g. `not_logged_in`, `invalid_type`,
|
|
190
236
|
`project_not_found`, `cli_deploys_disabled`) and a `next_action` hint so
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "layero",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "Layero CLI — publish a local site with one command. No git, no GitHub, agent-friendly (Cursor, Claude Code).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -13,14 +13,23 @@
|
|
|
13
13
|
"deploy",
|
|
14
14
|
"deployment",
|
|
15
15
|
"hosting",
|
|
16
|
+
"static-hosting",
|
|
16
17
|
"cdn",
|
|
17
18
|
"cli",
|
|
18
19
|
"static-site",
|
|
19
20
|
"spa",
|
|
20
21
|
"ssr",
|
|
22
|
+
"vite",
|
|
23
|
+
"nextjs",
|
|
24
|
+
"astro",
|
|
25
|
+
"sveltekit",
|
|
21
26
|
"ai-agents",
|
|
22
27
|
"cursor",
|
|
23
|
-
"claude-code"
|
|
28
|
+
"claude-code",
|
|
29
|
+
"mcp",
|
|
30
|
+
"vercel-alternative",
|
|
31
|
+
"netlify-alternative",
|
|
32
|
+
"russia"
|
|
24
33
|
],
|
|
25
34
|
"engines": {
|
|
26
35
|
"node": ">=20"
|
|
@@ -52,5 +61,9 @@
|
|
|
52
61
|
"@types/node": "^20.14.10",
|
|
53
62
|
"typescript": "^5.5.4",
|
|
54
63
|
"vitest": "^4.1.7"
|
|
64
|
+
},
|
|
65
|
+
"author": {
|
|
66
|
+
"name": "Layero",
|
|
67
|
+
"url": "https://layero.ru"
|
|
55
68
|
}
|
|
56
69
|
}
|