@plitzi/cli 0.38.9 → 0.38.11
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 +261 -0
- package/README.md +22 -7
- package/dist/index.js +1344 -816
- package/package.json +3 -3
- package/skills/plitzi-cli/reference/functions.md +7 -2
- package/skills/plitzi-cli/reference/projects.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,266 @@
|
|
|
1
1
|
# @plitzi/cli
|
|
2
2
|
|
|
3
|
+
## 0.38.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- cadf70a: - **`server.cache.invalidate` drops what a page is rendered from** (`@plitzi/sdk-server`): the pages, the RSC answers
|
|
8
|
+
and the schema data they are rendered from go together. It dropped the pages alone, and the next request rendered
|
|
9
|
+
the same page again from the schema still cached under the same key — a publish that invalidated the space changed
|
|
10
|
+
nothing until the schema's TTL ran out. `clear()` and `size` cover the three. A filter on `hostname` drops the schema
|
|
11
|
+
data too, which belongs to no one host. `server.cache` is `null` only when nothing is cached (`cacheTtlMs: 0` and
|
|
12
|
+
`rsc.cacheTtlMs: 0`).
|
|
13
|
+
|
|
14
|
+
## Style inspector
|
|
15
|
+
- **Finds a property** (`@plitzi/sdk-style`): a search above the categories narrows them to the ones that edit what was
|
|
16
|
+
typed — a CSS name in any order of its words (`border radius` finds the four corners), a category's title, or a
|
|
17
|
+
common word for it (`bg`, `rounded`) — opens them, and shows the advanced rows when the match lives there. Escape
|
|
18
|
+
clears it. The categories' properties live in one list (`categoryKeys.ts`) that the dots, the advanced hint and the
|
|
19
|
+
search all read.
|
|
20
|
+
- **Rows that fit**: a section with more than two controls puts its label above them and lays them out in as many
|
|
21
|
+
columns as the panel is wide, instead of one row where every label was cut (`Appearan…`, `Cell Spaci…`, the five
|
|
22
|
+
scroll-snap controls). A row's label column is 80px.
|
|
23
|
+
- **Where a value comes from, said quietly**: the label's tint keeps its four meanings — set here, from a token, bound
|
|
24
|
+
to data, inherited — without the solid blocks of colour; hovering says which (an inherited one names its selector and
|
|
25
|
+
breakpoint) and that a click resets it, the click shows it by striking the label through. The footer's info icon
|
|
26
|
+
holds the legend, and its arrow folds every category.
|
|
27
|
+
- **What is being edited**: an "Editing … › Hover" line under the pickers whenever the rules being written are not the
|
|
28
|
+
selector's plain ones, with a button back to them. Ancestor, pseudo-element and condition fold behind a toggle —
|
|
29
|
+
never while one is in use.
|
|
30
|
+
- The class being edited is the panel's one strong mark (violet), the element's type defaults a softer one; the tools'
|
|
31
|
+
tabs fit the panel and are reachable from the keyboard.
|
|
32
|
+
|
|
33
|
+
- **Lists edited in a popover, all alike**: box and text shadows, transforms, transitions and filters share one row
|
|
34
|
+
(the CSS it writes, a swatch, a remove button) and one popover (a title, a close button, Escape, the focus moved
|
|
35
|
+
into it). What none of them could read is now kept and edited as text instead of being replaced with a default — a
|
|
36
|
+
token for the whole value, `drop-shadow(…)`, `url(#…)`.
|
|
37
|
+
- **Values read the way CSS writes them**: a shadow with two, three or four lengths and its color on either end;
|
|
38
|
+
`rgba(…)` inside text shadows and filters no longer split; negative shadow offsets accepted; a transition with any
|
|
39
|
+
of its parts left out; brightness, contrast and saturation past 1. Transition presets are written as CSS — the
|
|
40
|
+
preset names (`easeInQuad`) made the browser drop the whole declaration — the curve can be dragged into one of your
|
|
41
|
+
own, and the preview stops with the editor. `font-color` (not CSS) became `color`.
|
|
42
|
+
- **Background layers keep what they hold**: a repeating gradient (now a switch), a radial gradient's explicit size, a
|
|
43
|
+
token or `image-set()` as a layer (a "Custom (CSS)" layer), a one-value position read as CSS reads it (`20%` is
|
|
44
|
+
`20% center`), lists shorter than the layers repeated as CSS repeats them, an unset repeat read as tiling, two-position
|
|
45
|
+
stops, negative angles — every one of them was rewritten on the next edit of any layer. Defaults are no longer
|
|
46
|
+
written back, and "Token values" no longer bakes resolved tokens into the layers.
|
|
47
|
+
- **A layer's editor in two halves** — what it draws, then where it goes (size, position, tile, attachment, clip,
|
|
48
|
+
which now offers `text`). The gradient's stops sit on one bar, each a handle that drags or moves with the arrow keys;
|
|
49
|
+
the stop's color and position below it. Previews and swatches resolve the space's tokens.
|
|
50
|
+
- Spacing tells margin (dashed, outside) from padding; Border's sides are labelled and readable in the dark theme; a
|
|
51
|
+
class's menu says what each action does to whom; the Style Manager opens at a size that holds both columns.
|
|
52
|
+
|
|
53
|
+
## Builder
|
|
54
|
+
- **Shortcuts**: `?` shows every shortcut the builder answers to — the same list the "Nothing selected" card teaches
|
|
55
|
+
from — and ⌘\ / Ctrl+\ hides both side panels for the canvas alone and brings back the ones that were open. Both
|
|
56
|
+
work with the canvas focused.
|
|
57
|
+
- **Panels keep their width**: each side panel opens at the width it was left at; the right one starts at 380px.
|
|
58
|
+
- **Text no smaller than 11px** across the builder's panels (it went down to 10px in fifty places).
|
|
59
|
+
|
|
60
|
+
## Realtime
|
|
61
|
+
- **A page hears what it sent when it asks to** (`@plitzi/sdk-shared`, `@plitzi/sdk-server`, `@plitzi/sdk-elements`):
|
|
62
|
+
`publishOn('room', 'react', data, { echo: true })`, `useChannel().publish(type, data, { echo: true })` and the
|
|
63
|
+
channel's `publish` callback (`echo`) hand the message back to the page that sent it too, once the server took it —
|
|
64
|
+
stamped like everyone's, with `echo: true`, its `from` the channel's `me`. Without it a page still never hears its
|
|
65
|
+
own messages, and the docs said "every page on its topic hears it": they now say every OTHER page. Presence never
|
|
66
|
+
echoes.
|
|
67
|
+
- **A topic is opened only once it names one** (`@plitzi/sdk-elements`): `useChannel` — and so the `channel` element —
|
|
68
|
+
opens a topic only when a channel of the space covers it, by the same `matchChannel` the server decides by. A topic
|
|
69
|
+
written from data that has not arrived (`room:` while its provider loads, or its template still as text) asked the
|
|
70
|
+
server for both, was refused with a 403 and a console error on every load, and is now waited for.
|
|
71
|
+
- **Pages that watch** (`@plitzi/sdk-server`, `@plitzi/cli`): a connection whose page carries the `plitzi-observer`
|
|
72
|
+
cookie hears its topics and says nothing on them — no `$join`, no presence, its publishes taken and dropped.
|
|
73
|
+
`page check`, `page shot` and `verify` load pages that way, so checking a live site is no longer a visitor walking
|
|
74
|
+
into a room (`X walked in`, a member more in every picture). `--presence` takes part as a visitor does.
|
|
75
|
+
|
|
76
|
+
## Authoring
|
|
77
|
+
- **`template-in-value`** (refused): a `{{ }}` inside an attribute that is an object or a list — a provider's
|
|
78
|
+
`input`, a list's `items`, a plugin's settings — is never evaluated: only an attribute that is text is interpolated,
|
|
79
|
+
and the page server reads attributes as saved. A provider's `input` also replaced the route param of the same name
|
|
80
|
+
the action was already given, so `input: { room: '{{ navigation.routeParams.room }}' }` reached the task as `""` and
|
|
81
|
+
the page answered 404; its refusal says the action is handed the page's route and query params already. Anything
|
|
82
|
+
else is a binding on the attribute. `mockData`, a sample, is not held to it.
|
|
83
|
+
- **Rules on top of a class need no `id`** (`class: [card, { gap: '6px' }]`): they are named after the id the element
|
|
84
|
+
is given, written or not. `modifier-without-id` is gone; a one-off tweak no longer needs a name nothing reads.
|
|
85
|
+
- **Typed list rows have `inTemplate`**, as untyped ones do, and `bindTemplate`, `visibleWhen`, `hiddenWhen` and
|
|
86
|
+
`variantFrom` take a typed source's path as well as a name: turning a list typed broke every template of its rows.
|
|
87
|
+
- **`when({ field, operator: 'empty' })`** takes no `value` (nor `notEmpty`), as flows.md recommends; it did not
|
|
88
|
+
type-check.
|
|
89
|
+
- **Data-driven colours**: a style binding on a custom property (`{ to: '--who', category: 'style' }`) is written as
|
|
90
|
+
named — it was camel-cased into `who` — so a class reads `var(--who, var(--muted))`. A style binding's value carrying
|
|
91
|
+
`;` or braces is not written: the page server writes inline styles as text, and such a value added declarations of
|
|
92
|
+
its own. `binding-target-unknown` on `style` or a CSS property says to bind it in the `style` category.
|
|
93
|
+
- `unknown-attribute` for `decorative` on an `svg` or a `fontAwesome` says what it means: without a `label` it is
|
|
94
|
+
already hidden from screen readers.
|
|
95
|
+
|
|
96
|
+
- **A folder nobody declared says where to declare it**: `folder-undeclared` (a page, a layout, a folder's parent)
|
|
97
|
+
ends with `pageFolders: [{ id, name }]` on the space, and with the line of the `pageFamily` that wrote the page. A
|
|
98
|
+
folder starts its pages' addresses (`/docs/quickstart`), so a misspelt one is never declared on the author's behalf.
|
|
99
|
+
The skill's `pageFamily` example declares its folder.
|
|
100
|
+
- **A tag is an element**: a `subType` this element has not but another has — `container({ subType: 'ol' })` — names
|
|
101
|
+
that element (`list({ subType: 'ol' })`) instead of the value two letters away (`dl`). Read off the elements'
|
|
102
|
+
declarations, for every element and tag.
|
|
103
|
+
- **A `pageFamily`'s body is written once**: `repeated-shape` and `repeated-on-pages` no longer count the same part of
|
|
104
|
+
each page of one family as copies — they were offering a component for exactly what the docs recommend. Copies within
|
|
105
|
+
one page, or across pages written one by one, are still offered.
|
|
106
|
+
- **Colour emoji are not text to `page check`**: a character painted in its own colours (🎲, `❤️`, a keycap, a ZWJ
|
|
107
|
+
sequence) is left out of the contrast measure, which compared `color` with the tile behind it and failed `verify`
|
|
108
|
+
in the theme whose text colour was close to the tile. A symbol drawn as text (✓, ★) is still measured.
|
|
109
|
+
|
|
110
|
+
- **`declared-callback-target`** (refused): a value beside `on` in `declaredCallback(…, { on, date })` — written as
|
|
111
|
+
`openModal`'s target reads — was read nowhere, and the step ran without it. Refused, with the `params` it goes in
|
|
112
|
+
(`{ on: 'calendar', params: { date } }`) and whether it is one of the callback's declared params.
|
|
113
|
+
- The skill's list rows show the typed form beside the untyped one: with `items` typed by a sample, `r.item` is a path
|
|
114
|
+
(`from: r.item.title`), not text to put in a template string.
|
|
115
|
+
- **`slot-not-class`** (refused): rules written in place in a slot — `slots: { error: [fieldError, { color }] }`, past
|
|
116
|
+
the type in JavaScript or a spec rebuilt from JSON — were taken for a declaration with no rules, and `authorSpace`
|
|
117
|
+
failed later with `Cannot read properties of undefined (reading 'desktop')`, naming nothing. Refused where the slot
|
|
118
|
+
is written, naming the slot and the element, with the `styles()` declaration to hand instead.
|
|
119
|
+
|
|
120
|
+
## CLI
|
|
121
|
+
- **`page shot --click` (and `--clip`, `--wait-for`, `--scroll-to`, `--steps`) takes any selector**: a value that is
|
|
122
|
+
not an element's name (letters, digits, `-`, `_`) is a selector, CSS or Playwright's own (`button:has-text("Orbit")`).
|
|
123
|
+
It was wrapped as a name, and an invalid selector ended the command with Playwright's stack trace; it is now refused
|
|
124
|
+
with the reason.
|
|
125
|
+
|
|
126
|
+
- **`plitzi functions add <package>`**: a package the functions use comes with them, as a function carries its
|
|
127
|
+
dependencies. Installed in the project, it is bundled (web APIs only, minified, its licence kept) into
|
|
128
|
+
`src/functions/vendor/<package>.js`, with a `.d.ts` re-exporting the installed package's types, imported as
|
|
129
|
+
`./vendor/<package>.js` and pushed, built and run with the rest — nothing is resolved anywhere else, so the builder,
|
|
130
|
+
the sandbox and the push are unchanged. A package that reaches Node (`fs`, `node:*`) is refused, naming what it
|
|
131
|
+
reached; one past the functions' 1 MB is too; one that reads `process`/`Buffer` is warned about. The build's refusal
|
|
132
|
+
of a package import now names the command.
|
|
133
|
+
- **`page shot` targets**: a bare word is an element's name, or — no element named so — a tag (`textarea`); resolved on
|
|
134
|
+
the loaded page for `--click`, `--clip`, `--scroll-to`, `--wait-for` and `--steps`. In `--steps`, `type` takes a
|
|
135
|
+
quoted element with spaces (`type ".panel textarea" hola`) — it was cut at its first space and typed the rest — and
|
|
136
|
+
fails when the click leaves no field focused, rather than sending the keys to the page's shortcuts.
|
|
137
|
+
|
|
138
|
+
## Server
|
|
139
|
+
- **`server.listen()` resolves once the port answers** (`@plitzi/sdk-server`) — in a fleet, once the first worker
|
|
140
|
+
does. `serveProject` writes `tmp/dev-server.json` and says `pages on …` after it, not on the line after `listen`:
|
|
141
|
+
for about 0.4 s a tool trusting the line (CI, Playwright's `webServer`, `page check`) was refused. A port it cannot
|
|
142
|
+
take still ends the process, or goes to `onListenError`, and the promise is then never resolved.
|
|
143
|
+
- **Runs set for later** (`@plitzi/sdk-server`, `@plitzi/sdk-shared`, `@plitzi/sdk-authoring`, `@plitzi/plitzi-builder`):
|
|
144
|
+
a turn that runs out, a bot's move, a hold that lapses — one run starting one of the space's actions in N seconds,
|
|
145
|
+
whether or not a page is still open. The action says it may be with a **`later` trigger** (no access rule: the run
|
|
146
|
+
that set it was let in); a flow sets it with `flow.later { action, in, input, key }`, a function with
|
|
147
|
+
`ctx.later({ … })`, and `flow.cancelLater` / `ctx.cancelLater(key)` drops it. A `key` names it: set again under the
|
|
148
|
+
same key, the one still waiting is replaced — the newer of two set at once, on every replica — and a running one is
|
|
149
|
+
left. It is a job of the queue schedules use: due by the store's clock (0 s to 30 days, about a second late at most),
|
|
150
|
+
once across replicas, retried, shown in Automations → Queue. Refused before anything is queued, with why: no `later`
|
|
151
|
+
trigger, one switched off, a time out of range, a key that is not one, a server with no jobs. A plugin's functions
|
|
152
|
+
set none. `ActionJobQueue` gains `cancelPending({ spaceId, key, olderThan? })` and jobs a `key`: the memory, Mongo
|
|
153
|
+
and MySQL queues implement it, and the shared contract tests it. **MySQL**: `action_jobs` gains `job_key` (and the
|
|
154
|
+
`action_jobs_key` index), added on first use; with `createTables: false`, run that statement of
|
|
155
|
+
`mysqlJobSchemaUpgrades()`. A queue of a deployment's own implements `cancelPending` (`09-schedules` shows one).
|
|
156
|
+
- **A project's `kv` file has one holder** (`@plitzi/sdk-server`): `createFileKv` takes `<file>.lock` with its pid;
|
|
157
|
+
a second process — another `npm start`, a `--watch` left running — is refused, naming the first (`the server of
|
|
158
|
+
"orbita", on port 8080`) instead of both writing their whole map over each other's changes, and a lock whose process
|
|
159
|
+
is gone is taken over. `close()` writes what is pending and lets go. A server with `workers` opens the file once, in
|
|
160
|
+
the primary, and its workers reach it through the fleet (`fleetKv`): each used to open a copy of its own.
|
|
161
|
+
- **A self-hosted project's credentials** (`@plitzi/sdk-server`, `@plitzi/cli`): `serveProject` answers
|
|
162
|
+
`getCredential` from `PLITZI_CREDENTIALS` in `.env` — one JSON object, credential id → its keys — so
|
|
163
|
+
`ctx.fetch({ credential })`, a connector and an `http.request` step work on the project's own server, not only in
|
|
164
|
+
`functions dev`. The same variable for both (it was `PLITZI_FUNCTIONS_CREDENTIALS`, read by the CLI alone); a value
|
|
165
|
+
that is not that object is refused with how to write it, instead of every credential going missing.
|
|
166
|
+
- **`HOST` beyond loopback says where to open it**: with `HOST=0.0.0.0`, `serveProject` prints the machine's network
|
|
167
|
+
addresses — what a tablet on the same Wi-Fi opens — and that anyone on that network can. `.env.example` names `HOST`
|
|
168
|
+
and `PLITZI_CREDENTIALS`.
|
|
169
|
+
|
|
170
|
+
## SDK
|
|
171
|
+
- **`useElementSize(ref)`** (`@plitzi/plitzi-sdk`): the size a plugin's own box is drawn at, followed as it changes —
|
|
172
|
+
what `useDisplayMode()` cannot say: a tablet held upright is `mobile` by the window and still a week wide by the
|
|
173
|
+
plugin's box. `undefined` until measured, so the server's page and the hydrated one agree. The breakpoints are
|
|
174
|
+
unchanged.
|
|
175
|
+
- The functions docs say how a task's `params` types (how the builder edits them: `codemirror-json`) and an action's
|
|
176
|
+
`input` types (what the value is: `json`) correspond.
|
|
177
|
+
|
|
178
|
+
- Updated dependencies [cadf70a]
|
|
179
|
+
- @plitzi/sdk-authoring@0.38.11
|
|
180
|
+
|
|
181
|
+
## 0.38.10
|
|
182
|
+
|
|
183
|
+
### Patch Changes
|
|
184
|
+
|
|
185
|
+
- 200da2f: - **`focus-on-field-box`** (`@plitzi/sdk-authoring`): a warning for a `focus` or `focus-visible` state on a text
|
|
186
|
+
field's or a select's `input` slot. That slot is the box the field is drawn in, a `<div>` that never takes focus, so
|
|
187
|
+
the rule was never seen and a keyboard user tabbing to the field found no ring. The fix it names: `'focus-within'` on
|
|
188
|
+
the same class, or the state on the `field` slot.
|
|
189
|
+
- **`modalContainer` says how it is laid out** (`@plitzi/sdk-elements`): its description now names its slots and how
|
|
190
|
+
they sit — the dim layer and the dialog side by side, not one inside the other; the dialog centred by `top`/`left`
|
|
191
|
+
50% and a `translate`. A space styled the dim layer as a flex container to place the dialog, which moved nothing.
|
|
192
|
+
- **A field shows where the keyboard is** (`@plitzi/plitzi-sdk`, `@plitzi/sdk-elements`): a text field's or a select's
|
|
193
|
+
box is ringed (`2px solid currentColor`) while the field inside has keyboard focus, and a textarea while it has. No
|
|
194
|
+
text field or select showed any focus at all: the box had `outline: none`, and the field inherited it. One class of
|
|
195
|
+
specificity, so whatever a space writes about the outline wins; never in the builder's canvas, where the selection is
|
|
196
|
+
the ring. The field no longer inherits the box's outline — the box draws it.
|
|
197
|
+
- **The dim layer of a modal and a dialog is `rgb(0 0 0 / 50%)`** (`@plitzi/plitzi-sdk`, `@plitzi/sdk-elements`), not
|
|
198
|
+
black at `opacity: 0.5`: the default looks the same, and a colour a space gives the layer is drawn as it is — it was
|
|
199
|
+
halved. A space that set its own colour sees it darker: the one it wrote.
|
|
200
|
+
- **`required-message-unused`** (`@plitzi/sdk-authoring`): a warning for a `requiredMessage` on a field nothing requires —
|
|
201
|
+
since 0.38.9 a field is optional unless `required: true`, so the message is never shown and an empty answer is sent.
|
|
202
|
+
The formControl's description, the cheat sheet and the forms recipe say the default.
|
|
203
|
+
- **A page's title can say its record** (`@plitzi/sdk-shared`, `@plitzi/sdk-server`, `@plitzi/sdk-elements`,
|
|
204
|
+
`@plitzi/sdk-authoring`): `seoTitle` and `seoDescription` may be templates over the page's `runtime: 'server'`
|
|
205
|
+
providers (its layouts' too) and `navigation` — `'{{ apiContainer_post.title }} — Blog'`. The server evaluates them
|
|
206
|
+
as it writes the head, from the answers it already has; the browser evaluates the same over `rsc.data`, so the tab
|
|
207
|
+
follows a navigation from record to record. One that reads anything else — a browser provider, `state` — is refused
|
|
208
|
+
(`page-template`): it was written into the head as it was, braces included. A declaration's `serverTemplates` names
|
|
209
|
+
the attributes the page server evaluates against a context of its own (a page's title and description, a provider's
|
|
210
|
+
`notFound`): the element runtime leaves them as written — interpolated where the page renders, a `|default(…)`
|
|
211
|
+
resolved to its fallback before the head could read the providers — and the authoring lint reads the same list.
|
|
212
|
+
- **A page says when its address shows nothing** (`@plitzi/sdk-server`, `@plitzi/sdk-authoring`): `notFound` on the
|
|
213
|
+
page, one expression over the same answers its title reads — `"{{ not (apiContainer_feed.topics|find('slug',
|
|
214
|
+
navigation.routeParams.slug)) }}"` — sends it with status 404, rendered as written. A provider's own `notFound` reads
|
|
215
|
+
only its answer, and one in a layout is every page's: a record read from the layout had no way to say it was not
|
|
216
|
+
there, and the page answered 200.
|
|
217
|
+
- **The Export keeps the flows of a plugin hosted by `custom`** (`@plitzi/sdk-authoring`): `specFromSpace` judged such
|
|
218
|
+
an element by `custom`'s own triggers and callbacks, and dropped a flow on the component's event (`onChange` on an
|
|
219
|
+
editor) as one "a custom never fires" — the space read back was not the space written.
|
|
220
|
+
- **`page check` reads every word on the page, in the colour the browser paints it** (`@plitzi/sdk-authoring`): what a
|
|
221
|
+
plugin draws inside an element of the space is measured too, named by the element and a selector; the measure is
|
|
222
|
+
WCAG's contrast (under 2:1 is unreadable), not "nearly the same colour"; and a colour the browser answers as
|
|
223
|
+
`oklch()`, `oklab()` or `color(srgb …)` — every token and every `color-mix()` — is read as that, where it was read as
|
|
224
|
+
`rgb()` numbers and came out near black. A plugin's dark-on-dark status line passed as "nothing wrong".
|
|
225
|
+
- **`verify` checks every theme the space can be painted in** (`@plitzi/cli`): light and dark, unless the space says
|
|
226
|
+
light only — "48 checks at 1440 and 390 px, light and dark". A page unreadable in the dark theme passed in the light
|
|
227
|
+
one; a failure names the theme it was found in.
|
|
228
|
+
- **`plitzi upgrade` says where fields became optional** (`@plitzi/cli`): for a project last upgraded before 0.38.9,
|
|
229
|
+
each `formControl(…)` with no `required`, at its file and line — said, never written. And a `.gitkeep` is asked for
|
|
230
|
+
only in a folder with nothing else in it: `upgrade` wrote one beside code, and `doctor` called it missing once deleted
|
|
231
|
+
as AGENTS.md asks ("nothing unused") — the three now say the same.
|
|
232
|
+
- **`devMode` and `devReload` are the project's** (`@plitzi/sdk-server`): `src/config/serverOptions.ts` may set them,
|
|
233
|
+
over `NODE_ENV`, which they still follow when left out. A deployment started without `NODE_ENV` (a container's `CMD`)
|
|
234
|
+
says `devMode: false`, and a public action answers with its output alone.
|
|
235
|
+
- **`page shot --from load`** (`@plitzi/cli`): `--frames` start as soon as the page's HTML is in, not once it settles —
|
|
236
|
+
an entrance that plays while the page loads had ended before the first picture.
|
|
237
|
+
- **`heavy-animation` says where each animation is** (`@plitzi/sdk-authoring`): the class and its variant, state or
|
|
238
|
+
slot — or the `customCss` rule — and writes the fix against that selector. It said "in `customCss`" for an animation
|
|
239
|
+
declared on a class's variant, and offered `.glow`, a class no space has.
|
|
240
|
+
- **`page shot --steps`** (`@plitzi/cli`): an interaction played step by step — `click`, `type`, `press`, `wait`,
|
|
241
|
+
`wait-for`, `shot [label]`, `frames <n> [ms]`, separated by `;` or written in a file (`@file`) — each picture labelled
|
|
242
|
+
with its step and the time since the first, and said when nothing changed since the one before. A queue filling, a
|
|
243
|
+
restart, an opening frame by frame took a Playwright script of the project's own. Targets take Playwright's selectors
|
|
244
|
+
too (`text=Saved`).
|
|
245
|
+
- **A space's task may take a `number` param** (`@plitzi/sdk-server`): saved functions refused it ("a type the builder
|
|
246
|
+
cannot draw") while a project's server ran it, so code that worked self-hosted failed on the platform — and the
|
|
247
|
+
builder draws one, a callback's. A step's params now arrive as the types the task declares, on every server: a
|
|
248
|
+
`number` written as text is the number, a `boolean` written `'true'` is `true`, as the browser reads a callback's.
|
|
249
|
+
- **`page shot --as <username>`** (`@plitzi/cli`): signs in first, as `page check --as` does, the password from
|
|
250
|
+
`PLITZI_CHECK_PASSWORD` in `.env`. A page for signed-in visitors was pictured as the sign-in page it sent the browser
|
|
251
|
+
to, without a word; `page shot` now says when the page sent it elsewhere, and that the picture is of that page.
|
|
252
|
+
- **A capture is of the page at rest** (`@plitzi/sdk-mcp`): the local screenshot client takes every picture with
|
|
253
|
+
`prefers-reduced-motion: reduce`, as the browser pod now does — the declared motion and a space's own keyframes that
|
|
254
|
+
honour the query are shown finished. A splash still covering its page, or an arrival caught halfway, was what a
|
|
255
|
+
thumbnail or a `plitzi_look` showed of a page that animates as it loads.
|
|
256
|
+
- **The server renders in the visitor's theme, not only the class** (`@plitzi/sdk-shared`): `ThemeProvider` set the
|
|
257
|
+
starting theme from a layout effect, which never runs on a server, so a page was drawn from the theme store's own
|
|
258
|
+
start — `{{ theme.resolved }}` was `light` under a `<html class="dark">`, and whatever named the scheme (a picture's
|
|
259
|
+
address, a `when` rule) was swapped for the other one as the page hydrated. The theme a host supplies (the cookie) is
|
|
260
|
+
now the server's snapshot of the store, and the hydration's; the shared store is never written on the server.
|
|
261
|
+
- Updated dependencies [200da2f]
|
|
262
|
+
- @plitzi/sdk-authoring@0.38.10
|
|
263
|
+
|
|
3
264
|
## 0.38.9
|
|
4
265
|
|
|
5
266
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ npx @plitzi/cli plugin upload # that zip, on the space you work
|
|
|
22
22
|
several separated by commas), `--api` for the platform, `--json` for a tool or an agent.
|
|
23
23
|
- **`--dry-run` says what it would do, and does none of it** — on every command that writes or sends: `create`,
|
|
24
24
|
`plugin add`, `runtime add`, `space pull`, `space push`, `plugin pack`, `source pack`, `page import`, `plugin upload`, `functions pull`/
|
|
25
|
-
`functions push`, `runtime push`/`start`/`stop`/`size`/`vars`, `skills update`, `doctor --fix`. Each file it would write (`+` new, `~` replaced, `-`
|
|
25
|
+
`functions push`/`functions add`, `runtime push`/`start`/`stop`/`size`/`vars`, `skills update`, `doctor --fix`. Each file it would write (`+` new, `~` replaced, `-`
|
|
26
26
|
removed), what it would install or run, what it would send and where. It still reads what it needs to say so — the
|
|
27
27
|
project, the files it would send, the space it would pull, signing in for that. `upgrade` and `space fix` only show until
|
|
28
28
|
`--write`.
|
|
@@ -193,6 +193,9 @@ plitzi page shot /about --width 390 --scheme dark
|
|
|
193
193
|
plitzi page shot / --frames 4 --every 500 # what moves: a marquee, an autoplay
|
|
194
194
|
plitzi page shot / --viewport --click .knob open-button --frames 4 --every 250 --sheet # an interaction, on one sheet
|
|
195
195
|
plitzi page shot / --compare https://example.com --width 1440 # beside another site: what differs, and how
|
|
196
|
+
plitzi page shot /studio --width 390 --as maya # a page for signed-in visitors: the picture is of it, not of the sign-in
|
|
197
|
+
plitzi page shot / --viewport --frames 6 --every 200 --from load --sheet # what plays as the page arrives
|
|
198
|
+
plitzi page shot / --clip machine --sheet --steps "click .gm__knob; wait 300; frames 6 150; wait-for .gm__capsule; shot opened" # an interaction, step by step
|
|
196
199
|
```
|
|
197
200
|
|
|
198
201
|
Both run on the project's own Playwright against its running server (`npm start`), and refuse a port that answers as
|
|
@@ -200,7 +203,8 @@ another project. They wait for the page to settle — loaded, then half a second
|
|
|
200
203
|
stream that stays open, so a page with a realtime `channel` is checked like any other (`openPage` of
|
|
201
204
|
`@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
|
|
202
205
|
images, sideways scroll, a link or words cut off at the screen's edge (an ancestor hiding them, nothing scrolling to
|
|
203
|
-
them),
|
|
206
|
+
them), words that cannot be told from what is behind them (under 2:1 — the space's elements and what a plugin draws
|
|
207
|
+
inside one; `aria-hidden` words are a decoration), console errors, refused requests and failed flows — and the
|
|
204
208
|
page's data: a binding that reads a path its provider's answer lacks (with the keys it has) — none inside an element
|
|
205
209
|
the page is not showing, which is not mounted — a provider that failed, and each list's rows, drawn and in its source
|
|
206
210
|
(`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.
|
|
@@ -233,6 +237,12 @@ default, and `page shot` names the file by the theme it was painted in. The dev
|
|
|
233
237
|
full-page `page shot` is the whole page — the pane the SDK scrolls in unrolled, every lazy picture loaded, every arrival
|
|
234
238
|
waiting for the scroll shown as it ends — in `tmp/shots/` unless `--out` says where.
|
|
235
239
|
|
|
240
|
+
Both load a page as one that watches its realtime channels: it hears them — a topic the server refuses is still
|
|
241
|
+
reported — and says nothing on them, so nobody on the page sees it arrive, join their members or send. `--presence`
|
|
242
|
+
makes it take part as a visitor does. `--click` in `page shot` takes an element's name, a tag no element is named by
|
|
243
|
+
(`textarea`) or any selector, CSS or Playwright's own (`button:has-text("Orbit")`). In `--steps`, an element with a
|
|
244
|
+
space in it is quoted — `type ".panel textarea" hola` — and `type` fails when the click leaves no field focused.
|
|
245
|
+
|
|
236
246
|
`page shot --compare` writes the two pictures side by side and the differences in red. It compares each section where it
|
|
237
247
|
is on the other page, so a page 400 px longer is said once, with the section the drift starts at; then it pairs the
|
|
238
248
|
texts both pages have and says what each does differently there — `h1 "Learn CSS" — font-size 68px → 60px · y +19px`.
|
|
@@ -320,11 +330,12 @@ An element's own selector and its bindings are named after its place under its n
|
|
|
320
330
|
among its siblings — so a move renames nothing.
|
|
321
331
|
|
|
322
332
|
`verify` runs each check the project has a script for, as its package manager runs one, then opens every page with
|
|
323
|
-
no parameter in its path at 1440 and 390 px
|
|
333
|
+
no parameter in its path at 1440 and 390 px, in every theme the space can be painted in — light and dark, unless
|
|
334
|
+
it says light only — (the server must be up: `npm start`). Only what fails is printed, with the
|
|
324
335
|
last lines it said, and the first failure ends the run — one broken file fails every step after it the same way — the
|
|
325
336
|
rest said as not run until it passes (`--keep-going` runs them anyway). A page the browser was sent away from — one
|
|
326
337
|
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`
|
|
338
|
+
`PLITZI_CHECK_USER` and `PLITZI_CHECK_PASSWORD`, the password `page check --as` and `page shot --as` read too (the environment wins over
|
|
328
339
|
`.env`, as it does for the project's scripts; never on the command line, which a shell keeps). One that even that
|
|
329
340
|
account is sent away from, or with no account named, is said as not checked, never as passing — on its own line, with
|
|
330
341
|
what checks it, without failing the run. Exit 1 when anything failed.
|
|
@@ -513,7 +524,9 @@ plitzi upgrade --write --take plitzi/author.ts
|
|
|
513
524
|
A project brought up to the CLI it has now, part by part: `files` (the machinery — `author.ts`, `main.ts`, the
|
|
514
525
|
Playwright and lint configs, `AGENTS.md`), `packages` (`package.json` merged, `@plitzi/*` raised to this version, then
|
|
515
526
|
the install), `skills` (`.claude/skills/plitzi-*`, whole, so a reference a skill no longer has goes with it) and
|
|
516
|
-
`renames` (a name a version renamed, at its file and line
|
|
527
|
+
`renames` (a name a version renamed, at its file and line — and, for a project last upgraded before a change it may
|
|
528
|
+
count on, where that change lands: a `formControl` with no `required`, optional since 0.38.9; said, never written). A
|
|
529
|
+
`.gitkeep` is written only in a folder with nothing else in it. A file nobody changed since the CLI wrote it is replaced;
|
|
517
530
|
one the project made its own is a diff, left unless `--take` names it (`all` for every one). The generated
|
|
518
531
|
`.prettierignore` names them, so the project's `format` never turns one into a file `upgrade` believes was changed. A file of the project's own
|
|
519
532
|
that the machinery reads (`src/config/serverOptions.ts`, `src/actions/index.ts`) is written when the project has none and the
|
|
@@ -758,13 +771,14 @@ plitzi functions pull # the space's
|
|
|
758
771
|
plitzi functions push # src/functions/ saved as the space's draft, built and checked
|
|
759
772
|
plitzi functions try seismic.feed --params '{"minMagnitude":"4"}' # one task of the saved draft, in the sandbox
|
|
760
773
|
plitzi functions dev seismic.feed --params '{}' --watch # on this machine, as the platform runs it
|
|
774
|
+
plitzi functions add ical.js # an installed package bundled into src/functions/vendor/
|
|
761
775
|
```
|
|
762
776
|
|
|
763
777
|
A space's own server code — tasks its actions run as steps, routes under `/fn/` — and `src/functions/` is a working copy
|
|
764
778
|
of it: `.plitzi/functions.json` keeps what was pulled, so `functions pull` refuses to overwrite what is not pushed (`--force`
|
|
765
779
|
throws it away) and `functions push` refuses when the space moved on since. A problem comes back as
|
|
766
780
|
`src/functions/<file>:<line> <message>`. `dev` runs with the project's own `@plitzi/sdk-server` (`isolated-vm` and
|
|
767
|
-
`core-js` beside it); credentials come from `
|
|
781
|
+
`core-js` beside it); credentials come from `PLITZI_CREDENTIALS` (`.env`), as they do for the project's server. See `docs/en/functions.md`.
|
|
768
782
|
|
|
769
783
|
## Credentials
|
|
770
784
|
|
|
@@ -780,7 +794,8 @@ for a clone to copy and fill in. A server project's `.env` is read as each scrip
|
|
|
780
794
|
before any of its modules is evaluated, so `src/config/serverOptions.ts` and the actions find their settings in
|
|
781
795
|
`process.env` as they load. A change to it is read on the next start, and a deployment that sets its environment needs
|
|
782
796
|
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
|
|
797
|
+
dev tools on and every action's trace in what a visitor is answered (`doctor` says a `start:prod` that does not). A
|
|
798
|
+
deployment started some other way says `devMode: false` in `src/config/serverOptions.ts`, which wins over `NODE_ENV`. A browser
|
|
784
799
|
project's is Vite's: only `VITE_*` reaches the page, and ships in it.
|
|
785
800
|
`create` gives each one a signing key there, made for it: `PLITZI_SIGNING_SECRET`, what `ctx.sign` and `ctx.verify`
|
|
786
801
|
sign with — at least 32 characters (`doctor --fix` writes one where it is missing). `PORT` is left commented out: 8080,
|