@mereon/demo 0.2.1 → 0.4.0
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 +14 -3
- package/dist/demo.mjs +1261 -643
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ The helpers wait for what they act on: an element the app draws again under them
|
|
|
55
55
|
|
|
56
56
|
Selectors are Playwright's. In `role=link[name="..."]` the name must be the whole accessible name, exactly; add `i` after the closing quote to ignore case, or use a regular expression such as `role=link[name=/Reply to/]` to match part of it. When a role selector matches nothing, the error lists the names that role has on the page.
|
|
57
57
|
|
|
58
|
-
`upload` files the recording. A video carries its script, which Mereon keeps as the transcript instead of transcribing the narration, and, when every step has a `label`, its steps as the video's chapters. Running the same script again updates the guide or video it made instead of adding another: a guide gets a new version, and a video a new recording, which replaces the current one once it has finished processing. If you cannot publish to your whole organization, the upload becomes a proposal for an administrator and the tool tells you so, and an update to a guide or video that is already published stays a proposal until it is approved: the published one is not touched before then.
|
|
58
|
+
`upload` files the recording. A video carries its script, which Mereon keeps as the transcript instead of transcribing the narration, and, when every step has a `label`, its steps as the video's chapters. It also carries the screen each step was recorded on, which Mereon Embed matches to your app's screens (see "Showing demos in your app"), and says how many steps it sent. Running the same script again updates the guide or video it made instead of adding another: a guide gets a new version, and a video a new recording, which replaces the current one once it has finished processing. If you cannot publish to your whole organization, the upload becomes a proposal for an administrator and the tool tells you so, and an update to a guide or video that is already published stays a proposal until it is approved: the published one is not touched before then.
|
|
59
59
|
|
|
60
60
|
When an upload updates a published guide or video, `--retraining` says whether people who already learned it should be retrained: `changed-material` gives them a short lesson on what changed, `full-retake` has them take the original lesson again, and `none` (the default) asks nothing of them.
|
|
61
61
|
|
|
@@ -226,6 +226,17 @@ From then on the project uses only that organization. The sign-in page starts on
|
|
|
226
226
|
|
|
227
227
|
A project that names no organization uses the only one you are signed in to, and stops with a list as soon as you sign in to a second. Name one with `demo config set organization <id>`, or run `init` in a terminal to choose by name. `login`, `doctor` and the refusal that lists your organizations show each one's name beside its id. `logout` signs out of the project's organization and leaves the others signed in. Outside a project, say which with `logout --organization <id>`. `logout --all` signs out of all of them at once.
|
|
228
228
|
|
|
229
|
+
## Showing demos in your app
|
|
230
|
+
|
|
231
|
+
[Mereon Embed](https://docs.mereon.ai/api/embed/) shows the people using your app the demos recorded on the screen they are on. Each step of a video is uploaded with the page it was on, the page's title, the step's `label`, and what identifies the element it acted on, including the `data-mereon-anchor` of that element or the nearest one around it, and of the selected tab the step ended on.
|
|
232
|
+
|
|
233
|
+
- **Mark every view.** A screen that shows different things at one address (tabs, segmented views, a `?tab=` parameter) needs each tab or view marked with `data-mereon-anchor`, and the app reporting the one in view, or Embed lists every demo recorded on the screen for every view. Mark them before recording: a recording made before cannot be matched to a view. A recording warns (`unmarked-view`) when a step ends on a selected tab with no anchor on a page that marks other elements; `checkViews: false` in a script turns that off for an app that does not use Embed.
|
|
234
|
+
- **Give each screen its own title, and each step a label.** The recorder keeps the page's title and the step's `label`, and Embed shows them beside the step's number.
|
|
235
|
+
- **Check what it will match.** `coverage` lists the screens the recordings here visit, the views seen on each, and the steps Embed could not tell apart or label.
|
|
236
|
+
- **Share it beyond administrators.** A demo shared with administrators only never appears to someone the app's server signs in.
|
|
237
|
+
|
|
238
|
+
Videos uploaded before 0.3.0 went up without their steps, so Embed never finds them. `steps` gives them the steps of their recordings on this machine, without uploading them again: `steps <script-id>` for one, or `steps` for every video recorded here. Each step goes with its label, from the recording's chapters for one made before steps kept their labels. Each is found by its source key, and one that was never uploaded, or has a new recording on its way, is left as it is and reported. The steps line up only with the recording that was uploaded, so run it before recording a script again.
|
|
239
|
+
|
|
229
240
|
## Publishing when the change ships
|
|
230
241
|
|
|
231
242
|
An uploaded demo normally goes live at once, which is usually before the change it shows is deployed. With `demo config set release ci`, uploads are held instead: processed so an administrator can preview them, and kept out of the library, search and your organization's knowledge base until your CI publishes them after the deploy.
|
|
@@ -246,7 +257,7 @@ With GitHub Actions, one command sets all of it up:
|
|
|
246
257
|
npx @mereon/demo ci setup
|
|
247
258
|
```
|
|
248
259
|
|
|
249
|
-
It finds the job that deploys to production (or the one you name with `--after <job>`), shows the job it adds after it as a diff, and writes it when you agree. It sets `release` to `ci`. Then it asks you to paste the release token, without showing it, checks it with Mereon, and stores it as the repository's `MEREON_RELEASE_TOKEN` Actions secret with `gh` (or says where to add it by hand). Run it again at any time: it skips what is already done. A coding agent can add the job with `--yes`, but pasting the token is yours to do.
|
|
260
|
+
It finds the job that deploys to production (or the one you name with `--after <job>`), shows the job it adds after it as a diff, and writes it when you agree. It sets `release` to `ci`. Then it asks you to paste the release token, without showing it, checks it with Mereon, and stores it as the repository's `MEREON_RELEASE_TOKEN` Actions secret with `gh` (or says where to add it by hand). Run it again at any time: it skips what is already done, and asks before replacing a secret that is already set. A `MEREON_RELEASE_TOKEN` in your shell's environment is used instead of asking, and it says so; one that is not a release token, or that Mereon refuses, is set aside and you are asked to paste one. `--paste` asks even when the variable is set. A coding agent can add the job with `--yes`, but pasting the token is yours to do.
|
|
250
261
|
|
|
251
262
|
The job it adds, which you can also write yourself, in GitHub Actions or adapted to another CI:
|
|
252
263
|
|
|
@@ -315,7 +326,7 @@ An announcement tells people about a screen they need to have, so make it once t
|
|
|
315
326
|
The tool sends something only when you run a command, and there is no telemetry and no update check. What it sends goes to Mereon: its API at `api.mereon.ai`, and Mereon's file storage at the signed addresses the API gives it for each upload and download.
|
|
316
327
|
|
|
317
328
|
- `login` opens Mereon in your browser and keeps the tokens Mereon issues for you. Logos and the brand's font files come from Mereon too, so a branded demo needs no font service of its own.
|
|
318
|
-
- An upload sends the screenshots and narration, or the video, to your organization. A guide's steps also carry each page's path and title
|
|
329
|
+
- An upload sends the screenshots and narration, or the video, to your organization. A guide's or video's steps also carry each page's path and title, a video step's label, what identifies the element acted on (its id, `aria-label`, `name`, `title`, role and `data-mereon-anchor`), and the selected tab's `data-mereon-anchor`, and every upload carries its source key (`repo#script-id`). `steps` sends a video's steps alone. An upload held for a release also sends the commit it was made from and a hash of its script.
|
|
319
330
|
- Narration text goes to Mereon, which turns it into speech with ElevenLabs. With your own ElevenLabs key, the text goes straight to ElevenLabs under your own account instead, and never through Mereon.
|
|
320
331
|
- `audience` reads your organization's role and team names, and `tags`, and a `record` or upload whose script names tags, read its tag names. `announce` sends the announcement's text and who it is for.
|
|
321
332
|
|