@plitzi/cli 0.38.8 → 0.38.9

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 CHANGED
@@ -1,5 +1,69 @@
1
1
  # @plitzi/cli
2
2
 
3
+ ## 0.38.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 64f4cd6: - **`unusedPort()`** (`@plitzi/sdk-server`): a port the system has just handed out, for a test to listen on. The
8
+ package's own tests and `@plitzi/sdk-mcp`'s listened on fixed ports in the ephemeral range (393xx), which any
9
+ outgoing connection of a test running beside them could take: CI failed with `EADDRINUSE` on runs with nothing
10
+ wrong. Every one now listens on a port the system gives it.
11
+ - **Brotli at quality 5** (`@plitzi/sdk-server`): `compression.brotliQuality`, for a page rendered for one request, is
12
+ 5 (was 2). At 2 a 220 KB page came out larger than gzip — 36 KB against 31 — and at 5 it is 29 KB, for the CPU gzip
13
+ spends; on half a core ~0.1 ms a page.
14
+ - **`verify` checks the pages for signed-in visitors** (`@plitzi/cli`): a page that sends the browser to sign in is
15
+ checked again signed in as the account `.env` names — `PLITZI_CHECK_USER`, `PLITZI_CHECK_PASSWORD` (the environment
16
+ wins over `.env`). With none named, `verify` says how. `page check --as` reads the password from `.env` too, and
17
+ `page check` takes several pages, in one browser.
18
+ - **An address that shows nothing answers 404** (`@plitzi/sdk-shared`, `@plitzi/plitzi-sdk`, `@plitzi/sdk-server`):
19
+ one no page answers was sent to the home page with a 302 — every typo read as the home page. A page whose slug is
20
+ `'*'` is now the space's page for it, sent with status 404 (a folder may have its own; the deepest wins), and a page
21
+ gated off by a flag shows it too. Never kept in the page cache: an address asked for at random filled it. Only a slug
22
+ that IS `'*'`: a page answering a subtree by its own (`spaces/:spaceId/update/*`) stays a page like any other.
23
+ - **`authorSpace` gives a space with no `'*'` page a plain one** (`@plitzi/sdk-authoring`), in the home page's layout,
24
+ and says so: suggestion `not-found-page`. The project templates carry their own.
25
+ - **`notFound` on a server provider** (`@plitzi/sdk-elements`, `@plitzi/sdk-server`): an expression against its answer
26
+ (`{{ source.found == false }}`); when it is true the page is sent with status 404, rendered as written. Refused on a
27
+ browser provider (`not-found-in-browser`) and when it is not one expression (`not-found-not-a-template`).
28
+ - **`page check` and `verify` know a page sent with 404** (`@plitzi/cli`): it is said, not failed; the space's `'*'`
29
+ page is checked at an address no page has, and fails if it is not sent with 404.
30
+ - **A form field draws no background of its own** (`@plitzi/sdk-elements`): the `<input>` inside a form control's box
31
+ (`field`) took `background-color: inherit`, and painted a translucent box colour a second time — a darker box inside
32
+ the padding (Tremor's search). It is `transparent`: the box shows through it.
33
+ - **`space lint` offers `quiet` only where there is an element to put it on** (`@plitzi/cli`): a suggestion about what
34
+ the space lacks — `not-found-page` — is answered by writing it.
35
+ - **`feedback --previous`** (`@plitzi/cli`): the brief says what to do when an earlier report's link no longer opens —
36
+ say so, and ask the person for the highest id it had.
37
+ - **`start:prod` runs in production by itself** (`@plitzi/cli`): `NODE_ENV=production node …`. Without the variable a
38
+ deployed project was a development server — dev tools on, and every public action answering its `steps` and `trace`
39
+ (each step's result, what the `output` was meant to leave out). `doctor` says a `start:prod` that does not
40
+ (`start-prod-not-production`); `plitzi upgrade --write` rewrites the script.
41
+ - **A project's `ActionRefusal` reaches the flow** (`@plitzi/sdk-server`): a functions bundle carries its own copy of the
42
+ class, so `instanceof` never knew it and the run lost its reason (`{{ x.error }}` empty). Told apart by name now.
43
+ - **Plugins are not remounted after hydration** (`@plitzi/sdk-elements`): the registry wrapped each plugin again when
44
+ the host handed it over again, a new component type every time — the server's HTML thrown away, entrances replayed,
45
+ effects run twice. Each plugin component is wrapped once.
46
+ - **`start:dev` survives a space that does not author** (`@plitzi/sdk-server`): a restart while the space had an error
47
+ died, and fixing the space woke nothing. It comes up answering every page with what is wrong (503), and loads the
48
+ space the first time a save authors.
49
+ - **`page check` sees what is cut off at the screen's edge** (`@plitzi/sdk-authoring`, `@plitzi/cli`): a link or words an
50
+ ancestor hides past the viewport, which no sideways scroll shows (`cut-off`).
51
+ - **`page shot --click <element...> --sheet`** (`@plitzi/cli`): elements clicked in order — a name or a CSS selector,
52
+ inside a plugin too — pictured after each (`--frames`/`--every`), with how much changed, and every picture on one
53
+ contact sheet. The dev tools' badge is no longer in a picture: its shadow root is marked (`@plitzi/sdk-dev-tools`).
54
+ - **`formControl` is optional unless it says `required: true`** (`@plitzi/sdk-elements`), as an HTML field is. A field
55
+ left without `required` in an older space was required, and is not now.
56
+ - **`text({ decorative })`, `list({ label })`** (`@plitzi/sdk-elements`); **`writing-mode`, `text-orientation`** in the
57
+ CSS vocabulary (`@plitzi/sdk-shared`).
58
+ - **`unused-token` reads the plugins' stylesheets** (`@plitzi/sdk-authoring`): `authorSpace`'s `stylesheets`, which
59
+ `projectAuthoring` fills with every `.css` under `src/plugins/` — a token only a plugin used was said to be unused.
60
+ - **`id-taken` on a provider placed on two pages points at the layout they share** (`@plitzi/sdk-authoring`), not at
61
+ `scope()`, which renamed its source and every template reading it.
62
+ - **The welcome template's tokens keep their names** (`@plitzi/sdk-authoring`): `satisfies`, not an annotation, so
63
+ `tokens(variables).card` typechecks as the cheatsheet teaches.
64
+ - Updated dependencies [64f4cd6]
65
+ - @plitzi/sdk-authoring@0.38.9
66
+
3
67
  ## 0.38.8
4
68
 
5
69
  ### Patch Changes
package/README.md CHANGED
@@ -183,13 +183,15 @@ with `--source local`.
183
183
 
184
184
  ```bash
185
185
  plitzi page check / --width 1440,390 # is the page whole? in text, per width; --json for a tool
186
+ plitzi page check /about /writers # several pages, in one browser
186
187
  plitzi page check /products --state --element catalog-count # and what it holds: state, sources, one element
187
188
  plitzi page check / --ssr # and what the server's HTML lacks that the hydrated page has
188
189
  plitzi page check /enterprise --click site-footer-top # click one element: what it changed, or that nothing did
189
190
  plitzi page check / --click news-send --fill news-email=ana@example.com # a form sent as a visitor fills it
190
- PLITZI_CHECK_PASSWORD=… plitzi page check /studio --as maya # a page for signed-in visitors, signed in through /auth first
191
+ plitzi page check /studio --as maya # a page for signed-in visitors, signed in through /auth first
191
192
  plitzi page shot /about --width 390 --scheme dark
192
193
  plitzi page shot / --frames 4 --every 500 # what moves: a marquee, an autoplay
194
+ plitzi page shot / --viewport --click .knob open-button --frames 4 --every 250 --sheet # an interaction, on one sheet
193
195
  plitzi page shot / --compare https://example.com --width 1440 # beside another site: what differs, and how
194
196
  ```
195
197
 
@@ -197,7 +199,8 @@ Both run on the project's own Playwright against its running server (`npm start`
197
199
  another project. They wait for the page to settle — loaded, then half a second with nothing asked for — counting no
198
200
  stream that stays open, so a page with a realtime `channel` is checked like any other (`openPage` of
199
201
  `@plitzi/sdk-authoring`, which the generated `npm run visual` uses too). `page check` reports every element the space owes the page that is missing or hidden (with why), broken
200
- images, sideways scroll, text in the colour behind it, console errors, refused requests and failed flows — and the
202
+ images, sideways scroll, a link or words cut off at the screen's edge (an ancestor hiding them, nothing scrolling to
203
+ them), text in the colour behind it, console errors, refused requests and failed flows — and the
201
204
  page's data: a binding that reads a path its provider's answer lacks (with the keys it has) — none inside an element
202
205
  the page is not showing, which is not mounted — a provider that failed, and each list's rows, drawn and in its source
203
206
  (`feed 4 of 8 rows`, `hits not rendered (16 in its source)`; `--json`: `lists: { id: { rendered, source } }`). A page's state in a few hundred tokens, where a screenshot costs thousands.
@@ -319,9 +322,12 @@ among its siblings — so a move renames nothing.
319
322
  `verify` runs each check the project has a script for, as its package manager runs one, then opens every page with
320
323
  no parameter in its path at 1440 and 390 px (the server must be up: `npm start`). Only what fails is printed, with the
321
324
  last lines it said, and the first failure ends the run — one broken file fails every step after it the same way — the
322
- rest said as not run until it passes (`--keep-going` runs them anyway); a page the browser was sent away from — one for signed-in visitors — is said as not checked, never
323
- as passing — said on its own line, without failing the run, since a space with pages for signed-in visitors always
324
- has some (`plitzi page check <path> --as <username>` opens one). Exit 1 when anything failed.
325
+ rest said as not run until it passes (`--keep-going` runs them anyway). A page the browser was sent away from — one
326
+ for signed-in visitors — is checked again signed in as the project's account, when `.env` names one:
327
+ `PLITZI_CHECK_USER` and `PLITZI_CHECK_PASSWORD`, the password `page check --as` reads too (the environment wins over
328
+ `.env`, as it does for the project's scripts; never on the command line, which a shell keeps). One that even that
329
+ account is sent away from, or with no account named, is said as not checked, never as passing — on its own line, with
330
+ what checks it, without failing the run. Exit 1 when anything failed.
325
331
 
326
332
  ## `space lint`
327
333
 
@@ -773,7 +779,8 @@ for a clone to copy and fill in. A server project's `.env` is read as each scrip
773
779
  `node --import @plitzi/sdk-server/env` (Node's flag there has its watcher restart on every write in the project) —
774
780
  before any of its modules is evaluated, so `src/config/serverOptions.ts` and the actions find their settings in
775
781
  `process.env` as they load. A change to it is read on the next start, and a deployment that sets its environment needs
776
- no file. A browser
782
+ no file. `start:prod` also sets `NODE_ENV=production` itself — without it a deployed server is a development one, its
783
+ dev tools on and every action's trace in what a visitor is answered (`doctor` says a `start:prod` that does not). A browser
777
784
  project's is Vite's: only `VITE_*` reaches the page, and ships in it.
778
785
  `create` gives each one a signing key there, made for it: `PLITZI_SIGNING_SECRET`, what `ctx.sign` and `ctx.verify`
779
786
  sign with — at least 32 characters (`doctor --fix` writes one where it is missing). `PORT` is left commented out: 8080,