Skip to content

Conversation

@adamziel
Copy link
Collaborator

@adamziel adamziel commented Nov 29, 2025

Motivation for the change, related issues

When saving a temporary site to OPFS, stores the associated blueprint bundle into the OPFS alongside the site data. Right now, the bundled files are not preserved. It's not a big problem today, but the upcoming bundle editor (#2942) makes the problem much more prominent. Thus, let's solve it before making bundles more prominent.

When saving a temporary site to OPFS, if the site has a blueprint bundle
(originalBlueprint with filesystem methods), the entire bundle is now
copied to a 'blueprint-bundle' subdirectory alongside the site data.

This allows sites that were created from blueprint bundles (via 'Run Blueprint')
to have their bundled resources preserved for future use.

Changes:
- Add opfs-blueprint-bundle-storage.ts with persistBlueprintBundle() and
  PersistedBlueprintBundle class for saving/loading bundles
- Update persist-temporary-site.ts to check for bundle and persist it
- Add 'bundle-directory' type to BlueprintSource
- Update opfs-site-storage.ts to set originalBlueprintSource when bundle
  is persisted and load from bundle on site load
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants