aem-eds-kit 0.4.57 → 0.4.60
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/CHANGELOG.md +28 -0
- package/README.md +44 -1
- package/dist/bin/eds.js +129 -121
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -29,6 +29,16 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
29
29
|
Version links point at npm; the GitHub release links never existed.
|
|
30
30
|
|
|
31
31
|
### Fixed
|
|
32
|
+
- **`eds draft preview|accept|refine --version` printed the CLI version**
|
|
33
|
+
(EDS-089) instead of picking a draft version: the program's own `--version`
|
|
34
|
+
flag won. The version is now an argument (`eds draft preview hero 2`,
|
|
35
|
+
`eds draft accept hero 1 --branch feature/hero`) and `refine` takes
|
|
36
|
+
`--from <n>`.
|
|
37
|
+
- **The site has a menu on phones** (EDS-079). Below 720px the nav links were
|
|
38
|
+
hidden with nothing to bring them back; a menu button (with `aria-expanded`,
|
|
39
|
+
closing on Esc, a link tap or widening the window) now opens them as a
|
|
40
|
+
full-width list on every page, with GitHub and npm inside it under 480px,
|
|
41
|
+
each with its mark (EDS-081).
|
|
32
42
|
- **Scraped designs keep section backgrounds and one-sided lines** (EDS-067).
|
|
33
43
|
A full-width band with no background of its own now carries the colour painted
|
|
34
44
|
behind it (`inheritedBackground`, usually the page background), which the prompt
|
|
@@ -50,6 +60,24 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
50
60
|
where the Universal Editor boilerplate actually lives.
|
|
51
61
|
|
|
52
62
|
### Added
|
|
63
|
+
- **`--json` event stream** (EDS-087) for `block from-design` and the `draft`
|
|
64
|
+
commands: one JSON object per line on stdout (`v`, `type`), the usual output
|
|
65
|
+
on stderr, ending with a `result`. Events: `start`, `log`, `agent` (each tool
|
|
66
|
+
call), `agent-result` (duration and cost), `draft`, `drafts`, `preview`,
|
|
67
|
+
`accepted`, `discarded`, `prompt`, `result`. With `--json` nothing prompts,
|
|
68
|
+
no browser opens, and an agent's own stdout goes to stderr. This is the
|
|
69
|
+
interface aem-eds-studio uses.
|
|
70
|
+
- **Drafts: review rounds before a block reaches the repository** (EDS-085).
|
|
71
|
+
`block from-design --draft` keeps the result as a version under
|
|
72
|
+
`tmp/eds-cli/drafts/<name>/` and leaves `blocks/` untouched; `eds draft
|
|
73
|
+
preview | refine "<feedback>" | accept [--commit|--branch] | discard | list`
|
|
74
|
+
reviews it, adds a version per round and, on accept, copies it into
|
|
75
|
+
`blocks/<name>/` and commits it with the rounds in the message.
|
|
76
|
+
- **A docs gate in CI** (EDS-083). On a PR, a change under `src/` fails without
|
|
77
|
+
a `CHANGELOG.md` entry, and a change to the CLI surface (`src/bin/eds.ts`) fails
|
|
78
|
+
without `README.md` (the npm page) and `site/docs.html` updates. Plus a PR
|
|
79
|
+
template with a docs checklist, and the rule in `CODING_STANDARDS.md` /
|
|
80
|
+
`CLAUDE.md`.
|
|
53
81
|
- **Any web page is a design source** (EDS-065). `block from-design` scrapes
|
|
54
82
|
every http(s) link that isn't Figma, Framer or Stitch (`--provider web`): a
|
|
55
83
|
live site you're rebuilding, an HTML mock-up, or the project's own example page
|
package/README.md
CHANGED
|
@@ -435,6 +435,7 @@ eds block from-design "<figma-url>" --dry-run # just build the prompt
|
|
|
435
435
|
| `--refresh` | Ignore the cached snapshot and re-fetch |
|
|
436
436
|
| `--sample` | Use the bundled sample design, the example file's hero (no URL, token or MCP) |
|
|
437
437
|
| `--serve` | Auto-start the live preview (non-interactive runs only) |
|
|
438
|
+
| `--draft` | Generate a draft for review instead of writing `blocks/<name>/` (see [`eds draft`](#eds-draft)) |
|
|
438
439
|
| `--yes` | Skip confirmation prompts |
|
|
439
440
|
|
|
440
441
|
Set a **Figma Personal Access Token** (scope `file_content:read`) to use the REST path — via `FIGMA_TOKEN` env or `figma.token` in config. The block generation model defaults to the fastest (Haiku); override with `model` in config.
|
|
@@ -455,6 +456,46 @@ Interactive wizard that:
|
|
|
455
456
|
3. Shows install commands if not
|
|
456
457
|
4. Saves preferences to `~/.eds/config.json`
|
|
457
458
|
|
|
459
|
+
### `eds draft`
|
|
460
|
+
|
|
461
|
+
Review a block before it reaches the repository. With `--draft`, `block from-design` keeps its result as a **draft version** under `tmp/eds-cli/drafts/<name>/v1/`. `blocks/<name>/` stays exactly as it was: an existing block is set aside while the agent works and always put back. Each review round adds a version; nothing is written to `blocks/` until the draft is accepted, either right away or after a few rounds.
|
|
462
|
+
|
|
463
|
+
```bash
|
|
464
|
+
eds block from-design "<design link>" --name hero --draft # → draft v1
|
|
465
|
+
eds draft preview hero # review it (latest version)
|
|
466
|
+
eds draft refine hero "bigger headline, orange buttons" # one more round → v2
|
|
467
|
+
eds draft accept hero --branch feature/hero # → blocks/hero/, committed
|
|
468
|
+
eds draft list # drafts and their versions
|
|
469
|
+
eds draft discard hero # drop it; blocks/ untouched
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
`accept --commit` (or `--branch <name>`, created if missing) commits only `blocks/<name>/`, with the review rounds in the message (`v1: first version`, `v2: "bigger headline, orange buttons"`). `preview` and `accept` take a version (`eds draft preview hero 2`, `eds draft accept hero 1 --branch feature/hero`; default: the latest). `refine` starts from the latest version, or `--from <n>`, and reuses the agent and model that made the draft unless you pass `--agent` / `--model`.
|
|
473
|
+
|
|
474
|
+
**For tools: `--json`.** `block from-design` and the `draft` commands take the global `--json` flag and print **one JSON event per line on stdout** (the usual output stays on stderr). It never prompts, so pass the design, the name and `--draft`. Every event has `v` (the schema version, currently `1`) and `type`, and the stream ends with one `result`. [aem-eds-studio](https://github.com/piotrgodycki/aem-eds-studio) reads it.
|
|
475
|
+
|
|
476
|
+
```bash
|
|
477
|
+
eds --json block from-design "<design link>" --name hero --draft
|
|
478
|
+
```
|
|
479
|
+
```jsonl
|
|
480
|
+
{"v":1,"type":"start","command":"block from-design","cli":"0.4.59"}
|
|
481
|
+
{"v":1,"type":"agent","tool":"Write","label":"✎ blocks/hero/hero.css","durationMs":18}
|
|
482
|
+
{"v":1,"type":"agent-result","durationMs":152455,"costUsd":0.031}
|
|
483
|
+
{"v":1,"type":"draft","name":"hero","version":1,"ok":true,"dir":"tmp/eds-cli/drafts/hero/v1","files":["hero.css","hero.js"]}
|
|
484
|
+
{"v":1,"type":"result","ok":true,"exitCode":0}
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
| Event | When |
|
|
488
|
+
|---|---|
|
|
489
|
+
| `start` | first line: the command and the CLI version |
|
|
490
|
+
| `log` | every message the command prints (`level`: debug, info, success, warn, error), as plain text |
|
|
491
|
+
| `agent` / `agent-result` | each tool call the agent made, then its duration and cost (Claude Code) |
|
|
492
|
+
| `draft` | a version was stored: `name`, `version`, `ok` (checks passed), `dir`, `files`, `feedback` |
|
|
493
|
+
| `drafts` | `draft list`: every draft with its versions |
|
|
494
|
+
| `preview` | `draft preview`: the server is up at `url` (no browser is opened) |
|
|
495
|
+
| `accepted` / `discarded` | `draft accept` (with `commit`, `branch`) / `draft discard` |
|
|
496
|
+
| `prompt` | `--dry-run`: where the prompt was saved |
|
|
497
|
+
| `result` | last line: `ok` and `exitCode` |
|
|
498
|
+
|
|
458
499
|
### `eds block list`
|
|
459
500
|
|
|
460
501
|
Lists all blocks in the project with their file status and Figma source info.
|
|
@@ -734,7 +775,7 @@ Priority: CLI flags → env vars → `.edsrc.json` (project) → `~/.eds/config.
|
|
|
734
775
|
|---|---|
|
|
735
776
|
| `--verbose` | Debug-level output |
|
|
736
777
|
| `--quiet` | Errors only |
|
|
737
|
-
| `--json` | Machine-readable JSON
|
|
778
|
+
| `--json` | Machine-readable output: one JSON document (`doctor`, `audit loading`, `audit security`, `block list`), or JSON-lines events (`block from-design`, `draft`; see [`eds draft`](#eds-draft)) |
|
|
738
779
|
| `--no-color` | Disable colors (also respects `NO_COLOR` env) |
|
|
739
780
|
|
|
740
781
|
## Development
|
|
@@ -744,6 +785,8 @@ git clone https://github.com/piotrgodycki/aem-eds-kit.git && cd aem-eds-kit
|
|
|
744
785
|
npm install
|
|
745
786
|
```
|
|
746
787
|
|
|
788
|
+
Each change goes through an issue (`EDS-NNN`), a `feature/EDS-NNN` or `bug/EDS-NNN` branch and a PR, and **ships with its docs**: a `CHANGELOG.md` entry, `README.md` (this file is also the npm page) and the site pages it touches. CI's docs gate (`scripts/check-docs.mjs`) fails a PR that changes `src/` without a changelog entry, or the commands and flags in `src/bin/eds.ts` without `README.md` and `site/docs.html`. See [`CODING_STANDARDS.md`](https://github.com/piotrgodycki/aem-eds-kit/blob/main/CODING_STANDARDS.md).
|
|
789
|
+
|
|
747
790
|
### Scripts
|
|
748
791
|
|
|
749
792
|
```bash
|