Commit 50d8f9d
Complete browser SDK v1 contract: honor onClientConnected + expose granular ops (#1585)
* Honor onClientConnected in startBrowserPreview
startBrowserPreview accepted an onClientConnected option but never invoked
it, so consumers passing the callback never received the Playground client
and had to rely on the resolved value — which is a result envelope, not the
client itself. Invoke options.onClientConnected(client) with the connected
Playground client so the documented callback contract works.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Expose ensureDirectory/writeFile/runRecipe on browser SDK v1 facade
The browser SDK v1 facade promoted only part of the granular WordPress
operation set to the top level (setFrontendAdminBarVisible,
runBrowserSessionRecipe, consumeContainedSiteSync), leaving consumers that
resolve operations flat as v1.<op> unable to find ensureDirectory,
writeFile, and runRecipe (only reachable via v1.methods). Promote the
remaining operations the preview materializer relies on so the v1 surface
is consistent.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Chris Huber <chris.huber@a8c.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 50c6658 commit 50d8f9d
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
677 | 681 | | |
678 | 682 | | |
679 | 683 | | |
| |||
708 | 712 | | |
709 | 713 | | |
710 | 714 | | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
711 | 718 | | |
712 | 719 | | |
713 | 720 | | |
| |||
0 commit comments