Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use transparent CORS proxy in Blueprint Builder #2089

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

brandonpayton
Copy link
Member

@brandonpayton brandonpayton commented Dec 17, 2024

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:
{
  "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.

@brandonpayton brandonpayton added [Type] Bug An existing feature does not function as intended [Feature] Blueprints Builder labels Dec 17, 2024
@brandonpayton brandonpayton requested a review from a team December 17, 2024 05:11
@brandonpayton brandonpayton self-assigned this Dec 17, 2024
@bgrgicak bgrgicak merged commit 8f9ef64 into trunk Dec 17, 2024
10 checks passed
@bgrgicak bgrgicak deleted the use-cors-proxy-in-builder branch December 17, 2024 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blueprints Builder [Type] Bug An existing feature does not function as intended
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants