@plitzi/sdk-dev-tools 0.38.6 → 0.38.8
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 +211 -0
- package/dist/agentInspector/inspector.mjs +20 -12
- package/dist/agentInspector/report.d.ts +9 -3
- package/dist/agentInspector/report.mjs +6 -1
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/components/DetailsRuntime/DetailsRuntime.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,216 @@
|
|
|
1
1
|
# @plitzi/sdk-dev-tools
|
|
2
2
|
|
|
3
|
+
## 0.38.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [1b45aae]
|
|
8
|
+
- @plitzi/sdk-schema@0.38.8
|
|
9
|
+
- @plitzi/sdk-shared@0.38.8
|
|
10
|
+
- @plitzi/sdk-plugins@0.38.8
|
|
11
|
+
|
|
12
|
+
## 0.38.7
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- c7bbc2b: ## A server project's `src/main.ts` is a few lines
|
|
17
|
+
|
|
18
|
+
- **`serveProject` from `@plitzi/sdk-server/project`**: the generated `src/main.ts` hands the space, its actions and
|
|
19
|
+
its options to the server, and the rest comes with the package — the port, the plugins of `src/plugins` and
|
|
20
|
+
`vendor/plugins`, the functions and runtime, `public/`, `src/data/`, the `kv` in `state/kv.json`, `/health`,
|
|
21
|
+
`tmp/dev-server.json` and the reloads while developing. A fix there arrives with `npm update`, not `plitzi upgrade`.
|
|
22
|
+
- **No more `tmp/space.json` while developing**: a saved space is authored again in its own process and handed to the
|
|
23
|
+
server over IPC (`plitzi/author.ts --ipc`, in place of `--out`); the server swaps it in memory and the open pages
|
|
24
|
+
reload, and a refused space keeps the last one that authored. `plitzi doctor` reports a leftover `tmp/space.json`.
|
|
25
|
+
- **`projectAuthoring()` in `@plitzi/sdk-authoring/node`**: what a project's space is checked against — its plugins'
|
|
26
|
+
declarations, its built plugins, its data files — once, for the server and `npm run author` alike. Neither it nor
|
|
27
|
+
`serveProject` takes a root: it is the working directory, where every script runs (`projectAuthoringAt(root)` for a
|
|
28
|
+
tool working on another folder).
|
|
29
|
+
- **`authorProjectSpace` and `projectSpace()` in `@plitzi/sdk-authoring/node`**: the project's space read from
|
|
30
|
+
`src/space/index.ts` — `dist/space/index.js` when the server runs built — once its root and layout are checked, and
|
|
31
|
+
authored. `src/main.ts` is `serveProject({ space: authorProjectSpace, actions, connectors, serverOptions })`, with no
|
|
32
|
+
import of the space; `plitzi/author.ts`, the visual tests and the CLI's checks read it the same way. A module that
|
|
33
|
+
exports no `space` is refused saying what to export (`ProjectSpaceError`).
|
|
34
|
+
- **`.env` lives at the root and Node reads it** as each script starts (`--env-file-if-exists=.env`; `start:dev`
|
|
35
|
+
preloads `@plitzi/sdk-server/env`, since a watched process would restart on every change beside the file). Settings
|
|
36
|
+
read at the top level of `src/config/serverOptions.ts` or the actions are set. Every project gets `.env` and
|
|
37
|
+
`.env.example`; `plitzi upgrade` removes the old `src/env.ts`.
|
|
38
|
+
- **One check of a project's layout** (`@plitzi/sdk-shared/project/layout`): a plugin folder with no entry, a
|
|
39
|
+
JavaScript entry, `src/plugin/` for `src/plugins/`, a `.env` inside `src/`, a space exported by default, a broken
|
|
40
|
+
`vendor/` plugin… The server refuses to boot listing every error with its fix, `npm run author` and the CLI's checks
|
|
41
|
+
refuse with the same words, `plitzi doctor` lists them under `layout` and `--fix` makes the ones with a single fix,
|
|
42
|
+
and `plitzi lint` points at doctor. A plugin folder added broken while developing is reported in the terminal
|
|
43
|
+
instead of failing in esbuild. Plugins may start at `index.tsx`.
|
|
44
|
+
- **`createJsonAdapters` serves documents held in memory**: `offlineData` may be a function returning them, not only a
|
|
45
|
+
path.
|
|
46
|
+
- **One source for a project's layout**, `@plitzi/sdk-shared/project/paths`; `src/config/serverOptions.ts` is typed
|
|
47
|
+
`ProjectServerOptions`. `plitzi upgrade files --write` brings an existing project's `main.ts` and `author.ts` up.
|
|
48
|
+
- **`npm run build` no longer fails on a plugin's stylesheet**: `tsconfig.build.json` includes `plitzi/assets.d.ts`,
|
|
49
|
+
which a space importing a plugin's declaration reaches through its component.
|
|
50
|
+
|
|
51
|
+
## A write refreshes what shows it
|
|
52
|
+
- **Writes now refresh server-driven providers.** `runServerAction`, `webHook`, `writeRecord` and the
|
|
53
|
+
`invalidateQueries` step reach `runtime: 'server'` api containers by id, by `query` URL, or all of them, just as
|
|
54
|
+
they reach cached browser requests. Before, they reached only the browser's query cache, so a saved write left the
|
|
55
|
+
page showing the old value until a reload. Hidden providers refresh when they are shown.
|
|
56
|
+
- **A refresh because something changed asks around every cache.** `performQuery`, writes and invalidations send
|
|
57
|
+
`Cache-Control: no-cache`; `/_rsc` resolves such a request again instead of serving its cached slice, and keeps the
|
|
58
|
+
new answer. A `refreshSeconds` timer and a "load more" page still go through the caches.
|
|
59
|
+
- **`refreshRsc`'s fourth argument is an options object**, `{ location?, fresh? }`.
|
|
60
|
+
|
|
61
|
+
## A space's functions read its data
|
|
62
|
+
- **`ctx.data('products.json')`** reads one file of the space's data (a project's `src/data/`), parsed and read-only,
|
|
63
|
+
as of the run's version. Plugins' functions are refused it.
|
|
64
|
+
- **Self-hosted servers read `dataDir` through the same lookup as the platform**, so `/data/<file>` providers and
|
|
65
|
+
`ctx.data` read the same files; `plitzi functions dev` reads `src/data`. `/data/../x.json` is now the provider's
|
|
66
|
+
error state instead of falling through to `publicDir`.
|
|
67
|
+
- **Importing a file outside `functions/` names the boundary and the fix**: read the space's data with
|
|
68
|
+
`ctx.data('<file>')`.
|
|
69
|
+
|
|
70
|
+
## Signing in on a self-hosted server
|
|
71
|
+
- **`createServer({ auth })` tells the pages it renders where to sign in** (`server.auth`: provider, endpoints and
|
|
72
|
+
the session hint cookie), so a space signs in with no auth settings declared. Settings a space does declare still
|
|
73
|
+
win, and a space that names another provider ignores the server's description. New `pageAuth` server option, for a
|
|
74
|
+
deployment whose `/auth` flows are served by another host.
|
|
75
|
+
- **A page with no auth provider no longer offers `auth.login` / `auth.logout`**, and a sign-in that cannot work says
|
|
76
|
+
why in the console (`[plitzi] auth.login: …`) instead of failing silently. What a visitor keeps there
|
|
77
|
+
(`keepState`, `paintedState`) is the browser's, as on any space without accounts: what was kept as a guest's on such
|
|
78
|
+
a page before is let go once, on the first visit after the upgrade.
|
|
79
|
+
- **Renewal verifies the refresh token itself.** `findByRefreshToken` no longer has to report `refreshExpiresAt`; when
|
|
80
|
+
it does, it overrides the token's own expiry.
|
|
81
|
+
- **New authoring reference `auth.md`**: providers, `authLogin` and its result, `authLogout`, `{{ auth.* }}`,
|
|
82
|
+
`accessLevel`, visitor roles, action `access` and `ctx.user`.
|
|
83
|
+
|
|
84
|
+
## Flows
|
|
85
|
+
- **Authoring refuses a `when` that asks a step for a key it never publishes** (`condition-field-unpublished`).
|
|
86
|
+
`whenSucceeded` / `whenFailed` after `authLogin` always ran the failure branch: they read a server action's
|
|
87
|
+
`status`. The message names what the step publishes and suggests testing `signedIn.ok` with `when`.
|
|
88
|
+
- **`explain` lists what a step publishes** (`Reads:`) and finds the auth steps by their builders (`authLogin`,
|
|
89
|
+
`authLogout`, `authRefreshDetails`). `authLogin({ username, password })` no longer needs `mode`.
|
|
90
|
+
|
|
91
|
+
## Elements
|
|
92
|
+
- **Images no longer default to a 140×140 square**: they are 140px wide and as tall as their ratio, so `width` or
|
|
93
|
+
`aspect-ratio` on a class just works. `object-fit` shows in the builder too.
|
|
94
|
+
- **`formControl` with `subType: 'switch'` renders an on/off switch** (`role="switch"`) — it rendered only its label.
|
|
95
|
+
Checkboxes and switches show a `true` default or binding as ticked.
|
|
96
|
+
- **The theme toggle drops the native button look**, and the **`current` style state covers the chosen item of any
|
|
97
|
+
set**: the link to the page shown, a pressed toggle, a selected tab. The exported `CURRENT_PAGE_SELECTOR` is now
|
|
98
|
+
`CURRENT_SELECTOR`.
|
|
99
|
+
- **Element defaults in the style inspector and the MCP catalogue match what the SDK renders**, held by a test. The
|
|
100
|
+
dialog's `bodyContainer` and `headerCloseButton` slots now reach the page; pagination lays out as declared.
|
|
101
|
+
- **Markdown takes a class for each part of the document** through its own slot (`heading`, `paragraph`, `link`,
|
|
102
|
+
`list`, `listItem`, `quote`, `code`, `codeBlock`, `image`, `table`, `anchor`), and `headingLinks: false` drops the
|
|
103
|
+
link each heading offers to itself while keeping its id, so `/page#anchor` links still work. Its description spells
|
|
104
|
+
out the HTML it outputs.
|
|
105
|
+
- **Tabs show every trigger.** The SDK hid every inactive tab item, the header's included, so a set of tabs showed
|
|
106
|
+
one tab and no way to the others; only the body's panels take turns now.
|
|
107
|
+
- **A link that names a query is current only on that query**: of `/?window=6h` and `/?window=24h`, the one shown
|
|
108
|
+
carries `aria-current` — with the path alone, every one of them did. A link with no query is still current on its
|
|
109
|
+
page whatever the query.
|
|
110
|
+
|
|
111
|
+
## The style language says what `customCss` used to
|
|
112
|
+
- **Pseudo-elements on a class**: `pseudos: { after: { css: { content: '"→"' }, states: { hover: { … } } } }` —
|
|
113
|
+
`before`, `after`, `marker`, `placeholder`, `first-letter`, `first-line`, `selection`, each in the class's states and
|
|
114
|
+
variants. Authoring refuses what draws nothing: a `before`/`after` with no `content`, a `content` without its quotes,
|
|
115
|
+
a property the browser drops on that pseudo-element.
|
|
116
|
+
- **Conditions on a class**: `conditions: { 'motion-reduce': { … }, 'container card (max-width: 30rem)': { … } }` —
|
|
117
|
+
reduced or allowed motion, and container widths, each with its states and pseudo-elements.
|
|
118
|
+
- **The space's `keyframes`**, validated and written at the top of `customCss`; an `animation-name` no keyframes declare
|
|
119
|
+
is warned (`animation-name-unknown`).
|
|
120
|
+
- **New states**: `expanded` (`aria-expanded`), `first`, `last`, `odd`, `even`; the tab panel on show is `current`, and
|
|
121
|
+
the theme toggle's icon of the scheme in use is `current` on its `icon` slot.
|
|
122
|
+
- **`ancestors['>']`** is the parent, whatever it wears — a closed component's part reacting to the element around it.
|
|
123
|
+
- The builder's style inspector, the MCP's definition ops (`pseudos`, `conditions`, and variants with their states) and
|
|
124
|
+
the export to code read and write all of it; an MCP `patchDefinition` no longer drops what it did not name. Rules in
|
|
125
|
+
`customCss` a class can hold now — `.link::after`, one under `@media (prefers-reduced-motion: reduce)`, `.row:first-child`,
|
|
126
|
+
`.row:nth-child(even)`, `.toggle[aria-expanded='true']` — are folded into the class on export and suggested by
|
|
127
|
+
`custom-css-class`.
|
|
128
|
+
|
|
129
|
+
## Elements take a class for each part
|
|
130
|
+
- **`formControl`**: `field` (the `<input>` itself), `icon` (the show-password button) and `requiredMark` slots; a switch's
|
|
131
|
+
knob reads in dark mode and takes `--plitzi-switch-thumb`, `--plitzi-switch-thumb-checked`, `--plitzi-switch-thumb-shadow`.
|
|
132
|
+
- **`pagination`**: `previous`, `page` (the one shown is its `current` state), `next`, `loadMore`.
|
|
133
|
+
- **`richText`** and **`markdown`**: a slot per part — `heading` and `heading1`…`heading6`, `strong`, `emphasis`,
|
|
134
|
+
`divider`, `tableHead`, `tableRow`, `tableHeaderCell`, `tableCell`, and the code block's frame, header, language and
|
|
135
|
+
copy button. Both heading slots dress one `<h3>`, so `heading-level-overridden` warns when they set the same property
|
|
136
|
+
and the stylesheet's order makes the general one win. A document is drawn by the SDK's own renderer
|
|
137
|
+
(`MarkdownDocument` in `@plitzi/sdk-elements`) — plitzi-ui's `Markdown` keeps GitHub's stylesheet for a library's
|
|
138
|
+
consumers — and reads as a document unstyled: headings, lists, code, tables and quotes get their type from the SDK's
|
|
139
|
+
base layer, at no weight (`:where()`), so a class on a part's slot replaces what it sets property by property. A
|
|
140
|
+
`richText` body reads the same.
|
|
141
|
+
- `custom-css-slot` suggests the slot for a `customCss` rule on a part's SDK class — only where a class on the slot can
|
|
142
|
+
say the rest of the selector (a state, a pseudo-element); `element-slot-unknown` warns of a slot an element does not
|
|
143
|
+
have.
|
|
144
|
+
|
|
145
|
+
## Links, refreshes and toasts
|
|
146
|
+
- **`current: 'section'` on a link** keeps it current on its page and every page under its path (`aria-current="true"`
|
|
147
|
+
there), styled by the `current` state — no `activeOn` binding for a section.
|
|
148
|
+
- **A refresh asks only about elements the page shown holds**: a provider on the page being left no longer sends a
|
|
149
|
+
`/_rsc` about the new address.
|
|
150
|
+
- **The toasts' parts are `notifications` fields**: `minHeight`, `fontWeight`, `lineHeight`, `iconSize`, `iconGap`,
|
|
151
|
+
`closeColor`, `closeOpacity`, `progressHeight`.
|
|
152
|
+
- **A page asked for with its space's token hydrates its own space.** On a host serving many spaces
|
|
153
|
+
(`?access-token=`), the space document fetched beside the page went without the token, so the host's own space
|
|
154
|
+
answered it and the browser hydrated another space's document over the page — a hydration error, and its tree
|
|
155
|
+
rebuilt. The document's address now carries the token the page was asked for with.
|
|
156
|
+
- **The SDK's stylesheet carries the space's variables from the server's HTML.** It read them from what a provider
|
|
157
|
+
below it publishes while the page renders, which the server had not done yet when it wrote the sheet; it now
|
|
158
|
+
resolves them from the document itself (`useResolvedVariables` of `@plitzi/sdk-shared/dataSource/hooks`), the same
|
|
159
|
+
on both sides.
|
|
160
|
+
- **A realtime message the pub/sub cannot deliver is answered, not fatal.** A publish that Redis refuses — a timeout under
|
|
161
|
+
load — is answered `503` with `reason: 'unavailable'`, by the `POST` and in the WebSocket's `ack` alike; a connect,
|
|
162
|
+
a disconnect or a revoke that fails is logged, on either transport. Each used to reject with nobody waiting, and the server's `unhandledRejection` handler
|
|
163
|
+
shut the whole process down.
|
|
164
|
+
|
|
165
|
+
## Reporting to Plitzi
|
|
166
|
+
- **`plitzi feedback`** starts a report of what broke, misled or cost time: it writes the page the report is laid out
|
|
167
|
+
in (`tmp/feedback/`) with the installed versions, the project and what `doctor` finds already in it, and tells the
|
|
168
|
+
agent how to fill it — each finding reproduced first, with evidence, impact, workaround and fix, no secrets — and to
|
|
169
|
+
publish it as an artifact whose link the developer sends. `--previous <url>` continues an earlier report.
|
|
170
|
+
|
|
171
|
+
## Pages that load on every browser
|
|
172
|
+
- **The import map comes before anything that loads a module**, in the page server's HTML, a published site's
|
|
173
|
+
(`index.hbs` on the platform), the SDK's and the builder's. React's `modulepreload` links came first, and a browser
|
|
174
|
+
that had fetched a module already — Chrome before 133 — ignored the map: every bare `import "react"` failed
|
|
175
|
+
("Failed to resolve module specifier") and the page never hydrated.
|
|
176
|
+
|
|
177
|
+
## The dev tools
|
|
178
|
+
- **A page loads the React its dev tools need.** The development build only while the visitor has the dev tools on
|
|
179
|
+
(shift+F12, within what the deployment allows); turned off, the next load is a production page, React included. It
|
|
180
|
+
followed the authorization alone, so a space that allowed debugging always shipped development React.
|
|
181
|
+
|
|
182
|
+
## check and lint
|
|
183
|
+
- **`plitzi check`, `push`, `lint` and `fix` hold the space to what `npm run author` and the server do**: its data
|
|
184
|
+
files too, so `push` no longer sends a space whose browser provider reads `src/data/` (`server-data-in-browser`).
|
|
185
|
+
- **`plitzi check` lists each list's rows as drawn and as held in its source** (`feed 4 of 8 rows`,
|
|
186
|
+
`hits not rendered (16 in its source)`). In `--json`, `lists` is now `{ id: { rendered, source } }`.
|
|
187
|
+
- **`plitzi check` no longer reports bindings inside a container the page isn't showing**, nor text "in the colour
|
|
188
|
+
behind it" because of a bar painted over it or a pane that clips it.
|
|
189
|
+
- **`window.__plitzi.sources()` no longer turns a shared array into `'[…]'`**, and a list row no longer replaces its
|
|
190
|
+
list's `items`.
|
|
191
|
+
- **`plitzi lint` says authoring suggestions are quieted with `quiet` on the element**, and reports a
|
|
192
|
+
`plitzi-lint-disable` comment that names one (`disable-names-suggestion`).
|
|
193
|
+
- **`plitzi check` says when a page sent the browser elsewhere** (a page for signed-in visitors, to the sign-in) instead
|
|
194
|
+
of reporting every element missing, and `--as <username>` signs in first through the server's `/auth` routes, the
|
|
195
|
+
password from `PLITZI_CHECK_PASSWORD`.
|
|
196
|
+
- **`plitzi upgrade` never replaces @plitzi packages installed locally** — a tarball, a link, a portal, an override: it
|
|
197
|
+
leaves them and the install, and says which and the command that would install the registry's.
|
|
198
|
+
- **`plitzi explain` covers every code**: authoring's, `plitzi lint`'s and the project layout's.
|
|
199
|
+
- **Authoring reads the global sources' fields**: `auth.authenticated` in a condition is refused with "did you mean
|
|
200
|
+
`isAuthenticated`?" (`global-field-unknown`), and `invalidateElements` must name providers that exist
|
|
201
|
+
(`element-ids-target`). A template's reads of `computed`, `flags` and the global sources come off the parsed
|
|
202
|
+
template: a string inside it (`'https://auth.acme.com'`) is no longer read as `auth.acme`.
|
|
203
|
+
- **`custom-css-notifications` no longer reads the rules `notifications` itself writes** as toasts dressed by hand.
|
|
204
|
+
- **A refused space or layout is a report, not a stack**: the server's entry point imports the space once the layout is
|
|
205
|
+
checked, and `npm start` and `npm run author` print every problem and exit with 1.
|
|
206
|
+
- **New authoring suggestion `class-overrides-class`**: one class's shorthand (`padding`) silently erases a longhand
|
|
207
|
+
(`padding-top`) another class on the same element writes out.
|
|
208
|
+
|
|
209
|
+
- Updated dependencies [c7bbc2b]
|
|
210
|
+
- @plitzi/sdk-plugins@0.38.7
|
|
211
|
+
- @plitzi/sdk-schema@0.38.7
|
|
212
|
+
- @plitzi/sdk-shared@0.38.7
|
|
213
|
+
|
|
3
214
|
## 0.38.6
|
|
4
215
|
|
|
5
216
|
### Patch Changes
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
import { elementReport as e, plain as t, recordAt as n } from "./report.mjs";
|
|
2
|
+
import { isRecord as r } from "@plitzi/sdk-shared/helpers/isRecord";
|
|
2
3
|
//#region src/agentInspector/inspector.ts
|
|
3
|
-
var
|
|
4
|
-
help: () =>
|
|
4
|
+
var i = "window.__plitzi — this page, in text (debug mode only):\n state(key?) runtime.state, or one key of it\n setState(key, value) writes runtime.state.<key>, as a setState step would\n sources(name?) every source's current value by name (apiContainer_site, list_products…), or one\n element(id) an element by its id, in a page or a component: type, attributes, what it reads, its own state,\n the component it places, copies, on screen, box\n flows(limit = 20) the last flows that ran: trigger, element, status, every step with its time and error\n watch(on = true) one console line per flow as it ends", a = (e, t) => r(e) && r(t) && Object.keys(t).some((t) => !Object.hasOwn(e, t)), o = ({ root: r, writeState: o, stores: s, runs: c, setWatching: l, document: u }) => ({
|
|
5
|
+
help: () => i,
|
|
5
6
|
state: (e) => {
|
|
6
|
-
let
|
|
7
|
-
return t(e === void 0 ?
|
|
7
|
+
let i = n(r.getState(), "runtime", "state");
|
|
8
|
+
return t(e === void 0 ? i : i[e]);
|
|
8
9
|
},
|
|
9
|
-
setState:
|
|
10
|
+
setState: o,
|
|
10
11
|
sources: (e) => {
|
|
11
|
-
let
|
|
12
|
-
for (let e of [
|
|
13
|
-
|
|
12
|
+
let i = {}, o = {};
|
|
13
|
+
for (let e of [r, ...s()]) {
|
|
14
|
+
let t = n(e.getState(), "runtime", "sources");
|
|
15
|
+
for (let [r, s] of Object.entries(n(e.getOwnState(), "runtime", "sources"))) a(s, t[r]) ? o[r] = s : i[r] = s;
|
|
16
|
+
}
|
|
17
|
+
let c = {
|
|
18
|
+
...o,
|
|
19
|
+
...i
|
|
20
|
+
};
|
|
21
|
+
return t(e === void 0 ? c : c[e]);
|
|
14
22
|
},
|
|
15
|
-
element: (t) => e(
|
|
16
|
-
flows: (e = 20) =>
|
|
17
|
-
watch: (e = !0) => (
|
|
23
|
+
element: (t) => e(r.getState(), t, u),
|
|
24
|
+
flows: (e = 20) => c().slice(-e),
|
|
25
|
+
watch: (e = !0) => (l(e), e ? "Each flow is said in the console as it ends." : "Flows are no longer said in the console.")
|
|
18
26
|
});
|
|
19
27
|
//#endregion
|
|
20
|
-
export {
|
|
28
|
+
export { o as createAgentInspector };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** An element as it is asked about — by the panel, by `window.__plitzi.element()` and through it `plitzi check`. */
|
|
1
|
+
/** An element as it is asked about — by the panel, by `window.__plitzi.element()` and through it `plitzi page check`. */
|
|
2
2
|
export type ElementReport = {
|
|
3
3
|
id: string;
|
|
4
4
|
type?: string;
|
|
@@ -26,8 +26,14 @@ export type ElementReport = {
|
|
|
26
26
|
height: number;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
/**
|
|
30
|
-
|
|
29
|
+
/**
|
|
30
|
+
* A value as JSON can carry it: functions left out, a cycle cut, depth bounded.
|
|
31
|
+
*
|
|
32
|
+
* Only a true cycle is cut — an object inside itself, on the path being read. One value reached twice is printed twice:
|
|
33
|
+
* a list publishes the array its provider answered, and cutting the second sight of it read as the provider holding
|
|
34
|
+
* nothing.
|
|
35
|
+
*/
|
|
36
|
+
export declare const plain: (value: unknown, depth?: number, path?: WeakSet<object>) => unknown;
|
|
31
37
|
export declare const recordAt: (value: unknown, ...path: string[]) => Record<string, unknown>;
|
|
32
38
|
/**
|
|
33
39
|
* What an element is and how it is doing, read from the root store's state and the page: its type and attributes, what
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { isRecord as e } from "@plitzi/sdk-shared/helpers/isRecord";
|
|
2
2
|
//#region src/agentInspector/report.ts
|
|
3
3
|
var t = (e, n = 0, r = /* @__PURE__ */ new WeakSet()) => {
|
|
4
|
-
if (typeof e
|
|
4
|
+
if (typeof e == "function") return;
|
|
5
|
+
if (typeof e != "object" || !e) return e;
|
|
6
|
+
if (r.has(e) || n > 12) return "[…]";
|
|
7
|
+
r.add(e);
|
|
8
|
+
let i = Array.isArray(e) ? e.map((e) => t(e, n + 1, r)) : Object.fromEntries(Object.entries(e).map(([e, i]) => [e, t(i, n + 1, r)]).filter(([, e]) => e !== void 0));
|
|
9
|
+
return r.delete(e), i;
|
|
5
10
|
}, n = (t, ...n) => {
|
|
6
11
|
let r = t;
|
|
7
12
|
for (let t of n) r = e(r) ? r[t] : void 0;
|
|
@@ -2,7 +2,7 @@ export type DetailsRuntimeProps = {
|
|
|
2
2
|
id: string;
|
|
3
3
|
};
|
|
4
4
|
/**
|
|
5
|
-
* The element as the page has it now — the same report `window.__plitzi.element()` and `plitzi check --element` give:
|
|
5
|
+
* The element as the page has it now — the same report `window.__plitzi.element()` and `plitzi page check --element` give:
|
|
6
6
|
* its own state, what it binds to, how many copies are on the page and where. Read again every second.
|
|
7
7
|
*/
|
|
8
8
|
declare const DetailsRuntime: ({ id }: DetailsRuntimeProps) => import('react').JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-dev-tools",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.8",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -1210,10 +1210,10 @@
|
|
|
1210
1210
|
},
|
|
1211
1211
|
"dependencies": {
|
|
1212
1212
|
"@plitzi/nexus": "^1.4.0",
|
|
1213
|
-
"@plitzi/plitzi-ui": "^1.6.
|
|
1214
|
-
"@plitzi/sdk-plugins": "0.38.
|
|
1215
|
-
"@plitzi/sdk-schema": "0.38.
|
|
1216
|
-
"@plitzi/sdk-shared": "0.38.
|
|
1213
|
+
"@plitzi/plitzi-ui": "^1.6.32",
|
|
1214
|
+
"@plitzi/sdk-plugins": "0.38.8",
|
|
1215
|
+
"@plitzi/sdk-schema": "0.38.8",
|
|
1216
|
+
"@plitzi/sdk-shared": "0.38.8",
|
|
1217
1217
|
"@uiw/react-json-view": "^2.0.0-alpha.43",
|
|
1218
1218
|
"clsx": "^2.1.1"
|
|
1219
1219
|
}
|