aem-eds-kit 0.4.16 → 0.4.22
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 +61 -2
- package/README.md +50 -1
- package/dist/bin/eds.js +2203 -1251
- package/dist/bin/eds.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,63 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### Added
|
|
10
|
+
- **`eds init` writes a local-dev `.env` + `xwalk.json` by default.** `.env`
|
|
11
|
+
carries the `aem up` config (`AEM_OPEN=/`, `AEM_PORT=3007`, `AEM_PAGES_URL`
|
|
12
|
+
prefilled from the git remote); it's never overwritten and always gitignored.
|
|
13
|
+
`xwalk.json` (Universal Editor multi-field enabled) is written for UE projects.
|
|
14
|
+
Opt out with `--no-env` / `--no-xwalk`. Standalone `eds scaffold env` and
|
|
15
|
+
`eds scaffold xwalk` (re)generate either on demand.
|
|
16
|
+
- **`eds ue check` / `eds ue open` - light Universal Editor helpers.** No Docker,
|
|
17
|
+
no local AEM SDK, no local UE Service. `ue check` is an offline readiness
|
|
18
|
+
report (UE config files present + which blocks have a model, so you know which
|
|
19
|
+
are editable). `ue open [path]` builds and opens the hosted Universal Editor
|
|
20
|
+
deep link for your cloud author, deriving the preview host
|
|
21
|
+
(`main--<repo>--<owner>.aem.page`) from the git remote; `--org`, `--ref`,
|
|
22
|
+
`--url`, `--no-open` to tweak.
|
|
23
|
+
- **Sandbox never overwrites an existing repo.** `eds sandbox new` now checks
|
|
24
|
+
whether `<owner>/<name>` already exists and refuses up front with a clear
|
|
25
|
+
message (in addition to the GitHub template API, which never clobbers). Guards
|
|
26
|
+
both the API and `gh` paths.
|
|
27
|
+
- **Secure GitHub sandboxes guide** (site): least-privilege setup - a fine-grained
|
|
28
|
+
token scoped to a single repo, or a dedicated sandbox org via `--org` - plus the
|
|
29
|
+
minimal permissions, token storage, and the overwrite/teardown safety notes.
|
|
30
|
+
Linked from the docs and README; added to the sitemap.
|
|
31
|
+
|
|
32
|
+
## [0.4.19] - 2026-10-08
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
- **`eds sandbox login` / `logout` - GitHub auth without `gh`.** The sandbox now
|
|
36
|
+
authorizes GitHub itself: the OAuth **Device Flow** (browser authorize) when an
|
|
37
|
+
OAuth app is configured (`EDS_GITHUB_CLIENT_ID`), or a Personal Access Token
|
|
38
|
+
otherwise; `GITHUB_TOKEN`/`GH_TOKEN` and an authenticated `gh` are also accepted
|
|
39
|
+
(fallback). Repos are created/listed/deleted via the GitHub REST API. The token
|
|
40
|
+
is stored owner-only (mode 0600) in `~/.eds/github.json`. `login` guides you to
|
|
41
|
+
a **least-privilege fine-grained token** (ideally scoped to a dedicated sandbox
|
|
42
|
+
org via `--org`), so nothing outside your sandboxes is exposed. The CLI only
|
|
43
|
+
ever lists sandboxes (by the `eds-sandbox` topic) and targets named repos.
|
|
44
|
+
|
|
45
|
+
## [0.4.18] - 2026-10-08
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
- **`eds sandbox`** - spin up and tear down disposable EDS sandbox repos on
|
|
49
|
+
GitHub (via the `gh` CLI). `sandbox new <name>` creates a repo from a boilerplate
|
|
50
|
+
(Document Authoring or Universal Editor / crosswalk), tags it `eds-sandbox`, and
|
|
51
|
+
a guided wizard walks you through visibility, opening the AEM Code Sync install
|
|
52
|
+
page, and running `eds init`. `sandbox list` shows your sandboxes with their
|
|
53
|
+
preview URLs; `sandbox rm <name>` deletes one (with confirmation). From an empty
|
|
54
|
+
folder to a live EDS environment - and gone again - in seconds. Needs the
|
|
55
|
+
globally installed CLI and an authenticated `gh`.
|
|
56
|
+
|
|
57
|
+
### Added
|
|
58
|
+
- **`eds template new` composes blocks in order.** The wizard adds blocks one by
|
|
59
|
+
one (repeats allowed) so you control the exact sequence and count, instead of
|
|
60
|
+
an unordered checkbox.
|
|
61
|
+
- **Universal Editor initial content.** For the UE model, `template new` now
|
|
62
|
+
writes `templates/<name>.json` - the page's initial content as an **ordered
|
|
63
|
+
list of components with default field values** read from each block's model
|
|
64
|
+
(`_<block>.json`), plus registers the blocks so authors can add them. The EDS
|
|
65
|
+
analog of an AEM editable template's initial content.
|
|
10
66
|
|
|
11
67
|
### Changed
|
|
12
68
|
- **`eds template new` is now authoring-aware.** It detects the model from
|
|
@@ -251,7 +307,10 @@ harness, gradient ANSI logo. Not published (superseded by 0.3.0).
|
|
|
251
307
|
Initial CLI scaffold: `block create`, `block from-figma`, `block list`,
|
|
252
308
|
`figma setup`, `doctor`, `preview`, `publish`. Not published.
|
|
253
309
|
|
|
254
|
-
[Unreleased]: https://github.com/piotrgodycki/aem-eds-kit/compare/v0.4.
|
|
310
|
+
[Unreleased]: https://github.com/piotrgodycki/aem-eds-kit/compare/v0.4.19...HEAD
|
|
311
|
+
[0.4.19]: https://github.com/piotrgodycki/aem-eds-kit/releases/tag/v0.4.19
|
|
312
|
+
[0.4.18]: https://github.com/piotrgodycki/aem-eds-kit/releases/tag/v0.4.18
|
|
313
|
+
[0.4.17]: https://github.com/piotrgodycki/aem-eds-kit/releases/tag/v0.4.17
|
|
255
314
|
[0.4.16]: https://github.com/piotrgodycki/aem-eds-kit/releases/tag/v0.4.16
|
|
256
315
|
[0.4.15]: https://github.com/piotrgodycki/aem-eds-kit/releases/tag/v0.4.15
|
|
257
316
|
[0.4.14]: https://github.com/piotrgodycki/aem-eds-kit/releases/tag/v0.4.14
|
package/README.md
CHANGED
|
@@ -128,6 +128,13 @@ Every step is also interactive when you omit the flags - run `eds` for the menu.
|
|
|
128
128
|
|
|
129
129
|
Adapt a freshly cloned EDS boilerplate to your setup in one interactive wizard. Pick the authoring model - **Universal Editor (crosswalk), DA (da.live), Google Drive or SharePoint** - and `eds` sets the project name (`package.json` + boilerplate placeholders), writes `fstab.yaml` **only when the model needs it** (UE/crosswalk doesn't), scaffolds the crosswalk config + `paths.json` for UE, optionally adds the CI workflow, then walks the **external steps** (AEM Code Sync app, content-source share, Sidekick) as a clickable checklist.
|
|
130
130
|
|
|
131
|
+
By default it also writes, out of the box:
|
|
132
|
+
|
|
133
|
+
- a local-dev **`.env`** for `aem up` (`AEM_OPEN=/`, `AEM_PORT=3007`, `AEM_PAGES_URL` prefilled from your git remote) - never overwritten, always gitignored;
|
|
134
|
+
- for Universal Editor projects, an **`xwalk.json`** enabling UE multi-field support.
|
|
135
|
+
|
|
136
|
+
Opt out with `--no-env` / `--no-xwalk`, or (re)generate either later with `eds scaffold env` / `eds scaffold xwalk`.
|
|
137
|
+
|
|
131
138
|
```bash
|
|
132
139
|
eds init # interactive
|
|
133
140
|
eds init --name my-site --authoring da --org my-org --site my-site --yes
|
|
@@ -140,11 +147,13 @@ eds init --name my-site --authoring da --org my-org --site my-site --yes
|
|
|
140
147
|
| `--mountpoint <url>` | Content source URL (document models) |
|
|
141
148
|
| `--org <org>` / `--site <site>` | DA org / site (`--authoring da`) |
|
|
142
149
|
| `--no-ci` | Skip the GitHub Actions workflow |
|
|
150
|
+
| `--no-env` | Skip the local-dev `.env` (aem up config) |
|
|
151
|
+
| `--no-xwalk` | Skip `xwalk.json` (UE multi-field) |
|
|
143
152
|
| `--yes` | Skip prompts; apply with flags/defaults |
|
|
144
153
|
|
|
145
154
|
### `eds template new <name>`
|
|
146
155
|
|
|
147
|
-
Generate EDS page **initial content** - the EDS analog of an AEM template
|
|
156
|
+
Generate EDS page **initial content** - the EDS analog of an AEM template. In the wizard you **compose the blocks in order** (add them one by one, repeats allowed - you control the sequence and count). It always writes `templates/<name>.html`, then **routes by your authoring model** (detected from `fstab.yaml` / project markers, or `--authoring`): **DA** → push to da.live (`--push`, org/site from `.edsrc.json`/flags, `DA_TOKEN` for protected projects); **Google Docs / SharePoint** → importable doc + the external steps; **Universal Editor** → writes `templates/<name>.json` (the page's initial content: an ordered list of components with default field values from each block's model) and registers the blocks so authors can add them. Interactive when flags are omitted; `--blocks hero,cards,cards` keeps order and repeats non-interactively.
|
|
148
157
|
|
|
149
158
|
```bash
|
|
150
159
|
eds template new homepage # interactive (blocks, DA push)
|
|
@@ -161,6 +170,29 @@ eds template new homepage --blocks hero,cards --push --org my-org --site my-site
|
|
|
161
170
|
| `--org` / `--site` | DA org / site (else from `.edsrc.json`) |
|
|
162
171
|
| `--yes` | Skip prompts |
|
|
163
172
|
|
|
173
|
+
### `eds sandbox`
|
|
174
|
+
|
|
175
|
+
Spin up and tear down **disposable EDS sandbox repos** on GitHub - a rapid, throwaway environment you can stand up and delete in seconds, straight from an empty folder.
|
|
176
|
+
|
|
177
|
+
**Authorize GitHub once** - no `gh` required: `eds sandbox login` runs the OAuth **Device Flow** (open `github.com/login/device`, enter the code) when an OAuth app is configured (`EDS_GITHUB_CLIENT_ID`), otherwise it accepts a Personal Access Token (scopes `repo`, `delete_repo`). A token in `GITHUB_TOKEN`/`GH_TOKEN` works too, and an authenticated `gh` is used as a fallback.
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
eds sandbox login # authorize GitHub (device flow or token)
|
|
181
|
+
eds sandbox new my-test # guided: boilerplate, visibility, Code Sync, eds init
|
|
182
|
+
eds sandbox new my-test --ue --private --yes
|
|
183
|
+
eds sandbox list # your sandboxes (tagged eds-sandbox) + preview URLs
|
|
184
|
+
eds sandbox rm my-test # delete it (with confirmation)
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
`sandbox new` creates the repo from a boilerplate (Document Authoring `adobe/aem-boilerplate` or Universal Editor `adobe/aem-boilerplate-xwalk`) via the GitHub API, clones it, tags it `eds-sandbox`, then walks you through opening the AEM Code Sync install page and running `eds init`. The preview URL is `https://main--<repo>--<owner>.aem.page/`.
|
|
188
|
+
|
|
189
|
+
Sandboxes are **throwaway test repos** - stand one up to debug or try an integration, then delete it; they work fine on a personal account. Two safety guarantees:
|
|
190
|
+
|
|
191
|
+
- **Never overwrites an existing repo.** `sandbox new` checks first and refuses if `<owner>/<name>` already exists (and the GitHub template API never clobbers either way).
|
|
192
|
+
- **Least privilege.** Scope the token to just your sandboxes - a fine-grained token limited to one repo, or a dedicated sandbox org used via `--org`. `eds sandbox login` links you straight to the token page with the minimal permissions. See the [Secure GitHub sandboxes guide](https://piotrgodycki.github.io/aem-eds-kit/secure-github-sandboxes.html).
|
|
193
|
+
|
|
194
|
+
The token is stored owner-only (mode `0600`) in `~/.eds/github.json`; `eds sandbox logout` removes it. `list` only ever shows `eds-sandbox` repos and `rm` deletes only the named repo, with confirmation.
|
|
195
|
+
|
|
164
196
|
### `eds migrate component [dir]`
|
|
165
197
|
|
|
166
198
|
Start migrating a **classic AEM component** to EDS. Phase 1 is deterministic (no agent, no network): it parses the component's Touch UI dialog (`_cq_dialog/.content.xml`) and maps its Granite/Coral fields onto the **17 Universal Editor field types** - selects keep their options, multifields become repeatable containers, tabs are preserved - then writes `blocks/<name>/` with a UE model (`_<name>.json`), a `decorate()` stub (port the HTL logic), and a scoped CSS file to fill from the component's clientlib or its rendered page.
|
|
@@ -204,6 +236,23 @@ eds schema block faq --type FAQPage
|
|
|
204
236
|
eds schema block article # interactive type picker
|
|
205
237
|
```
|
|
206
238
|
|
|
239
|
+
### `eds ue check` · `eds ue open [path]`
|
|
240
|
+
|
|
241
|
+
Light **Universal Editor** helpers - no Docker, no local AEM SDK, no local UE Service to stand up.
|
|
242
|
+
|
|
243
|
+
`eds ue check` is an **offline readiness report**: it confirms the project is UE-ready (`component-definition.json` + `component-models.json` + `component-filters.json`) and lists which blocks are actually **editable** - a block is editable when it has a model (`_<name>.json` or a `component-models.json` entry), so you catch a block that won't appear in the editor before you open it.
|
|
244
|
+
|
|
245
|
+
`eds ue open [path]` builds and opens the **deep link** into the hosted Universal Editor for your **cloud author**, pointing the editor canvas at your preview host (derived from the git remote as `main--<repo>--<owner>.aem.page`).
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
eds ue check
|
|
249
|
+
eds ue open /products
|
|
250
|
+
eds ue open / --org my-org --ref dev
|
|
251
|
+
eds ue open /blog --url main--site--owner.aem.page --no-open
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Full workflow (proxy, `.env`, `xwalk.json`, editor deep link): [`docs/local-development.md`](docs/local-development.md).
|
|
255
|
+
|
|
207
256
|
### `eds block create <name>`
|
|
208
257
|
|
|
209
258
|
Scaffolds `blocks/<name>/` with `<name>.js`, `<name>.css`, **and a Universal Editor model `_<name>.json` by default** - so the block is authorable in UE the moment it's created. Validates kebab-case naming and checks for collisions.
|