onlook icon indicating copy to clipboard operation
onlook copied to clipboard

fix: freestyle initialization in local developement

Open iNerdStack opened this issue 7 months ago • 1 comments

Description

This PR introduces a small fix for freestyle SDK initialization when no freestyle key is present in local development.

Related Issues

Type of Change

  • [x] Bug fix
  • [ ] New feature
  • [ ] Documentation update
  • [ ] Release
  • [ ] Refactor
  • [ ] Other (please describe):

Testing

Screenshots (if applicable)

Screenshot 2025-06-07 at 13 46 25 Screenshot 2025-06-07 at 14 01 56 Screenshot 2025-06-07 at 14 03 19

Additional Notes


[!IMPORTANT] Fixes Freestyle SDK initialization in domain.ts by checking for FREESTYLE_API_KEY and throwing an error if missing.

  • Behavior:
    • Introduces initializeSdk() in domain.ts to check for FREESTYLE_API_KEY before initializing FreestyleSandboxes.
    • Throws TRPCError with code PRECONDITION_FAILED if FREESTYLE_API_KEY is missing.
  • Error Handling:
    • Ensures domain publishing features are only available when FREESTYLE_API_KEY is configured.

This description was created by Ellipsis for 2237a3c3cf0b3a4af8bdd8000f543ab1bb7afdb6. You can customize this summary. It will automatically update as commits are pushed.

iNerdStack avatar Jun 07 '25 11:06 iNerdStack

@iNerdStack is attempting to deploy a commit to the Onlook Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jun 07 '25 11:06 vercel[bot]