@scayle/storefront-devtools 0.2.0-alpha.4 → 0.2.0-alpha.6
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 +77 -0
- package/README.md +234 -111
- package/dist/_chunks/{coalesce-D-Q8NzYg.mjs → coalesce-PetLUcf2.mjs} +388 -404
- package/dist/_chunks/frame-nav-DctWjxeG.mjs +3 -0
- package/dist/group.d.ts +14 -26
- package/dist/group.d.ts.map +1 -1
- package/dist/index.d.ts +29 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +80 -116
- package/dist/inertia/channel.d.ts +18 -5
- package/dist/inertia/channel.d.ts.map +1 -1
- package/dist/inertia/client/index.mjs +242 -210
- package/dist/inertia/client/messages.d.ts +28 -0
- package/dist/inertia/client/messages.d.ts.map +1 -0
- package/dist/inertia/client/publish.d.ts +4 -2
- package/dist/inertia/client/publish.d.ts.map +1 -1
- package/dist/inertia/core/capture.d.ts.map +1 -1
- package/dist/inertia/core/correlator.d.ts +16 -0
- package/dist/inertia/core/correlator.d.ts.map +1 -1
- package/dist/inertia/core/diagnostics.d.ts.map +1 -1
- package/dist/inertia/core/diff.d.ts +2 -1
- package/dist/inertia/core/diff.d.ts.map +1 -1
- package/dist/inertia/core/feature-info.d.ts +9 -5
- package/dist/inertia/core/feature-info.d.ts.map +1 -1
- package/dist/inertia/core/features.d.ts.map +1 -1
- package/dist/inertia/core/history-capture.d.ts.map +1 -1
- package/dist/inertia/core/interceptors.d.ts +1 -0
- package/dist/inertia/core/interceptors.d.ts.map +1 -1
- package/dist/inertia/core/markdown.d.ts.map +1 -1
- package/dist/inertia/core/protocol.d.ts +1 -1
- package/dist/inertia/core/protocol.d.ts.map +1 -1
- package/dist/inertia/core/request-filters.d.ts +19 -0
- package/dist/inertia/core/request-filters.d.ts.map +1 -0
- package/dist/inertia/core/request-tree.d.ts +6 -3
- package/dist/inertia/core/request-tree.d.ts.map +1 -1
- package/dist/inertia/core/response.d.ts +3 -2
- package/dist/inertia/core/response.d.ts.map +1 -1
- package/dist/inertia/core/store.d.ts +1 -0
- package/dist/inertia/core/store.d.ts.map +1 -1
- package/dist/inertia/core/types.d.ts +2 -2
- package/dist/inertia/core/types.d.ts.map +1 -1
- package/dist/inertia/core/url.d.ts +12 -0
- package/dist/inertia/core/url.d.ts.map +1 -1
- package/dist/inject.d.ts +3 -4
- package/dist/inject.d.ts.map +1 -1
- package/dist/og.d.ts +12 -0
- package/dist/og.d.ts.map +1 -0
- package/dist/orpc/channel.d.ts +9 -1
- package/dist/orpc/channel.d.ts.map +1 -1
- package/dist/orpc/client/index.mjs +118 -102
- package/dist/orpc/client/publish.d.ts +3 -1
- package/dist/orpc/client/publish.d.ts.map +1 -1
- package/dist/orpc/core/session.d.ts +1 -8
- package/dist/orpc/core/session.d.ts.map +1 -1
- package/dist/orpc/core/stats.d.ts +1 -1
- package/dist/orpc/core/stats.d.ts.map +1 -1
- package/dist/orpc/core/store.d.ts +1 -0
- package/dist/orpc/core/store.d.ts.map +1 -1
- package/dist/shared/clipboard.d.ts +23 -3
- package/dist/shared/clipboard.d.ts.map +1 -1
- package/dist/shared/panel-channel.d.ts +27 -1
- package/dist/shared/panel-channel.d.ts.map +1 -1
- package/dist/shared/prefs.d.ts +49 -0
- package/dist/shared/prefs.d.ts.map +1 -0
- package/dist/shared/redact.d.ts +6 -3
- package/dist/shared/redact.d.ts.map +1 -1
- package/dist/shared/safe-clone.d.ts +2 -1
- package/dist/shared/safe-clone.d.ts.map +1 -1
- package/dist/ui/assets/App-BDAG24ch.js +4 -0
- package/dist/ui/assets/App-CBJXphAE.css +1 -0
- package/dist/ui/assets/App-CoMIIpFn.js +5 -0
- package/dist/ui/assets/App-CrZKW7ZD.js +1 -0
- package/dist/ui/assets/App-D9h2xKeA.css +1 -0
- package/dist/ui/assets/App-DIxgDJPh.css +1 -0
- package/dist/ui/assets/HeadersTab-BAgPi_LJ.css +1 -0
- package/dist/ui/assets/HeadersTab-YiDZOc7w.js +1 -0
- package/dist/ui/assets/_plugin-vue_export-helper-DnlXueOW.js +2 -0
- package/dist/ui/assets/panels-BZNAuOBL.css +1 -0
- package/dist/ui/assets/panels-X7JpniLo.js +3 -0
- package/dist/ui/assets/store-CmrV1otI.js +1 -0
- package/dist/ui/panels/index.html +2 -3
- package/package.json +23 -26
- package/dist/inertia/plugin.d.ts +0 -13
- package/dist/inertia/plugin.d.ts.map +0 -1
- package/dist/orpc/plugin.d.ts +0 -13
- package/dist/orpc/plugin.d.ts.map +0 -1
- package/dist/storefront/plugin.d.ts +0 -11
- package/dist/storefront/plugin.d.ts.map +0 -1
- package/dist/ui/assets/App-BMyWBnLQ.js +0 -4
- package/dist/ui/assets/App-C5-JscO0.css +0 -1
- package/dist/ui/assets/App-CCUPtzNx.js +0 -5
- package/dist/ui/assets/App-Ct7Za--B.css +0 -1
- package/dist/ui/assets/App-Ctfis9Sq.js +0 -1
- package/dist/ui/assets/App-jiQKInbo.css +0 -1
- package/dist/ui/assets/_plugin-vue_export-helper-BDNMzG2s.js +0 -1
- package/dist/ui/assets/channel-D7V7aU79.js +0 -1
- package/dist/ui/assets/clipboard-BY7CN-yK.js +0 -1
- package/dist/ui/assets/clipboard-BnEeWyfh.css +0 -1
- package/dist/ui/assets/css-8QJvnqUH.js +0 -1
- package/dist/ui/assets/css-lJZLS6R3.js +0 -1
- package/dist/ui/assets/diff-woXpYk--.js +0 -1
- package/dist/ui/assets/html-GueGcY0x.js +0 -1
- package/dist/ui/assets/html-WzJrCOnD.js +0 -1
- package/dist/ui/assets/javascript-BzbQS41l.js +0 -1
- package/dist/ui/assets/javascript-CpIGwZ_Y.js +0 -1
- package/dist/ui/assets/json-B88Oqtu5.js +0 -1
- package/dist/ui/assets/json-C3WlssX3.js +0 -1
- package/dist/ui/assets/panel-channel-qxy-vGGq.js +0 -2
- package/dist/ui/assets/panels-B4LTsmli.css +0 -1
- package/dist/ui/assets/panels-BcOW2Xog.js +0 -2
- package/dist/ui/assets/preload-helper-CSlQMSTd.js +0 -2
- package/dist/ui/assets/shellscript-CLZ0U2zV.js +0 -1
- package/dist/ui/assets/typescript-Bb1J8qyy.js +0 -1
- package/dist/ui/assets/typescript-j_1H8WHN.js +0 -1
- package/dist/ui/assets/vitesse-dark-BZCL-v6S.js +0 -1
- package/dist/ui/assets/vitesse-light-VbXTXTou.js +0 -1
- package/dist/ui/assets/vue-B1Tf5CHw.js +0 -1
- package/dist/ui/assets/vue-C0gCEhF7.js +0 -155
- package/dist/ui/assets/vue-Kq4tvBbL.css +0 -1
- package/dist/ui/assets/vue-html-CGMs_6qn.js +0 -1
- package/dist/ui/assets/yaml-rwi0_p6S.js +0 -1
- package/dist/ui/vue/index.html +0 -15
- package/dist/vue-devtools/client/index.mjs +0 -4899
- package/dist/vue-devtools/client.d.ts +0 -2
- package/dist/vue-devtools/client.d.ts.map +0 -1
- package/dist/vue-devtools/plugin.d.ts +0 -15
- package/dist/vue-devtools/plugin.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,82 @@
|
|
|
1
1
|
# @scayle/storefront-devtools
|
|
2
2
|
|
|
3
|
+
## 0.2.0-alpha.6
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added the `allowedOrigins` and `clientAuth` options to `storefrontDevtools()`. They pass through to `@vitejs/devtools`, so a dev server on a hostname other than `localhost`, such as a reverse proxy, a tunnel, or an `/etc/hosts` entry, can allow its origin for the dock connection:
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
...storefrontDevtools({ allowedOrigins: ['https://dev-my-app.example.com'] }),
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`clientAuth: false` skips the one-time code, like the `VITE_DEVTOOLS_DISABLE_CLIENT_AUTH=true` environment variable. Other dock options stay fixed, so the MCP endpoint stays off. The new `StorefrontDevtoolsOptions` type describes both options.
|
|
14
|
+
|
|
15
|
+
- Added toasts for Inertia.js diagnostics in the Vite DevTools dock. A visit that hits a warning or error rule, such as a partial reload whose `only` prop the response leaves out, now shows a toast with the rule, the request method, and the path, so the mistake is visible without opening the Inertia.js panel. Its **Open Inertia.js** button opens the panel. Each rule shows once per visit, and informational diagnostics stay in the panel. Toasts appear once the dock is authorized in the browser. The upstream Messages dock is back too. It lists the diagnostics for as long as the dev server runs, and its button shows up with the first message. The other upstream docks stay off.
|
|
16
|
+
- Removed the workarounds for Vite's `transformIndexHtml` hook not running on SSR-rendered HTML. `@scayle/storefront` now runs the HTML template through that hook in dev, so `@vitejs/devtools` adds the dock launcher and `vite-plugin-vue-devtools` adds its Vue hook the way they do in any Vite app. `storefrontDevtools()` no longer appends its own launcher script to the client entry, which loaded the launcher twice, and no longer passes `appendTo` to `vueDevtools()`.
|
|
17
|
+
|
|
18
|
+
## Breaking changes
|
|
19
|
+
- Update `@scayle/storefront` together with this package. With a `@scayle/storefront` version that reads the HTML template without `transformIndexHtml`, the page loads neither the dock launcher nor the Vue DevTools hook.
|
|
20
|
+
|
|
21
|
+
- Added the Open Graph viewer from `@devframes/plugin-og` to the dock. It lists the title, description, canonical link, `og:*`, and `twitter:*` tags the controllers render for the current page, flags missing tags, and previews how a shared link to the page looks. The viewer follows client-side visits and runs on the dev server only.
|
|
22
|
+
|
|
23
|
+
The dev server fetches the page with Node's `fetch`, so Node has to trust its TLS certificate. With a certificate from `mkcert -install`, start the dev server with `NODE_USE_SYSTEM_CA=1`.
|
|
24
|
+
|
|
25
|
+
- Added an Inspect entry to the dock, from `vite-plugin-inspect` 12. It lists every module Vite has loaded for the client and the server render, and shows what each plugin's `load` and `transform` step did to a module, with a diff per step. Use it to find out why a module contains unexpected code or which plugin slows down a cold start. `storefrontDevtools()` adds it on the dev server only, so don't add `vite-plugin-inspect` to your own Vite config.
|
|
26
|
+
- Added **Copy value** and **Copy path** to every row of the trees in the Inertia and oRPC panels. Copy value copies a string as is and an object or array as JSON. Copy path copies the access path from the tree's root, such as `props.user.addresses[0]`. Both show on hover and on the focused row.
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Added dependency `@devframes/plugin-messages@catalog:devframe`
|
|
31
|
+
- Added dependency `@devframes/plugin-messages--assets@catalog:devframe`
|
|
32
|
+
- Added dependency `@devframes/plugin-og@catalog:devframe`
|
|
33
|
+
- Added dependency `@devframes/plugin-og--assets@catalog:devframe`
|
|
34
|
+
- Added dependency `vite-plugin-inspect@catalog:`
|
|
35
|
+
- Added dependency `vite-plugin-vue-devtools@catalog:`
|
|
36
|
+
- Fixed the copy buttons in the Inertia.js and oRPC detail views confirming "Copied" when nothing reached the clipboard. They now say "Copy failed" when the browser refuses the write, for example outside a secure context or when a permission policy blocks the clipboard.
|
|
37
|
+
- The Inertia panel's updates no longer repeat the current page. The page, often the largest part of an update with about 83 KB on a product listing page, used to go out with every captured event. The Page tab now gets it only when the page changes, which brings an update for 200 captured visits from about 113 KB to about 30 KB.
|
|
38
|
+
- Aligned the `@devframes/plugin-messages--assets` dependency with `@devframes/plugin-messages`. The package pinned the assets at 1.2.6 next to the plugin at 1.3.0, so the dev server warned that the installed assets differ from the version the plugin requires. Both are now on 1.3.2, the same version as `devframe` and the other `@devframes/*` packages.
|
|
39
|
+
|
|
40
|
+
The `@devframes/plugin-og--assets` 1.3.0 and 1.3.1 releases also shipped an incomplete stylesheet, so the Open Graph panel rendered without its layout. 1.3.2 includes the missing styles.
|
|
41
|
+
|
|
42
|
+
- The empty-list message in the Inertia.js and oRPC panels, such as "Use the app to see oRPC calls appear here.", now sits below the filters instead of at the bottom of the list pane.
|
|
43
|
+
- Fixed the Inertia.js panel showing the wrong component for a visit after browser back or forward navigation. Inertia restores that page from history without a request, and the panel used to write the restored page into the previous visit, so its detail showed one page's component next to another page's response props. A restore now only updates the current page and adds no request to the list.
|
|
44
|
+
- Fixed the markup of the Inertia.js request list. The filter chips, the method and status filters, and the URL search sat inside the element with `role="listbox"`, which only allows options, so screen readers announced them as part of the list. The listbox now holds the request rows only, and the arrow keys still move the selection from the URL search.
|
|
45
|
+
- Fixed the Inertia.js request list not scrolling to the selected row. Moving the selection with the arrow keys now brings the row into view when it sits outside the visible part of the list.
|
|
46
|
+
- The Inertia.js panel now keeps the width of the request list across reloads. Before, a reload reset the list to its default width.
|
|
47
|
+
- Fixed the Inertia.js panel's asset version mismatch diagnostic. It guessed from a 409 status, which Inertia never reports for a location visit, so a real mismatch went unflagged and an external redirect looked like a normal visit. The panel now listens to Inertia's `inertia:location` event. It marks the visit as a redirect and flags a version mismatch only when the event says the asset version changed.
|
|
48
|
+
- Added method and status range filters to the Inertia.js request list, next to the visit type chips and the URL search. The panel remembers both across reloads. A visit now also carries the status of its response, so the list can filter on it and the detail header shows it for successful visits too. Before, only failed visits had one.
|
|
49
|
+
- Renamed the **Open Inertia.js** button of the diagnostic toasts and the Messages dock entries to **Open Inertia Panel**, so the label names the panel it opens and not the library.
|
|
50
|
+
- The Inertia.js panel now keeps the rows you opened in the Response tab and the Page tab. They stay open when you select another request and after a reload, where before every tree started collapsed. The panel ignores a stored value it can't read.
|
|
51
|
+
- The Inertia and oRPC panels stay responsive with a full capture. The page scripts used to send every captured request and call in full on each update, which came to 84 MB per update for 200 product listing page visits. Updates now carry only the fields the request and call lists show, about 113 KB for the same capture, and the panel loads the selected request or call in full on its own.
|
|
52
|
+
- The Inertia.js, oRPC, and Storefront panels are easier to read. Body text grew from 12px to 13px, the size Vue DevTools uses in the same dock, and the method, type, status, and duration in the request and call lists grew from 10px to 11px. The duration now uses the full text color. The Inertia.js list shows a URL on the app's origin as its path, so deferred and partial reloads no longer all truncate to the same `https://localhost:…` prefix, and hovering a row shows the full URL or procedure. Both lists widen from a grip in their bottom corner. The Storefront panel stacks its sections in one column when two columns would break field names mid-word.
|
|
53
|
+
- Fixed the README advice to set `devtools: { allowedOrigins }` or `devtools: { clientAuth: false }` in the app's Vite config. `storefrontDevtools()` registers the Vite DevTools dock itself, so turning on Vite's `devtools` option registers it a second time and the dev server stops with `DTK0034`. Move those settings to `storefrontDevtools({ allowedOrigins })` or `storefrontDevtools({ clientAuth: false })` and remove the `devtools` option from your Vite config.
|
|
54
|
+
- Fixed the oRPC panel storing the OAuth `code` of `auth/exchangeAuthCode` in cleartext. The redaction was keyed by the dotted router path, but captured calls are named by their URL path, so it never matched. The `code` now shows as `[redacted]` in the panel, in Copy as curl, and in Copy as markdown.
|
|
55
|
+
- Fixed the oRPC and Inertia.js panels storing values under `jwt` and `session-id` keys in cleartext, for example a `checkoutJwt` in an RPC response. These keys now show as `[redacted]`, in the panels and in Copy as curl and Copy as markdown.
|
|
56
|
+
- Fixed the Inertia.js, oRPC, and Storefront tab icons disappearing when the dock uses its light color scheme. The icons were white only, and now come in a light and a dark variant that the dock picks from.
|
|
57
|
+
- The panel app shows `Unknown Storefront DevTools view "<name>".` again when `/__storefront-devtools/panels/` opens with a hash that names no view, such as `#nope`. It used to open the Inertia.js view without a hint. Without a hash it still opens the Inertia.js view.
|
|
58
|
+
- The Inertia.js, oRPC, and Storefront panels now share one dock iframe instead of loading one each. The dock still shows them as separate tabs in the SCAYLE Storefront group, and switching tabs swaps the view inside that iframe, so a panel keeps its selection and filters. `/__storefront-devtools/panels/#<view>` replaces `?view=<view>` as the direct link to a panel. The dock forgets a custom order or pin you set for these tabs, because their dock entry ids changed.
|
|
59
|
+
- The trees in the Inertia and oRPC panels follow the WAI-ARIA tree pattern. Only one row is in the tab order, Up and Down move between rows, Right expands a row or moves to its first child, Left collapses a row or moves to its parent, and Home and End jump to the first and last row. Screen readers announce each row's level and whether it is expanded.
|
|
60
|
+
- The dock now shows the full Vue DevTools from `vite-plugin-vue-devtools` 9 as one "Vue DevTools" entry, in place of the separate Components and Timeline entries. Besides the component tree and the timeline, it has the inspectors that Vue plugins such as vue-i18n register, a pages view, settings, and **Select component in the page** to jump from a rendered element to its component. The `@scayle/storefront-devtools/vue-devtools/client` export is gone, as `vite-plugin-vue-devtools` now injects the Vue DevTools hook itself. The dock's MCP endpoint stays off, so Vue DevTools doesn't hand component state to MCP clients. `vite-plugin-vue-devtools` 9.0.0-rc.2 declares `@vitejs/devtools ^0.7.6`, so your package manager reports an unmet peer dependency for the 0.8.0 this package uses. It imports nothing from `@vitejs/devtools`, only types from `@vitejs/devtools-kit`, and runs on 0.8.0. The `vue` peer dependency is gone, as nothing in the package imports `vue` anymore.
|
|
61
|
+
- Replaced untyped values that came from Hono, `JSON.parse` and vendor SDK types with explicit types. Runtime behavior is unchanged. The auth guard middleware that `@scayle/storefront` builds now types its Hono context as `Context<{ Variables: StorefrontVariables }>`, so the `StorefrontContext` reads inside it are checked.
|
|
62
|
+
|
|
63
|
+
## 0.2.0-alpha.5
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- The Inertia panel's feature badges take their display text from the shared feature description table instead of a duplicated `label` field on each detected feature.
|
|
68
|
+
- The documentation link in a feature badge tooltip of the Inertia panel can be reached with the keyboard.
|
|
69
|
+
- Credentials no longer show up in captured Inertia data. Page props, flash data, form data and request headers are now redacted the same way as in the oRPC panel, including in "Copy as Markdown" and in the saved previous session. Keys such as `password`, `token`, `apiKey` and `cookie` appear as `[redacted]`, and header names follow the same rule, in both panels. Validation error messages keep their text in the `inertia:error` event, even for a field called `password`. The error bag in the page props of a response is still redacted by key.
|
|
70
|
+
- The detail view of a request in the Inertia panel and of a call in the oRPC panel resets, including "Show changes since last page" and expanded rows, when you select another one.
|
|
71
|
+
- Diagnostics in the Inertia panel now link to their documentation.
|
|
72
|
+
- The Inertia panel now assigns page and error events to the visit that produced them. Before, overlapping visits to different URLs could end up on the wrong request.
|
|
73
|
+
- The Inertia panel keeps at most 100 captured events per request, and the oldest upload progress events drop first. Long uploads no longer grow a request without limit or lose its start event.
|
|
74
|
+
- A visit that ends without writing browser history, such as a `409` location redirect or a network error, no longer hides the next client-side visit in the Inertia panel. Overlapping visits and concurrent deferred reloads keep their own history writes apart, and `router.remember()` no longer uses up the history write of a visit that is still running.
|
|
75
|
+
- The tabs of the Inertia and oRPC panels follow the WAI-ARIA tabs pattern. The arrow keys, Home and End move between tabs, and only the selected tab is in the tab order. Pause and Clear no longer sit inside the tablist.
|
|
76
|
+
- The oRPC and Inertia panels now share one Headers tab. The tab looks the same, except that its empty message reads "No headers captured." in both panels instead of naming a call or a request.
|
|
77
|
+
- Updates `@vitejs/devtools` and `@vitejs/devtools-kit` to 0.8.0. Vite lists 0.8 as a supported `@vitejs/devtools` version from 8.3.5 on, so use Vite 8.3.5 or newer with the dock. The package also moves to `devframe` 1.2.6, which `@vitejs/devtools` 0.8.0 expects.
|
|
78
|
+
- Clean up findings from the type-aware lint rules. Removes type assertions and non-null assertions the compiler no longer needs, drops a few redundant `null` checks, and replaces `String.prototype.match` with `RegExp.prototype.exec` for non-global patterns. No change in behavior.
|
|
79
|
+
|
|
3
80
|
## 0.2.0-alpha.4
|
|
4
81
|
|
|
5
82
|
### Patch Changes
|