-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use transparent CORS proxy in Blueprint Builder (#2089)
## Motivation for the change, related issues The Blueprint builder doesn't use the CORS proxy transparently like the web app does. The reason is that the builder does not pass a CORS proxy URL to `startPlaygroundWeb()`. ## Implementation details This PR does a liberal conversion of builder.js to builder.ts and imports the virtual vite module `virtual:cors-proxy-url` to obtain the right CORS proxy URL depending on target. ## Testing Instructions (or ideally a Blueprint) - `npm run build` - Serve `dist/packages/playground/wasm-wordpress-net` via a local web server - Navigate to the Blueprint builder on the server - Run the following Blueprint and confirm that the Nautilus theme is installed and activated: ```json { "landingPage": "/wp-admin/themes.php", "steps": [ { "step": "login", "username": "admin" }, { "step": "installTheme", "themeZipFile": { "resource": "url", "url": "https://codeload.github.com/ndiego/nautilus/zip/refs/heads/main" } } ] } ``` - Play with Blueprint Builder and confirm that all appears to be in working order.
- Loading branch information
1 parent
ef3d482
commit 8f9ef64
Showing
3 changed files
with
15 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,9 @@ | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/src-min-noconflict/ace.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/src-min-noconflict/ext-language_tools.js"></script> | ||
<link rel="stylesheet" type="text/css" href="style.css" /> | ||
<script src="builder.js" type="module"></script> | ||
<script type="module"> | ||
import('./builder'); | ||
</script> | ||
</head> | ||
<body> | ||
<div class="playground-wrapper"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters